vendor: 19,013 bytes, lines 1-9
1var IESecureElement;if(typeof HTMLElement!=='undefined'){IESecureElement=HTMLElement;} 2else{IESecureElement=Element;} 3IESecureElement.prototype.wrap=function(wrapper){var parent=this.parentNode,sibling=this.nextSibling;wrapper.appendChild(this);if(sibling){parent.insertBefore(wrapper,sibling);} 4else{parent.appendChild(wrapper);} 5return wrapper;}; 6var IESecureElement;if(typeof HTMLElement!=='undefined'){IESecureElement=HTMLElement;} 7else{IESecureElement=Element;} 8IESecureElement.prototype.replaceWith=function(elm){this.parentNode.replaceChild(elm,this);}; 9!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){var t=[],k=C.document,c=t.slice,g=t.concat,a=t.push,i=t.indexOf,n={},r=n.toString,h=n.hasOwnProperty,v={},o="2.2.4",E=function(e,t){return new E.fn.init(e,t)},s=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,u=/^-ms-/,l=/-([\da-z])/gi,f=function(e,t){return t.toUpperCase()};function p(e){var t=!!e&&"length"in e&&e.length,n=E.type(e);return"function"!==n&&!E.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}E.fn=E.prototype={jquery:o,constructor:E,selector:"",length:0,toArray:function(){return c.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:c.call(this)},pushStack:function(e){var t=E.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return E.each(this,e)},map:function(n){return this.pushStack(E.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(c.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:a,sort:t.sort,splice:t.splice},E.extend=E.fn.extend=function(){var e,t,n,r,i,o,s=arguments[0]||{},a=1,u=arguments.length,l=!1;for("boolean"==typeof s&&(l=s,s=arguments[a]||{},a++),"object"==typeof s||E.isFunction(s)||(s={}),a===u&&(s=this,a--);a<u;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],s!==(r=e[t])&&(l&&r&&(E.isPlainObject(r)||(i=E.isArray(r)))?(o=i?(i=!1,n&&E.isArray(n)?n:[]):n&&E.isPlainObject(n)?n:{},s[t]=E.extend(l,o,r)):void 0!==r&&(s[t]=r));return s},E.extend({expando:"jQuery"+(o+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===E.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!E.isArray(e)&&0<=t-parseFloat(t)+1},isPlainObject:function(e){var t;if("object"!==E.type(e)||e.nodeType||E.isWindow(e))return!1;if(e.constructor&&!h.call(e,"constructor")&&!h.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||h.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[r.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=E.trim(e))&&(1===e.indexOf("use strict")?((t=k.createElement("script")).text=e,k.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(u,"ms-").replace(l,f)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(p(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(s,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?E.merge(n,"string"==typeof e?[e]:e):a.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,s=!n;i<o;i++)!t(e[i],i)!==s&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,s=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&s.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&s.push(i);return g.apply([],s)},guid:1,proxy:function(e,t){var n,r,i;return"string"==typeof t&&(n=e[t],t=e,e=n),E.isFunction(e)?(r=c.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(c.call(arguments)))}).guid=e.guid=e.guid||E.guid++,i):void 0},now:Date.now,support:v}),"function"==typeof Symbol&&(E.fn[Symbol.iterator]=t[Symbol.iterator]),E.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,h,b,o,i,g,f,v,w,u,l,T,C,s,k,m,a,c,y,E="sizzle"+1*new Date,x=n.document,N=0,r=0,p=ie(),d=ie(),S=ie(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],A=t.pop,q=t.push,L=t.push,H=t.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},F="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",M="\\["+P+"*("+R+")(?:"+P+"*([*^$|!~]?=)"+P+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+R+"))|)"+P+"*\\]",I=":("+R+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+M+")*)|.*)\\)|)",W=new RegExp(P+"+","g"),$=new RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),B=new RegExp("^"+P+"*,"+P+"*"),_=new RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),X=new RegExp("="+P+"*([^\\]'\"]*?)"+P+"*\\]","g"),z=new RegExp(I),U=new RegExp("^"+R+"$"),V={ID:new RegExp("^#("+R+")"),CLASS:new RegExp("^\\.("+R+")"),TAG:new RegExp("^("+R+"|[*])"),ATTR:new RegExp("^"+M),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:new RegExp("^(?:"+F+")$","i"),needsContext:new RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,G=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,K=/[+~]/,Z=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ne=function(){T()};try{L.apply(t=H.call(x.childNodes),x.childNodes),t[x.childNodes.length].nodeType}catch(e){L={apply:t.length?function(e,t){q.apply(e,H.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,n,r){var i,o,s,a,u,l,c,f,p=t&&t.ownerDocument,d=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==d&&9!==d&&11!==d)return n;if(!r&&((t?t.ownerDocument||t:x)!==C&&T(t),t=t||C,k)){if(11!==d&&(l=J.exec(e)))if(i=l[1]){if(9===d){if(!(s=t.getElementById(i)))return n;if(s.id===i)return n.push(s),n}else if(p&&(s=p.getElementById(i))&&y(t,s)&&s.id===i)return n.push(s),n}else{if(l[2])return L.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&h.getElementsByClassName&&t.getElementsByClassName)return L.apply(n,t.getElementsByClassName(i)),n}if(h.qsa&&!S[e+" "]&&(!m||!m.test(e))){if(1!==d)p=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(Z,"\\$&"):t.setAttribute("id",a=E),o=(c=g(e)).length,u=U.test(a)?"#"+a:"[id='"+a+"']";o--;)c[o]=u+" "+he(c[o]);f=c.join(","),p=K.test(e)&&pe(t.parentNode)||t}if(f)try{return L.apply(n,p.querySelectorAll(f)),n}catch(e){}finally{a===E&&t.removeAttribute("id")}}}return v(e.replace($,"$1"),t,n,r)}function ie(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function oe(e){return e[E]=!0,e}function se(e){var t=C.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ae(e,t){for(var n=e.split("|"),r=n.length;r--;)b.attrHandle[n[r]]=t}function ue(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function le(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ce(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(s){return oe(function(o){return o=+o,oe(function(e,t){for(var n,r=s([],e.length,o),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function pe(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in h=re.support={},i=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},T=re.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:x;return r!==C&&9===r.nodeType&&r.documentElement&&(s=(C=r).documentElement,k=!i(C),(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ne,!1):n.attachEvent&&n.attachEvent("onunload",ne)),h.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),h.getElementsByTagName=se(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),h.getElementsByClassName=Q.test(C.getElementsByClassName),h.getById=se(function(e){return s.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),h.getById?(b.find.ID=function(e,t){if(void 0!==t.getElementById&&k){var n=t.getElementById(e);return n?[n]:[]}},b.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete b.find.ID,b.filter.ID=function(e){var n=e.replace(ee,te);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),b.find.TAG=h.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):h.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"!==e)return o;for(;n=o[i++];)1===n.nodeType&&r.push(n);return r},b.find.CLASS=h.getElementsByClassName&&function(e,t){return void 0!==t.getElementsByClassName&&k?t.getElementsByClassName(e):void 0},a=[],m=[],(h.qsa=Q.test(C.querySelectorAll))&&(se(function(e){s.appendChild(e).innerHTML="<a id='"+E+"'></a><select id='"+E+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+P+"*(?:value|"+F+")"),e.querySelectorAll("[id~="+E+"-]").length||m.push("~="),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||m.push(".#.+[+~]")}),se(function(e){var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+P+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:")})),(h.matchesSelector=Q.test(c=s.matches||s.webkitMatchesSelector||s.mozMatchesSelector||s.oMatchesSelector||s.msMatchesSelector))&&se(function(e){h.disconnectedMatch=c.call(e,"div"),c.call(e,"[s!='']:x"),a.push("!=",I)}),m=m.length&&new RegExp(m.join("|")),a=a.length&&new RegExp(a.join("|")),t=Q.test(s.compareDocumentPosition),y=t||Q.test(s.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!h.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===x&&y(x,e)?-1:t===C||t.ownerDocument===x&&y(x,t)?1:u?O(u,e)-O(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,s=[e],a=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?O(u,e)-O(u,t):0;if(i===o)return ue(e,t);for(n=e;n=n.parentNode;)s.unshift(n);for(n=t;n=n.parentNode;)a.unshift(n);for(;s[r]===a[r];)r++;return r?ue(s[r],a[r]):s[r]===x?-1:a[r]===x?1:0}),C},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),t=t.replace(X,"='$1']"),h.matchesSelector&&k&&!S[t+" "]&&(!a||!a.test(t))&&(!m||!m.test(t)))try{var n=c.call(e,t);if(n||h.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<re(t,C,null,[e]).length},re.contains=function(e,t){return(e.ownerDocument||e)!==C&&T(e),y(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==C&&T(e);var n=b.attrHandle[t.toLowerCase()],r=n&&D.call(b.attrHandle,t.toLowerCase())?n(e,t,!k):void 0;return void 0!==r?r:h.attributes||!k?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!h.detectDuplicates,u=!h.sortStable&&e.slice(0),e.sort(j),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return u=null,e},o=re.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=o(t);return n},(b=re.selectors={cacheLength:50,createPseudo:oe,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&z.test(n)&&(t=g(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=re.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(W," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(h,e,t,g,v){var m="nth"!==h.slice(0,3),y="last"!==h.slice(-4),x="of-type"===e;return 1===g&&0===v?function(e){return!!e.parentNode}:function(e,t,n){var r,i,o,s,a,u,l=m!==y?"nextSibling":"previousSibling",c=e.parentNode,f=x&&e.nodeName.toLowerCase(),p=!n&&!x,d=!1;if(c){if(m){for(;l;){for(s=e;s=s[l];)if(x?s.nodeName.toLowerCase()===f:1===s.nodeType)return!1;u=l="only"===h&&!u&&"nextSibling"}return!0}if(u=[y?c.firstChild:c.lastChild],y&&p){for(d=(a=(r=(i=(o=(s=c)[E]||(s[E]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1])&&r[2],s=a&&c.childNodes[a];s=++a&&s&&s[l]||(d=a=0)||u.pop();)if(1===s.nodeType&&++d&&s===e){i[h]=[N,a,d];break}}else if(p&&(d=a=(r=(i=(o=(s=e)[E]||(s[E]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]||[])[0]===N&&r[1]),!1===d)for(;(s=++a&&s&&s[l]||(d=a=0)||u.pop())&&((x?s.nodeName.toLowerCase()!==f:1!==s.nodeType)||!++d||(p&&((i=(o=s[E]||(s[E]={}))[s.uniqueID]||(o[s.uniqueID]={}))[h]=[N,d]),s!==e)););return(d-=v)===g||d%g==0&&0<=d/g}}},PSEUDO:function(e,o){var t,s=b.pseudos[e]||b.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return s[E]?s(o):1<s.length?(t=[e,e,"",o],b.setFilters.hasOwnProperty(e.toLowerCase())?oe(function(e,t){for(var n,r=s(e,o),i=r.length;i--;)e[n=O(e,r[i])]=!(t[n]=r[i])}):function(e){return s(e,0,t)}):s}},pseudos:{not:oe(function(e){var r=[],i=[],a=f(e.replace($,"$1"));return a[E]?oe(function(e,t,n,r){for(var i,o=a(e,null,r,[]),s=e.length;s--;)(i=o[s])&&(e[s]=!(t[s]=i))}):function(e,t,n){return r[0]=e,a(r,null,n,i),r[0]=null,!i.pop()}}),has:oe(function(t){return function(e){return 0<re(t,e).length}}),contains:oe(function(t){return t=t.replace(ee,te),function(e){return-1<(e.textContent||e.innerText||o(e)).indexOf(t)}}),lang:oe(function(n){return U.test(n||"")||re.error("unsupported lang: "+n),n=n.replace(ee,te).toLowerCase(),function(e){var t;do{if(t=k?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===s},focus:function(e){return e===C.activeElement&&(!C.hasFocus||C.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!b.pseudos.empty(e)},header:function(e){return G.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:fe(function(){return[0]}),last:fe(function(e,t){return[t-1]}),eq:fe(function(e,t,n){return[n<0?n+t:n]}),even:fe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:fe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:fe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:fe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=b.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})b.pseudos[e]=le(e);for(e in{submit:!0,reset:!0})b.pseudos[e]=ce(e);function de(){}function he(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ge(a,e,t){var u=e.dir,l=t&&"parentNode"===u,c=r++;return e.first?function(e,t,n){for(;e=e[u];)if(1===e.nodeType||l)return a(e,t,n)}:function(e,t,n){var r,i,o,s=[N,c];if(n){for(;e=e[u];)if((1===e.nodeType||l)&&a(e,t,n))return!0}else for(;e=e[u];)if(1===e.nodeType||l){if((r=(i=(o=e[E]||(e[E]={}))[e.uniqueID]||(o[e.uniqueID]={}))[u])&&r[0]===N&&r[1]===c)return s[2]=r[2];
vendor: 1,809 bytes, line 9
9if((i[u]=s)[2]=a(e,t,n))return!0}}}function ve(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function me(e,t,n,r,i){for(var o,s=[],a=0,u=e.length,l=null!=t;a<u;a++)(o=e[a])&&(n&&!n(o,r,i)||(s.push(o),l&&t.push(a)));return s}function ye(d,h,g,v,m,e){return v&&!v[E]&&(v=ye(v)),m&&!m[E]&&(m=ye(m,e)),oe(function(e,t,n,r){var i,o,s,a=[],u=[],l=t.length,c=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(h||"*",n.nodeType?[n]:n,[]),f=!d||!e&&h?c:me(c,a,d,n,r),p=g?m||(e?d:l||v)?[]:t:f;if(g&&g(f,p,n,r),v)for(i=me(p,u),v(i,[],n,r),o=i.length;o--;)(s=i[o])&&(p[u[o]]=!(f[u[o]]=s));if(e){if(m||d){if(m){for(i=[],o=p.length;o--;)(s=p[o])&&i.push(f[o]=s);m(null,p=[],i,r)}for(o=p.length;o--;)(s=p[o])&&-1<(i=m?O(e,s):a[o])&&(e[i]=!(t[i]=s))}}else p=me(p===t?p.splice(l,p.length):p),m?m(null,t,p,r):L.apply(t,p)})}function xe(e){for(var i,t,n,r=e.length,o=b.relative[e[0].type],s=o||b.relative[" "],a=o?1:0,u=ge(function(e){return e===i},s,!0),l=ge(function(e){return-1<O(i,e)},s,!0),c=[function(e,t,n){var r=!o&&(n||t!==w)||((i=t).nodeType?u(e,t,n):l(e,t,n));return i=null,r}];a<r;a++)if(t=b.relative[e[a].type])c=[ge(ve(c),t)];else{if((t=b.filter[e[a].type].apply(null,e[a].matches))[E]){for(n=++a;n<r&&!b.relative[e[n].type];n++);return ye(1<a&&ve(c),1<a&&he(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace($,"$1"),t,a<n&&xe(e.slice(a,n)),n<r&&xe(e=e.slice(n)),n<r&&he(e))}c.push(t)}return ve(c)}return de.prototype=b.filters=b.pseudos,b.setFilters=new de,g=re.tokenize=function(e,t){var n,r,i,o,s,a,u,l=d[e+" "];if(l)return t?0:l.slice(0);for(s=e,a=[],u=b.preFilter;s;){for(o in n&&!(r=B.exec(s))||(r&&(s=s.slice(r[0].length)||s),a.push(i=[])),n=!1,(r=_.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace($," ")}
vendor: 59,864 bytes, line 9
9),s=s.slice(n.length)),b.filter)!(r=V[o].exec(s))||u[o]&&!(r=u[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?re.error(e):d(e,a).slice(0)},f=re.compile=function(e,t){var n,v,m,y,x,r,i=[],o=[],s=S[e+" "];if(!s){for(t||(t=g(e)),n=t.length;n--;)(s=xe(t[n]))[E]?i.push(s):o.push(s);(s=S(e,(v=o,y=0<(m=i).length,x=0<v.length,r=function(e,t,n,r,i){var o,s,a,u=0,l="0",c=e&&[],f=[],p=w,d=e||x&&b.find.TAG("*",i),h=N+=null==p?1:Math.random()||.1,g=d.length;for(i&&(w=t===C||t||i);l!==g&&null!=(o=d[l]);l++){if(x&&o){for(s=0,t||o.ownerDocument===C||(T(o),n=!k);a=v[s++];)if(a(o,t||C,n)){r.push(o);break}i&&(N=h)}y&&((o=!a&&o)&&u--,e&&c.push(o))}if(u+=l,y&&l!==u){for(s=0;a=m[s++];)a(c,f,t,n);if(e){if(0<u)for(;l--;)c[l]||f[l]||(f[l]=A.call(r));f=me(f)}L.apply(r,f),i&&!e&&0<f.length&&1<u+m.length&&re.uniqueSort(r)}return i&&(N=h,w=p),c},y?oe(r):r))).selector=e}return s},v=re.select=function(e,t,n,r){var i,o,s,a,u,l="function"==typeof e&&e,c=!r&&g(e=l.selector||e);if(n=n||[],1===c.length){if(2<(o=c[0]=c[0].slice(0)).length&&"ID"===(s=o[0]).type&&h.getById&&9===t.nodeType&&k&&b.relative[o[1].type]){if(!(t=(b.find.ID(s.matches[0].replace(ee,te),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=V.needsContext.test(e)?0:o.length;i--&&(s=o[i],!b.relative[a=s.type]);)if((u=b.find[a])&&(r=u(s.matches[0].replace(ee,te),K.test(o[0].type)&&pe(t.parentNode)||t))){if(o.splice(i,1),!(e=r.length&&he(o)))return L.apply(n,r),n;break}}return(l||f(e,c))(r,t,!k,n,!t||K.test(e)&&pe(t.parentNode)||t),n},h.sortStable=E.split("").sort(j).join("")===E,h.detectDuplicates=!!l,T(),h.sortDetached=se(function(e){return 1&e.compareDocumentPosition(C.createElement("div"))}),se(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||ae("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),h.attributes&&se(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ae("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||ae(F,function(e,t,n){var r;return n?void 0:!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),re}(C);E.find=d,E.expr=d.selectors,E.expr[":"]=E.expr.pseudos,E.uniqueSort=E.unique=d.uniqueSort,E.text=d.getText,E.isXMLDoc=d.isXML,E.contains=d.contains;var m=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&E(e).is(n))break;r.push(e)}return r},y=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},x=E.expr.match.needsContext,b=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function T(e,n,r){if(E.isFunction(n))return E.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return E.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(w.test(n))return E.filter(n,e,r);n=E.filter(n,e)}return E.grep(e,function(e){return-1<i.call(n,e)!==r})}E.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?E.find.matchesSelector(r,e)?[r]:[]:E.find.matches(e,E.grep(t,function(e){return 1===e.nodeType}))},E.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(E(e).filter(function(){for(t=0;t<n;t++)if(E.contains(i[t],this))return!0}));for(t=0;t<n;t++)E.find(e,i[t],r);return(r=this.pushStack(1<n?E.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(T(this,e||[],!1))},not:function(e){return this.pushStack(T(this,e||[],!0))},is:function(e){return!!T(this,"string"==typeof e&&x.test(e)?E(e):e||[],!1).length}});var N,S=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||N,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):E.isFunction(e)?void 0!==n.ready?n.ready(e):e(E):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),E.makeArray(e,this));if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:S.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:k,!0)),b.test(r[1])&&E.isPlainObject(t))for(r in t)E.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=k.getElementById(r[2]))&&i.parentNode&&(this.length=1,this[0]=i),this.context=k,this.selector=e,this}).prototype=E.fn,N=E(k);var j=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function A(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(E.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,o=[],s=x.test(e)||"string"!=typeof e?E(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?-1<s.index(n):1===n.nodeType&&E.find.matchesSelector(n,e))){o.push(n);break}return this.pushStack(1<o.length?E.uniqueSort(o):o)},index:function(e){return e?"string"==typeof e?i.call(E(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(E.uniqueSort(E.merge(this.get(),E(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),E.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return m(e,"parentNode")},parentsUntil:function(e,t,n){return m(e,"parentNode",n)},next:function(e){return A(e,"nextSibling")},prev:function(e){return A(e,"previousSibling")},nextAll:function(e){return m(e,"nextSibling")},prevAll:function(e){return m(e,"previousSibling")},nextUntil:function(e,t,n){return m(e,"nextSibling",n)},prevUntil:function(e,t,n){return m(e,"previousSibling",n)},siblings:function(e){return y((e.parentNode||{}).firstChild,e)},children:function(e){return y(e.firstChild)},contents:function(e){return e.contentDocument||E.merge([],e.childNodes)}},function(r,i){E.fn[r]=function(e,t){var n=E.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=E.filter(t,n)),1<this.length&&(D[r]||E.uniqueSort(n),j.test(r)&&n.reverse()),this.pushStack(n)}});var q,L=/\S+/g;function H(){k.removeEventListener("DOMContentLoaded",H),C.removeEventListener("load",H),E.ready()}E.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},E.each(e.match(L)||[],function(e,t){n[t]=!0}),n):E.extend({},r);var i,t,o,s,a=[],u=[],l=-1,c=function(){for(s=r.once,o=i=!0;u.length;l=-1)for(t=u.shift();++l<a.length;)!1===a[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=a.length,t=!1);r.memory||(t=!1),i=!1,s&&(a=t?[]:"")},f={add:function(){return a&&(t&&!i&&(l=a.length-1,u.push(t)),function n(e){E.each(e,function(e,t){E.isFunction(t)?r.unique&&f.has(t)||a.push(t):t&&t.length&&"string"!==E.type(t)&&n(t)})}(arguments),t&&!i&&c()),this},remove:function(){return E.each(arguments,function(e,t){for(var n;-1<(n=E.inArray(t,a,n));)a.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<E.inArray(e,a):0<a.length},empty:function(){return a&&(a=[]),this},disable:function(){return s=u=[],a=t="",this},disabled:function(){return!a},lock:function(){return s=u=[],t||(a=t=""),this},locked:function(){return!!s},fireWith:function(e,t){return s||(t=[e,(t=t||[]).slice?t.slice():t],u.push(t),i||c()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!o}};return f},E.extend({Deferred:function(e){var o=[["resolve","done",E.Callbacks("once memory"),"resolved"],["reject","fail",E.Callbacks("once memory"),"rejected"],["notify","progress",E.Callbacks("memory")]],i="pending",s={state:function(){return i},always:function(){return a.done(arguments).fail(arguments),this},then:function(){var i=arguments;return E.Deferred(function(r){E.each(o,function(e,t){var n=E.isFunction(i[e])&&i[e];a[t[1]](function(){var e=n&&n.apply(this,arguments);e&&E.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this===s?r.promise():this,n?[e]:arguments)})}),i=null}).promise()},promise:function(e){return null!=e?E.extend(e,s):s}},a={};return s.pipe=s.then,E.each(o,function(e,t){var n=t[2],r=t[3];s[t[1]]=n.add,r&&n.add(function(){i=r},o[1^e][2].disable,o[2][2].lock),a[t[0]]=function(){return a[t[0]+"With"](this===a?s:this,arguments),this},a[t[0]+"With"]=n.fireWith}),s.promise(a),e&&e.call(a,a),a},when:function(e){var i,t,n,r=0,o=c.call(arguments),s=o.length,a=1!==s||e&&E.isFunction(e.promise)?s:0,u=1===a?e:E.Deferred(),l=function(t,n,r){return function(e){n[t]=this,r[t]=1<arguments.length?c.call(arguments):e,r===i?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(1<s)for(i=new Array(s),t=new Array(s),n=new Array(s);r<s;r++)o[r]&&E.isFunction(o[r].promise)?o[r].promise().progress(l(r,t,i)).done(l(r,n,o)).fail(u.reject):--a;return a||u.resolveWith(n,o),u.promise()}}),E.fn.ready=function(e){return E.ready.promise().done(e),this},E.extend({isReady:!1,readyWait:1,holdReady:function(e){e?E.readyWait++:E.ready(!0)},ready:function(e){(!0===e?--E.readyWait:E.isReady)||((E.isReady=!0)!==e&&0<--E.readyWait||(q.resolveWith(k,[E]),E.fn.triggerHandler&&(E(k).triggerHandler("ready"),E(k).off("ready"))))}}),E.ready.promise=function(e){return q||(q=E.Deferred(),"complete"===k.readyState||"loading"!==k.readyState&&!k.documentElement.doScroll?C.setTimeout(E.ready):(k.addEventListener("DOMContentLoaded",H),C.addEventListener("load",H))),q.promise(e)},E.ready.promise();var O=function(e,t,n,r,i,o,s){var a=0,u=e.length,l=null==n;if("object"===E.type(n))for(a in i=!0,n)O(e,t,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,E.isFunction(r)||(s=!0),l&&(t=s?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(E(e),n)})),t))for(;a<u;a++)t(e[a],n,s?r:r.call(e[a],a,t(e[a],n)));return i?e:l?t.call(e):u?t(e[0],n):o},F=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function P(){this.expando=E.expando+P.uid++}P.uid=1,P.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!F(e))return{};var t=e[this.expando];return t||(t={},F(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,E.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,o=e[this.expando];if(void 0!==o){if(void 0===t)this.register(e);else{n=(r=E.isArray(t)?t.concat(t.map(E.camelCase)):(i=E.camelCase(t),t in o?[t,i]:(r=i)in o?[r]:r.match(L)||[])).length;for(;n--;)delete o[r[n]]}(void 0===t||E.isEmptyObject(o))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!E.isEmptyObject(t)}};var R=new P,M=new P,I=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,W=/[A-Z]/g;function $(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(W,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:I.test(n)?E.parseJSON(n):n)}catch(e){}M.set(e,t,n)}else n=void 0;return n}E.extend({hasData:function(e){return M.hasData(e)||R.hasData(e)},data:function(e,t,n){return M.access(e,t,n)},removeData:function(e,t){M.remove(e,t)},_data:function(e,t,n){return R.access(e,t,n)},_removeData:function(e,t){R.remove(e,t)}}),E.fn.extend({data:function(r,e){var t,n,i,o=this[0],s=o&&o.attributes;if(void 0!==r)return"object"==typeof r?this.each(function(){M.set(this,r)}):O(this,function(t){var e,n;if(o&&void 0===t){if(void 0!==(e=M.get(o,r)||M.get(o,r.replace(W,"-$&").toLowerCase())))return e;if(n=E.camelCase(r),void 0!==(e=M.get(o,n)))return e;if(void 0!==(e=$(o,n,void 0)))return e}else n=E.camelCase(r),this.each(function(){var e=M.get(this,n);M.set(this,n,t),-1<r.indexOf("-")&&void 0!==e&&M.set(this,r,t)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=M.get(o),1===o.nodeType&&!R.get(o,"hasDataAttrs"))){for(t=s.length;t--;)s[t]&&(0===(n=s[t].name).indexOf("data-")&&(n=E.camelCase(n.slice(5)),$(o,n,i[n])));R.set(o,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){M.remove(this,e)})}}),E.extend({queue:function(e,t,n){var r;return e?(t=(t||"fx")+"queue",r=R.get(e,t),n&&(!r||E.isArray(n)?r=R.access(e,t,E.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=E.queue(e,t),r=n.length,i=n.shift(),o=E._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,function(){E.dequeue(e,t)},o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return R.get(e,n)||R.access(e,n,{empty:E.Callbacks("once memory").add(function(){R.remove(e,[t+"queue",n])})})}}),E.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?E.queue(this[0],t):void 0===n?this:this.each(function(){var e=E.queue(this,t,n);E._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&E.dequeue(this,t)})},dequeue:function(e){return this.each(function(){E.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=E.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)(n=R.get(o[s],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(t)}});var B=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,_=new RegExp("^(?:([+-])=|)("+B+")([a-z%]*)$","i"),X=["Top","Right","Bottom","Left"],z=function(e,t){return e=t||e,"none"===E.css(e,"display")||!E.contains(e.ownerDocument,e)};function U(e,t,n,r){var i,o=1,s=20,a=r?function(){return r.cur()}:function(){return E.css(e,t,"")},u=a(),l=n&&n[3]||(E.cssNumber[t]?"":"px"),c=(E.cssNumber[t]||"px"!==l&&+u)&&_.exec(E.css(e,t));if(c&&c[3]!==l)for(l=l||c[3],n=n||[],c=+u||1;c/=o=o||".5",E.style(e,t,c+l),o!==(o=a()/u)&&1!==o&&--s;);return n&&(c=+c||+u||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=c,r.end=i)),i}var V=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,G=/^$|\/(?:java|ecma)script/i,Q={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function J(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&E.nodeName(e,t)?E.merge([e],n):n}function K(e,t){for(var n=0,r=e.length;n<r;n++)R.set(e[n],"globalEval",!t||R.get(t[n],"globalEval"))}Q.optgroup=Q.option,Q.tbody=Q.tfoot=Q.colgroup=Q.caption=Q.thead,Q.th=Q.td;var Z,ee,te=/<|&#?\w+;/;function ne(e,t,n,r,i){for(var o,s,a,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d<h;d++)if((o=e[d])||0===o)if("object"===E.type(o))E.merge(p,o.nodeType?[o]:o);else if(te.test(o)){for(s=s||f.appendChild(t.createElement("div")),a=(Y.exec(o)||["",""])[1].toLowerCase(),u=Q[a]||Q._default,s.innerHTML=u[1]+E.htmlPrefilter(o)+u[2],c=u[0];c--;)s=s.lastChild;E.merge(p,s.childNodes),(s=f.firstChild).textContent=""}else p.push(t.createTextNode(o));for(f.textContent="",d=0;o=p[d++];)if(r&&-1<E.inArray(o,r))i&&i.push(o);else if(l=E.contains(o.ownerDocument,o),s=J(f.appendChild(o),"script"),l&&K(s),n)for(c=0;o=s[c++];)G.test(o.type||"")&&n.push(o);return f}Z=k.createDocumentFragment().appendChild(k.createElement("div")),(ee=k.createElement("input")).setAttribute("type","radio"),ee.setAttribute("checked","checked"),ee.setAttribute("name","t"),Z.appendChild(ee),v.checkClone=Z.cloneNode(!0).cloneNode(!0).lastChild.checked,Z.innerHTML="<textarea>x</textarea>",v.noCloneChecked=!!Z.cloneNode(!0).lastChild.defaultValue;var re=/^key/,ie=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,oe=/^([^.]*)(?:\.(.+)|)/;function se(){return!0}function ae(){return!1}function ue(){try{return k.activeElement}catch(e){}}function le(e,t,n,r,i,o){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(r=r||n,n=void 0),t)le(e,a,n,r,t[a],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=ae;else if(!i)return e;return 1===o&&(s=i,(i=function(e){return E().off(e),s.apply(this,arguments)}).guid=s.guid||(s.guid=E.guid++)),e.each(function(){E.event.add(this,t,i,r,n)})}E.event={global:{},add:function(t,e,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=R.get(t);if(v)for(n.handler&&(n=(o=n).handler,i=o.selector),n.guid||(n.guid=E.guid++),(u=v.events)||(u=v.events={}),(s=v.handle)||(s=v.handle=function(e){return void 0!==E&&E.event.triggered!==e.type?E.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(L)||[""]).length;l--;)d=g=(a=oe.exec(e[l])||[])[1],h=(a[2]||"").split(".").sort(),d&&(f=E.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=E.event.special[d]||{},c=E.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&E.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,s)||t.addEventListener&&t.addEventListener(d,s)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),E.event.global[d]=!0)},remove:function(e,t,n,r,i){var o,s,a,u,l,c,f,p,d,h,g,v=R.hasData(e)&&R.get(e);if(v&&(u=v.events)){for(l=(t=(t||"").match(L)||[""]).length;l--;)if(d=g=(a=oe.exec(t[l])||[])[1],h=(a[2]||"").split(".").sort(),d){for(f=E.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],a=a[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=p.length;o--;)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));s&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||E.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)E.event.remove(e,d+t[l],n,r,!0);E.isEmptyObject(u)&&R.remove(e,"handle events")}},dispatch:function(e){e=E.event.fix(e);var t,n,r,i,o,s=[],a=c.call(arguments),u=(R.get(this,"events")||{})[e.type]||[],l=E.event.special[e.type]||{};if((a[0]=e).delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(s=E.event.handlers.call(this,e,u),t=0;(i=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(o.namespace)||(e.handleObj=o,e.data=o.data,void 0!==(r=((E.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,o,s=[],a=t.delegateCount,u=e.target;if(a&&u.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&(!0!==u.disabled||"click"!==e.type)){for(r=[],n=0;n<a;n++)void 0===r[i=(o=t[n]).selector+" "]&&(r[i]=o.needsContext?-1<E(i,this).index(u):E.find(i,this,null,[u]).length),r[i]&&r.push(o);r.length&&s.push({elem:u,handlers:r})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,o=t.button;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||k).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===o||(e.which=1&o?1:2&o?3:4&o?2:0),e}},fix:function(e){if(e[E.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=ie.test(i)?this.mouseHooks:re.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new E.Event(o),t=r.length;t--;)e[n=r[t]]=o[n];return e.target||(e.target=k),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,o):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==ue()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===ue()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&E.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return E.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},E.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},E.Event=function(e,t){return this instanceof E.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?se:ae):this.type=e,t&&E.extend(this,t),this.timeStamp=e&&e.timeStamp||E.now(),void(this[E.expando]=!0)):new E.Event(e,t)},E.Event.prototype={constructor:E.Event,isDefaultPrevented:ae,isPropagationStopped:ae,isImmediatePropagationStopped:ae,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=se,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=se,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=se,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},E.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){E.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||E.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),E.fn.extend({on:function(e,t,n,r){return le(this,e,t,n,r)},one:function(e,t,n,r){return le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,E(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=ae),this.each(function(){E.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var ce=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,fe=/<script|<style|<link/i,pe=/checked\s*(?:[^=]|=\s*.checked.)/i,de=/^true\/(.*)/,he=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function ge(e,t){return E.nodeName(e,"table")&&E.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ve(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function me(e){var t=de.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function ye(e,t){var n,r,i,o,s,a,u,l;if(1===t.nodeType){if(R.hasData(e)&&(o=R.access(e),s=R.set(t,o),l=o.events))for(i in delete s.handle,s.events={},l)for(n=0,r=l[i].length;n<r;n++)E.event.add(t,i,l[i][n]);M.hasData(e)&&(a=M.access(e),u=E.extend({},a),M.set(t,u))}}function xe(n,r,i,o){r=g.apply([],r);var e,t,s,a,u,l,c=0,f=n.length,p=f-1,d=r[0],h=E.isFunction(d);if(h||1<f&&"string"==typeof d&&!v.checkClone&&pe.test(d))return n.each(function(e){var t=n.eq(e);h&&(r[0]=d.call(this,e,t.html())),xe(t,r,i,o)});if(f&&(t=(e=ne(r,n[0].ownerDocument,!1,n,o)).firstChild,1===e.childNodes.length&&(e=t),t||o)){for(a=(s=E.map(J(e,"script"),ve)).length;c<f;c++)u=e,c!==p&&(u=E.clone(u,!0,!0),a&&E.merge(s,J(u,"script"))),i.call(n[c],u,c);if(a)for(l=s[s.length-1].ownerDocument,E.map(s,me),c=0;c<a;c++)u=s[c],G.test(u.type||"")&&!R.access(u,"globalEval")&&E.contains(l,u)&&(u.src?E._evalUrl&&E._evalUrl(u.src):E.globalEval(u.textContent.replace(he,"")))}return n}function be(e,t,n){for(var r,i=t?E.filter(t,e):e,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||E.cleanData(J(r)),r.parentNode&&(n&&E.contains(r.ownerDocument,r)&&K(J(r,"script")),r.parentNode.removeChild(r));return e}E.extend({htmlPrefilter:function(e){return e.replace(ce,"<$1></$2>")},clone:function(e,t,n){var r,i,o,s,a,u,l,c=e.cloneNode(!0),f=E.contains(e.ownerDocument,e);if(!(v.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||E.isXMLDoc(e)))for(s=J(c),r=0,i=(o=J(e)).length;r<i;r++)a=o[r],u=s[r],void 0,"input"===(l=u.nodeName.toLowerCase())&&V.test(a.type)?u.checked=a.checked:"input"!==l&&"textarea"!==l||(u.defaultValue=a.defaultValue);if(t)if(n)for(o=o||J(e),s=s||J(c),r=0,i=o.length;r<i;r++)ye(o[r],s[r]);else ye(e,c);return 0<(s=J(c,"script")).length&&K(s,!f&&J(e,"script")),c},cleanData:function(e){for(var t,n,r,i=E.event.special,o=0;void 0!==(n=e[o]);o++)if(F(n)){if(t=n[R.expando]){if(t.events)for(r in t.events)i[r]?E.event.remove(n,r):E.removeEvent(n,r,t.handle);n[R.expando]=void 0}n[M.expando]&&(n[M.expando]=void 0)}}}),E.fn.extend({domManip:xe,detach:function(e){return be(this,e,!0)},remove:function(e){return be(this,e)},text:function(e){return O(this,function(e){return void 0===e?E.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return xe(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||ge(this,e).appendChild(e)})},prepend:function(){return xe(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=ge(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return xe(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(E.cleanData(J(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return E.clone(this,e,t)})},html:function(e){return O(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!fe.test(e)&&!Q[(Y.exec(e)||["",""])[1].toLowerCase()]){e=E.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(E.cleanData(J(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return xe(this,arguments,function(e){var t=this.parentNode;E.inArray(this,n)<0&&(E.cleanData(J(this)),t&&t.replaceChild(e,this))},n)}}),E.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,s){E.fn[e]=function(e){for(var t,n=[],r=E(e),i=r.length-1,o=0;o<=i;o++)t=o===i?this:this.clone(!0),E(r[o])[s](t),a.apply(n,t.get());return this.pushStack(n)}});var we,Te={HTML:"block",BODY:"block"};function Ce(e,t){var n=E(t.createElement(e)).appendTo(t.body),r=E.css(n[0],"display");return n.detach(),r}function ke(e){var t=k,n=Te[e];return n||("none"!==(n=Ce(e,t))&&n||((t=(we=(we||E("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=Ce(e,t),we.detach()),Te[e]=n),n}var Ee=/^margin/,Ne=new RegExp("^("+B+")(?!px)[a-z%]+$","i"),Se=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=C),t.getComputedStyle(e)},je=function(e,t,n,r){var i,o,s={};for(o in t)s[o]=e.style[o],e.style[o]=t[o];for(o in i=n.apply(e,r||[]),t)e.style[o]=s[o];return i},De=k.documentElement;function Ae(e,t,n){var r,i,o,s,a=e.style;return""!==(s=(n=n||Se(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==s||E.contains(e.ownerDocument,e)||(s=E.style(e,t)),n&&!v.pixelMarginRight()&&Ne.test(s)&&Ee.test(t)&&(r=a.width,i=a.minWidth,o=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=r,a.minWidth=i,a.maxWidth=o),void 0!==s?s+"":s}function qe(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}!function(){var t,n,r,i,o=k.createElement("div"),s=k.createElement("div");if(s.style){function e(){s.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",s.innerHTML="",De.appendChild(o);var e=C.getComputedStyle(s);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,s.style.marginRight="50%",r="4px"===e.marginRight,De.removeChild(o)}s.style.backgroundClip="content-box",s.cloneNode(!0).style.backgroundClip="",v.clearCloneStyle="content-box"===s.style.backgroundClip,o.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",o.appendChild(s),E.extend(v,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==n&&e(),n},pixelMarginRight:function(){return null==n&&e(),r},reliableMarginLeft:function(){return null==n&&e(),i},reliableMarginRight:function(){var e,t=s.appendChild(k.createElement("div"));return t.style.cssText=s.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",s.style.width="1px",De.appendChild(o),e=!parseFloat(C.getComputedStyle(t).marginRight),De.removeChild(o),s.removeChild(t),e}})}}();var Le=/^(none|table(?!-c[ea]).+)/,He={position:"absolute",visibility:"hidden",display:"block"},Oe={letterSpacing:"0",fontWeight:"400"},Fe=["Webkit","O","Moz","ms"],Pe=k.createElement("div").style;function Re(e){if(e in Pe)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Fe.length;n--;)if((e=Fe[n]+t)in Pe)return e}function Me(e,t,n){var r=_.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ie(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,s=0;o<4;o+=2)"margin"===n&&(s+=E.css(e,n+X[o],!0,i)),r?("content"===n&&(s-=E.css(e,"padding"+X[o],!0,i)),"margin"!==n&&(s-=E.css(e,"border"+X[o]+"Width",!0,i))):(s+=E.css(e,"padding"+X[o],!0,i),"padding"!==n&&(s+=E.css(e,"border"+X[o]+"Width",!0,i)));return s}function We(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Se(e),s="border-box"===E.css(e,"boxSizing",!1,o);if(i<=0||null==i){if(((i=Ae(e,t,o))<0||null==i)&&(i=e.style[t]),Ne.test(i))return i;r=s&&(v.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ie(e,t,n||(s?"border":"content"),r,o)+"px"}function $e(e,t){for(var n,r,i,o=[],s=0,a=e.length;s<a;s++)(r=e[s]).style&&(o[s]=R.get(r,"olddisplay"),n=r.style.display,t?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&z(r)&&(o[s]=R.access(r,"olddisplay",ke(r.nodeName)))):(i=z(r),"none"===n&&i||R.set(r,"olddisplay",i?n:E.css(r,"display"))));for(s=0;s<a;s++)(r=e[s]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[s]||"":"none"));return e}function Be(e,t,n,r,i){return new Be.prototype.init(e,t,n,r,i)}E.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ae(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,o,s,a=E.camelCase(t),u=e.style;return t=E.cssProps[a]||(E.cssProps[a]=Re(a)||a),s=E.cssHooks[t]||E.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(i=s.get(e,!1,r))?i:u[t]:("string"===(o=typeof n)&&(i=_.exec(n))&&i[1]&&(n=U(e,t,i),o="number"),void(null!=n&&n==n&&("number"===o&&(n+=i&&i[3]||(E.cssNumber[a]?"":"px")),v.clearCloneStyle||""!==n||0!==t.indexOf("background")||(u[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,r))||(u[t]=n))))}},css:function(e,t,n,r){var i,o,s,a=E.camelCase(t);return t=E.cssProps[a]||(E.cssProps[a]=Re(a)||a),(s=E.cssHooks[t]||E.cssHooks[a])&&"get"in s&&(i=s.get(e,!0,n)),void 0===i&&(i=Ae(e,t,r)),"normal"===i&&t in Oe&&(i=Oe[t]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),E.each(["height","width"],function(e,s){E.cssHooks[s]={get:function(e,t,n){return t?Le.test(E.css(e,"display"))&&0===e.offsetWidth?je(e,He,function(){return We(e,s,n)}):We(e,s,n):void 0},set:function(e,t,n){var r,i=n&&Se(e),o=n&&Ie(e,s,n,"border-box"===E.css(e,"boxSizing",!1,i),i);return o&&(r=_.exec(t))&&"px"!==(r[3]||"px")&&(e.style[s]=t,t=E.css(e,s)),Me(0,t,o)}}}),E.cssHooks.marginLeft=qe(v.reliableMarginLeft,function(e,t){return t?(parseFloat(Ae(e,"marginLeft"))||e.getBoundingClientRect().left-je(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),E.cssHooks.marginRight=qe(v.reliableMarginRight,function(e,t){return t?je(e,{display:"inline-block"},Ae,[e,"marginRight"]):void 0}),E.each({margin:"",padding:"",border:"Width"},function(i,o){E.cssHooks[i+o]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+X[t]+o]=r[t]||r[t-2]||r[0];return n}},Ee.test(i)||(E.cssHooks[i+o].set=Me)}),E.fn.extend({css:function(e,t){return O(this,function(e,t,n){var r,i,o={},s=0;if(E.isArray(t)){for(r=Se(e),i=t.length;s<i;s++)o[t[s]]=E.css(e,t[s],!1,r);return o}return void 0!==n?E.style(e,t,n):E.css(e,t)},e,t,1<arguments.length)},show:function(){return $e(this,!0)},hide:function(){return $e(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){z(this)?E(this).show():E(this).hide()})}}),((E.Tween=Be).prototype={constructor:Be,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||E.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(E.cssNumber[n]?"":"px")},cur:function(){var e=Be.propHooks[this.prop];return e&&e.get?e.get(this):Be.propHooks._default.get(this)},run:function(e){var t,n=Be.propHooks[this.prop];return this.options.duration?this.pos=t=E.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Be.propHooks._default.set(this),this}}).init.prototype=Be.prototype,(Be.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=E.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){E.fx.step[e.prop]?E.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[E.cssProps[e.prop]]&&!E.cssHooks[e.prop]?e.elem[e.prop]=e.now:E.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Be.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},E.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},E.fx=Be.prototype.init,E.fx.step={};var _e,Xe,ze,Ue,Ve,Ye=/^(?:toggle|show|hide)$/,Ge=/queueHooks$/;function Qe(){return C.setTimeout(function(){_e=void 0}),_e=E.now()}function Je(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=X[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ke(e,t,n){for(var r,i=(Ze.tweeners[t]||[]).concat(Ze.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,t,e))return r}function Ze(o,e,t){var n,s,r=0,i=Ze.prefilters.length,a=E.Deferred().always(function(){delete u.elem}),u=function(){if(s)return!1;for(var e=_e||Qe(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return a.notifyWith(o,[l,n,t]),n<1&&i?t:(a.resolveWith(o,[l]),!1)},l=a.promise({elem:o,props:E.extend({},e),opts:E.extend(!0,{specialEasing:{},easing:E.easing._default},t),originalProperties:e,originalOptions:t,startTime:_e||Qe(),duration:t.duration,tweens:[],createTween:function(e,t){var n=E.Tween(o,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(s)return this;for(s=!0;t<n;t++)l.tweens[t].run(1);return e?(a.notifyWith(o,[l,1,0]),a.resolveWith(o,[l,e])):a.rejectWith(o,[l,e]),this}}),c=l.props;for(function(e,t){var n,r,i,o,s;for(n in e)if(i=t[r=E.camelCase(n)],o=e[n],E.isArray(o)&&(i=o[1],o=e[n]=o[0]),n!==r&&(e[r]=o,delete e[n]),(s=E.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete e[r],o)n in e||(e[n]=o[n],t[n]=i);else t[r]=i}(c,l.opts.specialEasing);r<i;r++)if(n=Ze.prefilters[r].call(l,o,c,l.opts))return E.isFunction(n.stop)&&(E._queueHooks(l.elem,l.opts.queue).stop=E.proxy(n.stop,n)),n;return E.map(c,Ke,l),E.isFunction(l.opts.start)&&l.opts.start.call(o,l),E.fx.timer(E.extend(u,{elem:o,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}E.Animation=E.extend(Ze,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return U(n.elem,e,_.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=E.isFunction(e)?(t=e,["*"]):e.match(L)).length;r<i;r++)n=e[r],Ze.tweeners[n]=Ze.tweeners[n]||[],Ze.tweeners[n].unshift(t)},prefilters:[function(t,e,n){var r,i,o,s,a,u,l,c=this,f={},p=t.style,d=t.nodeType&&z(t),h=R.get(t,"fxshow");for(r in n.queue||(null==(a=E._queueHooks(t,"fx")).unqueued&&(a.unqueued=0,u=a.empty.fire,a.empty.fire=function(){a.unqueued||u()}),a.unqueued++,c.always(function(){c.always(function(){a.unqueued--,E.queue(t,"fx").length||a.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],"inline"===("none"===(l=E.css(t,"display"))?R.get(t,"olddisplay")||ke(t.nodeName):l)&&"none"===E.css(t,"float")&&(p.display="inline-block")),n.overflow&&(p.overflow="hidden",c.always(function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]})),e)if(i=e[r],Ye.exec(i)){if(delete e[r],o=o||"toggle"===i,i===(d?"hide":"show")){if("show"!==i||!h||void 0===h[r])continue;d=!0}f[r]=h&&h[r]||E.style(t,r)}else l=void 0;if(E.isEmptyObject(f))"inline"===("none"===l?ke(t.nodeName):l)&&(p.display=l);else for(r in h?"hidden"in h&&(d=h.hidden):h=R.access(t,"fxshow",{}),o&&(h.hidden=!d),d?E(t).show():c.done(function(){E(t).hide()}),c.done(function(){var e;for(e in R.remove(t,"fxshow"),f)E.style(t,e,f[e])}),f)s=Ke(d?h[r]:0,r,c),r in h||(h[r]=s.start,d&&(s.end=s.start,s.start="width"===r||"height"===r?1:0))}],prefilter:function(e,t){t?Ze.prefilters.unshift(e):Ze.prefilters.push(e)}}),E.speed=function(e,t,n){var r=e&&"object"==typeof e?E.extend({},e):{complete:n||!n&&t||E.isFunction(e)&&e,duration:e,easing:n&&t||t&&!E.isFunction(t)&&t};return r.duration=E.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in E.fx.speeds?E.fx.speeds[r.duration]:E.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){E.isFunction(r.old)&&r.old.call(this),r.queue&&E.dequeue(this,r.queue)},r},E.fn.extend({fadeTo:function(e,t,n,r){return this.filter(z).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=E.isEmptyObject(t),o=E.speed(e,n,r),s=function(){var e=Ze(this,E.extend({},t),o);(i||R.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(i,e,o){var s=function(e){var t=e.stop;delete e.stop,t(o)};return"string"!=typeof i&&(o=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=E.timers,r=R.get(this);if(t)r[t]&&r[t].stop&&s(r[t]);else for(t in r)r[t]&&r[t].stop&&Ge.test(t)&&s(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(o),e=!1,n.splice(t,1));!e&&o||E.dequeue(this,i)})},finish:function(s){return!1!==s&&(s=s||"fx"),this.each(function(){var e,t=R.get(this),n=t[s+"queue"],r=t[s+"queueHooks"],i=E.timers,o=n?n.length:0;for(t.finish=!0,E.queue(this,s,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===s&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<o;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),E.each(["toggle","show","hide"],function(e,r){var i=E.fn[r];E.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Je(r,!0),e,t,n)}}),E.each({slideDown:Je("show"),slideUp:Je("hide"),slideToggle:Je("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){E.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),E.timers=[],E.fx.tick=function(){var e,t=0,n=E.timers;for(_e=E.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||E.fx.stop(),_e=void 0},E.fx.timer=function(e){E.timers.push(e),e()?E.fx.start():E.timers.pop()},E.fx.interval=13,E.fx.start=function(){Xe||(Xe=C.setInterval(E.fx.tick,E.fx.interval))},E.fx.stop=function(){C.clearInterval(Xe),Xe=null},E.fx.speeds={slow:600,fast:200,_default:400},E.fn.delay=function(r,e){return r=E.fx&&E.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=C.setTimeout(e,r);t.stop=function(){C.clearTimeout(n)}})},ze=k.createElement("input"),Ue=k.createElement("select"),Ve=Ue.appendChild(k.createElement("option")),ze.type="checkbox",v.checkOn=""!==ze.value,v.optSelected=Ve.selected,Ue.disabled=!0,v.optDisabled=!Ve.disabled,(ze=k.createElement("input")).value="t",ze.type="radio",v.radioValue="t"===ze.value;var et,tt=E.expr.attrHandle;E.fn.extend({attr:function(e,t){return O(this,E.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){E.removeAttr(this,e)})}}),E.extend({attr:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===e.getAttribute?E.prop(e,t,n):(1===o&&E.isXMLDoc(e)||(t=t.toLowerCase(),i=E.attrHooks[t]||(E.expr.match.bool.test(t)?et:void 0)),void 0!==n?null===n?void E.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=E.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!v.radioValue&&"radio"===t&&E.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(L);if(o&&1===e.nodeType)for(;n=o[i++];)r=E.propFix[n]||n,E.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),et={set:function(e,t,n){return!1===t?E.removeAttr(e,n):e.setAttribute(n,n),n}},E.each(E.expr.match.bool.source.match(/\w+/g),function(e,t){var o=tt[t]||E.find.attr;tt[t]=function(e,t,n){var r,i;return n||(i=tt[t],tt[t]=r,r=null!=o(e,t,n)?t.toLowerCase():null,tt[t]=i),r}});var nt=/^(?:input|select|textarea|button)$/i,rt=/^(?:a|area)$/i;E.fn.extend({prop:function(e,t){return O(this,E.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[E.propFix[e]||e]})}}),E.extend({prop:function(e,t,n){var r,i,o=e.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&E.isXMLDoc(e)||(t=E.propFix[t]||t,i=E.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=E.find.attr(e,"tabindex");return t?parseInt(t,10):nt.test(e.nodeName)||rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),v.optSelected||(E.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),E.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){E.propFix[this.toLowerCase()]=this});var it=/[\t\r\n\f]/g;function ot(e){return e.getAttribute&&e.getAttribute("class")||""}E.fn.extend({addClass:function(t){var e,n,r,i,o,s,a,u=0;if(E.isFunction(t))return this.each(function(e){E(this).addClass(t.call(this,e,ot(this)))});if("string"==typeof t&&t)for(e=t.match(L)||[];n=this[u++];)if(i=ot(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(s=0;o=e[s++];)r.indexOf(" "+o+" ")<0&&(r+=o+" ");i!==(a=E.trim(r))&&n.setAttribute("class",a)}return this},removeClass:function(t){var e,n,r,i,o,s,a,u=0;if(E.isFunction(t))return this.each(function(e){E(this).removeClass(t.call(this,e,ot(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(L)||[];n=this[u++];)if(i=ot(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(s=0;o=e[s++];)for(;-1<r.indexOf(" "+o+" ");)r=r.replace(" "+o+" "," ");i!==(a=E.trim(r))&&n.setAttribute("class",a)}return this},toggleClass:function(i,t){var o=typeof i;return"boolean"==typeof t&&"string"===o?t?this.addClass(i):this.removeClass(i):E.isFunction(i)?this.each(function(e){E(this).toggleClass(i.call(this,e,ot(this),t),t)}):this.each(function(){var e,t,n,r;if("string"===o)for(t=0,n=E(this),r=i.match(L)||[];e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!==o||((e=ot(this))&&R.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":R.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+ot(n)+" ").replace(it," ").indexOf(t))return!0;return!1}});var st=/\r/g,at=/[\x20\t\r\n\f]+/g;E.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=E.isFunction(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,E(this).val()):n)?t="":"number"==typeof t?t+="":E.isArray(t)&&(t=E.map(t,function(e){return null==e?"":e+""})),(r=E.valHooks[this.type]||E.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=E.valHooks[t.type]||E.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(st,""):null==e?"":e:void 0}}),E.extend({valHooks:{option:{get:function(e){var t=E.find.attr(e,"value");return null!=t?t:E.trim(E.text(e)).replace(at," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||i<0,s=o?null:[],a=o?i+1:r.length,u=i<0?a:o?i:0;u<a;u++)if(((n=r[u]).selected||u===i)&&(v.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!E.nodeName(n.parentNode,"optgroup"))){if(t=E(n).val(),o)return t;s.push(t)}return s},set:function(e,t){for(var n,r,i=e.options,o=E.makeArray(t),s=i.length;s--;)((r=i[s]).selected=-1<E.inArray(E.valHooks.option.get(r),o))&&(n=!0);return n||(e.selectedIndex=-1),o}}}}),E.each(["radio","checkbox"],function(){E.valHooks[this]={set:function(e,t){return E.isArray(t)?e.checked=-1<E.inArray(E(e).val(),t):void 0}},v.checkOn||(E.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ut=/^(?:focusinfocus|focusoutblur)$/;E.extend(E.event,{trigger:function(e,t,n,r){var i,o,s,a,u,l,c,f=[n||k],p=h.call(e,"type")?e.type:e,d=h.call(e,"namespace")?e.namespace.split("."):[];if(o=s=n=n||k,3!==n.nodeType&&8!==n.nodeType&&!ut.test(p+E.event.triggered)&&(-1<p.indexOf(".")&&(p=(d=p.split(".")).shift(),d.sort()),u=p.indexOf(":")<0&&"on"+p,(e=e[E.expando]?e:new E.Event(p,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=d.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:E.makeArray(t,[e]),c=E.event.special[p]||{},r||!c.trigger||!1!==c.trigger.apply(n,t))){if(!r&&!c.noBubble&&!E.isWindow(n)){for(a=c.delegateType||p,ut.test(a+p)||(o=o.parentNode);o;o=o.parentNode)f.push(o),s=o;s===(n.ownerDocument||k)&&f.push(s.defaultView||s.parentWindow||C)}for(i=0;(o=f[i++])&&!e.isPropagationStopped();)e.type=1<i?a:c.bindType||p,(l=(R.get(o,"events")||{})[e.type]&&R.get(o,"handle"))&&l.apply(o,t),(l=u&&o[u])&&l.apply&&F(o)&&(e.result=l.apply(o,t),!1===e.result&&e.preventDefault());return e.type=p,r||e.isDefaultPrevented()||c._default&&!1!==c._default.apply(f.pop(),t)||!F(n)||u&&E.isFunction(n[p])&&!E.isWindow(n)&&((s=n[u])&&(n[u]=null),n[E.event.triggered=p](),E.event.triggered=void 0,s&&(n[u]=s)),e.result}},simulate:function(e,t,n){var r=E.extend(new E.Event,n,{type:e,isSimulated:!0});E.event.trigger(r,null,t)}}),E.fn.extend({trigger:function(e,t){return this.each(function(){E.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?E.event.trigger(e,t,n,!0):void 0}}),E.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),E.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),v.focusin="onfocusin"in C,v.focusin||E.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){E.event.simulate(r,e.target,E.event.fix(e))};E.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=R.access(e,r);t||e.addEventListener(n,i,!0),R.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=R.access(e,r)-1;t?R.access(e,r,t):(e.removeEventListener(n,i,!0),R.remove(e,r))}}});var lt=C.location,ct=E.now(),ft=/\?/;E.parseJSON=function(e){return JSON.parse(e+"")},E.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new C.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||E.error("Invalid XML: "+e),t};var pt=/#.*$/,dt=/([?&])_=[^&]*/,ht=/^(.*?):[ \t]*([^\r\n]*)$/gm,gt=/^(?:GET|HEAD)$/,vt=/^\/\//,mt={},yt={},xt="*/".concat("*"),bt=k.createElement("a");function wt(o){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(L)||[];if(E.isFunction(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(o[n]=o[n]||[]).unshift(t)):(o[n]=o[n]||[]).push(t)}}function Tt(t,i,o,s){var a={},u=t===yt;function l(e){var r;return a[e]=!0,E.each(t[e]||[],function(e,t){var n=t(i,o,s);return"string"!=typeof n||u||a[n]?u?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!a["*"]&&l("*")}function Ct(e,t){var n,r,i=E.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&E.extend(!0,e,r),e}bt.href=lt.href,E.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":xt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":E.parseJSON,"text xml":E.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?Ct(Ct(e,E.ajaxSettings),t):Ct(E.ajaxSettings,e)},ajaxPrefilter:wt(mt),ajaxTransport:wt(yt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var c,f,p,n,d,r,h,i,g=E.ajaxSetup({},t),v=g.context||g,m=g.context&&(v.nodeType||v.jquery)?E(v):E.event,y=E.Deferred(),x=E.Callbacks("once memory"),b=g.statusCode||{},o={},s={},w=0,a="canceled",T={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!n)for(n={};t=ht.exec(p);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?p:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=s[n]=s[n]||e,o[e]=t),this},overrideMimeType:function(e){return w||(g.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)b[t]=[b[t],e[t]];else T.always(e[T.status]);return this},abort:function(e){var t=e||a;return c&&c.abort(t),u(0,t),this}};if(y.promise(T).complete=x.add,T.success=T.done,T.error=T.fail,g.url=((e||g.url||lt.href)+"").replace(pt,"").replace(vt,lt.protocol+"//"),g.type=t.method||t.type||g.method||g.type,g.dataTypes=E.trim(g.dataType||"*").toLowerCase().match(L)||[""],null==g.crossDomain){r=k.createElement("a");try{r.href=g.url,r.href=r.href,g.crossDomain=bt.protocol+"//"+bt.host!=r.protocol+"//"+r.host}catch(e){g.crossDomain=!0}}if(g.data&&g.processData&&"string"!=typeof g.data&&(g.data=E.param(g.data,g.traditional)),Tt(mt,g,t,T),2===w)return T;for(i in(h=E.event&&g.global)&&0==E.active++&&E.event.trigger("ajaxStart"),g.type=g.type.toUpperCase(),g.hasContent=!gt.test(g.type),f=g.url,g.hasContent||(g.data&&(f=g.url+=(ft.test(f)?"&":"?")+g.data,delete g.data),!1===g.cache&&(g.url=dt.test(f)?f.replace(dt,"$1_="+ct++):f+(ft.test(f)?"&":"?")+"_="+ct++)),g.ifModified&&(E.lastModified[f]&&T.setRequestHeader("If-Modified-Since",E.lastModified[f]),E.etag[f]&&T.setRequestHeader("If-None-Match",E.etag[f])),(g.data&&g.hasContent&&!1!==g.contentType||t.contentType)&&T.setRequestHeader("Content-Type",g.contentType),T.setRequestHeader("Accept",g.dataTypes[0]&&g.accepts[g.dataTypes[0]]?g.accepts[g.dataTypes[0]]+("*"!==g.dataTypes[0]?", "+xt+"; q=0.01":""):g.accepts["*"]),g.headers)T.setRequestHeader(i,g.headers[i]);if(g.beforeSend&&(!1===g.beforeSend.call(v,T,g)||2===w))return T.abort();for(i in a="abort",{success:1,error:1,complete:1})T[i](g[i]);if(c=Tt(yt,g,t,T)){if(T.readyState=1,h&&m.trigger("ajaxSend",[T,g]),2===w)return T;g.async&&0<g.timeout&&(d=C.setTimeout(function(){T.abort("timeout")},g.timeout));try{w=1,c.send(o,u)}catch(e){if(!(w<2))throw e;u(-1,e)}}else u(-1,"No Transport");function u(e,t,n,r){var i,o,s,a,u,l=t;2!==w&&(w=2,d&&C.clearTimeout(d),c=void 0,p=r||"",T.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(a=function(e,t,n){for(var r,i,o,s,a=e.contents,u=e.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)o=u[0];else{for(i in n){if(!u[0]||e.converters[i+" "+u[0]]){o=i;break}s||(s=i)}o=o||s}return o?(o!==u[0]&&u.unshift(o),n[o]):void 0}(g,T,n)),a=function(e,t,n,r){var i,o,s,a,u,l={},c=e.dataTypes.slice();if(c[1])for(s in e.converters)l[s.toLowerCase()]=e.converters[s];for(o=c.shift();o;)if(e.responseFields[o]&&(n[e.responseFields[o]]=t),!u&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(!(s=l[u+" "+o]||l["* "+o]))for(i in l)if((a=i.split(" "))[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){!0===s?s=l[i]:!0!==l[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&e.throws)t=s(t);else try{t=s(t)}catch(e){return{state:"parsererror",error:s?e:"No conversion from "+u+" to "+o}}}return{state:"success",data:t}}(g,a,T,i),i?(g.ifModified&&((u=T.getResponseHeader("Last-Modified"))&&(E.lastModified[f]=u),(u=T.getResponseHeader("etag"))&&(E.etag[f]=u)),204===e||"HEAD"===g.type?l="nocontent":304===e?l="notmodified":(l=a.state,o=a.data,i=!(s=a.error))):(s=l,!e&&l||(l="error",e<0&&(e=0))),T.status=e,T.statusText=(t||l)+"",i?y.resolveWith(v,[o,l,T]):y.rejectWith(v,[T,l,s]),T.statusCode(b),b=void 0,h&&m.trigger(i?"ajaxSuccess":"ajaxError",[T,g,i?o:s]),x.fireWith(v,[T,l]),h&&(m.trigger("ajaxComplete",[T,g]),--E.active||E.event.trigger("ajaxStop")))}return T},getJSON:function(e,t,n){return E.get(e,t,n,"json")},getScript:function(e,t){return E.get(e,void 0,t,"script")}}),E.each(["get","post"],function(e,i){E[i]=function(e,t,n,r){return E.isFunction(t)&&(r=r||n,n=t,t=void 0),E.ajax(E.extend({url:e,type:i,dataType:r,data:t,success:n},E.isPlainObject(e)&&e))}}),E._evalUrl=function(e){return E.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},E.fn.extend({wrapAll:function(t){var e;return E.isFunction(t)?this.each(function(e){E(this).wrapAll(t.call(this,e))}):(this[0]&&(e=E(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(n){return E.isFunction(n)?this.each(function(e){E(this).wrapInner(n.call(this,e))}):this.each(function(){var e=E(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=E.isFunction(t);return this.each(function(e){E(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){E.nodeName(this,"body")||E(this).replaceWith(this.childNodes)}).end()}}),E.expr.filters.hidden=function(e){return!E.expr.filters.visible(e)},E.expr.filters.visible=function(e){return 0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length};var kt=/%20/g,Et=/\[\]$/,Nt=/\r?\n/g,St=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(E.isArray(e))E.each(e,function(e,t){r||Et.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==E.type(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}E.param=function(e,t){var n,r=[],i=function(e,t){t=E.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=E.ajaxSettings&&E.ajaxSettings.traditional),E.isArray(e)||e.jquery&&!E.isPlainObject(e))E.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&").replace(kt,"+")},E.fn.extend({serialize:function(){return E.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=E.prop(this,"elements");return e?E.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!E(this).is(":disabled")&&jt.test(this.nodeName)&&!St.test(e)&&(this.checked||!V.test(e))}).map(function(e,t){var n=E(this).val();return null==n?null:E.isArray(n)?E.map(n,function(e){return{name:t.name,value:e.replace(Nt,"\r\n")}}):{name:t.name,value:n.replace(Nt,"\r\n")}}).get()}}),E.ajaxSettings.xhr=function(){try{return new C.XMLHttpRequest}catch(e){}};var At={0:200,1223:204},qt=E.ajaxSettings.xhr();v.cors=!!qt&&"withCredentials"in qt,v.ajax=qt=!!qt,E.ajaxTransport(function(i){var o,s;return v.cors||qt&&!i.crossDomain?{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);o=function(e){return function(){o&&(o=s=r.onload=r.onerror=r.onabort=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(At[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=o(),s=r.onerror=o("error"),void 0!==r.onabort?r.onabort=s:r.onreadystatechange=function(){4===r.readyState&&C.setTimeout(function(){o&&s()})},o=o("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(o)throw e}},abort:function(){o&&o()}}:void 0}),E.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return E.globalEval(e),e}}}),E.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),E.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=E("<script>
9").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),k.head.appendChild(r[0])},abort:function(){i&&i()}}});var Lt=[],Ht=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Lt.pop()||E.expando+"_"+ct++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,s=!1!==e.jsonp&&(Ht.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Ht.test(e.data)&&"data");return s||"jsonp"===e.dataTypes[0]?(r=e.jsonpCallback=E.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,s?e[s]=e[s].replace(Ht,"$1"+r):!1!==e.jsonp&&(e.url+=(ft.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Lt.push(r)),o&&E.isFunction(i)&&i(o[0]),o=i=void 0}),"script"):void 0}),E.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||k;var r=b.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ne([e],t,i),i&&i.length&&E(i).remove(),E.merge([],r.childNodes))};var Ot=E.fn.load;function Ft(e){return E.isWindow(e)?e:9===e.nodeType&&e.defaultView}E.fn.load=function(e,t,n){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var r,i,o,s=this,a=e.indexOf(" ");return-1<a&&(r=E.trim(e.slice(a)),e=e.slice(0,a)),E.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<s.length&&E.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){o=arguments,s.html(r?E("<div>").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.expr.filters.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,s,a,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),a=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(s=(r=c.position()).top,r.left):(s=parseFloat(o)||0,parseFloat(u)||0),E.isFunction(t)&&(t=t.call(e,n,E.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0],i={top:0,left:0},o=r&&r.ownerDocument;return o?(e=o.documentElement,E.contains(e,r)?(i=r.getBoundingClientRect(),n=Ft(o),{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===E.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),E.nodeName(e[0],"html")||(r=e.offset()),r.top+=E.css(e[0],"borderTopWidth",!0),r.left+=E.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-E.css(n,"marginTop",!0),left:t.left-r.left-E.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===E.css(e,"position");)e=e.offsetParent;return e||De})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return O(this,function(e,t,n){var r=Ft(e);return void 0===n?r?r[i]:e[t]:void(r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n)},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=qe(v.pixelPosition,function(e,t){return t?(t=Ae(e,n),Ne.test(t)?E(e).position()[n]+"px":t):void 0})}),E.each({Height:"height",Width:"width"},function(o,s){E.each({padding:"inner"+o,content:s,"":"outer"+o},function(r,e){E.fn[e]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return O(this,function(e,t,n){var r;return E.isWindow(e)?e.document.documentElement["client"+o]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+o],r["scroll"+o],e.body["offset"+o],r["offset"+o],r["client"+o])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n,null)}})}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),E.fn.andSelf=E.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return E});var Pt=C.jQuery,Rt=C.$;return E.noConflict=function(e){return C.$===E&&(C.$=Rt),e&&C.jQuery===E&&(C.jQuery=Pt),E},e||(C.jQuery=C.$=E),E}); 10void 0===jQuery.migrateMute&&(jQuery.migrateMute=!0),function(u,r,i){function d(e){var t=r.console;n[e]||(n[e]=!0,u.migrateWarnings.push(e),t&&t.warn&&!u.migrateMute&&(t.warn("JQMIGRATE: "+e),u.migrateTrace&&t.trace&&t.trace()))}function e(e,t,r,n){if(Object.defineProperty)try{return void Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){return d(n),r},set:function(e){d(n),r=e}})}catch(e){}u._definePropertyBroken=!0,e[t]=r}u.migrateVersion="1.4.0";var n={};u.migrateWarnings=[],r.console&&r.console.log&&r.console.log("JQMIGRATE: Migrate is installed"+(u.migrateMute?"":" with logging active")+", version "+u.migrateVersion),u.migrateTrace===i&&(u.migrateTrace=!0),u.migrateReset=function(){n={},u.migrateWarnings.length=0},"BackCompat"===document.compatMode&&d("jQuery is not compatible with Quirks Mode");var s=u("<input/>",{size:1}).attr("size")&&u.attrFn,c=u.attr,o=u.attrHooks.value&&u.attrHooks.value.get||function(){return null},a=u.attrHooks.value&&u.attrHooks.value.set||function(){return i},l=/^(?:input|button)$/i,p=/^[238]$/,f=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,h=/^(?:checked|selected)$/i;e(u,"attrFn",s||{},"jQuery.attrFn is deprecated"),u.attr=function(e,t,r,n){var o=t.toLowerCase(),a=e&&e.nodeType;return n&&(c.length<4&&d("jQuery.fn.attr( props, pass ) is deprecated"),e&&!p.test(a)&&(s?t in s:u.isFunction(u.fn[t])))?u(e)[t](r):("type"===t&&r!==i&&l.test(e.nodeName)&&e.parentNode&&d("Can't change the 'type' of an input or button in IE 6/7/8"),!u.attrHooks[o]&&f.test(o)&&(u.attrHooks[o]={get:function(e,t){var r,n=u.prop(e,t);return!0===n||"boolean"!=typeof n&&(r=e.getAttributeNode(t))&&!1!==r.nodeValue?t.toLowerCase():i}
10,set:function(e,t,r){var n;return!1===t?u.removeAttr(e,r):((n=u.propFix[r]||r)in e&&(e[n]=!0),e.setAttribute(r,r.toLowerCase())),r}},h.test(o)&&d("jQuery.fn.attr('"+o+"') might use property instead of attribute")),c.call(u,e,t,r))},u.attrHooks.value={get:function(e,t){var r=(e.nodeName||"").toLowerCase();return"button"===r?o.apply(this,arguments):("input"!==r&&"option"!==r&&d("jQuery.fn.attr('value') no longer gets properties"),t in e?e.value:null)},set:function(e,t){var r=(e.nodeName||"").toLowerCase();return"button"===r?a.apply(this,arguments):("input"!==r&&"option"!==r&&d("jQuery.fn.attr('value', val) no longer sets properties"),void(e.value=t))}};var t,v,g=u.fn.init,m=u.parseJSON,y=/^\s*</,b=/\[\s*\w+\s*[~|^$*]?=\s*(?![\s'"])[^#\]]*#/,j=/^([^<]*)(<[\w\W]+>)([^>]*)$/;u.fn.init=function(e,t,r){var n,o;return e&&"string"==typeof e&&!u.isPlainObject(t)&&(n=j.exec(u.trim(e)))&&n[0]&&(y.test(e)||d("$(html) HTML strings must start with '<' character"),n[3]&&d("$(html) HTML text after last tag is ignored"),"#"===n[0].charAt(0)&&(d("HTML string cannot start with a '#' character"),u.error("JQMIGRATE: Invalid selector string (XSS)")),t&&t.context&&(t=t.context),u.parseHTML)?g.call(this,u.parseHTML(n[2],t&&t.ownerDocument||t||document,!0),t,r):("#"===e?(d("jQuery( '#' ) is not a valid selector"),e=[]):b.test(e)&&d("Attribute selectors with '#' must be quoted: '"+e+"'"),o=g.apply(this,arguments),e&&e.selector!==i?(o.selector=e.selector,o.context=e.context):(o.selector="string"==typeof e?e:"",e&&(o.context=e.nodeType?e:t||document)),o)},u.fn.init.prototype=u.fn,u.parseJSON=function(e){return e?m.apply(this,arguments):(d("jQuery.parseJSON requires a valid JSON string"),null)},u.uaMatch=function(e){e=e.toLowerCase();var t=/(chrome)[ \/]([\w.]+)/.exec(e)||/(webkit)[ \/]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}},u.browser||(v={},(t=u.uaMatch(navigator.userAgent)).browser&&(v[t.browser]=!0,v.version=t.version),v.chrome?v.webkit=!0:v.webkit&&(v.safari=!0),u.browser=v),e(u,"browser",u.browser,"jQuery.browser is deprecated"),u.boxModel=u.support.boxModel="CSS1Compat"===document.compatMode,e(u,"boxModel",u.boxModel,"jQuery.boxModel is deprecated"),e(u.support,"boxModel",u.support.boxModel,"jQuery.support.boxModel is deprecated"),u.sub=function(){function n(e,t){return new n.fn.init(e,t)}u.extend(!0,n,this),n.superclass=this,((n.fn=n.prototype=this()).constructor=n).sub=this.sub,n.fn.init=function(e,t){var r=u.fn.init.call(this,e,t,o);return r instanceof n?r:n(r)},n.fn.init.prototype=n.fn;var o=n(document);return d("jQuery.sub() is deprecated"),n};var w=!(u.fn.size=function(){return d("jQuery.fn.size() is deprecated; use the .length property"),this.length});u.swap&&u.each(["height","width","reliableMarginRight"],function(e,t){var r=u.cssHooks[t]&&u.cssHooks[t].get;r&&(u.cssHooks[t].get=function(){var e;return w=!0,e=r.apply(this,arguments),w=!1,e})}),u.swap=function(e,t,r,n){var o,a,i={};for(a in w||d("jQuery.swap() is undocumented and deprecated"),t)i[a]=e.style[a],e.style[a]=t[a];for(a in o=r.apply(e,n||[]),t)e.style[a]=i[a];return o},u.ajaxSetup({converters:{"text json":u.parseJSON}});var x=u.fn.data;u.fn.data=function(e){var t,r,n=this[0];return!n||"events"!==e||1!==arguments.length||(t=u.data(n,e),r=u._data(n,e),t!==i&&t!==r||r===i)?x.apply(this,arguments):(d("Use of jQuery.fn.data('events') is deprecated"),r)};var Q=/\/(java|ecma)script/i;u.clean||(u.clean=function(e,t,r,n){t=(t=!(t=t||document).nodeType&&t[0]||t).ownerDocument||t,d("jQuery.clean() is deprecated");var o,a,i,s,c=[];if(u.merge(c,u.buildFragment(e,t).childNodes),r)for(i=function(e){return!e.type||Q.test(e.type)?n?n.push(e.parentNode?e.parentNode.removeChild(e):e):r.appendChild(e):void 0},o=0;null!=(a=c[o]);o++)u.nodeName(a,"script")&&i(a)||(r.appendChild(a),void 0!==a.getElementsByTagName&&(s=u.grep(u.merge([],a.getElementsByTagName("script")),i),c.splice.apply(c,[o+1,0].concat(s)),o+=s.length));return c});var k=u.event.add,M=u.event.remove,C=u.event.trigger,N=u.fn.toggle,S=u.fn.live,T=u.fn.die,H=u.fn.load,A="ajaxStart|ajaxStop|ajaxSend|ajaxComplete|ajaxError|ajaxSuccess",
10L=new RegExp("\\b(?:"+A+")\\b"),F=/(?:^|\s)hover(\.\S+|)\b/,R=function(e){return"string"!=typeof e||u.event.special.hover?e:(F.test(e)&&d("'hover' pseudo-event is deprecated, use 'mouseenter mouseleave'"),e&&e.replace(F,"mouseenter$1 mouseleave$1"))};u.event.props&&"attrChange"!==u.event.props[0]&&u.event.props.unshift("attrChange","attrName","relatedNode","srcElement"),u.event.dispatch&&e(u.event,"handle",u.event.dispatch,"jQuery.event.handle is undocumented and deprecated"),u.event.add=function(e,t,r,n,o){e!==document&&L.test(t)&&d("AJAX events should be attached to document: "+t),k.call(this,e,R(t||""),r,n,o)},u.event.remove=function(e,t,r,n,o){M.call(this,e,R(t)||"",r,n,o)},u.each(["load","unload","error"],function(e,t){u.fn[t]=function(){var e=Array.prototype.slice.call(arguments,0);return"load"===t&&"string"==typeof e[0]?H.apply(this,e):(d("jQuery.fn."+t+"() is deprecated"),e.splice(0,0,t),arguments.length?this.bind.apply(this,e):(this.triggerHandler.apply(this,e),this))}}),u.fn.toggle=function(r,e){if(!u.isFunction(r)||!u.isFunction(e))return N.apply(this,arguments);d("jQuery.fn.toggle(handler, handler...) is deprecated");var n=arguments,t=r.guid||u.guid++,o=0,a=function(e){var t=(u._data(this,"lastToggle"+r.guid)||0)%o;return u._data(this,"lastToggle"+r.guid,t+1),e.preventDefault(),n[t].apply(this,arguments)||!1};for(a.guid=t;o<n.length;)n[o++].guid=t;return this.click(a)},u.fn.live=function(e,t,r){return d("jQuery.fn.live() is deprecated"),S?S.apply(this,arguments):(u(this.context).on(e,this.selector,t,r),this)},u.fn.die=function(e,t){return d("jQuery.fn.die() is deprecated"),T?T.apply(this,arguments):(u(this.context).off(e,this.selector||"**",t),this)},u.event.trigger=function(e,t,r,n){return r||L.test(e)||d("Global events are undocumented and deprecated"),C.call(this,e,t,r||document,n)},u.each(A.split("|"),function(e,t){u.event.special[t]={setup:function(){var e=this;return e!==document&&(u.event.add(document,t+"."+u.guid,function(){u.event.trigger(t,Array.prototype.slice.call(arguments,1),e,!0)}),u._data(this,t,u.guid++)),!1},teardown:function(){return this!==document&&u.event.remove(document,t+"."+u._data(this,t)),!1}}}),u.event.special.ready={setup:function(){this===document&&d("'ready' event is deprecated")}};var $=u.fn.andSelf||u.fn.addBack,E=u.fn.find;if(u.fn.andSelf=function(){return d("jQuery.fn.andSelf() replaced by jQuery.fn.addBack()"),$.apply(this,arguments)},u.fn.find=function(e){var t=E.apply(this,arguments);return t.context=this.context,t.selector=this.selector?this.selector+" "+e:e,t},u.Callbacks){var J=u.Deferred,O=[["resolve","done",u.Callbacks("once memory"),u.Callbacks("once memory"),"resolved"],["reject","fail",u.Callbacks("once memory"),u.Callbacks("once memory"),"rejected"],["notify","progress",u.Callbacks("memory"),u.Callbacks("memory")]];u.Deferred=function(e){var a=J(),i=a.promise();return a.pipe=i.pipe=function(){var o=arguments;return d("deferred.pipe() is deprecated"),u.Deferred(function(n){u.each(O,function(e,t){var r=u.isFunction(o[e])&&o[e];a[t[1]](function(){var e=r&&r.apply(this,arguments);e&&u.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[t[0]+"With"](this===i?n.promise():this,r?[e]:arguments)})}),o=null}).promise()},a.isResolved=function(){return d("deferred.isResolved is deprecated"),"resolved"===a.state()},a.isRejected=function(){return d("deferred.isRejected is deprecated"),"rejected"===a.state()},e&&e.call(a,a),a}}}(jQuery,window); 11!function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/version.js",["jquery"],t):t(jQuery)}(function(t){"use strict";return t.ui=t.ui||{},t.ui.version="1.14.1"}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/jquery-patch.js",["jquery","./version"],t):t(jQuery)}(function(t){"use strict";t.escapeSelector||(t.escapeSelector=function(t){return CSS.escape(t+"")}),t.fn.even&&t.fn.odd||t.fn.extend({even:function(){return this.filter(function(t){return t%2==0})},odd:function(){return this.filter(function(t){return t%2==1})}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widget",["jquery","./version"],t):t(jQuery)}(function(u){"use strict";var n,i=0,a=Array.prototype.hasOwnProperty,r=Array.prototype.slice;return u.cleanData=(n=u.cleanData,function(t){var e,i,s;for(s=0;null!=(i=t[s]);s++)(e=u._data(i,"events"))&&e.remove&&u(i).triggerHandler("remove");n(t)}),u.widget=function(t,i,e){var s,n,o,a={},r=t.split(".")[0];if("__proto__"===(t=t.split(".")[1])||"constructor"===t)return u.error("Invalid widget name: "+t);var l=r+"-"+t;return e||(e=i,i=u.Widget),Array.isArray(e)&&(e=u.extend.apply(null,[{}].concat(e))),u.expr.pseudos[l.toLowerCase()]=function(t){return!!u.data(t,l)},u[r]=u[r]||{},s=u[r][t],n=u[r][t]=function(t,e){if(!this||!this._createWidget)return new n(t,e);arguments.length&&this._createWidget(t,e)},u.extend(n,s,{version:e.version,_proto:u.extend({},e),_childConstructors:[]}),(o=new i).options=u.widget.extend({},o.options),u.each(e,function(e,o){a[e]="function"==typeof o?function(){function s(){return i.prototype[e].apply(this,arguments)}function n(t){return i.prototype[e].apply(this,t)}return function(){var t,e=this._super,i=this._superApply;return this._super=s,this._superApply=n,t=o.apply(this,arguments),this._super=e,this._superApply=i,t}}():o}),n.prototype=u.widget.extend(o,{widgetEventPrefix:s&&o.widgetEventPrefix||t},a,{constructor:n,namespace:r,widgetName:t,widgetFullName:l}),s?(u.each(s._childConstructors,function(t,e){var i=e.prototype;u.widget(i.namespace+"."+i.widgetName,n,e._proto)}),delete s._childConstructors):i._childConstructors.push(n),u.widget.bridge(t,n),n}
vendor: 4,412 bytes, line 11
11,u.widget.extend=function(t){for(var e,i,s=r.call(arguments,1),n=0,o=s.length;n<o;n++)for(e in s[n])i=s[n][e],a.call(s[n],e)&&void 0!==i&&(u.isPlainObject(i)?t[e]=u.isPlainObject(t[e])?u.widget.extend({},t[e],i):u.widget.extend({},i):t[e]=i);return t},u.widget.bridge=function(o,e){var a=e.prototype.widgetFullName||o;u.fn[o]=function(i){var t="string"==typeof i,s=r.call(arguments,1),n=this;return t?this.length||"instance"!==i?this.each(function(){var t,e=u.data(this,a);return"instance"===i?(n=e,!1):e?"function"!=typeof e[i]||"_"===i.charAt(0)?u.error("no such method '"+i+"' for "+o+" widget instance"):(t=e[i].apply(e,s))!==e&&void 0!==t?(n=t&&t.jquery?n.pushStack(t.get()):t,!1):void 0:u.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+i+"'")}):n=void 0:(s.length&&(i=u.widget.extend.apply(null,[i].concat(s))),this.each(function(){var t=u.data(this,a);t?(t.option(i||{}),t._init&&t._init()):u.data(this,a,new e(i,this))})),n}},u.Widget=function(){},u.Widget._childConstructors=[],u.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(t,e){e=u(e||this.defaultElement||this)[0],this.element=u(e),this.uuid=i++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=u(),this.hoverable=u(),this.focusable=u(),this.classesElementLookup={},e!==this&&(u.data(e,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===e&&this.destroy()}}),this.document=u(e.style?e.ownerDocument:e.document||e),this.window=u(this.document[0].defaultView||this.document[0].parentWindow)),this.options=u.widget.extend({},this.options,this._getCreateOptions(),t),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:u.noop,_create:u.noop,_init:u.noop,destroy:function(){var i=this;this._destroy(),u.each(this.classesElementLookup,function(t,e){i._removeClass(e,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:u.noop,widget:function(){return this.element},option:function(t,e){var i,s,n,o=t;if(0===arguments.length)return u.widget.extend({},this.options);if("string"==typeof t)if(o={},t=(i=t.split(".")).shift(),i.length){for(s=o[t]=u.widget.extend({},this.options[t]),n=0;n<i.length-1;n++)s[i[n]]=s[i[n]]||{},s=s[i[n]];if(t=i.pop(),1===arguments.length)return void 0===s[t]?null:s[t];s[t]=e}else{if(1===arguments.length)return void 0===this.options[t]?null:this.options[t];o[t]=e}return this._setOptions(o),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(t){var e,i,s;for(e in t)s=this.classesElementLookup[e],t[e]!==this.options.classes[e]&&s&&s.length&&(i=u(s.get()),this._removeClass(s,e),i.addClass(this._classes({element:i,keys:e,classes:t,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(n){var o=[],a=this;function r(){var i=[];n.element.each(function(t,e){u.map(a.classesElementLookup,function(t){return t}).some(function(t){return t.is(e)})||i.push(e)}),a._on(u(i),{remove:"_untrackClassesElement"})}function t(t,e){var i,s;for(s=0;s<t.length;s++)i=a.classesElementLookup[t[s]]||u(),i=n.add?(r(),u(u.uniqueSort(i.get().concat(n.element.get())))):u(i.not(n.element).get()),a.classesElementLookup[t[s]]=i,o.push(t[s]),e&&n.classes[t[s]]&&o.push(n.classes[t[s]])}return(n=u.extend({element:this.element,classes:this.options.classes||{}},n)).keys&&t(n.keys.match(/\S+/g)||[],!0),n.extra&&t(n.extra.match(/\S+/g)||[]),o.join(" ")},_untrackClassesElement:function(i){var s=this;u.each(s.classesElementLookup,function(t,e){-1!==u.inArray(i.target,e)&&(s.classesElementLookup[t]=u(e.not(i.target).get()))}),this._off(u(i.target))}
vendor: 2,615 bytes, line 11
11,_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(a,r,t){var l,h=this;"boolean"!=typeof a&&(t=r,r=a,a=!1),t?(r=l=u(r),this.bindings=this.bindings.add(r)):(t=r,r=this.element,l=this.widget()),u.each(t,function(t,e){function i(){if(a||!0!==h.options.disabled&&!u(this).hasClass("ui-state-disabled"))return("string"==typeof e?h[e]:e).apply(h,arguments)}"string"!=typeof e&&(i.guid=e.guid=e.guid||i.guid||u.guid++);var s=t.match(/^([\w:-]*)\s*(.*)$/),n=s[1]+h.eventNamespace,o=s[2];o?l.on(n,o,i):r.on(n,i)})},_off:function(t,e){e=(e||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,t.off(e),this.bindings=u(this.bindings.not(t).get()),this.focusable=u(this.focusable.not(t).get()),this.hoverable=u(this.hoverable.not(t).get())},_delay:function(t,e){var i=this;return setTimeout(function(){return("string"==typeof t?i[t]:t).apply(i,arguments)},e||0)},_hoverable:function(t){this.hoverable=this.hoverable.add(t),this._on(t,{mouseenter:function(t){this._addClass(u(t.currentTarget),null,"ui-state-hover")},mouseleave:function(t){this._removeClass(u(t.currentTarget),null,"ui-state-hover")}})},_focusable:function(t){this.focusable=this.focusable.add(t),this._on(t,{focusin:function(t){this._addClass(u(t.currentTarget),null,"ui-state-focus")},focusout:function(t){this._removeClass(u(t.currentTarget),null,"ui-state-focus")}})},_trigger:function(t,e,i){var s,n,o=this.options[t];if(i=i||{},(e=u.Event(e)).type=(t===this.widgetEventPrefix?t:this.widgetEventPrefix+t).toLowerCase(),e.target=this.element[0],n=e.originalEvent)for(s in n)s in e||(e[s]=n[s]);return this.element.trigger(e,i),!("function"==typeof o&&!1===o.apply(this.element[0],[e].concat(i))||e.isDefaultPrevented())}},u.each({show:"fadeIn",hide:"fadeOut"},function(o,a){u.Widget.prototype["_"+o]=function(e,t,i){var s;"string"==typeof t&&(t={effect:t});var n=t?!0===t||"number"==typeof t?a:t.effect||a:o;"number"==typeof(t=t||{})?t={duration:t}:!0===t&&(t={}),s=!u.isEmptyObject(t),t.complete=i,t.delay&&e.delay(t.delay),s&&u.effects&&u.effects.effect[n]?e[o](t):n!==o&&e[n]?e[n](t.duration,t.easing,i):e.queue(function(t){u(this)[o](),i&&i.call(e[0]),t()})}}),u.widget}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/position",["jquery","./version"],t):t(jQuery)}(function(M){"use strict";
vendor: 8,699 bytes, line 11
11return function(){var n,k=Math.max,D=Math.abs,s=/left|center|right/,o=/top|center|bottom/,a=/[\+\-]\d+(\.[\d]+)?%?/,r=/^\w+/,l=/%$/,h=M.fn.position;function x(t,e,i){return[parseFloat(t[0])*(l.test(t[0])?e/100:1),parseFloat(t[1])*(l.test(t[1])?i/100:1)]}function C(t,e){return parseInt(M.css(t,e),10)||0}function u(t){return null!=t&&t===t.window}M.position={scrollbarWidth:function(){if(void 0!==n)return n;var t,e,i=M("<div style='display:block;position:absolute;width:200px;height:200px;overflow:hidden;'><div style='height:300px;width:auto;'></div></div>"),s=i.children()[0];return M("body").append(i),t=s.offsetWidth,i.css("overflow","scroll"),t===(e=s.offsetWidth)&&(e=i[0].clientWidth),i.remove(),n=t-e},getScrollInfo:function(t){var e=t.isWindow||t.isDocument?"":t.element.css("overflow-x"),i=t.isWindow||t.isDocument?"":t.element.css("overflow-y"),s="scroll"===e||"auto"===e&&t.width<t.element[0].scrollWidth;return{width:"scroll"===i||"auto"===i&&t.height<t.element[0].scrollHeight?M.position.scrollbarWidth():0,height:s?M.position.scrollbarWidth():0}},getWithinInfo:function(t){var e=M(t||window),i=u(e[0]),s=!!e[0]&&9===e[0].nodeType;return{element:e,isWindow:i,isDocument:s,offset:i||s?{left:0,top:0}:M(t).offset(),scrollLeft:e.scrollLeft(),scrollTop:e.scrollTop(),width:e.outerWidth(),height:e.outerHeight()}}},M.fn.position=function(c){if(!c||!c.of)return h.apply(this,arguments);var d,p,f,g,m,t,e,i,_="string"==typeof(c=M.extend({},c)).of?M(document).find(c.of):M(c.of),v=M.position.getWithinInfo(c.within),b=M.position.getScrollInfo(v),y=(c.collision||"flip").split(" "),w={};return t=9===(i=(e=_)[0]).nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:u(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()},_[0].preventDefault&&(c.at="left top"),p=t.width,f=t.height,g=t.offset,m=M.extend({},g),M.each(["my","at"],function(){var t,e,i=(c[this]||"").split(" ");1===i.length&&(i=s.test(i[0])?i.concat(["center"]):o.test(i[0])?["center"].concat(i):["center","center"]),i[0]=s.test(i[0])?i[0]:"center",i[1]=o.test(i[1])?i[1]:"center",t=a.exec(i[0]),e=a.exec(i[1]),w[this]=[t?t[0]:0,e?e[0]:0],c[this]=[r.exec(i[0])[0],r.exec(i[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===c.at[0]?m.left+=p:"center"===c.at[0]&&(m.left+=p/2),"bottom"===c.at[1]?m.top+=f:"center"===c.at[1]&&(m.top+=f/2),d=x(w.at,p,f),m.left+=d[0],m.top+=d[1],this.each(function(){var i,t,a=M(this),r=a.outerWidth(),l=a.outerHeight(),e=C(this,"marginLeft"),s=C(this,"marginTop"),n=r+e+C(this,"marginRight")+b.width,o=l+s+C(this,"marginBottom")+b.height,h=M.extend({},m),u=x(w.my,a.outerWidth(),a.outerHeight());"right"===c.my[0]?h.left-=r:"center"===c.my[0]&&(h.left-=r/2),"bottom"===c.my[1]?h.top-=l:"center"===c.my[1]&&(h.top-=l/2),h.left+=u[0],h.top+=u[1],i={marginLeft:e,marginTop:s},M.each(["left","top"],function(t,e){M.ui.position[y[t]]&&M.ui.position[y[t]][e](h,{targetWidth:p,targetHeight:f,elemWidth:r,elemHeight:l,collisionPosition:i,collisionWidth:n,collisionHeight:o,offset:[d[0]+u[0],d[1]+u[1]],my:c.my,at:c.at,within:v,elem:a})}),c.using&&(t=function(t){var e=g.left-h.left,i=e+p-r,s=g.top-h.top,n=s+f-l,o={target:{element:_,left:g.left,top:g.top,width:p,height:f},element:{element:a,left:h.left,top:h.top,width:r,height:l},horizontal:i<0?"left":0<e?"right":"center",vertical:n<0?"top":0<s?"bottom":"middle"};p<r&&D(e+i)<p&&(o.horizontal="center"),f<l&&D(s+n)<f&&(o.vertical="middle"),k(D(e),D(i))>k(D(s),D(n))?o.important="horizontal":o.important="vertical",c.using.call(this,t,o)}),a.offset(M.extend(h,{using:t}))})},M.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,o=s.width,a=t.left-e.collisionPosition.marginLeft,r=n-a,l=a+e.collisionWidth-o-n;e.collisionWidth>o?0<r&&l<=0?(i=t.left+r+e.collisionWidth-o-n,t.left+=r-i):t.left=0<l&&r<=0?n:l<r?n+o-e.collisionWidth:n:0<r?t.left+=r:0<l?t.left-=l:t.left=k(t.left-a,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,o=e.within.height,a=t.top-e.collisionPosition.marginTop,r=n-a,l=a+e.collisionHeight-o-n;e.collisionHeight>o?0<r&&l<=0?(i=t.top+r+e.collisionHeight-o-n,t.top+=r-i):t.top=0<l&&r<=0?n:l<r?n+o-e.collisionHeight:n:0<r?t.top+=r:0<l?t.top-=l:t.top=k(t.top-a,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,a=n.width,r=n.isWindow?n.scrollLeft:n.offset.left,l=t.left-e.collisionPosition.marginLeft,h=l-r,u=l+e.collisionWidth-a-r,c="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,d="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,p=-2*e.offset[0];h<0?((i=t.left+c+d+p+e.collisionWidth-a-o)<0||i<D(h))&&(t.left+=c+d+p):0<u&&(0<(s=t.left-e.collisionPosition.marginLeft+c+d+p-r)||D(s)<u)&&(t.left+=c+d+p)},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,a=n.height,r=n.isWindow?n.scrollTop:n.offset.top,l=t.top-e.collisionPosition.marginTop,h=l-r,u=l+e.collisionHeight-a-r,c="top"===e.my[1]?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,d="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,p=-2*e.offset[1];h<0?((s=t.top+c+d+p+e.collisionHeight-a-o)<0||s<D(h))&&(t.top+=c+d+p):0<u&&(0<(i=t.top-e.collisionPosition.marginTop+c+d+p-r)||D(i)<u)&&(t.top+=c+d+p)}},flipfit:{left:function(){M.ui.position.flip.left.apply(this,arguments),M.ui.position.fit.left.apply(this,arguments)},top:function(){M.ui.position.flip.top.apply(this,arguments),M.ui.position.fit.top.apply(this,arguments)}}}}(),M.ui.position}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/data",["jquery","./version"],t):t(jQuery)}(function(i){"use strict";return i.extend(i.expr.pseudos,{data:i.expr.createPseudo(function(e){return function(t){return!!i.data(t,e)}})})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/disable-selection",["jquery","./version"],t):t(jQuery)}(function(t){"use strict";return t.fn.extend({disableSelection:(e="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(e+".ui-disableSelection",function(t){t.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var e}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/focusable",["jquery","./version"],t):t(jQuery)}(function(l){"use strict";return l.ui.focusable=function(t,e){var i,s,n,o,a,r=t.nodeName.toLowerCase();return"area"===r?(s=(i=t.parentNode).name,!(!t.href||!s||"map"!==i.nodeName.toLowerCase())&&0<(n=l("img[usemap='#"+s+"']")).length&&n.is(":visible")):(/^(input|select|textarea|button|object)$/.test(r)?(o=!t.disabled)&&(a=l(t).closest("fieldset")[0])&&(o=!a.disabled):o="a"===r&&t.href||e,o&&l(t).is(":visible")&&"visible"===l(t).css("visibility"))},l.extend(l.expr.pseudos,{focusable:function(t){return l.ui.focusable(t,null!=l.attr(t,"tabindex"))}}),l.ui.focusable}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/form-reset-mixin",["jquery","./version"],t):t(jQuery)}(function(i){"use strict";return i.ui.formResetMixin={_formResetHandler:function(){var e=i(this);setTimeout(function(){var t=e.data("ui-form-reset-instances");i.each(t,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=i(this.element.prop("form")),this.form.length){var t=this.form.data("ui-form-reset-instances")||[];t.length||this.form.on("reset.ui-form-reset",this._formResetHandler),t.push(this),this.form.data("ui-form-reset-instances",t)}},_unbindFormResetHandler:function(){if(this.form.length){var t=this.form.data("ui-form-reset-instances");t.splice(i.inArray(this,t),1),t.length?this.form.data("ui-form-reset-instances",t):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}}}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/keycode",["jquery","./version"],t):t(jQuery)}(function(t){"use strict";return t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/labels",["jquery","./version"],t):t(jQuery)}(function(t){"use strict";return t.fn.labels=function(){var t,e,i,s,n;return this.length?this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(s=this.eq(0).parents("label"),(i=this.attr("id"))&&(n=(t=this.eq(0).parents().last(
vendor: 10,680 bytes, line 11
11)).add(t.length?t.siblings():this.siblings()),e="label[for='"+CSS.escape(i)+"']",s=s.add(n.find(e).addBack(e))),this.pushStack(s)):this.pushStack([])}}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/scroll-parent",["jquery","./version"],t):t(jQuery)}(function(o){"use strict";return o.fn.scrollParent=function(t){var e=this.css("position"),i="absolute"===e,s=t?/(auto|scroll|hidden)/:/(auto|scroll)/,n=this.parents().filter(function(){var t=o(this);return(!i||"static"!==t.css("position"))&&s.test(t.css("overflow")+t.css("overflow-y")+t.css("overflow-x"))}).eq(0);return"fixed"!==e&&n.length?n:o(this[0].ownerDocument||document)}}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/tabbable",["jquery","./version","./focusable"],t):t(jQuery)}(function(s){"use strict";return s.extend(s.expr.pseudos,{tabbable:function(t){var e=s.attr(t,"tabindex"),i=null!=e;return(!i||0<=e)&&s.ui.focusable(t,i)}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/unique-id",["jquery","./version"],t):t(jQuery)}(function(t){"use strict";return t.fn.extend({uniqueId:(e=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++e)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}});var e}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/mouse.js",["jquery","../version","../widget"],t):t(jQuery)}(function(n){"use strict";var o=!1;return n(document).on("mouseup",function(){o=!1}),n.widget("ui.mouse",{version:"1.14.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var e=this;this.element.on("mousedown."+this.widgetName,function(t){return e._mouseDown(t)}).on("click."+this.widgetName,function(t){if(!0===n.data(t.target,e.widgetName+".preventClickEvent"))return n.removeData(t.target,e.widgetName+".preventClickEvent"),t.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(t){if(!o){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(t),this._mouseDownEvent=t;var e=this,i=1===t.which,s="string"==typeof this.options.cancel&&n(t.target).closest(this.options.cancel).length;return!(i&&!s&&this._mouseCapture(t))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){e.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(t),!this._mouseStarted)?(t.preventDefault(),!0):(!0===n.data(t.target,this.widgetName+".preventClickEvent")&&n.removeData(t.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(t){return e._mouseMove(t)},this._mouseUpDelegate=function(t){return e._mouseUp(t)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),t.preventDefault(),o=!0))}},_mouseMove:function(t){if(this._mouseMoved&&!t.which)if(t.originalEvent.altKey||t.originalEvent.ctrlKey||t.originalEvent.metaKey||t.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(t);return(t.which||t.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(t),t.preventDefault()):(this._mouseDistanceMet(t)&&this._mouseDelayMet(t)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,t),this._mouseStarted?this._mouseDrag(t):this._mouseUp(t)),!this._mouseStarted)},_mouseUp:function(t){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,t.target===this._mouseDownEvent.target&&n.data(t.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(t)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,o=!1,t.preventDefault()},_mouseDistanceMet:function(t){return Math.max(Math.abs(this._mouseDownEvent.pageX-t.pageX),Math.abs(this._mouseDownEvent.pageY-t.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/plugin",["jquery","./version"],t):t(jQuery)}(function(o){"use strict";return o.ui.plugin={add:function(t,e,i){var s,n=o.ui[t].prototype;for(s in i)n.plugins[s]=n.plugins[s]||[],n.plugins[s].push([e,i[s]])},call:function(t,e,i,s){var n,o=t.plugins[e];if(o&&(s||t.element[0].parentNode&&11!==t.element[0].parentNode.nodeType))for(n=0;n<o.length;n++)t.options[o[n][0]]&&o[n][1].apply(t.element,i)}}}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/draggable",["jquery","./mouse","../data","../plugin","../scroll-parent","../version","../widget"],t):t(jQuery)}(function(b){"use strict";return b.widget("ui.draggable",b.ui.mouse,{version:"1.14.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(t,e){this._super(t,e),"handle"===t&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(t){var e=this.options;return!(this.helper||e.disabled||0<b(t.target).closest(".ui-resizable-handle").length||(this.handle=this._getHandle(t),!this.handle||(this._blurActiveElement(t),this._blockFrames(!0===e.iframeFix?"iframe":e.iframeFix),0)))},_blockFrames:function(t){this.iframeBlocks=this.document.find(t).map(function(){var t=b(this);return b("<div>").css("position","absolute").appendTo(t.parent()).outerWidth(t.outerWidth()).outerHeight(t.outerHeight()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(t){var e=this.document[0].activeElement;b(t.target).closest(e).length||b(e).trigger("blur")},_mouseStart:function(t){var e=this.options;return this.helper=this._createHelper(t),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),b.ui.ddmanager&&(b.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===b(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(t),this.originalPosition=this.position=this._generatePosition(t,!1),this.originalPageX=t.pageX,this.originalPageY=t.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this._setContainment(),!1===this._trigger("start",t)?(this._clear(),!1):(this._cacheHelperProportions(),b.ui.ddmanager&&!e.dropBehaviour&&b.ui.ddmanager.prepareOffsets(this,t),this._mouseDrag(t,!0),b.ui.ddmanager&&b.ui.ddmanager.dragStart(this,t),!0)},_refreshOffsets:function(t){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:t.pageX-this.offset.left,top:t.pageY-this.offset.top}},_mouseDrag:function(t,e){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(t,!0),this.positionAbs=this._convertPositionTo("absolute"),!e){var i=this._uiHash();if(!1===this._trigger("drag",t,i))return this._mouseUp(new b.Event("mouseup",t)),!1;this.position=i.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",b.ui.ddmanager&&b.ui.ddmanager.drag(this,t),!1},_mouseStop:function(t){var e=this,i=!1;return b.ui.ddmanager&&!this.options.dropBehaviour&&(i=b.ui.ddmanager.drop(this,t)),this.dropped&&(i=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!i||"valid"===this.options.revert&&i||!0===this.options.revert||"function"==typeof this.options.revert&&this.options.revert.call(this.element,i)?b(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==e._trigger("stop",t)&&e._clear()}):!1!==this._trigger("stop",t)&&this._clear(),!1},_mouseUp:function(t){return this._unblockFrames(),b.ui.ddmanager&&b.ui.ddmanager.dragStop(this,t),this.handleElement.is(t.target)&&this.element.trigger("focus"),b.ui.mouse.prototype._mouseUp.call(this,t)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new b.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(t){return!this.options.handle||!!b(t.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(t){var e=this.options,i="function"==typeof e.helper,s=i?b(e.helper.apply(this.element[0],[t])):"clone"===e.helper?this.element.clone().removeAttr("id"):this.element;return s.parents("body").length||s.appendTo("parent"===e.appendTo?this.element[0].parentNode:e.appendTo),i&&s[0]===this.element[0]&&this._setPositionRelative(),s[0]===this.element[0]||/(fixed|absolute)/.test(s.css("position"))||s.css("position","absolute"),s},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(t){"string"==typeof t&&(t=t.split(" ")),Array.isArray(t)&&(t={left:+t[0],top:+t[1]||0}
vendor: 4,483 bytes, line 11
11),"left"in t&&(this.offset.click.left=t.left+this.margins.left),"right"in t&&(this.offset.click.left=this.helperProportions.width-t.right+this.margins.left),"top"in t&&(this.offset.click.top=t.top+this.margins.top),"bottom"in t&&(this.offset.click.top=this.helperProportions.height-t.bottom+this.margins.top)},_isRootNode:function(t){return/(html|body)/i.test(t.tagName)||t===this.document[0]},_getParentOffset:function(){var t=this.offsetParent.offset(),e=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==e&&b.contains(this.scrollParent[0],this.offsetParent[0])&&(t.left+=this.scrollParent.scrollLeft(),t.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(t={top:0,left:0}),{top:t.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:t.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var t=this.element.position(),e=this._isRootNode(this.scrollParent[0]);return{top:t.top-(parseInt(this.helper.css("top"),10)||0)+(e?0:this.scrollParent.scrollTop()),left:t.left-(parseInt(this.helper.css("left"),10)||0)+(e?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var t,e,i,s=this.options,n=this.document[0];this.relativeContainer=null,s.containment?"window"!==s.containment?"document"!==s.containment?s.containment.constructor!==Array?("parent"===s.containment&&(s.containment=this.helper[0].parentNode),(i=(e=b(s.containment))[0])&&(t=/(scroll|auto)/.test(e.css("overflow")),this.containment=[(parseInt(e.css("borderLeftWidth"),10)||0)+(parseInt(e.css("paddingLeft"),10)||0),(parseInt(e.css("borderTopWidth"),10)||0)+(parseInt(e.css("paddingTop"),10)||0),(t?Math.max(i.scrollWidth,i.offsetWidth):i.offsetWidth)-(parseInt(e.css("borderRightWidth"),10)||0)-(parseInt(e.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(t?Math.max(i.scrollHeight,i.offsetHeight):i.offsetHeight)-(parseInt(e.css("borderBottomWidth"),10)||0)-(parseInt(e.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=e)):this.containment=s.containment:this.containment=[0,0,b(n).width()-this.helperProportions.width-this.margins.left,(b(n).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[b(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,b(window).scrollLeft()+b(window).width()-this.helperProportions.width-this.margins.left,b(window).scrollTop()+(b(window).height()||n.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(t,e){e||(e=this.position);var i="absolute"===t?1:-1,s=this._isRootNode(this.scrollParent[0]);return{top:e.top+this.offset.relative.top*i+this.offset.parent.top*i-("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top)*i,left:e.left+this.offset.relative.left*i+this.offset.parent.left*i-("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)*i}},_generatePosition:function(t,e){var i,s,n,o,a=this.options,r=this._isRootNode(this.scrollParent[0]),l=t.pageX,h=t.pageY;return r&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),e&&(this.containment&&(i=this.relativeContainer?(s=this.relativeContainer.offset(),[this.containment[0]+s.left,this.containment[1]+s.top,this.containment[2]+s.left,this.containment[3]+s.top]):this.containment,t.pageX-this.offset.click.left<i[0]&&(l=i[0]+this.offset.click.left),t.pageY-this.offset.click.top<i[1]&&(h=i[1]+this.offset.click.top),t.pageX-this.offset.click.left>i[2]&&(l=i[2]+this.offset.click.left),t.pageY-this.offset.click.top>i[3]&&(h=i[3]+this.offset.click.top)),a.grid&&(n=a.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/a.grid[1])*a.grid[1]:this.originalPageY,h=i?n-this.offset.click.top>=i[1]||n-this.offset.click.top>
vendor: 4,136 bytes, line 11
11i[3]?n:n-this.offset.click.top>=i[1]?n-a.grid[1]:n+a.grid[1]:n,o=a.grid[0]?this.originalPageX+Math.round((l-this.originalPageX)/a.grid[0])*a.grid[0]:this.originalPageX,l=i?o-this.offset.click.left>=i[0]||o-this.offset.click.left>i[2]?o:o-this.offset.click.left>=i[0]?o-a.grid[0]:o+a.grid[0]:o),"y"===a.axis&&(l=this.originalPageX),"x"===a.axis&&(h=this.originalPageY)),{top:h-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top),left:l-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(t,e,i){return i=i||this._uiHash(),b.ui.plugin.call(this,t,[e,i,this],!0),/^(drag|start|stop)/.test(t)&&(this.positionAbs=this._convertPositionTo("absolute"),i.offset=this.positionAbs),b.Widget.prototype._trigger.call(this,t,e,i)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),b.ui.plugin.add("draggable","connectToSortable",{start:function(e,t,i){var s=b.extend({},t,{item:i.element});i.sortables=[],b(i.options.connectToSortable).each(function(){var t=b(this).sortable("instance");t&&!t.options.disabled&&(i.sortables.push(t),t.refreshPositions(),t._trigger("activate",e,s))})},stop:function(e,t,i){var s=b.extend({},t,{item:i.element});i.cancelHelperRemoval=!1,b.each(i.sortables,function(){var t=this;t.isOver?(t.isOver=0,i.cancelHelperRemoval=!0,t.cancelHelperRemoval=!1,t._storedCSS={position:t.placeholder.css("position"),top:t.placeholder.css("top"),left:t.placeholder.css("left")},t._mouseStop(e),t.options.helper=t.options._helper):(t.cancelHelperRemoval=!0,t._trigger("deactivate",e,s))})},drag:function(i,s,n){b.each(n.sortables,function(){var t=!1,e=this;e.positionAbs=n.positionAbs,e.helperProportions=n.helperProportions,e.offset.click=n.offset.click,e._intersectsWith(e.containerCache)&&(t=!0,b.each(n.sortables,function(){return this.positionAbs=n.positionAbs,this.helperProportions=n.helperProportions,this.offset.click=n.offset.click,this!==e&&this._intersectsWith(this.containerCache)&&b.contains(e.element[0],this.element[0])&&(t=!1),t})),t?(e.isOver||(e.isOver=1,n._parent=s.helper.parent(),e.currentItem=s.helper.appendTo(e.element).data("ui-sortable-item",!0),e.options._helper=e.options.helper,e.options.helper=function(){return s.helper[0]},i.target=e.currentItem[0],e._mouseCapture(i,!0),e._mouseStart(i,!0,!0),e.offset.click.top=n.offset.click.top,e.offset.click.left=n.offset.click.left,e.offset.parent.left-=n.offset.parent.left-e.offset.parent.left,e.offset.parent.top-=n.offset.parent.top-e.offset.parent.top,n._trigger("toSortable",i),n.dropped=e.element,b.each(n.sortables,function(){this.refreshPositions()}),n.currentItem=n.element,e.fromOutside=n),e.currentItem&&(e._mouseDrag(i),s.position=e.position)):e.isOver&&(e.isOver=0,e.cancelHelperRemoval=!0,e.options._revert=e.options.revert,e.options.revert=!1,e._trigger("out",i,e._uiHash(e)),e._mouseStop(i,!0),e.options.revert=e.options._revert,e.options.helper=e.options._helper,e.placeholder&&e.placeholder.remove(),s.helper.appendTo(n._parent),n._refreshOffsets(i),s.position=n._generatePosition(i,!0),n._trigger("fromSortable",i),n.dropped=!1,b.each(n.sortables,function(){this.refreshPositions()}))})}}),b.ui.plugin.add("draggable","cursor",{start:function(t,e,i){var s=b("body"),n=i.options;s.css("cursor")&&(n._cursor=s.css("cursor")),s.css("cursor",n.cursor)},stop:function(t,e,i){var s=i.options;s._cursor&&b("body").css("cursor",s._cursor)}}),b.ui.plugin.add("draggable","opacity",{start:function(t,e,i){var s=b(e.helper),n=i.options;s.css("opacity")&&(n._opacity=s.css("opacity")),s.css("opacity",n.opacity)},stop:function(t,e,i){var s=i.options;s._opacity&&b(e.helper).css("opacity",s._opacity)}}
vendor: 4,929 bytes, line 11
11),b.ui.plugin.add("draggable","scroll",{start:function(t,e,i){i.scrollParentNotHidden||(i.scrollParentNotHidden=i.helper.scrollParent(!1)),i.scrollParentNotHidden[0]!==i.document[0]&&"HTML"!==i.scrollParentNotHidden[0].tagName&&(i.overflowOffset=i.scrollParentNotHidden.offset())},drag:function(t,e,i){var s=i.options,n=!1,o=i.scrollParentNotHidden[0],a=i.document[0];o!==a&&"HTML"!==o.tagName?(s.axis&&"x"===s.axis||(i.overflowOffset.top+o.offsetHeight-t.pageY<s.scrollSensitivity?o.scrollTop=n=o.scrollTop+s.scrollSpeed:t.pageY-i.overflowOffset.top<s.scrollSensitivity&&(o.scrollTop=n=o.scrollTop-s.scrollSpeed)),s.axis&&"y"===s.axis||(i.overflowOffset.left+o.offsetWidth-t.pageX<s.scrollSensitivity?o.scrollLeft=n=o.scrollLeft+s.scrollSpeed:t.pageX-i.overflowOffset.left<s.scrollSensitivity&&(o.scrollLeft=n=o.scrollLeft-s.scrollSpeed))):(s.axis&&"x"===s.axis||(t.pageY-b(a).scrollTop()<s.scrollSensitivity?n=b(a).scrollTop(b(a).scrollTop()-s.scrollSpeed):b(window).height()-(t.pageY-b(a).scrollTop())<s.scrollSensitivity&&(n=b(a).scrollTop(b(a).scrollTop()+s.scrollSpeed))),s.axis&&"y"===s.axis||(t.pageX-b(a).scrollLeft()<s.scrollSensitivity?n=b(a).scrollLeft(b(a).scrollLeft()-s.scrollSpeed):b(window).width()-(t.pageX-b(a).scrollLeft())<s.scrollSensitivity&&(n=b(a).scrollLeft(b(a).scrollLeft()+s.scrollSpeed)))),!1!==n&&b.ui.ddmanager&&!s.dropBehaviour&&b.ui.ddmanager.prepareOffsets(i,t)}}),b.ui.plugin.add("draggable","snap",{start:function(t,e,i){var s=i.options;i.snapElements=[],b(s.snap.constructor!==String?s.snap.items||":data(ui-draggable)":s.snap).each(function(){var t=b(this),e=t.offset();this!==i.element[0]&&i.snapElements.push({item:this,width:t.outerWidth(),height:t.outerHeight(),top:e.top,left:e.left})})},drag:function(t,e,i){var s,n,o,a,r,l,h,u,c,d,p=i.options,f=p.snapTolerance,g=e.offset.left,m=g+i.helperProportions.width,_=e.offset.top,v=_+i.helperProportions.height;for(c=i.snapElements.length-1;0<=c;c--)l=(r=i.snapElements[c].left-i.margins.left)+i.snapElements[c].width,u=(h=i.snapElements[c].top-i.margins.top)+i.snapElements[c].height,m<r-f||l+f<g||v<h-f||u+f<_||!b.contains(i.snapElements[c].item.ownerDocument,i.snapElements[c].item)?(i.snapElements[c].snapping&&i.options.snap.release&&i.options.snap.release.call(i.element,t,b.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=!1):("inner"!==p.snapMode&&(s=Math.abs(h-v)<=f,n=Math.abs(u-_)<=f,o=Math.abs(r-m)<=f,a=Math.abs(l-g)<=f,s&&(e.position.top=i._convertPositionTo("relative",{top:h-i.helperProportions.height,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:u,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r-i.helperProportions.width}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l}).left)),d=s||n||o||a,"outer"!==p.snapMode&&(s=Math.abs(h-_)<=f,n=Math.abs(u-v)<=f,o=Math.abs(r-g)<=f,a=Math.abs(l-m)<=f,s&&(e.position.top=i._convertPositionTo("relative",{top:h,left:0}).top),n&&(e.position.top=i._convertPositionTo("relative",{top:u-i.helperProportions.height,left:0}).top),o&&(e.position.left=i._convertPositionTo("relative",{top:0,left:r}).left),a&&(e.position.left=i._convertPositionTo("relative",{top:0,left:l-i.helperProportions.width}).left)),!i.snapElements[c].snapping&&(s||n||o||a||d)&&i.options.snap.snap&&i.options.snap.snap.call(i.element,t,b.extend(i._uiHash(),{snapItem:i.snapElements[c].item})),i.snapElements[c].snapping=s||n||o||a||d)}}),b.ui.plugin.add("draggable","stack",{start:function(t,e,i){var s,n=i.options,o=b.makeArray(b(n.stack)).sort(function(t,e){return(parseInt(b(t).css("zIndex"),10)||0)-(parseInt(b(e).css("zIndex"),10)||0)});o.length&&(s=parseInt(b(o[0]).css("zIndex"),10)||0,b(o).each(function(t){b(this).css("zIndex",s+t)}),this.css("zIndex",s+o.length))}}),b.ui.plugin.add("draggable","zIndex",{start:function(t,e,i){var s=b(e.helper),n=i.options;s.css("zIndex")&&(n._zIndex=s.css("zIndex")),s.css("zIndex",n.zIndex)},stop:function(t,e,i){var s=i.options;s._zIndex&&b(e.helper).css("zIndex",s._zIndex)}}),b.ui.draggable}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/resizable",["jquery","./mouse","../disable-selection","../plugin","../version","../widget"],t):t(jQuery)}(function(v){"use strict";return v.widget("ui.resizable",v.ui.mouse,{version:"1.14.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(t){return parseFloat(t)||0},_isNumber:function(t){return!isNaN(parseFloat(t))},_hasScroll:function(t,e){var i,s=!1,n=v(t).css("overflow");if("hidden"===n)return!1;if("scroll"===n)return!0;
vendor: 6,865 bytes, line 11
11if(0<t[i=e&&"left"===e?"scrollLeft":"scrollTop"])return!0;try{t[i]=1,s=0<t[i],t[i]=0}catch(t){}return s},_create:function(){var t,e=this.options,i=this;this._addClass("ui-resizable"),v.extend(this,{_aspectRatio:!!e.aspectRatio,aspectRatio:e.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:e.helper||e.ghost||e.animate?e.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(v("<div class='ui-wrapper'></div>").css({overflow:"hidden",position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,t={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(t),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this._proportionallyResize()),this._setupHandles(),e.autoHide&&v(this.element).on("mouseenter",function(){e.disabled||(i._removeClass("ui-resizable-autohide"),i._handles.show())}).on("mouseleave",function(){e.disabled||i.resizing||(i._addClass("ui-resizable-autohide"),i._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy(),this._addedHandles.remove();var t,e=function(t){v(t).removeData("resizable").removeData("ui-resizable").off(".resizable")};return this.elementIsWrapper&&(e(this.element),t=this.element,this.originalElement.css({position:t.css("position"),width:t.outerWidth(),height:t.outerHeight(),top:t.css("top"),left:t.css("left")}).insertAfter(t),t.remove()),this.originalElement.css("resize",this.originalResizeStyle),e(this.originalElement),this},_setOption:function(t,e){switch(this._super(t,e),t){case"handles":this._removeHandles(),this._setupHandles();break;case"aspectRatio":this._aspectRatio=!!e}},_setupHandles:function(){var t,e,i,s,n,o=this.options,a=this;if(this.handles=o.handles||(v(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=v(),this._addedHandles=v(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),i=this.handles.split(","),this.handles={},e=0;e<i.length;e++)s="ui-resizable-"+(t=String.prototype.trim.call(i[e])),n=v("<div>"),this._addClass(n,"ui-resizable-handle "+s),n.css({zIndex:o.zIndex}),this.handles[t]=".ui-resizable-"+t,this.element.children(this.handles[t]).length||(this.element.append(n),this._addedHandles=this._addedHandles.add(n));this._renderAxis=function(t){var e,i,s,n;for(e in t=t||this.element,this.handles)this.handles[e].constructor===String?this.handles[e]=this.element.children(this.handles[e]).first().show():(this.handles[e].jquery||this.handles[e].nodeType)&&(this.handles[e]=v(this.handles[e]),this._on(this.handles[e],{mousedown:a._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(i=v(this.handles[e],this.element),n=/sw|ne|nw|se|n|s/.test(e)?i.outerHeight():i.outerWidth(),s=["padding",/ne|nw|n/.test(e)?"Top":/se|sw|s/.test(e)?"Bottom":/^e$/.test(e)?"Right":"Left"].join(""),t.css(s,n),this._proportionallyResize()),this._handles=this._handles.add(this.handles[e])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){a.resizing||(this.className&&(n=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),a.axis=n&&n[1]?n[1]:"se")}),o.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._addedHandles.remove()},_mouseCapture:function(t){var e,i,s=!1;for(e in this.handles)((i=v(this.handles[e])[0])===t.target||v.contains(i,t.target))&&(s=!0);return!this.options.disabled&&s},_mouseStart:function(t){var e,i,s,n,o=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),e=this._num(this.helper.css("left")),i=this._num(this.helper.css("top")),o.containment&&(e+=v(o.containment).scrollLeft()||0,i+=v(o.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:e,top:i},this._helper||(n=this._calculateAdjustedElementDimensions(a)),this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:n.width,height:n.height},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:n.width,height:n.height},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:e,top:i},this.originalMousePosition={left:t.pageX,top:t.pageY},this.aspectRatio="number"==typeof o.aspectRatio?o.aspectRatio:this.originalSize.width/this.originalSize.height||1,s=v(".ui-resizable-"+this.axis).css("cursor"),v("body").css("cursor","auto"===s?this.axis+"-resize":s),this._addClass("ui-resizable-resizing"),this._propagate("start",t),!0},_mouseDrag:function(t){var e,i,s=this.originalMousePosition,n=this.axis,o=t.pageX-s.left||0,a=t.pageY-s.top||0,r=this._change[n];return this._updatePrevProperties(),r&&(e=r.apply(this,[t,o,a]),this._updateVirtualBoundaries(t.shiftKey),(this._aspectRatio||t.shiftKey)&&(e=this._updateRatio(e,t)),e=this._respectSize(e,t),this._updateCache(e),this._propagate("resize",t),i=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),v.isEmptyObject(i)||(this._updatePrevProperties(),this._trigger("resize",t,this.ui()),this._applyChanges())),!1},_mouseStop:function(t){this.resizing=!1;var e,i,s,n,o,a,r,l=this.options,h=this;return this._helper&&(s=(i=(e=this._proportionallyResizeElements).length&&/textarea/i.test(e[0].nodeName))&&this._hasScroll(e[0],"left")?0:h.sizeDiff.height,n=i?0:h.sizeDiff.width,o={width:h.helper.width()-n,height:h.helper.height()-s},a=parseFloat(h.element.css("left"))+(h.position.left-h.originalPosition.left)||null,r=parseFloat(h.element.css("top"))+(h.position.top-h.originalPosition.top)||null,l.animate||this.element.css(v.extend(o,{top:r,left:a})),h.helper.height(h.size.height),h.helper.width(h.size.width),this._helper&&!l.animate&&this._proportionallyResize()),v("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",t),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left
vendor: 19,127 bytes, line 11
11:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var t={};return this.position.top!==this.prevPosition.top&&(t.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(t.left=this.position.left+"px"),this.helper.css(t),this.size.width!==this.prevSize.width&&(t.width=this.size.width+"px",this.helper.width(t.width)),this.size.height!==this.prevSize.height&&(t.height=this.size.height+"px",this.helper.height(t.height)),t},_updateVirtualBoundaries:function(t){var e,i,s,n,o,a=this.options;o={minWidth:this._isNumber(a.minWidth)?a.minWidth:0,maxWidth:this._isNumber(a.maxWidth)?a.maxWidth:1/0,minHeight:this._isNumber(a.minHeight)?a.minHeight:0,maxHeight:this._isNumber(a.maxHeight)?a.maxHeight:1/0},(this._aspectRatio||t)&&(e=o.minHeight*this.aspectRatio,s=o.minWidth/this.aspectRatio,i=o.maxHeight*this.aspectRatio,n=o.maxWidth/this.aspectRatio,e>o.minWidth&&(o.minWidth=e),s>o.minHeight&&(o.minHeight=s),i<o.maxWidth&&(o.maxWidth=i),n<o.maxHeight&&(o.maxHeight=n)),this._vBoundaries=o},_updateCache:function(t){this.offset=this.helper.offset(),this._isNumber(t.left)&&(this.position.left=t.left),this._isNumber(t.top)&&(this.position.top=t.top),this._isNumber(t.height)&&(this.size.height=t.height),this._isNumber(t.width)&&(this.size.width=t.width)},_updateRatio:function(t){var e=this.position,i=this.size,s=this.axis;return this._isNumber(t.height)?t.width=t.height*this.aspectRatio:this._isNumber(t.width)&&(t.height=t.width/this.aspectRatio),"sw"===s&&(t.left=e.left+(i.width-t.width),t.top=null),"nw"===s&&(t.top=e.top+(i.height-t.height),t.left=e.left+(i.width-t.width)),t},_respectSize:function(t){var e=this._vBoundaries,i=this.axis,s=this._isNumber(t.width)&&e.maxWidth&&e.maxWidth<t.width,n=this._isNumber(t.height)&&e.maxHeight&&e.maxHeight<t.height,o=this._isNumber(t.width)&&e.minWidth&&e.minWidth>t.width,a=this._isNumber(t.height)&&e.minHeight&&e.minHeight>t.height,r=this.originalPosition.left+this.originalSize.width,l=this.originalPosition.top+this.originalSize.height,h=/sw|nw|w/.test(i),u=/nw|ne|n/.test(i);return o&&(t.width=e.minWidth),a&&(t.height=e.minHeight),s&&(t.width=e.maxWidth),n&&(t.height=e.maxHeight),o&&h&&(t.left=r-e.minWidth),s&&h&&(t.left=r-e.maxWidth),a&&u&&(t.top=l-e.minHeight),n&&u&&(t.top=l-e.maxHeight),t.width||t.height||t.left||!t.top?t.width||t.height||t.top||!t.left||(t.left=null):t.top=null,t},_getPaddingPlusBorderDimensions:function(t){for(var e=0,i=[],s=[t.css("borderTopWidth"),t.css("borderRightWidth"),t.css("borderBottomWidth"),t.css("borderLeftWidth")],n=[t.css("paddingTop"),t.css("paddingRight"),t.css("paddingBottom"),t.css("paddingLeft")];e<4;e++)i[e]=parseFloat(s[e])||0,i[e]+=parseFloat(n[e])||0;return{height:i[0]+i[2],width:i[1]+i[3]}},_calculateAdjustedElementDimensions:function(t){var e,i,s,n=t.get(0);return"content-box"!==t.css("box-sizing")||!this._hasScroll(n)&&!this._hasScroll(n,"left")?{height:parseFloat(t.css("height")),width:parseFloat(t.css("width"))}:(e=parseFloat(n.style.width),i=parseFloat(n.style.height),s=this._getPaddingPlusBorderDimensions(t),e=isNaN(e)?this._getElementTheoreticalSize(t,s,"width"):e,{height:i=isNaN(i)?this._getElementTheoreticalSize(t,s,"height"):i,width:e})},_getElementTheoreticalSize:function(t,e,i){return Math.max(0,Math.ceil(t.get(0)["offset"+i[0].toUpperCase()+i.slice(1)]-e[i]-.5))||0},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var t,e=0,i=this.helper||this.element;e<this._proportionallyResizeElements.length;e++)t=this._proportionallyResizeElements[e],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(t)),t.css({height:i.height()-this.outerDimensions.height||0,width:i.width()-this.outerDimensions.width||0})},_renderProxy:function(){var t=this.element,e=this.options;this.elementOffset=t.offset(),this._helper?(this.helper=this.helper||v("<div></div>").css({overflow:"hidden"}),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++e.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(t,e){return{width:this.originalSize.width+e}},w:function(t,e){var i=this.originalSize;return{left:this.originalPosition.left+e,width:i.width-e}},n:function(t,e,i){var s=this.originalSize;return{top:this.originalPosition.top+i,height:s.height-i}},s:function(t,e,i){return{height:this.originalSize.height+i}},se:function(t,e,i){return v.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},sw:function(t,e,i){return v.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[t,e,i]))},ne:function(t,e,i){return v.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[t,e,i]))},nw:function(t,e,i){return v.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[t,e,i]))}},_propagate:function(t,e){v.ui.plugin.call(this,t,[e,this.ui()]),"resize"!==t&&this._trigger(t,e,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),v.ui.plugin.add("resizable","animate",{stop:function(e){var i=v(this).resizable("instance"),t=i.options,s=i._proportionallyResizeElements,n=s.length&&/textarea/i.test(s[0].nodeName),o=n&&i._hasScroll(s[0],"left")?0:i.sizeDiff.height,a=n?0:i.sizeDiff.width,r={width:i.size.width-a,height:i.size.height-o},l=parseFloat(i.element.css("left"))+(i.position.left-i.originalPosition.left)||null,h=parseFloat(i.element.css("top"))+(i.position.top-i.originalPosition.top)||null;i.element.animate(v.extend(r,h&&l?{top:h,left:l}:{}),{duration:t.animateDuration,easing:t.animateEasing,step:function(){var t={width:parseFloat(i.element.css("width")),height:parseFloat(i.element.css("height")),top:parseFloat(i.element.css("top")),left:parseFloat(i.element.css("left"))};s&&s.length&&v(s[0]).css({width:t.width,height:t.height}),i._updateCache(t),i._propagate("resize",e)}})}}),v.ui.plugin.add("resizable","containment",{start:function(){var i,s,t,e,n,o,a,r=v(this).resizable("instance"),l=r.options,h=r.element,u=l.containment,c=u instanceof v?u.get(0):/parent/.test(u)?h.parent().get(0):u;c&&(r.containerElement=v(c),/document/.test(u)||u===document?(r.containerOffset={left:0,top:0},r.containerPosition={left:0,top:0},r.parentData={element:v(document),left:0,top:0,width:v(document).width(),height:v(document).height()||document.body.parentNode.scrollHeight}):(i=v(c),s=[],v(["Top","Right","Left","Bottom"]).each(function(t,e){s[t]=r._num(i.css("padding"+e))}),r.containerOffset=i.offset(),r.containerPosition=i.position(),r.containerSize={height:i.innerHeight()-s[3],width:i.innerWidth()-s[1]},t=r.containerOffset,e=r.containerSize.height,n=r.containerSize.width,o=r._hasScroll(c,"left")?c.scrollWidth:n,a=r._hasScroll(c)?c.scrollHeight:e,r.parentData={element:c,left:t.left,top:t.top,width:o,height:a}))},resize:function(t){var e,i,s,n,o=v(this).resizable("instance"),a=o.options,r=o.containerOffset,l=o.position,h=o._aspectRatio||t.shiftKey,u={top:0,left:0},c=o.containerElement,d=!0;c[0]!==document&&/static/.test(c.css("position"))&&(u=r),l.left<(o._helper?r.left:0)&&(o.size.width=o.size.width+(o._helper?o.position.left-r.left:o.position.left-u.left),h&&(o.size.height=o.size.width/o.aspectRatio,d=!1),o.position.left=a.helper?r.left:0),l.top<(o._helper?r.top:0)&&(o.size.height=o.size.height+(o._helper?o.position.top-r.top:o.position.top),h&&(o.size.width=o.size.height*o.aspectRatio,d=!1),o.position.top=o._helper?r.top:0),s=o.containerElement.get(0)===o.element.parent().get(0),n=/relative|absolute/.test(o.containerElement.css("position")),s&&n?(o.offset.left=o.parentData.left+o.position.left,o.offset.top=o.parentData.top+o.position.top):(o.offset.left=o.element.offset().left,o.offset.top=o.element.offset().top),e=Math.abs(o.sizeDiff.width+(o._helper?o.offset.left-u.left:o.offset.left-r.left)),i=Math.abs(o.sizeDiff.height+(o._helper?o.offset.top-u.top:o.offset.top-r.top)),e+o.size.width>=o.parentData.width&&(o.size.width=o.parentData.width-e,h&&(o.size.height=o.size.width/o.aspectRatio,d=!1)),i+o.size.height>=o.parentData.height&&(o.size.height=o.parentData.height-i,h&&(o.size.width=o.size.height*o.aspectRatio,d=!1)),d||(o.position.left=o.prevPosition.left,o.position.top=o.prevPosition.top,o.size.width=o.prevSize.width,o.size.height=o.prevSize.height)},stop:function(){var t=v(this).resizable("instance"),e=t.options,i=t.containerOffset,s=t.containerPosition,n=t.containerElement,o=v(t.helper),a=o.offset(),r=o.outerWidth()-t.sizeDiff.width,l=o.outerHeight()-t.sizeDiff.height;t._helper&&!e.animate&&/relative/.test(n.css("position"))&&v(this).css({left:a.left-s.left-i.left,width:r,height:l}),t._helper&&!e.animate&&/static/.test(n.css("position"))&&v(this).css({left:a.left-s.left-i.left,width:r,height:l})}}),v.ui.plugin.add("resizable","alsoResize",{start:function(){var i=v(this).resizable("instance"),t=i.options;v(t.alsoResize).each(function(){var t=v(this),e=i._calculateAdjustedElementDimensions(t);t.data("ui-resizable-alsoresize",{width:e.width,height:e.height,left:parseFloat(t.css("left")),top:parseFloat(t.css("top"))})})},resize:function(t,i){var e=v(this).resizable("instance"),s=e.options,n=e.originalSize,o=e.originalPosition,a={height:e.size.height-n.height||0,width:e.size.width-n.width||0,top:e.position.top-o.top||0,left:e.position.left-o.left||0};v(s.alsoResize).each(function(){var t=v(this),s=v(this).data("ui-resizable-alsoresize"),n={},e=t.parents(i.originalElement[0]).length?["width","height"]:["width","height","top","left"];v.each(e,function(t,e){var i=(s[e]||0)+(a[e]||0);i&&0<=i&&(n[e]=i||null)}),t.css(n)})},stop:function(){v(this).removeData("ui-resizable-alsoresize")}}),v.ui.plugin.add("resizable","ghost",{start:function(){var t=v(this).resizable("instance"),e=t.size;t.ghost=t.originalElement.clone(),t.ghost.css({opacity:.25,display:"block",position:"relative",height:e.height,width:e.width,margin:0,left:0,top:0}),t._addClass(t.ghost,"ui-resizable-ghost"),!0===v.uiBackCompat&&"string"==typeof t.options.ghost&&t.ghost.addClass(this.options.ghost),t.ghost.appendTo(t.helper)},resize:function(){var t=v(this).resizable("instance");t.ghost&&t.ghost.css({position:"relative",height:t.size.height,width:t.size.width})},stop:function(){var t=v(this).resizable("instance");t.ghost&&t.helper&&t.helper.get(0).removeChild(t.ghost.get(0))}}),v.ui.plugin.add("resizable","grid",{resize:function(){var t,e=v(this).resizable("instance"),i=e.options,s=e.size,n=e.originalSize,o=e.originalPosition,a=e.axis,r="number"==typeof i.grid?[i.grid,i.grid]:i.grid,l=r[0]||1,h=r[1]||1,u=Math.round((s.width-n.width)/l)*l,c=Math.round((s.height-n.height)/h)*h,d=n.width+u,p=n.height+c,f=i.maxWidth&&i.maxWidth<d,g=i.maxHeight&&i.maxHeight<p,m=i.minWidth&&i.minWidth>d,_=i.minHeight&&i.minHeight>p;i.grid=r,m&&(d+=l),_&&(p+=h),f&&(d-=l),g&&(p-=h),/^(se|s|e)$/.test(a)?(e.size.width=d,e.size.height=p):/^(ne)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.top=o.top-c):/^(sw)$/.test(a)?(e.size.width=d,e.size.height=p,e.position.left=o.left-u):((p-h<=0||d-l<=0)&&(t=e._getPaddingPlusBorderDimensions(this)),0<p-h?(e.size.height=p,e.position.top=o.top-c):(p=h-t.height,e.size.height=p,e.position.top=o.top+n.height-p),0<d-l?(e.size.width=d,e.position.left=o.left-u):(d=l-t.width,e.size.width=d,e.position.left=o.left+n.width-d))}}),v.ui.resizable}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/menu.js",["jquery","../keycode","../position","../unique-id","../version","../widget"],t):t(jQuery)}(function(r){"use strict";return r.widget("ui.menu",{version:"1.14.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.lastMousePosition={x:null,y:null},this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault(),this._activateItem(t)},"click .ui-menu-item":function(t){var e=r(t.target),i=r(this.document[0].activeElement);!this.mouseHandled&&e.not(".ui-state-disabled").length&&(this.select(t),t.isPropagationStopped()||(this.mouseHandled=!0),e.has(".ui-menu").length?this.expand(t):!this.element.is(":focus")&&i.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":"_activateItem","mousemove .ui-menu-item":"_activateItem",mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this._menuItems().first();e||this.focus(t,i)},blur:function(t){this._delay(function(){!r.contains(this.element[0],this.document[0].activeElement)&&this.collapseAll(t)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t,!0),this.mouseHandled=!1}})},_activateItem:function(t){if(!this.previousFilter&&(t.clientX!==this.lastMousePosition.x||t.clientY!==this.lastMousePosition.y)){this.lastMousePosition={x:t.clientX,y:t.clientY};var e=r(t.target).closest(".ui-menu-item"),i=r(t.currentTarget);e[0]===i[0]&&(i.is(".ui-state-active")||(this._removeClass(i.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(t,i)))}},_destroy:function(){var t=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),t.children().each(function(){var t=r(this);t.data("ui-menu-submenu-caret")&&t.remove()})},_keydown:function(t){var e,i,s,n,o=!0;switch(t.keyCode){case r.ui.keyCode.PAGE_UP:this.previousPage(t);break;case r.ui.keyCode.PAGE_DOWN:this.nextPage(t);break;case r.ui.keyCode.HOME:this._move("first","first",t);break;case r.ui.keyCode.END:this._move("last","last",t);break;case r.ui.keyCode.UP:this.previous(t);break;case r.ui.keyCode.DOWN:this.next(t);break;case r.ui.keyCode.LEFT:this.collapse(t);break;case r.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(t);break;case r.ui.keyCode.ENTER:case r.ui.keyCode.SPACE:this._activate(t);break;case r.ui.keyCode.ESCAPE:this.collapse(t);break;default:o=!1,i=this.previousFilter||"",n=!1,s=96<=t.keyCode&&t.keyCode<=105?(t.keyCode-96).toString():String.fromCharCode(t.keyCode),clearTimeout(this.filterTimer),s===i?n=!0:s=i+s,e=this._filterMenuItems(s),(e=n&&-1!==e.index(this.active.next())?this.active.nextAll(".ui-menu-item"):e).length||(s=String.fromCharCode(t.keyCode),e=this._filterMenuItems(s)),e.length?(this.focus(t,e),this.previousFilter=s,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}o&&t.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var t,e,i,s,n=this,o=this.options.icons.submenu,a=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),e=a.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var t=r(this),e=t.prev(),i=r("<span>").data("ui-menu-submenu-caret",!0);n._addClass(i,"ui-menu-icon","ui-icon "+o),e.attr("aria-haspopup","true").prepend(i),t.attr("aria-labelledby",e.attr("id"))}),this._addClass(e,"ui-menu","ui-widget ui-widget-content ui-front"),(t=a.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var t=r(this);n._isDivider(t)&&n._addClass(t,"ui-menu-divider","ui-widget-content")}),s=(i=t.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(i,"ui-menu-item")._addClass(s,"ui-menu-item-wrapper"),t.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!r.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",String(t)),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(i=e.children(".ui-menu")).length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(t){var e,i,s,n,o,a;this._hasScroll()&&(e=parseFloat(r.css(this.activeMenu[0],"borderTopWidth"))||0,i=parseFloat(r.css(this.activeMenu[0],"paddingTop"))||0,s=t.offset().top-this.activeMenu.offset().top-e-i,n=this.activeMenu.scrollTop(),o=this.activeMenu.height(),a=t.outerHeight(),s<0?this.activeMenu.scrollTop(n+s):o<s+a&&this.activeMenu.scrollTop(n+s-o+a))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(t){var e=r.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(t.parents(".ui-menu")).hide().attr("aria-hidden","true"),t.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(e)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var t=i?this.element:r(e&&e.target).closest(this.element.find(".ui-menu"));t.length||(t=this.element),this._close(t),this.blur(e),this._removeClass(t.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=t},i?0:this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","fal
11se")},_closeOnDocumentClick:function(t){return!r(t.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this._menuItems(this.active.children(".ui-menu")).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_menuItems:function(t){return(t||this.element).find(this.options.items).filter(".ui-menu-item")},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").last():this.active[t+"All"](".ui-menu-item").first()),s&&s.length&&this.active||(s=this._menuItems(this.activeMenu)[e]()),this.focus(i,s)},nextPage:function(t){var e,i,s;this.active?this.isLastItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===r.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.nextAll(".ui-menu-item").each(function(){return(e=r(this)).offset().top-i-s<0}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu)[this.active?"last":"first"]())):this.next(t)},previousPage:function(t){var e,i,s;this.active?this.isFirstItem()||(this._hasScroll()?(i=this.active.offset().top,s=this.element.innerHeight(),0===r.fn.jquery.indexOf("3.2.")&&(s+=this.element[0].offsetHeight-this.element.outerHeight()),this.active.prevAll(".ui-menu-item").each(function(){return 0<(e=r(this)).offset().top-i+s}),this.focus(t,e)):this.focus(t,this._menuItems(this.activeMenu).first())):this.next(t)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(t){this.active=this.active||r(t.target).closest(".ui-menu-item");var e={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(t,!0),this._trigger("select",t,e)},_filterMenuItems:function(t){var e=t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),i=new RegExp("^"+e,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return i.test(String.prototype.trim.call(r(this).children(".ui-menu-item-wrapper").text()))})}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/autocomplete.js",["jquery","./menu","../keycode","../position","../version","../widget"],t):t(jQuery)}(function(a){"use strict";return a.widget("ui.autocomplete",{version:"1.14.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,liveRegionTimer:null,_create:function(){var i,s,n,t=this.element[0].nodeName.toLowerCase(),e="textarea"===t,o="input"===t;this.isMultiLine=e||!o&&"true"===this.element.prop("contentEditable"),this.valueMethod=this.element[e||o?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(t){if(this.element.prop("readOnly"))s=n=i=!0;else{s=n=i=!1;var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:i=!0,this._move("previousPage",t);break;case e.PAGE_DOWN:i=!0,this._move("nextPage",t);break;case e.UP:i=!0,this._keyEvent("previous",t);break;case e.DOWN:i=!0,this._keyEvent("next",t);break;case e.ENTER:this.menu.active&&(i=!0,t.preventDefault(),this.menu.select(t));break;case e.TAB:this.menu.active&&this.menu.select(t);break;case e.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(t),t.preventDefault());break;default:s=!0,this._searchTimeout(t)}}},keypress:function(t){if(i)return i=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||t.preventDefault());if(!s){var e=a.ui.keyCode;switch(t.keyCode){case e.PAGE_UP:this._move("previousPage",t);break;case e.PAGE_DOWN:this._move("nextPage",t);break;case e.UP:this._keyEvent("previous",t);break;case e.DOWN:this._keyEvent("next",t)}}},input:function(t){if(n)return n=!1,void t.preventDefault();this._searchTimeout(t)},focus:function(){this.selectedItem=null,this.previous=this._value(
vendor: 12,304 bytes, line 11
11)},blur:function(t){clearTimeout(this.searching),this.close(t),this._change(t)}}),this._initSource(),this.menu=a("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(t){t.preventDefault()},menufocus:function(t,e){var i,s;if(this.isNewMenu&&(this.isNewMenu=!1,t.originalEvent&&/^mouse/.test(t.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){a(t.target).trigger(t.originalEvent)});s=e.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",t,{item:s})&&t.originalEvent&&/^key/.test(t.originalEvent.type)&&this._value(s.value),(i=e.item.attr("aria-label")||s.value)&&String.prototype.trim.call(i).length&&(clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(a("<div>").text(i))},100))},menuselect:function(t,e){var i=e.item.data("ui-autocomplete-item"),s=this.previous;this.element[0]!==this.document[0].activeElement&&(this.element.trigger("focus"),this.previous=s),!1!==this._trigger("select",t,{item:i})&&this._value(i.value),this.term=this._value(),this.close(t),this.selectedItem=i}}),this.liveRegion=a("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(t){var e=this.menu.element[0];return t.target===this.element[0]||t.target===e||a.contains(e,t.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var t=this.options.appendTo;return t&&(t=t.jquery||t.nodeType?a(t):this.document.find(t).eq(0)),t&&t[0]||(t=this.element.closest(".ui-front, dialog")),t.length||(t=this.document[0].body),t},_initSource:function(){var i,s,n=this;Array.isArray(this.options.source)?(i=this.options.source,this.source=function(t,e){e(a.ui.autocomplete.filter(i,t.term))}):"string"==typeof this.options.source?(s=this.options.source,this.source=function(t,e){n.xhr&&n.xhr.abort(),n.xhr=a.ajax({url:s,data:t,dataType:"json",success:function(t){e(t)},error:function(){e([])}})}):this.source=this.options.source},_searchTimeout:function(s){clearTimeout(this.searching),this.searching=this._delay(function(){var t=this.term===this._value(),e=this.menu.element.is(":visible"),i=s.altKey||s.ctrlKey||s.metaKey||s.shiftKey;t&&(!t||e||i)||(this.selectedItem=null,this.search(null,s))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length<this.options.minLength?this.close(e):!1!==this._trigger("search",e)?this._search(t):void 0},_search:function(t){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:t},this._response())},_response:function(){var e=++this.requestIndex;return function(t){e===this.requestIndex&&this.__response(t),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")}.bind(this)},__response:function(t){t&&(t=this._normalize(t)),this._trigger("response",null,{content:t}),!this.options.disabled&&t&&t.length&&!this.cancelSearch?(this._suggest(t),this._trigger("open")):this._close()},close:function(t){this.cancelSearch=!0,this._close(t)},_close:function(t){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",t))},_change:function(t){this.previous!==this._value()&&this._trigger("change",t,{item:this.selectedItem})},_normalize:function(t){return t.length&&t[0].label&&t[0].value?t:a.map(t,function(t){return"string"==typeof t?{label:t,value:t}:a.extend({},t,{label:t.label||t.value,value:t.value||t.label})})},_suggest:function(t){var e=this.menu.element.empty();this._renderMenu(e,t),this.isNewMenu=!0,this.menu.refresh(),e.show(),this._resizeMenu(),e.position(a.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var t=this.menu.element;t.outerWidth(Math.max(t.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(i,t){var s=this;a.each(t,function(t,e){s._renderItemData(i,e)})},_renderItemData:function(t,e){return this._renderItem(t,e).data("ui-autocomplete-item",e)},_renderItem:function(t,e){return a("<li>").append(a("<div>").text(e.label)).appendTo(t)},_move:function(t,e){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[t](e);this.search(null,e)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(t,e),e.preventDefault())}}),a.extend(a.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(t,e){var i=new RegExp(a.ui.autocomplete.escapeRegex(e),"i");return a.grep(t,function(t){return i.test(t.label||t.value||t)})}}),a.widget("ui.autocomplete",a.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(1<t?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(t){var e;this._superApply(arguments),this.options.disabled||this.cancelSearch||(e=t&&t.length?this.options.messages.results(t.length):this.options.messages.noResults,clearTimeout(this.liveRegionTimer),this.liveRegionTimer=this._delay(function(){this.liveRegion.html(a("<div>").text(e))},100))}}),a.ui.autocomplete}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/controlgroup.js",["jquery","../widget"],t):t(jQuery)}(function(l){"use strict";var o=/ui-corner-([a-z]){2,6}/g;return l.widget("ui.controlgroup",{version:"1.14.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var a=this,r=[];l.each(this.options.items,function(n,t){var e,o={};if(t)return"controlgroupLabel"===n?((e=a.element.find(t)).each(function(){var t=l(this);t.children(".ui-controlgroup-label-contents").length||t.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),a._addClass(e,null,"ui-widget ui-widget-content ui-state-default"),void(r=r.concat(e.get()))):void(l.fn[n]&&(o=a["_"+n+"Options"]?a["_"+n+"Options"]("middle"):{classes:{}},a.element.find(t).each(function(){var t=l(this),e=t[n]("instance"),i=l.widget.extend({},o);if("button"!==n||!t.parent(".ui-spinner").length){e||(e=t[n]()[n]("instance")),e&&(i.classes=a._resolveClassesValues(i.classes,e)),t[n](i);var s=t[n]("widget");l.data(s[0],"ui-controlgroup-data",e||t[n]("instance")),r.push(s[0])}})))}),this.childWidgets=l(l.uniqueSort(r)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(e){this.childWidgets.each(function(){var t=l(this).data("ui-controlgroup-data");t&&t[e]&&t[e]()})},_updateCornerClass:function(t,e){var i=this._buildSimpleOptions(e,"label").classes.label;this._removeClass(t,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(t,null,i)},_buildSimpleOptions:function(t,e){var i="vertical"===this.options.direction,s={classes:{}};return s.classes[e]={middle:"",first:"ui-corner-"+(i?"top":"left"),last:"ui-corner-"+(i?"bottom":"right"),only:"ui-corner-all"}[t],s},_spinnerOptions:function(t){var e=this._buildSimpleOptions(t,"ui-spinner");return e.classes["ui-spinner-up"]="",e.classes["ui-spinner-down"]="",e},_buttonOptions:function(t){return this._buildSimpleOptions(t,"ui-button")},_checkboxradioOptions:function(t){return this._buildSimpleOptions(t,"ui-checkboxradio-label")},_selectmenuOptions:function(t){var e="vertical"===this.options.direction;return{width:!!e&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(e?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(e?"top":"left")},last:{"ui-selectmenu-button-open":e?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(e?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[t]}},_resolveClassesValues:function(i,s){var n={};return l.each(i,function(t){var e=s.options.classes[t]||"";e=String.prototype.trim.call(e.replace(o,"")),n[t]=(e+" "+i[t]).replace(/\s+/g," ")}),n},_setOption:function(t,e){"direction"===t&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(t,e),"disabled"!==t?this.refresh():this._callChildMethod(e?"disable":"enable")},refresh:function(){var n,o=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),n=this.childWidgets,this.options.onlyVisible&&(n=n.filter(":visible")),n.length&&(l.each(["first","last"],function(t,e){var i=n[e]().data("ui-controlgroup-data");if(i&&o["_"+i.widgetName+"Options"]){var s=o["_"+i.widgetName+"Options"](1===n.length?"only":e);s.classes=o._resolveClassesValues(s.classes,i),i.element[i.widgetName](s)}else o._updateCornerClass(n[e](),e)}),this._callChildMethod("refresh"))}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/checkboxradio.js",["jquery","../form-reset-mixin","../labels","../widget"],t):t(jQuery)}(function(n){"use strict";return n.widget("ui.checkboxradio",[n.ui.formResetMixin,{version:"1.14.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var t,e,i,s=this._super()||{};return this._readType(),e=this.element.labels(),this.label=n(e[e.length-1]),this.label.length||n.error("No label found for checkboxradio widget"),this.originalLabel="",(i=this.label.contents().not(this.element[0])).length&&(this.originalLabel+=i.clone().wrapAll("<div></div>").parent().html()),this.originalLabel&&(s.label=this.originalLabel),null!=(t=this.element[0].disabled)&&(s.disabled=t),s},_create:function(){var t=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),t&&this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var t=this.element[0].nodeName.toLowerCase();
vendor: 1,428 bytes, line 11
11this.type=this.element[0].type,"input"===t&&/radio|checkbox/.test(this.type)||n.error("Can't create checkboxradio on element.nodeName="+t+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var t=this.element[0].name,e="input[name='"+CSS.escape(t)+"']";return t?(this.form.length?n(this.form[0].elements).filter(e):n(e).filter(function(){return 0===n(n(this).prop("form")).length})).not(this.element):n([])},_toggleClasses:function(){var t=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",t)._toggleClass(this.icon,null,"ui-icon-blank",!t),"radio"===this.type&&this._getRadioGroup().each(function(){var t=n(this).checkboxradio("instance");t&&t._removeClass(t.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(t,e){if("label"!==t||e){if(this._super(t,e),"disabled"===t)return this._toggleClass(this.label,null,"ui-state-disabled",e),void(this.element[0].disabled=e);this.refresh()}},_updateIcon:function(t){var e="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=n("<span>"),this.iconSpace=n("<span> </span>
11"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(e+=t?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,t?"ui-icon-blank":"ui-icon-check")):e+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",e),t||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var t=this.label.contents().not(this.element[0]);this.icon&&(t=t.not(this.icon[0])),this.iconSpace&&(t=t.not(this.iconSpace[0])),t.remove(),this.label.append(this.options.label)},refresh:function(){var t=this.element[0].checked,e=this.element[0].disabled;this._updateIcon(t),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",t),null!==this.options.label&&this._updateLabel(),e!==this.options.disabled&&this._setOptions({disabled:e})}}]),n.ui.checkboxradio}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/button",["jquery","./controlgroup","./checkboxradio","../keycode","../widget"],t):t(jQuery)}(function(r){"use strict";var s;return r.widget("ui.button",{version:"1.14.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var t,e=this._super()||{};return this.isInput=this.element.is("input"),null!=(t=this.element[0].disabled)&&(e.disabled=t),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(e.label=this.originalLabel),e},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(t){t.keyCode===r.ui.keyCode.SPACE&&(t.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(t,e){var i="iconPosition"!==t,s=i?this.options.iconPosition:e,n="top"===s||"bottom"===s;this.icon?i&&this._removeClass(this.icon,null,this.options.icon):(this.icon=r("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),i&&this._addClass(this.icon,null,e),this._attachIcon(s),n?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconS
vendor: 10,074 bytes, line 11
11pace||(this.iconSpace=r("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(s))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(t){this.icon[/^(?:end|bottom)/.test(t)?"before":"after"](this.iconSpace)},_attachIcon:function(t){this.element[/^(?:end|bottom)/.test(t)?"append":"prepend"](this.icon)},_setOptions:function(t){var e=void 0===t.showLabel?this.options.showLabel:t.showLabel,i=void 0===t.icon?this.options.icon:t.icon;e||i||(t.showLabel=!0),this._super(t)},_setOption:function(t,e){"icon"===t&&(e?this._updateIcon(t,e):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===t&&this._updateIcon(t,e),"showLabel"===t&&(this._toggleClass("ui-button-icon-only",null,!e),this._updateTooltip()),"label"===t&&(this.isInput?this.element.val(e):(this.element.html(e),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(t,e),"disabled"===t&&(this._toggleClass(null,"ui-state-disabled",e),(this.element[0].disabled=e)&&this.element.trigger("blur"))},refresh:function(){var t=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");t!==this.options.disabled&&this._setOptions({disabled:t}),this._updateTooltip()}}),!0===r.uiBackCompat&&(r.widget("ui.button",r.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(t,e){"text"!==t?("showLabel"===t&&(this.options.text=e),"icon"===t&&(this.options.icons.primary=e),"icons"===t&&(e.primary?(this._super("icon",e.primary),this._super("iconPosition","beginning")):e.secondary&&(this._super("icon",e.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",e)}}),r.fn.button=(s=r.fn.button,function(n){var t="string"==typeof n,o=Array.prototype.slice.call(arguments,1),a=this;return t?this.length||"instance"!==n?this.each(function(){var t,e=r(this).attr("type"),i="checkbox"!==e&&"radio"!==e?"button":"checkboxradio",s=r.data(this,"ui-"+i);return"instance"===n?(a=s,!1):s?"function"!=typeof s[n]||"_"===n.charAt(0)?r.error("no such method '"+n+"' for button widget instance"):(t=s[n].apply(s,o))!==s&&void 0!==t?(a=t&&t.jquery?a.pushStack(t.get()):t,!1):void 0:r.error("cannot call methods on button prior to initialization; attempted to call method '"+n+"'")}):a=void 0:(o.length&&(n=r.widget.extend.apply(null,[n].concat(o))),this.each(function(){var t=r(this).attr("type"),e="checkbox"!==t&&"radio"!==t?"button":"checkboxradio",i=r.data(this,"ui-"+e);if(i)i.option(n||{}),i._init&&i._init();else{if("button"===e)return void s.call(r(this),n);r(this).checkboxradio(r.extend({icon:!1},n))}})),a}),r.fn.buttonset=function(){return r.ui.controlgroup||r.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))}),r.ui.button}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/datepicker.js",["jquery","../version","../keycode"],t):t(jQuery)}(function(et){"use strict";var a;function t(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:"",selectMonthLabel:"Select month",selectYearLabel:"Select year"},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,onUpdateDatepicker:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},et.extend(this._defaults,this.regional[""]),this.regional.en=et.extend(!0,{},this.regional[""]),this.regional["en-US"]=et.extend(!0,{},this.regional.en),this.dpDiv=i(et("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function i(t){var e="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return t.on("mouseout",e,function(){et(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&et(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&et(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",e,r)}function r(){et.datepicker._isDisabledDatepicker(a.inline?a.dpDiv.parent()[0]:a.input[0])||(et(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),et(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&et(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&et(this).addClass("ui-datepicker-next-hover"))}function c(t,e){for(var i in et.extend(t,e),e)null==e[i]&&(t[i]=e[i]);return t}return et.extend(et.ui,{datepicker:{version:"1.14.1"}}),et.extend(t.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(t){return c(this._defaults,t||{}),this},_attachDatepicker:function(t,e){var i,s,n;s="div"===(i=t.nodeName.toLowerCase())||"span"===i,t.id||(this.uuid+=1,t.id="dp"+this.uuid),(n=this._newInst(et(t),s)).settings=et.extend({},e||{}),"input"===i?this._connectDatepicker(t,n):s&&this._inlineDatepicker(t,n)},_newInst:function(t,e){return{id:t[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:t,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:e,dpDiv:e?i(et("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(t,e){var i=et(t);e.append=et([]),e.trigger=et([]),i.hasClass(this.markerClassName)||(this._attachments(i,e),i.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(e),et.data(t,"datepicker",e),e.settings.disabled&&this._disableDatepicker(t))},_attachments:function(t,e){var i,s,n,o=this._get(e,"appendText"),a=this._get(e,"isRTL");e.append&&e.append.remove(),o&&(e.append=et("<span>").addClass(this._appendClass).text(o),t[a?"before":"after"](e.append)),t.off("focus",this._showDatepicker),e.trigger&&e.trigger.remove(),"focus"!==(i=this._get(e,"showOn"))&&"both"!==i||t.on("focus",this._showDatepicker),"button"!==i&&"both"!==i||(s=this._get(e,"buttonText"),n=this._get(e,"buttonImage"),this._get(e,"buttonImageOnly")?e.trigger=et("<img>").addClass(this._triggerClass).attr({src:n,alt:s,title:s}):(e.trigger=et("<button type='button'>").addClass(this._triggerClass),n?e.trigger.html(et("<img>").attr({src:n,alt:s,title:s})):e.trigger.text(s)),t[a?"before":"after"](e.trigger),e.trigger.on("click",function(){return et.datepicker._datepickerShowing&&et.datepicker._lastInput===t[0]?et.datepicker._hideDatepicker():(et.datepicker._datepickerShowing&&et.datepicker._lastInput!==t[0]&&et.datepicker._hideDatepicker(),et.datepicker._showDatepicker(t[0])),!1}))},_autoSize:function(t){if(this._get(t,"autoSize")&&!t.inline){var e,i,s,n,o=new Date(2009,11,20),a=this._get(t,"dateFormat");a.match(/[DM]/)&&(e=function(t){for(n=s=i=0;n<t.length;n++)t[n].length>i&&(i=t[n].length,s=n);return s},o.setMonth(e(this._get(t,a.match(/MM/)?"monthNames":"monthNamesShort"))),o.setDate(e(this._get(t,a.match(/DD/)?"dayNames":"dayNamesShort"))+20-o.getDay())),t.input.attr("size",this._formatDate(t,o).length)}},_inlineDatepicker:function(t,e){var i=et(t);i.hasClass(this.markerClassName)||(i.addClass(this.markerClassName).append(e.dpDiv),et.data(t,"datepicker",e),this._setDate(e,this._getDefaultDate(e),!0),this._updateDatepicker(e),this._updateAlternate(e),e.settings.disabled&&this._disableDatepicker(t),e.dpDiv.css("display","block"))}
vendor: 9,367 bytes, line 11
11,_dialogDatepicker:function(t,e,i,s,n){var o,a,r,l,h,u=this._dialogInst;return u||(this.uuid+=1,o="dp"+this.uuid,this._dialogInput=et("<input type='text' id='"+o+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),et("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},et.data(this._dialogInput[0],"datepicker",u)),c(u.settings,s||{}),e=e&&e.constructor===Date?this._formatDate(u,e):e,this._dialogInput.val(e),this._pos=n?n.length?n:[n.pageX,n.pageY]:null,this._pos||(a=document.documentElement.clientWidth,r=document.documentElement.clientHeight,l=document.documentElement.scrollLeft||document.body.scrollLeft,h=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[a/2-100+l,r/2-150+h]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=i,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),et.blockUI&&et.blockUI(this.dpDiv),et.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(t){var e,i=et(t),s=et.data(t,"datepicker");i.hasClass(this.markerClassName)&&(e=t.nodeName.toLowerCase(),et.removeData(t,"datepicker"),"input"===e?(s.append.remove(),s.trigger.remove(),i.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==e&&"span"!==e||i.removeClass(this.markerClassName).empty(),et.datepicker._hideDatepicker(),a===s&&(a=null,this._curInst=null))},_enableDatepicker:function(e){var t,i,s=et(e),n=et.data(e,"datepicker");s.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!1,n.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==t&&"span"!==t||((i=s.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=et.map(this._disabledInputs,function(t){return t===e?null:t}))},_disableDatepicker:function(e){var t,i,s=et(e),n=et.data(e,"datepicker");s.hasClass(this.markerClassName)&&("input"===(t=e.nodeName.toLowerCase())?(e.disabled=!0,n.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==t&&"span"!==t||((i=s.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),i.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=et.map(this._disabledInputs,function(t){return t===e?null:t}),this._disabledInputs[this._disabledInputs.length]=e)},_isDisabledDatepicker:function(t){if(!t)return!1;for(var e=0;e<this._disabledInputs.length;e++)if(this._disabledInputs[e]===t)return!0;return!1},_getInst:function(t){try{return et.data(t,"datepicker")}catch(t){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(t,e,i){var s,n,o,a,r=this._getInst(t);if(2===arguments.length&&"string"==typeof e)return"defaults"===e?et.extend({},et.datepicker._defaults):r?"all"===e?et.extend({},r.settings):this._get(r,e):null;s=e||{},"string"==typeof e&&((s={})[e]=i),r&&(this._curInst===r&&this._hideDatepicker(),n=this._getDateDatepicker(t,!0),o=this._getMinMaxDate(r,"min"),a=this._getMinMaxDate(r,"max"),c(r.settings,s),null!==o&&void 0!==s.dateFormat&&void 0===s.minDate&&(r.settings.minDate=this._formatDate(r,o)),null!==a&&void 0!==s.dateFormat&&void 0===s.maxDate&&(r.settings.maxDate=this._formatDate(r,a)),"disabled"in s&&(s.disabled?this._disableDatepicker(t):this._enableDatepicker(t)),this._attachments(et(t),r),this._autoSize(r),this._setDate(r,n),this._updateAlternate(r),this._updateDatepicker(r))},_changeDatepicker:function(t,e,i){this._optionDatepicker(t,e,i)},_refreshDatepicker:function(t){var e=this._getInst(t);e&&this._updateDatepicker(e)},_setDateDatepicker:function(t,e){var i=this._getInst(t);i&&(this._setDate(i,e),this._updateDatepicker(i),this._updateAlternate(i))},_getDateDatepicker:function(t,e){var i=this._getInst(t);return i&&!i.inline&&this._setDateFromField(i,e),i?this._getDate(i):null},_doKeyDown:function(t){var e,i,s,n=et.datepicker._getInst(t.target),o=!0,a=n.dpDiv.is(".ui-datepicker-rtl");if(n._keyEvent=!0,et.datepicker._datepickerShowing)switch(t.keyCode){case 9:et.datepicker._hideDatepicker(),o=!1;break;case 13:return(s=et("td."+et.datepicker._dayOverClass+":not(."+et.datepicker._currentClass+")",n.dpDiv))[0]&&et.datepicker._selectDay(t.target,n.selectedMonth,n.selectedYear,s[0]),(e=et.datepicker._get(n,"onSelect"))?(i=et.datepicker._formatDate(n),e.apply(n.input?n.input[0]:null,[i,n])):et.datepicker._hideDatepicker(),!1;case 27:et.datepicker._hideDatepicker();break;case 33:et.datepicker._adjustDate(t.target,t.ctrlKey?-et.datepicker._get(n,"stepBigMonths"):-et.datepicker._get(n,"stepMonths"),"M");break;case 34:et.datepicker._adjustDate(t.target,t.ctrlKey?+et.datepicker._get(n,"stepBigMonths"):+et.datepicker._get(n,"stepMonths"),"M");break;case 35:(t.ctrlKey||t.metaKey)&&et.datepicker._clearDate(t.target),o=t.ctrlKey||t.metaKey;break;case 36:(t.ctrlKey||t.metaKey)&&et.datepicker._gotoToday(t.target),o=t.ctrlKey||t.metaKey;break;case 37:(t.ctrlKey||t.metaKey)&&et.datepicker._adjustDate(t.target,a?1:-1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&et.datepicker._adjustDate(t.target,t.ctrlKey?-et.datepicker._get(n,"stepBigMonths"):-et.datepicker._get(n,"stepMonths"),"M");break;case 38:(t.ctrlKey||t.metaKey)&&et.datepicker._adjustDate(t.target,-7,"D"),o=t.ctrlKey||t.metaKey;break;case 39:(t.ctrlKey||t.metaKey)&&et.datepicker._adjustDate(t.target,a?-1:1,"D"),o=t.ctrlKey||t.metaKey,t.originalEvent.altKey&&et.datepicker._adjustDate(t.target,t.ctrlKey?+et.datepicker._get(n,"stepBigMonths"):+et.datepicker._get(n,"stepMonths"),"M");break;case 40:(t.ctrlKey||t.metaKey)&&et.datepicker._adjustDate(t.target,7,"D"),o=t.ctrlKey||t.metaKey;break;default:o=!1}else 36===t.keyCode&&t.ctrlKey?et.datepicker._showDatepicker(this):o=!1;o&&(t.preventDefault(),t.stopPropagation())},_doKeyPress:function(t){var e,i,s=et.datepicker._getInst(t.target);if(et.datepicker._get(s,"constrainInput"))return e=et.datepicker._possibleChars(et.datepicker._get(s,"dateFormat")),i=String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),t.ctrlKey||t.metaKey||i<" "||!e||-1<e.indexOf(i)},_doKeyUp:function(t){var e=et.datepicker._getInst(t.target);if(e.input.val()!==e.lastVal)try{et.datepicker.parseDate(et.datepicker._get(e,"dateFormat"),e.input?e.input.val():null,et.datepicker._getFormatConfig(e))&&(et.datepicker._setDateFromField(e),et.datepicker._updateAlternate(e),et.datepicker._updateDatepicker(e))}catch(t){}return!0},_showDatepicker:function(t){var e,i,s,n,o,a,r;"input"!==(t=t.target||t).nodeName.toLowerCase()&&(t=et("input",t.parentNode)[0]),et.datepicker._isDisabledDatepicker(t)||et.datepicker._lastInput===t||(e=et.datepicker._getInst(t),et.datepicker._curInst&&et.datepicker._curInst!==e&&(et.datepicker._curInst.dpDiv.stop(!0,!0),e&&et.datepicker._datepickerShowing&&et.datepicker._hideDatepicker(et.datepicker._curInst.input[0])),!1!==(s=(i=et.datepicker._get(e,"beforeShow"))?i.apply(t,[t,e]):{})&&(c(e.settings,s),e.lastVal=null,et.datepicker._lastInput=t,et.datepicker._setDateFromField(e),et.datepicker._inDialog&&(t.value=""),et.datepicker._pos||(et.datepicker._pos=et.datepicker._findPos(t),et.datepicker._pos[1]+=t.offsetHeight),n=!1,et(t).parents().each(function(){return!(n|="fixed"===et(this).css("position"))}),o={left:et.datepicker._pos[0],top:et.datepicker._pos[1]},et.datepicker._pos=null,e.dpDiv.empty(),e.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),et.datepicker._updateDatepicker(e),o=et.datepicker._checkOffset(e,o,n),e.dpDiv.css({position:et.datepicker._inDialog&&et.blockUI?"static":n?"fixed":"absolute",display:"none",left:o.left+"px",top:o.top+"px"}),e.inline||(a=et.datepicker._get(e,"showAnim"),r=et.datepicker._get(e,"duration"),e.dpDiv.css("z-index",function(t){for(var e,i;t.length&&t[0]!==document;){if(("absolute"===(e=t.css("position"))||"relative"===e||"fixed"===e)&&(i=parseInt(t.css("zIndex"),10),!isNaN(i)&&0!==i))return i;t=t.parent()}return 0}(et(t))+1),et.datepicker._datepickerShowing=!0,et.effects&&et.effects.effect[a]?e.dpDiv.show(a,et.datepicker._get(e,"showOptions"),r):e.dpDiv[a||"show"](a?r:null),et.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),et.datepicker._curInst=e)))},_updateDatepicker:function(t){this.maxRows=4,(a=t).dpDiv.empty().append(this._generateHTML(t)),this._attachHandlers(t);var e,i=this._getNumberOfMonths(t),s=i[1],n=t.dpDiv.find("."+this._dayOverClass+" a"),o=et.datepicker._get(t,"onUpdateDatepicker");0<n.length&&r.apply(n.get(0)),t.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<s&&t.dpDiv.addClass("ui-datepicker-multi-"+s).css("width",17*s+"em"),t.dpDiv[(1!==i[0]||1!==i[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),t.dpDiv[(this._get(t,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),t===et.datepicker._curInst&&et.datepicker._datepickerShowing&&et.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),t.yearshtml&&(e=t.yearshtml,setTimeout(function(){e===t.yearshtml&&t.yearshtml&&t.dpDiv.f
vendor: 9,920 bytes, line 11
11ind("select.ui-datepicker-year").first().replaceWith(t.yearshtml),e=t.yearshtml=null},0)),o&&o.apply(t.input?t.input[0]:null,[t])},_shouldFocusInput:function(t){return t.input&&t.input.is(":visible")&&!t.input.is(":disabled")},_checkOffset:function(t,e,i){var s=t.dpDiv.outerWidth(),n=t.dpDiv.outerHeight(),o=t.input?t.input.outerWidth():0,a=t.input?t.input.outerHeight():0,r=document.documentElement.clientWidth+(i?0:et(document).scrollLeft()),l=document.documentElement.clientHeight+(i?0:et(document).scrollTop());return e.left-=this._get(t,"isRTL")?s-o:0,e.left-=i&&e.left===t.input.offset().left?et(document).scrollLeft():0,e.top-=i&&e.top===t.input.offset().top+a?et(document).scrollTop():0,e.left-=Math.min(e.left,e.left+s>r&&s<r?Math.abs(e.left+s-r):0),e.top-=Math.min(e.top,e.top+n>l&&n<l?Math.abs(n+a):0),e},_findPos:function(t){for(var e,i=this._getInst(t),s=this._get(i,"isRTL");t&&("hidden"===t.type||1!==t.nodeType||et.expr.pseudos.hidden(t));)t=t[s?"previousSibling":"nextSibling"];return[(e=et(t).offset()).left,e.top]},_hideDatepicker:function(t){var e,i,s,n,o=this._curInst;!o||t&&o!==et.data(t,"datepicker")||this._datepickerShowing&&(e=this._get(o,"showAnim"),i=this._get(o,"duration"),s=function(){et.datepicker._tidyDialog(o)},et.effects&&et.effects.effect[e]?o.dpDiv.hide(e,et.datepicker._get(o,"showOptions"),i,s):o.dpDiv["slideDown"===e?"slideUp":"fadeIn"===e?"fadeOut":"hide"](e?i:null,s),e||s(),this._datepickerShowing=!1,(n=this._get(o,"onClose"))&&n.apply(o.input?o.input[0]:null,[o.input?o.input.val():"",o]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),et.blockUI&&(et.unblockUI(),et("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(t){t.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(t){if(et.datepicker._curInst){var e=et(t.target),i=et.datepicker._getInst(e[0]);(e[0].id===et.datepicker._mainDivId||0!==e.parents("#"+et.datepicker._mainDivId).length||e.hasClass(et.datepicker.markerClassName)||e.closest("."+et.datepicker._triggerClass).length||!et.datepicker._datepickerShowing||et.datepicker._inDialog&&et.blockUI)&&(!e.hasClass(et.datepicker.markerClassName)||et.datepicker._curInst===i)||et.datepicker._hideDatepicker()}},_adjustDate:function(t,e,i){var s=et(t),n=this._getInst(s[0]);this._isDisabledDatepicker(s[0])||(this._adjustInstDate(n,e,i),this._updateDatepicker(n))},_gotoToday:function(t){var e,i=et(t),s=this._getInst(i[0]);this._get(s,"gotoCurrent")&&s.currentDay?(s.selectedDay=s.currentDay,s.drawMonth=s.selectedMonth=s.currentMonth,s.drawYear=s.selectedYear=s.currentYear):(e=new Date,s.selectedDay=e.getDate(),s.drawMonth=s.selectedMonth=e.getMonth(),s.drawYear=s.selectedYear=e.getFullYear()),this._notifyChange(s),this._adjustDate(i)},_selectMonthYear:function(t,e,i){var s=et(t),n=this._getInst(s[0]);n["selected"+("M"===i?"Month":"Year")]=n["draw"+("M"===i?"Month":"Year")]=parseInt(e.options[e.selectedIndex].value,10),this._notifyChange(n),this._adjustDate(s)},_selectDay:function(t,e,i,s){var n,o=et(t);et(s).hasClass(this._unselectableClass)||this._isDisabledDatepicker(o[0])||((n=this._getInst(o[0])).selectedDay=n.currentDay=parseInt(et("a",s).attr("data-date")),n.selectedMonth=n.currentMonth=e,n.selectedYear=n.currentYear=i,this._selectDate(t,this._formatDate(n,n.currentDay,n.currentMonth,n.currentYear)))},_clearDate:function(t){var e=et(t);this._selectDate(e,"")},_selectDate:function(t,e){var i,s=et(t),n=this._getInst(s[0]);e=null!=e?e:this._formatDate(n),n.input&&n.input.val(e),this._updateAlternate(n),(i=this._get(n,"onSelect"))?i.apply(n.input?n.input[0]:null,[e,n]):n.input&&n.input.trigger("change"),n.inline?this._updateDatepicker(n):(this._hideDatepicker(),this._lastInput=n.input[0],"object"!=typeof n.input[0]&&n.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(t){var e,i,s,n=this._get(t,"altField");n&&(e=this._get(t,"altFormat")||this._get(t,"dateFormat"),i=this._getDate(t),s=this.formatDate(e,i,this._getFormatConfig(t)),et(document).find(n).val(s))},noWeekends:function(t){var e=t.getDay();return[0<e&&e<6,""]},iso8601Week:function(t){var e,i=new Date(t.getTime());return i.setDate(i.getDate()+4-(i.getDay()||7)),e=i.getTime(),i.setMonth(0),i.setDate(1),Math.floor(Math.round((e-i)/864e5)/7)+1},parseDate:function(i,o,t){if(null==i||null==o)throw"Invalid arguments";if(""===(o="object"==typeof o?o.toString():o+""))return null;var s,e,n,a,r=0,l=(t?t.shortYearCutoff:null)||this._defaults.shortYearCutoff,h="string"!=typeof l?l:(new Date).getFullYear()%100+parseInt(l,10),u=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,c=(t?t.dayNames:null)||this._defaults.dayNames,d=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,p=(t?t.monthNames:null)||this._defaults.monthNames,f=-1,g=-1,m=-1,_=-1,v=!1,b=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e},y=function(t){var e=b(t),i="@"===t?14:"!"===t?20:"y"===t&&e?4:"o"===t?3:2,s=new RegExp("^\\d{"+("y"===t?i:1)+","+i+"}"),n=o.substring(r).match(s);if(!n)throw"Missing number at position "+r;return r+=n[0].length,parseInt(n[0],10)},w=function(t,e,i){var s=-1,n=et.map(b(t)?i:e,function(t,e){return[[e,t]]}).sort(function(t,e){return-(t[1].length-e[1].length)});if(et.each(n,function(t,e){var i=e[1];if(o.substr(r,i.length).toLowerCase()===i.toLowerCase())return s=e[0],r+=i.length,!1}),-1!==s)return s+1;throw"Unknown name at position "+r},k=function(){if(o.charAt(r)!==i.charAt(s))throw"Unexpected literal at position "+r;r++};for(s=0;s<i.length;s++)if(v)"'"!==i.charAt(s)||b("'")?k():v=!1;else switch(i.charAt(s)){case"d":m=y("d");break;case"D":w("D",u,c);break;case"o":_=y("o");break;case"m":g=y("m");break;case"M":g=w("M",d,p);break;case"y":f=y("y");break;case"@":f=(a=new Date(y("@"))).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"!":f=(a=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),g=a.getMonth()+1,m=a.getDate();break;case"'":b("'")?k():v=!0;break;default:k()}if(r<o.length&&(n=o.substr(r),!/^\s+/.test(n)))throw"Extra/unparsed characters found in date: "+n;if(-1===f?f=(new Date).getFullYear():f<100&&(f+=(new Date).getFullYear()-(new Date).getFullYear()%100+(f<=h?0:-100)),-1<_)for(g=1,m=_;!(m<=(e=this._getDaysInMonth(f,g-1)));)g++,m-=e;if((a=this._daylightSavingAdjust(new Date(f,g-1,m))).getFullYear()!==f||a.getMonth()+1!==g||a.getDate()!==m)throw"Invalid date";return a},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(i,t,e){if(!t)return"";var s,n=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,o=(e?e.dayNames:null)||this._defaults.dayNames,a=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,r=(e?e.monthNames:null)||this._defaults.monthNames,l=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e},h=function(t,e,i){var s=""+e;if(l(t))for(;s.length<i;)s="0"+s;return s},u=function(t,e,i,s){return l(t)?s[e]:i[e]},c="",d=!1;if(t)for(s=0;s<i.length;s++)if(d)"'"!==i.charAt(s)||l("'")?c+=i.charAt(s):d=!1;else switch(i.charAt(s)){case"d":c+=h("d",t.getDate(),2);break;case"D":c+=u("D",t.getDay(),n,o);break;case"o":c+=h("o",Math.round((new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()-new Date(t.getFullYear(),0,0).getTime())/864e5),3);break;case"m":c+=h("m",t.getMonth()+1,2);break;case"M":c+=u("M",t.getMonth(),a,r);break;case"y":c+=l("y")?t.getFullYear():(t.getFullYear()%100<10?"0":"")+t.getFullYear()%100;break;case"@":c+=t.getTime();break;case"!":c+=1e4*t.getTime()+this._ticksTo1970;break;case"'":l("'")?c+="'":d=!0;break;default:c+=i.charAt(s)}return c},_possibleChars:function(i){var s,t="",e=!1,n=function(t){var e=s+1<i.length&&i.charAt(s+1)===t;return e&&s++,e};for(s=0;s<i.length;s++)if(e)"'"!==i.charAt(s)||n("'")?t+=i.charAt(s):e=!1;else switch(i.charAt(s)){case"d":case"m":case"y":case"@":t+="0123456789";break;case"D":case"M":return null;case"'":n("'")?t+="'":e=!0;break;default:t+=i.charAt(s)}return t},_get:function(t,e){return void 0!==t.settings[e]?t.settings[e]:this._defaults[e]},_setDateFromField:function(t,e){if(t.input.val()!==t.lastVal){var i=this._get(t,"dateFormat"),s=t.lastVal=t.input?t.input.val():null,n=this._getDefaultDate(t),o=n,a=this._getFormatConfig(t);try{o=this.parseDate(i,s,a)||n}catch(t){s=e?"":s}t.selectedDay=o.getDate(),t.drawMonth=t.selectedMonth=o.getMonth(),t.drawYear=t.selectedYear=o.getFullYear(),t.currentDay=s?o.getDate():0,t.currentMonth=s?o.getMonth():0,t.currentYear=s?o.getFullYear():0,this._adjustInstDate(t)}},_getDefaultDate:function(t){return this._restrictMinMax(t,this._determineDate(t,this._get(t,"defaultDate"),new Date))},_determineDate:function(r,t,e){var i,s,n=null==t||""===t?e:"string"==typeof t?function(t){try{return et.datepicker.parseDate(et.datepicker._get(r,"dateFormat"),t,et.datepicker._getFormatConfig(r))}catch(t){}for(var e=(t.toLowerCase().match(/^c/)?et.datepicker._getDate(r):null)||new Date,i=e.getFullYear(),s=e.getMonth(),n=e.getDate(),o=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,a=o.exec(t);a;){switch(a[2]||"d"){case"d":case"D":n+=parseInt(a[1],10);break;case"w":case"W":n+=7*parseInt(a[1],10);break;case"m":case"M":s+=parseInt(a[1],10),n=Math.min(n,et.datepicker._getDaysInMonth(i,s));break;case"y":case"Y":i+=parseInt(a[1],10),n=Math.min(n,et.datepicker._getDaysInMonth(i,s))}a=o.exec(t)}return new Date(i,s,n)}(t):"number"==typeof t?isNaN(t)?e:(i=t,(s=new Date).setDate(s.getDate()+i),s):new Date(t.getTime());return(n=n&&"Invalid Date"===n.toString()?e:n)&&(n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0)),this._daylightSavingAdjust(n)},_daylightSavingAdjust:function(t){return t?(t.setHours(12<t.getHours()?t.getHours()+2:0),t):null}
vendor: 8,779 bytes, line 11
11,_setDate:function(t,e,i){var s=!e,n=t.selectedMonth,o=t.selectedYear,a=this._restrictMinMax(t,this._determineDate(t,e,new Date));t.selectedDay=t.currentDay=a.getDate(),t.drawMonth=t.selectedMonth=t.currentMonth=a.getMonth(),t.drawYear=t.selectedYear=t.currentYear=a.getFullYear(),n===t.selectedMonth&&o===t.selectedYear||i||this._notifyChange(t),this._adjustInstDate(t),t.input&&t.input.val(s?"":this._formatDate(t))},_getDate:function(t){return!t.currentYear||t.input&&""===t.input.val()?null:this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay))},_attachHandlers:function(t){var e=this._get(t,"stepMonths"),i="#"+t.id.replace(/\\\\/g,"\\");t.dpDiv.find("[data-handler]").map(function(){var t={prev:function(){et.datepicker._adjustDate(i,-e,"M")},next:function(){et.datepicker._adjustDate(i,+e,"M")},hide:function(){et.datepicker._hideDatepicker()},today:function(){et.datepicker._gotoToday(i)},selectDay:function(){return et.datepicker._selectDay(i,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return et.datepicker._selectMonthYear(i,this,"M"),!1},selectYear:function(){return et.datepicker._selectMonthYear(i,this,"Y"),!1}};et(this).on(this.getAttribute("data-event"),t[this.getAttribute("data-handler")])})},_generateHTML:function(t){var e,i,s,n,o,a,r,l,h,u,c,d,p,f,g,m,_,v,b,y,w,k,D,x,C,M,T,S,z,I,P,E,H,O,N,A,W,j,F,R=new Date,L=this._daylightSavingAdjust(new Date(R.getFullYear(),R.getMonth(),R.getDate())),Y=this._get(t,"isRTL"),q=this._get(t,"showButtonPanel"),B=this._get(t,"hideIfNoPrevNext"),K=this._get(t,"navigationAsDateFormat"),V=this._getNumberOfMonths(t),U=this._get(t,"showCurrentAtPos"),Q=this._get(t,"stepMonths"),X=1!==V[0]||1!==V[1],G=this._daylightSavingAdjust(t.currentDay?new Date(t.currentYear,t.currentMonth,t.currentDay):new Date(9999,9,9)),$=this._getMinMaxDate(t,"min"),J=this._getMinMaxDate(t,"max"),Z=t.drawMonth-U,tt=t.drawYear;if(Z<0&&(Z+=12,tt--),J)for(e=this._daylightSavingAdjust(new Date(J.getFullYear(),J.getMonth()-V[0]*V[1]+1,J.getDate())),e=$&&e<$?$:e;this._daylightSavingAdjust(new Date(tt,Z,1))>e;)--Z<0&&(Z=11,tt--);for(t.drawMonth=Z,t.drawYear=tt,i=this._get(t,"prevText"),i=K?this.formatDate(i,this._daylightSavingAdjust(new Date(tt,Z-Q,1)),this._getFormatConfig(t)):i,s=this._canAdjustMonth(t,-1,tt,Z)?et("<a>").attr({class:"ui-datepicker-prev ui-corner-all","data-handler":"prev","data-event":"click",title:i}).append(et("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")).text(i))[0].outerHTML:B?"":et("<a>").attr({class:"ui-datepicker-prev ui-corner-all ui-state-disabled",title:i}).append(et("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(Y?"e":"w")).text(i))[0].outerHTML,n=this._get(t,"nextText"),n=K?this.formatDate(n,this._daylightSavingAdjust(new Date(tt,Z+Q,1)),this._getFormatConfig(t)):n,o=this._canAdjustMonth(t,1,tt,Z)?et("<a>").attr({class:"ui-datepicker-next ui-corner-all","data-handler":"next","data-event":"click",title:n}).append(et("<span>").addClass("ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")).text(n))[0].outerHTML:B?"":et("<a>").attr({class:"ui-datepicker-next ui-corner-all ui-state-disabled",title:n}).append(et("<span>").attr("class","ui-icon ui-icon-circle-triangle-"+(Y?"w":"e")).text(n))[0].outerHTML,a=this._get(t,"currentText"),r=this._get(t,"gotoCurrent")&&t.currentDay?G:L,a=K?this.formatDate(a,r,this._getFormatConfig(t)):a,l="",t.inline||(l=et("<button>").attr({type:"button",class:"ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all","data-handler":"hide","data-event":"click"}).text(this._get(t,"closeText"))[0].outerHTML),h="",q&&(h=et("<div class='ui-datepicker-buttonpane ui-widget-content'>").append(Y?l:"").append(this._isInRange(t,r)?et("<button>").attr({type:"button",class:"ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all","data-handler":"today","data-event":"click"}).text(a):"").append(Y?"":l)[0].outerHTML),u=parseInt(this._get(t,"firstDay"),10),u=isNaN(u)?0:u,c=this._get(t,"showWeek"),d=this._get(t,"dayNames"),p=this._get(t,"dayNamesMin"),f=this._get(t,"monthNames"),g=this._get(t,"monthNamesShort"),m=this._get(t,"beforeShowDay"),_=this._get(t,"showOtherMonths"),v=this._get(t,"selectOtherMonths"),b=this._getDefaultDate(t),y="",k=0;k<V[0];k++){for(D="",this.maxRows=4,x=0;x<V[1];x++){if(C=this._daylightSavingAdjust(new Date(tt,Z,t.selectedDay)),M=" ui-corner-all",T="",X){if(T+="<div class='ui-datepicker-group",1<V[1])switch(x){case 0:T+=" ui-datepicker-group-first",M=" ui-corner-"+(Y?"right":"left");break;case V[1]-1:T+=" ui-datepicker-group-last",M=" ui-corner-"+(Y?"left":"right");break;default:T+=" ui-datepicker-group-middle",M=""}T+="'>"}for(T+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+M+"'>"+(/all|left/.test(M)&&0===k?Y?o:s:"")+(/all|right/.test(M)&&0===k?Y?s:o:"")+this._generateMonthYearHeader(t,Z,tt,$,J,0<k||0<x,f,g)+"</div><table class='ui-datepicker-calendar'><thead><tr>",S=c?"<th class='ui-datepicker-week-col'>"+this._get(t,"weekHeader")+"</th>":"",w=0;w<7;w++)S+="<th scope='col'"+(5<=(w+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[z=(w+u)%7]+"'>"+p[z]+"</span></th>";for(T+=S+"</tr></thead><tbody>",I=this._getDaysInMonth(tt,Z),tt===t.selectedYear&&Z===t.selectedMonth&&(t.selectedDay=Math.min(t.selectedDay,I)),P=(this._getFirstDayOfMonth(tt,Z)-u+7)%7,E=Math.ceil((P+I)/7),H=X&&this.maxRows>E?this.maxRows:E,this.maxRows=H,O=this._daylightSavingAdjust(new Date(tt,Z,1-P)),N=0;N<H;N++){for(T+="<tr>",A=c?"<td class='ui-datepicker-week-col'>"+this._get(t,"calculateWeek")(O)+"</td>":"",w=0;w<7;w++)W=m?m.apply(t.input?t.input[0]:null,[O]):[!0,""],F=(j=O.getMonth()!==Z)&&!v||!W[0]||$&&O<$||J&&J<O,A+="<td class='"+(5<=(w+u+6)%7?" ui-datepicker-week-end":"")+(j?" ui-datepicker-other-month":"")+(O.getTime()===C.getTime()&&Z===t.selectedMonth&&t._keyEvent||b.getTime()===O.getTime()&&b.getTime()===C.getTime()?" "+this._dayOverClass:"")+(F?" "+this._unselectableClass+" ui-state-disabled":"")+(j&&!_?"":" "+W[1]+(O.getTime()===G.getTime()?" "+this._currentClass:"")+(O.getTime()===L.getTime()?" ui-datepicker-today":""))+"'"+(j&&!_||!W[2]?"":" title='"+W[2].replace(/'/g,"'")+"'")+(F?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(j&&!_?" ":F?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===L.getTime()?" ui-state-highlight":"")+(O.getTime()===G.getTime()?" ui-state-active":"")+(j?" ui-priority-secondary":"")+"' href='#' aria-current='"+(O.getTime()===G.getTime()?"true":"false")+"' data-date='"+O.getDate()+"'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);T+=A+"</tr>"}11<++Z&&(Z=0,tt++),D+=T+="</tbody></table>"+(X?"</div>"+(0<V[0]&&x===V[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=D}return y+=h,t._keyEvent=!1,y},_generateMonthYearHeader:function(t,e,i,s,n,o,a,r){var l,h,u,c,d,p,f,g,m=this._get(t,"changeMonth"),_=this._get(t,"changeYear"),v=this._get(t,"showMonthAfterYear"),b=this._get(t,"selectMonthLabel"),y=this._get(t,"selectYearLabel"),w="<div class='ui-datepicker-title'>",k="";if(o||!m)k+="<span class='ui-datepicker-month'>"+a[e]+"</span>";else{for(l=s&&s.getFullYear()===i,h=n&&n.getFullYear()===i,k+="<select class='ui-datepicker-month' aria-label='"+b+"' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!l||u>=s.getMonth())&&(!h||u<=n.getMonth())&&(k+="<option value='"+u+"'"+(u===e?" selected='selected'":"")+">"+r[u]+"</option>");k+="</select>"}if(v||(w+=k+(!o&&m&&_?"":" ")),!t.yearshtml)if(t.yearshtml="",o||!_)w+="<span class='ui-datepicker-year'>"+i+"</span>";else{for(c=this._get(t,"yearRange").split(":"),d=(new Date).getFullYear(),f=(p=function(t){var e=t.match(/c[+\-].*/)?i+parseInt(t.substring(1),10):t.match(/[+\-].*/)?d+parseInt(t,10):parseInt(t,10);return isNaN(e)?d:e})(c[0]),g=Math.max(f,p(c[1]||"")),f=s?Math.max(f,s.getFullYear()):f,g=n?Math.min(g,n.getFullYear()):g,t.yearshtml+="<select class='ui-datepicker-year' aria-label='"+y+"' data-handler='selectYear' data-event='change'>";f<=g;f++)t.yearshtml+="<option value='"+f+"'"+(f===i?" selected='selected'":"")+">"+f+"</option>";t.yearshtml+="</select>",w+=t.yearshtml,t.yearshtml=null}return w+=this._get(t,"yearSuffix"),v&&(w+=(!o&&m&&_?"":" ")+k),w+"</div>"},_adjustInstDate:function(t,e,i){var s=t.selectedYear+("Y"===i?e:0),n=t.selectedMonth+("M"===i?e:0),o=Math.min(t.selectedDay,this._getDaysInMonth(s,n))+("D"===i?e:0),a=this._restrictMinMax(t,this._daylightSavingAdjust(new Date(s,n,o)));t.selectedDay=a.getDate(),t.drawMonth=t.selectedMonth=a.getMonth(),t.drawYear=t.selectedYear=a.getFullYear(),"M"!==i&&"Y"!==i||this._notifyChange(t)}
vendor: 4,959 bytes, line 11
11,_restrictMinMax:function(t,e){var i=this._getMinMaxDate(t,"min"),s=this._getMinMaxDate(t,"max"),n=i&&e<i?i:e;return s&&s<n?s:n},_notifyChange:function(t){var e=this._get(t,"onChangeMonthYear");e&&e.apply(t.input?t.input[0]:null,[t.selectedYear,t.selectedMonth+1,t])},_getNumberOfMonths:function(t){var e=this._get(t,"numberOfMonths");return null==e?[1,1]:"number"==typeof e?[1,e]:e},_getMinMaxDate:function(t,e){return this._determineDate(t,this._get(t,e+"Date"),null)},_getDaysInMonth:function(t,e){return 32-this._daylightSavingAdjust(new Date(t,e,32)).getDate()},_getFirstDayOfMonth:function(t,e){return new Date(t,e,1).getDay()},_canAdjustMonth:function(t,e,i,s){var n=this._getNumberOfMonths(t),o=this._daylightSavingAdjust(new Date(i,s+(e<0?e:n[0]*n[1]),1));return e<0&&o.setDate(this._getDaysInMonth(o.getFullYear(),o.getMonth())),this._isInRange(t,o)},_isInRange:function(t,e){var i,s,n=this._getMinMaxDate(t,"min"),o=this._getMinMaxDate(t,"max"),a=null,r=null,l=this._get(t,"yearRange");return l&&(i=l.split(":"),s=(new Date).getFullYear(),a=parseInt(i[0],10),r=parseInt(i[1],10),i[0].match(/[+\-].*/)&&(a+=s),i[1].match(/[+\-].*/)&&(r+=s)),(!n||e.getTime()>=n.getTime())&&(!o||e.getTime()<=o.getTime())&&(!a||e.getFullYear()>=a)&&(!r||e.getFullYear()<=r)},_getFormatConfig:function(t){var e=this._get(t,"shortYearCutoff");return{shortYearCutoff:e="string"!=typeof e?e:(new Date).getFullYear()%100+parseInt(e,10),dayNamesShort:this._get(t,"dayNamesShort"),dayNames:this._get(t,"dayNames"),monthNamesShort:this._get(t,"monthNamesShort"),monthNames:this._get(t,"monthNames")}},_formatDate:function(t,e,i,s){e||(t.currentDay=t.selectedDay,t.currentMonth=t.selectedMonth,t.currentYear=t.selectedYear);var n=e?"object"==typeof e?e:this._daylightSavingAdjust(new Date(s,i,e)):this._daylightSavingAdjust(new Date(t.currentYear,t.currentMonth,t.currentDay));return this.formatDate(this._get(t,"dateFormat"),n,this._getFormatConfig(t))}}),et.fn.datepicker=function(t){if(!this.length)return this;et.datepicker.initialized||(et(document).on("mousedown",et.datepicker._checkExternalClick),et.datepicker.initialized=!0),0===et("#"+et.datepicker._mainDivId).length&&et("body").append(et.datepicker.dpDiv);var e=Array.prototype.slice.call(arguments,1);return"string"!=typeof t||"isDisabled"!==t&&"getDate"!==t&&"widget"!==t?"option"===t&&2===arguments.length&&"string"==typeof arguments[1]?et.datepicker["_"+t+"Datepicker"].apply(et.datepicker,[this[0]].concat(e)):this.each(function(){"string"==typeof t?et.datepicker["_"+t+"Datepicker"].apply(et.datepicker,[this].concat(e)):et.datepicker._attachDatepicker(this,t)}):et.datepicker["_"+t+"Datepicker"].apply(et.datepicker,[this[0]].concat(e))},et.datepicker=new t,et.datepicker.initialized=!1,et.datepicker.uuid=(new Date).getTime(),et.datepicker.version="1.14.1",et.datepicker}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/dialog.js",["jquery","./button","./draggable","./mouse","./resizable","../focusable","../keycode","../position","../tabbable","../unique-id","../version","../widget"],t):t(jQuery)}(function(l){"use strict";return l.widget("ui.dialog",{version:"1.14.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(t){var e=l(this).css(t).offset().top;e<0&&l(this).css("top",t.top-e)}},resizable:!0,show:null,title:null,uiDialogTitleHeadingLevel:0,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&l.fn.draggable&&this._makeDraggable(),this.options.resizable&&l.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var t=this.options.appendTo;
vendor: 4,172 bytes, line 11
11return t&&(t.jquery||t.nodeType)?l(t):this.document.find(t||"body").eq(0)},_destroy:function(){var t,e=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(t=e.parent.children().eq(e.index)).length&&t[0]!==this.element[0]?t.before(this.element):e.parent.append(this.element)},widget:function(){return this.uiDialog},disable:l.noop,enable:l.noop,close:function(t){var e=this;this._isOpen&&!1!==this._trigger("beforeClose",t)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||l(this.document[0].activeElement).trigger("blur"),this._hide(this.uiDialog,this.options.hide,function(){e._trigger("close",t)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(t,e){var i=!1,s=this.uiDialog.siblings(".ui-front:visible").map(function(){return+l(this).css("z-index")}).get(),n=Math.max.apply(null,s);return n>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",n+1),i=!0),i&&!e&&this._trigger("focus",t),i},open:function(){var t=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=l(this.document[0].activeElement),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){t._focusTabbable(),t._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var t=this._focusedElement;t||(t=this.element.find("[autofocus]")),t.length||(t=this.element.find(":tabbable")),t.length||(t=this.uiDialogButtonPane.find(":tabbable")),t.length||(t=this.uiDialogTitlebarClose.filter(":tabbable")),t.length||(t=this.uiDialog),t.eq(0).trigger("focus")},_restoreTabbableFocus:function(){var t=this.document[0].activeElement;this.uiDialog[0]===t||l.contains(this.uiDialog[0],t)||this._focusTabbable()},_keepFocus:function(t){t.preventDefault(),this._restoreTabbableFocus()},_createWrapper:function(){this.uiDialog=l("<div>").hide().attr({tabIndex:-1,role:"dialog","aria-modal":this.options.modal?"true":null}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(t){if(this.options.closeOnEscape&&!t.isDefaultPrevented()&&t.keyCode&&t.keyCode===l.ui.keyCode.ESCAPE)return t.preventDefault(),void this.close(t);if(t.keyCode===l.ui.keyCode.TAB&&!t.isDefaultPrevented()){var e=this.uiDialog.find(":tabbable"),i=e.first(),s=e.last();t.target!==s[0]&&t.target!==this.uiDialog[0]||t.shiftKey?t.target!==i[0]&&t.target!==this.uiDialog[0]||!t.shiftKey||(this._delay(function(){s.trigger("focus")}),t.preventDefault()):(this._delay(function(){i.trigger("focus")}),t.preventDefault())}},mousedown:function(t){this._moveToTop(t)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var t;this.uiDialogTitlebar=l("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(t){l(t.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=l("<button type='button'></button>").button({label:l("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(t){t.preventDefault(),this.close(t)}});var e=Number.isInteger(this.options.uiDialogTitleHeadingLevel)&&0<this.options.uiDialogTitleHeadingLevel&&this.options.uiDialogTitleHeadingLevel<=6?"h"+this.options.uiDialogTitleHeadingLevel:"span";t=l("<"+e+">").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(t,"ui-dialog-title"),this._title(t),this.uiDialogTitlebar.prepe
vendor: 12,077 bytes, line 11
11ndTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":t.attr("id")})},_title:function(t){this.options.title?t.text(this.options.title):t.html(" ")},_createButtonPane:function(){this.uiDialogButtonPane=l("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=l("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var n=this,t=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),l.isEmptyObject(t)||Array.isArray(t)&&!t.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(l.each(t,function(t,e){var i,s;e="function"==typeof e?{click:e,text:t}:e,e=l.extend({type:"button"},e),i=e.click,s={icon:e.icon,iconPosition:e.iconPosition,showLabel:e.showLabel,icons:e.icons,text:e.text},delete e.click,delete e.icon,delete e.iconPosition,delete e.showLabel,delete e.icons,"boolean"==typeof e.text&&delete e.text,l("<button></button>",e).button(s).appendTo(n.uiButtonSet).on("click",function(){i.apply(n.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var n=this,o=this.options;function a(t){return{position:t.position,offset:t.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(t,e){n._addClass(l(this),"ui-dialog-dragging"),n._blockFrames(),n._trigger("dragStart",t,a(e))},drag:function(t,e){n._trigger("drag",t,a(e))},stop:function(t,e){var i=e.offset.left-n.document.scrollLeft(),s=e.offset.top-n.document.scrollTop();o.position={my:"left top",at:"left"+(0<=i?"+":"")+i+" top"+(0<=s?"+":"")+s,of:n.window},n._removeClass(l(this),"ui-dialog-dragging"),n._unblockFrames(),n._trigger("dragStop",t,a(e))}})},_makeResizable:function(){var o=this,a=this.options,t=a.resizable,e=this.uiDialog.css("position"),i="string"==typeof t?t:"n,e,s,w,se,sw,ne,nw";function r(t){return{originalPosition:t.originalPosition,originalSize:t.originalSize,position:t.position,size:t.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:a.maxWidth,maxHeight:a.maxHeight,minWidth:a.minWidth,minHeight:this._minHeight(),handles:i,start:function(t,e){o._addClass(l(this),"ui-dialog-resizing"),o._blockFrames(),o._trigger("resizeStart",t,r(e))},resize:function(t,e){o._trigger("resize",t,r(e))},stop:function(t,e){var i=o.uiDialog.offset(),s=i.left-o.document.scrollLeft(),n=i.top-o.document.scrollTop();a.height=o.uiDialog.height(),a.width=o.uiDialog.width(),a.position={my:"left top",at:"left"+(0<=s?"+":"")+s+" top"+(0<=n?"+":"")+n,of:o.window},o._removeClass(l(this),"ui-dialog-resizing"),o._unblockFrames(),o._trigger("resizeStop",t,r(e))}}).css("position",e)},_trackFocus:function(){this._on(this.widget(),{focusin:function(t){this._makeFocusTarget(),this._focusedElement=l(t.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var t=this._trackingInstances(),e=l.inArray(this,t);-1!==e&&t.splice(e,1)},_trackingInstances:function(){var t=this.document.data("ui-dialog-instances");return t||(t=[],this.document.data("ui-dialog-instances",t)),t},_minHeight:function(){var t=this.options;return"auto"===t.height?t.minHeight:Math.min(t.minHeight,t.height)},_position:function(){var t=this.uiDialog.is(":visible");t||this.uiDialog.show(),this.uiDialog.position(this.options.position),t||this.uiDialog.hide()},_setOptions:function(t){var i=this,s=!1,n={};l.each(t,function(t,e){i._setOption(t,e),t in i.sizeRelatedOptions&&(s=!0),t in i.resizableRelatedOptions&&(n[t]=e)}),s&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",n)},_setOption:function(t,e){var i,s,n=this.uiDialog;"disabled"!==t&&(this._super(t,e),"appendTo"===t&&this.uiDialog.appendTo(this._appendTo()),"buttons"===t&&this._createButtons(),"closeText"===t&&this.uiDialogTitlebarClose.button({label:l("<a>").text(""+this.options.closeText).html()}),"draggable"===t&&((i=n.is(":data(ui-draggable)"))&&!e&&n.draggable("destroy"),!i&&e&&this._makeDraggable()),"position"===t&&this._position(),"resizable"===t&&((s=n.is(":data(ui-resizable)"))&&!e&&n.resizable("destroy"),s&&"string"==typeof e&&n.resizable("option","handles",e),s||!1===e||this._makeResizable()),"title"===t&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")),"modal"===t&&n.attr("aria-modal",e?"true":null))},_size:function(){var t,e,i,s=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),s.minWidth>s.width&&(s.width=s.minWidth),t=this.uiDialog.css({height:"auto",width:s.width}).outerHeight(),e=Math.max(0,s.minHeight-t),i="number"==typeof s.maxHeight?Math.max(0,s.maxHeight-t):"none","auto"===s.height?this.element.css({minHeight:e,maxHeight:i,height:"auto"}):this.element.height(Math.max(0,s.height-t)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var t=l(this);return l("<div>").css({position:"absolute",width:t.outerWidth(),height:t.outerHeight()}).appendTo(t.parent()).offset(t.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(t){return!!l(t.target).closest(".ui-dialog").length||!!l(t.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var i=!0;this._delay(function(){i=!1}),this.document.data("ui-dialog-overlays")||this.document.on("focusin.ui-dialog",function(t){if(!i){var e=this._trackingInstances()[0];e._allowInteraction(t)||(t.preventDefault(),e._focusTabbable())}}.bind(this)),this.overlay=l("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var t=this.document.data("ui-dialog-overlays")-1;t?this.document.data("ui-dialog-overlays",t):(this.document.off("focusin.ui-dialog"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!0===l.uiBackCompat&&l.widget("ui.dialog",l.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(t,e){"dialogClass"===t&&this.uiDialog.removeClass(this.options.dialogClass).addClass(e),this._superApply(arguments)}}),l.ui.dialog}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/slider.js",["jquery","./mouse","../keycode","../version","../widget"],t):t(jQuery)}(function(u){"use strict";return u.widget("ui.slider",u.ui.mouse,{version:"1.14.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var t,e,i=this.options,s=this.element.find(".ui-slider-handle"),n=[];for(e=i.values&&i.values.length||1,s.length>e&&(s.slice(e).remove(),s=s.slice(0,e)),t=s.length;t<e;t++)n.push("<span tabindex='0'></span>");this.handles=s.add(u(n.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(t){u(this).data("ui-slider-handle-index",t).attr("tabIndex",0)})},_createRange:function(){var t=this.options;t.range?(!0===t.range&&(t.values?t.values.length&&2!==t.values.length?t.values=[t.values[0],t.values[0]]:Array.isArray(t.values)&&(t.values=t.values.slice(0)):t.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=u("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==t.range&&"max"!==t.range||this._addClass(this.range,"ui-slider-range-"+t.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(t){var e,i,s,n,o,a,r,l=this,h=this.options;return!h.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e),s=this._valueMax()-this._valueMin()+1,this.handles.each(function(t){var e=Math.abs(i-l.values(t));(e<s||s===e&&(t===l._lastChangedValue||l.values(t)===h.min))&&(s=e,n=u(this),o=t)}),!1!==this._start(t,o)&&(this._mouseSliding=!0,this._handleIndex=o,this._addClass(n,null,"ui-state-active"),n.trigger("focus"),a=n.offset(),r=!u(t.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=r?{left:0,top:0}:{left:t.pageX-a.left-n.width()/2,top:t.pageY-a.top-n.height()/2-(parseInt(n.css("borderTopWidth"),10)||0)-(parseInt(n.css("borderBottomWidth"),10)||0)+(parseInt(n.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(t,o,i),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(t){var e={x:t.pageX,y:t.pageY},i=this._normValueFromMouse(e);return this._slide(t,this._handleIndex,i),!1},_mouseStop:function(t){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(t,this._handleIndex),this._change(t,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(t){var e,i,s,n;return 1<(i=("horizontal"===this.orientation?(e=this.elementSize.width,t.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(e=this.elementSize.height,t.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/e)&&(i=1),i<0&&(i=0),"vertical"===this.orientation&&(i=1-i),s=this._valueMax()-this._valueMin(),n=this._valueMin()+i*s,this._trimAlignValue(n)},_uiHash:function(t,e,i){var s={handle:this.handles[t],handleIndex:t,value:void 0!==e?e:this.value()};return this._hasMultipleValues()&&(s.value=void 0!==e?e:this.values(t),s.values=i||this.values()),s},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(t,e){return this._trigger("start",t,this._uiHash(e))},_slide:function(t,e,i){var s,n=this.value(),o=this.values();this._hasMultipleValues()&&(s=this.values(e?0:1),n=this.values(e),2===this.options.values.length&&!0===this.options.range&&(i=0===e?Math.min(s,i):Math.max(s,i)),o[e]=i),i!==n&&!1!==this._trigger("slide",t,this._uiHash(e,i,o))&&(this._hasMultipleValues()?this.values(e,i):this.value(i))},_stop:function(t,e){this._trigger("stop",t,this._uiHash(e))},_change:function(t,e){this._keySliding||this._mouseSliding||(this._lastChangedValue=e,this._trigger("change",t,this._uiHash(e)))},value:function(t){return arguments.length?(this.options.value=this._trimAlignValue(t),this._refreshValue(),void this._change(null,0)):this._value(
vendor: 4,840 bytes, line 11
11)},values:function(t,e){var i,s,n;if(1<arguments.length)return this.options.values[t]=this._trimAlignValue(e),this._refreshValue(),void this._change(null,t);if(!arguments.length)return this._values();if(!Array.isArray(t))return this._hasMultipleValues()?this._values(t):this.value();for(i=this.options.values,s=t,n=0;n<i.length;n+=1)i[n]=this._trimAlignValue(s[n]),this._change(null,n);this._refreshValue()},_setOption:function(t,e){var i,s=0;switch("range"===t&&!0===this.options.range&&("min"===e?(this.options.value=this._values(0),this.options.values=null):"max"===e&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),Array.isArray(this.options.values)&&(s=this.options.values.length),this._super(t,e),t){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(e),this.handles.css("horizontal"===e?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),i=s-1;0<=i;i--)this._change(null,i);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(t){this._super(t),this._toggleClass(null,"ui-state-disabled",!!t)},_value:function(){var t=this.options.value;return this._trimAlignValue(t)},_values:function(t){var e,i,s;if(arguments.length)return e=this.options.values[t],this._trimAlignValue(e);if(this._hasMultipleValues()){for(i=this.options.values.slice(),s=0;s<i.length;s+=1)i[s]=this._trimAlignValue(i[s]);return i}return[]},_trimAlignValue:function(t){if(t<=this._valueMin())return this._valueMin();if(t>=this._valueMax())return this._valueMax();var e=0<this.options.step?this.options.step:1,i=(t-this._valueMin())%e,s=t-i;return 2*Math.abs(i)>=e&&(s+=0<i?e:-e),parseFloat(s.toFixed(5))},_calculateNewMax:function(){var t=this.options.max,e=this._valueMin(),i=this.options.step;(t=Math.round((t-e)/i)*i+e)>this.options.max&&(t-=i),this.max=parseFloat(t.toFixed(this._precision()))},_precision:function(){var t=this._precisionOf(this.options.step);return null!==this.options.min&&(t=Math.max(t,this._precisionOf(this.options.min))),t},_precisionOf:function(t){var e=t.toString(),i=e.indexOf(".");return-1===i?0:e.length-i-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(t){"vertical"===t&&this.range.css({width:"",left:""}),"horizontal"===t&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var e,i,t,s,n,o=this.options.range,a=this.options,r=this,l=!this._animateOff&&a.animate,h={};this._hasMultipleValues()?this.handles.each(function(t){i=(r.values(t)-r._valueMin())/(r._valueMax()-r._valueMin())*100,h["horizontal"===r.orientation?"left":"bottom"]=i+"%",u(this).stop(1,1)[l?"animate":"css"](h,a.animate),!0===r.options.range&&("horizontal"===r.orientation?(0===t&&r.range.stop(1,1)[l?"animate":"css"]({left:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({width:i-e+"%"},{queue:!1,duration:a.animate})):(0===t&&r.range.stop(1,1)[l?"animate":"css"]({bottom:i+"%"},a.animate),1===t&&r.range[l?"animate":"css"]({height:i-e+"%"},{queue:!1,duration:a.animate}))),e=i}):(t=this.value(),s=this._valueMin(),n=this._valueMax(),i=n!==s?(t-s)/(n-s)*100:0,h["horizontal"===this.orientation?"left":"bottom"]=i+"%",this.handle.stop(1,1)[l?"animate":"css"](h,a.animate),"min"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:i+"%"},a.animate),"max"===o&&"horizontal"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({width:100-i+"%"},a.animate),"min"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:i+"%"},a.animate),"max"===o&&"vertical"===this.orientation&&this.range.stop(1,1)[l?"animate":"css"]({height:100-i+"%"},a.animate))},_handleEvents:{keydown:function(t){var e,i,s,n=u(t.target).data("ui-slider-handle-index");switch(t.keyCode){case u.ui.keyCode.HOME:case u.ui.keyCode.END:case u.ui.keyCode.PAGE_UP:case u.ui.keyCode.PAGE_DOWN:case u.ui.keyCode.UP:case u.ui.keyCode.RIGHT:case u.ui.keyCode.DOWN:case u.ui.keyCode.LEFT:if(t.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(u(t.target),null,"ui-state-active"),!1===this._start(t,n)))return}switch(s=this.options.step,e=i=this._hasMultipleValues()?this.values(n):this.value(),t.keyCode){case u.ui.keyCode.HOME:i=this._valueMin();break;case u.ui.keyCode.END:i=this._valueMax();break;case u.ui.keyCode.PAGE_UP:i=this._trimAlignValue(e+(this._valueMax()-this._valueMin())/this.numPages);break;
vendor: 6,764 bytes, lines 11-12
11case u.ui.keyCode.PAGE_DOWN:i=this._trimAlignValue(e-(this._valueMax()-this._valueMin())/this.numPages);break;case u.ui.keyCode.UP:case u.ui.keyCode.RIGHT:if(e===this._valueMax())return;i=this._trimAlignValue(e+s);break;case u.ui.keyCode.DOWN:case u.ui.keyCode.LEFT:if(e===this._valueMin())return;i=this._trimAlignValue(e-s)}this._slide(t,n,i)},keyup:function(t){var e=u(t.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(t,e),this._change(t,e),this._removeClass(u(t.target),null,"ui-state-active"))}}})}),function(t){"use strict";"function"==typeof define&&define.amd?define("bower_components/jquery.ui/ui/widgets/tooltip.js",["jquery","../keycode","../position","../unique-id","../version","../widget"],t):t(jQuery)}(function(h){"use strict";return h.widget("ui.tooltip",{version:"1.14.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var t=h(this).attr("title");return h("<a>").text(t).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(t,e){var i=(t.attr("aria-describedby")||"").split(/\s+/);i.push(e),t.data("ui-tooltip-id",e).attr("aria-describedby",String.prototype.trim.call(i.join(" ")))},_removeDescribedBy:function(t){var e=t.data("ui-tooltip-id"),i=(t.attr("aria-describedby")||"").split(/\s+/),s=h.inArray(e,i);-1!==s&&i.splice(s,1),t.removeData("ui-tooltip-id"),(i=String.prototype.trim.call(i.join(" ")))?t.attr("aria-describedby",i):t.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=h("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=h([])},_setOption:function(t,e){var i=this;this._super(t,e),"content"===t&&h.each(this.tooltips,function(t,e){i._updateContent(e.element)})},_setOptionDisabled:function(t){this[t?"_disable":"_enable"]()},_disable:function(){var s=this;h.each(this.tooltips,function(t,e){var i=h.Event("blur");i.target=i.currentTarget=e.element[0],s.close(i,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var t=h(this);if(t.is("[title]"))return t.data("ui-tooltip-title",t.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var t=h(this);t.data("ui-tooltip-title")&&t.attr("title",t.data("ui-tooltip-title"))}),this.disabledTitles=h([])},open:function(t){var i=this,e=h(t?t.target:this.element).closest(this.options.items);e.length&&!e.data("ui-tooltip-id")&&(e.attr("title")&&e.data("ui-tooltip-title",e.attr("title")),e.data("ui-tooltip-open",!0),t&&"mouseover"===t.type&&e.parents().each(function(){var t,e=h(this);e.data("ui-tooltip-open")&&((t=h.Event("blur")).target=t.currentTarget=this,i.close(t,!0)),e.attr("title")&&(e.uniqueId(),i.parents[this.id]={element:this,title:e.attr("title")},e.attr("title",""))}),this._registerCloseHandlers(t,e),this._updateContent(e,t))},_updateContent:function(e,i){var t,s=this.options.content,n=this,o=i?i.type:null;if("string"==typeof s||s.nodeType||s.jquery)return this._open(i,e,s);(t=s.call(e[0],function(t){e.data("ui-tooltip-open")&&(i&&(i.type=o),n._open(i,e,t))}))&&this._open(i,e,t)},_open:function(t,e,i){var s,n,o,a,r=h.extend({},this.options.position);function l(t){r.of=t,n.is(":hidden")||n.position(r)}i&&((s=this._find(e))?s.tooltip.find(".ui-tooltip-content").html(i):(e.is("[title]")&&(t&&"mouseover"===t.type?e.attr("title",""):e.removeAttr("title")),s=this._tooltip(e),n=s.tooltip,this._addDescribedBy(e,n.attr("id")),n.find(".ui-tooltip-content").html(i),this.liveRegion.children().hide(),(a=h("<div>").html(n.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),a.removeAttr("id").find("[id]").removeAttr("id"),a.appendTo(this.liveRegion),this.options.track&&t&&/^mouse/.test(t.type)?(this._on(this.document,{mousemove:l}),l(t)):n.position(h.extend({of:e},this.options.position)),n.hide(),this._show(n,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(o=this.delayedShow=setInterval(function(){n.is(":visible")&&(l(r.of),clearInterval(o))},13)),this._trigger("open",t,{tooltip:n})))},_registerCloseHandlers:function(t,i){var e={keyup:function(t){if(t.keyCode===h.ui.keyCode.ESCAPE){var e=h.Event(t);e.currentTarget=i[0],this.close(e,!0)}}};i[0]!==this.element[0]&&(e.remove=function(){var t=this._find(i);t&&this._removeTooltip(t.tooltip)}),t&&"mouseover"!==t.type||(e.mouseleave="close"),t&&"focusin"!==t.type||(e.focusout="close"),this._on(!0,i,e)},close:function(t){var e,i=this,s=h(t?t.currentTarget:this.element),n=this._find(s);n?(e=n.tooltip,n.closing||(clearInterval(this.delayedShow),s.data("ui-tooltip-title")&&!s.attr("title")&&s.attr("title",s.data("ui-tooltip-title")),this._removeDescribedBy(s),n.hiding=!0,e.stop(!0),this._hide(e,this.options.hide,function(){i._removeTooltip(h(this))}),s.removeData("ui-tooltip-open"),this._off(s,"mouseleave focusout keyup"),s[0]!==this.element[0]&&this._off(s,"remove"),this._off(this.document,"mousemove"),t&&"mouseleave"===t.type&&h.each(this.parents,function(t,e){h(e.element).attr("title",e.title),delete i.parents[t]}),n.closing=!0,this._trigger("close",t,{tooltip:e}),n.hiding||(n.closing=!1))):s.removeData("ui-tooltip-open")},_tooltip:function(t){var e=h("<div>").attr("role","tooltip"),i=h("<div>").appendTo(e),s=e.uniqueId().attr("id");return this._addClass(i,"ui-tooltip-content"),this._addClass(e,"ui-tooltip","ui-widget ui-widget-content"),e.appendTo(this._appendTo(t)),this.tooltips[s]={element:t,tooltip:e}},_find:function(t){var e=t.data("ui-tooltip-id");return e?this.tooltips[e]:null},_removeTooltip:function(t){clearInterval(this.delayedShow),t.remove(),delete this.tooltips[t.attr("id")]},_appendTo:function(t){var e=t.closest(".ui-front, dialog");return e.length||(e=this.document[0].body),e},_destroy:function(){var n=this;h.each(this.tooltips,function(t,e){var i=h.Event("blur"),s=e.element;i.target=i.currentTarget=s[0],n.close(i,!0),h("#"+t).remove(),s.data("ui-tooltip-title")&&(s.attr("title")||s.attr("title",s.data("ui-tooltip-title")),s.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!0===h.uiBackCompat&&h.widget("ui.tooltip",h.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var t=this._superApply(arguments);return this.options.tooltipClass&&t.tooltip.addClass(this.options.tooltipClass),t}}),h.ui.tooltip}); 12!function(d,s,l){function c(t,e,i){var n=s.createElement(t);return e&&(n.id=Z+e),i&&(n.style.cssText=i),d(n)}
vendor: 9,361 bytes, line 12
12function g(){return l.innerHeight?l.innerHeight:d(l).height()}function u(t,i){i!==Object(i)&&(i={}),this.cache={},this.el=t,this.value=function(t){var e;return void 0===this.cache[t]&&(void 0!==(e=d(this.el).attr("data-cbox-"+t))?this.cache[t]=e:void 0!==i[t]?this.cache[t]=i[t]:void 0!==X[t]&&(this.cache[t]=X[t])),this.cache[t]},this.get=function(t){var e=this.value(t);return d.isFunction(e)?e.call(this.el,this):e}}function r(t){var e=I.length,i=(A+t)%e;return i<0?e+i:i}function f(t,e){return Math.round((/%/.test(t)?("x"===e?M.width():g())/100:1)*parseInt(t,10))}function p(t,e){return t.get("photo")||t.get("photoRegex").test(e)}function m(t,e){return t.get("retinaUrl")&&1<l.devicePixelRatio?e.replace(t.get("photoRegex"),t.get("retinaSuffix")):e}function w(t){"contains"in b[0]&&!b[0].contains(t.target)&&t.target!==y[0]&&(t.stopPropagation(),b.focus())}function v(t){v.str!==t&&(b.add(y).removeClass(v.str).addClass(t),v.str=t)}function x(t){d(s).trigger(t),at.triggerHandler(t)}function n(t){var e,i;if(!G){if(e=d(t).data(Y),_=new u(t,e),i=_.get("rel"),A=0,i&&!1!==i&&"nofollow"!==i?(I=d("."+tt).filter(function(){return new u(this,d.data(this,Y)).get("rel")===i}),-1===(A=I.index(_.el))&&(I=I.add(_.el),A=I.length-1)):I=d(_.el),!U){U=$=!0,v(_.get("className")),b.css({visibility:"hidden",display:"block",opacity:""}),L=c(st,"LoadedContent","width:0; height:0; overflow:hidden; visibility:hidden"),C.css({width:"",height:""}).append(L),j=H.height()+E.height()+C.outerHeight(!0)-C.height(),D=k.width()+W.width()+C.outerWidth(!0)-C.width(),N=L.outerHeight(!0),z=L.outerWidth(!0);var n=f(_.get("initialWidth"),"x"),o=f(_.get("initialHeight"),"y"),r=_.get("maxWidth"),h=_.get("maxHeight");_.w=Math.max((!1!==r?Math.min(n,f(r,"x")):n)-z-D,0),_.h=Math.max((!1!==h?Math.min(o,f(h,"y")):o)-N-j,0),L.css({width:"",height:_.h}),J.position(),x(et),_.get("onOpen"),O.add(S).hide(),b.focus(),_.get("trapFocus")&&s.addEventListener&&(s.addEventListener("focus",w,!0),at.one(rt,function(){s.removeEventListener("focus",w,!0)})),_.get("returnFocus")&&at.one(rt,function(){d(_.el).focus()})}var a=parseFloat(_.get("opacity"));y.css({opacity:a==a?a:"",cursor:_.get("overlayClose")?"pointer":"",visibility:"visible"}).show(),_.get("closeButton")?B.html(_.get("close")).appendTo(C):B.appendTo("<div/>"),function(){var t,e,i,n=J.prep,o=++lt;if(q=!($=!0),x(ht),x(it),_.get("onLoad"),_.h=_.get("height")?f(_.get("height"),"y")-N-j:_.get("innerHeight")&&f(_.get("innerHeight"),"y"),_.w=_.get("width")?f(_.get("width"),"x")-z-D:_.get("innerWidth")&&f(_.get("innerWidth"),"x"),_.mw=_.w,_.mh=_.h,_.get("maxWidth")&&(_.mw=f(_.get("maxWidth"),"x")-z-D,_.mw=_.w&&_.w<_.mw?_.w:_.mw),_.get("maxHeight")&&(_.mh=f(_.get("maxHeight"),"y")-N-j,_.mh=_.h&&_.h<_.mh?_.h:_.mh),t=_.get("href"),Q=setTimeout(function(){R.show()},100),_.get("inline")){var r=d(t).eq(0);i=d("<div>").hide().insertBefore(r),at.one(ht,function(){i.replaceWith(r)}),n(r)}else _.get("iframe")?n(" "):_.get("html")?n(_.get("html")):p(_,t)?(t=m(_,t),q=_.get("createImg"),d(q).addClass(Z+"Photo").bind("error."+Z,function(){n(c(st,"Error").html(_.get("imgError")))}).one("load",function(){o===lt&&setTimeout(function(){var t;_.get("retinaImage")&&1<l.devicePixelRatio&&(q.height=q.height/l.devicePixelRatio,q.width=q.width/l.devicePixelRatio),_.get("scalePhotos")&&(e=function(){q.height-=q.height*t,q.width-=q.width*t},_.mw&&q.width>_.mw&&(t=(q.width-_.mw)/q.width,e()),_.mh&&q.height>_.mh&&(t=(q.height-_.mh)/q.height,e())),_.h&&(q.style.marginTop=Math.max(_.mh-q.height,0)/2+"px"),I[1]&&(_.get("loop")||I[A+1])&&(q.style.cursor="pointer",d(q).bind("click."+Z,function(){J.next()})),q.style.width=q.width+"px",q.style.height=q.height+"px",n(q)},1)}),q.src=t):t&&F.load(t,_.get("data"),function(t,e){o===lt&&n("error"===e?c(st,"Error").html(_.get("xhrError")):d(this).contents())})}()}}function o(){b||(V=!1,M=d(l),b=c(st).attr({id:Y,class:!1===d.support.opacity?Z+"IE":"",role:"dialog",tabindex:"-1"}).hide(),y=c(st,"Overlay").hide(),R=d([c(st,"LoadingOverlay")[0],c(st,"LoadingGraphic")[0]]),T=c(st,"Wrapper"),C=c(st,"Content").append(S=c(st,"Title"),h=c(st,"Current"),P=d('<button type="button"/>').attr({id:Z+"Previous"}),a=d('<button type="button"/>').attr({id:Z+"Next"}),K=d('<button type="button"/>').attr({id:Z+"Slideshow"}),R),B=d('<button type="button"/>').attr({id:Z+"Close"}),T.append(c(st).append(c(st,"TopLeft"),H=c(st,"TopCenter"),c(st,"TopRight")),c(st,!1,"clear:left").append(k=c(st,"MiddleLeft"),C,W=c(st,"MiddleRight")),c(st,!1,"clear:left").append(c(st,"BottomLeft"),E=c(st,"BottomCenter"),c(st,"BottomRight"))).find("div div").css({float:"left"}),F=c(st,!1,"position:absolute; width:9999px; visibility:hidden; display:none; max-width:none;"),O=a.add(P).add(h).add(K)),s.body&&!b.parent().length&&d(s.body).append(y,b.append(T,F))}var y,b,T,C,H,k,W,E,I,M,L,F,R,S,h,K,a,P,B,O,_,j,D,N,z,A,q,U,$,G,Q,J,V,X={html:!1,photo:!1,iframe:!1,inline:!1,transition:"elastic",speed:300,fadeOut:300,width:!1,initialWidth:"600",innerWidth:!1,maxWidth:!1,height:!1,initialHeight:"450",innerHeight:!1,maxHeight:!1,scalePhotos:!0,scrolling:!0,opacity:.9,preloading:!0,className:!1,overlayClose:!0,escKey:!0,arrowKey:!0,top:!1,bottom:!1,left:!1,right:!1,fixed:!1,data:void 0,closeButton:!0,fastIframe:!0,open:!1,reposition:!0,loop:!0,slideshow:!1,slideshowAuto:!0,slideshowSpeed:2500,slideshowStart:"start slideshow",slideshowStop:"stop slideshow",photoRegex:/\.(gif|png|jp(e|g|eg)|bmp|ico|webp|jxr|svg)((#|\?).*)?$/i,retinaImage:!1,retinaUrl:!1,retinaSuffix:"@2x.$1",current:"image {current} of {total}",previous:"previous",next:"next",close:"close",xhrError:"This content failed to load.",imgError:"This image failed to load.",returnFocus:!0,trapFocus:!0,onOpen:!1,onLoad:!1,onComplete:!1,onCleanup:!1,onClosed:!1,rel:function(){return this.rel},href:function(){return d(this).attr("href")},title:function(){return this.title},createImg:function(){var i=new Image,t=d(this).data("cbox-img-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),i},createIframe:function(){var i=s.createElement("iframe"),t=d(this).data("cbox-iframe-attrs");return"object"==typeof t&&d.each(t,function(t,e){i[t]=e}),"frameBorder"in i&&(i.frameBorder=0),"allowTransparency"in i&&(i.allowTransparency="true"),i.name=(new Date).getTime(),i.allowFullscreen=!0,i}},Y="colorbox",Z="cbox",tt=Z+"Element",et=Z+"_open",it=Z+"_load",nt=Z+"_complete",ot=Z+"_cleanup",rt=Z+"_closed",ht=Z+"_purge",at=d("<a/>"),st="div",lt=0,dt={},ct=function(){function t(){clearTimeout(h)}function e(){(_.get("loop")||I[A+1])&&(t(),h=setTimeout(J.next,_.get("slideshowSpeed")))}function i(){K.html(_.get("slideshowStop")).unbind(s).one(s,n),at.bind(nt,e).bind(it,t),b.removeClass(a+"off").addClass(a+"on")}function n(){t(),at.unbind(nt,e).unbind(it,t),K.html(_.get("slideshowStart")).unbind(s).one(s,function(){J.next(),i()}),b.removeClass(a+"on").addClass(a+"off")}function o(){r=!1,K.hide(),t(),at.unbind(nt,e).unbind(it,t),b.removeClass(a+"off "+a+"on")}var r,h,a=Z+"Slideshow_",s="click."+Z;return function(){r?_.get("slideshow")||(at.unbind(ot,o),o()):_.get("slideshow")&&I[1]&&(r=!0,at.one(ot,o),_.get("slideshowAuto")?i():n(),K.show())}}();d[Y]||(d(o),(J=d.fn[Y]=d[Y]=function(e,t){var i=this;return e=e||{},d.isFunction(i)&&(i=d("<a/>"),e.open=!0),i[0]&&(o(),function(){function t(t){1<t.which||t.shiftKey||t.altKey||t.metaKey||t.ctrlKey||(t.preventDefault(),n(this))}return!!b&&(V||(V=!0,a.click(function(){J.next()}),P.click(function(){J.prev()}),B.click(function(){J.close()}),y.click(function(){_.get("overlayClose")&&J.close()}),d(s).bind("keydown."+Z,function(t){var e=t.keyCode;U&&_.get("escKey")&&27===e&&(t.preventDefault(),J.close()),U&&_.get("arrowKey")&&I[1]&&!t.altKey&&(37===e?(t.preventDefault(),P.click()):39===e&&(t.preventDefault(),a.click()))}),d.isFunction(d.fn.on)?d(s).on("click."+Z,"."+tt,t):d("."+tt).live("click."+Z,t)),!0)}()&&(t&&(e.onComplete=t),i.each(function(){var t=d.data(this,Y)||{};d.data(this,Y,d.extend(t,e))}).addClass(tt),new u(i[0],e).get("open")&&n(i[0]))),i}).position=function(e,t){function i(){H[0].style.width=E[0].style.width=C[0].style.width=parseInt(b[0].style.width,10)-D+"px",C[0].style.height=k[0].style.height=W[0].style.height=parseInt(b[0].style.height,10)-j+"px"}var n,o,r,h=0,a=0,s=b.offset();if(M.unbind("resize."+Z),b.css({top:-9e4,left:-9e4}),o=M.scrollTop(),r=M.scrollLeft(),_.get("fixed")?(s.top-=o,s.left-=r,b.css({position:"fixed"})):(h=o,a=r,b.css({position:"absolute"})),a+=!1!==_.get("right")?Math.max(M.width()-_.w-z-D-f(_.get("right"),"x"),0):!1!==_.get("left")?f(_.get("left"),"x"):Math.round(Math.max(M.width()-_.w-z-D,0)/2),h+=!1!==_.get("bottom")?Math.max(g()-_.h-N-j-f(_.get("bottom"),"y"),0):!1!==_.get("top")?f(_.get("top"),"y"):Math.round(Math.max(g()-_.h-N-j,0)/2),b.css({top:s.top,left:s.left,visibility:"visible"}),T[0].style.width=T[0].style.height="9999px",n={width:_.w+z+D,height:_.h+N+j,top:h,left:a},e){var l=0;d.each(n,function(t){return n[t]!==dt[t]?void(l=e):void 0}),e=l}dt=n,e||b.css(n),b.dequeue().animate(n,{duration:e||0,complete:function(){i(),$=!1,T[0].style.width=_.w+z+D+"px",T[0].style.height=_.h+N+j+"px",_.get("reposition")&&setTimeout(function(){M.bind("resize."+Z,J.position)},1),d.isFunction(t)&&t()},step:i})},J.resize=function(t){var e;U&&((t=t||{}).width&&(_.w=f(t.width,"x")-z-D),t.innerWidth&&(_.w=f(t.innerWidth,"x")),L.css({width:_.w}
12),t.height&&(_.h=f(t.height,"y")-N-j),t.innerHeight&&(_.h=f(t.innerHeight,"y")),t.innerHeight||t.height||(e=L.scrollTop(),L.css({height:"auto"}),_.h=L.height()),L.css({height:_.h}),e&&L.scrollTop(e),J.position("none"===_.get("transition")?0:_.get("speed")))},J.prep=function(t){if(U){var e,o="none"===_.get("transition")?0:_.get("speed");L.remove(),(L=c(st,"LoadedContent").append(t)).hide().appendTo(F.show()).css({width:(_.w=_.w||L.width(),_.w=_.mw&&_.mw<_.w?_.mw:_.w,_.w),overflow:_.get("scrolling")?"auto":"hidden"}).css({height:(_.h=_.h||L.height(),_.h=_.mh&&_.mh<_.h?_.mh:_.h,_.h)}).prependTo(C),F.hide(),d(q).css({float:"none"}),v(_.get("className")),e=function(){function t(){!1===d.support.opacity&&b[0].style.removeAttribute("filter")}var e,i,n=I.length;U&&(i=function(){clearTimeout(Q),R.hide(),x(nt),_.get("onComplete")},S.html(_.get("title")).show(),L.show(),1<n?("string"==typeof _.get("current")&&h.html(_.get("current").replace("{current}",A+1).replace("{total}",n)).show(),a[_.get("loop")||A<n-1?"show":"hide"]().html(_.get("next")),P[_.get("loop")||A?"show":"hide"]().html(_.get("previous")),ct(),_.get("preloading")&&d.each([r(-1),r(1)],function(){var t=I[this],e=new u(t,d.data(t,Y)),i=e.get("href");i&&p(e,i)&&(i=m(e,i),s.createElement("img").src=i)})):O.hide(),_.get("iframe")?(e=_.get("createIframe"),_.get("scrolling")||(e.scrolling="no"),d(e).attr({src:_.get("href"),class:Z+"Iframe"}).one("load",i).appendTo(L),at.one(ht,function(){e.src="//about:blank"}),_.get("fastIframe")&&d(e).trigger("load")):i(),"fade"===_.get("transition")?b.fadeTo(o,1,t):t())},"fade"===_.get("transition")?b.fadeTo(o,0,function(){J.position(0,e)}):J.position(o,e)}},J.next=function(){!$&&I[1]&&(_.get("loop")||I[A+1])&&(A=r(1),n(I[A]))},J.prev=function(){!$&&I[1]&&(_.get("loop")||A)&&(A=r(-1),n(I[A]))},J.close=function(){U&&!G&&(U=!(G=!0),x(ot),_.get("onCleanup"),M.unbind("."+Z),y.fadeTo(_.get("fadeOut")||0,0),b.stop().fadeTo(_.get("fadeOut")||0,0,function(){b.hide(),y.hide(),x(ht),L.remove(),setTimeout(function(){G=!1,x(rt),_.get("onClosed")},1)}))},J.remove=function(){b&&(b.stop(),d[Y].close(),b.stop(!1,!0).remove(),y.remove(),G=!1,b=null,d("."+tt).removeData(Y).removeClass(tt),d(s).unbind("click."+Z).unbind("keydown."+Z))},J.element=function(){return d(_.el)},J.settings=X)}(jQuery,document,window); 13!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function($){"use strict";var escape=/["\\\x00-\x1f\x7f-\x9f]/g,meta={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},hasOwn=Object.prototype.hasOwnProperty;$.toJSON="object"==typeof JSON&&JSON.stringify?JSON.stringify:function(e){if(null===e)return"null";var t,r,n,o,i=$.type(e);if("undefined"!==i){if("number"===i||"boolean"===i)return String(e);if("string"===i)return $.quoteString(e);if("function"==typeof e.toJSON)return $.toJSON(e.toJSON());if("date"===i){var f=e.getUTCMonth()+1,u=e.getUTCDate(),s=e.getUTCFullYear(),a=e.getUTCHours(),c=e.getUTCMinutes(),l=e.getUTCSeconds(),p=e.getUTCMilliseconds();return f<10&&(f="0"+f),u<10&&(u="0"+u),a<10&&(a="0"+a),c<10&&(c="0"+c),l<10&&(l="0"+l),p<100&&(p="0"+p),p<10&&(p="0"+p),'"'+s+"-"+f+"-"+u+"T"+a+":"+c+":"+l+"."+p+'Z"'}if(t=[],$.isArray(e)){for(r=0;r<e.length;r++)t.push($.toJSON(e[r])||"null");return"["+t.join(",")+"]"}if("object"==typeof e){for(r in e)if(hasOwn.call(e,r)){if("number"===(i=typeof r))n='"'+r+'"';else{if("string"!==i)continue;n=$.quoteString(r)}"function"!==(i=typeof e[r])&&"undefined"!==i&&(o=$.toJSON(e[r]),t.push(n+":"+o))}return"{"+t.join(",")+"}"}}},$.evalJSON="object"==typeof JSON&&JSON.parse?JSON.parse:function(str){return eval("("+str+")")},$.secureEvalJSON="object"==typeof JSON&&JSON.parse?JSON.parse:function(str){var filtered=str.replace(/\\["\\\/bfnrtu]/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"");if(/^[\],:{}\s]*$/.test(filtered))return eval("("+str+")");throw new SyntaxError("Error parsing JSON, source is not valid.")},$.quoteString=function(e){return e.match(escape)?'"'+e.replace(escape,function(e){var t=meta[e];
13return"string"==typeof t?t:(t=e.charCodeAt(),"\\u00"+Math.floor(t/16).toString(16)+(t%16).toString(16))})+'"':'"'+e+'"'}}); 14!function(a,c,t,e,n){"use strict";a.popunder=function(t,e,n,i){var o=a.popunder.helper;if(o.init(),typeof Cookies!==o.u&&(o.c=Cookies.noConflict()),0===arguments.length?t=c.aPopunder:typeof t!==o.fu&&a(t).is("a")&&(i=a.Event("click",{target:t}),t=c.aPopunder),n||e)o.bindEvents(t,e,n);else if(t=typeof t===o.fu?t(i):t,o.reset(),typeof t!==o.u)for(;o.queue(t,i),o.first=!1,0<t.length;);return a},a.popunder.helper={TIMEOUT:"timeout",SWITCHER:"switcher",SIMPLE:"simple",_top:c.self,lastWin:null,lastTarget:null,last:!1,first:!0,b:"about:blank",u:"undefined",fu:"function",o:null,c:null,du:"__jqpu",ua:{ie:/msie|trident/i.test(e.userAgent),oldIE:/msie/i.test(e.userAgent),edge:/edge/i.test(e.userAgent),ff:/firefox/i.test(e.userAgent),o:/opera/i.test(e.userAgent),g:/chrome/i.test(e.userAgent),w:/webkit/i.test(e.userAgent),linux:/linux/i.test(e.userAgent),touch:"ontouchstart"in n.documentElement||/bada|blackberry|iemobile|android|iphone|ipod|ipad/i.test(e.userAgent)},m:!1,ns:"jqpu",def:{window:{toolbar:0,scrollbars:1,location:1,statusbar:1,menubar:0,resizable:1,width:(t.availWidth-122).toString(),height:(t.availHeight-122).toString(),screenX:0,screenY:0,left:0,top:0},name:"__pu",cookie:"__puc",blocktime:!1,skip:{},cb:null,popup:!1},testStack:function(t,e){var n,i=!1;for(n in t)t.hasOwnProperty(n)&&t[n]&&e[n]&&(i=t[n]);return i},init:function(){var t=this;return t.m||(t.m=t.testStack({ff:t.SWITCHER,ie:t.SWITCHER,edge:t.SWITCHER,w:t.SWITCHER,g:t.SWITCHER,o:t.SWITCHER,linux:t.SWITCHER,touch:t.SWITCHER},t.ua)),t},queue:function(t,e){var n=!1,i=this;if(0<t.length)for(;!1===n;){var o=t.shift();n=!o||i.open(o[0],o[1]||{},t.length,e)}return 0===t.length&&(i.bg(),i.m!==i.TIMEOUT&&i.href(!0,i)),i},bindEvents:function(t,e,n){var i=this,o="string",r=function(t){return a.popunder(t.data.stack,!1,!1,t),!0};return e&&i.m!==i.SWITCHER&&(e=typeof e===o?a(e):e).on("submit."+i.ns,{stack:t},r),n&&(n=typeof n===o?a(n):n).on("click."+i.ns,{stack:t},r),i},cookieCheck:function(t,e){var n=this,i=n.rand(e.cookie,!1),o=n.c.get(i),r=!1;return o?-1===o.indexOf(t)?o+=t:r=!0:o=t,n.c.set(i,o,{expires:new Date((new Date).getTime()+6e4*e.blocktime)}),r},rand:function(t,e){return(t||this.du)+(!1===e?"":Math.floor(89999999*Math.random()+1e7).toString()).replace(".","")},open:function(t,e,n,i){var o,r,s=this,u=a.extend(!0,{},s.def,e);if(s.o=t,top!==c.self)try{top.document.location.toString()&&(s._top=top)}catch(t){}return!(s.testStack(u.skip,s.ua)||u.blocktime&&typeof s.c===s.fu&&s.cookieCheck(t,u)||(t!==s.du&&(s.lastTarget=t,!0===s.first&&s.m===s.SWITCHER?(i&&typeof i.target!==s.u&&(o=s.getElementUrl(i,void 0),i.preventDefault()),s.switcher.switchWindow(o,s.o,s.rand(u.name,!e.name))):!0!==s.first&&!0!==s.isMultiple()||(s.m===s.TIMEOUT?c.setTimeout((r=a.extend(!0,{},s),function(){try{r.lastWin=c.open(r.o,r.rand(u.name,!e.name),r.getOptions(u.window))||r.lastWin,r.href(n,r),typeof u.cb===r.fu&&u.cb(r.lastWin)}catch(t){}}),0):s.lastWin=s._top.window.open(s.o,s.rand(u.name,!e.name),s.getOptions(u.window))||s.lastWin),s.m!==s.TIMEOUT&&(s.href(n,s),typeof u.cb===s.fu&&u.cb(s.lastWin))),0))},bg:function(){var t=this;return(t.TIMEOUT===t.m||t.lastTarget)&&(t.m===t.SIMPLE?(t.switcher.simple(t),c.setTimeout(function(){t.switcher.simple(t)},500)):t.m===t.TIMEOUT&&t.switcher.timeout()),t},switcher:{simple:function(t){t.ua.oldIE?(t.lastWin.blur(),t.lastWin.opener.window.focus(),c.self.window.focus(),c.focus()):n.focus()},timeout:function(){c.setTimeout(function(){var t=c.open("","_self");t&&!t.closed&&t.focus()},0)},switchWindow:function(t,e,n){c.open(t,n),c.location.assign(e)}},isMultiple:function(){var t=this;return t.m===t.TIMEOUT||t.m===t.SIMPLE},href:function(t,e){return t&&e.lastTarget&&e.lastWin&&e.lastTarget!==e.b&&e.lastTarget!==e.o&&(e.lastWin.document.location.href=e.lastTarget),e},getElementUrl:function(t,e){var n,i,o=":submit, button",r=a(t.target),s=typeof e===this.u;return r.is("a")&&s?i=(n=r).attr("href"):!0!==r.is(o)?n=(r=r.parents(o)).parents("form"):(n=a(t.target.form),!r.is(o)||n&&n.length||(n=r.parents("form"))),i||0===r.length||0===n.length||"get"!==(n.prop("method")+"").toLowerCase()||"_blank"!==n.attr("target")&&!s||(i=n.attr("action")+"/?"+n.serialize()),i},reset:function(){var t=this;return t.last=!1,t.first=!0,t.lastTarget=t.lastWin=null,t},unbind:function(t,e){return this.reset(),t&&(t="string"==typeof t?a(t):t).off("submit."+this.ns),e&&((e="string"==typeof e?a(e):e).off("click."+this.ns).next(".jq-pu object").remove(),e.unwrap()),c.aPopunder=[],this},getOptions:function(t){var e,n=[];for(e in t)t.hasOwnProperty(e)&&n.push(e+"="+t[e]);return n.join(",")}}}(jQuery,window,screen,navigator,document); 15!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof module&&module.exports?e(require("jquery")):e(jQuery)}(function(i){var e,t,n=!1,a="[object OperaMini]"===Object.prototype.toString.call(window.operamini),l="placeholder"in document.createElement("input")&&!a&&!n,o="placeholder"in document.createElement("textarea")&&!a&&!n,r=i.valHooks,d=i.propHooks,u={};function p(e,t){var a=this,l=i(this);if(a.value===l.attr(n?"placeholder-x":"placeholder")&&l.hasClass(u.customClass))if(a.value="",l.removeClass(u.customClass),l.data("placeholder-password")){if(l=l.hide().nextAll('input[type="password"]:first').show().attr("id",l.removeAttr("id").data("placeholder-id")),!0===e)return l[0].value=t;l.focus()}else a==c()&&a.select()}function s(e){var t,a,l,o,r=this,d=i(this),s=r.id;if(!e||"blur"!==e.type||!d.hasClass(u.customClass))if(""===r.value){if("password"===r.type){if(!d.data("placeholder-textinput")){try{t=d.clone().prop({type:"text"})}catch(e){t=i("<input>").attr(i.extend((a=this,l={},o=/^jQuery\d+$/,i.each(a.attributes,function(e,t){t.specified&&!o.test(t.name)&&(l[t.name]=t.value)}),l),{type:"text"}))}t.removeAttr("name").data({"placeholder-enabled":!0,"placeholder-password":d,"placeholder-id":s}).bind("focus.placeholder",p),d.data({"placeholder-textinput":t,"placeholder-id":s}).before(t)}r.value="",d=d.removeAttr("id").hide().prevAll('input[type="text"]:first').attr("id",d.data("placeholder-id")).show()}else{var c=d.data("placeholder-password");c&&(c[0].value="",d.attr("id",d.data("placeholder-id")).show().nextAll('input[type="password"]:last').hide().removeAttr("id"))}d.addClass(u.customClass),d[0].value=d.attr(n?"placeholder-x":"placeholder")}else d.removeClass(u.customClass)}function c(){try{return document.activeElement}catch(e){}}l&&o?((t=i.fn.placeholder=function(){return this}).input=!0,t.textarea=!0):((t=i.fn.placeholder=function(e){return u=i.extend({},{customClass:"placeholder"},e),this.filter((l?"textarea":":input")+"["+(n?"placeholder-x":"placeholder")+"]").not("."+u.customClass).not(":radio, :checkbox, [type=hidden]").bind({"focus.placeholder":p,"blur.placeholder":s}).data("placeholder-enabled",!0).trigger("blur.placeholder")}).input=l,t.textarea=o,e={get:function(e){var t=i(e),a=t.data("placeholder-password");return a?a[0].value:t.data("placeholder-enabled")&&t.hasClass(u.customClass)?"":e.value},set:function(e,t){var a,l,o=i(e);
15return""!==t&&(a=o.data("placeholder-textinput"),l=o.data("placeholder-password"),a?(p.call(a[0],!0,t)||(e.value=t),a[0].value=t):l&&(p.call(e,!0,t)||(l[0].value=t),e.value=t)),o.data("placeholder-enabled")?""===t?(e.value=t,e!=c()&&s.call(e)):(o.hasClass(u.customClass)&&p.call(e),e.value=t):e.value=t,o}},l||(r.input=e,d.value=e),o||(r.textarea=e,d.value=e),i(function(){i(document).delegate("form","submit.placeholder",function(){var e=i("."+u.customClass,this).each(function(){p.call(this,!0,"")});setTimeout(function(){e.each(s)},10)})}),i(window).bind("beforeunload.placeholder",function(){var e=!0;try{"javascript:void(0)"===document.activeElement.toString()&&(e=!1)}catch(e){}e&&i("."+u.customClass).each(function(){this.value=""})}))}); 16!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(v){var i=/\+/g;function x(e){return l.raw?e:encodeURIComponent(e)}function k(e,o){var n=l.raw?e:function(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(i," ")),l.json?JSON.parse(e):e}catch(e){}}(e);return v.isFunction(o)?o(n):n}var l=v.cookie=function(e,o,n){if(void 0!==o&&!v.isFunction(o)){if("number"==typeof(n=v.extend({},l.defaults,n)).expires){var i=n.expires,r=n.expires=new Date;r.setTime(+r+864e5*i)}return document.cookie=[x(e),"=",(t=o,x(l.json?JSON.stringify(t):String(t))),n.expires?"; expires="+n.expires.toUTCString():"",n.path?"; path="+n.path:"",n.domain?"; domain="+n.domain:"",n.secure?"; secure":""].join("")}for(var t,c,u=e?void 0:{},a=document.cookie?document.cookie.split("; "):[],d=0,f=a.length;d<f;d++){var p=a[d].split("="),s=(c=p.shift(),l.raw?c:decodeURIComponent(c)),m=p.join("=");if(e&&e===s){u=k(m,o);break}e||void 0===(m=k(m))||(u[s]=m)}return u};l.defaults={},v.removeCookie=function(e,o){return void 0!==v.cookie(e)&&(v.cookie(e,"",v.extend({},o,{expires:-1})),!v.cookie(e))}}); 17!function(p,f){var h,o,s,n,t,r,c,l,a=Array.prototype.slice,d=decodeURIComponent,m=p.param,e=p.bbq=p.bbq||{},i=p.event.special,u="hashchange",v="querystring",g="fragment",y="elemUrlAttr",b="location",$="href",x="src",j=/^.*\?|#.*$/g,w=/^.*\#/,A={};function N(e){return"string"==typeof e}function S(e){var t=a.call(arguments,1);return function(){return e.apply(this,t.concat(a.call(arguments)))}}function q(e,t,n,r,o){var a,i,c,u;return r!==h?(u=(i=n.match(e?/^([^#]*)\#?(.*)$/:/^([^#?]*)\??([^#]*)(#?.*)/))[3]||"",2===o&&N(r)?a=r.replace(e?w:j,""):(c=s(i[2]),r=N(r)?s[e?g:v](r):r,a=2===o?r:1===o?p.extend({},r,c):p.extend({},c,r),a=m(a),e&&(a=a.replace(l,d))),i[1]+(e?"#":a||!i[1]?"?":"")+a+u):t(n!==h?n:f[b][$])}function C(e,t,n){return t=t===h||"boolean"==typeof t?(n=t,m[e?g:v]()):N(t)?t.replace(e?w:j,""):t,s(t,n)}function E(r,o,a,i){return N(a)||"object"==typeof a||(i=a,a=o,o=h),this.each(function(){var e=p(this),t=o||c()[(this.nodeName||"").toLowerCase()]||"",n=t&&e.attr(t)||"";e.attr(t,m[r](n,a,i))})}m[v]=S(q,0,function(e){return e.replace(/(?:^[^?#]*\?([^#]*).*$)?.*/,"$1")}),m[g]=o=S(q,1,function(e){return e.replace(/^[^#]*#?(.*)$/,"$1")}),o.noEscape=function(e){e=e||"";var t=p.map(e.split(""),encodeURIComponent);l=new RegExp(t.join("|"),"g")},o.noEscape(",/"),p.deparam=s=function(e,f){var s={},l={true:!0,false:!1,null:null};return p.each(e.replace(/\+/g," ").split("&"),function(e,t){var n,r=t.split("="),o=d(r[0]),a=s,i=0,c=o.split("]["),u=c.length-1;if(u=/\[/.test(c[0])&&/\]$/.test(c[u])?(c[u]=c[u].replace(/\]$/,""),(c=c.shift().split("[").concat(c)).length-1):0,2===r.length)if(n=d(r[1]),f&&(n=n&&!isNaN(n)?+n:"undefined"===n?h:l[n]!==h?l[n]:n),u)for(;i<=u;i++)a=a[o=""===c[i]?a.length:c[i]]=i<u?a[o]||(c[i+1]&&isNaN(c[i+1])?{}:[]):n;else p.isArray(s[o])?s[o].push(n):s[o]!==h?s[o]=[s[o],n]:s[o]=n;else o&&(s[o]=f?h:"")}),s},s[v]=S(C,0),s[g]=n=S(C,1),p[y]||(p[y]=function(e){return p.extend(A,e)}
17)({a:$,base:$,iframe:x,img:x,input:x,form:"action",link:$,script:x}),c=p[y],p.fn[v]=S(E,v),p.fn[g]=S(E,g),e.pushState=t=function(e,t){N(e)&&/^#/.test(e)&&t===h&&(t=2);var n=e!==h,r=o(f[b][$],n?e:{},n?t:2);f[b][$]=r+(/#/.test(r)?"":"#")},e.getState=r=function(e,t){return e===h||"boolean"==typeof e?n(e):n(t)[e]},e.removeState=function(e){var n={};e!==h&&(n=r(),p.each(p.isArray(e)?e:arguments,function(e,t){delete n[t]})),t(n,2)},i[u]=p.extend(i[u],{add:function(e){var t;function n(e){var n=e[g]=o();e.getState=function(e,t){return e===h||"boolean"==typeof e?s(n,e):s(n,t)[e]},t.apply(this,arguments)}if(p.isFunction(e))return t=e,n;t=e.handler,e.handler=n}})}(jQuery,this),function(o,a,e){var t,i,c,u,f,n,r=o.event.special,s="location",l="hashchange",p="href",h=o.browser,d=document.documentMode,m=h.msie&&(void 0===d||d<8),v="on"+l in a&&!m;function g(e){return(e=e||a[s][p]).replace(/^[^#]*#?(.*)$/,"$1")}o[l+"Delay"]=100,r[l]=o.extend(r[l],{setup:function(){if(v)return!1;o(t.start)},teardown:function(){if(v)return!1;o(t.stop)}}),(n={}).start=function(){if(!i){var r=g();u||(u=f=function(e){return e},m&&(c=o('<iframe src="javascript:0"/>').hide().insertAfter("body")[0].contentWindow,f=function(){return g(c.document[s][p])},(u=function(e,t){if(e!==t){var n=c.document;n.open().close(),n[s].hash="#"+e}})(g()))),function e(){var t=g(),n=f(r);t!==r?(u(r=t,n),o(a).trigger(l)):n!==r&&(a[s][p]=a[s][p].replace(/#.*/,"")+"#"+n),i=setTimeout(e,o[l+"Delay"])}()}},n.stop=function(){c||(i&&clearTimeout(i),i=0)},t=n}(jQuery,this); 18!function(a){a.fn.unveil=function(t,i){var e,o=a(window),s=t||0,n=1<window.devicePixelRatio?"data-src-retina":"data-src",r=this;function u(){var t=r.filter(function(){var t=a(this);if(!t.is(":hidden")){var i=o.scrollTop(),e=i+o.height(),n=t.offset().top,r=n+t.height();return i-s<=r&&n<=e+s}});e=t.trigger("unveil"),r=r.not(e)}return this.one("unveil",function(){var t=this.getAttribute(n);(t=t||this.getAttribute("data-src"))&&(this.setAttribute("src",t),"function"==typeof i&&i.call(this))}),o.scroll(u),o.resize(u),u(),this}}(window.jQuery||window.Zepto); 19!function(c,p,m){function g(e,t){return typeof e===t}function v(){return"function"!=typeof p.createElement?p.createElement(arguments[0]):x?p.createElementNS.call(p,"http://www.w3.org/2000/svg",arguments[0]):p.createElement.apply(p,arguments)}function h(e){return e.replace(/([A-Z])/g,function(e,t){return"-"+t.toLowerCase()}).replace(/^ms-/,"-ms-")}function a(e,t){return function(){return e.apply(t,arguments)}}function s(e,t,n,s,r){var o=e.charAt(0).toUpperCase()+e.slice(1),i=(e+" "+u.join(o+" ")+o).split(" ");return g(t,"string")||g(t,"undefined")?function(e,t,n,s){function r(){i&&(delete w.style,delete w.modElem)}if(s=!g(s,"undefined")&&s,!g(n,"undefined")){var o=function(e,t){var n=e.length;if("CSS"in c&&"supports"in c.CSS){for(;n--;)if(c.CSS.supports(h(e[n]),t))return!0;return!1}if("CSSSupportsRule"in c){for(var s=[];n--;)s.push("("+h(e[n])+":"+t+")");return function(e,t,n,s){var r,o,i,a,l,f="modernizr",d=v("div"),u=((l=p.body)||((l=v(x?"svg":"body")).fake=!0),l);if(parseInt(n,10))for(;n--;)(i=v("div")).id=f+(n+1),d.appendChild(i);return(r=v("style")).type="text/css",r.id="s"+f,(u.fake?u:d).appendChild(r),u.appendChild(d),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(p.createTextNode(e)),d.id=f,u.fake&&(u.style.background="",u.style.overflow="hidden",a=y.style.overflow,y.style.overflow="hidden",y.appendChild(u)),o="absolute"==getComputedStyle(d,null).position,u.fake?(u.parentNode.removeChild(u),y.style.overflow=a,y.offsetHeight):d.parentNode.removeChild(d),!!o}("@supports ("+(s=s.join(" or "))+") { #modernizr { position: absolute; } }")}return m}(e,n);if(!g(o,"undefined"))return o}for(var i,a,l,f,d,u=["modernizr","tspan"];!w.style;)i=!0,w.modElem=v(u.shift()),w.style=w.modElem.style;for(l=e.length,a=0;a<l;a++)if(f=e[a],d=w.style[f],!!~(""+f).indexOf("-")&&(f=f.replace(/([a-z])-([a-z])/g,function(e,t,n){return t+n.toUpperCase()}).replace(/^-/,"")),w.style[f]!==m){if(s||g(n,"undefined"))return r(),"pfx"!=t||f;try{w.style[f]=n}catch(e){}if(w.style[f]!=d)return r(),"pfx"!=t||f}return r(),!1}(i,t,s,r):function(e,t,n){var s;for(var r in e)if(e[r]in t)return!1===n?e[r]:g(s=t[e[r]],"function")?a(s,n||t):s;return!1}(i=(e+" "+C.join(o+" ")+o).split(" "),t,n)}function t(e,t,n){return s(e,m,m,t,n)}var l=[],e={_version:"3.3.1",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){l.push({name:e,fn:t,options:n})},addAsyncTest:function(e){l.push({name:null,fn:e})}},f=function(){};f.prototype=e,f=new f;var d=[],y=p.documentElement,x="svg"===y.nodeName.toLowerCase(),n="Moz O ms Webkit",u=e._config.usePrefixes?n.split(" "):[];e._cssomPrefixes=u;var r={elem:v("modernizr")};f._q.push(function(){delete r.elem});var w={style:r.elem.style};f._q.unshift(function(){delete w.style});
19var C=e._config.usePrefixes?n.toLowerCase().split(" "):[];e._domPrefixes=C,e.testAllProps=s,e.testAllProps=t,f.addTest("cssanimations",t("animationName","a",!0)),f.addTest("csstransitions",t("transition","all",!0));var i=e._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):["",""];e._prefixes=i;var o="CSS"in c&&"supports"in c.CSS,S="supportsCSS"in c;f.addTest("supports",o||S),f.addTest("cssfilters",function(){if(f.supports)return t("filter","blur(2px)");var e=v("a");return e.style.cssText=i.join("filter:blur(2px); "),!!e.style.length&&(p.documentMode===m||9<p.documentMode)}),f.addTest("csspointerevents",function(){var e=v("a").style;return e.cssText="pointer-events:auto","auto"===e.pointerEvents}),f.addTest("cssgradients",function(){for(var e,t="background-image:",n="",s=0,r=i.length-1;s<r;s++)e=0===s?"to ":"",n+=t+i[s]+"linear-gradient("+e+"left top, #9f9, white);";f._config.usePrefixes&&(n+=t+"-webkit-gradient(linear,left top,right bottom,from(#9f9),to(white));");var o=v("a").style;return o.cssText=n,-1<(""+o.backgroundImage).indexOf("gradient")}),f.addTest("csstransforms",function(){return-1===navigator.userAgent.indexOf("Android 2.")&&t("transform","scale(1)",!0)}),f.addTest("flexbox",t("flexBasis","1px",!0)),f.addTest("placeholder","placeholder"in v("input")&&"placeholder"in v("textarea")),f.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(e){return!1}}),f.addTest("csscalc",function(){var e=v("a");return e.style.cssText="width:"+i.join("calc(10px);width:"),!!e.style.length}),f.addTest("svg",!!p.createElementNS&&!!p.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),function(){var e,t,n,s,r,o;for(var i in l)if(l.hasOwnProperty(i)){if(e=[],(t=l[i]).name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;n<t.options.aliases.length;n++)e.push(t.options.aliases[n].toLowerCase());for(s=g(t.fn,"function")?t.fn():t.fn,r=0;r<e.length;r++)1===(o=e[r].split(".")).length?f[o[0]]=s:(!f[o[0]]||f[o[0]]instanceof Boolean||(f[o[0]]=new Boolean(f[o[0]])),f[o[0]][o[1]]=s),d.push((s?"":"no-")+o.join("-"))}}(),function(e){var t=y.className,n=f._config.classPrefix||"";if(x&&(t=t.baseVal),f._config.enableJSClass){var s=new RegExp("(^|\\s)"+n+"no-js(\\s|$)");t=t.replace(s,"$1"+n+"js$2")}f._config.enableClasses&&(t+=" "+n+e.join(" "+n),x?y.className.baseVal=t:y.className=t)}(d),delete e.addTest,delete e.addAsyncTest;for(var T=0;T<f._q.length;T++)f._q[T]();c.Modernizr=f}(window,document); 20!function(e,t){"function"==typeof define&&define.amd?define("ev-emitter/ev-emitter",t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var i=this._events=this._events||{},n=i[e]=i[e]||[];return-1==n.indexOf(t)&&n.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var i=this._onceEvents=this._onceEvents||{};return(i[e]=i[e]||{})[t]=!0,this}},t.off=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){var n=i.indexOf(t);return-1!=n&&i.splice(n,1),this}},t.emitEvent=function(e,t){var i=this._events&&this._events[e];if(i&&i.length){i=i.slice(0),t=t||[];for(var n=this._onceEvents&&this._onceEvents[e],o=0;o<i.length;o++){var s=i[o];n&&n[s]&&(this.off(e,s),delete n[s]),s.apply(this,t)}return this}},t.allOff=function(){delete this._events,delete this._onceEvents},e}),function(t,i){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(e){return i(t,e)}):"object"==typeof module&&module.exports?module.exports=i(t,require("ev-emitter")):t.imagesLoaded=i(t,t.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){var s=t.jQuery,r=t.console;function h(e,t){for(var i in t)e[i]=t[i];return e}var a=Array.prototype.slice;function d(e,t,i){if(!(this instanceof d))return new d(e,t,i);var n,o=e;"string"==typeof e&&(o=document.querySelectorAll(e)),o?(this.elements=(n=o,Array.isArray(n)?n:"object"==typeof n&&"number"==typeof n.length?a.call(n):[n]),this.options=h({},this.options),"function"==typeof t?i=t:h(this.options,t),i&&this.on("always",i),this.getImages(),s&&(this.jqDeferred=new s.Deferred),setTimeout(this.check.bind(this))):r.error("Bad element for imagesLoaded "+(o||e))}(d.prototype=Object.create(e.prototype)).options={},d.prototype.getImages=function(){this.images=[],this.elements.forEac
20h(this.addElementImages,this)},d.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&m[t]){for(var i=e.querySelectorAll("img"),n=0;n<i.length;n++){var o=i[n];this.addImage(o)}if("string"==typeof this.options.background){var s=e.querySelectorAll(this.options.background);for(n=0;n<s.length;n++){var r=s[n];this.addElementBackgroundImages(r)}}}};var m={1:!0,9:!0,11:!0};function i(e){this.img=e}function n(e,t){this.url=e,this.element=t,this.img=new Image}return d.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var i=/url\((['"])?(.*?)\1\)/gi,n=i.exec(t.backgroundImage);null!==n;){var o=n&&n[2];o&&this.addBackground(o,e),n=i.exec(t.backgroundImage)}},d.prototype.addImage=function(e){var t=new i(e);this.images.push(t)},d.prototype.addBackground=function(e,t){var i=new n(e,t);this.images.push(i)},d.prototype.check=function(){var n=this;function t(e,t,i){setTimeout(function(){n.progress(e,t,i)})}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach(function(e){e.once("progress",t),e.check()}):this.complete()},d.prototype.progress=function(e,t,i){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+i,e,t)},d.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},(i.prototype=Object.create(e.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},i.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},i.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},i.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},i.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},i.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},i.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(n.prototype=Object.create(i.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},n.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},n.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},d.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((s=e).fn.imagesLoaded=function(e,t){return new d(this,e,t).jqDeferred.promise(s(this))})},d.makeJQueryPlugin(),d}); 21function number_format(t,e,r,o){t=(t+"").replace(/[^0-9+\-Ee.]/g,"");var n,i,a,c=isFinite(+t)?+t:0,l=isFinite(+e)?Math.abs(e):0,p=void 0===o?",":o,g=void 0===r?".":r,h="";return 3<(h=(l?(n=c,i=l,a=Math.pow(10,i),""+(Math.round(n*a)/a).toFixed(i)):""+Math.round(c)).split("."))[0].length&&(h[0]=h[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,p)),(h[1]||"").length<l&&(h[1]=h[1]||"",h[1]+=new Array(l-h[1].length+1).join("0")),h.join(g)}function str_replace(t,e,r,o){var n,i=0,a=0,c="",l="",p=0,g=[].concat(t),h=[].concat(e),f=r,s="[object Array]"===Object.prototype.toString.call(h),d="[object Array]"===Object.prototype.toString.call(f);if(f=[].concat(f),"object"==typeof t&&"string"==typeof e){for(c=e,e=new Array,i=0;i<t.length;i+=1)e[i]=c;c="",h=[].concat(e),s="[object Array]"===Object.prototype.toString.call(h)}for(o&&(this.window[o]=0),i=0,n=f.length;i<n;i++)if(""!==f[i])for(a=0,p=g.length;a<p;a++)c=f[i]+"",l=s?void 0!==h[a]?h[a]:"":h[0],f[i]=c.split(g[a]).join(l),o&&(this.window[o]+=c.split(g[a]).length-1);return d?f:f[0]}function ltrim(t,e){e=e?(e+"").replace(/([\[\]\(\)\.\?\/\*\{\}\+\$\^\:])/g,"$1"):" \\s ";var r=new RegExp("^["+e+"]+","g");return(t+"").replace(r,"")} 22!function(t,e){"object"==typeof module&&module.exports?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Spinner=e()}(this,function(){"use strict";function m(t,e){var i,o=document.createElement(t||"div");for(i in e)o[i]=e[i];return o}function y(t){for(var e=1,i=arguments.length;e<i;e++)t.appendChild(arguments[e]);return t}function o(t,e){var i,o,n=t.style;if(void 0!==n[e=e.charAt(0).toUpperCase()+e.slice(1)])return e;for(o=0;o<r.length;o++)if(void 0!==n[i=r[o]+e])return i}function v(t,e){for(var i in e)t.style[o(t,i)||i]=e[i];return t}function e(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var o in i)void 0===t[o]&&(t[o]=i[o])}return t}function g(t,e){return"string"==typeof t?t:t[e%t.length]}function i(t){this.opts=e(t||{},i.defaults,n)}var w,x,t,r=["webkit","Moz","ms","O"],b={},n={lines:12,length:7,width:5,radius:10,scale:1,corners:1,color:"#000",opacity:.25,rotate:0,direction:1,speed:1,trail:100,fps:20,zIndex:2e9,className:"spinner",top:"50%",left:"50%",shadow:!1,hwaccel:!1,position:"absolute"};if(i.defaults={},e(i.prototype,{spin:function(t){this.stop();var i=this,o=i.opts,n=i.el=m(null,{className:o.className});if(v(n,{position:o.position,width:0,zIndex:o.zIndex,left:o.left,top:o.top}),t&&t.insertBefore(n,t.firstChild||null),n.setAttribute("role","progressbar"),i.lines(n,i.opts),!w){var r,s=0,a=(o.lines-1)*(1-o.direction)/2,l=o.fps,c=l/o.speed,d=(1-o.opacity)/(c*o.trail/100),p=c/o.lines;!function t(){s++;for(var e=0;e<o.lines;e++)r=Math.max(1-(s+(o.lines-e)*p)%c*d,o.opacity),i.opacity(n,e*o.direction+a,r,o);i.timeout=i.el&&setTimeout(t,~~(1e3/l))}()}return i},stop:function(){var t=this.el;return t&&(clearTimeout(this.timeout),t.parentNode&&t.parentNode.removeChild(t),this.el=void 0),this},lines:function(t,i){function e(t,e){return v(m(),{position:"absolute",width:i.scale*(i.length+i.width)+"px",height:i.scale*i.width+"px",background:t,boxShadow:e,transformOrigin:"left",transform:"rotate("+~~(360/i.lines*n+i.rotate)+"deg) translate("+i.scale*i.radius+"px,0)",borderRadius:(i.corners*i.scale*i.width>>1)+"px"})}for(var o,n=0,r=(i.lines-1)*(1-i.direction)/2;n<i.lines;n++)o=v(m(),{position:"absolute",top:1+~(i.scale*i.width/2)+"px",transform:i.hwaccel?"translate3d(0,
220,0)":"",opacity:i.opacity,animation:w&&(s=i.opacity,a=i.trail,l=r+n*i.direction,c=i.lines,void 0,void 0,void 0,void 0,void 0,d=["opacity",a,~~(100*s),l,c].join("-"),p=.01+l/c*100,u=Math.max(1-(1-s)/a*(100-p),s),f=w.substring(0,w.indexOf("Animation")).toLowerCase(),h=f&&"-"+f+"-"||"",b[d]||(x.insertRule("@"+h+"keyframes "+d+"{0%{opacity:"+u+"}"+p+"%{opacity:"+s+"}"+(p+.01)+"%{opacity:1}"+(p+a)%100+"%{opacity:"+s+"}100%{opacity:"+u+"}}",x.cssRules.length),b[d]=1),d+" "+1/i.speed+"s linear infinite")}),i.shadow&&y(o,v(e("#000","0 0 4px #000"),{top:"2px"})),y(t,y(o,e(g(i.color,n),"0 0 1px rgba(0,0,0,.1)")));var s,a,l,c,d,p,u,f,h;return t},opacity:function(t,e,i){e<t.childNodes.length&&(t.childNodes[e].style.opacity=i)}}),"undefined"!=typeof document){t=m("style",{type:"text/css"}),y(document.getElementsByTagName("head")[0],t),x=t.sheet||t.styleSheet;var s=v(m("group"),{behavior:"url(#default#VML)"});!o(s,"transform")&&s.adj?function(){function c(t,e){return m("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',e)}x.addRule(".spin-vml","behavior:url(#default#VML)"),i.prototype.lines=function(t,o){function n(){return v(c("group",{coordsize:s+" "+s,coordorigin:-r+" "+-r}),{width:s,height:s})}function e(t,e,i){y(l,y(v(n(),{rotation:360/o.lines*t+"deg",left:~~e}),y(v(c("roundrect",{arcsize:o.corners}),{width:r,height:o.scale*o.width,left:o.scale*o.radius,top:-o.scale*o.width>>1,filter:i}),c("fill",{color:g(o.color,t),opacity:o.opacity}),c("stroke",{opacity:0}))))}var i,r=o.scale*(o.length+o.width),s=2*o.scale*r,a=-(o.width+o.length)*o.scale*2+"px",l=v(n(),{position:"absolute",top:a,left:a});if(o.shadow)for(i=1;i<=o.lines;i++)e(i,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)");for(i=1;i<=o.lines;i++)e(i);return y(t,l)},i.prototype.opacity=function(t,e,i,o){var n=t.firstChild;o=o.shadow&&o.lines||0,n&&e+o<n.childNodes.length&&(n=(n=(n=n.childNodes[e+o])&&n.firstChild)&&n.firstChild)&&(n.opacity=i)}}():w=o(s,"animation")}return i}); 23!function(){"use strict";function e(e,t){return t.forEach(function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach(function(n){if("default"!==n&&!(n in e)){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})}),Object.freeze(e)}var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},t(e,n)};function n(e,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o=function(){return o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}function s(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{u(r.next(e))}catch(e){o(e)}}function s(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}u((r=r.apply(e,t||[])).next())})}function u(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(u){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,u])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);
vendor: 4,394 bytes, line 23
23if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function l(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}function d(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(r||(r={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(i||(i={}));var f,v="AMP",p="".concat(v,"_unsent"),h="$default_instance",g="https://api2.amplitude.com/2/httpapi",m="https://api.eu.amplitude.com/2/httpapi",y="https://api2.amplitude.com/batch",b="https://api.eu.amplitude.com/batch",w="dclid",E="fbclid",S="gbraid",k="gclid",T="ko_click_id",P="li_fat_id",x="msclkid",_="rdt_cid",I="ttclid",A="twclid",O="wbraid",C={utm_campaign:void 0,utm_content:void 0,utm_id:void 0,utm_medium:void 0,utm_source:void 0,utm_term:void 0,referrer:void 0,referring_domain:void 0,dclid:void 0,gbraid:void 0,gclid:void 0,fbclid:void 0,ko_click_id:void 0,li_fat_id:void 0,msclkid:void 0,rdt_cid:void 0,ttclid:void 0,twclid:void 0,wbraid:void 0},R=["access-control-allow-origin","access-control-allow-credentials","access-control-expose-headers","access-control-max-age","access-control-allow-methods","access-control-allow-headers","accept-patch","accept-ranges","age","allow","alt-svc","cache-control","connection","content-disposition","content-encoding","content-language","content-length","content-location","content-md5","content-range","content-type","date","delta-base","etag","expires","im","last-modified","link","location","permanent","p3p","pragma","proxy-authenticate","public-key-pins","retry-after","server","status","strict-transport-security","trailer","transfer-encoding","tk","upgrade","vary","via","warning","www-authenticate","x-b3-traceid","x-frame-options"],L=["authorization","cookie","set-cookie"],D=function(e){if(Object.keys(e).length>1e3)return!1;for(var t in e){var n=e[t];if(!N(t,n))return!1}return!0},N=function(e,t){var n,r;if("string"!=typeof e)return!1;if(Array.isArray(t)){var i=!0;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;if(Array.isArray(s))return!1;if("object"==typeof s)i=i&&D(s);else if(!["number","string"].includes(typeof s))return!1;if(!i)return!1}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return D(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},M=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return o({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(f.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(f.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(f.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(f.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(f.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(f.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(f.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(f.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(f.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[f.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var r=this._properties[e];return void 0===r&&(r={},this._properties[e]=r),r[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[f.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===f.ADD?"number"==typeof n:e===f.UNSET||e===f.REMOVE||N(t,
23n)))},e}();!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(f||(f={}));var j,U=[f.CLEAR_ALL,f.UNSET,f.SET,f.SET_ONCE,f.ADD,f.APPEND,f.PREPEND,f.PREINSERT,f.POSTINSERT,f.REMOVE];!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(j||(j={}));var q,F=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=j.Unknown),{event:e,code:t,message:n}},B=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},H=d([],l(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),V=function(e){var t,n=B();if(!(null===(t=null==n?void 0:n.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,V)}(e);var r=n.crypto.getRandomValues(new Uint8Array(16));return r[6]=15&r[6]|64,r[8]=63&r[8]|128,d([],l(r.entries()),!1).map(function(e){var t=l(e,2),n=t[0],r=t[1];return[4,6,8,10].includes(n)?"-".concat(H[r]):H[r]}).join("")},z=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[],this.pluginStatus=new Map,this._optOutListeners=[]}return e.prototype.register=function(e,t){var n,r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return void 0===e.name&&(e.name=V(),this.loggerProvider.warn("Plugin name is undefined.\n Generating a random UUID for plugin name: ".concat(e.name,".\n Set a name for the plugin to prevent it from being added multiple times."))),i=e.name,this.pluginStatus.has(i)?(this.loggerProvider.warn("Plugin with name ".concat(i," already exists, skipping registration")),[2]):(e.type=null!==(n=e.type)&&void 0!==n?n:"enrichment",this.pluginStatus.set(i,"locked"),[4,null===(r=e.setup)||void 0===r?void 0:r.call(e,t,this.client)]);case 1:return o.sent(),"locked"!==this.pluginStatus.get(i)?[2]:(this.plugins.push(e),this.pluginStatus.set(i,"installed"),[2])}})})},e.prototype.deregister=function(e,t){var n;return s(this,void 0,void 0,function(){var r,i;return u(this,function(o){switch(o.label){case 0:return this.pluginStatus.delete(e),r=this.plugins.findIndex(function(t){return t.name===e}),-1===r?(t.loggerProvider.warn("Plugin with name ".concat(e," does not exist, skipping deregistration")),[2]):(i=this.plugins[r],this.plugins.splice(r,1),[4,null===(n=i.teardown)||void 0===n?void 0:n.call(i)]);case 1:return o.sent(),[2]}})})},e.prototype.reset=function(e){this._clearOptOutListeners(),this.applying=!1,this.plugins.map(function(e){var t;return null===(t=e.teardown)||void 0===t?void 0:t.call(e)}),this.plugins=[],this.pluginStatus.clear(),this.client=e},e.prototype.push=function(e){var t=this;return new Promise(function(n){t.queue.push([e,n]),t.scheduleApply(0)})},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout(function(){t.apply(t.queue.shift()).then(function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)})},e))},e.prototype.apply=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,a,s,d,f,v,p,h,g,m,y,b,w,E,S,k,T;return u(this,function(u){switch(u.label){case 0:if(!e)return[2];t=l(e,1),n=t[0],r=l(e,2),i=r[1],this.loggerProvider.log("Timeline.apply: Initial event",n),a=this.plugins.filter(function(e){return"before"===e.type}),u.label=1;case 1:u.trys.push([1,6,7,8]),s=c(a),d=s.next(),u.label=2;case 2:return d.done?[3,5]:(g=d.value).execute?[4,g.execute(o({},n))]:[3,4];case 3:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after before plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=4;case 4:return d=s.next(),[3,2];case 5:return[3,8];case 6:return f=u.sent(),E={error:f},[3,8];case 7:try{d&&!d.done&&(S=s.return)&&S.call(s)}finally{if(E)throw E.error}
vendor: 4,238 bytes, line 23
23return[7];case 8:v=this.plugins.filter(function(e){return"enrichment"===e.type||void 0===e.type}),u.label=9;case 9:u.trys.push([9,14,15,16]),p=c(v),h=p.next(),u.label=10;case 10:return h.done?[3,13]:(g=h.value).execute?[4,g.execute(o({},n))]:[3,12];case 11:if(null===(m=u.sent()))return this.loggerProvider.log("Timeline.apply: Event filtered out by enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),i({event:n,code:0,message:""}),[2];n=m,this.loggerProvider.log("Timeline.apply: Event after enrichment plugin '".concat(String(g.name),"', event: ").concat(JSON.stringify(n))),u.label=12;case 12:return h=p.next(),[3,10];case 13:return[3,16];case 14:return y=u.sent(),k={error:y},[3,16];case 15:try{h&&!h.done&&(T=p.return)&&T.call(p)}finally{if(k)throw k.error}return[7];case 16:return b=this.plugins.filter(function(e){return"destination"===e.type}),this.loggerProvider.log("Timeline.apply: Final event before destinations, event: ".concat(JSON.stringify(n))),w=b.map(function(e){var t=o({},n);return e.execute(t).catch(function(e){return F(t,0,String(e))})}),Promise.all(w).then(function(e){var t=l(e,1)[0]||F(n,100,"Event not tracked, no destination plugins on the instance");i(t)}),[2]}})})},e.prototype.flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r=this;return u(this,function(i){switch(i.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map(function(e){return r.apply(e)}))];case 1:return i.sent(),t=this.plugins.filter(function(e){return"destination"===e.type}),n=t.map(function(e){return e.flush&&e.flush()}),[4,Promise.all(n)];case 2:return i.sent(),[2]}})})},e.prototype.addOptOutListener=function(e){this._optOutListeners.push(e)},e.prototype._clearOptOutListeners=function(){this._optOutListeners=[]},e.prototype.onIdentityChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onIdentityChanged)||void 0===n||n.call(t,e)})},e.prototype.onSessionIdChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onSessionIdChanged)||void 0===n||n.call(t,e)})},e.prototype.onOptOutChanged=function(e){this.plugins.forEach(function(t){var n;null===(n=t.onOptOutChanged)||void 0===n||n.call(t,e)}),this._callOptOutListeners(e)},e.prototype._callOptOutListeners=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:u.trys.push([0,7,8,9]),t=c(this._optOutListeners),n=t.next(),u.label=1;case 1:if(n.done)return[3,6];r=n.value,u.label=2;case 2:return u.trys.push([2,4,,5]),[4,r(e)];case 3:return u.sent(),[3,5];case 4:return i=u.sent(),this.loggerProvider.error("Error calling optOut listener",i),[3,5];case 5:return n=t.next(),[3,1];case 6:return[3,9];case 7:return o=u.sent(),a={error:o},[3,9];case 8:try{n&&!n.done&&(s=t.return)&&s.call(t)}finally{if(a)throw a.error}return[7];case 9:return[2]}})})},e.prototype.onReset=function(){this.plugins.forEach(function(e){var t;null===(t=e.onReset)||void 0===t||t.call(e)})},e}(),W=function(e,t){return o(o({},t),{event_type:i.IDENTIFY,user_properties:e.getUserProperties()})},$=function(e){return{promise:e||Promise.resolve()}},K=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.isReady=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new z(this),this.name=e}return e.prototype._init=function(e){return s(this,void 0,void 0,function(){var t=this;return u(this,function(n){switch(n.label){case 0:return this.config=e,this.timeline.reset(this),this.timeline.loggerProvider=this.config.loggerProvider,[4,this.runQueuedFunctions("q",function(){return t.isReady=!0})];case 1:return n.sent(),[2]}})})},e.prototype.runQueuedFunctions=function(e,t){return s(this,void 0,void 0,function(){var n,r,i,o,a,s,l,d;return u(this,function(u){switch(u.label){case 0:n=this[e],this[e]=[],u.label=1;case 1:u.trys.push([1,8,9,10]),r=c(n),i=r.next(),u.label=2;case 2:return i.done?[3,7]:(o=i.value,(a=o())&&"promise"in a?[4,a.promise]:[3,4]);case 3:return u.sent(),[3,6];case 4:return[4,a];case 5:u.sent(),u.label=6;case 6:return i=r.next(),[3,2];case 7:return[3,10];case 8:return s=u.sent(),l={error:s},[3,10];case 9:try{i&&!i.done&&(d=r.return)&&d.call(r)}finally{if(l)throw l.error}
23return[7];case 10:return this[e].length?[4,this.runQueuedFunctions(e,t)]:[3,12];case 11:return u.sent(),[3,13];case 12:null==t||t(),u.label=13;case 13:return[2]}})})},e.prototype.track=function(e,t,n){var r=function(e,t,n){return o(o(o({},"string"==typeof e?{event_type:e}:e),n),t&&{event_properties:t})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.identify=function(e,t){var n=W(e,t);return this.userProperties=this.getOperationAppliedUserProperties(n.user_properties),$(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,n,r){var a=function(e,t,n,r){var a;return o(o({},r),{event_type:i.GROUP_IDENTIFY,group_properties:n.getUserProperties(),groups:(a={},a[e]=t,a)})}(e,t,n,r);return $(this.dispatch(a))},e.prototype.setGroup=function(e,t,n){var r=function(e,t,n){var r,a=new M;return a.set(e,t),o(o({},n),{event_type:i.IDENTIFY,user_properties:a.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,n);return this.userProperties=this.getOperationAppliedUserProperties(r.user_properties),$(this.dispatch(r))},e.prototype.revenue=function(e,t){var n=function(e,t){return o(o({},t),{event_type:i.REVENUE,event_properties:e.getEventProperties()})}(e,t);return $(this.dispatch(n))},e.prototype.add=function(e){return this.isReady?this._addPlugin(e):(this.q.push(this._addPlugin.bind(this,e)),$())},e.prototype._addPlugin=function(e){return $(this.timeline.register(e,this.config))},e.prototype.remove=function(e){return this.isReady?this._removePlugin(e):(this.q.push(this._removePlugin.bind(this,e)),$())},e.prototype._removePlugin=function(e){return $(this.timeline.deregister(e,this.config))},e.prototype.dispatchWithCallback=function(e,t){if(!this.isReady)return t(F(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return s(this,void 0,void 0,function(){var t=this;return u(this,function(n){return this.isReady?[2,this.process(e)]:[2,new Promise(function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))})]})})},e.prototype.getOperationAppliedUserProperties=function(e){var t,n=null!==(t=this.userProperties)&&void 0!==t?t:{},i=o({},n);if(void 0===e)return i;var a={};return Object.keys(e).forEach(function(t){Object.values(r).includes(t)||(a[t]=e[t])}),U.forEach(function(t){if(Object.keys(e).includes(t)){var n=e[t];
vendor: 51,380 bytes, line 23
23switch(t){case r.CLEAR_ALL:Object.keys(i).forEach(function(e){delete i[e]});break;case r.UNSET:Object.keys(n).forEach(function(e){delete i[e]});break;case r.SET:Object.assign(i,n)}}}),Object.assign(i,a),i},e.prototype.process=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),this.config.optOut?[2,F(e,0,"Event skipped due to optOut config")]:(e.event_type===i.IDENTIFY&&this.timeline.onIdentityChanged({userProperties:this.userProperties}),[4,this.timeline.push(e)]);case 1:return 200===(r=o.sent()).code?this.config.loggerProvider.log(r.message):100===r.code?this.config.loggerProvider.warn(r.message):this.config.loggerProvider.error(r.message),[2,r];case 2:return t=o.sent(),n=String(t),this.config.loggerProvider.error(n),[2,r=F(e,0,n)];case 3:return[2]}})})},e.prototype.setOptOut=function(e){this.isReady?this._setOptOut(e):this.q.push(this._setOptOut.bind(this,Boolean(e)))},e.prototype._setOptOut=function(e){this.config.optOut!==e&&(this.config.optOut=Boolean(e),this.timeline.onOptOutChanged(e))},e.prototype.flush=function(){return $(this.timeline.flush())},e.prototype.plugin=function(e){var t=this.timeline.plugins.find(function(t){return t.name===e});if(void 0!==t)return t;this.config.loggerProvider.debug("Cannot find plugin with name ".concat(e))},e.prototype.plugins=function(e){return this.timeline.plugins.filter(function(t){return t instanceof e})},e}(),J=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setCurrency=function(e){return this.currency=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setReceipt=function(e){return this.receipt=e,this},e.prototype.setReceiptSig=function(e){return this.receiptSig=e,this},e.prototype.setEventProperties=function(e){try{var t=JSON.parse(JSON.stringify(e));D(t)&&(this.properties=t)}catch(e){}return this},e.prototype.getEventProperties=function(){var e=this.properties?o({},this.properties):{};return e[q.REVENUE_PRODUCT_ID]=this.productId,e[q.REVENUE_QUANTITY]=this.quantity,e[q.REVENUE_PRICE]=this.price,e[q.REVENUE_TYPE]=this.revenueType,e[q.REVENUE_CURRENCY]=this.currency,e[q.REVENUE]=this.revenue,e[q.RECEIPT]=this.receipt,e[q.RECEIPT_SIG]=this.receiptSig,e},e}();!function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue",e.RECEIPT="$receipt",e.RECEIPT_SIG="$receiptSig"}(q||(q={}));var G;!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(G||(G={}));var Y="Amplitude Logger ",X=function(){function e(){this.logLevel=G.None}return e.prototype.disable=function(){this.logLevel=G.None},e.prototype.enable=function(e){void 0===e&&(e=G.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Verbose||console.log("".concat(Y,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Warn||console.warn("".concat(Y,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Error||console.error("".concat(Y,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<G.Debug||console.log("".concat(Y,"[Debug]: ").concat(e.join(" ")))},e}(),Q=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:h,logLevel:G.Warn,loggerProvider:new X,offline:!1,optOut:!1,serverUrl:g,serverZone:"US",useBatch:!1}},Z=function(){function e(e){var t,n,r,i;this._optOut=!1;var o=Q();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(n=e.logLevel)&&void 0!==n?n:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(r=e.optOut)&&void 0!==r?r:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(i=e.useBatch)&&void 0!==i?i:o.useBatch,this.loggerProvider.enable(this.logLevel);var a=te(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=a.serverZone,this.serverUrl=a.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e},enumerable:!1,configurable:!0}),e}(),ee=function(e,t){return"EU"===e?t?b:m:t?y:g},te=function(e,t,n){if(void 0===e&&(e=""),void 0===t&&(t=Q().serverZone),void 0===n&&(n=Q().useBatch),e)return{serverUrl:e,serverZone:void 0};var r=["US","EU"].includes(t)?t:Q().serverZone;return{serverZone:r,serverUrl:ee(r,n)}},ne=function(){function e(){this.sdk={metrics:{histogram:{}}}}return e.prototype.recordHistogram=function(e,t){this.sdk.metrics.histogram[e]=t},e}();function re(e){return e>=200&&e<300}var ie=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map(function(e){return e.trim()})},oe=function(e){return function(){var t=o({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},ae=function(e,t){var n,r;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var i=c(t.split(".")),o=i.next();!o.done;o=i.next()){var a=o.value;if(!(a in e))return;e=e[a]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return e},se=function(e,t){return function(){var n,r,i={};try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;i[s]=ae(e,s)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}},ue=function(e,t,n,r,i){return void 0===i&&(i=null),function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=n(),u=s.logger,c=s.logLevel;if(c&&c<G.Debug||!c||!u)return e.apply(i,o);var l={type:"invoke public method",name:t,args:o,stacktrace:ie(1),time:{start:(new Date).toISOString()},states:{}};r&&l.states&&(l.states.before=r());var d=e.apply(i,o);return d&&d.promise?d.promise.then(function(){r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))}):(r&&l.states&&(l.states.after=r()),l.time&&(l.time.end=(new Date).toISOString()),u.debug(JSON.stringify(l,null,2))),d}},ce=new Set([g,m,y,b]);function le(e){var t="";try{"body"in e&&(t=JSON.stringify(e.body,null,2))}catch(e){}return t}var de=function(){function e(e){this.name="amplitude",this.type="destination",this.retryTimeout=1e3,this.throttleTimeout=3e4,this.storageKey="",this.scheduleId=null,this.scheduledTimeout=0,this.flushId=null,this.queue=[],this.diagnosticsClient=null==e?void 0:e.diagnosticsClient}return e.prototype.setup=function(e){var t;return s(this,void 0,void 0,function(){var n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config=e,this.storageKey="".concat(p,"_").concat(this.config.apiKey.substring(0,10)),[4,null===(t=this.config.storageProvider)||void 0===t?void 0:t.get(this.storageKey)];case 1:return(n=i.sent())&&n.length>0&&Promise.all(n.map(function(e){return r.execute(e)})).catch(),[2,Promise.resolve(void 0)]}})})},e.prototype.execute=function(e){var t=this;return e.insert_id||(e.insert_id=V()),new Promise(function(n){var r={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.queue.push(r),t.schedule(t.config.flushIntervalMillis),t.saveEvents()})},e.prototype.removeEventsExceedFlushMaxRetries=function(e){var t=this;return e.filter(function(e){return e.attempts+=1,e.attempts<t.config.flushMaxRetries||(t.fulfillRequest([e],500,"Event rejected due to exceeded retry count"),!1)})},e.prototype.scheduleEvents=function(e){var t=this;e.forEach(function(e){t.schedule(0===e.timeout?t.config.flushIntervalMillis:e.timeout)})},e.prototype.schedule=function(e){var t=this;if(!this.config.offline)return null===this.scheduleId||this.scheduleId&&e>this.scheduledTimeout?(this.scheduleId&&clearTimeout(this.scheduleId),this.scheduledTimeout=e,void(this.scheduleId=setTimeout(function(){t.queue=t.queue.map(function(e){return e.timeout=0,e}),t.flush(!0)},e))):void 0},e.prototype.resetSchedule=function(){this.scheduleId=null,this.scheduledTimeout=0},e.prototype.flush=function(e){return void 0===e&&(e=!1),s(this,void 0,void 0,function(){var t,n,r=this;return u(this,function(i){switch(i.label){case 0:return this.config.offline?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush while offline."),[2]):this.flushId?(this.resetSchedule(),this.config.loggerProvider.debug("Skipping flush because previous flush has not resolved."),[2]):(this.flushId=this.scheduleId,this.resetSchedule(),t=[],n=[],this.queue.forEach(function(e){return 0===e.timeout?t.push(e):n.push(e)}),o=t,a=this.config.flushQueueSize,c=Math.max(a,1),[4,o.reduce(function(e,t,n){var r=Math.floor(n/c);return e[r]||(e[r]=[]),e[r].push(t),e},[]).reduce(function(t,n){return s(r,void 0,void 0,function(){return u(this,function(r){switch(r.label){case 0:return[4,t];case 1:return r.sent(),[4,this.send(n,e)];case 2:return[2,r.sent()]}})})},Promise.resolve())]);case 1:return i.sent(),this.flushId=null,this.scheduleEvents(this.queue),[2]}var o,a,c})})},e.prototype.send=function(e,t){var n;return void 0===t&&(t=!0),s(this,void 0,void 0,function(){var r,i,o,s,c,l;return u(this,function(u){switch(u.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];r={api_key:this.config.apiKey,events:e.map(function(e){var t=e.event;return t.extra,a(t,["extra"])}),options:{min_id_length:this.config.minIdLength},client_upload_time:(new Date).toISOString(),request_metadata:this.config.requestMetadata},this.config.requestMetadata=new ne,u.label=1;case 1:return u.trys.push([1,3,,4]),i=te(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,o=function(e,t){return void 0===t&&(t=!1),!!ce.has(e)||t}(i,this.config.enableRequestBodyCompression),[4,this.config.transportProvider.send(i,r,o)];case 2:return null===(s=u.sent())?(this.fulfillRequest(e,0,"Unexpected error occurred"),[2]):t?(this.handleResponse(s,e),[3,4]):("body"in s?this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(le(s))):this.fulfillRequest(e,s.statusCode,s.status),[2]);case 3:return c=u.sent(),l=(d=c)instanceof Error?d.message:String(d),this.config.loggerProvider.error(l),null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful.from.catch.error",{events:e.map(function(e){return e.event.event_type}),message:l,stack_trace:ie()}),this.handleResponse({status:j.Failed,statusCode:0},e),[3,4];case 4:return[2]}var d})})},e.prototype.handleResponse=function(e,t){var n;re(e.statusCode)||null===(n=this.diagnosticsClient)||void 0===n||n.recordEvent("analytics.events.unsuccessful",{events:t.map(function(e){return e.event.event_type}),code:e.statusCode,status:e.status,body:le(e),stack_trace:ie()});var r=e.status;switch(r){case j.Success:this.handleSuccessResponse(e,t);break;case j.Invalid:this.handleInvalidResponse(e,t);break;case j.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case j.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.config.loggerProvider.warn("{code: 0, error: \"Status '".concat(r,"' provided for ").concat(t.length,' events"}')),this.handleOtherResponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var r=d(d(d(d([],l(Object.values(e.body.eventsWithInvalidFields)),!1),l(Object.values(e.body.eventsWithMissingFields)),!1),l(Object.values(e.body.eventsWithInvalidIdLengths)),!1),l(e.body.silencedEvents),!1).flat(),i=new Set(r),o=t.filter(function(t,r){if(!i.has(r))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)});o.length>0&&this.config.loggerProvider.warn(le(e));var a=this.removeEventsExceedFlushMaxRetries(o);this.scheduleEvents(a)}},e.prototype.handlePayloadTooLargeResponse=function(e,t){if(1!==t.length){this.config.loggerProvider.warn(le(e)),this.config.flushQueueSize/=2;var n=this.removeEventsExceedFlushMaxRetries(t);this.scheduleEvents(n)}else this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,r=Object.keys(e.body.exceededDailyQuotaUsers),i=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,a=new Set(r),s=new Set(i),u=new Set(o),c=t.filter(function(t,r){if(!(t.event.user_id&&a.has(t.event.user_id)||t.event.device_id&&s.has(t.event.device_id)))return u.has(r)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)});c.length>0&&this.config.loggerProvider.warn(le(e));var l=this.removeEventsExceedFlushMaxRetries(c);this.scheduleEvents(l)},e.prototype.handleOtherResponse=function(e){var t=this,n=e.map(function(e){return e.timeout=e.attempts*t.retryTimeout,e}),r=this.removeEventsExceedFlushMaxRetries(n);this.scheduleEvents(r)},e.prototype.fulfillRequest=function(e,t,n){var r,i,o;re(t)?null===(o=this.diagnosticsClient)||void 0===o||o.increment("analytics.events.sent",e.length):(null===(r=this.diagnosticsClient)||void 0===r||r.increment("analytics.events.dropped",e.length),null===(i=this.diagnosticsClient)||void 0===i||i.recordEvent("analytics.events.dropped",{events:e.map(function(e){return e.event.event_type}),code:t,message:n,stack_trace:ie()})),this.removeEvents(e),e.forEach(function(e){return e.callback(F(e.event,t,n))})},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=this.queue.map(function(e){return e.event});this.config.storageProvider.set(this.storageKey,e)}},e.prototype.removeEvents=function(e){this.queue=this.queue.filter(function(t){return!e.some(function(e){return e.event.insert_id===t.event.insert_id})}),this.saveEvents()},e}(),fe=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:ve(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),ve=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},pe=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),he=function(){return he=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},he.apply(this,arguments)};function ge(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function me(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,o=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}"function"==typeof SuppressedError&&SuppressedError;var ye=function(e,t){var n,r,i=typeof e;if(i!==typeof t)return!1;try{for(var o=ge(["string","number","boolean","undefined"]),a=o.next();!a.done;a=o.next()){if(a.value===i)return e===t}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var s=Array.isArray(e),u=Array.isArray(t);if(s!==u)return!1;if(!s||!u){var c=Object.keys(e).sort(),l=Object.keys(t).sort();if(!ye(c,l))return!1;var d=!0;return Object.keys(e).forEach(function(n){ye(e[n],t[n])||(d=!1)}),d}for(var f=0;f<e.length;f++)if(!ye(e[f],t[f]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),n=t.length,r=new Array(n);n--;)r[n]=[t[n],e[t[n]]];return r});var be=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=he({},this.identity.userProperties),n=he(he({},this.identity),{userProperties:t});return{setUserId:function(e){return n.userId=e,this},setDeviceId:function(e){return n.deviceId=e,this},setUserProperties:function(e){return n.userProperties=e,this},setOptOut:function(e){return n.optOut=e,this},updateUserProperties:function(e){var t,r,i,o,a,s,u=n.userProperties||{};try{for(var c=ge(Object.entries(e)),l=c.next();!l.done;l=c.next()){var d=me(l.value,2),f=d[0],v=d[1];switch(f){case"$set":try{for(var p=(i=void 0,ge(Object.entries(v))),h=p.next();!h.done;h=p.next()){var g=me(h.value,2),m=g[0],y=g[1];u[m]=y}}catch(e){i={error:e}}finally{try{h&&!h.done&&(o=p.return)&&o.call(p)}finally{if(i)throw i.error}}break;case"$unset":try{for(var b=(a=void 0,ge(Object.keys(v))),w=b.next();!w.done;w=b.next()){delete u[m=w.value]}}catch(e){a={error:e}}finally{try{w&&!w.done&&(s=b.return)&&s.call(b)}finally{if(a)throw a.error}}break;case"$clearAll":u={}}}}catch(e){t={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(t)throw t.error}}return n.userProperties=u,this},commit:function(){return e.setIdentity(n),this}}},e.prototype.getIdentity=function(){return he({},this.identity)},e.prototype.setIdentity=function(e){var t=he({},this.identity);this.identity=he({},e),ye(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),we="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,Ee=function(){function e(){this.identityStore=new be,this.eventBridge=new pe,this.applicationContextProvider=new fe}return e.getInstance=function(t){return we.analyticsConnectorInstances||(we.analyticsConnectorInstances={}),we.analyticsConnectorInstances[t]||(we.analyticsConnectorInstances[t]=new e),we.analyticsConnectorInstances[t]},e}(),Se=function(e){return void 0===e&&(e=h),Ee.getInstance(e)},ke=function(){function e(){this.name="identity",this.type="before",this.identityStore=Se().identityStore}return e.prototype.execute=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){return(t=e.user_properties)&&this.identityStore.editIdentity().updateUserProperties(t).commit(),[2,e]})})},e.prototype.setup=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return e.instanceName&&(this.identityStore=Se(e.instanceName).identityStore),[2]})})},e}(),Te=function(e,t){return void 0===t&&(t=Date.now()),Date.now()-t>e},Pe=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},xe=function(){var e,t,n,r;if("undefined"==typeof navigator)return"";var i=navigator.userLanguage;return null!==(r=null!==(n=null!==(t=null===(e=navigator.languages)||void 0===e?void 0:e[0])&&void 0!==t?t:navigator.language)&&void 0!==n?n:i)&&void 0!==r?r:""},_e=function(){var e,t=B();return(null===(e=null==t?void 0:t.location)||void 0===e?void 0:e.search)?t.location.search.substring(1).split("&").filter(Boolean).reduce(function(e,t){var n=t.split("=",2),r=Ie(n[0]),i=Ie(n[1]);return i?(e[r]=i,e):e},{}):{}},Ie=function(e){void 0===e&&(e="");try{return decodeURIComponent(e)}catch(e){return""}},Ae=function(e,t){return!t||!t.length||t.some(function(t){return"string"==typeof t?e===t:e.match(t)})},Oe=function(e,t){var n=e;try{n=decodeURI(e)}catch(e){null==t||t.error("Malformed URI sequence: ",e)}return n},Ce=function(e,t){var n=function(e){var t=0;if(0===e.length)return t;for(var n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return t}(e.toString());return 31*Math.abs(n)%1e5/1e5<t},Re=function(e){var t={};for(var n in e){var r=e[n];r&&(t[n]=r)}return t},Le=function(){function e(){this.memoryStorage=new Map}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,!0]})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return[2,this.memoryStorage.get(e)]})})},e.prototype.getRaw=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.get(e)];case 1:return[2,(t=n.sent())?JSON.stringify(t):void 0]}})})},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.memoryStorage.set(e,t),[2]})})},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){return this.memoryStorage.delete(e),[2]})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.memoryStorage.clear(),[2]})})},e}(),De=function(){function e(e,t){void 0===t&&(t={}),this.options=o({},e),this.config=t}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r,i,a=this;return u(this,function(s){switch(s.label){case 0:return t="AMP_TEST",n=o({},this.options),r=new e(n),i=String(Date.now()),[4,r.transaction(t,function(e){var n,r;try{e.set(i);var o=e.get()===i;return!o&&a.config.diagnosticsClient&&(null===(n=a.config.diagnosticsClient)||void 0===n||n.recordEvent("cookies.isEnabled.failure",{reason:"Test Value mismatch",testKey:t,testValue:i,sync:!0})),o}catch(e){if(a.config.diagnosticsClient){var s=e instanceof Error?e.message:String(e);null===(r=a.config.diagnosticsClient)||void 0===r||r.recordEvent("cookies.isEnabled.failure",{reason:"Cookie getter/setter failed",testKey:t,testValue:i,error:s,sync:!0})}return!1}finally{e.set(null)}})];case 1:return[2,s.sent()]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:return t=n.sent(),[2,this.decodeCookieValue(e,t)]}})})},e.prototype.decodeCookieValue=function(e,t){if(t)try{var n=Ne(t);return void 0===n?void console.error("Amplitude Logger [Error]: Failed to decode cookie value for key: ".concat(e,", value: ").concat(t)):JSON.parse(n)}catch(n){return void console.error("Amplitude Logger [Error]: Failed to parse cookie value for key: ".concat(e,", value: ").concat(t))}},e.prototype.getSync=function(e){var t=this.getRawSync(e);return this.decodeCookieValue(e,t)},e.prototype.getRaw=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,o,a,s,l,d,f,v;return u(this,function(u){switch(u.label){case 0:r=B(),i=r,u.label=1;case 1:return u.trys.push([1,4,,5]),(o=null==i?void 0:i.cookieStore)?[4,o.getAll(e)]:[3,3];case 2:if(a=u.sent()){a.length>1&&(null===(t=this.config.diagnosticsClient)||void 0===t||t.recordEvent("cookies.duplicate",{cookies:a.map(function(e){return e.domain})}),null===(n=this.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.cookieStore"));try{for(s=c(a),l=s.next();!l.done;l=s.next())if(d=l.value,Me(d.domain,this.options.domain))return[2,d.value]}catch(e){f={error:e}}finally{try{l&&!l.done&&(v=s.return)&&v.call(s)}finally{if(f)throw f.error}}}u.label=3;case 3:return[3,5];case 4:return u.sent(),[3,5];case 5:return[2,this.getRawSync(e)]}})})},e.prototype.getRawSync=function(e){var t,n,r=this,i=B(),o=(null!==(n=null===(t=null==i?void 0:i.document)||void 0===t?void 0:t.cookie.split("; "))&&void 0!==n?n:[]).filter(function(t){return 0===t.indexOf(e+"=")}),a=void 0,s=this.config.duplicateResolverFn;if("function"==typeof s&&o.length>1&&(a=o.find(function(t){var n;try{var i=s(t.substring(e.length+1));return i||null===(n=r.config.diagnosticsClient)||void 0===n||n.increment("cookies.duplicate.occurrence.document.cookie"),i}catch(e){return!1}})),a||(a=o[0]),a)return a.substring(e.length+1)},e.prototype.set=function(e,t){return s(this,void 0,void 0,function(){return u(this,function(n){return this.setSync(e,t),[2]})})},e.prototype.setSync=function(e,t){var n;try{var r=B();if(!r||!r.document||"function"!=typeof r.btoa||"function"!=typeof r.encodeURIComponent)return;var i=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,o=null!==t?i:-1,a=void 0;if(o){var s=new Date;s.setTime(s.getTime()+24*o*60*60*1e3),a=s}var u="".concat(e,"=").concat(r.btoa(r.encodeURIComponent(JSON.stringify(t))));a&&(u+="; expires=".concat(a.toUTCString())),u+="; path=/",this.options.domain&&(u+="; domain=".concat(this.options.domain)),this.options.secure&&(u+="; Secure"),this.options.sameSite&&(u+="; SameSite=".concat(this.options.sameSite)),r.document.cookie=u}catch(t){var c=t instanceof Error?t.message:String(t);console.error("Amplitude Logger [Error]: Failed to set cookie for key: ".concat(e,". Error: ").concat(c))}},e.prototype.remove=function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}})})},e.prototype.reset=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2]})})},e.isDomainWritable=function(t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:if(e.cachedTlds[t])return[2,!0];n="AMP_TLDTEST",r=new e({domain:"."+t}),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,r.transaction(n,function(n){if(e.cachedTlds[t])return!0;try{n.set(1);var r=!!n.get();return r&&(e.cachedTlds[t]=!0),r}finally{n.set(null)}})];case 2:return[2,!!i.sent()];case 3:return i.sent(),[2,!1];case 4:return[2]}})})},e.prototype.transaction=function(e,t){return s(this,void 0,void 0,function(){var n,r,i=this;return u(this,function(o){switch(o.label){case 0:if(n=function(){var e,t=B();return null===(e=null==t?void 0:t.navigator)||void 0===e?void 0:e.locks}(),r=function(){return t({get:function(){return i.getSync(e)},set:function(t){return i.setSync(e,t)}})},!n)return[2,r()];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,n.request("com.amplitude:cookie-lock:".concat(e),r)];case 2:return[2,o.sent()];case 3:return o.sent(),[2,r()];case 4:return[2]}})})},e.cachedTlds={},e}(),Ne=function(e){var t;return null!==(t=function(e){try{return decodeURIComponent(atob(e))}catch(e){return}}(e))&&void 0!==t?t:function(e){try{return decodeURIComponent(atob(decodeURIComponent(e)))}catch(e){return}}(e)},Me=function(e,t){if(""===e&&""===t)return!0;if(!e||!t)return!1;var n=e.startsWith(".")?e.substring(1):e,r=t.startsWith(".")?t.substring(1):t;return n.toLowerCase()===r.toLowerCase()},je=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[v,t,e.substring(0,n)].filter(Boolean).join("_")},Ue=function(){function e(e){this.storage=e}return e.prototype.isEnabled=function(){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(!this.storage)return[2,!1];t=String(Date.now()),n=new e(this.storage),r="AMP_TEST",i.label=1;case 1:return i.trys.push([1,4,5,7]),[4,n.set(r,t)];case 2:return i.sent(),[4,n.get(r)];case 3:return[2,i.sent()===t];case 4:return i.sent(),[2,!1];case 5:return[4,n.remove(r)];case 6:return i.sent(),[7];case 7:return[2]}})})},e.prototype.get=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getRaw(e)];case 1:return(t=n.sent())?[2,JSON.parse(t)]:[2,void 0];case 2:return n.sent(),console.error("[Amplitude] Error: Could not get value from storage"),[2,void 0];case 3:return[2]}})})},e.prototype.getRaw=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){return[2,(null===(t=this.storage)||void 0===t?void 0:t.getItem(e))||void 0]})})},e.prototype.set=function(e,t){var n;return s(this,void 0,void 0,function(){return u(this,function(r){try{null===(n=this.storage)||void 0===n||n.setItem(e,JSON.stringify(t))}catch(e){}return[2]})})},e.prototype.remove=function(e){var t;return s(this,void 0,void 0,function(){return u(this,function(n){try{null===(t=this.storage)||void 0===t||t.removeItem(e)}catch(e){}return[2]})})},e.prototype.reset=function(){var e;return s(this,void 0,void 0,function(){return u(this,function(t){try{null===(e=this.storage)||void 0===e||e.clear()}catch(e){}return[2]})})},e}(),qe="tags",Fe="counters",Be="histograms",He="events",Ve="internal",ze="last_flush_timestamp",We=function(){function e(e,t){this.dbPromise=null,this.logger=t,this.dbName="AMP_diagnostics_".concat(e.substring(0,10))}return e.isSupported=function(){var e;return void 0!==(null===(e=B())||void 0===e?void 0:e.indexedDB)},e.prototype.getDB=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return this.dbPromise||(this.dbPromise=this.openDB()),[2,this.dbPromise]})})},e.prototype.openDB=function(){var e=this;return new Promise(function(t,n){var r=indexedDB.open(e.dbName,1);r.onerror=function(){e.dbPromise=null,n(new Error("Failed to open IndexedDB"))},r.onsuccess=function(){var n=r.result;n.onclose=function(){e.dbPromise=null,e.logger.debug("DiagnosticsStorage: DB connection closed.")},n.onerror=function(t){e.logger.debug("DiagnosticsStorage: A global database error occurred.",t),n.close()},t(n)},r.onupgradeneeded=function(){var t=r.result;t?e.createTables(t):e.logger.debug("DiagnosticsStorage: Missing DB during upgrade.")}})},e.prototype.createTables=function(e){(e.objectStoreNames.contains(qe)||e.createObjectStore(qe,{keyPath:"key"}),e.objectStoreNames.contains(Fe)||e.createObjectStore(Fe,{keyPath:"key"}),e.objectStoreNames.contains(Be)||e.createObjectStore(Be,{keyPath:"key"}),e.objectStoreNames.contains(He))||e.createObjectStore(He,{keyPath:"id",autoIncrement:!0}).createIndex("time_idx","time",{unique:!1});e.objectStoreNames.contains(Ve)||e.createObjectStore(Ve,{keyPath:"key"})},e.prototype.setTags=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([qe],"readwrite"),r=n.objectStore(qe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tags",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1];r.put({key:n,value:i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set tag",n,i,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set tags",i),[3,3];case 3:return[2]}})})},e.prototype.incrementCounters=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Fe],"readwrite"),r=n.objectStore(Fe),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to increment counters",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e=a.result,t=e?e.value:0;r.put({key:n,value:t+i}).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to update counter",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing counter",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to increment counters",i),[3,3];case 3:return[2]}})})},e.prototype.setHistogramStats=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===Object.entries(e).length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([Be],"readwrite"),r=n.objectStore(Be),[2,new Promise(function(t){var i=Object.entries(e);n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",e),t()},i.forEach(function(e){var t=l(e,2),n=t[0],i=t[1],a=r.get(n);a.onsuccess=function(){var e,t=a.result;e=t?{key:n,count:t.count+i.count,min:Math.min(t.min,i.min),max:Math.max(t.max,i.max),sum:t.sum+i.sum}:{key:n,count:i.count,min:i.min,max:i.max,sum:i.sum},r.put(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to set histogram stats",n,e)}},a.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to read existing histogram stats",n,e)}})})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set histogram stats",i),[3,3];case 3:return[2]}})})},e.prototype.addEventRecords=function(e){return s(this,void 0,void 0,function(){var t,n,r,i,o=this;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),0===e.length?[2]:[4,this.getDB()];case 1:return t=a.sent(),n=t.transaction([He],"readwrite"),r=n.objectStore(He),[2,new Promise(function(t){n.oncomplete=function(){t()},n.onabort=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event records",e),t()};var i=r.count();i.onsuccess=function(){var t=i.result,n=Math.max(0,10-t);n<e.length&&o.logger.debug("DiagnosticsStorage: Only added ".concat(n," of ").concat(e.length," events due to storage limit")),e.slice(0,n).forEach(function(e){r.add(e).onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to add event record",e)}})},i.onerror=function(e){o.logger.debug("DiagnosticsStorage: Failed to count existing events",e)}})];case 2:return i=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to add event records",i),[3,3];case 3:return[2]}})})},e.prototype.setInternal=function(e,t){return s(this,void 0,void 0,function(){var n,r,i,o;return u(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.getDB()];case 1:return n=a.sent(),r=n.transaction([Ve],"readwrite"),i=r.objectStore(Ve),[2,new Promise(function(n,o){r.onabort=function(){return o(new Error("Failed to set internal value"))};var a=i.put({key:e,value:t});a.onsuccess=function(){return n()},a.onerror=function(){return o(new Error("Failed to set internal value"))}})];case 2:return o=a.sent(),this.logger.debug("DiagnosticsStorage: Failed to set internal value",o),[3,3];case 3:return[2]}})})},e.prototype.getInternal=function(e){return s(this,void 0,void 0,function(){var t,n,r,i;return u(this,function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,this.getDB()];case 1:return t=o.sent(),n=t.transaction([Ve],"readonly"),r=n.objectStore(Ve),[2,new Promise(function(t,i){n.onabort=function(){return i(new Error("Failed to get internal value"))};var o=r.get(e);o.onsuccess=function(){return t(o.result)},o.onerror=function(){return i(new Error("Failed to get internal value"))}})];case 2:return i=o.sent(),this.logger.debug("DiagnosticsStorage: Failed to get internal value",i),[2,void 0];case 3:return[2]}})})},e.prototype.getLastFlushTimestamp=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.getInternal(ze)];case 1:return[2,(e=n.sent())?parseInt(e.value,10):void 0];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to get last flush timestamp",t),[2,void 0];case 3:return[2]}})})},e.prototype.setLastFlushTimestamp=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.setInternal(ze,e.toString())];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),this.logger.debug("DiagnosticsStorage: Failed to set last flush timestamp",t),[3,3];case 3:return[2]}})})},e.prototype.clearTable=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).clear();i.onsuccess=function(){return n()},i.onerror=function(){return r(new Error("Failed to clear table ".concat(t)))}})},e.prototype.getAllAndClear=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s;return u(this,function(u){switch(u.label){case 0:return u.trys.push([0,4,,5]),[4,this.getDB()];case 1:return e=u.sent(),t=e.transaction([qe,Fe,Be,He],"readwrite"),[4,Promise.all([this.getAllFromStore(t,qe),this.getAllFromStore(t,Fe),this.getAllFromStore(t,Be),this.getAllFromStore(t,He)])];case 2:return n=l.apply(void 0,[u.sent(),4]),r=n[0],i=n[1],o=n[2],a=n[3],[4,Promise.all([this.clearTable(t,Fe),this.clearTable(t,Be),this.clearTable(t,He)])];case 3:return u.sent(),[2,{tags:r,counters:i,histogramStats:o,events:a}];case 4:return s=u.sent(),this.logger.debug("DiagnosticsStorage: Failed to get all and clear data",s),[2,{tags:[],counters:[],histogramStats:[],events:[]}];case 5:return[2]}})})},e.prototype.getAllFromStore=function(e,t){return new Promise(function(n,r){var i=e.objectStore(t).getAll();i.onsuccess=function(){return n(i.result)},i.onerror=function(){return r(new Error("Failed to get all from ".concat(t)))}})},e}(),$e="__AMPLITUDE_SCRIPT_URL__",Ke=function(){var e=B();if(!e)return[];var t=e[$e];return Array.isArray(t)?t:"string"==typeof t?[t]:[]},Je=function(e){var t,n,r=Ke();if(0!==r.length)try{for(var i=c(r),o=i.next();!o.done;o=i.next()){var a=o.value;if(e.filename&&e.filename.includes(a))return"filename";if(e.stack&&e.stack.includes(a))return"stack"}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}},Ge=function(e){var t,n;try{var r=new URL(e,null===(n=null===(t=B())||void 0===t?void 0:t.location)||void 0===n?void 0:n.origin);return r.origin+r.pathname}catch(e){return}},Ye=function(e){if(e){var t=e.match(/(https?:\/\/\S+?)(?=[)\s]|$)/);return t?t[1]:void 0}},Xe=function(e){if("string"==typeof e)return e;try{return JSON.stringify(e)}catch(e){return"[object Object]"}},Qe=3e5,Ze=1e4,et=function(){function e(e,t,n,r){void 0===n&&(n="US"),this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},this.inMemoryEvents=[],this.saveTimer=null,this.flushTimer=null,this.apiKey=e,this.logger=t,this.serverUrl="US"===n?"https://diagnostics.prod.us-west-2.amplitude.com/v1/capture":"https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture",this.logger.debug("DiagnosticsClient: Initializing with options",JSON.stringify(r,null,2)),this.config=o({enabled:!0,sampleRate:0},r),this.startTimestamp=Date.now(),this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,We.isSupported()?this.storage=new We(e,t):this.logger.debug("DiagnosticsClient: IndexedDB is not supported"),this.initializeFlushInterval(),this.shouldTrack&&(this.increment("sdk.diagnostics.sampled.in.and.enabled"),function(e){var t=B();if(t&&"function"==typeof t.addEventListener){var n=function(t){e.recordEvent("sdk.error.uncaught",o({type:t.type,message:t.message,filename:t.filename,error_name:t.errorName,stack:t.stack},t.metadata))};t.addEventListener("error",function(e){var t=e.error instanceof Error?e.error:void 0,r=null==t?void 0:t.stack,i=Je({filename:e.filename,stack:r});i&&n({type:"error",message:e.message,stack:r,filename:e.filename,errorName:null==t?void 0:t.name,metadata:{colno:e.colno,lineno:e.lineno,isTrusted:e.isTrusted,matchReason:i}})},!0),t.addEventListener("unhandledrejection",function(e){var t,r=e.reason instanceof Error?e.reason:void 0,i=null==r?void 0:r.stack,o=Ye(i),a=Je({filename:o,stack:i});a&&n({type:"unhandledrejection",message:null!==(t=null==r?void 0:r.message)&&void 0!==t?t:Xe(e.reason),stack:i,filename:o,errorName:null==r?void 0:r.name,metadata:{isTrusted:e.isTrusted,matchReason:a}})},!0)}}(this))}return e.prototype.isStorageAndTrackEnabled=function(){return Boolean(this.storage)&&Boolean(this.shouldTrack)},e.prototype.setTag=function(e,t){this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryTags).length>=Ze?this.logger.debug("DiagnosticsClient: Early return setTags as reaching memory limit"):(this.inMemoryTags[e]=t,this.startTimersIfNeeded()))},e.prototype.increment=function(e,t){void 0===t&&(t=1),this.isStorageAndTrackEnabled()&&(Object.keys(this.inMemoryCounters).length>=Ze?this.logger.debug("DiagnosticsClient: Early return increment as reaching memory limit"):(this.inMemoryCounters[e]=(this.inMemoryCounters[e]||0)+t,this.startTimersIfNeeded()))},e.prototype.recordHistogram=function(e,t){if(this.isStorageAndTrackEnabled())if(Object.keys(this.inMemoryHistograms).length>=Ze)this.logger.debug("DiagnosticsClient: Early return recordHistogram as reaching memory limit");else{var n=this.inMemoryHistograms[e];n?(n.count+=1,n.min=Math.min(n.min,t),n.max=Math.max(n.max,t),n.sum+=t):this.inMemoryHistograms[e]={count:1,min:t,max:t,sum:t},this.startTimersIfNeeded()}},e.prototype.recordEvent=function(e,t){this.isStorageAndTrackEnabled()&&(this.inMemoryEvents.length>=10?this.logger.debug("DiagnosticsClient: Early return recordEvent as reaching memory limit"):(this.inMemoryEvents.push({event_name:e,time:Date.now(),event_properties:t}),this.startTimersIfNeeded()))},e.prototype.startTimersIfNeeded=function(){var e=this;this.saveTimer||(this.saveTimer=setTimeout(function(){e.saveAllDataToStorage().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to save all data to storage",t)}).finally(function(){e.saveTimer=null})},1e3)),this.flushTimer||(this.flushTimer=setTimeout(function(){e._flush().catch(function(t){e.logger.debug("DiagnosticsClient: Failed to flush",t)}).finally(function(){e.flushTimer=null})},Qe))},e.prototype.saveAllDataToStorage=function(){return s(this,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){switch(i.label){case 0:return this.storage?(e=o({},this.inMemoryTags),t=o({},this.inMemoryCounters),n=o({},this.inMemoryHistograms),r=d([],l(this.inMemoryEvents),!1),this.inMemoryEvents=[],this.inMemoryTags={},this.inMemoryCounters={},this.inMemoryHistograms={},[4,Promise.all([this.storage.setTags(e),this.storage.incrementCounters(t),this.storage.setHistogramStats(n),this.storage.addEventRecords(r)])]):[2];case 1:return i.sent(),[2]}})})},e.prototype._flush=function(){return s(this,void 0,void 0,function(){var e,t,n,r,i,o,a,s,c,l;return u(this,function(u){switch(u.label){case 0:return this.storage?[4,this.saveAllDataToStorage()]:[2];case 1:return u.sent(),this.saveTimer=null,this.flushTimer=null,[4,this.storage.getAllAndClear()];case 2:return e=u.sent(),t=e.tags,n=e.counters,r=e.histogramStats,i=e.events,this.storage.setLastFlushTimestamp(Date.now()),o={},t.forEach(function(e){o[e.key]=e.value}),a={},n.forEach(function(e){a[e.key]=e.value}),s={},r.forEach(function(e){s[e.key]={count:e.count,min:e.min,max:e.max,avg:Math.round(e.sum/e.count*100)/100}}),c=i.map(function(e){return{event_name:e.event_name,time:e.time,event_properties:e.event_properties}}),0===Object.keys(a).length&&0===Object.keys(s).length&&0===c.length?[2]:(l={tags:o,histogram:s,counters:a,events:c},this.fetch(l),[2])}})})},e.prototype.fetch=function(e){return s(this,void 0,void 0,function(){var t;return u(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!B())throw new Error("DiagnosticsClient: Fetch is not supported");return[4,fetch(this.serverUrl,{method:"POST",headers:{"X-ApiKey":this.apiKey,"Content-Type":"application/json"},body:JSON.stringify(e)})];case 1:return n.sent().ok?(this.logger.debug("DiagnosticsClient: Successfully sent diagnostics data"),[3,3]):(this.logger.debug("DiagnosticsClient: Failed to send diagnostics data."),[2]);case 2:return t=n.sent(),this.logger.debug("DiagnosticsClient: Failed to send diagnostics data. ",t),[3,3];case 3:return[2]}})})},e.prototype.initializeFlushInterval=function(){return s(this,void 0,void 0,function(){var e,t,n;return u(this,function(r){switch(r.label){case 0:return this.storage?(e=Date.now(),[4,this.storage.getLastFlushTimestamp()]):[2];case 1:return-1===(t=r.sent()||-1)?(this.storage.setLastFlushTimestamp(e),this._setFlushTimer(Qe),[2]):(n=e-t)>=Qe?(this._flush(),[2]):(this._setFlushTimer(Qe-n),[2])}})})},e.prototype._setFlushTimer=function(e){var t=this;this.flushTimer=setTimeout(function(){t._flush().catch(function(e){t.logger.debug("DiagnosticsClient: Failed to flush",e)}).finally(function(){t.flushTimer=null})},e)},e.prototype._setSampleRate=function(e){this.logger.debug("DiagnosticsClient: Setting sample rate to",e),this.config.sampleRate=e,this.shouldTrack=Ce(this.startTimestamp,this.config.sampleRate)&&this.config.enabled,this.logger.debug("DiagnosticsClient: Should track is",this.shouldTrack)},e}(),tt=function(){function e(){}return e.prototype.send=function(e,t,n){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S;if("object"!=typeof e)return null;var k=e.code||0,T=this.buildStatus(k);switch(T){case j.Success:return{status:T,statusCode:k,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(n=e.payload_size_bytes)&&void 0!==n?n:0,serverUploadTime:null!==(r=e.server_upload_time)&&void 0!==r?r:0}};case j.Invalid:return{status:T,statusCode:k,body:{error:null!==(i=e.error)&&void 0!==i?i:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(a=e.events_with_invalid_fields)&&void 0!==a?a:{},eventsWithMissingFields:null!==(s=e.events_with_missing_fields)&&void 0!==s?s:{},eventsWithInvalidIdLengths:null!==(u=e.events_with_invalid_id_lengths)&&void 0!==u?u:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(l=e.exceeded_daily_quota_devices)&&void 0!==l?l:{},silencedDevices:null!==(d=e.silenced_devices)&&void 0!==d?d:[],silencedEvents:null!==(f=e.silenced_events)&&void 0!==f?f:[],throttledDevices:null!==(v=e.throttled_devices)&&void 0!==v?v:{},throttledEvents:null!==(p=e.throttled_events)&&void 0!==p?p:[]}};case j.PayloadTooLarge:return{status:T,statusCode:k,body:{error:null!==(h=e.error)&&void 0!==h?h:""}};case j.RateLimit:return{status:T,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:"",epsThreshold:null!==(m=e.eps_threshold)&&void 0!==m?m:0,throttledDevices:null!==(y=e.throttled_devices)&&void 0!==y?y:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(w=e.exceeded_daily_quota_devices)&&void 0!==w?w:{},exceededDailyQuotaUsers:null!==(E=e.exceeded_daily_quota_users)&&void 0!==E?E:{},throttledEvents:null!==(S=e.throttled_events)&&void 0!==S?S:[]}};case j.Timeout:default:return{status:T,statusCode:k}}},e.prototype.buildStatus=function(e){return re(e)?j.Success:429===e?j.RateLimit:413===e?j.PayloadTooLarge:408===e?j.Timeout:e>=400&&e<500?j.Invalid:e>=500?j.Failed:j.Unknown},e}();function nt(){return"undefined"!=typeof CompressionStream}function rt(e){return s(this,void 0,void 0,function(){var t,n;return u(this,function(r){switch(r.label){case 0:if(void 0===(t=CompressionStream))return[2,void 0];r.label=1;case 1:return r.trys.push([1,3,,4]),n=new Blob([e]).stream().pipeThrough(new t("gzip")),[4,new Response(n).arrayBuffer()];case 2:return[2,r.sent()];case 3:return r.sent(),[2,void 0];case 4:return[2]}})})}var it=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var n=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(n))),Promise.resolve({remoteConfig:n.remoteConfig,lastFetch:new Date(n.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();var ot=401,at=403,st=429,ut=function(){function e(e,t,n,r,i){void 0===n&&(n="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=r||("US"===n?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new it(e,t),this.customFetch=i}return e.prototype.subscribe=function(e,t,n){var r=V(),i={id:r,key:e,deliveryMode:t,callback:n};return this.callbackInfos.push(i),"all"===t?this.subscribeAll(i):this.subscribeWaitForRemote(i,t.timeout),r},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return s(this,void 0,void 0,function(){var e,t=this;return u(this,function(n){switch(n.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=n.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(n){t.sendCallback(n,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return s(this,void 0,void 0,function(){var t,n,r,i=this;return u(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){i.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),i.sendCallback(e,t,"remote"),i.storage.setConfig(t)}),n=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,n])];case 1:return void 0!==(r=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(r))),null!==r.remoteConfig?this.sendCallback(e,r,"cache"):this.logger.debug("Remote config client skips sending c
23allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return s(this,void 0,void 0,function(){var n,r;return u(this,function(i){switch(i.label){case 0:n=new Promise(function(e,n){setTimeout(function(){n("Timeout exceeded")},t)}),i.label=1;case 1:return i.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),n])];case 2:return r=i.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,r,"remote"),this.storage.setConfig(r),[3,5];case 3:return i.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(r=i.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,r,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,r,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,n){var r;e.lastCallback=new Date,r=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(r,n,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),s(this,void 0,void 0,function(){var n,r,i,o,a,s,c=this;return u(this,function(l){switch(l.label){case 0:n=t/e,r={remoteConfig:null,lastFetch:new Date},i=function(r){var i,a,s,l,d,f,v,p,h;return u(this,function(u){switch(u.label){case 0:i=!0,a=new AbortController,s=setTimeout(function(){return a.abort()},t),u.label=1;case 1:return u.trys.push([1,10,11,12]),l=o.getUrlParams(),d={Accept:"*/*"},o.customFetch?[4,(g=o.customFetch({url:l,method:"GET",headers:d,signal:a.signal}),m=a.signal,new Promise(function(e,t){var n=function(){var e=new Error("Remote config custom fetch aborted by timeout");e.name="AbortError",t(e)};m.addEventListener("abort",n,{once:!0}),g.then(function(t){m.removeEventListener("abort",n),e(t)},function(e){m.removeEventListener("abort",n),t(e)})}))]:[3,3];case 2:return v=u.sent(),[3,5];case 3:return[4,fetch(l,{method:"GET",headers:d,signal:a.signal})];case 4:v=u.sent(),u.label=5;case 5:return(f=v).ok||f.status>=200&&f.status<300?[3,7]:[4,f.text()];case 6:return p=u.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(f.status,": ").concat(p)),f.status===ot||f.status===at?(o.logger.error("Remote config client fetch failed with ".concat(f.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,i=!1):f.status>=400&&f.status<500&&f.status!==st&&(i=!1),[3,9];case 7:return[4,f.json()];case 8:return[2,{value:{remoteConfig:u.sent(),lastFetch:new Date}}];case 9:return[3,12];case 10:return(h=u.sent())instanceof Error&&"AbortError"===h.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),h),[3,12];case 11:return clearTimeout(s),[7];case 12:return i?r<e-1?[4,new Promise(function(e){return setTimeout(e,c.getJitterDelay(n))})]:[3,14]:[2,"break"];case 13:u.sent(),u.label=14;case 14:return[2]}var g,m})},o=this,a=0,l.label=1;case 1:return a<e?[5,i(a)]:[3,4];case 2:if("object"==typeof(s=l.sent()))return[2,s.value];if("break"===s)return[3,4];l.label=3;case 3:return a++,[3,1];case 4:return[2,r]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),n=new URLSearchParams;return n.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(n.toString())},e.CONFIG_GROUP="browser",e}(),ct=B(),lt=null==ct?void 0:ct.console,dt={},ft={},vt=!1;var pt,ht={addListener:function(e,t){var n,r=(n=e,!!lt&&"function"==typeof lt[n]&&(ft[n]||(ft[n]=lt[n],lt[n]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];try{if(dt[n]&&!vt){vt=!0;var r=dt[n];r&&r.forEach(function(t){try{t(n,e)}catch(e){}})}}catch(e){}return vt=!1,ft[n].apply(lt,e)}),!0));if(!r)return new Error("Console override failed");dt[e]?dt[e].push(t):dt[e]=[t]},removeListener:function(e){var t,n;try{for(var r=c(Object.values(dt)),i=r.next();!i.done;i=r.next())for(var o=i.value,a=o.length-1;a>=0;a--)if(o[a]===e){o.splice(a,1);break}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},_restoreConsole:function(){var e,t;try{for(var n=c(Object.entries(ft)),r=n.next();!r.done;r=n.next()){var i=l(r.value,2),o=i[0],a=i[1];a&&(lt[o]=a)}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}ft={},dt={}}};!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(pt||(pt={}));var gt=["a","button","input","select","textarea","label","video","audio",'[contenteditable="true" i]',"[data-amp-default-track]",".amp-default-track"],mt="data-amp-track-",yt=["div","span","h1","h2","h3","h4","h5","h6"],bt=d(['input[type="button"]','input[type="submit"]','input[type="reset"]','input[type="image"]','input[type="file"]'],l(["a","button",'[role="button"]','[role="link"]','[role="menuitem"]','[role="menuitemcheckbox"]','[role="menuitemradio"]','[role="option"]','[role="tab"]','[role="treeitem"]','[contenteditable="true" i]']),!1),wt=bt,Et=bt,St=["*"];function kt(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e}function Tt(e,t,n){e&&Pt({json:e,allowlist:t.map(xt),excludelist:n.map(xt),ancestors:[]})}function Pt(e){var t,n,r=e.json,i=e.targetObject,o=e.allowlist,a=e.excludelist,s=e.ancestors,u=e.parentObject,f=e.targetKey;
vendor: 27,165 bytes, line 23
23i||(i=r);var v=Object.keys(i);try{for(var p=c(v),h=p.next();!h.done;h=p.next()){var g=h.value,m=d(d([],l(s),!1),[g],!1);kt(i[g])?It(m,o)&&!It(m,a)||delete i[g]:Pt({json:r,targetObject:i[g],allowlist:o,excludelist:a,ancestors:m,parentObject:i,targetKey:g})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}0===Object.keys(i).length&&u&&f&&delete u[f]}function xt(e){return e.startsWith("/")&&(e=e.slice(1)),e.split("/").map(function(e){return e.replace(/~0/g,"~").replace(/~1/g,"/")})}function _t(e,t,n,r){if(void 0===n&&(n=0),void 0===r&&(r=0),r===t.length)return n===e.length;if(n===e.length){for(;r<t.length&&"**"===t[r];)r++;return r===t.length}var i=t[r];if("**"===i){if(r+1===t.length)return!0;for(var o=n;o<=e.length;o++)if(_t(e,t,o,r+1))return!0;return!1}return("*"===i||i===e[n])&&_t(e,t,n+1,r+1)}function It(e,t){return t.some(function(t){return _t(e,t)})}var At=function(){function e(e){this.request=e}return e.prototype.headers=function(e){var t,n;void 0===e&&(e=[]);var r=this.request.headers,i={};if(Array.isArray(r))r.forEach(function(e){var t=l(e,2),n=t[0],r=t[1];i[n]=r});else if(r instanceof Headers)r.forEach(function(e,t){i[t]=e});else if("object"==typeof r&&null!==r)try{for(var o=c(Object.entries(r)),a=o.next();!a.done;a=o.next()){var s=l(a.value,2),u=s[0],d=s[1];i[u]=d}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return jt(i,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){if("number"==typeof this._bodySize)return this._bodySize;var e=B();if(null==e?void 0:e.TextEncoder){var t=this.request.body;return this._bodySize=Ct(t,100),this._bodySize}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"method",{get:function(){return this.request.method},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.request.body?this.request.body:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Nt(this.body,e,t)]})})},e}(),Ot=function(){function e(e,t){this.bodyRaw=e,this.requestHeaders=t}return e.prototype.headers=function(e){return void 0===e&&(e=[]),jt(this.requestHeaders,{allow:e})},Object.defineProperty(e.prototype,"bodySize",{get:function(){return Ct(this.bodyRaw,100)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"body",{get:function(){return"string"==typeof this.bodyRaw?this.bodyRaw:null},enumerable:!1,configurable:!0}),e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){return 0===e.length?[2,null]:[2,Nt(this.body,e,t)]})})},e}();function Ct(e,t){var n,r,i,o=B(),a=null==o?void 0:o.TextEncoder;if(a){var s;if("string"==typeof e)s=e,i=(new a).encode(s).length;else if(e instanceof Blob)i=(s=e).size;else if(e instanceof URLSearchParams)s=e,i=(new a).encode(s.toString()).length;else if(ArrayBuffer.isView(e))i=(s=e).byteLength;else if(e instanceof ArrayBuffer)i=(s=e).byteLength;else if(e instanceof FormData){var u=e,d=0,f=0;try{for(var v=c(u.entries()),p=v.next();!p.done;p=v.next()){var h=l(p.value,2),g=h[0],m=h[1];if(d+=g.length,"string"==typeof m)d+=(new a).encode(m).length;else{if(!(m instanceof Blob))return;d+=m.size}if(++f>=t)return}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=v.return)&&r.call(v)}finally{if(n)throw n.error}}i=d}else if(e instanceof ReadableStream)return void(s=e);return i}}var Rt,Lt=function(){function e(e){this.response=e}return e.prototype.headers=function(e){var t;if(void 0===e&&(e=[]),this.response.headers instanceof Headers){var n=this.response.headers,r={};return null===(t=null==n?void 0:n.forEach)||void 0===t||t.call(n,function(e,t){r[t]=e}),jt(r,{allow:e})}},Object.defineProperty(e.prototype,"bodySize",{get:function(){var e,t;if(void 0!==this._bodySize)return this._bodySize;var n=null===(t=null===(e=this.response.headers)||void 0===e?void 0:e.get)||void 0===t?void 0:t.call(e,"content-length"),r=n?parseInt(n,10):void 0;return this._bodySize=r,r},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.response.status},enumerable:!1,configurable:!0}),e.prototype.text=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:this.clonedResponse||(this.clonedResponse=this.response.clone()),n.label=1;case 1:return n.trys.push([1,3,,4]),e=this.clonedResponse.text(),t=new Promise(function(e){return setTimeout(function(){return e(null)},500)}),[4,Promise.race([e,t])];case 2:return[2,n.sent()];case 3:return n.sent(),[2,null];case 4:return[2]}})})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){return u(this,function(n){switch(n.label){case 0:return 0===e.length?[2,null]:[4,this.text()];case 1:return[2,Nt(n.sent(),e,t)]}})})},e}(),Dt=function(){function e(e,t,n,r){this.statusCode=e,this.headersString=t,this.size=n,this.getJson=r}return Object.defineProperty(e.prototype,"bodySize",{get:function(){return this.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"status",{get:function(){return this.statusCode},enumerable:!1,configurable:!0}),e.prototype.headers=function(e){var t,n;if(void 0===e&&(e=[]),!this.headersString)return{};var r={},i=this.headersString.split("\r\n");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split(": "),2),u=s[0],d=s[1];u&&d&&(r[u]=d)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return jt(r,{allow:e})},e.prototype.json=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=[]),s(this,void 0,void 0,function(){var n;return u(this,function(r){return 0===e.length?[2,null]:(n=this.getJson())?(Tt(n,e,t),[2,n]):[2,null]})})},e}();function Nt(e,t,n){if(!e)return null;try{var r=JSON.parse(e);return Tt(r,t,n),r}catch(e){return null}}!function(e){e.REDACT="redact",e.REMOVE="remove"}(Rt||(Rt={}));var Mt="[REDACTED]",jt=function(e,t){var n,r,i=t.allow,o=void 0===i?[]:i,a=t.strategy,s=void 0===a?Rt.REMOVE:a,u=d([],l(L),!1),f={},v=function(t){var n=t.toLowerCase();u.find(function(e){return e.toLowerCase()===n})?s===Rt.REDACT&&(f[t]=Mt):o.find(function(e){return e.toLowerCase()===n})?f[t]=e[t]:s===Rt.REDACT&&(f[t]=Mt)};try{for(var p=c(Object.keys(e)),h=p.next();!h.done;h=p.next()){v(h.value)}}catch(e){n={error:e}}finally{try{h&&!h.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}return f},Ut=function(){function e(e,t,n,r,i,o,a,s,u,c,l){void 0===a&&(a=0),this.type=e,this.method=t,this.timestamp=n,this.startTime=r,this.url=i,this.requestWrapper=o,this.status=a,this.duration=s,this.responseWrapper=u,this.error=c,this.endTime=l}return e.prototype.toSerializable=function(){var e,t,n,r,i={type:this.type,method:this.method,url:this.url,timestamp:this.timestamp,status:this.status,duration:this.duration,error:this.error,startTime:this.startTime,endTime:this.endTime,requestHeaders:null===(e=this.requestWrapper)||void 0===e?void 0:e.headers(d([],l(R),!1)),requestBodySize:null===(t=this.requestWrapper)||void 0===t?void 0:t.bodySize,responseHeaders:null===(n=this.responseWrapper)||void 0===n?void 0:n.headers(d([],l(R),!1)),responseBodySize:null===(r=this.responseWrapper)||void 0===r?void 0:r.bodySize};return Object.fromEntries(Object.entries(i).filter(function(e){var t=l(e,2);return t[0],void 0!==t[1]}))},e}();var qt=function(e,t){void 0===t&&(t=V()),this.callback=e,this.id=t};function Ft(e){try{e()}catch(e){}}var Bt=function(){function e(t){this.eventCallbacks=new Map,this.isObserving=!1,this.logger=t;var n=B();e.isSupported()&&(this.globalScope=n)}return e.isSupported=function(){var e=B();return!!e&&!!e.fetch},e.prototype.subscribe=function(e,t){var n,r,i,o,a,s,u,c,l,d;if(this.logger||(this.logger=t),this.eventCallbacks.set(e.id,e),!this.isObserving){var f=null===(i=null===(r=null===(n=this.globalScope)||void 0===n?void 0:n.XMLHttpRequest)||void 0===r?void 0:r.prototype)||void 0===i?void 0:i.open,v=null===(s=null===(a=null===(o=this.globalScope)||void 0===o?void 0:o.XMLHttpRequest)||void 0===a?void 0:a.prototype)||void 0===s?void 0:s.send,p=null===(l=null===(c=null===(u=this.globalScope)||void 0===u?void 0:u.XMLHttpRequest)||void 0===c?void 0:c.prototype)||void 0===l?void 0:l.setRequestHeader;f&&v&&p&&this.observeXhr(f,v,p);var h=null===(d=this.globalScope)||void 0===d?void 0:d.fetch;h&&this.observeFetch(h),this.isObserving=!0}},e.prototype.unsubscribe=function(e){this.eventCallbacks.delete(e.id)},e.prototype.triggerEventCallbacks=function(e){var t=this;this.eventCallbacks.forEach(function(n){try{n.callback(e)}catch(e){Ft(function(){var n;null===(n=t.logger)||void 0===n||n.debug("an unexpected error occurred while triggering event callbacks",e)})}})},e.prototype.handleNetworkRequestEvent=function(e,t,n,r,i,o,a){var s;if(void 0!==o&&void 0!==a){var u,c,l,d="GET";if(!function(e){return"object"==typeof e&&null!==e&&"url"in e&&"method"in e}(t)?u=null===(s=null==t?void 0:t.toString)||void 0===s?void 0:s.call(t):(u=t.url,d=t.method),u)try{var f=new URL(u);u="".concat(f.protocol,"//").concat(f.host).concat(f.pathname).concat(f.search).concat(f.hash)}catch(e){}d=(null==n?void 0:n.method)||d,r&&(c=r.status),i&&(l={name:i.name||"UnknownError",message:i.message||"An unknown error occurred"},c=0);var v=Math.floor(performance.now()-a),p=Math.floor(o+v),h=new Ut(e,d,o,o,u,n,c,v,r,l,p);this.triggerEventCallbacks(h)}},e.prototype.getTimestamps=function(){var e,t;return{startTime:null===(e=Date.now)||void 0===e?void 0:e.call(Date),durationStart:null===(t=null===performance||void 0===performance?void 0:performance.now)||void 0===t?void 0:t.call(performance)}},e.prototype.observeFetch=function(e){var t=this;this.globalScope&&e&&(this.globalScope.fetch=function(n,r){return s(t,void 0,void 0,function(){var t,i,o,a,s=this;return u(this,function(u){switch(u.label){case 0:try{t=this.getTimestamps()}catch(e){Ft(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while retrieving timestamps",e)})}u.label=1;case 1:return u.trys.push([1,3,,4]),[4,e(n,r)];case 2:return i=u.sent(),[3,4];case 3:return a=u.sent(),o=a,[3,4];case 4:try{this.handleNetworkRequestEvent("fetch",n,r?new At(r):void 0,i?new Lt(i):void 0,o,null==t?void 0:t.startTime,null==t?void 0:t.durationStart)}catch(e){Ft(function(){var t;return null===(t=s.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling fetch",e)})}if(i)return[2,i];throw o}})})})},e.createXhrJsonParser=function(e,t){return function(){var n;try{if("json"===e.responseType){if(null===(n=t.globalScope)||void 0===n?void 0:n.structuredClone)return t.globalScope.structuredClone(e.response)}else if(["text",""].includes(e.responseType))return JSON.parse(e.responseText)}catch(n){return n instanceof Error&&"InvalidStateError"===n.name&&Ft(function(){var n;return null===(n=t.logger)||void 0===n?void 0:n.debug("unexpected error when retrieving responseText. responseType='".concat(e.responseType,"'"))}),null}return null}},e.prototype.observeXhr=function(t,n,r){if(this.globalScope&&t&&n){var i=this.globalScope.XMLHttpRequest.prototype,a=this;i.open=function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=l(n,2),s=i[0],u=i[1];try{this.$$AmplitudeAnalyticsEvent=o({method:s,url:null===(e=null==u?void 0:u.toString)||void 0===e?void 0:e.call(u),headers:{}},a.getTimestamps())}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr open",e)})}return t.apply(this,n)},i.send=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var i=this,o=e.createXhrJsonParser(this,a),s=t[0],u=i.$$AmplitudeAnalyticsEvent;return i.$$AmplitudeAnalyticsEvent&&i.addEventListener("loadend",function(){try{var e=i.getAllResponseHeaders(),t=i.getResponseHeader("content-length"),n=new Dt(i.status,e,t?parseInt(t,10):void 0,o),r=i.$$AmplitudeAnalyticsEvent.headers,c=new Ot(s,r);u.status=i.status,a.handleNetworkRequestEvent("xhr",{url:u.url,method:u.method},c,n,void 0,u.startTime,u.durationStart)}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while handling xhr send",e)})}}),n.apply(i,t)},i.setRequestHeader=function(e,t){try{var n=this.$$AmplitudeAnalyticsEvent;n&&(n.headers[e]=t)}catch(e){Ft(function(){var t;return null===(t=a.logger)||void 0===t?void 0:t.debug("an unexpected error occurred while calling xhr setRequestHeader",e)})}r.apply(this,[e,t])}}},e}(),Ht=new Bt,Vt=function(){function e(){}return e.prototype.parse=function(){return s(this,void 0,void 0,function(){return u(this,function(e){return[2,o(o(o(o({},C),this.getUtmParam()),this.getReferrer()),this.getClickIds())]})})},e.prototype.getUtmParam=function(){var e=_e();return{utm_campaign:e.utm_campaign,utm_content:e.utm_content,utm_id:e.utm_id,utm_medium:e.utm_medium,utm_source:e.utm_source,utm_term:e.utm_term}},e.prototype.getReferrer=function(){var e,t,n={referrer:void 0,referring_domain:void 0};try{n.referrer=document.referrer||void 0,n.referring_domain=null!==(t=null===(e=n.referrer)||void 0===e?void 0:e.split("/")[2])&&void 0!==t?t:void 0}catch(e){}return n},e.prototype.getClickIds=function(){var e,t=_e();return(e={})[w]=t[w],e[E]=t[E],e[S]=t[S],e[k]=t[k],e[T]=t[T],e[P]=t[P],e[x]=t[x],e[_]=t[_],e[I]=t[I],e[A]=t[A],e[O]=t[O],e},e}(),zt="data-amp-mask",Wt="*****",$t=/\b(?:\d[ -]*?){13,16}\b/,Kt=/(\d{3}-?\d{2}-?\d{4})/g,Jt=/[^\s@]+@[^\s@.]+\.[^\s@]+/g,Gt=function(e,t){var n,r;if(void 0===t&&(t=[]),"string"!=typeof e)return"";var i=e;i=(i=(i=i.replace($t,Wt)).replace(Kt,Wt)).replace(Jt,Wt);try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;try{i=i.replace(s,Wt)}catch(e){}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i},Yt=function(e){if("undefined"==typeof document||!document.title)return"";var t=document.querySelector("title");return t&&t.hasAttribute(zt)?Wt:e?e(document.title):document.title},Xt={};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.Observable=void 0;const Qt=e=>Boolean(Symbol[e]),Zt=e=>Qt(e)?Symbol[e]:"@@"+e,en=Zt("iterator"),tn=Zt("observable"),nn=Zt("species");function rn(e,t){let n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function on(e){let t=e.constructor;return void 0!==t&&(t=t[nn],null===t&&(t=void 0)),void 0!==t?t:vn}function an(e){an.log?an.log(e):setTimeout(()=>{throw e})}function sn(e){Promise.resolve().then(()=>{try{e()}catch(e){an(e)}})}function un(e){let t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{let e=rn(t,"unsubscribe");e&&e.call(t)}}catch(e){an(e)}}function cn(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function ln(e,t,n){e._state="running";let r=e._observer;try{let i=rn(r,t);switch(t){case"next":i&&i.call(r,n);break;case"error":if(cn(e),!i)throw n;i.call(r,n);break;case"complete":cn(e),i&&i.call(r)}}catch(e){an(e)}"closed"===e._state?un(e):"running"===e._state&&(e._state="ready")}function dn(e,t,n){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:n}],void sn(()=>function(e){let t=e._queue;if(t){e._queue=void 0,e._state="ready";for(let n=0;n<t.length&&(ln(e,t[n].type,t[n].value),"closed"!==e._state);++n);}}(e))):void ln(e,t,n);e._queue.push({type:t,value:n})}}class fn{constructor(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";let n=this,r={get closed(){return"closed"===n._state},next(e){dn(n,"next",e)},error(e){dn(n,"error",e)},complete(){dn(n,"complete")}};try{this._cleanup=t.call(void 0,r)}catch(e){r.error(e)}"initializing"===this._state&&(this._state="ready")}get closed(){return"closed"===this._state}unsubscribe(){"closed"!==this._state&&(cn(this),un(this))}}class vn{constructor(e){if(!(this instanceof vn))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof e)throw new TypeError("Observable initializer must be a function");this._subscriber=e}subscribe(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new fn(e,this._subscriber)}forEach(e){return new Promise((t,n)=>{if("function"!=typeof e)return void n(new TypeError(e+" is not a function"));function r(){i.unsubscribe(),t()}let i=this.subscribe({next(t){try{e(t,r)}catch(e){n(e),i.unsubscribe()}},error:n,complete:t})})}map(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(on(this))(t=>this.subscribe({next(n){try{n=e(n)}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}filter(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(on(this))(t=>this.subscribe({next(n){try{if(!e(n))return}catch(e){return t.error(e)}t.next(n)},error(e){t.error(e)},complete(){t.complete()}}))}reduce(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=on(this),n=arguments.length>1,r=!1,i=arguments[1];return new t(t=>this.subscribe({next(o){let a=!r;if(r=!0,!a||n)try{i=e(i,o)}catch(e){return t.error(e)}else i=o},error(e){t.error(e)},complete(){if(!r&&!n)return t.error(new TypeError("Cannot reduce an empty sequence"));t.next(i),t.complete()}}))}async all(){let e=[];return await this.forEach(t=>e.push(t)),e}concat(...e){let t=on(this);return new t(n=>{let r,i=0;return function o(a){r=a.subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){i===e.length?(r=void 0,n.complete()):o(t.from(e[i++]))}})}(this),()=>{r&&(r.unsubscribe(),r=void 0)}})}flatMap(e){if("function"!=typeof e)throw new TypeError(e+" is not a function");let t=on(this);return new t(n=>{let r=[],i=this.subscribe({next(i){if(e)try{i=e(i)}catch(e){return n.error(e)}let a=t.from(i).subscribe({next(e){n.next(e)},error(e){n.error(e)},complete(){let e=r.indexOf(a);e>=0&&r.splice(e,1),o()}});r.push(a)},error(e){n.error(e)},complete(){o()}});function o(){i.closed&&0===r.length&&n.complete()}return()=>{r.forEach(e=>e.unsubscribe()),i.unsubscribe()}})}[tn](){return this}static from(e){let t="function"==typeof this?this:vn;if(null==e)throw new TypeError(e+" is not an object");let n=rn(e,tn);if(n){let r=n.call(e);if(Object(r)!==r)throw new TypeError(r+" is not an object");return function(e){return e instanceof vn}(r)&&r.constructor===t?r:new t(e=>r.subscribe(e))}if(Qt("iterator")&&(n=rn(e,en),n))return new t(t=>{sn(()=>{if(!t.closed){for(let r of n.call(e))if(t.next(r),t.closed)return;t.complete()}})});if(Array.isArray(e))return new t(t=>{sn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})});throw new TypeError(e+" is not observable")}static of(...e){return new("function"==typeof this?this:vn)(t=>{sn(()=>{if(!t.closed){for(let n=0;n<e.length;++n)if(t.next(e[n]),t.closed)return;t.complete()}})})}static get[nn](){return this}}Xt.Observable=vn,Object.defineProperty(vn,Symbol("extensions"),{value:{symbol:tn,hostReportError:an},configurable:!0});var pn=Xt.Observable;function hn(e,t){return new pn(function(n){e.subscribe({next:function(e){t(e).then(function(e){return n.next(e)}).catch(function(e){return n.error(e)})},error:function(e){n.error(e)},complete:function(){n.complete()}})})}function gn(e,t){return new pn(function(n){var r=!1,i=new Set,o=function(){var e,t;r=!0;try{for(var n=c(i),o=n.next();!o.done;o=n.next()){var a=o.value;try{a.unsubscribe()}catch(e){}}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}i.clear()},a=function(e){var t=e.subscribe({next:function(e){r||n.next(e)},error:function(e){r||(r=!0,n.error(e),o())},complete:function(){i.delete(t),r||0!==i.size||(n.complete(),o(),r=!0)}});i.add(t)};return a(e),a(t),o})}function mn(e){var t=new Set,n=null;function r(){null==n||n.unsubscribe(),n=null,t.clear()}return new pn(function(i){return t.add(i),null===n&&(n=e.subscribe({next:function(e){var n,r,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.next)||void 0===i||i.call(s,e)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},error:function(e){var n,i,o;try{for(var a=c(t),s=a.next();!s.done;s=a.next()){var u=s.value;null===(o=u.error)||void 0===o||o.call(u,e)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}r()},complete:function(){var e,n,i;try{for(var o=c(t),a=o.next();!a.done;a=o.next()){var s=a.value;null===(i=s.complete)||void 0===i||i.call(s)}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}r()}})),function(){t.delete(i),0===t.size&&n&&(n.unsubscribe(),n=null)}})}var yn={},bn={get exports(){return yn},set exports(e){yn=e}},wn=Object.prototype.hasOwnProperty;function En(e){return"[Throws: "+(e?e.message:"?")+"]"}function Sn(e){var t=[];return function e(n){if(null===n||"object"!=typeof n)return n;if(-1!==t.indexOf(n))return"[Circular]";if(t.push(n),"function"==typeof n.toJSON)try{var r=e(n.toJSON());return t.pop(),r}catch(e){return En(e)}if(Array.isArray(n)){var i=n.map(e);return t.pop(),i}var o=Object.keys(n).reduce(function(t,r){return t[r]=e(function(e,t){if(wn.call(e,t))try{return e[t]}catch(e){return En(e)}return e[t]}(n,r)),t},{});return t.pop(),o}(e)}bn.exports=function(e,t,n){return JSON.stringify(Sn(e),t,n)};var kn,Tn=yn.ensureProperties=Sn,Pn=yn||e({__proto__:null,ensureProperties:Tn,get default(){return yn}},[yn]),xn="https://app.amplitude.com",_n={US:xn,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var In="__AMPLITUDE_MESSENGER_INSTANCE__",An="__AMPLITUDE_MESSENGER__",On=function(){function e(e){var t=(void 0===e?{}:e).origin,n=void 0===t?xn:t;this[kn]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=n}return e.prototype.notify=function(e){var t,n,r,i;null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message sent: ",JSON.stringify(e)),null===(i=null===(r=window.opener)||void 0===r?void 0:r.postMessage)||void 0===i||i.call(r,e,this.endpoint)},e.prototype.sendRequest=function(e,t,n){var r=this;void 0===n&&(n={timeout:15e3});var i="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:i,action:e,args:t};return new Promise(function(t,a){r.requestCallbacks[i]={resolve:t,reject:a},r.notify(o),n.timeout>0&&setTimeout(function(){a(new Error("".concat(e," timed out (id: ").concat(i,")"))),delete r.requestCallbacks[i]},n.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var n,r,i,o;this.actionHandlers.has(e)&&(null===(o=null===(i=this.logger)||void 0===i?void 0:i.warn)||void 0===o||o.call(i,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var a=this.pendingMessages.get(e);if(a){this.pendingMessages.delete(e);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){t(u.value)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}}},e.prototype.loadScriptOnce=function(e){return s(this,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];n=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,n){var r;try{var i=document.createElement("script");i.type="text/javascript",i.async=!0,i.src=e,i.addEventListener("load",function(){t({status:!0})},{once:!0}),i.addEventListener("error",function(){n({status:!1,message:"Failed to load the script ".concat(e)})}),null===(r=document.head)||void 0===r||r.appendChild(i)}catch(e){n(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,n),i.label=1;case 1:return i.trys.push([1,3,,4]),[4,n];case 2:return i.sent(),[3,4];case 3:throw r=i.sent(),this.scriptLoadPromises.delete(e),r;case 4:return[2]}})})},e.prototype.setup=function(e){var t,n,r=this,i=void 0===e?{}:e,o=i.logger,a=i.endpoint;o&&(this.logger=o),a&&this.endpoint===xn&&(this.endpoint=a),this.isSetup||(this.isSetup=!0,null===(n=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,n,i,o,a;if(null===(n=null===(t=r.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Message received: ",JSON.stringify(e)),r.endpoint===e.origin){var s=e.data,u=null==s?void 0:s.action;if(u)if("id"in s&&s.id)null===(o=null===(i=r.logger)||void 0===i?void 0:i.debug)||void 0===o||o.call(i,"Received Response to previous request: ",JSON.stringify(e)),r.handleResponse(s);else{if("ping"===u)return void r.notify({action:"pong"});var c=r.actionHandlers.get(u);if(c)c(s.data);else{var l=null!==(a=r.pendingMessages.get(u))&&void 0!==a?a:[];l.push(s.data),r.pendingMessages.set(u,l)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=B();(null==e?void 0:e[An])===this&&delete e[An]},e}();function Cn(e){var t,n=B(),r=null==n?void 0:n[An];if("object"==typeof(t=r)&&null!==t&&In in t&&!0===t[In])return r;var i=new On(e);return n&&(n[An]=i),i}kn=In;var Rn="__AMPLITUDE_BACKGROUND_CAPTURE__";var Ln={always:"always",ifEmptyCampaign:"ifEmptyCampaign"};function Dn(e,t){var n=0;if(Number.isFinite(e)&&Number.isFinite(t)&&t>0){var r=e/t*100;n=Math.min(100,Math.max(0,r))}return n}function Nn(e,t){var n=e.currentTime,r=e.duration;return o({duration:r,start_time:n,last_position:n,percent_completed:Dn(n,r)},void 0!==t?{stop_reason:t}:{})}function Mn(e){return{mux_playback_id:e.getAttribute("playback-id"),mux_video_id:e.getAttribute("metadata-video-id"),mux_video_title:e.getAttribute("metadata-video-title")}}function jn(e,t,n,r){return s(this,void 0,void 0,function(){var i,a,s,c,d;return u(this,function(u){switch(u.label){case 0:return[4,Promise.all([new Promise(function(t){return e.getDuration(t)}),new Promise(function(t){return e.getCurrentTime(t)})])];case 1:if(i=l.apply(void 0,[u.sent(),2]),a=i[0],s=i[1],c={},"mux"===n){d=void 0;try{d=new URL(t.getAttribute("src")),c.mux_video_title=d.searchParams.get("metadata-video-title"),c.mux_video_id=d.searchParams.get("metadata-video-id"),c.mux_playback_id=d.pathname.split("/").pop()}catch(e){}}return[2,o(o({duration:a,start_time:s,last_position:s,percent_completed:Dn(s,a)},void 0!==r?{stop_reason:r}:{}
23),c)]}})})}function Un(e,t,n){void 0===n&&(n=null);var r=[],i=function(){var i=e.elem,o=!1,a=function(){jn(e,i,n).then(function(e){t.onPlay(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'play' handler: ".concat(e))})};e.on("play",a),r.push(function(){return e.off("play",a)});var c=function(){jn(e,i,n,"paused").then(function(e){t.onPause(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'pause' handler: ".concat(e))})};e.on("pause",c),r.push(function(){return e.off("pause",c)});var l=function(){jn(e,i,n,"ended").then(function(e){t.onEnded(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'ended' handler: ".concat(e))})};e.on("ended",l),r.push(function(){return e.off("ended",l)});var d=function(){o=!0,jn(e,i,n,"seeking").then(function(e){t.onSeeking(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeking' handler: ".concat(e))})};e.on("seeking",d),r.push(function(){return e.off("seeking",d)});var f=function(){o=!1,jn(e,i,n).then(function(e){t.onSeeked(e)}).catch(function(e){t.onError("Error getting iframe metadata from 'seeked' handler: ".concat(e))})};e.on("seeked",f),r.push(function(){return e.off("seeked",f)});var v=function(){(function(e){return s(this,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return[4,new Promise(function(t){return e.getCurrentTime(t)})];case 1:return[2,{currentTime:t.sent()}]}})})})(e).then(function(e){var n={position:e.currentTime,isSeeking:o};t.onTimeUpdate(n)}).catch(function(e){t.onError("Error getting iframe metadata from 'timeupdate' handler: ".concat(e))})};e.on("timeupdate",v),r.push(function(){return e.off("timeupdate",v)})};return e.on("ready",i),function(){e.off("ready",i),r.forEach(function(e){return e()})}}var qn=function(){function e(e){var t=e.videoEl,n=e.onStateChange,r=e.vendor,i=e.isEmbedded,a=this;this.state={playbackState:"paused"},this.handler={onPlay:function(e){a.updatePlaybackState("playing",e)},onPause:function(e){a.updatePlaybackState("paused",e)},onEnded:function(e){a.updatePlaybackState("ended",e)},onSeeking:function(){var e=o(o({},a.state),{isSeeking:!0});a.updateState(e)},onSeeked:function(e){var t=o(o({},a.state),{isSeeking:!1,position:e.last_position});a.updateState(t)},onError:function(e){a.updateStateWithError(e)},onTimeUpdate:function(e){a.updateTime(e)}},this.onStateChange=n,this.untrack=i?Un(t,this.handler,r):function(e,t,n){var r=function(){var r=o(o({},Nn(e)),"mux"===n?Mn(e):{});t.onPlay(r)};e.addEventListener("play",r);var i=function(){var r=o(o({},Nn(e,"paused")),"mux"===n?Mn(e):{});t.onPause(r)};e.addEventListener("pause",i);var a=function(){var r=o(o({},Nn(e,"ended")),"mux"===n?Mn(e):{});t.onEnded(r)};e.addEventListener("ended",a);var s=function(){var r=o(o({},Nn(e,"seeking")),"mux"===n?Mn(e):{});t.onSeeking(r)};e.addEventListener("seeking",s);var u=function(){var r=o(o({},Nn(e)),"mux"===n?Mn(e):{});t.onSeeked(r)};e.addEventListener("seeked",u);var c=function(){var n=e,r={position:e.currentTime,isSeeking:!!n.seeking};t.onTimeUpdate(r)};return e.addEventListener("timeupdate",c),function(){e.removeEventListener("play",r),e.removeEventListener("pause",i),e.removeEventListener("ended",a),e.removeEventListener("seeking",s),e.removeEventListener("seeked",u),e.removeEventListener("timeupdate",c)}}(t,this.handler,r)}return e.prototype.stateChangeHandler=function(e,t){try{this.onStateChange(e,t)}catch(e){}},e.prototype.updateStateWithError=function(e){var t=this.state,n=o(o({},t),{playbackState:"error",errorMessage:e});this.updateState(n)},e.prototype.updatePlaybackState=function(e,t){var n=o(o({},this.state),{playbackState:e,lastEvent:t,position:t.last_position});this.updateState(n)},e.prototype.updateTime=function(e){var t,n;if(this.state.lastEvent&&"playing"===this.state.playbackState){var r=e.isSeeking||this.state.isSeeking,i=null!==(t=this.state.position)&&void 0!==t?t:0,a=e.position;if(r)this.state=o(o({},this.state),{position:a});else{var s=a-i,u=o(o({},this.state),{position:a,watchTime:(null!==(n=this.state.watchTime)&&void 0!==n?n:0)+s});this.updateState(u)}}},e.prototype.updateState=function(e){var t=this.state;this.state=e,this.stateChangeHandler(t,e)},e.prototype.destroy=function(){this.untrack()},e}();function Fn(e){var t,n,r,i,o,a,s,u,f,v,p,h;
23if("object"==typeof e&&null!==e&&!Array.isArray(e)){var g=Object.keys(e);try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;try{var w=e[b];"boolean"==typeof(null==w?void 0:w.enabled)&&(w.enabled?(delete w.enabled,0===Object.keys(w).length&&(e[b]=!0)):e[b]=!1),Fn(w)}catch(e){}}}catch(e){t={error:e}}finally{try{y&&!y.done&&(n=m.return)&&n.call(m)}finally{if(t)throw t.error}}try{if(null===(f=null===(u=null===(s=e.autocapture)||void 0===s?void 0:s.networkTracking)||void 0===u?void 0:u.captureRules)||void 0===f?void 0:f.length)try{for(var E=c(e.autocapture.networkTracking.captureRules),S=E.next();!S.done;S=E.next()){var k=S.value;try{for(var T=(o=void 0,c(["responseHeaders","requestHeaders"])),P=T.next();!P.done;P=T.next()){var x=P.value,_=null!==(v=k[x])&&void 0!==v?v:{},I=_.captureSafeHeaders,A=_.allowlist;(I||A)&&(void 0===A||Array.isArray(A)?k[x]=d(d([],l(I?R:[]),!1),l(null!=A?A:[]),!1):delete k[x])}}catch(e){o={error:e}}finally{try{P&&!P.done&&(a=T.return)&&a.call(T)}finally{if(o)throw o.error}}}}catch(e){r={error:e}}finally{try{S&&!S.done&&(i=E.return)&&i.call(E)}finally{if(r)throw r.error}}}catch(e){}var O=null===(p=e.autocapture)||void 0===p?void 0:p.frustrationInteractions;O&&(O.rageClick&&(O.rageClicks=O.rageClick,delete O.rageClick),O.deadClick&&(O.deadClicks=O.deadClick,delete O.deadClick));try{var C=null===(h=e.autocapture)||void 0===h?void 0:h.elementInteractions;if(C&&"object"==typeof C&&(!0===C.viewportContentUpdated&&(C.viewportContentUpdated={}),!1===C.viewportContentUpdated&&(C.viewportContentUpdated={enabled:!1}),void 0!==C.exposureDuration)){var L=C.viewportContentUpdated;void 0===L?C.viewportContentUpdated={exposureDuration:C.exposureDuration}:"object"==typeof L&&void 0===L.exposureDuration&&!1!==L.enabled&&(L.exposureDuration=C.exposureDuration),delete C.exposureDuration}}catch(e){}}}var Bn=function(e,t){return"boolean"==typeof e?e:!1!==(null==e?void 0:e[t])&&(!function(){var e,t,n=B();return"string"==typeof(null===(t=null===(e=null==n?void 0:n.chrome)||void 0===e?void 0:e.runtime)||void 0===t?void 0:t.id)}()||!!(null==e?void 0:e[t]))},Hn=function(e){return Bn(e,"attribution")},Vn=function(e){return Bn(e,"formInteractions")},zn=function(e){return Bn(e,"pageViews")},Wn=function(e){return Bn(e,"sessions")},$n=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.networkTracking||"object"==typeof e.networkTracking)},Kn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.elementInteractions||"object"==typeof e.elementInteractions)},Jn=function(e){return"boolean"==typeof e?e:"object"==typeof e&&(!0===e.frustrationInteractions||"object"==typeof e.frustrationInteractions)},Gn=function(e){if("object"==typeof e.autocapture){var t=e.autocapture.performanceTracking;return!0===t?{mainThreadBlock:!0}:"object"==typeof t&&null!==t?t:void 0}},Yn=function(e){if(Kn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.elementInteractions)return e.autocapture.elementInteractions},Xn=function(e){if(Jn(e.autocapture)&&"object"==typeof e.autocapture&&"object"==typeof e.autocapture.frustrationInteractions)return e.autocapture.frustrationInteractions},Qn=function(e){var t;if($n(e.autocapture)){var n=void 0;return"object"==typeof e.autocapture&&"object"==typeof e.autocapture.networkTracking?n=e.autocapture.networkTracking:e.networkTrackingOptions&&(n=e.networkTrackingOptions),o(o({},n),{captureRules:null===(t=null==n?void 0:n.captureRules)||void 0===t?void 0:t.map(function(t){var n,r,i;if((null===(n=t.urls)||void 0===n?void 0:n.length)&&(null===(r=t.hosts)||void 0===r?void 0:r.length)){var a=JSON.stringify(t.hosts),s=JSON.stringify(t.urls);return null===(i=e.loggerProvider)||void 0===i||i.warn("Found network capture rule with both urls='".concat(s,"' and hosts='").concat(a,"' set. ")+"Definition of urls takes precedence over hosts, so ignoring hosts."),o(o({},t),{hosts:void 0})}return t})})}},Zn=function(e){var t,n=function(){return!1},r=void 0,i=e.pageCounter;return zn(e.defaultTracking)&&(n=void 0,t=void 0,e.defaultTracking&&"object"==typeof e.defaultTracking&&e.defaultTracking.pageViews&&"object"==typeof e.defaultTracking.pageViews&&("trackOn"in e.defaultTracking.pageViews&&(n=e.defaultTracking.pageViews.trackOn),"trackHistoryChanges"in e.defaultTracking.pageViews&&(r=e.defaultTracking.pageViews.trackHistoryChanges),"eventType"in e.defaultTracking.pageViews&&e.defaultTracking.pageViews.eventType&&(t=e.defaultTracking.pageViews.eventType))),{trackOn:n,trackHistoryChanges:r,eventType:t,pageCounter:i}},er=function(e,t){tr(e,t)},tr=function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.name,o=r.args,a=r.resolve,s=e&&e[i];if("function"==typeof s){var u=s.apply(e,o);"function"==typeof a&&a(null==u?void 0:u.promise)}}return e},nr=function(e){return e&&void 0!==e._q},rr="2.45.3",ir="amplitude-ts-sdk-script",or=function(){function e(){this.name="@amplitude/plugin-context-browser",this.type="before",this.library="".concat(ir,"/").concat(rr),"undefined"!=typeof navigator&&(this.userAgent=navigator.userAgent)}return e.prototype.setup=function(e){return this.config=e,Promise.resolve(void 0)},e.prototype.execute=function(e){var t,n;return s(this,void 0,void 0,function(){var r,i,a;return u(this,function(s){return r=(new Date).getTime(),i=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1,a=null!==(n=e.event_id)&&void 0!==n?n:i+1,this.config.lastEventId=a,e.time||(this.config.lastEventTime=r),[2,o(o(o(o(o(o(o(o({user_id:this.config.userId,device_id:this.config.deviceId,session_id:this.config.sessionId,time:r},this.config.appVersion&&{app_version:this.config.appVersion}),this.config.trackingOptions.platform&&{platform:"Web"}),this.config.trackingOptions.language&&{language:xe()}),this.config.trackingOptions.ipAddress&&{ip:"$remote"}),{insert_id:V(),partner_id:this.config.partnerId,plan:this.config.plan}),this.config.ingestionMetadata&&{ingestion_metadata:{source_name:this.config.ingestionMetadata.sourceName,source_version:this.config.ingestionMetadata.sourceVersion}}),e),{event_id:a,library:this.library,user_agent:this.userAgent})]})})},e}(),ar=1e3,sr=function(e){function t(t){var n,r,i,o=this;try{i=null===(n=B())||void 0===n?void 0:n.localStorage}catch(e){null===(r=null==t?void 0:t.loggerProvider)||void 0===r||r.debug("Failed to access localStorage. error=".concat(JSON.stringify(e))),i=void 0}return(o=e.call(this,i)||this).loggerProvider=null==t?void 0:t.loggerProvider,o}return n(t,e),t.prototype.set=function(t,n){var r;return s(this,void 0,void 0,function(){var i;return u(this,function(o){switch(o.label){case 0:return Array.isArray(n)&&n.length>ar?(i=n.length-ar,[4,e.prototype.set.call(this,t,n.slice(0,ar))]):[3,2];case 1:return o.sent(),null===(r=this.loggerProvider)||void 0===r||r.error("Failed to save ".concat(i," events because the queue length exceeded ").concat(ar,".")),[3,4];case 2:return[4,e.prototype.set.call(this,t,n)];case 3:o.sent(),o.label=4;case 4:return[2]}})})},t}(Ue),ur=function(e){function t(){var t;return e.call(this,null===(t=B())||void 0===t?void 0:t.sessionStorage)||this}return n(t,e),t}(Ue),cr=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;return n.state={done:4},n.customHeaders=t,n}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r=this;return u(this,function(i){return[2,new Promise(function(i,a){"undefined"==typeof XMLHttpRequest&&a(new Error("XHRTransport is not supported."));var d=new XMLHttpRequest;d.open("POST",e,!0),d.onreadystatechange=function(){if(d.readyState===r.state.done){var e=d.responseText;try{i(r.buildResponse(JSON.parse(e)))}catch(e){i(r.buildResponse({code:d.status}))}}};var f={"Content-Type":"application/json",Accept:"*/*"},v=JSON.stringify(t),p=n&&v.length>=2048&&nt(),h=function(e){var t,n;f=o(o({},r.customHeaders),f);try{for(var i=c(Object.entries(f)),a=i.next();!a.done;a=i.next()){var s=l(a.value,2),u=s[0],v=s[1];d.setRequestHeader(u,v)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}d.send(e)};s(r,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return p?[4,rt(v)]:[3,2];case 1:return(e=t.sent())?(f["Content-Encoding"]="gzip",h(e)):h(v),[3,3];case 2:h(v),t.label=3;case 3:return[2]}})}).catch(a)})]})})},t}(tt),lr=function(e){function t(t,n,r){void 0===t&&(t={});var i=e.call(this)||this;return i.customHeaders=t,i.enableKeepalive=!1!==n,i.referrerPolicy=r,i}return n(t,e),t.prototype.send=function(e,t,n){return void 0===n&&(n=!1),s(this,void 0,void 0,function(){var r,i,a,s,c,l,d,f,v;return u(this,function(u){switch(u.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r=JSON.stringify(t),i=n&&r.length>=2048&&nt(),a=r,s={"Content-Type":"application/json",Accept:"*/*"},i?[4,rt(r)]:[3,2];case 1:(c=u.sent())&&(s["Content-Encoding"]="gzip",a=c),u.label=2;case 2:return s=o(o({},this.customHeaders),s),l="string"==typeof a?a.length:a.byteLength,d={headers:s,body:a,method:"POST",keepalive:this.enableKeepalive&&l<=16384},this.referrerPolicy&&(d.referrerPolicy=this.referrerPolicy),[4,fetch(e,d)];case 3:return[4,(f=u.sent()).text()];case 4:v=u.sent();try{return[2,this.buildResponse(JSON.parse(v))]}catch(e){return[2,this.buildResponse({code:f.status})]}return[2]}})})},t}(tt),dr=function(e){function t(){return e.call(this)||this}return n(t,e),t.prototype.send=function(e,t,n){return s(this,void 0,void 0,function(){var n=this;return u(this,function(r){return[2,new Promise(function(r,i){var o=B();if(!(null==o?void 0:o.navigator.sendBeacon))throw new Error("SendBeaconTransport is not supported");try{var a=JSON.stringify(t);return r(o.navigator.sendBeacon(e,a)?n.buildResponse({code:200,events_ingested:t.events.length,payload_size_bytes:a.length,server_upload_time:Date.now()}):n.buildResponse({code:500}))}catch(e){i(e)}})]})})},t}(tt),fr=function(e,t,n){return void 0===n&&(n=!0),s(void 0,void 0,void 0,function(){var r,i,o,a,s,c,d,f,p;return u(this,function(u){switch(u.label){case 0:return r=function(e){return"".concat(v.toLowerCase(),"_").concat(e.substring(0,6))}(e),[4,t.getRaw(r)];case 1:return(i=u.sent())?n?[4,t.remove(r)]:[3,3]:[2,{optOut:!1}];case 2:u.sent(),u.label=3;
vendor: 16,187 bytes, line 23
23case 3:return o=l(i.split("."),6),a=o[0],s=o[1],c=o[2],d=o[3],f=o[4],p=o[5],[2,{deviceId:a,userId:pr(s),sessionId:vr(d),lastEventId:vr(p),lastEventTime:vr(f),optOut:Boolean(c)}]}})})},vr=function(e){var t=parseInt(e,32);if(!isNaN(t))return t},pr=function(e){if(atob&&escape&&e)try{return decodeURIComponent(escape(atob(e)))}catch(e){return}},hr="[Amplitude]",gr="".concat(hr," Form Started"),mr="".concat(hr," Form Submitted"),yr="".concat(hr," File Downloaded"),br="session_start",wr="session_end",Er="".concat(hr," File Extension"),Sr="".concat(hr," File Name"),kr="".concat(hr," Link ID"),Tr="".concat(hr," Link Text"),Pr="".concat(hr," Link URL"),xr="".concat(hr," Form ID"),_r="".concat(hr," Form Name"),Ir="".concat(hr," Form Destination"),Ar="cookie",Or=Object.freeze({__proto__:null,get IdentifyOperation(){return r},get SpecialEventType(){return i},get RevenueProperty(){return q},get LogLevel(){return G},get ServerZone(){return pt},OfflineDisabled:null,DEFAULT_CSS_SELECTOR_ALLOWLIST:gt,DEFAULT_DATA_ATTRIBUTE_PREFIX:mt,DEFAULT_ACTION_CLICK_ALLOWLIST:yt,EXCLUDE_INTERNAL_REFERRERS_CONDITIONS:Ln}),Cr=function(e){var t=e.split(".");return t.length<=2?e:t.slice(t.length-2,t.length).join(".")},Rr=function(e,t,n,r,i,s){void 0===i&&(i=!0),e.referrer;var u=e.referring_domain,c=a(e,["referrer","referring_domain"]),l=t||{};l.referrer;var d,f=l.referring_domain,v=a(l,["referrer","referring_domain"]),p=n.excludeInternalReferrers;if(p){var h=Dr(p,r);if(!(h instanceof TypeError)&&e.referring_domain&&Ur(e.referring_domain,s)){if("always"===h)return Nr(h,e.referring_domain,r),!1;if("ifEmptyCampaign"===h&&(d=o(o({},e),{referring_domain:void 0,referrer:void 0}),Object.values(d).every(function(e){return!e})))return Nr(h,e.referring_domain,r),!1}}if(Lr(n.excludeReferrers,e.referring_domain))return r.debug("This is not a new campaign because ".concat(e.referring_domain," is in the exclude referrer list.")),!1;if(!i&&function(e){return Object.values(e).every(function(e){return!e})}(e)&&t)return r.debug("This is not a new campaign because this is a direct traffic in the same session."),!1;var g=JSON.stringify(c)!==JSON.stringify(v),m=Cr(u||"")!==Cr(f||""),y=!t||g||m;return y?r.debug("This is a new campaign. An $identify event will be sent."):r.debug("This is not a new campaign because it's the same as the previous one."),y},Lr=function(e,t){return void 0===e&&(e=[]),void 0===t&&(t=""),e.some(function(e){return e instanceof RegExp?e.test(t):e===t})},Dr=function(e,t){if(!0===e)return Ln.always;if("object"==typeof e){var n=e.condition;if("string"==typeof n&&Object.keys(Ln).includes(n))return n;if(void 0===n)return Ln.always}var r="Invalid configuration provided for attribution.excludeInternalReferrers: ".concat(JSON.stringify(e));return t.error(r),new TypeError(r)};function Nr(e,t,n){var r="This is not a new campaign because referring_domain=".concat(t," is on the same domain as the current page and it is configured to exclude internal referrers");"always"===e?n.debug(r):"ifEmptyCampaign"===e&&n.debug("".concat(r," with empty campaign parameters"))}var Mr=["ac.in","ac.jp","ac.kr","ac.th","ac.uk","ac.za","appspot.com","asn.au","azurewebsites.net","cloudfront.net","myshopify.com","blogspot.com","co.ca","co.in","co.jp","co.kr","co.nz","co.th","co.uk","co.za","com.ar","com.au","com.br","com.cn","com.hk","com.in","com.jp","com.kr","com.mx","com.pl","com.sg","com.tr","com.tw","ed.jp","edu.au","edu.br","edu.cn","edu.hk","edu.sg","edu.th","edu.tr","edu.tw","firebaseapp.com","fly.dev","gc.ca","geek.nz","github.io","gitlab.io","go.jp","go.kr","go.th","gob.ar","gob.mx","gov.au","gov.br","gov.cn","gov.hk","gov.in","gov.pl","gov.sg","gov.tr","gov.tw","gov.uk","gov.za","govt.nz","gr.jp","herokuapp.com","id.au","idv.hk","iwi.nz","lg.jp","ltd.uk","maori.nz","me.uk","mil.kr","ne.jp","ne.kr","net.au","net.br","net.cn","net.hk","net.in","net.nz","net.pl","net.sg","net.tr","net.tw","net.za","onrender.com","or.jp","or.kr","or.th","org.ar","org.au","org.br","org.cn","org.hk","org.in","org.mx","org.nz","org.pl","org.sg","org.tw","org.uk","org.za","pages.dev","pe.kr","plc.uk","re.kr","res.in","sch.uk","vercel.app","netlify.app","workers.dev"],jr=function(e){var t,n,r=e||(null===(n=null===(t=B())||void 0===t?void 0:t.location)||void 0===n?void 0:n.hostname);if(!r)return"";var i=r.split("."),o=i[i.length-1],a=i[i.length-2];return Mr.find(function(e){return r.endsWith(".".concat(e))})&&(o=i[i.length-2]+"."+i[i.length-1],a=i[i.length-3]),a?"".concat(a,".").concat(o):o},Ur=function(e,t){var n=B();if(!n)return!1;var r,i,o,a=(t||"").trim()||jr(n.location.hostname);return r=e,o=(i=a).startsWith(".")?i:".".concat(i),!!(r.startsWith(".")?r:".".concat(r)).endsWith(o)},qr=function(e){function t(t,n,r,i,o,a,s,u,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,V,z){void 0===r&&(r=new Le),void 0===i&&(i={domain:"",expiration:365,sameSite:"Lax",secure:!1,upgrade:!0}),void 0===u&&(u=1e3),void 0===c&&(c=5),void 0===l&&(l=30),void 0===d&&(d=Ar),void 0===g&&(g=new X),void 0===m&&(m=G.Warn),void 0===b&&(b=!1),void 0===w&&(w=!1),void 0===k&&(k=""),void 0===T&&(T="US"),void 0===_&&(_=18e5),void 0===I&&(I=new sr({loggerProvider:g})),void 0===A&&(A={ipAddress:!0,language:!0,platform:!0}),void 0===O&&(O="fetch"),void 0===C&&(C=!1),void 0===R&&(R=!0),void 0===U&&(U=!0),void 0===q&&(q=0),void 0===V&&(V=!1);var W,$=this;($=e.call(this,{apiKey:t,storageProvider:I,transportProvider:Hr(O)})||this).apiKey=t,$.appVersion=n,$.cookieOptions=i,$.defaultTracking=o,$.autocapture=a,$.flushIntervalMillis=u,$.flushMaxRetries=c,$.flushQueueSize=l,$.identityStorage=d,$.ingestionMetadata=f,$.instanceName=v,$.loggerProvider=g,$.logLevel=m,$.minIdLength=y,$.offline=b,$.partnerId=E,$.plan=S,$.serverUrl=k,$.serverZone=T,$.sessionTimeout=_,$.storageProvider=I,$.trackingOptions=A,$.transport=O,$.useBatch=C,$.fetchRemoteConfig=R,$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F,$.remoteConfig=B,$.topLevelDomain=H,$.enableRequestBodyCompression=V,$.customEnrichment=z,$.version=rr,$._optOut=!1,$._cookieStorage=r,$.deviceId=s,$.lastEventId=p,$.lastEventTime=h,$.optOut=w,$.deferredSessionId=x,$.sessionId=P,$.pageCounter=D,$.userId=L,$.debugLogsEnabled=N,$.loggerProvider.enable(N?G.Debug:$.logLevel),$.networkTrackingOptions=M,$.identify=j,$.enableDiagnostics=U,$.diagnosticsSampleRate=q,$.diagnosticsClient=F;var K=null!==(W=null==B?void 0:B.fetchRemoteConfig)&&void 0!==W?W:R;return $.remoteConfig=$.remoteConfig||{},$.remoteConfig.fetchRemoteConfig=K,$.fetchRemoteConfig=K,$.topLevelDomain=H||jr(),$}return n(t,e),Object.defineProperty(t.prototype,"cookieStorage",{get:function(){return this._cookieStorage},set:function(e){this._cookieStorage!==e&&(this._cookieStorage=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceId",{get:function(){return this._deviceId},set:function(e){this._deviceId!==e&&(this._deviceId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"userId",{get:function(){return this._userId},set:function(e){this._userId!==e&&(this._userId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"sessionId",{get:function(){return this._sessionId},set:function(e){this._sessionId!==e&&(this._sessionId=e,void 0!==e&&void 0!==this._deferredSessionId&&(this._deferredSessionId=void 0),this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deferredSessionId",{get:function(){return this._deferredSessionId},set:function(e){this._deferredSessionId!==e&&e!==this.sessionId&&(this._deferredSessionId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut!==e&&(this._optOut=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventTime",{get:function(){return this._lastEventTime},set:function(e){this._lastEventTime!==e&&(this._lastEventTime=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastEventId",{get:function(){return this._lastEventId},set:function(e){this._lastEventId!==e&&(this._lastEventId=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"pageCounter",{get:function(){return this._pageCounter},set:function(e){this._pageCounter!==e&&(this._pageCounter=e,this.updateStorage())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"debugLogsEnabled",{set:function(e){this._debugLogsEnabled!==e&&(this._debugLogsEnabled=e,this.updateStorage())},enumerable:!1,configurable:!0}),t.prototype.updateStorage=function(){var e={deviceId:this._deviceId,userId:this._userId,sessionId:this._sessionId,deferredSessionId:this._deferredSessionId,optOut:this._optOut,lastEventTime:this._lastEventTime,lastEventId:this._lastEventId,pageCounter:this._pageCounter,debugLogsEnabled:this._debugLogsEnabled,cookieDomain:void 0};this.cookieStorage instanceof De&&(e.cookieDomain=this.cookieStorage.options.domain),this.cookieStorage.set(Pe(this.apiKey),e)},t}(Z),Fr=function(e,t,n,r,i){return void 0===t&&(t={}),s(void 0,void 0,void 0,function(){var a,s,c,l,d,f,v,p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A,O,C,R,L,D,N,M,j,U,q,F,B,H,z,W,$,K,J,G,Y,X,Q,Z,ee,te,ne,re,ie;return u(this,function(u){switch(u.label){case 0:return a=t.identityStorage||Ar,s="",a!==Ar||(null===(I=t.cookieOptions)||void 0===I?void 0:I.domain)||""===(null===(A=t.cookieOptions)||void 0===A?void 0:A.domain)?[3,2]:[4,Vr(void 0,r)];case 1:s=u.sent(),u.label=2;case 2:return c=o({domain:null!==(C=null===(O=t.cookieOptions)||void 0===O?void 0:O.domain)&&void 0!==C?C:s,expiration:365,sameSite:"Lax",secure:!1,upgrade:!0},t.cookieOptions),l={duplicateResolverFn:function(e){var t=Ne(e);if(!t)return!1;var n=JSON.parse(t);return Me(n.cookieDomain,c.domain)},diagnosticsClient:r},d=Br(t.identityStorage,c,l),[4,fr(e,d,null===(L=null===(R=t.cookieOptions)||void 0===R?void 0:R.upgrade)||void 0===L||L)];case 3:return f=u.sent(),[4,d.get(Pe(e))];case 4:return v=u.sent(),p=_e(),h=p.ampTimestamp?Number(p.ampTimestamp):void 0,g=!h||Date.now()<h,m=null!==(U=null!==(j=null!==(M=null!==(D=t.deviceId)&&void 0!==D?D:g?null!==(N=p.ampDeviceId)&&void 0!==N?N:p.deviceId:void 0)&&void 0!==M?M:null==v?void 0:v.deviceId)&&void 0!==j?j:f.deviceId)&&void 0!==U?U:V(),y=null!==(q=null==v?void 0:v.lastEventId)&&void 0!==q?q:f.lastEventId,b=null!==(F=null==v?void 0:v.lastEventTime)&&void 0!==F?F:f.lastEventTime,w=null!==(H=null!==(B=t.optOut)&&void 0!==B?B:null==v?void 0:v.optOut)&&void 0!==H?H:f.optOut,E=null!==(z=null==v?void 0:v.sessionId)&&void 0!==z?z:f.sessionId,S=null==v?void 0:v.deferredSessionId,k=null!==($=null!==(W=t.userId)&&void 0!==W?W:null==v?void 0:v.userId)&&void 0!==$?$:f.userId,n.previousSessionDeviceId=null!==(K=null==v?void 0:v.deviceId)&&void 0!==K?K:f.deviceId,n.previousSessionUserId=null!==(J=null==v?void 0:v.userId)&&void 0!==J?J:f.userId,T={ipAddress:null===(Y=null===(G=t.trackingOptions)||void 0===G?void 0:G.ipAddress)||void 0===Y||Y,language:null===(Q=null===(X=t.trackingOptions)||void 0===X?void 0:X.language)||void 0===Q||Q,platform:null===(ee=null===(Z=t.trackingOptions)||void 0===Z?void 0:Z.platform)||void 0===ee||ee},P=null==v?void 0:v.pageCounter,x=null==v?void 0:v.debugLogsEnabled,void 0!==t.autocapture&&(t.defaultTracking=t.autocapture),[4,(_=new qr(e,t.appVersion,d,c,t.defaultTracking,t.autocapture,m,t.flushIntervalMillis,t.flushMaxRetries,t.flushQueueSize,a,t.ingestionMetadata,t.instanceName,y,b,null!==(te=null==i?void 0:i.loggerProvider)&&void 0!==te?te:t.loggerProvider,t.logLevel,t.minIdLength,t.offline,w,t.partnerId,t.plan,t.serverUrl,null!==(ne=null==i?void 0:i.serverZone)&&void 0!==ne?ne:t.serverZone,E,S,t.sessionTimeout,t.storageProvider,T,t.transport,t.useBatch,t.fetchRemoteConfig,k,P,x,t.networkTrackingOptions,t.identify,null!==(re=null==i?void 0:i.enableDiagnostics)&&void 0!==re?re:t.enableDiagnostics,null!==(ie=null==i?void 0:i.diagnosticsSampleRate)&&void 0!==ie?ie:n._diagnosticsSampleRate,r,t.remoteConfig,s,t.enableRequestBodyCompression,t.customEnrichment)).storageProvider.isEnabled()];case 5:return u.sent()||(_.loggerProvider.warn("Storage provider ".concat(_.storageProvider.constructor.name," is not enabled. Falling back to MemoryStorage.")),_.storageProvider=new Le),[2,_]}})})},Br=function(e,t,n){switch(void 0===e&&(e=Ar),void 0===t&&(t={}),e){case"localStorage":return new sr;case"sessionStorage":return new ur;case"none":return new Le;default:return new De(o(o({},t),{expirationDays:t.expiration}),n)}},Hr=function(e){var t="object"==typeof e?e.type:e,n="object"==typeof e?e.headers:void 0,r="object"==typeof e?e.enableKeepalive:void 0,i="object"==typeof e?e.referrerPolicy:void 0;return"xhr"===t?new cr(n):"beacon"===t?new dr:new lr(n,r,i)},Vr=function(e,t){return s(void 0,void 0,void 0,function(){var n,r,i,o,a,s,c;return u(this,function(u){switch(u.label){case 0:return[4,new De(void 0,{diagnosticsClient:t}).isEnabled()];case 1:if(!u.sent()||!e&&("undefined"==typeof location||!location.hostname))return[2,""];if(n=null!=e?e:location.hostname,1===(r=n.split(".")).length)return[2,""];for(i=[],o=1,Mr.find(function(e){return n.endsWith(".".concat(e))})&&(o=2),a=r.length-o-1;a>=0;--a)i.push(r.slice(a).join("."));a=0,u.label=2;case 2:if(!(a<i.length))return[3,7];s=i[a],u.label=3;case 3:return u.trys.push([3,5,,6]),[4,De.isDomainWritable(s)];case 4:return u.sent()?[2,"."+s]:[3,6];case 5:return c=u.sent(),t&&t.recordEvent("cookies.tld.failure",{reason:"Unexpected exception checking domain is writable: ".concat(s),error:c instanceof Error?c.message:String(c)}),[3,6];case 6:return a++,[3,2];case 7:return t&&t.recordEvent("cookies.tld.failure",{reason:"Could not determine TLD for host ".concat(n)}),[2,""]}})})},zr="AMP_PAGE_VIEW",Wr=function(e){var t;void 0===e&&(e={});var n,r,i=B(),a=void 0,c=!1,d=e.trackOn,f=e.trackHistoryChanges,v=e.eventType,p=void 0===v?"[Amplitude] Page Viewed":v,h=function(e){var t=e;try{t=decodeURI(e)}catch(e){null==a||a.error("Malformed URI sequence: ",e)}return t},g=function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(i){switch(i.label){case 0:return t=h("undefined"!=typeof location&&location.href||""),r={event_type:p},n=[{}],[4,$r()];case 1:return[2,(r.event_properties=o.apply(void 0,[o.apply(void 0,n.concat([i.sent()])),{"[Amplitude] Page Domain":"undefined"!=typeof location&&location.hostname||"","[Amplitude] Page Location":t,"[Amplitude] Page Path":"undefined"!=typeof location&&h(location.pathname)||"","[Amplitude] Page Title":Yt(Gt),"[Amplitude] Page URL":t.split("?")[0],"[Amplitude] Page View ID":e}]),r)]}})})},m=function(){return void 0===d||"function"==typeof d&&d()},y="undefined"!=typeof location?location.href:null,b=function(){s(void 0,void 0,void 0,function(){var e,n,i,o,s;return u(this,function(u){switch(u.label){case 0:return e=location.href,n=Jr(f,e,y||"")&&m(),y=e,n?(i=void 0,r&&(i=V(),r.set(zr,{pageViewId:i})),null==a||a.log("Tracking page view event"),null!=t?[3,1]:[3,3]):[3,4];case 1:return s=(o=t).track,[4,g(i)];case 2:s.apply(o,[u.sent()]),u.label=3;case 3:u.label=4;case 4:return[2]}})})},w={name:"@amplitude/plugin-page-view-tracking-browser",type:"enrichment",setup:function(e,o){return s(void 0,void 0,void 0,function(){var s,d,f;return u(this,function(u){switch(u.label){case 0:if(t=o,n=e,(a=e.loggerProvider).log("Installing @amplitude/plugin-page-view-tracking-browser"),c=!0,i){try{r=new Ue(i.sessionStorage)}catch(e){null==a||a.debug("sessionStorage is not available in this environment.")}i.addEventListener("popstate",b),i.history.pushState=new Proxy(i.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),c&&b()}})}return m()?(a.log("Tracking page view event"),s=void 0,r&&(s=V(),r.set(zr,{pageViewId:s})),f=(d=t).track,[4,g(s)]):[3,2];case 1:f.apply(d,[u.sent()]),u.label=2;case 2:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,i,s;return u(this,function(u){switch(u.label){case 0:return"attribution"===d&&Kr(e)?(null==a||a.log("Enriching c
23ampaign event to page view event with campaign parameters"),t=void 0,r?[4,r.get(zr)]:[3,2]):[3,4];case 1:i=u.sent(),t=null==i?void 0:i.pageViewId,u.label=2;case 2:return[4,g(t)];case 3:s=u.sent(),e.event_type=s.event_type,e.event_properties=o(o({},e.event_properties),s.event_properties),u.label=4;case 4:return n&&e.event_type===p&&(n.pageCounter=n.pageCounter?n.pageCounter+1:1,e.event_properties=o(o({},e.event_properties),{"[Amplitude] Page Counter":n.pageCounter})),[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return i&&(i.removeEventListener("popstate",b),c=!1),[2]})})}};return w},$r=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return e=Re,[4,(new Vt).parse()];case 1:return[2,e.apply(void 0,[t.sent()])]}})})},Kr=function(e){if("$identify"===e.event_type&&e.user_properties){var t=e.user_properties,n=t[r.SET]||{},i=t[r.UNSET]||{},o=d(d([],l(Object.keys(n)),!1),l(Object.keys(i)),!1);return Object.keys(C).every(function(e){return o.includes(e)})}return!1},Jr=function(e,t,n){if("pathOnly"===e){if(""==n)return!0;var r=new URL(t),i=new URL(n);return r.origin+r.pathname!==i.origin+i.pathname}return t!==n},Gr=function(){var e,t,n=[],r=function(e,t,r){e.addEventListener(t,r),n.push({element:e,type:t,handler:r})};return{name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(n,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return t=function(e){if(Vn(e.defaultTracking)&&e.defaultTracking&&"object"==typeof e.defaultTracking&&"object"==typeof e.defaultTracking.formInteractions)return e.defaultTracking.formInteractions}(n),o=function(){if(i){if("undefined"!=typeof document){var o=new WeakSet,a=function(e){if(!o.has(e)){o.add(e);var a=!1;r(e,"change",function(){var t,n=Xr(e);a||i.track(gr,((t={})[xr]=Yr(e.id),t[_r]=Yr(e.name),t[Ir]=n,t)),a=!0}),r(e,"submit",function(r){var o,s,u=Xr(e);if(a||i.track(gr,((o={})[xr]=Yr(e.id),o[_r]=Yr(e.name),o[Ir]=u,o)),a=!0,void 0!==(null==t?void 0:t.shouldTrackSubmit))if("function"==typeof t.shouldTrackSubmit&&"undefined"!=typeof SubmitEvent&&r instanceof SubmitEvent)try{if(!t.shouldTrackSubmit(r))return}catch(e){n.loggerProvider.warn("shouldTrackSubmit callback threw an error, proceeding with tracking.")}else n.loggerProvider.warn("shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.");i.track(mr,((s={})[xr]=Yr(e.id),s[_r]=Yr(e.name),s[Ir]=u,s)),a=!1})}};Array.from(document.getElementsByTagName("form")).forEach(a),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"FORM"===e.nodeName&&a(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(a)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.")},"complete"===document.readyState?o():(a=B())?a.addEventListener("load",o):n.loggerProvider.debug("Form interaction tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return null==e||e.disconnect(),n.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),n=[],[2]})})}}},Yr=function(e){if("string"==typeof e)return e},Xr=function(e){var t=e.getAttribute("action");try{t=new URL(encodeURI(null!=t?t:""),window.location.href).href}catch(e){}return t},Qr=function(){var e,t=[];return{name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(n,r){return s(void 0,void 0,void 0,function(){var i,o;return u(this,function(a){return i=function(){if(r){if("undefined"!=typeof document){var i=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var i=o.exec(n.href),a=null==i?void 0:i[1];a&&function(e,n,r){e.addEventListener(n,r),t.push({element:e,type:n,handler:r})}(e,"click",function(){var t;a&&r.track(yr,((t={})[Er]=a,t[Sr]=n.pathname,t[kr]=e.id,t[Tr]=e.text,t[Pr]=e.href,t))})},o=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/;
23Array.from(document.getElementsByTagName("a")).forEach(i),"undefined"!=typeof MutationObserver&&(e=new MutationObserver(function(e){e.forEach(function(e){e.addedNodes.forEach(function(e){"A"===e.nodeName&&i(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(i)})})})).observe(document.body,{subtree:!0,childList:!0})}}else n.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.")},"complete"===document.readyState?i():(o=B())?o.addEventListener("load",i):n.loggerProvider.debug("File download tracking is not installed because global is undefined."),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return null==e||e.disconnect(),t.forEach(function(e){var t=e.element,n=e.type,r=e.handler;null==t||t.removeEventListener(n,r)}),t=[],[2]})})}}},Zr=!1,ei=function(){var e=B(),t=[],n=function(n,r){(null==e?void 0:e.addEventListener)&&(null==e||e.addEventListener(n,r),t.push({type:n,handler:r}))};return{name:"@amplitude/plugin-network-checker-browser",type:"before",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(r){return"undefined"==typeof navigator?(e.loggerProvider.debug("Network connectivity checker plugin is disabled because navigator is not available."),e.offline=!1,[2]):(e.offline=!navigator.onLine,n("online",function(){!1!==e.offline&&(e.loggerProvider.debug("Network connectivity changed to online."),e.offline=!1,setTimeout(function(){t.flush()},e.flushIntervalMillis))}),n("offline",function(){e.loggerProvider.debug("Network connectivity changed to offline."),e.offline=!0}),[2])})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(n){return t.forEach(function(t){var n=t.type,r=t.handler;null==e||e.removeEventListener(n,r)}),t=[],[2]})})}}};function ti(e,t,n){var r,i,o=[];try{for(var a=c(null!=t?t:[]),s=a.next();!s.done;s=a.next()){var u=s.value;try{o.push(new RegExp(u))}catch(e){n.loggerProvider.warn("Invalid regex pattern: ".concat(u),e)}}}catch(e){r={error:e}}finally{try{s&&!s.done&&(i=a.return)&&i.call(a)}finally{if(r)throw r.error}}return e.concat(o)}function ni(e,t){var n,r,i,a,s,u,l;if(e){Fn(e);try{t.loggerProvider.debug("Update browser config with remote configuration:",Pn(e));var d=e;if(d&&"autocapture"in d){if("boolean"==typeof d.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture&&null!==d.autocapture){var f=o({},d.autocapture);if(void 0===t.autocapture&&(t.autocapture=d.autocapture),"object"==typeof d.autocapture.elementInteractions&&null!==d.autocapture.elementInteractions&&(null===(i=d.autocapture.elementInteractions.pageUrlAllowlistRegex)||void 0===i?void 0:i.length)){f.elementInteractions=o({},d.autocapture.elementInteractions);var v=f.elementInteractions,p=null!==(a=v.pageUrlAllowlist)&&void 0!==a?a:[],h=d.autocapture.elementInteractions.pageUrlAllowlistRegex;v.pageUrlAllowlist=ti(p,h,t),delete v.pageUrlAllowlistRegex}if("object"==typeof d.autocapture.networkTracking&&null!==d.autocapture.networkTracking&&(null===(s=d.autocapture.networkTracking.captureRules)||void 0===s?void 0:s.length)){f.networkTracking=o({},d.autocapture.networkTracking);var g=null!==(u=f.networkTracking.captureRules)&&void 0!==u?u:[];try{for(var m=c(g),y=m.next();!y.done;y=m.next()){var b=y.value;b.urls=ti(null!==(l=b.urls)&&void 0!==l?l:[],b.urlsRegex,t),delete b.urlsRegex}}catch(e){n={error:e}}finally{try{y&&!y.done&&(r=m.return)&&r.call(m)}finally{if(n)throw n.error}}}"boolean"==typeof t.autocapture&&(t.autocapture=o({attribution:t.autocapture,fileDownloads:t.autocapture,formInteractions:t.autocapture,pageViews:t.autocapture,sessions:t.autocapture,elementInteractions:t.autocapture,webVitals:t.autocapture,frustrationInteractions:t.autocapture},f)),"object"==typeof t.autocapture&&(t.autocapture=o(o({},t.autocapture),f))}t.defaultTracking=t.autocapture}"customEnrichment"in d&&null!==d.customEnrichment&&!1!==t.customEnrichment&&(t.customEnrichment=d.customEnrichment),t.loggerProvider.debug("Browser config after remote config update:",Pn(t))}catch(e){t.loggerProvider.error("Failed to apply remote configuration because of error: ",e)}}}var ri,ii="1.28.8",oi="[Amplitude] Element Clicked",ai="[Amplitude] Element Tag",si="[Amplitude] Element Text",ui="[Amplitude] Page URL",ci="[Amplitude] Viewport Height",li="[Amplitude] Viewport Width",di="[Amplitude] Page View ID",fi="data-amp-mask-attributes",vi=["input","select","textarea"],pi=function(e){var t=e.pageUrlAllowlist,n=e.pageUrlExcludelist;return!(n&&n.length>0&&Ae(window.location.href,n))&&!!Ae(window.location.href,t)},hi=function(e,t){return function(n,r){var i,o,a=e.shouldTrackEventResolver,s=null===(o=null===(i=null==r?void 0:r.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i);if(!s)return!1;if(a)return a(n,r);if(!pi(e))return!1;var u=String(null==r?void 0:r.getAttribute("type"))||"";if("string"==typeof u)switch(u.toLowerCase()){case"hidden":case"password":return!1}if(t){var c=t.some(function(e){var t;return!!(null===(t=null==r?void 0:r.matches)||void 0===t?void 0:t.call(r,e))});if(!c)return!1}switch(s){case"input":case"select":case"textarea":return"change"===n||"click"===n;default:return"click"===n}}},gi=function(e){return e?e.split(",").map(function(e){return e.trim()}).filter(function(e){return e.length>0&&"id"!==e&&"class"!==e}):[]},mi=function(e){return Object.keys(e).reduce(function(t,n){var r=e[n];return function(e){return null==e||"object"==typeof e&&0===Object.keys(e).length||"string"==typeof e&&0===e.trim().length}(r)||(t[n]=r),t},{})},yi=function(){var e;try{var t=B(),n=null===(e=null==t?void 0:t.sessionStorage)||void 0===e?void 0:e.getItem("AMP_PAGE_VIEW");if(!n)return;var r=JSON.parse(n);if("string"==typeof r.pageViewId)return r.pageViewId}catch(e){}},bi=function(e,t){return e?t.some(function(t){var n;return null===(n=null==e?void 0:e.matches)||void 0===n?void 0:n.call(e,t)})?e:bi(null==e?void 0:e.parentElement,t):null},wi=function(e){return!(null===e.event.target||!e.closestTrackedAncestor)};!function(e){e[e.LEFT_OR_TOUCH_CONTACT=0]="LEFT_OR_TOUCH_CONTACT",e[e.MIDDLE=1]="MIDDLE",e[e.RIGHT=2]="RIGHT"}(ri||(ri={}));var Ei="__AMPLITUDE_VISUAL_TAGGING__";var Si=B(),ki=function(){return new pn(function(e){var t=new MutationObserver(function(t){e.next(t)});return document.body&&t.observe(document.body,{childList:!0,attributes:!0,characterData:!0,subtree:!0}),function(){return t.disconnect()}})},Ti=function(e){return void 0===e&&(e="click"),new pn(function(t){var n,r=function(e){t.next(e)};return null===(n=B())||void 0===n||n.document.addEventListener(e,r,{capture:!0}),function(){var t;null===(t=B())||void 0===t||t.document.removeEventListener(e,r,{capture:!0})}})},Pi=function(){var e=gn(new pn(function(e){var t=function(t){if(t instanceof ErrorEvent){var n={kind:"error"};t.error instanceof Error||t.error instanceof DOMException?n=o(o({},n),{message:t.error.message,stack:t.error.stack,filename:t.filename,lineNumber:t.lineno,columnNumber:t.colno}):"string"==typeof t.error&&(n.message=t.error),e.next(n)}};return Si.addEventListener("error",t),function(){Si.removeEventListener("error",t)}}),new pn(function(e){var t=function(t){var n={kind:"unhandledrejection"};t.reason instanceof Error||t.reason instanceof DOMException?(n.message=t.reason.message,n.stack=t.reason.stack):"string"==typeof t.reason&&(n.message=t.reason),e.next(n)};return Si.addEventListener("unhandledrejection",t),function(){Si.removeEventListener("unhandledrejection",t)}}));return gn(e,new pn(function(e){var t=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=void 0;Array.isArray(n[0])&&"string"==typeof n[0][0]&&(i=n[0][0]),e.next({kind:"console",message:i})};return ht.addListener("error",t),function(){ht.removeListener(t)}}))},xi=function(e,t,n){e.forEach(function(e){if("string"!=typeof e&&"ATTACH_EVENT_PROPERTY"===e.actionType){var r=n.extractDataFromDataSource(e.dataSource,t.closestTrackedAncestor);t.targetElementProperties[e.destinationKey]=r}})},_i={"[Amplitude] Element Clicked":"click","[Amplitude] Element Changed":"change"},Ii=function(e){var t,n,r,i,o=Object.values(_i).reduce(function(e,t){return e[t]=new Set,e},{});if(!e)return o;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{try{for(var l=(r=void 0,c(u.definition)),d=l.next();!d.done;d=l.next()){var f=d.value,v=_i[f.event_type];v&&o[v].add(u.id)}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}catch(e){console.warn("Skipping Labeled Event due to malformed definition",null==u?void 0:u.id,e)}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},Ai=function(e){var t,n,r,i,o=new Map;try{for(var a=c(e),s=a.next();!s.done;s=a.next()){var u=s.value;try{for(var l=(r=void 0,c(u.conditions)),d=l.next();!d.done;d=l.next()){var f=d.value;if("LABELED_EVENT"===f.type){var v=f.match.eventId,p=o.get(v);p||(p=[],o.set(v,p)),p.push(u)}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(i=l.return)&&i.call(l)}finally{if(r)throw r.error}}}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return o},Oi=function(e,t){return t.filter(function(t){return t.definition.some(function(t){return _i[t.event_type]===e.type&&t.filters.every(function(t){return function(e,t){try{if("[Amplitude] Element Text"===t.subprop_key)return"is"===t.subprop_op&&t.subprop_value.includes(e.targetElementProperties["[Amplitude] Element Text"]);if("[Amplitude] Element Hierarchy"===t.subprop_key)return"autotrack css match"===t.subprop_op&&!!e.closestTrackedAncestor.closest(t.subprop_value.toString())}catch(e){return console.error("Error matching event to filter",e),!1}return!1}(e,t)})})})},Ci=function(){function e(e,t,n,r){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.dataExtractor=n,this.options=r}return e.prototype.evaluate=function(e){var t,n,r=this.options.pageActions;if(!r)return e;var i=function(e,t){var n,r,i,o,a=new Set;try{for(var s=c(e),u=s.next();!u.done;u=s.next()){var l=u.value,d=t.get(l.id);if(d)try{for(var f=(i=void 0,c(d)),v=f.next();!v.done;v=f.next()){var p=v.value;a.add(p)}}catch(e){i={error:e}}finally{try{v&&!v.done&&(o=f.return)&&o.call(f)}finally{if(i)throw i.error}}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return Array.from(a)}(Oi(e,Array.from(this.groupedLabeledEvents[e.type]).map(function(e){return r.labeledEvents[e]})),this.labeledEventToTriggerMap);try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=a.value;xi(s.actions,e,this.dataExtractor)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return e},e.prototype.update=function(e,t,n){this.groupedLabeledEvents=e,this.labeledEventToTriggerMap=t,this.options=n},e}(),Ri=new Set(["id","class","style","value","onclick","onchange","oninput","onblur","onsubmit","onfocus","onkeydown","onkeyup","onkeypress","data-reactid","data-react-checksum","data-reactroot",fi,zt]),Li=["type"],Di=["svg","path","g"],Ni=["password","hidden"];function Mi(e,t){var n,r,i,o,a,s;if(null===e)return null;var u=String(e.tagName).toLowerCase(),l={tag:u},d=Array.from(null!==(o=null===(i=e.parentElement)||void 0===i?void 0:i.children)&&void 0!==o?o:[]);d.length&&(l.index=d.indexOf(e),l.indexOfType=d.filter(function(t){return t.tagName===e.tagName}).indexOf(e));var f=null===(s=null===(a=e.previousElementSibling)||void 0===a?void 0:a.tagName)||void 0===s?void 0:s.toLowerCase();f&&(l.prevSib=String(f));var v=e.getAttribute("id");v&&(l.id=String(v));var p=Array.from(e.classList);p.length&&(l.classes=p);var h={},g=Array.from(e.attributes).filter(function(e){return!Ri.has(e.name)}),m=!function(e){var t,n,r,i=null===(n=null===(t=null==e?void 0:e.tagName)||void 0===t?void 0:t.toLowerCase)||void 0===n?void 0:n.call(t),o=e instanceof HTMLElement&&"true"===(null===(r=e.getAttribute("contenteditable"))||void 0===r?void 0:r.toLowerCase());return!vi.includes(i)&&!o}(e);if(!Ni.includes(String(e.getAttribute("type")))&&!Di.includes(u))try{for(var y=c(g),b=y.next();!b.done;b=y.next()){var w=b.value;m&&!Li.includes(w.name)||(t.has(w.name)?h[w.name]=Wt:h[w.name]=String(w.value).substring(0,128))}}catch(e){n={error:e}}finally{try{b&&!b.done&&(r=y.return)&&r.call(y)}finally{if(n)throw n.error}}return Object.keys(h).length&&(l.attrs=h),l}function ji(e,t){var n=e.getAttribute(t.explicitTrackingAttribute);if(null!==n&&""===n)return null;var r=e.getAttribute("id");return null===r||""===r?null:function(e,t){var n,r;if(null==e||""===e)return!1;try{for(var i=c(t),o=i.next();!o.done;o=i.next())if(o.value.test(e))return!1}catch(e){n={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return!0}(r,t.autogeneratedIdPatterns)?r:null}function Ui(e,t){return t.map(qi).join(" > ")}function qi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function Fi(e){var t=globalThis.CSS;if(t&&"function"==typeof t.escape)return t.escape(e);for(var n=String(e),r=n.length,i="",o=0;o<r;o++){var a=n.charCodeAt(o);0!==a?a>=1&&a<=31||127===a||0===o&&a>=48&&a<=57||1===o&&a>=48&&a<=57&&45===n.charCodeAt(0)?i+="\\".concat(a.toString(16)," "):i+=0!==o||1!==r||45!==a?a>=128||45===a||95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122?n.charAt(o):"\\".concat(n.charAt(o)):"\\-":i+="�"}return i}function Bi(e){return Fi(e)}var Hi=[{name:"explicitTrackingAttribute",try:function(e,t){var n=t.config.explicitTrackingAttribute,r=e.getAttribute(n);return null===r||""===r?null:"[".concat(n,"=").concat(JSON.stringify(r),"]")}},{name:"stableId",try:function(e,t){var n=ji(e,t.config);return null===n?null:"".concat(e.tagName.toLowerCase(),"#").concat(Bi(n))}}];function Vi(e,t,n){var r,i,o,a,s;void 0===n&&(n={});var u=null!==(o=n.strategies)&&void 0!==o?o:Hi,l=null!==(s=null!==(a=n.scope)&&void 0!==a?a:e.ownerDocument)&&void 0!==s?s:document,d={scope:l,config:t},f=function(e,t){var n=[],r=e;for(;null!==r&&(n.push(r),!(void 0!==t&&n.length>t));)r=r.parentElement;return n}(e,t.maxAncestorWalkDepth);try{for(var v=c(u),p=v.next();!p.done;p=v.next())for(var h=p.value,g=0;g<f.length;g++){var m=f[g],y=h.try(m,d);if(null!==y)if(0!==g){var b=Ui(0,f.slice(0,g).reverse()),w="".concat(y," > ").concat(b);if(zi(l,w,e,h.name,n.logger))return w}else if(zi(l,y,e,h.name,n.logger))return y}}catch(e){r={error:e}}finally{try{p&&!p.done&&(i=v.return)&&i.call(v)}finally{if(r)throw r.error}}return null}function zi(e,t,n,r,i){var o;try{o=e.querySelectorAll(t)}catch(e){var a=e instanceof Error?e.message:String(e);return null==i||i.debug('@amplitude/element-selector: strategy "'.concat(r,'" emitted a malformed selector "').concat(t,'" (').concat(a,")")),!1}return 1===o.length&&o[0]===n}function Wi(e){var t=e.tagName.toLowerCase(),n=e.parentElement;if(null===n)return t;var r=function(e,t){for(var n=0,r=0;r<t.children.length;r++){var i=t.children[r];if(i.tagName===e.tagName&&(n+=1,i===e))return n}return 1}(e,n);return"".concat(t,":nth-of-type(").concat(r,")")}function $i(e,t,n){var r;try{r=e.querySelectorAll(t)}catch(e){return!1}return 1===r.length&&r[0]===n}var Ki=function(){function e(e,t){this.value=e,this.optimized=t}return e.prototype.toString=function(){return this.value},e}(),Ji=function(e,t,n){var r,i;if(e.nodeType!==Node.ELEMENT_NODE)return null;var o=e.getAttribute("id");if(t){if(o)return new Ki(Yi(o),!0);var a=e.tagName.toLowerCase();if("body"===a||"head"===a||"html"===a)return new Ki(a,!0)}var s=e.tagName.toLowerCase();if(o)return new Ki(s+Yi(o),!0);var u=e.parentNode;if(!u||u.nodeType===Node.DOCUMENT_NODE)return new Ki(s,!0);for(var l=Gi(e),d=!1,f=!1,v=-1,p=-1,h=u.children,g=0;h&&(-1===v||!f)&&g<h.length;++g){var m=h[g];if(m.nodeType===Node.ELEMENT_NODE)if(p+=1,m!==e){if(!f&&m.tagName.toLowerCase()===s){d=!0;var y=new Set(l);if(y.size)for(var b=Gi(m),w=0;w<b.length;++w){var E=b[w];if(y.has(E)&&(y.delete(E),!y.size)){f=!0;break}}else f=!0}}else v=p
23}var S=s;if(n&&"input"===s.toLowerCase()&&e.getAttribute("type")&&!e.getAttribute("id")&&!e.getAttribute("class")&&(S+="[type="+Fi(e.getAttribute("type")||"")+"]"),f)S+=":nth-child("+String(v+1)+")";else if(d)try{for(var k=c(l),T=k.next();!T.done;T=k.next()){S+="."+Fi(T.value.slice(1))}}catch(e){r={error:e}}finally{try{T&&!T.done&&(i=k.return)&&i.call(k)}finally{if(r)throw r.error}}return new Ki(S,!1)},Gi=function(e){var t=e.getAttribute("class");return t?t.split(/\s+/g).filter(Boolean).map(function(e){return"$"+e}):[]},Yi=function(e){return"#"+Fi(e)};function Xi(e,t){try{return function(e,t){if(e.nodeType!==Node.ELEMENT_NODE)return"";for(var n=[],r=e;r;){var i=Ji(r,Boolean(t),r===e);if(!i)break;if(n.push(i),i.optimized)break;r=r.parentElement}return n.reverse(),n.join(" > ")}(e)}catch(e){var n=e instanceof Error?e.message:String(e);return null==t||t.warn("@amplitude/element-selector: legacyCssPath threw â emitting empty selector: ".concat(n)),""}}var Qi,Zi=Object.freeze({enabled:!1,explicitTrackingAttribute:"data-amp-track-id",autogeneratedIdPatterns:d([],l([/^:r[0-9a-z]+:$/,/^radix-/,/^headlessui-/,/^mui-/,/^[a-f0-9]{16,}$/i,/-\d{8,}$/,/\d{4,}/]),!1),unstableClassPatterns:d([],l([/^(p|m|px|py|mx|my|pt|pb|pl|pr|mt|mb|ml|mr)-\d+$/,/^(w|h|min-w|max-w|min-h|max-h)-/,/^(text|bg|border|ring|fill|stroke)-/,/^(hover|focus|active|disabled|group-hover):/,/^(sm|md|lg|xl|2xl):/,/^z-\d+$/,/^data-\[/,/^\[/,/^css-[a-z0-9]{6,}$/,/^[a-zA-Z]+_[a-zA-Z0-9]{3,}__[a-zA-Z0-9]{5,}$/,/^sc-[a-zA-Z0-9]{6,}$/,/^jsx-\d+$/,/^swiper-slide-(visible|fully-visible|active|prev|next|duplicate)$/,/^is-(active|open|selected|hovered|focused|expanded)$/,/^Mui[A-Z][a-zA-Z]+-(focused|selected|disabled|expanded|focusVisible|active|checked)$/,/^Mui-(selected|focused|disabled|expanded|focusVisible|active|checked)$/,/^data-state-/]),!1),maxAncestorWalkDepth:void 0});function eo(e,t){if(!e)return to();var n,r=to();return"boolean"==typeof e.enabled&&(r.enabled=e.enabled),"string"==typeof e.explicitTrackingAttribute&&""!==e.explicitTrackingAttribute&&(r.explicitTrackingAttribute=e.explicitTrackingAttribute),Array.isArray(e.autogeneratedIdPatterns)&&(r.autogeneratedIdPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid autogenerated-id pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.autogeneratedIdPatterns,t)),Array.isArray(e.unstableClassPatterns)&&(r.unstableClassPatterns=function(e,t){var n,r,i=[];try{for(var o=c(e),a=o.next();!a.done;a=o.next()){var s=a.value;try{i.push(new RegExp(s))}catch(e){var u=e instanceof Error?e.message:String(e);null==t||t.warn('@amplitude/element-selector: ignoring invalid unstable-class pattern "'.concat(s,'" (').concat(u,")"))}}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return i}(e.unstableClassPatterns,t)),r.maxAncestorWalkDepth="number"!=typeof(n=e.maxAncestorWalkDepth)?void 0:Number.isFinite(n)?n<=0?void 0:Math.floor(n):void 0,r}function to(){return{enabled:Zi.enabled,explicitTrackingAttribute:Zi.explicitTrackingAttribute,autogeneratedIdPatterns:d([],l(Zi.autogeneratedIdPatterns),!1),unstableClassPatterns:d([],l(Zi.unstableClassPatterns),!1),maxAncestorWalkDepth:Zi.maxAncestorWalkDepth}}function no(e,t){void 0===t&&(t={});var n=e,r=new Set,i=t.logger,o={strategies:t.strategies,scope:t.scope,logger:i};return{generate:function(e){var r,a;if(!n.enabled)return Xi(e,i);try{var s=Vi(e,n,o);return null!==s?s:function(e,t,n){var r,i;void 0===n&&(n={});for(var o=null!==(i=null!==(r=n.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==i?i:document,a=[],s=e,u=0;null!==s&&!(void 0!==t.maxAncestorWalkDepth&&u>t.maxAncestorWalkDepth);){var c=ji(s,t);if(null!==c){var f=d(["".concat(s.tagName.toLowerCase(),"#").concat(Bi(c))],l(a),!1).join(" > ");if($i(o,f,e))return f}a.unshift(Wi(s)),s=s.parentElement,u+=1}return a.join(" > ")}(e,n,{scope:null!==(a=null!==(r=t.scope)&&void 0!==r?r:e.ownerDocument)&&void 0!==a?a:document})}catch(t){var u=t instanceof Error?t.message:String(t);return null==i||i.warn("@amplitude/element-selector: strategy chain threw â falling back to legacy cssPath: ".concat(u)),Xi(e,i)}},getConfig:function(){return n},updateConfig:function(e){var t,o;n=e;try{for(var a=c(r),s=a.next();!s.done;s=a.next()){var u=s.value;try{u(e)}catch(e){var l=e instanceof Error?e.message:String(e);null==i||i.warn("@amplitude/element-selector: onConfigChange subscriber threw â ".concat(l))}}}catch(e){t={error:e}}
vendor: 5,582 bytes, line 23
23finally{try{s&&!s.done&&(o=a.return)&&o.call(a)}finally{if(t)throw t.error}}},onConfigChange:function(e){return r.add(e),function(){r.delete(e)}}}}var ro,io=function(e,t){var n,r,i,o=this;this.replaceSensitiveString=function(e){return Gt(e,o.additionalMaskTextPatterns)},this.getHierarchy=function(e){var t,n,r,i,a,s=performance.now();if(!e)return[];for(var u=function(e){var t=[];if(!e)return t;t.push(e);for(var n=e.parentElement;n&&"HTML"!==n.tagName;)t.push(n),n=n.parentElement;return t}(e),f=new Map,v=u.length-1;v>=0;v--){var p=u[v];if(p){var h=gi(p.getAttribute(fi)),g=v===u.length-1?[]:null!==(r=f.get(u[v+1]))&&void 0!==r?r:new Set,m=new Set(d(d([],l(g),!1),l(h),!1));f.set(p,m)}}a=u.map(function(e){var t;return Mi(e,null!==(t=f.get(e))&&void 0!==t?t:new Set)});var y=function(e){(null==e?void 0:e.attrs)&&Object.entries(e.attrs).forEach(function(t){var n=l(t,2),r=n[0],i=n[1];e.attrs&&(e.attrs[r]=o.replaceSensitiveString(i))})};try{for(var b=c(a),w=b.next();!w.done;w=b.next())y(w.value)}catch(e){t={error:e}}finally{try{w&&!w.done&&(n=b.return)&&n.call(b)}finally{if(t)throw t.error}}var E=performance.now();return null===(i=o.diagnosticsClient)||void 0===i||i.recordHistogram("autocapturePlugin.getHierarchy",E-s),a},this.getNearestLabel=function(e){var t,n=e.parentElement;if(!n)return"";try{t=n.querySelector(":scope>span,h1,h2,h3,h4,h5,h6")}catch(e){t=null}return t?o.getText(t):o.getNearestLabel(n)},this.getElementPath=function(e){var t;if(!e)return"";var n=performance.now(),r=o.selectorEngine.generate(e),i=performance.now();return null===(t=o.diagnosticsClient)||void 0===t||t.recordHistogram("autocapturePlugin.getElementPath",i-n),r},this.updateSelectorConfig=function(e,t){if(null!=e&&"boolean"==typeof e.enabled){var n=o.selectorEngine.getConfig().enabled,r=eo(e,t);o.selectorEngine.updateConfig(r),!n&&r.enabled?null==t||t.debug("@amplitude/element-selector: engine enabled â now emitting new element-selector element paths for autocapture events."):n&&!r.enabled&&(null==t||t.debug("@amplitude/element-selector: engine disabled â reverting to legacy cssPath for element paths."))}else null==t||t.debug("@amplitude/element-selector: ignoring remote-config delivery without an explicit `enabled` flag â keeping current engine state.")},this.getEventProperties=function(e,t,n){var r,i,a,s,u,c,d=null===(a=null===(i=null==t?void 0:t.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===a?void 0:a.call(i),f="function"==typeof t.getBoundingClientRect?t.getBoundingClientRect():{left:null,top:null},v=o.getHierarchy(t),p=null===(s=v[0])||void 0===s?void 0:s.attrs,h=o.getNearestLabel(t),g=(u=null!=p?p:{},c=n,Object.entries(u).reduce(function(e,t){var n=l(t,2),r=n[0],i=n[1];if(r.startsWith(c)){var o=r.replace(c,"");o&&(e[o]=i||"")}return e},{})),m=((r={})["[Amplitude] Element Hierarchy"]=v,r[ai]=d,r[si]=o.getText(t),r["[Amplitude] Element Position Left"]=null==f.left?null:Math.round(f.left),r["[Amplitude] Element Position Top"]=null==f.top?null:Math.round(f.top),r["[Amplitude] Element Attributes"]=g,r["[Amplitude] Element Path"]=o.getElementPath(t),r["[Amplitude] Element Parent Label"]=h,r[ui]=Oe(window.location.href.split("?")[0]),r["[Amplitude] Page Title"]=Yt(o.replaceSensitiveString),r[ci]=window.innerHeight,r[li]=window.innerWidth,r),y=yi();if(y&&(m[di]=y),m["[Amplitude] Element ID"]=t.getAttribute("id")||"",m["[Amplitude] Element Class"]=t.getAttribute("class"),m["[Amplitude] Element Aria Label"]=null==p?void 0:p["aria-label"],"a"===d&&"click"===e&&t instanceof HTMLAnchorElement){var b=t.href.substring(0,128);m["[Amplitude] Element Href"]=o.replaceSensitiveString(b)}return mi(m)},this.addTypeAndTimestamp=function(e,t){return{event:e,timestamp:Date.now(),type:t}},this.addAdditionalEventProperties=function(e,t,n,r,i){void 0===i&&(i=!1);var a=o.addTypeAndTimestamp(e,t);if(function(e){return"click"===e.type||"change"===e.type}(a)&&null!==a.event.target){if(i){var s=function(e,t){var n,r=null===(n=null===window||void 0===window?void 0:window.getComputedStyle)||void 0===n?void 0:n.call(window,e);return"pointer"===(null==r?void 0:r.getPropertyValue("cursor"))&&"click"===t}(a.event.target,a.type);if(s)return a.closestTrackedAncestor=a.event.target,a.targetElementProperties=o.getEventProperties(a.type,a.closestTrackedAncestor,r),a}var u=bi(a.event.target,n);return u&&(a.closestTrackedAncestor=u,a.targetElementProperties=o.getEventProperties(a.type,u,r)),a}return a},this.extractDataFromDataSource=function(e,t){if("DOM_ELEMENT"===e.sourceType){var n=function(e,t){try{if("DOM_ELEMENT"===e.sourceType){var n=document.documentElement;return e.scope&&t&&(n=t.closest(e.scope)),n&&e.selector?n.querySelector(e.selector):n}}catch(e){return}}(e,t);if(!n)return;return"TEXT"===e.elementExtractType?o.getText(n):"ATTRIBUTE"===e.elementExtractType&&e.attribute?n.getAttribute(e.attribute):void 0}},this.getTextWithMaskedDescendants=function(e){var t,n,r="[".concat(zt,"], [contenteditable]");if(!e.querySelector(r))return e.innerText;var i="",a=Array.from(e.childNodes);try{for(var s=c(a),u=s.next();!u.done;u=s.next()){var l=u.value;l.nodeType!==Node.TEXT_NODE?l instanceof Element&&(l.hasAttribute(zt)||l.hasAttribute("contenteditable")?i+=Wt:i+=o.getTextWithMaskedDescendants(l)):i+=l.textContent||""}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}return i},this.getText=function(e){if(null!==e.closest("[".concat(zt,"]")))return Wt;var t="";return t=e.querySelector("[".concat(zt,"], [contenteditable]"))?o.getTextWithMaskedDescendants(e):e.innerText||"",o.replaceSensitiveStr
23ing(t.substring(0,255)).replace(/\s+/g," ").trim()},this.getEventTagProps=function(e){var t,n,r;if(!e)return{};var i=null===(r=null===(n=null==e?void 0:e.tagName)||void 0===n?void 0:n.toLowerCase)||void 0===r?void 0:r.call(n),a=((t={})[ai]=i,t[si]=o.getText(e),t[ui]=window.location.href.split("?")[0],t);return mi(a)},this.diagnosticsClient=null==t?void 0:t.diagnosticsClient,this.selectorEngine=(Qi||(Qi=no(eo())),Qi);var a=null!==(i=e.maskTextRegex)&&void 0!==i?i:[],s=[];try{for(var u=c(a),f=u.next();!f.done;f=u.next()){var v=f.value;if(s.length>=25)break;if(v instanceof RegExp)s.push(v);else if("pattern"in v&&"string"==typeof v.pattern)try{s.push(new RegExp(v.pattern,"i"))}catch(e){}}}catch(e){n={error:e}}finally{try{f&&!f.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}this.additionalMaskTextPatterns=s};function oo(e,t){var n=e.remoteConfigClient;if(e.fetchRemoteConfig&&n){var r=n.subscribe("configs.analyticsSDK.browserSDK.autocapture.elementSelector","all",function(n,r){e.loggerProvider.debug("@amplitude/element-selector: remote-config delivery (source=".concat(String(r),") ").concat(JSON.stringify(n))),t.updateSelectorConfig(n,e.loggerProvider)});return function(){n.unsubscribe(r)}}}!function(e){e.ClickObservable="clickObservable",e.ChangeObservable="changeObservable",e.NavigateObservable="navigateObservable",e.MutationObservable="mutationObservable",e.ScrollObservable="scrollObservable",e.ExposureObservable="exposureObservable",e.BrowserErrorObservable="browserErrorObservable",e.SelectionObservable="selectionObservable",e.MouseMoveObservable="mouseMoveObservable"}(ro||(ro={}));var ao=function(e,t){var n,r,i,a,f,v,p,h,g,m,y,b;void 0===e&&(e={}),null==t||t.diagnosticsClient.setTag("plugin.autocapture.version",ii);var w=e.dataAttributePrefix,E=void 0===w?mt:w,S=e.visualTaggingOptions,k=void 0===S?{enabled:!0}:S;e.cssSelectorAllowlist=null!==(n=e.cssSelectorAllowlist)&&void 0!==n?n:gt,e.actionClickAllowlist=null!==(r=e.actionClickAllowlist)&&void 0!==r?r:yt,e.debounceTime=null!==(i=e.debounceTime)&&void 0!==i?i:0;var T=!1!==(null===(a=e.viewportContentUpdated)||void 0===a?void 0:a.enabled),P=null!==(p=null!==(v=null===(f=e.viewportContentUpdated)||void 0===f?void 0:f.exposureDuration)&&void 0!==v?v:e.exposureDuration)&&void 0!==p?p:150;e.viewportContentUpdated=o(o({},e.viewportContentUpdated),{exposureDuration:P}),e.pageUrlExcludelist=null===(h=e.pageUrlExcludelist)||void 0===h?void 0:h.reduce(function(e,t){if("string"==typeof t&&e.push(t),t instanceof RegExp&&e.push(t),"object"==typeof t&&null!==t&&"pattern"in t)try{e.push(new RegExp(t.pattern))}catch(n){return console.warn("Invalid regex pattern: ".concat(t.pattern),n),e}return e},[]);var x,_="@amplitude/plugin-autocapture-browser",I=[],A=new io(e,t),O=new Set,C=new Set,R=function(){var t,n,r=mn(Ti().map(function(t){return A.addAdditionalEventProperties(t,"click",e.cssSelectorAllowlist,E)})),i=mn(new pn(function(t){var n,r=function(n){var r=A.addAdditionalEventProperties(n,"change",e.cssSelectorAllowlist,E);t.next(r)};return null===(n=B())||void 0===n||n.document.addEventListener("change",r,{capture:!0}),function(){var e;return null===(e=B())||void 0===e?void 0:e.document.removeEventListener("change",r)}}));window.navigation&&(n=mn(new pn(function(t){var n=function(n){var r=A.addAdditionalEventProperties(n,"navigate",e.cssSelectorAllowlist,E);t.next(r)};return window.navigation.addEventListener("navigate",n),function(){window.navigation.removeEventListener("navigate",n)}})));var o=mn(ki().map(function(t){return A.addAdditionalEventProperties(t,"mutation",e.cssSelectorAllowlist,E)})),a=new pn(function(e){var t,n=function(t){e.next(t)};return null===(t=B())||void 0===t||t.addEventListener("scroll",n),function(){var e;null===(e=B())||void 0===e||e.removeEventListener("scroll",n)}}),s=function(e,t){return new pn(function(n){var r,i=B();if(!(null==i?void 0:i.IntersectionObserver))return function(){};var o=new IntersectionObserver(function(e){e.forEach(function(e){n.next(e)})},{root:null,rootMargin:"0px",threshold:1}),a=t.join(",");(null!==(r=null==i?void 0:i.document.querySelectorAll(a))&&void 0!==r?r:[]).forEac
vendor: 14,717 bytes, line 23
23h(function(e){o.observe(e)});var s=e.subscribe(function(e){return e.event.forEach(function(e){return e.addedNodes.forEach(function(e){e instanceof Element&&(e.matches(a)&&o.observe(e),e.querySelectorAll(a).forEach(function(e){o.observe(e)}))})})});return function(){s.unsubscribe(),o.disconnect()}})}(o,e.cssSelectorAllowlist);return(t={})[ro.ChangeObservable]=i,t[ro.ClickObservable]=r,t[ro.MutationObservable]=o,t[ro.NavigateObservable]=n,t[ro.ScrollObservable]=a,t[ro.ExposureObservable]=s,t},L=Ii(Object.values(null!==(m=null===(g=e.pageActions)||void 0===g?void 0:g.labeledEvents)&&void 0!==m?m:{})),D=Ai(null!==(b=null===(y=e.pageActions)||void 0===y?void 0:y.triggers)&&void 0!==b?b:[]),N=function(e,t,n,r){return new Ci(e,t,n,r)}(L,D,A,e);return{name:_,type:"enrichment",setup:function(t,n){return s(void 0,void 0,void 0,function(){var r,i,a,s,c,f,v,p,h,g,m,y,b,w,S,M,j,U,q,F,H,V;return u(this,function(u){return"undefined"==typeof document||(r=!1,i={maxX:void 0,maxY:void 0},t.fetchRemoteConfig&&(t.remoteConfigClient?t.remoteConfigClient.subscribe("configs.analyticsSDK.pageActions","all",function(t){!function(t){var n,r;t&&(e.pageActions=o(o({},e.pageActions),t),L=Ii(Object.values(null!==(n=e.pageActions.labeledEvents)&&void 0!==n?n:{})),D=Ai(null!==(r=e.pageActions.triggers)&&void 0!==r?r:[]),N.update(L,D,e))}(t)}):t.loggerProvider.debug("Remote config client is not provided, skipping remote config fetch")),(a=oo(t,A))&&I.push({unsubscribe:a}),s=hi(e,e.cssSelectorAllowlist),c=hi(e,e.actionClickAllowlist),f=R(),v=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackEvent,i=e.evaluateTriggers;return n.clickObservable.filter(wi).filter(function(e){return r("click",e.closestTrackedAncestor)}).map(function(e){return i(e)}).subscribe(function(e){null==t||t.track(oi,e.targetElementProperties)})}({allObservables:f,amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(v),p=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackEvent,o=e.evaluateTriggers;return n.changeObservable.filter(wi).filter(function(e){return i("change",e.closestTrackedAncestor)}).map(function(e){return o(e)}).subscribe(function(e){null==t||t.track("[Amplitude] Element Changed",r("change",e.closestTrackedAncestor))})}({allObservables:f,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,evaluateTriggers:N.evaluate.bind(N)}),I.push(p),h=function(e){var t=e.amplitude,n=e.allObservables,r=e.options,i=e.getEventProperties,o=e.shouldTrackEvent,a=e.shouldTrackActionClick,s=n.clickObservable,u=n.mutationObservable,c=n.navigateObservable,l=s.filter(function(e){return!o("click",e.closestTrackedAncestor)}).map(function(e){var t=bi(e.event.target,r.actionClickAllowlist);return e.closestTrackedAncestor=t,null!==e.closestTrackedAncestor&&(e.targetElementProperties=i(e.type,e.closestTrackedAncestor)),e}).filter(wi).filter(function(e){return a("click",e.closestTrackedAncestor)}),d=c?gn(u,c):u,f=gn(l,d),v=null,p=null;return hn(f,function(e){if(v&&(clearTimeout(v),v=null),"click"===e.type)return p=e,v=setTimeout(function(){v=null,p=null},500),Promise.resolve(null);if(p){var t=p;return p=null,Promise.resolve(t)}return Promise.resolve(null)}).subscribe(function(e){e&&(null==t||t.track(oi,i("click",e.closestTrackedAncestor)))})}({allObservables:f,options:e,getEventProperties:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return A.getEventProperties.apply(A,d(d([],l(e),!1),[E],!1))},amplitude:n,shouldTrackEvent:s,shouldTrackActionClick:c}),h&&I.push(h),g=function(e){e.amplitude;var t=e.allObservables.scrollObservable,n={maxX:0,maxY:0},r=t.subscribe(function(){var e,t,r,i,o=B(),a=Math.floor(null!==(t=null!==(e=null==o?void 0:o.scrollX)&&void 0!==e?e:null==o?void 0:o.pageXOffset)&&void 0!==t?t:0),s=Math.floor(null!==(i=null!==(r=null==o?void 0:o.scrollY)&&void 0!==r?r:null==o?void 0:o.pageYOffset)&&void 0!==i?i:0);n.maxX=Math.max(n.maxX,a),n.maxY=Math.max(n.maxY,s)});return{unsubscribe:function(){r.unsubscribe()},getState:function(){return n},reset:function(){n.maxX=0,n.maxY=0}}}({allObservables:f,amplitude:n}),I.push(g),m={},y=B(),b=function(e){e&&r||(setTimeout(function(){r=!1},100),r=!0,function(e){var t,n,r,i,o,a,s=e.amplitude,u=e.scrollTracker,c=e.currentElementExposed,l=e.elementExposedForPage,d=e.exposureTracker,f=e.isPageEnd,v=e.lastScroll,p=u.getState(),h=B(),g=null!==(n=null==h?void 0:h.innerWidth)&&void 0!==n?n:0,m=null!==(r=null==h?void 0:h.innerHeight)&&void 0!==r?r:0,y=((t={})[ui]=Oe(null!==(a=null===(o=null===(i=null==h?void 0:h.location)||void 0===i?void 0:i.href)||void 0===o?void 0:o.split("?")[0])&&void 0!==a?a:""),t["[Amplitude] Max Page X"]=p.maxX+g,t["[Amplitude] Max Page Y"]=p.maxY+m,t[ci]=m,t[li]=g,t["[Amplitude] Element Exposed"]=Array.from(c),t),b=yi();b&&(y[di]=b),0!==c.size||p.maxX!==v.maxX||p.maxY!==v.maxY?(null==s||s.track("[Amplitude] Viewport Content Updated",y),v.maxX=p.maxX,v.maxY=p.maxY,c.clear(),f&&(u.reset(),l.clear(),null==d||d.reset())):f&&(u.reset(),l.clear(),null==d||d.reset())}({amplitude:n,scrollTracker:g,currentElementExposed:C,elementExposedForPage:O,exposureTracker:m.exposure,isPageEnd:e,lastScroll:i}))},w=function(e){!function(e,t,n,r){if(!t.has(e)){t.add(e),n.add(e);var i=Array.from(n);JSON.stringify(i).length>=18e3&&r(!1)}}(e,O,C,b)},T&&(m.exposure=function(e){var t=e.allObservables,n=e.onExposure,r=e.dataExtractor,i=e.exposureDuration,o=void 0===i?150:i,a=new Map,s=new Map,u=t.exposureObservable.subscribe(function(e){var t=e,i=t.target;if(t.isIntersecting){if(!a.get(i)){var u=setTimeout(function(){a.set(i,!0);var e=r.getElementPath(i);n(e),s.set(i,null)},o);s.set(i,u)}}else!t.isIntersecting&&t.intersectionRatio<1&&(u=s.get(i))&&(clearTimeout(u),s.set(i,null))});return{unsubscribe:function(){u.unsubscribe()},reset:function(){s.forEach(function(e){e&&clearTimeout(e)}),s.clear(),a.clear()}}}({allObservables:f,onExposure:w,dataExtractor:A,exposureDuration:P}),m.exposure&&I.push(m.exposure),S=function(){b(!0)},null==y||y.addEventListener("beforeunload",S),x=function(){null==y||y.removeEventListener("beforeunload",S)},I.push({unsubscribe:function(){return x()}}),(M=f[ro.NavigateObservable])?I.push(M.subscribe(function(){b(!0)})):y&&(j=function(){b(!0)},y.addEventListener("popstate",j),U=y.history.pushState,y.history&&U&&(y.history.pushState=new Proxy(U,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),b(!0)}})),I.push({unsubscribe:function(){y.removeEventListener("popstate",j),y.history&&U&&(y.history.pushState=U)}}))),null===(V=null==t?void 0:t.loggerProvider)||void 0===V||V.log("".concat(_," has been successfully added.")),window.opener&&k.enabled&&(q=e.cssSelectorAllowlist,F=e.actionClickAllowlist,function(e,t){var n=e;if(!0!==n[Ei]){n[Ei]=!0;var r=t.dataExtractor,i=t.isElementSelectable,o=t.cssSelectorAllowlist,a=t.actionClickAllowlist,s=null,u=function(t){e.notify({action:"element-selected",data:t})},c=function(t,n){"selector-mode-changed"===t?e.notify({action:"track-selector-mode-changed",data:n}):"selector-moved"===t&&e.notify({action:"track-selector-moved",data:n})};e.registerActionHandler("initialize-visual-tagging-selector",function(t){e.loadScriptOnce("https://cdn.amplitude.com/libs/visual-tagging-selector-1.0.0-alpha.js.gz").then(function(){var n;s=null===(n=null===window||void 0===window?void 0:window.amplitudeVisualTaggingSelector)||void 0===n?void 0:n.call(window,{getEventTagProps:r.getEventTagProps,isElementSelectable:function(e){return!i||i((null==t?void 0:t.actionType)||"click",e)},onTrack:c,onSelect:u,visualHighlightClass:"amp-visual-tagging-selector-highlight",messenger:e,cssSelectorAllowlist:o,actionClickAllowlist:a,extractDataFromDataSource:r.extractDataFromDataSource,dataExtractor:r,diagnostics:{autocapture:{version:ii}}}),e.notify({action:"selector-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize visual tagging selector")})}),e.registerActionHandler("close-visual-tagging-selector",function(){var e;null===(e=null==s?void 0:s.close)||void 0===e||e.call(s)})}}(H=Cn(),{dataExtractor:A,isElementSelectable:hi(e,d(d([],l(q),!1),l(F),!1)),cssSelectorAllowlist:q,actionClickAllowlist:F}),function(e,t){var n,r=e;if(!0!==r[Rn]){r[Rn]=!0;var i=null!==(n=null==t?void 0:t.scriptUrl)&&void 0!==n?n:"https://cdn.amplitude.com/libs/background-capture-1.0.3.js.gz",o=null,a=function(t,n){var r,i;"background-capture-complete"===t&&(null===(i=null===(r=e.logger)||void 0===r?void 0:r.debug)||void 0===i||i.call(r,"Background capture complete"),e.notify({action:"background-capture-complete",data:n}))};e.registerActionHandler("initialize-background-capture",function(){var t,n;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Initializing background capture (external script)");var r=new URL(i,e.endpoint).toString();e.loadScriptOnce(r).then(function(){var t,n,r;null===(n=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===n||n.call(t,"Background capture script loaded (external)"),o=null===(r=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===r?void 0:r.call(window,{messenger:e,onBackgroundCapture:a}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(H),H.setup(o({logger:null==t?void 0:t.loggerProvider},(null==t?void 0:t.serverZone)&&{endpoint:_n[t.serverZone]})))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,r;return u(this,function(i){try{for(e=c(I),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(r=e.return)&&r.call(e)}finally{if(n)throw n.error}}return[2]})})}}},so=["mutation","navigate"];function uo(e,t){var n,r,i,o,a=t.event,s=a.pageX,u=a.pageY;e.yMin=Math.min(null!==(n=e.yMin)&&void 0!==n?n:u,u),e.yMax=Math.max(null!==(r=e.yMax)&&void 0!==r?r:u,u),e.xMin=Math.min(null!==(i=e.xMin)&&void 0!==i?i:s,s),e.xMax=Math.max(null!==(o=e.xMax)&&void 0!==o?o:s,s),e.isOutOfBounds=e.yMax-e.yMin>50||e.xMax-e.xMin>50}function co(e){if(0===e.length)return null;var t=e[0],n=e[e.length-1];return{rageClickEvent:o({"[Amplitude] Begin Time":new Date(t.timestamp).toISOString(),"[Amplitude] End Time":new Date(n.timestamp).toISOString(),"[Amplitude] Duration":n.timestamp-t.timestamp,"[Amplitude] Clicks":e.map(function(e){return{X:e.event.pageX,Y:e.event.pageY,Time:e.timestamp}}),"[Amplitude] Click Count":e.length},t.targetElementProperties),time:t.timestamp}}function lo(e){var t=this,n=e.amplitude,r=e.allObservables,i=e.shouldTrackRageClick,o=r.clickObservable,a=r.selectionObservable,c=[],l={},d=null;function f(e){c=[],l={},e&&(uo(l,e),c.push(e))}var v=hn(o.filter(function(e){return i("click",e.closestTrackedAncestor)}),function(e){return s(t,void 0,void 0,function(){var t;return u(this,function(n){return uo(l,e),t=null,0===c.length||function(e,t){return e.length>0&&e[e.length-1].closestTrackedAncestor!==t.closestTrackedAncestor}(c,e)||function(e,t){var n=e[Math.max(0,e.length-4+1)];return t.timestamp-n.timestamp>=1e3}(c,e)||l.isOutOfBounds?(d&&(t=co(c)),f(e)):c.push(e),d&&(clearTimeout(d.timerId),d.resolve(t),d=null),c.length>=4?[2,new Promise(function(e){d={resolve:e,timerId:setTimeout(function(){e(co(c))},1e3)}})]:[2,null]})})}),p=null==a?void 0:a.subscribe(function(){f()}),h=v.subscribe(function(e){null!==e&&n.track("[Amplitude] Rage Click",e.rageClickEvent,{time:e.time})});return{unsubscribe:function(){h.unsubscribe(),null==p||p.unsubscribe()}}}var fo,vo;!function(e){e.INCREASING="increasing",e.DECREASING="decreasing"}(fo||(fo={})),function(e){e.X="x",e.Y="y"}(vo||(vo={}));function po(e){var t=e.changes,n=e.changesThreshold,r=e.thresholdMs;return!(t.length<n)&&t[t.length-1]-t[0]<r}function ho(e){e.changes=[],e.startTime=void 0}function go(e){for(var t=e.changes,n=e.thresholdMs,r=0,i=t[t.length-1];r<t.length;r++){if(i-t[r]<n)break}0!==r&&(e.startTime=t[r],e.changes.splice(0,r))}var mo=function(e){var t=e.mouseDirectionChangeObservable,n=e.directionChanges,r=void 0===n?20:n,i=e.thresholdMs,o=void 0===i?2e3:i;return new pn(function(e){var n={changes:[],changesThreshold:r,thresholdMs:o},i={changes:[],changesThreshold:r,thresholdMs:o},a=void 0,s=null;function u(){void 0!==a&&(e.next(a),a=void 0,null!==s&&clearTimeout(s),ho(n),ho(i))}return t.subscribe(function(e){null!==s&&clearTimeout(s),function(e){var t=+Date.now();e.startTime=e.startTime||t;var n=e.changes,r=e.changesThreshold;n.push(t),n.length>r&&n.shift()}(e===vo.X?n:i);var t=function(e,t){var n=void 0;if(po(e)&&(n=e.startTime),po(t)){var r=t.startTime;r&&(!n||r<n)&&(n=r)}return n}(n,i);return t?(a=a||t,s=setTimeout(function(){u(),s=null},o)):u(),go(n),go(i),function(){null!==s&&(clearTimeout(s),s=null)}})})},yo=function(e){var t=e.amplitude,n=e.options,r=e.allObservables,i=e.directionChanges,o=void 0===i?20:i,a=e.thresholdMs,s=void 0===a?2e3:a,u=function(e){var t=e.allWindowObservables.mouseMoveObservable;return new pn(function(e){var n=null,r=null,i=null;return t.subscribe(function(t){var o={x:t.clientX,y:t.clientY};null!==n?(o.x>n.x?(r===fo.DECREASING&&e.next(vo.X),r=fo.INCREASING):o.x<n.x&&(r===fo.INCREASING&&e.next(vo.X),r=fo.DECREASING),o.y>n.y?(i===fo.DECREASING&&e.next(vo.Y),i=fo.INCREASING):o.y<n.y&&(i===fo.INCREASING&&e.next(vo.Y),i=fo.DECREASING),n=o):n=o})})}({allWindowObservables:r});return mo({mouseDirectionChangeObservable:u,directionChanges:o,thresholdMs:s}).subscribe(function(e){pi(n)&&t.track("[Amplitude] Thrashed Cursor",void 0,{time:e})})};function bo(e,t,n,r){if(!r)return[];var i=e[t];return"object"==typeof i&&null!==i&&"cssSelectorAllowlist"in i&&Array.isArray(i.cssSelectorAllowlist)?i.cssSelectorAllowlist:n}var wo=4e3,Eo=function(e){var t;void 0===e&&(e={});var n="@amplitude/plugin-frustration-browser",r=[],i=!1!==e.errorClicks;e.errorClicks||(i=!1);var a=!1!==e.deadClicks&&null!==e.deadClicks,f=!1!==e.rageClicks&&null!==e.rageClicks,v=!1!==e.thrashedCursor&&null!==e.thrashedCursor;e.thrashedCursor||(v=!1);var p=bo(e,"rageClicks",St,f),h=bo(e,"deadClicks",wt,a),g=bo(e,"errorClicks",Et,i),m=null!==(t=e.dataAttributePrefix)&&void 0!==t?t:mt,y=new io(e),b=d([],l(new Set(d(d(d([],l(p),!1),l(h),!1),l(g),!1))),!1),w=function(){var e,t,n=mn(Ti("pointerdown").map(function(e){return y.addAdditionalEventProperties(e,"click",b,m,!0)}
23)),r=mn(Pi().map(function(e){return y.addTypeAndTimestamp(e,"error")})),i=mn(ki().map(function(e){return y.addAdditionalEventProperties(e,"mutation",b,m)}));window.navigation&&(t=mn(new pn(function(e){var t=function(t){e.next(o(o({},t),{type:"navigate"}))};return window.navigation.addEventListener("navigate",t),function(){window.navigation.removeEventListener("navigate",t)}}).map(function(e){return y.addAdditionalEventProperties(e,"navigate",b,m)})));var a=mn(new pn(function(e){var t=function(){var t=document.activeElement;if(t&&("TEXTAREA"===t.tagName||"INPUT"===t.tagName)){try{if(t.selectionStart===t.selectionEnd)return}catch(e){return}return e.next()}var n=window.getSelection();if(n&&!n.isCollapsed)return e.next()};return window.document.addEventListener("selectionchange",t),function(){window.document.removeEventListener("selectionchange",t)}})),s=mn(new pn(function(e){var t=function(t){e.next(t)},n={capture:!0};return Si.document.addEventListener("mousemove",t,n),function(){Si.document.removeEventListener("mousemove",t,n)}}));return(e={})[ro.ClickObservable]=n,e[ro.MutationObservable]=i,e[ro.NavigateObservable]=t,e[ro.BrowserErrorObservable]=r,e[ro.SelectionObservable]=a,e[ro.MouseMoveObservable]=s,e};return{name:n,type:"enrichment",setup:function(t,c){return s(void 0,void 0,void 0,function(){var s,l,d,b,E,S,k,T,P,x,_,I;return u(this,function(u){return"undefined"==typeof document||(s=w(),(l=oo(t,y))&&r.push({unsubscribe:l}),f&&(d=hi(e,p),b=lo({allObservables:s,amplitude:c,shouldTrackRageClick:d}),r.push(b)),a&&(E=hi(e,h),S=function(e){var t=e.amplitude,n=e.allObservables,r=e.getEventProperties,i=e.shouldTrackDeadClick,a=n.clickObservable,s=n.mutationObservable,u=n.navigateObservable,c=a.filter(function(e){return wi(e)&&i("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ri.LEFT_OR_TOUCH_CONTACT}),l=u?gn(s,u):s,d=gn(c,l),f=null;return hn(d,function(e){return f&&so.includes(e.type)?(clearTimeout(f),f=null,Promise.resolve(null)):"click"===e.type?f?Promise.resolve(null):new Promise(function(t){f=setTimeout(function(){t(e),f=null},3e3)}):Promise.resolve(null)}).subscribe(function(e){if(e){var n={"[Amplitude] X":e.event.clientX,"[Amplitude] Y":e.event.clientY};t.track("[Amplitude] Dead Click",o(o({},r("click",e.closestTrackedAncestor)),n),{time:e.timestamp})}})}({amplitude:c,allObservables:s,getEventProperties:function(e,t){return y.getEventProperties(e,t,m)},shouldTrackDeadClick:E}),r.push(S)),i&&(k=hi(e,g),T=function(e){var t=e.amplitude,n=e.allObservables,r=e.shouldTrackErrorClick,i=n.clickObservable,a=n.browserErrorObservable,s=i.filter(function(e){return wi(e)&&r("click",e.closestTrackedAncestor)&&e.event.target instanceof Element&&null===e.event.target.closest('a[target="_blank"]')&&e.event.button===ri.LEFT_OR_TOUCH_CONTACT}),u=null,c=null,l=function(){null!==u&&(clearTimeout(u),u=null),c=null};return gn(s,a).subscribe(function(e){var n;if("click"===e.type)return l(),c=e,void(u=setTimeout(l,2e3));"error"===e.type&&c&&(t.track("[Amplitude] Error Click",o(((n={})["[Amplitude] Kind"]=e.event.kind,n["[Amplitude] Message"]=e.event.message,n["[Amplitude] Stack"]=e.event.stack,n["[Amplitude] Filename"]=e.event.filename,n["[Amplitude] Line Number"]=e.event.lineNumber,n["[Amplitude] Column Number"]=e.event.columnNumber,n),c.targetElementProperties)),l())})}({amplitude:c,allObservables:s,shouldTrackErrorClick:k}),r.push(T)),v&&(P=void 0,x=void 0,"object"==typeof e.thrashedCursor&&(P=e.thrashedCursor.directionChanges,x=e.thrashedCursor.threshold,P&&P<5&&(t.loggerProvider.warn("'thrashedCursor.directionChanges' of ".concat(P," is below the minimum of ").concat(5,", setting to ").concat(5)),P=5),x&&x>wo&&(t.loggerProvider.warn("'thrashedCursor.threshold' of ".concat(x," is above the maximum of ").concat(wo,", setting to ").concat(wo)),x=wo)),_=yo({amplitude:c,options:e,allObservables:s,directionChanges:P,thresholdMs:x}),r.push(_)),null===(I=null==t?void 0:t.loggerProvider)||void 0===I||I.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,n,i;return u(this,function(o){try{for(e=c(r),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){n={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(n)throw n.error}}return[2]})})}}};function So(e,t){var n=e.startTime+e.duration;return t.filter(function(t){return t.startTime<n&&t.startTime+t.duration>e.startTime}).map(function(e){return e.name})}function ko(e,t){var n,r=So(e,t),i=null!==(n=e.scripts)&&void 0!==n?n:[],a=i.map(function(e){return e.sourceURL}
23).filter(Boolean),s=i.map(function(e){return e.sourceFunctionName}).filter(Boolean),u=i.map(function(e){return e.sourceCharPosition}).filter(function(e){return"number"==typeof e&&e>=0}),c=i.map(function(e){return e.invokerType}).filter(Boolean),l=i.map(function(e){return e.invoker}).filter(Boolean);return o(o(o(o(o(o(o({"[Amplitude] Main Thread Block Source":"long-animation-frame","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.blockingDuration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),{"[Amplitude] Main Thread Block Render Start":e.renderStart,"[Amplitude] Main Thread Block Style And Layout Start":e.styleAndLayoutStart,"[Amplitude] Main Thread Block Script Count":i.length}),a.length>0&&{"[Amplitude] Main Thread Block Script URLs":a}),s.length>0&&{"[Amplitude] Main Thread Block Script Functions":s}),u.length>0&&{"[Amplitude] Main Thread Block Script Positions":u}),c.length>0&&{"[Amplitude] Main Thread Block Invoker Types":c}),l.length>0&&{"[Amplitude] Main Thread Block Invokers":l})}function To(e,t){var n,r=So(e,t),i=null!==(n=e.attribution)&&void 0!==n?n:[];return o(o({"[Amplitude] Main Thread Block Source":"long-task","[Amplitude] Main Thread Block Duration":e.duration,"[Amplitude] Main Thread Block Blocking Duration":e.duration,"[Amplitude] Main Thread Block Start Time":e.startTime},r.length>0&&{"[Amplitude] Main Thread Block Measures":r}),i.length>0&&{"[Amplitude] Main Thread Block Attribution":i.map(function(e){return e.name})})}function Po(e){var t=e.amplitude,n=e.options,r=e.durationThreshold,i=void 0===r?100:r,o=function(){if("undefined"==typeof PerformanceObserver)return null;try{var e=PerformanceObserver.supportedEntryTypes;if(e.includes("long-animation-frame"))return"long-animation-frame";if(e.includes("longtask"))return"longtask"}catch(e){}return null}();if(!o)return{unsubscribe:function(){}};var a=[],s=new PerformanceObserver(function(e){var t,n,r=performance.now();try{for(var i=c(e.getEntries()),o=i.next();!o.done;o=i.next()){var s=o.value;a.push(s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}for(var u=r-1e4;a.length>0&&a[0].startTime<u;)a.shift()});try{s.observe({entryTypes:["measure"]})}catch(e){}var u=new PerformanceObserver(function(e){var r,s;try{for(var u=c(e.getEntries()),l=u.next();!l.done;l=u.next()){var d=l.value;if(!pi(n))return;if(!(d.duration<i)){var f="long-animation-frame"===o?ko(d,a):To(d,a);t.track("[Amplitude] Main Thread Block",f)}}}catch(e){r={error:e}}finally{try{l&&!l.done&&(s=u.return)&&s.call(u)}finally{if(r)throw r.error}}});try{u.observe({entryTypes:[o]})}catch(e){return s.disconnect(),{unsubscribe:function(){}}}return{unsubscribe:function(){u.disconnect(),s.disconnect()}}}var xo,_o,Io=function(e){void 0===e&&(e={});var t="@amplitude/plugin-performance-browser",n=[],r=!0===e.mainThreadBlock||"object"==typeof e.mainThreadBlock&&null!==e.mainThreadBlock;return{name:t,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a,s,c;return u(this,function(u){return"undefined"==typeof document||(r&&(a=100,"object"==typeof e.mainThreadBlock&&void 0!==e.mainThreadBlock.durationThreshold&&(a=e.mainThreadBlock.durationThreshold),s=Po({amplitude:o,options:e,durationThreshold:a}),n.push(s)),null===(c=null==i?void 0:i.loggerProvider)||void 0===c||c.log("".concat(t," performance tracking has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t,r,i;return u(this,function(o){try{for(e=c(n),t=e.next();!t.done;t=e.next())t.value.unsubscribe()}catch(e){r={error:e}}finally{try{t&&!t.done&&(i=e.return)&&i.call(e)}finally{if(r)throw r.error}}return[2]})})}}},Ao="[Amplitude] Network Request",Oo="500-599";function Co(e,t){var n="^"+t.replace(/[-[\]{}()+?.,\\^$|#\s]/g,"\\$&").replace(/\*/g,".*")+"$";return new RegExp(n).test(e)}function Ro(e,t){var n,r,i=t.split(",");try{for(var o=c(i),a=o.next();!a.done;a=o.next()){var s=l(a.value.split("-").map(Number),2),u=s[0],d=s[1];if(e===u&&void 0===d)return!0;
23if(e>=u&&e<=d)return!0}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}function Lo(e){var t;if(e)try{var n=null===(t=B())||void 0===t?void 0:t.location.href,r=new URL(e,n),i=r.searchParams.toString(),o=r.hash.replace("#",""),a=r.href,s=r.host;return r.hash="",r.search="",{query:i,fragment:o,href:a,hrefWithoutQueryOrHash:r.href,host:s}}catch(t){try{return function(e){var t,n=e.indexOf("#"),r=n>=0?e.slice(n+1):"",i=n>=0?e.slice(0,n):e,o=i.indexOf("?"),a=o>=0?i.slice(o+1):"",s=o>=0?i.slice(0,o):i,u=s.match(/^[a-z][a-z0-9+.-]*:\/\/([^/?#]+)/i);return{query:a,fragment:r,href:e,hrefWithoutQueryOrHash:s,host:null!==(t=null==u?void 0:u[1])&&void 0!==t?t:""}}(e)}catch(e){return}}}function Do(e){if("object"==typeof e&&null!==e){if(0!==e.length)return e}else{if(e)return d([],l(R),!1);if(void 0===e){return}}}function No(e){var t,n,r;return!(null===(t=null==e?void 0:e.allowlist)||void 0===t?void 0:t.length)&&!(null===(n=null==e?void 0:e.blocklist)||void 0===n?void 0:n.length)&&!(null===(r=null==e?void 0:e.excludelist)||void 0===r?void 0:r.length)}function Mo(e,t){var n;void 0===t&&(t={});var r=Lo(e.url);if(!r)return!1;var i,o=r.host;if(!1!==t.ignoreAmplitudeRequests&&(Co(o,"*.amplitude.com")||Co(o,"amplitude.com")))return!1;if(null===(n=t.ignoreHosts)||void 0===n?void 0:n.find(function(e){return Co(o,e)}))return!1;if(!t.captureRules&&void 0!==e.status&&!Ro(e.status,Oo))return!1;if(t.captureRules&&(d([],l(t.captureRules),!1).reverse().find(function(t){if(i=function(e,t,n,r,i){if((!e.hosts||e.hosts.find(function(e){return Co(t,e)}))&&(!r||!e.urls||Ae(r,e.urls))&&(!i||!e.methods||e.methods.find(function(e){return i.toLowerCase()===e.toLowerCase()||"*"===e})))return!((n||0===n)&&!Ro(n,e.statusCodeRange||Oo))}(t,o,e.status,e.url,e.method),i){var n=Do(t.responseHeaders);if(e.responseWrapper&&n){var r=e.responseWrapper.headers(n);r&&(e.responseHeaders=r)}var a=Do(t.requestHeaders);if(e.requestWrapper&&a){var s=e.requestWrapper.headers(a);s&&(e.requestHeaders=s)}if(e.responseWrapper&&t.responseBody&&!No(t.responseBody)){var u=t.responseBody.excludelist||t.responseBody.blocklist;e.responseBodyJson=e.responseWrapper.json(t.responseBody.allowlist,u)}if(e.requestWrapper&&t.requestBody&&!No(t.requestBody)){u=t.requestBody.excludelist||t.requestBody.blocklist;e.requestBodyJson=e.requestWrapper.json(t.requestBody.allowlist,u)}}return void 0!==i}),!i))return!1;return!e.requestWrapper||!function(e,t){if(e.includes("amplitude.com"))try{var n=t.body;if("string"!=typeof n)return!1;if(JSON.parse(n).events.find(function(e){return e.event_type===Ao}))return!0}catch(e){}return!1}(o,e.requestWrapper)}function jo(e){var t=e.allObservables,n=e.networkTrackingOptions,r=e.amplitude,i=e.loggerProvider;return t.networkObservable.filter(function(e){return Mo(e.event,n)}).subscribe(function(e){var t,n,o,a=e.event,c=Lo(a.url);if(c){var d=null===(n=a.responseWrapper)||void 0===n?void 0:n.bodySize,f=null===(o=a.requestWrapper)||void 0===o?void 0:o.bodySize;!function(e,t,n,r){s(this,void 0,void 0,function(){var i,o,a;return u(this,function(s){switch(s.label){case 0:return t.requestBodyJson||t.responseBodyJson?[4,Promise.all([t.requestBodyJson,t.responseBodyJson])]:[3,2];case 1:if(i=l.apply(void 0,[s.sent(),2]),o=i[0],a=i[1],o)try{e["[Amplitude] Request Body"]=JSON.stringify(o)}catch(e){null==r||r.debug("Failed to stringify request body",e)}if(a)try{e["[Amplitude] Response Body"]=JSON.stringify(a)}catch(e){null==r||r.debug("Failed to stringify response body")}s.label=2;case 2:return null==n||n.track(Ao,e),[2]}})})}(((t={})["[Amplitude] URL"]=c.hrefWithoutQueryOrHash,t["[Amplitude] URL Query"]=c.query,t["[Amplitude] URL Fragment"]=c.fragment,t["[Amplitude] Request Method"]=a.method,t["[Amplitude] Status Code"]=a.status,t["[Amplitude] Start Time"]=a.startTime,t["[Amplitude] Completion Time"]=a.endTime,t["[Amplitude] Duration"]=a.duration,t["[Amplitude] Request Body Size"]=f,t["[Amplitude] Response Body Size"]=d,t["[Amplitude] Request Type"]=a.type,t["[Amplitude] Request Headers"]=a.requestHeaders,t["[Amplitude] Response Headers"]=a.responseHeaders,t),a,r,i)}})}!function(e){e.NetworkObservable="networkObservable"}(xo||(xo={}));var Uo=function(e){void 0===e&&(e={});var t,n="@amplitude/plugin-network-capture-browser",r=function(){var e,n=new pn(function(e){var n=new qt(function(t){var n=function(e,t){return{event:e,timestamp:Date.now(),type:t}}(t,"network");e.next(n)});return Ht.subscribe(n,t),function(){Ht.unsubscribe(n)}});return(e={})[xo.NetworkObservable]=n,e};return{name:n,type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var a;return u(this,function(s){return"undefined"==typeof document&&(function(){var e,t=B();null===(e=null==t?void 0:t.navigator)||void 0===e||e.product}(),1)||(a=r(),t=null==i?void 0:i.loggerProvider,_o=jo({allObservables:a,networkTrackingOptions:e,amplitude:o,loggerProvider:t}),null==t||t.log("".concat(n," has been successfully added."))),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return _o.unsubscribe(),[2]})})}}};let qo=-1;const Fo=e=>{addEventListener("pageshow",t=>{t.persisted&&(qo=t.timeStamp,e(t))},!0)},Bo=(e,t,n,r)=>{let i,o;return a=>{t.value>=0&&(a||r)&&(o=t.value-(i??0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,n),e(t)))}},Ho=e=>{requestAnimationFrame(()=>requestAnimationFrame(()=>e()))},Vo=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},zo=()=>{const e=Vo();return e?.activationStart??0},Wo=(e,t=-1)=>{const n=Vo();let r="navigate";return qo>=0?r="back-forward-cache":n&&(document.prerendering||zo()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},$o=new WeakMap;function Ko(e,t){return $o.get(e)||$o.set(e,new t),$o.get(e)}class Jo{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],n=this.o.at(-1);this.i&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const Go=(e,t,n={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(e=>{Promise.resolve().then(()=>{t(e.getEntries())})});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},Yo=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Xo=-1;const Qo=new Set,Zo=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,ea=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Qo)e();isFinite(Xo)||(Xo="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",ea,!0))}},ta=()=>
vendor: 4,165 bytes, line 23
23{if(Xo<0){const e=zo(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter(t=>"hidden"===t.name&&t.startTime>e)[0]?.startTime;Xo=t??Zo(),addEventListener("visibilitychange",ea,!0),addEventListener("prerenderingchange",ea,!0),Fo(()=>{setTimeout(()=>{Xo=Zo()})})}return{get firstHiddenTime(){return Xo},onHidden(e){Qo.add(e)}}},na=e=>{document.prerendering?addEventListener("prerenderingchange",()=>e(),!0):e()},ra=[1800,3e3],ia=(e,t={})=>{na(()=>{const n=ta();let r,i=Wo("FCP");const o=Go("paint",e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-zo(),0),i.entries.push(t),r(!0)))});o&&(r=Bo(e,i,ra,t.reportAllChanges),Fo(n=>{i=Wo("FCP"),r=Bo(e,i,ra,t.reportAllChanges),Ho(()=>{i.value=performance.now()-n.timeStamp,r(!0)})}))})},oa=[.1,.25];let aa=0,sa=1/0,ua=0;const ca=e=>{for(const t of e)t.interactionId&&(sa=Math.min(sa,t.interactionId),ua=Math.max(ua,t.interactionId),aa=ua?(ua-sa)/7+1:0)};let la;const da=()=>la?aa:performance.interactionCount??0;let fa=0;class va{u=[];l=new Map;m;p;v(){fa=da(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((da()-fa)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let n=this.l.get(e.interactionId);if(n||this.u.length<10||e.duration>t.P){if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort((e,t)=>t.P-e.P),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(n)}}}const pa=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Yo(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})}))},ha=[200,500],ga=(e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const n=ta();na(()=>{"interactionCount"in performance||la||(la=Go("event",ca,{type:"event",buffered:!0,durationThreshold:0}));let r,i=Wo("INP");const o=Ko(t,va),a=e=>{pa(()=>{for(const t of e)o.h(t);const t=o.L();t&&t.P!==i.value&&(i.value=t.P,i.entries=t.entries,r())})},s=Go("event",a,{durationThreshold:t.durationThreshold??40});r=Bo(e,i,ha,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),Fo(()=>{o.v(),i=Wo("INP"),r=Bo(e,i,ha,t.reportAllChanges)}))})};class ma{m;h(e){this.m?.(e)}}const ya=[2500,4e3],ba=[800,1800],wa=e=>{document.prerendering?na(()=>wa(e)):"complete"!==document.readyState?addEventListener("load",()=>wa(e),!0):setTimeout(e)};function Ea(e){var t,n=(null===(t=e.entries[0])||void 0===t?void 0:t.startTime)||0;return performance.timeOrigin+n}function Sa(e){return{value:e.value,rating:e.rating,delta:e.delta,navigationType:e.navigationType,id:e.id,timestamp:Math.floor(Ea(e)),navigationStart:Math.floor(performance.timeOrigin)}}var ka,Ta=function(){var e=null,t=B(),n=null==t?void 0:t.document,r=null==t?void 0:t.location;return{name:"web-vitals-browser",type:"enrichment",setup:function(t,i){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return void 0===n||(o=Oe((null==r?void 0:r.href)||"",t.loggerProvider),a={"[Amplitude] Page Domain":(null==r?void 0:r.hostname)||"","[Amplitude] Page Location":o,"[Amplitude] Page Path":Oe((null==r?void 0:r.pathname)||"",t.loggerProvider),"[Amplitude] Page Title":"undefined"!=typeof document&&document.title||"","[Amplitude] Page URL":Oe(o.split("?")[0],t.loggerProvider)},((e,t={})=>{na(()=>{const n=ta();let r,i=Wo("LCP");const o=Ko(t,ma),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o.h(t),t.startTime<n.firstHiddenTime&&(i.value=Math.max(t.startTime-zo(),0),i.entries=[t],r())},s=Go("largest-contentful-paint",a);if(s){r=Bo(e,i,ya,t.reportAllChanges);const n=Yo(()=>{a(s.takeRecords()),s.disconnect(),r(!0)}),o=e=>{e.isTrusted&&(pa(n),removeEventListener(e.type,o,{capture:!0}))};
23for(const e of["keydown","click","visibilitychange"])addEventListener(e,o,{capture:!0});Fo(n=>{i=Wo("LCP"),r=Bo(e,i,ya,t.reportAllChanges),Ho(()=>{i.value=performance.now()-n.timeStamp,r(!0)})})}})})(function(e){a["[Amplitude] LCP"]=Sa(e)}),ia(function(e){a["[Amplitude] FCP"]=Sa(e)}),ga(function(e){a["[Amplitude] INP"]=Sa(e)}),((e,t={})=>{const n=ta();ia(Yo(()=>{let r,i=Wo("CLS",0);const o=Ko(t,Jo),a=e=>{for(const t of e)o.h(t);o.i>i.value&&(i.value=o.i,i.entries=o.o,r())},s=Go("layout-shift",a);s&&(r=Bo(e,i,oa,t.reportAllChanges),n.onHidden(()=>{a(s.takeRecords()),r(!0)}),Fo(()=>{o.i=0,i=Wo("CLS",0),r=Bo(e,i,oa,t.reportAllChanges),Ho(()=>r())}),setTimeout(r))}))})(function(e){a["[Amplitude] CLS"]=Sa(e)}),((e,t={})=>{let n=Wo("TTFB"),r=Bo(e,n,ba,t.reportAllChanges);wa(()=>{const i=Vo();i&&(n.value=Math.max(i.responseStart-zo(),0),n.entries=[i],r(!0),Fo(()=>{n=Wo("TTFB",0),r=Bo(e,n,ba,t.reportAllChanges),r(!0)}))})})(function(e){a["[Amplitude] TTFB"]=Sa(e)}),e=function(){"hidden"===n.visibilityState&&e&&(i.track("[Amplitude] Web Vitals",a),n.removeEventListener("visibilitychange",e),e=null)},n.addEventListener("visibilitychange",e)),[2]})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(t){return e&&(null==n||n.removeEventListener("visibilitychange",e)),[2]})})}}},Pa=function(){function e(e,t){var n,r,i;this.shouldTrackNewCampaign=!1,this.options=o({initialEmptyValue:"EMPTY",resetSessionOnNewCampaign:!1,excludeReferrers:(r=(null===(n=t.cookieOptions)||void 0===n?void 0:n.domain)||t.topLevelDomain,i=r,i?(i.startsWith(".")&&(i=i.substring(1)),[new RegExp("".concat(i.replace(".","\\."),"$"))]):[]),optOut:t.optOut},e),this.storage=t.cookieStorage,this.storageKey=je(t.apiKey,"MKTG"),this.webExpStorageKey=je(t.apiKey,"MKTG_ORIGINAL"),this.currentCampaign=C,this.sessionTimeout=t.sessionTimeout,this.lastEventTime=t.lastEventTime,this.logger=t.loggerProvider,this.topLevelDomain=t.topLevelDomain,t.loggerProvider.log("Installing web attribution tracking.")}return e.prototype.init=function(){return s(this,void 0,void 0,function(){var e,t;return u(this,function(n){switch(n.label){case 0:return this.options.optOut?[2]:[4,this.fetchCampaign()];case 1:return t=l.apply(void 0,[n.sent(),2]),this.currentCampaign=t[0],this.previousCampaign=t[1],e=!this.lastEventTime||Te(this.sessionTimeout,this.lastEventTime),Rr(this.currentCampaign,this.previousCampaign,this.options,this.logger,e,this.topLevelDomain)?(this.shouldTrackNewCampaign=!0,[4,this.storage.set(this.storageKey,this.currentCampaign)]):[3,3];case 2:n.sent(),n.label=3;case 3:return[2]}})})},e.prototype.fetchCampaign=function(){return s(this,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,this.storage.get(this.webExpStorageKey)];case 1:return(e=t.sent())?[4,this.storage.remove(this.webExpStorageKey)]:[3,3];case 2:t.sent(),t.label=3;case 3:return[4,Promise.all([e||(new Vt).parse(),this.storage.get(this.storageKey)])];case 4:return[2,t.sent()]}})})},e.prototype.generateCampaignEvent=function(e){this.shouldTrackNewCampaign=!1;var t,n,r,i,a=(t=this.currentCampaign,n=this.options,r=o(o({},C),t),i=Object.entries(r).reduce(function(e,t){var r,i=l(t,2),o=i[0],a=i[1];return e.setOnce("initial_".concat(o),null!==(r=null!=a?a:n.initialEmptyValue)&&void 0!==r?r:"EMPTY"),a?e.set(o,a):e.unset(o)},new M),W(i));return e&&(a.event_id=e),a},e.prototype.shouldSetSessionIdOnNewCampaign=function(){return this.shouldTrackNewCampaign&&!!this.options.resetSessionOnNewCampaign},e}(),xa=new Set([i.IDENTIFY,i.GROUP_IDENTIFY]),_a=function(e){var t;void 0===e&&(e={});var n,r,i,a,c,l,d=null!==(t=e.fallbackAttributionEvent)&&void 0!==t&&t,f=B(),v={},p=!1,h=!1,g=function(){return s(void 0,void 0,void 0,function(){var e;return u(this,function(t){switch(t.label){case 0:return[4,(new Vt).parse()];case 1:return e=t.sent(),v=Re(e),d&&(null==r||r.log("Tracking attribution fallback event."),null==n||n.track("[Amplitude] Attribution",v)),[2]}})})},m=function(){g()},y=function(e){return new Proxy(e,{apply:function(e,t,n){Reflect.apply(e,t,n),p&&m()}})};return{name:"@amplitude/plugin-event-property-attribution-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){return u(this,function(o){switch(o.label){case 0:return n=t,r=e.loggerProvider,p=!0,r.log("Installing event property attribution tracking."),[4,g()];case 1:if(o.sent(),!f)return[2];if(f.addEventListener("popstate",m),!h){if(i=Reflect.get(f.history,"pushState"),a=Reflect.get(f.history,"replaceState"),!i||!a)return[2];c=y(i),f.history.pushState=c,l=y(a),f.history.replaceState=l,h=!0}return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){return u(this,function(t){return xa.has(e.event_type)||(e.event_properties=o(o({},v),e.event_properties)),[2,e]})})},teardown:function(){return s(void 0,void 0,void 0,function(){var e,t;return u(this,function(n){return f&&(f.removeEventListener("popstate",m),e=Reflect.get(f.history,"pushState"),t=Reflect.get(f.history,"replaceState"),h&&e===c&&i&&(f.history.pushState=i),h&&t===l&&a&&(f.history.replaceState=a)),p=!1,h=!1,i=void 0,a=void 0,c=void 0,l=void 0,v={},[2]})})}}},Ia="AMP_CURRENT_PAGE",Aa="AMP_PREVIOUS_PAGE",Oa="AMP_URL_INFO";!function(e){e.Direct="direct",e.Internal="internal",e.External="external"}(ka||(ka={}));var Ca=new Set([i.IDENTIFY,i.GROUP_IDENTIFY,i.REVENUE]),Ra=function(e){var t=(void 0===e?{}:e).internalDomains,n=void 0===t?[]:t,r=B(),i=void 0,a=!1,c=void 0,d=!1,f=!1,v=function(e){var t;try{var n=Oe(e,c);
23t=new URL(n).hostname}catch(e){null==c||c.error("Could not parse URL: ",e)}return t},p=function(e){var t="undefined"!=typeof location&&location.hostname||"",r=e?v(e):void 0;if(!r)return ka.Direct;var i=n.some(function(e){return-1!==t.indexOf(e)}),o=n.some(function(e){return-1!==r.indexOf(e)});return t===r||o&&i?ka.Internal:ka.External},h=function(){return s(void 0,void 0,void 0,function(){var e,t,n,r,o;return u(this,function(s){switch(s.label){case 0:return i&&a?[4,i.get(Oa)]:[3,3];case 1:return e=s.sent(),t=Oe("undefined"!=typeof location&&location.href||""),n=(null==e?void 0:e[Ia])||"",r=void 0,r=t===n?(null==e?void 0:e[Aa])||"":n||(document.referrer||""),[4,i.set(Oa,(o={},o[Ia]=t,o[Aa]=r,o))];case 2:s.sent(),s.label=3;case 3:return[2]}})})},g=function(){h()},m={name:"@amplitude/plugin-page-url-enrichment-browser",type:"enrichment",setup:function(e,t){return s(void 0,void 0,void 0,function(){var t,n,o,s,p,m,y,b;return u(this,function(u){switch(u.label){case 0:if((c=e.loggerProvider).log("Installing @amplitude/plugin-page-url-enrichment-browser"),f=!0,!r)return[3,7];try{i=new Ue(r.sessionStorage)}catch(e){null==c||c.debug("sessionStorage is not available in this environment.")}return[4,null==i?void 0:i.isEnabled()];case 1:return a=null!==(b=u.sent())&&void 0!==b&&b,i&&a?(t="undefined"!=typeof document&&document.referrer||"",n=t?v(t):void 0,o="undefined"!=typeof location&&location.hostname||"",s=Oe("undefined"!=typeof location&&location.href||""),[4,i.get(Oa)]):[3,6];case 2:return p=u.sent(),m=(null==p?void 0:p[Ia])||"",!!n&&n!==o&&m!==s?[4,i.set(Oa,(y={},y[Ia]=s,y[Aa]=t,y))]:[3,4];case 3:return u.sent(),[3,6];case 4:return[4,h()];case 5:u.sent(),u.label=6;case 6:r.addEventListener("popstate",g),d||(r.history.pushState=new Proxy(r.history.pushState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),r.history.replaceState=new Proxy(r.history.replaceState,{apply:function(e,t,n){var r=l(n,3),i=r[0],o=r[1],a=r[2];e.apply(t,[i,o,a]),f&&g()}}),d=!0),u.label=7;case 7:return[2]}})})},execute:function(e){return s(void 0,void 0,void 0,function(){var t,n,r;return u(this,function(s){switch(s.label){case 0:return t=Oe("undefined"!=typeof location&&location.href||""),i&&a?[4,i.get(Oa)]:[3,2];case 1:if(n=s.sent(),r=(null==n?void 0:n[Aa])||"",Ca.has(e.event_type))return[2,e];e.event_properties=o(o({},e.event_properties||{}),{"[Amplitude] Page Domain":La(e,"[Amplitude] Page Domain","undefined"!=typeof location&&location.hostname||""),"[Amplitude] Page Location":La(e,"[Amplitude] Page Location",t),"[Amplitude] Page Path":La(e,"[Amplitude] Page Path","undefined"!=typeof location&&Oe(location.pathname)||""),"[Amplitude] Page Title":La(e,"[Amplitude] Page Title",Yt(Gt)),"[Amplitude] Page URL":La(e,"[Amplitude] Page URL",t.split("?")[0]),"[Amplitude] Previous Page Location":r,"[Amplitude] Previous Page Type":p(r)}),s.label=2;case 2:return[2,e]}})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){switch(e.label){case 0:return r&&(r.removeEventListener("popstate",g),f=!1),i&&a?[4,i.set(Oa,{})]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}})})}};return m};function La(e,t,n){return e.event_properties||(e.event_properties={}),void 0===e.event_properties[t]?n:e.event_properties[t]}var Da=function(){var e,t,n;function r(t){if(t)try{var n=new Function("return "+t)();if("function"==typeof n)return n;null==e||e.error("Custom enrichment body did not evaluate to a function")}catch(t){null==e||e.error("Could not create custom enrichment function",t)}return function(e){return e}}var i={name:"@amplitude/plugin-custom-enrichment-browser",type:"enrichment",setup:function(i,o){return s(void 0,void 0,void 0,function(){var o,a;return u(this,function(s){return null==(e=i.loggerProvider)||e.log("Installing @amplitude/plugin-custom-enrichment-browser"),(null===(a=i.remoteConfig)||void 0===a?void 0:a.fetchRemoteConfig)&&(i.remoteConfigClient?(o=i.remoteConfigClient.subscribe("configs.analyticsSDK.browserSDK.customEnrichment","all",function(e){n=e&&function(e){return"object"==typeof e&&null!==e&&"body"in e&&"string"==typeof e.body}(e)?r(e.body||""):r("")}),t=function(){var e;return null===(e=i.remoteConfigClient)||void 0===e?void 0:e.unsubscribe(o)}):null==e||e.debug("Remote config client is not provided, skipping remote config fetch")),[2]})})},execute:function(t){return s(void 0,void 0,void 0,function(){var r;return u(this,function(i){if(n)try{return[2,null!==(r=n(t))&&void 0!==r?r:null]}catch(n){return null==e||e.error("Could not execute custom enrichment function",n),[2,t]}return[2,t]})})},teardown:function(){return s(void 0,void 0,void 0,function(){return u(this,function(e){return t&&t(),[2]})})}};return i},Na="userProperty",Ma="eventProperty",ja=function(e){return e===Na||e===Ma},Ua=[Na,Ma],qa=function(e,t){return function(e){var t=d([],l(new Set((Array.isArray(e)?e:[e]).filter(ja))),!1);return t.length>0?t:d([],l(Ua),!1)}(e.trackingMethod).includes(t)},Fa=function(e){return qa(e,Na)},Ba=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._diagnosticsSampleRate=0,t}return n(t,e),t.prototype.init=function(e,t,n){var r,i;return void 0===e&&(e=""),arguments.length>
vendor: 12,971 bytes, line 23
232?(r=t,i=n):"string"==typeof t?(r=t,i=void 0):(r=null==t?void 0:t.userId,i=t),$(this._init(o(o({},i),{userId:r,apiKey:e})))},t.prototype._init=function(t){var n,r,i,c,l,d,f,v;return s(this,void 0,void 0,function(){var p,h,g,m,y,b,w,E,S,k,T,P,x,_,I,A=this;return u(this,function(O){switch(O.label){case 0:return this.initializing?[2]:(this.initializing=!0,p=function(e){var t,n;return void 0===e&&(e={}),!0===(null===(t=e.remoteConfig)||void 0===t?void 0:t.fetchRemoteConfig)||!1!==(null===(n=e.remoteConfig)||void 0===n?void 0:n.fetchRemoteConfig)&&!1!==e.fetchRemoteConfig}(t),h=null!==(n=t.loggerProvider)&&void 0!==n?n:new X,t.loggerProvider||h.enable(null!==(r=t.logLevel)&&void 0!==r?r:G.Warn),g=null!==(i=t.serverZone)&&void 0!==i?i:"US",y=this._diagnosticsSampleRate,b=null===(c=t.enableDiagnostics)||void 0===c||c,p?(m=new ut(t.apiKey,h,g,null===(l=t.remoteConfig)||void 0===l?void 0:l.serverUrl),[4,new Promise(function(e){null==m||m.subscribe("configs.diagnostics.browserSDK","all",function(t,n,r){if(h.debug("Diagnostics remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t){var i=t.sampleRate;"number"!=typeof i||isNaN(i)||(y=i);var o=t.enabled;"boolean"==typeof o&&(b=o)}e()})})]):[3,2]);case 1:O.sent(),O.label=2;case 2:return(w=new et(t.apiKey,h,g,{enabled:b,sampleRate:y})).setTag("library","".concat(ir,"/").concat(rr)),"undefined"!=typeof navigator&&w.setTag("user_agent",navigator.userAgent),[4,Fr(t.apiKey,t,this,w,{loggerProvider:h,serverZone:g,enableDiagnostics:b,diagnosticsSampleRate:y})];case 3:return E=O.sent(),p&&m?[4,new Promise(function(e){null==m||m.subscribe("configs.analyticsSDK.browserSDK","all",function(t,n,r){E.loggerProvider.debug("Remote configuration received:",JSON.stringify({remoteConfig:t,source:n,lastFetch:r},null,2)),t&&ni(t,E),e()})})]:[3,5];case 4:O.sent(),O.label=5;case 5:return[4,e.prototype._init.call(this,E)];case 6:return O.sent(),this.logBrowserOptions(E),this.config.remoteConfigClient=m,L=this.config,S=Hn(L.defaultTracking)&&L.defaultTracking&&"object"==typeof L.defaultTracking&&L.defaultTracking.attribution&&"object"==typeof L.defaultTracking.attribution?o({},L.defaultTracking.attribution):{},Hn(this.config.defaultTracking)&&Fa(S)?(this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[3,2]:(this.webAttribution=new Pa(S,this.config),[4,this.webAttribution.init()]);case 1:t.sent(),t.label=2;case 2:return[2]}})})}),this.webAttribution=new Pa(S,this.config),[4,this.webAttribution.init()]):[3,8];case 7:O.sent(),O.label=8;case 8:return k=_e(),T=k.ampTimestamp?Number(k.ampTimestamp):void 0,P=!T||Date.now()<T,x=P&&!Number.isNaN(Number(k.ampSessionId))?Number(k.ampSessionId):void 0,-1!==(_=this.config.deferredSessionId)||this.config.optOut||(_=Date.now()),this.setSessionId(null!==(v=null!==(f=null!==(d=t.sessionId)&&void 0!==d?d:x)&&void 0!==f?f:_)&&void 0!==v?v:this.config.sessionId),this.config.optOut&&this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){return!e&&this.config.deferredSessionId&&(-1===this.config.deferredSessionId?this.setSessionId(void 0):this.setSessionId(this.config.deferredSessionId)),[2]})})}),(I=Se(t.instanceName)).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),null===this.config.offline?[3,10]:[4,this.add(ei()).promise];case 9:O.sent(),O.label=10;case 10:return[4,this.add(new de({diagnosticsClient:w})).promise];case 11:return O.sent(),[4,this.add(new or).promise];case 12:return O.sent(),[4,this.add(new ke).promise];case 13:return O.sent(),function(e){Zr||void 0!==e.defaultTracking||(e.loggerProvider.warn("`options.defaultTracking` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to `options.defaultTracking`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example:\n\namplitude.init(<YOUR_API_KEY>, {\n defaultTracking: true,\n});\n\nVisit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details."),Zr=!0)}(this.config),R=this.config.defaultTracking,Bn(R,"fileDownloads")?(this.config.loggerProvider.debug("Adding file download tracking plugin"),[4,this.add(Qr()).promise]):[3,15];case 14:O.sent(),O.label=15;case 15:return Vn(this.config.defaultTracking)?(this.config.loggerProvider.debug("Adding form interaction plugin"),[4,this.add(Gr()).promise]):[3,17];case 16:O.sent(),O.label=17;case 17:return zn(this.config.defaultTracking)?this.config.optOut?[3,19]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Wr(Zn(this.config))).promise]):[3,20];case 18:return O.sent(),[3,20];case 19:this.timeline.addOptOutListener(function(e){return s(A,void 0,void 0,function(){return u(this,function(t){switch(t.label){case 0:return e?[2]:(this.config.loggerProvider.debug("Adding page view tracking plugin"),[4,this.add(Wr(Zn(this.config))).promise]);case 1:return t.sent(),[2]}})})}),O.label=20;case 20:return Hn(this.config.defaultTracking)&&function(e){return qa(e,Ma)}(S)?(this.config.loggerProvider.debug("Adding event property attribution plugin"),[4,this.add(_a(S)).promise]):[3,22];case 21:O.sent(),O.label=22;case 22:return Kn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding user interactions plugin (autocapture plugin)"),[4,this.add(ao(Yn(this.config),{diagnosticsClient:w})).promise]):[3,24];case 23:O.sent(),O.label=24;case 24:return Jn(this.config.autocapture)?(this.config.loggerProvider.debug("Adding frustration interactions plugin"),[4,this.add(Eo(Xn(this.config))).promise]):[3,26];case 25:O.sent(),O.label=26;case 26:return $n(this.config.autocapture)?(this.config.loggerProvider.debug("Adding network tracking plugin"),[4,this.add(Uo(Qn(this.config))).promise]):[3,28];case 27:O.sent(),O.label=28;case 28:return function(e){return"boolean"==typeof e?e:"object"==typeof e&&!0===e.webVitals}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding web vitals plugin"),[4,this.add(Ta()).promise]):[3,30];case 29:O.sent(),O.label=30;case 30:return function(e){return"object"==typeof e&&(!0===e.performanceTracking||"object"==typeof e.performanceTracking)}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding performance tracking plugin"),[4,this.add(Io(Gn(this.config))).promise]):[3,32];case 31:O.sent(),O.label=32;case 32:return function(e){return Bn(e,"pageUrlEnrichment")}(this.config.autocapture)?(this.config.loggerProvider.debug("Adding referrer page url plugin"),[4,this.add(Ra()).promise]):[3,34];case 33:O.sent(),O.label=34;case 34:return("boolean"==typeof(C=this.config.customEnrichment)?C:"object"==typeof C&&null!==C&&!1!==C.enabled)?(this.config.loggerProvider.debug("Adding custom enrichment plugin"),[4,this.add(Da()).promise]):[3,36];case 35:O.sent(),O.label=36;case 36:return this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 37:return O.sent(),I.eventBridge.setEventReceiver(function(e){var t=e.eventProperties||{},n=t.time,r=a(t,["time"]),i="number"==typeof n?{time:n}:void 0;A.track(e.eventType,r,i)}),[2]}var C,R,L})})},t.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},t.prototype.setUserId=function(e){this.config?(this.config.loggerProvider.debug("function setUserId: ",e),e===this.config.userId&&void 0!==e||(this.config.userId=e,this.timeline.onIdentityChanged({userId:e}),function(e,t){Se(t).identityStore.editIdentity().setUserId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setUserId.bind(this,e))},t.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},t.prototype.setDeviceId=function(e){this.config?(this.config.loggerProvider.debug("function setDeviceId: ",e),e!==this.config.deviceId&&(this.config.deviceId=e,this.timeline.onIdentityChanged({deviceId:e}),function(e,t){Se(t).identityStore.editIdentity().setDeviceId(e).commit()}(e,this.config.instanceName))):this.q.push(this.setDeviceId.bind(this,e))},t.prototype.reset=function(){this.setDeviceId(V()),this.setUserId(void 0),this.timeline.onReset()},t.prototype.getIdentity=function(){var e,t;return{deviceId:null===(e=this.config)||void 0===e?void 0:e.deviceId,userId:null===(t=this.config)||void 0===t?void 0:t.userId,userProperties:this.userProperties}},t.prototype.setIdentity=function(e){var t,n,r;if("userId"in e&&this.setUserId(e.userId),"deviceId"in e&&e.deviceId&&this.setDeviceId(e.deviceId),"userProperties"in e){this.userProperties=e.userProperties;var i=new M,o=null!==(r=e.userProperties)&&void 0!==r?r:{};try{for(var a=c(Object.entries(o)),s=a.next();!s.done;s=a.next()){var u=l(s.value,2),d=u[0],f=u[1];i.set(d,f)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}this.identify(i)}},t.prototype.getOptOut=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.optOut},t.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},t.prototype.setSessionId=function(e){var t,n=[];if(!this.config)return this.q.push(this.setSessionId.bind(this,e)),$(Promise.resolve());if(this.config.optOut)return this.config.deferredSessionId=null!=e?e:-1,$(Promise.resolve());if(void 0===e&&(e=Date.now()),e===this.config.sessionId)return $(Promise.resolve());this.config.loggerProvider.debug("function setSessionId: ",e);var r=this.getSessionId();r!==e&&this.timeline.onSessionIdChanged(e);var i=this.config.lastEventTime,o=null!==(t=this.config.lastEventId)&&void 0!==t?t:-1;this.config.sessionId=e,this.config.lastEventTime=void 0,this.config.pageCounter=0,Wn(this.config.defaultTracking)&&(r&&i&&n.push(this.track(wr,void 0,{device_id:this.previousSessionDeviceId,event_id:++o,session_id:r,time:i+1,user_id:this.previousSessionUserId}).promise),this.config.lastEventTime=this.config.sessionId);var a=this.trackCampaignEventIfNeeded(++o,n);return this.config.identify&&n.push(this.track(W(this.config.identify)).promise),Wn(this.config.defaultTracking)&&n.push(this.track(br,void 0,{event_id:a?++o:o,session_id:this.config.sessionId,time:this.config.lastEventTime}).promise),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId,$(Promise.all(n))},t.prototype.extendSession=function(){this.config?this.config.lastEventTime=Date.now():this.q.push(this.extendSession.bind(this))},t.prototype.setTransport=function(e){this.config?this.config.transportProvider=Hr(e):this.q.push(this.setTransport.bind(this,e))},t.prototype.identify=function(t,n){if(nr(t)){var r=t._q;t._q=[],t=tr(new M,r)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},t.prototype.groupIdentify=function(t,n,r,i){if(nr(r)){var o=r._q;r._q=[],r=tr(new M,o)}return e.prototype.groupIdentify.call(this,t,n,r,i)},t.prototype.revenue=function(t,n){if(nr(t)){var r=t._q;t._q=[],t=tr(new J,r)}return e.prototype.revenue.call(this,t,n)},t.prototype.trackCampaignEventIfNeeded=function(e,t){if(!this.webAttribution||!this.webAttribution.shouldTrackNewCampaign||!Fa(this.webAttribution.options))return!1;var n=this.webAttribution.generateCampaignEvent(e);return t?t.push(this.track(n).promise):this.track(n),this.config.loggerProvider.log("Tracking attribution."),!0},t.prototype.process=function(t){return s(this,void 0,void 0,function(){var n,r,i;return u(this,function(o){return n=Date.now(),r=Te(this.config.sessionTimeout,this.config.lastEventTime),i=this.webAttribution&&this.webAttribution.shouldSetSessionIdOnNewCampaign(),t.event_type===br||t.event_type===wr||t.session_id&&t.session_id!==this.getSessionId()||(r||i?(this.setSessionId(n),i&&this.config.loggerProvider.log("Created a new session for new campaign.")):r||this.trackCampaignEventIfNeeded()),[2,e.prototype.process.call(this,t)]})})},t.prototype.logBrowserOptions=function(e){try{var t=o(o({},e),{apiKey:e.apiKey.substring(0,10)+"********"});this.config.loggerProvider.debug("Initialized Amplitude with BrowserConfig:",Pn(t))}catch(e){this.config.loggerProvider.error("Error logging browser config",e)}},t.prototype._setDiagnosticsSampleRate=function(e){e>1||e<0||this.config||(this._diagnosticsSampleRate=e)},t}(K),Ha=function(){var e=new Ba;return{init:ue(e.init.bind(e),"init",oe(e),se(e,["config"])),add:ue(e.add.bind(e),"add",oe(e),se(e,["config.apiKey","timeline.plugins"])),remove:ue(e.remove.bind(e),"remove",oe(e),se(e,["config.apiKey","timeline.plugins"])),track:ue(e.track.bind(e),"track",oe(e),se(e,["config.apiKey","timeline.queue.length"])),logEvent:ue(e.logEvent.bind(e),"logEvent",oe(e),se(e,["config.apiKey","timeline.queue.length"])),identify:ue
23(e.identify.bind(e),"identify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ue(e.groupIdentify.bind(e),"groupIdentify",oe(e),se(e,["config.apiKey","timeline.queue.length"])),setGroup:ue(e.setGroup.bind(e),"setGroup",oe(e),se(e,["config.apiKey","timeline.queue.length"])),revenue:ue(e.revenue.bind(e),"revenue",oe(e),se(e,["config.apiKey","timeline.queue.length"])),flush:ue(e.flush.bind(e),"flush",oe(e),se(e,["config.apiKey","timeline.queue.length"])),getUserId:ue(e.getUserId.bind(e),"getUserId",oe(e),se(e,["config","config.userId"])),setUserId:ue(e.setUserId.bind(e),"setUserId",oe(e),se(e,["config","config.userId"])),getDeviceId:ue(e.getDeviceId.bind(e),"getDeviceId",oe(e),se(e,["config","config.deviceId"])),setDeviceId:ue(e.setDeviceId.bind(e),"setDeviceId",oe(e),se(e,["config","config.deviceId"])),reset:ue(e.reset.bind(e),"reset",oe(e),se(e,["config","config.userId","config.deviceId"])),getSessionId:ue(e.getSessionId.bind(e),"getSessionId",oe(e),se(e,["config"])),setSessionId:ue(e.setSessionId.bind(e),"setSessionId",oe(e),se(e,["config"])),extendSession:ue(e.extendSession.bind(e),"extendSession",oe(e),se(e,["config"])),setOptOut:ue(e.setOptOut.bind(e),"setOptOut",oe(e),se(e,["config"])),setTransport:ue(e.setTransport.bind(e),"setTransport",oe(e),se(e,["config"])),getIdentity:ue(e.getIdentity.bind(e),"getIdentity",oe(e),se(e,["config"])),setIdentity:ue(e.setIdentity.bind(e),"setIdentity",oe(e),se(e,["config","config.userId","config.deviceId"])),getOptOut:ue(e.getOptOut.bind(e),"getOptOut",oe(e),se(e,["config"])),_setDiagnosticsSampleRate:ue(e._setDiagnosticsSampleRate.bind(e),"_setDiagnosticsSampleRate",oe(e),se(e,["config"]))}},Va=Ha(),za=function(){function e(e){this.amplitude=e,this.videoEl=null,this.embeddedVideoPlayer=null,this.extraEventProperties={},this.listeners=[],this.onRemoveListeners=[]}return e.prototype.withVideoElement=function(e){return this.videoEl=e,this},e.prototype.withEmbeddedPlayer=function(e){return this.embeddedVideoPlayer=e,this},e.prototype.withVendor=function(e){return this.vendor=e,this},e.prototype.withExtraEventProperties=function(e){return this.extraEventProperties=e,this},e.prototype.captureVideoStarted=function(){var e=this;return this.listeners.push(function(t,n){"playing"!==t.playbackState&&"playing"===n.playbackState&&e.amplitude.track("Video Content Started",o(o({},n.lastEvent),e.extraEventProperties))}),this},e.prototype.captureVideoStopped=function(){var e=this;return this.listeners.push(function(t,n){"playing"===t.playbackState&&"playing"!==n.playbackState&&e.amplitude.track("Video Content Stopped",o(o(o({},n.lastEvent),{watch_duration:n.watchTime}),e.extraEventProperties))}),this},e.prototype.start=function(){var e,t=this,n=null!==(e=this.videoEl)&&void 0!==e?e:this.embeddedVideoPlayer;if(!n)throw new Error("Video element not specified. Use withVideoElement() or withEmbeddedPlayer() to specify the video element.");if(this.videoEl&&this.embeddedVideoPlayer)throw new Error("Both video element and embedded video player specified. Use only one of withVideoElement() or withEmbeddedPlayer() to specify the video element.");var r=new qn({videoEl:n,onStateChange:function(e,n){t.listeners.forEach(function(t){return t(e,n)})},vendor:this.vendor,isEmbedded:!!this.embeddedVideoPlayer});return this.onRemoveListeners.push(function(){r.destroy()}),this},e.prototype.stop=function(){this.onRemoveListeners.forEach(function(e){return e()}),this.onRemoveListeners=[]},e}();var Wa=Va.add,$a=Va.extendSession,Ka=Va.flush,Ja=Va.getDeviceId,Ga=Va.getIdentity,Ya=Va.getOptOut,Xa=Va.getSessionId,Qa=Va.getUserId,Za=Va.groupIdentify,es=Va.identify,ts=Va.init,ns=Va.logEvent,rs=Va.remove,is=Va.reset,os=Va.revenue,as=Va.setDeviceId,ss=Va.setGroup,us=Va.setIdentity,cs=Va.setOptOut,ls=Va.setSessionId,ds=Va.setTransport,fs=Va.setUserId,vs=Va.track,ps=Va._setDiagnosticsSampleRate,hs=Object.freeze({__proto__:null,add:Wa,extendSession:$a,flush:Ka,getDeviceId:Ja,getIdentity:Ga,getOptOut:Ya,getSessionId:Xa,getUserId:Qa,groupIdentify:Za,identify:es,init:ts,logEvent:ns,remove:rs,reset:is,revenue:os,setDeviceId:as,setGroup:ss,setIdentity:us,setOptOut:cs,setSessionId:ls,setTransport:ds,setUserId:fs,track:vs,_setDiagnosticsSampleRate:ps,createInstance:Ha,AmplitudeBrowser:Ba,runQueuedFunctions:er,Revenue:J,Identify:M,trackVideo:function(e,t,n){var r;void 0===n&&(n={});var i=new za(e);t instanceof HTMLVideoElement?i.withVideoElement(t):i.withEmbeddedPlayer(t),n.vendor&&i.withVendor(n.vendor);var a=null!==(r=n.extraEventProperties)&&void 0!==r?r:{};try{i.withExtraEventProperties(o({view_session_id:V()}
23,a)).captureVideoStarted().captureVideoStopped().start()}catch(e){return e}return function(){return i.stop()}},Types:Or});!function(e){if(e.scriptUrl){var t=Ge(e.scriptUrl);t&&function(e){var t=B();if(t){var n=Ke();n.includes(e)||(n.push(e),t[$e]=n)}}(t)}}({scriptUrl:function(){if("undefined"==typeof document)return;var e=document.currentScript;if(null==e?void 0:e.src)return e.src;return}()}),function(){var e=B();if(e){var t=function(e){var t=Ha(),n=B();return n&&n.amplitude&&n.amplitude._iq&&e&&(n.amplitude._iq[e]=t),t};if(e.amplitude=Object.assign(e.amplitude||{},hs,{createInstance:t}),e.amplitude.invoked){var n=e.amplitude._q;e.amplitude._q=[],er(hs,n);for(var r=Object.keys(e.amplitude._iq)||[],i=0;i<r.length;i++){var o=r[i],a=Object.assign(e.amplitude._iq[o],t(o)),s=a._q;a._q=[],er(a,s)}}}else console.error("[Amplitude] Error: GlobalScope is not defined")}()}(); 24//# sourceMappingURL=amplitude-min.js.map 25 26var sessionReplay=function(e){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},t(e,r)};function r(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var n,s,o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},o.apply(this,arguments)};function i(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]])}return r}function a(e,t,r,n){return new(r||(r=Promise))(function(s,o){function i(e){try{l(n.next(e))}catch(e){o(e)}}function a(e){try{l(n.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(i,a)}l((n=n.apply(e,t||[])).next())})}function l(e,t){var r,n,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(l){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(s=2&a[0]?n.return:a[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,a[1])).done)return s;switch(n=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]<s[3])){o.label=a[1];break}if(6===a[0]&&o.label<s[1]){o.label=s[1],s=a;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(a);break}s[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=s=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,l])}}}function c(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,s,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}function h(e,t,r){if(r||2===arguments.length)for(var n,s=0,o=t.length;s<o;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))}"function"==typeof SuppressedError&&SuppressedError,function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(n||(n={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(s||(s={}));var d,p="$default_instance",f="https://api2.amplitude.com/2/httpapi";!function(e){e.Unknown="unknown",e.Skipped="skipped",e.Success="success",e.RateLimit="rate_limit",e.PayloadTooLarge="payload_too_large",e.Invalid="invalid",e.Failed="failed",e.Timeout="Timeout",e.SystemError="SystemError"}(d||(d={}));var m,g=function(){var e="ampIntegrationContext";return"undefined"!=typeof globalThis&&void 0!==globalThis[e]?globalThis[e]:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof self?self:"undefined"!=typeof global?global:void 0},v=h([],u(Array(256).keys()),!1).map(function(e){return e.toString(16).padStart(2,"0")}),y=function(e){var t,r=g();if(!(null===(t=null==r?void 0:r.crypto)||void 0===t?void 0:t.getRandomValues))return function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,y)}(e);var n=r.crypto.getRandomValues(new Uint8Array(16));return n[6]=15&n[6]|64,n[8]=63&n[8]|128,h([],u(n.entries()),!1).map(function(e){var t=u(e,2),r=t[0],n=t[1];return[4,6,8,10].includes(r)?"-".concat(v[n]):v[n]}).join("")},w=function(e){return{promise:e||Promise.resolve()}};!function(e){e[e.None=0]="None",e[e.Error=1]="Error",e[e.Warn=2]="Warn",e[e.Verbose=3]="Verbose",e[e.Debug=4]="Debug"}(m||(m={}));var b="Amplitude Logger ",S=function(){function e(){this.logLevel=m.None}return e.prototype.disable=function(){this.logLevel=m.None},e.prototype.enable=function(e){void 0===e&&(e=m.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Verbose||console.log("".concat(b,"[Log]: ").concat(e.join(" ")))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Warn||console.warn("".concat(b,"[Warn]: ").concat(e.join(" ")))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Error||console.error("".concat(b,"[Error]: ").concat(e.join(" ")))},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.logLevel<m.Debug||console.log("".concat(b,"[Debug]: ").concat(e.join(" ")))},e}(),C=function(){return{flushMaxRetries:12,flushQueueSize:200,flushIntervalMillis:1e4,instanceName:p,logLevel:m.Warn,loggerProvider:new S,offline:!1,optOut:!1,serverUrl:f,serverZone:"US",useBatch:!1}},x=function(){function e(e){var t,r,n,s;this._optOut=!1;var o=C();this.apiKey=e.apiKey,this.flushIntervalMillis=null!==(t=e.flushIntervalMillis)&&void 0!==t?t:o.flushIntervalMillis,this.flushMaxRetries=e.flushMaxRetries||o.flushMaxRetries,this.flushQueueSize=e.flushQueueSize||o.flushQueueSize,this.instanceName=e.instanceName||o.instanceName,this.loggerProvider=e.loggerProvider||o.loggerProvider,this.logLevel=null!==(r=e.logLevel)&&void 0!==r?r:o.logLevel,this.minIdLength=e.minIdLength,this.plan=e.plan,this.ingestionMetadata=e.ingestionMetadata,this.offline=void 0!==e.offline?e.offline:o.offline,this.optOut=null!==(n=e.optOut)&&void 0!==n?n:o.optOut,this.serverUrl=e.serverUrl,this.serverZone=e.serverZone||o.serverZone,this.storageProvider=e.storageProvider,this.transportProvider=e.transportProvider,this.useBatch=null!==(s=e.useBatch)&&void 0!==s?s:o.useBatch,this.loggerProvider.enable(this.logLevel);var i=I(e.serverUrl,e.serverZone,e.useBatch);this.serverZone=i.serverZone,this.serverUrl=i.serverUrl}return Object.defineProperty(e.prototype,"optOut",{get:function(){return this._optOut},set:function(e){this._optOut=e}
vendor: 6,239 bytes, line 26
26,enumerable:!1,configurable:!0}),e}(),k=function(e,t){return"EU"===e?t?"https://api.eu.amplitude.com/batch":"https://api.eu.amplitude.com/2/httpapi":t?"https://api2.amplitude.com/batch":f},I=function(e,t,r){if(void 0===e&&(e=""),void 0===t&&(t=C().serverZone),void 0===r&&(r=C().useBatch),e)return{serverUrl:e,serverZone:void 0};var n=["US","EU"].includes(t)?t:C().serverZone;return{serverZone:n,serverUrl:k(n,r)}};var O=function(e,t,r,n,s){return void 0===s&&(s=null),function(){for(var o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=r(),l=a.logger,c=a.logLevel;if(c&&c<m.Debug||!c||!l)return e.apply(s,o);var u,h={type:"invoke public method",name:t,args:o,stacktrace:(u=1,void 0===u&&(u=0),((new Error).stack||"").split("\n").slice(2+u).map(function(e){return e.trim()})),time:{start:(new Date).toISOString()},states:{}};n&&h.states&&(h.states.before=n());var d=e.apply(s,o);return d&&d.promise?d.promise.then(function(){n&&h.states&&(h.states.after=n()),h.time&&(h.time.end=(new Date).toISOString()),l.debug(JSON.stringify(h,null,2))}):(n&&h.states&&(h.states.after=n()),h.time&&(h.time.end=(new Date).toISOString()),l.debug(JSON.stringify(h,null,2))),d}},E=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:M(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),M=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},R=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach(function(t){e(t)}),this.queue=[])},e}(),P=function(){return P=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},P.apply(this,arguments)};function T(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function A(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,s,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}"function"==typeof SuppressedError&&SuppressedError;var N=function(e,t){var r,n,s=typeof e;if(s!==typeof t)return!1;try{for(var o=T(["string","number","boolean","undefined"]),i=o.next();!i.done;i=o.next()){if(i.value===s)return e===t}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}if(null==e&&null==t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;var a=Array.isArray(e),l=Array.isArray(t);if(a!==l)return!1;if(!a||!l){var c=Object.keys(e).sort(),u=Object.keys(t).sort();if(!N(c,u))return!1;var h=!0;return Object.keys(e).forEach(function(r){N(e[r],t[r])||(h=!1)}),h}for(var d=0;d<e.length;d++)if(!N(e[d],t[d]))return!1;return!0};Object.entries||(Object.entries=function(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n});var L=function(){function e(){this.identity={userProperties:{}},this.listeners=new Set}return e.prototype.editIdentity=function(){var e=this,t=P({},this.identity.userProperties),r=P(P({},this.identity),{userProperties:t});return{setUserId:function(e){return r.userId=e,this},setDeviceId:function(e){return r.deviceId=e,this},setUserProperties:function(e){return r.userProperties=e,this},setOptOut:function(e){return r.optOut=e,this},updateUserProperties:function(e){var t,n,s,o,i,a,l=r.userProperties||{};try{for(var c=T(Object.entries(e)),u=c.next();!u.done;u=c.next()){var h=A(u.value,2),d=h[0],p=h[1];switch(d){case"$set":try{for(var f=(s=void 0,T(Object.entries(p))),m=f.next();!m.done;m=f.next()){var g=A(m.value,2),v=g[0],y=g[1];l[v]=y}}catch(e){s={error:e}}finally{try{m&&!m.done&&(o=f.return)&&o.call(f)}finally{if(s)throw s.error}}break;case"$unset":try{for(var w=(i=void 0,T(Object.keys(p))),b=w.next();!b.done;b=w.next()){delete l[v=b.value]}}catch(e){i={error:e}}finally{try{b&&!b.done&&(a=w.return)&&a.call(w)}finally{if(i)throw i.error}}break;case"$clearAll":l={}}}}catch(e){t={error:e}}finally{try{u&&!u.done&&(n=c.return)&&n.call(c)}finally{if(t)throw t.error}}return r.userProperties=l,this},commit:function(){return e.setIdentity(r),this}}},e.prototype.getIdentity=function(){return P({},this.identity)},e.prototype.setIdentity=function(e){var t=P({},this.identity);this.identity=P({},e),N(t,this.identity)||this.listeners.forEach(function(t){t(e)})},e.prototype.addIdentityListener=function(e){this.listeners.add(e)},e.prototype.removeIdentityListener=function(e){this.listeners.delete(e)},e}(),_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:self,D=function(){function e(){this.identityStore=new L,this.eventBridge=new R,this.applicationContextProvider=new E}return e.getInstance=function(t){return _.analyticsConnectorInstances||(_.analyticsConnectorInstances={}),_.analyticsConnectorInstances[t]||(_.analyticsConnectorInstances[t]=new e),_.analyticsConnectorInstances[t]},e}(),F=function(e){var t=0;if(0===e.length)return t;for(var r=0;r<e.length;r++){t=(t<<5)-t+e.charCodeAt(r),t|=0}return t},U=function(){function e(){}return e.prototype.send=function(e,t,r){return Promise.resolve(null)},e.prototype.buildResponse=function(e){var t,r,n,s,o,i,a,l,c,u,h,p,f,m,g,v,y,w,b,S,C,x;if("object"!=typeof e)return null;var k=e.code||0,I=this.buildStatus(k);switch(I){case d.Success:return{status:I,statusCode:k,body:{eventsIngested:null!==(t=e.events_ingested)&&void 0!==t?t:0,payloadSizeBytes:null!==(r=e.payload_size_bytes)&&void 0!==r?r:0,serverUploadTime:null!==(n=e.server_upload_time)&&void 0!==n?n:0}};case d.Invalid:return{status:I,statusCode:k,body:{error:null!==(s=e.error)&&void 0!==s?s:"",missingField:null!==(o=e.missing_field)&&void 0!==o?o:"",eventsWithInvalidFields:null!==(i=e.events_with_invali
vendor: 5,844 bytes, line 26
26d_fields)&&void 0!==i?i:{},eventsWithMissingFields:null!==(a=e.events_with_missing_fields)&&void 0!==a?a:{},eventsWithInvalidIdLengths:null!==(l=e.events_with_invalid_id_lengths)&&void 0!==l?l:{},epsThreshold:null!==(c=e.eps_threshold)&&void 0!==c?c:0,exceededDailyQuotaDevices:null!==(u=e.exceeded_daily_quota_devices)&&void 0!==u?u:{},silencedDevices:null!==(h=e.silenced_devices)&&void 0!==h?h:[],silencedEvents:null!==(p=e.silenced_events)&&void 0!==p?p:[],throttledDevices:null!==(f=e.throttled_devices)&&void 0!==f?f:{},throttledEvents:null!==(m=e.throttled_events)&&void 0!==m?m:[]}};case d.PayloadTooLarge:return{status:I,statusCode:k,body:{error:null!==(g=e.error)&&void 0!==g?g:""}};case d.RateLimit:return{status:I,statusCode:k,body:{error:null!==(v=e.error)&&void 0!==v?v:"",epsThreshold:null!==(y=e.eps_threshold)&&void 0!==y?y:0,throttledDevices:null!==(w=e.throttled_devices)&&void 0!==w?w:{},throttledUsers:null!==(b=e.throttled_users)&&void 0!==b?b:{},exceededDailyQuotaDevices:null!==(S=e.exceeded_daily_quota_devices)&&void 0!==S?S:{},exceededDailyQuotaUsers:null!==(C=e.exceeded_daily_quota_users)&&void 0!==C?C:{},throttledEvents:null!==(x=e.throttled_events)&&void 0!==x?x:[]}};case d.Timeout:default:return{status:I,statusCode:k}}},e.prototype.buildStatus=function(e){return function(e){return e>=200&&e<300}(e)?d.Success:429===e?d.RateLimit:413===e?d.PayloadTooLarge:408===e?d.Timeout:e>=400&&e<500?d.Invalid:e>=500?d.Failed:d.Unknown},e}(),B=function(e){function t(t){void 0===t&&(t={});var r=e.call(this)||this;return r.customHeaders=t,r}return r(t,e),t.prototype.send=function(e,t){return a(this,void 0,void 0,function(){var r,n,s;return l(this,function(i){switch(i.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return r={headers:o({"Content-Type":"application/json",Accept:"*/*"},this.customHeaders),body:JSON.stringify(t),method:"POST"},[4,fetch(e,r)];case 1:return[4,(n=i.sent()).text()];case 2:s=i.sent();try{return[2,this.buildResponse(JSON.parse(s))]}catch(e){return[2,this.buildResponse({code:n.status})]}return[2]}})})},t}(U),j=function(){function e(e,t){this.key="AMP_remote_config_".concat(e.substring(0,10)),this.logger=t}return e.prototype.fetchConfig=function(){var e=null,t={remoteConfig:null,lastFetch:new Date};try{e=localStorage.getItem(this.key)}catch(e){return this.logger.debug("Remote config localstorage failed to access: ",e),Promise.resolve(t)}if(null===e)return this.logger.debug("Remote config localstorage gets null because the key does not exist"),Promise.resolve(t);try{var r=JSON.parse(e);return this.logger.debug("Remote config localstorage parsed successfully: ".concat(JSON.stringify(r))),Promise.resolve({remoteConfig:r.remoteConfig,lastFetch:new Date(r.lastFetch)})}catch(e){return this.logger.debug("Remote config localstorage failed to parse: ",e),localStorage.removeItem(this.key),Promise.resolve(t)}},e.prototype.setConfig=function(e){try{return localStorage.setItem(this.key,JSON.stringify(e)),this.logger.debug("Remote config localstorage set successfully."),Promise.resolve(!0)}catch(e){this.logger.debug("Remote config localstorage failed to set: ",e)}return Promise.resolve(!1)},e}();var z,W=401,q=403,$=429,V=function(){function e(e,t,r,n,s){void 0===r&&(r="US"),this.callbackInfos=[],this.lastSuccessfulFetch=null,this.fetchPromise=null,this.isLastFetchInvalidApiKey=!1,this.apiKey=e,this.serverUrl=n||("US"===r?"https://sr-client-cfg.amplitude.com/config":"https://sr-client-cfg.eu.amplitude.com/config"),this.logger=t,this.storage=new j(e,t),this.customFetch=s}return e.prototype.subscribe=function(e,t,r){var n=y(),s={id:n,key:e,deliveryMode:t,callback:r};return this.callbackInfos.push(s),"all"===t?this.subscribeAll(s):this.subscribeWaitForRemote(s,t.timeout),n},e.prototype.unsubscribe=function(e){var t=this.callbackInfos.findIndex(function(t){return t.id===e});return-1===t?(this.logger.debug("Remote config client unsubscribe failed because callback with id ".concat(e," doesn't exist.")),!1):(this.callbackInfos.splice(t,1),this.logger.debug("Remote config client unsubscribe succeeded removing callback with id ".concat(e,".")),!0)},e.prototype.updateConfigs=function(){return a(this,void 0,void 0,function(){var e,t=this;return l(this,function(r){switch(r.label){case 0:return this.lastSuccessfulFetch&&Date.now()-this.lastSuccessfulFetch<3e5?(this.logger.debug("Remote config client skipping updateConfigs: Too recent"),[2]):[4,this.getOrCreateFetchPromise()];case 1:return e=r.sent(),this.storage.setConfig(e),this.callbackInfos.forEach(function(r){t.sendCallback(r,e,"remote")}),[2]}})})},e.prototype.getOrCreateFetchPromise=function(){var e=this;return this.fetchPromise?this.fetchPromise:this.isLastFetchInvalidApiKey?(this.logger.debug("Remote config client skipping fetch: Invalid API key"),this.fetchPromise=Promise.resolve({remoteConfig:null,lastFetch:new Date}).finally(function(){e.fetchPromise=null}),this.fetchPromise):(this.fetchPromise=this.fetch().then(function(t){return null!==t.remoteConfig&&(e.lastSuccessfulFetch=Date.now()),t}).finally(function(){e.fetchPromise=null}),this.fetchPromise)},e.prototype.subscribeAll=function(e){return a(this,void 0,void 0,function(){var t,r,n,s=this;return l(this,function(o){switch(o.label){case 0:return t=this.getOrCreateFetchPromise().then(function(t){s.logger.debug("Remote config client subscription all mode fetched from remote: ".concat(JSON.stringify(t))),s.sendCallback(e,t,"remote"),s.storage.setConfig(t)}),r=this.storage.fetchConfig().then(function(e){return e}),[4,Promise.race([t,r])];case 1:return void 0!==(n=o.sent())&&(this.logger.debug("Remote config client subscription all mode fetched from cache: ".concat(JSON.stringify(n))),null!==n.remoteConfig?this.sendCallback(e,n,"cache"):this.logger.debug("Remote config client skips sending c
26allback because cache is empty (first time user).")),[4,t];case 2:return o.sent(),[2]}})})},e.prototype.subscribeWaitForRemote=function(e,t){return a(this,void 0,void 0,function(){var r,n;return l(this,function(s){switch(s.label){case 0:r=new Promise(function(e,r){setTimeout(function(){r("Timeout exceeded")},t)}),s.label=1;case 1:return s.trys.push([1,3,,5]),[4,Promise.race([this.getOrCreateFetchPromise(),r])];case 2:return n=s.sent(),this.logger.debug("Remote config client subscription wait for remote mode returns from remote."),this.sendCallback(e,n,"remote"),this.storage.setConfig(n),[3,5];case 3:return s.sent(),this.logger.debug("Remote config client subscription wait for remote mode exceeded timeout. Try to fetch from cache."),[4,this.storage.fetchConfig()];case 4:return null!==(n=s.sent()).remoteConfig?(this.logger.debug("Remote config client subscription wait for remote mode returns a cached copy."),this.sendCallback(e,n,"cache")):(this.logger.debug("Remote config client subscription wait for remote mode failed to fetch cache."),this.sendCallback(e,n,"remote")),[3,5];case 5:return[2]}})})},e.prototype.sendCallback=function(e,t,r){var n;e.lastCallback=new Date,n=e.key?e.key.split(".").reduce(function(e,t){return null===e?e:t in e?e[t]:null},t.remoteConfig):t.remoteConfig,e.callback(n,r,t.lastFetch)},e.prototype.fetch=function(e,t){return void 0===e&&(e=3),void 0===t&&(t=1e3),a(this,void 0,void 0,function(){var r,n,s,o,i,a,c=this;return l(this,function(u){switch(u.label){case 0:r=t/e,n={remoteConfig:null,lastFetch:new Date},s=function(n){var s,i,a,u,h,d,p,f,m;return l(this,function(l){switch(l.label){case 0:s=!0,i=new AbortController,a=setTimeout(function(){return i.abort()},t),l.label=1;case 1:return l.trys.push([1,10,11,12]),u=o.getUrlParams(),h={Accept:"*/*"},o.customFetch?[4,(g=o.customFetch({url:u,method:"GET",headers:h,signal:i.signal}),v=i.signal,new Promise(function(e,t){var r=function(){var e=new Error("Remote config custom fetch aborted by timeout");e.name="AbortError",t(e)};v.addEventListener("abort",r,{once:!0}),g.then(function(t){v.removeEventListener("abort",r),e(t)},function(e){v.removeEventListener("abort",r),t(e)})}))]:[3,3];case 2:return p=l.sent(),[3,5];case 3:return[4,fetch(u,{method:"GET",headers:h,signal:i.signal})];case 4:p=l.sent(),l.label=5;case 5:return(d=p).ok||d.status>=200&&d.status<300?[3,7]:[4,d.text()];case 6:return f=l.sent(),o.logger.debug("Remote config client fetch with retry time ".concat(e," failed with ").concat(d.status,": ").concat(f)),d.status===W||d.status===q?(o.logger.error("Remote config client fetch failed with ".concat(d.status,". Invalid API key; future fetches will be skipped.")),o.isLastFetchInvalidApiKey=!0,s=!1):d.status>=400&&d.status<500&&d.status!==$&&(s=!1),[3,9];case 7:return[4,d.json()];case 8:return[2,{value:{remoteConfig:l.sent(),lastFetch:new Date}}];case 9:return[3,12];case 10:return(m=l.sent())instanceof Error&&"AbortError"===m.name?o.logger.debug("Remote config client fetch with retry time ".concat(e," timed out after ").concat(t,"ms")):o.logger.debug("Remote config client fetch with retry time ".concat(e," is rejected because: "),m),[3,12];case 11:return clearTimeout(a),[7];case 12:return s?n<e-1?[4,new Promise(function(e){return setTimeout(e,c.getJitterDelay(r))})]:[3,14]:[2,"break"];case 13:l.sent(),l.label=14;case 14:return[2]}var g,v})},o=this,i=0,u.label=1;case 1:return i<e?[5,s(i)]:[3,4];case 2:if("object"==typeof(a=u.sent()))return[2,a.value];if("break"===a)return[3,4];u.label=3;case 3:return i++,[3,1];case 4:return[2,n]}})})},e.prototype.getJitterDelay=function(e){return Math.floor(Math.random()*e)},e.prototype.getUrlParams=function(){var t=encodeURIComponent(this.apiKey),r=new URLSearchParams;return r.append("config_group",e.CONFIG_GROUP),"".concat(this.serverUrl,"/").concat(t,"?").concat(r.toString())},e.CONFIG_GROUP="browser",e}();!function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(z||(z={}));var G,H="https://app.amplitude.com",J={US:H,EU:"https://app.eu.amplitude.com",STAGING:"https://apps.stag2.amplitude.com"};var K="__AMPLITUDE_MESSENGER_INSTANCE__",Y="__AMPLITUDE_MESSENGER__",Q=function(){function e(e){var t=(void 0===e?{}:e).origin,r=void 0===t?H:t;this[G]=!0,this.isSetup=!1,this.messageHandler=null,this.requestCallbacks={},this.actionHandlers=new Map,this.pendingMessages=new Map,this.scriptLoadPromises=new Map,this.endpoint=r}return e.prototype.notify=function(e){var t,r,n,s;null===(r=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Message sent: ",JSON.stringify(e)),null===(s=null===(n=window.opener)||void 0===n?void 0:n.postMessage)||void 0===s||s.call(n,e,this.endpoint)},e.prototype.sendRequest=function(e,t,r){var n=this;void 0===r&&(r={timeout:15e3});var s="".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9)),o={id:s,action:e,args:t};return new Promise(function(t,i){n.requestCallbacks[s]={resolve:t,reject:i},n.notify(o),r.timeout>0&&setTimeout(function(){i(new Error("".concat(e," timed out (id: ").concat(s,")"))),delete n.requestCallbacks[s]},r.timeout)})},e.prototype.handleResponse=function(e){var t;this.requestCallbacks[e.id]?(this.requestCallbacks[e.id].resolve(e.responseData),delete this.requestCallbacks[e.id]):null===(t=this.logger)||void 0===t||t.warn("No callback found for request id: ".concat(e.id))},e.prototype.registerActionHandler=function(e,t){var r,n,s,o;this.actionHandlers.has(e)&&(null===(o=null===(s=this.logger)||void 0===s?void 0:s.warn)||void 0===o||o.call(s,"Overwriting existing action handler for: ".concat(e))),this.actionHandlers.set(e,t);var i=this.pendingMessages.get(e);if(i){this.pendingMessages.delete(e);try{for(var a=c(i),l=a.next();!l.done;l=a.next()){t(l.value)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}}},e.prototype.loadScriptOnce=function(e){return a(this,void 0,void 0,function(){var t,r,n;return l(this,function(s){switch(s.label){case 0:if(t=this.scriptLoadPromises.get(e))return[2,t];r=function(e){return document.querySelector('script[src="'.concat(CSS.escape(e),'"]'))?Promise.resolve({status:!0}):new Promise(function(t,r){var n;try{var s=document.createElement("script");s.type="text/javascript",s.async=!0,s.src=e,s.addEventListener("load",function(){t({status:!0})},{once:!0}),s.addEventListener("error",function(){r({status:!1,message:"Failed to load the script ".concat(e)})}),null===(n=document.head)||void 0===n||n.appendChild(s)}catch(e){r(e)}})}(e).then(function(){}),this.scriptLoadPromises.set(e,r),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,r];case 2:return s.sent(),[3,4];case 3:throw n=s.sent(),this.scriptLoadPromises.delete(e),n;case 4:return[2]}})})},e.prototype.setup=function(e){var t,r,n=this,s=void 0===e?{}:e,o=s.logger,i=s.endpoint;o&&(this.logger=o),i&&this.endpoint===H&&(this.endpoint=i),this.isSetup||(this.isSetup=!0,null===(r=null===(t=this.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Setting up messenger"),this.messageHandler=function(e){var t,r,s,o,i;if(null===(r=null===(t=n.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Message received: ",JSON.stringify(e)),n.endpoint===e.origin){var a=e.data,l=null==a?void 0:a.action;if(l)if("id"in a&&a.id)null===(o=null===(s=n.logger)||void 0===s?void 0:s.debug)||void 0===o||o.call(s,"Received Response to previous request: ",JSON.stringify(e)),n.handleResponse(a
26);else{if("ping"===l)return void n.notify({action:"pong"});var c=n.actionHandlers.get(l);if(c)c(a.data);else{var u=null!==(i=n.pendingMessages.get(l))&&void 0!==i?i:[];u.push(a.data),n.pendingMessages.set(l,u)}}}},window.addEventListener("message",this.messageHandler),this.notify({action:"page-loaded"}))},e.prototype.destroy=function(){this.messageHandler&&(window.removeEventListener("message",this.messageHandler),this.messageHandler=null),this.isSetup=!1,this.actionHandlers.clear(),this.pendingMessages.clear(),this.requestCallbacks={},this.scriptLoadPromises.clear();var e=g();(null==e?void 0:e[Y])===this&&delete e[Y]},e}();function X(e){var t,r=g(),n=null==r?void 0:r[Y];if("object"==typeof(t=n)&&null!==t&&K in t&&!0===t[K])return n;var s=new Q(e);return r&&(r[Y]=s),s}G=K;var Z="__AMPLITUDE_BACKGROUND_CAPTURE__";var ee,te="[Amplitude]",re="".concat(te," Session Replay ID"),ne=z.US,se={enabled:!0},oe=1e3,ie="".concat(te," Session Replay Debug"),ae="amp-mask",le="amp-unmask",ce="https://api-sr.amplitude.com/sessions/v2/track",ue="https://api-sr.eu.amplitude.com/sessions/v2/track",he="https://api-sr.stag2.amplitude.com/sessions/v2/track",de=9e6,pe=/payload.*exceed/i,fe=500,me=1e4,ge=1024,ve="X-Session-Replay-Event-Skipped",ye="amplitude-sr-iframe";!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision",e.REPLAY_GATE_DECISION="replay-gate-decision"}(ee||(ee={}));var we=function(){function e(e){this.logger=e,this.log=this.getSafeMethod("log"),this.warn=this.getSafeMethod("warn"),this.error=this.getSafeMethod("error"),this.debug=this.getSafeMethod("debug")}return e.prototype.getSafeMethod=function(e){var t;if(!this.logger)return function(){};var r=this.logger[e];return"function"==typeof r?(null!==(t=r.__rrweb_original__)&&void 0!==t?t:r).bind(this.logger):function(){}},e.prototype.enable=function(e){this.logger.enable(e)},e.prototype.disable=function(){this.logger.disable()},e}(),be="medium";function Se(e,t){return t||("STAGING"===e?he:"EU"===e?ue:ce)}var Ce=function(e,t,r){switch(t){case"light":if("input"!==e)return!1;var n=r?function(e){var t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?t.toLowerCase():null}(r):"";return!!n&&(!!["password","hidden","email","tel"].includes(n)||!!r.autocomplete.startsWith("cc-"));case"medium":return"input"===e;case"conservative":return!0;default:return Ce(e,be,r)}},xe=function(e,t){var r,n,s;if(e&&t.urlMaskLevels)try{for(var o=c(t.urlMaskLevels),i=o.next();!i.done;i=o.next()){var a=i.value;if(Re(a.match).test(e))return a.maskLevel}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null!==(s=t.defaultMaskLevel)&&void 0!==s?s:be},ke=function(e,t,r,n){var s,o;if(void 0===t&&(t={defaultMaskLevel:be}),r){if(r.closest("."+ae))return!0;var i=(null!==(s=t.maskSelector)&&void 0!==s?s:[]).some(function(e){return r.closest(e)});if(i)return!0;if(r.closest("."+le))return!1;var a=(null!==(o=t.unmaskSelector)&&void 0!==o?o:[]).some(function(e){return r.closest(e)});if(a)return!1}return Ce(e,xe(n,t),r)},Ie=function(e,t,r){return function(n,s){return ke(e,t,s,null==r?void 0:r())?n.replace(/[^\s]/g,"*"):n}},Oe=function(e,t){return function(r,n,s){var o;if("style"===r)return n;if(!(null!==(o=null==e?void 0:e.maskAttributes)&&void 0!==o?o:[]).includes(r))return n;var i=["INPUT","SELECT","TEXTAREA"].includes(s.tagName)?"input":"text";return ke(i,e,s,null==t?void 0:t())?n.replace(/[^\s]/g,"*"):n}},Ee=function(){var e=g();return(null==e?void 0:e.location)?e.location.href:""},Me=new Map,Re=function(e){var t=Me.get(e);if(t)return t;var r="\0TRAIL\0",n="\0MID\0",s="\0DS\0",o="\0ST\0",i="\0QU\0",a=e;a=(a=(a=(a=(a=(a=(a=(a=(a=(a=(a=a.replace(/\/\*\*$/,r)).replace(/\/\*\*\//g,n)).replace(/\*\*/g,s)).replace(/\*/g,o)).replace(/\?/g,i)).replace(/[.+^${}()|[\]\\]/g,"\\$&")).split(r).join("(/.*)?")).split(n).join("/(.*\\/)?")).split(s).join(".*")).split(o).join(".*")).split(i).join(".");var l=new RegExp("^".concat(a,"$"));return Me.set(e,l),l},Pe=function(e,t){var r,n;try{for(var s=c(t),o=s.next();!o.done;o=s.next()){var i=o.value,a=Re(i.selector);if(a.test(e))return e.replace(a,i.replacement)}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return e},Te=function(){return a(void 0,void 0,void 0,function(){var e,t,r,n,s,o,i;return l(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),(e=g())?[4,e.navigator.storage.estimate()]:[3,2];case 1:return t=a.sent(),r=t.usage,n=t.quota,s=t.usageDetails,o=r?Math.round(r/ge):0,i=r&&n?Math.round(1e3*(r/n+Number.EPSILON))/1e3:0,[2,{totalStorageSize:o,percentOfQuota:i,usageDetails:JSON.stringify(s)}];case 2:return[3,4];case 3:return a.sent(),[3,4];case 4:return[2,{totalStorageSize:0,percentOfQuota:0,usageDetails:""}]}})})},Ae=function(e){var t=o({},e),r=t.apiKey;return t.apiKey="****".concat(r.substring(r.length-4)),t},Ne=function(){return{flushMaxRetries:2,logLevel:m.Warn,loggerProvider:new S,transportProvider:new B}},Le=function(e){function t(t,r){var n,s,i,a,l,c,d,p,f,m,g,v,y,w,b=this,S=Ne();(b=e.call(this,o(o({transportProvider:S.transportProvider,loggerProvider:new we(r.loggerProvider||S.loggerProvider)},r),{apiKey:t}))||this).flushMaxRetries=void 0!==r.flushMaxRetries&&r.flushMaxRetries<=S.flushMaxRetries?r.flushMaxRetries:S.flushMaxRetries,b.apiKey=t,b.sampleRate=r.sampleRate||0,b.serverZone=r.serverZone||ne,b.configServerUrl=r.configServerUrl,b.trackServerUrl=r.trackServerUrl,b.shouldInlineStylesheet=r.shouldInlineStylesheet,b.version=r.version,b.performanceConfig=r.performanceConfig||se,b.storeType=null!==(n=r.storeType)&&void 0!==n?n:"memory",b.applyBackgroun
26dColorToBlockedElements=null!==(s=r.applyBackgroundColorToBlockedElements)&&void 0!==s&&s,b.enableUrlChangePolling=null!==(i=r.enableUrlChangePolling)&&void 0!==i&&i,b.urlChangePollingInterval=null!==(a=r.urlChangePollingInterval)&&void 0!==a?a:oe,b.captureDocumentTitle=null!==(l=r.captureDocumentTitle)&&void 0!==l&&l,void 0!==r.fullSnapshotIntervalMs&&(b.fullSnapshotIntervalMs=r.fullSnapshotIntervalMs),void 0!==r.eagerFullSnapshotSend&&(b.eagerFullSnapshotSend=r.eagerFullSnapshotSend),b.captureFullSnapshotOnFocus=null!==(c=r.captureFullSnapshotOnFocus)&&void 0!==c&&c,void 0!==r.maxPersistedEventsSizeBytes&&(b.maxPersistedEventsSizeBytes=Be(r.maxPersistedEventsSizeBytes,De,Fe,"maxPersistedEventsSizeBytes",b.loggerProvider)),void 0!==r.maxSingleEventSizeBytes&&(b.maxSingleEventSizeBytes=Be(r.maxSingleEventSizeBytes,De,Ue,"maxSingleEventSizeBytes",b.loggerProvider)),b.privacyConfig=o(o({},null!==(d=r.privacyConfig)&&void 0!==d?d:{}),{unmaskSelector:Array.from(new Set(h([".".concat(le)],u(null!==(f=null===(p=r.privacyConfig)||void 0===p?void 0:p.unmaskSelector)&&void 0!==f?f:[]),!1)))}),r.interactionConfig&&(b.interactionConfig=r.interactionConfig,b.interactionConfig.ugcFilterRules&&function(e){if(!e.every(function(e){return"string"==typeof e.selector&&"string"==typeof e.replacement}))throw new Error("ugcFilterRules must be an array of objects with selector and replacement properties");if(!e.every(function(e){return"string"==typeof(t=e.selector)&&""!==t.trim()&&!!/^\/|^https?:\/\/[^\s]+$/.test(t);var t}))throw new Error("ugcFilterRules must be an array of objects with valid globs")}(b.interactionConfig.ugcFilterRules)),r.debugMode&&(b.debugMode=r.debugMode);var C=r;return b.useWebWorker=null===(v=null!==(m=r.useWebWorker)&&void 0!==m?m:null===(g=C.experimental)||void 0===g?void 0:g.useWebWorker)||void 0===v||v,b.enableTransportCompression=null===(y=r.enableTransportCompression)||void 0===y||y,b.sendTimeoutMs=r.sendTimeoutMs,b.captureAdoptedStyleSheets=null===(w=r.captureAdoptedStyleSheets)||void 0===w||w,r.crossOriginIframes&&(b.crossOriginIframes=r.crossOriginIframes),r.flushIntervalConfig?b.flushIntervalConfig=function(e,t){var r,n,s={};void 0!==e.minIntervalMs&&(!Number.isFinite(e.minIntervalMs)||e.minIntervalMs<_e?(t.warn("flushIntervalConfig.minIntervalMs ".concat(e.minIntervalMs," is below floor ").concat(_e,"ms; clamping.")),s.minIntervalMs=_e):s.minIntervalMs=e.minIntervalMs);void 0!==e.maxIntervalMs&&(Number.isNaN(e.maxIntervalMs)||e.maxIntervalMs<_e?(t.warn("flushIntervalConfig.maxIntervalMs ".concat(e.maxIntervalMs," is below floor ").concat(_e,"ms; clamping.")),s.maxIntervalMs=_e):s.maxIntervalMs=e.maxIntervalMs);if(void 0!==s.minIntervalMs||void 0!==s.maxIntervalMs){var o=null!==(r=s.minIntervalMs)&&void 0!==r?r:fe,i=null!==(n=s.maxIntervalMs)&&void 0!==n?n:me;i<o&&(void 0===s.maxIntervalMs?(t.warn("flushIntervalConfig.minIntervalMs (".concat(o,") exceeds the default maxIntervalMs (").concat(me,"); raising max to match min.")),s.maxIntervalMs=o):void 0===s.minIntervalMs?(t.warn("flushIntervalConfig.maxIntervalMs (".concat(i,") is below the default minIntervalMs (").concat(fe,"); lowering min to match max.")),s.minIntervalMs=i):(t.warn("flushIntervalConfig.maxIntervalMs (".concat(s.maxIntervalMs,") is less than minIntervalMs (").concat(s.minIntervalMs,"); raising max to match min.")),s.maxIntervalMs=s.minIntervalMs))}return s}(r.flushIntervalConfig,b.loggerProvider):b.flushIntervalConfig={minIntervalMs:1e3,maxIntervalMs:1e4},b.handleSendEvents=r.handleSendEvents,b.handleFetchConfig=r.handleFetchConfig,b}return r(t,e),t}(x),_e=100,De=1e3,Fe=8e6,Ue=1e7;function Be(e,t,r,n,s){if(Number.isFinite(e))return e<t?(s.warn("".concat(n," ").concat(e," is below floor ").concat(t,"; clamping.")),t):e>r?(s.warn("".concat(n," ").concat(e," exceeds ceiling ").concat(r,"; clamping.")),r):e;s.warn("".concat(n," value is not a finite number (got ").concat(String(e),"); ignoring."))}var je=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(je||{}),ze=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ze||{}),We=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(We||{}),qe=function(){function e(e,t){this.localConfig=t,this.remoteConfigClient=e}return e.prototype.generateJoinedConfig=function(){var e,t,r,n,s,i,d;return a(this,void 0,void 0,function(){var a,p,f,m,g,v,y,w,b,S,C,x,k,I,O,E,M,R=this;return l(this,function(l){switch(l.label){case 0:(a=o({},this.localConfig)).optOut=this.localConfig.optOut,a.captureEnabled=!0,l.label=1;case 1:return l.trys.push([1,3,,4]),[4,new Promise(function(e,t){R.remoteConfigClient.subscribe("configs.sessionReplay",{timeout:1500},function(r,n){var s;if(R.localConfig.loggerProvider.debug("Session Replay remote configuration received from ".concat(n,":"),JSON.stringify(r,null,2)),r){var o=r,i=o.sr_sampling_config,l=o.sr_privacy_config,c=o.sr_targeting_config,u=null===(s=a.interactionConfig)||void 0===s?void 0:s.ugcFilterRules;a.interactionConfig=o.sr_interaction_config,a.interactionConfig&&u&&(
26a.interactionConfig.ugcFilterRules=u),a.loggingConfig=o.sr_logging_config,(i||l||c)&&(p={},i&&(p.sr_sampling_config=i),l&&(p.sr_privacy_config=l),c&&(p.sr_targeting_config=c)),e()}else t(new Error("No remote config received"))})})];case 2:return l.sent(),[3,4];case 3:return f=l.sent(),this.localConfig.loggerProvider.error("Failed to generate joined config: ",f),a.captureEnabled=!1,[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:void 0}];case 4:if(!p)return[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:p}];if(m=p.sr_sampling_config,g=p.sr_privacy_config,v=p.sr_targeting_config,m&&Object.keys(m).length>0?(Object.prototype.hasOwnProperty.call(m,"capture_enabled")?a.captureEnabled=m.capture_enabled:a.captureEnabled=!1,Object.prototype.hasOwnProperty.call(m,"sample_rate")&&(a.sampleRate=m.sample_rate),Object.prototype.hasOwnProperty.call(m,"min_session_duration_ms")&&(a.minSessionDurationMs=this.sanitizeMinSessionDurationMs(m.min_session_duration_ms))):(a.captureEnabled=!0,this.localConfig.loggerProvider.debug("Remote config successfully fetched, but no values set for project, Session Replay capture enabled.")),g){y=null!==(e=a.privacyConfig)&&void 0!==e?e:{},w={defaultMaskLevel:null!==(r=null!==(t=g.defaultMaskLevel)&&void 0!==t?t:y.defaultMaskLevel)&&void 0!==r?r:"medium",blockSelector:[],maskSelector:[],unmaskSelector:[],maskAttributes:h([],u(new Set(h(h([],u(null!==(n=y.maskAttributes)&&void 0!==n?n:[]),!1),u(null!==(s=g.maskAttributes)&&void 0!==s?s:[]),!1))),!1),urlMaskLevels:h(h([],u(null!==(i=g.urlMaskLevels)&&void 0!==i?i:[]),!1),u(null!==(d=y.urlMaskLevels)&&void 0!==d?d:[]),!1)},b=function(e){var t,r,n,s,o,i,a,l,u,h={};"string"==typeof e.blockSelector&&(e.blockSelector=[e.blockSelector]);try{for(var d=c(null!==(a=e.blockSelector)&&void 0!==a?a:[]),p=d.next();!p.done;p=d.next()){h[p.value]="block"}}catch(e){t={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(t)throw t.error}}try{for(var f=c(null!==(l=e.maskSelector)&&void 0!==l?l:[]),m=f.next();!m.done;m=f.next()){h[m.value]="mask"}}catch(e){n={error:e}}finally{try{m&&!m.done&&(s=f.return)&&s.call(f)}finally{if(n)throw n.error}}try{for(var g=c(null!==(u=e.unmaskSelector)&&void 0!==u?u:[]),v=g.next();!v.done;v=g.next()){h[v.value]="unmask"}}catch(e){o={error:e}}finally{try{v&&!v.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}return h},S=o(o({},b(y)),b(g));try{for(C=c(Object.entries(S)),x=C.next();!x.done;x=C.next())k=u(x.value,2),I=k[0],"mask"===(O=k[1])?w.maskSelector.push(I):"block"===O?w.blockSelector.push(I):"unmask"===O&&w.unmaskSelector.push(I)}catch(e){E={error:e}}finally{try{x&&!x.done&&(M=C.return)&&M.call(C)}finally{if(E)throw E.error}}a.privacyConfig=(P=w,T=this.localConfig.loggerProvider,A=document.createDocumentFragment(),N=function(e){if(void 0===e&&(e=[]),"string"==typeof e&&(e=[e]),e=e.filter(function(e){try{A.querySelector(e)}catch(t){return T.warn('[session-replay-browser] omitting selector "'.concat(e,'" because it is invalid')),!1}return!0}),0!==e.length)return e},P.blockSelector=N(P.blockSelector),P.maskSelector=N(P.maskSelector),P.unmaskSelector=N(P.unmaskSelector),P)}return v&&Object.keys(v).length>0&&(a.targetingConfig=v),this.localConfig.loggerProvider.debug(JSON.stringify({name:"session replay joined config",config:Ae(a)},null,2)),[2,{localConfig:this.localConfig,joinedConfig:a,remoteConfig:p}]}var P,T,A,N})})},e.prototype.sanitizeMinSessionDurationMs=function(e){if("number"==typeof e&&Number.isFinite(e)){if(!(e<0))return e>$e?(this.localConfig.loggerProvider.warn("min_session_duration_ms remote value ".concat(e," exceeds ").concat($e,"ms ceiling; clamping.")),$e):e;this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is negative (".concat(e,"); ignoring."))}else this.localConfig.loggerProvider.warn("min_session_duration_ms remote value is not a finite number (got ".concat(String(e),"); ignoring."))},e}(),$e=6e4,Ve=function(e,t){return a(void 0,void 0,void 0,function(){var r,n;return l(this,function(s){return r=new Le(e,t),n=new V(e,r.loggerProvider,r.serverZone,t.configServerUrl,t.handleFetchConfig),[2,new qe(n,r)]})})};function Ge(e){if(e.type!==je.IncrementalSnapshot)return!1;var t=e.data;return t.source===ze.Mutation&&!t.isAttachIframe}function He(e){var t,r,n=new Map;if(e.forEach(function(e,t){if(e.attributes&&"style"in e.attributes){var r=n.get(e.id);r?r.push(t):n.set(e.id,[t])}}),0===n.size)return e;var s=function(t){return e[t].attributes.style},i=new Set,a=new Map,l=function(e){if(1===e.length)return"continue";var t=-1;e.forEach(function(e,r){var n;("object"!=typeof(n=s(e))||null===n)&&(t=r)});var r=[];
26if(e.forEach(function(e,n){n!==t&&(i.add(e),n>t&&r.push(e))}),r.length>0){var n=r[r.length-1],o=function(e){var t,r,n,s,o={};try{for(var i=c(e),a=i.next();!a.done;a=i.next()){var l=a.value;try{for(var u=(n=void 0,c(Object.keys(l))),h=u.next();!h.done;h=u.next()){var d=h.value;o[d]=l[d]}}catch(e){n={error:e}}finally{try{h&&!h.done&&(s=u.return)&&s.call(u)}finally{if(n)throw n.error}}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return o}(r.map(function(e){return s(e)}));i.delete(n),a.set(n,o)}};try{for(var u=c(n.values()),h=u.next();!h.done;h=u.next()){l(h.value)}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}if(0===i.size&&0===a.size)return e;var d=[];return e.forEach(function(e,t){var r=a.get(t);if(void 0===r)if(i.has(t)){var n=o({},e.attributes);delete n.style,Object.keys(n).length>0&&d.push(o(o({},e),{attributes:n}))}else d.push(e);else d.push(o(o({},e),{attributes:o(o({},e.attributes),{style:r})}))}),d}function Je(e){var t,r,n,s,i=e[0],a=new Map,l=new Map,h=new Map,d=new Map,p=new Map;e.forEach(function(e,t){var r,n,s,o,i=e.data;try{for(var u=c(i.adds),f=u.next();!f.done;f=u.next()){var m=f.value;a.has(m.node.id)||a.set(m.node.id,t),l.set(m.node.id,t),p.set(m.node.id,m.parentId)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(n=u.return)&&n.call(u)}finally{if(r)throw r.error}}try{for(var g=c(i.removes),v=g.next();!v.done;v=g.next()){var y=v.value;h.has(y.id)||h.set(y.id,t),d.set(y.id,t)}}catch(e){s={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(s)throw s.error}}});var f=new Set,m=new Set;try{for(var g=c(a),v=g.next();!v.done;v=g.next()){var y=u(v.value,2),w=y[0],b=y[1],S=h.get(w);if(void 0!==S)l.get(w)>=d.get(w)||(b<S?f.add(w):S<b&&m.add(w))}}catch(e){t={error:e}}finally{try{v&&!v.done&&(r=g.return)&&r.call(g)}finally{if(t)throw t.error}}var C=new Set;if(f.size>0||m.size>0)for(var x=!0;x;){x=!1;try{for(var k=(n=void 0,c(p)),I=k.next();!I.done;I=k.next()){var O=u(I.value,2),E=O[0],M=O[1];if(!f.has(E)&&!m.has(E)&&!C.has(E)&&(f.has(M)||m.has(M)||C.has(M))){var R=h.get(E),P=a.get(E);void 0!==R&&void 0!==P&&R<P?m.add(E):void 0!==R&&void 0!==P&&R===P?C.add(E):f.add(E),x=!0}}}catch(e){n={error:e}}finally{try{I&&!I.done&&(s=k.return)&&s.call(k)}finally{if(n)throw n.error}}}var T=f.size>0||m.size>0||C.size>0,A=[];e.forEach(function(e,t){var r,n;try{for(var s=c(e.data.removes),o=s.next();!o.done;o=s.next()){var i=o.value;f.has(i.id)||(m.has(i.id)&&t>=a.get(i.id)||C.has(i.id)&&(f.has(i.parentId)||m.has(i.parentId)||C.has(i.parentId))||A.push(i))}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}});var N=e.flatMap(function(e){return e.data.adds}),L=e.flatMap(function(e){return e.data.texts}),_=e.flatMap(function(e){return e.data.attributes}),D=T?_.filter(function(e){return!f.has(e.id)&&!m.has(e.id)&&!C.has(e.id)}):_,F={source:ze.Mutation,removes:A,adds:T?N.filter(function(e){return!f.has(e.node.id)&&!m.has(e.node.id)&&!C.has(e.node.id)}):N,texts:T?L.filter(function(e){return!f.has(e.id)&&!m.has(e.id)&&!C.has(e.id)}):L,attributes:He(D)};return o(o({},i),{data:F})}function Ke(e){if(e.length<=1)return e;for(var t=[],r=0;r<e.length;)if(Ge(e[r])){for(var n=r+1;n<e.length&&Ge(e[n]);)n++;t.push(n>r+1?Je(e.slice(r,n)):e[r]),r=n}else t.push(e[r]),r++;return t}var Ye=function(){function e(e,t,r,n,s){var o,i=this;this.taskQueue=[],this.pendingQueue=[],this.isProcessing=!1,this.compressEvent=function(e){var t=e,r=t.type,n=t.timestamp,s=t.delay,o=t.data;return null!=s?JSON.stringify({type:r,timestamp:n,delay:s,data:o}):JSON.stringify({type:r,timestamp:n,data:o})},this.addCompressedEventToManager=function(e,t){var r,n=new Blob([e]).size;n>(null!==(r=i.config.maxSingleEventSizeBytes)&&void 0!==r?r:de)?i.config.loggerProvider.warn("Session replay event dropped: serialized size ".concat(Math.round(n/1024)," KB exceeds maximum allowed event size. If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support.")):i.eventsManager&&i.deviceId&&i.eventsManager.addEvent({event:{type:"replay",data:e},sessionId:t,deviceId:i.deviceId})},this.addCompressedEvent=function(e,t){if(i.worker)try{i.worker.postMessage({event:e,sessionId:t})}catch(r){"DataCloneError"===r.name?i.worker.postMessage(JSON.stringify({event:e,sessionId:t})):i.config.loggerProvider.warn("Unexpected error while posting message to worker:",r)}else{var r=i.compressEvent(e);i.addCompressedEventToManager(r,t)}},this.flushQueue=function(){var e;
26for(i.pendingQueue.length>0&&(e=i.taskQueue).push.apply(e,h([],u(i.mergeMutationTasks(i.pendingQueue.splice(0))),!1));i.taskQueue.length>0;){var t=i.taskQueue.shift();if(t){var r=t.event,n=t.sessionId,s=i.compressEvent(r);i.addCompressedEventToManager(s,n)}}i.isProcessing=!1},this.terminate=function(){var e;null===(e=i.worker)||void 0===e||e.terminate()};var a=g();if(this.canUseIdleCallback=a&&"requestIdleCallback"in a,this.eventsManager=e,this.config=t,this.deviceId=r,this.timeout=(null===(o=t.performanceConfig)||void 0===o?void 0:o.timeout)||2e3,this.onFullSnapshotProcessed=s,n){t.loggerProvider.log("Enabling web worker for compression");try{var l=new Blob([n],{type:"application/javascript"}),c=URL.createObjectURL(l),d=new Worker(c);d.onerror=function(e){e.preventDefault(),t.loggerProvider.error("Worker failed, falling back to non-worker compression: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),d.terminate(),i.worker=void 0},d.onmessage=function(e){var t=e.data,r=t.compressedEvent,n=t.sessionId;i.addCompressedEventToManager(r,n)},this.worker=d}catch(e){t.loggerProvider.error("Failed to create worker, falling back to non-worker compression:",e)}}}return e.prototype.scheduleIdleProcessing=function(){var e=this;this.isProcessing||(this.isProcessing=!0,requestIdleCallback(function(t){e.processQueue(t)},{timeout:this.timeout}))},e.prototype.enqueueEvent=function(e,t){var r,n,s,o;if(e.type===je.FullSnapshot){if(this.config.loggerProvider.debug("Processing full snapshot immediately."),this.taskQueue.length>0||this.pendingQueue.length>0){var i=h(h([],u(this.taskQueue.splice(0)),!1),u(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1);try{for(var a=c(i),l=a.next();!l.done;l=a.next()){var d=l.value,p=this.compressEvent(d.event);this.addCompressedEventToManager(p,d.sessionId)}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}this.isProcessing=!1}var f=this.compressEvent(e);return this.addCompressedEventToManager(f,t),void(null===(s=this.onFullSnapshotProcessed)||void 0===s||s.call(this))}this.canUseIdleCallback&&(null===(o=this.config.performanceConfig)||void 0===o?void 0:o.enabled)?(this.config.loggerProvider.debug("Enqueuing event for processing during idle time."),this.pendingQueue.push({event:e,sessionId:t}),this.scheduleIdleProcessing()):(this.config.loggerProvider.debug("Processing event without idle callback."),this.addCompressedEvent(e,t))},e.prototype.processQueue=function(e){var t,r=this;for(this.pendingQueue.length>0&&(t=this.taskQueue).push.apply(t,h([],u(this.mergeMutationTasks(this.pendingQueue.splice(0))),!1));this.taskQueue.length>0&&(e.timeRemaining()>0||e.didTimeout);){var n=this.taskQueue.shift();if(n){var s=n.event,o=n.sessionId;this.addCompressedEvent(s,o)}}this.taskQueue.length>0||this.pendingQueue.length>0?requestIdleCallback(function(e){r.processQueue(e)},{timeout:this.timeout}):this.isProcessing=!1},e.prototype.mergeMutationTasks=function(e){var t,r,n;if(!1===(null===(n=this.config.performanceConfig)||void 0===n?void 0:n.mergeMutations))return e;if(e.length<=1)return e;for(var s=[],o=0;o<e.length;){for(var i=e[o].sessionId,a=o+1;a<e.length&&e[a].sessionId===i;)a++;var l=Ke(e.slice(o,a).map(function(e){return e.event}));try{for(var u=(t=void 0,c(l)),h=u.next();!h.done;h=u.next()){var d=h.value;s.push({event:d,sessionId:i})}}catch(e){t={error:e}}finally{try{h&&!h.done&&(r=u.return)&&r.call(u)}finally{if(t)throw t.error}}o=a}return s},e}(),Qe="Session replay event batch rejected due to exceeded retry count",Xe="Failed to store session replay events in IndexedDB",Ze="Session replay event batch dropped: server signalled capture disabled or session out of valid range for this session",et="1.47.5";function tt(e,t){return a(this,void 0,void 0,function(){var r,n,s,o,i,u,h,d,p,f,m,g,v,y,w=this;return l(this,function(b){switch(b.label){case 0:return b.trys.push([0,4,,5]),r=t.CompressionStream,n=new r("gzip"),s=n.writable.getWriter(),o=n.readable.getReader(),i=[],u=a(w,void 0,void 0,function(){var e,t,r;return l(this,function(n){switch(n.label){case 0:return[4,o.read()];case 1:if(e=n.sent(),t=e.done,r=e.value,t)return[3,3];i.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,s.write((new TextEncoder).encode(e))];case 1:return b.sent(),[4,s.close()];case 2:return b.sent(),[4,u];case 3:b.sent(),h=i.reduce(function(e,t){return e+t.length},0),d=new Uint8Array(h),p=0;try{for(f=c(i),m=f.next();!m.done;m=f.next())g=m.value,d.set(g,p),p+=g.length}catch(e){v={error:e}}finally{try{m&&!m.done&&(y=f.return)&&y.call(f)}finally{if(v)throw v.error}}return[2,d];case 4:return b.sent(),[2,null];case 5:return[2]}})})}var rt=function(){function e(e){var t=e.trackServerUrl,r=e.loggerProvider,n=e.payloadBatcher,s=e.workerScript,o=e.enableTransportCompression,i=e.sendTimeoutMs,a=e.handleSendEvents,l=this;if(this.storageKey="",this.retryTimeout=1e3,this.scheduled=null,this.queue=[],this.sendIdCounter=0,this.pendingWorkerRequests=new Map,this.timedOutWorkerRequests=new Map,this.flushPauseUntilMs=0,this.mergeOnNextFlush=!1,this.coalesceNextFlush=!1,this.mergeLogFiredThisPause=!1,this.killedSessions=new Set,this.loggerProvider=r,this.payloadBatcher=n||function(e){return e},this.trackServerUrl=t,this.enableTransportCompression=null==o||o,this.sendTimeoutMs=null!=i?i:1e4,this.handleSendEvents=a,s)try{var h=new Blob([s],{type:"application/javascript"}),d=URL.createObjectURL(h),p=new Worker(d);p.onerror=function(e){var t,n;e.preventDefault(),r.error("Track destination worker failed, falling back to main-thread sending: ".concat(e.message," (").concat(e.filename,":").concat(e.lineno,")")),p.terminate(),l.worker=void 0;try{for(var s=c(l.pendingWorkerRequests),o=s.next();!o.done;o=s.next()){var i=u(o.value,2)[1];i.timeout&&clearTimeout(i.timeout),r.warn("Session replay event send failed due to worker crash: ".concat(e.message)),i.resolve()}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(t)throw t.error}}l.pendingWorkerRequests.clear(),l.timedOutWorkerRequests.clear()},p.onmessage=function(e){var t=e.data;if("log"===t.type)r.log(t.message);else if("warn"===t.type)r.warn(t.message);else if("payload_too_large"===t.type){var n=l.pendingWorkerRequests.get(t.id);if(n)n.timeout&&clearTimeout(n.timeout),l.handlePayloadTooLargeResponse(n.context,t.isWaf),n.resolve(),l.pendingWorkerRequests.delete(t.id);else(s=l.timedOutWorkerRequests.get(t.id))&&(l.timedOutWorkerRequests.delete(t.id),l.handlePayloadTooLargeResponse(s,t.isWaf))}else if("complete"===t.type){var s,o=l.pendingWorkerRequests.get(t.id);if(o)o.timeout&&clearTimeout(o.timeout),void 0!==t.skipCode&&l.applyServerDirective(o.context.sessionId,t.skipCode),l.completeRequest({context:o.context}),o.resolve(),l.pendingWorkerRequests.delete(t.id);else(s=l.timedOutWorkerRequests.get(t.id))&&(l.timedOutWorkerRequests.delete(t.id),void 0!==t.skipCode&&l.applyServerDirective(s.sessionId,t.skipCode),l.completeRequest({context:s}))}else"fetch-request"===t.type&&l.handleDelegatedFetch(p,t).catch(function(e){r.warn("Failed to handle delegated session replay fetch:",e)})},this.worker=p}catch(e){r.error("Failed to create track destination worker, falling back to main-thread sending:",e)}}return e.prototype.sendEventsList=function(e){this.addToQueue(o(o({},e),{attempts:0,timeout:0}))},e.prototype.markCoalesceNextFlush=function(){this.coalesceNextFlush=!0,this.schedule(0)},e.prototype.sendBeacon=function(e){var t,r,n=this,s=e.events,o=e.sessionId,i=e.deviceId,a=e.apiKey,l=e.serverZone,c=function(e){return new Blob([e]).size},u=s,h=JSON.stringify({version:2,events:u});if(c(h)>65536){for(var d=0,p=u.length;d<p;
26){var f=Math.floor((d+p+1)/2);c(JSON.stringify({version:2,events:u.slice(0,f)}))<=65536?d=f:p=f-1}u=u.slice(0,d),h=JSON.stringify({version:2,events:u}),this.loggerProvider.warn("sendBeacon payload exceeded 64 KB limit, trimmed from ".concat(s.length," to ").concat(u.length," events"))}if(0!==u.length)if(this.handleSendEvents){var m=new URLSearchParams({device_id:i,session_id:String(o),type:"replay"}),v="".concat(Se(l,this.trackServerUrl),"?").concat(m.toString()),y={"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(a)};this.loggerProvider.debug("Routing session replay exit batch (".concat(u.length," events) through custom transport for session id ").concat(o,"."));try{this.handleSendEvents({url:v,method:"POST",headers:y,body:h,keepalive:!0}).catch(function(e){n.loggerProvider.warn("Custom transport failed to send session replay exit batch:",e)})}catch(e){this.loggerProvider.warn("Custom transport threw while sending session replay exit batch:",e)}}else{var w=new URLSearchParams({device_id:i,session_id:String(o),type:"replay",api_key:a}),b="".concat(Se(l,this.trackServerUrl),"?").concat(w.toString()),S=g();try{var C=new Blob([h],{type:"application/json"});!1===(null===(r=null===(t=null==S?void 0:S.navigator)||void 0===t?void 0:t.sendBeacon)||void 0===r?void 0:r.call(t,b,C))&&this.loggerProvider.warn("sendBeacon failed to queue session replay payload")}catch(e){}}},e.prototype.addToQueue=function(){for(var e=this,t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];t.filter(function(t){return e.killedSessions.has(t.sessionId)?(e.completeRequest({context:t,err:Ze}),!1):t.attempts<(t.flushMaxRetries||0)?(t.attempts+=1,!0):(e.completeRequest({context:t,err:Qe}),!1)}).forEach(function(t){e.queue=e.queue.concat(t),e.schedule(0)})},e.prototype.schedule=function(e){var t=this;if(!this.scheduled){var r=this.flushPauseUntilMs-Date.now(),n=r>e?r:e;r>0&&(this.mergeOnNextFlush=!0),this.scheduled=setTimeout(function(){t.flush(!0).then(function(){t.queue.length>0&&t.schedule(e)})},n)}},e.prototype.flush=function(e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){var t,r,n,s,o,i,a;return l(this,function(l){switch(l.label){case 0:t=this.queue,this.queue=[],this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),this.mergeOnNextFlush?(this.mergeOnNextFlush=!1,this.coalesceNextFlush=!1,t=this.mergeQueueAfterThrottle(t)):this.coalesceNextFlush&&(this.coalesceNextFlush=!1,t=this.mergeDrainBacklog(t)),l.label=1;case 1:l.trys.push([1,6,7,8]),r=c(t),n=r.next(),l.label=2;case 2:return n.done?[3,5]:(s=n.value,[4,this.send(s,e)]);case 3:l.sent(),l.label=4;case 4:return n=r.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),i={error:o},[3,8];case 7:try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(i)throw i.error}return[7];case 8:return[2]}})})},e.prototype.mergeQueueAfterThrottle=function(e){var t=this.coalesceByIdentity(e);return t.length<e.length&&!this.mergeLogFiredThisPause&&(this.mergeLogFiredThisPause=!0,this.loggerProvider.log("Session replay throttle pause ended; merged ".concat(e.length," queued batches into ").concat(t.length," request(s)"))),t},e.prototype.mergeDrainBacklog=function(e){var t=this.coalesceByIdentity(e);return t.length<e.length&&this.loggerProvider.log("Session replay coalesced ".concat(e.length," persisted page-load backlog batches into ").concat(t.length," request(s)")),t},e.prototype.coalesceByIdentity=function(e){var t,r,n,s,i,d,p,f,m,g,v,y=this;if(e.length<=1)return e;var w=new Map;try{for(var b=c(e),S=b.next();!S.done;S=b.next()){var C=S.value,x=[C.sessionId,null!==(i=C.deviceId)&&void 0!==i?i:"",null!==(d=C.apiKey)&&void 0!==d?d:"",C.type,null!==(p=C.serverZone)&&void 0!==p?p:"",C.sampleRate,null!==(m=null===(f=C.version)||void 0===f?void 0:f.type)&&void 0!==m?m:"",null!==(v=null===(g=C.version)||void 0===g?void 0:g.version)&&void 0!==v?v:""].join("|"),k=w.get(x);k?k.push(C):w.set(x,[C])}}catch(e){t={error:e}}finally{try{S&&!S.done&&(r=b.return)&&r.call(b)}finally{if(t)throw t.error}}var I=[],O=function(e){var t,r;if(1===e.length)return I.push(e[0]),"continue";var n=null,s=0,i=function(){n&&I.push(n),n=null,s=0},d=function(e){var t=e.events.reduce(function(e,t){return e+new Blob([t]).size},0);if(null===n)return n=o(o({},e),{events:h([],u(e.events),!1),attempts:0}),s=t,"continue";if(s+t>4e6)return i(),n=o(o({},e),{events:h([],u(e.events),!1),attempts:0}),s=t,"continue";var r=n.onComplete,c=e.onComplete;n.events=n.events.concat(e.events),s+=t,n.onComplete=function(){return a(y,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,Promise.allSettled([r(),c()])];case 1:return e.sent(),[2]}})})}};try{for(var p=(t=void 0,c(e)),f=p.next();!f.done;f=p.next()){d(f.value)}}catch(e){t={error:e}}finally{try{f&&!f.done&&(r=p.return)&&r.call(p)}finally{if(t)throw t.error}}i()};try{for(var E=c(w.values()),M=E.next();!M.done;M=E.next()){O(M.value)}}catch(e){n={error:e}}finally{try{M&&!M.done&&(s=E.return)&&s.call(E)}finally{if(n)throw n.error}}return I},e.prototype.send=function(e,t){return void 0===t&&(t=!0),a(this,void 0,void 0,function(){var r,n,s,o;return l(this,function(i){return this.killedSessions.has(e.sessionId)?[2,this.completeRequest({context:e,err:Ze})]:(r=e.apiKey)?(n=e.deviceId)?0===(s=this.payloadBatcher({version:1,events:e.events})).events.length?(this.completeRequest({context:e}),[2]):(o=this.worker)?[2,this.sendViaWorker(o,e,s,t)]:[2,this.sendOnMainThread(r,n,e,s,t)]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing device ID"})]:[2,this.completeRequest({context:e,err:"Session replay event batch not sent due to missing api key"})]})})},e.prototype.sendViaWorker=function(e,t,r,n){return a(this,void 0,void 0,function(){var s,o=this;return l(this,function(i){return s="".concat(++this.sendIdCounter),[2,new Promise(function(i){var a,l=o.sendTimeoutMs>0?setTimeout(function(){var e=o.pendingWorkerRequests.get(s);
26e&&(o.pendingWorkerRequests.delete(s),o.rememberTimedOutRequest(s,e.context),o.loggerProvider.warn("Session replay worker send timed out after ".concat(o.sendTimeoutMs,"ms; leaving events for retry")),e.resolve())},o.sendTimeoutMs):void 0;o.pendingWorkerRequests.set(s,{context:t,resolve:i,timeout:l}),e.postMessage({type:"send",id:s,payload:r,useRetry:n,useCustomTransport:!!o.handleSendEvents,context:{apiKey:t.apiKey,deviceId:t.deviceId,sessionId:t.sessionId,events:t.events,eventType:t.type,flushMaxRetries:null!==(a=t.flushMaxRetries)&&void 0!==a?a:0,sampleRate:t.sampleRate,serverZone:t.serverZone,trackServerUrl:o.trackServerUrl,version:t.version,currentUrl:Ee(),sdkVersion:et,enableTransportCompression:o.enableTransportCompression,sendTimeoutMs:o.sendTimeoutMs}})})]})})},e.prototype.rememberTimedOutRequest=function(e,t){var r,n;if(this.timedOutWorkerRequests.set(e,t),this.timedOutWorkerRequests.size>256)try{for(var s=c(this.timedOutWorkerRequests.keys()),o=s.next();!o.done;o=s.next()){var i=o.value;this.timedOutWorkerRequests.delete(i);break}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}},e.prototype.handleDelegatedFetch=function(e,t){var r,n,s;return a(this,void 0,void 0,function(){var o,i,a,c,u,h,d,p,f,m,g;return l(this,function(l){switch(l.label){case 0:o=t.requestId,i=t.url,a=t.method,c=t.headers,u=t.body,h=t.keepalive,l.label=1;case 1:return l.trys.push([1,10,,11]),d=void 0,this.handleSendEvents?[4,this.handleSendEvents({url:i,method:a,headers:c,body:u,keepalive:h})]:[3,3];case 2:return d=l.sent(),[3,5];case 3:return this.loggerProvider.warn("Delegated session replay fetch received without a custom transport configured; falling back to built-in fetch."),[4,fetch(i,{method:a,headers:c,body:u,keepalive:h})];case 4:d=l.sent(),l.label=5;case 5:if(p=d.status,f=null,m="",p>=200&&p<300&&(f=null!==(s=null===(n=null===(r=d.headers)||void 0===r?void 0:r.get)||void 0===n?void 0:n.call(r,ve))&&void 0!==s?s:null),413!==p)return[3,9];l.label=6;case 6:return l.trys.push([6,8,,9]),[4,d.text()];case 7:return m=l.sent(),[3,9];case 8:return l.sent(),[3,9];case 9:return this.loggerProvider.debug("Delegated session replay fetch (request ".concat(o,") returned status ").concat(p,".")),e.postMessage({type:"fetch-response",requestId:o,status:p,skipHeader:f,body:m}),[3,11];case 10:return g=l.sent(),this.loggerProvider.debug("Delegated session replay fetch (request ".concat(o,") failed:"),g),e.postMessage({type:"fetch-response",requestId:o,status:0,skipHeader:null,body:String(g),error:!0}),[3,11];case 11:return[2]}})})},e.prototype.sendOnMainThread=function(e,t,r,n,s){var i,c,u,h,d,p,f;return a(this,void 0,void 0,function(){var a,m,v,y,w,b,S,C,x,k,I,O,E,M,R,P,T,A,N,L,_,D;return l(this,function(l){switch(l.label){case 0:a=Ee(),m=et,v=r.sampleRate,y=new URLSearchParams({device_id:t,session_id:"".concat(r.sessionId),type:"".concat(r.type)}),w="".concat(null!==(c=null===(i=r.version)||void 0===i?void 0:i.type)&&void 0!==c?c:"standalone","/").concat(null!==(h=null===(u=r.version)||void 0===u?void 0:u.version)&&void 0!==h?h:m),l.label=1;case 1:return l.trys.push([1,19,,23]),b=JSON.stringify(n),S=g(),this.enableTransportCompression&&S&&"CompressionStream"in S?[4,tt(b,S)]:[3,3];case 2:return x=l.sent(),[3,4];case 3:x=null,l.label=4;case 4:if(k=(C=x)?C.byteLength:new Blob([b]).size,I=new AbortController,O=o({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(e),"X-Client-Version":m,"X-Client-Library":w,"X-Client-Url":a.substring(0,1e3),"X-Client-Sample-Rate":"".concat(v),"X-Sampling-Hash-Alg":"xxhash32"},C?{"Content-Encoding":"gzip"}:{}),R={headers:O,body:E=null!=C?C:b,method:"POST",keepalive:M=k<=65536,signal:I.signal},P="".concat(Se(r.serverZone,this.trackServerUrl),"?").concat(y.toString()),0===n.events.length)return this.completeRequest({context:r}),[2];T=this.sendTimeoutMs>0?setTimeout(function(){I.abort()},this.sendTimeoutMs):void 0,A=void 0,l.label=5;case 5:return l.trys.push([5,,10,11]),this.handleSendEvents?[4,(F=this.handleSendEvents({url:P,method:"POST",headers:O,body:E,keepalive:M}),U=I.signal,new Promise(function(e,t){var r=function(){var e=new Error("Custom session replay transport aborted by send timeout");e.name="AbortError",t(e)};U.addEventListener("abort",r,{once:!0}),F.then(function(t){U.removeEventListener("abort",r),e(t)},function(e){U.removeEventListener("abort",r),t(e)})}))]:[3,7];case 6:return N=l.sent(),[3,9];case 7:return[4,fetch(P,R)];case 8:N=l.sent(),l.label=9;case 9:return A=N,[3,11];case 10:return T&&clearTimeout(T),[7];case 11:if(null===A)return this.completeRequest({context:r,err:"Unexpected error occurred"}),[2];if(A.status>=200&&A.status<300&&(L=null!==(f=null===(p=null===(d=A.headers)||void 0===d?void 0:d.get)||void 0===p?void 0:p.call(d,ve))&&void 0!==f?f:null,this.applyServerDirective(r.sessionId,L)),s)return[3,12];_="";try{_=JSON.stringify(A.body,null,2)}catch(e){}return this.completeRequest({context:r,success:"".concat(A.status,": ").concat(_)}),[3,18];
26case 12:if(_="",413!==A.status)return[3,16];l.label=13;case 13:return l.trys.push([13,15,,16]),[4,A.text()];case 14:return _=l.sent(),[3,16];case 15:return l.sent(),[3,16];case 16:return[4,this.handleReponse(A.status,r,_)];case 17:l.sent(),l.label=18;case 18:return[3,23];case 19:return D=l.sent(),!!D&&"object"==typeof D&&"AbortError"===D.name&&s?[4,this.handleOtherResponse(r)]:[3,21];case 20:return l.sent(),[3,22];case 21:this.completeRequest({context:r,err:D}),l.label=22;case 22:return[3,23];case 23:return[2]}var F,U})})},e.prototype.handleReponse=function(e,t,r){return void 0===r&&(r=""),a(this,void 0,void 0,function(){var n;return l(this,function(s){switch(s.label){case 0:switch(n=(new U).buildStatus(e),n){case d.Success:return[3,1];case d.Failed:case d.Timeout:case d.RateLimit:return[3,2];case d.PayloadTooLarge:return[3,4]}return[3,5];case 1:return this.handleSuccessResponse(t),[3,8];case 2:return[4,this.handleOtherResponse(t)];case 3:return s.sent(),[3,8];case 4:return this.handlePayloadTooLargeResponse(t,pe.test(r)),[3,8];case 5:return 499!==e?[3,7]:[4,this.handleOtherResponse(t)];case 6:return s.sent(),[3,8];case 7:this.completeRequest({context:t,err:"Network error occurred, event batch rejected"}),s.label=8;case 8:return[2]}})})},e.prototype.handlePayloadTooLargeResponse=function(e,t){var r=t?"WAF (compressed payload too large)":"server (event too large)",n=Math.round(e.events.reduce(function(e,t){return e+t.length},0)/ge);if(t)if(1!==e.events.length){this.loggerProvider.warn("Session replay event batch rejected by ".concat(r," (").concat(e.events.length," events, ").concat(n," KB total) â splitting and retrying")),e.onComplete();var s=function(){return Promise.resolve()},i=Math.floor(e.events.length/2);this.sendEventsList(o(o({},e),{events:e.events.slice(0,i),onComplete:s})),this.sendEventsList(o(o({},e),{events:e.events.slice(i),onComplete:s}))}else this.completeRequest({context:e,err:"Session replay event dropped: single event (".concat(n," KB, 1 event) rejected by ").concat(r," â cannot split further")});else this.completeRequest({context:e,err:"Session replay event batch dropped: ".concat(r," rejected payload (").concat(e.events.length," events, ").concat(n," KB) â not retrying non-WAF 413")})},e.prototype.handleSuccessResponse=function(e){var t=Math.round(new Blob(e.events).size/ge);this.completeRequest({context:e,success:"Session replay event batch tracked successfully for session id ".concat(e.sessionId,", size of events: ").concat(t," KB")})},e.prototype.handleOtherResponse=function(e){return a(this,void 0,void 0,function(){var t;return l(this,function(r){switch(r.label){case 0:return t=Math.random()*e.attempts*this.retryTimeout,e.attempts++,e.attempts>(e.flushMaxRetries||0)?(this.completeRequest({context:e,err:Qe}),[2]):[4,new Promise(function(e){return setTimeout(e,t)})];case 1:return r.sent(),[4,this.send(e,!0)];case 2:return r.sent(),[2]}})})},e.prototype.completeRequest=function(e){var t=e.context,r=e.err,n=e.success;t.onComplete(),r?this.loggerProvider.warn(r):n&&this.loggerProvider.log(n)},e.prototype.applyServerDirective=function(e,t){if(null===t)return this.flushPauseUntilMs=0,void(this.mergeLogFiredThisPause=!1);if("429"===t){var r=this.flushPauseUntilMs>Date.now();return this.flushPauseUntilMs=Date.now()+6e4,void(r||this.loggerProvider.log("Session replay throttled by server; pausing flush schedule for ".concat(60,"s")))}"4005"!==t&&"4004"!==t||this.killSession(e,t)},e.prototype.killSession=function(e,t){var r,n,s,o;if(!this.killedSessions.has(e)){if(this.killedSessions.add(e),this.killedSessions.size>256)try{for(var i=c(this.killedSessions),a=i.next();!a.done;a=i.next()){var l=a.value;this.killedSessions.delete(l);break}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}this.loggerProvider.log("Session replay capture stopped for session ".concat(e," by server directive ").concat(t,"; remaining events will be dropped"));var u=[];try{for(var h=c(this.queue),d=h.next();!d.done;d=h.next()){var p=d.value;p.sessionId===e?this.completeRequest({context:p,err:Ze}):u.push(p)}}catch(e){s={error:e}}
vendor: 4,142 bytes, line 26
26finally{try{d&&!d.done&&(o=h.return)&&o.call(h)}finally{if(s)throw s.error}}this.queue=u}},e}();const nt=(e,t)=>t.some(t=>e instanceof t);let st,ot;const it=new WeakMap,at=new WeakMap,lt=new WeakMap;let ct={get(e,t,r){if(e instanceof IDBTransaction){if("done"===t)return it.get(e);if("store"===t)return r.objectStoreNames[1]?void 0:r.objectStore(r.objectStoreNames[0])}return pt(e[t])},set:(e,t,r)=>(e[t]=r,!0),has:(e,t)=>e instanceof IDBTransaction&&("done"===t||"store"===t)||t in e};function ut(e){ct=e(ct)}function ht(e){return(ot||(ot=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])).includes(e)?function(...t){return e.apply(ft(this),t),pt(this.request)}:function(...t){return pt(e.apply(ft(this),t))}}function dt(e){return"function"==typeof e?ht(e):(e instanceof IDBTransaction&&function(e){if(it.has(e))return;const t=new Promise((t,r)=>{const n=()=>{e.removeEventListener("complete",s),e.removeEventListener("error",o),e.removeEventListener("abort",o)},s=()=>{t(),n()},o=()=>{r(e.error||new DOMException("AbortError","AbortError")),n()};e.addEventListener("complete",s),e.addEventListener("error",o),e.addEventListener("abort",o)});it.set(e,t)}(e),nt(e,st||(st=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction]))?new Proxy(e,ct):e)}function pt(e){if(e instanceof IDBRequest)return function(e){const t=new Promise((t,r)=>{const n=()=>{e.removeEventListener("success",s),e.removeEventListener("error",o)},s=()=>{t(pt(e.result)),n()},o=()=>{r(e.error),n()};e.addEventListener("success",s),e.addEventListener("error",o)});return lt.set(t,e),t}(e);if(at.has(e))return at.get(e);const t=dt(e);return t!==e&&(at.set(e,t),lt.set(t,e)),t}const ft=e=>lt.get(e);function mt(e,t,{blocked:r,upgrade:n,blocking:s,terminated:o}={}){const i=indexedDB.open(e,t),a=pt(i);return n&&i.addEventListener("upgradeneeded",e=>{n(pt(i.result),e.oldVersion,e.newVersion,pt(i.transaction),e)}),r&&i.addEventListener("blocked",e=>r(e.oldVersion,e.newVersion,e)),a.then(e=>{o&&e.addEventListener("close",()=>o()),s&&e.addEventListener("versionchange",e=>s(e.oldVersion,e.newVersion,e))}).catch(()=>{}),a}const gt=["get","getKey","getAll","getAllKeys","count"],vt=["put","add","delete","clear"],yt=new Map;function wt(e,t){if(!(e instanceof IDBDatabase)||t in e||"string"!=typeof t)return;if(yt.get(t))return yt.get(t);const r=t.replace(/FromIndex$/,""),n=t!==r,s=vt.includes(r);if(!(r in(n?IDBIndex:IDBObjectStore).prototype)||!s&&!gt.includes(r))return;const o=async function(e,...t){const o=this.transaction(e,s?"readwrite":"readonly");let i=o.store;return n&&(i=i.index(t.shift())),(await Promise.all([i[r](...t),s&&o.done]))[0]};return yt.set(t,o),o}ut(e=>({...e,get:(t,r,n)=>wt(t,r)||e.get(t,r,n),has:(t,r)=>!!wt(t,r)||e.has(t,r)}));const bt=["continue","continuePrimaryKey","advance"],St={},Ct=new WeakMap,xt=new WeakMap,kt={get(e,t){if(!bt.includes(t))return e[t];let r=St[t];return r||(r=St[t]=function(...e){Ct.set(this,xt.get(this)[t](...e))}),r}};async function*It(...e){let t=this;if(t instanceof IDBCursor||(t=await t.openCursor(...e)),!t)return;const r=new Proxy(t,kt);for(xt.set(r,t),lt.set(r,ft(t));t;)yield r,t=await(Ct.get(r)||t.continue()),Ct.delete(r)}function Ot(e,t){return t===Symbol.asyncIterator&&nt(e,[IDBIndex,IDBObjectStore,IDBCursor])||"iterate"===t&&nt(e,[IDBIndex,IDBObjectStore])}ut(e=>({...e,get:(t,r,n)=>Ot(t,r)?It:e.get(t,r,n),has:(t,r)=>Ot(t,r)||e.has(t,r)}));var Et=function(){function e(e){var t,r,n,s=this;this.minInterval=fe,this.maxInterval=me,this.maxPersistedEventsSize=6e6,this._timeAtLastSplit=Date.now(),this.shouldSplitEventsList=function(e,t){var r=s.getStringSize(t);return s.getEventsArraySize(e)+r>=s.maxPersistedEventsSize||!!(Date.now()-s.timeAtLastSplit>s.interval&&e.length)&&(s.interval=Math.min(s.maxInterval,s.interval+s.minInterval),s._timeAtLastSplit=Date.now(),!0)},this.loggerProvider=e.loggerProvider,this.minInterval=null!==(t=e.minInterval)&&void 0!==t?t:this.minInterval,this.maxInterval=null!==(r=e.maxInterval)&&void 0!==r?r:this.maxInterval,this.maxPersistedEventsSize=null!==(n=e.maxPersistedEventsSize)&&void 0!==n?n:this.maxPer
26sistedEventsSize,this.interval=this.minInterval}return Object.defineProperty(e.prototype,"timeAtLastSplit",{get:function(){return this._timeAtLastSplit},enumerable:!1,configurable:!0}),e.prototype.getStringSize=function(e){for(var t=0,r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n<=127)t++;else if(n<=2047)t+=2;else if(n>=55296&&n<=56319){var s=r+1<e.length?e.charCodeAt(r+1):NaN;s>=56320&&s<=57343?(t+=4,r++):t+=3}else t+=3}return t},e.prototype.getEventsArraySize=function(e){var t,r,n=0;try{for(var s=c(e),o=s.next();!o.done;o=s.next()){var i=o.value;n+=this.getStringSize(i)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return n+(2+Math.max(0,e.length-1)+2*e.length)},e}(),Mt=function(e,t,r){var n;"object"==typeof(n=r)&&null!==n&&"AbortError"===n.name?e.debug(t):e.warn(t)};var Rt="sessionCurrentSequence",Pt="sequencesToSend",Tt=5e3;function At(e,t,r){var n=setTimeout(r,t);return e.then(function(){return clearTimeout(n)},function(){return clearTimeout(n)}),function(){return clearTimeout(n)}}var Nt,Lt,_t,Dt=function(e){var t,r;return e.objectStoreNames.contains(Rt)||(r=e.createObjectStore(Rt,{keyPath:"sessionId"})),e.objectStoreNames.contains(Pt)||(t=e.createObjectStore(Pt,{keyPath:"sequenceId",autoIncrement:!0})).createIndex("sessionId","sessionId"),{sequencesStore:t,currentSequenceStore:r}},Ft=function(e){return a(void 0,void 0,void 0,function(){return l(this,function(t){switch(t.label){case 0:return[4,(r=mt(e,1,{upgrade:Dt}),n=2e3,s="IDB openDB timed out",void 0===s&&(s="IDB operation timed out"),new Promise(function(e,t){var o=setTimeout(function(){return t(new Error("".concat(s," after ").concat(n,"ms")))},n);r.then(function(t){clearTimeout(o),e(t)},function(e){clearTimeout(o),t(e)})}))];case 1:return[2,t.sent()]}var r,n,s})})},Ut=function(e){function t(t){var r,n=this;return(n=e.call(this,t)||this).consecutiveFailures=0,n.hasTriggeredFallback=!1,n.emptyFilteredCount=0,n.getSequencesToSend=function(){return a(n,void 0,void 0,function(){var e,t,r,n,s,o,i,a,c,u,h=this;return l(this,function(l){switch(l.label){case 0:e=!1,t=!1,l.label=1;case 1:return l.trys.push([1,9,,10]),r=[],(n=this.db.transaction("sequencesToSend","readwrite")).done.catch(function(r){e||t||(Mt(h.loggerProvider,"".concat(Xe,": ").concat(r),r),h.recordFailure())}),s=At(n.done,Tt,function(){e||t||(t=!0,Mt(h.loggerProvider,"".concat(Xe,": transaction timed out")),h.recordFailure())}),[4,n.store.openCursor()];case 2:o=l.sent(),l.label=3;case 3:return o?(i=o.value,a=i.sessionId,0!==(c=i.events).length?[3,5]:(this.maybeLogEmptyFiltered("getSequencesToSend"),[4,o.delete()])):[3,8];case 4:return l.sent(),[3,6];case 5:r.push({events:c,sequenceId:o.key,sessionId:a}),l.label=6;case 6:return[4,o.continue()];case 7:return o=l.sent(),[3,3];case 8:return this.recordSuccess(),s(),[2,r];case 9:return u=l.sent(),t||(e=!0,Mt(this.loggerProvider,"".concat(Xe,": ").concat(u),u),this.recordFailure()),[3,10];case 10:return[2,void 0]}})})},n.storeCurrentSequence=function(e){return a(n,void 0,void 0,function(){var t,r,n,s,a,c,u,h,d=this;return l(this,function(l){switch(l.label){case 0:t=!1,r=!1,l.label=1;case 1:return l.trys.push([1,5,,6]),(n=this.db.transaction([Rt,Pt],"readwrite")).done.catch(function(e){t||r||(Mt(d.loggerProvider,"".concat(Xe,": ").concat(e),e),d.recordFailure())}),s=At(n.done,Tt,function(){t||r||(r=!0,Mt(d.loggerProvider,"".concat(Xe,": transaction timed out")),d.recordFailure())}),[4,n.objectStore(Rt).get(e)];case 2:return!(a=l.sent())||a.tabId&&a.tabId!==this.tabId?(s(),[2,void 0]):0===a.events.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),s(),[2,void 0]):[4,n.objectStore(Pt).put({sessionId:e,events:a.events,tabId:this.tabId})];case 3:return c=l.sent(),[4,n.objectStore(Rt).put({sessionId:e,events:[],tabId:this.tabId})];case 4:return l.sent(),this.recordSuccess(),s(),a.tabId,u=i(a,["tabId"]),[2,o(o({},u),{sessionId:e,sequenceId:c})];case 5:return h=l.sent(),r||(t=!0,Mt(this.loggerProvider,"".concat(Xe,": ").concat(h),h),this.recordFailure()),[3,6];case 6:return[2,void 0]}})})},n.addEventToCurrentSequence=function(e,t){return a(n,void 0,void 0,function(){var r,n,s,o,i,a,c,u,h,d=this;return l(this,function(l){switch(l.label){case 0:r=!1,n=!1,l.label=1;case 1:return l.trys.push([1,15,,16]),(s=this.db.transaction([Rt,Pt],"readwrite")).done.catch(function(e){r||n||(Mt(d.loggerProvider,"".concat(Xe,": ").concat(e),e),d.recordFailure())}),o=At(s.done,Tt,function(){r||n||(n=!0,Mt(d.loggerProvider,"".concat(Xe,": transaction timed out")),d.recordFailure())}),[4,s.objectStore(Rt).get(e)];case 2:return(null==(i=l.sent())?void 0:i.tabId)&&i.tabId!==this.tabId?i.events.length>0?[4,s.objectStore(Pt).put({sessionId:e,events:i.events,tabId:i.tabId})]:[3,4]:[3,6];case 3:l.sent(),l.label=4;case 4:return[4,s.objectStore(Rt).put({sessionId:e,events:[t],tabId:this.tabId})];case 5:return l.sent(),this.recordSuccess(),o(),[2,void 0];case 6:return(a=i)?[3,8]:[4,s.objectStore(Rt).put({sessionId:e,events:[t],tabId:this.tabId})];case 7:return l.sent(),this.recordSuccess(),o(),[2,void 0];case 8:return this.shouldSplitEventsList(a.events,t)?[3,10]:[4,s.objectStore(Rt).put({sessionId:e,events:a.events.concat(t),tabId:this.tabId})];case 9:return l.sent(),this.recordSuccess(),o(),[2,void 0];case 10:return 0!==(c=a.events).length?[3,12]:(this.maybeLogEmptyFiltered("addEventToCurrentSequence"),[4,s.objectStore(Rt).put({sessionId:e,events:[t],tabId:this.tabId})]);case 11:return l.sent(),this.recordSuccess(),o(),[2,void 0];case 12:return[4,s.objectStore(Rt).put({sessionId:e,events:[t],tabId:this.tabId})];case 13:return l.sent(),[4,s.objectStore(Pt).put({sessionId:e,events:c,tabId:this.tabId})];case 14:return u=l.sent(),this.recordSuccess(),o(),[2,{events:c,sessionId:e,sequenceId:u}];case 15:return h=l.sent(),n||(r=!0,Mt(this.loggerProvider,"".concat(Xe,": ").concat(h),h),this.recordFailure()),[3,16];case 16:return[2,void 0]}})})},n.storeSendingEvents=function(e,t){return a(n,void 0,void 0,function(){var r,n;return l(this,function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),[4,this.db.put(Pt,{sessionId:e,events:t,tabId:this.tabId})];case 1:return r=s.sent(),this.recordSuccess(),[2,r];case 2:return n=s.sent(),Mt(this.loggerProvider,"".concat(Xe,": ").concat(n),n),this.recordFailure(),[3,3];case 3:return[2,void 0]}})})},n.cleanUpSessionEventsStore=function(e,t){return a(n,void 0,void 0,function(){var e;return l(this,function(r){switch(r.label){case 0:if(!t)return[2];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,this.db.delete(Pt,t)];case 2:return r.sent(),this.recordSuccess(),[3,4];case 3:return e=r.sent(),Mt(this.loggerProvider,"".concat(Xe,": ").concat(e),e),this.recordFailure(),[3,4];case 4:return[2]}})})},n.db=t.db,n.tabId=t.tabId,n.onPersistentFailure=t.onPersistentFailure,n.consecutiveFailureThreshold=null!==(r=t.consecutiveFailureThreshold)&&void 0!==r?r:1,n}return r(t,e),t.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (idb store)"))},t.prototype.recordFailure=function(){var e;this.consecutiveFailures++,!this.hasTriggeredFallback&&this.consecutiveFailures>=this.consecutiveFailureThreshold&&(this.hasTriggeredFallback=!0,null===(e=this.onPersistentFailure)||void 0===e||e.call(this))},t.prototype.recordSuccess=function(){this.consecutiveFailures=0},t.new=function(e,r){var n;return a(this,void 0,void 0,function(){var s,i,a,c,u;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,2,,3]),s="replay"===e?"":"_".concat(e),i="".concat(r.a
26piKey.substring(0,10),"_amp_session_replay_events").concat(s),[4,Ft(i)];case 1:return a=l.sent(),c=null!==(n=r.tabId)&&void 0!==n?n:function(){try{return crypto.randomUUID()}catch(e){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}}(),[2,new t(o(o({},r),{db:a,tabId:c}))];case 2:return u=l.sent(),Mt(r.loggerProvider,"".concat(Xe,": ").concat(u),u),[3,3];case 3:return[2]}})})},t.prototype.getCurrentSequenceEvents=function(e){return a(this,void 0,void 0,function(){var t,r,n,s,o,a,u,h;return l(this,function(l){switch(l.label){case 0:return e?[4,this.db.get("sessionCurrentSequence",e)]:[3,2];case 1:return(s=l.sent())?s.tabId&&s.tabId!==this.tabId?[2,void 0]:(s.tabId,[2,[o=i(s,["tabId"])]]):[2,void 0];case 2:t=[],l.label=3;case 3:return l.trys.push([3,8,9,10]),[4,this.db.getAll("sessionCurrentSequence")];case 4:r=c.apply(void 0,[l.sent()]),n=r.next(),l.label=5;case 5:if(n.done)return[3,7];if((s=n.value).tabId&&s.tabId!==this.tabId)return[3,6];s.tabId,o=i(s,["tabId"]),t.push(o),l.label=6;case 6:return n=r.next(),[3,5];case 7:return[3,10];case 8:return a=l.sent(),u={error:a},[3,10];case 9:try{n&&!n.done&&(h=r.return)&&h.call(r)}finally{if(u)throw u.error}return[7];case 10:return[2,t]}})})},t}(Et),Bt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.finalizedSequences={},t.sequences={},t.sequenceId=0,t.emptyFilteredCount=0,t}return r(t,e),t.prototype.resetCurrentSequence=function(e){this.sequences[e]=[]},t.prototype.addSequence=function(e){var t=this.sequenceId++,r=h([],u(this.sequences[e]),!1);return this.finalizedSequences[t]={sessionId:e,events:r},this.resetCurrentSequence(e),{sequenceId:t,events:r,sessionId:e}},t.prototype.maybeLogEmptyFiltered=function(e){this.emptyFilteredCount++%100==0&&this.loggerProvider.debug("Filtered empty session replay sequence at ".concat(e," (in-memory store)"))},t.prototype.getSequencesToSend=function(){return a(this,void 0,void 0,function(){var e,t,r,n,s,o,i,a,h,d;return l(this,function(l){e=[];try{for(t=c(Object.entries(this.finalizedSequences)),r=t.next();!r.done;r=t.next())n=u(r.value,2),s=n[0],o=n[1],i=o.sessionId,0!==(a=o.events).length?e.push({sequenceId:Number(s),sessionId:i,events:a}):(this.maybeLogEmptyFiltered("getSequencesToSend"),delete this.finalizedSequences[Number(s)])}catch(e){h={error:e}}finally{try{r&&!r.done&&(d=t.return)&&d.call(t)}finally{if(h)throw h.error}}return[2,e]})})},t.prototype.storeCurrentSequence=function(e){return a(this,void 0,void 0,function(){var t;return l(this,function(r){return(t=this.sequences[e])?0===t.length?(this.maybeLogEmptyFiltered("storeCurrentSequence"),[2,void 0]):[2,this.addSequence(e)]:[2,void 0]})})},t.prototype.addEventToCurrentSequence=function(e,t){return a(this,void 0,void 0,function(){var r;return l(this,function(n){return this.sequences[e]||this.resetCurrentSequence(e),this.shouldSplitEventsList(this.sequences[e],t)&&(0===this.sequences[e].length?this.maybeLogEmptyFiltered("addEventToCurrentSequence"):r=this.addSequence(e)),this.sequences[e].push(t),[2,r]})})},t.prototype.storeSendingEvents=function(e,t){return a(this,void 0,void 0,function(){return l(this,function(r){return this.finalizedSequences[this.sequenceId]={sessionId:e,events:t},[2,this.sequenceId++]})})},t.prototype.cleanUpSessionEventsStore=function(e,t){return a(this,void 0,void 0,function(){return l(this,function(e){return void 0!==t&&delete this.finalizedSequences[t],[2]})})},t}(Et),jt=function(e){var t=e.config,r=e.minInterval,n=e.maxInterval,s=e.maxPersistedEventsSize,i=e.type,c=e.payloadBatcher,d=e.storeType,p=e.trackDestinationWorkerScript,f=e.shouldSend;return a(void 0,void 0,void 0,function(){function e(e){return void 0===e&&(e=!1),a(this,void 0,void 0,function(){return l(this,function(t){return[2,g.flush(e)]})})}var m,g,v,y,w,b,S,C,x,k,I,O,E,M,R,P,T;return l(this,function(A){switch(A.label){case 0:return m=null!==(T=t.maxSingleEventSizeBytes)&&void 0!==T?T:de,g=new rt(o(o({},t),{loggerProvider:t.loggerProvider,payloadBatcher:c,workerScript:p})),v=function(){return new Bt({loggerProvider:t.loggerProvider,maxInterval:n,minInterval:r,maxPersistedEventsSize:s})},w=!1,S=function(){return a(void 0,void 0,void 0,function(){var e,r,n;return l(this,function(s){switch(s.label){case 0:return w?(w=!1,t.loggerProvider.warn("IDB store is experiencing repeated failures; falling back to in-memory event store."),y?[4,b.getSequencesToSend()]:[3,2]):[2];case 1:return r=s.sent(),[3,3];case 2:r=void 0,s.label=3;case 3:return e=r,b=v(),e&&y&&(n=y,e.forEach(function(e){E({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n})})),[2]}})})},C=function(){return a(void 0,void 0,void 0,function(){var e;return l(this,function(o){switch(o.label){case 0:return[4,Ut.new(i,{loggerProvider:t.loggerProvider,minInterval:r,maxInterval:n,maxPer
26sistedEventsSize:s,apiKey:t.apiKey,onPersistentFailure:function(){S()}})];case 1:return(e=o.sent())?(w=!0,[2,e]):(t.loggerProvider.log("Failed to initialize idb store, falling back to memory store."),[2,v()])}})})},"idb"!==d?[3,2]:[4,C()];case 1:return x=A.sent(),[3,3];case 2:x=v(),A.label=3;case 3:return b=x,k=[],I=0,O=function(e){if(!(e<=I)){var t=Math.min(e-I,k.length);t>0&&(k.splice(0,t),I=e)}},E=function(e){var r=e.events,n=e.sessionId,s=e.deviceId,o=e.sequenceId,c=r.map(function(e){return{event:e,bytes:new Blob([e]).size}}),u=c.filter(function(e){return e.bytes>m});u.length>0&&t.loggerProvider.warn("Dropping ".concat(u.length," oversized event(s) from session replay sequence before send. Sizes: ").concat(u.map(function(e){return"".concat(Math.round(e.bytes/1024)," KB")}).join(", "),". If this recurs, please open a GitHub issue at https://github.com/amplitude/Amplitude-TypeScript/issues or contact Amplitude support."));var h=u.length>0?c.filter(function(e){return e.bytes<=m}).map(function(e){return e.event}):r;0!==h.length?(t.debugMode&&Te().then(function(e){var r=e.totalStorageSize,n=e.percentOfQuota,s=e.usageDetails;t.loggerProvider.debug("Total storage size: ".concat(r," KB, percentage of quota: ").concat(n,"%, usage details: ").concat(s))}).catch(function(){}),g.sendEventsList({events:h,sessionId:n,flushMaxRetries:t.flushMaxRetries,apiKey:t.apiKey,deviceId:s,sampleRate:t.sampleRate,serverZone:t.serverZone,version:t.version,type:i,onComplete:function(){return a(void 0,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,b.cleanUpSessionEventsStore(n,o)];case 1:return e.sent(),[2]}})})}})):b.cleanUpSessionEventsStore(n,o).catch(function(e){t.loggerProvider.warn("Failed to clean up session replay events store:",e)})},M=function(e){var r=e.sessionId,n=e.deviceId;if(y=n,!f||f()){var s=I+k.length;b.storeCurrentSequence(r).then(function(e){e&&(O(s),E({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:n}))}).catch(function(e){t.loggerProvider.warn("Failed to get current sequence of session replay events for session:",e)})}},R=function(e){var r=e.deviceId;return a(void 0,void 0,void 0,function(){var e;return l(this,function(n){switch(n.label){case 0:return y=r,[4,b.getSequencesToSend()];case 1:return(null==(e=n.sent())?void 0:e.length)?(t.loggerProvider.log("Draining ".concat(e.length," stored sequence(s) from previous session.")),e.length>1&&g.markCoalesceNextFlush(),e.forEach(function(e){E({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:r})}),[2]):[2]}})})},P=function(e){var r=e.event,n=e.sessionId,s=e.deviceId;y=s;var o=!f||f(),i=I+k.length;k.push(r.data),b.addEventToCurrentSequence(n,r.data).then(function(e){if(e){if(!o)return b.cleanUpSessionEventsStore(e.sessionId,e.sequenceId).catch(function(e){t.loggerProvider.warn("Failed to clean up dropped session replay sequence:",e)}),void O(i);O(i),E({sequenceId:e.sequenceId,events:e.events,sessionId:e.sessionId,deviceId:s})}}).catch(function(e){t.loggerProvider.warn("Failed to add event to session replay capture:",e)})},[2,{sendCurrentSequenceEvents:M,addEvent:P,sendStoredEvents:R,flush:e,getBeaconEvents:function(){return h([],u(k),!1)},dropPendingBeaconEvents:function(){O(I+k.length)},trackDestination:g}]}})})},zt=function(){function e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=new Map;e.forEach(function(e){r.set(e.name,e.manager)}),this.managers=r}return e.prototype.sendStoredEvents=function(e){return a(this,void 0,void 0,function(){var t;return l(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEach(function(r){t.push(r.sendStoredEvents(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e.prototype.addEvent=function(e){var t,r=e.sessionId,n=e.event,s=e.deviceId;null===(t=this.managers.get(n.type))||void 0===t||t.addEvent({sessionId:r,event:n,deviceId:s})},e.prototype.sendCurrentSequenceEvents=function(e){var t=e.sessionId,r=e.deviceId;this.managers.forEach(function(e){e.sendCurrentSequenceEvents({sessionId:t,deviceId:r})})},e.prototype.flush=function(e){return a(this,void 0,void 0,function(){var t;return l(this,function(r){switch(r.label){case 0:return t=[],this.managers.forEac
vendor: 5,535 bytes, line 26
26h(function(r){t.push(r.flush(e))}),[4,Promise.all(t)];case 1:return r.sent(),[2]}})})},e}();function Wt(e,t){if(_t=new Date,e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var r={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4,timeoutMs:void 0};Nt=o(o({},r),t),Lt=function(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return e;if(e===t.root)return e.ownerDocument;return e}(Nt.root,r);var n=qt(e,"all",function(){return qt(e,"two",function(){return qt(e,"one",function(){return qt(e,"none")})})});if(n){var s=Zt(er(n,e));return s.length>0&&(n=s[0]),Vt(n)}throw new Error("Selector was not found.")}function qt(e,t,r){for(var n=null,s=[],o=e,i=0,a=function(){var e,a,l=(new Date).getTime()-_t.getTime();if(void 0!==Nt.timeoutMs&&l>Nt.timeoutMs)throw new Error("Timeout: Can't find a unique selector after ".concat(l,"ms"));var d=Yt(function(e){var t=e.getAttribute("id");if(t&&Nt.idName(t))return{name:"#"+CSS.escape(t),penalty:0};return null}(o))||Yt.apply(void 0,h([],u(function(e){var t=Array.from(e.attributes).filter(function(e){return Nt.attr(e.name,e.value)});return t.map(function(e){return{name:"[".concat(CSS.escape(e.name),'="').concat(CSS.escape(e.value),'"]'),penalty:.5}})}(o)),!1))||Yt.apply(void 0,h([],u(function(e){var t=Array.from(e.classList).filter(Nt.className);return t.map(function(e){return{name:"."+CSS.escape(e),penalty:1}})}(o)),!1))||Yt(function(e){var t=e.tagName.toLowerCase();if(Nt.tagName(t))return{name:t,penalty:2};return null}(o))||[{name:"*",penalty:3}],p=function(e){var t=e.parentNode;if(!t)return null;var r=t.firstChild;if(!r)return null;var n=0;for(;r&&(r.nodeType===Node.ELEMENT_NODE&&n++,r!==e);)r=r.nextSibling;return n}(o);if("all"==t)p&&(d=d.concat(d.filter(Kt).map(function(e){return Jt(e,p)})));else if("two"==t)d=d.slice(0,1),p&&(d=d.concat(d.filter(Kt).map(function(e){return Jt(e,p)})));else if("one"==t){var f=u(d=d.slice(0,1),1)[0];p&&Kt(f)&&(d=[Jt(f,p)])}else"none"==t&&(d=[{name:"*",penalty:3}],p&&(d=[Jt(d[0],p)]));try{for(var m=(e=void 0,c(d)),g=m.next();!g.done;g=m.next()){(f=g.value).level=i}}catch(t){e={error:t}}finally{try{g&&!g.done&&(a=m.return)&&a.call(m)}finally{if(e)throw e.error}}if(s.push(d),s.length>=Nt.seedMinLength&&(n=$t(s,r)))return"break";o=o.parentElement,i++};o;){if("break"===a())break}return n||(n=$t(s,r)),!n&&r?r():n}function $t(e,t){var r,n,s=Zt(Xt(e));if(s.length>Nt.threshold)return t?t():null;try{for(var o=c(s),i=o.next();!i.done;i=o.next()){var a=i.value;if(Ht(a))return a}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return null}function Vt(e){for(var t=e[0],r=t.name,n=1;n<e.length;n++){var s=e[n].level||0;r=t.level===s-1?"".concat(e[n].name," > ").concat(r):"".concat(e[n].name," ").concat(r),t=e[n]}return r}function Gt(e){return e.map(function(e){return e.penalty}).reduce(function(e,t){return e+t},0)}function Ht(e){var t=Vt(e);switch(Lt.querySelectorAll(t).length){case 0:throw new Error("Can't select any node with this selector: ".concat(t));case 1:return!0;default:return!1}}function Jt(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Kt(e){return"html"!==e.name&&!e.name.startsWith("#")}function Yt(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.filter(Qt);return r.length>0?r:null}function Qt(e){return null!=e}function Xt(e,t){var r,n,s,o,i,a;return void 0===t&&(t=[]),l(this,function(l){switch(l.label){case 0:if(!(e.length>0))return[3,9];l.label=1;case 1:l.trys.push([1,6,7,8]),r=c(e[0]),n=r.next(),l.label=2;case 2:return n.done?[3,5]:(s=n.value,[5,c(Xt(e.slice(1,e.length),t.concat(s)))]);case 3:l.sent(),l.label=4;case 4:return n=r.next(),[3,2];case 5:return[3,8];case 6:return o=l.sent(),i={error:o},[3,8];case 7:try{n&&!n.done&&(a=r.return)&&a.call(r)}finally{if(i)throw i.error}return[7];case 8:return[3,11];case 9:return[4,t];case 10:l.sent(),l.label=11;case 11:return[2]}})}function Zt(e){return h([],u(e),!1).sort(function(e,t){return Gt(e)-Gt(t)})}function er(e,t,r){var n,s,o;return void 0===r&&(r={counter:0,visited:new Map}),l(this,function(i){switch(i.label){case 0:if(!(e.length>2&&e.length>Nt.optimizedMinLength))return[3,5];n=1,i.label=1;case 1:return n<e.length-1?r.counter>Nt.maxNumberOfTries?[2]:(r.counter+=1,(s=h([],u(e),!1)).splice(n,1),o=Vt(s),r.visited.has(o)?[2]:Ht(s)&&function(e,t){return Lt.querySelector(Vt(e))===t}(s,t)?[4,s]:[3,4]):[3,5];case 2:return i.sent(),r.visited.set(o,!0),[5,c(er(s,t,r))];case 3:i.sent(),i.label=4;case 4:return n++,[3,1];case 5:return[2]}})}var tr=function(e){var t=e.version,r=e.events,n=[];return r.forEach(function(e){var t=JSON.parse(e);t.count=1,"click"===t.type&&n.push(t)}),{version:t,events:n}},rr=function(e){var t=e.version,r=e.events,n=[];r.forEach(function(e){var t=JSON.parse(e);"click"===t.type&&n.push(t)});var s=n.reduce(function(e,t){var r=t.x,n=t.y,s=t.selector,i=t.timestamp,a=i-i%36e5,l="".concat(r,":").concat(n,":").concat(null!=s?s:"",":").concat(a);return e[l]?e[l].count+=1:e[l]=o(o({},t),{timestamp:a,count:1}),e},{});return{version:t,events:Object.values(s)}},nr=function(e,t){var r=this;this.createHook=function(e){var t=e.eventsManager,n=e.sessionId,s=e.deviceIdFn,o=e.mirror,i=e.ugcFilterRules,a=e.performanceOptions;return function(e){if(e.type===We.Click){var l=g();
26if(l){var c=l.location,u=l.innerHeight,h=l.innerWidth;if(c){var d=e.x,p=e.y;if(void 0!==d&&void 0!==p){var f,m=o.getNode(e.id);if(m)try{f=Wt(m,a)}catch(e){r.logger.debug("error resolving selector from finder")}var v=Pe(c.href,i),y={x:d+r.scrollWatcher.currentScrollX,y:p+r.scrollWatcher.currentScrollY,selector:f,viewportHeight:u,viewportWidth:h,pageUrl:v,timestamp:Date.now(),type:"click"},w=s();w&&t.addEvent({sessionId:n,event:{type:"interaction",data:JSON.stringify(y)},deviceId:w})}}}}}},this.logger=e,this.scrollWatcher=t};function sr(){var e=g();return(null==e?void 0:e.innerHeight)||document.documentElement&&document.documentElement.clientHeight||0}function or(){var e=g();return(null==e?void 0:e.innerWidth)||document.documentElement&&document.documentElement.clientWidth||0}var ir=function(){function e(e,t){var r=g();r&&r.navigator&&"function"==typeof r.navigator.sendBeacon?this.sendBeacon=function(e,t){try{if(r.navigator.sendBeacon(e,JSON.stringify(t)))return!0}catch(e){}return!1}:this.sendBeacon=function(){return!1},this.sendXhr=function(e,t){var r=new XMLHttpRequest;return r.open("POST",e,!0),r.setRequestHeader("Accept","*/*"),r.send(JSON.stringify(t)),!0},this.basePageUrl=Se(t.serverZone,t.trackServerUrl),this.apiKey=t.apiKey,this.context=e,this.handleSendEvents=t.handleSendEvents,this.loggerProvider=t.loggerProvider}return e.prototype.send=function(e,t){var r,n=this,s=this.context,o=s.sessionId,i=s.type;if(this.handleSendEvents){var a=new URLSearchParams({device_id:e,session_id:String(o),type:String(i)}),l="".concat(this.basePageUrl,"?").concat(a.toString()),c={"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(this.apiKey)};try{this.handleSendEvents({url:l,method:"POST",headers:c,body:JSON.stringify(t),keepalive:!0}).catch(function(e){var t;null===(t=n.loggerProvider)||void 0===t||t.warn("Custom transport failed to send session replay interaction beacon:",e)})}catch(e){null===(r=this.loggerProvider)||void 0===r||r.warn("Custom transport threw while sending session replay interaction beacon:",e)}}else{var u=new URLSearchParams({device_id:e,session_id:String(o),type:String(i),api_key:this.apiKey}),h="".concat(this.basePageUrl,"?").concat(u.toString());this.sendBeacon(h,t)||this.sendXhr(h,t)}},e}(),ar=function(){function e(e,t){var r=this;this.timestamp=Date.now(),this.hook=function(e){r.update(e)},this.send=function(e){return function(t){var n,s,o,i,a=e(),l=g();if(l&&a){var c=null!==(n=l.scrollX)&&void 0!==n?n:0,u=null!==(s=l.scrollY)&&void 0!==s?s:0;(c>0||u>0)&&r.update({id:1,x:c,y:u}),r.transport.send(a,{version:1,events:[{maxScrollX:r._maxScrollX,maxScrollY:r._maxScrollY,maxScrollWidth:r._maxScrollWidth,maxScrollHeight:r._maxScrollHeight,viewportHeight:sr(),viewportWidth:or(),pageUrl:Pe(l.location.href,null!==(i=null===(o=r.config.interactionConfig)||void 0===o?void 0:o.ugcFilterRules)&&void 0!==i?i:[]),timestamp:r.timestamp,type:"scroll"}]})}}},this._maxScrollX=0,this._maxScrollY=0,this._currentScrollX=0,this._currentScrollY=0,this._maxScrollWidth=or(),this._maxScrollHeight=sr(),this.config=t,this.transport=e}return e.default=function(t,r){return new e(new ir(t,r),r)},Object.defineProperty(e.prototype,"maxScrollX",{get:function(){return this._maxScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollY",{get:function(){return this._maxScrollY},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollWidth",{get:function(){return this._maxScrollWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxScrollHeight",{get:function(){return this._maxScrollHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollX",{get:function(){return this._currentScrollX},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentScrollY",{get:function(){return this._currentScrollY},enumerable:!1,configurable:!0}),e.prototype.update=function(e){var t=Date.now();if(this._currentScrollX=e.x,this._currentScrollY=e.y,e.x>this._maxScrollX){var r=or();this._maxScrollX=e.x;var n=e.x+r;n>this._maxScrollWidth&&(this._maxScrollWidth=n),this.timestamp=t}if(e.y>this._maxScrollY){var s=sr();this._maxScrollY=e.y;var o=e.y+s;o>
26this._maxScrollHeight&&(this._maxScrollHeight=o),this.timestamp=t}},e}(),lr=function(e){var t=e.sessionId,r=e.deviceId;this.deviceId=r,this.sessionId=t,t&&r&&(this.sessionReplayId=function(e,t){return"".concat(t,"/").concat(e)}(t,r))},cr=864e5,ur=function(e){return"".concat("AMP_SR_START_").concat(e.substring(0,10),"_")},hr=function(e,t){return"".concat(ur(e)).concat(t)},dr=function(){try{var e=g();return null==e?void 0:e.localStorage}catch(e){return}},pr=function(){var e=this;this.dbs={},this.createStore=function(t){return a(e,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,mt(t,1,{upgrade:function(e){e.objectStoreNames.contains("sessionTargetingMatch")||e.createObjectStore("sessionTargetingMatch",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return a(e,void 0,void 0,function(){var e,r;return l(this,function(n){switch(n.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_session_replay_targeting"),[4,this.createStore(e)]);case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.getTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,s=t.sessionId;return a(e,void 0,void 0,function(){var e,t,o,i;return l(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=a.sent(),t=String(s),[4,e.get("sessionTargetingMatch",t)];case 2:return[2,null==(o=a.sent())?void 0:o.targetingMatch];case 3:return i=a.sent(),Mt(r,"Failed to get targeting match for session id ".concat(s,": ").concat(i),i),[3,4];case 4:return[2,void 0]}})})},this.storeTargetingMatchForSession=function(t){var r=t.loggerProvider,n=t.apiKey,s=t.sessionId,o=t.targetingMatch;return a(e,void 0,void 0,function(){var e,t,i;return l(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),[4,this.openOrCreateDB(n)];case 1:return e=a.sent(),t=String(s),[4,e.put("sessionTargetingMatch",{targetingMatch:o,sessionId:t,lastUpdated:Date.now()})];case 2:return[2,a.sent()];case 3:return i=a.sent(),Mt(r,"Failed to store targeting match for session id ".concat(s,": ").concat(i),i),[3,4];case 4:return[2,void 0]}})})},this.clearStoreOfOldSessions=function(t){var r=t.loggerProvider,n=t.apiKey,s=t.currentSessionId;return a(e,void 0,void 0,function(){var e,t,o,i,a,c,u,h;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,8,,9]),[4,this.openOrCreateDB(n)];case 1:return e=l.sent(),t=String(s),[4,(o=e.transaction("sessionTargetingMatch","readwrite")).store.getAll()];case 2:i=l.sent(),a=0,l.label=3;case 3:return a<i.length?(c=i[a],u=Date.now()-c.lastUpdated,c.sessionId!==t&&u>1728e5?[4,o.store.delete(c.sessionId)]:[3,5]):[3,6];case 4:l.sent(),l.label=5;case 5:return a++,[3,3];case 6:return[4,o.done];case 7:return l.sent(),[3,9];case 8:return h=l.sent(),Mt(r,"Failed to clear old targeting matches for sessions: ".concat(h),h),[3,9];case 9:return[2]}})})}},fr=new pr,mr=function(e){var t=e.sessionId,r=e.targetingConfig,n=e.loggerProvider,s=e.apiKey,i=e.targetingParams,c=e.urlChange,u=void 0!==c&&c;return a(void 0,void 0,void 0,function(){var e,a,c,h,d,p;return l(this,function(l){switch(l.label){case 0:return[4,fr.clearStoreOfOldSessions({loggerProvider:n,apiKey:s,currentSessionId:t})];case 1:return l.sent(),[4,fr.getTargetingMatchForSession({loggerProvider:n,apiKey:s,sessionId:t})];case 2:if(!0===l.sent()&&!u)return[2,!0];e=!0,l.label=3;case 3:return l.trys.push([3,6,,7]),[4,Promise.resolve().then(function(){return Nn})];case 4:return a=l.sent().evaluateTargeting,c=o(o({},i),{flag:r,sessionId:"string"==typeof t?parseInt(t,10):t,apiKey:s,loggerProvider:n}),[4,a(c)];case 5:return(h=l.sent())&&h.sr_targeting_config&&(e="on"===h.sr_targeting_config.key),fr.storeTargetingMatchForSession({loggerProvider:n,apiKey:s,sessionId:t,targetingMatch:e}),[3,7];case 6:return d=l.sent(),p=d,n.warn(p.message),[3,7];case 7:return[2,e]}})})},gr=2654435761,vr=2246822519,yr=3266489917,wr=374761393;function br(e,t){return(e<<t|e>>>32-t)>>>0}function Sr(e,t){return e=br(e=e+Math.imul(t,vr)>>>0,13),e=Math.imul(e,gr)>>>0}function Cr(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function xr(e,t){void 0===t&&(t=0);var r,n=function(e){for(var t=[],r=0;r<e.length;r++){var n=e.charCodeAt(r);if(n>=55296&&n<=56319&&r+1<e.length){var s=e.charCodeAt(r+1);s>=56320&&s<=57343&&(n=s-56320+(n-55296<<10)+65536,r++)}n<128?t.push(n):n<2048?t.push(192|n>>6,128|63&n):n<65536?t.push(224|n>>12,128|n>>6&63,128|63&n):t.push(240|n>>18,128|n>>12&63,128|n>>6&63,128|63&n)}return new Uint8Array(t)}(e),s=n.length,o=0;if(s>=16){for(var i=t+gr+vr>>>0,a=t+vr>>>0,l=t>>>0,c=t-gr>>>0;o<=s-16;)i=Sr(i,Cr(n,o)),a=Sr(a,Cr(n,o+=4)),l=Sr(l,Cr(n,o+=4)),c=Sr(c,Cr(n,o+=4)),o+=4;r=br(i,1)+br(a,7)+br(l,12)+br(c,18)>>>0}else r=t+wr>>>0;for(r=r+s>>>0;o<=s-4;)r=r+Math.imul(Cr(n,o),yr)>>>0,r=Math.imul(br(r,17),668265263)>>>0,o+=4;for(;o<s;)r=r+Math.imul(n[o],wr)>>>0,r=Math.imul(br(r,11),gr)>>>0,o++;return r^=r>>>15,r=Math.imul(r,vr)>>>0,r^=r>>>13,r=Math.imul(r,yr)>>>0,(r^=r>>>16)>>>0}
26var kr="__amplitude_url_tracking_patched__",Ir=new WeakMap;function Or(e,t,r){if(void 0===r&&(r={}),!(null==e?void 0:e.location))return function(){};var n=r.enablePolling,s=void 0!==n&&n,o=r.pollingInterval,i=void 0===o?oe:o;if(s){var a=function(){var t;return null!==(t=e.location.href)&&void 0!==t?t:""},l=a(),c=e.setInterval(function(){var e=a();e!==l&&(l=e,t(e))},i);return function(){null!=c&&e.clearInterval(c)}}var u=Ir.get(e);if(!u){var h=void 0,d=new Set,p=function(){var t=function(){var t;return null!==(t=e.location.href)&&void 0!==t?t:""}();void 0!==h&&t===h||(h=t,d.forEach(function(e){return e(t)}))},f=function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var n=e.apply(this,t);return p(),n};return t[kr]=!0,t},m=e.history;if(null==m?void 0:m.pushState){var g=Reflect.get(m,"pushState");g[kr]||(m.pushState=f(g))}if(null==m?void 0:m.replaceState){var v=Reflect.get(m,"replaceState");v[kr]||(m.replaceState=f(v))}u={callbacks:d,notify:p,onPopStateOrHashChange:function(){return p()},listenersAttached:!1},Ir.set(e,u)}var y=u;return y.listenersAttached||(e.addEventListener("popstate",y.onPopStateOrHashChange),e.addEventListener("hashchange",y.onPopStateOrHashChange),y.listenersAttached=!0),y.callbacks.add(t),function(){y.callbacks.delete(t),0===y.callbacks.size&&y.listenersAttached&&(e.removeEventListener("popstate",y.onPopStateOrHashChange),e.removeEventListener("hashchange",y.onPopStateOrHashChange),y.listenersAttached=!1)}}function Er(e){return void 0===e&&(e={}),{name:"amplitude/url-tracking@1",observer:function(t,r,n){var s,i,a,l=o(o({},e),n),c=l.ugcFilterRules||[],u=null!==(s=l.enablePolling)&&void 0!==s&&s,h=null!==(i=l.pollingInterval)&&void 0!==i?i:oe,d=null!==(a=l.captureDocumentTitle)&&void 0!==a&&a;if(!r)return function(){};var p=void 0,f=function(){return r.location&&r.location.href||""},m=function(){var e=f();if(void 0===p||e!==p){p=e;var n=function(){var e=r.innerHeight,t=r.innerWidth,n=r.document,s=f(),o="";return d&&(o=(null==n?void 0:n.title)||""),{href:c.length>0?Pe(s,c):s,title:o,viewportHeight:e,viewportWidth:t,type:"url-change-event"}}();t(n)}},g=Or(r,function(){return m()},u?{enablePolling:!0,pollingInterval:h}:{});return m(),function(){return g()}},options:e}}Er();var Mr=function(){function e(){this.pendingLoadListeners=new Map}return e.prototype.start=function(){var e,t=this;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),g()&&(this.sendToAllIframes({type:ye,action:"start"}),this.mutationObserver=new MutationObserver(function(e){var r,n,s,o,i,a;try{for(var l=c(e),u=l.next();!u.done;u=l.next()){var h=u.value;try{for(var d=(s=void 0,c(Array.from(h.addedNodes))),p=d.next();!p.done;p=d.next()){(g=p.value)instanceof HTMLIFrameElement?t.sendToIframeAfterLoad(g):g instanceof Element&&g.querySelectorAll("iframe").forEach(function(e){t.sendToIframeAfterLoad(e)})}}catch(e){s={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(s)throw s.error}}try{for(var f=(i=void 0,c(Array.from(h.removedNodes))),m=f.next();!m.done;m=f.next()){var g;if((g=m.value)instanceof HTMLIFrameElement){var v=t.pendingLoadListeners.get(g);v&&(g.removeEventListener("load",v),t.pendingLoadListeners.delete(g))}}}catch(e){i={error:e}}finally{try{m&&!m.done&&(a=f.return)&&a.call(f)}finally{if(i)throw i.error}}}}catch(e){r={error:e}}finally{try{u&&!u.done&&(n=l.return)&&n.call(l)}finally{if(r)throw r.error}}}),this.mutationObserver.observe(document.documentElement,{childList:!0,subtree:!0}))},e.prototype.stop=function(){var e;null===(e=this.mutationObserver)||void 0===e||e.disconnect(),this.mutationObserver=void 0,this.pendingLoadListeners.forEach(function(e,t){t.removeEventListener("load",e)}),this.pendingLoadListeners.clear(),this.sendToAllIframes({type:ye,action:"stop"})},e.prototype.sendToIframeAfterLoad=function(e){var t=this,r=function(){t.pendingLoadListeners.delete(e),t.sendToIframe(e,{type:ye,action:"start"})};this.pendingLoadListeners.set(e,r),e.addEventListener("load",r,{once:!0})},e.prototype.sendToAllIframes=function(e){var t=this;document.querySelectorAll("iframe").forEach(function(r){return t.sendToIframe(r,e)})},e.prototype.sendToIframe=function(e,t){var r;try{null===(r=e.contentWindow)||void 0===r||r.postMessage(t,"*")}catch(e){}},e}();var Rr,Pr,Tr,Ar=function(){function e(){var e=this;this.name="@amplitude/session-replay-browser",this.recordCancelCallback=null,this.eventCount=0,this.sessionTargetingMatch=!1,this.pageLeaveFns=[],this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,this.recordFunction=null,this.recordEventsInFlight=!1,this.pendingEmitEvents=[],this.currentPageUrl="",this.recordEventsPendingShouldLogMetadata=null,this.urlChangeCleanup=null,this.crossOriginIframeC
26oordinator=null,this.crossOriginParentSignalCleanup=null,this.latestUrlChangeTargetingEvaluationId=0,this.teardownEventListeners=function(t){var r=g();r&&(r.removeEventListener("blur",e.blurListener),r.removeEventListener("focus",e.focusListener),!t&&r.addEventListener("blur",e.blurListener),!t&&r.addEventListener("focus",e.focusListener),r.self&&"onpagehide"in r.self?(r.removeEventListener("pagehide",e.pageLeaveListener),!t&&r.addEventListener("pagehide",e.pageLeaveListener)):(r.removeEventListener("beforeunload",e.pageLeaveListener),!t&&r.addEventListener("beforeunload",e.pageLeaveListener)))},this.blurListener=function(){e.sendEvents()},this.focusListener=function(){var t;if(e.recordCancelCallback&&e.recordFunction){if(!1===(null===(t=e.config)||void 0===t?void 0:t.captureFullSnapshotOnFocus))return;try{e.recordFunction.takeFullSnapshot(!0)}catch(t){e.loggerProvider.warn("Failed to take full snapshot on focus:",t)}}else e.recordEventsInFlight||e.recordEvents(!1)},this.pageLeaveListener=function(t){var r;null===(r=e.eventCompressor)||void 0===r||r.flushQueue(),e.sendEvents(),e.pageLeaveFns.forEach(function(e){e(t)})},this.evaluateTargetingAndCapture=function(t,r,n,o){return void 0===r&&(r=!1),void 0===n&&(n=!1),void 0===o&&(o=!1),a(e,void 0,void 0,function(){var e,i,a,c,u,h,d,p,f,m,v,y;return l(this,function(l){switch(l.label){case 0:if(!this.identifiers||!this.identifiers.sessionId||!this.config)return this.identifiers&&!this.identifiers.sessionId?this.loggerProvider.log("Session ID has not been set yet, cannot evaluate targeting for Session Replay."):this.loggerProvider.warn("Session replay init has not been called, cannot evaluate targeting."),[2];if(!this.config.targetingConfig){if(!r)return this.loggerProvider.log("No targeting config set, skipping initialization/recording for event."),[2];this.loggerProvider.log("Targeting config has not been set yet, cannot evaluate targeting.")}return this.lastTargetingParams=t,e=this.config.targetingConfig,e&&!this.sessionTargetingMatch?(i=o?this.latestUrlChangeTargetingEvaluationId:void 0,(a=t.event)&&Object.values(s).includes(a.event_type)&&(a=void 0),c=null!==(v=null!==(p=null===(d=t.page)||void 0===d?void 0:d.url)&&void 0!==p?p:null===(m=null===(f=g())||void 0===f?void 0:f.location)||void 0===m?void 0:m.href)&&void 0!==v?v:"",u=null!==(y=t.page)&&void 0!==y?y:""!==c?{url:c}:void 0,[4,mr({sessionId:this.identifiers.sessionId,targetingConfig:e,loggerProvider:this.loggerProvider,apiKey:this.config.apiKey,targetingParams:{userProperties:t.userProperties,event:a,page:u},urlChange:o})]):[3,2];case 1:if(h=l.sent(),o&&void 0!==i&&i!==this.latestUrlChangeTargetingEvaluationId)return this.loggerProvider.debug("Ignoring stale URL-change targeting result #".concat(i,"; latest is #").concat(this.latestUrlChangeTargetingEvaluationId,".")),[2];this.sessionTargetingMatch=this.sessionTargetingMatch||h,this.loggerProvider.debug(JSON.stringify({name:"targeted replay capture config",sessionTargetingMatch:this.sessionTargetingMatch,event:a,targetingParams:t},null,2)),l.label=2;case 2:return r?(this.initialize(!0),[3,5]):[3,3];case 3:return!n&&this.recordCancelCallback?[3,5]:(this.loggerProvider.log("Recording events for session due to forceRestart or no ongoing recording."),[4,this.recordEvents()]);case 4:l.sent(),l.label=5;case 5:return[2]}})})},this.addCustomRRWebEvent=function(t,r,n){return void 0===r&&(r={}),void 0===n&&(n=!0),a(e,void 0,void 0,function(){var e,s,i,a;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),e=void 0,(s=this.config)&&t!==ee.METADATA?(e={config:Ae(s),version:et},n?[4,Te()]:[3,2]):[3,2];case 1:i=l.sent(),e=o(o({},i),e),l.label=2;case 2:return this.recordCancelCallback&&this.recordFunction?this.recordFunction.addCustomEvent(t,o(o({},r),e)):this.loggerProvider.debug("Not able to add custom replay capture event ".concat(t," due to no ongoing recording.")),[3,4];case 3:return a=l.sent(),this.loggerProvider.debug("Error while adding custom replay capture event: ",a),[3,4];case 4:return[2]}})})},this.stopRecordingEvents=function(){var t,r,n;try{e.loggerProvider.log("Session Replay capture stopping."),e.recordCancelCallback&&e.recordCancelCallback(),e.recordCancelCallback=null,null===(t=e.networkObservers)||void 0===t||t.stop(),null===(r=e.crossOriginIframeC
26oordinator)||void 0===r||r.stop(),e.crossOriginIframeCoordinator=null,null===(n=e.crossOriginParentSignalCleanup)||void 0===n||n.call(e),e.crossOriginParentSignalCleanup=null}catch(t){var s=t;e.loggerProvider.warn("Error occurred while stopping replay capture: ".concat(s.toString()))}},this.loggerProvider=new we(new S)}return e.prototype.init=function(e,t){return w(this._init(e,t))},e.prototype.setupUrlChangeListener=function(){var e,t,r=this;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this);var n=g();if(null==n?void 0:n.location){var s=!!(null===(t=this.config)||void 0===t?void 0:t.targetingConfig),o=Or(n,function(e){if(r.currentPageUrl=e,s){var t=++r.latestUrlChangeTargetingEvaluationId;r.evaluateTargetingAndCapture({userProperties:{},event:void 0,page:{url:e}},!1,!1,!0),r.loggerProvider.debug("Queued URL-change targeting re-evaluation #".concat(t," for ").concat(e,"."))}});this.urlChangeCleanup=function(){o(),r.urlChangeCleanup=null}}},e.prototype.isBelowMinSessionDuration=function(){var e,t=null===(e=this.config)||void 0===e?void 0:e.minSessionDurationMs;return void 0!==t&&void 0!==this.sessionStartTime&&Date.now()-this.sessionStartTime<t},e.prototype.getCurrentPageForTargeting=function(){var e,t,r=null===(t=null===(e=g())||void 0===e?void 0:e.location)||void 0===t?void 0:t.href;return null!=r?{url:r}:void 0},e.prototype._init=function(e,t){var r,n,s,i,d,p,f,m,v,y,w,b,C,x;return a(this,void 0,void 0,function(){var a,k,I,O,E,M,R,P,T,A,N,L,_,D,F,U,B,j,z,W,q,$,V,G,H,K,Y,Q,ee,te,re,ne=this;return l(this,function(l){switch(l.label){case 0:return null===(r=this.urlChangeCleanup)||void 0===r||r.call(this),this.loggerProvider=new we(t.loggerProvider||new S),Object.prototype.hasOwnProperty.call(t,"logLevel")&&this.loggerProvider.enable(t.logLevel),this.currentPageUrl=Ee(),this.identifiers=new lr({sessionId:t.sessionId,deviceId:t.deviceId}),a=Date.now(),function(e,t,r){var n,s,o=dr();if(o){var i=ur(e);try{for(var a=[],l=0;l<o.length;l++)if((f=o.key(l))&&f.startsWith(i)){var u=o.getItem(f);if(null!==u){var h=Number(u);(!Number.isFinite(h)||h<=0||t-h>=cr)&&a.push(f)}}try{for(var d=c(a),p=d.next();!p.done;p=d.next()){var f=p.value;o.removeItem(f)}}catch(e){n={error:e}}finally{try{p&&!p.done&&(s=d.return)&&s.call(d)}finally{if(n)throw n.error}}}catch(e){null==r||r.debug("Failed to prune stale replay start times: ".concat(String(e)))}}}(e,a,this.loggerProvider),this.sessionStartTime=void 0!==t.sessionId&&null!==(n=function(e,t,r,n){var s=dr();if(s){var o=hr(e,t);try{var i=s.getItem(o);if(null!==i){var a=Number(i);if(Number.isFinite(a)&&a>0&&a<=r&&r-a<cr)return a}return s.setItem(o,String(r)),r}catch(e){return void(null==n||n.debug("Failed to read/write replay start time from storage: ".concat(String(e))))}}}(e,t.sessionId,a,this.loggerProvider))&&void 0!==n?n:a,k=this,[4,Ve(e,t)];case 1:return k.joinedConfigGenerator=l.sent(),[4,this.joinedConfigGenerator.generateJoinedConfig()];case 2:return I=l.sent(),O=I.joinedConfig,E=I.localConfig,M=I.remoteConfig,this.config=O,this.setMetadata(t.sessionId,O,E,M,null===(s=t.version)||void 0===s?void 0:s.version,et,null===(i=t.version)||void 0===i?void 0:i.type),this.pageLeaveFns=[],t.sessionId&&(null===(d=this.config.interactionConfig)||void 0===d?void 0:d.enabled)&&(R=ar.default({sessionId:t.sessionId,type:"interaction"},this.config),this.pageLeaveFns=[R.send(this.getDeviceId.bind(this)).bind(R)],this.scrollHook=R.hook.bind(R),this.clickHandler=new nr(this.loggerProvider,R)),P=[],"idb"!==(T=this.config.storeType)||(null===(p=g())||void 0===p?void 0:p.indexedDB)||(T="memory",this.loggerProvider.warn("Could not use preferred indexedDB storage, reverting to in memory option.")),this.loggerProvider.log("Using ".concat(T," for event storage.")),L=g(),this.config.useWebWorker&&L&&L.Worker?[4,Promise.resolve().then(function(){return Ln})]:[3,4];case 3:_=l.sent(),D=_.compressionScript,F=_.trackDestinationScript,A=D,N=F,l.label=4;case 4:return l.trys.push([4,6,,7]),[4,jt({config:this.config,type:"replay",minInterval:null===(f=this.config.flushIntervalConfig)||void 0===f?void 0:f.minIntervalMs,maxInterval:null===(m=this.config.flushIntervalConfig)||void 0===m?void 0:m.maxIntervalMs,maxPer
26sistedEventsSize:this.config.maxPersistedEventsSizeBytes,storeType:T,trackDestinationWorkerScript:N,shouldSend:function(){return!ne.isBelowMinSessionDuration()}})];case 5:return U=l.sent(),this.rrwebEventManager=U,P.push({name:"replay",manager:U}),[3,7];case 6:return B=l.sent(),q=B,this.loggerProvider.warn("Error occurred while creating replay events manager: ".concat(q.toString())),[3,7];case 7:if(!(null===(v=this.config.interactionConfig)||void 0===v?void 0:v.enabled))return[3,11];j=this.config.interactionConfig.batch?rr:tr,l.label=8;case 8:return l.trys.push([8,10,,11]),[4,jt({config:this.config,type:"interaction",minInterval:null!==(y=this.config.interactionConfig.trackEveryNms)&&void 0!==y?y:3e4,maxInterval:6e4,maxPersistedEventsSize:this.config.maxPersistedEventsSizeBytes,payloadBatcher:j,storeType:T,trackDestinationWorkerScript:N})];case 9:return z=l.sent(),P.push({name:"interaction",manager:z}),[3,11];case 10:return W=l.sent(),q=W,this.loggerProvider.warn("Error occurred while creating interaction events manager: ".concat(q.toString())),[3,11];case 11:if(this.eventsManager=new(zt.bind.apply(zt,h([void 0],u(P),!1))),this.eventCompressor&&this.eventCompressor.terminate(),$=!0===this.config.eagerFullSnapshotSend?function(){return ne.sendEvents()}:void 0,this.eventCompressor=new Ye(this.eventsManager,this.config,this.getDeviceId(),A,$),this.pendingEmitEvents.length>0){V=this.pendingEmitEvents.splice(0);try{for(G=c(V),H=G.next();!H.done;H=G.next())K=H.value,Y=K.event,Q=K.sessionId,this.eventCompressor.enqueueEvent(Y,Q)}catch(e){te={error:e}}finally{try{H&&!H.done&&(re=G.return)&&re.call(G)}finally{if(te)throw te.error}}}return this.pageLeaveFns=h(h([],u(this.pageLeaveFns),!1),[function(){var e;if(ne.config&&(null===(e=ne.identifiers)||void 0===e?void 0:e.sessionId)&&U){var t=U.getBeaconEvents();if(t.length){var r=ne.getDeviceId();r&&(ne.isBelowMinSessionDuration()||U.trackDestination.sendBeacon({events:t,sessionId:ne.identifiers.sessionId,deviceId:r,apiKey:ne.config.apiKey,serverZone:ne.config.serverZone}))}}}],!1),[4,this.initializeNetworkObservers()];case 12:return l.sent(),(null===(w=g())||void 0===w?void 0:w.opener)&&(function(e,t){var r,n=e;if(!0!==n[Z]){n[Z]=!0;var s=null!==(r=null==t?void 0:t.scriptUrl)&&void 0!==r?r:"https://cdn.amplitude.com/libs/background-capture-1.0.3.js.gz",o=null,i=function(t,r){var n,s;"background-capture-complete"===t&&(null===(s=null===(n=e.logger)||void 0===n?void 0:n.debug)||void 0===s||s.call(n,"Background capture complete"),e.notify({action:"background-capture-complete",data:r}))};e.registerActionHandler("initialize-background-capture",function(){var t,r;null===(r=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Initializing background capture (external script)");var n=new URL(s,e.endpoint).toString();e.loadScriptOnce(n).then(function(){var t,r,n;null===(r=null===(t=e.logger)||void 0===t?void 0:t.debug)||void 0===r||r.call(t,"Background capture script loaded (external)"),o=null===(n=null===window||void 0===window?void 0:window.amplitudeBackgroundCapture)||void 0===n?void 0:n.call(window,{messenger:e,onBackgroundCapture:i}),e.notify({action:"background-capture-loaded"})}).catch(function(){var t;null===(t=e.logger)||void 0===t||t.warn("Failed to initialize background capture")})}),e.registerActionHandler("close-background-capture",function(){var e;null===(e=null==o?void 0:o.close)||void 0===e||e.call(o),o=null})}}(ee=X()),ee.setup(o({logger:this.loggerProvider},this.config.serverZone&&{endpoint:J[this.config.serverZone]}))),this.loggerProvider.log("Installing @amplitude/session-replay-browser."),this.teardownEventListeners(!1),[4,this.evaluateTargetingAndCapture({userProperties:t.userProperties,page:this.getCurrentPageForTargeting()},!0)];case 13:return l.sent(),(this.config.targetingConfig||(null!==(x=null===(C=null===(b=this.config.privacyConfig)||void 0===b?void 0:b.urlMaskLevels)||void 0===C?void 0:C.length)&&void 0!==x?x:0)>0)&&this.setupUrlChangeListener(),[2]}})})},e.prototype.setSessionId=function(e,t){return w(this.asyncSetSessionId(e,t))},e.prototype.asyncSetSessionId=function(e,t,r){var n,s,o,i;return a(this,void 0,void 0,function(){var a,c,u,h,d;return l(this,function(l){switch(l.label){case 0:return a=null===(n=this.identifiers)||void 0===n?void 0:n.sessionId,c=this.getDeviceId(),void 0===a||a!==e||void 0!==t&&t!==c||void 0!==(null==r?void 0:r.userProperties)&&0!==Object.keys(r.userProperties).length?(this.latestUrlChangeTargetingEvaluationId++,this.sessionTargetingMatch=!1,this.lastShouldRecordDecision=void 0,a&&this.sendEvents(a),(u=a!==e)&&(null===(s=this.rrwebEventManager)||void 0===s||s.dropPendingBeaconEvents()),h=t||this.getDeviceId(),this.identifiers=new lr({sessionId:e,deviceId:h}),u&&(this.sessionStartTime=Date.now(),this.suppressedSendCount=0,this.hasEmittedGateDecision=!1,(null===(o=this.config)||void 0===o?void 0:o.apiKey)&&(function(e,t,r,n){var s=dr();if(s)try{s.setItem(hr(e,t),String(r))}catch(e){null==n||n.debug("Failed to write replay start time to storage: ".concat(String(e)))}}(this.config.apiKey,e,this.sessionStartTime,this.loggerProvider),void 0!==a&&function(e,t,r){var n=dr();if(n)try{n.removeItem(hr(e,t))}catch(e){null==r||r.debug("Failed to remove replay start time from storage: ".concat(String(e)))}}(this.config.apiKey,a,this.loggerProvider))),this.joinedConfigGenerator&&a?[4,this.joinedConfigGenerator.generateJoinedConfig()]:[3,2]):[2];case 1:d=l.sent().joinedConfig,this.config=d,l.label=2;case 2:return(null===(i=this.config)||void 0===i?void 0:i.targetingConfig)?[4,this.evaluateTargetingAndCapture({userProperties:null==r?void 0:r.userProperties,page:this.getCurrentPageForTargeting()},!1,!0)]:[3,4];case 3:return l.sent(),[3,6];case 4:return[4,this.recordEvents()];case 5:l.sent(),l.label=6;case 6:return[2]}})})},e.prototype.getSessionReplayProperties=function(){var e,t=this.config,r=this.identifiers;if(!t||!r)return this.loggerProvider.warn("Session replay init has not been called, cannot get session replay properties."),{};var n=this.getShouldRecord(),s={};return n&&((e={}
26)[re]=r.sessionReplayId?r.sessionReplayId:null,s=e,t.debugMode&&(s[ie]=JSON.stringify({appHash:F(t.apiKey).toString()}))),this.addCustomRRWebEvent(ee.GET_SR_PROPS,{shouldRecord:n,eventProperties:s},10===this.eventCount),10===this.eventCount&&(this.eventCount=0),this.eventCount++,s},e.prototype.sendEvents=function(e){var t,r,n=e||(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId),s=this.getDeviceId();if(this.eventsManager&&n&&s){if(this.isBelowMinSessionDuration()){var o=this.sessionStartTime,i=this.config.minSessionDurationMs;return this.loggerProvider.log("Session ".concat(n," not sent: duration ").concat(Date.now()-o,"ms is below minimum ").concat(i,"ms.")),void this.suppressedSendCount++}if(!this.hasEmittedGateDecision&&void 0!==(null===(r=this.config)||void 0===r?void 0:r.minSessionDurationMs)&&this.recordCancelCallback&&this.recordFunction){this.hasEmittedGateDecision=!0;var a=void 0!==this.sessionStartTime?Date.now()-this.sessionStartTime:void 0;this.addCustomRRWebEvent(ee.REPLAY_GATE_DECISION,{sessionId:n,suppressedSendCount:this.suppressedSendCount,elapsedMs:a,minSessionDurationMs:this.config.minSessionDurationMs},!1)}this.eventsManager.sendCurrentSequenceEvents({sessionId:n,deviceId:s})}},e.prototype.initialize=function(e){var t;return void 0===e&&(e=!1),a(this,void 0,void 0,function(){var r;return l(this,function(n){return(null===(t=this.identifiers)||void 0===t?void 0:t.sessionId)?(r=this.getDeviceId())?(this.eventsManager&&e&&this.eventsManager.sendStoredEvents({deviceId:r}),[2,this.recordEvents()]):(this.loggerProvider.log("Session is not being recorded due to lack of device id."),[2,Promise.resolve()]):(this.loggerProvider.log("Session is not being recorded due to lack of session id."),[2,Promise.resolve()])})})},e.prototype.shouldOptOut=function(){var e,t,r,n;(null===(e=this.config)||void 0===e?void 0:e.instanceName)&&(r=(n=this.config.instanceName,void 0===n&&(n=p),D.getInstance(n)).identityStore.getIdentity().optOut);return void 0!==r?r:null===(t=this.config)||void 0===t?void 0:t.optOut},e.prototype.getShouldRecord=function(){if(!this.identifiers||!this.config||!this.identifiers.sessionId)return this.loggerProvider.warn("Session is not being recorded due to lack of config, please call sessionReplay.init."),!1;if(!this.config.captureEnabled)return this.loggerProvider.log("Session ".concat(this.identifiers.sessionId," not being captured due to capture being disabled for project or because the remote config could not be fetched.")),!1;if(this.shouldOptOut())return this.loggerProvider.log("Opting session ".concat(this.identifiers.sessionId," out of recording due to optOut config.")),!1;var e,t,r=!1,n="",s=!1;this.config.targetingConfig?this.sessionTargetingMatch?(n="Capturing replays for session ".concat(this.identifiers.sessionId," due to matching targeting conditions."),this.loggerProvider.log(n),r=!0,s=!0):(n="Not capturing replays for session ".concat(this.identifiers.sessionId," due to not matching targeting conditions."),this.loggerProvider.log(n),r=!1,s=!1):(e=this.identifiers.sessionId,t=this.config.sampleRate,xr(e.toString())%1e6/1e6<t)?(r=!0,s=!0):(n="Opting session ".concat(this.identifiers.sessionId," out of recording due to sample rate."),this.loggerProvider.log(n),r=!1,s=!1);return this.lastShouldRecordDecision!==r&&this.config.targetingConfig&&(this.addCustomRRWebEvent(ee.TARGETING_DECISION,{message:n,sessionId:this.identifiers.sessionId,matched:s,targetingParams:this.lastTargetingParams}),this.lastShouldRecordDecision=r),r},e.prototype.getBlockSelectors=function(){var e,t,r,n=null!==(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.privacyConfig)||void 0===t?void 0:t.blockSelector)&&void 0!==r?r:[];if(0!==n.length)return n},e.prototype.getMaskTextSelectors=function(){var e,t,r=null===(e=this.config)||void 0===e?void 0:e.privacyConfig;if("conservative"===(r?xe(this.currentPageUrl,r):void 0))return"*";if(null===(t=null==r?void 0:r.urlMaskLevels)||void 0===t?void 0:t.some(function(e){return"conservative"===e.maskLevel}))return"*";var n=null==r?void 0:r.urlMaskLevels;if("conservative"===(null==r?void 0:r.defaultMaskLevel)&&n&&n.length>0)return"*";var s=null==r?void 0:r.maskSelector;return s||void 0},e.prototype.getRecordingPlugins=function(e){var t,r,n,s,o,i;return a(this,void 0,void 0,function(){var a,c,u,h;return l(this,function(l){switch(l.label){case 0:a=[];try{c=Er({ugcFilterRules:(null===(r=null===(t=this.config)||void 0===t?void 0:t.interactionConfig)||void 0===r?void 0:r.ugcFilterRules)||[],enablePolling:(null===(n=this.config)||void 0===n?void 0:n.enableUrlChangePolling)||!1,pollingInterval:null===(s=this.config)||void 0===s?void 0:s.urlChangePollingInterval,captureDocumentTitle:null===(o=this.config)||void 0===o?void 0:o.captureDocumentTitle}),a.push(c)}catch(e){this.loggerProvider.warn("Failed to create URL tracking plugin:",e)}if(!(null===(i=null==e?void 0:e.console)||void 0===i?void 0:i.enabled))return[3,4];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return Ka})];case 2:return u=l.sent().getRecordConsolePlugin,a.push(u({level:e.console.levels})),[3,4];case 3:return h=l.sent(),this.loggerProvider.warn("Failed to load console plugin:",h),[3,4];case 4:return[2,a.length>0?a:void 0]}})})},e.prototype.getRecordFunction=function(){return a(this,void 0,void 0,function(){var e,t;return l(this,function(r){switch(r.label){case 0:if(this.recordFunction)return[2,this.recordFunction];r.label=1;case 1:return r.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return Gp})];case 2:return e=r.sent().record,this.recordFunction=e,[2,e];case 3:return t=r.sent(),this.loggerProvider.warn("Failed to load rrweb-record module:",t),[2,null];case 4:return[2]}})})},e.prototype.recordEvents=function(e){return void 0===e&&(e=!0),a(this,void 0,void 0,function(){var t;return l(this,function(r){switch(r.label){case 0:if(this.recordEventsInFlight)return this.recordEventsPendingShouldLogMetadata=e,[2];this.recordEventsInFlight=!0,r.label=1;case 1:return r.trys.push([1,,6,7]),[4,this._recordEvents(e)];case 2:r.sent(),r.label=3;case 3:return null===this.recordEventsPendingShouldLogMetadata?[3,5]:(t=this.recordEventsPendingShouldLogMetadata,this.recordEventsPendingShouldLogMetadata=null,[4,this._recordEvents(t)]);case 4:return r.sent(),[3,3];case 5:return[3,7];case 6:return this.recordEventsInFlight=!1,this.recordEventsPendingShouldLogMetadata=null,[7];case 7:return[2]}})})},e.prototype._recordEvents=function(e){var t,r,n,s,i,c,u,h;return void 0===e&&(e=!0),a(this,void 0,void 0,function(){var a,d,p,f,m,v,y,w,b,S,C,x,k,I,O,E,M,R,P,T=this;return l(this,function(l){switch(l.label){case 0:return a=this.config,d=this.getShouldRecord(),p=null===(t=this.identifiers)||void 0===t?void 0:t.sessionId,d&&p&&a?(this.stopRecordingEvents(),[4,this.getRecordFunction()]):[2];case 1:return(f=l.sent())?[4,this.initializeNetworkObservers()]:[2];case 2:l.sent(),m=null===(r=a.loggingConfig)||void 0===r?void 0:r.network,v=Se(a.serverZone,a.trackServerUrl),y=[ce,ue,he,v],null===(n=this.networkObservers)||void 0===n||n.start(function(e){y.some(function(t){return e.url.
26startsWith(t)})||T.addCustomRRWebEvent(ee.FETCH_REQUEST,e)},m),w=a.interactionConfig,b=a.loggingConfig,S=(null==w?void 0:w.enabled)?{mouseInteraction:this.eventsManager&&(null===(s=this.clickHandler)||void 0===s?void 0:s.createHook({eventsManager:this.eventsManager,sessionId:p,deviceIdFn:this.getDeviceId.bind(this),mirror:f.mirror,ugcFilterRules:null!==(i=w.ugcFilterRules)&&void 0!==i?i:[],performanceOptions:null===(c=a.performanceConfig)||void 0===c?void 0:c.interaction})),scroll:this.scrollHook}:{},C=(null==w?void 0:w.enabled)&&w.ugcFilterRules?w.ugcFilterRules:[],this.loggerProvider.log("Session Replay capture beginning for ".concat(p,".")),l.label=3;case 3:return l.trys.push([3,5,,6]),x=!!(null===(u=a.crossOriginIframes)||void 0===u?void 0:u.enabled),k=!1!==(null===(h=a.crossOriginIframes)||void 0===h?void 0:h.coordinateChildren),(I=x&&function(){try{var e=g();return!!e&&e.parent!==e}catch(e){return!0}}())&&k?(this.crossOriginParentSignalCleanup=function(e){var t=g();if(!t)return function(){};var r=t.parent;function n(t){if(t.source===r){var n=t.data;(null==n?void 0:n.type)===ye&&("start"===n.action?e.onStart():"stop"===n.action&&e.onStop())}}return t.addEventListener("message",n),function(){return t.removeEventListener("message",n)}}({onStart:function(){return T._recordEventsInChildMode(f,p,a,S)},onStop:function(){try{T.recordCancelCallback&&T.recordCancelCallback(),T.recordCancelCallback=null}catch(t){var e=t;T.loggerProvider.warn("Error occurred while stopping child iframe replay capture: ".concat(e.toString()))}}}),[2]):(O=this,E=f,M=[o({},this.buildRRWebRecordOptions(a,S,function(e){if(T.shouldOptOut())return T.loggerProvider.log("Opting session ".concat(p," out of recording due to optOut config.")),T.stopRecordingEvents(),void T.sendEvents();e.type===je.Meta&&(e.data.href=Pe(e.data.href,C)),T.eventCompressor?T.eventCompressor.enqueueEvent(e,p):T.pendingEmitEvents.push({event:e,sessionId:p})},"Error while capturing replay: "))],P={},[4,this.getRecordingPlugins(b)]);case 4:return O.recordCancelCallback=E.apply(void 0,[o.apply(void 0,M.concat([(P.plugins=l.sent(),P.recordCrossOriginIframes=x,P)]))]),x&&!I&&k&&(this.crossOriginIframeCoordinator||(this.crossOriginIframeCoordinator=new Mr),this.crossOriginIframeCoordinator.start()),this.addCustomRRWebEvent(ee.DEBUG_INFO),e&&this.addCustomRRWebEvent(ee.METADATA,this.metadata),[3,6];case 5:return R=l.sent(),this.loggerProvider.warn("Failed to initialize session replay:",R),[3,6];case 6:return[2]}})})},e.prototype.buildRRWebRecordOptions=function(e,t,r,n){var s=this,i=e.privacyConfig;return o(o({emit:r,inlineStylesheet:e.shouldInlineStylesheet,hooks:t,maskAllInputs:!0,maskTextClass:ae,blockClass:"amp-block",blockSelector:this.getBlockSelectors(),applyBackgroundColorToBlockedElements:e.applyBackgroundColorToBlockedElements,maskInputFn:Ie("input",i,function(){return s.currentPageUrl}),maskTextFn:Ie("text",i,function(){return s.currentPageUrl}),maskAttributeFn:Oe(i,function(){return s.currentPageUrl}),maskTextSelector:this.getMaskTextSelectors()},void 0!==e.fullSnapshotIntervalMs&&{checkoutEveryNms:e.fullSnapshotIntervalMs}),{recordCanvas:!1,captureAdoptedStyleSheets:e.captureAdoptedStyleSheets,slimDOMOptions:{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0},errorHandler:function(e){var t=e;if(t.message.includes("insertRule")&&t.message.includes("CSSStyleSheet"))throw t;if(t._external_)throw t;return s.loggerProvider.warn(n,t.toString()),!0}})},e.prototype._recordEventsInChildMode=function(e,t,r,n){try{this.recordCancelCallback&&this.recordCancelCallback(),this.recordCancelCallback=null,this.recordCancelCallback=e(o(o({},this.buildRRWebRecordOptions(r,n,function(){},"Error while capturing replay (child iframe): ")),{recordCrossOriginIframes:!0})),this.loggerProvider.log("Session Replay child iframe capture beginning for session ".concat(t,"."))}catch(e){this.loggerProvider.warn("Failed to initialize session replay in child iframe mode:",e)}},e.prototype.getDeviceId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.deviceId},e.prototype.getSessionId=function(){var e;return null===(e=this.identifiers)||void 0===e?void 0:e.sessionId},e.prototype.flush=function(e){var t;return void 0===e&&(e=!1),a(this,void 0,void 0,function(){return l(this,function(r){return[2,null===(t=this.eventsManager)||void 0===t?void 0:t.flush(e)]})})},e.prototype.shutdown=function(){var e,t;null===(e=this.urlChangeCleanup)||void 0===e||e.call(this),null===(t=this.crossOriginParentSignalCleanup)||void 0===t||t.call(this),this.crossOriginParentSignalCleanup=null,this.teardownEventListeners(!0),this.stopRecordingEvents(),this.sendEvents()},e.prototype.mapSDKType=function(e){return"plugin"===e?"@amplitude/plugin-session-replay-browser":"segment"===e?"@amplitude/segment-session-replay-plugin":null},e.prototype.setMetadata=function(e,t,r,n,s,o,i){var a=(null==e?void 0:e.toString())?F(e.toString()):void 0;this.metadata={joinedConfig:t,localConfig:r,remoteConfig:n,sessionId:e,hashValue:a,sampleRate:t.sampleRate,replaySDKType:this.mapSDKType(i),replaySDKVersion:s,standaloneSDKType:"@amplitude/session-replay-browser",standaloneSDKVersion:o}},e.prototype.initializeNetworkObservers=function(){var e,t,r;return a(this,void 0,void 0,function(){var n,s;return l(this,function(o){switch(o.label){case 0:if(!(null===(r=null===(t=null===(e=this.config)||void 0===e?void 0:e.loggingConfig)||void 0===t?void 0:t.network)||void 0===r?void 0:r.enabled)||this.networkObservers)return[3,4];o.label=1;case 1:return o.trys.push([1,3,,4]),[4,Promise.resolve().then(function(){return Yp})];case 2:return n=o.sent().NetworkObservers,this.networkObservers=new n,[3,4];case 3:return s=o.sent(),this.loggerProvider.warn("Failed to import or instantiate NetworkObservers:",s),[3,4];case 4:return[2]}})})},e}(),Nr=function(e){return function(){var t=e.config||Ne();return{logger:t.loggerProvider,logLevel:t.logLevel}}},Lr=function(){var e=new Ar;return{init:O(e.init.bind(e),"init",Nr(e)),evaluateTargetingAndCapture:O(e.evaluateTargetingAndCapture.bind(e),"evaluateTargetingAndRecord",Nr(e)),setSessionId:O(e.setSessionId.bind(e),"setSessionId",Nr(e)),getSessionId:O(e.getSessionId.bind(e),"getSessionId",Nr(e)),getSessionReplayProperties:O(e.getSessionReplayProperties.bind(e),"getSessionReplayProperties",Nr(e)),flush:O(e.flush.bind(e),"flush",Nr(e)),shutdown:O(e.shutdown.bind(e),"shutdown",Nr(e))}}(),_r=Lr.init,Dr=Lr.setSessionId,Fr=Lr.getSessionId,Ur=Lr.getSessionReplayProperties,Br=Lr.flush,jr=Lr.shutdown,zr=Lr.evaluateTargetingAndCapture;!function(e){e.SET="$set",e.SET_ONCE="$setOnce",e.ADD="$add",e.APPEND="$append",e.PREPEND="$prepend",e.REMOVE="$remove",e.PREINSERT="$preInsert",e.POSTINSERT="$postInsert",e.UNSET="$unset",e.CLEAR_ALL="$clearAll"}(Rr||(Rr={})),function(e){e.REVENUE_PRODUCT_ID="$productId",e.REVENUE_QUANTITY="$quantity",e.REVENUE_PRICE="$price",e.REVENUE_TYPE="$revenueType",e.REVENUE_CURRENCY="$currency",e.REVENUE="$revenue"}(Pr||(Pr={})),function(e){e.IDENTIFY="$identify",e.GROUP_IDENTIFY="$groupidentify",e.REVENUE="revenue_amount"}(Tr||(Tr={}));const Wr=[Rr.SET,Rr.SET_ONCE,Rr.ADD,Rr.APPEND,Rr.PREPEND,Rr.POSTINSERT],qr="1.33.5";class $r{constructor(e){this.name=$r.pluginName,this.type="enrichment",this.config=null,this.sessionReplay={flush:Br,getSessionId:Fr,getSessionReplayProperties:Ur,init:_r,setSessionId:Dr,shutdown:jr,evaluateTargetingAndCapture:zr},this.options=Object.assign({forceSessionTracking:!1},e),this.srInitOptions=this.options}setup(e,t){var r,n,s,o,i,l,c,u;return a(this,void 0,void 0,function*(){try{null==e||e.loggerProvider.log(`Installing @amplitude/plugin-session-replay, version ${qr}.`),this.config=e,this.options.forceSessionTracking&&("boolean"==typeof e.defaultTracking?!1===e.defaultTracking&&(e.defaultTracking={pageViews:!1,formInteractions:!1,fileDownloads:!1,sessions:!0}):e.defaultTracking=Object.assign(Object.assign({},e.defaultTracking),{sessions:!0}));const a=(t=this.config.instanceName,void 0===t&&(t="$default_instance"),D.getInstance(t)).identityStore.getIdentity().userProperties;this.srInitOptions={instanceName:this.config.instanceName,deviceId:null!==(r=this.options.deviceId)&&void 0!==r?r:this.config.deviceId,optOut:this.config.optOut,sessionId:this.options.customSessionId?void 0:this.config.sessionId,loggerProvider:this.config.loggerProvider,logLevel:this.config.logLevel,flushMaxRetries:this.config.flushMaxRetries,serverZone:this.config.serverZone,configServerUrl:this.options.configServerUrl||(null===(n=this.config.remoteConfig)||void 0===n?void 0:n.serverUrl),trackServerUrl:this.options.trackServerUrl,sampleRate:this.options.sampleRate,privacyConfig:{blockSelector:null===(s=this.options.privacyConfig)||void 0===s?void 0:s.blockSelector,maskSelector:null===(o=this.options.privacyConfig)||void 0===o?void 0:o.maskSelector,unmaskSelector:null===(i=this.options.privacyConfig)||void 0===i?void 0:i.unmaskSelector,defaultMaskLevel:null===(l=this.options.privacyConfig)||void 0===l?void 0:l.defaultMaskLevel},debugMode:this.options.debugMode,shouldInlineStylesheet:this.options.shouldInlineStylesheet,version:{type:"plugin",version:qr},performanceConfig:this.options.performanceConfig,storeType:this.options.storeType,useWebWorker:null!==(c=this.options.useWebWorker)&&void 0!==c?c:null===(u=this.options.experimental)||void 0===u?void 0:u.useWebWorker,userProperties:a,applyBackgroun
26dColorToBlockedElements:this.options.applyBackgroundColorToBlockedElements,interactionConfig:this.options.interactionConfig,captureDocumentTitle:this.options.captureDocumentTitle,enableUrlChangePolling:this.options.enableUrlChangePolling,urlChangePollingInterval:this.options.urlChangePollingInterval,captureAdoptedStyleSheets:this.options.captureAdoptedStyleSheets,crossOriginIframes:this.options.crossOriginIframes,flushIntervalConfig:this.options.flushIntervalConfig,eagerFullSnapshotSend:this.options.eagerFullSnapshotSend,captureFullSnapshotOnFocus:this.options.captureFullSnapshotOnFocus,maxPersistedEventsSizeBytes:this.options.maxPersistedEventsSizeBytes,maxSingleEventSizeBytes:this.options.maxSingleEventSizeBytes,sendTimeoutMs:this.options.sendTimeoutMs,handleSendEvents:this.options.handleSendEvents,handleFetchConfig:this.options.handleFetchConfig},yield this.sessionReplay.init(e.apiKey,this.srInitOptions).promise}catch(t){null==e||e.loggerProvider.error(`Session Replay: Failed to initialize due to ${t.message}`)}var t})}onSessionIdChanged(e){var t;return a(this,void 0,void 0,function*(){null===(t=this.config)||void 0===t||t.loggerProvider.debug(`Analytics session id is changed to ${e}, SR session id is ${String(this.sessionReplay.getSessionId())}.`),yield this.sessionReplay.setSessionId(e).promise})}onOptOutChanged(e){var t;return a(this,void 0,void 0,function*(){null===(t=this.config)||void 0===t||t.loggerProvider.debug(`optOut is changed to ${String(e)}, calling ${e?"sessionReplay.shutdown()":"sessionReplay.init()"}.`),e?this.sessionReplay.shutdown():null!=this.config&&(yield this.sessionReplay.init(this.config.apiKey,this.srInitOptions).promise)})}execute(e){var t,r,n;return a(this,void 0,void 0,function*(){try{if(this.options.customSessionId){const t=this.options.customSessionId(e);if(t){t!==this.sessionReplay.getSessionId()&&(yield this.sessionReplay.setSessionId(t).promise);const r=this.sessionReplay.getSessionReplayProperties();e.event_properties=Object.assign(Object.assign({},e.event_properties),r)}}else{const n=null===(t=this.config)||void 0===t?void 0:t.sessionId;if(n&&n!==this.sessionReplay.getSessionId()&&(yield this.sessionReplay.setSessionId(n).promise),n&&n===e.session_id){let t;e.event_type===s.IDENTIFY&&(t=(e=>{if(!e.user_properties)return;let t={};return Object.keys(e.user_properties).forEach(r=>{if(Wr.includes(r)){const n=e.user_properties&&e.user_properties[r];t=Object.assign(Object.assign({},t),n)}}),t})(e));const n=g();yield this.sessionReplay.evaluateTargetingAndCapture({event:e,userProperties:t,page:null!=(null===(r=null==n?void 0:n.location)||void 0===r?void 0:r.href)?{url:n.location.href}:void 0});const o=this.sessionReplay.getSessionReplayProperties();e.event_properties=Object.assign(Object.assign({},e.event_properties),o)}}return e.event_type===s.IDENTIFY&&e.event_properties&&delete e.event_properties["[Amplitude] Session Replay ID"],Promise.resolve(e)}catch(t){return null===(n=this.config)||void 0===n||n.loggerProvider.error(`Session Replay: Failed to enrich event due to ${t.message}`),Promise.resolve(e)}})}teardown(){var e;return a(this,void 0,void 0,function*(){try{this.sessionReplay.shutdown(),this.config=null}catch(t){null===(e=this.config)||void 0===e||e.loggerProvider.error(`Session Replay: teardown failed due to ${t.message}`)}})}getSessionReplayProperties(){return this.sessionReplay.getSessionReplayProperties()}}$r.pluginName="@amplitude/plugin-session-replay-browser";const Vr=e=>new $r(e);var Gr=function(e,t){return Gr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},Gr(e,t)};var Hr=function(){return Hr=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},Hr.apply(this,arguments)};function Jr(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}"function"==typeof SuppressedError&&SuppressedError;var Kr="is",Yr="is not",Qr="contains",Xr="does not contain",Zr="less",en="less or equal",tn="greater",rn="greater or equal",nn="version less",sn="version less or equal",on="version greater",an="version greater or equal",ln="set is",cn="set is not",un="set contains",hn="set does not contain",dn="set contains any",pn="set does not contain any",fn="regex match",mn="regex does not match",gn=-862048943,vn=461845907,yn=function(e,t){void 0===t&&(t=0);for(var r=function(e){for(var t=[],r=0,n=0;n<e.length;n++){var s=e.charCodeAt(n);s<128?t[r++]=s:s<2048?(t[r++]=s>>6|192,t[r++]=63&s|128):55296==(64512&s)&&n+1<e.length&&56320==(64512&e.charCodeAt(n+1))?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++n)),t[r++]=s>>18|240,t[r++]=s>>12&63|128,t[r++]=s>>6&63|128,t[r++]=63&s|128):(t[r++]=s>>12|224,t[r++]=s>>6&63|128,t[r++]=63&s|128)}return Uint8Array.from(t)}(e),n=r.length,s=n>>2,o=t,i=0;i<s;i++){var a=Cn(r,i<<2);o=wn(a,o)}var l=s<<2,c=0;switch(n-l){case 3:c^=r[l+2]<<16,c^=r[l+1]<<8,c^=r[l],c=Math.imul(c,gn),c=Sn(c,15),o^=c=Math.imul(c,vn);break;case 2:c^=r[l+1]<<8,c^=r[l],c=Math.imul(c,gn),c=Sn(c,15),o^=c=Math.imul(c,vn);break;case 1:c^=r[l],c=Math.imul(c,gn),c=Sn(c,15),o^=c=Math.imul(c,vn)}return bn(o^=n)>>>0},wn=function(e,t){var r=e,n=t;return r=Math.imul(r,gn),r=Sn(r,15),r=Math.imul(r,vn),n=Sn(n^=r,13),
26(n=Math.imul(n,5))+-430675100|0},bn=function(e){var t=e;return t^=t>>>16,t=Math.imul(t,-2048144789),t^=t>>>13,t=Math.imul(t,-1028477387),t^=t>>>16},Sn=function(e,t,r){return void 0===r&&(r=32),t>r&&(t%=r),(e<<t|(e&4294967295<<r-t>>>0)>>>0>>>r-t>>>0)>>>0},Cn=function(e,t){void 0===t&&(t=0);var r=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3];return xn(r)},xn=function(e){return(-16777216&e)>>>24|(16711680&e)>>>8|(65280&e)<<8|(255&e)<<24},kn=function(e,t){var r,n;if(t&&0!==t.length){try{for(var s=Jr(t),o=s.next();!o.done;o=s.next()){var i=o.value;if(!i||!e||"object"!=typeof e)return;e=e[i]}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return e||void 0}},In="^".concat("(\\d+)\\.(\\d+)","(\\.").concat("(\\d+)").concat("(-(([-\\w]+\\.?)*))?",")?$"),On=function(){function e(e,t,r,n){void 0===n&&(n=void 0),this.major=e,this.minor=t,this.patch=r,this.preRelease=n}return e.parse=function(t){if(t){var r=new RegExp(In).exec(t);if(r){var n=Number(r[1]),s=Number(r[2]);if(!isNaN(n)&&!isNaN(s))return new e(n,s,Number(r[4])||0,r[5]||void 0)}}},e.prototype.compareTo=function(e){return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:this.patch>e.patch?1:this.patch<e.patch||this.preRelease&&!e.preRelease?-1:!this.preRelease&&e.preRelease?1:this.preRelease&&e.preRelease?this.preRelease>e.preRelease?1:this.preRelease<e.preRelease?-1:0:0},e}(),En=function(){function e(){}return e.prototype.evaluate=function(e,t){var r,n,s={},o={context:e,result:s};try{for(var i=Jr(t),a=i.next();!a.done;a=i.next()){var l=a.value,c=this.evaluateFlag(o,l);c&&(s[l.key]=c)}}catch(e){r={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return s},e.prototype.evaluateFlag=function(e,t){var r,n,s;try{for(var o=Jr(t.segments),i=o.next();!i.done;i=o.next()){var a=i.value;if(s=this.evaluateSegment(e,t,a)){var l=Hr(Hr(Hr({},t.metadata),a.metadata),s.metadata);s=Hr(Hr({},s),{metadata:l});break}}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s},e.prototype.evaluateSegment=function(e,t,r){var n,s,o,i;if(!r.conditions)return void 0!==(c=this.bucket(e,r))?t.variants[c]:void 0;try{for(var a=Jr(r.conditions),l=a.next();!l.done;l=a.next()){var c,u=l.value,h=!0;try{for(var d=(o=void 0,Jr(u)),p=d.next();!p.done;p=d.next()){var f=p.value;if(!(h=this.matchCondition(e,f)))break}}catch(e){o={error:e}}finally{try{p&&!p.done&&(i=d.return)&&i.call(d)}finally{if(o)throw o.error}}if(h)return void 0!==(c=this.bucket(e,r))?t.variants[c]:void 0}}catch(e){n={error:e}}finally{try{l&&!l.done&&(s=a.return)&&s.call(a)}finally{if(n)throw n.error}}},e.prototype.matchCondition=function(e,t){var r=kn(e,t.selector);if(r){if(this.isSetOperator(t.op)){var n=this.coerceStringArray(r);return!!n&&this.matchSet(n,t.op,t.values)}var s=this.coerceString(r);return void 0!==s&&this.matchString(s,t.op,t.values)}return this.matchNull(t.op,t.values)},e.prototype.getHash=function(e){return yn(e)},e.prototype.bucket=function(e,t){var r,n,s,o;if(!t.bucket)return t.variant;var i=this.coerceString(kn(e,t.bucket.selector));if(!i||0===i.length)return t.variant;var a="".concat(t.bucket.salt,"/").concat(i),l=this.getHash(a),c=l%100,u=Math.floor(l/100);try{for(var h=Jr(t.bucket.allocations),d=h.next();!d.done;d=h.next()){var p=d.value,f=p.range[0],m=p.range[1];if(c>=f&&c<m)try{for(var g=(s=void 0,Jr(p.distributions)),v=g.next();!v.done;v=g.next()){var y=v.value,w=y.range[0],b=y.range[1];if(u>=w&&u<b)return y.variant}}catch(e){s={error:e}}finally{try{v&&!v.done&&(o=g.return)&&o.call(g)}finally{if(s)throw s.error}}}}catch(e){r={error:e}}finally{try{d&&!d.done&&(n=h.return)&&n.call(h)}finally{if(r)throw r.error}}return t.variant},e.prototype.matchNull=function(e,t){var r=this.containsNone(t);switch(e){case Kr:case Qr:case Zr:case en:case tn:case rn:case nn:case sn:case on:case an:case ln:case un:case dn:return r;case Yr:case Xr:case hn:case pn:return!r;default:return!1}},e.prototype.matchSet=function(e,t,r){switch(t){case ln:return this.setEquals(e,r);case cn:return!this.setEquals(e,r);case un:return this.matchesSetContainsAll(e,r);case hn:return!this.matchesSetContainsAll(e,r);case dn:return this.matchesSetContainsAny(e,r);case pn:return!this.matchesSetContainsAny(e,r);default:return!1}},e.prototype.matchString=function(e,t,r){var n=this;switch(t){case Kr:return this.matchesIs(e,r);case Yr:return!this.matchesIs(e,r);case Qr:return this.matchesContains(e,r);case Xr:return!this.matchesContains(e,r);case Zr:case en:case tn:case rn:return this.matchesComparable(e,t,r,function(e){return n.parseNumber(e)},this.comparator);case nn:case sn:case on:case an:return this.matchesComparable(e,t,r,function(e){return On.parse(e)},this.versionComparator);case fn:return this.matchesRegex(e,r);case mn:return!this.matchesRegex(e,r);default:return!1}},e.prototype.matchesIs=function(e,t){if(this.containsBooleans(t)){var r=e.toLowerCase();if("true"===r||"false"===r)return t.some(function(e){return e.toLowerCase()===r})}return t.some(function(t){return e===t})},e.prototype.matchesContains=function(e,t){var r,n;try{for(var s=Jr(t),o=s.next();!o.done;o=s.next()){var i=o.value;if(e.toLowerCase().includes(i.toLowerCase()))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1},e.prototype.matchesComparable=function(e,t,r,n,s){var o=this,i=n(e),a=r.map(function(e){return n(e)}).filter(function(e){return void 0!==e});return void 0===i||0===a.length?r.some(function(r){return o.comparator(e,t,r)}):a.some(function(e){return s(i,t,e)})},e.prototype.comparator=function(e,t,r){switch(t){case Zr:case nn:return e<r;case en:case sn:return e<=r;case tn:case on:return e>r;case rn:case an:return e>=r;default:return!1}},e.prototype.versionComparator=function(e,t,r){var n=e.compareTo(r);switch(t){case Zr:case nn:return n<0;case en:case sn:return n<=0;case tn:case on:return n>0;case rn:case an:return n>=0;default:return!1}},e.prototype.matchesRegex=function(e,t){return t.some(function(t){return Boolean(new RegExp(t).exec(e))})},e.prototype.containsNone=function(e){return e.some(function(e){return"(none)"===e})},e.prototype.containsBooleans=function(e){return e.some(function(e){switch(e.toLowerCase()){case"true":case"false":return!0;default:return!1}})},e.prototype.parseNumber=function(e){var t;return null!==(t=Number(e))&&void 0!==t?t:void 0},e.prototype.coerceString=function(e){if(e)return"object"==typeof e?JSON.stringify(e):String(e)},e.prototype.coerceStringArray=function(e){var t=this;if(Array.isArray(e))return e.map(function(e){return t.coerceString(e)}
26).filter(Boolean);var r=String(e);try{var n=JSON.parse(r);return Array.isArray(n)?e.map(function(e){return t.coerceString(e)}).filter(Boolean):void 0}catch(e){return}},e.prototype.isSetOperator=function(e){switch(e){case ln:case cn:case un:case hn:case dn:case pn:return!0;default:return!1}},e.prototype.setEquals=function(e,t){var r=new Set(e),n=new Set(t);return r.size===n.size&&function(e,t,r){if(r||2===arguments.length)for(var n,s=0,o=t.length;s<o;s++)!n&&s in t||(n||(n=Array.prototype.slice.call(t,0,s)),n[s]=t[s]);return e.concat(n||Array.prototype.slice.call(t))}([],function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,s,o=r.call(e),i=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)i.push(n.value)}catch(e){s={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(s)throw s.error}}return i}(n),!1).every(function(e){return r.has(e)})},e.prototype.matchesSetContainsAll=function(e,t){var r,n;if(e.length<t.length)return!1;try{for(var s=Jr(t),o=s.next();!o.done;o=s.next()){var i=o.value;if(!this.matchesIs(i,e))return!1}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!0},e.prototype.matchesSetContainsAny=function(e,t){var r,n;try{for(var s=Jr(t),o=s.next();!o.done;o=s.next()){var i=o.value;if(this.matchesIs(i,e))return!0}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=s.return)&&n.call(s)}finally{if(r)throw r.error}}return!1},e}();"function"==typeof TextDecoder&&new TextDecoder,"function"==typeof TextEncoder&&new TextEncoder;(e=>{let t={};e.forEach((e,r)=>t[e]=r)})(Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=")),String.fromCharCode.bind(String),"function"==typeof Uint8Array.from&&Uint8Array.from.bind(Uint8Array),function(e){function t(r,n){var s=e.call(this,n)||this;return s.statusCode=r,Object.setPrototypeOf(s,t.prototype),s}(function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}Gr(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)})(t,e)}(Error);var Mn,Rn=function(){var e=this;this.dbs={},this.createStore=function(t){return a(e,void 0,void 0,function(){return l(this,function(e){switch(e.label){case 0:return[4,mt(t,1,{upgrade:function(e){e.objectStoreNames.contains("eventTypesForSession")||e.createObjectStore("eventTypesForSession",{keyPath:"sessionId"})}})];case 1:return[2,e.sent()]}})})},this.openOrCreateDB=function(t){return a(e,void 0,void 0,function(){var e,r;return l(this,function(n){switch(n.label){case 0:return this.dbs&&this.dbs[t]?[2,this.dbs[t]]:(e="".concat(t.substring(0,10),"_amp_targeting"),[4,this.createStore(e)]);case 1:return r=n.sent(),this.dbs[t]=r,[2,r]}})})},this.updateEventListForSession=function(t){var r=t.sessionId,n=t.eventType,s=t.eventTime,i=t.loggerProvider,c=t.tx;return a(e,void 0,void 0,function(){var e,t,a,u,h,d,p,f,m;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,3,,4]),e=String(r),[4,c.store.get(e)];case 1:return t=l.sent(),a=t?t.eventTypes:{},u=a[n]||{},h=o(o({},a),((f={})[n]=o(o({},u),((m={})[s]={event_type:n},m)),f)),d={sessionId:e,eventTypes:h,lastUpdated:Date.now()},[4,c.store.put(d)];case 2:return l.sent(),[2,h];case 3:return p=l.sent(),i.warn("Failed to store events for targeting ".concat(r,": ").concat(p)),[3,4];case 4:return[2,void 0]}})})},this.deleteOldSessionEventTypes=function(t){var r=t.currentSessionId,n=t.loggerProvider,s=t.tx;return a(e,void 0,void 0,function(){var e,t,o,i,a,c;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,6,,7]),e=String(r),[4,s.store.getAll()];case 1:t=l.sent(),o=0,l.label=2;case 2:return o<t.length?(i=t[o],a=Date.now()-i.lastUpdated,i.sessionId!==e&&a>1728e5?[4,s.store.delete(i.sessionId)]:[3,4]):[3,5];case 3:l.sent(),l.label=4;case 4:return o++,[3,2];case 5:return[3,7];case 6:return c=l.sent(),n.warn("Failed to clear old session event types for targeting: ".concat(c)),[3,7];case 7:return[2]}})})},this.storeEventTypeForSession=function(t){var r=t.loggerProvider,n=t.sessionId,s=t.eventType,o=t.eventTime,i=t.apiKey;return a(e,void 0,void 0,function(){var e,t,a,c;return l(this,function(l){switch(l.label){case 0:return l.trys.push([0,5,,6]),[4,this.openOrCreateDB(i)];case 1:return e=l.sent(),(t=e.transaction("eventTypesForSession","readwrite"))?[4,this.updateEventListForSession({sessionId:n,tx:t,loggerProvider:r,eventType:s,eventTime:o})]:[2];case 2:return a=l.sent(),[4,this.deleteOldSessionEventTypes({currentSessionId:n,tx:t,loggerProvider:r})];case 3:return l.sent(),[4,t.done];case 4:return l.sent(),[2,a];case 5:return c=l.sent(),r.warn("Failed to store events for targeting ".concat(n,": ").concat(c)),[3,6];case 6:return[2,void 0]}})})}},Pn=new Rn,Tn=function(){var e=this;this.evaluateTargeting=function(t){var r=t.apiKey,n=t.loggerProvider,s=t.event,i=t.sessionId,c=t.userProperties,u=t.deviceId,h=t.page,d=t.flag;return a(e,void 0,void 0,function(){var e,t,a,p;return l(this,function(l){switch(l.label){case 0:return s&&s.time?[4,Pn.storeEventTypeForSession({loggerProvider:n,apiKey:r,sessionId:i,eventType:s.event_type,eventTime:s.time})]:[3,2];case 1:return t=l.sent(),[3,3];case 2:t=void 0,l.label=3;case 3:return a=(e=t)&&new Set(Object.keys(e)),p={session_id:i,event:s,event_types:a&&Array.from(a),user:o(o({},c),{device_id:u,user_properties:c}),page:h},[2,this.evaluationEngine.evaluate(p,[d])]}})})},this.evaluationEngine=new En},An=function(){var e=new Tn;return{evaluateTargeting:e.evaluateTargeting.bind(e)}}().evaluateTargeting,Nn=Object.freeze({__proto__:null,evaluateTargeting:An}),Ln=Object.freeze({__proto__:null,compressionScript:'var WebWorker=function(e){"use strict";onmessage=function(e){var s="string"==typeof e.data?JSON.parse(e.data):e.data,t=s.event,a=s.sessionId,n=t.type,r=t.timestamp,i=t.delay,o=t.data,d=null!=i?JSON.stringify({type:n,timestamp:r,delay:i,data:o}):JSON.stringify({type:n,timestamp:r,data:o});postMessage({compressedEvent:d,sessionId:a})};var s=onmessage;
26return e.compressionOnMessage=s,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n',trackDestinationScript:'var WebWorker=function(e){"use strict";var t,r=function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var s in t=arguments[r])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e},r.apply(this,arguments)};function n(e,t,r,n){return new(r||(r=Promise))(function(s,o){function a(e){try{u(n.next(e))}catch(e){o(e)}}function i(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?s(e.value):(t=e.value,t instanceof r?t:new r(function(e){e(t)})).then(a,i)}u((n=n.apply(e,t||[])).next())})}function s(e,t){var r,n,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=i(0),a.throw=i(1),a.return=i(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function i(i){return function(u){return function(i){if(r)throw new TypeError("Generator is already executing.");for(;a&&(a=0,i[0]&&(o=0)),o;)try{if(r=1,n&&(s=2&i[0]?n.return:i[0]?n.throw||((s=n.return)&&s.call(n),0):n.next)&&!(s=s.call(n,i[1])).done)return s;switch(n=0,s&&(i=[2&i[0],s.value]),i[0]){case 0:case 1:s=i;break;case 4:return o.label++,{value:i[1],done:!1};case 5:o.label++,n=i[1],i=[0];continue;case 7:i=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==i[0]&&2!==i[0])){o=0;continue}if(3===i[0]&&(!s||i[1]>s[0]&&i[1]<s[3])){o.label=i[1];break}if(6===i[0]&&o.label<s[1]){o.label=s[1],s=i;break}if(s&&o.label<s[2]){o.label=s[2],o.ops.push(i);break}s[2]&&o.ops.pop(),o.trys.pop();continue}i=t.call(e,o)}catch(e){i=[6,e],n=0}finally{r=s=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,u])}}}"function"==typeof SuppressedError&&SuppressedError,function(e){e.US="US",e.EU="EU",e.STAGING="STAGING"}(t||(t={})),t.US;var o,a=/payload.*exceed/i,i="X-Session-Replay-Event-Skipped";!function(e){e.GET_SR_PROPS="get-sr-props",e.DEBUG_INFO="debug-info",e.FETCH_REQUEST="fetch-request",e.METADATA="metadata",e.TARGETING_DECISION="targeting-decision",e.REPLAY_GATE_DECISION="replay-gate-decision"}(o||(o={}));var u="Network error occurred, event batch rejected";function c(e,t){return n(this,void 0,void 0,function(){var r,o,a,i,u,c,l,d,p,f,v,y,h,b,g=this;return s(this,function(m){switch(m.label){case 0:return m.trys.push([0,4,,5]),r=t.CompressionStream,o=new r("gzip"),a=o.writable.getWriter(),i=o.readable.getReader(),u=[],c=n(g,void 0,void 0,function(){var e,t,r;return s(this,function(n){switch(n.label){case 0:return[4,i.read()];case 1:if(e=n.sent(),t=e.done,r=e.value,t)return[3,3];u.push(r),n.label=2;case 2:return[3,0];case 3:return[2]}})}),[4,a.write((new TextEncoder).encode(e))];case 1:return m.sent(),[4,a.close()];case 2:return m.sent(),[4,c];case 3:m.sent(),l=u.reduce(function(e,t){return e+t.length},0),d=new Uint8Array(l),p=0;try{for(f=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(u),v=f.next();!v.done;v=f.next())y=v.value,d.set(y,p),p+=y.length}catch(e){h={error:e}}finally{try{v&&!v.done&&(b=f.return)&&b.call(f)}finally{if(h)throw h.error}}return[2,d];case 4:return m.sent(),[2,null];case 5:return[2]}})})}var l=0,d=new Map,p=function(e,t){return fetch(e,t)},f=function(e,t){var r="".concat(++l);return new Promise(function(n,s){var o=t.signal,a=function(){d.delete(r);var e=new Error("Delegated session replay fetch aborted by send timeout");e.name="AbortError",s(e)};o.addEventListener("abort",a,{once:!0}),d.set(r,function(e){o.removeEventListener("abort",a),e.error?s(new Error(e.body)):n({status:e.status,headers:{get:function(t){return t===i?e.skipHeader:null}},text:function(){return Promise.resolve(e.body)}})}),postMessage({type:"fetch-request",requestId:r,url:e,method:"POST",headers:t.headers,body:t.body,keepalive:t.keepalive})})};function v(e,t,o){var l,d,p,f,v,y,h,b;return n(this,void 0,void 0,function(){var n,g,m,w,S,T,E,k,R,x,C,I,A,M,O;return s(this,function(s){switch(s.label){case 0:n=null!==(l=t.sendTimeoutMs)&&void 0!==l?l:1e4,s.label=1;case 1:return s.trys.push([1,14,,15]),!1!==t.enableTransportCompression&&"CompressionStream"in self?[4,c(e,self)]:[3,3];case 2:return m=s.sent(),[3,4];case 3:m=null,s.label=4;
26case 4:g=m,w="".concat(null!==(p=null===(d=t.version)||void 0===d?void 0:d.type)&&void 0!==p?p:"standalone","/").concat(null!==(v=null===(f=t.version)||void 0===f?void 0:f.version)&&void 0!==v?v:t.sdkVersion),S=new URLSearchParams({device_id:t.deviceId,session_id:"".concat(t.sessionId),type:t.eventType}),T="".concat((U=t.serverZone,P=t.trackServerUrl,P||("STAGING"===U?"https://api-sr.stag2.amplitude.com/sessions/v2/track":"EU"===U?"https://api-sr.eu.amplitude.com/sessions/v2/track":"https://api-sr.amplitude.com/sessions/v2/track")),"?").concat(S.toString()),E=r({"Content-Type":"application/json",Accept:"*/*",Authorization:"Bearer ".concat(t.apiKey),"X-Client-Version":t.sdkVersion,"X-Client-Library":w,"X-Client-Url":t.currentUrl.substring(0,1e3),"X-Client-Sample-Rate":"".concat(t.sampleRate),"X-Sampling-Hash-Alg":"xxhash32"},g?{"Content-Encoding":"gzip"}:{}),k=g?g.byteLength:new Blob([e]).size,R=new AbortController,x=n>0?setTimeout(function(){R.abort()},n):void 0,C=void 0,s.label=5;case 5:return s.trys.push([5,,7,8]),[4,o(T,{method:"POST",headers:E,body:null!=g?g:e,keepalive:k<=65536,signal:R.signal})];case 6:return C=s.sent(),[3,8];case 7:return x&&clearTimeout(x),[7];case 8:if(null===C)return[2,{shouldRetry:!1,success:!1,message:"Unexpected error occurred"}];if(C.status>=200&&C.status<300)return I=Math.round(new Blob(t.events).size/1024),A=null!==(b=null===(h=null===(y=C.headers)||void 0===y?void 0:y.get)||void 0===h?void 0:h.call(y,i))&&void 0!==b?b:null,[2,{shouldRetry:!1,success:!0,message:"Session replay event batch tracked successfully for session id ".concat(t.sessionId,", size of events: ").concat(I," KB"),skipCode:A}];if(413!==C.status)return[3,13];M="",s.label=9;case 9:return s.trys.push([9,11,,12]),[4,C.text()];case 10:return M=s.sent(),[3,12];case 11:return s.sent(),[3,12];case 12:return[2,{shouldRetry:!1,success:!1,message:u,payloadTooLarge:!0,isWaf:a.test(M)}];case 13:return C.status>=500||408===C.status||429===C.status||499===C.status?[2,{shouldRetry:!0,success:!1,message:"HTTP ".concat(C.status)}]:[2,{shouldRetry:!1,success:!1,message:u}];case 14:return(O=s.sent())&&"object"==typeof O&&"AbortError"===O.name?[2,{shouldRetry:!0,success:!1,message:"Session replay worker request timed out after ".concat(n,"ms")}]:[2,{shouldRetry:!1,success:!1,message:String(O)}];case 15:return[2]}var U,P})})}function y(e,t,r,o,a){var i;return n(this,void 0,void 0,function(){var n,u,c;return s(this,function(s){switch(s.label){case 0:n=1,s.label=1;case 1:return[4,v(t,r,a)];case 2:return(u=s.sent()).success?(postMessage({type:"log",id:e,message:u.message}),postMessage({type:"complete",id:e,skipCode:null!==(i=u.skipCode)&&void 0!==i?i:null}),[2]):u.payloadTooLarge&&o?(postMessage({type:"payload_too_large",id:e,isWaf:!0===u.isWaf}),[2]):o&&u.shouldRetry&&n<r.flushMaxRetries?[4,new Promise(function(e){return setTimeout(e,Math.random()*n*1e3)})]:[3,4];case 3:return s.sent(),n++,[3,5];case 4:return c=n>=r.flushMaxRetries?"Session replay event batch rejected due to exceeded retry count":u.message,postMessage({type:"warn",id:e,message:c}),postMessage({type:"complete",id:e}),[2];case 5:return[3,1];case 6:return[2]}})})}onmessage=function(e){return n(void 0,void 0,void 0,function(){var t,r,n,o,a,i,u,c;return s(this,function(s){switch(s.label){case 0:return"fetch-response"===(t=e.data).type?((r=d.get(t.requestId))&&(d.delete(t.requestId),r(t)),[2]):"send"!==t.type?[3,2]:(n=t.id,o=t.payload,a=t.context,i=t.useRetry,u=t.useCustomTransport,c=JSON.stringify(o),[4,y(n,c,a,i,u?f:p)]);case 1:s.sent(),s.label=2;case 2:return[2]}})})};var h=onmessage;return e.trackDestinationOnMessage=h,Object.defineProperty(e,"__esModule",{value:!0}),e}({});\n'}),_n=Object.defineProperty,Dn=(e,t,r)=>((e,t,r)=>t in e?_n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Fn=Object.defineProperty,Un=(e,t,r)=>((e,t,r)=>t in e?Fn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Bn=Object.defineProperty,jn=(e,t,r)=>((e,t,r)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);const zn={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},Wn={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},qn={};function $n(e){if(qn[e])return qn[e];const t=function(e){var t,r;const n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in zn?zn[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in Wn?Wn[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&i)return qn[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const o=s[e].prototype;return document.body.removeChild(n),o?qn[e]=o:r}catch{return r}}const Vn={};function Gn(e,t,r){var n;const s=`${e}.${String(r)}`;if(Vn[s])return Vn[s].call(t);const o=$n(e),i=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return i?(Vn[s]=i,i.call(t)):t[r]}const Hn={};function Jn(e,t,r){const n=`${e}.${String(r)}`;if(Hn[n])return Hn[n].bind(t);const s=$n(e)[r];return"function"!=typeof s?t[r]:(Hn[n]=s,s.bind(t))}const Kn={childNodes:function(e){return Gn("Node",e,"childNodes")},parentNode:function(e){return Gn("Node",e,"parentNode")},parentElement:function(e){return Gn("Node",e,"parentElement")},textContent:function(e){return Gn("Node",e,"textContent")},contains:function(e,t){return Jn("Node",e,"contains")(t)},getRootNode:function(e){return Jn("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?Gn("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?Gn("Element",e,"shadowRoot"):null},querySelector:function(e,t){return Gn("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return Gn("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return $n("MutationObserver").constructor}};class Yn{constructor(){jn(this,"idNodeMap",new Map),jn(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);
vendor: 14,656 bytes, line 26
26this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function Qn(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Qn(Kn.parentNode(e),t,r);for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!!r&&Qn(Kn.parentNode(e),t,r)}function Xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Zn(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var es,ts={exports:{}};function rs(){if(es)return ts.exports;es=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return ts.exports=t(),ts.exports.createColors=t,ts.exports}const ns=Zn(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ss,os;function is(){if(os)return ss;os=1;let e=rs(),t=ns;class r extends Error{constructor(e,t,n,s,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;null==r&&(r=e.isColorSupported),t&&r&&(n=t(n));let s,o,i=n.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:n}=e.createColors(!0);s=e=>t(n(e)),o=e=>r(e)}else s=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,n=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(n)+e+"\n "+t+s("^")}return" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return ss=r,r.default=r,ss}var as,ls,cs,us,hs,ds,ps,fs,ms,gs,vs,ys,ws,bs,Ss,Cs,xs,ks,Is,Os,Es,Ms,Rs,Ps,Ts,As,Ns,Ls,_s,Ds,Fs,Us,Bs,js,zs,Ws,qs,$s,Vs,Gs,Hs,Js,Ks,Ys,Qs,Xs,Zs,eo,to,ro,no,so,oo,io={};function ao(){return as||(as=1,io.isClean=Symbol("isClean"),io.my=Symbol("my")),io}function lo(){if(cs)return ls;cs=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let s;if(n||(n=r),r&&(s=t.raws[r],void 0!==s))return s;let o=t.parent;if("before"===n){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[n];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?s=this[e](i,t):i.walk(e=>{if(s=e.raws[r],void 0!==s)return!1})}var a;return void 0===s&&(s=e[n]),i.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return ls=t,t.default=t,ls}function co(){if(hs)return us;hs=1;let e=lo();function t(t,r){new e(r).stringify(t)}return us=t,t.default=t,us}function uo(){if(ps)return ds;ps=1;let{isClean:e,my:t}=ao(),r=is(),n=lo(),s=co();function o(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>o(e,r)):("object"===i&&null!==s&&(s=o(s)),r[n]=s)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new n).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return ds=i,i.default=i,ds}function ho(){if(ms)return fs;ms=1;let e=uo();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return fs=t,t.default=t,fs}function po(){if(vs)return gs;vs=1;return gs={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",s=r;for(;s--;)n+=e[Math.random()*e.length|0];return n}},gs}function fo(){if(ws)return ys;ws=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ns,{existsSync:r,readFileSync:n}=ns,{dirname:s,join:o}=ns;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n){if("string"==typeof n)return n;if("function"!=typeof n){if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}{let e=n(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(s(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ys=i,i.default=i,ys}function mo(){if(Ss)return bs;Ss=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ns,{fileURLToPath:r,pathToFileURL:n}=ns,{isAbsolute:s,resolve:o}=ns,{nanoid:i}
vendor: 13,602 bytes, line 26
26=po(),a=ns,l=is(),c=fo(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),d=Boolean(o&&s);class p{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=o(t.from)),d&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,i,a;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,a=e.col}else i=n.line,a=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=s(u.source)?n(u.source):new URL(u.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let d=c.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return bs=p,p.default=p,a&&a.registerInput&&a.registerInput(p),bs}function go(){if(xs)return Cs;xs=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=ns,{dirname:r,relative:n,resolve:s,sep:o}=ns,{pathToFileURL:i}=ns,a=mo(),l=Boolean(e&&t),c=Boolean(r&&s&&n&&o);return Cs=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,s=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,s,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,n=1,s=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=n,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(n+=e.length,r=t.lastIndexOf("\n"),s=t.length-r):s+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=n,i.generated.column=s-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(s(o,this.mapOpts.annotation)));let i=n(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function vo(){if(Is)return ks;Is=1;let e=uo();class t extends e{constructor(e){super(e),this.type="comment"}}return ks=t,t.default=t,ks}function yo(){if(Es)return Os;Es=1;let e,t,r,n,{isClean:s,my:o}=ao(),i=ho(),a=vo(),l=uo();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=c(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n)){n=n.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===n.type&&"document"!==this.type){n=n.nodes.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw new Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new i(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else{if(!n.text)throw new Error("Unknown node type in node creation");n=[new a(n)]}return n.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{n=e},Os=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEac
vendor: 4,434 bytes, line 26
26h(e=>{h.rebuild(e)})},Os}function wo(){if(Rs)return Ms;Rs=1;let e,t,r=yo();class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},Ms=n,n.default=n,Ms}function bo(){if(Ts)return Ps;Ts=1;let e={};return Ps=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function So(){if(Ns)return As;Ns=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return As=e,e.default=e,As}function Co(){if(_s)return Ls;_s=1;let e=So();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return Ls=t,t.default=t,Ls}function xo(){if(Bs)return Us;Bs=1;let e=yo();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Us=t,t.default=t,e.registerAtRule(t),Us}function ko(){if(zs)return js;zs=1;let e,t,r=yo();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},js=n,n.default=n,r.registerRoot(n),js}function Io(){if(qs)return Ws;qs=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let n=[],s="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};return Ws=e,e.default=e,Ws}function Oo(){if(Vs)return $s;Vs=1;let e=yo(),t=Io();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return $s=r,r.default=r,e.registerRule(r),$s}function Eo(){if(Hs)return Gs;Hs=1;let e=ho(),t=function(){if(Fs)return Ds;Fs=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),n="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return Ds=function(x,k={}){let I,O,E,M,R,P,T,A,N,L,_=x.css.valueOf(),D=k.ignoreErrors,F=_.length,U=0,B=[],j=[];function z(e){throw x.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=F},nextToken:function(x){if(j.length)return j.pop();if(U>=F)return;let k=!!x&&x.ignoreUnclosed;switch(I=_.charCodeAt(U),I){case s:case o:case a:case l:case i:O=U;do{O+=1,I=_.charCodeAt(O)}while(I===o||I===s||I===a||I===l||I===i);L=["space",_.slice(U,O)],U=O-1;break;case c:case u:case p:case f:case v:case m:case d:{let e=String.fromCharCode(I);L=[e,e,U];break}case h:if(A=B.length?B.pop()[1]:"",N=_.charCodeAt(U+1),"url"===A&&N!==e&&N!==t&&N!==o&&N!==s&&N!==a&&N!==i&&N!==l){O=U;
vendor: 15,533 bytes, line 26
26do{if(P=!1,O=_.indexOf(")",O+1),-1===O){if(D||k){O=U;break}z("bracket")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["brackets",_.slice(U,O+1),U,O],U=O}else O=_.indexOf(")",U+1),M=_.slice(U,O+1),-1===O||S.test(M)?L=["(","(",U]:(L=["brackets",M,U,O],U=O);break;case e:case t:E=I===e?"'":'"',O=U;do{if(P=!1,O=_.indexOf(E,O+1),-1===O){if(D||k){O=U+1;break}z("string")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["string",_.slice(U,O+1),U,O],U=O;break;case y:w.lastIndex=U+1,w.test(_),O=0===w.lastIndex?_.length-1:w.lastIndex-2,L=["at-word",_.slice(U,O+1),U,O],U=O;break;case r:for(O=U,R=!0;_.charCodeAt(O+1)===r;)O+=1,R=!R;if(I=_.charCodeAt(O+1),R&&I!==n&&I!==o&&I!==s&&I!==a&&I!==l&&I!==i&&(O+=1,C.test(_.charAt(O)))){for(;C.test(_.charAt(O+1));)O+=1;_.charCodeAt(O+1)===o&&(O+=1)}L=["word",_.slice(U,O+1),U,O],U=O;break;default:I===n&&_.charCodeAt(U+1)===g?(O=_.indexOf("*/",U+2)+1,0===O&&(D||k?O=_.length:z("comment")),L=["comment",_.slice(U,O+1),U,O],U=O):(b.lastIndex=U+1,b.test(_),O=0===b.lastIndex?_.length-1:b.lastIndex-2,L=["word",_.slice(U,O+1),U,O],B.push(L),U=O)}return U++,L},position:function(){return U}}}}(),r=vo(),n=xo(),s=ko(),o=Oo();const i={empty:!0,space:!0};return Gs=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,r=l[s];r&&"space"===r[0];)r=l[--s];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n=new e;this.init(n,t[0][2]);let s,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){n.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===s[1].toLowerCase()){let r=t.slice(0),s="";for(let t=e;t>0;t--){let e=r[t][0];if(0===s.trim().indexOf("!")&&"space"!==e)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(n.important=!0,n.raws.important=s,t=r)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(t),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),o.push("("===r?")":"]");else if(i&&n&&"{"===r)s||(s=l),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)s=r[e],o=s[0],"space"!==o||e!==c-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=s[1]):u+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Gs}function Mo(){if(Ks)return Js;Ks=1;let e=yo(),t=Eo(),r=mo();function n(e,n){let s=new r(e,n),o=new t(s);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&n&&n.from&&(/\.scss$/i.test(n.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(n.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(n.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Js=n,n.default=n,e.registerParse(n),Js}function Ro(){if(Qs)return Ys;Qs=1;let{isClean:e,my:t}=ao(),r=go(),n=co(),s=yo(),o=wo(),i=bo(),a=Co(),l=Mo(),c=ko();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let v={};class y{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof a)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=l;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&s.rebuild(o)}else o=g(r);this.result=new a(e,o,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),o=n.split(".");(s[0]!==o[0]||parseInt(s[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new r(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(p(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:s}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(s.length>0&&r.visitorIndex<s.length){let[e,t]=s[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===s.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let s,o=r.iterator;for(;s=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!s[e])return s[e]=!0,void t.push(m(s));r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let n of r)if(0===n)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}
vendor: 11,995 bytes, line 26
26get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{v=e},Ys=y,y.default=y,c.registerLazyResult(y),o.registerLazyResult(y),Ys}function Po(){if(to)return eo;to=1;let e=function(){if(Zs)return Xs;Zs=1;let e=go(),t=co(),r=bo(),n=Mo();const s=Co();class o{constructor(r,n,o){let i;n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=o,this._map=void 0;let a=t;this.result=new s(this._processor,i,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,n);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Xs=o,o.default=o,Xs}(),t=Ro(),r=wo(),n=ko();class s{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return eo=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),eo}const To=Xn(function(){if(oo)return so;oo=1;let e=is(),t=ho(),r=Ro(),n=yo(),s=Po(),o=co(),i=function(){if(no)return ro;no=1;let e=ho(),t=fo(),r=vo(),n=xo(),s=mo(),o=ko(),i=Oo();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+l.type)}return ro=a,a.default=a,ro}(),a=wo(),l=So(),c=vo(),u=xo(),h=Co(),d=mo(),p=Mo(),f=Io(),m=Oo(),g=ko(),v=uo();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=p,y.fromJSON=i,y.list=f,y.comment=e=>new c(e),y.atRule=e=>new u(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=s,y.Document=a,y.Comment=c,y.Warning=l,y.AtRule=u,y.Result=h,y.Input=d,y.Rule=m,y.Root=g,y.Node=v,r.registerPostcss(y),so=y,y.default=y,so}());To.stringify,To.fromJSON,To.plugin,To.parse,To.list,To.document,To.comment,To.atRule,To.rule,To.decl,To.root,To.CssSyntaxError,To.Declaration,To.Container,To.Processor,To.Document,To.Comment,To.Warning,To.AtRule,To.Result,To.Input,To.Rule,To.Root,To.Node;var Ao=Object.defineProperty,No=(e,t,r)=>((e,t,r)=>t in e?Ao(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Lo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function _o(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Do,Fo={exports:{}};function Uo(){if(Do)return Fo.exports;Do=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Fo.exports=t(),Fo.exports.createColors=t,Fo.exports}const Bo=_o(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var jo,zo;function Wo(){if(zo)return jo;zo=1;let e=Uo(),t=Bo;class r extends Error{constructor(e,t,n,s,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;null==r&&(r=e.isColorSupported),t&&r&&(n=t(n));let s,o,i=n.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:n}=e.createColors(!0);s=e=>t(n(e)),o=e=>r(e)}else s=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,n=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(n)+e+"\n "+t+s("^")}return" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return jo=r,r.default=r,jo}var qo,$o,Vo,Go,Ho,Jo,Ko,Yo,Qo,Xo,Zo,ei,ti,ri,ni,si,oi,ii,ai,li,ci,ui,hi,di,pi,fi,mi,gi,vi,yi,wi,bi,Si,Ci,xi,ki,Ii,Oi,Ei,Mi,Ri,Pi,Ti,Ai,Ni,Li,_i,Di,Fi,Ui,Bi,ji,zi,Wi={};function qi(){return qo||(qo=1,Wi.isClean=Symbol("isClean"),Wi.my=Symbol("my")),Wi}function $i(){if(Vo)return $o;Vo=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let s;if(n||(n=r),r&&(s=t.raws[r],void 0!==s))return s;let o=t.parent;if("before"===n){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[n];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?s=this[e](i,t):i.walk(e=>{if(s=e.raws[r],void 0!==s)return!1})}var a;return void 0===s&&(s=e[n]),i.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return $o=t,t.default=t,$o}function Vi(){if(Ho)return Go;Ho=1;let e=$i();function t(t,r){new e(r).stringify(t)}return Go=t,t.default=t,Go}
vendor: 1,675 bytes, line 26
26function Gi(){if(Ko)return Jo;Ko=1;let{isClean:e,my:t}=qi(),r=Wo(),n=$i(),s=Vi();function o(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>o(e,r)):("object"===i&&null!==s&&(s=o(s)),r[n]=s)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}
vendor: 5,457 bytes, line 26
26markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new n).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return Jo=i,i.default=i,Jo}function Hi(){if(Qo)return Yo;Qo=1;let e=Gi();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return Yo=t,t.default=t,Yo}function Ji(){if(Zo)return Xo;Zo=1;return Xo={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",s=r;for(;s--;)n+=e[Math.random()*e.length|0];return n}},Xo}function Ki(){if(ti)return ei;ti=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bo,{existsSync:r,readFileSync:n}=Bo,{dirname:s,join:o}=Bo;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n){if("string"==typeof n)return n;if("function"!=typeof n){if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}{let e=n(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(s(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return ei=i,i.default=i,ei}function Yi(){if(ni)return ri;ni=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bo,{fileURLToPath:r,pathToFileURL:n}=Bo,{isAbsolute:s,resolve:o}=Bo,{nanoid:i}
vendor: 13,677 bytes, line 26
26=Ji(),a=Bo,l=Wo(),c=Ki(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),d=Boolean(o&&s);class p{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=o(t.from)),d&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,i,a;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,a=e.col}else i=n.line,a=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=s(u.source)?n(u.source):new URL(u.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let d=c.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return ri=p,p.default=p,a&&a.registerInput&&a.registerInput(p),ri}function Qi(){if(oi)return si;oi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Bo,{dirname:r,relative:n,resolve:s,sep:o}=Bo,{pathToFileURL:i}=Bo,a=Yi(),l=Boolean(e&&t),c=Boolean(r&&s&&n&&o);return si=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,s=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,s,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,n=1,s=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=n,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(n+=e.length,r=t.lastIndexOf("\n"),s=t.length-r):s+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=n,i.generated.column=s-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(s(o,this.mapOpts.annotation)));let i=n(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}}}function Xi(){if(ai)return ii;ai=1;let e=Gi();class t extends e{constructor(e){super(e),this.type="comment"}}return ii=t,t.default=t,ii}function Zi(){if(ci)return li;ci=1;let e,t,r,n,{isClean:s,my:o}=qi(),i=Hi(),a=Xi(),l=Gi();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=c(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n)){n=n.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===n.type&&"document"!==this.type){n=n.nodes.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw new Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new i(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else{if(!n.text)throw new Error("Unknown node type in node creation");n=[new a(n)]}return n.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{n=e},li=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{h.rebuild(e)})},li}function ea(){if(hi)return ui;hi=1;let e,t,r=Zi();
vendor: 4,359 bytes, line 26
26class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},ui=n,n.default=n,ui}function ta(){if(pi)return di;pi=1;let e={};return di=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function ra(){if(mi)return fi;mi=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return fi=e,e.default=e,fi}function na(){if(vi)return gi;vi=1;let e=ra();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return gi=t,t.default=t,gi}function sa(){if(Si)return bi;Si=1;let e=Zi();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return bi=t,t.default=t,e.registerAtRule(t),bi}function oa(){if(xi)return Ci;xi=1;let e,t,r=Zi();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},Ci=n,n.default=n,r.registerRoot(n),Ci}function ia(){if(Ii)return ki;Ii=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let n=[],s="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};return ki=e,e.default=e,ki}function aa(){if(Ei)return Oi;Ei=1;let e=Zi(),t=ia();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return Oi=r,r.default=r,e.registerRule(r),Oi}function la(){if(Ri)return Mi;Ri=1;let e=Hi(),t=function(){if(wi)return yi;wi=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),n="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return yi=function(x,k={}){let I,O,E,M,R,P,T,A,N,L,_=x.css.valueOf(),D=k.ignoreErrors,F=_.length,U=0,B=[],j=[];function z(e){throw x.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=F},nextToken:function(x){if(j.length)return j.pop();if(U>=F)return;let k=!!x&&x.ignoreUnclosed;switch(I=_.charCodeAt(U),I){case s:case o:case a:case l:case i:O=U;do{O+=1,I=_.charCodeAt(O)}while(I===o||I===s||I===a||I===l||I===i);L=["space",_.slice(U,O)],U=O-1;break;case c:case u:case p:case f:case v:case m:case d:{let e=String.fromCharCode(I);L=[e,e,U];break}case h:if(A=B.length?B.pop()[1]:"",N=_.charCodeAt(U+1),"url"===A&&N!==e&&N!==t&&N!==o&&N!==s&&N!==a&&N!==i&&N!==l){O=U;
vendor: 15,533 bytes, line 26
26do{if(P=!1,O=_.indexOf(")",O+1),-1===O){if(D||k){O=U;break}z("bracket")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["brackets",_.slice(U,O+1),U,O],U=O}else O=_.indexOf(")",U+1),M=_.slice(U,O+1),-1===O||S.test(M)?L=["(","(",U]:(L=["brackets",M,U,O],U=O);break;case e:case t:E=I===e?"'":'"',O=U;do{if(P=!1,O=_.indexOf(E,O+1),-1===O){if(D||k){O=U+1;break}z("string")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["string",_.slice(U,O+1),U,O],U=O;break;case y:w.lastIndex=U+1,w.test(_),O=0===w.lastIndex?_.length-1:w.lastIndex-2,L=["at-word",_.slice(U,O+1),U,O],U=O;break;case r:for(O=U,R=!0;_.charCodeAt(O+1)===r;)O+=1,R=!R;if(I=_.charCodeAt(O+1),R&&I!==n&&I!==o&&I!==s&&I!==a&&I!==l&&I!==i&&(O+=1,C.test(_.charAt(O)))){for(;C.test(_.charAt(O+1));)O+=1;_.charCodeAt(O+1)===o&&(O+=1)}L=["word",_.slice(U,O+1),U,O],U=O;break;default:I===n&&_.charCodeAt(U+1)===g?(O=_.indexOf("*/",U+2)+1,0===O&&(D||k?O=_.length:z("comment")),L=["comment",_.slice(U,O+1),U,O],U=O):(b.lastIndex=U+1,b.test(_),O=0===b.lastIndex?_.length-1:b.lastIndex-2,L=["word",_.slice(U,O+1),U,O],B.push(L),U=O)}return U++,L},position:function(){return U}}}}(),r=Xi(),n=sa(),s=oa(),o=aa();const i={empty:!0,space:!0};return Mi=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,r=l[s];r&&"space"===r[0];)r=l[--s];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n=new e;this.init(n,t[0][2]);let s,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){n.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===s[1].toLowerCase()){let r=t.slice(0),s="";for(let t=e;t>0;t--){let e=r[t][0];if(0===s.trim().indexOf("!")&&"space"!==e)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(n.important=!0,n.raws.important=s,t=r)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(t),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),o.push("("===r?")":"]");else if(i&&n&&"{"===r)s||(s=l),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)s=r[e],o=s[0],"space"!==o||e!==c-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=s[1]):u+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Mi}function ca(){if(Ti)return Pi;Ti=1;let e=Zi(),t=la(),r=Yi();function n(e,n){let s=new r(e,n),o=new t(s);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&n&&n.from&&(/\.scss$/i.test(n.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(n.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(n.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Pi=n,n.default=n,e.registerParse(n),Pi}function ua(){if(Ni)return Ai;Ni=1;let{isClean:e,my:t}=qi(),r=Qi(),n=Vi(),s=Zi(),o=ea(),i=ta(),a=na(),l=ca(),c=oa();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let v={};class y{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof a)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=l;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&s.rebuild(o)}else o=g(r);this.result=new a(e,o,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),o=n.split(".");(s[0]!==o[0]||parseInt(s[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new r(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(p(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:s}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(s.length>0&&r.visitorIndex<s.length){let[e,t]=s[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===s.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let s,o=r.iterator;for(;s=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!s[e])return s[e]=!0,void t.push(m(s));r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let n of r)if(0===n)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}
vendor: 8,932 bytes, line 26
26get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{v=e},Ai=y,y.default=y,c.registerLazyResult(y),o.registerLazyResult(y),Ai}function ha(){if(Fi)return Di;Fi=1;let e=function(){if(_i)return Li;_i=1;let e=Qi(),t=Vi(),r=ta(),n=ca();const s=na();class o{constructor(r,n,o){let i;n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=o,this._map=void 0;let a=t;this.result=new s(this._processor,i,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,n);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Li=o,o.default=o,Li}(),t=ua(),r=ea(),n=oa();class s{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Di=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),Di}const da=Lo(function(){if(zi)return ji;zi=1;let e=Wo(),t=Hi(),r=ua(),n=Zi(),s=ha(),o=Vi(),i=function(){if(Bi)return Ui;Bi=1;let e=Hi(),t=Ki(),r=Xi(),n=sa(),s=Yi(),o=oa(),i=aa();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+l.type)}return Ui=a,a.default=a,Ui}(),a=ea(),l=ra(),c=Xi(),u=sa(),h=na(),d=Yi(),p=ca(),f=ia(),m=aa(),g=oa(),v=Gi();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=p,y.fromJSON=i,y.list=f,y.comment=e=>new c(e),y.atRule=e=>new u(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=s,y.Document=a,y.Comment=c,y.Warning=l,y.AtRule=u,y.Result=h,y.Input=d,y.Rule=m,y.Root=g,y.Node=v,r.registerPostcss(y),ji=y,y.default=y,ji}());da.stringify,da.fromJSON,da.plugin,da.parse,da.list,da.document,da.comment,da.atRule,da.rule,da.decl,da.root,da.CssSyntaxError,da.Declaration,da.Container,da.Processor,da.Document,da.Comment,da.Warning,da.AtRule,da.Result,da.Input,da.Rule,da.Root,da.Node;class pa{constructor(...e){No(this,"parentElement",null),No(this,"parentNode",null),No(this,"ownerDocument"),No(this,"firstChild",null),No(this,"lastChild",null),No(this,"previousSibling",null),No(this,"nextSibling",null),No(this,"ELEMENT_NODE",1),No(this,"TEXT_NODE",3),No(this,"nodeType"),No(this,"nodeName"),No(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof pa))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const fa={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ma={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},ga={};function va(e){if(ga[e])return ga[e];const t=function(e){var t,r;const n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in fa?fa[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in ma?ma[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&i)return ga[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const o=s[e].prototype;return document.body.removeChild(n),o?ga[e]=o:r}catch{return r}}const ya={};function wa(e,t,r){var n;const s=`${e}.${String(r)}`;if(ya[s])return ya[s].call(t);const o=va(e),i=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return i?(ya[s]=i,i.call(t)):t[r]}const ba={};function Sa(e,t,r){const n=`${e}.${String(r)}`;if(ba[n])return ba[n].bind(t);const s=va(e)[r];return"function"!=typeof s?t[r]:(ba[n]=s,s.bind(t))}const Ca={childNodes:function(e){return wa("Node",e,"childNodes")},parentNode:function(e){return wa("Node",e,"parentNode")},parentElement:function(e){return wa("Node",e,"parentElement")},textContent:function(e){return wa("Node",e,"textContent")},contains:function(e,t){return Sa("Node",e,"contains")(t)},getRootNode:function(e){return Sa("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?wa("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?wa("Element",e,"shadowRoot"):null},querySelector:function(e,t){return wa("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return wa("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return va("MutationObserver").constructor}};const xa="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let ka={map:{},getId:()=>(console.error(xa),-1),getNode:()=>(console.error(xa),null),removeNodeFromMap(){console.error(xa)},has:()=>(console.error(xa),!1),reset(){console.error(xa)}};"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(ka=new Proxy(ka,{get:(e,t,r)=>("map"===t&&console.error(xa),Reflect.get(e,t,r))}));let Ia=Date.now;function Oa(e){if(!e)return null;
vendor: 13,190 bytes, line 26
26return e.nodeType===e.ELEMENT_NODE?e:Ca.parentElement(e)}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ia=()=>(new Date).getTime());function Ea(e){var t;let r=null;return"getRootNode"in e&&(null==(t=Ca.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&Ca.host(Ca.getRootNode(e))&&(r=Ca.host(Ca.getRootNode(e))),r}function Ma(e){let t,r=e;for(;t=Ea(r);)r=t;return r}function Ra(e){const t=e.ownerDocument;if(!t)return!1;const r=Ma(e);return Ca.contains(t,r)}const Pa=Object.freeze(Object.defineProperty({__proto__:null,StyleSheetMirror:class{constructor(){Un(this,"id",1),Un(this,"styleIDMap",new WeakMap),Un(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},get _mirror(){return ka},closestElementOfNode:Oa,getBaseDimension:function e(t,r){var n,s;const o=null==(s=null==(n=t.ownerDocument)?void 0:n.defaultView)?void 0:s.frameElement;if(!o||o===r)return{x:0,y:0,relativeScale:1,absoluteScale:1};const i=o.getBoundingClientRect(),a=e(o,r),l=i.height/o.clientHeight;return{x:i.x*a.relativeScale+a.x,y:i.y*a.relativeScale+a.y,relativeScale:l,absoluteScale:a.absoluteScale*l}},getNestedRule:function e(t,r){const n=t[r[0]];return 1===r.length?n:e(n.cssRules[r[1]].cssRules,r.slice(2))},getPositionsAndIndex:function(e){const t=[...e],r=t.pop();return{positions:t,index:r}},getRootShadowHost:Ma,getShadowHost:Ea,getWindowHeight:function(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight},getWindowScroll:function(e){var t,r,n,s;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=Ca.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=Ca.parentElement(o.body))?void 0:n.scrollTop)||(null==(s=null==o?void 0:o.body)?void 0:s.scrollTop)||0}},getWindowWidth:function(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth},hasShadowRoot:function(e){return!!e&&(e instanceof pa&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(Ca.shadowRoot(e)))},hookSetter:function e(t,r,n,s,o=window){const i=o.Object.getOwnPropertyDescriptor(t,r);return o.Object.defineProperty(t,r,s?n:{set(e){setTimeout(()=>{n.set.call(this,e)},0),i&&i.set&&i.set.call(this,e)}}),()=>e(t,r,i||{},!0)},inDom:function(e){const t=e.ownerDocument;return!!t&&(Ca.contains(t,e)||Ra(e))},isAncestorRemoved:function e(t,r){if(function(e){const t=e&&"host"in e&&"mode"in e&&Kn.host(e)||null;return Boolean(t&&"shadowRoot"in t&&Kn.shadowRoot(t)===e)}(t))return!1;const n=r.getId(t);if(!r.has(n))return!0;const s=Ca.parentNode(t);return(!s||s.nodeType!==t.DOCUMENT_NODE)&&(!s||e(s,r))},isBlocked:function(e,t,r,n){if(!e)return!1;const s=Oa(e);if(!s)return!1;try{if("string"==typeof t){if(s.classList.contains(t))return!0;if(n&&null!==s.closest("."+t))return!0}else if(Qn(s,t,n))return!0}catch(e){}if(r){if(s.matches(r))return!0;if(n&&null!==s.closest(r))return!0}return!1},isIgnored:function(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)},isSerialized:function(e,t){return-1!==t.getId(e)},isSerializedIframe:function(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))},isSerializedStylesheet:function(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))},iterateResolveTree:function e(t,r){r(t.value);for(let n=t.children.length-1;n>=0;n--)e(t.children[n],r)},legacy_isTouchEvent:function(e){return Boolean(e.changedTouches)},get nowTimestamp(){return Ia},on:function(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)},patch:function(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}},polyfill:function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)},queueToResolveTrees:function(e){const t={},r=(e,r)=>{const n={value:e,parent:r,children:[]};return t[e.node.id]=n,n},n=[];for(const s of e){const{nextId:e,parentId:o}=s;if(e&&e in t){const o=t[e];if(o.parent){const e=o.parent.children.indexOf(o);o.parent.children.splice(e,0,r(s,o.parent))}else{const e=n.indexOf(o);n.splice(e,0,r(s,null))}continue}if(o in t){const e=t[o];e.children.push(r(s,e));continue}n.push(r(s,null))}return n},shadowHostInDom:Ra,throttle:function(e,t,r={}){let n=null,s=0;return function(...o){const i=Date.now();s||!1!==r.leading||(s=i);const a=t-(i-s),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),s=i,e.apply(l,o)):n||!1===r.trailing||(n=setTimeout(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(l,o)},a))}},uniqueTextMutations:function(e){const t=new Set,r=[];for(let n=e.length;n--;){const s=e[n];t.has(s.id)||(r.push(s),t.add(s.id))}return r}},Symbol.toStringTag,{value:"Module"}));for(var Ta="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Aa="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Na=0;Na<64;Na++)Aa[Ta.charCodeAt(Na)]=Na;"undefined"!=typeof self&&self.Blob&&new Blob(['(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n'],{type:"text/javascript;charset=utf-8"});try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Mn=e.contentWindow)?void 0:Mn.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}var La,_a;new Yn,(_a=La||(La={}))[_a.NotStarted=0]="NotStarted",_a[_a.Running=1]="Running",_a[_a.Stopped=2]="Stopped";class Da{constructor(e){Dn(this,"fileName"),Dn(this,"functionName"),Dn(this,"lineNumber"),Dn(this,"columnNumber"),this.fileName=e.fileName||"",this.functionName=e.functionName||"",this.lineNumber=e.lineNumber,this.columnNumber=e.columnNumber}toString(){const e=this.lineNumber||"",t=this.columnNumber||"";return this.functionName?`${this.functionName} (${this.fileName}:${e}:${t})`:`${this.fileName}:${e}:${t}`}}const Fa=/(^|@)\S+:\d+/,Ua=/^\s*at .*(\S+:\d+|\(native\))/m,Ba=/^(eval@)?(\[native code])?$/,ja={parse:function(e){return e?void 0!==e.stacktrace||void 0!==e["opera#sourceloc"]?this.parseOpera(e):e.stack&&e.stack.match(Ua)?this.parseV8OrIE(e):e.stack?this.parseFFOrSafari(e):(console.warn("[console-record-plugin]: Failed to parse error object:",e),[]):[]},extractLocation:function(e){if(-1===e.indexOf(":"))return[e];const t=/(.+?)(?::(\d+))?(?::(\d+))?$/.exec(e.replace(/[()]/g,""));if(!t)throw new Error(`Cannot parse given url: ${e}`);return[t[1],t[2]||void 0,t[3]||void 0]},parseV8OrIE:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Ua)},this).map(function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(\),.*$)/g,""));let t=e.replace(/^\s+/,"").replace(/\(eval code/g,"(");const r=t.match(/ (\((.+):(\d+):(\d+)\)$)/);t=r?t.replace(r[0],""):t;const n=t.split(/\s+/).slice(1),s=this.extractLocation(r?r[1]:n.pop()),o=n.join(" ")||void 0,i=["eval","<anonymous>"].indexOf(s[0])>-1?void 0:s[0];return new Da({functionName:o,fileName:i,lineNumber:s[1],columnNumber:s[2]})},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(Ba)},this).map(function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),-1===e.indexOf("@")&&-1===e.indexOf(":"))return new Da({functionName:e});{const t=/((.*".+"[^@]*)?[^@]*)(?:@)/,r=e.match(t),n=r&&r[1]?r[1]:void 0,s=this.extractLocation(e.replace(t,""));return new Da({functionName:n,fileName:s[0],lineNumber:s[1],columnNumber:s[2]})}},this)},parseOpera:function(e){return!e.stacktrace||e.message.indexOf("\n")>-1&&e.message.split("\n").length>e.stacktrace.split("\n").length?this.parseOpera9(e):e.stack?this.parseOpera11(e):this.parseOpera10(e)},parseOpera9:function(e){const t=/Line (\d+).*script (?:in )?(\S+)/i,r=e.message.split("\n"),n=[];for(let e=2,s=r.length;e<s;e+=2){const s=t.exec(r[e]);s&&n.push(new Da({fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera10:function(e){const t=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,r=e.stacktrace.split("\n"),n=[];for(let e=0,s=r.length;e<s;e+=2){const s=t.exec(r[e]);s&&n.push(new Da({functionName:s[3]||void 0,fileName:s[2],lineNumber:parseFloat(s[1])}))}return n},parseOpera11:function(e){return e.stack.split("\n").filter(function(e){return!!e.match(Fa)&&!e.match(/^Error created at/)},this).map(function(e){const t=e.split("@"),r=this.extractLocation(t.pop()),n=(t.shift()||"").replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^)]*\)/g,"")||void 0;return new Da({functionName:n,fileName:r[0],lineNumber:r[1],columnNumber:r[2]})},this)}};function za(e){if(!e||!e.outerHTML)return"";let t="";for(;e.parentElement;){let r=e.localName;if(!r)break;r=r.toLowerCase();const n=e.parentElement,s=[];if(n.children&&n.children.length>0)for(let e=0;e<n.children.length;e++){const t=n.children[e];t.localName&&t.localName.toLowerCase&&t.localName.toLowerCase()===r&&s.push(t)}s.length>1&&(r+=`:eq(${s.indexOf(e)})`),t=r+(t?">"+t:""),e=n}return t}function Wa(e){return"[object Object]"===Object.prototype.toString.call(e)}function qa(e,t){if(0===t)return!0;const r=Object.keys(e);for(const n of r)if(Wa(e[n])&&qa(e[n],t-1))return!0;return!1}function $a(e,t){const r={numOfKeysLimit:50,depthOfLimit:4};Object.assign(r,t);const n=[],s=[];return JSON.stringify(e,function(e,t){if(n.length>0){const r=n.indexOf(this);~r?n.splice(r+1):n.push(this),~r?s.splice(r,1/0,e):s.push(e),~n.indexOf(t)&&(t=n[0]===t?"[Cir
26cular ~]":"[Circular ~."+s.slice(0,n.indexOf(t)).join(".")+"]")}else n.push(t);if(null===t)return t;if(void 0===t)return"undefined";if(function(e){if(Wa(e)&&Object.keys(e).length>r.numOfKeysLimit)return!0;if("function"==typeof e)return!0;if(Wa(e)&&qa(e,r.depthOfLimit))return!0;return!1}(t))return function(e){let t=e.toString();r.stringLengthLimit&&t.length>r.stringLengthLimit&&(t=`${t.slice(0,r.stringLengthLimit)}...`);return t}(t);if("bigint"==typeof t)return t.toString()+"n";if(t instanceof Event){const e={};for(const r in t){const n=t[r];Array.isArray(n)?e[r]=za(n.length?n[0]:null):e[r]=n}return e}return t instanceof Node?t instanceof HTMLElement?t?t.outerHTML:"":t.nodeName:t instanceof Error?t.stack?t.stack+"\nEnd of stack for Error object":t.name+": "+t.message:t})}const Va={level:["assert","clear","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],lengthThreshold:1e3,logger:"console"};function Ga(e,t,r){const n=r?Object.assign({},Va,r):Va,s=n.logger;if(!s)return()=>{};let o;o="string"==typeof s?t[s]:s;let i=0,a=!1;const l=[];if(n.level.includes("error")){const r=t=>{const r=t.message,s=t.error,o=ja.parse(s).map(e=>e.toString()),i=[$a(r,n.stringifyOptions)];e({level:"error",trace:o,payload:i})};t.addEventListener("error",r),l.push(()=>{t.removeEventListener("error",r)});const s=t=>{let r,s;t.reason instanceof Error?(r=t.reason,s=[$a(`Uncaught (in promise) ${r.name}: ${r.message}`,n.stringifyOptions)]):(r=new Error,s=[$a("Uncaught (in promise)",n.stringifyOptions),$a(t.reason,n.stringifyOptions)]);const o=ja.parse(r).map(e=>e.toString());e({level:"error",trace:o,payload:s})};t.addEventListener("unhandledrejection",s),l.push(()=>{t.removeEventListener("unhandledrejection",s)})}for(const e of n.level)l.push(c(o,e));return()=>{l.forEach(e=>e())};function c(t,r){return t[r]?Pa.patch(t,r,t=>(...s)=>{if(t.apply(this,s),!("assert"===r&&s[0]||a)){a=!0;try{const t=ja.parse(new Error).map(e=>e.toString()).splice(1),o=("assert"===r?s.slice(1):s).map(e=>$a(e,n.stringifyOptions));i++,i<n.lengthThreshold?e({level:r,trace:t,payload:o}):i===n.lengthThreshold&&e({level:"warn",trace:[],payload:[$a("The number of log records reached the threshold.")]})}catch(e){t("rrweb logger error:",e,...s)}finally{a=!1}
vendor: 4,660 bytes, line 26
26}}):()=>{}}}const Ha="rrweb/console@1";var Ja,Ka=Object.freeze({__proto__:null,PLUGIN_NAME:Ha,getRecordConsolePlugin:e=>({name:Ha,observer:Ga,options:e})}),Ya=Object.defineProperty,Qa=(e,t,r)=>((e,t,r)=>t in e?Ya(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),Xa=Object.defineProperty,Za=(e,t,r)=>((e,t,r)=>t in e?Xa(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r),el=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(el||{});const tl={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},rl={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},nl={};function sl(e){if(nl[e])return nl[e];const t=function(e){var t,r;const n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in tl?tl[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in rl?rl[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&i)return nl[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const o=s[e].prototype;return document.body.removeChild(n),o?nl[e]=o:r}catch{return r}}const ol={};function il(e,t,r){var n;const s=`${e}.${String(r)}`;if(ol[s])return ol[s].call(t);const o=sl(e),i=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return i?(ol[s]=i,i.call(t)):t[r]}const al={};function ll(e,t,r){const n=`${e}.${String(r)}`;if(al[n])return al[n].bind(t);const s=sl(e)[r];return"function"!=typeof s?t[r]:(al[n]=s,s.bind(t))}const cl={childNodes:function(e){return il("Node",e,"childNodes")},parentNode:function(e){return il("Node",e,"parentNode")},parentElement:function(e){return il("Node",e,"parentElement")},textContent:function(e){return il("Node",e,"textContent")},contains:function(e,t){return ll("Node",e,"contains")(t)},getRootNode:function(e){return ll("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?il("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?il("Element",e,"shadowRoot"):null},querySelector:function(e,t){return il("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return il("Element",e,"querySelectorAll")(t)},mutationObserver:function(){return sl("MutationObserver").constructor}};function ul(e){return e.nodeType===e.ELEMENT_NODE}function hl(e){const t=e&&"host"in e&&"mode"in e&&cl.host(e)||null;return Boolean(t&&"shadowRoot"in t&&cl.shadowRoot(t)===e)}function dl(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function pl(e){try{const r=e.rules||e.cssRules;if(!r)return null;let n=e.href;!n&&e.ownerNode&&e.ownerNode.ownerDocument&&(n=e.ownerNode.ownerDocument.location.href);const s=Array.from(r,e=>fl(e,n)).join("");return(t=s).includes(" background-clip: text;")&&!t.includes(" -webkit-background-clip: text;")&&(t=t.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),t}catch(e){return null}var t}function fl(e,t){if(function(e){return"styleSheet"in e}(e)){let t;try{t=pl(e.styleSheet)||function(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}(e)}catch(r){t=e.cssText}return e.styleSheet.href?Il(t,e.styleSheet.href):t}{let r=e.cssText;return function(e){return"selectorText"in e}(e)&&e.selectorText.includes(":")&&(r=function(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}(r)),t?Il(r,t):r}}class ml{constructor(){Za(this,"idNodeMap",new Map),Za(this,"nodeMetaMap",new WeakMap)}getId(e){var t;if(!e)return-1;return(null==(t=this.getMeta(e))?void 0:t.id)??-1}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);
vendor: 4,502 bytes, line 26
26this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach(e=>this.removeNodeFromMap(e))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const r=t.id;this.idNodeMap.set(r,e),this.nodeMetaMap.set(e,t)}replace(e,t){const r=this.getNode(e);if(r){const e=this.nodeMetaMap.get(r);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function gl({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:o}){let i=s||"";const a=n&&vl(n);return(t[r.toLowerCase()]||a&&t[a])&&(i=o?o(i,e):"*".repeat(i.length)),i}function vl(e){return e.toLowerCase()}const yl="__rrweb_original__";function wl(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?vl(t):null}function bl(e,t){let r;try{r=new URL(e,t??window.location.href)}catch(e){return null}const n=r.pathname.match(/\.([0-9a-z]+)(?:$)/i);return(null==n?void 0:n[1])??null}const Sl=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,Cl=/^(?:[a-z+]+:)?\/\//i,xl=/^www\..*/i,kl=/^(data:)([^,]*),(.*)/i;function Il(e,t){return(e||"").replace(Sl,(e,r,n,s,o,i)=>{const a=n||o||i,l=r||s||"";if(!a)return e;if(Cl.test(a)||xl.test(a))return`url(${l}${a}${l})`;if(kl.test(a))return`url(${l}${a}${l})`;if("/"===a[0])return`url(${l}${function(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}(t)+a}${l})`;const c=t.split("/"),u=a.split("/");c.pop();for(const e of u)"."!==e&&(".."===e?c.pop():c.push(e));return`url(${l}${c.join("/")}${l})`})}function Ol(e,t=!1){return t?e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,""):e.replace(/(\/\*[^*]*\*\/)|[\s;]/g,"").replace(/0px/g,"0")}function El(e,t){return function(e,t,r=!1){const n=Array.from(t.childNodes),s=[];let o=0;if(n.length>1&&e&&"string"==typeof e){let t=Ol(e,r);const i=t.length/e.length;for(let a=1;a<n.length;a++)if(n[a].textContent&&"string"==typeof n[a].textContent){const l=Ol(n[a].textContent,r),c=100;let u=3;for(;u<l.length&&(l[u].match(/[a-zA-Z0-9]/)||-1!==l.indexOf(l.substring(0,u),1));u++);for(;u<l.length;u++){let h=l.substring(0,u),d=t.split(h),p=-1;if(2===d.length)p=d[0].length;else if(d.length>2&&""===d[0]&&""!==n[a-1].textContent)p=t.indexOf(h,1);else if(1===d.length){if(h=h.substring(0,h.length-1),d=t.split(h),d.length<=1)return s.push(e),s;u=c+1}else u===l.length-1&&(p=t.indexOf(h));if(d.length>=2&&u>c){const e=n[a-1].textContent;if(e&&"string"==typeof e){const r=Ol(e).length;p=t.indexOf(h,r)}-1===p&&(p=d[0].length)}if(-1!==p){let a=Math.floor(p/i);for(;a>0&&a<e.length;){if(o+=1,o>50*n.length)return s.push(e),s;const l=Ol(e.substring(0,a),r);if(l.length===p){s.push(e.substring(0,a)),e=e.substring(a),t=t.substring(p);break}l.length<p?a+=Math.max(1,Math.floor((p-l.length)/i)):a-=Math.max(1,Math.floor((l.length-p)*i))}break}}}}return s.push(e),s}(e,t).join("/* rr_split */")}const Ml="lightgrey";let Rl=1;const Pl=new RegExp("[^a-z0-9-_:]");function Tl(){return Rl++}let Al,Nl;const Ll=/^[^ \t\n\r\u000c]+/,_l=/^[, \t\n\r\u000c]+/;const Dl=new WeakMap;function Fl(e,t){return t&&""!==t.trim()?Bl(e,t):t}function Ul(e){return Boolean("svg"===e.tagName||e.ownerSVGElement)}function Bl(e,t){let r=Dl.get(e);if(r||(r=e.createElement("a"),Dl.set(e,r)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return r.setAttribute("href",t),r.href}function jl(e,t,r,n){return n?"src"===r||"href"===r&&("use"!==t||"#"!==n[0])||"xlink:href"===r&&"#"!==n[0]?Fl(e,n):"background"!==r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===r?function(e,t){if(""===t.trim())return t;let r=0;function n(e){let n;const s=e.exec(t.substring(r));return s?(n=s[0],r+=n.length,n):""}const s=[];for(;n(_l),!(r>=t.length);){let o=n(Ll);if(","===o.slice(-1))o=Fl(e,o.substring(0,o.length-1)),s.push(o);else{let n="";o=Fl(e,o);let i=!1;for(;;){const e=t.charAt(r);if(""===e){s.push((o+n).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){r+=1,s.push((o+n).trim());break}"("===e&&(i=!0)}n+=e,r+=1}}}return s.join(", ")}(e,n):"style"===r?Il(n,Bl(e)):"object"===t&&"data"===r?Fl(e,n):n:Fl(e,n):n}function zl(e,t,r){return("video"===e||"audio"===e)&&"autoplay"===t}function Wl(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return!!r&&Wl(cl.parentNode(e),t,r);for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}return!!r&&Wl(cl.parentNode(e),t,r)}function ql(e,t,r,n){let s;if(ul(e)){if(s=e,!cl.childNodes(s).length)return!1}else{if(null===cl.parentElement(e))return!1;s=cl.parentElement(e)}
vendor: 9,447 bytes, line 26
26try{if("string"==typeof t){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(Wl(s,t,n))return!0;if(r)if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}catch(e){}return!1}function $l(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:i,inlineStylesheet:a,maskInputOptions:l={},maskTextFn:c,maskInputFn:u,maskAttributeFn:h,dataURLOptions:d={},inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g=!1,cssCaptured:v=!1,applyBackgroundColorToBlockedElements:y=!1}=t,w=function(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return 1===r?void 0:r}(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:el.Document,childNodes:[],compatMode:e.compatMode}:{type:el.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:el.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:w};case e.ELEMENT_NODE:return function(e,t){const{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:i={},maskInputFn:a,maskAttributeFn:l,dataURLOptions:c={},inlineImages:u,recordCanvas:h,keepIframeSrcFn:d,newlyAddedElement:p=!1,rootId:f,applyBackgroundColorToBlockedElements:m=!1}=t,g=function(e,t,r){try{if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let r=e.classList.length;r--;){const n=e.classList[r];if(t.test(n))return!0}if(r)return e.matches(r)}catch(e){}return!1}(e,n,s),v=function(e){if(e instanceof HTMLFormElement)return"form";const t=vl(e.tagName);return Pl.test(t)?"div":t}(e);let y={};const w=e.attributes.length;for(let t=0;t<w;t++){const n=e.attributes[t];if(!zl(v,n.name,n.value)){const t=jl(r,v,vl(n.name),n.value);if(l&&null!==t){const r=l(n.name,t,e);null!==r&&(y[n.name]=r)}else y[n.name]=t}}if("link"===v&&o){const t=Array.from(r.styleSheets).find(t=>t.href===e.href);let n=null;t&&(n=pl(t)),n&&(delete y.rel,delete y.href,y._cssText=n)}if("style"===v&&e.sheet){let t=pl(e.sheet);t&&(e.childNodes.length>1&&(t=El(t,e)),y._cssText=t)}if("input"===v||"textarea"===v||"select"===v){const t=e.value,r=e.checked;"radio"!==y.type&&"checkbox"!==y.type&&"submit"!==y.type&&"button"!==y.type&&t?y.value=gl({element:e,type:wl(e),tagName:v,value:t,maskInputOptions:i,maskInputFn:a}):r&&(y.checked=r)}"option"===v&&(e.selected&&!i.select?y.selected=!0:delete y.selected);"dialog"===v&&e.open&&(y.rr_open_mode=e.matches("dialog:modal")?"modal":"non-modal");if("canvas"===v&&h)if("2d"===e.__context)(function(e){const t=e.getContext("2d");if(!t)return!0;for(let r=0;r<e.width;r+=50)for(let n=0;n<e.height;n+=50){const s=t.getImageData,o=yl in s?s[yl]:s;if(new Uint32Array(o.call(t,r,n,Math.min(50,e.width-r),Math.min(50,e.height-n)).data.buffer).some(e=>0!==e))return!1}return!0})(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const t=e.toDataURL(c.type,c.quality),n=r.createElement("canvas");n.width=e.width,n.height=e.height;t!==n.toDataURL(c.type,c.quality)&&(y.rr_dataURL=t)}if("img"===v&&u){Al||(Al=r.createElement("canvas"),Nl=Al.getContext("2d"));const t=e,n=t.currentSrc||t.getAttribute("src")||"<unknown-src>",s=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{Al.width=t.naturalWidth,Al.height=t.naturalHeight,Nl.drawImage(t,0,0),y.rr_dataURL=Al.toDataURL(c.type,c.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${n}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(s?y.crossOrigin=s:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if("audio"===v||"video"===v){const t=y;t.rr_mediaState=e.paused?"paused":"played",t.rr_mediaCurrentTime=e.currentTime,t.rr_mediaPlaybackRate=e.playbackRate,t.rr_mediaMuted=e.muted,t.rr_mediaLoop=e.loop,t.rr_mediaVolume=e.volume}p||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop));if(g){const{width:t,height:r}=e.getBoundingClientRect();y={class:y.class,rr_width:`${t}px`,rr_height:`${r}px`,...m?{rr_background_color:Ml}:{}}}"iframe"!==v||d(y.src)||(e.contentDocument||(y.rr_src=y.src),delete y.src);let b;try{customElements.get(v)&&(b=!0)}catch(e){}return{type:el.Element,tagName:v,attributes:y,childNodes:[],isSVG:Ul(e)||void 0,needBlock:g,rootId:f,isCustom:b}}(e,{doc:r,blockClass:s,blockSelector:o,inlineStylesheet:a,maskInputOptions:l,maskInputFn:u,maskAttributeFn:h,dataURLOptions:d,inlineImages:p,recordCanvas:f,keepIframeSrcFn:m,newlyAddedElement:g,rootId:w,applyBackgroundColorToBlockedElements:y});case e.TEXT_NODE:return function(e,t){const{needsMask:r,maskTextFn:n,rootId:s,cssCaptured:o}=t,i=cl.parentNode(e),a=i&&i.tagName;let l="";const c="STYLE"===a||void 0,u="SCRIPT"===a||void 0;u?l="SCRIPT_PLACEHOLDER":o||(l=cl.textContent(e),c&&l&&(l=Il(l,Bl(t.doc))));!c&&!u&&l&&r&&(l=n?n(l,cl.parentElement(e)):l.replace(/[\S]/g,"*"));return{type:el.Text,textContent:l||"",rootId:s}}(e,{doc:r,needsMask:i,maskTextFn:c,rootId:w,cssCaptured:v});case e.CDATA_SECTION_NODE:return{type:el.CDATA,textContent:"",rootId:w};case e.COMMENT_NODE:return{type:el.Comment,textContent:cl.textContent(e)||"",rootId:w};default:return!1}}function Vl(e){return null==e?"":e.toLowerCase()}function Gl(e,t,r){return Array.from(e).map(e=>{const n=t(e);let s=[];if(!r.has(n)){r.add(n);try{s=Array.from(e.cssRules,(t,r)=>({rule:fl(t,e.href),index:r}))}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}}return{styleId:n,rules:s}})}function Hl(e,t){var r,n;const{doc:s,mirror:o,blockClass:i,blockSelector:a,maskTextClass:l,maskTextSelector:c,skipChild:u=!1,inlineStylesheet:h=!0,maskInputOptions:d={},maskTextFn:p,maskInputFn:f,maskAttributeFn:m,slimDOMOptions:g,dataURLOptions:v={},inlineImages:y=!1,recordCanvas:w=!1,onSerialize:b,onAdoptedStyleSheet:S,onIframeLoad:C,iframeLoadTimeout:x=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:I=5e3,keepIframeSrcFn:O=()=>!1,newlyAddedElement:E=!1,cssCaptured:M=!1,applyBackgroundColorToBlockedElements:R=!1}=t,P=t._emittedStyleIds??new Set;let{needsMask:T}=t,{preserveWhiteSpace:A=!0}=t;if(!T){T=ql(e,l,c,void 0===T)}const N=$l(e,{doc:s,mirror:o,blockClass:i,blockSelector:a,needsMask:T,inlineStylesheet:h,maskInputOptions:d,maskTextFn:p,maskInputFn:f,maskAttributeFn:m,dataURLOptions:v,inlineImages:y,recordCanvas:w,keepIframeSrcFn:O,newlyAddedElement:E,cssCaptured:M,applyBackgroundColorToBlockedElements:R});if(!N)return console.warn(e,"not serialized"),null;let L;L=o.hasNode(e)?o.getId(e):function(e,t){if(t.comment&&e.type===el.Comment)return!0;if(e.type===el.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===bl(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Vl(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Vl(e.attributes.name)||"icon"===Vl(e.attributes.rel)||"apple-touch-icon"===Vl(e.attributes.rel)||"shortcut icon"===Vl(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Vl(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Vl(e.attributes.property).match(/^(og|twitter|fb):/)||Vl(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Vl(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Vl(e.attributes.name)||"googlebot"===Vl(e.attributes.name)||"bingbot"===Vl(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Vl(e.attributes.name)||"generator"===Vl(e.attributes.name)||"framework"===Vl(e.attributes.name)||"publisher"===Vl(e.attributes.name)||"progid"===Vl(e.attributes.name)||Vl(e.attributes.property).match(/^article:/)||Vl(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Vl(e.attributes.name)||"yandex-verification"===Vl(e.attributes.name)||"csrf-token"===Vl(e.attributes.name)||"p:domain_verify"===Vl(e.attributes.name)||"verify-v1"===Vl(e.attributes.name)||"verification"===Vl(e.attributes.name)||"shopify-checkout-api-token"===Vl(e.attributes.name)))return!0}}return!1}(N,g)||!A&&N.type===el.Text&&!N.textContent.replace(/^\s+|\s+$/gm,"").length?-2:Tl();const _=Object.assign(N,{id:L});if(o.add(e,_),-2===L)return null;b&&b(e);let D=!u;if(_.type===el.Element){D=D&&!_.needBlock,delete _.needBlock;const t=cl.shadowRoot(e);t&&dl(t)&&(_.isShadowHost=!0,S&&(null==(r=t.adoptedStyleSheets)?void 0:r.length)&&(_.adoptedStyleSheets=Gl(t.adoptedStyleSheets,S,P)))}if(_.type===el.Document&&S){const t=e;(null==(n=t.adoptedStyleSheets)?void 0:n.length)&&(_.adoptedStyleSheets=Gl(t.adoptedStyleSheets,S,P))}if((_.type===el.Document||_.type===el.Element)&&D){g.headWhitespace&&_.type===el.Element&&"head"===_.tagName&&(A=!1);const t={doc:s,mirror:o,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:u,inlineStylesheet:h,maskInputOptions:d,maskTextFn:p,maskInputFn:f,maskAttributeFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:y,recordCanvas:w,preserveWhiteSpace:A,onSerialize:b,onAdoptedStyleSheet:S,_emittedStyleIds:P,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:O,cssCaptured:!1,applyBackgroun
vendor: 4,911 bytes, line 26
26dColorToBlockedElements:R};if(_.type===el.Element&&"textarea"===_.tagName&&void 0!==_.attributes.value);else{_.type===el.Element&&void 0!==_.attributes._cssText&&"string"==typeof _.attributes._cssText&&(t.cssCaptured=!0);for(const r of Array.from(cl.childNodes(e))){const e=Hl(r,t);e&&_.childNodes.push(e)}}let r=null;if(ul(e)&&(r=cl.shadowRoot(e)))for(const e of Array.from(cl.childNodes(r))){const n=Hl(e,t);n&&(dl(r)&&(n.isShadow=!0),_.childNodes.push(n))}}const F=cl.parentNode(e);return F&&hl(F)&&dl(F)&&(_.isShadow=!0),_.type===el.Element&&"iframe"===_.tagName&&function(e,t,r){const n=e.contentWindow;if(!n)return;let s,o=!1;try{s=n.document.readyState}catch(e){return}if("complete"!==s){const n=setTimeout(()=>{o||(t(),o=!0)},r);return void e.addEventListener("load",()=>{clearTimeout(n),o=!0,t()})}const i="about:blank";if(n.location.href!==i||e.src===i||""===e.src)return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}(e,()=>{const t=e.contentDocument;if(t&&C){const r=Hl(t,{doc:t,mirror:o,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:d,maskTextFn:p,maskInputFn:f,maskAttributeFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:y,recordCanvas:w,preserveWhiteSpace:A,onSerialize:b,onAdoptedStyleSheet:S,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:O});r&&C(e,r)}},x),_.type===el.Element&&"link"===_.tagName&&"string"==typeof _.attributes.rel&&("stylesheet"===_.attributes.rel||"preload"===_.attributes.rel&&"string"==typeof _.attributes.href&&"css"===bl(_.attributes.href))&&function(e,t,r){let n,s=!1;try{n=e.sheet}catch(e){return}if(n)return;const o=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),s=!0,t()})}(e,()=>{if(k){const t=Hl(e,{doc:s,mirror:o,blockClass:i,blockSelector:a,needsMask:T,maskTextClass:l,maskTextSelector:c,skipChild:!1,inlineStylesheet:h,maskInputOptions:d,maskTextFn:p,maskInputFn:f,maskAttributeFn:m,slimDOMOptions:g,dataURLOptions:v,inlineImages:y,recordCanvas:w,preserveWhiteSpace:A,onSerialize:b,onIframeLoad:C,iframeLoadTimeout:x,onStylesheetLoad:k,stylesheetLoadTimeout:I,keepIframeSrcFn:O});t&&k(e,t)}},I),_}function Jl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Kl(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Yl,Ql={exports:{}};function Xl(){if(Yl)return Ql.exports;Yl=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Ql.exports=t(),Ql.exports.createColors=t,Ql.exports}const Zl=Kl(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var ec,tc;function rc(){if(tc)return ec;tc=1;let e=Xl(),t=Zl;class r extends Error{constructor(e,t,n,s,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;null==r&&(r=e.isColorSupported),t&&r&&(n=t(n));let s,o,i=n.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:n}=e.createColors(!0);s=e=>t(n(e)),o=e=>r(e)}else s=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,n=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(n)+e+"\n "+t+s("^")}return" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return ec=r,r.default=r,ec}var nc,sc,oc,ic,ac,lc,cc,uc,hc,dc,pc,fc,mc,gc,vc,yc,wc,bc,Sc,Cc,xc,kc,Ic,Oc,Ec,Mc,Rc,Pc,Tc,Ac,Nc,Lc,_c,Dc,Fc,Uc,Bc,jc,zc,Wc,qc,$c,Vc,Gc,Hc,Jc,Kc,Yc,Qc,Xc,Zc,eu,tu,ru={};function nu(){return nc||(nc=1,ru.isClean=Symbol("isClean"),ru.my=Symbol("my")),ru}
vendor: 5,882 bytes, line 26
26function su(){if(oc)return sc;oc=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let s;if(n||(n=r),r&&(s=t.raws[r],void 0!==s))return s;let o=t.parent;if("before"===n){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[n];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?s=this[e](i,t):i.walk(e=>{if(s=e.raws[r],void 0!==s)return!1})}var a;return void 0===s&&(s=e[n]),i.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return sc=t,t.default=t,sc}function ou(){if(ac)return ic;ac=1;let e=su();function t(t,r){new e(r).stringify(t)}return ic=t,t.default=t,ic}function iu(){if(cc)return lc;cc=1;let{isClean:e,my:t}=nu(),r=rc(),n=su(),s=ou();function o(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>o(e,r)):("object"===i&&null!==s&&(s=o(s)),r[n]=s)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}
vendor: 5,457 bytes, line 26
26markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new n).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return lc=i,i.default=i,lc}function au(){if(hc)return uc;hc=1;let e=iu();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return uc=t,t.default=t,uc}function lu(){if(pc)return dc;pc=1;return dc={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",s=r;for(;s--;)n+=e[Math.random()*e.length|0];return n}},dc}function cu(){if(mc)return fc;mc=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zl,{existsSync:r,readFileSync:n}=Zl,{dirname:s,join:o}=Zl;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n){if("string"==typeof n)return n;if("function"!=typeof n){if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}{let e=n(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(s(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return fc=i,i.default=i,fc}function uu(){if(vc)return gc;vc=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zl,{fileURLToPath:r,pathToFileURL:n}=Zl,{isAbsolute:s,resolve:o}=Zl,{nanoid:i}
vendor: 13,680 bytes, line 26
26=lu(),a=Zl,l=rc(),c=cu(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),d=Boolean(o&&s);class p{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=o(t.from)),d&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,i,a;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,a=e.col}else i=n.line,a=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=s(u.source)?n(u.source):new URL(u.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let d=c.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return gc=p,p.default=p,a&&a.registerInput&&a.registerInput(p),gc}function hu(){if(wc)return yc;wc=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Zl,{dirname:r,relative:n,resolve:s,sep:o}=Zl,{pathToFileURL:i}=Zl,a=uu(),l=Boolean(e&&t),c=Boolean(r&&s&&n&&o);return yc=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,s=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,s,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,n=1,s=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=n,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(n+=e.length,r=t.lastIndexOf("\n"),s=t.length-r):s+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=n,i.generated.column=s-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(s(o,this.mapOpts.annotation)));let i=n(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},yc}function du(){if(Sc)return bc;Sc=1;let e=iu();class t extends e{constructor(e){super(e),this.type="comment"}}return bc=t,t.default=t,bc}function pu(){if(xc)return Cc;xc=1;let e,t,r,n,{isClean:s,my:o}=nu(),i=au(),a=du(),l=iu();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=c(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n)){n=n.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===n.type&&"document"!==this.type){n=n.nodes.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw new Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new i(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else{if(!n.text)throw new Error("Unknown node type in node creation");n=[new a(n)]}return n.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{n=e},Cc=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{h.rebuild(e)})},Cc}function fu(){if(Ic)return kc;Ic=1;let e,t,r=pu();
vendor: 4,359 bytes, line 26
26class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},kc=n,n.default=n,kc}function mu(){if(Ec)return Oc;Ec=1;let e={};return Oc=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function gu(){if(Rc)return Mc;Rc=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Mc=e,e.default=e,Mc}function vu(){if(Tc)return Pc;Tc=1;let e=gu();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return Pc=t,t.default=t,Pc}function yu(){if(_c)return Lc;_c=1;let e=pu();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return Lc=t,t.default=t,e.registerAtRule(t),Lc}function wu(){if(Fc)return Dc;Fc=1;let e,t,r=pu();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},Dc=n,n.default=n,r.registerRoot(n),Dc}function bu(){if(Bc)return Uc;Bc=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let n=[],s="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};return Uc=e,e.default=e,Uc}function Su(){if(zc)return jc;zc=1;let e=pu(),t=bu();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return jc=r,r.default=r,e.registerRule(r),jc}function Cu(){if(qc)return Wc;qc=1;let e=au(),t=function(){if(Nc)return Ac;Nc=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),n="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return Ac=function(x,k={}){let I,O,E,M,R,P,T,A,N,L,_=x.css.valueOf(),D=k.ignoreErrors,F=_.length,U=0,B=[],j=[];function z(e){throw x.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=F},nextToken:function(x){if(j.length)return j.pop();if(U>=F)return;let k=!!x&&x.ignoreUnclosed;switch(I=_.charCodeAt(U),I){case s:case o:case a:case l:case i:O=U;do{O+=1,I=_.charCodeAt(O)}while(I===o||I===s||I===a||I===l||I===i);L=["space",_.slice(U,O)],U=O-1;break;case c:case u:case p:case f:case v:case m:case d:{let e=String.fromCharCode(I);L=[e,e,U];break}case h:if(A=B.length?B.pop()[1]:"",N=_.charCodeAt(U+1),"url"===A&&N!==e&&N!==t&&N!==o&&N!==s&&N!==a&&N!==i&&N!==l){O=U;
vendor: 15,533 bytes, line 26
26do{if(P=!1,O=_.indexOf(")",O+1),-1===O){if(D||k){O=U;break}z("bracket")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["brackets",_.slice(U,O+1),U,O],U=O}else O=_.indexOf(")",U+1),M=_.slice(U,O+1),-1===O||S.test(M)?L=["(","(",U]:(L=["brackets",M,U,O],U=O);break;case e:case t:E=I===e?"'":'"',O=U;do{if(P=!1,O=_.indexOf(E,O+1),-1===O){if(D||k){O=U+1;break}z("string")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["string",_.slice(U,O+1),U,O],U=O;break;case y:w.lastIndex=U+1,w.test(_),O=0===w.lastIndex?_.length-1:w.lastIndex-2,L=["at-word",_.slice(U,O+1),U,O],U=O;break;case r:for(O=U,R=!0;_.charCodeAt(O+1)===r;)O+=1,R=!R;if(I=_.charCodeAt(O+1),R&&I!==n&&I!==o&&I!==s&&I!==a&&I!==l&&I!==i&&(O+=1,C.test(_.charAt(O)))){for(;C.test(_.charAt(O+1));)O+=1;_.charCodeAt(O+1)===o&&(O+=1)}L=["word",_.slice(U,O+1),U,O],U=O;break;default:I===n&&_.charCodeAt(U+1)===g?(O=_.indexOf("*/",U+2)+1,0===O&&(D||k?O=_.length:z("comment")),L=["comment",_.slice(U,O+1),U,O],U=O):(b.lastIndex=U+1,b.test(_),O=0===b.lastIndex?_.length-1:b.lastIndex-2,L=["word",_.slice(U,O+1),U,O],B.push(L),U=O)}return U++,L},position:function(){return U}}}}(),r=du(),n=yu(),s=wu(),o=Su();const i={empty:!0,space:!0};return Wc=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,r=l[s];r&&"space"===r[0];)r=l[--s];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n=new e;this.init(n,t[0][2]);let s,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){n.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===s[1].toLowerCase()){let r=t.slice(0),s="";for(let t=e;t>0;t--){let e=r[t][0];if(0===s.trim().indexOf("!")&&"space"!==e)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(n.important=!0,n.raws.important=s,t=r)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(t),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),o.push("("===r?")":"]");else if(i&&n&&"{"===r)s||(s=l),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)s=r[e],o=s[0],"space"!==o||e!==c-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=s[1]):u+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},Wc}function xu(){if(Vc)return $c;Vc=1;let e=pu(),t=Cu(),r=uu();function n(e,n){let s=new r(e,n),o=new t(s);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&n&&n.from&&(/\.scss$/i.test(n.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(n.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(n.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return $c=n,n.default=n,e.registerParse(n),$c}function ku(){if(Hc)return Gc;Hc=1;let{isClean:e,my:t}=nu(),r=hu(),n=ou(),s=pu(),o=fu(),i=mu(),a=vu(),l=xu(),c=wu();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let v={};class y{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof a)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=l;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&s.rebuild(o)}else o=g(r);this.result=new a(e,o,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),o=n.split(".");(s[0]!==o[0]||parseInt(s[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new r(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(p(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:s}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(s.length>0&&r.visitorIndex<s.length){let[e,t]=s[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===s.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let s,o=r.iterator;for(;s=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!s[e])return s[e]=!0,void t.push(m(s));r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let n of r)if(0===n)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}
vendor: 6,248 bytes, line 26
26get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{v=e},Gc=y,y.default=y,c.registerLazyResult(y),o.registerLazyResult(y),Gc}function Iu(){if(Qc)return Yc;Qc=1;let e=function(){if(Kc)return Jc;Kc=1;let e=hu(),t=ou(),r=mu(),n=xu();const s=vu();class o{constructor(r,n,o){let i;n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=o,this._map=void 0;let a=t;this.result=new s(this._processor,i,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,n);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Jc=o,o.default=o,Jc}(),t=ku(),r=fu(),n=wu();class s{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Yc=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),Yc}var Ou=function(){if(tu)return eu;tu=1;let e=rc(),t=au(),r=ku(),n=pu(),s=Iu(),o=ou(),i=function(){if(Zc)return Xc;Zc=1;let e=au(),t=cu(),r=du(),n=yu(),s=uu(),o=wu(),i=Su();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+l.type)}return Xc=a,a.default=a,Xc}(),a=fu(),l=gu(),c=du(),u=yu(),h=vu(),d=uu(),p=xu(),f=bu(),m=Su(),g=wu(),v=iu();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=p,y.fromJSON=i,y.list=f,y.comment=e=>new c(e),y.atRule=e=>new u(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=s,y.Document=a,y.Comment=c,y.Warning=l,y.AtRule=u,y.Result=h,y.Input=d,y.Rule=m,y.Root=g,y.Node=v,r.registerPostcss(y),eu=y,y.default=y,eu}();const Eu=Jl(Ou);Eu.stringify,Eu.fromJSON,Eu.plugin,Eu.parse,Eu.list,Eu.document,Eu.comment,Eu.atRule,Eu.rule,Eu.decl,Eu.root,Eu.CssSyntaxError,Eu.Declaration,Eu.Container,Eu.Processor,Eu.Document,Eu.Comment,Eu.Warning,Eu.AtRule,Eu.Result,Eu.Input,Eu.Rule,Eu.Root,Eu.Node;var Mu=Object.defineProperty,Ru=(e,t,r)=>((e,t,r)=>t in e?Mu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r)(e,"symbol"!=typeof t?t+"":t,r);function Pu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Tu(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var Au,Nu={exports:{}};function Lu(){if(Au)return Nu.exports;Au=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Nu.exports=t(),Nu.exports.createColors=t,Nu.exports}const _u=Tu(Object.freeze(Object.defineProperty({__proto__:null,default:{}},Symbol.toStringTag,{value:"Module"})));var Du,Fu;
vendor: 6,822 bytes, line 26
26function Uu(){if(Fu)return Du;Fu=1;let e=Lu(),t=_u;class r extends Error{constructor(e,t,n,s,o,i){super(e),this.name="CssSyntaxError",this.reason=e,o&&(this.file=o),s&&(this.source=s),i&&(this.plugin=i),void 0!==t&&void 0!==n&&("number"==typeof t?(this.line=t,this.column=n):(this.line=t.line,this.column=t.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",void 0!==this.line&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(r){if(!this.source)return"";let n=this.source;null==r&&(r=e.isColorSupported),t&&r&&(n=t(n));let s,o,i=n.split(/\r?\n/),a=Math.max(this.line-3,0),l=Math.min(this.line+2,i.length),c=String(l).length;if(r){let{bold:t,gray:r,red:n}=e.createColors(!0);s=e=>t(n(e)),o=e=>r(e)}else s=o=e=>e;return i.slice(a,l).map((e,t)=>{let r=a+1+t,n=" "+(" "+r).slice(-c)+" | ";if(r===this.line){let t=o(n.replace(/\d/g," "))+e.slice(0,this.column-1).replace(/[^\t]/g," ");return s(">")+o(n)+e+"\n "+t+s("^")}return" "+o(n)+e}).join("\n")}toString(){let e=this.showSourceCode();return e&&(e="\n\n"+e+"\n"),this.name+": "+this.message+e}}return Du=r,r.default=r,Du}var Bu,ju,zu,Wu,qu,$u,Vu,Gu,Hu,Ju,Ku,Yu,Qu,Xu,Zu,eh,th,rh,nh,sh,oh,ih,ah,lh,ch,uh,hh,dh,ph,fh,mh,gh,vh,yh,wh,bh,Sh,Ch,xh,kh,Ih,Oh,Eh,Mh,Rh,Ph,Th,Ah,Nh,Lh,_h,Dh,Fh,Uh={};function Bh(){return Bu||(Bu=1,Uh.isClean=Symbol("isClean"),Uh.my=Symbol("my")),Uh}function jh(){if(zu)return ju;zu=1;const e={after:"\n",beforeClose:"\n",beforeComment:"\n",beforeDecl:"\n",beforeOpen:" ",beforeRule:"\n",colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};class t{constructor(e){this.builder=e}atrule(e,t){let r="@"+e.name,n=e.params?this.rawValue(e,"params"):"";if(void 0!==e.raws.afterName?r+=e.raws.afterName:n&&(r+=" "),e.nodes)this.block(e,r+n);else{let s=(e.raws.between||"")+(t?";":"");this.builder(r+n+s,e)}}beforeAfter(e,t){let r;r="decl"===e.type?this.raw(e,null,"beforeDecl"):"comment"===e.type?this.raw(e,null,"beforeComment"):"before"===t?this.raw(e,null,"beforeRule"):this.raw(e,null,"beforeClose");let n=e.parent,s=0;for(;n&&"root"!==n.type;)s+=1,n=n.parent;if(r.includes("\n")){let t=this.raw(e,null,"indent");if(t.length)for(let e=0;e<s;e++)r+=t}return r}block(e,t){let r,n=this.raw(e,"between","beforeOpen");this.builder(t+n+"{",e,"start"),e.nodes&&e.nodes.length?(this.body(e),r=this.raw(e,"after")):r=this.raw(e,"after","emptyBody"),r&&this.builder(r),this.builder("}",e,"end")}body(e){let t=e.nodes.length-1;for(;t>0&&"comment"===e.nodes[t].type;)t-=1;let r=this.raw(e,"semicolon");for(let n=0;n<e.nodes.length;n++){let s=e.nodes[n],o=this.raw(s,"before");o&&this.builder(o),this.stringify(s,t!==n||r)}}comment(e){let t=this.raw(e,"left","commentLeft"),r=this.raw(e,"right","commentRight");this.builder("/*"+t+e.text+r+"*/",e)}decl(e,t){let r=this.raw(e,"between","colon"),n=e.prop+r+this.rawValue(e,"value");e.important&&(n+=e.raws.important||" !important"),t&&(n+=";"),this.builder(n,e)}document(e){this.body(e)}raw(t,r,n){let s;if(n||(n=r),r&&(s=t.raws[r],void 0!==s))return s;let o=t.parent;if("before"===n){if(!o||"root"===o.type&&o.first===t)return"";if(o&&"document"===o.type)return""}if(!o)return e[n];let i=t.root();if(i.rawCache||(i.rawCache={}),void 0!==i.rawCache[n])return i.rawCache[n];if("before"===n||"after"===n)return this.beforeAfter(t,n);{let e="raw"+((a=n)[0].toUpperCase()+a.slice(1));this[e]?s=this[e](i,t):i.walk(e=>{if(s=e.raws[r],void 0!==s)return!1})}var a;return void 0===s&&(s=e[n]),i.rawCache[n]=s,s}rawBeforeClose(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length>0&&void 0!==e.raws.after)return t=e.raws.after,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawBeforeComment(e,t){let r;return e.walkComments(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeDecl"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeDecl(e,t){let r;return e.walkDecls(e=>{if(void 0!==e.raws.before)return r=e.raws.before,r.includes("\n")&&(r=r.replace(/[^\n]+$/,"")),!1}),void 0===r?r=this.raw(t,null,"beforeRule"):r&&(r=r.replace(/\S/g,"")),r}rawBeforeOpen(e){let t;return e.walk(e=>{if("decl"!==e.type&&(t=e.raws.between,void 0!==t))return!1}),t}rawBeforeRule(e){let t;return e.walk(r=>{if(r.nodes&&(r.parent!==e||e.first!==r)&&void 0!==r.raws.before)return t=r.raws.before,t.includes("\n")&&(t=t.replace(/[^\n]+$/,"")),!1}),t&&(t=t.replace(/\S/g,"")),t}rawColon(e){let t;return e.walkDecls(e=>{if(void 0!==e.raws.between)return t=e.raws.between.replace(/[^\s:]/g,""),!1}),t}rawEmptyBody(e){let t;return e.walk(e=>{if(e.nodes&&0===e.nodes.length&&(t=e.raws.after,void 0!==t))return!1}),t}rawIndent(e){if(e.raws.indent)return e.raws.indent;let t;return e.walk(r=>{let n=r.parent;if(n&&n!==e&&n.parent&&n.parent===e&&void 0!==r.raws.before){let e=r.raws.before.split("\n");return t=e[e.length-1],t=t.replace(/\S/g,""),!1}}),t}rawSemicolon(e){let t;return e.walk(e=>{if(e.nodes&&e.nodes.length&&"decl"===e.last.type&&(t=e.raws.semicolon,void 0!==t))return!1}),t}rawValue(e,t){let r=e[t],n=e.raws[t];return n&&n.value===r?n.raw:r}root(e){this.body(e),e.raws.after&&this.builder(e.raws.after)}rule(e){this.block(e,this.rawValue(e,"selector")),e.raws.ownSemicolon&&this.builder(e.raws.ownSemicolon,e,"end")}stringify(e,t){if(!this[e.type])throw new Error("Unknown AST node type "+e.type+". Maybe you need to change PostCSS stringifier.");this[e.type](e,t)}}return ju=t,t.default=t,ju}function zh(){if(qu)return Wu;qu=1;let e=jh();function t(t,r){new e(r).stringify(t)}return Wu=t,t.default=t,Wu}function Wh(){if(Vu)return $u;Vu=1;let{isClean:e,my:t}=Bh(),r=Uu(),n=jh(),s=zh();function o(e,t){let r=new e.constructor;for(let n in e){if(!Object.prototype.hasOwnProperty.call(e,n))continue;if("proxyCache"===n)continue;let s=e[n],i=typeof s;"parent"===n&&"object"===i?t&&(r[n]=t):"source"===n?r[n]=s:Array.isArray(s)?r[n]=s.map(e=>o(e,r)):("object"===i&&null!==s&&(s=o(s)),r[n]=s)}return r}class i{constructor(r={}){this.raws={},this[e]=!1,this[t]=!0;for(let e in r)if("nodes"===e){this.nodes=[];for(let t of r[e])"function"==typeof t.clone?this.append(t.clone()):this.append(t)}else this[e]=r[e]}addToError(e){if(e.postcssNode=this,e.stack&&this.source&&/\n\s{4}at /.test(e.stack)){let t=this.source;e.stack=e.stack.replace(/\n\s{4}at /,`$&${t.input.from}:${t.start.line}:${t.start.column}$&`)}return e}after(e){return this.parent.insertAfter(this,e),this}assign(e={}){for(let t in e)this[t]=e[t];return this}before(e){return this.parent.insertBefore(this,e),this}cleanRaws(e){delete this.raws.before,delete this.raws.after,e||delete this.raws.between}clone(e={}
vendor: 6,067 bytes, line 26
26){let t=o(this);for(let r in e)t[r]=e[r];return t}cloneAfter(e={}){let t=this.clone(e);return this.parent.insertAfter(this,t),t}cloneBefore(e={}){let t=this.clone(e);return this.parent.insertBefore(this,t),t}error(e,t={}){if(this.source){let{end:r,start:n}=this.rangeBy(t);return this.source.input.error(e,{column:n.column,line:n.line},{column:r.column,line:r.line},t)}return new r(e)}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:"root"===t?()=>e.root().toProxy():e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"prop"!==t&&"value"!==t&&"name"!==t&&"params"!==t&&"important"!==t&&"text"!==t||e.markDirty()),!0)}}markDirty(){if(this[e]){this[e]=!1;let t=this;for(;t=t.parent;)t[e]=!1}}next(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e+1]}positionBy(e,t){let r=this.source.start;if(e.index)r=this.positionInside(e.index,t);else if(e.word){let n=(t=this.toString()).indexOf(e.word);-1!==n&&(r=this.positionInside(n,t))}return r}positionInside(e,t){let r=t||this.toString(),n=this.source.start.column,s=this.source.start.line;for(let t=0;t<e;t++)"\n"===r[t]?(n=1,s+=1):n+=1;return{column:n,line:s}}prev(){if(!this.parent)return;let e=this.parent.index(this);return this.parent.nodes[e-1]}rangeBy(e){let t={column:this.source.start.column,line:this.source.start.line},r=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:t.column+1,line:t.line};if(e.word){let n=this.toString(),s=n.indexOf(e.word);-1!==s&&(t=this.positionInside(s,n),r=this.positionInside(s+e.word.length,n))}else e.start?t={column:e.start.column,line:e.start.line}:e.index&&(t=this.positionInside(e.index)),e.end?r={column:e.end.column,line:e.end.line}:"number"==typeof e.endIndex?r=this.positionInside(e.endIndex):e.index&&(r=this.positionInside(e.index+1));return(r.line<t.line||r.line===t.line&&r.column<=t.column)&&(r={column:t.column+1,line:t.line}),{end:r,start:t}}raw(e,t){return(new n).raw(this,e,t)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...e){if(this.parent){let t=this,r=!1;for(let n of e)n===this?r=!0:r?(this.parent.insertAfter(t,n),t=n):this.parent.insertBefore(t,n);r||this.remove()}return this}root(){let e=this;for(;e.parent&&"document"!==e.parent.type;)e=e.parent;return e}toJSON(e,t){let r={},n=null==t;t=t||new Map;let s=0;for(let e in this){if(!Object.prototype.hasOwnProperty.call(this,e))continue;if("parent"===e||"proxyCache"===e)continue;let n=this[e];if(Array.isArray(n))r[e]=n.map(e=>"object"==typeof e&&e.toJSON?e.toJSON(null,t):e);else if("object"==typeof n&&n.toJSON)r[e]=n.toJSON(null,t);else if("source"===e){let o=t.get(n.input);null==o&&(o=s,t.set(n.input,s),s++),r[e]={end:n.end,inputId:o,start:n.start}}else r[e]=n}return n&&(r.inputs=[...t.keys()].map(e=>e.toJSON())),r}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(e=s){e.stringify&&(e=e.stringify);let t="";return e(this,e=>{t+=e}),t}warn(e,t,r){let n={node:this};for(let e in r)n[e]=r[e];return e.warn(t,n)}get proxyOf(){return this}}return $u=i,i.default=i,$u}function qh(){if(Hu)return Gu;Hu=1;let e=Wh();class t extends e{constructor(e){e&&void 0!==e.value&&"string"!=typeof e.value&&(e={...e,value:String(e.value)}),super(e),this.type="decl"}get variable(){return this.prop.startsWith("--")||"$"===this.prop[0]}}return Gu=t,t.default=t,Gu}function $h(){if(Ku)return Ju;Ku=1;return Ju={nanoid:(e=21)=>{let t="",r=e;for(;r--;)t+="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict"[64*Math.random()|0];return t},customAlphabet:(e,t=21)=>(r=t)=>{let n="",s=r;for(;s--;)n+=e[Math.random()*e.length|0];return n}},Ju}function Vh(){if(Qu)return Yu;Qu=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_u,{existsSync:r,readFileSync:n}=_u,{dirname:s,join:o}=_u;class i{constructor(e,t){if(!1===t.map)return;this.loadAnnotation(e),this.inline=this.startWith(this.annotation,"data:");let r=t.map?t.map.prev:void 0,n=this.loadMap(t.from,r);!this.mapFile&&t.from&&(this.mapFile=t.from),this.mapFile&&(this.root=s(this.mapFile)),n&&(this.text=n)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(e){if(/^data:application\/json;charset=utf-?8,/.test(e)||/^data:application\/json,/.test(e))return decodeURIComponent(e.substr(RegExp.lastMatch.length));if(/^data:application\/json;charset=utf-?8;base64,/.test(e)||/^data:application\/json;base64,/.test(e))return t=e.substr(RegExp.lastMatch.length),Buffer?Buffer.from(t,"base64").toString():window.atob(t);var t;let r=e.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+r)}getAnnotationURL(e){return e.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(e){return"object"==typeof e&&("string"==typeof e.mappings||"string"==typeof e._mappings||Array.isArray(e.sections))}loadAnnotation(e){let t=e.match(/\/\*\s*# sourceMappingURL=/gm);if(!t)return;let r=e.lastIndexOf(t.pop()),n=e.indexOf("*/",r);r>-1&&n>-1&&(this.annotation=this.getAnnotationURL(e.substring(r,n)))}loadFile(e){if(this.root=s(e),r(e))return this.mapFile=e,n(e,"utf-8").toString().trim()}loadMap(r,n){if(!1===n)return!1;if(n){if("string"==typeof n)return n;if("function"!=typeof n){if(n instanceof e)return t.fromSourceMap(n).toString();if(n instanceof t)return n.toString();if(this.isMap(n))return JSON.stringify(n);throw new Error("Unsupported previous source map format: "+n.toString())}{let e=n(r);if(e){let t=this.loadFile(e);if(!t)throw new Error("Unable to load previous source map: "+e.toString());return t}}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let e=this.annotation;return r&&(e=o(s(r),e)),this.loadFile(e)}}}startWith(e,t){return!!e&&e.substr(0,t.length)===t}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return Yu=i,i.default=i,Yu}function Gh(){if(Zu)return Xu;Zu=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_u,{fileURLToPath:r,pathToFileURL:n}=_u,{isAbsolute:s,resolve:o}=_u,{nanoid:i}
vendor: 13,680 bytes, line 26
26=$h(),a=_u,l=Uu(),c=Vh(),u=Symbol("fromOffsetCache"),h=Boolean(e&&t),d=Boolean(o&&s);class p{constructor(e,t={}){if(null==e||"object"==typeof e&&!e.toString)throw new Error(`PostCSS received ${e} instead of CSS string`);if(this.css=e.toString(),"\ufeff"===this.css[0]||"￾"===this.css[0]?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,t.from&&(!d||/^\w+:\/\//.test(t.from)||s(t.from)?this.file=t.from:this.file=o(t.from)),d&&h){let e=new c(this.css,t);if(e.text){this.map=e;let t=e.consumer().file;!this.file&&t&&(this.file=this.mapResolve(t))}}this.file||(this.id="<input css "+i(6)+">"),this.map&&(this.map.file=this.from)}error(e,t,r,s={}){let o,i,a;if(t&&"object"==typeof t){let e=t,n=r;if("number"==typeof e.offset){let n=this.fromOffset(e.offset);t=n.line,r=n.col}else t=e.line,r=e.column;if("number"==typeof n.offset){let e=this.fromOffset(n.offset);i=e.line,a=e.col}else i=n.line,a=n.column}else if(!r){let e=this.fromOffset(t);t=e.line,r=e.col}let c=this.origin(t,r,i,a);return o=c?new l(e,void 0===c.endLine?c.line:{column:c.column,line:c.line},void 0===c.endLine?c.column:{column:c.endColumn,line:c.endLine},c.source,c.file,s.plugin):new l(e,void 0===i?t:{column:r,line:t},void 0===i?r:{column:a,line:i},this.css,this.file,s.plugin),o.input={column:r,endColumn:a,endLine:i,line:t,source:this.css},this.file&&(n&&(o.input.url=n(this.file).toString()),o.input.file=this.file),o}fromOffset(e){let t,r;if(this[u])r=this[u];else{let e=this.css.split("\n");r=new Array(e.length);let t=0;for(let n=0,s=e.length;n<s;n++)r[n]=t,t+=e[n].length+1;this[u]=r}t=r[r.length-1];let n=0;if(e>=t)n=r.length-1;else{let t,s=r.length-2;for(;n<s;)if(t=n+(s-n>>1),e<r[t])s=t-1;else{if(!(e>=r[t+1])){n=t;break}n=t+1}}return{col:e-r[n]+1,line:n+1}}mapResolve(e){return/^\w+:\/\//.test(e)?e:o(this.map.consumer().sourceRoot||this.map.root||".",e)}origin(e,t,o,i){if(!this.map)return!1;let a,l,c=this.map.consumer(),u=c.originalPositionFor({column:t,line:e});if(!u.source)return!1;"number"==typeof o&&(a=c.originalPositionFor({column:i,line:o})),l=s(u.source)?n(u.source):new URL(u.source,this.map.consumer().sourceRoot||n(this.map.mapFile));let h={column:u.column,endColumn:a&&a.column,endLine:a&&a.line,line:u.line,url:l.toString()};if("file:"===l.protocol){if(!r)throw new Error("file: protocol is not available in this PostCSS build");h.file=r(l)}let d=c.sourceContentFor(u.source);return d&&(h.source=d),h}toJSON(){let e={};for(let t of["hasBOM","css","file","id"])null!=this[t]&&(e[t]=this[t]);return this.map&&(e.map={...this.map},e.map.consumerCache&&(e.map.consumerCache=void 0)),e}get from(){return this.file||this.id}}return Xu=p,p.default=p,a&&a.registerInput&&a.registerInput(p),Xu}function Hh(){if(th)return eh;th=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=_u,{dirname:r,relative:n,resolve:s,sep:o}=_u,{pathToFileURL:i}=_u,a=Gh(),l=Boolean(e&&t),c=Boolean(r&&s&&n&&o);return eh=class{constructor(e,t,r,n){this.stringify=e,this.mapOpts=r.map||{},this.root=t,this.opts=r,this.css=n,this.originalCSS=n,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let e;e=this.isInline()?"data:application/json;base64,"+this.toBase64(this.map.toString()):"string"==typeof this.mapOpts.annotation?this.mapOpts.annotation:"function"==typeof this.mapOpts.annotation?this.mapOpts.annotation(this.opts.to,this.root):this.outputFile()+".map";let t="\n";this.css.includes("\r\n")&&(t="\r\n"),this.css+=t+"/*# sourceMappingURL="+e+" */"}applyPrevMaps(){for(let t of this.previous()){let n,s=this.toUrl(this.path(t.file)),o=t.root||r(t.file);!1===this.mapOpts.sourcesContent?(n=new e(t.text),n.sourcesContent&&(n.sourcesContent=null)):n=t.consumer(),this.map.applySourceMap(n,s,this.toUrl(this.path(o)))}}clearAnnotation(){if(!1!==this.mapOpts.annotation)if(this.root){let e;for(let t=this.root.nodes.length-1;t>=0;t--)e=this.root.nodes[t],"comment"===e.type&&0===e.text.indexOf("# sourceMappingURL=")&&this.root.removeChild(t)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&l&&this.isMap())return this.generateMap();{let e="";return this.stringify(this.root,t=>{e+=t}),[e]}}generateMap(){if(this.root)this.generateString();else if(1===this.previous().length){let e=this.previous()[0].consumer();e.file=this.outputFile(),this.map=t.fromSourceMap(e,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let e,r,n=1,s=1,o="<no source>",i={generated:{column:0,line:0},original:{column:0,line:0},source:""};this.stringify(this.root,(t,a,l)=>{if(this.css+=t,a&&"end"!==l&&(i.generated.line=n,i.generated.column=s-1,a.source&&a.source.start?(i.source=this.sourcePath(a),i.original.line=a.source.start.line,i.original.column=a.source.start.column-1,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,this.map.addMapping(i))),e=t.match(/\n/g),e?(n+=e.length,r=t.lastIndexOf("\n"),s=t.length-r):s+=t.length,a&&"start"!==l){let e=a.parent||{raws:{}};("decl"===a.type||"atrule"===a.type&&!a.nodes)&&a===e.last&&!e.raws.semicolon||(a.source&&a.source.end?(i.source=this.sourcePath(a),i.original.line=a.source.end.line,i.original.column=a.source.end.column-1,i.generated.line=n,i.generated.column=s-2,this.map.addMapping(i)):(i.source=o,i.original.line=1,i.original.column=0,i.generated.line=n,i.generated.column=s-1,this.map.addMapping(i)))}})}isAnnotation(){return!!this.isInline()||(void 0!==this.mapOpts.annotation?this.mapOpts.annotation:!this.previous().length||this.previous().some(e=>e.annotation))}isInline(){if(void 0!==this.mapOpts.inline)return this.mapOpts.inline;let e=this.mapOpts.annotation;return(void 0===e||!0===e)&&(!this.previous().length||this.previous().some(e=>e.inline))}isMap(){return void 0!==this.opts.map?!!this.opts.map:this.previous().length>0}isSourcesContent(){return void 0!==this.mapOpts.sourcesContent?this.mapOpts.sourcesContent:!this.previous().length||this.previous().some(e=>e.withContent())}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(e){if(this.mapOpts.absolute)return e;if(60===e.charCodeAt(0))return e;if(/^\w+:\/\//.test(e))return e;let t=this.memoizedPaths.get(e);if(t)return t;let o=this.opts.to?r(this.opts.to):".";"string"==typeof this.mapOpts.annotation&&(o=r(s(o,this.mapOpts.annotation)));let i=n(o,e);return this.memoizedPaths.set(e,i),i}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(e=>{if(e.source&&e.source.input.map){let t=e.source.input.map;this.previousMaps.includes(t)||this.previousMaps.push(t)}});else{let e=new a(this.originalCSS,this.opts);e.map&&this.previousMaps.push(e.map)}return this.previousMaps}setSourcesContent(){let e={};if(this.root)this.root.walk(t=>{if(t.source){let r=t.source.input.from;if(r&&!e[r]){e[r]=!0;let n=this.usesFileUrls?this.toFileUrl(r):this.toUrl(this.path(r));this.map.setSourceContent(n,t.source.input.css)}}});else if(this.css){let e=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(e,this.css)}}sourcePath(e){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(e.source.input.from):this.toUrl(this.path(e.source.input.from))}toBase64(e){return Buffer?Buffer.from(e).toString("base64"):window.btoa(unescape(encodeURIComponent(e)))}toFileUrl(e){let t=this.memoizedFileURLs.get(e);if(t)return t;if(i){let t=i(e).toString();return this.memoizedFileURLs.set(e,t),t}throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(e){let t=this.memoizedURLs.get(e);if(t)return t;"\\"===o&&(e=e.replace(/\\/g,"/"));let r=encodeURI(e).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(e,r),r}},eh}function Jh(){if(nh)return rh;nh=1;let e=Wh();class t extends e{constructor(e){super(e),this.type="comment"}}return rh=t,t.default=t,rh}function Kh(){if(oh)return sh;oh=1;let e,t,r,n,{isClean:s,my:o}=Bh(),i=qh(),a=Jh(),l=Wh();function c(e){return e.map(e=>(e.nodes&&(e.nodes=c(e.nodes)),delete e.source,e))}function u(e){if(e[s]=!1,e.proxyOf.nodes)for(let t of e.proxyOf.nodes)u(t)}class h extends l{append(...e){for(let t of e){let e=this.normalize(t,this.last);for(let t of e)this.proxyOf.nodes.push(t)}return this.markDirty(),this}cleanRaws(e){if(super.cleanRaws(e),this.nodes)for(let t of this.nodes)t.cleanRaws(e)}each(e){if(!this.proxyOf.nodes)return;let t,r,n=this.getIterator();for(;this.indexes[n]<this.proxyOf.nodes.length&&(t=this.indexes[n],r=e(this.proxyOf.nodes[t],t),!1!==r);)this.indexes[n]+=1;return delete this.indexes[n],r}every(e){return this.nodes.every(e)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let e=this.lastEach;return this.indexes[e]=0,e}getProxyProcessor(){return{get:(e,t)=>"proxyOf"===t?e:e[t]?"each"===t||"string"==typeof t&&t.startsWith("walk")?(...r)=>e[t](...r.map(e=>"function"==typeof e?(t,r)=>e(t.toProxy(),r):e)):"every"===t||"some"===t?r=>e[t]((e,...t)=>r(e.toProxy(),...t)):"root"===t?()=>e.root().toProxy():"nodes"===t?e.nodes.map(e=>e.toProxy()):"first"===t||"last"===t?e[t].toProxy():e[t]:e[t],set:(e,t,r)=>(e[t]===r||(e[t]=r,"name"!==t&&"params"!==t&&"selector"!==t||e.markDirty()),!0)}}index(e){return"number"==typeof e?e:(e.proxyOf&&(e=e.proxyOf),this.proxyOf.nodes.indexOf(e))}insertAfter(e,t){let r,n=this.index(e),s=this.normalize(t,this.proxyOf.nodes[n]).reverse();n=this.index(e);for(let e of s)this.proxyOf.nodes.splice(n+1,0,e);for(let e in this.indexes)r=this.indexes[e],n<r&&(this.indexes[e]=r+s.length);return this.markDirty(),this}insertBefore(e,t){let r,n=this.index(e),s=0===n&&"prepend",o=this.normalize(t,this.proxyOf.nodes[n],s).reverse();n=this.index(e);for(let e of o)this.proxyOf.nodes.splice(n,0,e);for(let e in this.indexes)r=this.indexes[e],n<=r&&(this.indexes[e]=r+o.length);return this.markDirty(),this}normalize(n,l){if("string"==typeof n)n=c(e(n).nodes);else if(void 0===n)n=[];else if(Array.isArray(n)){n=n.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if("root"===n.type&&"document"!==this.type){n=n.nodes.slice(0);for(let e of n)e.parent&&e.parent.removeChild(e,"ignore")}else if(n.type)n=[n];else if(n.prop){if(void 0===n.value)throw new Error("Value field is missed in node creation");"string"!=typeof n.value&&(n.value=String(n.value)),n=[new i(n)]}else if(n.selector)n=[new t(n)];else if(n.name)n=[new r(n)];else{if(!n.text)throw new Error("Unknown node type in node creation");n=[new a(n)]}return n.map(e=>(e[o]||h.rebuild(e),(e=e.proxyOf).parent&&e.parent.removeChild(e),e[s]&&u(e),void 0===e.raws.before&&l&&void 0!==l.raws.before&&(e.raws.before=l.raws.before.replace(/\S/g,"")),e.parent=this.proxyOf,e))}prepend(...e){e=e.reverse();for(let t of e){let e=this.normalize(t,this.first,"prepend").reverse();for(let t of e)this.proxyOf.nodes.unshift(t);for(let t in this.indexes)this.indexes[t]=this.indexes[t]+e.length}return this.markDirty(),this}push(e){return e.parent=this,this.proxyOf.nodes.push(e),this}removeAll(){for(let e of this.proxyOf.nodes)e.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(e){let t;e=this.index(e),this.proxyOf.nodes[e].parent=void 0,this.proxyOf.nodes.splice(e,1);for(let r in this.indexes)t=this.indexes[r],t>=e&&(this.indexes[r]=t-1);return this.markDirty(),this}replaceValues(e,t,r){return r||(r=t,t={}),this.walkDecls(n=>{t.props&&!t.props.includes(n.prop)||t.fast&&!n.value.includes(t.fast)||(n.value=n.value.replace(e,r))}),this.markDirty(),this}some(e){return this.nodes.some(e)}walk(e){return this.each((t,r)=>{let n;try{n=e(t,r)}catch(e){throw t.addToError(e)}return!1!==n&&t.walk&&(n=t.walk(e)),n})}walkAtRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("atrule"===r.type&&e.test(r.name))return t(r,n)}):this.walk((r,n)=>{if("atrule"===r.type&&r.name===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("atrule"===e.type)return t(e,r)}))}walkComments(e){return this.walk((t,r)=>{if("comment"===t.type)return e(t,r)})}walkDecls(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("decl"===r.type&&e.test(r.prop))return t(r,n)}):this.walk((r,n)=>{if("decl"===r.type&&r.prop===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("decl"===e.type)return t(e,r)}))}walkRules(e,t){return t?e instanceof RegExp?this.walk((r,n)=>{if("rule"===r.type&&e.test(r.selector))return t(r,n)}):this.walk((r,n)=>{if("rule"===r.type&&r.selector===e)return t(r,n)}):(t=e,this.walk((e,r)=>{if("rule"===e.type)return t(e,r)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return h.registerParse=t=>{e=t},h.registerRule=e=>{t=e},h.registerAtRule=e=>{r=e},h.registerRoot=e=>{n=e},sh=h,h.default=h,h.rebuild=e=>{"atrule"===e.type?Object.setPrototypeOf(e,r.prototype):"rule"===e.type?Object.setPrototypeOf(e,t.prototype):"decl"===e.type?Object.setPrototypeOf(e,i.prototype):"comment"===e.type?Object.setPrototypeOf(e,a.prototype):"root"===e.type&&Object.setPrototypeOf(e,n.prototype),e[o]=!0,e.nodes&&e.nodes.forEach(e=>{h.rebuild(e)})},sh}function Yh(){if(ah)return ih;ah=1;let e,t,r=Kh();
vendor: 7,283 bytes, line 26
26class n extends r{constructor(e){super({type:"document",...e}),this.nodes||(this.nodes=[])}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},ih=n,n.default=n,ih}function Qh(){if(ch)return lh;ch=1;let e={};return lh=function(t){e[t]||(e[t]=!0,"undefined"!=typeof console&&console.warn&&console.warn(t))}}function Xh(){if(hh)return uh;hh=1;class e{constructor(e,t={}){if(this.type="warning",this.text=e,t.node&&t.node.source){let e=t.node.rangeBy(t);this.line=e.start.line,this.column=e.start.column,this.endLine=e.end.line,this.endColumn=e.end.column}for(let e in t)this[e]=t[e]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return uh=e,e.default=e,uh}function Zh(){if(ph)return dh;ph=1;let e=Xh();class t{constructor(e,t,r){this.processor=e,this.messages=[],this.root=t,this.opts=r,this.css=void 0,this.map=void 0}toString(){return this.css}warn(t,r={}){r.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(r.plugin=this.lastPlugin.postcssPlugin);let n=new e(t,r);return this.messages.push(n),n}warnings(){return this.messages.filter(e=>"warning"===e.type)}get content(){return this.css}}return dh=t,t.default=t,dh}function ed(){if(vh)return gh;vh=1;let e=Kh();class t extends e{constructor(e){super(e),this.type="atrule"}append(...e){return this.proxyOf.nodes||(this.nodes=[]),super.append(...e)}prepend(...e){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...e)}}return gh=t,t.default=t,e.registerAtRule(t),gh}function td(){if(wh)return yh;wh=1;let e,t,r=Kh();class n extends r{constructor(e){super(e),this.type="root",this.nodes||(this.nodes=[])}normalize(e,t,r){let n=super.normalize(e);if(t)if("prepend"===r)this.nodes.length>1?t.raws.before=this.nodes[1].raws.before:delete t.raws.before;else if(this.first!==t)for(let e of n)e.raws.before=t.raws.before;return n}removeChild(e,t){let r=this.index(e);return!t&&0===r&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[r].raws.before),super.removeChild(e)}toResult(r={}){return new e(new t,this,r).stringify()}}return n.registerLazyResult=t=>{e=t},n.registerProcessor=e=>{t=e},yh=n,n.default=n,r.registerRoot(n),yh}function rd(){if(Sh)return bh;Sh=1;let e={comma:t=>e.split(t,[","],!0),space:t=>e.split(t,[" ","\n","\t"]),split(e,t,r){let n=[],s="",o=!1,i=0,a=!1,l="",c=!1;for(let r of e)c?c=!1:"\\"===r?c=!0:a?r===l&&(a=!1):'"'===r||"'"===r?(a=!0,l=r):"("===r?i+=1:")"===r?i>0&&(i-=1):0===i&&t.includes(r)&&(o=!0),o?(""!==s&&n.push(s.trim()),s="",o=!1):s+=r;return(r||""!==s)&&n.push(s.trim()),n}};return bh=e,e.default=e,bh}function nd(){if(xh)return Ch;xh=1;let e=Kh(),t=rd();class r extends e{constructor(e){super(e),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(e){let t=this.selector?this.selector.match(/,\s*/):null,r=t?t[0]:","+this.raw("between","beforeOpen");this.selector=e.join(r)}}return Ch=r,r.default=r,e.registerRule(r),Ch}function sd(){if(Ih)return kh;Ih=1;let e=qh(),t=function(){if(mh)return fh;mh=1;const e="'".charCodeAt(0),t='"'.charCodeAt(0),r="\\".charCodeAt(0),n="/".charCodeAt(0),s="\n".charCodeAt(0),o=" ".charCodeAt(0),i="\f".charCodeAt(0),a="\t".charCodeAt(0),l="\r".charCodeAt(0),c="[".charCodeAt(0),u="]".charCodeAt(0),h="(".charCodeAt(0),d=")".charCodeAt(0),p="{".charCodeAt(0),f="}".charCodeAt(0),m=";".charCodeAt(0),g="*".charCodeAt(0),v=":".charCodeAt(0),y="@".charCodeAt(0),w=/[\t\n\f\r "#'()/;[\\\]{}]/g,b=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,S=/.[\r\n"'(/\\]/,C=/[\da-f]/i;return fh=function(x,k={}){let I,O,E,M,R,P,T,A,N,L,_=x.css.valueOf(),D=k.ignoreErrors,F=_.length,U=0,B=[],j=[];function z(e){throw x.error("Unclosed "+e,U)}return{back:function(e){j.push(e)},endOfFile:function(){return 0===j.length&&U>=F},nextToken:function(x){if(j.length)return j.pop();if(U>=F)return;let k=!!x&&x.ignoreUnclosed;switch(I=_.charCodeAt(U),I){case s:case o:case a:case l:case i:O=U;do{O+=1,I=_.charCodeAt(O)}while(I===o||I===s||I===a||I===l||I===i);L=["space",_.slice(U,O)],U=O-1;break;case c:case u:case p:case f:case v:case m:case d:{let e=String.fromCharCode(I);L=[e,e,U];break}case h:if(A=B.length?B.pop()[1]:"",N=_.charCodeAt(U+1),"url"===A&&N!==e&&N!==t&&N!==o&&N!==s&&N!==a&&N!==i&&N!==l){O=U;do{if(P=!1,O=_.indexOf(")",O+1),-1===O){if(D||k){O=U;break}z("bracket")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["brackets",_.slice(U,O+1),U,O],U=O}else O=_.indexOf(")",U+1),M=_.slice(U,O+1),-1===O||S.test(M)?L=["(","(",U]:(L=["brackets",M,U,O],U=O);break;case e:case t:E=I===e?"'":'"',O=U;do{if(P=!1,O=_.indexOf(E,O+1),-1===O){if(D||k){O=U+1;break}z("string")}for(T=O;_.charCodeAt(T-1)===r;)T-=1,P=!P}while(P);L=["string",_.slice(U,O+1),U,O],U=O;break;case y:w.lastIndex=U+1,w.test(_),O=0===w.lastIndex?_.length-1:w.lastIndex-2,L=["at-word",_.slice(U,O+1),U,O],U=O;break;case r:for(O=U,R=!0;_.charCodeAt(O+1)===r;)O+=1,R=!R;if(I=_.charCodeAt(O+1),R&&I!==n&&I!==o&&I!==s&&I!==a&&I!==l&&I!==i&&(O+=1,C.test(_.charAt(O)))){for(;C.test(_.charAt(O+1));)O+=1;_.charCodeAt(O+1)===o&&(O+=1)}L=["word",_.slice(U,O+1),U,O],U=O;break;default:I===n&&_.charCodeAt(U+1)===g?(O=_.indexOf("*/",U+2)+1,0===O&&(D||k?O=_.length:z("comment")),L=["comment",_.slice(U,O+1),U,O],U=O):(b.lastIndex=U+1,b.test(_),O=0===b.lastIndex?_.length-1:b.lastIndex-2,L=["word",_.slice(U,O+1),U,O],B.push(L),U=O)}return U++,L},position:function(){return U}}}}(),r=Jh(),n=ed(),s=td(),o=nd();const i={empty:!0,space:!0};return kh=class{constructor(e){this.input=e,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:e,start:{column:1,line:1,offset:0}}}atrule(e){let t,r,s,o=new n;o.name=e[1].slice(1),""===o.name&&this.unnamedAtrule(o,e),this.init(o,e[2]);let i=!1,a=!1,l=[],c=[];for(;!this.tokenizer.endOfFile();){if(t=(e=this.tokenizer.nextToken())[0],"("===t||"["===t?c.push("("===t?")":"]"):"{"===t&&c.length>0?c.push("}"):t===c[c.length-1]&&c.pop(),0===c.length){if(";"===t){o.source.end=this.getPosition(e[2]),o.source.end.offset++,this.semicolon=!0;break}if("{"===t){a=!0;break}if("}"===t){if(l.length>0){for(s=l.length-1,r=l[s];r&&"space"===r[0];)r=l[--s];r&&(o.source.end=this.getPosition(r[3]||r[2]),o.source.end.offset++)}this.end(e);break}l.push(e)}else l.push(e);if(this.tokenizer.endOfFile()){i=!0;break}}o.raws.between=this.spacesAndCommentsFromEnd(l),l.length?(o.raws.afterName=this.spacesAndCommentsFromStart(l),this.raw(o,"params",l),i&&(e=l[l.length-1],o.source.end=this.getPosition(e[3]||e[2]),o.source.end.offset++,this.spaces=o.raws.between,o.raws.between="")):(o.raws.afterName="",o.params=""),a&&(o.nodes=[],this.current=o)}checkMissedSemicolon(e){let t=this.colon(e);if(!1===t)return;let r,n=0;for(let s=t-1;s>=0&&(r=e[s],"space"===r[0]||(n+=1,2!==n));s--);throw this.input.error("Missed semicolon","word"===r[0]?r[3]+1:r[2])}colon(e){let t,r,n,s=0;for(let[o,i]of e.entries()){if(t=i,r=t[0],"("===r&&(s+=1),")"===r&&(s-=1),0===s&&":"===r){if(n){if("word"===n[0]&&"progid"===n[1])continue;return o}this.doubleColon(t)}n=t}return!1}comment(e){let t=new r;this.init(t,e[2]),t.source.end=this.getPosition(e[3]||e[2]),t.source.end.offset++;let n=e[1].slice(2,-2);
vendor: 12,609 bytes, line 26
26if(/^\s*$/.test(n))t.text="",t.raws.left=n,t.raws.right="";else{let e=n.match(/^(\s*)([^]*\S)(\s*)$/);t.text=e[2],t.raws.left=e[1],t.raws.right=e[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(t,r){let n=new e;this.init(n,t[0][2]);let s,o=t[t.length-1];for(";"===o[0]&&(this.semicolon=!0,t.pop()),n.source.end=this.getPosition(o[3]||o[2]||function(e){for(let t=e.length-1;t>=0;t--){let r=e[t],n=r[3]||r[2];if(n)return n}}(t)),n.source.end.offset++;"word"!==t[0][0];)1===t.length&&this.unknownWord(t),n.raws.before+=t.shift()[1];for(n.source.start=this.getPosition(t[0][2]),n.prop="";t.length;){let e=t[0][0];if(":"===e||"space"===e||"comment"===e)break;n.prop+=t.shift()[1]}for(n.raws.between="";t.length;){if(s=t.shift(),":"===s[0]){n.raws.between+=s[1];break}"word"===s[0]&&/\w/.test(s[1])&&this.unknownWord([s]),n.raws.between+=s[1]}"_"!==n.prop[0]&&"*"!==n.prop[0]||(n.raws.before+=n.prop[0],n.prop=n.prop.slice(1));let i,a=[];for(;t.length&&(i=t[0][0],"space"===i||"comment"===i);)a.push(t.shift());this.precheckMissedSemicolon(t);for(let e=t.length-1;e>=0;e--){if(s=t[e],"!important"===s[1].toLowerCase()){n.important=!0;let r=this.stringFrom(t,e);r=this.spacesFromEnd(t)+r," !important"!==r&&(n.raws.important=r);break}if("important"===s[1].toLowerCase()){let r=t.slice(0),s="";for(let t=e;t>0;t--){let e=r[t][0];if(0===s.trim().indexOf("!")&&"space"!==e)break;s=r.pop()[1]+s}0===s.trim().indexOf("!")&&(n.important=!0,n.raws.important=s,t=r)}if("space"!==s[0]&&"comment"!==s[0])break}t.some(e=>"space"!==e[0]&&"comment"!==e[0])&&(n.raws.between+=a.map(e=>e[1]).join(""),a=[]),this.raw(n,"value",a.concat(t),r),n.value.includes(":")&&!r&&this.checkMissedSemicolon(t)}doubleColon(e){throw this.input.error("Double colon",{offset:e[2]},{offset:e[2]+e[1].length})}emptyRule(e){let t=new o;this.init(t,e[2]),t.selector="",t.raws.between="",this.current=t}end(e){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(e[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(e)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(e){if(this.spaces+=e[1],this.current.nodes){let e=this.current.nodes[this.current.nodes.length-1];e&&"rule"===e.type&&!e.raws.ownSemicolon&&(e.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(e){let t=this.input.fromOffset(e);return{column:t.col,line:t.line,offset:e}}init(e,t){this.current.push(e),e.source={input:this.input,start:this.getPosition(t)},e.raws.before=this.spaces,this.spaces="","comment"!==e.type&&(this.semicolon=!1)}other(e){let t=!1,r=null,n=!1,s=null,o=[],i=e[1].startsWith("--"),a=[],l=e;for(;l;){if(r=l[0],a.push(l),"("===r||"["===r)s||(s=l),o.push("("===r?")":"]");else if(i&&n&&"{"===r)s||(s=l),o.push("}");else if(0===o.length){if(";"===r){if(n)return void this.decl(a,i);break}if("{"===r)return void this.rule(a);if("}"===r){this.tokenizer.back(a.pop()),t=!0;break}":"===r&&(n=!0)}else r===o[o.length-1]&&(o.pop(),0===o.length&&(s=null));l=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(t=!0),o.length>0&&this.unclosedBracket(s),t&&n){if(!i)for(;a.length&&(l=a[a.length-1][0],"space"===l||"comment"===l);)this.tokenizer.back(a.pop());this.decl(a,i)}else this.unknownWord(a)}parse(){let e;for(;!this.tokenizer.endOfFile();)switch(e=this.tokenizer.nextToken(),e[0]){case"space":this.spaces+=e[1];break;case";":this.freeSemicolon(e);break;case"}":this.end(e);break;case"comment":this.comment(e);break;case"at-word":this.atrule(e);break;case"{":this.emptyRule(e);break;default:this.other(e)}this.endFile()}precheckMissedSemicolon(){}raw(e,t,r,n){let s,o,a,l,c=r.length,u="",h=!0;for(let e=0;e<c;e+=1)s=r[e],o=s[0],"space"!==o||e!==c-1||n?"comment"===o?(l=r[e-1]?r[e-1][0]:"empty",a=r[e+1]?r[e+1][0]:"empty",i[l]||i[a]||","===u.slice(-1)?h=!1:u+=s[1]):u+=s[1]:h=!1;if(!h){let n=r.reduce((e,t)=>e+t[1],"");e.raws[t]={raw:n,value:u}}e[t]=u}rule(e){e.pop();let t=new o;this.init(t,e[0][2]),t.raws.between=this.spacesAndCommentsFromEnd(e),this.raw(t,"selector",e),this.current=t}spacesAndCommentsFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t||"comment"===t);)r=e.pop()[1]+r;return r}spacesAndCommentsFromStart(e){let t,r="";for(;e.length&&(t=e[0][0],"space"===t||"comment"===t);)r+=e.shift()[1];return r}spacesFromEnd(e){let t,r="";for(;e.length&&(t=e[e.length-1][0],"space"===t);)r=e.pop()[1]+r;return r}stringFrom(e,t){let r="";for(let n=t;n<e.length;n++)r+=e[n][1];return e.splice(t,e.length-t),r}unclosedBlock(){let e=this.current.source.start;throw this.input.error("Unclosed block",e.line,e.column)}unclosedBracket(e){throw this.input.error("Unclosed bracket",{offset:e[2]},{offset:e[2]+1})}unexpectedClose(e){throw this.input.error("Unexpected }",{offset:e[2]},{offset:e[2]+1})}unknownWord(e){throw this.input.error("Unknown word",{offset:e[0][2]},{offset:e[0][2]+e[0][1].length})}unnamedAtrule(e,t){throw this.input.error("At-rule without name",{offset:t[2]},{offset:t[2]+t[1].length})}},kh}function od(){if(Eh)return Oh;Eh=1;let e=Kh(),t=sd(),r=Gh();function n(e,n){let s=new r(e,n),o=new t(s);try{o.parse()}catch(e){throw"production"!==process.env.NODE_ENV&&"CssSyntaxError"===e.name&&n&&n.from&&(/\.scss$/i.test(n.from)?e.message+="\nYou tried to parse SCSS with the standard CSS parser; try again with the postcss-scss parser":/\.sass/i.test(n.from)?e.message+="\nYou tried to parse Sass with the standard CSS parser; try again with the postcss-sass parser":/\.less$/i.test(n.from)&&(e.message+="\nYou tried to parse Less with the standard CSS parser; try again with the postcss-less parser")),e}return o.root}return Oh=n,n.default=n,e.registerParse(n),Oh}function id(){if(Rh)return Mh;Rh=1;let{isClean:e,my:t}=Bh(),r=Hh(),n=zh(),s=Kh(),o=Yh(),i=Qh(),a=Zh(),l=od(),c=td();const u={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},h={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},d={Once:!0,postcssPlugin:!0,prepare:!0};function p(e){return"object"==typeof e&&"function"==typeof e.then}function f(e){let t=!1,r=u[e.type];return"decl"===e.type?t=e.prop.toLowerCase():"atrule"===e.type&&(t=e.name.toLowerCase()),t&&e.append?[r,r+"-"+t,0,r+"Exit",r+"Exit-"+t]:t?[r,r+"-"+t,r+"Exit",r+"Exit-"+t]:e.append?[r,0,r+"Exit"]:[r,r+"Exit"]}function m(e){let t;return t="document"===e.type?["Document",0,"DocumentExit"]:"root"===e.type?["Root",0,"RootExit"]:f(e),{eventIndex:0,events:t,iterator:0,node:e,visitorIndex:0,visitors:[]}}function g(t){return t[e]=!1,t.nodes&&t.nodes.forEach(e=>g(e)),t}let v={};class y{constructor(e,r,n){let o;if(this.stringified=!1,this.processed=!1,"object"!=typeof r||null===r||"root"!==r.type&&"document"!==r.type)if(r instanceof y||r instanceof a)o=g(r.root),r.map&&(void 0===n.map&&(n.map={}),n.map.inline||(n.map.inline=!1),n.map.prev=r.map);else{let e=l;n.syntax&&(e=n.syntax.parse),n.parser&&(e=n.parser),e.parse&&(e=e.parse);try{o=e(r,n)}catch(e){this.processed=!0,this.error=e}o&&!o[t]&&s.rebuild(o)}else o=g(r);this.result=new a(e,o,n),this.helpers={...v,postcss:v,result:this.result},this.plugins=this.processor.plugins.map(e=>"object"==typeof e&&e.prepare?{...e,...e.prepare(this.result)}:e)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(e,t){let r=this.result.lastPlugin;try{if(t&&t.addToError(e),this.error=e,"CssSyntaxError"!==e.name||e.plugin){if(r.postcssVersion&&"production"!==process.env.NODE_ENV){let e=r.postcssPlugin,t=r.postcssVersion,n=this.result.processor.version,s=t.split("."),o=n.split(".");(s[0]!==o[0]||parseInt(s[1])>parseInt(o[1]))&&console.error("Unknown error from PostCSS plugin. Your current PostCSS version is "+n+", but "+e+" uses "+t+". Perhaps this is the source of the error below.")}}else e.plugin=r.postcssPlugin,e.setMessage()}catch(e){console&&console.error&&console.error(e)}return e}prepareVisitors(){this.listeners={};let e=(e,t,r)=>{this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push([e,r])};for(let t of this.plugins)if("object"==typeof t)for(let r in t){if(!h[r]&&/^[A-Z]/.test(r))throw new Error(`Unknown event ${r} in ${t.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!d[r])if("object"==typeof t[r])for(let n in t[r])e(t,"*"===n?r:r+"-"+n.toLowerCase(),t[r][n]);else"function"==typeof t[r]&&e(t,r,t[r])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let e=0;e<this.plugins.length;e++){let t=this.plugins[e],r=this.runOnRoot(t);if(p(r))try{await r}catch(e){throw this.handleError(e)}}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];){t[e]=!0;let r=[m(t)];for(;r.length>0;){let e=this.visitTick(r);if(p(e))try{await e}catch(e){let t=r[r.length-1].node;throw this.handleError(e,t)}}}if(this.listeners.OnceExit)for(let[e,r]of this.listeners.OnceExit){this.result.lastPlugin=e;try{if("document"===t.type){let e=t.nodes.map(e=>r(e,this.helpers));await Promise.all(e)}else await r(t,this.helpers)}catch(e){throw this.handleError(e)}}}return this.processed=!0,this.stringify()}runOnRoot(e){this.result.lastPlugin=e;try{if("object"==typeof e&&e.Once){if("document"===this.result.root.type){let t=this.result.root.nodes.map(t=>e.Once(t,this.helpers));return p(t[0])?Promise.all(t):t}return e.Once(this.result.root,this.helpers)}if("function"==typeof e)return e(this.result.root,this.result)}catch(e){throw this.handleError(e)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let e=this.result.opts,t=n;e.syntax&&(t=e.syntax.stringify),e.stringifier&&(t=e.stringifier),t.stringify&&(t=t.stringify);let s=new r(t,this.result.root,this.result.opts).generate();return this.result.css=s[0],this.result.map=s[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let e of this.plugins){if(p(this.runOnRoot(e)))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let t=this.result.root;for(;!t[e];)t[e]=!0,this.walkSync(t);if(this.listeners.OnceExit)if("document"===t.type)for(let e of t.nodes)this.visitSync(this.listeners.OnceExit,e);else this.visitSync(this.listeners.OnceExit,t)}return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this.opts||i("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this.css}visitSync(e,t){for(let[r,n]of e){let e;this.result.lastPlugin=r;try{e=n(t,this.helpers)}catch(e){throw this.handleError(e,t.proxyOf)}if("root"!==t.type&&"document"!==t.type&&!t.parent)return!0;if(p(e))throw this.getAsyncError()}}visitTick(t){let r=t[t.length-1],{node:n,visitors:s}=r;if("root"!==n.type&&"document"!==n.type&&!n.parent)return void t.pop();if(s.length>0&&r.visitorIndex<s.length){let[e,t]=s[r.visitorIndex];r.visitorIndex+=1,r.visitorIndex===s.length&&(r.visitors=[],r.visitorIndex=0),this.result.lastPlugin=e;try{return t(n.toProxy(),this.helpers)}catch(e){throw this.handleError(e,n)}}if(0!==r.iterator){let s,o=r.iterator;for(;s=n.nodes[n.indexes[o]];)if(n.indexes[o]+=1,!s[e])return s[e]=!0,void t.push(m(s));r.iterator=0,delete n.indexes[o]}let o=r.events;for(;r.eventIndex<o.length;){let t=o[r.eventIndex];if(r.eventIndex+=1,0===t)return void(n.nodes&&n.nodes.length&&(n[e]=!0,r.iterator=n.getIterator()));if(this.listeners[t])return void(r.visitors=this.listeners[t])}t.pop()}walkSync(t){t[e]=!0;let r=f(t);for(let n of r)if(0===n)t.nodes&&t.each(t=>{t[e]||this.walkSync(t)});else{let e=this.listeners[n];if(e&&this.visitSync(e,t.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}
vendor: 10,687 bytes, line 26
26get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return y.registerPostcss=e=>{v=e},Mh=y,y.default=y,c.registerLazyResult(y),o.registerLazyResult(y),Mh}function ad(){if(Nh)return Ah;Nh=1;let e=function(){if(Th)return Ph;Th=1;let e=Hh(),t=zh(),r=Qh(),n=od();const s=Zh();class o{constructor(r,n,o){let i;n=n.toString(),this.stringified=!1,this._processor=r,this._css=n,this._opts=o,this._map=void 0;let a=t;this.result=new s(this._processor,i,this._opts),this.result.css=n;let l=this;Object.defineProperty(this.result,"root",{get:()=>l.root});let c=new e(a,i,this._opts,n);if(c.isMap()){let[e,t]=c.generate();e&&(this.result.css=e),t&&(this.result.map=t)}else c.clearAnnotation(),this.result.css=c.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(e){return this.async().catch(e)}finally(e){return this.async().then(e,e)}sync(){if(this.error)throw this.error;return this.result}then(e,t){return"production"!==process.env.NODE_ENV&&("from"in this._opts||r("Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.")),this.async().then(e,t)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let e,t=n;try{e=t(this._css,this._opts)}catch(e){this.error=e}if(this.error)throw this.error;return this._root=e,e}get[Symbol.toStringTag](){return"NoWorkResult"}}return Ph=o,o.default=o,Ph}(),t=id(),r=Yh(),n=td();class s{constructor(e=[]){this.version="8.4.38",this.plugins=this.normalize(e)}normalize(e){let t=[];for(let r of e)if(!0===r.postcss?r=r():r.postcss&&(r=r.postcss),"object"==typeof r&&Array.isArray(r.plugins))t=t.concat(r.plugins);else if("object"==typeof r&&r.postcssPlugin)t.push(r);else if("function"==typeof r)t.push(r);else{if("object"!=typeof r||!r.parse&&!r.stringify)throw new Error(r+" is not a PostCSS plugin");if("production"!==process.env.NODE_ENV)throw new Error("PostCSS syntaxes cannot be used as plugins. Instead, please use one of the syntax/parser/stringifier options as outlined in your PostCSS runner documentation.")}return t}process(r,n={}){return this.plugins.length||n.parser||n.stringifier||n.syntax?new t(this,r,n):new e(this,r,n)}use(e){return this.plugins=this.plugins.concat(this.normalize([e])),this}}return Ah=s,s.default=s,n.registerProcessor(s),r.registerProcessor(s),Ah}var ld=function(){if(Fh)return Dh;Fh=1;let e=Uu(),t=qh(),r=id(),n=Kh(),s=ad(),o=zh(),i=function(){if(_h)return Lh;_h=1;let e=qh(),t=Vh(),r=Jh(),n=ed(),s=Gh(),o=td(),i=nd();function a(l,c){if(Array.isArray(l))return l.map(e=>a(e));let{inputs:u,...h}=l;if(u){c=[];for(let e of u){let r={...e,__proto__:s.prototype};r.map&&(r.map={...r.map,__proto__:t.prototype}),c.push(r)}}if(h.nodes&&(h.nodes=l.nodes.map(e=>a(e,c))),h.source){let{inputId:e,...t}=h.source;h.source=t,null!=e&&(h.source.input=c[e])}if("root"===h.type)return new o(h);if("decl"===h.type)return new e(h);if("rule"===h.type)return new i(h);if("comment"===h.type)return new r(h);if("atrule"===h.type)return new n(h);throw new Error("Unknown node type: "+l.type)}return Lh=a,a.default=a,Lh}(),a=Yh(),l=Xh(),c=Jh(),u=ed(),h=Zh(),d=Gh(),p=od(),f=rd(),m=nd(),g=td(),v=Wh();function y(...e){return 1===e.length&&Array.isArray(e[0])&&(e=e[0]),new s(e)}return y.plugin=function(e,t){let r,n=!1;function o(...r){console&&console.warn&&!n&&(n=!0,console.warn(e+": postcss.plugin was deprecated. Migration guide:\nhttps://evilmartians.com/chronicles/postcss-8-plugin-migration"),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(e+": éé¢ postcss.plugin 被å¼ç¨. è¿ç§»æå:\nhttps://www.w3ctech.com/topic/2226"));let o=t(...r);return o.postcssPlugin=e,o.postcssVersion=(new s).version,o}return Object.defineProperty(o,"postcss",{get:()=>(r||(r=o()),r)}),o.process=function(e,t,r){return y([o(r)]).process(e,t)},o},y.stringify=o,y.parse=p,y.fromJSON=i,y.list=f,y.comment=e=>new c(e),y.atRule=e=>new u(e),y.decl=e=>new t(e),y.rule=e=>new m(e),y.root=e=>new g(e),y.document=e=>new a(e),y.CssSyntaxError=e,y.Declaration=t,y.Container=n,y.Processor=s,y.Document=a,y.Comment=c,y.Warning=l,y.AtRule=u,y.Result=h,y.Input=d,y.Rule=m,y.Root=g,y.Node=v,r.registerPostcss(y),Dh=y,y.default=y,Dh}();const cd=Pu(ld);cd.stringify,cd.fromJSON,cd.plugin,cd.parse,cd.list,cd.document,cd.comment,cd.atRule,cd.rule,cd.decl,cd.root,cd.CssSyntaxError,cd.Declaration,cd.Container,cd.Processor,cd.Document,cd.Comment,cd.Warning,cd.AtRule,cd.Result,cd.Input,cd.Rule,cd.Root,cd.Node;class ud{constructor(...e){Ru(this,"parentElement",null),Ru(this,"parentNode",null),Ru(this,"ownerDocument"),Ru(this,"firstChild",null),Ru(this,"lastChild",null),Ru(this,"previousSibling",null),Ru(this,"nextSibling",null),Ru(this,"ELEMENT_NODE",1),Ru(this,"TEXT_NODE",3),Ru(this,"nodeType"),Ru(this,"nodeName"),Ru(this,"RRNodeType")}get childNodes(){const e=[];let t=this.firstChild;for(;t;)e.push(t),t=t.nextSibling;return e}contains(e){if(!(e instanceof ud))return!1;if(e.ownerDocument!==this.ownerDocument)return!1;if(e===this)return!0;for(;e.parentNode;){if(e.parentNode===this)return!0;e=e.parentNode}return!1}appendChild(e){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(e,t){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(e){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}}const hd={Node:["childNodes","parentNode","parentElement","textContent"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},dd={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},pd={};function fd(e){if(pd[e])return pd[e];const t=function(e){var t,r;const n=null==(r=null==(t=null==globalThis?void 0:globalThis.Zone)?void 0:t.__symbol__)?void 0:r.call(t,e);return n&&globalThis[n]?globalThis[n]:void 0}(e)||globalThis[e],r=t.prototype,n=e in hd?hd[e]:void 0,s=Boolean(n&&n.every(e=>{var t,n;return Boolean(null==(n=null==(t=Object.getOwnPropertyDescriptor(r,e))?void 0:t.get)?void 0:n.toString().includes("[native code]"))})),o=e in dd?dd[e]:void 0,i=Boolean(o&&o.every(e=>{var t;return"function"==typeof r[e]&&(null==(t=r[e])?void 0:t.toString().includes("[native code]"))}));if(s&&i)return pd[e]=t.prototype,t.prototype;try{const n=document.createElement("iframe");document.body.appendChild(n);const s=n.contentWindow;if(!s)return t.prototype;const o=s[e].prototype;return document.body.removeChild(n),o?pd[e]=o:r}catch{return r}}const md={};function gd(e,t,r){var n;const s=`${e}.${String(r)}`;if(md[s])return md[s].call(t);const o=fd(e),i=null==(n=Object.getOwnPropertyDescriptor(o,r))?void 0:n.get;return i?(md[s]=i,i.call(t)):t[r]}const vd={};function yd(e,t,r){const n=`${e}.${String(r)}`;if(vd[n])return vd[n].bind(t);const s=fd(e)[r];return"function"!=typeof s?t[r]:(vd[n]=s,s.bind(t))}function wd(){return fd("MutationObserver").constructor}const bd={childNodes:function(e){return gd("Node",e,"childNodes")},parentNode:function(e){return gd("Node",e,"parentNode")},parentElement:function(e){return gd("Node",e,"parentElement")},textContent:function(e){return gd("Node",e,"textContent")},contains:function(e,t){return yd("Node",e,"contains")(t)},getRootNode:function(e){return yd("Node",e,"getRootNode")()},host:function(e){return e&&"host"in e?gd("ShadowRoot",e,"host"):null},styleSheets:function(e){return e.styleSheets},shadowRoot:function(e){return e&&"shadowRoot"in e?gd("Element",e,"shadowRoot"):null},querySelector:function(e,t){return gd("Element",e,"querySelector")(t)},querySelectorAll:function(e,t){return gd("Element",e,"querySelectorAll")(t)},mutationObserver:wd};function Sd(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Cd="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let xd={map:{},getId:()=>(console.error(Cd),-1),getNode:()=>(console.error(Cd),null),removeNodeFromMap(){console.error(Cd)},has:()=>(console.error(Cd),!1),reset(){console.error(Cd)}};function kd(e,t,r={}){let n=null,s=0;return function(...o){const i=Date.now();s||!1!==r.leading||(s=i);const a=t-(i-s),l=this;a<=0||a>t?(n&&(clearTimeout(n),n=null),s=i,e.apply(l,o)):n||!1===r.trailing||(n=setTimeout(()=>{s=!1===r.leading?0:Date.now(),n=null,e.apply(l,o)},a))}}function Id(e,t,r,n,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(e){setTimeout(()=>{r.set.call(this,e)},0),o&&o.set&&o.set.call(this,e)}}),()=>Id(e,t,o||{},!0)}function Od(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return"function"==typeof s&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(xd=new Proxy(xd,{get:(e,t,r)=>("map"===t&&console.error(Cd),Reflect.get(e,t,r))}));let Ed=Date.now;function Md(e){var t,r,n,s;const o=e.document;return{left:o.scrollingElement?o.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:o.documentElement.scrollLeft||(null==o?void 0:o.body)&&(null==(t=bd.parentElement(o.body))?void 0:t.scrollLeft)||(null==(r=null==o?void 0:o.body)?void 0:r.scrollLeft)||0,top:o.scrollingElement?o.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:(null==o?void 0:o.documentElement.scrollTop)||(null==o?void 0:o.body)&&(null==(n=bd.parentElement(o.body))?void 0:n.scrollTop)||(null==(s=null==o?void 0:o.body)?void 0:s.scrollTop)||0}}function Rd(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Pd(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Td(e){if(!e)return null;
vendor: 4,365 bytes, line 26
26return e.nodeType===e.ELEMENT_NODE?e:bd.parentElement(e)}function Ad(e,t,r,n){if(!e)return!1;const s=Td(e);if(!s)return!1;try{if("string"==typeof t){if(s.classList.contains(t))return!0;if(n&&null!==s.closest("."+t))return!0}else if(Wl(s,t,n))return!0}catch(e){}if(r){if(s.matches(r))return!0;if(n&&null!==s.closest(r))return!0}return!1}function Nd(e,t,r){return!("TITLE"!==e.tagName||!r.headTitleMutations)||-2===t.getId(e)}function Ld(e,t){if(hl(e))return!1;const r=t.getId(e);if(!t.has(r))return!0;const n=bd.parentNode(e);return(!n||n.nodeType!==e.DOCUMENT_NODE)&&(!n||Ld(n,t))}function _d(e){return Boolean(e.changedTouches)}function Dd(e,t){return Boolean("IFRAME"===e.nodeName&&t.getMeta(e))}function Fd(e,t){return Boolean("LINK"===e.nodeName&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&"stylesheet"===e.getAttribute("rel")&&t.getMeta(e))}function Ud(e){return!!e&&(e instanceof ud&&"shadowRoot"in e?Boolean(e.shadowRoot):Boolean(bd.shadowRoot(e)))}/[1-9][0-9]{12}/.test(Date.now().toString())||(Ed=()=>(new Date).getTime());class Bd{constructor(){Qa(this,"id",1),Qa(this,"styleIDMap",new WeakMap),Qa(this,"idStyleMap",new Map)}getId(e){return this.styleIDMap.get(e)??-1}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let r;return r=void 0===t?this.id++:t,this.styleIDMap.set(e,r),this.idStyleMap.set(r,e),r}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function jd(e){var t;let r=null;return"getRootNode"in e&&(null==(t=bd.getRootNode(e))?void 0:t.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&bd.host(bd.getRootNode(e))&&(r=bd.host(bd.getRootNode(e))),r}function zd(e){const t=e.ownerDocument;if(!t)return!1;const r=function(e){let t,r=e;for(;t=jd(r);)r=t;return r}(e);return bd.contains(t,r)}function Wd(e){const t=e.ownerDocument;return!!t&&(bd.contains(t,e)||zd(e))}var qd=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(qd||{}),$d=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))($d||{}),Vd=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Vd||{}),Gd=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(Gd||{}),Hd=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(Hd||{}),Jd=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Jd||{}),Kd=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(Kd||{});function Yd(e){return"__ln"in e}class Qd{constructor(){Qa(this,"length",0),Qa(this,"head",null),Qa(this,"tail",null)}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let r=0;r<e;r++)t=(null==t?void 0:t.next)||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&Yd(e.previousSibling)){const r=e.previousSibling.__ln.next;t.next=r,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,r&&(r.previous=t)}else if(e.nextSibling&&Yd(e.nextSibling)&&e.nextSibling.__ln.previous){const r=e.nextSibling.__ln.previous;t.previous=r,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,r&&(r.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;
vendor: 5,558 bytes, line 26
26this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const Xd=(e,t)=>`${e}@${t}`;class Zd{constructor(){Qa(this,"frozen",!1),Qa(this,"locked",!1),Qa(this,"texts",[]),Qa(this,"attributes",[]),Qa(this,"attributeMap",new WeakMap),Qa(this,"removes",[]),Qa(this,"mapRemoves",[]),Qa(this,"movedMap",{}),Qa(this,"addedSet",new Set),Qa(this,"movedSet",new Set),Qa(this,"droppedSet",new Set),Qa(this,"removesSubTreeCache",new Set),Qa(this,"mutationCb"),Qa(this,"blockClass"),Qa(this,"blockSelector"),Qa(this,"maskTextClass"),Qa(this,"maskTextSelector"),Qa(this,"inlineStylesheet"),Qa(this,"maskInputOptions"),Qa(this,"maskTextFn"),Qa(this,"maskInputFn"),Qa(this,"maskAttributeFn"),Qa(this,"keepIframeSrcFn"),Qa(this,"recordCanvas"),Qa(this,"inlineImages"),Qa(this,"slimDOMOptions"),Qa(this,"dataURLOptions"),Qa(this,"doc"),Qa(this,"mirror"),Qa(this,"iframeManager"),Qa(this,"stylesheetManager"),Qa(this,"shadowDomManager"),Qa(this,"canvasManager"),Qa(this,"processedNodeManager"),Qa(this,"unattachedDoc"),Qa(this,"processMutations",e=>{e.forEach(this.processMutation),this.emit()}),Qa(this,"emit",()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,r=new Qd,n=e=>{let t=e,r=-2;for(;-2===r;)t=t&&t.nextSibling,r=t&&this.mirror.getId(t);return r},s=s=>{const o=bd.parentNode(s);if(!o||!Wd(s))return;let i=!1;if(s.nodeType===Node.TEXT_NODE){const e=o.tagName;if("TEXTAREA"===e)return;"STYLE"===e&&this.addedSet.has(o)&&(i=!0)}const a=hl(o)?this.mirror.getId(jd(s)):this.mirror.getId(o),l=n(s);if(-1===a||-1===l)return r.addNode(s);const c=Hl(s,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{Dd(e,this.mirror)&&this.iframeManager.addIframe(e),Fd(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),Ud(s)&&this.shadowDomManager.addShadowRoot(bd.shadowRoot(s),this.doc)},onIframeLoad:(e,t)=>{this.iframeManager.attachIframe(e,t),this.shadowDomManager.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)},cssCaptured:i});c&&(e.push({parentId:a,nextId:l,node:c}),t.add(c.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)tp(this.removesSubTreeCache,e,this.mirror)&&!this.movedSet.has(bd.parentNode(e))||s(e);for(const e of this.addedSet)rp(this.droppedSet,e)||tp(this.removesSubTreeCache,e,this.mirror)?rp(this.movedSet,e)?s(e):this.droppedSet.add(e):s(e);let o=null;for(;r.length;){let e=null;if(o){const t=this.mirror.getId(bd.parentNode(o.value)),r=n(o.value);-1!==t&&-1!==r&&(e=o)}if(!e){let t=r.tail;for(;t;){const r=t;if(t=t.previous,r){const t=this.mirror.getId(bd.parentNode(r.value));if(-1===n(r.value))continue;if(-1!==t){e=r;break}{const t=r.value,n=bd.parentNode(t);if(n&&n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const t=bd.host(n);if(-1!==this.mirror.getId(t)){e=r;break}}}}}}if(!e){for(;r.head;)r.removeNode(r.head.value);break}o=e.previous,r.removeNode(e.value),s(e.value)}const i={texts:this.texts.map(e=>{const t=e.node,r=bd.parentNode(t);return r&&"TEXTAREA"===r.tagName&&this.genTextAreaValueMutation(r),{id:this.mirror.getId(t),value:e.value}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),attributes:this.attributes.map(e=>{const{attributes:t}=e;if("string"==typeof t.style){const r=JSON.stringify(e.styleDiff),n=JSON.stringify(e._unchangedStyles);r.length<t.style.length&&(r+n).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}}).filter(e=>!t.has(e.id)).filter(e=>this.mirror.has(e.id)),removes:this.removes,adds:e};(i.texts.length||i.attributes.length||i.removes.length||i.adds.length)&&(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.removesSubTreeCache=new Set,this.movedMap={},this.mutationCb(i))}),Qa(this,"genTextAreaValueMutation",e=>{let t=this.attributeMap.get(e);t||(t={node:e,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(t),this.attributeMap.set(e,t));const r=Array.from(bd.childNodes(e),e=>bd.textContent(e)||"").join("");t.attributes.value=gl({element:e,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:wl(e),value:r,maskInputFn:this.maskInputFn})}),Qa(this,"processMutation",e=>{if(!Nd(e.target,this.mirror,this.slimDOMOptions))switch(e.type){case"characterData":{const t=bd.textContent(e.target);Ad(e.target,this.blockClass,this.blockSelector,!1)||t===e.oldValue||this.texts.push({value:ql(e.target,this.maskTextClass,this.maskTextSelector,!0)&&t?this.maskTextFn?this.maskTextFn(t,Td(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let r=e.attributeName,n=e.target.getAttribute(r);if("value"===r){const e=wl(t);n=gl({element:t,maskInputOptions:this.maskInputOptions,tagName:t.tagName,type:e,value:n,maskInputFn:this.maskInputFn})}if(Ad(e.target,this.blockClass,this.blockSelector,!1)||n===e.oldValue)return;let s=this.attributeMap.get(e.target);
vendor: 7,484 bytes, line 26
26if("IFRAME"===t.tagName&&"src"===r&&!this.keepIframeSrcFn(n)){if(t.contentDocument)return;r="rr_src"}if(s||(s={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(s),this.attributeMap.set(e.target,s)),"type"===r&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!zl(t.tagName,r)){if(s.attributes[r]=jl(this.doc,vl(t.tagName),vl(r),n),this.maskAttributeFn&&"string"==typeof s.attributes[r]){const e=this.maskAttributeFn(r,s.attributes[r],t);null!==e?s.attributes[r]=e:delete s.attributes[r]}if("style"===r){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch(e){this.unattachedDoc=this.doc}const r=this.unattachedDoc.createElement("span");e.oldValue&&r.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const n=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);n!==r.style.getPropertyValue(e)||o!==r.style.getPropertyPriority(e)?s.styleDiff[e]=""===o?n:[n,o]:s._unchangedStyles[e]=[n,o]}for(const e of Array.from(r.style))""===t.style.getPropertyValue(e)&&(s.styleDiff[e]=!1)}else"open"===r&&"DIALOG"===t.tagName&&(t.matches("dialog:modal")?s.attributes.rr_open_mode="modal":s.attributes.rr_open_mode="non-modal")}break}case"childList":if(Ad(e.target,this.blockClass,this.blockSelector,!0))return;if("TEXTAREA"===e.target.tagName)return void this.genTextAreaValueMutation(e.target);e.addedNodes.forEach(t=>this.genAdds(t,e.target)),e.removedNodes.forEach(t=>{const r=this.mirror.getId(t),n=hl(e.target)?this.mirror.getId(bd.host(e.target)):this.mirror.getId(e.target);Ad(e.target,this.blockClass,this.blockSelector,!1)||Nd(t,this.mirror,this.slimDOMOptions)||!function(e,t){return-1!==t.getId(e)}(t,this.mirror)||(this.addedSet.has(t)?(ep(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===r||Ld(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[Xd(r,n)]?ep(this.movedSet,t):(this.removes.push({parentId:n,id:r,isShadow:!(!hl(e.target)||!dl(e.target))||void 0}),function(e,t){const r=[e];for(;r.length;){const e=r.pop();t.has(e)||(t.add(e),bd.childNodes(e).forEach(e=>r.push(e)))}}(t,this.removesSubTreeCache))),this.mapRemoves.push(t))})}}),Qa(this,"genAdds",(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(Nd(e,this.mirror,this.slimDOMOptions))return;this.movedSet.add(e);let r=null;t&&this.mirror.hasNode(t)&&(r=this.mirror.getId(t)),r&&-1!==r&&(this.movedMap[Xd(this.mirror.getId(e),r)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);Ad(e,this.blockClass,this.blockSelector,!1)||(bd.childNodes(e).forEach(e=>this.genAdds(e)),Ud(e)&&bd.childNodes(bd.shadowRoot(e)).forEach(t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)}))}})}init(e){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","maskAttributeFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(t=>{this[t]=e[t]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function ep(e,t){e.delete(t),bd.childNodes(t).forEach(t=>ep(e,t))}function tp(e,t,r){return 0!==e.size&&function(e,t){const r=bd.parentNode(t);return!!r&&e.has(r)}(e,t)}function rp(e,t){return 0!==e.size&&np(e,t)}function np(e,t){const r=bd.parentNode(t);return!!r&&(!!e.has(r)||np(e,r))}let sp;const op=e=>{if(!sp)return e;return(...t)=>{try{return e(...t)}catch(e){if(sp&&!0===sp(e))return;throw e}}};function ip(e){return(...t)=>{try{return e(...t)}catch(e){try{e._external_=!0}catch{}throw e}}}const ap=[];function lp(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function cp(e,t){const r=new Zd;ap.push(r),r.init(e);const n=new(wd())(op(r.processMutations.bind(r)));return n.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),n}function up({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){if(!1===o.mouseInteraction)return()=>{};const i=!0===o.mouseInteraction||void 0===o.mouseInteraction?{}:o.mouseInteraction,a=[];let l=null;return Object.keys(Vd).filter(e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==i[e]).forEach(o=>{let i=vl(o);const c=(t=>o=>{const i=lp(o);if(Ad(i,n,s,!0))return;let a=null,c=t;if("pointerType"in o){switch(o.pointerType){case"mouse":a=Gd.Mouse;break;case"touch":a=Gd.Touch;break;case"pen":a=Gd.Pen}a===Gd.Touch?Vd[t]===Vd.MouseDown?c="TouchStart":Vd[t]===Vd.MouseUp&&(c="TouchEnd"):Gd.Pen}else _d(o)&&(a=Gd.Touch);null!==a?(l=a,(c.startsWith("Touch")&&a===Gd.Touch||c.startsWith("Mouse")&&a===Gd.Mouse)&&(a=null)):Vd[t]===Vd.Click&&(a=l,l=null);const u=_d(o)?o.changedTouches[0]:o;if(!u)return;const h=r.getId(i),{clientX:d,clientY:p}=u;op(e)({type:Vd[c],id:h,x:d,y:p,...null!==a&&{pointerType:a}})})(o);if(window.PointerEvent)switch(Vd[o]){case Vd.MouseDown:case Vd.MouseUp:i=i.replace("mouse","pointer");break;case Vd.TouchStart:case Vd.TouchEnd:return}a.push(Sd(i,c,t))}),op(()=>{a.forEach(e=>e())})}function hp({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){const i=op(kd(op(o=>{const i=lp(o);if(!i||Ad(i,n,s,!0))return;const a=r.getId(i);if(i===t&&t.defaultView){const r=Md(t.defaultView);e({id:a,x:r.left,y:r.top})}else e({id:a,x:i.scrollLeft,y:i.scrollTop})}),o.scroll||100));return Sd("scroll",i,t)}const dp=["INPUT","TEXTAREA","SELECT"],pp=new WeakMap;function fp(e){return function(e,t){if(yp("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||yp("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||yp("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||yp("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const r=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(r)}else if(e.parentStyleSheet){const r=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(r)}return t}(e,[])}function mp(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function gp({mirror:e,stylesheetManager:t},r){var n,s,o;let i=null;i="#document"===r.nodeName?e.getId(r):e.getId(bd.host(r));const a="#document"===r.nodeName?null==(n=r.defaultView)?void 0:n.Document:null==(o=null==(s=r.ownerDocument)?void 0:s.defaultView)?void 0:o.ShadowRoot,l=(null==a?void 0:a.prototype)?Object.getOwnPropertyDescriptor(null==a?void 0:a.prototype,"adoptedStyleSheets"):void 0;return null!==i&&-1!==i&&a&&l?(Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get(){var e;return null==(e=l.get)?void 0:e.call(this)},set(e){var r;const n=null==(r=l.set)?void 0:r.call(this,e);if(null!==i&&-1!==i)try{t.adoptStyleSheets(e,i)}catch(e){}return n}}),op(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:l.configurable,enumerable:l.enumerable,get:l.get,set:l.set})})):()=>{}}function vp(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};let n;
26!function(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:i,inputCb:a,mediaInteractionCb:l,styleSheetRuleCb:c,styleDeclarationCb:u,canvasMutationCb:h,fontCb:d,selectionCb:p,customElementCb:f}=e;e.mutationCb=(...e)=>{t.mutation&&t.mutation(...e),r(...e)},e.mousemoveCb=(...e)=>{t.mousemove&&t.mousemove(...e),n(...e)},e.mouseInteractionCb=(...e)=>{t.mouseInteraction&&t.mouseInteraction(...e),s(...e)},e.scrollCb=(...e)=>{t.scroll&&t.scroll(...e),o(...e)},e.viewportResizeCb=(...e)=>{t.viewportResize&&t.viewportResize(...e),i(...e)},e.inputCb=(...e)=>{t.input&&t.input(...e),a(...e)},e.mediaInteractionCb=(...e)=>{t.mediaInteaction&&t.mediaInteaction(...e),l(...e)},e.styleSheetRuleCb=(...e)=>{t.styleSheetRule&&t.styleSheetRule(...e),c(...e)},e.styleDeclarationCb=(...e)=>{t.styleDeclaration&&t.styleDeclaration(...e),u(...e)},e.canvasMutationCb=(...e)=>{t.canvasMutation&&t.canvasMutation(...e),h(...e)},e.fontCb=(...e)=>{t.font&&t.font(...e),d(...e)},e.selectionCb=(...e)=>{t.selection&&t.selection(...e),p(...e)}
vendor: 17,747 bytes, line 26
26,e.customElementCb=(...e)=>{t.customElement&&t.customElement(...e),f(...e)}}(e,t),e.recordDOM&&(n=cp(e,e.doc));const s=function({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(!1===t.mousemove)return()=>{};const s="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,a=[];const l=kd(op(t=>{const r=Date.now()-i;e(a.map(e=>(e.timeOffset-=r,e)),t),a=[],i=null}),o),c=op(kd(op(e=>{const t=lp(e),{clientX:r,clientY:s}=_d(e)?e.changedTouches[0]:e;i||(i=Ed()),a.push({x:r,y:s,id:n.getId(t),timeOffset:Ed()-i}),l("undefined"!=typeof DragEvent&&e instanceof DragEvent?$d.Drag:e instanceof MouseEvent?$d.MouseMove:$d.TouchMove)}),s,{trailing:!1})),u=[Sd("mousemove",c,r),Sd("touchmove",c,r),Sd("drag",c,r)];return op(()=>{u.forEach(e=>e())})}(e),o=up(e),i=hp(e),a=function({viewportResizeCb:e},{win:t}){let r=-1,n=-1;return Sd("resize",op(kd(op(()=>{const t=Rd(),s=Pd();r===t&&n===s||(e({width:Number(s),height:Number(t)}),r=t,n=s)}),200)),t)}(e,{win:r}),l=function({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:i,maskInputOptions:a,maskInputFn:l,sampling:c,userTriggeredOnInput:u}){function h(e){let r=lp(e);const c=e.isTrusted,h=r&&r.tagName;if(r&&"OPTION"===h&&(r=bd.parentElement(r)),!r||!h||dp.indexOf(h)<0||Ad(r,n,s,!0))return;if(r.classList.contains(o)||i&&r.matches(i))return;let p=r.value,f=!1;const m=wl(r)||"";"radio"===m||"checkbox"===m?f=r.checked:(a[h.toLowerCase()]||a[m])&&(p=gl({element:r,maskInputOptions:a,tagName:h,type:m,value:p,maskInputFn:l})),d(r,u?{text:p,isChecked:f,userTriggered:c}:{text:p,isChecked:f});const g=r.name;"radio"===m&&g&&f&&t.querySelectorAll(`input[type="radio"][name="${g}"]`).forEach(e=>{if(e!==r){const t=e.value;d(e,u?{text:t,isChecked:!f,userTriggered:!1}:{text:t,isChecked:!f})}})}function d(t,n){const s=pp.get(t);if(!s||s.text!==n.text||s.isChecked!==n.isChecked){pp.set(t,n);const s=r.getId(t);op(e)({...n,id:s})}}const p=("last"===c.input?["change"]:["input","change"]).map(e=>Sd(e,op(h),t)),f=t.defaultView;if(!f)return()=>{p.forEach(e=>e())};const m=f.Object.getOwnPropertyDescriptor(f.HTMLInputElement.prototype,"value"),g=[[f.HTMLInputElement.prototype,"value"],[f.HTMLInputElement.prototype,"checked"],[f.HTMLSelectElement.prototype,"value"],[f.HTMLTextAreaElement.prototype,"value"],[f.HTMLSelectElement.prototype,"selectedIndex"],[f.HTMLOptionElement.prototype,"selected"]];return m&&m.set&&p.push(...g.map(e=>Id(e[0],e[1],{set(){op(h)({target:this,isTrusted:!1})}},!1,f))),op(()=>{p.forEach(e=>e())})}(e),c=function({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:o}){const i=op(o=>kd(op(s=>{const i=lp(s);if(!i||Ad(i,t,r,!0))return;const{currentTime:a,volume:l,muted:c,playbackRate:u,loop:h}=i;e({type:o,id:n.getId(i),currentTime:a,volume:l,muted:c,playbackRate:u,loop:h})}),s.media||500)),a=[Sd("play",i(Jd.Play),o),Sd("pause",i(Jd.Pause),o),Sd("seeked",i(Jd.Seeked),o),Sd("volumechange",i(Jd.VolumeChange),o),Sd("ratechange",i(Jd.RateChange),o)];return op(()=>{a.forEach(e=>e())})}(e);let u=()=>{},h=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(u=function({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:op((n,s,o)=>{const[i,a]=o,{id:l,styleId:c}=mp(s,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:a}]}),ip(()=>n.apply(s,o))()})}),n.CSSStyleSheet.prototype.addRule=function(e,t,r=this.cssRules.length){const s=`${e} { ${t} }`;return n.CSSStyleSheet.prototype.insertRule.apply(this,[s,r])};const o=n.CSSStyleSheet.prototype.deleteRule;let i,a;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:op((n,s,o)=>{const[i]=o,{id:a,styleId:l}=mp(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:i}]}),ip(()=>n.apply(s,o))()})}),n.CSSStyleSheet.prototype.removeRule=function(e){return n.CSSStyleSheet.prototype.deleteRule.apply(this,[e])},n.CSSStyleSheet.prototype.replace&&(i=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:op((n,s,o)=>{const[i]=o,{id:a,styleId:l}=mp(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replace:i}),n.apply(s,o)})})),n.CSSStyleSheet.prototype.replaceSync&&(a=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(a,{apply:op((n,s,o)=>{const[i]=o,{id:a,styleId:l}=mp(s,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,replaceSync:i}),n.apply(s,o)})}));const l={};wp("CSSGroupingRule")?l.CSSGroupingRule=n.CSSGroupingRule:(wp("CSSMediaRule")&&(l.CSSMediaRule=n.CSSMediaRule),wp("CSSConditionRule")&&(l.CSSConditionRule=n.CSSConditionRule),wp("CSSSupportsRule")&&(l.CSSSupportsRule=n.CSSSupportsRule));const c={};return Object.entries(l).forEach(([n,s])=>{c[n]={insertRule:s.prototype.insertRule,deleteRule:s.prototype.deleteRule},s.prototype.insertRule=new Proxy(c[n].insertRule,{apply:op((n,s,o)=>{const[i,a]=o,{id:l,styleId:c}=mp(s.parentStyleSheet,t,r.styleMirror);return(l&&-1!==l||c&&-1!==c)&&e({id:l,styleId:c,adds:[{rule:i,index:[...fp(s),a||0]}]}),n.apply(s,o)})}),s.prototype.deleteRule=new Proxy(c[n].deleteRule,{apply:op((n,s,o)=>{const[i]=o,{id:a,styleId:l}=mp(s.parentStyleSheet,t,r.styleMirror);return(a&&-1!==a||l&&-1!==l)&&e({id:a,styleId:l,removes:[{index:[...fp(s),i]}]}),n.apply(s,o)})})}),op(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=o,i&&(n.CSSStyleSheet.prototype.replace=i),a&&(n.CSSStyleSheet.prototype.replaceSync=a),Object.entries(l).forEach(([e,t])=>{t.prototype.insertRule=c[e].insertRule,t.prototype.deleteRule=c[e].deleteRule})})}(e,{win:r}),h=gp(e,e.doc),d=function({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:op((s,i,a)=>{var l;const[c,u,h]=a;if(r.has(c))return o.apply(i,[c,u,h]);const{id:d,styleId:p}=mp(null==(l=i.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(d&&-1!==d||p&&-1!==p)&&e({id:d,styleId:p,set:{property:c,value:u,priority:h},index:fp(i.parentRule)}),s.apply(i,a)})});const i=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:op((s,o,a)=>{var l;const[c]=a;if(r.has(c))return i.apply(o,[c]);const{id:u,styleId:h}=mp(null==(l=o.parentRule)?void 0:l.parentStyleSheet,t,n.styleMirror);return(u&&-1!==u||h&&-1!==h)&&e({id:u,styleId:h,remove:{property:c},index:fp(o.parentRule)}),s.apply(o,a)})}),op(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=i})}(e,{win:r}),e.collectFonts&&(p=function({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(e,t,r){const n=new o(e,t,r);return s.set(n,{family:e,buffer:"string"!=typeof t,descriptors:r,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),n};const i=Od(t.fonts,"add",function(t){return function(r){return setTimeout(op(()=>{const t=s.get(r);t&&(e(t),s.delete(r))}),0),t.apply(this,[r])}});return n.push(()=>{r.FontFace=o}),n.push(i),op(()=>{n.forEach(e=>e())})}(e)));const f=function(e){const{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:o}=e;let i=!0;const a=op(()=>{const e=t.getSelection();if(!e||i&&(null==e?void 0:e.isCollapsed))return;i=e.isCollapsed||!1;const a=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const o=e.getRangeAt(t),{startContainer:i,startOffset:l,endContainer:c,endOffset:u}=o;Ad(i,n,s,!0)||Ad(c,n,s,!0)||a.push({start:r.getId(i),startOffset:l,end:r.getId(c),endOffset:u})}o({ranges:a})});return a(),Sd("selectionchange",a)}(e),m=function({doc:e,customElementCb:t}){const r=e.defaultView;return r&&r.customElements?Od(r.customElements,"define",function(e){return function(r,n,s){try{t({define:{name:r}})}catch(e){console.warn(`Custom element callback failed for ${r}`)}return e.apply(this,[r,n,s])}}):()=>{}}(e),g=[];for(const t of e.plugins)g.push(t.observer(t.callback,r,t.options));return op(()=>{ap.forEach(e=>e.reset()),null==n||n.disconnect(),s(),o(),i(),a(),l(),c(),u(),h(),d(),p(),f(),m(),g.forEach(e=>e())})}function yp(e){return void 0!==window[e]}function wp(e){return Boolean(void 0!==window[e]&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class bp{constructor(e){Qa(this,"iframeIdToRemoteIdMap",new WeakMap),Qa(this,"iframeRemoteIdToIdMap",new WeakMap),this.generateIdFn=e}getId(e,t,r,n){const s=r||this.getIdToRemoteIdMap(e),o=n||this.getRemoteIdToIdMap(e);let i=s.get(t);return i||(i=this.generateIdFn(),s.set(t,i),o.set(i,t)),i}getIds(e,t){const r=this.getIdToRemoteIdMap(e),n=this.getRemoteIdToIdMap(e);return t.map(t=>this.getId(e,t,r,n))}getRemoteId(e,t,r){const n=r||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;const s=n.get(t);return s||-1}getRemoteIds(e,t){const r=this.getRemoteIdToIdMap(e);return t.map(t=>this.getRemoteId(e,t,r))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}class Sp{constructor(e){Qa(this,"iframes",new WeakMap),Qa(this,"crossOriginIframeMap",new WeakMap),Qa(this,"crossOriginIframeMirror",new bp(Tl)),Qa(this,"crossOriginIframeStyleMirror"),Qa(this,"crossOriginIframeRootIdMap",new WeakMap),Qa(this,"mirror"),Qa(this,"mutationCb"),Qa(this,"wrappedEmit"),Qa(this,"loadListener"),Qa(this,"stylesheetManager"),Qa(this,"recordCrossOriginIframes"),this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new bp(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){var r,n;this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),this.recordCrossOriginIframes&&(null==(r=e.contentWindow)||r.addEventListener("message",this.handleMessage.bind(this))),null==(n=this.loadListener)||n.call(this,e),e.contentDocument&&e.contentDocument.adoptedStyleSheets&&e.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(e.contentDocument.adoptedStyleSheets,this.mirror.getId(e.contentDocument))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin)return;if(!e.source)return;const r=this.crossOriginIframeMap.get(e.source);if(!r)return;const n=this.transformCrossOriginEvent(r,t.data.event);n&&this.wrappedEmit(n,t.data.isCheckout)}transformCrossOriginEvent(e,t){var r;switch(t.type){case qd.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const r=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,r),this.patchRootIdOnNode(t.data.node,r),{timestamp:t.timestamp,type:qd.IncrementalSnapshot,data:{source:$d.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case qd.Meta:case qd.Load:case qd.DomContentLoaded:return!1;case qd.Plugin:return t;case qd.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case qd.IncrementalSnapshot:switch(t.data.source){case $d.Mutation:return t.data.adds.forEach(t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const r=this.crossOriginIframeRootIdMap.get(e);r&&this.patchRootIdOnNode(t.node,r)}),t.data.removes.forEach(t=>{this.replaceIds(t,e,["parentId","id"])}),t.data.attributes.forEach(t=>{this.replaceIds(t,e,["id"])}),t.data.texts.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case $d.Drag:case $d.TouchMove:case $d.MouseMove:return t.data.positions.forEach(t=>{this.replaceIds(t,e,["id"])}),t;case $d.ViewportResize:return!1;case $d.MediaInteraction:case $d.MouseInteraction:case $d.Scroll:case $d.CanvasMutation:case $d.Input:return this.replaceIds(t.data,e,["id"]),t;case $d.StyleSheetRule:case $d.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case $d.Font:return t;case $d.Selection:return t.data.ranges.forEach(t=>{this.replaceIds(t,e,["start","end"])}),t;case $d.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),null==(r=t.data.styles)||r.forEach(t=>{this.replaceStyleIds(t,e,["styleId"])}),t}}return!1}replace(e,t,r,n){for(const s of n)(Array.isArray(t[s])||"number"==typeof t[s])&&(Array.isArray(t[s])?t[s]=e.getIds(r,t[s]):t[s]=e.getId(r,t[s]));return t}replaceIds(e,t,r){return this.replace(this.crossOriginIframeMirror,e,t,r)}replaceStyleIds(e,t,r){return this.replace(this.crossOriginIframeStyleMirror,e,t,r)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach(e=>{this.replaceIdOnNode(e,t)})}patchRootIdOnNode(e,t){e.type===Kd.Document||e.rootId||(e.rootId=t),"childNodes"in e&&e.childNodes.forEach(e=>{this.patchRootIdOnNode(e,t)})}}class Cp{constructor(e){Qa(this,"shadowDoms",new WeakSet),Qa(this,"mutationCb"),Qa(this,"scrollCb"),Qa(this,"bypassOptions"),Qa(this,"mirror"),Qa(this,"restoreHandlers",[]),this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!dl(e))return;if(this.shadowDoms.has(e))return;this.shadowDoms.add(e);const r=cp({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push(()=>r.disconnect()),this.restoreHandlers.push(hp({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),setTimeout(()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(bd.host(e))),this.restoreHandlers.push(gp({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))},0)}observeAttachShadow(e){e.contentWindow&&e.contentDocument&&this.patchAttachShadow(e.contentWindow.Element,e.contentDocument)}patchAttachShadow(e,t){const r=this;this.restoreHandlers.push(Od(e.prototype,"attachShadow",function(e){return function(n){const s=e.call(this,n),o=bd.shadowRoot(this);return o&&Wd(this)&&r.addShadowRoot(o,t),s}}))}reset(){this.restoreHandlers.forEach(e=>{try{e()}catch(e){}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}for(var xp="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",kp="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Ip=0;Ip<64;Ip++)kp[xp.charCodeAt(Ip)]=Ip;const Op=new Map;const Ep=(e,t,r)=>{if(!e||!Pp(e,t)&&"object"!=typeof e)return;const n=function(e,t){let r=Op.get(e);return r||(r=new Map,Op.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}(r,e.constructor.name);let s=n.indexOf(e);return-1===s&&(s=n.length,n.push(e)),s};function Mp(e,t,r){if(e instanceof Array)return e.map(e=>Mp(e,t,r));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray){return{rr_type:e.constructor.name,args:[Object.values(e)]}}if(e instanceof ArrayBuffer){return{rr_type:e.constructor.name,base64:function(e){var t,r=new Uint8Array(e),n=r.length,s="";for(t=0;t<n;t+=3)s+=xp[r[t]>>2],s+=xp[(3&r[t])<<4|r[t+1]>>4],s+=xp[(15&r[t+1])<<2|r[t+2]>>6],s+=xp[63&r[t+2]];return n%3==2?s=s.substring(0,s.length-1)+"=":n%3==1&&(s=s.substring(0,s.length-2)+"=="),s}(e)}}if(e instanceof DataView){return{rr_type:e.constructor.name,args:[Mp(e.buffer,t,r),e.byteOffset,e.byteLength]}}if(e instanceof HTMLImageElement){const t=e.constructor.name,{src:r}=e;return{rr_type:t,src:r}}if(e instanceof HTMLCanvasElement){return{rr_type:"HTMLImageElement",src:e.toDataURL()}}if(e instanceof ImageData){return{rr_type:e.constructor.name,args:[Mp(e.data,t,r),e.width,e.height]}}if(Pp(e,t)||"object"==typeof e){return{rr_type:e.constructor.name,index:Ep(e,t,r)}}return e}const Rp=(e,t,r)=>e.map(e=>Mp(e,t,r)),Pp=(e,t)=>{const r=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(e=>"function"==typeof t[e]);return Boolean(r.find(r=>e instanceof t[r]))};function Tp(e,t,r,n){const s=[];try{const o=Od(e.HTMLCanvasElement.prototype,"getContext",function(e){return function(s,...o){if(!Ad(this,t,r,!0)){const e=function(e){return"experimental-webgl"===e?"webgl":e}(s);if("__context"in this||(this.__context=e),n&&["webgl","webgl2"].includes(e))if(o[0]&&"object"==typeof o[0]){const e=o[0];e.preserveDrawingBuffer||(e.preserveDrawingBuffer=!0)}else o.splice(0,1,{preserveDrawingBuffer:!0})}return e.apply(this,[s,...o])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>
vendor: 5,436 bytes, line 26
26{s.forEach(e=>e())}}function Ap(e,t,r,n,s,o){const i=[],a=Object.getOwnPropertyNames(e);for(const l of a)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(l))try{if("function"!=typeof e[l])continue;const a=Od(e,l,function(e){return function(...i){const a=e.apply(this,i);if(Ep(a,o,this),"tagName"in this.canvas&&!Ad(this.canvas,n,s,!0)){const e=Rp(i,o,this),n={type:t,property:l,args:e};r(this.canvas,n)}return a}});i.push(a)}catch{const n=Id(e,l,{set(e){r(this.canvas,{type:t,property:l,args:[e],setter:!0})}});i.push(n)}return i}const Np='(function() {\n "use strict";\n var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";\n var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);\n for (var i = 0; i < chars.length; i++) {\n lookup[chars.charCodeAt(i)] = i;\n }\n var encode = function(arraybuffer) {\n var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";\n for (i2 = 0; i2 < len; i2 += 3) {\n base64 += chars[bytes[i2] >> 2];\n base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];\n base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];\n base64 += chars[bytes[i2 + 2] & 63];\n }\n if (len % 3 === 2) {\n base64 = base64.substring(0, base64.length - 1) + "=";\n } else if (len % 3 === 1) {\n base64 = base64.substring(0, base64.length - 2) + "==";\n }\n return base64;\n };\n const lastBlobMap = /* @__PURE__ */ new Map();\n const transparentBlobMap = /* @__PURE__ */ new Map();\n async function getTransparentBlobFor(width, height, dataURLOptions) {\n const id = `${width}-${height}`;\n if ("OffscreenCanvas" in globalThis) {\n if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);\n const offscreen = new OffscreenCanvas(width, height);\n offscreen.getContext("2d");\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n transparentBlobMap.set(id, base64);\n return base64;\n } else {\n return "";\n }\n }\n const worker = self;\n worker.onmessage = async function(e) {\n if ("OffscreenCanvas" in globalThis) {\n const { id, bitmap, width, height, dataURLOptions } = e.data;\n const transparentBase64 = getTransparentBlobFor(\n width,\n height,\n dataURLOptions\n );\n const offscreen = new OffscreenCanvas(width, height);\n const ctx = offscreen.getContext("2d");\n ctx.drawImage(bitmap, 0, 0);\n bitmap.close();\n const blob = await offscreen.convertToBlob(dataURLOptions);\n const type = blob.type;\n const arrayBuffer = await blob.arrayBuffer();\n const base64 = encode(arrayBuffer);\n if (!lastBlobMap.has(id) && await transparentBase64 === base64) {\n lastBlobMap.set(id, base64);\n return worker.postMessage({ id });\n }\n if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });\n worker.postMessage({\n id,\n type,\n base64,\n width,\n height\n });\n lastBlobMap.set(id, base64);\n } else {\n return worker.postMessage({ id: e.data.id });\n }\n };\n})();\n//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map\n',Lp="undefined"!=typeof self&&self.Blob&&new Blob([Np],{type:"text/javascript;charset=utf-8"});function _p(e){let t;try{if(t=Lp&&(self.URL||self.webkitURL).createObjectURL(Lp),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch(t){return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(Np),{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}class Dp{constructor(e){Qa(this,"pendingCanvasMutations",new Map),Qa(this,"rafStamps",{latestId:0,invokeId:null}),Qa(this,"mirror"),Qa(this,"mutationCb"),Qa(this,"resetObservers"),Qa(this,"frozen",!1),Qa(this,"locked",!1),Qa(this,"processMutation",(e,t)=>{!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)});const{sampling:t="all",win:r,blockClass:n,blockSelector:s,recordCanvas:o,dataURLOptions:i}=e;this.mutationCb=e.mutationCb,this.mirror=e.mirror,o&&"all"===t&&this.initCanvasMutationObserver(r,n,s),o&&"number"==typeof t&&this.initCanvasFPSObserver(t,r,n,s,{dataURLOptions:i})}reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}initCanvasFPSObserver(e,t,r,n,s){const o=Tp(t,r,n,!0),i=new Map,a=new _p;a.onmessage=e=>{const{id:t}=e.data;if(i.set(t,!1),!("base64"in e.data))return;const{base64:r,type:n,width:s,height:o}=e.data;this.mutationCb({id:t,type:Hd["2D"],commands:[{property:"clearRect",args:[0,0,s,o]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:r}],type:n}]},0,0]}]})};const l=1e3/e;let c,u=0;const h=e=>{u&&e-u<l||(u=e,(()=>{const e=[];return t.document.querySelectorAll("canvas").forEach(t=>{Ad(t,r,n,!0)||e.push(t)}),e}
vendor: 4,113 bytes, line 26
26)().forEach(async e=>{var t;const r=this.mirror.getId(e);if(i.get(r))return;if(0===e.width||0===e.height)return;if(i.set(r,!0),["webgl","webgl2"].includes(e.__context)){const r=e.getContext(e.__context);!1===(null==(t=null==r?void 0:r.getContextAttributes())?void 0:t.preserveDrawingBuffer)&&r.clear(r.COLOR_BUFFER_BIT)}const n=await createImageBitmap(e);a.postMessage({id:r,bitmap:n,width:e.width,height:e.height,dataURLOptions:s.dataURLOptions},[n])})),c=requestAnimationFrame(h)};c=requestAnimationFrame(h),this.resetObservers=()=>{o(),cancelAnimationFrame(c)}}initCanvasMutationObserver(e,t,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const n=Tp(e,t,r,!1),s=function(e,t,r,n){const s=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const i of o)try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[i])continue;const o=Od(t.CanvasRenderingContext2D.prototype,i,function(s){return function(...o){return Ad(this.canvas,r,n,!0)||setTimeout(()=>{const r=Rp(o,t,this);e(this.canvas,{type:Hd["2D"],property:i,args:r})},0),s.apply(this,o)}});s.push(o)}catch{const r=Id(t.CanvasRenderingContext2D.prototype,i,{set(t){e(this.canvas,{type:Hd["2D"],property:i,args:[t],setter:!0})}});s.push(r)}return()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r),o=function(e,t,r,n){const s=[];return s.push(...Ap(t.WebGLRenderingContext.prototype,Hd.WebGL,e,r,n,t)),void 0!==t.WebGL2RenderingContext&&s.push(...Ap(t.WebGL2RenderingContext.prototype,Hd.WebGL2,e,r,n,t)),()=>{s.forEach(e=>e())}}(this.processMutation.bind(this),e,t,r);this.resetObservers=()=>{n(),s(),o()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const e=t=>{this.rafStamps.latestId=t,requestAnimationFrame(e)};requestAnimationFrame(e)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((e,t)=>{const r=this.mirror.getId(t);this.flushPendingCanvasMutationFor(t,r)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(e,t){if(this.frozen||this.locked)return;const r=this.pendingCanvasMutations.get(e);if(!r||-1===t)return;const n=r.map(e=>{const{type:t,...r}=e;return r}),{type:s}=r[0];this.mutationCb({id:t,type:s,commands:n}),this.pendingCanvasMutations.delete(e)}}class Fp{constructor(e){Qa(this,"trackedLinkElements",new WeakSet),Qa(this,"mutationCb"),Qa(this,"adoptedStyleSheetCb"),Qa(this,"styleMirror",new Bd),this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const r={id:t,styleIds:[]},n=[];for(const t of e){let e;if(this.styleMirror.has(t))e=this.styleMirror.getId(t);else{e=this.styleMirror.add(t);let r=[];try{r=Array.from(t.cssRules,(e,r)=>({rule:fl(e,t.href),index:r}))}catch(e){if(!(e instanceof DOMException&&"SecurityError"===e.name))throw e}n.push({styleId:e,rules:r})}r.styleIds.push(e)}n.length>0&&(r.styles=n),this.adoptedStyleSheetCb(r)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class Up{constructor(){Qa(this,"nodeMap",new WeakMap),Qa(this,"active",!1)}inOtherBuffer(e,t){const r=this.nodeMap.get(e);return r&&Array.from(r).some(e=>e!==t)}add(e,t){this.active||(this.active=!0,requestAnimationFrame(()=>{this.nodeMap=new WeakMap,this.active=!1})),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Bp,jp,zp,Wp=!1;try{if(2!==Array.from([1],e=>2*e)[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=(null==(Ja=e.contentWindow)?void 0:Ja.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const qp=new ml;function $p(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr
26-block",blockSelector:o=null,ignoreClass:i="rr-ignore",ignoreSelector:a=null,maskTextClass:l="rr-mask",maskTextSelector:c=null,inlineStylesheet:u=!0,maskAllInputs:h,maskInputOptions:d,slimDOMOptions:p,maskInputFn:f,maskTextFn:m,maskAttributeFn:g,hooks:v,packFn:y,sampling:w={},dataURLOptions:b={},mousemoveWait:S,recordDOM:C=!0,recordCanvas:x=!1,recordCrossOriginIframes:k=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:O=!1,collectFonts:E=!1,inlineImages:M=!1,captureAdoptedStyleSheets:R=!0,plugins:P,keepIframeSrcFn:T=()=>!1,ignoreCSSAttributes:A=new Set([]),errorHandler:N,applyBackgroundColorToBlockedElements:L=!1}=e;sp=N;const _=!k||window.parent===window;let D=!1;if(!_)try{window.parent.document&&(D=!1)}catch(e){D=!0}if(_&&!t)throw new Error("emit function is required");if(!_&&!D)return()=>{};void 0!==S&&void 0===w.mousemove&&(w.mousemove=S),qp.reset();const F=!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==d?d:{password:!0},U=!0===p||"all"===p?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===p,headMetaDescKeywords:"all"===p,headTitleMutations:"all"===p}:p||{};let B;!function(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}();let j=0;const z=e=>{for(const t of P||[])t.eventProcessor&&(e=t.eventProcessor(e));return y&&!D&&(e=y(e)),e};Bp=(e,s)=>{var o;const i=e;if(i.timestamp=Ed(),!(null==(o=ap[0])?void 0:o.isFrozen())||i.type===qd.FullSnapshot||i.type===qd.IncrementalSnapshot&&i.data.source===$d.Mutation||ap.forEach(e=>e.unfreeze()),_)null==t||t(z(i),s);else if(D){const e={type:"rrweb",event:z(i),origin:window.location.origin,isCheckout:s};window.parent.postMessage(e,"*")}if(i.type===qd.FullSnapshot)B=i,j=0;else if(i.type===qd.IncrementalSnapshot){if(i.data.source===$d.Mutation&&i.data.isAttachIframe)return;j++;const e=n&&j>=n,t=r&&i.timestamp-B.timestamp>r;(e||t)&&jp(!0)}};const W=e=>{Bp({type:qd.IncrementalSnapshot,data:{source:$d.Mutation,...e}})},q=e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.Scroll,...e}}),$=e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.CanvasMutation,...e}}),V=new Fp({mutationCb:W,adoptedStyleSheetCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.AdoptedStyleSheet,...e}})}),G=new Sp({mirror:qp,mutationCb:W,stylesheetManager:V,recordCrossOriginIframes:k,wrappedEmit:Bp});for(const e of P||[])e.getMirror&&e.getMirror({nodeMirror:qp,crossOriginIframeMirror:G.crossOriginIframeMirror,crossOriginIframeStyleMirror:G.crossOriginIframeStyleMirror});const H=new Up;zp=new Dp({recordCanvas:x,mutationCb:$,win:window,blockClass:s,blockSelector:o,mirror:qp,sampling:w.canvas,dataURLOptions:b});const J=new Cp({mutationCb:W,scrollCb:q,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskInputOptions:F,dataURLOptions:b,maskTextFn:m,maskInputFn:f,maskAttributeFn:g,recordCanvas:x,inlineImages:M,sampling:w,slimDOMOptions:U,iframeManager:G,stylesheetManager:V,canvasManager:zp,keepIframeSrcFn:T,processedNodeManager:H},mirror:qp});jp=(e=!1)=>{if(!C)return;Bp({type:qd.Meta,data:{href:window.location.href,width:Pd(),height:Rd()}},e),V.reset(),J.init(),ap.forEach(e=>e.lock());const t=function(e,t){const{mirror:r=new ml,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:i=null,inlineStylesheet:a=!0,inlineImages:l=!1,recordCanvas:c=!1,maskAllInputs:u=!1,maskTextFn:h,maskInputFn:d,maskAttributeFn:p,slimDOM:f=!1,dataURLOptions:m,preserveWhiteSpace:g,onSerialize:v,onAdoptedStyleSheet:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:C,keepIframeSrcFn:x=()=>!1,applyBackgroundColorToBlockedElements:k=!1}=t||{};return Hl(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:i,skipChild:!1,inlineStylesheet:a,maskInputOptions:!0===u?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===u?{password:!0}
26:u,maskTextFn:h,maskInputFn:d,maskAttributeFn:p,slimDOMOptions:!0===f||"all"===f?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===f,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===f?{}:f,dataURLOptions:m,inlineImages:l,recordCanvas:c,preserveWhiteSpace:g,onSerialize:v,onAdoptedStyleSheet:y,onIframeLoad:w,iframeLoadTimeout:b,onStylesheetLoad:S,stylesheetLoadTimeout:C,keepIframeSrcFn:x,newlyAddedElement:!1,applyBackgroundColorToBlockedElements:k})}(document,{mirror:qp,blockClass:s,blockSelector:o,maskTextClass:l,maskTextSelector:c,inlineStylesheet:u,maskAllInputs:F,maskTextFn:m,maskInputFn:f,maskAttributeFn:g,slimDOM:U,dataURLOptions:b,recordCanvas:x,inlineImages:M,applyBackgroundColorToBlockedElements:L,onSerialize:e=>{Dd(e,qp)&&G.addIframe(e),Fd(e,qp)&&V.trackLinkElement(e),Ud(e)&&J.addShadowRoot(bd.shadowRoot(e),document)},onAdoptedStyleSheet:R?e=>V.styleMirror.add(e):void 0,onIframeLoad:(e,t)=>{G.attachIframe(e,t),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{V.attachLinkElement(e,t)},keepIframeSrcFn:T});if(!t)return console.warn("Failed to snapshot the document");Bp({type:qd.FullSnapshot,data:{node:t,initialOffset:Md(window)}},e),ap.forEach(e=>e.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&V.adoptStyleSheets(document.adoptedStyleSheets,qp.getId(document))};try{const e=[],t=e=>{var t;return op(vp)({mutationCb:W,mousemoveCb:(e,t)=>Bp({type:qd.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.MouseInteraction,...e}}),scrollCb:q,viewportResizeCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.ViewportResize,...e}}),inputCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.Input,...e}}),mediaInteractionCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.MediaInteraction,...e}}),styleSheetRuleCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.StyleSheetRule,...e}}),styleDeclarationCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.StyleDeclaration,...e}}),canvasMutationCb:$,fontCb:e=>Bp({type:qd.IncrementalSnapshot,data:{source:$d.Font,...e}}),selectionCb:e=>{Bp({type:qd.IncrementalSnapshot,data:{source:$d.Selection,...e}})},customElementCb:e=>{Bp({type:qd.IncrementalSnapshot,data:{source:$d.CustomElement,...e}})},blockClass:s,ignoreClass:i,ignoreSelector:a,maskTextClass:l,maskTextSelector:c,maskInputOptions:F,inlineStylesheet:u,sampling:w,recordDOM:C,recordCanvas:x,inlineImages:M,userTriggeredOnInput:O,collectFonts:E,doc:e,maskInputFn:f,maskTextFn:m,maskAttributeFn:g,keepIframeSrcFn:T,blockSelector:o,slimDOMOptions:U,dataURLOptions:b,mirror:qp,iframeManager:G,stylesheetManager:V,shadowDomManager:J,processedNodeManager:H,canvasManager:zp,ignoreCSSAttributes:A,plugins:(null==(t=null==P?void 0:P.filter(e=>e.observer))?void 0:t.map(e=>({observer:e.observer,options:e.options,callback:t=>Bp({type:qd.Plugin,data:{plugin:e.name,payload:t}})})))||[]},v)};G.addLoadListener(r=>{try{e.push(t(r.contentDocument))}catch(e){console.warn(e)}});const r=()=>{jp(),e.push(t(document)),Wp=!0};return"interactive"===document.readyState||"complete"===document.readyState?r():(e.push(Sd("DOMContentLoaded",()=>{Bp({type:qd.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&r()})),e.push(Sd("load",()=>{Bp({type:qd.Load,data:{}}),"load"===I&&r()},window))),()=>{e.forEach(e=>e()),H.destroy(),Wp=!1,sp=void 0}}catch(e){console.warn(e)}}var Vp;$p.addCustomEvent=(e,t)=>{if(!Wp)throw new Error("please add custom event after start recording");Bp({type:qd.Custom,data:{tag:e,payload:t}})},$p.freezePage=()=>{ap.forEach(e=>e.freeze())},$p.takeFullSnapshot=e=>{if(!Wp)throw new Error("please take full snapshot after start recording");jp(e)},$p.mirror=qp,function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"}(Vp||(Vp={}));var Gp=Object.freeze({__proto__:null,record:$p}),Hp=["image/","audio/","video/","application/octet-stream","font/"];function Jp(e,t){if(new Blob([e]).size<=t)return{value:e,truncated:!1};for(var r=0,n=Math.min(e.length,t);r<n;){var s=Math.ceil((r+n)/2);new Blob([e.slice(0,s)]).size<=t?r=s:n=s-1}return r>0&&e.charCodeAt(r-1)>=55296&&e.charCodeAt(r-1)<=56319&&(r-=1),{value:e.slice(0,r),truncated:!0}}var Kp=function(){function e(){this.fetchObserver=null}return e.prototype.start=function(e,t){this.eventCallback=e,this.networkConfig=t,this.observeFetch()},e.prototype.stop=function(){var e;null===(e=this.fetchObserver)||void 0===e||e.call(this),this.fetchObserver=null,this.eventCallback=void 0,this.networkConfig=void 0},e.prototype.notifyEvent=function(e){var t;null===(t=this.eventCallback)||void 0===t||t.call(this,e)},e.prototype.observeFetch=function(){var e=this,t=g();if(t){var r=t.fetch;r&&(t.fetch=function(t,n){return a(e,void 0,void 0,function(){var e,s,o,i,a,c,u,h,d,p,f,m,g=this;return l(this,function(l){switch(l.label){case 0:e=Date.now(),s={timestamp:e,type:"fetch",method:(null==n?void 0:n.method)||"GET",url:t.toString(),requestHeaders:null==n?void 0:n.headers},(null==(o=null===(f=this.networkConfig)||void 0===f?void 0:f.body)?void 0:o.request)&&void 0!==(i=function(e){if(null!=e){if("string"==typeof e)return e;if(e instanceof URLSearchParams)return e.toString();if(e instanceof FormData){var t=[];return e.forEach(function(e,r){t.push("".concat(r,"=").concat("string"==typeof e?e:"[File]"))}),t.join("&")}}}
26(null==n?void 0:n.body))&&(a=null!==(m=o.maxBodySizeBytes)&&void 0!==m?m:10240,s.requestBody=Jp(i,a).value),l.label=1;case 1:return l.trys.push([1,3,,4]),[4,r(t,n)];case 2:return c=l.sent(),d=Date.now(),s.status=c.status,s.duration=d-e,u={},c.headers.forEach(function(e,t){u[t]=e}),s.responseHeaders=u,(null==o?void 0:o.response)?!function(e){return!!e&&Hp.some(function(t){return e.toLowerCase().startsWith(t)})}(u["content-type"]||null)?c.clone().text().then(function(e){var t,r=Jp(e,null!==(t=o.maxBodySizeBytes)&&void 0!==t?t:10240),n=r.value,i=r.truncated;s.responseBody=n,s.responseBodyStatus=i?"truncated":"captured",g.notifyEvent(s)},function(){s.responseBodyStatus="error",g.notifyEvent(s)}):(s.responseBodyStatus="skipped_binary",this.notifyEvent(s)):this.notifyEvent(s),[2,c];case 3:throw h=l.sent(),d=Date.now(),s.duration=d-e,p=h,s.error={name:p.name||"UnknownError",message:p.message||"An unknown error occurred"},this.notifyEvent(s),h;case 4:return[2]}})})},this.fetchObserver=function(){t.fetch=r})}},e}(),Yp=Object.freeze({__proto__:null,NetworkObservers:Kp});return e.SessionReplayPlugin=$r,e.plugin=Vr,e.sessionReplayPlugin=Vr,Object.defineProperty(e,"__esModule",{value:!0}),e}({}); 27//# sourceMappingURL=plugin-session-replay-browser-min.js.map 28 29function PortalCurrency(locale){var t=this;t.currency={'de_DE':{'decPoint':',','thousandsSep':'.','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'de_AT':{'decPoint':',','thousandsSep':'.','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'de_CH':{'decPoint':'.','thousandsSep':'â','sign':'CHF','code':'CHF','shortName':'franc','longName':'swiss franc','position':1,'space':' '},'dk_DK':{'decPoint':',','thousandsSep':'.','sign':'kr.','code':'DKK','shortName':'krone','longName':'danish krone','position':2,'space':' '},'es_ES':{'decPoint':',','thousandsSep':'.','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'pl_PL':{'decPoint':',','thousandsSep':' ','sign':'zÅ','code':'PLN','shortName':'zÅoty','longName':'Polish zÅoty','position':2,'space':' '},'cs_CZ':{'decPoint':'.','thousandsSep':' ','sign':'KÄ','code':'CZK','shortName':'koruna','longName':'koruna Äeská','position':2,'space':' '},'nl_NL':{'decPoint':',','thousandsSep':'.','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':1,'space':' '},'fr_FR':{'decPoint':',','thousandsSep':' ','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'it_IT':{'decPoint':',','thousandsSep':'.','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'en_IE':{'decPoint':'.','thousandsSep':',','sign':'â¬','code':'EUR','shortName':'Euro','longName':'Euro','position':2,'space':' '},'en_US':{'decPoint':'.','thousandsSep':',','sign':'$','code':'USD','shortName':'dollar','longName':'U.S. dollar','position':1,'space':''},'en_GB':{'decPoint':'.','thousandsSep':',','sign':'£','code':'GBP','shortName':'pound','longName':'pound sterling','position':1,'space':''},'ru_RU':{'decPoint':',','thousandsSep':' ','sign':'â½','code':'RUB','shortName':'ÑÑб','longName':'Rubel','position':2,'space':' '}};if(typeof t.currency[locale]==='undefined'){locale='de_DE';} 30t.SIGN='sign';t.CODE='code';t.NONE='none';t.SHORT='shortName';t.LONG='longName';t.LEFT=1;t.RIGHT=2;t.options={'position':null,'display':this.SIGN,'decimals':2,'algebraicSign':false,'thousandsStep':null};t.possibleOptions=['position','display','decimals','algebraicSign','thousandsStep'];t.setOptions=function(aOptions){var t=this,key;if(typeof aOptions!=='undefined'){for(key in aOptions){if(aOptions.hasOwnProperty(key)){if($.inArray(key,t.possibleOptions)){t.options[key]=aOptions[key];}}}} 31return t;};t.toCurrency=function(amount,disableConvert,decimals){var returnValue,t=this,position=(t.options['position']!==null)?t.options['position']:t.currency[locale]['position'],algebraicSign='',thousandsStep=(t.o
31ptions['thousandsStep']!==null)?t.options['thousandsStep']:t.currency[locale]['thousandsSep'],decimals=(typeof decimals==="undefined"?t.options['decimals']:decimals);amount=t.getValue(amount);if(typeof window.i18n!=='undefined'&&typeof window.i18n.currencyConvert!=='undefined'&&disableConvert!==true){amount*=window.i18n.currencyConvert;} 32if(t.options['algebraicSign']===true){if(amount<0||amount<0.00){amount=ltrim(amount,'-');algebraicSign='- ';}else if(amount>0||amount>0.00){algebraicSign='+ ';}} 33returnValue=number_format(amount,decimals,t.currency[locale]['decPoint'],thousandsStep);if(t.options['display']!=='none'){if(position===t.LEFT&&t.options['display']!==t.SHORT&&t.options['display']!==t.LONG){returnValue=(t.options['display']===t.SIGN)?(t.currency[locale][t.options['display']]+t.currency[locale]['space']+returnValue):(t.currency[locale][t.options['display']]+' '+returnValue);} 34else{returnValue=returnValue+' '+t.currency[locale][t.options['display']];}} 35return algebraicSign+returnValue;};t.getValue=function(currency){if(currency===''||currency===undefined){return 0.00;} 36else if(String(parseFloat(currency))===String(currency)){return parseFloat(currency);} 37var setup=t.currency[locale];var aSearches=[setup['thousandsSep'],setup['decPoint'],'£','$','â¬','EUR','USD','€',setup['space'],setup['sign'],setup['code'],setup['shortName'],setup['longName']];var aReplaces=['','.','','','','','','','','','','',''];return parseFloat(Math.round(100*parseFloat(str_replace(aSearches,aReplaces,currency)))/100);};} 38function rebookingHints(bInclude,checkBox){var $checkBox=checkBox||$('#rebookingService'),rb=($checkBox.is(':checked')&&!bInclude),ins=!($('#bookingTypeFalse').is(':checked')||(!($('#ibeTblTiOffers input:radio').is(':checked'))||($('#insuranceOffer_AnnualPackage').length>0&&!$('#insuranceOffer_AnnualPackage').is(':checked')))),form=$('#ibeBookingForm');$('span.rebookingHintBoth',form).toggle(rb&&ins);$('span.rebookingHintRebooking',form).toggle(rb&&!ins);$('span.rebookingHintInsurance',form).toggle(!rb&&ins);$('span.rebookingHintMulti',form).toggle(rb&&ins);$('span.rebookingHintSingle',form).toggle(rb!==ins);} 39function rebookingHandler(bNoNotice,bInclude,checkBox){var $checkBox=checkBox||$('#rebookingService'),_rb=$checkBox.is(':checked')||$checkBox.is(':selected'),showNotice=((_rb===true)&&!bNoNotice&&!bInclude);if($checkBox.length>0){$('span.rebookingServiceSubtotal, span.rebookingServiceInfo').toggle(showNotice);$('span.rebookingTeaser, div.rebookingServiceSubtotalBox').toggle(_rb);if(_rb===true){$('#abpNo').click();} 40$('#abpBox').toggle(!_rb);rebookingHints(bInclude);}} 41function initInputFieldsDefaultValue(){var $e;$('.inputWithDefaultValue').each(function(){$e=$(this);if($e.val()===''){$e.val($e.attr('defaultValue'));}}).focus(function(){$e=$(this);if($e.val()===$e.attr('defaultValue')){$e.val('');}}).blur(function(){$e=$(this);if($e.val()===''){$e.val($e.attr('defaultValue'));}});} 42$(function(){initInputFieldsDefaultValue();$(document).on('change focus blur','select.js_inlineLabel',function(e){var $this=$(this);if(e.type!=='focus'&&e.type!=='focusin'&&$('option:eq(0)',$this).is(':selected')&&$this.hasClass('js_inlineLabel')){$this.addClass('value_is-blured');}else{$this.removeClass('value_is-blured');}});});function gaTrackEvent(category,action,label,noninteractive,value){label=label||'';value=value||1;noninteractive=noninteractive||false;window.dataLayer=window.dataLayer||[];window.dataLayer.push({event:(noninteractive?'gaNonEvent':'gaEvent'),eventCategory:category,eventAction:action,eventLabel:label,eventValue:value});} 43String.prototype.capitalize=function(){return this.charAt(0).toUpperCase()+this.slice(1);}; 44var ga4CustomTrackEvent=function(eventName,eventParams){var trackEvent={event:'custom_event',event_name:eventName};if(eventParams){trackEvent[eventName]=eventParams;} 45window.dataLayer=window.dataLayer||[];window.dataLayer.push(trackEvent);};function reformatProductName(str){if(!str){str='unknown_product'} 46var lastSpaceIndex=str.lastIndexOf(' ');var step1=lastSpaceIndex===-1?str:str.slice(0,lastSpaceIndex)+'_'+str.slice(lastSpaceIndex+1);return step1.replace(/[ -]/g,'').toLowerCase();} 47var ga4ProductShow=function(productType,productName,productPrice,isAnnual){var parameter={product_type:productType,product_name:reformatProductName(productName),product_price:parseFloat(productPrice).toFixed(2)};if(isAnnual!==undefined&&isAnnual!==null){parameter.product_subscription=isAnnual?'annual':'one-time';} 48ga4CustomTrackEvent('product_display',parameter);};
49try{document.execCommand("BackgroundImageCache",false,true);}catch(exception){} 50if(typeof $.datepicker!=='undefined'){$.datepicker.setDefaults({firstDay:1,maxDate:"+1y",numberOfMonths:2,showOn:"focus",buttonImage:"",buttonImageOnly:false,buttonText:false,showButtonPanel:true,closeText:"X",duration:"fast"}).selectedDates=[];} 51function modifyDate(jq_datepicker_dateStr,input_id,anz_tage){var reset=function(id){$("#"+id).val($.datepicker.selectedDates[id]);};try{var $input=$('#'+input_id),dateFormat=$input.datepicker('option','dateFormat'),outBound=$.datepicker.parseDate(dateFormat,jq_datepicker_dateStr),inBound;if(outBound){inBound=new Date(outBound.getTime()+(anz_tage*86400000));inBound=$.datepicker.formatDate(dateFormat,inBound);$input.val(inBound);$.datepicker.selectedDates[input_id]=inBound;}else{reset(input_id);}}catch(e){reset(input_id);}} 52function getDatepickerDate(fromId,daysToAdd){if(!!fromId){var date=$("#"+fromId).datepicker("getDate");if(date){date=date.getTime();date+=(daysToAdd*86400000);return new Date(date);}}} 53function setDatepickerMinDate(fromdate_id,todate_id,same_day){var date=getDatepickerDate(fromdate_id,(same_day&&same_day!=='false')?0:1);if(date){$("#"+todate_id).datepicker("option","minDate",date);}} 54function setDatepickerMaxDate(fromdate_id,todate_id,days){var date=getDatepickerDate(fromdate_id,days);if(date){$("#"+todate_id).datepicker("option","maxDate",date);}} 55(function($){'use strict';var methods={init:function(options){var form=this;if(!form.data('jqv')||form.data('jqv')==null){options=methods._saveOptions(form,options);$(document).on('click','.formError',function(){$(this).fadeOut(150,function(){$(this).parent('.formErrorOuter').remove();$(this).remove();});});} 56return this;},attach:function(userOptions){if(!$(this).is('form')){alert('Sorry, jqv.attach() only applies to a form');return this;} 57var form=this;var options;if(userOptions) 58options=methods._saveOptions(form,userOptions);else 59options=form.data('jqv');options.validateAttribute=(form.find('[data-validation-engine*=validate]').length)?'data-validation-engine':'class';if(options.binded){if(options.bindMethod==="live"){form.on('change focusout','['+options.validateAttribute+'*=validate]',function(){methods.closePrompt($(this));});form.on(options.validationEventTrigger,'['+options.validateAttribute+'*=validate]:not([type=checkbox],[type=radio],.datepicker)',methods._onFieldEvent);form.on('click','['+options.validateAttribute+'*=validate][type=checkbox],['+options.validateAttribute+'*=validate][type=radio]',methods._onFieldEvent);form.on(options.validationEventTrigger,'['+options.validateAttribute+'*=validate][class*=datepicker]',{'delay':300},methods._onFieldEvent);}else{form.find('['+options.validateAttribute+'*=validate]').on('change focusout',function(){methods.closePrompt($(this));});form.find('['+options.validateAttribute+'*=validate]').not('[type=checkbox]').not('[type=radio]').not('.datepicker').on(options.validationEventTrigger,methods._onFieldEvent);form.find('['+options.validateAttribute+'*=validate][type=checkbox],['+options.validateAttribute+'*=validate][type=radio]').on('click',methods._onFieldEvent);form.find('['+options.validateAttribute+'*=validate][class*=datepicker]').on(options.validationEventTrigger,{'delay':300},methods._onFieldEvent);}} 60if(options.autoPositionUpdate){$(window).on('resize',{'noAnimation':true,'formElem':form},methods.updatePromptsPosition);} 61form.on('submit',methods._onSubmitEvent);return this;},detach:function(){if(!$(this).is('form')){alert('Sorry, jqv.detach() only applies to a form');return this;} 62var form=this;var options=form.data('jqv');form.find('['+options.validateAttribute+'*=validate]').not('[type=checkbox]').off(options.validationEventTrigger,methods._onFieldEvent);form.find('['+options.validateAttribute+'*=validate][type=checkbox],[class*=validate][type=radio]').off('click',methods._onFieldEvent);form.off('submit',methods.onAjaxFormComplete);form.find('['+options.validateAttribute+'*=validate]').not('[type=checkbox]').off(options.validationEventTrigger,methods._onFieldEvent);
62form.find('['+options.validateAttribute+'*=validate][type=checkbox]').off('click',methods._onFieldEvent);form.off('submit',methods.onAjaxFormComplete);form.removeData('jqv');if(options.autoPositionUpdate) 63$(window).off('resize',methods.updatePromptsPosition);return this;},validate:function(userOptions){var element=$(this);var valid=null;if(element.is('form')&&!element.hasClass('validating')){element.addClass('validating');var options=element.data('jqv');valid=methods._validateFields(this);setTimeout(function(){element.removeClass('validating');},100);if(valid&&options.onSuccess){options.onSuccess();}else if(!valid&&options.onFailure){options.onFailure();}}else if(element.is('form')){element.removeClass('validating');}else{var form=element.closest('form');var options=(form.data('jqv'))?form.data('jqv'):$.validationEngine.defaults;options.eventTrigger='fieldWithPrompt';options.silent=false;if(userOptions&&userOptions.silent){options.silent=true;} 64valid=methods._validateField(element,options);if(valid&&options.onFieldSuccess) 65options.onFieldSuccess();else if(options.onFieldFailure&&options.InvalidFields.length>0){options.onFieldFailure();}} 66return valid;},validateWithPrompt:function(){return methods._onValidateWithPromptEvent(this);},updatePromptsPosition:function(event){if(event&&this==window){var form=event.data.formElem;var noAnimation=event.data.noAnimation;}else{var form=$(this.closest('form'));} 67var options=form.data('jqv');form.find('['+options.validateAttribute+'*=validate]').not(':disabled').each(function(){var field=$(this);if(options.prettySelect&&field.is(':hidden')) 68field=form.find('#'+options.usePrefix+field.attr('id')+options.useSuffix);var prompt=methods._getPrompt(field);var promptText=$(prompt).find('.formErrorContent').html();if(prompt) 69methods._updatePrompt(field,$(prompt),promptText,undefined,false,options,noAnimation);});return this;},showPrompt:function(promptText,type,promptPosition,showArrow){var form=this.closest('form');var options=form.data('jqv');if(!options){options=methods._saveOptions(this,options);} 70if(promptPosition){options.promptPosition=promptPosition;} 71options.showArrow=(!!showArrow===true);methods._showPrompt(this,promptText,type,false,options);return this;},hide:function(){var form=$(this).closest('form');var options=form.data('jqv');var fadeDuration=(options&&options.fadeDuration)?options.fadeDuration:0.3;var closingtag;if($(this).is('form')){closingtag='parentForm'+methods._getClassName($(this).attr('id'));}else{closingtag=methods._getClassName($(this).attr('id'))+'formError';} 72$('.'+closingtag).fadeTo(fadeDuration,0.3,function(){$(this).parent('.formErrorOuter').remove();$(this).remove();});return this;},hideAll:function(){var form=this;var options=form.data('jqv');var duration=options?options.fadeDuration:0.3;$('.formError').fadeTo(duration,0.3,function(){$(this).parent('.formErrorOuter').remove();$(this).remove();});return this;},_onFieldEvent:function(event){var field=$(this);var form=field.closest('form');var options=$.extend(true,{},form.data('jqv'));options.eventTrigger='field';options.silent=false;window.setTimeout(function(){methods._validateField(field,options);if(options.InvalidFields.length===0&&options.onFieldSuccess){options.onFieldSuccess();}else if(options.InvalidFields.length>0&&options.onFieldFailure){options.onFieldFailure();}},(event.data)?event.data.delay:0);},_onValidateWithPromptEvent:function(form){var $form=$(form);var options=$form.data('jqv');options.eventTrigger='forcedPrompt';options.silent=false;var r=methods._validateFields($form);if(r&&options.ajaxFormValidation){methods._validateFormWithAjax($form,options);return false;} 73return r;},_onSubmitEvent:function(){var form=$(this);var options=form.data('jqv');options.eventTrigger='submit';options.silent=false;var r=methods._validateFields(form);if(r&&options.ajaxFormValidation){methods._validateFormWithAjax(form,options);return false;} 74if(options.onValidationComplete){return!!options.onValidationComplete(form,r);} 75return r;},_checkAjaxStatus:function(options){var status=true;$.each(options.ajaxValidCache,function(key,value){if(!value){status=false;return false;}});return status;},_checkAjaxFieldStatus:function(fieldid,options){return(!!options.ajaxValidCache[fieldid]);}
75,_validateFields:function(form){var options=form.data('jqv');var errorFound=false;form.trigger('jqv.form.validating');var firstError=null;form.find('['+options.validateAttribute+'*=validate]').not(':disabled').each(function(){var field=$(this);var names=[];if($.inArray(field.attr('name'),names)<0){errorFound|=!methods._validateField(field,options);if(errorFound&&!firstError){if(field.is(':hidden')&&options.prettySelect){firstError=field=form.find('#'+options.usePrefix+methods._jqSelector(field.attr('id'))+options.useSuffix);}else{firstError=field;}} 76if(options.doNotShowAllErrosOnSubmit){return false;} 77names.push(field.attr('name'));if(options.showOneMessage===true&&errorFound){return false;}}});form.trigger('jqv.form.result',[errorFound]);if(!!errorFound){if(!!options.scroll){var destination=0,scrollError=firstError,scrollLeft=firstError.offset().left;var positionType=scrollError.data('promptPosition')||options.promptPosition;if(typeof(positionType)==='string'&&positionType.indexOf(':')!==-1){positionType=positionType.substring(0,positionType.indexOf(':'));} 78if(positionType!=='bottomRight'&&positionType!=='bottomLeft'){var promptError=methods._getPrompt(firstError);scrollError=(!!promptError)?promptError:scrollError;} 79if(0===destination){if(!!scrollError.data('scrollto')){scrollError=$(scrollError.data('scrollto'));scrollLeft=0;} 80destination=scrollError.offset().top-20;} 81window.scrollTo(scrollLeft,destination);if(options.focusFirstField){firstError.focus();}}else if(options.focusFirstField){firstError.focus();} 82if(options.InvalidFields.length>=1&&options.triggerFieldError===true&&options.silent===false){$.each(options.InvalidFields,function(key,field){$(field).trigger('fieldvalidationfailure');});} 83return false;} 84return true;},_validateFormWithAjax:function(form,options){var data=form.serialize();var type=(options.ajaxFormValidationMethod)?options.ajaxFormValidationMethod:'GET';var url=(options.ajaxFormValidationURL)?options.ajaxFormValidationURL:form.attr('action');var dataType=(options.dataType)?options.dataType:'json';$.ajax({type:type,url:url,cache:false,dataType:dataType,data:data,form:form,methods:methods,options:options,beforeSend:function(){return options.onBeforeAjaxFormValidation(form,options);},error:function(data,transport){methods._ajaxError(data,transport);if(typeof options.onAjaxFormFail==='function'){options.onAjaxFormFail();}},success:function(json){if((dataType==='json')&&(json!==true)){var errorInForm=false;for(var i=0;i<json.length;i++){var value=json[i];var errorFieldId=value[0];var errorField=$($('#'+errorFieldId)[0]);if(errorField.length===1){var msg=value[2];if(!!value[1]){if(msg===''||!msg){methods._closePrompt(errorField);}else{if(options.allrules[msg]){var txt=options.allrules[msg].alertTextOk;if(txt){msg=txt;}} 85if(options.showPrompts)methods._showPrompt(errorField,msg,'pass',false,options,true);}}else{errorInForm|=true;if(options.allrules[msg]){var txt=options.allrules[msg].alertText;if(txt){msg=txt;}} 86if(options.showPrompts)methods._showPrompt(errorField,msg,'',false,options,true);}}} 87options.onAjaxFormComplete(!errorInForm,form,json,options);}else 88options.onAjaxFormComplete(true,form,json,options);}});},_validateField:function(field,options,skipAjaxValidation){if(!field.attr('id')){field.attr('id','form-validation-field-'+$.validationEngine.fieldIdCounter);++$.validationEngine.fieldIdCounter;} 89if(field.is(':hidden')&&!options.prettySelect||field.parent().is(':hidden')) 90return true;var rulesParsing=field.attr(options.validateAttribute);var getRules=/validate\[(.*)\]/.exec(rulesParsing);if(!getRules) 91return true;var str=getRules[1];var rules=str.split(/\[|,|\]/);var isAjaxValidator=false;var fieldName=field.attr('name');var promptText='';var promptType='';var required=false;var limitErrors=false;options.isError=false;options.showArrow=true;if(options.maxErrorsPerField>0){limitErrors=true;} 92var form=$(field.closest('form'));for(var i=0;i<rules.length;i++){rules[i]=rules[i].replace(' ','');if(rules[i]===''){delete rules[i];}} 93for(var i=0,field_errors=0;i<rules.length;i++){if(limitErrors&&field_errors>=options.maxErrorsPerField){if(!required){var have_required=$.inArray('required',rules);required=(have_required!=-1&&have_required>=i);} 94break;} 95var errorMsg=undefined;switch(rules[i]){case'required':required=true;errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._required);break;case'singleSelect':required=true;errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._required);break;case'withdrawal':required=true;errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._required);break;case'selectNoneEqualsEmpty':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._selectNoneEqualsEmpty);break;case'custom':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._custom);break;case'groupRequired':var classGroup='['+options.validateAttribute+'*='+rules[i+1]+']';var firstOfGroup=form.find(classGroup).eq(0);if(firstOfGroup[0]!=field[0]){methods._validateField(firstOfGroup,options,skipAjaxValidation);options.showArrow=true;} 96errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._groupRequired);if(errorMsg)required=true;options.showArrow=false;break;case'ajax':errorMsg=methods._ajax(field,rules,i,options);if(errorMsg){promptType='load';} 97break;case'minSize':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._minSize);break;case'maxSize':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._maxSize);break;case'min':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._min);break;case'max':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._max);break;case'past':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._past);break;case'future':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._future);break;case'dateRange':var classGroup='['+options.validateAttribute+'*='+rules[i+1]+']';options.firstOfGroup=form.find(classGroup).eq(0);options.secondOfGroup=form.find(classGroup).eq(1);if(options.firstOfGroup[0].value||options.secondOfGroup[0].value){errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._dateRange);} 98if(errorMsg)required=true;options.showArrow=false;break;case'dateTimeRange':var classGroup='['+options.validateAttribute+'*='+rules[i+1]+']';options.firstOfGroup=form.find(classGroup).eq(0);options.secondOfGroup=form.find(classGroup).eq(1);if(options.firstOfGroup[0].value||options.secondOfGroup[0].value){errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._dateTimeRange);} 99if(errorMsg)required=true;options.showArrow=false;break;case'maxCheckbox':field=$(form.find('input[name="'+fieldName+'"]'));errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._maxCheckbox);break;case'minCheckbox':field=$(form.find('input[name="'+fieldName+'"]'));errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._minCheckbox);break;case'minReviews':field=$(form.find('input[name="'+fieldName+'"]'));errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._minReviews);break;case'equals':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._equals);break;case'funcCall':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._funcCall);break;
99case'creditCard':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._creditCard);break;case'condRequired':errorMsg=methods._getErrorMessage(form,field,rules[i],rules,i,options,methods._condRequired);if(errorMsg!==undefined){required=true;} 100break;default:} 101var end_validation=false;if(typeof errorMsg=='object'){switch(errorMsg.status){case'_break':end_validation=true;break;case'_error':errorMsg=errorMsg.message;break;case'_error_no_prompt':return false;break;default:break;}} 102if(end_validation){break;} 103if(typeof errorMsg=='string'){promptText+=errorMsg+'<br/>';options.isError=true;field_errors++;}} 104if(!required&&field.val()&&field.val().length<1)options.isError=false;var fieldType=field.prop('type');if((fieldType=='radio'||fieldType=='checkbox')&&form.find('input[name="'+fieldName+'"]').size()>1){var validateItems=form.find('input[name="'+fieldName+'"][type!=hidden]'),itemToValidate=validateItems.data('item-to-validate')||0;field=validateItems.eq(itemToValidate);options.showArrow=false;} 105if(field.is(':hidden')&&options.prettySelect){field=form.find('#'+options.usePrefix+methods._jqSelector(field.attr('id'))+options.useSuffix);} 106if(options.silent!==true){if(options.isError&&options.showPrompts){methods._showPrompt(field,promptText,promptType,false,options);}else{if(!isAjaxValidator)methods._closePrompt(field);} 107if(!isAjaxValidator){field.trigger('jqv.field.result',[field,options.isError,promptText]);}} 108var errindex=$.inArray(field[0],options.InvalidFields);if(errindex==-1){if(options.isError) 109options.InvalidFields.push(field[0]);}else if(!options.isError){options.InvalidFields.splice(errindex,1);} 110methods._handleStatusCssClasses(field,options);return!options.isError;},_handleStatusCssClasses:function(field,options){if(options.addSuccessCssClassToField) 111field.removeClass(options.addSuccessCssClassToField);if(options.addFailureCssClassToField) 112field.removeClass(options.addFailureCssClassToField);if(options.addSuccessCssClassToField&&!options.isError) 113field.addClass(options.addSuccessCssClassToField);if(options.addFailureCssClassToField&&options.isError) 114field.addClass(options.addFailureCssClassToField);},_getErrorMessage:function(form,field,rule,rules,i,options,originalValidationMethod){var beforeChangeRule=rule;if(rule=='custom'){var custom_validation_type_index=jQuery.inArray(rule,rules)+1;var custom_validation_type=rules[custom_validation_type_index];rule='custom['+custom_validation_type+']';} 115var element_classes=(field.attr('data-validation-engine'))?field.attr('data-validation-engine'):field.attr('class');var element_classes_array=element_classes.split(' ');var errorMsg;if(rule=='future'||rule=='past'||rule=='maxCheckbox'||rule=='minCheckbox'||rule=='minReviews'){errorMsg=originalValidationMethod(form,field,rules,i,options);}else{errorMsg=originalValidationMethod(field,rules,i,options);} 116if(errorMsg!=undefined){var custom_message=methods._getCustomErrorMessage($(field),element_classes_array,beforeChangeRule,options);if(custom_message)errorMsg=custom_message;} 117return errorMsg;},_getCustomErrorMessage:function(field,classes,rule,options){var custom_message=false;var validityProp=methods._validityProp[rule];if(validityProp!=undefined){custom_message=field.attr('data-errormessage-'+validityProp);if(custom_message!=undefined) 118return custom_message;} 119custom_message=field.attr('data-errormessage');if(custom_message!=undefined) 120return custom_message;var id='#'+field.attr('id');if(typeof options.custom_error_messages[id]!='undefined'&&typeof options.custom_error_messages[id][rule]!='undefined'){custom_message=options.custom_error_messages[id][rule]['message'];}else if(classes.length>0){for(var i=0;i<classes.length&&classes.length>0;i++){var element_class='.'+classes[i];if(typeof options.custom_error_messages[element_class]!='undefined'&&typeof options.custom_error_messages[element_class][rule]!='undefined'){custom_message=options.custom_error_messages[element_class][rule]['message'];break;}}} 121if(!custom_message&&typeof options.custom_error_messages[rule]!='undefined'&&typeof options.custom_error_messages[rule]['message']!='undefined'){custom_message=options.custom_error_messages[rule]['message'];} 122return custom_message;},_validityProp:{'required':'value-missing','custom':'custom-error','groupRequired':'value-missing','ajax':'custom-error','minSize':'range-underflow','maxSize':'range-overflow','min':'range-underflow','max':'range-overflow','past':'type-mismatch','future':'type-mismatch','dateRange':'type-mismatch','dateTimeRange':'type-mismatch','maxCheckbox':'range-overflow','minCheckbox':'range-underflow','equals':'pattern-mismatch','funcCall':'custom-error','credit
122Card':'pattern-mismatch','condRequired':'value-missing'},_required:function(field,rules,i,options,condRequired){switch(field.prop('type')){case'text':case'tel':case'number':case'password':case'email':case'textarea':case'select-one':case'select-multiple':if(options.eventTrigger!=='field'){if(!$.trim(field.val())||field.val()==field.attr('data-validation-placeholder')||field.val()==field.attr('placeholder')){return options.allrules[rules[i]].alertText;}} 123return true;break;case'file':default:if(!$.trim(field.val())||field.val()==field.attr('data-validation-placeholder')||field.val()==field.attr('placeholder')) 124return options.allrules[rules[i]].alertText;break;case'radio':case'checkbox':if(condRequired){if(!field.attr('checked')){return options.allrules[rules[i]].alertTextCheckboxMultiple;} 125break;} 126var form=field.closest('form');var name=field.attr('name');if(form.find('input[name="'+name+'"]:checked').size()==0){if(form.find('input[name="'+name+'"]:visible').size()==1) 127return options.allrules[rules[i]].alertTextCheckboxe;else 128return options.allrules[rules[i]].alertTextCheckboxMultiple;} 129break;}},_selectNoneEqualsEmpty:function(field,rules,i,options){if('field'!==options.eventTrigger){switch($(field).val()){case'NONE':return options.allrules[rules[i]].alertText;break;default:}}},_groupRequired:function(field,rules,i,options){var classGroup='['+options.validateAttribute+'*='+rules[i+1]+']';var isValid=false;field.closest('form').find(classGroup).each(function(){if(!methods._required($(this),rules,i,options)){isValid=true;return false;}});if(!isValid){return options.allrules[rules[i]].alertText;}},_custom:function(field,rules,i,options){var customRule=rules[i+1];var rule=options.allrules[customRule];var fn;if(!rule){alert('jqv:custom rule not found - '+customRule);return;} 130var combinedRequiredRules=['checkAirport'];if($.trim(field.val()).length>0||(options.eventTrigger!=='field'&&combinedRequiredRules.indexOf(customRule)===-1)){if(rule['regex']){var ex=rule.regex;if(!ex){alert('jqv:custom regex not found - '+customRule);return;} 131var pattern=new RegExp(ex);if(!pattern.test(field.val()))return options.allrules[customRule].alertText;}else if(rule['func']){fn=rule['func'];if(typeof(fn)!=='function'){alert('jqv:custom parameter "function" is no function - '+customRule);return;} 132if(!fn(field,rules,i,options)) 133return options.allrules[customRule].alertText;}else{alert('jqv:custom type not allowed '+customRule);return;}}else{return;}},_funcCall:function(field,rules,i,options){var functionName=rules[i+1];var fn;if(functionName.indexOf('.')>-1){var namespaces=functionName.split('.');var scope=window;while(namespaces.length){scope=scope[namespaces.shift()];} 134fn=scope;}else 135fn=window[functionName]||options.customFunctions[functionName];if(typeof(fn)=='function') 136return fn(field,rules,i,options);},_equals:function(field,rules,i,options){var equalsField=rules[i+1];if(field.val()!=$('#'+equalsField).val()) 137return options.allrules.equals.alertText;},_maxSize:function(field,rules,i,options){var max=rules[i+1];var len=field.val().length;if(len>max){var rule=options.allrules.maxSize;return rule.alertText+max+rule.alertText2;}},_minSize:function(field,rules,i,options){var min=rules[i+1];var len=field.val().length;if(len>0&&len<min){var rule=options.allrules.minSize;return rule.alertText+min+rule.alertText2;}},_min:function(field,rules,i,options){var min=parseFloat(rules[i+1]);var len=parseFloat(field.val());if(len<min){var rule=options.allrules.min;if(rule.alertText2)return rule.alertText+min+rule.alertText2;return rule.alertText+min;}},_max:function(field,rules,i,options){var max=parseFloat(rules[i+1]);var len=parseFloat(field.val());if(len>max){var rule=options.allrules.max;if(rule.alertText2)return rule.alertText+max+rule.alertText2;return rule.alertText+max;}},_past:function(form,field,rules,i,options){var p=rules[i+1];var fieldAlt=$(form.find('input[name="'+p.replace(/^#+/,'')+'"]'));var pdate;if(p.toLowerCase()=='now'){pdate=new Date();}else if(undefined!=fieldAlt.val()){if(fieldAlt.is(':disabled')) 138return;pdate=methods._parseDate(fieldAlt.val());}else{pdate=methods._parseDate(p);} 139var vdate=methods._parseDate(field.val());if(vdate>pdate){var rule=options.allrules.past;if(rule.alertText2)return rule.alertText+methods._dateToString(pdate)+rule.alertText2;return rule.alertText+methods._dateToString(pdate);}},_future:function(form,field,rules,i,options){var p=rules[i+1];var fieldAlt=$(form.find('input[name="'+p.replace(/^#+/,'')+'"]'));var pdate;if(p.toLowerCase()=='now'){pdate=new Date();}else if(undefined!=fieldAlt.val()){if(fieldAlt.is(':disabled')) 140return;pdate=methods._parseDate(fieldAlt.val());}else{pdate=methods._parseDate(p);} 141var vdate=methods._parseDate(field.val());if(vdate<pdate){var rule=options.allrules.future;if(rule.alertText2) 142return rule.alertText+methods._dateToString(pdate)+rule.alertText2;return rule.alertText+methods._dateToString(pdate);}},_isDate:function(value){var dateRegEx=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])$|^(?:(?:(?
142:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(?:(?:0?[1-9]|1[0-2])(\/|-)(?:0?[1-9]|1\d|2[0-8]))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^(0?2(\/|-)29)(\/|-)(?:(?:0[48]00|[13579][26]00|[2468][048]00)|(?:\d\d)?(?:0[48]|[2468][048]|[13579][26]))$/);return dateRegEx.test(value);},_isDateTime:function(value){var dateTimeRegEx=new RegExp(/^\d{4}[\/\-](0?[1-9]|1[012])[\/\-](0?[1-9]|[12][0-9]|3[01])\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1}$|^(?:(?:(?:0?[13578]|1[02])(\/|-)31)|(?:(?:0?[1,3-9]|1[0-2])(\/|-)(?:29|30)))(\/|-)(?:[1-9]\d\d\d|\d[1-9]\d\d|\d\d[1-9]\d|\d\d\d[1-9])$|^((1[012]|0?[1-9]){1}\/(0?[1-9]|[12][0-9]|3[01]){1}\/\d{2,4}\s+(1[012]|0?[1-9]){1}:(0?[1-5]|[0-6][0-9]){1}:(0?[0-6]|[0-6][0-9]){1}\s+(am|pm|AM|PM){1})$/);return dateTimeRegEx.test(value);},_dateCompare:function(start,end){return(new Date(start.toString())<new Date(end.toString()));},_dateRange:function(field,rules,i,options){if((!options.firstOfGroup[0].value&&options.secondOfGroup[0].value)||(options.firstOfGroup[0].value&&!options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;} 143if(!methods._isDate(options.firstOfGroup[0].value)||!methods._isDate(options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;} 144if(!methods._dateCompare(options.firstOfGroup[0].value,options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}},_dateTimeRange:function(field,rules,i,options){if((!options.firstOfGroup[0].value&&options.secondOfGroup[0].value)||(options.firstOfGroup[0].value&&!options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;} 145if(!methods._isDateTime(options.firstOfGroup[0].value)||!methods._isDateTime(options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;} 146if(!methods._dateCompare(options.firstOfGroup[0].value,options.secondOfGroup[0].value)){return options.allrules[rules[i]].alertText+options.allrules[rules[i]].alertText2;}},_maxCheckbox:function(form,field,rules,i,options){var nbCheck=rules[i+1];var groupname=field.attr('name');var groupSize=form.find('input[name="'+groupname+'"]:checked').size();if(groupSize>nbCheck){options.showArrow=false;if(options.allrules.maxCheckbox.alertText2) 147return options.allrules.maxCheckbox.alertText+' '+nbCheck+' '+options.allrules.maxCheckbox.alertText2;return options.allrules.maxCheckbox.alertText;}},_minCheckbox:function(form,field,rules,i,options){var nbCheck=rules[i+1];var groupname=field.attr('name');var groupSize=form.find('input[name="'+groupname+'"]:checked').size();if(groupSize<nbCheck){options.showArrow=false;return options.allrules.minReviews.alertText;}},_minReviews:function(form,field,rules,i,options){var nbCheck=rules[i+1];var groupname=field.attr('name');var groupSize=form.find('input[name="'+groupname+'"]:checked').size();if(groupSize<nbCheck){options.showArrow=false;return options.allrules.minReviews.alertText;}},_creditCard:function(field,rules,i,options){var valid=false,cardNumber=field.val().replace(/ +/g,'').replace(/-+/g,'');var numDigits=cardNumber.length;if(numDigits>=14&&numDigits<=16&&parseInt(cardNumber)>0){var sum=0,i=numDigits-1,pos=1,digit,luhn=new String();do{digit=parseInt(cardNumber.charAt(i));luhn+=(pos++%2==0)?digit*2:digit;}while(--i>=0) 148for(i=0;i<luhn.length;i++){sum+=parseInt(luhn.charAt(i));} 149valid=sum%10==0;} 150if(!valid)return options.allrules.creditCard.alertText;},_ajax:function(field,rules,i,options){var errorSelector=rules[i+1];var rule=options.allrules[errorSelector];var extraData=rule.extraData;var extraDataDynamic=rule.extraDataDynamic;var data={'fieldId':field.attr('id'),'fieldValue':field.val()};if(typeof extraData==='object'){$.extend(data,extraData);}else if(typeof extraData==='string'){var tempData=extraData.split('&');for(var i=0;i<tempData.length;i++){var values=tempData[i].split('=');if(values[0]&&values[0]){data[values[0]]=values[1];}}} 151if(extraDataDynamic){var tmpData=[];var domIds=String(extraDataDynamic).split(',');for(var i=0;i<domIds.length;i++){var id=domIds[i];if($(id).length){var inputValue=field.closest('form').find(id).val();var keyValue=id.replace('#','')+'='+escape(inputValue);data[id.replace('#','')]=inputValue;}}} 152if(options.eventTrigger=='field'){delete(options.ajaxValidCache[field.attr('id')]);} 153if(!options.isError&&!methods._checkAjaxFieldStatus(field.attr('id'),options)){$.ajax({type:options.ajaxFormValidationMethod,url:rule.url,cache:false,dataType:'json',data:data,field:field,rule:rule,methods:methods,options:options,beforeSend:function(){},error:function(data,transport){methods._ajaxError(data,transport);},success:function(json){var errorFieldId=json[0];var errorField=$('#'+errorFieldId).eq(0);if(errorField.length==1){var status=json[1];var msg=json[2];if(!status){options.ajaxValidCache[errorFieldId]=false;options.isError=true;if(msg){if(options.allrules[msg]){var txt=options.allrules[msg].alertText;if(txt){msg=txt;}}}else 154msg=rule.alertText;if(options.showPrompts)methods._showPrompt(errorField,msg,'',true,options);}else{options.ajaxValidCache[errorFieldId]=true;if(msg){if(options.allrules[msg]){var txt=options.allrules[msg].alertTextOk;if(txt){msg=txt;}}}else 155msg=rule.alertTextOk;if(options.showPrompts){if(msg) 156methods._showPrompt(errorField,msg,'pass',true,options);else 157methods._closePrompt(errorField);} 158if(options.eventTrigger=='submit') 159field.closest('form').submit();}} 160errorField.trigger('jqv.field.result',[errorField,options.isError,msg]);}});return rule.alertTextLoad;}},_ajaxError:function(data,transport){if(data.status==0&&transport==null){alert('The page is not served from a server! ajax call failed');}else if(typeof console!='undefined'){console.log('Ajax error: '+data.status+' '+transport);}},_dateToString:function(date){return date.getFullYear()+'-'+(date.getMonth()+1)+'-'+date.getDate();},_parseDate:function(d){var dateParts=d.split('-');if(dateParts==d) 161dateParts=d.split('/');return new Date(dateParts[0],(dateParts[1]-1),dateParts[2]);},_checkValidationGroup:function(field){var validationGroup=$(field).data('validation-group');var hasPrompt=false;if(typeof validationGroup!=='undefined'){var form=$(field).parents('form').eq(0);var validationGroupElements=form.find('[data-validation-group="'+validationGroup+'"]');$.each(validationGroupElements,function(){if($(form).find('.'+$(this).attr('id')+'formError').length>0){hasPrompt=true;return false;}});} 162return hasPrompt;},_showPrompt:function(field,promptText,type,ajaxed,options,ajaxform){if(methods._checkValidationGroup(field)===true){return;} 163var prompt=methods._getPrompt(field);if(ajaxform)prompt=false;if($.trim(promptText)){if(prompt) 164methods._updatePrompt(field,prompt,promptText,type,ajaxed,options);else 165methods._buildPrompt(field,promptText,type,ajaxed,options);}},_buildPrompt:function(field,promptText,type,ajaxed,options){var prompt=$('<div>');prompt.addClass(methods._getClassName(field.attr('id'))+'formError');prompt.addClass('parentForm'+methods._getClassName(field.parents('form').attr('id')));prompt.addClass('formError');switch(type){case'pass':prompt.addClass('greenPopup');break;case'load':prompt.addClass('blackPopup');break;default:} 166if(ajaxed) 167prompt.addClass('ajaxed');var promptContent=$('<div>').addClass('formErrorContent').html(promptText).appendTo(prompt);
167if(options.showArrow){var arrow=$('<div>').addClass('formErrorArrow');var positionType=field.data('promptPosition')||options.promptPosition;if(typeof(positionType)=='string'){var pos=positionType.indexOf(':');if(pos!=-1) 168positionType=positionType.substring(0,pos);switch(positionType){case'bottomLeft':case'bottomRight':prompt.find('.formErrorContent').before(arrow);arrow.addClass('formErrorArrowBottom').html('<div class="line1"><!-- --></div><div class="line2"><!-- --></div><div class="line3"><!-- --></div><div class="line4"><!-- --></div><div class="line5"><!-- --></div><div class="line6"><!-- --></div><div class="line7"><!-- --></div><div class="line8"><!-- --></div><div class="line9"><!-- --></div><div class="line10"><!-- --></div>');break;case'topLeftReverse':arrow.addClass('formErrorArrowRight').html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');prompt.append(arrow);break;case'topLeft':case'topRight':arrow.html('<div class="line10"><!-- --></div><div class="line9"><!-- --></div><div class="line8"><!-- --></div><div class="line7"><!-- --></div><div class="line6"><!-- --></div><div class="line5"><!-- --></div><div class="line4"><!-- --></div><div class="line3"><!-- --></div><div class="line2"><!-- --></div><div class="line1"><!-- --></div>');prompt.append(arrow);break;}}} 169if(options.addPromptClass) 170prompt.addClass(options.addPromptClass);prompt.css({'opacity':0,'position':'absolute'});field.before(prompt);var pos=methods._calculatePosition(field,prompt,options);prompt.css({'top':pos.callerTopPosition,'left':pos.callerleftPosition,'marginTop':pos.marginTopSize,'opacity':0}).data('callerField',field);if(options.autoHidePrompt){setTimeout(function(){prompt.animate({'opacity':0},function(){prompt.closest('.formErrorOuter').remove();prompt.remove();});},options.autoHideDelay);} 171return prompt.animate({'opacity':1});},_updatePrompt:function(field,prompt,promptText,type,ajaxed,options,noAnimation){if(prompt){if(typeof type!=='undefined'){if(type=='pass') 172prompt.addClass('greenPopup');else 173prompt.removeClass('greenPopup');if(type=='load') 174prompt.addClass('blackPopup');else 175prompt.removeClass('blackPopup');} 176if(ajaxed) 177prompt.addClass('ajaxed');else 178prompt.removeClass('ajaxed');prompt.find('.formErrorContent').html(promptText);var pos=methods._calculatePosition(field,prompt,options);var css={'top':pos.callerTopPosition,'left':pos.callerleftPosition,'marginTop':pos.marginTopSize};if(noAnimation) 179prompt.css(css);else 180prompt.animate(css);}},_closePrompt:function(field){var prompt=methods._getPrompt(field);if(prompt) 181prompt.fadeTo('fast',0,function(){prompt.parent('.formErrorOuter').remove();prompt.remove();});},closePrompt:function(field){return methods._closePrompt(field);},_getPrompt:function(field){var formId=$(field).closest('form').attr('id');var className=methods._getClassName(field.attr('id'))+'formError';var match=$('.'+methods._escapeExpression(className)+'.parentForm'+formId)[0];if(match) 182return $(match);},_escapeExpression:function(selector){return selector.replace(/([#;&,\.\+\*\~':"\!\^$\[\]\(\)=>\|])/g,"\\$1");},isRTL:function(field){var $document=$(document);var $body=$('body');var rtl=(field&&field.hasClass('rtl'))||(field&&(field.attr('dir')||'').toLowerCase()==='rtl')||$document.hasClass('rtl')||($document.attr('dir')||'').toLowerCase()==='rtl'||$body.hasClass('rtl')||($body.attr('dir')||'').toLowerCase()==='rtl';return Boolean(rtl);},_calculatePosition:function(field,promptElmt,options){var promptTopPosition,promptleftPosition,marginTopSize;var fieldWidth=field.width();var fieldLeft=field.position().left;var fieldTop=field.position().top;var fieldHeight=field.height();var promptHeight=promptElmt.height();promptTopPosition=promptleftPosition=0;marginTopSize=-promptHeight;var positionType=field.data('promptPosition')||options.promptPosition;var shift1='';var shift2='';var shiftX=0;var shiftY=0;if(typeof(positionType)=='string'){if(positionType.indexOf(':')!=-1){shift1=positionType.substring(positionType.indexOf(':')+1);positionType=positionType.substring(0,positionType.indexOf(':'));if(shift1.indexOf(',')!=-1){shift2=shift1.substring(shift1.indexOf(',')+1);shift1=shift1.substring(0,shift1.indexOf(','));shiftY=parseInt(shift2);if(isNaN(shiftY))shiftY=0;} 183shiftX=parseInt(shift1);if(isNaN(shift1))shift1=0;}}
184switch(positionType){default:case'topRight':promptleftPosition+=fieldLeft+fieldWidth-30;promptTopPosition+=fieldTop;break;case'topLeft':promptTopPosition+=fieldTop;promptleftPosition+=fieldLeft;break;case'topLeftReverse':promptTopPosition+=fieldTop;promptleftPosition+=fieldLeft+field.outerWidth(true)+4-promptElmt.width();break;case'centerRight':promptTopPosition=fieldTop+4;marginTopSize=0;promptleftPosition=fieldLeft+field.outerWidth(true)+5;break;case'centerLeft':promptleftPosition=fieldLeft-(promptElmt.width()+2);promptTopPosition=fieldTop+4;marginTopSize=0;break;case'bottomLeft':promptTopPosition=fieldTop+field.height()+5;marginTopSize=0;promptleftPosition=fieldLeft;break;case'bottomRight':promptleftPosition=fieldLeft+fieldWidth-30;promptTopPosition=fieldTop+field.height()+5;marginTopSize=0;} 185promptleftPosition+=shiftX;promptTopPosition+=shiftY;return{'callerTopPosition':promptTopPosition+'px','callerleftPosition':promptleftPosition+'px','marginTopSize':marginTopSize+'px'};},_saveOptions:function(form,options){if(window.validationRules) 186var allRules=window.validationRules;else 187$.error('jQuery.validationEngine rules are not loaded, plz add localization files to the page');$.validationEngine.defaults.allrules=allRules;var userOptions=$.extend(true,{},$.validationEngine.defaults,options);form.data('jqv',userOptions);return userOptions;},_getClassName:function(className){if(className) 188return className.replace(/:/g,"_").replace(/\./g,"_");},_jqSelector:function(str){return str.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,'\\$1');},_condRequired:function(field,rules,i,options){var idx,dependingField;for(idx=(i+1);idx<rules.length;idx++){dependingField=jQuery('#'+rules[idx]).first();if(dependingField.length&&methods._required(dependingField,['required'],0,options,true)==undefined){return methods._required(field,['required'],0,options);}}}};$.fn.validationEngine=function(method){var form=$(this);if(!form[0])return form;if(typeof(method)=='string'&&method.charAt(0)!='_'&&methods[method]){if(method!='showPrompt'&&method!='hide'&&method!='hideAll') 189methods.init.apply(form);return methods[method].apply(form,Array.prototype.slice.call(arguments,1));}else if(typeof method=='object'||!method){methods.init.apply(form,arguments);return methods.attach.apply(form);}else{$.error('Method '+method+' does not exist in jQuery.validationEngine');}};$.validationEngine={fieldIdCounter:0,defaults:{validationEventTrigger:'blur',scroll:false,focusFirstField:true,showPrompts:true,promptPosition:'topRight',bindMethod:'live',inlineAjax:false,ajaxFormValidation:false,ajaxFormValidationURL:false,ajaxFormValidationMethod:'get',onAjaxFormComplete:$.noop,onBeforeAjaxFormValidation:$.noop,onValidationComplete:false,doNotShowAllErrosOnSubmit:false,custom_error_messages:{},binded:true,showArrow:true,isError:false,maxErrorsPerField:false,ajaxValidCache:{},autoPositionUpdate:true,InvalidFields:[],onFieldSuccess:false,onFieldFailure:false,onSuccess:false,onFailure:false,validateAttribute:'class',addSuccessCssClassToField:false,addFailureCssClassToField:false,autoHidePrompt:false,autoHideDelay:5000,fadeDuration:0.3,prettySelect:false,addPromptClass:'',usePrefix:'',useSuffix:'',showOneMessage:false}};$(function(){$.validationEngine.defaults.promptPosition=methods.isRTL()?'topLeft':'topRight'});})(jQuery); 190var InlineLabel=function(){var _applyInlineLabel=function(){$(document).find('input, textarea').placeholder({customClass:'placeholder-polyfill'});$(window).unbind('beforeunload.placeholder');};(function initialize(){if(Modernizr&&Modernizr.placeholder===false){$(function(){_applyInlineLabel();});}})();};new InlineLabel(); 191$.fn.setCursorPosition=function(pos){if($(this).get(0).setSelectionRange){$(this).get(0).setSelectionRange(pos,pos);}else if($(this).get(0).createTextRange){var range=$(this).get(0).createTextRange();range.collapse(true);range.moveEnd('character',pos);range.moveStart('character',pos);range.select();}}; 192/* 193 * jQuery UI Autocomplete Accent Folding Extension 194 * 195 * Copyright 2010, Scott González (http://scottgonzalez.com) 196 * Dual licensed under the MIT or GPL Version 2 licenses. 197 * 198 * http://github.com/scottgonzalez/jquery-ui-extensions 199 */ 200(function( $ ) { 201 202var autocomplete = $.ui.autocomplete; 203 204autocomplete.accentFolding = { 205 map: { 206 "áº": "a", 207 "Ã": "a", 208 "á": "a", 209 "Ã": "a", 210 "à ": "a", 211 "Ä": "a", 212 "Ä": "a", 213 "Ắ": "a", 214 "ắ": "a", 215 "Ằ": "a", 216 "ằ": "a", 217 "Ẵ": "a", 218 "ẵ": "a", 219 "Ẳ": "a", 220 "ẳ": "a", 221 "Ã": "a", 222 "â": "a", 223 "Ấ": "a", 224 "ấ": "a", 225 "Ầ": "a", 226 "ầ": "a", 227 "Ẫ": "a", 228 "ẫ": "a", 229 "Ẩ": "a", 230 "ẩ": "a", 231 "Ç": "a", 232 "Ç": "a", 233 "à ": "a",
234 "Ã¥": "a", 235 "Ǻ": "a", 236 "Ç»": "a", 237 "Ã": "a", 238 "ä": "a", 239 "Ç": "a", 240 "Ç": "a", 241 "Ã": "a", 242 "ã": "a", 243 "Ȧ": "a", 244 "ȧ": "a", 245 "Ç ": "a", 246 "Ç¡": "a", 247 "Ä": "a", 248 "Ä ": "a", 249 "Ä": "a", 250 "Ä": "a", 251 "Ả": "a", 252 "ả": "a", 253 "È": "a", 254 "È": "a", 255 "È": "a", 256 "È": "a", 257 "Ạ": "a", 258 "ạ": "a", 259 "Ặ": "a", 260 "ặ": "a", 261 "Ậ": "a", 262 "áº": "a", 263 "á¸": "a", 264 "á¸": "a", 265 "Ⱥ": "a", 266 "â±¥": "a", 267 "Ǽ": "a", 268 "ǽ": "a", 269 "Ç¢": "a", 270 "Ç£": "a", 271 "á¸": "b", 272 "á¸": "b", 273 "á¸": "b", 274 "Ḡ": "b", 275 "á¸": "b", 276 "á¸": "b", 277 "É": "b", 278 "Æ": "b", 279 "ᵬ": "b", 280 "Æ": "b", 281 "É": "b", 282 "Æ": "b", 283 "Æ": "b", 284 "Ä": "c", 285 "Ä": "c", 286 "Ä": "c", 287 "Ä": "c", 288 "Ä": "c", 289 "Ä": "c", 290 "Ä": "c", 291 "Ä": "c", 292 "Ã": "c", 293 "ç": "c", 294 "á¸": "c", 295 "á¸": "c", 296 "È»": "c", 297 "ȼ": "c", 298 "Æ": "c", 299 "Æ": "c", 300 "É": "c", 301 "Ä": "d", 302 "Ä": "d", 303 "á¸": "d", 304 "á¸": "d", 305 "á¸": "d", 306 "á¸": "d", 307 "á¸": "d", 308 "á¸": "d", 309 "á¸": "d", 310 "á¸": "d", 311 "á¸": "d", 312 "á¸": "d", 313 "Ä": "d", 314 "Ä": "d", 315 "áµ": "d", 316 "Æ": "d", 317 "É": "d", 318 "Æ": "d", 319 "É": "d", 320 "Æ": "d", 321 "Æ": "d", 322 "È¡": "d", 323 "ð": "d", 324 "Ã": "e", 325 "Æ": "e", 326 "Æ": "e", 327 "Ç": "e", 328 "é": "e", 329 "Ã": "e", 330 "è": "e", 331 "Ä": "e", 332 "Ä": "e", 333 "Ã": "e", 334 "ê": "e", 335 "Ế": "e", 336 "ế": "e", 337 "á»": "e", 338 "á»": "e", 339 "á»": "e", 340 "á» ": "e", 341 "á»": "e", 342 "á»": "e", 343 "Ä": "e", 344 "Ä": "e", 345 "Ã": "e", 346 "ë": "e", 347 "Ẽ": "e", 348 "ẽ": "e", 349 "Ä": "e", 350 "Ä": "e", 351 "Ȩ": "e", 352 "È©": "e", 353 "á¸": "e", 354 "á¸": "e", 355 "Ä": "e", 356 "Ä": "e", 357 "Ä": "e", 358 "Ä": "e", 359 "á¸": "e", 360 "á¸": "e", 361 "á¸": "e", 362 "á¸": "e", 363 "Ẻ": "e", 364 "ẻ": "e", 365 "È": "e", 366 "È ": "e", 367 "È": "e", 368 "È": "e", 369 "Ẹ": "e", 370 "ẹ": "e", 371 "á»": "e", 372 "á»": "e", 373 "á¸": "e", 374 "á¸": "e", 375 "á¸": "e", 376 "á¸": "e", 377 "É": "e", 378 "É": "e", 379 "É": "e", 380 "É": "e", 381 "á¸": "f", 382 "á¸": "f", 383 "áµ®": "f", 384 "Æ": "f", 385 "Æ": "f", 386 "Ç´": "g", 387 "ǵ": "g", 388 "Ä": "g", 389 "Ä": "g", 390 "Ä": "g", 391 "Ä": "g", 392 "Ǧ": "g", 393 "ǧ": "g", 394 "Ä ": "g", 395 "Ä¡": "g", 396 "Ä¢": "g", 397 "Ä£": "g", 398 "Ḡ": "g", 399 "ḡ": "g", 400 "Ǥ": "g", 401 "Ç¥": "g", 402 "Æ": "g", 403 "É ": "g", 404 "Ĥ": "h", 405 "Ä¥": "h", 406 "È": "h", 407 "È": "h", 408 "Ḧ": "h", 409 "ḧ": "h", 410 "Ḣ": "h", 411 "ḣ": "h", 412 "Ḩ": "h", 413 "ḩ": "h", 414 "Ḥ": "h", 415 "ḥ": "h", 416 "Ḫ": "h", 417 "ḫ": "h", 418 "H": "h", 419 "̱": "h", 420 "áº": "h", 421 "Ħ": "h", 422 "ħ": "h", 423 "â±§": "h", 424 "ⱨ": "h", 425 "Ã": "i", 426 "Ã": "i", 427 "Ã": "i", 428 "ì": "i", 429 "Ĭ": "i", 430 "Ä": "i", 431 "Ã": "i", 432 "î": "i", 433 "Ç": "i", 434 "Ç": "i", 435 "Ã": "i", 436 "ï": "i", 437 "Ḯ": "i", 438 "ḯ": "i", 439 "Ĩ": "i", 440 "Ä©": "i", 441 "İ": "i", 442 "i": "i", 443 "Ä®": "i", 444 "į": "i",
445 "Ī": "i", 446 "Ä«": "i", 447 "á»": "i", 448 "á»": "i", 449 "È": "i", 450 "È": "i", 451 "È": "i", 452 "È": "i", 453 "á»": "i", 454 "á»": "i", 455 "Ḭ": "i", 456 "á¸": "i", 457 "I": "i", 458 "ı": "i", 459 "Æ": "i", 460 "ɨ": "i", 461 "Ä´": "j", 462 "ĵ": "j", 463 "J": "j", 464 "Ì": "j", 465 "ǰ": "j", 466 "È·": "j", 467 "É": "j", 468 "É": "j", 469 "Ê": "j", 470 "É": "j", 471 "Ê": "j", 472 "Ḱ": "k", 473 "ḱ": "k", 474 "Ǩ": "k", 475 "Ç©": "k", 476 "Ķ": "k", 477 "Ä·": "k", 478 "Ḳ": "k", 479 "ḳ": "k", 480 "Ḵ": "k", 481 "ḵ": "k", 482 "Æ": "k", 483 "Æ": "k", 484 "Ⱪ": "k", 485 "ⱪ": "k", 486 "Ĺ": "a", 487 "ĺ": "l", 488 "Ľ": "l", 489 "ľ": "l", 490 "Ä»": "l", 491 "ļ": "l", 492 "Ḷ": "l", 493 "ḷ": "l", 494 "Ḹ": "l", 495 "ḹ": "l", 496 "Ḽ": "l", 497 "ḽ": "l", 498 "Ḻ": "l", 499 "ḻ": "l", 500 "Å": "l", 501 "Å": "l", 502 "Å": "l", 503 "Ì£": "l", 504 "Å": "l", 505 "Ì£": "l", 506 "Ä¿": "l", 507 "Å": "l", 508 "Ƚ": "l", 509 "Æ": "l", 510 "â± ": "l", 511 "ⱡ": "l", 512 "â±¢": "l", 513 "É«": "l", 514 "ɬ": "l", 515 "É": "l", 516 "È´": "l", 517 "Ḿ": "m", 518 "ḿ": "m", 519 "á¹": "m", 520 "á¹": "m", 521 "á¹": "m", 522 "á¹": "m", 523 "ɱ": "m", 524 "Å": "n", 525 "Å": "n", 526 "Ǹ": "n", 527 "ǹ": "n", 528 "Å": "n", 529 "Å": "n", 530 "Ã": "n", 531 "ñ": "n", 532 "á¹": "n", 533 "á¹ ": "n", 534 "Å ": "n", 535 "Å": "n", 536 "á¹": "n", 537 "á¹": "n", 538 "á¹": "n", 539 "á¹": "n", 540 "á¹": "n", 541 "á¹": "n", 542 "Æ": "n", 543 "ɲ": "n", 544 "È ": "n", 545 "Æ": "n", 546 "ɳ": "n", 547 "ȵ": "n", 548 "N": "n", 549 "Ì": "n", 550 "n": "n", 551 "Ì": "n", 552 "Ã": "o", 553 "ó": "o", 554 "Ã": "o", 555 "ò": "o", 556 "Å": "o", 557 "Å": "o", 558 "Ã": "o", 559 "ô": "o", 560 "á»": "o", 561 "á»": "o", 562 "á»": "o", 563 "á»": "o", 564 "á»": "o", 565 "á»": "o", 566 "á»": "o", 567 "á»": "o", 568 "Ç": "o", 569 "Ç": "o", 570 "Ã": "o", 571 "ö": "o", 572 "Ȫ": "o", 573 "È«": "o", 574 "Å": "o", 575 "Å": "o", 576 "Ã": "o", 577 "õ": "o", 578 "á¹": "o", 579 "á¹": "o", 580 "á¹": "o", 581 "á¹": "o", 582 "Ȭ": "o", 583 "È": "o", 584 "È®": "o", 585 "ȯ": "o", 586 "Ȱ": "o", 587 "ȱ": "o", 588 "Ã": "o", 589 "ø": "o", 590 "Ǿ": "o", 591 "Ç¿": "o", 592 "Ǫ": "o", 593 "Ç«": "o", 594 "Ǭ": "o", 595 "Ç": "o", 596 "Å": "o", 597 "Å": "o", 598 "á¹": "o", 599 "á¹": "o", 600 "á¹": "o", 601 "á¹": "o", 602 "á»": "o", 603 "á»": "o", 604 "È": "o", 605 "È": "o", 606 "È": "o", 607 "È": "o", 608 "Æ ": "o", 609 "Æ¡": "o", 610 "á»": "o", 611 "á»": "o", 612 "á»": "o", 613 "á»": "o", 614 "á» ": "o", 615 "ỡ": "o", 616 "á»": "o", 617 "á»": "o", 618 "Ợ": "o", 619 "ợ": "o", 620 "á»": "o", 621 "á»": "o", 622 "á»": "o", 623 "á»": "o", 624 "Æ": "o", 625 "ɵ": "o", 626 "á¹": "p", 627 "á¹": "p", 628 "á¹": "p", 629 "á¹": "p", 630 "â±£": "p", 631 "Ƥ": "p", 632 "Æ¥": "p", 633 "P": "p", 634 "Ì": "p", 635 "p": "p", 636 "Ì": "p", 637 "Ê ": "q", 638 "É": "q", 639 "É": "q", 640 "Å": "r", 641 "Å": "r", 642 "Å": "r", 643 "Å": "r", 644 "á¹": "r", 645 "á¹": "r", 646 "Å": "r", 647 "Å": "r", 648 "È": "r", 649 "È": "r", 650 "È": "r", 651 "È": "r", 652 "á¹": "r", 653 "á¹": "r", 654 "á¹": "r", 655 "á¹": "r", 656 "á¹": "r", 657 "á¹": "r", 658 "É": "r", 659 "É": "r", 660 "áµ²": "r", 661 "ɼ": "r", 662 "Ɽ": "r", 663 "ɽ": "r", 664 "ɾ": "r", 665 "áµ³": "r", 666 "Ã": "s", 667 "Å": "s", 668 "Å": "s", 669 "Ṥ": "s", 670 "á¹¥": "s", 671 "Å": "s", 672 "Å": "s", 673 "Å ": "s", 674 "Å¡": "s", 675 "Ṧ": "s", 676 "á¹§": "s", 677 "á¹ ": "s", 678 "ṡ": "s", 679 "áº": "s", 680 "Å": "s", 681 "Å": "s", 682 "á¹¢": "s", 683 "á¹£": "s", 684 "Ṩ": "s", 685 "ṩ": "s", 686 "È": "s", 687 "È": "s", 688 "Ê": "s", 689 "S": "s", 690 "Ì©": "s", 691 "s": "s", 692 "Ì©": "s", 693 "Ã": "t", 694 "þ": "t", 695 "Ť": "t", 696 "Å¥": "t", 697 "T": "t", 698 "Ì": "t", 699 "áº": "t", 700 "Ṫ": "t", 701 "ṫ": "t", 702 "Å¢": "t", 703 "Å£": "t", 704 "Ṭ": "t", 705 "á¹": "t", 706 "È": "t", 707 "È": "t", 708 "á¹°": "t", 709 "á¹±": "t", 710 "á¹®": "t", 711 "ṯ": "t", 712 "Ŧ": "t", 713 "ŧ": "t", 714 "Ⱦ": "t", 715 "ⱦ": "t", 716 "áµµ": "t", 717 "Æ«": "t", 718 "Ƭ": "t", 719 "Æ": "t", 720 "Æ®": "t", 721 "Ê": "t", 722 "ȶ": "t", 723 "Ã": "u", 724 "ú": "u", 725 "Ã": "u", 726 "ù": "u", 727 "Ŭ": "u", 728 "Å": "u", 729 "Ã": "u", 730 "û": "u", 731 "Ç": "u", 732 "Ç": "u", 733 "Å®": "u", 734 "ů": "u", 735 "Ã": "u", 736 "ü": "u", 737 "Ç": "u", 738 "Ç": "u", 739 "Ç": "u", 740 "Ç": "u", 741 "Ç": "u", 742 "Ç": "u", 743 "Ç": "u", 744 "Ç": "u", 745 "Ű": "u", 746 "ű": "u", 747 "Ũ": "u", 748 "Å©": "u", 749 "Ṹ": "u", 750 "á¹¹": "u", 751 "Ų": "u", 752 "ų": "u", 753 "Ū": "u", 754 "Å«": "u", 755 "Ṻ": "u", 756 "á¹»": "u", 757 "Ủ": "u", 758 "á»§": "u", 759 "È": "u", 760 "È": "u", 761 "È": "u", 762 "È": "u", 763 "Ư": "u", 764 "ư": "u", 765 "Ứ": "u", 766 "ứ": "u", 767 "Ừ": "u", 768 "ừ": "u", 769 "á»®": "u", 770 "ữ": "u", 771 "Ử": "u", 772 "á»": "u", 773 "á»°": "u", 774 "á»±": "u", 775 "Ụ": "u", 776 "ụ": "u", 777 "á¹²": "u", 778 "á¹³": "u", 779 "á¹¶": "u", 780 "á¹·": "u", 781 "á¹´": "u", 782 "á¹µ": "u", 783 "É": "u", 784 "Ê": "u", 785 "á¹¼": "v", 786 "á¹½": "v", 787 "á¹¾": "v", 788 "ṿ": "v", 789 "Ʋ": "v", 790 "Ê": "v", 791 "áº": "w", 792 "áº": "w", 793 "áº": "w", 794 "áº": "w", 795 "Å´": "w", 796 "ŵ": "w", 797 "W": "w", 798 "Ì": "w", 799 "áº": "w", 800 "áº": "w", 801 "Ạ": "w", 802 "áº": "w", 803 "áº": "w", 804 "áº": "w", 805 "áº": "w", 806 "áº": "x", 807 "áº": "x", 808 "áº": "x", 809 "áº": "x", 810 "Ã": "y", 811 "ý": "y", 812 "Ỳ": "y", 813 "ỳ": "y", 814 "Ŷ": "y", 815 "Å·": "y", 816 "Y": "y", 817 "Ì": "y", 818 "áº": "y", 819 "Ÿ": "y", 820 "ÿ": "y", 821 "Ỹ": "y", 822 "ỹ": "y", 823 "áº": "y", 824 "áº": "y",
825 "Ȳ": "y", 826 "ȳ": "y", 827 "á»¶": "y", 828 "á»·": "y", 829 "á»´": "y", 830 "ỵ": "y", 831 "Ê": "y", 832 "É": "y", 833 "É": "y", 834 "Ƴ": "y", 835 "Æ´": "y", 836 "Ź": "z", 837 "ź": "z", 838 "áº": "z", 839 "áº": "z", 840 "Ž": "z", 841 "ž": "z", 842 "Å»": "z", 843 "ż": "z", 844 "áº": "z", 845 "áº": "z", 846 "áº": "z", 847 "áº": "z", 848 "Ƶ": "z", 849 "ƶ": "z", 850 "Ȥ": "z", 851 "È¥": "z", 852 "Ê": "z", 853 "Ê": "z", 854 "Ⱬ": "z", 855 "ⱬ": "z", 856 "Ç®": "z", 857 "ǯ": "z", 858 "ƺ": "z", 859 "ï¼": "2", 860 "ï¼": "6", 861 "ï¼¢": "B", 862 "F": "F", 863 "J": "J", 864 "ï¼®": "N", 865 "ï¼²": "R", 866 "ï¼¶": "V", 867 "Z": "Z", 868 "ï½": "b", 869 "ï½": "f", 870 "ï½": "j", 871 "ï½": "n", 872 "ï½": "r", 873 "ï½": "v", 874 "ï½": "z", 875 "ï¼": "1", 876 "ï¼": "5", 877 "ï¼": "9", 878 "A": "A", 879 "ï¼¥": "E", 880 "I": "I", 881 "ï¼": "M", 882 "ï¼±": "Q", 883 "ï¼µ": "U", 884 "ï¼¹": "Y", 885 "ï½": "a", 886 "ï½ ": "e", 887 "ï½": "i", 888 "ï½": "m", 889 "ï½": "q", 890 "ï½": "u", 891 "ï½": "y", 892 "ï¼": "0", 893 "ï¼": "4", 894 "ï¼": "8", 895 "D": "D", 896 "H": "H", 897 "L": "L", 898 "ï¼°": "P", 899 "ï¼´": "T", 900 "X": "X", 901 "ï½": "d", 902 "ï½": "h", 903 "ï½": "l", 904 "ï½": "p", 905 "ï½": "t", 906 "ï½": "x", 907 "ï¼": "3", 908 "ï¼": "7", 909 "ï¼£": "C", 910 "ï¼§": "G", 911 "K": "K", 912 "O": "O", 913 "ï¼³": "S", 914 "ï¼·": "W", 915 "ï½": "c", 916 "ï½": "g", 917 "ï½": "k", 918 "ï½": "o", 919 "ï½": "s", 920 "ï½": "w" 921 }, 922 923 fold: function( term ) { 924 var ret = ""; 925 for ( var i = 0; i < term.length; i++ ) { 926 ret += this.map[ term.charAt(i) ] || term.charAt(i); 927 } 928 return ret; 929 } 930}; 931 932var _initSource = autocomplete.prototype._initSource; 933autocomplete.prototype._initSource = function() { 934 var source = this.options.source; 935 if ( $.isArray(source) ) { 936 this.source = function( request, response ) { 937 var matcher = new RegExp( autocomplete.escapeRegex( request.term ), "i" ); 938 response( $.grep( source, function( value ) { 939 value = value.label || value.value || value; 940 return matcher.test( value ) || 941 matcher.test( autocomplete.accentFolding.fold( value ) ); 942 }) ); 943 }; 944 } else { 945 return _initSource.call( this ); 946 } 947}; 948 949})( jQuery ); 950function showBox(){$('#FlexSky, #FlexSky *, #FlexTop, #FlexTop *').css('z-index','auto');var w=$(document).width(),h=$(document).height();$('#overlay').width(w).height(h);$('#overlay, #overlayframe, #overlaybox').css("cssText","display: block !important;");$('html, body').animate({scrollTop:0},0);$('#overlay, #overlayframe').css('top','0px');$('#overlaybox').css('top','300px');return false;} 951function hideBox(){$('#box, #overlaybox, #overlay').hide();return false;} 952if(!Array.prototype.forEach){Array.prototype.forEach=function(callback,thisArg){var T,k;if(this==null){throw new TypeError(' this is null or not defined');} 953var O=Object(this);var len=O.length>>>0;if(typeof callback!=="function"){throw new TypeError(callback+' is not a function');} 954if(arguments.length>1){T=thisArg;} 955k=0;while(k<len){var kValue;if(k in O){kValue=O[k];callback.call(T,kValue,k,O);} 956k++;}};} 957function createCustomerBox(){var $box=$('#bookingpageCustomerBox'),$customerBoxContent=$('#sbCustomer').find('p'),$passengerBoxContent=$('#sbPassenger');if($box.length){$customerBoxContent.empty();$passengerBoxContent.empty();var $customer=$('#ibeBookingCustomer, #customerDiv'),$passenger=$('#ibeBookingTraveller, #travellersBox').find('.js-traveller-box'),$selCustomer=$('input[name!="ibeBookingInput\\[customer\\]\\[email_check\\]"], select',$customer),$list={customer:{},passengers:{}};$selCustomer.each(function(){var $this=$(this),inp=$this.is('input')?$this.val():$this.find(':selected').text(),prop=$(this).prop('name');if(prop){prop=prop.split('][')[1].split(']')[0];if(inp!==''&&inp!==null){$list.customer[prop]=inp;}}});var customerName=$list.customer.title+' '+$list.customer.firstName+' '+$list.customer.lastName,customerData=[$list.customer.street+' '+$list.customer.streetNumber,$list.customer.zipCode+' '+$list.customer.city,$list.customer.country,'','E-Mail: '+$list.customer.email,'Telefon: '+$list.customer.telPrivateCountryCode.slice(0,4)+' '+$list.customer.telPrivateAreaCode+' '+$list.customer.telPrivate];$passenger.each(function(i){var $this=$(this),index=i;$list.passengers[index]={};$('input,select',$this).each(function(){var $this=$(this),inp='',prop=$this.prop('name');if(prop){prop=prop.split('][')[2].split(']')[0];if($this.is('input')||$this.is('select[name*="paxBirthdayMonth"]')){inp=$this.val();}else{inp=$this.find(':selected').text();} 958if(inp!==''&&inp!==null){$list.passengers[index][prop]=inp;}}});var passengerData=[$list.passengers[index].paxTitle+' '+$list.passengers[index].paxFirstName+' '+$list.passengers[index].paxLastName,'Geburtsdatum: '+$list.passengers[index].paxBirthdayDay+'.'+$list.passengers[index].paxBirthdayMonth+'.'+$list.passengers[index].paxBirthdayYear];$passengerBoxContent.append('<p></p>');$.each(passengerData,function(i,v){if(i<1){$passengerBoxContent.find('p:last').append('<div class="sb-label">'+v+'</div>');}else{$passengerBoxContent.find('p:last').append('<div>'+v+'</div>');}});});
958$customerBoxContent.prepend('<div class="bold">'+customerName+'</div>');$.each(customerData,function(i,v){$customerBoxContent.append('<div>'+v+'<br/></div>');});}} 959(function($){$.airlineShuffle={airlines:['EI','SU','AV','AB','KM','AP','AZ','AA','OS','BD','BA','V3','XK','DE','OU','DL','EK','EY','BR','BE','IB','3L','LH','LG','MH','IG','HG','QR','AT','SN','LX','TP','HV','X3','TU','TK','VS','VY'],shuffle:function(o){for(var j,x,i=o.length;i;j=parseInt(Math.random()*i,10),x=o[--i],o[i]=o[j],o[j]=x);return o;},loadItems:function(carousel,selector){carousel.forEach(function(entry){$(selector).append('<div class="airlinesL AL_'+entry+'"></div>');});},init:function(selector){$.airlineShuffle.airlines=$.airlineShuffle.shuffle($.airlineShuffle.airlines);$.airlineShuffle.loadItems($.airlineShuffle.airlines,selector);$(selector).bxSlider({speed:1500,slideMargin:30,pager:false,controls:false,auto:true,pause:1000,maxSlides:4,moveSlides:1,slideWidth:120});}};}(jQuery));(function($){$.cachedScript=function(url,options){options=$.extend(options||{},{dataType:'script',cache:true,url:url});return $.ajax(options);};})(jQuery);(function($){$('input.nopaste').bind('paste',function(){return false;});})(jQuery);Date.prototype.format=function(a){for(var b="",e=Date.replaceChars,a=a.replace("#","\\"),c=0;c<a.length;c++){var d=a.charAt(c);0<=c-1&&"\\"==a.charAt(c-1)?b+=d:e[d]?b+=e[d].call(this):"\\"!=d&&(b+=d)} 960return b};Date.replaceChars={shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),longMonths:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortDays:"So,Mo,Di,Mi,Do,Fr,Sa".split(","),longDays:"Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag".split(","),d:function(){return(10>this.getDate()?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return 1==this.getDate()%10&&11!=this.getDate()?"st":2==this.getDate()%10&&12!=this.getDate()?"nd":3==this.getDate()%10&&13!=this.getDate()?"rd":"th"},w:function(){return this.getDay()},z:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil((this-a)/864E5)},W:function(){var a=new Date(this.getFullYear(),0,1);return Math.ceil(((this-a)/864E5+a.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(9>this.getMonth()?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var a=new Date;return(new Date(a.getFullYear(),a.getMonth(),0)).getDate()},L:function(){var a=this.getFullYear();return 0==a%400||0!=a%100&&0==a%4},o:function(){var a=new Date(this.valueOf());a.setDate(a.getDate()-(this.getDay()+6)%7+3);return a.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return 12>this.getHours()?"am":"pm"},A:function(){return 12>this.getHours()?"AM":"PM"},B:function(){return Math.floor(1E3*((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return(10>(this.getHours()%12||12)?"0":"")+(this.getHours()%12||12)},H:function(){return(10>this.getHours()?"0":"")+this.getHours()},i:function(){return(10>this.getMinutes()?"0":"")+this.getMinutes()},s:function(){return(10>this.getSeconds()?"0":"")+this.getSeconds()},u:function(){var a=this.getMilliseconds();return(10>a?"00":100>a?"0":"")+a},e:function(){return"Not Yet Supported"},I:function(){return"Not Yet Supported"},O:function(){return(0>-this.getTimezoneOffset()?"-":"+")+(10>Math.abs(this.getTimezoneOffset()/60)?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(0>-this.getTimezoneOffset()?"-":"+")+(10>Math.abs(this.getTimezoneOffset()/60)?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var a=this.getMonth();this.setMonth(0);
960var b=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(a);return b},Z:function(){return 60*-this.getTimezoneOffset()},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1E3}};var JSON=JSON||{};(function(){function f(n){return n<10?'0'+n:n} 961if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(a){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+f(this.getUTCMonth()+1)+'-'+f(this.getUTCDate())+'T'+f(this.getUTCHours())+':'+f(this.getUTCMinutes())+':'+f(this.getUTCSeconds())+'Z':null};String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(a){return this.valueOf()}} 962var e=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'},rep;function quote(b){escapable.lastIndex=0;return escapable.test(b)?'"'+b.replace(escapable,function(a){var c=meta[a];return typeof c==='string'?c:'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+b+'"'} 963function str(a,b){var i,k,v,length,mind=gap,partial,value=b[a];if(value&&typeof value==='object'&&typeof value.toJSON==='function'){value=value.toJSON(a)} 964if(typeof rep==='function'){value=rep.call(b,a,value)} 965switch(typeof value){case'string':return quote(value);case'number':return isFinite(value)?String(value):'null';case'boolean':case'null':return String(value);case'object':if(!value){return'null'} 966gap+=indent;partial=[];if(Object.prototype.toString.apply(value)==='[object Array]'){length=value.length;for(i=0;i<length;i+=1){partial[i]=str(i,value)||'null'} 967v=partial.length===0?'[]':gap?'[\n'+gap+partial.join(',\n'+gap)+'\n'+mind+']':'['+partial.join(',')+']';gap=mind;return v} 968if(rep&&typeof rep==='object'){length=rep.length;for(i=0;i<length;i+=1){k=rep[i];if(typeof k==='string'){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}}else{for(k in value){if(Object.hasOwnProperty.call(value,k)){v=str(k,value);if(v){partial.push(quote(k)+(gap?': ':':')+v)}}}} 969v=partial.length===0?'{}':gap?'{\n'+gap+partial.join(',\n'+gap)+'\n'+mind+'}':'{'+partial.join(',')+'}';gap=mind;return v}} 970if(typeof JSON.stringify!=='function'){JSON.stringify=function(a,b,c){var i;gap='';indent='';if(typeof c==='number'){for(i=0;i<c;i+=1){indent+=' '}}else if(typeof c==='string'){indent=c} 971rep=b;if(b&&typeof b!=='function'&&(typeof b!=='object'||typeof b.length!=='number')){throw new Error('JSON.stringify');} 972return str('',{'':a})}} 973if(typeof JSON.parse!=='function'){JSON.parse=function(c,d){var j;function walk(a,b){var k,v,value=a[b];if(value&&typeof value==='object'){for(k in value){if(Object.hasOwnProperty.call(value,k)){v=walk(value,k);if(v!==undefined){value[k]=v}else{delete value[k]}}}} 974return d.call(a,b,value)} 975e.lastIndex=0;if(e.test(c)){c=c.replace(e,function(a){return'\\u'+('0000'+a.charCodeAt(0).toString(16)).slice(-4)})} 976if(/^[\],:{}\s]*$/.test(c.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,''))){j=eval('('+c+')');return typeof d==='function'?walk({'':j},''):j} 977throw new SyntaxError('JSON.parse');}}}());(function($){$.ccSelectBoxDate={runOnScope:function(scope){var o=this,selMonth,selYear,$ccfMonth,$ccfYear,now,thisYear,thisMonth,sScope=(typeof scope!=='undefined')?scope:'#ibeTblBookingPayment';selMonth='select[name="ibeBookingInput\\[payment\\]\\[ccValidToM\\]"]';selYear='select[name="ibeBookingInput\\[payment\\]\\[ccValidToY\\]"]';$ccfMonth=$(selMonth,sScope);$ccfYear=$(selYear,sScope);now=new Date();thisYear=parseInt(now.getFullYear(),10);thisMonth=parseInt(now.getMonth()+1,10);$(document).on('blur',selMonth+', '+selYear,function(){o._check($ccfMonth,$ccfYear,thisYear,thisMonth);});},_check:function($ccfMonth,$ccfYear,thisYear,thisMonth){var ccfMonth,ccfYear,o=this;ccfMonth={options:function(){return o.getOptions($ccfMonth);},selected:function(){return o.getSelected($ccfMonth);},selectedValue:function(){return parseInt(ccfMonth.selected().val(),10);}};ccfYear={options:function(){return o.getOptions($ccfYear);},selected:function(){return o.getSelected($ccfYear);},selectedValue:function(){return parseInt(ccfYear.selected().val(),10);}};if(ccfYear.selectedValue()===thisYear){ccfMonth.options().each(function(){var $this=$(this);if(parseInt($this.val(),10)<thisMonth){$this.prop('disabled',true);$this.removeAttr('selected');} 978else{$this.removeAttr('disabled');}});if((ccfMonth.selected().length===0)||(ccfMonth.selectedValue()<thisMonth)){$ccfMonth.find('option:first').prop('selected',true);}} 979else{ccfMonth.options().each(function(){$(this).removeAttr('disabled');});}},getOptions:function($selector){return $selector.find('option');},getSelected:function($selector){return $selector.find('option:selected');}};})(jQuery);redirectCookie={init:function(name){redirectCookie.deleteCookie(name);},getCookie:function(name){var cookies=document.cookie.split(';'),cookiesLength=cookies.length,index;for(index=0;index<cookiesLength;index++){var cookieEntry=cookies[index].split('=');if(name===cookieEntry[0]||' '+name===cookieEntry[0]){return cookieEntry[1];}} 980return'';},deleteCookie:function(name){document.cookie=encodeURI(name)+'=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/;';}};(function(window){'use strict';window.ibe=window.ibe||{};})(window); 981var oCurr=new PortalCurrency(CURRENCY_LOCALE);var aOpts=[];aOpts['display']=oCurr.SIGN;aOpts['decimals']=0;oCurr.setOptions(aOpts);var FlightSlider=(function(opts){this.v=this.opt={};this.noinit=!!(opts.noinit==='1'||opts.noinit===true);
981this.noajax=!!(opts.noajax==='1'||opts.noajax===true);this.action=(opts.action!=='')?opts.action:'flights';this.listSelector=opts.listSelector||'#notExisting';this.paginationType=opts.paginationType||'page';this.infiniteScroll=opts.infiniteScroll||false;this.syncAirportFilterEnabled=opts.syncAirportFilterEnabled||false;this.form=opts.form||$('form.check');this.formCheck=opts.formCheck||$('form.checkLink');this.offerlist=opts.offerlist||$('#offerlist');this.sliderbox=opts.sliderbox||$('#sliderbox,#sliderboxPayment,#sliderboxCancel');this.customFilterLoader=$(opts.customFilterLoader)||'';this.customInfiniteLoader=$(opts.customInfiniteLoader)||'';this.overlay=opts.overlay||$('div.overlay');this.overlayAutoSize=((opts.overlayAutoSize!==undefined)?opts.overlayAutoSize:false);this.offerWrapper=opts.offerWrapper||'.flightSelectForm';this.resetLinks=opts.resetLinks||'a.reset';this.resetWrapper=opts.resetWrapper||this.resetLinks;this.cancellableFilterCheckbox=opts.cancellableFilterCheckbox||'#cancellableFilter';this.stopTypeAll=opts.stopTypeAll||'#stopTypeall';this.residentFares=opts.residentFares||$('#resident, #residentChkBox');this.resident=opts.resident||$('#resident');this.residentChkBox=opts.residentChkBox||$('#residentChkBox');this.showAllOffers=opts.showAllOffers||$('#showalloffers');this.showResidentFares=((opts.showResidentFares!==undefined)?opts.showResidentFares:true);this.offerFormClass=opts.offerFormClass||$('form.itinForm');this.filterToggleContainer=opts.filterToggleContainer||$('h4.toggle');this.filterToggleIconClass=opts.filterToggleIconClass||'.down';this.filterToggleIconFn=opts.filterToggleIconFn||'up';this.filterContentClass=opts.filterContentClass||'div.box';this.filterToggleSpeed=opts.filterToggleSpeed||'slow';this.scrollOfferlistTop=((opts.scrollOfferlistTop!==undefined)?opts.scrollOfferlistTop:true);this.sliderClass=opts.sliderClass||'.slider';this.ajaxOfferAction=opts.ajaxOfferAction||'flights';this.airlinesAllTrigger='.js_filter-airlines-all';this.airlinesNoneTrigger='.js_filter-airlines-none';this.filterClassAirlinePrice=opts.filterClassAirlinePrice||'.filterAirlinePrice';this.filterClassAirlineName=opts.filterClassAirlineName||'.filterAirlineName';this.filterClassAirlineForm=opts.filterClassAirlineForm||'.filterAirlineForm';this.filterClassAirline=opts.filterClassAirline||'.filterAirlinePrice';this.filterClassPayment=opts.filterClassPayment||'.filterPayment';this.filterClassAirport=opts.filterClassAirport||'#filterAirports';this.filterPaymentMulti=opts.filterPaymentMulti||'';this.filterPaymentMultiSelect=opts.filterPaymentMultiSelect||{};this.cancellationOption=opts.cancellationOption||$('.js_cancellableFilter');this.filterRadiusAirports=opts.filterRadiusAirports||$('.js_radius_airports');this.identicalOrigin=opts.identicalOrigin||$('#identicalOrigin');this.topOffset=opts.topOffset||0;this.filterDelayTime=opts.filterDelayTime||10;this.filterDelay=undefined;this.filterClassInputPriceMin=opts.filterClassInputPriceMin||'.js-price-slider-input-min';this.filterClassInputPriceMax=opts.filterClassInputPriceMax||'.js-price-slider-input-max';this.searchErrorBox=opts.searchErrorBox||'#searchResultError';});FlightSlider.prototype.evaljson=(function(sliderjson){this.v=(sliderjson)?$.evalJSON(sliderjson):{};return this;});FlightSlider.prototype.updateval=(function(id){var slide=$('#'+id);if(slide.hasClass('range')){this.v[id].valmin=slide.slider('values',0);this.v[id].valmax=slide.slider('values',1);}else{this.v[id].valmax=slide.slider('value');} 982return this;});FlightSlider.prototype.getFormatPriceValue=(function(value){var aNewOpts=aOpts,newValue;aNewOpts['display']='none';oCurr.setOptions(aNewOpts);newValue=oCurr.toCurrency(value);oCurr.setOptions(aOpts);return newValue;});FlightSlider.prototype.format=(function(id,min,max,value,timeFormat){var jsTimeFormat=(timeFormat!==undefined)?timeFormat:'D. H:i',slide=$('#'+id);if(slide.hasClass('noformat')){if(slide.hasClass('range')){$('#min_'+id).text(parseInt(min,10));$('#max_'+id).text(parseInt(max,10));}else{$('#m'+id).text(parseInt(value,10));}}else if(slide.hasClass('duration')&&!slide.hasClass('range')){min=parseInt(min,10);
982var minHours=parseInt((min/60),10),minMinutes=parseInt((min-(minHours*60)),10),cVal=parseInt(value,10),cValHours=parseInt((cVal/60),10),cValMinutes=parseInt((cVal-(cValHours*60)),10);$('#m'+id).text(minHours+' Std '+((minMinutes<10)?'0':'')+minMinutes+' Min');$('#v'+id).text(cValHours+' Std '+((cValMinutes<10)?'0':'')+cValMinutes+' Min');}else{var o=parseInt((new Date()).getTimezoneOffset()*60,10),maxDate,minDate,v;if(slide.hasClass('range')){minDate=new Date(parseInt(min,10)*1000);maxDate=new Date(parseInt(max,10)*1000);if(slide.hasClass('year')){jsTimeFormat='D. d.m.y';} 983$('#min_'+id).text(new Date(minDate.setMinutes(minDate.getMinutes()+minDate.getTimezoneOffset())).format(jsTimeFormat));$('#max_'+id).text(new Date(maxDate.setMinutes(maxDate.getMinutes()+maxDate.getTimezoneOffset())).format(jsTimeFormat));}else{v=parseInt(value,10);if(slide.hasClass('year')){maxDate=new Date((parseInt(value,10)+o)*1000);$('#v'+id).text(maxDate.format('D. d.m.y'));}else{if($('#v'+id).is('input')){var aNewOpts=aOpts;aNewOpts.display='none';oCurr.setOptions(aNewOpts);$('#v'+id).val(oCurr.toCurrency(v));oCurr.setOptions(aOpts);}else{$('#v'+id).text(oCurr.toCurrency(v));} 984var h=parseInt(v/60,10),m=(v-(h*60));$('#m'+id).html(h+TIME_SEPERATOR+((m<10)?'0':'')+m);}}} 985return this;});FlightSlider.prototype.resetslider=(function(id){if(this.v[id]){this.v[id].valmin=this.v[id].min;this.v[id].valmax=this.v[id].max;this.format(id,this.v[id].min,this.v[id].max,this.v[id].max);var $id=$('#'+id);if($id.hasClass('range')){this.opt[id].values=[this.v[id].min,this.v[id].max];}else{this.opt[id].value=this.v[id].max;} 986$id.slider('destroy').slider(this.opt[id]);} 987return this;});FlightSlider.prototype.formatValue=(function(id){if(this.v[id]){this.format(id,this.v[id].min,this.v[id].max,this.v[id].max);} 988return this;});FlightSlider.prototype.formatValues=(function(){var self=this;$(this.sliderClass,this.sliderbox).each(function(){self.formatValue($(this).attr('id'));});});FlightSlider.prototype.reset=(function(){var self=this;if(this.noinit===false){if(this.overlayAutoSize){self.overlay.show();}else{self.overlay.width(self.offerlist.width()).height(self.offerlist.height()).show();}} 989$(this.sliderClass,this.sliderbox).each(function(){self.resetslider($(this).attr('id'));});if(self.form.find('input').length>0){self.form.find('input').attr('checked',true);} 990if(self.form.find('select').length>0){self.form.find('select')[0].selectedIndex=0;if($(self.filterClassPayment.length)){$(self.filterClassPayment).change();}} 991$('input:radio[name="RailAndFly"]').removeAttr('checked');var $CO2e=$('input:radio[name="lessEmission"]'),$CO2eNo=$('input:radio[name="lessEmission"][value="0"]');if($CO2e.length>0){$CO2eNo.prop('checked',true);} 992var $fb=$('input:radio[name="freeBaggage"]'),$fbNo=$('input:radio[name="freeBaggage"][value="0"]');if($fb.length>0){$fbNo.prop('checked',true);} 993self.identicalOrigin.attr('checked',false);self.cancellationOption.prop('checked',false);self.filterRadiusAirports.attr('checked',false);self.form.find(self.stopTypeAll).attr('checked',true);self.form.find(self.cancellableFilterCheckbox).prop('checked',false);self.residentFares.attr('checked',false);if(self.filterPaymentMulti){if(typeof ibe.itineraries.multiSelect!=='undefined'){$(self.filterPaymentMulti).removeAttr('checked');self.filterPaymentMultiSelect.update();}} 994self.apply(0,'reset');$(self.resetWrapper).hide();return this;});FlightSlider.prototype.resetSliders=(function(){var self=this;$(this.sliderClass,this.sliderbox).each(function(){self.resetslider($(this).attr('id'));});return this;});FlightSlider.prototype.sorting=(function(orderBy){var self=this;this.lastRequest=$.ajax({type:'POST',cache:false,url:BASE_URL+'/'+CONTROLLER+'/'+this.action,data:'orderBy='+orderBy+'&p='+parseInt($('span.nav_current_page').text(),10)+' &filter='+$.toJSON(self.v)+'&'+self.form.serialize(),success:function(t){self.offerlist.html(t);self.rewriteNav().displayResidentFares();},complete:function(){self.overlay.hide();}});return this;});FlightSlider.prototype.getLegPinParams=function(){var legPin=(window.ibe&&ibe.legPin)||{};var params=[];if(legPin.out&&legPin.out.hash){params.push('&pinnedLegOut=',encodeURIComponent(legPin.out.hash));} 995if(legPin.in&&legPin.in.hash){params.push('&pinnedLegIn=',encodeURIComponent(legPin.in.hash));} 996if(legPin.acted){params.push('&pinnedDirection=',encodeURIComponent(legPin.acted));} 997return params.join('');};FlightSlider.prototype.apply=(function(p,trigger,scrolled){if(this.noajax===true){return this;} 998var self=this,reset=(trigger==='reset');scrolled=scrolled||false;if(scrolled===false&&self.scrollOfferlistTop){$(document).scrollTop(self.offerlist.offset().top/2);} 999if(this.lastRequest){this.lastRequest.abort();} 1000if(self.infiniteScroll===true){if(scrolled===true){if(self.customInfiniteLoader.length>0){self.customInfiniteLoader.show();}else{$('body').preloader('show',{target:'.itinerary-list'});}}else{if(self.customFilterLoader.length>0){self.customFilterLoader.show();}else{$('body').preloader('show',{wrapperClass:'spinner-without-text'});}}}else{if(this.overlayAutoSize){self.overlay.show();}else{self.overlay.width(self.offerlist.width()).height(self.offerlist.height()).show();}} 1001if(self.showResidentFares){self.syncPriceslider();} 1002if(self.infiniteScroll===true){$.app.listScroll.disable();} 1003this.lastRequest=$.ajax({type:'POST',cache:false,url:BASE_URL+'/'+CONTROLLER+'/'+this.action,data:['p=',p,'&filter=',$.toJSON(self.v),'&',self.form.serialize(),'&wasInfiniteScroll=',scrolled,'&reset=',reset,'&trigger=',trigger,self.getLegPinParams()].join('')}
1003).done(function(t){ibe.itineraries.model.currentPage=t.pagination.offset;if(t.searchChanged===true&&t.searchChangedHtml!=='undefined'){self.displaySearchError(t.searchChangedHtml);} 1004if(self.infiniteScroll===true&&scrolled===true){$.app.listScroll.config.page++;self.offerlist.append(t.list);}else{if(self.infiniteScroll===true){$.app.listScroll.cleanUp(1,t.pagination.maxPageCount);} 1005self.offerlist.html(t.list);} 1006if(self.infiniteScroll===true){$.app.listScroll.controller();} 1007if(true===t.isFormaggio){var featureHintContainerTop=$('#featureHintContainerTop').html(''),featureHintContainerWithin=$('#featureHintContainerWithin').html('');if(t.featureHintPosition!==''&&t.featureHintContainer!==''){if(t.featureHintPosition==='top'){featureHintContainerTop.html(t.featureHintContainer);}else if(t.featureHintPosition==='within'||t.featureHintPosition==='within-double'||t.featureHintPosition==='within-single'){featureHintContainerWithin.html(t.featureHintContainer);}} 1008if(t.filterContent&&t.filterContent.offercount){$('#flightCount').html(t.filterContent.offercount);} 1009if(t.pagination.entries>=6){window.adition=window.adition||{};window.adition.srq=window.adition.srq||[];window.adition.srq.push(function(api){api.reload(['SuperBannerMiddle']);});}}else{if(t.featureHintContainer){$('#featureHintContainer').replaceWith(t.featureHintContainer).show();}else{$('#featureHintContainer').hide();}} 1010var filteredFlightsCount=$('.js-feature-hide');if((t.pagination.entries)===0){filteredFlightsCount.hide();if(window.ibe&&ibe.searchTracking&&ibe.searchTracking.trackOfferValidation){ibe.searchTracking.trackOfferValidation('no_results_filtered');}}else{filteredFlightsCount.show();} 1011if(self.infiniteScroll===false&&self.scrollOfferlistTop){if(typeof t.searchChanged==='undefined'||typeof t.searchChangedHtml==='undefined'){$(document).scrollTop(self.offerlist.offset().top);}} 1012self.rewriteNav();if(self.showResidentFares){self.displayResidentFares();} 1013window.init_tooltips($('.js_tooltip',self.offerlist));$(document).trigger('itinerary-filter-updated',[(t&&t.pagination&&t.pagination.entries)||0]);}).fail(function(xhr,status){if(!!status&&xhr.status!==429){self.customInfiniteLoader.append('<p class="loader-error">Ein Fehler ist aufgetreten. Ihre Suche wird neu ausgelöst.<p>');$('button.js_restart-search').trigger('click');}}).always(function(xhr,status){if(status!=='error'||xhr.status===429){self.overlay.hide();self.offerlist.trigger('radioPlacingInit');if(self.infiniteScroll===true){if(self.customFilterLoader.length>0&&self.customInfiniteLoader.length>0){self.customFilterLoader.hide();self.customInfiniteLoader.hide();}else{$('body').preloader('hide');}} 1014if(typeof $.stickyglue==='object'){$(window).trigger('sticky-update');} 1015if(typeof ibe.comparison==='object'){ibe.comparison.initComparison();}}});if(scrolled!==true){$(self.resetWrapper).show();} 1016return this;});FlightSlider.prototype.rewriteNav=(function(){var self=this,page;if(self.paginationType==='page'){page=parseInt($('span.nav_current_page').text(),10);} 1017self.offerFormClass.submit(function(){var $this=$(this),outRecom=$this.find('input.outFlightRadio:checked').val(),inRecom=$this.find('input.inFlightRadio:checked').val();$this.children('input[name="p"]').val(page);if(inRecom){$this.children('input[name="recom"], input[name="key"]').val(outRecom+'_'+inRecom);}else if(outRecom){$this.children('input[name="recom"], input[name="key"]').val(outRecom);}});if(self.paginationType==='page'){$('a.js-page-link').each(function(){$(this).bind('click',function(){self.apply($(this).data('target'),'page');}).attr('href','javascript:;');});} 1018$('#sort').attr('onchange','').unbind().bind('change',function(){self.apply(page,'sorting');});return this;});FlightSlider.prototype.registerChange=(function(page,trigger){var self=this;if(self.filterDelayTime>0){if(typeof this.filterDelay==='number'){clearTimeout(self.filterDelay);} 1019self.filterDelay=setTimeout(function(){self.apply(page,trigger);if(ibe&&ibe.itineraries&&ibe.itineraries.multiSelect&&typeof ibe.itineraries.multiSelect.paymentFilter!=='undefined'){ibe.itineraries.multiSelect.paymentFilter.close();}},self.filterDelayTime);}else{self.apply(page,trigger);} 1020return this;});FlightSlider.prototype.setAirlineTriggerState=function(type){var $airlinesAllTrigger=$(this.airlinesAllTrigger),$airlinesNoneTrigger=$(this.airlinesNoneTrigger);$airlinesAllTrigger.add($airlinesNoneTrigger).attr('data-disabled',false);
1020if(type===undefined){var $airlines=this.form.find('input.airline'),$checkedAirlines=$airlines.filter(':checked');if($checkedAirlines.length===0){type='none';}else if($airlines.length===$checkedAirlines.length){type='all';}} 1021if(type==='all'){$airlinesAllTrigger.attr('data-disabled',true);}else if(type==='none'){$airlinesNoneTrigger.attr('data-disabled',true);} 1022return this;};FlightSlider.prototype.syncAirportFilter=function(element){var name=element.attr('name'),syncElement,newName;if(name.indexOf('airportsoutdep')!==-1){newName=name.replace('airportsoutdep','airportsinarr');}else if(name.indexOf('airportsinarr')!==-1){newName=name.replace('airportsinarr','airportsoutdep');}else if(name.indexOf('airportsoutarr')!==-1){newName=name.replace('airportsoutarr','airportsindep');}else if(name.indexOf('airportsindep')!==-1){newName=name.replace('airportsindep','airportsoutarr');} 1023syncElement=$(this.filterClassAirport).find('input[name="'+newName+'"]');if(syncElement.length){syncElement.attr('checked',element.attr('checked'));if(element.is(':checked')){syncElement.prop('checked',true);}else{syncElement.prop('checked',false);}} 1024return this;};FlightSlider.prototype.getCurrentPage=function(){if(self.paginationType==='page'){return parseInt($('span.nav_current_page').text(),10);} 1025return 1;};FlightSlider.prototype.init=(function(){var self=this,page=0;$(this.sliderbox).on('hover','.js_checkboxHintText:visible',function(){$(this).children().toggle();$(this).parents('.js_checkbox-filter-row').toggleClass('hidden-checkbox');});if(self.paginationType==='page'){page=parseInt($('span.nav_current_page').text(),10);} 1026$('div.timearr').hide();self.form.find('input:radio').bind('change',function(){var element=$(this),myform=element.parentsUntil('form',':last').parent();this.focus();self.registerChange(page,myform.attr('name'));});self.form.find('input:checkbox').change(function(){var element=$(this),myform=element.parentsUntil('form',':last').parent(),direction=element.data('direction')||'';if(myform.length===0){myform=element.closest('form');} 1027if(self.syncAirportFilterEnabled===true){if(element.hasClass('filter-airport-input')&&self.identicalOrigin.is(':checked')){self.syncAirportFilter(element);}} 1028if(typeof myform.data('multi')==='undefined'||(myform.attr('name')==='payment'&&self.filterDelayTime>0)){self.registerChange(page,myform.attr('name')+direction);} 1029self.setAirlineTriggerState();});self.form.find('a#checkLink').on('click',function(){self.apply(page);});self.form.find('.js_intuitiveFilterCheckbox').on('click',function(){$(this).parents('form').find('input.js_filter-checkbox-input').not($(this)).attr('checked',false);self.registerChange(page);});if(self.showResidentFares){self.residentChkBox.change(function(){self.resident.attr('checked',$(this).is(':checked')).change();});self.resident.change(function(){self.residentChkBox.attr('checked',$(this).is(':checked'));self.apply(page,'resident');});} 1030$(this.sliderbox).on('click',self.filterClassAirlinePrice,function(){self.form.find('input.airline').attr('checked',false);self.form.find('input.'+$(this).attr('id')).attr('checked',true);self.registerChange(page,'airline_price');self.setAirlineTriggerState();});$(this.sliderbox).on('click',self.filterClassAirlineName,function(){self.form.find('input.airline').attr('checked',false);self.form.find('input.'+$(this).parents('div:first').find(self.filterClassAirlinePrice+':first').attr('id')).attr('checked',true);self.registerChange(page,'airline_only');self.setAirlineTriggerState();});$(this.sliderbox).on('change',self.filterClassAirlineForm,function(){self.apply(page,'airline');});$(this.sliderbox).on('change',self.filterClassPayment,function(){self.apply(page,'payment');});$(document).on('click','.reset-filterPayment',function(){self.form.find(self.filterClassPayment).val('');self.apply(page,'payment_reset');});$(this.sliderbox).on('click','a.airport.dep',function(){self.form.find('input.airport.dep').attr('checked',false);self.form.find('input.'+$(this).attr('id')).attr('checked',true);self.apply(page,'airport_dep');});$(this.sliderbox).on('click','a.airport.arr',function(){self.form.find('input.airport.arr').attr('checked',fal
1030se);self.form.find('input.'+$(this).attr('id')).attr('checked',true);self.apply(page,'airport_arr');});$(document).on('click','a.airline_all',function(){if(typeof $(this).attr('data-disabled')==='undefined'||$(this).attr('data-disabled')==='false'){self.setAirlineTriggerState('all');self.form.find('input.airline').attr('checked',true);self.form.find(self.filterClassPayment).val('');self.registerChange(page,'airline_all');}});$(this.sliderbox).on('click','a.airline_none',function(){if(typeof $(this).attr('data-disabled')==='undefined'||$(this).attr('data-disabled')==='false'){self.setAirlineTriggerState('none');self.form.find('input.airline').attr('checked',false);self.registerChange(page,'airline_none');}});$(this.sliderbox).on('click','a.airline_noneInfi',function(){if(typeof $(this).attr('data-disabled')==='undefined'||$(this).attr('data-disabled')==='false'){self.setAirlineTriggerState('none');self.form.find('input.airline').attr('checked',false);}});$(this.sliderbox).on('click','a.airports_all.dep',function(){self.form.find('input.airport.dep').attr('checked',true);self.apply(page,'airport_all_dep');});$(this.sliderbox).on('click','a.airports_all.arr',function(){self.form.find('input.airport.arr').attr('checked',true);self.apply(page,'airport_all_arr');});$(this.sliderbox).on('change',this.filterClassInputPriceMax,function(){self.sliderNormal=self.sliderNormal||$('#price');var value=$(this).val().replace(',','.');if(isNaN(value)===true){value=self.v.price.valmax;}else{value=Math.round(value);if(value>self.v.price.max){value=self.v.price.max;}else if(value<self.v.price.min){value=self.v.price.min;}} 1031$(this).val(value);self.sleepSliderSet(self.sliderNormal,value);if(value!==self.v.price.valmax){self.updateval('price').apply(page,'price');}});if($(this.filterClassInputPriceMax).length>0){$(this.filterClassInputPriceMax).val(self.getFormatPriceValue(self.v.price.valmax));} 1032if($(this.filterClassInputPriceMin).length>0){$(this.filterClassInputPriceMin).val(self.getFormatPriceValue(self.v.price.valmin));} 1033$(document).on('click',self.resetLinks,function(){if(this.noinit===false){if(this.overlayAutoSize){self.overlay.show();}else{self.overlay.height(self.offerlist.height()).show();}} 1034self.showAllOffers.attr('checked',false);self.reset();});$(self.sliderClass,this.sliderbox).on('slidecreate',function(){$(window).trigger('sticky-update');});$(self.sliderClass,this.sliderbox).each(function(){var $this=$(this),id=$(this).attr('id');if(typeof self.v[id]!=='undefined'){if($this.hasClass('range')){self.opt[id]={min:parseInt(self.v[id].min,10),max:parseInt(self.v[id].max,10),range:true,values:[parseInt(self.v[id].valmin,10),parseInt(self.v[id].valmax,10)],step:1800};}else{self.opt[id]={min:parseInt(self.v[id].min,10),max:parseInt(self.v[id].max,10),range:'min',value:parseInt(self.v[id].valmax,10),step:(($this.attr('id').indexOf('duration')!==-1)?30:10)};}
1035self.opt[id].slide=(function(e,ui){if($(this).hasClass('range')){self.format($(this).attr('id'),ui.values[0],ui.values[1],0);}else if($(this).hasClass('duration')){self.format($(this).attr('id'),self.v[id].valmin,0,ui.value);}else{self.format($(this).attr('id'),0,0,ui.value);}});self.opt[id].change=(function(){self.updateval($(this).attr('id')).registerChange(page,$(this).attr('id'));});$this.slider(self.opt[id]);}});$(self.filterToggleContainer).on('click',function(){$(this).find(self.filterToggleIconClass).toggleClass(self.filterToggleIconFn);$(this).nextAll(self.filterContentClass+':first').toggle(self.filterToggleSpeed);});this.setAirlineTriggerState();return this;});FlightSlider.prototype.displayResidentFares=(function(){this.resident=this.resident||$('#resident');var checked=this.resident.is(':checked');if(checked){$('#residentHeadline, #residentLink').css('color','#fd0000');$('#residentprice').slider('enable');$('#price').slider('disable');}else{$('#residentHeadline, #residentLink').css('color','#2A50BD');$('#residentprice').slider('disable');$('#price').slider('enable');} 1036$('#itinerary_list div.resident').prev('span').toggle(checked===false);$('#priceslider').toggle(checked===false);$('#itinerary_list div.resident, #residentLink span.hidden, #residentpriceslider').toggle(checked);return this;});FlightSlider.prototype.syncPriceslider=(function(){this.resident=this.resident||$('#resident');if(this.resident.length>0){this.sliderNormal=this.sliderNormal||$('#price');this.sliderResident=this.sliderResident||$('#residentprice');var residentprice=this.sliderResident.slider('value'),price=this.sliderNormal.slider('value');if(residentprice!==price){if(this.resident.is(':checked')){this.sleepSliderSet(this.sliderNormal,residentprice);$('#vprice').text(oCurr.toCurrency(residentprice));}else{this.sleepSliderSet(this.sliderResident,price);$('#vresidentprice').text(oCurr.toCurrency(price));}}} 1037return this;});FlightSlider.prototype.displaySearchError=function(message){var errorContainer=$(this.searchErrorBox);if(errorContainer.length===1){errorContainer.replaceWith(message);$(document).scrollTop(errorContainer.offset().top);} 1038return this;};FlightSlider.prototype.sleepSliderSet=(function(slider,value){var e=slider.slider('option','change');slider.slider('option','change',null);slider.slider('value',value);slider.slider('option','change',e);return this;}); 1039;(function(window,document,$){'use strict';window.slideshow={opts:{autoSlide:false,duration:10000,transition:'pushLeft',transitionDuration:1000},timer:null,performTransition:function(activeImg,nextImg){var $activeImg=activeImg,$nextImg=nextImg,t=this;this.disableBtnListener();switch(this.opts.transition){case'hard':$nextImg.addClass('active');$activeImg.removeClass('active lastActive');this.activateBtnListener();break;case'fade':$nextImg.css('opacity',0).addClass('active').animate({opacity:1},t.opts.transitionDuration,function(){$activeImg.removeClass('active lastActive');t.activateBtnListener();});break;case'slideLeft':$nextImg.css('right',parseInt($nextImg.find('img').eq(0).data('slide'))*-1).addClass('active').animate({right:0},t.opts.transitionDuration,function(){$activeImg.removeClass('active lastActive');t.activateBtnListener();});break;case'pushLeft':var iSize=parseInt($nextImg.find('img').eq(0).data('push'));$nextImg.css('right',iSize*-1).addClass('active').animate({right:0},t.opts.transitionDuration);$activeImg.animate({right:iSize},t.opts.transitionDuration,function(){$activeImg.removeClass('active lastActive');t.activateBtnListener();});break;} 1040return t;},disableBtnListener:function(){$('#slideshow .js_btn').unbind('click');return this;},activateBtnListener:function(){var t=this;$('#slideshow .js_btn').bind('click',function(){var $clickedBtn=$(this),clickedBtnId=$clickedBtn.attr('id'),clickedArr=clickedBtnId.split('_'),$btns=$('#slideshow .js_btn'),$nextImg=$('#img_'+clickedArr[1]),$activeImg=$('#slideshow .slideCont.active');if(!$clickedBtn.hasClass('active')){t.execTimer('stop');$btns.removeClass('active');$clickedBtn.addClass('active');$activeImg.addClass('lastActive');t.performTransition($activeImg,$nextImg);t.execTimer('start');}});return t;},slideSwitch:function(){var $activeImg=$('#slideshow .slideCont.active'),$activeBtn=$('#slideshow .js_btn.active');if($activeImg.length===0){$activeImg=$('#slideshow .slideCont:last');} 1041var $nextImg=$activeImg.next().length?$activeImg.next():$('#slideshow .slideCont:first'),$nextBtn=$activeBtn.next().length?$activeBtn.next():$('#slideshow .js_btn:first');$activeImg.addClass('lastActive');$nextBtn.addClass('active');$activeBtn.removeClass('active');this.performTransition($activeImg,$nextImg);return this;},execTimer:function(exec){var t=this;if(t.opts.autoSlide){if(exec==='start'){t.timer=window.setInterval(function(){t.slideSwitch();},t.opts.duration);} 1042else{window.clearInterval(t.timer);}} 1043return t;}};}(window,document,jQuery)); 1044'use strict';
1044var fixTabletSelect=function($AutoCompleterNode,$ListItem){var stack=window.$.ui.autocomplete.stack;$ListItem.one('touchend',function(event){event.preventDefault();event.stopPropagation();var id=$AutoCompleterNode.attr('id'),hid='#'+id;if(false!==$AutoCompleterNode.trigger('select',event,{item:$ListItem.data('uiAutocompleteItem')})){$AutoCompleterNode.val($ListItem.data('uiAutocompleteItem').value);if($AutoCompleterNode.data('airportCompleterReference').hiddenInput!==''){$AutoCompleterNode.data('airportCompleterReference').$hidden.val($ListItem.data('uiAutocompleteItem').iata).trigger('change');} 1045if($AutoCompleterNode.data('airportCompleterReference').regionInput!==''){if($ListItem.data('uiAutocompleteItem').region!==''){$AutoCompleterNode.data('airportCompleterReference').$region.val($ListItem.data('uiAutocompleteItem').region);}} 1046if(-1===$.inArray(hid,stack)){stack.push(hid);} 1047$AutoCompleterNode.data('airportCompleterReference').$nextAc=$AutoCompleterNode.data('airportCompleterReference').$scope.find('.ui-autocomplete-input').not(stack.toString()).not(':disabled').first();setTimeout(function(){if($AutoCompleterNode.data('airportCompleterReference').$nextAc.length>0){$AutoCompleterNode.data('airportCompleterReference').$nextAc.focus();}else{$AutoCompleterNode.blur();} 1048return false;},300);}});};window.$.ui.autocomplete.stack=window.$.ui.autocomplete.stack||[];$.widget('custom.airportCompleter',$.ui.autocomplete,{_create:function(){this._super();this.widget().menu('option','items','> :not(.category)').css('z-index',65535);},_renderItem:function(ul,item){var sLiClass='item';if(item.childAirport===true||item.parentAirport===true||item.suggestion===true){sLiClass+=' highlighted';} 1049if(item.childAirport===true||item.suggestion===true){sLiClass+=' indented';} 1050return $('<li>').addClass(sLiClass).data('uiAutocompleteItem',item).html(item.label).appendTo(ul);},_renderMenu:function(ul,items){var that=this,currentCategory='';$.each(items,function(index,item){var li;if(item.category!==currentCategory){ul.append('<li class="category highlighted">'+item.category+'</li>');currentCategory=item.category;} 1051li=that._renderItemData(ul,item);if(('ontouchend'in document.documentElement)){fixTabletSelect($(that.element[0]),li);}});ul.addClass('autocomplete');}});var AirportCompleter=function(options){var _this=this;this.oOptions={sInputSelector:options.sInputSelector||'',$Input:$(options.sInputSelector),posMy:options.posMy||'left top',posAt:options.posAt||'left bottom',xhrs:[],mediaUrl:options.mediaUrl||MEDIA_URL||'',revString:options.revString||'',language:options.language||'',acRequestIndex:0,hiddenInput:options.hiddenInput||'',$hidden:$(options.hiddenInput),regionInput:options.regionInput||'',$region:$(options.regionInput),multiAirport:options.multiAirport||'',$multiAirport:$(options.multiAirport),$scope:$(options.sInputSelector).parents('form:first'),$nextAc:''};var source=function(request,response){var options=_this.oOptions,sXhrKey=_this.oOptions.sInputSelector;if(options.xhrs[sXhrKey]){options.xhrs[sXhrKey].abort();} 1052options.xhrs[sXhrKey]=$.ajax({name:'airportcompleter',url:options.mediaUrl+'autocomplete/index/search/'+options.revString+'/jsonp/jsonp/language/'+options.language+'/term/'+encodeURIComponent((request.term).replace('/',' ')),dataType:'jsonp',jsonp:false,jsonpCallback:'jsonp',cache:true,async:true,autocompleteRequest:++options.acRequestIndex,data:{},success:function(data){if(this.autocompleteRequest===options.acRequestIndex){response($.map(data,function(item){return item;}));}},error:function(){if(this.autocompleteRequest===options.acRequestIndex){response([]);}}});};var select=function(event,ui){var $this=$(this),id=$this.attr('id'),hid='#'+id,options=_this.oOptions,stack=window.$.ui.autocomplete.stack;this.value=ui.item.value;if(event.keyCode===$.ui.keyCode.TAB||(ui&&ui.event==='tab')){event.preventDefault();this.value=this.value+' ';$this.val(this.value).focus().blur();} 1053if(options.hiddenInput!==''){options.$hidden.val(ui.item.iata).trigger('change');} 1054if(options.regionInput!==''){if(ui.item.region!==''){options.$region.val(ui.item.region);}} 1055if(options.multiAirport!==''){options.$multiAirport.val(ui.item.multiAirportCityCode).trigger('change');} 1056if(window.formWizard){window.formWizard.checkFields(this);}else{if($.inArray(hid,stack)===-1){stack.push(hid);} 1057options.$nextAc=options.$scope.find('.ui-autocomplete-input').not(stack.toString()).not(':disabled').first();if(options.$nextAc.length>0&&options.$nextAc.val()===''){options.$nextAc.focus();} 1058if(typeof options.$Input!=='undefined'){options.$Input.trigger('airportautocompleterselected');}}};var clearFocus=function(event){if(Modernizr&&Modernizr.placeholder===true){var input=this;if(event.type==='focusin'&&input.value.length>0){input.setSelectionRange(0,input.value.length);}}};
1058(function init(){var options=_this.oOptions;$(options.$Input).data('airportCompleterReference',options);if(options.hiddenInput!==''){options.$Input.keydown(function(e){if(e.which!==$.ui.keyCode.TAB&&e.which!==$.ui.keyCode.ENTER&&e.which!==$.ui.keyCode.ESCAPE&&e.which!==$.ui.keyCode.END&&e.which!==$.ui.keyCode.HOME&&e.which!==$.ui.keyCode.LEFT&&e.which!==$.ui.keyCode.RIGHT&&e.which!==$.ui.keyCode.UP&&e.which!==$.ui.keyCode.DOWN){options.$hidden.val('');options.$region.val('');options.$multiAirport.val('');} 1059options.$hidden.trigger('change');});options.$hidden.addClass('js-autocomplete-hidden').trigger('change');} 1060options.$Input.airportCompleter({source:source,select:select,open:function(){options.$Input.addClass('autocomplete-open');},close:function(){options.$Input.removeClass('autocomplete-open');},messages:{noResults:'',results:function(){}},minLength:2,html:true,delay:200,autoFocus:false,autoSelect:true,position:{my:options.posMy,at:options.posAt,collision:'none'}}).on('focusin focusout',clearFocus).on('focusout',function(){var $thisAc=$(options.$Input.data('custom-airportCompleter').menu.element[0]),$acElements=$thisAc.find('.ui-menu-item');if($acElements.length>0&&options.hiddenInput!==''&&options.$hidden.val()===''){$thisAc.hide();options.$Input.data('custom-airportCompleter')._trigger('select','autocompleteselect',{item:$acElements.first().data('uiAutocompleteItem'),event:'click'});}});})();}; 1061var LazyLoad=function(params){return LazyLoad.prototype.bind(params);};LazyLoad.prototype.selector='.js_unveil-img';LazyLoad.prototype.threshold=100;LazyLoad.prototype.bind=function(params){params=params||{};var selector=params.selector||LazyLoad.prototype.selector,threshold=params.threshold||LazyLoad.prototype.threshold,callback=params.callback;return $(selector).unveil(threshold,function lazyLoadCallback(){LazyLoad.prototype.loadCallback.call(this,callback);});};LazyLoad.prototype.loadCallback=function(customCallback){var $img=$(this);$img.on('load',function(){$img.addClass('loaded');if(typeof customCallback==='function'){customCallback.call(this,$img);}else{return false;}});};LazyLoad.prototype.load=function(selector){selector=selector||LazyLoad.prototype.selector;$(selector).trigger('unveil');}; 1062(function($){'use strict';function Preloader(el,options){var layoutColors={kite:'#F6B80E',sponge:'#202b3f',dolphin:'#C21057',_default:'#3b7cd5'};this.defaults={overlayVisible:true,textVisible:true,headingContent:'',text:'',hintText:'',iconClass:'',targetID:'spinnerTarget',spinnerWrapper:'spinnerWrapper',spinnerText:'spinnerText',spinnerHintText:'spinnerHintText',spinnerImg:false,target:'',spinJS:{lines:14,length:0,width:7,radius:18,corners:1,rotate:0,direction:1,color:(typeof LAYOUT!=='undefined'&&layoutColors[LAYOUT])?layoutColors[LAYOUT]:layoutColors._default,opacity:0.2,speed:0.8,trail:70,shadow:false,hwaccel:false,className:'spin-js',position:'relative',zIndex:2e9,top:'auto',left:'auto'}};this.opts=$.extend({},this.defaults,options);this.$el=$(el);this.cleanUp=function(){var _this=this;var $SpinnerWrapper=$('#'+_this.opts.spinnerWrapper);$SpinnerWrapper.empty();var innerMarkup=_this.createInnerHTML();innerMarkup.$text.appendTo($SpinnerWrapper);innerMarkup.$spinner.appendTo($SpinnerWrapper);_this.applySpinner();};this.show=function(params){var _this=this,options=params[0]||{};if(options){if(options.hintText){$('#'+_this.opts.spinnerHintText).text(options.hintText);} 1063if(options.text){$('#'+_this.opts.spinnerWrapper).removeClass('spinner-without-text');$('#'+_this.opts.spinnerText).text(options.text);} 1064if(options.headingContent){$('#'+_this.opts.spinnerWrapper).removeClass('spinner-without-text');$('#'+_this.opts.spinnerText).text(options.headingContent);} 1065if(options.iconClass){$('#'+_this.opts.targetID).addClass('icon-'+options.iconClass);} 1066if(options.html){var $container=options.html;($('#'+_this.opts.spinnerWrapper)).empty().append($container).find('.js_spinner-target').attr('id',_this.opts.targetID);if(typeof Spinner!=='undefined'){_this.applySpinner();}} 1067if($.isEmptyObject(options.spinnerImg)===false){var target=$('#'+_this.opts.targetID);if(navigator.userAgent.indexOf('MSIE')!==-1||navigator.appVersion.indexOf('Trident/')>0){target.addClass('animation-fallback');} 1068else{if(options.spinnerImg.animation===true){target.addClass('animation');} 1069else{_this.imageSpinner(target,options.spinnerImg);}}} 1070if(options.wrapperClass){$('#'+_this.opts.spinnerWrapper).addClass(options.wrapperClass);} 1071else{$('#'+_this.opts.spinnerWrapper).removeAttr('class').addClass('spinner-wrapper');} 1072if(options.delay){window.setTimeout(function(){_this.hide();},options.delay);}} 1073if(options.target){$('#'+_this.opts.spinnerWrapper).addClass('spinner-within').appendTo($(options.target)).show();} 1074else{$('#'+_this.opts.spinnerWrapper).removeClass('spinner-within');$('#spinnerOverlay, #spinnerWrapper').appendTo('body').show();$('body').addClass('overlay-open');} 1075window.addEventListener('pageshow',function(event){if(event.persisted){_this.hide();}});};this.imageSpinner=function(target,opts){setInterval(function(){var frameOffset=(++opts.start%opts.frames)*-opts.width;target.prop('style').backgroundPosition=frameOffset+'px '+'0px';},opts.duration);};this.hide=function(){var _this=this;$('#spinnerOverlay, #spinnerWrapper').hide();$('body').removeClass('overlay-open');_this.cleanUp();};} 1076Preloader.prototype={init:function(){var _this=this;_this.appendHTML();if(typeof Spinner!=='undefined'){_this.applySpinner();}},createOuterHTML:function(){var tplOverlay=$('<div />',{id:'spinnerOverlay','class':'spinner-overlay'}).hide(),tplWrapper=$('<div />',{id:'spinnerWrapper','class':'spinner-wrapper'}).hide();return{$overlay:tplOverlay,$wrapper:tplWrapper};},createInnerHTML:function(){var _this=this,iconClass=(_this.opts.iconClass)?' icon-'+_this.opts.iconClass:'',tplSpinner=$('<div />',{id:'spinnerTarget','class':'spinner-target animation'+iconClass}),tplText=$('<div />',{id:'spinnerText','class':'spinner-text',text:_this.opts.text}),tplHint=$('<div />',{id:'spinnerHintText','class':'spinner-text-hint',text:_this.opts.hintText});return{$spinner:tplSpinner,$text:tplText,$hint:tplHint};},appendHTML:function(){var _this=this,outerMarkup,innerMarkup;if($('#spinnerWrapper').length===0){outerMarkup=_this.createOuterHTML();} 1077innerMarkup=_this.createInnerHTML();innerMarkup.$spinner.appendTo(outerMarkup.$wrapper);if(_this.opts.textVisible===true){innerMarkup.$text.prependTo(outerMarkup.$wrapper);innerMarkup.$hint.appendTo(outerMarkup.$wrapper);} 1078if(_this.opts.overlayVisible===true){_this.$el.append(outerMarkup.$overlay);} 1079_this.$el.append(outerMarkup.$wrapper);},applySpinner:function(){if(typeof Spinner!=='undefined'){var _this=this,spinner=new Spinner(_this.opts.spinJS).spin();$('#'+_this.opts.targetID).html(spinner.el);}}};$.fn.preloader=function(methodOrOptions){var $this=$(this),instance=$this.data('preloader');if($this.length&&!instance){this.each(function(){var rev=new Preloader(this,methodOrOptions);
1079rev.init();$(this).data('preloader',rev);});return $this;} 1080else if(instance&&instance[methodOrOptions]&&typeof instance[methodOrOptions]==='function'){return instance[methodOrOptions](Array.prototype.slice.call(arguments,1));}};$(function(){$('body').preloader();});})(jQuery); 1081(function($){'use strict';$.bindClickout=function(id,type,dest){var $this=$('#'+id),doc=$('iframe',$this);if(doc.length>0){if(doc.contentDocument){doc=doc.get(0).contentDocument;}else if(doc.contentWindow){doc=doc.get(0).contentWindow.document;}} 1082$this.on('click','a, object',function(){$.get(BASE_URL+'/ajax/clickout/type/'+type+'/dest/'+dest);});$(doc).on('click',function(){$.get(BASE_URL+'/ajax/clickout/type/'+type+'/dest/'+dest);});};})(jQuery); 1083(function($){'use strict';$(document).ready(function(){var $dialogs=$dialogs||$('.js_dialog');$.widget('ui.dialog',$.extend({},$.ui.dialog.prototype,{_title:function(title){if(!this.options.title){title.html(' ');}else{title.html(this.options.title);}},_focusTabbable:function(){},reposition:function(){this.uiDialog.position(this.options.position);}}));$dialogs.each(function(){var $this=$(this),params=$this.data(),styles=params.dialogStyle.split(' '),options={position:{my:params.dialogPosmy||'left top',at:params.dialogPosat||'right top',of:params.dialogPosof||window,collision:'none',using:function(position,feedback){var hook='',$dialogContainer=$(this);if($dialogContainer.hasClass('dialog-has-hook')){$('.dialog-hook',$dialogContainer).remove();if(params.dialogHookalign){feedback.horizontal=params.dialogHookalign;} 1084if($.inArray('dialog-has-hook-outline',styles)>-1){hook='<div class="dialog-hook has-outline dialog-hook-'+feedback.horizontal+'"></div>'+'<div class="dialog-hook dialog-hook-'+feedback.horizontal+'"></div>';}else if($.inArray('dialog-error',styles)>-1||$.inArray('dialog-success',styles)>-1){hook='<div class="dialog-hook dialog-hook-'+feedback.horizontal+'"></div>';}} 1085$(hook).appendTo($dialogContainer);$dialogContainer.css(position);}},dialogClass:params.dialogStyle||'',classes:{'ui-dialog':params.dialogStyle||'',},title:params.dialogTitle||'',appendTo:params.dialogParent||'body',width:params.dialogWidth||260,height:params.dialogHeight||'auto',closeText:'',minHeight:'auto',autoOpen:params.dialogOpen||false,closeOnEscape:false,resizeable:false,draggable:false};if(ACTION==='itinerary'){if(!params.dialogParent){options.appendTo=$this.parents('.pages');}} 1086$this.dialog(options);});});}(jQuery)); 1087try{window.sessionStorage=window.sessionStorage||{length:0,setItem:function(){},getItem:function(){},removeItem:function(){},clear:function(){},key:function(){}};}catch(err){} 1088(function($){$.preload=function(aImages){if(typeof aImages==='object'){$(aImages).each(function(){$('<img />',{src:this});});}};}(jQuery));$(window).load(function(){try{$('img.preload-image-cache').each(function(){var $this=$(this);$this.attr('src',$this.data('src'));});if(!window.sessionStorage.getItem('_preload__16a3a38a')){$.preload(window.aImages);window.sessionStorage.setItem('_preload__16a3a38a','16a3a38a');}}catch(err){}}); 1089var init_tooltips;(function($){$(document).ready(function(){init_tooltips=function($Tooltips){var $tooltips=$Tooltips||$('.js_tooltip',document),posMyDefaults=((typeof LAYOUT!=='undefined'&&LAYOUT==='kingfisher')?'center bottom-10':'left-20 bottom-10');$tooltips.each(function(){var $this=$(this),params=$this.data()||{},toolTipTimer,styles=params.tooltipStyle?'tooltip '+params.tooltipStyle:'tooltip tooltip-default',options={position:{my:params.tooltipPosmy||posMyDefaults,at:params.tooltipPosat||'center top',using:function(position,feedback){var $this=$(this),aStyles=styles.split(' '),hook=null;if(($.inArray('tooltip-default',aStyles)>-1||$.inArray('tooltip-has-hook',aStyles)>-1)&&$.inArray('tooltip-disable-hook',aStyles)===-1){if(params.tooltipHookalign){feedback.horizontal=params.tooltipHookalign;} 1090hook='<div class="tooltip-hook tooltip-hook-'+feedback.horizontal+' tooltip-hook-'+feedback.vertical+'-outline tooltip-hook-outline"></div>'+'<div class="tooltip-hook tooltip-hook-'+feedback.horizontal+' tooltip-hook-'+feedback.vertical+'"></div>';$(hook).appendTo(this);} 1091$this.css(position);}},content:function(){var content='',$this=$(this),contentSelector=params.tooltipContent||null;if(params.tooltipClosingx){content+='<span href="javascript:void(0);" style="float:right; cursor: pointer" class="icon-close close-icon js_close_tooltip"></span>';} 1092if(params.tooltipTitle){content+='<div class="tooltip-title">'+params.tooltipTitle+'</div>';} 1093if(contentSelector){if(contentSelector==='_next'){content+=$this.next('.js_tooltipContent').html();}else{content+=$(params.tooltipContent).html();}}else{content+=$this.attr('title');} 1094return content;},items:'.js_tooltip',show:false,open:function(event,ui){if(params.tooltipAlternatehandling){var element=ui.tooltip;element.on('mouseenter',function(){clearTimeout(toolTipTimer);});element.on('mouseleave',function(){clearTimeout(toolTipTimer);$this.tooltip('close');});if(params.tooltipClosingx){var close=element.find('.js_close_tooltip');close.on('click',function(){clearTimeout(toolTipTimer);$this.tooltip('close');});}}},close:function(event,ui){var element=ui.tooltip,close=element.find('.js_close_tooltip');element.off('mouseenter');element.off('mouseleave');$this.off('mouseleave');close.off('click');},classes:{"ui-tooltip":styles}};if(params.tooltipAlternatehandling){$this.tooltip(options).on('mouseout',function(event){event.stopImmediatePropagation();toolTipTimer=setTimeout(function(){$this.tooltip('close');},500);});}else{$this.tooltip(options);}});};init_tooltips();});}(jQuery)); 1095function popup(url,media,name){var width=0,height=0,options='location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no';switch(media){case'print':{width=700;height=480;break;} 1096case'info':{width=360;height=480;break;} 1097case'screen':{width=800;height=600;options='location=yes, menubar=yes, resizable=yes, status=yes, scrollbars=yes, toolbar=yes';break;} 1098case'faq':{width=960;height=600;options='location=yes, menubar=yes, resizable=yes, status=yes, scrollbars=yes, toolbar=no';break;} 1099case'faqbig':{width=1270;height=600;options='location=yes, menubar=yes, resizable=yes, status=yes, scrollbars=yes, toolbar=no';break;} 1100case'flightinfo':{width=600;height=400;break;} 1101case'voucher':{width=1020;height=540;options='location=no, menubar=no, resizable=no, status=no, scrollbars=yes, toolbar=no';break;} 1102case'itinerary':{width=620;height=700;break;} 1103case'itinerarybig':{width=900;height=750;break;} 1104case'vaitin':{width=620;height=400;break;} 1105case'tariffinfo':{width=450;height=600;break;} 1106case'lctariffinfo':{width=800;height=600;break;} 1107case'cvc':{width=500;height=400;break;} 1108case'evaluation':{width=660;height=680;break;} 1109case'agb':{width=960;height=600;break;} 1110case'agbbig':{width=1270;height=600;break;} 1111case'hotelinfo':{width=900;height=750;break;} 1112case'partner':{width=550;height=750;break;} 1113case'voucherCampaign':{width=925;height=435;break;}}
1114var left=(screen.availWidth-width)/2,top=(screen.availHeight-height)/2;options=options+', left='+String(left)+', screenX='+String(left)+', top='+String(top)+', screenY='+String(top)+', height='+String(height)+', width='+String(width);if(!name){name='popup';} 1115window.open(url,name,options).focus();} 1116(function($){'use strict';$.app=$.app||{};$.app.scrollToElement=function(elementSelector,customScrollTime,customOffset){var $scrollToElement=$(elementSelector),scrollTime=customScrollTime||200,bOffset=customOffset||0;jQuery.fx.off=false;$('html, body').animate({scrollTop:$scrollToElement.offset().top-bOffset},scrollTime,'swing',function(){jQuery.fx.off=true;});};})(jQuery); 1117(function($){'use strict';$.toggleOffers=function(elementContainer,elementSelector,toggleElement,limiter){$(elementContainer).each(function(){var $this=$(this),$countElements=$this.children(elementSelector).length;$this.find(elementSelector).show();$this.find(elementSelector+':eq('+limiter+')').hide();$this.find(elementSelector+':gt('+limiter+')').hide();if($countElements<=limiter){$this.next(toggleElement).hide();} 1118if($countElements>limiter){$this.next(toggleElement).show();}});$(toggleElement).on('click',function(){var $this=$(this);$this.prev().find(elementSelector).show();$this.hide();});};})(jQuery); 1119;(function($,window,document){'use strict';$.itineraries=$.itineraries||{};$.itineraries.scrollTop=$.itineraries.scrollTop||{};(function(){var _this=this;_this.btnIsVisible=false;_this.btnIsStatic=false;_this.options={footerHeight:0,documentHeight:0,screenHeight:0,toggleBreakpoint:20,$scrollButton:$('.js_btn-top')};_this.scrollEvent=function(){var position=window.pageYOffset||document.documentElement.scrollTop,$btn=_this.options.$scrollButton,staticBreakpoint=_this.options.documentHeight-_this.options.footerHeight,offsetY=position+_this.options.screenHeight;if(!_this.btnIsVisible&&position>=_this.options.toggleBreakpoint){$btn.show();_this.btnIsVisible=true;}else if(_this.btnIsVisible&&position<_this.options.toggleBreakpoint){$btn.hide();_this.btnIsVisible=false;} 1120if(!_this.btnIsStatic&&offsetY>=staticBreakpoint){$btn.addClass('is-static');_this.btnIsStatic=true;}else if(_this.btnIsStatic&&offsetY<staticBreakpoint){$btn.removeClass('is-static');_this.btnIsStatic=false;}};_this.update=function(){setDocumentHeight();_this.scrollEvent();return _this;};var setFooterHeight=function(){var height=$('#footer').height();_this.options.footerHeight=height;return height;};var setScreenHeight=function(){var height=$(window).height();_this.options.screenHeight=height;return height;};var setDocumentHeight=function(){var height=$(document).height();_this.options.documentHeight=height;return height;};_this.init=function(){setFooterHeight();setScreenHeight();setDocumentHeight();if(!_this.options.$scrollButton.hasClass('is-static')){$(window).on('scroll.toTop',function(){_this.scrollEvent();});} 1121_this.options.$scrollButton.on('click',function(){$.app.scrollToElement('body',500);});};}).apply($.itineraries.scrollTop);$(function(){$.itineraries.scrollTop.init();});})(jQuery,window,document,undefined); 1122(function($){'use strict';window.ibe=ibe||{};ibe.itineraries=ibe.itineraries||{};ibe.itineraries.toolbox=ibe.itineraries.toolbox||{};(function(){this.options=ibe.itineraries.toolbox.options||{};this.options.mode=ibe.itineraries.toolbox.options.mode||'hover';this.options.scope=ibe.itineraries.toolbox.options.scope||'#offerlist';this.options.itin=ibe.itineraries.toolbox.options.itin||'.listbg1';this.options.bookedUp=ibe.itineraries.toolbox.options.bookedUp||0;var _this=this;var _bindItinEvents=function(){$(document).on('mouseenter',_this.options.scope+' '+_this.options.itin,function(){$(this).addClass('hover');}).on('mouseleave',_this.options.scope+' '+_this.options.itin,function(){$(this).removeClass('hover');});};var _offerlistDesignInit=function(){$('div.listbg1 > div > input',_this.options.scope).attr('checked',false);$('div.outbound > div.listbg1:first-child > div > div > input:enabled, div.inbound > div.listbg1:last-child > div > div > input:enabled',_this.options.scope).attr('checked',true);$(_this.options.itin).has('input:checked').addClass('offerActive');};var _doLogic=function(){if(_this.options.mode==='enter'){$(_this.options.scope).on('mouseenter','div.listbg1 > div > div > div.altDate',function(){$(this).find('div:first-child').toggle();});}else if(_this.options.mode==='hover'){$(_this.options.scope).on('hover','div.listbg1 > div > div > div.altDate',function(){$(this).find('div:first-child').toggle();});} 1123$(_this.options.scope).on('click','div.listbg1',function(){$(this).addClass('activated');$(this).parent().find('div.listbg1:not(:has(.activated))').removeClass('offerActive');$(this).addClass('offerActive').removeClass('activated');
1123$(this).parent().find('input[type="radio"]').attr('checked',false);$(this).find('input[type="radio"]:first').attr('checked',true);});$(document).on('radioPlacingInit',_this.options.scope,function(){if(_this.options.bookedUp>0){$('div.outbound:not(:has(input:radio)), div.inbound:not(:has(input:radio))').parents('div.flightSelectForm').remove();} 1124_offerlistDesignInit();});_offerlistDesignInit();};this.init=function(){_bindItinEvents();_doLogic();};}).apply(ibe.itineraries.toolbox);})(jQuery); 1125;(function($){'use strict';window.ibe=ibe||{};ibe.wait=ibe.wait||{};(function(){var typePreloader=function(){var $form=$(this),setDefaultLogo=$form.attr('data-defaultAirlineLogo'),airlineClass,arrCarrier=$form.data('carrier'),arrCarrierLength=arrCarrier.length,airlineIATA,airlineName='',airlineHTML='',basicClass='',i=0,isOws=(arrCarrierLength>=2);for(i;i<arrCarrierLength;i++){airlineIATA=arrCarrier[i];airlineName=airlineDecode[arrCarrier[i]]||'';if(airlineName.length>='15'){airlineName=jQuery.trim(airlineName).substring(0,14)+'.';} 1126if(isOws===true){basicClass='ows-airline';} 1127else{basicClass='regular-airline';} 1128if(setDefaultLogo===true){airlineClass='';} 1129else{airlineClass='AL_'+airlineIATA;} 1130airlineHTML+='<div class="'+basicClass+'"><div class="airline-name name-'+i+'">'+airlineName+'</div>';airlineHTML+='<div class="logo-'+i+' airlinesL '+airlineClass+'"></div></div>';} 1131if(isOws===true){$('.js_ows-message').show();} 1132else{$('.js_regular-message').show();} 1133$('#spinnerAirlines').append(airlineHTML);$('#loaderContent').show();$('body').preloader('show',{html:$('#loaderContent'),wrapperClass:'waitbox-layer'});};var typeNonPreloader=function(){var showWaitBox=function(carrier,setDefaultLogo,form){var sel=$('#wait23 .airline'),carrierLength=carrier.length,isOws=(carrierLength>=2),airlineClass,i=0;for(i;i<carrierLength;i++){var carrierkurz=airlineDecode[carrier[i]];if(carrierkurz&&carrierkurz.length>='20'){carrierkurz=jQuery.trim(carrierkurz).substring(0,19)+'…';} 1134if(setDefaultLogo==='true'){airlineClass='';} 1135else{airlineClass='AL_'+carrier[i];} 1136sel.append('<div class="airline-name" title="'+airlineDecode[carrier[i]]+'">'+carrierkurz+'</div><div class="airlinesL '+airlineClass+'" title="'+airlineDecode[carrier[i]]+'"></div>');} 1137if(isOws===true){$('.js_ows-message').show();} 1138else{$('.airline-name').addClass('onlyone');$('.js_regular-message').show();} 1139$.colorbox({overlayClose:false,close:false,title:'',scrolling:false,escKey:false,inline:true,href:'#wait23',onComplete:function(){$('#cboxClose').hide();}});};var $this=$(this),setDefaultLogo=$this.attr('data-defaultAirlineLogo'),carrier=$this.data('carrier');showWaitBox(carrier,setDefaultLogo,$this);};this.showPreloader=function(sType,sClickInPortal){if(sType==='metaClickIn'){$('body').preloader('show',{text:'Sie werden zu <div class="portal-name">'+sClickInPortal+'</div> weitergeleitet um Ihre Buchung durchzuführen.',hintText:'Bitte warten Sie wenige Sekunden.',addContentClass:'click-in-portal-preloader',wrapper:'preloaderContent'});} 1140else if(sType==='itinerary-loader'){$('body').preloader('show',{text:'Wir prüfen nun Verfügbarkeiten und Preise direkt bei der Fluggesellschaft.',hintText:'Bitte warten Sie wenige Sekunden.',wrapperClass:'reload-layer',wrapper:'preloaderContent'});} 1141else if(sType==='preloader'){typePreloader.call(this);} 1142else{typeNonPreloader.call(this);}};}).apply(ibe.wait);})(jQuery); 1143var NoticeLayer=function(params){'use strict';params=params||{};var _this=this,_opts=params.options||{},_debug=params.debug||false,_layer={};if(_debug===true){_this.layer=_layer;_this.options=_opts;} 1144_this.config={init:false,count:0,items:[]};_this.preCalculation=function(name,elem){$(elem).dialog('open');_layer[name].height=$(elem).parent('div').outerHeight(true);$(elem).dialog('close');};_this.calculatePosition=function(elem){var ref=$(_opts.positioning.reference),width=ref.width()+ref.offset().left+_opts.positioning.space;$(elem).dialog('option','position').at='left+'+width+' bottom-20';};_this.slide=function(name){$.each(_this.config.items,function(index,value){var position=parseInt($(value).parent('div').css('top'),10),dialogPosYDiff=_layer[name].height+10;$.fx.off=false;$(value).parent('div').animate({'top':position-dialogPosYDiff},600);$.fx.off=true;});};_this.remove=function(id){var index=$.inArray(id,_this.config.items);_this.config.items.splice(index,1);_this.config.count--;$(id).dialog().remove();};_this.build=function(options){if(typeof(options)==='object'){_layer[options.name]={};_this.preCalculation(options.name,options.id);
1144if(_opts.adjustable===true){_this.calculatePosition(options.id);} 1145_layer[options.name].timer=new InstanceTimer({actionExec:options.start,timerStop:options.stop,onActionStart:function(){setTimeout(function(){$(options.id).dialog('open');_this.config.items.push(options.id);_this.config.count++;},550);if(_this.config.count>0){_this.slide(options.name);}},onTimerEnd:function(){if(_debug!==true){_this.remove(options.id);}}});_layer[options.name].timer.start();}};_this.init=(function(){_this.config.init=true;}());return _this;}; 1146;(function($){$(function(){LazyLoad.prototype.bind({callback:function($img){var $thisParent=$img.parents('.js_image-container'),$thisLoader=$thisParent.find('.js_loading-animation');if($thisLoader.length>0){$thisLoader.hide();} 1147$thisParent.addClass('image-loaded');}});});})(jQuery); 1148var Timer=function(oConfig){'use strict';var _this=this;_this.instance=function(){};this.oConfig=$.extend({countdownTime:600000,endTimestamp:null,element:null},oConfig);var _timerFinished=oConfig.onTimerFinished||$.noop;var _getSeconds=function(timeDiff){return('0'+Math.floor((timeDiff/1000)%60)).slice(-2);};var _getMinutes=function(timeDiff){return('0'+Math.floor((timeDiff/1000/60)%60)).slice(-2);};var _getTimeRemaining=function(){var timestamp=_this.oConfig.endTimestamp-new Date().getTime();var returnValues={total:timestamp,minutes:_getMinutes(timestamp),seconds:_getSeconds(timestamp)};return returnValues;};var _updateTimer=function(){var t=_getTimeRemaining();if(_this.oConfig.element!==null){_this.oConfig.element.text(t.minutes+':'+t.seconds);} 1149if(t.total<=0){_this.stop();_timerFinished();}};var _initializeTimer=function(){_updateTimer();_this.instance=setInterval(_updateTimer,250);};_this.start=function(){_this.oConfig.endTimestamp=new Date().getTime()+_this.oConfig.countdownTime;_initializeTimer();};_this.stop=function(){clearInterval(_this.instance);if(_this.oConfig.element!==null){_this.oConfig.element.text('00:00');}};_this.setDefaultValue=function(){clearInterval(_this.instance);if(_this.oConfig.element!==null){_this.oConfig.element.text(_getMinutes(_this.oConfig.countdownTime)+':'+_getSeconds(_this.oConfig.countdownTime));}};return _this;}; 1150$(function(){$.xhrPool={cache:{}};$.xhrPool.abortAll=function(){$.each($.xhrPool.cache,function(idx,jqXHR){jqXHR.abort();});$.xhrPool.cache={};};$.ajaxSetup({beforeSend:function(jqXHR){if(this.name){$.xhrPool.cache[this.name]=jqXHR;}},complete:function(){if(this.name&&$.xhrPool.cache[this.name]){delete($.xhrPool.cache[this.name]);}}});}); 1151var searchForm={};searchForm.Construct=function(modules){var _this=this;_this.options={};_this.cache={scope:$('#sflight')};_this.model={};for(var mod in modules){if(modules.hasOwnProperty(mod)===true){if(searchForm.hasOwnProperty(mod)===true){searchForm[mod].call(_this);if(modules[mod].hasOwnProperty('options')===true){$.extend(true,_this.options,modules[mod].options);} 1152if(modules[mod].hasOwnProperty('cache')===true){$.extend(true,_this.cache,modules[mod].cache);} 1153if(modules[mod].hasOwnProperty('model')===true){$.extend(true,_this.model,modules[mod].model);} 1154if(_this.hasOwnProperty(mod+'Init')===true){_this[mod+'Init']();}}}}};searchForm._flight=function(){var _this=this;_this.options=$.extend(true,_this.options,{onFormSubmit:$.noop});_this.cache=$.extend(true,_this.cache,{});_this.model=$.extend(true,_this.model,{});var formSubmitCallback=function(options,model,cache){options=options||_this.options;model=model||_this.model;cache=cache||_this.cache;return _this.options.onFormSubmit.call(_this,options,model,cache);};var resetSubmitState=function($form){$form.removeData('searchFormSubmitted');$form.find('button[type="submit"], input[type="submit"], #js_submitSearchForm').prop('disabled',false);};var submitHandling=function(){var $scope=_this.cache.scope;var submitBtnSelector='button[type="submit"], input[type="submit"], #js_submitSearchForm';$scope.validationEngine('attach',{onValidationComplete:function(form,status){if(status===true){ga4CustomTrackEvent('flight_search',{page_type:'homepage',form_validation:'after'});}else{_this._triggerFieldValidationErrors(form);
1154$(document).trigger('search-validation-failed');setTimeout(function(){resetSubmitState($scope);},0);} 1155return status;}});$scope.on('click',submitBtnSelector,function(event){var $btn=$(this);if($scope.data('searchFormSubmitted')===true){event.preventDefault();return false;} 1156$scope.data('searchFormSubmitted',true);setTimeout(function(){$btn.prop('disabled',true);},0);});$(window).on('pageshow',function(event){if(event.originalEvent&&event.originalEvent.persisted===true){resetSubmitState($scope);}});};_this._triggerFieldValidationErrors=function(form){if(typeof _this.options.fieldValidationErrorTrigger!=='undefined'&&form.data('jqv').InvalidFields.length>0){var invalidFields=form.data('jqv').InvalidFields;for(var i=0;i<invalidFields.length;i++){$(invalidFields[i]).trigger(_this.options.fieldValidationErrorTrigger);}}};_this._flightInit=function(){submitHandling();};};searchForm._passengers=function(){var _this=this;_this.options=$.extend(true,_this.options);_this.cache=$.extend(true,_this.cache,{adultSelect:$('#adultSelector'),childSelect:$('#childSelector'),infantSelect:$('#infantSelector')});_this.model=$.extend(true,_this.model,{selectedAdults:1,selectedChildren:0,selectedInfants:0});var eventAdults=function(){var $this=$(this),value=$this.find('option:selected').val();_this.model.selectedAdults=parseInt(value,10);_this.cache.childSelect.html(buildOptions('children',9-_this.model.selectedAdults)).change();_this.cache.infantSelect.html(buildOptions('infants',_this.model.selectedAdults)).change();};var eventChildren=function(){var $this=$(this),value=$this.find('option:selected').val();_this.model.selectedChildren=parseInt(value,10);};var eventInfants=function(){var $this=$(this),value=$this.find('option:selected').val();_this.model.selectedInfants=parseInt(value,10);};var buildOptions=function(type,max){var i=0,html=[],stillSelected=false;type=type.charAt(0).toUpperCase()+type.slice(1);while(i<=max){html.push('<option value="',i,'" ');if(i===_this.model['selected'+type]){stillSelected=true;html.push('selected="selected"');} 1157html.push('>',i,' ');if(i===1){html.push(_this.options['optionLabel'+type].singular);} 1158else{html.push(_this.options['optionLabel'+type].plural);} 1159html.push('</option>');i++;} 1160if(stillSelected===false){_this.model['selected'+type]=0;} 1161return html.join('');};var updateModel=function(){_this.model.selectedAdults=parseInt(_this.cache.adultSelect.find('option:selected').val(),10);_this.model.selectedChildren=parseInt(_this.cache.childSelect.find('option:selected').val(),10);_this.model.selectedInfants=parseInt(_this.cache.infantSelect.find('option:selected').val(),10);};var bindEvents=function(){_this.cache.adultSelect.on('change',eventAdults);_this.cache.childSelect.on('change',eventChildren);_this.cache.infantSelect.on('change',eventInfants);};_this._passengersInit=function(){_this.options=$.extend(true,_this.options,{optionLabelChildren:{singular:_this.cache.childSelect.data('option-singular'),plural:_this.cache.childSelect.data('option-plural')},optionLabelInfants:{singular:_this.cache.infantSelect.data('option-singular'),plural:_this.cache.infantSelect.data('option-plural')}});updateModel();bindEvents();return this;};};searchForm._passengersInput=function(){var _this=this;_this.options=$.extend(true,_this.options,{});var eventAdults=function(){setOptions('chd',9-_this.options.adt.config.currentValue);setOptions('inf',_this.options.adt.config.currentValue);};var setOptions=function(elem,max){_this.options[elem].options.max=parseInt(max,10);if(_this.options[elem].options.max<_this.options[elem].config.currentValue){_this.options[elem].config.currentValue=max;_this.options[elem].config.input.val(max);}else if(_this.options[elem].options.min>_this.options[elem].config.currentValue){_this.options[elem].config.currentValue=_this.options[elem].options.min;_this.options[elem].config.input.val(_this.options[elem].options.min);} 1162_this.options[elem].checkStatus();};var bindEvents=function(){_this.options.adt.config.input.on('change',eventAdults);};_this._passengersInputInit=function(){bindEvents();eventAdults();};};searchForm._flightType=function(){var _this=this;_this.options=$.extend(true,_this.options,{oJEnabled:false,elementType:'radio',flightTypeTrigger:'input.radio',flightTypeScope:'.js_flight-type',onFlightTypeChange:$.noop});_this.cache=$.extend(true,_this.cache,{flightTypeScope:$(_this.options.flightTypeScope),f0Date:$('#f0Date'),f1Date:$('#f1Date'),f1TimeRange:$('#f1TimeRange'),openJawScope:$('.js_oj'),nonOpenJawScope:$('.js_non-oj'),autoCompleteInput:$('input.js-autocomplete-hidden')});_this.cache.ojFields=_this.cache.openJawScope.find('input, select, button');_this.cache.nonOjFields=_this.cache.nonOpenJawScope.find('input, select, button');_this.cache.flightTypeTrigger=_this.cache.flightTypeScope.length>0?_this.cache.flightTypeScope.find(_this.options.flightTypeTrigger):$(_this.options.flightTypeTrigger);_this.cache.airports={f0:{depLocation:$('#f0-dep-location-',_this.cache.scope),arrLocation:$('#f0-arr-location-',_this.cache.scope)},f1:{depLocation:$('#f1-dep-location-',_this.cache.scope),arrLocation:$('#f1-arr-location-',_this.cache.scope)}};_this.model=$.extend(true,_this.model,{selected:'RT'});var detectElementType=function(){if(_this.cache.flightTypeTrigger.find('option').length>1){_this.options.elementType='select';}else if(_this.cache.flightTypeTrigger.length>1){_this.options.elementType='radio';}else{_this.options.elementType='checkbox';}};var fetchFlightType=function(){var val='RT',$this;if(_this.options.elementType==='radio'){_this.cache.flightTypeTrigger.each(function(){$this=$(this);if($this.is(':checked')){val=$this.val();return false;}});}else if(_this.options.elementType==='checkbox'){val=_this.cache.flightTypeTrigger.is(':checked')?_this.cache.flightTypeTrigger.val():'RT';}else{val=_this.cache.flightTypeTrigger.find('option:selected').val();} 1163return val;};var flightTypeChangeCallback=function(prevFlightType,options,model,cache){options=options||_this.options;model=model||_this.model;cache=cache||_this.cache;_this.options.onFlightTypeChange.call(_this,options,model,cache,prevFlightType);_this.cache.autoCompleteInput.change();};var handling=function(e,element){var $this=element||$(this),newType=(_this.options.elementType==='select'?$this.find('option:selected').val():$this.val()),prevType=_this.model.selected;if(_this.options.elementType==='checkbox'){newType=_this.cache.flightTypeTrigger.is(':checked')?newType:'RT';} 1164if(_this.options.flightTypeScope!==''){_this.cache.flightTypeScope.removeClass('active');$this.parent(_this.options.flightTypeScope).addClass('active');} 1165_this.model.selected=newType;actions[newType.toLowerCase()].call(_this,prevType,newType);flightTypeChangeCallback(prevType);};var oneWayToggle=function(state){_this.cache.f1TimeRange.attr('disabled',state);_this.cache.f1Date.attr('disabled',state).trigger('disabledChange',[state]).datepicker('option',{disabled:state});if(!state){if(_this.cache.f0Date.hasClass('hasDatepicker')&&_this.cache.f1Date.hasClass('hasDatepicker')&&_this.cache.f1Date.datepicker('getDate')<_this.cache.f0Date.datepicker('getDate')){_this.cache.f1Date.datepicker('show');}else if(_this.cache.f1Date.length&&_this.cache.f1Date.val()===''){_this.cache.f1Date.focus();}}};var openJawToggle=function(state){if(_this.options.oJEnabled===true){_this.cache.nonOpenJawScope.toggle(!state);_this.cache.nonOjFields.attr('disabled',state);_this.cache.openJawScope.toggle(state);_this.cache.ojFields.attr('disabled',!state);}};var mapFieldValues=function(dir){if(_this.options.hasOwnProperty('mapping')===true){var map=_this.options.mapping;
1165for(var field in map){if(map.hasOwnProperty(field)===true){var field1=$('#'+field);if(field1.length>0){var field2=$('#'+map[field]),isCheckbox=(field1[0].type==='checkbox');if(dir==='ltr'){if(isCheckbox===true){field2.prop('checked',field1.prop('checked'));}else{field2.val(field1.val()).change();}}else if(dir==='rtl'){if(isCheckbox===true){field1.prop('checked',field2.prop('checked'));}else{field1.val(field2.val()).change();}}}}}}};var actions={rt:function(prevFlightType){openJawToggle(false);oneWayToggle(false);if(prevFlightType==='OJ'){mapFieldValues('rtl');}},ow:function(prevFlightType){openJawToggle(false);oneWayToggle(true);if(prevFlightType==='OJ'){mapFieldValues('rtl');}},oj:function(){oneWayToggle(false);openJawToggle(true);mapFieldValues('ltr');}};_this._flightTypeInit=function(){_this.cache.flightTypeTrigger=_this.cache.flightTypeScope.length>0?_this.cache.flightTypeScope.find(_this.options.flightTypeTrigger):$(_this.options.flightTypeTrigger);detectElementType();_this.model.selected=fetchFlightType();if(_this.options.elementType==='select'){handling(undefined,$('#'+_this.model.selected).parent('select'));}else{handling(undefined,$('#'+_this.model.selected));} 1166_this.cache.flightTypeTrigger.on('change',handling);};}; 1167;(function(window,document,undefined){$(function(){$.each(['show','hide'],function(i,event){var el=$.fn[event];$.fn[event]=function(){var fn=el.apply(this,arguments);this.trigger(event);return fn;};});});})(window,document); 1168var currentLoginPosition='header';var currentLoginPageType;var currentLoginMethod;function setLoginContext(position,pageType){currentLoginPosition=position||'header';currentLoginPageType=pageType;currentLoginMethod=undefined;} 1169function openLoginLayer(){modal.open({content:'#customer-account-login-modal-content',modalClass:'customer-account-login-modal',buttonClose:true,overlayClose:false});} 1170function openLoginLayerBlocker(){setLoginContext('checkout','checkout_itinerary_2');modal.open({content:'#customer-account-login-modal-content-block',modalClass:'customer-account-login-modal',buttonClose:true,overlayClose:false});} 1171$(function(){$(document).on('click','.js-open-customer-account-login-layer, .js-open-customer-account-registration-layer, .js-customer-account-logout',function(){var $trigger=$(this);setLoginContext($trigger.data('loginPosition'),$trigger.data('loginPageType'));});$('.js-customer-account-login-form, .js-customer-account-register').on('submit.customerLogin',function(){currentLoginMethod='email';});$(document).on('click','.js-customer-login-facebook, .js-customer-login-google, .js-customer-login-apple',function(){var $trigger=$(this);if($trigger.hasClass('js-customer-login-facebook')){currentLoginMethod='facebook';} 1172else if($trigger.hasClass('js-customer-login-google')){currentLoginMethod='google';} 1173else{currentLoginMethod='apple';}});$(document).on('click','.js-customer-login-twitter',function(){currentLoginMethod=undefined;});$(document).on('account-token-success',function(event,source){var accountToken=ibe.customerLoginService&&((ibe.customerLoginService.viewModel&&ibe.customerLoginService.viewModel.customer.accountToken)||ibe.customerLoginService.customer.accountToken)||'';if(!!accountToken){var data={'account-token':accountToken,'eventAction':ACTION,'eventController':CONTROLLER,'source':source,'page_position':currentLoginPosition};if(currentLoginMethod){data.account_type=currentLoginMethod;} 1174if(currentLoginPageType){data.page_type=currentLoginPageType;} 1175$.ajax({type:'POST',cache:false,url:SECURE_URL+'/ajax/verify-token',data:data});}});$(document).on('logout-success',function(){var data={'source':'logout','eventAction':ACTION,'eventController':CONTROLLER,'page_position':currentLoginPosition};if(currentLoginPageType){data.page_type=currentLoginPageType;} 1176$.ajax({type:'POST',cache:false,url:SECURE_URL+'/ajax/verify-token',data:data});});})
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.