/******/ (function() { // webpackBootstrap
/******/ "use strict";
// UNUSED EXPORTS: appendHeaderMessageToTitle, getConfirmationHeaderMessage, getNotificationHeaderMessage, getNotificationTestId
;// ../../node_modules/@lit/reactive-element/css-tag.js
/**
* @license
* Copyright 2019 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const css_tag_t=globalThis,e=css_tag_t.ShadowRoot&&(void 0===css_tag_t.ShadyCSS||css_tag_t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap();class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e;}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet()).replaceSync(this.cssText),e&&o.set(s,t));}return t;}toString(){return this.cssText;}}const r=t=>new n("string"==typeof t?t:t+"",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");})(s)+t[o+1],t[0]);return new n(o,t,s);},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map(t=>t instanceof CSSStyleSheet?t:t.styleSheet);else for(const e of o){const o=document.createElement("style"),n=css_tag_t.litNonce;void 0!==n&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o);}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const s of t.cssRules)e+=s.cssText;return r(e);})(t):t;
;// ../../node_modules/@lit/reactive-element/reactive-element.js
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{is:reactive_element_i,defineProperty:reactive_element_e,getOwnPropertyDescriptor:h,getOwnPropertyNames:reactive_element_r,getOwnPropertySymbols:reactive_element_o,getPrototypeOf:reactive_element_n}=Object,a=globalThis,reactive_element_c=a.trustedTypes,l=reactive_element_c?reactive_element_c.emptyScript:"",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t);}return t;},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t);}catch(t){i=null;}}return i;}},f=(t,s)=>!reactive_element_i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol("metadata"),a.litPropertyMetadata??=new WeakMap();class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t);}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()];}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&reactive_element_e(this.prototype,t,h);}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s];},set(t){this[s]=t;}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i);},configurable:!0,enumerable:!0};}static getPropertyOptions(t){return this.elementProperties.get(t)??b;}static _$Ei(){if(this.hasOwnProperty(d("elementProperties")))return;const t=reactive_element_n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties);}static finalize(){if(this.hasOwnProperty(d("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d("properties"))){const t=this.properties,s=[...reactive_element_r(t),...reactive_element_o(t)];for(const i of s)this.createProperty(i,t[i]);}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i);}this._$Eh=new Map();for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t);}this.elementStyles=this.finalizeStyles(this.styles);}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(c(s));}else void 0!==s&&i.push(c(s));return i;}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:"string"==typeof i?i:"string"==typeof t?t.toLowerCase():void 0;}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev();}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map(),this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this));}addController(t){(this._$EO??=new Set()).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.();}removeController(t){this._$EO?.delete(t);}_$E_(){const t=new Map(),s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t);}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return S(t,this.constructor.elementStyles),t;}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.());}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.());}attributeChangedCallback(t,s,i){this._$AK(t,i);}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null;}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h="function"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=h.fromAttribute(s,t.type)??this._$Ej?.get(e)??null,this._$Em=null;}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i);}!1===this.isUpdatePending&&(this._$ES=this._$EP());}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map()).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set()).add(t));}async _$EP(){this.isUpdatePending=!0;try{await this._$ES;}catch(t){Promise.reject(t);}const t=this.scheduleUpdate();return null!=t&&(await t),!this.isUpdatePending;}scheduleUpdate(){return this.performUpdate();}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0;}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e);}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach(t=>t.hostUpdate?.()),this.update(s)):this._$EM();}catch(s){throw t=!1,this._$EM(),s;}t&&this._$AE(s);}willUpdate(t){}_$AE(t){this._$EO?.forEach(t=>t.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t);}_$EM(){this._$AL=new Map(),this.isUpdatePending=!1;}get updateComplete(){return this.getUpdateComplete();}getUpdateComplete(){return this._$ES;}shouldUpdate(t){return!0;}update(t){this._$Eq&&=this._$Eq.forEach(t=>this._$ET(t,this[t])),this._$EM();}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[d("elementProperties")]=new Map(),y[d("finalized")]=new Map(),p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push("2.1.0");
;// ../../node_modules/lit-html/lit-html.js
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const lit_html_t=globalThis,lit_html_i=lit_html_t.trustedTypes,lit_html_s=lit_html_i?lit_html_i.createPolicy("lit-html",{createHTML:t=>t}):void 0,lit_html_e="$lit$",lit_html_h=`lit$${Math.random().toFixed(9).slice(2)}$`,lit_html_o="?"+lit_html_h,lit_html_n=`<${lit_html_o}>`,lit_html_r=document,lit_html_l=()=>lit_html_r.createComment(""),lit_html_c=t=>null===t||"object"!=typeof t&&"function"!=typeof t,lit_html_a=Array.isArray,lit_html_u=t=>lit_html_a(t)||"function"==typeof t?.[Symbol.iterator],lit_html_d="[ \t\n\f\r]",lit_html_f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,v=/-->/g,_=/>/g,m=RegExp(`>|${lit_html_d}(?:([^\\s"'>=/]+)(${lit_html_d}*=${lit_html_d}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),lit_html_p=/'/g,g=/"/g,$=/^(?:script|style|textarea|title)$/i,lit_html_y=t=>(i,...s)=>({_$litType$:t,strings:i,values:s}),x=lit_html_y(1),lit_html_b=lit_html_y(2),w=lit_html_y(3),T=Symbol.for("lit-noChange"),E=Symbol.for("lit-nothing"),A=new WeakMap(),C=lit_html_r.createTreeWalker(lit_html_r,129);function P(t,i){if(!lit_html_a(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==lit_html_s?lit_html_s.createHTML(i):i;}const V=(t,i)=>{const s=t.length-1,o=[];let r,l=2===i?"":3===i?"":"")),o];};class N{constructor({strings:t,_$litType$:s},n){let r;this.parts=[];let c=0,a=0;const u=t.length-1,d=this.parts,[f,v]=V(t,s);if(this.el=N.createElement(f,n),C.currentNode=this.el.content,2===s||3===s){const t=this.el.content.firstChild;t.replaceWith(...t.childNodes);}for(;null!==(r=C.nextNode())&&d.length0){r.textContent=lit_html_i?lit_html_i.emptyScript:"";for(let i=0;i2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String()),this.strings=s):this._$AH=E;}_$AI(t,i=this,s,e){const h=this.strings;let o=!1;if(void 0===h)t=lit_html_S(this,t,i,0),o=!lit_html_c(t)||t!==this._$AH&&t!==T,o&&(this._$AH=t);else{const e=t;let n,r;for(t=h[0],n=0;n{const e=s?.renderBefore??i;let h=e._$litPart$;if(void 0===h){const t=s?.renderBefore??null;e._$litPart$=h=new R(i.insertBefore(lit_html_l(),t),t,void 0,s??{});}return h._$AI(t),h;};
;// ../../node_modules/lit-element/lit-element.js
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const lit_element_s=globalThis;class lit_element_i extends y{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0;}createRenderRoot(){const t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t;}update(t){const r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=B(r,this.renderRoot,this.renderOptions);}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0);}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1);}render(){return T;}}lit_element_i._$litElement$=!0,lit_element_i["finalized"]=!0,lit_element_s.litElementHydrateSupport?.({LitElement:lit_element_i});const lit_element_o=lit_element_s.litElementPolyfillSupport;lit_element_o?.({LitElement:lit_element_i});const lit_element_n={_$AK:(t,e,r)=>{t._$AK(e,r);},_$AL:t=>t._$AL};(lit_element_s.litElementVersions??=[]).push("4.2.0");
;// ../../node_modules/lit/index.js
;// ../../libs/common/src/platform/enums/encryption-type.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var EncryptionType;
(function (EncryptionType) {
// Symmetric encryption types
EncryptionType[EncryptionType["AesCbc256_B64"] = 0] = "AesCbc256_B64";
// Type 1 was the unused and removed AesCbc128_HmacSha256_B64
EncryptionType[EncryptionType["AesCbc256_HmacSha256_B64"] = 2] = "AesCbc256_HmacSha256_B64";
// Cose is the encoding for the key used, but contained can be:
// - XChaCha20Poly1305
EncryptionType[EncryptionType["CoseEncrypt0"] = 7] = "CoseEncrypt0";
// Asymmetric encryption types. These never occur in the same places that the symmetric ones would
// and can be split out into a separate enum.
EncryptionType[EncryptionType["Rsa2048_OaepSha256_B64"] = 3] = "Rsa2048_OaepSha256_B64";
EncryptionType[EncryptionType["Rsa2048_OaepSha1_B64"] = 4] = "Rsa2048_OaepSha1_B64";
EncryptionType[EncryptionType["Rsa2048_OaepSha256_HmacSha256_B64"] = 5] = "Rsa2048_OaepSha256_HmacSha256_B64";
EncryptionType[EncryptionType["Rsa2048_OaepSha1_HmacSha256_B64"] = 6] = "Rsa2048_OaepSha1_HmacSha256_B64";
})(EncryptionType || (EncryptionType = {}));
function encryptionTypeToString(encryptionType) {
if (encryptionType in EncryptionType) {
return EncryptionType[encryptionType];
}
else {
return "Unknown encryption type " + encryptionType;
}
}
/** The expected number of parts to a serialized EncString of the given encryption type.
* For example, an EncString of type AesCbc256_B64 will have 2 parts
*
* Example of annotated serialized EncStrings:
* 0.iv|data
* 2.iv|data|mac
* 3.data
* 4.data
*
* @see EncString
* @see EncryptionType
* @see EncString.parseEncryptedString
*/
const EXPECTED_NUM_PARTS_BY_ENCRYPTION_TYPE = {
[EncryptionType.AesCbc256_B64]: 2,
[EncryptionType.AesCbc256_HmacSha256_B64]: 3,
[EncryptionType.Rsa2048_OaepSha256_B64]: 1,
[EncryptionType.Rsa2048_OaepSha1_B64]: 1,
[EncryptionType.Rsa2048_OaepSha256_HmacSha256_B64]: 2,
[EncryptionType.Rsa2048_OaepSha1_HmacSha256_B64]: 2,
[EncryptionType.CoseEncrypt0]: 1,
};
;// ../../libs/common/src/platform/enums/file-upload-type.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var FileUploadType;
(function (FileUploadType) {
FileUploadType[FileUploadType["Direct"] = 0] = "Direct";
FileUploadType[FileUploadType["Azure"] = 1] = "Azure";
})(FileUploadType || (FileUploadType = {}));
;// ../../libs/common/src/platform/enums/hash-purpose.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var HashPurpose;
(function (HashPurpose) {
HashPurpose[HashPurpose["ServerAuthorization"] = 1] = "ServerAuthorization";
HashPurpose[HashPurpose["LocalAuthorization"] = 2] = "LocalAuthorization";
})(HashPurpose || (HashPurpose = {}));
;// ../../libs/storage-core/src/html-storage-location.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var HtmlStorageLocation;
(function (HtmlStorageLocation) {
HtmlStorageLocation["Local"] = "local";
HtmlStorageLocation["Memory"] = "memory";
HtmlStorageLocation["Session"] = "session";
})(HtmlStorageLocation || (HtmlStorageLocation = {}));
;// ../../node_modules/tslib/tslib.es6.mjs
/******************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** *//* global Reflect, Promise, SuppressedError, Symbol, Iterator */var extendStatics=function(d,b){extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(d,b){d.__proto__=b;}||function(d,b){for(var p in b)if(Object.prototype.hasOwnProperty.call(b,p))d[p]=b[p];};return extendStatics(d,b);};function __extends(d,b){if(typeof b!=="function"&&b!==null)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");extendStatics(d,b);function __(){this.constructor=d;}d.prototype=b===null?Object.create(b):(__.prototype=b.prototype,new __());}var __assign=function(){__assign=Object.assign||function __assign(t){for(var s,i=1,n=arguments.length;i=0;i--)if(d=decorators[i])r=(c<3?d(r):c>3?d(target,key,r):d(target,key))||r;return c>3&&r&&Object.defineProperty(target,key,r),r;}function __param(paramIndex,decorator){return function(target,key){decorator(target,key,paramIndex);};}function __esDecorate(ctor,descriptorIn,decorators,contextIn,initializers,extraInitializers){function accept(f){if(f!==void 0&&typeof f!=="function")throw new TypeError("Function expected");return f;}var kind=contextIn.kind,key=kind==="getter"?"get":kind==="setter"?"set":"value";var target=!descriptorIn&&ctor?contextIn["static"]?ctor:ctor.prototype:null;var descriptor=descriptorIn||(target?Object.getOwnPropertyDescriptor(target,contextIn.name):{});var _,done=false;for(var i=decorators.length-1;i>=0;i--){var context={};for(var p in contextIn)context[p]=p==="access"?{}:contextIn[p];for(var p in contextIn.access)context.access[p]=contextIn.access[p];context.addInitializer=function(f){if(done)throw new TypeError("Cannot add initializers after decoration has completed");extraInitializers.push(accept(f||null));};var result=(0,decorators[i])(kind==="accessor"?{get:descriptor.get,set:descriptor.set}:descriptor[key],context);if(kind==="accessor"){if(result===void 0)continue;if(result===null||typeof result!=="object")throw new TypeError("Object expected");if(_=accept(result.get))descriptor.get=_;if(_=accept(result.set))descriptor.set=_;if(_=accept(result.init))initializers.unshift(_);}else if(_=accept(result)){if(kind==="field")initializers.unshift(_);else descriptor[key]=_;}}if(target)Object.defineProperty(target,contextIn.name,descriptor);done=true;};function __runInitializers(thisArg,initializers,value){var useValue=arguments.length>2;for(var i=0;i0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue;}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]=o.length)o=void 0;return{value:o&&o[i++],done:!o};}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.");}function __read(o,n){var m=typeof Symbol==="function"&&o[Symbol.iterator];if(!m)return o;var i=m.call(o),r,ar=[],e;try{while((n===void 0||n-->0)&&!(r=i.next()).done)ar.push(r.value);}catch(error){e={error:error};}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i);}finally{if(e)throw e.error;}}return ar;}/** @deprecated */function __spread(){for(var ar=[],i=0;i1||resume(n,v);});};if(f)i[n]=f(i[n]);}}function resume(n,v){try{step(g[n](v));}catch(e){settle(q[0][3],e);}}function step(r){r.value instanceof __await?Promise.resolve(r.value.v).then(fulfill,reject):settle(q[0][2],r);}function fulfill(value){resume("next",value);}function reject(value){resume("throw",value);}function settle(f,v){if(f(v),q.shift(),q.length)resume(q[0][0],q[0][1]);}}function __asyncDelegator(o){var i,p;return i={},verb("next"),verb("throw",function(e){throw e;}),verb("return"),i[Symbol.iterator]=function(){return this;},i;function verb(n,f){i[n]=o[n]?function(v){return(p=!p)?{value:__await(o[n](v)),done:false}:f?f(v):v;}:f;}}function __asyncValues(o){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var m=o[Symbol.asyncIterator],i;return m?m.call(o):(o=typeof __values==="function"?__values(o):o[Symbol.iterator](),i={},verb("next"),verb("throw"),verb("return"),i[Symbol.asyncIterator]=function(){return this;},i);function verb(n){i[n]=o[n]&&function(v){return new Promise(function(resolve,reject){v=o[n](v),settle(resolve,reject,v.done,v.value);});};}function settle(resolve,reject,d,v){Promise.resolve(v).then(function(v){resolve({value:v,done:d});},reject);}}function __makeTemplateObject(cooked,raw){if(Object.defineProperty){Object.defineProperty(cooked,"raw",{value:raw});}else{cooked.raw=raw;}return cooked;};var __setModuleDefault=Object.create?function(o,v){Object.defineProperty(o,"default",{enumerable:true,value:v});}:function(o,v){o["default"]=v;};var ownKeys=function(o){ownKeys=Object.getOwnPropertyNames||function(o){var ar=[];for(var k in o)if(Object.prototype.hasOwnProperty.call(o,k))ar[ar.length]=k;return ar;};return ownKeys(o);};function __importStar(mod){if(mod&&mod.__esModule)return mod;var result={};if(mod!=null)for(var k=ownKeys(mod),i=0;i0;},enumerable:false,configurable:true});Subject.prototype._trySubscribe=function(subscriber){this._throwIfClosed();return _super.prototype._trySubscribe.call(this,subscriber);};Subject.prototype._subscribe=function(subscriber){this._throwIfClosed();this._checkFinalizedStatuses(subscriber);return this._innerSubscribe(subscriber);};Subject.prototype._innerSubscribe=function(subscriber){var _this=this;var _a=this,hasError=_a.hasError,isStopped=_a.isStopped,observers=_a.observers;if(hasError||isStopped){return EMPTY_SUBSCRIPTION;}this.currentObservers=null;observers.push(subscriber);return new Subscription(function(){_this.currentObservers=null;arrRemove(observers,subscriber);});};Subject.prototype._checkFinalizedStatuses=function(subscriber){var _a=this,hasError=_a.hasError,thrownError=_a.thrownError,isStopped=_a.isStopped;if(hasError){subscriber.error(thrownError);}else if(isStopped){subscriber.complete();}};Subject.prototype.asObservable=function(){var observable=new Observable();observable.source=this;return observable;};Subject.create=function(destination,source){return new AnonymousSubject(destination,source);};return Subject;}(Observable);var AnonymousSubject=function(_super){__extends(AnonymousSubject,_super);function AnonymousSubject(destination,source){var _this=_super.call(this)||this;_this.destination=destination;_this.source=source;return _this;}AnonymousSubject.prototype.next=function(value){var _a,_b;(_b=(_a=this.destination)===null||_a===void 0?void 0:_a.next)===null||_b===void 0?void 0:_b.call(_a,value);};AnonymousSubject.prototype.error=function(err){var _a,_b;(_b=(_a=this.destination)===null||_a===void 0?void 0:_a.error)===null||_b===void 0?void 0:_b.call(_a,err);};AnonymousSubject.prototype.complete=function(){var _a,_b;(_b=(_a=this.destination)===null||_a===void 0?void 0:_a.complete)===null||_b===void 0?void 0:_b.call(_a);};AnonymousSubject.prototype._subscribe=function(subscriber){var _a,_b;return(_b=(_a=this.source)===null||_a===void 0?void 0:_a.subscribe(subscriber))!==null&&_b!==void 0?_b:EMPTY_SUBSCRIPTION;};return AnonymousSubject;}(Subject);
;// ../../libs/storage-core/src/storage.service.ts
class StorageService {
}
;// ../../libs/storage-core/src/memory-storage.service.ts
var memory_storage_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
class MemoryStorageService extends StorageService {
constructor() {
super(...arguments);
this.store = new Map();
this.updatesSubject = new Subject();
}
get valuesRequireDeserialization() {
return false;
}
get updates$() {
return this.updatesSubject.asObservable();
}
get(key) {
if (this.store.has(key)) {
const obj = this.store.get(key);
return Promise.resolve(obj);
}
return Promise.resolve(null);
}
has(key) {
return memory_storage_service_awaiter(this, void 0, void 0, function* () {
return (yield this.get(key)) != null;
});
}
save(key, obj) {
if (obj == null) {
return this.remove(key);
}
// TODO: Remove once foreground/background contexts are separated in browser
// Needed to ensure ownership of all memory by the context running the storage service
const toStore = structuredClone(obj);
this.store.set(key, toStore);
this.updatesSubject.next({ key, updateType: "save" });
return Promise.resolve();
}
remove(key) {
this.store.delete(key);
this.updatesSubject.next({ key, updateType: "remove" });
return Promise.resolve();
}
}
;// ../../libs/storage-core/src/serialized-memory-storage.service.ts
var serialized_memory_storage_service_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
return new (P || (P = Promise))(function (resolve, reject) {
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
step((generator = generator.apply(thisArg, _arguments || [])).next());
});
};
// FIXME: Update this file to be type safe and remove this and next line
// @ts-strict-ignore
class SerializedMemoryStorageService extends StorageService {
constructor() {
super(...arguments);
this.store = {};
this.updatesSubject = new Subject();
}
get valuesRequireDeserialization() {
return true;
}
get updates$() {
return this.updatesSubject.asObservable();
}
get(key) {
const json = this.store[key];
if (json) {
const obj = JSON.parse(json);
return Promise.resolve(obj);
}
return Promise.resolve(null);
}
has(key) {
return serialized_memory_storage_service_awaiter(this, void 0, void 0, function* () {
return (yield this.get(key)) != null;
});
}
save(key, obj) {
if (obj == null) {
return this.remove(key);
}
// TODO: Remove once foreground/background contexts are separated in browser
// Needed to ensure ownership of all memory by the context running the storage service
this.store[key] = JSON.stringify(obj);
this.updatesSubject.next({ key, updateType: "save" });
return Promise.resolve();
}
remove(key) {
delete this.store[key];
this.updatesSubject.next({ key, updateType: "remove" });
return Promise.resolve();
}
}
;// ../../libs/storage-core/src/storage-location.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var StorageLocationEnum;
(function (StorageLocationEnum) {
StorageLocationEnum["Both"] = "both";
StorageLocationEnum["Disk"] = "disk";
StorageLocationEnum["Memory"] = "memory";
})(StorageLocationEnum || (StorageLocationEnum = {}));
;// ../../libs/storage-core/src/index.ts
// Renamed to just "StorageService", to be removed when references are updated
;// ../../libs/common/src/platform/enums/html-storage-location.enum.ts
;// ../../libs/common/src/platform/enums/key-suffix-options.enum.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var KeySuffixOptions;
(function (KeySuffixOptions) {
KeySuffixOptions["Auto"] = "auto";
KeySuffixOptions["Pin"] = "pin";
})(KeySuffixOptions || (KeySuffixOptions = {}));
;// ../../libs/logging/src/log-level.ts
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var log_level_LogLevel;
(function (LogLevel) {
LogLevel[LogLevel["Debug"] = 0] = "Debug";
LogLevel[LogLevel["Info"] = 1] = "Info";
LogLevel[LogLevel["Warning"] = 2] = "Warning";
LogLevel[LogLevel["Error"] = 3] = "Error";
})(log_level_LogLevel || (log_level_LogLevel = {}));
;// ../../libs/logging/src/console-log.service.ts
class ConsoleLogService {
constructor(isDev, filter = null) {
this.isDev = isDev;
this.filter = filter;
this.timersMap = new Map();
}
debug(message, ...optionalParams) {
if (!this.isDev) {
return;
}
this.write(LogLevel.Debug, message, ...optionalParams);
}
info(message, ...optionalParams) {
this.write(LogLevel.Info, message, ...optionalParams);
}
warning(message, ...optionalParams) {
this.write(LogLevel.Warning, message, ...optionalParams);
}
error(message, ...optionalParams) {
this.write(LogLevel.Error, message, ...optionalParams);
}
write(level, message, ...optionalParams) {
if (this.filter != null && this.filter(level)) {
return;
}
switch (level) {
case LogLevel.Debug:
// eslint-disable-next-line
console.log(message, ...optionalParams);
break;
case LogLevel.Info:
// eslint-disable-next-line
console.log(message, ...optionalParams);
break;
case LogLevel.Warning:
// eslint-disable-next-line
console.warn(message, ...optionalParams);
break;
case LogLevel.Error:
// eslint-disable-next-line
console.error(message, ...optionalParams);
break;
default:
break;
}
}
measure(start, trackGroup, track, name, properties) {
const measureName = `[${track}]: ${name}`;
const measure = performance.measure(measureName, {
start: start,
detail: {
devtools: {
dataType: "track-entry",
track,
trackGroup,
properties,
},
},
});
this.info(`${measureName} took ${measure.duration}`, properties);
return measure;
}
mark(name) {
const mark = performance.mark(name, {
detail: {
devtools: {
dataType: "marker",
},
},
});
this.info(mark.name, new Date().toISOString());
return mark;
}
}
;// ../../libs/logging/src/index.ts
;// ../../libs/common/src/platform/enums/log-level-type.enum.ts
;// ../../libs/common/src/platform/enums/storage-location.enum.ts
;// ../../libs/common/src/platform/enums/theme-type.enum.ts
/**
* @deprecated prefer the `ThemeTypes` constants and `Theme` type over unsafe enum types
**/
// FIXME: update to use a const object instead of a typescript enum
// eslint-disable-next-line @bitwarden/platform/no-enums
var ThemeType;
(function (ThemeType) {
ThemeType["System"] = "system";
ThemeType["Light"] = "light";
ThemeType["Dark"] = "dark";
})(ThemeType || (ThemeType = {}));
const ThemeTypes = {
System: "system",
Light: "light",
Dark: "dark",
};
;// ../../libs/common/src/platform/enums/index.ts
;// ../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js
var isDevelopment=false;/*
Based off glamor's StyleSheet, thanks Sunil ❤️
high performance StyleSheet for css-in-js systems
- uses multiple style tags behind the scenes for millions of rules
- uses `insertRule` for appending in production for *much* faster performance
// usage
import { StyleSheet } from '@emotion/sheet'
let styleSheet = new StyleSheet({ key: '', container: document.head })
styleSheet.insert('#box { border: 1px solid red; }')
- appends a css rule into the stylesheet
styleSheet.flush()
- empties the stylesheet of all its contents
*/function sheetForTag(tag){if(tag.sheet){return tag.sheet;}// this weirdness brought to you by firefox
/* istanbul ignore next */for(var i=0;i0?Utility_charat(characters,--position):0;if(column--,character===10)column=1,line--;return character;}/**
* @return {number}
*/function next(){character=position @ ~ isolate token
case 33:case 43:case 44:case 47:case 62:case 64:case 126:// ; { } breakpoint token
case 59:case 123:case 125:return 4;// : accompanied token
case 58:return 3;// " ' ( [ opening delimit token
case 34:case 39:case 40:case 91:return 2;// ) ] closing delimit token
case 41:case 93:return 1;}return 0;}/**
* @param {string} value
* @return {any[]}
*/function alloc(value){return line=column=1,Tokenizer_length=Utility_strlen(characters=value),position=0,[];}/**
* @param {any} value
* @return {any}
*/function dealloc(value){return characters='',value;}/**
* @param {number} type
* @return {string}
*/function delimit(type){return trim(slice(position-1,delimiter(type===91?type+2:type===40?type+1:type)));}/**
* @param {string} value
* @return {string[]}
*/function Tokenizer_tokenize(value){return dealloc(tokenizer(alloc(value)));}/**
* @param {number} type
* @return {string}
*/function whitespace(type){while(character=peek())if(character<33)next();else break;return token(type)>2||token(character)>3?'':' ';}/**
* @param {string[]} children
* @return {string[]}
*/function tokenizer(children){while(next())switch(token(character)){case 0:append(identifier(position-1),children);break;case 2:append(delimit(character),children);break;default:append(from(character),children);}return children;}/**
* @param {number} index
* @param {number} count
* @return {string}
*/function escaping(index,count){while(--count&&next())// not 0-9 A-F a-f
if(character<48||character>102||character>57&&character<65||character>70&&character<97)break;return slice(index,caret()+(count<6&&peek()==32&&next()==32));}/**
* @param {number} type
* @return {number}
*/function delimiter(type){while(next())switch(character){// ] ) " '
case type:return position;// " '
case 34:case 39:if(type!==34&&type!==39)delimiter(character);break;// (
case 40:if(type===41)delimiter(type);break;// \
case 92:next();break;}return position;}/**
* @param {number} type
* @param {number} index
* @return {number}
*/function commenter(type,index){while(next())// //
if(type+character===47+10)break;// /*
else if(type+character===42+42&&peek()===47)break;return'/*'+slice(index,position-1)+'*'+Utility_from(type===47?type:next());}/**
* @param {number} index
* @return {string}
*/function identifier(index){while(!token(peek()))next();return slice(index,position);}
;// ../../node_modules/stylis/src/Enum.js
var Enum_MS='-ms-';var Enum_MOZ='-moz-';var Enum_WEBKIT='-webkit-';var COMMENT='comm';var Enum_RULESET='rule';var Enum_DECLARATION='decl';var PAGE='@page';var MEDIA='@media';var IMPORT='@import';var CHARSET='@charset';var VIEWPORT='@viewport';var SUPPORTS='@supports';var DOCUMENT='@document';var NAMESPACE='@namespace';var Enum_KEYFRAMES='@keyframes';var FONT_FACE='@font-face';var COUNTER_STYLE='@counter-style';var FONT_FEATURE_VALUES='@font-feature-values';var LAYER='@layer';
;// ../../node_modules/stylis/src/Serializer.js
/**
* @param {object[]} children
* @param {function} callback
* @return {string}
*/function Serializer_serialize(children,callback){var output='';var length=Utility_sizeof(children);for(var i=0;i-1)if(!element.return)switch(element.type){case DECLARATION:element.return=prefix(element.value,element.length,children);return;case KEYFRAMES:return serialize([copy(element,{value:replace(element.value,'@','@'+WEBKIT)})],callback);case RULESET:if(element.length)return combine(element.props,function(value){switch(match(value,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case':read-only':case':read-write':return serialize([copy(element,{props:[replace(value,/:(read-\w+)/,':'+MOZ+'$1')]})],callback);// :placeholder
case'::placeholder':return serialize([copy(element,{props:[replace(value,/:(plac\w+)/,':'+WEBKIT+'input-$1')]}),copy(element,{props:[replace(value,/:(plac\w+)/,':'+MOZ+'$1')]}),copy(element,{props:[replace(value,/:(plac\w+)/,MS+'input-$1')]})],callback);}return'';});}}/**
* @param {object} element
* @param {number} index
* @param {object[]} children
*/function namespace(element){switch(element.type){case RULESET:element.props=element.props.map(function(value){return combine(tokenize(value),function(value,index,children){switch(charat(value,0)){// \f
case 12:return substr(value,1,strlen(value));// \0 ( + > ~
case 0:case 40:case 43:case 62:case 126:return value;// :
case 58:if(children[++index]==='global')children[index]='',children[++index]='\f'+substr(children[index],index=1,-1);// \s
case 32:return index===1?'':value;default:switch(index){case 0:element=value;return sizeof(children)>1?'':value;case index=sizeof(children)-1:case 2:return index===2?value+element+element:value+element;default:return value;}}});});}}
;// ../../node_modules/stylis/src/Parser.js
/**
* @param {string} value
* @return {object[]}
*/function compile(value){return dealloc(parse('',null,null,null,[''],value=alloc(value),0,[0],value));}/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {string[]} rule
* @param {string[]} rules
* @param {string[]} rulesets
* @param {number[]} pseudo
* @param {number[]} points
* @param {string[]} declarations
* @return {object}
*/function parse(value,root,parent,rule,rules,rulesets,pseudo,points,declarations){var index=0;var offset=0;var length=pseudo;var atrule=0;var property=0;var previous=0;var variable=1;var scanning=1;var ampersand=1;var character=0;var type='';var props=rules;var children=rulesets;var reference=rule;var characters=type;while(scanning)switch(previous=character,character=next()){// (
case 40:if(previous!=108&&Utility_charat(characters,length-1)==58){if(indexof(characters+=Utility_replace(delimit(character),'&','&\f'),'&\f')!=-1)ampersand=-1;break;}// " ' [
case 34:case 39:case 91:characters+=delimit(character);break;// \t \n \r \s
case 9:case 10:case 13:case 32:characters+=whitespace(previous);break;// \
case 92:characters+=escaping(caret()-1,7);continue;// /
case 47:switch(peek()){case 42:case 47:Utility_append(comment(commenter(next(),caret()),root,parent),declarations);break;default:characters+='/';}break;// {
case 123*variable:points[index++]=Utility_strlen(characters)*ampersand;// } ; \0
case 125*variable:case 59:case 0:switch(character){// \0 }
case 0:case 125:scanning=0;// ;
case 59+offset:if(ampersand==-1)characters=Utility_replace(characters,/\f/g,'');if(property>0&&Utility_strlen(characters)-length)Utility_append(property>32?declaration(characters+';',rule,parent,length-1):declaration(Utility_replace(characters,' ','')+';',rule,parent,length-2),declarations);break;// @ ;
case 59:characters+=';';// { rule/at-rule
default:Utility_append(reference=ruleset(characters,root,parent,index,offset,rules,points,type,props=[],children=[],length),rulesets);if(character===123)if(offset===0)parse(characters,root,reference,reference,props,rulesets,length,points,children);else switch(atrule===99&&Utility_charat(characters,3)===110?100:atrule){// d l m s
case 100:case 108:case 109:case 115:parse(value,reference,reference,rule&&Utility_append(ruleset(value,reference,reference,0,0,rules,points,type,rules,props=[],length),children),rules,children,length,points,rule?props:children);break;default:parse(characters,reference,reference,reference,[''],children,0,points,children);}}index=offset=property=0,variable=ampersand=1,type=characters='',length=pseudo;break;// :
case 58:length=1+Utility_strlen(characters),property=previous;default:if(variable<1)if(character==123)--variable;else if(character==125&&variable++==0&&prev()==125)continue;switch(characters+=Utility_from(character),character*variable){// &
case 38:ampersand=offset>0?1:(characters+='\f',-1);break;// ,
case 44:points[index++]=(Utility_strlen(characters)-1)*ampersand,ampersand=1;break;// @
case 64:// -
if(peek()===45)characters+=delimit(next());atrule=peek(),offset=length=Utility_strlen(type=characters+=identifier(caret())),character++;break;// -
case 45:if(previous===45&&Utility_strlen(characters)==2)variable=0;}}return rulesets;}/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {number} index
* @param {number} offset
* @param {string[]} rules
* @param {number[]} points
* @param {string} type
* @param {string[]} props
* @param {string[]} children
* @param {number} length
* @return {object}
*/function ruleset(value,root,parent,index,offset,rules,points,type,props,children,length){var post=offset-1;var rule=offset===0?rules:[''];var size=Utility_sizeof(rule);for(var i=0,j=0,k=0;i0?rule[x]+' '+y:Utility_replace(y,/&\f/g,rule[x])))props[k++]=z;return node(value,root,parent,offset===0?Enum_RULESET:type,props,children,length);}/**
* @param {number} value
* @param {object} root
* @param {object?} parent
* @return {object}
*/function comment(value,root,parent){return node(value,root,parent,COMMENT,Utility_from(Tokenizer_char()),Utility_substr(value,2,-2),0);}/**
* @param {string} value
* @param {object} root
* @param {object?} parent
* @param {number} length
* @return {object}
*/function declaration(value,root,parent,length){return node(value,root,parent,Enum_DECLARATION,Utility_substr(value,0,length),Utility_substr(value,length+1,-1),length);}
;// ../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js
var identifierWithPointTracking=function identifierWithPointTracking(begin,points,index){var previous=0;var character=0;while(true){previous=character;character=peek();// &\f
if(previous===38&&character===12){points[index]=1;}if(token(character)){break;}next();}return slice(begin,position);};var toRules=function toRules(parsed,points){// pretend we've started with a comma
var index=-1;var character=44;do{switch(token(character)){case 0:// &\f
if(character===38&&peek()===12){// this is not 100% correct, we don't account for literal sequences here - like for example quoted strings
// stylis inserts \f after & to know when & where it should replace this sequence with the context selector
// and when it should just concatenate the outer and inner selectors
// it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here
points[index]=1;}parsed[index]+=identifierWithPointTracking(position-1,points,index);break;case 2:parsed[index]+=delimit(character);break;case 4:// comma
if(character===44){// colon
parsed[++index]=peek()===58?'&\f':'';points[index]=parsed[index].length;break;}// fallthrough
default:parsed[index]+=Utility_from(character);}}while(character=next());return parsed;};var getRules=function getRules(value,points){return dealloc(toRules(alloc(value),points));};// WeakSet would be more appropriate, but only WeakMap is supported in IE11
var fixedElements=/* #__PURE__ */new WeakMap();var compat=function compat(element){if(element.type!=='rule'||!element.parent||// positive .length indicates that this rule contains pseudo
// negative .length indicates that this rule has been already prefixed
element.length<1){return;}var value=element.value;var parent=element.parent;var isImplicitRule=element.column===parent.column&&element.line===parent.line;while(parent.type!=='rule'){parent=parent.parent;if(!parent)return;}// short-circuit for the simplest case
if(element.props.length===1&&value.charCodeAt(0)!==58/* colon */&&!fixedElements.get(parent)){return;}// if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)
// then the props has already been manipulated beforehand as they that array is shared between it and its "rule parent"
if(isImplicitRule){return;}fixedElements.set(element,true);var points=[];var rules=getRules(value,points);var parentRules=parent.props;for(var i=0,k=0;i6)switch(Utility_charat(value,length+1)){// (m)ax-content, (m)in-content
case 109:// -
if(Utility_charat(value,length+4)!==45)break;// (f)ill-available, (f)it-content
case 102:return Utility_replace(value,/(.+:)(.+)-([^]+)/,'$1'+Enum_WEBKIT+'$2-$3'+'$1'+Enum_MOZ+(Utility_charat(value,length+3)==108?'$3':'$2-$3'))+value;// (s)tretch
case 115:return~indexof(value,'stretch')?emotion_cache_browser_esm_prefix(Utility_replace(value,'stretch','fill-available'),length)+value:value;}break;// position: sticky
case 4949:// (s)ticky?
if(Utility_charat(value,length+1)!==115)break;// display: (flex|inline-flex)
case 6444:switch(Utility_charat(value,Utility_strlen(value)-3-(~indexof(value,'!important')&&10))){// stic(k)y
case 107:return Utility_replace(value,':',':'+Enum_WEBKIT)+value;// (inline-)?fl(e)x
case 101:return Utility_replace(value,/(.+:)([^;!]+)(;|!.+)?/,'$1'+Enum_WEBKIT+(Utility_charat(value,14)===45?'inline-':'')+'box$3'+'$1'+Enum_WEBKIT+'$2$3'+'$1'+Enum_MS+'$2box$3')+value;}break;// writing-mode
case 5936:switch(Utility_charat(value,length+11)){// vertical-l(r)
case 114:return Enum_WEBKIT+value+Enum_MS+Utility_replace(value,/[svh]\w+-[tblr]{2}/,'tb')+value;// vertical-r(l)
case 108:return Enum_WEBKIT+value+Enum_MS+Utility_replace(value,/[svh]\w+-[tblr]{2}/,'tb-rl')+value;// horizontal(-)tb
case 45:return Enum_WEBKIT+value+Enum_MS+Utility_replace(value,/[svh]\w+-[tblr]{2}/,'lr')+value;}return Enum_WEBKIT+value+Enum_MS+value+value;}return value;}var emotion_cache_browser_esm_prefixer=function prefixer(element,index,children,callback){if(element.length>-1)if(!element["return"])switch(element.type){case Enum_DECLARATION:element["return"]=emotion_cache_browser_esm_prefix(element.value,element.length);break;case Enum_KEYFRAMES:return Serializer_serialize([Tokenizer_copy(element,{value:Utility_replace(element.value,'@','@'+Enum_WEBKIT)})],callback);case Enum_RULESET:if(element.length)return Utility_combine(element.props,function(value){switch(Utility_match(value,/(::plac\w+|:read-\w+)/)){// :read-(only|write)
case':read-only':case':read-write':return Serializer_serialize([Tokenizer_copy(element,{props:[Utility_replace(value,/:(read-\w+)/,':'+Enum_MOZ+'$1')]})],callback);// :placeholder
case'::placeholder':return Serializer_serialize([Tokenizer_copy(element,{props:[Utility_replace(value,/:(plac\w+)/,':'+Enum_WEBKIT+'input-$1')]}),Tokenizer_copy(element,{props:[Utility_replace(value,/:(plac\w+)/,':'+Enum_MOZ+'$1')]}),Tokenizer_copy(element,{props:[Utility_replace(value,/:(plac\w+)/,Enum_MS+'input-$1')]})],callback);}return'';});}};var defaultStylisPlugins=[emotion_cache_browser_esm_prefixer];var createCache=function createCache(options){var key=options.key;if(key==='css'){var ssrStyles=document.querySelectorAll("style[data-emotion]:not([data-s])");// get SSRed styles out of the way of React's hydration
// document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)
// note this very very intentionally targets all style elements regardless of the key to ensure
// that creating a cache works inside of render of a React component
Array.prototype.forEach.call(ssrStyles,function(node){// we want to only move elements which have a space in the data-emotion attribute value
// because that indicates that it is an Emotion 11 server-side rendered style elements
// while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector
// Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)
// so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles
// will not result in the Emotion 10 styles being destroyed
var dataEmotionAttribute=node.getAttribute('data-emotion');if(dataEmotionAttribute.indexOf(' ')===-1){return;}document.head.appendChild(node);node.setAttribute('data-s','');});}var stylisPlugins=options.stylisPlugins||defaultStylisPlugins;var inserted={};var container;var nodesToHydrate=[];{container=options.container||document.head;Array.prototype.forEach.call(// this means we will ignore elements which don't have a space in them which
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
document.querySelectorAll("style[data-emotion^=\""+key+" \"]"),function(node){var attrib=node.getAttribute("data-emotion").split(' ');for(var i=1;i=4;++i,len-=4){k=str.charCodeAt(i)&0xff|(str.charCodeAt(++i)&0xff)<<8|(str.charCodeAt(++i)&0xff)<<16|(str.charCodeAt(++i)&0xff)<<24;k=/* Math.imul(k, m): */(k&0xffff)*0x5bd1e995+((k>>>16)*0xe995<<16);k^=/* k >>> r: */k>>>24;h=/* Math.imul(k, m): */(k&0xffff)*0x5bd1e995+((k>>>16)*0xe995<<16)^/* Math.imul(h, m): */(h&0xffff)*0x5bd1e995+((h>>>16)*0xe995<<16);}// Handle the last few bytes of the input array
switch(len){case 3:h^=(str.charCodeAt(i+2)&0xff)<<16;case 2:h^=(str.charCodeAt(i+1)&0xff)<<8;case 1:h^=str.charCodeAt(i)&0xff;h=/* Math.imul(h, m): */(h&0xffff)*0x5bd1e995+((h>>>16)*0xe995<<16);}// Do a few final mixes of the hash to ensure the last few
// bytes are well-incorporated.
h^=h>>>13;h=/* Math.imul(h, m): */(h&0xffff)*0x5bd1e995+((h>>>16)*0xe995<<16);return((h^h>>>15)>>>0).toString(36);}
;// ../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,// SVG-related properties
fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};
;// ../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
function memoize(fn){var cache=Object.create(null);return function(arg){if(cache[arg]===undefined)cache[arg]=fn(arg);return cache[arg];};}
;// ../../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js
var emotion_serialize_esm_isDevelopment=false;var hyphenateRegex=/[A-Z]|^ms/g;var animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g;var isCustomProperty=function isCustomProperty(property){return property.charCodeAt(1)===45;};var isProcessableValue=function isProcessableValue(value){return value!=null&&typeof value!=='boolean';};var processStyleName=/* #__PURE__ */memoize(function(styleName){return isCustomProperty(styleName)?styleName:styleName.replace(hyphenateRegex,'-$&').toLowerCase();});var processStyleValue=function processStyleValue(key,value){switch(key){case'animation':case'animationName':{if(typeof value==='string'){return value.replace(animationRegex,function(match,p1,p2){cursor={name:p1,styles:p2,next:cursor};return p1;});}}}if(unitlessKeys[key]!==1&&!isCustomProperty(key)&&typeof value==='number'&&value!==0){return value+'px';}return value;};var noComponentSelectorMessage='Component selectors can only be used in conjunction with '+'@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware '+'compiler transform.';function handleInterpolation(mergedProps,registered,interpolation){if(interpolation==null){return'';}var componentSelector=interpolation;if(componentSelector.__emotion_styles!==undefined){return componentSelector;}switch(typeof interpolation){case'boolean':{return'';}case'object':{var keyframes=interpolation;if(keyframes.anim===1){cursor={name:keyframes.name,styles:keyframes.styles,next:cursor};return keyframes.name;}var serializedStyles=interpolation;if(serializedStyles.styles!==undefined){var next=serializedStyles.next;if(next!==undefined){// not the most efficient thing ever but this is a pretty rare case
// and there will be very few iterations of this generally
while(next!==undefined){cursor={name:next.name,styles:next.styles,next:cursor};next=next.next;}}var styles=serializedStyles.styles+";";return styles;}return createStringFromObject(mergedProps,registered,interpolation);}case'function':{if(mergedProps!==undefined){var previousCursor=cursor;var result=interpolation(mergedProps);cursor=previousCursor;return handleInterpolation(mergedProps,registered,result);}break;}}// finalize string values (regular strings and functions interpolated into css calls)
var asString=interpolation;if(registered==null){return asString;}var cached=registered[asString];return cached!==undefined?cached:asString;}function createStringFromObject(mergedProps,registered,obj){var string='';if(Array.isArray(obj)){for(var i=0;i `
${rule}: ${color};
`;
const animations = {
spin: `
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(359deg);
}
`,
};
function scrollbarStyles(theme, color) {
const thumbColor = (color === null || color === void 0 ? void 0 : color.thumb) || styles_themes[theme].secondary["500"];
const trackColor = (color === null || color === void 0 ? void 0 : color.track) || styles_themes[theme].background.alt;
return {
/* FireFox & Chrome support */
default: `
scrollbar-color: ${thumbColor} ${trackColor};
`,
/* Safari Support */
safari: `
::-webkit-scrollbar {
overflow: auto;
}
::-webkit-scrollbar-thumb {
border-width: 4px;
border-style: solid;
border-radius: 0.5rem;
border-color: transparent;
background-clip: content-box;
background-color: ${thumbColor};
}
::-webkit-scrollbar-track {
${trackColor};
}
::-webkit-scrollbar-thumb:hover {
${styles_themes[theme].secondary["600"]};
}
`,
};
}
;// ./src/autofill/content/components/icons/angle-down.ts
function AngleDown({ ariaHidden = true, color, disabled, theme }) {
const shapeColor = disabled ? styles_themes[theme].secondary["300"] : color || styles_themes[theme].text.main;
return x `
`;
}
;// ./src/autofill/content/components/icons/angle-up.ts
function AngleUp({ ariaHidden = true, color, disabled, theme }) {
const shapeColor = disabled ? styles_themes[theme].secondary["300"] : color || styles_themes[theme].text.main;
return x `
`;
}
;// ./src/autofill/content/components/icons/shield.ts
function Shield({ ariaHidden = true, color, theme }) {
const shapeColor = color || styles_themes[theme].brandLogo;
return x `
`;
}
;// ./src/autofill/content/components/icons/brand-icon-container.ts
function BrandIconContainer({ iconLink, theme }) {
const Icon = x `
`;
}
const notificationContainerStyles = (theme) => emotion_css_esm_css `
position: absolute;
right: 20px;
border: 1px solid ${styles_themes[theme].secondary["300"]};
border-radius: ${spacing["4"]};
box-shadow: -2px 4px 6px 0px #0000001a;
background-color: ${styles_themes[theme].background.alt};
width: 400px;
overflow: hidden;
[class*="${componentClassPrefix}-"] {
border-radius: ${spacing["4"]} ${spacing["4"]} 0 0;
border-bottom: 0.5px solid ${styles_themes[theme].secondary["300"]};
}
`;
function getConfirmationMessage(i18n, type, error) {
if (error) {
return i18n.saveFailureDetails;
}
/* @TODO This partial string return and later concatenation with the cipher name is needed
* to handle cipher name overflow cases, but is risky for i18n concerns. Fix concatenation
* with cipher name overflow when a tag replacement solution is available.
*/
return type === NotificationTypes.Add
? i18n.notificationLoginSaveConfirmation
: i18n.notificationLoginUpdatedConfirmation;
}
;// ./src/autofill/content/components/buttons/badge-button.ts
function BadgeButton({ buttonAction, buttonText, disabled = false, itemName, theme, username, }) {
const handleButtonClick = (event) => {
if (!disabled) {
buttonAction(event);
}
};
return x `
`;
}
const badgeButtonStyles = ({ disabled, theme }) => emotion_css_esm_css `
${typography.helperMedium}
user-select: none;
border-radius: ${border.radius.full};
padding: ${spacing["1"]} ${spacing["2"]};
max-height: fit-content;
overflow: hidden;
text-align: center;
text-overflow: ellipsis;
font-weight: 500;
${disabled
? `
border: 0.5px solid ${styles_themes[theme].secondary["300"]};
background-color: ${styles_themes[theme].secondary["300"]};
color: ${styles_themes[theme].text.muted};
`
: `
border: 0.5px solid ${styles_themes[theme].primary["700"]};
background-color: ${styles_themes[theme].primary["100"]};
cursor: pointer;
color: ${styles_themes[theme].primary["700"]};
:hover {
border-color: ${styles_themes[theme].primary["600"]};
background-color: ${styles_themes[theme].primary["600"]};
color: ${styles_themes[theme].text.contrast};
}
:focus {
outline: 2px solid ${styles_themes[theme].primary["600"]};
outline-offset: 2px;
}
`}
`;
;// ./src/autofill/content/components/buttons/edit-button.ts
function EditButton({ buttonAction, buttonText, disabled = false, theme }) {
return x `
`;
}
const editButtonStyles = ({ disabled, theme }) => emotion_css_esm_css `
${typography.helperMedium}
user-select: none;
display: flex;
border: 1px solid transparent;
border-radius: ${spacing["1"]};
background-color: transparent;
padding: ${spacing["1"]};
max-height: fit-content;
overflow: hidden;
${!disabled
? `
cursor: pointer;
:hover {
border-color: ${styles_themes[theme].primary["600"]};
}
`
: ""}
> svg {
width: 16px;
height: fit-content;
}
`;
;// ../../node_modules/signal-polyfill/dist/index.js
var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:true,configurable:true,writable:true,value}):obj[key]=value;var __publicField=(obj,key,value)=>{__defNormalProp(obj,typeof key!=="symbol"?key+"":key,value);return value;};var __accessCheck=(obj,member,msg)=>{if(!member.has(obj))throw TypeError("Cannot "+msg);};var __privateIn=(member,obj)=>{if(Object(obj)!==obj)throw TypeError('Cannot use the "in" operator on this value');return member.has(obj);};var __privateAdd=(obj,member,value)=>{if(member.has(obj))throw TypeError("Cannot add the same private member more than once");member instanceof WeakSet?member.add(obj):member.set(obj,value);};var __privateMethod=(obj,member,method)=>{__accessCheck(obj,member,"access private method");return method;};/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function defaultEquals(a,b){return Object.is(a,b);}/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/let activeConsumer=null;let inNotificationPhase=false;let epoch=1;const SIGNAL=/* @__PURE__ */Symbol("SIGNAL");function setActiveConsumer(consumer){const prev=activeConsumer;activeConsumer=consumer;return prev;}function getActiveConsumer(){return activeConsumer;}function isInNotificationPhase(){return inNotificationPhase;}const REACTIVE_NODE={version:0,lastCleanEpoch:0,dirty:false,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:false,consumerIsAlwaysLive:false,producerMustRecompute:()=>false,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function producerAccessed(node){if(inNotificationPhase){throw new Error(typeof ngDevMode!=="undefined"&&ngDevMode?`Assertion error: signal read during notification phase`:"");}if(activeConsumer===null){return;}activeConsumer.consumerOnSignalRead(node);const idx=activeConsumer.nextProducerIndex++;assertConsumerNode(activeConsumer);if(idxnode.nextProducerIndex){node.producerNode.pop();node.producerLastReadVersion.pop();node.producerIndexOfThis.pop();}}function consumerPollProducersForChange(node){assertConsumerNode(node);for(let i=0;i=node.liveConsumerNode.length){throw new Error(`Assertion error: active consumer index ${idx} is out of bounds of ${node.liveConsumerNode.length} consumers)`);}if(node.liveConsumerNode.length===1){(_a=node.unwatched)==null?void 0:_a.call(node.wrapper);for(let i=0;i0;}function assertConsumerNode(node){node.producerNode??(node.producerNode=[]);node.producerIndexOfThis??(node.producerIndexOfThis=[]);node.producerLastReadVersion??(node.producerLastReadVersion=[]);}function assertProducerNode(node){node.liveConsumerNode??(node.liveConsumerNode=[]);node.liveConsumerIndexOfThis??(node.liveConsumerIndexOfThis=[]);}/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function computedGet(node){producerUpdateValueVersion(node);producerAccessed(node);if(node.value===ERRORED){throw node.error;}return node.value;}function createComputed(computation){const node=Object.create(COMPUTED_NODE);node.computation=computation;const computed=()=>computedGet(node);computed[SIGNAL]=node;return computed;}const UNSET=/* @__PURE__ */Symbol("UNSET");const COMPUTING=/* @__PURE__ */Symbol("COMPUTING");const ERRORED=/* @__PURE__ */Symbol("ERRORED");const COMPUTED_NODE=/* @__PURE__ */(()=>{return{...REACTIVE_NODE,value:UNSET,dirty:true,error:null,equal:defaultEquals,producerMustRecompute(node){return node.value===UNSET||node.value===COMPUTING;},producerRecomputeValue(node){if(node.value===COMPUTING){throw new Error("Detected cycle in computations.");}const oldValue=node.value;node.value=COMPUTING;const prevConsumer=consumerBeforeComputation(node);let newValue;let wasEqual=false;try{newValue=node.computation.call(node.wrapper);const oldOk=oldValue!==UNSET&&oldValue!==ERRORED;wasEqual=oldOk&&node.equal.call(node.wrapper,oldValue,newValue);}catch(err){newValue=ERRORED;node.error=err;}finally{consumerAfterComputation(node,prevConsumer);}if(wasEqual){node.value=oldValue;return;}node.value=newValue;node.version++;}};})();/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function defaultThrowError(){throw new Error();}let throwInvalidWriteToSignalErrorFn=defaultThrowError;function throwInvalidWriteToSignalError(){throwInvalidWriteToSignalErrorFn();}/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/function createSignal(initialValue){const node=Object.create(SIGNAL_NODE);node.value=initialValue;const getter=()=>{producerAccessed(node);return node.value;};getter[SIGNAL]=node;return getter;}function signalGetFn(){producerAccessed(this);return this.value;}function signalSetFn(node,newValue){if(!producerUpdatesAllowed()){throwInvalidWriteToSignalError();}if(!node.equal.call(node.wrapper,node.value,newValue)){node.value=newValue;signalValueChanged(node);}}const SIGNAL_NODE=/* @__PURE__ */(()=>{return{...REACTIVE_NODE,equal:defaultEquals,value:void 0};})();function signalValueChanged(node){node.version++;producerIncrementEpoch();producerNotifyConsumers(node);}/**
* @license
* Copyright 2024 Bloomberg Finance L.P.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/const NODE=Symbol("node");var Signal;(Signal2=>{var _a,_brand,brand_fn,_b,_brand2,brand_fn2;class State{constructor(initialValue,options={}){__privateAdd(this,_brand);__publicField(this,_a);const ref=createSignal(initialValue);const node=ref[SIGNAL];this[NODE]=node;node.wrapper=this;if(options){const equals=options.equals;if(equals){node.equal=equals;}node.watched=options[Signal2.subtle.watched];node.unwatched=options[Signal2.subtle.unwatched];}}get(){if(!(0,Signal2.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.get");return signalGetFn.call(this[NODE]);}set(newValue){if(!(0,Signal2.isState)(this))throw new TypeError("Wrong receiver type for Signal.State.prototype.set");if(isInNotificationPhase()){throw new Error("Writes to signals not permitted during Watcher callback");}const ref=this[NODE];signalSetFn(ref,newValue);}}_a=NODE;_brand=new WeakSet();brand_fn=function(){};Signal2.isState=s=>typeof s==="object"&&__privateIn(_brand,s);Signal2.State=State;class Computed{// Create a Signal which evaluates to the value returned by the callback.
// Callback is called with this signal as the parameter.
constructor(computation,options){__privateAdd(this,_brand2);__publicField(this,_b);const ref=createComputed(computation);const node=ref[SIGNAL];node.consumerAllowSignalWrites=true;this[NODE]=node;node.wrapper=this;if(options){const equals=options.equals;if(equals){node.equal=equals;}node.watched=options[Signal2.subtle.watched];node.unwatched=options[Signal2.subtle.unwatched];}}get(){if(!(0,Signal2.isComputed)(this))throw new TypeError("Wrong receiver type for Signal.Computed.prototype.get");return computedGet(this[NODE]);}}_b=NODE;_brand2=new WeakSet();brand_fn2=function(){};Signal2.isComputed=c=>typeof c==="object"&&__privateIn(_brand2,c);Signal2.Computed=Computed;(subtle2=>{var _a2,_brand3,brand_fn3,_assertSignals,assertSignals_fn;function untrack(cb){let output;let prevActiveConsumer=null;try{prevActiveConsumer=setActiveConsumer(null);output=cb();}finally{setActiveConsumer(prevActiveConsumer);}return output;}subtle2.untrack=untrack;function introspectSources(sink){var _a3;if(!(0,Signal2.isComputed)(sink)&&!(0,Signal2.isWatcher)(sink)){throw new TypeError("Called introspectSources without a Computed or Watcher argument");}return((_a3=sink[NODE].producerNode)==null?void 0:_a3.map(n=>n.wrapper))??[];}subtle2.introspectSources=introspectSources;function introspectSinks(signal){var _a3;if(!(0,Signal2.isComputed)(signal)&&!(0,Signal2.isState)(signal)){throw new TypeError("Called introspectSinks without a Signal argument");}return((_a3=signal[NODE].liveConsumerNode)==null?void 0:_a3.map(n=>n.wrapper))??[];}subtle2.introspectSinks=introspectSinks;function hasSinks(signal){if(!(0,Signal2.isComputed)(signal)&&!(0,Signal2.isState)(signal)){throw new TypeError("Called hasSinks without a Signal argument");}const liveConsumerNode=signal[NODE].liveConsumerNode;if(!liveConsumerNode)return false;return liveConsumerNode.length>0;}subtle2.hasSinks=hasSinks;function hasSources(signal){if(!(0,Signal2.isComputed)(signal)&&!(0,Signal2.isWatcher)(signal)){throw new TypeError("Called hasSources without a Computed or Watcher argument");}const producerNode=signal[NODE].producerNode;if(!producerNode)return false;return producerNode.length>0;}subtle2.hasSources=hasSources;class Watcher{// When a (recursive) source of Watcher is written to, call this callback,
// if it hasn't already been called since the last `watch` call.
// No signals may be read or written during the notify.
constructor(notify){__privateAdd(this,_brand3);__privateAdd(this,_assertSignals);__publicField(this,_a2);let node=Object.create(REACTIVE_NODE);node.wrapper=this;node.consumerMarkedDirty=notify;node.consumerIsAlwaysLive=true;node.consumerAllowSignalWrites=false;node.producerNode=[];this[NODE]=node;}// Add these signals to the Watcher's set, and set the watcher to run its
// notify callback next time any signal in the set (or one of its dependencies) changes.
// Can be called with no arguments just to reset the "notified" state, so that
// the notify callback will be invoked again.
watch(...signals){if(!(0,Signal2.isWatcher)(this)){throw new TypeError("Called unwatch without Watcher receiver");}__privateMethod(this,_assertSignals,assertSignals_fn).call(this,signals);const node=this[NODE];node.dirty=false;const prev=setActiveConsumer(node);for(const signal of signals){producerAccessed(signal[NODE]);}setActiveConsumer(prev);}// Remove these signals from the watched set (e.g., for an effect which is disposed)
unwatch(...signals){if(!(0,Signal2.isWatcher)(this)){throw new TypeError("Called unwatch without Watcher receiver");}__privateMethod(this,_assertSignals,assertSignals_fn).call(this,signals);const node=this[NODE];assertConsumerNode(node);for(let i=node.producerNode.length-1;i>=0;i--){if(signals.includes(node.producerNode[i].wrapper)){producerRemoveLiveConsumerAtIndex(node.producerNode[i],node.producerIndexOfThis[i]);const lastIdx=node.producerNode.length-1;node.producerNode[i]=node.producerNode[lastIdx];node.producerIndexOfThis[i]=node.producerIndexOfThis[lastIdx];node.producerNode.length--;node.producerIndexOfThis.length--;node.nextProducerIndex--;if(in.dirty).map(n=>n.wrapper);}}_a2=NODE;_brand3=new WeakSet();brand_fn3=function(){};_assertSignals=new WeakSet();assertSignals_fn=function(signals){for(const signal of signals){if(!(0,Signal2.isComputed)(signal)&&!(0,Signal2.isState)(signal)){throw new TypeError("Called watch/unwatch without a Computed or State argument");}}};Signal2.isWatcher=w=>__privateIn(_brand3,w);subtle2.Watcher=Watcher;function currentComputed(){var _a3;return(_a3=getActiveConsumer())==null?void 0:_a3.wrapper;}subtle2.currentComputed=currentComputed;subtle2.watched=Symbol("watched");subtle2.unwatched=Symbol("unwatched");})(Signal2.subtle||(Signal2.subtle={}));})(Signal||(Signal={}));
;// ../../node_modules/@lit-labs/signals/lib/signal-watcher.js
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const signal_watcher_i=Symbol("SignalWatcherBrand"),signal_watcher_s=new FinalizationRegistry(({watcher:t,signal:i})=>{t.unwatch(i);}),signal_watcher_h=new WeakMap();function signal_watcher_e(e){return!0===e[signal_watcher_i]?(console.warn("SignalWatcher should not be applied to the same class more than once."),e):class extends e{constructor(){super(...arguments),this._$St=new t.State(0),this._$Si=!1,this._$So=!0,this._$Sh=new Set();}_$Sl(){if(void 0!==this._$Su)return;this._$Sv=new t.Computed(()=>{this._$St.get(),super.performUpdate();});const i=this._$Su=new t.subtle.Watcher(function(){const t=signal_watcher_h.get(this);void 0!==t&&(!1===t._$Si&&t.requestUpdate(),this.watch());});signal_watcher_h.set(i,this),signal_watcher_s.register(this,{watcher:i,signal:this._$Sv}),i.watch(this._$Sv);}_$Sp(){void 0!==this._$Su&&(this._$Su.unwatch(this._$Sv),this._$Sv=void 0,this._$Su=void 0);}performUpdate(){this.isUpdatePending&&(this._$Sl(),this._$Si=!0,this._$St.set(this._$St.get()+1),this._$Si=!1,this._$Sv.get());}update(t){try{this._$So?(this._$So=!1,super.update(t)):this._$Sh.forEach(t=>t.commit());}finally{this.isUpdatePending=!1,this._$Sh.clear();}}requestUpdate(t,i,s){this._$So=!0,super.requestUpdate(t,i,s);}connectedCallback(){super.connectedCallback(),this.requestUpdate();}disconnectedCallback(){super.disconnectedCallback(),queueMicrotask(()=>{!1===this.isConnected&&this._$Sp();});}_(t){this._$Sh.add(t);const i=this._$So;this.requestUpdate(),this._$So=i;}m(t){this._$Sh.delete(t);}};}
;// ../../node_modules/lit-html/directive.js
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const directive_t={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},directive_e=t=>(...e)=>({_$litDirective$:t,values:e});class directive_i{constructor(t){}get _$AU(){return this._$AM._$AU;}_$AT(t,e,i){this._$Ct=t,this._$AM=e,this._$Ci=i;}_$AS(t,e){return this.update(t,e);}update(t,e){return this.render(...e);}}
;// ../../node_modules/lit/directive.js
;// ../../node_modules/lit-html/directive-helpers.js
/**
* @license
* Copyright 2020 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const{I:directive_helpers_t}=Z,directive_helpers_i=o=>null===o||"object"!=typeof o&&"function"!=typeof o,directive_helpers_n={HTML:1,SVG:2,MATHML:3},directive_helpers_e=(o,t)=>void 0===t?void 0!==o?._$litType$:o?._$litType$===t,directive_helpers_l=o=>null!=o?._$litType$?.h,directive_helpers_c=o=>void 0!==o?._$litDirective$,directive_helpers_d=o=>o?._$litDirective$,directive_helpers_f=o=>void 0===o.strings,directive_helpers_s=()=>document.createComment(""),directive_helpers_r=(o,i,n)=>{const e=o._$AA.parentNode,l=void 0===i?o._$AB:i._$AA;if(void 0===n){const i=e.insertBefore(directive_helpers_s(),l),c=e.insertBefore(directive_helpers_s(),l);n=new directive_helpers_t(i,c,o,o.options);}else{const t=n._$AB.nextSibling,i=n._$AM,c=i!==o;if(c){let t;n._$AQ?.(o),n._$AM=o,void 0!==n._$AP&&(t=o._$AU)!==i._$AU&&n._$AP(t);}if(t!==l||c){let o=n._$AA;for(;o!==t;){const t=o.nextSibling;e.insertBefore(o,l),o=t;}}}return n;},directive_helpers_v=(o,t,i=o)=>(o._$AI(t,i),o),directive_helpers_u={},directive_helpers_m=(o,t=directive_helpers_u)=>o._$AH=t,directive_helpers_p=o=>o._$AH,directive_helpers_M=o=>{o._$AP?.(!1,!0);let t=o._$AA;const i=o._$AB.nextSibling;for(;t!==i;){const o=t.nextSibling;t.remove(),t=o;}},directive_helpers_h=o=>{o._$AR();};
;// ../../node_modules/lit-html/async-directive.js
/**
* @license
* Copyright 2017 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const async_directive_s=(i,t)=>{const e=i._$AN;if(void 0===e)return!1;for(const i of e)i._$AO?.(t,!1),async_directive_s(i,t);return!0;},async_directive_o=i=>{let t,e;do{if(void 0===(t=i._$AM))break;e=t._$AN,e.delete(i),i=t;}while(0===e?.size);},async_directive_r=i=>{for(let t;t=i._$AM;i=t){let e=t._$AN;if(void 0===e)t._$AN=e=new Set();else if(e.has(i))break;e.add(i),async_directive_c(t);}};function async_directive_h(i){void 0!==this._$AN?(async_directive_o(this),this._$AM=i,async_directive_r(this)):this._$AM=i;}function async_directive_n(i,t=!1,e=0){const r=this._$AH,h=this._$AN;if(void 0!==h&&0!==h.size)if(t){if(Array.isArray(r))for(let i=e;i{i.type==directive_t.CHILD&&(i._$AP??=async_directive_n,i._$AQ??=async_directive_h);};class async_directive_f extends directive_i{constructor(){super(...arguments),this._$AN=void 0;}_$AT(i,t,e){super._$AT(i,t,e),async_directive_r(this),this.isConnected=i._$AU;}_$AO(i,t=!0){i!==this.isConnected&&(this.isConnected=i,i?this.reconnected?.():this.disconnected?.()),t&&(async_directive_s(this,i),async_directive_o(this));}setValue(t){if(directive_helpers_f(this._$Ct))this._$Ct._$AI(t,this);else{const i=[...this._$Ct._$AH];i[this._$Ci]=t,this._$Ct._$AI(i,this,0);}}disconnected(){}reconnected(){}}
;// ../../node_modules/lit/async-directive.js
;// ../../node_modules/@lit-labs/signals/lib/watch.js
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/class watch_h extends async_directive_f{_$Sl(){if(void 0!==this._$Su)return;this._$SW=new Signal.Computed(()=>{var i;return null===(i=this._$Sj)||void 0===i?void 0:i.get();});const i=this._$Su=new Signal.subtle.Watcher(()=>{var t;null===(t=this._$SO)||void 0===t||t._(this),i.watch();});i.watch(this._$SW);}_$Sp(){var i;void 0!==this._$Su&&(this._$Su.unwatch(this._$SW),this._$SW=void 0,this._$Su=void 0,null===(i=this._$SO)||void 0===i||i.m(this));}commit(){this.setValue(Signal.subtle.untrack(()=>{var i;return null===(i=this._$SW)||void 0===i?void 0:i.get();}));}render(i){return Signal.subtle.untrack(()=>i.get());}update(i,[t]){var h,o;return null!==(h=this._$SO)&&void 0!==h||(this._$SO=null===(o=i.options)||void 0===o?void 0:o.host),t!==this._$Sj&&void 0!==this._$Sj&&this._$Sp(),this._$Sj=t,this._$Sl(),Signal.subtle.untrack(()=>this._$SW.get());}disconnected(){this._$Sp();}reconnected(){this._$Sl();}}const watch_o=directive_e(watch_h);
;// ../../node_modules/lit/html.js
;// ../../node_modules/@lit-labs/signals/lib/html-tag.js
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const html_tag_m=o=>(t,...m)=>o(t,...m.map(o=>o instanceof Signal.State||o instanceof Signal.Computed?watch_o(o):o)),html_tag_l=html_tag_m(x),html_tag_r=html_tag_m(lit_html_b);
;// ../../node_modules/@lit-labs/signals/index.js
/**
* @license
* Copyright 2023 Google LLC
* SPDX-License-Identifier: BSD-3-Clause
*/const signals_l=Signal.State,signals_o=Signal.Computed,signals_r=(l,o)=>new Signal.State(l,o),signals_i=(l,o)=>new t.Computed(l,o);
;// ./src/autofill/content/components/signals/selected-cipher.ts
const selected_cipher_selectedCipher = signals_r(null);
;// ./src/autofill/content/components/cipher/cipher-action.ts
function CipherAction({ cipherId, handleAction = () => {
/* no-op */
}, i18n, itemName, notificationType, theme, username, }) {
const selectCipherHandleAction = (e) => {
selected_cipher_selectedCipher.set(cipherId);
try {
handleAction(e);
}
finally {
selected_cipher_selectedCipher.set(null);
}
};
return notificationType === NotificationTypes.Change
? BadgeButton({
buttonAction: selectCipherHandleAction,
buttonText: i18n.notificationUpdate,
itemName,
theme,
username,
})
: EditButton({
buttonAction: handleAction,
buttonText: i18n.notificationEditTooltip,
theme,
});
}
;// ./src/autofill/content/components/cipher/cipher-icon.ts
/**
* @param {string} props.color contextual color override if no icon URI is available
* @param {string} props.size valid CSS `width` value, represents the width-basis of the graphic, with height maintaining original aspect-ratio
*/
function CipherIcon({ color, size, theme, uri }) {
const iconClass = cipherIconStyle({ width: size });
return uri
? x ``
: x `${Globe({ color, theme })}`;
}
const cipherIconStyle = ({ width }) => emotion_css_esm_css `
width: ${width};
height: fit-content;
`;
;// ./src/autofill/content/components/cipher/types.ts
const CipherTypes = {
Login: 1,
SecureNote: 2,
Card: 3,
Identity: 4,
};
const CipherRepromptTypes = {
None: 0,
Password: 1,
};
const OrganizationCategories = {
business: "business",
family: "family",
};
;// ./src/autofill/content/components/cipher/cipher-indicator-icons.ts
const cipherIndicatorIconsMap = {
[OrganizationCategories.business]: Business,
[OrganizationCategories.family]: Family,
};
function CipherInfoIndicatorIcons({ organizationCategories = [], theme, }) {
return x `
${organizationCategories.map((name) => { var _a; return (_a = cipherIndicatorIconsMap[name]) === null || _a === void 0 ? void 0 : _a.call(cipherIndicatorIconsMap, { color: styles_themes[theme].text.muted, theme }); })}
`;
}
const cipherInfoIndicatorIconsStyles = emotion_css_esm_css `
> svg {
width: fit-content;
height: 12px;
}
`;
;// ./src/autofill/content/components/cipher/cipher-info.ts
function CipherInfo({ cipher, theme }) {
const { name, login, organizationCategories } = cipher;
const hasIndicatorIcons = organizationCategories === null || organizationCategories === void 0 ? void 0 : organizationCategories.length;
return x `