UNPKG

iobroker.lovelace

Version:

With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI

5 lines 25.2 kB
export const __webpack_ids__=["3098"];export const __webpack_modules__={50875:function(e,t,i){i.d(t,{Eu:()=>r,hZ:()=>a,o9:()=>c});var o=i(27486),s=i(11259);const n=["#4269d0","#f4bd4a","#ff725c","#6cc5b0","#a463f2","#ff8ab7","#9c6b4e","#97bbf5","#01ab63","#9498a0","#094bad","#c99000","#d84f3e","#49a28f","#048732","#d96895","#8043ce","#7599d1","#7a4c31","#74787f","#6989f4","#ffd444","#ff957c","#8fe9d3","#62cc71","#ffadda","#c884ff","#badeff","#bf8b6d","#b6bac2","#927acc","#97ee3f","#bf3947","#9f5b00","#f48758","#8caed6","#f2b94f","#eff26e","#e43872","#d9b100","#9d7a00","#698cff","#d9d9d9","#00d27e","#d06800","#009f82","#c49200","#cbe8ff","#fecddf","#c27eb6","#8cd2ce","#c4b8d9","#f883b0","#a49100","#f48800","#27d0df","#a04a9b"];function r(e){return n[e%n.length]}function a(e,t){const i=t.getPropertyValue(`--graph-color-${e+1}`)||r(e);return(0,s.Rq)(i)}const c=(0,o.Z)((e=>n.map(((t,i)=>a(i,e)))),((e,t)=>e[0].getPropertyValue("--graph-color-1")===t[0].getPropertyValue("--graph-color-1")))},31146:function(e,t,i){i.d(t,{i:()=>s});const o=(0,i(93826).P)((e=>{history.replaceState({scrollPosition:e},"")}),300),s=e=>t=>({kind:"method",placement:"prototype",key:t.key,descriptor:{set(e){o(e),this[`__${String(t.key)}`]=e},get(){return this[`__${String(t.key)}`]||history.state?.scrollPosition},enumerable:!0,configurable:!0},finisher(i){const o=i.prototype.connectedCallback;i.prototype.connectedCallback=function(){o.call(this);const i=this[t.key];i&&this.updateComplete.then((()=>{const t=this.renderRoot.querySelector(e);t&&setTimeout((()=>{t.scrollTop=i}),0)}))}}})},85746:function(e,t,i){i.d(t,{V:()=>s});var o=i(87733);const s=(e,t)=>(e=>{switch(e){case"de":case"lb":return!0;default:return!1}})(t)?(0,o.f)(e):e.toLocaleLowerCase(t)},17170:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t),i.d(t,{HaSpinner:()=>h});var s=i(44249),n=i(72621),r=i(97677),a=i(43580),c=i(57243),d=i(15093),l=e([r]);r=(l.then?(await l)():l)[0];let h=(0,s.Z)([(0,d.Mo)("ha-spinner")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,d.Cb)()],key:"size",value:void 0},{kind:"method",key:"updated",value:function(e){if((0,n.Z)(i,"updated",this,3)([e]),e.has("size"))switch(this.size){case"tiny":this.style.setProperty("--ha-spinner-size","16px");break;case"small":this.style.setProperty("--ha-spinner-size","28px");break;case"medium":this.style.setProperty("--ha-spinner-size","48px");break;case"large":this.style.setProperty("--ha-spinner-size","68px");break;case void 0:this.style.removeProperty("--ha-progress-ring-size")}}},{kind:"field",static:!0,key:"styles",value:()=>[a.Z,c.iv`:host{--indicator-color:var( --ha-spinner-indicator-color, var(--primary-color) );--track-color:var(--ha-spinner-divider-color, var(--divider-color));--track-width:4px;--speed:3.5s;font-size:var(--ha-spinner-size, 48px)}`]}]}}),r.Z);o()}catch(e){o(e)}}))},25433:function(e,t,i){i.d(t,{MY:()=>b,Yc:()=>g,hb:()=>p,jV:()=>d,o1:()=>f,ri:()=>_,sS:()=>h});var o=i(73358),s=i(73850),n=i(59847),r=i(85746),a=i(96194);const c="ui.components.logbook.messages",d=["counter","proximity","sensor","zone"],l={triggered_by_numeric_state_of:"numeric state of",triggered_by_state_of:"state of",triggered_by_event:"event",triggered_by_time_pattern:"time pattern",triggered_by_time:"time",triggered_by_homeassistant_stopping:"ioBroker stopping",triggered_by_homeassistant_starting:"ioBroker starting"},h=async(e,t,i)=>u(e,t,void 0,void 0,i),u=(e,t,i,o,s,n)=>{if((o||n)&&(!o||0===o.length)&&(!n||0===n.length))return Promise.resolve([]);const r={type:"logbook/get_events",start_time:t};return i&&(r.end_time=i),o?.length&&(r.entity_ids=o),n?.length&&(r.device_ids=n),s&&(r.context_id=s),e.callWS(r)},g=(e,t,i,o,s,n)=>{if((s||n)&&(!s||0===s.length)&&(!n||0===n.length))return Promise.reject("No entities or devices");const r={type:"logbook/event_stream",start_time:i,end_time:o};return s?.length&&(r.entity_ids=s),n?.length&&(r.device_ids=n),e.connection.subscribeMessage((e=>t(e)),r)},f=(e,t)=>({entity_id:e.entity_id,state:t,attributes:{device_class:e?.attributes.device_class,source_type:e?.attributes.source_type,has_date:e?.attributes.has_date,has_time:e?.attributes.has_time,entity_picture_local:o.iY.has((0,s.M)(e.entity_id))?void 0:e?.attributes.entity_picture_local,entity_picture:o.iY.has((0,s.M)(e.entity_id))?void 0:e?.attributes.entity_picture}}),p=(e,t)=>{for(const i of Object.keys(l)){const o=l[i];if(t.startsWith(o))return t.replace(o,`${e(`ui.components.logbook.${i}`)}`)}return t},_=(e,t,i,s,n)=>{switch(n){case"device_tracker":case"person":return"not_home"===i?t(`${c}.was_away`):"home"===i?t(`${c}.was_at_home`):t(`${c}.was_at_state`,{state:i});case"sun":return t("above_horizon"===i?`${c}.rose`:`${c}.set`);case"binary_sensor":{const n=i===o.uo,a=i===o.lC,d=s.attributes.device_class;if(d&&(n||a))return t(`${c}.${n?"detected_device_classes":"cleared_device_classes"}.${d}`,{device_class:(0,r.V)(t(`component.binary_sensor.entity_component.${d}.name`)||d,e.language)})||t(`${c}.${n?"detected_device_class":"cleared_device_class"}`,{device_class:(0,r.V)(t(`component.binary_sensor.entity_component.${d}.name`)||d,e.language)});break}case"cover":switch(i){case"open":return t(`${c}.was_opened`);case"opening":return t(`${c}.is_opening`);case"closing":return t(`${c}.is_closing`);case"closed":return t(`${c}.was_closed`)}break;case"event":return t(`${c}.detected_event_no_type`);case"lock":switch(i){case"unlocked":return t(`${c}.was_unlocked`);case"locking":return t(`${c}.is_locking`);case"unlocking":return t(`${c}.is_unlocking`);case"opening":return t(`${c}.is_opening`);case"open":return t(`${c}.is_opened`);case"locked":return t(`${c}.was_locked`);case"jammed":return t(`${c}.is_jammed`)}}return i===o.uo?t(`${c}.turned_on`):i===o.lC?t(`${c}.turned_off`):i===a.lz?t(`${c}.became_unknown`):i===a.nZ?t(`${c}.became_unavailable`):e.localize(`${c}.changed_to_state`,{state:s?e.formatEntityState(s,i):i})},b=e=>"sensor"!==(0,n.N)(e)||void 0===e.attributes.unit_of_measurement&&void 0===e.attributes.state_class},16581:function(e,t,i){i.a(e,(async function(e,t){try{var o=i(44249),s=i(72621),n=(i(92745),i(9359),i(56475),i(31526),i(52924),i(57243)),r=i(15093),a=i(72344),c=i(59847),d=i(93826),l=i(17170),h=i(25433),u=i(75244),g=i(4242),f=i(82480),p=e([l,f]);[l,f]=p.then?(await p)():p;const _=(e,t)=>new Date(e.getTime()-1e3*t).getTime()/1e3,b=(e,t)=>(void 0!==e||void 0!==t)&&(!e||!t||e.length!==t.length||e.some((e=>!t.includes(e)))||t.some((t=>!e.includes(t))));(0,o.Z)([(0,r.Mo)("ha-logbook")],(function(e,t){class i extends t{constructor(...t){super(...t),e(this)}}return{F:i,d:[{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"time",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"entityIds",value:void 0},{kind:"field",decorators:[(0,r.Cb)({attribute:!1})],key:"deviceIds",value:void 0},{kind:"field",decorators:[(0,r.Cb)({type:Boolean})],key:"narrow",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,reflect:!0})],key:"virtualize",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-icon"})],key:"noIcon",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"no-name"})],key:"noName",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"show-indicator"})],key:"showIndicator",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({type:Boolean,attribute:"relative-time"})],key:"relativeTime",value:()=>!1},{kind:"field",decorators:[(0,r.Cb)({attribute:"show-more-link",type:Boolean})],key:"showMoreLink",value:()=>!0},{kind:"field",decorators:[(0,r.SB)()],key:"_logbookEntries",value:void 0},{kind:"field",decorators:[(0,r.SB)()],key:"_traceContexts",value:()=>({})},{kind:"field",decorators:[(0,r.SB)()],key:"_userIdToName",value:()=>({})},{kind:"field",decorators:[(0,r.SB)()],key:"_error",value:void 0},{kind:"field",key:"_unsubLogbook",value:void 0},{kind:"field",key:"_liveUpdatesEnabled",value:()=>!0},{kind:"field",key:"_pendingStreamMessages",value:()=>[]},{kind:"field",key:"_throttleGetLogbookEntries",value(){return(0,d.P)((()=>this._getLogBookData()),1e3)}},{kind:"method",key:"render",value:function(){return(0,a.p)(this.hass,"logbook")?this._error?n.dy`<div class="no-entries"> ${`${this.hass.localize("ui.components.logbook.retrieval_error")}: ${this._error}`} </div>`:void 0===this._logbookEntries?n.dy` <div class="progress-wrapper"> <ha-spinner></ha-spinner> </div> `:0===this._logbookEntries.length?n.dy`<div class="no-entries"> ${this.hass.localize("ui.components.logbook.entries_not_found")} </div>`:n.dy` <ha-logbook-renderer .hass="${this.hass}" .narrow="${this.narrow}" .virtualize="${this.virtualize}" .noIcon="${this.noIcon}" .noName="${this.noName}" .showIndicator="${this.showIndicator}" .relativeTime="${this.relativeTime}" .entries="${this._logbookEntries}" .traceContexts="${this._traceContexts}" .userIdToName="${this._userIdToName}" @hass-logbook-live="${this._handleLogbookLive}"></ha-logbook-renderer> `:n.Ld}},{kind:"method",key:"refresh",value:async function(e=!1){(e||!this._unsubLogbook&&void 0!==this._logbookEntries)&&(this._throttleGetLogbookEntries.cancel(),this._updateTraceContexts.cancel(),this._updateUsers.cancel(),this._unsubscribe(!0),this._liveUpdatesEnabled=!0,e?this._getLogBookData():this._throttleGetLogbookEntries())}},{kind:"method",key:"shouldUpdate",value:function(e){if(1!==e.size||!e.has("hass"))return!0;const t=e.get("hass");return!t||t.localize!==this.hass.localize}},{kind:"method",key:"willUpdate",value:function(e){let t=e.has("time");for(const i of["entityIds","deviceIds"]){if(!e.has(i))continue;const o=e.get(i),s=this[i];if(b(o,s)){t=!0;break}}t&&this.refresh(!0)}},{kind:"method",key:"_handleLogbookLive",value:function(e){e.detail.enable&&!this._liveUpdatesEnabled&&(this._pendingStreamMessages.forEach((e=>this._processStreamMessage(e))),this._pendingStreamMessages=[]),this._liveUpdatesEnabled=e.detail.enable}},{kind:"get",key:"_filterAlwaysEmptyResults",value:function(){const e=this.entityIds,t=this.deviceIds;return Boolean(e||t)&&(!e||0===e.length)&&(!t||0===t.length)}},{kind:"method",key:"_unsubscribe",value:function(e){this._unsubLogbook&&(this._unsubLogbook.then((e=>e())),this._unsubLogbook=void 0,this._logbookEntries=e?void 0:[],this._pendingStreamMessages=[])}},{kind:"method",key:"connectedCallback",value:function(){(0,s.Z)(i,"connectedCallback",this,3)([]),this.hasUpdated&&this._subscribeLogbookPeriod(this._calculateLogbookPeriod())}},{kind:"method",key:"disconnectedCallback",value:function(){(0,s.Z)(i,"disconnectedCallback",this,3)([]),this._unsubscribe(!0)}},{kind:"method",key:"_calculateLogbookPeriod",value:function(){const e=new Date;if("range"in this.time)return{now:e,startTime:this.time.range[0],endTime:this.time.range[1],purgeBeforePythonTime:void 0};if("recent"in this.time){const t=_(e,this.time.recent);return{now:e,startTime:new Date(1e3*t),endTime:new Date(e.getTime()+31536e6),purgeBeforePythonTime:_(e,this.time.recent)}}throw new Error("Unexpected time specified")}},{kind:"method",key:"_subscribeLogbookPeriod",value:async function(e){if(!this._unsubLogbook)try{this._unsubLogbook=(0,h.Yc)(this.hass,(e=>{this._processOrQueueStreamMessage(e)}),e.startTime.toISOString(),e.endTime.toISOString(),this.entityIds,this.deviceIds),await this._unsubLogbook}catch(e){this._unsubLogbook=void 0,this._error=e}}},{kind:"method",key:"_getLogBookData",value:async function(){if(this._error=void 0,this._filterAlwaysEmptyResults)return void this._unsubscribe(!1);const e=this._calculateLogbookPeriod();e.startTime>e.now?this._unsubscribe(!1):(this._updateUsers(),this.hass.user?.is_admin&&this._updateTraceContexts(),this._subscribeLogbookPeriod(e))}},{kind:"field",key:"_nonExpiredRecords",value(){return e=>this._logbookEntries?e?this._logbookEntries.filter((t=>t.when>e)):this._logbookEntries:[]}},{kind:"field",key:"_processOrQueueStreamMessage",value(){return e=>{this._liveUpdatesEnabled?this._processStreamMessage(e):this._pendingStreamMessages.push(e)}}},{kind:"field",key:"_processStreamMessage",value(){return e=>{const t="recent"in this.time?_(new Date,this.time.recent):void 0,i=[...e.events].reverse();if(!this._logbookEntries||!this._logbookEntries.length)return void(this._logbookEntries=i);if(!i.length)return;const o=this._nonExpiredRecords(t);o.length?i[i.length-1].when>o[0].when?this._logbookEntries=i.concat(o):o[o.length-1].when>i[0].when?this._logbookEntries=o.concat(i):this._logbookEntries=o.concat(i).sort(((e,t)=>t.when-e.when)):this._logbookEntries=i}}},{kind:"field",key:"_updateTraceContexts",value(){return(0,d.P)((async()=>{this._traceContexts=await(0,u.U_)(this.hass)}),6e4)}},{kind:"field",key:"_updateUsers",value(){return(0,d.P)((async()=>{const e={},t=this.hass.user?.is_admin&&(0,g.uh)(this.hass);for(const t of Object.values(this.hass.states))t.attributes.user_id&&"person"===(0,c.N)(t)&&(e[t.attributes.user_id]=t.attributes.friendly_name);if(t){const i=await t;for(const t of i)t.id in e||(e[t.id]=t.name)}this._userIdToName=e}),6e4)}},{kind:"get",static:!0,key:"styles",value:function(){return[n.iv`:host{display:block}:host([virtualize]){height:100%}.no-entries{text-align:center;padding:16px;color:var(--secondary-text-color)}.progress-wrapper{display:flex;justify-content:center;height:100%;align-items:center}`]}}]}}),n.oi);t()}catch(e){t(e)}}))},18573:function(e,t,i){i.a(e,(async function(e,o){try{i.r(t),i.d(t,{DEFAULT_HOURS_TO_SHOW:()=>m,HuiLogbookCard:()=>k});var s=i(44249),n=i(72621),r=(i(9359),i(70104),i(57243)),a=i(15093),c=i(35359),d=i(27486),l=i(72344),h=i(82393),u=(i(54977),i(16581)),g=i(69223),f=i(29401),p=(i(62577),i(41063)),_=i(95262),b=e([u]);u=(b.then?(await b)():b)[0];const m=24;let k=(0,s.Z)([(0,a.Mo)("hui-logbook-card")],(function(e,t){class o extends t{constructor(...t){super(...t),e(this)}}return{F:o,d:[{kind:"method",static:!0,key:"getConfigElement",value:async function(){return await Promise.all([i.e("46379"),i.e("24199"),i.e("27506"),i.e("99287"),i.e("27090"),i.e("3049"),i.e("71958"),i.e("47973")]).then(i.bind(i,31075)),document.createElement("hui-logbook-card-editor")}},{kind:"method",static:!0,key:"getStubConfig",value:function(e,t,i){return{target:{entity_id:(0,g.j)(e,3,t,i,["light","switch"])}}}},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"hass",value:void 0},{kind:"field",decorators:[(0,a.Cb)({attribute:!1})],key:"layout",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_config",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_time",value:void 0},{kind:"field",decorators:[(0,a.SB)()],key:"_targetPickerValue",value:()=>({})},{kind:"method",key:"getCardSize",value:function(){return 9+(this._config?.title?1:0)}},{kind:"method",key:"validateTarget",value:function(e){if((!e.entities||e.entities.length)&&(!e.target||e.target.area_id?.length||e.target.device_id?.length||e.target.entity_id?.length||e.target.floor_id?.length||e.target.label_id?.length))return e.entities?{entity_id:(0,f.A)(e.entities).map((e=>e.entity))}:e.target?.entity_id?{...e.target,entity_id:(0,f.A)((0,_.r)(e.target.entity_id)).map((e=>e.entity))}:e.target}},{kind:"method",key:"setConfig",value:function(e){const t=this.validateTarget(e);if(!t)throw new Error("The provided target in the logbook card has no entities. Targets can include entities, devices, labels, or areas, with devices, areas, and labels resolving to entities.");this._config={hours_to_show:m,...e},this._time={recent:60*this._config.hours_to_show*60},this._targetPickerValue=t}},{kind:"method",key:"_getEntityIds",value:function(){const e=this._getMemoizedEntityIds(this._targetPickerValue,this.hass.entities,this.hass.devices,this.hass.areas);if(0!==e.length)return e}},{kind:"field",key:"_getMemoizedEntityIds",value(){return(0,d.Z)(((e,t,i,o)=>(0,p.dh)(this.hass,e,t,i,o)))}},{kind:"method",key:"update",value:function(e){(0,n.Z)(o,"update",this,3)([e]),e.has("layout")&&this.toggleAttribute("ispanel","panel"===this.layout)}},{kind:"method",key:"updated",value:function(e){if((0,n.Z)(o,"updated",this,3)([e]),!this._config||!this.hass)return;const t=e.has("_config"),i=e.has("hass"),s=e.get("hass"),r=e.get("_config");(i&&s?.themes!==this.hass.themes||t&&r?.theme!==this._config.theme)&&(0,h.R)(this,this.hass.themes,this._config.theme)}},{kind:"method",key:"render",value:function(){return this.hass&&this._config?(0,l.p)(this.hass,"logbook")?r.dy` <ha-card .header="${this._config.title}" class="${(0,c.$)({"no-header":!this._config.title})}"> <div class="content"> <ha-logbook .hass="${this.hass}" .time="${this._time}" .entityIds="${this._getEntityIds()}" narrow relative-time virtualize></ha-logbook> </div> </ha-card> `:r.dy` <hui-warning> ${this.hass.localize("ui.components.logbook.not_loaded",{platform:"logbook"})}</hui-warning> `:r.Ld}},{kind:"get",static:!0,key:"styles",value:function(){return[r.iv`ha-card{height:100%;display:flex;flex-direction:column;justify-content:space-between}.content{padding:0 16px 16px}.no-header .content{padding-top:16px}ha-logbook{height:385px;display:block}:host([ispanel]) .content,:host([ispanel]) ha-logbook{height:100%}`]}}]}}),r.oi);o()}catch(e){o(e)}}))},47641:function(e,t,i){i.d(t,{o:()=>o});const o=async()=>{await i.e("31026").then(i.bind(i,35714))}},88238:function(e,t,i){i.d(t,{RU:()=>s,X1:()=>o,u4:()=>n,zC:()=>r});const o=e=>`https://brands.home-assistant.io/${e.brand?"brands/":""}${e.useFallback?"_/":""}${e.domain}/${e.darkOptimized?"dark_":""}${e.type}.png`,s=e=>`https://brands.home-assistant.io/hardware/${e.category}/${e.darkOptimized?"dark_":""}${e.manufacturer}${e.model?`_${e.model}`:""}.png`,n=e=>e.split("/")[4],r=e=>e.startsWith("https://brands.home-assistant.io/")},48734:function(e,t,i){i.a(e,(async function(e,o){try{i.d(t,{P5:()=>u,Ve:()=>f});var s=i(16485),n=(i(9359),i(70104),i(92519),i(42179),i(89256),i(24931),i(88463),i(57449),i(19814),e([s]));s=(n.then?(await n)():n)[0];const r=new Set,a=new Map;let c,d="ltr",l="en";const h="undefined"!=typeof MutationObserver&&"undefined"!=typeof document&&void 0!==document.documentElement;if(h){const p=new MutationObserver(g);d=document.documentElement.dir||"ltr",l=document.documentElement.lang||navigator.language,p.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function u(...e){e.map((e=>{const t=e.$code.toLowerCase();a.has(t)?a.set(t,Object.assign(Object.assign({},a.get(t)),e)):a.set(t,e),c||(c=e)})),g()}function g(){h&&(d=document.documentElement.dir||"ltr",l=document.documentElement.lang||navigator.language),[...r.keys()].map((e=>{"function"==typeof e.requestUpdate&&e.requestUpdate()}))}class f{constructor(e){this.host=e,this.host.addController(this)}hostConnected(){r.add(this.host)}hostDisconnected(){r.delete(this.host)}dir(){return`${this.host.dir||d}`.toLowerCase()}lang(){return`${this.host.lang||l}`.toLowerCase()}getTranslationData(e){var t,i;const o=new Intl.Locale(e.replace(/_/g,"-")),s=null==o?void 0:o.language.toLowerCase(),n=null!==(i=null===(t=null==o?void 0:o.region)||void 0===t?void 0:t.toLowerCase())&&void 0!==i?i:"";return{locale:o,language:s,region:n,primary:a.get(`${s}-${n}`),secondary:a.get(s)}}exists(e,t){var i;const{primary:o,secondary:s}=this.getTranslationData(null!==(i=t.lang)&&void 0!==i?i:this.lang());return t=Object.assign({includeFallback:!1},t),!!(o&&o[e]||s&&s[e]||t.includeFallback&&c&&c[e])}term(e,...t){const{primary:i,secondary:o}=this.getTranslationData(this.lang());let s;if(i&&i[e])s=i[e];else if(o&&o[e])s=o[e];else{if(!c||!c[e])return console.error(`No translation found for: ${String(e)}`),String(e);s=c[e]}return"function"==typeof s?s(...t):s}date(e,t){return e=new Date(e),new Intl.DateTimeFormat(this.lang(),t).format(e)}number(e,t){return e=Number(e),isNaN(e)?"":new Intl.NumberFormat(this.lang(),t).format(e)}relativeTime(e,t,i){return new Intl.RelativeTimeFormat(this.lang(),i).format(e,t)}}o()}catch(_){o(_)}}))},68783:function(e,t,i){i.a(e,(async function(e,o){try{i.d(t,{A:()=>l});var s=i(64699),n=i(15073),r=i(81048),a=i(31027),c=i(57243),d=e([n]);n=(d.then?(await d)():d)[0];var l=class extends a.P{constructor(){super(...arguments),this.localize=new n.V(this)}render(){return c.dy` <svg part="base" class="spinner" role="progressbar" aria-label="${this.localize.term("loading")}"> <circle class="spinner__track"></circle> <circle class="spinner__indicator"></circle> </svg> `}};l.styles=[r.N,s.D],o()}catch(e){o(e)}}))},31027:function(e,t,i){i.d(t,{P:()=>a});i(9359),i(31526);var o,s=i(52812),n=i(57243),r=i(15093),a=class extends n.oi{constructor(){super(),(0,s.Ko)(this,o,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach((([e,t])=>{this.constructor.define(e,t)}))}emit(e,t){const i=new CustomEvent(e,(0,s.ih)({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(i),i}static define(e,t=this,i={}){const o=customElements.get(e);if(!o){try{customElements.define(e,t,i)}catch(o){customElements.define(e,class extends t{},i)}return}let s=" (unknown version)",n=s;"version"in t&&t.version&&(s=" v"+t.version),"version"in o&&o.version&&(n=" v"+o.version),s&&n&&s===n||console.warn(`Attempted to register <${e}>${s}, but <${e}>${n} has already been registered.`)}attributeChangedCallback(e,t,i){(0,s.ac)(this,o)||(this.constructor.elementProperties.forEach(((e,t)=>{e.reflect&&null!=this[t]&&this.initialReflectedProperties.set(t,this[t])})),(0,s.qx)(this,o,!0)),super.attributeChangedCallback(e,t,i)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach(((t,i)=>{e.has(i)&&null==this[i]&&(this[i]=t)}))}};o=new WeakMap,a.version="2.20.1",a.dependencies={},(0,s.u2)([(0,r.Cb)()],a.prototype,"dir",2),(0,s.u2)([(0,r.Cb)()],a.prototype,"lang",2)},15073:function(e,t,i){i.a(e,(async function(e,o){try{i.d(t,{V:()=>a});var s=i(21262),n=i(48734),r=e([n,s]);[n,s]=r.then?(await r)():r;var a=class extends n.Ve{};(0,n.P5)(s.K),o()}catch(e){o(e)}}))},21262:function(e,t,i){i.a(e,(async function(e,o){try{i.d(t,{K:()=>a});var s=i(48734),n=e([s]);s=(n.then?(await n)():n)[0];var r={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>0===e?"No options selected":1===e?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};(0,s.P5)(r);var a=r;o()}catch(e){o(e)}}))},64699:function(e,t,i){i.d(t,{D:()=>o});var o=i(57243).iv`:host{--track-width:2px;--track-color:rgb(128 128 128 / 25%);--indicator-color:var(--sl-color-primary-600);--speed:2s;display:inline-flex;width:1em;height:1em;flex:none}.spinner{flex:1 1 auto;height:100%;width:100%}.spinner__indicator,.spinner__track{fill:none;stroke-width:var(--track-width);r:calc(0.5em - var(--track-width)/ 2);cx:0.5em;cy:0.5em;transform-origin:50% 50%}.spinner__track{stroke:var(--track-color);transform-origin:0% 0%}.spinner__indicator{stroke:var(--indicator-color);stroke-linecap:round;stroke-dasharray:150% 75%;animation:spin var(--speed) linear infinite}@keyframes spin{0%{transform:rotate(0deg);stroke-dasharray:0.05em,3em}50%{transform:rotate(450deg);stroke-dasharray:1.375em,1.375em}100%{transform:rotate(1080deg);stroke-dasharray:0.05em,3em}}`},52812:function(e,t,i){i.d(t,{EZ:()=>g,Ko:()=>b,ac:()=>_,ih:()=>u,qx:()=>m,u2:()=>f});var o=Object.defineProperty,s=Object.defineProperties,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,l=e=>{throw TypeError(e)},h=(e,t,i)=>t in e?o(e,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[t]=i,u=(e,t)=>{for(var i in t||(t={}))c.call(t,i)&&h(e,i,t[i]);if(a)for(var i of a(t))d.call(t,i)&&h(e,i,t[i]);return e},g=(e,t)=>s(e,r(t)),f=(e,t,i,s)=>{for(var r,a=s>1?void 0:s?n(t,i):t,c=e.length-1;c>=0;c--)(r=e[c])&&(a=(s?r(t,i,a):r(a))||a);return s&&a&&o(t,i,a),a},p=(e,t,i)=>t.has(e)||l("Cannot "+i),_=(e,t,i)=>(p(e,t,"read from private field"),i?i.call(e):t.get(e)),b=(e,t,i)=>t.has(e)?l("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),m=(e,t,i,o)=>(p(e,t,"write to private field"),o?o.call(e,i):t.set(e,i),i)},81048:function(e,t,i){i.d(t,{N:()=>o});var o=i(57243).iv`:host{box-sizing:border-box}:host *,:host ::after,:host ::before{box-sizing:inherit}[hidden]{display:none!important}`},97677:function(e,t,i){i.a(e,(async function(e,o){try{i.d(t,{Z:()=>s.A});var s=i(68783),n=(i(64699),i(15073)),r=i(21262),a=(i(81048),i(31027),i(52812),e([n,r,s]));[n,r,s]=a.then?(await a)():a,o()}catch(e){o(e)}}))},43580:function(e,t,i){i.d(t,{Z:()=>o.D});var o=i(64699);i(52812)}}; //# sourceMappingURL=3098.9d1aa34047f6ce27.js.map