var base2={name:"base2",version:"1.0",exports:"Base,Package,Abstract,Module,Enumerable,Map,Collection,RegGrp,Undefined,Null,This,True,False,assignID,detect,global",namespace:""};new function(_no_shrink_){var Undefined=K(),Null=K(null),True=K(!0),False=K(!1),This=function(){return this},global=This(),base2=global.base2,_FORMAT=/%([1-9])/g,_LTRIM=/^\s\s*/,_RTRIM=/\s\s*$/,_RESCAPE=/([\/()[\]{}|*+-.,^$?\\])/g,_BASE=/try/.test(detect)?/\bbase\b/:/.*/,_HIDDEN=["constructor","toString","valueOf"],_MSIE_NATIVE_FUNCTION=detect("(jscript)")?new RegExp("^"+rescape(isNaN).replace(/isNaN/,"\\w+")+"$"):{test:False},_counter=1,_slice=Array.prototype.slice;function assignID(e){return e.base2ID||(e.base2ID="b2_"+_counter++),e.base2ID}_Function_forEach();var _subclass=function(e,t){base2.__prototyping=this.prototype;var n=new this;e&&extend(n,e),delete base2.__prototyping;var i,a=n.constructor;function r(){if(!base2.__prototyping){if(this.constructor!=arguments.callee&&!this.__constructing)return extend(arguments[0],n);this.__constructing=!0,a.apply(this,arguments),delete this.__constructing}return this}for(i in n.constructor=r,Base)r[i]=this[i];return r.ancestor=this,r.base=Undefined,t&&extend(r,t),r.prototype=n,r.init&&r.init(),r["#implements"]=[],r["#implemented_by"]=[],r},Base=_subclass.call(Object,{constructor:function(){0")+1);return match(outerHTML,/type="?([^\s">]*)"?/i)[1]||null},removeAttribute:function(e,t){void 0!==e.className&&(t=_ATTRIBUTES[t.toLowerCase()]||t),this.base(e,t)},setAttribute:function(e,t,n){var i;void 0===e.className?this.base(e,t,n):"style"==t?e.style.cssText=n:(n=String(n),(i=_getAttributeNode(e,t))?i.nodeValue=n:this.base(e,_ATTRIBUTES[t.toLowerCase()]||t,n))}},"@!(element.hasAttribute)":{hasAttribute:function(e,t){return void 0===e.className?this.base(e,t):null!=this.getAttribute(e,t)}}});detect("MSIE.+win")&&extend(Element.prototype,"cloneNode",function(e){e=this.base(e||!1);return e.base2ID=void 0,e});var _HTML_ATTRIBUTES="colSpan,rowSpan,vAlign,dateTime,accessKey,tabIndex,encType,maxLength,readOnly,longDesc";extend(_ATTRIBUTES,Array2.combine(_HTML_ATTRIBUTES.toLowerCase().split(","),_HTML_ATTRIBUTES.split(",")));var _getAttributeNode=document.documentElement.getAttributeNode?function(e,t){return e.getAttributeNode(t)}:function(e,t){return e.attributes[t]||e.attributes[_ATTRIBUTES[t.toLowerCase()]]},TEXT=detect("(element.textContent===undefined)")?"innerText":"textContent",Traversal=Module.extend({getDefaultView:function(e){return this.getDocument(e).defaultView},getNextElementSibling:function(e){for(;(e=e&&e.nextSibling)&&!this.isElement(e);)continue;return e},getNodeIndex:function(e){for(var t=0;e=e&&e.previousSibling;)t++;return t},getOwnerDocument:function(e){return e.ownerDocument},getPreviousElementSibling:function(e){for(;(e=e&&e.previousSibling)&&!this.isElement(e);)continue;return e},getTextContent:function(e,t){return e[t?"innerHTML":TEXT]},isEmpty:function(e){for(e=e.firstChild;e;){if(3==e.nodeType||this.isElement(e))return!1;e=e.nextSibling}return!0},setTextContent:function(e,t,n){return e[n?"innerHTML":TEXT]=t},"@!MSIE":{setTextContent:function(node,text,isHTML){with(node)for(;lastChild;)parentNode.removeChild(lastChild);return this.base(node,text,isHTML)}},"@MSIE":{getDefaultView:function(e){return(e.document||e).parentWindow},"@MSIE5":{getOwnerDocument:function(e){return e.ownerDocument||e.document}}}},{contains:function(e,t){for(e.nodeType;(t=t&&t.parentNode)&&e!=t;)continue;return!!t},getDocument:function(e){return this.isDocument(e)?e:e.ownerDocument||e.document},isDocument:function(e){return!(!e||!e.documentElement)},isElement:function(e){return!(!e||1!=e.nodeType)},"@(element.contains)":{contains:function(e,t){return e!=t&&(this.isDocument(e)?e==this.getOwnerDocument(t):e.contains(t))}},"@MSIE5":{isElement:function(e){return!(!e||1!=e.nodeType||"!"==e.nodeName)}}}),AbstractView=Binding.extend(),_CAPTURE_TYPE={},_TYPE_MAP={2:2,4:1},_CAPTURING_PHASE=1,_AT_TARGET=2,_BUBBLING_PHASE=3,_MOUSE_BUTTON=/^mouse(up|down)|click$/,_MOUSE_CLICK=/click$/,_BUBBLES="abort|error|select|change|resize|scroll|",_CANCELABLE="(dbl)?click|mouse(down|up|over|move|out|wheel)|key(down|up)|submit|reset",_W3C_EVENT_TYPE,_CAPTURE_TYPE,_BUBBLES=new RegExp("^("+_BUBBLES+_CANCELABLE+")$"),_CANCELABLE=new RegExp("^("+_CANCELABLE+")$");_MSIE&&(_W3C_EVENT_TYPE={focusin:"focus",focusout:"blur"},_CAPTURE_TYPE={focus:"focusin",blur:"focusout"});var _CAN_DELEGATE=/^(blur|submit|reset|change|select)$|^(mouse|key|focus)|click$/,Event=Binding.extend({"@!(document.createEvent)":{initEvent:function(e,t,n,i){e.type=String(t),e.bubbles=!!n,e.cancelable=!!i},preventDefault:function(e){!1!==e.cancelable&&(e.returnValue=!1)},stopPropagation:function(e){e.cancelBubble=!0},"@MSIE":{preventDefault:function(e){var t,n;this.base(e),"mousedown"==e.type&&(t="onbeforedeactivate",(n=Traversal.getDocument(e.target)).attachEvent(t,function(e){e.returnValue=!1,n.detachEvent(t,arguments.callee)}))}}}},{CAPTURING_PHASE:_CAPTURING_PHASE,AT_TARGET:_AT_TARGET,BUBBLING_PHASE:_BUBBLING_PHASE,"@!(document.createEvent)":{"@MSIE":{bind:function(e){var t=e.type;return e.timeStamp||(e.bubbles=_BUBBLES.test(t),e.cancelable=_CANCELABLE.test(t),e.timeStamp=(new Date).valueOf()),e.relatedTarget=e[(e.target==e.fromElement?"to":"from")+"Element"],this.base(e)}}},cloneEvent:function(e){var t=copy(e);return t.stopPropagation=function(){e.stopPropagation()},t.preventDefault=function(){e.preventDefault()},t},"@MSIE":{cloneEvent:copy}}),EventDispatcher=Base.extend({constructor:function(e){this.state=e,this.events=e.events},dispatch:function(e,t,n){t.eventPhase=n;var i=this.events[t.type][n];if(i)for(var a=e.length;a--&&!t.cancelBubble;){var r=e[a],s=i[r.base2ID];if(s)for(var o in s=copy(s),t.currentTarget=r,t.eventPhase=r==t.target?_AT_TARGET:n,s){o=s[o];"function"==typeof o?o.call(r,t):o.handleEvent(t)}}},handleEvent:function(e,t){Event.bind(e);var n=e.type,i=_W3C_EVENT_TYPE[n];if(i&&(n=(e=copy(e)).type=i),this.events[n]){_MOUSE_BUTTON.test(n)&&(n=_MOUSE_CLICK.test(n)?this.state._button:e.button,n=_TYPE_MAP[n]||0,e.button!=n&&((e=copy(e)).button=n));for(var a=e.target,r=[],s=0;a;)a=(r[s++]=a).parentNode;this.dispatch(r,e,_CAPTURING_PHASE),e.cancelBubble||(e.bubbles||(r.length=1),r.reverse(),this.dispatch(r,e,_BUBBLING_PHASE))}return!1!==e.returnValue},"@MSIE.+win":{handleEvent:function(e){return"scroll"==e.type?(setTimeout(bind(this.base,this,copy(e),!0),0),!0):this.base(e)},"@MSIE5":{dispatch:function(e,t,n){n!=_CAPTURING_PHASE||Array2.item(e,-1).documentElement||e.push(e[0].document),this.base(e,t,n)}}}}),_wrappedListeners={},EventTarget=Interface.extend({"@!(element.addEventListener)":{addEventListener:function(e,t,n,i){var a=DocumentState.getInstance(e),r=assignID(e),s=assignID(n),o=i?_CAPTURING_PHASE:_BUBBLING_PHASE,a=a.registerEvent(t,e),e=(e=a[o])||(a[o]={});i&&(t=_CAPTURE_TYPE[t]||t),(e[r]||(e[r]={}))[s]=n},dispatchEvent:function(e,t){return t.target=e,DocumentState.getInstance(e).handleEvent(t)},removeEventListener:function(e,t,n,i){t=DocumentState.getInstance(e).events[t];t&&(!(i=t[i?_CAPTURING_PHASE:_BUBBLING_PHASE])||(e=i[e.base2ID])&&delete e[n.base2ID])}},"@(element.addEventListener)":{"@Gecko":{addEventListener:function(t,e,n,i){var a;"mousewheel"==e&&(e="DOMMouseScroll",a=n,n=_wrappedListeners[assignID(n)]=function(e){(e=Event.cloneEvent(e)).type="mousewheel",e.wheelDelta=40*-e.detail||0,_handleEvent(t,a,e)}),this.base(t,e,n,i)}},"@webkit[1-4]|KHTML[34]":{addEventListener:function(n,e,t,i){var a;_MOUSE_BUTTON.test(e)?(a=t,t=_wrappedListeners[assignID(t)]=function(e){var t=_TYPE_MAP[e.button]||0;e.button!=t&&((e=Event.cloneEvent(e)).button=t),_handleEvent(n,a,e)}):"object"==typeof t&&(t=_wrappedListeners[assignID(t)]=bind("handleEvent",t)),this.base(n,e,t,i)}},"@Linux|Mac|opera":{addEventListener:function(a,e,t,n){var r;"keydown"==e&&(r=t,t=_wrappedListeners[assignID(t)]=function(t){var n=0,i=!1;function e(e){i&&e.preventDefault(),(e==t||1>8,(16711680&i)>>16)}var _CSSStyleDeclaration_ReadOnly=Binding.extend({getPropertyValue:function(e,t){return this.base(e,_CSSPropertyNameMap[t]||t)},"@MSIE.+win":{getPropertyValue:function(e,t){return"float"==t?e.styleFloat:e[ViewCSS.toCamelCase(t)]}}}),CSSStyleDeclaration=_CSSStyleDeclaration_ReadOnly.extend({setProperty:function(e,t,n,i){return this.base(e,_CSSPropertyNameMap[t]||t,n,i)},"@MSIE.+win":{setProperty:function(e,t,n,i){"opacity"==t?(e.opacity=n*=100,e.zoom=1,e.filter="Alpha(opacity="+n+")"):"important"==i?e.cssText+=format(";%1:%2!important;",t,n):e.setAttribute(ViewCSS.toCamelCase(t),n)}}},{"@MSIE":{bind:function(e){return e.getPropertyValue=this.prototype.getPropertyValue,e.setProperty=this.prototype.setProperty,e}}}),_CSSPropertyNameMap=new Base({"@Gecko":{opacity:"-moz-opacity"},"@KHTML":{opacity:"-khtml-opacity"}});with(CSSStyleDeclaration.prototype)getPropertyValue.toString=setProperty.toString=K("[base2]");AbstractView.implement(ViewCSS);var NodeSelector=Interface.extend({"@(element.querySelector)":{querySelector:function(e,t){try{var n=this.base(e,trim(t));if(n)return n}catch(e){}return new Selector(t).exec(e,1)},querySelectorAll:function(e,t){try{var n=this.base(e,trim(t));if(n)return new StaticNodeList(n)}catch(e){}return new Selector(t).exec(e)}},"@!(element.querySelector)":{querySelector:function(e,t){return new Selector(t).exec(e,1)},querySelectorAll:function(e,t){return new Selector(t).exec(e)}}});extend(NodeSelector.prototype,{querySelector:function(e){return DOM.bind(this.base(e))},querySelectorAll:function(e){return extend(this.base(e),"item",function(e){return DOM.bind(this.base(e))})}});var DocumentSelector=NodeSelector.extend(),ElementSelector=NodeSelector.extend({"@!(element.matchesSelector)":{matchesSelector:function(e,t){return new Selector(t).test(e)}}}),_CSS_ESCAPE=/'(\\.|[^'\\])*'|"(\\.|[^"\\])*"/g,_CSS_IMPLIED_ASTERISK=/([\s>+~,]|[^(]\+|^)([#.:\[])/g,_CSS_IMPLIED_SPACE=/(^|,)([^\s>+~])/g,_CSS_WHITESPACE=/\s*([\s>+~,]|^|$)\s*/g,_CSS_WILD_CARD=/\s\*\s/g,_CSS_UNESCAPE=/\x01(\d+)/g,_QUOTE=/'/g,CSSParser=RegGrp.extend({constructor:function(e){this.base(e),this.cache={},this.sorter=new RegGrp,this.sorter.add(/:not\([^)]*\)/,RegGrp.IGNORE),this.sorter.add(/([ >](\*|[\w-]+))([^: >+~]*)(:\w+-child(\([^)]+\))?)([^: >+~]*)/,"$1$3$6$4")},cache:null,ignoreCase:!0,escape:function(e,t){var n=this._strings=[];return e=this.optimise(this.format(String(e).replace(_CSS_ESCAPE,function(e){return""+n.push(e.slice(1,-1).replace(_QUOTE,"\\'"))}))),e=t?e.replace(/^ \*?/,""):e},format:function(e){return e.replace(_CSS_WHITESPACE,"$1").replace(_CSS_IMPLIED_SPACE,"$1 $2").replace(_CSS_IMPLIED_ASTERISK,"$1*$2")},optimise:function(e){return this.sorter.exec(e.replace(_CSS_WILD_CARD,">* "))},parse:function(e,t){return this.cache[e]||(this.cache[e]=this.unescape(this.exec(this.escape(e,t))))},unescape:function(e){var n=this._strings;return e.replace(_CSS_UNESCAPE,function(e,t){return n[t-1]})}});function _nthChild(e,t,n,i,a,r,s,o){i=/last/i.test(e)?i+"+1-":"",isNaN(t)?"even"==t?t="2n":"odd"==t&&(t="2n+1"):t="0n+"+t;var l=(t=t.split("n"))[0]?"-"==t[0]?-1:parseInt(t[0]):1,e=parseInt(t[1])||0,t=l<0;t&&1==(l=-l)&&e++;o=format(0==l?"%3%7"+(i+e):"(%4%3-%2)%6%1%70%5%4%3>=%2",l,e,n,i,r,s,o);return o=t?a+"("+o+")":o}var XPathParser=CSSParser.extend({constructor:function(){this.base(XPathParser.build()),this.sorter.putAt(1,"$1$4$3$6")},escape:function(e,t){return this.base(e,t).replace(/,/g,"")},unescape:function(e){return this.base(e.replace(/\[self::\*\]/g,"").replace(/(^|\x02)\//g,"$1./").replace(/\x02/g," | ")).replace(/'[^'\\]*\\'(\\.|[^'\\])*'/g,function(e){return"concat("+e.split("\\'").join("',\"'\",'")+")"})},"@opera(7|8|9\\.[1-4])":{unescape:function(e){return this.base(e.replace(/last\(\)/g,"count(preceding-sibling::*)+count(following-sibling::*)+1"))}}},{build:function(){return this.values.attributes[""]="[@$1]",forEach(this.types,function(e,t){forEach(this.values[t],e,this.rules)},this),this.build=K(this.rules),this.rules},optimised:{pseudoClasses:{"first-child":"[1]","last-child":"[last()]","only-child":"[last()=1]"}},rules:extend({},{"@!KHTML|opera":{"(^|\\x02) (\\*|[\\w-]+)#([\\w-]+)":"$1id('$3')[self::$2]"},"@!KHTML":{"([ >])(\\*|[\\w-]+):([\\w-]+-child(\\(([^)]+)\\))?)":function(e,t,n,i,a,r){t=" "==t?"//*":"/*";return/^nth/i.test(i)?t+=_xpath_nthChild(i,r,"position()"):t+=XPathParser.optimised.pseudoClasses[i],t+"[self::"+n+"]"}}}),types:{identifiers:function(e,t){this[rescape(t)+"([\\w-]+)"]=e},combinators:function(e,t){this[rescape(t)+"(\\*|[\\w-]+)"]=e},attributes:function(e,t){this["\\[\\s*([\\w-]+)\\s*"+rescape(t)+"\\s*([^\\]\\s]*)\\s*\\]"]=e},pseudoClasses:function(e,t){this[":"+t.replace(/\(\)$/,"\\(([^)]+)\\)")]=e}},values:{identifiers:{"#":"[@id='$1'][1]",".":"[contains(concat(' ',@class,' '),' $1 ')]"},combinators:{" ":"/descendant::$1",">":"/child::$1","+":"/following-sibling::*[1][self::$1]","~":"/following-sibling::$1"},attributes:{"*=":"[contains(@$1,'$2')]","^=":"[starts-with(@$1,'$2')]","$=":"[substring(@$1,string-length(@$1)-string-length('$2')+1)='$2']","~=":"[contains(concat(' ',@$1,' '),' $2 ')]","|=":"[contains(concat('-',@$1,'-'),'-$2-')]","!=":"[not(@$1='$2')]","=":"[@$1='$2']"},pseudoClasses:{link:"[false]",visited:"[false]",empty:"[not(child::*) and not(text())]","first-child":"[not(preceding-sibling::*)]","last-child":"[not(following-sibling::*)]","not()":_xpath_not,"nth-child()":_xpath_nthChild,"nth-last-child()":_xpath_nthChild,"only-child":"[not(preceding-sibling::*) and not(following-sibling::*)]",root:"[not(parent::*)]"}},"@opera(7|8|9\\.[1-4])":{build:function(){return this.optimised.pseudoClasses["last-child"]=this.values.pseudoClasses["last-child"],this.optimised.pseudoClasses["only-child"]=this.values.pseudoClasses["only-child"],this.base()}}}),_notParser;function _xpath_not(e,t){return"[not("+(_notParser=_notParser||new XPathParser).exec(trim(t)).replace(/\[1\]/g,"").replace(/^(\*|[\w-]+)/,"[self::$1]").replace(/\]\[/g," and ").slice(1,-1)+")]"}function _xpath_nthChild(e,t,n){return"["+_nthChild(e,t,n||"count(preceding-sibling::*)+1","last()","not"," and "," mod ","=")+"]"}var Selector=Base.extend({constructor:function(e){this.toString=K(trim(e))},exec:function(e,t,n){return Selector.parse(this,n)(e,t)},isSimple:function(){return _parser.exec||(_parser=new CSSParser(_parser)),!_COMBINATOR.test(trim(_parser.escape(this)))},test:function(e){if(this.isSimple())return!!Selector.parse(this,!0)(e,1);e.setAttribute("b2-test",!0);var t=new Selector(this+"[b2-test]").exec(Traversal.getOwnerDocument(e),1);return e.removeAttribute("b2-test"),t==e},toXPath:function(e){return Selector.toXPath(this,e)},"@(XPathResult)":{exec:function(e,t,n){if(_NOT_XPATH.test(this))return this.base(e,t,n);var i=1==t?9:7,i=Traversal.getDocument(e).evaluate(this.toXPath(n),e,null,i,null);return 1==t?i.singleNodeValue:i}},"@MSIE":{exec:function(e,t,n){return void 0===e.selectNodes||_NOT_XPATH.test(this)?this.base(e,t,n):e[single?"selectSingleNode":"selectNodes"](this.toXPath(n))}},"@(true)":{exec:function(e,t,n){try{var i=this.base(e||document,t,n)}catch(e){throw new SyntaxError(format("'%1' is not a valid CSS selector.",this))}return 1==t?i:new StaticNodeList(i)}}},{toXPath:function(e,t){return(_xpathParser=_xpathParser||new XPathParser).parse(e,t)}}),_COMBINATOR=/[^,]\s|[+>~]/,_NOT_XPATH=":(checked|disabled|enabled|contains|hover|active|focus)|^(#[\\w-]+\\s*)?\\w+$";detect("KHTML")&&(detect("WebKit5")?_NOT_XPATH+="|nth\\-|,":_NOT_XPATH="."),_NOT_XPATH=new RegExp(_NOT_XPATH),Selector.operators={"=":"%1=='%2'","~=":/(^| )%1( |$)/,"|=":/^%1(-|$)/,"^=":/^%1/,"$=":/%1$/,"*=":/%1/},Selector.operators[""]="%1!=null",Selector.pseudoClasses={checked:"e%1.checked",contains:"e%1[TEXT].indexOf('%2')!=-1",disabled:"e%1.disabled",empty:"Traversal.isEmpty(e%1)",enabled:"e%1.disabled===false","first-child":"!Traversal.getPreviousElementSibling(e%1)","last-child":"!Traversal.getNextElementSibling(e%1)","only-child":"!Traversal.getPreviousElementSibling(e%1)&&!Traversal.getNextElementSibling(e%1)",root:"e%1==Traversal.getDocument(e%1).documentElement",target:"e%1.id&&e%1.id==location.hash.slice(1)",hover:"DocumentState.getInstance(d).isHover(e%1)",active:"DocumentState.getInstance(d).isActive(e%1)",focus:"DocumentState.getInstance(d).hasFocus(e%1)",link:"false",visited:"false"};var _INDEXED=void 0!==document.documentElement.sourceIndex,_VAR="var p%2=0,i%2,e%3,n%2=e%1.",_ID=_INDEXED?"e%1.sourceIndex":"assignID(e%1)",_TEST="var g="+_ID+";if(!p[g]){p[g]=1;",_STORE="r[k++]=e%1;if(s==1)return e%1;if(k===s){_query.state=[%2];_query.complete=%3;return r;",_FN="var _query=function(e0,s%1){_indexed++;var r=[],p={},p0=0,reg=[%4],d=Traversal.getDocument(e0),c=d.writeln?'toUpperCase':'toString',k=0;",_xpathParser,_reg,_index,_wild,_list,_group,_listAll,_duplicate,_cache={},_simple={};function sum(e){for(var t=0,n=0;n(\\*|[\\w-]+)":function(e,t){var n=_MSIE&&_index;_wild="*"==t;var i=_VAR+(n?"children":"childNodes"),i=format(i,_index++,"%2",_index);return!_wild&&_MSIE&&n&&(i+=".tags('%3')"),i+=";for(i%2=a%2||0;(e%1=n%2[i%2]);i%2++){",_wild?(i+="if(e%1.nodeType==1){",_wild=_MSIE5):_MSIE&&n||(i+="if(e%1.nodeName=='%3'[c]()){"),_list[_group]++,format(i,_index,sum(_list),t)},"\\+(\\*|[\\w-]+)":function(e,t){var n="";return _wild&&_MSIE&&(n+="if(e%1.nodeName!='!'){"),_wild=!1,n+="e%1=Traversal.getNextElementSibling(e%1);if(e%1","*"!=t&&(n+="&&e%1.nodeName=='%2'[c]()"),n+="){",format(n,_index,t)},"~(\\*|[\\w-]+)":function(e,t){var n="";return _wild&&_MSIE&&(n+="if(e%1.nodeName!='!'){"),_wild=!1,_duplicate=2,n+="while(e%1=e%1.nextSibling){if(e%1.b2_adjacent==_indexed)break;if(","*"==t?(n+="e%1.nodeType==1",_MSIE5&&(n+="&&e%1.nodeName!='!'")):n+="e%1.nodeName=='%2'[c]()",n+="){e%1.b2_adjacent=_indexed;",format(n,_index,t)},"#([\\w-]+)":function(e,t){_wild=!1;var n="if(e%1.id=='%2'){";return _list[_group]&&(n+=format("i%1=n%1.length;",sum(_list))),format(n,_index,t)},"\\.([\\w-]+)":function(e,t){return _wild=!1,_reg.push(new RegExp("(^|\\s)"+rescape(t)+"(\\s|$)")),format("if(e%1.className&®[%2].test(e%1.className)){",_index,_reg.length-1)},":not\\((\\*|[\\w-]+)?([^)]*)\\)":function(e,t,n){t=t&&"*"!=t?format("if(e%1.nodeName=='%2'[c]()){",_index,t):"";return"if(!"+(t+=_parser.exec(n)).slice(2,-1).replace(/\)\{if\(/g,"&&")+"){"},":nth(-last)?-child\\(([^)]+)\\)":function(e,t,n){_wild=!1,t=format("e%1.parentNode.b2_length",_index);return format("if(p%1!==e%1.parentNode)p%1=_register(e%1.parentNode);var i=e%1[p%1.b2_lookup];if(p%1.b2_lookup!='b2_index')i++;if(",_index)+_nthChild(e,n,"i",t,"!","&&","% ","==")+"){"},":([\\w-]+)(\\(([^)]+)\\))?":function(e,t,n,i){return"if("+format(Selector.pseudoClasses[t]||"throw",_index,i||"")+"){"},"\\[\\s*([\\w-]+)\\s*([^=]?=)?\\s*([^\\]\\s]*)\\s*\\]":function(e,t,n,i){i=trim(i),a=_MSIE?"Element.getAttribute(e%1,'%2')":"e%1.getAttribute('%2')";var a=format(a,_index,t),n=Selector.operators[n||""];return instanceOf(n,RegExp)&&(_reg.push(new RegExp(format(n.source,rescape(_parser.unescape(i))))),n="reg[%2].test(%1)",i=_reg.length-1),"if("+format(n,a,i)+"){"}};!function(_no_shrink_){var _byId=detect("MSIE[5-7]")?function(e,t){var n=e.all[t]||null;if(!n||n.id==t)return n;for(var i=0;ii.includes(t)):Object.entries(t).reduce((e,t)=>{var[n,t]=t;return i(t,n)&&(e[n]=t),e},{})}(n,(e,t)=>!t.startsWith("_")),mask:n.constructor,_mask:t,...i}}}return a(e)?{...e}:{mask:e}}function v(e){if(g.Masked&&e instanceof g.Masked)return e;const t=f(e),n=i(t.mask);if(!n)throw new Error("Masked class is not found for provided mask "+t.mask+", appropriate module needs to be imported manually before creating mask.");return t.mask===n&&delete t.mask,t._mask&&(t.mask=t._mask,delete t._mask),new n(t)}g.createMask=v;class l{get selectionStart(){let e;try{e=this._unsafeSelectionStart}catch{}return null!=e?e:this.value.length}get selectionEnd(){let e;try{e=this._unsafeSelectionEnd}catch{}return null!=e?e:this.value.length}select(e,t){if(null!=e&&null!=t&&(e!==this.selectionStart||t!==this.selectionEnd))try{this._unsafeSelect(e,t)}catch{}}get isActive(){return!1}}g.MaskElement=l;class t extends l{constructor(e){super(),this.input=e,this._onKeydown=this._onKeydown.bind(this),this._onInput=this._onInput.bind(this),this._onBeforeinput=this._onBeforeinput.bind(this),this._onCompositionEnd=this._onCompositionEnd.bind(this)}get rootElement(){var e,t;return null!=(t=null==(e=(t=this.input).getRootNode)?void 0:e.call(t))?t:document}get isActive(){return this.input===this.rootElement.activeElement}bindEvents(e){this.input.addEventListener("keydown",this._onKeydown),this.input.addEventListener("input",this._onInput),this.input.addEventListener("beforeinput",this._onBeforeinput),this.input.addEventListener("compositionend",this._onCompositionEnd),this.input.addEventListener("drop",e.drop),this.input.addEventListener("click",e.click),this.input.addEventListener("focus",e.focus),this.input.addEventListener("blur",e.commit),this._handlers=e}_onKeydown(e){return this._handlers.redo&&(90===e.keyCode&&e.shiftKey&&(e.metaKey||e.ctrlKey)||89===e.keyCode&&e.ctrlKey)?(e.preventDefault(),this._handlers.redo(e)):this._handlers.undo&&90===e.keyCode&&(e.metaKey||e.ctrlKey)?(e.preventDefault(),this._handlers.undo(e)):void(e.isComposing||this._handlers.selectionChange(e))}_onBeforeinput(e){return"historyUndo"===e.inputType&&this._handlers.undo?(e.preventDefault(),this._handlers.undo(e)):"historyRedo"===e.inputType&&this._handlers.redo?(e.preventDefault(),this._handlers.redo(e)):void 0}_onCompositionEnd(e){this._handlers.input(e)}_onInput(e){e.isComposing||this._handlers.input(e)}unbindEvents(){this.input.removeEventListener("keydown",this._onKeydown),this.input.removeEventListener("input",this._onInput),this.input.removeEventListener("beforeinput",this._onBeforeinput),this.input.removeEventListener("compositionend",this._onCompositionEnd),this.input.removeEventListener("drop",this._handlers.drop),this.input.removeEventListener("click",this._handlers.click),this.input.removeEventListener("focus",this._handlers.focus),this.input.removeEventListener("blur",this._handlers.commit),this._handlers={}}}class u extends(g.HTMLMaskElement=t){constructor(e){super(e),this.input=e}get _unsafeSelectionStart(){return null!=this.input.selectionStart?this.input.selectionStart:this.value.length}get _unsafeSelectionEnd(){return this.input.selectionEnd}_unsafeSelect(e,t){this.input.setSelectionRange(e,t)}get value(){return this.input.value}set value(e){this.input.value=e}}class h extends(g.HTMLMaskElement=t){get _unsafeSelectionStart(){const e=this.rootElement;var t=e.getSelection&&e.getSelection(),n=t&&t.anchorOffset,t=t&&t.focusOffset;return null==t||null==n||np.MAX_LENGTH&&this.states.shift(),this.currentIndex=this.states.length-1}go(e){return this.currentIndex=Math.min(Math.max(this.currentIndex+e,0),this.states.length-1),this.currentState}undo(){return this.go(-1)}redo(){return this.go(1)}clear(){this.states.length=0,this.currentIndex=0}}p.MAX_LENGTH=100;class m{constructor(e,t){this.el=e instanceof l?e:new(e.isContentEditable&&"INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName?h:u)(e),this.masked=v(t),this._listeners={},this._value="",this._unmaskedValue="",this._rawInputValue="",this.history=new p,this._saveSelection=this._saveSelection.bind(this),this._onInput=this._onInput.bind(this),this._onChange=this._onChange.bind(this),this._onDrop=this._onDrop.bind(this),this._onFocus=this._onFocus.bind(this),this._onClick=this._onClick.bind(this),this._onUndo=this._onUndo.bind(this),this._onRedo=this._onRedo.bind(this),this.alignCursor=this.alignCursor.bind(this),this.alignCursorFriendly=this.alignCursorFriendly.bind(this),this._bindEvents(),this._onChange()}maskEquals(e){var t;return null==e||(null==(t=this.masked)?void 0:t.maskEquals(e))}get mask(){return this.masked.mask}set mask(e){if(!this.maskEquals(e))if(e instanceof g.Masked||this.masked.constructor!==i(e)){const t=e instanceof g.Masked?e:v({mask:e});t.unmaskedValue=this.masked.unmaskedValue,this.masked=t}else this.masked.updateOptions({mask:e})}get value(){return this._value}set value(e){this.value!==e&&(this.masked.value=e,this.updateControl("auto"))}get unmaskedValue(){return this._unmaskedValue}set unmaskedValue(e){this.unmaskedValue!==e&&(this.masked.unmaskedValue=e,this.updateControl("auto"))}get rawInputValue(){return this._rawInputValue}set rawInputValue(e){this.rawInputValue!==e&&(this.masked.rawInputValue=e,this.updateControl(),this.alignCursor())}get typedValue(){return this.masked.typedValue}set typedValue(e){this.masked.typedValueEquals(e)||(this.masked.typedValue=e,this.updateControl("auto"))}get displayValue(){return this.masked.displayValue}_bindEvents(){this.el.bindEvents({selectionChange:this._saveSelection,input:this._onInput,drop:this._onDrop,click:this._onClick,focus:this._onFocus,commit:this._onChange,undo:this._onUndo,redo:this._onRedo})}_unbindEvents(){this.el&&this.el.unbindEvents()}_fireEvent(e,t){const n=this._listeners[e];n&&n.forEach(e=>e(t))}get selectionStart(){return this._cursorChanging?this._changingCursorPos:this.el.selectionStart}get cursorPos(){return this._cursorChanging?this._changingCursorPos:this.el.selectionEnd}set cursorPos(e){this.el&&this.el.isActive&&(this.el.select(e,e),this._saveSelection())}_saveSelection(){this.displayValue!==this.el.value&&console.warn("Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly."),this._selection={start:this.selectionStart,end:this.cursorPos}}updateValue(){this.masked.value=this.el.value,this._value=this.masked.value,this._unmaskedValue=this.masked.unmaskedValue,this._rawInputValue=this.masked.rawInputValue}updateControl(e){var t=this.masked.unmaskedValue,n=this.masked.value,i=this.masked.rawInputValue,a=this.displayValue,r=this.unmaskedValue!==t||this.value!==n||this._rawInputValue!==i;this._unmaskedValue=t,this._value=n,this._rawInputValue=i,this.el.value!==a&&(this.el.value=a),"auto"===e?this.alignCursor():null!=e&&(this.cursorPos=e),r&&this._fireChangeEvents(),this._historyChanging||!r&&!this.history.isEmpty||this.history.push({unmaskedValue:t,selection:{start:this.selectionStart,end:this.cursorPos}})}updateOptions(e){const{mask:t,...n}=e;var i=!this.maskEquals(t),e=this.masked.optionsIsChanged(n);i&&(this.mask=t),e&&this.masked.updateOptions(n),(i||e)&&this.updateControl()}updateCursor(e){null!=e&&(this.cursorPos=e,this._delayUpdateCursor(e))}_delayUpdateCursor(e){this._abortUpdateCursor(),this._changingCursorPos=e,this._cursorChanging=setTimeout(()=>{this.el&&(this.cursorPos=this._changingCursorPos,this._abortUpdateCursor())},10)}_fireChangeEvents(){this._fireEvent("accept",this._inputEvent),this.masked.isComplete&&this._fireEvent("complete",this._inputEvent)}_abortUpdateCursor(){this._cursorChanging&&(clearTimeout(this._cursorChanging),delete this._cursorChanging)}alignCursor(){this.cursorPos=this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos,c.LEFT))}alignCursorFriendly(){this.selectionStart===this.cursorPos&&this.alignCursor()}on(e,t){return this._listeners[e]||(this._listeners[e]=[]),this._listeners[e].push(t),this}off(e,t){if(!this._listeners[e])return this;if(!t)return delete this._listeners[e],this;t=this._listeners[e].indexOf(t);return 0<=t&&this._listeners[e].splice(t,1),this}_onInput(e){this._inputEvent=e,this._abortUpdateCursor();var t=new r({value:this.el.value,cursorPos:this.cursorPos,oldValue:this.displayValue,oldSelection:this._selection}),n=this.masked.rawInputValue,e=this.masked.splice(t.startChangePos,t.removed.length,t.inserted,t.removeDirection,{input:!0,raw:!0}).offset,n=n===this.masked.rawInputValue?t.removeDirection:c.NONE;let i=this.masked.nearestInputPos(t.startChangePos+e,n);n!==c.NONE&&(i=this.masked.nearestInputPos(i,c.NONE)),this.updateControl(i),delete this._inputEvent}_onChange(){this.displayValue!==this.el.value&&this.updateValue(),this.masked.doCommit(),this.updateControl(),this._saveSelection()}_onDrop(e){e.preventDefault(),e.stopPropagation()}_onFocus(e){this.alignCursorFriendly()}_onClick(e){this.alignCursorFriendly()}_onUndo(){this._applyHistoryState(this.history.undo())}_onRedo(){this._applyHistoryState(this.history.redo())}_applyHistoryState(e){e&&(this._historyChanging=!0,this.unmaskedValue=e.unmaskedValue,this.el.select(e.selection.start,e.selection.end),this._saveSelection(),this._historyChanging=!1)}destroy(){this._unbindEvents(),this._listeners.length=0,delete this.el}}g.InputMask=m;class E{static normalize(e){return Array.isArray(e)?e:[e,new E]}constructor(e){Object.assign(this,{inserted:"",rawInserted:"",tailShift:0,skip:!1},e)}aggregate(e){return this.inserted+=e.inserted,this.rawInserted+=e.rawInserted,this.tailShift+=e.tailShift,this.skip=this.skip||e.skip,this}get offset(){return this.tailShift+this.inserted.length}get consumed(){return Boolean(this.rawInserted)||this.skip}equals(e){return this.inserted===e.inserted&&this.tailShift===e.tailShift&&this.rawInserted===e.rawInserted&&this.skip===e.skip}}g.ChangeDetails=E;class S{constructor(e,t,n){void 0===t&&(t=0),this.value=e=void 0===e?"":e,this.from=t,this.stop=n}toString(){return this.value}extend(e){this.value+=String(e)}appendTo(e){return e.append(this.toString(),{tail:!0}).aggregate(e._appendPlaceholder())}get state(){return{value:this.value,from:this.from,stop:this.stop}}set state(e){Object.assign(this,e)}unshift(e){if(!this.value.length||null!=e&&this.from>=e)return"";e=this.value[0];return this.value=this.value.slice(1),e}shift(){if(!this.value.length)return"";var e=this.value[this.value.length-1];return this.value=this.value.slice(0,-1),e}}class b{constructor(e){this._value="",this._update({...b.DEFAULTS,...e}),this._initialized=!0}updateOptions(e){this.optionsIsChanged(e)&&this.withValueRefresh(this._update.bind(this,e))}_update(e){Object.assign(this,e)}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value}reset(){this._value=""}get value(){return this._value}set value(e){this.resolve(e,{input:!0})}resolve(e,t){void 0===t&&(t={input:!0}),this.reset(),this.append(e,t,""),this.doCommit()}get unmaskedValue(){return this.value}set unmaskedValue(e){this.resolve(e,{})}get typedValue(){return this.parse?this.parse(this.value,this):this.unmaskedValue}set typedValue(e){this.format?this.value=this.format(e,this):this.unmaskedValue=String(e)}get rawInputValue(){return this.extractInput(0,this.displayValue.length,{raw:!0})}set rawInputValue(e){this.resolve(e,{raw:!0})}get displayValue(){return this.value}get isComplete(){return!0}get isFilled(){return this.isComplete}nearestInputPos(e,t){return e}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),Math.min(this.displayValue.length,t-e)}extractInput(e,t,n){return void 0===t&&(t=this.displayValue.length),this.displayValue.slice(e=void 0===e?0:e,t)}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new S(this.extractInput(e,t),e)}appendTail(e){return(e=s(e)?new S(String(e)):e).appendTo(this)}_appendCharRaw(e,t){return e?(this._value+=e,new E({inserted:e,rawInserted:e})):new E}_appendChar(t,i,a){void 0===i&&(i={});var r=this.state;let s;if([t,s]=this.doPrepareChar(t,i),t&&(s=s.aggregate(this._appendCharRaw(t,i)),!s.rawInserted&&"pad"===this.autofix)){var n=this.state;this.state=r;let e=this.pad(i);t=this._appendCharRaw(t,i);e=e.aggregate(t),t.rawInserted||e.equals(s)?s=e:this.state=n}if(s.inserted){let t,n=!1!==this.doValidate(i);if(n&&null!=a){i=this.state;if(!0===this.overwrite){t=a.state;for(let e=0;ee.state),from:this.from,stop:this.stop,blockIndex:this.blockIndex}}set state(e){const{chunks:t,...n}=e;Object.assign(this,n),this.chunks=t.map(e=>{const t=new("chunks"in e?_:S);return t.state=e,t})}unshift(e){if(!this.chunks.length||null!=e&&this.from>=e)return"";var t=null!=e?e-this.from:e;let n=0;for(;n=this.masked._blocks.length&&(this.index=this.masked._blocks.length-1,this.offset=this.block.displayValue.length))}_pushLeft(e){for(this.pushState(),this.bindBlock();0<=this.index;--this.index,this.offset=(null==(t=this.block)?void 0:t.displayValue.length)||0){var t;if(e())return this.ok=!0}return this.ok=!1}_pushRight(e){for(this.pushState(),this.bindBlock();this.index{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,c.FORCE_LEFT),0!==this.offset||void 0})}pushLeftBeforeInput(){return this._pushLeft(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,c.LEFT),!0})}pushLeftBeforeRequired(){return this._pushLeft(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,c.LEFT),!0})}pushRightBeforeFilled(){return this._pushRight(()=>{if(!this.block.isFixed&&this.block.value)return this.offset=this.block.nearestInputPos(this.offset,c.FORCE_RIGHT),this.offset!==this.block.value.length||void 0})}pushRightBeforeInput(){return this._pushRight(()=>{if(!this.block.isFixed)return this.offset=this.block.nearestInputPos(this.offset,c.NONE),!0})}pushRightBeforeRequired(){return this._pushRight(()=>{if(!(this.block.isFixed||this.block.isOptional&&!this.block.value))return this.offset=this.block.nearestInputPos(this.offset,c.NONE),!0})}}class w{constructor(e){Object.assign(this,e),this._value="",this.isFixed=!0}get value(){return this._value}get unmaskedValue(){return this.isUnmasking?this.value:""}get rawInputValue(){return this._isRawInput?this.value:""}get displayValue(){return this.value}reset(){this._isRawInput=!1,this._value=""}remove(e,t){return void 0===t&&(t=this._value.length),this._value=this._value.slice(0,e=void 0===e?0:e)+this._value.slice(t),this._value||(this._isRawInput=!1),new E}nearestInputPos(e,t){void 0===t&&(t=c.NONE);var n=this._value.length;switch(t){case c.LEFT:case c.FORCE_LEFT:return 0;case c.NONE:case c.RIGHT:case c.FORCE_RIGHT:default:return n}}totalInputPositions(e,t){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),this._isRawInput?t-e:0}extractInput(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=this._value.length),(n=void 0===n?{}:n).raw&&this._isRawInput&&this._value.slice(e,t)||""}get isComplete(){return!0}get isFilled(){return Boolean(this._value)}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new E;var n=!0===this.eager||"append"===this.eager,e=this.char===e&&(this.isUnmasking||t.input||t.raw)&&(!t.raw||!n)&&!t.tail,n=new E({inserted:this.char,rawInserted:e?this.char:""});return this._value=this.char,this._isRawInput=e&&(t.raw||t.input),n}_appendEager(){return this._appendChar(this.char,{tail:!0})}_appendPlaceholder(){const e=new E;return this.isFilled||(this._value=e.inserted=this.char),e}extractTail(){return new S("")}appendTail(e){return(e=s(e)?new S(String(e)):e).appendTo(this)}append(e,t,n){const i=this._appendChar(e[0],t);return null!=n&&(i.tailShift+=this.appendTail(n).tailShift),i}doCommit(){}get state(){return{_value:this._value,_rawInputValue:this.rawInputValue}}set state(e){this._value=e._value,this._isRawInput=Boolean(e._rawInputValue)}pad(e){return this._appendPlaceholder()}}class O{constructor(e){const{parent:t,isOptional:n,placeholderChar:i,displayChar:a,lazy:r,eager:s,...o}=e;this.masked=v(o),Object.assign(this,{parent:t,isOptional:n,placeholderChar:i,displayChar:a,lazy:r,eager:s})}reset(){this.isFilled=!1,this.masked.reset()}remove(e,t){return void 0===t&&(t=this.value.length),0===(e=void 0===e?0:e)&&1<=t?(this.isFilled=!1,this.masked.remove(e,t)):new E}get value(){return this.masked.value||(this.isFilled&&!this.isOptional?this.placeholderChar:"")}get unmaskedValue(){return this.masked.unmaskedValue}get rawInputValue(){return this.masked.rawInputValue}get displayValue(){return this.masked.value&&this.displayChar||this.value}get isComplete(){return Boolean(this.masked.value)||this.isOptional}_appendChar(e,t){if(void 0===t&&(t={}),this.isFilled)return new E;var n=this.masked.state;let i=this.masked._appendChar(e,this.currentMaskFlags(t));return i.inserted&&!1===this.doValidate(t)&&(i=new E,this.masked.state=n),i.inserted||this.isOptional||this.lazy||t.input||(i.inserted=this.placeholderChar),i.skip=!i.inserted&&!this.isOptional,this.isFilled=Boolean(i.inserted),i}append(e,t,n){return this.masked.append(e,this.currentMaskFlags(t),n)}_appendPlaceholder(){return this.isFilled||this.isOptional?new E:(this.isFilled=!0,new E({inserted:this.placeholderChar}))}_appendEager(){return new E}extractTail(e,t){return this.masked.extractTail(e,t)}appendTail(e){return this.masked.appendTail(e)}extractInput(e,t,n){return void 0===t&&(t=this.value.length),this.masked.extractInput(e=void 0===e?0:e,t,n)}nearestInputPos(e,t){void 0===t&&(t=c.NONE);var n=this.value.length,i=Math.min(Math.max(e,0),n);switch(t){case c.LEFT:case c.FORCE_LEFT:return this.isComplete?i:0;case c.RIGHT:case c.FORCE_RIGHT:return this.isComplete?i:n;default:c.NONE;return i}}totalInputPositions(e,t){return void 0===t&&(t=this.value.length),this.value.slice(e=void 0===e?0:e,t).length}doValidate(e){return this.masked.doValidate(this.currentMaskFlags(e))&&(!this.parent||this.parent.doValidate(this.currentMaskFlags(e)))}doCommit(){this.masked.doCommit()}get state(){return{_value:this.value,_rawInputValue:this.rawInputValue,masked:this.masked.state,isFilled:this.isFilled}}set state(e){this.masked.state=e.masked,this.isFilled=e.isFilled}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==e||null==(t=e._beforeTailState)?void 0:t.masked)||(null==e?void 0:e._beforeTailState)}}pad(e){return new E}}O.DEFAULT_DEFINITIONS={0:/\d/,a:/[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/,"*":/./};class M extends b{updateOptions(e){super.updateOptions(e)}_update(e){const t=e.mask;t&&(e.validate=e=>0<=e.search(t)),super._update(e)}}g.MaskedRegExp=M;class C extends b{constructor(e){super({...C.DEFAULTS,...e,definitions:Object.assign({},O.DEFAULT_DEFINITIONS,null==e?void 0:e.definitions)})}updateOptions(e){super.updateOptions(e)}_update(e){e.definitions=Object.assign({},this.definitions,e.definitions),super._update(e),this._rebuildMask()}_rebuildMask(){var r=this.definitions;this._blocks=[],this.exposeBlock=void 0,this._stops=[],this._maskedBlocks={};const s=this.mask;if(s&&r){let i=!1,a=!1;for(let n=0;n0===u.indexOf(e));h.sort((e,t)=>t.length-e.length);var o=h[0];if(o){const{expose:c,repeat:d,...p}=f(this.blocks[o]);var l={lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,overwrite:this.overwrite,autofix:this.autofix,...p,repeat:d,parent:this},l=null!=d?new g.RepeatBlock(l):v(l);l&&(this._blocks.push(l),c&&(this.exposeBlock=l),this._maskedBlocks[o]||(this._maskedBlocks[o]=[]),this._maskedBlocks[o].push(this._blocks.length-1)),n+=o.length-1;continue}}let e=s[n],t=e in r;if(e!==C.STOP_CHAR)if("{"!==e&&"}"!==e)if("["!==e&&"]"!==e){if(e===C.ESCAPE_CHAR){if(++n,e=s[n],!e)break;t=!1}o=t?new O({isOptional:a,lazy:this.lazy,eager:this.eager,placeholderChar:this.placeholderChar,displayChar:this.displayChar,...f(r[e]),parent:this}):new w({char:e,eager:this.eager,isUnmasking:i});this._blocks.push(o)}else a=!a;else i=!i;else this._stops.push(this._blocks.length)}}}get state(){return{...super.state,_blocks:this._blocks.map(e=>e.state)}}set state(e){if(e){const{_blocks:n,...t}=e;this._blocks.forEach((e,t)=>e.state=n[t]),super.state=t}else this.reset()}reset(){super.reset(),this._blocks.forEach(e=>e.reset())}get isComplete(){return this.exposeBlock?this.exposeBlock.isComplete:this._blocks.every(e=>e.isComplete)}get isFilled(){return this._blocks.every(e=>e.isFilled)}get isFixed(){return this._blocks.every(e=>e.isFixed)}get isOptional(){return this._blocks.every(e=>e.isOptional)}doCommit(){this._blocks.forEach(e=>e.doCommit()),super.doCommit()}get unmaskedValue(){return this.exposeBlock?this.exposeBlock.unmaskedValue:this._blocks.reduce((e,t)=>e+=t.unmaskedValue,"")}set unmaskedValue(e){var t;this.exposeBlock?(t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length),this.exposeBlock.unmaskedValue=e,this.appendTail(t),this.doCommit()):super.unmaskedValue=e}get value(){return this.exposeBlock?this.exposeBlock.value:this._blocks.reduce((e,t)=>e+=t.value,"")}set value(e){var t;this.exposeBlock?(t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length),this.exposeBlock.value=e,this.appendTail(t),this.doCommit()):super.value=e}get typedValue(){return this.exposeBlock?this.exposeBlock.typedValue:super.typedValue}set typedValue(e){var t;this.exposeBlock?(t=this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock))+this.exposeBlock.displayValue.length),this.exposeBlock.typedValue=e,this.appendTail(t),this.doCommit()):super.typedValue=e}get displayValue(){return this._blocks.reduce((e,t)=>e+=t.displayValue,"")}appendTail(e){return super.appendTail(e).aggregate(this._appendPlaceholder())}_appendEager(){var e;const t=new E;let n=null==(e=this._mapPosToBlock(this.displayValue.length))?void 0:e.index;if(null==n)return t;this._blocks[n].isFilled&&++n;for(let e=n;e{const a=e.extractTail(n,i);a.stop=this._findStopBefore(t),a.from=this._blockStartPos(t),a instanceof _&&(a.blockIndex=t),r.extend(a)}),r}extractInput(e,t,a){if(void 0===t&&(t=this.displayValue.length),void 0===a&&(a={}),(e=void 0===e?0:e)===t)return"";let r="";return this._forEachBlocksInRange(e,t,(e,t,n,i)=>{r+=e.extractInput(n,i,a)}),r}_findStopBefore(t){let n;for(let e=0;e{e.lazy&&null==t||n.aggregate(e._appendPlaceholder(null==(e=e._blocks)?void 0:e.length))}),n}_mapPosToBlock(t){let n="";for(let e=0;ee+=t.displayValue.length,0)}_forEachBlocksInRange(e,t,n){void 0===t&&(t=this.displayValue.length);var i=this._mapPosToBlock(e);if(i){var a=this._mapPosToBlock(t),r=a&&i.index===a.index,e=i.offset,t=a&&r?a.offset:this._blocks[i.index].displayValue.length;if(n(this._blocks[i.index],i.index,e,t),a&&!r){for(let e=i.index+1;e{a.aggregate(e.remove(n,i))}),a}nearestInputPos(e,t){if(void 0===t&&(t=c.NONE),!this._blocks.length)return 0;const n=new R(this,e);if(t===c.NONE)return n.pushRightBeforeInput()?n.pos:(n.popState(),n.pushLeftBeforeInput()?n.pos:this.displayValue.length);if(t!==c.LEFT&&t!==c.FORCE_LEFT)return t===c.RIGHT||t===c.FORCE_RIGHT?(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.pushRightBeforeFilled()?n.pos:t===c.FORCE_RIGHT?this.displayValue.length:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:this.nearestInputPos(e,c.LEFT)))):e;if(t===c.LEFT){if(n.pushRightBeforeFilled(),n.ok&&n.pos===e)return e;n.popState()}if(n.pushLeftBeforeInput(),n.pushLeftBeforeRequired(),n.pushLeftBeforeFilled(),t===c.LEFT){if(n.pushRightBeforeInput(),n.pushRightBeforeRequired(),n.ok&&n.pos<=e)return n.pos;if(n.popState(),n.ok&&n.pos<=e)return n.pos;n.popState()}return n.ok?n.pos:t===c.FORCE_LEFT?0:(n.popState(),n.ok?n.pos:(n.popState(),n.ok?n.pos:0))}totalInputPositions(e,t){void 0===t&&(t=this.displayValue.length);let a=0;return this._forEachBlocksInRange(e=void 0===e?0:e,t,(e,t,n,i)=>{a+=e.totalInputPositions(n,i)}),a}maskedBlock(e){return this.maskedBlocks(e)[0]}maskedBlocks(e){const t=this._maskedBlocks[e];return t?t.map(e=>this._blocks[e]):[]}pad(t){const n=new E;return this._forEachBlocksInRange(0,this.displayValue.length,e=>n.aggregate(e.pad(t))),n}}C.DEFAULTS={...b.DEFAULTS,lazy:!0,placeholderChar:"_"},C.STOP_CHAR="`",C.ESCAPE_CHAR="\\",C.InputDefinition=O,C.FixedDefinition=w,g.MaskedPattern=C;class y extends C{get _matchFrom(){return this.maxLength-String(this.from).length}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{to:t=this.to||0,from:n=this.from||0,maxLength:i=this.maxLength||0,autofix:a=this.autofix,...r}=e;this.to=t,this.from=n,this.maxLength=Math.max(String(t).length,i),this.autofix=a;var s=String(this.from).padStart(this.maxLength,"0");const o=String(this.to).padStart(this.maxLength,"0");let l=0;for(;lthis.maxLength)return super._appendCharRaw(e,t);var n=String(this.from).padStart(this.maxLength,"0"),i=String(this.to).padStart(this.maxLength,"0"),[a,r]=this.boundaries(this.value+e);return Number(r)this.to?!t.tail&&"pad"===this.autofix&&this.value.length+1this._appendCharRaw(e))}return n}}g.MaskedRange=y;class A extends C{static extractPatternOptions(e){const{mask:t,pattern:n,...i}=e;return{...i,mask:s(t)?t:n}}constructor(e){super(A.extractPatternOptions({...A.DEFAULTS,...e}))}updateOptions(e){super.updateOptions(e)}_update(e){const{mask:t,pattern:n,blocks:i,...a}={...A.DEFAULTS,...e},r=Object.assign({},A.GET_DEFAULT_BLOCKS());e.min&&(r.Y.from=e.min.getFullYear()),e.max&&(r.Y.to=e.max.getFullYear()),e.min&&e.max&&r.Y.from===r.Y.to&&(r.m.from=e.min.getMonth()+1,r.m.to=e.max.getMonth()+1,r.m.from===r.m.to&&(r.d.from=e.min.getDate(),r.d.to=e.max.getDate())),Object.assign(r,this.blocks,i),super._update({...a,mask:s(t)?t:n,blocks:r})}doValidate(e){var t=this.date;return super.doValidate(e)&&(!this.isComplete||this.isDateExist(this.value)&&null!=t&&(null==this.min||this.min<=t)&&(null==this.max||t<=this.max))}isDateExist(e){return 0<=this.format(this.parse(e,this),this).indexOf(e)}get date(){return this.typedValue}set date(e){this.typedValue=e}get typedValue(){return this.isComplete?super.typedValue:null}set typedValue(e){super.typedValue=e}maskEquals(e){return e===Date||super.maskEquals(e)}optionsIsChanged(e){return super.optionsIsChanged(A.extractPatternOptions(e))}}A.GET_DEFAULT_BLOCKS=()=>({d:{mask:y,from:1,to:31,maxLength:2},m:{mask:y,from:1,to:12,maxLength:2},Y:{mask:y,from:1900,to:9999}}),A.DEFAULTS={...C.DEFAULTS,mask:Date,pattern:"d{.}`m{.}`Y",format:(e,t)=>{if(!e)return"";const n=String(e.getDate()).padStart(2,"0"),i=String(e.getMonth()+1).padStart(2,"0"),a=e.getFullYear();return[n,i,a].join(".")},parse:(e,t)=>{var[n,i,e]=e.split(".").map(Number);return new Date(e,i-1,n)}},g.MaskedDate=A;class F extends b{constructor(e){super({...F.DEFAULTS,...e}),this.currentMask=void 0}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),"mask"in e&&(this.exposeMask=void 0,this.compiledMasks=Array.isArray(e.mask)?e.mask.map(e=>{const{expose:t,...n}=f(e);e=v({overwrite:this._overwrite,eager:this._eager,skipInvalid:this._skipInvalid,...n});return t&&(this.exposeMask=e),e}):[])}_appendCharRaw(e,t){const n=this._applyDispatch(e,t=void 0===t?{}:t);return this.currentMask&&n.aggregate(this.currentMask._appendChar(e,this.currentMaskFlags(t))),n}_applyDispatch(e,t,n){void 0===e&&(e=""),void 0===n&&(n="");var i=(t=void 0===t?{}:t).tail&&null!=t._beforeTailState?t._beforeTailState._value:this.value;const a=this.rawInputValue;var r=t.tail&&null!=t._beforeTailState?t._beforeTailState._rawInputValue:a,s=a.slice(r.length),o=this.currentMask;const l=new E;var u=null==o?void 0:o.state;return this.currentMask=this.doDispatch(e,{...t},n),this.currentMask&&(this.currentMask!==o?(this.currentMask.reset(),r&&(this.currentMask.append(r,{raw:!0}),l.tailShift=this.currentMask.value.length-i.length),s&&(l.tailShift+=this.currentMask.append(s,{raw:!0,tail:!0}).tailShift)):u&&(this.currentMask.state=u)),l}_appendPlaceholder(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendPlaceholder()),e}_appendEager(){const e=this._applyDispatch();return this.currentMask&&e.aggregate(this.currentMask._appendEager()),e}appendTail(e){const t=new E;return e&&t.aggregate(this._applyDispatch("",{},e)),t.aggregate(this.currentMask?this.currentMask.appendTail(e):super.appendTail(e))}currentMaskFlags(e){var t;return{...e,_beforeTailState:(null==(t=e._beforeTailState)?void 0:t.currentMaskRef)===this.currentMask&&(null==(t=e._beforeTailState)?void 0:t.currentMask)||e._beforeTailState}}doDispatch(e,t,n){return this.dispatch(e,this,t=void 0===t?{}:t,n=void 0===n?"":n)}doValidate(e){return super.doValidate(e)&&(!this.currentMask||this.currentMask.doValidate(this.currentMaskFlags(e)))}doPrepare(e,t){let[n,i]=super.doPrepare(e,t=void 0===t?{}:t);return this.currentMask&&([n,t]=super.doPrepare(n,this.currentMaskFlags(t)),i=i.aggregate(t)),[n,i]}doPrepareChar(e,t){let[n,i]=super.doPrepareChar(e,t=void 0===t?{}:t);return this.currentMask&&([n,t]=super.doPrepareChar(n,this.currentMaskFlags(t)),i=i.aggregate(t)),[n,i]}reset(){var e;null==(e=this.currentMask)||e.reset(),this.compiledMasks.forEach(e=>e.reset())}get value(){return this.exposeMask?this.exposeMask.value:this.currentMask?this.currentMask.value:""}set value(e){this.exposeMask?(this.exposeMask.value=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.value=e}get unmaskedValue(){return this.exposeMask?this.exposeMask.unmaskedValue:this.currentMask?this.currentMask.unmaskedValue:""}set unmaskedValue(e){this.exposeMask?(this.exposeMask.unmaskedValue=e,this.currentMask=this.exposeMask,this._applyDispatch()):super.unmaskedValue=e}get typedValue(){return this.exposeMask?this.exposeMask.typedValue:this.currentMask?this.currentMask.typedValue:""}set typedValue(e){if(this.exposeMask)return this.exposeMask.typedValue=e,this.currentMask=this.exposeMask,void this._applyDispatch();let t=String(e);this.currentMask&&(this.currentMask.typedValue=e,t=this.currentMask.unmaskedValue),this.unmaskedValue=t}get displayValue(){return this.currentMask?this.currentMask.displayValue:""}get isComplete(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isComplete)}get isFilled(){var e;return Boolean(null==(e=this.currentMask)?void 0:e.isFilled)}remove(e,t){const n=new E;return this.currentMask&&n.aggregate(this.currentMask.remove(e,t)).aggregate(this._applyDispatch()),n}get state(){var e;return{...super.state,_rawInputValue:this.rawInputValue,compiledMasks:this.compiledMasks.map(e=>e.state),currentMaskRef:this.currentMask,currentMask:null==(e=this.currentMask)?void 0:e.state}}set state(e){const{compiledMasks:n,currentMaskRef:t,currentMask:i,...a}=e;n&&this.compiledMasks.forEach((e,t)=>e.state=n[t]),null!=t&&(this.currentMask=t,this.currentMask.state=i),super.state=a}extractInput(e,t,n){return this.currentMask?this.currentMask.extractInput(e,t,n):""}extractTail(e,t){return this.currentMask?this.currentMask.extractTail(e,t):super.extractTail(e,t)}doCommit(){this.currentMask&&this.currentMask.doCommit(),super.doCommit()}nearestInputPos(e,t){return this.currentMask?this.currentMask.nearestInputPos(e,t):super.nearestInputPos(e,t)}get overwrite(){return this.currentMask?this.currentMask.overwrite:this._overwrite}set overwrite(e){this._overwrite=e}get eager(){return this.currentMask?this.currentMask.eager:this._eager}set eager(e){this._eager=e}get skipInvalid(){return this.currentMask?this.currentMask.skipInvalid:this._skipInvalid}set skipInvalid(e){this._skipInvalid=e}get autofix(){return this.currentMask?this.currentMask.autofix:this._autofix}set autofix(e){this._autofix=e}maskEquals(a){return Array.isArray(a)?this.compiledMasks.every((e,t)=>{if(a[t]){const{mask:n,...i}=a[t];return o(e,i)&&e.maskEquals(n)}}):super.maskEquals(a)}typedValueEquals(e){var t;return Boolean(null==(t=this.currentMask)?void 0:t.typedValueEquals(e))}}F.DEFAULTS={...b.DEFAULTS,dispatch:(a,r,s,o)=>{if(r.compiledMasks.length){const l=r.rawInputValue,e=r.compiledMasks.map((e,t)=>{var n=r.currentMask===e,i=n?e.displayValue.length:e.nearestInputPos(e.displayValue.length,c.FORCE_LEFT);return e.rawInputValue!==l?(e.reset(),e.append(l,{raw:!0})):n||e.remove(i),e.append(a,r.currentMaskFlags(s)),e.appendTail(o),{index:t,weight:e.rawInputValue.length,totalInputPositions:e.totalInputPositions(0,Math.max(i,e.nearestInputPos(e.displayValue.length,c.FORCE_LEFT)))}});return e.sort((e,t)=>t.weight-e.weight||t.totalInputPositions-e.totalInputPositions),r.compiledMasks[e[0].index]}}},g.MaskedDynamic=F;class T extends C{constructor(e){super({...T.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){const{enum:t,...n}=e;var i;t&&(i=t.map(e=>e.length),e=Math.min(...i),i=Math.max(...i)-e,n.mask="*".repeat(e),i&&(n.mask+="["+"*".repeat(i)+"]"),this.enum=t),super._update(n)}_appendCharRaw(t,i){void 0===i&&(i={});const n=Math.min(this.nearestInputPos(0,c.FORCE_RIGHT),this.value.length),a=this.enum.filter(e=>this.matchValue(e,this.unmaskedValue+t,n));if(a.length){1===a.length&&this._forEachBlocksInRange(0,this.value.length,(e,t)=>{var n=a[0][t];t>=this.value.length||n===e.value||(e.reset(),e._appendChar(n,i))});const r=super._appendCharRaw(a[0][this.value.length],i);return 1===a.length&&a[0].slice(this.unmaskedValue.length).split("").forEach(e=>r.aggregate(super._appendCharRaw(e))),r}return new E({skip:!this.isComplete})}extractTail(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),new S("",e)}remove(e,t){if((e=void 0===e?0:e)===(t=void 0===t?this.displayValue.length:t))return new E;const n=Math.min(super.nearestInputPos(0,c.FORCE_RIGHT),this.value.length);let i;for(i=e;0<=i;--i)if(1this.matchValue(e,this.value.slice(n,i),n)).length)break;const a=super.remove(i,t);return a.tailShift+=i-e,a}get isComplete(){return 0<=this.enum.indexOf(this.value)}}T.DEFAULTS={...C.DEFAULTS,matchValue:(e,t,n)=>e.indexOf(t,n)===n},g.MaskedEnum=T;class I extends b{updateOptions(e){super.updateOptions(e)}_update(e){super._update({...e,validate:e.mask})}}var D;g.MaskedFunction=I;class k extends b{constructor(e){super({...k.DEFAULTS,...e})}updateOptions(e){super.updateOptions(e)}_update(e){super._update(e),this._updateRegExps()}_updateRegExps(){var e="^"+(this.allowNegative?"[+|\\-]?":""),t=(this.scale?"("+n(this.radix)+"\\d{0,"+this.scale+"})?":"")+"$";this._numberRegExp=new RegExp(e+"\\d*"+t),this._mapToRadixRegExp=new RegExp("["+this.mapToRadix.map(n).join("")+"]","g"),this._thousandsSeparatorRegExp=new RegExp(n(this.thousandsSeparator),"g")}_removeThousandsSeparators(e){return e.replace(this._thousandsSeparatorRegExp,"")}_insertThousandsSeparators(e){const t=e.split(this.radix);return t[0]=t[0].replace(/\B(?=(\d{3})+(?!\d))/g,this.thousandsSeparator),t.join(this.radix)}doPrepareChar(e,t){void 0===t&&(t={});const[n,i]=super.doPrepareChar(this._removeThousandsSeparators(this.scale&&this.mapToRadix.length&&(t.input&&t.raw||!t.input&&!t.raw)?e.replace(this._mapToRadixRegExp,this.radix):e),t);return e&&!n&&(i.skip=!0),!n||this.allowPositive||this.value||"-"===n||i.aggregate(this._appendChar("-")),[n,i]}_separatorsCount(t,n){void 0===n&&(n=!1);let i=0;for(let e=0;ethis.max&&(e=this.max),null!=e&&(this.autofix?(this._value=this.format(e,this).replace(k.UNMASKED_RADIX,this.radix),s=s||a===this._value&&!t.tail):r=!1),r=r&&Boolean(this._value.match(this._numberRegExp))}let o;o=r?new E({inserted:this._value.slice(a.length),rawInserted:s?"":e,skip:s}):(this._value=a,new E),this._value=this._insertThousandsSeparators(this._value);t=(t.tail&&t._beforeTailState?t._beforeTailState:this)._value,t=this._separatorsCountFromSlice(t);return o.tailShift+=(t-i)*this.thousandsSeparator.length,o}_findSeparatorAround(e){if(this.thousandsSeparator){var t=e-this.thousandsSeparator.length+1,t=this.value.indexOf(this.thousandsSeparator,t);if(t<=e)return t}return-1}_adjustRangeWithSeparators(e,t){var n=this._findSeparatorAround(e);0<=n&&(e=n);n=this._findSeparatorAround(t);return[e,t=0<=n?n+this.thousandsSeparator.length:t]}remove(e,t){void 0===e&&(e=0),void 0===t&&(t=this.displayValue.length),[e,t]=this._adjustRangeWithSeparators(e,t);var n=this.value.slice(0,e),e=this.value.slice(t),t=this._separatorsCount(n.length);this._value=this._insertThousandsSeparators(this._removeThousandsSeparators(n+e));n=this._separatorsCountFromSlice(n);return new E({tailShift:(n-t)*this.thousandsSeparator.length})}nearestInputPos(e,t){if(!this.thousandsSeparator)return e;switch(t){case c.NONE:case c.LEFT:case c.FORCE_LEFT:var n=this._findSeparatorAround(e-1);if(0<=n){var i=n+this.thousandsSeparator.length;if(et+i),e.length&&!/\d$/.test(t[0])&&(t[0]=t[0]+"0"),1e.toLocaleString("en-US",{useGrouping:!1,maximumFractionDigits:20})},g.MaskedNumber=k;const N={MASKED:"value",UNMASKED:"unmaskedValue",TYPED:"typedValue"};function L(e,n,i){void 0===n&&(n=N.MASKED),void 0===i&&(i=N.MASKED);const a=v(e);return t=>a.runIsolated(e=>(e[n]=t,e[i]))}function P(e,t,n,i){return L(t,n,i)(e)}g.PIPE_TYPE=N,g.createPipe=L,g.pipe=P;class x extends C{get repeatFrom(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[0]:this.repeat===1/0?0:this.repeat)?e:0}get repeatTo(){var e;return null!=(e=Array.isArray(this.repeat)?this.repeat[1]:this.repeat)?e:1/0}constructor(e){super(e)}updateOptions(e){super.updateOptions(e)}_update(e){const{repeat:t,...n}=f(e);this._blockOpts=Object.assign({},this._blockOpts,n);var i=v(this._blockOpts);this.repeat=null!=(e=null!=(e=null!=t?t:i.repeat)?e:this.repeat)?e:1/0,super._update({mask:"m".repeat(Math.max(this.repeatTo===1/0&&(null==(e=this._blocks)?void 0:e.length)||0,this.repeatFrom)),blocks:{m:i},eager:i.eager,overwrite:i.overwrite,skipInvalid:i.skipInvalid,lazy:i.lazy,placeholderChar:i.placeholderChar,displayChar:i.displayChar})}_allocateBlock(e){return e{0;var n=wFORMS.behaviors.validation.rules.isRequired;e.querySelectorAll(n.selector).map(e=>{var t;i.isSwitchedOff(e)||(t=wFORMS.helpers.getFieldValue(e),i[n.check].call(i,e,t)?r++:a++)})});e=r+a;return 0===e?0:Math.ceil(r/e*100)},wFORMS.behaviors.paging.getPageIndex=function(e){if(e&&e.id){e=e.id.replace(new RegExp(wFORMS.behaviors.paging.ID_PAGE_PREFIX+"(\\d+)"),"$1"),e=parseInt(e);return!isNaN(e)&&e}return!1},wFORMS.behaviors.paging.isElementVisible=function(e){for(;e&&"BODY"!=e.tagName;){if(e.className){if(-1!=e.className.indexOf(this.CSS_CURRENT_PAGE))return!0;if(-1!=e.className.indexOf(this.CSS_PAGE))return!1}e=e.parentNode}return!0},wFORMS.behaviors.paging._createNextPageButton=function(e){var t=this.createNextPageButton();return t.setAttribute(this.ATTR_INDEX,e+1),t.id=this.ID_BUTTON_NEXT_PREFIX+e,t},wFORMS.behaviors.paging.createNextPageButton=function(){var e=document.createElement("input");return e.setAttribute("value",this.MESSAGES.CAPTION_NEXT),e.type="button",e.className=this.CSS_BUTTON_NEXT,e},wFORMS.behaviors.paging._createPreviousPageButton=function(e){var t=this.createPreviousPageButton();return t.setAttribute(this.ATTR_INDEX,e-1),t.id=this.ID_BUTTON_PREVIOUS_PREFIX+e,t},wFORMS.behaviors.paging.createPreviousPageButton=function(){var e=document.createElement("input");return e.setAttribute("value",this.MESSAGES.CAPTION_PREVIOUS),e.type="button",e.className=this.CSS_BUTTON_PREVIOUS,e},wFORMS.behaviors.paging.instance.prototype.getOrCreatePlaceHolder=function(e){var t=e.id+this.behavior.ID_PLACEHOLDER_SUFFIX,n=document.getElementById(t);return n||((n=e.appendChild(document.createElement("div"))).id=t,n.className=this.behavior.CSS_BUTTON_PLACEHOLDER),n},wFORMS.behaviors.paging.instance.prototype.getOrCreatePlaceHolderForLastPage=function(e){var t=e.id+this.behavior.ID_PLACEHOLDER_SUFFIX,n=document.getElementById(t);return n||(e=document.querySelector('[data-contentid="submit_button"]'),(n=document.createElement("div")).id=t,n.classList.add(this.behavior.CSS_BUTTON_PLACEHOLDER,"last-page-previous-button",this.behavior.CSS_SUBMIT_HIDDEN),e.before(n)),n},wFORMS.behaviors.paging.hidePage=function(e){e&&(e.removeClass||(e.removeClass=function(e){return base2.DOM.HTMLElement.removeClass(this,e)}),e.addClass||(e.addClass=function(e){return base2.DOM.HTMLElement.addClass(this,e)}),e.removeClass(wFORMS.behaviors.paging.CSS_CURRENT_PAGE),e.addClass(wFORMS.behaviors.paging.CSS_PAGE))},wFORMS.behaviors.paging.showPage=function(e){e&&(e.removeClass||(e.removeClass=function(e){return base2.DOM.HTMLElement.removeClass(this,e)}),e.removeClass(wFORMS.behaviors.paging.CSS_PAGE),e.addClass||(e.addClass=function(e){return base2.DOM.HTMLElement.addClass(this,e)}),e.addClass(wFORMS.behaviors.paging.CSS_CURRENT_PAGE))},wFORMS.behaviors.paging.instance.prototype.activatePage=function(e){var t;if(t=!(1this.currentPageIndex?this.findNextPage(this.currentPageIndex):this.findPreviousPage(this.currentPageIndex))&&(e=(a=this).behavior.getPageIndex(n),a.setupManagedControls(e),a.behavior.hidePage(a.behavior.getPageByIndex(a.currentPageIndex)),a.behavior.showPage(n),r=a.currentPageIndex,a.currentPageIndex=e,t&&(n.scrollIntoView?n.scrollIntoView():location.hash="#"+wFORMS.behaviors.paging.ID_PAGE_PREFIX+e),!1==o&&(s=function(e){return!(e instanceof HTMLInputElement&&"hidden"===e.type)&&(!e.classList.contains("offstate")&&!1===e.hidden)},null!==(o=function(e){for(i=0,l=e.length;i{e.className=e.className.replace(new RegExp("(^|\\s)"+this.behavior.CSS_SUBMIT_HIDDEN+"(\\s|$)","g"),"$2"),this.toggleActionsSection(!0)})},wFORMS.behaviors.paging.instance.prototype.hideSubmitButtons=function(){this.target.querySelectorAll('input[type="submit"]').forEach(e=>{new RegExp("(^|\\s)"+this.behavior.CSS_SUBMIT_HIDDEN+"(\\s|$)").test(e.className)||(e.className+=" "+this.behavior.CSS_SUBMIT_HIDDEN),this.toggleActionsSection(!1)})},wFORMS.behaviors.paging.instance.prototype.hideCaptchas=function(){var e=document.getElementById("google-captcha"),t=document.getElementById("captcha");null!=e&&(e.style.display="none"),null!=t&&(t.style.display="none")},wFORMS.behaviors.paging.instance.prototype.showCaptchas=function(e){var t,n=document.getElementById("submit_button");Object.prototype.hasOwnProperty.call(wFORMS.behaviors,"condition")&&n&&n.hasAttribute("data-condition")&&!wFORMS.behaviors.condition.isConditionalSubmitConditionMet||(t=document.getElementById("google-captcha"),n=document.getElementById("captcha"),null!=t&&(null!=e&&e.parentNode.insertBefore(t,e),t.style.display="block"),null!=n&&(n.style.display="block"))},wFORMS.behaviors.paging.instance.prototype.toggleActionsSection=function(e){var t=document.querySelector('[data-contentid="submit_button"]');t&&(e?t.classList.remove(this.behavior.CSS_SUBMIT_HIDDEN):t.classList.add(this.behavior.CSS_SUBMIT_HIDDEN))},wFORMS.behaviors.paging.instance.prototype.toggleDisplayMessage=function(e){var t=document.getElementsByClassName("action-display-message")[0];t&&(e?t.classList.remove(this.behavior.CSS_SUBMIT_HIDDEN):t.classList.add(this.behavior.CSS_SUBMIT_HIDDEN))},wFORMS.behaviors.paging.instance.prototype.toggleLastPagePreviousButton=function(e){var t=document.getElementsByClassName("last-page-previous-button")[0];t&&(e?t.classList.remove(this.behavior.CSS_SUBMIT_HIDDEN):t.classList.add(this.behavior.CSS_SUBMIT_HIDDEN))},wFORMS.behaviors.paging.getPageByIndex=function(e){e=document.getElementById(wFORMS.behaviors.paging.ID_PAGE_PREFIX+e);return!!e&&base2.DOM.bind(e)},wFORMS.behaviors.paging.getNextButton=function(e){return document.getElementById(wFORMS.behaviors.paging.ID_BUTTON_NEXT_PREFIX+e)},wFORMS.behaviors.paging.getPreviousButton=function(e){return document.getElementById(wFORMS.behaviors.paging.ID_BUTTON_PREVIOUS_PREFIX+e)},wFORMS.behaviors.paging.isLastPageIndex=function(e,t){e=parseInt(e)+1;var n=wFORMS.behaviors.paging,i=n.getPageByIndex(e);if((_b=wFORMS.behaviors.condition)&&!t)for(;i&&_b.hasOffState(i);)i=n.getPageByIndex(++e);return!i},wFORMS.behaviors.paging.isFirstPageIndex=function(e,t){e=parseInt(e)-1;var n=wFORMS.behaviors.paging,i=n.getPageByIndex(e);if((_b=wFORMS.behaviors.condition)&&!t)for(;i&&_b.hasOffState(i);)i=n.getPageByIndex(--e);return!i},wFORMS.behaviors.paging.instance.prototype.findNextPage=function(e){e=parseInt(e)+1;var t=wFORMS.behaviors.paging,n=t.getPageByIndex(e);if(_b=wFORMS.behaviors.condition)for(;n&&_b.hasOffState(n);)n=t.getPageByIndex(++e);return n},wFORMS.behaviors.paging.instance.prototype.findPreviousPage=function(e){e=parseInt(e)-1;var t=wFORMS.behaviors.paging,n=t.getPageByIndex(e);if(_b=wFORMS.behaviors.condition)for(;n&&_b.hasOffState(n);)n=t.getPageByIndex(--e);return n||!1},wFORMS.behaviors.paging.instance.prototype.jumpTo=function(e){var t,n=this,i=e;n.currentPageIndex!=i&&(n.behavior.hidePage(n.behavior.getPageByIndex(n.currentPageIndex)),n.setupManagedControls(i),n.behavior.showPage(n.behavior.getPageByIndex(i)),n.currentPageIndex=i),vInstance=wFORMS.getBehaviorInstance(n.target,"validation"),vInstance&&vInstance.errorPages&&vInstance.errorPages[i]&&!arguments[1]&&((t=document.getElementById(vInstance.errorPages[i][0])).scrollIntoView&&setTimeout(function(){t.scrollIntoView()},1));i=n.behavior.getPageByIndex(i);this.labelCurrentPageTab(i),this.onPageChange(i)},wFORMS.behaviors.paging.instance.prototype.generateTabs=function(e){var r=this;document.getElementById(this.behavior.CSS_TABSID)&&(n=document.getElementById(this.behavior.CSS_TABSID)).parentNode.removeChild(n);var s=document.createElement("div");s.id=this.behavior.CSS_TABSID,s.className=this.behavior.CSS_TABSID;var t=document.createTextNode(this.behavior.MESSAGES.NAV_LABEL),n=document.createElement("span");n.className=this.behavior.CSS_TABNAVLABEL,n.appendChild(t),s.appendChild(n),e?e.appendChild(s):this.target.parentNode.insertBefore(s,this.target);var o=base2.DOM.Element.querySelectorAll(this.target,"."+this.behavior.CSS_PAGE+", ."+this.behavior.CSS_CURRENT_PAGE);o.forEach(function(e,t){var n;wFORMS.behaviors.condition.hasOffState(e)?((n=document.createElement("span")).setAttribute("class",r.behavior.CSS_TABS+" "+r.behavior.CSS_HIDDENTABS),n.setAttribute("id",r.behavior.CSS_PAGETAB+"_"+(t+1))):((n=document.createElement("a")).setAttribute("class",r.behavior.CSS_TABS),n.setAttribute("id",r.behavior.CSS_PAGETAB+"_"+(t+1)),n.setAttribute("href","#"),base2.DOM.Element.addEventListener(n,"click",function(e){return r.jumpTo(t+1),e.preventDefault(),!1}));var i=base2.DOM.Element.querySelector(e,"h4"),e=null;i&&(e=i.innerText||i.textContent),n.setAttribute("title",e||r.behavior.MESSAGES.TAB_LABEL+(t+1));var a,e=document.createTextNode(t+1);n.appendChild(e),t=e&&(e=this.target.id+this.behavior.ID_SUFFIX_DUPLICATE_LINK,document.getElementById(e).style.display="none")},_i.prototype.counterRepeatedFields=1,_i.prototype.getOrCreateRepeatLink=function(e){var t=e.id+this.behavior.ID_SUFFIX_DUPLICATE_LINK;if(!(n=document.getElementById(t))||""==n){var n=this.createRepeatLink(t),i=document.createElement("div");if(i.className=this.behavior.CSS_DUPLICATE_SPAN,n=i.appendChild(n),"TR"==e.tagName.toUpperCase()){t=e.parentNode.parentNode;t.style.marginBottom="0px";for(var a=t.nextSibling;a&&1!=a.nodeType;)a=a.nextSibling;a?t.parentNode.insertBefore(i,a):t.parentNode.appendChild(i)}else e.parentNode.insertBefore(i,this.getLastRepeat(e).nextSibling);e.classList.contains("wf-acl-hidden")&&i.classList.add("wf-acl-hidden")}return base2.DOM.bind(n)},_i.prototype.getLastRepeat=function(e){var t=e.parentNode;t.querySelectorAll||base2.DOM.bind(t);var n=e.id.match("^.[^[]+")[0],n=t.querySelectorAll(wFORMS.behaviors.repeat.SELECTOR_REMOVEABLE+"[id^="+n+"]");return 0=i&&(document.getElementById(e).style.display="none"),this.behavior.onRepeat(t),wFORMS.helpers.spotlight(t)},_i.prototype.removeSection=function(e){var t,n;e&&(n=this.behavior.getMasterSection(e),this.logRemovedSection(e),e=e.parentNode.removeChild(e),this.callRemoveCompleteObservers(e),this.counterRepeatedFields--,t=e.getAttribute("data-repeatlimit"),n=n.id+this.behavior.ID_SUFFIX_DUPLICATE_LINK,null!=t&&this.counterRepeatedFields<=t&&(document.getElementById(n).style.display=""),this.behavior.onRemove(e))},_i.prototype.logRemovedSection=function(e){var t,n,i;e&&e.id&&(t=e.id,i=this.behavior.getMasterSection(e),(n=this.getOrCreateCounterField(i))&&(e=[],(i=n.value.split("|"))[1]&&(e=i[1].split(",")),i=i[0],e.push(t),n.value=i+"|"+e.join(",")))},_i.prototype.getInsertNode=function(e){var t=e.nextSibling;for(t&&1==t.nodeType&&!t.hasClass&&(t.hasClass=function(e){return base2.DOM.HTMLElement.hasClass(this,e)});t&&(1!=t.nodeType||t.hasClass(this.behavior.CSS_REMOVEABLE));)(t=t.nextSibling)&&1==t.nodeType&&!t.hasClass&&(t.hasClass=function(e){return base2.DOM.HTMLElement.hasClass(this,e)});return t},_i.prototype.onRemoveLinkClick=function(e,t){confirm(this.behavior.MESSAGES.REMOVE_WARNING)&&(t=document.getElementById(t.getAttribute(this.behavior.ATTR_LINK_SECTION_ID)),this.removeSection(t),e&&e.preventDefault())},_i.prototype.updateMasterSection=function(e){if(1==e.doItOnce)return!0;e.doItOnce=!0;var t=e.id,n=this.createSuffix(e);e.id=this.clearSuffix(e.id)+n,e.id!=t&&this.callMasterIdChangeObservers(t,e.id),this.updateMasterElements(e,n,t)},_i.prototype.updateMasterElements=function(e,t,n){if(e&&1==e.nodeType){e.hasClass||(e.hasClass=function(e){return base2.DOM.HTMLElement.hasClass(this,e)}),e.hasClass(this.behavior.CSS_REPEATABLE)&&n!=e.id&&(document.getElementById(n+this.behavior.ID_SUFFIX_DUPLICATE_LINK).id=n+t+this.behavior.ID_SUFFIX_DUPLICATE_LINK);for(var i=e.childNodes,a=0;aNumber(r):!1;case"gte":return a.length?Number(a)>=Number(r):!1;case"lt":return a.length?Number(a)t.includes(e)),n=t.split(n);let i,a,r;return 2e.getAttribute("data-maxwords"))},wFORMS.behaviors.validation.instance.prototype.numberRangeTest=function(e,t,n){var i,a=null,r=null;if(this.isEmpty(t))return!0;if(null==(a=(i=e.getAttribute(wFORMS.behaviors.validation.LOWER_BOUND_ATTRIBUTE))&&(this.validateFloat(i)||this.validateInteger(i))?parseFloat(i):a)&&(a=-1/0),null==(r=(e=e.getAttribute(wFORMS.behaviors.validation.UPPER_BOUND_ATTRIBUTE))&&(this.validateFloat(e)||this.validateInteger(e))?parseFloat(e):r)&&(r=1/0),t=parseFloat(t),isNaN(t)||null==t)return!1;e=null;return tr.getTime();return(p||t)&&r&&a?n.both.replace(/%1/g,s).replace(/%2/g,o):p?n.min.replace(/%1/g,s):!t||n.max.replace(/%1/g,o)},wFORMS.behaviors.validation.enableResumeLater=function(){var e,t=document.getElementById("tfa_resumeLater");t&&(wFORMS.behaviors.validation.messages.isPasswordConfirmed||(wFORMS.behaviors.validation.messages.isPasswordConfirmed="Your password and confirmation field did not match."),wFORMS.behaviors.validation.instance.prototype.isPasswordConfirmed=function(e,t){return!document.getElementById("tfa_confirmPassword")||t==document.getElementById("tfa_confirmPassword").value},wFORMS.behaviors.validation.messages.userPasswordPolicy||(wFORMS.behaviors.validation.messages.userPasswordPolicy="Password must include 12 characters, 1 uppercase letter, 1 lowercase letter, 1 number, and 1 special character."),wFORMS.behaviors.validation.instance.prototype.userPasswordPolicy=function(e,t){for(var n=[/^([^\s]{12,})/,/[a-z]/i,/[A-Z]/i,/[0-9]/,/[\"!#$%&'()*+,-.\/:;<=>?@\[\]\\\^_`{|}~]/],i=0;i?@\[\]\\\^_`{|}~]/],i=0;in.indexOf(e)===t);r.varFields=[];for(var a=0;a=wFORMS.behaviors.lengthPrompt.MONITOR_CHECK_TIMES&&window.clearInterval(i._pasteMonitorHandler)}),10))},textarea_input:function(e){var t=wFORMS.behaviors.lengthPrompt._globalCache[this.id];t&&t.restrictInput(e)}},messages:"%1 characters left.",_getActorsSelector:function(){if(!wFORMS.behaviors.lengthPrompt.ACTORS_SELECTOR){for(var e="",t=0;tFill out forms faster by saving these answers in your browser. Saved answers will be filled out automatically by your browser.
Choose “Don’t Remember" if you are on a public computer.\n\nYou can also clear saved answers at any time by clearing your browser cache.
',CONFIRM_CACHE:"Remember",CANCEL_CACHE:"Don't Remember",DO_NOT_ASK_AGAIN:"Don’t ask again"},applyTo:function(e){return new wFORMS.behaviors.responseCaching.instance(e)}},wFORMS.behaviors.responseCaching.instance.prototype.run=function(){this.restoreCachedData();var n=this,i=wFORMS.behaviors.validation.onPass,a=wFORMS.getBehaviorInstance(this.target,"paging");wFORMS.behaviors.validation.onPass=function(e,t){if("function"==typeof i&&i(e,t),!a||wFORMS.behaviors.paging.isLastPageIndex(a.currentPageIndex))return n.onSubmit(t)}},wFORMS.behaviors.responseCaching.instance.prototype.restoreCachedData=function(){for(var e=this.getCachedData(),t=this.getAllCacheEnabledFields(),n=0;nt){-1<(""+e.className).search("stacked")||(e.className=e.className+" stacked");var i=e.querySelectorAll("input");if(!(-1<(""+e.className).search("isStackedAndLabeled"))){for(var a=0;at;if(t&&(-1<(""+e.className).search("stacked")||(e.className=e.className+" stacked"),!(-1<(""+e.className).search("isStackedAndLabeled")))){for(var i=e.querySelectorAll("input[type=text],input[type=password],input[type=file],textarea,select"),a=0;au.googleSessionToken.expiration&&(u.googleSessionToken={token:window.crypto.randomUUID(),expiration:(new Date).setMinutes((new Date).getMinutes()+3)}),n.url=n.url.replace("%QUERY%",encodeURIComponent(e)).replace("%GOOGLESESSIONTOKEN%",u.googleSessionToken.token);for(var t=[],i=/%%([^%]*)%%/g,a=i.exec(n.url);null!=a;)t.push(a[1]),a=i.exec(n.url);return t.map(function(e){var t=document.querySelector('[name="'+e+'"]');t&&(n.url=n.url.replace("%%"+e+"%%",encodeURIComponent(t.value)))}),n},transform:function(e){return l.datasetType,l.matchingSetSize=e.total,e.results||[]}}:i&&(s=JSON.parse(i),l.matchingSetSize=s.length);s={identify:function(e){return e.a},queryTokenizer:wFORMS.behaviors.autosuggest.bloodhoundTokenizer,datumTokenizer:function(e){return wFORMS.behaviors.autosuggest.bloodhoundTokenizer(e.a)},indexRemote:!0,remote:r,local:s};this.engine=new Bloodhound(s);FA$(this.target).typeahead({minLength:0,hint:!0,highlight:!0},{source:function(e,t,n){if(e=null==e?"":FA$.trim(e+""),null===l.matchingSetSize){var i=0;for(k in l.engine.index.datums)l.engine.index.datums.hasOwnProperty(k)&&i++;l.matchingSetSize=i}var a=""===e&&!r;a?(n([]),t(l.engine.index.all())):l.engine.search(e,function(e){l.onSuggestionUpdate&&l.onSuggestionUpdate(e,"sync"),l.matchingSetSize=e.length,t.apply(this,arguments)},function(){l.onSuggestionUpdate&&l.onSuggestionUpdate(arguments[0],"async"),n.apply(this,arguments)})},displayKey:wFORMS.behaviors.autosuggest.DISPLAY_KEY,limit:wFORMS.behaviors.autosuggest.SUGGESTIONS_LIMIT,templates:{empty:''+wFORMS.behaviors.autosuggest.MESSAGES.NO_RESULTS+"
",footer:function(e){if(e.suggestions.length'+wFORMS.behaviors.autosuggest.MESSAGES.SHOWING_OF.replace("%1",e.suggestions.length).replace("%2",l.matchingSetSize)+" "+wFORMS.behaviors.autosuggest.MESSAGES.CONTINUE_TYPING+""}}}).on("typeahead:asyncrequest",this.showSpinner).on("typeahead:asynccancel typeahead:asyncreceive typeahead:close",this.hideSpinner),FA$(this.target).data("ttTypeahead")._onTabKeyed=()=>{},0===parseInt(a)&&FA$(this.target).on("typeahead:select typeahead:autocompleted",function(e,t){this.target.setAttribute("data-selected",t[wFORMS.behaviors.autosuggest.DISPLAY_KEY]),this.target.setAttribute("data-selected-json",JSON.stringify(t))}.bind(l)),FA$(this.target).on("typeahead:change",function(){this.clearFieldMap();var e=FA$(this.target).val();e!==this.target.getAttribute("data-selected")&&this.engine.search(e,this.handleExactMatch,this.handleExactMatch)}.bind(l));a=FA$(this.target).val();""!==a&&("address-autocomplete"===this.datasetType&&this.engine.add([{a:a}]),this.engine.search(a,this.handleExactMatch,this.handleExactMatch)),this.showOrHideClearIcon(),FA$(this.target).closest(".inputWrapper").find(".tt-search").on("click",this.focusTypeaheadField),FA$(this.target).closest(".inputWrapper").find(".tt-clear").on("click keydown",this.clearTypeaheadValue),FA$(this.target).on("keyup typeahead:change typeahead:select blur",this.showOrHideClearIcon.bind(l)),FA$(this.target).on("typeahead:autocomplete typeahead:select",function(e,t){var n=FA$(this.target).val(),n=this.engine.get(n)&&this.engine.get(n)[0]?this.engine.get(n)[0].fa_ta_uid:null;n?(this.engine.search("selected_id:"+n,this.handleExactMatch,this.handleExactMatch),this.googleSessionToken={token:window.crypto.randomUUID(),expiration:(new Date).setMinutes((new Date).getMinutes()+3)}):this.setFieldMap(e,t)}.bind(l)),"salesforce"===this.datasetType&&this.handleSalesforceDependencyChanges()},wFORMS.behaviors.autosuggest.instance.prototype.setValue=function(e){FA$(this.target).typeahead("val",e)},wFORMS.behaviors.autosuggest.instance.prototype.onApply=function(){},wFORMS.behaviors.repeat.observeRepeatComplete((e,t,n)=>{var i=n=>{for(const a in n){var e=n[a],i=e.match(/\[\d+\]/g).join(""),t=document.getElementById(e),e=t.getAttribute("data-dataset-parameters");e&&(e=(e=e.replace(/\[(\d+)\]/g,"")).split(" ").map(e=>{const t=Object.values(n);return t.includes(e+i)?e+i:e}).join(" "),t.setAttribute("data-dataset-parameters",e))}};i(n.master),i(n.repeat)});