@warp-ds/elements 2.2.0-next.7 → 2.2.0-next.9
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/api.js +1 -1
- package/dist/api.js.map +4 -4
- package/dist/custom-elements.json +1826 -1424
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1256 -137
- package/dist/index.js.map +4 -4
- package/dist/packages/alert/index.js.map +1 -1
- package/dist/packages/alert/react.js.map +1 -1
- package/dist/packages/attention/attention.stories.d.ts +5 -0
- package/dist/packages/attention/attention.test.d.ts +1 -0
- package/dist/packages/attention/index.d.ts +48 -89
- package/dist/packages/attention/index.js +3354 -16
- package/dist/packages/attention/index.js.map +4 -4
- package/dist/packages/attention/layout-styles.d.ts +1 -0
- package/dist/packages/attention/react.d.ts +1 -0
- package/dist/packages/attention/react.js +3405 -0
- package/dist/packages/attention/react.js.map +7 -0
- package/dist/packages/attention/styles.d.ts +1 -0
- package/dist/packages/button/index.d.ts +1 -0
- package/dist/packages/button/index.js +214 -9
- package/dist/packages/button/index.js.map +4 -4
- package/dist/packages/button/react.js +213 -8
- package/dist/packages/button/react.js.map +4 -4
- package/dist/packages/datepicker/DatePicker.test.d.ts +1 -0
- package/dist/packages/datepicker/datepicker.d.ts +9 -0
- package/dist/packages/datepicker/index.js +87 -83
- package/dist/packages/datepicker/index.js.map +3 -3
- package/dist/packages/datepicker/react.d.ts +2 -0
- package/dist/packages/datepicker/react.js +2805 -0
- package/dist/packages/datepicker/react.js.map +7 -0
- package/dist/packages/link/index.d.ts +39 -0
- package/dist/packages/link/index.js +2646 -0
- package/dist/packages/link/index.js.map +7 -0
- package/dist/packages/link/link.stories.d.ts +20 -0
- package/dist/packages/link/link.test.d.ts +1 -0
- package/dist/packages/link/react.d.ts +2 -0
- package/dist/packages/link/react.js +2666 -0
- package/dist/packages/link/react.js.map +7 -0
- package/dist/packages/link/styles.d.ts +1 -0
- package/dist/packages/steps/index.d.ts +43 -0
- package/dist/packages/steps/index.js +2465 -0
- package/dist/packages/steps/index.js.map +7 -0
- package/dist/packages/steps/locales/da/messages.d.mts +1 -0
- package/dist/packages/steps/locales/en/messages.d.mts +1 -0
- package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
- package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
- package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
- package/dist/packages/steps/react.d.ts +3 -0
- package/dist/packages/steps/react.js +2485 -0
- package/dist/packages/steps/react.js.map +7 -0
- package/dist/packages/steps/steps.stories.d.ts +12 -0
- package/dist/packages/steps/styles.d.ts +1 -0
- package/dist/packages/textfield/index.js +1 -1
- package/dist/packages/textfield/index.js.map +2 -2
- package/dist/packages/textfield/react.js +1 -1
- package/dist/packages/textfield/react.js.map +2 -2
- package/dist/packages/toast/api.d.ts +4 -45
- package/dist/packages/toast/index.d.ts +3 -3
- package/dist/packages/toast/index.js +2461 -22
- package/dist/packages/toast/index.js.map +4 -4
- package/dist/packages/toast/styles.d.ts +1 -0
- package/dist/packages/toast/toast-container.d.ts +12 -78
- package/dist/packages/toast/toast.d.ts +16 -29
- package/dist/packages/toast/types.d.ts +15 -0
- package/dist/vscode.html-custom-data.json +86 -34
- package/dist/web-types.json +199 -99
- package/package.json +11 -9
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function
|
|
1
|
+
var js=Object.create;var Xt=Object.defineProperty;var jo=Object.getOwnPropertyDescriptor;var Hs=Object.getOwnPropertyNames;var qs=Object.getPrototypeOf,Js=Object.prototype.hasOwnProperty;var Ho=t=>{throw TypeError(t)};var Us=(t,e,r)=>e in t?Xt(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var qo=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ys=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Hs(e))!Js.call(t,a)&&a!==r&&Xt(t,a,{get:()=>e[a],enumerable:!(o=jo(e,a))||o.enumerable});return t};var Xs=(t,e,r)=>(r=t!=null?js(qs(t)):{},Ys(e||!t||!t.__esModule?Xt(r,"default",{value:t,enumerable:!0}):r,t));var s=(t,e,r,o)=>{for(var a=o>1?void 0:o?jo(e,r):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(a=(o?n(e,r,a):n(a))||a);return o&&a&&Xt(e,r,a),a};var Le=(t,e,r)=>Us(t,typeof e!="symbol"?e+"":e,r),Fr=(t,e,r)=>e.has(t)||Ho("Cannot "+r);var R=(t,e,r)=>(Fr(t,e,"read from private field"),r?r.call(t):e.get(t)),Oe=(t,e,r)=>e.has(t)?Ho("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),Jo=(t,e,r,o)=>(Fr(t,e,"write to private field"),o?o.call(t,r):e.set(t,r),r),Uo=(t,e,r)=>(Fr(t,e,"access private method"),r);var Qo=qo(We=>{"use strict";Object.defineProperty(We,"__esModule",{value:!0});We.errorMessages=We.ErrorType=void 0;var dt;(function(t){t.MalformedUnicode="MALFORMED_UNICODE",t.MalformedHexadecimal="MALFORMED_HEXADECIMAL",t.CodePointLimit="CODE_POINT_LIMIT",t.OctalDeprecation="OCTAL_DEPRECATION",t.EndOfString="END_OF_STRING"})(dt=We.ErrorType||(We.ErrorType={}));We.errorMessages=new Map([[dt.MalformedUnicode,"malformed Unicode character escape sequence"],[dt.MalformedHexadecimal,"malformed hexadecimal character escape sequence"],[dt.CodePointLimit,"Unicode codepoint must not be greater than 0x10FFFF in escape sequence"],[dt.OctalDeprecation,'"0"-prefixed octal literals and octal escape sequences are deprecated; for octal literals use the "0o" prefix instead'],[dt.EndOfString,"malformed escape sequence at end of string"]])});var Go=qo(Re=>{"use strict";Object.defineProperty(Re,"__esModule",{value:!0});Re.unraw=Re.errorMessages=Re.ErrorType=void 0;var re=Qo();Object.defineProperty(Re,"ErrorType",{enumerable:!0,get:function(){return re.ErrorType}});Object.defineProperty(Re,"errorMessages",{enumerable:!0,get:function(){return re.errorMessages}});function Zs(t){return!t.match(/[^a-f0-9]/i)?parseInt(t,16):NaN}function Qt(t,e,r){let o=Zs(t);if(Number.isNaN(o)||r!==void 0&&r!==t.length)throw new SyntaxError(re.errorMessages.get(e));return o}function Ks(t){let e=Qt(t,re.ErrorType.MalformedHexadecimal,2);return String.fromCharCode(e)}function Zo(t,e){let r=Qt(t,re.ErrorType.MalformedUnicode,4);if(e!==void 0){let o=Qt(e,re.ErrorType.MalformedUnicode,4);return String.fromCharCode(r,o)}return String.fromCharCode(r)}function Gs(t){return t.charAt(0)==="{"&&t.charAt(t.length-1)==="}"}function Ws(t){if(!Gs(t))throw new SyntaxError(re.errorMessages.get(re.ErrorType.MalformedUnicode));let e=t.slice(1,-1),r=Qt(e,re.ErrorType.MalformedUnicode);try{return String.fromCodePoint(r)}catch(o){throw o instanceof RangeError?new SyntaxError(re.errorMessages.get(re.ErrorType.CodePointLimit)):o}}function el(t,e=!1){if(e)throw new SyntaxError(re.errorMessages.get(re.ErrorType.OctalDeprecation));let r=parseInt(t,8);return String.fromCharCode(r)}var tl=new Map([["b","\b"],["f","\f"],["n",`
|
|
2
|
+
`],["r","\r"],["t"," "],["v","\v"],["0","\0"]]);function rl(t){return tl.get(t)||t}var ol=/\\(?:(\\)|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 Ko(t,e=!1){return t.replace(ol,function(r,o,a,i,n,l,d,u,p){if(o!==void 0)return"\\";if(a!==void 0)return Ks(a);if(i!==void 0)return Ws(i);if(n!==void 0)return Zo(n,l);if(d!==void 0)return Zo(d);if(u==="0")return"\0";if(u!==void 0)return el(u,!e);if(p!==void 0)return rl(p);throw new SyntaxError(re.errorMessages.get(re.ErrorType.EndOfString))})}Re.unraw=Ko;Re.default=Ko});import{html as Gt,LitElement as Fl}from"lit";var w=function(){for(var t=[],e=arguments.length;e--;)t[e]=arguments[e];return t.reduce(function(r,o){return r.concat(typeof o=="string"?o:Array.isArray(o)?w.apply(void 0,o):typeof o=="object"&&o?Object.keys(o).map(function(a){return o[a]?a:""}):"")},[]).join(" ")};import{property as Wt}from"lit/decorators.js";import{ifDefined as ua}from"lit/directives/if-defined.js";import{css as Yo}from"lit";var E=Yo`
|
|
3
3
|
*,
|
|
4
4
|
:before,
|
|
5
5
|
:after {
|
|
@@ -272,7 +272,7 @@ var Os=Object.create;var Xt=Object.defineProperty;var No=Object.getOwnPropertyDe
|
|
|
272
272
|
svg {
|
|
273
273
|
pointer-events: none;
|
|
274
274
|
}
|
|
275
|
-
`,
|
|
275
|
+
`,fg=Yo`*, :before, :after {
|
|
276
276
|
--w-rotate: 0;
|
|
277
277
|
--w-rotate-x: 0;
|
|
278
278
|
--w-rotate-y: 0;
|
|
@@ -2438,7 +2438,7 @@ var Os=Object.create;var Xt=Object.defineProperty;var No=Object.getOwnPropertyDe
|
|
|
2438
2438
|
display: none
|
|
2439
2439
|
}
|
|
2440
2440
|
}
|
|
2441
|
-
`;import{css as
|
|
2441
|
+
`;import{css as Qs}from"lit";var Xo=Qs`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.justify-center{justify-content:center}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-text{color:var(--w-s-color-text)}.w-40{width:4rem}.w-max{width:max-content}.pb-0{padding-bottom:0}.pl-12{padding-left:1.2rem}.pr-12{padding-right:1.2rem}.cursor-default{cursor:default}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;import{LitElement as hl}from"lit";import{unsafeStatic as fl,html as bl}from"lit/static-html.js";var ta=Xs(Go(),1);var Je=t=>typeof t=="string",al=t=>typeof t=="function",Wo=new Map,ra="en";function Jr(t){return[...Array.isArray(t)?t:[t],ra]}function Ur(t,e,r){let o=Jr(t);r||(r="default");let a;if(typeof r=="string")switch(a={day:"numeric",month:"short",year:"numeric"},r){case"full":a.weekday="long";case"long":a.month="long";break;case"short":a.month="numeric";break}else a=r;return Zt(()=>Kt("date",o,r),()=>new Intl.DateTimeFormat(o,a)).format(Je(e)?new Date(e):e)}function il(t,e,r){let o;if(r||(r="default"),typeof r=="string")switch(o={second:"numeric",minute:"numeric",hour:"numeric"},r){case"full":case"long":o.timeZoneName="short";break;case"short":delete o.second}else o=r;return Ur(t,e,o)}function jr(t,e,r){let o=Jr(t);return Zt(()=>Kt("number",o,r),()=>new Intl.NumberFormat(o,r)).format(e)}function ea(t,e,r,{offset:o=0,...a}){var l,d;let i=Jr(t),n=e?Zt(()=>Kt("plural-ordinal",i),()=>new Intl.PluralRules(i,{type:"ordinal"})):Zt(()=>Kt("plural-cardinal",i),()=>new Intl.PluralRules(i,{type:"cardinal"}));return(d=(l=a[r])!=null?l:a[n.select(r-o)])!=null?d:a.other}function Zt(t,e){let r=t(),o=Wo.get(r);return o||(o=e(),Wo.set(r,o)),o}function Kt(t,e,r){let o=e.join("-");return`${t}-${o}-${JSON.stringify(r)}`}var oa=/\\u[a-fA-F0-9]{4}|\\x[a-fA-F0-9]{2}/,aa="%__lingui_octothorpe__%",nl=(t,e,r={})=>{let o=e||t,a=n=>typeof n=="object"?n:r[n],i=(n,l)=>{let d=Object.keys(r).length?a("number"):void 0,u=jr(o,n,d);return l.replace(new RegExp(aa,"g"),u)};return{plural:(n,l)=>{let{offset:d=0}=l,u=ea(o,!1,n,l);return i(n-d,u)},selectordinal:(n,l)=>{let{offset:d=0}=l,u=ea(o,!0,n,l);return i(n-d,u)},select:sl,number:(n,l)=>jr(o,n,a(l)||{style:l}),date:(n,l)=>Ur(o,n,a(l)||l),time:(n,l)=>il(o,n,a(l)||l)}},sl=(t,e)=>{var r;return(r=e[t])!=null?r:e.other};function ll(t,e,r){return(o={},a)=>{let i=nl(e,r,a),n=(d,u=!1)=>Array.isArray(d)?d.reduce((p,m)=>{if(m==="#"&&u)return p+aa;if(Je(m))return p+m;let[x,g,v]=m,$={};g==="plural"||g==="selectordinal"||g==="select"?Object.entries(v).forEach(([S,L])=>{$[S]=n(L,g==="plural"||g==="selectordinal")}):$=v;let y;if(g){let S=i[g];y=S(o[x],$)}else y=o[x];return y==null?p:p+y},""):d,l=n(t);return Je(l)&&oa.test(l)?(0,ta.unraw)(l):Je(l)?l:l?String(l):""}}var cl=Object.defineProperty,dl=(t,e,r)=>e in t?cl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,ul=(t,e,r)=>(dl(t,typeof e!="symbol"?e+"":e,r),r),Hr=class{constructor(){ul(this,"_events",{})}on(e,r){var a;var o;return(a=(o=this._events)[e])!=null||(o[e]=[]),this._events[e].push(r),()=>this.removeListener(e,r)}removeListener(e,r){let o=this._getListeners(e);if(!o)return;let a=o.indexOf(r);~a&&o.splice(a,1)}emit(e,...r){let o=this._getListeners(e);o&&o.map(a=>a.apply(this,r))}_getListeners(e){let r=this._events[e];return Array.isArray(r)?r:!1}},pl=Object.defineProperty,ml=(t,e,r)=>e in t?pl(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,et=(t,e,r)=>(ml(t,typeof e!="symbol"?e+"":e,r),r),qr=class extends Hr{constructor(e){var r;super(),et(this,"_locale",""),et(this,"_locales"),et(this,"_localeData",{}),et(this,"_messages",{}),et(this,"_missing"),et(this,"_messageCompiler"),et(this,"t",this._.bind(this)),e.missing!=null&&(this._missing=e.missing),e.messages!=null&&this.load(e.messages),e.localeData!=null&&this.loadLocaleData(e.localeData),(typeof e.locale=="string"||e.locales)&&this.activate((r=e.locale)!=null?r:ra,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){let o=this._localeData[e];o?Object.assign(o,r):this._localeData[e]=r}setMessagesCompiler(e){return this._messageCompiler=e,this}loadLocaleData(e,r){typeof e=="string"?this._loadLocaleData(e,r):Object.keys(e).forEach(o=>this._loadLocaleData(o,e[o])),this.emit("change")}_load(e,r){let o=this._messages[e];o?Object.assign(o,r):this._messages[e]=r}load(e,r){typeof e=="string"&&typeof r=="object"?this._load(e,r):Object.entries(e).forEach(([o,a])=>this._load(o,a)),this.emit("change")}loadAndActivate({locale:e,locales:r,messages:o}){this._locale=e,this._locales=r||void 0,this._messages[this._locale]=o,this.emit("change")}activate(e,r){this._locale=e,this._locales=r,this.emit("change")}_(e,r,o){if(!this.locale)throw new Error("Lingui: Attempted to call a translation function without setting a locale.\nMake sure to call `i18n.activate(locale)` before using Lingui functions.\nThis issue may also occur due to a race condition in your initialization logic.");let a=o==null?void 0:o.message;e||(e=""),Je(e)||(r=e.values||r,a=e.message,e=e.id);let i=this.messages[e],n=i===void 0,l=this._missing;if(l&&n)return al(l)?l(this._locale,e):l;n&&this.emit("missing",{id:e,locale:this._locale});let d=i||a||e;return Je(d)&&(this._messageCompiler?d=this._messageCompiler(d):console.warn(`Uncompiled message detected! Message:
|
|
2442
2442
|
|
|
2443
2443
|
> ${d}
|
|
2444
2444
|
|
|
@@ -2446,29 +2446,29 @@ That means you use raw catalog or your catalog doesn't have a translation for th
|
|
|
2446
2446
|
ICU features such as interpolation and plurals will not work properly for that message.
|
|
2447
2447
|
|
|
2448
2448
|
Please compile your catalog first.
|
|
2449
|
-
`)),
|
|
2450
|
-
<button aria-label="${
|
|
2449
|
+
`)),Je(d)&&oa.test(d)?JSON.parse(`"${d}"`):Je(d)?d:ll(d,this._locale,this._locales)(r,o==null?void 0:o.formats)}date(e,r){return Ur(this._locales||this._locale,e,r)}number(e,r){return jr(this._locales||this._locale,e,r)}};function gl(t={}){return new qr(t)}var c=gl();var vl=JSON.parse('{"icon.title.search":["Forst\xF8rrelsesglass"]}'),wl=JSON.parse('{"icon.title.search":["Magnifying glass"]}'),xl=JSON.parse('{"icon.title.search":["Suurennuslasi"]}'),yl=JSON.parse('{"icon.title.search":["Forst\xF8rrelsesglas"]}'),kl=JSON.parse('{"icon.title.search":["F\xF6rstoringsglas"]}'),ia=["en","nb","fi","da","sv"],na="en",El=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},sa=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":na},Yr=t=>ia.find(e=>t===e||t.toLowerCase().includes(e))||sa();function $l(){var t;if(typeof window=="undefined"){let e=El();return Yr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=sa();return ia.includes(e)?Yr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Yr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),na}}var Cl=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,_l=(t,e,r,o,a)=>{let i=$l(),n=Cl(i,t,e,r,o,a);c.load(i,n),c.activate(i)};_l(wl,vl,xl,yl,kl);var Sl=class extends hl{render(){let t=c.t({message:"Magnifying glass",id:"icon.title.search",comment:"Title for search icon"});return bl`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-search-16-part">${fl(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8.905 12.102A6.042 6.042 0 1 0 4.18.981a6.042 6.042 0 0 0 4.726 11.121Zm1.909-1.289L15.5 15.5"></path></svg>`}};customElements.get("w-icon-search-16")||customElements.define("w-icon-search-16",Sl);import{LitElement as Ll}from"lit";import{unsafeStatic as Ol,html as Tl}from"lit/static-html.js";var zl=JSON.parse('{"icon.title.close":["Kryss"]}'),Ml=JSON.parse('{"icon.title.close":["Cross"]}'),Nl=JSON.parse('{"icon.title.close":["Rasti"]}'),Al=JSON.parse('{"icon.title.close":["Kryds"]}'),Dl=JSON.parse('{"icon.title.close":["Kryss"]}'),la=["en","nb","fi","da","sv"],ca="en",Bl=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},da=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ca},Xr=t=>la.find(e=>t===e||t.toLowerCase().includes(e))||da();function Pl(){var t;if(typeof window=="undefined"){let e=Bl();return Xr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=da();return la.includes(e)?Xr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Xr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ca}}var Rl=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Vl=(t,e,r,o,a)=>{let i=Pl(),n=Rl(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Vl(Ml,zl,Nl,Al,Dl);var Il=class extends Ll{render(){let t=c.t({message:"Cross",id:"icon.title.close",comment:"Title for close icon"});return Tl`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-close-16-part">${Ol(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m12.5 3.5-9 9m0-9 9 9"></path></svg>`}};customElements.get("w-icon-close-16")||customElements.define("w-icon-close-16",Il);var pa="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",jl={wrapper:pa+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Hl={wrapper:pa+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},Ue=class extends Fl{constructor(){super(...arguments);this.clear=!1;this.search=!1}get _classBase(){return this.slot==="suffix"?jl:Hl}get _classes(){return w([this._classBase.wrapper,this.label?this._classBase.wrapperWithLabel:this._classBase.wrapperWithIcon])}get _searchButton(){return Gt`
|
|
2450
|
+
<button aria-label="${ua(this.ariaLabel)}" class="${this._classes}" type="submit">
|
|
2451
2451
|
<w-icon-search-16></w-icon-search-16>
|
|
2452
2452
|
</button>
|
|
2453
|
-
`}get _clearButton(){return
|
|
2454
|
-
<button aria-label="${
|
|
2453
|
+
`}get _clearButton(){return Gt`
|
|
2454
|
+
<button aria-label="${ua(this.ariaLabel)}" class="${this._classes}" type="reset">
|
|
2455
2455
|
<w-icon-close-16></w-icon-close-16>
|
|
2456
2456
|
</button>
|
|
2457
|
-
`}get _text(){return
|
|
2457
|
+
`}get _text(){return Gt`
|
|
2458
2458
|
<div class="${this._classes}">
|
|
2459
2459
|
<span class="${this._classBase.label}">${this.label}</span>
|
|
2460
2460
|
</div>
|
|
2461
|
-
`}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return Wt`${this._markup}`}};Ue.styles=[M,Po],s([er({attribute:"aria-label"})],Ue.prototype,"ariaLabel",2),s([er({type:Boolean})],Ue.prototype,"clear",2),s([er({type:Boolean})],Ue.prototype,"search",2),s([er()],Ue.prototype,"label",2);customElements.get("w-affix")||customElements.define("w-affix",Ue);import{css as Tc,html as St,LitElement as Nc}from"lit";import{property as Kr}from"lit/decorators.js";import{LitElement as Nl}from"lit";import{unsafeStatic as Ml,html as Dl}from"lit/static-html.js";var Al=JSON.parse('{"icon.title.info":["Informasjonssirkel"]}'),zl=JSON.parse('{"icon.title.info":["Information circle"]}'),Bl=JSON.parse('{"icon.title.info":["Ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"]}'),Pl=JSON.parse('{"icon.title.info":["Informationscirkel"]}'),Rl=JSON.parse('{"icon.title.info":["Informationscirkel"]}'),ri=["en","nb","fi","da","sv"],oi="en",Vl=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},ii=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":oi},Qr=t=>ri.find(e=>t===e||t.toLowerCase().includes(e))||ii();function Il(){var t;if(typeof window=="undefined"){let e=Vl();return Qr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=ii();return ri.includes(e)?Qr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Qr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),oi}}var Fl=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,jl=(t,e,r,o,i)=>{let a=Il(),n=Fl(a,t,e,r,o,i);c.load(a,n),c.activate(a)};jl(zl,Al,Bl,Pl,Rl);var Hl=class extends Nl{render(){let t=c.t({message:"Information circle",id:"icon.title.info",comment:"Title for info icon"});return Dl`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-info-16-part">${Ml(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" d="M8 6.5v5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 4v.5"></path><path stroke="currentColor" stroke-miterlimit="10" d="M8 .5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15Z"></path></svg>`}};customElements.get("w-icon-info-16")||customElements.define("w-icon-info-16",Hl);import{LitElement as ql}from"lit";import{unsafeStatic as Ul,html as Jl}from"lit/static-html.js";var Ql=JSON.parse('{"icon.title.warning":["Varseltrekant med utropstegn"]}'),Yl=JSON.parse('{"icon.title.warning":["Warning triangle with exclamation point"]}'),Xl=JSON.parse('{"icon.title.warning":["Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),Zl=JSON.parse('{"icon.title.warning":["Advarselstrekant med et udr\xE5bstegn"]}'),Kl=JSON.parse('{"icon.title.warning":["Varningstriangel med utropstecken"]}'),ai=["en","nb","fi","da","sv"],ni="en",Gl=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},si=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ni},Yr=t=>ai.find(e=>t===e||t.toLowerCase().includes(e))||si();function Wl(){var t;if(typeof window=="undefined"){let e=Gl();return Yr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=si();return ai.includes(e)?Yr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Yr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ni}}var ec=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,tc=(t,e,r,o,i)=>{let a=Wl(),n=ec(a,t,e,r,o,i);c.load(a,n),c.activate(a)};tc(Yl,Ql,Xl,Zl,Kl);var rc=class extends ql{render(){let t=c.t({message:"Warning triangle with exclamation point",id:"icon.title.warning",comment:"Title for warning icon"});return Jl`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-warning-16-part">${Ul(`<title>${t}</title>`)}<path stroke="currentColor" d="m.712 14.07 6.25-12.994a1 1 0 0 1 1.792-.022l6.635 12.995a1 1 0 0 1-.89 1.455H1.613a1 1 0 0 1-.902-1.434Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 6v4.992M8 13v.333"></path></svg>`}};customElements.get("w-icon-warning-16")||customElements.define("w-icon-warning-16",rc);import{LitElement as oc}from"lit";import{unsafeStatic as ic,html as ac}from"lit/static-html.js";var nc=JSON.parse('{"icon.title.error":["\xC5ttekant med utropstegn"]}'),sc=JSON.parse('{"icon.title.error":["Octagon with exclamation point"]}'),lc=JSON.parse('{"icon.title.error":["Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),cc=JSON.parse('{"icon.title.error":["Ottekant med et udr\xE5bstegn"]}'),dc=JSON.parse('{"icon.title.error":["Oktagon med utropstecken"]}'),li=["en","nb","fi","da","sv"],ci="en",uc=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},di=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ci},Xr=t=>li.find(e=>t===e||t.toLowerCase().includes(e))||di();function pc(){var t;if(typeof window=="undefined"){let e=uc();return Xr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=di();return li.includes(e)?Xr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Xr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ci}}var mc=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,hc=(t,e,r,o,i)=>{let a=pc(),n=mc(a,t,e,r,o,i);c.load(a,n),c.activate(a)};hc(sc,nc,lc,cc,dc);var bc=class extends oc{render(){let t=c.t({message:"Octagon with exclamation point",id:"icon.title.error",comment:"Title for error icon"});return ac`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-error-16-part">${ic(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.107 4.748 15.5h6.503l4.248-4.393V4.893L11.252.5H4.748L.5 4.893z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11.398a.25.25 0 1 1 0-.5m0 .5a.25.25 0 1 0 0-.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M8 8.5V3"></path></svg>`}};customElements.get("w-icon-error-16")||customElements.define("w-icon-error-16",bc);import{LitElement as gc}from"lit";import{unsafeStatic as fc,html as vc}from"lit/static-html.js";var wc=JSON.parse('{"icon.title.success":["Sirkel med sjekkmerke"]}'),xc=JSON.parse('{"icon.title.success":["Circle with checkmark"]}'),yc=JSON.parse('{"icon.title.success":["Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"]}'),kc=JSON.parse('{"icon.title.success":["Cirkel med et flueben"]}'),$c=JSON.parse('{"icon.title.success":["Cirkel med bock"]}'),ui=["en","nb","fi","da","sv"],pi="en",Ec=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},mi=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":pi},Zr=t=>ui.find(e=>t===e||t.toLowerCase().includes(e))||mi();function Cc(){var t;if(typeof window=="undefined"){let e=Ec();return Zr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=mi();return ui.includes(e)?Zr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Zr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),pi}}var Sc=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,_c=(t,e,r,o,i)=>{let a=Cc(),n=Sc(a,t,e,r,o,i);c.load(a,n),c.activate(a)};_c(xc,wc,yc,kc,$c);var Lc=class extends gc{render(){let t=c.t({message:"Circle with checkmark",id:"icon.title.success",comment:"Title for success icon"});return vc`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-success-16-part">${fc(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m4 8.815 1.633 2.318a.7.7 0 0 0 1.138.034l5.228-6.615"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 7.999a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0"></path></svg>`}};customElements.get("w-icon-success-16")||customElements.define("w-icon-success-16",Lc);import{css as Oc}from"lit";var hi=Oc`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.will-change-height{will-change:height}.border{border-width:1px}.border-l-4{border-left-width:4px}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.static{position:static}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon-info{color:var(--w-s-color-icon-info)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.s-border-info-subtle{border-color:var(--w-s-color-border-info-subtle)}.s-border-l-info{border-left-color:var(--w-s-color-border-info)}.s-border-l-negative{border-left-color:var(--w-s-color-border-negative)}.s-border-l-positive{border-left-color:var(--w-s-color-border-positive)}.s-border-l-warning{border-left-color:var(--w-s-color-border-warning)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.min-w-16{min-width:1.6rem}.w-16{width:1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.mr-8{margin-right:.8rem}.p-16{padding:1.6rem}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}`;var _t={wrapper:"flex p-16 border border-l-4 rounded-4 s-text",willChangeHeight:"will-change-height",textWrapper:"last-child:mb-0 text-s",title:"text-s",icon:"w-16 mr-8 min-w-16",negative:"s-border-negative-subtle s-border-l-negative s-bg-negative-subtle",negativeIcon:"s-icon-negative",positive:"s-border-positive-subtle s-border-l-positive s-bg-positive-subtle",positiveIcon:"s-icon-positive",warning:"s-border-warning-subtle s-border-l-warning s-bg-warning-subtle",warningIcon:"s-icon-warning",info:"s-border-info-subtle s-border-l-info s-bg-info-subtle",infoIcon:"s-icon-info"},Lt={negative:"negative",positive:"positive",warning:"warning",info:"info"},rt=class extends Nc{constructor(){super();this.variant="info";this.show=!0;this.role="alert";this.show=!1,this.role="alert"}connectedCallback(){if(super.connectedCallback(),!this.variant||!Lt[this.variant])throw new Error(`Invalid 'variant' attribute. Set its value to one of the following:
|
|
2462
|
-
negative, positive, warning, info.`)}get _wrapperClasses(){return
|
|
2461
|
+
`}get _markup(){if(this.label)return this._text;if(this.search)return this._searchButton;if(this.clear)return this._clearButton}render(){return Gt`${this._markup}`}};Ue.styles=[E,Xo],s([Wt({attribute:"aria-label"})],Ue.prototype,"ariaLabel",2),s([Wt({type:Boolean})],Ue.prototype,"clear",2),s([Wt({type:Boolean})],Ue.prototype,"search",2),s([Wt()],Ue.prototype,"label",2);customElements.get("w-affix")||customElements.define("w-affix",Ue);import{css as Hc,html as _t,LitElement as qc}from"lit";import{property as Wr}from"lit/decorators.js";import{LitElement as ql}from"lit";import{unsafeStatic as Jl,html as Ul}from"lit/static-html.js";var Yl=JSON.parse('{"icon.title.info":["Informasjonssirkel"]}'),Xl=JSON.parse('{"icon.title.info":["Information circle"]}'),Ql=JSON.parse('{"icon.title.info":["Ympyr\xE4, jonka sis\xE4ll\xE4 on i-kirjain"]}'),Zl=JSON.parse('{"icon.title.info":["Informationscirkel"]}'),Kl=JSON.parse('{"icon.title.info":["Informationscirkel"]}'),ma=["en","nb","fi","da","sv"],ga="en",Gl=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},ha=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ga},Qr=t=>ma.find(e=>t===e||t.toLowerCase().includes(e))||ha();function Wl(){var t;if(typeof window=="undefined"){let e=Gl();return Qr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=ha();return ma.includes(e)?Qr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Qr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ga}}var ec=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,tc=(t,e,r,o,a)=>{let i=Wl(),n=ec(i,t,e,r,o,a);c.load(i,n),c.activate(i)};tc(Xl,Yl,Ql,Zl,Kl);var rc=class extends ql{render(){let t=c.t({message:"Information circle",id:"icon.title.info",comment:"Title for info icon"});return Ul`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-info-16-part">${Jl(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" d="M8 6.5v5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 4v.5"></path><path stroke="currentColor" stroke-miterlimit="10" d="M8 .5a7.5 7.5 0 1 1 0 15 7.5 7.5 0 0 1 0-15Z"></path></svg>`}};customElements.get("w-icon-info-16")||customElements.define("w-icon-info-16",rc);import{LitElement as oc}from"lit";import{unsafeStatic as ac,html as ic}from"lit/static-html.js";var nc=JSON.parse('{"icon.title.warning":["Varseltrekant med utropstegn"]}'),sc=JSON.parse('{"icon.title.warning":["Warning triangle with exclamation point"]}'),lc=JSON.parse('{"icon.title.warning":["Varoituskolmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),cc=JSON.parse('{"icon.title.warning":["Advarselstrekant med et udr\xE5bstegn"]}'),dc=JSON.parse('{"icon.title.warning":["Varningstriangel med utropstecken"]}'),fa=["en","nb","fi","da","sv"],ba="en",uc=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},va=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ba},Zr=t=>fa.find(e=>t===e||t.toLowerCase().includes(e))||va();function pc(){var t;if(typeof window=="undefined"){let e=uc();return Zr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=va();return fa.includes(e)?Zr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Zr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ba}}var mc=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,gc=(t,e,r,o,a)=>{let i=pc(),n=mc(i,t,e,r,o,a);c.load(i,n),c.activate(i)};gc(sc,nc,lc,cc,dc);var hc=class extends oc{render(){let t=c.t({message:"Warning triangle with exclamation point",id:"icon.title.warning",comment:"Title for warning icon"});return ic`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-warning-16-part">${ac(`<title>${t}</title>`)}<path stroke="currentColor" d="m.712 14.07 6.25-12.994a1 1 0 0 1 1.792-.022l6.635 12.995a1 1 0 0 1-.89 1.455H1.613a1 1 0 0 1-.902-1.434Z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 6v4.992M8 13v.333"></path></svg>`}};customElements.get("w-icon-warning-16")||customElements.define("w-icon-warning-16",hc);import{LitElement as fc}from"lit";import{unsafeStatic as bc,html as vc}from"lit/static-html.js";var wc=JSON.parse('{"icon.title.error":["\xC5ttekant med utropstegn"]}'),xc=JSON.parse('{"icon.title.error":["Octagon with exclamation point"]}'),yc=JSON.parse('{"icon.title.error":["Kahdeksankulmio, jonka sis\xE4ll\xE4 on huutomerkki"]}'),kc=JSON.parse('{"icon.title.error":["Ottekant med et udr\xE5bstegn"]}'),Ec=JSON.parse('{"icon.title.error":["Oktagon med utropstecken"]}'),wa=["en","nb","fi","da","sv"],xa="en",$c=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},ya=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":xa},Kr=t=>wa.find(e=>t===e||t.toLowerCase().includes(e))||ya();function Cc(){var t;if(typeof window=="undefined"){let e=$c();return Kr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=ya();return wa.includes(e)?Kr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Kr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),xa}}var _c=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Sc=(t,e,r,o,a)=>{let i=Cc(),n=_c(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Sc(xc,wc,yc,kc,Ec);var Lc=class extends fc{render(){let t=c.t({message:"Octagon with exclamation point",id:"icon.title.error",comment:"Title for error icon"});return vc`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-error-16-part">${bc(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 11.107 4.748 15.5h6.503l4.248-4.393V4.893L11.252.5H4.748L.5 4.893z"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M8 11.398a.25.25 0 1 1 0-.5m0 .5a.25.25 0 1 0 0-.5"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M8 8.5V3"></path></svg>`}};customElements.get("w-icon-error-16")||customElements.define("w-icon-error-16",Lc);import{LitElement as Oc}from"lit";import{unsafeStatic as Tc,html as zc}from"lit/static-html.js";var Mc=JSON.parse('{"icon.title.success":["Sirkel med sjekkmerke"]}'),Nc=JSON.parse('{"icon.title.success":["Circle with checkmark"]}'),Ac=JSON.parse('{"icon.title.success":["Ympyr\xE4, jonka sis\xE4ll\xE4 on valintamerkki"]}'),Dc=JSON.parse('{"icon.title.success":["Cirkel med et flueben"]}'),Bc=JSON.parse('{"icon.title.success":["Cirkel med bock"]}'),ka=["en","nb","fi","da","sv"],Ea="en",Pc=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},$a=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Ea},Gr=t=>ka.find(e=>t===e||t.toLowerCase().includes(e))||$a();function Rc(){var t;if(typeof window=="undefined"){let e=Pc();return Gr(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=$a();return ka.includes(e)?Gr(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Gr(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Ea}}var Vc=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Ic=(t,e,r,o,a)=>{let i=Rc(),n=Vc(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Ic(Nc,Mc,Ac,Dc,Bc);var Fc=class extends Oc{render(){let t=c.t({message:"Circle with checkmark",id:"icon.title.success",comment:"Title for success icon"});return zc`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-success-16-part">${Tc(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="m4 8.815 1.633 2.318a.7.7 0 0 0 1.138.034l5.228-6.615"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" d="M.5 7.999a7.5 7.5 0 1 0 15 0 7.5 7.5 0 0 0-15 0"></path></svg>`}};customElements.get("w-icon-success-16")||customElements.define("w-icon-success-16",Fc);import{css as jc}from"lit";var Ca=jc`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.will-change-height{will-change:height}.border{border-width:1px}.border-l-4{border-left-width:4px}.rounded-4{border-radius:4px}.block{display:block}.flex{display:flex}.static{position:static}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon-info{color:var(--w-s-color-icon-info)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.s-border-info-subtle{border-color:var(--w-s-color-border-info-subtle)}.s-border-l-info{border-left-color:var(--w-s-color-border-info)}.s-border-l-negative{border-left-color:var(--w-s-color-border-negative)}.s-border-l-positive{border-left-color:var(--w-s-color-border-positive)}.s-border-l-warning{border-left-color:var(--w-s-color-border-warning)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.min-w-16{min-width:1.6rem}.w-16{width:1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.mr-8{margin-right:.8rem}.p-16{padding:1.6rem}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}`;var St={wrapper:"flex p-16 border border-l-4 rounded-4 s-text",willChangeHeight:"will-change-height",textWrapper:"last-child:mb-0 text-s",title:"text-s",icon:"w-16 mr-8 min-w-16",negative:"s-border-negative-subtle s-border-l-negative s-bg-negative-subtle",negativeIcon:"s-icon-negative",positive:"s-border-positive-subtle s-border-l-positive s-bg-positive-subtle",positiveIcon:"s-icon-positive",warning:"s-border-warning-subtle s-border-l-warning s-bg-warning-subtle",warningIcon:"s-icon-warning",info:"s-border-info-subtle s-border-l-info s-bg-info-subtle",infoIcon:"s-icon-info"},Lt={negative:"negative",positive:"positive",warning:"warning",info:"info"},tt=class extends qc{constructor(){super();this.variant="info";this.show=!0;this.role="alert";this.show=!1,this.role="alert"}connectedCallback(){if(super.connectedCallback(),!this.variant||!Lt[this.variant])throw new Error(`Invalid 'variant' attribute. Set its value to one of the following:
|
|
2462
|
+
negative, positive, warning, info.`)}get _wrapperClasses(){return w([St.wrapper,St[this.variant]])}get _iconClasses(){let r=St[`${this.variant}Icon`];return w([St.icon,r])}get _icon(){return this.variant===Lt.info?_t` <w-icon-info-16></w-icon-info-16>`:this.variant===Lt.warning?_t` <w-icon-warning-16></w-icon-warning-16>`:this.variant===Lt.negative?_t` <w-icon-error-16></w-icon-error-16>`:this.variant===Lt.positive?_t` <w-icon-success-16></w-icon-success-16>`:""}render(){return _t`
|
|
2463
2463
|
<w-expand-transition ?show=${this.show}>
|
|
2464
2464
|
<div role=${this.role} class=${this._wrapperClasses}>
|
|
2465
2465
|
<div class=${this._iconClasses}>${this._icon}</div>
|
|
2466
|
-
<div class=${
|
|
2466
|
+
<div class=${St.textWrapper}>
|
|
2467
2467
|
<slot></slot>
|
|
2468
2468
|
</div>
|
|
2469
2469
|
</div>
|
|
2470
2470
|
</w-expand-transition>
|
|
2471
|
-
`}};
|
|
2471
|
+
`}};tt.styles=[E,Ca,Hc`
|
|
2472
2472
|
:host {
|
|
2473
2473
|
display: block;
|
|
2474
2474
|
}
|
|
@@ -2480,71 +2480,1175 @@ negative, positive, warning, info.`)}get _wrapperClasses(){return S([_t.wrapper,
|
|
|
2480
2480
|
::slotted(:last-child) {
|
|
2481
2481
|
margin-bottom: 0px !important;
|
|
2482
2482
|
}
|
|
2483
|
-
`],s([Kr({reflect:!0})],rt.prototype,"variant",2),s([Kr({type:Boolean,reflect:!0})],rt.prototype,"show",2),s([Kr({reflect:!0})],rt.prototype,"role",2);customElements.get("w-alert")||customElements.define("w-alert",rt);import{css as fd,html as bt,nothing as ca}from"lit";var fi=["top","right","bottom","left"];var Ve=Math.min,de=Math.max,Tt=Math.round;var $e=t=>({x:t,y:t}),Mc={left:"right",right:"left",bottom:"top",top:"bottom"},Dc={start:"end",end:"start"};function rr(t,e,r){return de(t,Ve(e,r))}function Je(t,e){return typeof t=="function"?t(e):t}function Ie(t){return t.split("-")[0]}function ot(t){return t.split("-")[1]}function Gr(t){return t==="x"?"y":"x"}function or(t){return t==="y"?"height":"width"}var Ac=new Set(["top","bottom"]);function Te(t){return Ac.has(Ie(t))?"y":"x"}function ir(t){return Gr(Te(t))}function vi(t,e,r){r===void 0&&(r=!1);let o=ot(t),i=ir(t),a=or(i),n=i==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(n=Ot(n)),[n,Ot(n)]}function wi(t){let e=Ot(t);return[tr(t),e,tr(e)]}function tr(t){return t.replace(/start|end/g,e=>Dc[e])}var bi=["left","right"],gi=["right","left"],zc=["top","bottom"],Bc=["bottom","top"];function Pc(t,e,r){switch(t){case"top":case"bottom":return r?e?gi:bi:e?bi:gi;case"left":case"right":return e?zc:Bc;default:return[]}}function xi(t,e,r,o){let i=ot(t),a=Pc(Ie(t),r==="start",o);return i&&(a=a.map(n=>n+"-"+i),e&&(a=a.concat(a.map(tr)))),a}function Ot(t){return t.replace(/left|right|bottom|top/g,e=>Mc[e])}function Rc(t){return{top:0,right:0,bottom:0,left:0,...t}}function Wr(t){return typeof t!="number"?Rc(t):{top:t,right:t,bottom:t,left:t}}function it(t){let{x:e,y:r,width:o,height:i}=t;return{width:o,height:i,top:r,left:e,right:e+o,bottom:r+i,x:e,y:r}}function yi(t,e,r){let{reference:o,floating:i}=t,a=Te(e),n=ir(e),l=or(n),d=Ie(e),u=a==="y",p=o.x+o.width/2-i.width/2,m=o.y+o.height/2-i.height/2,k=o[l]/2-i[l]/2,h;switch(d){case"top":h={x:p,y:o.y-i.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:m};break;case"left":h={x:o.x-i.width,y:m};break;default:h={x:o.x,y:o.y}}switch(ot(e)){case"start":h[n]-=k*(r&&u?-1:1);break;case"end":h[n]+=k*(r&&u?-1:1);break}return h}var Ei=async(t,e,r)=>{let{placement:o="bottom",strategy:i="absolute",middleware:a=[],platform:n}=r,l=a.filter(Boolean),d=await(n.isRTL==null?void 0:n.isRTL(e)),u=await n.getElementRects({reference:t,floating:e,strategy:i}),{x:p,y:m}=yi(u,o,d),k=o,h={},y=0;for(let C=0;C<l.length;C++){let{name:$,fn:T}=l[C],{x:N,y:A,data:ee,reset:R}=await T({x:p,y:m,initialPlacement:o,placement:k,strategy:i,middlewareData:h,rects:u,platform:n,elements:{reference:t,floating:e}});p=N!=null?N:p,m=A!=null?A:m,h={...h,[$]:{...h[$],...ee}},R&&y<=50&&(y++,typeof R=="object"&&(R.placement&&(k=R.placement),R.rects&&(u=R.rects===!0?await n.getElementRects({reference:t,floating:e,strategy:i}):R.rects),{x:p,y:m}=yi(u,k,d)),C=-1)}return{x:p,y:m,placement:k,strategy:i,middlewareData:h}};async function pt(t,e){var r;e===void 0&&(e={});let{x:o,y:i,platform:a,rects:n,elements:l,strategy:d}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:k=!1,padding:h=0}=Je(e,t),y=Wr(h),$=l[k?m==="floating"?"reference":"floating":m],T=it(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement($)))==null||r?$:$.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:u,rootBoundary:p,strategy:d})),N=m==="floating"?{x:o,y:i,width:n.floating.width,height:n.floating.height}:n.reference,A=await(a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating)),ee=await(a.isElement==null?void 0:a.isElement(A))?await(a.getScale==null?void 0:a.getScale(A))||{x:1,y:1}:{x:1,y:1},R=it(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:N,offsetParent:A,strategy:d}):N);return{top:(T.top-R.top+y.top)/ee.y,bottom:(R.bottom-T.bottom+y.bottom)/ee.y,left:(T.left-R.left+y.left)/ee.x,right:(R.right-T.right+y.right)/ee.x}}var Ci=t=>({name:"arrow",options:t,async fn(e){let{x:r,y:o,placement:i,rects:a,platform:n,elements:l,middlewareData:d}=e,{element:u,padding:p=0}=Je(t,e)||{};if(u==null)return{};let m=Wr(p),k={x:r,y:o},h=ir(i),y=or(h),C=await n.getDimensions(u),$=h==="y",T=$?"top":"left",N=$?"bottom":"right",A=$?"clientHeight":"clientWidth",ee=a.reference[y]+a.reference[h]-k[h]-a.floating[y],R=k[h]-a.reference[h],E=await(n.getOffsetParent==null?void 0:n.getOffsetParent(u)),_=E?E[A]:0;(!_||!await(n.isElement==null?void 0:n.isElement(E)))&&(_=l.floating[A]||a.floating[y]);let z=ee/2-R/2,P=_/2-C[y]/2-1,F=Ve(m[T],P),le=Ve(m[N],P),re=F,ce=_-C[y]-le,Z=_/2-C[y]/2+z,U=rr(re,Z,ce),he=!d.arrow&&ot(i)!=null&&Z!==U&&a.reference[y]/2-(Z<re?F:le)-C[y]/2<0,K=he?Z<re?Z-re:Z-ce:0;return{[h]:k[h]+K,data:{[h]:U,centerOffset:Z-U-K,...he&&{alignmentOffset:K}},reset:he}}});var Si=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,o;let{placement:i,middlewareData:a,rects:n,initialPlacement:l,platform:d,elements:u}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:k,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:C=!0,...$}=Je(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};let T=Ie(i),N=Te(l),A=Ie(l)===l,ee=await(d.isRTL==null?void 0:d.isRTL(u.floating)),R=k||(A||!C?[Ot(l)]:wi(l)),E=y!=="none";!k&&E&&R.push(...xi(l,C,y,ee));let _=[l,...R],z=await pt(e,$),P=[],F=((o=a.flip)==null?void 0:o.overflows)||[];if(p&&P.push(z[T]),m){let Z=vi(i,n,ee);P.push(z[Z[0]],z[Z[1]])}if(F=[...F,{placement:i,overflows:P}],!P.every(Z=>Z<=0)){var le,re;let Z=(((le=a.flip)==null?void 0:le.index)||0)+1,U=_[Z];if(U&&(!(m==="alignment"?N!==Te(U):!1)||F.every(ge=>Te(ge.placement)===N?ge.overflows[0]>0:!0)))return{data:{index:Z,overflows:F},reset:{placement:U}};let he=(re=F.filter(K=>K.overflows[0]<=0).sort((K,ge)=>K.overflows[1]-ge.overflows[1])[0])==null?void 0:re.placement;if(!he)switch(h){case"bestFit":{var ce;let K=(ce=F.filter(ge=>{if(E){let fe=Te(ge.placement);return fe===N||fe==="y"}return!0}).map(ge=>[ge.placement,ge.overflows.filter(fe=>fe>0).reduce((fe,Ls)=>fe+Ls,0)]).sort((ge,fe)=>ge[1]-fe[1])[0])==null?void 0:ce[0];K&&(he=K);break}case"initialPlacement":he=l;break}if(i!==he)return{reset:{placement:he}}}return{}}}};function ki(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function $i(t){return fi.some(e=>t[e]>=0)}var _i=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:o="referenceHidden",...i}=Je(t,e);switch(o){case"referenceHidden":{let a=await pt(e,{...i,elementContext:"reference"}),n=ki(a,r.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:$i(n)}}}case"escaped":{let a=await pt(e,{...i,altBoundary:!0}),n=ki(a,r.floating);return{data:{escapedOffsets:n,escaped:$i(n)}}}default:return{}}}}};var Vc=new Set(["left","top"]);async function Ic(t,e){let{placement:r,platform:o,elements:i}=t,a=await(o.isRTL==null?void 0:o.isRTL(i.floating)),n=Ie(r),l=ot(r),d=Te(r)==="y",u=Vc.has(n)?-1:1,p=a&&d?-1:1,m=Je(e,t),{mainAxis:k,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof y=="number"&&(h=l==="end"?y*-1:y),d?{x:h*p,y:k*u}:{x:k*u,y:h*p}}var Li=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,o;let{x:i,y:a,placement:n,middlewareData:l}=e,d=await Ic(e,t);return n===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:i+d.x,y:a+d.y,data:{...d,placement:n}}}}},Oi=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:i}=e,{mainAxis:a=!0,crossAxis:n=!1,limiter:l={fn:$=>{let{x:T,y:N}=$;return{x:T,y:N}}},...d}=Je(t,e),u={x:r,y:o},p=await pt(e,d),m=Te(Ie(i)),k=Gr(m),h=u[k],y=u[m];if(a){let $=k==="y"?"top":"left",T=k==="y"?"bottom":"right",N=h+p[$],A=h-p[T];h=rr(N,h,A)}if(n){let $=m==="y"?"top":"left",T=m==="y"?"bottom":"right",N=y+p[$],A=y-p[T];y=rr(N,y,A)}let C=l.fn({...e,[k]:h,[m]:y});return{...C,data:{x:C.x-r,y:C.y-o,enabled:{[k]:a,[m]:n}}}}}};var Ti=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,o;let{placement:i,rects:a,platform:n,elements:l}=e,{apply:d=()=>{},...u}=Je(t,e),p=await pt(e,u),m=Ie(i),k=ot(i),h=Te(i)==="y",{width:y,height:C}=a.floating,$,T;m==="top"||m==="bottom"?($=m,T=k===(await(n.isRTL==null?void 0:n.isRTL(l.floating))?"start":"end")?"left":"right"):(T=m,$=k==="end"?"top":"bottom");let N=C-p.top-p.bottom,A=y-p.left-p.right,ee=Ve(C-p[$],N),R=Ve(y-p[T],A),E=!e.middlewareData.shift,_=ee,z=R;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(z=A),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(_=N),E&&!k){let F=de(p.left,0),le=de(p.right,0),re=de(p.top,0),ce=de(p.bottom,0);h?z=y-2*(F!==0||le!==0?F+le:de(p.left,p.right)):_=C-2*(re!==0||ce!==0?re+ce:de(p.top,p.bottom))}await d({...e,availableWidth:z,availableHeight:_});let P=await n.getDimensions(l.floating);return y!==P.width||C!==P.height?{reset:{rects:!0}}:{}}}};function nr(){return typeof window!="undefined"}function at(t){return Mi(t)?(t.nodeName||"").toLowerCase():"#document"}function ue(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Ne(t){var e;return(e=(Mi(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Mi(t){return nr()?t instanceof Node||t instanceof ue(t).Node:!1}function ve(t){return nr()?t instanceof Element||t instanceof ue(t).Element:!1}function Ee(t){return nr()?t instanceof HTMLElement||t instanceof ue(t).HTMLElement:!1}function Ni(t){return!nr()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof ue(t).ShadowRoot}var Fc=new Set(["inline","contents"]);function mt(t){let{overflow:e,overflowX:r,overflowY:o,display:i}=we(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&!Fc.has(i)}var jc=new Set(["table","td","th"]);function Di(t){return jc.has(at(t))}var Hc=[":popover-open",":modal"];function Nt(t){return Hc.some(e=>{try{return t.matches(e)}catch(r){return!1}})}var qc=["transform","translate","scale","rotate","perspective"],Uc=["transform","translate","scale","rotate","perspective","filter"],Jc=["paint","layout","strict","content"];function sr(t){let e=lr(),r=ve(t)?we(t):t;return qc.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||Uc.some(o=>(r.willChange||"").includes(o))||Jc.some(o=>(r.contain||"").includes(o))}function Ai(t){let e=Fe(t);for(;Ee(e)&&!nt(e);){if(sr(e))return e;if(Nt(e))return null;e=Fe(e)}return null}function lr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var Qc=new Set(["html","body","#document"]);function nt(t){return Qc.has(at(t))}function we(t){return ue(t).getComputedStyle(t)}function Mt(t){return ve(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fe(t){if(at(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Ni(t)&&t.host||Ne(t);return Ni(e)?e.host:e}function zi(t){let e=Fe(t);return nt(e)?t.ownerDocument?t.ownerDocument.body:t.body:Ee(e)&&mt(e)?e:zi(e)}function ar(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let i=zi(t),a=i===((o=t.ownerDocument)==null?void 0:o.body),n=ue(i);if(a){let l=cr(n);return e.concat(n,n.visualViewport||[],mt(i)?i:[],l&&r?ar(l):[])}return e.concat(i,ar(i,[],r))}function cr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Ri(t){let e=we(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=Ee(t),a=i?t.offsetWidth:r,n=i?t.offsetHeight:o,l=Tt(r)!==a||Tt(o)!==n;return l&&(r=a,o=n),{width:r,height:o,$:l}}function Vi(t){return ve(t)?t:t.contextElement}function ht(t){let e=Vi(t);if(!Ee(e))return $e(1);let r=e.getBoundingClientRect(),{width:o,height:i,$:a}=Ri(e),n=(a?Tt(r.width):r.width)/o,l=(a?Tt(r.height):r.height)/i;return(!n||!Number.isFinite(n))&&(n=1),(!l||!Number.isFinite(l))&&(l=1),{x:n,y:l}}var Yc=$e(0);function Ii(t){let e=ue(t);return!lr()||!e.visualViewport?Yc:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Xc(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==ue(t)?!1:e}function Dt(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let i=t.getBoundingClientRect(),a=Vi(t),n=$e(1);e&&(o?ve(o)&&(n=ht(o)):n=ht(t));let l=Xc(a,r,o)?Ii(a):$e(0),d=(i.left+l.x)/n.x,u=(i.top+l.y)/n.y,p=i.width/n.x,m=i.height/n.y;if(a){let k=ue(a),h=o&&ve(o)?ue(o):o,y=k,C=cr(y);for(;C&&o&&h!==y;){let $=ht(C),T=C.getBoundingClientRect(),N=we(C),A=T.left+(C.clientLeft+parseFloat(N.paddingLeft))*$.x,ee=T.top+(C.clientTop+parseFloat(N.paddingTop))*$.y;d*=$.x,u*=$.y,p*=$.x,m*=$.y,d+=A,u+=ee,y=ue(C),C=cr(y)}}return it({width:p,height:m,x:d,y:u})}function to(t,e){let r=Mt(t).scrollLeft;return e?e.left+r:Dt(Ne(t)).left+r}function Fi(t,e,r){r===void 0&&(r=!1);let o=t.getBoundingClientRect(),i=o.left+e.scrollLeft-(r?0:to(t,o)),a=o.top+e.scrollTop;return{x:i,y:a}}function Zc(t){let{elements:e,rect:r,offsetParent:o,strategy:i}=t,a=i==="fixed",n=Ne(o),l=e?Nt(e.floating):!1;if(o===n||l&&a)return r;let d={scrollLeft:0,scrollTop:0},u=$e(1),p=$e(0),m=Ee(o);if((m||!m&&!a)&&((at(o)!=="body"||mt(n))&&(d=Mt(o)),Ee(o))){let h=Dt(o);u=ht(o),p.x=h.x+o.clientLeft,p.y=h.y+o.clientTop}let k=n&&!m&&!a?Fi(n,d,!0):$e(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+p.x+k.x,y:r.y*u.y-d.scrollTop*u.y+p.y+k.y}}function Kc(t){return Array.from(t.getClientRects())}function Gc(t){let e=Ne(t),r=Mt(t),o=t.ownerDocument.body,i=de(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),a=de(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),n=-r.scrollLeft+to(t),l=-r.scrollTop;return we(o).direction==="rtl"&&(n+=de(e.clientWidth,o.clientWidth)-i),{width:i,height:a,x:n,y:l}}function Wc(t,e){let r=ue(t),o=Ne(t),i=r.visualViewport,a=o.clientWidth,n=o.clientHeight,l=0,d=0;if(i){a=i.width,n=i.height;let u=lr();(!u||u&&e==="fixed")&&(l=i.offsetLeft,d=i.offsetTop)}return{width:a,height:n,x:l,y:d}}function ed(t,e){let r=Dt(t,!0,e==="fixed"),o=r.top+t.clientTop,i=r.left+t.clientLeft,a=Ee(t)?ht(t):$e(1),n=t.clientWidth*a.x,l=t.clientHeight*a.y,d=i*a.x,u=o*a.y;return{width:n,height:l,x:d,y:u}}function Bi(t,e,r){let o;if(e==="viewport")o=Wc(t,r);else if(e==="document")o=Gc(Ne(t));else if(ve(e))o=ed(e,r);else{let i=Ii(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return it(o)}function ji(t,e){let r=Fe(t);return r===e||!ve(r)||nt(r)?!1:we(r).position==="fixed"||ji(r,e)}function td(t,e){let r=e.get(t);if(r)return r;let o=ar(t,[],!1).filter(l=>ve(l)&&at(l)!=="body"),i=null,a=we(t).position==="fixed",n=a?Fe(t):t;for(;ve(n)&&!nt(n);){let l=we(n),d=sr(n);!d&&l.position==="fixed"&&(i=null),(a?!d&&!i:!d&&l.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||mt(n)&&!d&&ji(t,n))?o=o.filter(p=>p!==n):i=l,n=Fe(n)}return e.set(t,o),o}function rd(t){let{element:e,boundary:r,rootBoundary:o,strategy:i}=t,n=[...r==="clippingAncestors"?Nt(e)?[]:td(e,this._c):[].concat(r),o],l=n[0],d=n.reduce((u,p)=>{let m=Bi(e,p,i);return u.top=de(m.top,u.top),u.right=Ve(m.right,u.right),u.bottom=Ve(m.bottom,u.bottom),u.left=de(m.left,u.left),u},Bi(e,l,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function od(t){let{width:e,height:r}=Ri(t);return{width:e,height:r}}function id(t,e,r){let o=Ee(e),i=Ne(e),a=r==="fixed",n=Dt(t,!0,a,e),l={scrollLeft:0,scrollTop:0},d=$e(0);if(o||!o&&!a)if((at(e)!=="body"||mt(i))&&(l=Mt(e)),o){let k=Dt(e,!0,a,e);d.x=k.x+e.clientLeft,d.y=k.y+e.clientTop}else i&&(d.x=to(i));let u=i&&!o&&!a?Fi(i,l):$e(0),p=n.left+l.scrollLeft-d.x-u.x,m=n.top+l.scrollTop-d.y-u.y;return{x:p,y:m,width:n.width,height:n.height}}function eo(t){return we(t).position==="static"}function Pi(t,e){if(!Ee(t)||we(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Ne(t)===r&&(r=r.ownerDocument.body),r}function Hi(t,e){let r=ue(t);if(Nt(t))return r;if(!Ee(t)){let i=Fe(t);for(;i&&!nt(i);){if(ve(i)&&!eo(i))return i;i=Fe(i)}return r}let o=Pi(t,e);for(;o&&Di(o)&&eo(o);)o=Pi(o,e);return o&&nt(o)&&eo(o)&&!sr(o)?r:o||Ai(t)||r}var ad=async function(t){let e=this.getOffsetParent||Hi,r=this.getDimensions,o=await r(t.floating);return{reference:id(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function nd(t){return we(t).direction==="rtl"}var sd={convertOffsetParentRelativeRectToViewportRelativeRect:Zc,getDocumentElement:Ne,getClippingRect:rd,getOffsetParent:Hi,getElementRects:ad,getClientRects:Kc,getDimensions:od,getScale:ht,isElement:ve,isRTL:nd};var qi=Li;var Ui=Oi,Ji=Si,Qi=Ti,Yi=_i,Xi=Ci;var Zi=(t,e,r)=>{let o=new Map,i={platform:sd,...r},a={...i.platform,_c:o};return Ei(t,e,{...i,platform:a})};var ur="top-start",pr="top",mr="top-end",hr="right-start",br="right",gr="right-end",fr="bottom-start",At="bottom",vr="bottom-end",wr="left-start",xr="left",yr="left-end",ro=[ur,pr,mr,hr,br,gr,fr,At,vr,wr,xr,yr],st={[ur]:fr,[pr]:At,[mr]:vr,[fr]:ur,[At]:pr,[vr]:mr,[wr]:hr,[xr]:br,[yr]:gr,[hr]:wr,[br]:xr,[gr]:yr},ld={[wr]:-45,[xr]:-45,[yr]:-45,[ur]:45,[pr]:45,[mr]:45,[hr]:135,[br]:135,[gr]:135,[fr]:-135,[At]:-135,[vr]:-135},oo=t=>{let e;return/-/.test(t)?e=t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(""):e=t.charAt(0).toUpperCase()+t.slice(1),e},cd=t=>t.split("-")[0],dd=t=>st[cd(t)],Gi=t=>st[t],ud=t=>ld[Gi(t)],pd=(t,e,r)=>{Object.assign(t==null?void 0:t.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${oo(dd(r))}`]:"-0.5px",transform:`rotate(${e}deg)`})},Ki=8,dr=24;async function io(t){var o,i,a;if(!(t!=null&&t.isShowing)||(t!=null&&t.waitForDOM&&await(t==null?void 0:t.waitForDOM()),!(t!=null&&t.targetEl)||!(t!=null&&t.attentionEl)))return;let e=t==null?void 0:t.targetEl,r=t.attentionEl;return Zi(e,r,{placement:(o=t==null?void 0:t.directionName)!=null?o:At,middleware:[qi({mainAxis:(i=t==null?void 0:t.distance)!=null?i:8,crossAxis:(a=t==null?void 0:t.skidding)!=null?a:0}),(t==null?void 0:t.flip)&&Ji({crossAxis:t==null?void 0:t.crossAxis,fallbackPlacements:t==null?void 0:t.fallbackPlacements}),(t==null?void 0:t.flip)&&Ui({crossAxis:!0}),!(t!=null&&t.noArrow)&&(t==null?void 0:t.arrowEl)&&Xi({element:t==null?void 0:t.arrowEl}),Yi(),Qi({apply(){Object.assign(r.style,{paddingRight:`${Ki}px`,paddingLeft:`${Ki}px`})}})]}).then(({x:n,y:l,middlewareData:d,placement:u})=>{if(t.actualDirection=u,t!=null&&t.isCallout||Object.assign(r.style,{left:`${n}px`,top:`${l}px`}),d!=null&&d.hide&&!(t!=null&&t.isCallout)){let{referenceHidden:p}=d.hide;Object.assign(r.style,{visibility:p?"hidden":""})}if(d!=null&&d.arrow&&(t!=null&&t.arrowEl)){let p=t==null?void 0:t.arrowEl,{x:m,y:k}=d.arrow,h=window.getComputedStyle(r).direction==="rtl",y=Gi(u).split("-")[1],C="",$="",T="",N="";if(y==="start"){let A=typeof m=="number"?`calc(${dr}px - ${p.offsetWidth/2}px)`:"";C=typeof k=="number"?`calc(${dr}px - ${p.offsetWidth/2}px)`:"",$=h?A:"",N=h?"":A}else if(y==="end"){let A=typeof m=="number"?`calc(${dr}px - ${p.offsetWidth/2}px)`:"";$=h?"":A,N=h?A:"",T=typeof k=="number"?`calc(${dr}px - ${p.offsetWidth/2}px)`:""}else N=typeof m=="number"?`${m}px`:"",C=typeof k=="number"?`${k}px`:"";Object.assign(p.style,{top:C,right:$,bottom:T,left:N}),pd(p,ud(u),u)}}),t}var kr={wrapper:"fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none",base:"grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none",content:"w-full"},xe={wrapper:"relative overflow-hidden w-full",base:"flex group p-8 mt-16 rounded-8 border-2 pointer-events-auto transition-all",positive:"s-bg-positive-subtle s-border-positive-subtle s-text",warning:"s-bg-warning-subtle s-border-warning-subtle s-text",negative:"s-bg-negative-subtle s-border-negative-subtle s-text",iconBase:"shrink-0 rounded-full w-[16px] h-[16px] m-[8px]",iconPositive:"s-icon-positive",iconWarning:"s-icon-warning",iconNegative:"s-icon-negative",iconLoading:"animate-bounce",content:"self-center mr-8 py-4 last-child:mb-0",close:"bg-transparent ml-auto p-[8px] s-icon hover:s-icon-hover active:s-icon-active"};var Ye="font-bold focusable justify-center transition-colors ease-in-out",V={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},O={primary:`border-0 rounded-8 ${Ye}`,secondary:`border-2 rounded-8 ${Ye}`,utility:`border rounded-4 ${Ye}`,negative:`border-0 rounded-8 ${Ye}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Ye}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${V.link}`},v={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"},f={medium:"text-m leading-[24]",xsmall:"text-xs"},b={inProgress:`border-transparent animate-inprogress pointer-events-none ${V.loading}`,quiet:`border-0 rounded-8 ${Ye}`,utilityQuiet:`border-0 rounded-4 ${Ye}`,negativeQuiet:`border-0 rounded-8 ${Ye}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${V.disabled}`},vb={secondary:`${v.medium} ${f.medium} ${O.secondary} ${V.secondary}`,secondaryHref:`${v.medium} ${f.medium} ${O.secondary} ${V.secondary}`,secondaryDisabled:`${v.medium} ${f.medium} ${O.secondary} ${b.isDisabled}`,secondarySmall:`${f.xsmall} ${v.xsmall} ${O.secondary} ${V.secondary}`,secondarySmallDisabled:`${f.xsmall} ${v.xsmall} ${O.secondary} ${b.isDisabled}`,secondaryQuiet:`${v.medium} ${f.medium} ${b.quiet} ${V.quiet}`,secondaryQuietDisabled:`${v.medium} ${f.medium} ${b.quiet} ${b.isDisabled}`,secondarySmallQuiet:`${f.xsmall} ${v.xsmall} ${b.quiet} ${V.quiet}`,secondarySmallQuietDisabled:`${f.xsmall} ${v.xsmall} ${b.quiet} ${b.isDisabled}`,secondaryLoading:`${v.medium} ${f.medium} ${O.secondary} ${b.inProgress}`,secondarySmallLoading:`${f.xsmall} ${v.xsmall} ${O.secondary} ${b.inProgress}`,secondarySmallQuietLoading:`${f.xsmall} ${v.xsmall} ${b.quiet} ${b.inProgress}`,secondaryQuietLoading:`${v.medium} ${f.medium} ${b.quiet} ${b.inProgress}`,primary:`${v.large} ${f.medium} ${O.primary} ${V.primary}`,primaryDisabled:`${v.large} ${f.medium} ${b.isDisabled} ${O.primary}`,primarySmall:`${v.small} ${f.xsmall} ${O.primary} ${V.primary}`,primarySmallDisabled:`${v.small} ${f.xsmall} ${b.isDisabled} ${O.primary} `,primaryQuiet:`${v.large} ${f.medium} ${b.quiet} ${V.quiet}`,primaryQuietDisabled:`${v.large} ${f.medium} ${b.quiet} ${b.isDisabled}`,primarySmallQuiet:`${v.small} ${f.xsmall} ${b.quiet} ${V.quiet}`,primarySmallQuietDisabled:`${v.small} ${f.xsmall} ${b.quiet} ${b.isDisabled}`,primaryLoading:`${v.large} ${f.medium} ${b.inProgress} ${O.primary}`,primarySmallLoading:`${v.small} ${f.xsmall} ${b.inProgress} ${O.primary}`,primarySmallQuietLoading:`${v.small} ${f.xsmall} ${b.quiet} ${b.inProgress} ${O.primary}`,primaryQuietLoading:`${v.large} ${f.medium} ${b.quiet} ${b.inProgress}`,utility:`${v.utility} ${f.medium} ${O.utility} ${V.utility}`,utilityDisabled:`${v.utility} ${f.medium} ${O.utility} ${b.isDisabled}`,utilityQuiet:`${v.large} ${f.medium} ${b.utilityQuiet} ${V.utilityQuiet}`,utilityQuietDisabled:`${v.large} ${f.medium} ${b.utilityQuiet} ${b.isDisabled}`,utilitySmall:`${v.smallUtility} ${f.xsmall} ${O.utility} ${V.utility}`,utilitySmallDisabled:`${v.smallUtility} ${f.xsmall} ${O.utility} ${b.isDisabled}`,utilitySmallQuiet:`${v.smallUtility} ${f.xsmall} ${b.utilityQuiet} ${V.utilityQuiet}`,utilitySmallQuietDisabled:`${v.smallUtility} ${f.xsmall} ${b.utilityQuiet} ${b.isDisabled}`,utilityLoading:`${v.large} ${f.medium} ${O.utility} ${b.inProgress}`,utilitySmallLoading:`${v.smallUtility} ${f.xsmall} ${O.utility} ${b.inProgress}`,utilityQuietLoading:`${v.large} ${f.medium} ${b.inProgress} ${b.utilityQuiet}`,utilitySmallQuietLoading:`${v.smallUtility} ${f.xsmall} ${b.inProgress} ${b.utilityQuiet}`,negative:`${v.large} ${f.medium} ${O.negative} ${V.destructive}`,negativeDisabled:`${v.large} ${f.medium} ${O.negative} ${b.isDisabled}`,negativeQuiet:`${v.large} ${f.medium} ${b.negativeQuiet} ${V.negativeQuiet}`,negativeQuietDisabled:`${v.large} ${f.medium} ${b.negativeQuiet}${b.isDisabled}`,negativeSmall:`${v.small} ${f.xsmall} ${O.negative} ${V.destructive}`,negativeSmallDisabled:`${v.small} ${f.xsmall} ${O.negative} ${b.isDisabled}`,negativeSmallQuiet:`${v.small} ${f.xsmall} ${b.negativeQuiet} ${V.negativeQuiet}`,negativeSmallQuietDisabled:`${v.small} ${f.xsmall} ${b.negativeQuiet} ${b.isDisabled}`,negativeLoading:`${v.large} ${f.medium} ${O.negative} ${b.inProgress}`,negativeSmallLoading:`${v.small} ${f.xsmall} ${b.inProgress} ${O.negative}`,negativeQuietLoading:`${v.large} ${f.medium} ${b.negativeQuiet} ${O.negative} ${b.inProgress}`,negativeSmallQuietLoading:`${v.small} ${f.xsmall} ${b.negativeQuiet} ${b.inProgress}`,pill:`${v.pill} ${f.medium} ${O.pill} ${V.pill}`,pillSmall:`${v.pillSmall} ${f.xsmall} ${O.pill} ${V.pill}`,pillLoading:`${v.pill} ${f.medium} ${O.pill} ${b.inProgress}`,pillSmallLoading:`${v.pillSmall} ${f.xsmall} ${O.pill} ${b.inProgress}`,link:`${v.link} ${f.medium} ${O.link}`,linkSmall:`${v.link} ${f.xsmall} ${O.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"};var wb={backdrop:"fixed inset-0 flex sm:place-content-center sm:place-items-center items-end z-30 [--w-modal-max-height:80%] [--w-modal-width:640px] bg-[--w-black/25]",base:"pb-safe-[32] shadow-m 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 bg-[--w-s-color-surface-elevated-100] 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 self-center",transitionTitleColSpan:"col-span-2",title:"py-8 sm:py-0 -mt-4 sm:-mt-8 min-h-40 sm:min-h-48 grid gap-8 sm:gap-16 grid-cols-[auto_1fr_auto] items-start px-16 sm:px-32 border-b sm:border-b-0 shrink-0",titleText:"mb-0 h4 sm:h3",titleButton:`${f.medium} ${O.pill} ${V.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"};var Wi="absolute top-0 bottom-0 flex justify-center items-center focusable rounded-4 focus:[--w-outline-offset:-2px] bg-transparent ",xb={wrapper:Wi+"right-0",wrapperWithLabel:"w-max pr-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"},yb={wrapper:Wi+"left-0",wrapperWithLabel:"w-max pl-12",wrapperWithIcon:"w-40",label:"antialiased block relative cursor-default pb-0 font-bold text-xs s-text"};var Qe={field:"relative text-m",wrapper:"relative py-1",wrapperRadioButtons:"inline-flex font-bold rounded-8 focus-within:focusable",wrapperRadioButtonsJustified:"flex font-bold rounded-8 focus-within:focusable",radioButtonsGroup:"group",radioButtonsGroupJustified:"grow-1 shrink-0 basis-auto",input:"peer",a11y:"sr-only",label:"peer-focus:focusable cursor-pointer text-m s-text s-border py-2 pl-28 select-none relative block before:border before:absolute before:transition-all before:left-0 before:w-20 before:h-20 before:top-2",labelBefore:'before:content-[""] before:block',checkbox:"before:s-bg before:rounded-2 hover:before:s-border-primary hover:before:s-bg-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-primary peer-checked:before:s-bg-primary peer-checked:peer-hover:before:s-border-primary-hover peer-checked:peer-hover:before:s-bg-primary-hover",checkboxInvalid:"before:s-bg before:s-border-negative before:rounded-2 hover:before:s-bg-negative-subtle-hover hover:before:s-border-negative-hover peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-bg-negative peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-bg-negative-hover peer-checked:peer-hover:before:s-border-negative-hover",checkboxDisabled:"before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-2 peer-checked:before:bg-center peer-checked:before:bg-[url(var(--w-icon-toggle-checked))] peer-checked:before:s-border-disabled peer-checked:before:s-bg-disabled",indeterminate:'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-primary peer-indeterminate:before:s-bg-primary peer-indeterminate:hover:before:s-border-primary-hover peer-indeterminate:hover:before:s-bg-primary-hover',indeterminateInvalid:'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold before:s-icon-inverted peer-indeterminate:before:s-border-negative peer-indeterminate:before:s-bg-negative peer-indeterminate:hover:before:s-border-negative-hover peer-indeterminate:hover:before:s-bg-negative-hover',indeterminateDisabled:'before:content-["\u2013"] before:rounded-2 before:leading-xs before:text-center before:font-bold pointer-events-none before:s-icon-inverted peer-indeterminate:before:s-border-disabled peer-indeterminate:before:s-bg-disabled',radio:"before:s-bg before:rounded-full peer-checked:before:border-[6] peer-checked:before:s-border-selected peer-checked:peer-hover:before:s-border-selected-hover peer-hover:before:s-border-primary peer-hover:before:s-bg-hover",radioInvalid:"before:s-bg before:s-border-negative before:rounded-full peer-checked:before:border-[6] peer-hover:before:s-bg-negative-subtle peer-hover:before:s-border-negative-hover peer-checked:before:s-border-negative peer-checked:peer-hover:before:s-border-negative-hover",radioDisabled:"before:s-bg-disabled-subtle before:s-border-disabled pointer-events-none before:rounded-full peer-checked:before:border-[6]",radioButtonsLabel:"peer-hover:peer-not-checked:s-bg-hover peer-checked:s-text-inverted peer-checked:s-bg-primary peer-checked:s-border-primary block relative font-bold cursor-pointer s-text-link text-center s-bg border-2 s-border group-first-of-type:rounded-tl-8 group-first-of-type:rounded-bl-8 group-last-of-type:rounded-tr-8 group-last-of-type:rounded-br-8 group-not-last-of-type:border-r-0 peer-checked:z-10 group-not-first:-ml-2",radioButtonsRegular:"text-s py-8 pl-12 pr-14",radioButtonsSmall:"text-xs py-[5px] px-[8px]"},kb={wrapper:`${Qe.wrapper} h-20 w-20 pointer-events-none`,input:`${Qe.input} hidden`,inputVue:"hidden",labelVue:"-mt-2",labelRadio:`${Qe.label} ${Qe.labelBefore} ${Qe.radio}`,labelCheckbox:`${Qe.label} ${Qe.labelBefore} ${Qe.checkbox}`};var lt={base:"border-2 relative flex items-start",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${f.medium} ${O.pill} ${V.pill} justify-self-end -mr-8 ml-8`};import da from"@warp-ds/elements-core";import{ifDefined as vd}from"lit/directives/if-defined.js";var md=["en","nb","fi","da","sv"],ta="en",ea=t=>md.find(e=>t===e||t.toLowerCase().includes(e))||ta;function hd(){if(typeof window=="undefined"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return ea(t)}try{let t=document.documentElement.lang;return ea(t)}catch(t){return console.warn("could not detect locale, falling back to source locale",t),ta}}var bd=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,G=(t,e,r,o,i)=>{let a=hd(),n=bd(a,t,e,r,o,i);c.load(a,n),c.activate(a)};import{classMap as Lb}from"lit/directives/class-map.js";var gd=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();function ra(t){return class extends t{static createProperty(e,r){let o=r;(typeof(r==null?void 0:r.attribute)=="undefined"||(r==null?void 0:r.attribute)===!0)&&(o=Object.assign({},r,{attribute:gd(e.toString())})),super.createProperty(e,o)}}}function oa(){return`m${Math.random().toString(36).slice(2)}`}var ia=JSON.parse('{"attention.aria.callout":["En gr\xF8n taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opm\xE6rksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til h\xF8jre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}');var aa=JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}');var na=JSON.parse('{"attention.aria.callout":["Vihre\xE4 puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa yl\xF6s"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"]}');var sa=JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til h\xF8yre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}');var la=JSON.parse('{"attention.aria.callout":["En gr\xF6n pratbubbla som introducerar n\xE5got nytt"],"attention.aria.close":["St\xE4ng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar v\xE4nster"],"attention.aria.pointingRight":["pekar h\xF6ger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}');var zt=class extends ra(da){constructor(){super(),G(aa,sa,na,ia,la),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(st).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2483
|
+
`],s([Wr({reflect:!0})],tt.prototype,"variant",2),s([Wr({type:Boolean,reflect:!0})],tt.prototype,"show",2),s([Wr({reflect:!0})],tt.prototype,"role",2);customElements.get("w-alert")||customElements.define("w-alert",tt);import{css as zd,html as gt,LitElement as Md,nothing as xi}from"lit";var La=["top","right","bottom","left"];var Ve=Math.min,se=Math.max,Tt=Math.round;var xe=t=>({x:t,y:t}),Jc={left:"right",right:"left",bottom:"top",top:"bottom"},Uc={start:"end",end:"start"};function tr(t,e,r){return se(t,Ve(e,r))}function Ye(t,e){return typeof t=="function"?t(e):t}function Ie(t){return t.split("-")[0]}function rt(t){return t.split("-")[1]}function eo(t){return t==="x"?"y":"x"}function rr(t){return t==="y"?"height":"width"}var Yc=new Set(["top","bottom"]);function Te(t){return Yc.has(Ie(t))?"y":"x"}function or(t){return eo(Te(t))}function Oa(t,e,r){r===void 0&&(r=!1);let o=rt(t),a=or(t),i=rr(a),n=a==="x"?o===(r?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(n=Ot(n)),[n,Ot(n)]}function Ta(t){let e=Ot(t);return[er(t),e,er(e)]}function er(t){return t.replace(/start|end/g,e=>Uc[e])}var _a=["left","right"],Sa=["right","left"],Xc=["top","bottom"],Qc=["bottom","top"];function Zc(t,e,r){switch(t){case"top":case"bottom":return r?e?Sa:_a:e?_a:Sa;case"left":case"right":return e?Xc:Qc;default:return[]}}function za(t,e,r,o){let a=rt(t),i=Zc(Ie(t),r==="start",o);return a&&(i=i.map(n=>n+"-"+a),e&&(i=i.concat(i.map(er)))),i}function Ot(t){return t.replace(/left|right|bottom|top/g,e=>Jc[e])}function Kc(t){return{top:0,right:0,bottom:0,left:0,...t}}function to(t){return typeof t!="number"?Kc(t):{top:t,right:t,bottom:t,left:t}}function ot(t){let{x:e,y:r,width:o,height:a}=t;return{width:o,height:a,top:r,left:e,right:e+o,bottom:r+a,x:e,y:r}}function Ma(t,e,r){let{reference:o,floating:a}=t,i=Te(e),n=or(e),l=rr(n),d=Ie(e),u=i==="y",p=o.x+o.width/2-a.width/2,m=o.y+o.height/2-a.height/2,x=o[l]/2-a[l]/2,g;switch(d){case"top":g={x:p,y:o.y-a.height};break;case"bottom":g={x:p,y:o.y+o.height};break;case"right":g={x:o.x+o.width,y:m};break;case"left":g={x:o.x-a.width,y:m};break;default:g={x:o.x,y:o.y}}switch(rt(e)){case"start":g[n]-=x*(r&&u?-1:1);break;case"end":g[n]+=x*(r&&u?-1:1);break}return g}var Da=async(t,e,r)=>{let{placement:o="bottom",strategy:a="absolute",middleware:i=[],platform:n}=r,l=i.filter(Boolean),d=await(n.isRTL==null?void 0:n.isRTL(e)),u=await n.getElementRects({reference:t,floating:e,strategy:a}),{x:p,y:m}=Ma(u,o,d),x=o,g={},v=0;for(let $=0;$<l.length;$++){let{name:y,fn:S}=l[$],{x:L,y:T,data:Q,reset:A}=await S({x:p,y:m,initialPlacement:o,placement:x,strategy:a,middlewareData:g,rects:u,platform:n,elements:{reference:t,floating:e}});p=L!=null?L:p,m=T!=null?T:m,g={...g,[y]:{...g[y],...Q}},A&&v<=50&&(v++,typeof A=="object"&&(A.placement&&(x=A.placement),A.rects&&(u=A.rects===!0?await n.getElementRects({reference:t,floating:e,strategy:a}):A.rects),{x:p,y:m}=Ma(u,x,d)),$=-1)}return{x:p,y:m,placement:x,strategy:a,middlewareData:g}};async function ut(t,e){var r;e===void 0&&(e={});let{x:o,y:a,platform:i,rects:n,elements:l,strategy:d}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:x=!1,padding:g=0}=Ye(e,t),v=to(g),y=l[x?m==="floating"?"reference":"floating":m],S=ot(await i.getClippingRect({element:(r=await(i.isElement==null?void 0:i.isElement(y)))==null||r?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(l.floating)),boundary:u,rootBoundary:p,strategy:d})),L=m==="floating"?{x:o,y:a,width:n.floating.width,height:n.floating.height}:n.reference,T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l.floating)),Q=await(i.isElement==null?void 0:i.isElement(T))?await(i.getScale==null?void 0:i.getScale(T))||{x:1,y:1}:{x:1,y:1},A=ot(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:L,offsetParent:T,strategy:d}):L);return{top:(S.top-A.top+v.top)/Q.y,bottom:(A.bottom-S.bottom+v.bottom)/Q.y,left:(S.left-A.left+v.left)/Q.x,right:(A.right-S.right+v.right)/Q.x}}var Ba=t=>({name:"arrow",options:t,async fn(e){let{x:r,y:o,placement:a,rects:i,platform:n,elements:l,middlewareData:d}=e,{element:u,padding:p=0}=Ye(t,e)||{};if(u==null)return{};let m=to(p),x={x:r,y:o},g=or(a),v=rr(g),$=await n.getDimensions(u),y=g==="y",S=y?"top":"left",L=y?"bottom":"right",T=y?"clientHeight":"clientWidth",Q=i.reference[v]+i.reference[g]-x[g]-i.floating[v],A=x[g]-i.reference[g],k=await(n.getOffsetParent==null?void 0:n.getOffsetParent(u)),C=k?k[T]:0;(!C||!await(n.isElement==null?void 0:n.isElement(k)))&&(C=l.floating[T]||i.floating[v]);let z=Q/2-A/2,N=C/2-$[v]/2-1,P=Ve(m[S],N),ie=Ve(m[L],N),G=P,ne=C-$[v]-ie,U=C/2-$[v]/2+z,j=tr(G,U,ne),ue=!d.arrow&&rt(a)!=null&&U!==j&&i.reference[v]/2-(U<G?P:ie)-$[v]/2<0,Y=ue?U<G?U-G:U-ne:0;return{[g]:x[g]+Y,data:{[g]:j,centerOffset:U-j-Y,...ue&&{alignmentOffset:Y}},reset:ue}}});var Pa=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,o;let{placement:a,middlewareData:i,rects:n,initialPlacement:l,platform:d,elements:u}=e,{mainAxis:p=!0,crossAxis:m=!0,fallbackPlacements:x,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:$=!0,...y}=Ye(t,e);if((r=i.arrow)!=null&&r.alignmentOffset)return{};let S=Ie(a),L=Te(l),T=Ie(l)===l,Q=await(d.isRTL==null?void 0:d.isRTL(u.floating)),A=x||(T||!$?[Ot(l)]:Ta(l)),k=v!=="none";!x&&k&&A.push(...za(l,$,v,Q));let C=[l,...A],z=await ut(e,y),N=[],P=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&N.push(z[S]),m){let U=Oa(a,n,Q);N.push(z[U[0]],z[U[1]])}if(P=[...P,{placement:a,overflows:N}],!N.every(U=>U<=0)){var ie,G;let U=(((ie=i.flip)==null?void 0:ie.index)||0)+1,j=C[U];if(j&&(!(m==="alignment"?L!==Te(j):!1)||P.every(ge=>Te(ge.placement)===L?ge.overflows[0]>0:!0)))return{data:{index:U,overflows:P},reset:{placement:j}};let ue=(G=P.filter(Y=>Y.overflows[0]<=0).sort((Y,ge)=>Y.overflows[1]-ge.overflows[1])[0])==null?void 0:G.placement;if(!ue)switch(g){case"bestFit":{var ne;let Y=(ne=P.filter(ge=>{if(k){let he=Te(ge.placement);return he===L||he==="y"}return!0}).map(ge=>[ge.placement,ge.overflows.filter(he=>he>0).reduce((he,Fs)=>he+Fs,0)]).sort((ge,he)=>ge[1]-he[1])[0])==null?void 0:ne[0];Y&&(ue=Y);break}case"initialPlacement":ue=l;break}if(a!==ue)return{reset:{placement:ue}}}return{}}}};function Na(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Aa(t){return La.some(e=>t[e]>=0)}var Ra=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:r}=e,{strategy:o="referenceHidden",...a}=Ye(t,e);switch(o){case"referenceHidden":{let i=await ut(e,{...a,elementContext:"reference"}),n=Na(i,r.reference);return{data:{referenceHiddenOffsets:n,referenceHidden:Aa(n)}}}case"escaped":{let i=await ut(e,{...a,altBoundary:!0}),n=Na(i,r.floating);return{data:{escapedOffsets:n,escaped:Aa(n)}}}default:return{}}}}};var Gc=new Set(["left","top"]);async function Wc(t,e){let{placement:r,platform:o,elements:a}=t,i=await(o.isRTL==null?void 0:o.isRTL(a.floating)),n=Ie(r),l=rt(r),d=Te(r)==="y",u=Gc.has(n)?-1:1,p=i&&d?-1:1,m=Ye(e,t),{mainAxis:x,crossAxis:g,alignmentAxis:v}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof v=="number"&&(g=l==="end"?v*-1:v),d?{x:g*p,y:x*u}:{x:x*u,y:g*p}}var Va=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,o;let{x:a,y:i,placement:n,middlewareData:l}=e,d=await Wc(e,t);return n===((r=l.offset)==null?void 0:r.placement)&&(o=l.arrow)!=null&&o.alignmentOffset?{}:{x:a+d.x,y:i+d.y,data:{...d,placement:n}}}}},Ia=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:r,y:o,placement:a}=e,{mainAxis:i=!0,crossAxis:n=!1,limiter:l={fn:y=>{let{x:S,y:L}=y;return{x:S,y:L}}},...d}=Ye(t,e),u={x:r,y:o},p=await ut(e,d),m=Te(Ie(a)),x=eo(m),g=u[x],v=u[m];if(i){let y=x==="y"?"top":"left",S=x==="y"?"bottom":"right",L=g+p[y],T=g-p[S];g=tr(L,g,T)}if(n){let y=m==="y"?"top":"left",S=m==="y"?"bottom":"right",L=v+p[y],T=v-p[S];v=tr(L,v,T)}let $=l.fn({...e,[x]:g,[m]:v});return{...$,data:{x:$.x-r,y:$.y-o,enabled:{[x]:i,[m]:n}}}}}};var Fa=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,o;let{placement:a,rects:i,platform:n,elements:l}=e,{apply:d=()=>{},...u}=Ye(t,e),p=await ut(e,u),m=Ie(a),x=rt(a),g=Te(a)==="y",{width:v,height:$}=i.floating,y,S;m==="top"||m==="bottom"?(y=m,S=x===(await(n.isRTL==null?void 0:n.isRTL(l.floating))?"start":"end")?"left":"right"):(S=m,y=x==="end"?"top":"bottom");let L=$-p.top-p.bottom,T=v-p.left-p.right,Q=Ve($-p[y],L),A=Ve(v-p[S],T),k=!e.middlewareData.shift,C=Q,z=A;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(z=T),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(C=L),k&&!x){let P=se(p.left,0),ie=se(p.right,0),G=se(p.top,0),ne=se(p.bottom,0);g?z=v-2*(P!==0||ie!==0?P+ie:se(p.left,p.right)):C=$-2*(G!==0||ne!==0?G+ne:se(p.top,p.bottom))}await d({...e,availableWidth:z,availableHeight:C});let N=await n.getDimensions(l.floating);return v!==N.width||$!==N.height?{reset:{rects:!0}}:{}}}};function ir(){return typeof window!="undefined"}function at(t){return Ha(t)?(t.nodeName||"").toLowerCase():"#document"}function le(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ze(t){var e;return(e=(Ha(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Ha(t){return ir()?t instanceof Node||t instanceof le(t).Node:!1}function fe(t){return ir()?t instanceof Element||t instanceof le(t).Element:!1}function ye(t){return ir()?t instanceof HTMLElement||t instanceof le(t).HTMLElement:!1}function ja(t){return!ir()||typeof ShadowRoot=="undefined"?!1:t instanceof ShadowRoot||t instanceof le(t).ShadowRoot}var ed=new Set(["inline","contents"]);function pt(t){let{overflow:e,overflowX:r,overflowY:o,display:a}=be(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+r)&&!ed.has(a)}var td=new Set(["table","td","th"]);function qa(t){return td.has(at(t))}var rd=[":popover-open",":modal"];function zt(t){return rd.some(e=>{try{return t.matches(e)}catch(r){return!1}})}var od=["transform","translate","scale","rotate","perspective"],ad=["transform","translate","scale","rotate","perspective","filter"],id=["paint","layout","strict","content"];function nr(t){let e=sr(),r=fe(t)?be(t):t;return od.some(o=>r[o]?r[o]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||ad.some(o=>(r.willChange||"").includes(o))||id.some(o=>(r.contain||"").includes(o))}function Ja(t){let e=Fe(t);for(;ye(e)&&!it(e);){if(nr(e))return e;if(zt(e))return null;e=Fe(e)}return null}function sr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var nd=new Set(["html","body","#document"]);function it(t){return nd.has(at(t))}function be(t){return le(t).getComputedStyle(t)}function Mt(t){return fe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Fe(t){if(at(t)==="html")return t;let e=t.assignedSlot||t.parentNode||ja(t)&&t.host||ze(t);return ja(e)?e.host:e}function Ua(t){let e=Fe(t);return it(e)?t.ownerDocument?t.ownerDocument.body:t.body:ye(e)&&pt(e)?e:Ua(e)}function ar(t,e,r){var o;e===void 0&&(e=[]),r===void 0&&(r=!0);let a=Ua(t),i=a===((o=t.ownerDocument)==null?void 0:o.body),n=le(a);if(i){let l=lr(n);return e.concat(n,n.visualViewport||[],pt(a)?a:[],l&&r?ar(l):[])}return e.concat(a,ar(a,[],r))}function lr(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Qa(t){let e=be(t),r=parseFloat(e.width)||0,o=parseFloat(e.height)||0,a=ye(t),i=a?t.offsetWidth:r,n=a?t.offsetHeight:o,l=Tt(r)!==i||Tt(o)!==n;return l&&(r=i,o=n),{width:r,height:o,$:l}}function Za(t){return fe(t)?t:t.contextElement}function mt(t){let e=Za(t);if(!ye(e))return xe(1);let r=e.getBoundingClientRect(),{width:o,height:a,$:i}=Qa(e),n=(i?Tt(r.width):r.width)/o,l=(i?Tt(r.height):r.height)/a;return(!n||!Number.isFinite(n))&&(n=1),(!l||!Number.isFinite(l))&&(l=1),{x:n,y:l}}var sd=xe(0);function Ka(t){let e=le(t);return!sr()||!e.visualViewport?sd:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ld(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==le(t)?!1:e}function Nt(t,e,r,o){e===void 0&&(e=!1),r===void 0&&(r=!1);let a=t.getBoundingClientRect(),i=Za(t),n=xe(1);e&&(o?fe(o)&&(n=mt(o)):n=mt(t));let l=ld(i,r,o)?Ka(i):xe(0),d=(a.left+l.x)/n.x,u=(a.top+l.y)/n.y,p=a.width/n.x,m=a.height/n.y;if(i){let x=le(i),g=o&&fe(o)?le(o):o,v=x,$=lr(v);for(;$&&o&&g!==v;){let y=mt($),S=$.getBoundingClientRect(),L=be($),T=S.left+($.clientLeft+parseFloat(L.paddingLeft))*y.x,Q=S.top+($.clientTop+parseFloat(L.paddingTop))*y.y;d*=y.x,u*=y.y,p*=y.x,m*=y.y,d+=T,u+=Q,v=le($),$=lr(v)}}return ot({width:p,height:m,x:d,y:u})}function oo(t,e){let r=Mt(t).scrollLeft;return e?e.left+r:Nt(ze(t)).left+r}function Ga(t,e,r){r===void 0&&(r=!1);let o=t.getBoundingClientRect(),a=o.left+e.scrollLeft-(r?0:oo(t,o)),i=o.top+e.scrollTop;return{x:a,y:i}}function cd(t){let{elements:e,rect:r,offsetParent:o,strategy:a}=t,i=a==="fixed",n=ze(o),l=e?zt(e.floating):!1;if(o===n||l&&i)return r;let d={scrollLeft:0,scrollTop:0},u=xe(1),p=xe(0),m=ye(o);if((m||!m&&!i)&&((at(o)!=="body"||pt(n))&&(d=Mt(o)),ye(o))){let g=Nt(o);u=mt(o),p.x=g.x+o.clientLeft,p.y=g.y+o.clientTop}let x=n&&!m&&!i?Ga(n,d,!0):xe(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-d.scrollLeft*u.x+p.x+x.x,y:r.y*u.y-d.scrollTop*u.y+p.y+x.y}}function dd(t){return Array.from(t.getClientRects())}function ud(t){let e=ze(t),r=Mt(t),o=t.ownerDocument.body,a=se(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),i=se(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),n=-r.scrollLeft+oo(t),l=-r.scrollTop;return be(o).direction==="rtl"&&(n+=se(e.clientWidth,o.clientWidth)-a),{width:a,height:i,x:n,y:l}}function pd(t,e){let r=le(t),o=ze(t),a=r.visualViewport,i=o.clientWidth,n=o.clientHeight,l=0,d=0;if(a){i=a.width,n=a.height;let u=sr();(!u||u&&e==="fixed")&&(l=a.offsetLeft,d=a.offsetTop)}return{width:i,height:n,x:l,y:d}}function md(t,e){let r=Nt(t,!0,e==="fixed"),o=r.top+t.clientTop,a=r.left+t.clientLeft,i=ye(t)?mt(t):xe(1),n=t.clientWidth*i.x,l=t.clientHeight*i.y,d=a*i.x,u=o*i.y;return{width:n,height:l,x:d,y:u}}function Ya(t,e,r){let o;if(e==="viewport")o=pd(t,r);else if(e==="document")o=ud(ze(t));else if(fe(e))o=md(e,r);else{let a=Ka(t);o={x:e.x-a.x,y:e.y-a.y,width:e.width,height:e.height}}return ot(o)}function Wa(t,e){let r=Fe(t);return r===e||!fe(r)||it(r)?!1:be(r).position==="fixed"||Wa(r,e)}function gd(t,e){let r=e.get(t);if(r)return r;let o=ar(t,[],!1).filter(l=>fe(l)&&at(l)!=="body"),a=null,i=be(t).position==="fixed",n=i?Fe(t):t;for(;fe(n)&&!it(n);){let l=be(n),d=nr(n);!d&&l.position==="fixed"&&(a=null),(i?!d&&!a:!d&&l.position==="static"&&!!a&&["absolute","fixed"].includes(a.position)||pt(n)&&!d&&Wa(t,n))?o=o.filter(p=>p!==n):a=l,n=Fe(n)}return e.set(t,o),o}function hd(t){let{element:e,boundary:r,rootBoundary:o,strategy:a}=t,n=[...r==="clippingAncestors"?zt(e)?[]:gd(e,this._c):[].concat(r),o],l=n[0],d=n.reduce((u,p)=>{let m=Ya(e,p,a);return u.top=se(m.top,u.top),u.right=Ve(m.right,u.right),u.bottom=Ve(m.bottom,u.bottom),u.left=se(m.left,u.left),u},Ya(e,l,a));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function fd(t){let{width:e,height:r}=Qa(t);return{width:e,height:r}}function bd(t,e,r){let o=ye(e),a=ze(e),i=r==="fixed",n=Nt(t,!0,i,e),l={scrollLeft:0,scrollTop:0},d=xe(0);if(o||!o&&!i)if((at(e)!=="body"||pt(a))&&(l=Mt(e)),o){let x=Nt(e,!0,i,e);d.x=x.x+e.clientLeft,d.y=x.y+e.clientTop}else a&&(d.x=oo(a));let u=a&&!o&&!i?Ga(a,l):xe(0),p=n.left+l.scrollLeft-d.x-u.x,m=n.top+l.scrollTop-d.y-u.y;return{x:p,y:m,width:n.width,height:n.height}}function ro(t){return be(t).position==="static"}function Xa(t,e){if(!ye(t)||be(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return ze(t)===r&&(r=r.ownerDocument.body),r}function ei(t,e){let r=le(t);if(zt(t))return r;if(!ye(t)){let a=Fe(t);for(;a&&!it(a);){if(fe(a)&&!ro(a))return a;a=Fe(a)}return r}let o=Xa(t,e);for(;o&&qa(o)&&ro(o);)o=Xa(o,e);return o&&it(o)&&ro(o)&&!nr(o)?r:o||Ja(t)||r}var vd=async function(t){let e=this.getOffsetParent||ei,r=this.getDimensions,o=await r(t.floating);return{reference:bd(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function wd(t){return be(t).direction==="rtl"}var xd={convertOffsetParentRelativeRectToViewportRelativeRect:cd,getDocumentElement:ze,getClippingRect:hd,getOffsetParent:ei,getElementRects:vd,getClientRects:dd,getDimensions:fd,getScale:mt,isElement:fe,isRTL:wd};var ti=Va;var ri=Ia,oi=Pa,ai=Fa,ii=Ra,ni=Ba;var si=(t,e,r)=>{let o=new Map,a={platform:xd,...r},i={...a.platform,_c:o};return Da(t,e,{...a,platform:i})};var dr="top-start",ur="top",pr="top-end",mr="right-start",gr="right",hr="right-end",fr="bottom-start",At="bottom",br="bottom-end",vr="left-start",wr="left",xr="left-end",ao=[dr,ur,pr,mr,gr,hr,fr,At,br,vr,wr,xr],nt={[dr]:fr,[ur]:At,[pr]:br,[fr]:dr,[At]:ur,[br]:pr,[vr]:mr,[wr]:gr,[xr]:hr,[mr]:vr,[gr]:wr,[hr]:xr},yd={[vr]:-45,[wr]:-45,[xr]:-45,[dr]:45,[ur]:45,[pr]:45,[mr]:135,[gr]:135,[hr]:135,[fr]:-135,[At]:-135,[br]:-135},io=t=>{let e;return/-/.test(t)?e=t.split("-").map(r=>r.charAt(0).toUpperCase()+r.slice(1)).join(""):e=t.charAt(0).toUpperCase()+t.slice(1),e},kd=t=>t.split("-")[0],Ed=t=>nt[kd(t)],ci=t=>nt[t],$d=t=>yd[ci(t)],Cd=(t,e,r)=>{Object.assign(t==null?void 0:t.style,{borderTopLeftRadius:"4px",zIndex:1,[`margin${io(Ed(r))}`]:"-0.5px",transform:`rotate(${e}deg)`})},li=8,cr=24;async function no(t){var o,a,i;if(!(t!=null&&t.isShowing)||(t!=null&&t.waitForDOM&&await(t==null?void 0:t.waitForDOM()),!(t!=null&&t.targetEl)||!(t!=null&&t.attentionEl)))return;let e=t==null?void 0:t.targetEl,r=t.attentionEl;return si(e,r,{placement:(o=t==null?void 0:t.directionName)!=null?o:At,middleware:[ti({mainAxis:(a=t==null?void 0:t.distance)!=null?a:8,crossAxis:(i=t==null?void 0:t.skidding)!=null?i:0}),(t==null?void 0:t.flip)&&oi({crossAxis:t==null?void 0:t.crossAxis,fallbackPlacements:t==null?void 0:t.fallbackPlacements}),(t==null?void 0:t.flip)&&ri({crossAxis:!0}),!(t!=null&&t.noArrow)&&(t==null?void 0:t.arrowEl)&&ni({element:t==null?void 0:t.arrowEl}),ii(),ai({apply(){Object.assign(r.style,{paddingRight:`${li}px`,paddingLeft:`${li}px`})}})]}).then(({x:n,y:l,middlewareData:d,placement:u})=>{if(t.actualDirection=u,t!=null&&t.isCallout||Object.assign(r.style,{left:`${n}px`,top:`${l}px`}),d!=null&&d.hide&&!(t!=null&&t.isCallout)){let{referenceHidden:p}=d.hide;Object.assign(r.style,{visibility:p?"hidden":""})}if(d!=null&&d.arrow&&(t!=null&&t.arrowEl)){let p=t==null?void 0:t.arrowEl,{x:m,y:x}=d.arrow,g=window.getComputedStyle(r).direction==="rtl",v=ci(u).split("-")[1],$="",y="",S="",L="";if(v==="start"){let T=typeof m=="number"?`calc(${cr}px - ${p.offsetWidth/2}px)`:"";$=typeof x=="number"?`calc(${cr}px - ${p.offsetWidth/2}px)`:"",y=g?T:"",L=g?"":T}else if(v==="end"){let T=typeof m=="number"?`calc(${cr}px - ${p.offsetWidth/2}px)`:"";y=g?"":T,L=g?T:"",S=typeof x=="number"?`calc(${cr}px - ${p.offsetWidth/2}px)`:""}else L=typeof m=="number"?`${m}px`:"",$=typeof x=="number"?`${x}px`:"";Object.assign(p.style,{top:$,right:y,bottom:S,left:L}),Cd(p,$d(u),u)}}),t}import{property as pe}from"lit/decorators.js";import{ifDefined as Nd}from"lit/directives/if-defined.js";var _d=["en","nb","fi","da","sv"],ui="en",di=t=>_d.find(e=>t===e||t.toLowerCase().includes(e))||ui;function Sd(){if(typeof window=="undefined"){let t=process.env.NMP_LANGUAGE||Intl.DateTimeFormat().resolvedOptions().locale;return di(t)}try{let t=document.documentElement.lang;return di(t)}catch(t){return console.warn("could not detect locale, falling back to source locale",t),ui}}var Ld=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,I=(t,e,r,o,a)=>{let i=Sd(),n=Ld(i,t,e,r,o,a);c.load(i,n),c.activate(i)};import{classMap as Kh}from"lit/directives/class-map.js";function pi(){return`m${Math.random().toString(36).slice(2)}`}import{css as Od}from"lit";var mi=Od`
|
|
2484
|
+
.place-self-auto {
|
|
2485
|
+
place-self: auto;
|
|
2486
|
+
}
|
|
2487
|
+
.place-self-start {
|
|
2488
|
+
place-self: start;
|
|
2489
|
+
}
|
|
2490
|
+
.place-self-end {
|
|
2491
|
+
place-self: end;
|
|
2492
|
+
}
|
|
2493
|
+
.place-self-center {
|
|
2494
|
+
place-self: center;
|
|
2495
|
+
}
|
|
2496
|
+
.place-self-stretch {
|
|
2497
|
+
place-self: stretch;
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
.place-items-start {
|
|
2501
|
+
place-items: start;
|
|
2502
|
+
}
|
|
2503
|
+
.place-items-end {
|
|
2504
|
+
place-items: end;
|
|
2505
|
+
}
|
|
2506
|
+
.place-items-center {
|
|
2507
|
+
place-items: center;
|
|
2508
|
+
}
|
|
2509
|
+
.place-items-stretch {
|
|
2510
|
+
place-items: stretch;
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
.place-content-center {
|
|
2514
|
+
place-content: center;
|
|
2515
|
+
}
|
|
2516
|
+
.place-content-start {
|
|
2517
|
+
place-content: start;
|
|
2518
|
+
}
|
|
2519
|
+
.place-content-end {
|
|
2520
|
+
place-content: end;
|
|
2521
|
+
}
|
|
2522
|
+
.place-content-between {
|
|
2523
|
+
place-content: space-between;
|
|
2524
|
+
}
|
|
2525
|
+
.place-content-around {
|
|
2526
|
+
place-content: space-around;
|
|
2527
|
+
}
|
|
2528
|
+
.place-content-evenly {
|
|
2529
|
+
place-content: space-evenly;
|
|
2530
|
+
}
|
|
2531
|
+
|
|
2532
|
+
.self-auto {
|
|
2533
|
+
align-self: auto;
|
|
2534
|
+
}
|
|
2535
|
+
.self-start {
|
|
2536
|
+
align-self: flex-start;
|
|
2537
|
+
}
|
|
2538
|
+
.self-center {
|
|
2539
|
+
align-self: center;
|
|
2540
|
+
}
|
|
2541
|
+
.self-end {
|
|
2542
|
+
align-self: flex-end;
|
|
2543
|
+
}
|
|
2544
|
+
.self-stretch {
|
|
2545
|
+
align-self: stretch;
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
.items-baseline {
|
|
2549
|
+
align-items: baseline;
|
|
2550
|
+
}
|
|
2551
|
+
.items-stretch {
|
|
2552
|
+
align-items: stretch;
|
|
2553
|
+
}
|
|
2554
|
+
.items-start {
|
|
2555
|
+
align-items: flex-start;
|
|
2556
|
+
}
|
|
2557
|
+
.items-center {
|
|
2558
|
+
align-items: center;
|
|
2559
|
+
}
|
|
2560
|
+
.items-end {
|
|
2561
|
+
align-items: flex-end;
|
|
2562
|
+
}
|
|
2563
|
+
|
|
2564
|
+
.content-start {
|
|
2565
|
+
align-content: flex-start;
|
|
2566
|
+
}
|
|
2567
|
+
.content-center {
|
|
2568
|
+
align-content: center;
|
|
2569
|
+
}
|
|
2570
|
+
.content-end {
|
|
2571
|
+
align-content: flex-end;
|
|
2572
|
+
}
|
|
2573
|
+
.content-between {
|
|
2574
|
+
align-content: space-between;
|
|
2575
|
+
}
|
|
2576
|
+
.content-around {
|
|
2577
|
+
align-content: space-around;
|
|
2578
|
+
}
|
|
2579
|
+
.content-evenly {
|
|
2580
|
+
align-content: space-evenly;
|
|
2581
|
+
}
|
|
2582
|
+
|
|
2583
|
+
.justify-self-auto {
|
|
2584
|
+
justify-self: auto;
|
|
2585
|
+
}
|
|
2586
|
+
.justify-self-start {
|
|
2587
|
+
justify-self: start;
|
|
2588
|
+
}
|
|
2589
|
+
.justify-self-center {
|
|
2590
|
+
justify-self: center;
|
|
2591
|
+
}
|
|
2592
|
+
.justify-self-end {
|
|
2593
|
+
justify-self: end;
|
|
2594
|
+
}
|
|
2595
|
+
.justify-self-stretch {
|
|
2596
|
+
justify-self: stretch;
|
|
2597
|
+
}
|
|
2598
|
+
|
|
2599
|
+
.justify-items-start {
|
|
2600
|
+
justify-items: start;
|
|
2601
|
+
}
|
|
2602
|
+
.justify-items-center {
|
|
2603
|
+
justify-items: center;
|
|
2604
|
+
}
|
|
2605
|
+
.justify-items-end {
|
|
2606
|
+
justify-items: end;
|
|
2607
|
+
}
|
|
2608
|
+
.justify-items-stretch {
|
|
2609
|
+
justify-items: stretch;
|
|
2610
|
+
}
|
|
2611
|
+
|
|
2612
|
+
.justify-start {
|
|
2613
|
+
justify-content: flex-start;
|
|
2614
|
+
}
|
|
2615
|
+
.justify-center {
|
|
2616
|
+
justify-content: center;
|
|
2617
|
+
}
|
|
2618
|
+
.justify-end {
|
|
2619
|
+
justify-content: flex-end;
|
|
2620
|
+
}
|
|
2621
|
+
.justify-between {
|
|
2622
|
+
justify-content: space-between;
|
|
2623
|
+
}
|
|
2624
|
+
.justify-around {
|
|
2625
|
+
justify-content: space-around;
|
|
2626
|
+
}
|
|
2627
|
+
.justify-evenly {
|
|
2628
|
+
justify-content: space-evenly;
|
|
2629
|
+
}
|
|
2630
|
+
|
|
2631
|
+
.gap-0 {
|
|
2632
|
+
gap: 0;
|
|
2633
|
+
}
|
|
2634
|
+
.gap-1 {
|
|
2635
|
+
gap: 0.25rem;
|
|
2636
|
+
}
|
|
2637
|
+
.gap-2 {
|
|
2638
|
+
gap: 0.5rem;
|
|
2639
|
+
}
|
|
2640
|
+
.gap-4 {
|
|
2641
|
+
gap: 1rem;
|
|
2642
|
+
}
|
|
2643
|
+
.gap-6 {
|
|
2644
|
+
gap: 1.5rem;
|
|
2645
|
+
}
|
|
2646
|
+
.gap-8 {
|
|
2647
|
+
gap: 2rem;
|
|
2648
|
+
}
|
|
2649
|
+
.gap-10 {
|
|
2650
|
+
gap: 2.5rem;
|
|
2651
|
+
}
|
|
2652
|
+
.gap-12 {
|
|
2653
|
+
gap: 3rem;
|
|
2654
|
+
}
|
|
2655
|
+
.gap-14 {
|
|
2656
|
+
gap: 3.5rem;
|
|
2657
|
+
}
|
|
2658
|
+
.gap-16 {
|
|
2659
|
+
gap: 4rem;
|
|
2660
|
+
}
|
|
2661
|
+
|
|
2662
|
+
.gap-x-0 {
|
|
2663
|
+
column-gap: 0;
|
|
2664
|
+
}
|
|
2665
|
+
.gap-x-1 {
|
|
2666
|
+
column-gap: 0.25rem;
|
|
2667
|
+
}
|
|
2668
|
+
.gap-x-2 {
|
|
2669
|
+
column-gap: 0.5rem;
|
|
2670
|
+
}
|
|
2671
|
+
.gap-x-4 {
|
|
2672
|
+
column-gap: 1rem;
|
|
2673
|
+
}
|
|
2674
|
+
.gap-x-6 {
|
|
2675
|
+
column-gap: 1.5rem;
|
|
2676
|
+
}
|
|
2677
|
+
.gap-x-8 {
|
|
2678
|
+
column-gap: 2rem;
|
|
2679
|
+
}
|
|
2680
|
+
.gap-x-10 {
|
|
2681
|
+
column-gap: 2.5rem;
|
|
2682
|
+
}
|
|
2683
|
+
.gap-x-12 {
|
|
2684
|
+
column-gap: 3rem;
|
|
2685
|
+
}
|
|
2686
|
+
.gap-x-14 {
|
|
2687
|
+
column-gap: 3.5rem;
|
|
2688
|
+
}
|
|
2689
|
+
.gap-x-16 {
|
|
2690
|
+
column-gap: 4rem;
|
|
2691
|
+
}
|
|
2692
|
+
|
|
2693
|
+
.gap-y-0 {
|
|
2694
|
+
row-gap: 0;
|
|
2695
|
+
}
|
|
2696
|
+
.gap-y-1 {
|
|
2697
|
+
row-gap: 0.25rem;
|
|
2698
|
+
}
|
|
2699
|
+
.gap-y-2 {
|
|
2700
|
+
row-gap: 0.5rem;
|
|
2701
|
+
}
|
|
2702
|
+
.gap-y-4 {
|
|
2703
|
+
row-gap: 1rem;
|
|
2704
|
+
}
|
|
2705
|
+
.gap-y-6 {
|
|
2706
|
+
row-gap: 1.5rem;
|
|
2707
|
+
}
|
|
2708
|
+
.gap-y-8 {
|
|
2709
|
+
row-gap: 2rem;
|
|
2710
|
+
}
|
|
2711
|
+
.gap-y-10 {
|
|
2712
|
+
row-gap: 2.5rem;
|
|
2713
|
+
}
|
|
2714
|
+
.gap-y-12 {
|
|
2715
|
+
row-gap: 3rem;
|
|
2716
|
+
}
|
|
2717
|
+
.gap-y-14 {
|
|
2718
|
+
row-gap: 3.5rem;
|
|
2719
|
+
}
|
|
2720
|
+
.gap-y-16 {
|
|
2721
|
+
row-gap: 4rem;
|
|
2722
|
+
}
|
|
2723
|
+
|
|
2724
|
+
.order-1 {
|
|
2725
|
+
order: 1;
|
|
2726
|
+
}
|
|
2727
|
+
.order-2 {
|
|
2728
|
+
order: 2;
|
|
2729
|
+
}
|
|
2730
|
+
.order-3 {
|
|
2731
|
+
order: 3;
|
|
2732
|
+
}
|
|
2733
|
+
.order-4 {
|
|
2734
|
+
order: 4;
|
|
2735
|
+
}
|
|
2736
|
+
.order-5 {
|
|
2737
|
+
order: 5;
|
|
2738
|
+
}
|
|
2739
|
+
.order-6 {
|
|
2740
|
+
order: 6;
|
|
2741
|
+
}
|
|
2742
|
+
.order-7 {
|
|
2743
|
+
order: 7;
|
|
2744
|
+
}
|
|
2745
|
+
.order-8 {
|
|
2746
|
+
order: 8;
|
|
2747
|
+
}
|
|
2748
|
+
.order-9 {
|
|
2749
|
+
order: 9;
|
|
2750
|
+
}
|
|
2751
|
+
.order-10 {
|
|
2752
|
+
order: 10;
|
|
2753
|
+
}
|
|
2754
|
+
.order-11 {
|
|
2755
|
+
order: 11;
|
|
2756
|
+
}
|
|
2757
|
+
.order-12 {
|
|
2758
|
+
order: 12;
|
|
2759
|
+
}
|
|
2760
|
+
.order-none {
|
|
2761
|
+
order: 0;
|
|
2762
|
+
}
|
|
2763
|
+
.order-first {
|
|
2764
|
+
order: -9999;
|
|
2765
|
+
}
|
|
2766
|
+
.order-last {
|
|
2767
|
+
order: 9999;
|
|
2768
|
+
}
|
|
2769
|
+
|
|
2770
|
+
.flex-nowrap {
|
|
2771
|
+
flex-wrap: nowrap;
|
|
2772
|
+
}
|
|
2773
|
+
.flex-wrap {
|
|
2774
|
+
flex-wrap: wrap;
|
|
2775
|
+
}
|
|
2776
|
+
.flex-wrap-reverse {
|
|
2777
|
+
flex-wrap: wrap-reverse;
|
|
2778
|
+
}
|
|
2779
|
+
|
|
2780
|
+
.shrink {
|
|
2781
|
+
flex-shrink: 1;
|
|
2782
|
+
}
|
|
2783
|
+
.shrink-0 {
|
|
2784
|
+
flex-shrink: 0;
|
|
2785
|
+
}
|
|
2786
|
+
|
|
2787
|
+
.grow {
|
|
2788
|
+
flex-grow: 1;
|
|
2789
|
+
}
|
|
2790
|
+
.grow-0 {
|
|
2791
|
+
flex-grow: 0;
|
|
2792
|
+
}
|
|
2793
|
+
|
|
2794
|
+
.flex-row {
|
|
2795
|
+
flex-direction: row;
|
|
2796
|
+
}
|
|
2797
|
+
.flex-row-reverse {
|
|
2798
|
+
flex-direction: row-reverse;
|
|
2799
|
+
}
|
|
2800
|
+
.flex-col {
|
|
2801
|
+
flex-direction: column;
|
|
2802
|
+
}
|
|
2803
|
+
.flex-col-reverse {
|
|
2804
|
+
flex-direction: column-reverse;
|
|
2805
|
+
}
|
|
2806
|
+
|
|
2807
|
+
.basis-1 {
|
|
2808
|
+
flex-basis: 0.25rem;
|
|
2809
|
+
}
|
|
2810
|
+
.basis-2 {
|
|
2811
|
+
flex-basis: 0.5rem;
|
|
2812
|
+
}
|
|
2813
|
+
.basis-4 {
|
|
2814
|
+
flex-basis: 1rem;
|
|
2815
|
+
}
|
|
2816
|
+
.basis-8 {
|
|
2817
|
+
flex-basis: 2rem;
|
|
2818
|
+
}
|
|
2819
|
+
.basis-16 {
|
|
2820
|
+
flex-basis: 4rem;
|
|
2821
|
+
}
|
|
2822
|
+
.basis-1\/5 {
|
|
2823
|
+
flex-basis: 20%;
|
|
2824
|
+
}
|
|
2825
|
+
|
|
2826
|
+
.flex-initial {
|
|
2827
|
+
flex: 0 1 auto;
|
|
2828
|
+
}
|
|
2829
|
+
.flex-1 {
|
|
2830
|
+
flex: 1 1 0%;
|
|
2831
|
+
}
|
|
2832
|
+
.flex-auto {
|
|
2833
|
+
flex: 1 1 auto;
|
|
2834
|
+
}
|
|
2835
|
+
.flex-none {
|
|
2836
|
+
flex: none;
|
|
2837
|
+
}
|
|
2838
|
+
|
|
2839
|
+
.space-x-0 > * + * {
|
|
2840
|
+
margin-left: 0;
|
|
2841
|
+
}
|
|
2842
|
+
.space-x-1 > * + * {
|
|
2843
|
+
margin-left: 0.25rem;
|
|
2844
|
+
}
|
|
2845
|
+
.space-x-2 > * + * {
|
|
2846
|
+
margin-left: 0.5rem;
|
|
2847
|
+
}
|
|
2848
|
+
.space-x-4 > * + * {
|
|
2849
|
+
margin-left: 1rem;
|
|
2850
|
+
}
|
|
2851
|
+
.space-x-6 > * + * {
|
|
2852
|
+
margin-left: 1.5rem;
|
|
2853
|
+
}
|
|
2854
|
+
.space-x-8 > * + * {
|
|
2855
|
+
margin-left: 2rem;
|
|
2856
|
+
}
|
|
2857
|
+
.space-x-10 > * + * {
|
|
2858
|
+
margin-left: 2.5rem;
|
|
2859
|
+
}
|
|
2860
|
+
.space-x-12 > * + * {
|
|
2861
|
+
margin-left: 3rem;
|
|
2862
|
+
}
|
|
2863
|
+
.space-x-14 > * + * {
|
|
2864
|
+
margin-left: 3.5rem;
|
|
2865
|
+
}
|
|
2866
|
+
.space-x-16 > * + * {
|
|
2867
|
+
margin-left: 4rem;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2870
|
+
.space-y-0 > * + * {
|
|
2871
|
+
margin-top: 0;
|
|
2872
|
+
}
|
|
2873
|
+
.space-y-1 > * + * {
|
|
2874
|
+
margin-top: 0.25rem;
|
|
2875
|
+
}
|
|
2876
|
+
.space-y-2 > * + * {
|
|
2877
|
+
margin-top: 0.5rem;
|
|
2878
|
+
}
|
|
2879
|
+
.space-y-4 > * + * {
|
|
2880
|
+
margin-top: 1rem;
|
|
2881
|
+
}
|
|
2882
|
+
.space-y-6 > * + * {
|
|
2883
|
+
margin-top: 1.5rem;
|
|
2884
|
+
}
|
|
2885
|
+
.space-y-8 > * + * {
|
|
2886
|
+
margin-top: 2rem;
|
|
2887
|
+
}
|
|
2888
|
+
.space-y-10 > * + * {
|
|
2889
|
+
margin-top: 2.5rem;
|
|
2890
|
+
}
|
|
2891
|
+
.space-y-12 > * + * {
|
|
2892
|
+
margin-top: 3rem;
|
|
2893
|
+
}
|
|
2894
|
+
.space-y-14 > * + * {
|
|
2895
|
+
margin-top: 3.5rem;
|
|
2896
|
+
}
|
|
2897
|
+
.space-y-16 > * + * {
|
|
2898
|
+
margin-top: 4rem;
|
|
2899
|
+
}
|
|
2900
|
+
|
|
2901
|
+
.space-x-reverse > * + * {
|
|
2902
|
+
margin-right: 0;
|
|
2903
|
+
margin-left: 0;
|
|
2904
|
+
}
|
|
2905
|
+
.space-y-reverse > * + * {
|
|
2906
|
+
margin-bottom: 0;
|
|
2907
|
+
margin-top: 0;
|
|
2908
|
+
}
|
|
2909
|
+
|
|
2910
|
+
.m-0 {
|
|
2911
|
+
margin: 0;
|
|
2912
|
+
}
|
|
2913
|
+
.m-1 {
|
|
2914
|
+
margin: 0.25rem;
|
|
2915
|
+
}
|
|
2916
|
+
.m-2 {
|
|
2917
|
+
margin: 0.5rem;
|
|
2918
|
+
}
|
|
2919
|
+
.m-4 {
|
|
2920
|
+
margin: 1rem;
|
|
2921
|
+
}
|
|
2922
|
+
.m-6 {
|
|
2923
|
+
margin: 1.5rem;
|
|
2924
|
+
}
|
|
2925
|
+
.m-8 {
|
|
2926
|
+
margin: 2rem;
|
|
2927
|
+
}
|
|
2928
|
+
.m-10 {
|
|
2929
|
+
margin: 2.5rem;
|
|
2930
|
+
}
|
|
2931
|
+
.m-12 {
|
|
2932
|
+
margin: 3rem;
|
|
2933
|
+
}
|
|
2934
|
+
.m-14 {
|
|
2935
|
+
margin: 3.5rem;
|
|
2936
|
+
}
|
|
2937
|
+
.m-16 {
|
|
2938
|
+
margin: 4rem;
|
|
2939
|
+
}
|
|
2940
|
+
|
|
2941
|
+
.mt-0 {
|
|
2942
|
+
margin-top: 0;
|
|
2943
|
+
}
|
|
2944
|
+
.mt-1 {
|
|
2945
|
+
margin-top: 0.25rem;
|
|
2946
|
+
}
|
|
2947
|
+
.mt-2 {
|
|
2948
|
+
margin-top: 0.5rem;
|
|
2949
|
+
}
|
|
2950
|
+
.mt-4 {
|
|
2951
|
+
margin-top: 1rem;
|
|
2952
|
+
}
|
|
2953
|
+
.mt-6 {
|
|
2954
|
+
margin-top: 1.5rem;
|
|
2955
|
+
}
|
|
2956
|
+
.mt-8 {
|
|
2957
|
+
margin-top: 2rem;
|
|
2958
|
+
}
|
|
2959
|
+
.mt-10 {
|
|
2960
|
+
margin-top: 2.5rem;
|
|
2961
|
+
}
|
|
2962
|
+
.mt-12 {
|
|
2963
|
+
margin-top: 3rem;
|
|
2964
|
+
}
|
|
2965
|
+
.mt-14 {
|
|
2966
|
+
margin-top: 3.5rem;
|
|
2967
|
+
}
|
|
2968
|
+
.mt-16 {
|
|
2969
|
+
margin-top: 4rem;
|
|
2970
|
+
}
|
|
2971
|
+
|
|
2972
|
+
.mr-0 {
|
|
2973
|
+
margin-right: 0;
|
|
2974
|
+
}
|
|
2975
|
+
.mr-1 {
|
|
2976
|
+
margin-right: 0.25rem;
|
|
2977
|
+
}
|
|
2978
|
+
.mr-2 {
|
|
2979
|
+
margin-right: 0.5rem;
|
|
2980
|
+
}
|
|
2981
|
+
.mr-4 {
|
|
2982
|
+
margin-right: 1rem;
|
|
2983
|
+
}
|
|
2984
|
+
.mr-6 {
|
|
2985
|
+
margin-right: 1.5rem;
|
|
2986
|
+
}
|
|
2987
|
+
.mr-8 {
|
|
2988
|
+
margin-right: 2rem;
|
|
2989
|
+
}
|
|
2990
|
+
.mr-10 {
|
|
2991
|
+
margin-right: 2.5rem;
|
|
2992
|
+
}
|
|
2993
|
+
.mr-12 {
|
|
2994
|
+
margin-right: 3rem;
|
|
2995
|
+
}
|
|
2996
|
+
.mr-14 {
|
|
2997
|
+
margin-right: 3.5rem;
|
|
2998
|
+
}
|
|
2999
|
+
.mr-16 {
|
|
3000
|
+
margin-right: 4rem;
|
|
3001
|
+
}
|
|
3002
|
+
|
|
3003
|
+
.mb-0 {
|
|
3004
|
+
margin-bottom: 0;
|
|
3005
|
+
}
|
|
3006
|
+
.mb-1 {
|
|
3007
|
+
margin-bottom: 0.25rem;
|
|
3008
|
+
}
|
|
3009
|
+
.mb-2 {
|
|
3010
|
+
margin-bottom: 0.5rem;
|
|
3011
|
+
}
|
|
3012
|
+
.mb-4 {
|
|
3013
|
+
margin-bottom: 1rem;
|
|
3014
|
+
}
|
|
3015
|
+
.mb-6 {
|
|
3016
|
+
margin-bottom: 1.5rem;
|
|
3017
|
+
}
|
|
3018
|
+
.mb-8 {
|
|
3019
|
+
margin-bottom: 2rem;
|
|
3020
|
+
}
|
|
3021
|
+
.mb-10 {
|
|
3022
|
+
margin-bottom: 2.5rem;
|
|
3023
|
+
}
|
|
3024
|
+
.mb-12 {
|
|
3025
|
+
margin-bottom: 3rem;
|
|
3026
|
+
}
|
|
3027
|
+
.mb-14 {
|
|
3028
|
+
margin-bottom: 3.5rem;
|
|
3029
|
+
}
|
|
3030
|
+
.mb-16 {
|
|
3031
|
+
margin-bottom: 4rem;
|
|
3032
|
+
}
|
|
3033
|
+
|
|
3034
|
+
.ml-0 {
|
|
3035
|
+
margin-left: 0;
|
|
3036
|
+
}
|
|
3037
|
+
.ml-1 {
|
|
3038
|
+
margin-left: 0.25rem;
|
|
3039
|
+
}
|
|
3040
|
+
.ml-2 {
|
|
3041
|
+
margin-left: 0.5rem;
|
|
3042
|
+
}
|
|
3043
|
+
.ml-4 {
|
|
3044
|
+
margin-left: 1rem;
|
|
3045
|
+
}
|
|
3046
|
+
.ml-6 {
|
|
3047
|
+
margin-left: 1.5rem;
|
|
3048
|
+
}
|
|
3049
|
+
.ml-8 {
|
|
3050
|
+
margin-left: 2rem;
|
|
3051
|
+
}
|
|
3052
|
+
.ml-10 {
|
|
3053
|
+
margin-left: 2.5rem;
|
|
3054
|
+
}
|
|
3055
|
+
.ml-12 {
|
|
3056
|
+
margin-left: 3rem;
|
|
3057
|
+
}
|
|
3058
|
+
.ml-14 {
|
|
3059
|
+
margin-left: 3.5rem;
|
|
3060
|
+
}
|
|
3061
|
+
.ml-16 {
|
|
3062
|
+
margin-left: 4rem;
|
|
3063
|
+
}
|
|
3064
|
+
|
|
3065
|
+
.mx-0 {
|
|
3066
|
+
margin-left: 0;
|
|
3067
|
+
margin-right: 0;
|
|
3068
|
+
}
|
|
3069
|
+
.mx-1 {
|
|
3070
|
+
margin-left: 0.25rem;
|
|
3071
|
+
margin-right: 0.25rem;
|
|
3072
|
+
}
|
|
3073
|
+
.mx-2 {
|
|
3074
|
+
margin-left: 0.5rem;
|
|
3075
|
+
margin-right: 0.5rem;
|
|
3076
|
+
}
|
|
3077
|
+
.mx-4 {
|
|
3078
|
+
margin-left: 1rem;
|
|
3079
|
+
margin-right: 1rem;
|
|
3080
|
+
}
|
|
3081
|
+
.mx-6 {
|
|
3082
|
+
margin-left: 1.5rem;
|
|
3083
|
+
margin-right: 1.5rem;
|
|
3084
|
+
}
|
|
3085
|
+
.mx-8 {
|
|
3086
|
+
margin-left: 2rem;
|
|
3087
|
+
margin-right: 2rem;
|
|
3088
|
+
}
|
|
3089
|
+
.mx-10 {
|
|
3090
|
+
margin-left: 2.5rem;
|
|
3091
|
+
margin-right: 2.5rem;
|
|
3092
|
+
}
|
|
3093
|
+
.mx-12 {
|
|
3094
|
+
margin-left: 3rem;
|
|
3095
|
+
margin-right: 3rem;
|
|
3096
|
+
}
|
|
3097
|
+
.mx-14 {
|
|
3098
|
+
margin-left: 3.5rem;
|
|
3099
|
+
margin-right: 3.5rem;
|
|
3100
|
+
}
|
|
3101
|
+
.mx-16 {
|
|
3102
|
+
margin-left: 4rem;
|
|
3103
|
+
margin-right: 4rem;
|
|
3104
|
+
}
|
|
3105
|
+
|
|
3106
|
+
.my-0 {
|
|
3107
|
+
margin-top: 0;
|
|
3108
|
+
margin-bottom: 0;
|
|
3109
|
+
}
|
|
3110
|
+
.my-1 {
|
|
3111
|
+
margin-top: 0.25rem;
|
|
3112
|
+
margin-bottom: 0.25rem;
|
|
3113
|
+
}
|
|
3114
|
+
.my-2 {
|
|
3115
|
+
margin-top: 0.5rem;
|
|
3116
|
+
margin-bottom: 0.5rem;
|
|
3117
|
+
}
|
|
3118
|
+
.my-4 {
|
|
3119
|
+
margin-top: 1rem;
|
|
3120
|
+
margin-bottom: 1rem;
|
|
3121
|
+
}
|
|
3122
|
+
.my-6 {
|
|
3123
|
+
margin-top: 1.5rem;
|
|
3124
|
+
margin-bottom: 1.5rem;
|
|
3125
|
+
}
|
|
3126
|
+
.my-8 {
|
|
3127
|
+
margin-top: 2rem;
|
|
3128
|
+
margin-bottom: 2rem;
|
|
3129
|
+
}
|
|
3130
|
+
.my-10 {
|
|
3131
|
+
margin-top: 2.5rem;
|
|
3132
|
+
margin-bottom: 2.5rem;
|
|
3133
|
+
}
|
|
3134
|
+
.my-12 {
|
|
3135
|
+
margin-top: 3rem;
|
|
3136
|
+
margin-bottom: 3rem;
|
|
3137
|
+
}
|
|
3138
|
+
.my-14 {
|
|
3139
|
+
margin-top: 3.5rem;
|
|
3140
|
+
margin-bottom: 3.5rem;
|
|
3141
|
+
}
|
|
3142
|
+
.my-16 {
|
|
3143
|
+
margin-top: 4rem;
|
|
3144
|
+
margin-bottom: 4rem;
|
|
3145
|
+
}
|
|
3146
|
+
|
|
3147
|
+
.p-0 {
|
|
3148
|
+
padding: 0;
|
|
3149
|
+
}
|
|
3150
|
+
.p-1 {
|
|
3151
|
+
padding: 0.25rem;
|
|
3152
|
+
}
|
|
3153
|
+
.p-2 {
|
|
3154
|
+
padding: 0.5rem;
|
|
3155
|
+
}
|
|
3156
|
+
.p-4 {
|
|
3157
|
+
padding: 1rem;
|
|
3158
|
+
}
|
|
3159
|
+
.p-6 {
|
|
3160
|
+
padding: 1.5rem;
|
|
3161
|
+
}
|
|
3162
|
+
.p-8 {
|
|
3163
|
+
padding: 2rem;
|
|
3164
|
+
}
|
|
3165
|
+
.p-10 {
|
|
3166
|
+
padding: 2.5rem;
|
|
3167
|
+
}
|
|
3168
|
+
.p-12 {
|
|
3169
|
+
padding: 3rem;
|
|
3170
|
+
}
|
|
3171
|
+
.p-14 {
|
|
3172
|
+
padding: 3.5rem;
|
|
3173
|
+
}
|
|
3174
|
+
.p-16 {
|
|
3175
|
+
padding: 4rem;
|
|
3176
|
+
}
|
|
3177
|
+
|
|
3178
|
+
.pt-0 {
|
|
3179
|
+
padding-top: 0;
|
|
3180
|
+
}
|
|
3181
|
+
.pt-1 {
|
|
3182
|
+
padding-top: 0.25rem;
|
|
3183
|
+
}
|
|
3184
|
+
.pt-2 {
|
|
3185
|
+
padding-top: 0.5rem;
|
|
3186
|
+
}
|
|
3187
|
+
.pt-4 {
|
|
3188
|
+
padding-top: 1rem;
|
|
3189
|
+
}
|
|
3190
|
+
.pt-6 {
|
|
3191
|
+
padding-top: 1.5rem;
|
|
3192
|
+
}
|
|
3193
|
+
.pt-8 {
|
|
3194
|
+
padding-top: 2rem;
|
|
3195
|
+
}
|
|
3196
|
+
.pt-10 {
|
|
3197
|
+
padding-top: 2.5rem;
|
|
3198
|
+
}
|
|
3199
|
+
.pt-12 {
|
|
3200
|
+
padding-top: 3rem;
|
|
3201
|
+
}
|
|
3202
|
+
.pt-14 {
|
|
3203
|
+
padding-top: 3.5rem;
|
|
3204
|
+
}
|
|
3205
|
+
.pt-16 {
|
|
3206
|
+
padding-top: 4rem;
|
|
3207
|
+
}
|
|
3208
|
+
|
|
3209
|
+
.pr-0 {
|
|
3210
|
+
padding-right: 0;
|
|
3211
|
+
}
|
|
3212
|
+
.pr-1 {
|
|
3213
|
+
padding-right: 0.25rem;
|
|
3214
|
+
}
|
|
3215
|
+
.pr-2 {
|
|
3216
|
+
padding-right: 0.5rem;
|
|
3217
|
+
}
|
|
3218
|
+
.pr-4 {
|
|
3219
|
+
padding-right: 1rem;
|
|
3220
|
+
}
|
|
3221
|
+
.pr-6 {
|
|
3222
|
+
padding-right: 1.5rem;
|
|
3223
|
+
}
|
|
3224
|
+
.pr-8 {
|
|
3225
|
+
padding-right: 2rem;
|
|
3226
|
+
}
|
|
3227
|
+
.pr-10 {
|
|
3228
|
+
padding-right: 2.5rem;
|
|
3229
|
+
}
|
|
3230
|
+
.pr-12 {
|
|
3231
|
+
padding-right: 3rem;
|
|
3232
|
+
}
|
|
3233
|
+
.pr-14 {
|
|
3234
|
+
padding-right: 3.5rem;
|
|
3235
|
+
}
|
|
3236
|
+
.pr-16 {
|
|
3237
|
+
padding-right: 4rem;
|
|
3238
|
+
}
|
|
3239
|
+
|
|
3240
|
+
.pb-0 {
|
|
3241
|
+
padding-bottom: 0;
|
|
3242
|
+
}
|
|
3243
|
+
.pb-1 {
|
|
3244
|
+
padding-bottom: 0.25rem;
|
|
3245
|
+
}
|
|
3246
|
+
.pb-2 {
|
|
3247
|
+
padding-bottom: 0.5rem;
|
|
3248
|
+
}
|
|
3249
|
+
.pb-4 {
|
|
3250
|
+
padding-bottom: 1rem;
|
|
3251
|
+
}
|
|
3252
|
+
.pb-6 {
|
|
3253
|
+
padding-bottom: 1.5rem;
|
|
3254
|
+
}
|
|
3255
|
+
.pb-8 {
|
|
3256
|
+
padding-bottom: 2rem;
|
|
3257
|
+
}
|
|
3258
|
+
.pb-10 {
|
|
3259
|
+
padding-bottom: 2.5rem;
|
|
3260
|
+
}
|
|
3261
|
+
.pb-12 {
|
|
3262
|
+
padding-bottom: 3rem;
|
|
3263
|
+
}
|
|
3264
|
+
.pb-14 {
|
|
3265
|
+
padding-bottom: 3.5rem;
|
|
3266
|
+
}
|
|
3267
|
+
.pb-16 {
|
|
3268
|
+
padding-bottom: 4rem;
|
|
3269
|
+
}
|
|
3270
|
+
|
|
3271
|
+
.pl-0 {
|
|
3272
|
+
padding-left: 0;
|
|
3273
|
+
}
|
|
3274
|
+
.pl-1 {
|
|
3275
|
+
padding-left: 0.25rem;
|
|
3276
|
+
}
|
|
3277
|
+
.pl-2 {
|
|
3278
|
+
padding-left: 0.5rem;
|
|
3279
|
+
}
|
|
3280
|
+
.pl-4 {
|
|
3281
|
+
padding-left: 1rem;
|
|
3282
|
+
}
|
|
3283
|
+
.pl-6 {
|
|
3284
|
+
padding-left: 1.5rem;
|
|
3285
|
+
}
|
|
3286
|
+
.pl-8 {
|
|
3287
|
+
padding-left: 2rem;
|
|
3288
|
+
}
|
|
3289
|
+
.pl-10 {
|
|
3290
|
+
padding-left: 2.5rem;
|
|
3291
|
+
}
|
|
3292
|
+
.pl-12 {
|
|
3293
|
+
padding-left: 3rem;
|
|
3294
|
+
}
|
|
3295
|
+
.pl-14 {
|
|
3296
|
+
padding-left: 3.5rem;
|
|
3297
|
+
}
|
|
3298
|
+
.pl-16 {
|
|
3299
|
+
padding-left: 4rem;
|
|
3300
|
+
}
|
|
3301
|
+
|
|
3302
|
+
.px-0 {
|
|
3303
|
+
padding-left: 0;
|
|
3304
|
+
padding-right: 0;
|
|
3305
|
+
}
|
|
3306
|
+
.px-1 {
|
|
3307
|
+
padding-left: 0.25rem;
|
|
3308
|
+
padding-right: 0.25rem;
|
|
3309
|
+
}
|
|
3310
|
+
.px-2 {
|
|
3311
|
+
padding-left: 0.5rem;
|
|
3312
|
+
padding-right: 0.5rem;
|
|
3313
|
+
}
|
|
3314
|
+
.px-4 {
|
|
3315
|
+
padding-left: 1rem;
|
|
3316
|
+
padding-right: 1rem;
|
|
3317
|
+
}
|
|
3318
|
+
.px-6 {
|
|
3319
|
+
padding-left: 1.5rem;
|
|
3320
|
+
padding-right: 1.5rem;
|
|
3321
|
+
}
|
|
3322
|
+
.px-8 {
|
|
3323
|
+
padding-left: 2rem;
|
|
3324
|
+
padding-right: 2rem;
|
|
3325
|
+
}
|
|
3326
|
+
.px-10 {
|
|
3327
|
+
padding-left: 2.5rem;
|
|
3328
|
+
padding-right: 2.5rem;
|
|
3329
|
+
}
|
|
3330
|
+
.px-12 {
|
|
3331
|
+
padding-left: 3rem;
|
|
3332
|
+
padding-right: 3rem;
|
|
3333
|
+
}
|
|
3334
|
+
.px-14 {
|
|
3335
|
+
padding-left: 3.5rem;
|
|
3336
|
+
padding-right: 3.5rem;
|
|
3337
|
+
}
|
|
3338
|
+
.px-16 {
|
|
3339
|
+
padding-left: 4rem;
|
|
3340
|
+
padding-right: 4rem;
|
|
3341
|
+
}
|
|
3342
|
+
|
|
3343
|
+
.py-0 {
|
|
3344
|
+
padding-top: 0;
|
|
3345
|
+
padding-bottom: 0;
|
|
3346
|
+
}
|
|
3347
|
+
.py-1 {
|
|
3348
|
+
padding-top: 0.25rem;
|
|
3349
|
+
padding-bottom: 0.25rem;
|
|
3350
|
+
}
|
|
3351
|
+
.py-2 {
|
|
3352
|
+
padding-top: 0.5rem;
|
|
3353
|
+
padding-bottom: 0.5rem;
|
|
3354
|
+
}
|
|
3355
|
+
.py-4 {
|
|
3356
|
+
padding-top: 1rem;
|
|
3357
|
+
padding-bottom: 1rem;
|
|
3358
|
+
}
|
|
3359
|
+
.py-6 {
|
|
3360
|
+
padding-top: 1.5rem;
|
|
3361
|
+
padding-bottom: 1.5rem;
|
|
3362
|
+
}
|
|
3363
|
+
.py-8 {
|
|
3364
|
+
padding-top: 2rem;
|
|
3365
|
+
padding-bottom: 2rem;
|
|
3366
|
+
}
|
|
3367
|
+
.py-10 {
|
|
3368
|
+
padding-top: 2.5rem;
|
|
3369
|
+
padding-bottom: 2.5rem;
|
|
3370
|
+
}
|
|
3371
|
+
.py-12 {
|
|
3372
|
+
padding-top: 3rem;
|
|
3373
|
+
padding-bottom: 3rem;
|
|
3374
|
+
}
|
|
3375
|
+
.py-14 {
|
|
3376
|
+
padding-top: 3.5rem;
|
|
3377
|
+
padding-bottom: 3.5rem;
|
|
3378
|
+
}
|
|
3379
|
+
.py-16 {
|
|
3380
|
+
padding-top: 4rem;
|
|
3381
|
+
padding-bottom: 4rem;
|
|
3382
|
+
}
|
|
3383
|
+
`;var gi=JSON.parse('{"attention.aria.callout":["En gr\xF8n taleboble der introducerer noget nyt"],"attention.aria.close":["Luk"],"attention.aria.highlight":["En opm\xE6rksomhedsskabende taleboble med vigtig information"],"attention.aria.pointingDown":["peger nedad"],"attention.aria.pointingLeft":["peger til venstre"],"attention.aria.pointingRight":["peger til h\xF8jre"],"attention.aria.pointingUp":["peger opad"],"attention.aria.popover":["En hvid taleboble med mere information"],"attention.aria.tooltip":["En sort taleboble med flere oplysninger"]}');var hi=JSON.parse('{"attention.aria.callout":["A green speech bubble introducing something new"],"attention.aria.close":["Close"],"attention.aria.highlight":["An attention speech bubble with important information"],"attention.aria.pointingDown":["pointing down"],"attention.aria.pointingLeft":["pointing left"],"attention.aria.pointingRight":["pointing right"],"attention.aria.pointingUp":["pointing up"],"attention.aria.popover":["A white speech bubble providing additional information"],"attention.aria.tooltip":["A black speech bubble providing complementary information"]}');var fi=JSON.parse('{"attention.aria.callout":["Vihre\xE4 puhekupla, joka esittelee jotain uutta"],"attention.aria.close":["Sulje"],"attention.aria.highlight":["Puhekupla, joka sis\xE4lt\xE4\xE4 t\xE4rke\xE4\xE4 tietoa"],"attention.aria.pointingDown":["osoittaa alas"],"attention.aria.pointingLeft":["osoittaa vasemmalle"],"attention.aria.pointingRight":["osoittaa oikealle"],"attention.aria.pointingUp":["osoittaa yl\xF6s"],"attention.aria.popover":["Valkoinen puhekupla, joka tarjoaa lis\xE4tietoa"],"attention.aria.tooltip":["Musta puhekupla, joka tarjoaa t\xE4ydent\xE4v\xE4\xE4 tietoa"]}');var bi=JSON.parse('{"attention.aria.callout":["Gr\xF8nn taleboble som introduserer noe nytt"],"attention.aria.close":["Lukk"],"attention.aria.highlight":["En uthevet taleboble med viktig informasjon"],"attention.aria.pointingDown":["peker ned"],"attention.aria.pointingLeft":["peker til venstre"],"attention.aria.pointingRight":["peker til h\xF8yre"],"attention.aria.pointingUp":["peker opp"],"attention.aria.popover":["En hvit taleboble som gir tilleggsinformasjon"],"attention.aria.tooltip":["En svart taleboble som forklarer konteksten"]}');var vi=JSON.parse('{"attention.aria.callout":["En gr\xF6n pratbubbla som introducerar n\xE5got nytt"],"attention.aria.close":["St\xE4ng"],"attention.aria.highlight":["En pratbubbla med viktig information"],"attention.aria.pointingDown":["pekar ned"],"attention.aria.pointingLeft":["pekar v\xE4nster"],"attention.aria.pointingRight":["pekar h\xF6ger"],"attention.aria.pointingUp":["pekar upp"],"attention.aria.popover":["En vit pratbubbla som ger ytterligare information"],"attention.aria.tooltip":["En svart pratbubbla som ger kompletterande information"]}');import{css as Td}from"lit";var wi=Td`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.bg-\\[--w-color-callout-background\\]{background-color:var(--w-color-callout-background)}.bg-\\[--w-s-color-surface-elevated-300\\]{background-color:var(--w-s-color-surface-elevated-300)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-b-0{border-bottom-width:0}.border-r-0{border-right-width:0}.border-\\[--w-color-callout-border\\]{border-color:var(--w-color-callout-border)}.border-\\[--w-s-color-background-inverted\\]{border-color:var(--w-s-color-background-inverted)}.border-\\[--w-s-color-surface-elevated-300\\]{border-color:var(--w-s-color-surface-elevated-300)}.border-solid{border-style:solid}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.rounded-tl-4{border-top-left-radius:4px}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.contents{display:contents}.hidden{display:none}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-start{align-items:flex-start}.items-center{align-items:center}.-bottom-\\[8px\\]{bottom:-8px}.-left-\\[8px\\]{left:-8px}.-right-\\[8px\\]{right:-8px}.-top-\\[8px\\]{top:-8px}.justify-center{justify-content:center}.justify-self-end{justify-self:end}.absolute{position:absolute}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-inverted{background-color:var(--w-s-color-background-inverted)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.drop-shadow-m{filter:drop-shadow(0 3px 8px #4040403d)drop-shadow(0 3px 6px #40404029)}.shadow-m{box-shadow:var(--w-shadow-m)}.h-\\[14px\\]{height:14px}.w-\\[14px\\]{width:14px}.-mr-8{margin-right:-.8rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.p-4{padding:.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.font-bold{font-weight:700}.resize{resize:both}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var Ad={medium:"text-m leading-[24]",xsmall:"text-xs"},yi={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},Dt="font-bold focusable justify-center transition-colors ease-in-out",Dd={primary:`border-0 rounded-8 ${Dt}`,secondary:`border-2 rounded-8 ${Dt}`,utility:`border rounded-4 ${Dt}`,negative:`border-0 rounded-8 ${Dt}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Dt}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${yi.link}`},ht={base:"border-2 relative flex items-start",tooltip:"s-bg-inverted border-[--w-s-color-background-inverted] shadow-m s-text-inverted-static rounded-4 py-6 px-8",callout:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8",highlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border] s-text py-8 px-16 rounded-8 drop-shadow-m translate-z-0",popover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300] s-text rounded-8 p-16 drop-shadow-m translate-z-0",arrowBase:"absolute h-[14px] w-[14px] border-2 border-b-0 border-r-0 rounded-tl-4 transform",arrowDirectionLeftStart:"-left-[8px]",arrowDirectionLeft:"-left-[8px]",arrowDirectionLeftEnd:"-left-[8px]",arrowDirectionRightStart:"-right-[8px]",arrowDirectionRight:"-right-[8px]",arrowDirectionRightEnd:"-right-[8px]",arrowDirectionBottomStart:"-bottom-[8px]",arrowDirectionBottom:"-bottom-[8px]",arrowDirectionBottomEnd:"-bottom-[8px]",arrowDirectionTopStart:"-top-[8px]",arrowDirectionTop:"-top-[8px]",arrowDirectionTopEnd:"-top-[8px]",arrowTooltip:"s-bg-inverted border-[--w-s-color-background-inverted]",arrowCallout:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",arrowPopover:"bg-[--w-s-color-surface-elevated-300] border-[--w-s-color-surface-elevated-300]",arrowHighlight:"bg-[--w-color-callout-background] border-[--w-color-callout-border]",content:"last-child:mb-0",notCallout:"absolute z-50",closeBtn:`${Ad.medium} ${Dd.pill} ${yi.pill} justify-self-end -mr-8 ml-8`},Z=class extends Md{constructor(){super(),I(hi,bi,fi,gi,vi),this.handleDone=this.handleDone.bind(this),this.show=!1,this.placement="bottom",this.tooltip=!1,this.callout=!1,this.popover=!1,this.highlight=!1,this.canClose=!1,this.noArrow=!1,this.distance=8,this.skidding=0,this.flip=!1,this.crossAxis=!1,this._initialPlacement=this.placement,this._actualDirection=this.placement}connectedCallback(){if(super.connectedCallback(),this.placement&&!Object.keys(nt).includes(this.placement))throw new Error(`Invalid "placement" attribute. Set its value to one of the following:
|
|
3384
|
+
${JSON.stringify(Object.keys(nt))}`);if(this.fallbackPlacements&&!this.fallbackPlacements.every(e=>ao.includes(e)))throw new Error(`Invalid "fallbackPlacements" attribute. Set its value to an array with one or more of the following:
|
|
3385
|
+
${JSON.stringify(ao)}`);setTimeout(()=>{this.requestUpdate(),this.handleDone()},0),this.callout||(window.addEventListener("click",this.handleDone),window.addEventListener("scroll",this.handleDone),window.addEventListener("resize",this.handleDone),window.addEventListener("touch",this.handleDone)),this.tooltip&&(window.addEventListener("mouseover",this.handleDone),window.addEventListener("mouseout",this.handleDone))}disconnectedCallback(){window.removeEventListener("click",this.handleDone),window.removeEventListener("scroll",this.handleDone),window.removeEventListener("resize",this.handleDone),window.removeEventListener("touch",this.handleDone),window.removeEventListener("mouseover",this.handleDone),window.removeEventListener("mouseout",this.handleDone),super.disconnectedCallback()}handleDone(){window.requestAnimationFrame(()=>{this.show&&this._targetEl&&this._attentionEl?no(this.attentionState).then(e=>{this._actualDirection=e==null?void 0:e.actualDirection}):this._actualDirection=this._initialPlacement})}get _actualDirection(){return this.placement}set _actualDirection(e){this.placement=e}get _arrowEl(){return this.renderRoot.querySelector("#arrow")}get _arrowDirection(){return nt[this._actualDirection]}get _arrowClasses(){return w([ht.arrowBase,this._activeVariantClasses.arrow,ht[`arrowDirection${io(this._arrowDirection)}`]])}get _arrowHtml(){return this.noArrow?"":gt`<div id="arrow" class="${this._arrowClasses}"></div>`}get _activeVariantClasses(){let e={callout:this.callout,popover:this.popover,tooltip:this.tooltip,highlight:this.highlight},r=Object.keys(e).find(o=>!!e[o])||"";return{wrapper:ht[r],arrow:ht[`arrow${r.charAt(0).toUpperCase()+r.slice(1)}`]}}get _attentionEl(){return this.renderRoot.querySelector("#attention")}get _targetEl(){var r;let e=(r=this.renderRoot)==null?void 0:r.querySelector("slot[name='target']");return e?e.assignedElements()[0]:null}get _messageEl(){let e=this.renderRoot.querySelector("slot[name='message']");return e?e.assignedElements()[0]:null}get _wrapperClasses(){return w([ht.base,this._activeVariantClasses.wrapper])}get _ariaClose(){return c._({id:"attention.aria.close",message:"Close",comment:"Aria label for the close button in attention"})}get _closeBtnHtml(){return gt`
|
|
3386
|
+
<button aria-label="${this._ariaClose}" @click="${this.close}" @keydown=${this.keypressed} class="${ht.closeBtn}">
|
|
3387
|
+
<w-icon-close-16 style="height: 16px; width: 16px; display: flex;"></w-icon-close-16>
|
|
2488
3388
|
</button>
|
|
2489
|
-
`}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},
|
|
2490
|
-
<div class=${
|
|
2491
|
-
${this.placement==="right-start"||this.placement==="right"||this.placement==="right-end"||this.placement==="bottom-start"||this.placement==="bottom"||this.placement==="bottom-end"?
|
|
3389
|
+
`}updated(){this.callout||this._attentionEl.style.setProperty("--attention-visibility",this.show?"":"hidden"),this.tooltip||this._attentionEl.style.setProperty("--attention-display",this.show?"flex":"none"),this.attentionState={isShowing:this.show,isCallout:this.callout,actualDirection:this._actualDirection,directionName:this.placement,arrowEl:this._arrowEl,attentionEl:this._attentionEl,targetEl:this._targetEl,noArrow:this.noArrow,distance:this.distance,skidding:this.skidding,flip:this.flip,crossAxis:this.crossAxis,fallbackPlacements:this.fallbackPlacements},no(this.attentionState)}pointingAtDirection(){switch(nt[this._actualDirection]){case"top-start":case"top":case"top-end":return c._({id:"attention.aria.pointingUp",message:"pointing up",comment:"Default screenreader message for top direction in the attention component"});case"right-start":case"right":case"right-end":return c._({id:"attention.aria.pointingRight",message:"pointing right",comment:"Default screenreader message for right direction in the attention component"});case"bottom-start":case"bottom":case"bottom-end":return c._({id:"attention.aria.pointingDown",message:"pointing down",comment:"Default screenreader message for bottom direction in the attention component"});case"left-start":case"left":case"left-end":return c._({id:"attention.aria.pointingLeft",message:"pointing left",comment:"Default screenreader message for left direction in the attention component"});default:return""}}activeAttentionType(){switch(!0){case this.tooltip:return c._({id:"attention.aria.tooltip",message:"tooltip",comment:"Default screenreader message for tooltip in the attention component"});case this.callout:return c._({id:"attention.aria.callout",message:"callout speech bubble",comment:"Default screenreader message for callout speech bubble in the attention component"});case this.popover:return c._({id:"attention.aria.popover",message:"popover speech bubble",comment:"Default screenreader message for popover speech bubble in the attention component"});case this.highlight:return c._({id:"attention.aria.highlight",message:"highlighted speech bubble",comment:"Default screenreader message for highlighted speech bubble in the attention component"});default:return""}}defaultAriaLabel(){return`${this.activeAttentionType()} ${this.noArrow?"":this.pointingAtDirection()}`}setAriaLabels(){if(this._targetEl&&!this._targetEl.getAttribute("aria-details")){let e=this._messageEl.id||(this._messageEl.id=pi());this._targetEl.setAttribute("aria-details",e)}}firstUpdated(){this._initialPlacement=this.placement,this.setAriaLabels(),this.callout&&(this._attentionEl.style.position="relative")}close(){let e=new CustomEvent("close",{bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(e))}keypressed(e){this.canClose&&e.key==="Escape"&&(e.preventDefault(),this.close())}render(){return!this.callout&&this._targetEl===void 0?gt``:gt`
|
|
3390
|
+
<div class=${Nd(this.className?this.className:void 0)}>
|
|
3391
|
+
${this.placement==="right-start"||this.placement==="right"||this.placement==="right-end"||this.placement==="bottom-start"||this.placement==="bottom"||this.placement==="bottom-end"?gt`
|
|
2492
3392
|
<slot name="target"></slot>
|
|
2493
3393
|
|
|
2494
3394
|
<div id="attention" class="${this._wrapperClasses}">
|
|
2495
3395
|
<div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div>
|
|
2496
3396
|
<slot name="message"></slot>
|
|
2497
|
-
${this.canClose?this._closeBtnHtml:
|
|
3397
|
+
${this.canClose?this._closeBtnHtml:xi}
|
|
2498
3398
|
</div>
|
|
2499
|
-
`:
|
|
3399
|
+
`:gt`
|
|
2500
3400
|
<div id="attention" class="${this._wrapperClasses}">
|
|
2501
3401
|
<slot name="message"></slot>
|
|
2502
3402
|
<div role="${this.tooltip?"tooltip":"img"}" aria-label="${this.defaultAriaLabel()}">${this._arrowHtml}</div>
|
|
2503
|
-
${this.canClose?this._closeBtnHtml:
|
|
3403
|
+
${this.canClose?this._closeBtnHtml:xi}
|
|
2504
3404
|
</div>
|
|
2505
3405
|
<slot name="target"></slot>
|
|
2506
3406
|
`}
|
|
2507
3407
|
</div>
|
|
2508
|
-
`}};
|
|
3408
|
+
`}};Z.styles=[E,mi,wi,zd`
|
|
2509
3409
|
#attention {
|
|
2510
3410
|
position: absolute;
|
|
2511
3411
|
z-index: 50;
|
|
2512
3412
|
visibility: var(--attention-visibility);
|
|
2513
3413
|
display: var(--attention-display);
|
|
2514
3414
|
}
|
|
2515
|
-
|
|
2516
3415
|
:host([popover]:not(:popover-open):not(dialog[open])) {
|
|
2517
3416
|
display: contents;
|
|
2518
3417
|
}
|
|
2519
|
-
`]);customElements.get("w-attention")||customElements.define("w-attention",
|
|
3418
|
+
`],s([pe({type:Boolean,reflect:!0})],Z.prototype,"show",2),s([pe({type:String,reflect:!0})],Z.prototype,"placement",2),s([pe({type:Boolean,reflect:!0})],Z.prototype,"tooltip",2),s([pe({type:Boolean,reflect:!0})],Z.prototype,"callout",2),s([pe({type:Boolean,reflect:!0})],Z.prototype,"popover",2),s([pe({type:Boolean,reflect:!0})],Z.prototype,"highlight",2),s([pe({attribute:"can-close",type:Boolean,reflect:!0})],Z.prototype,"canClose",2),s([pe({attribute:"no-arrow",type:Boolean,reflect:!0})],Z.prototype,"noArrow",2),s([pe({type:Number,reflect:!0})],Z.prototype,"distance",2),s([pe({type:Number,reflect:!0})],Z.prototype,"skidding",2),s([pe({type:Boolean,reflect:!0})],Z.prototype,"flip",2),s([pe({attribute:"cross-axis",type:Boolean,reflect:!0})],Z.prototype,"crossAxis",2),s([pe({attribute:"fallback-placements",type:Array,reflect:!0})],Z.prototype,"fallbackPlacements",2);customElements.get("w-attention")||customElements.define("w-attention",Z);import{html as Pd,LitElement as Rd}from"lit";import{property as Ei}from"lit/decorators.js";import{css as Bd}from"lit";var ki=Bd`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.backdrop-blur{-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.bg-\\[--w-black\\/70\\]{background-color:rgba(var(--w-rgb-black),.7)}.bg-\\[--w-color-badge-info-background\\]{background-color:var(--w-color-badge-info-background)}.bg-\\[--w-color-badge-negative-background\\]{background-color:var(--w-color-badge-negative-background)}.bg-\\[--w-color-badge-neutral-background\\]{background-color:var(--w-color-badge-neutral-background)}.bg-\\[--w-color-badge-positive-background\\]{background-color:var(--w-color-badge-positive-background)}.bg-\\[--w-color-badge-sponsored-background\\]{background-color:var(--w-color-badge-sponsored-background)}.bg-\\[--w-color-badge-warning-background\\]{background-color:var(--w-color-badge-warning-background)}.border-0{border-width:0}.rounded-4{border-radius:4px}.rounded-bl-0{border-bottom-left-radius:0}.rounded-br-0{border-bottom-right-radius:0}.rounded-tl-0{border-top-left-radius:0}.rounded-tr-0{border-top-right-radius:0}.inline-flex{display:inline-flex}.bottom-0{bottom:0}.left-0{left:0}.right-0{right:0}.top-0{top:0}.absolute{position:absolute}.static{position:static}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-text{color:var(--w-s-color-text)}.s-text-inverted-static{color:var(--w-s-color-text-inverted-static)}.px-8{padding-left:.8rem;padding-right:.8rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var ft=class extends Rd{constructor(){super(...arguments);this.variant="neutral"}get _class(){return w(["py-4 px-8 border-0 rounded-4 text-xs inline-flex",this.variant==="neutral"&&"bg-[--w-color-badge-neutral-background] s-text",this.variant==="info"&&"bg-[--w-color-badge-info-background] s-text",this.variant==="positive"&&"bg-[--w-color-badge-positive-background] s-text",this.variant==="warning"&&"bg-[--w-color-badge-warning-background] s-text",this.variant==="negative"&&"bg-[--w-color-badge-negative-background] s-text",this.variant==="disabled"&&"s-bg-disabled s-text",this.variant==="price"&&"bg-[--w-black/70] s-text-inverted-static",this.variant==="sponsored"&&"bg-[--w-color-badge-sponsored-background] s-text",!!this.position&&"absolute backdrop-blur",this.position==="top-left"&&"rounded-tl-0 rounded-tr-0 rounded-bl-0 top-0 left-0",this.position==="top-right"&&"rounded-tl-0 rounded-tr-0 rounded-br-0 top-0 right-0",this.position==="bottom-right"&&"rounded-tr-0 rounded-br-0 rounded-bl-0 bottom-0 right-0",this.position==="bottom-left"&&"rounded-tl-0 rounded-br-0 rounded-bl-0 bottom-0 left-0"])}render(){return Pd`
|
|
2520
3419
|
<div class="${this._class}">
|
|
2521
3420
|
<slot></slot>
|
|
2522
3421
|
</div>
|
|
2523
|
-
`}};
|
|
3422
|
+
`}};ft.styles=[E,ki],s([Ei({type:String,reflect:!0})],ft.prototype,"variant",2),s([Ei({type:String,reflect:!0})],ft.prototype,"position",2);customElements.get("w-badge")||customElements.define("w-badge",ft);import{html as Id,LitElement as Fd,nothing as jd}from"lit";import{property as Bt}from"lit/decorators.js";import{css as Vd}from"lit";var $i=Vd`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.p-16{padding:1.6rem}.break-words{overflow-wrap:break-word}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var je=class extends Fd{get _class(){return w(["group block relative break-words last-child:mb-0 p-16 rounded-8",this.bleed&&"-mx-16 sm:mx-0 rounded-l-0 rounded-r-0 sm:rounded-8",this.info&&"s-bg-info-subtle",this.neutral&&"s-surface-sunken",this.bordered&&"border-2 s-border s-bg"])}get _optOutRoleWithDefault(){var e;return this.role===""?jd:(e=this.role)!=null?e:"region"}render(){return Id`
|
|
2524
3423
|
<div role="${this._optOutRoleWithDefault}" class="${this._class}">
|
|
2525
3424
|
<slot></slot>
|
|
2526
3425
|
</div>
|
|
2527
|
-
`}};je.styles=[
|
|
3426
|
+
`}};je.styles=[E,$i],s([Bt({type:Boolean,reflect:!0})],je.prototype,"bleed",2),s([Bt({type:Boolean,reflect:!0})],je.prototype,"bordered",2),s([Bt({type:Boolean,reflect:!0})],je.prototype,"info",2),s([Bt({type:Boolean,reflect:!0})],je.prototype,"neutral",2),s([Bt({type:String,reflect:!0})],je.prototype,"role",2);customElements.get("w-box")||customElements.define("w-box",je);import{html as so,LitElement as qd}from"lit";function Ci(t,e){return t.flatMap(r=>[r,e]).slice(0,-1)}import{property as Jd}from"lit/decorators.js";var _i=JSON.parse('{"breadcrumbs.ariaLabel":["Du er her"]}');var Si=JSON.parse('{"breadcrumbs.ariaLabel":["You are here"]}');var Li=JSON.parse('{"breadcrumbs.ariaLabel":["Olet t\xE4ss\xE4"]}');var Oi=JSON.parse('{"breadcrumbs.ariaLabel":["Her er du"]}');var Ti=JSON.parse('{"breadcrumbs.ariaLabel":["Du \xE4r h\xE4r"]}');import{css as Hd}from"lit";var zi=Hd`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.flex{display:flex}.static{position:static}.s-text{color:var(--w-s-color-text)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.space-x-8>:not([hidden])~:not([hidden]){--w-space-x-reverse:0;margin-left:calc(.8rem*calc(1 - var(--w-space-x-reverse)));margin-right:calc(.8rem*var(--w-space-x-reverse))}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.select-none{-webkit-user-select:none;user-select:none}`;var bt={wrapper:"flex space-x-8",text:"s-text",link:"s-text-link",separator:"select-none s-icon",a11y:"sr-only"},Ud=so`<span class=${bt.separator}>/</span>`,Pt=class extends qd{constructor(){super(),I(Si,Oi,Li,_i,Ti),this.ariaLabel=c._({id:"breadcrumbs.ariaLabel",message:"You are here",comment:"Default screen reader message for the breadcrumb component"})}connectedCallback(){super.connectedCallback();let r=Array.from(this.children).flat(1/0).filter(o=>o).map((o,a)=>{if(typeof o=="string"){let i=a===this.children.length-1;return so`<span class=${bt.text} aria-current=${i?"page":void 0}>${o}</span>`}return o.classList.add(o.tagName==="A"?bt.link:bt.text),o});this._children=Ci(r,Ud)}render(){return so`
|
|
2528
3427
|
<nav aria-labelledby="breadCrumbLabel">
|
|
2529
|
-
<h2 id="breadCrumbLabel" class=${
|
|
2530
|
-
<div class=${
|
|
3428
|
+
<h2 id="breadCrumbLabel" class=${bt.a11y}>${this.ariaLabel}</h2>
|
|
3429
|
+
<div class=${bt.wrapper}>${this._children}</div>
|
|
2531
3430
|
</nav>
|
|
2532
|
-
`}};Pt.styles=[M,xa],s([Ld({attribute:"aria-label",type:String})],Pt.prototype,"ariaLabel",2);customElements.get("w-breadcrumbs")||customElements.define("w-breadcrumbs",Pt);import{html as $r,LitElement as Nd}from"lit";var B=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},Q=function(t,e,r,o,i){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!i)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?i.call(t,r):i?i.value=r:e.set(t,r),r};function vt(t){var e,r,o,i,a,n,l,d,u,p,m,k,h,y,C,$,T,N,A;class ee extends t{constructor(...E){var _,z,P;super(...E),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),i.set(this,!1),a.set(this,void 0),n.set(this,void 0),l.set(this,!0),u.set(this,""),p.set(this,()=>{Q(this,i,!0,"f"),Q(this,r,!0,"f"),B(this,e,"m",$).call(this)}),m.set(this,()=>{Q(this,r,!1,"f"),B(this,e,"m",T).call(this,this.shouldFormValueUpdate()?B(this,u,"f"):""),!this.validity.valid&&B(this,i,"f")&&Q(this,o,!0,"f");let F=B(this,e,"m",$).call(this);this.validationMessageCallback&&this.validationMessageCallback(F?this.internals.validationMessage:"")}),k.set(this,()=>{var F;B(this,l,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),Q(this,l,!1,"f")),Q(this,i,!0,"f"),Q(this,o,!0,"f"),B(this,e,"m",$).call(this),(F=this===null||this===void 0?void 0:this.validationMessageCallback)===null||F===void 0||F.call(this,this.showError?this.internals.validationMessage:"")}),h.set(this,void 0),y.set(this,!1),C.set(this,Promise.resolve()),(_=this.addEventListener)===null||_===void 0||_.call(this,"focus",B(this,p,"f")),(z=this.addEventListener)===null||z===void 0||z.call(this,"blur",B(this,m,"f")),(P=this.addEventListener)===null||P===void 0||P.call(this,"invalid",B(this,k,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let E=this.validators.map(P=>P.attribute).flat(),_=super.observedAttributes||[];return[...new Set([..._,...E])]}static getValidator(E){return this.validators.find(_=>_.attribute===E)||null}static getValidators(E){return this.validators.filter(_=>{var z;if(_.attribute===E||!((z=_.attribute)===null||z===void 0)&&z.includes(E))return!0})}get form(){return this.internals.form}get showError(){return B(this,e,"m",$).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(E,_,z){var P;(P=super.attributeChangedCallback)===null||P===void 0||P.call(this,E,_,z);let le=this.constructor.getValidators(E);le!=null&&le.length&&this.validationTarget&&this.setValue(B(this,u,"f"))}setValue(E){var _;Q(this,o,!1,"f"),(_=this.validationMessageCallback)===null||_===void 0||_.call(this,""),Q(this,u,E,"f");let P=this.shouldFormValueUpdate()?E:null;this.internals.setFormValue(P),B(this,e,"m",T).call(this,P),this.valueChangedCallback&&this.valueChangedCallback(P),B(this,e,"m",$).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(E=>E(B(this,C,"f")))}formResetCallback(){var E,_;Q(this,i,!1,"f"),Q(this,o,!1,"f"),B(this,e,"m",$).call(this),(E=this.resetFormControl)===null||E===void 0||E.call(this),(_=this.validationMessageCallback)===null||_===void 0||_.call(this,B(this,e,"m",$).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,i=new WeakMap,a=new WeakMap,n=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,m=new WeakMap,k=new WeakMap,h=new WeakMap,y=new WeakMap,C=new WeakMap,e=new WeakSet,d=function(){let E=this.getRootNode(),_=`${this.localName}[name="${this.getAttribute("name")}"]`;return E.querySelectorAll(_)},$=function(){if(this.hasAttribute("disabled"))return!1;let E=B(this,o,"f")||B(this,i,"f")&&!this.validity.valid&&!B(this,r,"f");return E&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),E},T=function(E){let _=this.constructor,z={},P=_.validators,F=[],le=P.some(U=>U.isValid instanceof Promise);B(this,y,"f")||(Q(this,C,new Promise(U=>{Q(this,h,U,"f")}),"f"),Q(this,y,!0,"f")),B(this,a,"f")&&(B(this,a,"f").abort(),Q(this,n,B(this,a,"f"),"f"));let re=new AbortController;Q(this,a,re,"f");let ce,Z=!1;P.length&&(P.forEach(U=>{let he=U.key||"customError",K=U.isValid(this,E,re.signal);K instanceof Promise?(F.push(K),K.then(fe=>{fe!=null&&(z[he]=!fe,ce=B(this,e,"m",A).call(this,U,E),B(this,e,"m",N).call(this,z,ce))})):(z[he]=!K,this.validity[he]!==!K&&(Z=!0),!K&&!ce&&(ce=B(this,e,"m",A).call(this,U,E)))}),Promise.allSettled(F).then(()=>{var U;re!=null&&re.signal.aborted||(Q(this,y,!1,"f"),(U=B(this,h,"f"))===null||U===void 0||U.call(this))}),(Z||!le)&&B(this,e,"m",N).call(this,z,ce))},N=function(E,_){if(this.validationTarget)this.internals.setValidity(E,_,this.validationTarget),Q(this,l,!1,"f");else{if(this.internals.setValidity(E,_),this.internals.validity.valid)return;Q(this,l,!0,"f")}},A=function(E,_){if(this.validityCallback){let z=this.validityCallback(E.key||"customError");if(z)return z}return E.message instanceof Function?E.message(this,_):E.message},ee}import Md from"@warp-ds/elements-core";import{property as be}from"lit/decorators.js";var ya=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var ka=JSON.parse('{"button.aria.loading":["Loading..."]}');var $a=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Ea=JSON.parse('{"button.aria.loading":["Laster..."]}');var Ca=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as Td}from"lit";var Sa=Td`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var _a=["primary","secondary","negative","utility","pill","link"],Xe="font-bold focusable justify-center transition-colors ease-in-out",H={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},D={primary:`border-0 rounded-8 ${Xe}`,secondary:`border-2 rounded-8 ${Xe}`,utility:`border rounded-4 ${Xe}`,negative:`border-0 rounded-8 ${Xe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Xe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${H.link}`},w={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"},x={medium:"text-m leading-[24]",xsmall:"text-xs"},g={inProgress:`border-transparent animate-inprogress pointer-events-none ${H.loading}`,quiet:`border-0 rounded-8 ${Xe}`,utilityQuiet:`border-0 rounded-4 ${Xe}`,negativeQuiet:`border-0 rounded-8 ${Xe}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${H.disabled}`},L={secondary:`${w.medium} ${x.medium} ${D.secondary} ${H.secondary}`,secondaryHref:`${w.medium} ${x.medium} ${D.secondary} ${H.secondary}`,secondaryDisabled:`${w.medium} ${x.medium} ${D.secondary} ${g.isDisabled}`,secondarySmall:`${x.xsmall} ${w.xsmall} ${D.secondary} ${H.secondary}`,secondarySmallDisabled:`${x.xsmall} ${w.xsmall} ${D.secondary} ${g.isDisabled}`,secondaryQuiet:`${w.medium} ${x.medium} ${g.quiet} ${H.quiet}`,secondaryQuietDisabled:`${w.medium} ${x.medium} ${g.quiet} ${g.isDisabled}`,secondarySmallQuiet:`${x.xsmall} ${w.xsmall} ${g.quiet} ${H.quiet}`,secondarySmallQuietDisabled:`${x.xsmall} ${w.xsmall} ${g.quiet} ${g.isDisabled}`,secondaryLoading:`${w.medium} ${x.medium} ${D.secondary} ${g.inProgress}`,secondarySmallLoading:`${x.xsmall} ${w.xsmall} ${D.secondary} ${g.inProgress}`,secondarySmallQuietLoading:`${x.xsmall} ${w.xsmall} ${g.quiet} ${g.inProgress}`,secondaryQuietLoading:`${w.medium} ${x.medium} ${g.quiet} ${g.inProgress}`,primary:`${w.large} ${x.medium} ${D.primary} ${H.primary}`,primaryDisabled:`${w.large} ${x.medium} ${g.isDisabled} ${D.primary}`,primarySmall:`${w.small} ${x.xsmall} ${D.primary} ${H.primary}`,primarySmallDisabled:`${w.small} ${x.xsmall} ${g.isDisabled} ${D.primary} `,primaryQuiet:`${w.large} ${x.medium} ${g.quiet} ${H.quiet}`,primaryQuietDisabled:`${w.large} ${x.medium} ${g.quiet} ${g.isDisabled}`,primarySmallQuiet:`${w.small} ${x.xsmall} ${g.quiet} ${H.quiet}`,primarySmallQuietDisabled:`${w.small} ${x.xsmall} ${g.quiet} ${g.isDisabled}`,primaryLoading:`${w.large} ${x.medium} ${g.inProgress} ${D.primary}`,primarySmallLoading:`${w.small} ${x.xsmall} ${g.inProgress} ${D.primary}`,primarySmallQuietLoading:`${w.small} ${x.xsmall} ${g.quiet} ${g.inProgress} ${D.primary}`,primaryQuietLoading:`${w.large} ${x.medium} ${g.quiet} ${g.inProgress}`,utility:`${w.utility} ${x.medium} ${D.utility} ${H.utility}`,utilityDisabled:`${w.utility} ${x.medium} ${D.utility} ${g.isDisabled}`,utilityQuiet:`${w.large} ${x.medium} ${g.utilityQuiet} ${H.utilityQuiet}`,utilityQuietDisabled:`${w.large} ${x.medium} ${g.utilityQuiet} ${g.isDisabled}`,utilitySmall:`${w.smallUtility} ${x.xsmall} ${D.utility} ${H.utility}`,utilitySmallDisabled:`${w.smallUtility} ${x.xsmall} ${D.utility} ${g.isDisabled}`,utilitySmallQuiet:`${w.smallUtility} ${x.xsmall} ${g.utilityQuiet} ${H.utilityQuiet}`,utilitySmallQuietDisabled:`${w.smallUtility} ${x.xsmall} ${g.utilityQuiet} ${g.isDisabled}`,utilityLoading:`${w.large} ${x.medium} ${D.utility} ${g.inProgress}`,utilitySmallLoading:`${w.smallUtility} ${x.xsmall} ${D.utility} ${g.inProgress}`,utilityQuietLoading:`${w.large} ${x.medium} ${g.inProgress} ${g.utilityQuiet}`,utilitySmallQuietLoading:`${w.smallUtility} ${x.xsmall} ${g.inProgress} ${g.utilityQuiet}`,negative:`${w.large} ${x.medium} ${D.negative} ${H.destructive}`,negativeDisabled:`${w.large} ${x.medium} ${D.negative} ${g.isDisabled}`,negativeQuiet:`${w.large} ${x.medium} ${g.negativeQuiet} ${H.negativeQuiet}`,negativeQuietDisabled:`${w.large} ${x.medium} ${g.negativeQuiet}${g.isDisabled}`,negativeSmall:`${w.small} ${x.xsmall} ${D.negative} ${H.destructive}`,negativeSmallDisabled:`${w.small} ${x.xsmall} ${D.negative} ${g.isDisabled}`,negativeSmallQuiet:`${w.small} ${x.xsmall} ${g.negativeQuiet} ${H.negativeQuiet}`,negativeSmallQuietDisabled:`${w.small} ${x.xsmall} ${g.negativeQuiet} ${g.isDisabled}`,negativeLoading:`${w.large} ${x.medium} ${D.negative} ${g.inProgress}`,negativeSmallLoading:`${w.small} ${x.xsmall} ${g.inProgress} ${D.negative}`,negativeQuietLoading:`${w.large} ${x.medium} ${g.negativeQuiet} ${D.negative} ${g.inProgress}`,negativeSmallQuietLoading:`${w.small} ${x.xsmall} ${g.negativeQuiet} ${g.inProgress}`,pill:`${w.pill} ${x.medium} ${D.pill} ${H.pill}`,pillSmall:`${w.pillSmall} ${x.xsmall} ${D.pill} ${H.pill}`,pillLoading:`${w.pill} ${x.medium} ${D.pill} ${g.inProgress}`,pillSmallLoading:`${w.pillSmall} ${x.xsmall} ${D.pill} ${g.inProgress}`,link:`${w.link} ${x.medium} ${D.link}`,linkSmall:`${w.link} ${x.xsmall} ${D.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},W=class extends vt(Nd){constructor(){super();this.type="button";G(ka,Ea,$a,ya,Ca),this.variant="secondary",this.ariaValueTextLoading=c._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!_a.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
2533
|
-
|
|
3431
|
+
`}};Pt.styles=[E,zi],s([Jd({attribute:"aria-label",type:String})],Pt.prototype,"ariaLabel",2);customElements.get("w-breadcrumbs")||customElements.define("w-breadcrumbs",Pt);import{html as yr,LitElement as Wd}from"lit";var M=function(t,e,r,o){if(r==="a"&&!o)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?t!==e||!o:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return r==="m"?o:r==="a"?o.call(t):o?o.value:e.get(t)},H=function(t,e,r,o,a){if(o==="m")throw new TypeError("Private method is not writable");if(o==="a"&&!a)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?t!==e||!a:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return o==="a"?a.call(t,r):a?a.value=r:e.set(t,r),r};function Xe(t){var e,r,o,a,i,n,l,d,u,p,m,x,g,v,$,y,S,L,T;class Q extends t{constructor(...k){var C,z,N;super(...k),e.add(this),this.internals=this.attachInternals(),r.set(this,!1),o.set(this,!1),a.set(this,!1),i.set(this,void 0),n.set(this,void 0),l.set(this,!0),u.set(this,""),p.set(this,()=>{H(this,a,!0,"f"),H(this,r,!0,"f"),M(this,e,"m",y).call(this)}),m.set(this,()=>{H(this,r,!1,"f"),M(this,e,"m",S).call(this,this.shouldFormValueUpdate()?M(this,u,"f"):""),!this.validity.valid&&M(this,a,"f")&&H(this,o,!0,"f");let P=M(this,e,"m",y).call(this);this.validationMessageCallback&&this.validationMessageCallback(P?this.internals.validationMessage:"")}),x.set(this,()=>{var P;M(this,l,"f")&&this.validationTarget&&(this.internals.setValidity(this.validity,this.validationMessage,this.validationTarget),H(this,l,!1,"f")),H(this,a,!0,"f"),H(this,o,!0,"f"),M(this,e,"m",y).call(this),(P=this===null||this===void 0?void 0:this.validationMessageCallback)===null||P===void 0||P.call(this,this.showError?this.internals.validationMessage:"")}),g.set(this,void 0),v.set(this,!1),$.set(this,Promise.resolve()),(C=this.addEventListener)===null||C===void 0||C.call(this,"focus",M(this,p,"f")),(z=this.addEventListener)===null||z===void 0||z.call(this,"blur",M(this,m,"f")),(N=this.addEventListener)===null||N===void 0||N.call(this,"invalid",M(this,x,"f")),this.setValue(null)}static get formAssociated(){return!0}static get validators(){return this.formControlValidators||[]}static get observedAttributes(){let k=this.validators.map(N=>N.attribute).flat(),C=super.observedAttributes||[];return[...new Set([...C,...k])]}static getValidator(k){return this.validators.find(C=>C.attribute===k)||null}static getValidators(k){return this.validators.filter(C=>{var z;if(C.attribute===k||!((z=C.attribute)===null||z===void 0)&&z.includes(k))return!0})}get form(){return this.internals.form}get showError(){return M(this,e,"m",y).call(this)}checkValidity(){return this.internals.checkValidity()}get validity(){return this.internals.validity}get validationMessage(){return this.internals.validationMessage}attributeChangedCallback(k,C,z){var N;(N=super.attributeChangedCallback)===null||N===void 0||N.call(this,k,C,z);let ie=this.constructor.getValidators(k);ie!=null&&ie.length&&this.validationTarget&&this.setValue(M(this,u,"f"))}setValue(k){var C;H(this,o,!1,"f"),(C=this.validationMessageCallback)===null||C===void 0||C.call(this,""),H(this,u,k,"f");let N=this.shouldFormValueUpdate()?k:null;this.internals.setFormValue(N),M(this,e,"m",S).call(this,N),this.valueChangedCallback&&this.valueChangedCallback(N),M(this,e,"m",y).call(this)}shouldFormValueUpdate(){return!0}get validationComplete(){return new Promise(k=>k(M(this,$,"f")))}formResetCallback(){var k,C;H(this,a,!1,"f"),H(this,o,!1,"f"),M(this,e,"m",y).call(this),(k=this.resetFormControl)===null||k===void 0||k.call(this),(C=this.validationMessageCallback)===null||C===void 0||C.call(this,M(this,e,"m",y).call(this)?this.validationMessage:"")}}return r=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakMap,n=new WeakMap,l=new WeakMap,u=new WeakMap,p=new WeakMap,m=new WeakMap,x=new WeakMap,g=new WeakMap,v=new WeakMap,$=new WeakMap,e=new WeakSet,d=function(){let k=this.getRootNode(),C=`${this.localName}[name="${this.getAttribute("name")}"]`;return k.querySelectorAll(C)},y=function(){if(this.hasAttribute("disabled"))return!1;let k=M(this,o,"f")||M(this,a,"f")&&!this.validity.valid&&!M(this,r,"f");return k&&this.internals.states?this.internals.states.add("--show-error"):this.internals.states&&this.internals.states.delete("--show-error"),k},S=function(k){let C=this.constructor,z={},N=C.validators,P=[],ie=N.some(j=>j.isValid instanceof Promise);M(this,v,"f")||(H(this,$,new Promise(j=>{H(this,g,j,"f")}),"f"),H(this,v,!0,"f")),M(this,i,"f")&&(M(this,i,"f").abort(),H(this,n,M(this,i,"f"),"f"));let G=new AbortController;H(this,i,G,"f");let ne,U=!1;N.length&&(N.forEach(j=>{let ue=j.key||"customError",Y=j.isValid(this,k,G.signal);Y instanceof Promise?(P.push(Y),Y.then(he=>{he!=null&&(z[ue]=!he,ne=M(this,e,"m",T).call(this,j,k),M(this,e,"m",L).call(this,z,ne))})):(z[ue]=!Y,this.validity[ue]!==!Y&&(U=!0),!Y&&!ne&&(ne=M(this,e,"m",T).call(this,j,k)))}),Promise.allSettled(P).then(()=>{var j;G!=null&&G.signal.aborted||(H(this,v,!1,"f"),(j=M(this,g,"f"))===null||j===void 0||j.call(this))}),(U||!ie)&&M(this,e,"m",L).call(this,z,ne))},L=function(k,C){if(this.validationTarget)this.internals.setValidity(k,C,this.validationTarget),H(this,l,!1,"f");else{if(this.internals.setValidity(k,C),this.internals.validity.valid)return;H(this,l,!0,"f")}},T=function(k,C){if(this.validityCallback){let z=this.validityCallback(k.key||"customError");if(z)return z}return k.message instanceof Function?k.message(this,C):k.message},Q}import eu from"@warp-ds/elements-core";import{property as me}from"lit/decorators.js";import{html as Xd,LitElement as Qd}from"lit";import Zd from"@warp-ds/elements-core";import{property as ke}from"lit/decorators.js";import{classMap as Kd}from"lit/directives/class-map.js";import{css as Yd}from"lit";var Mi=Yd`.w-button,
|
|
3432
|
+
.w-button--secondary {
|
|
3433
|
+
/* Local scoped variables, given the default button (the secondary variant) as a default */
|
|
3434
|
+
--_background: var(--background, var(--w-s-color-background));
|
|
3435
|
+
--_background-hover: var(--background-hover, var(--w-s-color-background-hover));
|
|
3436
|
+
--_background-active: var(--background-active, var(--w-s-color-background-active));
|
|
3437
|
+
--_text-color: var(--color, var(--w-s-color-text-link));
|
|
3438
|
+
--_border-width: var(--border-width, 2px);
|
|
3439
|
+
--_border: var(--border, var(--w-s-color-border));
|
|
3440
|
+
--_border-hover: var(--border-hover, var(--w-s-color-border-hover));
|
|
3441
|
+
--_border-active: var(--border-active, var(--w-s-color-border-active));
|
|
3442
|
+
--_border-radius: var(--border-radius, 8px);
|
|
3443
|
+
--_font-size: var(--font-size, var(--w-font-size-m));
|
|
3444
|
+
--_line-height: var(--line-height, var(--w-line-height-m));
|
|
3445
|
+
--_font-weight: var(--font-weight, bold);
|
|
3446
|
+
--_padding-x: var(--padding-x, 16px);
|
|
3447
|
+
--_padding-y: var(--padding-y, 13px);
|
|
3448
|
+
|
|
3449
|
+
/* Base setup for all buttons */
|
|
3450
|
+
display: inline-flex;
|
|
3451
|
+
justify-content: center;
|
|
3452
|
+
align-items: center;
|
|
3453
|
+
text-align: center;
|
|
3454
|
+
cursor: pointer;
|
|
3455
|
+
transition:
|
|
3456
|
+
color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3457
|
+
background-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3458
|
+
border-color 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3459
|
+
fill 150ms cubic-bezier(0.4, 0, 0.2, 1),
|
|
3460
|
+
stroke 150ms cubic-bezier(0.4, 0, 0.2, 1);
|
|
3461
|
+
|
|
3462
|
+
/* Hook the local vars up to the button stuff */
|
|
3463
|
+
background-color: var(--_background);
|
|
3464
|
+
color: var(--_text-color);
|
|
3465
|
+
border: var(--_border-width) solid var(--_border);
|
|
3466
|
+
border-radius: var(--_border-radius);
|
|
3467
|
+
padding: calc(var(--_padding-y) - var(--_border-width)) calc(var(--_padding-x) - var(--_border-width));
|
|
3468
|
+
font-size: var(--_font-size);
|
|
3469
|
+
line-height: var(--_line-height);
|
|
3470
|
+
font-weight: var(--_font-weight);
|
|
3471
|
+
}
|
|
3472
|
+
|
|
3473
|
+
.w-button:hover {
|
|
3474
|
+
background-color: var(--_background-hover);
|
|
3475
|
+
border-color: var(--_border-hover);
|
|
3476
|
+
}
|
|
3477
|
+
|
|
3478
|
+
.w-button:active {
|
|
3479
|
+
background-color: var(--_background-active);
|
|
3480
|
+
border-color: var(--_border-active);
|
|
3481
|
+
}
|
|
3482
|
+
|
|
3483
|
+
.w-button:focus-visible {
|
|
3484
|
+
outline: 2px solid var(--w-s-color-border-focus);
|
|
3485
|
+
outline-offset: var(--w-outline-offset, 1px);
|
|
3486
|
+
}
|
|
3487
|
+
|
|
3488
|
+
/* Variants config */
|
|
3489
|
+
.w-button--primary {
|
|
3490
|
+
--background: var(--w-s-color-background-primary);
|
|
3491
|
+
--background-hover: var(--w-s-color-background-primary-hover);
|
|
3492
|
+
--background-active: var(--w-s-color-background-primary-active);
|
|
3493
|
+
--color: var(--w-s-color-text-inverted);
|
|
3494
|
+
--border-width: 0px;
|
|
3495
|
+
}
|
|
3496
|
+
.w-button--negative {
|
|
3497
|
+
--background: var(--w-s-color-background-negative);
|
|
3498
|
+
--background-hover: var(--w-s-color-background-negative-hover);
|
|
3499
|
+
--background-active: var(--w-s-color-background-negative-active);
|
|
3500
|
+
--color: var(--w-s-color-text-inverted);
|
|
3501
|
+
--border-width: 0px;
|
|
3502
|
+
}
|
|
3503
|
+
.w-button--negative-quiet {
|
|
3504
|
+
--background: transparent;
|
|
3505
|
+
--background-hover: var(--w-s-color-background-negative-subtle-hover);
|
|
3506
|
+
--background-active: var(--w-s-color-background-negative-subtle-active);
|
|
3507
|
+
--color: var(--w-s-color-text-negative);
|
|
3508
|
+
--border-width: 0px;
|
|
3509
|
+
}
|
|
3510
|
+
.w-button--utility {
|
|
3511
|
+
--background: var(--w-s-color-background);
|
|
3512
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
3513
|
+
--background-active: var(--w-s-color-background-active);
|
|
3514
|
+
--color: var(--w-s-color-text);
|
|
3515
|
+
--border-radius: 4px;
|
|
3516
|
+
--border-width: 1px;
|
|
3517
|
+
}
|
|
3518
|
+
.w-button--utility-quiet {
|
|
3519
|
+
--background: transparent;
|
|
3520
|
+
--color: var(--w-s-color-text);
|
|
3521
|
+
--border-width: 0px;
|
|
3522
|
+
}
|
|
3523
|
+
.w-button--overlay {
|
|
3524
|
+
--background: var(--w-color-background);
|
|
3525
|
+
--background-hover: var(--w-color-background-hover);
|
|
3526
|
+
--background-active: var(--w-color-background-active);
|
|
3527
|
+
--color: var(--w-s-color-text);
|
|
3528
|
+
--border-radius: 9999px;
|
|
3529
|
+
--border-width: 0px;
|
|
3530
|
+
}
|
|
3531
|
+
.w-button--overlay-quiet {
|
|
3532
|
+
--background: transparent;
|
|
3533
|
+
--background-hover: var(--w-s-color-background-hover);
|
|
3534
|
+
--background-active: var(--w-s-color-background-active);
|
|
3535
|
+
--color: var(--w-s-color-text);
|
|
3536
|
+
--border-radius: 9999px;
|
|
3537
|
+
--border-width: 0px;
|
|
3538
|
+
}
|
|
3539
|
+
.w-button--overlay-inverted {
|
|
3540
|
+
--background: var(--w-s-color-background-inverted);
|
|
3541
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
3542
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
3543
|
+
--color: var(--w-s-color-text-inverted);
|
|
3544
|
+
--border-radius: 9999px;
|
|
3545
|
+
--border-width: 0px;
|
|
3546
|
+
}
|
|
3547
|
+
.w-button--overlay-inverted-quiet {
|
|
3548
|
+
--background: transparent;
|
|
3549
|
+
--background-hover: var(--w-s-color-background-inverted-hover);
|
|
3550
|
+
--background-active: var(--w-s-color-background-inverted-active);
|
|
3551
|
+
--color: var(--w-s-color-text-inverted);
|
|
3552
|
+
--border-radius: 9999px;
|
|
3553
|
+
--border-width: 0px;
|
|
3554
|
+
}
|
|
3555
|
+
|
|
3556
|
+
.w-button--link {
|
|
3557
|
+
--background: none;
|
|
3558
|
+
--background-hover: none;
|
|
3559
|
+
--background-active: none;
|
|
3560
|
+
--border-width: 0;
|
|
3561
|
+
--font-weight: normal;
|
|
3562
|
+
display: inline;
|
|
3563
|
+
}
|
|
3564
|
+
|
|
3565
|
+
/* States config, selects --loading as well since loading is always supposed to be disabled */
|
|
3566
|
+
.w-button:disabled,
|
|
3567
|
+
.w-button--disabled,
|
|
3568
|
+
.w-button--loading {
|
|
3569
|
+
--background: var(--w-s-color-background-disabled);
|
|
3570
|
+
--background-hover: var(--w-s-color-background-disabled);
|
|
3571
|
+
--background-active: var(--w-s-color-background-disabled);
|
|
3572
|
+
--color: var(--w-s-color-text-inverted);
|
|
3573
|
+
--border-width: 0px;
|
|
3574
|
+
pointer-events: none;
|
|
3575
|
+
}
|
|
3576
|
+
|
|
3577
|
+
.w-button--link:hover {
|
|
3578
|
+
text-decoration: underline;
|
|
3579
|
+
}
|
|
3580
|
+
|
|
3581
|
+
/* Sizes config */
|
|
3582
|
+
.w-button--small {
|
|
3583
|
+
--padding-x: 12px;
|
|
3584
|
+
--padding-y: 8px;
|
|
3585
|
+
--font-size: var(--w-font-size-xs);
|
|
3586
|
+
--line-height: var(--w-line-height-xs);
|
|
3587
|
+
}
|
|
3588
|
+
|
|
3589
|
+
/* Width config */
|
|
3590
|
+
.w-button--full-width {
|
|
3591
|
+
width: 100%;
|
|
3592
|
+
max-width: 100%;
|
|
3593
|
+
}
|
|
3594
|
+
|
|
3595
|
+
.w-button--has-icon-only {
|
|
3596
|
+
width: auto;
|
|
3597
|
+
max-width: none;
|
|
3598
|
+
--_padding-x: var(--_padding-y);
|
|
3599
|
+
aspect-ratio: 1 / 1;
|
|
3600
|
+
}
|
|
3601
|
+
|
|
3602
|
+
a.w-button {
|
|
3603
|
+
text-decoration: none !important;
|
|
3604
|
+
}
|
|
3605
|
+
|
|
3606
|
+
/* Copy of loading animation from warp */
|
|
3607
|
+
.w-button--loading {
|
|
3608
|
+
background-image: linear-gradient(
|
|
3609
|
+
135deg,
|
|
3610
|
+
rgba(0, 0, 0, 0.05) 25%,
|
|
3611
|
+
transparent 25%,
|
|
3612
|
+
transparent 50%,
|
|
3613
|
+
rgba(0, 0, 0, 0.05) 50%,
|
|
3614
|
+
rgba(0, 0, 0, 0.05) 75%,
|
|
3615
|
+
transparent 75%,
|
|
3616
|
+
transparent
|
|
3617
|
+
);
|
|
3618
|
+
background-size: 30px 30px;
|
|
3619
|
+
animation: animate-inprogress 3s linear infinite;
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
@keyframes animate-inprogress {
|
|
3623
|
+
0% {
|
|
3624
|
+
background-position: 0 0;
|
|
3625
|
+
}
|
|
3626
|
+
100% {
|
|
3627
|
+
background-position: 60px 0;
|
|
3628
|
+
}
|
|
3629
|
+
}`;var Ni=["primary","secondary","negative","negativeQuiet","utility","utilityQuiet","pill","link"],W=class extends Xe(Qd){constructor(){super(),this.variant="secondary"}connectedCallback(){if(super.connectedCallback(),!Ni.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3630
|
+
${Ni.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}render(){let e={"w-button":this.variant!=="link","w-button--primary":this.variant==="primary","w-button--secondary":this.variant==="secondary","w-button--negative":this.variant==="negative","w-button--utility":this.variant==="utility","w-button--quiet":this.variant==="quiet","w-button--negative-quiet":this.variant==="negativeQuiet","w-button--utility-quiet":this.variant==="utilityQuiet","w-button--small":this.small,"w-button--full-width":this.fullWidth,"w-button--disabled":this.disabled};return Xd`<a
|
|
3631
|
+
href=${this.href}
|
|
3632
|
+
target=${this.target}
|
|
3633
|
+
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
3634
|
+
class=${Kd(e)}>
|
|
3635
|
+
<slot></slot>
|
|
3636
|
+
</a>`}};W.shadowRootOptions={...Zd.shadowRootOptions,delegatesFocus:!0},W.styles=[E,Mi],s([ke({type:Boolean,reflect:!0})],W.prototype,"autofocus",2),s([ke({reflect:!0})],W.prototype,"variant",2),s([ke({type:Boolean,reflect:!0})],W.prototype,"quiet",2),s([ke({type:Boolean,reflect:!0})],W.prototype,"small",2),s([ke({reflect:!0})],W.prototype,"href",2),s([ke({type:Boolean,reflect:!0})],W.prototype,"disabled",2),s([ke({reflect:!0})],W.prototype,"target",2),s([ke({reflect:!0})],W.prototype,"rel",2),s([ke({attribute:"full-width",type:Boolean,reflect:!0})],W.prototype,"fullWidth",2),s([ke({attribute:"button-class",reflect:!0})],W.prototype,"buttonClass",2),s([ke({reflect:!0})],W.prototype,"name",2);customElements.get("w-link")||customElements.define("w-link",W);var Ai=JSON.parse('{"button.aria.loading":["Indl\xE6ser..."]}');var Di=JSON.parse('{"button.aria.loading":["Loading..."]}');var Bi=JSON.parse('{"button.aria.loading":["Ladataan..."]}');var Pi=JSON.parse('{"button.aria.loading":["Laster..."]}');var Ri=JSON.parse('{"button.aria.loading":["Laddar ..."]}');import{css as Gd}from"lit";var Vi=Gd`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.animate-inprogress{background-size:30px 30px;animation:3s linear infinite animate-inprogress;background-image:linear-gradient(135deg,#0000000d 25%,#0000 0 50%,#0000000d 0 75%,#0000 0,#0000)!important}@keyframes animate-inprogress{0%{background-position:0 0}to{background-position:60px 0}}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.bg-transparent{background-color:#0000}.bg-\\[--w-color-button-primary-background\\]{background-color:var(--w-color-button-primary-background)}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.hover\\:bg-\\[--w-color-button-primary-background-hover\\]:hover{background-color:var(--w-color-button-primary-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.active\\:bg-\\[--w-color-button-primary-background-active\\]:active{background-color:var(--w-color-button-primary-background-active)}.border{border-width:1px}.border-0{border-width:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.inline-block{display:inline-block}.inline{display:inline}.inline-flex{display:inline-flex}.hover\\:underline:hover,.focus\\:underline:focus,.active\\:underline:active{text-decoration-line:underline}.hover\\:no-underline:hover,.focus\\:no-underline:focus,.active\\:no-underline:active{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-negative{background-color:var(--w-s-color-background-negative)}.s-bg-subtle{background-color:var(--w-s-color-background-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-negative-hover:hover{background-color:var(--w-s-color-background-negative-hover)}.hover\\:s-bg-negative-subtle-hover:hover{background-color:var(--w-s-color-background-negative-subtle-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-negative-active:active{background-color:var(--w-s-color-background-negative-active)}.active\\:s-bg-negative-subtle-active:active{background-color:var(--w-s-color-background-negative-subtle-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-icon{color:var(--w-s-color-icon)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border{border-color:var(--w-s-color-border)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.max-w-full{max-width:100%}.max-w-max{max-width:max-content}.min-h-32{min-height:3.2rem}.min-w-32{min-width:3.2rem}.w-full{width:100%}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-0{padding:0}.p-4{padding:.4rem}.px-14{padding-left:1.4rem;padding-right:1.4rem}.px-16{padding-left:1.6rem;padding-right:1.6rem}.py-10{padding-top:1rem;padding-bottom:1rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.py-6{padding-top:.6rem;padding-bottom:.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.px-\\[15px\\]{padding-left:15px;padding-right:15px}.py-\\[11px\\]{padding-top:11px;padding-bottom:11px}.py-\\[7px\\]{padding-top:7px;padding-bottom:7px}.cursor-default{cursor:default}.font-bold{font-weight:700}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-\\[24\\]{line-height:2.4rem}`;var Ii=["primary","secondary","negative","utility","pill","link"],Qe="font-bold focusable justify-center transition-colors ease-in-out",V={primary:"s-text-inverted bg-[--w-color-button-primary-background] hover:bg-[--w-color-button-primary-background-hover] active:bg-[--w-color-button-primary-background-active]",secondary:"s-text-link s-border s-bg hover:s-bg-hover hover:s-border-hover active:s-bg-active",utility:"s-text s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",destructive:"s-bg-negative s-text-inverted hover:s-bg-negative-hover active:s-bg-negative-active",pill:"s-icon hover:s-icon-hover active:s-icon-active bg-transparent hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]",disabled:"s-text-inverted s-bg-disabled",quiet:"bg-transparent s-text-link hover:s-bg-hover active:s-bg-active",utilityQuiet:"s-text bg-transparent hover:s-bg-hover active:s-bg-active",negativeQuiet:"bg-transparent s-text-negative hover:s-bg-negative-subtle-hover active:s-bg-negative-subtle-active",loading:"s-text s-bg-subtle",link:"s-text-link"},O={primary:`border-0 rounded-8 ${Qe}`,secondary:`border-2 rounded-8 ${Qe}`,utility:`border rounded-4 ${Qe}`,negative:`border-0 rounded-8 ${Qe}`,pill:`p-4 rounded-full border-0 inline-flex items-center justify-center hover:bg-clip-padding ${Qe}`,link:`bg-transparent focusable ease-in-out inline active:underline hover:underline focus:underline ${V.link}`},f={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"},h={inProgress:`border-transparent animate-inprogress pointer-events-none ${V.loading}`,quiet:`border-0 rounded-8 ${Qe}`,utilityQuiet:`border-0 rounded-4 ${Qe}`,negativeQuiet:`border-0 rounded-8 ${Qe}`,isDisabled:`font-bold justify-center transition-colors ease-in-out cursor-default pointer-events-none ${V.disabled}`},_={secondary:`${f.medium} ${b.medium} ${O.secondary} ${V.secondary}`,secondaryHref:`${f.medium} ${b.medium} ${O.secondary} ${V.secondary}`,secondaryDisabled:`${f.medium} ${b.medium} ${O.secondary} ${h.isDisabled}`,secondarySmall:`${b.xsmall} ${f.xsmall} ${O.secondary} ${V.secondary}`,secondarySmallDisabled:`${b.xsmall} ${f.xsmall} ${O.secondary} ${h.isDisabled}`,secondaryQuiet:`${f.medium} ${b.medium} ${h.quiet} ${V.quiet}`,secondaryQuietDisabled:`${f.medium} ${b.medium} ${h.quiet} ${h.isDisabled}`,secondarySmallQuiet:`${b.xsmall} ${f.xsmall} ${h.quiet} ${V.quiet}`,secondarySmallQuietDisabled:`${b.xsmall} ${f.xsmall} ${h.quiet} ${h.isDisabled}`,secondaryLoading:`${f.medium} ${b.medium} ${O.secondary} ${h.inProgress}`,secondarySmallLoading:`${b.xsmall} ${f.xsmall} ${O.secondary} ${h.inProgress}`,secondarySmallQuietLoading:`${b.xsmall} ${f.xsmall} ${h.quiet} ${h.inProgress}`,secondaryQuietLoading:`${f.medium} ${b.medium} ${h.quiet} ${h.inProgress}`,primary:`${f.large} ${b.medium} ${O.primary} ${V.primary}`,primaryDisabled:`${f.large} ${b.medium} ${h.isDisabled} ${O.primary}`,primarySmall:`${f.small} ${b.xsmall} ${O.primary} ${V.primary}`,primarySmallDisabled:`${f.small} ${b.xsmall} ${h.isDisabled} ${O.primary} `,primaryQuiet:`${f.large} ${b.medium} ${h.quiet} ${V.quiet}`,primaryQuietDisabled:`${f.large} ${b.medium} ${h.quiet} ${h.isDisabled}`,primarySmallQuiet:`${f.small} ${b.xsmall} ${h.quiet} ${V.quiet}`,primarySmallQuietDisabled:`${f.small} ${b.xsmall} ${h.quiet} ${h.isDisabled}`,primaryLoading:`${f.large} ${b.medium} ${h.inProgress} ${O.primary}`,primarySmallLoading:`${f.small} ${b.xsmall} ${h.inProgress} ${O.primary}`,primarySmallQuietLoading:`${f.small} ${b.xsmall} ${h.quiet} ${h.inProgress} ${O.primary}`,primaryQuietLoading:`${f.large} ${b.medium} ${h.quiet} ${h.inProgress}`,utility:`${f.utility} ${b.medium} ${O.utility} ${V.utility}`,utilityDisabled:`${f.utility} ${b.medium} ${O.utility} ${h.isDisabled}`,utilityQuiet:`${f.large} ${b.medium} ${h.utilityQuiet} ${V.utilityQuiet}`,utilityQuietDisabled:`${f.large} ${b.medium} ${h.utilityQuiet} ${h.isDisabled}`,utilitySmall:`${f.smallUtility} ${b.xsmall} ${O.utility} ${V.utility}`,utilitySmallDisabled:`${f.smallUtility} ${b.xsmall} ${O.utility} ${h.isDisabled}`,utilitySmallQuiet:`${f.smallUtility} ${b.xsmall} ${h.utilityQuiet} ${V.utilityQuiet}`,utilitySmallQuietDisabled:`${f.smallUtility} ${b.xsmall} ${h.utilityQuiet} ${h.isDisabled}`,utilityLoading:`${f.large} ${b.medium} ${O.utility} ${h.inProgress}`,utilitySmallLoading:`${f.smallUtility} ${b.xsmall} ${O.utility} ${h.inProgress}`,utilityQuietLoading:`${f.large} ${b.medium} ${h.inProgress} ${h.utilityQuiet}`,utilitySmallQuietLoading:`${f.smallUtility} ${b.xsmall} ${h.inProgress} ${h.utilityQuiet}`,negative:`${f.large} ${b.medium} ${O.negative} ${V.destructive}`,negativeDisabled:`${f.large} ${b.medium} ${O.negative} ${h.isDisabled}`,negativeQuiet:`${f.large} ${b.medium} ${h.negativeQuiet} ${V.negativeQuiet}`,negativeQuietDisabled:`${f.large} ${b.medium} ${h.negativeQuiet}${h.isDisabled}`,negativeSmall:`${f.small} ${b.xsmall} ${O.negative} ${V.destructive}`,negativeSmallDisabled:`${f.small} ${b.xsmall} ${O.negative} ${h.isDisabled}`,negativeSmallQuiet:`${f.small} ${b.xsmall} ${h.negativeQuiet} ${V.negativeQuiet}`,negativeSmallQuietDisabled:`${f.small} ${b.xsmall} ${h.negativeQuiet} ${h.isDisabled}`,negativeLoading:`${f.large} ${b.medium} ${O.negative} ${h.inProgress}`,negativeSmallLoading:`${f.small} ${b.xsmall} ${h.inProgress} ${O.negative}`,negativeQuietLoading:`${f.large} ${b.medium} ${h.negativeQuiet} ${O.negative} ${h.inProgress}`,negativeSmallQuietLoading:`${f.small} ${b.xsmall} ${h.negativeQuiet} ${h.inProgress}`,pill:`${f.pill} ${b.medium} ${O.pill} ${V.pill}`,pillSmall:`${f.pillSmall} ${b.xsmall} ${O.pill} ${V.pill}`,pillLoading:`${f.pill} ${b.medium} ${O.pill} ${h.inProgress}`,pillSmallLoading:`${f.pillSmall} ${b.xsmall} ${O.pill} ${h.inProgress}`,link:`${f.link} ${b.medium} ${O.link}`,linkSmall:`${f.link} ${b.xsmall} ${O.link}`,linkAsButton:"inline-block active:no-underline hover:no-underline focus:no-underline text-center",a11y:"sr-only",fullWidth:"w-full max-w-full",contentWidth:"max-w-max"},X=class extends Xe(Wd){constructor(){super();this.type="button";I(Di,Pi,Bi,Ai,Ri),this.variant="secondary",this.ariaValueTextLoading=c._({id:"button.aria.loading",message:"Loading...",comment:"Screen reader message for buttons that are loading"})}updated(r){r.has("value")&&this.setValue(this.value)}connectedCallback(){if(super.connectedCallback(),!Ii.includes(this.variant))throw new Error(`Invalid "variant" attribute. Set its value to one of the following:
|
|
3637
|
+
${Ii.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0)}get _primaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&_.primary,this.small&&!this.quiet&&!this.loading&&_.primarySmall,this.small&&this.quiet&&!this.loading&&_.primarySmallQuiet,this.small&&this.loading&&(this.quiet?_.primarySmallQuietLoading:_.primarySmallLoading),!this.small&&this.quiet&&!this.loading&&_.primaryQuiet,!this.small&&this.loading&&(this.quiet?_.primaryQuietLoading:_.primaryLoading)]}get _secondaryClasses(){return[!this.small&&!this.quiet&&!this.loading&&_.secondary,this.small&&!this.quiet&&!this.loading&&_.secondarySmall,this.small&&this.loading&&(this.quiet?_.secondarySmallQuietLoading:_.secondarySmallLoading),this.small&&this.quiet&&!this.loading&&_.secondarySmallQuiet,!this.small&&this.quiet&&!this.loading&&_.secondaryQuiet,!this.small&&this.loading&&(this.quiet?_.secondaryQuietLoading:_.secondaryLoading)]}get _utilityClasses(){return[!this.small&&!this.quiet&&!this.loading&&_.utility,this.small&&!this.quiet&&!this.loading&&_.utilitySmall,this.small&&this.quiet&&!this.loading&&_.utilitySmallQuiet,this.small&&this.loading&&(this.quiet?_.utilitySmallQuietLoading:_.utilitySmallLoading),!this.small&&this.quiet&&!this.loading&&_.utilityQuiet,!this.small&&this.loading&&(this.quiet?_.utilityQuietLoading:_.utilityLoading)]}get _negativeClasses(){return[!this.small&&!this.quiet&&!this.loading&&_.negative,this.small&&!this.quiet&&!this.loading&&_.negativeSmall,this.small&&this.quiet&&!this.loading&&_.negativeSmallQuiet,this.small&&this.loading&&(this.quiet?_.negativeSmallQuietLoading:_.negativeSmallLoading),!this.small&&this.quiet&&!this.loading&&_.negativeQuiet,!this.small&&this.loading&&(this.quiet?_.negativeQuietLoading:_.negativeLoading)]}get _pillClasses(){return[!this.loading&&(this.small?_.pillSmall:_.pill),this.loading&&(this.small?_.pillSmallLoading:_.pillLoading)]}get _linkClasses(){return[this.small?_.linkSmall:_.link]}get _classes(){return w(this.buttonClass,[this.variant==="primary"&&this._primaryClasses,this.variant==="secondary"&&this._secondaryClasses,this.variant==="utility"&&this._utilityClasses,this.variant==="negative"&&this._negativeClasses,this.variant==="pill"&&this._pillClasses,this.variant==="link"&&this._linkClasses,this.href&&_.linkAsButton,this.fullWidth?_.fullWidth:_.contentWidth])}_handleButtonClick(){this.type==="submit"?this.internals.form.requestSubmit():this.type==="reset"&&this.internals.form.reset()}render(){return yr` ${this.href?yr`<w-link
|
|
2534
3638
|
href=${this.href}
|
|
2535
3639
|
target=${this.target}
|
|
2536
3640
|
rel=${this.target==="_blank"?this.rel||"noopener":void 0}
|
|
2537
3641
|
class=${this._classes}>
|
|
2538
3642
|
<slot></slot>
|
|
2539
|
-
</
|
|
3643
|
+
</w-link>`:yr`<button type=${this.type||"button"} class=${this._classes} @click="${this._handleButtonClick}">
|
|
2540
3644
|
<slot></slot>
|
|
2541
3645
|
</button>`}
|
|
2542
|
-
${this.loading
|
|
2543
|
-
<div tabindex=${
|
|
2544
|
-
${this._interactiveElement} ${this.flat?"":
|
|
3646
|
+
${this.loading?yr`<span class="sr-only" role="progressbar" aria-valuenow="{0}" aria-valuetext=${this.ariaValueTextLoading}></span>`:null}`}};X.shadowRootOptions={...eu.shadowRootOptions,delegatesFocus:!0},X.styles=[E,Vi],s([me({reflect:!0})],X.prototype,"type",2),s([me({type:Boolean,reflect:!0})],X.prototype,"autofocus",2),s([me({reflect:!0})],X.prototype,"variant",2),s([me({type:Boolean,reflect:!0})],X.prototype,"quiet",2),s([me({type:Boolean,reflect:!0})],X.prototype,"small",2),s([me({type:Boolean,reflect:!0})],X.prototype,"loading",2),s([me({reflect:!0})],X.prototype,"href",2),s([me({reflect:!0})],X.prototype,"target",2),s([me({reflect:!0})],X.prototype,"rel",2),s([me({attribute:"full-width",type:Boolean,reflect:!0})],X.prototype,"fullWidth",2),s([me({attribute:"button-class",reflect:!0})],X.prototype,"buttonClass",2),s([me({reflect:!0})],X.prototype,"name",2),s([me({reflect:!0})],X.prototype,"value",2);customElements.get("w-button")||customElements.define("w-button",X);import{html as kr,css as ru,LitElement as ou}from"lit";import{property as lo}from"lit/decorators.js";import{ifDefined as au}from"lit/directives/if-defined.js";var Fi=JSON.parse('{"card.button.text":["V\xE6lg"]}');var ji=JSON.parse('{"card.button.text":["Select"]}');var Hi=JSON.parse('{"card.button.text":["Valitse"]}');var qi=JSON.parse('{"card.button.text":["Velg"]}');var Ji=JSON.parse('{"card.button.text":["V\xE4lj"]}');import{css as tu}from"lit";var Ui=tu`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.border-2{border-width:2px}.border-transparent{border-color:#0000}.rounded-4{border-radius:4px}.rounded-8{border-radius:8px}.block{display:block}.overflow-hidden{overflow:hidden}.outline{outline-style:solid}.inset-0{top:0;bottom:0;left:0;right:0}.absolute{position:absolute}.relative{position:relative}.static{position:static}.\\!s-bg-selected{background-color:var(--w-s-color-background-selected)!important}.s-bg{background-color:var(--w-s-color-background)}.s-bg-selected{background-color:var(--w-s-color-background-selected)}.\\!hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)!important}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.hover\\:s-bg-selected-hover:hover{background-color:var(--w-s-color-background-selected-hover)}.\\!active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)!important}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.active\\:s-bg-selected-active:active{background-color:var(--w-s-color-background-selected-active)}.s-border{border-color:var(--w-s-color-border)}.s-border-selected{border-color:var(--w-s-color-border-selected)}.group:hover .group-hover\\:s-border-selected-hover{border-color:var(--w-s-color-border-selected-hover)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-selected-hover:hover{border-color:var(--w-s-color-border-selected-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-selected-active:active{border-color:var(--w-s-color-border-selected-active)}.group:active .group-active\\:s-border-active{border-color:var(--w-s-color-border-active)}.group:active .group-active\\:s-border-selected-active{border-color:var(--w-s-color-border-selected-active)}.s-surface-elevated-200{background-color:var(--w-s-color-surface-elevated-200);box-shadow:var(--w-s-shadow-surface-elevated-200)}.hover\\:s-surface-elevated-200-hover:hover{background-color:var(--w-s-color-surface-elevated-200-hover);box-shadow:var(--w-s-shadow-surface-elevated-200-hover)}.active\\:s-surface-elevated-200-active:active{background-color:var(--w-s-color-surface-elevated-200-active);box-shadow:var(--w-s-shadow-surface-elevated-200-active)}.cursor-pointer{cursor:pointer}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}`;var Me={base:"cursor-pointer overflow-hidden relative transition-all",shadow:"group rounded-8 s-surface-elevated-200 hover:s-surface-elevated-200-hover active:s-surface-elevated-200-active",selected:"!s-bg-selected !hover:s-bg-selected-hover !active:s-bg-selected-active",outline:"absolute border-2 rounded-8 inset-0 transition-all",outlineUnselected:"border-transparent group-active:s-border-active",outlineSelected:"s-border-selected group-hover:s-border-selected-hover group-active:s-border-selected-active",flat:"border-2 rounded-4",flatUnselected:"s-bg hover:s-bg-hover active:s-bg-active s-border hover:s-border-hover active:s-border-active",flatSelected:"s-bg-selected hover:s-bg-selected-hover active:s-bg-selected-active s-border-selected hover:s-border-selected-hover active:s-border-selected-active",a11y:"sr-only"},Yi={ENTER:"Enter",SPACE:" "},st=class extends ou{constructor(){super();this.selected=!1;this.flat=!1;this.clickable=!1;I(ji,qi,Hi,Fi,Ji),this.buttonText=c._({id:"card.button.text",message:"Select",comment:"Screenreader message to indicate that the card is clickable"})}get _containerClasses(){return w([Me.base,this.flat?Me.flat:Me.shadow,this.selected&&!this.flat&&Me.selected,this.selected&&this.flat?Me.flatSelected:Me.flatUnselected])}get _outlineClasses(){return w([Me.outline,this.selected?Me.outlineSelected:Me.outlineUnselected])}get _interactiveElement(){let r=()=>kr`<button class="${Me.a11y}" aria-pressed="${this.selected}" tabindex="-1">${this.buttonText}</button>`,o=()=>kr`<span role="checkbox" aria-checked="true" aria-disabled="true"></span>`;return this.clickable?r():this.selected?o():""}keypressed(r){!this.clickable||r.altKey||r.ctrlKey||(r.key===Yi.ENTER||r.key===Yi.SPACE)&&(r.preventDefault(),this.click())}render(){return kr`
|
|
3647
|
+
<div tabindex=${au(this.clickable?"0":void 0)} class="${this._containerClasses}" @keydown=${this.keypressed}>
|
|
3648
|
+
${this._interactiveElement} ${this.flat?"":kr`<div class="${this._outlineClasses}"></div>`}
|
|
2545
3649
|
<slot></slot>
|
|
2546
3650
|
</div>
|
|
2547
|
-
`}};
|
|
3651
|
+
`}};st.styles=[E,Ui,ru`
|
|
2548
3652
|
a::after {
|
|
2549
3653
|
content: '';
|
|
2550
3654
|
position: absolute;
|
|
@@ -2556,7 +3660,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2556
3660
|
:host {
|
|
2557
3661
|
display: block;
|
|
2558
3662
|
}
|
|
2559
|
-
`],s([
|
|
3663
|
+
`],s([lo({type:Boolean,reflect:!0})],st.prototype,"selected",2),s([lo({type:Boolean})],st.prototype,"flat",2),s([lo({type:Boolean})],st.prototype,"clickable",2);customElements.get("w-card")||customElements.define("w-card",st);import{css as iu,html as nu,LitElement as su}from"lit";import{property as Er}from"lit/decorators.js";import{classMap as lu}from"lit/directives/class-map.js";var Ze=class extends su{constructor(){super(...arguments);this.type="radio";this.checked=!1;this.indeterminate=!1;this.invalid=!1}get indeterminateMarker(){return!this.checked&&this.indeterminate?"\u2013":""}render(){let r=lu({checkbox:this.type==="checkbox",radio:this.type==="radio",checked:this.checked});return nu` <div class="${r}">${this.indeterminateMarker}</div> `}};Ze.styles=[E,iu`
|
|
2560
3664
|
div {
|
|
2561
3665
|
display: block;
|
|
2562
3666
|
border-width: 1px;
|
|
@@ -2602,36 +3706,36 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2602
3706
|
:host([type='checkbox'][invalid][indeterminate]) div {
|
|
2603
3707
|
background-color: var(--w-s-color-background-negative);
|
|
2604
3708
|
}
|
|
2605
|
-
`],s([Cr({type:String})],Ze.prototype,"type",2),s([Cr({type:Boolean,reflect:!0})],Ze.prototype,"checked",2),s([Cr({type:Boolean,reflect:!0})],Ze.prototype,"indeterminate",2),s([Cr({type:Boolean,reflect:!0})],Ze.prototype,"invalid",2);customElements.get("w-dead-toggle")||customElements.define("w-dead-toggle",Ze);import{css as hu,html as De,LitElement as bu}from"lit";import{property as Ce}from"lit/decorators.js";import{ifDefined as gu}from"lit/directives/if-defined.js";import{LitElement as Fd}from"lit";import{unsafeStatic as jd,html as Hd}from"lit/static-html.js";var qd=JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}'),Ud=JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}'),Jd=JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}'),Qd=JSON.parse('{"icon.title.chevron-down":["Pil nedad"]}'),Yd=JSON.parse('{"icon.title.chevron-down":["Pil ned"]}'),za=["en","nb","fi","da","sv"],Ba="en",Xd=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Pa=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Ba},so=t=>za.find(e=>t===e||t.toLowerCase().includes(e))||Pa();function Zd(){var t;if(typeof window=="undefined"){let e=Xd();return so(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Pa();return za.includes(e)?so(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),so(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Ba}}var Kd=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,Gd=(t,e,r,o,i)=>{let a=Zd(),n=Kd(a,t,e,r,o,i);c.load(a,n),c.activate(a)};Gd(Ud,qd,Jd,Qd,Yd);var Wd=class extends Fd{render(){let t=c.t({message:"Downward arrow",id:"icon.title.chevron-down",comment:"Title for chevron-down icon"});return Hd`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${jd(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-down-16")||customElements.define("w-icon-chevron-down-16",Wd);import{LitElement as eu}from"lit";import{unsafeStatic as tu,html as ru}from"lit/static-html.js";var ou=JSON.parse('{"icon.title.chevron-up":["Oppoverpil"]}'),iu=JSON.parse('{"icon.title.chevron-up":["Upward arrow"]}'),au=JSON.parse('{"icon.title.chevron-up":["Nuoli yl\xF6sp\xE4in"]}'),nu=JSON.parse('{"icon.title.chevron-up":["Pil opad"]}'),su=JSON.parse('{"icon.title.chevron-up":["Pil upp"]}'),Ra=["en","nb","fi","da","sv"],Va="en",lu=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Ia=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Va},lo=t=>Ra.find(e=>t===e||t.toLowerCase().includes(e))||Ia();function cu(){var t;if(typeof window=="undefined"){let e=lu();return lo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Ia();return Ra.includes(e)?lo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),lo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Va}}var du=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,uu=(t,e,r,o,i)=>{let a=cu(),n=du(a,t,e,r,o,i);c.load(a,n),c.activate(a)};uu(iu,ou,au,nu,su);var pu=class extends eu{render(){let t=c.t({message:"Upward arrow",id:"icon.title.chevron-up",comment:"Title for chevron-up icon"});return ru`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-up-16-part">${tu(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.5 11 8 5.5l5.5 5.5"></path></svg>`}};customElements.get("w-icon-chevron-up-16")||customElements.define("w-icon-chevron-up-16",pu);import{css as mu}from"lit";var Fa=mu`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.t4{font-weight:700;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-left{text-align:left}.align-middle{vertical-align:middle}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.will-change-height{will-change:height}.border-0{border-width:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:underline:hover{text-decoration-line:underline}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.overflow-hidden{overflow:hidden}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.h-0{height:0}.w-full{width:100%}.m-0{margin:0}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-top:0;padding-bottom:0}.pt-0{padding-top:0}.invisible{visibility:hidden}.break-words{overflow-wrap:break-word}.cursor-pointer{cursor:pointer}.-rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:-rotate-180::part(w-icon-chevron-down-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:rotate-180::part(w-icon-chevron-up-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform::part(w-icon-chevron-down-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform::part(w-icon-chevron-up-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform-gpu::part(w-icon-chevron-down-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform-gpu::part(w-icon-chevron-up-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:transition-transform::part(w-icon-chevron-down-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:transition-transform::part(w-icon-chevron-up-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:ease-in-out::part(w-icon-chevron-down-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:ease-in-out::part(w-icon-chevron-up-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var fu={base:"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:"s-bg-info-subtle",neutral:"s-surface-sunken",bordered:"border-2 s-border s-bg"},oe={wrapper:"will-change-height s-text",box:"s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 group block relative break-words last-child:mb-0 rounded-8",bleed:"-mx-16 rounded-l-0 rounded-r-0 sm:mx-0 sm:rounded-8",chevron:"inline-block align-middle s-icon",chevronNonBox:"ml-8",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",elementsChevronDownTransform:"part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out",elementsChevronUpTransform:"part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out",elementsChevronExpand:"part-[w-icon-chevron-down-16-part]:-rotate-180",elementsChevronCollapse:"part-[w-icon-chevron-up-16-part]:rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:"focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 hover:underline focus-visible:underline",buttonBox:"w-full text-left relative inline-flex items-center justify-between group relative break-words last-child:mb-0 p-16 rounded-8",contentWithTitle:"pt-0",title:"flex w-full justify-between items-center",titleType:"t4"},pe,ja,Ha,qa,Ua,Ja,Qa,ne=class extends bu{constructor(){super(...arguments);Oe(this,pe);this.expanded=!1;this.box=!1;this.bleed=!1;this.noChevron=!1;this.animated=!1;this._hasTitle=!0;this._showChevronUp=!1}updated(r){r.has("expanded")&&setTimeout(()=>{this._showChevronUp=this.expanded},200)}firstUpdated(){var i;let r=!!this.title,o=((i=this.renderRoot.querySelector("slot[name='title']"))==null?void 0:i.assignedNodes().length)>0;this._hasTitle=r||o}get _expandableSlot(){return De`<div class="${j(this,pe,Ja)}">
|
|
3709
|
+
`],s([Er({type:String})],Ze.prototype,"type",2),s([Er({type:Boolean,reflect:!0})],Ze.prototype,"checked",2),s([Er({type:Boolean,reflect:!0})],Ze.prototype,"indeterminate",2),s([Er({type:Boolean,reflect:!0})],Ze.prototype,"invalid",2);customElements.get("w-dead-toggle")||customElements.define("w-dead-toggle",Ze);import{css as Bu,html as Ne,LitElement as Pu}from"lit";import{property as Ee}from"lit/decorators.js";import{ifDefined as Ru}from"lit/directives/if-defined.js";import{LitElement as cu}from"lit";import{unsafeStatic as du,html as uu}from"lit/static-html.js";var pu=JSON.parse('{"icon.title.chevron-down":["Nedoverpil"]}'),mu=JSON.parse('{"icon.title.chevron-down":["Downward arrow"]}'),gu=JSON.parse('{"icon.title.chevron-down":["Nuoli alasp\xE4in"]}'),hu=JSON.parse('{"icon.title.chevron-down":["Pil nedad"]}'),fu=JSON.parse('{"icon.title.chevron-down":["Pil ned"]}'),Xi=["en","nb","fi","da","sv"],Qi="en",bu=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Zi=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Qi},co=t=>Xi.find(e=>t===e||t.toLowerCase().includes(e))||Zi();function vu(){var t;if(typeof window=="undefined"){let e=bu();return co(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Zi();return Xi.includes(e)?co(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),co(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Qi}}var wu=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,xu=(t,e,r,o,a)=>{let i=vu(),n=wu(i,t,e,r,o,a);c.load(i,n),c.activate(i)};xu(mu,pu,gu,hu,fu);var yu=class extends cu{render(){let t=c.t({message:"Downward arrow",id:"icon.title.chevron-down",comment:"Title for chevron-down icon"});return uu`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-down-16-part">${du(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m2.667 5.333 5.5 5.5 5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-down-16")||customElements.define("w-icon-chevron-down-16",yu);import{LitElement as ku}from"lit";import{unsafeStatic as Eu,html as $u}from"lit/static-html.js";var Cu=JSON.parse('{"icon.title.chevron-up":["Oppoverpil"]}'),_u=JSON.parse('{"icon.title.chevron-up":["Upward arrow"]}'),Su=JSON.parse('{"icon.title.chevron-up":["Nuoli yl\xF6sp\xE4in"]}'),Lu=JSON.parse('{"icon.title.chevron-up":["Pil opad"]}'),Ou=JSON.parse('{"icon.title.chevron-up":["Pil upp"]}'),Ki=["en","nb","fi","da","sv"],Gi="en",Tu=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Wi=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Gi},uo=t=>Ki.find(e=>t===e||t.toLowerCase().includes(e))||Wi();function zu(){var t;if(typeof window=="undefined"){let e=Tu();return uo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Wi();return Ki.includes(e)?uo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),uo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Gi}}var Mu=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Nu=(t,e,r,o,a)=>{let i=zu(),n=Mu(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Nu(_u,Cu,Su,Lu,Ou);var Au=class extends ku{render(){let t=c.t({message:"Upward arrow",id:"icon.title.chevron-up",comment:"Title for chevron-up icon"});return $u`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-up-16-part">${Eu(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M2.5 11 8 5.5l5.5 5.5"></path></svg>`}};customElements.get("w-icon-chevron-up-16")||customElements.define("w-icon-chevron-up-16",Au);import{css as Du}from"lit";var en=Du`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.t4{font-weight:700;font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-left{text-align:left}.align-middle{vertical-align:middle}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.will-change-height{will-change:height}.border-0{border-width:0}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-l-0{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-0{border-top-right-radius:0;border-bottom-right-radius:0}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:underline:hover{text-decoration-line:underline}.focus-visible\\:underline:focus-visible{text-decoration-line:underline}.overflow-hidden{overflow:hidden}.focus\\:outline-none:focus{outline-offset:2px;outline:2px solid #0000}.items-center{align-items:center}.justify-between{justify-content:space-between}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-info-subtle{background-color:var(--w-s-color-background-info-subtle)}.hover\\:s-bg-hover:hover{background-color:var(--w-s-color-background-hover)}.active\\:s-bg-active:active{background-color:var(--w-s-color-background-active)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-border{border-color:var(--w-s-color-border)}.s-surface-sunken{background-color:var(--w-s-color-surface-sunken)}.h-0{height:0}.w-full{width:100%}.m-0{margin:0}.-mx-16{margin-left:-1.6rem;margin-right:-1.6rem}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-8{margin-left:.8rem}.p-16{padding:1.6rem}.px-0{padding-left:0;padding-right:0}.py-0{padding-top:0;padding-bottom:0}.pt-0{padding-top:0}.invisible{visibility:hidden}.break-words{overflow-wrap:break-word}.cursor-pointer{cursor:pointer}.-rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:-rotate-180::part(w-icon-chevron-down-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:-180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.rotate-180{--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:rotate-180::part(w-icon-chevron-up-16-part){--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-rotate:180deg;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform::part(w-icon-chevron-down-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform::part(w-icon-chevron-up-16-part){transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-down-16-part\\]\\:transform-gpu::part(w-icon-chevron-down-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.part-\\[w-icon-chevron-up-16-part\\]\\:transform-gpu::part(w-icon-chevron-up-16-part){transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:transition-transform::part(w-icon-chevron-down-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:transition-transform::part(w-icon-chevron-up-16-part){transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-down-16-part\\]\\:ease-in-out::part(w-icon-chevron-down-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}.part-\\[w-icon-chevron-up-16-part\\]\\:ease-in-out::part(w-icon-chevron-up-16-part){transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:rounded-8{border-radius:8px}.sm\\:mx-0{margin-left:0;margin-right:0}}`;var Vu={base:"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:"s-bg-info-subtle",neutral:"s-surface-sunken",bordered:"border-2 s-border s-bg"},ee={wrapper:"will-change-height s-text",box:"s-surface-sunken hover:s-bg-hover active:s-bg-active py-0 px-0 group block relative break-words last-child:mb-0 rounded-8",bleed:"-mx-16 rounded-l-0 rounded-r-0 sm:mx-0 sm:rounded-8",chevron:"inline-block align-middle s-icon",chevronNonBox:"ml-8",chevronTransform:"transform transition-transform transform-gpu ease-in-out",chevronExpand:"-rotate-180",chevronCollapse:"rotate-180",elementsChevronDownTransform:"part-[w-icon-chevron-down-16-part]:transform part-[w-icon-chevron-down-16-part]:transition-transform part-[w-icon-chevron-down-16-part]:transform-gpu part-[w-icon-chevron-down-16-part]:ease-in-out",elementsChevronUpTransform:"part-[w-icon-chevron-up-16-part]:transform part-[w-icon-chevron-up-16-part]:transition-transform part-[w-icon-chevron-up-16-part]:transform-gpu part-[w-icon-chevron-up-16-part]:ease-in-out",elementsChevronExpand:"part-[w-icon-chevron-down-16-part]:-rotate-180",elementsChevronCollapse:"part-[w-icon-chevron-up-16-part]:rotate-180",expansion:"overflow-hidden",expansionNotExpanded:"h-0 invisible",button:"focus:outline-none appearance-none cursor-pointer bg-transparent border-0 m-0 hover:underline focus-visible:underline",buttonBox:"w-full text-left relative inline-flex items-center justify-between group relative break-words last-child:mb-0 p-16 rounded-8",contentWithTitle:"pt-0",title:"flex w-full justify-between items-center",titleType:"t4"},ce,tn,rn,on,an,nn,sn,oe=class extends Pu{constructor(){super(...arguments);Oe(this,ce);this.expanded=!1;this.box=!1;this.bleed=!1;this.noChevron=!1;this.animated=!1;this._hasTitle=!0;this._showChevronUp=!1}updated(r){r.has("expanded")&&setTimeout(()=>{this._showChevronUp=this.expanded},200)}firstUpdated(){var a;let r=!!this.title,o=((a=this.renderRoot.querySelector("slot[name='title']"))==null?void 0:a.assignedNodes().length)>0;this._hasTitle=r||o}get _expandableSlot(){return Ne`<div class="${R(this,ce,nn)}">
|
|
2606
3710
|
<slot></slot>
|
|
2607
|
-
</div>`}render(){return
|
|
2608
|
-
${this._hasTitle?
|
|
3711
|
+
</div>`}render(){return Ne` <div class="${R(this,ce,tn)}">
|
|
3712
|
+
${this._hasTitle?Ne`<w-unstyled-heading level=${this.headingLevel}>
|
|
2609
3713
|
<button
|
|
2610
3714
|
type="button"
|
|
2611
3715
|
aria-expanded="${this.expanded}"
|
|
2612
|
-
class="${
|
|
3716
|
+
class="${R(this,ce,rn)}"
|
|
2613
3717
|
@click=${()=>this.expanded=!this.expanded}>
|
|
2614
|
-
<div class="${
|
|
2615
|
-
${this.title?
|
|
2616
|
-
${this.noChevron?"":
|
|
3718
|
+
<div class="${ee.title}">
|
|
3719
|
+
${this.title?Ne`<span class="${ee.titleType}">${this.title}</span>`:Ne`<slot name="title"></slot>`}
|
|
3720
|
+
${this.noChevron?"":Ne`<div class="${R(this,ce,on)}">${R(this,ce,an)}</div>`}
|
|
2617
3721
|
</div>
|
|
2618
3722
|
</button>
|
|
2619
3723
|
</w-unstyled-heading>`:""}
|
|
2620
|
-
${this.animated?
|
|
3724
|
+
${this.animated?Ne`<w-expand-transition ?show=${this.expanded}> ${this._expandableSlot} </w-expand-transition>`:Ne`<div class="${R(this,ce,sn)}" aria-hidden=${Ru(this.expanded?void 0:!0)}>
|
|
2621
3725
|
${this._expandableSlot}
|
|
2622
3726
|
</div>`}
|
|
2623
|
-
</div>`}};
|
|
3727
|
+
</div>`}};ce=new WeakSet,tn=function(){return w([ee.wrapper,this.box&&ee.box,this.bleed&&ee.bleed])},rn=function(){return w(this.buttonClass,[ee.button,this.box&&ee.buttonBox])},on=function(){return w([ee.chevron,!this.box&&ee.chevronNonBox])},an=function(){let r=w([ee.elementsChevronUpTransform,!this.expanded&&this._showChevronUp&&ee.elementsChevronCollapse]),o=w([ee.elementsChevronDownTransform,this.expanded&&!this._showChevronUp&&ee.elementsChevronExpand]);return this._showChevronUp?Ne`<w-icon-chevron-up-16 class="${r}"></w-icon-chevron-up-16>`:Ne`<w-icon-chevron-down-16 class="${o}"></w-icon-chevron-down-16>`},nn=function(){return w(this.contentClass,[this.box&&Vu.base,this._hasTitle&&this.box&&ee.contentWithTitle])},sn=function(){return w([ee.expansion,!this.expanded&&ee.expansionNotExpanded])},oe.styles=[E,en,Bu`
|
|
2624
3728
|
:host {
|
|
2625
3729
|
display: block;
|
|
2626
3730
|
}
|
|
2627
3731
|
::slotted(:last-child) {
|
|
2628
3732
|
margin-bottom: 0px !important;
|
|
2629
3733
|
}
|
|
2630
|
-
`],s([
|
|
3734
|
+
`],s([Ee({type:Boolean,reflect:!0})],oe.prototype,"expanded",2),s([Ee({type:String})],oe.prototype,"title",2),s([Ee({type:Boolean})],oe.prototype,"box",2),s([Ee({type:Boolean})],oe.prototype,"bleed",2),s([Ee({attribute:"button-class",type:String})],oe.prototype,"buttonClass",2),s([Ee({attribute:"content-class",type:String})],oe.prototype,"contentClass",2),s([Ee({attribute:"no-chevron",type:Boolean})],oe.prototype,"noChevron",2),s([Ee({type:Boolean})],oe.prototype,"animated",2),s([Ee({attribute:"heading-level",type:Number})],oe.prototype,"headingLevel",2),s([Ee({type:Boolean,state:!0})],oe.prototype,"_hasTitle",2),s([Ee({type:Boolean,state:!0})],oe.prototype,"_showChevronUp",2);customElements.get("w-expandable")||customElements.define("w-expandable",oe);import{html as Iu,css as Fu,LitElement as ju}from"lit";var Rt=t=>class extends t{constructor(){super(...arguments);this.patchClose=!0;this._close=null}close(){this._close()}},Vt=t=>class extends t{handleSlotChange(e){let r=e.target.assignedNodes({flatten:!0});for(let o of r.filter(a=>a.patchClose))o._close=()=>this.close()}};var It=class extends Rt(Vt(ju)){render(){return Iu`
|
|
2631
3735
|
<div class="footer">
|
|
2632
3736
|
<slot @slotchange="${this.handleSlotChange}"></slot>
|
|
2633
3737
|
</div>
|
|
2634
|
-
`}};It.styles=[
|
|
3738
|
+
`}};It.styles=[E,Fu`
|
|
2635
3739
|
.footer {
|
|
2636
3740
|
display: flex;
|
|
2637
3741
|
flex-shrink: 0;
|
|
@@ -2646,7 +3750,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2646
3750
|
padding-right: 3.2rem;
|
|
2647
3751
|
}
|
|
2648
3752
|
}
|
|
2649
|
-
`];customElements.get("w-modal-footer")||customElements.define("w-modal-footer",It);import{css as
|
|
3753
|
+
`];customElements.get("w-modal-footer")||customElements.define("w-modal-footer",It);import{css as op,html as go,LitElement as ap,nothing as wn}from"lit";var ln=(t,e)=>({dx:t.left-e.left,dy:t.top-e.top,dw:t.width/e.width,dh:t.height/e.height,first:t,last:e}),cn=({dx:t,dy:e})=>[{transform:`translate(${t}px, ${e}px)`},{transform:"none"}],dn={easing:"ease",duration:300};var po=!1,Hu=typeof window!="undefined";if(Hu){let t=window.matchMedia("(prefers-reduced-motion: reduce)"),e=({matches:r})=>po=r;t.addEventListener&&t.addEventListener("change",e),e(t)}var $r=class{constructor(e,{animation:r={},keyframes:o,respectReduceMotion:a=!0}={}){Le(this,"first");Le(this,"last");Le(this,"el");this.el=e,this.first={},this.last={},this.userAnimationOptions=r,this.keyframeGenerator=o||cn,this.shouldReduceMotion=a}async when(e){this.prep();let r=await e();return await this.play(),r}prep(){this.first=this.el.getBoundingClientRect()}async play(){if(this.last=this.el.getBoundingClientRect(),!this.el.animate)return;await this.el.animate(this.keyframes,this.animationOptions).finished}get keyframes(){return this.keyframeGenerator(ln(this.first,this.last))}get defaults(){return dn}get mergedOptions(){return{...this.defaults,...this.userAnimationOptions}}get animationOptions(){return this.shouldReduceMotion?po?{...this.mergedOptions,duration:0}:this.mergedOptions:this.mergedOptions}};import{property as ho,query as ip,state as np}from"lit/decorators.js";import{LitElement as qu}from"lit";import{unsafeStatic as Ju,html as Uu}from"lit/static-html.js";var Yu=JSON.parse('{"icon.title.arrow-left":["Pil som peker mot venstre"]}'),Xu=JSON.parse('{"icon.title.arrow-left":["Leftward-pointing arrow"]}'),Qu=JSON.parse('{"icon.title.arrow-left":["Vasemmalle osoittava nuoli"]}'),Zu=JSON.parse('{"icon.title.arrow-left":["Pil til venstre"]}'),Ku=JSON.parse('{"icon.title.arrow-left":["Pil som pekar v\xE4nster"]}'),un=["en","nb","fi","da","sv"],pn="en",Gu=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},mn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":pn},mo=t=>un.find(e=>t===e||t.toLowerCase().includes(e))||mn();function Wu(){var t;if(typeof window=="undefined"){let e=Gu();return mo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=mn();return un.includes(e)?mo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),mo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),pn}}var ep=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,tp=(t,e,r,o,a)=>{let i=Wu(),n=ep(i,t,e,r,o,a);c.load(i,n),c.activate(i)};tp(Xu,Yu,Qu,Zu,Ku);var rp=class extends qu{render(){let t=c.t({message:"Leftward-pointing arrow",id:"icon.title.arrow-left",comment:"Title for table arrow left icon"});return Uu`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-arrow-left-16-part">${Ju(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-width="1.5" d="M5.222 8h6.667"></path><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7.444 11.75 4.111 8l3.333-3.75"></path></svg>`}};customElements.get("w-icon-arrow-left-16")||customElements.define("w-icon-arrow-left-16",rp);var gn=JSON.parse('{"modal.aria.back":["Tilbage"],"modal.aria.close":["Luk"]}');var hn=JSON.parse('{"modal.aria.back":["Back"],"modal.aria.close":["Close"]}');var fn=JSON.parse('{"modal.aria.back":["Takaisin"],"modal.aria.close":["Sulje"]}');var bn=JSON.parse('{"modal.aria.back":["Tilbake"],"modal.aria.close":["Lukk"]}');var vn=JSON.parse('{"modal.aria.back":["Tillbaka"],"modal.aria.close":["St\xE4ng"]}');var Ae=class extends Rt(ap){constructor(){super();this._hasTopContent=!1;I(hn,bn,fn,gn,vn)}render(){return go`
|
|
2650
3754
|
<div class="header">
|
|
2651
3755
|
<slot name="top" @slotchange=${this.handleTopSlotChange}></slot>
|
|
2652
3756
|
<div class="${this._hasTopContent?"":"header-title-bar"}">
|
|
@@ -2655,19 +3759,19 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2655
3759
|
${this.closeButton}
|
|
2656
3760
|
</div>
|
|
2657
3761
|
</div>
|
|
2658
|
-
`}async willUpdate(r){r.has("back")&&new
|
|
3762
|
+
`}async willUpdate(r){r.has("back")&&new $r(this.titleEl).when(async()=>{await this.updateComplete})}get titleClasses(){return["header-title",this.back?"header-title-with-back-button":"header-title-without-back-button",this._hasTopContent?"header-title-with-top-area":""].join(" ")}get backButton(){return this.back&&!this._hasTopContent?go`<button
|
|
2659
3763
|
type="button"
|
|
2660
3764
|
aria-label="${c._({id:"modal.aria.back",message:"Back",comment:"Aria label for the back button in modal"})}"
|
|
2661
3765
|
class="header-button header-button-left"
|
|
2662
3766
|
@click="${this.emitBack}">
|
|
2663
3767
|
<w-icon-arrow-left-16></w-icon-arrow-left-16>
|
|
2664
|
-
</button>`:
|
|
3768
|
+
</button>`:wn}get closeButton(){return this.noClose?wn:go`<button
|
|
2665
3769
|
type="button"
|
|
2666
3770
|
aria-label="${c._({id:"modal.aria.close",message:"Close",comment:"Aria label for the close button in modal"})}"
|
|
2667
3771
|
class="header-button ${this._hasTopContent?"header-close-button-on-image":"header-close-button"}"
|
|
2668
3772
|
@click="${this.close}">
|
|
2669
3773
|
<w-icon-close-16></w-icon-close-16>
|
|
2670
|
-
</button>`}emitBack(){this.dispatchEvent(new CustomEvent("backClicked",{bubbles:!0,composed:!0}))}handleTopSlotChange(r){let o=r.target.assignedElements({flatten:!0});this._hasTopContent=!!o.length}};Ae.styles=[
|
|
3774
|
+
</button>`}emitBack(){this.dispatchEvent(new CustomEvent("backClicked",{bubbles:!0,composed:!0}))}handleTopSlotChange(r){let o=r.target.assignedElements({flatten:!0});this._hasTopContent=!!o.length}};Ae.styles=[E,op`
|
|
2671
3775
|
.header {
|
|
2672
3776
|
position: relative;
|
|
2673
3777
|
padding-bottom: 0.8rem;
|
|
@@ -2780,7 +3884,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2780
3884
|
min-width: 32px;
|
|
2781
3885
|
}
|
|
2782
3886
|
}
|
|
2783
|
-
`],s([
|
|
3887
|
+
`],s([ho({type:String})],Ae.prototype,"title",2),s([ho({type:Boolean})],Ae.prototype,"back",2),s([ho({type:Boolean,attribute:"no-close"})],Ae.prototype,"noClose",2),s([np()],Ae.prototype,"_hasTopContent",2),s([ip(".title-el")],Ae.prototype,"titleEl",2);customElements.get("w-modal-header")||customElements.define("w-modal-header",Ae);import{css as bp,html as vp,LitElement as wp}from"lit";import{property as bo,query as vo}from"lit/decorators.js";var Ft=[],fo={documentElement:{},body:{}},sp=Object.freeze({documentElement:{"scrollbar-gutter":"stable"},body:{overflow:"hidden",position:"relative",height:"100%"}}),xn=t=>{var e;t.touches.length>1||((e=t.preventDefault)==null||e.call(t))},lp=t=>([e,r])=>{fo[t][e]=document[t].style[e],document[t].style[e]=r},cp=()=>Object.entries(sp).forEach(([t,e])=>{Object.entries(e).forEach(lp(t))}),dp=t=>([e,r])=>{document[t].style[e]=fo[t][e]},up=()=>Object.entries(fo).forEach(([t,e])=>{Object.entries(e).forEach(dp(t))}),pp=t=>t.scrollHeight-Math.abs(t.scrollTop)===t.clientHeight;function mp(t){let e=-1,r=o=>{if(o.targetTouches.length!==1)return;let a=o.targetTouches[0].clientY-e;return t.scrollTop===0&&a>0||pp(t)&&a<0?xn(o):(o.stopPropagation(),!0)};t.ontouchstart=o=>{o.targetTouches.length===1&&(e=o.targetTouches[0].clientY)},t.ontouchmove=r}function gp(t){t.ontouchstart=null,t.ontouchmove=null}var yn=t=>()=>document[t?"addEventListener":"removeEventListener"]("touchmove",xn,{passive:!1}),hp=yn(!0),fp=yn();function kn(t){if(!t)throw Error("Could not run setup, an element must be provided");Ft.some(e=>e===t)||(Ft.length||(cp(),hp()),mp(t),Ft.push(t))}function En(){Ft.forEach(gp),fp(),up(),Ft=[]}var $e=class extends Vt(wp){constructor(){super(),this.interceptEscape=this.interceptEscape.bind(this),this.closeOnBackdropClick=this.closeOnBackdropClick.bind(this),this.eventPreventer=this.eventPreventer.bind(this),this.modifyBorderRadius=this.modifyBorderRadius.bind(this)}async open(){this.dialogEl.showModal(),this.handleListeners(),kn(this.contentEl),await this.updateComplete,this.dispatchEvent(new CustomEvent("shown",{bubbles:!0,composed:!0}))}close(){this.handleListeners("removeEventListener"),this.dialogEl.classList.add("close"),this.dialogEl.addEventListener("animationend",async()=>{this.dialogEl.classList.remove("close"),this.dialogEl.close(),En(),await this.updateComplete,this.dispatchEvent(new CustomEvent("hidden",{bubbles:!0,composed:!0}))},{once:!0})}render(){return vp`
|
|
2784
3888
|
<dialog class="dialog-el">
|
|
2785
3889
|
<div class="dialog-inner-el">
|
|
2786
3890
|
<slot name="header" @slotchange="${this.handleSlotChange}"></slot>
|
|
@@ -2790,7 +3894,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2790
3894
|
<slot name="footer" @slotchange="${this.handleSlotChange}"></slot>
|
|
2791
3895
|
</div>
|
|
2792
3896
|
</dialog>
|
|
2793
|
-
`}updated(e){e.has("show")&&this[this.show?"open":"close"]()}handleListeners(e="addEventListener"){document[e]("keydown",this.interceptEscape),this.ignoreBackdropClicks||this.dialogEl[e]("mousedown",this.closeOnBackdropClick),this.dialogEl[e]("close",this.eventPreventer),this.dialogEl[e]("cancel",this.eventPreventer),this.dialogInnerEl[e]("transitionend",this.modifyBorderRadius)}eventPreventer(e){e.preventDefault()}closeOnBackdropClick(e){this.dialogEl===e.target&&this.close()}interceptEscape(e){e.key==="Escape"&&(e.preventDefault(),this.close())}modifyBorderRadius(){this.dialogInnerEl.scrollHeight*1.02>innerHeight?this.dialogInnerEl.style.borderRadius="0px":this.dialogInnerEl.style.borderRadius=null}}
|
|
3897
|
+
`}updated(e){e.has("show")&&this[this.show?"open":"close"]()}handleListeners(e="addEventListener"){document[e]("keydown",this.interceptEscape),this.ignoreBackdropClicks||this.dialogEl[e]("mousedown",this.closeOnBackdropClick),this.dialogEl[e]("close",this.eventPreventer),this.dialogEl[e]("cancel",this.eventPreventer),this.dialogInnerEl[e]("transitionend",this.modifyBorderRadius)}eventPreventer(e){e.preventDefault()}closeOnBackdropClick(e){this.dialogEl===e.target&&this.close()}interceptEscape(e){e.key==="Escape"&&(e.preventDefault(),this.close())}modifyBorderRadius(){this.dialogInnerEl.scrollHeight*1.02>innerHeight?this.dialogInnerEl.style.borderRadius="0px":this.dialogInnerEl.style.borderRadius=null}};$e.styles=[E,bp`
|
|
2794
3898
|
.dialog-el {
|
|
2795
3899
|
--w-modal-translate-distance: 100%;
|
|
2796
3900
|
--w-modal-max-height: 80%;
|
|
@@ -2911,7 +4015,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2911
4015
|
background: transparent;
|
|
2912
4016
|
}
|
|
2913
4017
|
}
|
|
2914
|
-
`],s([bo({type:Boolean})]
|
|
4018
|
+
`],s([bo({type:Boolean})],$e.prototype,"show",2),s([bo({type:String,attribute:"content-id"})],$e.prototype,"contentId",2),s([bo({type:Boolean,attribute:"ignore-backdrop-clicks"})],$e.prototype,"ignoreBackdropClicks",2),s([vo(".dialog-el")],$e.prototype,"dialogEl",2),s([vo(".dialog-inner-el")],$e.prototype,"dialogInnerEl",2),s([vo(".content-el")],$e.prototype,"contentEl",2);customElements.get("w-modal")||customElements.define("w-modal",$e);import{html as Cn,LitElement as yp}from"lit";import{property as _n}from"lit/decorators.js";import{classMap as kp}from"lit/directives/class-map.js";import{map as Ep}from"lit/directives/map.js";import{range as $p}from"lit/directives/range.js";import{css as xp}from"lit";var $n=xp`
|
|
2915
4019
|
.w-pageindicator {
|
|
2916
4020
|
display: grid;
|
|
2917
4021
|
justify-content: center;
|
|
@@ -2935,13 +4039,13 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2935
4039
|
.w-pageindicator--selecteddot {
|
|
2936
4040
|
background-color: var(--w-s-color-icon-selected);
|
|
2937
4041
|
}
|
|
2938
|
-
`;var
|
|
4042
|
+
`;var vt=class extends yp{constructor(){super(...arguments);this.selectedPage=1;this.pageCount=1}render(){return Cn`
|
|
2939
4043
|
<div class="w-pageindicator">
|
|
2940
4044
|
<div class="w-pageindicator--container">
|
|
2941
|
-
${
|
|
4045
|
+
${Ep($p(this.pageCount),r=>{let a={"w-pageindicator--dot":!0,"w-pageindicator--selecteddot":r===this.selectedPage-1};return Cn`<div class="${kp(a)}"></div>`})}
|
|
2942
4046
|
</div>
|
|
2943
4047
|
</div>
|
|
2944
|
-
`}};wt.styles=[un],s([mn({type:Number,attribute:"selected-page"})],wt.prototype,"selectedPage",2),s([mn({type:Number,attribute:"page-count"})],wt.prototype,"pageCount",2);customElements.get("w-pageindicator")||customElements.define("w-pageindicator",wt);import{html as jt,LitElement as Hp,nothing as xo}from"lit";import{property as _r}from"lit/decorators.js";import{LitElement as op}from"lit";import{unsafeStatic as ip,html as ap}from"lit/static-html.js";var np=JSON.parse('{"icon.title.chevron-double-left":["Dobbel pil til venstre"]}'),sp=JSON.parse('{"icon.title.chevron-double-left":["Double leftward arrow"]}'),lp=JSON.parse('{"icon.title.chevron-double-left":["Kaksi nuolta vasemmalle"]}'),cp=JSON.parse('{"icon.title.chevron-double-left":["Dobbelt venstrepil"]}'),dp=JSON.parse('{"icon.title.chevron-double-left":["Dubbel v\xE4nsterpil"]}'),hn=["en","nb","fi","da","sv"],bn="en",up=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},gn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":bn},fo=t=>hn.find(e=>t===e||t.toLowerCase().includes(e))||gn();function pp(){var t;if(typeof window=="undefined"){let e=up();return fo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=gn();return hn.includes(e)?fo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),fo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),bn}}var mp=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,hp=(t,e,r,o,i)=>{let a=pp(),n=mp(a,t,e,r,o,i);c.load(a,n),c.activate(a)};hp(sp,np,lp,cp,dp);var bp=class extends op{render(){let t=c.t({message:"Double leftward arrow",id:"icon.title.chevron-double-left",comment:"Title for chevron-double-left icon"});return ap`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-double-left-16-part">${ip(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 13 2 8l5-5m7 10L9 8l5-5"></path></svg>`}};customElements.get("w-icon-chevron-double-left-16")||customElements.define("w-icon-chevron-double-left-16",bp);import{LitElement as gp}from"lit";import{unsafeStatic as fp,html as vp}from"lit/static-html.js";var wp=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),xp=JSON.parse('{"icon.title.chevron-left":["Leftward arrow"]}'),yp=JSON.parse('{"icon.title.chevron-left":["Nuoli vasemmalle"]}'),kp=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),$p=JSON.parse('{"icon.title.chevron-left":["Pil v\xE4nster"]}'),fn=["en","nb","fi","da","sv"],vn="en",Ep=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},wn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":vn},vo=t=>fn.find(e=>t===e||t.toLowerCase().includes(e))||wn();function Cp(){var t;if(typeof window=="undefined"){let e=Ep();return vo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=wn();return fn.includes(e)?vo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),vo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),vn}}var Sp=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,_p=(t,e,r,o,i)=>{let a=Cp(),n=Sp(a,t,e,r,o,i);c.load(a,n),c.activate(a)};_p(xp,wp,yp,kp,$p);var Lp=class extends gp{render(){let t=c.t({message:"Leftward arrow",id:"icon.title.chevron-left",comment:"Title for chevron-left icon"});return vp`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-left-16-part">${fp(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.5 13.75 5 8.25l5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-left-16")||customElements.define("w-icon-chevron-left-16",Lp);import{LitElement as Op}from"lit";import{unsafeStatic as Tp,html as Np}from"lit/static-html.js";var Mp=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8yre"]}'),Dp=JSON.parse('{"icon.title.chevron-right":["Rightward arrow"]}'),Ap=JSON.parse('{"icon.title.chevron-right":["Nuoli oikealle"]}'),zp=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8jre"]}'),Bp=JSON.parse('{"icon.title.chevron-right":["Pil h\xF6ger"]}'),xn=["en","nb","fi","da","sv"],yn="en",Pp=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},kn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":yn},wo=t=>xn.find(e=>t===e||t.toLowerCase().includes(e))||kn();function Rp(){var t;if(typeof window=="undefined"){let e=Pp();return wo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=kn();return xn.includes(e)?wo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),wo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),yn}}var Vp=(t,e,r,o,i,a)=>t==="nb"?r:t==="fi"?o:t==="da"?i:t==="sv"?a:e,Ip=(t,e,r,o,i)=>{let a=Rp(),n=Vp(a,t,e,r,o,i);c.load(a,n),c.activate(a)};Ip(Dp,Mp,Ap,zp,Bp);var Fp=class extends Op{render(){let t=c.t({message:"Rightward arrow",id:"icon.title.chevron-right",comment:"Title for chevron-right icon"});return Np`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-right-16-part">${Tp(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m5.5 13.75 5.5-5.5-5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-right-16")||customElements.define("w-icon-chevron-right-16",Fp);var $n=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE6ste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var En=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"]}');var Cn=JSON.parse('{"pagination.aria.first-page":["Ensimm\xE4inen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"]}');var Sn=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var _n=JSON.parse('{"pagination.aria.first-page":["F\xF6rsta sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE4sta sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["F\xF6reg\xE5ende sida"]}');import{css as jp}from"lit";var Ln=jp`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:no-underline:hover,.focus\\:no-underline:focus{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:block{display:block}}`;var yo=c._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),Lr="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding",Or,On,Ke=class extends Hp{constructor(){super();Oe(this,Or);this.currentPageNumber=1;this.visiblePages=7;G(En,Sn,Cn,$n,_n)}get shouldShowShowFirstPageButton(){return this.currentPageNumber-2>0}get shouldShowPreviousPageButton(){return this.currentPageNumber-1>0}get shouldShowNextPageButton(){return this.currentPageNumber<this.pages}get currentPageIndex(){return this.currentPageNumber-1}get visiblePageNumbers(){if(this.pages<=this.visiblePages)return Array.from({length:this.pages},(a,n)=>n+1);let r=Math.floor(this.visiblePages/2),o=Math.max(1,this.currentPageNumber-r),i=Math.min(this.pages,o+this.visiblePages-1);return i-o+1<this.visiblePages&&(o=Math.max(1,i-this.visiblePages+1)),Array.from({length:i-o+1},(a,n)=>o+n)}render(){let r=this.visiblePageNumbers;return jt`<nav class="flex items-center justify-center p-8" @click="${zo(this,Or,On)}">
|
|
4048
|
+
`}};vt.styles=[$n],s([_n({type:Number,attribute:"selected-page"})],vt.prototype,"selectedPage",2),s([_n({type:Number,attribute:"page-count"})],vt.prototype,"pageCount",2);customElements.get("w-pageindicator")||customElements.define("w-pageindicator",vt);import{html as jt,LitElement as um,nothing as ko}from"lit";import{property as Cr}from"lit/decorators.js";import{LitElement as Cp}from"lit";import{unsafeStatic as _p,html as Sp}from"lit/static-html.js";var Lp=JSON.parse('{"icon.title.chevron-double-left":["Dobbel pil til venstre"]}'),Op=JSON.parse('{"icon.title.chevron-double-left":["Double leftward arrow"]}'),Tp=JSON.parse('{"icon.title.chevron-double-left":["Kaksi nuolta vasemmalle"]}'),zp=JSON.parse('{"icon.title.chevron-double-left":["Dobbelt venstrepil"]}'),Mp=JSON.parse('{"icon.title.chevron-double-left":["Dubbel v\xE4nsterpil"]}'),Sn=["en","nb","fi","da","sv"],Ln="en",Np=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},On=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":Ln},wo=t=>Sn.find(e=>t===e||t.toLowerCase().includes(e))||On();function Ap(){var t;if(typeof window=="undefined"){let e=Np();return wo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=On();return Sn.includes(e)?wo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),wo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),Ln}}var Dp=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Bp=(t,e,r,o,a)=>{let i=Ap(),n=Dp(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Bp(Op,Lp,Tp,zp,Mp);var Pp=class extends Cp{render(){let t=c.t({message:"Double leftward arrow",id:"icon.title.chevron-double-left",comment:"Title for chevron-double-left icon"});return Sp`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-double-left-16-part">${_p(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M7 13 2 8l5-5m7 10L9 8l5-5"></path></svg>`}};customElements.get("w-icon-chevron-double-left-16")||customElements.define("w-icon-chevron-double-left-16",Pp);import{LitElement as Rp}from"lit";import{unsafeStatic as Vp,html as Ip}from"lit/static-html.js";var Fp=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),jp=JSON.parse('{"icon.title.chevron-left":["Leftward arrow"]}'),Hp=JSON.parse('{"icon.title.chevron-left":["Nuoli vasemmalle"]}'),qp=JSON.parse('{"icon.title.chevron-left":["Pil til venstre"]}'),Jp=JSON.parse('{"icon.title.chevron-left":["Pil v\xE4nster"]}'),Tn=["en","nb","fi","da","sv"],zn="en",Up=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Mn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":zn},xo=t=>Tn.find(e=>t===e||t.toLowerCase().includes(e))||Mn();function Yp(){var t;if(typeof window=="undefined"){let e=Up();return xo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Mn();return Tn.includes(e)?xo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),xo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),zn}}var Xp=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Qp=(t,e,r,o,a)=>{let i=Yp(),n=Xp(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Qp(jp,Fp,Hp,qp,Jp);var Zp=class extends Rp{render(){let t=c.t({message:"Leftward arrow",id:"icon.title.chevron-left",comment:"Title for chevron-left icon"});return Ip`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-left-16-part">${Vp(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M10.5 13.75 5 8.25l5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-left-16")||customElements.define("w-icon-chevron-left-16",Zp);import{LitElement as Kp}from"lit";import{unsafeStatic as Gp,html as Wp}from"lit/static-html.js";var em=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8yre"]}'),tm=JSON.parse('{"icon.title.chevron-right":["Rightward arrow"]}'),rm=JSON.parse('{"icon.title.chevron-right":["Nuoli oikealle"]}'),om=JSON.parse('{"icon.title.chevron-right":["Pil til h\xF8jre"]}'),am=JSON.parse('{"icon.title.chevron-right":["Pil h\xF6ger"]}'),Nn=["en","nb","fi","da","sv"],An="en",im=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},Dn=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":An},yo=t=>Nn.find(e=>t===e||t.toLowerCase().includes(e))||Dn();function nm(){var t;if(typeof window=="undefined"){let e=im();return yo(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=Dn();return Nn.includes(e)?yo(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),yo(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),An}}var sm=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,lm=(t,e,r,o,a)=>{let i=nm(),n=sm(i,t,e,r,o,a);c.load(i,n),c.activate(i)};lm(tm,em,rm,om,am);var cm=class extends Kp{render(){let t=c.t({message:"Rightward arrow",id:"icon.title.chevron-right",comment:"Title for chevron-right icon"});return Wp`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-chevron-right-16-part">${Gp(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="m5.5 13.75 5.5-5.5-5.5-5.5"></path></svg>`}};customElements.get("w-icon-chevron-right-16")||customElements.define("w-icon-chevron-right-16",cm);var Bn=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE6ste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var Pn=JSON.parse('{"pagination.aria.first-page":["First page"],"pagination.aria.icon-suffix":["icon"],"pagination.aria.next-page":["Next page"],"pagination.aria.page":["Page ",["currentPage"]],"pagination.aria.pagination":["Pages"],"pagination.aria.prev-page":["Previous page"]}');var Rn=JSON.parse('{"pagination.aria.first-page":["Ensimm\xE4inen sivu"],"pagination.aria.icon-suffix":["kuvake"],"pagination.aria.next-page":["Seuraava sivu"],"pagination.aria.page":["Sivu ",["currentPage"]],"pagination.aria.pagination":["Sivut"],"pagination.aria.prev-page":["Edellinen sivu"]}');var Vn=JSON.parse('{"pagination.aria.first-page":["F\xF8rste side"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["Neste side"],"pagination.aria.page":["Side ",["currentPage"]],"pagination.aria.pagination":["Sider"],"pagination.aria.prev-page":["Forrige side"]}');var In=JSON.parse('{"pagination.aria.first-page":["F\xF6rsta sidan"],"pagination.aria.icon-suffix":["ikon"],"pagination.aria.next-page":["N\xE4sta sida"],"pagination.aria.page":["Sida ",["currentPage"]],"pagination.aria.pagination":["Sidor"],"pagination.aria.prev-page":["F\xF6reg\xE5ende sida"]}');import{css as dm}from"lit";var Fn=dm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:no-underline:hover,.focus\\:no-underline:focus{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:768px){.md\\:block{display:block}}`;var Eo=c._({id:"pagination.aria.icon-suffix",message:"icon",comment:"Suffix added at the end of icon titles when img semantics are lost on an html element"}),_r="hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding",Sr,jn,Ke=class extends um{constructor(){super();Oe(this,Sr);this.currentPageNumber=1;this.visiblePages=7;I(Pn,Vn,Rn,Bn,In)}get shouldShowShowFirstPageButton(){return this.currentPageNumber-2>0}get shouldShowPreviousPageButton(){return this.currentPageNumber-1>0}get shouldShowNextPageButton(){return this.currentPageNumber<this.pages}get currentPageIndex(){return this.currentPageNumber-1}get visiblePageNumbers(){if(this.pages<=this.visiblePages)return Array.from({length:this.pages},(i,n)=>n+1);let r=Math.floor(this.visiblePages/2),o=Math.max(1,this.currentPageNumber-r),a=Math.min(this.pages,o+this.visiblePages-1);return a-o+1<this.visiblePages&&(o=Math.max(1,a-this.visiblePages+1)),Array.from({length:a-o+1},(i,n)=>o+n)}render(){let r=this.visiblePageNumbers;return jt`<nav class="flex items-center justify-center p-8" @click="${Uo(this,Sr,jn)}">
|
|
2945
4049
|
<h1 class="sr-only">
|
|
2946
4050
|
${c._({id:"pagination.aria.pagination",message:"Pages",comment:"Default screenreader message for pagination container in the pagination component"})}
|
|
2947
4051
|
</h1>
|
|
@@ -2949,60 +4053,60 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
2949
4053
|
${this.shouldShowShowFirstPageButton?jt`<a
|
|
2950
4054
|
data-page-number="1"
|
|
2951
4055
|
href="${this.baseUrl}1"
|
|
2952
|
-
class="${
|
|
4056
|
+
class="${_r+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2953
4057
|
<span class="sr-only"
|
|
2954
4058
|
>${c._({id:"pagination.aria.first-page",message:"First page",comment:"Default screenreader message for first page link in the pagination component"})},</span
|
|
2955
4059
|
>
|
|
2956
4060
|
<w-icon-chevron-double-left-16></w-icon-chevron-double-left-16>
|
|
2957
|
-
<span class="sr-only">${
|
|
2958
|
-
</a>`:
|
|
4061
|
+
<span class="sr-only">${Eo}</span>
|
|
4062
|
+
</a>`:ko}
|
|
2959
4063
|
${this.shouldShowPreviousPageButton?jt`<a
|
|
2960
4064
|
data-page-number="${this.currentPageNumber-1}"
|
|
2961
4065
|
href="${this.baseUrl}${this.currentPageNumber-1}"
|
|
2962
|
-
class="${
|
|
4066
|
+
class="${_r+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2963
4067
|
<span class="sr-only"
|
|
2964
4068
|
>${c._({id:"pagination.aria.prev-page",message:"Previous page",comment:"Default screenreader message for previous page link in the pagination component"})},</span
|
|
2965
4069
|
>
|
|
2966
4070
|
<w-icon-chevron-left-16></w-icon-chevron-left-16>
|
|
2967
|
-
<span class="sr-only">${
|
|
2968
|
-
</a>`:
|
|
2969
|
-
${r.map(o=>{let
|
|
4071
|
+
<span class="sr-only">${Eo}</span>
|
|
4072
|
+
</a>`:ko}
|
|
4073
|
+
${r.map(o=>{let a=o===this.currentPageNumber,i=`${this.baseUrl}${o}`,n=_r;a?n+=" s-bg-primary s-text-inverted":n+=" hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]";let l=c._({id:"pagination.aria.page",message:"Page {currentPage}",values:{currentPage:o},comment:"Default screenreader message for page link in the pagination component"});return jt`<a
|
|
2970
4074
|
data-page-number="${o}"
|
|
2971
4075
|
aria-label="${l}"
|
|
2972
|
-
href="${
|
|
4076
|
+
href="${i}"
|
|
2973
4077
|
class="${n}"
|
|
2974
|
-
aria-current="${
|
|
4078
|
+
aria-current="${a?"page":""}"
|
|
2975
4079
|
>${o}</a
|
|
2976
4080
|
>`})}
|
|
2977
4081
|
${this.shouldShowNextPageButton?jt`<a
|
|
2978
4082
|
data-page-number="${this.currentPageNumber+1}"
|
|
2979
4083
|
href="${this.baseUrl}${this.currentPageNumber+1}"
|
|
2980
|
-
class="${
|
|
4084
|
+
class="${_r+" s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]"}">
|
|
2981
4085
|
<span class="sr-only">
|
|
2982
4086
|
${c._({id:"pagination.aria.next-page",message:"Next page",comment:"Default screenreader message for next page link in the pagination component"})},</span
|
|
2983
4087
|
>
|
|
2984
4088
|
<w-icon-chevron-right-16></w-icon-chevron-right-16>
|
|
2985
|
-
<span class="sr-only">${
|
|
2986
|
-
</a>`:
|
|
4089
|
+
<span class="sr-only">${Eo}</span>
|
|
4090
|
+
</a>`:ko}
|
|
2987
4091
|
</div>
|
|
2988
|
-
</nav>`}};
|
|
2989
|
-
<div class="${
|
|
4092
|
+
</nav>`}};Sr=new WeakSet,jn=function(r){let o=r.target.getAttribute("data-page-number");this.dispatchEvent(new CustomEvent("page-click",{detail:{clickedPage:o},bubbles:!0,composed:!0}))},Ke.styles=[E,Fn],s([Cr({type:String,reflect:!0,attribute:"base-url"})],Ke.prototype,"baseUrl",2),s([Cr({type:Number,reflect:!0})],Ke.prototype,"pages",2),s([Cr({type:Number,reflect:!0,attribute:"current-page"})],Ke.prototype,"currentPageNumber",2),s([Cr({type:Number,reflect:!0,attribute:"visible-pages"})],Ke.prototype,"visiblePages",2);customElements.get("w-pagination")||customElements.define("w-pagination",Ke);import{html as Qn,LitElement as mm}from"lit";import{property as wt}from"lit/decorators.js";var Hn=JSON.parse('{"pill.aria.openFilter":["\xC5bn filter"],"pill.aria.removeFilter":["Fjern filter ",["label"]]}');var qn=JSON.parse('{"pill.aria.openFilter":["Open filter"],"pill.aria.removeFilter":["Remove filter ",["label"]]}');var Jn=JSON.parse('{"pill.aria.openFilter":["Avaa suodatin"],"pill.aria.removeFilter":["Tyhjenn\xE4 suodatin ",["label"]]}');var Un=JSON.parse('{"pill.aria.openFilter":["\xC5pne filter"],"pill.aria.removeFilter":["Fjern filter ",["label"]]}');var Yn=JSON.parse('{"pill.aria.openFilter":["\xD6ppna filter"],"pill.aria.removeFilter":["Ta bort filtret ",["label"]]}');import{css as pm}from"lit";var Xn=pm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-\\[--w-color-pill-suggestion-background\\]{background-color:var(--w-color-pill-suggestion-background)}.hover\\:bg-\\[--w-color-pill-suggestion-background-hover\\]:hover{background-color:var(--w-color-pill-suggestion-background-hover)}.active\\:bg-\\[--w-color-pill-suggestion-background-active\\]:active{background-color:var(--w-color-pill-suggestion-background-active)}.rounded-l-full{border-top-left-radius:9999px;border-bottom-left-radius:9999px}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.hover\\:s-bg-primary-hover:hover{background-color:var(--w-s-color-background-primary-hover)}.active\\:s-bg-primary-active:active{background-color:var(--w-s-color-background-primary-active)}.s-text{color:var(--w-s-color-text)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.h-16{height:1.6rem}.py-8{padding-top:.8rem;padding-bottom:.8rem}.pl-12{padding-left:1.2rem}.pl-4{padding-left:.4rem}.pr-12{padding-right:1.2rem}.pr-2{padding-right:.2rem}.font-bold{font-weight:700}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var de={wrapper:"flex items-center",button:"inline-flex items-center focusable text-xs transition-all",suggestion:"bg-[--w-color-pill-suggestion-background] hover:bg-[--w-color-pill-suggestion-background-hover] active:bg-[--w-color-pill-suggestion-background-active] s-text font-bold",filter:"s-bg-primary hover:s-bg-primary-hover active:s-bg-primary-active s-text-inverted",label:"pl-12 py-8 rounded-l-full",labelWithoutClose:"pr-12 rounded-r-full",labelWithClose:"pr-2",close:"pr-12 pl-4 py-8 rounded-r-full",closeIcon:"h-16",a11y:"sr-only"},De=class extends mm{constructor(){super(),I(qn,Un,Jn,Hn,Yn),this.canClose=!1,this.suggestion=!1,this.openFilterSrText=c._({id:"pill.aria.openFilter",message:"Open filter",comment:"Fallback screen reader message for open filter"}),this.removeFilterSrText=c._({id:"pill.aria.removeFilter",message:"Remove filter {label}",comment:"Fallback screen reader message for removal of the filter"})}get _labelClasses(){return w([de.button,de.label,this.suggestion?de.suggestion:de.filter,this.canClose?de.labelWithClose:de.labelWithoutClose])}get _closeClasses(){return w([de.button,de.close,this.suggestion?de.suggestion:de.filter])}_onClick(){this.dispatchEvent(new CustomEvent("w-pill-click",{bubbles:!0,composed:!0}))}_onClose(){this.dispatchEvent(new CustomEvent("w-pill-close",{bubbles:!0,composed:!0}))}connectedCallback(){super.connectedCallback(),this.openSrLabel&&(this.openAriaLabel=this.openSrLabel),this.closeSrLabel&&(this.closeAriaLabel=this.closeSrLabel)}render(){return Qn`
|
|
4093
|
+
<div class="${de.wrapper}">
|
|
2990
4094
|
<button type="button" class="${this._labelClasses}" @click="${this._onClick}">
|
|
2991
|
-
<span class="${
|
|
4095
|
+
<span class="${de.a11y}">${this.openAriaLabel?this.openAriaLabel:this.openFilterSrText}</span>
|
|
2992
4096
|
<slot></slot>
|
|
2993
4097
|
</button>
|
|
2994
|
-
${this.canClose?
|
|
2995
|
-
<span class="${
|
|
2996
|
-
<w-icon-close-16 class="${
|
|
4098
|
+
${this.canClose?Qn` <button type="button" class="${this._closeClasses}" @click="${this._onClose}">
|
|
4099
|
+
<span class="${de.a11y}">${this.closeAriaLabel?this.closeAriaLabel:this.removeFilterSrText}</span>
|
|
4100
|
+
<w-icon-close-16 class="${de.closeIcon}"></w-icon-close-16>
|
|
2997
4101
|
</button>`:null}
|
|
2998
4102
|
</div>
|
|
2999
|
-
`}};
|
|
4103
|
+
`}};De.styles=[E,Xn],s([wt({attribute:"can-close",type:Boolean})],De.prototype,"canClose",2),s([wt({attribute:"suggestion",type:Boolean})],De.prototype,"suggestion",2),s([wt({attribute:"open-sr-label",type:String})],De.prototype,"openSrLabel",2),s([wt({attribute:"open-aria-label",type:String})],De.prototype,"openAriaLabel",2),s([wt({attribute:"close-sr-label",type:String})],De.prototype,"closeSrLabel",2),s([wt({attribute:"close-aria-label",type:String})],De.prototype,"closeAriaLabel",2);customElements.get("w-pill")||customElements.define("w-pill",De);import{html as vm}from"lit";import{property as qt,state as es}from"lit/decorators.js";import{isServer as $o}from"lit";import{property as xt}from"lit/decorators.js";import{LitElement as hm,unsafeCSS as fm}from"lit";import{property as Kn}from"lit/decorators.js";var Zn={};var Ht,lt=class extends hm{constructor(){super();Oe(this,Ht,!1);this.initialReflectedProperties=new Map;this.customStates={set:(r,o)=>{var a;(a=this.internals)!=null&&a.states&&(o?this.internals.states.add(r):this.internals.states.delete(r))},has:r=>{var o;return(o=this.internals)!=null&&o.states?this.internals.states.has(r):!1}};try{this.internals=this.attachInternals()}catch(o){console.error("Element internals are not supported in your browser. Consider using a polyfill")}this.customStates.set("wa-defined",!0);let r=this.constructor;for(let[o,a]of r.elementProperties)a.default==="inherit"&&a.initial!==void 0&&typeof o=="string"&&this.customStates.set(`initial-${o}-${a.initial}`,!0)}static get styles(){let r=Array.isArray(this.css)?this.css:this.css?[this.css]:[];return[Zn,...r].map(o=>typeof o=="string"?fm(o):o)}attributeChangedCallback(r,o,a){R(this,Ht)||(this.constructor.elementProperties.forEach((i,n)=>{i.reflect&&this[n]!=null&&this.initialReflectedProperties.set(n,this[n])}),Jo(this,Ht,!0)),super.attributeChangedCallback(r,o,a)}willUpdate(r){super.willUpdate(r),this.initialReflectedProperties.forEach((o,a)=>{r.has(a)&&this[a]==null&&(this[a]=o)})}relayNativeEvent(r,o){r.stopImmediatePropagation(),this.dispatchEvent(new r.constructor(r.type,{...r,...o}))}};Ht=new WeakMap,s([Kn()],lt.prototype,"dir",2),s([Kn()],lt.prototype,"lang",2);var Gn=()=>({observedAttributes:["custom-error"],checkValidity(t){let e={message:"",isValid:!0,invalidKeys:[]};return t.customError&&(e.message=t.customError,e.isValid=!1,e.invalidKeys=["customError"]),e}});var Lr=class extends Event{constructor(){super("w-invalid",{bubbles:!0,cancelable:!1,composed:!0})}};var K=class extends lt{constructor(){super();this.name=null;this.disabled=!1;this.required=!1;this.assumeInteractionOn=["input"];this.validators=[];this.valueHasChanged=!1;this.hasInteracted=!1;this.customError=null;this.emittedEvents=[];this.emitInvalid=r=>{r.target===this&&(this.hasInteracted=!0,this.dispatchEvent(new Lr))};this.handleInteraction=r=>{var a;let o=this.emittedEvents;o.includes(r.type)||o.push(r.type),o.length===((a=this.assumeInteractionOn)==null?void 0:a.length)&&(this.hasInteracted=!0)};$o||this.addEventListener("invalid",this.emitInvalid)}static get validators(){return[Gn()]}static get observedAttributes(){let r=new Set(super.observedAttributes||[]);for(let o of this.validators)if(o.observedAttributes)for(let a of o.observedAttributes)r.add(a);return[...r]}connectedCallback(){super.connectedCallback(),this.updateValidity(),this.assumeInteractionOn.forEach(r=>{this.addEventListener(r,this.handleInteraction)})}firstUpdated(...r){super.firstUpdated(...r),this.updateValidity()}willUpdate(r){if(!$o&&r.has("customError")&&(this.customError||(this.customError=null),this.setCustomValidity(this.customError||"")),r.has("value")||r.has("disabled")){let o=this.value;if(Array.isArray(o)){if(this.name){let a=new FormData;for(let i of o)a.append(this.name,i);this.setValue(a,a)}}else this.setValue(o,o)}r.has("disabled")&&(this.customStates.set("disabled",this.disabled),(this.hasAttribute("disabled")||!$o&&!this.matches(":disabled"))&&this.toggleAttribute("disabled",this.disabled)),this.updateValidity(),super.willUpdate(r)}get labels(){return this.internals.labels}getForm(){return this.internals.form}get validity(){return this.internals.validity}get willValidate(){return this.internals.willValidate}get validationMessage(){return this.internals.validationMessage}checkValidity(){return this.updateValidity(),this.internals.checkValidity()}reportValidity(){return this.updateValidity(),this.hasInteracted=!0,this.internals.reportValidity()}get validationTarget(){return this.input||void 0}setValidity(...r){let o=r[0],a=r[1],i=r[2];i||(i=this.validationTarget),this.internals.setValidity(o,a,i||void 0),this.requestUpdate("validity"),this.setCustomStates()}setCustomStates(){let r=!!this.required,o=this.internals.validity.valid,a=this.hasInteracted;this.customStates.set("required",r),this.customStates.set("optional",!r),this.customStates.set("invalid",!o),this.customStates.set("valid",o),this.customStates.set("user-invalid",!o&&a),this.customStates.set("user-valid",o&&a)}setCustomValidity(r){if(!r){this.customError=null,this.setValidity({});return}this.customError=r,this.setValidity({customError:!0},r,this.validationTarget)}formResetCallback(){this.resetValidity(),this.hasInteracted=!1,this.valueHasChanged=!1,this.emittedEvents=[],this.updateValidity()}formDisabledCallback(r){this.disabled=r,this.updateValidity()}formStateRestoreCallback(r,o){this.value=r,o==="restore"&&this.resetValidity(),this.updateValidity()}setValue(...r){let[o,a]=r;this.internals.setFormValue(o,a)}get allValidators(){let r=this.constructor.validators||[],o=this.validators||[];return[...r,...o]}resetValidity(){this.setCustomValidity(""),this.setValidity({})}updateValidity(){if(this.disabled||this.hasAttribute("disabled")||!this.willValidate){this.resetValidity();return}let r=this.allValidators;if(!(r!=null&&r.length))return;let o={customError:!!this.customError},a=this.validationTarget||this.input||void 0,i="";for(let n of r){let{isValid:l,message:d,invalidKeys:u}=n.checkValidity(this);l||(i||(i=d),(u==null?void 0:u.length)>=0&&u.forEach(p=>o[p]=!0))}i||(i=this.validationMessage),this.setValidity(o,i,a)}};K.formAssociated=!0,s([xt({reflect:!0})],K.prototype,"name",2),s([xt({type:Boolean})],K.prototype,"disabled",2),s([xt({state:!0,attribute:!1})],K.prototype,"valueHasChanged",2),s([xt({state:!0,attribute:!1})],K.prototype,"hasInteracted",2),s([xt({attribute:"custom-error",reflect:!0})],K.prototype,"customError",2),s([xt({attribute:!1,state:!0,type:Object})],K.prototype,"validity",1);var Wn={};var ve=class extends K{constructor(){super();this.checked=!1;this.forceDisabled=!1;this.form=null;this.appearance="default";this.size="medium";this.disabled=!1;this.handleClick=()=>{!this.disabled&&!this.forceDisabled&&(this.checked=!0)};this.addEventListener("click",this.handleClick)}connectedCallback(){super.connectedCallback(),this.setInitialAttributes()}setInitialAttributes(){this.setAttribute("role","radio"),this.tabIndex=0,this.setAttribute("aria-disabled",this.disabled||this.forceDisabled?"true":"false")}updated(r){if(super.updated(r),r.has("checked")&&(this.customStates.set("checked",this.checked),this.setAttribute("aria-checked",this.checked?"true":"false"),!this.disabled&&!this.forceDisabled&&(this.tabIndex=this.checked?0:-1)),r.has("disabled")||r.has("forceDisabled")){let o=this.disabled||this.forceDisabled;this.customStates.set("disabled",o),this.setAttribute("aria-disabled",o?"true":"false"),o?this.tabIndex=-1:this.tabIndex=this.checked?0:-1}}setValue(){}render(){return vm`
|
|
3000
4104
|
<span part="control" class="control"></span>
|
|
3001
4105
|
<slot part="label" class="label"></slot>
|
|
3002
|
-
`}};
|
|
4106
|
+
`}};ve.css=[Wn],s([es()],ve.prototype,"checked",2),s([es()],ve.prototype,"forceDisabled",2),s([qt({reflect:!0})],ve.prototype,"form",2),s([qt({reflect:!0})],ve.prototype,"value",2),s([qt({reflect:!0})],ve.prototype,"appearance",2),s([qt({reflect:!0})],ve.prototype,"size",2),s([qt({type:Boolean})],ve.prototype,"disabled",2);import{html as xm}from"lit";import{property as Be,query as ym,state as is}from"lit/decorators.js";import{classMap as ns}from"lit/directives/class-map.js";var ts="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";var rs=(t=21)=>{let e="",r=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)e+=ts[r[t]&63];return e};function os(t=""){return`${t}${rs()}`}var as={};var Or=(t={})=>{let{validationElement:e,validationProperty:r}=t;e||(e=Object.assign(document.createElement("input"),{required:!0})),r||(r="value");let o={observedAttributes:["required"],message:e.validationMessage,checkValidity(a){var u;let i={message:"",isValid:!0,invalidKeys:[]};return((u=a.required)!=null?u:a.hasAttribute("required"))&&!a[r]&&(i.message=typeof o.message=="function"?o.message(a):o.message||"",i.isValid=!1,i.invalidKeys.push("valueMissing")),i}};return o};var yt=class{constructor(e,...r){this.slotNames=[];this.handleSlotChange=e=>{let r=e.target;(this.slotNames.includes("[default]")&&!r.name||r.name&&this.slotNames.includes(r.name))&&this.host.requestUpdate()};(this.host=e).addController(this),this.slotNames=r}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===Node.TEXT_NODE&&e.textContent.trim()!=="")return!0;if(e.nodeType===Node.ELEMENT_NODE){let r=e;if(r.tagName.toLowerCase()==="w-visually-hidden")return!1;if(!r.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};var q=class extends K{constructor(){super();this.hasSlotController=new yt(this,"hint","label");this.hasRadioButtons=!1;this.label="";this.hint="";this.name=null;this.disabled=!1;this.orientation="vertical";this._value=null;this.defaultValue=this.getAttribute("value")||null;this.size="medium";this.required=!1;this.withLabel=!1;this.withHint=!1;this.handleRadioClick=r=>{let o=r.target.closest("w-radio");if(!o||o.disabled||o.forceDisabled||this.disabled)return;let a=this.value;this.value=o.value,o.checked=!0;let i=this.getAllRadios();for(let n of i)o!==n&&(n.checked=!1,n.setAttribute("tabindex","-1"));this.value!==a&&this.updateComplete.then(()=>{this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})};this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("click",this.handleRadioClick)}static get validators(){let r=[Or({validationElement:Object.assign(document.createElement("input"),{required:!0,type:"radio",name:os("__w-radio")})})];return[...super.validators,...r]}get value(){var r;return this.valueHasChanged?this._value:(r=this._value)!=null?r:this.defaultValue}set value(r){typeof r=="number"&&(r=String(r)),this.valueHasChanged=!0,this._value=r}get validationTarget(){let r=this.querySelector(":is(w-radio):not([disabled])");if(r)return r}updated(r){(r.has("disabled")||r.has("value"))&&this.syncRadioElements()}formResetCallback(...r){this.value=this.defaultValue,super.formResetCallback(...r),this.syncRadioElements()}getAllRadios(){return[...this.querySelectorAll("w-radio")]}handleLabelClick(){this.focus()}async syncRadioElements(){let r=this.getAllRadios(),o=!1;if(r.forEach((a,i)=>{a.appearance==="button"&&(o=!0),a.setAttribute("size",this.size),a.toggleAttribute("data-w-radio-horizontal",this.orientation!=="vertical"),a.toggleAttribute("data-w-radio-vertical",this.orientation==="vertical"),a.toggleAttribute("data-w-radio-first",i===0),a.toggleAttribute("data-w-radio-inner",i!==0&&i!==r.length-1),a.toggleAttribute("data-w-radio-last",i===r.length-1),a.forceDisabled=this.disabled}),this.hasRadioButtons=o,await Promise.all(r.map(async a=>{await a.updateComplete,!a.disabled&&a.value===this.value?a.checked=!0:a.checked=!1})),this.disabled)r.forEach(a=>{a.tabIndex=-1});else{let a=r.filter(n=>!n.disabled),i=a.find(n=>n.checked);a.length>0&&(i?a.forEach(n=>{n.tabIndex=n.checked?0:-1}):a.forEach((n,l)=>{n.tabIndex=l===0?0:-1})),r.filter(n=>n.disabled).forEach(n=>{n.tabIndex=-1})}}handleKeyDown(r){var u;if(!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"," "].includes(r.key)||this.disabled)return;let o=this.getAllRadios().filter(p=>!p.disabled);if(o.length<=0)return;r.preventDefault();let a=this.value,i=(u=o.find(p=>p.checked))!=null?u:o[0],n=r.key===" "?0:["ArrowUp","ArrowLeft"].includes(r.key)?-1:1,l=o.indexOf(i)+n;l||(l=0),l<0&&(l=o.length-1),l>o.length-1&&(l=0);let d=o.some(p=>p.tagName.toLowerCase()==="w-radio-button");this.getAllRadios().forEach(p=>{p.checked=!1,d||p.setAttribute("tabindex","-1")}),this.value=o[l].value,o[l].checked=!0,d?o[l].shadowRoot.querySelector("button").focus():(o[l].setAttribute("tabindex","0"),o[l].focus()),this.value!==a&&this.updateComplete.then(()=>{this.dispatchEvent(new InputEvent("input",{bubbles:!0,composed:!0})),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))}),r.preventDefault()}focus(r){if(this.disabled)return;let o=this.getAllRadios(),a=o.find(l=>l.checked),i=o.find(l=>!l.disabled),n=a||i;n&&n.focus(r)}render(){let r=this.hasUpdated?this.hasSlotController.test("label"):this.withLabel,o=this.hasUpdated?this.hasSlotController.test("hint"):this.withHint,a=this.label?!0:!!r,i=this.hint?!0:!!o;return xm`
|
|
3003
4107
|
<fieldset
|
|
3004
4108
|
part="form-control"
|
|
3005
|
-
class=${
|
|
4109
|
+
class=${ns({"form-control":!0,"form-control-radio-group":!0,"form-control-has-label":a,"has-radio-buttons":this.hasRadioButtons})}
|
|
3006
4110
|
role="radiogroup"
|
|
3007
4111
|
aria-labelledby="label"
|
|
3008
4112
|
aria-describedby="hint"
|
|
@@ -3012,7 +4116,7 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3012
4116
|
part="form-control-label"
|
|
3013
4117
|
id="label"
|
|
3014
4118
|
class="label"
|
|
3015
|
-
aria-hidden=${
|
|
4119
|
+
aria-hidden=${a?"false":"true"}
|
|
3016
4120
|
@click=${this.handleLabelClick}>
|
|
3017
4121
|
<slot name="label">${this.label}</slot>
|
|
3018
4122
|
</label>
|
|
@@ -3023,12 +4127,12 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3023
4127
|
id="hint"
|
|
3024
4128
|
name="hint"
|
|
3025
4129
|
part="hint"
|
|
3026
|
-
class=${
|
|
3027
|
-
aria-hidden=${
|
|
4130
|
+
class=${ns({"has-slotted":i})}
|
|
4131
|
+
aria-hidden=${i?"false":"true"}
|
|
3028
4132
|
>${this.hint}</slot
|
|
3029
4133
|
>
|
|
3030
4134
|
</fieldset>
|
|
3031
|
-
`}};
|
|
4135
|
+
`}};q.css=[as],q.shadowRootOptions={...K.shadowRootOptions,delegatesFocus:!0},s([is()],q.prototype,"hasRadioButtons",2),s([ym("slot:not([name])")],q.prototype,"defaultSlot",2),s([Be()],q.prototype,"label",2),s([Be({attribute:"hint"})],q.prototype,"hint",2),s([Be({reflect:!0})],q.prototype,"name",2),s([Be({type:Boolean,reflect:!0})],q.prototype,"disabled",2),s([Be({reflect:!0})],q.prototype,"orientation",2),s([is()],q.prototype,"value",1),s([Be({attribute:"value",reflect:!0})],q.prototype,"defaultValue",2),s([Be({reflect:!0})],q.prototype,"size",2),s([Be({type:Boolean,reflect:!0})],q.prototype,"required",2),s([Be({type:Boolean,attribute:"with-label"})],q.prototype,"withLabel",2),s([Be({type:Boolean,attribute:"with-hint"})],q.prototype,"withHint",2);customElements.get("w-radio")||(customElements.define("w-radio",ve),customElements.define("w-radio-group",q));import{html as Bm}from"lit";import{property as Ce,query as Pm}from"lit/decorators.js";import{classMap as Rm}from"lit/directives/class-map.js";import{ifDefined as Vm}from"lit/directives/if-defined.js";import{live as us}from"lit/directives/live.js";function Tr(t,e){let r={waitUntilFirstUpdate:!1,...e};return(o,a)=>{let{update:i}=o,n=Array.isArray(t)?t:[t];o.update=function(l){n.forEach(d=>{let u=d;if(l.has(u)){let p=l.get(u),m=this[u];p!==m&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[a](p,m)}}),i.call(this,l)}}}import{LitElement as km}from"lit";import{unsafeStatic as Em,html as $m}from"lit/static-html.js";var Cm=JSON.parse('{"icon.title.check":["Sjekkmerke"]}'),_m=JSON.parse('{"icon.title.check":["Checkmark"]}'),Sm=JSON.parse('{"icon.title.check":["Valintamerkki"]}'),Lm=JSON.parse('{"icon.title.check":["Flueben"]}'),Om=JSON.parse('{"icon.title.check":["Bock"]}'),ss=["en","nb","fi","da","sv"],ls="en",Tm=()=>{var t;let e;switch((t=process==null?void 0:process.env)==null?void 0:t.NMP_BRAND){case"FINN":e="nb";break;case"TORI":e="fi";break;case"BLOCKET":e="sv";break;case"DBA":e="da";break;default:e="en"}return e},cs=()=>{var t;let e=(t=document==null?void 0:document.location)==null?void 0:t.hostname;return e!=null&&e.includes("finn")?"nb":e.includes("tori")?"fi":e.includes("blocket")?"sv":e.includes("dba")?"da":ls},Co=t=>ss.find(e=>t===e||t.toLowerCase().includes(e))||cs();function zm(){var t;if(typeof window=="undefined"){let e=Tm();return Co(e)}try{let e=(t=document==null?void 0:document.documentElement)==null?void 0:t.lang,r=cs();return ss.includes(e)?Co(e!=null?e:r):(console.warn("Unsupported locale set in html lang tag, falling back to detection by hostname"),Co(r))}catch(e){return console.warn("could not detect locale, falling back to source locale",e),ls}}var Mm=(t,e,r,o,a,i)=>t==="nb"?r:t==="fi"?o:t==="da"?a:t==="sv"?i:e,Nm=(t,e,r,o,a)=>{let i=zm(),n=Mm(i,t,e,r,o,a);c.load(i,n),c.activate(i)};Nm(_m,Cm,Sm,Lm,Om);var Am=class extends km{render(){let t=c.t({message:"Checkmark",id:"icon.title.check",comment:"Title for check icon"});return $m`<svg xmlns="http://www.w3.org/2000/svg"width="16"height="16"fill="none"viewBox="0 0 16 16" part="w-icon-check-16-part">${Em(`<title>${t}</title>`)}<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M3.83 7.667 7.163 11l5.334-6"></path></svg>`}};customElements.get("w-icon-check-16")||customElements.define("w-icon-check-16",Am);var ds={};var ps,F=class extends K{constructor(){super(...arguments);this.hasSlotController=new yt(this,"hint");this.title="";this.name="";this._value=(ps=this.getAttribute("value"))!=null?ps:null;this.size="medium";this.disabled=!1;this.indeterminate=!1;this.checked=this.hasAttribute("checked");this.defaultChecked=this.hasAttribute("checked");this.form=null;this.required=!1;this.hint=""}static get validators(){let r=[Or({validationProperty:"checked",validationElement:Object.assign(document.createElement("input"),{type:"checkbox",required:!0})})];return[...super.validators,...r]}get value(){var r;return(r=this._value)!=null?r:"on"}set value(r){this._value=r}handleClick(){this.hasInteracted=!0,this.checked=!this.checked,this.indeterminate=!1,this.updateComplete.then(()=>{this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0}))})}handleDefaultCheckedChange(){!this.hasInteracted&&this.checked!==this.defaultChecked&&(this.checked=this.defaultChecked,this.handleValueOrCheckedChange())}handleValueOrCheckedChange(){this.setValue(this.checked?this.value:null,this._value),this.updateValidity()}handleStateChange(){this.hasUpdated&&(this.input.checked=this.checked,this.input.indeterminate=this.indeterminate),this.customStates.set("checked",this.checked),this.customStates.set("indeterminate",this.indeterminate),this.updateValidity()}handleDisabledChange(){this.customStates.set("disabled",this.disabled)}willUpdate(r){super.willUpdate(r),r.has("defaultChecked")&&(this.hasInteracted||(this.checked=this.defaultChecked)),(r.has("value")||r.has("checked"))&&this.handleValueOrCheckedChange()}formResetCallback(){this.checked=this.defaultChecked,super.formResetCallback(),this.handleValueOrCheckedChange()}click(){this.input.click()}focus(r){this.input.focus(r)}blur(){this.input.blur()}render(){let r=this.hasSlotController.test("hint"),o=this.hint?!0:!!r,a=!this.checked&&this.indeterminate;return Bm`
|
|
3032
4136
|
<label part="base">
|
|
3033
4137
|
<span part="control">
|
|
3034
4138
|
<input
|
|
@@ -3036,48 +4140,63 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3036
4140
|
type="checkbox"
|
|
3037
4141
|
title=${this.title}
|
|
3038
4142
|
name=${this.name}
|
|
3039
|
-
value=${
|
|
3040
|
-
.indeterminate=${
|
|
3041
|
-
.checked=${
|
|
4143
|
+
value=${Vm(this._value)}
|
|
4144
|
+
.indeterminate=${us(this.indeterminate)}
|
|
4145
|
+
.checked=${us(this.checked)}
|
|
3042
4146
|
.disabled=${this.disabled}
|
|
3043
4147
|
.required=${this.required}
|
|
3044
4148
|
aria-checked=${this.checked?"true":"false"}
|
|
3045
4149
|
aria-describedby="hint"
|
|
3046
4150
|
@click=${this.handleClick} />
|
|
3047
|
-
${
|
|
4151
|
+
${a?"\u2013":""}
|
|
3048
4152
|
</span>
|
|
3049
4153
|
|
|
3050
4154
|
<slot part="label"></slot>
|
|
3051
4155
|
</label>
|
|
3052
4156
|
|
|
3053
|
-
<slot id="hint" part="hint" name="hint" aria-hidden=${o?"false":"true"} class="${
|
|
4157
|
+
<slot id="hint" part="hint" name="hint" aria-hidden=${o?"false":"true"} class="${Rm({"has-slotted":o})}">
|
|
3054
4158
|
${this.hint}
|
|
3055
4159
|
</slot>
|
|
3056
|
-
`}};
|
|
3057
|
-
${
|
|
4160
|
+
`}};F.css=[ds],F.shadowRootOptions={...K.shadowRootOptions,delegatesFocus:!0},s([Pm('input[type="checkbox"]')],F.prototype,"input",2),s([Ce()],F.prototype,"title",2),s([Ce({reflect:!0})],F.prototype,"name",2),s([Ce({reflect:!0})],F.prototype,"value",1),s([Ce({reflect:!0})],F.prototype,"size",2),s([Ce({type:Boolean})],F.prototype,"disabled",2),s([Ce({type:Boolean,reflect:!0})],F.prototype,"indeterminate",2),s([Ce({type:Boolean,attribute:!1})],F.prototype,"checked",2),s([Ce({type:Boolean,reflect:!0,attribute:"checked"})],F.prototype,"defaultChecked",2),s([Ce({reflect:!0})],F.prototype,"form",2),s([Ce({type:Boolean,reflect:!0})],F.prototype,"required",2),s([Ce()],F.prototype,"hint",2),s([Tr("defaultChecked")],F.prototype,"handleDefaultCheckedChange",1),s([Tr(["checked","indeterminate"])],F.prototype,"handleStateChange",1),s([Tr("disabled")],F.prototype,"handleDisabledChange",1);customElements.get("w-checkbox")||customElements.define("w-checkbox",F);import{html as zr,LitElement as Fm}from"lit";import{property as _e}from"lit/decorators.js";import{ifDefined as _o}from"lit/directives/if-defined.js";import{unsafeHTML as jm}from"lit/directives/unsafe-html.js";import{when as So}from"lit/directives/when.js";var ms=JSON.parse('{"select.label.optional":["(valgfrit)"]}');var gs=JSON.parse('{"select.label.optional":["(optional)"]}');var hs=JSON.parse('{"select.label.optional":["(vapaaehtoinen)"]}');var fs=JSON.parse('{"select.label.optional":["(valgfritt)"]}');var bs=JSON.parse('{"select.label.optional":["(valfritt)"]}');import{css as Im}from"lit";var vs=Im`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.appearance-none{-webkit-appearance:none;appearance:none}.border-0{border-width:0}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.opacity-25{opacity:.25}.block,.before\\:block:before{display:block}.before\\:hidden:before{display:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.bottom-0{bottom:0}.right-0{right:0}.before\\:bottom-0:before{bottom:0}.before\\:right-0:before{right:0}.top-\\[30\\%\\]{top:30%}.absolute{position:absolute}.relative{position:relative}.static{position:static}.before\\:absolute:before{position:absolute}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.s-icon{color:var(--w-s-color-icon)}.s-border{border-color:var(--w-s-color-border)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.hover\\:s-border-disabled:hover{border-color:var(--w-s-color-border-disabled)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.active\\:s-border-active:active{border-color:var(--w-s-color-border-active)}.active\\:s-border-disabled:active{border-color:var(--w-s-color-border-disabled)}.h-full{height:100%}.w-32{width:3.2rem}.w-full{width:100%}.before\\:h-full:before{height:100%}.before\\:w-32:before{width:3.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-32{padding-right:3.2rem}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none,.before\\:pointer-events-none:before{pointer-events:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}`;var He={base:"block text-m mb-0 py-12 pr-32 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] appearance-none cursor-pointer caret-current",default:"s-text s-bg pl-8 border-1 s-border hover:s-border-hover active:s-border-active",disabled:"s-text-disabled s-bg-disabled-subtle pl-8 border-1 s-border-disabled hover:s-border-disabled active:s-border-disabled pointer-events-none",invalid:"s-text s-bg pl-8 border-1 s-border-negative hover:s-border-negative-hover active:s-border-active outline-[--w-s-color-border-negative]!",readOnly:"s-text bg-transparent pl-0 border-0 pointer-events-none before:hidden",wrapper:"relative",selectWrapper:"relative before:block before:absolute before:right-0 before:bottom-0 before:w-32 before:h-full before:pointer-events-none ",chevron:"block absolute top-[30%] right-0 bottom-0 w-32 h-full s-icon pointer-events-none cursor-pointer",chevronDisabled:"opacity-25"},ws={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},Lo={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},te,xs,ys,ks,Mr,Nr,ae=class extends Xe(Fm){constructor(){super();Oe(this,te);this._setValue=r=>{this.value=r,this.setValue(r)};I(gs,fs,hs,ms,bs),this._options=this.innerHTML}firstUpdated(){this.autoFocus&&this.shadowRoot.querySelector("select").focus(),Array.from(this.children).map(r=>{r.selected&&this._setValue(r.value)})}handleKeyDown(r){this.readOnly&&(r.key===" "||r.key==="ArrowDown"||r.key==="ArrowUp")&&r.preventDefault()}onChange({target:r}){this._setValue(r.value);let o=new CustomEvent("change",{detail:r.value});this.dispatchEvent(o)}render(){return zr`<div class="${He.wrapper}">
|
|
4161
|
+
${So(this.label,()=>zr`<label class="${ws.base}" for="${R(this,te,Mr)}">
|
|
3058
4162
|
${this.label}
|
|
3059
|
-
${
|
|
4163
|
+
${So(this.optional,()=>zr`<span class="${ws.optional}"
|
|
3060
4164
|
>${c._({id:"select.label.optional",message:"(optional)",comment:"Shown behind label when marked as optional"})}</span
|
|
3061
4165
|
>`)}</label
|
|
3062
4166
|
>`)}
|
|
3063
4167
|
<div class="${He.selectWrapper}">
|
|
3064
4168
|
<select
|
|
3065
|
-
class="${
|
|
3066
|
-
id="${
|
|
4169
|
+
class="${R(this,te,xs)}"
|
|
4170
|
+
id="${R(this,te,Mr)}"
|
|
3067
4171
|
?disabled=${this.disabled}
|
|
3068
|
-
aria-describedby="${
|
|
3069
|
-
aria-invalid="${
|
|
3070
|
-
aria-errormessage="${
|
|
4172
|
+
aria-describedby="${_o(R(this,te,Nr))}"
|
|
4173
|
+
aria-invalid="${_o(this.invalid)}"
|
|
4174
|
+
aria-errormessage="${_o(this.invalid&&R(this,te,Nr))}"
|
|
3071
4175
|
@keydown=${this.handleKeyDown}
|
|
3072
4176
|
@change=${this.onChange}>
|
|
3073
|
-
${
|
|
4177
|
+
${jm(this._options)}
|
|
3074
4178
|
</select>
|
|
3075
|
-
<div class="${
|
|
4179
|
+
<div class="${R(this,te,ks)}">
|
|
3076
4180
|
<w-icon-chevron-down-16></w-icon-chevron-down-16>
|
|
3077
4181
|
</div>
|
|
3078
4182
|
</div>
|
|
3079
|
-
${
|
|
3080
|
-
</div>`}};
|
|
4183
|
+
${So(this.always||this.invalid,()=>zr`<div id="${R(this,te,Nr)}" class="${R(this,te,ys)}">${this.hint}</div>`)}
|
|
4184
|
+
</div>`}};te=new WeakSet,xs=function(){return w([He.base,!this.invalid&&!this.disabled&&!this.readOnly&&He.default,this.invalid&&He.invalid,this.disabled&&He.disabled,this.readOnly&&He.readOnly])},ys=function(){return w([Lo.base,this.invalid?Lo.colorInvalid:Lo.color])},ks=function(){return w([He.chevron,this.disabled&&He.chevronDisabled])},Mr=function(){return"select_id"},Nr=function(){return this.hint?`${R(this,te,Mr)}__hint`:void 0},ae.styles=[E,vs],s([_e({attribute:"auto-focus",type:Boolean,reflect:!0})],ae.prototype,"autoFocus",2),s([_e({type:Boolean,reflect:!0})],ae.prototype,"invalid",2),s([_e({type:Boolean,reflect:!0})],ae.prototype,"always",2),s([_e({reflect:!0})],ae.prototype,"hint",2),s([_e({reflect:!0})],ae.prototype,"label",2),s([_e({type:Boolean,reflect:!0})],ae.prototype,"optional",2),s([_e({type:Boolean,reflect:!0})],ae.prototype,"disabled",2),s([_e({attribute:"read-only",type:Boolean,reflect:!0})],ae.prototype,"readOnly",2),s([_e({state:!0})],ae.prototype,"_options",2),s([_e({reflect:!0})],ae.prototype,"name",2),s([_e({reflect:!0})],ae.prototype,"value",2);customElements.get("w-select")||customElements.define("w-select",ae);import{html as Ar,LitElement as $s}from"lit";import{property as Dr,state as qm}from"lit/decorators.js";var Oo=JSON.parse('{"steps.aria.emptyCircle":["Tom cirkel"],"steps.aria.active":["Trinindikator aktiv cirkel"],"steps.aria.completed":["Trinindikator fuldf\xF8rt cirkel"]}');var To=JSON.parse('{"steps.aria.emptyCircle":["Empty circle"],"steps.aria.active":["Step indicator active circle"],"steps.aria.completed":["Step indicator completed circle"]}');var zo=JSON.parse('{"steps.aria.emptyCircle":["Tyhj\xE4 ympyr\xE4"],"steps.aria.active":["Vaiheilmaisin aktiivinen ympyr\xE4"],"steps.aria.completed":["Vaiheilmaisin valmis ympyr\xE4"]}');var Mo=JSON.parse('{"steps.aria.emptyCircle":["Tom sirkel"],"steps.aria.active":["Stegindikator aktiv sirkel"],"steps.aria.completed":["Stegindikator hel sirkel"]}');var No=JSON.parse('{"steps.aria.emptyCircle":["Tom cirkel"],"steps.aria.active":["Stegindikator aktiv cirkel"],"steps.aria.completed":["Stegindikator full\xE4ndad cirkel"]}');import{css as Hm}from"lit";var Ao=Hm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.text-center{text-align:center}.text-right{text-align:right}.border-2{border-width:2px}.rounded-full{border-radius:9999px}.flex{display:flex}.grid{display:grid}.flex-1{flex:1}.gap-x-16{column-gap:1.6rem}.gap-y-16{row-gap:1.6rem}.row-span-2{grid-row:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.row-start-1{grid-row-start:1}.row-start-2{grid-row-start:2}.col-start-2{grid-column-start:2}.grid-flow-col{grid-auto-flow:column}.grid-rows-\\[20px_auto\\]{grid-template-rows:20px auto}.grid-rows-\\[auto_20px\\]{grid-template-rows:auto 20px}.grid-cols-\\[1fr_20px_1fr\\]{grid-template-columns:1fr 20px 1fr}.grid-cols-\\[1fr_20px\\]{grid-template-columns:1fr 20px}.grid-cols-\\[20px_1fr\\]{grid-template-columns:20px 1fr}.items-center{align-items:center}.justify-self-end{justify-self:end}.justify-self-center{justify-self:center}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-icon-inverted{color:var(--w-s-color-icon-inverted)}.s-border{border-color:var(--w-s-color-border)}.s-border-primary{border-color:var(--w-s-color-border-primary)}.h-2{height:.2rem}.h-20{height:2rem}.h-full{height:100%}.w-2{width:.2rem}.w-20{width:2rem}.w-full{width:100%}.last\\:mb-0:last-child{margin-bottom:0}.px-16{padding-left:1.6rem;padding-right:1.6rem}.pb-0{padding-bottom:0}.pb-32{padding-bottom:3.2rem}.invisible{visibility:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}`;var Es={wrapper:"w-full",horizontal:"flex"},B={base:"group/step",vertical:"group/stepv grid-rows-[20px_auto] grid grid-flow-col gap-x-16",horizontal:"group/steph grid-rows-[auto_20px] grid-cols-[1fr_20px_1fr] flex-1 grid gap-y-16 items-center",alignLeft:"grid-cols-[20px_1fr]",alignRight:"grid-cols-[1fr_20px] text-right",dot:"rounded-full border-2 h-20 w-20 transition-colors duration-300 s-icon-inverted",dotAlignRight:"col-start-2",dotHorizontal:"row-start-2 justify-self-end",dotActive:"s-border-primary s-bg-primary",dotIncomplete:"s-border s-bg",line:"transition-colors duration-300",lineVertical:"w-2 h-full justify-self-center",lineAlignRight:"col-start-2",lineHorizontal:"h-2 w-full row-start-2",lineIncomplete:"s-bg-disabled",lineComplete:"s-bg-primary",content:"last:mb-0",contentVertical:"row-span-2 pb-32",contentHorizontal:"col-span-3 px-16 row-start-1 text-center"},kt=class extends $s{constructor(){super();this.horizontal=!1;this.right=!1;I(To,Mo,zo,Oo,No)}connectedCallback(){super.connectedCallback(),this.updateStepsContext()}updated(){this.updateStepsContext()}updateStepsContext(){let r=this.querySelectorAll("w-step");r.forEach((o,a)=>{o.setContext({horizontal:this.horizontal,right:this.right,isLast:a===r.length-1,isFirst:a===0})})}render(){let r=w([Es.wrapper,this.horizontal&&Es.horizontal]);return Ar`
|
|
4185
|
+
<ul class=${r}>
|
|
4186
|
+
<slot></slot>
|
|
4187
|
+
</ul>
|
|
4188
|
+
`}};kt.styles=[E,Ao],s([Dr({type:Boolean,reflect:!0})],kt.prototype,"horizontal",2),s([Dr({type:Boolean,reflect:!0})],kt.prototype,"right",2);var Do={completed:c._({id:"steps.aria.completed",message:"Step indicator completed circle",comment:"Completed circle"}),active:c._({id:"steps.aria.active",message:"Step indicator active circle",comment:"Active circle"}),default:c._({id:"steps.aria.emptyCircle",message:"Empty circle",comment:"Empty circle"})},ct=class extends $s{constructor(){super();this.active=!1;this.completed=!1;this._context={horizontal:!1,right:!1,isLast:!1,isFirst:!1};I(To,Mo,zo,Oo,No)}setContext(r){this._context=r,this.requestUpdate()}getAriaLabel(){return this.completed?Do.completed:this.active?Do.active:Do.default}render(){let r=!this._context.horizontal,o=!this._context.right,a=this._context.isFirst,i=this._context.isLast,n=w([B.base,r?B.vertical:B.horizontal,r?o?B.alignLeft:B.alignRight:""]),l=w([B.line,B.lineHorizontal,this.active||this.completed?B.lineComplete:B.lineIncomplete,a?"invisible":""]),d=w([B.dot,r?o?"":B.dotAlignRight:B.dotHorizontal,this.active||this.completed?B.dotActive:B.dotIncomplete]),u=w([B.line,r?B.lineVertical:B.lineHorizontal,r&&!o?B.lineAlignRight:"",this.completed?B.lineComplete:B.lineIncomplete,i?"invisible":""]),p=w([B.content,r?B.contentVertical:B.contentHorizontal,i?"pb-0":""]);return Ar`
|
|
4189
|
+
<li class=${n}>
|
|
4190
|
+
${r?"":Ar`<div class=${l}></div>`}
|
|
4191
|
+
<div class=${d} role="img" aria-label=${this.getAriaLabel()} ${this.active?'aria-current="step"':""}>
|
|
4192
|
+
${this.completed?Ar`<w-icon-check-16 data-testid="completed-icon"></w-icon-check-16>`:""}
|
|
4193
|
+
</div>
|
|
4194
|
+
<div class=${u}></div>
|
|
4195
|
+
<div class=${p}>
|
|
4196
|
+
<slot></slot>
|
|
4197
|
+
</div>
|
|
4198
|
+
</li>
|
|
4199
|
+
`}};ct.styles=[E,Ao],s([Dr({type:Boolean,reflect:!0})],ct.prototype,"active",2),s([Dr({type:Boolean,reflect:!0})],ct.prototype,"completed",2),s([qm()],ct.prototype,"_context",2);customElements.get("w-steps")||customElements.define("w-steps",kt);customElements.get("w-step")||customElements.define("w-step",ct);import{html as Um,LitElement as Ym}from"lit";import{property as _s}from"lit/decorators.js";import{css as Jm}from"lit";var Cs=Jm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-\\[--w-color-switch-track-background\\]{background-color:var(--w-color-switch-track-background)}.group:hover .group-hover\\:bg-\\[--w-color-switch-track-background-hover\\]{background-color:var(--w-color-switch-track-background-hover)}.rounded-full{border-radius:9999px}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.left-0{left:0}.left-4{left:.4rem}.top-0{top:0}.top-4{top:.4rem}.absolute{position:absolute}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled{background-color:var(--w-s-color-background-disabled)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.group:hover .group-hover\\:s-bg-primary-hover{background-color:var(--w-s-color-background-primary-hover)}.shadow-s{box-shadow:var(--w-shadow-s)}.h-16{height:1.6rem}.h-24{height:2.4rem}.h-full{height:100%}.w-16{width:1.6rem}.w-44{width:4.4rem}.w-full{width:100%}.cursor-pointer{cursor:pointer}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.translate-x-20{--w-translate-x:2rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform-gpu{transform:translate3d(var(--w-translate-x),var(--w-translate-y),var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-transform{transition-property:transform;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}`;var Pe={base:"block relative h-24 w-44 cursor-pointer group focusable rounded-full",disabled:"pointer-events-none",track:"absolute top-0 left-0 h-full w-full rounded-full transition-colors",trackActive:"s-bg-primary group-hover:s-bg-primary-hover",trackInactive:"bg-[--w-color-switch-track-background] group-hover:bg-[--w-color-switch-track-background-hover]",trackDisabled:"s-bg-disabled-subtle",handle:"absolute transform-gpu h-16 w-16 top-4 left-4 rounded-full transition-transform",handleSelected:"translate-x-20",handleNotDisabled:"s-bg shadow-s",handleDisabled:"s-bg-disabled",a11y:"sr-only"},Et=class extends Ym{constructor(){super(...arguments);this.value=!1;this.disabled=!1}get _baseClasses(){return w([Pe.base,this.disabled&&Pe.disabled])}get _trackClasses(){return w([Pe.track,this.disabled&&Pe.trackDisabled,!this.disabled&&(this.value?Pe.trackActive:Pe.trackInactive)])}get _handleClasses(){return w([Pe.handle,this.value&&Pe.handleSelected,this.disabled?Pe.handleDisabled:Pe.handleNotDisabled])}_handleClick(){this.disabled||(this.value=!this.value,this.dispatchEvent(new CustomEvent("change",{detail:{value:this.value},bubbles:!0,composed:!0})))}render(){return Um`
|
|
3081
4200
|
<div>
|
|
3082
4201
|
<button
|
|
3083
4202
|
type="button"
|
|
@@ -3091,25 +4210,25 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3091
4210
|
<span data-testid="handle" class=${this._handleClasses}></span>
|
|
3092
4211
|
</button>
|
|
3093
4212
|
</div>
|
|
3094
|
-
`}}
|
|
4213
|
+
`}};Et.styles=[E,Cs],s([_s({type:Boolean,reflect:!0})],Et.prototype,"value",2),s([_s({type:Boolean,reflect:!0})],Et.prototype,"disabled",2);customElements.get("w-switch")||customElements.define("w-switch",Et);import{LitElement as Qm,html as Bo}from"lit";import Zm from"@warp-ds/elements-core";import{property as J}from"lit/decorators.js";import{ifDefined as we}from"lit/directives/if-defined.js";import{css as Xm}from"lit";var Ss=Xm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.focus\\:\\[--w-outline-offset\\:-2px\\]:focus{--w-outline-offset:-2px}.bg-transparent{background-color:#0000}.border-1{border-width:1px}.rounded-4{border-radius:4px}.caret-current{caret-color:currentColor}.block{display:block}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.outline-\\[--w-s-color-border-negative\\]\\!{outline-color:var(--w-s-color-border-negative)!important}.relative{position:relative}.static{position:static}.s-bg{background-color:var(--w-s-color-background)}.s-bg-disabled-subtle{background-color:var(--w-s-color-background-disabled-subtle)}.s-text{color:var(--w-s-color-text)}.s-text-disabled{color:var(--w-s-color-text-disabled)}.s-text-negative{color:var(--w-s-color-text-negative)}.s-text-subtle{color:var(--w-s-color-text-subtle)}.placeholder\\:s-text-placeholder::placeholder{color:var(--w-s-color-text-placeholder)}.s-border{border-color:var(--w-s-color-border)}.s-border-disabled{border-color:var(--w-s-color-border-disabled)}.s-border-negative{border-color:var(--w-s-color-border-negative)}.hover\\:s-border-hover:hover{border-color:var(--w-s-color-border-hover)}.hover\\:s-border-negative-hover:hover{border-color:var(--w-s-color-border-negative-hover)}.active\\:s-border-selected:active{border-color:var(--w-s-color-border-selected)}.w-full{width:100%}.min-h-\\[42\\]{min-height:4.2rem}.mb-0{margin-bottom:0}.mt-4{margin-top:.4rem}.px-8{padding-left:.8rem;padding-right:.8rem}.py-12{padding-top:1.2rem;padding-bottom:1.2rem}.pb-4{padding-bottom:.4rem}.pl-0{padding-left:0}.pl-8{padding-left:.8rem}.pr-40{padding-right:4rem}.pl-\\[var\\(--w-prefix-width\\,_40px\\)\\]{padding-left:var(--w-prefix-width,40px)}.cursor-pointer{cursor:pointer}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;font-smoothing:grayscale}.font-bold{font-weight:700}.font-normal{font-weight:400}.pointer-events-none{pointer-events:none}.text-m{font-size:var(--w-font-size-m);line-height:var(--w-line-height-m)}.text-s{font-size:var(--w-font-size-s);line-height:var(--w-line-height-s)}.text-xs{font-size:var(--w-font-size-xs);line-height:var(--w-line-height-xs)}.leading-m{line-height:var(--w-line-height-m)}@media (min-width:480px){.sm\\:min-h-\\[45\\]{min-height:4.5rem}}`;var Ge={wrapper:"relative",base:"block text-m leading-m mb-0 px-8 py-12 rounded-4 w-full focusable focus:[--w-outline-offset:-2px] caret-current",default:"border-1 s-text s-bg s-border hover:s-border-hover active:s-border-selected",disabled:"border-1 s-text-disabled s-bg-disabled-subtle s-border-disabled pointer-events-none",invalid:"border-1 s-text-negative s-bg s-border-negative hover:s-border-negative-hover outline-[--w-s-color-border-negative]!",readOnly:"pl-0 bg-transparent pointer-events-none",placeholder:"placeholder:s-text-placeholder",suffix:"pr-40",prefix:"pl-[var(--w-prefix-width,_40px)]",textArea:"min-h-[42] sm:min-h-[45]"},Km={base:"antialiased block relative text-s font-bold pb-4 cursor-pointer s-text",optional:"pl-8 font-normal text-s s-text-subtle"},Po={base:"text-xs mt-4 block",color:"s-text-subtle",colorInvalid:"s-text-negative"},D=class extends Xe(Qm){constructor(){super(...arguments);this.type="text";this._hasPrefix=!1;this._hasSuffix=!1}updated(r){r.has("value")&&this.setValue(this.value)}get _inputstyles(){return w([Ge.base,this._hasSuffix&&Ge.suffix,this._hasPrefix&&Ge.prefix,!this.invalid&&!this.disabled&&!this.readOnly&&Ge.default,this.invalid&&!this.disabled&&!this.readOnly&&Ge.invalid,!this.invalid&&this.disabled&&!this.readOnly&&Ge.disabled,!this.invalid&&!this.disabled&&this.readOnly&&Ge.readOnly])}get _helptextstyles(){return w([Po.base,this.invalid?Po.colorInvalid:Po.color])}get _label(){if(this.label)return Bo`<label for="${this._id}" class=${Km.base}>${this.label}</label>`}get _helpId(){if(this.helpText)return`${this._id}__hint`}get _id(){return"textfield"}get _error(){if(this.invalid&&this._helpId)return this._helpId}handler(r){let{name:o,value:a}=r.currentTarget;this.setValue(a);let i=new CustomEvent(r.type,{detail:{name:o,value:a,target:r.target}});this.dispatchEvent(i)}prefixSlotChange(){this.renderRoot.querySelector("slot[name=prefix]").assignedElements().length&&(this._hasPrefix=!0)}suffixSlotChange(){this.renderRoot.querySelector("slot[name=suffix]").assignedElements().length&&(this._hasSuffix=!0)}render(){return Bo`
|
|
3095
4214
|
${this._label}
|
|
3096
4215
|
<div class="${Ge.wrapper}">
|
|
3097
4216
|
<slot @slotchange="${this.prefixSlotChange}" name="prefix"></slot>
|
|
3098
4217
|
<input
|
|
3099
4218
|
class="${this._inputstyles}"
|
|
3100
4219
|
type="${this.type}"
|
|
3101
|
-
min="${
|
|
3102
|
-
max="${
|
|
3103
|
-
size="${
|
|
3104
|
-
minlength="${
|
|
3105
|
-
maxlength="${
|
|
3106
|
-
name="${
|
|
3107
|
-
pattern="${
|
|
3108
|
-
placeholder="${
|
|
3109
|
-
value="${
|
|
3110
|
-
aria-describedby="${
|
|
3111
|
-
aria-errormessage="${
|
|
3112
|
-
aria-invalid="${
|
|
4220
|
+
min="${we(this.min)}"
|
|
4221
|
+
max="${we(this.max)}"
|
|
4222
|
+
size="${we(this.size)}"
|
|
4223
|
+
minlength="${we(this.minLength)}"
|
|
4224
|
+
maxlength="${we(this.maxLength)}"
|
|
4225
|
+
name="${we(this.name)}"
|
|
4226
|
+
pattern="${we(this.pattern)}"
|
|
4227
|
+
placeholder="${we(this.placeholder)}"
|
|
4228
|
+
value="${we(this.value)}"
|
|
4229
|
+
aria-describedby="${we(this._helpId)}"
|
|
4230
|
+
aria-errormessage="${we(this._error)}"
|
|
4231
|
+
aria-invalid="${we(this.invalid)}"
|
|
3113
4232
|
id="${this._id}"
|
|
3114
4233
|
?disabled="${this.disabled}"
|
|
3115
4234
|
?readonly="${this.readOnly}"
|
|
@@ -3119,48 +4238,48 @@ ${_a.join(", ")}.`)}firstUpdated(){this.autofocus&&setTimeout(()=>this.focus(),0
|
|
|
3119
4238
|
@focus="${this.handler}" />
|
|
3120
4239
|
<slot @slotchange="${this.suffixSlotChange}" name="suffix"></slot>
|
|
3121
4240
|
</div>
|
|
3122
|
-
${this.helpText&&
|
|
3123
|
-
`}};
|
|
3124
|
-
<aside class="${
|
|
3125
|
-
<div class="${
|
|
3126
|
-
${
|
|
3127
|
-
class="${
|
|
3128
|
-
id="${
|
|
3129
|
-
type="${
|
|
3130
|
-
text="${
|
|
3131
|
-
?canclose=${
|
|
3132
|
-
@close=${()=>this.del(
|
|
4241
|
+
${this.helpText&&Bo`<div class="${this._helptextstyles}" id="${this._helpId}">${this.helpText}</div>`}
|
|
4242
|
+
`}};D.shadowRootOptions={...Zm.shadowRootOptions,delegatesFocus:!0},D.styles=[E,Ss],s([J({type:Boolean,reflect:!0})],D.prototype,"disabled",2),s([J({type:Boolean,reflect:!0})],D.prototype,"invalid",2),s([J({type:String,reflect:!0})],D.prototype,"id",2),s([J({type:String,reflect:!0})],D.prototype,"label",2),s([J({type:String,reflect:!0,attribute:"help-text"})],D.prototype,"helpText",2),s([J({type:String,reflect:!0})],D.prototype,"size",2),s([J({type:Number,reflect:!0})],D.prototype,"max",2),s([J({type:Number,reflect:!0})],D.prototype,"min",2),s([J({type:Number,reflect:!0,attribute:"min-length"})],D.prototype,"minLength",2),s([J({type:Number,reflect:!0,attribute:"max-length"})],D.prototype,"maxLength",2),s([J({type:String,reflect:!0})],D.prototype,"pattern",2),s([J({type:String,reflect:!0})],D.prototype,"placeholder",2),s([J({type:Boolean,reflect:!0,attribute:"read-only"})],D.prototype,"readOnly",2),s([J({type:Boolean,reflect:!0})],D.prototype,"required",2),s([J({type:String,reflect:!0})],D.prototype,"type",2),s([J({type:String,reflect:!0})],D.prototype,"value",2),s([J({type:String,reflect:!0})],D.prototype,"name",2),s([J({type:Boolean})],D.prototype,"_hasPrefix",2),s([J({type:Boolean})],D.prototype,"_hasSuffix",2);customElements.get("w-textfield")||customElements.define("w-textfield",D);var Br=typeof window!="undefined";function Ro(){return customElements.get("w-toast-container")}function Qk(t,e){if(!Br)return;let r=Ro().init(),o={id:Date.now().toString(36)+Math.random().toString(36).slice(2,5),text:t,duration:5e3,type:"success",...e};return r.set(o),o}function Zk(t){return Br?Ro().init().del(t):void 0}function Kk(t,e){if(!Br)return;let r=Ro().init();return r.set({...r.get(t),...e}),r.get(t)}import{css as Wm,html as Ls,LitElement as eg}from"lit";import{state as tg}from"lit/decorators.js";import{repeat as rg}from"lit/directives/repeat.js";import{css as Gm}from"lit";var Pr=Gm`*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.bg-transparent{background-color:#0000}.border-2{border-width:2px}.rounded-8{border-radius:8px}.rounded-full{border-radius:9999px}.block{display:block}.flex{display:flex}.grid{display:grid}.shrink-0{flex-shrink:0}.auto-rows-auto{grid-auto-rows:auto}.overflow-hidden{overflow:hidden}.self-center{align-self:center}.bottom-16{bottom:1.6rem}.left-0{left:0}.right-0{right:0}.justify-center{justify-content:center}.justify-items-center{justify-items:center}.fixed{position:fixed}.relative{position:relative}.static{position:static}.z-50{z-index:50}.s-bg-negative-subtle{background-color:var(--w-s-color-background-negative-subtle)}.s-bg-positive-subtle{background-color:var(--w-s-color-background-positive-subtle)}.s-bg-warning-subtle{background-color:var(--w-s-color-background-warning-subtle)}.s-text{color:var(--w-s-color-text)}.s-icon{color:var(--w-s-color-icon)}.s-icon-negative{color:var(--w-s-color-icon-negative)}.s-icon-positive{color:var(--w-s-color-icon-positive)}.s-icon-warning{color:var(--w-s-color-icon-warning)}.hover\\:s-icon-hover:hover{color:var(--w-s-color-icon-hover)}.active\\:s-icon-active:active{color:var(--w-s-color-icon-active)}.s-border-negative-subtle{border-color:var(--w-s-color-border-negative-subtle)}.s-border-positive-subtle{border-color:var(--w-s-color-border-positive-subtle)}.s-border-warning-subtle{border-color:var(--w-s-color-border-warning-subtle)}.w-full{width:100%}.h-\\[16px\\]{height:16px}.w-\\[16px\\]{width:16px}.mx-8{margin-left:.8rem;margin-right:.8rem}.mx-auto{margin-left:auto;margin-right:auto}.last-child\\:mb-0>:last-child{margin-bottom:0}.ml-auto{margin-left:auto}.mr-8{margin-right:.8rem}.mt-16{margin-top:1.6rem}.m-\\[8px\\]{margin:8px}.p-8{padding:.8rem}.py-4{padding-top:.4rem;padding-bottom:.4rem}.p-\\[8px\\]{padding:8px}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.translate-z-0{--w-translate-z:0rem;transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transform{transform:translateX(var(--w-translate-x))translateY(var(--w-translate-y))translateZ(var(--w-translate-z))rotate(var(--w-rotate))rotateX(var(--w-rotate-x))rotateY(var(--w-rotate-y))rotateZ(var(--w-rotate-z))skewX(var(--w-skew-x))skewY(var(--w-skew-y))scaleX(var(--w-scale-x))scaleY(var(--w-scale-y))scaleZ(var(--w-scale-z))}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width:480px){.sm\\:mx-16{margin-left:1.6rem;margin-right:1.6rem}}`;var Vo={wrapper:"fixed transform translate-z-0 bottom-16 left-0 right-0 mx-8 sm:mx-16 z-50 pointer-events-none",base:"grid auto-rows-auto justify-items-center justify-center mx-auto pointer-events-none",content:"w-full"},Jt=class extends eg{constructor(){super(...arguments);this._toasts=new Map}connectedCallback(){super.connectedCallback(),this._interval=setInterval(()=>{let r=[],o=[];for(let i of this._toasts)Date.now()<=i[1].duration?r.push(i):o.push(i);let a=[];for(let[i]of o){let n=this.renderRoot.querySelector(`#${i}`);a.push(n.collapse())}Promise.all(a).then(()=>{r.length!==this._toasts.size&&(this._toasts=new Map(r))})},500)}disconnectedCallback(){super.disconnectedCallback(),this._interval&&clearTimeout(this._interval)}static init(){let r=document.querySelector("w-toast-container");return r||(r=document.createElement("w-toast-container"),document.body.appendChild(r)),r}get _toastsArray(){return Array.from(this._toasts).map(([,r])=>r)}get(r){if(!r)throw new Error('undefined "id" given when attempting to retrieve toast');if(typeof r!="string"&&!Number.isInteger(r))throw new Error('"id" must be number or string when attempting to retrieve toast');return this._toasts.get(r)}set(r){var a,i,n;if(!r.id)throw new Error('invalid or undefined "id" on toast object');let o=this._toasts.set(r.id,{id:r.id,type:(a=r.type)!=null?a:"success",text:(i=r.text)!=null?i:"",canclose:(n=r.canclose)!=null?n:!1,duration:Date.now()+(r.duration||5e3)});return this._toasts=new Map(Array.from(this._toasts)),o}async del(r){if(!r)throw new Error('undefined "id" given when attempting to retrieve toast');if(typeof r!="string"&&!Number.isInteger(r))throw new Error('"id" must be number or string when attempting to retrieve toast');let o=this.renderRoot.querySelector(`#${r}`);if(!this._toasts.has(r))return!1;await o.collapse();let a=this._toasts.delete(r);return this._toasts=new Map(Array.from(this._toasts)),a}render(){return Ls`
|
|
4243
|
+
<aside class="${Vo.wrapper}">
|
|
4244
|
+
<div class="${Vo.base}" id="w-toast-container-list">
|
|
4245
|
+
${rg(this._toastsArray,r=>r.id,r=>Ls` <w-toast
|
|
4246
|
+
class="${Vo.content}"
|
|
4247
|
+
id="${r.id}"
|
|
4248
|
+
type="${r.type}"
|
|
4249
|
+
text="${r.text}"
|
|
4250
|
+
?canclose=${r.canclose}
|
|
4251
|
+
@close=${()=>this.del(r.id)}>
|
|
3133
4252
|
</w-toast>`)}
|
|
3134
4253
|
</div>
|
|
3135
4254
|
</aside>
|
|
3136
|
-
`}};
|
|
4255
|
+
`}};Jt.styles=[E,Pr,Wm`
|
|
3137
4256
|
:host {
|
|
3138
4257
|
display: block;
|
|
3139
4258
|
}
|
|
3140
|
-
`]
|
|
3141
|
-
<div class="${
|
|
3142
|
-
<div class="${
|
|
3143
|
-
<div role="${this._role}" class="${
|
|
4259
|
+
`],s([tg()],Jt.prototype,"_toasts",2);customElements.get("w-toast-container")||customElements.define("w-toast-container",Jt);import{css as ig,html as $t,LitElement as ng}from"lit";var Io=typeof window!="undefined",Os=!0;if(Io){let t=window.matchMedia("(prefers-reduced-motion: reduce)"),e=({matches:r})=>Os=!r;t.addEventListener&&t.addEventListener("change",e),e(t)}var Ts=t=>{t.style.transition=null,t.style.backfaceVisibility=null,t.style.overflow=null},zs=t=>{let e=Os?"var(--f-expansion-duration, 0.3s)":"0.01s";t.style.transition=`height ${e}`,t.style.backfaceVisibility="hidden",t.style.overflow="hidden"},og=(t,e)=>()=>{t.style.height="auto",t.style.overflow=null,e&&e()},ag=t=>()=>{t&&t()},Rr=(t,e)=>{let r=(()=>{if(!e)return new Promise(i=>{e=i})})(),o=og(t,e);Ts(t),t.style.height="auto";let a=t.scrollHeight;if(Io&&requestAnimationFrame(()=>{t.addEventListener("transitionend",o,{once:!0}),t.style.height="0px",t.style.transitionTimingFunction="ease-out",zs(t),requestAnimationFrame(()=>t.style.height=a+"px")}),r)return r},Vr=(t,e)=>{let r=(()=>{if(!e)return new Promise(i=>{e=i})})(),o=ag(e);Ts(t);let a=t.scrollHeight;if(Io&&requestAnimationFrame(()=>{t.addEventListener("transitionend",o,{once:!0}),t.style.height=a+"px",t.style.transitionTimingFunction="ease-in",zs(t),requestAnimationFrame(()=>t.style.height="0px")}),r)return r};import{property as Ir,state as sg}from"lit/decorators.js";import{when as lg}from"lit/directives/when.js";var Ms=JSON.parse('{"toast.aria.error":["Fejl"],"toast.aria.successful":["Fuldf\xF8rt"],"toast.aria.warning":["Advarsel"]}');var Ns=JSON.parse('{"toast.aria.error":["Error"],"toast.aria.successful":["Successful"],"toast.aria.warning":["Warning"]}');var As=JSON.parse('{"toast.aria.error":["Virhe"],"toast.aria.successful":["Onnistui"],"toast.aria.warning":["Varoitus"]}');var Ds=JSON.parse('{"toast.aria.error":["Feil"],"toast.aria.successful":["Vellykket"],"toast.aria.warning":["Advarsel"]}');var Bs=JSON.parse('{"toast.aria.error":["Fel"],"toast.aria.successful":["Genomf\xF6rt"],"toast.aria.warning":["Varning"]}');var Se={wrapper:"relative overflow-hidden w-full",base:"flex group p-8 mt-16 rounded-8 border-2 pointer-events-auto transition-all",positive:"s-bg-positive-subtle s-border-positive-subtle s-text",warning:"s-bg-warning-subtle s-border-warning-subtle s-text",negative:"s-bg-negative-subtle s-border-negative-subtle s-text",iconBase:"shrink-0 rounded-full w-[16px] h-[16px] m-[8px]",iconPositive:"s-icon-positive",iconWarning:"s-icon-warning",iconNegative:"s-icon-negative",iconLoading:"animate-bounce",content:"self-center mr-8 py-4 last-child:mb-0",close:"bg-transparent ml-auto p-[8px] s-icon hover:s-icon-hover active:s-icon-active"},Ct,Ps,Rs,qe=class extends ng{constructor(){super();Oe(this,Ct);this.id=Date.now().toString(36)+Math.random().toString(36).slice(2,5);this.type="success";this.text="";this.canclose=!1;this._expanded=!1;I(Ns,Ds,As,Ms,Bs)}connectedCallback(){super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}updated(){!this._expanded&&this._wrapper&&Rr(this._wrapper,()=>this._expanded=!0)}get _wrapper(){var r,o;return(o=(r=this.renderRoot)==null?void 0:r.querySelector("section"))!=null?o:null}get _warning(){return this.type==="warning"}get _error(){return this.type==="error"}get _role(){return this._error||this._warning?"alert":"status"}get _typeLabel(){return this._warning?c._({id:"toast.aria.warning",message:"Warning",comment:"Default screenreader message for warning in toast component"}):this._error?c._({id:"toast.aria.error",message:"Error",comment:"Default screenreader message for error in toast component"}):c._({id:"toast.aria.successful",message:"Successful",comment:"Default screenreader message for successful in toast component"})}get _iconMarkup(){return this._warning?$t`<w-icon-warning-16></w-icon-warning-16>`:this._error?$t`<w-icon-error-16></w-icon-error-16>`:$t`<w-icon-success-16></w-icon-success-16>`}async collapse(){return new Promise(r=>{this._expanded&&this._wrapper?Vr(this._wrapper,r):r()})}close(){let r=new CustomEvent("close",{detail:{id:this.id},bubbles:!0,composed:!0});this.updateComplete.then(()=>this.dispatchEvent(r))}render(){return this.text?$t` <section class="${Se.wrapper}" aria-label="${this._typeLabel}">
|
|
4260
|
+
<div class="${R(this,Ct,Ps)}">
|
|
4261
|
+
<div class="${R(this,Ct,Rs)}">${this._iconMarkup}</div>
|
|
4262
|
+
<div role="${this._role}" class="${Se.content}">
|
|
3144
4263
|
<p>${this.text}</p>
|
|
3145
4264
|
</div>
|
|
3146
|
-
${
|
|
3147
|
-
<button class="${
|
|
4265
|
+
${lg(this.canclose===!0,()=>$t`
|
|
4266
|
+
<button class="${Se.close}" @click="${this.close}">
|
|
3148
4267
|
<w-icon-close-16></w-icon-close-16>
|
|
3149
4268
|
</button>
|
|
3150
4269
|
`)}
|
|
3151
4270
|
</div>
|
|
3152
|
-
</section
|
|
4271
|
+
</section>`:$t``}};Ct=new WeakSet,Ps=function(){return w([Se.base,this.type==="success"&&Se.positive,this.type==="warning"&&Se.warning,this.type==="error"&&Se.negative])},Rs=function(){return w([Se.iconBase,this.type==="success"&&Se.iconPositive,this.type==="warning"&&Se.iconWarning,this.type==="error"&&Se.iconNegative])},qe.styles=[E,Pr,ig`
|
|
3153
4272
|
:host {
|
|
3154
4273
|
display: block;
|
|
3155
4274
|
}
|
|
3156
|
-
`]
|
|
4275
|
+
`],s([Ir({type:String,attribute:!0,reflect:!0})],qe.prototype,"id",2),s([Ir({type:String,attribute:!0,reflect:!0})],qe.prototype,"type",2),s([Ir({type:String,attribute:!0,reflect:!0})],qe.prototype,"text",2),s([Ir({type:Boolean,attribute:!0,reflect:!0})],qe.prototype,"canclose",2),s([sg()],qe.prototype,"_expanded",2);customElements.get("w-toast")||customElements.define("w-toast",qe);import{css as cg,html as Fo}from"lit";import Vs from"@warp-ds/elements-core";import{ifDefined as dg}from"lit/directives/if-defined.js";var Ut=class extends Vs{constructor(){super(),this.show=!1,this._mounted=!1,this._removeElement=!1}willUpdate(){this._mounted||(this._removeElement=!this.show),this.show&&this._removeElement&&(this._removeElement=!1)}updated(){if(this._wrapper){if(!this._mounted){this._mounted=!0;return}this.show&&Rr(this._wrapper),!this.show&&!this._removeElement&&Vr(this._wrapper,()=>this._removeElement=!0)}}get _wrapper(){return this!=null?this:null}render(){return Fo`<div aria-hidden=${dg(this.show?void 0:"true")}>${this._removeElement?Fo``:Fo`<slot></slot>`}</div>`}};Le(Ut,"properties",{show:{type:Boolean,reflect:!0},_removeElement:{type:Boolean,state:!0}}),Le(Ut,"styles",[Vs.styles,cg`
|
|
3157
4276
|
:host {
|
|
3158
4277
|
display: block;
|
|
3159
4278
|
}
|
|
3160
|
-
`]);customElements.get("w-expand-transition")||customElements.define("w-expand-transition",
|
|
4279
|
+
`]);customElements.get("w-expand-transition")||customElements.define("w-expand-transition",Ut);import{html as ug}from"lit";import Is from"@warp-ds/elements-core";import{unsafeHTML as pg}from"lit/directives/unsafe-html.js";var Yt=class extends Is{get _markup(){return`<h${this.level}
|
|
3161
4280
|
style="margin: 0; font-weight: unset; font-size: unset; line-height: unset;"
|
|
3162
4281
|
>
|
|
3163
4282
|
<slot></slot>
|
|
3164
4283
|
</h${this.level}>
|
|
3165
|
-
`}render(){return this.level?
|
|
4284
|
+
`}render(){return this.level?pg(this._markup):ug`<slot></slot>`}};Le(Yt,"properties",{level:{type:Number}}),Le(Yt,"styles",[Is.styles]);customElements.get("w-unstyled-heading")||customElements.define("w-unstyled-heading",Yt);export{Ut as ExpandTransition,Rt as ModalCanCloseMixin,Vt as ModalProvidesCanCloseToSlotsMixin,Yt as UnstyledHeading,Ue as WarpAffix,tt as WarpAlert,Z as WarpAttention,ft as WarpBadge,je as WarpBox,Pt as WarpBreadcrumbs,X as WarpButton,st as WarpCard,Ze as WarpDeadToggle,oe as WarpExpandable,$e as WarpModal,It as WarpModalFooter,Ae as WarpModalHeader,vt as WarpPageIndicator,Ke as WarpPagination,De as WarpPill,ae as WarpSelect,ct as WarpStep,kt as WarpSteps,Et as WarpSwitch,D as WarpTextField,qe as WarpToast,Jt as WarpToastContainer,ht as ccAttention,Vu as ccBox,bt as ccBreadcrumbs,_ as ccButton,Me as ccCard,ee as ccExpandable,Hl as ccPrefix,He as ccSelect,jl as ccSuffix,Ge as ccinput,de as pillStyles,Zk as removeToast,Qk as toast,Kk as updateToast};
|
|
3166
4285
|
//# sourceMappingURL=index.js.map
|