(()=>{var e={43298(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13605),i=r.n(n),o=r(72485),a=r.n(o)()(i());a.push([e.id,":host{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;pointer-events:none;position:absolute !important;isolation:unset !important;margin:0 !important;opacity:1;z-index:unset !important;order:0 !important;height:0 !important;width:0 !important;float:left !important;animation:none !important;flex:0 0 0;grid-row:auto/span 1 !important;grid-column:auto/span 1 !important}:host>input{pointer-events:all}button{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;pointer-events:all;margin:auto;top:0;opacity:0;right:.3571428571em;max-width:0;margin-top:0 !important;cursor:pointer !important;position:absolute !important;background-size:cover !important;border-radius:unset !important}button.visible{animation:icon-fade-in .125s ease-in-out both !important}button.visible::after{animation:counter-fade-in .125s .05s ease-in-out both !important}button:hover,button:focus,button:active{transform:none !important}button::before{content:none !important}button::after{content:var(--control-count) !important;position:absolute !important;top:0 !important;right:0 !important;bottom:0 !important;left:0 !important;margin:auto !important;color:#fff !important;text-align:center !important;font-family:system-ui,sans-serif !important;line-height:var(--control-lineheight) !important;font-size:var(--control-fontsize) !important;display:block !important;font-weight:bold !important;text-shadow:0 .5px 3px #320dc5 !important;opacity:0;width:0}button:hover{opacity:1}@keyframes icon-fade-in{from{opacity:0;max-width:0}to{opacity:.9;max-width:2.5em}}@keyframes counter-fade-in{from{opacity:0;width:0}to{opacity:1;width:var(--control-lineheight)}}","",{version:3,sources:["webpack://./src/app/content/services/inline/custom-elements/ProtonPassControl.raw.scss","webpack://./src/app/content/services/inline/custom-elements/reset.scss"],names:[],mappings:"AAKA,MCJC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CDFA,mBAAA,CACA,4BAAA,CACA,0BAAA,CAGA,mBAAA,CACA,SAAA,CACA,wBAAA,CACA,kBAAA,CACA,mBAAA,CACA,kBAAA,CAEA,qBAAA,CACA,yBAAA,CAGA,UAAA,CAGA,+BAAA,CACA,kCAAA,CAEA,YACC,kBAAA,CAIF,OClCC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CD4BA,kBAAA,CACA,WAAA,CACA,KAAA,CACA,SAAA,CACA,mBAAA,CACA,WAAA,CACA,uBAAA,CACA,yBAAA,CACA,4BAAA,CACA,gCAAA,CACA,8BAAA,CAGA,eACC,wDAAA,CAEA,sBACC,gEAAA,CAIF,wCAGC,yBAAA,CAGD,eACC,uBAAA,CAGD,cACC,uCAAA,CACA,4BAAA,CACA,gBAAA,CAAA,kBAAA,CAAA,mBAAA,CAAA,iBAAA,CACA,sBAAA,CACA,qBAAA,CACA,4BAAA,CACA,2CAAA,CACA,gDAAA,CACA,4CAAA,CACA,wBAAA,CACA,2BAAA,CACA,yCAAA,CACA,SAAA,CACA,OAAA,CAGD,aACC,SAAA,CAIF,wBACC,KACC,SAAA,CACA,WAAA,CAGD,GACC,UAAA,CACA,eAAA,CAAA,CAIF,2BACC,KACC,SAAA,CACA,OAAA,CAGD,GACC,SAAA,CACA,+BAAA,CAAA",sourcesContent:[`@use 'sass:meta';
@use '~@proton/styles/scss/lib/config' as *;
@use '~@proton/styles/scss/lib/em' as *;
@use './reset' as *;

:host {
	@include reset;

	pointer-events: none;
	position: absolute !important;
	isolation: unset !important;

	/* force reset element */
	margin: 0 !important;
	opacity: 1;
	z-index: unset !important;
	order: 0 !important;
	block-size: 0 !important;
	inline-size: 0 !important;
	/* stylelint-disable-next-line */
	float: left !important;
	animation: none !important;

	/* if parent display: flex */
	flex: 0 0 0;

	/* if parent display: grid */
	grid-row: auto / span 1 !important;
	grid-column: auto / span 1 !important;

	> input {
		pointer-events: all;
	}
}

button {
	@include reset;

	pointer-events: all;
	margin: auto;
	inset-block-start: 0;
	opacity: 0;
	inset-inline-end: em(5);
	max-inline-size: 0;
	margin-block-start: 0 !important;
	cursor: pointer !important;
	position: absolute !important;
	background-size: cover !important;
	border-radius: unset !important;

	/* Only animate icon after positioning to prevent flicker */
	&.visible {
		animation: icon-fade-in 0.125s ease-in-out both !important;

		&::after {
			animation: counter-fade-in 0.125s 0.05s ease-in-out both !important;
		}
	}

	&:hover,
	&:focus,
	&:active {
		transform: none !important;
	}

	&::before {
		content: none !important;
	}

	&::after {
		content: var(--control-count) !important;
		position: absolute !important;
		inset: 0 !important;
		margin: auto !important;
		color: white !important;
		text-align: center !important;
		font-family: system-ui, sans-serif !important;
		line-height: var(--control-lineheight) !important;
		font-size: var(--control-fontsize) !important;
		display: block !important;
		font-weight: bold !important;
		text-shadow: 0 0.5px 3px #320dc5 !important;
		opacity: 0;
		inline-size: 0;
	}

	&:hover {
		opacity: 1;
	}
}

@keyframes icon-fade-in {
	from {
		opacity: 0;
		max-inline-size: 0;
	}

	to {
		opacity: 0.9;
		max-inline-size: em(35);
	}
}

@keyframes counter-fade-in {
	from {
		opacity: 0;
		inline-size: 0;
	}

	to {
		opacity: 1;
		inline-size: var(--control-lineheight);
	}
}
`,`@mixin reset {
	margin-inline-start: unset;
	padding: 0 !important;
	outline: none !important;
	outline-color: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	min-inline-size: unset !important;
	min-block-size: unset !important;
	overflow: unset !important;
}
`],sourceRoot:""}]);let s=a},31447(e,t,r){"use strict";r.d(t,{A:()=>s});var n=r(13605),i=r.n(n),o=r(72485),a=r.n(o)()(i());a.push([e.id,":host{margin-left:unset;padding:0 !important;outline:none !important;outline-color:none !important;background-color:rgba(0,0,0,0) !important;border:none !important;box-shadow:none !important;min-width:unset !important;min-height:unset !important;overflow:unset !important;--frame-background-color-dark: #1f1f31;--frame-background-color-light: #fbf9fe;position:fixed !important;width:100% !important;border:0 !important;z-index:2147483647 !important;top:unset !important;right:unset !important;bottom:unset !important;left:unset !important;top:0 !important;left:0 !important;height:0 !important;padding:0 !important;margin:0 !important;display:block !important;--frame-background-color: var(--frame-background-color-dark)}:host([data-protonpass-theme=light]){--frame-background-color: var(--frame-background-color-light)}@media(prefers-color-scheme: light){:host([data-protonpass-theme=os]){--frame-background-color: var(--frame-background-color-light)}}:host::backdrop{position:fixed !important;top:0 !important;right:0 !important;bottom:0 !important;left:0 !important;background:rgba(0,0,0,0) !important;background-image:none !important;backdrop-filter:none !important;pointer-events:none !important;animation:none !important;transform:none !important;transition:none !important}iframe{position:absolute;width:var(--frame-width) !important;height:var(--frame-height) !important;top:var(--frame-top) !important;left:var(--frame-left) !important;right:var(--frame-right) !important;background-color:var(--frame-background-color) !important;box-shadow:0 2px 10px rgba(0,0,0,.3) !important;border-radius:12px !important;border:none !important;padding:0 !important;display:none;margin:0 !important;pointer-events:all !important}iframe.visible{display:block;transition:height .15s ease-in-out;animation:var(--frame-animation) .25s ease-in-out .05s both !important}iframe.fixed{position:fixed !important}@keyframes fadein{from{opacity:0;max-height:0}to{opacity:1;max-height:var(--frame-height)}}@keyframes slidein{from{transform:translateX(380px)}to{transform:translateX(0)}}","",{version:3,sources:["webpack://./src/app/content/services/inline/custom-elements/ProtonPassRoot.raw.scss","webpack://./src/app/content/services/inline/custom-elements/reset.scss"],names:[],mappings:"AAEA,MCDC,iBAAA,CACA,oBAAA,CACA,uBAAA,CACA,6BAAA,CACA,yCAAA,CACA,sBAAA,CACA,0BAAA,CACA,0BAAA,CACA,2BAAA,CACA,yBAAA,CDLA,sCAAA,CACA,uCAAA,CAEA,yBAAA,CACA,qBAAA,CACA,mBAAA,CACA,6BAAA,CACA,oBAAA,CAAA,sBAAA,CAAA,uBAAA,CAAA,qBAAA,CACA,gBAAA,CACA,iBAAA,CACA,mBAAA,CACA,oBAAA,CACA,mBAAA,CACA,wBAAA,CAEA,4DAAA,CAGD,qCACC,6DAAA,CAIA,oCADD,kCAEE,6DAAA,CAAA,CAIF,gBACC,yBAAA,CACA,gBAAA,CAAA,kBAAA,CAAA,mBAAA,CAAA,iBAAA,CACA,mCAAA,CACA,gCAAA,CACA,+BAAA,CACA,8BAAA,CACA,yBAAA,CACA,yBAAA,CACA,0BAAA,CAGD,OACC,iBAAA,CACA,mCAAA,CACA,qCAAA,CACA,+BAAA,CACA,iCAAA,CAAA,mCAAA,CACA,yDAAA,CACA,+CAAA,CACA,6BAAA,CACA,sBAAA,CACA,oBAAA,CACA,YAAA,CACA,mBAAA,CACA,6BAAA,CAEA,eACC,aAAA,CACA,kCAAA,CACA,sEAAA,CAGD,aACC,yBAAA,CAIF,kBACC,KACC,SAAA,CACA,YAAA,CAGD,GACC,SAAA,CACA,8BAAA,CAAA,CAIF,mBACC,KACC,2BAAA,CAGD,GACC,uBAAA,CAAA",sourcesContent:[`@use './reset' as *;

:host {
	@include reset;

	--frame-background-color-dark: #1f1f31;
	--frame-background-color-light: #fbf9fe;

	position: fixed !important;
	inline-size: 100% !important;
	border: 0 !important;
	z-index: 2147483647 !important;
	inset: unset !important;
	inset-block-start: 0 !important;
	inset-inline-start: 0 !important;
	block-size: 0 !important;
	padding: 0 !important;
	margin: 0 !important;
	display: block !important;

	--frame-background-color: var(--frame-background-color-dark);
}

:host([data-protonpass-theme='light']) {
	--frame-background-color: var(--frame-background-color-light);
}

:host([data-protonpass-theme='os']) {
	@media (prefers-color-scheme: light) {
		--frame-background-color: var(--frame-background-color-light);
	}
}

:host::backdrop {
	position: fixed !important;
	inset: 0 !important;
	background: transparent !important;
	background-image: none !important;
	backdrop-filter: none !important;
	pointer-events: none !important;
	animation: none !important;
	transform: none !important;
	transition: none !important;
}

iframe {
	position: absolute;
	inline-size: var(--frame-width) !important;
	block-size: var(--frame-height) !important;
	inset-block-start: var(--frame-top) !important;
	inset-inline: var(--frame-left) var(--frame-right) !important;
	background-color: var(--frame-background-color) !important;
	box-shadow: 0 2px 10px rgb(0 0 0 / 0.3) !important;
	border-radius: 12px !important;
	border: none !important;
	padding: 0 !important;
	display: none;
	margin: 0 !important;
	pointer-events: all !important;

	&.visible {
		display: block;
		transition: block-size 0.15s ease-in-out;
		animation: var(--frame-animation) 0.25s ease-in-out 0.05s both !important;
	}

	&.fixed {
		position: fixed !important;
	}
}

@keyframes fadein {
	from {
		opacity: 0;
		max-block-size: 0;
	}

	to {
		opacity: 1;
		max-block-size: var(--frame-height);
	}
}

@keyframes slidein {
	from {
		transform: translateX(380px);
	}

	to {
		transform: translateX(0);
	}
}
`,`@mixin reset {
	margin-inline-start: unset;
	padding: 0 !important;
	outline: none !important;
	outline-color: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
	min-inline-size: unset !important;
	min-block-size: unset !important;
	overflow: unset !important;
}
`],sourceRoot:""}]);let s=a},72485(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r}).join("")},t.i=function(e,r,n,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);n&&a[c[0]]||(void 0!==o&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),r&&(c[2]&&(c[1]="@media ".concat(c[2]," {").concat(c[1],"}")),c[2]=r),i&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=i):c[4]="".concat(i)),t.push(c))}},t}},13605(e){"use strict";e.exports=function(e){var t=e[1],r=e[3];if(!r)return t;if("function"==typeof btoa){var n=btoa(unescape(encodeURIComponent(JSON.stringify(r))));return[t].concat(["/*# ".concat("sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n)," */")]).join(`
`)}return[t].join(`
`)}},55227(e,t,r){function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=0xffffffff,this.__views__=[]}n.prototype=r(16487)(r(84886).prototype),n.prototype.constructor=n,e.exports=n},44118(e,t,r){function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}n.prototype=r(16487)(r(84886).prototype),n.prototype.constructor=n,e.exports=n},1734(e,t,r){e.exports=r(47778).Symbol},30368(e,t,r){e.exports=r(11993)(r(47778),"WeakMap")},9742(e){e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},6999(e){e.exports=function(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}},16487(e,t,r){var n=r(70898),i=Object.create;e.exports=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}()},22119(e,t,r){var n=r(6999),i=r(51460);e.exports=function e(t,r,o,a,s){var l=-1,u=t.length;for(o||(o=i),s||(s=[]);++l<u;){var c=t[l];r>0&&o(c)?r>1?e(c,r-1,o,a,s):n(s,c):a||(s[s.length]=c)}return s}},21583(e,t,r){var n=r(1734),i=r(50324),o=r(71761),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},73913(e,t,r){var n=r(21583),i=r(30885);e.exports=function(e){return i(e)&&"[object Arguments]"==n(e)}},43820(e,t,r){var n=r(21925),i=r(60151),o=r(70898),a=r(85686),s=/^\[object .+?Constructor\]$/,l=Object.prototype,u=Function.prototype.toString,c=l.hasOwnProperty,d=RegExp("^"+u.call(c).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?d:s).test(a(e))}},84886(e){e.exports=function(){}},3565(e,t,r){var n=r(85009),i=r(4524),o=r(38647);e.exports=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o},95399(e,t,r){var n=r(9599),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},83984(e){e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},38318(e,t,r){e.exports=r(47778)["__core-js_shared__"]},41622(e,t,r){var n=r(44118),i=r(85559),o=r(9514),a=r(72339),s=r(67174),l=r(35472);e.exports=function(e){return i(function(t){var r=t.length,i=r,u=n.prototype.thru;for(e&&t.reverse();i--;){var c=t[i];if("function"!=typeof c)throw TypeError("Expected a function");if(u&&!d&&"wrapper"==a(c))var d=new n([],!0)}for(i=d?i:r;++i<r;){var m=a(c=t[i]),p="wrapper"==m?o(c):void 0;d=p&&l(p[0])&&424==p[1]&&!p[4].length&&1==p[9]?d[a(p[0])].apply(d,p[3]):1==c.length&&l(c)?d[m]():d.thru(c)}return function(){var e=arguments,n=e[0];if(d&&1==e.length&&s(n))return d.plant(n).value();for(var i=0,o=r?t[i].apply(this,e):n;++i<r;)o=t[i].call(this,o);return o}})}},4524(e,t,r){var n=r(11993);e.exports=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},85559(e,t,r){var n=r(54621),i=r(79162),o=r(5542);e.exports=function(e){return o(i(e,void 0,n),e+"")}},40415(e,t,r){e.exports="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},9514(e,t,r){var n=r(92511),i=r(28793);e.exports=n?function(e){return n.get(e)}:i},72339(e,t,r){var n=r(97914),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},11993(e,t,r){var n=r(43820),i=r(37951);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},50324(e,t,r){var n=r(1734),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},37951(e){e.exports=function(e,t){return null==e?void 0:e[t]}},51460(e,t,r){var n=r(1734),i=r(48659),o=r(67174),a=n?n.isConcatSpreadable:void 0;e.exports=function(e){return o(e)||i(e)||!!(a&&e&&e[a])}},35472(e,t,r){var n=r(55227),i=r(9514),o=r(72339),a=r(52905);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},60151(e,t,r){var n,i=r(38318),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},92511(e,t,r){var n=r(30368);e.exports=n&&new n},71761(e){var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},79162(e,t,r){var n=r(9742),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),l=Array(s);++a<s;)l[a]=o[t+a];a=-1;for(var u=Array(t+1);++a<t;)u[a]=o[a];return u[t]=r(l),n(e,this,u)}}},97914(e){e.exports={}},47778(e,t,r){var n=r(40415),i="object"==typeof self&&self&&self.Object===Object&&self;e.exports=n||i||Function("return this")()},5542(e,t,r){var n=r(3565);e.exports=r(95620)(n)},95620(e){var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},85686(e){var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},9599(e){var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},27526(e,t,r){var n=r(55227),i=r(44118),o=r(83984);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},85009(e){e.exports=function(e){return function(){return e}}},26562(e,t,r){var n=r(70898),i=r(35059),o=r(88761),a=Math.max,s=Math.min;e.exports=function(e,t,r){var l,u,c,d,m,p,f=0,g=!1,h=!1,A=!0;if("function"!=typeof e)throw TypeError("Expected a function");function y(t){var r=l,n=u;return l=u=void 0,f=t,d=e.apply(n,r)}function b(e){var r=e-p,n=e-f;return void 0===p||r>=t||r<0||h&&n>=c}function w(){var e,r,n,o=i();if(b(o))return E(o);m=setTimeout(w,(e=o-p,r=o-f,n=t-e,h?s(n,c-r):n))}function E(e){return(m=void 0,A&&l)?y(e):(l=u=void 0,d)}function v(){var e,r=i(),n=b(r);if(l=arguments,u=this,p=r,n){if(void 0===m)return f=e=p,m=setTimeout(w,t),g?y(e):d;if(h)return clearTimeout(m),m=setTimeout(w,t),y(p)}return void 0===m&&(m=setTimeout(w,t)),d}return t=o(t)||0,n(r)&&(g=!!r.leading,c=(h="maxWait"in r)?a(o(r.maxWait)||0,t):c,A="trailing"in r?!!r.trailing:A),v.cancel=function(){void 0!==m&&clearTimeout(m),f=0,l=p=u=m=void 0},v.flush=function(){return void 0===m?d:E(i())},v}},54621(e,t,r){var n=r(22119);e.exports=function(e){return(null==e?0:e.length)?n(e,1):[]}},80601(e,t,r){e.exports=r(41622)()},38647(e){e.exports=function(e){return e}},48659(e,t,r){var n=r(73913),i=r(30885),o=Object.prototype,a=o.hasOwnProperty,s=o.propertyIsEnumerable;e.exports=n(function(){return arguments}())?n:function(e){return i(e)&&a.call(e,"callee")&&!s.call(e,"callee")}},67174(e){e.exports=Array.isArray},21925(e,t,r){var n=r(21583),i=r(70898);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},70898(e){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},30885(e){e.exports=function(e){return null!=e&&"object"==typeof e}},9493(e,t,r){var n=r(21583),i=r(30885);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},28793(e){e.exports=function(){}},35059(e,t,r){var n=r(47778);e.exports=function(){return n.Date.now()}},55377(e,t,r){var n=r(26562),i=r(70898);e.exports=function(e,t,r){var o=!0,a=!0;if("function"!=typeof e)throw TypeError("Expected a function");return i(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),n(e,t,{leading:o,maxWait:t,trailing:a})}},88761(e,t,r){var n=r(95399),i=r(70898),o=r(9493),a=0/0,s=/^[-+]0x[0-9a-f]+$/i,l=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return a;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=l.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):s.test(e)?a:+e}},52905(e,t,r){var n=r(55227),i=r(44118),o=r(84886),a=r(67174),s=r(30885),l=r(27526),u=Object.prototype.hasOwnProperty;function c(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(u.call(e,"__wrapped__"))return l(e)}return new i(e)}c.prototype=o.prototype,c.prototype.constructor=c,e.exports=c},97886(e,t,r){var n,i;!function(o){"use strict";void 0===(i="function"==typeof(n=o)?n.call(t,r,t,e):n)||(e.exports=i)}(function(){"use strict";var e=function(){},t="undefined",r=typeof window!==t&&typeof window.navigator!==t&&/Trident\/|MSIE /.test(window.navigator.userAgent),n=["trace","debug","info","warn","error"],i={},o=null;function a(e,t){var r=e[t];if("function"==typeof r.bind)return r.bind(e);try{return Function.prototype.bind.call(r,e)}catch(t){return function(){return Function.prototype.apply.apply(r,[e,arguments])}}}function s(){console.log&&(console.log.apply?console.log.apply(console,arguments):Function.prototype.apply.apply(console.log,[console,arguments])),console.trace&&console.trace()}function l(){for(var r=this.getLevel(),i=0;i<n.length;i++){var o=n[i];this[o]=i<r?e:this.methodFactory(o,r,this.name)}if(this.log=this.debug,typeof console===t&&r<this.levels.SILENT)return"No console available for logging"}function u(e){return function(){typeof console!==t&&(l.call(this),this[e].apply(this,arguments))}}function c(n,i,o){var l;return"debug"===(l=n)&&(l="log"),typeof console!==t&&("trace"===l&&r?s:void 0!==console[l]?a(console,l):void 0!==console.log?a(console,"log"):e)||u.apply(this,arguments)}function d(e,r){var a,s,u,d=this,m="loglevel";function p(){var e;if(typeof window!==t&&m){try{e=window.localStorage[m]}catch(e){}if(typeof e===t)try{var r=window.document.cookie,n=encodeURIComponent(m),i=r.indexOf(n+"=");-1!==i&&(e=/^([^;]+)/.exec(r.slice(i+n.length+1))[1])}catch(e){}return void 0===d.levels[e]&&(e=void 0),e}}function f(e){var t=e;if("string"==typeof t&&void 0!==d.levels[t.toUpperCase()]&&(t=d.levels[t.toUpperCase()]),"number"==typeof t&&t>=0&&t<=d.levels.SILENT)return t;throw TypeError("log.setLevel() called with invalid level: "+e)}"string"==typeof e?m+=":"+e:"symbol"==typeof e&&(m=void 0),d.name=e,d.levels={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,SILENT:5},d.methodFactory=r||c,d.getLevel=function(){return null!=u?u:null!=s?s:a},d.setLevel=function(e,r){return u=f(e),!1!==r&&function(e){var r=(n[e]||"silent").toUpperCase();if(typeof window!==t&&m){try{window.localStorage[m]=r;return}catch(e){}try{window.document.cookie=encodeURIComponent(m)+"="+r+";"}catch(e){}}}(u),l.call(d)},d.setDefaultLevel=function(e){s=f(e),p()||d.setLevel(e,!1)},d.resetLevel=function(){if(u=null,typeof window!==t&&m){try{window.localStorage.removeItem(m)}catch(e){}try{window.document.cookie=encodeURIComponent(m)+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"}catch(e){}}l.call(d)},d.enableAll=function(e){d.setLevel(d.levels.TRACE,e)},d.disableAll=function(e){d.setLevel(d.levels.SILENT,e)},d.rebuild=function(){if(o!==d&&(a=f(o.getLevel())),l.call(d),o===d)for(var e in i)i[e].rebuild()},a=f(o?o.getLevel():"WARN");var g=p();null!=g&&(u=f(g)),l.call(d)}(o=new d).getLogger=function(e){if("symbol"!=typeof e&&"string"!=typeof e||""===e)throw TypeError("You must supply a name when creating a logger.");var t=i[e];return t||(t=i[e]=new d(e,o.methodFactory)),t};var m=typeof window!==t?window.log:void 0;return o.noConflict=function(){return typeof window!==t&&window.log===o&&(window.log=m),o},o.getLoggers=function(){return i},o.default=o,o})},81445(e){e.exports=(()=>{var e={44:(e,t)=>{"use strict";var r=/(\w+)[-_].*/;function n(e,t){if(t[e])return t[e];var n=e.match(r);if(!n)throw Error("Can't find lang or lcale with code "+e);return t[n[1]]}function i(e){return e>1}function o(e){return 1!==e}function a(e){return 0}var s={ach:{n:2,f:i},af:{n:2,f:o},ak:{n:2,f:i},am:{n:2,f:i},an:{n:2,f:o},ar:{n:6,f:function(e){return 0===e?0:1===e?1:2===e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5}},arn:{n:2,f:i},ast:{n:2,f:o},ay:{n:1,f:a},az:{n:2,f:o},be:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},bg:{n:2,f:o},bn:{n:2,f:o},bo:{n:1,f:a},br:{n:2,f:i},brx:{n:2,f:o},bs:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},ca:{n:2,f:o},cgg:{n:1,f:a},cs:{n:3,f:function(e){return 1===e?0:e>=2&&e<=4?1:2}},csb:{n:3,f:function(e){return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},cy:{n:4,f:function(e){return 1===e?0:2===e?1:8!==e&&11!==e?2:3}},da:{n:2,f:o},de:{n:2,f:o},doi:{n:2,f:o},dz:{n:1,f:a},el:{n:2,f:o},en:{n:2,f:o},eo:{n:2,f:o},es:{n:2,f:o},et:{n:2,f:o},eu:{n:2,f:o},fa:{n:1,f:a},ff:{n:2,f:o},fi:{n:2,f:o},fil:{n:2,f:i},fo:{n:2,f:o},fr:{n:2,f:function(e){return e<=-2||e>=2}},fur:{n:2,f:o},fy:{n:2,f:o},ga:{n:5,f:function(e){return 1===e?0:2===e?1:e<7?2:e<11?3:4}},gd:{n:4,f:function(e){return 1===e||11===e?0:2===e||12===e?1:e>2&&e<20?2:3}},gl:{n:2,f:o},gu:{n:2,f:o},gun:{n:2,f:i},ha:{n:2,f:o},he:{n:2,f:o},hi:{n:2,f:o},hne:{n:2,f:o},hr:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},hu:{n:2,f:o},hy:{n:2,f:o},id:{n:1,f:a},is:{n:2,f:function(e){return e%10!=1||e%100==11}},it:{n:2,f:o},ja:{n:1,f:a},jbo:{n:1,f:a},jv:{n:2,f:function(e){return 0!==e}},ka:{n:1,f:a},kab:{n:2,f:o},kk:{n:2,f:o},km:{n:1,f:a},kn:{n:2,f:o},ko:{n:1,f:a},ku:{n:2,f:o},kw:{n:4,f:function(e){return 1===e?0:2===e?1:3===e?2:3}},ky:{n:1,f:a},lb:{n:2,f:o},ln:{n:2,f:i},lo:{n:1,f:a},lt:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2}},lv:{n:3,f:function(e){return e%10==1&&e%100!=11?0:0!==e?1:2}},mai:{n:2,f:o},mfe:{n:2,f:i},mg:{n:2,f:i},mi:{n:2,f:i},mk:{n:2,f:function(e){return+(1!==e&&e%10!=1)}},ml:{n:2,f:o},mn:{n:2,f:o},mni:{n:2,f:o},mnk:{n:3,f:function(e){return 0===e?0:1===e?1:2}},mr:{n:2,f:o},ms:{n:1,f:a},mt:{n:4,f:function(e){return 1===e?0:0===e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3}},my:{n:1,f:a},nah:{n:2,f:o},nap:{n:2,f:o},nb:{n:2,f:o},ne:{n:2,f:o},nl:{n:2,f:o},nn:{n:2,f:o},no:{n:2,f:o},nso:{n:2,f:o},oc:{n:2,f:i},or:{n:2,f:o},pa:{n:2,f:o},pap:{n:2,f:o},pl:{n:3,f:function(e){return 1===e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},pms:{n:2,f:o},ps:{n:2,f:o},pt:{n:2,f:o},rm:{n:2,f:o},ro:{n:3,f:function(e){return 1===e?0:0===e||e%100>0&&e%100<20?1:2}},ru:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},rw:{n:2,f:o},sah:{n:1,f:a},sat:{n:2,f:o},sco:{n:2,f:o},sd:{n:2,f:o},se:{n:2,f:o},si:{n:2,f:o},sk:{n:3,f:function(e){return 1===e?0:e>=2&&e<=4?1:2}},sl:{n:4,f:function(e){return e%100==1?1:e%100==2?2:3*(e%100==3||e%100==4)}},so:{n:2,f:o},son:{n:2,f:o},sq:{n:2,f:o},sr:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},su:{n:1,f:a},sv:{n:2,f:o},sw:{n:2,f:o},ta:{n:2,f:o},te:{n:2,f:o},tg:{n:2,f:i},th:{n:1,f:a},ti:{n:2,f:i},tk:{n:2,f:o},tr:{n:2,f:i},tt:{n:1,f:a},ug:{n:1,f:a},uk:{n:3,f:function(e){return e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2}},ur:{n:2,f:o},uz:{n:2,f:i},vi:{n:1,f:a},wa:{n:2,f:i},wo:{n:1,f:a},yo:{n:2,f:o},zh:{n:1,f:a}},l={};t.getNPlurals=function(e){return n(e,s).n},t.getPluralFunc=function(e){if(l[e])return l[e];var t=n(e,s),r=function(e,r){return r[+t.f(e)]};return l[e]=r,r}},429:(e,t,r)=>{e.exports=r(44)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n](o,o.exports,r),o.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};return(()=>{"use strict";function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function t(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?e(Object(n),!0).forEach(function(e){!function(e,t,r){var n;(t="symbol"==typeof(n=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r}(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):e(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}r.r(n),r.d(n,{Context:()=>N,TTag:()=>D,_:()=>U,addLocale:()=>B,c:()=>k,gettext:()=>W,jt:()=>G,msgid:()=>L,ngettext:()=>H,setDedent:()=>$,setDefaultLang:()=>Y,t:()=>q,useLocale:()=>j,useLocales:()=>z});let i=function e(r){return n.withOptions=n=>e(t(t({},r),n)),n;function n(e,...t){let i="string"==typeof e?[e]:e.raw,{escapeSpecialCharacters:o=Array.isArray(e)}=r,a="";for(let e=0;e<i.length;e++){let r=i[e];o&&(r=r.replace(/\\\n[ \t]*/g,"").replace(/\\`/g,"`").replace(/\\\$/g,"$").replace(/\\{/g,"{")),a+=r,e<t.length&&(a+=t[e])}let s=a.split(`
`),l=null;for(let e of s){let t=e.match(/^(\s+)\S+/);if(t){let e=t[1].length;l=l?Math.min(l,e):e}}if(null!==l){let e=l;a=s.map(t=>" "===t[0]||"	"===t[0]?t.slice(e):t).join(`
`)}return a.trim().replace(/\\n/g,`
`)}}({});var o=r(429);function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,u=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(u)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var l,u=function(e,t){for(var r=[],n=t.length,i=e.length,o=0;o<i;o++){var a=o<n?"${".concat(o,"}"):"";r.push(e[o]+a)}return r.join("")},c=function(e){return e.replace(/\s/g,"")},d={},m=(l=function(e){return new RegExp("\\$\\{(?:[\\s]+?|\\s?)".concat(e,"(?:[\\s]+?|\\s?)}"))},function(e){return d[e]||(d[e]=l(e)),d[e]}),p=function(e,t){return t.reduce(function(e,t,r){return e.replace(m(String(r)),String(t))},e)},f=function(e,t){var r=t.length-1;return e.reduce(function(e,n,i){return e+n+(i<=r?t[i]:"")},"")},g={},h=/\splural ?=?([\s\S]*);?/,A=/\$\{\s*([.\w+\[\]])*\s*\}/g;function y(e){for(var t=[],r=0,n=Object.entries(e);r<n.length;r++){var i=a(n[r],1)[0];e.hasOwnProperty(i)&&t.push(i)}return t}function b(e,t){return e.replace(A,function(e){return"${".concat(t[c(e)],"}")})}function w(e){var t={},r=e.match(A);if(!r)return null;for(var n=0;n<r.length;n++){var i=c(r[n]);t[i]=t[i]||{values:[],index:-1,toString:function(){return this.index=(this.index+1)%this.values.length,this.values[this.index].toString()}},t[i].values.push(n)}return t}function E(e){return(E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e){var t=function(e){if("object"!==E(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==E(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===E(t)?t:String(t)}var C=function(){var e;function t(){var e,r;!function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,t),r={locales:{},currentLocales:[],currentLocale:"en",dedent:!0,defaultLang:"en"},(e=v(e="config"))in this?Object.defineProperty(this,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):this[e]=r}return e=[{key:"addLocale",value:function(e,t){var r;if("translations"in t)r=function(e){for(var t={},r=y(e.translations),n=0;n<r.length;n++){for(var i=r[n],o=e.translations[i],a={},s=y(o),l=0;l<s.length;l++){var u=function(e){var t=w(e.msgid);if(!t)return e;var r={msgid:b(e.msgid,t),msgstr:[]};e.msgid_plural&&(r.msgid_plural=b(e.msgid_plural,t));for(var n=e.msgstr,i=0;i<n.length;i++)r.msgstr.push(b(n[i],t));return r.comments=e.comments,r}(o[s[l]]);a[u.msgid]=u}t[i]=a}return e.translations=t,e}(t);else{if(!t.contexts)throw Error("Invalid locale data format");r=function(e){for(var t={},r=y(e.contexts),n=0;n<r.length;n++){for(var i=r[n],o={},s=y(e.contexts[i]),l=0;l<s.length;l++){var u=s[l],c=a(function(e,t){var r=w(e);return r?[b(e,r),t.map(function(e){return b(e,r)})]:[e,t]}(u,e.contexts[i][u]),2),d=c[0],m=c[1];o[d]=m}t[i]=o}return e.contexts=t,e}(t)}this.config.locales[e]=r}},{key:"setCurrentLocale",value:function(e){this.config.currentLocale=e}},{key:"setDedent",value:function(e){this.config.dedent=e}},{key:"setCurrentLocales",value:function(e){this.config.currentLocales=e}},{key:"getAvailLocales",value:function(){return this.config.locales}},{key:"getCurrentLocales",value:function(){return this.config.currentLocales.map(function(e){return"string"==typeof e?e:e()})}},{key:"getCurrentLocale",value:function(){return"string"==typeof this.config.currentLocale?this.config.currentLocale:this.config.currentLocale()}},{key:"isDedent",value:function(){return this.config.dedent}},{key:"setDefaultLang",value:function(e){this.config.defaultLang=e}},{key:"getDefaultPluralFn",value:function(){return(0,o.getPluralFunc)(this.config.defaultLang)}},{key:"getDefaultPluralFormsCount",value:function(){return(0,o.getNPlurals)(this.config.defaultLang)}},{key:"getCurrentLocaleHeaders",value:function(){var e=this.getCurrentLocale();return this.config.locales[e].headers}}],function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,v(n.key),n)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}();function T(e){return(T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,t,r){return(t=O(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function R(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function I(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,O(n.key),n)}}function S(e,t,r){return t&&I(e.prototype,t),r&&I(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function O(e){var t=function(e){if("object"!==T(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!==T(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===T(t)?t:String(t)}var N=function(){function e(t){R(this,e),this.context=t,this.getContext=this.getContext}return S(e,[{key:"getContext",value:function(){return this.context}}]),e}();function x(e){if(!e)return!1;for(var t=0;t<e.length;t++)if(!e[t].length)return!1;return!0}var F=/(\${\s*\d+\s*})/g,P=/\${\s*(\d+)\s*}/;function L(e){if(e&&"reduce"in e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];var i=new String(f(e,r));return i._strs=e,i._exprs=r,i}return e}var D=S(function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{config:new C,context:new N("")},n=r.config,a=r.context;R(this,e),_(this,"maybeDedent",function(e){return t.conf.isDedent()?"string"!=typeof e||-1===e.indexOf(`
`)?e:i(e):e}),_(this,"findTransObj",function(e,r,n){var i=t.conf.getAvailLocales()[e];if(!i)return null;if("translations"in i){var o=i.translations[n]||i.translations[""],a=o&&o[r];if(a&&(!a||!a.comments||"fuzzy"!==a.comments.flag)&&x(a.msgstr))return a.msgstr}if("contexts"in i){var s=i.contexts[n]||i.contexts[""],l=s&&s[r];if(l&&x(l))return l}return null}),_(this,"findTranslation",function(e,r){var n=t.conf.getCurrentLocales();if(n.length)for(var i=0;i<n.length;i++){var o=t.findTransObj(n[i],e,r);if(o)return t.conf.setCurrentLocale(n[i]),o}return t.findTransObj(t.conf.getCurrentLocale(),e,r)}),_(this,"setDefaultLang",function(e){t.conf.setDefaultLang(e)}),_(this,"useLocales",function(e){t.conf.setCurrentLocales(e)}),_(this,"setDedent",function(e){t.conf.setDedent(!!e)}),_(this,"useLocale",function(e){t.conf.setCurrentLocale(e)}),_(this,"addLocale",function(e,r){t.conf.addLocale(e,r)}),_(this,"t",function(e){var r=e;if(e&&"reduce"in e){for(var n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var a=t.maybeDedent(u(e,i)),s=t.ctx.getContext(),l=t.findTranslation(a,s);r=l?p(l[0],i):f(e,i)}return r}),_(this,"jt",function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];if(e&&"reduce"in e){var o=t.maybeDedent(u(e,n)),a=t.ctx.getContext(),s=t.findTranslation(o,a);return s?s[0].split(F).map(function(e){var t=e.match(P);return t?n[+t[1]]:e}):e.reduce(function(e,t,r){return void 0!==n[r]?e.concat(t,n[r]):e.concat(t)},[])}return e}),_(this,"ngettext",function(){for(var e,r,n,i,a=arguments.length,s=Array(a),l=0;l<a;l++)s[l]=arguments[l];var c=t.maybeDedent(u(s[0]._strs,s[0]._exprs)),d=s[s.length-1],m=s.slice(1,-1);m.unshift(s[0].toString());var f=t.findTranslation(c,t.ctx.getContext());return f?p(((r=(e=t.conf.getCurrentLocaleHeaders()).language||e.Language)?(0,o.getPluralFunc)(r):((i=g[n=function(e){var t,r=e["plural-forms"]||e["Plural-Forms"];if(!r)throw Error('po. data should include "language" or "plural-form" header for ngettext');var n=(null==(t=h.exec(r))?void 0:t[1])||[];return";"===n[n.length-1]&&(n=n.slice(0,-1)),n}(e)])||(i=Function("n","args","return args[+ (".concat(n,")];")),g[n]=i),i))(d,f)||"",s[0]._exprs):t.conf.getDefaultPluralFn()(d,m)}),_(this,"gettext",function(e){var r=t.ctx.getContext(),n=t.findTranslation(e,r);return n?n[0]:e}),_(this,"_",this.gettext),_(this,"copyWithNewContext",function(r){return new e({config:t.conf,context:new N(r)})}),_(this,"c",function(e){var r=t.copyWithNewContext(e);return{t:r.t,jt:r.jt,gettext:r.gettext,ngettext:r.ngettext}}),this.conf=n,this.ctx=a||new N("")}),M=new D,k=M.c,U=M._,B=M.addLocale,W=M.gettext,G=M.jt,H=M.ngettext,$=M.setDedent,Y=M.setDefaultLang,q=M.t,j=M.useLocale,z=M.useLocales})(),n})()},80320(e,t){var r;"u">typeof globalThis||"u">typeof self&&self,void 0===(r=(function(e){"use strict";if(!(globalThis.chrome&&globalThis.chrome.runtime&&globalThis.chrome.runtime.id))throw Error("This script should only be loaded in a browser extension.");globalThis.browser&&globalThis.browser.runtime&&globalThis.browser.runtime.id?e.exports=globalThis.browser:e.exports=(e=>{let t={alarms:{clear:{minArgs:0,maxArgs:1},clearAll:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getAll:{minArgs:0,maxArgs:0}},bookmarks:{create:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},getChildren:{minArgs:1,maxArgs:1},getRecent:{minArgs:1,maxArgs:1},getSubTree:{minArgs:1,maxArgs:1},getTree:{minArgs:0,maxArgs:0},move:{minArgs:2,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeTree:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}},browserAction:{disable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},enable:{minArgs:0,maxArgs:1,fallbackToNoCallback:!0},getBadgeBackgroundColor:{minArgs:1,maxArgs:1},getBadgeText:{minArgs:1,maxArgs:1},getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},openPopup:{minArgs:0,maxArgs:0},setBadgeBackgroundColor:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setBadgeText:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},browsingData:{remove:{minArgs:2,maxArgs:2},removeCache:{minArgs:1,maxArgs:1},removeCookies:{minArgs:1,maxArgs:1},removeDownloads:{minArgs:1,maxArgs:1},removeFormData:{minArgs:1,maxArgs:1},removeHistory:{minArgs:1,maxArgs:1},removeLocalStorage:{minArgs:1,maxArgs:1},removePasswords:{minArgs:1,maxArgs:1},removePluginData:{minArgs:1,maxArgs:1},settings:{minArgs:0,maxArgs:0}},commands:{getAll:{minArgs:0,maxArgs:0}},contextMenus:{remove:{minArgs:1,maxArgs:1},removeAll:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},cookies:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:1,maxArgs:1},getAllCookieStores:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},devtools:{inspectedWindow:{eval:{minArgs:1,maxArgs:2,singleCallbackArg:!1}},panels:{create:{minArgs:3,maxArgs:3,singleCallbackArg:!0},elements:{createSidebarPane:{minArgs:1,maxArgs:1}}}},downloads:{cancel:{minArgs:1,maxArgs:1},download:{minArgs:1,maxArgs:1},erase:{minArgs:1,maxArgs:1},getFileIcon:{minArgs:1,maxArgs:2},open:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},pause:{minArgs:1,maxArgs:1},removeFile:{minArgs:1,maxArgs:1},resume:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},extension:{isAllowedFileSchemeAccess:{minArgs:0,maxArgs:0},isAllowedIncognitoAccess:{minArgs:0,maxArgs:0}},history:{addUrl:{minArgs:1,maxArgs:1},deleteAll:{minArgs:0,maxArgs:0},deleteRange:{minArgs:1,maxArgs:1},deleteUrl:{minArgs:1,maxArgs:1},getVisits:{minArgs:1,maxArgs:1},search:{minArgs:1,maxArgs:1}},i18n:{detectLanguage:{minArgs:1,maxArgs:1},getAcceptLanguages:{minArgs:0,maxArgs:0}},identity:{launchWebAuthFlow:{minArgs:1,maxArgs:1}},idle:{queryState:{minArgs:1,maxArgs:1}},management:{get:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},getSelf:{minArgs:0,maxArgs:0},setEnabled:{minArgs:2,maxArgs:2},uninstallSelf:{minArgs:0,maxArgs:1}},notifications:{clear:{minArgs:1,maxArgs:1},create:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:0},getPermissionLevel:{minArgs:0,maxArgs:0},update:{minArgs:2,maxArgs:2}},pageAction:{getPopup:{minArgs:1,maxArgs:1},getTitle:{minArgs:1,maxArgs:1},hide:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setIcon:{minArgs:1,maxArgs:1},setPopup:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},setTitle:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0},show:{minArgs:1,maxArgs:1,fallbackToNoCallback:!0}},permissions:{contains:{minArgs:1,maxArgs:1},getAll:{minArgs:0,maxArgs:0},remove:{minArgs:1,maxArgs:1},request:{minArgs:1,maxArgs:1}},runtime:{getBackgroundPage:{minArgs:0,maxArgs:0},getPlatformInfo:{minArgs:0,maxArgs:0},openOptionsPage:{minArgs:0,maxArgs:0},requestUpdateCheck:{minArgs:0,maxArgs:0},sendMessage:{minArgs:1,maxArgs:3},sendNativeMessage:{minArgs:2,maxArgs:2},setUninstallURL:{minArgs:1,maxArgs:1}},sessions:{getDevices:{minArgs:0,maxArgs:1},getRecentlyClosed:{minArgs:0,maxArgs:1},restore:{minArgs:0,maxArgs:1}},storage:{local:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}},managed:{get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1}},sync:{clear:{minArgs:0,maxArgs:0},get:{minArgs:0,maxArgs:1},getBytesInUse:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}}},tabs:{captureVisibleTab:{minArgs:0,maxArgs:2},create:{minArgs:1,maxArgs:1},detectLanguage:{minArgs:0,maxArgs:1},discard:{minArgs:0,maxArgs:1},duplicate:{minArgs:1,maxArgs:1},executeScript:{minArgs:1,maxArgs:2},get:{minArgs:1,maxArgs:1},getCurrent:{minArgs:0,maxArgs:0},getZoom:{minArgs:0,maxArgs:1},getZoomSettings:{minArgs:0,maxArgs:1},goBack:{minArgs:0,maxArgs:1},goForward:{minArgs:0,maxArgs:1},highlight:{minArgs:1,maxArgs:1},insertCSS:{minArgs:1,maxArgs:2},move:{minArgs:2,maxArgs:2},query:{minArgs:1,maxArgs:1},reload:{minArgs:0,maxArgs:2},remove:{minArgs:1,maxArgs:1},removeCSS:{minArgs:1,maxArgs:2},sendMessage:{minArgs:2,maxArgs:3},setZoom:{minArgs:1,maxArgs:2},setZoomSettings:{minArgs:1,maxArgs:2},update:{minArgs:1,maxArgs:2}},topSites:{get:{minArgs:0,maxArgs:0}},webNavigation:{getAllFrames:{minArgs:1,maxArgs:1},getFrame:{minArgs:1,maxArgs:1}},webRequest:{handlerBehaviorChanged:{minArgs:0,maxArgs:0}},windows:{create:{minArgs:0,maxArgs:1},get:{minArgs:1,maxArgs:2},getAll:{minArgs:0,maxArgs:1},getCurrent:{minArgs:0,maxArgs:1},getLastFocused:{minArgs:0,maxArgs:1},remove:{minArgs:1,maxArgs:1},update:{minArgs:2,maxArgs:2}}};if(0===Object.keys(t).length)throw Error("api-metadata.json has not been included in browser-polyfill");class r extends WeakMap{constructor(e,t){super(t),this.createItem=e}get(e){return this.has(e)||this.set(e,this.createItem(e)),super.get(e)}}let n=(t,r)=>(...n)=>{e.runtime.lastError?t.reject(Error(e.runtime.lastError.message)):r.singleCallbackArg||n.length<=1&&!1!==r.singleCallbackArg?t.resolve(n[0]):t.resolve(n)},i=e=>1==e?"argument":"arguments",o=(e,t,r)=>new Proxy(t,{apply:(t,n,i)=>r.call(n,e,...i)}),a=Function.call.bind(Object.prototype.hasOwnProperty),s=(e,t={},r={})=>{let l=Object.create(null);return new Proxy(Object.create(e),{has:(t,r)=>r in e||r in l,get(u,c,d){if(c in l)return l[c];if(!(c in e))return;let m=e[c];if("function"==typeof m)if("function"==typeof t[c])m=o(e,e[c],t[c]);else if(a(r,c)){let t,a=(t=r[c],function(e,...r){if(r.length<t.minArgs)throw Error(`Expected at least ${t.minArgs} ${i(t.minArgs)} for ${c}(), got ${r.length}`);if(r.length>t.maxArgs)throw Error(`Expected at most ${t.maxArgs} ${i(t.maxArgs)} for ${c}(), got ${r.length}`);return new Promise((i,o)=>{if(t.fallbackToNoCallback)try{e[c](...r,n({resolve:i,reject:o},t))}catch(n){console.warn(`${c} API method doesn't seem to support the callback parameter, falling back to call it without a callback: `,n),e[c](...r),t.fallbackToNoCallback=!1,t.noCallback=!0,i()}else t.noCallback?(e[c](...r),i()):e[c](...r,n({resolve:i,reject:o},t))})});m=o(e,e[c],a)}else m=m.bind(e);else if("object"==typeof m&&null!==m&&(a(t,c)||a(r,c)))m=s(m,t[c],r[c]);else{if(!a(r,"*"))return Object.defineProperty(l,c,{configurable:!0,enumerable:!0,get:()=>e[c],set(t){e[c]=t}}),m;m=s(m,t[c],r["*"])}return l[c]=m,m},set:(t,r,n,i)=>(r in l?l[r]=n:e[r]=n,!0),defineProperty:(e,t,r)=>Reflect.defineProperty(l,t,r),deleteProperty:(e,t)=>Reflect.deleteProperty(l,t)})},l=e=>({addListener(t,r,...n){t.addListener(e.get(r),...n)},hasListener:(t,r)=>t.hasListener(e.get(r)),removeListener(t,r){t.removeListener(e.get(r))}}),u=new r(e=>"function"!=typeof e?e:function(t){e(s(t,{},{getContent:{minArgs:0,maxArgs:0}}))}),c=new r(e=>"function"!=typeof e?e:function(t,r,n){let i,o,a,s=!1,l=new Promise(e=>{o=function(t){s=!0,e(t)}});try{a=e(t,r,o)}catch(e){a=Promise.reject(e)}let u=!0!==a&&(i=a)&&"object"==typeof i&&"function"==typeof i.then;return(!0===a||!!u||!!s)&&((u?a:l).then(e=>{n(e)},e=>{n({__mozWebExtensionPolyfillReject__:!0,message:e&&(e instanceof Error||"string"==typeof e.message)?e.message:"An unexpected error occurred"})}).catch(e=>{console.error("Failed to send onMessage rejected reply",e)}),!0)}),d=({reject:t,resolve:r},n)=>{e.runtime.lastError?"The message port closed before a response was received."===e.runtime.lastError.message?r():t(Error(e.runtime.lastError.message)):n&&n.__mozWebExtensionPolyfillReject__?t(Error(n.message)):r(n)},m=(e,t,r,...n)=>{if(n.length<t.minArgs)throw Error(`Expected at least ${t.minArgs} ${i(t.minArgs)} for ${e}(), got ${n.length}`);if(n.length>t.maxArgs)throw Error(`Expected at most ${t.maxArgs} ${i(t.maxArgs)} for ${e}(), got ${n.length}`);return new Promise((e,t)=>{let i=d.bind(null,{resolve:e,reject:t});n.push(i),r.sendMessage(...n)})},p={devtools:{network:{onRequestFinished:l(u)}},runtime:{onMessage:l(c),onMessageExternal:l(c),sendMessage:m.bind(null,"sendMessage",{minArgs:1,maxArgs:3})},tabs:{sendMessage:m.bind(null,"sendMessage",{minArgs:2,maxArgs:3})}},f={clear:{minArgs:1,maxArgs:1},get:{minArgs:1,maxArgs:1},set:{minArgs:1,maxArgs:1}};return t.privacy={network:{"*":f},services:{"*":f},websites:{"*":f}},s(e,p,t)})(chrome)}).apply(t,[e]))||(e.exports=r)}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={id:n,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";let e,t,n,i,o,a,s,l,u,c,d=()=>{try{return window.self===window.top}catch(e){return!1}},m=(e=8)=>Array.from(crypto.getRandomValues(new Uint8Array(e))).map(e=>e.toString(16)).join("").slice(0,e);function p(){}let f="data-protonpass-base-css";var g,h,A,y,b,w,E,v,C,T,_,R,I,S,O,N,x,F,P,L,D=((N={}).STRICT="get",N.LOOSE="read",N);let M=e=>{let t={};return{set:e=>t.ctx=e,get:()=>{if(void 0===t.ctx)throw Error(`Context#${e} has not been initialized`);return t.ctx},read:()=>t.ctx,clear:()=>{delete t.ctx,t.ctx=void 0}}},k=M("contentscript"),U=(t=D.LOOSE,e=>(...r)=>e(k[t]()??null,...r));(g=x||(x={})).LOGIN="login",g.NOOP="noop",g.PASSWORD_CHANGE="password-change",g.RECOVERY="recovery",g.REGISTER="register",(h=F||(F={})).EMAIL="email",h.IDENTITY="identity",h.OTP="otp",h.PASSWORD_CURRENT="password",h.PASSWORD_NEW="new-password",h.USERNAME="username",h.USERNAME_HIDDEN="username-hidden",h.CREDIT_CARD="cc",(A=P||(P={})).FULLNAME="id:fullname",A.FIRSTNAME="id:firstname",A.MIDDLENAME="id:middlname",A.LASTNAME="id:lastname",A.TELEPHONE="id:tel",A.ADDRESS="id:address",A.STATE="id:state",A.CITY="id:city",A.ZIPCODE="id:zipcode",A.ORGANIZATION="id:org",A.COUNTRY="id:country",A.EMAIL="id:email",(y=L||(L={})).NAME="cc:name",y.FIRSTNAME="cc:firstname",y.LASTNAME="cc:lastname",y.NUMBER="cc:number",y.CSC="cc:cvc",y.EXP="cc:exp",y.EXP_YEAR="cc:exp-year",y.EXP_MONTH="cc:exp-month";let B=Object.values(x),W=Object.values(F),G=new Set(Object.values(P)),H=new Set(Object.values(L));var $=r(80320),Y=r.n($),q=r(97886),j=r.n(q);j().methodFactory=()=>p,j().setLevel("INFO",!1);let z=j(),K=globalThis,V={allowProxy:!0,globals:{chrome:K.chrome,browser:K.browser}},Q=(n=Y(),setTimeout(()=>V.allowProxy&&Object.entries(V.globals).filter(([,e])=>e).forEach(([e,t])=>{K[e]=new Proxy(t,{get(e,t,r){if("app"!==t)return z.error("[Extension::Error] extension API is protected")},set:()=>(z.error("[Extension::Error] extension API is read-only"),!1)})}),0),n);V.globals.chrome;let X=Q.runtime.getURL("/assets/protonpass-icon-active.svg"),Z=Q.runtime.getURL("/assets/protonpass-icon-locked.svg"),J=Q.runtime.getURL("/assets/protonpass-icon-disabled.svg"),ee=Q.runtime.getURL("/assets/protonpass-icon-counter.svg"),et=Q.runtime.getURL("/dropdown.html"),er=Q.runtime.getURL("/notification.html");var en=((b={}).AUTOSAVE="AUTOSAVE",b.OTP="OTP",b.PASSKEY_CREATE="PASSKEY::CREATE",b.PASSKEY_GET="PASSKEY::GET",b),ei=((w={}).AUTOFILL_CC="AUTOFILL_CC",w.AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",w.AUTOFILL_LOGIN="AUTOFILL_LOGIN",w.AUTOSUGGEST_ALIAS="AUTOSUGGEST_ALIAS",w.AUTOSUGGEST_PASSWORD="AUTOSUGGEST_PASSWORD",w);let eo={[x.LOGIN]:{[F.USERNAME]:{action:"AUTOFILL_LOGIN",filterable:!0},[F.USERNAME_HIDDEN]:{},[F.EMAIL]:{action:"AUTOFILL_LOGIN",filterable:!0},[F.PASSWORD_CURRENT]:{action:"AUTOFILL_LOGIN"},[F.CREDIT_CARD]:{action:"AUTOFILL_CC"}},[x.REGISTER]:{[F.USERNAME]:{},[F.USERNAME_HIDDEN]:{},[F.EMAIL]:{action:"AUTOSUGGEST_ALIAS"},[F.PASSWORD_NEW]:{action:"AUTOSUGGEST_PASSWORD"},[F.IDENTITY]:{action:"AUTOFILL_IDENTITY"},[F.CREDIT_CARD]:{action:"AUTOFILL_CC"}},[x.RECOVERY]:{[F.EMAIL]:{action:"AUTOFILL_LOGIN",filterable:!0},[F.IDENTITY]:{action:"AUTOFILL_IDENTITY"},[F.CREDIT_CARD]:{action:"AUTOFILL_CC"}},[x.PASSWORD_CHANGE]:{[F.PASSWORD_CURRENT]:{action:"AUTOFILL_LOGIN"},[F.PASSWORD_NEW]:{action:"AUTOSUGGEST_PASSWORD"}},[x.NOOP]:{[F.EMAIL]:{action:"AUTOSUGGEST_ALIAS"},[F.PASSWORD_CURRENT]:{action:"AUTOFILL_LOGIN"},[F.PASSWORD_NEW]:{action:"AUTOSUGGEST_PASSWORD"},[F.IDENTITY]:{action:"AUTOFILL_IDENTITY"},[F.CREDIT_CARD]:{action:"AUTOFILL_CC"}}},ea=(...e)=>t=>e.reduce((e,t)=>e[t],t),es=e=>e?.[e.length-1];var el=r(80601);let eu=r.n(el)(),ec=(...e)=>t=>e.some(e=>e(t)),ed=e=>(...t)=>!e(...t),em=(...e)=>t=>e.includes(t),ep=e=>t=>e===t,ef=e=>!!e,eg=(e,t)=>{let r=new Map;return(...n)=>{let i=t?.key?.(...n)??"",o=r.get(i)??e(...n).finally(()=>r.delete(i));return r.set(i,o),o}},eh=(e,t)=>{let r=new Map;return async(...n)=>{var i;let o,a,s,l=t?.key?.(...n)??"",u=r.get(l)??Promise.resolve(),c=(o=p,a=p,(s=new Promise((e,t)=>{o=t=>{e(t),i?.onResolve?.(t)},a=e=>{t(e),i?.onReject?.(e)}})).resolve=o,s.reject=a,s);return r.set(l,u.then(async()=>{try{let t=await e(...n);c.resolve(t)}catch(e){c.reject(e)}})),c}},eA=async(e,t)=>{let r=[];for(let n of e){let e=await t(n,r);r.push(e)}return r},ey=e=>e?.trim().replace(/\s+/g," "),eb=e=>e?.split(" ").filter(ef)??[],ew=eu(e=>{if(e.fullName)return e.fullName;let t=[e.firstName,e.middleName,e.lastName].filter(Boolean).join(" ").trim();return t.length?t:void 0},ey),eE=eu(e=>e.firstName?e.firstName.trim():eb(e.fullName)[0],ey),ev=eu(e=>{if(e.middleName)return e.middleName.trim();let t=eb(e.fullName);return t.length>2?t.slice(1,t.length-1).join(" "):void 0},ey),eC=eu(e=>{if(e.lastName)return e.lastName.trim();let t=eb(e.fullName);return t.length>1?es(t):void 0},ey),eT={[P.FULLNAME]:ew,[P.FIRSTNAME]:eE,[P.MIDDLENAME]:ev,[P.LASTNAME]:eC,[P.TELEPHONE]:ea("phoneNumber"),[P.ORGANIZATION]:ea("organization"),[P.ADDRESS]:ea("streetAddress"),[P.CITY]:ea("city"),[P.STATE]:ea("stateOrProvince"),[P.ZIPCODE]:ea("zipOrPostalCode"),[P.COUNTRY]:ea("countryOrRegion"),[P.EMAIL]:ea("email")},e_=async(e,t,r)=>{let n=new Set,i=e.filter(e=>e.sectionIndex===t.sectionIndex),o=i.findIndex(e=>e===t),a=-1!==o?[...i.slice(o),...i.slice(0,o)]:i;await eA(a,async e=>{let t=e.fieldType===F.IDENTITY||e.fieldType===F.EMAIL?e.fieldSubType:void 0,i=e.autofilled===F.IDENTITY,o=null===e.autofilled;if(!t||n.has(t)||!(i||o))return;let a=(0,eT[t])(r)||(i?"":void 0);void 0!==a&&(await e.autofill(a,{type:F.IDENTITY}),n.add(t))})};class eR extends Error{}class eI extends Error{}function eS(e){return e}function eO(e,t,r){let n,i,o=!0;if(eZ(function(e){let a=t(e);(r(a,i)||o)&&(n=e,i=a,o=!1)},e),o)throw Error("Tried to call best() on empty iterable");return n}function eN(e,t=eS){return eO(e,t,(e,t)=>e>t)}function ex(e,t=eS){let r,n=[],i=!0;return eZ(function(e){let o=t(e);o>r||i?(n=[e],r=o,i=!1):o===r&&n.push(e)},e),n}function eF(e,t=eS){return eO(e,t,(e,t)=>e<t)}function eP(e){let t,r=!0;return eZ(function(e){r?(t=e,r=!1):t+=e},e),t}function*eL(e,t=e=>!0){for(let r of(yield e,e.childNodes))if(t(r))for(let e of eL(r,t))yield e}let eD=new Set(["ADDRESS","BLOCKQUOTE","BODY","CENTER","DIR","DIV","DL","FIELDSET","FORM","H1","H2","H3","H4","H5","H6","HR","ISINDEX","MENU","NOFRAMES","NOSCRIPT","OL","P","PRE","TABLE","UL","DD","DT","FRAMESET","LI","TBODY","TD","TFOOT","TH","THEAD","TR","HTML"]);function eM(e){return eD.has(e.tagName)}function*ek(e,t=e=>!0){for(let r of eL(e,e=>!(eM(e)||"SCRIPT"===e.tagName&&"STYLE"===e.tagName)&&t(e)))r.nodeType===r.TEXT_NODE&&(yield r.textContent)}function eU(e,t=e=>!0){return eP(eX(e=>eB(e).length,ek(e,t)))}function eB(e){return e.replace(/\s{2,}/g," ")}function eW(e){return e.nodeType===e.TEXT_NODE&&0===e.textContent.trim().length}function eG(e,t,r){if(e.has(t))return e.get(t);let n=r();return e.set(t,n),n}function eH(e,t,r){return e.has(t)?e.get(t):r()}function e$(e,t){let r=[],n=new Set(e),i=new Set;for(;n.size>0;)!function e(o){if(i.has(o))throw new eR("The graph has a cycle.");if(n.has(o)){for(let r of(i.add(o),t(o)))e(r);i.delete(o),n.delete(o),r.push(o)}}(eq(n));return r}class eY extends Set{pop(){for(let e of this.values())return this.delete(e),e;throw Error("Tried to pop from an empty NiceSet.")}extend(e){for(let t of e)this.add(t);return this}minus(e){let t=new eY(this);for(let r of e)t.delete(r);return t}toString(){return"{"+Array.from(this).join(", ")+"}"}}function eq(e){for(let t of e)return t}function ej(e){return e.ownerDocument.documentElement}function ez(e){return eJ(e)?e:e.element}function*eK(e){let t;for(yield e;null!==(t=e.parentNode)&&t.nodeType===t.ELEMENT_NODE;)yield t,e=t}function eV(e){return 1/(1+Math.exp(-e))}function*eQ(e){for(let r of e){var t;"string"!=typeof r&&!(r instanceof Element)&&(t=r)&&"function"==typeof t[Symbol.iterator]?yield*eQ(r):yield r}}function*eX(e,t){for(let r of t)yield e(r)}function eZ(e,t){for(let r of t)e(r)}function eJ(e){return void 0!==e.nodeName}function*e0(e){for(let t=e.length-1;t>=0;t--)yield e[t]}function e1(e){let t=e.ownerDocument;null===t&&(t=e);let r=t.defaultView;if(null===r)throw new eI;return r}var e2=Object.freeze({__proto__:null,NiceSet:eY,ancestors:eK,attributesMatch:function(e,t,r=[]){let n=0===r.length?Array.from(e.attributes).map(e=>e.name):r;for(let r=0;r<n.length;r++){let i=e.getAttribute(n[r]);if(i&&(Array.isArray(i)&&i.some(t)||t(i)))return!0}return!1},best:eO,collapseWhitespace:eB,domSort:function(e){return Array.from(e).sort(function(e,t){let r=e.element,n=r.compareDocumentPosition(t.element);return n&r.DOCUMENT_POSITION_FOLLOWING?-1:n&r.DOCUMENT_POSITION_PRECEDING?1:0})},first:eq,flatten:eQ,forEach:eZ,getDefault:eH,identity:eS,inlineTextLength:eU,inlineTexts:ek,isBlock:eM,isDomElement:eJ,isVisible:function(e){let t=ez(e),r=e1(t),n=t.getBoundingClientRect(),i=r.getComputedStyle(t);if(0===n.width&&0===n.height&&"hidden"!==i.overflow||"hidden"===i.visibility||n.x+n.width<0||n.y+n.height<0)return!1;for(let e of eK(t)){let o=e===t,a=o?i:r.getComputedStyle(e);if("0"===a.opacity)return!1;if("contents"===a.display)continue;let s=o?n:e.getBoundingClientRect();if((0===s.width||0===s.height)&&"hidden"===i.overflow)return!1}return!0},isWhitespace:eW,length:function(e){let t=0;for(let r of e)t++;return t},linearScale:function(e,t,r){if(t<r){if(e<=t)return 0;else if(e>=r)return 1}else if(e>=t)return 0;else if(e<=r)return 1;return 1/(r-t)*(e-t)},linkDensity:function(e,t){return void 0===t&&(t=eU(e.element)),(t-eU(e.element,e=>"A"!==e.tagName))/t},map:eX,max:eN,maxes:ex,min:eF,numberOfMatches:function(e,t){return(t.match(e)||[]).length},page:function(e){return function(t){let r=e(t);return void 0!==r.score&&(r.element=ej(t.element)),r}},reversed:e0,rgbaFromString:function(e){let t=e.match(/^rgba?\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d+(?:\.\d+)?)\s*)?\)$/i);if(t)return[t[1]/255,t[2]/255,t[3]/255,void 0===t[4]?void 0:parseFloat(t[4])];throw Error("Color "+e+" did not match pattern rgb[a](r, g, b[, a]).")},rootElement:ej,saturation:function(e,t,r){let n=Math.max(e,t,r),i=Math.min(e,t,r),o=1-Math.abs((n+i)/2*2-1);return 0===o?0:(n-i)/o},setDefault:eG,sigmoid:eV,sum:eP,toDomElement:ez,toposort:e$,walk:eL,windowForElement:e1});function e5(e,t,{differentDepthCost:r=2,differentTagCost:n=2,sameTagCost:i=1,strideCost:o=1,additionalCost:a=(e,t)=>0}={}){if(e===t)return 0;let s=eJ(e)?e:e.element,l=eJ(t)?t:t.element,u=[s],c=[l],d=s,m=l;for(;!d.contains(l);)u.push(d=d.parentNode);let p=s.compareDocumentPosition(l);if(p&(s.DOCUMENT_POSITION_CONTAINS|s.DOCUMENT_POSITION_CONTAINED_BY))return Number.MAX_VALUE;do c.push(m=m.parentNode);while(m!==d)let f=u,g=c,h=0;for(p&s.DOCUMENT_POSITION_FOLLOWING?(f=u,g=c):p&s.DOCUMENT_POSITION_PRECEDING&&(f=c,g=u);f.length||g.length;){let e=f.pop(),t=g.pop();void 0===e||void 0===t?h+=r:h+=e.tagName===t.tagName?i:n,0!==o&&(h+=function(e,t){let r=0,n=e,i=n&&n!==t;for(;i;)(i=(n=n.nextSibling)&&n!==t)&&!eW(n)&&(r+=1);if(n!==t)for(n=t;n;)(n=n.previousSibling)&&!eW(n)&&(r+=1);return r}(e,t)*o)}return h+a(e,t)}class e4{constructor(e,t){this._matrix=new Map;const r=e.map(e=>[e]);for(let e of r){const r=new Map;for(let n of this._matrix.keys())r.set(n,t(e[0],n[0]));this._matrix.set(e,r)}this._numClusters=r.length}closest(){let e=this;if(this._numClusters<2)throw Error("There must be at least 2 clusters in order to return the closest() ones.");return eF(function(){let t=[];for(let[r,n]of e._matrix.entries())for(let[e,i]of n.entries())t.push({a:r,b:e,distance:i});return t}(),e=>e.distance)}_cachedDistance(e,t){let r=this._matrix.get(e).get(t);return void 0===r&&(r=this._matrix.get(t).get(e)),r}merge(e,t){let r=new Map;for(let n of this._matrix.keys())n!==e&&n!==t&&r.set(n,Math.min(this._cachedDistance(e,n),this._cachedDistance(t,n)));for(let r of(this._matrix.delete(e),this._matrix.delete(t),this._matrix.values()))r.delete(e),r.delete(t);this._matrix.set([e,t],r),this._numClusters-=1}numClusters(){return this._numClusters}clusters(){return Array.from(this._matrix.keys()).map(e=>Array.from(eQ(e)))}}function e3(e,t,r=e5){let n,i=new e4(e,r);for(;i.numClusters()>1&&(n=i.closest()).distance<t;)i.merge(n.a,n.b);return i.clusters()}var e8=Object.freeze({__proto__:null,clusters:e3,distance:e5,euclidean:function(e,t){function r(e){return e.left+e.width/2}function n(e){return e.top+e.height/2}let i=ez(e),o=ez(t),a=i.getBoundingClientRect(),s=o.getBoundingClientRect();return Math.sqrt((r(a)-r(s))**2+(n(a)-n(s))**2)}});class e6{constructor(){this._predicate=()=>!0}static fromFirstCall(e){if("type"===e.method)return new te(...e.args);if("and"===e.method)return new ti(e.args);if("nearest"===e.method)return new ta(e.args);throw Error("The left-hand side of a rule() must start with dom(), type(), and(), or nearest().")}when(e){let t=this.clone();return t._predicate=e,t}fnodesSatisfyingWhen(e){return Array.from(e).filter(this._predicate)}checkFact(e){}guaranteedType(){}aggregatedType(){}}class e7 extends e6{constructor(e){if(super(),void 0===e)throw Error("A querySelector()-style selector is required as the argument to "+this._callName()+"().");this.selector=e}_callName(){return"dom"}clone(){return new this.constructor(this.selector)}fnodes(e){return this._domNodesToFilteredFnodes(e,e.doc.querySelectorAll(this.selector))}_domNodesToFilteredFnodes(e,t){let r=[];for(let n=0;n<t.length;n++)r.push(e.fnodeForElement(t[n]));return this.fnodesSatisfyingWhen(r)}checkFact(e){if(void 0===e.type)throw Error(`The right-hand side of a ${this._callName()}() rule failed to specify a type. This means there is no way for its output to be used by later rules. All it specified was ${e}.`)}asLhs(){return this}possibleTypeCombinations(){return[]}typesMentioned(){return new eY}}class e9 extends e7{constructor(e){super(""),this.query=e}_callName(){return"domQuery"}clone(){return new e9(this.query)}fnodes(e){return this._domNodesToFilteredFnodes(e,this.query(e.doc))}}class te extends e6{constructor(e){if(super(),void 0===e)throw Error("A type name is required when calling type().");this._type=e}clone(){return new this.constructor(this._type)}fnodes(e){let t=eH(e.typeCache,this._type,()=>[]);return this.fnodesSatisfyingWhen(t)}type(e){return new this.constructor(e)}max(){return new tr(this._type)}bestCluster(e){return new tn(this._type,e)}guaranteedType(){return this._type}possibleTypeCombinations(){return[this.typesMentioned()]}typesMentioned(){return new eY([this._type])}}class tt extends te{aggregatedType(){return this._type}}class tr extends tt{fnodes(e){let t=this,r=()=>super.fnodes(e);return eG(e.maxCache,this._type,function(){return ex(r(),r=>e.weightedScore(r.scoresSoFarFor(t._type)))})}}class tn extends tt{constructor(e,t){super(e),this._options=t||{splittingDistance:3}}fnodes(e){let t=Array.from(super.fnodes(e));return 0===t.length?[]:eN(e3(t,this._options.splittingDistance,(e,t)=>e5(e,t,this._options)).map(e=>[e,eP(e.map(e=>e.scoreFor(this._type)))]),e=>e[1])[0]}}class ti extends e6{constructor(e){super(),this._args=e.map(to)}*fnodes(e){let t=this._args[0].fnodes(e);e:for(let e of t){for(let t of this._args.slice(1))if(!e.hasType(t.guaranteedType()))continue e;yield e}}possibleTypeCombinations(){return[this.typesMentioned()]}typesMentioned(){return new eY(this._args.map(e=>e.guaranteedType()))}}function to(e){let t=e.asLhs();if(t.constructor!==te)throw Error("and() and nearest() support only simple type() calls as arguments for now.");return t}class ta extends e6{constructor([e,t,r]){super(),this._a=to(e),this._b=to(t),this._distance=r}*fnodes(e){let t=this._a.fnodes(e),r=Array.from(this._b.fnodes(e));if(r.length>0)for(let e of t){let t=eF(r,t=>this._distance(e,t));yield{fnode:e,rhsTransformer:function(e){return void 0===e.note&&(e.note=t),e}}}}checkFact(e){}possibleTypeCombinations(){return[new eY([this._a.guaranteedType()])]}typesMentioned(){return new eY([this._a.guaranteedType(),this._b.guaranteedType()])}guaranteedType(){return this._a.guaranteedType()}}let ts={type:1,note:2,score:4,element:8};function tl(e){return new tc(e)}class tu{constructor(e=[],t=1/0,r){this._calls=e.slice(),this._max=t,this._types=new eY(r)}atMost(e){return new this.constructor(this._calls,e,this._types)}_checkAtMost(e){if(void 0!==e.score&&e.score>this._max)throw Error(`Score of ${e.score} exceeds the declared atMost(${this._max}).`)}props(e){function t(r){let n=e(r);for(let e in n)ts.hasOwnProperty(e)&&ts[e]&t.possibleSubfacts||delete n[e];return n}return t.possibleSubfacts=15,t.kind="props",new this.constructor(this._calls.concat(t),this._max,this._types)}type(e){function t(){return{type:e}}return t.possibleSubfacts=1,t.type=e,t.kind="type",new this.constructor(this._calls.concat(t),this._max,this._types)}typeIn(...e){return new this.constructor(this._calls,this._max,e)}_checkTypeIn(e,t){if(this._types.size>0){if(void 0===e.type){if(!this._types.has(t))throw Error(`A right-hand side claimed, via typeIn(...) to emit one of the types ${this._types} but actually inherited ${t} from the left-hand side.`)}else if(!this._types.has(e.type))throw Error(`A right-hand side claimed, via typeIn(...) to emit one of the types ${this._types} but actually emitted ${e.type}.`)}}note(e){function t(t){return{note:e(t)}}return t.possibleSubfacts=2,t.kind="note",new this.constructor(this._calls.concat(t),this._max,this._types)}score(e){let t;return(t="number"==typeof e?function(t){return{score:e}}:function(t){let r=e(t);return"boolean"==typeof r&&(r=Number(r)),{score:r}}).possibleSubfacts=4,t.kind="score",new this.constructor(this._calls.concat(t),this._max,this._types)}fact(e,t){let r=new Set,n={},i=0;for(let t of e0(this._calls))if(!r.has(t.kind)&&(r.add(t.kind),~i&t.possibleSubfacts)){let r=t(e);for(let e in r)n.hasOwnProperty(e)||(n[e]=r[e]),i|=ts[e]}return this._checkAtMost(n),this._checkTypeIn(n,t),n}possibleEmissions(){let e=!1;for(let t of e0(this._calls))if("props"===t.kind){e=!0;break}else if("type"===t.kind)return{couldChangeType:!0,possibleTypes:new Set([t.type])};return{couldChangeType:e,possibleTypes:this._types}}}class tc{constructor(e,t=e=>e,r=e=>e){this.key=e,this.callback=t,this.allCallback=r}through(e){return new this.constructor(this.key,e,this.allCallback)}allThrough(e){return new this.constructor(this.key,this.callback,e)}asRhs(){return this}}function td(e){return new tm({method:"type",args:[e]})}class tm{constructor(...e){this._calls=e}max(){return this._and("max")}bestCluster(e){return this._and("bestCluster",e)}props(e){return this._and("props",e)}type(...e){return this._and("type",...e)}note(e){return this._and("note",e)}score(e){return this._and("score",e)}atMost(e){return this._and("atMost",e)}typeIn(...e){return this._and("typeIn",...e)}and(...e){return this._and("and",e)}_and(e,...t){return new this.constructor(...this._calls.concat({method:e,args:t}))}asLhs(){return this._asSide(e6.fromFirstCall(this._calls[0]),this._calls.slice(1))}asRhs(){return this._asSide(new tu,this._calls)}_asSide(e,t){for(let r of t)e=e[r.method](...r.args);return e}when(e){return this._and("when",e)}}class tp{constructor(e,t){if(void 0===e)throw Error("Someone tried to make a fnode without specifying the element they're talking about.");this.element=e,this._ruleset=t,this._types=new Map,this._conservedScores=new Map}hasType(e){return this._computeType(e),this._types.has(e)}scoreFor(e){return this._computeType(e),eV(this._ruleset.weightedScore(this.scoresSoFarFor(e))+eH(this._ruleset.biases,e,()=>0))}noteFor(e){return this._computeType(e),this._noteSoFarFor(e)}hasNoteFor(e){return this._computeType(e),this._hasNoteSoFarFor(e)}typesSoFar(){return this._types.keys()}_noteSoFarFor(e){return this._typeRecordForGetting(e).note}_hasNoteSoFarFor(e){return void 0!==this._noteSoFarFor(e)}scoresSoFarFor(e){return this._typeRecordForGetting(e).score}addScoreFor(e,t,r){this._typeRecordForSetting(e).score.set(r,t)}setNoteFor(e,t){if(this._hasNoteSoFarFor(e)){if(void 0!==t)throw Error(`Someone (likely the right-hand side of a rule) tried to add a note of type ${e} to an element, but one of that type already exists. Overwriting notes is not allowed, since it would make the order of rules matter.`)}else this._typeRecordForSetting(e).note=t}_typeRecordForSetting(e){return eG(this._types,e,()=>({score:new Map}))}_typeRecordForGetting(e){return eH(this._types,e,()=>({score:new Map}))}_computeType(e){this._types.has(e)||this._ruleset.get(td(e))}}function tf(e,t,r){return"string"==typeof t&&(t=tl(t)),new(t instanceof tc?ty:tA)(e,t,r)}let tg=0;class th{constructor(e,t,r){this.lhs=e.asLhs(),this.rhs=t.asRhs(),this.name=(r?r.name:void 0)||"_"+tg++}prerequisites(e){function t(e,t,r,n){for(let i of t){let t=r(i);if(t.length>0)e.extend(t);else throw Error(`No rule ${n} the "${i}" type, but another rule needs it as input.`)}}let r=new eY;return t(r,this._typesFinalized(),t=>e.inwardRulesThatCouldEmit(t),"emits"),t(r,this.lhs.typesMentioned(),t=>e.inwardRulesThatCouldAdd(t),"adds"),r}_typesFinalized(){let e=this.lhs.aggregatedType();return void 0===e?new eY:new eY([e])}}class tA extends th{results(e){if(e.doneRules.has(this))throw Error("A bug in Fathom caused results() to be called on an inward rule twice. That could cause redundant score contributions, etc.");let t=this,r=this.lhs.fnodes(e),n=new Set;for(let i of(eZ(function(r){let i=t.lhs.guaranteedType(),{fnode:o=r,rhsTransformer:a=eS}=r,s=a(t.rhs.fact(o,i));t.lhs.checkFact(s);let l=e.fnodeForElement(s.element||o.element),u=s.type||t.lhs.guaranteedType();if(void 0!==s.score)if(void 0!==u)l.addScoreFor(u,s.score,t.name);else throw Error(`The right-hand side of a rule specified a score (${s.score}) with neither an explicit type nor one we could infer from the left-hand side.`);if(void 0!==s.type||void 0!==s.note)if(void 0===u)throw Error(`The right-hand side of a rule specified a note (${s.note}) with neither an explicit type nor one we could infer from the left-hand side. Notes are per-type, per-node, so that's a problem.`);else l.setNoteFor(u,s.note);n.add(l)},r),e.doneRules.add(this),n))for(let t of i.typesSoFar())eG(e.typeCache,t,()=>new Set).add(i);return n.values()}typesItCouldEmit(){let e=this.rhs.possibleEmissions();if(!e.couldChangeType&&void 0!==this.lhs.guaranteedType())return new Set([this.lhs.guaranteedType()]);if(e.possibleTypes.size>0)return e.possibleTypes;throw Error("Could not determine the emitted type of a rule because its right-hand side calls props() without calling typeIn().")}typesItCouldAdd(){let e=new Set(this.typesItCouldEmit());return e.delete(this.lhs.guaranteedType()),e}_typesFinalized(){let e=this;return(function(){let t=new eY,r=e.rhs.possibleEmissions();if(r.couldChangeType){for(let n of e.lhs.possibleTypeCombinations())for(let e of r.possibleTypes)if(!n.has(e)){t.extend(n);break}}return t})().extend(super._typesFinalized())}}class ty extends th{results(e){return this.rhs.allCallback(eX(this.rhs.callback,eX(function(e){return e instanceof tp?e:e.fnode},this.lhs.fnodes(e))))}key(){return this.rhs.key}_typesFinalized(){return this.lhs.typesMentioned().extend(super._typesFinalized())}}class tb{constructor(e,t=[],r=[],n=()=>{}){for(let i of(this._inRules=[],this._outRules=new Map,this._rulesThatCouldEmit=new Map,this._rulesThatCouldAdd=new Map,this._coeffs=new Map(t),this.biases=new Map(r),this.prepass=n,e))if(i instanceof tA){for(let e of(this._inRules.push(i),i.typesItCouldEmit()))eG(this._rulesThatCouldEmit,e,()=>[]).push(i);for(let e of i.typesItCouldAdd())eG(this._rulesThatCouldAdd,e,()=>[]).push(i)}else if(i instanceof ty)this._outRules.set(i.key(),i);else throw Error(`This element of ruleset()'s first param wasn't a rule: ${i}`)}against(e){return new tw(e,this._inRules,this._outRules,this._rulesThatCouldEmit,this._rulesThatCouldAdd,this._coeffs,this.biases)}rules(){return Array.from([...this._inRules,...this._outRules.values()])}}class tw{constructor(e,t,r,n,i,o,a){this.doc=e,this._inRules=t,this._outRules=r,this._rulesThatCouldEmit=n,this._rulesThatCouldAdd=i,this._coeffs=o,this.biases=a,this._clearCaches(),this.elementCache=new WeakMap,this.doneRules=new Set}setCoeffsAndBiases(e,t=[]){this._coeffs=new Map(e),this.biases=new Map(t),this._clearCaches()}_clearCaches(){this.maxCache=new Map,this.typeCache=new Map}get(e){if("string"==typeof e)if(this._outRules.has(e))return Array.from(this._execute(this._outRules.get(e)));else throw Error(`There is no out() rule with key "${e}".`);if(eJ(e))return this.fnodeForElement(e);if(void 0!==e.asLhs){let t=tf(e,tl(Symbol("outKey")));return Array.from(this._execute(t))}throw Error("ruleset.get() expects a string, an expression like on the left-hand side of a rule, or a DOM node.")}weightedScore(e){let t=0;for(let[r,n]of e)t+=n*eH(this._coeffs,r,()=>1);return t}_prerequisitesTo(e,t=new Map){for(let r of e.prerequisites(this))if(!this.doneRules.has(r)){let n=t.has(r);eG(t,r,()=>[]).push(e),n||this._prerequisitesTo(r,t)}return t}_execute(e){let t,r,n=this._prerequisitesTo(e);try{t=[e].concat(e$(n.keys(),e=>n.get(e)))}catch(e){if(e instanceof eR)throw new eR("There is a cyclic dependency in the ruleset.");throw e}for(let e of e0(t))r=e.results(this);return Array.from(r)}inwardRulesThatCouldEmit(e){return eH(this._rulesThatCouldEmit,e,()=>[])}inwardRulesThatCouldAdd(e){return eH(this._rulesThatCouldAdd,e,()=>[])}fnodeForElement(e){return eG(this.elementCache,e,()=>new tp(e,this))}}let tE="data-protonpass-form",tv="input, select, textarea",tC='input[name="email"], input[id="email"], input[name="user_email"]',tT='input[type="password"], input[type="text"][id="password"]',t_='[role="dialog"], [role="tabpanel"], [role="group"], [role="form"], [id*="modal"], [class*="modal"], header, main, nav, footer, aside',tR=`${t_}, section`,tI=[...[1,2,3,4,5].flatMap(e=>[`h${e}, [aria-level="${e}"]`]),'[role="heading"]','[class*="title"]','[class*="header"]','[name="title"]','div[style*="font-size: 2"]','div[style*="font-size: 3"]'].join(","),tS='input[type="submit"],input[type="button"],input[type="image"][alt],button[id*="password" i],button[type="submit"],button[type="button"],button[name="submit"],a[role="submit"],div[role="button"],div[role="submit"]',tO=`form, [${tE}]`,tN='input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]):not([type="checkbox"])',tx=`button:not([type]), a[role="button"], ${tS}`,tF=(...e)=>t=>e.every(e=>e(t)),tP=(...e)=>t=>e.some(e=>e(t)),tL=e=>t=>!e(t),tD=e=>t=>t.some(e),tM=(e,t)=>{let r=e.parentElement;return r?t(r)?r:tM(r,t):null},tk=(e,t,r=1)=>{let n=e?.parentElement;if(!n)return null;let i=t(n);return i||r<=0?i:tk(n,t,r-1)},tU=(e,t)=>r=>{let n=e.parentElement;return t<=0||null===n?e:r(n,e)?tU(n,t-1)(r):e},tB=(...e)=>Array.from(new Set(e.flat())),tW=e=>{let{height:t,width:r,top:n,bottom:i}=e.getBoundingClientRect();return{height:t,width:r,top:n,bottom:i,area:t*r}},tG=(e,t)=>{let r=e.previousElementSibling;return null===r?null:t(r)?r:tG(r,t)},tH=e=>tG(e,e=>e instanceof HTMLElement&&e.innerText.trim().length>0),t$=e=>{let t=e.getAttribute("id")??e.getAttribute("name"),r=document.querySelector(`label[for="${t}"]`);if(r)return r;let n=e.closest("label");if(n)return n;let i=tk(e,e=>e.querySelector("label:not([for])"),1);return i?i:tk(e,e=>e.querySelector('[class*="label"], [id*="label"]'),1)||tH(e)||null},tY=e=>({x:e.left+e.width/2,y:e.top+e.height/2}),tq=(e,t)=>{let r=tY(e),n=tY(t);return{dx:Math.abs(r.x-n.x)-(e.width+t.width)/2,dy:Math.abs(r.y-n.y)-(e.height+t.height)/2}},tj=e=>e.reduce((e,t)=>{for(let r=0;r<=e.length-1;r++)if(e[r]!==t){if(e[r].contains(t))return e;if(t.contains(e[r]))return e[r]=t,e}return e.push(t),e},[]),tz=(e,t)=>e===t||e.contains(t)?e:e.parentElement?tz(e.parentElement,t):e,tK=(e,t=[],r)=>{if(t.some(t=>t.contains(e)))return null;let n=e.parentElement;if(0===r||!n)return null;let i=getComputedStyle(n).getPropertyValue("position");return"fixed"===i||"absolute"===i?(t.push(n),n):tK(n,t,r-1)},tV=e=>e.setAttribute(tE,""),tQ=e=>!0===e.__PP_HIDDEN__,tX=e=>e.__PP_HIDDEN__=!0,tZ=e=>null!==e.getAttribute("data-protonpass-ignore"),tJ=e=>!0===e.__PP_SKIP__,t0=e=>e.__PP_SKIP__=!0,t1=e=>{t0(e),e.querySelectorAll(tv).forEach(t0)},t2=e=>!0===e.__PP_SEEN__,t5=e=>e.__PP_SEEN__=!0,t4=e=>void 0!==e.__PP_TYPE__,t3=e=>{delete e.__PP_TYPE__,delete e.__PP_SUBTYPE__},t8=e=>e?tM(e,t4):null,t6=(e,t)=>{e.__PP_SUBTYPE__=t},t7=e=>t=>t.split(":")?.[0]===e,t9=(e,t,r)=>{let n=e.__PP_TYPE__,i=`${t}:${r.toFixed(2)}`;if(!n){e.__PP_TYPE__=i;return}let o=n.split(","),a=o.findIndex(t7(t));-1!==a?o[a]=i:o.push(i),e.__PP_TYPE__=o.join(",")},re=e=>t=>{let r=t.element.__PP_TYPE__;if(!r)return -1;let n=r.split(",").find(t7(e));if(!n)return -1;let[,i]=n.split(":"),o=parseFloat(i);return Number.isFinite(o)?o:-1},rt=e=>t=>-1!==re(e)(t),rr=tP(...Object.values(x).map(e=>rt(e))),rn=tP(...Object.values(F).map(e=>rt(e))),ri=e=>!(t4(e)||tJ(e)||tZ(e)),ro=(e,t)=>{let r=e=>{delete e.__PP_SEEN__,t3(e),t.preserveIgnored||delete e.__PP_SKIP__};r(e),e.querySelectorAll(tv).forEach(r),t.fields?.forEach(r)},ra=e=>e instanceof ShadowRoot,rs=e=>!!(e.tagName.includes("-")&&e.shadowRoot),rl=function*(e){let t;yield e;let r=e;for(;(t=ru(r))&&t?.nodeType===Node.ELEMENT_NODE;)yield t,r=t},ru=e=>{let t=e.parentNode;return t?ra(t)?t.host:t:null},rc=(e,t)=>{let r=t;if(e.contains(t))return!0;if(!ra(t.getRootNode()))return!1;let n="shadowRoot"in e?e.shadowRoot:null;if(n?.contains(t))return!0;for(;r;){let t=r.getRootNode();if(t===document||!ra(t))break;let i=t.host;if(i===e||e.contains(i)||n?.contains(i))return!0;r=i}return!1},rd=(e,t)=>e instanceof HTMLElement?e.querySelector(t)??e.shadowRoot?.querySelector(t)??null:e.querySelector(t),rm=["0","1","true","false"],rp=["[0-9]{6}","[0-9]{1}","[0-9]*","d{6}","d{6}*","d{1}","/d{6}","/d{6}*","/d{1}"],rf=["text","email","number","tel","password","hidden","search"],rg=/p(?:rogres(?:s(?:ion|o)|o)|aso)|fortschritt|progress|s(?:chritt|t(?:age|ep))|etap[ae]|phase/i,rh=/schwierigkeit|(?:difficult|troubl|oubli|hilf)e|i(?:nciden(?:cia|t)|ssue)|vergessen|esquecido|olvidado|needhelp|questao|problem|forgot|ayuda/i,rA=/p(?:hrasesecrete|ass(?:(?:phras|cod)e|wor[dt]))|(?:c(?:havesecret|lavesecret|ontrasen)|deseguranc)a|(?:(?:zugangs|secret)cod|clesecret)e|wachtwoord|codesecret|motdepasse|geheimnis|secret|heslo|senha|key/i,ry=/gebruikersnaam|(?:identifi(?:cado|e)|benutze)r|identi(?:fiant|ty)|u(?:tilisateur|s(?:ername|uario))|(?:screen|nick)name|nutzername|(?:anmeld|handl)e|pseudo/i,rb=/co(?:urriel|rrei?o)|email/i,rw=/digitarnovamente|v(?:olveraescribi|erifi(?:ca|e))r|saisiranouveau|(?:erneuteingeb|wiederhol|bestatig)en|verif(?:izieren|y)|re(?:pe(?:t[ei]r|at)|type)|confirm|again/i,rE=/\b\S*(?:snd|bis|2)\b/i,rv=/(?:doublefacteu|(?:doblefac|zweifak|twofac)to)r|verifica(?:c(?:ion|ao)|tion)|multifa(?:ct(?:eu|o)|k?to)r|(?:securitycod|doubleetap|authcod)e|zweischritte|dois(?:fatore|passo)s|doblepaso|2(?:s(?:chritte|tep)|(?:etap[ae]|paso)s|fa)|twostep/i,rC=/(?:authentication|approvals|email|login)code|phoneverification|challenge|t(?:wo(?:fa(?:ctor)?|step)|facode)|2fa|\b([mt]fa)\b/i,rT=/totp(?:pin)?|o(?:netime|t[cp])|1time/i,r_=/email|sms/i,rR=/newsletter|b(?:ul|o)letin|mailing/i,rI=/givenname|firstn(?:ame)?|\b(fname)\b/i,rS=/familyn(?:ame)?|lastn(?:ame)?|surname|\b([ls]name)\b/i,rO=/(?:payments?|new)card|c(?:ar(?:tecredit|d)|red(?:it(?:debit|card)|card))|stripe|vads/i,rN=/s(?:ocialsecurity|ubscription)|membership|nationalid|i(?:nsurance|dcard)|p(?:asse?por|ermi)t|contract|licen[cs]e/i,rx=(e,t)=>{let r,n;return r=t=>e.test(t),n=t??{maxLength:5e3,minLength:2},e=>(!n.maxLength||!(e.length>n.maxLength))&&(!n.minLength||!(e.length<n.minLength))&&r(e)},rF=(e,t)=>r=>!rx(e,t)(r),rP=(e,t)=>tF(...e.map(e=>rx(e,t))),rL=(e,t)=>tP(...e.map(e=>rx(e,t))),rD=rx(/a(?:uthenti(?:fizierungs|cate)|nmeld(?:ung|en))|(?:(?:n(?:ouvelleses|uevase|ewses)s|iniciarses|connex)io|anmeldedate|inlogge|sign[io])n|in(?:iciarsessao|troduce)|(?:authentifie|introduci|conecta|entr[ae])r|s(?:econnect|identifi)er|novasessao|prihlasit|connect|acceder|login/i),rM=rx(/kontoerstellen|cr(?:ea(?:teaccount|rcuenta)|iarconta)|(?:nouveaucompt|creeruncompt|s?inscrir|unirs)e|re(?:gist(?:r(?:ieren|arse|ar)|er)|joindre)|nuevacuenta|getstarted|neueskonto|newaccount|novaconta|(?:com(?:mence|eca)|(?:empez|junt)a)r|signup|join/i),rk=rx(ry),rU=rL([/(?:custom|us)erid|login(?:name|id)|a(?:cc(?:ountid|t)|ppleid)/i,ry]),rB=rx(/^[\w\-\.]{7,30}$/),rW=rx(/(?:nom(?:defamill|br)|tit[lr])e|(?:primeiro|sobre)nome|(?:company|middle|nach|vor)name|firstname|apellido|lastname|prenom/i),rG=rL([/usermail/i,rb]),rH=rx(/^[\w\-\.]+@([\w-]+\.)+[\w-]{2,5}$/,{maxLength:230,minLength:5}),r$=tP(rx(rb),rH),rY=rx(/^[\d()+-]{6,25}$/,{maxLength:25,minLength:6}),rq=rx(/angemeldetbleiben|lembrardemim|micherinnern|sesouvenirde|re(?:cordarme|member|ster)|manterme|mantener|stay|keep/i),rj=rx(/(?:datenschutzrichtlini|politicadeprivacidad|confidentialit|a(?:cknowledg|gre))e|nutzungsbedingungen|(?:consentimi?ent|ac(?:ue|o)rd)o|(?:einwillig|zustimm)ung|consentement|condi(?:cione|tion)s|term(?:osdeuso|inos|sof)|(?:privacida|understan)d|guideline|consent|p(?:riva|oli)cy|accord/i),rz=rx(rh),rK=rL([/(?:wiederherstell|zurucksetz)en|re(?:(?:initialis|stablec)er|s(?:tor(?:ing|e)|et)|(?:defini|staur[ae])r|c(?:uper[ae]|ove)r)|problem|(?:troubl|aid)e|a[jy]uda|h(?:ilfe|elp)/i,rh]),rV=rx(rg),rQ=rL([/(?:f(?:ertigstell|ortfahr)|abschlie)en|getstarted|siguiente|(?:preceden|suivan|accep)t|(?:finaliza|termin[ae]|anterio|weite)r|co(?:mplet(?:ar|e)|ntinu(?:ar|e))|pro(?:c(?:hain|eed)|ximo)|finish|zuruck|back|next/i,rg]),rX=rx(/facebook|twitch|google|apple/i),rZ=rx(/recherche|buscar|s(?:earch|uche)|query|find/i),rJ=tF(rP([rA,/(?:a(?:ktualisiere|nder)|zurucksetze)n|(?:re(?:initialise|stablece|defini)|mettreajou)r|a(?:ctualiz|tualiz|lter)ar|c(?:ambiar|hange)|update|reset/i]),rF(rw)),r0=tF(rJ,rF(rE)),r1=tF(rP([rA,/erstellen|n(?:o(?:uveau|vo)|uevo|e[uw])|cr(?:e(?:a(?:te|r)|er)|iar)|set/i]),rF(rw)),r2=tF(r1,rF(rE)),r5=rP([rA,rw]),r4=tF(rP([rA,rw]),rF(/\b\S*(?:fst|1)\b/i)),r3=tF(rP([rA,/(?:be(?:stehend|for)|vorherig|aktuell)e|exist(?:ente|ing)|pre(?:cedent|vious)|a(?:n(?:t(?:erior|igo)|cien)|ctu[ae]l|tual)|existant|dernier|current|(?:ultim|viej)o|(?:letz|al)te|last|old/i]),rF(rw)),r8=tF(r3,rF(rE)),r6=rx(/s(?:ocialsecurity|ecanswer)|nationalid|answer|userid/i),r7=rx(/s(?:creenreade)?ronly|(?:move)?offscreen|(?:displaynon|a11yhid)e|\b((?:is)?hidden)\b/i),r9=rL([rv,rC]),ne=rx(rT),nt=rx(r_),nr=rL([r_,ry]),nn=rx(/n(?:(?:ue|o)vocodigo|ouveaucode|e(?:usenden|(?:uer|w)code))|re(?:enviar|send)|envoyer|senden|enviar|send/i),ni=rx(/a(?:pplicationdauthentification|ut(?:henti(?:(?:fiz|s)ierungsapp|cat(?:ionapp|or)|fi(?:cateu|kato)r)|enticador))|genera(?:torapp|dora)/i),no=rx(rC),na=rL([rv,rC,rT]),ns=rx(rR);rL([rR,/subscription|mailinglist|newsletter|emailform/i]);let nl=tF(rx(/addresscontact|contactperson|addressname|yourname|fullname|\b(name)\b/i),e=>!e.includes("[name]")),nu=rx(rI),nc=rx(/additionalname|middlen(?:ame)?|\b(mname)\b/i),nd=rx(rS),nm=tF(rx(/(?:national|contact)number|(?:tele)?phone|mobile|\b(tel(?:national|local)?)\b/i),rF(/extension|security|co(?:untry|de)|prefix/i)),np=rx(/organization(?:name)?|companyname|\b(organization)\b/i),nf=rx(/address(?:level2|town|city)|personalcity|\b((?:local|c)ity|town)\b/i),ng=rx(/(?:address(?:postal|zip)|post)code|address(?:postal|zip)|postalcode|zipcode|\b(zip)\b/i),nh=rx(/address(?:(?:provinc|stat)e|level1)|stateprovince|\b(province|county|region|state)\b/i),nA=tF(rx(/addresscountry(?:name)?|countryname|\b(country)\b/i),rF(/countrycode/i)),ny=tF(rx(/(?:preferred|street)address|address(?:line(?:one|[1s])|1)|mailingaddr|bill(?:ing)?addr|\b(mailaddr|addr(?:ess)?|street|line1)\b/i),rF(/\b\S*(?:line(?:t(?:hree|wo)|[23]))\b/i)),nb=rx(/accountholdername|card(?:holder)?name|cardholder|nameoncard|holdername|\b(ccname)\b/i),nw=rP([rO,rI]),nE=rP([rO,rS]),nv=rx(/num(?:ero(?:de)?)?carte|c(?:ardn(?:um|[or])|bnum|cno)|\b(c(?:ard |c)number)\b/i),nC=rP([/securitycode|cardpin|pincode/i,rO]),nT=rx(/c(?:ard(?:verification|code)|cv|sc|v[cv])|payments?code|\b(c(?:cc(?:ode|vv|sc)|vn))\b/i),n_=rL([/c(?:ertificate|oupon)|logincard|voucher|promo/i,rN]),nR=tF(rx(/expir(?:ation(?:monthyear|date)|ation|ydate|y)|cardexp(?:iration)?|\b(ccexp(?:iration)?|expiry date)\b/i),rF(rN)),nI=tF(rx(/exp(?:ir(?:y(?:date(?:field)?mo|m[mo]?)|ationdatem[mo]|(?:ation|e)m[mo]?)|m[mo]?)|m(?:expiration|oisexp)|cbdatemo|cardm[mo]?|\b(cc(?:expmonth|m(?:onth|m)))\b/i),tL(rx(/\b\S*(?:y(?:ear|y))\b/i))),nS=tF(rx(/exp(?:ir(?:y(?:date(?:field)?year|y(?:yyy|ear|y)?)|ationdatey(?:y(?:yy)?|ear)|(?:ation|e)y(?:yyy|ear|y)?)|y(?:yyy|ear|y)?)|yexpiration|cbdateann|anne(?:ee)?xp|cardy(?:yyy|ear|y)?|\b(cc(?:expyear|y(?:ear|[ry])))\b/i),tL(rx(/\b\S*(?:m(?:onth|o|m))\b/i))),nO=rL([/s(?:tripeframe|ecurity)|c(?:ontrol|v[cv])|expiry|input|f(?:ield|orm)|p(?:bf|ci)/i,/c(?:heckout|ar[dt])|payment/i]),nN=(e,t="")=>e.trim().toLowerCase().normalize("NFD").replace(/[\u0300-\u036f]/g,"").replace(RegExp(`[^a-zA-Z0-9${t}]`,"g"),""),nx=e=>nN(e,"\\s\\[\\]"),nF=e=>{let t=e.getAttribute("title")||"",r=e.getAttribute("name")||"",n=e.getAttribute("aria-label")||"",i=e.id,o=e.src.substring(0,150),a=e.className.substring(0,150);return nO(nx(`${t} ${r} ${n} ${i} ${o} ${a}`))},nP={},nL=e=>nP[e]=nP[e]??new WeakMap,nD=(e,t)=>{let r=nL("visibility:op"),n=nL("visibility");return t.opacity?r.get(e)??n.get(e):n.get(e)},nM=e=>(t,r)=>t.forEach(t=>e.set(t,r)),nk=(e,t)=>e.top<=t.bottom&&e.bottom>=t.top&&e.left<=t.right&&e.right>=t.left,nU=e=>e.width<=1||e.height<=1,nB=["rect(0px, 0px, 0px, 0px)","rect(0, 0, 0, 0)","rect(1px, 1px, 1px, 1px)"],nW=["circle(0","polygon()","inset(100%)","inset(50% 50% 50% 50%)"],nG=(e,t)=>e&&"auto"!==e?nB.some(t=>e.includes(t)):!!t&&"none"!==t&&nW.some(e=>t.includes(e)),nH=(e,t)=>{let r=!t.skipCache,n=e2.toDomElement(e),i=[],o=!1,a=nL(t.opacity?"visibility:op":"visibility"),s=nD(n,t);if(r&&void 0!==s)return s;let l=e2.windowForElement(n),u=l.document,c=l.innerWidth||u.documentElement.clientWidth,d=l.innerHeight||u.documentElement.clientHeight,m=Math.max(c,u.documentElement.scrollWidth,u.body.scrollWidth),p=Math.max(d,u.documentElement.scrollHeight,u.body.scrollHeight),{scrollX:f,scrollY:g}=l,h=({x:e,y:t,width:r,height:n})=>e+f+r>=0&&e+f<=m-16&&t+g+n>=0&&t+g<=p-16,A=(()=>{let e=null;for(let a of rl(n)){let n=null,s=()=>n=n??a.getBoundingClientRect();if(a===u.body)return!e?.absolute||h(e.rect);let c=nD(a,t);if(r&&void 0!==c)return c;let{opacity:d,display:m,position:p,overflow:f,visibility:g,clip:A,clipPath:y}=l.getComputedStyle(a);if(i.push(a),0===Math.floor(10*parseFloat(d))&&t.opacity)return o=!0,!1;if("hidden"===g||"none"===m)return!1;if(e?.absolute&&"static"===p){i.pop();continue}if(nG(A,y)||"hidden"===f&&(e?.rect&&!nk(e.rect,s())||nU(s()))||"absolute"===p&&!h(s()))return!1;if("fixed"===p)return h(e?.rect??s());if("contents"===m){e=null;continue}(e=e??{rect:s()}).rect=s(),e.absolute="absolute"===p}return!0})();return r&&(t.opacity&&(A||!o?nM(nL("visibility"))(i,A):nM(nL("visibility"))(i.slice(0,-1),A)),nM(a)(i,A)),A},n$=(e,t)=>{let r=nL(`${t.minWidth}:${t.minHeight}`);if(r.has(e))return r.get(e);let n=(()=>{if(0===e.getClientRects().length)return!1;let r=Array.from(e.classList).map(nx);if(tD(r7)(r))return!1;let{visibility:n,display:i,maxHeight:o}=getComputedStyle(e);return"hidden"!==n&&"none"!==i&&"0px"!==o&&0!==e.offsetHeight&&0!==e.offsetWidth&&!(e.offsetHeight<t.minHeight)&&!(e.offsetWidth<t.minWidth)&&!0})();return nM(r)([e],n),n},nY=e=>n$(e,{minHeight:0,minWidth:0}),nq=(e,t={})=>{let r=(()=>{if(!nH(e,{opacity:!0,...t}))return!1;if(rs(e)||ra(e.getRootNode()))return!0;let r=[...Array.from(e.querySelectorAll(tN)).filter(e=>!e.disabled),...Array.from(e.querySelectorAll("iframe")).filter(nF)];return r.length>0&&r.some(e=>nH(e,{opacity:!1,...t}))})();return r||tX(e),r},nj=e=>{if(e instanceof HTMLInputElement){let{type:t,disabled:r,readOnly:n}=e;if("hidden"===t||r||n||"true"===e.getAttribute("aria-hidden"))return!1}return n$(e,{minHeight:15,minWidth:30})},nz=new Set,nK=new Set,nV=()=>Array.from(nz),nQ=()=>Array.from(nK),nX=[tf(new e9(nV),td("override-form"),{}),tf(new e9(nQ),td("override-field"),{}),tf(td("override-form").when(e=>rr(e)&&nq(e.element)),td("form-candidate"),{}),tf(td("override-field").when(e=>rn(e)&&nj(e.element)),td("field-candidate"),{})],nZ=["id","class","role","jsaction","ng-controller","data-bind","ng-model","v-model","v-bind","data-testid","href"],nJ=[nZ,"name","action"].flat(),n0=[nZ,"name","inputmode"].flat(),n1=e=>t=>e.filter(e=>"data-fathom"!==e).map(e=>t.getAttribute(e)).filter(Boolean).map(nx),n2=n1(nZ),n5=n1(["title","aria-label","aria-labelledby","aria-describedby","placeholder","legend","label"]),n4=n1(n0),n3=n1(nJ),n8=e=>(e.getAttribute("autocomplete")??"").split(/\s+/),n6=e=>{let t=n5(e).join("");return nN(`${e.innerText}${t}`,"\\[\\]")},n7=e=>nx(n2(e).join("")),n9=e=>[n6(e),n7(e)],ie=e=>{let t,r=e instanceof HTMLInputElement&&"hidden"===e.type,n=e instanceof HTMLInputElement&&["text","email","tel","password"].includes(e.type);return{fieldAttrs:n4(e),fieldText:r?"":n6(e),labelText:n&&!r&&(t=t$(e))?n6(t):""}},it=e=>{let{fieldAttrs:t,fieldText:r,labelText:n}=ie(e);e instanceof HTMLInputElement&&["checkbox","submit","button","image"].includes(e.type)&&(e.value&&t.push(nN(e.value,"\\[\\]")),"image"===e.type&&e.alt&&t.push(nN(e.alt,"\\[\\]")));let i=[r,n,...t],o=e.getAttribute("autocomplete");return o&&i.push(nN(o,"\\[\\]")),i},ir=["autocomplete","name","id","class","form","aria-label","aria-labelledby","placeholder","data-testid","data-stripe","data-recurly","data-encrypted-name"],ii=["tel","phone","text","number","password"],io=["YYYY","AAAA","YY","AA"],ia=["MM","LL"],is=/(mmyy|mmaa|yymm|aamm)/,il=["","/","-"],iu={separator:"/",fullYear:!1,monthFirst:!0},ic=[{fullYear:!0,monthFirst:!0},{fullYear:!1,monthFirst:!0},{fullYear:!0,monthFirst:!1},{fullYear:!1,monthFirst:!1}],id={4:{separator:"",fullYear:!1,monthFirst:!0},5:{separator:"/",fullYear:!1,monthFirst:!0},6:{separator:"",fullYear:!0,monthFirst:!0},7:{separator:"/",fullYear:!0,monthFirst:!0}},im=(new Date().getFullYear()+1).toString(),ip=({fullYear:e,separator:t,monthFirst:r})=>{let n=e?"2025":"25";return r?`01${t}${n}`:`${n}${t}01`},ig=e=>{let{placeholder:t,className:r,id:n,name:i}=e,o=e.getAttribute("aria-label"),a=t$(e)?.innerText;return[r,n,i,o,t.replace(/\s/g,""),a?.replace(/\s/g,"")].filter(Boolean).join(" ").toUpperCase()},ih=e=>Array.from(e.options).map(e=>e.value).filter(Boolean),iA=["given-name","additional-name","family-name","name"],iy=(e,t)=>(r,n,i)=>(!!e.password||"password"!==r.getAttribute("type"))&&(!!n.includes(e.autocomplete)||!n.some(e=>iA.includes(e))&&t(r,n,i)&&tL(n_)(i)),ib=e=>!(e.includes("billing")||e.includes("shipping")),iw=[[L.FIRSTNAME,iy({autocomplete:"cc-given-name"},(e,t,r)=>nw(r)&&ib(t))],[L.LASTNAME,iy({autocomplete:"cc-family-name"},(e,t,r)=>nE(r)&&ib(t))],[L.NAME,iy({autocomplete:"cc-name"},(e,t,r)=>nb(r)&&ib(t))],[L.EXP_YEAR,iy({autocomplete:"cc-exp-year"},(e,t,r)=>{if(t.includes("cc-exp")||is.test(r))return!1;if(nS(r))return!0;if(e instanceof HTMLSelectElement&&nR(r)){for(let t of e.options)if(t.innerText===im||t.value===im)return!0}return!1})],[L.EXP_MONTH,iy({autocomplete:"cc-exp-month"},(e,t,r)=>!(t.includes("cc-exp")||is.test(r))&&(!!nI(r)||!!(e instanceof HTMLSelectElement&&nR(r))&&e.options.length>=12&&e.options.length<=14))],[L.EXP,iy({autocomplete:"cc-exp"},(e,t,r)=>e instanceof HTMLInputElement&&nR(r))],[L.CSC,iy({autocomplete:"cc-csc",password:!0},(e,t,r)=>tP(nT,nC)(r))],[L.NUMBER,iy({autocomplete:"cc-number",password:!0},(e,t,r)=>nv(r))]],iE=e=>{let t=e.__PP_SUBTYPE__;if(t&&H.has(t))return t},iv=e=>{let t,r,n,i=iE(e);if(i)return i;let o=e.getAttribute("type");if("INPUT"===e.tagName&&o&&!ii.includes(o))return;let a=(t=ir.map(t=>e?.getAttribute(t)??""),n=nN((r=t$(e))?r.innerText?r.innerText:0===r.childElementCount?"":Array.from(r.children).map(e=>e?.innerText??"").join(" "):"","\\[\\]"),nx(t.join(" "))+" "+n),s=n8(e);if(a){let t=iw.find(([,t])=>t(e,s,a))?.[0];return t&&t6(e,t),t}},iC=(e,t=0)=>Number.isFinite(e)?e:t,iT=e=>t=>(e(t),t),i_=iT(e=>t5(e.element)),iR=iT(e=>{let{visible:t,type:r}=e.noteFor("field");(t||"hidden"===r)&&t5(e.element)}),iI=e=>"number"==typeof e?e:"boolean"==typeof e?Number(e):0,iS=(e,t)=>new tm({method:"score",args:[r=>{let n=r.noteFor(e);return Array.isArray(t)?t.map(e=>n[e]).reduce((e,t)=>iI(e)*iI(t)):iI(n[t])}]}),iO=(e,t,r)=>{let n=["isCC","isIdentity"].map(e=>tf(td(t),iS("field",e),{name:`${t}-${e}`})),i=r.map(r=>tf(td(t),iS(e,r),{name:`${t}-${r.toString()}`}));return n.concat(i)},iN=e=>e.map(e=>e.name),ix=(e,t)=>e.map(e=>[e,t.coeffs.find(([t])=>t===e)?.[1]??0]),iF=e=>{let t=e.element,r=e._ruleset,n=r.get(td("form")).find(({element:e})=>e.contains(t));if(n)return n;let i=t8(t);return i?r.get(i):null},iP=e=>t=>t.scoreFor(e)>.5,iL=(e,t)=>e?e.hasNoteFor(`${t}-prediction`)?e.noteFor(`${t}-prediction`)??0:e.scoreFor(t):0,iD=(e,t,r=iP)=>[tf(td(e).when(rt(t)),td(`${t}-prediction`).note(re(t)),{}),tf(td(t).when(r(t)),td(`${t}-prediction`),{}),tf(td(`${t}-prediction`),tl(t).through(iT(e=>{t5(e.element),e.hasNoteFor(`${t}-prediction`)||t9(e.element,t,iL(e,t))})),{})],iM=(e,t)=>e.flatMap(e=>t.map(t=>[e,t])),ik=e=>t=>e(t.element),iU=e=>{let t=iL(e,x.LOGIN)>.5,r=iL(e,x.REGISTER)>.5,n=iL(e,x.PASSWORD_CHANGE)>.5,i=iL(e,x.RECOVERY)>.5,o=[t,r,n,i].every(e=>!e);return{login:t,register:r,pwChange:n,recovery:i,noop:o}},iB=e=>e.reduce((e,t)=>(nj(t)?e[0].push(t):e[1].push(t),e),[[],[]]),iW=e=>t=>e.includes(t.element.type),iG=e=>t=>t.element.matches(e),iH=e=>t=>t.element.inputMode===e,i$=e=>(e=>{let{visible:t,readonly:r,disabled:n}=e.noteFor("field");return t&&!r&&!n})(e),iY=e=>"list"===e.element.getAttribute("aria-autocomplete")||"combobox"===e.element.role,iq=tF(tL(iY),tP(iW(["email","text"]),iH("email")),i$),ij=tF(tL(iY),iG(tT),i$),iz=tF(iW(["text","number","tel"]),i$,tL(iY)),iK=tF(tL(iY),tP(tF(tL(iH("email")),iW(["text","tel"])),iG('input[type="login"],input[type="username"],input[type="search"][name="loginName"],input[type="password"][name="userID"],input[type="password"][name="USERNAME"],input[name="account"],input[name="quickconnect-id"]')),i$),iV=tF(tL(iY),iW(["email","text","hidden"]),tL(i$)),iQ=e=>"text"===e.type||"tel"===e.type&&tD(rk)(it(e)),iX=e=>"email"===e.type||"text"===e.type&&tD(r$)(it(e)),iZ=e=>tD(rX)(it(e)),iJ=e=>["text","number","tel"].includes(e.type),i0=e=>"submit"===e.getAttribute("type")||!(e.innerText.trim().length<=1)&&e.offsetHeight*e.offsetWidth>3e3,i1=e=>{let t=t2(e),r=tQ(e);return(!t||r)&&nj(e)&&nH(e,{opacity:!1})},i2=(e=document)=>Array.from(e.querySelectorAll(tN)).filter(ri),i5=(e=document)=>Array.from(e.querySelectorAll(tO)).filter(e=>!tJ(e)&&!tZ(e)),i4=(e,t)=>(r,n,i)=>(!!e.number||"number"!==r.getAttribute("type"))&&(!!e.autocompletes.some(e=>n.includes(e))||t(i)),i3=[[P.FIRSTNAME,i4({autocompletes:["given-name"]},nu)],[P.MIDDLENAME,i4({autocompletes:["additional-name"]},nc)],[P.LASTNAME,i4({autocompletes:["family-name"]},nd)],[P.FULLNAME,i4({autocompletes:["name"]},nl)],[P.TELEPHONE,i4({autocompletes:["tel","tel-national","tel-local"],number:!0},nm)],[P.ORGANIZATION,i4({autocompletes:["organization"]},np)],[P.CITY,i4({autocompletes:["address-level2"]},nf)],[P.ZIPCODE,i4({autocompletes:["postal-code"],number:!0},ng)],[P.STATE,i4({autocompletes:["address-level1"]},nh)],[P.COUNTRY,i4({autocompletes:["country-name"]},nA)],[P.ADDRESS,i4({autocompletes:["street-address","address-line1"]},ny)]],i8=["autocomplete","name","id","data-bhw"],i6=["tel","phone","text","number"],i7=e=>{let t=e.__PP_SUBTYPE__;if(t&&G.has(t))return t},i9=e=>{let t=i7(e);if(t)return t;if(void 0!==e.__PP_SUBTYPE__)return;let r=e.getAttribute("type");if(r&&!i6.includes(r)||e.getAttribute("autocomplete")?.includes("email"))return;let n=nx(i8.map(t=>e?.getAttribute(t)??"").join(" ")),i=n8(e);if(n){let t=i3.find(([,t])=>t(e,i,n))?.[0];return t&&t6(e,t),t}},{linearScale:oe}=e2,ot=e=>{let t,r,n,i,o,a,s,l,u,c=e.element,d=tU(c,3)(e=>e.querySelectorAll(tO).length<=1),m=c.ownerDocument,p=Array.from(c.querySelectorAll(tv)),f=p.filter(nj),g=p.filter(e=>"submit"!==e.type&&"button"!==e.type),h=p.filter(e=>"hidden"===e.type),A=f.filter(e=>"submit"!==e.type&&"button"!==e.type),y=c.querySelectorAll("fieldset"),b=p.filter(e=>"TEXTAREA"===e.tagName),w=p.filter((e,t,r)=>"SELECT"===e.tagName&&r?.[t+1]?.type!=="tel"),E=g.filter(e=>"text"===e.type),v=g.filter(e=>"tel"===e.type),C=g.filter(e=>e.readOnly),T=g.filter(e=>"radio"===e.type),_=g.filter(e=>"checkbox"===e.type),R=g.filter(e=>"number"===e.type),I=g.filter(e=>"date"===e.type),S=g.filter(e=>"file"===e.type),O=g.filter(iv),N=w.filter(iv),x=O.concat(N),F=g.filter(e=>void 0!==i9(e)),P=A.filter(e=>e.required||e.ariaRequired),L=A.filter(e=>e.disabled||e.ariaDisabled),D=A.find(e=>e.matches("input[autofocus]:first-of-type")),M=g.filter(iQ),k=g.filter(iX),U=tB(M,k),[B,W]=iB(U),G=g.filter(e=>e.matches(tT)),[H,$]=iB(G),Y=g.filter(iJ),q=d.querySelectorAll('[class*="captcha"], [id*="captcha"], [name*="captcha"]'),j=Array.from(d.querySelectorAll("[class*=social], [aria-label*=with]")),z=f.filter(e=>"submit"===e.type),K=Array.from(c.querySelectorAll(tx)).filter(nY),V=K.filter(e=>e.matches('[type="submit"]')),Q=K.filter(i0),X=V.length>0?V:Q,Z=Array.from(c.querySelectorAll('a, [role="link"], span[role="button"]')).filter(nY),J=j.concat(Q).filter(iZ),ee=Array.from(c.querySelectorAll("div, section, aside, main, nav, label")),et=!!(D&&B.includes(D)),er=!!(D&&H.includes(D)),en=(t=m.title,r=m.querySelector('meta[name="description"]'),n=r?.getAttribute("content")??"",nN(`${t} ${n}`,"\\[\\]")),ei=(i=c.getBoundingClientRect(),o=Array.from(tU(c,3)((e,t)=>!(e===document.body||t.matches(tR))).querySelectorAll(tI)).filter(e=>{if(c.contains(e))return!0;let{dx:t,dy:r}=tq(i,e.getBoundingClientRect());return t<75&&r<150}),nN((()=>{if(o.length>0)return o.map(e=>e.innerText).join();let e=tH(c),t=c.parentElement?.firstElementChild,r=e?.innerText??"",n=t?.innerText??"";return e===t?r:r+n})(),"\\[\\]")),eo=(a=n5(c).join(""),s=Array.from(c.querySelectorAll("fieldset")),nN(`${a}${s.reduce((e,t)=>e.concat(n5(t).join("")),"")}`,"\\[\\]")),ea=n3(c),es=G.flatMap(it),el=B.flatMap(it),eu=Q.flatMap(it),ec=X.flatMap(it),ed=_.flatMap(it),em=Z.flatMap(n9),ep=Y.flatMap(it),ef=ee.map(n7),eg=[eo,ei],eh=rD(en),eA=rD(eo),ey=tD(rD)(ea),eb=rD(ei),ew=tD(rD)(ef),eE=tD(rq)(ed),ev=tD(rD)(ec),eC=tD(rz)(em),eT=rM(en),e_=rM(eo),eR=tD(rM)(ea),eI=rM(ei),eS=tD(rM)(ef),eO=tD(rj)(ed.concat(em)),eN=tD(rM)(ec),ex=tD(r2)(es),eF=tD(r4)(es),eP=tD(rQ)(ec),eL=rV(ei),eD=rJ(en),eM=rJ(eo),ek=tD(r0)(ea),eU=rJ(ei),eB=tD(r0)(ef),eW=rK(en),eG=rK(eo),eH=tD(rK)(ea),e$=rK(ei),eY=tD(rK)(ef),eq=tD(rK)(ec),ej=tD(rK)(el),ez=Y.some(({autocomplete:e})=>e.includes("one-time-code"))||tD(na)(ep),eK=tD(na)(ea),eV=tD(na)(eg),eQ=[...eg,ez||eK||eV?nN(c.innerText,"\\[\\]"):""],eX=tD(ni)(eQ),eZ=nt(ei),eJ=tD(nt)(ea),e0=tD(nn)(em.concat(eu)),e1=tD(ns)(eg),e2=tD(rZ)(eg);return{formComplexity:oe(((e,t)=>{let r,n=new Set;for(let e of(r=0+2*t.visibleFields+ +t.buttons+.5*t.anchors+.25*t.nonVisibleFields+.1*t.hiddenFields,t.fields)){let t="INPUT"===e.tagName?e.type:e.tagName;n.has(t)||(r+=.2,n.add(t))}for(let t of(r+=.2*e.querySelectorAll("fieldset, [role='group'], [role='radiogroup']").length,e.querySelectorAll("div, section")))t.children.length>1&&(r+=.2);return r})(c,{fields:p,visibleFields:f.length,hiddenFields:h.length,nonVisibleFields:p.length-f.length-h.length,anchors:Z.length,buttons:Q.length}),0,50),fieldsCount:oe(f.length,1,5),visibleInputsCount:oe(A.length,1,5),inputCount:oe(A.length,1,5),fieldsetCount:oe(y.length,1,5),textCount:oe(E.length,0,3),readOnlyCount:oe(C.length,0,3),textareaCount:oe(b.length,0,2),selectCount:oe(w.length,0,5),disabledCount:oe(L.length,0,5),checkboxCount:oe(_.length,0,2),radioCount:oe(T.length,0,5),identifierCount:oe(B.length,0,3),hiddenIdentifierCount:oe(W.length,0,2),hiddenCount:oe(h.length,0,5),passwordCount:oe(H.length,0,2),hiddenPasswordCount:oe($.length,0,2),usernameCount:oe(M.length,0,2),emailCount:oe(k.length,0,2),submitCount:oe(z.length,0,2),identitiesCount:oe(F.length,0,5),ccsCount:oe(x.length,0,5),hasTels:Number(v.length>0),hasOAuth:Number(J.length>0),hasCaptchas:Number(q.length>0),hasFiles:Number(S.length>0),hasDate:Number(I.length>0),hasNumber:Number(R.length>0),oneVisibleField:Number(1===A.length),twoVisibleFields:Number(2===A.length),threeOrMoreVisibleFields:Number(A.length>=3),noPasswords:Number(0===H.length),onePassword:Number(1===H.length),twoPasswords:Number(2===H.length),threeOrMorePasswords:Number(H.length>=3),noIdentifiers:Number(0===B.length),oneIdentifier:Number(1===B.length),twoIdentifiers:Number(2===B.length),threeOrMoreIdentifiers:Number(B.length>=3),autofocusedIsIdentifier:Number(et),autofocusedIsPassword:Number(er),inputRatio:iC(g.length/p.length),hiddenRatio:iC(h.length/p.length),visibleRatio:iC(A.length/p.length),checkboxRatio:iC(_.length/p.length),emailRatio:iC(k.length/p.length),usernameRatio:iC(M.length/p.length),hiddenIdentifierRatio:iC(W.length/U.length),hiddenPasswordRatio:iC($.length/G.length),identifierRatio:iC(B.length/f.length),passwordRatio:iC(H.length/f.length),requiredRatio:iC(P.length/f.length),disabledRatio:iC(L.length/f.length),pageLogin:Number(eh),formTextLogin:Number(eA),formAttrsLogin:Number(ey),headingsLogin:Number(eb),layoutLogin:Number(ew),rememberMeCheckbox:Number(eE),troubleLink:Number(eC),submitLogin:Number(ev),pageRegister:Number(eT),formTextRegister:Number(e_),formAttrsRegister:Number(eR),headingsRegister:Number(eI),layoutRegister:Number(eS),pwNewRegister:Number(ex),pwConfirmRegister:Number(eF),submitRegister:Number(eN),TOSRef:Number(eO),pagePwReset:Number(eD),formTextPwReset:Number(eM),formAttrsPwReset:Number(ek),headingsPwReset:Number(eU),layoutPwReset:Number(eB),pageRecovery:Number(eW),formTextRecovery:Number(eG),formAttrsRecovery:Number(eH),headingsRecovery:Number(e$),layoutRecovery:Number(eY),identifierRecovery:Number(ej),submitRecovery:Number(eq),formMFA:Number(eV||eK),formAttrsMFA:Number(eK),formTextMFA:Number(eV),formTextAuthenticator:Number(eX),formOTPOutlier:Number(eJ),linkOTPOutlier:Number(e0),headingsOTPOutlier:Number(eZ),inputsMFA:Number(ez),newsletterForm:Number(e1),searchForm:Number(e2),multiStepForm:Number(eP||eL),multiAuthForm:Number(eh&&eT||eb&&eI||eN&&(ev||eP)),formInputIterator:(l=Array.from(c.querySelectorAll('input:not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="image"]), textarea, select')).filter(nj),u=(e,t,r)=>{let n=l.indexOf(e),i=-1===n?null:l?.[n+t]??null;return i&&r&&i?.tagName!==r?u(i,t,r):i},{prev:(e,t)=>u(e,-1,t),next:(e,t)=>u(e,1,t)}),formInputMFACandidates:A.filter(iJ).length}},or=["fieldsCount","inputCount","fieldsetCount","textCount","textareaCount","selectCount","disabledCount","radioCount","readOnlyCount","formComplexity","identifierCount","hiddenIdentifierCount","usernameCount","emailCount","hiddenCount","hiddenPasswordCount","submitCount","identitiesCount","ccsCount","hasTels","hasOAuth","hasCaptchas","hasFiles","hasDate","hasNumber","oneVisibleField","twoVisibleFields","threeOrMoreVisibleFields","noPasswords","onePassword","twoPasswords","threeOrMorePasswords","noIdentifiers","oneIdentifier","twoIdentifiers","threeOrMoreIdentifiers","autofocusedIsIdentifier","autofocusedIsPassword","visibleRatio","inputRatio","hiddenRatio","identifierRatio","emailRatio","usernameRatio","passwordRatio","disabledRatio","requiredRatio","checkboxRatio","hiddenIdentifierRatio","hiddenPasswordRatio","pageLogin","formTextLogin","formAttrsLogin","headingsLogin","layoutLogin","rememberMeCheckbox","troubleLink","submitLogin","pageRegister","formTextRegister","formAttrsRegister","headingsRegister","layoutRegister","pwNewRegister","pwConfirmRegister","submitRegister","TOSRef","pagePwReset","formTextPwReset","formAttrsPwReset","headingsPwReset","layoutPwReset","pageRecovery","formTextRecovery","formAttrsRecovery","headingsRecovery","layoutRecovery","identifierRecovery","submitRecovery","formTextMFA","formAttrsMFA","inputsMFA","newsletterForm","searchForm","multiStepForm","multiAuthForm",...iM(["multiStepForm"],["multiAuthForm"]),...iM(["visibleRatio","identifierRatio","passwordRatio","requiredRatio"],["fieldsCount","identifierCount","passwordCount","hiddenIdentifierCount","hiddenPasswordCount","multiAuthForm","multiStepForm"])],on=[["login-fieldsCount",2.0724992752075195],["login-inputCount",.9852641820907593],["login-fieldsetCount",-1.1779693365097046],["login-textCount",-2.336937427520752],["login-textareaCount",-1.345166563987732],["login-selectCount",-4.2165303230285645],["login-disabledCount",-.18492664396762848],["login-radioCount",-6.249516487121582],["login-readOnlyCount",-6.994029998779297],["login-formComplexity",-2.632889747619629],["login-identifierCount",-2.1217200756073],["login-hiddenIdentifierCount",3.185352087020874],["login-usernameCount",-.15859219431877136],["login-emailCount",-4.353358745574951],["login-hiddenCount",3.071723222732544],["login-hiddenPasswordCount",6.169623851776123],["login-submitCount",-5.422268867492676],["login-identitiesCount",.9962340593338013],["login-ccsCount",-3.0328993797302246],["login-hasTels",-3.5903916358947754],["login-hasOAuth",-.34478700160980225],["login-hasCaptchas",1.87575364112854],["login-hasFiles",-.004974236711859703],["login-hasDate",-1.7363207340240479],["login-hasNumber",-5.96631383895874],["login-oneVisibleField",2.424100399017334],["login-twoVisibleFields",.21031440794467926],["login-threeOrMoreVisibleFields",-1.360605001449585],["login-noPasswords",-6.541637897491455],["login-onePassword",6.6599555015563965],["login-twoPasswords",.4873499870300293],["login-threeOrMorePasswords",-1.0175126791000366],["login-noIdentifiers",-1.946824550628662],["login-oneIdentifier",1.1850430965423584],["login-twoIdentifiers",2.4431469440460205],["login-threeOrMoreIdentifiers",-4.8136420249938965],["login-autofocusedIsIdentifier",3.389669418334961],["login-autofocusedIsPassword",6.495340347290039],["login-visibleRatio",1.3084756135940552],["login-inputRatio",-3.304527521133423],["login-hiddenRatio",-.47788023948669434],["login-identifierRatio",-2.0708224773406982],["login-emailRatio",11.9343900680542],["login-usernameRatio",-3.134141445159912],["login-passwordRatio",3.0341763496398926],["login-disabledRatio",-.18372738361358643],["login-requiredRatio",.5793794989585876],["login-checkboxRatio",-10.586652755737305],["login-hiddenIdentifierRatio",1.5237616300582886],["login-hiddenPasswordRatio",6.412667274475098],["login-pageLogin",3.8267040252685547],["login-formTextLogin",9585007792338729e-19],["login-formAttrsLogin",4.78177547454834],["login-headingsLogin",7.789892196655273],["login-layoutLogin",-.27962955832481384],["login-rememberMeCheckbox",4.859387397766113],["login-troubleLink",3.8345634937286377],["login-submitLogin",9.849520683288574],["login-pageRegister",-8.343914985656738],["login-formTextRegister",-6.572613716125488],["login-formAttrsRegister",-7.072200775146484],["login-headingsRegister",-3.4610555171966553],["login-layoutRegister",1.7700806856155396],["login-pwNewRegister",-13.034941673278809],["login-pwConfirmRegister",-4.625460147857666],["login-submitRegister",-12.917529106140137],["login-TOSRef",-2.7807652950286865],["login-pagePwReset",-1.027647852897644],["login-formTextPwReset",-29395567253232e-17],["login-formAttrsPwReset",-11.071924209594727],["login-headingsPwReset",-1.4014170169830322],["login-layoutPwReset",1.979628324508667],["login-pageRecovery",-1.021344542503357],["login-formTextRecovery",-1033202137187692e-50],["login-formAttrsRecovery",-10.126358032226563],["login-headingsRecovery",-3.2598562240600586],["login-layoutRecovery",1.6129142045974731],["login-identifierRecovery",.1658254861831665],["login-submitRecovery",-5.323183059692383],["login-formTextMFA",-2.579241991043091],["login-formAttrsMFA",-9.901978492736816],["login-inputsMFA",-10.718489646911621],["login-newsletterForm",-3.0586984157562256],["login-searchForm",-4.1132965087890625],["login-multiStepForm",2.554983377456665],["login-multiAuthForm",.4203472137451172],["login-multiStepForm,multiAuthForm",6.5882039070129395],["login-visibleRatio,fieldsCount",-2.028789758682251],["login-visibleRatio,identifierCount",-4.2160139083862305],["login-visibleRatio,passwordCount",1.2220494747161865],["login-visibleRatio,hiddenIdentifierCount",-4.174871921539307],["login-visibleRatio,hiddenPasswordCount",-3.0576939582824707],["login-visibleRatio,multiAuthForm",.4852445125579834],["login-visibleRatio,multiStepForm",7.150484085083008],["login-identifierRatio,fieldsCount",-3.088218927383423],["login-identifierRatio,identifierCount",-4.3607659339904785],["login-identifierRatio,passwordCount",3.8215749263763428],["login-identifierRatio,hiddenIdentifierCount",1.0684876441955566],["login-identifierRatio,hiddenPasswordCount",9.072622299194336],["login-identifierRatio,multiAuthForm",5.968240737915039],["login-identifierRatio,multiStepForm",-5.979754447937012],["login-passwordRatio,fieldsCount",5.572204113006592],["login-passwordRatio,identifierCount",3.8035452365875244],["login-passwordRatio,passwordCount",-2.8207006454467773],["login-passwordRatio,hiddenIdentifierCount",2.1360015869140625],["login-passwordRatio,hiddenPasswordCount",.6994272470474243],["login-passwordRatio,multiAuthForm",-4.901845932006836],["login-passwordRatio,multiStepForm",-14.494694709777832],["login-requiredRatio,fieldsCount",1.168289303779602],["login-requiredRatio,identifierCount",-1.8514260053634644],["login-requiredRatio,passwordCount",-3.6438918113708496],["login-requiredRatio,hiddenIdentifierCount",7.612978458404541],["login-requiredRatio,hiddenPasswordCount",1.1926801204681396],["login-requiredRatio,multiAuthForm",3.628382444381714],["login-requiredRatio,multiStepForm",4.243411064147949]],oi={name:x.LOGIN,coeffs:or.map(e=>[`login-${e}`,on.find(([t])=>t===`login-${e}`)?.[1]??0]),bias:-1.0068837404251099,cutoff:.5,getRules:()=>[tf(td("form"),td(x.LOGIN),{}),...or.map(e=>tf(td(x.LOGIN),iS("form",e),{name:`login-${e}`})),...iD("form-candidate",x.LOGIN)]},oo=[["pw-change-fieldsCount",-.3124527931213379],["pw-change-inputCount",-.42478686571121216],["pw-change-fieldsetCount",-.08773519098758698],["pw-change-textCount",-1.4449864625930786],["pw-change-textareaCount",-.49524855613708496],["pw-change-selectCount",-.29648658633232117],["pw-change-disabledCount",-.021873783320188522],["pw-change-radioCount",-2.209073305130005],["pw-change-readOnlyCount",-2.056184768676758],["pw-change-formComplexity",-.3344323933124542],["pw-change-identifierCount",-1.3220558166503906],["pw-change-hiddenIdentifierCount",-1.3031892776489258],["pw-change-usernameCount",-1.5153549909591675],["pw-change-emailCount",-1.3925061225891113],["pw-change-hiddenCount",.1422010213136673],["pw-change-hiddenPasswordCount",-.4630727469921112],["pw-change-submitCount",.16830405592918396],["pw-change-identitiesCount",-.6417959928512573],["pw-change-ccsCount",-.4969494044780731],["pw-change-hasTels",-1.1256853342056274],["pw-change-hasOAuth",-1.0965497493743896],["pw-change-hasCaptchas",-1.1860125064849854],["pw-change-hasFiles",-.007154686842113733],["pw-change-hasDate",-14264986020862125e-21],["pw-change-hasNumber",-.5434018969535828],["pw-change-oneVisibleField",-1.383600115776062],["pw-change-twoVisibleFields",-.6778467297554016],["pw-change-threeOrMoreVisibleFields",-.06493742018938065],["pw-change-noPasswords",-2.1581051349639893],["pw-change-onePassword",-1.0267324447631836],["pw-change-twoPasswords",.6394753456115723],["pw-change-threeOrMorePasswords",3.857250690460205],["pw-change-noIdentifiers",-.05588485300540924],["pw-change-oneIdentifier",-1.5682069063186646],["pw-change-twoIdentifiers",-1.3410396575927734],["pw-change-threeOrMoreIdentifiers",-.5764643549919128],["pw-change-autofocusedIsIdentifier",-1.1482045650482178],["pw-change-autofocusedIsPassword",-1.3536267280578613],["pw-change-visibleRatio",-1.7166575193405151],["pw-change-inputRatio",-1.2661168575286865],["pw-change-hiddenRatio",1.1374437808990479],["pw-change-identifierRatio",-1.2908424139022827],["pw-change-emailRatio",-1.2402619123458862],["pw-change-usernameRatio",-1.225213646888733],["pw-change-passwordRatio",1.8793997764587402],["pw-change-disabledRatio",-.018341070041060448],["pw-change-requiredRatio",.22066372632980347],["pw-change-checkboxRatio",.0869966596364975],["pw-change-hiddenIdentifierRatio",-1.6125338077545166],["pw-change-hiddenPasswordRatio",-.5019018054008484],["pw-change-pageLogin",-1.9405913352966309],["pw-change-formTextLogin",-15975761925801635e-20],["pw-change-formAttrsLogin",-.9209910035133362],["pw-change-headingsLogin",-1.3508150577545166],["pw-change-layoutLogin",-1.2454622983932495],["pw-change-rememberMeCheckbox",-.48498138785362244],["pw-change-troubleLink",-.8835694193840027],["pw-change-submitLogin",-1.4513849020004272],["pw-change-pageRegister",-.34337058663368225],["pw-change-formTextRegister",-13296227052705945e-23],["pw-change-formAttrsRegister",-3.5862817764282227],["pw-change-headingsRegister",-4.453853130340576],["pw-change-layoutRegister",-.44006428122520447],["pw-change-pwNewRegister",6.631987571716309],["pw-change-pwConfirmRegister",.2629145681858063],["pw-change-submitRegister",-2.50616192817688],["pw-change-TOSRef",-.13306908309459686],["pw-change-pagePwReset",.8943226933479309],["pw-change-formTextPwReset",.12193922698497772],["pw-change-formAttrsPwReset",3.0584845542907715],["pw-change-headingsPwReset",.6559048891067505],["pw-change-layoutPwReset",3.8835697174072266],["pw-change-pageRecovery",-1.0318623781204224],["pw-change-formTextRecovery",-10620318105585335e-51],["pw-change-formAttrsRecovery",-.507628321647644],["pw-change-headingsRecovery",-.3358222544193268],["pw-change-layoutRecovery",-.17637251317501068],["pw-change-identifierRecovery",-.3045651316642761],["pw-change-submitRecovery",1.8863883018493652],["pw-change-formTextMFA",-.9335706233978271],["pw-change-formAttrsMFA",-.4494941234588623],["pw-change-inputsMFA",-.6711286902427673],["pw-change-newsletterForm",-.019143424928188324],["pw-change-searchForm",-1.2415826320648193],["pw-change-multiStepForm",-1.0409560203552246],["pw-change-multiAuthForm",-.5651557445526123],["pw-change-multiStepForm,multiAuthForm",-.23806244134902954],["pw-change-visibleRatio,fieldsCount",-.6329886317253113],["pw-change-visibleRatio,identifierCount",-1.141250729560852],["pw-change-visibleRatio,passwordCount",-.2569584548473358],["pw-change-visibleRatio,hiddenIdentifierCount",-.28805801272392273],["pw-change-visibleRatio,hiddenPasswordCount",-.2405938059091568],["pw-change-visibleRatio,multiAuthForm",-.42184409499168396],["pw-change-visibleRatio,multiStepForm",-2.417726993560791],["pw-change-identifierRatio,fieldsCount",-1.0414071083068848],["pw-change-identifierRatio,identifierCount",-1.0847856998443604],["pw-change-identifierRatio,passwordCount",-1.8358491659164429],["pw-change-identifierRatio,hiddenIdentifierCount",-.333987295627594],["pw-change-identifierRatio,hiddenPasswordCount",-.483875036239624],["pw-change-identifierRatio,multiAuthForm",-.35559818148612976],["pw-change-identifierRatio,multiStepForm",-.8042961955070496],["pw-change-passwordRatio,fieldsCount",1.7951627969741821],["pw-change-passwordRatio,identifierCount",-1.5206326246261597],["pw-change-passwordRatio,passwordCount",2.680701732635498],["pw-change-passwordRatio,hiddenIdentifierCount",-1.5010206699371338],["pw-change-passwordRatio,hiddenPasswordCount",-.07956588268280029],["pw-change-passwordRatio,multiAuthForm",-.22080112993717194],["pw-change-passwordRatio,multiStepForm",-.3683548867702484],["pw-change-requiredRatio,fieldsCount",-.7244285941123962],["pw-change-requiredRatio,identifierCount",-1.4329835176467896],["pw-change-requiredRatio,passwordCount",.910696804523468],["pw-change-requiredRatio,hiddenIdentifierCount",-1.0904970169067383],["pw-change-requiredRatio,hiddenPasswordCount",-.8216414451599121],["pw-change-requiredRatio,multiAuthForm",-.2252677083015442],["pw-change-requiredRatio,multiStepForm",-.16383366286754608]],oa={name:x.PASSWORD_CHANGE,coeffs:or.map(e=>[`pw-change-${e}`,oo.find(([t])=>t===`pw-change-${e}`)?.[1]??0]),bias:-1.236087441444397,cutoff:.5,getRules:()=>[tf(td("form"),td(x.PASSWORD_CHANGE),{}),...or.map(e=>tf(td(x.PASSWORD_CHANGE),iS("form",e),{name:`pw-change-${e}`})),...iD("form-candidate",x.PASSWORD_CHANGE)]},os=[["recovery-fieldsCount",3.4701356887817383],["recovery-inputCount",.5000748038291931],["recovery-fieldsetCount",5.1341633796691895],["recovery-textCount",.34025031328201294],["recovery-textareaCount",-8.67773151397705],["recovery-selectCount",-3.9727067947387695],["recovery-disabledCount",-.11002977937459946],["recovery-radioCount",-2.639631748199463],["recovery-readOnlyCount",7.7245073318481445],["recovery-formComplexity",-7.2307915687561035],["recovery-identifierCount",-1.1033483743667603],["recovery-hiddenIdentifierCount",-3.82887864112854],["recovery-usernameCount",2.043879747390747],["recovery-emailCount",.18247854709625244],["recovery-hiddenCount",4.063638210296631],["recovery-hiddenPasswordCount",-4.146700859069824],["recovery-submitCount",.2963066101074219],["recovery-identitiesCount",-3.8321423530578613],["recovery-ccsCount",-.5193601250648499],["recovery-hasTels",-.6439138054847717],["recovery-hasOAuth",-3.5844459533691406],["recovery-hasCaptchas",8.0313081741333],["recovery-hasFiles",-14.992290496826172],["recovery-hasDate",-4432456535141682e-21],["recovery-hasNumber",-.5468257069587708],["recovery-oneVisibleField",1.0310453176498413],["recovery-twoVisibleFields",-5.571305274963379],["recovery-threeOrMoreVisibleFields",-3.0454211235046387],["recovery-noPasswords",.3016546070575714],["recovery-onePassword",-5.5829057693481445],["recovery-twoPasswords",-2.923154830932617],["recovery-threeOrMorePasswords",-.17920371890068054],["recovery-noIdentifiers",-5.585626125335693],["recovery-oneIdentifier",-1.5657724142074585],["recovery-twoIdentifiers",3.457118034362793],["recovery-threeOrMoreIdentifiers",-2.0953385829925537],["recovery-autofocusedIsIdentifier",1.078244924545288],["recovery-autofocusedIsPassword",-.02365255542099476],["recovery-visibleRatio",-1.5474544763565063],["recovery-inputRatio",-2.9765820503234863],["recovery-hiddenRatio",1.3639293909072876],["recovery-identifierRatio",-3.7135040760040283],["recovery-emailRatio",7.168995380401611],["recovery-usernameRatio",1.001105546951294],["recovery-passwordRatio",-4.475710391998291],["recovery-disabledRatio",-.14358991384506226],["recovery-requiredRatio",-.46395444869995117],["recovery-checkboxRatio",-14.895898818969727],["recovery-hiddenIdentifierRatio",.1909053474664688],["recovery-hiddenPasswordRatio",-7.181048393249512],["recovery-pageLogin",.47614195942878723],["recovery-formTextLogin",-41961211536545306e-21],["recovery-formAttrsLogin",1.4481360912322998],["recovery-headingsLogin",-.7938364148139954],["recovery-layoutLogin",.0681312084197998],["recovery-rememberMeCheckbox",-1.626459002494812],["recovery-troubleLink",3.3516154289245605],["recovery-submitLogin",.45002084970474243],["recovery-pageRegister",-1.5460036993026733],["recovery-formTextRegister",-.003045749617740512],["recovery-formAttrsRegister",-3.4983348846435547],["recovery-headingsRegister",-.5829151272773743],["recovery-layoutRegister",-12.054293632507324],["recovery-pwNewRegister",-1.1756473779678345],["recovery-pwConfirmRegister",-1.0218318700790405],["recovery-submitRegister",-.9856029152870178],["recovery-TOSRef",-6.50254487991333],["recovery-pagePwReset",-2.3633453845977783],["recovery-formTextPwReset",-4209546659694752e-21],["recovery-formAttrsPwReset",1.9408674240112305],["recovery-headingsPwReset",4.62256383895874],["recovery-layoutPwReset",.035143040120601654],["recovery-pageRecovery",5.9564619064331055],["recovery-formTextRecovery",-342330694873058e-50],["recovery-formAttrsRecovery",3.671081781387329],["recovery-headingsRecovery",5.361715316772461],["recovery-layoutRecovery",2.2404119968414307],["recovery-identifierRecovery",7.57396125793457],["recovery-submitRecovery",7.691378116607666],["recovery-formTextMFA",.3870577812194824],["recovery-formAttrsMFA",2.013308048248291],["recovery-inputsMFA",-3.4467923641204834],["recovery-newsletterForm",-4.818905830383301],["recovery-searchForm",2.974923610687256],["recovery-multiStepForm",-2.66239070892334],["recovery-multiAuthForm",-2.0097339153289795],["recovery-multiStepForm,multiAuthForm",-1.2289559841156006],["recovery-visibleRatio,fieldsCount",.9498628377914429],["recovery-visibleRatio,identifierCount",-1.10765540599823],["recovery-visibleRatio,passwordCount",-3.0817158222198486],["recovery-visibleRatio,hiddenIdentifierCount",-1.112876057624817],["recovery-visibleRatio,hiddenPasswordCount",-.8386266827583313],["recovery-visibleRatio,multiAuthForm",-1.8145699501037598],["recovery-visibleRatio,multiStepForm",.3509717881679535],["recovery-identifierRatio,fieldsCount",5.669144630432129],["recovery-identifierRatio,identifierCount",-3.893160581588745],["recovery-identifierRatio,passwordCount",-5.075725078582764],["recovery-identifierRatio,hiddenIdentifierCount",2.5778231620788574],["recovery-identifierRatio,hiddenPasswordCount",-4.381852626800537],["recovery-identifierRatio,multiAuthForm",-2.269550323486328],["recovery-identifierRatio,multiStepForm",4.7331061363220215],["recovery-passwordRatio,fieldsCount",-3.107738494873047],["recovery-passwordRatio,identifierCount",-4.237580299377441],["recovery-passwordRatio,passwordCount",-3.709925413131714],["recovery-passwordRatio,hiddenIdentifierCount",-1.1334744691848755],["recovery-passwordRatio,hiddenPasswordCount",-27414287615101784e-21],["recovery-passwordRatio,multiAuthForm",-.26481735706329346],["recovery-passwordRatio,multiStepForm",.13985475897789001],["recovery-requiredRatio,fieldsCount",-4.39854621887207],["recovery-requiredRatio,identifierCount",-1.338199257850647],["recovery-requiredRatio,passwordCount",-1.1263242959976196],["recovery-requiredRatio,hiddenIdentifierCount",-7.788489818572998],["recovery-requiredRatio,hiddenPasswordCount",-5594331305474043e-19],["recovery-requiredRatio,multiAuthForm",-.21975822746753693],["recovery-requiredRatio,multiStepForm",-1.7697635889053345]],ol={name:x.RECOVERY,coeffs:or.map(e=>[`recovery-${e}`,os.find(([t])=>t===`recovery-${e}`)?.[1]??0]),bias:-2.3783442974090576,cutoff:.45,getRules:()=>[tf(td("form"),td(x.RECOVERY),{}),...or.map(e=>tf(td(x.RECOVERY),iS("form",e),{name:`recovery-${e}`})),...iD("form-candidate",x.RECOVERY)]},ou=[["register-fieldsCount",-.7715223431587219],["register-inputCount",1.8207522630691528],["register-fieldsetCount",10.955631256103516],["register-textCount",2.1035258769989014],["register-textareaCount",3.086559295654297],["register-selectCount",.6930644512176514],["register-disabledCount",-6.419006824493408],["register-radioCount",-6.421346187591553],["register-readOnlyCount",-5.664778709411621],["register-formComplexity",-.39992430806159973],["register-identifierCount",1.7410306930541992],["register-hiddenIdentifierCount",3.7076306343078613],["register-usernameCount",1.8058438301086426],["register-emailCount",5.335700035095215],["register-hiddenCount",-9.317770004272461],["register-hiddenPasswordCount",3.988396644592285],["register-submitCount",-2.718926429748535],["register-identitiesCount",-1.9683053493499756],["register-ccsCount",-17.03114891052246],["register-hasTels",5.3319926261901855],["register-hasOAuth",-3.032442092895508],["register-hasCaptchas",2.9334211349487305],["register-hasFiles",-5.4316325187683105],["register-hasDate",-.320650577545166],["register-hasNumber",8.085457801818848],["register-oneVisibleField",.1659514456987381],["register-twoVisibleFields",-1.4551373720169067],["register-threeOrMoreVisibleFields",-1.1442583799362183],["register-noPasswords",-5.661530017852783],["register-onePassword",2.371299982070923],["register-twoPasswords",5.624139785766602],["register-threeOrMorePasswords",-.9818815588951111],["register-noIdentifiers",-3.779933214187622],["register-oneIdentifier",-4.8304524421691895],["register-twoIdentifiers",3.5450010299682617],["register-threeOrMoreIdentifiers",4.481414318084717],["register-autofocusedIsIdentifier",1.3410214185714722],["register-autofocusedIsPassword",13.638496398925781],["register-visibleRatio",.7752816081047058],["register-inputRatio",-3.2322633266448975],["register-hiddenRatio",6.337962627410889],["register-identifierRatio",1.5590029954910278],["register-emailRatio",7.062351226806641],["register-usernameRatio",-2.9871866703033447],["register-passwordRatio",-7.59958553314209],["register-disabledRatio",-2.934109687805176],["register-requiredRatio",-2.517669439315796],["register-checkboxRatio",3.457488775253296],["register-hiddenIdentifierRatio",-14.188441276550293],["register-hiddenPasswordRatio",5.382781028747559],["register-pageLogin",-5.226663589477539],["register-formTextLogin",-18237861354464258e-23],["register-formAttrsLogin",-5.16132116317749],["register-headingsLogin",-4.926670074462891],["register-layoutLogin",2.855076789855957],["register-rememberMeCheckbox",-9.043022155761719],["register-troubleLink",-9.320005416870117],["register-submitLogin",-3.3887908458709717],["register-pageRegister",7.236118316650391],["register-formTextRegister",8053844794631004e-19],["register-formAttrsRegister",4.244743347167969],["register-headingsRegister",4.385275840759277],["register-layoutRegister",1.1564441919326782],["register-pwNewRegister",4.3144073486328125],["register-pwConfirmRegister",11.2562894821167],["register-submitRegister",9.583317756652832],["register-TOSRef",3.3543901443481445],["register-pagePwReset",-3.037680149078369],["register-formTextPwReset",-8860824891598895e-20],["register-formAttrsPwReset",-3.4295077323913574],["register-headingsPwReset",-3.9291999340057373],["register-layoutPwReset",-9.16280746459961],["register-pageRecovery",-1.391419529914856],["register-formTextRecovery",-2223779140944024e-51],["register-formAttrsRecovery",-2.7384912967681885],["register-headingsRecovery",-3.632072925567627],["register-layoutRecovery",1.5803401470184326],["register-identifierRecovery",1.4052228927612305],["register-submitRecovery",-9.401165962219238],["register-formTextMFA",-3.2062761783599854],["register-formAttrsMFA",-2.714632511138916],["register-inputsMFA",-8.042412757873535],["register-newsletterForm",-14.632294654846191],["register-searchForm",-4.439837455749512],["register-multiStepForm",5.754843235015869],["register-multiAuthForm",11.412175178527832],["register-multiStepForm,multiAuthForm",1.806281328201294],["register-visibleRatio,fieldsCount",-2.1616830825805664],["register-visibleRatio,identifierCount",-2.615250587463379],["register-visibleRatio,passwordCount",-3.9927444458007813],["register-visibleRatio,hiddenIdentifierCount",-.9703884124755859],["register-visibleRatio,hiddenPasswordCount",-5.256988048553467],["register-visibleRatio,multiAuthForm",-7.544736862182617],["register-visibleRatio,multiStepForm",5.781548976898193],["register-identifierRatio,fieldsCount",-.3426927328109741],["register-identifierRatio,identifierCount",-.9977250695228577],["register-identifierRatio,passwordCount",7.134419918060303],["register-identifierRatio,hiddenIdentifierCount",5.294583320617676],["register-identifierRatio,hiddenPasswordCount",-3.99853253364563],["register-identifierRatio,multiAuthForm",1.5212640762329102],["register-identifierRatio,multiStepForm",-5.18511962890625],["register-passwordRatio,fieldsCount",5.625852108001709],["register-passwordRatio,identifierCount",3.4375877380371094],["register-passwordRatio,passwordCount",-4.2791428565979],["register-passwordRatio,hiddenIdentifierCount",4.266729831695557],["register-passwordRatio,hiddenPasswordCount",-.8004656434059143],["register-passwordRatio,multiAuthForm",1.4518039226531982],["register-passwordRatio,multiStepForm",1.2880791425704956],["register-requiredRatio,fieldsCount",-3.580711841583252],["register-requiredRatio,identifierCount",-.3475106656551361],["register-requiredRatio,passwordCount",1.1550055742263794],["register-requiredRatio,hiddenIdentifierCount",.3001369535923004],["register-requiredRatio,hiddenPasswordCount",-.6879881620407104],["register-requiredRatio,multiAuthForm",-4.5414581298828125],["register-requiredRatio,multiStepForm",3.5315074920654297]],oc={name:x.REGISTER,coeffs:or.map(e=>[`register-${e}`,ou.find(([t])=>t===`register-${e}`)?.[1]??0]),bias:-2.219365358352661,cutoff:.5,getRules:()=>[tf(td("form"),td(x.REGISTER),{}),...or.map(e=>tf(td(x.REGISTER),iS("form",e),{name:`register-${e}`})),...iD("form-candidate",x.REGISTER)]},od={coeffs:[["email-isCC",-2.2002267837524414],["email-isIdentity",-4.431686878204346],["email-autocompleteEmail",3.3659348487854004],["email-autocompleteOff",-.9760997295379639],["email-typeEmail",9.599180221557617],["email-exactAttrEmail",8.049196243286133],["email-attrEmail",2.1345481872558594],["email-textEmail",4.984194755554199],["email-labelEmail",11.875850677490234],["email-placeholderEmail",6.982718467712402],["email-searchField",-8.134305953979492],["email-mfaOutlier",-10.277375221252441]],bias:-6.5456414222717285,cutoff:.5},om=iO("email-field",F.EMAIL,["autocompleteEmail","autocompleteOff","typeEmail","exactAttrEmail","attrEmail","textEmail","labelEmail","placeholderEmail","searchField","mfaOutlier"]),op={name:F.EMAIL,coeffs:ix(iN(om),od),bias:od.bias,cutoff:od.cutoff,getRules:()=>[tf(td("email-field"),td(F.EMAIL),{}),...om,...iD("field-candidate",F.EMAIL)]},of=[tf(td("field").when(e=>{let t=e.element,{isIdentity:r,isCC:n,searchField:i,isFormLogin:o,isFormRecovery:a,visible:s}=e.noteFor("field");if(!s||n||!r)return!1;let l=i9(t);return!!l&&!o&&!a&&("list"===t.getAttribute("aria-autocomplete")||"combobox"===t.role?[P.ADDRESS,P.ZIPCODE].includes(l):!i||[P.ADDRESS,P.ZIPCODE,P.CITY].includes(l))}),td("identity-field"),{}),tf(td("identity-field"),td(F.IDENTITY),{}),...iD("field-candidate",F.IDENTITY,()=>()=>!0)],{linearScale:og}=e2,oh=(e,t)=>{if(!e||e?.getAttribute("type")!==t.type)return!1;let r=e.getAttribute("maxlength");if(r&&parseInt(r,10)>1)return!1;let n=e.getAttribute("minlength");if(n&&parseInt(n)>1)return!1;let{top:i,bottom:o,width:a,area:s}=tW(e);if(a>=100)return!1;let l=2>=Math.abs(t.rect.top-i),u=2>=Math.abs(t.rect.bottom-o);return!!(l&&u&&16>Math.abs(t.rect.area-s))},oA=["numericMode","nameMatch","idMatch","autocompleteOTC","patternOTP","formMFA","formAuthenticator","attrOTP","labelOTP","attrMFA","textMFA","labelMFA","textAuthenticator","labelAuthenticator","singleInput","siblingOfInterest","outlierAutocomplete","outlierEmailMatch","outlierEmailMatch","outlierField","outlierForm","outlierHeadings","outlierInputCount","outlierLink","outlierMaxLength","outlierSearch","formComplexity"],oy={coeffs:[["otp-isCC",-2.929464340209961],["otp-isIdentity",-4.154420852661133],["otp-numericMode",-.02600262686610222],["otp-nameMatch",-.3730376958847046],["otp-idMatch",6.889358997344971],["otp-autocompleteOTC",3.829261064529419],["otp-patternOTP",4.223550319671631],["otp-formMFA",1.5497925281524658],["otp-formAuthenticator",9.33846664428711],["otp-attrOTP",1.0678033828735352],["otp-labelOTP",.7168673872947693],["otp-attrMFA",4.815592288970947],["otp-textMFA",1.4641892910003662],["otp-labelMFA",8.614002227783203],["otp-textAuthenticator",.2684760093688965],["otp-labelAuthenticator",3.1353793144226074],["otp-singleInput",.4276081621646881],["otp-siblingOfInterest",1.475947618484497],["otp-outlierAutocomplete",-2.760652780532837],["otp-outlierEmailMatch",-4.065969944000244],["otp-outlierField",-6.717183589935303],["otp-outlierForm",3.0605452060699463],["otp-outlierHeadings",-7.805499076843262],["otp-outlierInputCount",-5.956521034240723],["otp-outlierLink",-3.424076795578003],["otp-outlierMaxLength",-10.43444538116455],["otp-outlierSearch",-8.506669044494629],["otp-formComplexity",-4.375076770782471]],bias:-5.147384166717529,cutoff:.5},ob=iO("otp-field",F.OTP,oA),ow={name:F.OTP,coeffs:ix(iN(ob),oy),bias:oy.bias,cutoff:oy.cutoff,getRules:()=>[tf(td("otp-field"),td(F.OTP),{}),...iO("otp-field",F.OTP,oA),...iD("field-candidate",F.OTP)]},oE=["loginScore","registerScore","exotic","passwordOutlier","autocompleteNew","autocompleteCurrent","autocompleteOTP","autocompleteOff","attrCurrent","textCurrent","labelCurrent","attrCreate","textCreate","labelCreate","attrConfirm","textConfirm","labelConfirm","attrReset","prevPwField","prevPwNew","prevPwCurrent","nextPwField","nextPwNew","nextPwCurrent","nextPwConfirm",...iM(["prevPwCurrent"],["nextPwNew"]),...iM(["registerScore"],["maybeCurrent","autocompleteCurrent"]),...iM(["loginScore"],["maybeNew","autocompleteNew"])],ov={coeffs:[["password-isCC",-2.5495009422302246],["password-isIdentity",-10181612765790474e-51],["password-loginScore",6.993308067321777],["password-registerScore",-9.175145149230957],["password-exotic",-6.185561180114746],["password-passwordOutlier",-6.965709209442139],["password-autocompleteNew",-6.353390693664551],["password-autocompleteCurrent",1.4170660972595215],["password-autocompleteOTP",-1.9464401006698608],["password-autocompleteOff",-1.9457998275756836],["password-attrCurrent",2.355036497116089],["password-textCurrent",.5146738886833191],["password-labelCurrent",2.8623030185699463],["password-attrCreate",-1.1767674684524536],["password-textCreate",-4.579235076904297],["password-labelCreate",-5.083735942840576],["password-attrConfirm",-2.8481342792510986],["password-textConfirm",-.8153501152992249],["password-labelConfirm",-1.5052801370620728],["password-attrReset",.10526452213525772],["password-prevPwField",-5.77263069152832],["password-prevPwNew",-2.933677911758423],["password-prevPwCurrent",-1.4287481307983398],["password-nextPwField",-2.4062392711639404],["password-nextPwNew",3.570892572402954],["password-nextPwCurrent",-7760280859656632e-19],["password-nextPwConfirm",-5.148987770080566],["password-prevPwCurrent,nextPwNew",-1.3357259035110474],["password-registerScore,maybeCurrent",-.0903702899813652],["password-registerScore,autocompleteCurrent",-2.2388575077056885],["password-loginScore,maybeNew",1.47178053855896],["password-loginScore,autocompleteNew",2.025840997695923]],bias:3.2924163341522217,cutoff:.5},oC=iO("password-field",F.PASSWORD_CURRENT,oE),oT={name:F.PASSWORD_CURRENT,coeffs:ix(iN(oC),ov),bias:ov.bias,cutoff:ov.cutoff,getRules:()=>[tf(td("password-field"),td(F.PASSWORD_CURRENT),{}),...oC,...iD("field-candidate",F.PASSWORD_CURRENT)]},o_={coeffs:[["new-password-isCC",-7.740285396575928],["new-password-isIdentity",-8185413485286916e-49],["new-password-loginScore",-7.903318881988525],["new-password-registerScore",6.802002429962158],["new-password-exotic",3.008633852005005],["new-password-passwordOutlier",-14.248550415039063],["new-password-autocompleteNew",4.15820837020874],["new-password-autocompleteCurrent",-1.7635936737060547],["new-password-autocompleteOTP",-6.369772911071777],["new-password-autocompleteOff",-.10867024958133698],["new-password-attrCurrent",-1.635484218597412],["new-password-textCurrent",-.6979192495346069],["new-password-labelCurrent",-2.8386106491088867],["new-password-attrCreate",.6915404200553894],["new-password-textCreate",5.144122123718262],["new-password-labelCreate",4.53665828704834],["new-password-attrConfirm",2.102309226989746],["new-password-textConfirm",.7633639574050903],["new-password-labelConfirm",1.526360034942627],["new-password-attrReset",-.08488034456968307],["new-password-prevPwField",4.362738132476807],["new-password-prevPwNew",2.251995325088501],["new-password-prevPwCurrent",1.7774150371551514],["new-password-nextPwField",-1.458757758140564],["new-password-nextPwNew",-2.0089409351348877],["new-password-nextPwCurrent",.023229876533150673],["new-password-nextPwConfirm",6.01061487197876],["new-password-prevPwCurrent,nextPwNew",1.8332372903823853],["new-password-registerScore,maybeCurrent",.042782533913850784],["new-password-registerScore,autocompleteCurrent",2.1488101482391357],["new-password-loginScore,maybeNew",-2.857759714126587],["new-password-loginScore,autocompleteNew",-1.9657737016677856]],bias:-.2838660180568695,cutoff:.5},oR=iO("password-field",F.PASSWORD_NEW,oE),oI={name:F.PASSWORD_NEW,coeffs:ix(iN(oR),o_),bias:o_.bias,cutoff:o_.cutoff,getRules:()=>[tf(td("password-field"),td(F.PASSWORD_NEW),{}),...oR,...iD("field-candidate",F.PASSWORD_NEW)]},oS={coeffs:[["username-isCC",-2.682265281677246],["username-isIdentity",-1.7206202745437622],["username-autocompleteUsername",1.4985052347183228],["username-autocompleteEmail",-.11175209283828735],["username-autocompleteOff",-.6316365003585815],["username-attrUsername",12.237555503845215],["username-textUsername",11.308667182922363],["username-labelUsername",12.168246269226074],["username-outlierText",-1.4085276126861572],["username-outlierAttrs",-1.6555830240249634],["username-outlierLabel",-.9621310234069824],["username-outlierEmail",-3.092839241027832],["username-firstLoginFormField",13.208979606628418],["username-searchField",-8.131026268005371]],bias:-6.47932767868042,cutoff:.5},oO=iO("username-field",F.USERNAME,["autocompleteUsername","autocompleteEmail","autocompleteOff","attrUsername","textUsername","labelUsername","outlierText","outlierAttrs","outlierLabel","outlierEmail","firstLoginFormField","searchField"]),oN={name:F.USERNAME,coeffs:ix(iN(oO),oS),bias:oS.bias,cutoff:oS.cutoff,getRules:()=>[tf(td("username-field"),td(F.USERNAME),{}),...oO,...iD("field-candidate",F.USERNAME)]},ox={coeffs:[["username-hidden-isCC",-12113167950001904e-51],["username-hidden-isIdentity",11343998317001021e-51],["username-hidden-exotic",-3.251591920852661],["username-hidden-visibleReadonly",4.167017936706543],["username-hidden-attrUsername",8.807610511779785],["username-hidden-attrEmail",7.067584991455078],["username-hidden-attrMatch",10.075766563415527],["username-hidden-autocompleteUsername",1.1107741594314575],["username-hidden-autocompleteEmail",1.69227933883667],["username-hidden-valueEmail",9.678967475891113],["username-hidden-valueTel",.0941505879163742],["username-hidden-valueUsername",-.07830581068992615]],bias:-12.296631813049316,cutoff:.5},oF=iO("username-hidden-field",F.USERNAME_HIDDEN,["exotic","visibleReadonly","attrUsername","attrEmail","attrMatch","autocompleteUsername","autocompleteEmail","valueEmail","valueTel","valueUsername"]),oP={name:F.USERNAME_HIDDEN,coeffs:ix(iN(oF),ox),bias:ox.bias,cutoff:ox.cutoff,getRules:()=>[tf(td("username-hidden-field"),td(F.USERNAME_HIDDEN),{}),...oF,...iD("field-candidate",F.USERNAME_HIDDEN)]},oL=[tf(td("field").when(e=>{let{isCC:t,visible:r}=e.noteFor("field");return!!r&&t}),td("cc-field"),{}),tf(td("field-candidate").when(e=>{let t=e.element;if(!(t instanceof HTMLSelectElement))return!1;if(iE(t))return!0;if(!nH(t,{opacity:!1})||!ri(t))return!1;let r=iv(t);return r&&t6(t,r),void 0!==r}),td("cc-field"),{}),tf(td("cc-field"),td(F.CREDIT_CARD),{}),...iD("field-candidate",F.CREDIT_CARD,()=>()=>!0)],oD=()=>{try{return window.self===window.top}catch(e){return!1}},oM=e=>ri(e)&&null!==e.querySelector("input"),{clusters:ok}=e8,oU={cache:new WeakMap},oB=e=>{let t=oU.cache.get(e)??{isField:e.matches(tv)&&e.matches(':not([type="submit"])'),rect:e.getBoundingClientRect()};return oU.cache.set(e,t),t},oW=(e=document)=>{((e=document)=>{let t=document.body.querySelectorAll("*").length;return e.querySelectorAll("form").forEach(e=>{if(oM(e)){let r=e.querySelectorAll(tv).length,n=e.querySelectorAll(tN).length,i=n+e.querySelectorAll("iframe").length===0||n>50||r>100,o=oD(),a=e.querySelectorAll("*").length,s=(o&&e.matches("body > form")||o&&i)&&a/t>=.7,l=i||s;if(l&&!s)return t1(e);if(l&&s||e.matches("table form")&&e.closest("table").querySelectorAll("form").length>2)return t0(e)}})})(e),((e=document)=>{e.querySelectorAll("table").forEach(e=>{if(oM(e)&&!e.querySelector("table")&&null===e.closest("form")){let t=e.querySelectorAll("form");if(t.length>2||!t.length&&(null!==e.querySelector("thead")||Math.max(...Array.from(e.rows).map(e=>e.cells.length))>3||tW(e).area>15e4))return t1(e)}}),e.querySelectorAll('[contenteditable="true"], :is(body,div,section,main):is([class*="editor"],[class*="Editor"],[class*="EDITOR"],[id*="editor"],[id*="Editor"],[id*="EDITOR"],[class*="composer" i],[id*="composer" i],[class*="wysiwyg" i],[id*="wysiwyg" i],[class*="tinymce" i],[id*="tinymce" i])').forEach(t1)})(e),((e=document)=>{e.querySelectorAll("input").forEach(e=>{if(ri(e)){if(!rf.includes(e.type))return t0(e);if("hidden"===e.type){let t=e.value.trim();if(!t.length||t.length>320||rm.includes(t)||!e.matches('[name*="user" i],[id*="user" i],[name*="login" i],[id*="login" i],[name*="email" i],[id*="email" i],[name*="identifier" i],[id*="identifier" i]'))return t0(e)}}})})(e),(e=>{let t,r=i5(e),n=e=>e.filter(e=>!r.some(t=>t.contains(e))&&nj(e)),i=n(Array.from(e.querySelectorAll(tv)).filter(e=>ri(e)&&"hidden"!==e.getAttribute("type"))),o=i.filter(e=>e.matches(tN));if(0===o.length||o.length>50)return;let a=Array.from(e.querySelectorAll(t_)).filter(e=>e!==document.body),s=(t=[],o.map(e=>tK(e,t,20)).filter(e=>!!(e&&e!==document.body))),l=tj(a.filter(e=>!s.some(t=>e.contains(t))).concat(s)),u=tB(i,n(Array.from(document.querySelectorAll(tS)).filter(i0)),n(Array.from(e.querySelectorAll("iframe")).filter(nF)));if(u.length>50)return;let c=new WeakMap(u.map(e=>[e,l.find(t=>t.contains(e))]));return tj(ok(u,1,(e,t)=>{if(e.parentElement===t.parentElement)return 0;let r=c.get(e),n=c.get(t);return r!==n?Number.MAX_SAFE_INTEGER:r&&r===n||((e,t)=>{let r=oB(e),n=oB(t),i=275/(r.isField&&n.isField?2:1),{dx:o,dy:a}=tq(r.rect,n.rect),s=Math.abs(r.rect.left/n.rect.left),l=Math.abs(r.rect.top/n.rect.top),u=s>.95&&s<1.05,c=l>.95&&l<1.05;return!!u&&!!c||!!u&&a<i||!!c&&o<50||o<50&&a<i})(e,t)?0:Number.MAX_SAFE_INTEGER}).map(e=>{let t;return 1===e.length?tU(t=e[0],5)((e,r)=>"HTML"!==e.tagName&&(r===t||0===r.querySelectorAll(tx).length)):e.reduce(tz)}).filter(e=>(!oD()||document.body!==e)&&e.querySelectorAll(tN).length>0)).forEach(tV),oU.cache=new WeakMap})(e)},oG=[tf(td("form").when(e=>iU(e).noop),td(x.NOOP),{}),...iD("form-candidate",x.NOOP,()=>()=>!0)],oH=()=>{Object.keys(nP).forEach(e=>delete nP[e]),nz.clear(),nz.clear()};r(81445);let o$=({shareId:e,itemId:t})=>((...e)=>e.join("::"))(e,t),oY=e=>"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE&&"tagName"in e,oq=e=>oY(e)&&"INPUT"===e.tagName,oj=["text","email","number","tel","password"],oz=e=>oY(e)&&"FORM"===e.tagName,oK={[L.CSC]:ea("verificationNumber"),[L.EXP_MONTH]:({expirationDate:e},t)=>{if(e){let r,n,[,i]=e.split("-"),o=oq(t)?(r=ig(t),ia.some(e=>r.includes(e))?{padding:!0}:{padding:2===t.minLength||2===t.maxLength}):(n=ih(t)).some(e=>/^0[1-9]$/.test(e))?{padding:!0}:n.some(e=>/^([1-9]|1[0-2])$/.test(e))?{padding:!1}:void 0;if(o)return parseInt(i,10).toString().padStart(o.padding?2:1,"0")}},[L.EXP_YEAR]:({expirationDate:e},t)=>{if(e){let[r]=e.split("-"),n=(()=>{let e;if(oq(t)){if(4===t.minLength)return{fullYear:!0};let e=ig(t);for(let t of io)if(e.includes(t))return{fullYear:4===t.length};return{fullYear:!1}}return(e=ih(t)).some(e=>/^\d{4}$/.test(e))?{fullYear:!0}:e.some(e=>/^\d{2}$/.test(e))?{fullYear:!1}:void 0})();if(n)return n.fullYear?r:r.slice(-2)}},[L.EXP]:({expirationDate:e},t)=>{if(e&&oq(t)){let[r,n]=e.split("-"),i=((e,t=!0)=>{if(e instanceof HTMLInputElement){let r=e.maxLength>=4,n=e.pattern&&(-1===e.maxLength||r);return(e=>{let t=ig(e);for(let e of il)for(let r of io)for(let n of[!0,!1])if(t.includes(n?`MM${e}${r}`:`${r}${e}MM`))return{separator:e,fullYear:4===r.length,monthFirst:n}})(e)||n&&(e=>{try{let t=RegExp(`^${e}$`);for(let e of ic)for(let r of il){let n=ip({...e,separator:r});if(t.test(n))return{separator:r,fullYear:e.fullYear,monthFirst:e.monthFirst}}}catch{}})(e.pattern)||r&&id[e.maxLength]||(t?iu:void 0)}})(t);if(i)return((e,t,{fullYear:r,separator:n,monthFirst:i})=>{let o=r?t.slice(0,4):t.slice(-2),a=e.padStart(2,"0");return(i?[a,o]:[o,a]).join(n)})(n,r,i)}},[L.FIRSTNAME]:eu(ea("cardholderName"),eb,e=>e?.[0]),[L.LASTNAME]:eu(ea("cardholderName"),eb,es),[L.NAME]:ea("cardholderName"),[L.NUMBER]:ea("number")},oV=async(e,t)=>(await eA(e,async(e,r)=>{let n=e.fieldSubType;if(!n||r.includes(n))return;let i=oK[n](t.data,e.element)||(e.autofilled===F.CREDIT_CARD?"":void 0);if(void 0!==i){let r=n===L.NUMBER;return e.fieldSubType===L.NUMBER&&e.autofilledItemKey&&e.autofilledItemKey===o$(t)&&e.element.value.replace(/[\s-]/g,"").slice(-4)===i.slice(-4)||await e.autofill(i,{itemKey:o$(t),maskedInput:r}),n}})).filter(ef);var oQ=((E={}).ACCOUNT_EXTENSION="auth-ext",E.ACCOUNT_FORK="fork",E.ACCOUNT_ONBOARDING="pass-onboarding",E.ACCOUNT_PROBE="pass-installed",E.ALIAS_CREATE="ALIAS_CREATE",E.ALIAS_OPTIONS="ALIAS_OPTIONS",E.AUTH_CHECK="AUTH_CHECK",E.AUTH_CONFIRM_PASSWORD="AUTH_CONFIRM_PASSWORD",E.AUTH_INIT="AUTH_INIT",E.AUTH_PULL_FORK="AUTH_PULL_FORK",E.AUTH_UNLOCK="AUTH_UNLOCK",E.AUTOFILL_CC="AUTOFILL_CC",E.AUTOFILL_CC_QUERY="AUTOFILL_CC_QUERY",E.AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",E.AUTOFILL_IDENTITY_QUERY="AUTOFILL_IDENTITY_QUERY",E.AUTOFILL_LOGIN="AUTOFILL_LOGIN",E.AUTOFILL_LOGIN_QUERY="AUTOFILL_LOGIN_QUERY",E.AUTOFILL_OTP_CHECK="AUTOFILL_OTP_CHECK",E.AUTOFILL_SEQUENCE="AUTOFILL_SEQUENCE",E.AUTOFILL_SYNC="AUTOFILL_SYNC",E.AUTOSAVE_REQUEST="AUTOSAVE_REQUEST",E.AUTOSUGGEST_PASSWORD="AUTOSUGGEST_PASSWORD",E.B2B_EVENT="B2B_EVENT",E.CLIENT_INIT="CLIENT_INIT",E.CLIPBOARD_AUTOCLEAR="CLIPBOARD_AUTOCLEAR",E.CLIPBOARD_OFFSCREEN_READ="CLIPBOARD_OFFSCREEN_READ",E.CLIPBOARD_OFFSCREEN_WRITE="CLIPBOARD_OFFSCREEN_WRITE",E.DEBUG="DEBUG",E.ENDPOINT_INIT="ENDPOINT_INIT",E.FEATURE_FLAGS_UPDATE="FEATURE_FLAGS_UPDATE",E.FETCH_ABORT="FETCH_ABORT",E.FETCH_DOMAINIMAGE="FETCH_DOMAINIMAGE",E.FORM_ENTRY_COMMIT="FORM_ENTRY_COMMIT",E.FORM_ENTRY_REQUEST="FORM_ENTRY_REQUEST",E.FORM_ENTRY_STAGE="FORM_ENTRY_STAGE",E.FORM_ENTRY_STASH="FORM_ENTRY_STASH",E.FORM_STATUS="FORM_STATUS",E.FS_WRITE="FS_WRITE",E.FS_ERROR="FS_ERROR",E.INLINE_DROPDOWN_ATTACH="INLINE_DROPDOWN_ATTACH",E.INLINE_DROPDOWN_CLOSE="INLINE_DROPDOWN_CLOSE",E.INLINE_DROPDOWN_CLOSED="INLINE_DROPDOWN_CLOSED",E.INLINE_DROPDOWN_OPENED="INLINE_DROPDOWN_OPENED",E.INLINE_DROPDOWN_STATE="INLINE_DROPDOWN_STATE",E.INLINE_DROPDOWN_TOGGLE="INLINE_DROPDOWN_TOGGLE",E.INLINE_ICON_SHIFT="INLINE_ICON_SHIFT",E.INLINE_ICON_ATTACHED="INLINE_ICON_ATTACHED",E.FRAME_DEFERRED_INIT="FRAME_DEFERRED_INIT",E.FRAME_FIELD_LOCK="FRAME_FIELD_LOCK",E.FRAME_FORM_CLUSTER="FRAME_FORM_CLUSTER",E.FRAME_FORMS_QUERY="FRAME_FORMS_QUERY",E.FRAME_QUERY="FRAME_QUERY",E.FRAME_VISIBILITY="FRAME_VISIBILITY",E.LOAD_CONTENT_SCRIPT="LOAD_CONTENT_SCRIPT",E.LOCALE_UPDATED="LOCALE_UPDATED",E.LOG_EVENT="LOG_EVENT",E.LOG_REQUEST="LOG_REQUEST",E.MONITOR_2FAS="MONITOR_2FAS",E.MONITOR_WEAK_PASSWORDS="MONITOR_WEAK_PASSWORDS",E.NOTIFICATION="NOTIFICATION",E.OTP_CODE_GENERATE="OTP_CODE_GENERATE",E.PASS_CORE_RPC="PASS_CORE_RPC",E.PASSKEY_CREATE="PASSKEY_CREATE",E.PASSKEY_GET="PASSKEY_GET",E.PASSKEY_INTERCEPT="PASSKEY_INTERCEPT",E.PASSKEY_QUERY="PASSKEY_QUERY",E.PAUSE_WEBSITE="PAUSE_WEBSITE",E.PERMISSIONS_UPDATE="PERMISSIONS_UPDATE",E.PING="PING",E.POPUP_INIT="POPUP_INIT",E.PORT_FORWARDING_MESSAGE="PORT_FORWARDING",E.PORT_UNAUTHORIZED="PORT_UNAUTHORIZED",E.REGISTER_ELEMENTS="REGISTER_ELEMENTS",E.REGISTER_ELEMENTS_FALLBACK="REGISTER_ELEMENTS_FALLBACK",E.RESOLVE_EXTENSION_KEY="RESOLVE_EXTENSION_KEY",E.RESOLVE_USER="RESOLVE_USER",E.SENTRY_CS_EVENT="SENTRY_CS_EVENT",E.SETTINGS_UPDATE="SETTINGS_UPDATE",E.SPOTLIGHT_ACK="SPOTLIGHT_ACK",E.SPOTLIGHT_CHECK="SPOTLIGHT_CHECK",E.SPOTLIGHT_REQUEST="SPOTLIGHT_REQUEST",E.STORE_DISPATCH="STORE_DISPATCH",E.TELEMETRY_EVENT="TELEMETRY_EVENT",E.UNLOAD_CONTENT_SCRIPT="UNLOAD_CONTENT_SCRIPT",E.UPDATE_AVAILABLE="UPDATE_AVAILABLE",E.VAULTS_QUERY="VAULTS_QUERY",E.WEBSITE_RULES_REQUEST="WEBSITE_RULES_REQUEST",E.WORKER_RELOAD="WORKER_RELOAD",E.WORKER_STATE_CHANGE="WORKER_STATE_CHANGE",E);class oX extends Error{name="CriticalMessageResponseError";message="Worker failed to respond"}let oZ=async e=>{try{let t=await Q.runtime.sendMessage(Q.runtime.id,e);if(void 0===t)throw new oX;return t}catch(e){return{type:"error",error:e instanceof Error?e.message:"Unknown error",critical:e instanceof oX}}};oZ.on=async(e,t)=>t(await oZ(e)),oZ.onSuccess=async(e,t)=>oZ.on(e,e=>{"success"===e.type&&t(e)});let oJ=e=>t=>({...t,sender:e,version:"1.35.0"});oJ("background"),oJ("popup"),oJ("page");let o0=oJ("contentscript");oJ("offscreen");var o1=((v={}).AutofillDisplay="autofill.display",v.AutofillTriggered="autofill.triggered",v.AutosaveDismissed="autosave.dismissed",v.AutosaveDisplay="autosave.display",v.AutosaveDone="autosave.done",v.AutosuggestAliasCreated="autosuggest.alias_created",v.ErrorResumingSession="error.resuming_session",v.ExtensionCopiedFromLogin="extension.copied_from_login",v.ExtensionUsed="extension.used",v.ImportCompletion="import.complete",v.ItemCreation="item.creation",v.ItemDeletion="item.deletion",v.ItemRead="item.read",v.ItemUpdate="item.update",v.PasskeyAuthSuccess="passkey.auth_done",v.PasskeyCreated="passkey.create_done",v.PasskeyCreateDisplay="passkey.create_prompt_display",v.PasskeysSuggestionsDisplay="passkey.display_suggestions",v.PassFileUploaded="pass_file_attachment.file_uploaded",v.PassMonitorAddCustomEmailFromSuggestion="pass_monitor.add_custom_email_from_suggestion",v.PassMonitorDisplayDarkWebMonitoring="pass_monitor.display_dark_web_monitoring",v.PassMonitorDisplayExcludedItems="pass_monitor.display_excluded_items",v.PassMonitorDisplayHome="pass_monitor.display_home",v.PassMonitorDisplayMissing2FA="pass_monitor.display_missing_2fa",v.PassMonitorDisplayMonitoringEmailAliases="pass_monitor.display_monitoring_email_aliases",v.PassMonitorDisplayMonitoringProtonAddresses="pass_monitor.display_monitoring_proton_addresses",v.PassMonitorDisplayReusedPasswords="pass_monitor.display_reused_passwords",v.PassMonitorDisplayWeakPasswords="pass_monitor.display_weak_passwords",v.PassMonitorItemDetailFromMissing2FA="pass_monitor.item_detail_from_missing_2fa",v.PassMonitorItemDetailFromReusedPassword="pass_monitor.item_detail_from_reused_password",v.PassMonitorItemDetailFromWeakPassword="pass_monitor.item_detail_from_weak_password",v.PassNotificationChangeStatus="pass_notifications.change_notification_status",v.PassNotificationCTAClick="pass_notifications.notification_cta_click",v.PassNotificationDisplay="pass_notifications.display_notification",v.SearchClick="search.click",v.SearchTriggered="search.triggered",v.TwoFAAutofill="2fa.autofill",v.TwoFACreation="2fa.creation",v.TwoFADisplay="2fa.display",v.TwoFAUpdate="2fa.update",v);o1.ExtensionCopiedFromLogin,o1.AutosaveDismissed,o1.ExtensionUsed;let o2=(e,t,r,n,i)=>oZ(o0({type:oQ.TELEMETRY_EVENT,payload:{event:((e,t,r,n="any")=>({MeasurementGroup:`pass.${n}.user_actions`,Event:e,Values:t,Dimensions:r}))(e,t,r,n),extra:i}})).catch(p);function o5(e,t){function r(...n){if(t){let r=t(...n);if(!r)throw Error(ae(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=t=>(function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)})(t)&&"type"in t&&"string"==typeof t.type&&t.type===e,r}"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__,"u">typeof window&&window.__REDUX_DEVTOOLS_EXTENSION__&&window.__REDUX_DEVTOOLS_EXTENSION__,class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};var o4=((C=o4||{}).reducer="reducer",C.reducerWithPrepare="reducerWithPrepare",C.asyncThunk="asyncThunk",C),{assign:o3}=Object,o8="listenerMiddleware",o6=o3(e=>{let{type:t,predicate:r,effect:n}=(e=>{let{type:t,actionCreator:r,matcher:n,predicate:i,effect:o}=e;if(t)i=o5(t).match;else if(r)t=r.type,i=r.match;else if(n)i=n;else if(i);else throw Error(ae(21));if("function"!=typeof o)throw TypeError(ae(32));return{predicate:i,type:t,effect:o}})(e);return{id:((e=21)=>{let t="",r=e;for(;r--;)t+="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW"[64*Math.random()|0];return t})(),effect:n,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw Error(ae(22))}}},{withTypes:()=>o6}),o7=o3(o5(`${o8}/add`),{withTypes:()=>o7}),o9=o3(o5(`${o8}/remove`),{withTypes:()=>o9});function ae(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}Symbol.for("rtk-state-proxy-original");let at=e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,ar=(e,t,r={excludeEmpty:!1})=>{if(e===t)return e;let n=Object.keys(t);return(r.excludeEmpty?n.filter(e=>{let r;return!(null==(r=t[e])||""===r||"number"==typeof r&&Number.isNaN(r))}):n).reduce((n,i)=>({...n,[i]:at(e[i])&&at(t[i])?ar(e[i],t[i],r):t[i]}),e)},an=e=>t=>ar(t,{meta:e}),ai=an({cache:!0});an({throttle:!0,cache:!0});let ao=an({settings:!0}),aa=o5("password::save",e=>ai({payload:e}));o5("password::delete",e=>ai({payload:e})),o5("password::history::clear",()=>ai({payload:{}})),o5("password::history::gc"),o5("password::options::edit",e=>eu(ai,ao)({payload:e}));let as=e=>e?.[0],al=1e3/24,au=e=>{setTimeout(e,0)},ac=e=>(...t)=>au(()=>e(...t)),ad=["domain","port","protocol"];RegExp("^(file:|javascript:|data:|chrome-extension:|chrome:|brave:|edge:|moz-extension:|about:)","i");let am=(e,t=[])=>{let r={...e};for(let e=0;e<t.length;++e)delete r[t[e]];return r},ap=(e,t)=>eg(async()=>t[e]=t[e]??await oZ.on(o0({type:{credentials:oQ.AUTOFILL_LOGIN_QUERY,identities:oQ.AUTOFILL_IDENTITY_QUERY,creditCards:oQ.AUTOFILL_CC_QUERY}[e],payload:{}}),e=>"success"===e.type?e.items.length:0));var af=r(26562),ag=r.n(af),ah=((T={})[T.STAGING=0]="STAGING",T[T.COMMITTED=1]="COMMITTED",T);let aA=e=>oZ(o0({type:oQ.FORM_ENTRY_STASH,payload:{reason:e}})),ay=(e,t)=>{let r=e.userIdentifier.trim(),n=e.password.trim();switch(t.type){case"login":case"register":return!!(t.partial&&r||n);case"password-change":case"noop":return!!n;default:return!1}},ab=new Set(["PICTURE","VIDEO","AUDIO","BUTTON","A","SCRIPT","NOSCRIPT","LINK","OBJECT","IFRAME","svg","g"]),aw=new Set(["button","link","menuitem","checkbox","radio","switch"]),aE=ed(ec(t2,tJ)),av=ec(((...e)=>t=>e.every(e=>e(t)))(e=>oq(e)&&oj.includes(e.type),aE),tQ),aC=e=>i2(e).some(av),aT=ec(e=>i5(e).some(ec(aE,tQ)),aC),a_=e=>!(!oY(e)||0===e.childElementCount||e.role&&aw.has(e.role))&&!ab.has(e.tagName),aR=e=>t=>oq(t)||oz(t)||oY(t)&&e(t),aI=aR(a_),aS=aR(aC),aO=aR(e=>null!==e.querySelector("form, input")),aN=(e,[t,...r])=>{let n=rd(e,t);return n?r.reduce((e,t)=>null===e?null:rd(e,t),n):null},{DOCUMENT_POSITION_FOLLOWING:ax,DOCUMENT_POSITION_PRECEDING:aF,DOCUMENT_POSITION_CONTAINS:aP,DOCUMENT_POSITION_CONTAINED_BY:aL}=Node,aD=e=>new Promise(t=>setTimeout(t,e)),aM=function(e,t=[],r=[],n=()=>{}){return new tb(e,t,r,n)}((e=[oi,oc,oa,ol,oN,oP,op,oT,oI,ow].reduce((e,t)=>({rules:[...e.rules,...t.getRules()],coeffs:[...e.coeffs,...t.coeffs],biases:[...e.biases,[t.name,t.bias]]}),{rules:[tf(new e7(tO),td("form-candidate"),{}),tf(new e7("input, select"),td("field-candidate"),{}),...nX,tf(td("form-candidate").when(ik(ri)),td("form-element"),{}),tf(td("form-element").when(ik(nq)),td("form").note(ot),{}),tf(td("form-element"),tl("form").through(i_),{}),...oG,tf(td("field-candidate").when(e=>"INPUT"===e.element.tagName&&ri(e.element)&&null!==iF(e)),td("field").note(e=>{let t=e.element,r=ie(t),n=iF(e);null===n||n.hasNoteFor("form")||n.setNoteFor("form",ot(n));let i=n?.noteFor("form"),o=iU(n),a=t.value,s=t.getAttribute("type"),l=t.readOnly,u=t.required,c=t.getAttribute("minlength"),d=t.getAttribute("maxlength"),m=t.pattern,p=t.getAttribute("autocomplete")?.trim().toLowerCase(),f=t.disabled,g="hidden"!==s,h=t.tabIndex,A=!!g&&nj(t)&&nH(t,{opacity:!1});g&&(A?e=>delete e.__PP_HIDDEN__:tX)(t);let y=A&&tD(rZ)(r.fieldAttrs.concat(r.fieldText)),b=((e,{visible:t})=>{if(iE(e))return!0;if(!t)return!1;let r=iv(e);return r&&t6(e,r),void 0!==r})(t,{visible:A}),w=!b&&((e,{visible:t})=>{if(!t)return!1;if(i7(e))return!0;let r=i9(e);return!!r&&(t6(e,r),!0)})(t,{visible:A,form:o,searchField:y,type:s}),E=g?i?.formInputIterator.prev(t,"INPUT")??null:null,v=g?i?.formInputIterator.prev(t)??null:null,C=g?i?.formInputIterator.next(t)??null:null;return{formFnode:n,formFeatures:i,isFormLogin:o.login,isFormRegister:o.register,isFormPWChange:o.pwChange,isFormRecovery:o.recovery,isFormNoop:o.noop,isIdentity:w,isCC:b,value:a,visible:A,type:s,readonly:l,required:u,disabled:f,pattern:m,autocomplete:p,minLength:c,maxLength:d,tabIndex:h,prevInput:E,prevField:v,nextField:C,searchField:y,...r}}),{}),...of,...oL,tf(td("field").when(iK),td("username-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,fieldText:i,labelText:o,prevInput:a,isFormLogin:s}=r,{autocomplete:l}=r,u=tD(rU)(n),c=rk(i),d=rk(o),m=u||c||d,p=t.matches(tC)||tD(rG)(n.concat(i,o)),f=tD(rW)(n),g=rW(i),h=rW(o),A=!m&&p,y=void 0!==l&&("off"===l||"false"===l),b=!!l?.includes("email");return{autocompleteUsername:Number(!p&&!!(l?.includes("username")||l?.includes("nickname"))),autocompleteEmail:Number(b),autocompleteOff:Number(y),firstLoginFormField:Number(s&&null===a&&!(f||g||h||A||m)),attrUsername:Number(u),textUsername:Number(c),labelUsername:Number(d),outlierText:Number(g),outlierAttrs:Number(f),outlierLabel:Number(h),outlierEmail:Number(A),searchField:Number(r.searchField)}}),{}),tf(td("field").when(iV),td("username-hidden-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,autocomplete:i,value:o}=r,a="hidden"===t.type,s=t.readOnly&&!a&&nH(t,{opacity:!0}),l=tD(rU)(n),u=tD(rG)(n),c=t.matches('[name="username"],[id="username"],[name="account"]'),d=!!i?.includes("username"),m=!!i?.includes("email"),p=!!i?.includes("account"),f=o.length<100,g=f&&rH(o),h=f&&rY(o),A=f&&rB(o);return{exotic:Number(r.isFormNoop),visibleReadonly:Number(s),attrUsername:Number(l),attrEmail:Number(u),attrMatch:Number(c),autocompleteUsername:Number(d),autocompleteEmail:Number(m),autocompleteAccount:Number(p),valueEmail:Number(g),valueTel:Number(h),valueUsername:Number(A)}}),{}),tf(td("field").when(iq),td("email-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,fieldText:i,labelText:o}=r,a=r.autocomplete,s="email"===r.type,l=t.matches(tC),u="one-time-code"===a||tD(no)(n),c=tD(rG)(n),d=r$(i),m=r$(o),p=t.placeholder,f=tD(rH)(p.split(" "))||r$(nN(t.placeholder,"\\[\\]"));return{autocompleteEmail:Number(a?.includes("email")??!1),autocompleteOff:Number("false"===a||"off"===a),typeEmail:Number(s),exactAttrEmail:Number(l),attrEmail:Number(c),textEmail:Number(d),labelEmail:Number(m),placeholderEmail:Number(f),searchField:Number(r.searchField),mfaOutlier:Number(u)}}),{}),tf(td("field").when(ij),td("password-field").note(e=>{let t=e.noteFor("field"),{fieldAttrs:r,fieldText:n,labelText:i,prevField:o,nextField:a,isCC:s,isIdentity:l}=t,u=tD(r6)(r.concat(i,n)),c=tD(r8)(r),d=r3(n),m=r3(i),p=tD(r2)(r),f=r1(n),g=r1(i),h=tD(r4)(r),A=r5(n),y=r5(i),b=tD(r0)(r),w=rJ(n),E=rJ(i),v=p||f||g||h||A||y||b||w||E,C=s||l||u?"":t.autocomplete,T=o&&"password"===o.getAttribute("type")?o:null,_=a&&"password"===a.getAttribute("type")?a:null,R=T?it(T):[],I=_?it(_):[],S=T?.getAttribute("autocomplete"),O="current-password"===S||tD(r3)(R),N="new-password"===S||tD(r1)(R),x=_?.getAttribute("autocomplete"),F="current-password"===x||tD(r3)(I),P="new-password"===x||tD(r1)(I),L=tD(r5)(I);return{loginScore:Number(t.isFormLogin),registerScore:Number(t.isFormRegister),exotic:Number(t.isFormNoop),maybeNew:Number(v),maybeCurrent:Number(c||d||m),autocompleteNew:Number("new-password"===C),autocompleteCurrent:Number("current-password"===C),autocompleteOTP:Number(C?.includes("one-time-code")??!1),autocompleteOff:Number("off"===t.autocomplete),isOnlyPassword:t.formFeatures?.onePassword??0,prevPwField:Number(null!==T),nextPwField:Number(null!==_),attrCreate:Number(p),attrCurrent:Number(c),attrConfirm:Number(h),attrReset:Number(b),textCreate:Number(f),textCurrent:Number(d),textConfirm:Number(A),labelCreate:Number(g),labelCurrent:Number(m),labelConfirm:Number(y),passwordOutlier:Number(u),prevPwNew:Number(N),prevPwCurrent:Number(O),nextPwNew:Number(P),nextPwCurrent:Number(F),nextPwConfirm:Number(L)}}),{}),tf(td("field").when(iz),td("otp-field").note(e=>{let t=e.element,r=e.noteFor("field"),{fieldAttrs:n,fieldText:i,labelText:o,prevField:a,nextField:s,type:l,maxLength:u,searchField:c}=r,d=r?.formFnode?.element,m=r.formFeatures,p=m?.searchForm===1,f=m?.formComplexity??0,g=!!m?.formMFA,h=!!m?.formTextAuthenticator,A=!!m?.formOTPOutlier,y=!!m?.linkOTPOutlier,b=m?.formInputMFACandidates??0,w=!!m?.headingsOTPOutlier,E="numeric"===t.inputMode,v=!E&&rp.some(e=>t.pattern?.trim()===e),C=["code","token","otp","otc","totp"],T=C.some(e=>t.name===e),_=C.some(e=>t.id===e),R=r.autocomplete,I=void 0!==R&&("off"===R||"false"===R),S=u?parseInt(u,10):null,O=tW(t),N=oh(a,{type:l,rect:O}),x=oh(s,{type:l,rect:O}),F=tD(ne)(n),P=tD(r9)(n),L=tD(nr)(n),D=ne(i),M=r9(i),k=ni(i),U=ne(o),B=r9(o),W=ni(o),G=nr(o),H=g||B||M||P||F||D||U,$=!!(S&&(S>20||S>1&&S<5)),Y=H?(d?.innerText??"").match(/[a-z0-9*._-]@/gi)?.length??0:0,q=H&&void 0!==R&&!I&&!R?.includes("one-time-code"),j=L||G||/\:\/\//.test(t.placeholder);return{outlierForm:Number(A),outlierField:Number(j),outlierSearch:Number(c||p),outlierLink:Number(y),outlierHeadings:Number(w),outlierAutocomplete:Number(q),outlierEmailMatch:og(Y,0,2),outlierInputCount:Number(1!==b&&6!==b&&5!==b),outlierMaxLength:Number($),formComplexity:f,nameMatch:Number(T),idMatch:Number(_),numericMode:Number(E),patternOTP:Number(v),autocompleteOTC:Number(r.autocomplete?.includes("one-time-code")??!1),singleInput:Number(1===b),siblingOfInterest:Number(N||x),attrOTP:Number(F),textOTP:Number(D),labelOTP:Number(U),formMFA:Number(g),attrMFA:Number(P),textMFA:Number(M),labelMFA:Number(B),formAuthenticator:Number(h),textAuthenticator:Number(k),labelAuthenticator:Number(W)}}),{}),tf(td("field"),tl("field").through(iR),{})],coeffs:[],biases:[]})).rules,e.coeffs,e.biases,oW),ak=document.createElement("form"),aU=(e,t)=>(e.get(t.type),Array.from(t.subTypes.reduce((r,n)=>(e.get(n).forEach(e=>{let i=iL(e,n),o={type:n,fnode:e,score:i},a=r.get(e);a?r.set(e,t.selectBest([o,a])):r.set(e,o)}),r),new Map).values())),aB=([e,t])=>e.score>t.score?e:t,aW=e=>{let t=e.find(({type:e})=>e===x.PASSWORD_CHANGE),r=e.find(({type:e})=>e===x.LOGIN),n=e.find(({type:e})=>e===x.REGISTER),i=Math.abs(e[0].score-e[1].score);return t&&n?i<=.01?t:n:r||aB(e)};var aG=r(55377),aH=r.n(aG);let a$=(e,t)=>{let r=0,{width:n,height:i,src:o,name:a,title:s,ariaLabel:l}=e;return o&&t.src===o&&(r+=1.5),a&&t.name===a&&r++,s&&t.title===s&&r++,l&&t.ariaLabel===l&&r++,n&&4>Math.abs((t.width??0)-n)&&r++,i&&4>Math.abs((t.height??0)-i)&&r++,a&&(a===t.title||a===t.ariaLabel)&&(r+=.5),s&&(s===t.name||s===t.ariaLabel)&&(r+=.5),l&&(l===t.title||l===t.name)&&(r+=.5),r},aY=e=>{let t=getComputedStyle(e),r=(r,n)=>{let i=t.getPropertyValue(r);return n?.(i,e)??i};return r.node=e,r},aq=e=>parseInt(e.replace("px",""),10),aj=e=>`${Math.round(e)}px`,az=e=>t=>t(`padding-${e}`,aq)+t(`border-${e}-width`,aq),aK=az("top"),aV=az("bottom"),aQ=az("left"),aX=az("right"),aZ=(e,t)=>"auto"!==e&&e?aq(e):t.offsetHeight,aJ=(e,t)=>{let r="content-box"===e("box-sizing"),n=e("height",aZ),i=aK(e),o=aV(e),a=i+o;return{value:r?n+("outer"===t?a:0):n-("inner"===t?a:0),offset:{top:"outer"===t?0:i,bottom:"outer"===t?0:o}}},a0=(e,t)=>{let r="content-box"===e("box-sizing"),n=e("width",aZ),i=aQ(e),o=aX(e),a=i+o;return{value:r?n+("outer"===t?a:0):n-("inner"===t?a:0),offset:{left:"outer"===t?0:i,right:"outer"===t?0:o}}},a1=(e,t)=>{let r,n=t.cache??{key:(...e)=>JSON.stringify(e),get:(r=new Map).get.bind(r),set:r.set.bind(r),delete:r.delete.bind(r),clear:r.clear.bind(r)},i=r=>(...i)=>{let o=new Date().getTime(),a=n.key(...i),s=n.get(a);if(s?.validUntil&&o>=s.validUntil&&(n.delete(a),s=void 0),!r&&s)return s.result;{let r=e(...i);return r instanceof Promise&&r.catch(()=>n.delete(a)),n.set(a,{validUntil:o+t.maxAge,result:r}),r}},o=i();return o.flush=i(!0),o.clear=()=>n.clear(),o},a2=U(e=>{let t=e?.getExtensionContext()?.frameId;if(void 0===t)throw Error("Unknown frameID");return t}),a5=e=>{let t=e.getAttribute("src")??"",r=e.getAttribute("name")??"",n=e.getAttribute("title")??"",i=e.getAttribute("aria-label")??"",o=aY(e);return{src:t,name:r,title:n,ariaLabel:i,width:a0(o,"inner").value,height:aJ(o,"inner").value}},a4=()=>{let e=document.documentElement;return d()?{}:{src:location.href,name:window.name,width:e.clientWidth,height:e.clientHeight,ariaLabel:document.querySelector("[aria-label]")?.ariaLabel??void 0,title:document.title||document.head.title||document.head.getAttribute("title")||document.head?.querySelector("title")?.textContent||(document.querySelector("[title]")?.getAttribute("title")??void 0)}},a3=(e,t)=>e<40||t<15,a8=(e,t)=>{let r,n=document.getElementsByTagName("iframe"),i=-1;for(let e of n){let n=a$(t,a5(e));n>0&&n>i&&(i=n,r=e)}return r},a6=a1(eg(async()=>{try{return await oZ.on(o0({type:oQ.FRAME_VISIBILITY,payload:a4()}),e=>"success"===e.type&&e.visible)}catch{return!1}}),{maxAge:500}),a7=a1(e=>{let t=e.getBoundingClientRect();return!a3(t.width,t.height)&&nH(e,{opacity:!1,skipCache:!0})},{maxAge:500,cache:(_=function(e){return e},i=new WeakMap,{key:_,get:e=>i.get(e),set:(e,t)=>i.set(e,t),delete:e=>i.delete(e),clear:()=>{i=new WeakMap}})}),a9=async e=>{if("visible"!==document.visibilityState)return!1;if(e)return!0;let{childElementCount:t,clientHeight:r,clientWidth:n}=document.documentElement;return!(0===t||a3(n,r))&&null!==document.querySelector("input, select, iframe")&&a6.flush()},se=(e=document)=>{let t=e=>{let r=e.activeElement;return r?r.shadowRoot?t(r.shadowRoot):r:null};return t(e)},st=e=>!!(e&&document.hasFocus())&&e===se(),sr=e=>e.fieldType===F.CREDIT_CARD&&void 0!==e.fieldSubType,sn=["disabled","aria-disabled","aria-busy","readonly"],si=e=>sn.some(t=>e.hasAttribute(t)&&"false"!==e.getAttribute(t)),so=e=>{let t=e.parentElement;return!!t&&(si(t)||so(t))},sa=e=>{if(e.assignedSlot)return e.assignedSlot;if(e.parentElement)return e.parentElement;let t=e.getRootNode();if(t!==document.ownerDocument){let{host:e}=t;return e}return null},ss=(e,t)=>{if(0===t)return e;let r=sa(e);return r?ss(r,t-1):e},sl=e=>{if(e===document.body||!e)return document.body;let t=getComputedStyle(e);return"auto"===t.overflowY||"scroll"===t.overflowY?e:sl(sa(e))},su=(e,t)=>{let{zIndex:r}=t??getComputedStyle(e),n=parseInt(r,10);return isNaN(n)?0:n},sc=e=>{let t=getComputedStyle(e);return[((e,t)=>{let r=e.parentElement,{zIndex:n,position:i,containerType:o}=t??getComputedStyle(e),a=""!==n&&"auto"!==n;if(null===r||a&&("absolute"===i||"relative"===i)||"fixed"===i||"sticky"===i||"size"===o||"inline-size"===o)return!0;let{display:s}=getComputedStyle(r);return!!a&&("flex"===s||"grid"===s)})(e,t),su(e,t)]},sd=()=>{let e=[],t=e=>e?.cancel?.();return{addListener:(t,r,n,i)=>{if(void 0!==t){let o={kind:"listener",element:t,type:r,fn:n,options:i},a=()=>{let t=e.indexOf(o);-1!==t&&e.splice(t,1)};return o.fn=i?.once?eu(n,a):n,e.push(o),t.addEventListener(r,o.fn,i),()=>{t.removeEventListener(r,o.fn,i),a()}}return p},addObserver:(r,n,i)=>{let o=new MutationObserver(n),a=o.disconnect;return o.disconnect=()=>{t(n),a.bind(o)()},e.push({kind:"observer",observer:o}),o.observe(r,i),o},addResizeObserver:(r,n,i)=>{let o,a,s=i?.passive?(o=!1,(a=(...e)=>{o?n(...e):o=!0}).reset=()=>o=!1,a):n,l=new ResizeObserver(s),u=l.disconnect;return l.disconnect=()=>{s?.reset?.(),t(n),u.bind(l)()},e.push({kind:"resizeObserver",observer:l}),l.observe(r),l},addPubsubListener:(t,r)=>{let n=t.subscribe(r);e.push({kind:"pubsub",unsubscribe:n})},addSubscriber:t=>{e.push({kind:"pubsub",unsubscribe:t})},removeAll:()=>{e.forEach(e=>{switch(e.kind){case"observer":case"resizeObserver":return e.observer.disconnect();case"pubsub":return e.unsubscribe();case"listener":return t(e.fn),e.element.removeEventListener(e.type,e.fn,e.options)}}),e.length=0}}},sm=e=>(...t)=>{try{return e?.(...t)}catch{}},sp=e=>async(...t)=>{try{return await e?.(...t)}catch{}},sf=e=>async t=>{await eA(t,async t=>e.dispatchEvent(t)).catch(p)},sg=async e=>{let t=new AbortController,{signal:r}=t;return Promise.race([new Promise(t=>e.addEventListener("blur",()=>t(),{once:!0,signal:r})),aD(250)]).finally(()=>t.abort())},sh=async(e,t)=>{st(e)?await t([new FocusEvent("focusin"),new FocusEvent("focus")]):e.focus({preventScroll:!0})},sA=async(e,t)=>{let r=sg(e);st(e)?e.blur():await t([new FocusEvent("focusout"),new FocusEvent("blur")]),await r},sy=async(e,t,r,n)=>{e.value=t,await n([new KeyboardEvent("keydown",{bubbles:!0}),new KeyboardEvent("keypress",{bubbles:!0}),new KeyboardEvent("keyup",{bubbles:!0})]),r.maskedInput&&await aD(0),e.value!==t&&(e.value=t),await n([new Event("input",{bubbles:!0}),new Event("change",{bubbles:!0})])},sb=async(e,t)=>{let r=new DataTransfer;r.setData("text/plain",e),await t([new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:r})])},sw=async(e,t,r)=>{Array.from(e.options).forEach(e=>e.selected=!1),t.selected=!0,e.value=t.value,await r([new Event("change",{bubbles:!0})])},sE=async(e,t,r={})=>{if(!((e,t)=>{if("number"===e.type){let e=t.trim();return""===e||isFinite(Number(e))}return!0})(e,t))return;let n=sf(e);"function"==typeof e?.click&&e.click(),r?.noFocus||await sh(e,n),r?.paste?await sb(t,n):await sy(e,t,r,n),r?.noFocus||await sA(e,n)},sv=async(e,t)=>{let r=sf(e),n=Array.from(e.options).find(({value:e})=>e.trim().toLocaleLowerCase()===t.trim().toLocaleLowerCase());n&&(await sh(e,r),await sw(e,n,r),await sA(e,r))},sC=250,sT=(e,t)=>e.reduce(([e,r],n)=>{let i,o;if(!e)return[e,r];let a=n.getBoundingClientRect(),{height:s,width:l}=a;if(s<=0||l<=0)return[e,r];let u={top:a.top-t.y,right:a.right+t.x,bottom:a.bottom+t.y,left:a.left-t.x};return null===r?[!0,u]:[e&&(i=Math.max(0,Math.floor(Math.min(u.right,r.right)-Math.max(u.left,r.left))),o=Math.max(0,Math.floor(Math.min(u.bottom,r.bottom)-Math.max(u.top,r.top))),i>0&&o>0),{top:Math.floor(Math.min(r.top,u.top)),right:Math.floor(Math.max(r.right,u.right)),bottom:Math.floor(Math.max(r.bottom,u.bottom)),left:Math.floor(Math.min(r.left,u.left))}]},[!0,null])[0],s_=e=>[...e.childNodes].some(e=>e.nodeType===Node.TEXT_NODE&&e.nodeValue?.trim()!=="")||null!==e.querySelector('[role="alert"]'),sR={x:10,y:0},sI=["TD","TR","FORM"],sS=e=>[...e.children].filter(e=>!e.tagName.startsWith("PROTONPASS")),sO=(e,t)=>{let r,n,i,o,{input:a}=t=t??(()=>{let{height:t,width:r}=e.getBoundingClientRect();return{input:e,layoutShift:!1,minHeight:t,maxWidth:1.25*r}})();if(e===a){let r=getComputedStyle(e),n=aq(r.paddingBottom)+aq(r.paddingTop);if(n>0&&(t.layoutShift=!0,t.minHeight-=n),0!==aq(getComputedStyle(a).borderBottomWidth))return a;let i=a.closest("label");if(i&&1===i.querySelectorAll('input:not([type="hidden"])').length){let e=i.getBoundingClientRect().height>=t.minHeight,r=sT(sS(i),sR);if(e&&r&&!s_(i))return i}}if(n=aq((r=getComputedStyle(e)).marginBottom),i=aq(r.marginTop),n>1||i>1||!((e,t)=>{let r=e===t.input,n=e.parentElement;if(!n||n===document.body||sI.includes(n.tagName))return!1;let{offsetHeight:i}=n,{height:o,width:a}=n.getBoundingClientRect(),{minHeight:s,maxWidth:l}=t;if(!(i&&o)||o<s||a>l||s_(n))return!1;let u=aY(n),c=u("padding-bottom",aq),d=u("padding-top",aq);if(c>1||d>1)if(t.layoutShift)return!1;else t.layoutShift=!0;if(!r){let t=aJ(u,"inner"),r=e.offsetHeight;if(t.value>1.25*r)return!1}return!0})(e,t))return e;let s=e.parentElement;if("none"!==(o=getComputedStyle(s)).boxShadow||[aq(o.borderTopWidth),aq(o.borderRightWidth),aq(o.borderBottomWidth),aq(o.borderLeftWidth)].every(e=>e>0)&&"none"!==o.borderTopStyle&&"none"!==o.borderRightStyle&&"none"!==o.borderBottomStyle&&"none"!==o.borderLeftStyle)return s;let l=sS(s);return 1===l.length||sT(l,sR)?sO(s,t):e};var sN=((R={}).AUTOFILL_ACTION="AUTOFILL_ACTION",R.AUTOFILL_EMAIL="AUTOFILL_EMAIL",R.AUTOFILL_FILTER="AUTOFILL_FILTER",R.AUTOFILL_GENERATED_PW="AUTOFILL_GENERATED_PASSWORD",R.AUTOFILL_IDENTITY="AUTOFILL_IDENTITY",R.AUTOFILL_LOGIN="AUTOFILL_LOGIN",R.AUTOFILL_OTP="AUTOFILL_OTP",R.DROPDOWN_ACTION="DROPDOWN_ACTION",R.DROPDOWN_FOCUS="DROPDOWN_FOCUS",R.DROPDOWN_FOCUSED="DROPDOWN_FOCUSED",R.DROPDOWN_BLURRED="DROPDOWN_BLURRED",R.DROPDOWN_FOCUS_REQUEST="DROPDOWN_FOCUS_REQUEST",R.IFRAME_CLOSE="IFRAME_CLOSE",R.IFRAME_CONNECTED="IFRAME_CONNECTED",R.IFRAME_DIMENSIONS="IFRAME_DIMENSIONS",R.IFRAME_HIDDEN="IFRAME_HIDDEN",R.IFRAME_INIT="IFRAME_INIT",R.IFRAME_INJECT_PORT="IFRAME_INJECT_PORT",R.IFRAME_OPEN="IFRAME_OPEN",R.IFRAME_THEME="IFRAME_THEME",R.NOTIFICATION_ACTION="NOTIFICATION_ACTION",R.PASSKEY_RELAY="PASSKEY_RELAY",R);let sx=aH()(U((e,t)=>{e?.service.inline.dropdown.sendMessage({type:sN.AUTOFILL_FILTER,payload:{startsWith:t}})}),250,{trailing:!0}),sF=U((e,t,r)=>{let n,i,o=sd(),a=(n=null,{cancel:i=()=>{null!==n&&cancelAnimationFrame(n),n=null},request:e=>{i();let t=requestAnimationFrame(()=>e({get cancelled(){return t!==n}}));n=t},get handle(){return n}}),s={focused:!1,timeout:null},l=r=>{s.focused&&(s.timeout&&clearTimeout(s.timeout),sx.cancel(),a.cancel(),s.focused=!1,t.actionPrevented||a.request(ac(async r=>{if(t.actionPrevented||r.cancelled)return;let n=await t.isActive();n&&t.icon?.reposition(),r.cancelled||n||(t.icon?.detach(),e?.service.inline.dropdown.close({type:"field",field:t}))})))},u=r=>{if(s.focused)return;a.cancel(),s.focused=!0;let{action:n}=t;n&&!t.actionPrevented&&a.request(()=>{t.actionPrevented||(s.timeout&&clearTimeout(s.timeout),e?.service.inline.icon.attach(t),e?.service.inline.dropdown.toggle({type:"field",action:n.type,autofocused:!0,autofilled:null!==t.autofilled,field:t}),s.timeout=setTimeout(async()=>{s.focused&&!await t.isActive()&&(z.debug('[FieldTracker] Browser "blur" dequeue detected'),l(r))},al))})},c=U((e,r)=>{[F.PASSWORD_CURRENT,F.PASSWORD_NEW].includes(t.fieldType)||sr(t)&&t.fieldSubType===L.CSC||r.forEach(r=>{let n=r.target;"attributes"===r.type&&r.oldValue!==n.type&&(t.getFormHandle().detachField(r.target),e?.service.formManager.detect({reason:"FieldTypeChange"}))})});if(o.addListener(t.element,"focus",u),o.addListener(t.element,"focusin",u),o.addListener(t.element,"blur",l),o.addListener(t.element,"focusout",l),o.addListener(t.element,"input",r=>{let{action:n}=t,i=t.element.value,o=t.value;(o||!i)&&(!o||i)||t.actionPrevented||(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(()=>t.icon?.reposition(),150)),t.setValue(i),t.actionPrevented||(n?.filterable?sx(i):e?.service.inline.dropdown.close({type:"field",field:t}))}),o.addListener(t.element,"mousedown",u),o.addObserver(t.element,c,{attributeFilter:["type"],attributeOldValue:!0}),e&&o.addSubscriber(e.observer.subscribe(e=>{if("event"===e.type)switch(e.event.type){case"focus":s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(()=>st(t.element)&&u(e.event),al);break;case"blur":s.focused&&l(e.event)}})),r){let{onFieldChange:e,onFormSubmit:n}=r;o.addListener(t.element,"input",e),o.addListener(t.element,"keydown",eu(({key:e})=>"Enter"===e&&n(),e))}return{detach:()=>{s.timeout&&clearTimeout(s.timeout),o.removeAll(),a.cancel()}}}),sP=U((e,t,r)=>{let n,i=e?.getFeatures(),o=e?.getSettings(),a=o?.autofill&&(void 0===(n=o.autofill).inject&&void 0===n.openOnFocus||!!(n.inject||n.openOnFocus));switch(r){case ei.AUTOFILL_LOGIN:return!!(i?.Autofill&&(o?.autofill.login??a));case ei.AUTOFILL_IDENTITY:return!!(i?.Autofill&&(o?.autofill.identity??a));case ei.AUTOSUGGEST_ALIAS:return i?.AutosuggestAlias??!1;case ei.AUTOSUGGEST_PASSWORD:return i?.AutosuggestPassword??!1;case ei.AUTOFILL_CC:if(!e?.getExtensionContext()?.url?.isSecure)return!1;return!!i?.CreditCard&&(e=>{switch(e.fieldSubType){case L.EXP:case L.EXP_YEAR:case L.EXP_MONTH:if(0!==a2())return!0;return e.getFormHandle().getFieldsFor(F.CREDIT_CARD,e=>e.fieldSubType===L.FIRSTNAME||e.fieldSubType===L.LASTNAME||e.fieldSubType===L.NAME||e.fieldSubType===L.NUMBER||e.fieldSubType===L.CSC).length>0||e.getFormHandle().hasFrameFields();default:return!0}})(t)}}),sL={attributes:!0,attributeFilter:["aria-invalid","aria-describedby","aria-errormessage","data-invalid","data-error"]},sD=({element:e,fieldType:t,formId:r,getFormHandle:n})=>{var i;let o,a,s,l=null,u=(i="actionPrevented",o={},{release:a=()=>{e[i]=!1,clearTimeout(o.timer),delete o.timer},isTrapped:()=>!0===e[i],trap:t=>(clearTimeout(o.timer),e[i]=!0,o.timer=setTimeout(()=>{e[i]=!1,delete o.timer},t),a)}),c=(s={timeout:null},{lock:(t=sC)=>{s.timeout&&clearTimeout(s.timeout),e.inert=!0,s.timeout=setTimeout(()=>{e.inert=!1,s.timeout=null},Math.min(t,sC))},unlock:()=>{s.timeout&&(clearTimeout(s.timeout),s.timeout=null),e.inert=!1}}),d={fieldId:m(8),formId:r,frameId:a2(),fieldType:t,element:e,icon:null,action:null,value:e.value,autofilled:null,autofilledItemKey:null,tracked:!1,tracker:null,interactivity:c,get actionPrevented(){return u.isTrapped()||U(e=>e?.service.autofill.processing??!1)()},getFormHandle:n,getAnchor:t=>{if(l)t?.reflow&&l.revalidate();else{let t;t={anchor:sO(e)},l={get element(){return t.anchor},revalidate:()=>{let r=sO(e);r!==t.anchor&&(t.anchor=r)}}}return l},setValue:U((e,t)=>(e?.service.autofill.processing||(d.autofilled=null,d.autofilledItemKey=null),d.value=t)),setAction:e=>{e?d.action=sP(d,e.type)?e:null:d.action=null},focus(e){e?.preventAction?d.preventAction(al):u.release();let t=st(d.element);if(d.element.focus({preventScroll:!0}),t&&!e?.preventAction){let e=new FocusEvent("focus",{bubbles:!0,cancelable:!0,relatedTarget:null});d.element.dispatchEvent(e)}au(()=>d.icon?.reposition())},autofill:(t,r)=>{let n=d.preventAction();return c.unlock(),d.getVisibility().then(async n=>{n&&(await sp(async(t,r)=>oq(e)?sE(e,t,r):oY(e)&&"SELECT"===e.tagName?sv(e,t):void 0)(t,r),d.autofilled=t?r?.type??d.fieldType:null,d.autofilledItemKey=r?.itemKey??null)}).catch(p).finally(ac(n))},setIcon:e=>{d.icon=e},getVisibility:U(async t=>!!(t&&nH(e,{opacity:!1,skipCache:!0}))&&(!!t.mainFrame||a6())),attach(e){!d.tracked&&oq(d.element)&&(d.tracked=!0,d.tracker=sF(d,e))},detach:()=>{d.tracked=!1,d.tracker?.detach(),d.tracker=null,d.icon?.detach(),u.release(),c.unlock(),l=null},matches:e=>{if(!e)return!1;let{fieldId:t,formId:r}=e;return d.fieldId===t&&d.formId===r},preventAction:(e=250)=>u.trap(e),isActive:U(async e=>!!st(d.element)||(e?.service.inline.dropdown.getState(e.mainFrame).then(({visible:e,focused:t,attachedField:r})=>e&&t&&d.matches(r)).catch(()=>!1)??!1)),sync:()=>{if(d.action&&!sP(d,d.action.type)){d.action=null,d.icon?.detach();return}}};return d};function sM(e){return e[e.length-1]}var sk=((I={}).AUTHORIZED="AUTHORIZED",I.AUTHORIZING="AUTHORIZING",I.BOOTING="BOOTING",I.ERROR="ERROR",I.IDLE="IDLE",I.OFFLINE="OFFLINE",I.PASSWORD_LOCKED="PASSWORD_LOCKED",I.BIOMETRICS_LOCKED="BIOMETRICS_LOCKED",I.READY="READY",I.SESSION_LOCKED="SESSION_LOCKED",I.UNAUTHORIZED="UNAUTHORIZED",I.MISSING_SCOPE="MISSING_SCOPE",I);let sU=ep(sk.AUTHORIZED),sB=ep(sk.ERROR);ep(sk.OFFLINE);let sW=em(sk.PASSWORD_LOCKED,sk.BIOMETRICS_LOCKED);ep(sk.READY);let sG=ep(sk.SESSION_LOCKED),sH=ep(sk.IDLE),s$=ep(sk.UNAUTHORIZED),sY=ep(sk.MISSING_SCOPE);em(sk.IDLE,sk.AUTHORIZED,sk.AUTHORIZING,sk.BOOTING);let sq=em(sk.READY,sk.OFFLINE);ec(sU,s$,sB);let sj=ec(sq,sG,sW),sz=ec(sB,s$,sY),sK=ec(sj,sz),sV=ec(s$,sB,sH),sQ=ec(sG,sW,sY),sX=sm(e=>{if(e.assignedSlot)return e.assignedSlot;let t=e.parentElement;for(;t;){if(t.assignedSlot)return t.assignedSlot;t=t.parentElement}}),sZ="popover"in HTMLElement.prototype,sJ=(e,t)=>sm(()=>e.matches(t))()??!1,s0=e=>sm(()=>Array.from(document.querySelectorAll(e)))()??[],s1=(o=s0(":popover-open"),a=s0(":modal"),s=new Set(o.concat(a)),l=sd(),u=({target:e})=>{e&&oY(e)&&(e instanceof HTMLDialogElement||e.hasAttribute("popover"))&&((sJ(e,":modal")||sJ(e,":popover-open"))&&document.contains(e)?s.add(e):s.delete(e))},c=e=>{for(let{removedNodes:t}of e)for(let e of t)oY(e)&&s.delete(e)},{connect:()=>{l.addListener(document,"toggle",u,{capture:!0}),l.addObserver(document.body,c,{childList:!0,subtree:!0})},disconnect:()=>l.removeAll(),ensureTopLevel:e=>{if(sZ){let t=s1.elements;if(t.findIndex(ep(e))!==t.length-1)return!1}return!0},get elements(){return Array.from(s)}}),s2=sm(e=>e.showPopover()),s5=sm(e=>e.hidePopover()),s4=(e,t,r=5e3)=>{let n,i,o="function"==typeof e?e:e.check,a="function"==typeof e?void 0:e.cancel,s=!1,l=()=>{clearTimeout(n),clearInterval(i)};return new Promise(async(e,u)=>{let c=e=>{s||(s=!0,l(),u(e))},d=async()=>{try{if(a?.())return c();if(await o())return void(!s&&(s=!0,l(),e()))}catch(e){c(e)}};await d(),s||(n=setTimeout(c,r),i=setInterval(d,t))})},s3=ac((e,{refocus:t,userAction:r})=>{t?e.focus({preventAction:!1}):r||st(e.element)||e.icon?.detach()}),s8=(e,t)=>ac(async r=>{let n="field"===t.type?t.field:void 0;n&&st(n.element)||(await e.getState()).focused||e.close(t)}),s6=(e,t)=>r=>{let n=r.target,i=(()=>{let t=e();if(!t)return[];let r=t.element.getRootNode(),n=ra(r)?r.host:null;return[t.icon?.element,t.element,n].filter(ef)})();n&&i.includes(n)||t()},s7=(e,t)=>{if(!e)return!1;switch(t.type){case"field":return e.type===t.type&&e.field.element===t.field.element;case"frame":return e.type===t.type&&e.frameId===t.frameId&&e.formId===t.formId&&e.fieldId===t.fieldId}},s9=U(async(e,t)=>{if(!e)return!1;let{action:r,autofocused:n,autofilled:i}=t;if(n&&i)return!1;await s4(()=>sK(e.getState().status),50);let{authorized:o}=e.getState();if(n&&!o)return!1;let a=e.getExtensionContext()?.url;switch(r){case ei.AUTOFILL_CC:return!(n&&!await e.service.autofill.getCreditCardsCount());case ei.AUTOFILL_IDENTITY:return!(n&&!await e.service.autofill.getIdentitiesCount());case ei.AUTOFILL_LOGIN:return!(n&&!await e.service.autofill.getCredentialsCount());case ei.AUTOSUGGEST_ALIAS:return!!a?.displayName;default:return!0}}),le=U(async(e,t)=>{let r,n;if(!e)return;let{action:i}=t,o=e.getExtensionContext()?.tabUrl,a="frame"===t.type?t.frameId:t.field.frameId,s="frame"===t.type?t.fieldId:t.field.fieldId,l="frame"===t.type?t.formId:t.field.formId,u=o?(r=(({domain:e,hostname:t})=>e??t)(o),n=(({domain:e,subdomain:t,hostname:r})=>t??e??r)(o),t.action===ei.AUTOFILL_CC?r?"frame"===t.type?[r,t.origin]:[r,r]:null:n?"frame"===t.type?[n,t.origin]:[n,n]:null):null;if(!(o&&u))return;let[c,d]=u,m={frameOrigin:d,frameId:a,fieldId:s,formId:l,origin:c};switch(i){case ei.AUTOFILL_CC:case ei.AUTOFILL_IDENTITY:return{action:i,...m};case ei.AUTOFILL_LOGIN:return{action:i,...m,startsWith:""};case ei.AUTOSUGGEST_ALIAS:if(!o.displayName)return;return{action:i,prefix:((e="",t=!1)=>{let r=e.toLowerCase().trim();return t&&(r=r.normalize("NFD").replace(/[\u0300-\u036f]/g,"")),r})(o.displayName,!0).replace(/[^a-z0-9\-\_.]/g,"").slice(0,20).replace(/\.*$/,"").replace(/^\.+/,""),...m};case ei.AUTOSUGGEST_PASSWORD:return oZ.on(o0({type:oQ.AUTOSUGGEST_PASSWORD}),e=>{if("error"!==e.type)return{action:i,...am(e,["type"]),...m}})}});var lt=r(43298);let lr=e=>{let t=document.createElement(e.type);return e.classNames?.forEach(e=>t.classList.add(e)),e.attributes&&Object.entries(e.attributes).forEach(([e,r])=>t.setAttribute(e,r)),e.parent&&e.parent.appendChild(t),t},ln=e=>{let t=document.createElement(e.type),r=t.attachShadow({mode:"closed"});if(((e,...t)=>{})(0,e.type,r),e.classNames?.forEach(e=>t.classList.add(e)),e.attributes&&Object.entries(e.attributes).forEach(([e,r])=>{t.setAttribute(e,r)}),e.styles){let t=new CSSStyleSheet;t.replaceSync(e.styles),(r?.wrappedJSObject??r).adoptedStyleSheets.push(t)}return e.parent&&e.parent.appendChild(t),{customElement:t,shadowRoot:r}},li=(e,t)=>{let r=t??getComputedStyle(e);return!!(r.position&&"static"!==r.position||r.transform&&"none"!==r.transform||r.filter&&"none"!==r.filter||r.perspective&&"none"!==r.perspective||r.backdropFilter&&"none"!==r.backdropFilter)},lo=(...e)=>{e.forEach(e=>{let t=e.style.transform;e.style.transform="translateZ(0)",e.offsetHeight,e.style.transform=t})},la=(e,t=1)=>{let r=[];try{let{x:n,y:i,maxShift:o,anchor:a,container:s}=e;if(Number.isNaN(n)||Number.isNaN(i))return 0;ss(a,2*!!oq(a)).querySelectorAll("*").forEach(e=>{if(oY(e)&&"none"===window.getComputedStyle(e).pointerEvents){let t=e.style.pointerEvents;e.style.pointerEvents="auto",r.push({el:e,pointerEvents:t})}});let l=e.radius/2,u=document.elementsFromPoint(n-l,i),c=document.elementsFromPoint(n+l,i),d=u.length>c.length?u:c,m=0,p=e.skip??new Set;for(let t of d){if(p.has(t)||t.classList.contains("protonpass-debug")||t===a)continue;if(t===a.parentElement)break;if(!oY(t)||t.tagName.startsWith("PROTONPASS")||s&&!s.contains(t)||t.matches("svg *"))continue;let{display:r,visibility:i,opacity:l}=getComputedStyle(t);if("none"===r||"hidden"===i||"0"===l){let e=t.parentElement;for(;e&&e.childElementCount<=1;)p.add(e),e=e.parentElement;continue}let{left:u,width:c}=t.getBoundingClientRect();if(c>=o){p.add(t);continue}let d=Math.max(0,n+e.radius-u);d>m&&d<o&&(m=d)}if(m>0&&t<=2){let r=e.maxShift-m,n=e.x-m;return m+la({...e,skip:p,maxShift:r,x:n},t++)}return m}catch(e){return 0}finally{r.forEach(({el:e,pointerEvents:t})=>e.style.pointerEvents=t)}},ls=e=>{let t;Object.entries((t=e.getAttribute(f))?JSON.parse(t):{}).forEach(([t,r])=>r?e.style.setProperty(t,r):e.style.removeProperty(t)),e.removeAttribute(f)},ll=1e3/24,lu=e=>{let t=e.get(),r=e.threshold??.1,n=e.maxDuration??500;e.set?.(t);let{top:i=0,left:o=0,right:a=0,bottom:s=0}=t,l=null,u=null,c=()=>e.onAnimate(requestAnimationFrame(t=>{if(null===l&&(l=t),null===u&&(u=t),t-u>=n)return e.onComplete?.(t);if(t-l>=ll){l=t;let n=e.get();(({top:e=0,left:t=0,right:n=0,bottom:l=0})=>Math.abs(e-i)>r||Math.abs(t-o)>r||Math.abs(n-a)>r||Math.abs(l-s)>r)(n)?(e.set?.(n),i=n.top??0,o=n.left??0,a=n.right??0,s=n.bottom??0,c()):e.onComplete?.(t)}else c()}));return c()},lc=sp(async(e,t=500)=>{let r=e.getAnimations({subtree:!0}).filter(({pending:e})=>!e);await Promise.race([aD(t),Promise.all(r.map(({ready:e})=>e)).catch(p)])}),ld=e=>{let t=e.style.transition,r=e.style.animation;return e.style.setProperty("transition","none","important"),e.style.setProperty("animation","none","important"),()=>{t?e.style.setProperty("transition",t):e.style.removeProperty("transition"),r?e.style.setProperty("animation",r):e.style.removeProperty("animation")}},lm=({channel:e,dropdown:t,mainFrame:r,tag:n})=>{let i={current:null},o=({payload:e},t)=>{if("relay"===e.type){let r=a8(e.frameId,e.frameAttributes);if(r)return requestAnimationFrame(()=>{let n=r.getBoundingClientRect(),i=ss(r,3),o=aY(r),a=aQ(o),s=aK(o),l=e.left+n.left+a,u=e.top+n.top+s,{maxShift:c,radius:d}=e;t({dx:la({x:l,y:u,maxShift:c,radius:d,anchor:i})})}),!0}};return e.register(oQ.INLINE_ICON_SHIFT,o),e.register(oQ.INLINE_ICON_ATTACHED,()=>i.current?.detach()),{attach:e=>{i.current!==e.icon&&i.current?.detach(),!e.icon&&(i.current=(e=>{let{field:t,tag:r,mainFrame:n}=e,i=t.element,o=t.getFormHandle(),a=o.element,s=t.getAnchor({reflow:!0}),l=o.zIndex;if(!oq(i))return null;let u=sd(),{icon:c,control:d}=(({tag:e,zIndex:t})=>{let r=ln({type:e,styles:lt.A}),n=lr({type:"button",classNames:[]});return n.tabIndex=-1,n.style.zIndex=t.toString(),n.setAttribute("type","button"),r.shadowRoot.appendChild(n),{icon:n,control:r.customElement}})({zIndex:l,tag:r}),m=s.element===i||s.element===i.parentElement,g=m?i.parentElement:s.element,h=!n&&1===o.fields.size;if(((e,t,r)=>{if(r===document.body)return!1;let n=e;for(;n&&!li(n);){let e=n.parentElement;if(!e||e===t||e===r)return!0;n=e}return!1})(g,a,o.scrollParent(t.element))&&(z.debug("[IconController] injection requires containing block"),g.setAttribute(f,JSON.stringify({position:g.style.position})),g.style.position="relative"),m){let e;(e=i.nextElementSibling,e?.tagName==="LABEL"?e:i).after(d)}else g.appendChild(d);let A={abortCtrl:null,containerObserver:null,inputObserver:null,repositionRaf:-1,reflow:!1,styles:null,releaseTransitions:null},y=e=>(...t)=>{A.reflow=!0,e(...t)},b=e=>{let t=0!==e&&e?String(e):"";c.style.setProperty("--control-count",`"${t}"`),e>0&&c.style.setProperty("background-image",`url("${ee}")`,"important")},w=U(e=>{let r;if(!e)return;let{authorized:n,status:i}=e.getState();r=sQ(i)?Z:sV(i)?J:X,c.style.setProperty("background-image",`url("${r}")`,"important"),t.action?.type===ei.AUTOFILL_LOGIN&&n?e.service.autofill.getCredentialsCount().then(b).catch(p):b(0)}),E=sp(U(async(e,t,r)=>{if(!e||e.mainFrame||r.signal.aborted)return;let n=a4(),{top:i,left:o,radius:a,dx:l}=t.icon.overlay,u=.5*s.element.offsetWidth-l;await oZ.onSuccess(o0({type:oQ.INLINE_ICON_SHIFT,payload:{type:"initial",top:i,left:o,radius:a,frameAttributes:n,maxShift:u}}),({dx:e})=>{if(r.signal.aborted||e<=0)return;let n=Math.abs(e-t.icon.overlay.dx);t.icon.right+=n+t.icon.overlay.gap}).catch(p)})),v=()=>{cancelAnimationFrame(A.repositionRaf);let e=new AbortController;A.abortCtrl?.abort(),A.abortCtrl=e,A.repositionRaf=requestAnimationFrame(async()=>{let r=t.getAnchor({reflow:A.reflow});if(A.reflow=!1,i.offsetWidth<100)return void c.classList.remove("visible");if(await lc(g),!e.signal.aborted){let t={icon:c,control:d,input:i,anchor:r.element,form:a};lu({onAnimate:e=>A.repositionRaf=e,onComplete:async()=>{let r,n;A.inputObserver?.disconnect(),A.containerObserver?.disconnect(),A.releaseTransitions=A.releaseTransitions??(r=ld(g),n=ld(i),()=>{r(),n(),A.releaseTransitions=null});let o=(e=>{let t,r,{anchor:n,input:i,control:o,form:a}=e,s=n!==i;ls(i),lo(i,o),s&&lo(n);let{right:l,top:u,height:c}=i.getBoundingClientRect(),{right:d,top:m,height:p}=n.getBoundingClientRect(),{top:f,right:g}=o.getBoundingClientRect(),h=Math.max(l,d),A=aY(i),y=aY(n),{value:b,offset:w}=aJ(y,s?"inner":"outer"),E=Math.max(Math.min(p-8,28),16),v=E/2,C=A("padding-right",aq),T=A("padding-left",aq),_=s?y("padding-right",aq):0,R=s?y("padding-left",aq):0,I=Math.max(8,E/5),S=Math.max(Math.min(0===T?R:T,0===C?_:C)/1.5,I),O=h-(S+v),N=u+c/2,x=la({x:O,y:N,maxShift:.5*n.offsetWidth,radius:v,anchor:n,container:a}),F=m-f+w.top+(b-E)/2;return{input:{paddingRight:(t=d-(x+S+E+I))>=(r=l-C)?C:C+(r-t)},icon:{top:F,right:g-h+S+x,size:E,fontSize:E/2.5,overlay:{left:O+x,top:N,gap:I,radius:v,dx:x}}}})(t);if(h&&await E(o,e),!e.signal.aborted){var a;a=A.styles,A.styles=!(a&&o)||Math.abs(a.icon.right-o.icon.right)>2||Math.abs(a.icon.top-o.icon.top)>2?o:A.styles,A.styles&&(({icon:e,input:t},r)=>{let n=t.getBoundingClientRect().width;e.style.top=aj(r.icon.top),e.style.right=aj(r.icon.right),e.style.width=aj(r.icon.size),e.style.height=aj(r.icon.size),e.style.setProperty("--control-lineheight",aj(r.icon.size)),e.style.setProperty("--control-fontsize",aj(r.icon.fontSize)),t.setAttribute(f,JSON.stringify({"padding-right":t.style.paddingRight})),t.style.setProperty("padding-right",aj(r.input.paddingRight),"important"),t.getBoundingClientRect().width!==n&&(t.style.removeProperty("padding-right"),t.style.setProperty("padding-right",t.style.paddingRight))})(t,A.styles),A.abortCtrl=null,c.classList.add("visible"),A.repositionRaf=requestAnimationFrame(()=>{e.signal.aborted||(A.inputObserver?.observe(i),A.containerObserver?.observe(g),A.releaseTransitions?.())})}},get:()=>i.getBoundingClientRect()})}})},C=sm(()=>{cancelAnimationFrame(A.repositionRaf),A.abortCtrl?.abort(),A.abortCtrl=null,A.styles=null,c.classList.remove("visible"),u.removeAll(),A.containerObserver?.disconnect(),A.inputObserver?.disconnect(),A.releaseTransitions?.(),e.onDetach(),t.setIcon(null),c.remove(),d.remove(),ls(i),ls(g)}),T=ag()(v,150,{leading:!0,trailing:!0});return u.addListener(c,"pointerdown",t=>{c.setPointerCapture(t.pointerId),t.preventDefault(),t.stopPropagation(),e.onClick()}),u.addListener(c,"pointerup",e=>{c.releasePointerCapture(e.pointerId),e.preventDefault(),e.stopPropagation()}),u.addListener(window,"resize",T),u.addObserver(g,y(T),{childList:!0,subtree:!0}),u.addObserver(i,T,sL),u.addResizeObserver(t.getFormHandle().element,T,{passive:!0}),A.inputObserver=u.addResizeObserver(i,T,{passive:!0}),A.containerObserver=u.addResizeObserver(g,y(T),{passive:!0}),w(),v(),{element:c,detach:C,reposition:v,sync:w}})({field:e,mainFrame:r,tag:n,onClick:()=>{e.action&&(e.focus({preventAction:!0}),t.toggle({type:"field",action:e.action.type,autofocused:!1,autofilled:null!==e.autofilled,field:e}))},onDetach:()=>i.current=null}),i.current&&((({fieldId:e,formId:t,frameId:r})=>{oZ(o0({type:oQ.INLINE_ICON_ATTACHED,payload:{fieldId:e,formId:t,frameId:r}})).catch(p)})(e),e.setIcon(i.current)))},destroy:()=>{e.unregister(oQ.INLINE_ICON_SHIFT,o),i.current?.detach(),i.current=null}}},lp={capture:!0,passive:!0},lf=(e,t)=>{let r=!1,n=()=>oY(e)?e.scrollLeft:e.scrollX,i=()=>oY(e)?e.scrollTop:e.scrollY,o=n(),a=i();return e=>{r||(n()!==o||i()!==a)&&(r=!0,t())}};var lg=((S={})[S.PassDark=8]="PassDark",S[S.PassLight=12]="PassLight",S.OS="OS",S),lh=((O={}).LoginAutofillTelemetry="LoginAutofillTelemetry",O.PassAllowCreditCardFreeUsers="PassAllowCreditCardFreeUsers",O.PassBasicAuthAutofill="PassBasicAuthAutofill",O.PassContentScriptPopoverKillSwitch="PassContentScriptPopoverKillSwitch",O.PassContextMenu="PassContextMenu",O.PassCreditCardWebAutofill="PassCreditCardWebAutofill",O.PassCustomTypeV1="PassCustomTypeV1",O.PassDesktopAutotype="PassDesktopAutotype",O.PassEnableDesktopAutoUpdate="PassEnableDesktopAutoUpdate",O.PassExperimentalWebsiteRules="PassExperimentalWebsiteRules",O.PassExtensionCustomTLDs="PassExtensionCustomTLDs",O.PassGroupInvitesV1="PassGroupInvitesV1",O.PassHideShowVault="PassHideShowVault",O.PassIFrameKillswitch="PassIFrameKillswitch",O.PassItemCloning="PassItemCloning",O.PassProtonAnniversaryPromo2025="PassProtonAnniversaryPromo2025",O.PassRenameAdminToManager="PassRenameAdminToManager",O.PassWebInternalAlpha="PassWebInternalAlpha",O.PassWebPrfUnlock="PassWebPrfUnlock",O.PassDesktopBeta="PassDesktopBeta",O.PassWebDesktopLifetimeBanner="PassWebDesktopLifetimeBanner",O);Object.values(lh),lh.LoginAutofillTelemetry,lh.PassBasicAuthAutofill,lh.PassCreditCardWebAutofill,lh.PassEnableDesktopAutoUpdate,lh.PassExperimentalWebsiteRules,lh.PassExtensionCustomTLDs,lh.PassHideShowVault,lh.PassIFrameKillswitch,lh.PassItemCloning,lh.PassProtonAnniversaryPromo2025,lh.PassRenameAdminToManager,lh.PassWebInternalAlpha,lh.PassWebPrfUnlock;let lA=lg.OS;new Date("2025-05-28T12:00:00+01:00").getTime(),HTMLElement===HTMLElement.prototype.constructor?HTMLElement:HTMLElement.prototype.constructor;let ly=()=>{let e={subscribers:{},subscriberId:0};return{publish:t=>{Object.values(e.subscribers).forEach(e=>sm(e)(t))},publishAsync:async t=>{await Promise.all(Object.values(e.subscribers).map(e=>e(t)))},subscribe:t=>{let r=e.subscriberId++;return e.subscribers[r]=t,()=>delete e.subscribers[r]},unsubscribe:()=>e.subscribers={}}},lb=({animation:e,classNames:t,id:r,popover:n,src:i,dimensions:o})=>{let a=new Map,s=ly(),l=sd(),u=m(8),c={action:null,framePort:null,loaded:!1,port:null,position:{top:-1,left:-1,right:-1,bottom:-1},positionReq:-1,ready:!1,visible:!1},d=lr({type:"iframe",classNames:t,attributes:{src:`${i}#iframe=${u}`},parent:n.root.shadowRoot});d.style.setProperty("--frame-animation",e);let f=U(e=>!!e?.getState().stale),g=eg(()=>s4({check:()=>c.loaded,cancel:f},50)),h=eg(()=>s4({check:()=>c.ready,cancel:f},20)),A=l.addListener(window,"message",e=>{"PassIFrameReady"===e.data.type&&e.data.endpoint===r&&e.data.iframe===u&&(c.loaded=!0,A())}),y=e=>{let t={...e,sender:"contentscript"};return h().then(()=>c.port?.postMessage({forwardTo:c.framePort,payload:t,sender:t.sender,type:oQ.PORT_FORWARDING_MESSAGE,version:"1.35.0"})).catch(e=>s.publish({type:"error",error:e}))},b=(e,t,i)=>(a.set(e,o=>{o?.type===e&&o.sender===r&&(!i?.userAction||s1.ensureTopLevel(n.root.customElement)?t(o):z.warn(`[IFrame::${r}] Untrusted user action`))}),()=>a.delete(e)),w=({width:e,height:t})=>{d.style.setProperty("--frame-width",aj(e)),d.style.setProperty("--frame-height",aj(t))},E=(e={})=>{cancelAnimationFrame(c.positionReq),s.publish({type:"close",state:c,options:e}),d.classList.remove("visible"),lo(d),c.visible=!1,c.action=null,n.close(),y({type:sN.IFRAME_HIDDEN})},v=sp(async(e,t)=>{try{if(await h(),t?.signal.aborted||c.visible)return s.publish({type:"abort",request:e});c.action=e.action,c.visible=!0,n.open(),y({type:sN.IFRAME_OPEN}),d.classList.add("visible"),lo(d),w(o(c)),s.publish({type:"open",state:c})}catch(e){throw s.publish({type:"error",error:e}),e}}),C=e=>at(e)&&"type"in e&&"string"==typeof e.type&&a.get(e.type)?.(e);return b(sN.IFRAME_CONNECTED,({payload:{framePort:e}})=>{c.ready=!0,c.framePort=e}),b(sN.IFRAME_CLOSE,e=>{E(e.payload),o2(o1.ExtensionUsed,{},{modelVersion:"1"})}),b(sN.IFRAME_DIMENSIONS,e=>{let{width:t,height:r}=ar(o(c),{height:e.payload.height});return w({width:t,height:r})}),{element:d,state:c,close:E,destroy:()=>{E({discard:!1,refocus:!1}),s.publish({type:"destroy"}),c.port?.onMessage.removeListener(C),a.clear(),sm(()=>d.remove())(),c.port=null,s.unsubscribe(),l.removeAll()},init:(e,t)=>{let r;c.port?.disconnect(),c.port=e,c.port.onMessage.addListener(C),c.port.onDisconnect.addListener(()=>c.ready=!1),(r={type:sN.IFRAME_INJECT_PORT,payload:{port:e.name}},oZ.onSuccess(o0({type:oQ.RESOLVE_EXTENSION_KEY}),({key:e})=>g().then(()=>{let t={...r,key:e,sender:"contentscript"};d.contentWindow?.postMessage(t,i)}).catch(e=>s.publish({type:"error",error:e})))).then(()=>y({type:sN.IFRAME_INIT,payload:t()})).catch(p)},open:v,registerMessageHandler:b,sendPortMessage:y,setPosition:e=>{cancelAnimationFrame(c.positionReq),lu({get:()=>e(n.root.customElement),set:e=>(e=>{c.position=e;let{top:t,left:r,right:n}=e;d.style.setProperty("--frame-top",t?aj(t):"unset"),d.style.setProperty("--frame-left",r?aj(r):"unset"),d.style.setProperty("--frame-right",n?aj(n):"unset")})(e),onAnimate:e=>c.positionReq=e})},subscribe:s.subscribe}},lw=e=>{let t=e.root;return{root:t,open:()=>{sZ?(t.customElement.setAttribute("popover","manual"),s2(t.customElement)):t.customElement.removeAttribute("popover")},close:()=>{if(sZ){let{dropdown:r,notification:n}=e;r?.getState().visible||n?.getState().visible||s5(t.customElement)}}}};var lE=r(31447);let lv="[data-focus-lock-disabled], [data-focus-lock], [data-focus-trap], [data-a11y-dialog]",lC=e=>e?.closest(lv)??null,lT="Pass::MainWorld::Response",l_="Pass::MainWorld::Abort",lR="Pass::MainWorld::Disconnect",lI=[oQ.PASSKEY_CREATE,oQ.PASSKEY_GET,oQ.PASSKEY_INTERCEPT],lS=(e,t)=>({response:e,token:t,type:lT}),lO=e=>t=>r=>"object"==typeof r&&r?.token===t&&r?.type===e,lN=lO(l_);lO(lR),lO(lT);class lx extends Error{name="PasskeyError";allowNativeWebAuthn;constructor(e){super("PasskeyError"),this.allowNativeWebAuthn=e.allowNativeWebAuthn}}let lF=e=>(t,r)=>t.startsWith(`${e}-${r??""}`);lF("popup"),lF("page"),lF("contentscript");let lP=M("extension"),lL=async e=>{let{endpoint:t}=e,r=oJ(t),n=`Context::Extension::${t}`;try{let{tabId:i=0,senderTabId:o=0,url:a=null,tabUrl:s=null,frameId:l=0}=await oZ.on(r({type:oQ.ENDPOINT_INIT,payload:{popup:"popup"===t}}),e=>"error"===e.type?{}:e),u=`${t}-${o}-${l}-${m(16)}`,c=Q.runtime.connect(Q.runtime.id,{name:u});z.debug(`[${n}] tabId resolved & port opened`);let d=async()=>{z.info(`[${n}] port disconnected`),e.onDisconnect()},p=sm(()=>c.disconnect()),f=eu(()=>c.onDisconnect.removeListener(d),p,lP.clear);return c.onDisconnect.addListener(d),lP.set({endpoint:t,port:c,frameId:l,senderTabId:o,tabId:i,tabUrl:s,url:a,destroy:f})}catch(t){throw z.info(`[${n}] fatal error`,t),lP.clear(),e.onError?.(t),t}},lD={Autofill:1,Autofill2FA:2,Autosuggest:4,Autosave:8,Passkey:16};Object.values(lD).reduce((e,t)=>e^t,0);let lM=(e,t)=>((e??0)&lD[t])!=0,lk={Autofill:!1,Autofill2FA:!1,Autosave:!1,Autosuggest:!1,Passkey:!1},lU=(e,t)=>({Autofill:e.Autofill||t.Autofill,Autofill2FA:e.Autofill2FA||t.Autofill2FA,Autosave:e.Autosave||t.Autosave,Autosuggest:e.Autosuggest||t.Autosuggest,Passkey:e.Passkey||t.Passkey}),lB=e=>e.Autofill||e.Autofill2FA||e.Autosave||e.AutosuggestAlias||e.AutosuggestPassword||e.CreditCard,lW=(e,t)=>at(e)&&"type"in e&&"string"==typeof e.type&&(!t.type||t.type===e.type)&&(!t.sender||t.sender===e.sender),lG=({scriptId:e,mainFrame:t,elements:r,controller:n})=>{var i,o,a,s;let l,u,c,d,g,h,A,y,b,w,E,v,C,T,_,R,I,S,O,N,D,M,G,H,$,Y,q=(i={controller:n,elements:r,mainFrame:t,scriptId:e,destroy:t=>{z.debug(`[ContentScript::${e}] destroying.. [reason: "${t.reason}"]`),q.setState({stale:!0}),q.service.formManager.destroy(),q.service.inline.destroy(),q.service.autofill.destroy(),q.service.passkey?.destroy(),q.service.autosave.destroy(),(({root:e,control:t})=>{document.querySelectorAll(`${e}, ${t}`).forEach(e=>e.remove()),document.querySelectorAll(`[${f}]`).forEach(e=>ls(e))})(r),lP.read()?.destroy()}},l={authorized:!1,booted:!1,localID:void 0,ready:!1,stale:!1,status:sk.IDLE,UID:void 0},ab.add(i.elements.control.toUpperCase()),ab.add(i.elements.root.toUpperCase()),u={autofill:{identity:!0,twofa:!0,cc:!0},autosave:{prompt:!0,passwordSuggest:!0},autosuggest:{password:!0,email:!0,passwordCopy:!1},disallowedDomains:{},loadDomainImages:!0,passkeys:{get:!0,create:!0},passwordOptions:null,showUsernameField:!1,theme:void 0},c={},Y=k.set({elements:i.elements,mainFrame:i.mainFrame,scriptId:i.scriptId,channel:i.controller.channel,observer:i.controller.observer,service:{autofill:(({controller:e})=>{let t={processing:!1},r={credentials:null,identities:null,creditCards:null},n=ap("credentials",r),i=ap("identities",r),o=ap("creditCards",r),a=U(async(e,t)=>{if(!e)return;let a=e.getState().authorized;(t?.forceSync||!a)&&(r.credentials=null,r.identities=null,r.creditCards=null);let s=!1,l=!1,u=!1,c=e.service.formManager.getFields();for(let e of c)e.action?.type===ei.AUTOFILL_LOGIN&&(s=!0),e.action?.type===ei.AUTOFILL_IDENTITY&&(l=!0),e.action?.type===ei.AUTOFILL_CC&&(u=!0);a&&(s&&await n(),l&&await i(),u&&await o()),c.forEach(e=>e.icon?.sync())}),s=e=>U(async(r,...n)=>{let i=r?.service.formManager,o=i?.getFields();o?.forEach(e=>e.interactivity.lock()),t.processing=!0;let a=await e(...n);return new Promise(ac(e=>{t.processing=!1,o?.forEach(e=>e.interactivity.unlock()),e(a)}))}),l=s(async(e,t)=>{for(let r of(await as(e.getFieldsFor(F.USERNAME)??[])?.autofill(t.userIdentifier),await as(e.getFieldsFor(F.EMAIL)??[])?.autofill(t.userIdentifier),e.getFieldsFor(F.PASSWORD_CURRENT)))await r.autofill(t.password);o2(o1.AutofillTriggered,{},{location:"source"})}),u=s(U(async(e,t,r)=>{let n=e?.getExtensionContext()?.url;if(n){for(let e of t.getFieldsFor(F.PASSWORD_NEW))await e.autofill(r);oZ(o0({type:oQ.STORE_DISPATCH,payload:{action:aa({id:m(),value:r,origin:(({domain:e,subdomain:t,hostname:r})=>t??e??r)(n),createTime:Math.round(new Date().getTime()/1e3)})}}))}})),c=s((e,t)=>e.autofill(t)),d=s(async(e,t)=>{let r=e.getFieldsFor(F.OTP);if(0!==r.length){if(1===r.length&&await r[0].autofill(t,{paste:!1}),r.length>1)for(let[e,n]of(await r[0].autofill(t,{paste:!0}),r.map((e,r)=>[e,t?.[r]??""])))e.element.value&&e.element.value===n||await e.autofill(n??"");o2(o1.TwoFAAutofill,{},{})}}),p=s(async(e,t)=>{let r=e.getFormHandle().getFields();for(let t of r)t.autofilled&&t.fieldType===F.IDENTITY&&t.sectionIndex===e.sectionIndex&&(await t.autofill(""),t.autofilled=null,t.autofilledItemKey=null);await e_(r,e,t)}),f=U(async(e,t)=>!!e?.getFeatures().Autofill2FA&&t.some(e=>e.otp)&&oZ.on(o0({type:oQ.AUTOFILL_OTP_CHECK}),t=>"success"===t.type&&!!t.shouldPrompt&&(e?.service.inline.notification.open({action:en.OTP,item:am(t,["type","shouldPrompt"])}),!0))),g=U((e,t)=>{if("creditCard"===t.type)return oV(t.fields.map(t=>e?.service.formManager.getFormById(t.formId)?.getFieldById(t.fieldId)).filter(ef),t).then(e=>({type:"creditCard",autofilled:e.flat()})).catch(()=>({type:"creditCard",autofilled:[]}))}),h=U((e,{payload:r},n)=>{let i=e?.service.formManager,o=i?.getFields();switch(r.status){case"start":o?.forEach(e=>e.interactivity.lock()),t.processing=!0;break;case"fill":return g(r).then(n),!0;case"completed":let{formId:a,fieldId:s}=r.refocus,l=i?.getFormById(a)?.getFieldById(s);o?.forEach(e=>e.interactivity.lock(50)),l?.interactivity.unlock(),l?.focus({preventAction:!0}),au(()=>{if(t.processing=!1,l){let{fieldSubType:e}=l;if(e===L.NUMBER||e===L.CSC){let{value:e,element:t,autofilled:r}=l;r&&!t.value&&e&&l.autofill(e,{noFocus:!0})}}})}});return e.channel.register(oQ.AUTOFILL_SEQUENCE,h),{get processing(){return t.processing},autofillEmail:c,autofillIdentity:p,autofillLogin:l,autofillOTP:d,autofillPassword:u,evaluateOTP:f,getCredentialsCount:n,getCreditCardsCount:o,getIdentitiesCount:i,sync:a,destroy:()=>{e.channel.unregister(oQ.AUTOFILL_SEQUENCE,h)}}})(i),autosave:i.mainFrame?(d=U((e,{autosave:t,data:r,submittedAt:n})=>!!t.shouldPrompt&&!!e?.getFeatures().Autosave&&(e.service.inline.notification.open({action:en.AUTOSAVE,data:{...t.data,...r,submittedAt:n}}),!0)),g=ag()(U(async e=>{let t=await oZ.on(o0({type:oQ.FORM_ENTRY_REQUEST}),e=>"success"===e.type?e.submission:null);if(!t)return!1;let{status:r,type:n,data:i,formId:o,submittedAt:a}=t,s=e?.getExtensionContext()?.url,l=s&&ad.every(e=>s[e]===t[e]),u=e?.service.formManager.getForms()??[],c=u.find(e=>e.formId===o),m=u.filter(({formType:e,detached:t})=>e===n&&!t),f=m.length>0,g=m.some(({tracker:e})=>e?.getState().processing),h=null!==a&&ay(i,{type:n,partial:!1}),A=r===ah.STAGING&&l&&!f&&h;if(z.debug(`[Autosave] Reconciliating [formId:${o}]`),g)return z.debug(`[Autosave] submission loading [formId:${o}]`),!1;if(A){let e=await oZ(o0({type:oQ.FORM_ENTRY_COMMIT,payload:{reason:"AUTOSAVE::FORM_REMOVED"}}));return"success"===e.type&&!!e.submission&&d(e.submission)}return t.status===ah.COMMITTED&&t.autosave.shouldPrompt&&!f?d(t):(f&&(h||!i.userIdentifier)&&(c?c.tracker?.processForm({submit:!1,partial:!0,reset:!0}).catch(p):(z.debug(`[Autosave] Stashing for type match [type:${n}]`),m.forEach(({tracker:e})=>e?.reset()),aA("FORM_TYPE_PRESENT"))),!1)}),250),{destroy:()=>g.cancel(),prompt:d,reconciliate:g}):{destroy:p,prompt:()=>!1,reconciliate:p},detector:(o={...i.mainFrame?{}:{fieldTypes:[F.CREDIT_CARD]},root:document,onBottleneck:({detectionTime:e})=>{z.info(`[Detector] Prediction bottleneck detected [${e}ms]`),Y.destroy({reason:"bottleneck"}),i.controller.destroy()}},h={rules:null},y=(A=(e,t)=>{let r;return r={id:t,maxTime:250,onMaxTime:e=>{let{hostname:t}=window.location;if(z.info(`[Detector] Slow down detected on ${t} (${e.toFixed(2)}ms)`),e>=1e3)throw o?.onBottleneck?.({detectionTime:e,hostname:t}),Error()}},(...t)=>{let n=performance.now(),i=e(...t),o=performance.now()-n;return z.debug(`[Performance::${r.id}] ${o.toFixed(2)}ms`),o>=r.maxTime&&r.onMaxTime(o),i}})((e,t)=>aU(t??aM.against(o.root),{type:"form",subTypes:e,selectBest:aW}),"detector::forms"),b=A((e,t)=>aU(t??aM.against(o.root),{type:"field",subTypes:e,selectBest:aB}),"detector::fields"),w={init:async()=>{await oZ.onSuccess(o0({type:oQ.WEBSITE_RULES_REQUEST}),({rules:e})=>{null!==e&&(z.debug("[Detector] Resolved website detection rules"),h.rules=e)}).catch(p)},applyRules:()=>{h.rules?.exclude?.forEach(e=>{let t=document.querySelector(e);t&&t1(t)}),h.rules?.version==="2"&&h.rules?.include?.forEach(e=>{let{selector:t,formType:r,fields:n}=e,i=aN(document,t);i&&(({form:e,formType:t,fields:r})=>{nq(e)&&((t3(e),t9(e,t,1),ra(e.getRootNode()))?nz.add(e):"FORM"!==e.tagName&&tV(e),r.forEach(({field:e,fieldType:t})=>{t3(e),t9(e,t,1),ra(e.getRootNode())&&nK.add(e)}))})({form:i,formType:r,fields:(n??[])?.map(({selector:e,fieldType:t})=>{let r=aN(i,e);if(r)return{field:r,fieldType:t}}).filter(ef)})})},shouldPredict:()=>new Promise(async e=>{await aD(al),requestIdleCallback(()=>{w.applyRules(),oW(),e(!!nV().concat(i5()).reduce((e,t)=>{if(t2(t)){let r=i2(t).some(i1);return r&&ro(t,{preserveIgnored:!1}),e||r}return nq(t)?(delete t.__PP_HIDDEN__,!0):e},!1)||nQ().concat(i2()).some(i1))})}),predictAll:A(e=>{let t,r=W.filter(t=>!e?.excludedFieldTypes?.includes(t)),n=aM.against(o.root),i=y(o.formTypes??B,n),a=b(o.fieldTypes??r,n),s=(t=new WeakMap,a.forEach(({fnode:e,type:r})=>{let n=e.element,o=i.find(({fnode:e})=>rc(e.element,n))?.fnode.element??ak,a=t?.get(o)??[];return a.push({fieldType:r,field:n}),t.set(o,a)}),t),l=i.map(({fnode:e,type:t})=>{let r,n=s.get(e.element)??[];return{form:e.element,formType:t,fields:n.sort((r=ea("field"),(e,t)=>((e,t)=>{if(e===t)return 0;let r=e.compareDocumentPosition(t);return r&ax||r&aL?-1:r&aF||r&aP?1:0})(r(e),r(t))))}}).filter(({formType:e,fields:t})=>e!==x.NOOP||t.length>0);return oH(),l},"detector::all"),predictFields:b,predictForms:y}),formManager:(({onDetection:e,channel:t})=>{let r={active:!0,detectionAt:0,detectionCount:0,detectionRequest:-1,trackedForms:new Map},n=()=>Array.from(r.trackedForms.values()),i=e=>n().find(t=>t.formId===e),o=e=>{r.trackedForms.get(e)?.detach(),r.trackedForms.delete(e)},a=U(e=>{r.trackedForms.forEach(e=>{e.getFields().forEach(e=>e.sync())})}),s=aH()(U(async(t,i)=>{let a=t?.getSettings(),{Autofill:s,Autofill2FA:l,CreditCard:u}=t?.getFeatures()??{},c=!!(s&&a?.autofill.identity),d=[];if(c||d.push(F.IDENTITY),l||d.push(F.OTP),u||d.push(F.CREDIT_CARD),-1!==r.detectionRequest)return!1;let f=((e=!1)=>(r.trackedForms.forEach(t=>{t.detached&&(o(t.element),e=!0)}),e))();return await t?.service.detector.shouldPredict()?(r.detectionRequest=requestIdleCallback(()=>{if(r.active){z.debug(`[FormTracker::Detector] Running detection for "${i}"`);try{let i=t?.service.detector.predictAll({excludedFieldTypes:d});i?.forEach(e=>{let t=r.trackedForms.get(e.form)??(e=>{let{form:t,formType:r,fields:n}=e,i=sd(),o={},a=m(8),s={formId:a,canAutosave:!e.form.hasAttribute("data-protonpass-autosave-ignore"),element:t,formType:r,fields:new Map(n.map(({fieldType:e,field:t})=>[t,sD({element:t,formId:a,formType:r,fieldType:e,getFormHandle:()=>s})])),get zIndex(){var l;let r,n;return o.zIndex=o.zIndex??(l=e.fields.map(ea("field")),r=new WeakMap,n=l.map(e=>{let n=su(e),i=e.parentElement;for(;i&&i!==t;){let e=r?.get(i)??sc(i),[t,o]=e;n=t?o:Math.max(n,o),r?.set(i,e),i=i.parentElement}return n}),r=null,Math.max(0,...n)+5),o.zIndex},scrollParent:e=>o.scrollParent?o.scrollParent:o.scrollParent=sl(e??s.getFields(({element:e})=>"hidden"!==e.type&&!!document.body.contains(e))[0]?.element??t),get busy(){let e=Array.from(t.querySelectorAll(tx)),r=s.getFields(({element:e})=>si(e));return si(t)||e.some(si)||r.length>0||so(t)},get detached(){return!rc(document.body,t)||!nq(t,{skipCache:!0})},get otp(){return!tJ(s.element)&&s.getFieldsFor(F.OTP).length>0},getFieldsFor:(e,t)=>Array.from(s.fields.values()).filter(r=>r.fieldType===e&&(t?.(r)??!0)),getFieldById:e=>s.getFields().find(t=>t.fieldId===e),getFields:e=>{let t=Array.from(s.fields.values());return e?t.filter(e):t},detachField:U((e,t)=>{let r=s.fields.get(t);s.fields.delete(t),ro(t,{preserveIgnored:!1}),r&&(e?.service.inline.dropdown.close({type:"field",field:r}),r.preventAction(),r.detach())}),reconciliate:U((t,r,n)=>{t?.mainFrame&&!s.tracker&&(s.tracker=(e=>{let{tagName:t}=e.element,r=sd(),n={error:!1,processing:!1,submitted:!1,detached:!1};z.debug(`[FormTracker] Tracking form [${t}:${e.formType}:${e.formId}]`);let i=()=>{clearTimeout(n.timerIdle),delete n.timerIdle},o=()=>{clearTimeout(n.timerSubmit),delete n.timerSubmit},a=()=>{z.debug(`[FormTracker] Resetting state [formId:${e.formId}]`),i(),o(),n.submitted=!1,n.processing=!1,n.error=!1,delete n.submittedAt},s=()=>{let t=e=>{let t;return t=e.value,(t?.trim().length??0)!==0},r=as(e.getFieldsFor(F.USERNAME,t)),n=as(e.getFieldsFor(F.USERNAME_HIDDEN,t)),i=as(e.getFieldsFor(F.EMAIL,t)),o=sM(e.getFieldsFor(F.PASSWORD_NEW,t)),a=sM(e.getFieldsFor(F.PASSWORD_CURRENT,t));return{userIdentifier:(r??i??n)?.value??"",password:(o??a)?.value??""}},l=t=>{i(),n.timerIdle=setTimeout(()=>{i(),n.processing||e.busy||e.detached||(z.debug(`[FormTracker] Idle reconciliation [formId:${e.formId}]`),t())},5e3)},u=eh(async t=>{if(!e.canAutosave)return null;let r=t.data??s(),c=ay(r,{type:e.formType,partial:t.partial});if(t.reset&&a(),n.interactionAt&&!n.processing&&c){let a;z.debug(`[FormTracker] Syncing submission [formId:${e.formId}|submit:${t.submit}]`);let s=await (a={action:(e=>{if(oz(e)){let t=e.action;return"string"==typeof t?t:t.value}})(e.element),data:r,reason:`FORM_TRACKER[submit=${t.submit}]`,submit:t.submit,type:e.formType,formId:e.formId},oZ(o0({type:oQ.FORM_ENTRY_STAGE,payload:a})));return t.submit&&!n.detached&&(n.processing=!0,n.submittedAt=Date.now(),i(),o(),n.timerSubmit=setTimeout(()=>{z.debug(`[FormTracker] Submit timeout [formId:${e.formId}]`),delete n.timerSubmit,n.processing=!1,n.submitted=!0,n.error=!1,l(()=>u({submit:!1,partial:!0,reset:!0}))},1e3)),"success"===s.type?s.submission:null}return null}),c=U(async t=>{n.submittedAt=Date.now(),n.interactionAt=Date.now(),e.getFields().forEach(e=>e.preventAction()),t?.service.inline.dropdown.close(),await u({partial:!0,submit:!0})}),d=({payload:t})=>{let{formId:r,status:s}=t;if(r===e.formId)switch(s){case"loading":z.debug(`[Autosave] Form loading detected [formId:${r}]`),n.processing=!0,n.submitted=!1,n.error=!1,o(),i();break;case"submitted":z.debug(`[Autosave] Form submit detected [formId:${r}]`),n.processing=!1,n.submitted=!0,n.error?(aA("XMLHTTP_ERROR"),a()):l(()=>u({submit:!1,partial:!0,reset:!0}));break;case"error":z.debug(`[Autosave] Form error detected [formId:${r}]`),n.error=!0}};return{attach:U(t=>{r.addListener(window,"beforeunload",()=>e.busy&&c()),r.addListener(e.element,"submit",c),t?.channel.register(oQ.FORM_STATUS,d),Array.from(e.element.querySelectorAll(tS)).filter(i0).forEach(e=>r.addListener(e,"click",c))}),detach:U(t=>{let a=e.element,l=e.getFields(),c=s();n.detached=!0,n.processing=!1,r.removeAll(),i(),o(),t?.channel.unregister(oQ.FORM_STATUS,d),requestAnimationFrame(()=>{if(!n.interactionAt||n.error)return;let e=document.contains(a)&&l.some(({element:e})=>document.contains(e)),t=!n.submittedAt||Date.now()-n.submittedAt<250;!e&&t||u({submit:!0,partial:!0,data:c}).catch(p)})}),getState:()=>n,onFieldChange:()=>{n.interactionAt=Date.now(),n.processing=!1,n.timerIdle&&(z.debug(`[FormTracker] Detected interaction while idle [formId:${e.formId}]`),u({submit:!1,partial:!0,reset:!0}))},onFormSubmit:c,processForm:u,reset:a}})(s),s.tracker.attach());let i=r!==s.formType,o=!1;s.formType=r,s.canAutosave=!e.form.hasAttribute("data-protonpass-autosave-ignore"),s.getFields().forEach(e=>{n.some(t=>e.element===t.field)||(i=!0,s.detachField(e.element))});let l=s.fields,u=new Map;n.forEach(({field:e,fieldType:t})=>{let n=s.fields.get(e);i=void 0===n,o=o||t===F.IDENTITY||t===F.CREDIT_CARD;let l=n??sD({element:e,formId:a,formType:r,fieldType:t,getFormHandle:()=>s});switch(l.fieldType){case F.IDENTITY:l.fieldSubType=l.fieldSubType??i9(e);break;case F.CREDIT_CARD:l.fieldSubType=l.fieldSubType??iv(e)}u.set(l.element,l)}),s.fields=u,l.clear(),o&&s.getFields().reduce((e,t)=>{let r=t.fieldType===F.EMAIL,n=t.fieldType===F.IDENTITY&&void 0!==t.fieldSubType,i=sr(t);if(!(n||i||r))return e;let o=r||n?F.IDENTITY:F.CREDIT_CARD,a=r?P.EMAIL:t.fieldSubType;if(void 0===a)return e;if(0===e.length)return t.sectionIndex=0,[{subTypes:new Set([a]),fields:[t],type:o}];let s=e.length-1,l=e[s],u=l.fields[l.fields.length-1]?.fieldSubType,c=l.type!==o,d=(a===L.NUMBER||a===P.ADDRESS||a===P.FIRSTNAME||a===P.FULLNAME)&&l.subTypes.has(a);return c||d&&(i||a!==u)?(t.sectionIndex=s+1,[...e,{subTypes:new Set([a]),fields:[t],type:o}]):(t.sectionIndex=s,l.subTypes.add(a),l.fields.push(t),e)},[]),i&&s.tracker?.reset(),u.forEach(e=>{let t=eo[r][e.fieldType];if(!t)return e.detach();let{action:n,filterable:i}=t;e.setAction(n?{type:n,filterable:i}:null),e.attach(s.tracker),st(e.element)&&e.focus()})}),detach:U(e=>{z.debug(`[FormHandles]: Detaching tracker for form [${r}:${s.formId}]`),i.removeAll(),s.otp&&e?.service.inline.notification.close(en.OTP),s.tracker?.detach(),s.getFields().forEach(t=>{e?.service.inline.dropdown.close({type:"field",field:t}),t.detach()}),ro(t,{preserveIgnored:!0,fields:s.getFields().map(ea("element"))})}),hasFrameFields:()=>{for(let e of t.querySelectorAll("iframe"))if(nF(e))return!0;return!1},getClusterables:()=>{let e=[];for(let r of t.querySelectorAll("input, select, iframe")){let t=s.fields.get(r);if(t&&sr(t)){let{fieldId:r,fieldType:n,fieldSubType:i}=t;e.push({type:"field",fieldId:r,fieldType:n,fieldSubType:i})}else if(r instanceof HTMLIFrameElement){if(a3(r.offsetWidth,r.offsetHeight))continue;let t,n=a5(r);e.push({type:"frame",frameId:t,frameAttributes:n})}}return e}},u=ag()(U(t=>{let r=e.form.parentElement;(null===r||aC(r))&&t?.service.formManager.detect({reason:"NewFormFieldsOnResize"})}),50);return i.addResizeObserver(e.form,u),s})(e);r.trackedForms.set(e.form,t),t.reconciliate(e.formType,e.fields)}),e(n())}catch(e){z.warn(`[FormTracker::Detector] ${e}`)}}r.detectionRequest=-1,r.detectionCount++}),!0):((f||0===r.detectionCount)&&t?.service.autosave.reconciliate(),oH(),!1)}),250,{leading:!0,trailing:!0}),l=async e=>{let t=Date.now(),n=!r.active||r.detectionCount>0&&t-r.detectionAt<150;r.detectionAt=t,n&&(cancelIdleCallback(r.detectionRequest),r.detectionRequest=-1),r.active&&s(e.reason)},u=(e,t)=>(t({formTypes:n().map(ea("formType"))}),!0),c=(e,t)=>(t({forms:n().map(e=>({formId:e.formId,fields:e.getClusterables()})),frameAttributes:a4()}),!0),d=({payload:e},t)=>{let r=i(e.formId),n=r?.getFieldById(e.fieldId),o=r?.getFields(),a=!!(n&&st(n.element));return a&&e.locked?(o?.forEach(e=>e.interactivity.lock()),n?.element.blur()):e.locked||o?.forEach(e=>e.interactivity.unlock()),t({wasFocused:a}),!0};return t.register(oQ.FRAME_FORMS_QUERY,u),t.register(oQ.FRAME_FIELD_LOCK,d),t.register(oQ.FRAME_FORM_CLUSTER,c),{getFormById:i,getFormByIds:e=>n().filter(t=>e.includes(t.formId)),getFields:()=>Array.from(n().flatMap(e=>e.getFields())),getForms:n,detect:l,sync:a,destroy:()=>{t.unregister(oQ.FRAME_FORMS_QUERY,u),t.unregister(oQ.FRAME_FORM_CLUSTER,c),t.unregister(oQ.FRAME_FIELD_LOCK,d),cancelIdleCallback(r.detectionRequest),s.cancel(),r.active=!1,r.detectionRequest=-1,r.detectionCount=0,r.trackedForms.forEach(e=>o(e.element)),r.trackedForms.clear()}}})({channel:i.controller.channel,onDetection:async e=>{0===e.length?Y.service.inline.dropdown.destroy():(Y.service.inline.dropdown.attach(),await Y.service.autofill.sync().catch(p));let t=await Y.service.autofill.evaluateOTP(e);await (!t&&Y.service.autosave.reconciliate())}}),inline:i.mainFrame?(({elements:e,controller:t,mainFrame:r})=>{let n,i,o,a,s,l,u,c;if(!r)throw Error("InlineService should only be created in top-frame");let{channel:d}=t,m=(n=sd(),i={apps:{dropdown:null,notification:null},popover:null,root:null},o=U((e,t)=>{let r=i.apps[t];if(!r)return;let n=e?.getExtensionContext()?.port,o=e?.getExtensionContext()?.url;if(o&&n&&r.getState().port!==n){let a=e.getSettings();r.init(n,()=>({appState:e.getState(),domain:(({domain:e,subdomain:t,hostname:r})=>t??e??r)(o)??"",features:e.getFeatureFlags(),settings:e.getSettings(),theme:((e=lA)=>e===lg.OS?lg[window.matchMedia("(prefers-color-scheme: dark)").matches?"PassDark":"PassLight"]:e)(a.theme)})),r.subscribe(e=>"destroy"===e.type&&(i.apps[t]=null))}}),a={get popover(){return i.popover??(i.popover=lw(a))},get dropdown(){return i.apps.dropdown},get notification(){return i.apps.notification},get root(){return i.root??a.init()},ensureInteractive:e=>{if(sZ){let t,r=i.root,n=(e?e.closest(":modal")??(t=sX(e),t?.closest(":modal"))??lC(e):sM(s1.elements.filter(e=>e.matches(":modal")))??null??lC(document.activeElement))??document.body;r?.customElement.parentElement!==n&&(a.destroy(),a.init(n))}},init:t=>{if(i.root)return i.root;n.removeAll(),i.root=ln({type:e.root,parent:t??document.body,styles:lE.A}),i.popover=lw(a);let{customElement:r}=i.root;i.apps.dropdown&&o("dropdown"),i.apps.notification&&o("notification");let s=U(e=>{i.root=null,i.popover=null,i.apps.dropdown?.destroy(),i.apps.notification?.destroy(),i.apps.dropdown=null,i.apps.notification=null,e?.getState().stale?a.destroy():a.init()}),l=U(e=>{let t=e?.getSettings();a.setTheme(t?.theme)});return n.addListener(r,"PassRootRemoved",s,{once:!0}),n.addListener(window.matchMedia("(prefers-color-scheme: dark)"),"change",l),l(),i.root},destroy:()=>{n.removeAll(),i.apps.dropdown?.destroy(),i.apps.notification?.destroy(),sm(()=>i.root?.customElement.remove())(),i.root=null,i.popover=null},attachDropdown:U((e,t)=>{if(!e)return null;if(a.ensureInteractive(t??null),null===i.apps.dropdown){var r;let t,n,s,l,u,c;z.debug(`[ContentScript::${e.scriptId}] attaching dropdown iframe`),i.apps.dropdown=(r=a.popover,t={current:null},n=sd(),l=(({iframe:e,popover:t,anchor:r})=>{let n={willFocus:!1},i=()=>document.activeElement===t.root.customElement,o=async(e,t)=>oZ(o0({type:oQ.FRAME_FIELD_LOCK,payload:{...e,locked:t}})),a=()=>{clearTimeout(n.willFocusTimer),delete n.willFocusTimer,n.willFocus=!1},s=()=>{r.current?.type==="field"&&r.current.field.preventAction(),clearTimeout(n.willFocusTimer),n.willFocus=!0,n.willFocusTimer=setTimeout(a,500)},l=ac(()=>{e.state.visible&&e.close()}),u=async t=>{let r;if(!e.state.visible||i())return!0;switch(t?.type){case"field":if(!st(t.field.element))break;return t.field.getFormHandle().getFields().forEach(e=>e.interactivity.lock(50)),t.field.element.blur(),!1;case"frame":let n=await o(t,!0);if("success"===n.type&&n.wasFocused)return!1}return document.activeElement&&oY(document.activeElement)&&document.activeElement.blur(),await aD(1),(r=document.activeElement)===document.body||r===document.documentElement||!(!(!r||!oY(r)||r.matches(lv))&&(["input","textarea","select","button","a"].includes(r.tagName.toLowerCase())||r.hasAttribute("tabindex")||r.isContentEditable))},c=eg(async()=>{if(s(),!i())return s4(()=>u(r.current),25,500).then(()=>{e.state.visible&&e.sendPortMessage({type:sN.DROPDOWN_FOCUS})}).catch(p).finally(a)});return e.registerMessageHandler(sN.DROPDOWN_FOCUS_REQUEST,c),e.registerMessageHandler(sN.DROPDOWN_FOCUSED,s),e.registerMessageHandler(sN.DROPDOWN_BLURRED,l),{get focused(){return st(t.root.customElement)},get willFocus(){return n.willFocus},disconnect:a}})({iframe:s=lb({id:"dropdown",animation:"fadein",src:et,popover:r,dimensions:()=>({width:250,height:60})}),popover:r,anchor:t}),u=async e=>{l.disconnect();let n=t.current;switch(n?.type){case"field":s3(n.field,e);break;case"frame":{let{formId:t,fieldId:i,frameId:o}=n;e.refocus&&(r.root.customElement.blur(),document.body.focus(),await aD(al)),oZ(o0({type:oQ.INLINE_DROPDOWN_CLOSED,payload:{...e,type:"initial",frameId:o,formId:t,fieldId:i}}))}}t.current=null},s.subscribe(e=>{switch(e.type){case"open":return(()=>{let e=t.current;if(e?.type==="frame"){let{formId:t,fieldId:r,frameId:n}=e;oZ(o0({type:oQ.INLINE_DROPDOWN_OPENED,payload:{type:"initial",frameId:n,formId:t,fieldId:r}}))}})();case"close":return u(e.options);case"abort":var r;return r=e.request,void(s7(t.current,r)?t.current=null:z.debug("[DropdownApp] aborted but anchor changed"));case"error":return s.destroy();case"destroy":return void(t.current=null,n.removeAll(),l.disconnect())}}),s.registerMessageHandler(sN.AUTOFILL_LOGIN,U(async(e,{payload:r})=>{let n=t.current;if(n?.type!=="field")return;let i=n.field.getFormHandle();i&&(await e?.service.autofill.autofillLogin(i,r),n.field.focus({preventAction:!0}))}),{userAction:!0}),s.registerMessageHandler(sN.AUTOFILL_GENERATED_PW,U(async(e,{payload:r})=>{let n=t.current;if(n?.type!=="field")return;let i=n.field.getFormHandle();if(!i)return;let o=e?.getSettings().autosave.passwordSuggest;await e?.service.autofill.autofillPassword(i,r.password),n.field.focus({preventAction:!0}),i.tracker?.processForm({submit:!1,partial:!0}).then(t=>t&&o&&e.service.autosave.prompt(t)).catch(p)}),{userAction:!0}),s.registerMessageHandler(sN.AUTOFILL_EMAIL,U(async(e,{payload:r})=>{let n=t.current;n?.type==="field"&&(await e?.service.autofill.autofillEmail(n.field,r.email),n.field.focus({preventAction:!0}),n.field.getFormHandle()?.tracker?.processForm({submit:!1,partial:!0}))}),{userAction:!0}),s.registerMessageHandler(sN.AUTOFILL_IDENTITY,U(async(e,{payload:r})=>{let n=t.current;n?.type==="field"&&(await e?.service.autofill.autofillIdentity(n.field,r),n.field.focus({preventAction:!0}))}),{userAction:!0}),c=U((e,t)=>{if("creditCard"===t.type){let r=e?.service.formManager.getFormById(t.formId);r&&!r.hasFrameFields()&&(t.crossFrame=!1)}return t}),s.registerMessageHandler(sN.AUTOFILL_ACTION,async({payload:e})=>{if("creditCard"===e.type)return oZ(o0({type:oQ.AUTOFILL_CC,payload:c(e)}))},{userAction:!0}),{get anchor(){return t.current},get focused(){return l.focused||l.willFocus},close:s.close,destroy:s.destroy,getState:()=>s.state,init:s.init,open:eh(async(e,r)=>{t.current="field"===e.type?{type:"field",field:e.field}:{type:"frame",fieldId:e.fieldId,formId:e.formId,frameId:e.frameId};let n=await le(e).catch(p);if(!n||r?.signal.aborted)return t.current=null,r?.abort();s.sendPortMessage({type:sN.DROPDOWN_ACTION,payload:n}),s.setPosition(t=>{let r=(()=>{switch(e.type){case"field":let{element:r}=e.field,n=e.field.getAnchor().element,i=n!==r,o=sZ?{top:0,left:0}:t.getBoundingClientRect(),{value:a,offset:s}=aJ(aY(n),i?"inner":"outer"),{left:l,top:u,width:c}=n.getBoundingClientRect();return{top:u-o.top+s.bottom+s.top+a,left:l-o.left+c-250};case"frame":return e.coords}})();return r.left<0&&(r.left=0),r}),await s.open(e,r)}),sendMessage:s.sendPortMessage,subscribe:s.subscribe}),o("dropdown")}return i.apps.dropdown}),attachNotification:U(e=>{if(!e)return null;if(a.ensureInteractive(null),null===i.apps.notification){let t,r;z.debug(`[ContentScript::${e.scriptId}] attaching notification iframe`),i.apps.notification=(t=lb({id:"notification",src:er,animation:"slidein",classNames:["fixed"],popover:a.popover,dimensions:()=>({width:320,height:180})}),r=U((e,{state:t,options:r})=>{switch(t.action){case en.AUTOSAVE:return r?.discard&&oZ(o0({type:oQ.FORM_ENTRY_STASH,payload:{reason:"AUTOSAVE_DISMISSED"}}));case en.OTP:return r?.discard&&e?.service.formManager.getForms().filter(({getFieldsFor:e})=>e(F.OTP).length>0).forEach(({element:e,getFieldsFor:t})=>{ro(e,{preserveIgnored:!0}),t0(e),t(F.OTP).forEach(e=>t0(e.element))}),e?.service.autosave.reconciliate()}}),t.subscribe(e=>{switch(e.type){case"close":return r(e);case"error":return t.destroy()}}),t.registerMessageHandler(sN.AUTOFILL_OTP,U(async(e,{payload:{code:t}})=>{let r=e?.service.formManager.getForms().find(({getFieldsFor:e})=>e(F.OTP).length>0);r&&await e?.service.autofill.autofillOTP(r,t)}),{userAction:!0}),t.registerMessageHandler(sN.PASSKEY_RELAY,({payload:e})=>window.postMessage(e,"*"),{userAction:!0}),{close:t.close,destroy:t.destroy,getState:()=>t.state,init:t.init,open:eh(async e=>{let r=e.action===en.AUTOSAVE,{action:n,visible:i}=t.state;if(!r||!i||n!==en.OTP)return t.sendPortMessage({type:sN.NOTIFICATION_ACTION,payload:e}),t.setPosition(()=>({top:15,right:15})),t.open(e)}),sendMessage:t.sendPortMessage,subscribe:t.subscribe}),o("notification")}return i.apps.notification}),setTheme:(e=lA)=>{let[t,r]=(()=>{switch(e){case lg.PassDark:return["dark",e];case lg.PassLight:return["light",e];case lg.OS:return["os",window.matchMedia("(prefers-color-scheme: dark)").matches?lg.PassDark:lg.PassLight]}})();i.root?.customElement.setAttribute("data-protonpass-theme",t),i.apps.dropdown?.sendMessage({type:sN.IFRAME_THEME,payload:r}),i.apps.notification?.sendMessage({type:sN.IFRAME_THEME,payload:r})}}),f=(s=sd(),l={ctrl:null},u=()=>{let e=m.dropdown?.anchor;if(e?.type==="field")return e.field},c={listeners:s,attach:e=>m.attachDropdown(e),toggle:async e=>{let t=m.dropdown?.anchor,r=new AbortController;l.ctrl?.abort();let n=!s7(t,e),i=e.autofocused&&!n;if(m.dropdown?.getState().visible&&!i&&c.close(),l.ctrl=r,n&&await s9(e).catch(()=>!1)){let t="field"===e.type?e.field:void 0,n=t?.getFormHandle(),i=n?.element,o=m.attachDropdown(i);if(!o)return;o.open(e,r);let a=()=>c.close(e),l=s8(c,e),d=n?.scrollParent(t?.element);s.addListener(window,"resize",a,{once:!0,passive:!0}),s.addListener(window,"scroll",lf(window,a),lp),s.addListener(window,"popstate",a),s.addListener(window,"hashchange",a),s.addListener(window,"beforeunload",a),s.addListener(window,"focus",l),s.addListener(window,"blur",l),s.addListener(window,"mousedown",s6(u,a)),s.addListener(document,"keydown",e=>"Escape"===e.key&&a(),{capture:!0}),s.addListener(window,"wheel",a,{capture:!0,once:!0}),d&&s.addListener(d,"scroll",lf(d,a),lp),s.addSubscriber(o.subscribe(t=>{switch(t.type){case"close":s.removeAll();break;case"abort":s7(m.dropdown?.anchor,e)&&s.removeAll()}}))}},close:e=>{let t=m.dropdown,r=t?.anchor,n=(()=>{switch(e?.type){case"field":return r?.type===e.type&&r.field.element===e.field.element;case"frame":return r?.type===e.type&&r.fieldId===e.fieldId&&r.formId===e.formId}})();(!e||n)&&(s.removeAll(),l.ctrl?.abort(),l.ctrl=null,m.dropdown?.close())},destroy:()=>{s.removeAll(),l.ctrl?.abort(),l.ctrl=null,m.dropdown?.destroy()},sendMessage:e=>m.dropdown?.sendMessage(e),getState:async e=>{let t=m.dropdown;if(!t)return{visible:!1,focused:!1};e&&t.getState().visible&&!t.focused&&await aD(15);let r=t.getState().visible,n=t.focused,i=t.anchor;return{visible:r,focused:n,attachedField:i?(()=>{switch(i.type){case"field":{let{fieldId:e,formId:t,frameId:r}=i.field;return{fieldId:e,formId:t,frameId:r}}case"frame":{let{fieldId:e,formId:t,frameId:r}=i;return{fieldId:e,formId:t,frameId:r}}}})():void 0}}}),g=lm({channel:d,dropdown:f,tag:e.control,mainFrame:r}),h=({payload:e})=>{let{autofilled:t,autofocused:r,field:n}=e,{frameId:i,fieldId:o,formId:a}=n,{coords:s,action:l,origin:u}=e,c=m.root,d=sZ?{top:0,left:0}:c.customElement.getBoundingClientRect(),p=d.top+s.top,g=d.left+s.left;return f.toggle({type:"frame",action:l,autofilled:t,autofocused:r,coords:{top:p,left:g},fieldId:o,formId:a,frameId:i,origin:u})},A=({payload:e})=>f.close(e.field?{type:"frame",formId:e.field.formId,fieldId:e.field.fieldId,frameId:e.field.frameId}:void 0),y=(e,t)=>(Promise.resolve(f.getState()).then(t).catch(p),!0),b=()=>{m.attachDropdown()};return{init:()=>{m.init(),d.register(oQ.INLINE_DROPDOWN_TOGGLE,h),d.register(oQ.INLINE_DROPDOWN_CLOSE,A),d.register(oQ.INLINE_DROPDOWN_STATE,y),d.register(oQ.INLINE_DROPDOWN_ATTACH,b)},setTheme:m.setTheme,destroy:()=>{m.destroy(),f.destroy(),g.destroy(),d.unregister(oQ.INLINE_DROPDOWN_TOGGLE,h),d.unregister(oQ.INLINE_DROPDOWN_CLOSE,A),d.unregister(oQ.INLINE_DROPDOWN_STATE,y),d.unregister(oQ.INLINE_DROPDOWN_ATTACH,b)},sync:U(e=>{if(!e)return;let{status:t}=e.getState(),r=sG(t);if(sz(t)||r){let e=m.notification?.getState().action,t=[en.PASSKEY_CREATE,en.PASSKEY_GET];r&&(!e||t.includes(e))||m.notification?.destroy()}}),icon:g,dropdown:f,notification:{attach:()=>m.attachNotification(),open:e=>m.attachNotification()?.open(e),close:e=>{e&&m.notification?.getState().action!==e||m.notification?.close()},destroy:()=>m.notification?.destroy()}}})(i):(({controller:e,elements:t,mainFrame:r})=>{let n,i,o,a,s,l,u;if(r)throw Error("InlineRelay should only be created in sub-frames");let{channel:c}=e,d=(n=sd(),i=({payload:e})=>{if("relay"===e.type&&e.passive){let{frameId:t,fieldId:r,formId:i}=e,o=()=>{n.removeAll(),oZ(o0({type:oQ.INLINE_DROPDOWN_CLOSE,payload:{field:{frameId:t,fieldId:r,formId:i}}})).catch(p)};n.addListener(window,"scroll",lf(window,o),lp),n.addListener(window,"focus",o,{once:!0}),n.addListener(window,"wheel",o,{capture:!0,once:!0})}},o=()=>{n.removeAll()},{init:()=>{c.register(oQ.INLINE_DROPDOWN_OPENED,i),c.register(oQ.INLINE_DROPDOWN_CLOSED,o)},destroy:()=>{n.removeAll(),c.unregister(oQ.INLINE_DROPDOWN_OPENED,i),c.unregister(oQ.INLINE_DROPDOWN_CLOSED,o)}}),m=(a=Promise.resolve(),s=!0,l={push:e=>(s=!0,a=a.then(()=>s?Promise.resolve(e()):void 0).catch(p)),cancel:()=>{s=!1,a=Promise.resolve()},settled:()=>a.then(()=>!0).catch(()=>!0)},{listeners:u=sd(),attach:()=>{oZ(o0({type:oQ.INLINE_DROPDOWN_ATTACH})).catch(p)},toggle:U((e,t)=>{if("frame"===t.type)return;let{fieldId:r,frameId:n,formId:i}=t.field,o=(()=>{let r=e?.getExtensionContext()?.url;if(r)return t.action===ei.AUTOFILL_CC?(({domain:e,hostname:t})=>e??t)(r):(({domain:e,subdomain:t,hostname:r})=>t??e??r)(r)})();o&&l.push(async()=>{let e=t.field.getAnchor().element,a=aY(e),{left:s,top:l}=e.getBoundingClientRect(),{value:u}=aJ(a,"outer"),{value:c}=a0(a,"outer");await oZ(o0({type:oQ.INLINE_DROPDOWN_TOGGLE,payload:{type:"initial",action:t.action,autofilled:t.autofilled,autofocused:t.autofocused,frameAttributes:a4(),field:{fieldId:r,formId:i,frameId:n},origin:o,coords:{top:l+u,left:s+c-250}}}))})}),close:e=>{l.push(async()=>{u.removeAll(),await oZ(o0({type:oQ.INLINE_DROPDOWN_CLOSE,payload:{field:(()=>{if(e&&e?.type==="field"){let{fieldId:t,frameId:r,formId:n}=e.field;return{fieldId:t,formId:n,frameId:r}}})()}}))})},destroy:()=>{l.cancel(),u.removeAll()},sendMessage:p,getState:a1(async()=>{let e=await l.push(()=>oZ(o0({type:oQ.INLINE_DROPDOWN_STATE})));return e?.type==="success"?e:{visible:!1,focused:!1}},{maxAge:1})}),f={attach:p,open:p,close:p,destroy:p},g=lm({channel:c,dropdown:m,tag:t.control,mainFrame:r}),h=U((e,{payload:t})=>{if(!("relay"===t.type&&!t.passive))return;let{fieldId:r,formId:n}=t,i=e?.service.formManager.getFormById(n),o=i?.getFieldById(r);if(!(i&&o))return;let a={type:"field",field:o},s=()=>m.close(a),l=s8(m,a),u=i.scrollParent();m.listeners.addListener(window,"scroll",lf(window,s),lp),m.listeners.addListener(window,"blur",l),m.listeners.addListener(window,"focus",l),m.listeners.addListener(u,"scroll",lf(u,s),lp),m.listeners.addListener(window,"mousedown",s6(()=>o,s)),m.listeners.addListener(window,"wheel",s,{capture:!0,once:!0})}),A=U((e,{payload:t})=>{if(!("relay"===t.type&&!t.passive))return;m.listeners.removeAll();let{fieldId:r,formId:n}=t,i=e?.service.formManager.getFormById(n),o=i?.getFieldById(r);o&&s3(o,t)});return{init:()=>{c.register(oQ.INLINE_DROPDOWN_OPENED,h),c.register(oQ.INLINE_DROPDOWN_CLOSED,A),d.init()},destroy:()=>{m.destroy(),f.destroy(),g.destroy(),c.unregister(oQ.INLINE_DROPDOWN_OPENED,h),c.unregister(oQ.INLINE_DROPDOWN_CLOSED,A),d.destroy()},setTheme:p,sync:p,icon:g,dropdown:m,notification:f}})(i),passkey:i.mainFrame?(E=sd(),a={requestToken:null},C=v={get data(){let e=Object.freeze({...a});return s?.(e)??e},merge:e=>(a=ar(a,e),v),get:e=>a[e],set:(e,t)=>(a[e]="function"==typeof t?t(a[e]):t,v)},T=(({windowMax:e,windowMs:t})=>{let r=new Map,n=(e="*")=>{let t=r.get(e);t&&(t.count=0,t.start=Date.now())};return{allowMessage:(i="*",o)=>{let a,s=((a=r.get(i))||(a={count:0,start:Date.now()},r.set(i,a)),a);return Date.now()-s.start>=(o?.windowMs??t)&&n(i),!(s.count>=(o?.windowMax??e))&&(s.count+=1,!0)},reset:n}})({windowMax:1,windowMs:500}),_=e=>C.get("requestToken")===e,R=(e,t)=>{e&&window.postMessage(t?lS({type:"success",intercept:!1},e):{token:e,type:l_})},I=U(e=>{let t=C.get("requestToken");t&&(R(t,!1),C.set("requestToken",null),e?.service.inline.notification.close())}),S=(e,t)=>{t instanceof lx?R(e,t.allowNativeWebAuthn):R(e,!0)},O=async(e,t)=>{I(),C.set("requestToken",e),await s4(U(r=>{if(!r)throw new lx({allowNativeWebAuthn:!0});let{ready:n,status:i,stale:o}=r.getState(),a=sj(i),s=sz(i);if(o)throw new lx({allowNativeWebAuthn:!0});if(!_(e))throw new lx({allowNativeWebAuthn:!1});if(n){if(s||a&&!t())throw new lx({allowNativeWebAuthn:!0});return a}return!1}),50)},D=(N=e=>U(t=>{let r=t?.getSettings(),n=t?.getFeatures();return!!n?.Passkeys&&e({get:r?.passkeys.get??!1,create:r?.passkeys.create??!1})}))(({get:e})=>e),M=N(({create:e})=>e),G=N(({get:e,create:t})=>e||t),H=U((e,t)=>{switch(t.request.type){case oQ.PASSKEY_CREATE:{let{token:r}=t,{request:n}=t.request.payload,i=location.hostname;if(!T.allowMessage(t.request.type)){I(),R(r,!1);return}return O(r,M).then(()=>{e?.service.inline.notification.open({action:en.PASSKEY_CREATE,domain:i,request:n,token:r})}).catch(e=>S(r,e))}case oQ.PASSKEY_GET:{let{token:r}=t,{request:n}=t.request.payload,i=location.hostname;if(!T.allowMessage(t.request.type)){I(),R(r,!1);return}return O(r,D).then(async()=>{let t=(JSON.parse(n).allowCredentials??[]).map(ea("id"));await oZ.on(o0({type:oQ.PASSKEY_QUERY,payload:{domain:i,credentialIds:t}}),t=>{if(!_(r))return R(r,!1);let o="success"===t.type?t.passkeys:[];return o.length?e?.service.inline.notification.open({action:en.PASSKEY_GET,domain:i,passkeys:o,request:n,token:r}):R(r,!0)})}).catch(e=>S(r,e))}case oQ.PASSKEY_INTERCEPT:if(T.allowMessage(t.request.payload.reason,{windowMax:5}))return window.postMessage(lS({type:"success",intercept:G()},t.token))}}),$=U(e=>{E.addListener(window,"message",U(async(e,{data:t})=>{let r=C.get("requestToken");if(r&&lN(r)(t))e?.service.inline.notification.close();else if("object"==typeof t&&"string"==typeof t?.token&&t?.type==="Pass::MainWorld::Message"&&lI.includes(t?.request?.type))return H(t)})),document.querySelectorAll('input[autocomplete*="webauthn"]').length>0&&e?.service.inline.notification.attach()}),{abort:R,approve:O,destroy:()=>{R(C.get("requestToken"),!1),C.set("requestToken",null),window.postMessage({type:lR}),E.removeAll()},handler:H,init:$,limiter:T,state:C}):void 0},destroy:i.destroy,getExtensionContext:()=>lP.read(),getFeatureFlags:()=>c,getFeatures:()=>{let e=Y.getExtensionContext();return((e,t,r)=>{let{disallowedDomains:n}=e,{autofill:i,autosuggest:o,autosave:a,passkeys:s}=e,l=[t,r].filter(ef).map(e=>(({disallowedDomains:e,url:t})=>{let r=(t?.domain?e[t.domain]:0)|(t?.subdomain?e[t.subdomain]:0);return{Autofill:lM(r,"Autofill"),Autofill2FA:lM(r,"Autofill2FA"),Autosave:lM(r,"Autosave"),Autosuggest:lM(r,"Autosuggest"),Passkey:lM(r,"Passkey")}})({disallowedDomains:n,url:e})),u=l.length>0?l.reduce(lU):lk;return{Autofill:(i.login||i.identity)&&!u.Autofill,Autofill2FA:i.twofa&&!u.Autofill2FA,Autosave:a.prompt&&!u.Autosave,AutosuggestAlias:o.email&&!u.Autosuggest,AutosuggestPassword:o.password&&!u.Autosuggest,CreditCard:!!i.cc&&!u.Autofill,Passkeys:(s.create||s.get)&&!u.Passkey}})(u,e?.url??null,e?.tabUrl??null)},getSettings:()=>u,getState:()=>l,setFeatureFlags:e=>(Object.keys(c).forEach(e=>delete c[e]),Object.assign(c,e)),setSettings:e=>Object.assign(u,e),setState:e=>Object.assign(l,e)})),j=sm(()=>{q.service.formManager.sync(),q.service.autofill.sync().catch(p),q.service.inline.sync()}),K=async e=>{var t,r;if(lW(e,{sender:"background"}))switch(e.type){case oQ.AUTOFILL_SYNC:return q.service.autofill.sync({forceSync:!0});case oQ.FEATURE_FLAGS_UPDATE:let n;return n=e.payload,q.setFeatureFlags(n);case oQ.SETTINGS_UPDATE:return t=e.payload,void(q.setSettings(t),q.service.inline.setTheme(t.theme),j());case oQ.WORKER_STATE_CHANGE:return r=e.payload.state,void(q.setState(r),j());case oQ.UNLOAD_CONTENT_SCRIPT:return q.destroy({reason:"unload script"})}},V=eg(async({tabId:t,port:r})=>{try{q.service.inline.init(),q.service.passkey?.init();let i=await oZ(o0({type:oQ.CLIENT_INIT,payload:{endpoint:"contentscript",tabId:t}}));if("error"===i.type)throw Error("Client initialization failure");q.setSettings(i.settings),q.setFeatureFlags(i.features),q.service.inline.setTheme(i.settings.theme);let o=q.getFeatures();if(!lB(o)&&!o.Passkeys)return q.destroy({reason:"injection settings"});q.setState({...i.state,ready:!0,stale:!1}),j(),q.mainFrame&&window.postMessage({type:"PassClientScriptReady"}),r.onMessage.addListener(K),z.debug(`[ContentScript::${e}] Worker status resolved "${i.state.status}"`),lB(o)&&(await q.service.detector.init(),await q.service.formManager.detect({reason:"InitialLoad"}).catch(p),n.observer.subscribe(e=>"mutation"===e.type&&q.service.formManager.detect({reason:e.reason})))}catch(e){q.destroy({reason:"startup failure"})}});return{get context(){return q},start:async()=>{try{let t=await lL({endpoint:"contentscript",onDisconnect:()=>{n.stop("port disconnected"),n.start()},onError:n.destroy});z.debug(`[ContentScript::${e}] Starting content-script service`),q.getState().stale||await V(t)}catch{}},destroy:e=>{q.destroy(e),k.clear()}}},lH=["type","id","name"],l$=["style","class",...lH],lY=e=>({childList:!0,subtree:!0,attributeFilter:e,attributes:!0,attributeOldValue:!0}),lq=async()=>{let e,t,r=await oZ(o0({type:oQ.REGISTER_ELEMENTS}));if("error"===r.type)throw Error("Custom elements registration failure");return{root:(e=r.hash,`protonpass-root-${e}`),control:(t=r.hash,`protonpass-control-${t}`)}},lj=()=>oZ(o0({type:oQ.PING})),lz=U((e,{payload:t},r)=>{let n=a8(t.frameId,t.frameAttributes);if(n)if((e=>{try{let t=e.getAttribute?.("sandbox");if(null==t)return!1;if(""===t)return!0;let r=new Set(t.toLowerCase().split(" "));return!["allow-scripts","allow-same-origin"].every(e=>r.has(e))}catch{return!1}})(n))r({ok:!1});else switch(t.type){case"form":let i=e?.service.formManager.getForms(),o=i?.find(e=>e.element.contains(n));r({ok:!0,type:"form",formId:o?.formId??null});break;case"position":r(a7(n)?{ok:!0,type:"position",coords:(e=>{let{top:t,left:r}=e.getBoundingClientRect(),n=aY(e);return{top:t+aK(n),left:r+aQ(n)}})(n),frameAttributes:a4()}:{ok:!1})}else r({ok:!1});return!0});(async()=>(({clientFactory:e,scriptId:t,mainFrame:r})=>{let n,i,o,a,s,l,u,c,d,m,p,f,g=r?(n={},{start:(e,t)=>{z.debug(`[ActivityProbe] probe set to ${t}ms`),clearInterval(n?.interval),n.interval=setInterval(e,t),e()},cancel:()=>{z.debug("[ActivityProbe] Cancelling probe.."),clearInterval(n?.interval)}}):null,h=sd(),A=(i=ly(),o=sd(),a={idle:!0,observer:null,staleMutationsCount:0},s=e=>{let t=e?tM(e,tJ):null;t&&ro(t,{preserveIgnored:!1})},l=e=>{e.some(e=>{if("childList"===e.type){var t;let r;if(a.staleMutationsCount=0,!a_(e.target))return!1;let n=Array.from(e.removedNodes).some(aO),i=Array.from(e.addedNodes).some(aS);return i&&s(e.target),n&&(r=(t=e.target)&&t4(t)?t:t8(t))&&ro(r,{preserveIgnored:!1}),i||n}if("attributes"===e.type){if(!aI(e.target))return!1;let{oldValue:t,attributeName:r,target:n}=e,i=r?n?.getAttribute(r):null;if(oq(e.target)){let e=!!(r&&lH.includes(r));return e&&delete n.__PP_SEEN__,e}if(null!==t&&t===i?a.staleMutationsCount++:a.staleMutationsCount=0,a.staleMutationsCount>25){let e=lY(l$.filter(e=>e!==r));a.observer?.disconnect(),a.observer=o.addObserver(document.body,l,e)}return aC(n)}return!1})&&i.publish({type:"mutation",reason:"DomMutation"})},u=((e,t,r,{flushThreshold:n,...i})=>{let o=new Set,a=ag()(()=>{let t=Array.from(o.values());o.clear(),t.length>0&&e(t)},r,i),s=e=>{let r=t(e);!1!==r&&o.add(r),n&&o.size>=n?a.flush():a()};return s.cancel=()=>{o.clear(),a.cancel()},s.flush=a.flush,s})(e=>{requestAnimationFrame(()=>{(()=>{if(e.length>=15&&aT(document.body))return!0;for(let t of e)try{if(aT(t))return!0;if(t===document.body)break}catch{}return!1})()&&i.publish({type:"mutation",reason:"TransitionEnd"})})},({target:e})=>!!(e&&a_(e))&&e,250,{leading:!0}),c=({target:e})=>{e&&oY(e)&&(()=>{if(av(e))return!0;if(rs(e)){let t=se(e.shadowRoot);return t&&oY(t)&&av(t)}return!1})()&&(s(e),i.publish({type:"mutation",reason:"FocusIn"}))},d=ag()(e=>i.publish({type:"event",event:e}),150),m=e=>i.publish({type:"event",event:e}),{observe:()=>{a.idle&&(z.debug("[PageObserver] watching for changes.."),a.idle=!1,a.observer=o.addObserver(document.body,l,lY(l$)),o.addListener(document.body,"transitionend",u),o.addListener(document.body,"animationend",u),o.addListener(document.body,"focusin",c),o.addListener(window,"focus",m),o.addListener(window,"blur",m),r||o.addListener(window,"resize",d),s1.connect())},destroy:()=>{z.debug("[PageObserver] Destroyed"),i.unsubscribe(),o.removeAll(),u.cancel(),s1.disconnect(),a.observer=null,a.idle=!0},subscribe:(e,t)=>{let r=i.subscribe(n=>{e(n),t?.once&&r()});return r}}),y={instance:null,channel:(p=new Map,f=(e,t,r)=>{if(lW(e,{sender:"background"})){let t;return p.get(e.type)?.forEach(n=>{try{let i=n(e,r);!0===i&&(t=!0)}catch(t){z.error(`[FrameMessageBroker] Failed processing "${e.type}"`,t)}}),t}},Q.runtime.onMessage.addListener(f),{register:(e,t)=>{let r=p.get(e)??[];r.push(t),p.set(e,r)},unregister:(e,t)=>{let r=p.get(e)??[];r.length?p.set(e,r.filter(ed(ep(t)))):p.delete(e)},destroy:()=>{p.clear(),Q.runtime.onMessage.removeListener(f)}}),observer:A,deferred:!1,deferredUnsubscribe:void 0,elements:null,registerElements:eg(async()=>y.elements?y.elements:y.elements=await lq()),defer:()=>{z.debug(`[ClientController::${t}] Deferring sub-frame initialization`),A.observe(),y.deferred=!0;let e=async e=>"mutation"===e.type||"event"===e.type&&"resize"===e.event.type&&a9(r),n=A.subscribe(async t=>{if(y.instance)return y.deferredUnsubscribe?.();await e(t)&&y.start()});y.deferredUnsubscribe=()=>{n(),delete y.deferredUnsubscribe}},init:async()=>{let e;y.channel.register(oQ.UNLOAD_CONTENT_SCRIPT,()=>y.destroy("unload")),y.channel.register(oQ.FRAME_QUERY,lz),y.channel.register(oQ.FRAME_DEFERRED_INIT,()=>{a7.clear(),!y.instance&&y.deferred&&a9(r).then(e=>e&&y.startImmediate())}),e=j().methodFactory,j().methodFactory=function(t,r,n){let i=e(t,r,n);return function(...e){try{((...e)=>oZ(o0({type:oQ.LOG_EVENT,payload:{log:e.join(" ")}})))(...e.map(e=>e instanceof Error?e.message:e)),i(...e)}catch{}}},j().rebuild();let t=new AbortController,n=sp(async(e,t)=>{let n=await a9(r);t.aborted||(n?y[e.immediate?"startImmediate":"start"]():r?y.stop("frame-hidden"):y.defer())});h.addListener(document,"visibilitychange",()=>{switch(document.visibilityState){case"visible":return n({immediate:!1},(t=new AbortController).signal);case"hidden":return t.abort(),y.stop("hidden")}}),await n({immediate:!0},t.signal)},start:ag()(async()=>{if(A.observe(),y.deferredUnsubscribe?.(),!y.instance)try{!r&&y.deferred&&(oZ(o0({type:oQ.FRAME_DEFERRED_INIT})),z.debug(`[ClientController::${t}] Starting sub-frame client`),y.deferred=!1);let n=await y.registerElements();y.instance=e({scriptId:t,elements:n,mainFrame:r,controller:y}),y.instance.start(),g?.start(lj,25e3)}catch{y.destroy()}},350,{leading:!1,trailing:!0}),startImmediate:()=>{y.instance||(y.start(),y.start.flush())},stop:e=>{g?.cancel(),y.start.cancel(),y.observer.destroy(),y.deferredUnsubscribe?.(),y.instance?.destroy({reason:e}),y.deferred=!1,y.instance=null},destroy:e=>{let t=e instanceof Error?e.message:e;h.removeAll(),y.stop(String(t??"destroyed")),y.channel.destroy(),y.elements=null}};return y})({mainFrame:d(),scriptId:m(16),clientFactory:lG}).init())().catch(p)})()})();
