1"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[77683],{1369(e,t,r){r.d(t,{A:()=>a});var s=r(1452);class o{constructor(){this._storage={}}setItem(e,t){return this._storage[e]=t}getItem(e){return Object.prototype.hasOwnProperty.call(this._storage,e)?this._storage[e]:null}removeItem(e){return delete this._storage[e]}key(e){return Object.values(this._storage)[e]||null}clear(){return this._storage={}}}class i{constructor(){this._storage=null,this._chooseStorage(),this._validateStorage()}_chooseStorage(){return i._isSupported("localStorage")?this._storage=window.localStorage:i._isSupported("sessionStorage")?this._storage=window.sessionStorage:s.A.isSupported()?this._storage=s.A:this._storage=new o}static _isSupported(e){try{let t="__storage_test";return window[e].setItem(t,"1"),window[e].removeItem(t),!0}catch(e){return!1}}_validateStorage(){if("function"!=typeof this._storage.setItem)throw Error('The storage must have a "setItem" function');if("function"!=typeof this._storage.getItem)throw Error('The storage must have a "getItem" function');if("function"!=typeof this._storage.removeItem)throw Error('The storage must have a "removeItem" function');if("function"!=typeof this._storage.key)throw Error('The storage must have a "key" function');if("function"!=typeof this._storage.clear)throw Error('The storage must have a "clear" function')}getStorage(){return this._storage}}let a=Object.freeze(new i).getStorage()},7683(e,t,r){r.r(t),r.d(t,{default:()=>l});var s=r(4059),o=r(4335),i=r(1369);let a="checkbox",n="select-multiple";class l extends o.A{static #e=this.options={strictMode:!1,ignoredElementTypes:["button","file","hidden","image","password","reset","submit"],ignoredElementNames:[],elementTypesForInputEvent:["date","datetime-local","email","month","number","search","tel","text","textarea","time","week","url"],delay:300};init(){this.storage=i.A,this.storedKeys=[],this._prepareElements(),this._registerFormEvent()}_prepareElements(){let e=this.el.elements,t=document.querySelectorAll(`:not(form) > [form="${this.el.id}"]`);e=Array.from(e),this.formElements=e.concat(Array.from(t)),this.formElements.forEach(e=>{let t=e.type;this.options.ignoredElementTypes.includes(t)||this.options.ignoredElementNames.includes(e.name)||(this._registerFormElementEvent(e),this._setElementValue(e,t))})}_registerFormElementEvent(e){let t=s.A.debounce(this._onInput.bind(this),this.options.delay);if(this.options.elementTypesForInputEvent.includes(e.type)){e.addEventListener("input",t);return}e.addEventListener("change",this._onChange.bind(this))}_setElementValue(e,t){let r=this._generateKey(e.name),s=this.storage.getItem(r);if(null!==s){if(this.storedKeys.push(r),t===a){e.checked=s;return}if(t===n){this._setMultiSelectValues(e,s);return}if("radio"===t){s===e.value&&(e.checked=!0);return}e.value=s}}_onInput(e){this._setToStorage(e.target)}_onChange(e){this._setToStorage(e.target)}_setToStorage(e){let t=this._generateKey(e.name);this.storedKeys.push(t);let r=e.type;if(r===a){e.checked?this.storage.setItem(t,!0):this.storage.removeItem(t);return}if(r===n){this._storeMultiSelect(e,t);return}if(""!==e.value){this.storage.setItem(t,e.value);return}this.storage.removeItem(t)}_storeMultiSelect(e,t){let r=e.selectedOptions;if(0===r.length){this.storage.removeItem(t);return}let s=Array.from(r).map(e=>e.value);this.storage.setItem(t,s)}_setMultiSelectValues(e,t){let r=t.split(","),s=e.options;for(let e=0;e<s.length;e++){let t=s[e];r.includes(t.value)&&(t.selected=!0)}}_registerFormEvent(){this.el.addEventListener("submit",()=>this._clearStorage()),this.el.addEventListener("reset",()=>this._clearStorage())}_clearStorage(){this.storedKeys.forEach(e=>{this.storage.removeItem(e)})}_generateKey(e){return`${this.el.id}.${e}`}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.