/*! For license information please see LICENSES */
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="bda4df00-9e93-4ae0-b9de-b6d4d61c9a59",e._sentryDebugIdIdentifier="sentry-dbid-bda4df00-9e93-4ae0-b9de-b6d4d61c9a59")}catch(e){}}();var _global="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};_global.SENTRY_RELEASE={id:"92779be383800b2f5437c669e8e3af263ba75574"},(window.webpackJsonp=window.webpackJsonp||[]).push([[416],[function(e,t,n){"use strict";n.d(t,"b",(function(){return W}));var r=function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};Object.create;Object.create;var o=n(129);function c(source,e,t){return new o.a("Syntax Error: ".concat(t),void 0,source,[e])}var l=n(10),d=n(32),h=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"}),f=n(77),m=n(22),v=n(26),_=n(94);function y(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var E=function(){function e(body){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof body||Object(v.a)(0,"Body must be a string. Received: ".concat(Object(m.a)(body),".")),this.body=body,this.name=e,this.locationOffset=t,this.locationOffset.line>0||Object(v.a)(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||Object(v.a)(0,"column in locationOffset is 1-indexed and must be positive.")}var t,n,r;return t=e,(n=[{key:f.a,get:function(){return"Source"}}])&&y(t.prototype,n),r&&y(t,r),e}();var C=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"}),w=n(227),S=function(){function e(source){var e=new d.b(h.SOF,0,0,0,0,null);this.source=source,this.lastToken=e,this.token=e,this.line=1,this.lineStart=0}var t=e.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var e=this.token;if(e.kind!==h.EOF)do{var t;e=null!==(t=e.next)&&void 0!==t?t:e.next=A(this,e)}while(e.kind===h.COMMENT);return e},e}();function T(code){return isNaN(code)?h.EOF:code<127?JSON.stringify(String.fromCharCode(code)):'"\\u'.concat(("00"+code.toString(16).toUpperCase()).slice(-4),'"')}function A(e,t){for(var source=e.source,body=source.body,n=body.length,r=t.end;r<n;){var code=body.charCodeAt(r),o=e.line,l=1+r-e.lineStart;switch(code){case 65279:case 9:case 32:case 44:++r;continue;case 10:++r,++e.line,e.lineStart=r;continue;case 13:10===body.charCodeAt(r+1)?r+=2:++r,++e.line,e.lineStart=r;continue;case 33:return new d.b(h.BANG,r,r+1,o,l,t);case 35:return O(source,r,o,l,t);case 36:return new d.b(h.DOLLAR,r,r+1,o,l,t);case 38:return new d.b(h.AMP,r,r+1,o,l,t);case 40:return new d.b(h.PAREN_L,r,r+1,o,l,t);case 41:return new d.b(h.PAREN_R,r,r+1,o,l,t);case 46:if(46===body.charCodeAt(r+1)&&46===body.charCodeAt(r+2))return new d.b(h.SPREAD,r,r+3,o,l,t);break;case 58:return new d.b(h.COLON,r,r+1,o,l,t);case 61:return new d.b(h.EQUALS,r,r+1,o,l,t);case 64:return new d.b(h.AT,r,r+1,o,l,t);case 91:return new d.b(h.BRACKET_L,r,r+1,o,l,t);case 93:return new d.b(h.BRACKET_R,r,r+1,o,l,t);case 123:return new d.b(h.BRACE_L,r,r+1,o,l,t);case 124:return new d.b(h.PIPE,r,r+1,o,l,t);case 125:return new d.b(h.BRACE_R,r,r+1,o,l,t);case 34:return 34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2)?L(source,r,o,l,t,e):N(source,r,o,l,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return I(source,r,code,o,l,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return x(source,r,o,l,t)}throw c(source,r,R(code))}var line=e.line,col=1+r-e.lineStart;return new d.b(h.EOF,n,n,line,col,t)}function R(code){return code<32&&9!==code&&10!==code&&13!==code?"Cannot contain the invalid character ".concat(T(code),"."):39===code?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(T(code),".")}function O(source,e,line,col,t){var code,body=source.body,n=e;do{code=body.charCodeAt(++n)}while(!isNaN(code)&&(code>31||9===code));return new d.b(h.COMMENT,e,n,line,col,t,body.slice(e+1,n))}function I(source,e,t,line,col,n){var body=source.body,code=t,r=e,o=!1;if(45===code&&(code=body.charCodeAt(++r)),48===code){if((code=body.charCodeAt(++r))>=48&&code<=57)throw c(source,r,"Invalid number, unexpected digit after 0: ".concat(T(code),"."))}else r=k(source,r,code),code=body.charCodeAt(r);if(46===code&&(o=!0,code=body.charCodeAt(++r),r=k(source,r,code),code=body.charCodeAt(r)),69!==code&&101!==code||(o=!0,43!==(code=body.charCodeAt(++r))&&45!==code||(code=body.charCodeAt(++r)),r=k(source,r,code),code=body.charCodeAt(r)),46===code||function(code){return 95===code||code>=65&&code<=90||code>=97&&code<=122}(code))throw c(source,r,"Invalid number, expected digit but got: ".concat(T(code),"."));return new d.b(o?h.FLOAT:h.INT,e,r,line,col,n,body.slice(e,r))}function k(source,e,t){var body=source.body,n=e,code=t;if(code>=48&&code<=57){do{code=body.charCodeAt(++n)}while(code>=48&&code<=57);return n}throw c(source,n,"Invalid number, expected digit but got: ".concat(T(code),"."))}function N(source,e,line,col,t){for(var a,b,n,r,body=source.body,o=e+1,l=o,code=0,f="";o<body.length&&!isNaN(code=body.charCodeAt(o))&&10!==code&&13!==code;){if(34===code)return f+=body.slice(l,o),new d.b(h.STRING,e,o+1,line,col,t,f);if(code<32&&9!==code)throw c(source,o,"Invalid character within String: ".concat(T(code),"."));if(++o,92===code){switch(f+=body.slice(l,o-1),code=body.charCodeAt(o)){case 34:f+='"';break;case 47:f+="/";break;case 92:f+="\\";break;case 98:f+="\b";break;case 102:f+="\f";break;case 110:f+="\n";break;case 114:f+="\r";break;case 116:f+="\t";break;case 117:var m=(a=body.charCodeAt(o+1),b=body.charCodeAt(o+2),n=body.charCodeAt(o+3),r=body.charCodeAt(o+4),M(a)<<12|M(b)<<8|M(n)<<4|M(r));if(m<0){var v=body.slice(o+1,o+5);throw c(source,o,"Invalid character escape sequence: \\u".concat(v,"."))}f+=String.fromCharCode(m),o+=4;break;default:throw c(source,o,"Invalid character escape sequence: \\".concat(String.fromCharCode(code),"."))}l=++o}}throw c(source,o,"Unterminated string.")}function L(source,e,line,col,t,n){for(var body=source.body,r=e+3,o=r,code=0,l="";r<body.length&&!isNaN(code=body.charCodeAt(r));){if(34===code&&34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2))return l+=body.slice(o,r),new d.b(h.BLOCK_STRING,e,r+3,line,col,t,Object(w.a)(l));if(code<32&&9!==code&&10!==code&&13!==code)throw c(source,r,"Invalid character within String: ".concat(T(code),"."));10===code?(++r,++n.line,n.lineStart=r):13===code?(10===body.charCodeAt(r+1)?r+=2:++r,++n.line,n.lineStart=r):92===code&&34===body.charCodeAt(r+1)&&34===body.charCodeAt(r+2)&&34===body.charCodeAt(r+3)?(l+=body.slice(o,r)+'"""',o=r+=4):++r}throw c(source,r,"Unterminated string.")}function M(a){return a>=48&&a<=57?a-48:a>=65&&a<=70?a-55:a>=97&&a<=102?a-87:-1}function x(source,e,line,col,t){for(var body=source.body,n=body.length,r=e+1,code=0;r!==n&&!isNaN(code=body.charCodeAt(r))&&(95===code||code>=48&&code<=57||code>=65&&code<=90||code>=97&&code<=122);)++r;return new d.b(h.NAME,e,r,line,col,t,body.slice(e,r))}var D=function(){function e(source,e){var t=function(source){return Object(_.a)(source,E)}(source)?source:new E(source);this._lexer=new S(t),this._options=e}var t=e.prototype;return t.parseName=function(){var e=this.expectToken(h.NAME);return{kind:l.a.NAME,value:e.value,loc:this.loc(e)}},t.parseDocument=function(){var e=this._lexer.token;return{kind:l.a.DOCUMENT,definitions:this.many(h.SOF,this.parseDefinition,h.EOF),loc:this.loc(e)}},t.parseDefinition=function(){if(this.peek(h.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(h.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var e=this._lexer.token;if(this.peek(h.BRACE_L))return{kind:l.a.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(e)};var t,n=this.parseOperationType();return this.peek(h.NAME)&&(t=this.parseName()),{kind:l.a.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseOperationType=function(){var e=this.expectToken(h.NAME);switch(e.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(e)},t.parseVariableDefinitions=function(){return this.optionalMany(h.PAREN_L,this.parseVariableDefinition,h.PAREN_R)},t.parseVariableDefinition=function(){var e=this._lexer.token;return{kind:l.a.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(h.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(h.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(e)}},t.parseVariable=function(){var e=this._lexer.token;return this.expectToken(h.DOLLAR),{kind:l.a.VARIABLE,name:this.parseName(),loc:this.loc(e)}},t.parseSelectionSet=function(){var e=this._lexer.token;return{kind:l.a.SELECTION_SET,selections:this.many(h.BRACE_L,this.parseSelection,h.BRACE_R),loc:this.loc(e)}},t.parseSelection=function(){return this.peek(h.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(h.COLON)?(e=r,t=this.parseName()):t=r,{kind:l.a.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(h.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(n)}},t.parseArguments=function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(h.PAREN_L,t,h.PAREN_R)},t.parseArgument=function(){var e=this._lexer.token,t=this.parseName();return this.expectToken(h.COLON),{kind:l.a.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(e)}},t.parseConstArgument=function(){var e=this._lexer.token;return{kind:l.a.ARGUMENT,name:this.parseName(),value:(this.expectToken(h.COLON),this.parseValueLiteral(!0)),loc:this.loc(e)}},t.parseFragment=function(){var e=this._lexer.token;this.expectToken(h.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(h.NAME)?{kind:l.a.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(e)}:{kind:l.a.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(e)}},t.parseFragmentDefinition=function(){var e,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(e=this._options)||void 0===e?void 0:e.experimentalFragmentVariables)?{kind:l.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:l.a.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(e){var t=this._lexer.token;switch(t.kind){case h.BRACKET_L:return this.parseList(e);case h.BRACE_L:return this.parseObject(e);case h.INT:return this._lexer.advance(),{kind:l.a.INT,value:t.value,loc:this.loc(t)};case h.FLOAT:return this._lexer.advance(),{kind:l.a.FLOAT,value:t.value,loc:this.loc(t)};case h.STRING:case h.BLOCK_STRING:return this.parseStringLiteral();case h.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:l.a.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:l.a.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:l.a.NULL,loc:this.loc(t)};default:return{kind:l.a.ENUM,value:t.value,loc:this.loc(t)}}case h.DOLLAR:if(!e)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var e=this._lexer.token;return this._lexer.advance(),{kind:l.a.STRING,value:e.value,block:e.kind===h.BLOCK_STRING,loc:this.loc(e)}},t.parseList=function(e){var t=this,n=this._lexer.token;return{kind:l.a.LIST,values:this.any(h.BRACKET_L,(function(){return t.parseValueLiteral(e)}),h.BRACKET_R),loc:this.loc(n)}},t.parseObject=function(e){var t=this,n=this._lexer.token;return{kind:l.a.OBJECT,fields:this.any(h.BRACE_L,(function(){return t.parseObjectField(e)}),h.BRACE_R),loc:this.loc(n)}},t.parseObjectField=function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(h.COLON),{kind:l.a.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e),loc:this.loc(t)}},t.parseDirectives=function(e){for(var t=[];this.peek(h.AT);)t.push(this.parseDirective(e));return t},t.parseDirective=function(e){var t=this._lexer.token;return this.expectToken(h.AT),{kind:l.a.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e),loc:this.loc(t)}},t.parseTypeReference=function(){var e,t=this._lexer.token;return this.expectOptionalToken(h.BRACKET_L)?(e=this.parseTypeReference(),this.expectToken(h.BRACKET_R),e={kind:l.a.LIST_TYPE,type:e,loc:this.loc(t)}):e=this.parseNamedType(),this.expectOptionalToken(h.BANG)?{kind:l.a.NON_NULL_TYPE,type:e,loc:this.loc(t)}:e},t.parseNamedType=function(){var e=this._lexer.token;return{kind:l.a.NAMED_TYPE,name:this.parseName(),loc:this.loc(e)}},t.parseTypeSystemDefinition=function(){var e=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(e.kind===h.NAME)switch(e.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(e)},t.peekDescription=function(){return this.peek(h.STRING)||this.peek(h.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseDirectives(!0),r=this.many(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);return{kind:l.a.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r,loc:this.loc(e)}},t.parseOperationTypeDefinition=function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(h.COLON);var n=this.parseNamedType();return{kind:l.a.OPERATION_TYPE_DEFINITION,operation:t,type:n,loc:this.loc(e)}},t.parseScalarTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseDirectives(!0);return{kind:l.a.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.a.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:c,loc:this.loc(e)}},t.parseImplementsInterfaces=function(){var e;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(h.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(h.AMP)||this.peek(h.NAME));return t}return this.delimitedMany(h.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var e;return!0===(null===(e=this._options)||void 0===e?void 0:e.allowLegacySDLEmptyFields)&&this.peek(h.BRACE_L)&&this._lexer.lookahead().kind===h.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(h.BRACE_L,this.parseFieldDefinition,h.BRACE_R)},t.parseFieldDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(h.COLON);var o=this.parseTypeReference(),c=this.parseDirectives(!0);return{kind:l.a.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:c,loc:this.loc(e)}},t.parseArgumentDefs=function(){return this.optionalMany(h.PAREN_L,this.parseInputValueDef,h.PAREN_R)},t.parseInputValueDef=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(h.COLON);var r,o=this.parseTypeReference();this.expectOptionalToken(h.EQUALS)&&(r=this.parseValueLiteral(!0));var c=this.parseDirectives(!0);return{kind:l.a.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:c,loc:this.loc(e)}},t.parseInterfaceTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseDirectives(!0),c=this.parseFieldsDefinition();return{kind:l.a.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:c,loc:this.loc(e)}},t.parseUnionTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseUnionMemberTypes();return{kind:l.a.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o,loc:this.loc(e)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(h.EQUALS)?this.delimitedMany(h.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseEnumValuesDefinition();return{kind:l.a.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o,loc:this.loc(e)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseEnumValueDefinition,h.BRACE_R)},t.parseEnumValueDefinition=function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseDirectives(!0);return{kind:l.a.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r,loc:this.loc(e)}},t.parseInputObjectTypeDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseDirectives(!0),o=this.parseInputFieldsDefinition();return{kind:l.a.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(h.BRACE_L,this.parseInputValueDef,h.BRACE_R)},t.parseTypeSystemExtension=function(){var e=this._lexer.lookahead();if(e.kind===h.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)},t.parseSchemaExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),n=this.optionalMany(h.BRACE_L,this.parseOperationTypeDefinition,h.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return{kind:l.a.SCHEMA_EXTENSION,directives:t,operationTypes:n,loc:this.loc(e)}},t.parseScalarTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseDirectives(!0);if(0===n.length)throw this.unexpected();return{kind:l.a.SCALAR_TYPE_EXTENSION,name:t,directives:n,loc:this.loc(e)}},t.parseObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:l.a.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseInterfaceTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return{kind:l.a.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o,loc:this.loc(e)}},t.parseUnionTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.UNION_TYPE_EXTENSION,name:t,directives:n,types:r,loc:this.loc(e)}},t.parseEnumTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r,loc:this.loc(e)}},t.parseInputObjectTypeExtension=function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return{kind:l.a.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r,loc:this.loc(e)}},t.parseDirectiveDefinition=function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(h.AT);var n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var c=this.parseDirectiveLocations();return{kind:l.a.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:c,loc:this.loc(e)}},t.parseDirectiveLocations=function(){return this.delimitedMany(h.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var e=this._lexer.token,t=this.parseName();if(void 0!==C[t.value])return t;throw this.unexpected(e)},t.loc=function(e){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new d.a(e,this._lexer.lastToken,this._lexer.source)},t.peek=function(e){return this._lexer.token.kind===e},t.expectToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t;throw c(this._lexer.source,t.start,"Expected ".concat(U(e),", found ").concat(P(t),"."))},t.expectOptionalToken=function(e){var t=this._lexer.token;if(t.kind===e)return this._lexer.advance(),t},t.expectKeyword=function(e){var t=this._lexer.token;if(t.kind!==h.NAME||t.value!==e)throw c(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat(P(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(e){var t=this._lexer.token;return t.kind===h.NAME&&t.value===e&&(this._lexer.advance(),!0)},t.unexpected=function(e){var t=null!=e?e:this._lexer.token;return c(this._lexer.source,t.start,"Unexpected ".concat(P(t),"."))},t.any=function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r},t.optionalMany=function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]},t.many=function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r},t.delimitedMany=function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n},e}();function P(e){var t=e.value;return U(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function U(e){return function(e){return e===h.BANG||e===h.DOLLAR||e===h.AMP||e===h.PAREN_L||e===h.PAREN_R||e===h.SPREAD||e===h.COLON||e===h.EQUALS||e===h.AT||e===h.BRACKET_L||e===h.BRACKET_R||e===h.BRACE_L||e===h.PIPE||e===h.BRACE_R}(e)?'"'.concat(e,'"'):e}var B=new Map,F=new Map,V=!0,j=!1;function H(e){return e.replace(/[\s,]+/g," ").trim()}function $(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,o=H((l=e.loc).source.body.substring(l.start,l.end)),c=F.get(r);c&&!c.has(o)?V&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):c||F.set(r,c=new Set),c.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var l})),r(r({},e),{definitions:n})}function z(source){var e=H(source);if(!B.has(e)){var t=function(source,e){return new D(source,e).parseDocument()}(source,{experimentalFragmentVariables:j,allowLegacyFragmentVariables:j});if(!t||"Document"!==t.kind)throw new Error("Not a valid GraphQL document.");B.set(e,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"==typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}($(t)))}return B.get(e)}function W(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];"string"==typeof e&&(e=[e]);var r=e[0];return t.forEach((function(t,i){t&&"Document"===t.kind?r+=t.loc.source.body:r+=t,r+=e[i+1]})),z(r)}var K,G=W,Y=function(){B.clear(),F.clear()},X=function(){V=!1},Z=function(){j=!0},Q=function(){j=!1};(K=W||(W={})).gql=G,K.resetCaches=Y,K.disableFragmentWarnings=X,K.enableExperimentalFragmentVariables=Z,K.disableExperimentalFragmentVariables=Q,W.default=W;t.a=W},,,,function(e,t,n){"use strict";n.r(t),n.d(t,"__extends",(function(){return o})),n.d(t,"__assign",(function(){return c})),n.d(t,"__rest",(function(){return l})),n.d(t,"__decorate",(function(){return d})),n.d(t,"__param",(function(){return h})),n.d(t,"__metadata",(function(){return f})),n.d(t,"__awaiter",(function(){return m})),n.d(t,"__generator",(function(){return v})),n.d(t,"__createBinding",(function(){return _})),n.d(t,"__exportStar",(function(){return y})),n.d(t,"__values",(function(){return E})),n.d(t,"__read",(function(){return C})),n.d(t,"__spread",(function(){return w})),n.d(t,"__spreadArrays",(function(){return S})),n.d(t,"__await",(function(){return T})),n.d(t,"__asyncGenerator",(function(){return A})),n.d(t,"__asyncDelegator",(function(){return R})),n.d(t,"__asyncValues",(function(){return O})),n.d(t,"__makeTemplateObject",(function(){return I})),n.d(t,"__importStar",(function(){return k})),n.d(t,"__importDefault",(function(){return N})),n.d(t,"__classPrivateFieldGet",(function(){return L})),n.d(t,"__classPrivateFieldSet",(function(){return M}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])})(e,b)};function o(e,b){function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function l(s,e){var t={};for(var p in s)Object.prototype.hasOwnProperty.call(s,p)&&e.indexOf(p)<0&&(t[p]=s[p]);if(null!=s&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(p=Object.getOwnPropertySymbols(s);i<p.length;i++)e.indexOf(p[i])<0&&Object.prototype.propertyIsEnumerable.call(s,p[i])&&(t[p[i]]=s[p[i]])}return t}function d(e,t,n,desc){var r,o=arguments.length,c=o<3?t:null===desc?desc=Object.getOwnPropertyDescriptor(t,n):desc;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(e,t,n,desc);else for(var i=e.length-1;i>=0;i--)(r=e[i])&&(c=(o<3?r(c):o>3?r(t,n,c):r(t,n))||c);return o>3&&c&&Object.defineProperty(t,n,c),c}function h(e,t){return function(n,r){t(n,r,e)}}function f(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function v(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function _(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}function y(e,t){for(var p in e)"default"===p||t.hasOwnProperty(p)||(t[p]=e[p])}function E(e){var s="function"==typeof Symbol&&Symbol.iterator,t=s&&e[s],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function C(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function w(){for(var e=[],i=0;i<arguments.length;i++)e=e.concat(C(arguments[i]));return e}function S(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}function T(e){return this instanceof T?(this.v=e,this):new T(e)}function A(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,g=n.apply(e,t||[]),q=[];return i={},r("next"),r("throw"),r("return"),i[Symbol.asyncIterator]=function(){return this},i;function r(e){g[e]&&(i[e]=function(t){return new Promise((function(a,b){q.push([e,t,a,b])>1||o(e,t)}))})}function o(e,t){try{(n=g[e](t)).value instanceof T?Promise.resolve(n.value.v).then(c,l):d(q[0][2],n)}catch(e){d(q[0][3],e)}var n}function c(e){o("next",e)}function l(e){o("throw",e)}function d(e,t){e(t),q.shift(),q.length&&o(q[0][0],q[0][1])}}function R(e){var i,p;return i={},t("next"),t("throw",(function(e){throw e})),t("return"),i[Symbol.iterator]=function(){return this},i;function t(t,n){i[t]=e[t]?function(r){return(p=!p)?{value:T(e[t](r)),done:"return"===t}:n?n(r):r}:n}}function O(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,t=e[Symbol.asyncIterator];return t?t.call(e):(e=E(e),i={},n("next"),n("throw"),n("return"),i[Symbol.asyncIterator]=function(){return this},i);function n(t){i[t]=e[t]&&function(n){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(n=e[t](n)).done,n.value)}))}}}function I(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function k(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}function N(e){return e&&e.__esModule?e:{default:e}}function L(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function M(e,t,n){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,n),n}},,function(e,t,n){e.exports=function(){"use strict";var e=1e3,t=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",l="quarter",d="year",h="date",f="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,_={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_")},y=function(e,t,n){var r=String(e);return!r||r.length>=t?e:""+Array(t+1-r.length).join(n)+e},g={s:y,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?"+":"-")+y(r,2,"0")+":"+y(i,2,"0")},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,c),s=n-i<0,u=t.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:c,y:d,w:o,d:a,D:h,h:u,m:s,s:i,ms:r,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},E="en",C={};C[E]=_;var p=function(e){return e instanceof A},w=function(e,t,n){var r;if(!e)return E;if("string"==typeof e)C[e]&&(r=e),t&&(C[e]=t,r=e);else{var i=e.name;C[i]=e,r=i}return!n&&r&&(E=r),r||!n&&E},S=function(e,t){if(p(e))return e.clone();var n="object"==typeof t?t:{};return n.date=e,n.args=arguments,new A(n)},T=g;T.l=w,T.i=p,T.w=function(e,t){return S(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var A=function(){function _(e){this.$L=w(e.locale,null,!0),this.parse(e)}var y=_.prototype;return y.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(null===t)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(t)}(e),this.$x=e.x||{},this.init()},y.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},y.$utils=function(){return T},y.isValid=function(){return!(this.$d.toString()===f)},y.isSame=function(e,t){var n=S(e);return this.startOf(t)<=n&&n<=this.endOf(t)},y.isAfter=function(e,t){return S(e)<this.startOf(t)},y.isBefore=function(e,t){return this.endOf(t)<S(e)},y.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},y.unix=function(){return Math.floor(this.valueOf()/1e3)},y.valueOf=function(){return this.$d.getTime()},y.startOf=function(e,t){var n=this,r=!!T.u(t)||t,l=T.p(e),f=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(a)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},v=this.$W,_=this.$M,y=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case d:return r?f(1,0):f(31,11);case c:return r?f(1,_):f(0,_+1);case o:var E=this.$locale().weekStart||0,C=(v<E?v+7:v)-E;return f(r?y-C:y+(6-C),_);case a:case h:return m(g+"Hours",0);case u:return m(g+"Minutes",1);case s:return m(g+"Seconds",2);case i:return m(g+"Milliseconds",3);default:return this.clone()}},y.endOf=function(e){return this.startOf(e,!1)},y.$set=function(e,t){var n,o=T.p(e),l="set"+(this.$u?"UTC":""),f=(n={},n[a]=l+"Date",n[h]=l+"Date",n[c]=l+"Month",n[d]=l+"FullYear",n[u]=l+"Hours",n[s]=l+"Minutes",n[i]=l+"Seconds",n[r]=l+"Milliseconds",n)[o],m=o===a?this.$D+(t-this.$W):t;if(o===c||o===d){var v=this.clone().set(h,1);v.$d[f](m),v.init(),this.$d=v.set(h,Math.min(this.$D,v.daysInMonth())).$d}else f&&this.$d[f](m);return this.init(),this},y.set=function(e,t){return this.clone().$set(e,t)},y.get=function(e){return this[T.p(e)]()},y.add=function(r,l){var h,f=this;r=Number(r);var m=T.p(l),v=function(e){var t=S(f);return T.w(t.date(t.date()+Math.round(e*r)),f)};if(m===c)return this.set(c,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===a)return v(1);if(m===o)return v(7);var _=(h={},h[s]=t,h[u]=n,h[i]=e,h)[m]||1,y=this.$d.getTime()+r*_;return T.w(y,this)},y.subtract=function(e,t){return this.add(-1*e,t)},y.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||f;var r=e||"YYYY-MM-DDTHH:mm:ssZ",i=T.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,l=function(e,n,i,s){return e&&(e[n]||e(t,r))||i[n].substr(0,s)},d=function(e){return T.s(s%12||12,e,"0")},h=n.meridiem||function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLowerCase():r},m={YY:String(this.$y).slice(-2),YYYY:this.$y,M:a+1,MM:T.s(a+1,2,"0"),MMM:l(n.monthsShort,a,c,3),MMMM:l(c,a),D:this.$D,DD:T.s(this.$D,2,"0"),d:String(this.$W),dd:l(n.weekdaysMin,this.$W,o,2),ddd:l(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:T.s(s,2,"0"),h:d(1),hh:d(2),a:h(s,u,!0),A:h(s,u,!1),m:String(u),mm:T.s(u,2,"0"),s:String(this.$s),ss:T.s(this.$s,2,"0"),SSS:T.s(this.$ms,3,"0"),Z:i};return r.replace(v,(function(e,t){return t||m[e]||i.replace(":","")}))},y.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},y.diff=function(r,h,f){var m,v=T.p(h),_=S(r),y=(_.utcOffset()-this.utcOffset())*t,g=this-_,E=T.m(this,_);return E=(m={},m[d]=E/12,m[c]=E,m[l]=E/3,m[o]=(g-y)/6048e5,m[a]=(g-y)/864e5,m[u]=g/n,m[s]=g/t,m[i]=g/e,m)[v]||g,f?E:T.a(E)},y.daysInMonth=function(){return this.endOf(c).$D},y.$locale=function(){return C[this.$L]},y.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=w(e,t,!0);return r&&(n.$L=r),n},y.clone=function(){return T.w(this.$d,this)},y.toDate=function(){return new Date(this.valueOf())},y.toJSON=function(){return this.isValid()?this.toISOString():null},y.toISOString=function(){return this.$d.toISOString()},y.toString=function(){return this.$d.toUTCString()},_}(),b=A.prototype;return S.prototype=b,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",d],["$D",h]].forEach((function(e){b[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),S.extend=function(e,t){return e.$i||(e(t,A,S),e.$i=!0),S},S.locale=w,S.isDayjs=p,S.unix=function(e){return S(1e3*e)},S.en=C[E],S.Ls=C,S.p={},S}()},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"addTypenameToDocument",(function(){return oe})),n.d(t,"argumentsObjectFromField",(function(){return C})),n.d(t,"assign",(function(){return F})),n.d(t,"buildQueryFromSelectionSet",(function(){return pe})),n.d(t,"canUseWeakMap",(function(){return me})),n.d(t,"checkDocument",(function(){return j})),n.d(t,"cloneDeep",(function(){return be})),n.d(t,"createFragmentMap",(function(){return X})),n.d(t,"getDefaultValues",(function(){return Z})),n.d(t,"getDirectiveInfoFromField",(function(){return N})),n.d(t,"getDirectiveNames",(function(){return M})),n.d(t,"getDirectivesFromDocument",(function(){return de})),n.d(t,"getEnv",(function(){return ye})),n.d(t,"getFragmentDefinition",(function(){return G})),n.d(t,"getFragmentDefinitions",(function(){return W})),n.d(t,"getFragmentQueryDocument",(function(){return B})),n.d(t,"getInclusionDirectives",(function(){return U})),n.d(t,"getMainDefinition",(function(){return Y})),n.d(t,"getMutationDefinition",(function(){return V})),n.d(t,"getOperationDefinition",(function(){return H})),n.d(t,"getOperationDefinitionOrDie",(function(){return $})),n.d(t,"getOperationName",(function(){return z})),n.d(t,"getQueryDefinition",(function(){return K})),n.d(t,"getStoreKeyName",(function(){return E})),n.d(t,"graphQLResultHasError",(function(){return Ae})),n.d(t,"hasClientExports",(function(){return D})),n.d(t,"hasDirectives",(function(){return x})),n.d(t,"isDevelopment",(function(){return we})),n.d(t,"isEnv",(function(){return Ee})),n.d(t,"isField",(function(){return S})),n.d(t,"isIdValue",(function(){return A})),n.d(t,"isInlineFragment",(function(){return T})),n.d(t,"isJsonValue",(function(){return O})),n.d(t,"isNumberValue",(function(){return m})),n.d(t,"isProduction",(function(){return Ce})),n.d(t,"isScalarValue",(function(){return f})),n.d(t,"isTest",(function(){return Se})),n.d(t,"maybeDeepFreeze",(function(){return Oe})),n.d(t,"mergeDeep",(function(){return ke})),n.d(t,"mergeDeepArray",(function(){return Ne})),n.d(t,"removeArgumentsFromDocument",(function(){return ue})),n.d(t,"removeClientSetsFromDocument",(function(){return ge})),n.d(t,"removeConnectionDirectiveFromDocument",(function(){return se})),n.d(t,"removeDirectivesFromDocument",(function(){return ie})),n.d(t,"removeFragmentSpreadFromDocument",(function(){return he})),n.d(t,"resultKeyNameFromField",(function(){return w})),n.d(t,"shouldInclude",(function(){return L})),n.d(t,"storeKeyNameFromField",(function(){return _})),n.d(t,"stripSymbols",(function(){return Ue})),n.d(t,"toIdValue",(function(){return R})),n.d(t,"tryFunctionOrLogError",(function(){return Te})),n.d(t,"valueFromNode",(function(){return k})),n.d(t,"valueToObjectRepresentation",(function(){return v})),n.d(t,"variablesInOperation",(function(){return Q})),n.d(t,"warnOnceInDevelopment",(function(){return Pe}));var r=n(72),o=n(11),c=n(4),l=n(478),d=n.n(l),h=n(397);function f(e){return["StringValue","BooleanValue","EnumValue"].indexOf(e.kind)>-1}function m(e){return["IntValue","FloatValue"].indexOf(e.kind)>-1}function v(e,t,n,r){if(function(e){return"IntValue"===e.kind}(n)||function(e){return"FloatValue"===e.kind}(n))e[t.value]=Number(n.value);else if(function(e){return"BooleanValue"===e.kind}(n)||function(e){return"StringValue"===e.kind}(n))e[t.value]=n.value;else if(function(e){return"ObjectValue"===e.kind}(n)){var c={};n.fields.map((function(e){return v(c,e.name,e.value,r)})),e[t.value]=c}else if(function(e){return"Variable"===e.kind}(n)){var l=(r||{})[n.name.value];e[t.value]=l}else if(function(e){return"ListValue"===e.kind}(n))e[t.value]=n.values.map((function(e){var n={};return v(n,t,e,r),n[t.value]}));else if(function(e){return"EnumValue"===e.kind}(n))e[t.value]=n.value;else{if(!function(e){return"NullValue"===e.kind}(n))throw new o.a(17);e[t.value]=null}}function _(e,t){var n=null;e.directives&&(n={},e.directives.forEach((function(e){n[e.name.value]={},e.arguments&&e.arguments.forEach((function(r){var o=r.name,c=r.value;return v(n[e.name.value],o,c,t)}))})));var r=null;return e.arguments&&e.arguments.length&&(r={},e.arguments.forEach((function(e){var n=e.name,o=e.value;return v(r,n,o,t)}))),E(e.name.value,r,n)}n.d(t,"isEqual",(function(){return h.a}));var y=["connection","include","skip","client","rest","export"];function E(e,t,n){if(n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o=t,c={};return r.forEach((function(e){c[e]=o[e]})),n.connection.key+"("+JSON.stringify(c)+")"}return n.connection.key}var l=e;if(t){var h=d()(t);l+="("+h+")"}return n&&Object.keys(n).forEach((function(e){-1===y.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?l+="@"+e+"("+JSON.stringify(n[e])+")":l+="@"+e)})),l}function C(e,t){if(e.arguments&&e.arguments.length){var n={};return e.arguments.forEach((function(e){var r=e.name,o=e.value;return v(n,r,o,t)})),n}return null}function w(e){return e.alias?e.alias.value:e.name.value}function S(e){return"Field"===e.kind}function T(e){return"InlineFragment"===e.kind}function A(e){return e&&"id"===e.type&&"boolean"==typeof e.generated}function R(e,t){return void 0===t&&(t=!1),Object(c.__assign)({type:"id",generated:t},"string"==typeof e?{id:e,typename:void 0}:e)}function O(e){return null!=e&&"object"==typeof e&&"json"===e.type}function I(e){throw new o.a(18)}function k(e,t){switch(void 0===t&&(t=I),e.kind){case"Variable":return t(e);case"NullValue":return null;case"IntValue":return parseInt(e.value,10);case"FloatValue":return parseFloat(e.value);case"ListValue":return e.values.map((function(e){return k(e,t)}));case"ObjectValue":for(var n={},r=0,o=e.fields;r<o.length;r++){var c=o[r];n[c.name.value]=k(c.value,t)}return n;default:return e.value}}function N(e,t){if(e.directives&&e.directives.length){var n={};return e.directives.forEach((function(e){n[e.name.value]=C(e,t)})),n}return null}function L(e,t){return void 0===t&&(t={}),U(e.directives).every((function(e){var n=e.directive,r=e.ifArgument,c=!1;return"Variable"===r.value.kind?(c=t[r.value.name.value],Object(o.b)(void 0!==c,13)):c=r.value.value,"skip"===n.name.value?!c:c}))}function M(e){var t=[];return Object(r.b)(e,{Directive:function(e){t.push(e.name.value)}}),t}function x(e,t){return M(t).some((function(t){return e.indexOf(t)>-1}))}function D(e){return e&&x(["client"],e)&&x(["export"],e)}function P(e){var t=e.name.value;return"skip"===t||"include"===t}function U(e){return e?e.filter(P).map((function(e){var t=e.arguments;e.name.value;Object(o.b)(t&&1===t.length,14);var n=t[0];Object(o.b)(n.name&&"if"===n.name.value,15);var r=n.value;return Object(o.b)(r&&("Variable"===r.kind||"BooleanValue"===r.kind),16),{directive:e,ifArgument:n}})):[]}function B(e,t){var n=t,r=[];return e.definitions.forEach((function(e){if("OperationDefinition"===e.kind)throw new o.a(11);"FragmentDefinition"===e.kind&&r.push(e)})),void 0===n&&(Object(o.b)(1===r.length,12),n=r[0].name.value),Object(c.__assign)(Object(c.__assign)({},e),{definitions:Object(c.__spreadArrays)([{kind:"OperationDefinition",operation:"query",selectionSet:{kind:"SelectionSet",selections:[{kind:"FragmentSpread",name:{kind:"Name",value:n}}]}}],e.definitions)})}function F(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.forEach((function(source){null!=source&&Object.keys(source).forEach((function(t){e[t]=source[t]}))})),e}function V(e){j(e);var t=e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}))[0];return Object(o.b)(t,1),t}function j(e){Object(o.b)(e&&"Document"===e.kind,2);var t=e.definitions.filter((function(e){return"FragmentDefinition"!==e.kind})).map((function(e){if("OperationDefinition"!==e.kind)throw new o.a(3);return e}));return Object(o.b)(t.length<=1,4),e}function H(e){return j(e),e.definitions.filter((function(e){return"OperationDefinition"===e.kind}))[0]}function $(e){var t=H(e);return Object(o.b)(t,5),t}function z(e){return e.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||null}function W(e){return e.definitions.filter((function(e){return"FragmentDefinition"===e.kind}))}function K(e){var t=H(e);return Object(o.b)(t&&"query"===t.operation,6),t}function G(e){Object(o.b)("Document"===e.kind,7),Object(o.b)(e.definitions.length<=1,8);var t=e.definitions[0];return Object(o.b)("FragmentDefinition"===t.kind,9),t}function Y(e){var t;j(e);for(var n=0,r=e.definitions;n<r.length;n++){var c=r[n];if("OperationDefinition"===c.kind){var l=c.operation;if("query"===l||"mutation"===l||"subscription"===l)return c}"FragmentDefinition"!==c.kind||t||(t=c)}if(t)return t;throw new o.a(10)}function X(e){void 0===e&&(e=[]);var t={};return e.forEach((function(e){t[e.name.value]=e})),t}function Z(e){if(e&&e.variableDefinitions&&e.variableDefinitions.length){var t=e.variableDefinitions.filter((function(e){return e.defaultValue})).map((function(e){var t=e.variable,n=e.defaultValue,r={};return v(r,t.name,n),r}));return F.apply(void 0,Object(c.__spreadArrays)([{}],t))}return{}}function Q(e){var t=new Set;if(e.variableDefinitions)for(var n=0,r=e.variableDefinitions;n<r.length;n++){var o=r[n];t.add(o.variable.name.value)}return t}function J(e,t,n){var r=0;return e.forEach((function(n,i){t.call(this,n,i,e)&&(e[r++]=n)}),n),e.length=r,e}var ee={kind:"Field",name:{kind:"Name",value:"__typename"}};function te(e,t){return e.selectionSet.selections.every((function(e){return"FragmentSpread"===e.kind&&te(t[e.name.value],t)}))}function ne(e){return te(H(e)||G(e),X(W(e)))?null:e}function re(e){return function(t){return e.some((function(e){return e.name&&e.name===t.name.value||e.test&&e.test(t)}))}}function ie(e,t){var n=Object.create(null),o=[],c=Object.create(null),l=[],d=ne(Object(r.b)(t,{Variable:{enter:function(e,t,r){"VariableDefinition"!==r.kind&&(n[e.name.value]=!0)}},Field:{enter:function(t){if(e&&t.directives&&(e.some((function(e){return e.remove}))&&t.directives&&t.directives.some(re(e))))return t.arguments&&t.arguments.forEach((function(e){"Variable"===e.value.kind&&o.push({name:e.value.name.value})})),t.selectionSet&&fe(t.selectionSet).forEach((function(e){l.push({name:e.name.value})})),null}},FragmentSpread:{enter:function(e){c[e.name.value]=!0}},Directive:{enter:function(t){if(re(e)(t))return null}}}));return d&&J(o,(function(e){return!n[e.name]})).length&&(d=ue(o,d)),d&&J(l,(function(e){return!c[e.name]})).length&&(d=he(l,d)),d}function oe(e){return Object(r.b)(j(e),{SelectionSet:{enter:function(e,t,n){if(!n||"OperationDefinition"!==n.kind){var r=e.selections;if(r)if(!r.some((function(e){return S(e)&&("__typename"===e.name.value||0===e.name.value.lastIndexOf("__",0))}))){var o=n;if(!(S(o)&&o.directives&&o.directives.some((function(e){return"export"===e.name.value}))))return Object(c.__assign)(Object(c.__assign)({},e),{selections:Object(c.__spreadArrays)(r,[ee])})}}}}})}var ae={test:function(e){var t="connection"===e.name.value;return t&&(!e.arguments||e.arguments.some((function(e){return"key"===e.name.value}))),t}};function se(e){return ie([ae],j(e))}function ce(e,t,n){return void 0===n&&(n=!0),t&&t.selections&&t.selections.some((function(t){return le(e,t,n)}))}function le(e,t,n){return void 0===n&&(n=!0),!S(t)||!!t.directives&&(t.directives.some(re(e))||n&&ce(e,t.selectionSet,n))}function de(e,t){var n;return j(t),ne(Object(r.b)(t,{SelectionSet:{enter:function(t,r,o,path){var l=path.join("-");if(!n||l===n||!l.startsWith(n)){if(t.selections){var d=t.selections.filter((function(t){return le(e,t)}));return ce(e,t,!1)&&(n=l),Object(c.__assign)(Object(c.__assign)({},t),{selections:d})}return null}}}}))}function ue(e,t){var n=function(e){return function(t){return e.some((function(e){return t.value&&"Variable"===t.value.kind&&t.value.name&&(e.name===t.value.name.value||e.test&&e.test(t))}))}}(e);return ne(Object(r.b)(t,{OperationDefinition:{enter:function(t){return Object(c.__assign)(Object(c.__assign)({},t),{variableDefinitions:t.variableDefinitions.filter((function(t){return!e.some((function(e){return e.name===t.variable.name.value}))}))})}},Field:{enter:function(t){if(e.some((function(e){return e.remove}))){var r=0;if(t.arguments.forEach((function(e){n(e)&&(r+=1)})),1===r)return null}}},Argument:{enter:function(e){if(n(e))return null}}}))}function he(e,t){function n(t){if(e.some((function(e){return e.name===t.name.value})))return null}return ne(Object(r.b)(t,{FragmentSpread:{enter:n},FragmentDefinition:{enter:n}}))}function fe(e){var t=[];return e.selections.forEach((function(e){(S(e)||T(e))&&e.selectionSet?fe(e.selectionSet).forEach((function(e){return t.push(e)})):"FragmentSpread"===e.kind&&t.push(e)})),t}function pe(e){return"query"===Y(e).operation?e:Object(r.b)(e,{OperationDefinition:{enter:function(e){return Object(c.__assign)(Object(c.__assign)({},e),{operation:"query"})}}})}function ge(e){j(e);var t=ie([{test:function(e){return"client"===e.name.value},remove:!0}],e);return t&&(t=Object(r.b)(t,{FragmentDefinition:{enter:function(e){if(e.selectionSet&&e.selectionSet.selections.every((function(e){return S(e)&&"__typename"===e.name.value})))return null}}})),t}var me="function"==typeof WeakMap&&!("object"==typeof navigator&&"ReactNative"===navigator.product),ve=Object.prototype.toString;function be(e){return _e(e,new Map)}function _e(e,t){switch(ve.call(e)){case"[object Array]":if(t.has(e))return t.get(e);var n=e.slice(0);return t.set(e,n),n.forEach((function(e,i){n[i]=_e(e,t)})),n;case"[object Object]":if(t.has(e))return t.get(e);var r=Object.create(Object.getPrototypeOf(e));return t.set(e,r),Object.keys(e).forEach((function(n){r[n]=_e(e[n],t)})),r;default:return e}}function ye(){return void 0!==e?"production":"development"}function Ee(e){return ye()===e}function Ce(){return!0===Ee("production")}function we(){return!0===Ee("development")}function Se(){return!0===Ee("test")}function Te(e){try{return e()}catch(e){console.error&&console.error(e)}}function Ae(e){return e.errors&&e.errors.length}function Re(e){return Object.freeze(e),Object.getOwnPropertyNames(e).forEach((function(t){null===e[t]||"object"!=typeof e[t]&&"function"!=typeof e[t]||Object.isFrozen(e[t])||Re(e[t])})),e}function Oe(e){if((we()||Se())&&!("function"==typeof Symbol&&"string"==typeof Symbol("")))return Re(e);return e}var Ie=Object.prototype.hasOwnProperty;function ke(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Ne(e)}function Ne(e){var t=e[0]||{},n=e.length;if(n>1){var r=[];t=xe(t,r);for(var i=1;i<n;++i)t=Me(t,e[i],r)}return t}function Le(e){return null!==e&&"object"==typeof e}function Me(e,source,t){return Le(source)&&Le(e)?(Object.isExtensible&&!Object.isExtensible(e)&&(e=xe(e,t)),Object.keys(source).forEach((function(n){var r=source[n];if(Ie.call(e,n)){var o=e[n];r!==o&&(e[n]=Me(xe(o,t),r,t))}else e[n]=r})),e):source}function xe(e,t){return null!==e&&"object"==typeof e&&t.indexOf(e)<0&&(e=Array.isArray(e)?e.slice(0):Object(c.__assign)({__proto__:Object.getPrototypeOf(e)},e),t.push(e)),e}var De=Object.create({});function Pe(e,t){void 0===t&&(t="warn"),Ce()||De[e]||(Se()||(De[e]=!0),"error"===t?console.error(e):console.warn(e))}function Ue(data){return JSON.parse(JSON.stringify(data))}}.call(this,n(42))},function(e,t,n){!function(e,t,n,r,o,c){"use strict";function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=l(t),h=l(n);h.default.registerHooks(["beforeRouteEnter","beforeRouteUpdate","beforeRouteLeave","asyncData","fetch","fetchOnServer","head","key","layout","loading","middleware","scrollToTop","transition","validate","watchQuery","meta"]);var f=/\B([A-Z])/g,m=function(e){return e.replace(f,"-$1").toLowerCase()};function v(e,t){return function(n,r,o){r=m(r);var c=o.value;o.value=function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(!1!==c.apply(this,n))if(t){if("function"!=typeof this[t])throw new TypeError("must be a method name");this.$off(e||r,this[t])}else e?this.$off(e||r):this.$off()}}}function _(e){return n.createDecorator((function(t,n){var r=m(n);"function"!=typeof t.created&&(t.created=function(){});var o=t.created;t.created=function(){o(),void 0!==t.methods&&this.$on(e||r,t.methods[n])}}))}function y(e){return n.createDecorator((function(t,n){var r=m(n);"function"!=typeof t.created&&(t.created=function(){});var o=t.created;t.created=function(){o(),void 0!==t.methods&&this.$once(e||r,t.methods[n])}}))}function E(e){return function(t,n,r){var o=r.value;r.value=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(!1!==o.apply(this,t)){if("function"!=typeof this[e])throw new TypeError("must be a method name");this.$nextTick(this[e])}}}}Object.defineProperty(e,"Vue",{enumerable:!0,get:function(){return d.default}}),Object.defineProperty(e,"Component",{enumerable:!0,get:function(){return h.default}}),Object.defineProperty(e,"mixins",{enumerable:!0,get:function(){return n.mixins}}),Object.defineProperty(e,"Module",{enumerable:!0,get:function(){return r.Module}}),Object.defineProperty(e,"MutationAction",{enumerable:!0,get:function(){return r.MutationAction}}),Object.defineProperty(e,"VuexAction",{enumerable:!0,get:function(){return r.Action}}),Object.defineProperty(e,"VuexModule",{enumerable:!0,get:function(){return r.VuexModule}}),Object.defineProperty(e,"VuexMutation",{enumerable:!0,get:function(){return r.Mutation}}),Object.defineProperty(e,"getModule",{enumerable:!0,get:function(){return r.getModule}}),Object.defineProperty(e,"Action",{enumerable:!0,get:function(){return o.Action}}),Object.defineProperty(e,"Getter",{enumerable:!0,get:function(){return o.Getter}}),Object.defineProperty(e,"Mutation",{enumerable:!0,get:function(){return o.Mutation}}),Object.defineProperty(e,"State",{enumerable:!0,get:function(){return o.State}}),Object.defineProperty(e,"namespace",{enumerable:!0,get:function(){return o.namespace}}),Object.defineProperty(e,"Emit",{enumerable:!0,get:function(){return c.Emit}}),Object.defineProperty(e,"Inject",{enumerable:!0,get:function(){return c.Inject}}),Object.defineProperty(e,"InjectReactive",{enumerable:!0,get:function(){return c.InjectReactive}}),Object.defineProperty(e,"Model",{enumerable:!0,get:function(){return c.Model}}),Object.defineProperty(e,"ModelSync",{enumerable:!0,get:function(){return c.ModelSync}}),Object.defineProperty(e,"Prop",{enumerable:!0,get:function(){return c.Prop}}),Object.defineProperty(e,"PropSync",{enumerable:!0,get:function(){return c.PropSync}}),Object.defineProperty(e,"Provide",{enumerable:!0,get:function(){return c.Provide}}),Object.defineProperty(e,"ProvideReactive",{enumerable:!0,get:function(){return c.ProvideReactive}}),Object.defineProperty(e,"Ref",{enumerable:!0,get:function(){return c.Ref}}),Object.defineProperty(e,"VModel",{enumerable:!0,get:function(){return c.VModel}}),Object.defineProperty(e,"Watch",{enumerable:!0,get:function(){return c.Watch}}),e.NextTick=E,e.Off=v,e.On=_,e.Once=y,Object.defineProperty(e,"__esModule",{value:!0})}(t,n(9),n(27),n(548),n(792),n(493))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"})},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(4),o="Invariant Violation",c=Object.setPrototypeOf,l=void 0===c?function(e,t){return e.__proto__=t,e}:c,d=function(e){function t(n){void 0===n&&(n=o);var r=e.call(this,"number"==typeof n?o+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=o,l(r,t.prototype),r}return Object(r.__extends)(t,e),t}(Error);function h(e,t){if(!e)throw new d(t)}function f(e){return function(){return console[e].apply(console,arguments)}}!function(e){e.warn=f("warn"),e.error=f("error")}(h||(h={}));var m={env:{}};if("object"==typeof e)m=e;else try{Function("stub","process = stub")(m)}catch(e){}}).call(this,n(42))},,function(e,t){"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t,n){"use strict";var r=function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};Object.create;Object.create;var o=n(73);function c(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function l(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}Object.create;function d(e){var s="function"==typeof Symbol&&Symbol.iterator,t=s&&e[s],i=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(s?"Object is not iterable.":"Symbol.iterator is not defined.")}function h(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function f(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||t)}Object.create;var m=function(){function e(e,t,n){this.name=e,this.instanceFactory=t,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}return e.prototype.setInstantiationMode=function(e){return this.instantiationMode=e,this},e.prototype.setMultipleInstances=function(e){return this.multipleInstances=e,this},e.prototype.setServiceProps=function(e){return this.serviceProps=e,this},e.prototype.setInstanceCreatedCallback=function(e){return this.onInstanceCreated=e,this},e}(),v="[DEFAULT]",_=function(){function e(e,t){this.name=e,this.container=t,this.component=null,this.instances=new Map,this.instancesDeferred=new Map,this.onInitCallbacks=new Map}return e.prototype.get=function(e){var t=this.normalizeInstanceIdentifier(e);if(!this.instancesDeferred.has(t)){var n=new o.a;if(this.instancesDeferred.set(t,n),this.isInitialized(t)||this.shouldAutoInitialize())try{var r=this.getOrInitializeService({instanceIdentifier:t});r&&n.resolve(r)}catch(e){}}return this.instancesDeferred.get(t).promise},e.prototype.getImmediate=function(e){var t,n=this.normalizeInstanceIdentifier(null==e?void 0:e.identifier),r=null!==(t=null==e?void 0:e.optional)&&void 0!==t&&t;if(!this.isInitialized(n)&&!this.shouldAutoInitialize()){if(r)return null;throw Error("Service "+this.name+" is not available")}try{return this.getOrInitializeService({instanceIdentifier:n})}catch(e){if(r)return null;throw e}},e.prototype.getComponent=function(){return this.component},e.prototype.setComponent=function(component){var e,t;if(component.name!==this.name)throw Error("Mismatching Component "+component.name+" for Provider "+this.name+".");if(this.component)throw Error("Component for "+this.name+" has already been provided");if(this.component=component,this.shouldAutoInitialize()){if(function(component){return"EAGER"===component.instantiationMode}(component))try{this.getOrInitializeService({instanceIdentifier:v})}catch(e){}try{for(var n=d(this.instancesDeferred.entries()),r=n.next();!r.done;r=n.next()){var o=h(r.value,2),c=o[0],l=o[1],f=this.normalizeInstanceIdentifier(c);try{var m=this.getOrInitializeService({instanceIdentifier:f});l.resolve(m)}catch(e){}}}catch(t){e={error:t}}finally{try{r&&!r.done&&(t=n.return)&&t.call(n)}finally{if(e)throw e.error}}}},e.prototype.clearInstance=function(e){void 0===e&&(e=v),this.instancesDeferred.delete(e),this.instances.delete(e)},e.prototype.delete=function(){return c(this,void 0,void 0,(function(){var e;return l(this,(function(t){switch(t.label){case 0:return e=Array.from(this.instances.values()),[4,Promise.all(f(f([],h(e.filter((function(e){return"INTERNAL"in e})).map((function(e){return e.INTERNAL.delete()})))),h(e.filter((function(e){return"_delete"in e})).map((function(e){return e._delete()})))))];case 1:return t.sent(),[2]}}))}))},e.prototype.isComponentSet=function(){return null!=this.component},e.prototype.isInitialized=function(e){return void 0===e&&(e=v),this.instances.has(e)},e.prototype.initialize=function(e){var t,n;void 0===e&&(e={});var r=e.options,o=void 0===r?{}:r,c=this.normalizeInstanceIdentifier(e.instanceIdentifier);if(this.isInitialized(c))throw Error(this.name+"("+c+") has already been initialized");if(!this.isComponentSet())throw Error("Component "+this.name+" has not been registered yet");var l=this.getOrInitializeService({instanceIdentifier:c,options:o});try{for(var f=d(this.instancesDeferred.entries()),m=f.next();!m.done;m=f.next()){var v=h(m.value,2),_=v[0],y=v[1];c===this.normalizeInstanceIdentifier(_)&&y.resolve(l)}}catch(e){t={error:e}}finally{try{m&&!m.done&&(n=f.return)&&n.call(f)}finally{if(t)throw t.error}}return l},e.prototype.onInit=function(e,t){var n,r=this.normalizeInstanceIdentifier(t),o=null!==(n=this.onInitCallbacks.get(r))&&void 0!==n?n:new Set;o.add(e),this.onInitCallbacks.set(r,o);var c=this.instances.get(r);return c&&e(c,r),function(){o.delete(e)}},e.prototype.invokeOnInitCallbacks=function(e,t){var n,r,o=this.onInitCallbacks.get(t);if(o)try{for(var c=d(o),l=c.next();!l.done;l=c.next()){var h=l.value;try{h(e,t)}catch(e){}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}},e.prototype.getOrInitializeService=function(e){var t,n=e.instanceIdentifier,r=e.options,o=void 0===r?{}:r,c=this.instances.get(n);if(!c&&this.component&&(c=this.component.instanceFactory(this.container,{instanceIdentifier:(t=n,t===v?void 0:t),options:o}),this.instances.set(n,c),this.invokeOnInitCallbacks(c,n),this.component.onInstanceCreated))try{this.component.onInstanceCreated(this.container,n,c)}catch(e){}return c||null},e.prototype.normalizeInstanceIdentifier=function(e){return void 0===e&&(e=v),this.component?this.component.multipleInstances?e:v:e},e.prototype.shouldAutoInitialize=function(){return!!this.component&&"EXPLICIT"!==this.component.instantiationMode},e}();var y,E=function(){function e(e){this.name=e,this.providers=new Map}return e.prototype.addComponent=function(component){var e=this.getProvider(component.name);if(e.isComponentSet())throw new Error("Component "+component.name+" has already been registered with "+this.name);e.setComponent(component)},e.prototype.addOrOverwriteComponent=function(component){this.getProvider(component.name).isComponentSet()&&this.providers.delete(component.name),this.addComponent(component)},e.prototype.getProvider=function(e){if(this.providers.has(e))return this.providers.get(e);var t=new _(e,this);return this.providers.set(e,t),t},e.prototype.getProviders=function(){return Array.from(this.providers.values())},e}();function C(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}var w,S=[];!function(e){e[e.DEBUG=0]="DEBUG",e[e.VERBOSE=1]="VERBOSE",e[e.INFO=2]="INFO",e[e.WARN=3]="WARN",e[e.ERROR=4]="ERROR",e[e.SILENT=5]="SILENT"}(w||(w={}));var T,A={debug:w.DEBUG,verbose:w.VERBOSE,info:w.INFO,warn:w.WARN,error:w.ERROR,silent:w.SILENT},R=w.INFO,O=((y={})[w.DEBUG]="log",y[w.VERBOSE]="log",y[w.INFO]="info",y[w.WARN]="warn",y[w.ERROR]="error",y),I=function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];if(!(t<e.logLevel)){var o=(new Date).toISOString(),c=O[t];if(!c)throw new Error("Attempted to log a message with an invalid logType (value: "+t+")");console[c].apply(console,C(["["+o+"]  "+e.name+":"],n))}},k=function(){function e(e){this.name=e,this._logLevel=R,this._logHandler=I,this._userLogHandler=null,S.push(this)}return Object.defineProperty(e.prototype,"logLevel",{get:function(){return this._logLevel},set:function(e){if(!(e in w))throw new TypeError('Invalid value "'+e+'" assigned to `logLevel`');this._logLevel=e},enumerable:!1,configurable:!0}),e.prototype.setLogLevel=function(e){this._logLevel="string"==typeof e?A[e]:e},Object.defineProperty(e.prototype,"logHandler",{get:function(){return this._logHandler},set:function(e){if("function"!=typeof e)throw new TypeError("Value assigned to `logHandler` must be a function");this._logHandler=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"userLogHandler",{get:function(){return this._userLogHandler},set:function(e){this._userLogHandler=e},enumerable:!1,configurable:!0}),e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,C([this,w.DEBUG],e)),this._logHandler.apply(this,C([this,w.DEBUG],e))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,C([this,w.VERBOSE],e)),this._logHandler.apply(this,C([this,w.VERBOSE],e))},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,C([this,w.INFO],e)),this._logHandler.apply(this,C([this,w.INFO],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,C([this,w.WARN],e)),this._logHandler.apply(this,C([this,w.WARN],e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._userLogHandler&&this._userLogHandler.apply(this,C([this,w.ERROR],e)),this._logHandler.apply(this,C([this,w.ERROR],e))},e}();function N(e){S.forEach((function(t){t.setLogLevel(e)}))}var L,M=((T={})["no-app"]="No Firebase App '{$appName}' has been created - call Firebase App.initializeApp()",T["bad-app-name"]="Illegal App name: '{$appName}",T["duplicate-app"]="Firebase App named '{$appName}' already exists",T["app-deleted"]="Firebase App named '{$appName}' already deleted",T["invalid-app-argument"]="firebase.{$appName}() takes either no argument or a Firebase App instance.",T["invalid-log-argument"]="First argument to `onLog` must be null or a function.",T),x=new o.b("app","Firebase",M),D="@firebase/app",P="[DEFAULT]",U=((L={})[D]="fire-core",L["@firebase/analytics"]="fire-analytics",L["@firebase/app-check"]="fire-app-check",L["@firebase/auth"]="fire-auth",L["@firebase/database"]="fire-rtdb",L["@firebase/functions"]="fire-fn",L["@firebase/installations"]="fire-iid",L["@firebase/messaging"]="fire-fcm",L["@firebase/performance"]="fire-perf",L["@firebase/remote-config"]="fire-rc",L["@firebase/storage"]="fire-gcs",L["@firebase/firestore"]="fire-fst",L["fire-js"]="fire-js",L["firebase-wrapper"]="fire-js-all",L),B=new k("@firebase/app"),F=function(){function e(e,t,n){var r=this;this.firebase_=n,this.isDeleted_=!1,this.name_=t.name,this.automaticDataCollectionEnabled_=t.automaticDataCollectionEnabled||!1,this.options_=Object(o.e)(e),this.container=new E(t.name),this._addComponent(new m("app",(function(){return r}),"PUBLIC")),this.firebase_.INTERNAL.components.forEach((function(component){return r._addComponent(component)}))}return Object.defineProperty(e.prototype,"automaticDataCollectionEnabled",{get:function(){return this.checkDestroyed_(),this.automaticDataCollectionEnabled_},set:function(e){this.checkDestroyed_(),this.automaticDataCollectionEnabled_=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.checkDestroyed_(),this.name_},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"options",{get:function(){return this.checkDestroyed_(),this.options_},enumerable:!1,configurable:!0}),e.prototype.delete=function(){var e=this;return new Promise((function(t){e.checkDestroyed_(),t()})).then((function(){return e.firebase_.INTERNAL.removeApp(e.name_),Promise.all(e.container.getProviders().map((function(e){return e.delete()})))})).then((function(){e.isDeleted_=!0}))},e.prototype._getService=function(e,t){var n;void 0===t&&(t=P),this.checkDestroyed_();var r=this.container.getProvider(e);return r.isInitialized()||"EXPLICIT"!==(null===(n=r.getComponent())||void 0===n?void 0:n.instantiationMode)||r.initialize(),r.getImmediate({identifier:t})},e.prototype._removeServiceInstance=function(e,t){void 0===t&&(t=P),this.container.getProvider(e).clearInstance(t)},e.prototype._addComponent=function(component){try{this.container.addComponent(component)}catch(e){B.debug("Component "+component.name+" failed to register with FirebaseApp "+this.name,e)}},e.prototype._addOrOverwriteComponent=function(component){this.container.addOrOverwriteComponent(component)},e.prototype.toJSON=function(){return{name:this.name,automaticDataCollectionEnabled:this.automaticDataCollectionEnabled,options:this.options}},e.prototype.checkDestroyed_=function(){if(this.isDeleted_)throw x.create("app-deleted",{appName:this.name_})},e}();F.prototype.name&&F.prototype.options||F.prototype.delete||console.log("dc");function V(e){var t={},n=new Map,r={__esModule:!0,initializeApp:function(n,c){void 0===c&&(c={});if("object"!=typeof c||null===c){c={name:c}}var l=c;void 0===l.name&&(l.name=P);var d=l.name;if("string"!=typeof d||!d)throw x.create("bad-app-name",{appName:String(d)});if(Object(o.c)(t,d))throw x.create("duplicate-app",{appName:d});var h=new e(n,l,r);return t[d]=h,h},app:c,registerVersion:function(e,t,n){var r,o=null!==(r=U[e])&&void 0!==r?r:e;n&&(o+="-"+n);var c=o.match(/\s|\//),d=t.match(/\s|\//);if(c||d){var h=['Unable to register library "'+o+'" with version "'+t+'":'];return c&&h.push('library name "'+o+'" contains illegal characters (whitespace or "/")'),c&&d&&h.push("and"),d&&h.push('version name "'+t+'" contains illegal characters (whitespace or "/")'),void B.warn(h.join(" "))}l(new m(o+"-version",(function(){return{library:o,version:t}}),"VERSION"))},setLogLevel:N,onLog:function(e,t){if(null!==e&&"function"!=typeof e)throw x.create("invalid-log-argument");!function(e,t){for(var n=function(n){var r=null;t&&t.level&&(r=A[t.level]),n.userLogHandler=null===e?null:function(t,n){for(var o=[],c=2;c<arguments.length;c++)o[c-2]=arguments[c];var l=o.map((function(e){if(null==e)return null;if("string"==typeof e)return e;if("number"==typeof e||"boolean"==typeof e)return e.toString();if(e instanceof Error)return e.message;try{return JSON.stringify(e)}catch(e){return null}})).filter((function(e){return e})).join(" ");n>=(null!=r?r:t.logLevel)&&e({level:w[n].toLowerCase(),message:l,args:o,type:t.name})}},r=0,o=S;r<o.length;r++)n(o[r])}(e,t)},apps:null,SDK_VERSION:"8.7.0",INTERNAL:{registerComponent:l,removeApp:function(e){delete t[e]},components:n,useAsService:function(e,t){if("serverAuth"===t)return null;return t}}};function c(e){if(e=e||P,!Object(o.c)(t,e))throw x.create("no-app",{appName:e});return t[e]}function l(component){var l=component.name;if(n.has(l))return B.debug("There were multiple attempts to register component "+l+"."),"PUBLIC"===component.type?r[l]:null;if(n.set(l,component),"PUBLIC"===component.type){var d=function(e){if(void 0===e&&(e=c()),"function"!=typeof e[l])throw x.create("invalid-app-argument",{appName:l});return e[l]()};void 0!==component.serviceProps&&Object(o.f)(d,component.serviceProps),r[l]=d,e.prototype[l]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this._getService.bind(this,l);return n.apply(this,component.multipleInstances?e:[])}}for(var h=0,f=Object.keys(t);h<f.length;h++){var m=f[h];t[m]._addComponent(component)}return"PUBLIC"===component.type?r[l]:null}return r.default=r,Object.defineProperty(r,"apps",{get:function(){return Object.keys(t).map((function(e){return t[e]}))}}),c.App=e,r}var j=function e(){var t=V(F);return t.INTERNAL=r(r({},t.INTERNAL),{createFirebaseNamespace:e,extendNamespace:function(e){Object(o.f)(t,e)},createSubscribe:o.d,ErrorFactory:o.b,deepExtend:o.f}),t}(),H=function(){function e(e){this.container=e}return e.prototype.getPlatformInfoString=function(){return this.container.getProviders().map((function(e){if(function(e){var component=e.getComponent();return"VERSION"===(null==component?void 0:component.type)}(e)){var t=e.getImmediate();return t.library+"/"+t.version}return null})).filter((function(e){return e})).join(" ")},e}();if(Object(o.g)()&&void 0!==self.firebase){B.warn("\n    Warning: Firebase is already defined in the global scope. Please make sure\n    Firebase library is only loaded once.\n  ");var $=self.firebase.SDK_VERSION;$&&$.indexOf("LITE")>=0&&B.warn("\n    Warning: You are trying to load Firebase while using Firebase Performance standalone script.\n    You should load Firebase Performance with this instance of Firebase to avoid loading duplicate code.\n    ")}var z=j.initializeApp;j.initializeApp=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return Object(o.h)()&&B.warn('\n      Warning: This is a browser-targeted Firebase bundle but it appears it is being\n      run in a Node environment.  If running in a Node environment, make sure you\n      are using the bundle specified by the "main" field in package.json.\n      \n      If you are using Webpack, you can specify "main" as the first item in\n      "resolve.mainFields":\n      https://webpack.js.org/configuration/resolve/#resolvemainfields\n      \n      If using Rollup, use the @rollup/plugin-node-resolve plugin and specify "main"\n      as the first item in "mainFields", e.g. [\'main\', \'module\'].\n      https://github.com/rollup/@rollup/plugin-node-resolve\n      '),z.apply(void 0,e)};var W,K,G=j;(W=G).INTERNAL.registerComponent(new m("platform-logger",(function(e){return new H(e)}),"PRIVATE")),W.registerVersion(D,"0.6.28",K),W.registerVersion("fire-js","");t.a=G},,function(e,t,n){"use strict";n.d(t,"a",(function(){return v})),n.d(t,"b",(function(){return w})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return R})),n.d(t,"e",(function(){return _})),n.d(t,"f",(function(){return y})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return O}));var r=n(116),o=n(142),c=n(113),l=n(43),d=n(125),h=n(92),f=n(76);const m=100;class v{constructor(e,t=new h.a,n=4){this._version=n,this._stack=[{scope:t}],e&&this.bindClient(e)}isOlderThan(e){return this._version<e}bindClient(e){this.getStackTop().client=e,e&&e.setupIntegrations&&e.setupIntegrations()}pushScope(){const e=h.a.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e}popScope(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}withScope(e){const t=this.pushScope();try{e(t)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(e,t){const n=this._lastEventId=t&&t.event_id?t.event_id:Object(r.f)(),o=new Error("Sentry syntheticException");return this._withClient(((r,c)=>{r.captureException(e,{originalException:e,syntheticException:o,...t,event_id:n},c)})),n}captureMessage(e,t,n){const o=this._lastEventId=n&&n.event_id?n.event_id:Object(r.f)(),c=new Error(e);return this._withClient(((r,l)=>{r.captureMessage(e,t,{originalException:e,syntheticException:c,...n,event_id:o},l)})),o}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Object(r.f)();return e.type||(this._lastEventId=n),this._withClient(((r,o)=>{r.captureEvent(e,{...t,event_id:n},o)})),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:l=null,maxBreadcrumbs:d=m}=r.getOptions&&r.getOptions()||{};if(d<=0)return;const h={timestamp:Object(o.a)(),...e},f=l?Object(c.b)((()=>l(h,t))):h;null!==f&&(r.emit&&r.emit("beforeAddBreadcrumb",f,t),n.addBreadcrumb(f,d))}setUser(e){this.getScope().setUser(e)}setTags(e){this.getScope().setTags(e)}setExtras(e){this.getScope().setExtras(e)}setTag(e,t){this.getScope().setTag(e,t)}setExtra(e,t){this.getScope().setExtra(e,t)}setContext(e,t){this.getScope().setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();n&&e(t)}run(e){const t=y(this);try{e(this)}finally{y(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(e){return null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop().scope,t=e.getSession();t&&Object(f.a)(t),this._sendSessionUpdate(),e.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:o=d.a}=n&&n.getOptions()||{},{userAgent:c}=l.a.navigator||{},h=Object(f.b)({release:r,environment:o,user:t.getUser(),...c&&{userAgent:c},...e}),m=t.getSession&&t.getSession();return m&&"ok"===m.status&&Object(f.c)(m,{status:"exited"}),this.endSession(),t.setSession(h),h}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop(),n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=_().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t)}}function _(){return l.a.__SENTRY__=l.a.__SENTRY__||{extensions:{},hub:void 0},l.a}function y(e){const t=_(),n=R(t);return O(t,e),n}function E(){const e=_();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return C(e)}function C(e=_()){return A(e)&&!R(e).isOlderThan(4)||O(e,new v),R(e)}function w(e,t=C()){if(!A(e)||R(e).isOlderThan(4)){const n=t.getStackTop();O(e,new v(n.client,h.a.clone(n.scope)))}}function S(e){const t=_();t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.acs=e}function T(e,t={}){const n=_();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function A(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function R(e){return Object(l.c)("hub",(()=>new v),e)}function O(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}},function(e,t,n){var r=n(46),o=r.Buffer;function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(c(r,t),t.Buffer=l),l.prototype=Object.create(o.prototype),c(o,l),l.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},l.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},l.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},,,function(e,t,n){"use strict";n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return d}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(e[p]=b[p])})(e,b)};Object.create;Object.create;var o="Invariant Violation",c=Object.setPrototypeOf,l=void 0===c?function(e,t){return e.__proto__=t,e}:c,d=function(e){function t(n){void 0===n&&(n=o);var r=e.call(this,"number"==typeof n?o+": "+n+" (see https://github.com/apollographql/invariant-packages)":n)||this;return r.framesToPop=1,r.name=o,l(r,t.prototype),r}return function(e,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}(t,e),t}(Error);function h(e,t){if(!e)throw new d(t)}var f=["debug","log","warn","error","silent"],m=f.indexOf("log");function v(e){return function(){if(f.indexOf(e)>=m){var t=console[e]||console.log;return t.apply(console,arguments)}}}!function(e){e.debug=v("debug"),e.log=v("log"),e.warn=v("warn"),e.error=v("error")}(h||(h={}));var _=n(190),y=n(102),E="__",C=[E,E].join("DEV");!function(){try{Boolean(__DEV__)}catch(e){return Object.defineProperty(_.a,C,{value:"production"!==Object(y.a)((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),_.a[C]}}();var w=n(466),S=Object.entries||function(e){return Object.keys(e).map((function(t){return[t,e[t]]}))},T=n(77),A=n(22);function R(map,e){for(var t=Object.create(null),n=0,r=S(map);n<r.length;n++){var o=r[n],c=o[0],l=o[1];t[c]=e(l,c)}return t}function O(e){if(null===Object.getPrototypeOf(e))return e;for(var map=Object.create(null),t=0,n=S(e);t<n.length;t++){var r=n[t],o=r[0],c=r[1];map[o]=c}return map}var I=n(26);function k(e,t,n){return e.reduce((function(map,e){return map[t(e)]=n(e),map}),Object.create(null))}var N=n(94);var L=n(226);function M(e){return e}var x=n(86);var D=48;function P(code){return!isNaN(code)&&D<=code&&code<=57}function U(input,e){for(var t=Object.create(null),n=new B(input),r=Math.floor(.4*input.length)+1,o=0;o<e.length;o++){var option=e[o],c=n.measure(option,r);void 0!==c&&(t[option]=c)}return Object.keys(t).sort((function(a,b){var e=t[a]-t[b];return 0!==e?e:function(e,t){for(var n=0,r=0;n<e.length&&r<t.length;){var o=e.charCodeAt(n),c=t.charCodeAt(r);if(P(o)&&P(c)){var l=0;do{++n,l=10*l+o-D,o=e.charCodeAt(n)}while(P(o)&&l>0);var d=0;do{++r,d=10*d+c-D,c=t.charCodeAt(r)}while(P(c)&&d>0);if(l<d)return-1;if(l>d)return 1}else{if(o<c)return-1;if(o>c)return 1;++n,++r}}return e.length-t.length}(a,b)}))}var B=function(){function e(input){this._input=input,this._inputLowerCase=input.toLowerCase(),this._inputArray=F(this._inputLowerCase),this._rows=[new Array(input.length+1).fill(0),new Array(input.length+1).fill(0),new Array(input.length+1).fill(0)]}return e.prototype.measure=function(option,e){if(this._input===option)return 0;var t=option.toLowerCase();if(this._inputLowerCase===t)return 1;var a=F(t),b=this._inputArray;if(a.length<b.length){var n=a;a=b,b=n}var r=a.length,o=b.length;if(!(r-o>e)){for(var c=this._rows,l=0;l<=o;l++)c[0][l]=l;for(var i=1;i<=r;i++){for(var d=c[(i-1)%3],h=c[i%3],f=h[0]=i,m=1;m<=o;m++){var v=a[i-1]===b[m-1]?0:1,_=Math.min(d[m]+1,h[m-1]+1,d[m-1]+v);if(i>1&&m>1&&a[i-1]===b[m-2]&&a[i-2]===b[m-1]){var y=c[(i-2)%3][m-2];_=Math.min(_,y+1)}_<f&&(f=_),h[m]=_}if(f>e)return}var E=c[r%3][o];return E<=e?E:void 0}},e}();function F(e){for(var t=e.length,n=new Array(t),i=0;i<t;++i)n[i]=e.charCodeAt(i);return n}var V=n(129),j=n(10),H=n(126),$=n(225);function z(e,t){switch(e.kind){case j.a.NULL:return null;case j.a.INT:return parseInt(e.value,10);case j.a.FLOAT:return parseFloat(e.value);case j.a.STRING:case j.a.ENUM:case j.a.BOOLEAN:return e.value;case j.a.LIST:return e.values.map((function(e){return z(e,t)}));case j.a.OBJECT:return k(e.fields,(function(e){return e.name.value}),(function(e){return z(e.value,t)}));case j.a.VARIABLE:return null==t?void 0:t[e.name.value]}Object($.a)(0,"Unexpected value node: "+Object(A.a)(e))}function W(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function K(e,t,n){return t&&W(e.prototype,t),n&&W(e,n),e}function G(e){return Y(e)||X(e)||Z(e)||Q(e)||J(e)||ee(e)||te(e)||ne(e)}function Y(e){return Object(N.a)(e,se)}function X(e){return Object(N.a)(e,ce)}function Z(e){return Object(N.a)(e,fe)}function Q(e){return Object(N.a)(e,pe)}function J(e){return Object(N.a)(e,me)}function ee(e){return Object(N.a)(e,be)}function te(e){return Object(N.a)(e,re)}function ne(e){return Object(N.a)(e,ie)}function re(e){if(!(this instanceof re))return new re(e);this.ofType=function(e){if(!G(e))throw new Error("Expected ".concat(Object(A.a)(e)," to be a GraphQL type."));return e}(e)}function ie(e){if(!(this instanceof ie))return new ie(e);this.ofType=function(e){if(!function(e){return G(e)&&!ne(e)}(e))throw new Error("Expected ".concat(Object(A.a)(e)," to be a GraphQL nullable type."));return e}(e)}function oe(e){return"function"==typeof e?e():e}function ae(e){return e&&e.length>0?e:void 0}re.prototype.toString=function(){return"["+String(this.ofType)+"]"},re.prototype.toJSON=function(){return this.toString()},Object.defineProperty(re.prototype,T.a,{get:function(){return"GraphQLList"}}),Object(x.a)(re),ie.prototype.toString=function(){return String(this.ofType)+"!"},ie.prototype.toJSON=function(){return this.toString()},Object.defineProperty(ie.prototype,T.a,{get:function(){return"GraphQLNonNull"}}),Object(x.a)(ie);var se=function(){function e(e){var t,n,r,o=null!==(t=e.parseValue)&&void 0!==t?t:M;this.name=e.name,this.description=e.description,this.specifiedByUrl=e.specifiedByUrl,this.serialize=null!==(n=e.serialize)&&void 0!==n?n:M,this.parseValue=o,this.parseLiteral=null!==(r=e.parseLiteral)&&void 0!==r?r:function(e,t){return o(z(e,t))},this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),"string"==typeof e.name||Object(I.a)(0,"Must provide name."),null==e.specifiedByUrl||"string"==typeof e.specifiedByUrl||Object(I.a)(0,"".concat(this.name,' must provide "specifiedByUrl" as a string, ')+"but got: ".concat(Object(A.a)(e.specifiedByUrl),".")),null==e.serialize||"function"==typeof e.serialize||Object(I.a)(0,"".concat(this.name,' must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.')),e.parseLiteral&&("function"==typeof e.parseValue&&"function"==typeof e.parseLiteral||Object(I.a)(0,"".concat(this.name,' must provide both "parseValue" and "parseLiteral" functions.')))}var t=e.prototype;return t.toConfig=function(){var e;return{name:this.name,description:this.description,specifiedByUrl:this.specifiedByUrl,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLScalarType"}}]),e}();Object(x.a)(se);var ce=function(){function e(e){this.name=e.name,this.description=e.description,this.isTypeOf=e.isTypeOf,this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),this._fields=de.bind(void 0,e),this._interfaces=le.bind(void 0,e),"string"==typeof e.name||Object(I.a)(0,"Must provide name."),null==e.isTypeOf||"function"==typeof e.isTypeOf||Object(I.a)(0,"".concat(this.name,' must provide "isTypeOf" as a function, ')+"but got: ".concat(Object(A.a)(e.isTypeOf),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes||[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLObjectType"}}]),e}();function le(e){var t,n=null!==(t=oe(e.interfaces))&&void 0!==t?t:[];return Array.isArray(n)||Object(I.a)(0,"".concat(e.name," interfaces must be an Array or a function which returns an Array.")),n}function de(e){var t=oe(e.fields);return ue(t)||Object(I.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),R(t,(function(t,n){var r;ue(t)||Object(I.a)(0,"".concat(e.name,".").concat(n," field config must be an object.")),!("isDeprecated"in t)||Object(I.a)(0,"".concat(e.name,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),null==t.resolve||"function"==typeof t.resolve||Object(I.a)(0,"".concat(e.name,".").concat(n," field resolver must be a function if ")+"provided, but got: ".concat(Object(A.a)(t.resolve),"."));var o=null!==(r=t.args)&&void 0!==r?r:{};ue(o)||Object(I.a)(0,"".concat(e.name,".").concat(n," args must be an object with argument names as keys."));var c=S(o).map((function(e){var t=e[0],n=e[1];return{name:t,description:n.description,type:n.type,defaultValue:n.defaultValue,deprecationReason:n.deprecationReason,extensions:n.extensions&&O(n.extensions),astNode:n.astNode}}));return{name:n,description:t.description,type:t.type,args:c,resolve:t.resolve,subscribe:t.subscribe,isDeprecated:null!=t.deprecationReason,deprecationReason:t.deprecationReason,extensions:t.extensions&&O(t.extensions),astNode:t.astNode}}))}function ue(e){return Object(L.a)(e)&&!Array.isArray(e)}function he(e){return R(e,(function(e){return{description:e.description,type:e.type,args:(t=e.args,k(t,(function(e){return e.name}),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}))),resolve:e.resolve,subscribe:e.subscribe,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode};var t}))}Object(x.a)(ce);var fe=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),this._fields=de.bind(void 0,e),this._interfaces=le.bind(void 0,e),"string"==typeof e.name||Object(I.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(I.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(A.a)(e.resolveType),"."))}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.getInterfaces=function(){return"function"==typeof this._interfaces&&(this._interfaces=this._interfaces()),this._interfaces},t.toConfig=function(){var e;return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:he(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLInterfaceType"}}]),e}();Object(x.a)(fe);var pe=function(){function e(e){this.name=e.name,this.description=e.description,this.resolveType=e.resolveType,this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),this._types=ge.bind(void 0,e),"string"==typeof e.name||Object(I.a)(0,"Must provide name."),null==e.resolveType||"function"==typeof e.resolveType||Object(I.a)(0,"".concat(this.name,' must provide "resolveType" as a function, ')+"but got: ".concat(Object(A.a)(e.resolveType),"."))}var t=e.prototype;return t.getTypes=function(){return"function"==typeof this._types&&(this._types=this._types()),this._types},t.toConfig=function(){var e;return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLUnionType"}}]),e}();function ge(e){var t=oe(e.types);return Array.isArray(t)||Object(I.a)(0,"Must provide Array of types or a function which returns such an array for Union ".concat(e.name,".")),t}Object(x.a)(pe);var me=function(){function e(e){var t,n,r,o;this.name=e.name,this.description=e.description,this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),this._values=(t=this.name,ue(n=e.values)||Object(I.a)(0,"".concat(t," values must be an object with value names as keys.")),S(n).map((function(e){var n=e[0],r=e[1];return ue(r)||Object(I.a)(0,"".concat(t,".").concat(n,' must refer to an object with a "value" key ')+"representing an internal value but got: ".concat(Object(A.a)(r),".")),!("isDeprecated"in r)||Object(I.a)(0,"".concat(t,".").concat(n,' should provide "deprecationReason" instead of "isDeprecated".')),{name:n,description:r.description,value:void 0!==r.value?r.value:n,isDeprecated:null!=r.deprecationReason,deprecationReason:r.deprecationReason,extensions:r.extensions&&O(r.extensions),astNode:r.astNode}}))),this._valueLookup=new Map(this._values.map((function(e){return[e.value,e]}))),this._nameLookup=(r=this._values,o=function(e){return e.name},r.reduce((function(map,e){return map[o(e)]=e,map}),Object.create(null))),"string"==typeof e.name||Object(I.a)(0,"Must provide name.")}var t=e.prototype;return t.getValues=function(){return this._values},t.getValue=function(e){return this._nameLookup[e]},t.serialize=function(e){var t=this._valueLookup.get(e);if(void 0===t)throw new V.a('Enum "'.concat(this.name,'" cannot represent value: ').concat(Object(A.a)(e)));return t.name},t.parseValue=function(e){if("string"!=typeof e){var t=Object(A.a)(e);throw new V.a('Enum "'.concat(this.name,'" cannot represent non-string value: ').concat(t,".")+ve(this,t))}var n=this.getValue(e);if(null==n)throw new V.a('Value "'.concat(e,'" does not exist in "').concat(this.name,'" enum.')+ve(this,e));return n.value},t.parseLiteral=function(e,t){if(e.kind!==j.a.ENUM){var n=Object(H.print)(e);throw new V.a('Enum "'.concat(this.name,'" cannot represent non-enum value: ').concat(n,".")+ve(this,n),e)}var r=this.getValue(e.value);if(null==r){var o=Object(H.print)(e);throw new V.a('Value "'.concat(o,'" does not exist in "').concat(this.name,'" enum.')+ve(this,o),e)}return r.value},t.toConfig=function(){var e,t=k(this.getValues(),(function(e){return e.name}),(function(e){return{description:e.description,value:e.value,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLEnumType"}}]),e}();function ve(e,t){return function(e,t){var n="string"==typeof e?[e,t]:[void 0,e],r=n[0],o=" Did you mean ";r&&(o+=r+" ");var c=n[1].map((function(e){return'"'.concat(e,'"')}));switch(c.length){case 0:return"";case 1:return o+c[0]+"?";case 2:return o+c[0]+" or "+c[1]+"?"}var l=c.slice(0,5),d=l.pop();return o+l.join(", ")+", or "+d+"?"}("the enum value",U(t,e.getValues().map((function(e){return e.name}))))}Object(x.a)(me);var be=function(){function e(e){this.name=e.name,this.description=e.description,this.extensions=e.extensions&&O(e.extensions),this.astNode=e.astNode,this.extensionASTNodes=ae(e.extensionASTNodes),this._fields=_e.bind(void 0,e),"string"==typeof e.name||Object(I.a)(0,"Must provide name.")}var t=e.prototype;return t.getFields=function(){return"function"==typeof this._fields&&(this._fields=this._fields()),this._fields},t.toConfig=function(){var e,t=R(this.getFields(),(function(e){return{description:e.description,type:e.type,defaultValue:e.defaultValue,deprecationReason:e.deprecationReason,extensions:e.extensions,astNode:e.astNode}}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:null!==(e=this.extensionASTNodes)&&void 0!==e?e:[]}},t.toString=function(){return this.name},t.toJSON=function(){return this.toString()},K(e,[{key:T.a,get:function(){return"GraphQLInputObjectType"}}]),e}();function _e(e){var t=oe(e.fields);return ue(t)||Object(I.a)(0,"".concat(e.name," fields must be an object with field names as keys or a function which returns such an object.")),R(t,(function(t,n){return!("resolve"in t)||Object(I.a)(0,"".concat(e.name,".").concat(n," field has a resolve property, but Input Types cannot define resolvers.")),{name:n,description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions&&O(t.extensions),astNode:t.astNode}}))}Object(x.a)(be),G(null),Object(w.a)()},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(193);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e){return l(e,[])}function l(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var n=[].concat(t,[e]),o=function(object){var e=object[String(r.a)];if("function"==typeof e)return e;if("function"==typeof object.inspect)return object.inspect}(e);if(void 0!==o){var c=o.call(e);if(c!==e)return"string"==typeof c?c:l(c,n)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>2)return"[Array]";for(var n=Math.min(10,e.length),r=e.length-n,o=[],i=0;i<n;++i)o.push(l(e[i],t));1===r?o.push("... 1 more item"):r>1&&o.push("... ".concat(r," more items"));return"["+o.join(", ")+"]"}(e,n);return function(object,e){var t=Object.keys(object);if(0===t.length)return"{}";if(e.length>2)return"["+function(object){var e=Object.prototype.toString.call(object).replace(/^\[object /,"").replace(/]$/,"");if("Object"===e&&"function"==typeof object.constructor){var t=object.constructor.name;if("string"==typeof t&&""!==t)return t}return e}(object)+"]";return"{ "+t.map((function(t){return t+": "+l(object[t],e)})).join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}},,,,function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(t)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t),n.d(t,"createDecorator",(function(){return v})),n.d(t,"mixins",(function(){return _}));var r=n(9);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(e){return function(e){if(Array.isArray(e)){for(var i=0,t=new Array(e.length);i<e.length;i++)t[i]=e[i];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function d(){return"undefined"!=typeof Reflect&&Reflect.defineMetadata&&Reflect.getOwnMetadataKeys}function h(e,t){f(e,t),Object.getOwnPropertyNames(t.prototype).forEach((function(n){f(e.prototype,t.prototype,n)})),Object.getOwnPropertyNames(t).forEach((function(n){f(e,t,n)}))}function f(e,t,n){(n?Reflect.getOwnMetadataKeys(t,n):Reflect.getOwnMetadataKeys(t)).forEach((function(r){var o=n?Reflect.getOwnMetadata(r,t,n):Reflect.getOwnMetadata(r,t);n?Reflect.defineMetadata(r,o,e,n):Reflect.defineMetadata(r,o,e)}))}var m={__proto__:[]}instanceof Array;function v(e){return function(t,n,r){var o="function"==typeof t?t:t.constructor;o.__decorators__||(o.__decorators__=[]),"number"!=typeof r&&(r=void 0),o.__decorators__.push((function(t){return e(t,n,r)}))}}function _(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return r.default.extend({mixins:t})}function y(e,t){var n=t.prototype._init;t.prototype._init=function(){var t=this,n=Object.getOwnPropertyNames(e);if(e.$options.props)for(var r in e.$options.props)e.hasOwnProperty(r)||n.push(r);n.forEach((function(n){Object.defineProperty(t,n,{get:function(){return e[n]},set:function(t){e[n]=t},configurable:!0})}))};var data=new t;t.prototype._init=n;var r={};return Object.keys(data).forEach((function(e){void 0!==data[e]&&(r[e]=data[e])})),r}var E=["data","beforeCreate","created","beforeMount","mounted","beforeDestroy","destroyed","beforeUpdate","updated","activated","deactivated","render","errorCaptured","serverPrefetch"];function C(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.name=t.name||e._componentTag||e.name;var n=e.prototype;Object.getOwnPropertyNames(n).forEach((function(e){if("constructor"!==e)if(E.indexOf(e)>-1)t[e]=n[e];else{var r=Object.getOwnPropertyDescriptor(n,e);void 0!==r.value?"function"==typeof r.value?(t.methods||(t.methods={}))[e]=r.value:(t.mixins||(t.mixins=[])).push({data:function(){return c({},e,r.value)}}):(r.get||r.set)&&((t.computed||(t.computed={}))[e]={get:r.get,set:r.set})}})),(t.mixins||(t.mixins=[])).push({data:function(){return y(this,e)}});var o=e.__decorators__;o&&(o.forEach((function(e){return e(t)})),delete e.__decorators__);var l=Object.getPrototypeOf(e.prototype),f=l instanceof r.default?l.constructor:r.default,m=f.extend(t);return S(m,e,f),d()&&h(m,e),m}var w={prototype:!0,arguments:!0,callee:!0,caller:!0};function S(e,t,n){Object.getOwnPropertyNames(t).forEach((function(r){if(!w[r]){var c=Object.getOwnPropertyDescriptor(e,r);if(!c||c.configurable){var l,d,h=Object.getOwnPropertyDescriptor(t,r);if(!m){if("cid"===r)return;var f=Object.getOwnPropertyDescriptor(n,r);if(l=h.value,d=o(l),null!=l&&("object"===d||"function"===d)&&f&&f.value===h.value)return}0,Object.defineProperty(e,r,h)}}}))}function T(e){return"function"==typeof e?C(e):function(t){return C(t,e)}}T.registerHooks=function(e){E.push.apply(E,l(e))},t.default=T},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return o})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return _})),n.d(t,"g",(function(){return T})),n.d(t,"h",(function(){return S})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return m})),n.d(t,"k",(function(){return E})),n.d(t,"l",(function(){return f})),n.d(t,"m",(function(){return w})),n.d(t,"n",(function(){return C}));const r=Object.prototype.toString;function o(e){switch(r.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return T(e,Error)}}function c(e,t){return r.call(e)===`[object ${t}]`}function l(e){return c(e,"ErrorEvent")}function d(e){return c(e,"DOMError")}function h(e){return c(e,"DOMException")}function f(e){return c(e,"String")}function m(e){return null===e||"object"!=typeof e&&"function"!=typeof e}function v(e){return c(e,"Object")}function _(e){return"undefined"!=typeof Event&&T(e,Event)}function y(e){return"undefined"!=typeof Element&&T(e,Element)}function E(e){return c(e,"RegExp")}function C(e){return Boolean(e&&e.then&&"function"==typeof e.then)}function w(e){return v(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function S(e){return"number"==typeof e&&e!=e}function T(e,base){try{return e instanceof base}catch(e){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(86),o=function(){function e(e,t,source){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=source}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();Object(r.a)(o);var c=function(){function e(e,t,n,line,r,o,c){this.kind=e,this.start=t,this.end=n,this.line=line,this.column=r,this.value=c,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();function l(e){return null!=e&&"string"==typeof e.kind}Object(r.a)(c)},,,function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var content=e(t);return t[2]?"@media ".concat(t[2]," {").concat(content,"}"):content})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(r)for(var i=0;i<this.length;i++){var c=this[i][0];null!=c&&(o[c]=!0)}for(var l=0;l<e.length;l++){var d=[].concat(e[l]);r&&o[d[0]]||(n&&(d[2]?d[2]="".concat(n," and ").concat(d[2]):d[2]=n),t.push(d))}},t}},function(e,t,n){"use strict";function r(e,t){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],c=o[0],l={id:e+":"+i,css:o[1],media:o[2],sourceMap:o[3]};r[c]?r[c].parts.push(l):n.push(r[c]={id:c,parts:[l]})}return n}n.r(t),n.d(t,"default",(function(){return y}));var o="undefined"!=typeof document;if("undefined"!=typeof DEBUG&&DEBUG&&!o)throw new Error("vue-style-loader cannot be used in a non-browser environment. Use { target: 'node' } in your Webpack config to indicate a server-rendering environment.");var c={},head=o&&(document.head||document.getElementsByTagName("head")[0]),l=null,d=0,h=!1,f=function(){},m=null,v="data-vue-ssr-id",_="undefined"!=typeof navigator&&/msie [6-9]\b/.test(navigator.userAgent.toLowerCase());function y(e,t,n,o){h=n,m=o||{};var l=r(e,t);return E(l),function(t){for(var n=[],i=0;i<l.length;i++){var o=l[i];(d=c[o.id]).refs--,n.push(d)}t?E(l=r(e,t)):l=[];for(i=0;i<n.length;i++){var d;if(0===(d=n[i]).refs){for(var h=0;h<d.parts.length;h++)d.parts[h]();delete c[d.id]}}}}function E(e){for(var i=0;i<e.length;i++){var t=e[i],n=c[t.id];if(n){n.refs++;for(var r=0;r<n.parts.length;r++)n.parts[r](t.parts[r]);for(;r<t.parts.length;r++)n.parts.push(w(t.parts[r]));n.parts.length>t.parts.length&&(n.parts.length=t.parts.length)}else{var o=[];for(r=0;r<t.parts.length;r++)o.push(w(t.parts[r]));c[t.id]={id:t.id,refs:1,parts:o}}}}function C(){var e=document.createElement("style");return e.type="text/css",head.appendChild(e),e}function w(e){var t,n,r=document.querySelector("style["+v+'~="'+e.id+'"]');if(r){if(h)return f;r.parentNode.removeChild(r)}if(_){var o=d++;r=l||(l=C()),t=A.bind(null,r,o,!1),n=A.bind(null,r,o,!0)}else r=C(),t=R.bind(null,r),n=function(){r.parentNode.removeChild(r)};return t(e),function(r){if(r){if(r.css===e.css&&r.media===e.media&&r.sourceMap===e.sourceMap)return;t(e=r)}else n()}}var S,T=(S=[],function(e,t){return S[e]=t,S.filter(Boolean).join("\n")});function A(e,t,n,r){var o=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=T(t,o);else{var c=document.createTextNode(o),l=e.childNodes;l[t]&&e.removeChild(l[t]),l.length?e.insertBefore(c,l[t]):e.appendChild(c)}}function R(e,t){var n=t.css,r=t.media,o=t.sourceMap;if(r&&e.setAttribute("media",r),m.ssrId&&e.setAttribute(v,t.id),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}},,,,,,,function(e,t,n){"use strict";(function(e){function r(e){return e&&e.Math==Math?e:void 0}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));const o="object"==typeof globalThis&&r(globalThis)||"object"==typeof window&&r(window)||"object"==typeof self&&r(self)||"object"==typeof e&&r(e)||function(){return this}()||{};function c(){return o}function l(e,t,n){const r=n||o,c=r.__SENTRY__=r.__SENTRY__||{};return c[e]||(c[e]=t())}}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return C})),n.d(t,"d",(function(){return E})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return f})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return m}));var r=n(471),o=n(31),c=n(104);function l(source,e,t){if(!(e in source))return;const n=source[e],r=t(n);if("function"==typeof r)try{h(r,n)}catch(e){}source[e]=r}function d(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function h(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,d(e,"__sentry_original__",t)}function f(e){return e.__sentry_original__}function m(object){return Object.keys(object).map((e=>`${encodeURIComponent(e)}=${encodeURIComponent(object[e])}`)).join("&")}function v(e){if(Object(o.d)(e))return{message:e.message,name:e.name,stack:e.stack,...y(e)};if(Object(o.f)(e)){const t={type:e.type,target:_(e.target),currentTarget:_(e.currentTarget),...y(e)};return"undefined"!=typeof CustomEvent&&Object(o.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function _(e){try{return Object(o.c)(e)?Object(r.b)(e):Object.prototype.toString.call(e)}catch(e){return"<unknown>"}}function y(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function E(e,t=40){const n=Object.keys(v(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(c.d)(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Object(c.d)(r,t)}return""}function C(e){return w(e,new Map)}function w(e,t){if(Object(o.i)(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.keys(e))void 0!==e[n]&&(r[n]=w(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(w(e,t))})),r}return e}},,function(e,t,n){"use strict";(function(e){var r=n(609),o=n(610),c=n(390);function l(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function d(e,t){if(l()<t)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=h.prototype:(null===e&&(e=new h(t)),e.length=t),e}function h(e,t,n){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(e,t,n);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return v(this,e)}return f(this,e,t,n)}function f(e,t,n,r){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError("'offset' is out of bounds");if(t.byteLength<n+(r||0))throw new RangeError("'length' is out of bounds");t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);h.TYPED_ARRAY_SUPPORT?(e=t).__proto__=h.prototype:e=_(e,t);return e}(e,t,n,r):"string"==typeof t?function(e,t,n){"string"==typeof n&&""!==n||(n="utf8");if(!h.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|E(t,n),o=(e=d(e,r)).write(t,n);o!==r&&(e=e.slice(0,o));return e}(e,t,n):function(e,t){if(h.isBuffer(t)){var n=0|y(t.length);return 0===(e=d(e,n)).length||t.copy(e,0,0,n),e}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(r=t.length)!=r?d(e,0):_(e,t);if("Buffer"===t.type&&c(t.data))return _(e,t.data)}var r;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function m(e){if("number"!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function v(e,t){if(m(t),e=d(e,t<0?0:0|y(t)),!h.TYPED_ARRAY_SUPPORT)for(var i=0;i<t;++i)e[i]=0;return e}function _(e,t){var n=t.length<0?0:0|y(t.length);e=d(e,n);for(var i=0;i<n;i+=1)e[i]=255&t[i];return e}function y(e){if(e>=l())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+l().toString(16)+" bytes");return 0|e}function E(e,t){if(h.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return Y(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return X(e).length;default:if(r)return Y(e).length;t=(""+t).toLowerCase(),r=!0}}function C(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return U(this,t,n);case"utf8":case"utf-8":return M(this,t,n);case"ascii":return D(this,t,n);case"latin1":case"binary":return P(this,t,n);case"base64":return L(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(b,e,t){var i=b[e];b[e]=b[t],b[t]=i}function S(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=h.from(t,r)),h.isBuffer(t))return 0===t.length?-1:T(e,t,n,r,o);if("number"==typeof t)return t&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):T(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function T(e,t,n,r,o){var i,c=1,l=e.length,d=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;c=2,l/=2,d/=2,n/=2}function h(e,i){return 1===c?e[i]:e.readUInt16BE(i*c)}if(o){var f=-1;for(i=n;i<l;i++)if(h(e,i)===h(t,-1===f?0:i-f)){if(-1===f&&(f=i),i-f+1===d)return f*c}else-1!==f&&(i-=i-f),f=-1}else for(n+d>l&&(n=l-d),i=n;i>=0;i--){for(var m=!0,v=0;v<d;v++)if(h(e,i+v)!==h(t,v)){m=!1;break}if(m)return i}return-1}function A(e,t,n,r){n=Number(n)||0;var o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;var c=t.length;if(c%2!=0)throw new TypeError("Invalid hex string");r>c/2&&(r=c/2);for(var i=0;i<r;++i){var l=parseInt(t.substr(2*i,2),16);if(isNaN(l))return i;e[n+i]=l}return i}function R(e,t,n,r){return Z(Y(t,e.length-n),e,n,r)}function O(e,t,n,r){return Z(function(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}(t),e,n,r)}function I(e,t,n,r){return O(e,t,n,r)}function k(e,t,n,r){return Z(X(t),e,n,r)}function N(e,t,n,r){return Z(function(e,t){for(var n,r,o,c=[],i=0;i<e.length&&!((t-=2)<0);++i)r=(n=e.charCodeAt(i))>>8,o=n%256,c.push(o),c.push(r);return c}(t,e.length-n),e,n,r)}function L(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function M(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,c,l,d,h=e[i],f=null,m=h>239?4:h>223?3:h>191?2:1;if(i+m<=n)switch(m){case 1:h<128&&(f=h);break;case 2:128==(192&(o=e[i+1]))&&(d=(31&h)<<6|63&o)>127&&(f=d);break;case 3:o=e[i+1],c=e[i+2],128==(192&o)&&128==(192&c)&&(d=(15&h)<<12|(63&o)<<6|63&c)>2047&&(d<55296||d>57343)&&(f=d);break;case 4:o=e[i+1],c=e[i+2],l=e[i+3],128==(192&o)&&128==(192&c)&&128==(192&l)&&(d=(15&h)<<18|(63&o)<<12|(63&c)<<6|63&l)>65535&&d<1114112&&(f=d)}null===f?(f=65533,m=1):f>65535&&(f-=65536,r.push(f>>>10&1023|55296),f=56320|1023&f),r.push(f),i+=m}return function(e){var t=e.length;if(t<=x)return String.fromCharCode.apply(String,e);var n="",i=0;for(;i<t;)n+=String.fromCharCode.apply(String,e.slice(i,i+=x));return n}(r)}t.Buffer=h,t.SlowBuffer=function(e){+e!=e&&(e=0);return h.alloc(+e)},t.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=l(),h.poolSize=8192,h._augment=function(e){return e.__proto__=h.prototype,e},h.from=function(e,t,n){return f(null,e,t,n)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(e,t,n){return function(e,t,n,r){return m(t),t<=0?d(e,t):void 0!==n?"string"==typeof r?d(e,t).fill(n,r):d(e,t).fill(n):d(e,t)}(null,e,t,n)},h.allocUnsafe=function(e){return v(null,e)},h.allocUnsafeSlow=function(e){return v(null,e)},h.isBuffer=function(b){return!(null==b||!b._isBuffer)},h.compare=function(a,b){if(!h.isBuffer(a)||!h.isBuffer(b))throw new TypeError("Arguments must be Buffers");if(a===b)return 0;for(var e=a.length,t=b.length,i=0,n=Math.min(e,t);i<n;++i)if(a[i]!==b[i]){e=a[i],t=b[i];break}return e<t?-1:t<e?1:0},h.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},h.concat=function(e,t){if(!c(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return h.alloc(0);var i;if(void 0===t)for(t=0,i=0;i<e.length;++i)t+=e[i].length;var n=h.allocUnsafe(t),r=0;for(i=0;i<e.length;++i){var o=e[i];if(!h.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(n,r),r+=o.length}return n},h.byteLength=E,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var i=0;i<e;i+=2)w(this,i,i+1);return this},h.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var i=0;i<e;i+=4)w(this,i,i+3),w(this,i+1,i+2);return this},h.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var i=0;i<e;i+=8)w(this,i,i+7),w(this,i+1,i+6),w(this,i+2,i+5),w(this,i+3,i+4);return this},h.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?M(this,0,e):C.apply(this,arguments)},h.prototype.equals=function(b){if(!h.isBuffer(b))throw new TypeError("Argument must be a Buffer");return this===b||0===h.compare(this,b)},h.prototype.inspect=function(){var e="",n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),"<Buffer "+e+">"},h.prototype.compare=function(e,t,n,r,o){if(!h.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;for(var c=(o>>>=0)-(r>>>=0),l=(n>>>=0)-(t>>>=0),d=Math.min(c,l),f=this.slice(r,o),m=e.slice(t,n),i=0;i<d;++i)if(f[i]!==m[i]){c=f[i],l=m[i];break}return c<l?-1:l<c?1:0},h.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},h.prototype.indexOf=function(e,t,n){return S(this,e,t,n,!0)},h.prototype.lastIndexOf=function(e,t,n){return S(this,e,t,n,!1)},h.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(n)?(n|=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}var o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var c=!1;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return R(this,e,t,n);case"ascii":return O(this,e,t,n);case"latin1":case"binary":return I(this,e,t,n);case"base64":return k(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,e,t,n);default:if(c)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),c=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var x=4096;function D(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function P(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function U(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var o="",i=t;i<n;++i)o+=G(e[i]);return o}function B(e,t,n){for(var r=e.slice(t,n),o="",i=0;i<r.length;i+=2)o+=String.fromCharCode(r[i]+256*r[i+1]);return o}function F(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function V(e,t,n,r,o,c){if(!h.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<c)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function j(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function H(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function $(e,t,n,r,o,c){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function z(e,t,n,r,c){return c||$(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function W(e,t,n,r,c){return c||$(e,0,n,8),o.write(e,t,n,r,52,8),n+8}h.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),h.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=h.prototype;else{var o=t-e;n=new h(o,void 0);for(var i=0;i<o;++i)n[i]=this[i+e]}return n},h.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r},h.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e+--t],o=1;t>0&&(o*=256);)r+=this[e+--t]*o;return r},h.prototype.readUInt8=function(e,t){return t||F(e,1,this.length),this[e]},h.prototype.readUInt16LE=function(e,t){return t||F(e,2,this.length),this[e]|this[e+1]<<8},h.prototype.readUInt16BE=function(e,t){return t||F(e,2,this.length),this[e]<<8|this[e+1]},h.prototype.readUInt32LE=function(e,t){return t||F(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},h.prototype.readUInt32BE=function(e,t){return t||F(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},h.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var r=this[e],o=1,i=0;++i<t&&(o*=256);)r+=this[e+i]*o;return r>=(o*=128)&&(r-=Math.pow(2,8*t)),r},h.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||F(e,t,this.length);for(var i=t,r=1,o=this[e+--i];i>0&&(r*=256);)o+=this[e+--i]*r;return o>=(r*=128)&&(o-=Math.pow(2,8*t)),o},h.prototype.readInt8=function(e,t){return t||F(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){t||F(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(e,t){t||F(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(e,t){return t||F(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},h.prototype.readInt32BE=function(e,t){return t||F(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},h.prototype.readFloatLE=function(e,t){return t||F(e,4,this.length),o.read(this,e,!0,23,4)},h.prototype.readFloatBE=function(e,t){return t||F(e,4,this.length),o.read(this,e,!1,23,4)},h.prototype.readDoubleLE=function(e,t){return t||F(e,8,this.length),o.read(this,e,!0,52,8)},h.prototype.readDoubleBE=function(e,t){return t||F(e,8,this.length),o.read(this,e,!1,52,8)},h.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||V(this,e,t,n,Math.pow(2,8*n)-1,0);var o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||V(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},h.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,1,255,0),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},h.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},h.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},h.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):H(this,e,t,!0),t+4},h.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},h.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);V(this,e,t,n,o-1,-o)}var i=0,c=1,sub=0;for(this[t]=255&e;++i<n&&(c*=256);)e<0&&0===sub&&0!==this[t+i-1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+n},h.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);V(this,e,t,n,o-1,-o)}var i=n-1,c=1,sub=0;for(this[t+i]=255&e;--i>=0&&(c*=256);)e<0&&0===sub&&0!==this[t+i+1]&&(sub=1),this[t+i]=(e/c>>0)-sub&255;return t+n},h.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,1,127,-128),h.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},h.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):j(this,e,t,!0),t+2},h.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):j(this,e,t,!1),t+2},h.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):H(this,e,t,!0),t+4},h.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||V(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),h.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):H(this,e,t,!1),t+4},h.prototype.writeFloatLE=function(e,t,n){return z(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){return z(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){return W(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){return W(this,e,t,!1,n)},h.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},h.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),1===e.length){var code=e.charCodeAt(0);code<256&&(e=code)}if(void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!h.isEncoding(r))throw new TypeError("Unknown encoding: "+r)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;var i;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i<n;++i)this[i]=e;else{var o=h.isBuffer(e)?e:Y(new h(e,r).toString()),c=o.length;for(i=0;i<n-t;++i)this[i+t]=o[i%c]}return this};var K=/[^+\/0-9A-Za-z-_]/g;function G(e){return e<16?"0"+e.toString(16):e.toString(16)}function Y(e,t){var n;t=t||1/0;for(var r=e.length,o=null,c=[],i=0;i<r;++i){if((n=e.charCodeAt(i))>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&c.push(239,191,189);continue}if(i+1===r){(t-=3)>-1&&c.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&c.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&c.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;c.push(n)}else if(n<2048){if((t-=2)<0)break;c.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;c.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;c.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return c}function X(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(K,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Z(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(23))},,function(e,t,n){"use strict";n.r(t),n.d(t,"ApolloLink",(function(){return A})),n.d(t,"concat",(function(){return T})),n.d(t,"createOperation",(function(){return _})),n.d(t,"empty",(function(){return C})),n.d(t,"execute",(function(){return R})),n.d(t,"from",(function(){return w})),n.d(t,"fromError",(function(){return v})),n.d(t,"fromPromise",(function(){return m})),n.d(t,"makePromise",(function(){return f})),n.d(t,"split",(function(){return S})),n.d(t,"toPromise",(function(){return h}));var r=n(65);n.d(t,"Observable",(function(){return r.a}));var o=n(11),c=n(4),l=n(7);n.d(t,"getOperationName",(function(){return l.getOperationName}));!function(e){function t(t,link){var n=e.call(this,t)||this;return n.link=link,n}Object(c.__extends)(t,e)}(Error);function d(link){return link.request.length<=1}function h(e){var t=!1;return new Promise((function(n,r){e.subscribe({next:function(data){t||(t=!0,n(data))},error:r})}))}var f=h;function m(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}function v(e){return new r.a((function(t){t.error(e)}))}function _(e,t){var n=Object(c.__assign)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(c.__assign)({},n,e(n)):Object(c.__assign)({},n,e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(c.__assign)({},n)}}),Object.defineProperty(t,"toKey",{enumerable:!1,value:function(){return function(e){var t=e.query,n=e.variables,r=e.operationName;return JSON.stringify([r,t,n])}(t)}}),t}function y(e,t){return t?t(e):r.a.of()}function E(e){return"function"==typeof e?new A(e):e}function C(){return new A((function(){return r.a.of()}))}function w(e){return 0===e.length?C():e.map(E).reduce((function(e,t){return e.concat(t)}))}function S(e,t,n){var o=E(t),c=E(n||new A(y));return d(o)&&d(c)?new A((function(t){return e(t)?o.request(t)||r.a.of():c.request(t)||r.a.of()})):new A((function(t,n){return e(t)?o.request(t,n)||r.a.of():c.request(t,n)||r.a.of()}))}var T=function(e,t){var n=E(e);if(d(n))return n;var o=E(t);return d(o)?new A((function(e){return n.request(e,(function(e){return o.request(e)||r.a.of()}))||r.a.of()})):new A((function(e,t){return n.request(e,(function(e){return o.request(e,t)||r.a.of()}))||r.a.of()}))},A=function(){function e(e){e&&(this.request=e)}return e.prototype.split=function(t,n,r){return this.concat(S(t,n,r||new e(y)))},e.prototype.concat=function(e){return T(this,e)},e.prototype.request=function(e,t){throw new o.a(1)},e.empty=C,e.from=w,e.split=S,e.execute=R,e}();function R(link,e){return link.request(_(e.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?Object(l.getOperationName)(t.query):""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var c=r[n];if(t.indexOf(c)<0)throw new o.a(2)}return e}(e))))||r.a.of()}},,function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(687).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:n-48&15}function h(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function f(e,t,n,r){for(var o=0,c=Math.min(e.length,n),i=t;i<c;i++){var l=e.charCodeAt(i)-48;o*=r,o+=l>=49?l-49+10:l>=17?l-17+10:l}return o}c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===base?this._parseHex(e,n,t):(this._parseBase(e,base,n),"le"===t&&this._initArray(this.toArray(),base,t)))},c.prototype._initNumber=function(e,base,t){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t)},c.prototype._initArray=function(e,base,t){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o,c=0;if("be"===t)for(i=e.length-1,n=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this.strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var r,o=0,c=0;if("be"===n)for(i=e.length-1;i>=t;i-=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this.strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i<l;i+=n)d=f(e,i,i+n,base),this.imuln(r),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==c){var h=1;for(d=f(e,i,e.length,base),i=0;i<c;i++)h*=base;this.imuln(h),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this.strip()},c.prototype.copy=function(e){e.words=new Array(this.length);for(var i=0;i<this.length;i++)e.words[i]=this.words[i];e.length=this.length,e.negative=this.negative,e.red=this.red},c.prototype.clone=function(){var e=new c(null);return this.copy(e),e},c.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},c.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},c.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var m=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],v=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],_=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function y(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d<r;d++){for(var h=l>>>26,f=67108863&l,m=Math.min(d,t.length-1),v=Math.max(0,d-e.length+1);v<=m;v++){var i=d-v|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[v])+f)/67108864|0,f=67108863&o}n.words[d]=0|f,l=0|h}return 0!==l?n.words[d]=0|l:n.length--,n.strip()}c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i<this.length;i++){var c=this.words[i],l=(16777215&(c<<n|o)).toString(16);t=0!==(o=c>>>24-n&16777215)||i!==this.length-1?m[6-l.length]+l+t:l+t,(n+=2)>=26&&(n-=26,i--)}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=v[base],h=_[base];t="";var f=this.clone();for(f.negative=0;!f.isZero();){var y=f.modn(h).toString(base);t=(f=f.idivn(h)).isZero()?y+t:m[d-y.length]+y+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16)},c.prototype.toBuffer=function(e,t){return r(void 0!==l),this.toArrayLike(l,e,t)},c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},c.prototype.toArrayLike=function(e,t,n){var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0"),this.strip();var b,i,l="le"===t,d=new e(c),q=this.clone();if(l){for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),d[i]=b;for(;i<c;i++)d[i]=0}else{for(i=0;i<c-o;i++)d[i]=0;for(i=0;!q.isZero();i++)b=q.andln(255),q.iushrn(8),d[c-i-1]=b}return d},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(e+=b,26!==b)break}return e},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},c.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return 0!==this.negative},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]|e.words[i];return this.strip()},c.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},c.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=b.length,this.strip()},c.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},c.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this.strip()},c.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},c.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this.strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this.strip()},c.prototype.iadd=function(e){var t,a,b;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i<b.length;i++)t=(0|a.words[i])+(0|b.words[i])+n,this.words[i]=67108863&t,n=t>>>26;for(;0!==n&&i<a.length;i++)t=(0|a.words[i])+n,this.words[i]=67108863&t,n=t>>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},c.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i<b.length;i++)r=(t=(0|a.words[i])-(0|b.words[i])+r)>>26,this.words[i]=67108863&t;for(;0!==r&&i<a.length;i++)r=(t=(0|a.words[i])+r)>>26,this.words[i]=67108863&t;if(0===r&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this.strip()},c.prototype.sub=function(e){return this.clone().isub(e)};var E=function(e,t,n){var r,o,c,a=e.words,b=t.words,l=n.words,d=0,h=0|a[0],f=8191&h,m=h>>>13,v=0|a[1],_=8191&v,y=v>>>13,E=0|a[2],C=8191&E,w=E>>>13,S=0|a[3],T=8191&S,A=S>>>13,R=0|a[4],O=8191&R,I=R>>>13,k=0|a[5],N=8191&k,L=k>>>13,M=0|a[6],x=8191&M,D=M>>>13,P=0|a[7],U=8191&P,B=P>>>13,F=0|a[8],V=8191&F,j=F>>>13,H=0|a[9],$=8191&H,z=H>>>13,W=0|b[0],K=8191&W,G=W>>>13,Y=0|b[1],X=8191&Y,Z=Y>>>13,Q=0|b[2],J=8191&Q,ee=Q>>>13,te=0|b[3],ne=8191&te,re=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ce=8191&se,le=se>>>13,de=0|b[6],ue=8191&de,he=de>>>13,fe=0|b[7],pe=8191&fe,ge=fe>>>13,me=0|b[8],ve=8191&me,be=me>>>13,_e=0|b[9],ye=8191&_e,Ee=_e>>>13;n.negative=e.negative^t.negative,n.length=19;var Ce=(d+(r=Math.imul(f,K))|0)+((8191&(o=(o=Math.imul(f,G))+Math.imul(m,K)|0))<<13)|0;d=((c=Math.imul(m,G))+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(_,K),o=(o=Math.imul(_,G))+Math.imul(y,K)|0,c=Math.imul(y,G);var we=(d+(r=r+Math.imul(f,X)|0)|0)+((8191&(o=(o=o+Math.imul(f,Z)|0)+Math.imul(m,X)|0))<<13)|0;d=((c=c+Math.imul(m,Z)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,K),o=(o=Math.imul(C,G))+Math.imul(w,K)|0,c=Math.imul(w,G),r=r+Math.imul(_,X)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(y,X)|0,c=c+Math.imul(y,Z)|0;var Se=(d+(r=r+Math.imul(f,J)|0)|0)+((8191&(o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,J)|0))<<13)|0;d=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(T,K),o=(o=Math.imul(T,G))+Math.imul(A,K)|0,c=Math.imul(A,G),r=r+Math.imul(C,X)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(_,J)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(y,J)|0,c=c+Math.imul(y,ee)|0;var Te=(d+(r=r+Math.imul(f,ne)|0)|0)+((8191&(o=(o=o+Math.imul(f,re)|0)+Math.imul(m,ne)|0))<<13)|0;d=((c=c+Math.imul(m,re)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(O,K),o=(o=Math.imul(O,G))+Math.imul(I,K)|0,c=Math.imul(I,G),r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(A,X)|0,c=c+Math.imul(A,Z)|0,r=r+Math.imul(C,J)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(w,J)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ae=(d+(r=r+Math.imul(f,oe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ae)|0)+Math.imul(m,oe)|0))<<13)|0;d=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,K),o=(o=Math.imul(N,G))+Math.imul(L,K)|0,c=Math.imul(L,G),r=r+Math.imul(O,X)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(I,X)|0,c=c+Math.imul(I,Z)|0,r=r+Math.imul(T,J)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(A,J)|0,c=c+Math.imul(A,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(w,ne)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(_,oe)|0,o=(o=o+Math.imul(_,ae)|0)+Math.imul(y,oe)|0,c=c+Math.imul(y,ae)|0;var Re=(d+(r=r+Math.imul(f,ce)|0)|0)+((8191&(o=(o=o+Math.imul(f,le)|0)+Math.imul(m,ce)|0))<<13)|0;d=((c=c+Math.imul(m,le)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(x,K),o=(o=Math.imul(x,G))+Math.imul(D,K)|0,c=Math.imul(D,G),r=r+Math.imul(N,X)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(L,X)|0,c=c+Math.imul(L,Z)|0,r=r+Math.imul(O,J)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(I,J)|0,c=c+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(A,ne)|0,c=c+Math.imul(A,re)|0,r=r+Math.imul(C,oe)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,le)|0;var Oe=(d+(r=r+Math.imul(f,ue)|0)|0)+((8191&(o=(o=o+Math.imul(f,he)|0)+Math.imul(m,ue)|0))<<13)|0;d=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,K),o=(o=Math.imul(U,G))+Math.imul(B,K)|0,c=Math.imul(B,G),r=r+Math.imul(x,X)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(N,J)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(L,J)|0,c=c+Math.imul(L,ee)|0,r=r+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,re)|0)+Math.imul(I,ne)|0,c=c+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(A,oe)|0,c=c+Math.imul(A,ae)|0,r=r+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,le)|0,r=r+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,he)|0)+Math.imul(y,ue)|0,c=c+Math.imul(y,he)|0;var Ie=(d+(r=r+Math.imul(f,pe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ge)|0)+Math.imul(m,pe)|0))<<13)|0;d=((c=c+Math.imul(m,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(V,K),o=(o=Math.imul(V,G))+Math.imul(j,K)|0,c=Math.imul(j,G),r=r+Math.imul(U,X)|0,o=(o=o+Math.imul(U,Z)|0)+Math.imul(B,X)|0,c=c+Math.imul(B,Z)|0,r=r+Math.imul(x,J)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(D,J)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(N,ne)|0,o=(o=o+Math.imul(N,re)|0)+Math.imul(L,ne)|0,c=c+Math.imul(L,re)|0,r=r+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,le)|0)+Math.imul(A,ce)|0,c=c+Math.imul(A,le)|0,r=r+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,he)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,he)|0,r=r+Math.imul(_,pe)|0,o=(o=o+Math.imul(_,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var ke=(d+(r=r+Math.imul(f,ve)|0)|0)+((8191&(o=(o=o+Math.imul(f,be)|0)+Math.imul(m,ve)|0))<<13)|0;d=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,K),o=(o=Math.imul($,G))+Math.imul(z,K)|0,c=Math.imul(z,G),r=r+Math.imul(V,X)|0,o=(o=o+Math.imul(V,Z)|0)+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,r=r+Math.imul(U,J)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(B,J)|0,c=c+Math.imul(B,ee)|0,r=r+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,re)|0)+Math.imul(D,ne)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(L,oe)|0,c=c+Math.imul(L,ae)|0,r=r+Math.imul(O,ce)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(I,ce)|0,c=c+Math.imul(I,le)|0,r=r+Math.imul(T,ue)|0,o=(o=o+Math.imul(T,he)|0)+Math.imul(A,ue)|0,c=c+Math.imul(A,he)|0,r=r+Math.imul(C,pe)|0,o=(o=o+Math.imul(C,ge)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,ge)|0,r=r+Math.imul(_,ve)|0,o=(o=o+Math.imul(_,be)|0)+Math.imul(y,ve)|0,c=c+Math.imul(y,be)|0;var Ne=(d+(r=r+Math.imul(f,ye)|0)|0)+((8191&(o=(o=o+Math.imul(f,Ee)|0)+Math.imul(m,ye)|0))<<13)|0;d=((c=c+Math.imul(m,Ee)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,X),o=(o=Math.imul($,Z))+Math.imul(z,X)|0,c=Math.imul(z,Z),r=r+Math.imul(V,J)|0,o=(o=o+Math.imul(V,ee)|0)+Math.imul(j,J)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,re)|0)+Math.imul(B,ne)|0,c=c+Math.imul(B,re)|0,r=r+Math.imul(x,oe)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,r=r+Math.imul(N,ce)|0,o=(o=o+Math.imul(N,le)|0)+Math.imul(L,ce)|0,c=c+Math.imul(L,le)|0,r=r+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,he)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(A,pe)|0,c=c+Math.imul(A,ge)|0,r=r+Math.imul(C,ve)|0,o=(o=o+Math.imul(C,be)|0)+Math.imul(w,ve)|0,c=c+Math.imul(w,be)|0;var Le=(d+(r=r+Math.imul(_,ye)|0)|0)+((8191&(o=(o=o+Math.imul(_,Ee)|0)+Math.imul(y,ye)|0))<<13)|0;d=((c=c+Math.imul(y,Ee)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul($,J),o=(o=Math.imul($,ee))+Math.imul(z,J)|0,c=Math.imul(z,ee),r=r+Math.imul(V,ne)|0,o=(o=o+Math.imul(V,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,r=r+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,le)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,le)|0,r=r+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(L,ue)|0,c=c+Math.imul(L,he)|0,r=r+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,ge)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,ge)|0,r=r+Math.imul(T,ve)|0,o=(o=o+Math.imul(T,be)|0)+Math.imul(A,ve)|0,c=c+Math.imul(A,be)|0;var Me=(d+(r=r+Math.imul(C,ye)|0)|0)+((8191&(o=(o=o+Math.imul(C,Ee)|0)+Math.imul(w,ye)|0))<<13)|0;d=((c=c+Math.imul(w,Ee)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,ne),o=(o=Math.imul($,re))+Math.imul(z,ne)|0,c=Math.imul(z,re),r=r+Math.imul(V,oe)|0,o=(o=o+Math.imul(V,ae)|0)+Math.imul(j,oe)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,le)|0)+Math.imul(B,ce)|0,c=c+Math.imul(B,le)|0,r=r+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,he)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,he)|0,r=r+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,ge)|0)+Math.imul(L,pe)|0,c=c+Math.imul(L,ge)|0,r=r+Math.imul(O,ve)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(I,ve)|0,c=c+Math.imul(I,be)|0;var xe=(d+(r=r+Math.imul(T,ye)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ee)|0)+Math.imul(A,ye)|0))<<13)|0;d=((c=c+Math.imul(A,Ee)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul($,oe),o=(o=Math.imul($,ae))+Math.imul(z,oe)|0,c=Math.imul(z,ae),r=r+Math.imul(V,ce)|0,o=(o=o+Math.imul(V,le)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,le)|0,r=r+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,he)|0,r=r+Math.imul(x,pe)|0,o=(o=o+Math.imul(x,ge)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,ge)|0,r=r+Math.imul(N,ve)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(L,ve)|0,c=c+Math.imul(L,be)|0;var De=(d+(r=r+Math.imul(O,ye)|0)|0)+((8191&(o=(o=o+Math.imul(O,Ee)|0)+Math.imul(I,ye)|0))<<13)|0;d=((c=c+Math.imul(I,Ee)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul($,ce),o=(o=Math.imul($,le))+Math.imul(z,ce)|0,c=Math.imul(z,le),r=r+Math.imul(V,ue)|0,o=(o=o+Math.imul(V,he)|0)+Math.imul(j,ue)|0,c=c+Math.imul(j,he)|0,r=r+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,ge)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,r=r+Math.imul(x,ve)|0,o=(o=o+Math.imul(x,be)|0)+Math.imul(D,ve)|0,c=c+Math.imul(D,be)|0;var Pe=(d+(r=r+Math.imul(N,ye)|0)|0)+((8191&(o=(o=o+Math.imul(N,Ee)|0)+Math.imul(L,ye)|0))<<13)|0;d=((c=c+Math.imul(L,Ee)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul($,ue),o=(o=Math.imul($,he))+Math.imul(z,ue)|0,c=Math.imul(z,he),r=r+Math.imul(V,pe)|0,o=(o=o+Math.imul(V,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(U,ve)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(B,ve)|0,c=c+Math.imul(B,be)|0;var Ue=(d+(r=r+Math.imul(x,ye)|0)|0)+((8191&(o=(o=o+Math.imul(x,Ee)|0)+Math.imul(D,ye)|0))<<13)|0;d=((c=c+Math.imul(D,Ee)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul($,pe),o=(o=Math.imul($,ge))+Math.imul(z,pe)|0,c=Math.imul(z,ge),r=r+Math.imul(V,ve)|0,o=(o=o+Math.imul(V,be)|0)+Math.imul(j,ve)|0,c=c+Math.imul(j,be)|0;var Be=(d+(r=r+Math.imul(U,ye)|0)|0)+((8191&(o=(o=o+Math.imul(U,Ee)|0)+Math.imul(B,ye)|0))<<13)|0;d=((c=c+Math.imul(B,Ee)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul($,ve),o=(o=Math.imul($,be))+Math.imul(z,ve)|0,c=Math.imul(z,be);var Fe=(d+(r=r+Math.imul(V,ye)|0)|0)+((8191&(o=(o=o+Math.imul(V,Ee)|0)+Math.imul(j,ye)|0))<<13)|0;d=((c=c+Math.imul(j,Ee)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var Ve=(d+(r=Math.imul($,ye))|0)+((8191&(o=(o=Math.imul($,Ee))+Math.imul(z,ye)|0))<<13)|0;return d=((c=Math.imul(z,Ee))+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,l[0]=Ce,l[1]=we,l[2]=Se,l[3]=Te,l[4]=Ae,l[5]=Re,l[6]=Oe,l[7]=Ie,l[8]=ke,l[9]=Ne,l[10]=Le,l[11]=Me,l[12]=xe,l[13]=De,l[14]=Pe,l[15]=Ue,l[16]=Be,l[17]=Fe,l[18]=Ve,0!==d&&(l[19]=d,n.length++),n};function C(e,t,n){return(new w).mulp(e,t,n)}function w(e,t){this.x=e,this.y=t}Math.imul||(E=y),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?E(this,e,t):n<63?y(this,e,t):n<1024?function(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c<n.length-1;c++){var l=o;o=0;for(var d=67108863&r,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var i=c-f,m=(0|e.words[i])*(0|t.words[f]),v=67108863&m;d=67108863&(v=v+d|0),o+=(l=(l=l+(m/67108864|0)|0)+(v>>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n.strip()}(this,e,t):C(this,e,t)},w.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,n,e);return t},w.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},w.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i<c;i++)r[i]=t[e[i]],o[i]=n[e[i]]},w.prototype.transform=function(e,t,n,r,o,c){this.permute(c,e,t,n,r,o);for(var s=1;s<o;s<<=1)for(var l=s<<1,d=Math.cos(2*Math.PI/l),h=Math.sin(2*Math.PI/l),p=0;p<o;p+=l)for(var f=d,m=h,v=0;v<s;v++){var _=n[p+v],y=r[p+v],E=n[p+v+s],C=r[p+v+s],w=f*E-m*C;C=f*C+m*E,E=w,n[p+v]=_+E,r[p+v]=y+C,n[p+v+s]=_-E,r[p+v+s]=y-C,v!==l&&(w=d*f-h*m,m=d*m+h*f,f=w)}},w.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},w.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var i=0;i<n/2;i++){var r=e[i];e[i]=e[n-i-1],e[n-i-1]=r,r=t[i],t[i]=-t[n-i-1],t[n-i-1]=-r}},w.prototype.normalize13b=function(e,t){for(var n=0,i=0;i<t/2;i++){var r=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+n;e[i]=67108863&r,n=r<67108864?0:r/67108864|0}return e},w.prototype.convert13b=function(e,t,n,o){for(var c=0,i=0;i<t;i++)c+=0|e[i],n[2*i]=8191&c,c>>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i<o;++i)n[i]=0;r(0===c),r(0==(-8192&c))},w.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},w.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),c=this.stub(r),l=new Array(r),d=new Array(r),h=new Array(r),f=new Array(r),m=new Array(r),v=new Array(r),_=n.words;_.length=r,this.convert13b(e.words,e.length,l,r),this.convert13b(t.words,t.length,f,r),this.transform(l,c,d,h,r,o),this.transform(f,c,m,v,r,o);for(var i=0;i<r;i++){var y=d[i]*m[i]-h[i]*v[i];h[i]=d[i]*v[i]+h[i]*m[i],d[i]=y}return this.conjugate(d,h,r),this.transform(d,h,_,c,r,o),this.conjugate(_,c,r),this.normalize13b(_,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n.strip()},c.prototype.mul=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},c.prototype.mulf=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),C(this,e,t)},c.prototype.imul=function(e){return this.clone().mulTo(e,this)},c.prototype.imuln=function(e){r("number"==typeof e),r(e<67108864);for(var t=0,i=0;i<this.length;i++){var n=(0|this.words[i])*e,o=(67108863&n)+(67108863&t);t>>=26,t+=n/67108864|0,t+=o>>>26,this.words[i]=67108863&o}return 0!==t&&(this.words[i]=t,this.length++),this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=(e.words[r]&1<<o)>>>o}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i<t.length&&0===t[i];i++,n=n.sqr());if(++i<t.length)for(var q=n.sqr();i<t.length;i++,q=q.sqr())0!==t[i]&&(n=n.mul(q));return n},c.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i<this.length;i++){var c=this.words[i]&n,l=(0|this.words[i])-c<<t;this.words[i]=l|o,o=c>>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this.strip()},c.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},c.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<<c,l=n;if(o-=s,o=Math.max(0,o),l){for(var i=0;i<s;i++)l.words[i]=this.words[i];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var d=0;for(i=this.length-1;i>=0&&(0!==d||i>=o);i--){var h=0|this.words[i];this.words[i]=d<<26-c|h>>>c,d=h&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<<t;return!(this.length<=s)&&!!(this.words[s]&q)},c.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<<t;this.words[this.length-1]&=mask}return this.strip()},c.prototype.maskn=function(e){return this.clone().imaskn(e)},c.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},c.prototype._iaddn=function(e){this.words[0]+=e;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this.strip()},c.prototype.addn=function(e){return this.clone().iaddn(e)},c.prototype.subn=function(e){return this.clone().isubn(e)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(e,t,n){var i,o,c=e.length+n;this._expand(c);var l=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+l;var d=(0|e.words[i])*t;l=((o-=67108863&d)>>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)l=(o=(0|this.words[i+n])+l)>>26,this.words[i+n]=67108863&o;if(0===l)return this.strip();for(r(-1===l),l=0,i=0;i<this.length;i++)l=(o=-(0|this.words[i])+l)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var l=a.clone()._ishlnsubmul(b,1,o);0===l.negative&&(a=l,q&&(q.words[o]=1));for(var d=o-1;d>=0;d--){var h=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(h=Math.min(h/r|0,67108863),a._ishlnsubmul(b,h,d);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=h)}return q&&q.strip(),a.strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modn=function(e){r(e<=67108863);for(var p=(1<<26)%e,t=0,i=this.length-1;i>=0;i--)t=(p*t+(0|this.words[i]))%e;return t},c.prototype.idivn=function(e){r(e<=67108863);for(var t=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*t;this.words[i]=n/e|0,t=n%e}return this.strip()},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),f=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(h),o.isub(f)),n.iushrn(1),o.iushrn(1);for(var v=0,_=1;0==(t.words[0]&_)&&v<26;++v,_<<=1);if(v>0)for(t.iushrn(v);v-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(h),d.isub(f)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,h=1;0==(b.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<<t;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var n=q,i=s;0!==n&&i<this.length;i++){var o=0|this.words[i];n=(o+=n)>>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this.strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},c.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},c.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){a<b?t=-1:a>b&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new k(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var S={k256:null,p224:null,p192:null,p25519:null};function T(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){T.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function R(){T.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function O(){T.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function I(){T.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function N(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}T.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},T.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},T.prototype.split=function(input,e){input.iushrn(this.n,0,e)},T.prototype.imulK=function(e){return e.imul(this.k)},o(A,T),A.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i<e;i++)output.words[i]=input.words[i];if(output.length=e,input.length<=9)return input.words[0]=0,void(input.length=1);var t=input.words[9];for(output.words[output.length++]=t&mask,i=10;i<input.length;i++){var n=0|input.words[i];input.words[i-10]=(n&mask)<<4|t>>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9},A.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(R,T),o(O,T),o(I,T),I.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,r=67108863&n;n>>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(S[e])return S[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new R;else if("p192"===e)t=new O;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new I}return S[e]=t,t},k.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},k.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},k.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):a.umod(this.m)._forceRed(this)},k.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},k.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},k.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},k.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},k.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},k.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},k.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},k.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},k.prototype.isqr=function(a){return this.imul(a,a.clone())},k.prototype.sqr=function(a){return this.mul(a,a)},k.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var h=this.pow(d,q),f=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),v=s;0!==m.cmp(n);){for(var _=m,i=0;0!==_.cmp(n);i++)_=_.redSqr();r(i<v);var b=this.pow(h,new c(1).iushln(v-i-1));f=f.redMul(b),h=b.redSqr(),m=m.redMul(h),v=i}return f},k.prototype.invm=function(a){var e=a._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},k.prototype.pow=function(a,e){if(e.isZero())return new c(1).toRed(this);if(0===e.cmpn(1))return a.clone();var t=new Array(16);t[0]=new c(1).toRed(this),t[1]=a;for(var i=2;i<t.length;i++)t[i]=this.mul(t[i-1],a);var n=t[0],r=0,o=0,l=e.bitLength()%26;for(0===l&&(l=26),i=e.length-1;i>=0;i--){for(var d=e.words[i],h=l-1;h>=0;h--){var f=d>>h&1;n!==t[0]&&(n=this.sqr(n)),0!==f||0!==r?(r<<=1,r|=f,(4===++o||0===i&&0===h)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new N(e)},o(N,k),N.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},N.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},N.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},N.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},N.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(201)(e))},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return T})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return c})),n.d(t,"e",(function(){return l})),n.d(t,"f",(function(){return h})),n.d(t,"g",(function(){return m})),n.d(t,"h",(function(){return _})),n.d(t,"i",(function(){return v})),n.d(t,"j",(function(){return E})),n.d(t,"k",(function(){return y})),n.d(t,"l",(function(){return C})),n.d(t,"m",(function(){return S})),n.d(t,"n",(function(){return w}));var r=n(116),o=n(16);function c(e,t){return Object(o.c)().captureException(e,{captureContext:t})}function l(e,t){const n="string"==typeof t?t:void 0,r="string"!=typeof t?{captureContext:t}:void 0;return Object(o.c)().captureMessage(e,n,r)}function d(e,t){return Object(o.c)().captureEvent(e,t)}function h(e){Object(o.c)().configureScope(e)}function f(e){Object(o.c)().addBreadcrumb(e)}function m(e,t){Object(o.c)().setContext(e,t)}function v(e){Object(o.c)().setExtras(e)}function _(e,t){Object(o.c)().setExtra(e,t)}function y(e){Object(o.c)().setTags(e)}function E(e,t){Object(o.c)().setTag(e,t)}function C(e){Object(o.c)().setUser(e)}function w(e){Object(o.c)().withScope(e)}function S(e,t){return Object(o.c)().startTransaction({...e},t)}function T(e,t){const n=Object(o.c)().getClient();if(n){if(n.captureCheckIn)return n.captureCheckIn(e,t)}else;return Object(r.f)()}},,function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c})),n.d(t,"c",(function(){return l}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(e[p]=b[p])})(e,b)};function o(e,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};Object.create;function l(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))}Object.create},,,,function(e,t,n){"use strict";e.exports=function(e,t){return t||(t={}),"string"!=typeof(e=e&&e.__esModule?e.default:e)?e:(/^['"].*['"]$/.test(e)&&(e=e.slice(1,-1)),t.hash&&(e+=t.hash),/["'() \t\n]/.test(e)||t.needQuotes?'"'.concat(e.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):e)}},,,function(e,t,n){"use strict";var r=n(477),o=n.n(r).a;t.a=o},,,,,function(e,t,n){"use strict";n.r(t),n.d(t,"addTracingExtensions",(function(){return L})),n.d(t,"startIdleTransaction",(function(){return N})),n.d(t,"IdleTransaction",(function(){return R})),n.d(t,"TRACING_DEFAULTS",(function(){return S})),n.d(t,"Span",(function(){return y})),n.d(t,"spanStatusfromHttpCode",(function(){return E})),n.d(t,"Transaction",(function(){return w})),n.d(t,"getActiveTransaction",(function(){return h})),n.d(t,"SpanStatus",(function(){return M})),n.d(t,"trace",(function(){return x})),n.d(t,"addBreadcrumb",(function(){return D.a})),n.d(t,"captureCheckIn",(function(){return D.b})),n.d(t,"captureEvent",(function(){return D.c})),n.d(t,"captureException",(function(){return D.d})),n.d(t,"captureMessage",(function(){return D.e})),n.d(t,"configureScope",(function(){return D.f})),n.d(t,"setContext",(function(){return D.g})),n.d(t,"setExtra",(function(){return D.h})),n.d(t,"setExtras",(function(){return D.i})),n.d(t,"setTag",(function(){return D.j})),n.d(t,"setTags",(function(){return D.k})),n.d(t,"setUser",(function(){return D.l})),n.d(t,"startTransaction",(function(){return D.m})),n.d(t,"withScope",(function(){return D.n})),n.d(t,"Hub",(function(){return c.a})),n.d(t,"ensureHubOnCarrier",(function(){return c.b})),n.d(t,"getCurrentHub",(function(){return c.c})),n.d(t,"getHubFromCarrier",(function(){return c.d})),n.d(t,"getMainCarrier",(function(){return c.e})),n.d(t,"makeMain",(function(){return c.f})),n.d(t,"runWithAsyncContext",(function(){return c.g})),n.d(t,"setAsyncContextStrategy",(function(){return c.h})),n.d(t,"setHubOnCarrier",(function(){return c.i})),n.d(t,"closeSession",(function(){return P.a})),n.d(t,"makeSession",(function(){return P.b})),n.d(t,"updateSession",(function(){return P.c})),n.d(t,"SessionFlusher",(function(){return U})),n.d(t,"Scope",(function(){return B.a})),n.d(t,"addGlobalEventProcessor",(function(){return B.b})),n.d(t,"getEnvelopeEndpointWithUrlEncodedAuth",(function(){return F.a})),n.d(t,"getReportDialogEndpoint",(function(){return F.b})),n.d(t,"BaseClient",(function(){return V.a})),n.d(t,"initAndBind",(function(){return j.a})),n.d(t,"createTransport",(function(){return base.a})),n.d(t,"makeOfflineTransport",(function(){return z})),n.d(t,"makeMultiplexedTransport",(function(){return K})),n.d(t,"SDK_VERSION",(function(){return G.a})),n.d(t,"getIntegrationsToSetup",(function(){return Y.a})),n.d(t,"Integrations",(function(){return r})),n.d(t,"prepareEvent",(function(){return re.a})),n.d(t,"createCheckInEnvelope",(function(){return ie})),n.d(t,"hasTracingEnabled",(function(){return l.a})),n.d(t,"DEFAULT_ENVIRONMENT",(function(){return C.a})),n.d(t,"FunctionToString",(function(){return Z})),n.d(t,"InboundFilters",(function(){return te})),n.d(t,"extractTraceparentData",(function(){return ae}));var r={};n.r(r),n.d(r,"FunctionToString",(function(){return Z})),n.d(r,"InboundFilters",(function(){return te}));var o=n(31),c=n(16),l=n(220),d=n(802);function h(e){return(e||Object(c.c)()).getScope().getTransaction()}let f=!1;function m(){const e=h();if(e){const t="internal_error";e.setStatus(t)}}m.tag="sentry_tracingErrorCallback";var time=n(142),v=n(116),object=n(44);class _{__init(){this.spans=[]}constructor(e=1e3){_.prototype.__init.call(this),this._maxlen=e}add(span){this.spans.length>this._maxlen?span.spanRecorder=void 0:this.spans.push(span)}}class y{__init2(){this.traceId=Object(v.f)()}__init3(){this.spanId=Object(v.f)().substring(16)}__init4(){this.startTimestamp=Object(time.b)()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(e){if(y.prototype.__init2.call(this),y.prototype.__init3.call(this),y.prototype.__init4.call(this),y.prototype.__init5.call(this),y.prototype.__init6.call(this),y.prototype.__init7.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp),e.instrumenter&&(this.instrumenter=e.instrumenter)}startChild(e){const t=new y({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});return t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));const t=E(e);return"unknown_error"!==t&&this.setStatus(t),this}isSuccess(){return"ok"===this.status}finish(e){this.endTimestamp="number"==typeof e?e:Object(time.b)()}toTraceparent(){let e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return Object(object.c)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=e.data||{},this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=e.spanId||this.spanId,this.startTimestamp=e.startTimestamp||this.startTimestamp,this.status=e.status,this.tags=e.tags||{},this.traceId=e.traceId||this.traceId,this}getTraceContext(){return Object(object.c)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Object(object.c)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function E(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var C=n(125);class w extends y{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(e,t){super(e),w.prototype.__init.call(this),w.prototype.__init2.call(this),w.prototype.__init3.call(this),this._hub=t||Object(c.c)(),this._name=e.name||"",this.metadata={source:"custom",...e.metadata,spanMetadata:{}},this._trimEnd=e.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(e){this.setName(e)}setName(e,source="custom"){this._name=e,this.metadata.source=source}initSpanRecorder(e=1e3){this.spanRecorder||(this.spanRecorder=new _(e)),this.spanRecorder.add(this)}setContext(e,t){null===t?delete this._contexts[e]:this._contexts[e]=t}setMeasurement(e,t,n=""){this._measurements[e]={value:t,unit:n}}setMetadata(e){this.metadata={...this.metadata,...e}}finish(e){if(void 0!==this.endTimestamp)return;this.name||(this.name="<unlabeled transaction>"),super.finish(e);const t=this._hub.getClient();if(t&&t.emit&&t.emit("finishTransaction",this),!0!==this.sampled)return void(t&&t.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter((s=>s!==this&&s.endTimestamp)):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce(((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e)).endTimestamp);const r=this.metadata,o={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(o.measurements=this._measurements),this._hub.captureEvent(o)}toContext(){const e=super.toContext();return Object(object.c)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=e.name||"",this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||Object(c.c)(),t=e&&e.getClient();if(!t)return{};const{environment:n,release:r}=t.getOptions()||{},{publicKey:o}=t.getDsn()||{},l=this.metadata.sampleRate,d=void 0!==l?l.toString():void 0,{segment:h}=e.getScope().getUser()||{},source=this.metadata.source,f=source&&"url"!==source?this.name:void 0,m=Object(object.c)({environment:n||C.a,release:r,transaction:f,user_segment:h,public_key:o,trace_id:this.traceId,sample_rate:d});return t.emit&&t.emit("createDsc",m),m}setHub(e){this._hub=e}}const S={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},T=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class A extends _{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(span){span.spanId!==this.transactionSpanId&&(span.finish=e=>{span.endTimestamp="number"==typeof e?e:Object(time.b)(),this._popActivity(span.spanId)},void 0===span.endTimestamp&&this._pushActivity(span.spanId)),super.add(span)}}class R extends w{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=T[4]}constructor(e,t,n=S.idleTimeout,r=S.finalTimeout,o=S.heartbeatInterval,c=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=c,R.prototype.__init.call(this),R.prototype.__init2.call(this),R.prototype.__init3.call(this),R.prototype.__init4.call(this),R.prototype.__init5.call(this),R.prototype.__init6.call(this),c&&t.configureScope((e=>e.setSpan(this))),this._restartIdleTimeout(),setTimeout((()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=T[3],this.finish())}),this._finalTimeout)}finish(e=Object(time.b)()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter((span=>{if(span.spanId===this.spanId)return!0;span.endTimestamp||(span.endTimestamp=e,span.setStatus("cancelled"));const t=span.startTimestamp<e;return t}))}if(this._onScope){const e=this._idleHub.getScope();e.getTransaction()===this&&e.setSpan(void 0)}return super.finish(e)}registerBeforeFinishCallback(e){this._beforeFinishCallbacks.push(e)}initSpanRecorder(e){if(!this.spanRecorder){const t=e=>{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new A(t,n,this.spanId,e),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(e,{restartOnChildSpanChange:t}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===t,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=T[5],this.finish(e)))}setFinishReason(e){this._finishReason=e}_restartIdleTimeout(e){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout((()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=T[1],this.finish(e))}),this._idleTimeout)}_pushActivity(e){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),this.activities[e]=!0}_popActivity(e){if(this.activities[e]&&delete this.activities[e],0===Object.keys(this.activities).length){const e=Object(time.b)();this._idleTimeoutCanceledPermanently?(this._finishReason=T[5],this.finish(e)):this._restartIdleTimeout(e+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(this.setStatus("deadline_exceeded"),this._finishReason=T[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout((()=>{this._beat()}),this._heartbeatInterval)}}function O(){const span=this.getScope().getSpan();return span?{"sentry-trace":span.toTraceparent()}:{}}function I(e,t,n){if(!Object(l.a)(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==t.tracesSampleRate?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),function(e){if(Object(o.h)(e)||"number"!=typeof e&&"boolean"!=typeof e)return!1;if(e<0||e>1)return!1;return!0}(r)&&r?(e.sampled=Math.random()<r,e.sampled,e):(e.sampled=!1,e)}function k(e,t){const n=this.getClient(),r=n&&n.getOptions()||{};(r.instrumenter||"sentry")!==(e.instrumenter||"sentry")&&(e.sampled=!1);let o=new w(e,this);return o=I(o,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),o.sampled&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function N(e,t,n,r,o,c,l){const d=e.getClient(),h=d&&d.getOptions()||{};let f=new R(t,e,n,r,l,o);return f=I(f,h,{parentSampled:t.parentSampled,transactionContext:t,...c}),f.sampled&&f.initSpanRecorder(h._experiments&&h._experiments.maxSpans),d&&d.emit&&d.emit("startTransaction",f),f}function L(){const e=Object(c.e)();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=k),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=O),f||(f=!0,Object(d.b)("error",m),Object(d.b)("unhandledrejection",m)))}var M;function x(e,t,n=(()=>{})){const r={...e};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const l=Object(c.c)(),d=l.getScope(),h=d.getSpan(),f=h?h.startChild(r):l.startTransaction(r);function m(){f&&f.finish(),l.getScope().setSpan(h)}let v;d.setSpan(f);try{v=t(f)}catch(e){throw f&&f.setStatus("internal_error"),n(e),m(),e}return Object(o.n)(v)?Promise.resolve(v).then((()=>{m()}),(e=>{f&&f.setStatus("internal_error"),n(e),m()})):m(),v}!function(e){e.Ok="ok";e.DeadlineExceeded="deadline_exceeded";e.Unauthenticated="unauthenticated";e.PermissionDenied="permission_denied";e.NotFound="not_found";e.ResourceExhausted="resource_exhausted";e.InvalidArgument="invalid_argument";e.Unimplemented="unimplemented";e.Unavailable="unavailable";e.InternalError="internal_error";e.UnknownError="unknown_error";e.Cancelled="cancelled";e.AlreadyExists="already_exists";e.FailedPrecondition="failed_precondition";e.Aborted="aborted";e.OutOfRange="out_of_range";e.DataLoss="data_loss"}(M||(M={}));var D=n(56),P=n(76);class U{__init(){this.flushTimeout=60}__init2(){this._pendingAggregates={}}__init3(){this._isEnabled=!0}constructor(e,t){U.prototype.__init.call(this),U.prototype.__init2.call(this),U.prototype.__init3.call(this),this._client=e,this._intervalId=setInterval((()=>this.flush()),1e3*this.flushTimeout),this._sessionAttrs=t}flush(){const e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates={},this._client.sendSession(e))}getSessionAggregates(){const e=Object.keys(this._pendingAggregates).map((e=>this._pendingAggregates[parseInt(e)])),t={attrs:this._sessionAttrs,aggregates:e};return Object(object.c)(t)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;const e=Object(c.c)().getScope(),t=e.getRequestSession();t&&t.status&&(this._incrementSessionStatusCount(t.status,new Date),e.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){const n=new Date(t).setSeconds(0,0);this._pendingAggregates[n]=this._pendingAggregates[n]||{};const r=this._pendingAggregates[n];switch(r.started||(r.started=new Date(n).toISOString()),e){case"errored":return r.errored=(r.errored||0)+1,r.errored;case"ok":return r.exited=(r.exited||0)+1,r.exited;default:return r.crashed=(r.crashed||0)+1,r.crashed}}}var B=n(92),F=n(141),V=n(459),j=n(385),base=n(460),H=n(472),$=n(796);function z(e){return t=>{const n=e(t),r=t.createStore?t.createStore(t):void 0;let o,c=5e3;function l(e){r&&(o&&clearTimeout(o),o=setTimeout((async()=>{o=void 0;const e=await r.pop();e&&h(e).catch((e=>{}))}),e),"number"!=typeof o&&o.unref&&o.unref())}function d(){o||(l(c),c=Math.min(2*c,36e5))}async function h(e){try{const t=await n.send(e);let r=100;if(t)if(t.headers&&t.headers["retry-after"])r=Object($.b)(t.headers["retry-after"]);else if((t.statusCode||0)>=400)return t;return l(r),c=5e3,t}catch(n){if(r&&await function(e,n,r){return!Object(H.e)(e,["replay_event","replay_recording","client_report"])&&(!t.shouldStore||t.shouldStore(e,n,r))}(e,n,c))return await r.insert(e),d(),{};throw n}}return t.flushAtStartup&&d(),{send:h,flush:e=>n.flush(e)}}}var W=n(231);function K(e,t){return n=>{const r=e(n),o={};return{send:async function(c){const l=t({envelope:c,getEvent:function(e){const t=e&&e.length?e:["event"];return function(e,t){let n;return Object(H.g)(e,((e,r)=>(t.includes(r)&&(n=Array.isArray(e)?e[1]:void 0),!!n))),n}(c,t)}}).map((t=>function(t){if(!o[t]){const r=Object(W.a)(t);if(!r)return;const c=Object(F.a)(r);o[t]=e({...n,url:c})}return o[t]}(t))).filter((e=>!!e));return 0===l.length&&l.push(r),(await Promise.all(l.map((e=>e.send(c)))))[0]},flush:async function(e){const t=[...Object.keys(o).map((e=>o[e])),r];return(await Promise.all(t.map((t=>t.flush(e))))).every((e=>e))}}}}var G=n(384),Y=n(191);let X;class Z{constructor(){Z.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Z.id}setupOnce(){X=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=Object(object.f)(this)||this;return X.apply(t,e)}}catch(e){}}}Z.__initStatic();var Q=n(104);const J=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],ee=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class te{static __initStatic(){this.id="InboundFilters"}__init(){this.name=te.id}constructor(e={}){this._options=e,te.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(te);if(t){const r=n.getClient(),o=r?r.getOptions():{};return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception){const{values:t}=e.exception;try{const{type:e="",value:n=""}=t&&t[t.length-1]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return[]}}return[]}(e).some((e=>Object(Q.c)(e,t)))}(e,t.ignoreErrors))return!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&Object(Q.c)(n,t)}(e,t.ignoreTransactions))return!0;if(function(e,t){if(!t||!t.length)return!1;const n=ne(e);return!!n&&Object(Q.c)(n,t)}(e,t.denyUrls))return!0;if(!function(e,t){if(!t||!t.length)return!0;const n=ne(e);return!n||Object(Q.c)(n,t)}(e,t.allowUrls))return!0;return!1}(e,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:J],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:ee],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,o))?null:e}}return e};n.id=this.name,e(n)}}function ne(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let i=e.length-1;i>=0;i--){const t=e[i];if(t&&"<anonymous>"!==t.filename&&"[native code]"!==t.filename)return t.filename||null}return null}(t):null}catch(e){return null}}te.__initStatic();var re=n(221);function ie(e,t,n,r){const o={sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Object(W.b)(r)}},c=function(e){return[{type:"check_in"},e]}(e);return Object(H.c)(o,[c])}const oe=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function ae(e){const t=e.match(oe);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(22),o=n(32),c={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},l=Object.freeze({});function d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c,d=void 0,f=Array.isArray(e),m=[e],v=-1,_=[],y=void 0,E=void 0,C=void 0,path=[],w=[],S=e;do{var T=++v===m.length,A=T&&0!==_.length;if(T){if(E=0===w.length?void 0:path[path.length-1],y=C,C=w.pop(),A){if(f)y=y.slice();else{for(var R={},O=0,I=Object.keys(y);O<I.length;O++){var k=I[O];R[k]=y[k]}y=R}for(var N=0,L=0;L<_.length;L++){var M=_[L][0],x=_[L][1];f&&(M-=N),f&&null===x?(y.splice(M,1),N++):y[M]=x}}v=d.index,m=d.keys,_=d.edits,f=d.inArray,d=d.prev}else{if(E=C?f?v:m[v]:void 0,null==(y=C?C[E]:S))continue;C&&path.push(E)}var D,P=void 0;if(!Array.isArray(y)){if(!Object(o.c)(y))throw new Error("Invalid AST Node: ".concat(Object(r.a)(y),"."));var U=h(t,y.kind,T);if(U){if((P=U.call(t,y,E,C,path,w))===l)break;if(!1===P){if(!T){path.pop();continue}}else if(void 0!==P&&(_.push([E,P]),!T)){if(!Object(o.c)(P)){path.pop();continue}y=P}}}if(void 0===P&&A&&_.push([E,y]),T)path.pop();else d={inArray:f,index:v,keys:m,edits:_,prev:d},m=(f=Array.isArray(y))?y:null!==(D=n[y.kind])&&void 0!==D?D:[],v=-1,_=[],C&&w.push(C),C=y}while(void 0!==d);return 0!==_.length&&(S=_[_.length-1][1]),S}function h(e,t,n){var r=e[t];if(r){if(!n&&"function"==typeof r)return r;var o=n?r.leave:r.enter;if("function"==typeof o)return o}else{var c=n?e.leave:e.enter;if(c){if("function"==typeof c)return c;var l=c[t];if("function"==typeof l)return l}}}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return v})),n.d(t,"c",(function(){return E})),n.d(t,"d",(function(){return C})),n.d(t,"e",(function(){return c})),n.d(t,"f",(function(){return l})),n.d(t,"g",(function(){return f})),n.d(t,"h",(function(){return h}));var r=n(328),o=function(e){for(var t=[],p=0,i=0;i<e.length;i++){var n=e.charCodeAt(i);n<128?t[p++]=n:n<2048?(t[p++]=n>>6|192,t[p++]=63&n|128):55296==(64512&n)&&i+1<e.length&&56320==(64512&e.charCodeAt(i+1))?(n=65536+((1023&n)<<10)+(1023&e.charCodeAt(++i)),t[p++]=n>>18|240,t[p++]=n>>12&63|128,t[p++]=n>>6&63|128,t[p++]=63&n|128):(t[p++]=n>>12|224,t[p++]=n>>6&63|128,t[p++]=63&n|128)}return t};function c(e){return l(void 0,e)}function l(e,source){if(!(source instanceof Object))return source;switch(source.constructor){case Date:return new Date(source.getTime());case Object:void 0===e&&(e={});break;case Array:e=[];break;default:return source}for(var t in source)source.hasOwnProperty(t)&&"__proto__"!==t&&(e[t]=l(e[t],source[t]));return e}var d=function(){function e(){var e=this;this.reject=function(){},this.resolve=function(){},this.promise=new Promise((function(t,n){e.resolve=t,e.reject=n}))}return e.prototype.wrapCallback=function(e){var t=this;return function(n,r){n?t.reject(n):t.resolve(r),"function"==typeof e&&(t.promise.catch((function(){})),1===e.length?e(n):e(n,r))}},e}();function h(){try{return"[object process]"===Object.prototype.toString.call(e.process)}catch(e){return!1}}function f(){return"object"==typeof self&&self.self===self}var m=function(e){function t(code,n,r){var o=e.call(this,n)||this;return o.code=code,o.customData=r,o.name="FirebaseError",Object.setPrototypeOf(o,t.prototype),Error.captureStackTrace&&Error.captureStackTrace(o,v.prototype.create),o}return Object(r.b)(t,e),t}(Error),v=function(){function e(e,t,n){this.service=e,this.serviceName=t,this.errors=n}return e.prototype.create=function(code){for(var data=[],e=1;e<arguments.length;e++)data[e-1]=arguments[e];var t=data[0]||{},n=this.service+"/"+code,template=this.errors[code],r=template?_(template,t):"Error",o=this.serviceName+": "+r+" ("+n+").",c=new m(n,o,t);return c},e}();function _(template,data){return template.replace(y,(function(e,t){var n=data[t];return null!=n?String(n):"<"+t+"?>"}))}var y=/\{\$([^}]+)}/g;function E(e,t){return Object.prototype.hasOwnProperty.call(e,t)}!function(){function e(){this.chain_=[],this.buf_=[],this.W_=[],this.pad_=[],this.inbuf_=0,this.total_=0,this.blockSize=64,this.pad_[0]=128;for(var i=1;i<this.blockSize;++i)this.pad_[i]=0;this.reset()}e.prototype.reset=function(){this.chain_[0]=1732584193,this.chain_[1]=4023233417,this.chain_[2]=2562383102,this.chain_[3]=271733878,this.chain_[4]=3285377520,this.inbuf_=0,this.total_=0},e.prototype.compress_=function(e,t){t||(t=0);var n=this.W_;if("string"==typeof e)for(var i=0;i<16;i++)n[i]=e.charCodeAt(t)<<24|e.charCodeAt(t+1)<<16|e.charCodeAt(t+2)<<8|e.charCodeAt(t+3),t+=4;else for(i=0;i<16;i++)n[i]=e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3],t+=4;for(i=16;i<80;i++){var r=n[i-3]^n[i-8]^n[i-14]^n[i-16];n[i]=4294967295&(r<<1|r>>>31)}var o,c,a=this.chain_[0],b=this.chain_[1],l=this.chain_[2],d=this.chain_[3],h=this.chain_[4];for(i=0;i<80;i++){i<40?i<20?(o=d^b&(l^d),c=1518500249):(o=b^l^d,c=1859775393):i<60?(o=b&l|d&(b|l),c=2400959708):(o=b^l^d,c=3395469782);r=(a<<5|a>>>27)+o+h+c+n[i]&4294967295;h=d,d=l,l=4294967295&(b<<30|b>>>2),b=a,a=r}this.chain_[0]=this.chain_[0]+a&4294967295,this.chain_[1]=this.chain_[1]+b&4294967295,this.chain_[2]=this.chain_[2]+l&4294967295,this.chain_[3]=this.chain_[3]+d&4294967295,this.chain_[4]=this.chain_[4]+h&4294967295},e.prototype.update=function(e,t){if(null!=e){void 0===t&&(t=e.length);for(var n=t-this.blockSize,r=0,o=this.buf_,c=this.inbuf_;r<t;){if(0===c)for(;r<=n;)this.compress_(e,r),r+=this.blockSize;if("string"==typeof e){for(;r<t;)if(o[c]=e.charCodeAt(r),++r,++c===this.blockSize){this.compress_(o),c=0;break}}else for(;r<t;)if(o[c]=e[r],++r,++c===this.blockSize){this.compress_(o),c=0;break}}this.inbuf_=c,this.total_+=t}},e.prototype.digest=function(){var e=[],t=8*this.total_;this.inbuf_<56?this.update(this.pad_,56-this.inbuf_):this.update(this.pad_,this.blockSize-(this.inbuf_-56));for(var i=this.blockSize-1;i>=56;i--)this.buf_[i]=255&t,t/=256;this.compress_(this.buf_);var n=0;for(i=0;i<5;i++)for(var r=24;r>=0;r-=8)e[n]=this.chain_[i]>>r&255,++n;return e}}();function C(e,t){var n=new w(e,t);return n.subscribe.bind(n)}var w=function(){function e(e,t){var n=this;this.observers=[],this.unsubscribes=[],this.observerCount=0,this.task=Promise.resolve(),this.finalized=!1,this.onNoObservers=t,this.task.then((function(){e(n)})).catch((function(e){n.error(e)}))}return e.prototype.next=function(e){this.forEachObserver((function(t){t.next(e)}))},e.prototype.error=function(e){this.forEachObserver((function(t){t.error(e)})),this.close(e)},e.prototype.complete=function(){this.forEachObserver((function(e){e.complete()})),this.close()},e.prototype.subscribe=function(e,t,n){var r,o=this;if(void 0===e&&void 0===t&&void 0===n)throw new Error("Missing Observer.");void 0===(r=function(e,t){if("object"!=typeof e||null===e)return!1;for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o in e&&"function"==typeof e[o])return!0}return!1}(e,["next","error","complete"])?e:{next:e,error:t,complete:n}).next&&(r.next=S),void 0===r.error&&(r.error=S),void 0===r.complete&&(r.complete=S);var c=this.unsubscribeOne.bind(this,this.observers.length);return this.finalized&&this.task.then((function(){try{o.finalError?r.error(o.finalError):r.complete()}catch(e){}})),this.observers.push(r),c},e.prototype.unsubscribeOne=function(i){void 0!==this.observers&&void 0!==this.observers[i]&&(delete this.observers[i],this.observerCount-=1,0===this.observerCount&&void 0!==this.onNoObservers&&this.onNoObservers(this))},e.prototype.forEachObserver=function(e){if(!this.finalized)for(var i=0;i<this.observers.length;i++)this.sendOne(i,e)},e.prototype.sendOne=function(i,e){var t=this;this.task.then((function(){if(void 0!==t.observers&&void 0!==t.observers[i])try{e(t.observers[i])}catch(e){"undefined"!=typeof console&&console.error&&console.error(e)}}))},e.prototype.close=function(e){var t=this;this.finalized||(this.finalized=!0,void 0!==e&&(this.finalError=e),this.task.then((function(){t.observers=void 0,t.onNoObservers=void 0})))},e}();function S(){}}).call(this,n(23))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return d}));var r=n(142),o=n(116),c=n(44);function l(e){const t=Object(r.b)(),n={sid:Object(o.f)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(c.c)({sid:`${e.sid}`,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&d(n,e),n}function d(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(r.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Object(o.f)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function h(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),d(e,n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));"function"==typeof Symbol&&null!=Symbol.iterator&&Symbol.iterator,"function"==typeof Symbol&&null!=Symbol.asyncIterator&&Symbol.asyncIterator;var r="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag"},,,,,,function(e,t){function n(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=n,n.equal=function(e,t,n){if(e!=t)throw new Error(n||"Assertion failed: "+e+" != "+t)}},function(e,t,n){"use strict";var r=t,o=n(50),c=n(83),l=n(435);r.assert=c,r.toArray=l.toArray,r.zero2=l.zero2,r.toHex=l.toHex,r.encode=l.encode,r.getNAF=function(e,t,n){var r=new Array(Math.max(e.bitLength(),n)+1);r.fill(0);for(var o=1<<t+1,c=e.clone(),i=0;i<r.length;i++){var l,d=c.andln(o-1);c.isOdd()?(l=d>(o>>1)-1?(o>>1)-d:d,c.isubn(l)):l=0,r[i]=l,c.iushrn(1)}return r},r.getJSF=function(e,t){var n=[[],[]];e=e.clone(),t=t.clone();for(var r,o=0,c=0;e.cmpn(-o)>0||t.cmpn(-c)>0;){var l,d,h=e.andln(3)+o&3,f=t.andln(3)+c&3;3===h&&(h=-1),3===f&&(f=-1),l=0==(1&h)?0:3!==(r=e.andln(7)+o&7)&&5!==r||2!==f?h:-h,n[0].push(l),d=0==(1&f)?0:3!==(r=t.andln(7)+c&7)&&5!==r||2!==h?f:-f,n[1].push(d),2*o===l+1&&(o=1-o),2*c===d+1&&(c=1-c),e.iushrn(1),t.iushrn(1)}return n},r.cachedProperty=function(e,t,n){var r="_"+t;e.prototype[t]=function(){return void 0!==this[r]?this[r]:this[r]=n.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new o(e,"hex","le")}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(225),o=n(193);function c(e){var t=e.prototype.toJSON;"function"==typeof t||Object(r.a)(0),e.prototype.inspect=t,o.a&&(e.prototype[o.a]=t)}},,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return v}));var r=n(31),o=n(142),c=n(167),l=n(116),d=n(43),h=n(76);class f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new f;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments],t._sdkProcessingMetadata={...e._sdkProcessingMetadata}),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&Object(h.c)(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSpan(span){return this._span=span,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const span=this.getSpan();return span&&span.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof f?t:this}return e instanceof f?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(r.i)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(o.a)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction;if(t){e.sdkProcessingMetadata={dynamicSamplingContext:t.getDynamicSamplingContext(),...e.sdkProcessingMetadata};const n=t.name;n&&(e.tags={transaction:n,...e.tags})}}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...m(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,o=0){return new c.a(((c,l)=>{const d=e[o];if(null===t||"function"!=typeof d)c(t);else{const h=d({...t},n);Object(r.n)(h)?h.then((t=>this._notifyEventProcessors(e,t,n,o+1).then(c))).then(null,l):this._notifyEventProcessors(e,h,n,o+1).then(c).then(null,l)}}))}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Object(l.c)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function m(){return Object(d.c)("globalEventProcessors",(()=>[]))}function v(e){m().push(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return ge})),n.d(t,"b",(function(){return J}));var r=n(4),o=n(7);function c(e){return{kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:l(e)}]}}function l(e){if("number"==typeof e||"boolean"==typeof e||"string"==typeof e||null==e)return null;if(Array.isArray(e))return l(e[0]);var t=[];return Object.keys(e).forEach((function(n){var r={kind:"Field",name:{kind:"Name",value:n},selectionSet:l(e[n])||void 0};t.push(r)})),{kind:"SelectionSet",selections:t}}var d,h={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:null,variableDefinitions:null,directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",alias:null,name:{kind:"Name",value:"__typename"},arguments:[],directives:[],selectionSet:null}]}}]},f=function(){function e(){}return e.prototype.transformDocument=function(e){return e},e.prototype.transformForLink=function(e){return e},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.read({query:e.query,variables:e.variables,optimistic:t})},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.read({query:Object(o.getFragmentQueryDocument)(e.fragment,e.fragmentName),variables:e.variables,rootId:e.id,optimistic:t})},e.prototype.writeQuery=function(e){this.write({dataId:"ROOT_QUERY",result:e.data,query:e.query,variables:e.variables})},e.prototype.writeFragment=function(e){this.write({dataId:e.id,result:e.data,variables:e.variables,query:Object(o.getFragmentQueryDocument)(e.fragment,e.fragmentName)})},e.prototype.writeData=function(e){var t,n,r=e.id,data=e.data;if(void 0!==r){var o=null;try{o=this.read({rootId:r,optimistic:!1,query:h})}catch(e){}var d=o&&o.__typename||"__ClientData",f=Object.assign({__typename:d},data);this.writeFragment({id:r,fragment:(t=f,n=d,{kind:"Document",definitions:[{kind:"FragmentDefinition",typeCondition:{kind:"NamedType",name:{kind:"Name",value:n||"__FakeType"}},name:{kind:"Name",value:"GeneratedClientQuery"},selectionSet:l(t)}]}),data:f})}else this.writeQuery({query:c(data),data:data})},e}();d||(d={});var m=n(397),v=null,_={},y=1,E="@wry/context:Slot",C=Array,w=C[E]||function(){var e=function(){function e(){this.id=["slot",y++,Date.now(),Math.random().toString(36).slice(2)].join(":")}return e.prototype.hasValue=function(){for(var e=v;e;e=e.parent)if(this.id in e.slots){var t=e.slots[this.id];if(t===_)break;return e!==v&&(v.slots[this.id]=t),!0}return v&&(v.slots[this.id]=_),!1},e.prototype.getValue=function(){if(this.hasValue())return v.slots[this.id]},e.prototype.withValue=function(e,t,n,r){var o,c=((o={__proto__:null})[this.id]=e,o),l=v;v={parent:l,slots:c};try{return t.apply(r,n)}finally{v=l}},e.bind=function(e){var t=v;return function(){var n=v;try{return v=t,e.apply(this,arguments)}finally{v=n}}},e.noContext=function(e,t,n){if(!v)return e.apply(n,t);var r=v;try{return v=null,e.apply(n,t)}finally{v=r}},e}();try{Object.defineProperty(C,E,{value:C[E]=e,enumerable:!1,writable:!1,configurable:!1})}finally{return e}}();w.bind,w.noContext;function S(){}var T=function(){function e(e,t){void 0===e&&(e=1/0),void 0===t&&(t=S),this.max=e,this.dispose=t,this.map=new Map,this.newest=null,this.oldest=null}return e.prototype.has=function(e){return this.map.has(e)},e.prototype.get=function(e){var t=this.getEntry(e);return t&&t.value},e.prototype.getEntry=function(e){var t=this.map.get(e);if(t&&t!==this.newest){var n=t.older,r=t.newer;r&&(r.older=n),n&&(n.newer=r),t.older=this.newest,t.older.newer=t,t.newer=null,this.newest=t,t===this.oldest&&(this.oldest=r)}return t},e.prototype.set=function(e,t){var n=this.getEntry(e);return n?n.value=t:(n={key:e,value:t,newer:null,older:this.newest},this.newest&&(this.newest.newer=n),this.newest=n,this.oldest=this.oldest||n,this.map.set(e,n),n.value)},e.prototype.clean=function(){for(;this.oldest&&this.map.size>this.max;)this.delete(this.oldest.key)},e.prototype.delete=function(e){var t=this.map.get(e);return!!t&&(t===this.newest&&(this.newest=t.older),t===this.oldest&&(this.oldest=t.newer),t.newer&&(t.newer.older=t.older),t.older&&(t.older.newer=t.newer),this.map.delete(e),this.dispose(t.value,e),!0)},e}(),A=new w,R=[],O=[];function I(e,t){if(!e)throw new Error(t||"assertion failure")}function k(e){switch(e.length){case 0:throw new Error("unknown value");case 1:return e[0];case 2:throw e[1]}}var N=function(){function e(t,n){this.fn=t,this.args=n,this.parents=new Set,this.childValues=new Map,this.dirtyChildren=null,this.dirty=!0,this.recomputing=!1,this.value=[],++e.count}return e.prototype.recompute=function(){if(I(!this.recomputing,"already recomputing"),function(e){var t=A.getValue();if(t)return e.parents.add(t),t.childValues.has(e)||t.childValues.set(e,[]),M(e)?P(t,e):U(t,e),t}(this)||!F(this))return M(this)?function(e){var t=V(e);A.withValue(e,L,[e]),function(e){if("function"==typeof e.subscribe)try{H(e),e.unsubscribe=e.subscribe.apply(null,e.args)}catch(t){return e.setDirty(),!1}return!0}(e)&&function(e){if(e.dirty=!1,M(e))return;D(e)}(e);return t.forEach(F),k(e.value)}(this):k(this.value)},e.prototype.setDirty=function(){this.dirty||(this.dirty=!0,this.value.length=0,x(this),H(this))},e.prototype.dispose=function(){var e=this;V(this).forEach(F),H(this),this.parents.forEach((function(t){t.setDirty(),j(t,e)}))},e.count=0,e}();function L(e){e.recomputing=!0,e.value.length=0;try{e.value[0]=e.fn.apply(null,e.args)}catch(t){e.value[1]=t}e.recomputing=!1}function M(e){return e.dirty||!(!e.dirtyChildren||!e.dirtyChildren.size)}function x(e){e.parents.forEach((function(t){return P(t,e)}))}function D(e){e.parents.forEach((function(t){return U(t,e)}))}function P(e,t){if(I(e.childValues.has(t)),I(M(t)),e.dirtyChildren){if(e.dirtyChildren.has(t))return}else e.dirtyChildren=O.pop()||new Set;e.dirtyChildren.add(t),x(e)}function U(e,t){I(e.childValues.has(t)),I(!M(t));var a,b,n,r=e.childValues.get(t);0===r.length?e.childValues.set(t,t.value.slice(0)):(a=r,b=t.value,(n=a.length)>0&&n===b.length&&a[n-1]===b[n-1]||e.setDirty()),B(e,t),M(e)||D(e)}function B(e,t){var n=e.dirtyChildren;n&&(n.delete(t),0===n.size&&(O.length<100&&O.push(n),e.dirtyChildren=null))}function F(e){return 0===e.parents.size&&"function"==typeof e.reportOrphan&&!0===e.reportOrphan()}function V(e){var t=R;return e.childValues.size>0&&(t=[],e.childValues.forEach((function(n,r){j(e,r),t.push(r)}))),I(null===e.dirtyChildren),t}function j(e,t){t.parents.delete(e),e.childValues.delete(t),B(e,t)}function H(e){var t=e.unsubscribe;"function"==typeof t&&(e.unsubscribe=void 0,t())}var $=function(){function e(e){this.weakness=e}return e.prototype.lookup=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return this.lookupArray(e)},e.prototype.lookupArray=function(e){var t=this;return e.forEach((function(e){return t=t.getChildTrie(e)})),t.data||(t.data=Object.create(null))},e.prototype.getChildTrie=function(t){var map=this.weakness&&function(e){switch(typeof e){case"object":if(null===e)break;case"function":return!0}return!1}(t)?this.weak||(this.weak=new WeakMap):this.strong||(this.strong=new Map),n=map.get(t);return n||map.set(t,n=new e(this.weakness)),n},e}();var z=new $("function"==typeof WeakMap);function W(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return z.lookupArray(e)}var K=new Set;function G(e,t){void 0===t&&(t=Object.create(null));var n=new T(t.max||Math.pow(2,16),(function(e){return e.dispose()})),r=!!t.disposable,o=t.makeCacheKey||W;function c(){if(!r||A.hasValue()){var c=o.apply(null,arguments);if(void 0===c)return e.apply(null,arguments);var l=Array.prototype.slice.call(arguments),d=n.get(c);d?d.args=l:(d=new N(e,l),n.set(c,d),d.subscribe=t.subscribe,r&&(d.reportOrphan=function(){return n.delete(c)}));var h=d.recompute();return n.set(c,d),K.add(n),A.hasValue()||(K.forEach((function(e){return e.clean()})),K.clear()),r?void 0:h}}return c.dirty=function(){var e=o.apply(null,arguments),t=void 0!==e&&n.get(e);t&&t.setDirty()},c}var Y=n(11),X=!1;function Z(){var e=!X;return Object(o.isTest)()||(X=!0),e}var Q=function(){function e(){}return e.prototype.ensureReady=function(){return Promise.resolve()},e.prototype.canBypassInit=function(){return!0},e.prototype.match=function(e,t,n){var r=n.store.get(e.id),o="ROOT_QUERY"===e.id;if(!r)return o;var c=r.__typename,l=void 0===c?o&&"Query":c;return l&&l===t||(Z(),"heuristic")},e}(),J=function(){function e(e){e&&e.introspectionQueryResultData?(this.possibleTypesMap=this.parseIntrospectionResult(e.introspectionQueryResultData),this.isReady=!0):this.isReady=!1,this.match=this.match.bind(this)}return e.prototype.match=function(e,t,n){Object(Y.b)(this.isReady,1);var r=n.store.get(e.id),o="ROOT_QUERY"===e.id;if(!r)return o;var c=r.__typename,l=void 0===c?o&&"Query":c;if(Object(Y.b)(l,2),l===t)return!0;var d=this.possibleTypesMap[t];return!!(l&&d&&d.indexOf(l)>-1)},e.prototype.parseIntrospectionResult=function(e){var t={};return e.__schema.types.forEach((function(e){"UNION"!==e.kind&&"INTERFACE"!==e.kind||(t[e.name]=e.possibleTypes.map((function(e){return e.name})))})),t},e}(),ee=Object.prototype.hasOwnProperty,te=function(){function e(data){var e=this;void 0===data&&(data=Object.create(null)),this.data=data,this.depend=G((function(t){return e.data[t]}),{disposable:!0,makeCacheKey:function(e){return e}})}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.depend(e),this.data[e]},e.prototype.set=function(e,t){t!==this.data[e]&&(this.data[e]=t,this.depend.dirty(e))},e.prototype.delete=function(e){ee.call(this.data,e)&&(delete this.data[e],this.depend.dirty(e))},e.prototype.clear=function(){this.replace(null)},e.prototype.replace=function(e){var t=this;e?(Object.keys(e).forEach((function(n){t.set(n,e[n])})),Object.keys(this.data).forEach((function(n){ee.call(e,n)||t.delete(n)}))):Object.keys(this.data).forEach((function(e){t.delete(e)}))},e}();function ne(e){return new te(e)}var re=function(){function e(e){var t=this,n=void 0===e?{}:e,r=n.cacheKeyRoot,c=void 0===r?new $(o.canUseWeakMap):r,l=n.freezeResults,d=void 0!==l&&l,h=this,f=h.executeStoreQuery,m=h.executeSelectionSet,v=h.executeSubSelectedArray;this.freezeResults=d,this.executeStoreQuery=G((function(e){return f.call(t,e)}),{makeCacheKey:function(e){var t=e.query,n=e.rootValue,r=e.contextValue,o=e.variableValues,l=e.fragmentMatcher;if(r.store instanceof te)return c.lookup(r.store,t,l,JSON.stringify(o),n.id)}}),this.executeSelectionSet=G((function(e){return m.call(t,e)}),{makeCacheKey:function(e){var t=e.selectionSet,n=e.rootValue,r=e.execContext;if(r.contextValue.store instanceof te)return c.lookup(r.contextValue.store,t,r.fragmentMatcher,JSON.stringify(r.variableValues),n.id)}}),this.executeSubSelectedArray=G((function(e){return v.call(t,e)}),{makeCacheKey:function(e){var t=e.field,n=e.array,r=e.execContext;if(r.contextValue.store instanceof te)return c.lookup(r.contextValue.store,t,n,JSON.stringify(r.variableValues))}})}return e.prototype.readQueryFromStore=function(e){return this.diffQueryAgainstStore(Object(r.__assign)(Object(r.__assign)({},e),{returnPartialData:!1})).result},e.prototype.diffQueryAgainstStore=function(e){var t=e.store,n=e.query,r=e.variables,c=e.previousResult,l=e.returnPartialData,d=void 0===l||l,h=e.rootId,f=void 0===h?"ROOT_QUERY":h,v=e.fragmentMatcherFunction,_=e.config,y=Object(o.getQueryDefinition)(n);r=Object(o.assign)({},Object(o.getDefaultValues)(y),r);var E={store:t,dataIdFromObject:_&&_.dataIdFromObject,cacheRedirects:_&&_.cacheRedirects||{}},C=this.executeStoreQuery({query:n,rootValue:{type:"id",id:f,generated:!0,typename:"Query"},contextValue:E,variableValues:r,fragmentMatcher:v}),w=C.missing&&C.missing.length>0;return w&&!d&&C.missing.forEach((function(e){if(!e.tolerable)throw new Y.a(8)})),c&&Object(m.a)(c,C.result)&&(C.result=c),{result:C.result,complete:!w}},e.prototype.executeStoreQuery=function(e){var t=e.query,n=e.rootValue,r=e.contextValue,c=e.variableValues,l=e.fragmentMatcher,d=void 0===l?oe:l,h=Object(o.getMainDefinition)(t),f=Object(o.getFragmentDefinitions)(t),m={query:t,fragmentMap:Object(o.createFragmentMap)(f),contextValue:r,variableValues:c,fragmentMatcher:d};return this.executeSelectionSet({selectionSet:h.selectionSet,rootValue:n,execContext:m})},e.prototype.executeSelectionSet=function(e){var t=this,n=e.selectionSet,c=e.rootValue,l=e.execContext,d=l.fragmentMap,h=l.contextValue,f=l.variableValues,m={result:null},v=[],object=h.store.get(c.id),_=object&&object.__typename||"ROOT_QUERY"===c.id&&"Query"||void 0;function y(e){var t;return e.missing&&(m.missing=m.missing||[],(t=m.missing).push.apply(t,e.missing)),e.result}return n.selections.forEach((function(e){var n;if(Object(o.shouldInclude)(e,f))if(Object(o.isField)(e)){var m=y(t.executeField(object,_,e,l));void 0!==m&&v.push(((n={})[Object(o.resultKeyNameFromField)(e)]=m,n))}else{var E=void 0;if(Object(o.isInlineFragment)(e))E=e;else if(!(E=d[e.name.value]))throw new Y.a(9);var C=E.typeCondition&&E.typeCondition.name.value,w=!C||l.fragmentMatcher(c,C,h);if(w){var S=t.executeSelectionSet({selectionSet:E.selectionSet,rootValue:c,execContext:l});"heuristic"===w&&S.missing&&(S=Object(r.__assign)(Object(r.__assign)({},S),{missing:S.missing.map((function(e){return Object(r.__assign)(Object(r.__assign)({},e),{tolerable:!0})}))})),v.push(y(S))}}})),m.result=Object(o.mergeDeepArray)(v),this.freezeResults,m},e.prototype.executeField=function(object,e,t,n){var r=n.variableValues,c=n.contextValue,l=function(object,e,t,n,r,c){c.resultKey;var l=c.directives,d=t;(n||l)&&(d=Object(o.getStoreKeyName)(d,n,l));var h=void 0;if(object&&void 0===(h=object[d])&&r.cacheRedirects&&"string"==typeof e){var f=r.cacheRedirects[e];if(f){var m=f[t];m&&(h=m(object,n,{getCacheKey:function(e){var t=r.dataIdFromObject(e);return t&&Object(o.toIdValue)({id:t,typename:e.__typename})}}))}}if(void 0===h)return{result:h,missing:[{object:object,fieldName:d,tolerable:!1}]};Object(o.isJsonValue)(h)&&(h=h.json);return{result:h}}(object,e,t.name.value,Object(o.argumentsObjectFromField)(t,r),c,{resultKey:Object(o.resultKeyNameFromField)(t),directives:Object(o.getDirectiveInfoFromField)(t,r)});return Array.isArray(l.result)?this.combineExecResults(l,this.executeSubSelectedArray({field:t,array:l.result,execContext:n})):t.selectionSet?null==l.result?l:this.combineExecResults(l,this.executeSelectionSet({selectionSet:t.selectionSet,rootValue:l.result,execContext:n})):(ie(t,l.result),this.freezeResults,l)},e.prototype.combineExecResults=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return t.forEach((function(t){t.missing&&(e=e||[]).push.apply(e,t.missing)})),{result:t.pop().result,missing:e}},e.prototype.executeSubSelectedArray=function(e){var t,n=this,r=e.field,o=e.array,c=e.execContext;function l(e){return e.missing&&(t=t||[]).push.apply(t,e.missing),e.result}return o=o.map((function(e){return null===e?null:Array.isArray(e)?l(n.executeSubSelectedArray({field:r,array:e,execContext:c})):r.selectionSet?l(n.executeSelectionSet({selectionSet:r.selectionSet,rootValue:e,execContext:c})):(ie(r,e),e)})),this.freezeResults,{result:o,missing:t}},e}();function ie(e,t){if(!e.selectionSet&&Object(o.isIdValue)(t))throw new Y.a(10)}function oe(){return!0}var ae=function(){function e(data){void 0===data&&(data=Object.create(null)),this.data=data}return e.prototype.toObject=function(){return this.data},e.prototype.get=function(e){return this.data[e]},e.prototype.set=function(e,t){this.data[e]=t},e.prototype.delete=function(e){this.data[e]=void 0},e.prototype.clear=function(){this.data=Object.create(null)},e.prototype.replace=function(e){this.data=e||Object.create(null)},e}();var se=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.type="WriteError",t}return Object(r.__extends)(t,e),t}(Error);var ce=function(){function e(){}return e.prototype.writeQueryToStore=function(e){var t=e.query,n=e.result,r=e.store,o=void 0===r?ne():r,c=e.variables,l=e.dataIdFromObject,d=e.fragmentMatcherFunction;return this.writeResultToStore({dataId:"ROOT_QUERY",result:n,document:t,store:o,variables:c,dataIdFromObject:l,fragmentMatcherFunction:d})},e.prototype.writeResultToStore=function(e){var t=e.dataId,n=e.result,r=e.document,c=e.store,l=void 0===c?ne():c,d=e.variables,h=e.dataIdFromObject,f=e.fragmentMatcherFunction,m=Object(o.getOperationDefinition)(r);try{return this.writeSelectionSetToStore({result:n,dataId:t,selectionSet:m.selectionSet,context:{store:l,processedData:{},variables:Object(o.assign)({},Object(o.getDefaultValues)(m),d),dataIdFromObject:h,fragmentMap:Object(o.createFragmentMap)(Object(o.getFragmentDefinitions)(r)),fragmentMatcherFunction:f}})}catch(e){throw function(e,t){var n=new se("Error writing result to store for query:\n "+JSON.stringify(t));return n.message+="\n"+e.message,n.stack=e.stack,n}(e,r)}},e.prototype.writeSelectionSetToStore=function(e){var t=this,n=e.result,r=e.dataId,c=e.selectionSet,l=e.context,d=l.variables,h=l.store,f=l.fragmentMap;return c.selections.forEach((function(e){var c;if(Object(o.shouldInclude)(e,d))if(Object(o.isField)(e)){var h=Object(o.resultKeyNameFromField)(e),m=n[h];if(void 0!==m)t.writeFieldToStore({dataId:r,value:m,field:e,context:l});else{var v=!1,_=!1;e.directives&&e.directives.length&&(v=e.directives.some((function(e){return e.name&&"defer"===e.name.value})),_=e.directives.some((function(e){return e.name&&"client"===e.name.value}))),!v&&!_&&l.fragmentMatcherFunction}}else{var y=void 0;Object(o.isInlineFragment)(e)?y=e:(y=(f||{})[e.name.value],Object(Y.b)(y,3));var E=!0;if(l.fragmentMatcherFunction&&y.typeCondition){var C=r||"self",w=Object(o.toIdValue)({id:C,typename:void 0}),S={store:new ae((c={},c[C]=n,c)),cacheRedirects:{}},T=l.fragmentMatcherFunction(w,y.typeCondition.name.value,S);Object(o.isProduction)(),E=!!T}E&&t.writeSelectionSetToStore({result:n,selectionSet:y.selectionSet,dataId:r,context:l})}})),h},e.prototype.writeFieldToStore=function(e){var t,n,c,l=e.field,d=e.value,h=e.dataId,f=e.context,v=f.variables,_=f.dataIdFromObject,y=f.store,E=Object(o.storeKeyNameFromField)(l,v);if(l.selectionSet&&null!==d)if(Array.isArray(d)){var C=h+"."+E;n=this.processArrayValue(d,C,l.selectionSet,f)}else{var w=h+"."+E,S=!0;if(le(w)||(w="$"+w),_){var T=_(d);Object(Y.b)(!T||!le(T),4),(T||"number"==typeof T&&0===T)&&(w=T,S=!1)}ue(w,l,f.processedData)||this.writeSelectionSetToStore({dataId:w,result:d,selectionSet:l.selectionSet,context:f});var A=d.__typename;n=Object(o.toIdValue)({id:w,typename:A},S);var R=(c=y.get(h))&&c[E];if(R!==n&&Object(o.isIdValue)(R)){var O=void 0!==R.typename,I=void 0!==A,k=O&&I&&R.typename!==A;Object(Y.b)(!S||R.generated||k,5),Object(Y.b)(!O||I,6),R.generated&&(k?S||y.delete(R.id):de(R.id,n.id,y))}}else n=null!=d&&"object"==typeof d?{type:"json",json:d}:d;(c=y.get(h))&&Object(m.a)(n,c[E])||y.set(h,Object(r.__assign)(Object(r.__assign)({},c),((t={})[E]=n,t)))},e.prototype.processArrayValue=function(e,t,n,r){var c=this;return e.map((function(e,l){if(null===e)return null;var d=t+"."+l;if(Array.isArray(e))return c.processArrayValue(e,d,n,r);var h=!0;if(r.dataIdFromObject){var f=r.dataIdFromObject(e);f&&(d=f,h=!1)}return ue(d,n,r.processedData)||c.writeSelectionSetToStore({dataId:d,result:e,selectionSet:n,context:r}),Object(o.toIdValue)({id:d,typename:e.__typename},h)}))},e}();function le(e){return"$"===e[0]}function de(e,t,n){if(e===t)return!1;var c=n.get(e),l=n.get(t),d=!1;Object.keys(c).forEach((function(e){var t=c[e],r=l[e];Object(o.isIdValue)(t)&&le(t.id)&&Object(o.isIdValue)(r)&&!Object(m.a)(t,r)&&de(t.id,r.id,n)&&(d=!0)})),n.delete(e);var h=Object(r.__assign)(Object(r.__assign)({},c),l);return Object(m.a)(h,l)?d:(n.set(t,h),!0)}function ue(e,t,n){if(!n)return!1;if(n[e]){if(n[e].indexOf(t)>=0)return!0;n[e].push(t)}else n[e]=[t];return!1}var he={fragmentMatcher:new Q,dataIdFromObject:function(e){if(e.__typename){if(void 0!==e.id)return e.__typename+":"+e.id;if(void 0!==e._id)return e.__typename+":"+e._id}return null},addTypename:!0,resultCaching:!0,freezeResults:!1};var fe=Object.prototype.hasOwnProperty,pe=function(e){function t(t,n,r){var o=e.call(this,Object.create(null))||this;return o.optimisticId=t,o.parent=n,o.transaction=r,o}return Object(r.__extends)(t,e),t.prototype.toObject=function(){return Object(r.__assign)(Object(r.__assign)({},this.parent.toObject()),this.data)},t.prototype.get=function(e){return fe.call(this.data,e)?this.data[e]:this.parent.get(e)},t}(ae),ge=function(e){function t(t){void 0===t&&(t={});var n=e.call(this)||this;n.watches=new Set,n.typenameDocumentCache=new Map,n.cacheKeyRoot=new $(o.canUseWeakMap),n.silenceBroadcast=!1,n.config=Object(r.__assign)(Object(r.__assign)({},he),t),n.config.customResolvers&&(n.config.cacheRedirects=n.config.customResolvers),n.config.cacheResolvers&&(n.config.cacheRedirects=n.config.cacheResolvers),n.addTypename=!!n.config.addTypename,n.data=n.config.resultCaching?new te:new ae,n.optimisticData=n.data,n.storeWriter=new ce,n.storeReader=new re({cacheKeyRoot:n.cacheKeyRoot,freezeResults:t.freezeResults});var c=n,l=c.maybeBroadcastWatch;return n.maybeBroadcastWatch=G((function(e){return l.call(n,e)}),{makeCacheKey:function(e){if(!e.optimistic&&!e.previousResult)return c.data instanceof te?c.cacheKeyRoot.lookup(e.query,JSON.stringify(e.variables)):void 0}}),n}return Object(r.__extends)(t,e),t.prototype.restore=function(data){return data&&this.data.replace(data),this},t.prototype.extract=function(e){return void 0===e&&(e=!1),(e?this.optimisticData:this.data).toObject()},t.prototype.read=function(e){if("string"==typeof e.rootId&&void 0===this.data.get(e.rootId))return null;var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.readQueryFromStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,rootId:e.rootId,fragmentMatcherFunction:n,previousResult:e.previousResult,config:this.config})||null},t.prototype.write=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;this.storeWriter.writeResultToStore({dataId:e.dataId,result:e.result,variables:e.variables,document:this.transformDocument(e.query),store:this.data,dataIdFromObject:this.config.dataIdFromObject,fragmentMatcherFunction:n}),this.broadcastWatches()},t.prototype.diff=function(e){var t=this.config.fragmentMatcher,n=t&&t.match;return this.storeReader.diffQueryAgainstStore({store:e.optimistic?this.optimisticData:this.data,query:this.transformDocument(e.query),variables:e.variables,returnPartialData:e.returnPartialData,previousResult:e.previousResult,fragmentMatcherFunction:n,config:this.config})},t.prototype.watch=function(e){var t=this;return this.watches.add(e),function(){t.watches.delete(e)}},t.prototype.evict=function(e){throw new Y.a(7)},t.prototype.reset=function(){return this.data.clear(),this.broadcastWatches(),Promise.resolve()},t.prototype.removeOptimistic=function(e){for(var t=[],n=0,r=this.optimisticData;r instanceof pe;)r.optimisticId===e?++n:t.push(r),r=r.parent;if(n>0){for(this.optimisticData=r;t.length>0;){var o=t.pop();this.performTransaction(o.transaction,o.optimisticId)}this.broadcastWatches()}},t.prototype.performTransaction=function(e,t){var data=this.data,n=this.silenceBroadcast;this.silenceBroadcast=!0,"string"==typeof t&&(this.data=this.optimisticData=new pe(t,this.optimisticData,e));try{e(this)}finally{this.silenceBroadcast=n,this.data=data}this.broadcastWatches()},t.prototype.recordOptimisticTransaction=function(e,t){return this.performTransaction(e,t)},t.prototype.transformDocument=function(e){if(this.addTypename){var t=this.typenameDocumentCache.get(e);return t||(t=Object(o.addTypenameToDocument)(e),this.typenameDocumentCache.set(e,t),this.typenameDocumentCache.set(t,t)),t}return e},t.prototype.broadcastWatches=function(){var e=this;this.silenceBroadcast||this.watches.forEach((function(t){return e.maybeBroadcastWatch(t)}))},t.prototype.maybeBroadcastWatch=function(e){e.callback(this.diff({query:e.query,variables:e.variables,previousResult:e.previousResult&&e.previousResult(),optimistic:e.optimistic}))},t}(f)},function(e,t,n){"use strict";t.a=function(e,t){return e instanceof t}},,,,function(e,t,n){"use strict";var r=n(83),o=n(13);function c(e,i){return 55296==(64512&e.charCodeAt(i))&&(!(i<0||i+1>=e.length)&&56320==(64512&e.charCodeAt(i+1)))}function l(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function d(e){return 1===e.length?"0"+e:e}function h(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=o,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(var p=0,i=0;i<e.length;i++){var r=e.charCodeAt(i);r<128?n[p++]=r:r<2048?(n[p++]=r>>6|192,n[p++]=63&r|128):c(e,i)?(r=65536+((1023&r)<<10)+(1023&e.charCodeAt(++i)),n[p++]=r>>18|240,n[p++]=r>>12&63|128,n[p++]=r>>6&63|128,n[p++]=63&r|128):(n[p++]=r>>12|224,n[p++]=r>>6&63|128,n[p++]=63&r|128)}else for(i=0;i<e.length;i++)n[i]=0|e[i];return n},t.toHex=function(e){for(var t="",i=0;i<e.length;i++)t+=d(e[i].toString(16));return t},t.htonl=l,t.toHex32=function(e,t){for(var n="",i=0;i<e.length;i++){var r=e[i];"little"===t&&(r=l(r)),n+=h(r.toString(16))}return n},t.zero2=d,t.zero8=h,t.join32=function(e,t,n,o){var c=n-t;r(c%4==0);for(var l=new Array(c/4),i=0,d=t;i<l.length;i++,d+=4){var h;h="big"===o?e[d]<<24|e[d+1]<<16|e[d+2]<<8|e[d+3]:e[d+3]<<24|e[d+2]<<16|e[d+1]<<8|e[d],l[i]=h>>>0}return l},t.split32=function(e,t){for(var n=new Array(4*e.length),i=0,r=0;i<e.length;i++,r+=4){var o=e[i];"big"===t?(n[r]=o>>>24,n[r+1]=o>>>16&255,n[r+2]=o>>>8&255,n[r+3]=255&o):(n[r+3]=o>>>24,n[r+2]=o>>>16&255,n[r+1]=o>>>8&255,n[r]=255&o)}return n},t.rotr32=function(e,b){return e>>>b|e<<32-b},t.rotl32=function(e,b){return e<<b|e>>>32-b},t.sum32=function(a,b){return a+b>>>0},t.sum32_3=function(a,b,e){return a+b+e>>>0},t.sum32_4=function(a,b,e,t){return a+b+e+t>>>0},t.sum32_5=function(a,b,e,t,n){return a+b+e+t+n>>>0},t.sum64=function(e,t,n,r){var o=e[t],c=r+e[t+1]>>>0,l=(c<r?1:0)+n+o;e[t]=l>>>0,e[t+1]=c},t.sum64_hi=function(e,t,n,r){return(t+r>>>0<t?1:0)+e+n>>>0},t.sum64_lo=function(e,t,n,r){return t+r>>>0},t.sum64_4_hi=function(e,t,n,r,o,c,l,dl){var d=0,h=t;return d+=(h=h+r>>>0)<t?1:0,d+=(h=h+c>>>0)<c?1:0,e+n+o+l+(d+=(h=h+dl>>>0)<dl?1:0)>>>0},t.sum64_4_lo=function(e,t,n,r,o,c,l,dl){return t+r+c+dl>>>0},t.sum64_5_hi=function(e,t,n,r,o,c,l,dl,d,h){var f=0,m=t;return f+=(m=m+r>>>0)<t?1:0,f+=(m=m+c>>>0)<c?1:0,f+=(m=m+dl>>>0)<dl?1:0,e+n+o+l+d+(f+=(m=m+h>>>0)<h?1:0)>>>0},t.sum64_5_lo=function(e,t,n,r,o,c,l,dl,d,h){return t+r+c+dl+h>>>0},t.rotr64_hi=function(e,t,n){return(t<<32-n|e>>>n)>>>0},t.rotr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0},t.shr64_hi=function(e,t,n){return e>>>n},t.shr64_lo=function(e,t,n){return(e<<32-n|t>>>n)>>>0}},,,,function(e,t,n){"use strict";function r(e){try{return e()}catch(e){}}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return o}));var r=n(31);function o(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function c(line,e){let t=line;const n=t.length;if(n<=150)return t;e>n&&(e=n);let r=Math.max(e-60,0);r<5&&(r=0);let o=Math.min(r+140,n);return o>n-5&&(o=n),o===n&&(r=Math.max(o-140,0)),t=t.slice(r,o),r>0&&(t=`'{snip} ${t}`),o<n&&(t+=" {snip}"),t}function l(input,e){if(!Array.isArray(input))return"";const output=[];for(let i=0;i<input.length;i++){const e=input[i];try{output.push(String(e))}catch(e){output.push("[value cannot be serialized]")}}return output.join(e)}function d(e,t=[],n=!1){return t.some((pattern=>function(e,pattern,t=!1){return!!Object(r.l)(e)&&(Object(r.k)(pattern)?pattern.test(e):!!Object(r.l)(pattern)&&(t?e===pattern:e.includes(pattern)))}(e,pattern,n)))}},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return l}));var r=n(43);const o=["debug","info","warn","error","log","assert","trace"];function c(e){if(!("console"in r.a))return e();const t=r.a.console,n={};o.forEach((e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)}));try{return e()}finally{Object.keys(n).forEach((e=>{t[e]=n[e]}))}}let l;l=function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return o.forEach((e=>{t[e]=()=>{}})),t}()},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return h}));var r=n(31),o=n(473),c=n(44),l=n(321);function d(input,e=100,t=1/0){try{return f("",input,e,t)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function h(object,e=3,t=102400){const n=d(object,e);return r=n,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(r))>t?h(object,e-1,t):n;var r}function f(t,n,d=1/0,h=1/0,m=Object(o.a)()){const[v,_]=m;if(null==n||["number","boolean","string"].includes(typeof n)&&!Object(r.h)(n))return n;const y=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==e&&n===e)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if(Object(r.m)(n))return"[SyntheticEvent]";if("number"==typeof n&&n!=n)return"[NaN]";if("function"==typeof n)return`[Function: ${Object(l.b)(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const o=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(o)?`[HTMLElement: ${o}]`:`[object ${o}]`}catch(e){return`**non-serializable** (${e})`}}(t,n);if(!y.startsWith("[object "))return y;if(n.__sentry_skip_normalization__)return n;const E="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:d;if(0===E)return y.replace("object ","");if(v(n))return"[Circular ~]";const C=n;if(C&&"function"==typeof C.toJSON)try{return f("",C.toJSON(),E-1,h,m)}catch(e){}const w=Array.isArray(n)?[]:{};let S=0;const T=Object(c.b)(n);for(const e in T){if(!Object.prototype.hasOwnProperty.call(T,e))continue;if(S>=h){w[e]="[MaxProperties ~]";break}const t=T[e];w[e]=f(e,t,E-1,h,m),S++}return _(n),w}}).call(this,n(23))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return h})),n.d(t,"c",(function(){return v})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return d})),n.d(t,"f",(function(){return c}));var r=n(44),o=(n(104),n(43));function c(){const e=o.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function l(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function d(e){const{message:t,event_id:n}=e;if(t)return t;const r=l(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function h(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],c=o[0]=o[0]||{};c.value||(c.value=t||""),c.type||(c.type=n||"Error")}function f(e,t){const n=l(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function m(e){if(e&&e.__sentry_captured__)return!0;try{Object(r.a)(e,"__sentry_captured__",!0)}catch(e){}return!1}function v(e){return Array.isArray(e)?e:[e]}},,,,,function(e,t,n){var r=n(17).Buffer,o=n(659).Transform,c=n(138).StringDecoder;function l(e){o.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}n(13)(l,o),l.prototype.update=function(data,e,t){"string"==typeof data&&(data=r.from(data,e));var n=this._update(data);return this.hashMode?this:(t&&(n=this._toString(n,t)),n)},l.prototype.setAutoPadding=function(){},l.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},l.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},l.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},l.prototype._transform=function(data,e,t){var n;try{this.hashMode?this._update(data):this.push(this._update(data))}catch(e){n=e}finally{t(n)}},l.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},l.prototype._finalOrDigest=function(e){var t=this.__final()||r.alloc(0);return e&&(t=this._toString(t,e,!0)),t},l.prototype._toString=function(e,t,n){if(this._decoder||(this._decoder=new c(t),this._encoding=t),this._encoding!==t)throw new Error("can't switch encodings");var r=this._decoder.write(e);return n&&(r+=this._decoder.end()),r},e.exports=l},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="production"},function(e,t,n){"use strict";n.r(t),n.d(t,"print",(function(){return c}));var r=n(72),o=n(227);function c(e){return Object(r.b)(e,{leave:l})}var l={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return h(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,n=e.name,r=m("(",h(e.variableDefinitions,", "),")"),o=h(e.directives," "),c=e.selectionSet;return n||o||r||"query"!==t?h([t,h([n,r]),o,c]," "):c},VariableDefinition:function(e){var t=e.variable,n=e.type,r=e.defaultValue,o=e.directives;return t+": "+n+m(" = ",r)+m(" ",h(o," "))},SelectionSet:function(e){return f(e.selections)},Field:function(e){var t=e.alias,n=e.name,r=e.arguments,o=e.directives,c=e.selectionSet,l=m("",t,": ")+n,d=l+m("(",h(r,", "),")");return d.length>80&&(d=l+m("(\n",v(h(r,"\n")),"\n)")),h([d,h(o," "),c]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+m(" ",h(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,n=e.directives,r=e.selectionSet;return h(["...",m("on ",t),h(n," "),r]," ")},FragmentDefinition:function(e){var t=e.name,n=e.typeCondition,r=e.variableDefinitions,o=e.directives,c=e.selectionSet;return"fragment ".concat(t).concat(m("(",h(r,", "),")")," ")+"on ".concat(n," ").concat(m("",h(o," ")," "))+c},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var n=e.value;return e.block?Object(o.b)(n,"description"===t?"":"  "):JSON.stringify(n)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+h(e.values,", ")+"]"},ObjectValue:function(e){return"{"+h(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+m("(",h(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:d((function(e){var t=e.directives,n=e.operationTypes;return h(["schema",h(t," "),f(n)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:d((function(e){return h(["scalar",e.name,h(e.directives," ")]," ")})),ObjectTypeDefinition:d((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["type",t,m("implements ",h(n," & ")),h(r," "),f(o)]," ")})),FieldDefinition:d((function(e){var t=e.name,n=e.arguments,r=e.type,o=e.directives;return t+(y(n)?m("(\n",v(h(n,"\n")),"\n)"):m("(",h(n,", "),")"))+": "+r+m(" ",h(o," "))})),InputValueDefinition:d((function(e){var t=e.name,n=e.type,r=e.defaultValue,o=e.directives;return h([t+": "+n,m("= ",r),h(o," ")]," ")})),InterfaceTypeDefinition:d((function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["interface",t,m("implements ",h(n," & ")),h(r," "),f(o)]," ")})),UnionTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.types;return h(["union",t,h(n," "),r&&0!==r.length?"= "+h(r," | "):""]," ")})),EnumTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.values;return h(["enum",t,h(n," "),f(r)]," ")})),EnumValueDefinition:d((function(e){return h([e.name,h(e.directives," ")]," ")})),InputObjectTypeDefinition:d((function(e){var t=e.name,n=e.directives,r=e.fields;return h(["input",t,h(n," "),f(r)]," ")})),DirectiveDefinition:d((function(e){var t=e.name,n=e.arguments,r=e.repeatable,o=e.locations;return"directive @"+t+(y(n)?m("(\n",v(h(n,"\n")),"\n)"):m("(",h(n,", "),")"))+(r?" repeatable":"")+" on "+h(o," | ")})),SchemaExtension:function(e){var t=e.directives,n=e.operationTypes;return h(["extend schema",h(t," "),f(n)]," ")},ScalarTypeExtension:function(e){return h(["extend scalar",e.name,h(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["extend type",t,m("implements ",h(n," & ")),h(r," "),f(o)]," ")},InterfaceTypeExtension:function(e){var t=e.name,n=e.interfaces,r=e.directives,o=e.fields;return h(["extend interface",t,m("implements ",h(n," & ")),h(r," "),f(o)]," ")},UnionTypeExtension:function(e){var t=e.name,n=e.directives,r=e.types;return h(["extend union",t,h(n," "),r&&0!==r.length?"= "+h(r," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,n=e.directives,r=e.values;return h(["extend enum",t,h(n," "),f(r)]," ")},InputObjectTypeExtension:function(e){var t=e.name,n=e.directives,r=e.fields;return h(["extend input",t,h(n," "),f(r)]," ")}};function d(e){return function(t){return h([t.description,e(t)],"\n")}}function h(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(n))&&void 0!==t?t:""}function f(e){return m("{\n",v(h(e,"\n")),"\n}")}function m(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?e+t+n:""}function v(e){return m("  ",e.replace(/\n/g,"\n  "))}function _(e){return-1!==e.indexOf("\n")}function y(e){return null!=e&&e.some(_)}},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return A}));var r=n(226),o=n(77);function c(source,e){for(var t,n=/\r\n|[\n\r]/g,line=1,r=e+1;(t=n.exec(source.body))&&t.index<e;)line+=1,r=e+1-(t.index+t[0].length);return{line:line,column:r}}function l(e){return d(e.source,c(e.source,e.start))}function d(source,e){var t=source.locationOffset.column-1,body=f(t)+source.body,n=e.line-1,r=source.locationOffset.line-1,o=e.line+r,c=1===e.line?t:0,l=e.column+c,d="".concat(source.name,":").concat(o,":").concat(l,"\n"),m=body.split(/\r\n|[\n\r]/g),v=m[n];if(v.length>120){for(var _=Math.floor(l/80),y=l%80,E=[],i=0;i<v.length;i+=80)E.push(v.slice(i,i+80));return d+h([["".concat(o),E[0]]].concat(E.slice(1,_+1).map((function(e){return["",e]})),[[" ",f(y-1)+"^"],["",E[_+1]]]))}return d+h([["".concat(o-1),m[n-1]],["".concat(o),v],["",f(l-1)+"^"],["".concat(o+1),m[n+1]]])}function h(e){var t=e.filter((function(e){e[0];return void 0!==e[1]})),n=Math.max.apply(Math,t.map((function(e){return e[0].length})));return t.map((function(e){var t,r=e[0],line=e[1];return f(n-(t=r).length)+t+(line?" | "+line:" |")})).join("\n")}function f(e){return Array(e+1).join(" ")}function m(e){return(m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function v(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _(e,t){return!t||"object"!==m(t)&&"function"!=typeof t?y(e):t}function y(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function E(e){var t="function"==typeof Map?new Map:void 0;return(E=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return C(e,arguments,T(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),S(r,e)})(e)}function C(e,t,n){return(C=w()?Reflect.construct:function(e,t,n){var a=[null];a.push.apply(a,t);var r=new(Function.bind.apply(e,a));return n&&S(r,n.prototype),r}).apply(null,arguments)}function w(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function S(e,p){return(S=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e})(e,p)}function T(e){return(T=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var A=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&S(e,t)}(C,e);var t,n,h,f,m,E=(t=C,n=w(),function(){var e,r=T(t);if(n){var o=T(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return _(this,e)});function C(e,t,source,n,path,o,l){var d,h,f,m,v;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,C),v=E.call(this,e);var w,S=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,T=source;!T&&S&&(T=null===(w=S[0].loc)||void 0===w?void 0:w.source);var A,R=n;!R&&S&&(R=S.reduce((function(e,t){return t.loc&&e.push(t.loc.start),e}),[])),R&&0===R.length&&(R=void 0),n&&source?A=n.map((function(e){return c(source,e)})):S&&(A=S.reduce((function(e,t){return t.loc&&e.push(c(t.loc.source,t.loc.start)),e}),[]));var O=l;if(null==O&&null!=o){var I=o.extensions;Object(r.a)(I)&&(O=I)}return Object.defineProperties(y(v),{name:{value:"GraphQLError"},message:{value:e,enumerable:!0,writable:!0},locations:{value:null!==(d=A)&&void 0!==d?d:void 0,enumerable:null!=A},path:{value:null!=path?path:void 0,enumerable:null!=path},nodes:{value:null!=S?S:void 0},source:{value:null!==(h=T)&&void 0!==h?h:void 0},positions:{value:null!==(f=R)&&void 0!==f?f:void 0},originalError:{value:o},extensions:{value:null!==(m=O)&&void 0!==m?m:void 0,enumerable:null!=O}}),null!=o&&o.stack?(Object.defineProperty(y(v),"stack",{value:o.stack,writable:!0,configurable:!0}),_(v)):(Error.captureStackTrace?Error.captureStackTrace(y(v),C):Object.defineProperty(y(v),"stack",{value:Error().stack,writable:!0,configurable:!0}),v)}return h=C,(f=[{key:"toString",value:function(){return function(e){var output=e.message;if(e.nodes)for(var t=0,n=e.nodes;t<n.length;t++){var r=n[t];r.loc&&(output+="\n\n"+l(r.loc))}else if(e.source&&e.locations)for(var o=0,c=e.locations;o<c.length;o++){var h=c[o];output+="\n\n"+d(e.source,h)}return output}(this)}},{key:o.a,get:function(){return"Object"}}])&&v(h.prototype,f),m&&v(h,m),C}(E(Error))},,,,,,,,function(e,t,n){"use strict";var r,o="object"==typeof Reflect?Reflect:null,c=o&&"function"==typeof o.apply?o.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};r=o&&"function"==typeof o.ownKeys?o.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var l=Number.isNaN||function(e){return e!=e};function d(){d.init.call(this)}e.exports=d,e.exports.once=function(e,t){return new Promise((function(n,r){function o(n){e.removeListener(t,c),r(n)}function c(){"function"==typeof e.removeListener&&e.removeListener("error",o),n([].slice.call(arguments))}S(e,t,c,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&S(e,"error",t,n)}(e,o,{once:!0})}))},d.EventEmitter=d,d.prototype._events=void 0,d.prototype._eventsCount=0,d.prototype._maxListeners=void 0;var h=10;function f(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function m(e){return void 0===e._maxListeners?d.defaultMaxListeners:e._maxListeners}function v(e,t,n,r){var o,c,l,d;if(f(n),void 0===(c=e._events)?(c=e._events=Object.create(null),e._eventsCount=0):(void 0!==c.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),c=e._events),l=c[t]),void 0===l)l=c[t]=n,++e._eventsCount;else if("function"==typeof l?l=c[t]=r?[n,l]:[l,n]:r?l.unshift(n):l.push(n),(o=m(e))>0&&l.length>o&&!l.warned){l.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");h.name="MaxListenersExceededWarning",h.emitter=e,h.type=t,h.count=l.length,d=h,console&&console.warn&&console.warn(d)}return e}function _(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function y(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=_.bind(r);return o.listener=n,r.wrapFn=o,o}function E(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?function(e){for(var t=new Array(e.length),i=0;i<t.length;++i)t[i]=e[i].listener||e[i];return t}(o):w(o,o.length)}function C(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function w(e,t){for(var n=new Array(t),i=0;i<t;++i)n[i]=e[i];return n}function S(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function o(c){r.once&&e.removeEventListener(t,o),n(c)}))}}Object.defineProperty(d,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(e){if("number"!=typeof e||e<0||l(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");h=e}}),d.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},d.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||l(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},d.prototype.getMaxListeners=function(){return m(this)},d.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t.push(arguments[i]);var n="error"===e,r=this._events;if(void 0!==r)n=n&&void 0===r.error;else if(!n)return!1;if(n){var o;if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var l=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw l.context=o,l}var d=r[e];if(void 0===d)return!1;if("function"==typeof d)c(d,this,t);else{var h=d.length,f=w(d,h);for(i=0;i<h;++i)c(f[i],this,t)}return!0},d.prototype.addListener=function(e,t){return v(this,e,t,!1)},d.prototype.on=d.prototype.addListener,d.prototype.prependListener=function(e,t){return v(this,e,t,!0)},d.prototype.once=function(e,t){return f(t),this.on(e,y(this,e,t)),this},d.prototype.prependOnceListener=function(e,t){return f(t),this.prependListener(e,y(this,e,t)),this},d.prototype.removeListener=function(e,t){var n,r,o,i,c;if(f(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(o=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){c=n[i].listener,o=i;break}if(o<0)return this;0===o?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,c||t)}return this},d.prototype.off=d.prototype.removeListener,d.prototype.removeAllListeners=function(e){var t,n,i;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var r,o=Object.keys(n);for(i=0;i<o.length;++i)"removeListener"!==(r=o[i])&&this.removeAllListeners(r);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},d.prototype.listeners=function(e){return E(this,e,!0)},d.prototype.rawListeners=function(e){return E(this,e,!1)},d.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):C.call(e,t)},d.prototype.listenerCount=C,d.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}},function(e,t,n){"use strict";var r=n(17).Buffer,o=r.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function c(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(r.isEncoding===o||!o(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=h,this.end=f,t=4;break;case"utf8":this.fillLast=d,t=4;break;case"base64":this.text=m,this.end=v,t=3;break;default:return this.write=_,void(this.end=y)}this.lastNeed=0,this.lastTotal=0,this.lastChar=r.allocUnsafe(t)}function l(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function d(e){var p=this.lastTotal-this.lastNeed,t=function(e,t,p){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==t?t:this.lastNeed<=e.length?(e.copy(this.lastChar,p,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,p,0,e.length),void(this.lastNeed-=e.length))}function h(e,i){if((e.length-i)%2==0){var t=e.toString("utf16le",i);if(t){var n=t.charCodeAt(t.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],t.slice(0,-1)}return t}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",i,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var n=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,n)}return t}function m(e,i){var t=(e.length-i)%3;return 0===t?e.toString("base64",i):(this.lastNeed=3-t,this.lastTotal=3,1===t?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",i,e.length-t))}function v(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function _(e){return e.toString(this.encoding)}function y(e){return e&&e.length?this.write(e):""}t.StringDecoder=c,c.prototype.write=function(e){if(0===e.length)return"";var t,i;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";i=this.lastNeed,this.lastNeed=0}else i=0;return i<e.length?t?t+this.text(e,i):this.text(e,i):t||""},c.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},c.prototype.text=function(e,i){var t=function(e,t,i){var n=t.length-1;if(n<i)return 0;var r=l(t[n]);if(r>=0)return r>0&&(e.lastNeed=r-1),r;if(--n<i||-2===r)return 0;if((r=l(t[n]))>=0)return r>0&&(e.lastNeed=r-2),r;if(--n<i||-2===r)return 0;if((r=l(t[n]))>=0)return r>0&&(2===r?r=0:e.lastNeed=r-3),r;return 0}(this,e,i);if(!this.lastNeed)return e.toString("utf8",i);this.lastTotal=t;var n=e.length-(t-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",i,n)},c.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},function(e,t,n){"use strict";var r=n(212),o=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=v;var c=Object.create(n(183));c.inherits=n(13);var l=n(408),d=n(282);c.inherits(v,l);for(var h=o(d.prototype),f=0;f<h.length;f++){var m=h[f];v.prototype[m]||(v.prototype[m]=d.prototype[m])}function v(e){if(!(this instanceof v))return new v(e);l.call(this,e),d.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",_)}function _(){this.allowHalfOpen||this._writableState.ended||r.nextTick(y,this)}function y(e){e.end()}Object.defineProperty(v.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),v.prototype._destroy=function(e,t){this.push(null),this.end(),r.nextTick(t,e)}},,function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return d}));var r=n(44),o=n(231);function c(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function l(e,t={}){const n="string"==typeof t?t:t.tunnel,o="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${c(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(r.h)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,o)}`}function d(e,t){const n=Object(o.c)(e);if(!n)return"";const r=`${c(n)}embed/error-page/`;let l=`dsn=${Object(o.b)(n)}`;for(const e in t)if("dsn"!==e)if("user"===e){const e=t.user;if(!e)continue;e.name&&(l+=`&name=${encodeURIComponent(e.name)}`),e.email&&(l+=`&email=${encodeURIComponent(e.email)}`)}else l+=`&${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`;return`${r}?${l}`}},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return m}));var r=n(325),o=n(43);const c=Object(o.b)(),l={nowSeconds:()=>Date.now()/1e3};const d=Object(r.b)()?function(){try{return Object(r.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=c;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),h=void 0===d?l:{nowSeconds:()=>(d.timeOrigin+d.now())/1e3},f=l.nowSeconds.bind(l),m=h.nowSeconds.bind(h);let v;(()=>{const{performance:e}=c;if(!e||!e.now)return void(v="none");const t=36e5,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,l=o<t,d=e.timing&&e.timing.navigationStart,h="number"==typeof d?Math.abs(d+n-r):t;l||h<t?o<=h?(v="timeOrigin",e.timeOrigin):v="navigationStart":v="dateNow"})()}).call(this,n(270)(e))},,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(58);n(20);function o(e){return Array.isArray(e)&&e.length>0}function c(e){return e.hasOwnProperty("graphQLErrors")}!function(e){function t(n){var r,c,l=n.graphQLErrors,d=n.clientErrors,h=n.networkError,f=n.errorMessage,m=n.extraInfo,v=e.call(this,f)||this;return v.graphQLErrors=l||[],v.clientErrors=d||[],v.networkError=h||null,v.message=f||(c="",(o((r=v).graphQLErrors)||o(r.clientErrors))&&(r.graphQLErrors||[]).concat(r.clientErrors||[]).forEach((function(e){var t=e?e.message:"Error message not found.";c+=t+"\n"})),r.networkError&&(c+=r.networkError.message+"\n"),c=c.replace(/\n$/,"")),v.extraInfo=m,v.__proto__=t.prototype,v}Object(r.b)(t,e)}(Error)},,,,,function(e,t,n){"use strict";(function(t,r){var o=65536,c=4294967295;var l=n(17).Buffer,d=t.crypto||t.msCrypto;d&&d.getRandomValues?e.exports=function(e,t){if(e>c)throw new RangeError("requested too many random bytes");var n=l.allocUnsafe(e);if(e>0)if(e>o)for(var h=0;h<e;h+=o)d.getRandomValues(n.slice(h,h+o));else d.getRandomValues(n);if("function"==typeof t)return r.nextTick((function(){t(null,n)}));return n}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}}).call(this,n(23),n(42))},function(e,t,n){"use strict";var r={};function o(code,e,t){t||(t=Error);var n=function(t){var n,r;function o(n,r,o){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,o))||this}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(t);n.prototype.name=t.name,n.prototype.code=code,r[code]=n}function c(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(i){return String(i)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,l,d;if("string"==typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))d="The ".concat(e," ").concat(r," ").concat(c(t,"type"));else{var h=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(h," ").concat(r," ").concat(c(t,"type"))}return d+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(400),c=n(404);n(13)(f,o);for(var l=r(c.prototype),d=0;d<l.length;d++){var h=l[d];f.prototype[h]||(f.prototype[h]=c.prototype[h])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),c.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",m)))}function m(){this._writableState.ended||t.nextTick(v,this)}function v(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(42))},function(e,t,n){var r=n(17).Buffer;function o(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}o.prototype.update=function(data,e){"string"==typeof data&&(e=e||"utf8",data=r.from(data,e));for(var t=this._block,n=this._blockSize,o=data.length,c=this._len,l=0;l<o;){for(var d=c%n,h=Math.min(o-l,n-d),i=0;i<h;i++)t[d+i]=data[l+i];l+=h,(c+=h)%n==0&&this._update(t)}return this._len+=o,this},o.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var n=8*this._len;if(n<=4294967295)this._block.writeUInt32BE(n,this._blockSize-4);else{var r=(4294967295&n)>>>0,o=(n-r)/4294967296;this._block.writeUInt32BE(o,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var c=this._hash();return e?c.toString(e):c},o.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=o},function(e,t,n){"use strict";var r={};function o(code,e,t){t||(t=Error);var n=function(t){var n,r;function o(n,r,o){return t.call(this,function(t,n,r){return"string"==typeof e?e:e(t,n,r)}(n,r,o))||this}return r=t,(n=o).prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r,o}(t);n.prototype.name=t.name,n.prototype.code=code,r[code]=n}function c(e,t){if(Array.isArray(e)){var n=e.length;return e=e.map((function(i){return String(i)})),n>2?"one of ".concat(t," ").concat(e.slice(0,n-1).join(", "),", or ")+e[n-1]:2===n?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}o("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(e,t,n){var r,o,l,d;if("string"==typeof t&&(o="not ",t.substr(!l||l<0?0:+l,o.length)===o)?(r="must not be",t=t.replace(/^not /,"")):r="must be",function(e,t,n){return(void 0===n||n>e.length)&&(n=e.length),e.substring(n-t.length,n)===t}(e," argument"))d="The ".concat(e," ").concat(r," ").concat(c(t,"type"));else{var h=function(e,t,n){return"number"!=typeof n&&(n=0),!(n+t.length>e.length)&&-1!==e.indexOf(t,n)}(e,".")?"property":"argument";d='The "'.concat(e,'" ').concat(h," ").concat(r," ").concat(c(t,"type"))}return d+=". Received type ".concat(typeof n)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=r},function(e,t,n){"use strict";(function(t){var r=Object.keys||function(e){var t=[];for(var n in e)t.push(n);return t};e.exports=f;var o=n(429),c=n(433);n(13)(f,o);for(var l=r(c.prototype),d=0;d<l.length;d++){var h=l[d];f.prototype[h]||(f.prototype[h]=c.prototype[h])}function f(e){if(!(this instanceof f))return new f(e);o.call(this,e),c.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",m)))}function m(){this._writableState.ended||t.nextTick(v,this)}function v(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed&&this._writableState.destroyed)},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})}).call(this,n(42))},,,,,,,function(e,t,n){"use strict";var r={name:"NoSsr",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,c=r(),l=c.default;void 0===l&&(l=[]);var d=c.placeholder;return n._isMounted?l:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["no-ssr-placeholder"]},o.placeholder||d):l.length>0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c}));var r,o=n(31);function c(e){return new d((t=>{t(e)}))}function l(e){return new d(((t,n)=>{n(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(r||(r={}));class d{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){d.prototype.__init.call(this),d.prototype.__init2.call(this),d.prototype.__init3.call(this),d.prototype.__init4.call(this),d.prototype.__init5.call(this),d.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new d(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new d(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===r.PENDING&&(Object(o.n)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)}))}}}},,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(98),o=n(83);function c(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=c,c.prototype.update=function(e,t){if(e=r.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var n=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-n,e.length),0===this.pending.length&&(this.pending=null),e=r.join32(e,0,e.length-n,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},c.prototype.digest=function(e){return this.update(this._pad()),o(null===this.pending),this._digest(e)},c.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,n=t-(e+this.padLength)%t,r=new Array(n+this.padLength);r[0]=128;for(var i=1;i<n;i++)r[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)r[i++]=0;r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=e>>>24&255,r[i++]=e>>>16&255,r[i++]=e>>>8&255,r[i++]=255&e}else for(r[i++]=255&e,r[i++]=e>>>8&255,r[i++]=e>>>16&255,r[i++]=e>>>24&255,r[i++]=0,r[i++]=0,r[i++]=0,r[i++]=0,o=8;o<this.padLength;o++)r[i++]=0;return r}},function(e,t,n){"use strict";var r=n(13),o=n(275),c=n(278),l=n(279),d=n(121);function h(e){d.call(this,"digest"),this._hash=e}r(h,d),h.prototype._update=function(data){this._hash.update(data)},h.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new o:"rmd160"===e||"ripemd160"===e?new c:new h(l(e))}},function(e,t,n){(function(e){function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=e.isBuffer}).call(this,n(46).Buffer)},function(e,t,n){(function(t){e.exports=function(a,b){for(var e=Math.min(a.length,b.length),n=new t(e),i=0;i<e;++i)n[i]=a[i]^b[i];return n}}).call(this,n(46).Buffer)},function(e,t,n){"use strict";const r=n(13),o=n(294).Reporter,c=n(292).Buffer;function l(base,e){o.call(this,e),c.isBuffer(base)?(this.base=base,this.offset=0,this.length=base.length):this.error("Input not Buffer")}function d(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return d.isEncoderBuffer(e)||(e=new d(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=c.byteLength(e);else{if(!c.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}r(l,o),t.DecoderBuffer=l,l.isDecoderBuffer=function(data){if(data instanceof l)return!0;return"object"==typeof data&&c.isBuffer(data.base)&&"DecoderBuffer"===data.constructor.name&&"number"==typeof data.offset&&"number"==typeof data.length&&"function"==typeof data.save&&"function"==typeof data.restore&&"function"==typeof data.isEmpty&&"function"==typeof data.readUInt8&&"function"==typeof data.skip&&"function"==typeof data.raw},l.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},l.prototype.restore=function(e){const t=new l(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},l.prototype.isEmpty=function(){return this.offset===this.length},l.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},l.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");const n=new l(this.base);return n._reporterState=this._reporterState,n.offset=this.offset,n.length=this.offset+e,this.offset+=e,n},l.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.EncoderBuffer=d,d.isEncoderBuffer=function(data){if(data instanceof d)return!0;return"object"==typeof data&&"EncoderBuffer"===data.constructor.name&&"number"==typeof data.length&&"function"==typeof data.join},d.prototype.join=function(e,t){return e||(e=c.alloc(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(n){n.join(e,t),t+=n.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):c.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},,,,,function(e,t,n){"use strict";(function(e){var r=n(102);t.a=Object(r.a)((function(){return globalThis}))||Object(r.a)((function(){return window}))||Object(r.a)((function(){return self}))||Object(r.a)((function(){return e}))||Object(r.a)((function(){return Function("return this")()}))}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h}));var r=n(116),o=n(16),c=n(92);const l=[];function d(e){const t=e.defaultIntegrations||[],n=e.integrations;let o;t.forEach((e=>{e.isDefaultInstance=!0})),o=Array.isArray(n)?[...t,...n]:"function"==typeof n?Object(r.c)(n(t)):t;const c=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.keys(t).map((e=>t[e]))}(o),l=function(e,t){for(let i=0;i<e.length;i++)if(!0===t(e[i]))return i;return-1}(c,(e=>"Debug"===e.name));if(-1!==l){const[e]=c.splice(l,1);c.push(e)}return c}function h(e){const t={};return e.forEach((e=>{e&&f(e,t)})),t}function f(e,t){t[e.name]=e,-1===l.indexOf(e.name)&&(e.setupOnce(c.b,o.c),l.push(e.name))}},,function(e,t,n){"use strict";var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.a=r},function(e,t,n){"use strict";(function(e){var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))},c=this&&this.__generator||function(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}},l=this&&this.__spreadArrays||function(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t};Object.defineProperty(t,"__esModule",{value:!0}),t.SubscriptionClient=void 0;var d=void 0!==e?e:"undefined"!=typeof window?window:{},h=d.WebSocket||d.MozWebSocket,f=n(624),m=n(625),v=n(626),_=n(627),y=n(126),E=n(628),C=n(317),w=n(629),S=n(630),T=n(318),A=function(){function e(e,t,n,r){var o=t||{},c=o.connectionCallback,l=void 0===c?void 0:c,d=o.connectionParams,v=void 0===d?{}:d,_=o.minTimeout,y=void 0===_?S.MIN_WS_TIMEOUT:_,E=o.timeout,C=void 0===E?S.WS_TIMEOUT:E,T=o.reconnect,A=void 0!==T&&T,R=o.reconnectionAttempts,O=void 0===R?1/0:R,I=o.lazy,k=void 0!==I&&I,N=o.inactivityTimeout,L=void 0===N?0:N,M=o.wsOptionArguments,x=void 0===M?[]:M;if(this.wsImpl=n||h,!this.wsImpl)throw new Error("Unable to find native implementation, or alternative implementation for WebSocket!");this.wsProtocols=r||w.GRAPHQL_WS,this.connectionCallback=l,this.url=e,this.operations={},this.nextOperationId=0,this.minWsTimeout=y,this.wsTimeout=C,this.unsentMessagesQueue=[],this.reconnect=A,this.reconnecting=!1,this.reconnectionAttempts=O,this.lazy=!!k,this.inactivityTimeout=L,this.closedByUser=!1,this.backoff=new f({jitter:.5}),this.eventEmitter=new m.EventEmitter,this.middlewares=[],this.client=null,this.maxConnectTimeGenerator=this.createMaxConnectTimeGenerator(),this.connectionParams=this.getConnectionParams(v),this.wsOptionArguments=x,this.lazy||this.connect()}return Object.defineProperty(e.prototype,"status",{get:function(){return null===this.client?this.wsImpl.CLOSED:this.client.readyState},enumerable:!1,configurable:!0}),e.prototype.close=function(e,t){void 0===e&&(e=!0),void 0===t&&(t=!0),this.clearInactivityTimeout(),null!==this.client&&(this.closedByUser=t,e&&(this.clearCheckConnectionInterval(),this.clearMaxConnectTimeout(),this.clearTryReconnectTimeout(),this.unsubscribeAll(),this.sendMessage(void 0,T.default.GQL_CONNECTION_TERMINATE,null)),this.client.close(),this.client.onopen=null,this.client.onclose=null,this.client.onerror=null,this.client.onmessage=null,this.client=null,this.eventEmitter.emit("disconnected"),e||this.tryReconnect())},e.prototype.request=function(e){var t,n,r=this.getObserver.bind(this),o=this.executeOperation.bind(this),c=this.unsubscribe.bind(this);return this.clearInactivityTimeout(),(t={})[C.default]=function(){return this},t.subscribe=function(t,l,d){var h=r(t,l,d);return n=o(e,(function(e,t){null===e&&null===t?h.complete&&h.complete():e?h.error&&h.error(e[0]):h.next&&h.next(t)})),{unsubscribe:function(){n&&(c(n),n=null)}}},t},e.prototype.on=function(e,t,n){var r=this.eventEmitter.on(e,t,n);return function(){r.off(e,t,n)}},e.prototype.onConnected=function(e,t){return this.on("connected",e,t)},e.prototype.onConnecting=function(e,t){return this.on("connecting",e,t)},e.prototype.onDisconnected=function(e,t){return this.on("disconnected",e,t)},e.prototype.onReconnected=function(e,t){return this.on("reconnected",e,t)},e.prototype.onReconnecting=function(e,t){return this.on("reconnecting",e,t)},e.prototype.onError=function(e,t){return this.on("error",e,t)},e.prototype.unsubscribeAll=function(){var e=this;Object.keys(this.operations).forEach((function(t){e.unsubscribe(t)}))},e.prototype.applyMiddlewares=function(e){var t=this;return new Promise((function(n,r){var o,c,d;o=l(t.middlewares),c=t,(d=function(t){if(t)r(t);else if(o.length>0){var l=o.shift();l&&l.applyMiddleware.apply(c,[e,d])}else n(e)})()}))},e.prototype.use=function(e){var t=this;return e.map((function(e){if("function"!=typeof e.applyMiddleware)throw new Error("Middleware must implement the applyMiddleware function.");t.middlewares.push(e)})),this},e.prototype.getConnectionParams=function(e){return function(){return new Promise((function(t,n){if("function"==typeof e)try{return t(e.call(null))}catch(e){return n(e)}t(e)}))}},e.prototype.executeOperation=function(e,t){var n=this;null===this.client&&this.connect();var r=this.generateOperationId();return this.operations[r]={options:e,handler:t},this.applyMiddlewares(e).then((function(e){n.checkOperationOptions(e,t),n.operations[r]&&(n.operations[r]={options:e,handler:t},n.sendMessage(r,T.default.GQL_START,e))})).catch((function(e){n.unsubscribe(r),t(n.formatErrors(e))})),r},e.prototype.getObserver=function(e,t,n){return"function"==typeof e?{next:function(t){return e(t)},error:function(e){return t&&t(e)},complete:function(){return n&&n()}}:e},e.prototype.createMaxConnectTimeGenerator=function(){var e=this.minWsTimeout,t=this.wsTimeout;return new f({min:e,max:t,factor:1.2})},e.prototype.clearCheckConnectionInterval=function(){this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnectionIntervalId=null)},e.prototype.clearMaxConnectTimeout=function(){this.maxConnectTimeoutId&&(clearTimeout(this.maxConnectTimeoutId),this.maxConnectTimeoutId=null)},e.prototype.clearTryReconnectTimeout=function(){this.tryReconnectTimeoutId&&(clearTimeout(this.tryReconnectTimeoutId),this.tryReconnectTimeoutId=null)},e.prototype.clearInactivityTimeout=function(){this.inactivityTimeoutId&&(clearTimeout(this.inactivityTimeoutId),this.inactivityTimeoutId=null)},e.prototype.setInactivityTimeout=function(){var e=this;this.inactivityTimeout>0&&0===Object.keys(this.operations).length&&(this.inactivityTimeoutId=setTimeout((function(){0===Object.keys(e.operations).length&&e.close()}),this.inactivityTimeout))},e.prototype.checkOperationOptions=function(e,t){var n=e.query,r=e.variables,o=e.operationName;if(!n)throw new Error("Must provide a query.");if(!t)throw new Error("Must provide an handler.");if(!v.default(n)&&!E.getOperationAST(n,o)||o&&!v.default(o)||r&&!_.default(r))throw new Error("Incorrect option types. query must be a string or a document,`operationName` must be a string, and `variables` must be an object.")},e.prototype.buildMessage=function(e,t,n){return{id:e,type:t,payload:n&&n.query?r(r({},n),{query:"string"==typeof n.query?n.query:y.print(n.query)}):n}},e.prototype.formatErrors=function(e){return Array.isArray(e)?e:e&&e.errors?this.formatErrors(e.errors):e&&e.message?[e]:[{name:"FormatedError",message:"Unknown error",originalError:e}]},e.prototype.sendMessage=function(e,t,n){this.sendMessageRaw(this.buildMessage(e,t,n))},e.prototype.sendMessageRaw=function(e){switch(this.status){case this.wsImpl.OPEN:var t=JSON.stringify(e);try{JSON.parse(t)}catch(t){this.eventEmitter.emit("error",new Error("Message must be JSON-serializable. Got: "+e))}this.client.send(t);break;case this.wsImpl.CONNECTING:this.unsentMessagesQueue.push(e);break;default:this.reconnecting||this.eventEmitter.emit("error",new Error("A message was not sent because socket is not connected, is closing or is already closed. Message was: "+JSON.stringify(e)))}},e.prototype.generateOperationId=function(){return String(++this.nextOperationId)},e.prototype.tryReconnect=function(){var e=this;if(this.reconnect&&!(this.backoff.attempts>=this.reconnectionAttempts)){this.reconnecting||(Object.keys(this.operations).forEach((function(t){e.unsentMessagesQueue.push(e.buildMessage(t,T.default.GQL_START,e.operations[t].options))})),this.reconnecting=!0),this.clearTryReconnectTimeout();var t=this.backoff.duration();this.tryReconnectTimeoutId=setTimeout((function(){e.connect()}),t)}},e.prototype.flushUnsentMessagesQueue=function(){var e=this;this.unsentMessagesQueue.forEach((function(t){e.sendMessageRaw(t)})),this.unsentMessagesQueue=[]},e.prototype.checkConnection=function(){this.wasKeepAliveReceived?this.wasKeepAliveReceived=!1:this.reconnecting||this.close(!1,!0)},e.prototype.checkMaxConnectTimeout=function(){var e=this;this.clearMaxConnectTimeout(),this.maxConnectTimeoutId=setTimeout((function(){e.status!==e.wsImpl.OPEN&&(e.reconnecting=!0,e.close(!1,!0))}),this.maxConnectTimeGenerator.duration())},e.prototype.connect=function(){var e,t=this;this.client=new((e=this.wsImpl).bind.apply(e,l([void 0,this.url,this.wsProtocols],this.wsOptionArguments))),this.checkMaxConnectTimeout(),this.client.onopen=function(){return o(t,void 0,void 0,(function(){var e,t;return c(this,(function(n){switch(n.label){case 0:if(this.status!==this.wsImpl.OPEN)return[3,4];this.clearMaxConnectTimeout(),this.closedByUser=!1,this.eventEmitter.emit(this.reconnecting?"reconnecting":"connecting"),n.label=1;case 1:return n.trys.push([1,3,,4]),[4,this.connectionParams()];case 2:return e=n.sent(),this.sendMessage(void 0,T.default.GQL_CONNECTION_INIT,e),this.flushUnsentMessagesQueue(),[3,4];case 3:return t=n.sent(),this.sendMessage(void 0,T.default.GQL_CONNECTION_ERROR,t),this.flushUnsentMessagesQueue(),[3,4];case 4:return[2]}}))}))},this.client.onclose=function(){t.closedByUser||t.close(!1,!1)},this.client.onerror=function(e){t.eventEmitter.emit("error",e)},this.client.onmessage=function(e){var data=e.data;t.processReceivedData(data)}},e.prototype.processReceivedData=function(e){var t,n;try{n=(t=JSON.parse(e)).id}catch(t){throw new Error("Message must be JSON-parseable. Got: "+e)}if(-1===[T.default.GQL_DATA,T.default.GQL_COMPLETE,T.default.GQL_ERROR].indexOf(t.type)||this.operations[n])switch(t.type){case T.default.GQL_CONNECTION_ERROR:this.connectionCallback&&this.connectionCallback(t.payload);break;case T.default.GQL_CONNECTION_ACK:this.eventEmitter.emit(this.reconnecting?"reconnected":"connected",t.payload),this.reconnecting=!1,this.backoff.reset(),this.maxConnectTimeGenerator.reset(),this.connectionCallback&&this.connectionCallback();break;case T.default.GQL_COMPLETE:var o=this.operations[n].handler;delete this.operations[n],o.call(this,null,null);break;case T.default.GQL_ERROR:this.operations[n].handler(this.formatErrors(t.payload),null),delete this.operations[n];break;case T.default.GQL_DATA:var c=t.payload.errors?r(r({},t.payload),{errors:this.formatErrors(t.payload.errors)}):t.payload;this.operations[n].handler(null,c);break;case T.default.GQL_CONNECTION_KEEP_ALIVE:var l=void 0===this.wasKeepAliveReceived;this.wasKeepAliveReceived=!0,l&&this.checkConnection(),this.checkConnectionIntervalId&&(clearInterval(this.checkConnectionIntervalId),this.checkConnection()),this.checkConnectionIntervalId=setInterval(this.checkConnection.bind(this),this.wsTimeout);break;default:throw new Error("Invalid message type!")}else this.unsubscribe(n)},e.prototype.unsubscribe=function(e){this.operations[e]&&(delete this.operations[e],this.setInactivityTimeout(),this.sendMessage(e,T.default.GQL_STOP,void 0))},e}();t.SubscriptionClient=A}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return oe})),n.d(t,"b",(function(){return ae}));var r,o=n(4),c=n(7),l=n(397),d=n(65),h=n(48),f=n(317),m=n(11),v=n(72);function _(e){return e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(r||(r={}));var y=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(o.__extends)(t,e),t.prototype[f.default]=function(){return this},t.prototype["@@observable"]=function(){return this},t}(d.a);function E(e){return Array.isArray(e)&&e.length>0}var C,w=function(e){function t(n){var r,o,c=n.graphQLErrors,l=n.networkError,d=n.errorMessage,h=n.extraInfo,f=e.call(this,d)||this;return f.graphQLErrors=c||[],f.networkError=l||null,f.message=d||(o="",E((r=f).graphQLErrors)&&r.graphQLErrors.forEach((function(e){var t=e?e.message:"Error message not found.";o+="GraphQL error: "+t+"\n"})),r.networkError&&(o+="Network error: "+r.networkError.message+"\n"),o=o.replace(/\n$/,"")),f.extraInfo=h,f.__proto__=t.prototype,f}return Object(o.__extends)(t,e),t}(Error);!function(e){e[e.normal=1]="normal",e[e.refetch=2]="refetch",e[e.poll=3]="poll"}(C||(C={}));var S=function(e){function t(t){var n=t.queryManager,r=t.options,o=t.shouldSubscribe,l=void 0===o||o,d=e.call(this,(function(e){return d.onSubscribe(e)}))||this;d.observers=new Set,d.subscriptions=new Set,d.isTornDown=!1,d.options=r,d.variables=r.variables||{},d.queryId=n.generateQueryId(),d.shouldSubscribe=l;var h=Object(c.getOperationDefinition)(r.query);return d.queryName=h&&h.name&&h.name.value,d.queryManager=n,d}return Object(o.__extends)(t,e),t.prototype.result=function(){var e=this;return new Promise((function(t,n){var r={next:function(n){t(n),e.observers.delete(r),e.observers.size||e.queryManager.removeQuery(e.queryId),setTimeout((function(){o.unsubscribe()}),0)},error:n},o=e.subscribe(r)}))},t.prototype.currentResult=function(){var e=this.getCurrentResult();return void 0===e.data&&(e.data={}),e},t.prototype.getCurrentResult=function(){if(this.isTornDown){var e=this.lastResult;return{data:!this.lastError&&e&&e.data||void 0,error:this.lastError,loading:!1,networkStatus:r.error}}var t,n,c,l=this.queryManager.getCurrentQueryResult(this),data=l.data,d=l.partial,h=this.queryManager.queryStore.get(this.queryId),f=this.options.fetchPolicy,m="network-only"===f||"no-cache"===f;if(h){var v=h.networkStatus;if(n=h,void 0===(c=this.options.errorPolicy)&&(c="none"),n&&(n.networkError||"none"===c&&E(n.graphQLErrors)))return{data:void 0,loading:!1,networkStatus:v,error:new w({graphQLErrors:h.graphQLErrors,networkError:h.networkError})};h.variables&&(this.options.variables=Object(o.__assign)(Object(o.__assign)({},this.options.variables),h.variables),this.variables=this.options.variables),t={data:data,loading:_(v),networkStatus:v},h.graphQLErrors&&"all"===this.options.errorPolicy&&(t.errors=h.graphQLErrors)}else{var y=m||d&&"cache-only"!==f;t={data:data,loading:y,networkStatus:y?r.loading:r.ready}}return d||this.updateLastResult(Object(o.__assign)(Object(o.__assign)({},t),{stale:!1})),Object(o.__assign)(Object(o.__assign)({},t),{partial:d})},t.prototype.isDifferentFromLastResult=function(e){var t=this.lastResultSnapshot;return!(t&&e&&t.networkStatus===e.networkStatus&&t.stale===e.stale&&Object(l.a)(t.data,e.data))},t.prototype.getLastResult=function(){return this.lastResult},t.prototype.getLastError=function(){return this.lastError},t.prototype.resetLastResults=function(){delete this.lastResult,delete this.lastResultSnapshot,delete this.lastError,this.isTornDown=!1},t.prototype.resetQueryStoreErrors=function(){var e=this.queryManager.queryStore.get(this.queryId);e&&(e.networkError=null,e.graphQLErrors=[])},t.prototype.refetch=function(e){var t=this.options.fetchPolicy;return"cache-only"===t?Promise.reject(new m.a(1)):("no-cache"!==t&&"cache-and-network"!==t&&(t="network-only"),Object(l.a)(this.variables,e)||(this.variables=Object(o.__assign)(Object(o.__assign)({},this.variables),e)),Object(l.a)(this.options.variables,this.variables)||(this.options.variables=Object(o.__assign)(Object(o.__assign)({},this.options.variables),this.variables)),this.queryManager.fetchQuery(this.queryId,Object(o.__assign)(Object(o.__assign)({},this.options),{fetchPolicy:t}),C.refetch))},t.prototype.fetchMore=function(e){var t=this;Object(m.b)(e.updateQuery,2);var n=Object(o.__assign)(Object(o.__assign)({},e.query?e:Object(o.__assign)(Object(o.__assign)(Object(o.__assign)({},this.options),e),{variables:Object(o.__assign)(Object(o.__assign)({},this.variables),e.variables)})),{fetchPolicy:"network-only"}),r=this.queryManager.generateQueryId();return this.queryManager.fetchQuery(r,n,C.normal,this.queryId).then((function(o){return t.updateQuery((function(t){return e.updateQuery(t,{fetchMoreResult:o.data,variables:n.variables})})),t.queryManager.stopQuery(r),o}),(function(e){throw t.queryManager.stopQuery(r),e}))},t.prototype.subscribeToMore=function(e){var t=this,n=this.queryManager.startGraphQLSubscription({query:e.document,variables:e.variables}).subscribe({next:function(n){var r=e.updateQuery;r&&t.updateQuery((function(e,t){var o=t.variables;return r(e,{subscriptionData:n,variables:o})}))},error:function(t){e.onError&&e.onError(t)}});return this.subscriptions.add(n),function(){t.subscriptions.delete(n)&&n.unsubscribe()}},t.prototype.setOptions=function(e){var t=this.options.fetchPolicy;this.options=Object(o.__assign)(Object(o.__assign)({},this.options),e),e.pollInterval?this.startPolling(e.pollInterval):0===e.pollInterval&&this.stopPolling();var n=e.fetchPolicy;return this.setVariables(this.options.variables,t!==n&&("cache-only"===t||"standby"===t||"network-only"===n),e.fetchResults)},t.prototype.setVariables=function(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n=!0),this.isTornDown=!1,e=e||this.variables,!t&&Object(l.a)(e,this.variables)?this.observers.size&&n?this.result():Promise.resolve():(this.variables=this.options.variables=e,this.observers.size?this.queryManager.fetchQuery(this.queryId,this.options):Promise.resolve())},t.prototype.updateQuery=function(e){var t=this.queryManager,n=t.getQueryWithPreviousResult(this.queryId),r=n.previousResult,o=n.variables,l=n.document,d=Object(c.tryFunctionOrLogError)((function(){return e(r,{variables:o})}));d&&(t.dataStore.markUpdateQueryResult(l,o,d),t.broadcastQueries())},t.prototype.stopPolling=function(){this.queryManager.stopPollingQuery(this.queryId),this.options.pollInterval=void 0},t.prototype.startPolling=function(e){R(this),this.options.pollInterval=e,this.queryManager.startPollingQuery(this.options,this.queryId)},t.prototype.updateLastResult=function(e){var t=this.lastResult;return this.lastResult=e,this.lastResultSnapshot=this.queryManager.assumeImmutableResults?e:Object(c.cloneDeep)(e),t},t.prototype.onSubscribe=function(e){var t=this;try{var n=e._subscription._observer;n&&!n.error&&(n.error=T)}catch(e){}var r=!this.observers.size;return this.observers.add(e),e.next&&this.lastResult&&e.next(this.lastResult),e.error&&this.lastError&&e.error(this.lastError),r&&this.setUpQuery(),function(){t.observers.delete(e)&&!t.observers.size&&t.tearDownQuery()}},t.prototype.setUpQuery=function(){var e=this,t=this.queryManager,n=this.queryId;this.shouldSubscribe&&t.addObservableQuery(n,this),this.options.pollInterval&&(R(this),t.startPollingQuery(this.options,n));var c=function(t){e.updateLastResult(Object(o.__assign)(Object(o.__assign)({},e.lastResult),{errors:t.graphQLErrors,networkStatus:r.error,loading:!1})),A(e.observers,"error",e.lastError=t)};t.observeQuery(n,this.options,{next:function(n){if(e.lastError||e.isDifferentFromLastResult(n)){var r=e.updateLastResult(n),o=e.options,c=o.query,d=o.variables,h=o.fetchPolicy;t.transform(c).hasClientExports?t.getLocalState().addExportedVariables(c,d).then((function(o){var d=e.variables;e.variables=e.options.variables=o,!n.loading&&r&&"cache-only"!==h&&t.transform(c).serverQuery&&!Object(l.a)(d,o)?e.refetch():A(e.observers,"next",n)})):A(e.observers,"next",n)}},error:c}).catch(c)},t.prototype.tearDownQuery=function(){var e=this.queryManager;this.isTornDown=!0,e.stopPollingQuery(this.queryId),this.subscriptions.forEach((function(sub){return sub.unsubscribe()})),this.subscriptions.clear(),e.removeObservableQuery(this.queryId),e.stopQuery(this.queryId),this.observers.clear()},t}(y);function T(e){}function A(e,t,n){var r=[];e.forEach((function(e){return e[t]&&r.push(e)})),r.forEach((function(e){return e[t](n)}))}function R(e){var t=e.options.fetchPolicy;Object(m.b)("cache-first"!==t&&"cache-only"!==t,3)}var O=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initMutation=function(e,t,n){this.store[e]={mutation:t,variables:n||{},loading:!0,error:null}},e.prototype.markMutationError=function(e,t){var n=this.store[e];n&&(n.loading=!1,n.error=t)},e.prototype.markMutationResult=function(e){var t=this.store[e];t&&(t.loading=!1,t.error=null)},e.prototype.reset=function(){this.store={}},e}(),I=function(){function e(){this.store={}}return e.prototype.getStore=function(){return this.store},e.prototype.get=function(e){return this.store[e]},e.prototype.initQuery=function(e){var t=this.store[e.queryId];Object(m.b)(!t||t.document===e.document||Object(l.a)(t.document,e.document),19);var n,o=!1,c=null;e.storePreviousVariables&&t&&t.networkStatus!==r.loading&&(Object(l.a)(t.variables,e.variables)||(o=!0,c=t.variables)),n=o?r.setVariables:e.isPoll?r.poll:e.isRefetch?r.refetch:r.loading;var d=[];t&&t.graphQLErrors&&(d=t.graphQLErrors),this.store[e.queryId]={document:e.document,variables:e.variables,previousVariables:c,networkError:null,graphQLErrors:d,networkStatus:n,metadata:e.metadata},"string"==typeof e.fetchMoreForQueryId&&this.store[e.fetchMoreForQueryId]&&(this.store[e.fetchMoreForQueryId].networkStatus=r.fetchMore)},e.prototype.markQueryResult=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=null,this.store[e].graphQLErrors=E(t.errors)?t.errors:[],this.store[e].previousVariables=null,this.store[e].networkStatus=r.ready,"string"==typeof n&&this.store[n]&&(this.store[n].networkStatus=r.ready))},e.prototype.markQueryError=function(e,t,n){this.store&&this.store[e]&&(this.store[e].networkError=t,this.store[e].networkStatus=r.error,"string"==typeof n&&this.markQueryResultClient(n,!0))},e.prototype.markQueryResultClient=function(e,t){var n=this.store&&this.store[e];n&&(n.networkError=null,n.previousVariables=null,t&&(n.networkStatus=r.ready))},e.prototype.stopQuery=function(e){delete this.store[e]},e.prototype.reset=function(e){var t=this;Object.keys(this.store).forEach((function(n){e.indexOf(n)<0?t.stopQuery(n):t.store[n].networkStatus=r.loading}))},e}();var k=function(){function e(e){var t=e.cache,n=e.client,r=e.resolvers,o=e.fragmentMatcher;this.cache=t,n&&(this.client=n),r&&this.addResolvers(r),o&&this.setFragmentMatcher(o)}return e.prototype.addResolvers=function(e){var t=this;this.resolvers=this.resolvers||{},Array.isArray(e)?e.forEach((function(e){t.resolvers=Object(c.mergeDeep)(t.resolvers,e)})):this.resolvers=Object(c.mergeDeep)(this.resolvers,e)},e.prototype.setResolvers=function(e){this.resolvers={},this.addResolvers(e)},e.prototype.getResolvers=function(){return this.resolvers||{}},e.prototype.runResolvers=function(e){var t=e.document,n=e.remoteResult,r=e.context,c=e.variables,l=e.onlyRunForcedResolvers,d=void 0!==l&&l;return Object(o.__awaiter)(this,void 0,void 0,(function(){return Object(o.__generator)(this,(function(e){return t?[2,this.resolveDocument(t,n.data,r,c,this.fragmentMatcher,d).then((function(e){return Object(o.__assign)(Object(o.__assign)({},n),{data:e.result})}))]:[2,n]}))}))},e.prototype.setFragmentMatcher=function(e){this.fragmentMatcher=e},e.prototype.getFragmentMatcher=function(){return this.fragmentMatcher},e.prototype.clientQuery=function(e){return Object(c.hasDirectives)(["client"],e)&&this.resolvers?e:null},e.prototype.serverQuery=function(e){return this.resolvers?Object(c.removeClientSetsFromDocument)(e):e},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.cache;return Object(o.__assign)(Object(o.__assign)({},e),{cache:t,getCacheKey:function(e){if(t.config)return t.config.dataIdFromObject(e);Object(m.b)(!1,6)}})},e.prototype.addExportedVariables=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),Object(o.__awaiter)(this,void 0,void 0,(function(){return Object(o.__generator)(this,(function(r){return e?[2,this.resolveDocument(e,this.buildRootValueFromCache(e,t)||{},this.prepareContext(n),t).then((function(data){return Object(o.__assign)(Object(o.__assign)({},t),data.exportedVariables)}))]:[2,Object(o.__assign)({},t)]}))}))},e.prototype.shouldForceResolvers=function(e){var t=!1;return Object(v.b)(e,{Directive:{enter:function(e){if("client"===e.name.value&&e.arguments&&(t=e.arguments.some((function(e){return"always"===e.name.value&&"BooleanValue"===e.value.kind&&!0===e.value.value}))))return v.a}}}),t},e.prototype.buildRootValueFromCache=function(e,t){return this.cache.diff({query:Object(c.buildQueryFromSelectionSet)(e),variables:t,returnPartialData:!0,optimistic:!1}).result},e.prototype.resolveDocument=function(e,t,n,r,l,d){return void 0===n&&(n={}),void 0===r&&(r={}),void 0===l&&(l=function(){return!0}),void 0===d&&(d=!1),Object(o.__awaiter)(this,void 0,void 0,(function(){var h,f,m,v,_,y,E,C,w;return Object(o.__generator)(this,(function(S){var T;return h=Object(c.getMainDefinition)(e),f=Object(c.getFragmentDefinitions)(e),m=Object(c.createFragmentMap)(f),v=h.operation,_=v?(T=v).charAt(0).toUpperCase()+T.slice(1):"Query",E=(y=this).cache,C=y.client,w={fragmentMap:m,context:Object(o.__assign)(Object(o.__assign)({},n),{cache:E,client:C}),variables:r,fragmentMatcher:l,defaultOperationType:_,exportedVariables:{},onlyRunForcedResolvers:d},[2,this.resolveSelectionSet(h.selectionSet,t,w).then((function(e){return{result:e,exportedVariables:w.exportedVariables}}))]}))}))},e.prototype.resolveSelectionSet=function(e,t,n){return Object(o.__awaiter)(this,void 0,void 0,(function(){var r,l,d,h,f,v=this;return Object(o.__generator)(this,(function(_){return r=n.fragmentMap,l=n.context,d=n.variables,h=[t],f=function(e){return Object(o.__awaiter)(v,void 0,void 0,(function(){var f,v;return Object(o.__generator)(this,(function(o){return Object(c.shouldInclude)(e,d)?Object(c.isField)(e)?[2,this.resolveField(e,t,n).then((function(t){var n;void 0!==t&&h.push(((n={})[Object(c.resultKeyNameFromField)(e)]=t,n))}))]:(Object(c.isInlineFragment)(e)?f=e:(f=r[e.name.value],Object(m.b)(f,7)),f&&f.typeCondition&&(v=f.typeCondition.name.value,n.fragmentMatcher(t,v,l))?[2,this.resolveSelectionSet(f.selectionSet,t,n).then((function(e){h.push(e)}))]:[2]):[2]}))}))},[2,Promise.all(e.selections.map(f)).then((function(){return Object(c.mergeDeepArray)(h)}))]}))}))},e.prototype.resolveField=function(e,t,n){return Object(o.__awaiter)(this,void 0,void 0,(function(){var r,l,d,h,f,m,v,_,y,E=this;return Object(o.__generator)(this,(function(o){return r=n.variables,l=e.name.value,d=Object(c.resultKeyNameFromField)(e),h=l!==d,f=t[d]||t[l],m=Promise.resolve(f),n.onlyRunForcedResolvers&&!this.shouldForceResolvers(e)||(v=t.__typename||n.defaultOperationType,(_=this.resolvers&&this.resolvers[v])&&(y=_[h?l:d])&&(m=Promise.resolve(y(t,Object(c.argumentsObjectFromField)(e,r),n.context,{field:e,fragmentMap:n.fragmentMap})))),[2,m.then((function(t){return void 0===t&&(t=f),e.directives&&e.directives.forEach((function(e){"export"===e.name.value&&e.arguments&&e.arguments.forEach((function(e){"as"===e.name.value&&"StringValue"===e.value.kind&&(n.exportedVariables[e.value.value]=t)}))})),e.selectionSet?null==t?t:Array.isArray(t)?E.resolveSubSelectedArray(e,t,n):e.selectionSet?E.resolveSelectionSet(e.selectionSet,t,n):void 0:t}))]}))}))},e.prototype.resolveSubSelectedArray=function(e,t,n){var r=this;return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?r.resolveSubSelectedArray(e,t,n):e.selectionSet?r.resolveSelectionSet(e.selectionSet,t,n):void 0})))},e}();function N(e){var t=new Set,sub=null;return new y((function(n){return t.add(n),sub=sub||e.subscribe({next:function(e){t.forEach((function(t){return t.next&&t.next(e)}))},error:function(e){t.forEach((function(t){return t.error&&t.error(e)}))},complete:function(){t.forEach((function(e){return e.complete&&e.complete()}))}}),function(){t.delete(n)&&!t.size&&sub&&(sub.unsubscribe(),sub=null)}}))}var L=Object.prototype.hasOwnProperty,M=function(){function e(e){var link=e.link,t=e.queryDeduplication,n=void 0!==t&&t,r=e.store,o=e.onBroadcast,l=void 0===o?function(){}:o,d=e.ssrMode,h=void 0!==d&&d,f=e.clientAwareness,m=void 0===f?{}:f,v=e.localState,_=e.assumeImmutableResults;this.mutationStore=new O,this.queryStore=new I,this.clientAwareness={},this.idCounter=1,this.queries=new Map,this.fetchQueryRejectFns=new Map,this.transformCache=new(c.canUseWeakMap?WeakMap:Map),this.inFlightLinkObservables=new Map,this.pollingInfoByQueryId=new Map,this.link=link,this.queryDeduplication=n,this.dataStore=r,this.onBroadcast=l,this.clientAwareness=m,this.localState=v||new k({cache:r.getCache()}),this.ssrMode=h,this.assumeImmutableResults=!!_}return e.prototype.stop=function(){var e=this;this.queries.forEach((function(t,n){e.stopQueryNoBroadcast(n)})),this.fetchQueryRejectFns.forEach((function(e){e(new m.a(8))}))},e.prototype.mutate=function(e){var t=e.mutation,n=e.variables,r=e.optimisticResponse,l=e.updateQueries,d=e.refetchQueries,h=void 0===d?[]:d,f=e.awaitRefetchQueries,v=void 0!==f&&f,_=e.update,y=e.errorPolicy,C=void 0===y?"none":y,S=e.fetchPolicy,T=e.context,A=void 0===T?{}:T;return Object(o.__awaiter)(this,void 0,void 0,(function(){var e,d,f,y=this;return Object(o.__generator)(this,(function(T){switch(T.label){case 0:return Object(m.b)(t,9),Object(m.b)(!S||"no-cache"===S,10),e=this.generateQueryId(),t=this.transform(t).document,this.setQuery(e,(function(){return{document:t}})),n=this.getVariables(t,n),this.transform(t).hasClientExports?[4,this.localState.addExportedVariables(t,n,A)]:[3,2];case 1:n=T.sent(),T.label=2;case 2:return d=function(){var e={};return l&&y.queries.forEach((function(t,n){var r=t.observableQuery;if(r){var o=r.queryName;o&&L.call(l,o)&&(e[n]={updater:l[o],query:y.queryStore.get(n)})}})),e},this.mutationStore.initMutation(e,t,n),this.dataStore.markMutationInit({mutationId:e,document:t,variables:n,updateQueries:d(),update:_,optimisticResponse:r}),this.broadcastQueries(),f=this,[2,new Promise((function(l,m){var y,T;f.getObservableFromLink(t,Object(o.__assign)(Object(o.__assign)({},A),{optimisticResponse:r}),n,!1).subscribe({next:function(r){Object(c.graphQLResultHasError)(r)&&"none"===C?T=new w({graphQLErrors:r.errors}):(f.mutationStore.markMutationResult(e),"no-cache"!==S&&f.dataStore.markMutationResult({mutationId:e,result:r,document:t,variables:n,updateQueries:d(),update:_}),y=r)},error:function(t){f.mutationStore.markMutationError(e,t),f.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),f.broadcastQueries(),f.setQuery(e,(function(){return{document:null}})),m(new w({networkError:t}))},complete:function(){if(T&&f.mutationStore.markMutationError(e,T),f.dataStore.markMutationComplete({mutationId:e,optimisticResponse:r}),f.broadcastQueries(),T)m(T);else{"function"==typeof h&&(h=h(y));var t=[];E(h)&&h.forEach((function(e){if("string"==typeof e)f.queries.forEach((function(n){var r=n.observableQuery;r&&r.queryName===e&&t.push(r.refetch())}));else{var n={query:e.query,variables:e.variables,fetchPolicy:"network-only"};e.context&&(n.context=e.context),t.push(f.query(n))}})),Promise.all(v?t:[]).then((function(){f.setQuery(e,(function(){return{document:null}})),"ignore"===C&&y&&Object(c.graphQLResultHasError)(y)&&delete y.errors,l(y)}))}}})}))]}}))}))},e.prototype.fetchQuery=function(e,t,n,r){return Object(o.__awaiter)(this,void 0,void 0,(function(){var l,d,h,f,m,v,_,y,E,S,T,A,R,O,I,k,N,L,M=this;return Object(o.__generator)(this,(function(x){switch(x.label){case 0:return l=t.metadata,d=void 0===l?null:l,h=t.fetchPolicy,f=void 0===h?"cache-first":h,m=t.context,v=void 0===m?{}:m,_=this.transform(t.query).document,y=this.getVariables(_,t.variables),this.transform(_).hasClientExports?[4,this.localState.addExportedVariables(_,y,v)]:[3,2];case 1:y=x.sent(),x.label=2;case 2:if(t=Object(o.__assign)(Object(o.__assign)({},t),{variables:y}),T=S="network-only"===f||"no-cache"===f,S||(A=this.dataStore.getCache().diff({query:_,variables:y,returnPartialData:!0,optimistic:!1}),R=A.complete,O=A.result,T=!R||"cache-and-network"===f,E=O),I=T&&"cache-only"!==f&&"standby"!==f,Object(c.hasDirectives)(["live"],_)&&(I=!0),k=this.idCounter++,N="no-cache"!==f?this.updateQueryWatch(e,_,t):void 0,this.setQuery(e,(function(){return{document:_,lastRequestId:k,invalidated:!0,cancel:N}})),this.invalidate(r),this.queryStore.initQuery({queryId:e,document:_,storePreviousVariables:I,variables:y,isPoll:n===C.poll,isRefetch:n===C.refetch,metadata:d,fetchMoreForQueryId:r}),this.broadcastQueries(),I){if(L=this.fetchRequest({requestId:k,queryId:e,document:_,options:t,fetchMoreForQueryId:r}).catch((function(t){throw t.hasOwnProperty("graphQLErrors")?t:(k>=M.getQuery(e).lastRequestId&&(M.queryStore.markQueryError(e,t,r),M.invalidate(e),M.invalidate(r),M.broadcastQueries()),new w({networkError:t}))})),"cache-and-network"!==f)return[2,L];L.catch((function(){}))}return this.queryStore.markQueryResultClient(e,!I),this.invalidate(e),this.invalidate(r),this.transform(_).hasForcedResolvers?[2,this.localState.runResolvers({document:_,remoteResult:{data:E},context:v,variables:y,onlyRunForcedResolvers:!0}).then((function(n){return M.markQueryResult(e,n,t,r),M.broadcastQueries(),n}))]:(this.broadcastQueries(),[2,{data:E}])}}))}))},e.prototype.markQueryResult=function(e,t,n,r){var o=n.fetchPolicy,c=n.variables,l=n.errorPolicy;"no-cache"===o?this.setQuery(e,(function(){return{newData:{result:t.data,complete:!0}}})):this.dataStore.markQueryResult(t,this.getQuery(e).document,c,r,"ignore"===l||"all"===l)},e.prototype.queryListenerForObserver=function(e,t,n){var r=this;function o(e,t){if(n[e])try{n[e](t)}catch(e){}}return function(n,c){if(r.invalidate(e,!1),n){var l=r.getQuery(e),d=l.observableQuery,h=l.document,f=d?d.options.fetchPolicy:t.fetchPolicy;if("standby"!==f){var m=_(n.networkStatus),v=d&&d.getLastResult(),y=!(!v||v.networkStatus===n.networkStatus),C=t.returnPartialData||!c&&n.previousVariables||y&&t.notifyOnNetworkStatusChange||"cache-only"===f||"cache-and-network"===f;if(!m||C){var S=E(n.graphQLErrors),T=d&&d.options.errorPolicy||t.errorPolicy||"none";if("none"===T&&S||n.networkError)return o("error",new w({graphQLErrors:n.graphQLErrors,networkError:n.networkError}));try{var data=void 0,A=void 0;if(c)"no-cache"!==f&&"network-only"!==f&&r.setQuery(e,(function(){return{newData:null}})),data=c.result,A=!c.complete;else{var R=d&&d.getLastError(),O="none"!==T&&(R&&R.graphQLErrors)!==n.graphQLErrors;if(v&&v.data&&!O)data=v.data,A=!1;else{var I=r.dataStore.getCache().diff({query:h,variables:n.previousVariables||n.variables,returnPartialData:!0,optimistic:!0});data=I.result,A=!I.complete}}var k=A&&!(t.returnPartialData||"cache-only"===f),N={data:k?v&&v.data:data,loading:m,networkStatus:n.networkStatus,stale:k};"all"===T&&S&&(N.errors=n.graphQLErrors),o("next",N)}catch(e){o("error",new w({networkError:e}))}}}}}},e.prototype.transform=function(e){var t=this.transformCache;if(!t.has(e)){var n=this.dataStore.getCache(),r=n.transformDocument(e),o=Object(c.removeConnectionDirectiveFromDocument)(n.transformForLink(r)),l=this.localState.clientQuery(r),d=this.localState.serverQuery(o),h={document:r,hasClientExports:Object(c.hasClientExports)(r),hasForcedResolvers:this.localState.shouldForceResolvers(r),clientQuery:l,serverQuery:d,defaultVars:Object(c.getDefaultValues)(Object(c.getOperationDefinition)(r))},f=function(e){e&&!t.has(e)&&t.set(e,h)};f(e),f(r),f(l),f(d)}return t.get(e)},e.prototype.getVariables=function(e,t){return Object(o.__assign)(Object(o.__assign)({},this.transform(e).defaultVars),t)},e.prototype.watchQuery=function(e,t){void 0===t&&(t=!0),Object(m.b)("standby"!==e.fetchPolicy,11),e.variables=this.getVariables(e.query,e.variables),void 0===e.notifyOnNetworkStatusChange&&(e.notifyOnNetworkStatusChange=!1);var n=Object(o.__assign)({},e);return new S({queryManager:this,options:n,shouldSubscribe:t})},e.prototype.query=function(e){var t=this;return Object(m.b)(e.query,12),Object(m.b)("Document"===e.query.kind,13),Object(m.b)(!e.returnPartialData,14),Object(m.b)(!e.pollInterval,15),new Promise((function(n,r){var o=t.watchQuery(e,!1);t.fetchQueryRejectFns.set("query:"+o.queryId,r),o.result().then(n,r).then((function(){return t.fetchQueryRejectFns.delete("query:"+o.queryId)}))}))},e.prototype.generateQueryId=function(){return String(this.idCounter++)},e.prototype.stopQueryInStore=function(e){this.stopQueryInStoreNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryInStoreNoBroadcast=function(e){this.stopPollingQuery(e),this.queryStore.stopQuery(e),this.invalidate(e)},e.prototype.addQueryListener=function(e,t){this.setQuery(e,(function(e){return e.listeners.add(t),{invalidated:!1}}))},e.prototype.updateQueryWatch=function(e,t,n){var r=this,o=this.getQuery(e).cancel;o&&o();return this.dataStore.getCache().watch({query:t,variables:n.variables,optimistic:!0,previousResult:function(){var t=null,n=r.getQuery(e).observableQuery;if(n){var o=n.getLastResult();o&&(t=o.data)}return t},callback:function(t){r.setQuery(e,(function(){return{invalidated:!0,newData:t}}))}})},e.prototype.addObservableQuery=function(e,t){this.setQuery(e,(function(){return{observableQuery:t}}))},e.prototype.removeObservableQuery=function(e){var t=this.getQuery(e).cancel;this.setQuery(e,(function(){return{observableQuery:null}})),t&&t()},e.prototype.clearStore=function(){this.fetchQueryRejectFns.forEach((function(e){e(new m.a(16))}));var e=[];return this.queries.forEach((function(t,n){t.observableQuery&&e.push(n)})),this.queryStore.reset(e),this.mutationStore.reset(),this.dataStore.reset()},e.prototype.resetStore=function(){var e=this;return this.clearStore().then((function(){return e.reFetchObservableQueries()}))},e.prototype.reFetchObservableQueries=function(e){var t=this;void 0===e&&(e=!1);var n=[];return this.queries.forEach((function(r,o){var c=r.observableQuery;if(c){var l=c.options.fetchPolicy;c.resetLastResults(),"cache-only"===l||!e&&"standby"===l||n.push(c.refetch()),t.setQuery(o,(function(){return{newData:null}})),t.invalidate(o)}})),this.broadcastQueries(),Promise.all(n)},e.prototype.observeQuery=function(e,t,n){return this.addQueryListener(e,this.queryListenerForObserver(e,t,n)),this.fetchQuery(e,t)},e.prototype.startQuery=function(e,t,n){return this.addQueryListener(e,n),this.fetchQuery(e,t).catch((function(){})),e},e.prototype.startGraphQLSubscription=function(e){var t=this,n=e.query,r=e.fetchPolicy,o=e.variables;n=this.transform(n).document,o=this.getVariables(n,o);var l=function(e){return t.getObservableFromLink(n,{},e,!1).map((function(o){if(r&&"no-cache"===r||(t.dataStore.markSubscriptionResult(o,n,e),t.broadcastQueries()),Object(c.graphQLResultHasError)(o))throw new w({graphQLErrors:o.errors});return o}))};if(this.transform(n).hasClientExports){var d=this.localState.addExportedVariables(n,o).then(l);return new y((function(e){var sub=null;return d.then((function(t){return sub=t.subscribe(e)}),e.error),function(){return sub&&sub.unsubscribe()}}))}return l(o)},e.prototype.stopQuery=function(e){this.stopQueryNoBroadcast(e),this.broadcastQueries()},e.prototype.stopQueryNoBroadcast=function(e){this.stopQueryInStoreNoBroadcast(e),this.removeQuery(e)},e.prototype.removeQuery=function(e){this.fetchQueryRejectFns.delete("query:"+e),this.fetchQueryRejectFns.delete("fetchRequest:"+e),this.getQuery(e).subscriptions.forEach((function(e){return e.unsubscribe()})),this.queries.delete(e)},e.prototype.getCurrentQueryResult=function(e,t){void 0===t&&(t=!0);var n=e.options,r=n.variables,o=n.query,c=n.fetchPolicy,l=n.returnPartialData,d=e.getLastResult(),h=this.getQuery(e.queryId).newData;if(h&&h.complete)return{data:h.result,partial:!1};if("no-cache"===c||"network-only"===c)return{data:void 0,partial:!1};var f=this.dataStore.getCache().diff({query:o,variables:r,previousResult:d?d.data:void 0,returnPartialData:!0,optimistic:t}),m=f.result,v=f.complete;return{data:v||l?m:void 0,partial:!v}},e.prototype.getQueryWithPreviousResult=function(e){var t;if("string"==typeof e){var n=this.getQuery(e).observableQuery;Object(m.b)(n,17),t=n}else t=e;var r=t.options,o=r.variables,c=r.query;return{previousResult:this.getCurrentQueryResult(t,!1).data,variables:o,document:c}},e.prototype.broadcastQueries=function(){var e=this;this.onBroadcast(),this.queries.forEach((function(t,n){t.invalidated&&t.listeners.forEach((function(r){r&&r(e.queryStore.get(n),t.newData)}))}))},e.prototype.getLocalState=function(){return this.localState},e.prototype.getObservableFromLink=function(e,t,n,r){var l,d=this;void 0===r&&(r=this.queryDeduplication);var f=this.transform(e).serverQuery;if(f){var m=this.inFlightLinkObservables,link=this.link,v={query:f,variables:n,operationName:Object(c.getOperationName)(f)||void 0,context:this.prepareContext(Object(o.__assign)(Object(o.__assign)({},t),{forceFetch:!r}))};if(t=v.context,r){var _=m.get(f)||new Map;m.set(f,_);var E=JSON.stringify(n);if(!(l=_.get(E))){_.set(E,l=N(Object(h.execute)(link,v)));var C=function(){_.delete(E),_.size||m.delete(f),w.unsubscribe()},w=l.subscribe({next:C,error:C,complete:C})}}else l=N(Object(h.execute)(link,v))}else l=y.of({data:{}}),t=this.prepareContext(t);var S=this.transform(e).clientQuery;return S&&(l=function(e,t){return new y((function(n){var r=n.next,o=n.error,c=n.complete,l=0,d=!1,h={next:function(e){++l,new Promise((function(n){n(t(e))})).then((function(e){--l,r&&r.call(n,e),d&&h.complete()}),(function(e){--l,o&&o.call(n,e)}))},error:function(e){o&&o.call(n,e)},complete:function(){d=!0,l||c&&c.call(n)}},sub=e.subscribe(h);return function(){return sub.unsubscribe()}}))}(l,(function(e){return d.localState.runResolvers({document:S,remoteResult:e,context:t,variables:n})}))),l},e.prototype.fetchRequest=function(e){var t,n,o=this,c=e.requestId,l=e.queryId,d=e.document,h=e.options,f=e.fetchMoreForQueryId,m=h.variables,v=h.errorPolicy,_=void 0===v?"none":v,y=h.fetchPolicy;return new Promise((function(e,v){var C=o.getObservableFromLink(d,h.context,m),S="fetchRequest:"+l;o.fetchQueryRejectFns.set(S,v);var T=function(){o.fetchQueryRejectFns.delete(S),o.setQuery(l,(function(e){e.subscriptions.delete(A)}))},A=C.map((function(e){if(c>=o.getQuery(l).lastRequestId&&(o.markQueryResult(l,e,h,f),o.queryStore.markQueryResult(l,e,f),o.invalidate(l),o.invalidate(f),o.broadcastQueries()),"none"===_&&E(e.errors))return v(new w({graphQLErrors:e.errors}));if("all"===_&&(n=e.errors),f||"no-cache"===y)t=e.data;else{var r=o.dataStore.getCache().diff({variables:m,query:d,optimistic:!1,returnPartialData:!0}),C=r.result;(r.complete||h.returnPartialData)&&(t=C)}})).subscribe({error:function(e){T(),v(e)},complete:function(){T(),e({data:t,errors:n,loading:!1,networkStatus:r.ready,stale:!1})}});o.setQuery(l,(function(e){e.subscriptions.add(A)}))}))},e.prototype.getQuery=function(e){return this.queries.get(e)||{listeners:new Set,invalidated:!1,document:null,newData:null,lastRequestId:1,observableQuery:null,subscriptions:new Set}},e.prototype.setQuery=function(e,t){var n=this.getQuery(e),r=Object(o.__assign)(Object(o.__assign)({},n),t(n));this.queries.set(e,r)},e.prototype.invalidate=function(e,t){void 0===t&&(t=!0),e&&this.setQuery(e,(function(){return{invalidated:t}}))},e.prototype.prepareContext=function(e){void 0===e&&(e={});var t=this.localState.prepareContext(e);return Object(o.__assign)(Object(o.__assign)({},t),{clientAwareness:this.clientAwareness})},e.prototype.checkInFlight=function(e){var t=this.queryStore.get(e);return t&&t.networkStatus!==r.ready&&t.networkStatus!==r.error},e.prototype.startPollingQuery=function(e,t,n){var r=this,c=e.pollInterval;if(Object(m.b)(c,18),!this.ssrMode){var l=this.pollingInfoByQueryId.get(t);l||this.pollingInfoByQueryId.set(t,l={}),l.interval=c,l.options=Object(o.__assign)(Object(o.__assign)({},e),{fetchPolicy:"network-only"});var d=function(){var e=r.pollingInfoByQueryId.get(t);e&&(r.checkInFlight(t)?h():r.fetchQuery(t,e.options,C.poll).then(h,h))},h=function(){var e=r.pollingInfoByQueryId.get(t);e&&(clearTimeout(e.timeout),e.timeout=setTimeout(d,e.interval))};n&&this.addQueryListener(t,n),h()}return t},e.prototype.stopPollingQuery=function(e){this.pollingInfoByQueryId.delete(e)},e}(),x=function(){function e(e){this.cache=e}return e.prototype.getCache=function(){return this.cache},e.prototype.markQueryResult=function(e,t,n,r,o){void 0===o&&(o=!1);var l=!Object(c.graphQLResultHasError)(e);o&&Object(c.graphQLResultHasError)(e)&&e.data&&(l=!0),!r&&l&&this.cache.write({result:e.data,dataId:"ROOT_QUERY",query:t,variables:n})},e.prototype.markSubscriptionResult=function(e,t,n){Object(c.graphQLResultHasError)(e)||this.cache.write({result:e.data,dataId:"ROOT_SUBSCRIPTION",query:t,variables:n})},e.prototype.markMutationInit=function(e){var t,n=this;e.optimisticResponse&&(t="function"==typeof e.optimisticResponse?e.optimisticResponse(e.variables):e.optimisticResponse,this.cache.recordOptimisticTransaction((function(r){var o=n.cache;n.cache=r;try{n.markMutationResult({mutationId:e.mutationId,result:{data:t},document:e.document,variables:e.variables,updateQueries:e.updateQueries,update:e.update})}finally{n.cache=o}}),e.mutationId))},e.prototype.markMutationResult=function(e){var t=this;if(!Object(c.graphQLResultHasError)(e.result)){var n=[{result:e.result.data,dataId:"ROOT_MUTATION",query:e.document,variables:e.variables}],r=e.updateQueries;r&&Object.keys(r).forEach((function(o){var l=r[o],d=l.query,h=l.updater,f=t.cache.diff({query:d.document,variables:d.variables,returnPartialData:!0,optimistic:!1}),m=f.result;if(f.complete){var v=Object(c.tryFunctionOrLogError)((function(){return h(m,{mutationResult:e.result,queryName:Object(c.getOperationName)(d.document)||void 0,queryVariables:d.variables})}));v&&n.push({result:v,dataId:"ROOT_QUERY",query:d.document,variables:d.variables})}})),this.cache.performTransaction((function(t){n.forEach((function(e){return t.write(e)}));var r=e.update;r&&Object(c.tryFunctionOrLogError)((function(){return r(t,e.result)}))}))}},e.prototype.markMutationComplete=function(e){var t=e.mutationId;e.optimisticResponse&&this.cache.removeOptimistic(t)},e.prototype.markUpdateQueryResult=function(e,t,n){this.cache.write({result:n,dataId:"ROOT_QUERY",variables:t,query:e})},e.prototype.reset=function(){return this.cache.reset()},e}(),D=function(){function e(e){var t=this;this.defaultOptions={},this.resetStoreCallbacks=[],this.clearStoreCallbacks=[];var n=e.cache,r=e.ssrMode,o=void 0!==r&&r,c=e.ssrForceFetchDelay,l=void 0===c?0:c,d=e.connectToDevTools,f=e.queryDeduplication,v=void 0===f||f,_=e.defaultOptions,y=e.assumeImmutableResults,E=void 0!==y&&y,C=e.resolvers,w=e.typeDefs,S=e.fragmentMatcher,T=e.name,A=e.version,link=e.link;if(!link&&C&&(link=h.ApolloLink.empty()),!link||!n)throw new m.a(4);this.link=link,this.cache=n,this.store=new x(n),this.disableNetworkFetches=o||l>0,this.queryDeduplication=v,this.defaultOptions=_||{},this.typeDefs=w,l&&setTimeout((function(){return t.disableNetworkFetches=!1}),l),this.watchQuery=this.watchQuery.bind(this),this.query=this.query.bind(this),this.mutate=this.mutate.bind(this),this.resetStore=this.resetStore.bind(this),this.reFetchObservableQueries=this.reFetchObservableQueries.bind(this);void 0!==d&&(d&&"undefined"!=typeof window)&&(window.__APOLLO_CLIENT__=this),this.version="2.6.10",this.localState=new k({cache:n,client:this,resolvers:C,fragmentMatcher:S}),this.queryManager=new M({link:this.link,store:this.store,queryDeduplication:v,ssrMode:o,clientAwareness:{name:T,version:A},localState:this.localState,assumeImmutableResults:E,onBroadcast:function(){t.devToolsHookCb&&t.devToolsHookCb({action:{},state:{queries:t.queryManager.queryStore.getStore(),mutations:t.queryManager.mutationStore.getStore()},dataWithOptimisticResults:t.cache.extract(!0)})}})}return e.prototype.stop=function(){this.queryManager.stop()},e.prototype.watchQuery=function(e){return this.defaultOptions.watchQuery&&(e=Object(o.__assign)(Object(o.__assign)({},this.defaultOptions.watchQuery),e)),!this.disableNetworkFetches||"network-only"!==e.fetchPolicy&&"cache-and-network"!==e.fetchPolicy||(e=Object(o.__assign)(Object(o.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.watchQuery(e)},e.prototype.query=function(e){return this.defaultOptions.query&&(e=Object(o.__assign)(Object(o.__assign)({},this.defaultOptions.query),e)),Object(m.b)("cache-and-network"!==e.fetchPolicy,5),this.disableNetworkFetches&&"network-only"===e.fetchPolicy&&(e=Object(o.__assign)(Object(o.__assign)({},e),{fetchPolicy:"cache-first"})),this.queryManager.query(e)},e.prototype.mutate=function(e){return this.defaultOptions.mutate&&(e=Object(o.__assign)(Object(o.__assign)({},this.defaultOptions.mutate),e)),this.queryManager.mutate(e)},e.prototype.subscribe=function(e){return this.queryManager.startGraphQLSubscription(e)},e.prototype.readQuery=function(e,t){return void 0===t&&(t=!1),this.cache.readQuery(e,t)},e.prototype.readFragment=function(e,t){return void 0===t&&(t=!1),this.cache.readFragment(e,t)},e.prototype.writeQuery=function(e){var t=this.cache.writeQuery(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeFragment=function(e){var t=this.cache.writeFragment(e);return this.queryManager.broadcastQueries(),t},e.prototype.writeData=function(e){var t=this.cache.writeData(e);return this.queryManager.broadcastQueries(),t},e.prototype.__actionHookForDevTools=function(e){this.devToolsHookCb=e},e.prototype.__requestRaw=function(e){return Object(h.execute)(this.link,e)},e.prototype.initQueryManager=function(){return this.queryManager},e.prototype.resetStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.resetStoreCallbacks.map((function(e){return e()})))})).then((function(){return e.reFetchObservableQueries()}))},e.prototype.clearStore=function(){var e=this;return Promise.resolve().then((function(){return e.queryManager.clearStore()})).then((function(){return Promise.all(e.clearStoreCallbacks.map((function(e){return e()})))}))},e.prototype.onResetStore=function(e){var t=this;return this.resetStoreCallbacks.push(e),function(){t.resetStoreCallbacks=t.resetStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.onClearStore=function(e){var t=this;return this.clearStoreCallbacks.push(e),function(){t.clearStoreCallbacks=t.clearStoreCallbacks.filter((function(t){return t!==e}))}},e.prototype.reFetchObservableQueries=function(e){return this.queryManager.reFetchObservableQueries(e)},e.prototype.extract=function(e){return this.cache.extract(e)},e.prototype.restore=function(e){return this.cache.restore(e)},e.prototype.addResolvers=function(e){this.localState.addResolvers(e)},e.prototype.setResolvers=function(e){this.localState.setResolvers(e)},e.prototype.getResolvers=function(){return this.localState.getResolvers()},e.prototype.setLocalStateFragmentMatcher=function(e){this.localState.setFragmentMatcher(e)},e}(),P=n(480),U=n(93),B=n(194),F=n(318),V=n.n(F),j=function(e){function t(t){var n=e.call(this)||this;return t instanceof B.SubscriptionClient?n.subscriptionClient=t:n.subscriptionClient=new B.SubscriptionClient(t.uri,t.options,t.webSocketImpl),n}return Object(o.__extends)(t,e),t.prototype.request=function(e){return this.subscriptionClient.request(e)},t}(h.ApolloLink),H=n(126),$=n(272),z={generateHash:function(e){return $().update(Object(H.print)(e)).digest("hex")},disable:function(e){var t=e.graphQLErrors,n=e.operation;if(t&&t.some((function(e){return"PersistedQueryNotSupported"===e.message})))return!0;var r=n.getContext().response;return!(!r||!r.status||400!==r.status&&500!==r.status)},useGETForHashedQueries:!1};function W(e){return"OperationDefinition"===e.kind&&"mutation"===e.operation}var K=Object.prototype.hasOwnProperty,G="__createPersistedQueryLink_hashes",Y="function"==typeof Symbol?Symbol.for(G):G,X=0,Z=function(e){void 0===e&&(e={});var t=Object.assign({},z,e),n=t.generateHash,r=t.disable,o=t.useGETForHashedQueries,c=!0,l="forLink"+X++;function f(e){if(!e||"object"!=typeof e)return n(e);K.call(e,Y)||Object.defineProperty(e,Y,{value:Object.create(null),enumerable:!1});var t=e[Y];return K.call(t,l)?t[l]:t[l]=n(e)}return new h.ApolloLink((function(e,t){if(!t)throw new Error("PersistedQueryLink cannot be the last link in the chain.");var n,l=e.query;if(c)try{e.extensions.persistedQuery={version:1,sha256Hash:f(l)}}catch(e){n=e}return new d.a((function(l){if(!n){var d,h,f=!1,m=!1,v=function(n,o){var l=n.response,v=n.networkError;if(!f&&(l&&l.errors||v)){f=!0;var y={response:l,networkError:v,operation:e,graphQLErrors:l?l.errors:void 0};if(c=!r(y),l&&l.errors&&l.errors.some((function(e){return"PersistedQueryNotFound"===e.message}))||!c)return d&&d.unsubscribe(),e.setContext({http:{includeQuery:!0,includeExtensions:c}}),m&&e.setContext({fetchOptions:h}),void(d=t(e).subscribe(_))}o()},_={next:function(e){v({response:e},(function(){return l.next(e)}))},error:function(e){v({networkError:e},(function(){return l.error(e)}))},complete:l.complete.bind(l)};return e.setContext({http:{includeQuery:!c,includeExtensions:c}}),o&&c&&function(e){return!e.query.definitions.some(W)}(e)&&(e.setContext((function(e){var t=e.fetchOptions,n=void 0===t?{}:t;return h=n,{fetchOptions:Object.assign({},n,{method:"GET"})}})),m=!0),d=t(e).subscribe(_),function(){d&&d.unsubscribe()}}l.error(n)}))}))};var Q=n(479),J={test:function(e){return"client"===e.name.value},remove:!0},ee=new Map;var te,ne=(te=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)b.hasOwnProperty(p)&&(e[p]=b[p])},function(e,b){function t(){this.constructor=e}te(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}),re=Q.graphql,ie=function(e){void 0===e&&(e={resolvers:{},defaults:{}});var t=e.defaults,n=e.cache,r=e.typeDefs,o=e.fragmentMatcher;return n&&t&&n.writeData({data:t}),new(function(l){function h(){return null!==l&&l.apply(this,arguments)||this}return ne(h,l),h.prototype.writeDefaults=function(){n&&t&&n.writeData({data:t})},h.prototype.request=function(n,l){if(void 0===l&&(l=function(){return d.a.of({data:{}})}),r){var h=function(e){return(Array.isArray(e)?e:[e]).map((function(e){return"string"==typeof e?e:Object(H.print)(e)})).map((function(e){return e.trim()})).join("\n")}(r);n.setContext((function(e){var t=e.schemas;return{schemas:(void 0===t?[]:t).concat([{definition:h,directives:"directive @client on FIELD"}])}}))}if(!Object(c.hasDirectives)(["client"],n.query))return l(n);var f,m="function"==typeof e.resolvers?e.resolvers():e.resolvers,v=function(e){var t=ee.get(e);if(t)return t;Object(c.checkDocument)(e);var n=Object(c.removeDirectivesFromDocument)([J],e);return ee.set(e,n),n}(n.query),_=n.query,y=(f=(Object(c.getMainDefinition)(_)||{}).operation).charAt(0).toUpperCase()+f.slice(1)||"Query",E=function(e,n,r,o,c){void 0===n&&(n={});var l=c.resultKey,d=n[l],h=n[e],f=l!==e;if(void 0!==d||void 0!==h)return d||h;var v=m[n.__typename||y];if(v){var _=v[e];if(_)return _(n,r,o,c)}return(f?d:h)||(t||{})[e]};v&&(n.query=v);var C=v&&l?l(n):d.a.of({data:{}});return new d.a((function(e){var t=!1,r=!1;C.subscribe({next:function(c){var data=c.data,l=c.errors,d=e.error.bind(e),h=n.getContext();r=!0,re(E,_,data,h,n.variables,{fragmentMatcher:o}).then((function(n){e.next({data:n,errors:l}),t&&e.complete(),r=!1})).catch(d)},error:e.error.bind(e),complete:function(){r||e.complete(),t=!0}})}))},h}(h.ApolloLink))};function oe({clientId:e="defaultClient",httpEndpoint:t,wsEndpoint:n=null,tokenName:r="apollo-token",persisting:l=!1,ssr:f=!1,websocketsOnly:m=!1,link:link=null,preAuthLinks:v=[],defaultHttpLink:_=!0,httpLinkOptions:y={},cache:E=null,inMemoryCacheOptions:C={},apollo:w={},clientState:S=null,getAuth:T=se,typeDefs:A,resolvers:R,onCacheInit:O}){let I,k,N;const L=m&&!f&&n;if(E||(E=new U.a(C)),!L){const e=Object(P.createUploadLink)({uri:t,...y});link?_&&(link=Object(h.from)([link,e])):link=e,M=async(e,{headers:t})=>{const n=await T(r);return{headers:{...t,...n?{Authorization:n}:{}}}},k=new h.ApolloLink((function(e,t){var n=Object(o.__rest)(e,[]);return new d.a((function(r){var o;return Promise.resolve(n).then((function(t){return M(t,e.getContext())})).then(e.setContext).then((function(){o=t(e).subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)})})).catch(r.error.bind(r)),function(){o&&o.unsubscribe()}}))})),link=k.concat(link),v.length&&(link=Object(h.from)(v).concat(k))}var M;if(!f){if("undefined"!=typeof window){const t=window.__APOLLO_STATE__;t&&t[e]&&E.restore(t[e])}if(!L){let e={};"object"==typeof l&&null!=l&&(e=l,l=!0),!0===l&&(link=Z(e).concat(link))}if(n){I=new B.SubscriptionClient(n,{reconnect:!0,connectionParams:()=>{const e=T(r);return e?{Authorization:e,headers:{Authorization:e}}:{}}});const e=new j(I);link=L?link?link.concat(e):e:Object(h.split)((({query:e})=>{const{kind:t,operation:n}=Object(c.getMainDefinition)(e);return"OperationDefinition"===t&&"subscription"===n}),e,link)}}S&&(console.warn("clientState is deprecated, see https://vue-cli-plugin-apollo.netlify.com/guide/client-state.html"),N=ie({cache:E,...S}),link=Object(h.from)([N,link]));const x=new D({link:link,cache:E,...f?{ssrMode:!0}:{ssrForceFetchDelay:100,connectToDevTools:!1},typeDefs:A,resolvers:R,...w});return N&&x.onResetStore(N.writeDefaults),O&&(O(E),x.onResetStore((()=>O(E)))),{apolloClient:x,wsClient:I,stateLink:N}}function ae(e){const t=Object.assign({},e.operations);e.close(!0),e.connect(),Object.keys(t).forEach((n=>{e.sendMessage(n,V.a.GQL_START,t[n].options)}))}function se(e){if("undefined"!=typeof window){const t=window.localStorage.getItem(e);return t?`Bearer ${t}`:""}}},,,,,,,,,,,,,,,,,function(e,t,n){"use strict";(function(t){void 0===t||!t.version||0===t.version.indexOf("v0.")||0===t.version.indexOf("v1.")&&0!==t.version.indexOf("v1.8.")?e.exports={nextTick:function(e,n,r,o){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var c,i,l=arguments.length;switch(l){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,n)}));case 3:return t.nextTick((function(){e.call(null,n,r)}));case 4:return t.nextTick((function(){e.call(null,n,r,o)}));default:for(c=new Array(l-1),i=0;i<c.length;)c[i++]=arguments[i];return t.nextTick((function(){e.apply(null,c)}))}}}:e.exports=t}).call(this,n(42))},function(e,t,n){var r=n(17).Buffer;function o(e){r.isBuffer(e)||(e=r.from(e));for(var t=e.length/4|0,n=new Array(t),i=0;i<t;i++)n[i]=e.readUInt32BE(4*i);return n}function c(e){for(;0<e.length;e++)e[0]=0}function l(e,t,n,r,o){for(var c,l,d,h,f=n[0],m=n[1],v=n[2],_=n[3],y=e[0]^t[0],E=e[1]^t[1],C=e[2]^t[2],w=e[3]^t[3],S=4,T=1;T<o;T++)c=f[y>>>24]^m[E>>>16&255]^v[C>>>8&255]^_[255&w]^t[S++],l=f[E>>>24]^m[C>>>16&255]^v[w>>>8&255]^_[255&y]^t[S++],d=f[C>>>24]^m[w>>>16&255]^v[y>>>8&255]^_[255&E]^t[S++],h=f[w>>>24]^m[y>>>16&255]^v[E>>>8&255]^_[255&C]^t[S++],y=c,E=l,C=d,w=h;return c=(r[y>>>24]<<24|r[E>>>16&255]<<16|r[C>>>8&255]<<8|r[255&w])^t[S++],l=(r[E>>>24]<<24|r[C>>>16&255]<<16|r[w>>>8&255]<<8|r[255&y])^t[S++],d=(r[C>>>24]<<24|r[w>>>16&255]<<16|r[y>>>8&255]<<8|r[255&E])^t[S++],h=(r[w>>>24]<<24|r[y>>>16&255]<<16|r[E>>>8&255]<<8|r[255&C])^t[S++],[c>>>=0,l>>>=0,d>>>=0,h>>>=0]}var d=[0,1,2,4,8,16,32,64,128,27,54],h=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var n=[],r=[],o=[[],[],[],[]],c=[[],[],[],[]],l=0,d=0,i=0;i<256;++i){var h=d^d<<1^d<<2^d<<3^d<<4;h=h>>>8^255&h^99,n[l]=h,r[h]=l;var f=e[l],m=e[f],v=e[m],_=257*e[h]^16843008*h;o[0][l]=_<<24|_>>>8,o[1][l]=_<<16|_>>>16,o[2][l]=_<<8|_>>>24,o[3][l]=_,_=16843009*v^65537*m^257*f^16843008*l,c[0][h]=_<<24|_>>>8,c[1][h]=_<<16|_>>>16,c[2][h]=_<<8|_>>>24,c[3][h]=_,0===l?l=d=1:(l=f^e[e[e[v^f]]],d^=e[e[d]])}return{SBOX:n,INV_SBOX:r,SUB_MIX:o,INV_SUB_MIX:c}}();function f(e){this._key=o(e),this._reset()}f.blockSize=16,f.keySize=32,f.prototype.blockSize=f.blockSize,f.prototype.keySize=f.keySize,f.prototype._reset=function(){for(var e=this._key,t=e.length,n=t+6,r=4*(n+1),o=[],c=0;c<t;c++)o[c]=e[c];for(c=t;c<r;c++){var l=o[c-1];c%t==0?(l=l<<8|l>>>24,l=h.SBOX[l>>>24]<<24|h.SBOX[l>>>16&255]<<16|h.SBOX[l>>>8&255]<<8|h.SBOX[255&l],l^=d[c/t|0]<<24):t>6&&c%t==4&&(l=h.SBOX[l>>>24]<<24|h.SBOX[l>>>16&255]<<16|h.SBOX[l>>>8&255]<<8|h.SBOX[255&l]),o[c]=o[c-t]^l}for(var f=[],m=0;m<r;m++){var v=r-m,_=o[v-(m%4?0:4)];f[m]=m<4||v<=4?_:h.INV_SUB_MIX[0][h.SBOX[_>>>24]]^h.INV_SUB_MIX[1][h.SBOX[_>>>16&255]]^h.INV_SUB_MIX[2][h.SBOX[_>>>8&255]]^h.INV_SUB_MIX[3][h.SBOX[255&_]]}this._nRounds=n,this._keySchedule=o,this._invKeySchedule=f},f.prototype.encryptBlockRaw=function(e){return l(e=o(e),this._keySchedule,h.SUB_MIX,h.SBOX,this._nRounds)},f.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),n=r.allocUnsafe(16);return n.writeUInt32BE(t[0],0),n.writeUInt32BE(t[1],4),n.writeUInt32BE(t[2],8),n.writeUInt32BE(t[3],12),n},f.prototype.decryptBlock=function(e){var t=(e=o(e))[1];e[1]=e[3],e[3]=t;var n=l(e,this._invKeySchedule,h.INV_SUB_MIX,h.INV_SBOX,this._nRounds),c=r.allocUnsafe(16);return c.writeUInt32BE(n[0],0),c.writeUInt32BE(n[3],4),c.writeUInt32BE(n[2],8),c.writeUInt32BE(n[1],12),c},f.prototype.scrub=function(){c(this._keySchedule),c(this._invKeySchedule),c(this._key)},e.exports.AES=f},function(e,t,n){var r=n(17).Buffer,o=n(275);e.exports=function(e,t,n,c){if(r.isBuffer(e)||(e=r.from(e,"binary")),t&&(r.isBuffer(t)||(t=r.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var l=n/8,d=r.alloc(l),h=r.alloc(c||0),f=r.alloc(0);l>0||c>0;){var m=new o;m.update(f),m.update(e),t&&m.update(t),f=m.digest();var v=0;if(l>0){var _=d.length-l;v=Math.min(l,f.length),f.copy(d,_,0,v),l-=v}if(v<f.length&&c>0){var y=h.length-c,E=Math.min(c,f.length-v);f.copy(h,y,v,v+E),c-=E}}return f.fill(0),{key:d,iv:h}}},function(e,t,n){"use strict";var r=n(50),o=n(84),c=o.getNAF,l=o.getJSF,d=o.assert;function h(e,t){this.type=e,this.p=new r(t.p,16),this.red=t.prime?r.red(t.prime):r.mont(this.p),this.zero=new r(0).toRed(this.red),this.one=new r(1).toRed(this.red),this.two=new r(2).toRed(this.red),this.n=t.n&&new r(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var n=this.n&&this.p.div(this.n);!n||n.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function f(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=h,h.prototype.point=function(){throw new Error("Not implemented")},h.prototype.validate=function(){throw new Error("Not implemented")},h.prototype._fixedNafMul=function(p,e){d(p.precomputed);var t=p._getDoubles(),n=c(e,1,this._bitLength),r=(1<<t.step+1)-(t.step%2==0?2:1);r/=3;var o,l,h=[];for(o=0;o<n.length;o+=t.step){l=0;for(var f=o+t.step-1;f>=o;f--)l=(l<<1)+n[f];h.push(l)}for(var a=this.jpoint(null,null,null),b=this.jpoint(null,null,null),i=r;i>0;i--){for(o=0;o<h.length;o++)(l=h[o])===i?b=b.mixedAdd(t.points[o]):l===-i&&(b=b.mixedAdd(t.points[o].neg()));a=a.add(b)}return a.toP()},h.prototype._wnafMul=function(p,e){var t=4,n=p._getNAFPoints(t);t=n.wnd;for(var r=n.points,o=c(e,t,this._bitLength),l=this.jpoint(null,null,null),i=o.length-1;i>=0;i--){for(var h=0;i>=0&&0===o[i];i--)h++;if(i>=0&&h++,l=l.dblp(h),i<0)break;var f=o[i];d(0!==f),l="affine"===p.type?f>0?l.mixedAdd(r[f-1>>1]):l.mixedAdd(r[-f-1>>1].neg()):f>0?l.add(r[f-1>>1]):l.add(r[-f-1>>1].neg())}return"affine"===p.type?l.toP():l},h.prototype._wnafMulAdd=function(e,t,n,r,o){var i,d,p,h=this._wnafT1,f=this._wnafT2,m=this._wnafT3,v=0;for(i=0;i<r;i++){var _=(p=t[i])._getNAFPoints(e);h[i]=_.wnd,f[i]=_.points}for(i=r-1;i>=1;i-=2){var a=i-1,b=i;if(1===h[a]&&1===h[b]){var y=[t[a],null,null,t[b]];0===t[a].y.cmp(t[b].y)?(y[1]=t[a].add(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg())):0===t[a].y.cmp(t[b].y.redNeg())?(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].add(t[b].neg())):(y[1]=t[a].toJ().mixedAdd(t[b]),y[2]=t[a].toJ().mixedAdd(t[b].neg()));var E=[-3,-1,-5,-7,0,7,5,1,3],C=l(n[a],n[b]);for(v=Math.max(C[0].length,v),m[a]=new Array(v),m[b]=new Array(v),d=0;d<v;d++){var w=0|C[0][d],S=0|C[1][d];m[a][d]=E[3*(w+1)+(S+1)],m[b][d]=0,f[a]=y}}else m[a]=c(n[a],h[a],this._bitLength),m[b]=c(n[b],h[b],this._bitLength),v=Math.max(m[a].length,v),v=Math.max(m[b].length,v)}var T=this.jpoint(null,null,null),A=this._wnafT4;for(i=v;i>=0;i--){for(var R=0;i>=0;){var O=!0;for(d=0;d<r;d++)A[d]=0|m[d][i],0!==A[d]&&(O=!1);if(!O)break;R++,i--}if(i>=0&&R++,T=T.dblp(R),i<0)break;for(d=0;d<r;d++){var I=A[d];0!==I&&(I>0?p=f[d][I-1>>1]:I<0&&(p=f[d][-I-1>>1].neg()),T="affine"===p.type?T.mixedAdd(p):T.add(p))}}for(i=0;i<r;i++)f[i]=null;return o?T:T.toP()},h.BasePoint=f,f.prototype.eq=function(){throw new Error("Not implemented")},f.prototype.validate=function(){return this.curve.validate(this)},h.prototype.decodePoint=function(e,t){e=o.toArray(e,t);var n=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*n)return 6===e[0]?d(e[e.length-1]%2==0):7===e[0]&&d(e[e.length-1]%2==1),this.point(e.slice(1,1+n),e.slice(1+n,1+2*n));if((2===e[0]||3===e[0])&&e.length-1===n)return this.pointFromX(e.slice(1,1+n),3===e[0]);throw new Error("Unknown point format")},f.prototype.encodeCompressed=function(e){return this.encode(e,!0)},f.prototype._encode=function(e){var t=this.curve.p.byteLength(),n=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(n):[4].concat(n,this.getY().toArray("be",t))},f.prototype.encode=function(e,t){return o.encode(this._encode(t),e)},f.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},f.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},f.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var n=[this],r=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)r=r.dbl();n.push(r)}return{step:e,points:n}},f.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],n=(1<<e)-1,r=1===n?null:this.dbl(),i=1;i<n;i++)t[i]=t[i-1].add(r);return{wnd:e,points:t}},f.prototype._getBeta=function(){return null},f.prototype.dblp=function(e){for(var t=this,i=0;i<e;i++)t=t.dbl();return t}},function(e,t,n){var r=n(722),o=n(729),c=n(730),l=n(284),d=n(415),h=n(17).Buffer;function f(e){var t;"object"!=typeof e||h.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=h.from(e));var n,f,m=c(e,t),v=m.tag,data=m.data;switch(v){case"CERTIFICATE":f=r.certificate.decode(data,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(f||(f=r.PublicKey.decode(data,"der")),n=f.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPublicKey.decode(f.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return f.subjectPrivateKey=f.subjectPublicKey,{type:"ec",data:f};case"1.2.840.10040.4.1":return f.algorithm.params.pub_key=r.DSAparam.decode(f.subjectPublicKey.data,"der"),{type:"dsa",data:f.algorithm.params};default:throw new Error("unknown key id "+n)}case"ENCRYPTED PRIVATE KEY":data=function(data,e){var t=data.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(data.algorithm.decrypt.kde.kdeparams.iters.toString(),10),r=o[data.algorithm.decrypt.cipher.algo.join(".")],c=data.algorithm.decrypt.cipher.iv,f=data.subjectPrivateKey,m=parseInt(r.split("-")[1],10)/8,v=d.pbkdf2Sync(e,t,n,m,"sha1"),_=l.createDecipheriv(r,v,c),y=[];return y.push(_.update(f)),y.push(_.final()),h.concat(y)}(data=r.EncryptedPrivateKey.decode(data,"der"),t);case"PRIVATE KEY":switch(n=(f=r.PrivateKey.decode(data,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return r.RSAPrivateKey.decode(f.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:f.algorithm.curve,privateKey:r.ECPrivateKey.decode(f.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return f.algorithm.params.priv_key=r.DSAparam.decode(f.subjectPrivateKey,"der"),{type:"dsa",params:f.algorithm.params};default:throw new Error("unknown key id "+n)}case"RSA PUBLIC KEY":return r.RSAPublicKey.decode(data,"der");case"RSA PRIVATE KEY":return r.RSAPrivateKey.decode(data,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:r.DSAPrivateKey.decode(data,"der")};case"EC PRIVATE KEY":return{curve:(data=r.ECPrivateKey.decode(data,"der")).parameters.value,privateKey:data.privateKey};default:throw new Error("unknown key type "+v)}}e.exports=f,f.signature=r.signature},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(16);function o(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=Object(r.c)().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return v}));var r=n(116),o=n(142),c=n(167),l=n(104),d=n(43),h=n(114),f=n(125),m=n(92);function v(e,t,n,v){const{normalizeDepth:y=3,normalizeMaxBreadth:E=1e3}=e,C={...t,event_id:t.event_id||n.event_id||Object(r.f)(),timestamp:t.timestamp||Object(o.a)()},w=n.integrations||e.integrations.map((i=>i.name));!function(e,t){const{environment:n,release:r,dist:o,maxValueLength:c=250}=t;"environment"in e||(e.environment="environment"in t?n:f.a);void 0===e.release&&void 0!==r&&(e.release=r);void 0===e.dist&&void 0!==o&&(e.dist=o);e.message&&(e.message=Object(l.d)(e.message,c));const d=e.exception&&e.exception.values&&e.exception.values[0];d&&d.value&&(d.value=Object(l.d)(d.value,c));const h=e.request;h&&h.url&&(h.url=Object(l.d)(h.url,c))}(C,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(C,w),void 0===t.type&&function(e,t){const n=d.a._sentryDebugIds;if(!n)return;let r;const o=_.get(t);o?r=o:(r=new Map,_.set(t,r));const c=Object.keys(n).reduce(((e,o)=>{let c;const l=r.get(o);l?c=l:(c=t(o),r.set(o,c));for(let i=c.length-1;i>=0;i--){const t=c[i];if(t.filename){e[t.filename]=n[o];break}}return e}),{});try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.filename&&(e.debug_id=c[e.filename])}))}))}catch(e){}}(C,e.stackParser);let S=v;n.captureContext&&(S=m.a.clone(S).update(n.captureContext));let T=Object(c.c)(C);if(S){if(S.getAttachments){const e=[...n.attachments||[],...S.getAttachments()];e.length&&(n.attachments=e)}T=S.applyToEvent(C,n)}return T.then((e=>(e&&function(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach((e=>{n.push({type:"sourcemap",code_file:e,debug_id:t[e]})}))}(e),"number"==typeof y&&y>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((b=>({...b,...b.data&&{data:Object(h.a)(b.data,t,n)}})))},...e.user&&{user:Object(h.a)(e.user,t,n)},...e.contexts&&{contexts:Object(h.a)(e.contexts,t,n)},...e.extra&&{extra:Object(h.a)(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(h.a)(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((span=>(span.data&&(span.data=Object(h.a)(span.data,t,n)),span))));return r}(e,y,E):e)))}const _=new WeakMap},,,,function(e,t,n){"use strict";function r(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e){return"object"==r(e)&&null!==e}n.d(t,"a",(function(){return o}))},function(e,t,n){"use strict";function r(e){var t=e.split(/\r\n|[\n\r]/g),n=function(e){for(var t,n=!0,r=!0,o=0,c=null,i=0;i<e.length;++i)switch(e.charCodeAt(i)){case 13:10===e.charCodeAt(i+1)&&++i;case 10:n=!1,r=!0,o=0;break;case 9:case 32:++o;break;default:r&&!n&&(null===c||o<c)&&(c=o),r=!1}return null!==(t=c)&&void 0!==t?t:0}(e);if(0!==n)for(var i=1;i<t.length;i++)t[i]=t[i].slice(n);for(var r=0;r<t.length&&o(t[r]);)++r;for(var c=t.length;c>r&&o(t[c-1]);)--c;return t.slice(r,c).join("\n")}function o(e){for(var i=0;i<e.length;++i)if(" "!==e[i]&&"\t"!==e[i])return!1;return!0}function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=-1===e.indexOf("\n"),o=" "===e[0]||"\t"===e[0],c='"'===e[e.length-1],l="\\"===e[e.length-1],d=!r||c||l||n,h="";return!d||r&&o||(h+="\n"+t),h+=t?e.replace(/\n/g,"\n"+t):e,d&&(h+="\n"),'"""'+h.replace(/"""/g,'\\"""')+'"""'}n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return c}))},,,function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(58),o=n(234),c=n(491);function l(e){return new o.a((function(t,n){return new c.a((function(r){var sub,o,c;try{sub=n(t).subscribe({next:function(l){l.errors&&(c=e({graphQLErrors:l.errors,response:l,operation:t,forward:n}))?o=c.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.next(l)},error:function(l){(c=e({operation:t,networkError:l,graphQLErrors:l&&l.result&&l.result.errors,forward:n}))?o=c.subscribe({next:r.next.bind(r),error:r.error.bind(r),complete:r.complete.bind(r)}):r.error(l)},complete:function(){c||r.complete.bind(r)()}})}catch(o){e({networkError:o,operation:t,forward:n}),r.error(o)}return function(){sub&&sub.unsubscribe(),o&&sub.unsubscribe()}}))}))}!function(e){function t(t){var n=e.call(this)||this;return n.link=l(t),n}Object(r.b)(t,e),t.prototype.request=function(e,t){return this.link.request(e,t)}}(o.a)},function(e,t,n){"use strict";n.d(t,"a",(function(){return c})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return d}));n(113);const r=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function o(e,t=!1){const{host:n,path:path,pass:r,port:o,projectId:c,protocol:l,publicKey:d}=e;return`${l}://${d}${t&&r?`:${r}`:""}@${n}${o?`:${o}`:""}/${path?`${path}/`:path}${c}`}function c(e){const t=r.exec(e);if(!t)return void console.error(`Invalid Sentry Dsn: ${e}`);const[n,o,c="",d,h="",f]=t.slice(1);let path="",m=f;const v=m.split("/");if(v.length>1&&(path=v.slice(0,-1).join("/"),m=v.pop()),m){const e=m.match(/^\d+/);e&&(m=e[0])}return l({host:d,pass:c,path:path,projectId:m,port:h,protocol:n,publicKey:o})}function l(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function d(e){const t="string"==typeof e?c(e):l(e);if(t)return t}},function(e,t,n){"use strict";var r=n(14);n.d(t,"a",(function(){return r.a}));var o="8.7.1";r.a.registerVersion("firebase",o,"app"),r.a.SDK_VERSION=o},,function(e,t,n){"use strict";n.d(t,"a",(function(){return E}));var r=n(58),o=n(20),c=n(491);function l(e){return null!==e&&"object"==typeof e}var d=["connection","include","skip","client","rest","export"],h=(Object.assign((function(e,t,n){if(t&&n&&n.connection&&n.connection.key){if(n.connection.filter&&n.connection.filter.length>0){var r=n.connection.filter?n.connection.filter:[];r.sort();var o={};return r.forEach((function(e){o[e]=t[e]})),n.connection.key+"("+h(o)+")"}return n.connection.key}var c=e;if(t){var l=h(t);c+="("+l+")"}return n&&Object.keys(n).forEach((function(e){-1===d.indexOf(e)&&(n[e]&&Object.keys(n[e]).length?c+="@"+e+"("+h(n[e])+")":c+="@"+e)})),c}),{setStringify:function(s){var e=h;return h=s,e}}),function(e){return JSON.stringify(e,f)});function f(e,t){return l(t)&&!Array.isArray(t)&&(t=Object.keys(t).sort().reduce((function(e,n){return e[n]=t[n],e}),{})),t}function m(e,t){return t?t(e):c.a.of()}function v(e){return"function"==typeof e?new E(e):e}function _(link){return link.request.length<=1}var y=function(e){function t(t,link){var n=e.call(this,t)||this;return n.link=link,n}return Object(r.b)(t,e),t}(Error),E=function(){function e(e){e&&(this.request=e)}return e.empty=function(){return new e((function(){return c.a.of()}))},e.from=function(t){return 0===t.length?e.empty():t.map(v).reduce((function(e,t){return e.concat(t)}))},e.split=function(t,n,r){var o=v(n),l=v(r||new e(m));return _(o)&&_(l)?new e((function(e){return t(e)?o.request(e)||c.a.of():l.request(e)||c.a.of()})):new e((function(e,n){return t(e)?o.request(e,n)||c.a.of():l.request(e,n)||c.a.of()}))},e.execute=function(link,e){return link.request(function(e,t){var n=Object(r.a)({},e);return Object.defineProperty(t,"setContext",{enumerable:!1,value:function(e){n="function"==typeof e?Object(r.a)(Object(r.a)({},n),e(n)):Object(r.a)(Object(r.a)({},n),e)}}),Object.defineProperty(t,"getContext",{enumerable:!1,value:function(){return Object(r.a)({},n)}}),t}(e.context,function(e){var t={variables:e.variables||{},extensions:e.extensions||{},operationName:e.operationName,query:e.query};return t.operationName||(t.operationName="string"!=typeof t.query?t.query.definitions.filter((function(e){return"OperationDefinition"===e.kind&&e.name})).map((function(e){return e.name.value}))[0]||void 0:""),t}(function(e){for(var t=["query","operationName","variables","extensions","context"],n=0,r=Object.keys(e);n<r.length;n++){var c=r[n];if(t.indexOf(c)<0)throw __DEV__?new o.a("illegal argument: "+c):new o.a(26)}return e}(e))))||c.a.of()},e.concat=function(t,n){var r=v(t);if(_(r))return __DEV__&&o.b.warn(new y("You are calling concat on a terminating link, which will have no effect",r)),r;var l=v(n);return _(l)?new e((function(e){return r.request(e,(function(e){return l.request(e)||c.a.of()}))||c.a.of()})):new e((function(e,t){return r.request(e,(function(e){return l.request(e,t)||c.a.of()}))||c.a.of()}))},e.prototype.split=function(t,n,r){return this.concat(e.split(t,n,r||new e(m)))},e.prototype.concat=function(t){return e.concat(this,t)},e.prototype.request=function(e,t){throw __DEV__?new o.a("request is not implemented"):new o.a(21)},e.prototype.onError=function(e,t){if(t&&t.error)return t.error(e),!1;throw e},e.prototype.setOnError=function(e){return this.onError=e,this},e}()},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";var r=n(98),o=n(181),c=n(396),l=n(83),d=r.sum32,h=r.sum32_4,f=r.sum32_5,m=c.ch32,v=c.maj32,_=c.s0_256,y=c.s1_256,E=c.g0_256,C=c.g1_256,w=o.BlockHash,S=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function T(){if(!(this instanceof T))return new T;w.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=S,this.W=new Array(64)}r.inherits(T,w),e.exports=T,T.blockSize=512,T.outSize=256,T.hmacStrength=192,T.padLength=64,T.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=h(C(n[i-2]),n[i-7],E(n[i-15]),n[i-16]);var a=this.h[0],b=this.h[1],r=this.h[2],o=this.h[3],c=this.h[4],w=this.h[5],g=this.h[6],S=this.h[7];for(l(this.k.length===n.length),i=0;i<n.length;i++){var T=f(S,y(c),m(c,w,g),this.k[i],n[i]),A=d(_(a),v(a,b,r));S=g,g=w,w=c,c=d(o,T),o=r,r=b,b=a,a=d(T,A)}this.h[0]=d(this.h[0],a),this.h[1]=d(this.h[1],b),this.h[2]=d(this.h[2],r),this.h[3]=d(this.h[3],o),this.h[4]=d(this.h[4],c),this.h[5]=d(this.h[5],w),this.h[6]=d(this.h[6],g),this.h[7]=d(this.h[7],S)},T.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";e.exports=function(e){var t=e.uri,n=e.name,r=e.type;this.uri=t,this.name=n,this.type=r}},function(e,t,n){"use strict";var r=n(273);e.exports=function(e){return"undefined"!=typeof File&&e instanceof File||"undefined"!=typeof Blob&&e instanceof Blob||e instanceof r}},function(e,t,n){"use strict";var r=n(13),o=n(399),c=n(17).Buffer,l=new Array(16);function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function h(e,t){return e<<t|e>>>32-t}function f(a,b,e,t,n,r,s){return h(a+(b&e|~b&t)+n+r|0,s)+b|0}function m(a,b,e,t,n,r,s){return h(a+(b&t|e&~t)+n+r|0,s)+b|0}function v(a,b,e,t,n,r,s){return h(a+(b^e^t)+n+r|0,s)+b|0}function _(a,b,e,t,n,r,s){return h(a+(e^(b|~t))+n+r|0,s)+b|0}r(d,o),d.prototype._update=function(){for(var e=l,i=0;i<16;++i)e[i]=this._block.readInt32LE(4*i);var a=this._a,b=this._b,t=this._c,n=this._d;a=f(a,b,t,n,e[0],3614090360,7),n=f(n,a,b,t,e[1],3905402710,12),t=f(t,n,a,b,e[2],606105819,17),b=f(b,t,n,a,e[3],3250441966,22),a=f(a,b,t,n,e[4],4118548399,7),n=f(n,a,b,t,e[5],1200080426,12),t=f(t,n,a,b,e[6],2821735955,17),b=f(b,t,n,a,e[7],4249261313,22),a=f(a,b,t,n,e[8],1770035416,7),n=f(n,a,b,t,e[9],2336552879,12),t=f(t,n,a,b,e[10],4294925233,17),b=f(b,t,n,a,e[11],2304563134,22),a=f(a,b,t,n,e[12],1804603682,7),n=f(n,a,b,t,e[13],4254626195,12),t=f(t,n,a,b,e[14],2792965006,17),a=m(a,b=f(b,t,n,a,e[15],1236535329,22),t,n,e[1],4129170786,5),n=m(n,a,b,t,e[6],3225465664,9),t=m(t,n,a,b,e[11],643717713,14),b=m(b,t,n,a,e[0],3921069994,20),a=m(a,b,t,n,e[5],3593408605,5),n=m(n,a,b,t,e[10],38016083,9),t=m(t,n,a,b,e[15],3634488961,14),b=m(b,t,n,a,e[4],3889429448,20),a=m(a,b,t,n,e[9],568446438,5),n=m(n,a,b,t,e[14],3275163606,9),t=m(t,n,a,b,e[3],4107603335,14),b=m(b,t,n,a,e[8],1163531501,20),a=m(a,b,t,n,e[13],2850285829,5),n=m(n,a,b,t,e[2],4243563512,9),t=m(t,n,a,b,e[7],1735328473,14),a=v(a,b=m(b,t,n,a,e[12],2368359562,20),t,n,e[5],4294588738,4),n=v(n,a,b,t,e[8],2272392833,11),t=v(t,n,a,b,e[11],1839030562,16),b=v(b,t,n,a,e[14],4259657740,23),a=v(a,b,t,n,e[1],2763975236,4),n=v(n,a,b,t,e[4],1272893353,11),t=v(t,n,a,b,e[7],4139469664,16),b=v(b,t,n,a,e[10],3200236656,23),a=v(a,b,t,n,e[13],681279174,4),n=v(n,a,b,t,e[0],3936430074,11),t=v(t,n,a,b,e[3],3572445317,16),b=v(b,t,n,a,e[6],76029189,23),a=v(a,b,t,n,e[9],3654602809,4),n=v(n,a,b,t,e[12],3873151461,11),t=v(t,n,a,b,e[15],530742520,16),a=_(a,b=v(b,t,n,a,e[2],3299628645,23),t,n,e[0],4096336452,6),n=_(n,a,b,t,e[7],1126891415,10),t=_(t,n,a,b,e[14],2878612391,15),b=_(b,t,n,a,e[5],4237533241,21),a=_(a,b,t,n,e[12],1700485571,6),n=_(n,a,b,t,e[3],2399980690,10),t=_(t,n,a,b,e[10],4293915773,15),b=_(b,t,n,a,e[1],2240044497,21),a=_(a,b,t,n,e[8],1873313359,6),n=_(n,a,b,t,e[15],4264355552,10),t=_(t,n,a,b,e[6],2734768916,15),b=_(b,t,n,a,e[13],1309151649,21),a=_(a,b,t,n,e[4],4149444226,6),n=_(n,a,b,t,e[11],3174756917,10),t=_(t,n,a,b,e[2],718787259,15),b=_(b,t,n,a,e[9],3951481745,21),this._a=this._a+a|0,this._b=this._b+b|0,this._c=this._c+t|0,this._d=this._d+n|0},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=c.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=d},function(e,t,n){(function(t){function n(e){try{if(!t.localStorage)return!1}catch(e){return!1}var n=t.localStorage[e];return null!=n&&"true"===String(n).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}}).call(this,n(23))},function(e,t,n){"use strict";var r=n(155).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,c){if("function"==typeof n)return e(t,null,n);n||(n={}),c=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}(c||o);var l=n.readable||!1!==n.readable&&t.readable,d=n.writable||!1!==n.writable&&t.writable,h=function(){t.writable||m()},f=t._writableState&&t._writableState.finished,m=function(){d=!1,f=!0,l||c.call(t)},v=t._readableState&&t._readableState.endEmitted,_=function(){l=!1,v=!0,d||c.call(t)},y=function(e){c.call(t,e)},E=function(){var e;return l&&!v?(t._readableState&&t._readableState.ended||(e=new r),c.call(t,e)):d&&!f?(t._writableState&&t._writableState.ended||(e=new r),c.call(t,e)):void 0},C=function(){t.req.on("finish",m)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?d&&!t._writableState&&(t.on("end",h),t.on("close",h)):(t.on("complete",m),t.on("abort",E),t.req?C():t.on("request",C)),t.on("end",_),t.on("finish",m),!1!==n.error&&t.on("error",y),t.on("close",E),function(){t.removeListener("complete",m),t.removeListener("abort",E),t.removeListener("request",C),t.req&&t.req.removeListener("finish",m),t.removeListener("end",h),t.removeListener("close",h),t.removeListener("finish",m),t.removeListener("end",_),t.removeListener("error",y),t.removeListener("close",E)}}},function(e,t,n){"use strict";var r=n(46).Buffer,o=n(13),c=n(399),l=new Array(16),d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],h=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],f=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],m=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],v=[0,1518500249,1859775393,2400959708,2840853838],hr=[1352829926,1548603684,1836072691,2053994217,0];function _(){c.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function y(e,t){return e<<t|e>>>32-t}function E(a,b,e,t,n,r,o,s){return y(a+(b^e^t)+r+o|0,s)+n|0}function C(a,b,e,t,n,r,o,s){return y(a+(b&e|~b&t)+r+o|0,s)+n|0}function w(a,b,e,t,n,r,o,s){return y(a+((b|~e)^t)+r+o|0,s)+n|0}function S(a,b,e,t,n,r,o,s){return y(a+(b&t|e&~t)+r+o|0,s)+n|0}function T(a,b,e,t,n,r,o,s){return y(a+(b^(e|~t))+r+o|0,s)+n|0}o(_,c),_.prototype._update=function(){for(var e=l,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var n=0|this._a,r=0|this._b,o=0|this._c,dl=0|this._d,c=0|this._e,_=0|this._a,br=0|this._b,A=0|this._c,R=0|this._d,O=0|this._e,i=0;i<80;i+=1){var I,tr;i<16?(I=E(n,r,o,dl,c,e[d[i]],v[0],f[i]),tr=T(_,br,A,R,O,e[h[i]],hr[0],m[i])):i<32?(I=C(n,r,o,dl,c,e[d[i]],v[1],f[i]),tr=S(_,br,A,R,O,e[h[i]],hr[1],m[i])):i<48?(I=w(n,r,o,dl,c,e[d[i]],v[2],f[i]),tr=w(_,br,A,R,O,e[h[i]],hr[2],m[i])):i<64?(I=S(n,r,o,dl,c,e[d[i]],v[3],f[i]),tr=C(_,br,A,R,O,e[h[i]],hr[3],m[i])):(I=T(n,r,o,dl,c,e[d[i]],v[4],f[i]),tr=E(_,br,A,R,O,e[h[i]],hr[4],m[i])),n=c,c=dl,dl=y(o,10),o=r,r=I,_=O,O=R,R=y(A,10),A=br,br=tr}var k=this._b+o+R|0;this._b=this._c+dl+O|0,this._c=this._d+c+_|0,this._d=this._e+n+br|0,this._e=this._a+r+A|0,this._a=k},_.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=r.alloc?r.alloc(20):new r(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=_},function(e,t,n){(t=e.exports=function(e){e=e.toLowerCase();var n=t[e];if(!n)throw new Error(e+" is not supported (we accept pull requests)");return new n}).sha=n(655),t.sha1=n(656),t.sha224=n(657),t.sha256=n(406),t.sha384=n(658),t.sha512=n(407)},function(e,t,n){(t=e.exports=n(408)).Stream=t,t.Readable=t,t.Writable=n(282),t.Duplex=n(139),t.Transform=n(411),t.PassThrough=n(663)},function(e,t,n){var r=n(46),o=r.Buffer;function c(e,t){for(var n in e)t[n]=e[n]}function l(e,t,n){return o(e,t,n)}o.from&&o.alloc&&o.allocUnsafe&&o.allocUnsafeSlow?e.exports=r:(c(r,t),t.Buffer=l),c(o,l),l.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return o(e,t,n)},l.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=o(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},l.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return o(e)},l.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},function(e,t,n){"use strict";(function(t){var r=n(212);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree?t.corkedRequestsFree.next=e:t.corkedRequestsFree=e}(t,e)}}e.exports=w;var c,l=r.nextTick;w.WritableState=C;var d=Object.create(n(183));d.inherits=n(13);var h={deprecate:n(276)},f=n(409),m=n(281).Buffer,v=t.Uint8Array||function(){};var _,y=n(410);function E(){}function C(e,t){c=c||n(139),e=e||{};var d=t instanceof c;this.objectMode=!!e.objectMode,d&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var h=e.highWaterMark,f=e.writableHighWaterMark,m=this.objectMode?16:16384;this.highWaterMark=h||0===h?h:d&&(f||0===f)?f:m,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var v=!1===e.decodeStrings;this.decodeStrings=!v,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,o=n.sync,c=n.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,o,c){--t.pendingcb,n?(r.nextTick(c,o),r.nextTick(I,e,t),e._writableState.errorEmitted=!0,e.emit("error",o)):(c(o),e._writableState.errorEmitted=!0,e.emit("error",o),I(e,t))}(e,n,o,t,c);else{var d=R(n);d||n.corked||n.bufferProcessing||!n.bufferedRequest||A(e,n),o?l(T,e,n,d,c):T(e,n,d,c)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function w(e){if(c=c||n(139),!(_.call(w,this)||this instanceof c))return new w(e);this._writableState=new C(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function S(e,t,n,r,o,c,l){t.writelen=r,t.writecb=l,t.writing=!0,t.sync=!0,n?e._writev(o,t.onwrite):e._write(o,c,t.onwrite),t.sync=!1}function T(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),I(e,t)}function A(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,c=new Array(r),l=t.corkedRequestsFree;l.entry=n;for(var d=0,h=!0;n;)c[d]=n,n.isBuf||(h=!1),n=n.next,d+=1;c.allBuffers=h,S(e,t,!0,t.length,c,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,m=n.encoding,v=n.callback;if(S(e,t,!1,t.objectMode?1:f.length,f,m,v),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function R(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function O(e,t){e._final((function(n){t.pendingcb--,n&&e.emit("error",n),t.prefinished=!0,e.emit("prefinish"),I(e,t)}))}function I(e,t){var n=R(t);return n&&(!function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,r.nextTick(O,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),n}d.inherits(w,f),C.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(C.prototype,"buffer",{get:h.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(_=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(object){return!!_.call(this,object)||this===w&&(object&&object._writableState instanceof C)}})):_=function(object){return object instanceof this},w.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},w.prototype.write=function(e,t,n){var o,c=this._writableState,l=!1,d=!c.objectMode&&(o=e,m.isBuffer(o)||o instanceof v);return d&&!m.isBuffer(e)&&(e=function(e){return m.from(e)}(e)),"function"==typeof t&&(n=t,t=null),d?t="buffer":t||(t=c.defaultEncoding),"function"!=typeof n&&(n=E),c.ended?function(e,t){var n=new Error("write after end");e.emit("error",n),r.nextTick(t,n)}(this,n):(d||function(e,t,n,o){var c=!0,l=!1;return null===n?l=new TypeError("May not write null values to stream"):"string"==typeof n||void 0===n||t.objectMode||(l=new TypeError("Invalid non-string/buffer chunk")),l&&(e.emit("error",l),r.nextTick(o,l),c=!1),c}(this,c,e,n))&&(c.pendingcb++,l=function(e,t,n,r,o,c){if(!n){var l=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=m.from(t,n));return t}(t,r,o);r!==l&&(n=!0,o="buffer",r=l)}var d=t.objectMode?1:r.length;t.length+=d;var h=t.length<t.highWaterMark;h||(t.needDrain=!0);if(t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:c,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else S(e,t,!1,d,r,o,c);return h}(this,c,d,e,t,n)),l},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.finished||e.bufferProcessing||!e.bufferedRequest||A(this,e))},w.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(e,t,n){n(new Error("_write() is not implemented"))},w.prototype._writev=null,w.prototype.end=function(e,t,n){var o=this._writableState;"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||o.finished||function(e,t,n){t.ending=!0,I(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n)},Object.defineProperty(w.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),w.prototype.destroy=y.destroy,w.prototype._undestroy=y.undestroy,w.prototype._destroy=function(e,t){this.end(),t(e)}}).call(this,n(23))},function(e,t,n){"use strict";var r=n(83);function o(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0}e.exports=o,o.prototype._init=function(){},o.prototype.update=function(data){return 0===data.length?[]:"decrypt"===this.type?this._updateDecrypt(data):this._updateEncrypt(data)},o.prototype._buffer=function(data,e){for(var t=Math.min(this.buffer.length-this.bufferOff,data.length-e),i=0;i<t;i++)this.buffer[this.bufferOff+i]=data[e+i];return this.bufferOff+=t,t},o.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},o.prototype._updateEncrypt=function(data){var e=0,t=0,n=(this.bufferOff+data.length)/this.blockSize|0,r=new Array(n*this.blockSize);0!==this.bufferOff&&(e+=this._buffer(data,e),this.bufferOff===this.buffer.length&&(t+=this._flushBuffer(r,t)));for(var o=data.length-(data.length-e)%this.blockSize;e<o;e+=this.blockSize)this._update(data,e,r,t),t+=this.blockSize;for(;e<data.length;e++,this.bufferOff++)this.buffer[this.bufferOff]=data[e];return r},o.prototype._updateDecrypt=function(data){for(var e=0,t=0,n=Math.ceil((this.bufferOff+data.length)/this.blockSize)-1,r=new Array(n*this.blockSize);n>0;n--)e+=this._buffer(data,e),t+=this._flushBuffer(r,t);return e+=this._buffer(data,e),r},o.prototype.final=function(e){var t,n;return e&&(t=this.update(e)),n="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(n):n},o.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},o.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},o.prototype._unpad=function(e){return e},o.prototype._finalDecrypt=function(){r.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},function(e,t,n){var r=n(676),o=n(684),c=n(424);t.createCipher=t.Cipher=r.createCipher,t.createCipheriv=t.Cipheriv=r.createCipheriv,t.createDecipher=t.Decipher=o.createDecipher,t.createDecipheriv=t.Decipheriv=o.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(c)}},function(e,t,n){var r={ECB:n(677),CBC:n(678),CFB:n(679),CFB8:n(680),CFB1:n(681),OFB:n(682),CTR:n(422),GCM:n(422)},o=n(424);for(var c in o)o[c].module=r[o[c].mode];e.exports=o},function(e,t,n){var r;function o(e){this.rand=e}if(e.exports=function(e){return r||(r=new o(null)),r.generate(e)},e.exports.Rand=o,o.prototype.generate=function(e){return this._rand(e)},o.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),i=0;i<t.length;i++)t[i]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?o.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?o.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(o.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var c=n(688);if("function"!=typeof c.randomBytes)throw new Error("Not supported");o.prototype._rand=function(e){return c.randomBytes(e)}}catch(e){}},function(e,t,n){"use strict";var r=n(158).codes.ERR_STREAM_PREMATURE_CLOSE;function o(){}e.exports=function e(t,n,c){if("function"==typeof n)return e(t,null,n);n||(n={}),c=function(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];e.apply(this,r)}}}(c||o);var l=n.readable||!1!==n.readable&&t.readable,d=n.writable||!1!==n.writable&&t.writable,h=function(){t.writable||m()},f=t._writableState&&t._writableState.finished,m=function(){d=!1,f=!0,l||c.call(t)},v=t._readableState&&t._readableState.endEmitted,_=function(){l=!1,v=!0,d||c.call(t)},y=function(e){c.call(t,e)},E=function(){var e;return l&&!v?(t._readableState&&t._readableState.ended||(e=new r),c.call(t,e)):d&&!f?(t._writableState&&t._writableState.ended||(e=new r),c.call(t,e)):void 0},C=function(){t.req.on("finish",m)};return!function(e){return e.setHeader&&"function"==typeof e.abort}(t)?d&&!t._writableState&&(t.on("end",h),t.on("close",h)):(t.on("complete",m),t.on("abort",E),t.req?C():t.on("request",C)),t.on("end",_),t.on("finish",m),!1!==n.error&&t.on("error",y),t.on("close",E),function(){t.removeListener("complete",m),t.removeListener("abort",E),t.removeListener("request",C),t.req&&t.req.removeListener("finish",m),t.removeListener("end",h),t.removeListener("close",h),t.removeListener("finish",m),t.removeListener("end",_),t.removeListener("error",y),t.removeListener("close",E)}}},function(e,t,n){(function(t){var r=n(701),o=n(154);function c(e){var t,n=e.modulus.byteLength();do{t=new r(o(n))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function l(e,n){var o=function(e){var t=c(e);return{blinder:t.toRed(r.mont(e.modulus)).redPow(new r(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(n),l=n.modulus.byteLength(),d=new r(e).mul(o.blinder).umod(n.modulus),h=d.toRed(r.mont(n.prime1)),f=d.toRed(r.mont(n.prime2)),m=n.coefficient,p=n.prime1,q=n.prime2,v=h.redPow(n.exponent1).fromRed(),_=f.redPow(n.exponent2).fromRed(),y=v.isub(_).imul(m).umod(p).imul(q);return _.iadd(y).imul(o.unblinder).umod(n.modulus).toArrayLike(t,"be",l)}l.getr=c,e.exports=l}).call(this,n(46).Buffer)},function(e,t,n){"use strict";var r=t;r.version=n(703).version,r.utils=n(84),r.rand=n(286),r.curve=n(436),r.curves=n(290),r.ec=n(714),r.eddsa=n(718)},function(e,t,n){"use strict";var pre,r=t,o=n(291),c=n(436),l=n(84).assert;function d(e){"short"===e.type?this.curve=new c.short(e):"edwards"===e.type?this.curve=new c.edwards(e):this.curve=new c.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,l(this.g.validate(),"Invalid curve"),l(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function h(e,t){Object.defineProperty(r,e,{configurable:!0,enumerable:!0,get:function(){var n=new d(t);return Object.defineProperty(r,e,{configurable:!0,enumerable:!0,value:n}),n}})}r.PresetCurve=d,h("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),h("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),h("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),h("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),h("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),h("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),h("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{pre=n(713)}catch(e){pre=void 0}h("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",pre]})},function(e,t,n){var r=t;r.utils=n(98),r.common=n(181),r.sha=n(707),r.ripemd=n(711),r.hmac=n(712),r.sha1=r.sha.sha1,r.sha256=r.sha.sha256,r.sha224=r.sha.sha224,r.sha384=r.sha.sha384,r.sha512=r.sha.sha512,r.ripemd160=r.ripemd.ripemd160},function(e,t,n){"use strict";(function(t){var r,o=n(46),c=o.Buffer,l={};for(r in o)o.hasOwnProperty(r)&&"SlowBuffer"!==r&&"Buffer"!==r&&(l[r]=o[r]);var d=l.Buffer={};for(r in c)c.hasOwnProperty(r)&&"allocUnsafe"!==r&&"allocUnsafeSlow"!==r&&(d[r]=c[r]);if(l.Buffer.prototype=c.prototype,d.from&&d.from!==Uint8Array.from||(d.from=function(e,t,n){if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof e);if(e&&void 0===e.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);return c(e,t,n)}),d.alloc||(d.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError('The "size" argument must be of type number. Received type '+typeof e);if(e<0||e>=2*(1<<30))throw new RangeError('The value "'+e+'" is invalid for option "size"');var r=c(e);return t&&0!==t.length?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r}),!l.kStringMaxLength)try{l.kStringMaxLength=t.binding("buffer").kStringMaxLength}catch(e){}l.constants||(l.constants={MAX_LENGTH:l.kMaxLength},l.kStringMaxLength&&(l.constants.MAX_STRING_LENGTH=l.kStringMaxLength)),e.exports=l}).call(this,n(42))},function(e,t,n){"use strict";const r=n(294).Reporter,o=n(185).EncoderBuffer,c=n(185).DecoderBuffer,l=n(83),d=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],h=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(d);function f(e,t,n){const r={};this._baseState=r,r.name=n,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=f;const m=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];f.prototype.clone=function(){const e=this._baseState,t={};m.forEach((function(n){t[n]=e[n]}));const n=new this.constructor(t.parent);return n._baseState=t,n},f.prototype._wrap=function(){const e=this._baseState;h.forEach((function(t){this[t]=function(){const n=new this.constructor(this);return e.children.push(n),n[t].apply(n,arguments)}}),this)},f.prototype._init=function(body){const e=this._baseState;l(null===e.parent),body.call(this),e.children=e.children.filter((function(e){return e._baseState.parent===this}),this),l.equal(e.children.length,1,"Root node can have only one child")},f.prototype._useArgs=function(e){const t=this._baseState,n=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==n.length&&(l(null===t.children),t.children=n,n.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(l(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;const t={};return Object.keys(e).forEach((function(n){n==(0|n)&&(n|=0);const r=e[n];t[r]=n})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){f.prototype[e]=function(){const t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),d.forEach((function(e){f.prototype[e]=function(){const t=this._baseState,n=Array.prototype.slice.call(arguments);return l(null===t.tag),t.tag=e,this._useArgs(n),this}})),f.prototype.use=function(e){l(e);const t=this._baseState;return l(null===t.use),t.use=e,this},f.prototype.optional=function(){return this._baseState.optional=!0,this},f.prototype.def=function(e){const t=this._baseState;return l(null===t.default),t.default=e,t.optional=!0,this},f.prototype.explicit=function(e){const t=this._baseState;return l(null===t.explicit&&null===t.implicit),t.explicit=e,this},f.prototype.implicit=function(e){const t=this._baseState;return l(null===t.explicit&&null===t.implicit),t.implicit=e,this},f.prototype.obj=function(){const e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},f.prototype.key=function(e){const t=this._baseState;return l(null===t.key),t.key=e,this},f.prototype.any=function(){return this._baseState.any=!0,this},f.prototype.choice=function(e){const t=this._baseState;return l(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},f.prototype.contains=function(e){const t=this._baseState;return l(null===t.use),t.contains=e,this},f.prototype._decode=function(input,e){const t=this._baseState;if(null===t.parent)return input.wrapResult(t.children[0]._decode(input,e));let n,r=t.default,o=!0,l=null;if(null!==t.key&&(l=input.enterKey(t.key)),t.optional){let n=null;if(null!==t.explicit?n=t.explicit:null!==t.implicit?n=t.implicit:null!==t.tag&&(n=t.tag),null!==n||t.any){if(o=this._peekTag(input,n,t.any),input.isError(o))return o}else{const n=input.save();try{null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e),o=!0}catch(e){o=!1}input.restore(n)}}if(t.obj&&o&&(n=input.enterObject()),o){if(null!==t.explicit){const e=this._decodeTag(input,t.explicit);if(input.isError(e))return e;input=e}const n=input.offset;if(null===t.use&&null===t.choice){let e;t.any&&(e=input.save());const body=this._decodeTag(input,null!==t.implicit?t.implicit:t.tag,t.any);if(input.isError(body))return body;t.any?r=input.raw(e):input=body}if(e&&e.track&&null!==t.tag&&e.track(input.path(),n,input.length,"tagged"),e&&e.track&&null!==t.tag&&e.track(input.path(),input.offset,input.length,"content"),t.any||(r=null===t.choice?this._decodeGeneric(t.tag,input,e):this._decodeChoice(input,e)),input.isError(r))return r;if(t.any||null!==t.choice||null===t.children||t.children.forEach((function(t){t._decode(input,e)})),t.contains&&("octstr"===t.tag||"bitstr"===t.tag)){const data=new c(r);r=this._getUse(t.contains,input._reporterState.obj)._decode(data,e)}}return t.obj&&o&&(r=input.leaveObject(n)),null===t.key||null===r&&!0!==o?null!==l&&input.exitKey(l):input.leaveKey(l,t.key,r),r},f.prototype._decodeGeneric=function(e,input,t){const n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(input,e,n.args[0],t):/str$/.test(e)?this._decodeStr(input,e,t):"objid"===e&&n.args?this._decodeObjid(input,n.args[0],n.args[1],t):"objid"===e?this._decodeObjid(input,null,null,t):"gentime"===e||"utctime"===e?this._decodeTime(input,e,t):"null_"===e?this._decodeNull(input,t):"bool"===e?this._decodeBool(input,t):"objDesc"===e?this._decodeStr(input,e,t):"int"===e||"enum"===e?this._decodeInt(input,n.args&&n.args[0],t):null!==n.use?this._getUse(n.use,input._reporterState.obj)._decode(input,t):input.error("unknown tag: "+e)},f.prototype._getUse=function(e,t){const n=this._baseState;return n.useDecoder=this._use(e,t),l(null===n.useDecoder._baseState.parent),n.useDecoder=n.useDecoder._baseState.children[0],n.implicit!==n.useDecoder._baseState.implicit&&(n.useDecoder=n.useDecoder.clone(),n.useDecoder._baseState.implicit=n.implicit),n.useDecoder},f.prototype._decodeChoice=function(input,e){const t=this._baseState;let n=null,r=!1;return Object.keys(t.choice).some((function(o){const c=input.save(),l=t.choice[o];try{const t=l._decode(input,e);if(input.isError(t))return!1;n={type:o,value:t},r=!0}catch(e){return input.restore(c),!1}return!0}),this),r?n:input.error("Choice not matched")},f.prototype._createEncoderBuffer=function(data){return new o(data,this.reporter)},f.prototype._encode=function(data,e,t){const n=this._baseState;if(null!==n.default&&n.default===data)return;const r=this._encodeValue(data,e,t);return void 0===r||this._skipDefault(r,e,t)?void 0:r},f.prototype._encodeValue=function(data,e,t){const n=this._baseState;if(null===n.parent)return n.children[0]._encode(data,e||new r);let o=null;if(this.reporter=e,n.optional&&void 0===data){if(null===n.default)return;data=n.default}let content=null,c=!1;if(n.any)o=this._createEncoderBuffer(data);else if(n.choice)o=this._encodeChoice(data,e);else if(n.contains)content=this._getUse(n.contains,t)._encode(data,e),c=!0;else if(n.children)content=n.children.map((function(t){if("null_"===t._baseState.tag)return t._encode(null,e,data);if(null===t._baseState.key)return e.error("Child should have a key");const n=e.enterKey(t._baseState.key);if("object"!=typeof data)return e.error("Child expected, but input is not object");const r=t._encode(data[t._baseState.key],e,data);return e.leaveKey(n),r}),this).filter((function(e){return e})),content=this._createEncoderBuffer(content);else if("seqof"===n.tag||"setof"===n.tag){if(!n.args||1!==n.args.length)return e.error("Too many args for : "+n.tag);if(!Array.isArray(data))return e.error("seqof/setof, but data is not Array");const t=this.clone();t._baseState.implicit=null,content=this._createEncoderBuffer(data.map((function(t){const n=this._baseState;return this._getUse(n.args[0],data)._encode(t,e)}),t))}else null!==n.use?o=this._getUse(n.use,t)._encode(data,e):(content=this._encodePrimitive(n.tag,data),c=!0);if(!n.any&&null===n.choice){const t=null!==n.implicit?n.implicit:n.tag,r=null===n.implicit?"universal":"context";null===t?null===n.use&&e.error("Tag could be omitted only for .use()"):null===n.use&&(o=this._encodeComposite(t,c,r,content))}return null!==n.explicit&&(o=this._encodeComposite(n.explicit,!1,"context",o)),o},f.prototype._encodeChoice=function(data,e){const t=this._baseState,n=t.choice[data.type];return n||l(!1,data.type+" not found in "+JSON.stringify(Object.keys(t.choice))),n._encode(data.value,e)},f.prototype._encodePrimitive=function(e,data){const t=this._baseState;if(/str$/.test(e))return this._encodeStr(data,e);if("objid"===e&&t.args)return this._encodeObjid(data,t.reverseArgs[0],t.args[1]);if("objid"===e)return this._encodeObjid(data,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(data,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(data,t.args&&t.reverseArgs[0]);if("bool"===e)return this._encodeBool(data);if("objDesc"===e)return this._encodeStr(data,e);throw new Error("Unsupported tag: "+e)},f.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},f.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)}},function(e,t,n){"use strict";const r=n(13);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function c(path,e){this.path=path,this.rethrow(e)}t.Reporter=o,o.prototype.isError=function(e){return e instanceof c},o.prototype.save=function(){const e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(data){const e=this._reporterState;e.obj=data.obj,e.path=e.path.slice(0,data.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){const t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,n){const r=this._reporterState;this.exitKey(e),null!==r.obj&&(r.obj[t]=n)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){const e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){const t=this._reporterState,n=t.obj;return t.obj=e,n},o.prototype.error=function(e){let t;const n=this._reporterState,r=e instanceof c;if(t=r?e:new c(n.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!n.options.partial)throw t;return r||n.errors.push(t),t},o.prototype.wrapResult=function(e){const t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},r(c,Error),c.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,c),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},function(e,t,n){"use strict";function r(map){const e={};return Object.keys(map).forEach((function(t){(0|t)==t&&(t|=0);const n=map[t];e[n]=t})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=r(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=r(t.tag)},function(e,t,n){e.exports=n(741)},,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t),function(e,r){var o,c=n(476);o="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==e?e:r;var l=Object(c.a)(o);t.default=l}.call(this,n(23),n(270)(e))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){throw new Error("Static Class")}return e.GQL_CONNECTION_INIT="connection_init",e.GQL_CONNECTION_ACK="connection_ack",e.GQL_CONNECTION_ERROR="connection_error",e.GQL_CONNECTION_KEEP_ALIVE="ka",e.GQL_CONNECTION_TERMINATE="connection_terminate",e.GQL_START="start",e.GQL_DATA="data",e.GQL_ERROR="error",e.GQL_COMPLETE="complete",e.GQL_STOP="stop",e.SUBSCRIPTION_START="subscription_start",e.SUBSCRIPTION_DATA="subscription_data",e.SUBSCRIPTION_SUCCESS="subscription_success",e.SUBSCRIPTION_FAIL="subscription_fail",e.SUBSCRIPTION_END="subscription_end",e.INIT="init",e.INIT_SUCCESS="init_success",e.INIT_FAIL="init_fail",e.KEEP_ALIVE="keepalive",e}();t.default=r},,function(e,t,n){"use strict";function r(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function o(e){return r(e)?new Date(e.getTime()):null==e?new Date(NaN):new Date(e)}function c(e){return r(e)&&!isNaN(e.getTime())}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>=0&&t<=6))throw new RangeError("weekStartsOn must be between 0 and 6");var n=o(e),r=n.getDay(),c=(r+7-t)%7;return n.setDate(n.getDate()-c),n.setHours(0,0,0,0),n}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,c=t.firstWeekContainsDate,d=void 0===c?1:c;if(!(d>=1&&d<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7");for(var h=o(e),f=h.getFullYear(),m=new Date(0),i=f+1;i>=f-1&&(m.setFullYear(i,0,d),m.setHours(0,0,0,0),m=l(m,r),!(h.getTime()>=m.getTime()));i--);return m}function h(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.firstDayOfWeek,r=void 0===n?0:n,c=t.firstWeekContainsDate,h=void 0===c?1:c,f=o(e),m=l(f,r),v=d(f,{firstDayOfWeek:r,firstWeekContainsDate:h}),_=m.getTime()-v.getTime();return Math.round(_/6048e5)+1}n.r(t);var f={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1},m=/\[([^\]]+)]|YYYY|YY?|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|m{1,2}|s{1,2}|Z{1,2}|S{1,3}|w{1,2}|x|X|a|A/g;function v(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2,output="".concat(Math.abs(e)),n=e<0?"-":"";output.length<t;)output="0".concat(output);return n+output}function _(e){return 15*Math.round(e.getTimezoneOffset()/15)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=e>0?"-":"+",r=Math.abs(e),o=Math.floor(r/60),c=r%60;return n+v(o,2)+t+v(c,2)}var E=function(e,t,n){var r=e<12?"AM":"PM";return n?r.toLocaleLowerCase():r},C={Y:function(e){var t=e.getFullYear();return t<=9999?"".concat(t):"+".concat(t)},YY:function(e){return v(e.getFullYear(),4).substr(2)},YYYY:function(e){return v(e.getFullYear(),4)},M:function(e){return e.getMonth()+1},MM:function(e){return v(e.getMonth()+1,2)},MMM:function(e,t){return t.monthsShort[e.getMonth()]},MMMM:function(e,t){return t.months[e.getMonth()]},D:function(e){return e.getDate()},DD:function(e){return v(e.getDate(),2)},H:function(e){return e.getHours()},HH:function(e){return v(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(){var e=C.h.apply(C,arguments);return v(e,2)},m:function(e){return e.getMinutes()},mm:function(e){return v(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return v(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return v(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return v(e.getMilliseconds(),3)},d:function(e){return e.getDay()},dd:function(e,t){return t.weekdaysMin[e.getDay()]},ddd:function(e,t){return t.weekdaysShort[e.getDay()]},dddd:function(e,t){return t.weekdays[e.getDay()]},A:function(e,t){return(t.meridiem||E)(e.getHours(),e.getMinutes(),!1)},a:function(e,t){return(t.meridiem||E)(e.getHours(),e.getMinutes(),!0)},Z:function(e){return y(_(e),":")},ZZ:function(e){return y(_(e))},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()},w:function(e,t){return h(e,{firstDayOfWeek:t.firstDayOfWeek,firstWeekContainsDate:t.firstWeekContainsDate})},ww:function(e,t){return v(C.w(e,t),2)}};function w(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",l=o(e);if(!c(l))return"Invalid Date";var d=n.locale||f;return r.replace(m,(function(e,t){return t||("function"==typeof C[e]?"".concat(C[e](l,d)):e)}))}function S(e){return function(e){if(Array.isArray(e)){for(var i=0,t=new Array(e.length);i<e.length;i++)t[i]=e[i];return t}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function T(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function A(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?T(source,!0).forEach((function(t){O(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):T(source).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function R(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){if(!(Symbol.iterator in Object(e))&&"[object Arguments]"!==Object.prototype.toString.call(e))return;var t=[],n=!0,r=!1,o=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t}(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function O(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var I=/(\[[^\[]*\])|(MM?M?M?|Do|DD?|ddd?d?|w[o|w]?|YYYY|YY|a|A|hh?|HH?|mm?|ss?|S{1,3}|x|X|ZZ?|.)/g,k=/\d/,N=/\d\d/,L=/\d\d?/,M=/[+-]?\d+/,x="year",D="month",P="hour",U="minute",B="second",F="millisecond",V={},j=function(e,t,n){var r,o=Array.isArray(e)?e:[e];r="string"==typeof n?function(input){var e=parseInt(input,10);return O({},n,e)}:n,o.forEach((function(e){V[e]=[t,r]}))},H=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},$=function(e){return function(t){var n=t[e];if(!Array.isArray(n))throw new Error("Locale[".concat(e,"] need an array"));return new RegExp(n.map(H).join("|"))}},z=function(e,t){return function(input,n){var r=n[e];if(!Array.isArray(r))throw new Error("Locale[".concat(e,"] need an array"));var o=r.indexOf(input);if(o<0)throw new Error("Invalid Word");return O({},t,o)}};function W(e,t){if(void 0!==e&&void 0!==t)if(t){if(e<12)return e+12}else if(12===e)return 0;return e}function K(input){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:new Date,t=[0,0,1,0,0,0,0],n=[e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()],r=!0,i=0;i<7;i++)void 0===input[i]?t[i]=r?n[i]:t[i]:(t[i]=input[i],r=!1);return t}function G(e,t,n,r,o,s,c){var l;return e<100&&e>=0?(l=new Date(e+400,t,n,r,o,s,c),isFinite(l.getFullYear())&&l.setFullYear(e)):l=new Date(e,t,n,r,o,s,c),l}function Y(){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=n[0];return o<100&&o>=0?(n[0]+=400,e=new Date(Date.UTC.apply(Date,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(o)):e=new Date(Date.UTC.apply(Date,n)),e}function X(e,t,n){var r=t.match(I);if(!r)throw new Error;for(var o=r.length,mark={},i=0;i<o;i+=1){var c=r[i],l=V[c];if(l){var d="function"==typeof l[0]?l[0](n):l[0],h=l[1],f=(d.exec(e)||[])[0];mark=A({},mark,{},h(f,n)),e=e.replace(f,"")}else{var m=c.replace(/^\[|\]$/g,"");if(0!==e.indexOf(m))throw new Error("not match");e=e.substr(m.length)}}return mark}function Z(e){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Q(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function J(){return(J=Object.assign||function(e){for(var i=1;i<arguments.length;i++){var source=arguments[i];for(var t in source)Object.prototype.hasOwnProperty.call(source,t)&&(e[t]=source[t])}return e}).apply(this,arguments)}function ee(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function te(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?ee(Object(source),!0).forEach((function(t){Q(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):ee(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function ne(source,e){if(null==source)return{};var t,i,n=function(source,e){if(null==source)return{};var t,i,n={},r=Object.keys(source);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)>=0||(n[t]=source[t]);return n}(source,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(source);for(i=0;i<r.length;i++)t=r[i],e.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(source,t)&&(n[t]=source[t])}return n}function re(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,r=!1,o=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t}(e,i)||function(e,t){if(!e)return;if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function oe(){return(oe=Object.assign||function(a){for(var b,e=1;e<arguments.length;e++)for(var t in b=arguments[e])Object.prototype.hasOwnProperty.call(b,t)&&(a[t]=b[t]);return a}).apply(this,arguments)}j("Y",M,x),j("YY",N,(function(input){var e=(new Date).getFullYear(),t=Math.floor(e/100),n=parseInt(input,10);return O({},x,n=100*(n>68?t-1:t)+n)})),j("YYYY",/\d{4}/,x),j("M",L,(function(input){return O({},D,parseInt(input,10)-1)})),j("MM",N,(function(input){return O({},D,parseInt(input,10)-1)})),j("MMM",$("monthsShort"),z("monthsShort",D)),j("MMMM",$("months"),z("months",D)),j("D",L,"day"),j("DD",N,"day"),j(["H","h"],L,P),j(["HH","hh"],N,P),j("m",L,U),j("mm",N,U),j("s",L,B),j("ss",N,B),j("S",k,(function(input){return O({},F,100*parseInt(input,10))})),j("SS",N,(function(input){return O({},F,10*parseInt(input,10))})),j("SSS",/\d{3}/,F),j(["A","a"],(function(e){return e.meridiemParse||/[ap]\.?m?\.?/i}),(function(input,e){return{isPM:"function"==typeof e.isPM?e.isPM(input):function(input){return"p"==="".concat(input).toLowerCase().charAt(0)}(input)}})),j(["Z","ZZ"],/[+-]\d\d:?\d\d/,(function(input){return{offset:(e=input,t=R(e.match(/([+-]|\d\d)/g)||["-","0","0"],3),symbol=t[0],n=t[1],r=t[2],o=60*parseInt(n,10)+parseInt(r,10),0===o?0:"+"===symbol?-o:+o)};var e,t,symbol,n,r,o})),j("x",M,(function(input){return{date:new Date(parseInt(input,10))}})),j("X",/[+-]?\d+(\.\d{1,3})?/,(function(input){return{date:new Date(1e3*parseFloat(input))}})),j("d",k,"weekday"),j("dd",$("weekdaysMin"),z("weekdaysMin","weekday")),j("ddd",$("weekdaysShort"),z("weekdaysShort","weekday")),j("dddd",$("weekdays"),z("weekdays","weekday")),j("w",L,"week"),j("ww",N,"week");var ae=["attrs","props","domProps"],se=["class","style","directives"],ce=["on","nativeOn"],le=function(a,b){return function(){a&&a.apply(this,arguments),b&&b.apply(this,arguments)}},de=function(a){return a.reduce((function(e,a){for(var b in a)if(e[b])if(-1!==ae.indexOf(b))e[b]=oe({},e[b],a[b]);else if(-1!==se.indexOf(b)){var t=e[b]instanceof Array?e[b]:[e[b]],n=a[b]instanceof Array?a[b]:[a[b]];e[b]=t.concat(n)}else if(-1!==ce.indexOf(b))for(var r in a[b])if(e[b][r]){var g=e[b][r]instanceof Array?e[b][r]:[e[b][r]],o=a[b][r]instanceof Array?a[b][r]:[a[b][r]];e[b][r]=g.concat(o)}else e[b][r]=a[b][r];else if("hook"==b)for(var i in a[b])e[b][i]=e[b][i]?le(e[b][i],a[b][i]):a[b][i];else e[b]=a[b];else e[b]=a[b];return e}),{})};function ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,l=new Date(e,t,n,r,o,s,c);return e<100&&e>=0&&l.setFullYear(e),l}function he(e){return e instanceof Date&&!isNaN(e)}function fe(e){return Array.isArray(e)&&2===e.length&&e.every(he)&&e[0]<=e[1]}function pe(e){var t=new Date(e);if(he(t))return t;for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.length?pe.apply(void 0,r):new Date}function ge(e){var t=new Date(e);return t.setMonth(0,1),t.setHours(0,0,0,0),t}function me(e){var t=new Date(e);return t.setDate(1),t.setHours(0,0,0,0),t}function ve(e){var t=new Date(e);return t.setHours(0,0,0,0),t}function be(e,t){var n=new Date(e),r="function"==typeof t?t(n.getMonth()):Number(t),o=ue(n.getFullYear(),r+1,0).getDate(),c=n.getDate();return n.setMonth(r,Math.min(c,o)),n}function _e(e,t){var n=new Date(e),r="function"==typeof t?t(n.getFullYear()):t;return n.setFullYear(r),n}function ye(e,source){var t=new Date(e),time=new Date(source);return t.setHours(time.getHours(),time.getMinutes(),time.getSeconds()),t}function Ee(e,t){if(!Array.isArray(e))return[];var n=[],r=e.length,i=0;for(t=t||r;i<r;)n.push(e.slice(i,i+=t));return n}function Ce(e){return"[object Object]"===Object.prototype.toString.call(e)}function we(e,t){if(!Ce(e))return{};Array.isArray(t)||(t=[t]);var n={};return t.forEach((function(t){t in e&&(n[t]=e[t])})),n}function Se(e,source){if(!Ce(e))return{};var t=e;return Ce(source)&&Object.keys(source).forEach((function(n){var r=source[n];Ce(r)&&Ce(e[n])&&(r=Se(e[n],r)),t=te({},t,Q({},n,r))})),t}var Te,Ae=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={months:["January","February","March","April","May","June","July","August","September","October","November","December"],monthsShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysMin:["Su","Mo","Tu","We","Th","Fr","Sa"],firstDayOfWeek:0,firstWeekContainsDate:1};t.default=n,e.exports=t.default})),Re={formatLocale:(Te=Ae)&&Te.__esModule&&Object.prototype.hasOwnProperty.call(Te,"default")?Te.default:Te,yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!0},Oe="en",Ie={};function ke(e,object,t){if("string"!=typeof e)return Ie[Oe];var n=Oe;return Ie[e]&&(n=e),object&&(Ie[e]=object,n=e),t||(Oe=n),Ie[e]||Ie[Oe]}function Ne(e){return ke(e,null,!0)}function Le(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body;if(!e||e===t)return null;var style=function(e,t){return getComputedStyle(e,null).getPropertyValue(t)},n=/(auto|scroll)/,r=n.test(style(e,"overflow")+style(e,"overflow-y")+style(e,"overflow-x"));return r?e:Le(e.parentNode,t)}function Me(template,style,script,e,t,n,r,o,c,l){"boolean"!=typeof r&&(c=o,o=r,r=!1);var d,h="function"==typeof script?script.options:script;if(template&&template.render&&(h.render=template.render,h.staticRenderFns=template.staticRenderFns,h._compiled=!0,t&&(h.functional=!0)),e&&(h._scopeId=e),n?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),style&&style.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(n)},h._ssrRegister=d):style&&(d=r?function(e){style.call(this,l(e,this.$root.$options.shadowRoot))}:function(e){style.call(this,o(e))}),d)if(h.functional){var f=h.render;h.render=function(e,t){return d.call(t),f(e,t)}}else{var m=h.beforeCreate;h.beforeCreate=m?[].concat(m,d):[d]}return script}Ie[Oe]=Re;var xe,De=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("transition",{attrs:{name:e.prefixClass+"-zoom-in-down"}},[e.visible?n("div",{class:e.prefixClass+"-datepicker-main "+e.prefixClass+"-datepicker-popup",style:{top:e.top,left:e.left,position:"absolute"}},[e._t("default")],2):e._e()])},staticRenderFns:[]},undefined,{name:"Popup",inject:{prefixClass:{default:"mx"}},props:{visible:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0}},data:function(){return{top:"",left:""}},watch:{visible:{immediate:!0,handler:function(e){var t=this;this.$nextTick((function(){e&&t.displayPopup()}))}}},mounted:function(){var e=this;this.appendToBody&&document.body.appendChild(this.$el),this._clickoutEvent="ontouchend"in document?"touchstart":"mousedown",document.addEventListener(this._clickoutEvent,this.handleClickOutside);var t,n,r=this.$parent.$el;this._displayPopup=(t=function(){return e.displayPopup()},n=!1,function(){for(var e=this,r=arguments.length,o=new Array(r),c=0;c<r;c++)o[c]=arguments[c];n||(n=!0,requestAnimationFrame((function(){n=!1,t.apply(e,o)})))}),this._scrollParent=Le(r)||window,this._scrollParent.addEventListener("scroll",this._displayPopup),window.addEventListener("resize",this._displayPopup)},beforeDestroy:function(){this.appendToBody&&this.$el.parentNode&&this.$el.parentNode.removeChild(this.$el),document.removeEventListener(this._clickoutEvent,this.handleClickOutside),this._scrollParent.removeEventListener("scroll",this._displayPopup),window.removeEventListener("resize",this._displayPopup)},methods:{handleClickOutside:function(e){if(this.visible){var t=e.target,n=this.$el;n&&!n.contains(t)&&this.$emit("clickoutside",e)}},displayPopup:function(){if(this.visible){var e=this.$el,t=this.$parent.$el,n=this.appendToBody;this._popupRect||(this._popupRect=function(element){var e=element.style.display,t=element.style.visibility;element.style.display="block",element.style.visibility="hidden";var n=window.getComputedStyle(element),r=element.offsetWidth+parseInt(n.marginLeft,10)+parseInt(n.marginRight,10),o=element.offsetHeight+parseInt(n.marginTop,10)+parseInt(n.marginBottom,10);return element.style.display=e,element.style.visibility=t,{width:r,height:o}}(e));var r=this._popupRect,o=function(e,t,n,r){var o=0,c=0,l=0,d=0,h=e.getBoundingClientRect(),f=document.documentElement.clientWidth,m=document.documentElement.clientHeight;return r&&(l=window.pageXOffset+h.left,d=window.pageYOffset+h.top),o=f-h.left<t&&h.right<t?l-h.left+1:h.left+h.width/2<=f/2?l:l+h.width-t,c=h.top<=n&&m-h.bottom<=n?d+m-h.top-n:h.top+h.height/2<=m/2?d+h.height:d-n,{left:"".concat(o,"px"),top:"".concat(c,"px")}}(t,r.width,r.height,n),c=o.left,l=o.top;this.left=c,this.top=l}}}},undefined,!1,undefined,!1,void 0,void 0,void 0),Pe=Me({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"}},[t("path",{attrs:{d:"M940.218182 107.054545h-209.454546V46.545455h-65.163636v60.50909H363.054545V46.545455H297.890909v60.50909H83.781818c-18.618182 0-32.581818 13.963636-32.581818 32.581819v805.236363c0 18.618182 13.963636 32.581818 32.581818 32.581818h861.090909c18.618182 0 32.581818-13.963636 32.581818-32.581818V139.636364c-4.654545-18.618182-18.618182-32.581818-37.236363-32.581819zM297.890909 172.218182V232.727273h65.163636V172.218182h307.2V232.727273h65.163637V172.218182h176.872727v204.8H116.363636V172.218182h181.527273zM116.363636 912.290909V442.181818h795.927273v470.109091H116.363636z"}})])},staticRenderFns:[]},undefined,{},undefined,!1,undefined,!1,void 0,void 0,void 0),Ue=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:"1em",height:"1em"}},[n("path",{attrs:{d:"M0 0h24v24H0z",fill:"none"}}),e._v(" "),n("path",{attrs:{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}}),e._v(" "),n("path",{attrs:{d:"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"}})])},staticRenderFns:[]},undefined,{},undefined,!1,undefined,!1,void 0,void 0,void 0),Be=Me({render:function(){var e=this.$createElement,t=this._self._c||e;return t("svg",{attrs:{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024",width:"1em",height:"1em"}},[t("path",{attrs:{d:"M810.005333 274.005333l-237.994667 237.994667 237.994667 237.994667-60.010667 60.010667-237.994667-237.994667-237.994667 237.994667-60.010667-60.010667 237.994667-237.994667-237.994667-237.994667 60.010667-60.010667 237.994667 237.994667 237.994667-237.994667z"}})])},staticRenderFns:[]},undefined,{},undefined,!1,undefined,!1,void 0,void 0,void 0),Fe=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("button",e._g({class:[e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-btn-icon-"+e.type,{disabled:e.disabled}],attrs:{type:"button",disabled:e.disabled}},e.$listeners),[n("i",{class:e.prefixClass+"-icon-"+e.type})])},staticRenderFns:[]},undefined,{props:{type:String,disabled:Boolean},inject:{prefixClass:{default:"mx"}}},undefined,!1,undefined,!1,void 0,void 0,void 0),Ve=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-date"},[n("div",{class:e.prefixClass+"-calendar-header"},[n("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-year")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),n("icon-button",{attrs:{type:"left",disabled:e.isDisabledArrows("last-month")},on:{click:e.handleIconLeftClick}}),e._v(" "),n("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-year")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),n("icon-button",{attrs:{type:"right",disabled:e.isDisabledArrows("next-month")},on:{click:e.handleIconRightClick}}),e._v(" "),n("span",{class:e.prefixClass+"-calendar-header-label"},e._l(e.yearMonth,(function(t){return n("button",{key:t.panel,class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-btn-current-"+t.panel,attrs:{type:"button"},on:{click:function(n){return e.handlePanelChange(t.panel)}}},[e._v("\n        "+e._s(t.label)+"\n      ")])})),0)],1),e._v(" "),n("div",{class:e.prefixClass+"-calendar-content"},[n("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-date"},[n("thead",[n("tr",[e.showWeekNumber?n("th",{class:e.prefixClass+"-week-number-header"}):e._e(),e._v(" "),e._l(e.days,(function(t){return n("th",{key:t},[e._v(e._s(t))])}))],2)]),e._v(" "),n("tbody",{on:{click:e.handleCellClick}},e._l(e.dates,(function(t,i){return n("tr",{key:i,class:[e.prefixClass+"-date-row",e.getRowClasses(t)]},[e.showWeekNumber?n("td",{class:e.prefixClass+"-week-number",attrs:{"data-row-col":i+",0"}},[e._v("\n            "+e._s(e.getWeekNumber(t[0]))+"\n          ")]):e._e(),e._v(" "),e._l(t,(function(t,r){return n("td",{key:r,staticClass:"cell",class:e.getCellClasses(t),attrs:{"data-row-col":i+","+r,title:e.getCellTitle(t)},on:{mouseenter:function(n){return e.handleMouseEnter(t)},mouseleave:function(n){return e.handleMouseLeave(t)}}},[n("div",[e._v(e._s(t.getDate()))])])}))],2)})),0)])])])},staticRenderFns:[]},undefined,{name:"TableDate",components:{IconButton:Fe},inject:{getLocale:{default:function(){return Ne}},getWeek:{default:function(){return h}},prefixClass:{default:"mx"},onDateMouseEnter:{default:void 0},onDateMouseLeave:{default:void 0}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},showWeekNumber:{type:Boolean,default:!1},titleFormat:{type:String,default:"YYYY-MM-DD"},getRowClasses:{type:Function,default:function(){return[]}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{firstDayOfWeek:function(){return this.getLocale().formatLocale.firstDayOfWeek||0},yearMonth:function(){var e=this.getLocale(),t=e.yearFormat,n=e.monthBeforeYear,r=e.monthFormat,o=void 0===r?"MMM":r,c={panel:"year",label:this.formatDate(this.calendar,t)},l={panel:"month",label:this.formatDate(this.calendar,o)};return n?[l,c]:[c,l]},days:function(){var e=this.getLocale(),t=e.days||e.formatLocale.weekdaysMin;return t.concat(t).slice(this.firstDayOfWeek,this.firstDayOfWeek+7)},dates:function(){var e=this.calendar.getFullYear(),t=this.calendar.getMonth();return Ee(function(e){for(var t=e.firstDayOfWeek,n=e.year,r=e.month,o=[],c=ue(n,r,0),l=c.getDate(),d=l-(c.getDay()+7-t)%7,i=d;i<=l;i++)o.push(ue(n,r,i-l));c.setMonth(r+1,0);for(var h=c.getDate(),f=1;f<=h;f++)o.push(ue(n,r,f));for(var m=42-(l-d+1)-h,v=1;v<=m;v++)o.push(ue(n,r,h+v));return o}({firstDayOfWeek:this.firstDayOfWeek,year:e,month:t}),7)}},methods:{isDisabledArrows:function(e){var t=new Date(this.calendar);switch(e){case"last-year":t.setFullYear(t.getFullYear()-1,t.getMonth()+1,0),t.setHours(23,59,59,999);break;case"next-year":t.setFullYear(t.getFullYear()+1);break;case"last-month":t.setMonth(t.getMonth(),0),t.setHours(23,59,59,999);break;case"next-month":t.setMonth(t.getMonth()+1)}return this.disabledCalendarChanger(t,e)},handleIconLeftClick:function(){this.$emit("changecalendar",be(this.calendar,(function(e){return e-1})),"last-month")},handleIconRightClick:function(){this.$emit("changecalendar",be(this.calendar,(function(e){return e+1})),"next-month")},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e-1})),"last-year")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e+1})),"next-year")},handlePanelChange:function(e){this.$emit("changepanel",e)},handleMouseEnter:function(e){"function"==typeof this.onDateMouseEnter&&this.onDateMouseEnter(e)},handleMouseLeave:function(e){"function"==typeof this.onDateMouseLeave&&this.onDateMouseLeave(e)},handleCellClick:function(e){var t=e.target;"DIV"===t.tagName.toUpperCase()&&(t=t.parentNode);var n=t.getAttribute("data-row-col");if(n){var r=re(n.split(",").map((function(e){return parseInt(e,10)})),2),o=r[0],col=r[1],c=this.dates[o][col];this.$emit("select",new Date(c))}},formatDate:function(e,t){return w(e,t,{locale:this.getLocale().formatLocale})},getCellTitle:function(e){var t=this.titleFormat;return this.formatDate(e,t)},getWeekNumber:function(e){return this.getWeek(e,this.getLocale().formatLocale)}}},undefined,!1,undefined,!1,void 0,void 0,void 0),je=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-month"},[n("div",{class:e.prefixClass+"-calendar-header"},[n("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-year")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),n("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-year")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),n("span",{class:e.prefixClass+"-calendar-header-label"},[n("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text",attrs:{type:"button"},on:{click:e.handlePanelChange}},[e._v("\n        "+e._s(e.calendarYear)+"\n      ")])])],1),e._v(" "),n("div",{class:e.prefixClass+"-calendar-content"},[n("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-month",on:{click:e.handleClick}},e._l(e.months,(function(t,i){return n("tr",{key:i},e._l(t,(function(t,r){return n("td",{key:r,staticClass:"cell",class:e.getCellClasses(t.month),attrs:{"data-month":t.month}},[n("div",[e._v(e._s(t.text))])])})),0)})),0)])])},staticRenderFns:[]},undefined,{name:"TableMonth",components:{IconButton:Fe},inject:{getLocale:{default:function(){return Ne}},prefixClass:{default:"mx"}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},getCellClasses:{type:Function,default:function(){return[]}}},computed:{calendarYear:function(){return this.calendar.getFullYear()},months:function(){var e=this.getLocale(),t=(e.months||e.formatLocale.monthsShort).map((function(text,e){return{text:text,month:e}}));return Ee(t,3)}},methods:{isDisabledArrows:function(e){var t=new Date(this.calendar);switch(e){case"last-year":t.setFullYear(t.getFullYear()-1,11,31),t.setHours(23,59,59,999);break;case"next-year":t.setFullYear(t.getFullYear()+1,0,1)}return this.disabledCalendarChanger(t,e)},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e-1})),"last-year")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e+1})),"next-year")},handlePanelChange:function(){this.$emit("changepanel","year")},handleClick:function(e){var t=e.target;"DIV"===t.tagName.toUpperCase()&&(t=t.parentNode);var n=t.getAttribute("data-month");n&&!t.classList.contains("disabled")&&this.$emit("select",parseInt(n,10))}}},undefined,!1,undefined,!1,void 0,void 0,void 0),He=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-calendar "+e.prefixClass+"-calendar-panel-year"},[n("div",{class:e.prefixClass+"-calendar-header"},[n("icon-button",{attrs:{type:"double-left",disabled:e.isDisabledArrows("last-decade")},on:{click:e.handleIconDoubleLeftClick}}),e._v(" "),n("icon-button",{attrs:{type:"double-right",disabled:e.isDisabledArrows("next-decade")},on:{click:e.handleIconDoubleRightClick}}),e._v(" "),n("span",{class:e.prefixClass+"-calendar-header-label"},[n("span",[e._v(e._s(e.firstYear))]),e._v(" "),n("span",{class:e.prefixClass+"-calendar-decade-separator"}),e._v(" "),n("span",[e._v(e._s(e.lastYear))])])],1),e._v(" "),n("div",{class:e.prefixClass+"-calendar-content"},[n("table",{class:e.prefixClass+"-table "+e.prefixClass+"-table-year",on:{click:e.handleClick}},e._l(e.years,(function(t,i){return n("tr",{key:i},e._l(t,(function(t,r){return n("td",{key:r,staticClass:"cell",class:e.getCellClasses(t),attrs:{"data-year":t}},[n("div",[e._v(e._s(t))])])})),0)})),0)])])},staticRenderFns:[]},undefined,{name:"TableYear",components:{IconButton:Fe},inject:{prefixClass:{default:"mx"}},props:{disabledCalendarChanger:{type:Function,default:function(){return!1}},calendar:{type:Date,default:function(){return new Date}},getCellClasses:{type:Function,default:function(){return[]}},getYearPanel:{type:Function}},computed:{years:function(){var e=new Date(this.calendar);return"function"==typeof this.getYearPanel?this.getYearPanel(e):this.getYears(e)},firstYear:function(){return this.years[0][0]},lastYear:function(){var e=function(e){return e[e.length-1]};return e(e(this.years))}},methods:{isDisabledArrows:function(e){var t=new Date(this.calendar);switch(e){case"last-decade":t.setFullYear(this.firstYear-1,11,31),t.setHours(23,59,59,999);break;case"next-decade":t.setFullYear(this.lastYear+1,0,1)}return this.disabledCalendarChanger(t,e)},getYears:function(e){for(var t=10*Math.floor(e.getFullYear()/10),n=[],i=0;i<10;i++)n.push(t+i);return Ee(n,2)},handleIconDoubleLeftClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e-10})),"last-decade")},handleIconDoubleRightClick:function(){this.$emit("changecalendar",_e(this.calendar,(function(e){return e+10})),"next-decade")},handleClick:function(e){var t=e.target;"DIV"===t.tagName.toUpperCase()&&(t=t.parentNode);var n=t.getAttribute("data-year");n&&!t.classList.contains("disabled")&&this.$emit("select",parseInt(n,10))}}},undefined,!1,undefined,!1,void 0,void 0,void 0),$e={name:"CalendarPanel",inject:{prefixClass:{default:"mx"},dispatchDatePicker:{default:function(){return function(){}}}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},defaultPanel:{type:String},disabledCalendarChanger:{type:Function,default:function(){return!1}},disabledDate:{type:Function,default:function(){return!1}},type:{type:String,default:"date"},getClasses:{type:Function,default:function(){return[]}},showWeekNumber:{type:Boolean,default:void 0},getYearPanel:{type:Function},titleFormat:{type:String,default:"YYYY-MM-DD"},calendar:Date,partialUpdate:{type:Boolean,default:!1}},data:function(){var e=["date","month","year"],t=Math.max(e.indexOf(this.type),e.indexOf(this.defaultPanel));return{panel:-1!==t?e[t]:"date",innerCalendar:new Date}},computed:{innerValue:function(){var e=Array.isArray(this.value)?this.value:[this.value],map={year:ge,month:me,date:ve},t=map[this.type]||map.date;return e.filter(he).map((function(e){return t(e)}))},calendarYear:function(){return this.innerCalendar.getFullYear()},calendarMonth:function(){return this.innerCalendar.getMonth()}},watch:{value:{immediate:!0,handler:"initCalendar"},calendar:{handler:"initCalendar"},defaultValue:{handler:"initCalendar"}},methods:{initCalendar:function(){var e=this.calendar;if(!he(e)){var t=this.innerValue.length;e=pe(t>0?this.innerValue[t-1]:this.defaultValue)}this.innerCalendar=me(e)},isDisabled:function(e){return this.disabledDate(new Date(e),this.innerValue)},emitDate:function(e,t){this.isDisabled(e)||(this.$emit("select",e,t,this.innerValue),this.dispatchDatePicker("pick",e,t))},handleCalendarChange:function(e,t){var n=new Date(this.innerCalendar);this.innerCalendar=e,this.$emit("update:calendar",e),this.dispatchDatePicker("calendar-change",e,n,t)},handelPanelChange:function(e){var t=this.panel;this.panel=e,this.dispatchDatePicker("panel-change",e,t)},handleSelectYear:function(e){if("year"===this.type){var t=this.getYearCellDate(e);this.emitDate(t,"year")}else if(this.handleCalendarChange(ue(e,this.calendarMonth),"year"),this.handelPanelChange("month"),this.partialUpdate&&1===this.innerValue.length){var n=new Date(this.innerValue[0]);n.setFullYear(e),this.emitDate(n,"year")}},handleSelectMonth:function(e){if("month"===this.type){var t=this.getMonthCellDate(e);this.emitDate(t,"month")}else if(this.handleCalendarChange(ue(this.calendarYear,e),"month"),this.handelPanelChange("date"),this.partialUpdate&&1===this.innerValue.length){var n=new Date(this.innerValue[0]);n.setFullYear(this.calendarYear),this.emitDate(be(n,e),"month")}},handleSelectDate:function(e){this.emitDate(e,"week"===this.type?"week":"date")},getMonthCellDate:function(e){return ue(this.calendarYear,e)},getYearCellDate:function(e){return ue(e,0)},getDateClasses:function(e){var t=e.getMonth()!==this.calendarMonth,n=[];e.getTime()===(new Date).setHours(0,0,0,0)&&n.push("today"),t&&n.push("not-current-month");var r=this.getStateClass(e);return"active"===r&&t||n.push(r),n.concat(this.getClasses(e,this.innerValue,n.join(" ")))},getMonthClasses:function(e){var t=[];if("month"!==this.type){this.calendarMonth===e&&t.push("active");var n=this.getMonthCellDate(e);return this.disabledCalendarChanger(n,"month")&&t.push("disabled"),t}var r=this.getMonthCellDate(e);return t.push(this.getStateClass(r)),t.concat(this.getClasses(r,this.innerValue,t.join(" ")))},getYearClasses:function(e){var t=[];if("year"!==this.type){this.calendarYear===e&&t.push("active");var n=this.getYearCellDate(e);return this.disabledCalendarChanger(n,"year")&&t.push("disabled"),t}var r=this.getYearCellDate(e);return t.push(this.getStateClass(r)),t.concat(this.getClasses(r,this.innerValue,t.join(" ")))},getStateClass:function(e){return this.isDisabled(e)?"disabled":this.innerValue.some((function(t){return t.getTime()===e.getTime()}))?"active":""},getWeekState:function(e){if("week"!==this.type)return"";var t=e[0].getTime(),n=e[6].getTime();return this.innerValue.some((function(e){var time=e.getTime();return time>=t&&time<=n}))?"".concat(this.prefixClass,"-active-week"):""}},render:function(){var e=arguments[0],t=this.panel,n=this.innerCalendar;return"year"===t?e(He,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:n,getCellClasses:this.getYearClasses,getYearPanel:this.getYearPanel},on:{select:this.handleSelectYear,changecalendar:this.handleCalendarChange}}):"month"===t?e(je,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:n,getCellClasses:this.getMonthClasses},on:{select:this.handleSelectMonth,changepanel:this.handelPanelChange,changecalendar:this.handleCalendarChange}}):e(Ve,{attrs:{disabledCalendarChanger:this.disabledCalendarChanger,calendar:n,getCellClasses:this.getDateClasses,getRowClasses:this.getWeekState,titleFormat:this.titleFormat,showWeekNumber:"boolean"==typeof this.showWeekNumber?this.showWeekNumber:"week"===this.type},class:Q({},"".concat(this.prefixClass,"-calendar-week-mode"),"week"===this.type),on:{select:this.handleSelectDate,changepanel:this.handelPanelChange,changecalendar:this.handleCalendarChange}})}},ze={name:"CalendarRange",components:{CalendarPanel:$e},provide:function(){return{onDateMouseEnter:this.onDateMouseEnter,onDateMouseLeave:this.onDateMouseLeave}},inject:{prefixClass:{default:"mx"}},props:te({},$e.props),data:function(){return{innerValue:[],calendars:[],hoveredValue:null}},computed:{calendarMinDiff:function(){var map={date:1,month:12,year:120};return map[this.type]||map.date},calendarMaxDiff:function(){return 1/0},defaultValues:function(){return Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue]}},watch:{value:{immediate:!0,handler:function(){var e=this;this.innerValue=fe(this.value)?this.value:[new Date(NaN),new Date(NaN)];var t=this.innerValue.map((function(t,i){return me(pe(t,e.defaultValues[i]))}));this.updateCalendars(t)}}},methods:{handleSelect:function(e,t){var n=re(this.innerValue,2),r=n[0],o=n[1];he(r)&&!he(o)?(r.getTime()>e.getTime()?this.innerValue=[e,r]:this.innerValue=[r,e],this.emitDate(this.innerValue,t)):this.innerValue=[e,new Date(NaN)]},onDateMouseEnter:function(e){this.hoveredValue=e},onDateMouseLeave:function(){this.hoveredValue=null},emitDate:function(e,t){this.$emit("select",e,t)},updateStartCalendar:function(e){this.updateCalendars([e,this.calendars[1]],1)},updateEndCalendar:function(e){this.updateCalendars([this.calendars[0],e],0)},updateCalendars:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=this.getCalendarGap(e);if(n){var r=new Date(e[t]);r.setMonth(r.getMonth()+(0===t?-n:n)),e[t]=r}this.calendars=e},getCalendarGap:function(e){var t=re(e,2),n=t[0],r=t[1],o=12*(r.getFullYear()-n.getFullYear())+(r.getMonth()-n.getMonth()),c=this.calendarMinDiff,l=this.calendarMaxDiff;return o<c?c-o:o>l?l-o:0},getRangeClasses:function(e,t,n){var r=[].concat(this.getClasses(e,t,n));if(/disabled|active/.test(n))return r;var o=function(data,e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return e.getTime()},n=t(data),r=e.map(t),o=re(r,2),c=o[0],l=o[1];if(c>l){var d=[l,c];c=d[0],l=d[1]}return n>c&&n<l};return 2===t.length&&o(e,t)?r.concat("in-range"):1===t.length&&this.hoveredValue&&o(e,[t[0],this.hoveredValue])?r.concat("hover-in-range"):r}},render:function(){var e=this,t=arguments[0],n=this.calendars.map((function(n,r){var o=te({},e.$props,{calendar:n,value:e.innerValue,defaultValue:e.defaultValues[r],getClasses:e.getRangeClasses,partialUpdate:!1}),c={select:e.handleSelect,"update:calendar":0===r?e.updateStartCalendar:e.updateEndCalendar};return t("calendar-panel",{props:te({},o),on:te({},c)})})),r=this.prefixClass;return t("div",{class:"".concat(r,"-range-wrapper")},[n])}};var We=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-scrollbar",style:{position:"relative",overflow:"hidden"}},[n("div",{ref:"wrap",class:e.prefixClass+"-scrollbar-wrap",style:{marginRight:"-"+e.scrollbarWidth+"px"},on:{scroll:e.handleScroll}},[e._t("default")],2),e._v(" "),n("div",{class:e.prefixClass+"-scrollbar-track"},[n("div",{ref:"thumb",class:e.prefixClass+"-scrollbar-thumb",style:{height:e.thumbHeight,top:e.thumbTop},on:{mousedown:e.handleDragstart}})])])},staticRenderFns:[]},undefined,{inject:{prefixClass:{default:"mx"}},data:function(){return{scrollbarWidth:0,thumbTop:"",thumbHeight:""}},created:function(){this.scrollbarWidth=function(){if("undefined"==typeof window)return 0;if(void 0!==xe)return xe;var e=document.createElement("div");e.style.visibility="hidden",e.style.overflow="scroll",e.style.width="100px",e.style.position="absolute",e.style.top="-9999px",document.body.appendChild(e);var t=document.createElement("div");return t.style.width="100%",e.appendChild(t),xe=e.offsetWidth-t.offsetWidth,e.parentNode.removeChild(e),xe}(),document.addEventListener("mouseup",this.handleDragend)},beforeDestroy:function(){document.addEventListener("mouseup",this.handleDragend)},mounted:function(){this.$nextTick(this.getThumbSize)},methods:{getThumbSize:function(){var e=this.$refs.wrap;if(e){var t=100*e.clientHeight/e.scrollHeight;this.thumbHeight=t<100?"".concat(t,"%"):""}},handleScroll:function(e){var t=e.currentTarget,n=t.scrollHeight,r=t.scrollTop;this.thumbTop="".concat(100*r/n,"%")},handleDragstart:function(e){e.stopImmediatePropagation(),this._draggable=!0;var t=this.$refs.thumb.offsetTop;this._prevY=e.clientY-t,document.addEventListener("mousemove",this.handleDraging)},handleDraging:function(e){if(this._draggable){var t=e.clientY,n=this.$refs.wrap,r=n.scrollHeight,o=n.clientHeight,c=(t-this._prevY)*r/o;n.scrollTop=c}},handleDragend:function(){this._draggable&&(this._draggable=!1,document.removeEventListener("mousemove",this.handleDraging))}}},undefined,!1,undefined,!1,void 0,void 0,void 0),Ke=function(e){return(e=parseInt(e,10))<10?"0".concat(e):"".concat(e)},Ge=function(e,t,n){if(Array.isArray(n))return n.filter((function(t){return t>=0&&t<e}));t<=0&&(t=1);for(var r=[],i=0;i<e;i+=t)r.push(i);return r},qe=function e(element,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(n<=0)requestAnimationFrame((function(){element.scrollTop=t}));else{var r=t-element.scrollTop,o=r/n*10;requestAnimationFrame((function(){var r=element.scrollTop+o;r>=t?element.scrollTop=t:(element.scrollTop=r,e(element,t,n-10))}))}},Ye=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-time-columns"},e._l(e.columns,(function(col,i){return n("scrollbar-vertical",{key:i,class:e.prefixClass+"-time-column"},[n("ul",{class:e.prefixClass+"-time-list",attrs:{"data-type":col.type,"data-index":i},on:{click:e.handleSelect}},e._l(col.list,(function(t,r){return n("li",{key:t.value,class:[e.prefixClass+"-time-item",e.getClasses(t.value,col.type)],attrs:{"data-index":r}},[e._v("\n        "+e._s(t.text)+"\n      ")])})),0)])})),1)},staticRenderFns:[]},undefined,{name:"ListColumns",components:{ScrollbarVertical:We},inject:{prefixClass:{default:"mx"}},props:{date:Date,scrollDuration:{type:Number,default:100},getClasses:{type:Function,default:function(){return[]}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,showHour:{type:Boolean,default:!0},showMinute:{type:Boolean,default:!0},showSecond:{type:Boolean,default:!0},hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},use12h:{type:Boolean,default:!1}},computed:{columns:function(){var e=[];return this.showHour&&e.push({type:"hour",list:this.getHoursList()}),this.showMinute&&e.push({type:"minute",list:this.getMinutesList()}),this.showSecond&&e.push({type:"second",list:this.getSecondsList()}),this.use12h&&e.push({type:"ampm",list:this.getAMPMList()}),e.filter((function(e){return e.list.length>0}))}},watch:{date:{handler:function(){var e=this;this.$nextTick((function(){e.scrollToSelected(e.scrollDuration)}))}}},mounted:function(){this.scrollToSelected(0)},methods:{getHoursList:function(){var e=this;return Ge(this.use12h?12:24,this.hourStep,this.hourOptions).map((function(t){var n=new Date(e.date),text=Ke(t);return e.use12h&&(0===t&&(text="12"),n.getHours()>=12&&(t+=12)),{value:n.setHours(t),text:text}}))},getMinutesList:function(){var e=this;return Ge(60,this.minuteStep,this.minuteOptions).map((function(t){return{value:new Date(e.date).setMinutes(t),text:Ke(t)}}))},getSecondsList:function(){var e=this;return Ge(60,this.secondStep,this.secondOptions).map((function(t){return{value:new Date(e.date).setSeconds(t),text:Ke(t)}}))},getAMPMList:function(){var e=this;return["AM","PM"].map((function(text,i){var t=new Date(e.date);return{text:text,value:t.setHours(t.getHours()%12+12*i)}}))},scrollToSelected:function(e){for(var t=this.$el.querySelectorAll(".active"),i=0;i<t.length;i++){var element=t[i],n=Le(element,this.$el);if(n){var r=element.offsetTop;qe(n,r,e)}}},handleSelect:function(e){var t=e.target,n=e.currentTarget;if("LI"===t.tagName.toUpperCase()){var r=n.getAttribute("data-type"),o=parseInt(n.getAttribute("data-index"),10),c=parseInt(t.getAttribute("data-index"),10),l=this.columns[o].list[c].value;this.$emit("select",l,r)}}}},undefined,!1,undefined,!1,void 0,void 0,void 0);function Xe(){var time=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=time.split(":");if(e.length>=2){var t=parseInt(e[0],10),n=parseInt(e[1],10);return{hours:t,minutes:n}}return null}var Ze=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("scrollbar-vertical",e._l(e.list,(function(t){return n("div",{key:t.value,class:[e.prefixClass+"-time-option",e.getClasses(t.value)],on:{click:function(n){return e.handleSelect(t.value)}}},[e._v("\n    "+e._s(t.text)+"\n  ")])})),0)},staticRenderFns:[]},undefined,{name:"ListOptions",components:{ScrollbarVertical:We},inject:{getLocale:{default:function(){return Ne}},prefixClass:{default:"mx"}},props:{date:Date,options:{type:[Object,Function],default:function(){return[]}},format:{type:String,default:"HH:mm:ss"},getClasses:{type:Function,default:function(){return[]}}},computed:{list:function(){var e=[],t=this.options;if("function"==typeof t)return t()||[];var n=Xe(t.start),r=Xe(t.end),o=Xe(t.step),c=t.format||this.format;if(n&&r&&o)for(var l=n.minutes+60*n.hours,d=r.minutes+60*r.hours,h=o.minutes+60*o.hours,f=Math.floor((d-l)/h),i=0;i<=f;i++){var m=l+i*h,v=Math.floor(m/60),_=m%60,y=new Date(this.date).setHours(v,_,0);e.push({value:y,text:this.formatDate(y,c)})}return e}},mounted:function(){this.scrollToSelected()},methods:{formatDate:function(e,t){return w(e,t,{locale:this.getLocale().formatLocale})},scrollToSelected:function(){var element=this.$el.querySelector(".active");if(element){var e=Le(element,this.$el);if(e)!function(element,e){element&&(element.scrollTop=e)}(e,element.offsetTop)}},handleSelect:function(e){this.$emit("select",e,"time")}}},undefined,!1,undefined,!1,void 0,void 0,void 0),Qe=Me({render:function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{class:e.prefixClass+"-time"},[e.showTimeHeader?n("div",{class:e.prefixClass+"-time-header"},[n("button",{class:e.prefixClass+"-btn "+e.prefixClass+"-btn-text "+e.prefixClass+"-time-header-title",attrs:{type:"button"},on:{click:e.handleClickTitle}},[e._v("\n      "+e._s(e.title)+"\n    ")])]):e._e(),e._v(" "),n("div",{class:e.prefixClass+"-time-content"},[e.timePickerOptions?n("list-options",{attrs:{date:e.innerValue,"get-classes":e.getClasses,options:e.timePickerOptions,format:e.innerForamt},on:{select:e.handleSelect}}):n("list-columns",e._b({attrs:{date:e.innerValue,"get-classes":e.getClasses,"hour-options":e.hourOptions,"minute-options":e.minuteOptions,"second-options":e.secondOptions,"hour-step":e.hourStep,"minute-step":e.minuteStep,"second-step":e.secondStep,"scroll-duration":e.scrollDuration},on:{select:e.handleSelect}},"list-columns",e.ShowHourMinuteSecondAMPM,!1))],1)])},staticRenderFns:[]},undefined,{name:"TimePanel",components:{ListColumns:Ye,ListOptions:Ze},inject:{getLocale:{default:function(){return Ne}},prefixClass:{default:"mx"}},props:{value:{},defaultValue:{default:function(){var e=new Date;return e.setHours(0,0,0,0),e}},format:{default:"HH:mm:ss"},timeTitleFormat:{type:String,default:"YYYY-MM-DD"},showTimeHeader:{type:Boolean,default:!1},disabledTime:{type:Function,default:function(){return!1}},timePickerOptions:{type:[Object,Function],default:function(){return null}},hourOptions:Array,minuteOptions:Array,secondOptions:Array,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1},showHour:{type:Boolean,default:void 0},showMinute:{type:Boolean,default:void 0},showSecond:{type:Boolean,default:void 0},use12h:{type:Boolean,default:void 0},scrollDuration:{type:Number,default:100}},data:function(){return{innerValue:pe(this.value,this.defaultValue)}},computed:{title:function(){var e=this.timeTitleFormat,t=new Date(this.innerValue);return this.formatDate(t,e)},innerForamt:function(){return"string"==typeof this.format?this.format:"HH:mm:ss"},ShowHourMinuteSecondAMPM:function(){var e=this,t=this.innerForamt,n={showHour:/[HhKk]/.test(t),showMinute:/m/.test(t),showSecond:/s/.test(t),use12h:/a/i.test(t)},r={};return Object.keys(n).forEach((function(t){r[t]="boolean"==typeof e[t]?e[t]:n[t]})),r}},watch:{value:{immediate:!0,handler:function(){this.innerValue=pe(this.value,this.defaultValue)}}},methods:{formatDate:function(e,t){return w(e,t,{locale:this.getLocale().formatLocale})},isDisabledTime:function(e){return this.disabledTime(new Date(e))},isDisabledHour:function(e){var t=new Date(e);return this.isDisabledTime(t)&&this.isDisabledTime(t.setMinutes(0,0,0))&&this.isDisabledTime(t.setMinutes(59,59,999))},isDisabledMinute:function(e){var t=new Date(e);return this.isDisabledTime(t)&&this.isDisabledTime(t.setSeconds(0,0))&&this.isDisabledTime(t.setSeconds(59,999))},isDisabledAMPM:function(e){var t=new Date(e),n=t.getHours()<12?0:12,r=n+11;return this.isDisabledTime(t)&&this.isDisabledTime(t.setHours(n,0,0,0))&&this.isDisabledTime(t.setHours(r,59,59,999))},isDisabled:function(e,t){return"hour"===t?this.isDisabledHour(e):"minute"===t?this.isDisabledMinute(e):"ampm"===t?this.isDisabledAMPM(e):this.isDisabledTime(e)},handleSelect:function(e,t){var n=new Date(e);this.isDisabled(e,t)||(this.innerValue=n,this.isDisabledTime(n)||this.$emit("select",n,t))},handleClickTitle:function(){this.$emit("clicktitle")},getClasses:function(e,t){var n=new Date(e);return this.isDisabled(e,t)?"disabled":n.getTime()===this.innerValue.getTime()?"active":""}}},undefined,!1,undefined,!1,void 0,void 0,void 0),Je={name:"TimeRange",inject:{prefixClass:{default:"mx"}},props:te({},Qe.props),data:function(){return{startValue:new Date(NaN),endValue:new Date(NaN)}},watch:{value:{immediate:!0,handler:function(){if(fe(this.value)){var e=re(this.value,2),t=e[0],n=e[1];this.startValue=t,this.endValue=n}else this.startValue=new Date(NaN),this.endValue=new Date(NaN)}}},methods:{emitChange:function(e,t){var n=[this.startValue,this.endValue];this.$emit("select",n,"time"===e?"time-range":e,t)},handleSelectStart:function(e,t){this.startValue=e,this.endValue.getTime()>=e.getTime()||(this.endValue=e),this.emitChange(t,0)},handleSelectEnd:function(e,t){this.endValue=e,this.startValue.getTime()<=e.getTime()||(this.startValue=e),this.emitChange(t,1)},disabledStartTime:function(e){return this.disabledTime(e,0)},disabledEndTime:function(e){return e.getTime()<this.startValue.getTime()||this.disabledTime(e,1)}},render:function(){var e=arguments[0],t=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],n=this.prefixClass;return e("div",{class:"".concat(n,"-range-wrapper")},[e(Qe,{props:te({},te({},this.$props,{value:this.startValue,defaultValue:t[0],disabledTime:this.disabledStartTime})),on:te({},te({},this.$listeners,{select:this.handleSelectStart}))}),e(Qe,{props:te({},te({},this.$props,{value:this.endValue,defaultValue:t[1],disabledTime:this.disabledEndTime})),on:te({},te({},this.$listeners,{select:this.handleSelectEnd}))})])}},et={name:"DatetimePanel",inject:{prefixClass:{default:"mx"}},emits:["select","update:show-time-panel"],props:te({},$e.props,{},Qe.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1,this.$emit("update:show-time-panel",!1)},openTimePanel:function(){this.defaultTimeVisible=!0,this.$emit("update:show-time-panel",!0)},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){"date"===t&&this.openTimePanel();var n=ye(e,pe(this.value,this.defaultValue));this.disabledTime(new Date(n))&&(n=ye(e,this.defaultValue),this.disabledTime(new Date(n)))?this.currentValue=n:this.emitDate(n,t)}},render:function(){var e=arguments[0],t={props:te({},we(this.$props,Object.keys($e.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:te({},we(this.$props,Object.keys(Qe.props)),{showTimeHeader:!0,value:this.currentValue}),on:{select:this.emitDate,clicktitle:this.closeTimePanel}},r=this.prefixClass;return e("div",[e($e,de([{},t])),this.timeVisible&&e(Qe,de([{class:"".concat(r,"-calendar-time")},n]))])}},tt={name:"DatetimeRange",inject:{prefixClass:{default:"mx"}},emits:["select","update:show-time-panel"],props:te({},ze.props,{},Je.props,{showTimePanel:{type:Boolean,default:void 0}}),data:function(){return{defaultTimeVisible:!1,currentValue:this.value}},computed:{timeVisible:function(){return"boolean"==typeof this.showTimePanel?this.showTimePanel:this.defaultTimeVisible}},watch:{value:function(e){this.currentValue=e}},methods:{closeTimePanel:function(){this.defaultTimeVisible=!1,this.$emit("update:show-time-panel",!1)},openTimePanel:function(){this.defaultTimeVisible=!0,this.$emit("update:show-time-panel",!0)},emitDate:function(e,t){this.$emit("select",e,t)},handleSelect:function(e,t){var n=this;"date"===t&&this.openTimePanel();var r=Array.isArray(this.defaultValue)?this.defaultValue:[this.defaultValue,this.defaultValue],o=e.map((function(e,i){return ye(e,fe(n.value)?n.value[i]:r[i])}));o[1].getTime()<o[0].getTime()&&(o=[o[0],o[0]]),o.some(this.disabledTime)&&(o=e.map((function(e,i){return ye(e,r[i])}))).some(this.disabledTime)?this.currentValue=o:this.emitDate(o,t)}},render:function(){var e=arguments[0],t={props:te({},we(this.$props,Object.keys(ze.props)),{type:"date",value:this.currentValue}),on:{select:this.handleSelect}},n={props:te({},we(this.$props,Object.keys(Je.props)),{value:this.currentValue,showTimeHeader:!0}),on:{select:this.emitDate,clicktitle:this.closeTimePanel}},r=this.prefixClass;return e("div",[e(ze,de([{},t])),this.timeVisible&&e(Je,de([{class:"".concat(r,"-calendar-time")},n]))])}},nt={default:$e,time:Qe,datetime:et},it={default:ze,time:Je,datetime:tt},ot={name:"DatePicker",provide:function(){var e=this;return{getLocale:function(){return e.locale},getWeek:this.getWeek,prefixClass:this.prefixClass,dispatchDatePicker:this.$emit.bind(this)}},props:te({},et.props,{value:{},valueType:{type:String,default:"date"},type:{type:String,default:"date"},format:{type:String},formatter:{type:Object},range:{type:Boolean,default:!1},multiple:{type:Boolean,default:!1},rangeSeparator:{type:String},lang:{type:[String,Object]},placeholder:{type:String,default:""},editable:{type:Boolean,default:!0},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!0},prefixClass:{type:String,default:"mx"},inputClass:{},inputAttr:{type:Object,default:function(){return{}}},appendToBody:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},popupClass:{},popupStyle:{type:Object,default:function(){return{}}},inline:{type:Boolean,default:!1},confirm:{type:Boolean,default:!1},confirmText:{type:String,default:"OK"},renderInputText:{type:Function},shortcuts:{type:Array,validator:function(e){return Array.isArray(e)&&e.every((function(e){return Ce(e)&&"string"==typeof e.text&&"function"==typeof e.onClick}))},default:function(){return[]}}}),data:function(){return{currentValue:null,userInput:null,defaultOpen:!1,mouseInInput:!1}},computed:{popupVisible:function(){return!this.disabled&&("boolean"==typeof this.open?this.open:this.defaultOpen)},innerRangeSeparator:function(){return this.rangeSeparator||(this.multiple?",":" ~ ")},innerFormat:function(){var map={date:"YYYY-MM-DD",datetime:"YYYY-MM-DD HH:mm:ss",year:"YYYY",month:"YYYY-MM",time:"HH:mm:ss",week:"w"};return this.format||map[this.type]||map.date},innerValue:function(){var e=this.value;return this.validMultipleType?(e=Array.isArray(e)?e:[]).map(this.value2date):this.range?(e=Array.isArray(e)?e.slice(0,2):[null,null]).map(this.value2date):this.value2date(e)},text:function(){var e=this;return null!==this.userInput?this.userInput:"function"==typeof this.renderInputText?this.renderInputText(this.innerValue):this.isValidValue(this.innerValue)?Array.isArray(this.innerValue)?this.innerValue.map((function(t){return e.formatDate(t)})).join(this.innerRangeSeparator):this.formatDate(this.innerValue):""},showClearIcon:function(){return!this.disabled&&this.clearable&&this.text&&this.mouseInInput},locale:function(){return Ce(this.lang)?Se(Ne(),this.lang):Ne(this.lang)},validMultipleType:function(){return this.multiple&&!this.range&&-1!==["date","month","year"].indexOf(this.type)}},watch:{innerValue:{immediate:!0,handler:function(e){this.currentValue=e}},popupVisible:{handler:function(e){e&&(this.currentValue=this.innerValue)}}},created:function(){"object"===Z(this.format)&&console.warn("[vue2-datepicker]: The prop `format` don't support Object any more. You can use the new prop `formatter` to replace it")},methods:{handleMouseEnter:function(){this.mouseInInput=!0},handleMouseLeave:function(){this.mouseInInput=!1},handleClickOutSide:function(e){var t=e.target;this.$el.contains(t)||this.closePopup()},getFormatter:function(e){return Ce(this.formatter)&&this.formatter[e]||Ce(this.format)&&this.format[e]},getWeek:function(e,t){return"function"==typeof this.getFormatter("getWeek")?this.getFormatter("getWeek")(e,t):h(e,t)},parseDate:function(e,t){if(t=t||this.innerFormat,"function"==typeof this.getFormatter("parse"))return this.getFormatter("parse")(e,t);var n=new Date;return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{var r=n.locale,o=void 0===r?f:r,c=n.backupDate,l=void 0===c?new Date:c,h=X(e,t,o),m=h.year,v=h.month,_=h.day,y=h.hour,E=h.minute,C=h.second,w=h.millisecond,T=h.isPM,A=h.date,R=h.offset,O=h.weekday,I=h.week;if(A)return A;var k,N=[m,v,_,y,E,C,w];if(N[3]=W(N[3],T),void 0!==I&&void 0===v&&void 0===_){var L=d(void 0===m?l:new Date(m,3),{firstDayOfWeek:o.firstDayOfWeek,firstWeekContainsDate:o.firstWeekContainsDate});return new Date(L.getTime()+7*(I-1)*24*3600*1e3)}var M=K(N,l);return void 0!==R?(M[6]+=60*R*1e3,k=Y.apply(void 0,S(M))):k=G.apply(void 0,S(M)),void 0!==O&&k.getDay()!==O?new Date(NaN):k}catch(e){return new Date(NaN)}}(e,t,{locale:this.locale.formatLocale,backupDate:n})},formatDate:function(e,t){return t=t||this.innerFormat,"function"==typeof this.getFormatter("stringify")?this.getFormatter("stringify")(e,t):w(e,t,{locale:this.locale.formatLocale})},value2date:function(e){switch(this.valueType){case"date":return e instanceof Date?new Date(e.getTime()):new Date(NaN);case"timestamp":return"number"==typeof e?new Date(e):new Date(NaN);case"format":return"string"==typeof e?this.parseDate(e):new Date(NaN);default:return"string"==typeof e?this.parseDate(e,this.valueType):new Date(NaN)}},date2value:function(e){if(!he(e))return null;switch(this.valueType){case"date":return e;case"timestamp":return e.getTime();case"format":return this.formatDate(e);default:return this.formatDate(e,this.valueType)}},emitValue:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];this.userInput=null;var r=Array.isArray(e)?e.map(this.date2value):this.date2value(e);return this.$emit("input",r),this.$emit("change",r,t),n&&this.closePopup(),r},isValidValue:function(e){return this.validMultipleType?(t=e,Array.isArray(t)&&t.every(he)):this.range?fe(e):he(e);var t},isValidValueAndNotDisabled:function(e){if(!this.isValidValue(e))return!1;var t="function"==typeof this.disabledDate?this.disabledDate:function(){return!1},n="function"==typeof this.disabledTime?this.disabledTime:function(){return!1};return Array.isArray(e)||(e=[e]),e.every((function(e){return!t(e)&&!n(e)}))},handleMultipleDates:function(e,t){if(this.validMultipleType&&t){var n=t.filter((function(t){return t.getTime()!==e.getTime()}));return n.length===t.length&&n.push(e),n}return e},handleSelectDate:function(e,t,n){e=this.handleMultipleDates(e,n),this.confirm?this.currentValue=e:this.emitValue(e,t,!this.validMultipleType&&(t===this.type||"time"===t))},clear:function(){this.emitValue(this.range?[null,null]:null),this.$emit("clear")},handleClear:function(e){e.stopPropagation(),this.clear()},handleConfirmDate:function(){var e=this.emitValue(this.currentValue);this.$emit("confirm",e)},handleSelectShortcut:function(e){var t=e.currentTarget.getAttribute("data-index"),n=this.shortcuts[parseInt(t,10)];if(Ce(n)&&"function"==typeof n.onClick){var r=n.onClick(this);r&&this.emitValue(r)}},openPopup:function(e){this.popupVisible||this.disabled||(this.defaultOpen=!0,this.$emit("open",e),this.$emit("update:open",!0))},closePopup:function(){this.popupVisible&&(this.defaultOpen=!1,this.$emit("close"),this.$emit("update:open",!1))},blur:function(){this.$refs.input&&this.$refs.input.blur()},focus:function(){this.$refs.input&&this.$refs.input.focus()},handleInputChange:function(){var e=this;if(this.editable&&null!==this.userInput){var text=this.userInput.trim();if(this.userInput=null,""!==text){var t;if(this.validMultipleType)t=text.split(this.innerRangeSeparator).map((function(t){return e.parseDate(t.trim())}));else if(this.range){var n=text.split(this.innerRangeSeparator);2!==n.length&&(n=text.split(this.innerRangeSeparator.trim())),t=n.map((function(t){return e.parseDate(t.trim())}))}else t=this.parseDate(text);this.isValidValueAndNotDisabled(t)?(this.emitValue(t),this.blur()):this.$emit("input-error",text)}else this.clear()}},handleInputInput:function(e){this.userInput="string"==typeof e?e:e.target.value},handleInputKeydown:function(e){var t=e.keyCode;9===t?this.closePopup():13===t&&this.handleInputChange()},handleInputBlur:function(e){this.$emit("blur",e)},handleInputFocus:function(e){this.openPopup(e),this.$emit("focus",e)},hasSlot:function(e){return!(!this.$slots[e]&&!this.$scopedSlots[e])},renderSlot:function(e,t,n){var r=this.$scopedSlots[e];return r?r(n)||t:this.$slots[e]||t},renderInput:function(){var e=this.$createElement,t=this.prefixClass,n=te({name:"date",type:"text",autocomplete:"off",value:this.text,class:this.inputClass||"".concat(this.prefixClass,"-input"),readonly:!this.editable,disabled:this.disabled,placeholder:this.placeholder},this.inputAttr),r=n.value,o=n.class,c=ne(n,["value","class"]),l={keydown:this.handleInputKeydown,focus:this.handleInputFocus,blur:this.handleInputBlur,input:this.handleInputInput,change:this.handleInputChange},input=this.renderSlot("input",e("input",{domProps:{value:r},class:o,attrs:te({},c),on:te({},l),ref:"input"}),{props:n,events:l}),d="time"===this.type?e(Ue):e(Pe);return e("div",{class:"".concat(t,"-input-wrapper"),on:{mouseenter:this.handleMouseEnter,mouseleave:this.handleMouseLeave,click:this.openPopup},ref:"inputWrapper"},[input,this.showClearIcon?e("i",{class:"".concat(t,"-icon-clear"),on:{click:this.handleClear}},[this.renderSlot("icon-clear",e(Be))]):e("i",{class:"".concat(t,"-icon-calendar")},[this.renderSlot("icon-calendar",d)])])},renderContent:function(){var e=this.$createElement,map=this.range?it:nt,t=map[this.type]||map.default,n=te({},we(this.$props,Object.keys(t.props)),{value:this.currentValue}),r=te({},we(this.$listeners,t.emits||[]),{select:this.handleSelectDate}),content=e(t,de([{},{props:n,on:r,ref:"picker"}]));return e("div",{class:"".concat(this.prefixClass,"-datepicker-body")},[this.renderSlot("content",content,{value:this.currentValue,emit:this.handleSelectDate})])},renderSidebar:function(){var e=this,t=this.$createElement,n=this.prefixClass;return t("div",{class:"".concat(n,"-datepicker-sidebar")},[this.renderSlot("sidebar",null,{value:this.currentValue,emit:this.handleSelectDate}),this.shortcuts.map((function(r,i){return t("button",{key:i,attrs:{"data-index":i,type:"button"},class:"".concat(n,"-btn ").concat(n,"-btn-text ").concat(n,"-btn-shortcut"),on:{click:e.handleSelectShortcut}},[r.text])}))])},renderHeader:function(){return(0,this.$createElement)("div",{class:"".concat(this.prefixClass,"-datepicker-header")},[this.renderSlot("header",null,{value:this.currentValue,emit:this.handleSelectDate})])},renderFooter:function(){var e=this.$createElement,t=this.prefixClass;return e("div",{class:"".concat(t,"-datepicker-footer")},[this.renderSlot("footer",null,{value:this.currentValue,emit:this.handleSelectDate}),this.confirm?e("button",{attrs:{type:"button"},class:"".concat(t,"-btn ").concat(t,"-datepicker-btn-confirm"),on:{click:this.handleConfirmDate}},[this.confirmText]):null])}},render:function(){var e,t=arguments[0],n=this.prefixClass,r=this.inline,o=this.disabled,c=this.hasSlot("sidebar")||this.shortcuts.length?this.renderSidebar():null,content=t("div",{class:"".concat(n,"-datepicker-content")},[this.hasSlot("header")?this.renderHeader():null,this.renderContent(),this.hasSlot("footer")||this.confirm?this.renderFooter():null]);return t("div",{class:(e={},Q(e,"".concat(n,"-datepicker"),!0),Q(e,"".concat(n,"-datepicker-range"),this.range),Q(e,"".concat(n,"-datepicker-inline"),r),Q(e,"disabled",o),e)},[r?null:this.renderInput(),r?t("div",{class:"".concat(n,"-datepicker-main")},[c,content]):t(De,{ref:"popup",class:this.popupClass,style:this.popupStyle,attrs:{visible:this.popupVisible,appendToBody:this.appendToBody},on:{clickoutside:this.handleClickOutSide}},[c,content])])}};ot.locale=ke,ot.install=function(e){e.component(ot.name,ot)},"undefined"!=typeof window&&window.Vue&&ot.install(window.Vue),J(ot,{CalendarPanel:$e,CalendarRange:ze,TimePanel:Qe,TimeRange:Je,DatetimePanel:et,DatetimeRange:tt});t.default=ot},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return d})),n.d(t,"c",(function(){return c}));const r=/\(error: (.*)\)/;function o(...e){const t=e.sort(((a,b)=>a[0]-b[0])).map((p=>p[1]));return(e,n=0)=>{const o=[],c=e.split("\n");for(let i=n;i<c.length;i++){const line=c[i];if(line.length>1024)continue;const e=r.test(line)?line.replace(r,"$1"):line;if(!e.match(/\S*Error: /)){for(const n of t){const t=n(e);if(t){o.push(t);break}}if(o.length>=50)break}}return function(e){if(!e.length)return[];const t=e.slice(0,50),n=t[t.length-1].function;n&&/sentryWrapped/.test(n)&&t.pop();t.reverse();const r=t[t.length-1].function;r&&/captureMessage|captureException/.test(r)&&t.pop();return t.map((e=>({...e,filename:e.filename||t[t.length-1].filename,function:e.function||"?"})))}(o)}}function c(e){return Array.isArray(e)?o(...e):e}const l="<anonymous>";function d(e){try{return e&&"function"==typeof e&&e.name||l}catch(e){return l}}},,function(e,t,n){"use strict";var r={name:"ClientOnly",functional:!0,props:{placeholder:String,placeholderTag:{type:String,default:"div"}},render:function(e,t){var n=t.parent,r=t.slots,o=t.props,c=r(),l=c.default;void 0===l&&(l=[]);var d=c.placeholder;return n._isMounted?l:(n.$once("hook:mounted",(function(){n.$forceUpdate()})),o.placeholderTag&&(o.placeholder||d)?e(o.placeholderTag,{class:["client-only-placeholder"]},o.placeholder||d):l.length>0?l.map((function(){return e(!1)})):e(!1))}};e.exports=r},,function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var o=n(470);function c(){return!Object(o.b)()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}function l(e,t){return e.require(t)}}).call(this,n(42),n(270)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return d})),n.d(t,"d",(function(){return h}));var r=n(43);const o=Object(r.b)();function c(){if(!("fetch"in o))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function l(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function d(){if(!c())return!1;if(l(o.fetch))return!0;let e=!1;const t=o.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=l(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){}return e}function h(){return"ReportingObserver"in o}},function(e,t,n){"use strict";(function(e){var r=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function d(e,t,n){return t&&l(e.prototype,t),n&&l(e,n),e}function h(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function f(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function m(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?f(Object(source),!0).forEach((function(t){h(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):f(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}function v(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}function _(e){return(_=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,p){return(y=Object.setPrototypeOf||function(e,p){return e.__proto__=p,e})(e,p)}function E(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function C(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?E(e):t}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=_(e);if(t){var o=_(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return C(this,n)}}function S(e,t,n){return(S="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var base=function(object,e){for(;!Object.prototype.hasOwnProperty.call(object,e)&&null!==(object=_(object)););return object}(e,t);if(base){var desc=Object.getOwnPropertyDescriptor(base,t);return desc.get?desc.get.call(n):desc.value}})(e,t,n||e)}function T(e,i){return function(e){if(Array.isArray(e))return e}(e)||function(e,i){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var t=[],n=!0,r=!1,o=void 0;try{for(var c,l=e[Symbol.iterator]();!(n=(c=l.next()).done)&&(t.push(c.value),!i||t.length!==i);n=!0);}catch(e){r=!0,o=e}finally{try{n||null==l.return||l.return()}finally{if(r)throw o}}return t}(e,i)||R(e,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e){return function(e){if(Array.isArray(e))return O(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||R(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,t){if(e){if("string"==typeof e)return O(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e||"undefined"!=typeof self&&self;function I(e,t){return e(t={exports:{}},t.exports),t.exports}var k,N=I((function(e,t){!function(e){function t(e,t,n,r){var o,c=!1,l=0;function d(){o&&clearTimeout(o)}function h(){d(),c=!0}function f(){for(var h=arguments.length,f=new Array(h),m=0;m<h;m++)f[m]=arguments[m];var v=this,_=Date.now()-l;function y(){l=Date.now(),n.apply(v,f)}function E(){o=void 0}c||(r&&!o&&y(),d(),void 0===r&&_>e?y():!0!==t&&(o=setTimeout(r?E:y,void 0===r?e-_:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),f.cancel=h,f}function n(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)}e.debounce=n,e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)}));(k=N)&&k.__esModule&&Object.prototype.hasOwnProperty.call(k,"default")&&k.default;var L=I((function(e,t){var n=t.Globals={};function r(e){return function(t,time){return e(time,t)}}t.throttle=r(N.throttle),t.debounce=r(N.debounce),t.getMergedDefinition=function(e){return n.Vue.util.mergeOptions({},e)},t.reapply=function(e,t){for(;"function"==typeof e;)e=e.call(t);return e},t.omit=function(e,t){return Object.entries(e).filter((function(e){var n=T(e,1)[0];return!t.includes(n)})).reduce((function(e,t){var n=T(t,2),r=n[0],o=n[1];return e[r]=o,e}),{})},t.addGqlError=function(e){e.graphQLErrors&&e.graphQLErrors.length&&(e.gqlError=e.graphQLErrors[0])},t.noop=function(){}})),M=L.Globals,x=L.throttle,D=L.debounce,P=(L.getMergedDefinition,L.reapply),U=L.omit,B=L.addGqlError,F=(L.noop,function(){function e(t,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];c(this,e),h(this,"type",null),h(this,"vueApolloSpecialKeys",[]),this.vm=t,this.key=n,this.initialOptions=r,this.options=Object.assign({},r),this._skip=!1,this._pollInterval=null,this._watchers=[],this._destroyed=!1,this.lastApolloOptions=null,o&&this.autostart()}return d(e,[{key:"autostart",value:function(){var e=this;"function"==typeof this.options.skip?this._skipWatcher=this.vm.$watch((function(){return e.options.skip.call(e.vm,e.vm,e.key)}),this.skipChanged.bind(this),{immediate:!0,deep:this.options.deep}):this.options.skip?this._skip=!0:this.start(),"function"==typeof this.options.pollInterval&&(this._pollWatcher=this.vm.$watch(this.options.pollInterval.bind(this.vm),this.pollIntervalChanged.bind(this),{immediate:!0}))}},{key:"pollIntervalChanged",value:function(e,t){e!==t&&(this.pollInterval=e,null==e?this.stopPolling():this.startPolling(e))}},{key:"skipChanged",value:function(e,t){e!==t&&(this.skip=e)}},{key:"pollInterval",get:function(){return this._pollInterval},set:function(e){this._pollInterval=e}},{key:"skip",get:function(){return this._skip},set:function(e){e?this.stop():this.start(),this._skip=e}},{key:"refresh",value:function(){this._skip||(this.stop(),this.start())}},{key:"start",value:function(){var e=this;this.starting=!0;for(var t=function(t,n){var r=n[t];if("function"==typeof e.initialOptions[r]){var o=e.initialOptions[r].bind(e.vm);e.options[r]=o();var c=function(t){e.options[r]=t,e.refresh()};e.vm.$isServer||(c=e.options.throttle?x(c,e.options.throttle):c,c=e.options.debounce?D(c,e.options.debounce):c),e._watchers.push(e.vm.$watch(o,c,{deep:e.options.deep}))}},n=0,r=["query","document","context"];n<r.length;n++)t(n,r);if("function"==typeof this.options.variables){var o=this.executeApollo.bind(this);this.vm.$isServer||(o=this.options.throttle?x(o,this.options.throttle):o,o=this.options.debounce?D(o,this.options.debounce):o),this._watchers.push(this.vm.$watch((function(){return e.options.variables.call(e.vm)}),o,{immediate:!0,deep:this.options.deep}))}else this.executeApollo(this.options.variables)}},{key:"stop",value:function(){for(var e=0,t=this._watchers;e<t.length;e++){(0,t[e])()}this.sub&&(this.sub.unsubscribe(),this.sub=null)}},{key:"generateApolloOptions",value:function(e){var t=U(this.options,this.vueApolloSpecialKeys);return t.variables=e,this.lastApolloOptions=t,t}},{key:"executeApollo",value:function(e){this.starting=!1}},{key:"nextResult",value:function(e){var t=e.error;t&&B(t)}},{key:"callHandlers",value:function(e){for(var t=!1,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var c=0;c<e.length;c++){var l=e[c];if(l){t=!0;var d=l.apply(this.vm,r);if(void 0!==d&&!d)break}}return t}},{key:"errorHandler",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.callHandlers.apply(this,[[this.options.error,this.vm.$apollo.error,this.vm.$apollo.provider.errorHandler]].concat(t))}},{key:"catchError",value:function(e){if(B(e),!this.errorHandler(e,this.vm,this.key,this.type,this.lastApolloOptions))if(e.graphQLErrors&&0!==e.graphQLErrors.length){console.error("GraphQL execution errors for ".concat(this.type," '").concat(this.key,"'"));for(var t=0,n=e.graphQLErrors;t<n.length;t++){var r=n[t];console.error(r)}}else if(e.networkError)console.error("Error sending the ".concat(this.type," '").concat(this.key,"'"),e.networkError);else{var o;if(console.error("[vue-apollo] An error has occurred for ".concat(this.type," '").concat(this.key,"'")),Array.isArray(e))(o=console).error.apply(o,A(e));else console.error(e)}}},{key:"destroy",value:function(){this._destroyed||(this._destroyed=!0,this.stop(),this._skipWatcher&&this._skipWatcher())}}]),e}()),V=["variables","watch","update","result","error","loadingKey","watchLoading","skip","throttle","debounce","subscribeToMore","prefetch","manual"],j=function(e){v(n,e);var t=w(n);function n(e,r,o){var l,d=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,n),e.$data.$apolloData&&!e.$data.$apolloData.queries[r]&&e.$set(e.$data.$apolloData.queries,r,{loading:!1}),h(E(l=t.call(this,e,r,o,!1)),"type","query"),h(E(l),"vueApolloSpecialKeys",V),h(E(l),"_loading",!1),h(E(l),"_linkedSubscriptions",[]),e.$isServer&&(l.firstRun=new Promise((function(e,t){l._firstRunResolve=e,l._firstRunReject=t}))),l.vm.$isServer&&(l.options.fetchPolicy="network-only"),o.manual||(l.hasDataField=Object.prototype.hasOwnProperty.call(l.vm.$data,r),l.hasDataField?Object.defineProperty(l.vm.$data.$apolloData.data,r,{get:function(){return l.vm.$data[r]},enumerable:!0,configurable:!0}):Object.defineProperty(l.vm.$data,r,{get:function(){return l.vm.$data.$apolloData.data[r]},enumerable:!0,configurable:!0})),d&&l.autostart(),l}return d(n,[{key:"client",get:function(){return this.vm.$apollo.getClient(this.options)}},{key:"loading",get:function(){return this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]?this.vm.$data.$apolloData.queries[this.key].loading:this._loading},set:function(e){this._loading!==e&&(this._loading=e,this.vm.$data.$apolloData&&this.vm.$data.$apolloData.queries[this.key]&&(this.vm.$data.$apolloData.queries[this.key].loading=e,this.vm.$data.$apolloData.loading+=e?1:-1))}},{key:"stop",value:function(){S(_(n.prototype),"stop",this).call(this),this.loadingDone(),this.observer&&(this.observer.stopPolling(),this.observer=null)}},{key:"generateApolloOptions",value:function(e){var t=S(_(n.prototype),"generateApolloOptions",this).call(this,e);return this.vm.$isServer&&delete t.pollInterval,t}},{key:"executeApollo",value:function(e){var t=JSON.stringify(e);if(this.sub){if(t===this.previousVariablesJson)return;this.sub.unsubscribe();for(var r=0,o=this._linkedSubscriptions;r<o.length;r++){o[r].stop()}}if(this.previousVariablesJson=t,this.observer=this.vm.$apollo.watchQuery(this.generateApolloOptions(e)),this.startQuerySubscription(),"no-cache"!==this.options.fetchPolicy||this.options.notifyOnNetworkStatusChange){var c=this.retrieveCurrentResult();(this.options.notifyOnNetworkStatusChange||this.observer.getCurrentResult&&!c.loading)&&this.nextResult(c)}S(_(n.prototype),"executeApollo",this).call(this,e);for(var l=0,d=this._linkedSubscriptions;l<d.length;l++){d[l].start()}}},{key:"startQuerySubscription",value:function(){this.sub&&!this.sub.closed||(this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)}))}},{key:"retrieveCurrentResult",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult();return(e||t.loading)&&(this.loading||this.applyLoadingModifier(1),this.loading=!0),t}},{key:"nextResult",value:function(e){S(_(n.prototype),"nextResult",this).call(this,e);var data=e.data,t=e.loading,r=e.error,o=e.errors,c=o&&o.length;if((r||c)&&this.firstRunReject(r),t||this.loadingDone(),c){var l=new Error("GraphQL error: ".concat(o.map((function(e){return e.message})).join(" | ")));Object.assign(l,{graphQLErrors:o,networkError:null}),S(_(n.prototype),"catchError",this).call(this,l)}if("none"!==this.observer.options.errorPolicy||!r&&!c){var d="function"==typeof this.options.result;null==data||(this.options.manual?d||console.error("".concat(this.key," query must have a 'result' hook in manual mode")):"function"==typeof this.options.update?this.setData(this.options.update.call(this.vm,data)):void 0===data[this.key]&&Object.keys(data).length?console.error("Missing ".concat(this.key," attribute on result"),data):this.setData(data[this.key])),d&&this.options.result.call(this.vm,e,this.key)}}},{key:"setData",value:function(e){this.vm.$set(this.hasDataField?this.vm.$data:this.vm.$data.$apolloData.data,this.key,e)}},{key:"catchError",value:function(e){S(_(n.prototype),"catchError",this).call(this,e),this.firstRunReject(e),this.loadingDone(e),this.nextResult(this.observer.getCurrentResult?this.observer.getCurrentResult():this.observer.currentResult()),this.resubscribeToQuery()}},{key:"resubscribeToQuery",value:function(){var e=this.observer.getLastError(),t=this.observer.getLastResult();this.observer.resetLastResults(),this.startQuerySubscription(),Object.assign(this.observer,{lastError:e,lastResult:t})}},{key:"loadingKey",get:function(){return this.options.loadingKey||this.vm.$apollo.loadingKey}},{key:"watchLoading",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.callHandlers.apply(this,[[this.options.watchLoading,this.vm.$apollo.watchLoading,this.vm.$apollo.provider.watchLoading]].concat(t,[this]))}},{key:"applyLoadingModifier",value:function(e){var t=this.loadingKey;t&&"number"==typeof this.vm[t]&&(this.vm[t]+=e),this.watchLoading(1===e,e)}},{key:"loadingDone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.loading&&this.applyLoadingModifier(-1),this.loading=!1,e||this.firstRunResolve()}},{key:"fetchMore",value:function(){var e,t=this;if(this.observer)return this.retrieveCurrentResult(!0),(e=this.observer).fetchMore.apply(e,arguments).then((function(e){return e.loading||t.loadingDone(),e}))}},{key:"subscribeToMore",value:function(){var e;if(this.observer)return{unsubscribe:(e=this.observer).subscribeToMore.apply(e,arguments)}}},{key:"refetch",value:function(e){var t=this;if(e&&(this.options.variables=e),this.observer){var n=this.observer.refetch(e).then((function(e){return e.loading||t.loadingDone(),e}));return this.retrieveCurrentResult(),n}}},{key:"setVariables",value:function(e,t){if(this.options.variables=e,this.observer){var n=this.observer.setVariables(e,t);return this.retrieveCurrentResult(),n}}},{key:"setOptions",value:function(e){if(Object.assign(this.options,e),this.observer){var t=this.observer.setOptions(e);return this.retrieveCurrentResult(),t}}},{key:"startPolling",value:function(){var e;if(this.observer)return(e=this.observer).startPolling.apply(e,arguments)}},{key:"stopPolling",value:function(){var e;if(this.observer)return(e=this.observer).stopPolling.apply(e,arguments)}},{key:"firstRunResolve",value:function(){this._firstRunResolve&&(this._firstRunResolve(),this._firstRunResolve=null)}},{key:"firstRunReject",value:function(e){this._firstRunReject&&(this._firstRunReject(e),this._firstRunReject=null)}},{key:"destroy",value:function(){S(_(n.prototype),"destroy",this).call(this),this.loading&&this.watchLoading(!1,-1),this.loading=!1}}]),n}(F),H=function(e){v(n,e);var t=w(n);function n(){var e;c(this,n);for(var r=arguments.length,o=new Array(r),l=0;l<r;l++)o[l]=arguments[l];return h(E(e=t.call.apply(t,[this].concat(o))),"type","subscription"),h(E(e),"vueApolloSpecialKeys",["variables","result","error","throttle","debounce","linkedQuery"]),e}return d(n,[{key:"executeApollo",value:function(e){var t=JSON.stringify(e);if(this.sub){if(t===this.previousVariablesJson)return;this.sub.unsubscribe()}this.previousVariablesJson=t;var r=this.generateApolloOptions(e);if("function"==typeof r.updateQuery&&(r.updateQuery=r.updateQuery.bind(this.vm)),this.options.linkedQuery){if("function"==typeof this.options.result){var o=this.options.result.bind(this.vm),c=r.updateQuery&&r.updateQuery.bind(this.vm);r.updateQuery=function(){return o.apply(void 0,arguments),c&&c.apply(void 0,arguments)}}this.sub=this.options.linkedQuery.subscribeToMore(r)}else this.observer=this.vm.$apollo.subscribe(r),this.sub=this.observer.subscribe({next:this.nextResult.bind(this),error:this.catchError.bind(this)});S(_(n.prototype),"executeApollo",this).call(this,e)}},{key:"nextResult",value:function(data){S(_(n.prototype),"nextResult",this).call(this,data),"function"==typeof this.options.result&&this.options.result.call(this.vm,data,this.key)}}]),n}(F),$=function(){function e(t){c(this,e),this._apolloSubscriptions=[],this._watchers=[],this.vm=t,this.queries={},this.subscriptions={},this.client=void 0,this.loadingKey=void 0,this.error=void 0}return d(e,[{key:"provider",get:function(){return this.vm.$apolloProvider}},{key:"getClient",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!e||!e.client){if("object"===o(this.client))return this.client;if(this.client){if(this.provider.clients){var t=this.provider.clients[this.client];if(!t)throw new Error("[vue-apollo] Missing client '".concat(this.client,"' in 'apolloProvider'"));return t}throw new Error("[vue-apollo] Missing 'clients' options in 'apolloProvider'")}return this.provider.defaultClient}var n=this.provider.clients[e.client];if(!n)throw new Error("[vue-apollo] Missing client '".concat(e.client,"' in 'apolloProvider'"));return n}},{key:"query",value:function(e){return this.getClient(e).query(e)}},{key:"watchQuery",value:function(e){var t=this,n=this.getClient(e).watchQuery(e),r=n.subscribe.bind(n);return n.subscribe=function(e){var sub=r(e);return t._apolloSubscriptions.push(sub),sub},n}},{key:"mutate",value:function(e){return this.getClient(e).mutate(e)}},{key:"subscribe",value:function(e){var t=this;if(!this.vm.$isServer){var n=this.getClient(e).subscribe(e),r=n.subscribe.bind(n);return n.subscribe=function(e){var sub=r(e);return t._apolloSubscriptions.push(sub),sub},n}}},{key:"loading",get:function(){return 0!==this.vm.$data.$apolloData.loading}},{key:"data",get:function(){return this.vm.$data.$apolloData.data}},{key:"addSmartQuery",value:function(e,t){var n=this,r=P(t,this.vm);r.query||(r={query:r});var o,c=this.vm.$options.apollo,l=this.provider.defaultOptions;if(l&&l.$query&&(o=l.$query),c&&c.$query&&(o=m(m({},o||{}),c.$query)),o)for(var d in o)void 0===r[d]&&(r[d]=o[d]);var h=this.queries[e]=new j(this.vm,e,r,!1);if(this.vm.$isServer&&!1===r.prefetch||h.autostart(),!this.vm.$isServer){var f=r.subscribeToMore;f&&(Array.isArray(f)?f.forEach((function(sub,t){n.addSmartSubscription("".concat(e).concat(t),m(m({},sub),{},{linkedQuery:h}))})):this.addSmartSubscription(e,m(m({},f),{},{linkedQuery:h})))}return h}},{key:"addSmartSubscription",value:function(e,t){if(!this.vm.$isServer){t=P(t,this.vm);var n=this.subscriptions[e]=new H(this.vm,e,t,!1);return n.autostart(),t.linkedQuery&&t.linkedQuery._linkedSubscriptions.push(n),n}}},{key:"defineReactiveSetter",value:function(e,t,n){var r=this;this._watchers.push(this.vm.$watch(t,(function(t){r[e]=t}),{immediate:!0,deep:n}))}},{key:"skipAllQueries",set:function(e){for(var t in this.queries)this.queries[t].skip=e}},{key:"skipAllSubscriptions",set:function(e){for(var t in this.subscriptions)this.subscriptions[t].skip=e}},{key:"skipAll",set:function(e){this.skipAllQueries=e,this.skipAllSubscriptions=e}},{key:"destroy",value:function(){for(var e=0,t=this._watchers;e<t.length;e++){(0,t[e])()}for(var n in this.queries)this.queries[n].destroy();for(var r in this.subscriptions)this.subscriptions[r].destroy();this._apolloSubscriptions.forEach((function(sub){sub.unsubscribe()}))}}]),e}(),z=function(){function e(t){if(c(this,e),!t)throw new Error("Options argument required");this.clients=t.clients||{},t.defaultClient&&(this.clients.defaultClient=this.defaultClient=t.defaultClient),this.defaultOptions=t.defaultOptions,this.watchLoading=t.watchLoading,this.errorHandler=t.errorHandler,this.prefetch=t.prefetch}return d(e,[{key:"provide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"$apolloProvider";return console.warn("<ApolloProvider>.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly."),h({},e,this)}}]),e}();var W={name:"ApolloQuery",provide:function(){return{getDollarApollo:this.getDollarApollo,getApolloQuery:this.getApolloQuery}},props:{query:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},fetchPolicy:{type:String,default:void 0},pollInterval:{type:Number,default:void 0},notifyOnNetworkStatusChange:{type:Boolean,default:void 0},context:{type:Object,default:void 0},update:{type:Function,default:function(data){return data}},skip:{type:Boolean,default:!1},debounce:{type:Number,default:0},throttle:{type:Number,default:0},clientId:{type:String,default:void 0},deep:{type:Boolean,default:void 0},tag:{type:String,default:"div"},prefetch:{type:Boolean,default:!0},options:{type:Object,default:function(){return{}}}},data:function(){return{result:{data:null,loading:!1,networkStatus:7,error:null},times:0}},watch:{fetchPolicy:function(e){this.$apollo.queries.query.setOptions({fetchPolicy:e})},pollInterval:function(e){this.$apollo.queries.query.setOptions({pollInterval:e})},notifyOnNetworkStatusChange:function(e){this.$apollo.queries.query.setOptions({notifyOnNetworkStatusChange:e})},"$data.$apolloData.loading":function(e){this.$emit("loading",!!e)}},apollo:{$client:function(){return this.clientId},query:function(){return m(m({query:function(){return"function"==typeof this.query?this.query(r.a):this.query},variables:function(){return this.variables},fetchPolicy:this.fetchPolicy,pollInterval:this.pollInterval,debounce:this.debounce,throttle:this.throttle,notifyOnNetworkStatusChange:this.notifyOnNetworkStatusChange,context:function(){return this.context},skip:function(){return this.skip},deep:this.deep,prefetch:this.prefetch},this.options),{},{manual:!0,result:function(e){var t=e,n=t.errors,r=t.loading,o=t.networkStatus,c=e.error;e=Object.assign({},e),n&&n.length&&((c=new Error("Apollo errors occurred (".concat(n.length,")"))).graphQLErrors=n);var data={};r?Object.assign(data,this.$_previousData,e.data):c?Object.assign(data,this.$apollo.queries.query.observer.getLastResult()||{},e.data):(data=e.data,this.$_previousData=e.data);var l=function(data){return data&&Object.keys(data).length>0}(data);this.result={data:l?this.update(data):void 0,fullData:l?data:void 0,loading:r,error:c,networkStatus:o},this.times=++this.$_times,this.$emit("result",this.result)},error:function(e){this.result.loading=!1,this.result.error=e,this.$emit("error",e)}})}},created:function(){this.$_times=0},methods:{getDollarApollo:function(){return this.$apollo},getApolloQuery:function(){return this.$apollo.queries.query}},render:function(e){var t=this.$scopedSlots.default({result:this.result,times:this.times,query:this.$apollo.queries.query,isLoading:this.$apolloData.loading,gqlError:this.result&&this.result.error&&this.result.error.gqlError});return t=Array.isArray(t)?t.concat(this.$slots.default):[t].concat(this.$slots.default),this.tag?e(this.tag,t):t[0]}},K=0,G={name:"ApolloSubscribeToMore",inject:["getDollarApollo","getApolloQuery"],props:{document:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},updateQuery:{type:Function,default:void 0}},watch:{document:"refresh",variables:"refresh"},created:function(){this.$_key="sub_component_".concat(K++)},mounted:function(){this.refresh()},beforeDestroy:function(){this.destroy()},methods:{destroy:function(){this.$_sub&&this.$_sub.destroy()},refresh:function(){this.destroy();var e=this.document;"function"==typeof e&&(e=e(r.a)),this.$_sub=this.getDollarApollo().addSmartSubscription(this.$_key,{document:e,variables:this.variables,updateQuery:this.updateQuery,linkedQuery:this.getApolloQuery()})}},render:function(e){return null}},Y={props:{mutation:{type:[Function,Object],required:!0},variables:{type:Object,default:void 0},optimisticResponse:{type:Object,default:void 0},update:{type:Function,default:void 0},refetchQueries:{type:Function,default:void 0},clientId:{type:String,default:void 0},tag:{type:String,default:"div"},context:{type:Object,default:void 0}},data:function(){return{loading:!1,error:null}},watch:{loading:function(e){this.$emit("loading",e)}},methods:{mutate:function(e){var t=this;this.loading=!0,this.error=null;var n=this.mutation;return"function"==typeof n&&(n=n(r.a)),this.$apollo.mutate(m({mutation:n,client:this.clientId,variables:this.variables,optimisticResponse:this.optimisticResponse,update:this.update,refetchQueries:this.refetchQueries,context:this.context},e)).then((function(e){t.$emit("done",e),t.loading=!1})).catch((function(e){B(e),t.error=e,t.$emit("error",e),t.loading=!1}))}},render:function(e){var t=this.$scopedSlots.default({mutate:this.mutate,loading:this.loading,error:this.error,gqlError:this.error&&this.error.gqlError});return t=Array.isArray(t)?t.concat(this.$slots.default):[t].concat(this.$slots.default),this.tag?e(this.tag,t):t[0]}};function X(e,t){return void 0!==e&&Object.prototype.hasOwnProperty.call(e,t)}function Z(){var e=this.$options,t=e.apolloProvider;if(t)this.$apolloProvider="function"==typeof t?t():t;else if(e.parent&&e.parent.$apolloProvider)this.$apolloProvider=e.parent.$apolloProvider;else if(e.provide){var n="function"==typeof e.provide?e.provide.call(this):e.provide;n&&n.$apolloProvider&&(this.$apolloProvider=n.$apolloProvider)}}function Q(){var e=this;this.$_apolloInitData={};var t=this.$options.apollo;if(t){var n=function(n){"$"!==n.charAt(0)&&(t[n].manual||X(e.$options.props,n)||X(e.$options.computed,n)||X(e.$options.methods,n)||Object.defineProperty(e,n,{get:function(){return e.$data.$apolloData.data[n]},set:function(t){return e.$_apolloInitData[n]=t},enumerable:!0,configurable:!0}))};for(var r in t)n(r)}}function J(){var e=this,t=this.$apolloProvider;if(!this._apolloLaunched&&t){this._apolloLaunched=!0;var n=this.$options.apollo;if(n){for(var r in this.$_apolloPromises=[],n.$init||(n.$init=!0,t.defaultOptions&&(n=this.$options.apollo=Object.assign({},t.defaultOptions,n))),ee(this.$apollo,"skipAll",n.$skipAll,n.$deep),ee(this.$apollo,"skipAllQueries",n.$skipAllQueries,n.$deep),ee(this.$apollo,"skipAllSubscriptions",n.$skipAllSubscriptions,n.$deep),ee(this.$apollo,"client",n.$client,n.$deep),ee(this.$apollo,"loadingKey",n.$loadingKey,n.$deep),ee(this.$apollo,"error",n.$error,n.$deep),ee(this.$apollo,"watchLoading",n.$watchLoading,n.$deep),Object.defineProperty(this,"$apolloData",{get:function(){return e.$data.$apolloData},enumerable:!0,configurable:!0}),n)if("$"!==r.charAt(0)){var o=n[r],c=this.$apollo.addSmartQuery(r,o);this.$isServer&&(o=P(o,this),!1===t.prefetch||!1===o.prefetch||!1===n.$prefetch||c.skip||this.$_apolloPromises.push(c.firstRun))}if(n.subscribe&&M.Vue.util.warn("vue-apollo -> `subscribe` option is deprecated. Use the `$subscribe` option instead."),n.$subscribe)for(var l in n.$subscribe)this.$apollo.addSmartSubscription(l,n.$subscribe[l])}}}function ee(e,t,n,r){void 0!==n&&("function"==typeof n?e.defineReactiveSetter(t,n,r):e[t]=n)}function te(){this.$_apollo&&this.$_apollo.destroy()}function ne(e,t){e.mixin(m(m(m({},"1"===t?{init:Z}:{}),"2"===t?{data:function(){return{$apolloData:{queries:{},loading:0,data:this.$_apolloInitData}}},beforeCreate:function(){Z.call(this),Q.call(this)},serverPrefetch:function(){var e=this;if(this.$_apolloPromises)return Promise.all(this.$_apolloPromises).then((function(){te.call(e)})).catch((function(t){return te.call(e),Promise.reject(t)}))}}:{}),{},{created:J,destroyed:te}))}var re=["$subscribe"];z.install=function e(t,n){if(!e.installed){e.installed=!0,M.Vue=t;var r=t.version.substr(0,t.version.indexOf(".")),o=t.config.optionMergeStrategies.methods;t.config.optionMergeStrategies.apollo=function(e,t,n){if(!e)return t;if(!t)return e;for(var r=Object.assign({},U(e,re),e.data),c=Object.assign({},U(t,re),t.data),map={},i=0;i<re.length;i++){var l=re[i];map[l]=o(e[l],t[l])}return Object.assign(map,o(r,c))},Object.prototype.hasOwnProperty.call(t,"$apollo")||Object.defineProperty(t.prototype,"$apollo",{get:function(){return this.$_apollo||(this.$_apollo=new $(this)),this.$_apollo}}),ne(t,r),"2"===r&&(t.component("ApolloQuery",W),t.component("ApolloQuery",W),t.component("ApolloSubscribeToMore",G),t.component("ApolloSubscribeToMore",G),t.component("ApolloMutation",Y),t.component("ApolloMutation",Y))}},z.version="3.0.7";var ie=null;"undefined"!=typeof window?ie=window.Vue:void 0!==e&&(ie=e.Vue),ie&&ie.use(z),t.a=z}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return c}));var r=function(e,b){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,b){e.__proto__=b}||function(e,b){for(var p in b)Object.prototype.hasOwnProperty.call(b,p)&&(e[p]=b[p])})(e,b)};function o(e,b){if("function"!=typeof b&&null!==b)throw new TypeError("Class extends value "+String(b)+" is not a constructor or null");function t(){this.constructor=e}r(e,b),e.prototype=null===b?Object.create(b):(t.prototype=b.prototype,new t)}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};Object.create;Object.create},,,,,function(e,t,n){var r;!function(o,c){"use strict";var l="function",d="undefined",h="object",f="string",m="model",v="name",_="type",y="vendor",E="version",C="architecture",w="console",S="mobile",T="tablet",A="smarttv",R="wearable",O="embedded",I={extend:function(e,t){var n={};for(var i in e)t[i]&&t[i].length%2==0?n[i]=t[i].concat(e[i]):n[i]=e[i];return n},has:function(e,t){return typeof e===f&&-1!==t.toLowerCase().indexOf(e.toLowerCase())},lowerize:function(e){return e.toLowerCase()},major:function(e){return typeof e===f?e.replace(/[^\d\.]/g,"").split(".")[0]:c},trim:function(e,t){return e=e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),typeof t===d?e:e.substring(0,255)}},k={rgx:function(e,t){for(var n,r,p,q,o,d,i=0;i<t.length&&!o;){var f=t[i],m=t[i+1];for(n=r=0;n<f.length&&!o;)if(o=f[n++].exec(e))for(p=0;p<m.length;p++)d=o[++r],typeof(q=m[p])===h&&q.length>0?2==q.length?typeof q[1]==l?this[q[0]]=q[1].call(this,d):this[q[0]]=q[1]:3==q.length?typeof q[1]!==l||q[1].exec&&q[1].test?this[q[0]]=d?d.replace(q[1],q[2]):c:this[q[0]]=d?q[1].call(this,d,q[2]):c:4==q.length&&(this[q[0]]=d?q[3].call(this,d.replace(q[1],q[2])):c):this[q]=d||c;i+=2}},str:function(e,map){for(var i in map)if(typeof map[i]===h&&map[i].length>0){for(var t=0;t<map[i].length;t++)if(I.has(map[i][t],e))return"?"===i?c:i}else if(I.has(map[i],e))return"?"===i?c:i;return e}},N={browser:{oldSafari:{version:{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}},oldEdge:{version:{.1:"12.",21:"13.",31:"14.",39:"15.",41:"16.",42:"17.",44:"18."}}},os:{windows:{version:{ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"}}}},L={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[E,[v,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[E,[v,"Edge"]],[/(opera\smini)\/([\w\.-]+)/i,/(opera\s[mobiletab]{3,6})\b.+version\/([\w\.-]+)/i,/(opera)(?:.+version\/|[\/\s]+)([\w\.]+)/i],[v,E],[/opios[\/\s]+([\w\.]+)/i],[E,[v,"Opera Mini"]],[/\sopr\/([\w\.]+)/i],[E,[v,"Opera"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/\s]?([\w\.]*)/i,/(avant\s|iemobile|slim)(?:browser)?[\/\s]?([\w\.]*)/i,/(ba?idubrowser)[\/\s]?([\w\.]+)/i,/(?:ms|\()(ie)\s([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon)\/([\w\.-]+)/i,/(rekonq|puffin|brave|whale|qqbrowserlite|qq)\/([\w\.]+)/i,/(weibo)__([\d\.]+)/i],[v,E],[/(?:[\s\/]uc?\s?browser|(?:juc.+)ucweb)[\/\s]?([\w\.]+)/i],[E,[v,"UCBrowser"]],[/(?:windowswechat)?\sqbcore\/([\w\.]+)\b.*(?:windowswechat)?/i],[E,[v,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[E,[v,"WeChat"]],[/konqueror\/([\w\.]+)/i],[E,[v,"Konqueror"]],[/trident.+rv[:\s]([\w\.]{1,9})\b.+like\sgecko/i],[E,[v,"IE"]],[/yabrowser\/([\w\.]+)/i],[E,[v,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[v,/(.+)/,"$1 Secure Browser"],E],[/focus\/([\w\.]+)/i],[E,[v,"Firefox Focus"]],[/opt\/([\w\.]+)/i],[E,[v,"Opera Touch"]],[/coc_coc_browser\/([\w\.]+)/i],[E,[v,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[E,[v,"Dolphin"]],[/coast\/([\w\.]+)/i],[E,[v,"Opera Coast"]],[/xiaomi\/miuibrowser\/([\w\.]+)/i],[E,[v,"MIUI Browser"]],[/fxios\/([\w\.-]+)/i],[E,[v,"Firefox"]],[/(qihu|qhbrowser|qihoobrowser|360browser)/i],[[v,"360 Browser"]],[/(oculus|samsung|sailfish)browser\/([\w\.]+)/i],[[v,/(.+)/,"$1 Browser"],E],[/(comodo_dragon)\/([\w\.]+)/i],[[v,/_/g," "],E],[/\s(electron)\/([\w\.]+)\ssafari/i,/(tesla)(?:\sqtcarbrowser|\/(20[12]\d\.[\w\.-]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/\s]?([\w\.]+)/i],[v,E],[/(MetaSr)[\/\s]?([\w\.]+)/i,/(LBBROWSER)/i],[v],[/;fbav\/([\w\.]+);/i],[E,[v,"Facebook"]],[/FBAN\/FBIOS|FB_IAB\/FB4A/i],[[v,"Facebook"]],[/safari\s(line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/\s]([\w\.-]+)/i],[v,E],[/\bgsa\/([\w\.]+)\s.*safari\//i],[E,[v,"GSA"]],[/headlesschrome(?:\/([\w\.]+)|\s)/i],[E,[v,"Chrome Headless"]],[/\swv\).+(chrome)\/([\w\.]+)/i],[[v,"Chrome WebView"],E],[/droid.+\sversion\/([\w\.]+)\b.+(?:mobile\ssafari|safari)/i],[E,[v,"Android Browser"]],[/(chrome|omniweb|arora|[tizenoka]{5}\s?browser)\/v?([\w\.]+)/i],[v,E],[/version\/([\w\.]+)\s.*mobile\/\w+\s(safari)/i],[E,[v,"Mobile Safari"]],[/version\/([\w\.]+)\s.*(mobile\s?safari|safari)/i],[E,v],[/webkit.+?(mobile\s?safari|safari)(\/[\w\.]+)/i],[v,[E,k.str,N.browser.oldSafari.version]],[/(webkit|khtml)\/([\w\.]+)/i],[v,E],[/(navigator|netscape)\/([\w\.-]+)/i],[[v,"Netscape"],E],[/ile\svr;\srv:([\w\.]+)\).+firefox/i],[E,[v,"Firefox Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo\sbrowser|minimo|conkeror)[\/\s]?([\w\.\+]+)/i,/(firefox|seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([\w\.-]+)$/i,/(firefox)\/([\w\.]+)\s[\w\s\-]+\/[\w\.]+$/i,/(mozilla)\/([\w\.]+)\s.+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir)[\/\s]?([\w\.]+)/i,/(links)\s\(([\w\.]+)/i,/(gobrowser)\/?([\w\.]*)/i,/(ice\s?browser)\/v?([\w\._]+)/i,/(mosaic)[\/\s]([\w\.]+)/i],[v,E]],cpu:[[/(?:(amd|x(?:(?:86|64)[_-])?|wow|win)64)[;\)]/i],[[C,"amd64"]],[/(ia32(?=;))/i],[[C,I.lowerize]],[/((?:i[346]|x)86)[;\)]/i],[[C,"ia32"]],[/\b(aarch64|armv?8e?l?)\b/i],[[C,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[C,"armhf"]],[/windows\s(ce|mobile);\sppc;/i],[[C,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?:\smac|;|\))/i],[[C,/ower/,"",I.lowerize]],[/(sun4\w)[;\)]/i],[[C,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?:64|(?=v(?:[1-7]|[5-7]1)l?|;|eabi))|(?=atmel\s)avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[C,I.lowerize]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[pt]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus\s10)/i],[m,[y,"Samsung"],[_,T]],[/\b((?:s[cgp]h|gt|sm)-\w+|galaxy\snexus)/i,/\ssamsung[\s-]([\w-]+)/i,/sec-(sgh\w+)/i],[m,[y,"Samsung"],[_,S]],[/\((ip(?:hone|od)[\s\w]*);/i],[m,[y,"Apple"],[_,S]],[/\((ipad);[\w\s\),;-]+apple/i,/applecoremedia\/[\w\.]+\s\((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[m,[y,"Apple"],[_,T]],[/\b((?:agr|ags[23]|bah2?|sht?)-a?[lw]\d{2})/i],[m,[y,"Huawei"],[_,T]],[/d\/huawei([\w\s-]+)[;\)]/i,/\b(nexus\s6p|vog-[at]?l\d\d|ane-[at]?l[x\d]\d|eml-a?l\d\da?|lya-[at]?l\d[\dc]|clt-a?l\d\di?|ele-l\d\d)/i,/\b(\w{2,4}-[atu][ln][01259][019])[;\)\s]/i],[m,[y,"Huawei"],[_,S]],[/\b(poco[\s\w]+)(?:\sbuild|\))/i,/\b;\s(\w+)\sbuild\/hm\1/i,/\b(hm[\s\-_]?note?[\s_]?(?:\d\w)?)\sbuild/i,/\b(redmi[\s\-_]?(?:note|k)?[\w\s_]+)(?:\sbuild|\))/i,/\b(mi[\s\-_]?(?:a\d|one|one[\s_]plus|note lte)?[\s_]?(?:\d?\w?)[\s_]?(?:plus)?)\sbuild/i],[[m,/_/g," "],[y,"Xiaomi"],[_,S]],[/\b(mi[\s\-_]?(?:pad)(?:[\w\s_]+))(?:\sbuild|\))/i],[[m,/_/g," "],[y,"Xiaomi"],[_,T]],[/;\s(\w+)\sbuild.+\soppo/i,/\s(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007)\b/i],[m,[y,"OPPO"],[_,S]],[/\svivo\s(\w+)(?:\sbuild|\))/i,/\s(v[12]\d{3}\w?[at])(?:\sbuild|;)/i],[m,[y,"Vivo"],[_,S]],[/\s(rmx[12]\d{3})(?:\sbuild|;)/i],[m,[y,"Realme"],[_,S]],[/\s(milestone|droid(?:[2-4x]|\s(?:bionic|x2|pro|razr))?:?(\s4g)?)\b[\w\s]+build\//i,/\smot(?:orola)?[\s-](\w*)/i,/((?:moto[\s\w\(\)]+|xt\d{3,4}|nexus\s6)(?=\sbuild|\)))/i],[m,[y,"Motorola"],[_,S]],[/\s(mz60\d|xoom[\s2]{0,2})\sbuild\//i],[m,[y,"Motorola"],[_,T]],[/((?=lg)?[vl]k\-?\d{3})\sbuild|\s3\.[\s\w;-]{10}lg?-([06cv9]{3,4})/i],[m,[y,"LG"],[_,T]],[/(lm-?f100[nv]?|nexus\s[45])/i,/lg[e;\s\/-]+((?!browser|netcast)\w+)/i,/\blg(\-?[\d\w]+)\sbuild/i],[m,[y,"LG"],[_,S]],[/(ideatab[\w\-\s]+)/i,/lenovo\s?(s(?:5000|6000)(?:[\w-]+)|tab(?:[\s\w]+)|yt[\d\w-]{6}|tb[\d\w-]{6})/i],[m,[y,"Lenovo"],[_,T]],[/(?:maemo|nokia).*(n900|lumia\s\d+)/i,/nokia[\s_-]?([\w\.-]*)/i],[[m,/_/g," "],[y,"Nokia"],[_,S]],[/droid.+;\s(pixel\sc)[\s)]/i],[m,[y,"Google"],[_,T]],[/droid.+;\s(pixel[\s\daxl]{0,6})(?:\sbuild|\))/i],[m,[y,"Google"],[_,S]],[/droid.+\s([c-g]\d{4}|so[-l]\w+|xq-a\w[4-7][12])(?=\sbuild\/|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[m,[y,"Sony"],[_,S]],[/sony\stablet\s[ps]\sbuild\//i,/(?:sony)?sgp\w+(?:\sbuild\/|\))/i],[[m,"Xperia Tablet"],[y,"Sony"],[_,T]],[/\s(kb2005|in20[12]5|be20[12][59])\b/i,/\ba000(1)\sbuild/i,/\boneplus\s(a\d{4})[\s)]/i],[m,[y,"OnePlus"],[_,S]],[/(alexa)webm/i,/(kf[a-z]{2}wi)(\sbuild\/|\))/i,/(kf[a-z]+)(\sbuild\/|\)).+silk\//i],[m,[y,"Amazon"],[_,T]],[/(sd|kf)[0349hijorstuw]+(\sbuild\/|\)).+silk\//i],[[m,"Fire Phone"],[y,"Amazon"],[_,S]],[/\((playbook);[\w\s\),;-]+(rim)/i],[m,y,[_,T]],[/((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10;\s(\w+)/i],[m,[y,"BlackBerry"],[_,S]],[/(?:\b|asus_)(transfo[prime\s]{4,10}\s\w+|eeepc|slider\s\w+|nexus\s7|padfone|p00[cj])/i],[m,[y,"ASUS"],[_,T]],[/\s(z[es]6[027][01][km][ls]|zenfone\s\d\w?)\b/i],[m,[y,"ASUS"],[_,S]],[/(nexus\s9)/i],[m,[y,"HTC"],[_,T]],[/(htc)[;_\s-]{1,2}([\w\s]+(?=\)|\sbuild)|\w+)/i,/(zte)-(\w*)/i,/(alcatel|geeksphone|nexian|panasonic|(?=;\s)sony)[_\s-]?([\w-]*)/i],[y,[m,/_/g," "],[_,S]],[/droid[x\d\.\s;]+\s([ab][1-7]\-?[0178a]\d\d?)/i],[m,[y,"Acer"],[_,T]],[/droid.+;\s(m[1-5]\snote)\sbuild/i,/\bmz-([\w-]{2,})/i],[m,[y,"Meizu"],[_,S]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[\s_-]?([\w-]*)/i,/(hp)\s([\w\s]+\w)/i,/(asus)-?(\w+)/i,/(microsoft);\s(lumia[\s\w]+)/i,/(lenovo)[_\s-]?([\w-]+)/i,/linux;.+(jolla);/i,/droid.+;\s(oppo)\s?([\w\s]+)\sbuild/i],[y,m,[_,S]],[/(archos)\s(gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/\s(nook)[\w\s]+build\/(\w+)/i,/(dell)\s(strea[kpr\s\d]*[\dko])/i,/[;\/]\s?(le[\s\-]+pan)[\s\-]+(\w{1,9})\sbuild/i,/[;\/]\s?(trinity)[\-\s]*(t\d{3})\sbuild/i,/\b(gigaset)[\s\-]+(q\w{1,9})\sbuild/i,/\b(vodafone)\s([\w\s]+)(?:\)|\sbuild)/i],[y,m,[_,T]],[/\s(surface\sduo)\s/i],[m,[y,"Microsoft"],[_,T]],[/droid\s[\d\.]+;\s(fp\du?)\sbuild/i],[m,[y,"Fairphone"],[_,S]],[/\s(u304aa)\sbuild/i],[m,[y,"AT&T"],[_,S]],[/sie-(\w*)/i],[m,[y,"Siemens"],[_,S]],[/[;\/]\s?(rct\w+)\sbuild/i],[m,[y,"RCA"],[_,T]],[/[;\/\s](venue[\d\s]{2,7})\sbuild/i],[m,[y,"Dell"],[_,T]],[/[;\/]\s?(q(?:mv|ta)\w+)\sbuild/i],[m,[y,"Verizon"],[_,T]],[/[;\/]\s(?:barnes[&\s]+noble\s|bn[rt])([\w\s\+]*)\sbuild/i],[m,[y,"Barnes & Noble"],[_,T]],[/[;\/]\s(tm\d{3}\w+)\sbuild/i],[m,[y,"NuVision"],[_,T]],[/;\s(k88)\sbuild/i],[m,[y,"ZTE"],[_,T]],[/;\s(nx\d{3}j)\sbuild/i],[m,[y,"ZTE"],[_,S]],[/[;\/]\s?(gen\d{3})\sbuild.*49h/i],[m,[y,"Swiss"],[_,S]],[/[;\/]\s?(zur\d{3})\sbuild/i],[m,[y,"Swiss"],[_,T]],[/[;\/]\s?((zeki)?tb.*\b)\sbuild/i],[m,[y,"Zeki"],[_,T]],[/[;\/]\s([yr]\d{2})\sbuild/i,/[;\/]\s(dragon[\-\s]+touch\s|dt)(\w{5})\sbuild/i],[[y,"Dragon Touch"],m,[_,T]],[/[;\/]\s?(ns-?\w{0,9})\sbuild/i],[m,[y,"Insignia"],[_,T]],[/[;\/]\s?((nxa|Next)-?\w{0,9})\sbuild/i],[m,[y,"NextBook"],[_,T]],[/[;\/]\s?(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05]))\sbuild/i],[[y,"Voice"],m,[_,S]],[/[;\/]\s?(lvtel\-)?(v1[12])\sbuild/i],[[y,"LvTel"],m,[_,S]],[/;\s(ph-1)\s/i],[m,[y,"Essential"],[_,S]],[/[;\/]\s?(v(100md|700na|7011|917g).*\b)\sbuild/i],[m,[y,"Envizen"],[_,T]],[/[;\/]\s?(trio[\s\w\-\.]+)\sbuild/i],[m,[y,"MachSpeed"],[_,T]],[/[;\/]\s?tu_(1491)\sbuild/i],[m,[y,"Rotor"],[_,T]],[/(shield[\w\s]+)\sbuild/i],[m,[y,"Nvidia"],[_,T]],[/(sprint)\s(\w+)/i],[y,m,[_,S]],[/(kin\.[onetw]{3})/i],[[m,/\./g," "],[y,"Microsoft"],[_,S]],[/droid\s[\d\.]+;\s(cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[m,[y,"Zebra"],[_,T]],[/droid\s[\d\.]+;\s(ec30|ps20|tc[2-8]\d[kx])\)/i],[m,[y,"Zebra"],[_,S]],[/\s(ouya)\s/i,/(nintendo)\s([wids3utch]+)/i],[y,m,[_,w]],[/droid.+;\s(shield)\sbuild/i],[m,[y,"Nvidia"],[_,w]],[/(playstation\s[345portablevi]+)/i],[m,[y,"Sony"],[_,w]],[/[\s\(;](xbox(?:\sone)?(?!;\sxbox))[\s\);]/i],[m,[y,"Microsoft"],[_,w]],[/smart-tv.+(samsung)/i],[y,[_,A]],[/hbbtv.+maple;(\d+)/i],[[m,/^/,"SmartTV"],[y,"Samsung"],[_,A]],[/(?:linux;\snetcast.+smarttv|lg\snetcast\.tv-201\d)/i],[[y,"LG"],[_,A]],[/(apple)\s?tv/i],[y,[m,"Apple TV"],[_,A]],[/crkey/i],[[m,"Chromecast"],[y,"Google"],[_,A]],[/droid.+aft([\w])(\sbuild\/|\))/i],[m,[y,"Amazon"],[_,A]],[/\(dtv[\);].+(aquos)/i],[m,[y,"Sharp"],[_,A]],[/hbbtv\/\d+\.\d+\.\d+\s+\([\w\s]*;\s*(\w[^;]*);([^;]*)/i],[[y,I.trim],[m,I.trim],[_,A]],[/[\s\/\(](android\s|smart[-\s]?|opera\s)tv[;\)\s]/i],[[_,A]],[/((pebble))app\/[\d\.]+\s/i],[y,m,[_,R]],[/droid.+;\s(glass)\s\d/i],[m,[y,"Google"],[_,R]],[/droid\s[\d\.]+;\s(wt63?0{2,3})\)/i],[m,[y,"Zebra"],[_,R]],[/(tesla)(?:\sqtcarbrowser|\/20[12]\d\.[\w\.-]+)/i],[y,[_,O]],[/droid .+?; ([^;]+?)(?: build|\) applewebkit).+? mobile safari/i],[m,[_,S]],[/droid .+?;\s([^;]+?)(?: build|\) applewebkit).+?(?! mobile) safari/i],[m,[_,T]],[/\s(tablet|tab)[;\/]/i,/\s(mobile)(?:[;\/]|\ssafari)/i],[[_,I.lowerize]],[/(android[\w\.\s\-]{0,9});.+build/i],[m,[y,"Generic"]],[/(phone)/i],[[_,S]]],engine:[[/windows.+\sedge\/([\w\.]+)/i],[E,[v,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[E,[v,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/\s]\(?([\w\.]+)/i,/(icab)[\/\s]([23]\.[\d\.]+)/i],[v,E],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[E,v]],os:[[/microsoft\s(windows)\s(vista|xp)/i],[v,E],[/(windows)\snt\s6\.2;\s(arm)/i,/(windows\sphone(?:\sos)*)[\s\/]?([\d\.\s\w]*)/i,/(windows\smobile|windows)[\s\/]?([ntce\d\.\s]+\w)(?!.+xbox)/i],[v,[E,k.str,N.os.windows.version]],[/(win(?=3|9|n)|win\s9x\s)([nt\d\.]+)/i],[[v,"Windows"],[E,k.str,N.os.windows.version]],[/ip[honead]{2,4}\b(?:.*os\s([\w]+)\slike\smac|;\sopera)/i,/cfnetwork\/.+darwin/i],[[E,/_/g,"."],[v,"iOS"]],[/(mac\sos\sx)\s?([\w\s\.]*)/i,/(macintosh|mac(?=_powerpc)\s)(?!.+haiku)/i],[[v,"Mac OS"],[E,/_/g,"."]],[/(android|webos|palm\sos|qnx|bada|rim\stablet\sos|meego|sailfish|contiki)[\/\s-]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/\s]([\w\.]+)/i,/\((series40);/i],[v,E],[/\(bb(10);/i],[E,[v,"BlackBerry"]],[/(?:symbian\s?os|symbos|s60(?=;)|series60)[\/\s-]?([\w\.]*)/i],[E,[v,"Symbian"]],[/mozilla.+\(mobile;.+gecko.+firefox/i],[[v,"Firefox OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[E,[v,"webOS"]],[/crkey\/([\d\.]+)/i],[E,[v,"Chromecast"]],[/(cros)\s[\w]+\s([\w\.]+\w)/i],[[v,"Chromium OS"],E],[/(nintendo|playstation)\s([wids345portablevuch]+)/i,/(xbox);\s+xbox\s([^\);]+)/i,/(mint)[\/\s\(\)]?(\w*)/i,/(mageia|vectorlinux)[;\s]/i,/(joli|[kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?=\slinux)|slackware|fedora|mandriva|centos|pclinuxos|redhat|zenwalk|linpus|raspbian)(?:\sgnu\/linux)?(?:\slinux)?[\/\s-]?(?!chrom|package)([\w\.-]*)/i,/(hurd|linux)\s?([\w\.]*)/i,/(gnu)\s?([\w\.]*)/i,/\s([frentopc-]{0,4}bsd|dragonfly)\s?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku)\s(\w+)/i],[v,E],[/(sunos)\s?([\w\.\d]*)/i],[[v,"Solaris"],E],[/((?:open)?solaris)[\/\s-]?([\w\.]*)/i,/(aix)\s((\d)(?=\.|\)|\s)[\w\.])*/i,/(plan\s9|minix|beos|os\/2|amigaos|morphos|risc\sos|openvms|fuchsia)/i,/(unix)\s?([\w\.]*)/i],[v,E]]},M=function(e,t){if("object"==typeof e&&(t=e,e=c),!(this instanceof M))return new M(e,t).getResult();var n=e||(void 0!==o&&o.navigator&&o.navigator.userAgent?o.navigator.userAgent:""),r=t?I.extend(L,t):L;return this.getBrowser=function(){var e={name:c,version:c};return k.rgx.call(e,n,r.browser),e.major=I.major(e.version),e},this.getCPU=function(){var e={architecture:c};return k.rgx.call(e,n,r.cpu),e},this.getDevice=function(){var e={vendor:c,model:c,type:c};return k.rgx.call(e,n,r.device),e},this.getEngine=function(){var e={name:c,version:c};return k.rgx.call(e,n,r.engine),e},this.getOS=function(){var e={name:c,version:c};return k.rgx.call(e,n,r.os),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return n},this.setUA=function(e){return n=typeof e===f&&e.length>255?I.trim(e,255):e,this},this.setUA(n),this};M.VERSION="0.7.28",M.BROWSER={NAME:v,MAJOR:"major",VERSION:E},M.CPU={ARCHITECTURE:C},M.DEVICE={MODEL:m,VENDOR:y,TYPE:_,CONSOLE:w,MOBILE:S,SMARTTV:A,TABLET:T,WEARABLE:R,EMBEDDED:O},M.ENGINE={NAME:v,VERSION:E},M.OS={NAME:v,VERSION:E},typeof t!==d?(typeof e!==d&&e.exports&&(t=e.exports=M),t.UAParser=M):(r=function(){return M}.call(t,n,t,e))===c||(e.exports=r);var x=void 0!==o&&(o.jQuery||o.Zepto);if(x&&!x.ua){var D=new M;x.ua=D.getResult(),x.ua.get=function(){return D.getUA()},x.ua.set=function(e){D.setUA(e);var t=D.getResult();for(var n in t)x.ua[n]=t[n]}}}("object"==typeof window?window:this)},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="7.56.0"},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(16);function o(e,t){!0===t.debug&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const n=Object(r.c)();n.getScope().update(t.initialScope);const o=new e(t);n.bindClient(o)}},,,,,function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},,,,,,function(e,t,n){"use strict";var r=n(98).rotr32;function o(e,t,n){return e&t^~e&n}function c(e,t,n){return e&t^e&n^t&n}function l(e,t,n){return e^t^n}t.ft_1=function(s,e,t,n){return 0===s?o(e,t,n):1===s||3===s?l(e,t,n):2===s?c(e,t,n):void 0},t.ch32=o,t.maj32=c,t.p32=l,t.s0_256=function(e){return r(e,2)^r(e,13)^r(e,22)},t.s1_256=function(e){return r(e,6)^r(e,11)^r(e,25)},t.g0_256=function(e){return r(e,7)^r(e,18)^e>>>3},t.g1_256=function(e){return r(e,17)^r(e,19)^e>>>10}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d}));var r=Object.prototype,o=r.toString,c=r.hasOwnProperty,l=new Map;function d(a,b){try{return h(a,b)}finally{l.clear()}}function h(a,b){if(a===b)return!0;var e=o.call(a);if(e!==o.call(b))return!1;switch(e){case"[object Array]":if(a.length!==b.length)return!1;case"[object Object]":if(f(a,b))return!0;var t=Object.keys(a),n=Object.keys(b),r=t.length;if(r!==n.length)return!1;for(var l=0;l<r;++l)if(!c.call(b,t[l]))return!1;for(l=0;l<r;++l){var d=t[l];if(!h(a[d],b[d]))return!1}return!0;case"[object Error]":return a.name===b.name&&a.message===b.message;case"[object Number]":if(a!=a)return b!=b;case"[object Boolean]":case"[object Date]":return+a==+b;case"[object RegExp]":case"[object String]":return a==""+b;case"[object Map]":case"[object Set]":if(a.size!==b.size)return!1;if(f(a,b))return!0;for(var m=a.entries(),v="[object Map]"===e;;){var _=m.next();if(_.done)break;var y=_.value,E=y[0],C=y[1];if(!b.has(E))return!1;if(v&&!h(C,b.get(E)))return!1}return!0}return!1}function f(a,b){var e=l.get(a);if(e){if(e.has(b))return!0}else l.set(a,e=new Set);return e.add(b),!1}},function(e,t,n){"use strict";var r=n(274);e.exports=function e(t,path,n){var o;void 0===path&&(path=""),void 0===n&&(n=r);var c=new Map;function l(e,t){var n=c.get(t);n?n.push.apply(n,e):c.set(t,e)}if(n(t))o=null,l([path],t);else{var d=path?path+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)o=Array.prototype.map.call(t,(function(e,i){return l([""+d+i],e),null}));else if(Array.isArray(t))o=t.map((function(t,i){var r=e(t,""+d+i,n);return r.files.forEach(l),r.clone}));else if(t&&t.constructor===Object)for(var i in o={},t){var h=e(t[i],""+d+i,n);h.files.forEach(l),o[i]=h.clone}else o=t}return{clone:o,files:c}}},function(e,t,n){"use strict";var r=n(17).Buffer,o=n(647).Transform;function c(e){o.call(this),this._block=r.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}n(13)(c,o),c.prototype._transform=function(e,t,n){var r=null;try{this.update(e,t)}catch(e){r=e}n(r)},c.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},c.prototype.update=function(data,e){if(function(e,t){if(!r.isBuffer(e)&&"string"!=typeof e)throw new TypeError(t+" must be a string or a buffer")}(data,"Data"),this._finalized)throw new Error("Digest already called");r.isBuffer(data)||(data=r.from(data,e));for(var t=this._block,n=0;this._blockOffset+data.length-n>=this._blockSize;){for(var i=this._blockOffset;i<this._blockSize;)t[i++]=data[n++];this._update(),this._blockOffset=0}for(;n<data.length;)t[this._blockOffset++]=data[n++];for(var o=0,c=8*data.length;c>0;++o)this._length[o]+=c,(c=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*c);return this},c.prototype._update=function(){throw new Error("_update is not implemented")},c.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var i=0;i<4;++i)this._length[i]=0;return t},c.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=c},function(e,t,n){"use strict";(function(t,r){var o;e.exports=L,L.ReadableState=N;n(137).EventEmitter;var c=function(e,t){return e.listeners(t).length},l=n(401),d=n(46).Buffer,h=t.Uint8Array||function(){};var f,m=n(648);f=m&&m.debuglog?m.debuglog("stream"):function(){};var v,_,y,E=n(649),C=n(402),w=n(403).getHighWaterMark,S=n(155).codes,T=S.ERR_INVALID_ARG_TYPE,A=S.ERR_STREAM_PUSH_AFTER_EOF,R=S.ERR_METHOD_NOT_IMPLEMENTED,O=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(13)(L,l);var I=C.errorOrDestroy,k=["error","close","destroy","pause","resume"];function N(e,t,r){o=o||n(156),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(138).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function L(e){if(o=o||n(156),!(this instanceof L))return new L(e);var t=this instanceof o;this._readableState=new N(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function M(e,t,n,r,o){f("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(f("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}(e,l);else if(o||(c=function(e,t){var n;r=t,d.isBuffer(r)||r instanceof h||"string"==typeof t||void 0===t||e.objectMode||(n=new T("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(l,t)),c)I(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),r)l.endEmitted?I(e,new O):x(e,l,t,!0);else if(l.ended)I(e,new A);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?x(e,l,t,!1):F(e,l)):x(e,l,t,!1)}else r||(l.reading=!1,F(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&U(e)),F(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=C.destroy,L.prototype._undestroy=C.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=d.from(e,t),t=""),n=!0),M(this,e,t,!1,n)},L.prototype.unshift=function(e){return M(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){v||(v=n(138).StringDecoder);var t=new v(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";null!==p;)content+=t.write(p.data),p=p.next;return this._readableState.buffer.clear(),""!==content&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};var D=1073741824;function P(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function U(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(B,e))}function B(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function F(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(V,e,t))}function V(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(f("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function j(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function H(e){f("readable nexttick read 0"),e.read(0)}function $(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function K(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(G,t,e))}function G(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function Y(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}L.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):U(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&K(this),null;var r,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",o=!0),t.ended||t.reading?f("reading or ended",o=!1):o&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=P(n,t))),null===(r=e>0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&K(this)),null!==r&&this.emit("data",r),r},L.prototype._read=function(e){I(this,new R("_read()"))},L.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?h:w;function d(t,r){f("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",E),e.removeListener("finish",C),e.removeListener("drain",m),e.removeListener("error",y),e.removeListener("unpipe",d),n.removeListener("end",h),n.removeListener("end",w),n.removeListener("data",_),v=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||m())}function h(){f("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",d);var m=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,z(e))}}(n);e.on("drain",m);var v=!1;function _(t){f("ondata");var r=e.write(t);f("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Y(o.pipes,e))&&!v&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function y(t){f("onerror",t),w(),e.removeListener("error",y),0===c(e,"error")&&I(e,t)}function E(){e.removeListener("finish",C),w()}function C(){f("onfinish"),e.removeListener("close",E),w()}function w(){f("unpipe"),n.unpipe(e)}return n.on("data",_),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",E),e.once("finish",C),e.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var c=Y(t.pipes,e);return-1===c||(t.pipes.splice(c,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},L.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,f("on readable",o.length,o.reading),o.length?U(this):o.reading||r.nextTick(H,this))),n},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var n=l.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(j,this),n},L.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(j,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick($,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(f("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===_&&(_=n(651)),_(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=W,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===y&&(y=n(652)),y(L,e,t)})}).call(this,n(23),n(42))},function(e,t,n){e.exports=n(137).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,t){o(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,c){var l=this,d=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return d||h?(c?c(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,e)):t.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!c&&e?l._writableState?l._writableState.errorEmitted?t.nextTick(r,l):(l._writableState.errorEmitted=!0,t.nextTick(n,l,e)):t.nextTick(n,l,e):c?(t.nextTick(r,l),c(e)):t.nextTick(r,l)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(42))},function(e,t,n){"use strict";var r=n(155).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var c=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=c){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new r(o?n:"highWaterMark",c);return Math.floor(c)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";(function(t,r){function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var c;e.exports=L,L.WritableState=N;var l={deprecate:n(276)},d=n(401),h=n(46).Buffer,f=t.Uint8Array||function(){};var m,v=n(402),_=n(403).getHighWaterMark,y=n(155).codes,E=y.ERR_INVALID_ARG_TYPE,C=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_MULTIPLE_CALLBACK,S=y.ERR_STREAM_CANNOT_PIPE,T=y.ERR_STREAM_DESTROYED,A=y.ERR_STREAM_NULL_VALUES,R=y.ERR_STREAM_WRITE_AFTER_END,O=y.ERR_UNKNOWN_ENCODING,I=v.errorOrDestroy;function k(){}function N(e,t,l){c=c||n(156),e=e||{},"boolean"!=typeof l&&(l=t instanceof c),this.objectMode=!!e.objectMode,l&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=_(this,e,"writableHighWaterMark",l),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,o=n.sync,c=n.writecb;if("function"!=typeof c)throw new w;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,o,c){--t.pendingcb,n?(r.nextTick(c,o),r.nextTick(B,e,t),e._writableState.errorEmitted=!0,I(e,o)):(c(o),e._writableState.errorEmitted=!0,I(e,o),B(e,t))}(e,n,o,t,c);else{var l=P(n)||e.destroyed;l||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),o?r.nextTick(x,e,n,l,c):x(e,n,l,c)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function L(e){var t=this instanceof(c=c||n(156));if(!t&&!m.call(L,this))return new L(e);this._writableState=new N(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function M(e,t,n,r,o,c,l){t.writelen=r,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new T("write")):n?e._writev(o,t.onwrite):e._write(o,c,t.onwrite),t.sync=!1}function x(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),B(e,t)}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,c=new Array(r),l=t.corkedRequestsFree;l.entry=n;for(var d=0,h=!0;n;)c[d]=n,n.isBuf||(h=!1),n=n.next,d+=1;c.allBuffers=h,M(e,t,!0,t.length,c,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,m=n.encoding,v=n.callback;if(M(e,t,!1,t.objectMode?1:f.length,f,m,v),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final((function(n){t.pendingcb--,n&&I(e,n),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var n=P(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(U,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return n}n(13)(L,d),N.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(N.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(m=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(object){return!!m.call(this,object)||this===L&&(object&&object._writableState instanceof N)}})):m=function(object){return object instanceof this},L.prototype.pipe=function(){I(this,new S)},L.prototype.write=function(e,t,n){var o,c=this._writableState,l=!1,d=!c.objectMode&&(o=e,h.isBuffer(o)||o instanceof f);return d&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),d?t="buffer":t||(t=c.defaultEncoding),"function"!=typeof n&&(n=k),c.ending?function(e,t){var n=new R;I(e,n),r.nextTick(t,n)}(this,n):(d||function(e,t,n,o){var c;return null===n?c=new A:"string"==typeof n||t.objectMode||(c=new E("chunk",["string","Buffer"],n)),!c||(I(e,c),r.nextTick(o,c),!1)}(this,c,e,n))&&(c.pendingcb++,l=function(e,t,n,r,o,c){if(!n){var l=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==l&&(n=!0,o="buffer",r=l)}var d=t.objectMode?1:r.length;t.length+=d;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var m=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:c,next:null},m?m.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,d,r,o,c);return f}(this,c,d,e,t,n)),l},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new O(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,n){n(new C("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,n){var o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,B(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=v.destroy,L.prototype._undestroy=v.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,n(23),n(42))},function(e,t,n){"use strict";e.exports=m;var r=n(155).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,c=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=r.ERR_TRANSFORM_WITH_LENGTH_0,h=n(156);function f(e,data){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(null===n)return this.emit("error",new c);t.writechunk=null,t.writecb=null,null!=data&&this.push(data),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function m(e){if(!(this instanceof m))return new m(e);h.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",v)}function v(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?_(this,null,null):this._flush((function(t,data){_(e,t,data)}))}function _(e,t,data){if(t)return e.emit("error",t);if(null!=data&&e.push(data),e._writableState.length)throw new d;if(e._transformState.transforming)throw new l;return e.push(null)}n(13)(m,h),m.prototype.push=function(e,t){return this._transformState.needTransform=!1,h.prototype.push.call(this,e,t)},m.prototype._transform=function(e,t,n){n(new o("_transform()"))},m.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},m.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},m.prototype._destroy=function(e,t){h.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,n){var r=n(13),o=n(157),c=n(17).Buffer,l=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);function h(){this.init(),this._w=d,o.call(this,64,56)}function f(e,t,n){return n^e&(t^n)}function m(e,t,n){return e&t|n&(e|t)}function v(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function _(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function y(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(h,o),h.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},h.prototype._update=function(e){for(var t,n=this._w,a=0|this._a,b=0|this._b,r=0|this._c,o=0|this._d,c=0|this._e,d=0|this._f,g=0|this._g,h=0|this._h,i=0;i<16;++i)n[i]=e.readInt32BE(4*i);for(;i<64;++i)n[i]=0|(((t=n[i-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[i-7]+y(n[i-15])+n[i-16];for(var E=0;E<64;++E){var C=h+_(c)+f(c,d,g)+l[E]+n[E]|0,w=v(a)+m(a,b,r)|0;h=g,g=d,d=c,c=o+C|0,o=r,r=b,b=a,a=C+w|0}this._a=a+this._a|0,this._b=b+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=d+this._f|0,this._g=g+this._g|0,this._h=h+this._h|0},h.prototype._hash=function(){var e=c.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=h},function(e,t,n){var r=n(13),o=n(157),c=n(17).Buffer,l=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],d=new Array(160);function h(){this.init(),this._w=d,o.call(this,128,112)}function f(e,t,n){return n^e&(t^n)}function m(e,t,n){return e&t|n&(e|t)}function v(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function _(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function y(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function E(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function C(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function w(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function S(a,b){return a>>>0<b>>>0?1:0}r(h,o),h.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},h.prototype._update=function(e){for(var t=this._w,n=0|this._ah,r=0|this._bh,o=0|this._ch,c=0|this._dh,d=0|this._eh,h=0|this._fh,T=0|this._gh,A=0|this._hh,R=0|this._al,O=0|this._bl,I=0|this._cl,dl=0|this._dl,k=0|this._el,N=0|this._fl,L=0|this._gl,M=0|this._hl,i=0;i<32;i+=2)t[i]=e.readInt32BE(4*i),t[i+1]=e.readInt32BE(4*i+4);for(;i<160;i+=2){var x=t[i-30],D=t[i-30+1],P=y(x,D),U=E(D,x),B=C(x=t[i-4],D=t[i-4+1]),F=w(D,x),V=t[i-14],j=t[i-14+1],H=t[i-32],$=t[i-32+1],z=U+j|0,W=P+V+S(z,U)|0;W=(W=W+B+S(z=z+F|0,F)|0)+H+S(z=z+$|0,$)|0,t[i]=W,t[i+1]=z}for(var K=0;K<160;K+=2){W=t[K],z=t[K+1];var G=m(n,r,o),Y=m(R,O,I),X=v(n,R),Z=v(R,n),Q=_(d,k),J=_(k,d),ee=l[K],te=l[K+1],ne=f(d,h,T),re=f(k,N,L),ie=M+J|0,oe=A+Q+S(ie,M)|0;oe=(oe=(oe=oe+ne+S(ie=ie+re|0,re)|0)+ee+S(ie=ie+te|0,te)|0)+W+S(ie=ie+z|0,z)|0;var ae=Z+Y|0,se=X+G+S(ae,Z)|0;A=T,M=L,T=h,L=N,h=d,N=k,d=c+oe+S(k=dl+ie|0,dl)|0,c=o,dl=I,o=r,I=O,r=n,O=R,n=oe+se+S(R=ie+ae|0,ie)|0}this._al=this._al+R|0,this._bl=this._bl+O|0,this._cl=this._cl+I|0,this._dl=this._dl+dl|0,this._el=this._el+k|0,this._fl=this._fl+N|0,this._gl=this._gl+L|0,this._hl=this._hl+M|0,this._ah=this._ah+n+S(this._al,R)|0,this._bh=this._bh+r+S(this._bl,O)|0,this._ch=this._ch+o+S(this._cl,I)|0,this._dh=this._dh+c+S(this._dl,dl)|0,this._eh=this._eh+d+S(this._el,k)|0,this._fh=this._fh+h+S(this._fl,N)|0,this._gh=this._gh+T+S(this._gl,L)|0,this._hh=this._hh+A+S(this._hl,M)|0},h.prototype._hash=function(){var e=c.allocUnsafe(64);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=h},function(e,t,n){"use strict";(function(t,r){var o=n(212);e.exports=A;var c,l=n(390);A.ReadableState=T;n(137).EventEmitter;var d=function(e,t){return e.listeners(t).length},h=n(409),f=n(281).Buffer,m=t.Uint8Array||function(){};var v=Object.create(n(183));v.inherits=n(13);var _=n(660),y=void 0;y=_&&_.debuglog?_.debuglog("stream"):function(){};var E,C=n(661),w=n(410);v.inherits(A,h);var S=["error","close","destroy","pause","resume"];function T(e,t){e=e||{};var r=t instanceof(c=c||n(139));this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var o=e.highWaterMark,l=e.readableHighWaterMark,d=this.objectMode?16:16384;this.highWaterMark=o||0===o?o:r&&(l||0===l)?l:d,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new C,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(E||(E=n(138).StringDecoder),this.decoder=new E(e.encoding),this.encoding=e.encoding)}function A(e){if(c=c||n(139),!(this instanceof A))return new A(e);this._readableState=new T(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),h.call(this)}function R(e,t,n,r,o){var c,l=e._readableState;null===t?(l.reading=!1,function(e,t){if(t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,N(e)}(e,l)):(o||(c=function(e,t){var n;r=t,f.isBuffer(r)||r instanceof m||"string"==typeof t||void 0===t||e.objectMode||(n=new TypeError("Invalid non-string/buffer chunk"));var r;return n}(l,t)),c?e.emit("error",c):l.objectMode||t&&t.length>0?("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===f.prototype||(t=function(e){return f.from(e)}(t)),r?l.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):O(e,l,t,!0):l.ended?e.emit("error",new Error("stream.push() after EOF")):(l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?O(e,l,t,!1):M(e,l)):O(e,l,t,!1))):r||(l.reading=!1));return function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(l)}function O(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(e.emit("data",n),e.read(0)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&N(e)),M(e,t)}Object.defineProperty(A.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=w.destroy,A.prototype._undestroy=w.undestroy,A.prototype._destroy=function(e,t){this.push(null),t(e)},A.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=f.from(e,t),t=""),n=!0),R(this,e,t,!1,n)},A.prototype.unshift=function(e){return R(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){return E||(E=n(138).StringDecoder),this._readableState.decoder=new E(e),this._readableState.encoding=e,this};var I=8388608;function k(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=I?e=I:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function N(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(y("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?o.nextTick(L,e):L(e))}function L(e){y("emit readable"),e.emit("readable"),U(e)}function M(e,t){t.readingMore||(t.readingMore=!0,o.nextTick(x,e,t))}function x(e,t){for(var n=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(y("maybeReadMore read 0"),e.read(0),n!==t.length);)n=t.length;t.readingMore=!1}function D(e){y("readable nexttick read 0"),e.read(0)}function P(e,t){t.reading||(y("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(y("flow",t.flowing);t.flowing&&null!==e.read(););}function B(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):n=function(e,t,n){var r;e<t.head.data.length?(r=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):r=e===t.head.data.length?t.shift():n?function(e,t){var p=t.head,n=1,r=p.data;e-=r.length;for(;p=p.next;){var o=p.data,c=e>o.length?o.length:e;if(c===o.length?r+=o:r+=o.slice(0,e),0===(e-=c)){c===o.length?(++n,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break}++n}return t.length-=n,r}(e,t):function(e,t){var n=f.allocUnsafe(e),p=t.head,r=1;p.data.copy(n),e-=p.data.length;for(;p=p.next;){var o=p.data,c=e>o.length?o.length:e;if(o.copy(n,n.length-e,0,c),0===(e-=c)){c===o.length?(++r,p.next?t.head=p.next:t.head=t.tail=null):(t.head=p,p.data=o.slice(c));break}++r}return t.length-=r,n}(e,t);return r}(e,t.buffer,t.decoder),n);var n}function F(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,o.nextTick(V,t,e))}function V(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function j(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}A.prototype.read=function(e){y("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return y("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?F(this):N(this),null;if(0===(e=k(e,t))&&t.ended)return 0===t.length&&F(this),null;var r,o=t.needReadable;return y("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&y("length less than watermark",o=!0),t.ended||t.reading?y("reading or ended",o=!1):o&&(y("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=k(n,t))),null===(r=e>0?B(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&F(this)),null!==r&&this.emit("data",r),r},A.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},A.prototype.pipe=function(e,t){var n=this,c=this._readableState;switch(c.pipesCount){case 0:c.pipes=e;break;case 1:c.pipes=[c.pipes,e];break;default:c.pipes.push(e)}c.pipesCount+=1,y("pipe count=%d opts=%j",c.pipesCount,t);var h=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?m:A;function f(t,r){y("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,y("cleanup"),e.removeListener("close",S),e.removeListener("finish",T),e.removeListener("drain",v),e.removeListener("error",w),e.removeListener("unpipe",f),n.removeListener("end",m),n.removeListener("end",A),n.removeListener("data",C),_=!0,!c.awaitDrain||e._writableState&&!e._writableState.needDrain||v())}function m(){y("onend"),e.end()}c.endEmitted?o.nextTick(h):n.once("end",h),e.on("unpipe",f);var v=function(e){return function(){var t=e._readableState;y("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&d(e,"data")&&(t.flowing=!0,U(e))}}(n);e.on("drain",v);var _=!1;var E=!1;function C(t){y("ondata"),E=!1,!1!==e.write(t)||E||((1===c.pipesCount&&c.pipes===e||c.pipesCount>1&&-1!==j(c.pipes,e))&&!_&&(y("false write response, pause",n._readableState.awaitDrain),n._readableState.awaitDrain++,E=!0),n.pause())}function w(t){y("onerror",t),A(),e.removeListener("error",w),0===d(e,"error")&&e.emit("error",t)}function S(){e.removeListener("finish",T),A()}function T(){y("onfinish"),e.removeListener("close",S),A()}function A(){y("unpipe"),n.unpipe(e)}return n.on("data",C),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?l(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",w),e.once("close",S),e.once("finish",T),e.emit("pipe",n),c.flowing||(y("pipe resume"),n.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,n);return this}var c=j(t.pipes,e);return-1===c||(t.pipes.splice(c,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},A.prototype.on=function(e,t){var n=h.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var r=this._readableState;r.endEmitted||r.readableListening||(r.readableListening=r.needReadable=!0,r.emittedReadable=!1,r.reading?r.length&&N(this):o.nextTick(D,this))}return n},A.prototype.addListener=A.prototype.on,A.prototype.resume=function(){var e=this._readableState;return e.flowing||(y("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,o.nextTick(P,e,t))}(this,e)),this},A.prototype.pause=function(){return y("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(y("pause"),this._readableState.flowing=!1,this.emit("pause")),this},A.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(y("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(y("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<S.length;o++)e.on(S[o],this.emit.bind(this,S[o]));return this._read=function(t){y("wrapped _read",t),r&&(r=!1,e.resume())},this},Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),A._fromList=B}).call(this,n(23),n(42))},function(e,t,n){e.exports=n(137).EventEmitter},function(e,t,n){"use strict";var r=n(212);function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var n=this,c=this._readableState&&this._readableState.destroyed,l=this._writableState&&this._writableState.destroyed;return c||l?(t?t(e):!e||this._writableState&&this._writableState.errorEmitted||r.nextTick(o,this,e),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?(r.nextTick(o,n,e),n._writableState&&(n._writableState.errorEmitted=!0)):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},function(e,t,n){"use strict";e.exports=l;var r=n(139),o=Object.create(n(183));function c(e,data){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));t.writechunk=null,t.writecb=null,null!=data&&this.push(data),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);r.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",d)}function d(){var e=this;"function"==typeof this._flush?this._flush((function(t,data){h(e,t,data)})):h(this,null,null)}function h(e,t,data){if(t)return e.emit("error",t);if(null!=data&&e.push(data),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}o.inherits=n(13),o.inherits(l,r),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,r.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,n){throw new Error("_transform() is not implemented")},l.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},l.prototype._destroy=function(e,t){var n=this;r.prototype._destroy.call(this,e,(function(e){t(e),n.emit("close")}))}},function(e,t,n){"use strict";var r=n(13),o=n(668),c=n(121),l=n(17).Buffer,d=n(413),h=n(278),f=n(279),m=l.alloc(128);function v(e,t){c.call(this,"digest"),"string"==typeof t&&(t=l.from(t));var n="sha512"===e||"sha384"===e?128:64;(this._alg=e,this._key=t,t.length>n)?t=("rmd160"===e?new h:f(e)).update(t).digest():t.length<n&&(t=l.concat([t,m],n));for(var r=this._ipad=l.allocUnsafe(n),o=this._opad=l.allocUnsafe(n),i=0;i<n;i++)r[i]=54^t[i],o[i]=92^t[i];this._hash="rmd160"===e?new h:f(e),this._hash.update(r)}r(v,c),v.prototype._update=function(data){this._hash.update(data)},v.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new h:f(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new v("rmd160",t):"md5"===e?new o(d,t):new v(e,t)}},function(e,t,n){var r=n(275);e.exports=function(e){return(new r).update(e).digest()}},function(e){e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},function(e,t,n){t.pbkdf2=n(670),t.pbkdf2Sync=n(418)},function(e,t){var n=Math.pow(2,30)-1;e.exports=function(e,t){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof t)throw new TypeError("Key length not a number");if(t<0||t>n||t!=t)throw new TypeError("Bad key length")}},function(e,t,n){(function(t,n){var r;if(t.process&&t.process.browser)r="utf-8";else if(t.process&&t.process.version){r=parseInt(n.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else r="utf-8";e.exports=r}).call(this,n(23),n(42))},function(e,t,n){var r=n(413),o=n(278),c=n(279),l=n(17).Buffer,d=n(416),h=n(417),f=n(419),m=l.alloc(128),v={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function _(e,t,n){var d=function(e){function t(data){return c(e).update(data).digest()}function n(data){return(new o).update(data).digest()}return"rmd160"===e||"ripemd160"===e?n:"md5"===e?r:t}(e),h="sha512"===e||"sha384"===e?128:64;t.length>h?t=d(t):t.length<h&&(t=l.concat([t,m],h));for(var f=l.allocUnsafe(h+v[e]),_=l.allocUnsafe(h+v[e]),i=0;i<h;i++)f[i]=54^t[i],_[i]=92^t[i];var y=l.allocUnsafe(h+n+4);f.copy(y,0,0,h),this.ipad1=y,this.ipad2=f,this.opad=_,this.alg=e,this.blocksize=h,this.hash=d,this.size=v[e]}_.prototype.run=function(data,e){return data.copy(e,this.blocksize),this.hash(e).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,n,r,o){d(n,r);var c=new _(o=o||"sha1",e=f(e,h,"Password"),(t=f(t,h,"Salt")).length),m=l.allocUnsafe(r),y=l.allocUnsafe(t.length+4);t.copy(y,0,0,t.length);for(var E=0,C=v[o],w=Math.ceil(r/C),i=1;i<=w;i++){y.writeUInt32BE(i,t.length);for(var S=c.run(y,c.ipad1),T=S,A=1;A<n;A++){T=c.run(T,c.ipad2);for(var R=0;R<C;R++)S[R]^=T[R]}S.copy(m,E),E+=C}return m}},function(e,t,n){var r=n(17).Buffer;e.exports=function(e,t,n){if(r.isBuffer(e))return e;if("string"==typeof e)return r.from(e,t);if(ArrayBuffer.isView(e))return r.from(e.buffer);throw new TypeError(n+" must be a string, a Buffer, a typed array or a DataView")}},function(e,t,n){"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,n){e[0+n]=t>>>24,e[1+n]=t>>>16&255,e[2+n]=t>>>8&255,e[3+n]=255&t},t.ip=function(e,t,n,r){for(var o=0,c=0,i=6;i>=0;i-=2){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>>l+i&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>>l+i&1}for(i=6;i>=0;i-=2){for(l=1;l<=25;l+=8)c<<=1,c|=t>>>l+i&1;for(l=1;l<=25;l+=8)c<<=1,c|=e>>>l+i&1}n[r+0]=o>>>0,n[r+1]=c>>>0},t.rip=function(e,t,n,r){for(var o=0,c=0,i=0;i<4;i++)for(var l=24;l>=0;l-=8)o<<=1,o|=t>>>l+i&1,o<<=1,o|=e>>>l+i&1;for(i=4;i<8;i++)for(l=24;l>=0;l-=8)c<<=1,c|=t>>>l+i&1,c<<=1,c|=e>>>l+i&1;n[r+0]=o>>>0,n[r+1]=c>>>0},t.pc1=function(e,t,n,r){for(var o=0,c=0,i=7;i>=5;i--){for(var l=0;l<=24;l+=8)o<<=1,o|=t>>l+i&1;for(l=0;l<=24;l+=8)o<<=1,o|=e>>l+i&1}for(l=0;l<=24;l+=8)o<<=1,o|=t>>l+i&1;for(i=1;i<=3;i++){for(l=0;l<=24;l+=8)c<<=1,c|=t>>l+i&1;for(l=0;l<=24;l+=8)c<<=1,c|=e>>l+i&1}for(l=0;l<=24;l+=8)c<<=1,c|=e>>l+i&1;n[r+0]=o>>>0,n[r+1]=c>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,o){for(var c=0,l=0,d=r.length>>>1,i=0;i<d;i++)c<<=1,c|=e>>>r[i]&1;for(i=d;i<r.length;i++)l<<=1,l|=t>>>r[i]&1;n[o+0]=c>>>0,n[o+1]=l>>>0},t.expand=function(e,t,n){var r=0,o=0;r=(1&e)<<5|e>>>27;for(var i=23;i>=15;i-=4)r<<=6,r|=e>>>i&63;for(i=11;i>=3;i-=4)o|=e>>>i&63,o<<=6;o|=(31&e)<<1|e>>>31,t[n+0]=r>>>0,t[n+1]=o>>>0};var o=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var n=0,i=0;i<4;i++){n<<=4,n|=o[64*i+(e>>>18-6*i&63)]}for(i=0;i<4;i++){n<<=4,n|=o[256+64*i+(t>>>18-6*i&63)]}return n>>>0};var c=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,i=0;i<c.length;i++)t<<=1,t|=e>>>c[i]&1;return t>>>0},t.padSplit=function(e,t,n){for(var r=e.toString(2);r.length<t;)r="0"+r;for(var o=[],i=0;i<t;i+=n)o.push(r.slice(i,i+n));return o.join(" ")}},function(e,t,n){"use strict";var r=n(83),o=n(13),c=n(420),l=n(283);function d(){this.tmp=new Array(2),this.keys=null}function h(e){l.call(this,e);var t=new d;this._desState=t,this.deriveKeys(t,e.key)}o(h,l),e.exports=h,h.create=function(e){return new h(e)};var f=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];h.prototype.deriveKeys=function(e,t){e.keys=new Array(32),r.equal(t.length,this.blockSize,"Invalid key length");var n=c.readUInt32BE(t,0),o=c.readUInt32BE(t,4);c.pc1(n,o,e.tmp,0),n=e.tmp[0],o=e.tmp[1];for(var i=0;i<e.keys.length;i+=2){var l=f[i>>>1];n=c.r28shl(n,l),o=c.r28shl(o,l),c.pc2(n,o,e.keys,i)}},h.prototype._update=function(e,t,n,r){var o=this._desState,l=c.readUInt32BE(e,t),d=c.readUInt32BE(e,t+4);c.ip(l,d,o.tmp,0),l=o.tmp[0],d=o.tmp[1],"encrypt"===this.type?this._encrypt(o,l,d,o.tmp,0):this._decrypt(o,l,d,o.tmp,0),l=o.tmp[0],d=o.tmp[1],c.writeUInt32BE(n,l,r),c.writeUInt32BE(n,d,r+4)},h.prototype._pad=function(e,t){for(var n=e.length-t,i=t;i<e.length;i++)e[i]=n;return!0},h.prototype._unpad=function(e){for(var t=e[e.length-1],i=e.length-t;i<e.length;i++)r.equal(e[i],t);return e.slice(0,e.length-t)},h.prototype._encrypt=function(e,t,n,r,o){for(var l=t,d=n,i=0;i<e.keys.length;i+=2){var h=e.keys[i],f=e.keys[i+1];c.expand(d,e.tmp,0),h^=e.tmp[0],f^=e.tmp[1];var s=c.substitute(h,f),m=d;d=(l^c.permute(s))>>>0,l=m}c.rip(d,l,r,o)},h.prototype._decrypt=function(e,t,n,r,o){for(var l=n,d=t,i=e.keys.length-2;i>=0;i-=2){var h=e.keys[i],f=e.keys[i+1];c.expand(l,e.tmp,0),h^=e.tmp[0],f^=e.tmp[1];var s=c.substitute(h,f),m=l;l=(d^c.permute(s))>>>0,d=m}c.rip(l,d,r,o)}},function(e,t,n){var r=n(184),o=n(17).Buffer,c=n(423);function l(e){var t=e._cipher.encryptBlockRaw(e._prev);return c(e._prev),t}t.encrypt=function(e,t){var n=Math.ceil(t.length/16),c=e._cache.length;e._cache=o.concat([e._cache,o.allocUnsafe(16*n)]);for(var i=0;i<n;i++){var d=l(e),h=c+16*i;e._cache.writeUInt32BE(d[0],h+0),e._cache.writeUInt32BE(d[1],h+4),e._cache.writeUInt32BE(d[2],h+8),e._cache.writeUInt32BE(d[3],h+12)}var f=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),r(t,f)}},function(e,t){e.exports=function(e){for(var t,n=e.length;n--;){if(255!==(t=e.readUInt8(n))){t++,e.writeUInt8(t,n);break}e.writeUInt8(0,n)}}},function(e){e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},function(e,t,n){var r=n(213),o=n(17).Buffer,c=n(121),l=n(13),d=n(683),h=n(184),f=n(423);function m(e,t,n,l){c.call(this);var h=o.alloc(4,0);this._cipher=new r.AES(t);var m=this._cipher.encryptBlock(h);this._ghash=new d(m),n=function(e,t,n){if(12===t.length)return e._finID=o.concat([t,o.from([0,0,0,1])]),o.concat([t,o.from([0,0,0,2])]);var r=new d(n),c=t.length,l=c%16;r.update(t),l&&(l=16-l,r.update(o.alloc(l,0))),r.update(o.alloc(8,0));var h=8*c,m=o.alloc(8);m.writeUIntBE(h,0,8),r.update(m),e._finID=r.state;var v=o.from(e._finID);return f(v),v}(this,n,m),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=l,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}l(m,c),m.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=o.alloc(t,0),this._ghash.update(t))}this._called=!0;var n=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(n),this._len+=e.length,n},m.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=h(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(a,b){var e=0;a.length!==b.length&&e++;for(var t=Math.min(a.length,b.length),i=0;i<t;++i)e+=a[i]^b[i];return e}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},m.prototype.getAuthTag=function(){if(this._decrypt||!o.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},m.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},m.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=m},function(e,t,n){var r=n(213),o=n(17).Buffer,c=n(121);function l(e,t,n,l){c.call(this),this._cipher=new r.AES(t),this._prev=o.from(n),this._cache=o.allocUnsafe(0),this._secCache=o.allocUnsafe(0),this._decrypt=l,this._mode=e}n(13)(l,c),l.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},l.prototype._final=function(){this._cipher.scrub()},e.exports=l},function(e,t,n){var r=n(154);e.exports=T,T.simpleSieve=w,T.fermatTest=S;var o=n(50),c=new o(24),l=new(n(428)),d=new o(1),h=new o(2),f=new o(5),m=(new o(16),new o(8),new o(10)),v=new o(3),_=(new o(7),new o(11)),y=new o(4),E=(new o(12),null);function C(){if(null!==E)return E;var e=[];e[0]=2;for(var i=1,t=3;t<1048576;t+=2){for(var n=Math.ceil(Math.sqrt(t)),r=0;r<i&&e[r]<=n&&t%e[r]!=0;r++);i!==r&&e[r]<=n||(e[i++]=t)}return E=e,e}function w(p){for(var e=C(),i=0;i<e.length;i++)if(0===p.modn(e[i]))return 0===p.cmpn(e[i]);return!0}function S(p){var e=o.mont(p);return 0===h.toRed(e).redPow(p.subn(1)).fromRed().cmpn(1)}function T(e,t){if(e<16)return new o(2===t||5===t?[140,123]:[140,39]);var n,E;for(t=new o(t);;){for(n=new o(r(Math.ceil(e/8)));n.bitLength()>e;)n.ishrn(1);if(n.isEven()&&n.iadd(d),n.testn(1)||n.iadd(h),t.cmp(h)){if(!t.cmp(f))for(;n.mod(m).cmp(v);)n.iadd(y)}else for(;n.mod(c).cmp(_);)n.iadd(y);if(w(E=n.shrn(1))&&w(n)&&S(E)&&S(n)&&l.test(E)&&l.test(n))return n}}},function(e,t,n){var r=n(50),o=n(286);function c(e){this.rand=e||new o.Rand}e.exports=c,c.create=function(e){return new c(e)},c.prototype._randbelow=function(e){var t=e.bitLength(),n=Math.ceil(t/8);do{var a=new r(this.rand.generate(n))}while(a.cmp(e)>=0);return a},c.prototype._randrange=function(e,t){var n=t.sub(e);return e.add(this._randbelow(n))},c.prototype.test=function(e,t,n){var o=e.bitLength(),c=r.mont(e),l=new r(1).toRed(c);t||(t=Math.max(1,o/48|0));for(var d=e.subn(1),s=0;!d.testn(s);s++);for(var h=e.shrn(s),f=d.toRed(c);t>0;t--){var a=this._randrange(new r(2),d);n&&n(a);var m=a.toRed(c).redPow(h);if(0!==m.cmp(l)&&0!==m.cmp(f)){for(var i=1;i<s;i++){if(0===(m=m.redSqr()).cmp(l))return!1;if(0===m.cmp(f))break}if(i===s)return!1}}return!0},c.prototype.getDivisor=function(e,t){var n=e.bitLength(),o=r.mont(e),c=new r(1).toRed(o);t||(t=Math.max(1,n/48|0));for(var l=e.subn(1),s=0;!l.testn(s);s++);for(var d=e.shrn(s),h=l.toRed(o);t>0;t--){var a=this._randrange(new r(2),l),g=e.gcd(a);if(0!==g.cmpn(1))return g;var f=a.toRed(o).redPow(d);if(0!==f.cmp(c)&&0!==f.cmp(h)){for(var i=1;i<s;i++){if(0===(f=f.redSqr()).cmp(c))return f.fromRed().subn(1).gcd(e);if(0===f.cmp(h))break}if(i===s)return(f=f.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},function(e,t,n){"use strict";(function(t,r){var o;e.exports=L,L.ReadableState=N;n(137).EventEmitter;var c=function(e,t){return e.listeners(t).length},l=n(430),d=n(46).Buffer,h=t.Uint8Array||function(){};var f,m=n(693);f=m&&m.debuglog?m.debuglog("stream"):function(){};var v,_,y,E=n(694),C=n(431),w=n(432).getHighWaterMark,S=n(158).codes,T=S.ERR_INVALID_ARG_TYPE,A=S.ERR_STREAM_PUSH_AFTER_EOF,R=S.ERR_METHOD_NOT_IMPLEMENTED,O=S.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;n(13)(L,l);var I=C.errorOrDestroy,k=["error","close","destroy","pause","resume"];function N(e,t,r){o=o||n(159),e=e||{},"boolean"!=typeof r&&(r=t instanceof o),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=w(this,e,"readableHighWaterMark",r),this.buffer=new E,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(v||(v=n(138).StringDecoder),this.decoder=new v(e.encoding),this.encoding=e.encoding)}function L(e){if(o=o||n(159),!(this instanceof L))return new L(e);var t=this instanceof o;this._readableState=new N(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),l.call(this)}function M(e,t,n,r,o){f("readableAddChunk",t);var c,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(f("onEofChunk"),t.ended)return;if(t.decoder){var n=t.decoder.end();n&&n.length&&(t.buffer.push(n),t.length+=t.objectMode?1:n.length)}t.ended=!0,t.sync?U(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,B(e)))}(e,l);else if(o||(c=function(e,t){var n;r=t,d.isBuffer(r)||r instanceof h||"string"==typeof t||void 0===t||e.objectMode||(n=new T("chunk",["string","Buffer","Uint8Array"],t));var r;return n}(l,t)),c)I(e,c);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===d.prototype||(t=function(e){return d.from(e)}(t)),r)l.endEmitted?I(e,new O):x(e,l,t,!0);else if(l.ended)I(e,new A);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!n?(t=l.decoder.write(t),l.objectMode||0!==t.length?x(e,l,t,!1):F(e,l)):x(e,l,t,!1)}else r||(l.reading=!1,F(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function x(e,t,n,r){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",n)):(t.length+=t.objectMode?1:n.length,r?t.buffer.unshift(n):t.buffer.push(n),t.needReadable&&U(e)),F(e,t)}Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),L.prototype.destroy=C.destroy,L.prototype._undestroy=C.undestroy,L.prototype._destroy=function(e,t){t(e)},L.prototype.push=function(e,t){var n,r=this._readableState;return r.objectMode?n=!0:"string"==typeof e&&((t=t||r.defaultEncoding)!==r.encoding&&(e=d.from(e,t),t=""),n=!0),M(this,e,t,!1,n)},L.prototype.unshift=function(e){return M(this,e,null,!0,!1)},L.prototype.isPaused=function(){return!1===this._readableState.flowing},L.prototype.setEncoding=function(e){v||(v=n(138).StringDecoder);var t=new v(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var p=this._readableState.buffer.head,content="";null!==p;)content+=t.write(p.data),p=p.next;return this._readableState.buffer.clear(),""!==content&&this._readableState.buffer.push(content),this._readableState.length=content.length,this};var D=1073741824;function P(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=D?e=D:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function U(e){var t=e._readableState;f("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(f("emitReadable",t.flowing),t.emittedReadable=!0,r.nextTick(B,e))}function B(e){var t=e._readableState;f("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,z(e)}function F(e,t){t.readingMore||(t.readingMore=!0,r.nextTick(V,e,t))}function V(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var n=t.length;if(f("maybeReadMore read 0"),e.read(0),n===t.length)break}t.readingMore=!1}function j(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function H(e){f("readable nexttick read 0"),e.read(0)}function $(e,t){f("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),z(e),t.flowing&&!t.reading&&e.read(0)}function z(e){var t=e._readableState;for(f("flow",t.flowing);t.flowing&&null!==e.read(););}function W(e,t){return 0===t.length?null:(t.objectMode?n=t.buffer.shift():!e||e>=t.length?(n=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):n=t.buffer.consume(e,t.decoder),n);var n}function K(e){var t=e._readableState;f("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,r.nextTick(G,t,e))}function G(e,t){if(f("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var n=t._writableState;(!n||n.autoDestroy&&n.finished)&&t.destroy()}}function Y(e,t){for(var i=0,n=e.length;i<n;i++)if(e[i]===t)return i;return-1}L.prototype.read=function(e){f("read",e),e=parseInt(e,10);var t=this._readableState,n=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return f("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?K(this):U(this),null;if(0===(e=P(e,t))&&t.ended)return 0===t.length&&K(this),null;var r,o=t.needReadable;return f("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&f("length less than watermark",o=!0),t.ended||t.reading?f("reading or ended",o=!1):o&&(f("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=P(n,t))),null===(r=e>0?W(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),n!==e&&t.ended&&K(this)),null!==r&&this.emit("data",r),r},L.prototype._read=function(e){I(this,new R("_read()"))},L.prototype.pipe=function(e,t){var n=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,f("pipe count=%d opts=%j",o.pipesCount,t);var l=(!t||!1!==t.end)&&e!==r.stdout&&e!==r.stderr?h:w;function d(t,r){f("onunpipe"),t===n&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,f("cleanup"),e.removeListener("close",E),e.removeListener("finish",C),e.removeListener("drain",m),e.removeListener("error",y),e.removeListener("unpipe",d),n.removeListener("end",h),n.removeListener("end",w),n.removeListener("data",_),v=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||m())}function h(){f("onend"),e.end()}o.endEmitted?r.nextTick(l):n.once("end",l),e.on("unpipe",d);var m=function(e){return function(){var t=e._readableState;f("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&c(e,"data")&&(t.flowing=!0,z(e))}}(n);e.on("drain",m);var v=!1;function _(t){f("ondata");var r=e.write(t);f("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==Y(o.pipes,e))&&!v&&(f("false write response, pause",o.awaitDrain),o.awaitDrain++),n.pause())}function y(t){f("onerror",t),w(),e.removeListener("error",y),0===c(e,"error")&&I(e,t)}function E(){e.removeListener("finish",C),w()}function C(){f("onfinish"),e.removeListener("close",E),w()}function w(){f("unpipe"),n.unpipe(e)}return n.on("data",_),function(e,t,n){if("function"==typeof e.prependListener)return e.prependListener(t,n);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(n):e._events[t]=[n,e._events[t]]:e.on(t,n)}(e,"error",y),e.once("close",E),e.once("finish",C),e.emit("pipe",n),o.flowing||(f("pipe resume"),n.resume()),e},L.prototype.unpipe=function(e){var t=this._readableState,n={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,n)),this;if(!e){var r=t.pipes,o=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i<o;i++)r[i].emit("unpipe",this,{hasUnpiped:!1});return this}var c=Y(t.pipes,e);return-1===c||(t.pipes.splice(c,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,n)),this},L.prototype.on=function(e,t){var n=l.prototype.on.call(this,e,t),o=this._readableState;return"data"===e?(o.readableListening=this.listenerCount("readable")>0,!1!==o.flowing&&this.resume()):"readable"===e&&(o.endEmitted||o.readableListening||(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,f("on readable",o.length,o.reading),o.length?U(this):o.reading||r.nextTick(H,this))),n},L.prototype.addListener=L.prototype.on,L.prototype.removeListener=function(e,t){var n=l.prototype.removeListener.call(this,e,t);return"readable"===e&&r.nextTick(j,this),n},L.prototype.removeAllListeners=function(e){var t=l.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||r.nextTick(j,this),t},L.prototype.resume=function(){var e=this._readableState;return e.flowing||(f("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,r.nextTick($,e,t))}(this,e)),e.paused=!1,this},L.prototype.pause=function(){return f("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(f("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},L.prototype.wrap=function(e){var t=this,n=this._readableState,r=!1;for(var i in e.on("end",(function(){if(f("wrapped end"),n.decoder&&!n.ended){var e=n.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(o){(f("wrapped data"),n.decoder&&(o=n.decoder.write(o)),n.objectMode&&null==o)||(n.objectMode||o&&o.length)&&(t.push(o)||(r=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<k.length;o++)e.on(k[o],this.emit.bind(this,k[o]));return this._read=function(t){f("wrapped _read",t),r&&(r=!1,e.resume())},this},"function"==typeof Symbol&&(L.prototype[Symbol.asyncIterator]=function(){return void 0===_&&(_=n(696)),_(this)}),Object.defineProperty(L.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(L.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(L.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),L._fromList=W,Object.defineProperty(L.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(L.from=function(e,t){return void 0===y&&(y=n(697)),y(L,e,t)})}).call(this,n(23),n(42))},function(e,t,n){e.exports=n(137).EventEmitter},function(e,t,n){"use strict";(function(t){function n(e,t){o(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function o(e,t){e.emit("error",t)}e.exports={destroy:function(e,c){var l=this,d=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return d||h?(c?c(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(o,this,e)):t.nextTick(o,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!c&&e?l._writableState?l._writableState.errorEmitted?t.nextTick(r,l):(l._writableState.errorEmitted=!0,t.nextTick(n,l,e)):t.nextTick(n,l,e):c?(t.nextTick(r,l),c(e)):t.nextTick(r,l)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var n=e._readableState,r=e._writableState;n&&n.autoDestroy||r&&r.autoDestroy?e.destroy(t):e.emit("error",t)}}}).call(this,n(42))},function(e,t,n){"use strict";var r=n(158).codes.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,n,o){var c=function(e,t,n){return null!=e.highWaterMark?e.highWaterMark:t?e[n]:null}(t,o,n);if(null!=c){if(!isFinite(c)||Math.floor(c)!==c||c<0)throw new r(o?n:"highWaterMark",c);return Math.floor(c)}return e.objectMode?16:16384}}},function(e,t,n){"use strict";(function(t,r){function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t,n){var r=e.entry;e.entry=null;for(;r;){var o=r.callback;t.pendingcb--,o(n),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var c;e.exports=L,L.WritableState=N;var l={deprecate:n(276)},d=n(430),h=n(46).Buffer,f=t.Uint8Array||function(){};var m,v=n(431),_=n(432).getHighWaterMark,y=n(158).codes,E=y.ERR_INVALID_ARG_TYPE,C=y.ERR_METHOD_NOT_IMPLEMENTED,w=y.ERR_MULTIPLE_CALLBACK,S=y.ERR_STREAM_CANNOT_PIPE,T=y.ERR_STREAM_DESTROYED,A=y.ERR_STREAM_NULL_VALUES,R=y.ERR_STREAM_WRITE_AFTER_END,O=y.ERR_UNKNOWN_ENCODING,I=v.errorOrDestroy;function k(){}function N(e,t,l){c=c||n(159),e=e||{},"boolean"!=typeof l&&(l=t instanceof c),this.objectMode=!!e.objectMode,l&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=_(this,e,"writableHighWaterMark",l),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var d=!1===e.decodeStrings;this.decodeStrings=!d,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var n=e._writableState,o=n.sync,c=n.writecb;if("function"!=typeof c)throw new w;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(n),t)!function(e,t,n,o,c){--t.pendingcb,n?(r.nextTick(c,o),r.nextTick(B,e,t),e._writableState.errorEmitted=!0,I(e,o)):(c(o),e._writableState.errorEmitted=!0,I(e,o),B(e,t))}(e,n,o,t,c);else{var l=P(n)||e.destroyed;l||n.corked||n.bufferProcessing||!n.bufferedRequest||D(e,n),o?r.nextTick(x,e,n,l,c):x(e,n,l,c)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function L(e){var t=this instanceof(c=c||n(159));if(!t&&!m.call(L,this))return new L(e);this._writableState=new N(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),d.call(this)}function M(e,t,n,r,o,c,l){t.writelen=r,t.writecb=l,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new T("write")):n?e._writev(o,t.onwrite):e._write(o,c,t.onwrite),t.sync=!1}function x(e,t,n,r){n||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,r(),B(e,t)}function D(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var r=t.bufferedRequestCount,c=new Array(r),l=t.corkedRequestsFree;l.entry=n;for(var d=0,h=!0;n;)c[d]=n,n.isBuf||(h=!1),n=n.next,d+=1;c.allBuffers=h,M(e,t,!0,t.length,c,"",l.finish),t.pendingcb++,t.lastBufferedRequest=null,l.next?(t.corkedRequestsFree=l.next,l.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;n;){var f=n.chunk,m=n.encoding,v=n.callback;if(M(e,t,!1,t.objectMode?1:f.length,f,m,v),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function P(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function U(e,t){e._final((function(n){t.pendingcb--,n&&I(e,n),t.prefinished=!0,e.emit("prefinish"),B(e,t)}))}function B(e,t){var n=P(t);if(n&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,r.nextTick(U,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var o=e._readableState;(!o||o.autoDestroy&&o.endEmitted)&&e.destroy()}return n}n(13)(L,d),N.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(N.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(m=Function.prototype[Symbol.hasInstance],Object.defineProperty(L,Symbol.hasInstance,{value:function(object){return!!m.call(this,object)||this===L&&(object&&object._writableState instanceof N)}})):m=function(object){return object instanceof this},L.prototype.pipe=function(){I(this,new S)},L.prototype.write=function(e,t,n){var o,c=this._writableState,l=!1,d=!c.objectMode&&(o=e,h.isBuffer(o)||o instanceof f);return d&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(n=t,t=null),d?t="buffer":t||(t=c.defaultEncoding),"function"!=typeof n&&(n=k),c.ending?function(e,t){var n=new R;I(e,n),r.nextTick(t,n)}(this,n):(d||function(e,t,n,o){var c;return null===n?c=new A:"string"==typeof n||t.objectMode||(c=new E("chunk",["string","Buffer"],n)),!c||(I(e,c),r.nextTick(o,c),!1)}(this,c,e,n))&&(c.pendingcb++,l=function(e,t,n,r,o,c){if(!n){var l=function(e,t,n){e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,n));return t}(t,r,o);r!==l&&(n=!0,o="buffer",r=l)}var d=t.objectMode?1:r.length;t.length+=d;var f=t.length<t.highWaterMark;f||(t.needDrain=!0);if(t.writing||t.corked){var m=t.lastBufferedRequest;t.lastBufferedRequest={chunk:r,encoding:o,isBuf:n,callback:c,next:null},m?m.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else M(e,t,!1,d,r,o,c);return f}(this,c,d,e,t,n)),l},L.prototype.cork=function(){this._writableState.corked++},L.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||D(this,e))},L.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new O(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(L.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(L.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),L.prototype._write=function(e,t,n){n(new C("_write()"))},L.prototype._writev=null,L.prototype.end=function(e,t,n){var o=this._writableState;return"function"==typeof e?(n=e,e=null,t=null):"function"==typeof t&&(n=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||function(e,t,n){t.ending=!0,B(e,t),n&&(t.finished?r.nextTick(n):e.once("finish",n));t.ended=!0,e.writable=!1}(this,o,n),this},Object.defineProperty(L.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(L.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),L.prototype.destroy=v.destroy,L.prototype._undestroy=v.undestroy,L.prototype._destroy=function(e,t){t(e)}}).call(this,n(23),n(42))},function(e,t,n){"use strict";e.exports=m;var r=n(158).codes,o=r.ERR_METHOD_NOT_IMPLEMENTED,c=r.ERR_MULTIPLE_CALLBACK,l=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,d=r.ERR_TRANSFORM_WITH_LENGTH_0,h=n(159);function f(e,data){var t=this._transformState;t.transforming=!1;var n=t.writecb;if(null===n)return this.emit("error",new c);t.writechunk=null,t.writecb=null,null!=data&&this.push(data),n(e);var r=this._readableState;r.reading=!1,(r.needReadable||r.length<r.highWaterMark)&&this._read(r.highWaterMark)}function m(e){if(!(this instanceof m))return new m(e);h.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",v)}function v(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?_(this,null,null):this._flush((function(t,data){_(e,t,data)}))}function _(e,t,data){if(t)return e.emit("error",t);if(null!=data&&e.push(data),e._writableState.length)throw new d;if(e._transformState.transforming)throw new l;return e.push(null)}n(13)(m,h),m.prototype.push=function(e,t){return this._transformState.needTransform=!1,h.prototype.push.call(this,e,t)},m.prototype._transform=function(e,t,n){n(new o("_transform()"))},m.prototype._write=function(e,t,n){var r=this._transformState;if(r.writecb=n,r.writechunk=e,r.writeencoding=t,!r.transforming){var o=this._readableState;(r.needTransform||o.needReadable||o.length<o.highWaterMark)&&this._read(o.highWaterMark)}},m.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},m.prototype._destroy=function(e,t){h.prototype._destroy.call(this,e,(function(e){t(e)}))}},function(e,t,n){"use strict";var r=t;function o(e){return 1===e.length?"0"+e:e}function c(e){for(var t="",i=0;i<e.length;i++)t+=o(e[i].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var n=[];if("string"!=typeof e){for(var i=0;i<e.length;i++)n[i]=0|e[i];return n}if("hex"===t){(e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e);for(i=0;i<e.length;i+=2)n.push(parseInt(e[i]+e[i+1],16))}else for(i=0;i<e.length;i++){var r=e.charCodeAt(i),o=r>>8,c=255&r;o?n.push(o,c):n.push(c)}return n},r.zero2=o,r.toHex=c,r.encode=function(e,t){return"hex"===t?c(e):e}},function(e,t,n){"use strict";var r=t;r.base=n(215),r.short=n(704),r.mont=n(705),r.edwards=n(706)},function(e,t,n){"use strict";var r=n(98),o=n(181),c=n(83),l=r.rotr64_hi,d=r.rotr64_lo,h=r.shr64_hi,f=r.shr64_lo,m=r.sum64,v=r.sum64_hi,_=r.sum64_lo,y=r.sum64_4_hi,E=r.sum64_4_lo,C=r.sum64_5_hi,w=r.sum64_5_lo,S=o.BlockHash,T=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function A(){if(!(this instanceof A))return new A;S.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=T,this.W=new Array(160)}function R(e,t,n,r,o){var c=e&n^~e&o;return c<0&&(c+=4294967296),c}function O(e,t,n,r,o,c){var l=t&r^~t&c;return l<0&&(l+=4294967296),l}function I(e,t,n,r,o){var c=e&n^e&o^n&o;return c<0&&(c+=4294967296),c}function k(e,t,n,r,o,c){var l=t&r^t&c^r&c;return l<0&&(l+=4294967296),l}function N(e,t){var n=l(e,t,28)^l(t,e,2)^l(t,e,7);return n<0&&(n+=4294967296),n}function L(e,t){var n=d(e,t,28)^d(t,e,2)^d(t,e,7);return n<0&&(n+=4294967296),n}function M(e,t){var n=l(e,t,14)^l(e,t,18)^l(t,e,9);return n<0&&(n+=4294967296),n}function x(e,t){var n=d(e,t,14)^d(e,t,18)^d(t,e,9);return n<0&&(n+=4294967296),n}function D(e,t){var n=l(e,t,1)^l(e,t,8)^h(e,t,7);return n<0&&(n+=4294967296),n}function P(e,t){var n=d(e,t,1)^d(e,t,8)^f(e,t,7);return n<0&&(n+=4294967296),n}function U(e,t){var n=l(e,t,19)^l(t,e,29)^h(e,t,6);return n<0&&(n+=4294967296),n}function B(e,t){var n=d(e,t,19)^d(t,e,29)^f(e,t,6);return n<0&&(n+=4294967296),n}r.inherits(A,S),e.exports=A,A.blockSize=1024,A.outSize=512,A.hmacStrength=192,A.padLength=128,A.prototype._prepareBlock=function(e,t){for(var n=this.W,i=0;i<32;i++)n[i]=e[t+i];for(;i<n.length;i+=2){var r=U(n[i-4],n[i-3]),o=B(n[i-4],n[i-3]),c=n[i-14],l=n[i-13],d=D(n[i-30],n[i-29]),h=P(n[i-30],n[i-29]),f=n[i-32],m=n[i-31];n[i]=y(r,o,c,l,d,h,f,m),n[i+1]=E(r,o,c,l,d,h,f,m)}},A.prototype._update=function(e,t){this._prepareBlock(e,t);var n=this.W,r=this.h[0],o=this.h[1],l=this.h[2],d=this.h[3],h=this.h[4],f=this.h[5],y=this.h[6],dl=this.h[7],E=this.h[8],S=this.h[9],T=this.h[10],A=this.h[11],D=this.h[12],P=this.h[13],U=this.h[14],B=this.h[15];c(this.k.length===n.length);for(var i=0;i<n.length;i+=2){var F=U,V=B,j=M(E,S),H=x(E,S),$=R(E,S,T,A,D),z=O(E,S,T,A,D,P),W=this.k[i],K=this.k[i+1],G=n[i],Y=n[i+1],X=C(F,V,j,H,$,z,W,K,G,Y),Z=w(F,V,j,H,$,z,W,K,G,Y);F=N(r,o),V=L(r,o),j=I(r,o,l,d,h),H=k(r,o,l,d,h,f);var Q=v(F,V,j,H),J=_(F,V,j,H);U=D,B=P,D=T,P=A,T=E,A=S,E=v(y,dl,X,Z),S=_(dl,dl,X,Z),y=h,dl=f,h=l,f=d,l=r,d=o,r=v(X,Z,Q,J),o=_(X,Z,Q,J)}m(this.h,0,r,o),m(this.h,2,l,d),m(this.h,4,h,f),m(this.h,6,y,dl),m(this.h,8,E,S),m(this.h,10,T,A),m(this.h,12,D,P),m(this.h,14,U,B)},A.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(721).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function h(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function f(e,t,n,o){for(var c=0,b=0,l=Math.min(e.length,n),i=t;i<l;i++){var d=e.charCodeAt(i)-48;c*=o,b=d>=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&b<o,"Invalid character"),c+=b}return c}function m(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===base?this._parseHex(e,n,t):(this._parseBase(e,base,n),"le"===t&&this._initArray(this.toArray(),base,t)))},c.prototype._initNumber=function(e,base,t){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t)},c.prototype._initArray=function(e,base,t){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o,c=0;if("be"===t)for(i=e.length-1,n=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this._strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var r,o=0,c=0;if("be"===n)for(i=e.length-1;i>=t;i-=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this._strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i<l;i+=n)d=f(e,i,i+n,base),this.imuln(r),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==c){var h=1;for(d=f(e,i,e.length,base),i=0;i<c;i++)h*=base;this.imuln(h),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this._strip()},c.prototype.copy=function(e){e.words=new Array(this.length);for(var i=0;i<this.length;i++)e.words[i]=this.words[i];e.length=this.length,e.negative=this.negative,e.red=this.red},c.prototype._move=function(e){m(e,this)},c.prototype.clone=function(){var e=new c(null);return this.copy(e),e},c.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},c.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch(e){c.prototype.inspect=v}else c.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i<this.length;i++){var c=this.words[i],l=(16777215&(c<<n|o)).toString(16);t=0!==(o=c>>>24-n&16777215)||i!==this.length-1?_[6-l.length]+l+t:l+t,(n+=2)>=26&&(n-=26,i--)}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],h=E[base];t="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(h).toString(base);t=(f=f.idivn(h)).isZero()?m+t:_[d-m.length]+m+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function C(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d<r;d++){for(var h=l>>>26,f=67108863&l,m=Math.min(d,t.length-1),v=Math.max(0,d-e.length+1);v<=m;v++){var i=d-v|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[v])+f)/67108864|0,f=67108863&o}n.words[d]=0|f,l=0|h}return 0!==l?n.words[d]=0|l:n.length--,n._strip()}c.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var l=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](l,o),l},c.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var c=this.words[i]<<o|r;e[n++]=255&c,n<e.length&&(e[n++]=c>>8&255),n<e.length&&(e[n++]=c>>16&255),6===o?(n<e.length&&(e[n++]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},c.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var c=this.words[i]<<o|r;e[n--]=255&c,n>=0&&(e[n--]=c>>8&255),n>=0&&(e[n--]=c>>16&255),6===o?(n>=0&&(e[n--]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(e+=b,26!==b)break}return e},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},c.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return 0!==this.negative},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]|e.words[i];return this._strip()},c.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},c.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=b.length,this._strip()},c.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},c.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this._strip()},c.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},c.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},c.prototype.iadd=function(e){var t,a,b;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i<b.length;i++)t=(0|a.words[i])+(0|b.words[i])+n,this.words[i]=67108863&t,n=t>>>26;for(;0!==n&&i<a.length;i++)t=(0|a.words[i])+n,this.words[i]=67108863&t,n=t>>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},c.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i<b.length;i++)r=(t=(0|a.words[i])-(0|b.words[i])+r)>>26,this.words[i]=67108863&t;for(;0!==r&&i<a.length;i++)r=(t=(0|a.words[i])+r)>>26,this.words[i]=67108863&t;if(0===r&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this._strip()},c.prototype.sub=function(e){return this.clone().isub(e)};var w=function(e,t,n){var r,o,c,a=e.words,b=t.words,l=n.words,d=0,h=0|a[0],f=8191&h,m=h>>>13,v=0|a[1],_=8191&v,y=v>>>13,E=0|a[2],C=8191&E,w=E>>>13,S=0|a[3],T=8191&S,A=S>>>13,R=0|a[4],O=8191&R,I=R>>>13,k=0|a[5],N=8191&k,L=k>>>13,M=0|a[6],x=8191&M,D=M>>>13,P=0|a[7],U=8191&P,B=P>>>13,F=0|a[8],V=8191&F,j=F>>>13,H=0|a[9],$=8191&H,z=H>>>13,W=0|b[0],K=8191&W,G=W>>>13,Y=0|b[1],X=8191&Y,Z=Y>>>13,Q=0|b[2],J=8191&Q,ee=Q>>>13,te=0|b[3],ne=8191&te,re=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ce=8191&se,le=se>>>13,de=0|b[6],ue=8191&de,he=de>>>13,fe=0|b[7],pe=8191&fe,ge=fe>>>13,me=0|b[8],ve=8191&me,be=me>>>13,_e=0|b[9],ye=8191&_e,Ee=_e>>>13;n.negative=e.negative^t.negative,n.length=19;var Ce=(d+(r=Math.imul(f,K))|0)+((8191&(o=(o=Math.imul(f,G))+Math.imul(m,K)|0))<<13)|0;d=((c=Math.imul(m,G))+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(_,K),o=(o=Math.imul(_,G))+Math.imul(y,K)|0,c=Math.imul(y,G);var we=(d+(r=r+Math.imul(f,X)|0)|0)+((8191&(o=(o=o+Math.imul(f,Z)|0)+Math.imul(m,X)|0))<<13)|0;d=((c=c+Math.imul(m,Z)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,K),o=(o=Math.imul(C,G))+Math.imul(w,K)|0,c=Math.imul(w,G),r=r+Math.imul(_,X)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(y,X)|0,c=c+Math.imul(y,Z)|0;var Se=(d+(r=r+Math.imul(f,J)|0)|0)+((8191&(o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,J)|0))<<13)|0;d=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(T,K),o=(o=Math.imul(T,G))+Math.imul(A,K)|0,c=Math.imul(A,G),r=r+Math.imul(C,X)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(_,J)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(y,J)|0,c=c+Math.imul(y,ee)|0;var Te=(d+(r=r+Math.imul(f,ne)|0)|0)+((8191&(o=(o=o+Math.imul(f,re)|0)+Math.imul(m,ne)|0))<<13)|0;d=((c=c+Math.imul(m,re)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(O,K),o=(o=Math.imul(O,G))+Math.imul(I,K)|0,c=Math.imul(I,G),r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(A,X)|0,c=c+Math.imul(A,Z)|0,r=r+Math.imul(C,J)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(w,J)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ae=(d+(r=r+Math.imul(f,oe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ae)|0)+Math.imul(m,oe)|0))<<13)|0;d=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,K),o=(o=Math.imul(N,G))+Math.imul(L,K)|0,c=Math.imul(L,G),r=r+Math.imul(O,X)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(I,X)|0,c=c+Math.imul(I,Z)|0,r=r+Math.imul(T,J)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(A,J)|0,c=c+Math.imul(A,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(w,ne)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(_,oe)|0,o=(o=o+Math.imul(_,ae)|0)+Math.imul(y,oe)|0,c=c+Math.imul(y,ae)|0;var Re=(d+(r=r+Math.imul(f,ce)|0)|0)+((8191&(o=(o=o+Math.imul(f,le)|0)+Math.imul(m,ce)|0))<<13)|0;d=((c=c+Math.imul(m,le)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(x,K),o=(o=Math.imul(x,G))+Math.imul(D,K)|0,c=Math.imul(D,G),r=r+Math.imul(N,X)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(L,X)|0,c=c+Math.imul(L,Z)|0,r=r+Math.imul(O,J)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(I,J)|0,c=c+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(A,ne)|0,c=c+Math.imul(A,re)|0,r=r+Math.imul(C,oe)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,le)|0;var Oe=(d+(r=r+Math.imul(f,ue)|0)|0)+((8191&(o=(o=o+Math.imul(f,he)|0)+Math.imul(m,ue)|0))<<13)|0;d=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,K),o=(o=Math.imul(U,G))+Math.imul(B,K)|0,c=Math.imul(B,G),r=r+Math.imul(x,X)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(N,J)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(L,J)|0,c=c+Math.imul(L,ee)|0,r=r+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,re)|0)+Math.imul(I,ne)|0,c=c+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(A,oe)|0,c=c+Math.imul(A,ae)|0,r=r+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,le)|0,r=r+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,he)|0)+Math.imul(y,ue)|0,c=c+Math.imul(y,he)|0;var Ie=(d+(r=r+Math.imul(f,pe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ge)|0)+Math.imul(m,pe)|0))<<13)|0;d=((c=c+Math.imul(m,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(V,K),o=(o=Math.imul(V,G))+Math.imul(j,K)|0,c=Math.imul(j,G),r=r+Math.imul(U,X)|0,o=(o=o+Math.imul(U,Z)|0)+Math.imul(B,X)|0,c=c+Math.imul(B,Z)|0,r=r+Math.imul(x,J)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(D,J)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(N,ne)|0,o=(o=o+Math.imul(N,re)|0)+Math.imul(L,ne)|0,c=c+Math.imul(L,re)|0,r=r+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,le)|0)+Math.imul(A,ce)|0,c=c+Math.imul(A,le)|0,r=r+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,he)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,he)|0,r=r+Math.imul(_,pe)|0,o=(o=o+Math.imul(_,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var ke=(d+(r=r+Math.imul(f,ve)|0)|0)+((8191&(o=(o=o+Math.imul(f,be)|0)+Math.imul(m,ve)|0))<<13)|0;d=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,K),o=(o=Math.imul($,G))+Math.imul(z,K)|0,c=Math.imul(z,G),r=r+Math.imul(V,X)|0,o=(o=o+Math.imul(V,Z)|0)+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,r=r+Math.imul(U,J)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(B,J)|0,c=c+Math.imul(B,ee)|0,r=r+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,re)|0)+Math.imul(D,ne)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(L,oe)|0,c=c+Math.imul(L,ae)|0,r=r+Math.imul(O,ce)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(I,ce)|0,c=c+Math.imul(I,le)|0,r=r+Math.imul(T,ue)|0,o=(o=o+Math.imul(T,he)|0)+Math.imul(A,ue)|0,c=c+Math.imul(A,he)|0,r=r+Math.imul(C,pe)|0,o=(o=o+Math.imul(C,ge)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,ge)|0,r=r+Math.imul(_,ve)|0,o=(o=o+Math.imul(_,be)|0)+Math.imul(y,ve)|0,c=c+Math.imul(y,be)|0;var Ne=(d+(r=r+Math.imul(f,ye)|0)|0)+((8191&(o=(o=o+Math.imul(f,Ee)|0)+Math.imul(m,ye)|0))<<13)|0;d=((c=c+Math.imul(m,Ee)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,X),o=(o=Math.imul($,Z))+Math.imul(z,X)|0,c=Math.imul(z,Z),r=r+Math.imul(V,J)|0,o=(o=o+Math.imul(V,ee)|0)+Math.imul(j,J)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,re)|0)+Math.imul(B,ne)|0,c=c+Math.imul(B,re)|0,r=r+Math.imul(x,oe)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,r=r+Math.imul(N,ce)|0,o=(o=o+Math.imul(N,le)|0)+Math.imul(L,ce)|0,c=c+Math.imul(L,le)|0,r=r+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,he)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(A,pe)|0,c=c+Math.imul(A,ge)|0,r=r+Math.imul(C,ve)|0,o=(o=o+Math.imul(C,be)|0)+Math.imul(w,ve)|0,c=c+Math.imul(w,be)|0;var Le=(d+(r=r+Math.imul(_,ye)|0)|0)+((8191&(o=(o=o+Math.imul(_,Ee)|0)+Math.imul(y,ye)|0))<<13)|0;d=((c=c+Math.imul(y,Ee)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul($,J),o=(o=Math.imul($,ee))+Math.imul(z,J)|0,c=Math.imul(z,ee),r=r+Math.imul(V,ne)|0,o=(o=o+Math.imul(V,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,r=r+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,le)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,le)|0,r=r+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(L,ue)|0,c=c+Math.imul(L,he)|0,r=r+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,ge)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,ge)|0,r=r+Math.imul(T,ve)|0,o=(o=o+Math.imul(T,be)|0)+Math.imul(A,ve)|0,c=c+Math.imul(A,be)|0;var Me=(d+(r=r+Math.imul(C,ye)|0)|0)+((8191&(o=(o=o+Math.imul(C,Ee)|0)+Math.imul(w,ye)|0))<<13)|0;d=((c=c+Math.imul(w,Ee)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,ne),o=(o=Math.imul($,re))+Math.imul(z,ne)|0,c=Math.imul(z,re),r=r+Math.imul(V,oe)|0,o=(o=o+Math.imul(V,ae)|0)+Math.imul(j,oe)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,le)|0)+Math.imul(B,ce)|0,c=c+Math.imul(B,le)|0,r=r+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,he)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,he)|0,r=r+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,ge)|0)+Math.imul(L,pe)|0,c=c+Math.imul(L,ge)|0,r=r+Math.imul(O,ve)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(I,ve)|0,c=c+Math.imul(I,be)|0;var xe=(d+(r=r+Math.imul(T,ye)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ee)|0)+Math.imul(A,ye)|0))<<13)|0;d=((c=c+Math.imul(A,Ee)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul($,oe),o=(o=Math.imul($,ae))+Math.imul(z,oe)|0,c=Math.imul(z,ae),r=r+Math.imul(V,ce)|0,o=(o=o+Math.imul(V,le)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,le)|0,r=r+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,he)|0,r=r+Math.imul(x,pe)|0,o=(o=o+Math.imul(x,ge)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,ge)|0,r=r+Math.imul(N,ve)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(L,ve)|0,c=c+Math.imul(L,be)|0;var De=(d+(r=r+Math.imul(O,ye)|0)|0)+((8191&(o=(o=o+Math.imul(O,Ee)|0)+Math.imul(I,ye)|0))<<13)|0;d=((c=c+Math.imul(I,Ee)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul($,ce),o=(o=Math.imul($,le))+Math.imul(z,ce)|0,c=Math.imul(z,le),r=r+Math.imul(V,ue)|0,o=(o=o+Math.imul(V,he)|0)+Math.imul(j,ue)|0,c=c+Math.imul(j,he)|0,r=r+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,ge)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,r=r+Math.imul(x,ve)|0,o=(o=o+Math.imul(x,be)|0)+Math.imul(D,ve)|0,c=c+Math.imul(D,be)|0;var Pe=(d+(r=r+Math.imul(N,ye)|0)|0)+((8191&(o=(o=o+Math.imul(N,Ee)|0)+Math.imul(L,ye)|0))<<13)|0;d=((c=c+Math.imul(L,Ee)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul($,ue),o=(o=Math.imul($,he))+Math.imul(z,ue)|0,c=Math.imul(z,he),r=r+Math.imul(V,pe)|0,o=(o=o+Math.imul(V,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(U,ve)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(B,ve)|0,c=c+Math.imul(B,be)|0;var Ue=(d+(r=r+Math.imul(x,ye)|0)|0)+((8191&(o=(o=o+Math.imul(x,Ee)|0)+Math.imul(D,ye)|0))<<13)|0;d=((c=c+Math.imul(D,Ee)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul($,pe),o=(o=Math.imul($,ge))+Math.imul(z,pe)|0,c=Math.imul(z,ge),r=r+Math.imul(V,ve)|0,o=(o=o+Math.imul(V,be)|0)+Math.imul(j,ve)|0,c=c+Math.imul(j,be)|0;var Be=(d+(r=r+Math.imul(U,ye)|0)|0)+((8191&(o=(o=o+Math.imul(U,Ee)|0)+Math.imul(B,ye)|0))<<13)|0;d=((c=c+Math.imul(B,Ee)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul($,ve),o=(o=Math.imul($,be))+Math.imul(z,ve)|0,c=Math.imul(z,be);var Fe=(d+(r=r+Math.imul(V,ye)|0)|0)+((8191&(o=(o=o+Math.imul(V,Ee)|0)+Math.imul(j,ye)|0))<<13)|0;d=((c=c+Math.imul(j,Ee)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var Ve=(d+(r=Math.imul($,ye))|0)+((8191&(o=(o=Math.imul($,Ee))+Math.imul(z,ye)|0))<<13)|0;return d=((c=Math.imul(z,Ee))+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,l[0]=Ce,l[1]=we,l[2]=Se,l[3]=Te,l[4]=Ae,l[5]=Re,l[6]=Oe,l[7]=Ie,l[8]=ke,l[9]=Ne,l[10]=Le,l[11]=Me,l[12]=xe,l[13]=De,l[14]=Pe,l[15]=Ue,l[16]=Be,l[17]=Fe,l[18]=Ve,0!==d&&(l[19]=d,n.length++),n};function S(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c<n.length-1;c++){var l=o;o=0;for(var d=67108863&r,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var i=c-f,m=(0|e.words[i])*(0|t.words[f]),v=67108863&m;d=67108863&(v=v+d|0),o+=(l=(l=l+(m/67108864|0)|0)+(v>>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n._strip()}function T(e,t,n){return S(e,t,n)}function A(e,t){this.x=e,this.y=t}Math.imul||(w=C),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?w(this,e,t):n<63?C(this,e,t):n<1024?S(this,e,t):T(this,e,t)},A.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,n,e);return t},A.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},A.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i<c;i++)r[i]=t[e[i]],o[i]=n[e[i]]},A.prototype.transform=function(e,t,n,r,o,c){this.permute(c,e,t,n,r,o);for(var s=1;s<o;s<<=1)for(var l=s<<1,d=Math.cos(2*Math.PI/l),h=Math.sin(2*Math.PI/l),p=0;p<o;p+=l)for(var f=d,m=h,v=0;v<s;v++){var _=n[p+v],y=r[p+v],E=n[p+v+s],C=r[p+v+s],w=f*E-m*C;C=f*C+m*E,E=w,n[p+v]=_+E,r[p+v]=y+C,n[p+v+s]=_-E,r[p+v+s]=y-C,v!==l&&(w=d*f-h*m,m=d*m+h*f,f=w)}},A.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},A.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var i=0;i<n/2;i++){var r=e[i];e[i]=e[n-i-1],e[n-i-1]=r,r=t[i],t[i]=-t[n-i-1],t[n-i-1]=-r}},A.prototype.normalize13b=function(e,t){for(var n=0,i=0;i<t/2;i++){var r=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+n;e[i]=67108863&r,n=r<67108864?0:r/67108864|0}return e},A.prototype.convert13b=function(e,t,n,o){for(var c=0,i=0;i<t;i++)c+=0|e[i],n[2*i]=8191&c,c>>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i<o;++i)n[i]=0;r(0===c),r(0==(-8192&c))},A.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},A.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),c=this.stub(r),l=new Array(r),d=new Array(r),h=new Array(r),f=new Array(r),m=new Array(r),v=new Array(r),_=n.words;_.length=r,this.convert13b(e.words,e.length,l,r),this.convert13b(t.words,t.length,f,r),this.transform(l,c,d,h,r,o),this.transform(f,c,m,v,r,o);for(var i=0;i<r;i++){var y=d[i]*m[i]-h[i]*v[i];h[i]=d[i]*v[i]+h[i]*m[i],d[i]=y}return this.conjugate(d,h,r),this.transform(d,h,_,c,r,o),this.conjugate(_,c,r),this.normalize13b(_,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},c.prototype.mul=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},c.prototype.mulf=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),T(this,e,t)},c.prototype.imul=function(e){return this.clone().mulTo(e,this)},c.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,c=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=c>>>26,this.words[i]=67108863&c}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i<t.length&&0===t[i];i++,n=n.sqr());if(++i<t.length)for(var q=n.sqr();i<t.length;i++,q=q.sqr())0!==t[i]&&(n=n.mul(q));return n},c.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i<this.length;i++){var c=this.words[i]&n,l=(0|this.words[i])-c<<t;this.words[i]=l|o,o=c>>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this._strip()},c.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},c.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<<c,l=n;if(o-=s,o=Math.max(0,o),l){for(var i=0;i<s;i++)l.words[i]=this.words[i];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var d=0;for(i=this.length-1;i>=0&&(0!==d||i>=o);i--){var h=0|this.words[i];this.words[i]=d<<26-c|h>>>c,d=h&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<<t;return!(this.length<=s)&&!!(this.words[s]&q)},c.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<<t;this.words[this.length-1]&=mask}return this._strip()},c.prototype.maskn=function(e){return this.clone().imaskn(e)},c.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},c.prototype._iaddn=function(e){this.words[0]+=e;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},c.prototype.addn=function(e){return this.clone().iaddn(e)},c.prototype.subn=function(e){return this.clone().isubn(e)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(e,t,n){var i,o,c=e.length+n;this._expand(c);var l=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+l;var d=(0|e.words[i])*t;l=((o-=67108863&d)>>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)l=(o=(0|this.words[i+n])+l)>>26,this.words[i+n]=67108863&o;if(0===l)return this._strip();for(r(-1===l),l=0,i=0;i<this.length;i++)l=(o=-(0|this.words[i])+l)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var l=a.clone()._ishlnsubmul(b,1,o);0===l.negative&&(a=l,q&&(q.words[o]=1));for(var d=o-1;d>=0;d--){var h=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(h=Math.min(h/r|0,67108863),a._ishlnsubmul(b,h,d);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=h)}return q&&q._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var p=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(p*n+(0|this.words[i]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),f=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(h),o.isub(f)),n.iushrn(1),o.iushrn(1);for(var v=0,_=1;0==(t.words[0]&_)&&v<26;++v,_<<=1);if(v>0)for(t.iushrn(v);v-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(h),d.isub(f)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,h=1;0==(b.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<<t;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var n=q,i=s;0!==n&&i<this.length;i++){var o=0|this.words[i];n=(o+=n)>>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},c.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},c.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){a<b?t=-1:a>b&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new M(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};function O(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function I(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function N(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}O.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},O.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},O.prototype.split=function(input,e){input.iushrn(this.n,0,e)},O.prototype.imulK=function(e){return e.imul(this.k)},o(I,O),I.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i<e;i++)output.words[i]=input.words[i];if(output.length=e,input.length<=9)return input.words[0]=0,void(input.length=1);var t=input.words[9];for(output.words[output.length++]=t&mask,i=10;i<input.length;i++){var n=0|input.words[i];input.words[i-10]=(n&mask)<<4|t>>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9},I.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(k,O),o(N,O),o(L,O),L.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,r=67108863&n;n>>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(R[e])return R[e];var t;if("k256"===e)t=new I;else if("p224"===e)t=new k;else if("p192"===e)t=new N;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return R[e]=t,t},M.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},M.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},M.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(m(a,a.umod(this.m)._forceRed(this)),a)},M.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},M.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},M.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},M.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},M.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},M.prototype.isqr=function(a){return this.imul(a,a.clone())},M.prototype.sqr=function(a){return this.mul(a,a)},M.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var h=this.pow(d,q),f=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),v=s;0!==m.cmp(n);){for(var _=m,i=0;0!==_.cmp(n);i++)_=_.redSqr();r(i<v);var b=this.pow(h,new c(1).iushln(v-i-1));f=f.redMul(b),h=b.redSqr(),m=m.redMul(h),v=i}return f},M.prototype.invm=function(a){var e=a._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(a,e){if(e.isZero())return new c(1).toRed(this);if(0===e.cmpn(1))return a.clone();var t=new Array(16);t[0]=new c(1).toRed(this),t[1]=a;for(var i=2;i<t.length;i++)t[i]=this.mul(t[i-1],a);var n=t[0],r=0,o=0,l=e.bitLength()%26;for(0===l&&(l=26),i=e.length-1;i>=0;i--){for(var d=e.words[i],h=l-1;h>=0;h--){var f=d>>h&1;n!==t[0]&&(n=this.sqr(n)),0!==f||0!==r?(r<<=1,r|=f,(4===++o||0===i&&0===h)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new x(e)},o(x,M),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},x.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},x.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(201)(e))},function(e,t,n){"use strict";const r=t;r.bignum=n(50),r.define=n(723).define,r.base=n(726),r.constants=n(727),r.decoders=n(442),r.encoders=n(440)},function(e,t,n){"use strict";const r=t;r.der=n(441),r.pem=n(724)},function(e,t,n){"use strict";const r=n(13),o=n(292).Buffer,c=n(293),l=n(295);function d(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new h,this.tree._init(e.body)}function h(e){c.call(this,"der",e)}function f(e){return e<10?"0"+e:e}e.exports=d,d.prototype.encode=function(data,e){return this.tree._encode(data,e).join()},r(h,c),h.prototype._encodeComposite=function(e,t,n,content){const r=function(e,t,n,r){let o;"seqof"===e?e="seq":"setof"===e&&(e="set");if(l.tagByName.hasOwnProperty(e))o=l.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return r.error("Unknown tag: "+e);o=e}if(o>=31)return r.error("Multi-octet tag encoding unsupported");t||(o|=32);return o|=l.tagClassByName[n||"universal"]<<6,o}(e,t,n,this.reporter);if(content.length<128){const header=o.alloc(2);return header[0]=r,header[1]=content.length,this._createEncoderBuffer([header,content])}let c=1;for(let i=content.length;i>=256;i>>=8)c++;const header=o.alloc(2+c);header[0]=r,header[1]=128|c;for(let i=1+c,e=content.length;e>0;i--,e>>=8)header[i]=255&e;return this._createEncoderBuffer([header,content])},h.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){const t=o.alloc(2*e.length);for(let i=0;i<e.length;i++)t.writeUInt16BE(e.charCodeAt(i),2*i);return this._createEncoderBuffer(t)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},h.prototype._encodeObjid=function(e,t,n){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s.]+/g);for(let i=0;i<e.length;i++)e[i]|=0}else if(Array.isArray(e)){e=e.slice();for(let i=0;i<e.length;i++)e[i]|=0}if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!n){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}let r=0;for(let i=0;i<e.length;i++){let t=e[i];for(r++;t>=128;t>>=7)r++}const c=o.alloc(r);let l=c.length-1;for(let i=e.length-1;i>=0;i--){let t=e[i];for(c[l--]=127&t;(t>>=7)>0;)c[l--]=128|127&t}return this._createEncoderBuffer(c)},h.prototype._encodeTime=function(time,e){let t;const n=new Date(time);return"gentime"===e?t=[f(n.getUTCFullYear()),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):"utctime"===e?t=[f(n.getUTCFullYear()%100),f(n.getUTCMonth()+1),f(n.getUTCDate()),f(n.getUTCHours()),f(n.getUTCMinutes()),f(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(t,"octstr")},h.prototype._encodeNull=function(){return this._createEncoderBuffer("")},h.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){const t=e.toArray();!e.sign&&128&t[0]&&t.unshift(0),e=o.from(t)}if(o.isBuffer(e)){let t=e.length;0===e.length&&t++;const n=o.alloc(t);return e.copy(n),0===e.length&&(n[0]=0),this._createEncoderBuffer(n)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);let n=1;for(let i=e;i>=256;i>>=8)n++;const r=new Array(n);for(let i=r.length-1;i>=0;i--)r[i]=255&e,e>>=8;return 128&r[0]&&r.unshift(0),this._createEncoderBuffer(o.from(r))},h.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},h.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},h.prototype._skipDefault=function(e,t,n){const r=this._baseState;let i;if(null===r.default)return!1;const data=e.join();if(void 0===r.defaultBuffer&&(r.defaultBuffer=this._encodeValue(r.default,t,n).join()),data.length!==r.defaultBuffer.length)return!1;for(i=0;i<data.length;i++)if(data[i]!==r.defaultBuffer[i])return!1;return!0}},function(e,t,n){"use strict";const r=t;r.der=n(443),r.pem=n(725)},function(e,t,n){"use strict";const r=n(13),o=n(50),c=n(185).DecoderBuffer,l=n(293),d=n(295);function h(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new f,this.tree._init(e.body)}function f(e){l.call(this,"der",e)}function m(e,t){let n=e.readUInt8(t);if(e.isError(n))return n;const r=d.tagClass[n>>6],o=0==(32&n);if(31==(31&n)){let r=n;for(n=0;128==(128&r);){if(r=e.readUInt8(t),e.isError(r))return r;n<<=7,n|=127&r}}else n&=31;return{cls:r,primitive:o,tag:n,tagStr:d.tag[n]}}function v(e,t,n){let r=e.readUInt8(n);if(e.isError(r))return r;if(!t&&128===r)return null;if(0==(128&r))return r;const o=127&r;if(o>4)return e.error("length octect is too long");r=0;for(let i=0;i<o;i++){r<<=8;const t=e.readUInt8(n);if(e.isError(t))return t;r|=t}return r}e.exports=h,h.prototype.decode=function(data,e){return c.isDecoderBuffer(data)||(data=new c(data,e)),this.tree._decode(data,e)},r(f,l),f.prototype._peekTag=function(e,t,n){if(e.isEmpty())return!1;const r=e.save(),o=m(e,'Failed to peek tag: "'+t+'"');return e.isError(o)?o:(e.restore(r),o.tag===t||o.tagStr===t||o.tagStr+"of"===t||n)},f.prototype._decodeTag=function(e,t,n){const r=m(e,'Failed to decode tag of "'+t+'"');if(e.isError(r))return r;let o=v(e,r.primitive,'Failed to get length of "'+t+'"');if(e.isError(o))return o;if(!n&&r.tag!==t&&r.tagStr!==t&&r.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(r.primitive||null!==o)return e.skip(o,'Failed to match body of: "'+t+'"');const c=e.save(),l=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(l)?l:(o=e.offset-c.offset,e.restore(c),e.skip(o,'Failed to match body of: "'+t+'"'))},f.prototype._skipUntilEnd=function(e,t){for(;;){const n=m(e,t);if(e.isError(n))return n;const r=v(e,n.primitive,t);if(e.isError(r))return r;let o;if(o=n.primitive||null!==r?e.skip(r):this._skipUntilEnd(e,t),e.isError(o))return o;if("end"===n.tagStr)break}},f.prototype._decodeList=function(e,t,n,r){const o=[];for(;!e.isEmpty();){const t=this._peekTag(e,"end");if(e.isError(t))return t;const c=n.decode(e,"der",r);if(e.isError(c)&&t)break;o.push(c)}return o},f.prototype._decodeStr=function(e,t){if("bitstr"===t){const t=e.readUInt8();return e.isError(t)?t:{unused:t,data:e.raw()}}if("bmpstr"===t){const t=e.raw();if(t.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");let n="";for(let i=0;i<t.length/2;i++)n+=String.fromCharCode(t.readUInt16BE(2*i));return n}if("numstr"===t){const t=e.raw().toString("ascii");return this._isNumstr(t)?t:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){const t=e.raw().toString("ascii");return this._isPrintstr(t)?t:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},f.prototype._decodeObjid=function(e,t,n){let r;const o=[];let c=0,l=0;for(;!e.isEmpty();)l=e.readUInt8(),c<<=7,c|=127&l,0==(128&l)&&(o.push(c),c=0);128&l&&o.push(c);const d=o[0]/40|0,h=o[0]%40;if(r=n?o:[d,h].concat(o.slice(1)),t){let e=t[r.join(" ")];void 0===e&&(e=t[r.join(".")]),void 0!==e&&(r=e)}return r},f.prototype._decodeTime=function(e,t){const n=e.raw().toString();let r,o,c,l,d,h;if("gentime"===t)r=0|n.slice(0,4),o=0|n.slice(4,6),c=0|n.slice(6,8),l=0|n.slice(8,10),d=0|n.slice(10,12),h=0|n.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");r=0|n.slice(0,2),o=0|n.slice(2,4),c=0|n.slice(4,6),l=0|n.slice(6,8),d=0|n.slice(8,10),h=0|n.slice(10,12),r=r<70?2e3+r:1900+r}return Date.UTC(r,o-1,c,l,d,h,0)},f.prototype._decodeNull=function(){return null},f.prototype._decodeBool=function(e){const t=e.readUInt8();return e.isError(t)?t:0!==t},f.prototype._decodeInt=function(e,t){const n=e.raw();let r=new o(n);return t&&(r=t[r.toString(10)]||r),r},f.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},function(e){e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},function(e,t,n){var r=n(182),o=n(17).Buffer;function c(e){var t=o.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var n,l=o.alloc(0),i=0;l.length<t;)n=c(i++),l=o.concat([l,r("sha1").update(e).update(n).digest()]);return l.slice(0,t)}},function(e,t){e.exports=function(a,b){for(var e=a.length,i=-1;++i<e;)a[i]^=b[i];return a}},function(e,t,n){var r=n(50),o=n(17).Buffer;e.exports=function(e,t){return o.from(e.toRed(r.mont(t.modulus)).redPow(new r(t.publicExponent)).fromRed().toArray())}},,,function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},,,,,,,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(231),o=n(116),c=n(31),l=n(167),d=n(472),h=n(474),f=n(141);var m=n(191),v=n(76),_=n(221);class y{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(e){if(y.prototype.__init.call(this),y.prototype.__init2.call(this),y.prototype.__init3.call(this),y.prototype.__init4.call(this),y.prototype.__init5.call(this),this._options=e,e.dsn&&(this._dsn=Object(r.c)(e.dsn)),this._dsn){const t=Object(f.a)(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}}captureException(e,t,n){if(Object(o.d)(e))return;let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then((e=>this._captureEvent(e,t,n))).then((e=>{r=e}))),r}captureMessage(e,t,n,r){let o=n&&n.event_id;const l=Object(c.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(l.then((e=>this._captureEvent(e,n,r))).then((e=>{o=e}))),o}captureEvent(e,t,n){if(t&&t.originalException&&Object(o.d)(t.originalException))return;let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then((e=>{r=e}))),r}captureSession(e){this._isEnabled()&&("string"!=typeof e.release||(this.sendSession(e),Object(v.c)(e,{init:!1})))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e)))):Object(l.c)(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,e)))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=Object(m.c)(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(e){return null}}addIntegration(e){Object(m.b)(e,this._integrations)}sendEvent(e,t={}){if(this._dsn){let n=function(e,t,n,r){const o=Object(d.h)(n),c=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const l=Object(d.d)(e,o,r,t);delete e.sdkProcessingMetadata;const h=[{type:c},e];return Object(d.c)(l,[h])}(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=Object(d.a)(n,Object(d.b)(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then((t=>this.emit("afterSendEvent",e,t)),null)}}sendSession(e){if(this._dsn){const t=function(e,t,n,o){const c=Object(d.h)(n),l={sent_at:(new Date).toISOString(),...c&&{sdk:c},...!!o&&{dsn:Object(r.b)(t)}},h="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return Object(d.c)(l,[h])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t,n){if(this._options.sendClientReports){const n=`${e}:${t}`;this._outcomes[n]=this._outcomes[n]+1||1}}on(e,t){this._hooks[e]||(this._hooks[e]=[]),this._hooks[e].push(t)}emit(e,...t){this._hooks[e]&&this._hooks[e].forEach((e=>e(...t)))}_updateSessionFromEvent(e,t){let n=!1,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const c="ok"===e.status;(c&&0===e.errors||c&&n)&&(Object(v.c)(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new l.a((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const r=this.getOptions(),o=Object.keys(this._integrations);return!t.integrations&&o.length>0&&(t.integrations=o),Object(_.a)(r,e,t,n)}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then((e=>e.event_id),(e=>{0}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r;if(!this._isEnabled())return Object(l.b)(new h.a("SDK not enabled, will not capture event.","log"));const d=C(e),f=E(e),m=e.type||"error",v=`before send for type \`${m}\``;if(f&&"number"==typeof o&&Math.random()>o)return this.recordDroppedEvent("sample_rate","error",e),Object(l.b)(new h.a(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const _="replay_event"===m?"replay":m;return this._prepareEvent(e,t,n).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",_,e),new h.a("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Object(c.n)(e))return e.then((e=>{if(!Object(c.i)(e)&&null!==e)throw new h.a(n);return e}),(e=>{throw new h.a(`${t} rejected with ${e}`)}));if(!Object(c.i)(e)&&null!==e)throw new h.a(n);return e}(function(e,t,n){const{beforeSend:r,beforeSendTransaction:o}=e;if(E(t)&&r)return r(t,n);if(C(t)&&o)return o(t,n);return t}(r,n,t),v)})).then((r=>{if(null===r)throw this.recordDroppedEvent("before_send",_,e),new h.a(`${v} returned \`null\`, will not send event.`,"log");const o=n&&n.getSession();!d&&o&&this._updateSessionFromEvent(o,r);const c=r.transaction_info;if(d&&c&&r.transaction!==e.transaction){const source="custom";r.transaction_info={...c,source:source}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof h.a)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new h.a(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_sendEnvelope(e){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",e),this._transport.send(e).then(null,(e=>{}))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map((t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}}))}}function E(e){return void 0===e.type}function C(e){return"transaction"===e.type}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(474),o=n(167);function c(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(c){if(!(void 0===e||t.length<e))return Object(o.b)(new r.a("Not adding Promise because buffer limit was reached."));const l=c();return-1===t.indexOf(l)&&t.push(l),l.then((()=>n(l))).then(null,(()=>n(l).then(null,(()=>{})))),l},drain:function(e){return new o.a(((n,r)=>{let c=t.length;if(!c)return n(!0);const l=setTimeout((()=>{e&&e>0&&n(!1)}),e);t.forEach((e=>{Object(o.c)(e).then((()=>{--c||(clearTimeout(l),n(!0))}),r)}))}))}}}var l=n(472),d=n(796);function h(e,t,n=c(e.bufferSize||30)){let h={};function m(c){const m=[];if(Object(l.g)(c,((t,n)=>{const r=Object(l.f)(n);if(Object(d.a)(h,r)){const o=f(t,n);e.recordDroppedEvent("ratelimit_backoff",r,o)}else m.push(t)})),0===m.length)return Object(o.c)();const v=Object(l.c)(c[0],m),_=t=>{Object(l.g)(v,((n,r)=>{const o=f(n,r);e.recordDroppedEvent(t,Object(l.f)(r),o)}))};return n.add((()=>t({body:Object(l.i)(v,e.textEncoder)}).then((e=>(void 0!==e.statusCode&&(e.statusCode<200||e.statusCode),h=Object(d.c)(h,e),e)),(e=>{throw _("network_error"),e})))).then((e=>e),(e=>{if(e instanceof r.a)return _("queue_overflow"),Object(o.c)();throw e}))}return m.__sentry__baseTransport__=!0,{send:m,flush:e=>n.drain(e)}}function f(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}},function(e,t,n){"use strict";function r(e,t){return t=t||{},new Promise((function(n,r){var s=new XMLHttpRequest,o=[],u={},a=function e(){return{ok:2==(s.status/100|0),statusText:s.statusText,status:s.status,url:s.responseURL,text:function(){return Promise.resolve(s.responseText)},json:function(){return Promise.resolve(s.responseText).then(JSON.parse)},blob:function(){return Promise.resolve(new Blob([s.response]))},clone:e,headers:{keys:function(){return o},entries:function(){return o.map((function(e){return[e,s.getResponseHeader(e)]}))},get:function(e){return s.getResponseHeader(e)},has:function(e){return null!=s.getResponseHeader(e)}}}};for(var i in s.open(t.method||"get",e,!0),s.onload=function(){s.getAllResponseHeaders().toLowerCase().replace(/^(.+?):/gm,(function(e,t){u[t]||o.push(u[t]=t)})),n(a())},s.onerror=r,s.withCredentials="include"==t.credentials,t.headers)s.setRequestHeader(i,t.headers[i]);s.send(t.body||null)}))}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";var r=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===o}(e)}(e)};var o="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?m((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function l(e,source,t){return e.concat(source).map((function(element){return c(element,t)}))}function d(e){return Object.keys(e).concat(function(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter((function(symbol){return e.propertyIsEnumerable(symbol)})):[]}(e))}function h(object,e){try{return e in object}catch(e){return!1}}function f(e,source,t){var n={};return t.isMergeableObject(e)&&d(e).forEach((function(r){n[r]=c(e[r],t)})),d(source).forEach((function(r){(function(e,t){return h(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))})(e,r)||(h(e,r)&&t.isMergeableObject(source[r])?n[r]=function(e,t){if(!t.customMerge)return m;var n=t.customMerge(e);return"function"==typeof n?n:m}(r,t)(e[r],source[r],t):n[r]=c(source[r],t))})),n}function m(e,source,t){(t=t||{}).arrayMerge=t.arrayMerge||l,t.isMergeableObject=t.isMergeableObject||r,t.cloneUnlessOtherwiseSpecified=c;var n=Array.isArray(source);return n===Array.isArray(e)?n?t.arrayMerge(e,source,t):f(e,source,t):c(source,t)}m.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return m(e,n,t)}),{})};var v=m;e.exports=v},,,function(e,t,n){"use strict";(function(e,r){function o(e){try{return e()}catch(e){}}n.d(t,"a",(function(){return d}));const c=o((function(){return globalThis}))||o((function(){return window}))||o((function(){return self}))||o((function(){return e}))||o((function(){return Function("return this")()}));let l=!1;function d(){l&&(delete c.process,l=!1)}!c||o((function(){return"production"}))||o((function(){return r}))||(Object.defineProperty(c,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),l=!0)}).call(this,n(23),n(42))},function(e,t){},,function(e,t,n){(function(e,n){var r="__lodash_hash_undefined__",o=9007199254740991,c="[object Arguments]",l="[object Function]",d="[object Object]",h=/^\[object .+?Constructor\]$/,f=/^(?:0|[1-9]\d*)$/,m={};m["[object Float32Array]"]=m["[object Float64Array]"]=m["[object Int8Array]"]=m["[object Int16Array]"]=m["[object Int32Array]"]=m["[object Uint8Array]"]=m["[object Uint8ClampedArray]"]=m["[object Uint16Array]"]=m["[object Uint32Array]"]=!0,m[c]=m["[object Array]"]=m["[object ArrayBuffer]"]=m["[object Boolean]"]=m["[object DataView]"]=m["[object Date]"]=m["[object Error]"]=m[l]=m["[object Map]"]=m["[object Number]"]=m[d]=m["[object RegExp]"]=m["[object Set]"]=m["[object String]"]=m["[object WeakMap]"]=!1;var v="object"==typeof e&&e&&e.Object===Object&&e,_="object"==typeof self&&self&&self.Object===Object&&self,y=v||_||Function("return this")(),E=t&&!t.nodeType&&t,C=E&&"object"==typeof n&&n&&!n.nodeType&&n,w=C&&C.exports===E,S=w&&v.process,T=function(){try{var e=C&&C.require&&C.require("util").types;return e||S&&S.binding&&S.binding("util")}catch(e){}}(),A=T&&T.isTypedArray;function R(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}var O,I,k,N=Array.prototype,L=Function.prototype,M=Object.prototype,x=y["__core-js_shared__"],D=L.toString,P=M.hasOwnProperty,U=(O=/[^.]+$/.exec(x&&x.keys&&x.keys.IE_PROTO||""))?"Symbol(src)_1."+O:"",B=M.toString,F=D.call(Object),V=RegExp("^"+D.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),j=w?y.Buffer:void 0,H=y.Symbol,$=y.Uint8Array,z=j?j.allocUnsafe:void 0,W=(I=Object.getPrototypeOf,k=Object,function(e){return I(k(e))}),K=Object.create,G=M.propertyIsEnumerable,Y=N.splice,X=H?H.toStringTag:void 0,Z=function(){try{var e=Ce(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),Q=j?j.isBuffer:void 0,J=Math.max,ee=Date.now,te=Ce(y,"Map"),ne=Ce(Object,"create"),re=function(){function object(){}return function(e){if(!xe(e))return{};if(K)return K(e);object.prototype=e;var t=new object;return object.prototype=void 0,t}}();function ie(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function oe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ae(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function se(e){var data=this.__data__=new oe(e);this.size=data.size}function ce(e,t){var n=Ie(e),r=!n&&Oe(e),o=!n&&!r&&Ne(e),c=!n&&!r&&!o&&Pe(e),l=n||r||o||c,d=l?function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}(e.length,String):[],h=d.length;for(var f in e)!t&&!P.call(e,f)||l&&("length"==f||o&&("offset"==f||"parent"==f)||c&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||we(f,h))||d.push(f);return d}function le(object,e,t){(void 0!==t&&!Re(object[e],t)||void 0===t&&!(e in object))&&he(object,e,t)}function de(object,e,t){var n=object[e];P.call(object,e)&&Re(n,t)&&(void 0!==t||e in object)||he(object,e,t)}function ue(e,t){for(var n=e.length;n--;)if(Re(e[n][0],t))return n;return-1}function he(object,e,t){"__proto__"==e&&Z?Z(object,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):object[e]=t}ie.prototype.clear=function(){this.__data__=ne?ne(null):{},this.size=0},ie.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ie.prototype.get=function(e){var data=this.__data__;if(ne){var t=data[e];return t===r?void 0:t}return P.call(data,e)?data[e]:void 0},ie.prototype.has=function(e){var data=this.__data__;return ne?void 0!==data[e]:P.call(data,e)},ie.prototype.set=function(e,t){var data=this.__data__;return this.size+=this.has(e)?0:1,data[e]=ne&&void 0===t?r:t,this},oe.prototype.clear=function(){this.__data__=[],this.size=0},oe.prototype.delete=function(e){var data=this.__data__,t=ue(data,e);return!(t<0)&&(t==data.length-1?data.pop():Y.call(data,t,1),--this.size,!0)},oe.prototype.get=function(e){var data=this.__data__,t=ue(data,e);return t<0?void 0:data[t][1]},oe.prototype.has=function(e){return ue(this.__data__,e)>-1},oe.prototype.set=function(e,t){var data=this.__data__,n=ue(data,e);return n<0?(++this.size,data.push([e,t])):data[n][1]=t,this},ae.prototype.clear=function(){this.size=0,this.__data__={hash:new ie,map:new(te||oe),string:new ie}},ae.prototype.delete=function(e){var t=Ee(this,e).delete(e);return this.size-=t?1:0,t},ae.prototype.get=function(e){return Ee(this,e).get(e)},ae.prototype.has=function(e){return Ee(this,e).has(e)},ae.prototype.set=function(e,t){var data=Ee(this,e),n=data.size;return data.set(e,t),this.size+=data.size==n?0:1,this},se.prototype.clear=function(){this.__data__=new oe,this.size=0},se.prototype.delete=function(e){var data=this.__data__,t=data.delete(e);return this.size=data.size,t},se.prototype.get=function(e){return this.__data__.get(e)},se.prototype.has=function(e){return this.__data__.has(e)},se.prototype.set=function(e,t){var data=this.__data__;if(data instanceof oe){var n=data.__data__;if(!te||n.length<199)return n.push([e,t]),this.size=++data.size,this;data=this.__data__=new ae(n)}return data.set(e,t),this.size=data.size,this};var fe,pe=function(object,e,t){for(var n=-1,r=Object(object),o=t(object),c=o.length;c--;){var l=o[fe?c:++n];if(!1===e(r[l],l,r))break}return object};function ge(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":X&&X in Object(e)?function(e){var t=P.call(e,X),n=e[X];try{e[X]=void 0;var r=!0}catch(e){}var o=B.call(e);r&&(t?e[X]=n:delete e[X]);return o}(e):function(e){return B.call(e)}(e)}function me(e){return De(e)&&ge(e)==c}function ve(e){return!(!xe(e)||function(e){return!!U&&U in e}(e))&&(Le(e)?V:h).test(function(e){if(null!=e){try{return D.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function be(object){if(!xe(object))return function(object){var e=[];if(null!=object)for(var t in Object(object))e.push(t);return e}(object);var e=Se(object),t=[];for(var n in object)("constructor"!=n||!e&&P.call(object,n))&&t.push(n);return t}function _e(object,source,e,t,n){object!==source&&pe(source,(function(r,o){if(n||(n=new se),xe(r))!function(object,source,e,t,n,r,o){var c=Te(object,e),l=Te(source,e),h=o.get(l);if(h)return void le(object,e,h);var f=r?r(c,l,e+"",object,source,o):void 0,m=void 0===f;if(m){var v=Ie(l),_=!v&&Ne(l),y=!v&&!_&&Pe(l);f=l,v||_||y?Ie(c)?f=c:De(T=c)&&ke(T)?f=function(source,e){var t=-1,n=source.length;e||(e=Array(n));for(;++t<n;)e[t]=source[t];return e}(c):_?(m=!1,f=function(e,t){if(t)return e.slice();var n=e.length,r=z?z(n):new e.constructor(n);return e.copy(r),r}(l,!0)):y?(m=!1,E=l,C=!0?(w=E.buffer,S=new w.constructor(w.byteLength),new $(S).set(new $(w)),S):E.buffer,f=new E.constructor(C,E.byteOffset,E.length)):f=[]:function(e){if(!De(e)||ge(e)!=d)return!1;var t=W(e);if(null===t)return!0;var n=P.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&D.call(n)==F}(l)||Oe(l)?(f=c,Oe(c)?f=function(e){return function(source,e,object,t){var n=!object;object||(object={});var r=-1,o=e.length;for(;++r<o;){var c=e[r],l=t?t(object[c],source[c],c,object,source):void 0;void 0===l&&(l=source[c]),n?he(object,c,l):de(object,c,l)}return object}(e,Ue(e))}(c):xe(c)&&!Le(c)||(f=function(object){return"function"!=typeof object.constructor||Se(object)?{}:re(W(object))}(l))):m=!1}var E,C,w,S;var T;m&&(o.set(l,f),n(f,l,t,r,o),o.delete(l));le(object,e,f)}(object,source,o,e,_e,t,n);else{var c=t?t(Te(object,o),r,o+"",object,source,n):void 0;void 0===c&&(c=r),le(object,o,c)}}),Ue)}function ye(e,t){return Ae(function(e,t,n){return t=J(void 0===t?e.length-1:t,0),function(){for(var r=arguments,o=-1,c=J(r.length-t,0),l=Array(c);++o<c;)l[o]=r[t+o];o=-1;for(var d=Array(t+1);++o<t;)d[o]=r[o];return d[t]=n(l),R(e,this,d)}}(e,t,Ve),e+"")}function Ee(map,e){var t,n,data=map.__data__;return("string"==(n=typeof(t=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t)?data["string"==typeof e?"string":"hash"]:data.map}function Ce(object,e){var t=function(object,e){return null==object?void 0:object[e]}(object,e);return ve(t)?t:void 0}function we(e,t){var n=typeof e;return!!(t=null==t?o:t)&&("number"==n||"symbol"!=n&&f.test(e))&&e>-1&&e%1==0&&e<t}function Se(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||M)}function Te(object,e){if(("constructor"!==e||"function"!=typeof object[e])&&"__proto__"!=e)return object[e]}var Ae=function(e){var t=0,n=0;return function(){var r=ee(),o=16-(r-n);if(n=r,o>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(Z?function(e,t){return Z(e,"toString",{configurable:!0,enumerable:!1,value:(n=t,function(){return n}),writable:!0});var n}:Ve);function Re(e,t){return e===t||e!=e&&t!=t}var Oe=me(function(){return arguments}())?me:function(e){return De(e)&&P.call(e,"callee")&&!G.call(e,"callee")},Ie=Array.isArray;function ke(e){return null!=e&&Me(e.length)&&!Le(e)}var Ne=Q||function(){return!1};function Le(e){if(!xe(e))return!1;var t=ge(e);return t==l||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Me(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=o}function xe(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function De(e){return null!=e&&"object"==typeof e}var Pe=A?function(e){return function(t){return e(t)}}(A):function(e){return De(e)&&Me(e.length)&&!!m[ge(e)]};function Ue(object){return ke(object)?ce(object,!0):be(object)}var Be,Fe=(Be=function(object,source,e,t){_e(object,source,e,t)},ye((function(object,e){var t=-1,n=e.length,r=n>1?e[n-1]:void 0,o=n>2?e[2]:void 0;for(r=Be.length>3&&"function"==typeof r?(n--,r):void 0,o&&function(e,t,object){if(!xe(object))return!1;var n=typeof t;return!!("number"==n?ke(object)&&we(t,object.length):"string"==n&&t in object)&&Re(object[t],e)}(e[0],e[1],o)&&(r=n<3?void 0:r,n=1),object=Object(object);++t<n;){var source=e[t];source&&Be(object,source,t,r)}return object})));function Ve(e){return e}n.exports=Fe}).call(this,n(23),n(201)(e))},function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}function o(){return"npm"}n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return h})),n.d(t,"b",(function(){return l}));var r=n(31),o=n(43);const c=Object(o.b)();function l(e,t={}){try{let n=e;const r=5,o=[];let c=0,l=0;const h=" > ",f=h.length;let m;const v=Array.isArray(t)?t:t.keyAttrs,_=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&c++<r&&(m=d(n,v),!("html"===m||c>1&&l+o.length*f+m.length>=_));)o.push(m),l+=m.length,n=n.parentNode;return o.reverse().join(h)}catch(e){return"<unknown>"}}function d(e,t){const n=e,o=[];let c,l,d,h,i;if(!n||!n.tagName)return"";o.push(n.tagName.toLowerCase());const f=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(f&&f.length)f.forEach((e=>{o.push(`[${e[0]}="${e[1]}"]`)}));else if(n.id&&o.push(`#${n.id}`),c=n.className,c&&Object(r.l)(c))for(l=c.split(/\s+/),i=0;i<l.length;i++)o.push(`.${l[i]}`);const m=["aria-label","type","name","title","alt"];for(i=0;i<m.length;i++)d=m[i],h=n.getAttribute(d),h&&o.push(`[${d}="${h}"]`);return o.join("")}function h(){try{return c.document.location.href}catch(e){return""}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return d})),n.d(t,"b",(function(){return _})),n.d(t,"c",(function(){return l})),n.d(t,"d",(function(){return w})),n.d(t,"e",(function(){return f})),n.d(t,"f",(function(){return E})),n.d(t,"g",(function(){return h})),n.d(t,"h",(function(){return C})),n.d(t,"i",(function(){return v}));var r=n(231),o=n(114),c=n(44);function l(e,t=[]){return[e,t]}function d(e,t){const[n,r]=e;return[n,[...r,t]]}function h(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function f(e,t){return h(e,((e,n)=>t.includes(n)))}function m(input,e){return(e||new TextEncoder).encode(input)}function v(e,t){const[n,r]=e;let c=JSON.stringify(n);function l(e){"string"==typeof c?c="string"==typeof e?c+e:[m(c,t),e]:c.push("string"==typeof e?m(e,t):e)}for(const e of r){const[t,n]=e;if(l(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)l(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Object(o.a)(n))}l(e)}}return"string"==typeof c?c:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(c)}function _(e,t){const n="string"==typeof e.data?m(e.data,t):e.data;return[Object(c.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const y={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function E(e){return y[e]}function C(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function w(e,t,n,o){const l=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:Object(r.b)(o)},...l&&{trace:Object(c.c)({...l})}}}},function(e,t,n){"use strict";function r(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let i=0;i<t.length;i++){if(t[i]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let i=0;i<t.length;i++)if(t[i]===n){t.splice(i,1);break}}]}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));class r extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(237),o=n(21);n(105),n(18),n(106);function c(e){return null!==e&&"object"===Object(o.a)(e)}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".",o=arguments.length>3?arguments[3]:void 0;if(!c(t))return l(e,{},n,o);var object=Object.assign({},t);for(var d in e)if("__proto__"!==d&&"constructor"!==d){var h=e[d];null!=h&&(o&&o(object,d,h,n)||(Array.isArray(h)&&Array.isArray(object[d])?object[d]=[].concat(Object(r.a)(h),Object(r.a)(object[d])):c(h)&&c(object[d])?object[d]=l(h,object[d],(n?"".concat(n,"."):"")+d.toString(),o):object[d]=h))}return object}function d(e){return function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.reduce((function(p,t){return l(p,t,"",e)}),{})}}var h=d();d((function(object,e,t){if(void 0!==object[e]&&"function"==typeof t)return object[e]=t(object[e]),!0})),d((function(object,e,t){if(Array.isArray(object[e])&&"function"==typeof t)return object[e]=t(object[e]),!0}))},function(e,t,n){"use strict";function r(e){var t,n=e.Symbol;return"function"==typeof n?n.observable?t=n.observable:(t=n("observable"),n.observable=t):t="@@observable",t}n.d(t,"a",(function(){return r}))},function(e,t,n){e.exports=n(631).Observable},function(e,t,n){"use strict";e.exports=function(data,e){e||(e={}),"function"==typeof e&&(e={cmp:e});var t,n="boolean"==typeof e.cycles&&e.cycles,r=e.cmp&&(t=e.cmp,function(e){return function(a,b){var n={key:a,value:e[a]},r={key:b,value:e[b]};return t(n,r)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var i,c;if(Array.isArray(t)){for(c="[",i=0;i<t.length;i++)i&&(c+=","),c+=e(t[i])||"null";return c+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var l=o.push(t)-1,d=Object.keys(t).sort(r&&r(t));for(c="",i=0;i<d.length;i++){var h=d[i],f=e(t[h]);f&&(c&&(c+=","),c+=JSON.stringify(h)+":"+f)}return o.splice(l,1),"{"+c+"}"}}(data)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(4),o=n(7),c=n(632);function l(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var h,f,m,v,_,y=this;return r.__generator(this,(function(E){switch(E.label){case 0:return h=n.fragmentMap,f=n.contextValue,m=n.variableValues,v={},_=function(e){return r.__awaiter(y,void 0,void 0,(function(){var _,y,E,C,w;return r.__generator(this,(function(r){switch(r.label){case 0:return o.shouldInclude(e,m)?o.isField(e)?[4,d(e,t,n)]:[3,2]:[2];case 1:return _=r.sent(),y=o.resultKeyNameFromField(e),void 0!==_&&(void 0===v[y]?v[y]=_:c.merge(v[y],_)),[2];case 2:if(o.isInlineFragment(e))E=e;else if(!(E=h[e.name.value]))throw new Error("No fragment named "+e.name.value);return C=E.typeCondition.name.value,n.fragmentMatcher(t,C,f)?[4,l(E.selectionSet,t,n)]:[3,4];case 3:w=r.sent(),c.merge(v,w),r.label=4;case 4:return[2]}}))}))},[4,Promise.all(e.selections.map(_))];case 1:return E.sent(),n.resultMapper?[2,n.resultMapper(v,t)]:[2,v]}}))}))}function d(e,t,n){return r.__awaiter(this,void 0,void 0,(function(){var c,d,f,m,v,_,y;return r.__generator(this,(function(r){switch(r.label){case 0:return c=n.variableValues,d=n.contextValue,f=n.resolver,m=e.name.value,v=o.argumentsObjectFromField(e,c),_={isLeaf:!e.selectionSet,resultKey:o.resultKeyNameFromField(e),directives:o.getDirectiveInfoFromField(e,c),field:e},[4,f(m,t,v,d,_)];case 1:return y=r.sent(),e.selectionSet?null==y?[2,y]:Array.isArray(y)?[2,h(e,y,n)]:[2,l(e.selectionSet,y,n)]:[2,y]}}))}))}function h(e,t,n){return Promise.all(t.map((function(t){return null===t?null:Array.isArray(t)?h(e,t,n):l(e.selectionSet,t,n)})))}t.graphql=function(e,t,n,r,c,d){void 0===d&&(d={});var h=o.getMainDefinition(t),f=o.getFragmentDefinitions(t),m={fragmentMap:o.createFragmentMap(f),contextValue:r,variableValues:c,resultMapper:d.resultMapper,resolver:e,fragmentMatcher:d.fragmentMatcher||function(){return!0}};return l(h.selectionSet,n,m)}},function(e,t,n){"use strict";var r=n(633)(n(634)),o=n(48),c=o.ApolloLink,l=o.Observable,d=n(635),h=d.selectURI,f=d.selectHttpOptionsAndBody,m=d.fallbackHttpConfig,v=d.serializeFetchParameter,_=d.createSignalIfSupported,y=d.parseAndCheckHttpResponse,E=n(636),C=E.extractFiles,w=E.isExtractableFile,S=E.ReactNativeFile;function T(e,t,n){e.append(t,n,n.name)}t.ReactNativeFile=S,t.isExtractableFile=w,t.formDataAppendFile=T,t.createUploadLink=function(e){var t=void 0===e?{}:e,n=t.uri,o=void 0===n?"/graphql":n,d=t.isExtractableFile,E=void 0===d?w:d,S=t.FormData,A=t.formDataAppendFile,R=void 0===A?T:A,O=t.fetch,I=t.fetchOptions,k=t.credentials,N=t.headers,L={http:{includeExtensions:t.includeExtensions},options:I,credentials:k,headers:N};return new c((function(e){var t=h(e,o),n=e.getContext(),c=n.clientAwareness,d=(c=void 0===c?{}:c).name,w=c.version,T=n.headers,A={http:n.http,options:n.fetchOptions,credentials:n.credentials,headers:(0,r.default)({},d&&{"apollographql-client-name":d},{},w&&{"apollographql-client-version":w},{},T)},I=f(e,m,L,A),k=I.options,body=I.body,N=C(body,"",E),M=N.clone,x=N.files,D=v(M,"Payload");if(x.size){delete k.headers["content-type"];var form=new(S||FormData);form.append("operations",D);var map={},i=0;x.forEach((function(e){map[++i]=e})),form.append("map",JSON.stringify(map)),i=0,x.forEach((function(e,t){R(form,++i,t)})),k.body=form}else k.body=D;return new l((function(n){var r;if(!k.signal){var o=_().controller;o&&(r=o,k.signal=r.signal)}return(O||fetch)(t,k).then((function(t){return e.setContext({response:t}),t})).then(y(e)).then((function(e){n.next(e),n.complete()})).catch((function(e){"AbortError"!==e.name&&(e.result&&e.result.errors&&e.result.data&&n.next(e.result),n.error(e))})),function(){r&&r.abort()}}))}))}},,function(e,t,n){e.exports=function(){"use strict";var e="minute",i=/[+-]\d\d(?::?\d\d)?/g,t=/([+-]|\d\d)/g;return function(s,n,r){var u=n.prototype;r.utc=function(e){return new n({date:e,utc:!0,args:arguments})},u.utc=function(i){var t=r(this.toDate(),{locale:this.$L,utc:!0});return i?t.add(this.utcOffset(),e):t},u.local=function(){return r(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),o.call(this,e)};var c=u.init;u.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else c.call(this)};var a=u.utcOffset;u.utcOffset=function(s,n){var r=this.$utils().u;if(r(s))return this.$u?0:r(this.$offset)?a.call(this):this.$offset;if("string"==typeof s&&null===(s=function(e){void 0===e&&(e="");var s=e.match(i);if(!s)return null;var n=(""+s[0]).match(t)||["-",0,0],r=n[0],u=60*+n[1]+ +n[2];return 0===u?0:"+"===r?u:-u}(s)))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(n)return o.$offset=u,o.$u=0===s,o;if(0!==s){var c=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+c,e)).$offset=u,o.$x.$localOffset=c}else o=this.utc();return o};var l=u.format;u.format=function(e){var i=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return l.call(this,i)},u.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||(new Date).getTimezoneOffset());return this.$d.valueOf()-6e4*e},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var d=u.toDate;u.toDate=function(e){return"s"===e&&this.$offset?r(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var h=u.diff;u.diff=function(e,i,t){if(e&&this.$u===e.$u)return h.call(this,e,i,t);var s=this.local(),n=r(e).local();return h.call(s,n,i,t)}}}()},function(e,t,n){e.exports=function(){"use strict";var e,s,t=1e3,i=6e4,n=36e5,r=864e5,o=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,u=31536e6,c=2592e6,a=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,l={years:u,months:c,days:r,hours:n,minutes:i,seconds:t,milliseconds:1,weeks:6048e5},d=function(e){return e instanceof p},h=function(e,s,t){return new p(e,t,s.$l)},f=function(e){return s.p(e)+"s"},m=function(e){return e<0},v=function(e){return m(e)?Math.ceil(e):Math.floor(e)},_=function(e){return Math.abs(e)},g=function(e,s){return e?m(e)?{negative:!0,format:""+_(e)+s}:{negative:!1,format:""+e+s}:{negative:!1,format:""}},p=function(){function m(e,s,t){var i=this;if(this.$d={},this.$l=t,void 0===e&&(this.$ms=0,this.parseFromMilliseconds()),s)return h(e*l[f(s)],this);if("number"==typeof e)return this.$ms=e,this.parseFromMilliseconds(),this;if("object"==typeof e)return Object.keys(e).forEach((function(s){i.$d[f(s)]=e[s]})),this.calMilliseconds(),this;if("string"==typeof e){var n=e.match(a);if(n){var r=n.slice(2).map((function(e){return Number(e)}));return this.$d.years=r[0],this.$d.months=r[1],this.$d.weeks=r[2],this.$d.days=r[3],this.$d.hours=r[4],this.$d.minutes=r[5],this.$d.seconds=r[6],this.calMilliseconds(),this}}return this}var _=m.prototype;return _.calMilliseconds=function(){var e=this;this.$ms=Object.keys(this.$d).reduce((function(s,t){return s+(e.$d[t]||0)*l[t]}),0)},_.parseFromMilliseconds=function(){var e=this.$ms;this.$d.years=v(e/u),e%=u,this.$d.months=v(e/c),e%=c,this.$d.days=v(e/r),e%=r,this.$d.hours=v(e/n),e%=n,this.$d.minutes=v(e/i),e%=i,this.$d.seconds=v(e/t),e%=t,this.$d.milliseconds=e},_.toISOString=function(){var e=g(this.$d.years,"Y"),s=g(this.$d.months,"M"),t=+this.$d.days||0;this.$d.weeks&&(t+=7*this.$d.weeks);var i=g(t,"D"),n=g(this.$d.hours,"H"),r=g(this.$d.minutes,"M"),o=this.$d.seconds||0;this.$d.milliseconds&&(o+=this.$d.milliseconds/1e3);var u=g(o,"S"),c=e.negative||s.negative||i.negative||n.negative||r.negative||u.negative,a=n.format||r.format||u.format?"T":"",l=(c?"-":"")+"P"+e.format+s.format+i.format+a+n.format+r.format+u.format;return"P"===l||"-P"===l?"P0D":l},_.toJSON=function(){return this.toISOString()},_.format=function(e){var t=e||"YYYY-MM-DDTHH:mm:ss",i={Y:this.$d.years,YY:s.s(this.$d.years,2,"0"),YYYY:s.s(this.$d.years,4,"0"),M:this.$d.months,MM:s.s(this.$d.months,2,"0"),D:this.$d.days,DD:s.s(this.$d.days,2,"0"),H:this.$d.hours,HH:s.s(this.$d.hours,2,"0"),m:this.$d.minutes,mm:s.s(this.$d.minutes,2,"0"),s:this.$d.seconds,ss:s.s(this.$d.seconds,2,"0"),SSS:s.s(this.$d.milliseconds,3,"0")};return t.replace(o,(function(e,s){return s||String(i[e])}))},_.as=function(e){return this.$ms/l[f(e)]},_.get=function(e){var s=this.$ms,t=f(e);return"milliseconds"===t?s%=1e3:s="weeks"===t?v(s/l[t]):this.$d[t],0===s?0:s},_.add=function(e,s,t){var i;return i=s?e*l[f(s)]:d(e)?e.$ms:h(e,this).$ms,h(this.$ms+i*(t?-1:1),this)},_.subtract=function(e,s){return this.add(e,s,!0)},_.locale=function(e){var s=this.clone();return s.$l=e,s},_.clone=function(){return h(this.$ms,this)},_.humanize=function(s){return e().add(this.$ms,"ms").locale(this.$l).fromNow(!s)},_.milliseconds=function(){return this.get("milliseconds")},_.asMilliseconds=function(){return this.as("milliseconds")},_.seconds=function(){return this.get("seconds")},_.asSeconds=function(){return this.as("seconds")},_.minutes=function(){return this.get("minutes")},_.asMinutes=function(){return this.as("minutes")},_.hours=function(){return this.get("hours")},_.asHours=function(){return this.as("hours")},_.days=function(){return this.get("days")},_.asDays=function(){return this.as("days")},_.weeks=function(){return this.get("weeks")},_.asWeeks=function(){return this.as("weeks")},_.months=function(){return this.get("months")},_.asMonths=function(){return this.as("months")},_.years=function(){return this.get("years")},_.asYears=function(){return this.as("years")},m}();return function(t,i,n){e=n,s=n().$utils(),n.duration=function(e,s){var t=n.locale();return h(e,{$l:t},s)},n.isDuration=d;var r=i.prototype.add,o=i.prototype.subtract;i.prototype.add=function(e,s){return d(e)&&(e=e.asMilliseconds()),r.bind(this)(e,s)},i.prototype.subtract=function(e,s){return d(e)&&(e=e.asMilliseconds()),o.bind(this)(e,s)}}}()},function(e,t,n){e.exports=function(){"use strict";return function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}}()},function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},c=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),l=function(e){return null==e||"function"!=typeof e&&"object"!==(void 0===e?"undefined":r(e))},d=Object.prototype.toString,h=function(e){var t=void 0===e?"undefined":r(e);return"undefined"===t?"undefined":null===e?"null":!0===e||!1===e||e instanceof Boolean?"boolean":"string"===t||e instanceof String?"string":"number"===t||e instanceof Number?"number":"function"===t||e instanceof Function?void 0!==e.constructor.name&&"Generator"===e.constructor.name.slice(0,9)?"generatorfunction":"function":void 0!==Array.isArray&&Array.isArray(e)?"array":e instanceof RegExp?"regexp":e instanceof Date?"date":"[object RegExp]"===(t=d.call(e))?"regexp":"[object Date]"===t?"date":"[object Arguments]"===t?"arguments":"[object Error]"===t?"error":"[object Promise]"===t?"promise":function(e){return e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}(e)?"buffer":"[object Set]"===t?"set":"[object WeakSet]"===t?"weakset":"[object Map]"===t?"map":"[object WeakMap]"===t?"weakmap":"[object Symbol]"===t?"symbol":"[object Map Iterator]"===t?"mapiterator":"[object Set Iterator]"===t?"setiterator":"[object String Iterator]"===t?"stringiterator":"[object Array Iterator]"===t?"arrayiterator":"[object Int8Array]"===t?"int8array":"[object Uint8Array]"===t?"uint8array":"[object Uint8ClampedArray]"===t?"uint8clampedarray":"[object Int16Array]"===t?"int16array":"[object Uint16Array]"===t?"uint16array":"[object Int32Array]"===t?"int32array":"[object Uint32Array]"===t?"uint32array":"[object Float32Array]"===t?"float32array":"[object Float64Array]"===t?"float64array":"object"};function f(e){e=e||{};var t=arguments.length,i=0;if(1===t)return e;for(;++i<t;){var n=arguments[i];l(e)&&(e=n),v(n)&&m(e,n)}return e}function m(e,t){for(var n in function(e,t){if(null==e)throw new TypeError("expected first argument to be an object.");if(void 0===t||"undefined"==typeof Symbol)return e;if("function"!=typeof Object.getOwnPropertySymbols)return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),o=arguments.length,i=0;++i<o;)for(var c=Object(arguments[i]),l=Object.getOwnPropertySymbols(c),d=0;d<l.length;d++){var h=l[d];n.call(c,h)&&(r[h]=c[h])}}(e,t),t)if("__proto__"!==n&&_(t,n)){var r=t[n];v(r)?("undefined"===h(e[n])&&"function"===h(r)&&(e[n]=r),e[n]=f(e[n]||{},r)):e[n]=r}return e}function v(e){return"object"===h(e)||"function"===h(e)}function _(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var y=f,E="undefined"!=typeof window,C=function(){if(E&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)return"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}}),!0;return!1}();var w="event",S="observer",T=function(){if(E)return"function"==typeof window.CustomEvent?window.CustomEvent:(e.prototype=window.Event.prototype,e);function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}}();function A(e,t){if(e.length){var n=e.indexOf(t);return n>-1?e.splice(n,1):void 0}}function R(e,t){if("IMG"===e.tagName&&e.getAttribute("data-srcset")){var n=e.getAttribute("data-srcset"),r=[],o=e.parentNode.offsetWidth*t,c=void 0,l=void 0,d=void 0;(n=n.trim().split(",")).map((function(e){e=e.trim(),-1===(c=e.lastIndexOf(" "))?(l=e,d=999998):(l=e.substr(0,c),d=parseInt(e.substr(c+1,e.length-c-2),10)),r.push([d,l])})),r.sort((function(a,b){if(a[0]<b[0])return 1;if(a[0]>b[0])return-1;if(a[0]===b[0]){if(-1!==b[1].indexOf(".webp",b[1].length-5))return 1;if(-1!==a[1].indexOf(".webp",a[1].length-5))return-1}return 0}));for(var h="",f=void 0,i=0;i<r.length;i++){h=(f=r[i])[1];var m=r[i+1];if(m&&m[0]<o){h=f[1];break}if(!m){h=f[1];break}}return h}}function O(e,t){for(var n=void 0,i=0,r=e.length;i<r;i++)if(t(e[i])){n=e[i];break}return n}var I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return E&&window.devicePixelRatio||e};function k(){if(!E)return!1;var e=!0,t=document;try{var n=t.createElement("object");n.type="image/webp",n.style.visibility="hidden",n.innerHTML="!",t.body.appendChild(n),e=!n.offsetWidth,t.body.removeChild(n)}catch(t){e=!1}return e}var N=function(){if(E){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t)}catch(e){}return e}}(),L={on:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];N?e.addEventListener(t,n,{capture:r,passive:!0}):e.addEventListener(t,n,r)},off:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];e.removeEventListener(t,n,r)}},M=function(e,t,n){var image=new Image;if(!e||!e.src){var r=new Error("image src is required");return n(r)}image.src=e.src,image.onload=function(){t({naturalHeight:image.naturalHeight,naturalWidth:image.naturalWidth,src:image.src})},image.onerror=function(e){n(e)}},style=function(e,t){return"undefined"!=typeof getComputedStyle?getComputedStyle(e,null).getPropertyValue(t):e.style[t]},x=function(e){return style(e,"overflow")+style(e,"overflow-y")+style(e,"overflow-x")};function D(){}var P=function(){function e(t){var n=t.max;o(this,e),this.options={max:n||100},this._caches=[]}return c(e,[{key:"has",value:function(e){return this._caches.indexOf(e)>-1}},{key:"add",value:function(e){this.has(e)||(this._caches.push(e),this._caches.length>this.options.max&&this.free())}},{key:"free",value:function(){this._caches.shift()}}]),e}(),U=function(){function e(t){var n=t.el,r=t.src,c=t.error,l=t.loading,d=t.bindType,h=t.$parent,f=t.options,m=t.elRenderer,v=t.imageCache;o(this,e),this.el=n,this.src=r,this.error=c,this.loading=l,this.bindType=d,this.attempt=0,this.naturalHeight=0,this.naturalWidth=0,this.options=f,this.rect=null,this.$parent=h,this.elRenderer=m,this._imageCache=v,this.performanceData={init:Date.now(),loadStart:0,loadEnd:0},this.filter(),this.initState(),this.render("loading",!1)}return c(e,[{key:"initState",value:function(){"dataset"in this.el?this.el.dataset.src=this.src:this.el.setAttribute("data-src",this.src),this.state={loading:!1,error:!1,loaded:!1,rendered:!1}}},{key:"record",value:function(e){this.performanceData[e]=Date.now()}},{key:"update",value:function(e){var t=e.src,n=e.loading,r=e.error,o=this.src;this.src=t,this.loading=n,this.error=r,this.filter(),o!==this.src&&(this.attempt=0,this.initState())}},{key:"getRect",value:function(){this.rect=this.el.getBoundingClientRect()}},{key:"checkInView",value:function(){return this.getRect(),this.rect.top<window.innerHeight*this.options.preLoad&&this.rect.bottom>this.options.preLoadTop&&this.rect.left<window.innerWidth*this.options.preLoad&&this.rect.right>0}},{key:"filter",value:function(){var e=this;(function(e){if(!(e instanceof Object))return[];if(Object.keys)return Object.keys(e);var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t})(this.options.filter).map((function(t){e.options.filter[t](e,e.options)}))}},{key:"renderLoading",value:function(e){var t=this;this.state.loading=!0,M({src:this.loading},(function(data){t.render("loading",!1),t.state.loading=!1,e()}),(function(){e(),t.state.loading=!1,t.options.silent||console.warn("VueLazyload log: load failed with loading image("+t.loading+")")}))}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;return this.attempt>this.options.attempt-1&&this.state.error?(this.options.silent||console.log("VueLazyload log: "+this.src+" tried too more than "+this.options.attempt+" times"),void t()):this.state.rendered&&this.state.loaded?void 0:this._imageCache.has(this.src)?(this.state.loaded=!0,this.render("loaded",!0),this.state.rendered=!0,t()):void this.renderLoading((function(){e.attempt++,e.options.adapter.beforeLoad&&e.options.adapter.beforeLoad(e,e.options),e.record("loadStart"),M({src:e.src},(function(data){e.naturalHeight=data.naturalHeight,e.naturalWidth=data.naturalWidth,e.state.loaded=!0,e.state.error=!1,e.record("loadEnd"),e.render("loaded",!1),e.state.rendered=!0,e._imageCache.add(e.src),t()}),(function(t){!e.options.silent&&console.error(t),e.state.error=!0,e.state.loaded=!1,e.render("error",!1)}))}))}},{key:"render",value:function(e,t){this.elRenderer(this,e,t)}},{key:"performance",value:function(){var e="loading",time=0;return this.state.loaded&&(e="loaded",time=(this.performanceData.loadEnd-this.performanceData.loadStart)/1e3),this.state.error&&(e="error"),{src:this.src,state:e,time:time}}},{key:"$destroy",value:function(){this.el=null,this.src=null,this.error=null,this.loading=null,this.bindType=null,this.attempt=0}}]),e}(),B="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",F=["scroll","wheel","mousewheel","resize","animationend","transitionend","touchmove"],V={rootMargin:"0px",threshold:0},j=function(e){return function(){function t(e){var n,r,c,l,d=e.preLoad,h=e.error,f=e.throttleWait,m=e.preLoadTop,v=e.dispatchEvent,_=e.loading,y=e.attempt,E=e.silent,C=void 0===E||E,T=e.scale,A=e.listenEvents,filter=(e.hasbind,e.filter),R=e.adapter,O=e.observer,N=e.observerOptions;o(this,t),this.version="1.3.3",this.mode=w,this.ListenerQueue=[],this.TargetIndex=0,this.TargetQueue=[],this.options={silent:C,dispatchEvent:!!v,throttleWait:f||200,preLoad:d||1.3,preLoadTop:m||0,error:h||B,loading:_||B,attempt:y||3,scale:T||I(T),ListenEvents:A||F,hasbind:!1,supportWebp:k(),filter:filter||{},adapter:R||{},observer:!!O,observerOptions:N||V},this._initEvent(),this._imageCache=new P({max:200}),this.lazyLoadHandler=(n=this._lazyLoadHandler.bind(this),r=this.options.throttleWait,c=null,l=0,function(){if(!c){var e=Date.now()-l,t=this,o=arguments,d=function(){l=Date.now(),c=!1,n.apply(t,o)};e>=r?d():c=setTimeout(d,r)}}),this.setMode(this.options.observer?S:w)}return c(t,[{key:"config",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};y(this.options,e)}},{key:"performance",value:function(){var e=[];return this.ListenerQueue.map((function(t){e.push(t.performance())})),e}},{key:"addLazyBox",value:function(e){this.ListenerQueue.push(e),E&&(this._addListenerTarget(window),this._observer&&this._observer.observe(e.el),e.$el&&e.$el.parentNode&&this._addListenerTarget(e.$el.parentNode))}},{key:"add",value:function(t,n,r){var o=this;if(function(e,t){for(var n=!1,i=0,r=e.length;i<r;i++)if(t(e[i])){n=!0;break}return n}(this.ListenerQueue,(function(e){return e.el===t})))return this.update(t,n),e.nextTick(this.lazyLoadHandler);var c=this._valueFormatter(n.value),l=c.src,d=c.loading,h=c.error;e.nextTick((function(){l=R(t,o.options.scale)||l,o._observer&&o._observer.observe(t);var c=Object.keys(n.modifiers)[0],f=void 0;c&&(f=(f=r.context.$refs[c])?f.$el||f:document.getElementById(c)),f||(f=function(e){if(E){if(!(e instanceof HTMLElement))return window;for(var t=e;t&&t!==document.body&&t!==document.documentElement&&t.parentNode;){if(/(scroll|auto)/.test(x(t)))return t;t=t.parentNode}return window}}(t));var m=new U({bindType:n.arg,$parent:f,el:t,loading:d,error:h,src:l,elRenderer:o._elRenderer.bind(o),options:o.options,imageCache:o._imageCache});o.ListenerQueue.push(m),E&&(o._addListenerTarget(window),o._addListenerTarget(f)),o.lazyLoadHandler(),e.nextTick((function(){return o.lazyLoadHandler()}))}))}},{key:"update",value:function(t,n,r){var o=this,c=this._valueFormatter(n.value),l=c.src,d=c.loading,h=c.error;l=R(t,this.options.scale)||l;var f=O(this.ListenerQueue,(function(e){return e.el===t}));f?f.update({src:l,loading:d,error:h}):this.add(t,n,r),this._observer&&(this._observer.unobserve(t),this._observer.observe(t)),this.lazyLoadHandler(),e.nextTick((function(){return o.lazyLoadHandler()}))}},{key:"remove",value:function(e){if(e){this._observer&&this._observer.unobserve(e);var t=O(this.ListenerQueue,(function(t){return t.el===e}));t&&(this._removeListenerTarget(t.$parent),this._removeListenerTarget(window),A(this.ListenerQueue,t),t.$destroy())}}},{key:"removeComponent",value:function(e){e&&(A(this.ListenerQueue,e),this._observer&&this._observer.unobserve(e.el),e.$parent&&e.$el.parentNode&&this._removeListenerTarget(e.$el.parentNode),this._removeListenerTarget(window))}},{key:"setMode",value:function(e){var t=this;C||e!==S||(e=w),this.mode=e,e===w?(this._observer&&(this.ListenerQueue.forEach((function(e){t._observer.unobserve(e.el)})),this._observer=null),this.TargetQueue.forEach((function(e){t._initListen(e.el,!0)}))):(this.TargetQueue.forEach((function(e){t._initListen(e.el,!1)})),this._initIntersectionObserver())}},{key:"_addListenerTarget",value:function(e){if(e){var t=O(this.TargetQueue,(function(t){return t.el===e}));return t?t.childrenCount++:(t={el:e,id:++this.TargetIndex,childrenCount:1,listened:!0},this.mode===w&&this._initListen(t.el,!0),this.TargetQueue.push(t)),this.TargetIndex}}},{key:"_removeListenerTarget",value:function(e){var t=this;this.TargetQueue.forEach((function(n,r){n.el===e&&(n.childrenCount--,n.childrenCount||(t._initListen(n.el,!1),t.TargetQueue.splice(r,1),n=null))}))}},{key:"_initListen",value:function(e,t){var n=this;this.options.ListenEvents.forEach((function(r){return L[t?"on":"off"](e,r,n.lazyLoadHandler)}))}},{key:"_initEvent",value:function(){var e=this;this.Event={listeners:{loading:[],loaded:[],error:[]}},this.$on=function(t,n){e.Event.listeners[t]||(e.Event.listeners[t]=[]),e.Event.listeners[t].push(n)},this.$once=function(t,n){var r=e;e.$on(t,(function e(){r.$off(t,e),n.apply(r,arguments)}))},this.$off=function(t,n){if(n)A(e.Event.listeners[t],n);else{if(!e.Event.listeners[t])return;e.Event.listeners[t].length=0}},this.$emit=function(t,n,r){e.Event.listeners[t]&&e.Event.listeners[t].forEach((function(e){return e(n,r)}))}}},{key:"_lazyLoadHandler",value:function(){var e=this,t=[];this.ListenerQueue.forEach((function(e,n){e.el&&e.el.parentNode||t.push(e),e.checkInView()&&e.load()})),t.forEach((function(t){A(e.ListenerQueue,t),t.$destroy()}))}},{key:"_initIntersectionObserver",value:function(){var e=this;C&&(this._observer=new IntersectionObserver(this._observerHandler.bind(this),this.options.observerOptions),this.ListenerQueue.length&&this.ListenerQueue.forEach((function(t){e._observer.observe(t.el)})))}},{key:"_observerHandler",value:function(e,t){var n=this;e.forEach((function(e){e.isIntersecting&&n.ListenerQueue.forEach((function(t){if(t.el===e.target){if(t.state.loaded)return n._observer.unobserve(t.el);t.load()}}))}))}},{key:"_elRenderer",value:function(e,t,n){if(e.el){var r=e.el,o=e.bindType,c=void 0;switch(t){case"loading":c=e.loading;break;case"error":c=e.error;break;default:c=e.src}if(o?r.style[o]='url("'+c+'")':r.getAttribute("src")!==c&&r.setAttribute("src",c),r.setAttribute("lazy",t),this.$emit(t,e,n),this.options.adapter[t]&&this.options.adapter[t](e,this.options),this.options.dispatchEvent){var l=new T(t,{detail:e});r.dispatchEvent(l)}}}},{key:"_valueFormatter",value:function(e){var t,n=e,o=this.options.loading,c=this.options.error;return null!==(t=e)&&"object"===(void 0===t?"undefined":r(t))&&(e.src||this.options.silent||console.error("Vue Lazyload warning: miss src with "+e),n=e.src,o=e.loading||this.options.loading,c=e.error||this.options.error),{src:n,loading:o,error:c}}}]),t}()},H=function(e){return{props:{tag:{type:String,default:"div"}},render:function(e){return!1===this.show?e(this.tag):e(this.tag,null,this.$slots.default)},data:function(){return{el:null,state:{loaded:!1},rect:{},show:!1}},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){this.show=!0,this.state.loaded=!0,this.$emit("show",this)},destroy:function(){return this.$destroy}}}},$=function(){function e(t){var n=t.lazy;o(this,e),this.lazy=n,n.lazyContainerMananger=this,this._queue=[]}return c(e,[{key:"bind",value:function(e,t,n){var r=new W({el:e,binding:t,vnode:n,lazy:this.lazy});this._queue.push(r)}},{key:"update",value:function(e,t,n){var r=O(this._queue,(function(t){return t.el===e}));r&&r.update({el:e,binding:t,vnode:n})}},{key:"unbind",value:function(e,t,n){var r=O(this._queue,(function(t){return t.el===e}));r&&(r.clear(),A(this._queue,r))}}]),e}(),z={selector:"img"},W=function(){function e(t){var n=t.el,r=t.binding,c=t.vnode,l=t.lazy;o(this,e),this.el=null,this.vnode=c,this.binding=r,this.options={},this.lazy=l,this._queue=[],this.update({el:n,binding:r})}return c(e,[{key:"update",value:function(e){var t=this,n=e.el,r=e.binding;this.el=n,this.options=y({},z,r.value),this.getImgs().forEach((function(e){t.lazy.add(e,y({},t.binding,{value:{src:"dataset"in e?e.dataset.src:e.getAttribute("data-src"),error:("dataset"in e?e.dataset.error:e.getAttribute("data-error"))||t.options.error,loading:("dataset"in e?e.dataset.loading:e.getAttribute("data-loading"))||t.options.loading}}),t.vnode)}))}},{key:"getImgs",value:function(){return function(e){for(var t=e.length,n=[],i=0;i<t;i++)n.push(e[i]);return n}(this.el.querySelectorAll(this.options.selector))}},{key:"clear",value:function(){var e=this;this.getImgs().forEach((function(t){return e.lazy.remove(t)})),this.vnode=null,this.binding=null,this.lazy=null}}]),e}(),K=function(e){return{props:{src:[String,Object],tag:{type:String,default:"img"}},render:function(e){return e(this.tag,{attrs:{src:this.renderSrc}},this.$slots.default)},data:function(){return{el:null,options:{src:"",error:"",loading:"",attempt:e.options.attempt},state:{loaded:!1,error:!1,attempt:0},rect:{},renderSrc:""}},watch:{src:function(){this.init(),e.addLazyBox(this),e.lazyLoadHandler()}},created:function(){this.init(),this.renderSrc=this.options.loading},mounted:function(){this.el=this.$el,e.addLazyBox(this),e.lazyLoadHandler()},beforeDestroy:function(){e.removeComponent(this)},methods:{init:function(){var t=e._valueFormatter(this.src),n=t.src,r=t.loading,o=t.error;this.state.loaded=!1,this.options.src=n,this.options.error=o,this.options.loading=r,this.renderSrc=this.options.loading},getRect:function(){this.rect=this.$el.getBoundingClientRect()},checkInView:function(){return this.getRect(),E&&this.rect.top<window.innerHeight*e.options.preLoad&&this.rect.bottom>0&&this.rect.left<window.innerWidth*e.options.preLoad&&this.rect.right>0},load:function(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:D;if(this.state.attempt>this.options.attempt-1&&this.state.error)return e.options.silent||console.log("VueLazyload log: "+this.options.src+" tried too more than "+this.options.attempt+" times"),void n();var r=this.options.src;M({src:r},(function(e){var n=e.src;t.renderSrc=n,t.state.loaded=!0}),(function(e){t.state.attempt++,t.renderSrc=t.options.error,t.state.error=!0}))}}}},G={install:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=j(e),r=new n(t),o=new $({lazy:r}),c="2"===e.version.split(".")[0];e.prototype.$Lazyload=r,t.lazyComponent&&e.component("lazy-component",H(r)),t.lazyImage&&e.component("lazy-image",K(r)),c?(e.directive("lazy",{bind:r.add.bind(r),update:r.update.bind(r),componentUpdated:r.lazyLoadHandler.bind(r),unbind:r.remove.bind(r)}),e.directive("lazy-container",{bind:o.bind.bind(o),componentUpdated:o.update.bind(o),unbind:o.unbind.bind(o)})):(e.directive("lazy",{bind:r.lazyLoadHandler.bind(r),update:function(e,t){y(this.vm.$refs,this.vm.$els),r.add(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){r.remove(this.el)}}),e.directive("lazy-container",{update:function(e,t){o.update(this.el,{modifiers:this.modifiers||{},arg:this.arg,value:e,oldValue:t},{context:this.vm})},unbind:function(){o.unbind(this.el)}}))}};t.a=G},function(e,t,n){"use strict";var r=n(296),o=n(450);r(t,"__esModule",{value:!0}),t.default=void 0;var c=o(n(745)).default;t.default=c},,function(e,t,n){"use strict";n.r(t),n.d(t,"captureUserFeedback",(function(){return ze})),n.d(t,"close",(function(){return je})),n.d(t,"defaultIntegrations",(function(){return xe})),n.d(t,"flush",(function(){return Ve})),n.d(t,"forceLoad",(function(){return Be})),n.d(t,"init",(function(){return De})),n.d(t,"lastEventId",(function(){return Ue})),n.d(t,"onLoad",(function(){return Fe})),n.d(t,"showReportDialog",(function(){return Pe})),n.d(t,"wrap",(function(){return He}));var r=n(70),o=n(191),c=n(385),l=n(16),d=n(141),h=n(321),f=n(326),m=n(167),v=n(802),_=n(459),y=n(384),E=n(470),C=n(472),time=n(142);var w=n(231),S=n(31),object=n(44),T=n(114),A=n(116);function R(e,t){const n=I(e,t),r={type:t&&t.name,value:N(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function O(e,t){return{exception:{values:[R(e,t)]}}}function I(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(k.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const k=/Minified React error #\d+;/i;function N(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function L(e,t,n,r,o){let c;if(Object(S.e)(t)&&t.error){return O(e,t.error)}if(Object(S.a)(t)||Object(S.b)(t)){const o=t;if("stack"in t)c=O(e,t);else{const t=o.name||(Object(S.a)(o)?"DOMError":"DOMException"),l=o.message?`${t}: ${o.message}`:t;c=M(e,l,n,r),Object(A.b)(c,l)}return"code"in o&&(c.tags={...c.tags,"DOMException.code":`${o.code}`}),c}if(Object(S.d)(t))return O(e,t);if(Object(S.i)(t)||Object(S.f)(t)){return c=function(e,t,n,r){const o=Object(l.c)().getClient(),c=o&&o.getOptions().normalizeDepth,d={exception:{values:[{type:Object(S.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Object(object.d)(t)}`}]},extra:{__serialized__:Object(T.b)(t,c)}};if(n){const t=I(e,n);t.length&&(d.exception.values[0].stacktrace={frames:t})}return d}(e,t,n,o),Object(A.a)(c,{synthetic:!0}),c}return c=M(e,t,n,r),Object(A.b)(c,`${t}`,void 0),Object(A.a)(c,{synthetic:!0}),c}function M(e,input,t,n){const r={message:input};if(n&&t){const n=I(e,t);n.length&&(r.exception={values:[{value:input,stacktrace:{frames:n}}]})}return r}var x=n(56);const D=n(43).a;let P=0;function U(){return P>0}function B(){P++,setTimeout((()=>{P--}))}function F(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Object(object.f)(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const o=r.map((e=>F(e,t)));return e.apply(this,o)}catch(e){throw B(),Object(x.n)((n=>{n.addEventProcessor((e=>(t.mechanism&&(Object(A.b)(e,void 0,void 0),Object(A.a)(e,t.mechanism)),e.extra={...e.extra,arguments:r},e))),Object(x.d)(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Object(object.g)(r,e),Object(object.a)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}var V=n(471);const j=["fatal","error","warning","log","info","debug"];function H(e){return"warn"===e?"warning":j.includes(e)?e:"log"}var $=n(104),z=n(797);const W=1024,K="Breadcrumbs";class G{static __initStatic(){this.id=K}__init(){this.name=G.id}constructor(e){G.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&Object(v.b)("console",Y),this.options.dom&&Object(v.b)("dom",function(e){function t(t){let n,r="object"==typeof e?e.serializeAttribute:void 0,o="object"==typeof e&&"number"==typeof e.maxStringLength?e.maxStringLength:void 0;o&&o>W&&(o=W),"string"==typeof r&&(r=[r]);try{const e=t.event;n=function(e){return e&&!!e.target}(e)?Object(V.b)(e.target,{keyAttrs:r,maxStringLength:o}):Object(V.b)(e,{keyAttrs:r,maxStringLength:o})}catch(e){n="<unknown>"}0!==n.length&&Object(l.c)().addBreadcrumb({category:`ui.${t.name}`,message:n},{event:t.event,name:t.name,global:t.global})}return t}(this.options.dom)),this.options.xhr&&Object(v.b)("xhr",X),this.options.fetch&&Object(v.b)("fetch",Z),this.options.history&&Object(v.b)("history",Q)}addSentryBreadcrumb(e){this.options.sentry&&Object(l.c)().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:Object(A.e)(e)},{event:e})}}function Y(e){for(let i=0;i<e.args.length;i++)if("ref=Ref<"===e.args[i]){e.args[i+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:H(e.level),message:Object($.a)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message=`Assertion failed: ${Object($.a)(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1)}Object(l.c)().addBreadcrumb(t,{input:e.args,level:e.level})}function X(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[v.a];if(!t||!n||!r)return;const{method:o,url:c,status_code:d,body:body}=r,data={method:o,url:c,status_code:d},h={xhr:e.xhr,input:body,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"xhr",data:data,type:"http"},h)}function Z(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&(!e.fetchData.url.match(/sentry_key/)||"POST"!==e.fetchData.method))if(e.error){const data=e.fetchData,r={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"fetch",data:data,level:"error",type:"http"},r)}else{const data={...e.fetchData,status_code:e.response&&e.response.status},r={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};Object(l.c)().addBreadcrumb({category:"fetch",data:data,type:"http"},r)}}function Q(e){let t=e.from,n=e.to;const r=Object(z.a)(D.location.href);let o=Object(z.a)(t);const c=Object(z.a)(n);o.path||(o=r),r.protocol===c.protocol&&r.host===c.host&&(n=c.relative),r.protocol===o.protocol&&r.host===o.host&&(t=o.relative),Object(l.c)().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}G.__initStatic();class J extends _.a{constructor(e){const t=D.SENTRY_SDK_SOURCE||Object(E.a)();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${t}:@sentry/browser`,version:y.a}],version:y.a},super(e),e.sendClientReports&&D.document&&D.document.addEventListener("visibilitychange",(()=>{"hidden"===D.document.visibilityState&&this._flushOutcomes()}))}eventFromException(e,t){return function(e,t,n,r){const o=L(e,t,n&&n.syntheticException||void 0,r);return Object(A.a)(o),o.level="error",n&&n.event_id&&(o.event_id=n.event_id),Object(m.c)(o)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,o){const c=M(e,t,r&&r.syntheticException||void 0,o);return c.level=n,r&&r.event_id&&(c.event_id=r.event_id),Object(m.c)(c)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById(K);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(e),super.sendEvent(e,t)}captureUserFeedback(e){if(!this._isEnabled())return;const t=function(e,{metadata:t,tunnel:n,dsn:r}){const o={event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:Object(w.b)(r)}},c=function(e){return[{type:"user_report"},e]}(e);return Object(C.c)(o,[c])}(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return;if(!this._dsn)return;const t=function(e,t,n){const r=[{type:"client_report"},{timestamp:n||Object(time.a)(),discarded_events:e}];return Object(C.c)(t?{dsn:t}:{},[r])}(e,this._options.tunnel&&Object(w.b)(this._dsn));this._sendEnvelope(t)}}class ee{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ee.id}__init2(){this._installFunc={onerror:te,onunhandledrejection:ne}}constructor(e){ee.prototype.__init.call(this),ee.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const t in e){const n=this._installFunc[t];n&&e[t]&&(t,n(),this._installFunc[t]=void 0)}}}function te(){Object(v.b)("error",(data=>{const[e,t,n]=oe();if(!e.getIntegration(ee))return;const{msg:r,url:o,line:line,column:c,error:l}=data;if(U()||l&&l.__sentry_own_request__)return;const d=void 0===l&&Object(S.l)(r)?function(e,t,line,n){const r=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let o=Object(S.e)(e)?e.message:e,c="Error";const l=o.match(r);l&&(c=l[1],o=l[2]);return re({exception:{values:[{type:c,value:o}]}},t,line,n)}(r,o,line,c):re(L(t,l||r,void 0,n,!1),o,line,c);d.level="error",ie(e,l,d,"onerror")}))}function ne(){Object(v.b)("unhandledrejection",(e=>{const[t,n,r]=oe();if(!t.getIntegration(ee))return;let o=e;try{"reason"in e?o=e.reason:"detail"in e&&"reason"in e.detail&&(o=e.detail.reason)}catch(e){}if(U()||o&&o.__sentry_own_request__)return!0;const c=Object(S.j)(o)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(o)}`}]}}:L(n,o,void 0,r,!0);c.level="error",ie(t,o,c,"onunhandledrejection")}))}function re(e,t,line,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],c=o[0]=o[0]||{},l=c.stacktrace=c.stacktrace||{},d=l.frames=l.frames||[],h=isNaN(parseInt(n,10))?void 0:n,f=isNaN(parseInt(line,10))?void 0:line,m=Object(S.l)(t)&&t.length>0?t:Object(V.a)();return 0===d.length&&d.push({colno:h,filename:m,function:"?",in_app:!0,lineno:f}),e}function ie(e,t,n,r){Object(A.a)(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function oe(){const e=Object(l.c)(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}ee.__initStatic();const ae=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class se{static __initStatic(){this.id="TryCatch"}__init(){this.name=se.id}constructor(e){se.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Object(object.e)(D,"setTimeout",ce),this._options.setInterval&&Object(object.e)(D,"setInterval",ce),this._options.requestAnimationFrame&&Object(object.e)(D,"requestAnimationFrame",le),this._options.XMLHttpRequest&&"XMLHttpRequest"in D&&Object(object.e)(XMLHttpRequest.prototype,"send",de);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:ae).forEach(ue)}}}function ce(e){return function(...t){const n=t[0];return t[0]=F(n,{mechanism:{data:{function:Object(h.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function le(e){return function(t){return e.apply(this,[F(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(h.b)(e)},handled:!0,type:"instrument"}})])}}function de(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&Object(object.e)(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Object(h.b)(t)},handled:!0,type:"instrument"}},r=Object(object.f)(t);return r&&(n.mechanism.data.handler=Object(h.b)(r)),F(t,n)}))})),e.apply(this,t)}}function ue(e){const t=D,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(object.e)(n,"addEventListener",(function(t){return function(n,r,o){try{"function"==typeof r.handleEvent&&(r.handleEvent=F(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(h.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,F(r,{mechanism:{data:{function:"addEventListener",handler:Object(h.b)(r),target:e},handled:!0,type:"instrument"}}),o])}})),Object(object.e)(n,"removeEventListener",(function(e){return function(t,n,r){const o=n;try{const n=o&&o.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,o,r)}})))}se.__initStatic();var he=n(92);class fe{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=fe.id}constructor(e={}){fe.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=Object(l.c)().getClient();e&&Object(he.b)(((t,n)=>{const r=Object(l.c)().getIntegration(fe);return r?function(e,t,n,r,o){if(!(r.exception&&r.exception.values&&o&&Object(S.g)(o.originalException,Error)))return r;const c=pe(e,n,o.originalException,t);return r.exception.values=[...c,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t}))}}function pe(e,t,n,r,o=[]){if(!Object(S.g)(n[r],Error)||o.length+1>=t)return o;const c=R(e,n[r]);return pe(e,t,n[r],r,[c,...o])}fe.__initStatic();class ge{constructor(){ge.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=ge.id}setupOnce(){Object(he.b)((e=>{if(Object(l.c)().getIntegration(ge)){if(!D.navigator&&!D.location&&!D.document)return e;const t=e.request&&e.request.url||D.location&&D.location.href,{referrer:n}=D.document||{},{userAgent:r}=D.navigator||{},o={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},c={...e.request,...t&&{url:t},headers:o};return{...e,request:c}}return e}))}}ge.__initStatic();class me{constructor(){me.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=me.id}setupOnce(e,t){const n=e=>{if(e.type)return e;const n=t().getIntegration(me);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!be(e,t))return!1;if(!ve(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=_e(t),r=_e(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!be(e,t))return!1;if(!ve(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function ve(e,t){let n=ye(e),r=ye(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let i=0;i<r.length;i++){const e=r[i],t=n[i];if(e.filename!==t.filename||e.lineno!==t.lineno||e.colno!==t.colno||e.function!==t.function)return!1}return!0}function be(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function _e(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ye(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch(e){return}}me.__initStatic();const Ee="?";function Ce(e,t,n,r){const o={filename:e,function:t,in_app:!0};return void 0!==n&&(o.lineno=n),void 0!==r&&(o.colno=r),o}const we=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Se=/\((\S*)(?::(\d+))(?::(\d+))\)/,Te=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Ae=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,Re=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Oe=[[30,line=>{const e=we.exec(line);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=Se.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=ke(e[1]||Ee,e[2]);return Ce(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,line=>{const e=Te.exec(line);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=Ae.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||Ee;return[n,t]=ke(n,t),Ce(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,line=>{const e=Re.exec(line);return e?Ce(e[2],e[1]||Ee,+e[3],e[4]?+e[4]:void 0):void 0}]],Ie=Object(h.a)(...Oe),ke=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:Ee,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};var base=n(460);let Ne;function Le(e,t=function(){if(Ne)return Ne;if(Object(f.a)(D.fetch))return Ne=D.fetch.bind(D);const e=D.document;let t=D.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){}return Ne=t.bind(D)}()){let n=0,r=0;return Object(base.a)(e,(function(o){const c=o.body.length;n+=c,r++;const l={body:o.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,l).then((e=>(n-=c,r--,{statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}})))}catch(e){return Ne=void 0,n-=c,r--,Object(m.b)(e)}}))}function Me(e){return Object(base.a)(e,(function(t){return new m.a(((n,r)=>{const o=new XMLHttpRequest;o.onerror=r,o.onreadystatechange=()=>{4===o.readyState&&n({statusCode:o.status,headers:{"x-sentry-rate-limits":o.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":o.getResponseHeader("Retry-After")}})},o.open("POST",e.url);for(const header in e.headers)Object.prototype.hasOwnProperty.call(e.headers,header)&&o.setRequestHeader(header,e.headers[header]);o.send(t.body)}))}))}const xe=[new r.Integrations.InboundFilters,new r.Integrations.FunctionToString,new se,new G,new ee,new fe,new me,new ge];function De(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=xe),void 0===e.release&&("string"==typeof __SENTRY_RELEASE__&&(e.release=__SENTRY_RELEASE__),D.SENTRY_RELEASE&&D.SENTRY_RELEASE.id&&(e.release=D.SENTRY_RELEASE.id)),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:Object(h.c)(e.stackParser||Ie),integrations:Object(o.a)(e),transport:e.transport||(Object(f.b)()?Le:Me)};Object(c.a)(J,t),e.autoSessionTracking&&function(){if(void 0===D.document)return;const e=Object(l.c)();if(!e.captureSession)return;$e(e),Object(v.b)("history",(({from:e,to:t})=>{void 0!==e&&e!==t&&$e(Object(l.c)())}))}()}function Pe(e={},t=Object(l.c)()){if(!D.document)return;const{client:n,scope:r}=t.getStackTop(),o=e.dsn||n&&n.getDsn();if(!o)return;r&&(e.user={...r.getUser(),...e.user}),e.eventId||(e.eventId=t.lastEventId());const script=D.document.createElement("script");script.async=!0,script.src=Object(d.b)(o,e),e.onLoad&&(script.onload=e.onLoad);const c=D.document.head||D.document.body;c&&c.appendChild(script)}function Ue(){return Object(l.c)().lastEventId()}function Be(){}function Fe(e){e()}function Ve(e){const t=Object(l.c)().getClient();return t?t.flush(e):Object(m.c)(!1)}function je(e){const t=Object(l.c)().getClient();return t?t.close(e):Object(m.c)(!1)}function He(e){return F(e)()}function $e(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function ze(e){const t=Object(l.c)().getClient();t&&t.captureUserFeedback(e)}},function(e,t,n){"use strict";var r=n(165);function o(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var c=function(){return(c=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)},l=function(){function e(e,t){var n=this;this.changeListeners=[],this.HAS_DOCUMENT_COOKIE=!1,this.cookies=function(e,t){return"string"==typeof e?r.parse(e,t):"object"==typeof e&&null!==e?e:{}}(e,t),new Promise((function(){n.HAS_DOCUMENT_COOKIE="object"==typeof document&&"string"==typeof document.cookie})).catch((function(){}))}return e.prototype._updateBrowserValues=function(e){this.HAS_DOCUMENT_COOKIE&&(this.cookies=r.parse(document.cookie,e))},e.prototype._emitChange=function(e){for(var i=0;i<this.changeListeners.length;++i)this.changeListeners[i](e)},e.prototype.get=function(e,t,n){return void 0===t&&(t={}),this._updateBrowserValues(n),o(this.cookies[e],t)},e.prototype.getAll=function(e,t){void 0===e&&(e={}),this._updateBrowserValues(t);var n={};for(var r in this.cookies)n[r]=o(this.cookies[r],e);return n},e.prototype.set=function(e,t,n){var o;"object"==typeof t&&(t=JSON.stringify(t)),this.cookies=c(c({},this.cookies),((o={})[e]=t,o)),this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,t,n)),this._emitChange({name:e,value:t,options:n})},e.prototype.remove=function(e,t){var n=t=c(c({},t),{expires:new Date(1970,1,1,0,0,1),maxAge:0});this.cookies=c({},this.cookies),delete this.cookies[e],this.HAS_DOCUMENT_COOKIE&&(document.cookie=r.serialize(e,"",n)),this._emitChange({name:e,value:void 0,options:t})},e.prototype.addChangeListener=function(e){this.changeListeners.push(e)},e.prototype.removeChangeListener=function(e){var t=this.changeListeners.indexOf(e);t>=0&&this.changeListeners.splice(t,1)},e}();t.a=l},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(491);function o(e){return new r.a((function(t){e.then((function(e){t.next(e),t.complete()})).catch(t.error.bind(t))}))}},function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0;return function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t,n){return t&&c(e.prototype,t),n&&c(e,n),e}n.d(t,"a",(function(){return N}));var d=function(){return"function"==typeof Symbol},h=function(e){return d()&&Boolean(Symbol[e])},f=function(e){return h(e)?Symbol[e]:"@@"+e};d()&&!h("observable")&&(Symbol.observable=Symbol("observable"));var m=f("iterator"),v=f("observable"),_=f("species");function y(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function E(e){var t=e.constructor;return void 0!==t&&null===(t=t[_])&&(t=void 0),void 0!==t?t:N}function C(e){return e instanceof N}function w(e){w.log?w.log(e):setTimeout((function(){throw e}))}function S(e){Promise.resolve().then((function(){try{e()}catch(e){w(e)}}))}function T(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=y(t,"unsubscribe");n&&n.call(t)}}catch(e){w(e)}}function A(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function R(e,t,n){e._state="running";var r=e._observer;try{var o=y(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(A(e),!o)throw n;o.call(r,n);break;case"complete":A(e),o&&o.call(r)}}catch(e){w(e)}"closed"===e._state?T(e):"running"===e._state&&(e._state="ready")}function O(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 S((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var i=0;i<t.length&&(R(e,t[i].type,t[i].value),"closed"!==e._state);++i);}}(e)}))):void R(e,t,n);e._queue.push({type:t,value:n})}}var I=function(){function e(e,t){this._cleanup=void 0,this._observer=e,this._queue=void 0,this._state="initializing";var n=new k(this);try{this._cleanup=t.call(void 0,n)}catch(e){n.error(e)}"initializing"===this._state&&(this._state="ready")}return e.prototype.unsubscribe=function(){"closed"!==this._state&&(A(this),T(this))},l(e,[{key:"closed",get:function(){return"closed"===this._state}}]),e}(),k=function(){function e(e){this._subscription=e}var t=e.prototype;return t.next=function(e){O(this._subscription,"next",e)},t.error=function(e){O(this._subscription,"error",e)},t.complete=function(){O(this._subscription,"complete")},l(e,[{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),N=function(){function e(t){if(!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}var t=e.prototype;return t.subscribe=function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new I(e,this._subscriber)},t.forEach=function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,c)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function c(){o.unsubscribe(),n()}}))},t.map=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(E(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.filter=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(E(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))},t.reduce=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=E(this),r=arguments.length>1,o=!1,c=arguments[1],l=c;return new n((function(n){return t.subscribe({next:function(t){var c=!o;if(o=!0,!c||r)try{l=e(l,t)}catch(e){return n.error(e)}else l=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(l),n.complete()}})}))},t.concat=function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=E(this);return new o((function(t){var r,c=0;return function e(l){r=l.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){c===n.length?(r=void 0,t.complete()):e(o.from(n[c++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))},t.flatMap=function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=E(this);return new n((function(r){var o=[],c=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var c=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var i=o.indexOf(c);i>=0&&o.splice(i,1),l()}});o.push(c)},error:function(e){r.error(e)},complete:function(){l()}});function l(){c.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(s){return s.unsubscribe()})),c.unsubscribe()}}))},t[v]=function(){return this},e.from=function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var o=y(t,v);if(o){var c=o.call(t);if(Object(c)!==c)throw new TypeError(c+" is not an object");return C(c)&&c.constructor===n?c:new n((function(e){return c.subscribe(e)}))}if(h("iterator")&&(o=y(t,m)))return new n((function(e){S((function(){if(!e.closed){for(var n,c=r(o.call(t));!(n=c()).done;){var l=n.value;if(e.next(l),e.closed)return}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){S((function(){if(!e.closed){for(var i=0;i<t.length;++i)if(e.next(t[i]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")},e.of=function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){S((function(){if(!e.closed){for(var i=0;i<n.length;++i)if(e.next(n[i]),e.closed)return;e.complete()}}))}))},l(e,null,[{key:_,get:function(){return this}}]),e}();d()&&Object.defineProperty(N,Symbol("extensions"),{value:{symbol:v,hostReportError:w},configurable:!0})},,function(e,t,n){"use strict";n.r(t),n.d(t,"Component",(function(){return o.default})),n.d(t,"Vue",(function(){return r.default})),n.d(t,"Mixins",(function(){return o.mixins})),n.d(t,"Emit",(function(){return d})),n.d(t,"Inject",(function(){return f})),n.d(t,"InjectReactive",(function(){return E})),n.d(t,"Model",(function(){return S})),n.d(t,"ModelSync",(function(){return T})),n.d(t,"Prop",(function(){return A})),n.d(t,"PropSync",(function(){return R})),n.d(t,"Provide",(function(){return O})),n.d(t,"ProvideReactive",(function(){return I})),n.d(t,"Ref",(function(){return k})),n.d(t,"VModel",(function(){return N})),n.d(t,"Watch",(function(){return L}));var r=n(9),o=n(27),c=function(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t},l=/\B([A-Z])/g;function d(e){return function(t,n,r){var o=n.replace(l,"-$1").toLowerCase(),d=r.value;r.value=function(){for(var t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var l=function(r){var l=e||o;void 0===r?0===n.length?t.$emit(l):1===n.length?t.$emit(l,n[0]):t.$emit.apply(t,c([l],n)):(n.unshift(r),t.$emit.apply(t,c([l],n)))},f=d.apply(this,n);return h(f)?f.then(l):l(f),f}}}function h(e){return e instanceof Promise||e&&"function"==typeof e.then}function f(e){return Object(o.createDecorator)((function(t,n){void 0===t.inject&&(t.inject={}),Array.isArray(t.inject)||(t.inject[n]=e||n)}))}function m(e){return"function"!=typeof e||!e.managed&&!e.managedReactive}function v(e){var t=function(){var n=this,r="function"==typeof e?e.call(this):e;for(var i in(r=Object.create(r||null))[_]=Object.create(this[_]||{}),t.managed)r[t.managed[i]]=this[i];var o=function(i){r[t.managedReactive[i]]=c[i],Object.defineProperty(r[_],t.managedReactive[i],{enumerable:!0,configurable:!0,get:function(){return n[i]}})},c=this;for(var i in t.managedReactive)o(i);return r};return t.managed={},t.managedReactive={},t}var _="__reactiveInject__";function y(e){Array.isArray(e.inject)||(e.inject=e.inject||{},e.inject[_]={from:_,default:{}})}function E(e){return Object(o.createDecorator)((function(t,n){if(void 0===t.inject&&(t.inject={}),!Array.isArray(t.inject)){var r=e?e.from||e:n,o=!!e&&e.default||void 0;t.computed||(t.computed={}),t.computed[n]=function(){var e=this[_];return e?e[r]:o},t.inject[_]=_}}))}var C="undefined"!=typeof Reflect&&void 0!==Reflect.getMetadata;function w(e,t,n){if(C&&!Array.isArray(e)&&"function"!=typeof e&&!e.hasOwnProperty("type")&&void 0===e.type){var r=Reflect.getMetadata("design:type",t,n);r!==Object&&(e.type=r)}}function S(e,t){return void 0===t&&(t={}),function(n,r){w(t,n,r),Object(o.createDecorator)((function(n,r){(n.props||(n.props={}))[r]=t,n.model={prop:r,event:e||r}}))(n,r)}}function T(e,t,n){return void 0===n&&(n={}),function(r,c){w(n,r,c),Object(o.createDecorator)((function(r,o){(r.props||(r.props={}))[e]=n,r.model={prop:e,event:t||o},(r.computed||(r.computed={}))[o]={get:function(){return this[e]},set:function(e){this.$emit(t,e)}}}))(r,c)}}function A(e){return void 0===e&&(e={}),function(t,n){w(e,t,n),Object(o.createDecorator)((function(t,n){(t.props||(t.props={}))[n]=e}))(t,n)}}function R(e,t){return void 0===t&&(t={}),function(n,r){w(t,n,r),Object(o.createDecorator)((function(n,r){(n.props||(n.props={}))[e]=t,(n.computed||(n.computed={}))[r]={get:function(){return this[e]},set:function(t){this.$emit("update:"+e,t)}}}))(n,r)}}function O(e){return Object(o.createDecorator)((function(t,n){var r=t.provide;y(t),m(r)&&(r=t.provide=v(r)),r.managed[n]=e||n}))}function I(e){return Object(o.createDecorator)((function(t,n){var r=t.provide;y(t),m(r)&&(r=t.provide=v(r)),r.managedReactive[n]=e||n}))}function k(e){return Object(o.createDecorator)((function(t,n){t.computed=t.computed||{},t.computed[n]={cache:!1,get:function(){return this.$refs[e||n]}}}))}function N(e){void 0===e&&(e={});return Object(o.createDecorator)((function(t,n){(t.props||(t.props={})).value=e,(t.computed||(t.computed={}))[n]={get:function(){return this.value},set:function(e){this.$emit("input",e)}}}))}function L(path,e){void 0===e&&(e={});var t=e.deep,n=void 0!==t&&t,r=e.immediate,c=void 0!==r&&r;return Object(o.createDecorator)((function(e,t){"object"!=typeof e.watch&&(e.watch=Object.create(null));var r=e.watch;"object"!=typeof r[path]||Array.isArray(r[path])?void 0===r[path]&&(r[path]=[]):r[path]=[r[path]],r[path].push({handler:t,deep:n,immediate:c})}))}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t,n){"use strict";function r(e,source){for(var t=function(t){Object.defineProperty(e,t,{get:function(){return source[t]}})},n=0,r=Object.keys(source||{});n<r.length;n++){t(r[n])}}function o(e){if(!e._vmdModuleName)throw new Error("ERR_GET_MODULE_NAME : Could not get module accessor.\n      Make sure your module has name, we can't make accessors for unnamed modules\n      i.e. @Module({ name: 'something' })");return"vuexModuleDecorators/"+e._vmdModuleName}n.r(t),n.d(t,"Action",(function(){return w})),n.d(t,"Module",(function(){return y})),n.d(t,"Mutation",(function(){return S})),n.d(t,"MutationAction",(function(){return A})),n.d(t,"VuexModule",(function(){return c})),n.d(t,"config",(function(){return E})),n.d(t,"getModule",(function(){return l}));var c=function(e){this.actions=e.actions,this.mutations=e.mutations,this.state=e.state,this.getters=e.getters,this.namespaced=e.namespaced,this.modules=e.modules};function l(e,t){var n=o(e);if(t&&t.getters[n])return t.getters[n];if(e._statics)return e._statics;var r=e._genStatic;if(!r)throw new Error("ERR_GET_MODULE_NO_STATICS : Could not get module accessor.\n      Make sure your module has name, we can't make accessors for unnamed modules\n      i.e. @Module({ name: 'something' })");var c=r(t);return t?t.getters[n]=c:e._statics=c,c}var d=["actions","getters","mutations","modules","state","namespaced","commit"];function h(e,t,n,r){return new(n||(n=Promise))((function(o,c){function l(e){try{h(r.next(e))}catch(e){c(e)}}function d(e){try{h(r.throw(e))}catch(e){c(e)}}function h(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,d)}h((r=r.apply(e,t||[])).next())}))}function f(e,body){var t,n,r,g,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return g={next:c(0),throw:c(1),return:c(2)},"function"==typeof Symbol&&(g[Symbol.iterator]=function(){return this}),g;function c(c){return function(l){return function(c){if(t)throw new TypeError("Generator is already executing.");for(;o;)try{if(t=1,n&&(r=2&c[0]?n.return:c[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;switch(n=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return o.label++,{value:c[1],done:!1};case 5:o.label++,n=c[1],c=[0];continue;case 7:c=o.ops.pop(),o.trys.pop();continue;default:if(!(r=o.trys,(r=r.length>0&&r[r.length-1])||6!==c[0]&&2!==c[0])){o=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){o.label=c[1];break}if(6===c[0]&&o.label<r[1]){o.label=r[1],r=c;break}if(r&&o.label<r[2]){o.label=r[2],o.ops.push(c);break}r[2]&&o.ops.pop(),o.trys.pop();continue}c=body.call(e,o)}catch(e){c=[6,e],n=0}finally{t=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}([c,l])}}}function m(){for(var s=0,i=0,e=arguments.length;i<e;i++)s+=arguments[i].length;var t=Array(s),n=0;for(i=0;i<e;i++)for(var a=arguments[i],r=0,o=a.length;r<o;r++,n++)t[n]=a[r];return t}function v(e,t){Object.getOwnPropertyNames(t.prototype).forEach((function(n){var o=Object.getOwnPropertyDescriptor(t.prototype,n);o.get&&e.getters&&(e.getters[n]=function(e,t,n,c){var l={context:{state:e,getters:t,rootState:n,rootGetters:c}};return r(l,e),r(l,t),o.get.call(l)})}))}function _(e){return function(t){var n=t,r=function(){return function(e){var t=new e.prototype.constructor({}),s={};return Object.keys(t).forEach((function(e){if(-1===d.indexOf(e))t.hasOwnProperty(e)&&"function"!=typeof t[e]&&(s[e]=t[e]);else if(void 0!==t[e])throw new Error("ERR_RESERVED_STATE_KEY_USED: You cannot use the following\n        ['actions', 'getters', 'mutations', 'modules', 'state', 'namespaced', 'commit']\n        as fields in your module. These are reserved as they have special purpose in Vuex")})),s}(n)};n.state||(n.state=e&&e.stateFactory?r:r()),n.getters||(n.getters={}),n.namespaced||(n.namespaced=e&&e.namespaced);for(var o=Object.getPrototypeOf(n);"VuexModule"!==o.name&&""!==o.name;)v(n,o),o=Object.getPrototypeOf(o);v(n,n);var c=e;return c.name&&(Object.defineProperty(t,"_genStatic",{value:function(e){var t={store:e||c.store};if(!t.store)throw new Error("ERR_STORE_NOT_PROVIDED: To use getModule(), either the module\n            should be decorated with store in decorator, i.e. @Module({store: store}) or\n            store should be passed when calling getModule(), i.e. getModule(MyModule, this.$store)");return function(e,t,n){var r=t.stateFactory?e.state():e.state;Object.keys(r).forEach((function(e){r.hasOwnProperty(e)&&-1===["undefined","function"].indexOf(typeof r[e])&&Object.defineProperty(n,e,{get:function(){for(var path=t.name.split("/"),data=n.store.state,r=0,o=path;r<o.length;r++)data=data[o[r]];return data[e]}})}))}(n,c,t),n.getters&&function(e,t,n){Object.keys(e.getters).forEach((function(r){e.namespaced?Object.defineProperty(n,r,{get:function(){return n.store.getters[t.name+"/"+r]}}):Object.defineProperty(n,r,{get:function(){return n.store.getters[r]}})}))}(n,c,t),n.mutations&&function(e,t,n){Object.keys(e.mutations).forEach((function(r){e.namespaced?n[r]=function(){for(var e,o=[],c=0;c<arguments.length;c++)o[c]=arguments[c];(e=n.store).commit.apply(e,m([t.name+"/"+r],o))}:n[r]=function(){for(var e,t=[],o=0;o<arguments.length;o++)t[o]=arguments[o];(e=n.store).commit.apply(e,m([r],t))}}))}(n,c,t),n.actions&&function(e,t,n){Object.keys(e.actions).forEach((function(r){e.namespaced?n[r]=function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];return h(this,void 0,void 0,(function(){var o;return f(this,(function(c){return[2,(o=n.store).dispatch.apply(o,m([t.name+"/"+r],e))]}))}))}:n[r]=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return h(this,void 0,void 0,(function(){var t;return f(this,(function(o){return[2,(t=n.store).dispatch.apply(t,m([r],e))]}))}))}}))}(n,c,t),t}}),Object.defineProperty(t,"_vmdModuleName",{value:c.name})),c.dynamic&&function(e,t){if(!t.name)throw new Error("Name of module not provided in decorator options");if(!t.store)throw new Error("Store not provided in decorator options when using dynamic option");t.store.registerModule(t.name,e,{preserveState:t.preserveState||!1})}(n,c),t}}function y(e){if("function"!=typeof e)return _(e);_({})(e)}var E={};function C(e){var t=e||{},n=t.commit,c=void 0===n?void 0:n,d=t.rawError,m=void 0===d?!!E.rawError:d,v=t.root,_=void 0!==v&&v;return function(e,t,n){var d=e.constructor;d.hasOwnProperty("actions")||(d.actions=Object.assign({},d.actions));var v=n.value,y=function(e,n){return h(this,void 0,void 0,(function(){var h,_,y,E,C;return f(this,(function(f){switch(f.label){case 0:return f.trys.push([0,5,,6]),h=null,d._genStatic?(_=o(d),(y=e.rootGetters[_]?e.rootGetters[_]:l(d)).context=e,[4,v.call(y,n)]):[3,2];case 1:return h=f.sent(),[3,4];case 2:return r(E={context:e},e.state),r(E,e.getters),[4,v.call(E,n)];case 3:h=f.sent(),f.label=4;case 4:return c&&e.commit(c,h),[2,h];case 5:throw C=f.sent(),m?C:new Error('ERR_ACTION_ACCESS_UNDEFINED: Are you trying to access this.someMutation() or this.someGetter inside an @Action? \nThat works only in dynamic modules. \nIf not dynamic use this.context.commit("mutationName", payload) and this.context.getters["getterName"]\n'+new Error("Could not perform action "+t.toString()).stack+"\n"+C.stack);case 6:return[2]}}))}))};d.actions[t]=_?{root:_,handler:y}:y}}function w(e,t,n){if(!t&&!n)return C(e);C()(e,t,n)}function S(e,t,n){var r=e.constructor;r.hasOwnProperty("mutations")||(r.mutations=Object.assign({},r.mutations));var o=n.value;r.mutations[t]=function(e,t){o.call(e,t)}}function T(e){return function(t,n,r){var o=t.constructor;o.hasOwnProperty("mutations")||(o.mutations=Object.assign({},o.mutations)),o.hasOwnProperty("actions")||(o.actions=Object.assign({},o.actions));var c=r.value,l=function(t,r){return h(this,void 0,void 0,(function(){var o,l;return f(this,(function(d){switch(d.label){case 0:return d.trys.push([0,2,,3]),[4,c.call(t,r)];case 1:return o=d.sent(),t.commit(n,o),[3,3];case 2:if(l=d.sent(),e.rawError)throw l;return console.error("Could not perform action "+n.toString()),console.error(l),[2,Promise.reject(l)];case 3:return[2]}}))}))};o.actions[n]=e.root?{root:!0,handler:l}:l,o.mutations[n]=function(t,n){e.mutate||(e.mutate=Object.keys(n));for(var r=0,o=e.mutate;r<o.length;r++){var c=o[r];if(!t.hasOwnProperty(c)||!n.hasOwnProperty(c))throw new Error("ERR_MUTATE_PARAMS_NOT_IN_PAYLOAD\n          In @MutationAction, mutate: ['a', 'b', ...] array keys must\n          match with return type = {a: {}, b: {}, ...} and must\n          also be in state.");t[c]=n[c]}}}}function A(e,t,n){if(!t&&!n)return T(e);T({})(e,t,n)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(e,t){!function(){"use strict";var e="undefined"==typeof window,t=!e&&"scrollBehavior"in document.documentElement.style,n=function(){return(n=Object.assign||function(e){for(var s,i=1,t=arguments.length;i<t;i++)for(var p in s=arguments[i])Object.prototype.hasOwnProperty.call(s,p)&&(e[p]=s[p]);return e}).apply(this,arguments)};function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),c=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)c.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return c}function o(){return null!=document.scrollingElement?document.scrollingElement:document.documentElement}var c="scroll-behavior",l=new RegExp("scroll-behavior:\\s*([^;]*)");function d(element,e){var t="scroll-behavior:"+e,n=element.getAttribute("style");if(null!=n&&""!==n){var r=h(element);if(null!=r){var o="scroll-behavior:"+r;n=(n=n.replace(o+";","")).replace(o,"")}element.setAttribute("style",n.endsWith(";")?""+n+t:";"+n+t)}else element.setAttribute("style",t)}function h(element){var e=element.getAttribute("style");if(null!=e&&e.includes(c)){var t=e.match(l);if(null!=t){var n=r(t,2)[1];if(null!=n&&""!==n)return n}}}function f(e,t){if(null!=t&&"smooth"===t.behavior)return"smooth";var n,r="style"in e?e:o();if("style"in r){var c=r.style.scrollBehavior;null!=c&&""!==c&&(n=c)}if(null==n){var l=r.getAttribute("scroll-behavior");null!=l&&""!==l&&(n=l)}if(null==n&&(n=h(r)),null==n){var d=getComputedStyle(r).getPropertyValue("scrollBehavior");null!=d&&""!==d&&(n=d)}return n}function m(e){return.5*(1-Math.cos(Math.PI*e))}var v={reset:function(){}},map="undefined"==typeof WeakMap?void 0:new WeakMap;function _(e){var n=e.startTime,r=e.startX,c=e.startY,l=e.endX,f=e.endY,_=e.method,y=e.scroller,E=0,C=l-r,w=f-c,S=Math.max(Math.abs(C/1e3*15e3),Math.abs(w/1e3*15e3)),T=function(e){if(t||null==map)return v;var n,r,c,l,f,m=o(),_=map.get(e);if(null!=_)n=_.cachedScrollSnapValue,r=_.cachedScrollBehaviorStyleAttributeValue,c=_.secondaryScroller,l=_.secondaryScrollerCachedScrollSnapValue,f=_.secondaryScrollerCachedScrollBehaviorStyleAttributeValue,_.release();else{n=""===e.style.scrollSnapType?null:e.style.scrollSnapType,r=h(e),c=e===m&&m!==document.body?document.body:void 0,l=null==c?void 0:""===c.style.scrollSnapType?null:c.style.scrollSnapType,f=null==c?void 0:h(c);var y=getComputedStyle(e).getPropertyValue("scroll-snap-type"),E=null==c?void 0:getComputedStyle(c).getPropertyValue("scroll-snap-type");if("none"===y&&"none"===E)return v}e.style.scrollSnapType="none",void 0!==c&&(c.style.scrollSnapType="none"),void 0!==r&&d(e,r),void 0!==c&&void 0!==f&&d(c,f);var C=!1,w=e===m?window:e;function S(){w.removeEventListener("scroll",T),null!=map&&map.delete(e),C=!0}function T(){e.style.scrollSnapType=n,null!=c&&void 0!==l&&(c.style.scrollSnapType=l),void 0!==r&&d(e,r),void 0!==c&&void 0!==f&&d(c,f),S()}return map.set(e,{release:S,cachedScrollSnapValue:n,cachedScrollBehaviorStyleAttributeValue:r,secondaryScroller:c,secondaryScrollerCachedScrollSnapValue:l,secondaryScrollerCachedScrollBehaviorStyleAttributeValue:f}),{reset:function(){setTimeout((function(){C||w.addEventListener("scroll",T)}))}}}(y);requestAnimationFrame((function animate(e){E+=e-n;var t=Math.max(0,Math.min(1,0===S?0:E/S)),o=Math.floor(r+C*m(t)),d=Math.floor(c+w*m(t));_(o,d),o!==l||d!==f?requestAnimationFrame(animate):null!=T&&(T.reset(),T=void 0)}))}var y=e?void 0:Element.prototype.scroll,E=e?void 0:window.scroll,C=e?void 0:Element.prototype.scrollBy,w=e?void 0:window.scrollBy,S=e?void 0:Element.prototype.scrollTo,T=e?void 0:window.scrollTo;function A(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft=e,this.scrollTop=t,delete this.__adjustingScrollPosition}function R(e,t){return A.call(this,e,t)}function O(e,t){this.__adjustingScrollPosition=!0,this.scrollLeft+=e,this.scrollTop+=t,delete this.__adjustingScrollPosition}function I(e,element){switch(e){case"scroll":return element instanceof Element?null!=y?y:A:E;case"scrollBy":return element instanceof Element?null!=C?C:O:w;case"scrollTo":return element instanceof Element?null!=S?S:R:T}}function k(element,e,t,n){var r="performance"in window?performance.now():Date.now();if(element instanceof Element)return{startTime:r,startX:c=element.scrollLeft,startY:l=element.scrollTop,endX:Math.floor("scrollBy"===n?c+e:e),endY:Math.floor("scrollBy"===n?l+t:t),method:I("scrollTo",element).bind(element),scroller:element};var c,l,d=window.scrollX,h=window.pageXOffset,f=window.scrollY,m=window.pageYOffset;return{startTime:r,startX:c=null==d||0===d?h:d,startY:l=null==f||0===f?m:f,endX:Math.floor("scrollBy"===n?c+e:e),endY:Math.floor("scrollBy"===n?l+t:t),method:I("scrollTo",window).bind(window),scroller:o()}}function N(e){return null==e?0:"number"==typeof e?e:"string"==typeof e?parseFloat(e):0}function L(e){return null!=e&&"object"==typeof e}function M(element,e,t,r){!function(e,element,t){var n=f(element,e);null==n||"auto"===n?I(t,element).call(element,e.left,e.top):_(k(element,e.left,e.top,t))}(function(e,t){if(void 0===t&&!L(e))throw new TypeError("Failed to execute 'scroll' on 'Element': parameter 1 ('options') is not an object.");return L(e)?n(n({},x(e.left,e.top)),{behavior:null==e.behavior?"auto":e.behavior}):n(n({},x(e,t)),{behavior:"auto"})}(t,r),element,e)}function x(e,t){return{left:N(e),top:N(t)}}function D(e){return"nodeType"in e&&1===e.nodeType?e.parentNode:"ShadowRoot"in window&&e instanceof window.ShadowRoot?e.host:e===document?window:e instanceof Node?e.parentNode:null}function P(e){return"visible"!==e&&"clip"!==e}function U(element){if(element.clientHeight<element.scrollHeight||element.clientWidth<element.scrollWidth){var style=getComputedStyle(element,null);return P(style.overflowY)||P(style.overflowX)}return!1}function B(e){for(var t=e,n=o();null!=t;){var r=f(t);if(null!=r&&(t===n||U(t)))return[t,r];t=D(t)}for(t=e;null!=t;){if(t===n||U(t))return[t,"auto"];t=D(t)}return[n,"auto"]}function F(e){if(void 0===e&&(e=location),"origin"in e&&null!=e.origin)return e.origin;var t=null!=e.port&&e.port.length>0?":"+e.port:"";return("http:"===e.protocol&&":80"===t||"https:"===e.protocol&&":443"===t)&&(t=""),e.protocol+"//"+e.hostname+t}var V=/^#\d/;function j(){window.addEventListener("click",(function(e){if(e.isTrusted&&e.target instanceof HTMLAnchorElement){var t=e.target,n=t.pathname,o=t.search,c=t.hash;if(F(e.target)===F(location)&&n===location.pathname&&o===location.search&&null!=c&&!(c.length<1)){var l=function(e){for(var t=e;null!=t;){if("ShadowRoot"in window&&t instanceof window.ShadowRoot)return t;var n=D(t);if(n===t)return document;t=n}return document}(e.target),d=null!=c.match(V)?l.getElementById(c.slice(1)):l.querySelector(c);if(null!=d){var h=r(B(d),2)[1];"smooth"===h&&(e.preventDefault(),d.scrollIntoView({behavior:h}))}}}}))}var H=e?void 0:Element.prototype.scrollIntoView;function $(e,t,n,r,o,c,l,d){return c<e&&l>t||c>e&&l<t?0:c<=e&&d<=n||l>=t&&d>=n?c-e-r:l>t&&d<n||c<e&&d>n?l-t+o:0}function z(e,t,n){var r=n.block,c=n.inline,l=o(),d=null!=window.visualViewport?visualViewport.width:innerWidth,h=null!=window.visualViewport?visualViewport.height:innerHeight,f=null!=window.scrollX?window.scrollX:window.pageXOffset,m=null!=window.scrollY?window.scrollY:window.pageYOffset,v=e.getBoundingClientRect(),_=v.height,y=v.width,E=v.top,C=v.right,w=v.bottom,S=v.left,T="start"===r||"nearest"===r?E:"end"===r?w:E+_/2,A="center"===c?S+y/2:"end"===c?C:S,R=t.getBoundingClientRect(),O=R.height,I=R.width,k=R.top,N=R.right,L=R.bottom,M=R.left,x=getComputedStyle(t),D=parseInt(x.borderLeftWidth,10),P=parseInt(x.borderTopWidth,10),U=parseInt(x.borderRightWidth,10),B=parseInt(x.borderBottomWidth,10),F=0,V=0,j="offsetWidth"in t?t.offsetWidth-t.clientWidth-D-U:0,H="offsetHeight"in t?t.offsetHeight-t.clientHeight-P-B:0;if(l===t)F="start"===r?T:"end"===r?T-h:"nearest"===r?$(m,m+h,h,P,B,m+T,m+T+_,_):T-h/2,V="start"===c?A:"center"===c?A-d/2:"end"===c?A-d:$(f,f+d,d,D,U,f+A,f+A+y,y),F=Math.max(0,F+m),V=Math.max(0,V+f);else{F="start"===r?T-k-P:"end"===r?T-L+B+H:"nearest"===r?$(k,L,O,P,B+H,T,T+_,_):T-(k+O/2)+H/2,V="start"===c?A-M-D:"center"===c?A-(M+I/2)+j/2:"end"===c?A-N+U+j:$(M,N,I,D,U+j,A,A+y,y);var z=t.scrollLeft,W=t.scrollTop;F=Math.max(0,Math.min(W+F,t.scrollHeight-O+H)),V=Math.max(0,Math.min(z+V,t.scrollWidth-I+j))}return{top:F,left:V}}var W=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollTop").set;var K=e?void 0:Object.getOwnPropertyDescriptor(Element.prototype,"scrollLeft").set;var G=!e&&("scroll"in Element.prototype&&"scrollTo"in Element.prototype&&"scrollBy"in Element.prototype&&"scrollIntoView"in Element.prototype);e||t&&G||(Element.prototype.scroll=function(e,t){M(this,"scroll",e,t)},Element.prototype.scrollBy=function(e,t){M(this,"scrollBy",e,t)},Element.prototype.scrollTo=function(e,t){M(this,"scrollTo",e,t)},Element.prototype.scrollIntoView=function(e){var t=null==e||!0===e?{block:"start",inline:"nearest"}:!1===e?{block:"end",inline:"nearest"}:e,o=r(B(this),2),c=o[0],l=o[1],d=null!=t.behavior?t.behavior:l;if("smooth"===d)c.scrollTo(n({behavior:d},z(this,c,t)));else if(null!=H)H.call(this,t);else{var h=z(this,c,t),f=h.top,m=h.left;I("scrollTo",this).call(this,m,f)}},null!=HTMLElement.prototype.scrollIntoView&&HTMLElement.prototype.scrollIntoView!==Element.prototype.scrollIntoView&&(HTMLElement.prototype.scrollIntoView=Element.prototype.scrollIntoView),Object.defineProperty(Element.prototype,"scrollLeft",{set:function(e){return this.__adjustingScrollPosition?K.call(this,e):(M(this,"scrollTo",e,this.scrollTop),e)}}),Object.defineProperty(Element.prototype,"scrollTop",{set:function(e){return this.__adjustingScrollPosition?W.call(this,e):(M(this,"scrollTo",this.scrollLeft,e),e)}}),window.scroll=function(e,t){M(this,"scroll",e,t)},window.scrollBy=function(e,t){M(this,"scrollBy",e,t)},window.scrollTo=function(e,t){M(this,"scrollTo",e,t)},j())}()},,,,,,,,,,,function(e,t,n){"use strict";t.byteLength=function(e){var t=d(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,i,n=d(e),r=n[0],l=n[1],h=new c(function(e,t,n){return 3*(t+n)/4-n}(0,r,l)),f=0,m=l>0?r-4:r;for(i=0;i<m;i+=4)t=o[e.charCodeAt(i)]<<18|o[e.charCodeAt(i+1)]<<12|o[e.charCodeAt(i+2)]<<6|o[e.charCodeAt(i+3)],h[f++]=t>>16&255,h[f++]=t>>8&255,h[f++]=255&t;2===l&&(t=o[e.charCodeAt(i)]<<2|o[e.charCodeAt(i+1)]>>4,h[f++]=255&t);1===l&&(t=o[e.charCodeAt(i)]<<10|o[e.charCodeAt(i+1)]<<4|o[e.charCodeAt(i+2)]>>2,h[f++]=t>>8&255,h[f++]=255&t);return h},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,c=[],l=16383,i=0,d=n-o;i<d;i+=l)c.push(h(e,i,i+l>d?d:i+l));1===o?(t=e[n-1],c.push(r[t>>2]+r[t<<4&63]+"==")):2===o&&(t=(e[n-2]<<8)+e[n-1],c.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return c.join("")};for(var r=[],o=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,code="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0,l=code.length;i<l;++i)r[i]=code[i],o[code.charCodeAt(i)]=i;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var o,c,output=[],i=t;i<n;i+=3)o=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),output.push(r[(c=o)>>18&63]+r[c>>12&63]+r[c>>6&63]+r[63&c]);return output.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,o){var c,l,d=8*o-r-1,h=(1<<d)-1,f=h>>1,m=-7,i=n?o-1:0,v=n?-1:1,s=e[t+i];for(i+=v,c=s&(1<<-m)-1,s>>=-m,m+=d;m>0;c=256*c+e[t+i],i+=v,m-=8);for(l=c&(1<<-m)-1,c>>=-m,m+=r;m>0;l=256*l+e[t+i],i+=v,m-=8);if(0===c)c=1-f;else{if(c===h)return l?NaN:1/0*(s?-1:1);l+=Math.pow(2,r),c-=f}return(s?-1:1)*l*Math.pow(2,c-r)},t.write=function(e,t,n,r,o,c){var l,d,h,f=8*c-o-1,m=(1<<f)-1,v=m>>1,rt=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,i=r?0:c-1,_=r?1:-1,s=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(d=isNaN(t)?1:0,l=m):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),(t+=l+v>=1?rt/h:rt*Math.pow(2,1-v))*h>=2&&(l++,h/=2),l+v>=m?(d=0,l=m):l+v>=1?(d=(t*h-1)*Math.pow(2,o),l+=v):(d=t*Math.pow(2,v-1)*Math.pow(2,o),l=0));o>=8;e[n+i]=255&d,i+=_,d/=256,o-=8);for(l=l<<o|d,f+=o;f>0;e[n+i]=255&l,i+=_,l/=256,f-=8);e[n+i-_]|=128*s}},,,,,,,,,,,,,function(e,t){!function(e){!function(t){var n="URLSearchParams"in e,r="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),c="FormData"in e,l="ArrayBuffer"in e;if(l)var d=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],h=ArrayBuffer.isView||function(e){return e&&d.indexOf(Object.prototype.toString.call(e))>-1};function f(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function m(e){return"string"!=typeof e&&(e=String(e)),e}function v(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return r&&(t[Symbol.iterator]=function(){return t}),t}function _(e){this.map={},e instanceof _?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(header){this.append(header[0],header[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function y(body){if(body.bodyUsed)return Promise.reject(new TypeError("Already read"));body.bodyUsed=!0}function E(e){return new Promise((function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}}))}function C(e){var t=new FileReader,n=E(t);return t.readAsArrayBuffer(e),n}function w(e){if(e.slice)return e.slice(0);var view=new Uint8Array(e.byteLength);return view.set(new Uint8Array(e)),view.buffer}function S(){return this.bodyUsed=!1,this._initBody=function(body){var e;this._bodyInit=body,body?"string"==typeof body?this._bodyText=body:o&&Blob.prototype.isPrototypeOf(body)?this._bodyBlob=body:c&&FormData.prototype.isPrototypeOf(body)?this._bodyFormData=body:n&&URLSearchParams.prototype.isPrototypeOf(body)?this._bodyText=body.toString():l&&o&&((e=body)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=w(body.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):l&&(ArrayBuffer.prototype.isPrototypeOf(body)||h(body))?this._bodyArrayBuffer=w(body):this._bodyText=body=Object.prototype.toString.call(body):this._bodyText="",this.headers.get("content-type")||("string"==typeof body?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(body)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=y(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?y(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(C)}),this.text=function(){var e,t,n,r=y(this);if(r)return r;if(this._bodyBlob)return e=this._bodyBlob,t=new FileReader,n=E(t),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var view=new Uint8Array(e),t=new Array(view.length),i=0;i<view.length;i++)t[i]=String.fromCharCode(view[i]);return t.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},c&&(this.formData=function(){return this.text().then(R)}),this.json=function(){return this.text().then(JSON.parse)},this}_.prototype.append=function(e,t){e=f(e),t=m(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},_.prototype.delete=function(e){delete this.map[f(e)]},_.prototype.get=function(e){return e=f(e),this.has(e)?this.map[e]:null},_.prototype.has=function(e){return this.map.hasOwnProperty(f(e))},_.prototype.set=function(e,t){this.map[f(e)]=m(t)},_.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},_.prototype.keys=function(){var e=[];return this.forEach((function(t,n){e.push(n)})),v(e)},_.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),v(e)},_.prototype.entries=function(){var e=[];return this.forEach((function(t,n){e.push([n,t])})),v(e)},r&&(_.prototype[Symbol.iterator]=_.prototype.entries);var T=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function A(input,e){var t,n,body=(e=e||{}).body;if(input instanceof A){if(input.bodyUsed)throw new TypeError("Already read");this.url=input.url,this.credentials=input.credentials,e.headers||(this.headers=new _(input.headers)),this.method=input.method,this.mode=input.mode,this.signal=input.signal,body||null==input._bodyInit||(body=input._bodyInit,input.bodyUsed=!0)}else this.url=String(input);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new _(e.headers)),this.method=(t=e.method||this.method||"GET",n=t.toUpperCase(),T.indexOf(n)>-1?n:t),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&body)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(body)}function R(body){var form=new FormData;return body.trim().split("&").forEach((function(e){if(e){var t=e.split("="),n=t.shift().replace(/\+/g," "),r=t.join("=").replace(/\+/g," ");form.append(decodeURIComponent(n),decodeURIComponent(r))}})),form}function O(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new _(t.headers),this.url=t.url||"",this._initBody(e)}A.prototype.clone=function(){return new A(this,{body:this._bodyInit})},S.call(A.prototype),S.call(O.prototype),O.prototype.clone=function(){return new O(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new _(this.headers),url:this.url})},O.error=function(){var e=new O(null,{status:0,statusText:""});return e.type="error",e};var I=[301,302,303,307,308];O.redirect=function(e,t){if(-1===I.indexOf(t))throw new RangeError("Invalid status code");return new O(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function k(input,e){return new Promise((function(n,r){var c=new A(input,e);if(c.signal&&c.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var l=new XMLHttpRequest;function d(){l.abort()}l.onload=function(){var e,t,r={status:l.status,statusText:l.statusText,headers:(e=l.getAllResponseHeaders()||"",t=new _,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(line){var e=line.split(":"),n=e.shift().trim();if(n){var r=e.join(":").trim();t.append(n,r)}})),t)};r.url="responseURL"in l?l.responseURL:r.headers.get("X-Request-URL");var body="response"in l?l.response:l.responseText;n(new O(body,r))},l.onerror=function(){r(new TypeError("Network request failed"))},l.ontimeout=function(){r(new TypeError("Network request failed"))},l.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},l.open(c.method,c.url,!0),"include"===c.credentials?l.withCredentials=!0:"omit"===c.credentials&&(l.withCredentials=!1),"responseType"in l&&o&&(l.responseType="blob"),c.headers.forEach((function(e,t){l.setRequestHeader(t,e)})),c.signal&&(c.signal.addEventListener("abort",d),l.onreadystatechange=function(){4===l.readyState&&c.signal.removeEventListener("abort",d)}),l.send(void 0===c._bodyInit?null:c._bodyInit)}))}k.polyfill=!0,e.fetch||(e.fetch=k,e.Headers=_,e.Request=A,e.Response=O),t.Headers=_,t.Request=A,t.Response=O,t.fetch=k}({})}("undefined"!=typeof self?self:this)},function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}e.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},function(e,t,n){"use strict";var r=Object.prototype.hasOwnProperty,o="~";function c(){}function l(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function d(e,t,n,r,c){if("function"!=typeof n)throw new TypeError("The listener must be a function");var d=new l(n,r||e,c),h=o?o+t:t;return e._events[h]?e._events[h].fn?e._events[h]=[e._events[h],d]:e._events[h].push(d):(e._events[h]=d,e._eventsCount++),e}function h(e,t){0==--e._eventsCount?e._events=new c:delete e._events[t]}function f(){this._events=new c,this._eventsCount=0}Object.create&&(c.prototype=Object.create(null),(new c).__proto__||(o=!1)),f.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)r.call(e,t)&&n.push(o?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},f.prototype.listeners=function(e){var t=o?o+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,c=new Array(r);i<r;i++)c[i]=n[i].fn;return c},f.prototype.listenerCount=function(e){var t=o?o+e:e,n=this._events[t];return n?n.fn?1:n.length:0},f.prototype.emit=function(e,t,n,r,c,l){var d=o?o+e:e;if(!this._events[d])return!1;var h,i,f=this._events[d],m=arguments.length;if(f.fn){switch(f.once&&this.removeListener(e,f.fn,void 0,!0),m){case 1:return f.fn.call(f.context),!0;case 2:return f.fn.call(f.context,t),!0;case 3:return f.fn.call(f.context,t,n),!0;case 4:return f.fn.call(f.context,t,n,r),!0;case 5:return f.fn.call(f.context,t,n,r,c),!0;case 6:return f.fn.call(f.context,t,n,r,c,l),!0}for(i=1,h=new Array(m-1);i<m;i++)h[i-1]=arguments[i];f.fn.apply(f.context,h)}else{var v,_=f.length;for(i=0;i<_;i++)switch(f[i].once&&this.removeListener(e,f[i].fn,void 0,!0),m){case 1:f[i].fn.call(f[i].context);break;case 2:f[i].fn.call(f[i].context,t);break;case 3:f[i].fn.call(f[i].context,t,n);break;case 4:f[i].fn.call(f[i].context,t,n,r);break;default:if(!h)for(v=1,h=new Array(m-1);v<m;v++)h[v-1]=arguments[v];f[i].fn.apply(f[i].context,h)}}return!0},f.prototype.on=function(e,t,n){return d(this,e,t,n,!1)},f.prototype.once=function(e,t,n){return d(this,e,t,n,!0)},f.prototype.removeListener=function(e,t,n,r){var c=o?o+e:e;if(!this._events[c])return this;if(!t)return h(this,c),this;var l=this._events[c];if(l.fn)l.fn!==t||r&&!l.once||n&&l.context!==n||h(this,c);else{for(var i=0,d=[],f=l.length;i<f;i++)(l[i].fn!==t||r&&!l[i].once||n&&l[i].context!==n)&&d.push(l[i]);d.length?this._events[c]=1===d.length?d[0]:d:h(this,c)}return this},f.prototype.removeAllListeners=function(e){var t;return e?(t=o?o+e:e,this._events[t]&&h(this,t)):(this._events=new c,this._eventsCount=0),this},f.prototype.off=f.prototype.removeListener,f.prototype.addListener=f.prototype.on,f.prefixed=o,f.EventEmitter=f,e.exports=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return"string"==typeof e}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return null!==e&&"object"==typeof e}},function(e,t,n){"use strict";n.r(t),n.d(t,"getOperationAST",(function(){return o}));var r=n(10);function o(e,t){for(var n=null,o=0,c=e.definitions;o<c.length;o++){var l,d=c[o];if(d.kind===r.a.OPERATION_DEFINITION)if(null==t){if(n)return null;n=d}else if((null===(l=d.name)||void 0===l?void 0:l.value)===t)return d}return n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GRAPHQL_SUBSCRIPTIONS=t.GRAPHQL_WS=void 0;t.GRAPHQL_WS="graphql-ws";t.GRAPHQL_SUBSCRIPTIONS="graphql-subscriptions"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WS_TIMEOUT=t.MIN_WS_TIMEOUT=void 0;t.MIN_WS_TIMEOUT=1e3;t.WS_TIMEOUT=3e4},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function c(e,t,n){return t&&o(e.prototype,t),n&&o(e,n),e}Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var l=function(){return"function"==typeof Symbol},d=function(e){return l()&&Boolean(Symbol[e])},h=function(e){return d(e)?Symbol[e]:"@@"+e};l()&&!d("observable")&&(Symbol.observable=Symbol("observable"));var f=h("iterator"),m=h("observable"),v=h("species");function _(e,t){var n=e[t];if(null!=n){if("function"!=typeof n)throw new TypeError(n+" is not a function");return n}}function y(e){var t=e.constructor;return void 0!==t&&null===(t=t[v])&&(t=void 0),void 0!==t?t:k}function E(e){return e instanceof k}function C(e){C.log?C.log(e):setTimeout((function(){throw e}))}function w(e){Promise.resolve().then((function(){try{e()}catch(e){C(e)}}))}function S(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var n=_(t,"unsubscribe");n&&n.call(t)}}catch(e){C(e)}}function T(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function A(e,t,n){e._state="running";var r=e._observer;try{var o=_(r,t);switch(t){case"next":o&&o.call(r,n);break;case"error":if(T(e),!o)throw n;o.call(r,n);break;case"complete":T(e),o&&o.call(r)}}catch(e){C(e)}"closed"===e._state?S(e):"running"===e._state&&(e._state="ready")}function R(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 w((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var i=0;i<t.length&&(A(e,t[i].type,t[i].value),"closed"!==e._state);++i);}}(e)}))):void A(e,t,n);e._queue.push({type:t,value:n})}}var O=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var o=new I(this);try{this._cleanup=n.call(void 0,o)}catch(e){o.error(e)}"initializing"===this._state&&(this._state="ready")}return c(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(T(this),S(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),I=function(){function e(t){r(this,e),this._subscription=t}return c(e,[{key:"next",value:function(e){R(this._subscription,"next",e)}},{key:"error",value:function(e){R(this._subscription,"error",e)}},{key:"complete",value:function(){R(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),k=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return c(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new O(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(n,r){if("function"==typeof e)var o=t.subscribe({next:function(t){try{e(t,c)}catch(e){r(e),o.unsubscribe()}},error:r,complete:n});else r(new TypeError(e+" is not a function"));function c(){o.unsubscribe(),n()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(y(this))((function(n){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(y(this))((function(n){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return n.error(e)}n.next(t)},error:function(e){n.error(e)},complete:function(){n.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=y(this),r=arguments.length>1,o=!1,c=arguments[1],l=c;return new n((function(n){return t.subscribe({next:function(t){var c=!o;if(o=!0,!c||r)try{l=e(l,t)}catch(e){return n.error(e)}else l=t},error:function(e){n.error(e)},complete:function(){if(!o&&!r)return n.error(new TypeError("Cannot reduce an empty sequence"));n.next(l),n.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o=y(this);return new o((function(t){var r,c=0;return function e(l){r=l.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){c===n.length?(r=void 0,t.complete()):e(o.from(n[c++]))}})}(e),function(){r&&(r.unsubscribe(),r=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var n=y(this);return new n((function(r){var o=[],c=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return r.error(e)}var c=n.from(t).subscribe({next:function(e){r.next(e)},error:function(e){r.error(e)},complete:function(){var i=o.indexOf(c);i>=0&&o.splice(i,1),l()}});o.push(c)},error:function(e){r.error(e)},complete:function(){l()}});function l(){c.closed&&0===o.length&&r.complete()}return function(){o.forEach((function(s){return s.unsubscribe()})),c.unsubscribe()}}))}},{key:m,value:function(){return this}}],[{key:"from",value:function(t){var n="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var r=_(t,m);if(r){var o=r.call(t);if(Object(o)!==o)throw new TypeError(o+" is not an object");return E(o)&&o.constructor===n?o:new n((function(e){return o.subscribe(e)}))}if(d("iterator")&&(r=_(t,f)))return new n((function(e){w((function(){if(!e.closed){var n=!0,o=!1,c=void 0;try{for(var l,d=r.call(t)[Symbol.iterator]();!(n=(l=d.next()).done);n=!0){var h=l.value;if(e.next(h),e.closed)return}}catch(e){o=!0,c=e}finally{try{n||null==d.return||d.return()}finally{if(o)throw c}}e.complete()}}))}));if(Array.isArray(t))return new n((function(e){w((function(){if(!e.closed){for(var i=0;i<t.length;++i)if(e.next(t[i]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var o="function"==typeof this?this:e;return new o((function(e){w((function(){if(!e.closed){for(var i=0;i<n.length;++i)if(e.next(n[i]),e.closed)return;e.complete()}}))}))}},{key:v,get:function(){return this}}]),e}();t.Observable=k,l()&&Object.defineProperty(k,Symbol("extensions"),{value:{symbol:m,hostReportError:C},configurable:!0})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(7);function o(e,t,n){var l=n.fragmentMap,h=n.contextValue,f=n.variableValues,m={};return e.selections.forEach((function(e){if(!f||r.shouldInclude(e,f))if(r.isField(e)){var v=function(e,t,n){var l=n.variableValues,d=n.contextValue,h=n.resolver,f=e.name.value,m=r.argumentsObjectFromField(e,l),v={isLeaf:!e.selectionSet,resultKey:r.resultKeyNameFromField(e),directives:r.getDirectiveInfoFromField(e,l),field:e},_=h(f,t,m,d,v);if(!e.selectionSet)return _;if(null==_)return _;if(Array.isArray(_))return c(e,_,n);return o(e.selectionSet,_,n)}(e,t,n),_=r.resultKeyNameFromField(e);void 0!==v&&(void 0===m[_]?m[_]=v:d(m[_],v))}else{var y=void 0;if(r.isInlineFragment(e))y=e;else if(!(y=l[e.name.value]))throw new Error("No fragment named "+e.name.value);var E=y.typeCondition.name.value;if(n.fragmentMatcher(t,E,h)){var C=o(y.selectionSet,t,n);d(m,C)}}})),n.resultMapper?n.resultMapper(m,t):m}function c(e,t,n){return t.map((function(t){return null===t?null:Array.isArray(t)?c(e,t,n):o(e.selectionSet,t,n)}))}t.graphql=function(e,t,n,c,l,d){void 0===l&&(l={}),void 0===d&&(d={});var h=r.getMainDefinition(t),f=r.getFragmentDefinitions(t),m={fragmentMap:r.createFragmentMap(f),contextValue:c,variableValues:l,resultMapper:d.resultMapper,resolver:e,fragmentMatcher:d.fragmentMatcher||function(){return!0}};return o(h.selectionSet,n,m)};var l=Object.prototype.hasOwnProperty;function d(e,t){null!==t&&"object"==typeof t&&Object.keys(t).forEach((function(n){var r=t[n];l.call(e,n)?d(e[n],r):e[n]=r}))}t.merge=d},,,function(e,t,n){"use strict";n.r(t),n.d(t,"checkFetcher",(function(){return f})),n.d(t,"createSignalIfSupported",(function(){return m})),n.d(t,"fallbackHttpConfig",(function(){return l})),n.d(t,"parseAndCheckHttpResponse",(function(){return h})),n.d(t,"selectHttpOptionsAndBody",(function(){return v})),n.d(t,"selectURI",(function(){return y})),n.d(t,"serializeFetchParameter",(function(){return _})),n.d(t,"throwServerError",(function(){return d}));var r=n(4),o=n(126),c=n(11),l={http:{includeQuery:!0,includeExtensions:!1},headers:{accept:"*/*","content-type":"application/json"},options:{method:"POST"}},d=function(e,t,n){var r=new Error(n);throw r.name="ServerError",r.response=e,r.statusCode=e.status,r.result=t,r},h=function(e){return function(t){return t.text().then((function(e){try{return JSON.parse(e)}catch(r){var n=r;return n.name="ServerParseError",n.response=t,n.statusCode=t.status,n.bodyText=e,Promise.reject(n)}})).then((function(n){return t.status>=300&&d(t,n,"Response not successful: Received status code "+t.status),Array.isArray(n)||n.hasOwnProperty("data")||n.hasOwnProperty("errors")||d(t,n,"Server response was missing for query '"+(Array.isArray(e)?e.map((function(e){return e.operationName})):e.operationName)+"'."),n}))}},f=function(e){if(!e&&"undefined"==typeof fetch){throw"undefined"==typeof window&&"node-fetch",new c.a(1)}},m=function(){if("undefined"==typeof AbortController)return{controller:!1,signal:!1};var e=new AbortController;return{controller:e,signal:e.signal}},v=function(e,t){for(var n=[],c=2;c<arguments.length;c++)n[c-2]=arguments[c];var l=Object(r.__assign)({},t.options,{headers:t.headers,credentials:t.credentials}),d=t.http;n.forEach((function(e){l=Object(r.__assign)({},l,e.options,{headers:Object(r.__assign)({},l.headers,e.headers)}),e.credentials&&(l.credentials=e.credentials),d=Object(r.__assign)({},d,e.http)}));var h=e.operationName,f=e.extensions,m=e.variables,v=e.query,body={operationName:h,variables:m};return d.includeExtensions&&(body.extensions=f),d.includeQuery&&(body.query=Object(o.print)(v)),{options:l,body:body}},_=function(p,label){var e;try{e=JSON.stringify(p)}catch(e){var t=new c.a(2);throw t.parseError=e,t}return e},y=function(e,t){var n=e.getContext().uri;return n||("function"==typeof t?t(e):t||"/graphql")}},function(e,t,n){"use strict";n.r(t);var r=n(273);n.d(t,"ReactNativeFile",(function(){return r}));var o=n(398);n.d(t,"extractFiles",(function(){return o}));var c=n(274);n.d(t,"isExtractableFile",(function(){return c}))},function(e,t,n){"use strict";n(638)},function(e,t,n){"use strict";(function(e){var t=n(14);(function(){var n,r="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,e){a!=Array.prototype&&a!=Object.prototype&&(a[b]=e.value)};var o=function(a){a=["object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof e&&e,a];for(var b=0;b<a.length;++b){var t=a[b];if(t&&t.Math==Math)return t}return globalThis}(this);function c(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}}function l(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];return b?b.call(a):{next:c(a)}}!function(a,b){if(b){var e=o;a=a.split(".");for(var t=0;t<a.length-1;t++){var n=a[t];n in e||(e[n]={}),e=e[n]}(b=b(t=e[a=a[a.length-1]]))!=t&&null!=b&&r(e,a,{configurable:!0,writable:!0,value:b})}}("Promise",(function(a){function b(g){this.b=0,this.c=void 0,this.a=[];var e=this.f();try{g(e.resolve,e.reject)}catch(t){e.reject(t)}}function e(){this.a=null}function t(g){return g instanceof b?g:new b((function(e){e(g)}))}if(a)return a;e.prototype.b=function(g){if(null==this.a){this.a=[];var e=this;this.c((function(){e.g()}))}this.a.push(g)};var n=o.setTimeout;e.prototype.c=function(g){n(g,0)},e.prototype.g=function(){for(;this.a&&this.a.length;){var g=this.a;this.a=[];for(var e=0;e<g.length;++e){var t=g[e];g[e]=null;try{t()}catch(e){this.f(e)}}}this.a=null},e.prototype.f=function(g){this.c((function(){throw g}))},b.prototype.f=function(){function g(p){return function(n){t||(t=!0,p.call(e,n))}}var e=this,t=!1;return{resolve:g(this.m),reject:g(this.g)}},b.prototype.m=function(g){if(g===this)this.g(new TypeError("A Promise cannot resolve to itself"));else if(g instanceof b)this.s(g);else{e:switch(typeof g){case"object":var e=null!=g;break e;case"function":e=!0;break e;default:e=!1}e?this.v(g):this.h(g)}},b.prototype.v=function(g){var e=void 0;try{e=g.then}catch(e){return void this.g(e)}"function"==typeof e?this.u(e,g):this.h(g)},b.prototype.g=function(g){this.i(2,g)},b.prototype.h=function(g){this.i(1,g)},b.prototype.i=function(g,e){if(0!=this.b)throw Error("Cannot settle("+g+", "+e+"): Promise already settled in state"+this.b);this.b=g,this.c=e,this.l()},b.prototype.l=function(){if(null!=this.a){for(var g=0;g<this.a.length;++g)r.b(this.a[g]);this.a=null}};var r=new e;return b.prototype.s=function(g){var e=this.f();g.Ra(e.resolve,e.reject)},b.prototype.u=function(g,e){var t=this.f();try{g.call(e,t.resolve,t.reject)}catch(e){t.reject(e)}},b.prototype.then=function(g,e){function t(e,t){return"function"==typeof e?function(t){try{p(e(t))}catch(e){n(e)}}:t}var p,n,r=new b((function(e,t){p=e,n=t}));return this.Ra(t(g,p),t(e,n)),r},b.prototype.catch=function(g){return this.then(void 0,g)},b.prototype.Ra=function(g,e){function t(){switch(p.b){case 1:g(p.c);break;case 2:e(p.c);break;default:throw Error("Unexpected state: "+p.b)}}var p=this;null==this.a?r.b(t):this.a.push(t)},b.resolve=t,b.reject=function(g){return new b((function(e,t){t(g)}))},b.race=function(g){return new b((function(e,n){for(var p=l(g),r=p.next();!r.done;r=p.next())t(r.value).Ra(e,n)}))},b.all=function(g){var e=l(g),n=e.next();return n.done?t([]):new b((function(p,r){function o(e){return function(t){c[e]=t,0==--l&&p(c)}}var c=[],l=0;do{c.push(void 0),l++,t(n.value).Ra(o(c.length-1),r),n=e.next()}while(!n.done)}))},b}));var d=d||{},h=this||self,f=/^[\w+/_-]+[=]{0,2}$/,m=null;function v(a){return(a=a.querySelector&&a.querySelector("script[nonce]"))&&(a=a.nonce||a.getAttribute("nonce"))&&f.test(a)?a:""}function _(){}function y(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"}function E(a){var b=y(a);return"array"==b||"object"==b&&"number"==typeof a.length}function C(a){return"function"==y(a)}function w(a){var b=typeof a;return"object"==b&&null!=a||"function"==b}function S(a){return Object.prototype.hasOwnProperty.call(a,T)&&a[T]||(a[T]=++A)}var T="closure_uid_"+(1e9*Math.random()>>>0),A=0;function R(a,b,e){return a.call.apply(a.bind,arguments)}function O(a,b,e){if(!a)throw Error();if(2<arguments.length){var t=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);return Array.prototype.unshift.apply(e,t),a.apply(b,e)}}return function(){return a.apply(b,arguments)}}function q(a,b,e){return(q=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?R:O).apply(null,arguments)}function I(a,b){var e=Array.prototype.slice.call(arguments,1);return function(){var t=e.slice();return t.push.apply(t,arguments),a.apply(this,t)}}var k=Date.now;function N(a,b){function e(){}e.prototype=b.prototype,a.bb=b.prototype,a.prototype=new e,a.prototype.constructor=a}function L(a){return a}function M(a,b,e){this.code=P+a,this.message=b||U[a]||"",this.a=e||null}function x(a){var b=a&&a.code;return b?new M(b.substring(P.length),a.message,a.serverResponse):null}N(M,Error),M.prototype.w=function(){var a={code:this.code,message:this.message};return this.a&&(a.serverResponse=this.a),a},M.prototype.toJSON=function(){return this.w()};var D,P="auth/",U={"admin-restricted-operation":"This operation is restricted to administrators only.","argument-error":"","app-not-authorized":"This app, identified by the domain where it's hosted, is not authorized to use Firebase Authentication with the provided API key. Review your key configuration in the Google API console.","app-not-installed":"The requested mobile application corresponding to the identifier (Android package name or iOS bundle ID) provided is not installed on this device.","captcha-check-failed":"The reCAPTCHA response token provided is either invalid, expired, already used or the domain associated with it does not match the list of whitelisted domains.","code-expired":"The SMS code has expired. Please re-send the verification code to try again.","cordova-not-ready":"Cordova framework is not ready.","cors-unsupported":"This browser is not supported.","credential-already-in-use":"This credential is already associated with a different user account.","custom-token-mismatch":"The custom token corresponds to a different audience.","requires-recent-login":"This operation is sensitive and requires recent authentication. Log in again before retrying this request.","dynamic-link-not-activated":"Please activate Dynamic Links in the Firebase Console and agree to the terms and conditions.","email-change-needs-verification":"Multi-factor users must always have a verified email.","email-already-in-use":"The email address is already in use by another account.","expired-action-code":"The action code has expired. ","cancelled-popup-request":"This operation has been cancelled due to another conflicting popup being opened.","internal-error":"An internal error has occurred.","invalid-app-credential":"The phone verification request contains an invalid application verifier. The reCAPTCHA token response is either invalid or expired.","invalid-app-id":"The mobile app identifier is not registed for the current project.","invalid-user-token":"This user's credential isn't valid for this project. This can happen if the user's token has been tampered with, or if the user isn't for the project associated with this API key.","invalid-auth-event":"An internal error has occurred.","invalid-verification-code":"The SMS verification code used to create the phone auth credential is invalid. Please resend the verification code sms and be sure to use the verification code provided by the user.","invalid-continue-uri":"The continue URL provided in the request is invalid.","invalid-cordova-configuration":"The following Cordova plugins must be installed to enable OAuth sign-in: cordova-plugin-buildinfo, cordova-universal-links-plugin, cordova-plugin-browsertab, cordova-plugin-inappbrowser and cordova-plugin-customurlscheme.","invalid-custom-token":"The custom token format is incorrect. Please check the documentation.","invalid-dynamic-link-domain":"The provided dynamic link domain is not configured or authorized for the current project.","invalid-email":"The email address is badly formatted.","invalid-api-key":"Your API key is invalid, please check you have copied it correctly.","invalid-cert-hash":"The SHA-1 certificate hash provided is invalid.","invalid-credential":"The supplied auth credential is malformed or has expired.","invalid-message-payload":"The email template corresponding to this action contains invalid characters in its message. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-multi-factor-session":"The request does not contain a valid proof of first factor successful sign-in.","invalid-oauth-provider":"EmailAuthProvider is not supported for this operation. This operation only supports OAuth providers.","invalid-oauth-client-id":"The OAuth client ID provided is either invalid or does not match the specified API key.","unauthorized-domain":"This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.","invalid-action-code":"The action code is invalid. This can happen if the code is malformed, expired, or has already been used.","wrong-password":"The password is invalid or the user does not have a password.","invalid-persistence-type":"The specified persistence type is invalid. It can only be local, session or none.","invalid-phone-number":"The format of the phone number provided is incorrect. Please enter the phone number in a format that can be parsed into E.164 format. E.164 phone numbers are written in the format [+][country code][subscriber number including area code].","invalid-provider-id":"The specified provider ID is invalid.","invalid-recipient-email":"The email corresponding to this action failed to send as the provided recipient email address is invalid.","invalid-sender":"The email template corresponding to this action contains an invalid sender email or name. Please fix by going to the Auth email templates section in the Firebase Console.","invalid-verification-id":"The verification ID used to create the phone auth credential is invalid.","invalid-tenant-id":"The Auth instance's tenant ID is invalid.","multi-factor-info-not-found":"The user does not have a second factor matching the identifier provided.","multi-factor-auth-required":"Proof of ownership of a second factor is required to complete sign-in.","missing-android-pkg-name":"An Android Package Name must be provided if the Android App is required to be installed.","auth-domain-config-required":"Be sure to include authDomain when calling firebase.initializeApp(), by following the instructions in the Firebase console.","missing-app-credential":"The phone verification request is missing an application verifier assertion. A reCAPTCHA response token needs to be provided.","missing-verification-code":"The phone auth credential was created with an empty SMS verification code.","missing-continue-uri":"A continue URL must be provided in the request.","missing-iframe-start":"An internal error has occurred.","missing-ios-bundle-id":"An iOS Bundle ID must be provided if an App Store ID is provided.","missing-multi-factor-info":"No second factor identifier is provided.","missing-multi-factor-session":"The request is missing proof of first factor successful sign-in.","missing-or-invalid-nonce":"The request does not contain a valid nonce. This can occur if the SHA-256 hash of the provided raw nonce does not match the hashed nonce in the ID token payload.","missing-phone-number":"To send verification codes, provide a phone number for the recipient.","missing-verification-id":"The phone auth credential was created with an empty verification ID.","app-deleted":"This instance of FirebaseApp has been deleted.","account-exists-with-different-credential":"An account already exists with the same email address but different sign-in credentials. Sign in using a provider associated with this email address.","network-request-failed":"A network error (such as timeout, interrupted connection or unreachable host) has occurred.","no-auth-event":"An internal error has occurred.","no-such-provider":"User was not linked to an account with the given provider.","null-user":"A null user object was provided as the argument for an operation which requires a non-null user object.","operation-not-allowed":"The given sign-in provider is disabled for this Firebase project. Enable it in the Firebase console, under the sign-in method tab of the Auth section.","operation-not-supported-in-this-environment":'This operation is not supported in the environment this application is running on. "location.protocol" must be http, https or chrome-extension and web storage must be enabled.',"popup-blocked":"Unable to establish a connection with the popup. It may have been blocked by the browser.","popup-closed-by-user":"The popup has been closed by the user before finalizing the operation.","provider-already-linked":"User can only be linked to one identity for the given provider.","quota-exceeded":"The project's quota for this operation has been exceeded.","redirect-cancelled-by-user":"The redirect operation has been cancelled by the user before finalizing.","redirect-operation-pending":"A redirect sign-in operation is already pending.","rejected-credential":"The request contains malformed or mismatching credentials.","second-factor-already-in-use":"The second factor is already enrolled on this account.","maximum-second-factor-count-exceeded":"The maximum allowed number of second factors on a user has been exceeded.","tenant-id-mismatch":"The provided tenant ID does not match the Auth instance's tenant ID",timeout:"The operation has timed out.","user-token-expired":"The user's credential is no longer valid. The user must sign in again.","too-many-requests":"We have blocked all requests from this device due to unusual activity. Try again later.","unauthorized-continue-uri":"The domain of the continue URL is not whitelisted.  Please whitelist the domain in the Firebase console.","unsupported-first-factor":"Enrolling a second factor or signing in with a multi-factor account requires sign-in with a supported first factor.","unsupported-persistence-type":"The current environment does not support the specified persistence type.","unsupported-tenant-operation":"This operation is not supported in a multi-tenant context.","unverified-email":"The operation requires a verified email.","user-cancelled":"The user did not grant your application the permissions it requested.","user-not-found":"There is no user record corresponding to this identifier. The user may have been deleted.","user-disabled":"The user account has been disabled by an administrator.","user-mismatch":"The supplied credentials do not correspond to the previously signed in user.","user-signed-out":"","weak-password":"The password must be 6 characters long or more.","web-storage-unsupported":"This browser is not supported or 3rd party cookies and data may be disabled."},B={ld:{Ua:"https://staging-identitytoolkit.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"b"},sd:{Ua:"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://securetoken.googleapis.com/v1/token",Xa:"https://identitytoolkit.googleapis.com/v2/",id:"p"},ud:{Ua:"https://staging-www.sandbox.googleapis.com/identitytoolkit/v3/relyingparty/",$a:"https://staging-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://staging-identitytoolkit.sandbox.googleapis.com/v2/",id:"s"},vd:{Ua:"https://www-googleapis-test.sandbox.google.com/identitytoolkit/v3/relyingparty/",$a:"https://test-securetoken.sandbox.googleapis.com/v1/token",Xa:"https://test-identitytoolkit.sandbox.googleapis.com/v2/",id:"t"}};function F(a){for(var b in B)if(B[b].id===a)return{firebaseEndpoint:(a=B[b]).Ua,secureTokenEndpoint:a.$a,identityPlatformEndpoint:a.Xa};return null}function V(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(e){return!1}}function u(a){if(Error.captureStackTrace)Error.captureStackTrace(this,u);else{var b=Error().stack;b&&(this.stack=b)}a&&(this.message=String(a))}function j(a,b){for(var e="",t=(a=a.split("%s")).length-1,n=0;n<t;n++)e+=a[n]+(n<b.length?b[n]:"%s");u.call(this,e+a[t])}function H(a,b){throw new j("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1))}function $(a,b){this.c=a,this.f=b,this.b=0,this.a=null}function z(a,b){a.f(b),100>a.b&&(a.b++,b.next=a.a,a.a=b)}function W(){this.b=this.a=null}D=F("__EID__")?"__EID__":void 0,N(u,Error),u.prototype.name="CustomError",N(j,u),j.prototype.name="AssertionError",$.prototype.get=function(){if(0<this.b){this.b--;var a=this.a;this.a=a.next,a.next=null}else a=this.c();return a};var K=new $((function(){return new Y}),(function(a){a.reset()}));function G(){var a=Ot,b=null;return a.a&&(b=a.a,a.a=a.a.next,a.a||(a.b=null),b.next=null),b}function Y(){this.next=this.b=this.a=null}W.prototype.add=function(a,b){var e=K.get();e.set(a,b),this.b?this.b.next=e:this.a=e,this.b=e},Y.prototype.set=function(a,b){this.a=a,this.b=b,this.next=null},Y.prototype.reset=function(){this.next=this.b=this.a=null};var X=Array.prototype.indexOf?function(a,b){return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"==typeof a)return"string"!=typeof b||1!=b.length?-1:a.indexOf(b,0);for(var e=0;e<a.length;e++)if(e in a&&a[e]===b)return e;return-1},Z=Array.prototype.forEach?function(a,b,e){Array.prototype.forEach.call(a,b,e)}:function(a,b,e){for(var t=a.length,n="string"==typeof a?a.split(""):a,r=0;r<t;r++)r in n&&b.call(e,n[r],r,a)};var Q=Array.prototype.filter?function(a,b){return Array.prototype.filter.call(a,b,void 0)}:function(a,b){for(var e=a.length,t=[],n=0,r="string"==typeof a?a.split(""):a,g=0;g<e;g++)if(g in r){var o=r[g];b.call(void 0,o,g,a)&&(t[n++]=o)}return t},J=Array.prototype.map?function(a,b){return Array.prototype.map.call(a,b,void 0)}:function(a,b){for(var e=a.length,t=Array(e),n="string"==typeof a?a.split(""):a,r=0;r<e;r++)r in n&&(t[r]=b.call(void 0,n[r],r,a));return t},ee=Array.prototype.some?function(a,b){return Array.prototype.some.call(a,b,void 0)}:function(a,b){for(var e=a.length,t="string"==typeof a?a.split(""):a,n=0;n<e;n++)if(n in t&&b.call(void 0,t[n],n,a))return!0;return!1};function te(a,b){return 0<=X(a,b)}function ne(a,b){var e;return(e=0<=(b=X(a,b)))&&Array.prototype.splice.call(a,b,1),e}function re(a,b){!function(a,b){for(var e="string"==typeof a?a.split(""):a,t=a.length-1;0<=t;--t)t in e&&b.call(void 0,e[t],t,a)}(a,(function(e,t){b.call(void 0,e,t,a)&&1==Array.prototype.splice.call(a,t,1).length&&0}))}function ie(a){return Array.prototype.concat.apply([],arguments)}function oe(a){var b=a.length;if(0<b){for(var e=Array(b),t=0;t<b;t++)e[t]=a[t];return e}return[]}var ae,se=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},ce=/&/g,le=/</g,de=/>/g,ue=/"/g,he=/'/g,fe=/\x00/g,pe=/[\x00&<>"']/;function ge(a,b){return-1!=a.indexOf(b)}function me(a,b){return a<b?-1:a>b?1:0}e:{var ve=h.navigator;if(ve){var be=ve.userAgent;if(be){ae=be;break e}}ae=""}function _e(a){return ge(ae,a)}function ye(a,b){for(var e in a)b.call(void 0,a[e],e,a)}function Ee(a){for(var b in a)return!1;return!0}function Ce(a){var e,b={};for(e in a)b[e]=a[e];return b}var we="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Se(a,b){for(var e,t,n=1;n<arguments.length;n++){for(e in t=arguments[n])a[e]=t[e];for(var r=0;r<we.length;r++)e=we[r],Object.prototype.hasOwnProperty.call(t,e)&&(a[e]=t[e])}}function Te(a,b){e:{try{var e=a&&a.ownerDocument,t=e&&(e.defaultView||e.parentWindow);if((t=t||h).Element&&t.Location){var n=t;break e}}catch(e){}n=null}if(n&&void 0!==n[b]&&(!a||!(a instanceof n[b])&&(a instanceof n.Location||a instanceof n.Element))){if(w(a))try{var r=a.constructor.displayName||a.constructor.name||Object.prototype.toString.call(a)}catch(e){r="<object could not be stringified>"}else r=void 0===a?"undefined":null===a?"null":typeof a;H("Argument is not a %s (or a non-Element, non-Location mock); got: %s",b,r)}}function Ae(a,b){this.a=a===ke&&b||"",this.b=Ie}function Re(a){return a instanceof Ae&&a.constructor===Ae&&a.b===Ie?a.a:(H("expected object of type Const, got '"+a+"'"),"type_error:Const")}Ae.prototype.ta=!0,Ae.prototype.sa=function(){return this.a},Ae.prototype.toString=function(){return"Const{"+this.a+"}"};var Oe,Ie={},ke={};function Ne(){if(void 0===Oe){var a=null,b=h.trustedTypes;if(b&&b.createPolicy){try{a=b.createPolicy("goog#html",{createHTML:L,createScript:L,createScriptURL:L})}catch(e){h.console&&h.console.error(e.message)}Oe=a}else Oe=a}return Oe}function Le(a,b){this.a=b===Ue?a:""}function Me(a){return a instanceof Le&&a.constructor===Le?a.a:(H("expected object of type TrustedResourceUrl, got '"+a+"' of type "+y(a)),"type_error:TrustedResourceUrl")}function xe(a,b){var e=Re(a);if(!Pe.test(e))throw Error("Invalid TrustedResourceUrl format: "+e);return function(a){var b=Ne();return new Le(a=b?b.createScriptURL(a):a,Ue)}(a=e.replace(De,(function(t,n){if(!Object.prototype.hasOwnProperty.call(b,n))throw Error('Found marker, "'+n+'", in format string, "'+e+'", but no valid label mapping found in args: '+JSON.stringify(b));return(t=b[n])instanceof Ae?Re(t):encodeURIComponent(String(t))})))}Le.prototype.ta=!0,Le.prototype.sa=function(){return this.a.toString()},Le.prototype.toString=function(){return"TrustedResourceUrl{"+this.a+"}"};var De=/%{(\w+)}/g,Pe=/^((https:)?\/\/[0-9a-z.:[\]-]+\/|\/[^/\\]|[^:/\\%]+\/|[^:/\\%]*[?#]|about:blank#)/i,Ue={};function Be(a,b){this.a=b===We?a:""}function Fe(a){return a instanceof Be&&a.constructor===Be?a.a:(H("expected object of type SafeUrl, got '"+a+"' of type "+y(a)),"type_error:SafeUrl")}Be.prototype.ta=!0,Be.prototype.sa=function(){return this.a.toString()},Be.prototype.toString=function(){return"SafeUrl{"+this.a+"}"};var Ve=/^(?:audio\/(?:3gpp2|3gpp|aac|L16|midi|mp3|mp4|mpeg|oga|ogg|opus|x-m4a|x-matroska|x-wav|wav|webm)|font\/\w+|image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp|x-icon)|text\/csv|video\/(?:mpeg|mp4|ogg|webm|quicktime|x-matroska))(?:;\w+=(?:\w+|"[\w;,= ]+"))*$/i,je=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,He=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i;function $e(a){if(a instanceof Be)return a;if(a="object"==typeof a&&a.ta?a.sa():String(a),He.test(a))a=new Be(a,We);else{var b=(a=(a=String(a)).replace(/(%0A|%0D)/g,"")).match(je);a=b&&Ve.test(b[1])?new Be(a,We):null}return a}function ze(a){return a instanceof Be?a:(a="object"==typeof a&&a.ta?a.sa():String(a),He.test(a)||(a="about:invalid#zClosurez"),new Be(a,We))}var We={},Ke=new Be("about:invalid#zClosurez",We);function Ge(a,b,e){this.a=e===qe?a:""}Ge.prototype.ta=!0,Ge.prototype.sa=function(){return this.a.toString()},Ge.prototype.toString=function(){return"SafeHtml{"+this.a+"}"};var qe={};function Ye(a,b,e,t){return a=a instanceof Be?a:ze(a),b=b||h,e=e instanceof Ae?Re(e):e||"",b.open(Fe(a),e,t,void 0)}function Xe(a,b){for(var e=a.split("%s"),t="",n=Array.prototype.slice.call(arguments,1);n.length&&1<e.length;)t+=e.shift()+n.shift();return t+e.join("%s")}function Ze(a){return pe.test(a)&&(-1!=a.indexOf("&")&&(a=a.replace(ce,"&amp;")),-1!=a.indexOf("<")&&(a=a.replace(le,"&lt;")),-1!=a.indexOf(">")&&(a=a.replace(de,"&gt;")),-1!=a.indexOf('"')&&(a=a.replace(ue,"&quot;")),-1!=a.indexOf("'")&&(a=a.replace(he,"&#39;")),-1!=a.indexOf("\0")&&(a=a.replace(fe,"&#0;"))),a}function Qe(a){return Qe[" "](a),a}Qe[" "]=_;var Je,a,et=_e("Opera"),tt=_e("Trident")||_e("MSIE"),nt=_e("Edge"),it=nt||tt,ot=_e("Gecko")&&!(ge(ae.toLowerCase(),"webkit")&&!_e("Edge"))&&!(_e("Trident")||_e("MSIE"))&&!_e("Edge"),at=ge(ae.toLowerCase(),"webkit")&&!_e("Edge");function st(){var a=h.document;return a?a.documentMode:void 0}e:{var ct="",lt=(a=ae,ot?/rv:([^\);]+)(\)|;)/.exec(a):nt?/Edge\/([\d\.]+)/.exec(a):tt?/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a):at?/WebKit\/(\S+)/.exec(a):et?/(?:Version)[ \/]?(\S+)/.exec(a):void 0);if(lt&&(ct=lt?lt[1]:""),tt){var ut=st();if(null!=ut&&ut>parseFloat(ct)){Je=String(ut);break e}}Je=ct}var ht,ft={};function pt(a){return function(a,b){var e=ft;return Object.prototype.hasOwnProperty.call(e,a)?e[a]:e[a]=b(a)}(a,(function(){for(var b=0,e=se(String(Je)).split("."),t=se(String(a)).split("."),n=Math.max(e.length,t.length),r=0;0==b&&r<n;r++){var g=e[r]||"",o=t[r]||"";do{if(g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""],o=/(\d*)(\D*)(.*)/.exec(o)||["","","",""],0==g[0].length&&0==o[0].length)break;b=me(0==g[1].length?0:parseInt(g[1],10),0==o[1].length?0:parseInt(o[1],10))||me(0==g[2].length,0==o[2].length)||me(g[2],o[2]),g=g[3],o=o[3]}while(0==b)}return 0<=b}))}if(h.document&&tt){var gt=st();ht=gt||(parseInt(Je,10)||void 0)}else ht=void 0;var mt=ht;try{new self.OffscreenCanvas(0,0).getContext("2d")}catch(a){}var vt=!tt||9<=Number(mt);function bt(a){var b=document;return"string"==typeof a?b.getElementById(a):a}function _t(a,b){ye(b,(function(e,t){e&&"object"==typeof e&&e.ta&&(e=e.sa()),"style"==t?a.style.cssText=e:"class"==t?a.className=e:"for"==t?a.htmlFor=e:Ct.hasOwnProperty(t)?a.setAttribute(Ct[t],e):0==t.lastIndexOf("aria-",0)||0==t.lastIndexOf("data-",0)?a.setAttribute(t,e):a[t]=e}))}var yt,Et,Ct={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"};function wt(a,b,e){function t(e){e&&b.appendChild("string"==typeof e?a.createTextNode(e):e)}for(var n=2;n<e.length;n++){var r=e[n];if(!E(r)||w(r)&&0<r.nodeType)t(r);else{e:{if(r&&"number"==typeof r.length){if(w(r)){var g="function"==typeof r.item||"string"==typeof r.item;break e}if(C(r)){g="function"==typeof r.item;break e}}g=!1}Z(g?oe(r):r,t)}}}function St(a,b){return b=String(b),"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase()),a.createElement(b)}function Tt(a){h.setTimeout((function(){throw a}),0)}function At(a,b){Et||function(){if(h.Promise&&h.Promise.resolve){var a=h.Promise.resolve(void 0);Et=function(){a.then(It)}}else Et=function(){var b=It;!C(h.setImmediate)||h.Window&&h.Window.prototype&&!_e("Edge")&&h.Window.prototype.setImmediate==h.setImmediate?(yt||(yt=function(){var a=h.MessageChannel;if(void 0===a&&"undefined"!=typeof window&&window.postMessage&&window.addEventListener&&!_e("Presto")&&(a=function(){var e=St(document,"IFRAME");e.style.display="none",document.documentElement.appendChild(e);var t=e.contentWindow;(e=t.document).open(),e.close();var g="callImmediate"+Math.random(),n="file:"==t.location.protocol?"*":t.location.protocol+"//"+t.location.host;e=q((function(e){"*"!=n&&e.origin!=n||e.data!=g||this.port1.onmessage()}),this),t.addEventListener("message",e,!1),this.port1={},this.port2={postMessage:function(){t.postMessage(g,n)}}}),void 0!==a&&!_e("Trident")&&!_e("MSIE")){var b=new a,e={},t=e;return b.port1.onmessage=function(){if(void 0!==e.next){var t=(e=e.next).Hb;e.Hb=null,t()}},function(e){t.next={Hb:e},t=t.next,b.port2.postMessage(0)}}return function(e){h.setTimeout(e,0)}}()),yt(b)):h.setImmediate(b)}}(),Rt||(Et(),Rt=!0),Ot.add(a,b)}var Rt=!1,Ot=new W;function It(){for(var a;a=G();){try{a.a.call(a.b)}catch(e){Tt(e)}z(K,a)}Rt=!1}function kt(a,b){if(this.a=Nt,this.i=void 0,this.f=this.b=this.c=null,this.g=this.h=!1,a!=_)try{var e=this;a.call(b,(function(t){zt(e,Lt,t)}),(function(t){if(!(t instanceof Zt))try{if(t instanceof Error)throw t;throw Error("Promise rejected.")}catch(e){}zt(e,Mt,t)}))}catch(e){zt(this,Mt,e)}}var Nt=0,Lt=2,Mt=3;function xt(){this.next=this.f=this.b=this.g=this.a=null,this.c=!1}xt.prototype.reset=function(){this.f=this.b=this.g=this.a=null,this.c=!1};var Dt=new $((function(){return new xt}),(function(a){a.reset()}));function Pt(a,b,e){var t=Dt.get();return t.g=a,t.b=b,t.f=e,t}function Ut(a){if(a instanceof kt)return a;var b=new kt(_);return zt(b,Lt,a),b}function Bt(a){return new kt((function(b,e){e(a)}))}function Ft(a,b,e){Wt(a,b,e,null)||At(I(b,a))}function Vt(a){return new kt((function(b){var e=a.length,t=[];if(e)for(var n=function(n,r,p){e--,t[n]=r?{Qb:!0,value:p}:{Qb:!1,reason:p},0==e&&b(t)},r=0;r<a.length;r++)Ft(a[r],I(n,r,!0),I(n,r,!1));else b(t)}))}function jt(a,b){if(a.a==Nt)if(a.c){var e=a.c;if(e.b){for(var t=0,n=null,r=null,g=e.b;g&&(g.c||(t++,g.a==a&&(n=g),!(n&&1<t)));g=g.next)n||(r=g);n&&(e.a==Nt&&1==t?jt(e,b):(r?((t=r).next==e.f&&(e.f=t),t.next=t.next.next):Gt(e),qt(e,n,Mt,b)))}a.c=null}else zt(a,Mt,b)}function Ht(a,b){a.b||a.a!=Lt&&a.a!=Mt||Kt(a),a.f?a.f.next=b:a.b=b,a.f=b}function $t(a,b,e,t){var n=Pt(null,null,null);return n.a=new kt((function(r,g){n.g=b?function(e){try{var n=b.call(t,e);r(n)}catch(e){g(e)}}:r,n.b=e?function(n){try{var o=e.call(t,n);void 0===o&&n instanceof Zt?g(n):r(o)}catch(e){g(e)}}:g})),n.a.c=a,Ht(a,n),n.a}function zt(a,b,e){a.a==Nt&&(a===e&&(b=Mt,e=new TypeError("Promise cannot resolve to itself")),a.a=1,Wt(e,a.$c,a.ad,a)||(a.i=e,a.a=b,a.c=null,Kt(a),b!=Mt||e instanceof Zt||function(a,b){a.g=!0,At((function(){a.g&&Xt.call(null,b)}))}(a,e)))}function Wt(a,b,e,t){if(a instanceof kt)return Ht(a,Pt(b||_,e||null,t)),!0;if(V(a))return a.then(b,e,t),!0;if(w(a))try{var n=a.then;if(C(n))return function(a,b,e,t,n){function r(e){o||(o=!0,t.call(n,e))}function g(t){o||(o=!0,e.call(n,t))}var o=!1;try{b.call(a,g,r)}catch(e){r(e)}}(a,n,b,e,t),!0}catch(n){return e.call(t,n),!0}return!1}function Kt(a){a.h||(a.h=!0,At(a.gc,a))}function Gt(a){var b=null;return a.b&&(b=a.b,a.b=b.next,b.next=null),a.b||(a.f=null),b}function qt(a,b,e,t){if(e==Mt&&b.b&&!b.c)for(;a&&a.g;a=a.c)a.g=!1;if(b.a)b.a.c=null,Yt(b,e,t);else try{b.c?b.g.call(b.f):Yt(b,e,t)}catch(e){Xt.call(null,e)}z(Dt,b)}function Yt(a,b,e){b==Lt?a.g.call(a.f,e):a.b&&a.b.call(a.f,e)}kt.prototype.then=function(a,b,e){return $t(this,C(a)?a:null,C(b)?b:null,e)},kt.prototype.$goog_Thenable=!0,(n=kt.prototype).oa=function(a,b){return(a=Pt(a,a,b)).c=!0,Ht(this,a),this},n.o=function(a,b){return $t(this,null,a,b)},n.cancel=function(a){if(this.a==Nt){var b=new Zt(a);At((function(){jt(this,b)}),this)}},n.$c=function(a){this.a=Nt,zt(this,Lt,a)},n.ad=function(a){this.a=Nt,zt(this,Mt,a)},n.gc=function(){for(var a;a=Gt(this);)qt(this,a,this.a,this.i);this.h=!1};var Xt=Tt;function Zt(a){u.call(this,a)}function Qt(){0!=Jt&&(en[S(this)]=this),this.ya=this.ya,this.pa=this.pa}N(Zt,u),Zt.prototype.name="cancel";var Jt=0,en={};function tn(a){if(!a.ya&&(a.ya=!0,a.Da(),0!=Jt)){var b=S(a);if(0!=Jt&&a.pa&&0<a.pa.length)throw Error(a+" did not empty its onDisposeCallbacks queue. This probably means it overrode dispose() or disposeInternal() without calling the superclass' method.");delete en[b]}}Qt.prototype.ya=!1,Qt.prototype.Da=function(){if(this.pa)for(;this.pa.length;)this.pa.shift()()};var nn=Object.freeze||function(a){return a},rn=!tt||9<=Number(mt),on=tt&&!pt("9"),an=function(){if(!h.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{h.addEventListener("test",_,b),h.removeEventListener("test",_,b)}catch(e){}return a}();function sn(a,b){this.type=a,this.b=this.target=b,this.defaultPrevented=!1}function cn(a,b){if(sn.call(this,a?a.type:""),this.relatedTarget=this.b=this.target=null,this.button=this.screenY=this.screenX=this.clientY=this.clientX=0,this.key="",this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1,this.pointerId=0,this.pointerType="",this.a=null,a){var e=this.type=a.type,t=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;if(this.target=a.target||a.srcElement,this.b=b,b=a.relatedTarget){if(ot){e:{try{Qe(b.nodeName);var n=!0;break e}catch(e){}n=!1}n||(b=null)}}else"mouseover"==e?b=a.fromElement:"mouseout"==e&&(b=a.toElement);this.relatedTarget=b,t?(this.clientX=void 0!==t.clientX?t.clientX:t.pageX,this.clientY=void 0!==t.clientY?t.clientY:t.pageY,this.screenX=t.screenX||0,this.screenY=t.screenY||0):(this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0),this.button=a.button,this.key=a.key||"",this.ctrlKey=a.ctrlKey,this.altKey=a.altKey,this.shiftKey=a.shiftKey,this.metaKey=a.metaKey,this.pointerId=a.pointerId||0,this.pointerType="string"==typeof a.pointerType?a.pointerType:ln[a.pointerType]||"",this.a=a,a.defaultPrevented&&this.preventDefault()}}sn.prototype.preventDefault=function(){this.defaultPrevented=!0},N(cn,sn);var ln=nn({2:"touch",3:"pen",4:"mouse"});cn.prototype.preventDefault=function(){cn.bb.preventDefault.call(this);var a=this.a;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,on)try{(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)&&(a.keyCode=-1)}catch(e){}},cn.prototype.g=function(){return this.a};var dd="closure_listenable_"+(1e6*Math.random()|0),dn=0;function un(a,b,e,t,n){this.listener=a,this.proxy=null,this.src=b,this.type=e,this.capture=!!t,this.Wa=n,this.key=++dn,this.wa=this.Qa=!1}function hn(a){a.wa=!0,a.listener=null,a.proxy=null,a.src=null,a.Wa=null}function fn(a){this.src=a,this.a={},this.b=0}function pn(a,b){var e=b.type;e in a.a&&ne(a.a[e],b)&&(hn(b),0==a.a[e].length&&(delete a.a[e],a.b--))}function gn(a,b,e,t){for(var n=0;n<a.length;++n){var r=a[n];if(!r.wa&&r.listener==b&&r.capture==!!e&&r.Wa==t)return n}return-1}fn.prototype.add=function(a,b,e,t,n){var r=a.toString();(a=this.a[r])||(a=this.a[r]=[],this.b++);var g=gn(a,b,t,n);return-1<g?(b=a[g],e||(b.Qa=!1)):((b=new un(b,this.src,r,!!t,n)).Qa=e,a.push(b)),b};var mn="closure_lm_"+(1e6*Math.random()|0),vn={};function bn(a,b,e,t,n){if(t&&t.once)yn(a,b,e,t,n);else if(Array.isArray(b))for(var r=0;r<b.length;r++)bn(a,b[r],e,t,n);else e=In(e),a&&a[dd]?Nn(a,b,e,w(t)?!!t.capture:!!t,n):_n(a,b,e,!1,t,n)}function _n(a,b,e,t,n,r){if(!b)throw Error("Invalid event type");var g=w(n)?!!n.capture:!!n,o=Rn(a);if(o||(a[mn]=o=new fn(a)),!(e=o.add(b,e,t,g,r)).proxy){if(t=function(){var a=An,b=rn?function(e){return a.call(b.src,b.listener,e)}:function(e){if(!(e=a.call(b.src,b.listener,e)))return e};return b}(),e.proxy=t,t.src=a,t.listener=e,a.addEventListener)an||(n=g),void 0===n&&(n=!1),a.addEventListener(b.toString(),t,n);else if(a.attachEvent)a.attachEvent(wn(b.toString()),t);else{if(!a.addListener||!a.removeListener)throw Error("addEventListener and attachEvent are unavailable.");a.addListener(t)}0}}function yn(a,b,e,t,n){if(Array.isArray(b))for(var r=0;r<b.length;r++)yn(a,b[r],e,t,n);else e=In(e),a&&a[dd]?Ln(a,b,e,w(t)?!!t.capture:!!t,n):_n(a,b,e,!0,t,n)}function En(a,b,e,t,n){if(Array.isArray(b))for(var r=0;r<b.length;r++)En(a,b[r],e,t,n);else t=w(t)?!!t.capture:!!t,e=In(e),a&&a[dd]?(a=a.v,(b=String(b).toString())in a.a&&(-1<(e=gn(r=a.a[b],e,t,n))&&(hn(r[e]),Array.prototype.splice.call(r,e,1),0==r.length&&(delete a.a[b],a.b--)))):a&&(a=Rn(a))&&(b=a.a[b.toString()],a=-1,b&&(a=gn(b,e,t,n)),(e=-1<a?b[a]:null)&&Cn(e))}function Cn(a){if("number"!=typeof a&&a&&!a.wa){var b=a.src;if(b&&b[dd])pn(b.v,a);else{var e=a.type,t=a.proxy;b.removeEventListener?b.removeEventListener(e,t,a.capture):b.detachEvent?b.detachEvent(wn(e),t):b.addListener&&b.removeListener&&b.removeListener(t),(e=Rn(b))?(pn(e,a),0==e.b&&(e.src=null,b[mn]=null)):hn(a)}}}function wn(a){return a in vn?vn[a]:vn[a]="on"+a}function Sn(a,b,e,t){var n=!0;if((a=Rn(a))&&(b=a.a[b.toString()]))for(b=b.concat(),a=0;a<b.length;a++){var r=b[a];r&&r.capture==e&&!r.wa&&(r=Tn(r,t),n=n&&!1!==r)}return n}function Tn(a,b){var e=a.listener,t=a.Wa||a.src;return a.Qa&&Cn(a),e.call(t,b)}function An(a,b){if(a.wa)return!0;if(!rn){if(!b)e:{b=["window","event"];for(var e=h,t=0;t<b.length;t++)if(null==(e=e[b[t]])){b=null;break e}b=e}if(b=new cn(t=b,this),e=!0,!(0>t.keyCode||null!=t.returnValue)){e:{var n=!1;if(0==t.keyCode)try{t.keyCode=-1;break e}catch(e){n=!0}(n||null==t.returnValue)&&(t.returnValue=!0)}for(t=[],n=b.b;n;n=n.parentNode)t.push(n);for(a=a.type,n=t.length-1;0<=n;n--){b.b=t[n];var r=Sn(t[n],a,!0,b);e=e&&r}for(n=0;n<t.length;n++)b.b=t[n],r=Sn(t[n],a,!1,b),e=e&&r}return e}return Tn(a,new cn(b,this))}function Rn(a){return(a=a[mn])instanceof fn?a:null}var On="__closure_events_fn_"+(1e9*Math.random()>>>0);function In(a){return C(a)?a:(a[On]||(a[On]=function(b){return a.handleEvent(b)}),a[On])}function kn(){Qt.call(this),this.v=new fn(this),this.bc=this,this.hb=null}function Nn(a,b,e,t,n){a.v.add(String(b),e,!1,t,n)}function Ln(a,b,e,t,n){a.v.add(String(b),e,!0,t,n)}function Mn(a,b,e,t){if(!(b=a.v.a[String(b)]))return!0;b=b.concat();for(var n=!0,r=0;r<b.length;++r){var g=b[r];if(g&&!g.wa&&g.capture==e){var o=g.listener,c=g.Wa||g.src;g.Qa&&pn(a.v,g),n=!1!==o.call(c,t)&&n}}return n&&!t.defaultPrevented}function xn(a,b,e){if(C(a))e&&(a=q(a,e));else{if(!a||"function"!=typeof a.handleEvent)throw Error("Invalid listener argument");a=q(a.handleEvent,a)}return 2147483647<Number(b)?-1:h.setTimeout(a,b||0)}function Dn(a){var b=null;return new kt((function(e,t){-1==(b=xn((function(){e(void 0)}),a))&&t(Error("Failed to schedule timer."))})).o((function(e){throw h.clearTimeout(b),e}))}function Pn(a){if(a.X&&"function"==typeof a.X)return a.X();if("string"==typeof a)return a.split("");if(E(a)){for(var b=[],e=a.length,t=0;t<e;t++)b.push(a[t]);return b}for(t in b=[],e=0,a)b[e++]=a[t];return b}function Un(a){if(a.Y&&"function"==typeof a.Y)return a.Y();if(!a.X||"function"!=typeof a.X){if(E(a)||"string"==typeof a){var b=[];a=a.length;for(var e=0;e<a;e++)b.push(e);return b}for(var t in b=[],e=0,a)b[e++]=t;return b}}function Bn(a,b){this.b={},this.a=[],this.c=0;var e=arguments.length;if(1<e){if(e%2)throw Error("Uneven number of arguments");for(var t=0;t<e;t+=2)this.set(arguments[t],arguments[t+1])}else if(a)if(a instanceof Bn)for(e=a.Y(),t=0;t<e.length;t++)this.set(e[t],a.get(e[t]));else for(t in a)this.set(t,a[t])}function Fn(a){if(a.c!=a.a.length){for(var b=0,e=0;b<a.a.length;){var t=a.a[b];Vn(a.b,t)&&(a.a[e++]=t),b++}a.a.length=e}if(a.c!=a.a.length){var n={};for(e=b=0;b<a.a.length;)Vn(n,t=a.a[b])||(a.a[e++]=t,n[t]=1),b++;a.a.length=e}}function Vn(a,b){return Object.prototype.hasOwnProperty.call(a,b)}N(kn,Qt),kn.prototype[dd]=!0,kn.prototype.addEventListener=function(a,b,e,t){bn(this,a,b,e,t)},kn.prototype.removeEventListener=function(a,b,e,t){En(this,a,b,e,t)},kn.prototype.dispatchEvent=function(a){var b,e=this.hb;if(e)for(b=[];e;e=e.hb)b.push(e);e=this.bc;var t=a.type||a;if("string"==typeof a)a=new sn(a,e);else if(a instanceof sn)a.target=a.target||e;else{var n=a;Se(a=new sn(t,e),n)}if(n=!0,b)for(var r=b.length-1;0<=r;r--){var g=a.b=b[r];n=Mn(g,t,!0,a)&&n}if(n=Mn(g=a.b=e,t,!0,a)&&n,n=Mn(g,t,!1,a)&&n,b)for(r=0;r<b.length;r++)n=Mn(g=a.b=b[r],t,!1,a)&&n;return n},kn.prototype.Da=function(){if(kn.bb.Da.call(this),this.v){var e,a=this.v;for(e in a.a){for(var t=a.a[e],n=0;n<t.length;n++)hn(t[n]);delete a.a[e],a.b--}}this.hb=null},(n=Bn.prototype).X=function(){Fn(this);for(var a=[],b=0;b<this.a.length;b++)a.push(this.b[this.a[b]]);return a},n.Y=function(){return Fn(this),this.a.concat()},n.clear=function(){this.b={},this.c=this.a.length=0},n.get=function(a,b){return Vn(this.b,a)?this.b[a]:b},n.set=function(a,b){Vn(this.b,a)||(this.c++,this.a.push(a)),this.b[a]=b},n.forEach=function(a,b){for(var e=this.Y(),t=0;t<e.length;t++){var n=e[t],r=this.get(n);a.call(b,r,n,this)}};var jn=/^(?:([^:/?#.]+):)?(?:\/\/(?:([^\\/?#]*)@)?([^\\/?#]*?)(?::([0-9]+))?(?=[\\/?#]|$))?([^?#]+)?(?:\?([^#]*))?(?:#([\s\S]*))?$/;function Hn(a,b){var e;this.a=this.l=this.c="",this.g=null,this.h=this.f="",this.i=!1,a instanceof Hn?(this.i=void 0!==b?b:a.i,$n(this,a.c),this.l=a.l,this.a=a.a,zn(this,a.g),this.f=a.f,Wn(this,ur(a.b)),this.h=a.h):a&&(e=String(a).match(jn))?(this.i=!!b,$n(this,e[1]||"",!0),this.l=Xn(e[2]||""),this.a=Xn(e[3]||"",!0),zn(this,e[4]),this.f=Xn(e[5]||"",!0),Wn(this,e[6]||"",!0),this.h=Xn(e[7]||"")):(this.i=!!b,this.b=new or(null,this.i))}function $n(a,b,e){a.c=e?Xn(b,!0):b,a.c&&(a.c=a.c.replace(/:$/,""))}function zn(a,b){if(b){if(b=Number(b),isNaN(b)||0>b)throw Error("Bad port number "+b);a.g=b}else a.g=null}function Wn(a,b,e){b instanceof or?(a.b=b,function(a,b){b&&!a.f&&(ar(a),a.c=null,a.a.forEach((function(e,t){var n=t.toLowerCase();t!=n&&(cr(this,t),dr(this,n,e))}),a)),a.f=b}(a.b,a.i)):(e||(b=Zn(b,rr)),a.b=new or(b,a.i))}function Kn(a,b,e){a.b.set(b,e)}function Gn(a,b){return a.b.get(b)}function qn(a){return a instanceof Hn?new Hn(a):new Hn(a,void 0)}function Yn(a,b,e,t){var n=new Hn(null,void 0);return a&&$n(n,a),b&&(n.a=b),e&&zn(n,e),t&&(n.f=t),n}function Xn(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""}function Zn(a,b,e){return"string"==typeof a?(a=encodeURI(a).replace(b,Qn),e&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null}function Qn(a){return"%"+((a=a.charCodeAt(0))>>4&15).toString(16)+(15&a).toString(16)}Hn.prototype.toString=function(){var a=[],b=this.c;b&&a.push(Zn(b,Jn,!0),":");var e=this.a;return(e||"file"==b)&&(a.push("//"),(b=this.l)&&a.push(Zn(b,Jn,!0),"@"),a.push(encodeURIComponent(String(e)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),null!=(e=this.g)&&a.push(":",String(e))),(e=this.f)&&(this.a&&"/"!=e.charAt(0)&&a.push("/"),a.push(Zn(e,"/"==e.charAt(0)?nr:er,!0))),(e=this.b.toString())&&a.push("?",e),(e=this.h)&&a.push("#",Zn(e,ir)),a.join("")},Hn.prototype.resolve=function(a){var b=new Hn(this),e=!!a.c;e?$n(b,a.c):e=!!a.l,e?b.l=a.l:e=!!a.a,e?b.a=a.a:e=null!=a.g;var t=a.f;if(e)zn(b,a.g);else if(e=!!a.f){if("/"!=t.charAt(0))if(this.a&&!this.f)t="/"+t;else{var n=b.f.lastIndexOf("/");-1!=n&&(t=b.f.substr(0,n+1)+t)}if(".."==(n=t)||"."==n)t="";else if(ge(n,"./")||ge(n,"/.")){t=0==n.lastIndexOf("/",0),n=n.split("/");for(var r=[],g=0;g<n.length;){var o=n[g++];"."==o?t&&g==n.length&&r.push(""):".."==o?((1<r.length||1==r.length&&""!=r[0])&&r.pop(),t&&g==n.length&&r.push("")):(r.push(o),t=!0)}t=r.join("/")}else t=n}return e?b.f=t:e=""!==a.b.toString(),e?Wn(b,ur(a.b)):e=!!a.h,e&&(b.h=a.h),b};var Jn=/[#\/\?@]/g,er=/[#\?:]/g,nr=/[#\?]/g,rr=/[#\?@]/g,ir=/#/g;function or(a,b){this.b=this.a=null,this.c=a||null,this.f=!!b}function ar(a){a.a||(a.a=new Bn,a.b=0,a.c&&function(a,b){if(a){a=a.split("&");for(var e=0;e<a.length;e++){var t=a[e].indexOf("="),n=null;if(0<=t){var r=a[e].substring(0,t);n=a[e].substring(t+1)}else r=a[e];b(r,n?decodeURIComponent(n.replace(/\+/g," ")):"")}}}(a.c,(function(b,e){a.add(decodeURIComponent(b.replace(/\+/g," ")),e)})))}function sr(a){var b=Un(a);if(void 0===b)throw Error("Keys are undefined");var e=new or(null,void 0);a=Pn(a);for(var t=0;t<b.length;t++){var n=b[t],r=a[t];Array.isArray(r)?dr(e,n,r):e.add(n,r)}return e}function cr(a,b){ar(a),b=fr(a,b),Vn(a.a.b,b)&&(a.c=null,a.b-=a.a.get(b).length,Vn((a=a.a).b,b)&&(delete a.b[b],a.c--,a.a.length>2*a.c&&Fn(a)))}function lr(a,b){return ar(a),b=fr(a,b),Vn(a.a.b,b)}function dr(a,b,e){cr(a,b),0<e.length&&(a.c=null,a.a.set(fr(a,b),oe(e)),a.b+=e.length)}function ur(a){var b=new or;return b.c=a.c,a.a&&(b.a=new Bn(a.a),b.b=a.b),b}function fr(a,b){return b=String(b),a.f&&(b=b.toLowerCase()),b}function pr(a){var b=[];return mr(new gr,a,b),b.join("")}function gr(){}function mr(a,b,e){if(null==b)e.push("null");else{if("object"==typeof b){if(Array.isArray(b)){var t=b;b=t.length,e.push("[");for(var n="",r=0;r<b;r++)e.push(n),mr(a,t[r],e),n=",";return void e.push("]")}if(!(b instanceof String||b instanceof Number||b instanceof Boolean)){for(t in e.push("{"),n="",b)Object.prototype.hasOwnProperty.call(b,t)&&("function"!=typeof(r=b[t])&&(e.push(n),yr(t,e),e.push(":"),mr(a,r,e),n=","));return void e.push("}")}b=b.valueOf()}switch(typeof b){case"string":yr(b,e);break;case"number":e.push(isFinite(b)&&!isNaN(b)?String(b):"null");break;case"boolean":e.push(String(b));break;case"function":e.push("null");break;default:throw Error("Unknown type: "+typeof b)}}}(n=or.prototype).add=function(a,b){ar(this),this.c=null,a=fr(this,a);var e=this.a.get(a);return e||this.a.set(a,e=[]),e.push(b),this.b+=1,this},n.clear=function(){this.a=this.c=null,this.b=0},n.forEach=function(a,b){ar(this),this.a.forEach((function(e,t){Z(e,(function(e){a.call(b,e,t,this)}),this)}),this)},n.Y=function(){ar(this);for(var a=this.a.X(),b=this.a.Y(),e=[],t=0;t<b.length;t++)for(var n=a[t],r=0;r<n.length;r++)e.push(b[t]);return e},n.X=function(a){ar(this);var b=[];if("string"==typeof a)lr(this,a)&&(b=ie(b,this.a.get(fr(this,a))));else{a=this.a.X();for(var e=0;e<a.length;e++)b=ie(b,a[e])}return b},n.set=function(a,b){return ar(this),this.c=null,lr(this,a=fr(this,a))&&(this.b-=this.a.get(a).length),this.a.set(a,[b]),this.b+=1,this},n.get=function(a,b){return a&&0<(a=this.X(a)).length?String(a[0]):b},n.toString=function(){if(this.c)return this.c;if(!this.a)return"";for(var a=[],b=this.a.Y(),e=0;e<b.length;e++){var t=b[e],n=encodeURIComponent(String(t));t=this.X(t);for(var r=0;r<t.length;r++){var g=n;""!==t[r]&&(g+="="+encodeURIComponent(String(t[r]))),a.push(g)}}return this.c=a.join("&")};var vr={'"':'\\"',"\\":"\\\\","/":"\\/","\b":"\\b","\f":"\\f","\n":"\\n","\r":"\\r","\t":"\\t","\v":"\\u000b"},_r=/\uffff/.test("￿")?/[\\"\x00-\x1f\x7f-\uffff]/g:/[\\"\x00-\x1f\x7f-\xff]/g;function yr(a,b){b.push('"',a.replace(_r,(function(e){var t=vr[e];return t||(t="\\u"+(65536|e.charCodeAt(0)).toString(16).substr(1),vr[e]=t),t})),'"')}function Er(){var a=jr();return tt&&!!mt&&11==mt||/Edge\/\d+/.test(a)}function Cr(){return h.window&&h.window.location.href||self&&self.location&&self.location.href||""}function wr(a,b){b=b||h.window;var e="about:blank";a&&(e=Fe($e(a)||Ke)),b.location.href=e}function Sr(a,b){var e,t=[];for(e in a)e in b?typeof a[e]!=typeof b[e]?t.push(e):"object"==typeof a[e]&&null!=a[e]&&null!=b[e]?0<Sr(a[e],b[e]).length&&t.push(e):a[e]!==b[e]&&t.push(e):t.push(e);for(e in b)e in a||t.push(e);return t}function Tr(a){return!!((a=(a||jr()).toLowerCase()).match(/android/)||a.match(/webos/)||a.match(/iphone|ipad|ipod/)||a.match(/blackberry/)||a.match(/windows phone/)||a.match(/iemobile/))}function Ar(a){a=a||h.window;try{a.close()}catch(e){}}function Rr(a,b,e){var t=Math.floor(1e9*Math.random()).toString();b=b||500,e=e||600;var n=(window.screen.availHeight-e)/2,r=(window.screen.availWidth-b)/2;for(g in b={width:b,height:e,top:0<n?n:0,left:0<r?r:0,location:!0,resizable:!0,statusbar:!0,toolbar:!1},e=jr().toLowerCase(),t&&(b.target=t,ge(e,"crios/")&&(b.target="_blank")),Br(jr())==Pr&&(a=a||"http://localhost",b.scrollbars=!0),e=a||"",(a=b)||(a={}),t=window,b=e instanceof Be?e:$e(void 0!==e.href?e.href:String(e))||Ke,e=a.target||e.target,n=[],a)switch(g){case"width":case"height":case"top":case"left":n.push(g+"="+a[g]);break;case"target":case"noopener":case"noreferrer":break;default:n.push(g+"="+(a[g]?1:0))}var g=n.join(",");if((_e("iPhone")&&!_e("iPod")&&!_e("iPad")||_e("iPad")||_e("iPod"))&&t.navigator&&t.navigator.standalone&&e&&"_self"!=e?(Te(g=St(document,"A"),"HTMLAnchorElement"),b=b instanceof Be?b:ze(b),g.href=Fe(b),g.setAttribute("target",e),a.noreferrer&&g.setAttribute("rel","noreferrer"),(a=document.createEvent("MouseEvent")).initMouseEvent("click",!0,!0,t,1),g.dispatchEvent(a),g={}):a.noreferrer?(g=Ye("",t,e,g),a=Fe(b),g&&(it&&ge(a,";")&&(a="'"+a.replace(/'/g,"%27")+"'"),g.opener=null,a='<meta name="referrer" content="no-referrer"><meta http-equiv="refresh" content="0; url='+Ze(a)+'">',a=new Ge(a=(t=Ne())?t.createHTML(a):a,null,qe),t=g.document)&&(t.write(function(a){return a instanceof Ge&&a.constructor===Ge?a.a:(H("expected object of type SafeHtml, got '"+a+"' of type "+y(a)),"type_error:SafeHtml")}(a)),t.close())):(g=Ye(b,t,e,g))&&a.noopener&&(g.opener=null),g)try{g.focus()}catch(e){}return g}var Or=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/,Ir=/^[^@]+@[^@]+$/;function kr(){var a=null;return new kt((function(b){"complete"==h.document.readyState?b():(a=function(){b()},yn(window,"load",a))})).o((function(b){throw En(window,"load",a),b}))}function Nr(a){return a=a||jr(),!("file:"!==Kr()&&"ionic:"!==Kr()||!a.toLowerCase().match(/iphone|ipad|ipod|android/))}function Lr(){var a=h.window;try{return!(!a||a==a.top)}catch(e){return!1}}function Mr(){return void 0!==h.WorkerGlobalScope&&"function"==typeof h.importScripts}function xr(){return t.a.INTERNAL.hasOwnProperty("reactNative")?"ReactNative":t.a.INTERNAL.hasOwnProperty("node")?"Node":Mr()?"Worker":"Browser"}function Dr(){var a=xr();return"ReactNative"===a||"Node"===a}var Pr="Firefox",Ur="Chrome";function Br(a){var b=a.toLowerCase();return ge(b,"opera/")||ge(b,"opr/")||ge(b,"opios/")?"Opera":ge(b,"iemobile")?"IEMobile":ge(b,"msie")||ge(b,"trident/")?"IE":ge(b,"edge/")?"Edge":ge(b,"firefox/")?Pr:ge(b,"silk/")?"Silk":ge(b,"blackberry")?"Blackberry":ge(b,"webos")?"Webos":!ge(b,"safari/")||ge(b,"chrome/")||ge(b,"crios/")||ge(b,"android")?!ge(b,"chrome/")&&!ge(b,"crios/")||ge(b,"edge/")?ge(b,"android")?"Android":(a=a.match(/([a-zA-Z\d\.]+)\/[a-zA-Z\d\.]*$/))&&2==a.length?a[1]:"Other":Ur:"Safari"}var Fr={md:"FirebaseCore-web",od:"FirebaseUI-web"};function Vr(a,b){b=b||[];var e,t=[],n={};for(e in Fr)n[Fr[e]]=!0;for(e=0;e<b.length;e++)void 0!==n[b[e]]&&(delete n[b[e]],t.push(b[e]));return t.sort(),(b=t).length||(b=["FirebaseCore-web"]),"Browser"===(t=xr())?t=Br(n=jr()):"Worker"===t&&(t=Br(n=jr())+"-"+t),t+"/JsCore/"+a+"/"+b.join(",")}function jr(){return h.navigator&&h.navigator.userAgent||""}function Hr(a,b){a=a.split("."),b=b||h;for(var e=0;e<a.length&&"object"==typeof b&&null!=b;e++)b=b[a[e]];return e!=a.length&&(b=void 0),b}function $r(){try{var a=h.localStorage,b=Zr();if(a)return a.setItem(b,"1"),a.removeItem(b),!Er()||!!h.indexedDB}catch(e){return Mr()&&!!h.indexedDB}return!1}function zr(){return(Wr()||"chrome-extension:"===Kr()||Nr())&&!Dr()&&$r()&&!Mr()}function Wr(){return"http:"===Kr()||"https:"===Kr()}function Kr(){return h.location&&h.location.protocol||null}function Gr(a){return!Tr(a=a||jr())&&Br(a)!=Pr}function qr(a){return void 0===a?null:pr(a)}function Yr(a){var e,b={};for(e in a)a.hasOwnProperty(e)&&null!==a[e]&&void 0!==a[e]&&(b[e]=a[e]);return b}function Xr(a){if(null!==a)return JSON.parse(a)}function Zr(a){return a||Math.floor(1e9*Math.random()).toString()}function Qr(a){return"Safari"!=Br(a=a||jr())&&!a.toLowerCase().match(/iphone|ipad|ipod/)}function Jr(){var a=h.___jsl;if(a&&a.H)for(var b in a.H)if(a.H[b].r=a.H[b].r||[],a.H[b].L=a.H[b].L||[],a.H[b].r=a.H[b].L.concat(),a.CP)for(var e=0;e<a.CP.length;e++)a.CP[e]=null}function ei(a,b){if(a>b)throw Error("Short delay should be less than long delay!");this.a=a,this.c=b,a=jr(),b=xr(),this.b=Tr(a)||"ReactNative"===b}function ti(){var a=h.document;return!a||void 0===a.visibilityState||"visible"==a.visibilityState}function ni(a){try{var b=new Date(parseInt(a,10));if(!isNaN(b.getTime())&&!/[^0-9]/.test(a))return b.toUTCString()}catch(e){}return null}function ri(){return!(!Hr("fireauth.oauthhelper",h)&&!Hr("fireauth.iframe",h))}ei.prototype.get=function(){var a=h.navigator;return!a||"boolean"!=typeof a.onLine||!Wr()&&"chrome-extension:"!==Kr()&&void 0===a.connection||a.onLine?this.b?this.c:this.a:Math.min(5e3,this.a)};var ii,oi={};function ai(a){oi[a]||(oi[a]=!0,"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn(a))}try{var si={};Object.defineProperty(si,"abcd",{configurable:!0,enumerable:!0,value:1}),Object.defineProperty(si,"abcd",{configurable:!0,enumerable:!0,value:2}),ii=2==si.abcd}catch(a){ii=!1}function ci(a,b,e){ii?Object.defineProperty(a,b,{configurable:!0,enumerable:!0,value:e}):a[b]=e}function di(a,b){if(b)for(var e in b)b.hasOwnProperty(e)&&ci(a,e,b[e])}function ui(a){var b={};return di(b,a),b}function hi(a){var b=a;if("object"==typeof a&&null!=a)for(var e in b="length"in a?[]:{},a)ci(b,e,hi(a[e]));return b}function fi(a){var b=a&&(a[bi]?"phone":null);if(!(b&&a&&a[vi]))throw new M("internal-error","Internal assert: invalid MultiFactorInfo object");ci(this,"uid",a[vi]),ci(this,"displayName",a[gi]||null);var e=null;a[mi]&&(e=new Date(a[mi]).toUTCString()),ci(this,"enrollmentTime",e),ci(this,"factorId",b)}function pi(a){try{var b=new _i(a)}catch(e){b=null}return b}fi.prototype.w=function(){return{uid:this.uid,displayName:this.displayName,factorId:this.factorId,enrollmentTime:this.enrollmentTime}};var gi="displayName",mi="enrolledAt",vi="mfaEnrollmentId",bi="phoneInfo";function _i(a){fi.call(this,a),ci(this,"phoneNumber",a[bi])}function yi(a){var b={},e=a[Si],t=a[Ai],n=a[Ri];if(a=pi(a[Ti]),!n||n!=Ci&&n!=wi&&!e||n==wi&&!t||n==Ei&&!a)throw Error("Invalid checkActionCode response!");n==wi?(b[Ii]=e||null,b[Ni]=e||null,b[Oi]=t):(b[Ii]=t||null,b[Ni]=t||null,b[Oi]=e||null),b[ki]=a||null,ci(this,Mi,n),ci(this,Li,hi(b))}N(_i,fi),_i.prototype.w=function(){var a=_i.bb.w.call(this);return a.phoneNumber=this.phoneNumber,a};var Ei="REVERT_SECOND_FACTOR_ADDITION",Ci="EMAIL_SIGNIN",wi="VERIFY_AND_CHANGE_EMAIL",Si="email",Ti="mfaInfo",Ai="newEmail",Ri="requestType",Oi="email",Ii="fromEmail",ki="multiFactorInfo",Ni="previousEmail",Li="data",Mi="operation";function xi(a){var b=Gn(a=qn(a),Di)||null,e=Gn(a,Pi)||null,t=Gn(a,Fi)||null;if(t=t&&ji[t]||null,!b||!e||!t)throw new M("argument-error",Di+", "+Pi+"and "+Fi+" are required in a valid action code URL.");di(this,{apiKey:b,operation:t,code:e,continueUrl:Gn(a,Ui)||null,languageCode:Gn(a,Bi)||null,tenantId:Gn(a,Vi)||null})}var Di="apiKey",Pi="oobCode",Ui="continueUrl",Bi="languageCode",Fi="mode",Vi="tenantId",ji={recoverEmail:"RECOVER_EMAIL",resetPassword:"PASSWORD_RESET",revertSecondFactorAddition:Ei,signIn:Ci,verifyAndChangeEmail:wi,verifyEmail:"VERIFY_EMAIL"};function Hi(a){try{return new xi(a)}catch(e){return null}}function $i(a){var b=a[qi];if(void 0===b)throw new M("missing-continue-uri");if("string"!=typeof b||"string"==typeof b&&!b.length)throw new M("invalid-continue-uri");this.h=b,this.b=this.a=null,this.g=!1;var e=a[zi];if(e&&"object"==typeof e){b=e[Zi];var t=e[Yi];if(e=e[Xi],"string"==typeof b&&b.length){if(this.a=b,void 0!==t&&"boolean"!=typeof t)throw new M("argument-error",Yi+" property must be a boolean when specified.");if(this.g=!!t,void 0!==e&&("string"!=typeof e||"string"==typeof e&&!e.length))throw new M("argument-error",Xi+" property must be a non empty string when specified.");this.b=e||null}else{if(void 0!==b)throw new M("argument-error",Zi+" property must be a non empty string when specified.");if(void 0!==t||void 0!==e)throw new M("missing-android-pkg-name")}}else if(void 0!==e)throw new M("argument-error",zi+" property must be a non null object when specified.");if(this.f=null,(b=a[Gi])&&"object"==typeof b){if("string"==typeof(b=b[Qi])&&b.length)this.f=b;else if(void 0!==b)throw new M("argument-error",Qi+" property must be a non empty string when specified.")}else if(void 0!==b)throw new M("argument-error",Gi+" property must be a non null object when specified.");if(void 0!==(b=a[Ki])&&"boolean"!=typeof b)throw new M("argument-error",Ki+" property must be a boolean when specified.");if(this.c=!!b,void 0!==(a=a[Wi])&&("string"!=typeof a||"string"==typeof a&&!a.length))throw new M("argument-error",Wi+" property must be a non empty string when specified.");this.i=a||null}var zi="android",Wi="dynamicLinkDomain",Ki="handleCodeInApp",Gi="iOS",qi="url",Yi="installApp",Xi="minimumVersion",Zi="packageName",Qi="bundleId";function Ji(a){var b={};for(var e in b.continueUrl=a.h,b.canHandleCodeInApp=a.c,(b.androidPackageName=a.a)&&(b.androidMinimumVersion=a.b,b.androidInstallApp=a.g),b.iOSBundleId=a.f,b.dynamicLinkDomain=a.i,b)null===b[e]&&delete b[e];return b}var eo=null;function to(a){var b=[];return function(a,b){function e(e){for(;t<a.length;){var p=a.charAt(t++),n=eo[p];if(null!=n)return n;if(!/^[\s\xa0]*$/.test(p))throw Error("Unknown base64 encoding at char: "+p)}return e}!function(){if(!eo){eo={};for(var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),b=["+/=","+/","-_=","-_.","-_"],e=0;5>e;e++)for(var t=a.concat(b[e].split("")),n=0;n<t.length;n++){var r=t[n];void 0===eo[r]&&(eo[r]=n)}}}();for(var t=0;;){var n=e(-1),r=e(0),g=e(64),o=e(64);if(64===o&&-1===n)break;b(n<<2|r>>4),64!=g&&(b(r<<4&240|g>>2),64!=o&&b(g<<6&192|o))}}(a,(function(e){b.push(e)})),b}function no(a){var b=io(a);if(!(b&&b.sub&&b.iss&&b.aud&&b.exp))throw Error("Invalid JWT");this.h=a,this.a=b.exp,this.i=b.sub,a=Date.now()/1e3,this.g=b.iat||(a>this.a?this.a:a),this.b=b.provider_id||b.firebase&&b.firebase.sign_in_provider||null,this.f=b.firebase&&b.firebase.tenant||null,this.c=!!b.is_anonymous||"anonymous"==this.b}function ro(a){try{return new no(a)}catch(e){return null}}function io(a){if(!a)return null;if(3!=(a=a.split(".")).length)return null;for(var b=(4-(a=a[1]).length%4)%4,e=0;e<b;e++)a+=".";try{var t=to(a);for(a=[],e=b=0;b<t.length;){var n=t[b++];if(128>n)a[e++]=String.fromCharCode(n);else if(191<n&&224>n){var r=t[b++];a[e++]=String.fromCharCode((31&n)<<6|63&r)}else if(239<n&&365>n){r=t[b++];var g=t[b++],o=((7&n)<<18|(63&r)<<12|(63&g)<<6|63&t[b++])-65536;a[e++]=String.fromCharCode(55296+(o>>10)),a[e++]=String.fromCharCode(56320+(1023&o))}else r=t[b++],g=t[b++],a[e++]=String.fromCharCode((15&n)<<12|(63&r)<<6|63&g)}return JSON.parse(a.join(""))}catch(e){}return null}no.prototype.T=function(){return this.f},no.prototype.l=function(){return this.c},no.prototype.toString=function(){return this.h};var oo="oauth_consumer_key oauth_nonce oauth_signature oauth_signature_method oauth_timestamp oauth_token oauth_version".split(" "),ao=["client_id","response_type","scope","redirect_uri","state"],so={nd:{Ja:"locale",va:700,ua:600,fa:"facebook.com",Ya:ao},pd:{Ja:null,va:500,ua:750,fa:"github.com",Ya:ao},qd:{Ja:"hl",va:515,ua:680,fa:"google.com",Ya:ao},wd:{Ja:"lang",va:485,ua:705,fa:"twitter.com",Ya:oo},kd:{Ja:"locale",va:640,ua:600,fa:"apple.com",Ya:[]}};function co(a){for(var b in so)if(so[b].fa==a)return so[b];return null}function lo(a){var b={};b["facebook.com"]=go,b["google.com"]=vo,b["github.com"]=mo,b["twitter.com"]=bo;var e=a&&a[ho];try{if(e)return b[e]?new b[e](a):new po(a);if(void 0!==a[uo])return new fo(a)}catch(e){}return null}var uo="idToken",ho="providerId";function fo(a){var b=a[ho];if(!b&&a[uo]){var e=ro(a[uo]);e&&e.b&&(b=e.b)}if(!b)throw Error("Invalid additional user info!");"anonymous"!=b&&"custom"!=b||(b=null),e=!1,void 0!==a.isNewUser?e=!!a.isNewUser:"identitytoolkit#SignupNewUserResponse"===a.kind&&(e=!0),ci(this,"providerId",b),ci(this,"isNewUser",e)}function po(a){fo.call(this,a),ci(this,"profile",hi((a=Xr(a.rawUserInfo||"{}"))||{}))}function go(a){if(po.call(this,a),"facebook.com"!=this.providerId)throw Error("Invalid provider ID!")}function mo(a){if(po.call(this,a),"github.com"!=this.providerId)throw Error("Invalid provider ID!");ci(this,"username",this.profile&&this.profile.login||null)}function vo(a){if(po.call(this,a),"google.com"!=this.providerId)throw Error("Invalid provider ID!")}function bo(a){if(po.call(this,a),"twitter.com"!=this.providerId)throw Error("Invalid provider ID!");ci(this,"username",a.screenName||null)}function _o(a){var b=qn(a),e=Gn(b,"link"),t=Gn(qn(e),"link");return b=Gn(b,"deep_link_id"),Gn(qn(b),"link")||b||t||e||a}function yo(a,b){if(!a&&!b)throw new M("internal-error","Internal assert: no raw session string available");if(a&&b)throw new M("internal-error","Internal assert: unable to determine the session type");this.a=a||null,this.b=b||null,this.type=this.a?Eo:Co}N(po,fo),N(go,po),N(mo,po),N(vo,po),N(bo,po);var Eo="enroll",Co="signin";function wo(){}function So(a,b){return a.then((function(e){if(e[ds]){var t=ro(e[ds]);if(!t||b!=t.i)throw new M("user-mismatch");return e}throw new M("user-mismatch")})).o((function(e){throw e&&e.code&&e.code==P+"user-not-found"?new M("user-mismatch"):e}))}function To(a,b){if(!b)throw new M("internal-error","failed to construct a credential");this.a=b,ci(this,"providerId",a),ci(this,"signInMethod",a)}function Ao(a){return{pendingToken:a.a,requestUri:"http://localhost"}}function Ro(a){if(a&&a.providerId&&a.signInMethod&&0==a.providerId.indexOf("saml.")&&a.pendingToken)try{return new To(a.providerId,a.pendingToken)}catch(e){}return null}function Oo(a,b,e){if(this.a=null,b.idToken||b.accessToken)b.idToken&&ci(this,"idToken",b.idToken),b.accessToken&&ci(this,"accessToken",b.accessToken),b.nonce&&!b.pendingToken&&ci(this,"nonce",b.nonce),b.pendingToken&&(this.a=b.pendingToken);else{if(!b.oauthToken||!b.oauthTokenSecret)throw new M("internal-error","failed to construct a credential");ci(this,"accessToken",b.oauthToken),ci(this,"secret",b.oauthTokenSecret)}ci(this,"providerId",a),ci(this,"signInMethod",e)}function Io(a){var b={};return a.idToken&&(b.id_token=a.idToken),a.accessToken&&(b.access_token=a.accessToken),a.secret&&(b.oauth_token_secret=a.secret),b.providerId=a.providerId,a.nonce&&!a.a&&(b.nonce=a.nonce),b={postBody:sr(b).toString(),requestUri:"http://localhost"},a.a&&(delete b.postBody,b.pendingToken=a.a),b}function ko(a){if(a&&a.providerId&&a.signInMethod){var b={idToken:a.oauthIdToken,accessToken:a.oauthTokenSecret?null:a.oauthAccessToken,oauthTokenSecret:a.oauthTokenSecret,oauthToken:a.oauthTokenSecret&&a.oauthAccessToken,nonce:a.nonce,pendingToken:a.pendingToken};try{return new Oo(a.providerId,b,a.signInMethod)}catch(e){}}return null}function No(a,b){this.Qc=b||[],di(this,{providerId:a,isOAuthProvider:!0}),this.Jb={},this.qb=(co(a)||{}).Ja||null,this.pb=null}function Lo(a){if("string"!=typeof a||0!=a.indexOf("saml."))throw new M("argument-error",'SAML provider IDs must be prefixed with "saml."');No.call(this,a,[])}function Mo(a){No.call(this,a,ao),this.a=[]}function xo(){Mo.call(this,"facebook.com")}function Do(a){if(!a)throw new M("argument-error","credential failed: expected 1 argument (the OAuth access token).");var b=a;return w(a)&&(b=a.accessToken),(new xo).credential({accessToken:b})}function Po(){Mo.call(this,"github.com")}function Uo(a){if(!a)throw new M("argument-error","credential failed: expected 1 argument (the OAuth access token).");var b=a;return w(a)&&(b=a.accessToken),(new Po).credential({accessToken:b})}function Bo(){Mo.call(this,"google.com"),this.Ca("profile")}function Fo(a,b){var e=a;return w(a)&&(e=a.idToken,b=a.accessToken),(new Bo).credential({idToken:e,accessToken:b})}function Vo(){No.call(this,"twitter.com",oo)}function jo(a,b){var e=a;if(w(e)||(e={oauthToken:a,oauthTokenSecret:b}),!e.oauthToken||!e.oauthTokenSecret)throw new M("argument-error","credential failed: expected 2 arguments (the OAuth access token and secret).");return new Oo("twitter.com",e,"twitter.com")}function Ho(a,b,e){this.a=a,this.f=b,ci(this,"providerId","password"),ci(this,"signInMethod",e===zo.EMAIL_LINK_SIGN_IN_METHOD?zo.EMAIL_LINK_SIGN_IN_METHOD:zo.EMAIL_PASSWORD_SIGN_IN_METHOD)}function $o(a){return a&&a.email&&a.password?new Ho(a.email,a.password,a.signInMethod):null}function zo(){di(this,{providerId:"password",isOAuthProvider:!1})}function Wo(a,b){if(!(b=Ko(b)))throw new M("argument-error","Invalid email link!");return new Ho(a,b.code,zo.EMAIL_LINK_SIGN_IN_METHOD)}function Ko(a){return(a=Hi(a=_o(a)))&&a.operation===Ci?a:null}function Go(a){if(!(a.fb&&a.eb||a.La&&a.ea))throw new M("internal-error");this.a=a,ci(this,"providerId","phone"),this.fa="phone",ci(this,"signInMethod","phone")}function qo(a){if(a&&"phone"===a.providerId&&(a.verificationId&&a.verificationCode||a.temporaryProof&&a.phoneNumber)){var b={};return Z(["verificationId","verificationCode","temporaryProof","phoneNumber"],(function(e){a[e]&&(b[e]=a[e])})),new Go(b)}return null}function Yo(a){return a.a.La&&a.a.ea?{temporaryProof:a.a.La,phoneNumber:a.a.ea}:{sessionInfo:a.a.fb,code:a.a.eb}}function Xo(a){try{this.a=a||t.a.auth()}catch(e){throw new M("argument-error","Either an instance of firebase.auth.Auth must be passed as an argument to the firebase.auth.PhoneAuthProvider constructor, or the default firebase App instance must be initialized via firebase.initializeApp().")}di(this,{providerId:"phone",isOAuthProvider:!1})}function Zo(a,b){if(!a)throw new M("missing-verification-id");if(!b)throw new M("missing-verification-code");return new Go({fb:a,eb:b})}function Qo(a){if(a.temporaryProof&&a.phoneNumber)return new Go({La:a.temporaryProof,ea:a.phoneNumber});var b=a&&a.providerId;if(!b||"password"===b)return null;var e=a&&a.oauthAccessToken,t=a&&a.oauthTokenSecret,n=a&&a.nonce,r=a&&a.oauthIdToken,g=a&&a.pendingToken;try{switch(b){case"google.com":return Fo(r,e);case"facebook.com":return Do(e);case"github.com":return Uo(e);case"twitter.com":return jo(e,t);default:return e||t||r||g?g?0==b.indexOf("saml.")?new To(b,g):new Oo(b,{pendingToken:g,idToken:a.oauthIdToken,accessToken:a.oauthAccessToken},b):new Mo(b).credential({idToken:r,accessToken:e,rawNonce:n}):null}}catch(e){return null}}function Jo(a){if(!a.isOAuthProvider)throw new M("invalid-oauth-provider")}function ea(a,b,e,t,n,r,g){if(this.c=a,this.b=b||null,this.g=e||null,this.f=t||null,this.i=r||null,this.h=g||null,this.a=n||null,!this.g&&!this.a)throw new M("invalid-auth-event");if(this.g&&this.a)throw new M("invalid-auth-event");if(this.g&&!this.f)throw new M("invalid-auth-event")}function th(a){return(a=a||{}).type?new ea(a.type,a.eventId,a.urlResponse,a.sessionId,a.error&&x(a.error),a.postBody,a.tenantId):null}function ta(){this.b=null,this.a=[]}yo.prototype.Ha=function(){return this.a?Ut(this.a):Ut(this.b)},yo.prototype.w=function(){return this.type==Eo?{multiFactorSession:{idToken:this.a}}:{multiFactorSession:{pendingCredential:this.b}}},wo.prototype.ka=function(){},wo.prototype.b=function(){},wo.prototype.c=function(){},wo.prototype.w=function(){},To.prototype.ka=function(a){return Ls(a,Ao(this))},To.prototype.b=function(a,b){var e=Ao(this);return e.idToken=b,Ms(a,e)},To.prototype.c=function(a,b){return So(xs(a,Ao(this)),b)},To.prototype.w=function(){return{providerId:this.providerId,signInMethod:this.signInMethod,pendingToken:this.a}},Oo.prototype.ka=function(a){return Ls(a,Io(this))},Oo.prototype.b=function(a,b){var e=Io(this);return e.idToken=b,Ms(a,e)},Oo.prototype.c=function(a,b){return So(xs(a,Io(this)),b)},Oo.prototype.w=function(){var a={providerId:this.providerId,signInMethod:this.signInMethod};return this.idToken&&(a.oauthIdToken=this.idToken),this.accessToken&&(a.oauthAccessToken=this.accessToken),this.secret&&(a.oauthTokenSecret=this.secret),this.nonce&&(a.nonce=this.nonce),this.a&&(a.pendingToken=this.a),a},No.prototype.Ka=function(a){return this.Jb=Ce(a),this},N(Lo,No),N(Mo,No),Mo.prototype.Ca=function(a){return te(this.a,a)||this.a.push(a),this},Mo.prototype.Rb=function(){return oe(this.a)},Mo.prototype.credential=function(a,b){var e;if(!(e=w(a)?{idToken:a.idToken||null,accessToken:a.accessToken||null,nonce:a.rawNonce||null}:{idToken:a||null,accessToken:b||null}).idToken&&!e.accessToken)throw new M("argument-error","credential failed: must provide the ID token and/or the access token.");return new Oo(this.providerId,e,this.providerId)},N(xo,Mo),ci(xo,"PROVIDER_ID","facebook.com"),ci(xo,"FACEBOOK_SIGN_IN_METHOD","facebook.com"),N(Po,Mo),ci(Po,"PROVIDER_ID","github.com"),ci(Po,"GITHUB_SIGN_IN_METHOD","github.com"),N(Bo,Mo),ci(Bo,"PROVIDER_ID","google.com"),ci(Bo,"GOOGLE_SIGN_IN_METHOD","google.com"),N(Vo,No),ci(Vo,"PROVIDER_ID","twitter.com"),ci(Vo,"TWITTER_SIGN_IN_METHOD","twitter.com"),Ho.prototype.ka=function(a){return this.signInMethod==zo.EMAIL_LINK_SIGN_IN_METHOD?gc(a,Hs,{email:this.a,oobCode:this.f}):gc(a,dc,{email:this.a,password:this.f})},Ho.prototype.b=function(a,b){return this.signInMethod==zo.EMAIL_LINK_SIGN_IN_METHOD?gc(a,$s,{idToken:b,email:this.a,oobCode:this.f}):gc(a,nc,{idToken:b,email:this.a,password:this.f})},Ho.prototype.c=function(a,b){return So(this.ka(a),b)},Ho.prototype.w=function(){return{email:this.a,password:this.f,signInMethod:this.signInMethod}},di(zo,{PROVIDER_ID:"password"}),di(zo,{EMAIL_LINK_SIGN_IN_METHOD:"emailLink"}),di(zo,{EMAIL_PASSWORD_SIGN_IN_METHOD:"password"}),Go.prototype.ka=function(a){return a.gb(Yo(this))},Go.prototype.b=function(a,b){var e=Yo(this);return e.idToken=b,gc(a,hc,e)},Go.prototype.c=function(a,b){var e=Yo(this);return e.operation="REAUTH",So(a=gc(a,fc,e),b)},Go.prototype.w=function(){var a={providerId:"phone"};return this.a.fb&&(a.verificationId=this.a.fb),this.a.eb&&(a.verificationCode=this.a.eb),this.a.La&&(a.temporaryProof=this.a.La),this.a.ea&&(a.phoneNumber=this.a.ea),a},Xo.prototype.gb=function(a,b){var e=this.a.a;return Ut(b.verify()).then((function(t){if("string"!=typeof t)throw new M("argument-error","An implementation of firebase.auth.ApplicationVerifier.prototype.verify() must return a firebase.Promise that resolves with a string.");switch(b.type){case"recaptcha":var n=w(a)?a.session:null,r=w(a)?a.phoneNumber:a;return(n&&n.type==Eo?n.Ha().then((function(n){return function(a,b){return gc(a,ic,b).then((function(e){return e.phoneSessionInfo.sessionInfo}))}(e,{idToken:n,phoneEnrollmentInfo:{phoneNumber:r,recaptchaToken:t}})})):n&&n.type==Co?n.Ha().then((function(n){return function(a,b){return gc(a,oc,b).then((function(e){return e.phoneResponseInfo.sessionInfo}))}(e,{mfaPendingCredential:n,mfaEnrollmentId:a.multiFactorHint&&a.multiFactorHint.uid||a.multiFactorUid,phoneSignInInfo:{recaptchaToken:t}})})):function(a,b){return gc(a,ec,b)}(e,{phoneNumber:r,recaptchaToken:t})).then((function(e){return"function"==typeof b.reset&&b.reset(),e}),(function(e){throw"function"==typeof b.reset&&b.reset(),e}));default:throw new M("argument-error",'Only firebase.auth.ApplicationVerifiers with type="recaptcha" are currently supported.')}}))},di(Xo,{PROVIDER_ID:"phone"}),di(Xo,{PHONE_SIGN_IN_METHOD:"phone"}),ea.prototype.getUid=function(){var a=[];return a.push(this.c),this.b&&a.push(this.b),this.f&&a.push(this.f),this.h&&a.push(this.h),a.join("-")},ea.prototype.T=function(){return this.h},ea.prototype.w=function(){return{type:this.c,eventId:this.b,urlResponse:this.g,sessionId:this.f,postBody:this.i,tenantId:this.h,error:this.a&&this.a.w()}};var na,ra=null;function ia(a){var b="unauthorized-domain",e=void 0,t=qn(a);a=t.a,"chrome-extension"==(t=t.c)?e=Xe("This chrome extension ID (chrome-extension://%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",a):"http"==t||"https"==t?e=Xe("This domain (%s) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab.",a):b="operation-not-supported-in-this-environment",M.call(this,b,e)}function oa(a,b,e){M.call(this,a,e),(a=b||{}).Kb&&ci(this,"email",a.Kb),a.ea&&ci(this,"phoneNumber",a.ea),a.credential&&ci(this,"credential",a.credential),a.$b&&ci(this,"tenantId",a.$b)}function aa(a){if(a.code){var b=a.code||"";0==b.indexOf(P)&&(b=b.substring(P.length));var e={credential:Qo(a),$b:a.tenantId};if(a.email)e.Kb=a.email;else if(a.phoneNumber)e.ea=a.phoneNumber;else if(!e.credential)return new M(b,a.message||void 0);return new oa(b,e,a.message)}return null}function sa(){}function ca(a){return a.c||(a.c=a.b())}function la(){}function da(a){if(!a.f&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e=0;e<b.length;e++){var t=b[e];try{return new ActiveXObject(t),a.f=t}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed")}return a.f}function ua(){}function ha(){this.a=new XDomainRequest,this.readyState=0,this.onreadystatechange=null,this.responseType=this.responseText=this.response="",this.status=-1,this.statusText="",this.a.onload=q(this.qc,this),this.a.onerror=q(this.Tb,this),this.a.onprogress=q(this.rc,this),this.a.ontimeout=q(this.vc,this)}function fa(a,b){a.readyState=b,a.onreadystatechange&&a.onreadystatechange()}function pa(a,b,e){this.reset(a,b,e,void 0,void 0)}N(ia,M),N(oa,M),oa.prototype.w=function(){var a={code:this.code,message:this.message};this.email&&(a.email=this.email),this.phoneNumber&&(a.phoneNumber=this.phoneNumber),this.tenantId&&(a.tenantId=this.tenantId);var b=this.credential&&this.credential.w();return b&&Se(a,b),a},oa.prototype.toJSON=function(){return this.w()},sa.prototype.c=null,N(la,sa),la.prototype.a=function(){var a=da(this);return a?new ActiveXObject(a):new XMLHttpRequest},la.prototype.b=function(){var a={};return da(this)&&(a[0]=!0,a[1]=!0),a},na=new la,N(ua,sa),ua.prototype.a=function(){var a=new XMLHttpRequest;if("withCredentials"in a)return a;if("undefined"!=typeof XDomainRequest)return new ha;throw Error("Unsupported browser")},ua.prototype.b=function(){return{}},(n=ha.prototype).open=function(a,b,e){if(null!=e&&!e)throw Error("Only async requests are supported.");this.a.open(a,b)},n.send=function(a){if(a){if("string"!=typeof a)throw Error("Only string data is supported");this.a.send(a)}else this.a.send()},n.abort=function(){this.a.abort()},n.setRequestHeader=function(){},n.getResponseHeader=function(a){return"content-type"==a.toLowerCase()?this.a.contentType:""},n.qc=function(){this.status=200,this.response=this.responseText=this.a.responseText,fa(this,4)},n.Tb=function(){this.status=500,this.response=this.responseText="",fa(this,4)},n.vc=function(){this.Tb()},n.rc=function(){this.status=200,fa(this,1)},n.getAllResponseHeaders=function(){return"content-type: "+this.a.contentType},pa.prototype.a=null;function ga(a){this.f=a,this.b=this.c=this.a=null}function ma(a,b){this.name=a,this.value=b}pa.prototype.reset=function(a,b,e,t,n){"number"==typeof n||0,t||k(),delete this.a},ma.prototype.toString=function(){return this.name};var va=new ma("SEVERE",1e3),ba=new ma("WARNING",900),_a=new ma("CONFIG",700),ya=new ma("FINE",500);function Ea(a){return a.c?a.c:a.a?Ea(a.a):(H("Root logger has no level set."),null)}ga.prototype.log=function(a,b,e){if(a.value>=Ea(this).value)for(C(b)&&(b=b()),a=new pa(a,String(b),this.f),e&&(a.a=e),e=this;e;)e=e.a};var Ca={},wa=null;function Sa(a){var b;if(wa||(wa=new ga(""),Ca[""]=wa,wa.c=_a),!(b=Ca[a])){b=new ga(a);var e=a.lastIndexOf("."),t=a.substr(e+1);(e=Sa(a.substr(0,e))).b||(e.b={}),e.b[t]=b,b.a=e,Ca[a]=b}return b}function Ta(a,b){a&&a.log(ya,b,void 0)}function Aa(a){this.f=a}function Ra(a){kn.call(this),this.u=a,this.h=void 0,this.readyState=Oa,this.status=0,this.responseType=this.responseText=this.response=this.statusText="",this.onreadystatechange=null,this.l=new Headers,this.b=null,this.s="GET",this.f="",this.a=!1,this.i=Sa("goog.net.FetchXmlHttp"),this.m=this.c=this.g=null}N(Aa,sa),Aa.prototype.a=function(){return new Ra(this.f)},Aa.prototype.b=function(a){return function(){return a}}({}),N(Ra,kn);var Oa=0;function Ia(a){a.c.read().then(a.pc.bind(a)).catch(a.Va.bind(a))}function ka(a){a.readyState=4,a.g=null,a.c=null,a.m=null,Na(a)}function Na(a){a.onreadystatechange&&a.onreadystatechange.call(a)}function La(a){kn.call(this),this.headers=new Bn,this.D=a||null,this.c=!1,this.C=this.a=null,this.h=this.P=this.l="",this.f=this.N=this.i=this.J=!1,this.g=0,this.s=null,this.m=Ma,this.u=this.S=!1}(n=Ra.prototype).open=function(a,b){if(this.readyState!=Oa)throw this.abort(),Error("Error reopening a connection");this.s=a,this.f=b,this.readyState=1,Na(this)},n.send=function(a){if(1!=this.readyState)throw this.abort(),Error("need to call open() first. ");this.a=!0;var b={headers:this.l,method:this.s,credentials:this.h,cache:void 0};a&&(b.body=a),this.u.fetch(new Request(this.f,b)).then(this.uc.bind(this),this.Va.bind(this))},n.abort=function(){this.response=this.responseText="",this.l=new Headers,this.status=0,this.c&&this.c.cancel("Request was aborted."),1<=this.readyState&&this.a&&4!=this.readyState&&(this.a=!1,ka(this)),this.readyState=Oa},n.uc=function(a){this.a&&(this.g=a,this.b||(this.status=this.g.status,this.statusText=this.g.statusText,this.b=a.headers,this.readyState=2,Na(this)),this.a&&(this.readyState=3,Na(this),this.a&&("arraybuffer"===this.responseType?a.arrayBuffer().then(this.sc.bind(this),this.Va.bind(this)):void 0!==h.ReadableStream&&"body"in a?(this.response=this.responseText="",this.c=a.body.getReader(),this.m=new TextDecoder,Ia(this)):a.text().then(this.tc.bind(this),this.Va.bind(this)))))},n.pc=function(a){if(this.a){var b=this.m.decode(a.value?a.value:new Uint8Array(0),{stream:!a.done});b&&(this.response=this.responseText+=b),a.done?ka(this):Na(this),3==this.readyState&&Ia(this)}},n.tc=function(a){this.a&&(this.response=this.responseText=a,ka(this))},n.sc=function(a){this.a&&(this.response=a,ka(this))},n.Va=function(a){var b=this.i;b&&b.log(ba,"Failed to fetch url "+this.f,a instanceof Error?a:Error(a)),this.a&&ka(this)},n.setRequestHeader=function(a,b){this.l.append(a,b)},n.getResponseHeader=function(a){return this.b?this.b.get(a.toLowerCase())||"":((a=this.i)&&a.log(ba,"Attempting to get response header but no headers have been received for url: "+this.f,void 0),"")},n.getAllResponseHeaders=function(){if(!this.b){var a=this.i;return a&&a.log(ba,"Attempting to get all response headers but no headers have been received for url: "+this.f,void 0),""}a=[];for(var b=this.b.entries(),e=b.next();!e.done;)e=e.value,a.push(e[0]+": "+e[1]),e=b.next();return a.join("\r\n")},Object.defineProperty(Ra.prototype,"withCredentials",{get:function(){return"include"===this.h},set:function(a){this.h=a?"include":"same-origin"}}),N(La,kn);var Ma="";La.prototype.b=Sa("goog.net.XhrIo");var xa=/^https?$/i,Da=["POST","PUT"];function Pa(a,b,e,t,n){if(a.a)throw Error("[goog.net.XhrIo] Object is active with another request="+a.l+"; newUri="+b);e=e?e.toUpperCase():"GET",a.l=b,a.h="",a.P=e,a.J=!1,a.c=!0,a.a=a.D?a.D.a():na.a(),a.C=a.D?ca(a.D):ca(na),a.a.onreadystatechange=q(a.Wb,a);try{Ta(a.b,za(a,"Opening Xhr")),a.N=!0,a.a.open(e,String(b),!0),a.N=!1}catch(e){return Ta(a.b,za(a,"Error opening Xhr: "+e.message)),void Ba(a,e)}b=t||"";var r=new Bn(a.headers);n&&function(a,b){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,void 0);else if(E(a)||"string"==typeof a)Z(a,b,void 0);else for(var e=Un(a),t=Pn(a),n=t.length,r=0;r<n;r++)b.call(void 0,t[r],e&&e[r],a)}(n,(function(g,e){r.set(e,g)})),n=function(a){e:{for(var b=Ua,e=a.length,t="string"==typeof a?a.split(""):a,n=0;n<e;n++)if(n in t&&b.call(void 0,t[n],n,a)){b=n;break e}b=-1}return 0>b?null:"string"==typeof a?a.charAt(b):a[b]}(r.Y()),t=h.FormData&&b instanceof h.FormData,!te(Da,e)||n||t||r.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8"),r.forEach((function(g,e){this.a.setRequestHeader(e,g)}),a),a.m&&(a.a.responseType=a.m),"withCredentials"in a.a&&a.a.withCredentials!==a.S&&(a.a.withCredentials=a.S);try{ja(a),0<a.g&&(a.u=function(a){return tt&&pt(9)&&"number"==typeof a.timeout&&void 0!==a.ontimeout}(a.a),Ta(a.b,za(a,"Will abort after "+a.g+"ms if incomplete, xhr2 "+a.u)),a.u?(a.a.timeout=a.g,a.a.ontimeout=q(a.Ma,a)):a.s=xn(a.Ma,a.g,a)),Ta(a.b,za(a,"Sending request")),a.i=!0,a.a.send(b),a.i=!1}catch(e){Ta(a.b,za(a,"Send error: "+e.message)),Ba(a,e)}}function Ua(a){return"content-type"==a.toLowerCase()}function Ba(a,b){a.c=!1,a.a&&(a.f=!0,a.a.abort(),a.f=!1),a.h=b,Fa(a),Va(a)}function Fa(a){a.J||(a.J=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))}function li(a){if(a.c&&void 0!==d)if(a.C[1]&&4==Ha(a)&&2==$a(a))Ta(a.b,za(a,"Local request error detected and ignored"));else if(a.i&&4==Ha(a))xn(a.Wb,0,a);else if(a.dispatchEvent("readystatechange"),4==Ha(a)){Ta(a.b,za(a,"Request complete")),a.c=!1;try{var e,b=$a(a);e:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var t=!0;break e;default:t=!1}if(!(e=t)){var n;if(n=0===b){var r=String(a.l).match(jn)[1]||null;if(!r&&h.self&&h.self.location){var g=h.self.location.protocol;r=g.substr(0,g.length-1)}n=!xa.test(r?r.toLowerCase():"")}e=n}if(e)a.dispatchEvent("complete"),a.dispatchEvent("success");else{try{var o=2<Ha(a)?a.a.statusText:""}catch(e){Ta(a.b,"Can not get status: "+e.message),o=""}a.h=o+" ["+$a(a)+"]",Fa(a)}}finally{Va(a)}}}function Va(a,b){if(a.a){ja(a);var e=a.a,t=a.C[0]?_:null;a.a=null,a.C=null,b||a.dispatchEvent("ready");try{e.onreadystatechange=t}catch(e){(a=a.b)&&a.log(va,"Problem encountered resetting onreadystatechange: "+e.message,void 0)}}}function ja(a){a.a&&a.u&&(a.a.ontimeout=null),a.s&&(h.clearTimeout(a.s),a.s=null)}function Ha(a){return a.a?a.a.readyState:0}function $a(a){try{return 2<Ha(a)?a.a.status:-1}catch(e){return-1}}function za(a,b){return b+" ["+a.P+" "+a.l+" "+$a(a)+"]"}function Wa(a){var b=ns;this.g=[],this.u=b,this.s=a||null,this.f=this.a=!1,this.c=void 0,this.v=this.C=this.i=!1,this.h=0,this.b=null,this.l=0}function Ka(a,b,e){a.a=!0,a.c=e,a.f=!b,Xa(a)}function Ga(a){if(a.a){if(!a.v)throw new Za(a);a.v=!1}}function qa(a,b,e,t){a.g.push([b,e,t]),a.a&&Xa(a)}function Ya(a){return ee(a.g,(function(b){return C(b[1])}))}function Xa(a){if(a.h&&a.a&&Ya(a)){var b=a.h,e=es[b];e&&(h.clearTimeout(e.a),delete es[b]),a.h=0}a.b&&(a.b.l--,delete a.b),b=a.c;for(var t=e=!1;a.g.length&&!a.i;){var n=a.g.shift(),r=n[0],g=n[1];if(n=n[2],r=a.f?g:r)try{var o=r.call(n||a.s,b);void 0!==o&&(a.f=a.f&&(o==b||o instanceof Error),a.c=b=o),(V(b)||"function"==typeof h.Promise&&b instanceof h.Promise)&&(t=!0,a.i=!0)}catch(t){b=t,a.f=!0,Ya(a)||(e=!0)}}a.c=b,t&&(o=q(a.m,a,!0),t=q(a.m,a,!1),b instanceof Wa?(qa(b,o,t),b.C=!0):b.then(o,t)),e&&(b=new Ja(b),es[b.a]=b,a.h=b.a)}function Za(){u.call(this)}function Qa(){u.call(this)}function Ja(a){this.a=h.setTimeout(q(this.c,this),0),this.b=a}(n=La.prototype).Ma=function(){void 0!==d&&this.a&&(this.h="Timed out after "+this.g+"ms, aborting",Ta(this.b,za(this,this.h)),this.dispatchEvent("timeout"),this.abort(8))},n.abort=function(){this.a&&this.c&&(Ta(this.b,za(this,"Aborting")),this.c=!1,this.f=!0,this.a.abort(),this.f=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),Va(this))},n.Da=function(){this.a&&(this.c&&(this.c=!1,this.f=!0,this.a.abort(),this.f=!1),Va(this,!0)),La.bb.Da.call(this)},n.Wb=function(){this.ya||(this.N||this.i||this.f?li(this):this.Jc())},n.Jc=function(){li(this)},n.getResponse=function(){try{if(!this.a)return null;if("response"in this.a)return this.a.response;switch(this.m){case Ma:case"text":return this.a.responseText;case"arraybuffer":if("mozResponseArrayBuffer"in this.a)return this.a.mozResponseArrayBuffer}var a=this.b;return a&&a.log(va,"Response type "+this.m+" is not supported on this browser",void 0),null}catch(e){return Ta(this.b,"Can not get response: "+e.message),null}},Wa.prototype.cancel=function(a){if(this.a)this.c instanceof Wa&&this.c.cancel();else{if(this.b){var b=this.b;delete this.b,a?b.cancel(a):(b.l--,0>=b.l&&b.cancel())}this.u?this.u.call(this.s,this):this.v=!0,this.a||(a=new Qa(this),Ga(this),Ka(this,!1,a))}},Wa.prototype.m=function(a,b){this.i=!1,Ka(this,a,b)},Wa.prototype.then=function(a,b,e){var t,n,r=new kt((function(g,e){t=g,n=e}));return qa(this,t,(function(g){g instanceof Qa?r.cancel():n(g)})),r.then(a,b,e)},Wa.prototype.$goog_Thenable=!0,N(Za,u),Za.prototype.message="Deferred has already fired",Za.prototype.name="AlreadyCalledError",N(Qa,u),Qa.prototype.message="Deferred was canceled",Qa.prototype.name="CanceledError",Ja.prototype.c=function(){throw delete es[this.a],this.b};var es={};function ts(a){var b={},e=b.document||document,t=Me(a).toString(),n=St(document,"SCRIPT"),r={Xb:n,Ma:void 0},g=new Wa(r),o=null,c=null!=b.timeout?b.timeout:5e3;return 0<c&&(o=window.setTimeout((function(){rs(n,!0);var p=new as(os,"Timeout reached for loading script "+t);Ga(g),Ka(g,!1,p)}),c),r.Ma=o),n.onload=n.onreadystatechange=function(){n.readyState&&"loaded"!=n.readyState&&"complete"!=n.readyState||(rs(n,b.xd||!1,o),Ga(g),Ka(g,!0,null))},n.onerror=function(){rs(n,!0,o);var p=new as(is,"Error while loading script "+t);Ga(g),Ka(g,!1,p)},Se(r=b.attributes||{},{type:"text/javascript",charset:"UTF-8"}),_t(n,r),function(a,b){Te(a,"HTMLScriptElement"),a.src=Me(b),(b=a.ownerDocument&&a.ownerDocument.defaultView)&&b!=h?b=v(b.document):(null===m&&(m=v(h.document)),b=m),b&&a.setAttribute("nonce",b)}(n,a),function(a){var b;return(b=(a||document).getElementsByTagName("HEAD"))&&0!=b.length?b[0]:a.documentElement}(e).appendChild(n),g}function ns(){if(this&&this.Xb){var a=this.Xb;a&&"SCRIPT"==a.tagName&&rs(a,!0,this.Ma)}}function rs(a,b,e){null!=e&&h.clearTimeout(e),a.onload=_,a.onerror=_,a.onreadystatechange=_,b&&window.setTimeout((function(){a&&a.parentNode&&a.parentNode.removeChild(a)}),0)}var is=0,os=1;function as(a,b){var e="Jsloader error (code #"+a+")";b&&(e+=": "+b),u.call(this,e),this.code=a}function ss(a){this.f=a}function cs(a,b,e){if(this.c=a,a=b||{},this.l=a.secureTokenEndpoint||"https://securetoken.googleapis.com/v1/token",this.m=a.secureTokenTimeout||us,this.g=Ce(a.secureTokenHeaders||hs),this.h=a.firebaseEndpoint||"https://www.googleapis.com/identitytoolkit/v3/relyingparty/",this.i=a.identityPlatformEndpoint||"https://identitytoolkit.googleapis.com/v2/",this.v=a.firebaseTimeout||fs,this.a=Ce(a.firebaseHeaders||ps),e&&(this.a["X-Client-Version"]=e,this.g["X-Client-Version"]=e),e="Node"==xr(),!(e=h.XMLHttpRequest||e&&t.a.INTERNAL.node&&t.a.INTERNAL.node.XMLHttpRequest)&&!Mr())throw new M("internal-error","The XMLHttpRequest compatibility library was not found.");this.f=void 0,Mr()?this.f=new Aa(self):Dr()?this.f=new ss(e):this.f=new ua,this.b=null}N(as,u),N(ss,sa),ss.prototype.a=function(){return new this.f},ss.prototype.b=function(){return{}};var ls,ds="idToken",us=new ei(3e4,6e4),hs={"Content-Type":"application/x-www-form-urlencoded"},fs=new ei(3e4,6e4),ps={"Content-Type":"application/json"};function gs(a,b){b?a.a["X-Firebase-Locale"]=b:delete a.a["X-Firebase-Locale"]}function ms(a,b){b&&(a.l=vs("https://securetoken.googleapis.com/v1/token",b),a.h=vs("https://www.googleapis.com/identitytoolkit/v3/relyingparty/",b),a.i=vs("https://identitytoolkit.googleapis.com/v2/",b))}function vs(a,b){return a=qn(a),b=qn(b.url),a.f=a.a+a.f,$n(a,b.c),a.a=b.a,zn(a,b.g),a.toString()}function bs(a,b){b?(a.a["X-Client-Version"]=b,a.g["X-Client-Version"]=b):(delete a.a["X-Client-Version"],delete a.g["X-Client-Version"])}function _s(a,b,e,t,n,r,g){(function(){var a=jr();return!((a=Br(a)!=Ur?null:(a=a.match(/\sChrome\/(\d+)/i))&&2==a.length?parseInt(a[1],10):null)&&30>a||tt&&mt&&!(9<mt))})()||Mr()?a=q(a.u,a):(ls||(ls=new kt((function(e,t){!function(a,b){if(((window.gapi||{}).client||{}).request)a();else{h[Es]=function(){((window.gapi||{}).client||{}).request?a():b(Error("CORS_UNSUPPORTED"))},function(a,b){qa(a,null,b,void 0)}(ts(xe(ys,{onload:Es})),(function(){b(Error("CORS_UNSUPPORTED"))}))}}(e,t)}))),a=q(a.s,a)),a(b,e,t,n,r,g)}cs.prototype.T=function(){return this.b},cs.prototype.u=function(a,b,e,t,n,r){if(Mr()&&(void 0===h.fetch||void 0===h.Headers||void 0===h.Request))throw new M("operation-not-supported-in-this-environment","fetch, Headers and Request native APIs or equivalent Polyfills must be available to support HTTP requests from a Worker environment.");var g=new La(this.f);if(r){g.g=Math.max(0,r);var o=setTimeout((function(){g.dispatchEvent("timeout")}),r)}Nn(g,"complete",(function(){o&&clearTimeout(o);var e=null;try{e=JSON.parse(function(a){try{return a.a?a.a.responseText:""}catch(e){return Ta(a.b,"Can not get responseText: "+e.message),""}}(this))||null}catch(t){e=null}b&&b(e)})),Ln(g,"ready",(function(){o&&clearTimeout(o),tn(this)})),Ln(g,"timeout",(function(){o&&clearTimeout(o),tn(this),b&&b(null)})),Pa(g,a,e,t,n)};var ys=new Ae(ke,"https://apis.google.com/js/client.js?onload=%{onload}"),Es="__fcb"+Math.floor(1e6*Math.random()).toString();function Cs(a,b,e,t,n,r,g){var o=qn(b+e);Kn(o,"key",a.c),g&&Kn(o,"cb",Date.now().toString());var c="GET"==t;if(c)for(var p in n)n.hasOwnProperty(p)&&Kn(o,p,n[p]);return new kt((function(e,l){_s(a,o.toString(),(function(t){t?t.error?l(vc(t,r||{})):e(t):l(new M("network-request-failed"))}),t,c?void 0:pr(Yr(n)),a.a,a.v.get())}))}function ws(a){if("string"!=typeof(a=a.email)||!Ir.test(a))throw new M("invalid-email")}function Ss(a){"email"in a&&ws(a)}function Ts(a){if(!a[ds]){if(a.mfaPendingCredential)throw new M("multi-factor-auth-required",null,Ce(a));throw new M("internal-error")}}function As(a){if(a.phoneNumber||a.temporaryProof){if(!a.phoneNumber||!a.temporaryProof)throw new M("internal-error")}else{if(!a.sessionInfo)throw new M("missing-verification-id");if(!a.code)throw new M("missing-verification-code")}}cs.prototype.s=function(a,b,e,t,n){var r=this;ls.then((function(){window.gapi.client.setApiKey(r.c);var g=window.gapi.auth.getToken();window.gapi.auth.setToken(null),window.gapi.client.request({path:a,method:e,body:t,headers:n,authType:"none",callback:function(e){window.gapi.auth.setToken(g),b&&b(e)}})})).o((function(g){b&&b({error:{message:g&&g.message||"CORS_UNSUPPORTED"}})}))},cs.prototype.Ab=function(){return gc(this,rc,{})},cs.prototype.Cb=function(a,b){return gc(this,tc,{idToken:a,email:b})},cs.prototype.Db=function(a,b){return gc(this,nc,{idToken:a,password:b})};var Rs={displayName:"DISPLAY_NAME",photoUrl:"PHOTO_URL"};function Os(a){if(!a.phoneVerificationInfo)throw new M("internal-error");if(!a.phoneVerificationInfo.sessionInfo)throw new M("missing-verification-id");if(!a.phoneVerificationInfo.code)throw new M("missing-verification-code")}function Is(a){if(!a.requestUri||!a.sessionId&&!a.postBody&&!a.pendingToken)throw new M("internal-error")}function ks(a,b){return b.oauthIdToken&&b.providerId&&0==b.providerId.indexOf("oidc.")&&!b.pendingToken&&(a.sessionId?b.nonce=a.sessionId:a.postBody&&(lr(a=new or(a.postBody),"nonce")&&(b.nonce=a.get("nonce")))),b}function Ns(a){var b=null;if(a.needConfirmation?(a.code="account-exists-with-different-credential",b=aa(a)):"FEDERATED_USER_ID_ALREADY_LINKED"==a.errorMessage?(a.code="credential-already-in-use",b=aa(a)):"EMAIL_EXISTS"==a.errorMessage?(a.code="email-already-in-use",b=aa(a)):a.errorMessage&&(b=mc(a.errorMessage)),b)throw b;Ts(a)}function Ls(a,b){return b.returnIdpCredential=!0,gc(a,ac,b)}function Ms(a,b){return b.returnIdpCredential=!0,gc(a,cc,b)}function xs(a,b){return b.returnIdpCredential=!0,b.autoCreate=!1,gc(a,sc,b)}function Ds(a){if(!a.oobCode)throw new M("invalid-action-code")}(n=cs.prototype).Eb=function(a,b){var e={idToken:a},t=[];return ye(Rs,(function(n,r){var g=b[r];null===g?t.push(n):r in b&&(e[r]=g)})),t.length&&(e.deleteAttribute=t),gc(this,tc,e)},n.wb=function(a,b){return Se(a={requestType:"PASSWORD_RESET",email:a},b),gc(this,Xs,a)},n.xb=function(a,b){return Se(a={requestType:"EMAIL_SIGNIN",email:a},b),gc(this,Gs,a)},n.vb=function(a,b){return Se(a={requestType:"VERIFY_EMAIL",idToken:a},b),gc(this,qs,a)},n.Fb=function(a,b,e){return Se(a={requestType:"VERIFY_AND_CHANGE_EMAIL",idToken:a,newEmail:b},e),gc(this,Ys,a)},n.gb=function(a){return gc(this,uc,a)},n.ob=function(a,b){return gc(this,Js,{oobCode:a,newPassword:b})},n.Sa=function(a){return gc(this,Us,{oobCode:a})},n.kb=function(a){return gc(this,Ps,{oobCode:a})};var Ps={endpoint:"setAccountInfo",A:Ds,Z:"email",B:!0},Us={endpoint:"resetPassword",A:Ds,G:function(a){var b=a.requestType;if(!b||!a.email&&"EMAIL_SIGNIN"!=b&&"VERIFY_AND_CHANGE_EMAIL"!=b)throw new M("internal-error")},B:!0},Bs={endpoint:"signupNewUser",A:function(a){if(ws(a),!a.password)throw new M("weak-password")},G:Ts,V:!0,B:!0},Fs={endpoint:"createAuthUri",B:!0},Vs={endpoint:"deleteAccount",O:["idToken"]},js={endpoint:"setAccountInfo",O:["idToken","deleteProvider"],A:function(a){if(!Array.isArray(a.deleteProvider))throw new M("internal-error")}},Hs={endpoint:"emailLinkSignin",O:["email","oobCode"],A:ws,G:Ts,V:!0,B:!0},$s={endpoint:"emailLinkSignin",O:["idToken","email","oobCode"],A:ws,G:Ts,V:!0},zs={endpoint:"accounts/mfaEnrollment:finalize",O:["idToken","phoneVerificationInfo"],A:Os,G:Ts,B:!0,Na:!0},Ws={endpoint:"accounts/mfaSignIn:finalize",O:["mfaPendingCredential","phoneVerificationInfo"],A:Os,G:Ts,B:!0,Na:!0},Ks={endpoint:"getAccountInfo"},Gs={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(a){if("EMAIL_SIGNIN"!=a.requestType)throw new M("internal-error");ws(a)},Z:"email",B:!0},qs={endpoint:"getOobConfirmationCode",O:["idToken","requestType"],A:function(a){if("VERIFY_EMAIL"!=a.requestType)throw new M("internal-error")},Z:"email",B:!0},Ys={endpoint:"getOobConfirmationCode",O:["idToken","newEmail","requestType"],A:function(a){if("VERIFY_AND_CHANGE_EMAIL"!=a.requestType)throw new M("internal-error")},Z:"email",B:!0},Xs={endpoint:"getOobConfirmationCode",O:["requestType"],A:function(a){if("PASSWORD_RESET"!=a.requestType)throw new M("internal-error");ws(a)},Z:"email",B:!0},Zs={mb:!0,endpoint:"getProjectConfig",Vb:"GET"},Qs={mb:!0,endpoint:"getRecaptchaParam",Vb:"GET",G:function(a){if(!a.recaptchaSiteKey)throw new M("internal-error")}},Js={endpoint:"resetPassword",A:Ds,Z:"email",B:!0},ec={endpoint:"sendVerificationCode",O:["phoneNumber","recaptchaToken"],Z:"sessionInfo",B:!0},tc={endpoint:"setAccountInfo",O:["idToken"],A:Ss,V:!0},nc={endpoint:"setAccountInfo",O:["idToken"],A:function(a){if(Ss(a),!a.password)throw new M("weak-password")},G:Ts,V:!0},rc={endpoint:"signupNewUser",G:Ts,V:!0,B:!0},ic={endpoint:"accounts/mfaEnrollment:start",O:["idToken","phoneEnrollmentInfo"],A:function(a){if(!a.phoneEnrollmentInfo)throw new M("internal-error");if(!a.phoneEnrollmentInfo.phoneNumber)throw new M("missing-phone-number");if(!a.phoneEnrollmentInfo.recaptchaToken)throw new M("missing-app-credential")},G:function(a){if(!a.phoneSessionInfo||!a.phoneSessionInfo.sessionInfo)throw new M("internal-error")},B:!0,Na:!0},oc={endpoint:"accounts/mfaSignIn:start",O:["mfaPendingCredential","mfaEnrollmentId","phoneSignInInfo"],A:function(a){if(!a.phoneSignInInfo||!a.phoneSignInInfo.recaptchaToken)throw new M("missing-app-credential")},G:function(a){if(!a.phoneResponseInfo||!a.phoneResponseInfo.sessionInfo)throw new M("internal-error")},B:!0,Na:!0},ac={endpoint:"verifyAssertion",A:Is,Za:ks,G:Ns,V:!0,B:!0},sc={endpoint:"verifyAssertion",A:Is,Za:ks,G:function(a){if(a.errorMessage&&"USER_NOT_FOUND"==a.errorMessage)throw new M("user-not-found");if(a.errorMessage)throw mc(a.errorMessage);Ts(a)},V:!0,B:!0},cc={endpoint:"verifyAssertion",A:function(a){if(Is(a),!a.idToken)throw new M("internal-error")},Za:ks,G:Ns,V:!0},lc={endpoint:"verifyCustomToken",A:function(a){if(!a.token)throw new M("invalid-custom-token")},G:Ts,V:!0,B:!0},dc={endpoint:"verifyPassword",A:function(a){if(ws(a),!a.password)throw new M("wrong-password")},G:Ts,V:!0,B:!0},uc={endpoint:"verifyPhoneNumber",A:As,G:Ts,B:!0},hc={endpoint:"verifyPhoneNumber",A:function(a){if(!a.idToken)throw new M("internal-error");As(a)},G:function(a){if(a.temporaryProof)throw a.code="credential-already-in-use",aa(a);Ts(a)}},fc={Ib:{USER_NOT_FOUND:"user-not-found"},endpoint:"verifyPhoneNumber",A:As,G:Ts,B:!0},pc={endpoint:"accounts/mfaEnrollment:withdraw",O:["idToken","mfaEnrollmentId"],G:function(a){if(!!a[ds]^!!a.refreshToken)throw new M("internal-error")},B:!0,Na:!0};function gc(a,b,e){if(!function(a,b){if(!b||!b.length)return!0;if(!a)return!1;for(var e=0;e<b.length;e++){var t=a[b[e]];if(null==t||""===t)return!1}return!0}(e,b.O))return Bt(new M("internal-error"));var t,n=!!b.Na,r=b.Vb||"POST";return Ut(e).then(b.A).then((function(){return b.V&&(e.returnSecureToken=!0),b.B&&a.b&&void 0===e.tenantId&&(e.tenantId=a.b),Cs(a,n?a.i:a.h,b.endpoint,r,e,b.Ib,b.mb||!1)})).then((function(g){return t=g,b.Za?b.Za(e,t):t})).then(b.G).then((function(){if(!b.Z)return t;if(!(b.Z in t))throw new M("internal-error");return t[b.Z]}))}function mc(a){return vc({error:{errors:[{message:a}],code:400,message:a}})}function vc(a,b){var e=(a.error&&a.error.errors&&a.error.errors[0]||{}).reason||"",t={keyInvalid:"invalid-api-key",ipRefererBlocked:"app-not-authorized"};if(e=t[e]?new M(t[e]):null)return e;for(var n in e=a.error&&a.error.message||"",Se(t={INVALID_CUSTOM_TOKEN:"invalid-custom-token",CREDENTIAL_MISMATCH:"custom-token-mismatch",MISSING_CUSTOM_TOKEN:"internal-error",INVALID_IDENTIFIER:"invalid-email",MISSING_CONTINUE_URI:"internal-error",INVALID_EMAIL:"invalid-email",INVALID_PASSWORD:"wrong-password",USER_DISABLED:"user-disabled",MISSING_PASSWORD:"internal-error",EMAIL_EXISTS:"email-already-in-use",PASSWORD_LOGIN_DISABLED:"operation-not-allowed",INVALID_IDP_RESPONSE:"invalid-credential",INVALID_PENDING_TOKEN:"invalid-credential",FEDERATED_USER_ID_ALREADY_LINKED:"credential-already-in-use",MISSING_OR_INVALID_NONCE:"missing-or-invalid-nonce",INVALID_MESSAGE_PAYLOAD:"invalid-message-payload",INVALID_RECIPIENT_EMAIL:"invalid-recipient-email",INVALID_SENDER:"invalid-sender",EMAIL_NOT_FOUND:"user-not-found",RESET_PASSWORD_EXCEED_LIMIT:"too-many-requests",EXPIRED_OOB_CODE:"expired-action-code",INVALID_OOB_CODE:"invalid-action-code",MISSING_OOB_CODE:"internal-error",INVALID_PROVIDER_ID:"invalid-provider-id",CREDENTIAL_TOO_OLD_LOGIN_AGAIN:"requires-recent-login",INVALID_ID_TOKEN:"invalid-user-token",TOKEN_EXPIRED:"user-token-expired",USER_NOT_FOUND:"user-token-expired",CORS_UNSUPPORTED:"cors-unsupported",DYNAMIC_LINK_NOT_ACTIVATED:"dynamic-link-not-activated",INVALID_APP_ID:"invalid-app-id",TOO_MANY_ATTEMPTS_TRY_LATER:"too-many-requests",WEAK_PASSWORD:"weak-password",OPERATION_NOT_ALLOWED:"operation-not-allowed",USER_CANCELLED:"user-cancelled",CAPTCHA_CHECK_FAILED:"captcha-check-failed",INVALID_APP_CREDENTIAL:"invalid-app-credential",INVALID_CODE:"invalid-verification-code",INVALID_PHONE_NUMBER:"invalid-phone-number",INVALID_SESSION_INFO:"invalid-verification-id",INVALID_TEMPORARY_PROOF:"invalid-credential",MISSING_APP_CREDENTIAL:"missing-app-credential",MISSING_CODE:"missing-verification-code",MISSING_PHONE_NUMBER:"missing-phone-number",MISSING_SESSION_INFO:"missing-verification-id",QUOTA_EXCEEDED:"quota-exceeded",SESSION_EXPIRED:"code-expired",REJECTED_CREDENTIAL:"rejected-credential",INVALID_CONTINUE_URI:"invalid-continue-uri",MISSING_ANDROID_PACKAGE_NAME:"missing-android-pkg-name",MISSING_IOS_BUNDLE_ID:"missing-ios-bundle-id",UNAUTHORIZED_DOMAIN:"unauthorized-continue-uri",INVALID_DYNAMIC_LINK_DOMAIN:"invalid-dynamic-link-domain",INVALID_OAUTH_CLIENT_ID:"invalid-oauth-client-id",INVALID_CERT_HASH:"invalid-cert-hash",UNSUPPORTED_TENANT_OPERATION:"unsupported-tenant-operation",INVALID_TENANT_ID:"invalid-tenant-id",TENANT_ID_MISMATCH:"tenant-id-mismatch",ADMIN_ONLY_OPERATION:"admin-restricted-operation",INVALID_MFA_PENDING_CREDENTIAL:"invalid-multi-factor-session",MFA_ENROLLMENT_NOT_FOUND:"multi-factor-info-not-found",MISSING_MFA_PENDING_CREDENTIAL:"missing-multi-factor-session",MISSING_MFA_ENROLLMENT_ID:"missing-multi-factor-info",EMAIL_CHANGE_NEEDS_VERIFICATION:"email-change-needs-verification",SECOND_FACTOR_EXISTS:"second-factor-already-in-use",SECOND_FACTOR_LIMIT_EXCEEDED:"maximum-second-factor-count-exceeded",UNSUPPORTED_FIRST_FACTOR:"unsupported-first-factor",UNVERIFIED_EMAIL:"unverified-email"},b||{}),b=(b=e.match(/^[^\s]+\s*:\s*([\s\S]*)$/))&&1<b.length?b[1]:void 0,t)if(0===e.indexOf(n))return new M(t[n],b);return!b&&a&&(b=qr(a)),new M("internal-error",b)}function bc(a){this.b=a,this.a=null,this.sb=function(a){return(Cc||(Cc=new kt((function(a,b){function e(){Jr(),Hr("gapi.load")("gapi.iframes",{callback:a,ontimeout:function(){Jr(),b(Error("Network Error"))},timeout:yc.get()})}if(Hr("gapi.iframes.Iframe"))a();else if(Hr("gapi.load"))e();else{var t="__iframefcb"+Math.floor(1e6*Math.random()).toString();h[t]=function(){Hr("gapi.load")?e():b(Error("Network Error"))},Ut(ts(t=xe(_c,{onload:t}))).o((function(){b(Error("Network Error"))}))}})).o((function(a){throw Cc=null,a})))).then((function(){return new kt((function(b,e){Hr("gapi.iframes.getContext")().open({where:document.body,url:a.b,messageHandlersFilter:Hr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"),attributes:{style:{position:"absolute",top:"-100px",width:"1px",height:"1px"}},dontclear:!0},(function(t){function n(){clearTimeout(r),b()}a.a=t,a.a.restyle({setHideOnLeave:!1});var r=setTimeout((function(){e(Error("Network Error"))}),Ec.get());t.ping(n).then(n,(function(){e(Error("Network Error"))}))}))}))}))}(this)}var _c=new Ae(ke,"https://apis.google.com/js/api.js?onload=%{onload}"),yc=new ei(3e4,6e4),Ec=new ei(5e3,15e3),Cc=null;function wc(a,b,e,t){this.l=a,this.h=b,this.i=e,this.g=t,this.f=null,this.g?a=Yn((a=qn(this.g.url)).c,a.a,a.g,"/emulator/auth/iframe"):a=Yn("https",this.l,null,"/__/auth/iframe"),this.a=a,Kn(this.a,"apiKey",this.h),Kn(this.a,"appName",this.i),this.b=null,this.c=[]}function Sc(a,b,e,t,n,r){this.u=a,this.s=b,this.c=e,this.m=t,this.v=r,this.i=this.g=this.l=null,this.a=n,this.h=this.f=null}function Tc(a){try{return t.a.app(a).auth().Ga()}catch(e){return[]}}function Ac(a,b,e,t,n,r){this.s=a,this.g=b,this.b=e,this.f=r,this.c=t||null,this.i=n||null,this.l=this.u=this.C=null,this.h=[],this.m=this.a=null}function Rc(a){var b=Cr();return function(a){return gc(a,Zs,{}).then((function(b){return b.authorizedDomains||[]}))}(a).then((function(e){e:{var t=qn(b),n=t.c;t=t.a;for(var r=0;r<e.length;r++){var g=e[r],o=t,c=n;if(0==g.indexOf("chrome-extension://")?o=qn(g).a==o&&"chrome-extension"==c:"http"!=c&&"https"!=c?o=!1:Or.test(g)?o=o==g:(g=g.split(".").join("\\."),o=new RegExp("^(.+\\."+g+"|"+g+")$","i").test(o)),o){e=!0;break e}}e=!1}if(!e)throw new ia(Cr())}))}function Oc(a){return a.m||(a.m=kr().then((function(){if(!a.u){var b=a.c,e=a.i,t=Tc(a.b),n=new wc(a.s,a.g,a.b,a.f);n.f=b,n.b=e,n.c=oe(t||[]),a.u=n.toString()}a.v=new bc(a.u),function(a){if(!a.v)throw Error("IfcHandler must be initialized!");!function(a,b){a.sb.then((function(){a.a.register("authEvent",b,Hr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}(a.v,(function(b){var e={};if(b&&b.authEvent){var t=!1;for(b=th(b.authEvent),e=0;e<a.h.length;e++)t=a.h[e](b)||t;return(e={}).status=t?"ACK":"ERROR",Ut(e)}return e.status="ERROR",Ut(e)}))}(a)}))),a.m}function Ic(a){return a.l||(a.C=a.c?Vr(a.c,Tc(a.b)):null,a.l=new cs(a.g,F(a.i),a.C),a.f&&ms(a.l,a.f)),a.l}function kc(a,b,e,t,n,r,g,o,c,p,l,d){return(a=new Sc(a,b,e,t,n,d)).l=r,a.g=g,a.i=o,a.b=Ce(c||null),a.f=p,a.zb(l).toString()}function Nc(a){if(this.a=a||t.a.INTERNAL.reactNative&&t.a.INTERNAL.reactNative.AsyncStorage,!this.a)throw new M("internal-error","The React Native compatibility library was not found.");this.type="asyncStorage"}function Lc(a){this.b=a,this.a={},this.f=q(this.c,this)}wc.prototype.toString=function(){return this.f?Kn(this.a,"v",this.f):cr(this.a.b,"v"),this.b?Kn(this.a,"eid",this.b):cr(this.a.b,"eid"),this.c.length?Kn(this.a,"fw",this.c.join(",")):cr(this.a.b,"fw"),this.a.toString()},Sc.prototype.zb=function(a){return this.h=a,this},Sc.prototype.toString=function(){if(this.v){var a=qn(this.v.url);a=Yn(a.c,a.a,a.g,"/emulator/auth/handler")}else a=Yn("https",this.u,null,"/__/auth/handler");if(Kn(a,"apiKey",this.s),Kn(a,"appName",this.c),Kn(a,"authType",this.m),this.a.isOAuthProvider){var b=this.a;try{var e=t.a.app(this.c).auth().la()}catch(t){e=null}for(var n in b.pb=e,Kn(a,"providerId",this.a.providerId),b=Yr((e=this.a).Jb))b[n]=b[n].toString();n=e.Qc,b=Ce(b);for(var r=0;r<n.length;r++){var o=n[r];o in b&&delete b[o]}e.qb&&e.pb&&!b[e.qb]&&(b[e.qb]=e.pb),Ee(b)||Kn(a,"customParameters",qr(b))}if("function"==typeof this.a.Rb&&((e=this.a.Rb()).length&&Kn(a,"scopes",e.join(","))),this.l?Kn(a,"redirectUrl",this.l):cr(a.b,"redirectUrl"),this.g?Kn(a,"eventId",this.g):cr(a.b,"eventId"),this.i?Kn(a,"v",this.i):cr(a.b,"v"),this.b)for(var g in this.b)this.b.hasOwnProperty(g)&&!Gn(a,g)&&Kn(a,g,this.b[g]);return this.h?Kn(a,"tid",this.h):cr(a.b,"tid"),this.f?Kn(a,"eid",this.f):cr(a.b,"eid"),(g=Tc(this.c)).length&&Kn(a,"fw",g.join(",")),a.toString()},(n=Ac.prototype).Pb=function(a,b,e){var t=new M("popup-closed-by-user"),n=new M("web-storage-unsupported"),r=this,g=!1;return this.ma().then((function(){(function(a){var b={type:"webStorageSupport"};return Oc(a).then((function(){return function(a,b){return a.sb.then((function(){return new kt((function(e){a.a.send(b.type,b,e,Hr("gapi.iframes.CROSS_ORIGIN_IFRAMES_FILTER"))}))}))}(a.v,b)})).then((function(e){if(e&&e.length&&void 0!==e[0].webStorageSupport)return e[0].webStorageSupport;throw Error()}))})(r).then((function(e){e||(a&&Ar(a),b(n),g=!0)}))})).o((function(){})).then((function(){if(!g)return function(a){return new kt((function(b){return function e(){Dn(2e3).then((function(){if(a&&!a.closed)return e();b()}))}()}))}(a)})).then((function(){if(!g)return Dn(e).then((function(){b(t)}))}))},n.Yb=function(){var a=jr();return!Gr(a)&&!Qr(a)},n.Ub=function(){return!1},n.Nb=function(a,b,e,t,n,r,g,o){if(!a)return Bt(new M("popup-blocked"));if(g&&!Gr())return this.ma().o((function(p){Ar(a),n(p)})),t(),Ut();this.a||(this.a=Rc(Ic(this)));var c=this;return this.a.then((function(){var p=c.ma().o((function(e){throw Ar(a),n(e),e}));return t(),p})).then((function(){(Jo(e),g)||wr(kc(c.s,c.g,c.b,b,e,null,r,c.c,void 0,c.i,o,c.f),a)})).o((function(p){throw"auth/network-request-failed"==p.code&&(c.a=null),p}))},n.Ob=function(a,b,e,t){this.a||(this.a=Rc(Ic(this)));var n=this;return this.a.then((function(){Jo(b),wr(kc(n.s,n.g,n.b,a,b,Cr(),e,n.c,void 0,n.i,t,n.f))})).o((function(e){throw"auth/network-request-failed"==e.code&&(n.a=null),e}))},n.ma=function(){var a=this;return Oc(this).then((function(){return a.v.sb})).o((function(){throw a.a=null,new M("network-request-failed")}))},n.ac=function(){return!0},n.Ea=function(a){this.h.push(a)},n.Ta=function(a){re(this.h,(function(b){return b==a}))},(n=Nc.prototype).get=function(a){return Ut(this.a.getItem(a)).then((function(b){return b&&Xr(b)}))},n.set=function(a,b){return Ut(this.a.setItem(a,qr(b)))},n.U=function(a){return Ut(this.a.removeItem(a))},n.ca=function(){},n.ia=function(){};var Mc,xc=[];function Dc(a,b,e){Ee(a.a)&&a.b.addEventListener("message",a.f),void 0===a.a[b]&&(a.a[b]=[]),a.a[b].push(e)}function Pc(a){this.a=a}function Uc(a){this.c=a,this.b=!1,this.a=[]}function Bc(a,b,e,t){var n,g,r,o,c=e||{},p=null;if(a.b)return Bt(Error("connection_unavailable"));var l=t?800:50,d="undefined"!=typeof MessageChannel?new MessageChannel:null;return new kt((function(e,t){d?(n=Math.floor(Math.random()*Math.pow(10,20)).toString(),d.port1.start(),r=setTimeout((function(){t(Error("unsupported_event"))}),l),p={messageChannel:d,onMessage:g=function(c){c.data.eventId===n&&("ack"===c.data.status?(clearTimeout(r),o=setTimeout((function(){t(Error("timeout"))}),3e3)):"done"===c.data.status?(clearTimeout(o),void 0!==c.data.response?e(c.data.response):t(Error("unknown_error"))):(clearTimeout(r),clearTimeout(o),t(Error("invalid_response"))))}},a.a.push(p),d.port1.addEventListener("message",g),a.c.postMessage({eventType:b,eventId:n,data:c},[d.port2])):t(Error("connection_unavailable"))})).then((function(e){return Fc(a,p),e})).o((function(e){throw Fc(a,p),e}))}function Fc(a,b){if(b){var e=b.messageChannel,t=b.onMessage;e&&(e.port1.removeEventListener("message",t),e.port1.close()),re(a.a,(function(e){return e==b}))}}function Vc(){if(!zc())throw new M("web-storage-unsupported");this.c={},this.a=[],this.b=0,this.m=h.indexedDB,this.type="indexedDB",this.g=this.v=this.f=this.l=null,this.s=!1,this.h=null;var a=this;Mr()&&self?(this.v=function(){var a=Mr()?self:null;if(Z(xc,(function(e){e.b==a&&(b=e)})),!b){var b=new Lc(a);xc.push(b)}return b}(),Dc(this.v,"keyChanged",(function(b,e){return Yc(a).then((function(t){return 0<t.length&&Z(a.a,(function(e){e(t)})),{keyProcessed:te(t,e.key)}}))})),Dc(this.v,"ping",(function(){return Ut(["keyChanged"])}))):function(){var a=h.navigator;return a&&a.serviceWorker?Ut().then((function(){return a.serviceWorker.ready})).then((function(b){return b.active||null})).o((function(){return null})):Ut(null)}().then((function(b){(a.h=b)&&(a.g=new Uc(new Pc(b)),Bc(a.g,"ping",null,!0).then((function(e){e[0].fulfilled&&te(e[0].value,"keyChanged")&&(a.s=!0)})).o((function(){})))}))}function jc(a){return new kt((function(b,e){var t=a.m.open("firebaseLocalStorageDb",1);t.onerror=function(t){try{t.preventDefault()}catch(e){}e(Error(t.target.error))},t.onupgradeneeded=function(t){t=t.target.result;try{t.createObjectStore("firebaseLocalStorage",{keyPath:"fbase_key"})}catch(t){e(t)}},t.onsuccess=function(t){(t=t.target.result).objectStoreNames.contains("firebaseLocalStorage")?b(t):function(a){return new kt((function(b,e){var t=a.m.deleteDatabase("firebaseLocalStorageDb");t.onsuccess=function(){b()},t.onerror=function(t){e(Error(t.target.error))}}))}(a).then((function(){return jc(a)})).then((function(e){b(e)})).o((function(t){e(t)}))}}))}function Hc(a){return a.i||(a.i=jc(a)),a.i}function $c(a,b){var e=0;return new kt((function t(n,r){Hc(a).then(b).then(n).o((function(g){if(!(3<++e))return Hc(a).then((function(e){return e.close(),a.i=void 0,t(n,r)})).o((function(e){r(e)}));r(g)}))}))}function zc(){try{return!!h.indexedDB}catch(e){return!1}}function Wc(a){return a.objectStore("firebaseLocalStorage")}function Kc(a,b){return a.transaction(["firebaseLocalStorage"],b?"readwrite":"readonly")}function Gc(a){return new kt((function(b,e){a.onsuccess=function(e){e&&e.target?b(e.target.result):b()},a.onerror=function(t){e(t.target.error)}}))}function qc(a,b){return a.g&&a.h&&function(){var a=h.navigator;return a&&a.serviceWorker&&a.serviceWorker.controller||null}()===a.h?Bc(a.g,"keyChanged",{key:b},a.s).then((function(){})).o((function(){})):Ut()}function Yc(a){return Hc(a).then((function(b){var e=Wc(Kc(b,!1));return e.getAll?Gc(e.getAll()):new kt((function(t,n){var r=[],g=e.openCursor();g.onsuccess=function(e){(e=e.target.result)?(r.push(e.value),e.continue()):t(r)},g.onerror=function(e){n(e.target.error)}}))})).then((function(b){var e={},t=[];if(0==a.b){for(t=0;t<b.length;t++)e[b[t].fbase_key]=b[t].value;t=Sr(a.c,e),a.c=e}return t}))}function Xc(a){a.l&&a.l.cancel("STOP_EVENT"),a.f&&(clearTimeout(a.f),a.f=null)}function Zc(a){var b=this,e=null;this.a=[],this.type="indexedDB",this.c=a,this.b=Ut().then((function(){if(zc()){var t=Zr(),n="__sak"+t;return Mc||(Mc=new Vc),(e=Mc).set(n,t).then((function(){return e.get(n)})).then((function(r){if(r!==t)throw Error("indexedDB not supported!");return e.U(n)})).then((function(){return e})).o((function(){return b.c}))}return b.c})).then((function(e){return b.type=e.type,e.ca((function(e){Z(b.a,(function(t){t(e)}))})),e}))}function Qc(){this.a={},this.type="inMemory"}function Jc(){if(!function(){var a="Node"==xr();if(!(a=el()||a&&t.a.INTERNAL.node&&t.a.INTERNAL.node.localStorage))return!1;try{return a.setItem("__sak","1"),a.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==xr())throw new M("internal-error","The LocalStorage compatibility library was not found.");throw new M("web-storage-unsupported")}this.a=el()||t.a.INTERNAL.node.localStorage,this.type="localStorage"}function el(){try{var a=h.localStorage,b=Zr();return a&&(a.setItem(b,"1"),a.removeItem(b)),a}catch(e){return null}}function tl(){this.type="nullStorage"}function nl(){if(!function(){var a="Node"==xr();if(!(a=rl()||a&&t.a.INTERNAL.node&&t.a.INTERNAL.node.sessionStorage))return!1;try{return a.setItem("__sak","1"),a.removeItem("__sak"),!0}catch(e){return!1}}()){if("Node"==xr())throw new M("internal-error","The SessionStorage compatibility library was not found.");throw new M("web-storage-unsupported")}this.a=rl()||t.a.INTERNAL.node.sessionStorage,this.type="sessionStorage"}function rl(){try{var a=h.sessionStorage,b=Zr();return a&&(a.setItem(b,"1"),a.removeItem(b)),a}catch(e){return null}}function il(){var a={};a.Browser=cl,a.Node=ll,a.ReactNative=hl,a.Worker=fl,this.a=a[xr()]}Lc.prototype.c=function(a){var b=a.data.eventType,e=a.data.eventId,t=this.a[b];if(t&&0<t.length){a.ports[0].postMessage({status:"ack",eventId:e,eventType:b,response:null});var n=[];Z(t,(function(e){n.push(Ut().then((function(){return e(a.origin,a.data.data)})))})),Vt(n).then((function(t){var g=[];Z(t,(function(e){g.push({fulfilled:e.Qb,value:e.value,reason:e.reason?e.reason.message:void 0})})),Z(g,(function(e){for(var t in e)void 0===e[t]&&delete e[t]})),a.ports[0].postMessage({status:"done",eventId:e,eventType:b,response:g})}))}},Pc.prototype.postMessage=function(a,b){this.a.postMessage(a,b)},Uc.prototype.close=function(){for(;0<this.a.length;)Fc(this,this.a[0]);this.b=!0},(n=Vc.prototype).set=function(a,b){var e=this,t=!1;return $c(this,(function(e){return Gc((e=Wc(Kc(e,!0))).get(a))})).then((function(n){return $c(e,(function(r){if(r=Wc(Kc(r,!0)),n)return n.value=b,Gc(r.put(n));e.b++,t=!0;var g={};return g.fbase_key=a,g.value=b,Gc(r.add(g))}))})).then((function(){return e.c[a]=b,qc(e,a)})).oa((function(){t&&e.b--}))},n.get=function(a){return $c(this,(function(b){return Gc(Wc(Kc(b,!1)).get(a))})).then((function(b){return b&&b.value}))},n.U=function(a){var b=this,e=!1;return $c(this,(function(t){return e=!0,b.b++,Gc(Wc(Kc(t,!0)).delete(a))})).then((function(){return delete b.c[a],qc(b,a)})).oa((function(){e&&b.b--}))},n.ca=function(a){0==this.a.length&&function(a){function b(){a.f=setTimeout((function(){a.l=Yc(a).then((function(e){0<e.length&&Z(a.a,(function(t){t(e)}))})).then((function(){b()})).o((function(e){"STOP_EVENT"!=e.message&&b()}))}),800)}Xc(a),b()}(this),this.a.push(a)},n.ia=function(a){re(this.a,(function(b){return b==a})),0==this.a.length&&Xc(this)},(n=Zc.prototype).get=function(a){return this.b.then((function(b){return b.get(a)}))},n.set=function(a,b){return this.b.then((function(e){return e.set(a,b)}))},n.U=function(a){return this.b.then((function(b){return b.U(a)}))},n.ca=function(a){this.a.push(a)},n.ia=function(a){re(this.a,(function(b){return b==a}))},(n=Qc.prototype).get=function(a){return Ut(this.a[a])},n.set=function(a,b){return this.a[a]=b,Ut()},n.U=function(a){return delete this.a[a],Ut()},n.ca=function(){},n.ia=function(){},(n=Jc.prototype).get=function(a){var b=this;return Ut().then((function(){return Xr(b.a.getItem(a))}))},n.set=function(a,b){var e=this;return Ut().then((function(){var t=qr(b);null===t?e.U(a):e.a.setItem(a,t)}))},n.U=function(a){var b=this;return Ut().then((function(){b.a.removeItem(a)}))},n.ca=function(a){h.window&&bn(h.window,"storage",a)},n.ia=function(a){h.window&&En(h.window,"storage",a)},(n=tl.prototype).get=function(){return Ut(null)},n.set=function(){return Ut()},n.U=function(){return Ut()},n.ca=function(){},n.ia=function(){},(n=nl.prototype).get=function(a){var b=this;return Ut().then((function(){return Xr(b.a.getItem(a))}))},n.set=function(a,b){var e=this;return Ut().then((function(){var t=qr(b);null===t?e.U(a):e.a.setItem(a,t)}))},n.U=function(a){var b=this;return Ut().then((function(){b.a.removeItem(a)}))},n.ca=function(){},n.ia=function(){};var al,sl,cl={F:Jc,cb:nl},ll={F:Jc,cb:nl},hl={F:Nc,cb:tl},fl={F:Jc,cb:tl},pl={rd:"local",NONE:"none",td:"session"};function gl(){var a=!(Qr(jr())||!Lr()),b=Gr(),e=$r();this.m=a,this.h=b,this.l=e,this.a={},al||(al=new il),a=al;try{this.g=!Er()&&ri()||!h.indexedDB?new a.a.F:new Zc(Mr()?new Qc:new a.a.F)}catch(e){this.g=new Qc,this.h=!0}try{this.i=new a.a.cb}catch(e){this.i=new Qc}this.v=new Qc,this.f=q(this.Zb,this),this.b={}}function ml(){return sl||(sl=new gl),sl}function vl(a,b){switch(b){case"session":return a.i;case"none":return a.v;default:return a.g}}function bl(a,b){return"firebase:"+a.name+(b?":"+b:"")}function _l(a,b,e){return e=bl(b,e),"local"==b.F&&(a.b[e]=null),vl(a,b.F).U(e)}function yl(a){a.c&&(clearInterval(a.c),a.c=null)}function El(a){this.a=a,this.b=ml()}(n=gl.prototype).get=function(a,b){return vl(this,a.F).get(bl(a,b))},n.set=function(a,b,e){var t=bl(a,e),n=this,r=vl(this,a.F);return r.set(t,b).then((function(){return r.get(t)})).then((function(g){"local"==a.F&&(n.b[t]=g)}))},n.addListener=function(a,b,e){a=bl(a,b),this.l&&(this.b[a]=h.localStorage.getItem(a)),Ee(this.a)&&(vl(this,"local").ca(this.f),this.h||(Er()||!ri())&&h.indexedDB||!this.l||function(a){yl(a),a.c=setInterval((function(){for(var b in a.a){var e=h.localStorage.getItem(b),t=a.b[b];e!=t&&(a.b[b]=e,e=new cn({type:"storage",key:b,target:window,oldValue:t,newValue:e,a:!0}),a.Zb(e))}}),1e3)}(this)),this.a[a]||(this.a[a]=[]),this.a[a].push(e)},n.removeListener=function(a,b,e){a=bl(a,b),this.a[a]&&(re(this.a[a],(function(t){return t==e})),0==this.a[a].length&&delete this.a[a]),Ee(this.a)&&(vl(this,"local").ia(this.f),yl(this))},n.Zb=function(a){if(a&&a.g){var b=a.a.key;if(null==b)for(var e in this.a){var t=this.b[e];void 0===t&&(t=null);var n=h.localStorage.getItem(e);n!==t&&(this.b[e]=n,this.nb(e))}else if(0==b.indexOf("firebase:")&&this.a[b]){if(void 0!==a.a.a?vl(this,"local").ia(this.f):yl(this),this.m)if(e=h.localStorage.getItem(b),(t=a.a.newValue)!==e)null!==t?h.localStorage.setItem(b,t):h.localStorage.removeItem(b);else if(this.b[b]===t&&void 0===a.a.a)return;var r=this;e=function(){void 0===a.a.a&&r.b[b]===h.localStorage.getItem(b)||(r.b[b]=h.localStorage.getItem(b),r.nb(b))},tt&&mt&&10==mt&&h.localStorage.getItem(b)!==a.a.newValue&&a.a.newValue!==a.a.oldValue?setTimeout(e,10):e()}}else Z(a,q(this.nb,this))},n.nb=function(a){this.a[a]&&Z(this.a[a],(function(b){b()}))};var Cl,wl={name:"authEvent",F:"local"};function Sl(){this.a=ml()}function Tl(a,b){this.b=Al,this.f=h.Uint8Array?new Uint8Array(this.b):Array(this.b),this.g=this.c=0,this.a=[],this.i=a,this.h=b,this.l=h.Int32Array?new Int32Array(64):Array(64),void 0===Cl&&(Cl=h.Int32Array?new Int32Array(Ll):Ll),this.reset()}N(Tl,(function(){this.b=-1}));for(var Al=64,Rl=Al-1,Ol=[],Il=0;Il<Rl;Il++)Ol[Il]=0;var kl=ie(128,Ol);function ol(a){for(var b=a.f,e=a.l,t=0,n=0;n<b.length;)e[t++]=b[n]<<24|b[n+1]<<16|b[n+2]<<8|b[n+3],n=4*t;for(b=16;64>b;b++){n=0|e[b-15],t=0|e[b-2];var r=(0|e[b-16])+((n>>>7|n<<25)^(n>>>18|n<<14)^n>>>3)|0,g=(0|e[b-7])+((t>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)|0;e[b]=r+g|0}t=0|a.a[0],n=0|a.a[1];var o=0|a.a[2],c=0|a.a[3],p=0|a.a[4],l=0|a.a[5],d=0|a.a[6];for(r=0|a.a[7],b=0;64>b;b++){var h=((t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10))+(t&n^t&o^n&o)|0;g=(r=r+((p>>>6|p<<26)^(p>>>11|p<<21)^(p>>>25|p<<7))|0)+((g=(g=p&l^~p&d)+(0|Cl[b])|0)+(0|e[b])|0)|0,r=d,d=l,l=p,p=c+g|0,c=o,o=n,n=t,t=g+h|0}a.a[0]=a.a[0]+t|0,a.a[1]=a.a[1]+n|0,a.a[2]=a.a[2]+o|0,a.a[3]=a.a[3]+c|0,a.a[4]=a.a[4]+p|0,a.a[5]=a.a[5]+l|0,a.a[6]=a.a[6]+d|0,a.a[7]=a.a[7]+r|0}function Nl(a,b,e){void 0===e&&(e=b.length);var t=0,n=a.c;if("string"==typeof b)for(;t<e;)a.f[n++]=b.charCodeAt(t++),n==a.b&&(ol(a),n=0);else{if(!E(b))throw Error("message must be string or array");for(;t<e;){var r=b[t++];if(!("number"==typeof r&&0<=r&&255>=r&&r==(0|r)))throw Error("message must be a byte array");a.f[n++]=r,n==a.b&&(ol(a),n=0)}}a.c=n,a.g+=e}Tl.prototype.reset=function(){this.g=this.c=0,this.a=h.Int32Array?new Int32Array(this.h):oe(this.h)};var Ll=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function Ml(){Tl.call(this,8,xl)}N(Ml,Tl);var xl=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225];function Dl(a,b,e,t,n,r){this.v=a,this.i=b,this.l=e,this.m=t||null,this.u=n||null,this.s=r,this.h=b+":"+e,this.C=new Sl,this.g=new El(this.h),this.f=null,this.b=[],this.a=this.c=null}function Pl(a){return new M("invalid-cordova-configuration",a)}function Ul(a){var b=new Ml;Nl(b,a),a=[];var e=8*b.g;56>b.c?Nl(b,kl,56-b.c):Nl(b,kl,b.b-(b.c-56));for(var t=63;56<=t;t--)b.f[t]=255&e,e/=256;for(ol(b),t=e=0;t<b.i;t++)for(var n=24;0<=n;n-=8)a[e++]=b.a[t]>>n&255;return function(a){return J(a,(function(b){return 1<(b=b.toString(16)).length?b:"0"+b})).join("")}(a)}function Bl(a,b){for(var e=0;e<a.b.length;e++)try{a.b[e](b)}catch(e){}}function Fl(a){return a.f||(a.f=a.ma().then((function(){return new kt((function(b){a.Ea((function e(t){return b(t),a.Ta(e),!1})),function(a){function b(g){t=!0,n&&n.cancel(),Vl(a).then((function(t){var n=e;if(t&&g&&g.url){var p=null;-1!=(n=_o(g.url)).indexOf("/__/auth/callback")&&(p=(p="object"==typeof(p=Xr(Gn(p=qn(n),"firebaseError")||null))?x(p):null)?new ea(t.c,t.b,null,null,p,null,t.T()):new ea(t.c,t.b,n,t.f,null,null,t.T())),n=p||e}Bl(a,n)}))}var e=new ea("unknown",null,null,null,new M("no-auth-event")),t=!1,n=Dn(500).then((function(){return Vl(a).then((function(){t||Bl(a,e)}))})),r=h.handleOpenURL;h.handleOpenURL=function(g){if(0==g.toLowerCase().indexOf(Hr("BuildInfo.packageName",h).toLowerCase()+"://")&&b({url:g}),"function"==typeof r)try{r(g)}catch(e){console.error(e)}},ra||(ra=new ta),function(a){var b=ra;b.a.push(a),b.b||(b.b=function(e){for(var t=0;t<b.a.length;t++)b.a[t](e)},"function"==typeof(a=Hr("universalLinks.subscribe",h))&&a(null,b.b))}(b)}(a)}))}))),a.f}function Vl(a){var b=null;return function(a){return a.b.get(wl,a.a).then((function(b){return th(b)}))}(a.g).then((function(e){return b=e,_l((e=a.g).b,wl,e.a)})).then((function(){return b}))}function jl(a){this.a=a,this.b=ml()}(n=Dl.prototype).ma=function(){return this.Ia?this.Ia:this.Ia=(Nr(void 0)?kr().then((function(){return new kt((function(a,b){var e=h.document,t=setTimeout((function(){b(Error("Cordova framework is not ready."))}),1e3);e.addEventListener("deviceready",(function(){clearTimeout(t),a()}),!1)}))})):Bt(Error("Cordova must run in an Android or iOS file scheme."))).then((function(){if("function"!=typeof Hr("universalLinks.subscribe",h))throw Pl("cordova-universal-links-plugin-fix is not installed");if(void 0===Hr("BuildInfo.packageName",h))throw Pl("cordova-plugin-buildinfo is not installed");if("function"!=typeof Hr("cordova.plugins.browsertab.openUrl",h))throw Pl("cordova-plugin-browsertab is not installed");if("function"!=typeof Hr("cordova.InAppBrowser.open",h))throw Pl("cordova-plugin-inappbrowser is not installed")}),(function(){throw new M("cordova-not-ready")}))},n.Pb=function(a,b){return b(new M("operation-not-supported-in-this-environment")),Ut()},n.Nb=function(){return Bt(new M("operation-not-supported-in-this-environment"))},n.ac=function(){return!1},n.Yb=function(){return!0},n.Ub=function(){return!0},n.Ob=function(a,b,e,t){if(this.c)return Bt(new M("redirect-operation-pending"));var n=this,r=h.document,g=null,o=null,c=null,p=null;return this.c=Ut().then((function(){return Jo(b),Fl(n)})).then((function(){return function(a,b,e,t,n){var r=function(){for(var a=20,b=[];0<a;)b.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),a--;return b.join("")}(),g=new ea(b,t,null,r,new M("no-auth-event"),null,n),o=Hr("BuildInfo.packageName",h);if("string"!=typeof o)throw new M("invalid-cordova-configuration");var c=Hr("BuildInfo.displayName",h),p={};if(jr().toLowerCase().match(/iphone|ipad|ipod/))p.ibi=o;else{if(!jr().toLowerCase().match(/android/))return Bt(new M("operation-not-supported-in-this-environment"));p.apn=o}c&&(p.appDisplayName=c),r=Ul(r),p.sessionId=r;var l=kc(a.v,a.i,a.l,b,e,null,t,a.m,p,a.u,n,a.s);return a.ma().then((function(){var e=a.h;return a.C.a.set(wl,g.w(),e)})).then((function(){var e=Hr("cordova.plugins.browsertab.isAvailable",h);if("function"!=typeof e)throw new M("invalid-cordova-configuration");var t=null;e((function(e){if(e){if("function"!=typeof(t=Hr("cordova.plugins.browsertab.openUrl",h)))throw new M("invalid-cordova-configuration");t(l)}else{if("function"!=typeof(t=Hr("cordova.InAppBrowser.open",h)))throw new M("invalid-cordova-configuration");e=jr(),a.a=t(l,e.match(/(iPad|iPhone|iPod).*OS 7_\d/i)||e.match(/(iPad|iPhone|iPod).*OS 8_\d/i)?"_blank":"_system","location=yes")}}))}))}(n,a,b,e,t)})).then((function(){return new kt((function(e,t){o=function(){var t=Hr("cordova.plugins.browsertab.close",h);return e(),"function"==typeof t&&t(),n.a&&"function"==typeof n.a.close&&(n.a.close(),n.a=null),!1},n.Ea(o),c=function(){g||(g=Dn(2e3).then((function(){t(new M("redirect-cancelled-by-user"))})))},p=function(){ti()&&c()},r.addEventListener("resume",c,!1),jr().toLowerCase().match(/android/)||r.addEventListener("visibilitychange",p,!1)})).o((function(e){return Vl(n).then((function(){throw e}))}))})).oa((function(){c&&r.removeEventListener("resume",c,!1),p&&r.removeEventListener("visibilitychange",p,!1),g&&g.cancel(),o&&n.Ta(o),n.c=null}))},n.Ea=function(a){this.b.push(a),Fl(this).o((function(b){"auth/invalid-cordova-configuration"===b.code&&(b=new ea("unknown",null,null,null,new M("no-auth-event")),a(b))}))},n.Ta=function(a){re(this.b,(function(b){return b==a}))};var Hl={name:"pendingRedirect",F:"session"};function $l(a){return _l(a.b,Hl,a.a)}function zl(a,b,e,t){this.i={},this.u=0,this.D=a,this.v=b,this.m=e,this.J=t,this.h=[],this.f=!1,this.l=q(this.s,this),this.b=new ad,this.C=new hd,this.g=new jl(id(this.v,this.m)),this.c={},this.c.unknown=this.b,this.c.signInViaRedirect=this.b,this.c.linkViaRedirect=this.b,this.c.reauthViaRedirect=this.b,this.c.signInViaPopup=this.C,this.c.linkViaPopup=this.C,this.c.reauthViaPopup=this.C,this.a=Wl(this.D,this.v,this.m,D,this.J)}function Wl(a,b,e,n,r){var o=t.a.SDK_VERSION||null;return Nr()?new Dl(a,b,e,o,n,r):new Ac(a,b,e,o,n,r)}function Kl(a){a.f||(a.f=!0,a.a.Ea(a.l));var b=a.a;return a.a.ma().o((function(e){throw a.a==b&&a.reset(),e}))}function Gl(a){a.a.Yb()&&Kl(a).o((function(b){var e=new ea("unknown",null,null,null,new M("operation-not-supported-in-this-environment"));Jl(b)&&a.s(e)})),a.a.Ub()||sd(a.b)}function ql(a,b){te(a.h,b)||a.h.push(b),a.f||function(a){return a.b.get(Hl,a.a).then((function(b){return"pending"==b}))}(a.g).then((function(e){e?$l(a.g).then((function(){Kl(a).o((function(e){var t=new ea("unknown",null,null,null,new M("operation-not-supported-in-this-environment"));Jl(e)&&a.s(t)}))})):Gl(a)})).o((function(){Gl(a)}))}function Yl(a,b){re(a.h,(function(e){return e==b}))}zl.prototype.reset=function(){this.f=!1,this.a.Ta(this.l),this.a=Wl(this.D,this.v,this.m,null,this.J),this.i={}},zl.prototype.s=function(a){if(!a)throw new M("invalid-auth-event");if(6e5<=Date.now()-this.u&&(this.i={},this.u=0),a&&a.getUid()&&this.i.hasOwnProperty(a.getUid()))return!1;for(var b=!1,e=0;e<this.h.length;e++){var t=this.h[e];if(t.Gb(a.c,a.b)){(b=this.c[a.c])&&(b.h(a,t),a&&(a.f||a.b)&&(this.i[a.getUid()]=!0,this.u=Date.now())),b=!0;break}}return sd(this.b),b};var Xl=new ei(2e3,1e4),Zl=new ei(3e4,6e4);function Ql(a,b,e,t,n,r,g){return a.a.Nb(b,e,t,(function(){a.f||(a.f=!0,a.a.Ea(a.l))}),(function(){a.reset()}),n,r,g)}function Jl(a){return!(!a||"auth/cordova-not-ready"!=a.code)}function ed(a,b,e,t,n){var r;return function(a){return a.b.set(Hl,"pending",a.a)}(a.g).then((function(){return a.a.Ob(b,e,t,n).o((function(g){if(Jl(g))throw new M("operation-not-supported-in-this-environment");return r=g,$l(a.g).then((function(){throw r}))})).then((function(){return a.a.ac()?new kt((function(){})):$l(a.g).then((function(){return a.ra()})).then((function(){})).o((function(){}))}))}))}function nd(a,b,e,t,n){return a.a.Pb(t,(function(t){b.na(e,null,t,n)}),Xl.get())}zl.prototype.ra=function(){return this.b.ra()};var rd={};function id(a,b,e){return a=a+":"+b,e&&(a=a+":"+e.url),a}function od(a,b,e,t){var n=id(b,e,t);return rd[n]||(rd[n]=new zl(a,b,e,t)),rd[n]}function ad(){this.b=null,this.f=[],this.c=[],this.a=null,this.i=this.g=!1}function sd(a){a.g||(a.g=!0,ud(a,!1,null,null))}function cd(a){a.g&&!a.i&&ud(a,!1,null,null)}function ld(a,b){if(a.b=function(){return Ut(b)},a.f.length)for(var e=0;e<a.f.length;e++)a.f[e](b)}function ud(a,b,e,t){b?t?function(a,b){if(a.b=function(){return Bt(b)},a.c.length)for(var e=0;e<a.c.length;e++)a.c[e](b)}(a,t):ld(a,e):ld(a,{user:null}),a.f=[],a.c=[]}function hd(){}function em(){this.jb=!1,Object.defineProperty(this,"appVerificationDisabled",{get:function(){return this.jb},set:function(a){this.jb=a},enumerable:!1})}function fd(a,b){this.a=b,ci(this,"verificationId",a)}function pd(a,b,e,t){return new Xo(a).gb(b,e).then((function(e){return new fd(e,t)}))}function gd(a){var b=io(a);if(!(b&&b.exp&&b.auth_time&&b.iat))throw new M("internal-error","An internal error occurred. The token obtained by Firebase appears to be malformed. Please retry the operation.");di(this,{token:a,expirationTime:ni(1e3*b.exp),authTime:ni(1e3*b.auth_time),issuedAtTime:ni(1e3*b.iat),signInProvider:b.firebase&&b.firebase.sign_in_provider?b.firebase.sign_in_provider:null,signInSecondFactor:b.firebase&&b.firebase.sign_in_second_factor?b.firebase.sign_in_second_factor:null,claims:b})}function md(a,b,e){var t=b&&b[bd];if(!t)throw new M("argument-error","Internal assert: Invalid MultiFactorResolver");this.a=a,this.f=Ce(b),this.g=e,this.c=new yo(null,t),this.b=[];var n=this;Z(b[vd]||[],(function(e){(e=pi(e))&&n.b.push(e)})),ci(this,"auth",this.a),ci(this,"session",this.c),ci(this,"hints",this.b)}ad.prototype.reset=function(){this.b=null,this.a&&(this.a.cancel(),this.a=null)},ad.prototype.h=function(a,b){if(a){this.reset(),this.g=!0;var e=a.c,t=a.b,n=a.a&&"auth/web-storage-unsupported"==a.a.code,r=a.a&&"auth/operation-not-supported-in-this-environment"==a.a.code;this.i=!(!n&&!r),"unknown"!=e||n||r?a.a?(ud(this,!0,null,a.a),Ut()):b.Fa(e,t)?function(a,b,e){e=e.Fa(b.c,b.b);var t=b.g,n=b.f,r=b.i,g=b.T(),o=!!b.c.match(/Redirect$/);e(t,n,g,r).then((function(e){ud(a,o,e,null)})).o((function(e){ud(a,o,null,e)}))}(this,a,b):Bt(new M("invalid-auth-event")):(ud(this,!1,null,null),Ut())}else Bt(new M("invalid-auth-event"))},ad.prototype.ra=function(){var a=this;return new kt((function(b,e){a.b?a.b().then(b,e):(a.f.push(b),a.c.push(e),function(a){var b=new M("timeout");a.a&&a.a.cancel(),a.a=Dn(Zl.get()).then((function(){a.b||(a.g=!0,ud(a,!0,null,b))}))}(a))}))},hd.prototype.h=function(a,b){if(a){var e=a.c,t=a.b;a.a?(b.na(a.c,null,a.a,a.b),Ut()):b.Fa(e,t)?function(a,b){var e=a.b,t=a.c;b.Fa(t,e)(a.g,a.f,a.T(),a.i).then((function(n){b.na(t,n,null,e)})).o((function(n){b.na(t,null,n,e)}))}(a,b):Bt(new M("invalid-auth-event"))}else Bt(new M("invalid-auth-event"))},fd.prototype.confirm=function(a){return a=Zo(this.verificationId,a),this.a(a)};var vd="mfaInfo",bd="mfaPendingCredential";function _d(a,b,e,t){M.call(this,"multi-factor-auth-required",t,b),this.b=new md(a,b,e),ci(this,"resolver",this.b)}function yd(a,b,e){if(a&&w(a.serverResponse)&&"auth/multi-factor-auth-required"===a.code)try{return new _d(b,a.serverResponse,e,a.message)}catch(e){}return null}function Ed(){}function Cd(a){ci(this,"factorId",a.fa),this.a=a}function wd(a){if(Cd.call(this,a),this.a.fa!=Xo.PROVIDER_ID)throw new M("argument-error","firebase.auth.PhoneMultiFactorAssertion requires a valid firebase.auth.PhoneAuthCredential")}function Sd(a,b){for(var e in sn.call(this,a),b)this[e]=b[e]}function Td(a,b){this.a=a,this.b=[],this.c=q(this.yc,this),bn(this.a,"userReloaded",this.c);var e=[];b&&b.multiFactor&&b.multiFactor.enrolledFactors&&Z(b.multiFactor.enrolledFactors,(function(t){var n=null,r={};if(t){t.uid&&(r[vi]=t.uid),t.displayName&&(r[gi]=t.displayName),t.enrollmentTime&&(r[mi]=new Date(t.enrollmentTime).toISOString()),t.phoneNumber&&(r[bi]=t.phoneNumber);try{n=new _i(r)}catch(e){}t=n}else t=null;t&&e.push(t)})),Ad(this,e)}function Ad(a,b){a.b=b,ci(a,"enrolledFactors",b)}function Rd(a,b,e){if(this.h=a,this.i=b,this.g=e,this.c=3e4,this.f=96e4,this.b=null,this.a=this.c,this.f<this.c)throw Error("Proactive refresh lower bound greater than upper bound!")}function Od(a,b){a.stop(),a.b=Dn(function(a,b){return b?(a.a=a.c,a.g()):(b=a.a,a.a*=2,a.a>a.f&&(a.a=a.f),b)}(a,b)).then((function(){return function(){var a=h.document,b=null;return ti()||!a?Ut():new kt((function(e){b=function(){ti()&&(a.removeEventListener("visibilitychange",b,!1),e())},a.addEventListener("visibilitychange",b,!1)})).o((function(e){throw a.removeEventListener("visibilitychange",b,!1),e}))}()})).then((function(){return a.h()})).then((function(){Od(a,!0)})).o((function(e){a.i(e)&&Od(a,!1)}))}function Id(a){this.f=a,this.b=this.a=null,this.c=Date.now()}function kd(a,b){void 0===b&&(a.b?b=(b=a.b).a-b.g:b=0),a.c=Date.now()+1e3*b}function Nd(a,b){a.b=ro(b[ds]||""),a.a=b.refreshToken,kd(a,void 0!==(b=b.expiresIn)?Number(b):void 0)}function Ld(a,b){return function(a,b){return new kt((function(e,t){"refresh_token"==b.grant_type&&b.refresh_token||"authorization_code"==b.grant_type&&b.code?_s(a,a.l+"?key="+encodeURIComponent(a.c),(function(n){n?n.error?t(vc(n)):n.access_token&&n.refresh_token?e(n):t(new M("internal-error")):t(new M("network-request-failed"))}),"POST",sr(b).toString(),a.g,a.m.get()):t(new M("internal-error"))}))}(a.f,b).then((function(e){return a.b=ro(e.access_token),a.a=e.refresh_token,kd(a,e.expires_in),{accessToken:a.b.toString(),refreshToken:a.a}})).o((function(e){throw"auth/user-token-expired"==e.code&&(a.a=null),e}))}function Md(a,b){this.a=a||null,this.b=b||null,di(this,{lastSignInTime:ni(b||null),creationTime:ni(a||null)})}function xd(a,b,e,t,n,r){di(this,{uid:a,displayName:t||null,photoURL:n||null,email:e||null,phoneNumber:r||null,providerId:b})}function Dd(a,b,e){this.N=[],this.l=a.apiKey,this.m=a.appName,this.s=a.authDomain||null;var n=t.a.SDK_VERSION?Vr(t.a.SDK_VERSION):null;this.a=new cs(this.l,F(D),n),(this.u=a.emulatorConfig||null)&&ms(this.a,this.u),this.h=new Id(this.a),zd(this,b[ds]),Nd(this.h,b),ci(this,"refreshToken",this.h.a),Gd(this,e||{}),kn.call(this),this.P=!1,this.s&&zr()&&(this.b=od(this.s,this.l,this.m,this.u)),this.W=[],this.i=null,this.D=function(a){return new Rd((function(){return a.I(!0)}),(function(b){return!(!b||"auth/network-request-failed"!=b.code)}),(function(){var b=a.h.c-Date.now()-3e5;return 0<b?b:0}))}(this),this.ba=q(this.ib,this);var r=this;this.za=null,this.Pa=function(e){r.xa(e.h)},this.qa=null,this.Ba=function(e){Pd(r,e.c)},this.$=null,this.aa=[],this.Oa=function(e){Fd(r,e.f)},this.ja=null,this.S=new Td(this,e),ci(this,"multiFactor",this.S)}function Pd(a,b){a.u=b,ms(a.a,b),a.b&&(b=a.b,a.b=od(a.s,a.l,a.m,a.u),a.P&&(Yl(b,a),ql(a.b,a)))}function Ud(a,b){a.qa&&En(a.qa,"languageCodeChanged",a.Pa),(a.qa=b)&&bn(b,"languageCodeChanged",a.Pa)}function Bd(a,b){a.$&&En(a.$,"emulatorConfigChanged",a.Ba),(a.$=b)&&bn(b,"emulatorConfigChanged",a.Ba)}function Fd(a,b){a.aa=b,bs(a.a,t.a.SDK_VERSION?Vr(t.a.SDK_VERSION,a.aa):null)}function Vd(a,b){a.ja&&En(a.ja,"frameworkChanged",a.Oa),(a.ja=b)&&bn(b,"frameworkChanged",a.Oa)}function jd(a){try{return t.a.app(a.m).auth()}catch(e){throw new M("internal-error","No firebase.auth.Auth instance is available for the Firebase App '"+a.m+"'!")}}function Hd(a){a.J||a.D.b||(a.D.start(),En(a,"tokenChanged",a.ba),bn(a,"tokenChanged",a.ba))}function $d(a){En(a,"tokenChanged",a.ba),a.D.stop()}function zd(a,b){a.Aa=b,ci(a,"_lat",b)}function Wd(a){for(var b=[],e=0;e<a.W.length;e++)b.push(a.W[e](a));return Vt(b).then((function(){return a}))}function Kd(a){a.b&&!a.P&&(a.P=!0,ql(a.b,a))}function Gd(a,b){di(a,{uid:b.uid,displayName:b.displayName||null,photoURL:b.photoURL||null,email:b.email||null,emailVerified:b.emailVerified||!1,phoneNumber:b.phoneNumber||null,isAnonymous:b.isAnonymous||!1,tenantId:b.tenantId||null,metadata:new Md(b.createdAt,b.lastLoginAt),providerData:[]}),a.a.b=a.tenantId}function qd(){}function Yd(a){return Ut().then((function(){if(a.J)throw new M("app-deleted")}))}function Xd(a){return J(a.providerData,(function(b){return b.providerId}))}function Zd(a,b){b&&(Qd(a,b.providerId),a.providerData.push(b))}function Qd(a,b){re(a.providerData,(function(e){return e.providerId==b}))}function Jd(a,b,e){("uid"!=b||e)&&a.hasOwnProperty(b)&&ci(a,b,e)}function eu(a,b){a!=b&&(di(a,{uid:b.uid,displayName:b.displayName,photoURL:b.photoURL,email:b.email,emailVerified:b.emailVerified,phoneNumber:b.phoneNumber,isAnonymous:b.isAnonymous,tenantId:b.tenantId,providerData:[]}),b.metadata?ci(a,"metadata",function(a){return new Md(a.a,a.b)}(b.metadata)):ci(a,"metadata",new Md),Z(b.providerData,(function(e){Zd(a,e)})),function(a,b){a.b=b.b,a.a=b.a,a.c=b.c}(a.h,b.h),ci(a,"refreshToken",a.h.a),Ad(a.S,b.S.b))}function tu(a){return a.I().then((function(b){var e=a.isAnonymous;return function(a,b){return gc(a.a,Ks,{idToken:b}).then(q(a.Kc,a))}(a,b).then((function(){return e||Jd(a,"isAnonymous",!1),b}))}))}function nu(a,b){b[ds]&&a.Aa!=b[ds]&&(Nd(a.h,b),a.dispatchEvent(new Sd("tokenChanged")),zd(a,b[ds]),Jd(a,"refreshToken",a.h.a))}function ru(a,b){return tu(a).then((function(){if(te(Xd(a),b))return Wd(a).then((function(){throw new M("provider-already-linked")}))}))}function iu(a,b,e){return ui({user:a,credential:Qo(b),additionalUserInfo:b=lo(b),operationType:e})}function ou(a,b){return nu(a,b),a.reload().then((function(){return a}))}function au(a,b,e,n,r){if(!zr())return Bt(new M("operation-not-supported-in-this-environment"));if(a.i&&!r)return Bt(a.i);var o=co(e.providerId),g=Zr(a.uid+":::"),c=null;(!Gr()||Lr())&&a.s&&e.isOAuthProvider&&(c=kc(a.s,a.l,a.m,b,e,null,g,t.a.SDK_VERSION||null,null,null,a.tenantId,a.u));var l=Rr(c,o&&o.va,o&&o.ua);return n=n().then((function(){if(cu(a),!r)return a.I().then((function(){}))})).then((function(){return Ql(a.b,l,b,e,g,!!c,a.tenantId)})).then((function(){return new kt((function(p,e){a.na(b,null,new M("cancelled-popup-request"),a.g||null),a.f=p,a.C=e,a.g=g,a.c=nd(a.b,a,b,l,g)}))})).then((function(p){return l&&Ar(l),p?ui(p):null})).o((function(p){throw l&&Ar(l),p})),lu(a,n,r)}function su(a,b,e,t,n){if(!zr())return Bt(new M("operation-not-supported-in-this-environment"));if(a.i&&!n)return Bt(a.i);var r=null,g=Zr(a.uid+":::");return t=t().then((function(){if(cu(a),!n)return a.I().then((function(){}))})).then((function(){return a.ga=g,Wd(a)})).then((function(e){return a.ha&&(e=(e=a.ha).b.set(hu,a.w(),e.a)),e})).then((function(){return ed(a.b,b,e,g,a.tenantId)})).o((function(e){if(r=e,a.ha)return fu(a.ha);throw r})).then((function(){if(r)throw r})),lu(a,t,n)}function cu(a){if(!a.b||!a.P){if(a.b&&!a.P)throw new M("internal-error");throw new M("auth-domain-config-required")}}function lu(a,b,e){var t=function(a,b,e){return a.i&&!e?(b.cancel(),Bt(a.i)):b.o((function(e){throw!e||"auth/user-disabled"!=e.code&&"auth/user-token-expired"!=e.code||(a.i||a.dispatchEvent(new Sd("userInvalidated")),a.i=e),e}))}(a,b,e);return a.N.push(t),t.oa((function(){ne(a.N,t)})),t.o((function(e){var t=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(t=yd(e.w(),jd(a),q(a.jc,a))),t||e}))}function du(a){if(!a.apiKey)return null;var b={apiKey:a.apiKey,authDomain:a.authDomain,appName:a.appName,emulatorConfig:a.emulatorConfig},e={};if(!a.stsTokenManager||!a.stsTokenManager.accessToken)return null;e[ds]=a.stsTokenManager.accessToken,e.refreshToken=a.stsTokenManager.refreshToken||null;var t=a.stsTokenManager.expirationTime;t&&(e.expiresIn=(t-Date.now())/1e3);var n=new Dd(b,e,a);return a.providerData&&Z(a.providerData,(function(e){e&&Zd(n,ui(e))})),a.redirectEventId&&(n.ga=a.redirectEventId),n}function uu(a){this.a=a,this.b=ml()}md.prototype.Rc=function(a){var b=this;return a.tb(this.a.a,this.c).then((function(e){var t=Ce(b.f);return delete t[vd],delete t[bd],Se(t,e),b.g(t)}))},N(_d,M),Ed.prototype.tb=function(a,b,e){return b.type==Eo?function(a,b,e,t){return e.Ha().then((function(e){return e={idToken:e},void 0!==t&&(e.displayName=t),Se(e,{phoneVerificationInfo:Yo(a.a)}),gc(b,zs,e)}))}(this,a,b,e):function(a,b,e){return e.Ha().then((function(e){return Se(e={mfaPendingCredential:e},{phoneVerificationInfo:Yo(a.a)}),gc(b,Ws,e)}))}(this,a,b)},N(Cd,Ed),N(wd,Cd),N(Sd,sn),(n=Td.prototype).yc=function(a){Ad(this,function(a){var b=[];return Z(a.mfaInfo||[],(function(e){(e=pi(e))&&b.push(e)})),b}(a.hd))},n.Sb=function(){return this.a.I().then((function(a){return new yo(a,null)}))},n.fc=function(a,b){var e=this,t=this.a.a;return this.Sb().then((function(e){return a.tb(t,e,b)})).then((function(t){return nu(e.a,t),e.a.reload()}))},n.bd=function(a){var b=this,e="string"==typeof a?a:a.uid,t=this.a.a;return this.a.I().then((function(n){return gc(t,pc,{idToken:n,mfaEnrollmentId:e})})).then((function(t){var n=Q(b.b,(function(g){return g.uid!=e}));return Ad(b,n),nu(b.a,t),b.a.reload().o((function(g){if("auth/user-token-expired"!=g.code)throw g}))}))},n.w=function(){return{multiFactor:{enrolledFactors:J(this.b,(function(a){return a.w()}))}}},Rd.prototype.start=function(){this.a=this.c,Od(this,!0)},Rd.prototype.stop=function(){this.b&&(this.b.cancel(),this.b=null)},Id.prototype.w=function(){return{apiKey:this.f.c,refreshToken:this.a,accessToken:this.b&&this.b.toString(),expirationTime:this.c}},Id.prototype.getToken=function(a){return a=!!a,this.b&&!this.a?Bt(new M("user-token-expired")):a||!this.b||Date.now()>this.c-3e4?this.a?Ld(this,{grant_type:"refresh_token",refresh_token:this.a}):Ut(null):Ut({accessToken:this.b.toString(),refreshToken:this.a})},Md.prototype.w=function(){return{lastLoginAt:this.b,createdAt:this.a}},N(Dd,kn),Dd.prototype.xa=function(a){this.za=a,gs(this.a,a)},Dd.prototype.la=function(){return this.za},Dd.prototype.Ga=function(){return oe(this.aa)},Dd.prototype.ib=function(){this.D.b&&(this.D.stop(),this.D.start())},ci(Dd.prototype,"providerId","firebase"),(n=Dd.prototype).reload=function(){var a=this;return lu(this,Yd(this).then((function(){return tu(a).then((function(){return Wd(a)})).then(qd)})))},n.oc=function(a){return this.I(a).then((function(b){return new gd(b)}))},n.I=function(a){var b=this;return lu(this,Yd(this).then((function(){return b.h.getToken(a)})).then((function(e){if(!e)throw new M("internal-error");return e.accessToken!=b.Aa&&(zd(b,e.accessToken),b.dispatchEvent(new Sd("tokenChanged"))),Jd(b,"refreshToken",e.refreshToken),e.accessToken})))},n.Kc=function(a){if(!(a=a.users)||!a.length)throw new M("internal-error");Gd(this,{uid:(a=a[0]).localId,displayName:a.displayName,photoURL:a.photoUrl,email:a.email,emailVerified:!!a.emailVerified,phoneNumber:a.phoneNumber,lastLoginAt:a.lastLoginAt,createdAt:a.createdAt,tenantId:a.tenantId});for(var b=function(a){return(a=a.providerUserInfo)&&a.length?J(a,(function(b){return new xd(b.rawId,b.providerId,b.email,b.displayName,b.photoUrl,b.phoneNumber)})):[]}(a),e=0;e<b.length;e++)Zd(this,b[e]);Jd(this,"isAnonymous",!(this.email&&a.passwordHash||this.providerData&&this.providerData.length)),this.dispatchEvent(new Sd("userReloaded",{hd:a}))},n.Lc=function(a){return ai("firebase.User.prototype.reauthenticateAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.reauthenticateWithCredential instead."),this.ub(a)},n.ub=function(a){var b=this,e=null;return lu(this,a.c(this.a,this.uid).then((function(t){return nu(b,t),e=iu(b,t,"reauthenticate"),b.i=null,b.reload()})).then((function(){return e})),!0)},n.Cc=function(a){return ai("firebase.User.prototype.linkAndRetrieveDataWithCredential is deprecated. Please use firebase.User.prototype.linkWithCredential instead."),this.rb(a)},n.rb=function(a){var b=this,e=null;return lu(this,ru(this,a.providerId).then((function(){return b.I()})).then((function(e){return a.b(b.a,e)})).then((function(t){return e=iu(b,t,"link"),ou(b,t)})).then((function(){return e})))},n.Dc=function(a,b){var e=this;return lu(this,ru(this,"phone").then((function(){return pd(jd(e),a,b,q(e.rb,e))})))},n.Mc=function(a,b){var e=this;return lu(this,Ut().then((function(){return pd(jd(e),a,b,q(e.ub,e))})),!0)},n.Cb=function(a){var b=this;return lu(this,this.I().then((function(e){return b.a.Cb(e,a)})).then((function(e){return nu(b,e),b.reload()})))},n.ed=function(a){var b=this;return lu(this,this.I().then((function(e){return a.b(b.a,e)})).then((function(e){return nu(b,e),b.reload()})))},n.Db=function(a){var b=this;return lu(this,this.I().then((function(e){return b.a.Db(e,a)})).then((function(e){return nu(b,e),b.reload()})))},n.Eb=function(a){if(void 0===a.displayName&&void 0===a.photoURL)return Yd(this);var b=this;return lu(this,this.I().then((function(e){return b.a.Eb(e,{displayName:a.displayName,photoUrl:a.photoURL})})).then((function(e){return nu(b,e),Jd(b,"displayName",e.displayName||null),Jd(b,"photoURL",e.photoUrl||null),Z(b.providerData,(function(e){"password"===e.providerId&&(ci(e,"displayName",b.displayName),ci(e,"photoURL",b.photoURL))})),Wd(b)})).then(qd))},n.cd=function(a){var b=this;return lu(this,tu(this).then((function(e){return te(Xd(b),a)?function(a,b,e){return gc(a,js,{idToken:b,deleteProvider:e})}(b.a,e,[a]).then((function(e){var t={};return Z(e.providerUserInfo||[],(function(e){t[e.providerId]=!0})),Z(Xd(b),(function(e){t[e]||Qd(b,e)})),t[Xo.PROVIDER_ID]||ci(b,"phoneNumber",null),Wd(b)})):Wd(b).then((function(){throw new M("no-such-provider")}))})))},n.delete=function(){var a=this;return lu(this,this.I().then((function(b){return gc(a.a,Vs,{idToken:b})})).then((function(){a.dispatchEvent(new Sd("userDeleted"))}))).then((function(){for(var b=0;b<a.N.length;b++)a.N[b].cancel("app-deleted");Ud(a,null),Bd(a,null),Vd(a,null),a.N=[],a.J=!0,$d(a),ci(a,"refreshToken",null),a.b&&Yl(a.b,a)}))},n.Gb=function(a,b){return!!("linkViaPopup"==a&&(this.g||null)==b&&this.f||"reauthViaPopup"==a&&(this.g||null)==b&&this.f||"linkViaRedirect"==a&&(this.ga||null)==b||"reauthViaRedirect"==a&&(this.ga||null)==b)},n.na=function(a,b,e,t){"linkViaPopup"!=a&&"reauthViaPopup"!=a||t!=(this.g||null)||(e&&this.C?this.C(e):b&&!e&&this.f&&this.f(b),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(a,b){return"linkViaPopup"==a&&b==(this.g||null)?q(this.Lb,this):"reauthViaPopup"==a&&b==(this.g||null)?q(this.Mb,this):"linkViaRedirect"==a&&(this.ga||null)==b?q(this.Lb,this):"reauthViaRedirect"==a&&(this.ga||null)==b?q(this.Mb,this):null},n.Ec=function(a){var b=this;return au(this,"linkViaPopup",a,(function(){return ru(b,a.providerId).then((function(){return Wd(b)}))}),!1)},n.Nc=function(a){return au(this,"reauthViaPopup",a,(function(){return Ut()}),!0)},n.Fc=function(a){var b=this;return su(this,"linkViaRedirect",a,(function(){return ru(b,a.providerId)}),!1)},n.Oc=function(a){return su(this,"reauthViaRedirect",a,(function(){return Ut()}),!0)},n.Lb=function(a,b,e,t){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return lu(this,this.I().then((function(g){return Ms(n.a,{requestUri:a,postBody:t,sessionId:b,idToken:g})})).then((function(g){return r=iu(n,g,"link"),ou(n,g)})).then((function(){return r})))},n.Mb=function(a,b,e,t){var n=this;this.c&&(this.c.cancel(),this.c=null);var r=null;return lu(this,Ut().then((function(){return So(xs(n.a,{requestUri:a,sessionId:b,postBody:t,tenantId:e}),n.uid)})).then((function(e){return r=iu(n,e,"reauthenticate"),nu(n,e),n.i=null,n.reload()})).then((function(){return r})),!0)},n.vb=function(a){var b=this,e=null;return lu(this,this.I().then((function(t){return e=t,void 0===a||Ee(a)?{}:Ji(new $i(a))})).then((function(t){return b.a.vb(e,t)})).then((function(e){if(b.email!=e)return b.reload()})).then((function(){})))},n.Fb=function(a,b){var e=this,t=null;return lu(this,this.I().then((function(e){return t=e,void 0===b||Ee(b)?{}:Ji(new $i(b))})).then((function(n){return e.a.Fb(t,a,n)})).then((function(t){if(e.email!=t)return e.reload()})).then((function(){})))},n.jc=function(a){var b=null,e=this;return lu(this,a=So(Ut(a),e.uid).then((function(t){return b=iu(e,t,"reauthenticate"),nu(e,t),e.i=null,e.reload()})).then((function(){return b})),!0)},n.toJSON=function(){return this.w()},n.w=function(){var a={uid:this.uid,displayName:this.displayName,photoURL:this.photoURL,email:this.email,emailVerified:this.emailVerified,phoneNumber:this.phoneNumber,isAnonymous:this.isAnonymous,tenantId:this.tenantId,providerData:[],apiKey:this.l,appName:this.m,authDomain:this.s,stsTokenManager:this.h.w(),redirectEventId:this.ga||null};return this.metadata&&Se(a,this.metadata.w()),Z(this.providerData,(function(b){a.providerData.push(function(a){var e,b={};for(e in a)a.hasOwnProperty(e)&&(b[e]=a[e]);return b}(b))})),Se(a,this.S.w()),a};var hu={name:"redirectUser",F:"session"};function fu(a){return _l(a.b,hu,a.a)}function pu(a){this.a=a,this.b=ml(),this.c=null,this.f=function(a){var b=vu("local"),e=vu("session"),t=vu("none");return function(a,b,e){var t=bl(b,e),n=vl(a,b.F);return a.get(b,e).then((function(r){var g=null;try{g=Xr(h.localStorage.getItem(t))}catch(e){}if(g&&!r)return h.localStorage.removeItem(t),a.set(b,g,e);g&&r&&"localStorage"!=n.type&&h.localStorage.removeItem(t)}))}(a.b,b,a.a).then((function(){return a.b.get(e,a.a)})).then((function(n){return n?e:a.b.get(t,a.a).then((function(e){return e?t:a.b.get(b,a.a).then((function(g){return g?b:a.b.get(mu,a.a).then((function(e){return e?vu(e):b}))}))}))})).then((function(e){return a.c=e,gu(a,e.F)})).o((function(){a.c||(a.c=b)}))}(this),this.b.addListener(vu("local"),this.a,q(this.g,this))}function gu(a,b){var e,t=[];for(e in pl)pl[e]!==b&&t.push(_l(a.b,vu(pl[e]),a.a));return t.push(_l(a.b,mu,a.a)),function(a){return new kt((function(b,e){var t=a.length,n=[];if(t)for(var r=function(p,e){t--,n[p]=e,0==t&&b(n)},g=function(p){e(p)},o=0;o<a.length;o++)Ft(a[o],I(r,o),g);else b(n)}))}(t)}pu.prototype.g=function(){var a=this,b=vu("local");Eu(this,(function(){return Ut().then((function(){return a.c&&"local"!=a.c.F?a.b.get(b,a.a):null})).then((function(e){if(e)return gu(a,"local").then((function(){a.c=b}))}))}))};var mu={name:"persistence",F:"session"};function vu(a){return{name:"authUser",F:a}}function bu(a,b){return Eu(a,(function(){return a.b.set(a.c,b.w(),a.a)}))}function _u(a){return Eu(a,(function(){return _l(a.b,a.c,a.a)}))}function yu(a,b,e){return Eu(a,(function(){return a.b.get(a.c,a.a).then((function(t){return t&&b&&(t.authDomain=b),t&&e&&(t.emulatorConfig=e),du(t||{})}))}))}function Eu(a,b){return a.f=a.f.then(b,b),a.f}function Cu(a){if(this.l=!1,ci(this,"settings",new em),ci(this,"app",a),!Nu(this).options||!Nu(this).options.apiKey)throw new M("invalid-api-key");a=t.a.SDK_VERSION?Vr(t.a.SDK_VERSION):null,this.a=new cs(Nu(this).options&&Nu(this).options.apiKey,F(D),a),this.P=[],this.s=[],this.N=[],this.Pa=t.a.INTERNAL.createSubscribe(q(this.zc,this)),this.W=void 0,this.ib=t.a.INTERNAL.createSubscribe(q(this.Ac,this)),Iu(this,null),this.i=new pu(Nu(this).options.apiKey+":"+Nu(this).name),this.D=new uu(Nu(this).options.apiKey+":"+Nu(this).name),this.$=Du(this,function(a){var b=Nu(a).options.authDomain,e=function(a){var b=function(a,b){return a.b.get(hu,a.a).then((function(e){return e&&b&&(e.authDomain=b),du(e||{})}))}(a.D,Nu(a).options.authDomain).then((function(e){return(a.m=e)&&(e.ha=a.D),fu(a.D)}));return Du(a,b)}(a).then((function(){return yu(a.i,b,a.R)})).then((function(e){return e?(e.ha=a.D,a.m&&(a.m.ga||null)==(e.ga||null)?e:e.reload().then((function(){return bu(a.i,e).then((function(){return e}))})).o((function(t){return"auth/network-request-failed"==t.code?e:_u(a.i)}))):null})).then((function(e){Iu(a,e||null)}));return Du(a,e)}(this)),this.h=Du(this,function(a){return a.$.then((function(){return Ru(a)})).o((function(){})).then((function(){if(!a.l)return a.ja()})).o((function(){})).then((function(){if(!a.l){a.ba=!0;var b=a.i;b.b.addListener(vu("local"),b.a,a.ja)}}))}(this)),this.ba=!1,this.ja=q(this.Zc,this),this.Ba=q(this.da,this),this.qa=q(this.mc,this),this.za=q(this.wc,this),this.Aa=q(this.xc,this),this.b=null,function(a){var b=Nu(a).options.authDomain,e=Nu(a).options.apiKey;b&&zr()&&(a.Oa=a.$.then((function(){if(!a.l){if(a.b=od(b,e,Nu(a).name,a.R),ql(a.b,a),Lu(a)&&Kd(Lu(a)),a.m){Kd(a.m);var t=a.m;t.xa(a.la()),Ud(t,a),Fd(t=a.m,a.J),Vd(t,a),Pd(t=a.m,a.R),Bd(t,a),a.m=null}return a.b}})))}(this),this.INTERNAL={},this.INTERNAL.delete=q(this.delete,this),this.INTERNAL.logFramework=q(this.Gc,this),this.u=0,kn.call(this),function(a){Object.defineProperty(a,"lc",{get:function(){return this.la()},set:function(b){this.xa(b)},enumerable:!1}),a.aa=null,Object.defineProperty(a,"ti",{get:function(){return this.T()},set:function(b){this.zb(b)},enumerable:!1}),a.S=null,Object.defineProperty(a,"emulatorConfig",{get:function(){if(this.R){var b=qn(this.R.url);b=ui({protocol:b.c,host:b.a,port:b.g,options:ui({disableWarnings:this.R.ec})})}else b=null;return b},enumerable:!1})}(this),this.J=[],this.R=null}function wu(a){sn.call(this,"languageCodeChanged"),this.h=a}function Su(a){sn.call(this,"emulatorConfigChanged"),this.c=a}function Tu(a){sn.call(this,"frameworkChanged"),this.f=a}function Au(a){return a.Oa||Bt(new M("auth-domain-config-required"))}function Ru(a){if(!zr())return Bt(new M("operation-not-supported-in-this-environment"));var b=Au(a).then((function(){return a.b.ra()})).then((function(e){return e?ui(e):null}));return Du(a,b)}function Ou(a,b){var e={};return e.apiKey=Nu(a).options.apiKey,e.authDomain=Nu(a).options.authDomain,e.appName=Nu(a).name,a.R&&(e.emulatorConfig=a.R),a.$.then((function(){return function(a,b,e,t){var n=new Dd(a,b);return e&&(n.ha=e),t&&Fd(n,t),n.reload().then((function(){return n}))}(e,b,a.D,a.Ga())})).then((function(e){return Lu(a)&&e.uid==Lu(a).uid?(eu(Lu(a),e),a.da(e)):(Iu(a,e),Kd(e),a.da(e))})).then((function(){xu(a)}))}function Iu(a,b){Lu(a)&&(function(a,b){re(a.W,(function(e){return e==b}))}(Lu(a),a.Ba),En(Lu(a),"tokenChanged",a.qa),En(Lu(a),"userDeleted",a.za),En(Lu(a),"userInvalidated",a.Aa),$d(Lu(a))),b&&(b.W.push(a.Ba),bn(b,"tokenChanged",a.qa),bn(b,"userDeleted",a.za),bn(b,"userInvalidated",a.Aa),0<a.u&&Hd(b)),ci(a,"currentUser",b),b&&(b.xa(a.la()),Ud(b,a),Fd(b,a.J),Vd(b,a),Pd(b,a.R),Bd(b,a))}function ku(a,b){var e=null,t=null;return Du(a,b.then((function(n){return e=Qo(n),t=lo(n),Ou(a,n)}),(function(e){var t=null;throw e&&"auth/multi-factor-auth-required"===e.code&&(t=yd(e.w(),a,q(a.kc,a))),t||e})).then((function(){return ui({user:Lu(a),credential:e,additionalUserInfo:t,operationType:"signIn"})})))}function Nu(a){return a.app}function Lu(a){return a.currentUser}function Mu(a){return Lu(a)&&Lu(a)._lat||null}function xu(a){if(a.ba){for(var b=0;b<a.s.length;b++)a.s[b]&&a.s[b](Mu(a));if(a.W!==a.getUid()&&a.N.length)for(a.W=a.getUid(),b=0;b<a.N.length;b++)a.N[b]&&a.N[b](Mu(a))}}function Du(a,b){return a.P.push(b),b.oa((function(){ne(a.P,b)})),b}function Pu(){}function Uu(){this.a={},this.b=1e12}pu.prototype.yb=function(a){var b=null,e=this;return function(a){var b=new M("invalid-persistence-type"),e=new M("unsupported-persistence-type");e:{for(t in pl)if(pl[t]==a){var t=!0;break e}t=!1}if(!t||"string"!=typeof a)throw b;switch(xr()){case"ReactNative":if("session"===a)throw e;break;case"Node":if("none"!==a)throw e;break;case"Worker":if("session"===a||!zc()&&"none"!==a)throw e;break;default:if(!$r()&&"none"!==a)throw e}}(a),Eu(this,(function(){return a!=e.c.F?e.b.get(e.c,e.a).then((function(t){return b=t,gu(e,a)})).then((function(){if(e.c=vu(a),b)return e.b.set(e.c,b,e.a)})):Ut()}))},N(Cu,kn),N(wu,sn),N(Su,sn),N(Tu,sn),(n=Cu.prototype).yb=function(a){return Du(this,a=this.i.yb(a))},n.xa=function(a){this.aa===a||this.l||(this.aa=a,gs(this.a,this.aa),this.dispatchEvent(new wu(this.la())))},n.la=function(){return this.aa},n.fd=function(){var a=h.navigator;this.xa(a&&(a.languages&&a.languages[0]||a.language||a.userLanguage)||null)},n.gd=function(a,b){if(!this.R){if(!/^https?:\/\//.test(a))throw new M("argument-error","Emulator URL must start with a valid scheme (http:// or https://).");(function(a){"undefined"!=typeof console&&"function"==typeof console.info&&console.info("WARNING: You are using the Auth Emulator, which is intended for local testing only.  Do not use with production credentials."),h.document&&!a&&kr().then((function(){var b=h.document.createElement("div");b.innerText="Running in emulator mode. Do not use with production credentials.",b.style.position="fixed",b.style.width="100%",b.style.backgroundColor="#ffffff",b.style.border=".1em solid #000000",b.style.color="#b50000",b.style.bottom="0px",b.style.left="0px",b.style.margin="0px",b.style.zIndex=1e4,b.style.textAlign="center",b.classList.add("firebase-emulator-warning"),h.document.body.appendChild(b)}))})(b=!!b&&!!b.disableWarnings),this.R={url:a,ec:b},this.settings.jb=!0,ms(this.a,this.R),this.dispatchEvent(new Su(this.R))}},n.Gc=function(a){this.J.push(a),bs(this.a,t.a.SDK_VERSION?Vr(t.a.SDK_VERSION,this.J):null),this.dispatchEvent(new Tu(this.J))},n.Ga=function(){return oe(this.J)},n.zb=function(a){this.S===a||this.l||(this.S=a,this.a.b=this.S)},n.T=function(){return this.S},n.toJSON=function(){return{apiKey:Nu(this).options.apiKey,authDomain:Nu(this).options.authDomain,appName:Nu(this).name,currentUser:Lu(this)&&Lu(this).w()}},n.Gb=function(a,b){switch(a){case"unknown":case"signInViaRedirect":return!0;case"signInViaPopup":return this.g==b&&!!this.f;default:return!1}},n.na=function(a,b,e,t){"signInViaPopup"==a&&this.g==t&&(e&&this.C?this.C(e):b&&!e&&this.f&&this.f(b),this.c&&(this.c.cancel(),this.c=null),delete this.f,delete this.C)},n.Fa=function(a,b){return"signInViaRedirect"==a||"signInViaPopup"==a&&this.g==b&&this.f?q(this.ic,this):null},n.ic=function(a,b,e,t){var n=this,r={requestUri:a,postBody:t,sessionId:b,tenantId:e};return this.c&&(this.c.cancel(),this.c=null),n.$.then((function(){return ku(n,Ls(n.a,r))}))},n.Xc=function(a){if(!zr())return Bt(new M("operation-not-supported-in-this-environment"));var b=this,e=co(a.providerId),n=Zr(),r=null;(!Gr()||Lr())&&Nu(this).options.authDomain&&a.isOAuthProvider&&(r=kc(Nu(this).options.authDomain,Nu(this).options.apiKey,Nu(this).name,"signInViaPopup",a,null,n,t.a.SDK_VERSION||null,null,null,this.T(),this.R));var o=Rr(r,e&&e.va,e&&e.ua);return Du(this,e=Au(this).then((function(g){return Ql(g,o,"signInViaPopup",a,n,!!r,b.T())})).then((function(){return new kt((function(g,e){b.na("signInViaPopup",null,new M("cancelled-popup-request"),b.g),b.f=g,b.C=e,b.g=n,b.c=nd(b.b,b,"signInViaPopup",o,n)}))})).then((function(g){return o&&Ar(o),g?ui(g):null})).o((function(g){throw o&&Ar(o),g})))},n.Yc=function(a){if(!zr())return Bt(new M("operation-not-supported-in-this-environment"));var b=this;return Du(this,Au(this).then((function(){return function(a){return Eu(a,(function(){return a.b.set(mu,a.c.F,a.a)}))}(b.i)})).then((function(){return ed(b.b,"signInViaRedirect",a,void 0,b.T())})))},n.ra=function(){var a=this;return Ru(this).then((function(b){return a.b&&cd(a.b.b),b})).o((function(b){throw a.b&&cd(a.b.b),b}))},n.dd=function(a){if(!a)return Bt(new M("null-user"));if(this.S!=a.tenantId)return Bt(new M("tenant-id-mismatch"));var b=this,e={};e.apiKey=Nu(this).options.apiKey,e.authDomain=Nu(this).options.authDomain,e.appName=Nu(this).name;var t=function(a,b,e,t){var n=a.h,r={};return r[ds]=n.b&&n.b.toString(),r.refreshToken=n.a,b=new Dd(b||{apiKey:a.l,authDomain:a.s,appName:a.m},r),e&&(b.ha=e),t&&Fd(b,t),eu(b,a),b}(a,e,b.D,b.Ga());return Du(this,this.h.then((function(){if(Nu(b).options.apiKey!=a.l)return t.reload()})).then((function(){return Lu(b)&&a.uid==Lu(b).uid?(eu(Lu(b),a),b.da(a)):(Iu(b,t),Kd(t),b.da(t))})).then((function(){xu(b)})))},n.Bb=function(){var a=this;return Du(this,this.h.then((function(){return a.b&&cd(a.b.b),Lu(a)?(Iu(a,null),_u(a.i).then((function(){xu(a)}))):Ut()})))},n.Zc=function(){var a=this;return yu(this.i,Nu(this).options.authDomain).then((function(b){if(!a.l){var e;if(e=Lu(a)&&b){e=Lu(a).uid;var t=b.uid;e=null!=e&&""!==e&&null!=t&&""!==t&&e==t}if(e)return eu(Lu(a),b),Lu(a).I();(Lu(a)||b)&&(Iu(a,b),b&&(Kd(b),b.ha=a.D),a.b&&ql(a.b,a),xu(a))}}))},n.da=function(a){return bu(this.i,a)},n.mc=function(){xu(this),this.da(Lu(this))},n.wc=function(){this.Bb()},n.xc=function(){this.Bb()},n.kc=function(a){var b=this;return this.h.then((function(){return ku(b,Ut(a))}))},n.zc=function(a){var b=this;this.addAuthTokenListener((function(){a.next(Lu(b))}))},n.Ac=function(a){var b=this;!function(a,b){a.N.push(b),Du(a,a.h.then((function(){!a.l&&te(a.N,b)&&a.W!==a.getUid()&&(a.W=a.getUid(),b(Mu(a)))})))}(this,(function(){a.next(Lu(b))}))},n.Ic=function(a,b,e){var t=this;return this.ba&&Promise.resolve().then((function(){"function"==typeof a?a(Lu(t)):"function"==typeof a.next&&a.next(Lu(t))})),this.Pa(a,b,e)},n.Hc=function(a,b,e){var t=this;return this.ba&&Promise.resolve().then((function(){t.W=t.getUid(),"function"==typeof a?a(Lu(t)):"function"==typeof a.next&&a.next(Lu(t))})),this.ib(a,b,e)},n.nc=function(a){var b=this;return Du(this,this.h.then((function(){return Lu(b)?Lu(b).I(a).then((function(e){return{accessToken:e}})):null})))},n.Tc=function(a){var b=this;return this.h.then((function(){return ku(b,gc(b.a,lc,{token:a}))})).then((function(e){var t=e.user;return Jd(t,"isAnonymous",!1),b.da(t),e}))},n.Uc=function(a,b){var e=this;return this.h.then((function(){return ku(e,gc(e.a,dc,{email:a,password:b}))}))},n.dc=function(a,b){var e=this;return this.h.then((function(){return ku(e,gc(e.a,Bs,{email:a,password:b}))}))},n.ab=function(a){var b=this;return this.h.then((function(){return ku(b,a.ka(b.a))}))},n.Sc=function(a){return ai("firebase.auth.Auth.prototype.signInAndRetrieveDataWithCredential is deprecated. Please use firebase.auth.Auth.prototype.signInWithCredential instead."),this.ab(a)},n.Ab=function(){var a=this;return this.h.then((function(){var b=Lu(a);if(b&&b.isAnonymous){var e=ui({providerId:null,isNewUser:!1});return ui({user:b,credential:null,additionalUserInfo:e,operationType:"signIn"})}return ku(a,a.a.Ab()).then((function(e){var t=e.user;return Jd(t,"isAnonymous",!0),a.da(t),e}))}))},n.getUid=function(){return Lu(this)&&Lu(this).uid||null},n.cc=function(a){this.addAuthTokenListener(a),this.u++,0<this.u&&Lu(this)&&Hd(Lu(this))},n.Pc=function(a){var b=this;Z(this.s,(function(e){e==a&&b.u--})),0>this.u&&(this.u=0),0==this.u&&Lu(this)&&$d(Lu(this)),this.removeAuthTokenListener(a)},n.addAuthTokenListener=function(a){var b=this;this.s.push(a),Du(this,this.h.then((function(){b.l||te(b.s,a)&&a(Mu(b))})))},n.removeAuthTokenListener=function(a){re(this.s,(function(b){return b==a}))},n.delete=function(){this.l=!0;for(var a=0;a<this.P.length;a++)this.P[a].cancel("app-deleted");return this.P=[],this.i&&(a=this.i).b.removeListener(vu("local"),a.a,this.ja),this.b&&(Yl(this.b,this),cd(this.b.b)),Promise.resolve()},n.hc=function(a){return Du(this,function(a,b){return gc(a,Fs,{identifier:b,continueUri:Wr()?Cr():"http://localhost"}).then((function(e){return e.signinMethods||[]}))}(this.a,a))},n.Bc=function(a){return!!Ko(a)},n.xb=function(a,b){var e=this;return Du(this,Ut().then((function(){var e=new $i(b);if(!e.c)throw new M("argument-error",Ki+" must be true when sending sign in link to email");return Ji(e)})).then((function(t){return e.a.xb(a,t)})).then((function(){})))},n.jd=function(a){return this.Sa(a).then((function(b){return b.data.email}))},n.ob=function(a,b){return Du(this,this.a.ob(a,b).then((function(){})))},n.Sa=function(a){return Du(this,this.a.Sa(a).then((function(b){return new yi(b)})))},n.kb=function(a){return Du(this,this.a.kb(a).then((function(){})))},n.wb=function(a,b){var e=this;return Du(this,Ut().then((function(){return void 0===b||Ee(b)?{}:Ji(new $i(b))})).then((function(t){return e.a.wb(a,t)})).then((function(){})))},n.Wc=function(a,b){return Du(this,pd(this,a,b,q(this.ab,this)))},n.Vc=function(a,b){var e=this;return Du(this,Ut().then((function(){var t=b||Cr(),n=Wo(a,t);if(!(t=Ko(t)))throw new M("argument-error","Invalid email link!");if(t.tenantId!==e.T())throw new M("tenant-id-mismatch");return e.ab(n)})))},Pu.prototype.render=function(){},Pu.prototype.reset=function(){},Pu.prototype.getResponse=function(){},Pu.prototype.execute=function(){};var Bu=null;function Fu(a,b){return(b=Vu(b))&&a.a[b]||null}function Vu(a){return(a=void 0===a?1e12:a)?a.toString():null}function ju(a,b){this.g=!1,this.c=b,this.a=this.b=null,this.h="invisible"!==this.c.size,this.f=bt(a);var e=this;this.i=function(){e.execute()},this.h?this.execute():bn(this.f,"click",this.i)}function Hu(a){if(a.g)throw Error("reCAPTCHA mock was already deleted!")}function $u(){}function zu(){}Uu.prototype.render=function(a,b){return this.a[this.b.toString()]=new ju(a,b),this.b++},Uu.prototype.reset=function(a){var b=Fu(this,a);a=Vu(a),b&&a&&(b.delete(),delete this.a[a])},Uu.prototype.getResponse=function(a){return(a=Fu(this,a))?a.getResponse():null},Uu.prototype.execute=function(a){(a=Fu(this,a))&&a.execute()},ju.prototype.getResponse=function(){return Hu(this),this.b},ju.prototype.execute=function(){Hu(this);var a=this;this.a||(this.a=setTimeout((function(){a.b=function(){for(var a=50,b=[];0<a;)b.push("1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(Math.floor(62*Math.random()))),a--;return b.join("")}();var b=a.c.callback,e=a.c["expired-callback"];if(b)try{b(a.b)}catch(e){}a.a=setTimeout((function(){if(a.a=null,a.b=null,e)try{e()}catch(e){}a.h&&a.execute()}),6e4)}),500))},ju.prototype.delete=function(){Hu(this),this.g=!0,clearTimeout(this.a),this.a=null,En(this.f,"click",this.i)},ci($u,"FACTOR_ID","phone"),zu.prototype.g=function(){return Bu||(Bu=new Uu),Ut(Bu)},zu.prototype.c=function(){};var Wu=null;function Ku(){this.b=h.grecaptcha?1/0:0,this.f=null,this.a="__rcb"+Math.floor(1e6*Math.random()).toString()}var Gu=new Ae(ke,"https://www.google.com/recaptcha/api.js?onload=%{onload}&render=explicit&hl=%{hl}"),qu=new ei(3e4,6e4);Ku.prototype.g=function(a){var b=this;return new kt((function(e,t){var n=setTimeout((function(){t(new M("network-request-failed"))}),qu.get());!h.grecaptcha||a!==b.f&&!b.b?(h[b.a]=function(){if(h.grecaptcha){b.f=a;var g=h.grecaptcha.render;h.grecaptcha.render=function(e,t){return e=g(e,t),b.b++,e},clearTimeout(n),e(h.grecaptcha)}else clearTimeout(n),t(new M("internal-error"));delete h[b.a]},Ut(ts(xe(Gu,{onload:b.a,hl:a||""}))).o((function(){clearTimeout(n),t(new M("internal-error","Unable to load external reCAPTCHA dependencies!"))}))):(clearTimeout(n),e(h.grecaptcha))}))},Ku.prototype.c=function(){this.b--};var Yu=null;function Xu(a,b,e,t,n,r,g){if(ci(this,"type","recaptcha"),this.c=this.f=null,this.J=!1,this.v=b,this.g=null,g?(Wu||(Wu=new zu),g=Wu):(Yu||(Yu=new Ku),g=Yu),this.m=g,this.a=e||{theme:"light",type:"image"},this.h=[],this.a[Ju])throw new M("argument-error","sitekey should not be provided for reCAPTCHA as one is automatically provisioned for the current project.");if(this.i="invisible"===this.a[eh],!h.document)throw new M("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment with DOM support.");if(!bt(b)||!this.i&&bt(b).hasChildNodes())throw new M("argument-error","reCAPTCHA container is either not found or already contains inner elements!");this.s=new cs(a,r||null,n||null),this.u=t||function(){return null};var o=this;this.l=[];var c=this.a[Zu];this.a[Zu]=function(e){if(nh(o,e),"function"==typeof c)c(e);else if("string"==typeof c){var t=Hr(c,h);"function"==typeof t&&t(e)}};var p=this.a[Qu];this.a[Qu]=function(){if(nh(o,null),"function"==typeof p)p();else if("string"==typeof p){var e=Hr(p,h);"function"==typeof e&&e()}}}var Zu="callback",Qu="expired-callback",Ju="sitekey",eh="size";function nh(a,b){for(var e=0;e<a.l.length;e++)try{a.l[e](b)}catch(e){}}function rh(a,b){return a.h.push(b),b.oa((function(){ne(a.h,b)})),b}function ih(a){if(a.J)throw new M("internal-error","RecaptchaVerifier instance has been destroyed.")}function oh(a,b,e){var n=!1;try{this.b=e||t.a.app()}catch(e){throw new M("argument-error","No firebase.app.App instance is currently initialized.")}if(!this.b.options||!this.b.options.apiKey)throw new M("invalid-api-key");e=this.b.options.apiKey;var r=this,o=null;try{o=this.b.auth().Ga()}catch(e){}try{n=this.b.auth().settings.appVerificationDisabledForTesting}catch(e){}o=t.a.SDK_VERSION?Vr(t.a.SDK_VERSION,o):null,Xu.call(this,e,a,b,(function(){try{var g=r.b.auth().la()}catch(e){g=null}return g}),o,F(D),n)}function ah(a,b,e,t){e:{e=Array.prototype.slice.call(e);for(var n=0,r=!1,g=0;g<b.length;g++)if(b[g].optional)r=!0;else{if(r)throw new M("internal-error","Argument validator encountered a required argument after an optional argument.");n++}if(r=b.length,e.length<n||r<e.length)t="Expected "+(n==r?1==n?"1 argument":n+" arguments":n+"-"+r+" arguments")+" but got "+e.length+".";else{for(n=0;n<e.length;n++)if(r=b[n].optional&&void 0===e[n],!b[n].M(e[n])&&!r){if(b=b[n],0>n||n>=sh.length)throw new M("internal-error","Argument validator received an unsupported number of arguments.");e=sh[n],t=(t?"":e+" argument ")+(b.name?'"'+b.name+'" ':"")+"must be "+b.K+".";break e}t=null}}if(t)throw new M("argument-error",a+" failed: "+t)}(n=Xu.prototype).Ia=function(){var a=this;return this.f?this.f:this.f=rh(this,Ut().then((function(){if(Wr()&&!Mr())return kr();throw new M("operation-not-supported-in-this-environment","RecaptchaVerifier is only supported in a browser HTTP/HTTPS environment.")})).then((function(){return a.m.g(a.u())})).then((function(b){return a.g=b,gc(a.s,Qs,{})})).then((function(b){a.a[Ju]=b.recaptchaSiteKey})).o((function(b){throw a.f=null,b})))},n.render=function(){ih(this);var a=this;return rh(this,this.Ia().then((function(){if(null===a.c){var b=a.v;if(!a.i){var e=bt(b);b=function(a,b,e){var t=arguments,n=document,r=String(t[0]),g=t[1];if(!vt&&g&&(g.name||g.type)){if(r=["<",r],g.name&&r.push(' name="',Ze(g.name),'"'),g.type){r.push(' type="',Ze(g.type),'"');var o={};Se(o,g),delete o.type,g=o}r.push(">"),r=r.join("")}return r=St(n,r),g&&("string"==typeof g?r.className=g:Array.isArray(g)?r.className=g.join(" "):_t(r,g)),2<t.length&&wt(n,r,t),r}("DIV"),e.appendChild(b)}a.c=a.g.render(b,a.a)}return a.c})))},n.verify=function(){ih(this);var a=this;return rh(this,this.render().then((function(b){return new kt((function(e){var t=a.g.getResponse(b);if(t)e(t);else{var n=function(t){t&&(function(a,b){re(a.l,(function(e){return e==b}))}(a,n),e(t))};a.l.push(n),a.i&&a.g.execute(a.c)}}))})))},n.reset=function(){ih(this),null!==this.c&&this.g.reset(this.c)},n.clear=function(){ih(this),this.J=!0,this.m.c();for(var a=0;a<this.h.length;a++)this.h[a].cancel("RecaptchaVerifier instance has been destroyed.");if(!this.i){a=bt(this.v);for(var b;b=a.firstChild;)a.removeChild(b)}},N(oh,Xu);var sh="First Second Third Fourth Fifth Sixth Seventh Eighth Ninth".split(" ");function ch(a,b){return{name:a||"",K:"a valid string",optional:!!b,M:function(e){return"string"==typeof e}}}function lh(a,b){return{name:a||"",K:"a boolean",optional:!!b,M:function(e){return"boolean"==typeof e}}}function dh(a,b){return{name:a||"",K:"a valid object",optional:!!b,M:w}}function uh(a,b){return{name:a||"",K:"a function",optional:!!b,M:function(e){return"function"==typeof e}}}function hh(a,b){return{name:a||"",K:"null",optional:!!b,M:function(e){return null===e}}}function fh(a){return{name:a?a+"Credential":"credential",K:a?"a valid "+a+" credential":"a valid credential",optional:!1,M:function(b){if(!b)return!1;var e=!a||b.providerId===a;return!(!b.ka||!e)}}}function ph(a,b){return w(a)&&"string"==typeof a.type&&a.type===b&&"function"==typeof a.Ha}function gh(a){return w(a)&&"string"==typeof a.uid}function mh(a,b,e,t){return{name:e||"",K:a.K+" or "+b.K,optional:!!t,M:function(e){return a.M(e)||b.M(e)}}}function vh(a,b){for(var e in b){var t=b[e].name;a[t]=yh(t,a[e],b[e].j)}}function bh(a,b){for(var e in b){var t=b[e].name;t!==e&&Object.defineProperty(a,t,{get:I((function(e){return this[e]}),e),set:I((function(e,t,g,n){ah(e,[g],[n],!0),this[t]=n}),t,e,b[e].lb),enumerable:!0})}}function _h(a,b,e,t){a[b]=yh(b,e,t)}function yh(a,b,e){function t(){var g=Array.prototype.slice.call(arguments);return ah(r,e,g),b.apply(this,g)}if(!e)return b;var n,r=function(a){return(a=a.split("."))[a.length-1]}(a);for(n in b)t[n]=b[n];for(n in b.prototype)t.prototype[n]=b.prototype[n];return t}vh(Cu.prototype,{kb:{name:"applyActionCode",j:[ch("code")]},Sa:{name:"checkActionCode",j:[ch("code")]},ob:{name:"confirmPasswordReset",j:[ch("code"),ch("newPassword")]},dc:{name:"createUserWithEmailAndPassword",j:[ch("email"),ch("password")]},hc:{name:"fetchSignInMethodsForEmail",j:[ch("email")]},ra:{name:"getRedirectResult",j:[]},Bc:{name:"isSignInWithEmailLink",j:[ch("emailLink")]},Hc:{name:"onAuthStateChanged",j:[mh(dh(),uh(),"nextOrObserver"),uh("opt_error",!0),uh("opt_completed",!0)]},Ic:{name:"onIdTokenChanged",j:[mh(dh(),uh(),"nextOrObserver"),uh("opt_error",!0),uh("opt_completed",!0)]},wb:{name:"sendPasswordResetEmail",j:[ch("email"),mh(dh("opt_actionCodeSettings",!0),hh(null,!0),"opt_actionCodeSettings",!0)]},xb:{name:"sendSignInLinkToEmail",j:[ch("email"),dh("actionCodeSettings")]},yb:{name:"setPersistence",j:[ch("persistence")]},Sc:{name:"signInAndRetrieveDataWithCredential",j:[fh()]},Ab:{name:"signInAnonymously",j:[]},ab:{name:"signInWithCredential",j:[fh()]},Tc:{name:"signInWithCustomToken",j:[ch("token")]},Uc:{name:"signInWithEmailAndPassword",j:[ch("email"),ch("password")]},Vc:{name:"signInWithEmailLink",j:[ch("email"),ch("emailLink",!0)]},Wc:{name:"signInWithPhoneNumber",j:[ch("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(a){return!(!a||"string"!=typeof a.type||"function"!=typeof a.verify)}}]},Xc:{name:"signInWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},Yc:{name:"signInWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},dd:{name:"updateCurrentUser",j:[mh({name:"user",K:"an instance of Firebase User",optional:!1,M:function(b){return!!(b&&b instanceof Dd)}},hh(),"user")]},Bb:{name:"signOut",j:[]},toJSON:{name:"toJSON",j:[ch(null,!0)]},fd:{name:"useDeviceLanguage",j:[]},gd:{name:"useEmulator",j:[ch("url"),dh("options",!0)]},jd:{name:"verifyPasswordResetCode",j:[ch("code")]}}),bh(Cu.prototype,{lc:{name:"languageCode",lb:mh(ch(),hh(),"languageCode")},ti:{name:"tenantId",lb:mh(ch(),hh(),"tenantId")}}),Cu.Persistence=pl,Cu.Persistence.LOCAL="local",Cu.Persistence.SESSION="session",Cu.Persistence.NONE="none",vh(Dd.prototype,{delete:{name:"delete",j:[]},oc:{name:"getIdTokenResult",j:[lh("opt_forceRefresh",!0)]},I:{name:"getIdToken",j:[lh("opt_forceRefresh",!0)]},Cc:{name:"linkAndRetrieveDataWithCredential",j:[fh()]},rb:{name:"linkWithCredential",j:[fh()]},Dc:{name:"linkWithPhoneNumber",j:[ch("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(a){return!(!a||"string"!=typeof a.type||"function"!=typeof a.verify)}}]},Ec:{name:"linkWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},Fc:{name:"linkWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},Lc:{name:"reauthenticateAndRetrieveDataWithCredential",j:[fh()]},ub:{name:"reauthenticateWithCredential",j:[fh()]},Mc:{name:"reauthenticateWithPhoneNumber",j:[ch("phoneNumber"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(a){return!(!a||"string"!=typeof a.type||"function"!=typeof a.verify)}}]},Nc:{name:"reauthenticateWithPopup",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},Oc:{name:"reauthenticateWithRedirect",j:[{name:"authProvider",K:"a valid Auth provider",optional:!1,M:function(a){return!!(a&&a.providerId&&a.hasOwnProperty&&a.hasOwnProperty("isOAuthProvider"))}}]},reload:{name:"reload",j:[]},vb:{name:"sendEmailVerification",j:[mh(dh("opt_actionCodeSettings",!0),hh(null,!0),"opt_actionCodeSettings",!0)]},toJSON:{name:"toJSON",j:[ch(null,!0)]},cd:{name:"unlink",j:[ch("provider")]},Cb:{name:"updateEmail",j:[ch("email")]},Db:{name:"updatePassword",j:[ch("password")]},ed:{name:"updatePhoneNumber",j:[fh("phone")]},Eb:{name:"updateProfile",j:[dh("profile")]},Fb:{name:"verifyBeforeUpdateEmail",j:[ch("email"),mh(dh("opt_actionCodeSettings",!0),hh(null,!0),"opt_actionCodeSettings",!0)]}}),vh(Uu.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),vh(Pu.prototype,{execute:{name:"execute"},render:{name:"render"},reset:{name:"reset"},getResponse:{name:"getResponse"}}),vh(kt.prototype,{oa:{name:"finally"},o:{name:"catch"},then:{name:"then"}}),bh(em.prototype,{appVerificationDisabled:{name:"appVerificationDisabledForTesting",lb:lh("appVerificationDisabledForTesting")}}),vh(fd.prototype,{confirm:{name:"confirm",j:[ch("verificationCode")]}}),_h(wo,"fromJSON",(function(a){a="string"==typeof a?JSON.parse(a):a;for(var b,e=[ko,$o,qo,Ro],t=0;t<e.length;t++)if(b=e[t](a))return b;return null}),[mh(ch(),dh(),"json")]),_h(zo,"credential",(function(a,b){return new Ho(a,b)}),[ch("email"),ch("password")]),vh(Ho.prototype,{w:{name:"toJSON",j:[ch(null,!0)]}}),vh(xo.prototype,{Ca:{name:"addScope",j:[ch("scope")]},Ka:{name:"setCustomParameters",j:[dh("customOAuthParameters")]}}),_h(xo,"credential",Do,[mh(ch(),dh(),"token")]),_h(zo,"credentialWithLink",Wo,[ch("email"),ch("emailLink")]),vh(Po.prototype,{Ca:{name:"addScope",j:[ch("scope")]},Ka:{name:"setCustomParameters",j:[dh("customOAuthParameters")]}}),_h(Po,"credential",Uo,[mh(ch(),dh(),"token")]),vh(Bo.prototype,{Ca:{name:"addScope",j:[ch("scope")]},Ka:{name:"setCustomParameters",j:[dh("customOAuthParameters")]}}),_h(Bo,"credential",Fo,[mh(ch(),mh(dh(),hh()),"idToken"),mh(ch(),hh(),"accessToken",!0)]),vh(Vo.prototype,{Ka:{name:"setCustomParameters",j:[dh("customOAuthParameters")]}}),_h(Vo,"credential",jo,[mh(ch(),dh(),"token"),ch("secret",!0)]),vh(Mo.prototype,{Ca:{name:"addScope",j:[ch("scope")]},credential:{name:"credential",j:[mh(ch(),mh(dh(),hh()),"optionsOrIdToken"),mh(ch(),hh(),"accessToken",!0)]},Ka:{name:"setCustomParameters",j:[dh("customOAuthParameters")]}}),vh(Oo.prototype,{w:{name:"toJSON",j:[ch(null,!0)]}}),vh(To.prototype,{w:{name:"toJSON",j:[ch(null,!0)]}}),_h(Xo,"credential",Zo,[ch("verificationId"),ch("verificationCode")]),vh(Xo.prototype,{gb:{name:"verifyPhoneNumber",j:[mh(ch(),{name:"phoneInfoOptions",K:"valid phone info options",optional:!1,M:function(e){return!!e&&(e.session&&e.phoneNumber?ph(e.session,Eo)&&"string"==typeof e.phoneNumber:e.session&&e.multiFactorHint?ph(e.session,Co)&&gh(e.multiFactorHint):e.session&&e.multiFactorUid?ph(e.session,Co)&&"string"==typeof e.multiFactorUid:!!e.phoneNumber&&"string"==typeof e.phoneNumber)}},"phoneInfoOptions"),{name:"applicationVerifier",K:"an implementation of firebase.auth.ApplicationVerifier",optional:!1,M:function(a){return!(!a||"string"!=typeof a.type||"function"!=typeof a.verify)}}]}}),vh(Go.prototype,{w:{name:"toJSON",j:[ch(null,!0)]}}),vh(M.prototype,{toJSON:{name:"toJSON",j:[ch(null,!0)]}}),vh(oa.prototype,{toJSON:{name:"toJSON",j:[ch(null,!0)]}}),vh(ia.prototype,{toJSON:{name:"toJSON",j:[ch(null,!0)]}}),vh(_d.prototype,{toJSON:{name:"toJSON",j:[ch(null,!0)]}}),vh(md.prototype,{Rc:{name:"resolveSignIn",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(a){return!!a&&!!a.tb}}]}}),vh(Td.prototype,{Sb:{name:"getSession",j:[]},fc:{name:"enroll",j:[{name:"multiFactorAssertion",K:"a valid multiFactorAssertion",optional:!1,M:function(a){return!!a&&!!a.tb}},ch("displayName",!0)]},bd:{name:"unenroll",j:[mh({name:"multiFactorInfo",K:"a valid multiFactorInfo",optional:!1,M:gh},ch(),"multiFactorInfoIdentifier")]}}),vh(oh.prototype,{clear:{name:"clear",j:[]},render:{name:"render",j:[]},verify:{name:"verify",j:[]}}),_h(xi,"parseLink",Hi,[ch("link")]),_h($u,"assertion",(function(a){return new wd(a)}),[fh("phone")]),function(){if(void 0===t.a||!t.a.INTERNAL||!t.a.INTERNAL.registerComponent)throw Error("Cannot find the firebase namespace; be sure to include firebase-app.js before this library.");var a={ActionCodeInfo:{Operation:{EMAIL_SIGNIN:Ci,PASSWORD_RESET:"PASSWORD_RESET",RECOVER_EMAIL:"RECOVER_EMAIL",REVERT_SECOND_FACTOR_ADDITION:Ei,VERIFY_AND_CHANGE_EMAIL:wi,VERIFY_EMAIL:"VERIFY_EMAIL"}},Auth:Cu,AuthCredential:wo,Error:M};_h(a,"EmailAuthProvider",zo,[]),_h(a,"FacebookAuthProvider",xo,[]),_h(a,"GithubAuthProvider",Po,[]),_h(a,"GoogleAuthProvider",Bo,[]),_h(a,"TwitterAuthProvider",Vo,[]),_h(a,"OAuthProvider",Mo,[ch("providerId")]),_h(a,"SAMLAuthProvider",Lo,[ch("providerId")]),_h(a,"PhoneAuthProvider",Xo,[{name:"auth",K:"an instance of Firebase Auth",optional:!0,M:function(a){return!!(a&&a instanceof Cu)}}]),_h(a,"RecaptchaVerifier",oh,[mh(ch(),{name:"",K:"an HTML element",optional:!1,M:function(a){return!!(a&&a instanceof Element)}},"recaptchaContainer"),dh("recaptchaParameters",!0),{name:"app",K:"an instance of Firebase App",optional:!0,M:function(a){return!!(a&&a instanceof t.a.app.App)}}]),_h(a,"ActionCodeURL",xi,[]),_h(a,"PhoneMultiFactorGenerator",$u,[]),t.a.INTERNAL.registerComponent({name:"auth",instanceFactory:function(b){return new Cu(b=b.getProvider("app").getImmediate())},multipleInstances:!1,serviceProps:a,instantiationMode:"LAZY",type:"PUBLIC",onInstanceCreated:function(b){b.getProvider("auth-internal").initialize()}}),t.a.INTERNAL.registerComponent({name:"auth-internal",instanceFactory:function(b){return{getUid:q((b=b.getProvider("auth").getImmediate()).getUid,b),getToken:q(b.nc,b),addAuthTokenListener:q(b.cc,b),removeAuthTokenListener:q(b.Pc,b)}},multipleInstances:!1,instantiationMode:"LAZY",type:"PRIVATE"}),t.a.registerVersion("@firebase/auth","0.16.8"),t.a.INTERNAL.extendNamespace({User:Dd})}()}).apply(void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})}).call(this,n(23))},,function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n=t(e),r={name:"ja",weekdays:"日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日".split("_"),weekdaysShort:"日_月_火_水_木_金_土".split("_"),weekdaysMin:"日_月_火_水_木_金_土".split("_"),months:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(e){return e+"日"},formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日 HH:mm",LLLL:"YYYY年M月D日 dddd HH:mm",l:"YYYY/MM/DD",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日(ddd) HH:mm"},meridiem:function(e){return e<12?"午前":"午後"},relativeTime:{future:"%s後",past:"%s前",s:"数秒",m:"1分",mm:"%d分",h:"1時間",hh:"%d時間",d:"1日",dd:"%d日",M:"1ヶ月",MM:"%dヶ月",y:"1年",yy:"%d年"}};return n.default.locale(r,null,!0),r}(n(6))},function(e,t,n){var content=n(642);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(36).default)("6ab8883c",content,!0,{sourceMap:!1})},function(e,t,n){var r=n(35)((function(i){return i[1]}));r.push([e.i,'.mx-icon-double-left:after,.mx-icon-double-left:before,.mx-icon-double-right:after,.mx-icon-double-right:before,.mx-icon-left:before,.mx-icon-right:before{border-color:currentcolor;border-radius:1px;border-style:solid;border-width:2px 0 0 2px;-webkit-box-sizing:border-box;box-sizing:border-box;content:"";display:inline-block;height:10px;position:relative;top:-1px;-webkit-transform:rotate(-45deg) scale(.7);transform:rotate(-45deg) scale(.7);-webkit-transform-origin:center;transform-origin:center;vertical-align:middle;width:10px}.mx-icon-double-left:after{left:-4px}.mx-icon-double-right:before{left:4px}.mx-icon-double-right:after,.mx-icon-double-right:before,.mx-icon-right:before{-webkit-transform:rotate(135deg) scale(.7);transform:rotate(135deg) scale(.7)}.mx-btn{background-color:transparent;border:1px solid rgba(0,0,0,.1);border-radius:4px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#73879c;cursor:pointer;font-size:14px;font-weight:500;line-height:1;margin:0;outline:none;padding:7px 15px;white-space:nowrap}.mx-btn:hover{border-color:#1284e7;color:#1284e7}.mx-btn.disabled,.mx-btn:disabled{color:#ccc;cursor:not-allowed}.mx-btn-text{border:0;line-height:inherit;padding:0 4px;text-align:left}.mx-scrollbar{height:100%}.mx-scrollbar:hover .mx-scrollbar-track{opacity:1}.mx-scrollbar-wrap{height:100%;overflow-x:hidden;overflow-y:auto}.mx-scrollbar-track{border-radius:4px;bottom:2px;opacity:0;position:absolute;right:2px;top:2px;-webkit-transition:opacity .24s ease-out;transition:opacity .24s ease-out;width:6px;z-index:1}.mx-scrollbar-track .mx-scrollbar-thumb{background-color:hsla(220,4%,58%,.3);border-radius:inherit;cursor:pointer;height:0;position:absolute;-webkit-transition:background-color .3s;transition:background-color .3s;width:100%}.mx-zoom-in-down-enter-active,.mx-zoom-in-down-leave-active{opacity:1;-webkit-transform:scaleY(1);transform:scaleY(1);-webkit-transform-origin:center top;transform-origin:center top;transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);-webkit-transition:opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1);transition:transform .3s cubic-bezier(.23,1,.32,1),opacity .3s cubic-bezier(.23,1,.32,1),-webkit-transform .3s cubic-bezier(.23,1,.32,1)}.mx-zoom-in-down-enter,.mx-zoom-in-down-enter-from,.mx-zoom-in-down-leave-to{opacity:0;-webkit-transform:scaleY(0);transform:scaleY(0)}.mx-datepicker{display:inline-block;position:relative;width:210px}.mx-datepicker svg{fill:currentColor;height:1em;overflow:hidden;vertical-align:-.15em;width:1em}.mx-datepicker-range{width:320px}.mx-datepicker-inline{width:auto}.mx-input-wrapper{position:relative}.mx-input{background-color:#fff;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-box-sizing:border-box;box-sizing:border-box;color:#555;display:inline-block;font-size:14px;height:34px;line-height:1.4;padding:6px 30px 6px 10px;width:100%}.mx-input:focus,.mx-input:hover{border-color:#409aff}.mx-input.disabled,.mx-input:disabled{background-color:#f3f3f3;border-color:#ccc;color:#ccc;cursor:not-allowed}.mx-input:focus{outline:none}.mx-input::-ms-clear{display:none}.mx-icon-calendar,.mx-icon-clear{color:rgba(0,0,0,.5);font-size:16px;line-height:1;position:absolute;right:8px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);vertical-align:middle}.mx-icon-clear{cursor:pointer}.mx-icon-clear:hover{color:rgba(0,0,0,.8)}.mx-datepicker-main{background-color:#fff;border:1px solid #e8e8e8;color:#73879c;font:14px/1.5 "Helvetica Neue",Helvetica,Arial,"Microsoft Yahei",sans-serif}.mx-datepicker-popup{-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175);margin-bottom:1px;margin-top:1px;position:absolute;z-index:2001}.mx-datepicker-sidebar{-webkit-box-sizing:border-box;box-sizing:border-box;float:left;overflow:auto;padding:6px;width:100px}.mx-datepicker-sidebar+.mx-datepicker-content{border-left:1px solid #e8e8e8;margin-left:100px}.mx-datepicker-body{position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.mx-btn-shortcut{display:block;line-height:24px;padding:0 6px}.mx-range-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}@media(max-width:750px){.mx-range-wrapper{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}}.mx-datepicker-header{border-bottom:1px solid #e8e8e8;padding:6px 8px}.mx-datepicker-footer{border-top:1px solid #e8e8e8;padding:6px 8px;text-align:right}.mx-calendar{-webkit-box-sizing:border-box;box-sizing:border-box;padding:6px 12px;width:248px}.mx-calendar+.mx-calendar{border-left:1px solid #e8e8e8}.mx-calendar-header,.mx-time-header{-webkit-box-sizing:border-box;box-sizing:border-box;height:34px;line-height:34px;overflow:hidden;text-align:center}.mx-btn-icon-double-left,.mx-btn-icon-left{float:left}.mx-btn-icon-double-right,.mx-btn-icon-right{float:right}.mx-calendar-header-label{font-size:14px}.mx-calendar-decade-separator{margin:0 2px}.mx-calendar-decade-separator:after{content:"~"}.mx-calendar-content{-webkit-box-sizing:border-box;box-sizing:border-box;height:224px;position:relative}.mx-calendar-content .cell{cursor:pointer}.mx-calendar-content .cell:hover{background-color:#f3f9fe;color:#73879c}.mx-calendar-content .cell.active{background-color:#1284e7;color:#fff}.mx-calendar-content .cell.hover-in-range,.mx-calendar-content .cell.in-range{background-color:#dbedfb;color:#73879c}.mx-calendar-content .cell.disabled{background-color:#f3f3f3;color:#ccc;cursor:not-allowed}.mx-calendar-week-mode .mx-date-row{cursor:pointer}.mx-calendar-week-mode .mx-date-row:hover{background-color:#f3f9fe}.mx-calendar-week-mode .mx-date-row.mx-active-week{background-color:#dbedfb}.mx-calendar-week-mode .mx-date-row .cell:hover{background-color:transparent;color:inherit}.mx-calendar-week-mode .mx-date-row .cell.active{background-color:transparent;color:inherit}.mx-week-number{opacity:.5}.mx-table{border-collapse:separate;border-spacing:0;-webkit-box-sizing:border-box;box-sizing:border-box;height:100%;table-layout:fixed;text-align:center;width:100%}.mx-table th{font-weight:500}.mx-table td,.mx-table th{padding:0;vertical-align:middle}.mx-table-date td,.mx-table-date th{font-size:12px;height:32px}.mx-table-date .today{color:#2a90e9}.mx-table-date .cell.not-current-month{background:none;color:#ccc}.mx-time{-webkit-box-flex:1;background:#fff;-ms-flex:1;flex:1;width:224px}.mx-time+.mx-time{border-left:1px solid #e8e8e8}.mx-calendar-time{height:100%;left:0;position:absolute;top:0;width:100%}.mx-time-header{border-bottom:1px solid #e8e8e8}.mx-time-content{-webkit-box-sizing:border-box;box-sizing:border-box;height:224px;overflow:hidden}.mx-time-columns{display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;overflow:hidden;width:100%}.mx-time-column{-webkit-box-flex:1;border-left:1px solid #e8e8e8;-ms-flex:1;flex:1;position:relative;text-align:center}.mx-time-column:first-child{border-left:0}.mx-time-column .mx-time-list{list-style:none;margin:0;padding:0}.mx-time-column .mx-time-list:after{content:"";display:block;height:192px}.mx-time-column .mx-time-item{cursor:pointer;font-size:12px;height:32px;line-height:32px}.mx-time-column .mx-time-item:hover{background-color:#f3f9fe;color:#73879c}.mx-time-column .mx-time-item.active{background-color:transparent;color:#1284e7;font-weight:700}.mx-time-column .mx-time-item.disabled{background-color:#f3f3f3;color:#ccc;cursor:not-allowed}.mx-time-option{cursor:pointer;font-size:14px;line-height:20px;padding:8px 10px}.mx-time-option:hover{background-color:#f3f9fe;color:#73879c}.mx-time-option.active{background-color:transparent;color:#1284e7;font-weight:700}.mx-time-option.disabled{background-color:#f3f3f3;color:#ccc;cursor:not-allowed}',""]),r.locals={},e.exports=r},function(e,t,n){e.exports=function(e){"use strict";function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={exports:{}},t.exports),t.exports}e=e&&e.hasOwnProperty("default")?e.default:e;var r={formatLocale:t(n((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={months:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthsShort:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],weekdays:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],weekdaysShort:["日","月","火","水","木","金","土"],weekdaysMin:["日","月","火","水","木","金","土"],firstDayOfWeek:0,firstWeekContainsDate:6};t.default=n,e.exports=t.default}))),yearFormat:"YYYY",monthFormat:"MMM",monthBeforeYear:!1};return e.locale("ja",r),r}(n(320))},function(e,t,n){(function(t,n,r){e.exports=function(){"use strict";function e(e,t){return t.forEach((function(t){t&&"string"!=typeof t&&!Array.isArray(t)&&Object.keys(t).forEach((function(i){if("default"!==i&&!(i in e)){var n=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,n.get?n:{enumerable:!0,get:function(){return t[i]}})}}))})),Object.freeze(e)}let o=!0,i=!0;function c(e,t,i){const n=e.match(t);return n&&n.length>=i&&parseInt(n[i],10)}function l(e,t,i){if(!e.RTCPeerConnection)return;const n=e.RTCPeerConnection.prototype,r=n.addEventListener;n.addEventListener=function(e,n){if(e!==t)return r.apply(this,arguments);const s=e=>{const t=i(e);t&&(n.handleEvent?n.handleEvent(t):n(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(n,s),r.apply(this,[e,s])};const s=n.removeEventListener;n.removeEventListener=function(e,i){if(e!==t||!this._eventMap||!this._eventMap[t])return s.apply(this,arguments);if(!this._eventMap[t].has(i))return s.apply(this,arguments);const n=this._eventMap[t].get(i);return this._eventMap[t].delete(i),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,s.apply(this,[e,n])},Object.defineProperty(n,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function s(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(o=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function d(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(i=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function a(){if("object"==typeof window){if(o)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function h(e,t){i&&console.warn(e+" is deprecated, please use "+t+" instead.")}function f(e){return"[object Object]"===Object.prototype.toString.call(e)}function m(e){return f(e)?Object.keys(e).reduce((function(t,i){const n=f(e[i]),r=n?m(e[i]):e[i],s=n&&!Object.keys(r).length;return void 0===r||s?t:Object.assign(t,{[i]:r})}),{}):e}function v(e,t,i){t&&!i.has(t.id)&&(i.set(t.id,t),Object.keys(t).forEach((n=>{n.endsWith("Id")?v(e,e.get(t[n]),i):n.endsWith("Ids")&&t[n].forEach((t=>{v(e,e.get(t),i)}))})))}function u(e,t,i){const n=i?"outbound-rtp":"inbound-rtp",r=new Map;if(null===t)return r;const s=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&s.push(e)})),s.forEach((t=>{e.forEach((i=>{i.type===n&&i.trackId===t.id&&v(e,i,r)}))})),r}const p=a;function _(e,t){const i=e&&e.navigator;if(!i.mediaDevices)return;const n=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((i=>{if("require"===i||"advanced"===i||"mediaSource"===i)return;const n="object"==typeof e[i]?e[i]:{ideal:e[i]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);const r=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){t.optional=t.optional||[];let e={};"number"==typeof n.ideal?(e[r("min",i)]=n.ideal,t.optional.push(e),e={},e[r("max",i)]=n.ideal,t.optional.push(e)):(e[r("",i)]=n.ideal,t.optional.push(e))}void 0!==n.exact&&"number"!=typeof n.exact?(t.mandatory=t.mandatory||{},t.mandatory[r("",i)]=n.exact):["min","max"].forEach((e=>{void 0!==n[e]&&(t.mandatory=t.mandatory||{},t.mandatory[r(e,i)]=n[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},r=function(e,r){if(t.version>=61)return r(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){const t=function(e,t,i){t in e&&!(i in e)&&(e[i]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=n(e.audio)}if(e&&"object"==typeof e.video){let s=e.video.facingMode;s=s&&("object"==typeof s?s:{ideal:s});const o=t.version<66;if(s&&("user"===s.exact||"environment"===s.exact||"user"===s.ideal||"environment"===s.ideal)&&(!i.mediaDevices.getSupportedConstraints||!i.mediaDevices.getSupportedConstraints().facingMode||o)){let t;if(delete e.video.facingMode,"environment"===s.exact||"environment"===s.ideal?t=["back","rear"]:"user"!==s.exact&&"user"!==s.ideal||(t=["front"]),t)return i.mediaDevices.enumerateDevices().then((i=>{let o=(i=i.filter((e=>"videoinput"===e.kind))).find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!o&&i.length&&t.includes("back")&&(o=i[i.length-1]),o&&(e.video.deviceId=s.exact?{exact:o.deviceId}:{ideal:o.deviceId}),e.video=n(e.video),p("chrome: "+JSON.stringify(e)),r(e)}))}e.video=n(e.video)}return p("chrome: "+JSON.stringify(e)),r(e)},s=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(i.getUserMedia=function(e,t,n){r(e,(e=>{i.webkitGetUserMedia(e,t,(e=>{n&&n(s(e))}))}))}.bind(i),i.mediaDevices.getUserMedia){const e=i.mediaDevices.getUserMedia.bind(i.mediaDevices);i.mediaDevices.getUserMedia=function(t){return r(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(s(e))))))}}}function y(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function E(e){if("object"==typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(i=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===i.track.id)):{track:i.track};const r=new Event("track");r.track=i.track,r.receiver=n,r.transceiver={receiver:n},r.streams=[t.stream],this.dispatchEvent(r)})),t.stream.getTracks().forEach((i=>{let n;n=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===i.id)):{track:i};const r=new Event("track");r.track=i,r.receiver=n,r.transceiver={receiver:n},r.streams=[t.stream],this.dispatchEvent(r)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else l(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function C(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const i=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){let r=i.apply(this,arguments);return r||(r=t(this,e),this._senders.push(r)),r};const n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){n.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function g(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,i,n]=arguments;if(arguments.length>0&&"function"==typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!=typeof e))return t.apply(this,[]);const r=function(e){const t={};return e.result().forEach((e=>{const i={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{i[t]=e.stat(t)})),t[i.id]=i})),t},s=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const n=function(e){i(s(r(e)))};return t.apply(this,[n,e])}return new Promise(((e,i)=>{t.apply(this,[function(t){e(s(r(t)))},i])})).then(i,n)}}function w(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=i.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>u(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),l(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>u(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,i,n;return this.getSenders().forEach((i=>{i.track===e&&(t?n=!0:t=i)})),this.getReceivers().forEach((t=>(t.track===e&&(i?n=!0:i=t),t.track===e))),n||t&&i?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():i?i.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function S(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){if(!i)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const n=t.apply(this,arguments);return this._shimmedLocalStreams[i.id]?-1===this._shimmedLocalStreams[i.id].indexOf(n)&&this._shimmedLocalStreams[i.id].push(n):this._shimmedLocalStreams[i.id]=[i,n],n};const i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();i.apply(this,arguments);const n=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(n)};const n=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],n.apply(this,arguments)};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const i=this._shimmedLocalStreams[t].indexOf(e);-1!==i&&this._shimmedLocalStreams[t].splice(i,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),r.apply(this,arguments)}}function T(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return S(e);const i=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=i.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const i=new e.MediaStream(t.getTracks());this._streams[t.id]=i,this._reverseStreams[i.id]=t,t=i}n.apply(this,[t])};const r=e.RTCPeerConnection.prototype.removeStream;function s(e,t){let i=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const n=e._reverseStreams[t],r=e._streams[n.id];i=i.replace(new RegExp(r.id,"g"),n.id)})),new RTCSessionDescription({type:t.type,sdp:i})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},r.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,i){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const n=[].slice.call(arguments,1);if(1!==n.length||!n[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find((e=>e.track===t)))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const r=this._streams[i.id];if(r)r.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const n=new e.MediaStream([t]);this._streams[i.id]=n,this._reverseStreams[n.id]=i,this.addStream(n)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],n={[t](){const e=arguments;return arguments.length&&"function"==typeof arguments[0]?i.apply(this,[t=>{const i=s(this,t);e[0].apply(null,[i])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):i.apply(this,arguments).then((e=>s(this,e)))}};e.RTCPeerConnection.prototype[t]=n[t]}));const o=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let i=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const n=e._reverseStreams[t],r=e._streams[n.id];i=i.replace(new RegExp(n.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:i})}(this,arguments[0]),o.apply(this,arguments)):o.apply(this,arguments)};const a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=a.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((i=>{this._streams[i].getTracks().find((t=>e.track===t))&&(t=this._streams[i])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function A(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]}))}function R(e,t){l(e,"negotiationneeded",(e=>{const i=e.target;if(!(t.version<72||i.getConfiguration&&"plan-b"===i.getConfiguration().sdpSemantics)||"stable"===i.signalingState)return e}))}var O=Object.freeze({__proto__:null,fixNegotiationNeeded:R,shimAddTrackRemoveTrack:T,shimAddTrackRemoveTrackWithNative:S,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"==typeof t?e.navigator.mediaDevices.getDisplayMedia=function(i){return t(i).then((t=>{const n=i.video&&i.video.width,r=i.video&&i.video.height,s=i.video&&i.video.frameRate;return i.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:s||3}},n&&(i.video.mandatory.maxWidth=n),r&&(i.video.mandatory.maxHeight=r),e.navigator.mediaDevices.getUserMedia(i)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))},shimGetSendersWithDtmf:C,shimGetStats:g,shimGetUserMedia:_,shimMediaStream:y,shimOnTrack:E,shimPeerConnection:A,shimSenderReceiverGetStats:w});function I(e,t){const i=e&&e.navigator,n=e&&e.MediaStreamTrack;if(i.getUserMedia=function(e,t,n){h("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),i.mediaDevices.getUserMedia(e).then(t,n)},!(t.version>55&&"autoGainControl"in i.mediaDevices.getSupportedConstraints())){const e=function(e,t,i){t in e&&!(i in e)&&(e[i]=e[t],delete e[t])},t=i.mediaDevices.getUserMedia.bind(i.mediaDevices);if(i.mediaDevices.getUserMedia=function(i){return"object"==typeof i&&"object"==typeof i.audio&&(i=JSON.parse(JSON.stringify(i)),e(i.audio,"autoGainControl","mozAutoGainControl"),e(i.audio,"noiseSuppression","mozNoiseSuppression")),t(i)},n&&n.prototype.getSettings){const t=n.prototype.getSettings;n.prototype.getSettings=function(){const i=t.apply(this,arguments);return e(i,"mozAutoGainControl","autoGainControl"),e(i,"mozNoiseSuppression","noiseSuppression"),i}}if(n&&n.prototype.applyConstraints){const t=n.prototype.applyConstraints;n.prototype.applyConstraints=function(i){return"audio"===this.kind&&"object"==typeof i&&(i=JSON.parse(JSON.stringify(i)),e(i,"autoGainControl","mozAutoGainControl"),e(i,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[i])}}}}function k(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function b(e,t){if("object"!=typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const i=e.RTCPeerConnection.prototype[t],n={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),i.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=n[t]}));const i={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,r,s]=arguments;return n.apply(this,[e||null]).then((e=>{if(t.version<53&&!r)try{e.forEach((e=>{e.type=i[e.type]||e.type}))}catch(t){if("TypeError"!==t.name)throw t;e.forEach(((t,n)=>{e.set(n,Object.assign({},t,{type:i[t.type]||t.type}))}))}return e})).then(r,s)}}function N(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const i=e.RTCPeerConnection.prototype.addTrack;i&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=i.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function L(e){if("object"!=typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),l(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function M(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){h("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function x(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function D(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const i=e.length>0;i&&e.forEach((e=>{if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const n=t.apply(this,arguments);if(i){const{sender:t}=n,i=t.getParameters();(!("encodings"in i)||1===i.encodings.length&&0===Object.keys(i.encodings[0]).length)&&(i.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(i).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return n})}function P(e){if("object"!=typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function U(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function B(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}var F=Object.freeze({__proto__:null,shimAddTransceiver:D,shimCreateAnswer:B,shimCreateOffer:U,shimGetDisplayMedia:function(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(i){if(!i||!i.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===i.video?i.video={mediaSource:t}:i.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(i)})},shimGetParameters:P,shimGetUserMedia:I,shimOnTrack:k,shimPeerConnection:b,shimRTCDataChannel:x,shimReceiverGetStats:L,shimRemoveStream:M,shimSenderGetStats:N});function V(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((i=>t.call(this,i,e))),e.getVideoTracks().forEach((i=>t.call(this,i,e)))},e.RTCPeerConnection.prototype.addTrack=function(e,...i){return i&&i.forEach((e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const i=e.getTracks();this.getSenders().forEach((e=>{i.includes(e.track)&&this.removeTrack(e)}))})}}function j(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const i=new Event("addstream");i.stream=t,e.dispatchEvent(i)}))}),t.apply(e,arguments)}}}function H(e){if("object"!=typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,i=t.createOffer,n=t.createAnswer,r=t.setLocalDescription,s=t.setRemoteDescription,o=t.addIceCandidate;t.createOffer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r},t.createAnswer=function(e,t){const i=arguments.length>=2?arguments[2]:arguments[0],r=n.apply(this,[i]);return t?(r.then(e,t),Promise.resolve()):r};let a=function(e,t,i){const n=r.apply(this,[e]);return i?(n.then(t,i),Promise.resolve()):n};t.setLocalDescription=a,a=function(e,t,i){const n=s.apply(this,[e]);return i?(n.then(t,i),Promise.resolve()):n},t.setRemoteDescription=a,a=function(e,t,i){const n=o.apply(this,[e]);return i?(n.then(t,i),Promise.resolve()):n},t.addIceCandidate=a}function $(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,i=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>i(z(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,i,n){t.mediaDevices.getUserMedia(e).then(i,n)}.bind(t))}function z(e){return e&&void 0!==e.video?Object.assign({},e,{video:m(e.video)}):e}function W(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,i){if(e&&e.iceServers){const t=[];for(let i=0;i<e.iceServers.length;i++){let n=e.iceServers[i];!n.hasOwnProperty("urls")&&n.hasOwnProperty("url")?(h("RTCIceServer.url","RTCIceServer.urls"),n=JSON.parse(JSON.stringify(n)),n.urls=n.url,delete n.url,t.push(n)):t.push(e.iceServers[i])}e.iceServers=t}return new t(e,i)},e.RTCPeerConnection.prototype=t.prototype,"generateCertificate"in t&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>t.generateCertificate})}function K(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function G(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const i=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&i?"sendrecv"===i.direction?i.setDirection?i.setDirection("sendonly"):i.direction="sendonly":"recvonly"===i.direction&&(i.setDirection?i.setDirection("inactive"):i.direction="inactive"):!0!==e.offerToReceiveVideo||i||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function Y(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var X=Object.freeze({__proto__:null,shimAudioContext:Y,shimCallbacksAPI:H,shimConstraints:z,shimCreateOfferLegacy:G,shimGetUserMedia:$,shimLocalStreamsAPI:V,shimRTCIceServerUrls:W,shimRemoteStreamsAPI:j,shimTrackEventTransceiver:K}),q="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function Z(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Q={exports:{}};!function(e){const t={generateIdentifier:function(){return Math.random().toString(36).substring(2,12)}};t.localCName=t.generateIdentifier(),t.splitLines=function(e){return e.trim().split("\n").map((e=>e.trim()))},t.splitSections=function(e){return e.split("\nm=").map(((e,t)=>(t>0?"m="+e:e).trim()+"\r\n"))},t.getDescription=function(e){const i=t.splitSections(e);return i&&i[0]},t.getMediaSections=function(e){const i=t.splitSections(e);return i.shift(),i},t.matchPrefix=function(e,i){return t.splitLines(e).filter((e=>0===e.indexOf(i)))},t.parseCandidate=function(e){let t;t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" ");const i={foundation:t[0],component:{1:"rtp",2:"rtcp"}[t[1]]||t[1],protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],address:t[4],port:parseInt(t[5],10),type:t[7]};for(let e=8;e<t.length;e+=2)switch(t[e]){case"raddr":i.relatedAddress=t[e+1];break;case"rport":i.relatedPort=parseInt(t[e+1],10);break;case"tcptype":i.tcpType=t[e+1];break;case"ufrag":i.ufrag=t[e+1],i.usernameFragment=t[e+1];break;default:void 0===i[t[e]]&&(i[t[e]]=t[e+1])}return i},t.writeCandidate=function(e){const t=[];t.push(e.foundation);const i=e.component;"rtp"===i?t.push(1):"rtcp"===i?t.push(2):t.push(i),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.address||e.ip),t.push(e.port);const n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(t.push("ufrag"),t.push(e.usernameFragment||e.ufrag)),"candidate:"+t.join(" ")},t.parseIceOptions=function(e){return e.substring(14).split(" ")},t.parseRtpMap=function(e){let t=e.substring(9).split(" ");const i={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),i.name=t[0],i.clockRate=parseInt(t[1],10),i.channels=3===t.length?parseInt(t[2],10):1,i.numChannels=i.channels,i},t.writeRtpMap=function(e){let t=e.payloadType;void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType);const i=e.channels||e.numChannels||1;return"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==i?"/"+i:"")+"\r\n"},t.parseExtmap=function(e){const t=e.substring(9).split(" ");return{id:parseInt(t[0],10),direction:t[0].indexOf("/")>0?t[0].split("/")[1]:"sendrecv",uri:t[1],attributes:t.slice(2).join(" ")}},t.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},t.parseFmtp=function(e){const t={};let i;const n=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<n.length;e++)i=n[e].trim().split("="),t[i[0].trim()]=i[1];return t},t.writeFmtp=function(e){let t="",i=e.payloadType;if(void 0!==e.preferredPayloadType&&(i=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){const n=[];Object.keys(e.parameters).forEach((t=>{void 0!==e.parameters[t]?n.push(t+"="+e.parameters[t]):n.push(t)})),t+="a=fmtp:"+i+" "+n.join(";")+"\r\n"}return t},t.parseRtcpFb=function(e){const t=e.substring(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},t.writeRtcpFb=function(e){let t="",i=e.payloadType;return void 0!==e.preferredPayloadType&&(i=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach((e=>{t+="a=rtcp-fb:"+i+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"})),t},t.parseSsrcMedia=function(e){const t=e.indexOf(" "),i={ssrc:parseInt(e.substring(7,t),10)},n=e.indexOf(":",t);return n>-1?(i.attribute=e.substring(t+1,n),i.value=e.substring(n+1)):i.attribute=e.substring(t+1),i},t.parseSsrcGroup=function(e){const t=e.substring(13).split(" ");return{semantics:t.shift(),ssrcs:t.map((e=>parseInt(e,10)))}},t.getMid=function(e){const i=t.matchPrefix(e,"a=mid:")[0];if(i)return i.substring(6)},t.parseFingerprint=function(e){const t=e.substring(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1].toUpperCase()}},t.getDtlsParameters=function(e,i){return{role:"auto",fingerprints:t.matchPrefix(e+i,"a=fingerprint:").map(t.parseFingerprint)}},t.writeDtlsParameters=function(e,t){let i="a=setup:"+t+"\r\n";return e.fingerprints.forEach((e=>{i+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"})),i},t.parseCryptoLine=function(e){const t=e.substring(9).split(" ");return{tag:parseInt(t[0],10),cryptoSuite:t[1],keyParams:t[2],sessionParams:t.slice(3)}},t.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?t.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},t.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;const t=e.substring(7).split("|");return{keyMethod:"inline",keySalt:t[0],lifeTime:t[1],mkiValue:t[2]?t[2].split(":")[0]:void 0,mkiLength:t[2]?t[2].split(":")[1]:void 0}},t.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},t.getCryptoParameters=function(e,i){return t.matchPrefix(e+i,"a=crypto:").map(t.parseCryptoLine)},t.getIceParameters=function(e,i){const n=t.matchPrefix(e+i,"a=ice-ufrag:")[0],r=t.matchPrefix(e+i,"a=ice-pwd:")[0];return n&&r?{usernameFragment:n.substring(12),password:r.substring(10)}:null},t.writeIceParameters=function(e){let t="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(t+="a=ice-lite\r\n"),t},t.parseRtpParameters=function(e){const i={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=t.splitLines(e)[0].split(" ");i.profile=n[2];for(let r=3;r<n.length;r++){const s=n[r],o=t.matchPrefix(e,"a=rtpmap:"+s+" ")[0];if(o){const n=t.parseRtpMap(o),r=t.matchPrefix(e,"a=fmtp:"+s+" ");switch(n.parameters=r.length?t.parseFmtp(r[0]):{},n.rtcpFeedback=t.matchPrefix(e,"a=rtcp-fb:"+s+" ").map(t.parseRtcpFb),i.codecs.push(n),n.name.toUpperCase()){case"RED":case"ULPFEC":i.fecMechanisms.push(n.name.toUpperCase())}}}t.matchPrefix(e,"a=extmap:").forEach((e=>{i.headerExtensions.push(t.parseExtmap(e))}));const r=t.matchPrefix(e,"a=rtcp-fb:* ").map(t.parseRtcpFb);return i.codecs.forEach((e=>{r.forEach((t=>{e.rtcpFeedback.find((e=>e.type===t.type&&e.parameter===t.parameter))||e.rtcpFeedback.push(t)}))})),i},t.writeRtpDescription=function(e,i){let n="";n+="m="+e+" ",n+=i.codecs.length>0?"9":"0",n+=" "+(i.profile||"UDP/TLS/RTP/SAVPF")+" ",n+=i.codecs.map((e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType)).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",i.codecs.forEach((e=>{n+=t.writeRtpMap(e),n+=t.writeFmtp(e),n+=t.writeRtcpFb(e)}));let r=0;return i.codecs.forEach((e=>{e.maxptime>r&&(r=e.maxptime)})),r>0&&(n+="a=maxptime:"+r+"\r\n"),i.headerExtensions&&i.headerExtensions.forEach((e=>{n+=t.writeExtmap(e)})),n},t.parseRtpEncodingParameters=function(e){const i=[],n=t.parseRtpParameters(e),r=-1!==n.fecMechanisms.indexOf("RED"),s=-1!==n.fecMechanisms.indexOf("ULPFEC"),o=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute)),a=o.length>0&&o[0].ssrc;let c;const l=t.matchPrefix(e,"a=ssrc-group:FID").map((e=>e.substring(17).split(" ").map((e=>parseInt(e,10)))));l.length>0&&l[0].length>1&&l[0][0]===a&&(c=l[0][1]),n.codecs.forEach((e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let t={ssrc:a,codecPayloadType:parseInt(e.parameters.apt,10)};a&&c&&(t.rtx={ssrc:c}),i.push(t),r&&(t=JSON.parse(JSON.stringify(t)),t.fec={ssrc:a,mechanism:s?"red+ulpfec":"red"},i.push(t))}})),0===i.length&&a&&i.push({ssrc:a});let d=t.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,i.forEach((e=>{e.maxBitrate=d}))),i},t.parseRtcpParameters=function(e){const i={},n=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"cname"===e.attribute))[0];n&&(i.cname=n.value,i.ssrc=n.ssrc);const r=t.matchPrefix(e,"a=rtcp-rsize");i.reducedSize=r.length>0,i.compound=0===r.length;const s=t.matchPrefix(e,"a=rtcp-mux");return i.mux=s.length>0,i},t.writeRtcpParameters=function(e){let t="";return e.reducedSize&&(t+="a=rtcp-rsize\r\n"),e.mux&&(t+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(t+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),t},t.parseMsid=function(e){let i;const n=t.matchPrefix(e,"a=msid:");if(1===n.length)return i=n[0].substring(7).split(" "),{stream:i[0],track:i[1]};const r=t.matchPrefix(e,"a=ssrc:").map((e=>t.parseSsrcMedia(e))).filter((e=>"msid"===e.attribute));return r.length>0?(i=r[0].value.split(" "),{stream:i[0],track:i[1]}):void 0},t.parseSctpDescription=function(e){const i=t.parseMLine(e),n=t.matchPrefix(e,"a=max-message-size:");let r;n.length>0&&(r=parseInt(n[0].substring(19),10)),isNaN(r)&&(r=65536);const s=t.matchPrefix(e,"a=sctp-port:");if(s.length>0)return{port:parseInt(s[0].substring(12),10),protocol:i.fmt,maxMessageSize:r};const o=t.matchPrefix(e,"a=sctpmap:");if(o.length>0){const e=o[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:r}}},t.writeSctpDescription=function(e,t){let i=[];return i="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+t.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+t.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+t.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+t.port+" "+t.protocol+" 65535\r\n"],void 0!==t.maxMessageSize&&i.push("a=max-message-size:"+t.maxMessageSize+"\r\n"),i.join("")},t.generateSessionId=function(){return Math.random().toString().substr(2,22)},t.writeSessionBoilerplate=function(e,i,n){let r;const s=void 0!==i?i:2;return r=e||t.generateSessionId(),"v=0\r\no="+(n||"thisisadapterortc")+" "+r+" "+s+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},t.getDirection=function(e,i){const n=t.splitLines(e);for(let e=0;e<n.length;e++)switch(n[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[e].substring(2)}return i?t.getDirection(i):"sendrecv"},t.getKind=function(e){return t.splitLines(e)[0].split(" ")[0].substring(2)},t.isRejected=function(e){return"0"===e.split(" ",2)[1]},t.parseMLine=function(e){const i=t.splitLines(e)[0].substring(2).split(" ");return{kind:i[0],port:parseInt(i[1],10),protocol:i[2],fmt:i.slice(3).join(" ")}},t.parseOLine=function(e){const i=t.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:i[0],sessionId:i[1],sessionVersion:parseInt(i[2],10),netType:i[3],addressType:i[4],address:i[5]}},t.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;const i=t.splitLines(e);for(let e=0;e<i.length;e++)if(i[e].length<2||"="!==i[e].charAt(1))return!1;return!0},e.exports=t}(Q);var J=Q.exports,ee=Z(J),te=e({__proto__:null,default:ee},[J]);function ne(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2)),e.candidate&&e.candidate.length){const i=new t(e),n=ee.parseCandidate(e.candidate),r=Object.assign(i,n);return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,l(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function re(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||l(e,"icecandidate",(e=>{if(e.candidate){const t=ee.parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e}))}function ie(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const i=function(e){if(!e||!e.sdp)return!1;const t=ee.splitSections(e.sdp);return t.shift(),t.some((e=>{const t=ee.parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))},n=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const i=parseInt(t[1],10);return i!=i?-1:i},r=function(e){let i=65536;return"firefox"===t.browser&&(i=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),i},s=function(e,i){let n=65536;"firefox"===t.browser&&57===t.version&&(n=65535);const r=ee.matchPrefix(e.sdp,"a=max-message-size:");return r.length>0?n=parseInt(r[0].substr(19),10):"firefox"===t.browser&&-1!==i&&(n=2147483637),n},o=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(i(arguments[0])){const e=n(arguments[0]),t=r(e),i=s(arguments[0],e);let o;o=0===t&&0===i?Number.POSITIVE_INFINITY:0===t||0===i?Math.max(t,i):Math.min(t,i);const a={};Object.defineProperty(a,"maxMessageSize",{get:()=>o}),this._sctp=a}return o.apply(this,arguments)}}function oe(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const i=e.send;e.send=function(){const n=arguments[0],r=n.length||n.size||n.byteLength;if("open"===e.readyState&&t.sctp&&r>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return i.apply(e,arguments)}}const i=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=i.apply(this,arguments);return t(e,this),e},l(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function ae(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const i=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const i=new Event("connectionstatechange",e);t.dispatchEvent(i)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),i.apply(this,arguments)}}))}function se(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const i=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const i=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:i}):t.sdp=i}return i.apply(this,arguments)}}function ce(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const i=e.RTCPeerConnection.prototype.addIceCandidate;i&&0!==i.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():i.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function le(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const i=e.RTCPeerConnection.prototype.setLocalDescription;i&&0!==i.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return i.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}return e.sdp||"offer"!==e.type&&"answer"!==e.type?i.apply(this,[e]):("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then((e=>i.apply(this,[e])))})}var de=Object.freeze({__proto__:null,removeExtmapAllowMixed:se,shimAddIceCandidateNullOrEmpty:ce,shimConnectionState:ae,shimMaxMessageSize:ie,shimParameterlessSetLocalDescription:le,shimRTCIceCandidate:ne,shimRTCIceCandidateRelayProtocol:re,shimSendThrowTypeError:oe});!function({window:e}={},t={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){const i=a,n=function(e){const t={browser:null,version:null};if(void 0===e||!e.navigator)return t.browser="Not a browser.",t;const{navigator:i}=e;if(i.mozGetUserMedia)t.browser="firefox",t.version=c(i.userAgent,/Firefox\/(\d+)\./,1);else if(i.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=c(i.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!i.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=c(i.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),r={browserDetails:n,commonShim:de,extractVersion:c,disableLog:s,disableWarnings:d,sdp:te};switch(n.browser){case"chrome":if(!O||!A||!t.shimChrome)return i("Chrome shim is not included in this adapter release."),r;if(null===n.version)return i("Chrome shim can not determine version, not shimming."),r;i("adapter.js shimming chrome."),r.browserShim=O,ce(e,n),le(e),_(e,n),y(e),A(e,n),E(e),T(e,n),C(e),g(e),w(e),R(e,n),ne(e),re(e),ae(e),ie(e,n),oe(e),se(e,n);break;case"firefox":if(!F||!b||!t.shimFirefox)return i("Firefox shim is not included in this adapter release."),r;i("adapter.js shimming firefox."),r.browserShim=F,ce(e,n),le(e),I(e,n),b(e,n),k(e),M(e),N(e),L(e),x(e),D(e),P(e),U(e),B(e),ne(e),ae(e),ie(e,n),oe(e);break;case"safari":if(!X||!t.shimSafari)return i("Safari shim is not included in this adapter release."),r;i("adapter.js shimming safari."),r.browserShim=X,ce(e,n),le(e),W(e),G(e),H(e),V(e),j(e),K(e),$(e),Y(e),ne(e),re(e),ie(e,n),oe(e),se(e,n);break;default:i("Unsupported browser!")}}({window:"undefined"==typeof window?void 0:window});var ue=function(e){try{return!!e()}catch(e){return!0}},he=!ue((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),fe=he,pe=Function.prototype,ge=pe.call,me=fe&&pe.bind.bind(ge,ge),ve=fe?me:function(e){return function(){return ge.apply(e,arguments)}},be=ve({}.isPrototypeOf),_e=function(e){return e&&e.Math==Math&&e},ye=_e("object"==typeof globalThis&&globalThis)||_e("object"==typeof window&&window)||_e("object"==typeof self&&self)||_e("object"==typeof q&&q)||function(){return this}()||q||Function("return this")(),Ee=he,Ce=Function.prototype,we=Ce.apply,Se=Ce.call,Te="object"==typeof Reflect&&Reflect.apply||(Ee?Se.bind(we):function(){return Se.apply(we,arguments)}),Ae=ve,Re=Ae({}.toString),Oe=Ae("".slice),Ie=function(e){return Oe(Re(e),8,-1)},ke=Ie,Ne=ve,Le=function(e){if("Function"===ke(e))return Ne(e)},Me="object"==typeof document&&document.all,xe={all:Me,IS_HTMLDDA:void 0===Me&&void 0!==Me},De=xe.all,Pe=xe.IS_HTMLDDA?function(e){return"function"==typeof e||e===De}:function(e){return"function"==typeof e},Ue={},Be=!ue((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Fe=he,Ve=Function.prototype.call,je=Fe?Ve.bind(Ve):function(){return Ve.apply(Ve,arguments)},He={},$e={}.propertyIsEnumerable,ze=Object.getOwnPropertyDescriptor,We=ze&&!$e.call({1:2},1);He.f=We?function(e){var t=ze(this,e);return!!t&&t.enumerable}:$e;var Ke,Ge,qe=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Ye=ue,Xe=Ie,Ze=Object,Qe=ve("".split),Je=Ye((function(){return!Ze("z").propertyIsEnumerable(0)}))?function(e){return"String"==Xe(e)?Qe(e,""):Ze(e)}:Ze,et=function(e){return null==e},tt=et,nt=TypeError,it=function(e){if(tt(e))throw nt("Can't call method on "+e);return e},ot=Je,at=it,st=function(e){return ot(at(e))},rt=Pe,ct=xe.all,lt=xe.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:rt(e)||e===ct}:function(e){return"object"==typeof e?null!==e:rt(e)},ut={},ht=ut,dt=ye,ft=Pe,pt=function(e){return ft(e)?e:void 0},gt=function(e,t){return arguments.length<2?pt(ht[e])||pt(dt[e]):ht[e]&&ht[e][t]||dt[e]&&dt[e][t]},mt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",vt=ye,bt=mt,_t=vt.process,yt=vt.Deno,Et=_t&&_t.versions||yt&&yt.version,Ct=Et&&Et.v8;Ct&&(Ge=(Ke=Ct.split("."))[0]>0&&Ke[0]<4?1:+(Ke[0]+Ke[1])),!Ge&&bt&&(!(Ke=bt.match(/Edge\/(\d+)/))||Ke[1]>=74)&&(Ke=bt.match(/Chrome\/(\d+)/))&&(Ge=+Ke[1]);var wt=Ge,St=wt,Tt=ue,At=ye.String,Rt=!!Object.getOwnPropertySymbols&&!Tt((function(){var e=Symbol();return!At(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&St&&St<41})),Ot=Rt&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,It=gt,kt=Pe,Nt=be,Lt=Object,Mt=Ot?function(e){return"symbol"==typeof e}:function(e){var t=It("Symbol");return kt(t)&&Nt(t.prototype,Lt(e))},xt=String,Dt=function(e){try{return xt(e)}catch(e){return"Object"}},Pt=Pe,Ut=Dt,Bt=TypeError,Ft=function(e){if(Pt(e))return e;throw Bt(Ut(e)+" is not a function")},Vt=Ft,jt=et,Ht=function(e,t){var i=e[t];return jt(i)?void 0:Vt(i)},$t=je,zt=Pe,Wt=lt,Kt=TypeError,Gt={exports:{}},qt=ye,Yt=Object.defineProperty,Xt=function(e,t){try{Yt(qt,e,{value:t,configurable:!0,writable:!0})}catch(n){qt[e]=t}return t},Zt="__core-js_shared__",Qt=ye[Zt]||Xt(Zt,{}),Jt=Qt;(Gt.exports=function(e,t){return Jt[e]||(Jt[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.31.1",mode:"pure",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.31.1/LICENSE",source:"https://github.com/zloirock/core-js"});var en=Gt.exports,tn=it,nn=Object,rn=function(e){return nn(tn(e))},on=rn,an=ve({}.hasOwnProperty),sn=Object.hasOwn||function(e,t){return an(on(e),t)},cn=ve,ln=0,dn=Math.random(),un=cn(1..toString),hn=function(e){return"Symbol("+(void 0===e?"":e)+")_"+un(++ln+dn,36)},fn=en,li=sn,pn=hn,gn=Rt,mn=Ot,vn=ye.Symbol,bn=fn("wks"),_n=mn?vn.for||vn:vn&&vn.withoutSetter||pn,yn=function(e){return li(bn,e)||(bn[e]=gn&&li(vn,e)?vn[e]:_n("Symbol."+e)),bn[e]},En=je,Cn=lt,wn=Mt,Sn=Ht,Tn=function(e,t){var i,n;if("string"===t&&zt(i=e.toString)&&!Wt(n=$t(i,e)))return n;if(zt(i=e.valueOf)&&!Wt(n=$t(i,e)))return n;if("string"!==t&&zt(i=e.toString)&&!Wt(n=$t(i,e)))return n;throw Kt("Can't convert object to primitive value")},An=TypeError,Rn=yn("toPrimitive"),On=function(e,t){if(!Cn(e)||wn(e))return e;var i,n=Sn(e,Rn);if(n){if(void 0===t&&(t="default"),i=En(n,e,t),!Cn(i)||wn(i))return i;throw An("Can't convert object to primitive value")}return void 0===t&&(t="number"),Tn(e,t)},In=Mt,kn=function(e){var t=On(e,"string");return In(t)?t:t+""},Nn=lt,Ln=ye.document,Mn=Nn(Ln)&&Nn(Ln.createElement),xn=function(e){return Mn?Ln.createElement(e):{}},Dn=xn,Pn=!Be&&!ue((function(){return 7!=Object.defineProperty(Dn("div"),"a",{get:function(){return 7}}).a})),Un=Be,Bn=je,Fn=He,Vn=qe,jn=st,Hn=kn,$n=sn,zn=Pn,Wn=Object.getOwnPropertyDescriptor;Ue.f=Un?Wn:function(e,t){if(e=jn(e),t=Hn(t),zn)try{return Wn(e,t)}catch(e){}if($n(e,t))return Vn(!Bn(Fn.f,e,t),e[t])};var Kn=ue,Gn=Pe,qn=/#|\.prototype\./,Yn=function(e,t){var i=Zn[Xn(e)];return i==Jn||i!=Qn&&(Gn(t)?Kn(t):!!t)},Xn=Yn.normalize=function(e){return String(e).replace(qn,".").toLowerCase()},Zn=Yn.data={},Qn=Yn.NATIVE="N",Jn=Yn.POLYFILL="P",er=Yn,nr=Ft,rr=he,ir=Le(Le.bind),or=function(e,t){return nr(e),void 0===t?e:rr?ir(e,t):function(){return e.apply(t,arguments)}},ar={},sr=Be&&ue((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),cr=lt,lr=String,dr=TypeError,ur=function(e){if(cr(e))return e;throw dr(lr(e)+" is not an object")},fr=Be,pr=Pn,gr=sr,mr=ur,vr=kn,_r=TypeError,yr=Object.defineProperty,Er=Object.getOwnPropertyDescriptor,Cr="enumerable",wr="configurable",Sr="writable";ar.f=fr?gr?function(e,t,i){if(mr(e),t=vr(t),mr(i),"function"==typeof e&&"prototype"===t&&"value"in i&&Sr in i&&!i[Sr]){var n=Er(e,t);n&&n[Sr]&&(e[t]=i.value,i={configurable:wr in i?i[wr]:n[wr],enumerable:Cr in i?i[Cr]:n[Cr],writable:!1})}return yr(e,t,i)}:yr:function(e,t,i){if(mr(e),t=vr(t),mr(i),pr)try{return yr(e,t,i)}catch(e){}if("get"in i||"set"in i)throw _r("Accessors not supported");return"value"in i&&(e[t]=i.value),e};var Tr=ar,Ar=qe,Rr=Be?function(e,t,i){return Tr.f(e,t,Ar(1,i))}:function(e,t,i){return e[t]=i,e},Or=ye,Ir=Te,kr=Le,Nr=Pe,Lr=Ue.f,Mr=er,xr=ut,Dr=or,Pr=Rr,Ur=sn,Br=function(e){var t=function(i,n,r){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(i);case 2:return new e(i,n)}return new e(i,n,r)}return Ir(e,this,arguments)};return t.prototype=e.prototype,t},Fr=function(e,t){var i,n,r,s,o,a,c,l,d,h=e.target,u=e.global,p=e.stat,f=e.proto,m=u?Or:p?Or[h]:(Or[h]||{}).prototype,v=u?xr:xr[h]||Pr(xr,h,{})[h],_=v.prototype;for(s in t)n=!(i=Mr(u?s:h+(p?".":"#")+s,e.forced))&&m&&Ur(m,s),a=v[s],n&&(c=e.dontCallGetSet?(d=Lr(m,s))&&d.value:m[s]),o=n&&c?c:t[s],n&&typeof a==typeof o||(l=e.bind&&n?Dr(o,Or):e.wrap&&n?Br(o):f&&Nr(o)?kr(o):o,(e.sham||o&&o.sham||a&&a.sham)&&Pr(l,"sham",!0),Pr(v,s,l),f&&(Ur(xr,r=h+"Prototype")||Pr(xr,r,{}),Pr(xr[r],s,o),e.real&&_&&(i||!_[s])&&Pr(_,s,o)))},Vr=Math.ceil,jr=Math.floor,Hr=Math.trunc||function(e){var t=+e;return(t>0?jr:Vr)(t)},$r=function(e){var t=+e;return t!=t||0===t?0:Hr(t)},zr=$r,Wr=Math.max,Kr=Math.min,Gr=function(e,t){var i=zr(e);return i<0?Wr(i+t,0):Kr(i,t)},qr=$r,Yr=Math.min,Xr=function(e){return e>0?Yr(qr(e),9007199254740991):0},Zr=function(e){return Xr(e.length)},Qr=st,Jr=Gr,ei=Zr,ti=function(e){return function(t,i,n){var r,s=Qr(t),o=ei(s),a=Jr(n,o);if(e&&i!=i){for(;o>a;)if((r=s[a++])!=r)return!0}else for(;o>a;a++)if((e||a in s)&&s[a]===i)return e||a||0;return!e&&-1}},ni={includes:ti(!0),indexOf:ti(!1)},ri=ni.includes;Fr({target:"Array",proto:!0,forced:ue((function(){return!Array(1).includes()}))},{includes:function(e){return ri(this,e,arguments.length>1?arguments[1]:void 0)}});var ii=ut,oi=function(e){return ii[e+"Prototype"]},tr=oi("Array").includes,ai=lt,si=Ie,ci=yn("match"),di=function(e){var t;return ai(e)&&(void 0!==(t=e[ci])?!!t:"RegExp"==si(e))},ui=TypeError,hi={};hi[yn("toStringTag")]="z";var fi="[object z]"===String(hi),pi=fi,gi=Pe,hr=Ie,mi=yn("toStringTag"),vi=Object,bi="Arguments"==hr(function(){return arguments}()),_i=pi?hr:function(e){var t,i,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(e){}}(t=vi(e),mi))?i:bi?hr(t):"Object"==(n=hr(t))&&gi(t.callee)?"Arguments":n},yi=_i,Ei=String,Ci=function(e){if("Symbol"===yi(e))throw TypeError("Cannot convert a Symbol value to a string");return Ei(e)},wi=yn("match"),Si=Fr,Ti=function(e){if(di(e))throw ui("The method doesn't accept regular expressions");return e},Ai=it,Ri=Ci,Oi=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[wi]=!1,"/./"[e](t)}catch(e){}}return!1},Ii=ve("".indexOf);Si({target:"String",proto:!0,forced:!Oi("includes")},{includes:function(e){return!!~Ii(Ri(Ai(this)),Ri(Ti(e)),arguments.length>1?arguments[1]:void 0)}});var ki=oi("String").includes,br=be,Ni=tr,Li=ki,Mi=Array.prototype,xi=String.prototype,Di=Z((function(e){var t=e.includes;return e===Mi||br(Mi,e)&&t===Mi.includes?Ni:"string"==typeof e||e===xi||br(xi,e)&&t===xi.includes?Li:t})),Pi={exports:{}},Ui=Fr,Bi=Be,Fi=ar.f;Ui({target:"Object",stat:!0,forced:Object.defineProperty!==Fi,sham:!Bi},{defineProperty:Fi});var Vi=ut.Object,ji=Pi.exports=function(e,t,i){return Vi.defineProperty(e,t,i)};Vi.defineProperty.sham&&(ji.sham=!0);var Hi=Z(Pi.exports),$i=Ie,zi=Array.isArray||function(e){return"Array"==$i(e)},Wi=TypeError,Ki=kn,Gi=ar,qi=qe,Yi=function(e,t,i){var n=Ki(t);n in e?Gi.f(e,n,qi(0,i)):e[n]=i},Xi=Pe,Zi=Qt,Qi=ve(Function.toString);Xi(Zi.inspectSource)||(Zi.inspectSource=function(e){return Qi(e)});var Ji=Zi.inspectSource,eo=ve,to=ue,no=Pe,ro=_i,io=Ji,oo=function(){},ao=[],so=gt("Reflect","construct"),co=/^\s*(?:class|function)\b/,lo=eo(co.exec),uo=!co.exec(oo),ho=function(e){if(!no(e))return!1;try{return so(oo,ao,e),!0}catch(e){return!1}},fo=function(e){if(!no(e))return!1;switch(ro(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return uo||!!lo(co,io(e))}catch(e){return!0}};fo.sham=!0;var po=!so||to((function(){var e;return ho(ho.call)||!ho(Object)||!ho((function(){e=!0}))||e}))?fo:ho,go=zi,mo=po,vo=lt,bo=yn("species"),_o=Array,yo=function(e){var t;return go(e)&&(t=e.constructor,(mo(t)&&(t===_o||go(t.prototype))||vo(t)&&null===(t=t[bo]))&&(t=void 0)),void 0===t?_o:t},Eo=function(e,t){return new(yo(e))(0===t?0:t)},Co=ue,wo=wt,So=yn("species"),To=Fr,Ao=ue,Ro=zi,Oo=lt,Io=rn,ko=Zr,No=function(e){if(e>9007199254740991)throw Wi("Maximum allowed index exceeded");return e},Lo=Yi,Mo=Eo,xo=function(e){return wo>=51||!Co((function(){var t=[];return(t.constructor={})[So]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},Do=wt,Po=yn("isConcatSpreadable"),Uo=Do>=51||!Ao((function(){var e=[];return e[Po]=!1,e.concat()[0]!==e})),Bo=function(e){if(!Oo(e))return!1;var t=e[Po];return void 0!==t?!!t:Ro(e)};To({target:"Array",proto:!0,arity:1,forced:!Uo||!xo("concat")},{concat:function(e){var t,i,n,r,s,o=Io(this),a=Mo(o,0),c=0;for(t=-1,n=arguments.length;t<n;t++)if(Bo(s=-1===t?o:arguments[t]))for(r=ko(s),No(c+r),i=0;i<r;i++,c++)i in s&&Lo(a,c,s[i]);else No(c+1),Lo(a,c++,s);return a.length=c,a}});var Fo={},Vo={},jo=sn,Ho=st,$o=ni.indexOf,zo=Vo,Wo=ve([].push),Ko=function(e,t){var i,n=Ho(e),r=0,s=[];for(i in n)!jo(zo,i)&&jo(n,i)&&Wo(s,i);for(;t.length>r;)jo(n,i=t[r++])&&(~$o(s,i)||Wo(s,i));return s},Go=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],qo=Ko,Yo=Go,Xo=Object.keys||function(e){return qo(e,Yo)},Zo=Be,Qo=sr,Jo=ar,ea=ur,ta=st,na=Xo;Fo.f=Zo&&!Qo?Object.defineProperties:function(e,t){ea(e);for(var i,n=ta(t),r=na(t),s=r.length,o=0;s>o;)Jo.f(e,i=r[o++],n[i]);return e};var ra,ia=gt("document","documentElement"),oa=hn,aa=en("keys"),sa=function(e){return aa[e]||(aa[e]=oa(e))},ca=ur,la=Fo,da=Go,ua=Vo,ha=ia,fa=xn,pa="prototype",ga="script",ma=sa("IE_PROTO"),va=function(){},ba=function(e){return"<"+ga+">"+e+"</"+ga+">"},_a=function(e){e.write(ba("")),e.close();var t=e.parentWindow.Object;return e=null,t},ya=function(){try{ra=new ActiveXObject("htmlfile")}catch(e){}var e,t,i;ya="undefined"!=typeof document?document.domain&&ra?_a(ra):(t=fa("iframe"),i="java"+ga+":",t.style.display="none",ha.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(ba("document.F=Object")),e.close(),e.F):_a(ra);for(var n=da.length;n--;)delete ya[pa][da[n]];return ya()};ua[ma]=!0;var Ea=Object.create||function(e,t){var i;return null!==e?(va[pa]=ca(e),i=new va,va[pa]=null,i[ma]=e):i=ya(),void 0===t?i:la.f(i,t)},Ca={},wa=Ko,Sa=Go.concat("length","prototype");Ca.f=Object.getOwnPropertyNames||function(e){return wa(e,Sa)};var Ta={},Aa=Gr,Ra=Zr,Oa=Yi,Ia=Array,ka=Math.max,Na=function(e,t,i){for(var n=Ra(e),r=Aa(t,n),s=Aa(void 0===i?n:i,n),o=Ia(ka(s-r,0)),a=0;r<s;r++,a++)Oa(o,a,e[r]);return o.length=a,o},La=Ie,Ma=st,xa=Ca.f,Da=Na,Pa="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];Ta.f=function(e){return Pa&&"Window"==La(e)?function(e){try{return xa(e)}catch(e){return Da(Pa)}}(e):xa(Ma(e))};var Ua={};Ua.f=Object.getOwnPropertySymbols;var Ba=Rr,Fa=function(e,t,i,n){return n&&n.enumerable?e[t]=i:Ba(e,t,i),e},Va=ar,ja=function(e,t,i){return Va.f(e,t,i)},Ha={},$a=yn;Ha.f=$a;var za,Wa,Ka,Ga=ut,qa=sn,Ya=Ha,Xa=ar.f,Za=function(e){var t=Ga.Symbol||(Ga.Symbol={});qa(t,e)||Xa(t,e,{value:Ya.f(e)})},Qa=je,Ja=gt,es=yn,ts=Fa,ns=function(){var e=Ja("Symbol"),t=e&&e.prototype,i=t&&t.valueOf,n=es("toPrimitive");t&&!t[n]&&ts(t,n,(function(e){return Qa(i,this)}),{arity:1})},rs=_i,is=fi?{}.toString:function(){return"[object "+rs(this)+"]"},os=fi,as=ar.f,ss=Rr,cs=sn,ls=is,ds=yn("toStringTag"),us=function(e,t,i,n){if(e){var r=i?e:e.prototype;cs(r,ds)||as(r,ds,{configurable:!0,value:t}),n&&!os&&ss(r,"toString",ls)}},hs=Pe,fs=ye.WeakMap,ps=hs(fs)&&/native code/.test(String(fs)),gs=ye,ms=lt,vs=Rr,bs=sn,_s=Qt,ys=sa,Es=Vo,Cs="Object already initialized",ws=gs.TypeError,Ss=gs.WeakMap;if(ps||_s.state){var Ts=_s.state||(_s.state=new Ss);Ts.get=Ts.get,Ts.has=Ts.has,Ts.set=Ts.set,za=function(e,t){if(Ts.has(e))throw ws(Cs);return t.facade=e,Ts.set(e,t),t},Wa=function(e){return Ts.get(e)||{}},Ka=function(e){return Ts.has(e)}}else{var As=ys("state");Es[As]=!0,za=function(e,t){if(bs(e,As))throw ws(Cs);return t.facade=e,vs(e,As,t),t},Wa=function(e){return bs(e,As)?e[As]:{}},Ka=function(e){return bs(e,As)}}var Rs={set:za,get:Wa,has:Ka,enforce:function(e){return Ka(e)?Wa(e):za(e,{})},getterFor:function(e){return function(t){var i;if(!ms(t)||(i=Wa(t)).type!==e)throw ws("Incompatible receiver, "+e+" required");return i}}},Os=or,Is=Je,ks=rn,Ns=Zr,Ls=Eo,Ms=ve([].push),xs=function(e){var t=1==e,i=2==e,n=3==e,r=4==e,s=6==e,o=7==e,a=5==e||s;return function(c,l,d,h){for(var u,p,f=ks(c),m=Is(f),v=Os(l,d),_=Ns(m),g=0,y=h||Ls,E=t?y(c,_):i||o?y(c,0):void 0;_>g;g++)if((a||g in m)&&(p=v(u=m[g],g,f),e))if(t)E[g]=p;else if(p)switch(e){case 3:return!0;case 5:return u;case 6:return g;case 2:Ms(E,u)}else switch(e){case 4:return!1;case 7:Ms(E,u)}return s?-1:n||r?r:E}},Ds={forEach:xs(0),map:xs(1),filter:xs(2),some:xs(3),every:xs(4),find:xs(5),findIndex:xs(6),filterReject:xs(7)},Ps=Fr,Us=ye,Bs=je,Fs=ve,Vs=Be,js=Rt,Hs=ue,$s=sn,zs=be,Ws=ur,Ks=st,Gs=kn,qs=Ci,Ys=qe,Xs=Ea,Zs=Xo,Qs=Ca,Js=Ta,ec=Ua,tc=Ue,nc=ar,rc=Fo,ic=He,oc=Fa,ac=ja,sc=en,cc=Vo,lc=hn,dc=yn,uc=Ha,hc=Za,fc=ns,pc=us,gc=Rs,mc=Ds.forEach,vc=sa("hidden"),bc="Symbol",_c="prototype",yc=gc.set,Ec=gc.getterFor(bc),Cc=Object[_c],wc=Us.Symbol,Sc=wc&&wc[_c],Tc=Us.TypeError,Ac=Us.QObject,Rc=tc.f,Oc=nc.f,Ic=Js.f,kc=ic.f,Nc=Fs([].push),Lc=sc("symbols"),Mc=sc("op-symbols"),xc=sc("wks"),Dc=!Ac||!Ac[_c]||!Ac[_c].findChild,Pc=Vs&&Hs((function(){return 7!=Xs(Oc({},"a",{get:function(){return Oc(this,"a",{value:7}).a}})).a}))?function(e,t,i){var n=Rc(Cc,t);n&&delete Cc[t],Oc(e,t,i),n&&e!==Cc&&Oc(Cc,t,n)}:Oc,Uc=function(e,t){var i=Lc[e]=Xs(Sc);return yc(i,{type:bc,tag:e,description:t}),Vs||(i.description=t),i},Bc=function(e,t,i){e===Cc&&Bc(Mc,t,i),Ws(e);var n=Gs(t);return Ws(i),$s(Lc,n)?(i.enumerable?($s(e,vc)&&e[vc][n]&&(e[vc][n]=!1),i=Xs(i,{enumerable:Ys(0,!1)})):($s(e,vc)||Oc(e,vc,Ys(1,{})),e[vc][n]=!0),Pc(e,n,i)):Oc(e,n,i)},Fc=function(e,t){Ws(e);var i=Ks(t),n=Zs(i).concat($c(i));return mc(n,(function(t){Vs&&!Bs(Vc,i,t)||Bc(e,t,i[t])})),e},Vc=function(e){var t=Gs(e),i=Bs(kc,this,t);return!(this===Cc&&$s(Lc,t)&&!$s(Mc,t))&&(!(i||!$s(this,t)||!$s(Lc,t)||$s(this,vc)&&this[vc][t])||i)},jc=function(e,t){var i=Ks(e),n=Gs(t);if(i!==Cc||!$s(Lc,n)||$s(Mc,n)){var r=Rc(i,n);return!r||!$s(Lc,n)||$s(i,vc)&&i[vc][n]||(r.enumerable=!0),r}},Hc=function(e){var t=Ic(Ks(e)),i=[];return mc(t,(function(e){$s(Lc,e)||$s(cc,e)||Nc(i,e)})),i},$c=function(e){var t=e===Cc,i=Ic(t?Mc:Ks(e)),n=[];return mc(i,(function(e){!$s(Lc,e)||t&&!$s(Cc,e)||Nc(n,Lc[e])})),n};js||(oc(Sc=(wc=function(){if(zs(Sc,this))throw Tc("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?qs(arguments[0]):void 0,t=lc(e),i=function(e){this===Cc&&Bs(i,Mc,e),$s(this,vc)&&$s(this[vc],t)&&(this[vc][t]=!1),Pc(this,t,Ys(1,e))};return Vs&&Dc&&Pc(Cc,t,{configurable:!0,set:i}),Uc(t,e)})[_c],"toString",(function(){return Ec(this).tag})),oc(wc,"withoutSetter",(function(e){return Uc(lc(e),e)})),ic.f=Vc,nc.f=Bc,rc.f=Fc,tc.f=jc,Qs.f=Js.f=Hc,ec.f=$c,uc.f=function(e){return Uc(dc(e),e)},Vs&&ac(Sc,"description",{configurable:!0,get:function(){return Ec(this).description}})),Ps({global:!0,constructor:!0,wrap:!0,forced:!js,sham:!js},{Symbol:wc}),mc(Zs(xc),(function(e){hc(e)})),Ps({target:bc,stat:!0,forced:!js},{useSetter:function(){Dc=!0},useSimple:function(){Dc=!1}}),Ps({target:"Object",stat:!0,forced:!js,sham:!Vs},{create:function(e,t){return void 0===t?Xs(e):Fc(Xs(e),t)},defineProperty:Bc,defineProperties:Fc,getOwnPropertyDescriptor:jc}),Ps({target:"Object",stat:!0,forced:!js},{getOwnPropertyNames:Hc}),fc(),pc(wc,bc),cc[vc]=!0;var zc=Rt&&!!Symbol.for&&!!Symbol.keyFor,Wc=Fr,Kc=gt,Gc=sn,qc=Ci,Yc=en,Xc=zc,Zc=Yc("string-to-symbol-registry"),Qc=Yc("symbol-to-string-registry");Wc({target:"Symbol",stat:!0,forced:!Xc},{for:function(e){var t=qc(e);if(Gc(Zc,t))return Zc[t];var i=Kc("Symbol")(t);return Zc[t]=i,Qc[i]=t,i}});var Jc=Fr,el=sn,tl=Mt,nl=Dt,rl=zc,td=en("symbol-to-string-registry");Jc({target:"Symbol",stat:!0,forced:!rl},{keyFor:function(e){if(!tl(e))throw TypeError(nl(e)+" is not a symbol");if(el(td,e))return td[e]}});var il=ve([].slice),al=zi,sl=Pe,cl=Ie,ll=Ci,hl=ve([].push),fl=Fr,dd=gt,pl=Te,gl=je,ml=ve,vl=ue,bl=Pe,_l=Mt,yl=il,El=function(e){if(sl(e))return e;if(al(e)){for(var t=e.length,i=[],n=0;n<t;n++){var r=e[n];"string"==typeof r?hl(i,r):"number"!=typeof r&&"Number"!=cl(r)&&"String"!=cl(r)||hl(i,ll(r))}var s=i.length,o=!0;return function(e,t){if(o)return o=!1,t;if(al(this))return t;for(var n=0;n<s;n++)if(i[n]===e)return t}}},Cl=Rt,wl=String,Sl=dd("JSON","stringify"),Tl=ml(/./.exec),Al=ml("".charAt),Rl=ml("".charCodeAt),Ol=ml("".replace),Il=ml(1..toString),kl=/[\uD800-\uDFFF]/g,Nl=/^[\uD800-\uDBFF]$/,Ll=/^[\uDC00-\uDFFF]$/,Ml=!Cl||vl((function(){var e=dd("Symbol")();return"[null]"!=Sl([e])||"{}"!=Sl({a:e})||"{}"!=Sl(Object(e))})),xl=vl((function(){return'"\\udf06\\ud834"'!==Sl("\udf06\ud834")||'"\\udead"'!==Sl("\udead")})),Dl=function(e,t){var i=yl(arguments),n=El(t);if(bl(n)||void 0!==e&&!_l(e))return i[1]=function(e,t){if(bl(n)&&(t=gl(n,this,wl(e),t)),!_l(t))return t},pl(Sl,null,i)},Pl=function(e,t,i){var n=Al(i,t-1),r=Al(i,t+1);return Tl(Nl,e)&&!Tl(Ll,r)||Tl(Ll,e)&&!Tl(Nl,n)?"\\u"+Il(Rl(e,0),16):e};Sl&&fl({target:"JSON",stat:!0,arity:3,forced:Ml||xl},{stringify:function(e,t,i){var n=yl(arguments),r=pl(Ml?Dl:Sl,null,n);return xl&&"string"==typeof r?Ol(r,kl,Pl):r}});var Ul=Ua,Bl=rn;Fr({target:"Object",stat:!0,forced:!Rt||ue((function(){Ul.f(1)}))},{getOwnPropertySymbols:function(e){var t=Ul.f;return t?t(Bl(e)):[]}}),Za("asyncIterator"),Za("hasInstance"),Za("isConcatSpreadable"),Za("iterator"),Za("match"),Za("matchAll"),Za("replace"),Za("search"),Za("species"),Za("split");var Fl=ns;Za("toPrimitive"),Fl();var Vl=gt,jl=us;Za("toStringTag"),jl(Vl("Symbol"),"Symbol"),Za("unscopables"),us(ye.JSON,"JSON",!0);var Hl,$l,zl,Wl=ut.Symbol,Kl={},Gl=Be,ql=sn,Yl=Function.prototype,Xl=Gl&&Object.getOwnPropertyDescriptor,Zl=ql(Yl,"name"),Ql={EXISTS:Zl,PROPER:Zl&&"something"===function(){}.name,CONFIGURABLE:Zl&&(!Gl||Gl&&Xl(Yl,"name").configurable)},Jl=!ue((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),ed=sn,nd=Pe,rd=rn,id=Jl,od=sa("IE_PROTO"),ad=Object,sd=ad.prototype,cd=id?ad.getPrototypeOf:function(e){var t=rd(e);if(ed(t,od))return t[od];var i=t.constructor;return nd(i)&&t instanceof i?i.prototype:t instanceof ad?sd:null},ld=ue,ud=Pe,ol=lt,hd=Ea,fd=cd,dl=Fa,pd=yn("iterator"),gd=!1;[].keys&&("next"in(zl=[].keys())?($l=fd(fd(zl)))!==Object.prototype&&(Hl=$l):gd=!0);var ul=!ol(Hl)||ld((function(){var e={};return Hl[pd].call(e)!==e}));ud((Hl=ul?{}:hd(Hl))[pd])||dl(Hl,pd,(function(){return this}));var md={IteratorPrototype:Hl,BUGGY_SAFARI_ITERATORS:gd},vd=md.IteratorPrototype,bd=Ea,_d=qe,yd=us,Ed=Kl,Cd=function(){return this},wd=ve,Sd=Ft,Td=Pe,Ad=String,Rd=TypeError,Od=function(e,t,i){try{return wd(Sd(Object.getOwnPropertyDescriptor(e,t)[i]))}catch(e){}},Id=ur,kd=function(e){if("object"==typeof e||Td(e))return e;throw Rd("Can't set "+Ad(e)+" as a prototype")},Nd=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,i={};try{(e=Od(Object.prototype,"__proto__","set"))(i,[]),t=i instanceof Array}catch(e){}return function(i,n){return Id(i),kd(n),t?e(i,n):i.__proto__=n,i}}():void 0),Ld=Fr,Md=je,xd=function(e,t,i,n){var r=t+" Iterator";return e.prototype=bd(vd,{next:_d(+!n,i)}),yd(e,r,!1,!0),Ed[r]=Cd,e},Dd=cd,Pd=us,Ud=Fa,Bd=Kl,Fd=md,Vd=Ql.PROPER,jd=Fd.BUGGY_SAFARI_ITERATORS,Hd=yn("iterator"),$d="keys",zd="values",Wd="entries",Kd=function(){return this},Gd=function(e,t,i,n,r,s,o){xd(i,t,n);var a,c,l,d=function(e){if(e===r&&m)return m;if(!jd&&e in p)return p[e];switch(e){case $d:case zd:case Wd:return function(){return new i(this,e)}}return function(){return new i(this)}},h=t+" Iterator",u=!1,p=e.prototype,f=p[Hd]||p["@@iterator"]||r&&p[r],m=!jd&&f||d(r),v="Array"==t&&p.entries||f;if(v&&(a=Dd(v.call(new e)))!==Object.prototype&&a.next&&(Pd(a,h,!0,!0),Bd[h]=Kd),Vd&&r==zd&&f&&f.name!==zd&&(u=!0,m=function(){return Md(f,this)}),r)if(c={values:d(zd),keys:s?m:d($d),entries:d(Wd)},o)for(l in c)(jd||u||!(l in p))&&Ud(p,l,c[l]);else Ld({target:t,proto:!0,forced:jd||u},c);return o&&p[Hd]!==m&&Ud(p,Hd,m,{name:r}),Bd[t]=m,c},qd=function(e,t){return{value:e,done:t}},Yd=st,Xd=Kl,Zd=Rs;ar.f;var Qd=Gd,Jd=qd,eu="Array Iterator",tu=Zd.set,nu=Zd.getterFor(eu);Qd(Array,"Array",(function(e,t){tu(this,{type:eu,target:Yd(e),index:0,kind:t})}),(function(){var e=nu(this),t=e.target,i=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,Jd(void 0,!0)):Jd("keys"==i?n:"values"==i?t[n]:[n,t[n]],!1)}),"values"),Xd.Arguments=Xd.Array;var th={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},ru=ye,iu=_i,ou=Rr,au=Kl,su=yn("toStringTag");for(var cu in th){var lu=ru[cu],du=lu&&lu.prototype;du&&iu(du)!==su&&ou(du,su,cu),au[cu]=au.Array}var uu=Wl,hu=yn,fu=ar.f,pu=hu("metadata"),gu=Function.prototype;void 0===gu[pu]&&fu(gu,pu,{value:null}),Za("dispose"),Za("metadata");var mu=uu;Za("asyncDispose");var vu=ve,bu=gt("Symbol"),_u=bu.keyFor,yu=vu(bu.prototype.valueOf),Eu=bu.isRegisteredSymbol||function(e){try{return void 0!==_u(yu(e))}catch(e){return!1}};Fr({target:"Symbol",stat:!0},{isRegisteredSymbol:Eu});for(var Cu=en,wu=gt,Su=ve,Tu=Mt,Au=yn,Ru=wu("Symbol"),Ou=Ru.isWellKnownSymbol,Iu=wu("Object","getOwnPropertyNames"),ku=Su(Ru.prototype.valueOf),Nu=Cu("wks"),Lu=0,Mu=Iu(Ru),xu=Mu.length;Lu<xu;Lu++)try{var Du=Mu[Lu];Tu(Ru[Du])&&Au(Du)}catch(e){}var Pu=function(e){if(Ou&&Ou(e))return!0;try{for(var t=ku(e),i=0,n=Iu(Nu),r=n.length;i<r;i++)if(Nu[n[i]]==t)return!0}catch(e){}return!1};Fr({target:"Symbol",stat:!0,forced:!0},{isWellKnownSymbol:Pu}),Za("matcher"),Za("observable"),Fr({target:"Symbol",stat:!0,name:"isRegisteredSymbol"},{isRegistered:Eu}),Fr({target:"Symbol",stat:!0,name:"isWellKnownSymbol",forced:!0},{isWellKnown:Pu}),Za("metadataKey"),Za("patternMatch"),Za("replaceAll");var Uu=Z(mu),Bu=ve,Fu=$r,Vu=Ci,ju=it,Hu=Bu("".charAt),$u=Bu("".charCodeAt),zu=Bu("".slice),Wu=function(e){return function(t,i){var n,r,s=Vu(ju(t)),o=Fu(i),a=s.length;return o<0||o>=a?e?"":void 0:(n=$u(s,o))<55296||n>56319||o+1===a||(r=$u(s,o+1))<56320||r>57343?e?Hu(s,o):n:e?zu(s,o,o+2):r-56320+(n-55296<<10)+65536}},Ku=(Wu(!1),Wu(!0)),Gu=Ci,qu=Rs,Yu=Gd,Xu=qd,Zu="String Iterator",Qu=qu.set,Ju=qu.getterFor(Zu);Yu(String,"String",(function(e){Qu(this,{type:Zu,string:Gu(e),index:0})}),(function(){var e,t=Ju(this),i=t.string,n=t.index;return n>=i.length?Xu(void 0,!0):(e=Ku(i,n),t.index+=e.length,Xu(e,!1))}));var eh=Z(Ha.f("iterator"));function nh(e){return(nh="function"==typeof Uu&&"symbol"==typeof eh?function(e){return typeof e}:function(e){return e&&"function"==typeof Uu&&e.constructor===Uu&&e!==Uu.prototype?"symbol":typeof e})(e)}var rh=Z(Ha.f("toPrimitive"));function ih(e){var t=function(e,t){if("object"!==nh(e)||null===e)return e;var i=e[rh];if(void 0!==i){var n=i.call(e,t||"default");if("object"!==nh(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===nh(t)?t:String(t)}function oh(e,t,i){return(t=ih(t))in e?Hi(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}var ah=oi("Array").keys,sh=_i,ch=sn,lh=be,dh=ah,uh=Array.prototype,hh={DOMTokenList:!0,NodeList:!0},fh=Z((function(e){var t=e.keys;return e===uh||lh(uh,e)&&t===uh.keys||ch(hh,sh(e))?dh:t})),ph=Dt,gh=TypeError,mh=Na,vh=Math.floor,bh=function(e,t){var i=e.length,n=vh(i/2);return i<8?_h(e,t):yh(e,bh(mh(e,0,n),t),bh(mh(e,n),t),t)},_h=function(e,t){for(var i,n,r=e.length,s=1;s<r;){for(n=s,i=e[s];n&&t(e[n-1],i)>0;)e[n]=e[--n];n!==s++&&(e[n]=i)}return e},yh=function(e,t,i,n){for(var r=t.length,s=i.length,o=0,a=0;o<r||a<s;)e[o+a]=o<r&&a<s?n(t[o],i[a])<=0?t[o++]:i[a++]:o<r?t[o++]:i[a++];return e},Eh=bh,Ch=ue,wh=function(e,t){var i=[][e];return!!i&&Ch((function(){i.call(null,t||function(){return 1},1)}))},Sh=mt.match(/firefox\/(\d+)/i),Th=!!Sh&&+Sh[1],Ah=/MSIE|Trident/.test(mt),Rh=mt.match(/AppleWebKit\/(\d+)\./),Oh=!!Rh&&+Rh[1],Ih=Fr,kh=ve,Nh=Ft,Lh=rn,Mh=Zr,xh=function(e,t){if(!delete e[t])throw gh("Cannot delete property "+ph(t)+" of "+ph(e))},Dh=Ci,Ph=ue,Uh=Eh,Bh=wh,Fh=Th,Vh=Ah,jh=wt,Hh=Oh,$h=[],zh=kh($h.sort),Wh=kh($h.push),Kh=Ph((function(){$h.sort(void 0)})),Gh=Ph((function(){$h.sort(null)})),qh=Bh("sort"),Yh=!Ph((function(){if(jh)return jh<70;if(!(Fh&&Fh>3)){if(Vh)return!0;if(Hh)return Hh<603;var e,t,i,n,r="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(n=0;n<47;n++)$h.push({k:t+n,v:i})}for($h.sort((function(e,t){return t.v-e.v})),n=0;n<$h.length;n++)t=$h[n].k.charAt(0),r.charAt(r.length-1)!==t&&(r+=t);return"DGBEFHACIJK"!==r}}));Ih({target:"Array",proto:!0,forced:Kh||!Gh||!qh||!Yh},{sort:function(e){void 0!==e&&Nh(e);var t=Lh(this);if(Yh)return void 0===e?zh(t):zh(t,e);var i,n,r=[],s=Mh(t);for(n=0;n<s;n++)n in t&&Wh(r,t[n]);for(Uh(r,function(e){return function(t,i){return void 0===i?-1:void 0===t?1:void 0!==e?+e(t,i)||0:Dh(t)>Dh(i)?1:-1}}(e)),i=Mh(r),n=0;n<i;)t[n]=r[n++];for(;n<s;)xh(t,n++);return t}});var Xh=oi("Array").sort,Zh=be,Qh=Xh,Jh=Array.prototype,ef=Z((function(e){var t=e.sort;return e===Jh||Zh(Jh,e)&&t===Jh.sort?Qh:t})),tf=gt,nf=Ca,rf=Ua,of=ur,af=ve([].concat),rp=tf("Reflect","ownKeys")||function(e){var t=nf.f(of(e)),i=rf.f;return i?af(t,i(e)):t},sf=sn,cf=rp,lf=Ue,df=ar,uf=lt,hf=Rr,ff=Error,pf=ve("".replace),gf=String(ff("zxcasd").stack),mf=/\n\s*at [^:]*:[^\n]*/,vf=mf.test(gf),bf=qe,_f=!ue((function(){var e=Error("a");return!("stack"in e)||(Object.defineProperty(e,"stack",bf(1,7)),7!==e.stack)})),yf=Rr,Ef=function(e,t){if(vf&&"string"==typeof e&&!ff.prepareStackTrace)for(;t--;)e=pf(e,mf,"");return e},Cf=_f,wf=Error.captureStackTrace,Sf=Kl,Tf=yn("iterator"),Af=Array.prototype,Rf=_i,Of=Ht,If=et,kf=Kl,Nf=yn("iterator"),Lf=function(e){if(!If(e))return Of(e,Nf)||Of(e,"@@iterator")||kf[Rf(e)]},Mf=je,xf=Ft,Df=ur,Pf=Dt,Uf=Lf,Bf=TypeError,Ff=je,Vf=ur,jf=Ht,Hf=or,$f=je,zf=ur,Wf=Dt,Kf=function(e){return void 0!==e&&(Sf.Array===e||Af[Tf]===e)},Gf=Zr,qf=be,Yf=function(e,t){var i=arguments.length<2?Uf(e):t;if(xf(i))return Df(Mf(i,e));throw Bf(Pf(e)+" is not iterable")},Xf=Lf,Zf=function(e,t,i){var n,r;Vf(e);try{if(!(n=jf(e,"return"))){if("throw"===t)throw i;return i}n=Ff(n,e)}catch(e){r=!0,n=e}if("throw"===t)throw i;if(r)throw n;return Vf(n),i},Qf=TypeError,Jf=function(e,t){this.stopped=e,this.result=t},ep=Jf.prototype,tp=function(e,t,i){var n,r,s,o,a,c,l,d=i&&i.that,h=!(!i||!i.AS_ENTRIES),u=!(!i||!i.IS_RECORD),p=!(!i||!i.IS_ITERATOR),f=!(!i||!i.INTERRUPTED),m=Hf(t,d),v=function(e){return n&&Zf(n,"normal",e),new Jf(!0,e)},_=function(e){return h?(zf(e),f?m(e[0],e[1],v):m(e[0],e[1])):f?m(e,v):m(e)};if(u)n=e.iterator;else if(p)n=e;else{if(!(r=Xf(e)))throw Qf(Wf(e)+" is not iterable");if(Kf(r)){for(s=0,o=Gf(e);o>s;s++)if((a=_(e[s]))&&qf(ep,a))return a;return new Jf(!1)}n=Yf(e,r)}for(c=u?e.next:n.next;!(l=$f(c,n)).done;){try{a=_(l.value)}catch(e){Zf(n,"throw",e)}if("object"==typeof a&&a&&qf(ep,a))return a}return new Jf(!1)},np=Ci,ip=Fr,op=be,ap=cd,sp=Nd,cp=function(e,t,i){for(var n=cf(t),r=df.f,s=lf.f,o=0;o<n.length;o++){var a=n[o];sf(e,a)||i&&sf(i,a)||r(e,a,s(t,a))}},lp=Ea,dp=Rr,up=qe,hp=function(e,t){uf(t)&&"cause"in t&&hf(e,"cause",t.cause)},fp=function(e,t,i,n){Cf&&(wf?wf(e,t):yf(e,"stack",Ef(i,n)))},pp=tp,gp=function(e,t){return void 0===e?arguments.length<2?"":t:np(e)},mp=yn("toStringTag"),vp=Error,bp=[].push,_p=function(e,t){var i,n=op(yp,this);sp?i=sp(vp(),n?ap(this):yp):(i=n?this:lp(yp),dp(i,mp,"Error")),void 0!==t&&dp(i,"message",gp(t)),fp(i,_p,i.stack,1),arguments.length>2&&hp(i,arguments[2]);var r=[];return pp(e,bp,{that:r}),dp(i,"errors",r),i};sp?sp(_p,vp):cp(_p,vp,{name:!0});var yp=_p.prototype=lp(vp.prototype,{constructor:up(1,_p),message:up(1,""),name:up(1,"AggregateError")});ip({global:!0,constructor:!0,arity:2},{AggregateError:_p});var Ep,Cp,wp,Sp,Tp=void 0!==n&&"process"==Ie(n),Ap=gt,Rp=ja,Op=Be,Ip=yn("species"),kp=be,Np=TypeError,Lp=po,Mp=Dt,xp=TypeError,Dp=ur,Pp=function(e){if(Lp(e))return e;throw xp(Mp(e)+" is not a constructor")},Up=et,Bp=yn("species"),Fp=function(e,t){var i,n=Dp(e).constructor;return void 0===n||Up(i=Dp(n)[Bp])?t:Pp(i)},Vp=TypeError,jp=/(?:ipad|iphone|ipod).*applewebkit/i.test(mt),Hp=ye,$p=Te,zp=or,Wp=Pe,Kp=sn,Gp=ue,qp=ia,Yp=il,Xp=xn,Zp=function(e,t){if(e<t)throw Vp("Not enough arguments");return e},Qp=jp,Jp=Tp,eg=Hp.setImmediate,tg=Hp.clearImmediate,ng=Hp.process,rg=Hp.Dispatch,ig=Hp.Function,og=Hp.MessageChannel,ag=Hp.String,sg=0,cg={},lg="onreadystatechange";Gp((function(){Ep=Hp.location}));var dg=function(e){if(Kp(cg,e)){var t=cg[e];delete cg[e],t()}},ug=function(e){return function(){dg(e)}},hg=function(e){dg(e.data)},fg=function(e){Hp.postMessage(ag(e),Ep.protocol+"//"+Ep.host)};eg&&tg||(eg=function(e){Zp(arguments.length,1);var t=Wp(e)?e:ig(e),i=Yp(arguments,1);return cg[++sg]=function(){$p(t,void 0,i)},Cp(sg),sg},tg=function(e){delete cg[e]},Jp?Cp=function(e){ng.nextTick(ug(e))}:rg&&rg.now?Cp=function(e){rg.now(ug(e))}:og&&!Qp?(Sp=(wp=new og).port2,wp.port1.onmessage=hg,Cp=zp(Sp.postMessage,Sp)):Hp.addEventListener&&Wp(Hp.postMessage)&&!Hp.importScripts&&Ep&&"file:"!==Ep.protocol&&!Gp(fg)?(Cp=fg,Hp.addEventListener("message",hg,!1)):Cp=lg in Xp("script")?function(e){qp.appendChild(Xp("script"))[lg]=function(){qp.removeChild(this),dg(e)}}:function(e){setTimeout(ug(e),0)});var pg={set:eg,clear:tg},gg=function(){this.head=null,this.tail=null};gg.prototype={add:function(e){var t={item:e,next:null},i=this.tail;i?i.next=t:this.head=t,this.tail=t},get:function(){var e=this.head;if(e)return null===(this.head=e.next)&&(this.tail=null),e.item}};var mg,vg,bg,_g,yg,Eg=gg,Cg=/ipad|iphone|ipod/i.test(mt)&&"undefined"!=typeof Pebble,wg=/web0s(?!.*chrome)/i.test(mt),Sg=ye,Tg=or,Ag=Ue.f,Rg=pg.set,Og=Eg,Ig=jp,kg=Cg,Ng=wg,Lg=Tp,Mg=Sg.MutationObserver||Sg.WebKitMutationObserver,xg=Sg.document,Dg=Sg.process,Pg=Sg.Promise,Ug=Ag(Sg,"queueMicrotask"),Bg=Ug&&Ug.value;if(!Bg){var Fg=new Og,Vg=function(){var e,t;for(Lg&&(e=Dg.domain)&&e.exit();t=Fg.get();)try{t()}catch(e){throw Fg.head&&mg(),e}e&&e.enter()};Ig||Lg||Ng||!Mg||!xg?!kg&&Pg&&Pg.resolve?((_g=Pg.resolve(void 0)).constructor=Pg,yg=Tg(_g.then,_g),mg=function(){yg(Vg)}):Lg?mg=function(){Dg.nextTick(Vg)}:(Rg=Tg(Rg,Sg),mg=function(){Rg(Vg)}):(vg=!0,bg=xg.createTextNode(""),new Mg(Vg).observe(bg,{characterData:!0}),mg=function(){bg.data=vg=!vg}),Bg=function(e){Fg.head||mg(),Fg.add(e)}}var jg=Bg,Hg=function(e){try{return{error:!1,value:e()}}catch(e){return{error:!0,value:e}}},$g=ye.Promise,zg="object"==typeof Deno&&Deno&&"object"==typeof Deno.version,Wg=!zg&&!Tp&&"object"==typeof window&&"object"==typeof document,Kg=ye,Gg=$g,qg=Pe,Yg=er,Xg=Ji,Zg=yn,Qg=Wg,Jg=zg,tm=wt,nm=Gg&&Gg.prototype,rm=Zg("species"),em=!1,im=qg(Kg.PromiseRejectionEvent),om={CONSTRUCTOR:Yg("Promise",(function(){var e=Xg(Gg),t=e!==String(Gg);if(!t&&66===tm)return!0;if(!nm.catch||!nm.finally)return!0;if(!tm||tm<51||!/native code/.test(e)){var i=new Gg((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};if((i.constructor={})[rm]=n,!(em=i.then((function(){}))instanceof n))return!0}return!t&&(Qg||Jg)&&!im})),REJECTION_EVENT:im,SUBCLASSING:em},am={},sm=Ft,cm=TypeError,lm=function(e){var t,i;this.promise=new e((function(e,n){if(void 0!==t||void 0!==i)throw cm("Bad Promise constructor");t=e,i=n})),this.resolve=sm(t),this.reject=sm(i)};am.f=function(e){return new lm(e)};var dm,um,hm=Fr,fm=Tp,pm=ye,gm=je,mm=Fa,vm=us,bm=function(e){var t=Ap(e);Op&&t&&!t[Ip]&&Rp(t,Ip,{configurable:!0,get:function(){return this}})},_m=Ft,ym=Pe,Em=lt,Cm=function(e,t){if(kp(t,e))return e;throw Np("Incorrect invocation")},wm=Fp,Sm=pg.set,Tm=jg,Am=function(e,t){try{1==arguments.length?console.error(e):console.error(e,t)}catch(e){}},Rm=Hg,Om=Eg,Im=Rs,km=$g,Nm=om,Lm=am,Mm="Promise",xm=Nm.CONSTRUCTOR,Dm=Nm.REJECTION_EVENT,Pm=Im.getterFor(Mm),Um=Im.set,Bm=km&&km.prototype,Fm=km,Vm=Bm,jm=pm.TypeError,Hm=pm.document,$m=pm.process,zm=Lm.f,Wm=zm,Km=!!(Hm&&Hm.createEvent&&pm.dispatchEvent),Gm="unhandledrejection",qm=function(e){var t;return!(!Em(e)||!ym(t=e.then))&&t},Ym=function(e,t){var i,n,r,s=t.value,o=1==t.state,a=o?e.ok:e.fail,c=e.resolve,l=e.reject,d=e.domain;try{a?(o||(2===t.rejection&&ev(t),t.rejection=1),!0===a?i=s:(d&&d.enter(),i=a(s),d&&(d.exit(),r=!0)),i===e.promise?l(jm("Promise-chain cycle")):(n=qm(i))?gm(n,i,c,l):c(i)):l(s)}catch(e){d&&!r&&d.exit(),l(e)}},Xm=function(e,t){e.notified||(e.notified=!0,Tm((function(){for(var i,n=e.reactions;i=n.get();)Ym(i,e);e.notified=!1,t&&!e.rejection&&Qm(e)})))},Zm=function(e,t,i){var n,r;Km?((n=Hm.createEvent("Event")).promise=t,n.reason=i,n.initEvent(e,!1,!0),pm.dispatchEvent(n)):n={promise:t,reason:i},!Dm&&(r=pm["on"+e])?r(n):e===Gm&&Am("Unhandled promise rejection",i)},Qm=function(e){gm(Sm,pm,(function(){var t,i=e.facade,n=e.value;if(Jm(e)&&(t=Rm((function(){fm?$m.emit("unhandledRejection",n,i):Zm(Gm,i,n)})),e.rejection=fm||Jm(e)?2:1,t.error))throw t.value}))},Jm=function(e){return 1!==e.rejection&&!e.parent},ev=function(e){gm(Sm,pm,(function(){var t=e.facade;fm?$m.emit("rejectionHandled",t):Zm("rejectionhandled",t,e.value)}))},tv=function(e,t,i){return function(n){e(t,n,i)}},nv=function(e,t,i){e.done||(e.done=!0,i&&(e=i),e.value=t,e.state=2,Xm(e,!0))},rv=function(e,t,i){if(!e.done){e.done=!0,i&&(e=i);try{if(e.facade===t)throw jm("Promise can't be resolved itself");var n=qm(t);n?Tm((function(){var i={done:!1};try{gm(n,t,tv(rv,i,e),tv(nv,i,e))}catch(t){nv(i,t,e)}})):(e.value=t,e.state=1,Xm(e,!1))}catch(t){nv({done:!1},t,e)}}};xm&&(Vm=(Fm=function(e){Cm(this,Vm),_m(e),gm(dm,this);var t=Pm(this);try{e(tv(rv,t),tv(nv,t))}catch(e){nv(t,e)}}).prototype,(dm=function(e){Um(this,{type:Mm,done:!1,notified:!1,parent:!1,reactions:new Om,rejection:!1,state:0,value:void 0})}).prototype=mm(Vm,"then",(function(e,t){var i=Pm(this),n=zm(wm(this,Fm));return i.parent=!0,n.ok=!ym(e)||e,n.fail=ym(t)&&t,n.domain=fm?$m.domain:void 0,0==i.state?i.reactions.add(n):Tm((function(){Ym(n,i)})),n.promise})),um=function(){var e=new dm,t=Pm(e);this.promise=e,this.resolve=tv(rv,t),this.reject=tv(nv,t)},Lm.f=zm=function(e){return e===Fm||void 0===e?new um(e):Wm(e)}),hm({global:!0,constructor:!0,wrap:!0,forced:xm},{Promise:Fm}),vm(Fm,Mm,!1,!0),bm(Mm);var iv=yn("iterator"),ov=!1;try{var av=0,sv={next:function(){return{done:!!av++}},return:function(){ov=!0}};sv[iv]=function(){return this},Array.from(sv,(function(){throw 2}))}catch(e){}var cv=$g,lv=function(e,t){if(!t&&!ov)return!1;var i=!1;try{var n={};n[iv]=function(){return{next:function(){return{done:i=!0}}}},e(n)}catch(e){}return i},dv=om.CONSTRUCTOR||!lv((function(e){cv.all(e).then(void 0,(function(){}))})),uv=je,hv=Ft,fv=am,pv=Hg,gv=tp;Fr({target:"Promise",stat:!0,forced:dv},{all:function(e){var t=this,i=fv.f(t),n=i.resolve,r=i.reject,s=pv((function(){var i=hv(t.resolve),s=[],o=0,a=1;gv(e,(function(e){var c=o++,l=!1;a++,uv(i,t,e).then((function(e){l||(l=!0,s[c]=e,--a||n(s))}),r)})),--a||n(s)}));return s.error&&r(s.value),i.promise}});var mv=Fr,vv=om.CONSTRUCTOR;$g&&$g.prototype,mv({target:"Promise",proto:!0,forced:vv,real:!0},{catch:function(e){return this.then(void 0,e)}});var bv=je,_v=Ft,yv=am,Ev=Hg,Cv=tp;Fr({target:"Promise",stat:!0,forced:dv},{race:function(e){var t=this,i=yv.f(t),n=i.reject,r=Ev((function(){var r=_v(t.resolve);Cv(e,(function(e){bv(r,t,e).then(i.resolve,n)}))}));return r.error&&n(r.value),i.promise}});var wv=je,Sv=am;Fr({target:"Promise",stat:!0,forced:om.CONSTRUCTOR},{reject:function(e){var t=Sv.f(this);return wv(t.reject,void 0,e),t.promise}});var Tv=ur,Av=lt,Rv=am,Ov=function(e,t){if(Tv(e),Av(t)&&t.constructor===e)return t;var i=Rv.f(e);return(0,i.resolve)(t),i.promise},Iv=Fr,kv=$g,Nv=om.CONSTRUCTOR,Lv=Ov,Mv=gt("Promise"),xv=!Nv;Iv({target:"Promise",stat:!0,forced:!0},{resolve:function(e){return Lv(xv&&this===Mv?kv:this,e)}});var Dv=je,Pv=Ft,Uv=am,Bv=Hg,Fv=tp;Fr({target:"Promise",stat:!0,forced:dv},{allSettled:function(e){var t=this,i=Uv.f(t),n=i.resolve,r=i.reject,s=Bv((function(){var i=Pv(t.resolve),r=[],s=0,o=1;Fv(e,(function(e){var a=s++,c=!1;o++,Dv(i,t,e).then((function(e){c||(c=!0,r[a]={status:"fulfilled",value:e},--o||n(r))}),(function(e){c||(c=!0,r[a]={status:"rejected",reason:e},--o||n(r))}))})),--o||n(r)}));return s.error&&r(s.value),i.promise}});var Vv=je,jv=Ft,Hv=gt,$v=am,zv=Hg,Wv=tp,Kv="No one promise resolved";Fr({target:"Promise",stat:!0,forced:dv},{any:function(e){var t=this,i=Hv("AggregateError"),n=$v.f(t),r=n.resolve,s=n.reject,o=zv((function(){var n=jv(t.resolve),o=[],a=0,c=1,l=!1;Wv(e,(function(e){var d=a++,h=!1;c++,Vv(n,t,e).then((function(e){h||l||(l=!0,r(e))}),(function(e){h||l||(h=!0,o[d]=e,--c||s(new i(o,Kv)))}))})),--c||s(new i(o,Kv))}));return o.error&&s(o.value),n.promise}});var Gv=Fr,qv=$g,Yv=ue,Xv=gt,Zv=Pe,Qv=Fp,Jv=Ov,eb=qv&&qv.prototype;Gv({target:"Promise",proto:!0,real:!0,forced:!!qv&&Yv((function(){eb.finally.call({then:function(){}},(function(){}))}))},{finally:function(e){var t=Qv(this,Xv("Promise")),i=Zv(e);return this.then(i?function(i){return Jv(t,e()).then((function(){return i}))}:e,i?function(i){return Jv(t,e()).then((function(){throw i}))}:e)}});var tb=ut.Promise,nb=Z(tb);const rb=()=>{};function ib(){const e={promise:void 0,isResolved:!1,isRejected:!1,isFinished:!1,resolve:void 0,reject:void 0,cancel:rb};return e.promise=new nb(((t,i)=>{e.resolve=i=>{e.isFinished||(e.isResolved=!0,e.isFinished=!0,t(i),e.value=i)},e.reject=t=>{e.isFinished||(e.isRejected=!0,e.isFinished=!0,i(t))}})),e}const ob=new Map,ab=new Map,sb=new Map;var cb,lb;!function(e){e.WIN_10="Windows 10",e.WIN_81="Windows 8.1",e.WIN_8="Windows 8",e.WIN_7="Windows 7",e.WIN_VISTA="Windows Vista",e.WIN_SERVER_2003="Windows Server 2003",e.WIN_XP="Windows XP",e.WIN_2000="Windows 2000",e.ANDROID="Android",e.HARMONY_OS="HarmonyOS",e.OPEN_BSD="Open BSD",e.SUN_OS="Sun OS",e.LINUX="Linux",e.IOS="iOS",e.MAC_OS="Mac OS",e.QNX="QNX",e.UNIX="UNIX",e.BEOS="BeOS",e.OS_2="OS/2",e.SEARCH_BOT="Search Bot"}(cb||(cb={})),function(e){e.CHROME="Chrome",e.SAFARI="Safari",e.EDGE="Edge",e.FIREFOX="Firefox",e.OPERA="OPR",e.QQ="QQBrowser",e.WECHAT="MicroMessenger"}(lb||(lb={}));var db={exports:{}};!function(e,t){!function(i,n){var r="function",s="undefined",o="object",a="string",c="major",l="model",d="name",h="type",u="vendor",p="version",f="architecture",m="console",v="mobile",_="tablet",g="smarttv",y="wearable",E="embedded",C="Amazon",w="Apple",S="ASUS",T="BlackBerry",A="Browser",R="Chrome",b="Firefox",O="Google",I="Huawei",k="LG",N="Microsoft",L="Motorola",M="Opera",x="Samsung",D="Sharp",P="Sony",U="Xiaomi",B="Zebra",F="Facebook",V="Chromium OS",j="Mac OS",H=function(e){for(var t={},i=0;i<e.length;i++)t[e[i].toUpperCase()]=e[i];return t},$=function(e,t){return typeof e===a&&-1!==z(t).indexOf(z(e))},z=function(e){return e.toLowerCase()},W=function(e,t){if(typeof e===a)return e=e.replace(/^\s\s*/,""),typeof t===s?e:e.substring(0,350)},K=function(e,t){for(var i,s,a,c,l,d,h=0;h<t.length&&!l;){var u=t[h],p=t[h+1];for(i=s=0;i<u.length&&!l&&u[i];)if(l=u[i++].exec(e))for(a=0;a<p.length;a++)d=l[++s],typeof(c=p[a])===o&&c.length>0?2===c.length?typeof c[1]==r?this[c[0]]=c[1].call(this,d):this[c[0]]=c[1]:3===c.length?typeof c[1]!==r||c[1].exec&&c[1].test?this[c[0]]=d?d.replace(c[1],c[2]):n:this[c[0]]=d?c[1].call(this,d,c[2]):n:4===c.length&&(this[c[0]]=d?c[3].call(this,d.replace(c[1],c[2])):n):this[c]=d||n;h+=2}},q=function(e,t){for(var i in t)if(typeof t[i]===o&&t[i].length>0){for(var r=0;r<t[i].length;r++)if($(t[i][r],e))return"?"===i?n:i}else if($(t[i],e))return"?"===i?n:i;return e},G={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[p,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[p,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,p],[/opios[\/ ]+([\w\.]+)/i],[p,[d,M+" Mini"]],[/\bopr\/([\w\.]+)/i],[p,[d,M]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(weibo)__([\d\.]+)/i],[d,p],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[p,[d,"UC"+A]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[p,[d,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[p,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[p,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[p,[d,"IE"]],[/yabrowser\/([\w\.]+)/i],[p,[d,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+A],p],[/\bfocus\/([\w\.]+)/i],[p,[d,b+" Focus"]],[/\bopt\/([\w\.]+)/i],[p,[d,M+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[p,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[p,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[p,[d,M+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[p,[d,"MIUI "+A]],[/fxios\/([-\w\.]+)/i],[p,[d,b]],[/\bqihu|(qi?ho?o?|360)browser/i],[[d,"360 "+A]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1 "+A],p],[/(comodo_dragon)\/([\w\.]+)/i],[[d,/_/g," "],p],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[d,p],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],p],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[d,p],[/\bgsa\/([\w\.]+) .*safari\//i],[p,[d,"GSA"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[p,[d,R+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,R+" WebView"],p],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[p,[d,"Android "+A]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,p],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[p,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[p,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[p,q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,p],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],p],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[p,[d,b+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[d,p],[/(cobalt)\/([\w\.]+)/i],[d,[p,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[f,"amd64"]],[/(ia32(?=;))/i],[[f,z]],[/((?:i[346]|x)86)[;\)]/i],[[f,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[f,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[f,"armhf"]],[/windows (ce|mobile); ppc;/i],[[f,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[f,/ower/,"",z]],[/(sun4\w)[;\)]/i],[[f,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[f,z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[l,[u,x],[h,_]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[l,[u,x],[h,v]],[/\((ip(?:hone|od)[\w ]*);/i],[l,[u,w],[h,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[l,[u,w],[h,_]],[/(macintosh);/i],[l,[u,w]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[l,[u,D],[h,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[l,[u,I],[h,_]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[l,[u,I],[h,v]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[l,/_/g," "],[u,U],[h,v]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[l,/_/g," "],[u,U],[h,_]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[l,[u,"OPPO"],[h,v]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[l,[u,"Vivo"],[h,v]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[l,[u,"Realme"],[h,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[l,[u,L],[h,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[l,[u,L],[h,_]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[l,[u,k],[h,_]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[l,[u,k],[h,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[l,[u,"Lenovo"],[h,_]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[l,/_/g," "],[u,"Nokia"],[h,v]],[/(pixel c)\b/i],[l,[u,O],[h,_]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[l,[u,O],[h,v]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[l,[u,P],[h,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[l,"Xperia Tablet"],[u,P],[h,_]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[l,[u,"OnePlus"],[h,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[l,[u,C],[h,_]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[l,/(.+)/g,"Fire Phone $1"],[u,C],[h,v]],[/(playbook);[-\w\),; ]+(rim)/i],[l,u,[h,_]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[l,[u,T],[h,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[l,[u,S],[h,_]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[l,[u,S],[h,v]],[/(nexus 9)/i],[l,[u,"HTC"],[h,_]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[u,[l,/_/g," "],[h,v]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[l,[u,"Acer"],[h,_]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[l,[u,"Meizu"],[h,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[u,l,[h,v]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[u,l,[h,_]],[/(surface duo)/i],[l,[u,N],[h,_]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[l,[u,"Fairphone"],[h,v]],[/(u304aa)/i],[l,[u,"AT&T"],[h,v]],[/\bsie-(\w*)/i],[l,[u,"Siemens"],[h,v]],[/\b(rct\w+) b/i],[l,[u,"RCA"],[h,_]],[/\b(venue[\d ]{2,7}) b/i],[l,[u,"Dell"],[h,_]],[/\b(q(?:mv|ta)\w+) b/i],[l,[u,"Verizon"],[h,_]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[l,[u,"Barnes & Noble"],[h,_]],[/\b(tm\d{3}\w+) b/i],[l,[u,"NuVision"],[h,_]],[/\b(k88) b/i],[l,[u,"ZTE"],[h,_]],[/\b(nx\d{3}j) b/i],[l,[u,"ZTE"],[h,v]],[/\b(gen\d{3}) b.+49h/i],[l,[u,"Swiss"],[h,v]],[/\b(zur\d{3}) b/i],[l,[u,"Swiss"],[h,_]],[/\b((zeki)?tb.*\b) b/i],[l,[u,"Zeki"],[h,_]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[u,"Dragon Touch"],l,[h,_]],[/\b(ns-?\w{0,9}) b/i],[l,[u,"Insignia"],[h,_]],[/\b((nxa|next)-?\w{0,9}) b/i],[l,[u,"NextBook"],[h,_]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[u,"Voice"],l,[h,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[u,"LvTel"],l,[h,v]],[/\b(ph-1) /i],[l,[u,"Essential"],[h,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[l,[u,"Envizen"],[h,_]],[/\b(trio[-\w\. ]+) b/i],[l,[u,"MachSpeed"],[h,_]],[/\btu_(1491) b/i],[l,[u,"Rotor"],[h,_]],[/(shield[\w ]+) b/i],[l,[u,"Nvidia"],[h,_]],[/(sprint) (\w+)/i],[u,l,[h,v]],[/(kin\.[onetw]{3})/i],[[l,/\./g," "],[u,N],[h,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[l,[u,B],[h,_]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[l,[u,B],[h,v]],[/smart-tv.+(samsung)/i],[u,[h,g]],[/hbbtv.+maple;(\d+)/i],[[l,/^/,"SmartTV"],[u,x],[h,g]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[u,k],[h,g]],[/(apple) ?tv/i],[u,[l,w+" TV"],[h,g]],[/crkey/i],[[l,R+"cast"],[u,O],[h,g]],[/droid.+aft(\w)( bui|\))/i],[l,[u,C],[h,g]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[l,[u,D],[h,g]],[/(bravia[\w ]+)( bui|\))/i],[l,[u,P],[h,g]],[/(mitv-\w{5}) bui/i],[l,[u,U],[h,g]],[/Hbbtv.*(technisat) (.*);/i],[u,l,[h,g]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[u,W],[l,W],[h,g]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[h,g]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[u,l,[h,m]],[/droid.+; (shield) bui/i],[l,[u,"Nvidia"],[h,m]],[/(playstation [345portablevi]+)/i],[l,[u,P],[h,m]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[l,[u,N],[h,m]],[/((pebble))app/i],[u,l,[h,y]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[l,[u,w],[h,y]],[/droid.+; (glass) \d/i],[l,[u,O],[h,y]],[/droid.+; (wt63?0{2,3})\)/i],[l,[u,B],[h,y]],[/(quest( 2| pro)?)/i],[l,[u,F],[h,y]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[u,[h,E]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[l,[h,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[l,[h,_]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[h,_]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[h,v]],[/(android[-\w\. ]{0,9});.+buil/i],[l,[u,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[p,[d,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[p,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i],[d,p],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[p,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,p],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[d,[p,q,G]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[d,"Windows"],[p,q,G]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/cfnetwork\/.+darwin/i],[[p,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,j],[p,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[p,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,p],[/\(bb(10);/i],[p,[d,T]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[p,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[p,[d,b+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[p,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[p,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[p,[d,R+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,V],p],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,p],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],p],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux)/i,/(unix) ?([\w\.]*)/i],[d,p]]},X=function(e,t){if(typeof e===o&&(t=e,e=n),!(this instanceof X))return new X(e,t).getResult();var m=typeof i!==s&&i.navigator?i.navigator:n,g=e||(m&&m.userAgent?m.userAgent:""),y=m&&m.userAgentData?m.userAgentData:n,E=t?function(e,t){var i={};for(var n in e)t[n]&&t[n].length%2==0?i[n]=t[n].concat(e[n]):i[n]=e[n];return i}(Y,t):Y;return this.getBrowser=function(){var e={};return e[d]=n,e[p]=n,K.call(e,g,E.browser),e[c]=function(e){return typeof e===a?e.replace(/[^\d\.]/g,"").split(".")[0]:n}(e[p]),m&&m.brave&&typeof m.brave.isBrave==r&&(e[d]="Brave"),e},this.getCPU=function(){var e={};return e[f]=n,K.call(e,g,E.cpu),e},this.getDevice=function(){var e={};return e[u]=n,e[l]=n,e[h]=n,K.call(e,g,E.device),!e[h]&&y&&y.mobile&&(e[h]=v),"Macintosh"==e[l]&&m&&typeof m.standalone!==s&&m.maxTouchPoints&&m.maxTouchPoints>2&&(e[l]="iPad",e[h]=_),e},this.getEngine=function(){var e={};return e[d]=n,e[p]=n,K.call(e,g,E.engine),e},this.getOS=function(){var e={};return e[d]=n,e[p]=n,K.call(e,g,E.os),!e[d]&&y&&"Unknown"!=y.platform&&(e[d]=y.platform.replace(/chrome os/i,V).replace(/macos/i,j)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return g},this.setUA=function(e){return g=typeof e===a&&e.length>350?W(e,350):e,this},this.setUA(g),this};X.VERSION="0.7.34",X.BROWSER=H([d,p,c]),X.CPU=H([f]),X.DEVICE=H([l,u,h,m,v,g,_,y,E]),X.ENGINE=X.OS=H([d,p]),e.exports&&(t=e.exports=X),t.UAParser=X;var Z=typeof i!==s&&(i.jQuery||i.Zepto);if(Z&&!Z.ua){var Q=new X;Z.ua=Q.getResult(),Z.ua.get=function(){return Q.getUA()},Z.ua.set=function(e){Q.setUA(e);var t=Q.getResult();for(var i in t)Z.ua[i]=t[i]}}}("object"==typeof window?window:q)}(db,db.exports);const ub=new(Z(db.exports));let hb=ub.getResult(),fb=null;function pb(e){if(!fb){e&&ub.setUA(e),hb=ub.getResult();const t=function(e){if("Blink"===e.engine.name&&"WeChat"!==e.browser.name)return lb.CHROME;switch(e.browser.name){case"Chrome Headless":case"Chrome":case"Chromium":return lb.CHROME;case"Safari":case"Mobile Safari":return lb.SAFARI;case"Edge":return lb.EDGE;case"Firefox":return lb.FIREFOX;case"QQBrowser":return lb.QQ;case"Opera":return lb.OPERA;case"WeChat":return lb.WECHAT;default:return e.browser.name||""}}(hb),i=function(e){let t;return t="Blink"===e.engine.name?e.engine.version||"":e.browser.version||"",t.split(".")[0]}(hb),n=function(e){return"Windows"===e.os.name?e.os.version?e.os.name+" "+e.os.version:e.os.name:e.os.name||""}(hb),r=hb.os.version;if(!(t&&i&&n&&r))return{name:t,version:i,os:n,osVersion:r};fb={name:t,version:i,os:n,osVersion:r}}return fb}function gb(){return pb().os}function mb(){const e=pb();return"".concat(e.os," ").concat(e.osVersion)}function vb(){const e=pb();return!!("WebKit"===hb.engine.name&&e.os===cb.MAC_OS&&navigator.maxTouchPoints&&navigator.maxTouchPoints>0&&e.name!==lb.SAFARI||wb()&&e.name!==lb.SAFARI)}function bb(){const e=pb();if(vb()){if(e.os===cb.MAC_OS)return!0;if(e.os===cb.IOS){const e=hb.os.version&&hb.os.version.split(".");if(e&&14===Number(e[0])&&e[1]&&Number(e[1])>=3)return!0;if(e&&Number(e[0])>14)return!0}}return!1}function _b(){return"WebKit"===hb.engine.name}function yb(){return pb().name===lb.CHROME}function Eb(){return pb().name===lb.SAFARI}function Cb(){return pb().name===lb.FIREFOX}function wb(){return pb().os===cb.IOS}function Sb(e){const t=pb();return!(t.name!==lb.CHROME||!t.osVersion)&&Number(t.version)>=e}function Tb(e){const t=pb();return!(t.name!==lb.EDGE||!t.osVersion)&&Number(t.version)>=e}function Ab(e){const t=pb();return!(t.name!==lb.OPERA||!t.osVersion)&&Number(t.version)>=e}function Rb(){const e=pb();return!(e.name!==lb.CHROME||!e.osVersion)&&Number(e.version)<=90}function Ob(){const e=pb();if(e.os!==cb.IOS||!e.osVersion)return!1;const t=e.osVersion.split(".");return Number(t[0])<14||14===Number(t[0])&&Number(t[1])<=6}function Ib(){const e=pb();if(e.os!==cb.IOS||!e.osVersion)return!1;const t=e.osVersion.split(".");return 15===Number(t[0])}function kb(){const e=pb();if(e.os!==cb.IOS||!e.osVersion)return!1;const t=e.osVersion.split(".");return 16===Number(t[0])}function Nb(){const e=pb();if(e.os!==cb.IOS||!e.osVersion)return!1;const t=e.osVersion.split(".");return 15===Number(t[0])&&Number(t[1])>=1}function Lb(){return Eb()&&navigator.maxTouchPoints>0}function Mb(){return pb().name===lb.WECHAT}function xb(){return window.navigator.appVersion&&null!==window.navigator.appVersion.match(/Chrome\/([\w\W]*?)\./)&&window.navigator.appVersion.match(/Chrome\/([\w\W]*?)\./)[1]<=35}function Db(){const e=pb();return e.name!==lb.EDGE&&e.name!==lb.SAFARI&&!!navigator.userAgent.toLocaleLowerCase().match(/chrome\/[\d]./i)}function Pb(){return gb()===cb.ANDROID}function Ub(){const e=pb();return Pb()&&(e.name===lb.CHROME||e.name===lb.WECHAT||/chrome|chromium/i.test(navigator.userAgent))}var Bb;!function(e){e.UNEXPECTED_ERROR="UNEXPECTED_ERROR",e.UNEXPECTED_RESPONSE="UNEXPECTED_RESPONSE",e.TIMEOUT="TIMEOUT",e.INVALID_PARAMS="INVALID_PARAMS",e.NOT_READABLE="NOT_READABLE",e.NOT_SUPPORTED="NOT_SUPPORTED",e.INVALID_OPERATION="INVALID_OPERATION",e.OPERATION_ABORTED="OPERATION_ABORTED",e.WEB_SECURITY_RESTRICT="WEB_SECURITY_RESTRICT",e.EXCHANGE_SDP_FAILED="EXCHANGE_SDP_FAILED",e.ADD_CANDIDATE_FAILED="ADD_CANDIDATE_FAILED",e.DATACHANNEL_FAILED="DATACHANNEL_FAILED",e.NETWORK_ERROR="NETWORK_ERROR",e.NETWORK_TIMEOUT="NETWORK_TIMEOUT",e.NETWORK_RESPONSE_ERROR="NETWORK_RESPONSE_ERROR",e.API_INVOKE_TIMEOUT="API_INVOKE_TIMEOUT",e.ENUMERATE_DEVICES_FAILED="ENUMERATE_DEVICES_FAILED",e.DEVICE_NOT_FOUND="DEVICE_NOT_FOUND",e.ELECTRON_IS_NULL="ELECTRON_IS_NULL",e.ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR="ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR",e.CHROME_PLUGIN_NO_RESPONSE="CHROME_PLUGIN_NO_RESPONSE",e.CHROME_PLUGIN_NOT_INSTALL="CHROME_PLUGIN_NOT_INSTALL",e.MEDIA_OPTION_INVALID="MEDIA_OPTION_INVALID",e.PERMISSION_DENIED="PERMISSION_DENIED",e.CONSTRAINT_NOT_SATISFIED="CONSTRAINT_NOT_SATISFIED",e.TRACK_IS_DISABLED="TRACK_IS_DISABLED",e.GET_VIDEO_ELEMENT_VISIBLE_ERROR="GET_VIDEO_ELEMENT_VISIBLE_ERROR",e.SHARE_AUDIO_NOT_ALLOWED="SHARE_AUDIO_NOT_ALLOWED",e.LOW_STREAM_ENCODING_ERROR="LOW_STREAM_ENCODING_ERROR",e.SET_ENCODING_PARAMETER_ERROR="SET_ENCODING_PARAMETER_ERROR",e.TRACK_STATE_UNREACHABLE="TRACK_STATE_UNREACHABLE",e.INVALID_UINT_UID_FROM_STRING_UID="INVALID_UINT_UID_FROM_STRING_UID",e.CAN_NOT_GET_PROXY_SERVER="CAN_NOT_GET_PROXY_SERVER",e.CAN_NOT_GET_GATEWAY_SERVER="CAN_NOT_GET_GATEWAY_SERVER",e.VOID_GATEWAY_ADDRESS="VOID_GATEWAY_ADDRESS",e.UID_CONFLICT="UID_CONFLICT",e.MULTI_UNILBS_RESPONSE_ERROR="MULTI_UNILBS_RESPONSE_ERROR",e.UPDATE_TICKET_FAILED="UPDATE_TICKET_FAILED",e.INVALID_LOCAL_TRACK="INVALID_LOCAL_TRACK",e.INVALID_TRACK="INVALID_TRACK",e.SENDER_NOT_FOUND="SENDER_NOT_FOUND",e.CREATE_OFFER_FAILED="CREATE_OFFER_FAILED",e.SET_ANSWER_FAILED="SET_ANSWER_FAILED",e.ICE_FAILED="ICE_FAILED",e.PC_CLOSED="PC_CLOSED",e.SENDER_REPLACE_FAILED="SENDER_REPLACE_FAILED",e.GET_LOCAL_CAPABILITIES_FAILED="GET_LOCAL_CAPABILITIES_FAILED",e.GET_LOCAL_CONNECTION_PARAMS_FAILED="GET_LOCAL_CONNECTION_PARAMS_FAILED",e.SUBSCRIBE_FAILED="SUBSCRIBE_FAILED",e.UNSUBSCRIBE_FAILED="UNSUBSCRIBE_FAILED",e.GATEWAY_P2P_LOST="GATEWAY_P2P_LOST",e.NO_ICE_CANDIDATE="NO_ICE_CANDIDATE",e.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS="CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS",e.EXIST_DISABLED_VIDEO_TRACK="EXIST_DISABLED_VIDEO_TRACK",e.INVALID_REMOTE_USER="INVALID_REMOTE_USER",e.REMOTE_USER_IS_NOT_PUBLISHED="REMOTE_USER_IS_NOT_PUBLISHED",e.CUSTOM_REPORT_SEND_FAILED="CUSTOM_REPORT_SEND_FAILED",e.CUSTOM_REPORT_FREQUENCY_TOO_HIGH="CUSTOM_REPORT_FREQUENCY_TOO_HIGH",e.FETCH_AUDIO_FILE_FAILED="FETCH_AUDIO_FILE_FAILED",e.READ_LOCAL_AUDIO_FILE_ERROR="READ_LOCAL_AUDIO_FILE_ERROR",e.DECODE_AUDIO_FILE_FAILED="DECODE_AUDIO_FILE_FAILED",e.WS_ABORT="WS_ABORT",e.WS_DISCONNECT="WS_DISCONNECT",e.WS_ERR="WS_ERR",e.LIVE_STREAMING_TASK_CONFLICT="LIVE_STREAMING_TASK_CONFLICT",e.LIVE_STREAMING_INVALID_ARGUMENT="LIVE_STREAMING_INVALID_ARGUMENT",e.LIVE_STREAMING_INTERNAL_SERVER_ERROR="LIVE_STREAMING_INTERNAL_SERVER_ERROR",e.LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED="LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED",e.LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED="LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED",e.LIVE_STREAMING_CDN_ERROR="LIVE_STREAMING_CDN_ERROR",e.LIVE_STREAMING_INVALID_RAW_STREAM="LIVE_STREAMING_INVALID_RAW_STREAM",e.LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT="LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT",e.LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE="LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE",e.LIVE_STREAMING_WARN_FREQUENT_REQUEST="LIVE_STREAMING_WARN_FREQUENT_REQUEST",e.WEBGL_INTERNAL_ERROR="WEBGL_INTERNAL_ERROR",e.BEAUTY_PROCESSOR_INTERNAL_ERROR="BEAUTY_PROCESSOR_INTERNAL_ERROR",e.CROSS_CHANNEL_WAIT_STATUS_ERROR="CROSS_CHANNEL_WAIT_STATUS_ERROR",e.CROSS_CHANNEL_FAILED_JOIN_SRC="CROSS_CHANNEL_FAILED_JOIN_SEC",e.CROSS_CHANNEL_FAILED_JOIN_DEST="CROSS_CHANNEL_FAILED_JOIN_DEST",e.CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST="CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST",e.CROSS_CHANNEL_SERVER_ERROR_RESPONSE="CROSS_CHANNEL_SERVER_ERROR_RESPONSE",e.METADATA_OUT_OF_RANGE="METADATA_OUT_OF_RANGE",e.LOCAL_AEC_ERROR="LOCAL_AEC_ERROR",e.INVALID_PLUGIN="INVALID_PLUGIN",e.DISCONNECT_P2P="DISCONNECT_P2P",e.INIT_WEBSOCKET_TIMEOUT="INIT_WEBSOCKET_TIMEOUT",e.CONVERTING_IMAGEDATA_TO_BLOB_FAILED="CONVERTING_IMAGEDATA_TO_BLOB_FAILED",e.CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED="CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED",e.INIT_DATACHANNEL_TIMEOUT="INIT_DATACHANNEL_TIMEOUT",e.DATACHANNEL_CONNECTION_TIMEOUT="DATACHANNEL_CONNECTION_TIMEOUT",e.PROHIBITED_OPERATION="PROHIBITED_OPERATION",e.IMAGE_MODERATION_UPLOAD_FAILED="IMAGE_MODERATION_UPLOAD_FAILED"}(Bb||(Bb={}));let Fb=class extends Error{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=arguments.length>2?arguments[2]:void 0;super(t),oh(this,"code",void 0),oh(this,"message",void 0),oh(this,"data",void 0),oh(this,"name","AgoraRTCException"),this.code=e,this.message="AgoraRTCError ".concat(this.code,": ").concat(t),this.data=i}toString(){return this.data?"data: ".concat(JSON.stringify(this.data),"\n").concat(this.stack):"".concat(this.stack)}print(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error",t=arguments.length>1?arguments[1]:void 0;return"error"===e&&(t||console).error(this.toString()),"warning"===e&&(t||console).warn(this.toString()),this}throw(e){throw this.print("error",e),this}};function Vb(e,t){if("boolean"!=typeof e)throw new Fb(Bb.INVALID_PARAMS,"Invalid ".concat(t,": The value is of the boolean type."))}function jb(e,t,i){if(!Di(i).call(i,e))throw new Fb(Bb.INVALID_PARAMS,"".concat(t," can only be set as ").concat(JSON.stringify(i)))}function Hb(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1e4;if(e<i||e>n||(!(arguments.length>4&&void 0!==arguments[4])||arguments[4])&&!function(e){return"number"==typeof e&&e%1==0}(e))throw new Fb(Bb.INVALID_PARAMS,"invalid ".concat(t,": the value range is [").concat(i,", ").concat(n,"]. integer only"))}function $b(e,t){if("number"!=typeof e){if(!(e.min||e.max||e.ideal||e.exact))throw new Fb(Bb.INVALID_PARAMS,"".concat(t," is not a valid ConstrainLong"));void 0!==e.min&&Hb(e.min,"".concat(t,".min"),0,1/0),void 0!==e.max&&Hb(e.max,"".concat(t,".max"),1,1/0),void 0!==e.exact&&Hb(e.exact,"".concat(t,".exact"),1,1/0),void 0!==e.ideal&&Hb(e.ideal,"".concat(t,".ideal"),1,1/0)}else Hb(e,t,1,1/0)}function zb(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:255,r=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];if(null==e)throw new Fb(Bb.INVALID_PARAMS,"".concat(t||"param"," cannot be empty"));if(!Gb(e,i,n,r))throw new Fb(Bb.INVALID_PARAMS,"Invalid ".concat(t||"string param",": Length of the string: [").concat(i,",").concat(n,"].").concat(r?" ASCII characters only.":""))}function Wb(e,t){if(!Array.isArray(e))throw new Fb(Bb.INVALID_PARAMS,"".concat(t," should be an array"))}function Kb(e){return null==e}function Gb(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:255,n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return"string"==typeof e&&e.length<=i&&e.length>=t&&(!n||function(e){if("string"!=typeof e)return!1;for(let t=0;t<e.length;t+=1){const i=e.charCodeAt(t);if(i<0||i>255)return!1}return!0}(e))}function qb(e,t,i){if("getBigUint64"in DataView.prototype)return e.getBigUint64(t,i);const n=e.getUint32(t,i),r=e.getUint32(t+4,i),s=Number(!!i),o=Number(!i);return BigInt(n*o+r*s)<<BigInt(32)|BigInt(n*s+r*o)}function Yb(e,t,i,n){if("setBigUint64"in DataView.prototype)return e.setBigUint64(t,i,n);const r=Number(i>>BigInt(32)),s=Number(i&BigInt(4294967295));n?(e.setUint32(t+4,r,n),e.setUint32(t,s,n)):(e.setUint32(t,r,n),e.setUint32(t+4,s,n))}var Xb,Zb;!function(e){e.COVERED="COVERED",e.POSITION="POSITION",e.SIZE="SIZE",e.STYLE="STYLE"}(Xb||(Xb={})),function(e){e.UNMOUNTED="UNMOUNTED",e.INVALID_HTML_ELEMENT="INVALID_HTML_ELEMENT"}(Zb||(Zb={}));const Qb=new class{constructor(){oh(this,"_clientSize",null),oh(this,"getClientWidth",(()=>document.documentElement?document.documentElement.clientWidth:document.body.clientWidth)),oh(this,"getClientHeight",(()=>document.documentElement?document.documentElement.clientHeight:document.body.clientHeight)),oh(this,"getStyle",(e=>window.getComputedStyle(e,null))),oh(this,"checkCssVisibleProperty",(e=>{var t;let i=!0;const n=this.getStyle(e),{display:r,visibility:s,opacity:o,filter:a}=n;return("none"===r||Di(t=["hidden","collapse"]).call(t,s)||Number(o)<.1)&&(i=!1),!!i&&(a&&a.split(" ").filter((e=>{var t;const i=e.split("(")[0];return Di(t=["brightness","blur","opacity"]).call(t,i)})).map((e=>{const[t,i]=e.split(/\(|\)/);return[t,Number(i.match(/^[0-9\.]+/))]})).forEach((e=>{const[t,n]=e;switch(t){case"brightness":(n<.1||n>3)&&(i=!1);break;case"blur":n>3&&(i=!1);break;case"opacity":n<.1&&(i=!1)}})),i)})),oh(this,"checkPropertyUpToAllParentNodes",((e,t)=>{let i=!0,n=!0;const r=e=>t(e);let s=e;for(;s&&n;)r(s)||(i=!1,n=!1),s=s.parentElement,s||(n=!1);return i})),oh(this,"checkActualCssVisibleIncludeInherit",(e=>this.checkPropertyUpToAllParentNodes(e,this.checkCssVisibleProperty))),oh(this,"getSizeAboutClient",(e=>{const{width:t,height:i,left:n,right:r,top:s,bottom:o}=e.getBoundingClientRect(),a=this.getClientWidth(),c=this.getClientHeight();return{width:t,height:i,left:n,right:r,top:s,bottom:o,clientWidth:a,clientHeight:c,clientMin:Math.min(a,c)}})),oh(this,"checkActualSize",(()=>{const{width:e,height:t,clientMin:i}=this._clientSize;return this.checkSizeIsVisible(e,t,i)})),oh(this,"elementFromPoint",((e,t)=>document.elementFromPoint?document.elementFromPoint(e,t):null)),oh(this,"checkCoverForAPoint",((e,t,i)=>{const n=this.elementFromPoint(e,t);return null!==n&&n!==i})),oh(this,"getPointPositionList",(()=>{const{width:e,height:t,left:i,top:n}=this._clientSize,r=e/6,s=t/6,o=[],a=10**6;for(let e=0;e<5;e++)for(let t=0;t<5;t++){const c=(i*a+(0===e?.1:4===e?(r*e*a-1e5)/a:r*e)*a)/a,l=(n*a+(0===t?.1:4===t?(s*t*a-1e5)/a:s*t)*a)/a;o.push({x:c,y:l})}return[...o]})),oh(this,"checkElementCover",(e=>this.getPointPositionList().map((t=>this.checkCoverForAPoint(t.x,t.y,e))).filter((e=>!!e)).length>6)),oh(this,"checkSizeIsVisible",((e,t,i)=>(e>50||i/e<=10)&&(t>50||i/t<=10))),oh(this,"checkSizeOfPartInClient",(()=>{const{left:e,right:t,top:i,bottom:n,clientHeight:r,clientWidth:s,clientMin:o}=this._clientSize;let a,c,l,d;if(e<0)a=0;else{if(!(e<s))return!1;a=e}if(t<0)return!1;if(c=t<s?t:s,i<0)l=0;else{if(!(i<r))return!1;l=i}if(n<0)return!1;d=n<r?n:r;const h=c-a,u=d-l;return this.checkSizeIsVisible(h,u,o)})),oh(this,"returnHiddenResult",(e=>(this._clientSize=null,{visible:!1,reason:e}))),oh(this,"checkOneElementVisible",(e=>{if(e instanceof HTMLElement){if(this.checkElementIsMountedOnDom(e)){if(this.checkActualCssVisibleIncludeInherit(e)){if(this._clientSize=this.getSizeAboutClient(e),this.checkElementCover(e))return this.returnHiddenResult(Xb.COVERED);{const e=this.checkActualSize(),t=this.checkSizeOfPartInClient();return e&&!t?this.returnHiddenResult(Xb.POSITION):e?(this._clientSize=null,{visible:!0}):this.returnHiddenResult(Xb.SIZE)}}return this.returnHiddenResult(Xb.STYLE)}return this.returnHiddenResult(Zb.UNMOUNTED)}return this.returnHiddenResult(Zb.INVALID_HTML_ELEMENT)})),oh(this,"checkElementIsMountedOnDom",(e=>this.checkPropertyUpToAllParentNodes(e,(e=>"HTML"!==e.nodeName.toUpperCase()?null!==e.parentElement:!!document.documentElement))))}};function Jb(e){return(new TextEncoder).encode(e)}const e_=function(e,t){const i=new Uint8Array(e.byteLength+t.byteLength);return i.set(new Uint8Array(e),0),i.set(new Uint8Array(t),e.byteLength),i},t_=async e=>{const t=function(e){const t=window.atob(e),i=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e+=1)i[e]=t.charCodeAt(e);return i}("MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDCMnXAHkKIGAM+x4N22gCI+Wyu\nSTM9ztkT3uYslTT2PuKmZfPzhH6kVdO7PTjGCOZnAsyb3oTtWat0KcxQ4jxvqQV+\nHvYl3iI1Yd4vl2c3qRMJPLtRDfNxa2Mcxgq7e9aEUibzdd0st+OJAy3tOj/Y0aVy\nxQiYDz3vqa6bP29adwIDAQAB"),i=await window.crypto.subtle.importKey("spki",t,{name:"RSA-OAEP",hash:"SHA-256"},!0,["encrypt"]),n=Jb(e),r=await window.crypto.subtle.encrypt({name:"RSA-OAEP"},i,n);return function(e){let t="";for(let i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return window.btoa(t)}(new Uint8Array(r))},n_=async e=>function(e,t){let i="";return new Uint8Array(e).forEach((e=>{i+=e.toString(t).padStart(2,"0")})),i}(await crypto.subtle.digest("SHA-256",Jb(e)),16);class r_{constructor(){oh(this,"_events",{}),oh(this,"addListener",this.on)}getListeners(e){return this._events[e]?this._events[e].map((e=>e.listener)):[]}on(e,t){this._events[e]||(this._events[e]=[]);const i=this._events[e];-1===this._indexOfListener(i,t)&&i.push({listener:t,once:!1})}once(e,t){this._events[e]||(this._events[e]=[]);const i=this._events[e];-1===this._indexOfListener(i,t)&&i.push({listener:t,once:!0})}off(e,t){if(!this._events[e])return;const i=this._events[e],n=this._indexOfListener(i,t);-1!==n&&i.splice(n,1),0===this._events[e].length&&delete this._events[e]}removeAllListeners(e){e?delete this._events[e]:this._events={}}emit(e){this._events[e]||(this._events[e]=[]);const t=this._events[e].map((e=>e));for(var i=arguments.length,n=new Array(i>1?i-1:0),r=1;r<i;r++)n[r-1]=arguments[r];for(let i=0;i<t.length;i+=1){const r=t[i];r.once&&this.off(e,r.listener),r.listener.apply(this,n||[])}}safeEmit(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];[...this._events[e]||[]].forEach((t=>{t.once&&this.off(e,t.listener);try{t.listener.apply(this,i)}catch(t){console.error("safeEmit event:".concat(e," error ").concat(null==t?void 0:t.toString()))}}))}_indexOfListener(e,t){let i=e.length;for(;i--;)if(e[i].listener===t)return i;return-1}}let i_=null;function o_(){if(i_)return i_;if(window.electron)return i_=window.electron;if(!window.require)return null;try{return i_=window.require("electron"),i_}catch(e){return null}}var a_,s_,c_,l_,d_,u_,h_,f_;function p_(e){return Hb(e.timeout,"config.timeout",0,1e5),Hb(e.timeoutFactor,"config.timeoutFactor",0,100,!1),Hb(e.maxRetryCount,"config.maxRetryConfig",0,1/0),Hb(e.maxRetryTimeout,"config.maxRetryTimeout",0,1/0),!0}function g_(e){if(!Array.isArray(e)||e.length<1)return!1;try{e.forEach((e=>{if(!e.urls)throw Error()}))}catch(e){return!1}return!0}function m_(e){return zb(e.turnServerURL,"turnServerURL"),zb(e.username,"username"),zb(e.password,"password"),e.udpport&&Hb(e.udpport,"udpport",1,99999,!0),e.forceturn&&Vb(e.forceturn,"forceturn"),e.security&&Vb(e.security,"security"),e.tcpport&&Hb(e.tcpport,"tcpport",1,99999,!0),!0}function v_(e){return void 0!==e.level&&jb(e.level,"level",[1,2,3]),void 0!==e.delay&&Hb(e.delay,"delay",0,3e3,!0),!0}function b_(e,t){for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];return 0===e.getListeners(t).length?nb.reject(new Fb(Bb.UNEXPECTED_ERROR,"can not emit promise")):new nb(((i,r)=>{e.emit(t,...n,i,r)}))}function __(e,t){if(0===e.getListeners(t).length)return nb.resolve();for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];return b_(e,t,...n)}function y_(e,t){if(0===e.getListeners(t).length)return null;for(var i=arguments.length,n=new Array(i>2?i-2:0),r=2;r<i;r++)n[r-2]=arguments[r];return E_(e,t,...n)}function E_(e,t){let i=null,n=null;for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];if(e.emit(t,...s,(e=>{i=e}),(e=>{n=e})),null!==n)throw n;if(null===i)throw new Fb(Bb.UNEXPECTED_ERROR,"handler is not sync");return i}!function(e){e.CREATE_CLIENT="createClient",e.CHECK_SYSTEM_REQUIREMENTS="checkSystemRequirements",e.SET_AREA="setArea",e.CHECK_VIDEO_TRACK_IS_ACTIVE="checkVideoTrackIsActive",e.CHECK_AUDIO_TRACK_IS_ACTIVE="checkAudioTrackIsActive",e.CREATE_MIC_AUDIO_TRACK="createMicrophoneAudioTrack",e.CREATE_CUSTOM_AUDIO_TRACK="createCustomAudioTrack",e.CREATE_BUFFER_AUDIO_TRACK="createBufferSourceAudioTrack",e.CREATE_CAM_VIDEO_TRACK="createCameraVideoTrack",e.CREATE_CUSTOM_VIDEO_TRACK="createCustomVideoTrack",e.CREATE_MIC_AND_CAM_TRACKS="createMicrophoneAndCameraTracks",e.CREATE_SCREEN_VIDEO_TRACK="createScreenVideoTrack",e.SET_ENCRYPTION_CONFIG="Client.setEncryptionConfig",e.START_PROXY_SERVER="Client.startProxyServer",e.STOP_PROXY_SERVER="Client.stopProxyServer",e.SET_PROXY_SERVER="Client.setProxyServer",e.SET_TURN_SERVER="Client.setTurnServer",e.SET_CLIENT_ROLE="Client.setClientRole",e.SET_LOW_STREAM_PARAMETER="Client.setLowStreamParameter",e.ENABLE_DUAL_STREAM="Client.enableDualStream",e.DISABLE_DUAL_STREAM="Client.disableDualStream",e.JOIN="Client.join",e.LEAVE="Client.leave",e.PUBLISH="Client.publish",e.UNPUBLISH="Client.unpublish",e.SUBSCRIBE="Client.subscribe",e.MASS_SUBSCRIBE="Client.massSubscribe",e.MASS_UNSUBSCRIBE="Client.massUnsubscribe",e.UNSUBSCRIBE="Client.unsubscribe",e.RENEW_TOKEN="Client.renewToken",e.SET_REMOTE_VIDEO_STREAM_TYPE="Client.setRemoteVideoStreamType",e.SET_STREAM_FALLBACK_OPTION="Client.setStreamFallbackOption",e.ENABLE_AUDIO_VOLUME_INDICATOR="Client.enableAudioVolumeIndicator",e.SEND_CUSTOM_REPORT_MESSAGE="Client.sendCustomReportMessage",e.INSPECT_VIDEO_CONTENT="Client.inspectVideoContent",e.STOP_INSPECT_VIDEO_CONTENT="Client.stopInspectVideoContent",e.JOIN_FALLBACK_TO_PROXY="Client._joinFallbackToProxy",e.DATACHANNEL_FAILBACK="Client._datachannelFailback",e.ON_LIVE_STREAM_WARNING="Client.onLiveStreamWarning",e.ON_LIVE_STREAM_ERROR="Client.onLiveStreamingError",e.START_LIVE_STREAMING="Client.startLiveStreaming",e.SET_LIVE_TRANSCODING="Client.setLiveTranscoding",e.STOP_LIVE_STREAMING="Client.stopLiveStreaming",e.ADD_INJECT_STREAM_URL="Client.addInjectStreamUrl",e.REMOVE_INJECT_STREAM_URL="Client.removeInjectStreamUrl",e.START_CHANNEL_MEDIA_RELAY="Client.startChannelMediaRelay",e.UPDATE_CHANNEL_MEDIA_RELAY="Client.updateChannelMediaRelay",e.STOP_CHANNEL_MEDIA_RELAY="Client.stopChannelMediaRelay",e.REQUEST_CONFIG_DISTRIBUTE="_config-distribute-request",e.SET_CONFIG_DISTRIBUTE="_configDistribute",e.LOCAL_TRACK_SET_MUTED="LocalTrack.setMute",e.LOCAL_AUDIO_TRACK_PLAY="LocalAudioTrack.play",e.LOCAL_AUDIO_TRACK_PLAY_IN_ELEMENT="LocalAudioTrack.playInElement",e.LOCAL_AUDIO_TRACK_STOP="LocalAudioTrack.stop",e.LOCAL_AUDIO_TRACK_SET_VOLUME="LocalAudioTrack.setVolume",e.MIC_AUDIO_TRACK_SET_DEVICE="MicrophoneAudioTrack.setDevice",e.BUFFER_AUDIO_TRACK_START="BufferSourceAudioTrack.startProcessAudioBuffer",e.BUFFER_AUDIO_TRACK_STOP="BufferSourceAudioTrack.stopProcessAudioBuffer",e.BUFFER_AUDIO_TRACK_PAUSE="BufferSourceAudioTrack.pauseProcessAudioBuffer",e.BUFFER_AUDIO_TRACK_RESUME="BufferSourceAudioTrack.resumeProcessAudioBuffer",e.BUFFER_AUDIO_TRACK_SEEK="BufferSourceAudioTrack.seekAudioBuffer",e.LOCAL_VIDEO_TRACK_PLAY="LocalVideoTrack.play",e.LOCAL_VIDEO_TRACK_STOP="LocalVideoTrack.stop",e.LOCAL_VIDEO_TRACK_GET_VIDEO_VISIBLE="LocalVideoTrack.getVideoElementVisibleStatus",e.LOCAL_VIDEO_TRACK_BEAUTY="LocalVideoTrack.setBeautyEffect",e.CAM_VIDEO_TRACK_SET_DEVICE="CameraVideoTrack.setDevice",e.CAM_VIDEO_TRACK_SET_ENCODER_CONFIG="CameraVideoTrack.setEncoderConfiguration",e.REMOTE_VIDEO_TRACK_PLAY="RemoteVideoTrack.play",e.REMOTE_VIDEO_TRACK_STOP="RemoteVideoTrack.stop",e.REMOTE_VIDEO_TRACK_GET_VIDEO_VISIBLE="RemoteVideoTrack.getVideoElementVisibleStatus",e.REMOTE_AUDIO_TRACK_PLAY="RemoteAudioTrack.play",e.REMOTE_AUDIO_TRACK_STOP="RemoteAudioTrack.stop",e.REMOTE_AUDIO_SET_VOLUME="RemoteAudioTrack.setVolume",e.REMOTE_AUDIO_SET_OUTPUT_DEVICE="RemoteAudioTrack.setOutputDevice",e.GET_MEDIA_STREAM_TRACK="Track.getMediaStreamTrack",e.STREAM_TYPE_CHANGE="streamTypeChange",e.CONNECTION_STATE_CHANGE="connectionStateChange",e.LOAD_CONFIG_FROM_LOCALSTORAGE="loadConfigFromLocalStorage",e.IMAGE_MODERATION_UPLOAD="imageModerationUpload"}(a_||(a_={})),function(e){e.TRACER="tracer"}(s_||(s_={})),function(e){e[e.AUDIENCE_LEVEL_LOW_LATENCY=1]="AUDIENCE_LEVEL_LOW_LATENCY",e[e.AUDIENCE_LEVEL_ULTRA_LOW_LATENCY=2]="AUDIENCE_LEVEL_ULTRA_LOW_LATENCY",e[e.AUDIENCE_LEVEL_SYNC_LATENCY=3]="AUDIENCE_LEVEL_SYNC_LATENCY"}(c_||(c_={})),function(e){e.LEAVE="LEAVE",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.UID_BANNED="UID_BANNED",e.IP_BANNED="IP_BANNED",e.CHANNEL_BANNED="CHANNEL_BANNED",e.FALLBACK="FALLBACK",e.LICENSE_MISSING="LICENSE_MISSING",e.LICENSE_EXPIRED="LICENSE_EXPIRED",e.LICENSE_MINUTES_EXCEEDED="LICENSE_MINUTES_EXCEEDED",e.LICENSE_PERIOD_INVALID="LICENSE_PERIOD_INVALID",e.LICENSE_MULTIPLE_SDK_SERVICE="LICENSE_MULTIPLE_SDK_SERVICE",e.LICENSE_ILLEGAL="LICENSE_ILLEGAL",e.TOKEN_EXPIRE="TOKEN_EXPIRE"}(l_||(l_={})),function(e){e.CONNECTION_STATE_CHANGE="connection-state-change",e.MEDIA_RECONNECT_START="media-reconnect-start",e.MEDIA_RECONNECT_END="media-reconnect-end",e.IS_USING_CLOUD_PROXY="is-using-cloud-proxy",e.USER_JOINED="user-joined",e.USER_LEAVED="user-left",e.USER_PUBLISHED="user-published",e.USER_UNPUBLISHED="user-unpublished",e.USER_INFO_UPDATED="user-info-updated",e.CLIENT_BANNED="client-banned",e.CHANNEL_MEDIA_RELAY_STATE="channel-media-relay-state",e.CHANNEL_MEDIA_RELAY_EVENT="channel-media-relay-event",e.VOLUME_INDICATOR="volume-indicator",e.CRYPT_ERROR="crypt-error",e.ON_TOKEN_PRIVILEGE_WILL_EXPIRE="token-privilege-will-expire",e.ON_TOKEN_PRIVILEGE_DID_EXPIRE="token-privilege-did-expire",e.NETWORK_QUALITY="network-quality",e.STREAM_TYPE_CHANGED="stream-type-changed",e.STREAM_FALLBACK="stream-fallback",e.RECEIVE_METADATA="receive-metadata",e.STREAM_MESSAGE="stream-message",e.LIVE_STREAMING_ERROR="live-streaming-error",e.LIVE_STREAMING_WARNING="live-streaming-warning",e.INJECT_STREAM_STATUS="stream-inject-status",e.EXCEPTION="exception",e.ERROR="error",e.P2P_LOST="p2p_lost",e.JOIN_FALLBACK_TO_PROXY="join-fallback-to-proxy",e.CHANNEL_FALLBACK_TO_WEBSOCKET="channel-fallback-to-websocket",e.MEDIA_CONNECTION_TYPE_CHANGE="media-connection-type-change",e.PUBLISHED_USER_LIST="published-user-list",e.CONTENT_INSPECT_CONNECTION_STATE_CHANGE="content-inspect-connection-state-change",e.CONTENT_INSPECT_ERROR="content-inspect-error",e.CONTENT_INSPECT_RESULT="content-inspect-result",e.IMAGE_MODERATION_CONNECTION_STATE_CHANGE="image-moderation-connection-state-change"}(d_||(d_={})),function(e){e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.MULTI_IP="MULTI_IP",e.TIMEOUT="TIMEOUT",e.OFFLINE="OFFLINE",e.LEAVE="LEAVE",e.P2P_FAILED="P2P_FAILED",e.FALLBACK="FALLBACK"}(u_||(u_={})),function(e){e.ONLINE="ONLINE",e.OFFLINE="OFFLINE"}(h_||(h_={})),function(e){e.NETWORK_STATE_CHANGE="NETWORK_STATE_CHANGE",e.ONLINE="ONLINE",e.OFFLINE="OFFLINE"}(f_||(f_={}));const C_=new class extends r_{set networkState(e){this.emit(f_.NETWORK_STATE_CHANGE,e,this._networkState),e===h_.ONLINE?this.emit(f_.ONLINE):e===h_.OFFLINE&&(this.onlineWaiter=new nb((e=>{this.once(f_.ONLINE,(()=>{this.onlineWaiter=void 0,e(h_.ONLINE)}))})),this.emit(f_.OFFLINE)),this._networkState=e}get networkState(){return this._networkState}get isOnline(){return this._networkState===h_.ONLINE}constructor(){super(),oh(this,"_moduleName","network-indicator"),oh(this,"_networkState",h_.ONLINE),oh(this,"onlineWaiter",void 0),window.addEventListener("online",(()=>{this.networkState=h_.ONLINE})),window.addEventListener("offline",(()=>{this.networkState=h_.OFFLINE}))}};function w_(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function S_(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?w_(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):w_(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function T_(e,t){const i=e.indexOf(t);-1!==i&&e.splice(i,1)}function A_(e){const t=[];return e.forEach((e=>{-1===t.indexOf(e)&&t.push(e)})),t}function R_(e){void 0!==nb?nb.resolve().then(e):setTimeout(e,0)}function O_(e){return JSON.parse(JSON.stringify(e))}function I_(e){try{return O_(e)}catch(t){return e}}const k_={};function N_(e,t){k_[t]||(k_[t]=!0,e())}function L_(e){const t=window.atob(e),i=new Uint8Array(new ArrayBuffer(t.length));for(let e=0;e<t.length;e+=1)i[e]=t.charCodeAt(e);return i}function M_(e){let t="";for(let i=0;i<e.length;i+=1)t+=String.fromCharCode(e[i]);return window.btoa(t)}function x_(e){return window.TextEncoder?(new TextEncoder).encode(e).length:e.length}function D_(e){let t=0;return/DingTalk/i.test(navigator.userAgent)&&e.realFormData&&(e=e.realFormData),e.forEach((e=>{t+="string"==typeof e?x_(e):e.size})),t+138}function P_(e){const t=new Fb(Bb.TIMEOUT,"timeout");return new nb(((i,n)=>{window.setTimeout((()=>n(t)),e)}))}function U_(e){return new nb((t=>{window.setTimeout(t,e)}))}function B_(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:7,t=arguments.length>1?arguments[1]:void 0;const i=Math.random().toString(16).substr(2,e).toLowerCase();return i.length===e?"".concat(t).concat(i):"".concat(t).concat(i)+B_(e-i.length,"")}function F_(){return B_(32,"").toUpperCase()}const V_=()=>{},j_=new class{constructor(){oh(this,"fnMap",new Map)}throttleByKey(e,t,i,n){for(var r=arguments.length,s=new Array(r>4?r-4:0),o=4;o<r;o++)s[o-4]=arguments[o];if(this.fnMap.has(t)){const r=this.fnMap.get(t);if(r.threshold!==i){r.fn(...r.args),clearTimeout(r.timer);const o=window.setTimeout((()=>{const e=this.fnMap.get(t);e&&e.fn(...e.args),this.fnMap.delete(t)}),i);this.fnMap.set(t,{fn:e,threshold:i,timer:o,args:s,skipFn:n})}else r.skipFn&&r.skipFn(...r.args),this.fnMap.set(t,S_(S_({},r),{},{fn:e,args:s,skipFn:n}))}else{const r=window.setTimeout((()=>{const e=this.fnMap.get(t);e&&e.fn(...e.args),this.fnMap.delete(t)}),i);this.fnMap.set(t,{fn:e,threshold:i,timer:r,args:s,skipFn:n})}}},H_=j_.throttleByKey.bind(j_);function $_(e){return"object"==typeof e&&null!==e&&!(e instanceof RegExp)}function z_(e,t){if(!$_(e)||!$_(t))return t;if(Array.isArray(e)&&!Array.isArray(t)||!Array.isArray(e)&&Array.isArray(t))return t;if(Array.isArray(t)&&Array.isArray(e)){const i=[...e];for(let n=0;n<t.length;n++)i[n]=z_(e[n],t[n]);return i}{const i=S_({},e);for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?i[n]=z_(e[n],t[n]):i[n]=t[n]);return i}}let W_=1,K_=console;class G_{static setLogger(e){K_=e}constructor(e){oh(this,"lockingPromise",nb.resolve()),oh(this,"locks",0),oh(this,"name",""),oh(this,"lockId",void 0),this.lockId=W_++,e&&(this.name=e),K_.debug("[lock-".concat(this.name,"-").concat(this.lockId,"] is created."))}get isLocked(){return this.locks>0}lock(e){let t;this.locks+=1,K_.debug("[lock-".concat(this.name,"-").concat(this.lockId,"] is locked, current queue ").concat(this.locks,". ").concat("string"==typeof e?e:""));const i=new nb((i=>{t=()=>{this.locks-=1,K_.debug("[lock-".concat(this.name,"-").concat(this.lockId,"] is not locked, current queue ").concat(this.locks,". ").concat("string"==typeof e?e:"")),i()}})),n=this.lockingPromise.then((()=>t));return this.lockingPromise=this.lockingPromise.then((()=>i)),n}}function q_(e,t){return function(i,n,r){const s=r.value;if("function"!=typeof s)throw new Error("Cannot use mutex on object property.");return r.value=async function(){const i=this[t];if(!i)throw new Error("mutex property key ".concat(t," doesn't exist on ").concat(e));const r=await i.lock("From ".concat(e,".").concat(n));try{for(var o=arguments.length,a=new Array(o),c=0;c<o;c++)a[c]=arguments[c];return await s.apply(this,a)}finally{r()}},r}}const Y_={timeout:500,timeoutFactor:1.5,maxRetryCount:1/0,maxRetryTimeout:1e4};function X_(e,t){const i=Math.floor(t.timeout*Math.pow(t.timeoutFactor,e));return Math.min(t.maxRetryTimeout,i)}function Z_(e,t,i,n){const r=Object.assign({},Y_,n);let s=r.timeout;const o=async()=>{await function(e){return new nb((t=>{window.setTimeout(t,e)}))}(s),s*=r.timeoutFactor,s=Math.min(r.maxRetryTimeout,s)};let a=!1;const c=new nb((async(n,s)=>{t=t||(()=>!1),i=i||(()=>!0);for(let c=0;c<r.maxRetryCount;c+=1){if(a)return s(new Fb(Bb.OPERATION_ABORTED));try{const i=await e();if(!t(i,c))return n(i);if(c+1===r.maxRetryCount)return n(i);await o()}catch(e){if(!i(e,c))return s(e);if(c+1===r.maxRetryCount)return s(e);await o()}}}));return c.cancel=()=>a=!0,c}var Q_=Ft,J_=rn,ey=Je,ty=Zr,ny=TypeError,ry=function(e){return function(t,i,n,r){Q_(i);var s=J_(t),o=ey(s),a=ty(s),c=e?a-1:0,l=e?-1:1;if(n<2)for(;;){if(c in o){r=o[c],c+=l;break}if(c+=l,e?c<0:a<=c)throw ny("Reduce of empty array with no initial value")}for(;e?c>=0:a>c;c+=l)c in o&&(r=i(r,o[c],c,s));return r}},iy=[ry(!1),ry(!0)][0];Fr({target:"Array",proto:!0,forced:!Tp&&wt>79&&wt<83||!wh("reduce")},{reduce:function(e){var t=arguments.length;return iy(this,e,t,t>1?arguments[1]:void 0)}});var oy=oi("Array").reduce,ay=be,sy=oy,cy=Array.prototype,ly=Z((function(e){var t=e.reduce;return e===cy||ay(cy,e)&&t===cy.reduce?sy:t}));let dy=class{constructor(e){oh(this,"input",[]),oh(this,"size",void 0),this.size=e}add(e){this.input.push(e),this.input.length>this.size&&this.input.splice(0,1)}mean(){var e;return 0===this.input.length?0:ly(e=this.input).call(e,((e,t)=>e+t))/this.input.length}};var uy,hy={exports:{}},fy=function(e,t){return function(){for(var i=new Array(arguments.length),n=0;n<i.length;n++)i[n]=arguments[n];return e.apply(t,i)}},py=fy,gy=Object.prototype.toString,my=(uy=Object.create(null),function(e){var t=gy.call(e);return uy[t]||(uy[t]=t.slice(8,-1).toLowerCase())});function vy(e){return e=e.toLowerCase(),function(t){return my(t)===e}}function by(e){return Array.isArray(e)}function _y(e){return void 0===e}var yy=vy("ArrayBuffer");function Ey(e){return null!==e&&"object"==typeof e}function Cy(e){if("object"!==my(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var wy=vy("Date"),Sy=vy("File"),Ty=vy("Blob"),Ay=vy("FileList");function Ry(e){return"[object Function]"===gy.call(e)}var Oy=vy("URLSearchParams");function Iy(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),by(e))for(var i=0,n=e.length;i<n;i++)t.call(null,e[i],i,e);else for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.call(null,e[r],r,e)}var ky,Ny=(ky="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return ky&&e instanceof ky}),Ly={isArray:by,isArrayBuffer:yy,isBuffer:function(e){return null!==e&&!_y(e)&&null!==e.constructor&&!_y(e.constructor)&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t="[object FormData]";return e&&("function"==typeof FormData&&e instanceof FormData||gy.call(e)===t||Ry(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&yy(e.buffer)},isString:function(e){return"string"==typeof e},isNumber:function(e){return"number"==typeof e},isObject:Ey,isPlainObject:Cy,isUndefined:_y,isDate:wy,isFile:Sy,isBlob:Ty,isFunction:Ry,isStream:function(e){return Ey(e)&&Ry(e.pipe)},isURLSearchParams:Oy,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&"undefined"!=typeof window&&"undefined"!=typeof document},forEach:Iy,merge:function e(){var t={};function i(i,n){Cy(t[n])&&Cy(i)?t[n]=e(t[n],i):Cy(i)?t[n]=e({},i):by(i)?t[n]=i.slice():t[n]=i}for(var n=0,r=arguments.length;n<r;n++)Iy(arguments[n],i);return t},extend:function(e,t,i){return Iy(t,(function(t,n){e[n]=i&&"function"==typeof t?py(t,i):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,i,n){e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,i&&Object.assign(e.prototype,i)},toFlatObject:function(e,t,i){var n,r,s,o={};t=t||{};do{for(r=(n=Object.getOwnPropertyNames(e)).length;r-- >0;)o[s=n[r]]||(t[s]=e[s],o[s]=!0);e=Object.getPrototypeOf(e)}while(e&&(!i||i(e,t))&&e!==Object.prototype);return t},kindOf:my,kindOfTest:vy,endsWith:function(e,t,i){e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=t.length;var n=e.indexOf(t,i);return-1!==n&&n===i},toArray:function(e){if(!e)return null;var t=e.length;if(_y(t))return null;for(var i=new Array(t);t-- >0;)i[t]=e[t];return i},isTypedArray:Ny,isFileList:Ay},My=Ly;function xy(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}var Dy=function(e,t,i){if(!t)return e;var n;if(i)n=i(t);else if(My.isURLSearchParams(t))n=t.toString();else{var r=[];My.forEach(t,(function(e,t){null!=e&&(My.isArray(e)?t+="[]":e=[e],My.forEach(e,(function(e){My.isDate(e)?e=e.toISOString():My.isObject(e)&&(e=JSON.stringify(e)),r.push(xy(t)+"="+xy(e))})))})),n=r.join("&")}if(n){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e},Py=Ly;function Uy(){this.handlers=[]}Uy.prototype.use=function(e,t,i){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null}),this.handlers.length-1},Uy.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},Uy.prototype.forEach=function(e){Py.forEach(this.handlers,(function(t){null!==t&&e(t)}))};var By,Fy,Vy=Uy,jy=Ly;function Hy(){if(Fy)return By;Fy=1;var e=Ly;function t(e,t,i,n,r){Error.call(this),this.message=e,this.name="AxiosError",t&&(this.code=t),i&&(this.config=i),n&&(this.request=n),r&&(this.response=r)}e.inherits(t,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var i=t.prototype,n={};return["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED"].forEach((function(e){n[e]={value:e}})),Object.defineProperties(t,n),Object.defineProperty(i,"isAxiosError",{value:!0}),t.from=function(n,r,s,o,a,c){var l=Object.create(i);return e.toFlatObject(n,l,(function(e){return e!==Error.prototype})),t.call(l,n.message,r,s,o,a),l.name=n.name,c&&Object.assign(l,c),l},By=t}var $y,zy,Wy,Ky,Gy,qy,Yy={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1};function Xy(){if(zy)return $y;zy=1;var e=Ly;return $y=function(t,i){i=i||new FormData;var n=[];function o(t){return null===t?"":e.isDate(t)?t.toISOString():e.isArrayBuffer(t)||e.isTypedArray(t)?"function"==typeof Blob?new Blob([t]):r.from(t):t}return function t(s,r){if(e.isPlainObject(s)||e.isArray(s)){if(-1!==n.indexOf(s))throw Error("Circular reference detected in "+r);n.push(s),e.forEach(s,(function(n,s){if(!e.isUndefined(n)){var a,c=r?r+"."+s:s;if(n&&!r&&"object"==typeof n)if(e.endsWith(s,"{}"))n=JSON.stringify(n);else if(e.endsWith(s,"[]")&&(a=e.toArray(n)))return void a.forEach((function(t){!e.isUndefined(t)&&i.append(c,o(t))}));t(n,c)}})),n.pop()}else i.append(r,o(s))}(t),i}}function Zy(){if(Ky)return Wy;Ky=1;var e=Hy();return Wy=function(t,i,n){var r=n.config.validateStatus;n.status&&r&&!r(n.status)?i(new e("Request failed with status code "+n.status,[e.ERR_BAD_REQUEST,e.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):t(n)}}function Qy(){if(qy)return Gy;qy=1;var e=Ly;return Gy=e.isStandardBrowserEnv()?{write:function(t,i,n,r,s,o){var a=[];a.push(t+"="+encodeURIComponent(i)),e.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),e.isString(r)&&a.push("path="+r),e.isString(s)&&a.push("domain="+s),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}}var Jy,eE,tE,nE,rE,iE,oE,aE,sE,cE,lE,dE,uE=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)},hE=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e},fE=function(e,t){return e&&!uE(t)?hE(e,t):t};function pE(){if(eE)return Jy;eE=1;var e=Ly,t=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];return Jy=function(i){var n,r,s,o={};return i?(e.forEach(i.split("\n"),(function(i){if(s=i.indexOf(":"),n=e.trim(i.substr(0,s)).toLowerCase(),r=e.trim(i.substr(s+1)),n){if(o[n]&&t.indexOf(n)>=0)return;o[n]="set-cookie"===n?(o[n]?o[n]:[]).concat([r]):o[n]?o[n]+", "+r:r}})),o):o}}function gE(){if(nE)return tE;nE=1;var e=Ly;return tE=e.isStandardBrowserEnv()?function(){var t,i=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function r(e){var t=e;return i&&(n.setAttribute("href",t),t=n.href),n.setAttribute("href",t),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return t=r(window.location.href),function(i){var n=e.isString(i)?r(i):i;return n.protocol===t.protocol&&n.host===t.host}}():function(){return!0}}function mE(){if(iE)return rE;iE=1;var e=Hy();function t(t){e.call(this,null==t?"canceled":t,e.ERR_CANCELED),this.name="CanceledError"}return Ly.inherits(t,e,{__CANCEL__:!0}),rE=t}function vE(){return aE||(aE=1,oE=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}),oE}function bE(){if(cE)return sE;cE=1;var e=Ly,t=Zy(),i=Qy(),n=Dy,r=fE,s=pE(),o=gE(),a=Yy,c=Hy(),l=mE(),d=vE();return sE=function(h){return new Promise((function(u,p){var f,m=h.data,v=h.headers,_=h.responseType;function g(){h.cancelToken&&h.cancelToken.unsubscribe(f),h.signal&&h.signal.removeEventListener("abort",f)}e.isFormData(m)&&e.isStandardBrowserEnv()&&delete v["Content-Type"];var y=new XMLHttpRequest;if(h.auth){var E=h.auth.username||"",C=h.auth.password?unescape(encodeURIComponent(h.auth.password)):"";v.Authorization="Basic "+btoa(E+":"+C)}var w=r(h.baseURL,h.url);function S(){if(y){var e="getAllResponseHeaders"in y?s(y.getAllResponseHeaders()):null,i={data:_&&"text"!==_&&"json"!==_?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:e,config:h,request:y};t((function(e){u(e),g()}),(function(e){p(e),g()}),i),y=null}}if(y.open(h.method.toUpperCase(),n(w,h.params,h.paramsSerializer),!0),y.timeout=h.timeout,"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(S)},y.onabort=function(){y&&(p(new c("Request aborted",c.ECONNABORTED,h,y)),y=null)},y.onerror=function(){p(new c("Network Error",c.ERR_NETWORK,h,y,y)),y=null},y.ontimeout=function(){var e=h.timeout?"timeout of "+h.timeout+"ms exceeded":"timeout exceeded",t=h.transitional||a;h.timeoutErrorMessage&&(e=h.timeoutErrorMessage),p(new c(e,t.clarifyTimeoutError?c.ETIMEDOUT:c.ECONNABORTED,h,y)),y=null},e.isStandardBrowserEnv()){var T=(h.withCredentials||o(w))&&h.xsrfCookieName?i.read(h.xsrfCookieName):void 0;T&&(v[h.xsrfHeaderName]=T)}"setRequestHeader"in y&&e.forEach(v,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete v[t]:y.setRequestHeader(t,e)})),e.isUndefined(h.withCredentials)||(y.withCredentials=!!h.withCredentials),_&&"json"!==_&&(y.responseType=h.responseType),"function"==typeof h.onDownloadProgress&&y.addEventListener("progress",h.onDownloadProgress),"function"==typeof h.onUploadProgress&&y.upload&&y.upload.addEventListener("progress",h.onUploadProgress),(h.cancelToken||h.signal)&&(f=function(e){y&&(p(!e||e&&e.type?new l:e),y.abort(),y=null)},h.cancelToken&&h.cancelToken.subscribe(f),h.signal&&(h.signal.aborted?f():h.signal.addEventListener("abort",f))),m||(m=null);var A=d(w);A&&-1===["http","https","file"].indexOf(A)?p(new c("Unsupported protocol "+A+":",c.ERR_BAD_REQUEST,h)):y.send(m)}))}}var _E=Ly,yE=function(e,t){jy.forEach(e,(function(i,n){n!==t&&n.toUpperCase()===t.toUpperCase()&&(e[t]=i,delete e[n])}))},EE=Hy(),CE=Yy,wE=Xy(),SE={"Content-Type":"application/x-www-form-urlencoded"};function TE(e,t){!_E.isUndefined(e)&&_E.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var AE,RE={transitional:CE,adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==n&&"[object process]"===Object.prototype.toString.call(n))&&(AE=bE()),AE),transformRequest:[function(e,t){if(yE(t,"Accept"),yE(t,"Content-Type"),_E.isFormData(e)||_E.isArrayBuffer(e)||_E.isBuffer(e)||_E.isStream(e)||_E.isFile(e)||_E.isBlob(e))return e;if(_E.isArrayBufferView(e))return e.buffer;if(_E.isURLSearchParams(e))return TE(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString();var i,n=_E.isObject(e),r=t&&t["Content-Type"];if((i=_E.isFileList(e))||n&&"multipart/form-data"===r){var s=this.env&&this.env.FormData;return wE(i?{"files[]":e}:e,s&&new s)}return n||"application/json"===r?(TE(t,"application/json"),function(e,t,i){if(_E.isString(e))try{return(t||JSON.parse)(e),_E.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(i||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||RE.transitional,i=t&&t.silentJSONParsing,n=t&&t.forcedJSONParsing,r=!i&&"json"===this.responseType;if(r||n&&_E.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw EE.from(e,EE.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:dE?lE:(dE=1,lE=null)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};_E.forEach(["delete","get","head"],(function(e){RE.headers[e]={}})),_E.forEach(["post","put","patch"],(function(e){RE.headers[e]=_E.merge(SE)}));var OE,IE,kE=RE,NE=Ly,LE=kE;function ME(){return IE?OE:(IE=1,OE=function(e){return!(!e||!e.__CANCEL__)})}var xE=Ly,DE=function(e,t,i){var n=this||LE;return NE.forEach(i,(function(i){e=i.call(n,e,t)})),e},PE=ME(),UE=kE,BE=mE();function FE(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new BE}var VE,jE,HE=Ly,$E=function(e,t){t=t||{};var i={};function n(e,t){return HE.isPlainObject(e)&&HE.isPlainObject(t)?HE.merge(e,t):HE.isPlainObject(t)?HE.merge({},t):HE.isArray(t)?t.slice():t}function r(i){return HE.isUndefined(t[i])?HE.isUndefined(e[i])?void 0:n(void 0,e[i]):n(e[i],t[i])}function s(e){if(!HE.isUndefined(t[e]))return n(void 0,t[e])}function o(i){return HE.isUndefined(t[i])?HE.isUndefined(e[i])?void 0:n(void 0,e[i]):n(void 0,t[i])}function a(i){return i in t?n(e[i],t[i]):i in e?n(void 0,e[i]):void 0}var c={url:s,method:s,data:s,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a};return HE.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||r,n=t(e);HE.isUndefined(n)&&t!==a||(i[e]=n)})),i};function zE(){return jE?VE:(jE=1,VE={version:"0.27.2"})}var WE=zE().version,KE=Hy(),GE={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){GE[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}}));var qE={};GE.transitional=function(e,t,i){function n(e,t){return"[Axios v"+WE+"] Transitional option '"+e+"'"+t+(i?". "+i:"")}return function(i,r,s){if(!1===e)throw new KE(n(r," has been removed"+(t?" in "+t:"")),KE.ERR_DEPRECATED);return t&&!qE[r]&&(qE[r]=!0,console.warn(n(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(i,r,s)}};var YE,XE,ZE,QE,JE,eC,tC=Ly,nC=Dy,rC=Vy,iC=function(e){return FE(e),e.headers=e.headers||{},e.data=DE.call(e,e.data,e.headers,e.transformRequest),e.headers=xE.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),xE.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||UE.adapter)(e).then((function(t){return FE(e),t.data=DE.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return PE(t)||(FE(e),t&&t.response&&(t.response.data=DE.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))},oC=$E,aC=fE,sC={assertOptions:function(e,t,i){if("object"!=typeof e)throw new KE("options must be an object",KE.ERR_BAD_OPTION_VALUE);for(var n=Object.keys(e),r=n.length;r-- >0;){var s=n[r],o=t[s];if(o){var a=e[s],c=void 0===a||o(a,s,e);if(!0!==c)throw new KE("option "+s+" must be "+c,KE.ERR_BAD_OPTION_VALUE)}else if(!0!==i)throw new KE("Unknown option "+s,KE.ERR_BAD_OPTION)}},validators:GE},cC=sC.validators;function lC(e){this.defaults=e,this.interceptors={request:new rC,response:new rC}}lC.prototype.request=function(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},(t=oC(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var i=t.transitional;void 0!==i&&sC.assertOptions(i,{silentJSONParsing:cC.transitional(cC.boolean),forcedJSONParsing:cC.transitional(cC.boolean),clarifyTimeoutError:cC.transitional(cC.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(r=r&&e.synchronous,n.unshift(e.fulfilled,e.rejected))}));var s,o=[];if(this.interceptors.response.forEach((function(e){o.push(e.fulfilled,e.rejected)})),!r){var a=[iC,void 0];for(Array.prototype.unshift.apply(a,n),a=a.concat(o),s=Promise.resolve(t);a.length;)s=s.then(a.shift(),a.shift());return s}for(var c=t;n.length;){var l=n.shift(),d=n.shift();try{c=l(c)}catch(e){d(e);break}}try{s=iC(c)}catch(e){return Promise.reject(e)}for(;o.length;)s=s.then(o.shift(),o.shift());return s},lC.prototype.getUri=function(e){e=oC(this.defaults,e);var t=aC(e.baseURL,e.url);return nC(t,e.params,e.paramsSerializer)},tC.forEach(["delete","get","head","options"],(function(e){lC.prototype[e]=function(t,i){return this.request(oC(i||{},{method:e,url:t,data:(i||{}).data}))}})),tC.forEach(["post","put","patch"],(function(e){function t(t){return function(i,n,r){return this.request(oC(r||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:i,data:n}))}}lC.prototype[e]=t(),lC.prototype[e+"Form"]=t(!0)}));var dC=Ly,uC=fy,hC=lC,fC=$E,pC=function e(t){var i=new hC(t),n=uC(hC.prototype.request,i);return dC.extend(n,hC.prototype,i),dC.extend(n,i),n.create=function(i){return e(fC(t,i))},n}(kE);pC.Axios=hC,pC.CanceledError=mE(),pC.CancelToken=function(){if(XE)return YE;XE=1;var e=mE();function t(t){if("function"!=typeof t)throw new TypeError("executor must be a function.");var i;this.promise=new Promise((function(e){i=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,i=n._listeners.length;for(t=0;t<i;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,i=new Promise((function(e){n.subscribe(e),t=e})).then(e);return i.cancel=function(){n.unsubscribe(t)},i},t((function(t){n.reason||(n.reason=new e(t),i(n.reason))}))}return t.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},t.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},t.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},t.source=function(){var e;return{token:new t((function(t){e=t})),cancel:e}},YE=t}(),pC.isCancel=ME(),pC.VERSION=zE().version,pC.toFormData=Xy(),pC.AxiosError=Hy(),pC.Cancel=pC.CanceledError,pC.all=function(e){return Promise.all(e)},pC.spread=QE?ZE:(QE=1,ZE=function(e){return function(t){return e.apply(null,t)}}),pC.isAxiosError=function(){if(eC)return JE;eC=1;var e=Ly;return JE=function(t){return e.isObject(t)&&!0===t.isAxiosError}}(),hy.exports=pC,hy.exports.default=pC;var gC=Z(hy.exports);function mC(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vC(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?mC(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):mC(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}let bC,_C=0,yC=0;function EC(e,t,i,n){return new nb(((r,s)=>{t.responseType=t.responseType||"json",t.data&&!i?(t.data=JSON.stringify(t.data),_C+=x_(t.data)):i&&(t.data.size?_C+=t.data.size:t.data instanceof FormData?_C+=D_(t.data):_C+=x_(JSON.stringify(t.data))),t.headers=t.headers||{},t.headers["Content-Type"]=t.headers["Content-Type"]||"application/json",t.method="POST",t.url=e,gC.request(t).then((e=>{"string"==typeof e.data?yC+=x_(e.data):e.data instanceof ArrayBuffer||e.data instanceof Uint8Array?yC+=e.data.byteLength:yC+=x_(JSON.stringify(e.data)),n&&r({data:e.data,headers:e.headers}),r(e.data)})).catch((e=>{gC.isCancel(e)?s(new Fb(Bb.OPERATION_ABORTED,"cancel token canceled")):"ECONNABORTED"===e.code?s(new Fb(Bb.NETWORK_TIMEOUT,e.message)):e.response?s(new Fb(Bb.NETWORK_RESPONSE_ERROR,e.response.status)):s(new Fb(Bb.NETWORK_ERROR,e.message))}))}))}async function CC(e,t){const i=new Blob([t.data],{type:"buffer"});return await EC(e,vC(vC({},t),{},{data:i,headers:{"Content-Type":"application/octet-stream"}}),!0)}const wC=()=>"HTTPS"===(bC||bC||(bC=(window.location.protocol.split(":")[0]||"").toUpperCase(),bC)),SC=()=>void 0!==window.isSecureContext;function TC(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function AC(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?TC(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):TC(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var RC;!function(e){e.SET_SESSION_ID="SET_SESSION_ID",e.SET_P2P_ID="SET_P2P_id",e.SET_DC_ID="SET_DC_id",e.SET_UID="SET_UID",e.SET_PUB_ID="SET_PUB_ID",e.SET_CLOUD_PROXY_SERVER_MODE="SET_CLOUD_PROXY_SERVER_MODE",e.KEY_METRIC_CLIENT_CREATED="KEY_METRIC_CLIENT_CREATED",e.KEY_METRIC_JOIN_START="KEY_METRIC_JOIN_START",e.AVOID_JOIN_START="AVOID_JOIN_START",e.KEY_METRIC_JOIN_END="KEY_METRIC_JOIN_END",e.KEY_METRIC_REQUEST_AP_START="KEY_METRIC_REQUEST_AP_START",e.KEY_METRIC_REQUEST_AP_END="KEY_METRIC_REQUEST_AP_END",e.KEY_METRIC_JOIN_GATEWAY_START="KEY_METRIC_JOIN_GATEWAY_START",e.KEY_METRIC_JOIN_GATEWAY_END="KEY_METRIC_JOIN_GATEWAY_END",e.KEY_METRIC_PEER_CONNECTION_START="KEY_METRIC_PEER_CONNECTION_START",e.KEY_METRIC_PEER_CONNECTION_END="KEY_METRIC_PEER_CONNECTION_END",e.KEY_METRIC_DESCRIPTION_START="KEY_METRIC_DESCRIPTION_START",e.KEY_METRIC_ICE_CONNECTION_END="KEY_METRIC_ICE_CONNECTION_END",e.KEY_METRIC_SIGNAL_CHANNEL_OPEN="KEY_METRIC_SIGNAL_CHANNEL_OPEN",e.KEY_METRIC_PUBLISH="KEY_METRIC_PUBLISH",e.KEY_METRIC_SUBSCRIBE="KEY_METRIC_SUBSCRIBE",e.RECORD_JOIN_CHANNEL_SERVICE="RECORD_JOIN_CHANNEL_SERVICE",e.RESET_JOIN_CHANNEL_SERVICE_RECORDS="RESET_JOIN_CHANNEL_SERVICE_RECORDS",e.RESET_KEY_METRICS="RESET_KEY_METRICS",e.SET_USE_DATACHANNEL="SET_USE_DATACHANNEL",e.SET_USE_P2P="SET_USE_P2P"}(RC||(RC={}));class OC{constructor(e,t,i,n){oh(this,"state",void 0),this.state={codec:e,audioCodec:t,mode:i,clientId:n,sessionId:null,p2pId:0,dcId:0,pubId:0,subId:0,avoidJoinStart:0,keyMetrics:{publish:[],subscribe:[]},joinChannelServiceRecords:[],cloudProxyServerMode:"disabled",useDataChannel:!1,useP2P:!1}}dispatch(e){this.state=function(e,t){switch(t.type){case RC.SET_SESSION_ID:return AC(AC({},e),{},{sessionId:t.sessionId});case RC.SET_P2P_ID:return AC(AC({},e),{},{p2pId:t.p2pId});case RC.SET_UID:return AC(AC({},e),{},{uid:t.uid});case RC.SET_PUB_ID:return AC(AC({},e),{},{pubId:t.pubId});case RC.KEY_METRIC_CLIENT_CREATED:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{clientCreated:t.metric})});case RC.KEY_METRIC_JOIN_START:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{joinStart:t.metric})});case RC.AVOID_JOIN_START:return AC(AC({},e),{},{avoidJoinStart:t.avoidJoinStart});case RC.KEY_METRIC_JOIN_END:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{joinEnd:t.metric})});case RC.KEY_METRIC_REQUEST_AP_START:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{requestAPStart:t.metric})});case RC.KEY_METRIC_REQUEST_AP_END:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{requestAPEnd:t.metric})});case RC.KEY_METRIC_JOIN_GATEWAY_START:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{joinGatewayStart:t.metric})});case RC.KEY_METRIC_JOIN_GATEWAY_END:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{joinGatewayEnd:t.metric})});case RC.KEY_METRIC_PEER_CONNECTION_START:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{peerConnectionStart:t.metric})});case RC.KEY_METRIC_PEER_CONNECTION_END:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{peerConnectionEnd:t.metric})});case RC.KEY_METRIC_DESCRIPTION_START:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{descriptionStart:t.metric})});case RC.KEY_METRIC_SIGNAL_CHANNEL_OPEN:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{signalChannelOpen:t.metric})});case RC.KEY_METRIC_ICE_CONNECTION_END:return AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{iceConnectionEnd:t.metric})});case RC.KEY_METRIC_PUBLISH:{const i=e.keyMetrics.publish,n=i.findIndex((e=>e.trackId===t.metric.trackId));return-1!==n?(i[n]=AC(AC({},i[n]),t.metric),AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{publish:[...i]})})):AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{publish:[...e.keyMetrics.publish,t.metric]})})}case RC.KEY_METRIC_SUBSCRIBE:{const i=e.keyMetrics.subscribe,n=i.findIndex((e=>e.userId===t.metric.userId&&e.type===t.metric.type));return-1!==n?(i[n]=AC(AC({},i[n]),t.metric),AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{subscribe:[...i]})})):AC(AC({},e),{},{keyMetrics:AC(AC({},e.keyMetrics),{},{subscribe:[...e.keyMetrics.subscribe,t.metric]})})}case RC.SET_CLOUD_PROXY_SERVER_MODE:return e.cloudProxyServerMode=t.mode,e;case RC.RECORD_JOIN_CHANNEL_SERVICE:return"number"!=typeof t.index?e.joinChannelServiceRecords=[...e.joinChannelServiceRecords,t.record]:(e.joinChannelServiceRecords[t.index]=AC(AC({},e.joinChannelServiceRecords[t.index]),t.record),e.joinChannelServiceRecords=[...e.joinChannelServiceRecords]),e;case RC.RESET_JOIN_CHANNEL_SERVICE_RECORDS:return e.joinChannelServiceRecords=[],e;case RC.RESET_KEY_METRICS:return e.keyMetrics={publish:[],subscribe:[]},e;case RC.SET_USE_DATACHANNEL:return AC(AC({},e),{},{useDataChannel:t.val});case RC.SET_USE_P2P:return AC(AC({},e),{},{useP2P:t.val});default:return e}}(this.state,e)}set sessionId(e){this.dispatch({type:RC.SET_SESSION_ID,sessionId:e})}get sessionId(){return this.state.sessionId}get codec(){return this.state.codec}get audioCodec(){return this.state.audioCodec}get clientId(){return this.state.clientId}set p2pId(e){this.dispatch({type:RC.SET_P2P_ID,p2pId:e})}get p2pId(){return this.state.p2pId}set dcId(e){this.dispatch({type:RC.SET_DC_ID,dcId:e})}get dcId(){return this.state.dcId}set uid(e){this.dispatch({type:RC.SET_UID,uid:e})}get uid(){return this.state.uid}set pubId(e){this.dispatch({type:RC.SET_PUB_ID,pubId:e})}get pubId(){return this.state.pubId}set cloudProxyServerMode(e){this.dispatch({type:RC.SET_CLOUD_PROXY_SERVER_MODE,mode:e})}get cloudProxyServerMode(){return this.state.cloudProxyServerMode}set useDataChannel(e){this.dispatch({type:RC.SET_USE_DATACHANNEL,val:e})}get useDataChannel(){return this.state.useDataChannel}set useP2P(e){this.dispatch({type:RC.SET_USE_P2P,val:e})}get useP2P(){return this.state.useP2P}clientCreated(){this.dispatch({type:RC.KEY_METRIC_CLIENT_CREATED,metric:Date.now()})}joinStart(){this.dispatch({type:RC.KEY_METRIC_JOIN_START,metric:Date.now()})}joinEnd(){this.dispatch({type:RC.KEY_METRIC_JOIN_END,metric:Date.now()})}requestAPStart(){this.dispatch({type:RC.KEY_METRIC_REQUEST_AP_START,metric:Date.now()})}requestAPEnd(){this.dispatch({type:RC.KEY_METRIC_REQUEST_AP_END,metric:Date.now()})}joinGatewayStart(){this.dispatch({type:RC.KEY_METRIC_JOIN_GATEWAY_START,metric:Date.now()})}joinGatewayEnd(){this.dispatch({type:RC.KEY_METRIC_JOIN_GATEWAY_END,metric:Date.now()})}peerConnectionStart(){this.dispatch({type:RC.KEY_METRIC_PEER_CONNECTION_START,metric:Date.now()})}peerConnectionEnd(){this.dispatch({type:RC.KEY_METRIC_PEER_CONNECTION_END,metric:Date.now()})}descriptionStart(){this.dispatch({type:RC.KEY_METRIC_DESCRIPTION_START,metric:Date.now()})}signalChannelOpen(){this.dispatch({type:RC.KEY_METRIC_SIGNAL_CHANNEL_OPEN,metric:Date.now()})}iceConnectionEnd(){this.dispatch({type:RC.KEY_METRIC_ICE_CONNECTION_END,metric:Date.now()})}publish(e,t,i,n){this.dispatch({type:RC.KEY_METRIC_PUBLISH,metric:AC(AC({trackId:e,type:t},i&&{publishStart:i}),n&&{publishEnd:n})})}subscribe(e,t,i,n,r,s,o){this.dispatch({type:RC.KEY_METRIC_SUBSCRIBE,metric:AC(AC(AC(AC(AC({userId:e,type:t},i&&{subscribeStart:i}),n&&{subscribeEnd:n}),r&&{firstFrame:r}),s&&{streamAdded:s}),o&&{firstDecoded:o})})}massSubscribe(e,t,i,n){e.forEach((e=>{this.dispatch({type:RC.KEY_METRIC_SUBSCRIBE,metric:AC(AC(AC({userId:e.userId,type:e.type},t&&{subscribeStart:t}),i&&{subscribeEnd:i}),n&&{firstFrame:n})})}))}get keyMetrics(){return this.state.keyMetrics}recordJoinChannelService(e,t){"gateway"===e.service&&Array.isArray(e.urls)&&(e.urls=e.urls.map((e=>e.replace(/(\d+)-\d+-\d+-(\d+)/,"$1-*-*-$2"))));try{return"number"!=typeof t?(this.dispatch({type:RC.RECORD_JOIN_CHANNEL_SERVICE,record:AC(AC({},e),{},{sessionId:this.sessionId,cloudProxyMode:this.cloudProxyServerMode,uid:this.uid})}),this.state.joinChannelServiceRecords.length-1):(t<0||t>=this.state.joinChannelServiceRecords.length||this.dispatch({type:RC.RECORD_JOIN_CHANNEL_SERVICE,record:e,index:t}),t)}catch(e){return 0}}resetJoinChannelServiceRecords(){this.dispatch({type:RC.RESET_JOIN_CHANNEL_SERVICE_RECORDS})}resetKeyMetrics(){this.dispatch({type:RC.RESET_KEY_METRICS})}get joinChannelServiceRecords(){try{return this.state.joinChannelServiceRecords}catch(e){return[]}}get avoidJoinStart(){return this.state.avoidJoinStart}set avoidJoinStart(e){this.dispatch({type:RC.AVOID_JOIN_START,avoidJoinStart:e})}}const IC=function(e){if(e.match(/[0-9]+\.[0-9]+\.[0-9]+$/))return e;const t=e.match(/([0-9]+\.[0-9]+\.[0-9]+)\-alpha\.([0-9]+)/);if(t&&t[1]&&t[2]){const e=t[1],i=t[2];return"".concat(e,".").concat(i)}const i=e.match(/([0-9]+\.[0-9]+\.[0-9]+)\-special\.([0-9]+)/);if(i&&i[1]&&i[2]){const e=i[1],t=i[2];return"".concat(e,".").concat(100*(Number(t)+1))}return"4.0.0.999"}("4.19.1"),kC=function(){try{return!0===JSON.parse("true")}catch(e){return!0}}(),NC="v4.19.1-0-g605286cc(10/11/2023, 2:37:03 PM)",LC={PROCESS_ID:"",ENCRYPT_AES:!0,AREAS:["CHINA","GLOBAL"],WEBCS_DOMAIN:["webrtc2-ap-web-1.agora.io","webrtc2-2.ap.sd-rtn.com"],WEBCS_DOMAIN_BACKUP_LIST:["webrtc2-ap-web-3.agora.io","webrtc2-4.ap.sd-rtn.com"],PROXY_CS:["ap-proxy-1.agora.io","ap-proxy-2.agora.io"],CDS_AP:["cds-ap-web-1.agora.io","cds-web-2.ap.sd-rtn.com","cds-ap-web-3.agora.io","cds-web-4.ap.sd-rtn.com"],ACCOUNT_REGISTER:["sua-ap-web-1.agora.io","sua-web-2.ap.sd-rtn.com","sua-ap-web-3.agora.io","sua-web-4.ap.sd-rtn.com"],UAP_AP:["uap-ap-web-1.agora.io","uap-web-2.ap.sd-rtn.com","uap-ap-web-3.agora.io","uap-web-4.ap.sd-rtn.com"],LOG_UPLOAD_SERVER:"logservice.agora.io",EVENT_REPORT_DOMAIN:"statscollector-1.agora.io",EVENT_REPORT_BACKUP_DOMAIN:"web-2.statscollector.sd-rtn.com",ENABLE_EVENT_REPORT:!0,GATEWAY_ADDRESS:[],GATEWAY_WSS_ADDRESS:"",LIVE_STREAMING_ADDRESS:"",HTTP_CONNECT_TIMEOUT:5e3,SIGNAL_REQUEST_TIMEOUT:1e4,REPORT_STATS:!0,UPLOAD_LOG:!1,NOT_REPORT_EVENT:[],SUBSCRIBE_TWCC:!1,PUBLISH_TWCC:!1,PING_PONG_TIME_OUT:10,WEBSOCKET_TIMEOUT_MIN:1e4,EVENT_REPORT_SEND_INTERVAL:3e3,CONFIG_DISTRIBUTE_INTERVAL:3e5,ENABLE_CONFIG_DISTRIBUTE:!0,CANDIDATE_TIMEOUT:5e3,SHOW_REPORT_INVOKER_LOG:!1,JOIN_EXTEND:"",PUB_EXTEND:"",SUB_EXTEND:"",FORCE_TURN:!1,TURN_ENABLE_TCP:!0,TURN_ENABLE_UDP:!0,MAX_UPLOAD_CACHE:50,UPLOAD_CACHE_INTERVAL:2e3,AJAX_REQUEST_CONCURRENT:3,REPORT_APP_SCENARIO:void 0,GATEWAY_DOMAINS:["edge.agora.io","edge.sd-rtn.com"],WORKER_DOMAIN:"edge.agora.io",TURN_DOMAIN:"edge.agora.io",EVENT_REPORT_RETRY:!0,CHROME_FORCE_PLAN_B:!1,AUDIO_SOURCE_VOLUME_UPDATE_INTERVAL:400,AUDIO_SOURCE_AVG_VOLUME_DURATION:3e3,AUDIO_VOLUME_INDICATION_INTERVAL:2e3,VOLUME_VOICE_WEIGHT:10,GET_VOLUME_OF_MUTED_AUDIO_TRACK:!1,STATS_UPDATE_INTERVAL:250,NORMAL_EVENT_QUEUE_CAPACITY:100,CUSTOM_REPORT:!0,CUSTOM_REPORT_LIMIT:20,PROXY_SERVER_TYPE2:"webnginx-proxy.agora.io",PROXY_SERVER_TYPE3:["webrtc-cloud-proxy.sd-rtn.com","webrtc-cloud-proxy.agora.io"],CUSTOM_PUB_ANSWER_MODIFIER:null,CUSTOM_SUB_ANSWER_MODIFIER:null,CUSTOM_PUB_OFFER_MODIFIER:null,CUSTOM_SUB_OFFER_MODIFIER:null,DSCP_TYPE:"high",REMOVE_NEW_CODECS:!0,FRAGEMENT_LENGTH:3,WEBSOCKET_COMPRESS:!1,SIMULCAST:!1,PRELOAD_MEDIA_COUNT:0,USE_PUB_RTX:!1,USE_SUB_RTX:!1,CHECK_VIDEO_VISIBLE_INTERVAL:3e4,ENUMERATE_DEVICES_INTERVAL:!1,ENUMERATE_DEVICES_INTERVAL_TIME:1e4,USE_NEW_TOKEN:!1,CLOSE_AFB_FOR_LOCAL_AP:!0,JOIN_MAX_CONCURRENCY:6,JOIN_WITH_FALLBACK_SIGNAL_PROXY:!0,JOIN_WITH_FALLBACK_MEDIA_PROXY:!0,JOIN_WITH_FALLBACK_MEDIA_PROXY_FORCE:!1,JOIN_GATEWAY_TRY_443PORT_DURATION:2e3,JOIN_GATEWAY_USE_443PORT_ONLY:!1,JOIN_GATEWAY_USE_DUAL_DOMAIN:!0,JOIN_GATEWAY_FALLBACK_PORT:443,USE_TURN_SERVER_OF_GATEWAY:!1,H264_PROFILE_LEVEL_ID:"",USE_NEW_LOG:!1,LOG_VERSION:3,MEDIA_DEVICE_CONSTRAINTS:null,ENCRYPT_PROXY_USERNAME_AND_PSW:!0,SDP_LOGGING:!1,CSP_DETECTED_HOSTNAME_LIST:["agora.io","sd-rtn.com"],REMOTE_AUDIO_TRACK_USES_WEB_AUDIO:!1,LOCAL_AUDIO_TRACK_USES_WEB_AUDIO:!0,BITRATE_ADAPTER_TYPE:"STANDARD_BITRATE",AI_DENOISER_PARAMETERS:{},ADJUST_3A_FROM_PLUGINS:!0,RAISE_H264_BASELINE_PRIORITY:!0,FILTER_SEND_H264_BASELINE:!1,ENABLE_PUBLISHED_USER_LIST:!0,MAX_SUBSCRIPTION:50,X_GOOGLE_START_BITRATE:void 0,NEW_REPORT_SERVER:!1,NEW_REPORT_SERVER_DOMAINS:["data-reporting.agora.io","data-reporting.agora.io"],VIDEO_INSPECT_WORKER_MESSAGE_LENGTH_LIMIT:3e5,VIDEO_INSPECT_INTERVAL_MINIMUM:1e3,VIDEO_INSPECT_QUALITY_RATIO:.9,VIDEO_INSPECT_WORKER_MANAGER_HOST:"edge.agora.io",VIDEO_INSPECT_WORKER_MANAGER_PORT:"",VIDEO_INSPECT_WORKER_PORT:"",SHOW_VIDEO_INSPECT_WORKER_MESSAGE:!1,STATS_COLLECTOR_PORT:443,FORCE_TURN_TCP:!1,SUBSCRIBE_AUDIO_FILTER_TOPN:void 0,ENABLE_PUBLISH_AUDIO_FILTER:void 0,DISABLE_FEC:void 0,WEBAUDIO_INIT_OPTIONS:void 0,FILTER_VIDEO_FEC:!0,FILTER_AUDIO_FEC:!1,CHROME_DUAL_STREAM_USE_ENCODING:!0,DISABLE_DUAL_STREAM_USE_ENCODING:!1,EXTENSION_USAGE_UPLOAD_INTERVAL:1e4,ICE_RESTART:!0,ICE_RESTART_INTERVAL:1e4,NEW_ICE_RESTART:!1,ENABLE_USER_LICENSE_CHECK:!0,SIGNAL_CHANNEL:0,TRANSMITTER_INITIAL_RTT:30,TRANSMITTER_INITIAL_RTO:30,TRANSMITTER_MAX_BATCH_ACK_COUNT:2,TRANSMITTER_MAX_RTO:500,DATACHANNEL_COMPRESS:!1,FINGERPRINT:null,DC_JOIN_WITH_FAILBACK:5e3,ENABLE_VIDEO_FRAME_CALLBACK:!0,VIDEO_FREEZE_DURATION:500,SPATIALIZER_PARAMETERS:{},UPLOAD_LOG_INTERVAL:3e3,UPLOAD_LOG_REQUEST_RETRY_INTERVAL:2e3,UPLOAD_LOG_REQUEST_MAX_RETRY_INTERVAL:2e4,UPLOAD_LOG_TRY_INTERVAL_WHILE_OFF:5e3,UPLOAD_LOG_RETRY_INTERVAL_V1:1e4,UPLOAD_LOG_TWICE_RETRY_INTERVAL_V1:200,UPLOAD_LOG_LENGTH_EACH_TIME:10,APP_TYPE:0,DISABLE_WEBAUDIO:!1,CHANNEL_MEDIA_RELAY_SERVERS:void 0,KEEP_LAST_FRAME:!0,FORWARD_P2P_CREATION:!0,SYNC_GROUP:!0,BLOCK_LOCAL_CLIENT:!1,AP_AREA:!0,SVC:[],ENABLE_ENCODED_TRANSFORM:!1,IMAGE_MODERATION_WORKER_HOST:"edge.agora.io",IMAGE_MODERATION_WORKER_MESSAGE_LENGTH_LIMIT:3e5,IMAGE_MODERATION_INTERVAL_MINIMUM:1e3,SHOW_IMAGE_MODERATION_WORKER_MESSAGE:!1,IMAGE_MODERATION_QUALITY_RATIO:.9,IMAGE_MODERATION_UPLOAD_REPORT_INTERVAL:5e3,SHOW_GLOBAL_CLIENT_LIST:!1,RTM2_FLAG:void 0,AP_RTM:!1,ENABLE_DATASTREAM_2:!1,DATASTREAM_MAX_RETRANSMITS:10,ENABLE_USER_AUTO_REBALANCE_CHECK:!0,ENABLE_INSTANT_VIDEO:!1,ENABLE_NTP_REPORT:!1,USE_XR:!1,TCP_CANDIDATE_ONLY:!1,EXTERNAL_SIGNAL_REQUEST_TIMEOUT:1e4,P2P:!1,SHOW_P2P_LOG:!1,ACCOUNT_REGISTER_RETRY_TIMEOUT:1,ACCOUNT_REGISTER_RETRY_RATIO:2,ACCOUNT_REGISTER_RETRY_TIMEOUT_MAX:6e4,ACCOUNT_REGISTER_RETRY_COUNT_MAX:1e5,AUDIO_CONTEXT:null,WEBCS_BACKUP_CONNECT_TIMEOUT:6e3,PLAYER_STATE_DEFER:2e3,SIGNAL_REQUEST_WATCH_INTERVAL:1e3,FILEPATH_LENMAX:255,DUALSTREAM_OPERATION_CHECK:!0,MEDIA_ELEMENT_EXISTS_DEPTH:3,SHIM_CANDIDATE:!1,LEAVE_MSG_TIMEOUT:2e3,STATS_FILTER:{transportId:!0,googTrackId:!0}};function MC(e,t,i){var n,r;Di(n=Object.keys(LC)).call(n,e)&&(!i&&Di(r=Object.keys(DC)).call(r,e)||(LC[e]=t))}function xC(e){return LC[e]}const DC={},PC=new class extends r_{reportLogUploadError(e){this.emit("REPORT_LOG_UPLOAD",e)}};class UC{constructor(e){oh(this,"logger",void 0),oh(this,"prefixLists",[]),this.logger=e}debug(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.logger.debug(...this.prefixLists,...t)}info(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.logger.info(...this.prefixLists,...t)}warning(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.logger.warning(...this.prefixLists,...t)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];this.logger.error(...this.prefixLists,...t)}prefix(e){return this.prefixLists.push(e),this}popPrefix(){return this.prefixLists.pop(),this}}function BC(){const e=new Date;return e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()}function FC(){const e=new Date,t=/((\d+:){2}\d+)/.exec((new Date).toUTCString());return t?(null==t?void 0:t[0])+":"+e.getUTCMilliseconds():e.toTimeString().split(" ")[0]+":"+e.getMilliseconds()}const VC={DEBUG:0,INFO:1,WARNING:2,ERROR:3,NONE:4},jC=Date.now(),HC=e=>{for(const t in VC)if(Object.prototype.hasOwnProperty.call(VC,t)&&VC[t]===e)return t;return"DEFAULT"},$C=new class{constructor(){oh(this,"proxyServerURL",void 0),oh(this,"logLevel",VC.DEBUG),oh(this,"uploadState","collecting"),oh(this,"uploadLogWaitingList",[]),oh(this,"uploadLogUploadingList",[]),oh(this,"uploadErrorCount",0),oh(this,"currentLogID",0),oh(this,"url",void 0),oh(this,"extLog",((e,t)=>{this.appendLogToWaitingList(e,...t)}))}debug(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=[VC.DEBUG].concat(t);this.log.apply(this,n)}info(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=[VC.INFO].concat(t);this.log.apply(this,n)}warning(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=[VC.WARNING].concat(t);this.log.apply(this,n)}warn(){this.warning(...arguments)}error(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=[VC.ERROR].concat(t);this.log.apply(this,n)}upload(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const n=[VC.DEBUG].concat(t);this.uploadLog.apply(this,n)}setLogLevel(e){e=Math.min(Math.max(0,e),4),this.logLevel=e}enableLogUpload(){MC("UPLOAD_LOG",!0)}disableLogUpload(){MC("UPLOAD_LOG",!1),this.uploadLogUploadingList=[],this.uploadLogWaitingList=[]}setProxyServer(e){this.proxyServerURL=e}prefix(e){return new UC(this).prefix(e)}log(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(Date.now()-jC<100)return void setTimeout((()=>{this.log(...t)}),Date.now()-jC);const n=Math.max(0,Math.min(4,t[0]));if(t[0]=BC()+" Agora-SDK [".concat(HC(n),"]:"),this.appendLogToWaitingList(n,...t),n<this.logLevel)return;const r=BC()+" %cAgora-SDK [".concat(HC(n),"]:");let s=[];if(!xC("USE_NEW_LOG"))switch(n){case VC.DEBUG:s=[r,"color: #64B5F6;"].concat(t.slice(1)),console.log.apply(console,s);break;case VC.INFO:s=[r,"color: #1E88E5; font-weight: bold;"].concat(t.slice(1)),console.log.apply(console,s);break;case VC.WARNING:s=[r,"color: #FB8C00; font-weight: bold;"].concat(t.slice(1)),console.warn.apply(console,s);break;case VC.ERROR:s=[r,"color: #B00020; font-weight: bold;"].concat(t.slice(1)),console.error.apply(console,s)}}uploadLog(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(Date.now()-jC<100)return void setTimeout((()=>{this.uploadLog(...t)}),Date.now()-jC);const n=Math.max(0,Math.min(4,t[0]));t[0]=BC()+" Agora-SDK [".concat(HC(n),"]:"),this.appendLogToWaitingList(n,...t)}appendLogToWaitingList(e){if(!xC("UPLOAD_LOG"))return;for(var t=arguments.length,i=new Array(t>1?t-1:0),n=1;n<t;n++)i[n-1]=arguments[n];Array.isArray(i[0])?i[0][0]=FC()+" Agora-SDK [".concat(HC(e),"]:"):i[0]=FC()+" Agora-SDK [".concat(HC(e),"]:");let r="";i.forEach((e=>{"object"==typeof e&&(e=JSON.stringify(e)),r+="".concat(e," ")})),this.uploadLogWaitingList.push({payload_str:r,log_level:e,log_item_id:this.currentLogID++}),"uploading"===this.uploadState&&0===this.uploadLogUploadingList.length&&this.uploadLogInterval()}startUpload(){this.uploadState="uploading",0===this.uploadLogUploadingList.length&&this.uploadLogInterval()}async uploadLogs(){const e=this.uploadLogUploadingList,t={sdk_version:IC,process_id:xC("PROCESS_ID"),payload:JSON.stringify(e)};return Z_((async()=>{const e=await gC.post(this.url||(this.proxyServerURL?"https://".concat(this.proxyServerURL,"/ls/?h=").concat(xC("LOG_UPLOAD_SERVER"),"&p=443&d=upload/v1"):"https://".concat(xC("LOG_UPLOAD_SERVER"),"/upload/v1")),t,{responseType:"text"});if("OK"!==e.data){const t=new Error("unexpected upload log response");throw t.response=e,t}}),(()=>(this.uploadLogUploadingList=[],!1)),(e=>(e.response?PC.reportLogUploadError({status:e.response.status,data:e.response.data,headers:e.response.headers,message:e.message}):e.request?PC.reportLogUploadError({status:e.request.status,message:e.message}):PC.reportLogUploadError({status:-1,message:e.message}),!0)),{timeout:xC("UPLOAD_LOG_REQUEST_RETRY_INTERVAL"),maxRetryTimeout:xC("UPLOAD_LOG_REQUEST_MAX_RETRY_INTERVAL")})}uploadLogInterval(){0===this.uploadLogUploadingList.length&&0===this.uploadLogWaitingList.length||(0===this.uploadLogUploadingList.length&&(this.uploadLogUploadingList=this.uploadLogWaitingList.splice(0,xC("UPLOAD_LOG_LENGTH_EACH_TIME"))),this.uploadLogs().then((()=>{this.uploadErrorCount=0,this.uploadLogWaitingList.length>0&&window.setTimeout((()=>this.uploadLogInterval()),xC("UPLOAD_LOG_INTERVAL"))})).catch((e=>{this.uploadErrorCount+=1,this.uploadErrorCount<2?window.setTimeout((()=>this.uploadLogInterval()),xC("UPLOAD_LOG_TWICE_RETRY_INTERVAL_V1")):window.setTimeout((()=>this.uploadLogInterval()),xC("UPLOAD_LOG_RETRY_INTERVAL_V1"))})))}};var zC,WC;function KC(e){return zb(e.reportId,"params.reportId",0,100,!1),zb(e.category,"params.category",0,100,!1),zb(e.event,"params.event",0,100,!1),zb(e.label,"params.label",0,100,!1),Hb(e.value,"params.value",Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER,!1),!0}!function(e){e.FREE="free",e.UPLOADING="uploading"}(zC||(zC={})),function(e){e[e.MISC=0]="MISC",e[e.INTERNAL_EVENT=1]="INTERNAL_EVENT",e[e.PUBLIC_EVENT=2]="PUBLIC_EVENT",e[e.WEB_EVENT=3]="WEB_EVENT",e[e.INTERNAL_API=4]="INTERNAL_API",e[e.WEB_API=5]="WEB_API",e[e.PUBLIC_API=6]="PUBLIC_API"}(WC||(WC={}));const GC={sid:"",lts:0,success:null,cname:null,uid:null,peer:null,cid:null,elapse:null,extend:null,vid:0};var qC,YC,XC,ZC;function QC(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function JC(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?QC(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):QC(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}!function(e){e.PUBLISH="publish",e.SUBSCRIBE="subscribe",e.WS_COMPRESSOR_INIT="ws_compressor_init",e.SESSION_INIT="session_init",e.JOIN_CHOOSE_SERVER="join_choose_server",e.REQ_USER_ACCOUNT="req_user_account",e.JOIN_GATEWAY="join_gateway",e.REJOIN_GATEWAY="rejoin_gateway",e.STREAM_SWITCH="stream_switch",e.REQUEST_PROXY_WORKER_MANAGER="request_proxy_worker_manager",e.REQUEST_PROXY_APPCENTER="request_proxy_appcenter",e.FIRST_VIDEO_RECEIVED="first_video_received",e.FIRST_AUDIO_RECEIVED="first_audio_received",e.FIRST_VIDEO_DECODE="first_video_decode",e.FIRST_AUDIO_DECODE="first_audio_decode",e.ON_ADD_AUDIO_STREAM="on_add_audio_stream",e.ON_ADD_VIDEO_STREAM="on_add_video_stream",e.ON_UPDATE_STREAM="on_update_stream",e.ON_REMOVE_STREAM="on_remove_stream",e.USER_ANALYTICS="req_user_analytics",e.PC_STATS="pc_stats"}(qC||(qC={})),function(e){e.SESSION="io.agora.pb.Wrtc.Session",e.JOIN_CHOOSE_SERVER="io.agora.pb.Wrtc.JoinChooseServer",e.REQ_USER_ACCOUNT="io.agora.pb.Wrtc.ReqUserAccount",e.JOIN_GATEWAY="io.agora.pb.Wrtc.JoinGateway",e.RE_JOIN_GATEWAY="io.agora.pb.Wrtc.ReJoinGateway",e.PUBLISH="io.agora.pb.Wrtc.Publish",e.SUBSCRIBE="io.agora.pb.Wrtc.Subscribe",e.WS_COMPRESSOR_INIT="io.agora.pb.Wrtc.WsCompressorInit",e.STREAM_SWITCH="io.agora.pb.Wrtc.StreamSwitch",e.AUDIO_SENDING_STOPPED="io.agora.pb.Wrtc.AudioSendingStopped",e.VIDEO_SENDING_STOPPED="io.agora.pb.Wrtc.VideoSendingStopped",e.REQUEST_PROXY_APPCENTER="io.agora.pb.Wrtc.RequestProxyAppCenter",e.REQUEST_PROXY_WORKER_MANAGER="io.agora.pb.Wrtc.RequestProxyWorkerManager",e.API_INVOKE="io.agora.pb.Wrtc.ApiInvoke",e.FIRST_VIDEO_RECEIVED="io.agora.pb.Wrtc.FirstVideoReceived",e.FIRST_AUDIO_RECEIVED="io.agora.pb.Wrtc.FirstAudioReceived",e.FIRST_VIDEO_DECODE="io.agora.pb.Wrtc.FirstVideoDecode",e.FIRST_AUDIO_DECODE="io.agora.pb.Wrtc.FirstAudioDecode",e.ON_ADD_AUDIO_STREAM="io.agora.pb.Wrtc.OnAddAudioStream",e.ON_ADD_VIDEO_STREAM="io.agora.pb.Wrtc.OnAddVideoStream",e.ON_UPDATE_STREAM="io.agora.pb.Wrtc.OnUpdateStream",e.ON_REMOVE_STREAM="io.agora.pb.Wrtc.OnRemoveStream",e.JOIN_CHANNEL_TIMEOUT="io.agora.pb.Wrtc.JoinChannelTimeout",e.PEER_PUBLISH_STATUS="io.agora.pb.Wrtc.PeerPublishStatus",e.WORKER_EVENT="io.agora.pb.Wrtc.WorkerEvent",e.AP_WORKER_EVENT="io.agora.pb.Wrtc.APWorkerEvent",e.JOIN_WEB_PROXY_AP="io.agora.pb.Wrtc.JoinWebProxyAP",e.WEBSOCKET_QUIT="io.agora.pb.Wrtc.WebSocketQuit",e.USER_ANALYTICS="io.agora.pb.Wrtc.UserAnalytics",e.AUTOPLAY_FAILED="io.agora.pb.Wrtc.AutoplayFailed",e.PC_STATS="io.agora.pb.Wrtc.PCStats"}(YC||(YC={})),function(e){e[e.WORKER_EVENT=156]="WORKER_EVENT",e[e.AP_WORKER_EVENT=160]="AP_WORKER_EVENT"}(XC||(XC={})),function(e){e[e.SESSION=26]="SESSION",e[e.JOIN_CHOOSE_SERVER=27]="JOIN_CHOOSE_SERVER",e[e.REQ_USER_ACCOUNT=196]="REQ_USER_ACCOUNT",e[e.JOIN_GATEWAY=28]="JOIN_GATEWAY",e[e.PUBLISH=30]="PUBLISH",e[e.SUBSCRIBE=29]="SUBSCRIBE",e[e.WS_COMPRESSOR_INIT=9430]="WS_COMPRESSOR_INIT",e[e.STREAM_SWITCH=32]="STREAM_SWITCH",e[e.AUDIO_SENDING_STOPPED=33]="AUDIO_SENDING_STOPPED",e[e.VIDEO_SENDING_STOPPED=34]="VIDEO_SENDING_STOPPED",e[e.REQUEST_PROXY_APPCENTER=35]="REQUEST_PROXY_APPCENTER",e[e.REQUEST_PROXY_WORKER_MANAGER=36]="REQUEST_PROXY_WORKER_MANAGER",e[e.API_INVOKE=41]="API_INVOKE",e[e.FIRST_VIDEO_RECEIVED=348]="FIRST_VIDEO_RECEIVED",e[e.FIRST_AUDIO_RECEIVED=349]="FIRST_AUDIO_RECEIVED",e[e.FIRST_VIDEO_DECODE=350]="FIRST_VIDEO_DECODE",e[e.FIRST_AUDIO_DECODE=351]="FIRST_AUDIO_DECODE",e[e.ON_ADD_AUDIO_STREAM=352]="ON_ADD_AUDIO_STREAM",e[e.ON_ADD_VIDEO_STREAM=353]="ON_ADD_VIDEO_STREAM",e[e.ON_UPDATE_STREAM=356]="ON_UPDATE_STREAM",e[e.ON_REMOVE_STREAM=355]="ON_REMOVE_STREAM",e[e.JOIN_CHANNEL_TIMEOUT=407]="JOIN_CHANNEL_TIMEOUT",e[e.PEER_PUBLISH_STATUS=408]="PEER_PUBLISH_STATUS",e[e.WORKER_EVENT=156]="WORKER_EVENT",e[e.AP_WORKER_EVENT=160]="AP_WORKER_EVENT",e[e.JOIN_WEB_PROXY_AP=700]="JOIN_WEB_PROXY_AP",e[e.WEBSOCKET_QUIT=671]="WEBSOCKET_QUIT",e[e.USER_ANALYTICS=1e4]="USER_ANALYTICS",e[e.AUTOPLAY_FAILED=9178]="AUTOPLAY_FAILED"}(ZC||(ZC={}));class ew{constructor(){oh(this,"baseInfoMap",new Map),oh(this,"proxyServer",void 0),oh(this,"eventUploadTimer",void 0),oh(this,"setSessionIdTimer",void 0),oh(this,"url",void 0),oh(this,"backupUrl",void 0),oh(this,"_appId",void 0),oh(this,"keyEventUploadPendingItems",[]),oh(this,"normalEventUploadPendingItems",[]),oh(this,"apiInvokeUploadPendingItems",[]),oh(this,"apiInvokeCount",0),oh(this,"ltsList",[]),oh(this,"lastSendNormalEventTime",Date.now()),oh(this,"customReportCounterTimer",void 0),oh(this,"customReportCount",0),oh(this,"extApiInvoke",(async e=>{for(const t of e){const e=JC(JC({},t),{},{sid:null,invokeId:++this.apiInvokeCount,tag:s_.TRACER});this.sendApiInvoke(e)}})),this.eventUploadTimer=window.setInterval(this.doSend.bind(this),xC("EVENT_REPORT_SEND_INTERVAL")),this.setSessionIdTimer=window.setInterval(this.appendSessionId.bind(this),xC("EVENT_REPORT_SEND_INTERVAL"))}getBaseInfoBySessionId(e){return this.baseInfoMap.get(e)}adjustSessionStartTime(e){if(!this.baseInfoMap.has(e)&&!this.baseInfoMap.get(e))return void $C.error("adjust session ".concat(e," start time, sid is not exist or info is undefined"));const t=this.baseInfoMap.get(e),i=Date.now(),n=t.startTime;t.startTime=i,$C.debug("rewrite session ".concat(e," startTime: ").concat(i," , ").concat(i-n,"ms")),this.baseInfoMap.set(e,t)}setAppId(e){this._appId=e}reportApiInvoke(e,t,i){t.timeout=t.timeout||6e4,t.reportResult=void 0===t.reportResult||t.reportResult;const n=Date.now();this.apiInvokeCount+=1;const r=this.apiInvokeCount,s=()=>({tag:t.tag,invokeId:r,sid:e,name:t.name,apiInvokeTime:n,options:t.options,states:t.states||null}),o=!!xC("SHOW_REPORT_INVOKER_LOG");o&&$C.info("".concat(t.name," start"),t.options);let a=!1;U_(t.timeout).then((()=>{a||(this.sendApiInvoke(JC(JC({},s()),{},{error:Bb.API_INVOKE_TIMEOUT,success:!1})),$C.debug("".concat(t.name," timeout")))}));const c=new Fb(Bb.UNEXPECTED_ERROR,"".concat(t.name,": this api invoke is end"));return{onSuccess:e=>{const n=()=>{if(a)throw c;return a=!0,this.sendApiInvoke(JC(JC({},s()),{},{success:!0},t.reportResult&&{result:e})),o&&$C.info("".concat(t.name," onSuccess")),e};return i?H_(n,t.name+"Success",i,(()=>a=!0)):n()},onError:e=>{const n=()=>{if(a)throw e;a=!0,this.sendApiInvoke(JC(JC({},s()),{},{success:!1,error:e})),o&&$C.info("".concat(t.name," onFailure"),e.toString())};return i?H_(n,t.name+"Error",i,(()=>a=!0)):n()}}}sessionInit(e,t){if(this.baseInfoMap.has(e))return;const i=Date.now(),n=this.createBaseInfo(e,i);n.cname=t.cname;const r=Object.assign({},{willUploadConsoleLog:xC("UPLOAD_LOG"),maxTouchPoints:navigator.maxTouchPoints,areaVersion:kC?"global":"oversea",areas:xC("AREAS")&&xC("AREAS").join(",")},t.extend),s=Date.now(),o=JC(JC({},n),{},{eventType:qC.SESSION_INIT,appid:t.appid,browser:navigator.userAgent,build:NC,lts:s,elapse:s-i,extend:JSON.stringify(r),mode:t.mode,process:xC("PROCESS_ID"),appType:xC("APP_TYPE"),success:!0,version:IC});this.send({type:YC.SESSION,data:o},!0)}joinChooseServer(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.JOIN_CHOOSE_SERVER,lts:r,eventElapse:r-t.lts,chooseServerAddr:t.csAddr,errorCode:t.ec,elapse:r-i.startTime,success:t.succ,chooseServerAddrList:JSON.stringify(t.serverList),uid:t.uid?parseInt(t.uid):null,cid:t.cid?parseInt(t.cid):null,chooseServerIp:t.csIp||"",opid:t.opid,unilbsServerIds:t.unilbsServerIds,extend:t.extend||void 0,isHttp3:t.isHttp3});this.send({type:YC.JOIN_CHOOSE_SERVER,data:s},!0)}reqUserAccount(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.REQ_USER_ACCOUNT,lts:r,success:t.success,serverAddress:t.serverAddr,stringUid:t.stringUid,uid:t.uid,errorCode:t.errorCode,elapse:r-i.startTime,eventElapse:r-t.lts,extend:JSON.stringify(t.extend)});this.send({type:YC.REQ_USER_ACCOUNT,data:s},!0)}joinGateway(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info;t.vid&&(n.vid=t.vid),n.uid=t.uid,n.cid=t.cid;const r=Date.now(),{firstSuccess:s,avoidJoinStartTime:o,isProxy:a,addr:c}=t,l=r-(s&&o?o:i.startTime),d=JC(JC({},n),{},{eventType:qC.JOIN_GATEWAY,lts:r,gatewayAddr:t.addr,success:t.succ,errorCode:t.ec,elapse:l,eventElapse:r-t.lts,firstSuccess:s,signalChannel:t.signalChannel}),h=d.success?1:0;if(t.succ&&(i.lastJoinSuccessTime=r),s)this.send({type:YC.JOIN_GATEWAY,data:d},!0);else{let e;if(c)if(a){const t=c.match(/h=(\d{1,3}-){3}\d{1,3}/g),i=c.match(/p=[0-9]{1,6}/g);e={isSuccess:h,gatewayIp:t&&t.length?t[0].split("=")[1].replace(/-/g,"."):"",port:i&&i.length?i[0].split("=")[1]:"",isProxy:a?1:0}}else{const t=c.match(/wss:\/\/(\d{1,3}-){3}\d{1,3}/g),i=c.match(/(:|p=)[0-9]{1,6}/g);e={isSuccess:h,gatewayIp:t&&t.length?t[0].split("//")[1].replace(/-/g,"."):"",port:i&&i.length?i[0].split(/:|p=/g)[1]:"",isProxy:a?1:0}}else e={isSuccess:h,gatewayIp:"",port:"",isProxy:a?1:0};delete d.success,delete d.eventType,delete d.firstSuccess,d.vid=Number(d.vid);const t=Object.assign({},d,e,{eventType:qC.REJOIN_GATEWAY});this.send({type:YC.RE_JOIN_GATEWAY,data:t},!0)}}joinChannelTimeout(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=Date.now(),r=JC(JC({},i.info),{},{lts:n,timeout:t,elapse:n-i.startTime});this.send({type:YC.JOIN_CHANNEL_TIMEOUT,data:r},!0)}publish(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.PUBLISH,lts:r,eventElapse:t.eventElapse,elapse:r-i.startTime,success:t.succ,errorCode:t.ec,videoName:t.videoName,audioName:t.audioName,screenName:t.screenName,screenshare:t.screenshare,audio:t.audio,video:t.video,p2pid:t.p2pid,publishRequestid:t.publishRequestid});this.send({type:YC.PUBLISH,data:s},!0)}subscribe(e,t,i){const n=this.baseInfoMap.get(e);if(!n)return;const r=n.info,s=Date.now(),o=JC(JC({},r),{},{eventType:qC.SUBSCRIBE,lts:s,eventElapse:t.eventElapse,elapse:s-n.startTime,success:t.succ,errorCode:t.ec,video:t.video,audio:t.audio,subscribeRequestid:t.subscribeRequestid,p2pid:t.p2pid},i&&{extend:JSON.stringify({isMassSubscribe:!0})});"string"==typeof t.peerid?o.peerSuid=t.peerid:o.peer=t.peerid,this.send({type:YC.SUBSCRIBE,data:o},!0)}wsCompressorInit(e){var t;const i=[...fh(t=this.baseInfoMap).call(t)],n=i.length?i[0]:"UnableToGetSid",r=this.baseInfoMap.get(n);if(!r)return;const s=r.info,o=Date.now(),a=JC(JC({},s),{},{eventType:qC.WS_COMPRESSOR_INIT,lts:o,eventElapse:e.eventElapse,elapse:o-r.startTime,status:e.status?1:2});this.send({type:YC.WS_COMPRESSOR_INIT,data:a},!0)}firstRemoteVideoDecode(e,t,i,n){const r=this.baseInfoMap.get(e);if(!r)return;const s=r.info,o=Date.now(),a=JC(JC(JC({},s),n),{},{elapse:o-r.startTime,eventType:t,lts:o,firstDecodeFrame:Math.max(o-r.startTime,0),apEnd:Math.max(n.apEnd-r.startTime,0),apStart:Math.max(n.apStart-r.startTime,0),joinGwEnd:Math.max(n.joinGwEnd-r.startTime,0),joinGwStart:Math.max(n.joinGwStart-r.startTime,0),pcEnd:Math.max(n.pcEnd-r.startTime,0),pcStart:Math.max(n.pcStart-r.startTime,0),subscriberEnd:Math.max(n.subscriberEnd-r.startTime,0),subscriberStart:Math.max(n.subscriberStart-r.startTime,0),videoAddNotify:Math.max(n.videoAddNotify-r.startTime,0)});this.send({type:i,data:a},!0)}firstRemoteFrame(e,t,i,n){const r=this.baseInfoMap.get(e);if(!r)return;const s=r.info,o=Date.now(),a=JC(JC(JC({},s),n),{},{elapse:o-r.startTime,eventType:t,lts:o});this.send({type:i,data:a},!0)}pcStats(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC(JC({},n),t),{},{vid:void 0===n.vid?0:Number(n.vid),elapse:r-i.startTime,eventType:qC.PC_STATS,lts:r});this.send({type:YC.PC_STATS,data:s},!0)}onGatewayStream(e,t,i,n){const r=this.baseInfoMap.get(e);if(!r)return;const s=r.info,o=Date.now(),a=JC(JC(JC({},s),n),{},{eventType:t,lts:o});this.send({type:i,data:a},!0)}streamSwitch(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.STREAM_SWITCH,lts:r,isDual:t.isdual,elapse:r-i.startTime,success:t.succ});this.send({type:YC.STREAM_SWITCH,data:s},!0)}requestProxyAppCenter(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.REQUEST_PROXY_APPCENTER,lts:r,eventElapse:r-t.lts,elapse:r-i.startTime,APAddr:t.APAddr,workerManagerList:t.workerManagerList,response:t.response,errorCode:t.ec,success:t.succ});this.send({type:YC.REQUEST_PROXY_APPCENTER,data:s},!0)}requestProxyWorkerManager(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{eventType:qC.REQUEST_PROXY_WORKER_MANAGER,lts:r,eventElapse:r-t.lts,elapse:r-i.startTime,workerManagerAddr:t.workerManagerAddr,response:t.response,errorCode:t.ec,success:t.succ});this.send({type:YC.REQUEST_PROXY_WORKER_MANAGER,data:s},!0)}setProxyServer(e){this.proxyServer=e,e?$C.debug("reportProxyServerurl: ".concat(e)):$C.debug("disable reportProxyServerurl: ".concat(e))}peerPublishStatus(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC({},n),{},{subscribeElapse:t.subscribeElapse,peer:t.peer,peerPublishDuration:Math.max(t.audioPublishDuration,t.videoPublishDuration),audiotag:t.audioPublishDuration>0?1:-1,videotag:t.videoPublishDuration>0?1:-1,lts:r,elapse:r-i.startTime,joinChannelSuccessElapse:r-(i.lastJoinSuccessTime||r),peerPublishDurationVideo:t.videoPublishDuration,peerPublishDurationAudio:t.audioPublishDuration});this.send({type:YC.PEER_PUBLISH_STATUS,data:s},!0)}workerEvent(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now();(function(e,t,i){const n=e[t];if(!n||"string"!=typeof n)return[e];e[t]="";const r=x_(JSON.stringify(e));let s=0;const o=[];let a=0;for(let c=0;c<n.length;c++)a+=n.charCodeAt(c)<=127?1:3,a<=i-r||(o[o.length]=S_(S_({},e),{},{[t]:n.substring(s,c)}),s=c,a=n.charCodeAt(c)<=127?1:3);return s!==n.length-1&&(o[o.length]=S_(S_({},e),{},{[t]:n.substring(s)})),o})(JC(JC(JC({},n),t),{},{elapse:r-i.startTime,lts:r,productType:"WebRTC"}),"payload",1300).forEach((e=>this.send({type:YC.WORKER_EVENT,data:e},!0)))}apworkerEvent(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC(JC({},n),t),{},{elapse:r-i.startTime,lts:r});this.send({type:YC.AP_WORKER_EVENT,data:s},!0)}joinWebProxyAP(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC(JC({},n),t),{},{elapse:r-i.startTime,lts:r,extend:t.extend||void 0});this.send({type:YC.JOIN_WEB_PROXY_AP,data:s},!0)}WebSocketQuit(e,t){const i=this.baseInfoMap.get(e);if(!i)return;const n=i.info,r=Date.now(),s=JC(JC(JC({},n),t),{},{elapse:r-i.startTime,lts:r});this.send({type:YC.WEBSOCKET_QUIT,data:s},!0)}async sendCustomReportMessage(e,t){if(this.customReportCount+=t.length,this.customReportCount>xC("CUSTOM_REPORT_LIMIT"))throw new Fb(Bb.CUSTOM_REPORT_FREQUENCY_TOO_HIGH);this.customReportCounterTimer||(this.customReportCounterTimer=window.setInterval((()=>{this.customReportCount=0}),5e3));const i=Date.now(),n=t.map((t=>({type:YC.USER_ANALYTICS,data:JC(JC({sid:e},t),{},{lts:i})})));try{xC("NEW_REPORT_SERVER")?await this.postDataToStatsCollector2(n):await this.postDataToStatsCollector(n)}catch(e){throw $C.error("send custom report message failed",e.toString()),new Fb(Bb.CUSTOM_REPORT_SEND_FAILED,e.message)}}sendApiInvoke(e){const t=xC("NOT_REPORT_EVENT");if(e.tag&&Di(t)&&Di(t).call(t,e.tag))return!1;if(null===e.sid)return this.apiInvokeUploadPendingItems.push(e),!1;const i=this.baseInfoMap.get(e.sid);if(!i)return this.apiInvokeUploadPendingItems.push(e),!1;const{cname:n,uid:r,cid:s}=i.info;let o;if(e.lts=e.lts||Date.now(),e.error)if(e.error instanceof Fb){const{code:t,message:i}=e.error;o=t||i||e.error.toString()}else o=e.error.toString();const a={invokeId:e.invokeId,sid:e.sid,cname:n,cid:s,uid:r,lts:e.lts,success:e.success,elapse:e.lts-i.startTime,execElapse:e.lts-e.apiInvokeTime,apiName:e.name,options:e.options?JSON.stringify(e.options):void 0,execStates:e.states?JSON.stringify(e.states):void 0,execResult:e.result?JSON.stringify(e.result):void 0,errorCode:e.error?o:void 0,errorMsg:e.error?JSON.stringify(e.error):void 0};return this.send({type:YC.API_INVOKE,data:a},!1),!0}appendSessionId(){ew.__CLIENT_LIST__.forEach((e=>{if(e._sessionId){const t=this.apiInvokeUploadPendingItems.length;for(let i=0;i<t;i++){const t=this.apiInvokeUploadPendingItems.shift();t&&(t.sid=e._sessionId,this.sendApiInvoke(Object.assign({},t)))}}}))}send(e,t){if(t)return this.keyEventUploadPendingItems.push(e),void this.sendItems(this.keyEventUploadPendingItems,!0);this.normalEventUploadPendingItems.push(e),this.normalEventUploadPendingItems.length>xC("NORMAL_EVENT_QUEUE_CAPACITY")&&this.normalEventUploadPendingItems.splice(0,1),this.normalEventUploadPendingItems.length>=10&&this.sendItems(this.normalEventUploadPendingItems,!1)}doSend(){this.keyEventUploadPendingItems.length>0&&this.sendItems(this.keyEventUploadPendingItems,!0),this.normalEventUploadPendingItems.length>0&&Date.now()-this.lastSendNormalEventTime>=5e3&&this.sendItems(this.normalEventUploadPendingItems,!1)}sendItems(e,t){const i=[],n=[];for(;e.length;){const t=e.shift();i.length<20?i.push(t):n.push(t)}e.push(...n);for(const e of[...i]){var r;-1!==this.ltsList.indexOf(e.data.lts)?(e.data.lts=this.ltsList[this.ltsList.length-1]+1,this.ltsList.push(e.data.lts)):(this.ltsList.push(e.data.lts),ef(r=this.ltsList).call(r,((e,t)=>e-t)))}return t||(this.lastSendNormalEventTime=Date.now()),xC("ENABLE_EVENT_REPORT")?(i.length&&(xC("NEW_REPORT_SERVER")?this.postDataToStatsCollector2(i):this.postDataToStatsCollector(i)).catch((e=>i=>{xC("EVENT_REPORT_RETRY")&&(t?this.keyEventUploadPendingItems=this.keyEventUploadPendingItems.concat(e):(this.normalEventUploadPendingItems=this.normalEventUploadPendingItems.concat(e),this.normalEventUploadPendingItems.length>xC("NORMAL_EVENT_QUEUE_CAPACITY")&&(this.normalEventUploadPendingItems.splice(0,this.normalEventUploadPendingItems.length-xC("NORMAL_EVENT_QUEUE_CAPACITY")),$C.warning("report: drop normal events"))))})(i)),e):e}async postDataToStatsCollector2(e){C_.networkState===h_.OFFLINE&&await nb.race([C_.onlineWaiter,U_(2*Y_.maxRetryTimeout)]);const t=e=>{let t=new Uint8Array;return e.forEach((e=>{const i=Jb(JSON.stringify(e.data)),n=new ArrayBuffer(5),r=(e=>{let t=0;return Object.entries(YC).forEach((i=>{let[n,r]=i;r===e.type&&(t=EventNameToID[n])})),t})(e),s=new DataView(n);s.setUint16(0,i.byteLength,!0),s.setUint8(2,255&r),s.setUint8(3,r>>>8&255),s.setUint8(4,r>>>16&255),t=e_(t,new Uint8Array(n)),t=e_(t,i)})),t},i="event";let n=this.proxyServer?"https://".concat(this.proxyServer,"/rs/?h=").concat(xC("NEW_REPORT_SERVER_DOMAINS")[0],"&p=443&d=").concat(i):"https://".concat(xC("NEW_REPORT_SERVER_DOMAINS")[0],"/").concat(i);for(let r=0;r<2;r+=1){1===r&&(n=this.proxyServer?"https://".concat(this.proxyServer,"/rs/?h=").concat(xC("NEW_REPORT_SERVER_DOMAINS")[1],"&p=443&d=").concat(i):"https://".concat(xC("NEW_REPORT_SERVER_DOMAINS")[1],"/").concat(i));try{await EC(n,{timeout:1e4,data:t(e),headers:JC(JC({biz:"webrtc",sendts:Math.round(Date.now()/1e3),debug:"false"},this._appId&&{appid:this._appId}),{},{"Content-Type":"application/octet-stream"})},!0)}catch(e){if(1===r)throw e;continue}return}}async postDataToStatsCollector(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i={msgType:"EventMessages",sentTs:Math.round(Date.now()/1e3),payloads:e.map((e=>JSON.stringify(e))),vid:(e=>{const t=e&&e.data.sid&&this.baseInfoMap.get(e.data.sid);return t&&t.info.vid&&+t.info.vid||0})(e[0])};C_.networkState===h_.OFFLINE&&await nb.race([C_.onlineWaiter,U_(2*Y_.maxRetryTimeout)]);const n=t?"/events/proto-raws":"/events/messages";let r=this.url||(this.proxyServer?"https://".concat(this.proxyServer,"/rs/?h=").concat(xC("EVENT_REPORT_DOMAIN"),"&p=").concat(xC("STATS_COLLECTOR_PORT"),"&d=").concat(n):"https://".concat(xC("EVENT_REPORT_DOMAIN"),":").concat(xC("STATS_COLLECTOR_PORT")).concat(n));for(let e=0;e<2;e+=1){1===e&&(r=this.backupUrl||(this.proxyServer?"https://".concat(this.proxyServer,"/rs/?h=").concat(xC("EVENT_REPORT_BACKUP_DOMAIN"),"&p=").concat(xC("STATS_COLLECTOR_PORT"),"&d=").concat(n):"https://".concat(xC("EVENT_REPORT_BACKUP_DOMAIN"),":").concat(xC("STATS_COLLECTOR_PORT")).concat(n)));try{t?await CC(r,{timeout:1e4,data:i}):await EC(r,{timeout:1e4,data:i})}catch(t){if(1===e)throw t;continue}return}}createBaseInfo(e,t){const i=Object.assign({},GC);return i.sid=e,this.baseInfoMap.set(e,{info:i,startTime:t}),i}reportResourceTiming(e,t){const i=performance.getEntriesByName(e),n=i[i.length-1];n&&this.reportApiInvoke(t,{name:"Client.resourceTiming",options:n,tag:s_.TRACER}).onSuccess()}}function tw(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(t,i,n){const r=n.value;if("function"==typeof r){const s=e.className||t.__className__||("AgoraRTCClient"===t.constructor.name?"Client":t.constructor.name);n.value=function(){for(var t=arguments.length,n=new Array(t),o=0;o<t;o++)n[o]=arguments[o];let a=n;if(e.argsMap)try{a=e.argsMap(this,...n)}catch(e){$C.warning(e),a=[]}try{JSON.stringify(a)}catch(e){$C.warning("arguments for method ".concat(s,".").concat(String(i)," not serializable for apiInvoke.")),a=[]}const c=(e.report||nw).reportApiInvoke(this._sessionId||null,{name:"".concat(s,".").concat(String(i)),options:a,tag:s_.TRACER,reportResult:e.reportResult},e.throttleTime);try{const t=r.apply(this,n);return t instanceof nb?t.then((t=>(c.onSuccess(e.reportResult&&t),t))).catch((e=>{throw c.onError(e),e})):(c.onSuccess(e.reportResult&&t),t)}catch(e){throw c.onError(e),e}}}return n}}oh(ew,"__CLIENT_LIST__",[]);const nw=new ew;PC.on("REPORT_LOG_UPLOAD",(e=>{e.networkState=C_.networkState,nw.reportApiInvoke(null,{name:"logUploadError",options:e,tag:s_.TRACER})}));const rw=["CHINA","GLOBAL"],iw=function(){const e="us".concat("erna","me"),t="pa".concat("sswo","rd"),i=["t","s","t"];i.splice(1,0,"e");const n=i.join(""),r=[];for(let e=0;e<6;e++)r.push("1");const s=r.join(""),o={};return o[e]=n,o[t]=s,Object.assign(o,{turnServerURL:"",tcpport:3433,udpport:3478,forceturn:!1})}();window.DEFAULT_TURN_CONFIG=iw,kC||(LC.WEBCS_DOMAIN=["ap-web-1-oversea.agora.io","ap-web-1-north-america.agora.io"],LC.WEBCS_DOMAIN_BACKUP_LIST=["ap-web-2-oversea.agora.io","ap-web-2-north-america.agora.io"],LC.PROXY_CS=["proxy-ap-web-oversea.agora.io","proxy-ap-web-america.agora.io"],LC.CDS_AP=["cds-ap-web-oversea.agora.io","cds-ap-web-america.agora.io","cds-ap-web-america2.agora.io"],LC.ACCOUNT_REGISTER=["sua-ap-web-oversea.agora.io","sua-ap-web-america.agora.io","sua-ap-web-america2.agora.io"],LC.UAP_AP=["uap-ap-web-oversea.agora.io","uap-ap-web-america.agora.io","uap-ap-web-america2.agora.io"],LC.LOG_UPLOAD_SERVER="logservice-oversea.agora.io",LC.EVENT_REPORT_DOMAIN="statscollector-1-oversea.agora.io",LC.EVENT_REPORT_BACKUP_DOMAIN="statscollector-2-oversea.agora.io",LC.PROXY_SERVER_TYPE3="webrtc-cloud-proxy.agora.io",LC.AREAS=["NORTH_AMERICA","OVERSEA"]);const ow=[[0,1,2,3,4,5,5],[0,2,2,3,4,5,5],[0,3,3,3,4,5,5],[0,4,4,4,4,5,5],[0,5,5,5,5,5,5]],aw=[];function sw(e,t){return!!t&&aw.some((i=>i.uid===e&&i.channelName===t))}ew.__CLIENT_LIST__=aw;var cw,lw,dw,uw,hw,fw,pw,gw,mw,vw,bw,_w,yw,Ew,Cw,ww,Sw,Tw=oi("Array").values,Aw=_i,Rw=sn,Ow=be,Iw=Tw,kw=Array.prototype,Nw={DOMTokenList:!0,NodeList:!0},Lw=Z((function(e){var t=e.values;return e===kw||Ow(kw,e)&&t===kw.values||Rw(Nw,Aw(e))?Iw:t}));function Mw(e,t,i,n){var r,s=arguments.length,o=s<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(o=(s<3?r(o):s>3?r(t,i,o):r(t,i))||o);return s>3&&o&&Object.defineProperty(t,i,o),o}function xw(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}!function(e){e.L1T1="L1T1",e.L1T2="L1T2",e.L1T3="L1T3",e.L2T1_KEY="L2T1_KEY",e.L2T2_KEY="L2T2_KEY",e.L2T3_KEY="L2T3_KEY",e.L3T1_KEY="L3T1_KEY",e.L3T2_KEY="L3T2_KEY",e.L3T3_KEY="L3T3_KEY"}(cw||(cw={})),function(e){e.CERTIFICATE="certificate",e.CODEC="codec",e.CANDIDATE_PAIR="candidate-pair",e.LOCAL_CANDIDATE="local-candidate",e.REMOTE_CANDIDATE="remote-candidate",e.INBOUND="inbound-rtp",e.TRACK="track",e.OUTBOUND="outbound-rtp",e.PC="peer-connection",e.REMOTE_INBOUND="remote-inbound-rtp",e.REMOTE_OUTBOUND="remote-outbound-rtp",e.TRANSPORT="transport",e.CSRC="csrc",e.DATA_CHANNEL="data-channel",e.STREAM="stream",e.SENDER="sender",e.RECEIVER="receiver"}(lw||(lw={})),function(e){e[e.ACCESS_POINT=101]="ACCESS_POINT",e[e.UNILBS=201]="UNILBS",e[e.STRING_UID_ALLOCATOR=901]="STRING_UID_ALLOCATOR"}(dw||(dw={})),function(e){e[e.IIIEGAL_APPID=1]="IIIEGAL_APPID",e[e.IIIEGAL_UID=2]="IIIEGAL_UID",e[e.INTERNAL_ERROR=3]="INTERNAL_ERROR"}(uw||(uw={})),function(e){e[e.INVALID_VENDOR_KEY=5]="INVALID_VENDOR_KEY",e[e.INVALID_CHANNEL_NAME=7]="INVALID_CHANNEL_NAME",e[e.INTERNAL_ERROR=8]="INTERNAL_ERROR",e[e.NO_AUTHORIZED=9]="NO_AUTHORIZED",e[e.DYNAMIC_KEY_TIMEOUT=10]="DYNAMIC_KEY_TIMEOUT",e[e.NO_ACTIVE_STATUS=11]="NO_ACTIVE_STATUS",e[e.DYNAMIC_KEY_EXPIRED=13]="DYNAMIC_KEY_EXPIRED",e[e.STATIC_USE_DYNAMIC_KEY=14]="STATIC_USE_DYNAMIC_KEY",e[e.DYNAMIC_USE_STATIC_KEY=15]="DYNAMIC_USE_STATIC_KEY",e[e.USER_OVERLOAD=16]="USER_OVERLOAD",e[e.FORBIDDEN_REGION=18]="FORBIDDEN_REGION",e[e.CANNOT_MEET_AREA_DEMAND=19]="CANNOT_MEET_AREA_DEMAND"}(hw||(hw={})),function(e){e[e.NO_FLAG_SET=100]="NO_FLAG_SET",e[e.FLAG_SET_BUT_EMPTY=101]="FLAG_SET_BUT_EMPTY",e[e.INVALID_FALG_SET=102]="INVALID_FALG_SET",e[e.FLAG_SET_BUT_NO_RE=103]="FLAG_SET_BUT_NO_RE",e[e.INVALID_SERVICE_ID=104]="INVALID_SERVICE_ID",e[e.NO_SERVICE_AVAILABLE=200]="NO_SERVICE_AVAILABLE",e[e.NO_SERVICE_AVAILABLE_P2P=201]="NO_SERVICE_AVAILABLE_P2P",e[e.NO_SERVICE_AVAILABLE_VOICE=202]="NO_SERVICE_AVAILABLE_VOICE",e[e.NO_SERVICE_AVAILABLE_WEBRTC=203]="NO_SERVICE_AVAILABLE_WEBRTC",e[e.NO_SERVICE_AVAILABLE_CDS=204]="NO_SERVICE_AVAILABLE_CDS",e[e.NO_SERVICE_AVAILABLE_CDN=205]="NO_SERVICE_AVAILABLE_CDN",e[e.NO_SERVICE_AVAILABLE_TDS=206]="NO_SERVICE_AVAILABLE_TDS",e[e.NO_SERVICE_AVAILABLE_REPORT=207]="NO_SERVICE_AVAILABLE_REPORT",e[e.NO_SERVICE_AVAILABLE_APP_CENTER=208]="NO_SERVICE_AVAILABLE_APP_CENTER",e[e.NO_SERVICE_AVAILABLE_ENV0=209]="NO_SERVICE_AVAILABLE_ENV0",e[e.NO_SERVICE_AVAILABLE_VOET=210]="NO_SERVICE_AVAILABLE_VOET",e[e.NO_SERVICE_AVAILABLE_STRING_UID=211]="NO_SERVICE_AVAILABLE_STRING_UID",e[e.NO_SERVICE_AVAILABLE_WEBRTC_UNILBS=212]="NO_SERVICE_AVAILABLE_WEBRTC_UNILBS",e[e.NO_SERVICE_AVAILABLE_UNILBS_FLV=213]="NO_SERVICE_AVAILABLE_UNILBS_FLV"}(fw||(fw={})),function(e){e[e.K_TIMESTAMP_EXPIRED=2]="K_TIMESTAMP_EXPIRED",e[e.K_CHANNEL_PERMISSION_INVALID=3]="K_CHANNEL_PERMISSION_INVALID",e[e.K_CERTIFICATE_INVALID=4]="K_CERTIFICATE_INVALID",e[e.K_CHANNEL_NAME_EMPTY=5]="K_CHANNEL_NAME_EMPTY",e[e.K_CHANNEL_NOT_FOUND=6]="K_CHANNEL_NOT_FOUND",e[e.K_TICKET_INVALID=7]="K_TICKET_INVALID",e[e.K_CHANNEL_CONFLICTED=8]="K_CHANNEL_CONFLICTED",e[e.K_SERVICE_NOT_READY=9]="K_SERVICE_NOT_READY",e[e.K_SERVICE_TOO_HEAVY=10]="K_SERVICE_TOO_HEAVY",e[e.K_UID_BANNED=14]="K_UID_BANNED",e[e.K_IP_BANNED=15]="K_IP_BANNED",e[e.K_CHANNEL_BANNED=16]="K_CHANNEL_BANNED",e[e.K_AUTO_REBALANCE=28]="K_AUTO_REBALANCE",e[e.WARN_NO_AVAILABLE_CHANNEL=103]="WARN_NO_AVAILABLE_CHANNEL",e[e.WARN_LOOKUP_CHANNEL_TIMEOUT=104]="WARN_LOOKUP_CHANNEL_TIMEOUT",e[e.WARN_LOOKUP_CHANNEL_REJECTED=105]="WARN_LOOKUP_CHANNEL_REJECTED",e[e.WARN_OPEN_CHANNEL_TIMEOUT=106]="WARN_OPEN_CHANNEL_TIMEOUT",e[e.WARN_OPEN_CHANNEL_REJECTED=107]="WARN_OPEN_CHANNEL_REJECTED",e[e.WARN_REQUEST_DEFERRED=108]="WARN_REQUEST_DEFERRED",e[e.ERR_DYNAMIC_KEY_TIMEOUT=109]="ERR_DYNAMIC_KEY_TIMEOUT",e[e.ERR_NO_AUTHORIZED=110]="ERR_NO_AUTHORIZED",e[e.ERR_VOM_SERVICE_UNAVAILABLE=111]="ERR_VOM_SERVICE_UNAVAILABLE",e[e.ERR_NO_CHANNEL_AVAILABLE_CODE=112]="ERR_NO_CHANNEL_AVAILABLE_CODE",e[e.ERR_MASTER_VOCS_UNAVAILABLE=114]="ERR_MASTER_VOCS_UNAVAILABLE",e[e.ERR_INTERNAL_ERROR=115]="ERR_INTERNAL_ERROR",e[e.ERR_NO_ACTIVE_STATUS=116]="ERR_NO_ACTIVE_STATUS",e[e.ERR_INVALID_UID=117]="ERR_INVALID_UID",e[e.ERR_DYNAMIC_KEY_EXPIRED=118]="ERR_DYNAMIC_KEY_EXPIRED",e[e.ERR_STATIC_USE_DYANMIC_KE=119]="ERR_STATIC_USE_DYANMIC_KE",e[e.ERR_DYNAMIC_USE_STATIC_KE=120]="ERR_DYNAMIC_USE_STATIC_KE",e[e.ERR_NO_VOCS_AVAILABLE=2e3]="ERR_NO_VOCS_AVAILABLE",e[e.ERR_NO_VOS_AVAILABLE=2001]="ERR_NO_VOS_AVAILABLE",e[e.ERR_JOIN_CHANNEL_TIMEOUT=2002]="ERR_JOIN_CHANNEL_TIMEOUT",e[e.ERR_REPEAT_JOIN_CHANNEL=2003]="ERR_REPEAT_JOIN_CHANNEL",e[e.ERR_JOIN_BY_MULTI_IP=2004]="ERR_JOIN_BY_MULTI_IP",e[e.ERR_NOT_JOINED=2011]="ERR_NOT_JOINED",e[e.ERR_REPEAT_JOIN_REQUEST=2012]="ERR_REPEAT_JOIN_REQUEST",e[e.ERR_INVALID_VENDOR_KEY=2013]="ERR_INVALID_VENDOR_KEY",e[e.ERR_INVALID_CHANNEL_NAME=2014]="ERR_INVALID_CHANNEL_NAME",e[e.ERR_INVALID_STRINGUID=2015]="ERR_INVALID_STRINGUID",e[e.ERR_TOO_MANY_USERS=2016]="ERR_TOO_MANY_USERS",e[e.ERR_SET_CLIENT_ROLE_TIMEOUT=2017]="ERR_SET_CLIENT_ROLE_TIMEOUT",e[e.ERR_SET_CLIENT_ROLE_NO_PERMISSION=2018]="ERR_SET_CLIENT_ROLE_NO_PERMISSION",e[e.ERR_SET_CLIENT_ROLE_ALREADY_IN_USE=2019]="ERR_SET_CLIENT_ROLE_ALREADY_IN_USE",e[e.ERR_PUBLISH_REQUEST_INVALID=2020]="ERR_PUBLISH_REQUEST_INVALID",e[e.ERR_SUBSCRIBE_REQUEST_INVALID=2021]="ERR_SUBSCRIBE_REQUEST_INVALID",e[e.ERR_NOT_SUPPORTED_MESSAGE=2022]="ERR_NOT_SUPPORTED_MESSAGE",e[e.ERR_ILLEAGAL_PLUGIN=2023]="ERR_ILLEAGAL_PLUGIN",e[e.ERR_REJOIN_TOKEN_INVALID=2024]="ERR_REJOIN_TOKEN_INVALID",e[e.ERR_REJOIN_USER_NOT_JOINED=2025]="ERR_REJOIN_USER_NOT_JOINED",e[e.ERR_INVALID_OPTIONAL_INFO=2027]="ERR_INVALID_OPTIONAL_INFO",e[e.ILLEGAL_AES_PASSWORD=2028]="ILLEGAL_AES_PASSWORD",e[e.ILLEGAL_CLIENT_ROLE_LEVEL=2029]="ILLEGAL_CLIENT_ROLE_LEVEL",e[e.ERR_TOO_MANY_BROADCASTERS=2031]="ERR_TOO_MANY_BROADCASTERS",e[e.ERR_TOO_MANY_SUBSCRIBERS=2032]="ERR_TOO_MANY_SUBSCRIBERS",e[e.ERR_LICENSE_MISSING=32769]="ERR_LICENSE_MISSING",e[e.ERR_LICENSE_EXPIRED=32771]="ERR_LICENSE_EXPIRED",e[e.ERR_LICENSE_MINUTES_EXCEEDED=32773]="ERR_LICENSE_MINUTES_EXCEEDED",e[e.ERR_LICENSE_PERIOD_INVALID=32774]="ERR_LICENSE_PERIOD_INVALID",e[e.ERR_LICENSE_MULTIPLE_SDK_SERVICE=32778]="ERR_LICENSE_MULTIPLE_SDK_SERVICE",e[e.ERR_LICENSE_ILLEGAL=32783]="ERR_LICENSE_ILLEGAL",e[e.ERR_TEST_RECOVER=9e3]="ERR_TEST_RECOVER",e[e.ERR_TEST_TRYNEXT=9001]="ERR_TEST_TRYNEXT",e[e.ERR_TEST_RETRY=9002]="ERR_TEST_RETRY"}(pw||(pw={})),function(e){e.CONNECTING="connecting",e.CONNECTED="connected",e.RECONNECTING="reconnecting",e.CLOSED="closed"}(gw||(gw={})),function(e){e.WS_CONNECTED="ws_connected",e.WS_RECONNECTING="ws_reconnecting",e.WS_CLOSED="ws_closed",e.WS_RECONNECT_WAITTING_FINISH="ws_reconnect_waitting_finish",e.WS_RECONNECT_CREATE_CONNECTION="ws_reconnect_create_connection",e.ON_BINARY_DATA="on_binary_data",e.REQUEST_RECOVER="request_recover",e.REQUEST_JOIN_INFO="request_join_info",e.REQUEST_REJOIN_INFO="req_rejoin_info",e.IS_P2P_DISCONNECTED="is_p2p_dis",e.DISCONNECT_P2P="dis_p2p",e.ABORT_P2P_EXECUTION="abort_p2p_execution",e.NEED_RENEW_SESSION="need-sid",e.REPORT_JOIN_GATEWAY="report_join_gateway",e.REQUEST_TIMEOUT="request_timeout",e.REQUEST_SUCCESS="request_success",e.JOIN_RESPONSE="join_response",e.DATACHANNEL_PRECONNECT="datachannel_preconnect",e.DATACHANNEL_CONNECTING="datachannel_connecting",e.DATACHANNEL_FAILBACK="datachannel_failback",e.P2P_START="p2p_start",e.P2P_CONNECTION="p2p_connection",e.P2P_REMOTE_CANDIDATE_UPDATE="p2p_remote_candidate_update",e.P2P_SUBSCRIBE="p2p_subscribe",e.P2P_UNSUBSCRIBE="p2p_unsubscribe",e.P2P_EXCHANGE_SDP="p2p_exchange_sdp",e.P2P_ON_ADD_VIDEO_STREAM="p2p_on_add_video_stream",e.P2P_ON_ADD_AUDIO_STREAM="p2p_on_add_audio_stream"}(mw||(mw={})),function(e){e.PING="ping",e.PING_BACK="ping_back",e.JOIN="join_v3",e.REJOIN="rejoin_v3",e.LEAVE="leave",e.SET_CLIENT_ROLE="set_client_role",e.PUBLISH="publish",e.PUBLISH_DATASTREAM="publish_datastream",e.UNPUBLISH="unpublish",e.UNPUBLISH_DATASTREAM="unpublish_datastream",e.SUBSCRIBE="subscribe",e.SUBSCRIBE_DATASTREAM="subscribe_datastream",e.SUBSCRIBE_STREAMS="subscribe_streams",e.UNSUBSCRIBE="unsubscribe",e.UNSUBSCRIBE_DATASTREAM="unsubscribe_datastream",e.UNSUBSCRIBE_STREAMS="unsubscribe_streams",e.SUBSCRIBE_CHANGE="subscribe_change",e.TRAFFIC_STATS="traffic_stats",e.RENEW_TOKEN="renew_token",e.SWITCH_VIDEO_STREAM="switch_video_stream",e.DEFAULT_VIDEO_STREAM="default_video_stream",e.SET_FALLBACK_OPTION="set_fallback_option",e.GATEWAY_INFO="gateway_info",e.CONTROL="control",e.SEND_METADATA="send_metadata",e.DATA_STREAM="data_stream",e.PICK_SVC_LAYER="pick_svc_layer",e.RESTART_ICE="restart_ice",e.CONNECT_PC="connect_pc",e.SET_VIDEO_PROFILE="set_video_profile",e.SET_PARAMETER="set_parameter",e.SET_RTM2_FLAG="set_rtm2_flag"}(vw||(vw={})),function(e){e.PUBLISH_STATS="publish_stats",e.PUBLISH_RELATED_STATS="publish_related_stats",e.SUBSCRIBE_STATS="subscribe_stats",e.SUBSCRIBE_RELATED_STATS="subscribe_related_stats",e.WS_INFLATE_DATA_LENGTH="ws_inflate_data_length",e.DENOISER_STATS="denoiser_stats",e.TRANSPORT_STATS="transport_stats",e.EXTENSION_USAGE_STATS="extension_usage_stats"}(bw||(bw={})),function(e){e.ON_USER_ONLINE="on_user_online",e.ON_USER_OFFLINE="on_user_offline",e.ON_STREAM_FALLBACK_UPDATE="on_stream_fallback_update",e.ON_PUBLISH_STREAM="on_publish_stream",e.ON_UPLINK_STATS="on_uplink_stats",e.ON_P2P_LOST="on_p2p_lost",e.ON_REMOVE_STREAM="on_remove_stream",e.ON_ADD_AUDIO_STREAM="on_add_audio_stream",e.ON_ADD_VIDEO_STREAM="on_add_video_stream",e.ON_TOKEN_PRIVILEGE_WILL_EXPIRE="on_token_privilege_will_expire",e.ON_TOKEN_PRIVILEGE_DID_EXPIRE="on_token_privilege_did_expire",e.ON_USER_BANNED="on_user_banned",e.ON_USER_LICENSE_BANNED="on_user_license_banned",e.ON_NOTIFICATION="on_notification",e.ON_CRYPT_ERROR="on_crypt_error",e.MUTE_AUDIO="mute_audio",e.MUTE_VIDEO="mute_video",e.UNMUTE_AUDIO="unmute_audio",e.UNMUTE_VIDEO="unmute_video",e.ON_P2P_OK="on_p2p_ok",e.RECEIVE_METADATA="receive_metadata",e.ON_DATA_STREAM="on_data_stream",e.ON_REMOTE_DATASTREAM_UPDATE="on_remote_datastream_update",e.ON_REMOTE_FULL_DATASTREAM_INFO="on_remote_full_datastream_info",e.ENABLE_LOCAL_VIDEO="enable_local_video",e.DISABLE_LOCAL_VIDEO="disable_local_video",e.ENABLE_LOCAL_AUDIO="enable_local_audio",e.DISABLE_LOCAL_AUDIO="disable_local_audio",e.ON_PUBLISHED_USER_LIST="on_published_user_list"}(_w||(_w={})),function(e){e.CONNECTION_STATE_CHANGE="CONNECTION_STATE_CHANGE",e.NEED_ANSWER="NEED_ANSWER",e.NEED_RENEGOTIATE="NEED_RENEGOTIATE",e.P2P_LOST="P2P_LOST",e.GATEWAY_P2P_LOST="GATEWAY_P2P_LOST",e.NEED_UNPUB="NEED_UNPUB",e.NEED_UNSUB="NEED_UNSUB",e.NEED_UPLOAD="NEED_UPLOAD",e.NEED_CONTROL="NEED_CONTROL",e.START_RECONNECT="START_RECONNECT",e.END_RECONNECT="END_RECONNECT",e.NEED_SIGNAL_RTT="NEED_SIGNAL_RTT"}(yw||(yw={})),function(e){e.SEND_ONLY="SEND_ONLY",e.RECEIVE_ONLY="RECEIVE_ONLY"}(Ew||(Ew={})),function(e){e.CONNECTED="websocket:connected",e.RECONNECTING="websocket:reconnecting",e.WILL_RECONNECT="websocket:will_reconnect",e.CLOSED="websocket:closed",e.FAILED="websocket:failed",e.ON_MESSAGE="websocket:on_message",e.REQUEST_NEW_URLS="websocket:request_new_urls",e.RECONNECT_WAITTING_FINISH="websocket:reconnect_waitting_finish",e.RECONNECT_CREATE_CONNECTION="websocket:reconnect_create_connection",e.ON_TOKEN_PRIVILEGE_DID_EXPIRE="websocket:on_token_privilege_did_expire"}(Cw||(Cw={}));class Dw extends Fb{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2?arguments[2]:void 0),oh(this,"name","AgoraRTCException")}print(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"error";return super.print(e,$C)}throw(){super.throw($C)}}function Pw(e){if("string"!=typeof e||!/^[a-zA-Z0-9 \!\#\$\%\&\(\)\+\-\:\;\<\=\.\>\?\@\[\]\^\_\{\}\|\~\,]{1,64}$/.test(e))throw $C.error("Invalid Channel Name ".concat(e)),new Dw(Bb.INVALID_PARAMS,"The length must be within 64 bytes. The supported characters: a-z,A-Z,0-9,space,!, #, $, %, &, (, ), +, -, :, ;, <, =, ., >, ?, @, [, ], ^, _,  {, }, |, ~, ,")}function Uw(e){if(!("number"==typeof(t=e)&&Math.floor(t)===t&&0<=t&&t<=4294967295||Gb(e,1,255)))throw new Dw(Bb.INVALID_PARAMS,"[String uid] Length of the string: [1,255]. ASCII characters only. [Number uid] The value range is [0,10000]");var t;"string"==typeof e&&$C.warn("You input a string as the user ID, to ensure better end-user experience, Agora highly suggests not using a string as the user ID.")}!function(e){e.TRANSCODE="mix_streaming",e.RAW="raw_streaming",e.INJECT="inject_streaming"}(ww||(ww={})),function(e){e[e.INJECT_STREAM_STATUS_START_SUCCESS=0]="INJECT_STREAM_STATUS_START_SUCCESS",e[e.INJECT_STREAM_STATUS_START_ALREADY_EXISTS=1]="INJECT_STREAM_STATUS_START_ALREADY_EXISTS",e[e.INJECT_STREAM_STATUS_START_UNAUTHORIZED=2]="INJECT_STREAM_STATUS_START_UNAUTHORIZED",e[e.INJECT_STREAM_STATUS_START_TIMEOUT=3]="INJECT_STREAM_STATUS_START_TIMEOUT",e[e.INJECT_STREAM_STATUS_START_FAILED=4]="INJECT_STREAM_STATUS_START_FAILED",e[e.INJECT_STREAM_STATUS_STOP_SUCCESS=5]="INJECT_STREAM_STATUS_STOP_SUCCESS",e[e.INJECT_STREAM_STATUS_STOP_NOT_FOUND=6]="INJECT_STREAM_STATUS_STOP_NOT_FOUND",e[e.INJECT_STREAM_STATUS_STOP_UNAUTHORIZED=7]="INJECT_STREAM_STATUS_STOP_UNAUTHORIZED",e[e.INJECT_STREAM_STATUS_STOP_TIMEOUT=8]="INJECT_STREAM_STATUS_STOP_TIMEOUT",e[e.INJECT_STREAM_STATUS_STOP_FAILED=9]="INJECT_STREAM_STATUS_STOP_FAILED",e[e.INJECT_STREAM_STATUS_BROKEN=10]="INJECT_STREAM_STATUS_BROKEN"}(Sw||(Sw={}));const Bw={alpha:1,height:640,width:360,x:0,y:0,zOrder:0,audioChannel:0},Fw={x:0,y:0,width:160,height:160,zOrder:255,alpha:1};function Vw(e,t){zb(e.url,"".concat(t,".url"),1,1e3,!1),Kb(e.x)||Hb(e.x,"".concat(t,".x"),0,1e4),Kb(e.y)||Hb(e.y,"".concat(t,".y"),0,1e4),Kb(e.width)||Hb(e.width,"".concat(t,".width"),0,1e4),Kb(e.height)||Hb(e.height,"".concat(t,".height"),0,1e4),Kb(e.zOrder)||Hb(e.zOrder,"".concat(t,".zOrder"),0,255),Kb(e.alpha)||Hb(e.alpha,"".concat(t,".alpha"),0,1,!1)}const jw={audioBitrate:48,audioChannels:1,audioSampleRate:48e3,backgroundColor:0,height:360,lowLatency:!1,videoBitrate:400,videoCodecProfile:100,videoCodecType:1,videoFrameRate:15,videoGop:30,width:640,images:[],userConfigs:[],userConfigExtraInfo:""},Hw={audioBitrate:48,audioChannels:2,audioVolume:100,audioSampleRate:48e3,height:0,width:0,videoBitrate:400,videoFramerate:15,videoGop:30};var $w,zw,Ww,Kw,Gw,qw,Yw,Xw,Zw,Qw,Jw,eS,tS,nS;function rS(e){if(!e.channelName)throw new Dw(Bb.INVALID_PARAMS,"invalid channelName in info");if("number"!=typeof e.uid)throw new Dw(Bb.INVALID_PARAMS,"invalid uid in info, uid must be a number");return e.token&&zb(e.token,"info.token",1,2047),Uw(e.uid),Pw(e.channelName),!0}!function(e){e.WARNING="@live_uap-warning",e.ERROR="@line_uap-error",e.PUBLISH_STREAM_STATUS="@live_uap-publish-status",e.INJECT_STREAM_STATUS="@live_uap-inject-status",e.WORKER_STATUS="@live_uap-worker-status",e.REQUEST_NEW_ADDRESS="@live_uap-request-address"}($w||($w={})),function(e){e.REQUEST_WORKER_MANAGER_LIST="@live_req_worker_manager"}(zw||(zw={})),function(e){e[e.LIVE_STREAM_RESPONSE_SUCCEED=200]="LIVE_STREAM_RESPONSE_SUCCEED",e[e.LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM=454]="LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM",e[e.LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR=450]="LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR",e[e.LIVE_STREAM_RESPONSE_BAD_STREAM=451]="LIVE_STREAM_RESPONSE_BAD_STREAM",e[e.LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR=400]="LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR",e[e.LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST=404]="LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST",e[e.LIVE_STREAM_RESPONSE_NOT_AUTHORIZED=456]="LIVE_STREAM_RESPONSE_NOT_AUTHORIZED",e[e.LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE=457]="LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE",e[e.LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN=429]="LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN",e[e.LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH=452]="LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH",e[e.LIVE_STREAM_RESPONSE_NOT_SUPPORTED=453]="LIVE_STREAM_RESPONSE_NOT_SUPPORTED",e[e.LIVE_STREAM_RESPONSE_MAX_STREAM_NUM=455]="LIVE_STREAM_RESPONSE_MAX_STREAM_NUM",e[e.LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR=500]="LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR",e[e.LIVE_STREAM_RESPONSE_WORKER_LOST=501]="LIVE_STREAM_RESPONSE_WORKER_LOST",e[e.LIVE_STREAM_RESPONSE_RESOURCE_LIMIT=502]="LIVE_STREAM_RESPONSE_RESOURCE_LIMIT",e[e.LIVE_STREAM_RESPONSE_WORKER_QUIT=503]="LIVE_STREAM_RESPONSE_WORKER_QUIT",e[e.ERROR_FAIL_SEND_MESSAGE=504]="ERROR_FAIL_SEND_MESSAGE",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE=30]="PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT=31]="PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT",e[e.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH=32]="PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH",e[e.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN=33]="PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN"}(Ww||(Ww={})),function(e){e.CONNECT_FAILED="connect failed",e.CONNECT_TIMEOUT="connect timeout",e.WS_DISCONNECTED="websocket disconnected",e.REQUEST_TIMEOUT="request timeout",e.REQUEST_FAILED="request failed",e.WAIT_STATUS_TIMEOUT="wait status timeout",e.WAIT_STATUS_ERROR="wait status error",e.BAD_STATE="bad state",e.WS_ABORT="ws abort",e.AP_REQUEST_TIMEOUT="AP request timeout",e.AP_JSON_PARSE_ERROR="AP json parse error",e.AP_REQUEST_ERROR="AP request error",e.AP_REQUEST_ABORT="AP request abort"}(Kw||(Kw={})),function(e){e[e.SetSdkProfile=0]="SetSdkProfile",e[e.SetSourceChannel=1]="SetSourceChannel",e[e.SetSourceUserId=2]="SetSourceUserId",e[e.SetDestChannel=3]="SetDestChannel",e[e.StartPacketTransfer=4]="StartPacketTransfer",e[e.StopPacketTransfer=5]="StopPacketTransfer",e[e.UpdateDestChannel=6]="UpdateDestChannel",e[e.Reconnect=7]="Reconnect",e[e.SetVideoProfile=8]="SetVideoProfile"}(Gw||(Gw={})),function(e){e.NETWORK_DISCONNECTED="NETWORK_DISCONNECTED",e.NETWORK_CONNECTED="NETWORK_CONNECTED",e.PACKET_JOINED_SRC_CHANNEL="PACKET_JOINED_SRC_CHANNEL",e.PACKET_JOINED_DEST_CHANNEL="PACKET_JOINED_DEST_CHANNEL",e.PACKET_SENT_TO_DEST_CHANNEL="PACKET_SENT_TO_DEST_CHANNEL",e.PACKET_RECEIVED_VIDEO_FROM_SRC="PACKET_RECEIVED_VIDEO_FROM_SRC",e.PACKET_RECEIVED_AUDIO_FROM_SRC="PACKET_RECEIVED_AUDIO_FROM_SRC",e.PACKET_UPDATE_DEST_CHANNEL="PACKET_UPDATE_DEST_CHANNEL",e.PACKET_UPDATE_DEST_CHANNEL_REFUSED="PACKET_UPDATE_DEST_CHANNEL_REFUSED",e.PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE="PACKET_UPDATE_DEST_CHANNEL_NOT_CHANGE"}(qw||(qw={})),function(e){e.RELAY_STATE_IDLE="RELAY_STATE_IDLE",e.RELAY_STATE_CONNECTING="RELAY_STATE_CONNECTING",e.RELAY_STATE_RUNNING="RELAY_STATE_RUNNING",e.RELAY_STATE_FAILURE="RELAY_STATE_FAILURE"}(Yw||(Yw={})),function(e){e.RELAY_OK="RELAY_OK",e.SERVER_CONNECTION_LOST="SERVER_CONNECTION_LOST",e.SRC_TOKEN_EXPIRED="SRC_TOKEN_EXPIRED",e.DEST_TOKEN_EXPIRED="DEST_TOKEN_EXPIRED"}(Xw||(Xw={})),function(e){e.High="high",e.Low="low",e.Audio="audio",e.Screen="screen",e.ScreenLow="screen_low"}(Zw||(Zw={})),function(e){e.DISCONNECT="disconnect",e.CONNECTION_STATE_CHANGE="connection-state-change",e.NETWORK_QUALITY="network-quality",e.STREAM_TYPE_CHANGE="stream-type-change",e.IS_P2P_DISCONNECTED="is-p2p-dis",e.DISCONNECT_P2P="dis-p2p",e.REQUEST_NEW_GATEWAY_LIST="req-gate-url",e.NEED_RENEW_SESSION="need-sid",e.REQUEST_P2P_CONNECTION_PARAMS="request-p2p-connection-params",e.JOIN_RESPONSE="join-response",e.REQUEST_DC_CONNECTION_PARAMS="request-dc-connection-params",e.RESET_CONNECTION_EVENTS="reset-connection-events",e.DATACHANNEL_PRECONNECT="datachannel_preconnect",e.DATACHANNEL_FAILBACK="datachannel_failback",e.RESET_SIGNAL="reset-signal"}(Qw||(Qw={})),function(e){e.P2P_DISCONNECTED="P2P_DISCONNECTED",e.A_ROUND_WS_FAILED="A_ROUND_WS_FAILED",e.TIMEOUT="TIMEOUT",e.UNKNOWN_REASON="UNKNOWN_REASON"}(Jw||(Jw={})),function(e){e[e.Nothing=0]="Nothing",e[e.Audio=1]="Audio",e[e.LwoVideo=2]="LwoVideo",e[e.Video=4]="Video",e[e.Data=8]="Data",e[e.DataStream0=256]="DataStream0",e[e.DataStream1=512]="DataStream1",e[e.DataStream2=1024]="DataStream2",e[e.DataStream3=2048]="DataStream3",e[e.DataStream4=4096]="DataStream4",e[e.DataStream5=8192]="DataStream5",e[e.DataStream6=16384]="DataStream6",e[e.DataStream7=32768]="DataStream7"}(eS||(eS={})),function(e){e[e.websocket=0]="websocket",e[e.datachannel=1]="datachannel"}(tS||(tS={})),function(e){e.CHINA="CHINA",e.ASIA="ASIA",e.NORTH_AMERICA="NORTH_AMERICA",e.EUROPE="EUROPE",e.JAPAN="JAPAN",e.INDIA="INDIA",e.KOREA="KOREA",e.HKMC="HKMC",e.US="US",e.OCEANIA="OCEANIA",e.SOUTH_AMERICA="SOUTH_AMERICA",e.AFRICA="AFRICA",e.OVERSEA="OVERSEA",e.GLOBAL="GLOBAL",e.EXTENSIONS="EXTENSIONS"}(nS||(nS={}));const iS=[nS.AFRICA,nS.ASIA,nS.CHINA,nS.EUROPE,nS.GLOBAL,nS.INDIA,nS.JAPAN,nS.NORTH_AMERICA,nS.OCEANIA,nS.OVERSEA,nS.SOUTH_AMERICA];var oS;!function(e){e.CHINA="CN",e.ASIA="AS",e.NORTH_AMERICA="NA",e.EUROPE="EU",e.JAPAN="JP",e.INDIA="IN",e.KOREA="KR",e.HKMC="HK",e.US="US",e.OCEANIA="OC",e.SOUTH_AMERICA="SA",e.AFRICA="AF",e.OVERSEA="OVERSEA",e.GLOBAL="GLOBAL",e.EXTENSIONS="GLOBAL"}(oS||(oS={}));const aS={CHINA:{},ASIA:{CODE:oS.ASIA,WEBCS_DOMAIN:["ap-web-1-asia.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-asia.agora.io"],PROXY_CS:["proxy-ap-web-asia.agora.io"],CDS_AP:["cds-ap-web-asia.agora.io","cds-ap-web-asia2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-asia.agora.io","sua-ap-web-asia2.agora.io"],UAP_AP:["uap-ap-web-asia.agora.io","uap-ap-web-asia2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-asia.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-asia.agora.io"],LOG_UPLOAD_SERVER:["logservice-asia.agora.io"],PROXY_SERVER_TYPE3:["southeast-asia.webrtc-cloud-proxy.sd-rtn.com"]},NORTH_AMERICA:{CODE:oS.NORTH_AMERICA,WEBCS_DOMAIN:["ap-web-1-north-america.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-north-america.agora.io"],PROXY_CS:["proxy-ap-web-america.agora.io"],CDS_AP:["cds-ap-web-america.agora.io","cds-ap-web-america2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-america.agora.io","sua-ap-web-america2.agora.io"],UAP_AP:["uap-ap-web-america.agora.io","uap-ap-web-america2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-north-america.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-north-america.agora.io"],LOG_UPLOAD_SERVER:["logservice-north-america.agora.io"],PROXY_SERVER_TYPE3:["east-usa.webrtc-cloud-proxy.sd-rtn.com"]},EUROPE:{CODE:oS.EUROPE,WEBCS_DOMAIN:["ap-web-1-europe.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-europe.agora.io"],PROXY_CS:["proxy-ap-web-europe.agora.io"],CDS_AP:["cds-ap-web-europe.agora.io","cds-ap-web-europe2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-europe.agora.io","sua-ap-web-europe.agora.io"],UAP_AP:["uap-ap-web-europe.agora.io","uap-ap-web-europe2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-europe.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-europe.agora.io"],LOG_UPLOAD_SERVER:["logservice-europe.agora.io"],PROXY_SERVER_TYPE3:["europe.webrtc-cloud-proxy.sd-rtn.com"]},JAPAN:{CODE:oS.JAPAN,WEBCS_DOMAIN:["ap-web-1-japan.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-japan.agora.io"],PROXY_CS:["proxy-ap-web-japan.agora.io"],CDS_AP:["cds-ap-web-japan.agora.io","cds-ap-web-japan2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-japan.agora.io","sua-ap-web-japan2.agora.io"],UAP_AP:["uap-ap-web-japan.agora.io","\tuap-ap-web-japan2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-japan.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-japan.agora.io"],LOG_UPLOAD_SERVER:["logservice-japan.agora.io"],PROXY_SERVER_TYPE3:["japan.webrtc-cloud-proxy.sd-rtn.com"]},INDIA:{CODE:oS.INDIA,WEBCS_DOMAIN:["ap-web-1-india.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-india.agora.io"],PROXY_CS:["proxy-ap-web-india.agora.io"],CDS_AP:["cds-ap-web-india.agora.io","cds-ap-web-india2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-india.agora.io","sua-ap-web-india2.agora.io"],UAP_AP:["uap-ap-web-india.agora.io","uap-ap-web-india2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-india.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-india.agora.io"],LOG_UPLOAD_SERVER:["logservice-india.agora.io"],PROXY_SERVER_TYPE3:["india.webrtc-cloud-proxy.sd-rtn.com"]},KOREA:{CODE:oS.KOREA,WEBCS_DOMAIN:["ap-web-1-korea.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-korea.agora.io"],PROXY_CS:["proxy-ap-web-korea.agora.io"],CDS_AP:["cds-ap-web-korea.agora.io","cds-ap-web-korea2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-korea.agora.io","sua-ap-web-korea2.agora.io"],UAP_AP:["uap-ap-web-korea.agora.io","uap-ap-web-korea2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-korea.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-korea.agora.io"],LOG_UPLOAD_SERVER:["logservice-korea.agora.io"],PROXY_SERVER_TYPE3:["korea.webrtc-cloud-proxy.sd-rtn.com"]},HKMC:{CODE:oS.HKMC,WEBCS_DOMAIN:["ap-web-1-hkmc.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-hkmc.agora.io"],PROXY_CS:["proxy-ap-web-hkmc.agora.io"],CDS_AP:["cds-ap-web-hkmc.agora.io","cds-ap-web-hkmc2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-hkmc.agora.io","sua-ap-web-hkmc2.agora.io"],UAP_AP:["uap-ap-web-hkmc.agora.io","uap-ap-web-hkmc2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-hkmc.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-hkmc.agora.io"],LOG_UPLOAD_SERVER:["logservice-hkmc.agora.io"],PROXY_SERVER_TYPE3:["hkmc.webrtc-cloud-proxy.sd-rtn.com"]},US:{CODE:oS.US,WEBCS_DOMAIN:["ap-web-1-us.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-us.agora.io"],PROXY_CS:["proxy-ap-web-us.agora.io"],CDS_AP:["cds-ap-web-us.agora.io","cds-ap-web-us2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-us.agora.io","sua-ap-web-us2.agora.io"],UAP_AP:["uap-ap-web-us.agora.io","uap-ap-web-us2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-us.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-us.agora.io"],LOG_UPLOAD_SERVER:["logservice-us.agora.io"],PROXY_SERVER_TYPE3:["us.webrtc-cloud-proxy.sd-rtn.com"]},OVERSEA:{CODE:oS.OVERSEA,WEBCS_DOMAIN:["ap-web-1-oversea.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-oversea.agora.io"],PROXY_CS:["proxy-ap-web-oversea.agora.io"],CDS_AP:["cds-ap-web-oversea.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-oversea.agora.io"],UAP_AP:["uap-ap-web-oversea.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-oversea.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-oversea.agora.io"],LOG_UPLOAD_SERVER:["logservice-oversea.agora.io"],PROXY_SERVER_TYPE3:["webrtc-cloud-proxy.agora.io"]},GLOBAL:{CODE:oS.GLOBAL,WEBCS_DOMAIN:["webrtc2-ap-web-1.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["webrtc2-ap-web-3.agora.io"],PROXY_CS:["ap-proxy-1.agora.io","ap-proxy-2.agora.io"],CDS_AP:["cds-ap-web-1.agora.io","cds-ap-web-3.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-1.agora.io","sua-ap-web-3.agora.io"],UAP_AP:["uap-ap-web-1.agora.io","uap-ap-web-3.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2.agora.io"],LOG_UPLOAD_SERVER:["logservice.agora.io"],PROXY_SERVER_TYPE3:["webrtc-cloud-proxy.sd-rtn.com"]},OCEANIA:{CODE:oS.OCEANIA,WEBCS_DOMAIN:["ap-web-1-oceania.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-oceania.agora.io"],PROXY_CS:["proxy-ap-web-oceania.agora.io"],CDS_AP:["cds-ap-web-oceania.agora.io","cds-ap-web-oceania2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-oceania.agora.io","sua-ap-web-oceania2.agora.io"],UAP_AP:["uap-ap-web-oceania.agora.io","uap-ap-web-oceania2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-oceania.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-oceania.agora.io"],LOG_UPLOAD_SERVER:["logservice-oceania.agora.io"],PROXY_SERVER_TYPE3:["oceania.webrtc-cloud-proxy.sd-rtn.com"]},SOUTH_AMERICA:{CODE:oS.SOUTH_AMERICA,WEBCS_DOMAIN:["ap-web-1-south-america.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-south-america.agora.io"],PROXY_CS:["proxy-ap-web-south-america.agora.io"],CDS_AP:["cds-ap-web-south-america.agora.io","cds-ap-web-south-america2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-south-america.agora.io","sua-ap-web-south-america2.agora.io"],UAP_AP:["uap-ap-web-south-america.agora.io","uap-ap-web-south-america2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-south-america.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-south-america.agora.io"],LOG_UPLOAD_SERVER:["logservice-south-america.agora.io"],PROXY_SERVER_TYPE3:["south-america.webrtc-cloud-proxy.sd-rtn.com"]},AFRICA:{CODE:oS.AFRICA,WEBCS_DOMAIN:["ap-web-1-africa.agora.io"],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-africa.agora.io"],PROXY_CS:["proxy-ap-web-africa.agora.io"],CDS_AP:["cds-ap-web-africa.agora.io","cds-ap-web-africa2.agora.io"],ACCOUNT_REGISTER:["sua-ap-web-africa.agora.io","sua-ap-web-africa2.agora.io"],UAP_AP:["uap-ap-web-africa.agora.io","uap-ap-web-africa2.agora.io"],EVENT_REPORT_DOMAIN:["statscollector-1-africa.agora.io"],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-africa.agora.io"],LOG_UPLOAD_SERVER:["logservice-south-africa.agora.io"],PROXY_SERVER_TYPE3:["africa.webrtc-cloud-proxy.sd-rtn.com"]},EXTENSIONS:{}};var sS,cS,lS,dS,uS,hS,fS,pS,gS,mS,vS,bS,_S,yS,ES,CS,wS,SS,TS,AS,RS,OS;kC&&(aS.CHINA={CODE:oS.CHINA,WEBCS_DOMAIN:["webrtc2-2.ap.sd-rtn.com"],WEBCS_DOMAIN_BACKUP_LIST:["webrtc2-4.ap.sd-rtn.com"],PROXY_CS:["proxy-web.ap.sd-rtn.com"],CDS_AP:["cds-web-2.ap.sd-rtn.com","cds-web-4.ap.sd-rtn.com"],ACCOUNT_REGISTER:["sua-web-2.ap.sd-rtn.com","sua-web-4.ap.sd-rtn.com"],UAP_AP:["uap-web-2.ap.sd-rtn.com","uap-web-4.ap.sd-rtn.com"],EVENT_REPORT_DOMAIN:["web-3.statscollector.sd-rtn.com"],EVENT_REPORT_BACKUP_DOMAIN:["web-4.statscollector.sd-rtn.com"],LOG_UPLOAD_SERVER:["logservice-china.agora.io"],PROXY_SERVER_TYPE3:["east-cn.webrtc-cloud-proxy.sd-rtn.com"]}),function(e){e.UPDATE_BITRATE_LIMIT="update_bitrate_limit"}(sS||(sS={}));class IS extends r_{constructor(e,t){super(),oh(this,"onICEConnectionStateChange",void 0),oh(this,"onConnectionStateChange",void 0),oh(this,"onDTLSTransportStateChange",void 0),oh(this,"onDTLSTransportError",void 0),oh(this,"onICETransportStateChange",void 0),oh(this,"onFirstAudioReceived",void 0),oh(this,"onFirstVideoReceived",void 0),oh(this,"onFirstAudioDecoded",void 0),oh(this,"onFirstVideoDecoded",void 0),oh(this,"onFirstVideoDecodedTimeout",void 0),oh(this,"onSelectedLocalCandidateChanged",void 0),oh(this,"onSelectedRemoteCandidateChanged",void 0)}}class kS extends IS{constructor(e,t){super(e,t)}}!function(e){e.SEND="sendonly",e.RECV="recvonly",e.SENDRECV="sendrecv",e.INACTIVE="inactive"}(cS||(cS={})),function(e){e.VIDEO="video",e.AUDIO="audio"}(lS||(lS={})),function(e){e[e.UDP=0]="UDP",e[e.TCP=1]="TCP",e[e.RELAY=2]="RELAY"}(dS||(dS={})),function(e){e[e.FIRST_CONNECTION=0]="FIRST_CONNECTION",e[e.TCP_RESTART=1]="TCP_RESTART",e[e.RELAY_RESTART=2]="RELAY_RESTART",e[e.OLD_FIRST_CONNECTION=10]="OLD_FIRST_CONNECTION",e[e.OLD_RESTART=11]="OLD_RESTART",e[e.DISCONNECTED_OR_FAILED=20]="DISCONNECTED_OR_FAILED"}(uS||(uS={})),function(e){e.LocalVideoTrack="videoTrack",e.LocalAudioTrack="audioTrack",e.LocalVideoLowTrack="videoLowTrack"}(hS||(hS={})),function(e){e.New="new",e.Connected="connected",e.Reconnecting="reconnecting",e.Disconnected="disconnected"}(fS||(fS={})),function(e){e.StateChange="stateChange",e.IceConnectionStateChange="iceConnectionStateChange",e.RequestMuteLocal="requestMuteLocal",e.RequestUnmuteLocal="requestUnmuteLocal",e.RequestRePublish="requestRePublish",e.RequestRePublishDataChannel="requestRePublishDataChannel",e.RequestReSubscribe="requestReSubscribe",e.RequestUploadStats="requestUploadStats",e.MediaReconnectStart="MediaReconnectStart",e.MediaReconnectEnd="MediaReconnectEnd",e.NeedSignalRTT="NeedSignalRTT",e.RequestRestartICE="RequestRestartIce",e.PeerConnectionStateChange="PeerConnectionStateChange",e.RequestReconnect="RequestReconnect",e.RequestReconnectPC="RequestReconnectPC",e.RequestUnpublishForReconnectPC="RequestUnpublishForReconnectPC",e.P2PLost="P2PLost",e.UpdateVideoEncoder="UpdateVideoEncoder",e.ConnectionTypeChange="ConnectionTypeChange",e.RequestLowStreamParameter="RequestLowStreamParameter",e.QueryClientConnectionState="QueryClientConnectionState",e.LocalCandidate="LocalCandidate",e.RequestP2PMuteLocal="requestP2PMuteLocal",e.RequestP2PPublish="RequestP2PPublish",e.RequestP2PUnPublish="RequestP2PUnPublish",e.RequestP2PUnmuteRemote="RequestP2PUnmuteRemote",e.RequestP2PMuteRemote="RequestP2PMuteRemote",e.RequestP2PRestartICE="RequestP2PRestartICE"}(pS||(pS={})),function(e){e.MUTE_LOCAL_VIDEO="mute_local_video",e.MUTE_LOCAL_AUDIO="mute_local_audio",e.UNMUTE_LOCAL_VIDEO="unmute_local_video",e.UNMUTE_LOCAL_AUDIO="unmute_local_audio",e.MUTE_REMOTE_VIDEO="mute_remote_video",e.MUTE_REMOTE_AUDIO="mute_remote_audio",e.UNMUTE_REMOTE_VIDEO="unmute_remote_video",e.UNMUTE_REMOTE_AUDIO="unmute_remote_audio"}(gS||(gS={})),function(e){e.CONNECTING="CONNECTING",e.RECONNECTING="RECONNECTING",e.CONNECTED="CONNECTED",e.CLOSED="CLOSED"}(mS||(mS={})),function(e){e[e.CONNECT_AP=0]="CONNECT_AP",e[e.AP_CONNECTED=1]="AP_CONNECTED",e[e.CONNECT_WORKER_MANAGER=2]="CONNECT_WORKER_MANAGER",e[e.WORKER_MANAGER_CONNECTED=3]="WORKER_MANAGER_CONNECTED",e[e.GET_WORKER_MANAGER_RESPONSE=4]="GET_WORKER_MANAGER_RESPONSE",e[e.CONNECT_WORKER=5]="CONNECT_WORKER",e[e.WORKER_CONNECTED=6]="WORKER_CONNECTED",e[e.CLOSED=7]="CLOSED"}(vS||(vS={})),function(e){e.CONNECTION_STATE_CHANGE="connection-state-change",e.STATE_CHANGE="state-change",e.INSPECT_RESULT="inspect-result",e.CLIENT_LOCAL_VIDEO_TRACK="client-local-video-track",e.REQUEST_NEW_WORKER_URL="request-new-worker-url"}(bS||(bS={})),function(e){e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.MULTI_IP="MULTI_IP",e.TIMEOUT="TIMEOUT",e.OFFLINE="OFFLINE",e.LEAVE="LEAVE",e.P2P_FAILED="P2P_FAILED",e.FALLBACK="FALLBACK"}(_S||(_S={})),function(e){e.CONNECTED="transmitter:connected",e.RECONNECTING="transmitter:reconnecting",e.WILL_RECONNECT="transmitter:will_reconnect",e.CLOSED="transmitter:closed",e.FAILED="transmitter:failed",e.ON_MESSAGE="transmitter:on_message",e.REQUEST_NEW_URLS="transmitter:request_new_urls",e.RECONNECT_WAITTING_FINISH="transmitter:reconnect_waitting_finish",e.RECONNECT_CREATE_CONNECTION="transmitter:reconnect_create_connection",e.ON_TOKEN_PRIVILEGE_DID_EXPIRE="transmitter:on_token_privilege_did_expire",e.TO_CONNECT_DATACHANNEL="transmitter:to_connect_datachannel",e.FAILBACK="transmitter:failback"}(yS||(yS={})),function(e){e.CAMERA_CHANGED="camera-changed",e.MICROPHONE_CHANGED="microphone-changed",e.PLAYBACK_DEVICE_CHANGED="playback-device-changed",e.AUDIO_AUTOPLAY_FAILED="audio-autoplay-failed",e.AUTOPLAY_FAILED="autoplay-failed",e.SECURITY_POLICY_VIOLATION="security-policy-violation"}(ES||(ES={})),function(e){e[e.APP_TYPE_INVALID_VALUE=-1]="APP_TYPE_INVALID_VALUE",e[e.APP_TYPE_NATIVE=0]="APP_TYPE_NATIVE",e[e.APP_TYPE_NATIVE_COCOS=1]="APP_TYPE_NATIVE_COCOS",e[e.APP_TYPE_NATIVE_UNITY=2]="APP_TYPE_NATIVE_UNITY",e[e.APP_TYPE_NATIVE_ELECTRON=3]="APP_TYPE_NATIVE_ELECTRON",e[e.APP_TYPE_NATIVE_FLUTTER=4]="APP_TYPE_NATIVE_FLUTTER",e[e.APP_TYPE_NATIVE_UNREAL=5]="APP_TYPE_NATIVE_UNREAL",e[e.APP_TYPE_NATIVE_XAMARIN=6]="APP_TYPE_NATIVE_XAMARIN",e[e.APP_TYPE_NATIVE_API_CLOUD=7]="APP_TYPE_NATIVE_API_CLOUD",e[e.APP_TYPE_NATIVE_REACT_NATIVE=8]="APP_TYPE_NATIVE_REACT_NATIVE",e[e.APP_TYPE_NATIVE_PYTHON=9]="APP_TYPE_NATIVE_PYTHON",e[e.APP_TYPE_NATIVE_COCOS_CREATOR=10]="APP_TYPE_NATIVE_COCOS_CREATOR",e[e.APP_TYPE_NATIVE_RUST=11]="APP_TYPE_NATIVE_RUST",e[e.APP_TYPE_NATIVE_C_SHARP=12]="APP_TYPE_NATIVE_C_SHARP",e[e.APP_TYPE_NATIVE_CEF=13]="APP_TYPE_NATIVE_CEF",e[e.APP_TYPE_NATIVE_UNI_APP=14]="APP_TYPE_NATIVE_UNI_APP",e[e.APP_TYPE_WEBRTC=1e3]="APP_TYPE_WEBRTC",e[e.APP_TYPE_WEBRTC_REACT=1001]="APP_TYPE_WEBRTC_REACT",e[e.APP_TYPE_WEBRTC_VUE=1002]="APP_TYPE_WEBRTC_VUE",e[e.APP_TYPE_WEBRTC_ANGULAR=1003]="APP_TYPE_WEBRTC_ANGULAR"}(CS||(CS={})),function(e){e.CONNECTING="CONNECTING",e.RECONNECTING="RECONNECTING",e.CONNECTED="CONNECTED",e.CLOSED="CLOSED"}(wS||(wS={})),function(e){e.CONNECTION_STATE_CHANGE="connection-state-change",e.STATE_CHANGE="state-change",e.INSPECT_RESULT="inspect-result",e.CLIENT_LOCAL_VIDEO_TRACK="client-local-video-track",e.REQUEST_NEW_WORKER_URL="request-new-worker-url"}(SS||(SS={})),function(e){e[e.CONNECT_AP=0]="CONNECT_AP",e[e.AP_CONNECTED=1]="AP_CONNECTED",e[e.CONNECT_WORKER_MANAGER=2]="CONNECT_WORKER_MANAGER",e[e.WORKER_MANAGER_CONNECTED=3]="WORKER_MANAGER_CONNECTED",e[e.GET_WORKER_MANAGER_RESPONSE=4]="GET_WORKER_MANAGER_RESPONSE",e[e.CONNECT_WORKER=5]="CONNECT_WORKER",e[e.WORKER_CONNECTED=6]="WORKER_CONNECTED",e[e.CLOSED=7]="CLOSED"}(TS||(TS={})),function(e){e.CALL="call",e.CANDIDATE="candidate",e.PUBLISH="publish",e.UNPUBLISH="unpublish",e.SUBSCRIBE="subscribe",e.UNSUBSCRIBE="unsubscribe",e.CONTROL="control",e.RESTART_ICE="restart_ice",e.ACK="ack",e.JOIN="join",e.EXCHANGE_SDP="exchange_sdp",e.DO_SUBSCRIBE="do_subscribe",e.DO_UNSUBSCRIBE="do_unsubscribe"}(AS||(AS={})),function(e){e.MUTE_LOCAL_AUDIO="mute_local_audio",e.MUTE_LOCAL_VIDEO="mute_local_video",e.UNMUTE_LOCAL_AUDIO="unmute_local_audio",e.UNMUTE_LOCAL_VIDEO="unmute_local_video"}(RS||(RS={})),function(e){e[e.SUCCESS=1]="SUCCESS",e[e.FAILED=0]="FAILED"}(OS||(OS={}));const NS={[dw.ACCESS_POINT]:{[fw.NO_FLAG_SET]:{desc:"flag is zero",retry:!1},[fw.FLAG_SET_BUT_EMPTY]:{desc:"flag is empty",retry:!1},[fw.INVALID_FALG_SET]:{desc:"invalid flag",retry:!1},[fw.FLAG_SET_BUT_NO_RE]:{desc:"flag set unilbs but no request",retry:!1},[fw.INVALID_SERVICE_ID]:{desc:"invalid service id",retry:!1},[fw.NO_SERVICE_AVAILABLE]:{desc:"no service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_P2P]:{desc:"no unilbs p2p service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_VOICE]:{desc:"no unilbs voice service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_WEBRTC]:{desc:"no unilbs webrtc service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_CDS]:{desc:"no cds service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_CDN]:{desc:"no cdn dispatcher service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_TDS]:{desc:"no tds service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_REPORT]:{desc:"no unilbs report service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_APP_CENTER]:{desc:"no app center service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_ENV0]:{desc:"no unilbs sig env0 service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_VOET]:{desc:"no unilbs voet service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_STRING_UID]:{desc:"no string uid service available",retry:!0},[fw.NO_SERVICE_AVAILABLE_WEBRTC_UNILBS]:{desc:"no webrtc unilbs service available",retry:!0}},[dw.UNILBS]:{[hw.INVALID_VENDOR_KEY]:{desc:"invalid vendor key, can not find appid",retry:!1},[hw.INVALID_CHANNEL_NAME]:{desc:"invalid channel name",retry:!1},[hw.INTERNAL_ERROR]:{desc:"unilbs internal error",retry:!1},[hw.NO_AUTHORIZED]:{desc:"invalid token, authorized failed",retry:!1},[hw.DYNAMIC_KEY_TIMEOUT]:{desc:"dynamic key or token timeout",retry:!1},[hw.NO_ACTIVE_STATUS]:{desc:"no active status",retry:!1},[hw.DYNAMIC_KEY_EXPIRED]:{desc:"dynamic key expired",retry:!1},[hw.STATIC_USE_DYNAMIC_KEY]:{desc:"static use dynamic key",retry:!1},[hw.DYNAMIC_USE_STATIC_KEY]:{desc:"dynamic use static key",retry:!1},[hw.USER_OVERLOAD]:{desc:"amount of users over load",retry:!1},[hw.FORBIDDEN_REGION]:{desc:"the request is forbidden in this area",retry:!1},[hw.CANNOT_MEET_AREA_DEMAND]:{desc:"unable to allocate services in this area",retry:!1}},[dw.STRING_UID_ALLOCATOR]:{[uw.IIIEGAL_APPID]:{desc:"invalid appid",retry:!1},[uw.IIIEGAL_UID]:{desc:"invalid string uid",retry:!1},[uw.INTERNAL_ERROR]:{desc:"string uid allocator internal error",retry:!0}}};function LS(e){const t=NS[Math.floor(e/1e4)];if(!t)return{desc:"unkonw error",retry:!1};const i=t[e%1e4];if(!i){if(Math.floor(e/1e4)===dw.ACCESS_POINT){const t=e%1e4;if("1"===t.toString()[0])return{desc:e.toString(),retry:!1};if("2"===t.toString()[0])return{desc:e.toString(),retry:!0}}return{desc:"unkonw error",retry:!1}}return i}const MS={[pw.K_TIMESTAMP_EXPIRED]:{desc:"K_TIMESTAMP_EXPIRED",action:"failed"},[pw.K_CHANNEL_PERMISSION_INVALID]:{desc:"K_CHANNEL_PERMISSION_INVALID",action:"failed"},[pw.K_CERTIFICATE_INVALID]:{desc:"K_CERTIFICATE_INVALID",action:"failed"},[pw.K_CHANNEL_NAME_EMPTY]:{desc:"K_CHANNEL_NAME_EMPTY",action:"failed"},[pw.K_CHANNEL_NOT_FOUND]:{desc:"K_CHANNEL_NOT_FOUND",action:"failed"},[pw.K_TICKET_INVALID]:{desc:"K_TICKET_INVALID",action:"failed"},[pw.K_CHANNEL_CONFLICTED]:{desc:"K_CHANNEL_CONFLICTED",action:"failed"},[pw.K_SERVICE_NOT_READY]:{desc:"K_SERVICE_NOT_READY",action:"tryNext"},[pw.K_SERVICE_TOO_HEAVY]:{desc:"K_SERVICE_TOO_HEAVY",action:"tryNext"},[pw.K_UID_BANNED]:{desc:"K_UID_BANNED",action:"failed"},[pw.K_IP_BANNED]:{desc:"K_IP_BANNED",action:"failed"},[pw.K_AUTO_REBALANCE]:{desc:"k_AUTO_REBALANCE",action:"recover"},[pw.ERR_INVALID_VENDOR_KEY]:{desc:"ERR_INVALID_VENDOR_KEY",action:"failed"},[pw.ERR_INVALID_CHANNEL_NAME]:{desc:"ERR_INVALID_CHANNEL_NAME",action:"failed"},[pw.WARN_NO_AVAILABLE_CHANNEL]:{desc:"WARN_NO_AVAILABLE_CHANNEL",action:"failed"},[pw.WARN_LOOKUP_CHANNEL_TIMEOUT]:{desc:"WARN_LOOKUP_CHANNEL_TIMEOUT",action:"tryNext"},[pw.WARN_LOOKUP_CHANNEL_REJECTED]:{desc:"WARN_LOOKUP_CHANNEL_REJECTED",action:"failed"},[pw.WARN_OPEN_CHANNEL_TIMEOUT]:{desc:"WARN_OPEN_CHANNEL_TIMEOUT",action:"tryNext"},[pw.WARN_OPEN_CHANNEL_REJECTED]:{desc:"WARN_OPEN_CHANNEL_REJECTED",action:"failed"},[pw.WARN_REQUEST_DEFERRED]:{desc:"WARN_REQUEST_DEFERRED",action:"failed"},[pw.ERR_DYNAMIC_KEY_TIMEOUT]:{desc:"ERR_DYNAMIC_KEY_TIMEOUT",action:"failed"},[pw.ERR_NO_AUTHORIZED]:{desc:"ERR_NO_AUTHORIZED",action:"failed"},[pw.ERR_VOM_SERVICE_UNAVAILABLE]:{desc:"ERR_VOM_SERVICE_UNAVAILABLE",action:"tryNext"},[pw.ERR_NO_CHANNEL_AVAILABLE_CODE]:{desc:"ERR_NO_CHANNEL_AVAILABLE_CODE",action:"failed"},[pw.ERR_MASTER_VOCS_UNAVAILABLE]:{desc:"ERR_MASTER_VOCS_UNAVAILABLE",action:"tryNext"},[pw.ERR_INTERNAL_ERROR]:{desc:"ERR_INTERNAL_ERROR",action:"tryNext"},[pw.ERR_NO_ACTIVE_STATUS]:{desc:"ERR_NO_ACTIVE_STATUS",action:"failed"},[pw.ERR_INVALID_UID]:{desc:"ERR_INVALID_UID",action:"failed"},[pw.ERR_DYNAMIC_KEY_EXPIRED]:{desc:"ERR_DYNAMIC_KEY_EXPIRED",action:"failed"},[pw.ERR_STATIC_USE_DYANMIC_KE]:{desc:"ERR_STATIC_USE_DYANMIC_KE",action:"failed"},[pw.ERR_DYNAMIC_USE_STATIC_KE]:{desc:"ERR_DYNAMIC_USE_STATIC_KE",action:"failed"},[pw.ERR_NO_VOCS_AVAILABLE]:{desc:"ERR_NO_VOCS_AVAILABLE",action:"tryNext"},[pw.ERR_NO_VOS_AVAILABLE]:{desc:"ERR_NO_VOS_AVAILABLE",action:"tryNext"},[pw.ERR_JOIN_CHANNEL_TIMEOUT]:{desc:"ERR_JOIN_CHANNEL_TIMEOUT",action:"tryNext"},[pw.ERR_JOIN_BY_MULTI_IP]:{desc:"ERR_JOIN_BY_MULTI_IP",action:"recover"},[pw.ERR_NOT_JOINED]:{desc:"ERR_NOT_JOINED",action:"failed"},[pw.ERR_REPEAT_JOIN_REQUEST]:{desc:"ERR_REPEAT_JOIN_REQUEST",action:"quit"},[pw.ERR_REPEAT_JOIN_CHANNEL]:{desc:"ERR_REPEAT_JOIN_CHANNEL",action:"quit"},[pw.ERR_INVALID_STRINGUID]:{desc:"ERR_INVALID_STRINGUID",action:"failed"},[pw.ERR_TOO_MANY_USERS]:{desc:"ERR_TOO_MANY_USERS",action:"tryNext"},[pw.ERR_SET_CLIENT_ROLE_TIMEOUT]:{desc:"ERR_SET_CLIENT_ROLE_TIMEOUT",action:"failed"},[pw.ERR_SET_CLIENT_ROLE_NO_PERMISSION]:{desc:"ERR_SET_CLIENT_ROLE_TIMEOUT",action:"failed"},[pw.ERR_SET_CLIENT_ROLE_ALREADY_IN_USE]:{desc:"ERR_SET_CLIENT_ROLE_ALREADY_IN_USE",action:"success"},[pw.ERR_PUBLISH_REQUEST_INVALID]:{desc:"ERR_PUBLISH_REQUEST_INVALID",action:"failed"},[pw.ERR_SUBSCRIBE_REQUEST_INVALID]:{desc:"ERR_SUBSCRIBE_REQUEST_INVALID",action:"failed"},[pw.ERR_NOT_SUPPORTED_MESSAGE]:{desc:"ERR_NOT_SUPPORTED_MESSAGE",action:"failed"},[pw.ERR_ILLEAGAL_PLUGIN]:{desc:"ERR_ILLEAGAL_PLUGIN",action:"failed"},[pw.ILLEGAL_CLIENT_ROLE_LEVEL]:{desc:"ILLEGAL_CLIENT_ROLE_LEVEL",action:"failed"},[pw.ERR_REJOIN_TOKEN_INVALID]:{desc:"ERR_REJOIN_TOKEN_INVALID",action:"failed"},[pw.ERR_REJOIN_USER_NOT_JOINED]:{desc:"ERR_REJOIN_NOT_JOINED",action:"failed"},[pw.ERR_INVALID_OPTIONAL_INFO]:{desc:"ERR_INVALID_OPTIONAL_INFO",action:"quit"},[pw.ERR_TEST_RECOVER]:{desc:"ERR_TEST_RECOVER",action:"recover"},[pw.ERR_TEST_TRYNEXT]:{desc:"ERR_TEST_TRYNEXT",action:"recover"},[pw.ERR_TEST_RETRY]:{desc:"ERR_TEST_RETRY",action:"recover"},[pw.ILLEGAL_AES_PASSWORD]:{desc:"ERR_TEST_RETRY",action:"failed"},[pw.ERR_TOO_MANY_BROADCASTERS]:{desc:"ERR_TOO_MANY_BROADCASTERS",action:"failed"},[pw.ERR_TOO_MANY_SUBSCRIBERS]:{desc:"ERR_TOO_MANY_SUBSCRIBERS",action:"failed"},[pw.ERR_LICENSE_ILLEGAL]:{desc:"ERR_LICENSE_ILLEGAL",action:"quit"},[pw.ERR_LICENSE_MISSING]:{desc:"ERR_LICENSE_MISSING",action:"quit"},[pw.ERR_LICENSE_EXPIRED]:{desc:"ERR_LICENSE_EXPIRED",action:"quit"},[pw.ERR_LICENSE_MINUTES_EXCEEDED]:{desc:"ERR_LICENSE_MINUTES_EXCEEDED",action:"quit"},[pw.ERR_LICENSE_PERIOD_INVALID]:{desc:"ERR_LICENSE_PERIOD_INVALID",action:"quit"},[pw.ERR_LICENSE_MULTIPLE_SDK_SERVICE]:{desc:"ERR_LICENSE_MULTIPLE_SDK_SERVICE",action:"quit"}};function xS(e){return MS[e]||{desc:"UNKNOW_ERROR_".concat(e),action:"failed"}}function DS(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function PS(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?DS(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):DS(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function US(e){return e.every((e=>e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING))}function BS(e,t){if("string"==typeof e)return e;const{proxy:i,host:n,port:r}=e;if(t){const e=xC("JOIN_GATEWAY_FALLBACK_PORT")||443;return 443===e?"wss://".concat(n,"/ws/?p=").concat(Number(r)+150):"wss://".concat(n,":").concat(e,"/ws/?p=").concat(Number(r)+150)}return i?"wss://".concat(i,"/ws/?h=").concat(n,"&p=").concat(r):"wss://".concat(n,":").concat(r)}const FS=/wss:\/\/(.+)\/ws\/\?h=(.+)&p=([0-9]+)\/?/,VS=/wss:\/\/(.+)\/ws\/\?p=([0-9]+)\/?/,jS=/wss:\/\/(.+):([0-9]+)\/?/,HS=/wss:\/\/(.[^\/]+)\/?/;let $S=0;class zS{constructor(e,t){oh(this,"id",0),oh(this,"store",void 0),oh(this,"recordIndex",void 0),oh(this,"websockets",[]),oh(this,"try443PortDuration",2e3),oh(this,"forceCloseWSDuration",5e3),oh(this,"try443PortTimeout",null),oh(this,"forceCloseTimeout",null),oh(this,"isTry443PortFailed",!1),oh(this,"isNormalPortFailed",!1),oh(this,"useDoubleDomain",!1),oh(this,"useProxy",!1),oh(this,"startTime",Date.now()),this.id=++$S,this.try443PortDuration=xC("JOIN_GATEWAY_TRY_443PORT_DURATION")||2e3,this.forceCloseWSDuration=e||5e3,this.store=t}closeAllWebsockets(){this.websockets.forEach((e=>{e.onopen=null,e.onclose=null,e.onmessage=null,e.close()})),this.websockets.length=0}clearTimeout(){this.forceCloseTimeout&&clearTimeout(this.forceCloseTimeout),this.try443PortTimeout&&clearTimeout(this.try443PortTimeout)}logger(){var e;const t=Date.now()-this.startTime;for(var i=arguments.length,n=new Array(i),r=0;r<i;r++)n[r]=arguments[r];$C.debug("[choose-best-ws ".concat(null===(e=this.store)||void 0===e?void 0:e.clientId," ").concat(this.id,"] ").concat(t,"ms:"),...n)}createWebSocket(e,t,i){this.logger("createWebSocket:",e,{isTry443Port:t,hasTimeoutDetection:i});const n=xC("GATEWAY_DOMAINS"),r=Date.now(),s=[],o=n.find((t=>{var i;return Di(i=e.host).call(i,t)}));o||(this.useDoubleDomain=!1);const a=[];if(this.useDoubleDomain)n.forEach((i=>{a.push(BS(PS(PS({},e),{},{host:e.host.replace(o,i)}),t))}));else{const i=PS({},e);if(t&&o){const e=n.find((e=>e!==o));e&&(i.host=i.host.replace(o,e))}a.push(BS(i,t))}try{a.forEach((e=>{const t=new WebSocket(e);t.binaryType="arraybuffer",s.push(t),this.logger("ws is connecting:",t.url)}))}catch(n){if(this.logger("ws create failed"),s.forEach((e=>e.close())),s.length=0,this.useDoubleDomain)return this.useDoubleDomain=!1,this.createWebSocket(e,t,i);if(!t&&443!==Number(e.port))return this.createWebSocket(e,!0,i);throw new Dw(Bb.WS_ERR,"init websocket failed! Error: ".concat(n.toString()))}const c=ib();return this.store&&this.store.recordJoinChannelService({urls:s.map((e=>e.url)),service:"gateway"},this.recordIndex),s.forEach((e=>{e.onopen=()=>{this.logger("onopen: ws ".concat(e.url," open cost ").concat(Date.now()-r,"ms")),this.websockets.forEach((t=>{t!==e&&(t.onopen=null,t.onclose=null,t.onmessage=null,t.close(),this.logger("close backup websocket: ".concat(t.url)))})),this.websockets.length=0,c.resolve(e)},e.onclose=i=>{this.logger("onclose: ws ".concat(e.url," closed cost ").concat(Date.now()-r,"ms state: ").concat(e.readyState)),t?this.isTry443PortFailed=US(s):this.isNormalPortFailed=US(s),this.logger("443: ".concat(this.useProxy?"not try":this.isTry443PortFailed?"failed":"trying"," 47xx: ").concat(this.isNormalPortFailed?"failed":"trying")),(t&&this.isTry443PortFailed||!t&&(this.isTry443PortFailed||this.useProxy)&&this.isNormalPortFailed)&&(this.logger("onclose: all websocket is closed, ".concat(i.reason)),c.reject({code:i.code,reason:Jw.A_ROUND_WS_FAILED}))},e.onmessage=t=>this.logger("".concat(e.url," onmessage: ").concat(t.data))})),this.websockets.push(...s),i||(()=>{const i=()=>{this.logger("5s timeout close un-opens, isWebsocket created: ",c.isResolved),this.websockets.forEach((e=>e.readyState!==WebSocket.OPEN&&e.close()))};if(t||this.useProxy)return this.logger("add 5s timeout at ".concat(t?"try-443":"proxy"," condition")),this.forceCloseTimeout=window.setTimeout(i,this.forceCloseWSDuration);this.try443PortTimeout=window.setTimeout((()=>{if(this.logger("2s timeout, isWebsocket created: ",c.isResolved),c.isResolved)return i();pb().os===cb.MAC_OS&&Cb()&&i(),this.createWebSocket(e,!0,!0).then((e=>c.resolve(e))).catch((e=>{this.isNormalPortFailed&&c.reject(e),this.logger("try 443 port to create ws failed")})),this.forceCloseTimeout=window.setTimeout(i,this.forceCloseWSDuration)}),this.try443PortDuration)})(),c.promise}chooseBestWebsocket(e,t,i,n){return this.useDoubleDomain=!!t,"string"==typeof e&&(e=function(e){let t,i,n;return[,t,i,n]=e.match(FS)||[],t||([,i,n]=e.match(VS)||[]),i&&n||([,i,n]=e.match(jS)||[]),i&&n||([,i]=e.match(HS)||[]),i||$C.warning("un-destructible url: ",e),{proxy:t,host:i,port:n||"443"}}(e)),this.recordIndex=n,this.useProxy=!!e.proxy,i&&this.useProxy&&($C.warn("cannot use 443 only when use proxy"),i=!1),this.createWebSocket(e,!!i,!1).finally((()=>this.clearTimeout()))}}function WS(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}class KS extends r_{get url(){return this.websocket&&this.websocket.url||null}get reconnectMode(){return this._reconnectMode}set reconnectMode(e){var t;Di(t=["tryNext","recover"]).call(t,e)&&this.resetReconnectCount(e),this._reconnectMode=e}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,"reconnecting"===this._state?this.emit(Cw.RECONNECTING,this.reconnectReason):"connected"===this._state?this.emit(Cw.CONNECTED):"closed"===this._state?this.emit(Cw.CLOSED):"failed"===this._state&&this.emit(Cw.FAILED))}resetReconnectCount(e){$C.debug("websocket reset reconnect count, reason: "+e),this.reconnectCount=0}constructor(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>5?arguments[5]:void 0;super(),oh(this,"connectionID",0),oh(this,"currentURLIndex",0),oh(this,"urls",[]),oh(this,"_reconnectMode","tryNext"),oh(this,"reconnectReason",void 0),oh(this,"_initMutex",new G_("websocket")),oh(this,"name",void 0),oh(this,"_state","closed"),oh(this,"reconnectInterrupter",void 0),oh(this,"websocket",void 0),oh(this,"retryConfig",void 0),oh(this,"reconnectCount",0),oh(this,"forceCloseTimeout",5e3),oh(this,"onlineReconnectListener",void 0),oh(this,"useCompress",void 0),oh(this,"tryDoubleDomain",!1),oh(this,"use443PortOnly",!1),oh(this,"wsInflateLength",0),oh(this,"wsDeflateLength",0),oh(this,"closeEstablishingWs",(()=>{})),oh(this,"store",void 0),oh(this,"joinGatewayRecordIndex",void 0),this.store=s,this.name=e,this.retryConfig=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?WS(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):WS(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},t),this.useCompress=i,this.tryDoubleDomain=n,this.use443PortOnly=r;const{timeout:o,timeoutFactor:a}=t,c=Math.max(300,Math.floor(3*o/5)),l=Math.max(1.2,Math.floor(8*a)/10);h_.ONLINE&&(this.retryConfig.timeout=c,this.retryConfig.timeoutFactor=l),C_.on(f_.NETWORK_STATE_CHANGE,((e,t)=>{e!==t&&(this.resetReconnectCount("network state change: ".concat(t," -> ").concat(e)),e===h_.ONLINE?(this.retryConfig.timeout=c,this.retryConfig.timeoutFactor=l):(this.retryConfig.timeout=o,this.retryConfig.timeoutFactor=a))}))}getConnection(){return this.websocket||void 0}async init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;const i=await this._initMutex.lock();this.forceCloseTimeout=t,this.urls=e,this.state="connecting";try{const e=ib(),t=this.urls[this.currentURLIndex];this.createWebSocketConnection(t).then(e.resolve).catch(e.reject),this.once(Cw.CLOSED,(()=>{e.reject(new Fb(Bb.WS_DISCONNECT))})),this.once(Cw.CONNECTED,e.resolve),await e.promise}catch(e){}finally{i()}}close(e,t){if(this.currentURLIndex=0,this.resetReconnectCount("close"),this.reconnectInterrupter&&this.reconnectInterrupter(),this.websocket){this.websocket.onclose=null,this.websocket.onopen=null,this.websocket.onmessage=null;const e=this.websocket;t?setTimeout((()=>e.close()),500):e.close(),this.websocket=void 0}this.state=e?"failed":"closed",this.closeEstablishingWs&&this.closeEstablishingWs()}reconnect(e,t){if(!this.websocket)return void $C.warning("[".concat(this.name,"] can not reconnect, no websocket"));void 0!==e&&(this.reconnectMode=e),$C.debug("[".concat(this.name,"] reconnect is triggered initiative")),"number"==typeof this.joinGatewayRecordIndex&&this.store&&this.store.recordJoinChannelService({status:"error",errors:[new Error(t)]},this.joinGatewayRecordIndex);const i=this.websocket.onclose;this.websocket.onclose=null,this.websocket.close(),i&&i.bind(this.websocket)({code:9999,reason:t})}sendMessage(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this.websocket||this.websocket.readyState!==WebSocket.OPEN)throw new Fb(Bb.WS_ABORT,"websocket is not ready");try{t||(e=JSON.stringify(e)),this.websocket.send(e)}catch(e){throw new Fb(Bb.WS_ERR,"send websocket message error"+e.toString())}}setWsInflateData(e){this.wsDeflateLength=this.wsDeflateLength+e.originLength,this.wsInflateLength=this.wsInflateLength+e.compressedLength}getWsInflateData(){const e=this.wsInflateLength,t=this.wsDeflateLength;return this.clearWsInflateData(),{wsInflateLength:e,wsDeflateLength:t}}clearWsInflateData(){this.wsInflateLength=0,this.wsDeflateLength=0}async createWebSocketConnection(e){var t;const i=ib();this.connectionID+=1,this.joinGatewayRecordIndex=void 0;const n=e=>{var t;null===(t=this.store)||void 0===t||t.signalChannelOpen(),$C.debug("[".concat(this.name,"] websocket opened:"),e),this.reconnectMode="retry",this.state="connected",this.resetReconnectCount("opened"),i.resolve()},r=async e=>{var t;if($C.debug("[".concat(this.name,"] websocket close ").concat(null===(t=this.websocket)||void 0===t?void 0:t.url,", code: ").concat(e.code,", reason: ").concat(e.reason,", current mode: ").concat(this.reconnectMode)),this.reconnectCount>=this.retryConfig.maxRetryCount)i.reject(new Fb(Bb.WS_DISCONNECT,"websocket close: ".concat(e.code))),this.close();else{"connected"===this.state&&(this.reconnectReason=e.reason,this.state="reconnecting");const t=y_(this,Cw.WILL_RECONNECT,this.reconnectMode,e.reason)||this.reconnectMode,n=await this.reconnectWithAction(t);if("closed"===this.state)return void $C.debug("[".concat(this.connectionID,"] ws is closed, no need to reconnect"));if(!n)return i.reject(new Fb(Bb.WS_DISCONNECT,"websocket reconnect failed: ".concat(e.code))),this.close(!0);i.resolve()}},s=e=>{this.emit(Cw.ON_MESSAGE,e)},o=e=>{$C.warn("[".concat(this.connectionID,"] ws open error ").concat(e))};this.websocket&&(this.websocket.onclose=null,this.websocket.close()),xC("GATEWAY_WSS_ADDRESS")&&this.name.startsWith("gateway")&&(e=xC("GATEWAY_WSS_ADDRESS")),$C.debug("[".concat(this.name,"] start connect, url:"),e);const a=null===(t=this.store)||void 0===t?void 0:t.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"gateway"});try{var c;const t=await this.chooseBestWebsocketConnection(e);this.websocket=t,n&&n(this.websocket.url),this.websocket.onclose=r,this.websocket.onmessage=s,this.websocket.onerror=o,null===(c=this.store)||void 0===c||c.recordJoinChannelService({endTs:Date.now(),status:"success"},a),this.joinGatewayRecordIndex=a}catch(e){const t="closed"===this.state,n=e instanceof Fb,s=n&&e.code===Bb.WS_ABORT,o=n&&e.code===Bb.WS_ERR,c=n?e.message:e&&(e.reason||e.toString());$C.warning("[choose-best-ws] chooseBestWebsocket error: ".concat(c)),this.store&&this.store.recordJoinChannelService({endTs:Date.now(),status:s?"aborted":"error",errors:[e]},a),t||o?(i.reject(t?new Fb(Bb.WS_DISCONNECT,"websocket is closed: ".concat(c)):new Fb(Bb.WS_ERR,"init websocket failed: ".concat(c))),o&&$C.error("[".concat(this.name,"] init websocket failed: ").concat(c))):r&&r(e)}return i.promise}async reconnectWithAction(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this.reconnectCount>=this.retryConfig.maxRetryCount)return!1;if(0===this.urls.length)return!1;if("closed"===this.state)return!1;$C.warning("[choose-best-ws] action: =>",e),this.onlineReconnectListener||C_.isOnline||!C_.onlineWaiter||(this.onlineReconnectListener=C_.onlineWaiter.then((()=>{this.onlineReconnectListener=void 0})));let i=!0;if(this.reconnectInterrupter=()=>i=!1,t){const t=X_(this.reconnectCount,this.retryConfig);$C.debug("[".concat(this.name,"] wait ").concat(t,"ms to reconnect websocket, mode: ").concat(e)),await nb.race([U_(t),this.onlineReconnectListener||new nb((()=>{}))])}if("closed"===this._state||!i)return!1;this.reconnectCount+=1;const n=async(e,t)=>{this.emit(Cw.RECONNECT_CREATE_CONNECTION,t),await this.createWebSocketConnection(e)};try{if("retry"===e)this.emit(Cw.RECONNECT_WAITTING_FINISH,e),await n(this.urls[this.currentURLIndex],e);else if("tryNext"===e){if(this.currentURLIndex+=1,this.currentURLIndex>=this.urls.length)return this.reconnectWithAction("recover",!1);$C.debug("[".concat(this.name,"] websocket url length: ").concat(this.urls.length," current index: ").concat(this.currentURLIndex)),this.emit(Cw.RECONNECT_WAITTING_FINISH,e),await n(this.urls[this.currentURLIndex],e)}else"recover"===e&&($C.debug("[".concat(this.name,"] request new urls")),this.resetReconnectCount("recover mode"),this.emit(Cw.RECONNECT_WAITTING_FINISH,e),this.urls=await b_(this,Cw.REQUEST_NEW_URLS),this.currentURLIndex=0,await n(this.urls[this.currentURLIndex],e))}catch(i){var r;$C.error("[".concat(this.name,"] reconnect failed ").concat(i&&i.toString()));const n=null==i||null===(r=i.data)||void 0===r?void 0:r.desc;return Array.isArray(n)&&Di(n).call(n,"dynamic key expired")?(this.emit(Cw.ON_TOKEN_PRIVILEGE_DID_EXPIRE),!1):this.reconnectWithAction(e,t)}return!0}}class GS extends KS{constructor(e,t){super(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]&&arguments[4],arguments.length>5?arguments[5]:void 0)}async chooseBestWebsocketConnection(e,t){const i=ib(),n=function(e,t){return new zS(e,t)}(this.forceCloseTimeout,this.store);this.closeEstablishingWs=()=>{$C.debug("[choose-best-ws] close establishing websockets"),n.closeAllWebsockets(),i.reject(new Fb(Bb.WS_ABORT,"choose best websocket aborted"))};const r=xC("GATEWAY_DOMAINS");return $C.debug("[choose-best-ws] currentDomain: ",e,", domains: ",r,"total: ".concat(this.urls.length),"current: ".concat(this.currentURLIndex+1)),n.chooseBestWebsocket(e,this.tryDoubleDomain,this.use443PortOnly,t).then(i.resolve).catch(i.reject),i.promise.finally((()=>{this.closeEstablishingWs=void 0}))}}class qS extends KS{constructor(e,t){super(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3&&void 0!==arguments[3]&&arguments[3],arguments.length>4&&void 0!==arguments[4]&&arguments[4],arguments.length>5?arguments[5]:void 0)}async chooseBestWebsocketConnection(e,t){return new nb(((i,n)=>{let r=!1;const s=[];this.closeEstablishingWs=()=>{$C.debug("[choose-best-ws] close establishing websockets"),s.forEach((e=>{e.onclose=null,e.onopen=null,e.onmessage=null,e.close()})),n(new Fb(Bb.WS_ABORT,"choose best websocket aborted"))};const o=xC("GATEWAY_DOMAINS");let a;const c=e.indexOf("?h="),l=o.find((t=>-1!==c?Di(e).call(e,t,c):Di(e).call(e,t)));$C.debug("[choose-best-ws] currentDomain: ",l,", domains: ",o);let d=!this.tryDoubleDomain||!l;if(!d&&l){var h;const u=Date.now();try{o.forEach((t=>{const i=-1===c?e.replace(l,t):e.substr(0,c)+e.substr(c).replace(l,t),n=new WebSocket(i);n.binaryType="arraybuffer",s.push(n),$C.debug("[choose-best-ws] ws is connecting:",n.url)}))}catch(e){for($C.debug("[choose-best-ws] ws create failed, fallback to single url"),s.forEach((e=>e.close()));s.length;)s.pop();d=!0}null===(h=this.store)||void 0===h||h.recordJoinChannelService({urls:s.map((e=>e.url)),service:"gateway"},t),s.forEach((e=>{e.onopen=()=>{if(r)return;const t=Date.now()-u;$C.debug("[choose-best-ws] ws open cost ".concat(t,"ms")),s.filter((t=>t!==e)).forEach((e=>{$C.debug("[choose-best-ws]close backup websocket: ".concat(e.url)),e.close()})),r=!0,i(e)},e.onclose=e=>{a=e,r||s.find((e=>!(e.readyState===WebSocket.CLOSED||e.readyState===WebSocket.CLOSING)))||($C.debug("[choose-best-ws] all websocket is closed"),r=!0,n(a))},e.onmessage=t=>{$C.debug("[choose-best-ws]".concat(e.url," onmessage: ").concat(t.data))}})),U_(this.forceCloseTimeout).then((()=>{s.forEach((e=>{e.readyState!==WebSocket.OPEN&&e.close()}))}))}if(d){var u;let r;$C.debug("[choose-best-ws] use single url: ",e),null===(u=this.store)||void 0===u||u.recordJoinChannelService({urls:[e],service:"gateway"},t);try{r=new WebSocket(e),s.push(r),r.binaryType="arraybuffer"}catch(e){const t=new Fb(Bb.WS_ERR,"init websocket failed! Error: ".concat(e.toString()));return $C.error("[".concat(this.name,"]").concat(t)),void n(t)}r.onopen=()=>{i(r)},r.onclose=e=>{n(e)},r.onmessage=e=>{$C.debug("[choose-best-ws]".concat(r.url," onmessage: ").concat(e.data))},U_(this.forceCloseTimeout).then((()=>{r&&r.readyState!==WebSocket.OPEN&&r.close()}))}})).then((e=>(this.closeEstablishingWs=void 0,e))).catch((e=>{throw this.closeEstablishingWs=void 0,e}))}}class YS extends r_{get connectionState(){return this._connectionState}set connectionState(e){e!==this._connectionState&&(this._connectionState=e,e===gw.CONNECTED?this.emit(mw.WS_CONNECTED):e===gw.RECONNECTING?this.emit(mw.WS_RECONNECTING,this._websocketReconnectReason):e===gw.CLOSED&&this.emit(mw.WS_CLOSED,this._disconnectedReason))}get currentURLIndex(){return this.websocket.currentURLIndex}get url(){return this.websocket&&this.websocket.url||null}get rtt(){return this.rttRolling.mean()}constructor(e,t){super(),oh(this,"_disconnectedReason",void 0),oh(this,"_websocketReconnectReason",void 0),oh(this,"_connectionState",gw.CLOSED),oh(this,"reconnectToken",void 0),oh(this,"websocket",void 0),oh(this,"openConnectionTime",void 0),oh(this,"clientId",void 0),oh(this,"lastMsgTime",Date.now()),oh(this,"uploadCache",[]),oh(this,"uploadCacheInterval",void 0),oh(this,"rttRolling",new dy(5)),oh(this,"pingpongTimer",void 0),oh(this,"wsInflateDataTimer",void 0),oh(this,"pingpongTimeoutCount",0),oh(this,"joinResponse",void 0),oh(this,"multiIpOption",void 0),oh(this,"initError",void 0),oh(this,"spec",void 0),oh(this,"store",void 0),oh(this,"onWebsocketMessage",(e=>{if(e.data instanceof ArrayBuffer)return void this.emit(mw.ON_BINARY_DATA,e.data);const t=JSON.parse(e.data);if(this.lastMsgTime=Date.now(),Object.prototype.hasOwnProperty.call(t,"_id")){const e="res-@".concat(t._id);this.emit(e,t._result,t._message)}else if(Object.prototype.hasOwnProperty.call(t,"_type")){if(this.emit(t._type,t._message),t._type===_w.ON_NOTIFICATION&&this.handleNotification(t._message),t._type===_w.ON_USER_BANNED)switch(t._message.error_code){case 14:this.close(l_.UID_BANNED);break;case 15:this.close(l_.IP_BANNED);break;case 16:this.close(l_.CHANNEL_BANNED)}if(t._type===_w.ON_USER_LICENSE_BANNED)switch(t._message.error_code){case pw.ERR_LICENSE_MISSING:this.close(l_.LICENSE_MISSING);break;case pw.ERR_LICENSE_EXPIRED:this.close(l_.LICENSE_EXPIRED);break;case pw.ERR_LICENSE_MINUTES_EXCEEDED:this.close(l_.LICENSE_MINUTES_EXCEEDED);break;case pw.ERR_LICENSE_PERIOD_INVALID:this.close(l_.LICENSE_PERIOD_INVALID);break;case pw.ERR_LICENSE_MULTIPLE_SDK_SERVICE:this.close(l_.LICENSE_MULTIPLE_SDK_SERVICE);break;case pw.ERR_LICENSE_ILLEGAL:this.close(l_.LICENSE_ILLEGAL);break;default:this.close()}}})),this.clientId=e.clientId,this.spec=e,this.store=t,this.websocket=new GS("gateway-".concat(this.clientId),this.spec.retryConfig,!0,xC("JOIN_GATEWAY_USE_DUAL_DOMAIN"),xC("JOIN_GATEWAY_USE_443PORT_ONLY"),t),this.handleWebsocketEvents(),window.addEventListener("offline",(()=>{this.connectionState===gw.CONNECTED&&this.reconnect("retry",u_.OFFLINE)}))}async request(e,t,i,n){const r=B_(6,""),s={_id:r,_type:e,_message:t},o=this.websocket.connectionID,a=()=>new nb(((t,i)=>{if(this.connectionState===gw.CONNECTED)return t();const n=()=>{this.off(mw.WS_CLOSED,r),t()},r=()=>{this.off(mw.WS_CONNECTED,n),i(new Dw(Bb.WS_ABORT))};this.once(mw.WS_CONNECTED,n),this.once(mw.WS_CLOSED,r),e!==vw.PUBLISH&&e!==vw.SUBSCRIBE&&e!==vw.UNSUBSCRIBE&&e!==vw.UNPUBLISH&&e!==vw.CONTROL&&e!==vw.RESTART_ICE||this.once(mw.DISCONNECT_P2P,(()=>{i(new Dw(Bb.DISCONNECT_P2P))})),e!==vw.PUBLISH&&e!==vw.RESTART_ICE||this.once(mw.ABORT_P2P_EXECUTION,(()=>{i(new Dw(Bb.DISCONNECT_P2P))}))}));if(this.connectionState!==gw.CONNECTING&&this.connectionState!==gw.RECONNECTING||e===vw.JOIN||e===vw.REJOIN||await a(),this.websocket.sendMessage(s,!0),n)return;const c=new nb(((i,n)=>{let s=!1;const a=(n,r)=>{s=!0,i({isSuccess:"success"===n,message:r||{}}),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.emit(mw.REQUEST_SUCCESS,e,t)};this.once("res-@".concat(r),a);const c=()=>{n(new Dw(Bb.WS_ABORT,"type: ".concat(e))),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.off("res-@".concat(r),a)};this.once(mw.WS_CLOSED,c),this.once(mw.WS_RECONNECTING,c),U_(xC("SIGNAL_REQUEST_TIMEOUT")).then((()=>{this.websocket.connectionID!==o||s||($C.warning("[".concat(this.clientId,"] ws request timeout, type: ").concat(e)),this.emit(mw.REQUEST_TIMEOUT,e,t))}))}));let l=null;try{l=await c}catch(n){if(this.connectionState===gw.CLOSED||e===vw.LEAVE)throw new Dw(Bb.WS_ABORT);return!this.spec.forceWaitGatewayResponse||i?n.throw():e===vw.JOIN||e===vw.REJOIN?null:(await a(),await this.request(e,t))}if(l.isSuccess)return l.message;const d=Number(l.message.error_code||l.message.code),h=xS(d),u=new Dw(Bb.UNEXPECTED_RESPONSE,"".concat(h.desc,": ").concat(l.message.error_str),{code:d,data:l.message});return"success"===h.action?l.message:($C.warning("[".concat(this.clientId,"] [").concat(this.websocket.connectionID,"] unexpected response from type ").concat(e,", error_code: ").concat(d,", message: ").concat(h.desc,", action: ").concat(h.action)),d===pw.ERR_TOO_MANY_BROADCASTERS?e===vw.JOIN||e===vw.REJOIN?(this.initError=u,this.close(),u.throw()):u.throw():"failed"===h.action?u.throw():"quit"===h.action?(this.initError=u,this.close(),u.throw()):(d===pw.ERR_JOIN_BY_MULTI_IP?(this.multiIpOption=l.message.option,$C.warning("[".concat(this.clientId,"] detect multi ip, recover")),this.reconnect("recover",u_.MULTI_IP)):this.reconnect(h.action,u_.SERVER_ERROR),e===vw.JOIN||e===vw.REJOIN?null:await this.request(e,t)))}waitMessage(e,t){return new nb((i=>{const n=r=>{(!t||t(r))&&(this.off(e,n),i(r))};this.on(e,n)}))}upload(e,t){const i={_type:e,_message:t};try{this.websocket.sendMessage(i)}catch(e){const t=xC("MAX_UPLOAD_CACHE")||50;this.uploadCache.push(i),this.uploadCache.length>t&&this.uploadCache.splice(0,1),this.uploadCache.length>0&&!this.uploadCacheInterval&&(this.uploadCacheInterval=window.setInterval((()=>{if(this.connectionState!==gw.CONNECTED)return;const e=this.uploadCache.splice(0,1)[0];0===this.uploadCache.length&&(window.clearInterval(this.uploadCacheInterval),this.uploadCacheInterval=void 0),this.upload(e._type,e._message)}),xC("UPLOAD_CACHE_INTERVAL")||2e3))}}send(e,t){const i={_type:e,_message:t};this.websocket.sendMessage(i)}init(e,t){return this.initError=void 0,this.multiIpOption=void 0,this.joinResponse=void 0,this.reconnectToken=void 0,this.openConnectionTime=void 0,new nb(((t,i)=>{this.once(mw.WS_CONNECTED,(()=>t(this.joinResponse))),this.once(mw.WS_CLOSED,(()=>i(this.initError||new Dw(Bb.WS_ABORT)))),this.connectionState=gw.CONNECTING,this.websocket.init(e).catch(i),this.wsInflateDataTimer&&window.clearInterval(this.wsInflateDataTimer),this.wsInflateDataTimer=window.setInterval((()=>{this.handleWsInflateData()}),2e4)}))}close(e){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.wsInflateDataTimer&&(this.handleWsInflateData(),window.clearInterval(this.wsInflateDataTimer),this.wsInflateDataTimer=void 0),this.reconnectToken=void 0,this.joinResponse=void 0,this._disconnectedReason=e||l_.LEAVE,this.connectionState=gw.CLOSED,$C.debug("[".concat(this.clientId,"] ")+"will close websocket in signal"),this.websocket.close(),e===l_.FALLBACK&&(this.websocket.removeAllListeners(),this.websocket=new GS("gateway-".concat(this.clientId),this.spec.retryConfig,!0,xC("JOIN_GATEWAY_USE_DUAL_DOMAIN"),xC("JOIN_GATEWAY_USE_443PORT_ONLY"),this.store),this.handleWebsocketEvents())}async join(){if(!this.joinResponse){this.emit(mw.ABORT_P2P_EXECUTION);const e=await b_(this,mw.REQUEST_JOIN_INFO),t=await this.request(vw.JOIN,e);if(!t)return this.emit(mw.REPORT_JOIN_GATEWAY,Jw.TIMEOUT,this.url||""),!1;this.joinResponse=t,this.emit(mw.JOIN_RESPONSE,this.joinResponse),this.reconnectToken=this.joinResponse.rejoin_token}return this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),!0}async rejoin(){if(!this.reconnectToken)throw new Dw(Bb.UNEXPECTED_ERROR,"can not rejoin, no rejoin token");const e=E_(this,mw.REQUEST_REJOIN_INFO);e.token=this.reconnectToken;const t=await this.request(vw.REJOIN,e);return!!t&&(this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),t.peers&&t.peers.forEach((e=>{this.emit(_w.ON_USER_ONLINE,{uid:e.uid}),e.audio&&this.emit(_w.ON_ADD_AUDIO_STREAM,{uid:e.uid,uint_id:e.uint_id,audio:!0,ssrcId:e.audio_ssrc}),e.video&&this.emit(_w.ON_ADD_VIDEO_STREAM,{uid:e.uid,uint_id:e.uint_id,video:!0,ssrcId:e.video_ssrc}),e.audio_mute?this.emit(_w.MUTE_AUDIO,{uid:e.uid}):this.emit(_w.UNMUTE_AUDIO,{uid:e.uid}),e.video_mute?this.emit(_w.MUTE_VIDEO,{uid:e.uid}):this.emit(_w.UNMUTE_VIDEO,{uid:e.uid}),e.audio_enable_local?this.emit(_w.ENABLE_LOCAL_AUDIO,{uid:e.uid}):this.emit(_w.DISABLE_LOCAL_AUDIO,{uid:e.uid}),e.video_enable_local?this.emit(_w.ENABLE_LOCAL_VIDEO,{uid:e.uid}):this.emit(_w.DISABLE_LOCAL_VIDEO,{uid:e.uid}),e.audio||e.video||this.emit(_w.ON_REMOVE_STREAM,{uid:e.uid,uint_id:e.uint_id})})),!0)}reconnect(e,t){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.websocket.reconnect(e,t)}handleNotification(e){$C.debug("[".concat(this.clientId,"] receive notification: "),e);const t=xS(e.code);if("success"!==t.action){if("failed"!==t.action)return"quit"===t.action?("ERR_REPEAT_JOIN_CHANNEL"===t.desc&&this.close(l_.UID_BANNED),void this.close()):void this.reconnect(t.action,u_.SERVER_ERROR);$C.error("[".concat(this.clientId,"] ignore error: "),t.desc)}}handlePingPong(){if(!this.websocket||"connected"!==this.websocket.state)return;this.pingpongTimeoutCount>0&&this.rttRolling.add(3e3),this.pingpongTimeoutCount+=1;const e=xC("PING_PONG_TIME_OUT"),t=Date.now();this.pingpongTimeoutCount>=e&&($C.warning("[".concat(this.clientId,"] PING-PONG Timeout. Last Socket Message: ").concat(t-this.lastMsgTime,"ms")),t-this.lastMsgTime>xC("WEBSOCKET_TIMEOUT_MIN"))?this.reconnect("retry",u_.TIMEOUT):this.request(vw.PING,void 0,!0).then((()=>{this.pingpongTimeoutCount=0;const e=Date.now()-t;this.rttRolling.add(e),xC("REPORT_STATS")&&this.send(vw.PING_BACK,{pingpongElapse:e})})).catch((e=>{}))}handleWsInflateData(){const{wsInflateLength:e,wsDeflateLength:t}=this.websocket.getWsInflateData();0!==e&&0!==t&&this.upload(bw.WS_INFLATE_DATA_LENGTH,{ws_deflate_length:t,ws_inflate_length:e})}handleWebsocketEvents(){this.websocket.on(Cw.RECONNECT_WAITTING_FINISH,(e=>{this.emit(mw.WS_RECONNECT_WAITTING_FINISH,e)})),this.websocket.on(Cw.RECONNECT_CREATE_CONNECTION,(e=>{this.emit(mw.WS_RECONNECT_CREATE_CONNECTION,e)})),this.websocket.on(Cw.ON_MESSAGE,this.onWebsocketMessage),this.websocket.on(Cw.CLOSED,(()=>{this.connectionState=gw.CLOSED})),this.websocket.on(Cw.FAILED,(()=>{this._disconnectedReason=l_.NETWORK_ERROR,this.connectionState=gw.CLOSED})),this.websocket.on(Cw.RECONNECTING,(e=>{this._websocketReconnectReason=e,this.joinResponse=void 0,this.connectionState===gw.CONNECTED?this.connectionState=gw.RECONNECTING:this.connectionState=gw.CONNECTING})),this.websocket.on(Cw.WILL_RECONNECT,((e,t,i)=>{const n=E_(this,mw.IS_P2P_DISCONNECTED),r=n||"retry"!==e;n&&"retry"===e&&($C.debug("".concat(this.clientId," reconnect mode is retry, but p2p lost, change to tryNext")),e="tryNext",t=Jw.P2P_DISCONNECTED),r&&($C.debug("".concat(this.clientId," will renewSession, reconnect mode: ").concat(e)),this.emit(mw.REPORT_JOIN_GATEWAY,t||Jw.UNKNOWN_REASON,this.url||""),this.reconnectToken=void 0,this.emit(mw.NEED_RENEW_SESSION),this.emit(mw.DISCONNECT_P2P)),i(e)})),this.websocket.on(Cw.CONNECTED,(()=>{this.openConnectionTime=Date.now(),this.reconnectToken?this.rejoin().catch((e=>{$C.warning("[".concat(this.clientId,"] rejoin failed ").concat(e)),this.reconnect("tryNext",u_.SERVER_ERROR)})):this.join().catch((e=>{if(this.emit(mw.REPORT_JOIN_GATEWAY,e.message||e.code||Jw.UNKNOWN_REASON,this.url||""),e instanceof Dw&&e.code===Bb.UNEXPECTED_RESPONSE&&e.data.code===pw.ERR_NO_AUTHORIZED)return $C.warning("[".concat(this.clientId,"] reconnect no authorized, recover")),void this.reconnect("recover",u_.SERVER_ERROR);$C.error("[".concat(this.clientId,"] join gateway request failed"),e.toString()),this.spec.forceWaitGatewayResponse?this.reconnect("tryNext",u_.SERVER_ERROR):(this.initError=e,this.close())}))})),this.websocket.on(Cw.REQUEST_NEW_URLS,((e,t)=>{b_(this,mw.REQUEST_RECOVER,this.multiIpOption).then(e).catch(t)})),this.websocket.on(Cw.ON_TOKEN_PRIVILEGE_DID_EXPIRE,(()=>{this.emit(_w.ON_TOKEN_PRIVILEGE_DID_EXPIRE)}))}}var XS="\t\n\v\f\r                　\u2028\u2029\ufeff",ZS=it,QS=Ci,JS=XS,eT=ve("".replace),tT=RegExp("^["+JS+"]+"),nT=RegExp("(^|[^"+JS+"])["+JS+"]+$"),rT=function(e){return function(t){var i=QS(ZS(t));return 1&e&&(i=eT(i,tT,"")),2&e&&(i=eT(i,nT,"$1")),i}},iT={start:rT(1),end:rT(2),trim:rT(3)},oT=Ql.PROPER,aT=ue,sT=XS,cT=iT.trim;Fr({target:"String",proto:!0,forced:function(e){return aT((function(){return!!sT[e]()||"​᠎"!=="​᠎"[e]()||oT&&sT[e].name!==e}))}("trim")},{trim:function(){return cT(this)}});var lT,dT,uT=oi("String").trim,hT=be,fT=uT,pT=String.prototype,gT=Z((function(e){var t=e.trim;return"string"==typeof e||e===pT||hT(pT,e)&&t===pT.trim?fT:t}));function mT(e,t,i){return{sampleRate:e,stereo:t,bitrate:i}}function vT(e,t,i,n,r){return{width:e,height:t,frameRate:i,bitrateMin:n,bitrateMax:r}}function bT(e,t,i,n,r){return{width:{max:e},height:{max:t},frameRate:i,bitrateMin:n,bitrateMax:r}}function _T(e,t){return{numSpatialLayers:e,numTemporalLayers:t}}!function(e){e[e.CHOOSE_SERVER=11]="CHOOSE_SERVER",e[e.CLOUD_PROXY=18]="CLOUD_PROXY",e[e.CLOUD_PROXY_5=20]="CLOUD_PROXY_5",e[e.CLOUD_PROXY_FALLBACK=26]="CLOUD_PROXY_FALLBACK"}(lT||(lT={})),function(e){e.IOS_15_16_INTERRUPTION_START="ios15_16-interruption-start",e.IOS_15_16_INTERRUPTION_END="ios15_16-interruption-end",e.IOS_INTERRUPTION_START="ios-interruption-start",e.IOS_INTERRUPTION_END="ios-interruption-end",e.STATE_CHANGE="state-change"}(dT||(dT={}));const yT={"90p":vT(160,90),"90p_1":vT(160,90),"120p":vT(160,120,15,30,65),"120p_1":vT(160,120,15,30,65),"120p_3":vT(120,120,15,30,50),"120p_4":vT(212,120),"180p":vT(320,180,15,30,140),"180p_1":vT(320,180,15,30,140),"180p_3":vT(180,180,15,30,100),"180p_4":vT(240,180,15,30,120),"240p":vT(320,240,15,40,200),"240p_1":vT(320,240,15,40,200),"240p_3":vT(240,240,15,40,140),"240p_4":vT(424,240,15,40,220),"360p":vT(640,360,15,80,400),"360p_1":vT(640,360,15,80,400),"360p_3":vT(360,360,15,80,260),"360p_4":vT(640,360,30,80,600),"360p_6":vT(360,360,30,80,400),"360p_7":vT(480,360,15,80,320),"360p_8":vT(480,360,30,80,490),"360p_9":vT(640,360,15,80,800),"360p_10":vT(640,360,24,80,800),"360p_11":vT(640,360,24,80,1e3),"480p":vT(640,480,15,100,500),"480p_1":vT(640,480,15,100,500),"480p_2":vT(640,480,30,100,1e3),"480p_3":vT(480,480,15,100,400),"480p_4":vT(640,480,30,100,750),"480p_6":vT(480,480,30,100,600),"480p_8":vT(848,480,15,100,610),"480p_9":vT(848,480,30,100,930),"480p_10":vT(640,480,10,100,400),"720p":vT(1280,720,15,120,1130),"720p_1":vT(1280,720,15,120,1130),"720p_2":vT(1280,720,30,120,2e3),"720p_3":vT(1280,720,30,120,1710),"720p_5":vT(960,720,15,120,910),"720p_6":vT(960,720,30,120,1380),"1080p":vT(1920,1080,15,120,2080),"1080p_1":vT(1920,1080,15,120,2080),"1080p_2":vT(1920,1080,30,120,3e3),"1080p_3":vT(1920,1080,30,120,3150),"1080p_5":vT(1920,1080,60,120,4780),"1440p":vT(2560,1440,30,120,4850),"1440p_1":vT(2560,1440,30,120,4850),"1440p_2":vT(2560,1440,60,120,7350),"4k":vT(3840,2160,30,120,8910),"4k_1":vT(3840,2160,30,120,8910),"4k_3":vT(3840,2160,60,120,13500)},ET={"480p":bT(640,480,5),"480p_1":bT(640,480,5),"480p_2":bT(640,480,30),"480p_3":bT(640,480,15),"720p":bT(1280,720,5),"720p_1":bT(1280,720,5),"720p_2":bT(1280,720,30),"720p_3":bT(1280,720,15),"1080p":bT(1920,1080,5),"1080p_1":bT(1920,1080,5),"1080p_2":bT(1920,1080,30),"1080p_3":bT(1920,1080,15)},CT={"1SL1TL":_T(1,1),"3SL3TL":_T(3,3),"2SL3TL":_T(2,3)};function wT(e){return e||(e="480p_1"),"string"==typeof e?Object.assign({},yT[e]):e}function ST(e){return"string"==typeof e?Object.assign({},ET[e]):e}function TT(e){return"string"==typeof e?Object.assign({},CT[e]):e}const AT={speech_low_quality:mT(16e3,!1),speech_standard:mT(32e3,!1,18),music_standard:mT(48e3,!1),standard_stereo:mT(48e3,!0,56),high_quality:mT(48e3,!1,128),high_quality_stereo:mT(48e3,!0,192)};function RT(e){return"string"==typeof e?Object.assign({},AT[e]):e}const OT=[];function IT(e){return jb(e,"mediaSource",["screen","window","application"]),!0}var kT,NT,LT,MT,xT,DT,PT,UT,BT,FT;!function(e){e.NEED_RENEGOTIATE="@need_renegotiate",e.NEED_REPLACE_TRACK="@need_replace_track",e.NEED_CLOSE="@need_close",e.NEED_ENABLE_TRACK="@need_enable_track",e.NEED_DISABLE_TRACK="@need_disable_track",e.NEED_SESSION_ID="@need_sid",e.SET_OPTIMIZATION_MODE="@set_optimization_mode",e.GET_STATS="@get_stats",e.GET_LOW_VIDEO_TRACK="@get_low_video_track",e.NEED_RESET_REMOTE_SDP="@need_reset_remote_sdp",e.NEED_UPDATE_VIDEO_ENCODER="@need_update_video_encoder",e.NEED_MUTE_TRACK="@need_mute_track",e.NEED_UNMUTE_TRACK="@need_unmute_track"}(kT||(kT={})),function(e){e.SCREEN_TRACK="screen_track",e.CUSTOM_TRACK="custome_track",e.LOW_STREAM="low_stream"}(NT||(NT={})),function(e){e[e.HIGH_STREAM=0]="HIGH_STREAM",e[e.LOW_STREAM=1]="LOW_STREAM"}(LT||(LT={})),function(e){e[e.HIGH_STREAM=0]="HIGH_STREAM",e[e.LOW_STREAM=1]="LOW_STREAM"}(MT||(MT={})),function(e){e[e.DISABLE=0]="DISABLE",e[e.LOW_STREAM=1]="LOW_STREAM",e[e.AUDIO_ONLY=2]="AUDIO_ONLY"}(xT||(xT={})),function(e){e.TRANSCEIVER_UPDATED="transceiver-updated"}(DT||(DT={})),function(e){e.SOURCE_STATE_CHANGE="source-state-change",e.TRACK_ENDED="track-ended",e.BEAUTY_EFFECT_OVERLOAD="beauty-effect-overload",e.VIDEO_ELEMENT_VISIBLE_STATUS="video-element-visible-status",e.CLOSED="closed"}(PT||(PT={})),function(e){e.FIRST_FRAME_DECODED="first-frame-decoded",e.VIDEO_ELEMENT_VISIBLE_STATUS="video-element-visible-status"}(UT||(UT={})),function(e){e.AUDIO_SOURCE_STATE_CHANGE="audio_source_state_change",e.RECEIVE_TRACK_BUFFER="receive_track_buffer",e.ON_AUDIO_BUFFER="on_audio_buffer",e.UPDATE_SOURCE="update_source"}(BT||(BT={})),function(e){e.UPDATE_TRACK_SOURCE="update-track-source"}(FT||(FT={}));const VT={sendVolumeLevel:0,sendBitrate:0,sendBytes:0,sendPackets:0,sendPacketsLost:0,sendJitterMs:0,sendRttMs:0,currentPacketLossRate:0},jT={sendBytes:0,sendBitrate:0,sendPackets:0,sendPacketsLost:0,sendJitterMs:0,sendRttMs:0,sendResolutionHeight:0,sendResolutionWidth:0,captureResolutionHeight:0,captureResolutionWidth:0,targetSendBitrate:0,totalDuration:0,totalFreezeTime:0,currentPacketLossRate:0},HT={transportDelay:0,end2EndDelay:0,receiveBitrate:0,receiveLevel:0,receiveBytes:0,receiveDelay:0,receivePackets:0,receivePacketsLost:0,totalDuration:0,totalFreezeTime:0,freezeRate:0,packetLossRate:0,currentPacketLossRate:0,publishDuration:-1},$T={uplinkNetworkQuality:0,downlinkNetworkQuality:0},zT={transportDelay:0,end2EndDelay:0,receiveBitrate:0,receiveBytes:0,receiveDelay:0,receivePackets:0,receivePacketsLost:0,receiveResolutionHeight:0,receiveResolutionWidth:0,totalDuration:0,totalFreezeTime:0,freezeRate:0,packetLossRate:0,currentPacketLossRate:0,publishDuration:-1};var WT,KT,GT,qT,YT;!function(e){e.ON_TRACK="on_track",e.ON_NODE="on_node"}(WT||(WT={})),function(e){e.REQUEST_UPDATE_CONSTRAINTS="request_update_constraints",e.REQUEST_CONSTRAINTS="request_constraints"}(KT||(KT={})),function(e){e.IDLE="IDLE",e.INITING="INITING",e.INITEND="INITEND"}(GT||(GT={})),function(e){e.STATE_CHANGE="state_change",e.RECORDING_DEVICE_CHANGED="recordingDeviceChanged",e.PLAYOUT_DEVICE_CHANGED="playoutDeviceChanged",e.CAMERA_DEVICE_CHANGED="cameraDeviceChanged"}(qT||(qT={})),function(e){e.NONE="none",e.INIT="init",e.CANPLAY="canplay",e.PLAYING="playing",e.PAUSED="paused",e.SUSPEND="suspend",e.STALLED="stalled",e.WAITING="waiting",e.ERROR="error",e.DESTROYED="destroyed",e.ABORT="abort",e.ENDED="ended",e.EMPTIED="emptied",e.LOADEDDATA="loadeddata"}(YT||(YT={}));const XT={uninit:100,none:110,init:120,loadeddata:130,canplay:200,playing:210,paused:220,suspend:300,stalled:310,waiting:320,error:330,destroyed:340,abort:350,ended:360,emptied:370};var ZT;!function(e){e.OPEN="open",e.MESSAGE="message",e.CLOSE="close",e.CLOSING="closing",e.ERROR="error"}(ZT||(ZT={}));class QT extends r_{constructor(e,t){super(),oh(this,"_ID",void 0),oh(this,"_rtpTransceiver",void 0),oh(this,"_lowRtpTransceiver",void 0),oh(this,"_hints",[]),oh(this,"_isClosed",!1),oh(this,"_originMediaStreamTrack",void 0),oh(this,"_mediaStreamTrack",void 0),oh(this,"_external",{}),this._ID=t||B_(8,"track-"),this._originMediaStreamTrack=e,this._mediaStreamTrack=e,function(e){Di(OT).call(OT,e)||OT.push(e)}(this)}toString(){return this._ID}getTrackId(){return this._ID}getMediaStreamTrack(e){if(!e){const e=nw.reportApiInvoke(null,{name:a_.GET_MEDIA_STREAM_TRACK,options:[],tag:s_.TRACER});this._mediaStreamTrack&&"string"==typeof this._mediaStreamTrack.label?e.onSuccess(this._mediaStreamTrack.label):e.onSuccess("")}return this._mediaStreamTrack}getRTCRtpTransceiver(e){return e===LT.LOW_STREAM?this._lowRtpTransceiver:this._rtpTransceiver}getMediaStreamTrackSettings(){return this.getMediaStreamTrack(!0).getSettings()}close(){this._isClosed=!0,this._lowRtpTransceiver=void 0,this._rtpTransceiver=void 0,function(e){const t=OT.indexOf(e);-1!==t&&OT.splice(t,1)}(this),this.emit(PT.CLOSED)}_updateRtpTransceiver(e,t){if(t===LT.LOW_STREAM){if(this._lowRtpTransceiver===e)return;this._lowRtpTransceiver=e}else{if(this._rtpTransceiver===e)return;this._rtpTransceiver=e}this.emit(DT.TRANSCEIVER_UPDATED,e,t)}}class JT extends QT{get isExternalTrack(){return this._isExternalTrack}get muted(){return this._muted}get enabled(){return this._enabled}get processorContext(){return this._processorContext}set processorContext(e){this._processorContext=e}constructor(e,t){super(e,t),oh(this,"_enabled",!0),oh(this,"_muted",!1),oh(this,"_isExternalTrack",!1),oh(this,"_isClosed",!1),oh(this,"_enabledMutex",void 0),oh(this,"processor",void 0),oh(this,"_handleTrackEnded",(()=>{this.onTrackEnded()})),this._enabledMutex=new G_("".concat(this.getTrackId())),e.addEventListener("ended",this._handleTrackEnded)}getTrackLabel(){var e,t;return null!==(e=null===(t=this._originMediaStreamTrack)||void 0===t?void 0:t.label)&&void 0!==e?e:""}close(){this._isClosed||(this.stop(),this._originMediaStreamTrack.stop(),this._mediaStreamTrack!==this._originMediaStreamTrack&&(this._mediaStreamTrack.stop(),this._mediaStreamTrack=null),this._originMediaStreamTrack=null,this._enabledMutex=null,$C.debug("[".concat(this.getTrackId(),"] close")),this.emit(kT.NEED_CLOSE),super.close())}async _updateOriginMediaStreamTrack(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];this._isExternalTrack=i,e!==this._originMediaStreamTrack&&(this._originMediaStreamTrack&&(this._originMediaStreamTrack.removeEventListener("ended",this._handleTrackEnded),t&&this._originMediaStreamTrack.stop()),e.addEventListener("ended",this._handleTrackEnded),this._originMediaStreamTrack=e,this._muted&&(this._originMediaStreamTrack.enabled=!1),this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource(),await __(this,kT.NEED_REPLACE_TRACK,this),this.processor&&this.processor.updateInput({track:this._originMediaStreamTrack,context:this.processorContext}))}_getDefaultPlayerConfig(){return{}}onTrackEnded(){$C.debug("[".concat(this.getTrackId(),"] track ended")),this.safeEmit(PT.TRACK_ENDED)}stateCheck(e,t){if($C.debug("check track state, [muted: ".concat(this._muted,", enabled: ").concat(this._enabled,"] to [").concat(e,": ").concat(t,"]")),Vb(t,e),this._enabled&&this._muted&&"enabled"===e&&!1===t)throw new Fb(Bb.TRACK_STATE_UNREACHABLE,"cannot set enabled while the track is muted").print("error",$C);if(!this._enabled&&!this._muted&&"muted"===e&&!0===t)throw new Fb(Bb.TRACK_STATE_UNREACHABLE,"cannot set muted while the track is disabled").print("error",$C)}getProcessorStats(){return this.processorContext.gatherStats()}getProcessorUsage(){return this.processorContext.gatherUsage()}}function eA(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const tA=window.AudioContext||window.webkitAudioContext;let nA=null;const rA=new class extends r_{constructor(){super(...arguments),oh(this,"prevState",void 0),oh(this,"curState",void 0),oh(this,"currentTime",void 0),oh(this,"currentTimeStuckAt",void 0),oh(this,"interruptDetectorTrack",void 0),oh(this,"onLocalAudioTrackMute",(()=>{$C.info("ios15-interruption-start"),this.emit(dT.IOS_15_16_INTERRUPTION_START)})),oh(this,"onLocalAudioTrackUnmute",(async()=>{$C.info("ios15-interruption-end"),"running"!==this.curState||this.duringInterruption?$C.info("ios15-interruption-end-canceled"):(nA&&await nA.suspend(),this.emit(dT.IOS_15_16_INTERRUPTION_END))}))}get duringInterruption(){return"running"===this.prevState&&"interrupted"===this.curState}bindInterruptDetectorTrack(e){$C.debug("webaudio bindInterruptDetectorTrack ".concat(e.getTrackId())),this.interruptDetectorTrack||(this.interruptDetectorTrack=e,this.interruptDetectorTrack._mediaStreamTrack.onmute=this.onLocalAudioTrackMute,this.interruptDetectorTrack._mediaStreamTrack.onunmute=this.onLocalAudioTrackUnmute)}unbindInterruptDetectorTrack(e){$C.debug("webaudio unbindInterruptDetectorTrack ".concat(e.getTrackId())),this.interruptDetectorTrack&&this.interruptDetectorTrack===e&&(this.interruptDetectorTrack._mediaStreamTrack&&(this.interruptDetectorTrack._mediaStreamTrack.onmute=null,this.interruptDetectorTrack._mediaStreamTrack.onunmute=null),this.interruptDetectorTrack=void 0)}};function iA(){if(!tA)return void $C.error("your browser is not support web audio");$C.info("create audio context");const e=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?eA(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):eA(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},xC("WEBAUDIO_INIT_OPTIONS"));$C.debug("audio context init option:",JSON.stringify(e)),nA=new tA(e),rA.curState=nA.state,nA.onstatechange=()=>{rA.prevState=rA.curState,rA.curState=nA?nA.state:void 0;const{prevState:e,curState:t}=rA,i="running"===t,n="interrupted"===t,r="running"===e,s="suspended"===e,o="interrupted"===e,a=pb().osVersion;(wb()||Lb())&&r&&n&&($C.info("ios".concat(a,"-interruption-start")),rA.emit(dT.IOS_INTERRUPTION_START)),(wb()||Lb())&&(s||o)&&i&&($C.info("ios".concat(a,"-interruption-end")),rA.emit(dT.IOS_INTERRUPTION_END)),e!==t&&($C.debug("AudioContext State Change","".concat(e,"=>").concat(t)),rA.emit(dT.STATE_CHANGE))},setInterval((()=>{var e;const t=null===(e=nA)||void 0===e?void 0:e.currentTime;rA.currentTime!==t?(rA.currentTimeStuckAt&&($C.debug("AudioContext current time resume at ".concat(t)),rA.currentTimeStuckAt=void 0),rA.currentTime=t):(t!==rA.currentTimeStuckAt&&(nw.reportApiInvoke(null,{name:"WEB_AUDIO_CURRENT_TIME_STUCK",options:{currentTime:t},tag:s_.TRACER}).onSuccess(),$C.warning("AudioContext current time stuck at ".concat(t))),rA.currentTimeStuckAt=t)}),5e3),async function(e){const t=["click","contextmenu","auxclick","dblclick","mousedown","mouseup","touchend","keydown","keyup"];let i,n=!1,r=!1,s=!1;function o(t){"running"===e.state?a(!1):wb()||Lb()?"suspended"===e.state&&(a(!0),t&&e.resume().then(l,l)):"closed"!==e.state&&(a(!0),t&&e.resume().then(l,l))}function a(e){if(n!==e){n=e;for(let i=0,n=t;i<n.length;i+=1){const t=n[i];e?window.addEventListener(t,d,{capture:!0,passive:!0}):window.removeEventListener(t,d,{capture:!0,passive:!0})}}}function c(){o(!0)}function l(){o(!1)}function d(){o(!0)}function h(e){if(!s)if(i.paused)if(e){let t;u(!1),s=!0;try{t=i.play(),t?t.then(p,p):(i.addEventListener("playing",p),i.addEventListener("abort",p),i.addEventListener("error",p))}catch(e){p()}}else u(!0);else u(!1)}function u(e){if(r!==e){r=e;for(let i=0,n=t;i<n.length;i++){const t=n[i];e?window.addEventListener(t,f,{capture:!0,passive:!0}):window.removeEventListener(t,f,{capture:!0,passive:!0})}}}function p(){i.removeEventListener("playing",p),i.removeEventListener("abort",p),i.removeEventListener("error",p),s=!1,h(!1)}function f(){h(!0)}if(wb()){const t=e.createMediaStreamDestination(),n=document.createElement("div");n.innerHTML="<audio x-webkit-airplay='deny'></audio>",i=n.children.item(0),i.controls=!1,i.disableRemotePlayback=!0,i.preload="auto",i.srcObject=t.stream,h(!0)}rA.on(dT.STATE_CHANGE,c),o(!1)}(nA)}function oA(){if(!nA){if(iA(),!nA)throw new Fb(Bb.NOT_SUPPORTED,"can not create audio context");return nA}return nA}function aA(){return!!nA}function sA(e){if(function(){if(null!==cA)return cA;const e=oA(),t=e.createBufferSource(),i=e.createGain(),n=e.createGain();t.connect(i),t.connect(n),t.disconnect(i);let r=!1;try{t.disconnect(i)}catch(e){r=!0}return t.disconnect(),cA=r,r}())return;const t=e.connect,i=e.disconnect;e.connect=(i,n,r)=>{var s;return e._inputNodes||(e._inputNodes=[]),Di(s=e._inputNodes).call(s,i)||(i instanceof AudioNode?(e._inputNodes.push(i),t.call(e,i,n,r)):t.call(e,i,n)),e},e.disconnect=(n,r,s)=>{i.call(e),n?T_(e._inputNodes,n):e._inputNodes=[];for(const i of e._inputNodes)t.call(e,i)}}let cA=null;function lA(e,t){let i=!1;const n=1/t;if(xC("DISABLE_WEBAUDIO")){const t=window.setInterval((()=>{i?window.clearInterval(t):e(performance.now()/1e3)}),1e3*n)}else{const t=oA();let r=t.createGain();r.gain.value=0,r.connect(t.destination);const s=()=>{if(i)return void(r=null);const o=t.createOscillator();o.onended=s,o.connect(r),o.start(0),o.stop(t.currentTime+n),e(t.currentTime)};s()}return()=>{i=!0}}const dA={getDisplayMedia:!1,getStreamFromExtension:!1,supportUnifiedPlan:!1,supportMinBitrate:!1,supportSetRtpSenderParameters:!1,supportDualStream:!0,webAudioMediaStreamDest:!1,supportReplaceTrack:!1,supportWebGL:!1,webAudioWithAEC:!1,supportRequestFrame:!1,supportShareAudio:!1,supportDualStreamEncoding:!1,supportDataChannel:!1,supportPCSetConfiguration:!1,supportWebRTCEncodedTransform:!1,supportWebRTCInsertableStream:!1};function uA(){return dA}class hA{constructor(){oh(this,"context",void 0),oh(this,"analyserNode",void 0),oh(this,"sourceNode",void 0),this.context=oA(),this.analyserNode=this.context.createAnalyser(),this.analyserNode.fftSize=2048,this.analyserNode.smoothingTimeConstant=.4}updateSource(e){if(e!==this.sourceNode){if(this.sourceNode)try{this.sourceNode.disconnect(this.analyserNode)}catch(e){}this.sourceNode=e,null==e||e.connect(this.analyserNode)}}getVolumeLevel(){if(!this.sourceNode)return 0;if(!this.context||wb()||Lb()||"running"!==this.context.state&&this.context.resume(),!this.analyserNode)return 0;const e=new Float32Array(this.analyserNode.fftSize);if(this.analyserNode.getFloatTimeDomainData)this.analyserNode.getFloatTimeDomainData(e);else{const t=new Uint8Array(this.analyserNode.fftSize);this.analyserNode.getByteTimeDomainData(t);for(let i=0;i<e.length;++i)e[i]=t[i]/128-1}const t=ly(e).call(e,((e,t)=>e+t*t),0)/e.length;return Math.max(10*Math.log10(t)+100,0)/100}getAnalyserNode(){return this.analyserNode}rebuildAnalyser(){try{var e,t;null===(e=this.sourceNode)||void 0===e||e.disconnect(this.analyserNode),this.analyserNode=this.context.createAnalyser(),this.analyserNode.fftSize=2048,this.analyserNode.smoothingTimeConstant=.4,null===(t=this.sourceNode)||void 0===t||t.connect(this.analyserNode)}catch(e){$C.warning("rebuild analyser node failed.")}}destroy(){this.updateSource(void 0)}}class fA extends r_{get processSourceNode(){return this.sourceNode}set processedNode(e){var t;if(!this.isDestroyed&&this._processedNode!==e){try{var i;null===(i=this.sourceNode)||void 0===i||i.disconnect(this.outputNode)}catch(e){}null===(t=this._processedNode)||void 0===t||t.disconnect(),this._processedNode=e,this.connect()}}get processedNode(){return this._processedNode}constructor(){super(),oh(this,"outputNode",void 0),oh(this,"outputTrack",void 0),oh(this,"isPlayed",!1),oh(this,"context",void 0),oh(this,"audioBufferNode",void 0),oh(this,"destNode",void 0),oh(this,"audioOutputLevel",0),oh(this,"volumeLevelAnalyser",void 0),oh(this,"_processedNode",void 0),oh(this,"playNode",void 0),oh(this,"isDestroyed",!1),oh(this,"onNoAudioInput",void 0),oh(this,"isNoAudioInput",!1),oh(this,"_noAudioInputCount",0),this.context=oA(),this.playNode=this.context.destination,this.outputNode=this.context.createGain(),sA(this.outputNode),this.volumeLevelAnalyser=new hA}startGetAudioBuffer(e){this.audioBufferNode||(this.audioBufferNode=this.context.createScriptProcessor(e),this.outputNode.connect(this.audioBufferNode),this.audioBufferNode.connect(this.context.destination),this.audioBufferNode.onaudioprocess=e=>{this.emit(BT.ON_AUDIO_BUFFER,function(e){for(let t=0;t<e.outputBuffer.numberOfChannels;t+=1){const i=e.outputBuffer.getChannelData(t);for(let e=0;e<i.length;e+=1)i[e]=0}return e.inputBuffer}(e))})}stopGetAudioBuffer(){this.audioBufferNode&&(this.audioBufferNode.onaudioprocess=null,this.outputNode.disconnect(this.audioBufferNode),this.audioBufferNode=void 0)}createOutputTrack(){if(!uA().webAudioMediaStreamDest)throw new Fb(Bb.NOT_SUPPORTED,"your browser is not support audio processor");return this.destNode&&this.outputTrack||(this.destNode=this.context.createMediaStreamDestination(),this.outputNode.connect(this.destNode),this.outputTrack=this.destNode.stream.getAudioTracks()[0]),this.outputTrack}play(e){"running"!==this.context.state&&R_((()=>{rA.emit("autoplay-failed")})),this.isPlayed=!0,this.playNode=e||this.context.destination,this.outputNode.connect(this.playNode)}stop(){if(this.isPlayed)try{this.outputNode.disconnect(this.playNode)}catch(e){}this.isPlayed=!1}getAccurateVolumeLevel(){return this.volumeLevelAnalyser.getVolumeLevel()}async checkHasAudioInput(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(e>5)return this.isNoAudioInput=!0,this.onNoAudioInput&&this.onNoAudioInput(),!1;wb()||Lb()?"suspended"===this.context.state&&this.context.resume():"running"!==this.context.state&&this.context.resume();const t=this.volumeLevelAnalyser.getAnalyserNode();let i;t.getFloatTimeDomainData?(i=new Float32Array(t.fftSize),t.getFloatTimeDomainData(i)):(i=new Uint8Array(t.fftSize),t.getByteTimeDomainData(i));let n=!1;for(let e=0;e<i.length;e++)0!==i[e]&&(n=!0);return n?(this.isNoAudioInput=!1,!0):(await U_(200),await this.checkHasAudioInput(e?e+1:1)&&n)}getAudioVolume(){return this.outputNode.gain.value}setVolume(e){this.outputNode.gain.setValueAtTime(e,this.context.currentTime)}destroy(){this.disconnect(),this.stop(),this.isDestroyed=!0,this.onNoAudioInput=void 0}disconnect(){var e,t;null===(e=this.processedNode)||void 0===e||e.disconnect(),null===(t=this.sourceNode)||void 0===t||t.disconnect(),this.outputNode&&this.outputNode.disconnect()}connect(){var e;this.processedNode?null===(e=this.processedNode)||void 0===e||e.connect(this.outputNode):this.sourceNode&&this.sourceNode.connect(this.outputNode),this.volumeLevelAnalyser.updateSource(this.outputNode)}}class pA extends fA{get isFreeze(){return!1}constructor(e,t,i){var n;if(super(),oh(this,"sourceNode",void 0),oh(this,"track",void 0),oh(this,"clonedTrack",void 0),oh(this,"audioElement",void 0),oh(this,"isCurrentTrackCloned",!1),oh(this,"isRemoteTrack",!1),oh(this,"originVolumeLevelAnalyser",void 0),oh(this,"rebuildWebAudio",(async()=>{if($C.debug("ready to rebuild web audio, state:",this.context.state),this.isNoAudioInput&&await this.checkHasAudioInput(),!this.isNoAudioInput||this.isDestroyed)return document.body.removeEventListener("click",this.rebuildWebAudio,!0),void $C.debug("rebuild web audio success, current volume status",this.getAccurateVolumeLevel());this.context.resume().then((()=>$C.info("resume success"))),$C.debug("rebuild web audio because of ios 12 bugs"),this.disconnect();const e=this.track;this.track=this.track.clone(),this.isCurrentTrackCloned?e.stop():this.isCurrentTrackCloned=!0;const t=new MediaStream([this.track]);this.sourceNode=this.context.createMediaStreamSource(t),sA(this.sourceNode),this.volumeLevelAnalyser.rebuildAnalyser();const i=this.outputNode.gain.value;this.outputNode=this.context.createGain(),this.outputNode.gain.setValueAtTime(i,this.context.currentTime),sA(this.outputNode),this.emit(BT.UPDATE_SOURCE),this.connect(),this.audioElement.srcObject=t,this.isPlayed&&this.play(this.playNode),this.checkHasAudioInput()})),"audio"!==e.kind)throw new Fb(Bb.UNEXPECTED_ERROR);this.track=e;const r=new MediaStream([this.track]);if(this.isRemoteTrack=!!t,this.sourceNode=this.context.createMediaStreamSource(r),sA(this.sourceNode),i){const e=i.clone();e.enabled=!0,this.clonedTrack=e,$C.debug("create an unmuted track ".concat(e.id," from the original track ").concat(i.id," to get the volume"));const t=this.context.createMediaStreamSource(new MediaStream([e]));sA(t),this.originVolumeLevelAnalyser=new hA,this.originVolumeLevelAnalyser.updateSource(t)}this.connect(),this.audioElement=document.createElement("audio"),this.audioElement.srcObject=r;const s=pb();t&&s.os===cb.IOS&&Number(null===(n=s.osVersion)||void 0===n?void 0:n.split(".")[0])<15&&(rA.on(dT.STATE_CHANGE,(()=>{"suspended"===this.context.state?document.body.addEventListener("click",this.rebuildWebAudio,!0):"running"===this.context.state&&this.rebuildWebAudio()})),this.checkHasAudioInput().then((e=>{e||document.body.addEventListener("click",this.rebuildWebAudio,!0)})))}updateTrack(e){this.sourceNode.disconnect(),this.track=e,this.isCurrentTrackCloned=!1;const t=new MediaStream([e]);this.sourceNode=this.context.createMediaStreamSource(t),sA(this.sourceNode),this.processedNode||this.sourceNode.connect(this.outputNode),this.emit(BT.UPDATE_SOURCE),this.audioElement.srcObject=t}destroy(){var e;this.audioElement.srcObject=null,this.audioElement.remove(),rA.off("state-change",this.rebuildWebAudio),null===(e=this.originVolumeLevelAnalyser)||void 0===e||e.destroy(),this.clonedTrack=void 0,super.destroy()}createMediaStreamSourceNode(e){return this.context.createMediaStreamSource(new MediaStream([e]))}updateOriginTrack(e){const t=e.clone();t.enabled=!0,this.clonedTrack&&(this.clonedTrack.stop(),this.clonedTrack=t),$C.debug("create an unmuted track ".concat(t.id," from the original track ").concat(e.id," to get the volume"));const i=this.context.createMediaStreamSource(new MediaStream([t]));sA(i),this.originVolumeLevelAnalyser&&this.originVolumeLevelAnalyser.updateSource(i)}getOriginVolumeLevel(){return this.originVolumeLevelAnalyser?this.originVolumeLevelAnalyser.getVolumeLevel():this.getAccurateVolumeLevel()}}async function gA(e,t,i){const n=(e,t)=>e?"number"!=typeof e?e.max||e.exact||e.ideal||e.min||t:e:t,r={audio:!!i&&{mandatory:{chromeMediaSource:"desktop"}},video:{mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:e,maxHeight:n(t.height,1080),maxWidth:n(t.width,1920)}}};return t.frameRate&&"number"!=typeof t.frameRate?(r.video.mandatory.maxFrameRate=t.frameRate.max,r.video.mandatory.minFrameRate=t.frameRate.min):"number"==typeof t.frameRate&&(r.video.mandatory.maxFrameRate=t.frameRate),await navigator.mediaDevices.getUserMedia(r)}async function mA(e,t){const i=await vA(e.mediaSource),{sourceId:n,audio:r}=await function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return new nb(((i,n)=>{const r=document.createElement("div");r.innerText="share screen",r.setAttribute("style","text-align: center; height: 25px; line-height: 25px; border-radius: 4px 4px 0 0; background: #D4D2D4; border-bottom:  solid 1px #B9B8B9;");const s=document.createElement("div");s.setAttribute("style","width: 100%; height: 500px; padding: 15px 25px ; box-sizing: border-box;");const o=document.createElement("div");o.innerText="Agora Web Screensharing wants to share the contents of your screen with webdemo.agorabeckon.com. Choose what you'd like to share.",o.setAttribute("style","height: 12%;");const a=document.createElement("div");a.setAttribute("style","width: 100%; height: 80%; background: #FFF; border:  solid 1px #CBCBCB; display: flex; flex-wrap: wrap; justify-content: space-around; overflow-y: scroll; padding: 0 15px; box-sizing: border-box;");const c=document.createElement("div");c.setAttribute("style","display: flex; justify-content: space-between; padding: 16px 0;");const l=document.createElement("button");l.innerHTML="cancel",l.setAttribute("style","width: 85px;"),l.onclick=()=>{document.body.removeChild(u);const e=new Error("NotAllowedError");e.name="NotAllowedError",n(e)};let d=t;const h=document.createElement("div");if(t){const e=document.createElement("input");e.setAttribute("type","checkbox");const t=document.createElement("span");e.setAttribute("style","margin-right: 6px;"),t.innerText="Share audio",e.checked=d,e.onchange=()=>{d=e.checked},h.appendChild(e),h.appendChild(t)}c.appendChild(h),c.appendChild(l),s.appendChild(o),s.appendChild(a),s.appendChild(c);const u=document.createElement("div");u.setAttribute("style","position: fixed; z-index: 99999999; top: 50%; left: 50%; width: 620px; height: 525px; background: #ECECEC; border-radius: 4px; -webkit-transform: translate(-50%,-50%); transform: translate(-50%,-50%);"),u.appendChild(r),u.appendChild(s),document.body.appendChild(u),e.map((e=>{if(e.id){const t=document.createElement("div");t.setAttribute("style","width: 30%; height: 160px; padding: 20px 0; text-align: center;box-sizing: content-box;");let n=e.thumbnail;try{const{width:e}=n.getSize();e>1920&&(n=n.resize({width:1920}))}catch(e){throw e&&e.message.startsWith("Illegal invocation")&&console.error("Operate thumbnail error, please try to set contextIsolation: false. (https://github.com/electron/electron/issues/34953)"),e}t.innerHTML='<div style="height: 120px; display: table-cell; vertical-align: middle;"><img style="width: 100%; background: #333333; box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.2);" src='+n.toDataURL()+' /></div><span style="\theight: 40px; line-height: 40px; display: inline-block; width: 70%; word-break: keep-all; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;">'+e.name.replace(/[\u00A0-\u9999<>\&]/g,(function(e){return"&#"+e.charCodeAt(0)+";"}))+"</span>",t.onclick=()=>{document.body.removeChild(u),i({sourceId:e.id,audio:d})},a.appendChild(t)}}))}))}(i,t);return await gA(n,e,r)}async function vA(e){let t=["window","screen"];"application"!==e&&"window"!==e||(t=["window"]),"screen"===e&&(t=["screen"]);const i=o_();if(!i)throw console.error("failed to fetch electron, please mount it to window"),new Fb(Bb.ELECTRON_IS_NULL);let n=null;try{var r;n=(null===(r=i.desktopCapturer)||void 0===r?void 0:r.getSources({types:t}))||i.ipcRenderer.invoke("DESKTOP_CAPTURER_GET_SOURCES",{types:t})}catch(e){n=null}n&&n.then||(n=new nb(((e,n)=>{i.desktopCapturer.getSources({types:t},((t,i)=>{t?n(t):e(i)}))})));try{return await n}catch(e){throw new Fb(Bb.ELECTRON_DESKTOP_CAPTURER_GET_SOURCES_ERROR,e.toString())}}function bA(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const _A=new G_("safari");let yA=!1,EA=!1;async function CA(e,t){let i=0,n=null;for(;i<2;)try{n=await wA(e,t,i>0);break}catch(e){if(e instanceof Fb)throw $C.error("[".concat(t,"] ").concat(e.toString())),e;const n=SA(e.name||e.code||e,e.message);if(n.code===Bb.MEDIA_OPTION_INVALID){$C.debug("[".concat(t,"] detect media option invalid, retry")),i+=1,await U_(500);continue}throw $C.error("[".concat(t,"] ").concat(n.toString())),n}if(!n)throw new Fb(Bb.UNEXPECTED_ERROR,"can not find stream after getUserMedia");return n}async function wA(e,t,i){if(!navigator.mediaDevices||!navigator.mediaDevices.getUserMedia)throw new Fb(Bb.NOT_SUPPORTED,"can not find getUserMedia");i&&(e.video&&(delete e.video.width,delete e.video.height),e.screen&&(delete e.screen.width,delete e.screen.height));const n=uA(),r=new MediaStream;if(e.audioSource&&r.addTrack(e.audioSource),e.videoSource&&r.addTrack(e.videoSource),!e.audio&&!e.video&&!e.screen)return $C.debug("Using Video Source/ Audio Source"),r;if(e.screen)if(o_())e.screen.sourceId?TA(r,await gA(e.screen.sourceId,e.screen,e.screenAudio)):TA(r,await mA(e.screen,e.screenAudio));else if(yb()&&e.screen.extensionId&&e.screen.mandatory){if(!n.getStreamFromExtension)throw new Fb(Bb.NOT_SUPPORTED,"This browser does not support screen sharing");$C.debug("[".concat(t,'] Screen access on chrome stable, looking for extension"'));const i=await(o=e.screen.extensionId,a=t,new nb(((e,t)=>{try{chrome.runtime.sendMessage(o,{getStream:!0},(i=>{if(!i||!i.streamId)return $C.error("[".concat(a,"] No response from Chrome Plugin. Plugin not installed properly"),i),void t(new Fb(Bb.CHROME_PLUGIN_NO_RESPONSE,"No response from Chrome Plugin. Plugin not installed properly"));e(i.streamId)}))}catch(e){$C.error("[".concat(a,"] AgoraRTC screensharing plugin is not accessible(").concat(o,")"),e.toString()),t(new Fb(Bb.CHROME_PLUGIN_NOT_INSTALL))}})));e.screen.mandatory.chromeMediaSourceId=i,TA(r,await navigator.mediaDevices.getUserMedia({video:{mandatory:e.screen.mandatory}}))}else if(n.getDisplayMedia){var s;e.screen.mediaSource&&IT(e.screen.mediaSource);const i={width:e.screen.width,height:e.screen.height,frameRate:e.screen.frameRate,displaySurface:null!==(s=e.screen.displaySurface)&&void 0!==s?s:"screen"===e.screen.mediaSource?"monitor":e.screen.mediaSource},{selfBrowserSurface:n,surfaceSwitching:o,systemAudio:a}=e.screen,c={selfBrowserSurface:n,surfaceSwitching:o,systemAudio:a};!n&&delete c.selfBrowserSurface,!o&&delete c.surfaceSwitching,!a&&delete c.systemAudio,$C.debug("[".concat(t,"] getDisplayMedia:"),JSON.stringify({video:i,audio:!!e.screenAudio,controls:c})),TA(r,await navigator.mediaDevices.getDisplayMedia(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?bA(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):bA(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({video:i,audio:!!e.screenAudio},c)))}else{if(!Cb())throw $C.error("[".concat(t,"] This browser does not support screenSharing")),new Fb(Bb.NOT_SUPPORTED,"This browser does not support screen sharing");{e.screen.mediaSource&&IT(e.screen.mediaSource);const i={video:{mediaSource:e.screen.mediaSource,width:e.screen.width,height:e.screen.height,frameRate:e.screen.frameRate}};$C.debug("[".concat(t,"] getUserMedia: ").concat(JSON.stringify(i))),TA(r,await navigator.mediaDevices.getUserMedia(i))}}var o,a;if(!e.video&&!e.audio)return r;let c={video:e.video,audio:e.audio},l=xC("MEDIA_DEVICE_CONSTRAINTS");if(l)try{"string"==typeof l&&(l=JSON.parse(l)),c=z_(c,l)}catch(e){}$C.debug("[".concat(t,"] GetUserMedia"),JSON.stringify(c)),pb();let d,h=null;(Eb()||wb()||vb())&&(h=await _A.lock());try{d=await navigator.mediaDevices.getUserMedia(c)}catch(e){throw h&&h(),e}return c.audio&&(yA=!0),c.video&&(EA=!0),TA(r,d),h&&h(),r}function SA(e,t){switch(e){case"Starting video failed":case"OverconstrainedError":case"TrackStartError":return new Fb(Bb.MEDIA_OPTION_INVALID,"".concat(e,": ").concat(t));case"NotFoundError":case"DevicesNotFoundError":return new Fb(Bb.DEVICE_NOT_FOUND,"".concat(e,": ").concat(t));case"NotSupportedError":return new Fb(Bb.NOT_SUPPORTED,"".concat(e,": ").concat(t));case"NotReadableError":return new Fb(Bb.NOT_READABLE,"".concat(e,": ").concat(t));case"InvalidStateError":case"NotAllowedError":case"PERMISSION_DENIED":case"PermissionDeniedError":return new Fb(Bb.PERMISSION_DENIED,"".concat(e,": ").concat(t));case"ConstraintNotSatisfiedError":return new Fb(Bb.CONSTRAINT_NOT_SATISFIED,"".concat(e,": ").concat(t));default:return $C.error("getUserMedia unexpected error",e),new Fb(Bb.UNEXPECTED_ERROR,"".concat(e,": ").concat(t))}}function TA(e,t){const i=e.getVideoTracks()[0],n=e.getAudioTracks()[0],r=t.getVideoTracks()[0],s=t.getAudioTracks()[0];s&&(n&&e.removeTrack(n),e.addTrack(s)),r&&(i&&e.removeTrack(i),e.addTrack(r))}const AA=new class extends r_{get state(){return this._state}set state(e){e!==this._state&&(this.emit(qT.STATE_CHANGE,e),this._state=e)}constructor(){super(),oh(this,"_state",GT.IDLE),oh(this,"isAccessMicrophonePermission",!1),oh(this,"isAccessCameraPermission",!1),oh(this,"lastAccessMicrophonePermission",!1),oh(this,"lastAccessCameraPermission",!1),oh(this,"checkdeviceMatched",!1),oh(this,"deviceInfoMap",new Map),this.init().then((()=>{navigator.mediaDevices.addEventListener&&navigator.mediaDevices.addEventListener("devicechange",this.updateDevicesInfo.bind(this)),window.setInterval((()=>{(xC("ENUMERATE_DEVICES_INTERVAL")||(Pb()||gb()===cb.HARMONY_OS)&&Db())&&this.updateDevicesInfo()}),xC("ENUMERATE_DEVICES_INTERVAL_TIME"))})).catch((e=>$C.error(e.toString())))}async enumerateDevices(e,t){let i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!navigator.mediaDevices||!navigator.mediaDevices.enumerateDevices)return new Fb(Bb.NOT_SUPPORTED,"enumerateDevices() not supported.").throw();const n=await navigator.mediaDevices.enumerateDevices(),r=this.checkMediaDeviceInfoIsOk(n);let s=!this.isAccessMicrophonePermission&&e,o=!this.isAccessCameraPermission&&t;r.audio&&(s=!1),r.video&&(o=!1);let a=null,c=null,l=null;if(!i&&(s||o)){if(_A.isLocked&&($C.debug("[device manager] wait GUM lock"),(await _A.lock())(),$C.debug("[device manager] GUM unlock")),yA&&(s=!1,this.isAccessMicrophonePermission=!0),EA&&(o=!1,this.isAccessCameraPermission=!0),$C.debug("[device manager] check media device permissions",e,t,s,o),s&&o){try{l=await navigator.mediaDevices.getUserMedia({audio:!0,video:!0})}catch(e){const t=SA(e.name||e.code||e,e.message);if(t.code===Bb.PERMISSION_DENIED)throw t;$C.warning("getUserMedia failed in getDevices",t)}this.isAccessCameraPermission=!0,this.isAccessMicrophonePermission=!0}else if(s){try{a=await navigator.mediaDevices.getUserMedia({audio:e})}catch(e){const t=SA(e.name||e.code||e,e.message);if(t.code===Bb.PERMISSION_DENIED)throw t;$C.warning("getUserMedia failed in getDevices",t)}this.isAccessMicrophonePermission=!0}else if(o){try{c=await navigator.mediaDevices.getUserMedia({video:t})}catch(e){const t=SA(e.name||e.code||e,e.message);if(t.code===Bb.PERMISSION_DENIED)throw t;$C.warning("getUserMedia failed in getDevices",t)}this.isAccessCameraPermission=!0}$C.debug("[device manager] mic permission",e,"cam permission",t)}try{const e=await navigator.mediaDevices.enumerateDevices();return a&&a.getTracks().forEach((e=>e.stop())),c&&c.getTracks().forEach((e=>e.stop())),l&&l.getTracks().forEach((e=>e.stop())),a=null,c=null,l=null,e}catch(e){return a&&a.getTracks().forEach((e=>e.stop())),c&&c.getTracks().forEach((e=>e.stop())),l&&l.getTracks().forEach((e=>e.stop())),a=null,c=null,l=null,new Fb(Bb.ENUMERATE_DEVICES_FAILED,e.toString()).throw()}}async getRecordingDevices(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(await this.enumerateDevices(!0,!1,e)).filter((e=>"audioinput"===e.kind))}async getCamerasDevices(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(await this.enumerateDevices(!1,!0,e)).filter((e=>"videoinput"===e.kind))}async getSpeakers(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return(await this.enumerateDevices(!0,!1,e)).filter((e=>"audiooutput"===e.kind))}searchDeviceIdByName(e){let t=null;return this.deviceInfoMap.forEach((i=>{i.device.label===e&&(t=i.device.deviceId)})),t}async getDeviceById(e){const t=(await this.enumerateDevices(!0,!0,!0)).find((t=>t.deviceId===e));if(!t)throw new Fb(Bb.DEVICE_NOT_FOUND,"deviceId: ".concat(e));return t}async init(){this.state=GT.INITING;try{await this.updateDevicesInfo(),this.state=GT.INITEND}catch(e){throw $C.warning("Device Detection functionality cannot start properly.",e.toString()),this.state=GT.IDLE,("boolean"==typeof isSecureContext?isSecureContext:"https:"===location.protocol||"file:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname||"::1"===location.hostname)||new Fb(Bb.WEB_SECURITY_RESTRICT,"Your context is limited by web security, please try using https protocol or localhost.").throw(),e}}async updateDevicesInfo(){const e=await this.enumerateDevices(!0,!0,!0),t=Date.now(),i=[];if(e[0]&&e[0].label&&!1===this.checkdeviceMatched){this.checkdeviceMatched=!0;const t=e.find((e=>"audioinput"===e.kind&&"default"===e.deviceId)),i=e.find((e=>"audiooutput"===e.kind&&"default"===e.deviceId));t&&i?i.groupId===t.groupId?$C.debug("[device-check] default input ".concat(t.label," and output ").concat(i.label," is the same group")):$C.warning("[device-check] default input ".concat(t.label," and output ").concat(i.label," is not the same group")):$C.debug("[device-check] default input or output not found")}const n=this.checkMediaDeviceInfoIsOk(e);if(e.forEach((e=>{if(!e.deviceId)return;const n=this.deviceInfoMap.get("".concat(e.kind,"_").concat(e.deviceId));if("ACTIVE"!==(n?n.state:"INACTIVE")){const n={initAt:t,updateAt:t,device:e,state:"ACTIVE"};this.deviceInfoMap.set("".concat(e.kind,"_").concat(e.deviceId),n),i.push(n)}n&&(n.updateAt=t)})),this.deviceInfoMap.forEach(((e,n)=>{"ACTIVE"===e.state&&e.updateAt!==t&&(e.state="INACTIVE",i.push(e))})),this.state!==GT.INITEND)return n.audio&&(this.lastAccessMicrophonePermission=!0,this.isAccessMicrophonePermission=!0),void(n.video&&(this.lastAccessCameraPermission=!0,this.isAccessCameraPermission=!0));i.forEach((e=>{switch(e.device.kind){case"audioinput":this.lastAccessMicrophonePermission&&this.isAccessMicrophonePermission&&this.emit(qT.RECORDING_DEVICE_CHANGED,e);break;case"videoinput":this.lastAccessCameraPermission&&this.isAccessCameraPermission&&this.emit(qT.CAMERA_DEVICE_CHANGED,e);break;case"audiooutput":this.lastAccessMicrophonePermission&&this.isAccessMicrophonePermission&&this.emit(qT.PLAYOUT_DEVICE_CHANGED,e)}})),n.audio&&(this.lastAccessMicrophonePermission=!0,this.isAccessMicrophonePermission=!0),n.video&&(this.lastAccessCameraPermission=!0,this.isAccessCameraPermission=!0)}checkMediaDeviceInfoIsOk(e){const t=e.filter((e=>"audioinput"===e.kind)),i=e.filter((e=>"videoinput"===e.kind)),n={audio:!1,video:!1};for(const e of t)if(e.label&&e.deviceId){n.audio=!0;break}for(const e of i)if(e.label&&e.deviceId){n.video=!0;break}return n}};let RA=!1;const OA=new class extends r_{constructor(){super(...arguments),oh(this,"onAutoplayFailed",void 0),oh(this,"onAudioAutoplayFailed",void 0)}};function IA(){if(pb(),!RA){const e=t=>{t.preventDefault(),RA=!1,Ub()?document.body.removeEventListener("click",e,!0):(document.body.removeEventListener("touchstart",e,!0),document.body.removeEventListener("mousedown",e,!0))};RA=!0,Ub()?document.body.addEventListener("click",e,!0):(document.body.addEventListener("touchstart",e,!0),document.body.addEventListener("mousedown",e,!0)),$C.info("detect media autoplay failed, document: https://docs.agora.io/cn/Voice/autoplay_policy_web_ng?platform=Web"),OA.onAutoplayFailed?OA.onAutoplayFailed():OA.onAudioAutoplayFailed?$C.warning("AgoraRTC.onAudioAutoplayFailed has been deprecated in favor of AgoraRTC.onAutoplayFailed.\n\n  Please refer to the Agora document to migrate the newer API, https://docs.agora.io/en/Voice/autoplay_policy_web_ng?platform=Web ."):$C.warning("We have detected a media autoplay failed event, and found out that you haven't implemented AgoraRTC.onAutoplayFailed callback yet.\n\n  It will cause audio/video element not playing automatically on some browsers without user interaction, possibly hurting user experiences.\n\n  Please refer to the Agora document to properly handle autoplay failed event, https://docs.agora.io/en/Voice/autoplay_policy_web_ng?platform=Web ."),OA.emit("autoplay-failed")}}function kA(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function NA(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?kA(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):kA(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function LA(e,t,i,n){if(!e)return;const r=nw.getBaseInfoBySessionId(e);if(!r)return;const s=r.info,o=Date.now(),a=NA(NA({},s),{},{vid:void 0===s.vid?0:Number(s.vid),lts:o,elapse:o-r.startTime,cbRegistered:OA.onAutoplayFailed||OA.onAudioAutoplayFailed?1:-1,errorMsg:i,mediaType:t,trackId:n,extend:void 0});nw.send({type:YC.AUTOPLAY_FAILED,data:a},!0)}const MA=["play","playing","loadeddata","canplay","pause","stalled","suspend","waiting","abort","emptied","ended","error"],xA=new class{constructor(){oh(this,"onAutoplayFailed",void 0),oh(this,"elementMap",new Map),oh(this,"elementStateMap",new Map),oh(this,"elementsNeedToResume",[]),oh(this,"sinkIdMap",new Map),oh(this,"autoResumeAfterInterruption",(()=>{Array.from(this.elementMap.entries()).forEach((e=>{let[t,i]=e;const n=this.elementStateMap.get(t),r=i.srcObject.getAudioTracks()[0];Ib()?r&&"live"===r.readyState&&"running"===rA.curState&&($C.debug("auto resume after interruption for iOS 15"),i.pause(),i.play()):n&&"paused"===n&&r&&"live"===r.readyState&&"running"===rA.curState&&($C.debug("auto resume after interruption for iOS"),i.play())}))})),oh(this,"autoResumeAfterInterruptionOnIOS15_16",(()=>{Array.from(this.elementMap.entries()).forEach((e=>{let[t,i]=e;const n=i.srcObject.getAudioTracks()[0];n&&"live"===n.readyState&&($C.debug("auto resume after interruption inside autoResumeAfterInterruptionOnIOS15"),i.pause(),i.play())}))})),this.autoResumeAudioElement(),rA.on(dT.IOS_INTERRUPTION_END,this.autoResumeAfterInterruption),rA.on(dT.IOS_15_16_INTERRUPTION_END,this.autoResumeAfterInterruptionOnIOS15_16),rA.on(dT.STATE_CHANGE,(()=>{wb()&&"suspended"===rA.prevState&&"running"===rA.curState&&this.autoResumeAfterInterruption()}))}async setSinkID(e,t){const i=this.elementMap.get(e);if(this.sinkIdMap.set(e,t),i)try{await i.setSinkId(t)}catch(e){throw new Fb(Bb.PERMISSION_DENIED,"can not set sink id: "+e.toString())}}play(e,t,i,n){if(this.elementMap.has(t))return;const r=document.createElement("audio");r.autoplay=!0,r.srcObject=new MediaStream([e]),this.bindAudioElementEvents(t,r),this.elementMap.set(t,r),this.elementStateMap.set(t,YT.INIT),this.setVolume(t,i);const s=this.sinkIdMap.get(t);if(s)try{r.setSinkId(s).catch((e=>{$C.warning("[".concat(t,"] set sink id failed"),e.toString())}))}catch(e){$C.warning("[".concat(t,"] set sink id failed"),e.toString())}const o=r.play();o&&o.then&&o.catch((e=>{n&&LA(n,"audio",e.message,t),$C.warning("audio element play warning",e.toString()),this.elementMap.has(t)&&"NotAllowedError"===e.name&&($C.warning("detected audio element autoplay failed"),this.elementsNeedToResume.push(r),R_((()=>{this.onAutoplayFailed&&this.onAutoplayFailed(),IA()})))}))}updateTrack(e,t){const i=this.elementMap.get(e);i&&(i.srcObject=new MediaStream([t]))}isPlaying(e){return this.elementMap.has(e)&&"playing"===this.elementStateMap.get(e)}setVolume(e,t){const i=this.elementMap.get(e);i&&(t=Math.max(0,Math.min(100,t)),i.volume=t/100)}stop(e){const t=this.elementMap.get(e);if(this.sinkIdMap.delete(e),!t)return;const i=this.elementsNeedToResume.indexOf(t);this.elementsNeedToResume.splice(i,1),t.srcObject=null,t.remove(),this.elementMap.delete(e),this.elementStateMap.delete(e)}bindAudioElementEvents(e,t){MA.forEach((i=>{t.addEventListener(i,(i=>{const n=this.elementStateMap.get(e),r="pause"===i.type?"paused":i.type;if($C.debug("[".concat(e,"] audio-element-status change ").concat(n," => ").concat(r)),"error"===i.type){const i=null==t?void 0:t.error;i&&$C.error("[".concat(e,"] media error, code: ").concat(i.code,", message: ").concat(i.message))}this.elementStateMap.set(e,r)}))}))}getPlayerState(e){return this.elementStateMap.get(e)||"uninit"}autoResumeAudioElement(){const e=()=>{this.elementsNeedToResume.forEach((e=>{e.play().then((e=>{$C.debug("Auto resume audio element success")})).catch((e=>{$C.warning("Auto resume audio element failed!",e)}))})),this.elementsNeedToResume=[]};new nb((e=>{document.body?e():window.addEventListener("load",(()=>e()))})).then((()=>{Ub()?document.body.addEventListener("click",e,!0):(document.body.addEventListener("touchstart",e,!0),document.body.addEventListener("mousedown",e,!0))}))}};function DA(){return function(e,t,i){const n=i.value;return"function"==typeof n&&(i.value=function(){this._isClosed&&new Fb(Bb.INVALID_OPERATION,"[".concat(this.getTrackId(),"] cannot operate a closed track")).print("warning",$C);for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];const r=n.apply(this,t);return r instanceof nb?new nb(((e,t)=>{r.then(e).catch(t)})):r}),i}}function PA(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function UA(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?PA(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):PA(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class BA extends r_{constructor(e){super(),oh(this,"name","VideoProcessorDestination"),oh(this,"ID","0"),oh(this,"_source",void 0),oh(this,"videoContext",void 0),oh(this,"inputTrack",void 0),this.videoContext=e}get kind(){return"video"}get enabled(){return!0}pipe(){throw new Fb(Bb.NOT_SUPPORTED,"VideoProcessor cannot pipe to any other Processor")}unpipe(){throw new Fb(Bb.NOT_SUPPORTED,"VideoProcessor cannot unpipe to any other Processor")}enable(){}disable(){}updateInput(e){if(e.context!==this.videoContext)throw new Error("ProcessorContext passed to VideoTrack.processorDestination doesn't match it's belonging VideoTrack's context.\nProbably you are making pipeline like this:\nvideoTrack1.pipe(processor).pipe(videoTrack2.processorDestination).");e.track&&e.track!==this.inputTrack&&(this.videoContext.chained=!0,this.inputTrack=e.track,this.emit(WT.ON_TRACK,e.track))}reset(){this.inputTrack=void 0,this.videoContext.chained=!1,this.emit(WT.ON_TRACK,void 0)}}class FA extends r_{set chained(e){this._chained=e}get chained(){return this._chained}constructor(e,t){super(),oh(this,"constraintsMap",new Map),oh(this,"statsRegistry",[]),oh(this,"usageRegistry",[]),oh(this,"trackId",void 0),oh(this,"direction",void 0),oh(this,"_chained",!1),this.trackId=e,this.direction=t}async getConstraints(){return await b_(this,KT.REQUEST_CONSTRAINTS)}async requestApplyConstraints(e,t){var i;return $C.info("processor ".concat(t.name," requestApplyConstraints for ").concat(this.trackId)),e&&this.constraintsMap.set(t,e),__(this,KT.REQUEST_UPDATE_CONSTRAINTS,Array.from(Lw(i=this.constraintsMap).call(i)))}async requestRevertConstraints(e){var t;if(this.constraintsMap.has(e))return $C.info("processor ".concat(e.name," requestRevertConstraints for ").concat(this.trackId)),this.constraintsMap.delete(e),__(this,KT.REQUEST_UPDATE_CONSTRAINTS,Array.from(Lw(t=this.constraintsMap).call(t)))}registerStats(e,t,i){this.statsRegistry.find((i=>i.processorID===e.ID&&i.processorName===e.name&&i.type===t))||this.statsRegistry.push({processorName:e.name,processorID:e.ID,type:t,cb:i})}unregisterStats(e,t){const i=this.statsRegistry.findIndex((i=>i.processorID===e.ID&&i.processorName===e.name&&i.type===t));-1!==i&&this.statsRegistry.splice(i,1)}gatherStats(){const e=[];for(const{processorID:t,processorName:i,type:n,cb:r}of this.statsRegistry)try{const s=r();e.push({processorID:t,processorName:i,type:n,stats:s})}catch(e){$C.error(new Fb(Bb.UNEXPECTED_ERROR,e.message))}return e}registerUsage(e,t){this.usageRegistry.find((t=>t.processorID===e.ID&&t.processorName===e.name))||this.usageRegistry.push({processorID:e.ID,processorName:e.name,cb:t})}unregisterUsage(e){const t=this.usageRegistry.findIndex((t=>t.processorID===e.ID&&t.processorName===e.name));-1!==t&&this.usageRegistry.splice(t,1)}async gatherUsage(){const e=[];if(!this.chained)return[];for(const{cb:t}of this.usageRegistry)try{let i=t();i instanceof nb&&(i=await i),e.push(UA(UA({},i),{},{direction:this.direction}))}catch(e){$C.error("gather extension usage error",e)}return e}getDirection(){return this.direction}}class VA extends r_{constructor(e){super(),oh(this,"name","AudioProcessorDestination"),oh(this,"ID","0"),oh(this,"inputTrack",void 0),oh(this,"inputNode",void 0),oh(this,"audioProcessorContext",void 0),oh(this,"_source",void 0),this.audioProcessorContext=e}get kind(){return"audio"}get enabled(){return!0}pipe(){throw new Fb(Bb.NOT_SUPPORTED,"AudioProcessorDestination cannot pipe to any other Processor")}unpipe(){throw new Fb(Bb.NOT_SUPPORTED,"AudioProcessor cannot unpipe to any other Processor")}enable(){}disable(){}reset(){this.inputTrack=void 0,this.inputNode=void 0,this.audioProcessorContext.chained=!1,this.emit(WT.ON_TRACK,void 0),this.emit(WT.ON_NODE,void 0)}updateInput(e){if(e.context!==this.audioProcessorContext)throw new Error("ProcessorContext passed to AudioTrack.processorDestination doesn't match it's belonging AudioTrack's context.\n        Probably you are making pipeline like this: audioTrack1.pipe(processor).pipe(audioTrack2.processorDestination).");e.track&&this.inputTrack!==e.track&&(this.audioProcessorContext.chained=!0,this.inputTrack=e.track,this.emit(WT.ON_TRACK,this.inputTrack)),e.node&&this.inputNode!==e.node&&(this.audioProcessorContext.chained=!0,this.inputNode=e.node,this.emit(WT.ON_NODE,this.inputNode))}}class jA extends r_{set chained(e){this._chained=e}get chained(){return this._chained}constructor(e,t,i){super(),oh(this,"constraintsMap",new Map),oh(this,"statsRegistry",[]),oh(this,"audioContext",void 0),oh(this,"trackId",void 0),oh(this,"direction",void 0),oh(this,"usageRegistry",[]),oh(this,"_chained",!1),this.audioContext=e,this.trackId=t,this.direction=i}async getConstraints(){return b_(this,KT.REQUEST_CONSTRAINTS)}getAudioContext(){return this.audioContext}async requestApplyConstraints(e,t){var i;return $C.info("processor ".concat(t.name," requestApplyConstraints for ").concat(this.trackId)),e&&this.constraintsMap.set(t,e),__(this,KT.REQUEST_UPDATE_CONSTRAINTS,Array.from(Lw(i=this.constraintsMap).call(i)))}async requestRevertConstraints(e){var t;if(this.constraintsMap.has(e))return this.constraintsMap.delete(e),__(this,KT.REQUEST_UPDATE_CONSTRAINTS,Array.from(Lw(t=this.constraintsMap).call(t)))}registerStats(e,t,i){this.statsRegistry.find((i=>i.processorID===e.ID&&i.processorName===e.name&&i.type===t))||this.statsRegistry.push({processorName:e.name,processorID:e.ID,type:t,cb:i})}unregisterStats(e,t){const i=this.statsRegistry.findIndex((i=>i.processorID===e.ID&&i.processorName===e.name&&i.type===t));-1!==i&&this.statsRegistry.splice(i,1)}gatherStats(){const e=[];for(const{processorID:t,processorName:i,type:n,cb:r}of this.statsRegistry)try{const s=r();e.push({processorID:t,processorName:i,type:n,stats:s})}catch(e){$C.error(new Fb(Bb.UNEXPECTED_ERROR,e.message))}return e}registerUsage(e,t){this.usageRegistry.find((t=>t.processorID===e.ID&&t.processorName===e.name))||this.usageRegistry.push({processorID:e.ID,processorName:e.name,cb:t})}unregisterUsage(e){const t=this.usageRegistry.findIndex((t=>t.processorID===e.ID&&t.processorName===e.name));-1!==t&&this.usageRegistry.splice(t,1)}async gatherUsage(){const e=[];if(!this.chained)return[];for(const{cb:t}of this.usageRegistry)try{let i=t();i instanceof nb&&(i=await i),e.push(UA(UA({},i),{},{direction:this.direction}))}catch(e){$C.error("gather extension usage error",e)}return e}getDirection(){return this.direction}}class HA extends r_{get isPlayed(){return!0}get isFreeze(){return!1}constructor(){super(),oh(this,"context",void 0),oh(this,"processSourceNode",void 0),oh(this,"outputTrack",void 0),oh(this,"processedNode",void 0),oh(this,"clonedTrack",void 0),oh(this,"outputNode",void 0),this.outputNode=new $A}setVolume(){}createOutputTrack(){throw new Fb(Bb.NOT_SUPPORTED,"can not create output MediaStreamTrack when WebAudio disabled")}getOriginVolumeLevel(){return 0}getAccurateVolumeLevel(){return 0}stopGetAudioBuffer(){}startGetAudioBuffer(){}play(){}stop(){}destroy(){}updateTrack(){}updateOriginTrack(){}createMediaStreamSourceNode(){}}class $A{disconnect(){}connect(){}}let zA=null;class WA{constructor(){oh(this,"state","open"),oh(this,"trigger",void 0),oh(this,"tasks",[]),$C.debug("[macro-task-queue] is created."),this.trigger=window.setTimeout((()=>{this.state="closed",$C.debug("[macro-task-queue] will be closed, all remaining tasks will execute. [".concat(this.tasks.map((e=>e.key)),"]")),this.trigger=void 0,this.tasks.forEach((e=>{let{func:t}=e;return t()})),this.tasks.length=0,$C.debug("[macro-task-queue] is closed.")}))}enqueue(e,t){"closed"!==this.state&&(this.tasks.push({key:e,func:t}),$C.debug("[macro-task-queue] is queued, current queue ".concat(this.tasks.length,". ").concat("string"==typeof e?e:"")))}runTask(e){if("closed"===this.state)return;const t=this.tasks.findIndex((t=>t.key===e));if(-1!==t){const i=this.tasks.splice(t,1);$C.debug("[macro-task-queue] is unqueued, current queue ".concat(this.tasks.length,". ").concat("string"==typeof e?e:"")),i[0].func()}}release(){this.trigger&&(this.state="closed",clearTimeout(this.trigger),this.trigger=void 0,this.tasks.length=0,$C.debug("[macro-task-queue] is closed."))}}function KA(e){return function(t,i,n){var r;const s=null!==(r=n.value)&&void 0!==r?r:n.get,o=function(){zA&&"open"===zA.state&&zA.runTask(e);for(var t=arguments.length,i=new Array(t),n=0;n<t;n++)i[n]=arguments[n];return null==s?void 0:s.apply(this,...i)};return n.value?n.value=o:n.get=o,n}}function GA(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function qA(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?GA(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):GA(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class YA extends JT{get _source(){return this._trackSource}set _source(e){this._trackSource=e}get processorContext(){return this._processorContext}set processorContext(e){this._processorContext=e}get processorDestination(){return this._processorDestination}set processorDestination(e){this._processorDestination=e}get isPlaying(){return this._useAudioElement?xA.isPlaying(this.getTrackId()):this._source.isPlayed}get __className__(){return"LocalAudioTrack"}constructor(e,t,i,n,r){super(e,i),oh(this,"trackMediaType","audio"),oh(this,"_encoderConfig",void 0),oh(this,"_trackSource",void 0),oh(this,"_enabled",!0),oh(this,"_volume",100),oh(this,"_useAudioElement",!1),oh(this,"_bypassWebAudio",!1),oh(this,"processor",void 0),oh(this,"_processorContext",void 0),oh(this,"_processorDestination",void 0),oh(this,"_getOriginVolumeLevel",void 0),this._encoderConfig=t,this._getOriginVolumeLevel=!!n;const s=()=>{this.processorContext=new jA(this._source.context,this.getTrackId(),"local"),this.processorDestination=new VA(this.processorContext),this.bindProcessorDestinationEvents(),this._source.on(BT.UPDATE_SOURCE,(()=>{this.processor&&this.processor.updateInput({node:this._source.processSourceNode,context:this.processorContext})}))},o=r&&Eb()&&!aA();xC("DISABLE_WEBAUDIO")?(this._source=new HA,this._useAudioElement=!0,this._bypassWebAudio=!0):o?this._source=new HA:(this._source=new pA(e,!1,this._getOriginVolumeLevel?e:void 0),xC("LOCAL_AUDIO_TRACK_USES_WEB_AUDIO")||(this._useAudioElement=!0)),s(),!xC("DISABLE_WEBAUDIO")&&o&&(zA||(zA=new WA),zA).enqueue("INIT_WEBAUDIO",(()=>{this._source=new pA(e,!1,this._getOriginVolumeLevel?e:void 0),xC("LOCAL_AUDIO_TRACK_USES_WEB_AUDIO")||(this._useAudioElement=!0),s(),this.emit(FT.UPDATE_TRACK_SOURCE)}))}setVolume(e){Hb(e,"volume",0,1e3),this._volume=e,this._source.setVolume(e/100),this._useAudioElement&&xA.setVolume(this.getTrackId(),e);try{if(this._bypassWebAudio)return void $C.debug("[".concat(this.getTrackId(),"] setVolume returned because no pass through WebAudio."));const e=this._source.createOutputTrack();this._mediaStreamTrack!==e&&(this._mediaStreamTrack=e,__(this,kT.NEED_REPLACE_TRACK,this).then((()=>{$C.debug("[".concat(this.getTrackId(),"] replace web audio track success"))})).catch((e=>{$C.warning("[".concat(this.getTrackId(),"] replace web audio track failed"),e)})))}catch(e){}}getVolumeLevel(){return this._muted&&this.enabled&&this._getOriginVolumeLevel?this._source.getOriginVolumeLevel():this._source.getAccurateVolumeLevel()}async setPlaybackDevice(e){if(!this._useAudioElement)throw new Fb(Bb.NOT_SUPPORTED,"your browser does not support setting the audio output device");await xA.setSinkID(this.getTrackId(),e)}async setEnabled(e,t,i){return this._setEnabled(e,t,i)}async _setEnabled(e,t,i){if(!i){if(e===this._enabled)return;this.stateCheck("enabled",e)}if($C.info("[".concat(this.getTrackId(),"] start setEnabled"),e),e){this._originMediaStreamTrack.enabled=!0;try{i||(this._enabled=!0),await __(this,kT.NEED_ENABLE_TRACK,this),$C.info("[".concat(this.getTrackId(),"] setEnabled to ").concat(e," success"))}catch(e){throw i||(this._enabled=!1),$C.error("[".concat(this.getTrackId(),"] setEnabled to true error"),e.toString()),e}}else{this._originMediaStreamTrack.enabled=!1,i||(this._enabled=!1);try{await __(this,kT.NEED_DISABLE_TRACK,this)}catch(e){throw i||(this._enabled=!0),$C.error("[".concat(this.getTrackId(),"] setEnabled to false error"),e.toString()),e}}}async setMuted(e){e!==this._muted&&(this.stateCheck("muted",e),this._muted=e,this._originMediaStreamTrack.enabled=!e,$C.debug("[".concat(this.getTrackId(),"] start set muted: ").concat(e)),e?await __(this,kT.NEED_MUTE_TRACK,this):await __(this,kT.NEED_UNMUTE_TRACK,this))}getStats(){return N_((()=>{$C.warning("[deprecated] LocalAudioTrack.getStats will be removed in the future, use AgoraRTCClient.getLocalAudioStats instead")}),"localAudioTrackGetStatsWarning"),y_(this,kT.GET_STATS)||qA({},VT)}setAudioFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4096;if(!e)return this._source.removeAllListeners(BT.ON_AUDIO_BUFFER),void this._source.stopGetAudioBuffer();this._source.startGetAudioBuffer(t),this._source.removeAllListeners(BT.ON_AUDIO_BUFFER),this._source.on(BT.ON_AUDIO_BUFFER,(t=>e(t)))}play(){$C.debug("[".concat(this.getTrackId(),"] start audio playback")),this._useAudioElement?($C.debug("[".concat(this.getTrackId(),"] start audio playback in element")),xA.play(this._mediaStreamTrack,this.getTrackId(),this._volume)):this._source.play()}stop(){$C.debug("[".concat(this.getTrackId(),"] stop audio playback")),this._useAudioElement?xA.stop(this.getTrackId()):this._source.stop()}close(){super.close(),this.unbindProcessorDestinationEvents(),this.unbindProcessorContextEvents(),this.unpipe(),this.processorDestination._source&&this.processorDestination._source.unpipe(),this._source.destroy()}_updatePlayerSource(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];$C.debug("[".concat(this.getTrackId(),"] update player source track")),e&&this._source.updateTrack(this._mediaStreamTrack),this._useAudioElement&&xA.updateTrack(this.getTrackId(),this._mediaStreamTrack)}async _updateOriginMediaStreamTrack(e,t){this._originMediaStreamTrack!==e&&(this._originMediaStreamTrack&&(this._originMediaStreamTrack.removeEventListener("ended",this._handleTrackEnded),t&&this._originMediaStreamTrack.stop()),e.addEventListener("ended",this._handleTrackEnded),this._originMediaStreamTrack=e,this._muted&&(this._originMediaStreamTrack.enabled=!1),this.processor&&this.processor.updateInput({track:e,context:this.processorContext}),this._mediaStreamTrack!==this._source.outputTrack?(this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource(),await __(this,kT.NEED_REPLACE_TRACK,this)):this._source.updateTrack(this._originMediaStreamTrack),this._getOriginVolumeLevel&&this._source.updateOriginTrack(e))}renewMediaStreamTrack(e){return nb.resolve(void 0)}pipe(e){if(this._bypassWebAudio)throw new Fb(Bb.INVALID_OPERATION,"Can not process AudioTrack when bypassWebAudio set to true.");if(this.processor===e)return e;if(e._source)throw new Fb(Bb.INVALID_OPERATION,"Processor ".concat(e.name," already piped, please call unpipe beforehand."));return this.unpipe(),this.processor=e,this.processor._source=this,e.updateInput({track:this._originMediaStreamTrack,node:this._source.processSourceNode,context:this.processorContext}),e}unpipe(){var e;if(!this.processor)return;const t=this.processor;null===(e=this._source.processSourceNode)||void 0===e||e.disconnect(),this.processor._source=!1,this.processor=void 0,t.reset()}bindProcessorDestinationEvents(){this.processorDestination.on(WT.ON_TRACK,(async e=>{e?e!==this._mediaStreamTrack&&(this._mediaStreamTrack=e,this._updatePlayerSource(!1),this._source.processedNode=this._source.createMediaStreamSourceNode(e),await __(this,kT.NEED_REPLACE_TRACK,this)):this._mediaStreamTrack!==this._originMediaStreamTrack&&(this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource(),await __(this,kT.NEED_REPLACE_TRACK,this))})),this.processorDestination.on(WT.ON_NODE,(e=>{this._source.processedNode=e}))}unbindProcessorDestinationEvents(){this.processorDestination.removeAllListeners(WT.ON_TRACK),this.processorDestination.removeAllListeners(WT.ON_NODE)}unbindProcessorContextEvents(){this.processorContext.removeAllListeners(KT.REQUEST_UPDATE_CONSTRAINTS),this.processorContext.removeAllListeners(KT.REQUEST_CONSTRAINTS)}}Mw([KA("INIT_WEBAUDIO"),xw("design:type",Object),xw("design:paramtypes",[Object])],YA.prototype,"_source",null),Mw([KA("INIT_WEBAUDIO"),xw("design:type",jA),xw("design:paramtypes",[jA])],YA.prototype,"processorContext",null),Mw([KA("INIT_WEBAUDIO"),xw("design:type",VA),xw("design:paramtypes",[VA])],YA.prototype,"processorDestination",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t],throttleTime:300}),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",void 0)],YA.prototype,"setVolume",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],YA.prototype,"setPlaybackDevice",null),Mw([q_("LocalAudioTrack","_enabledMutex"),tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Object,Boolean]),xw("design:returntype",nb)],YA.prototype,"setEnabled",null),Mw([q_("LocalAudioTrack","_enabledMutex"),tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean]),xw("design:returntype",nb)],YA.prototype,"setMuted",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",Object)],YA.prototype,"getStats",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[Object,Number]),xw("design:returntype",void 0)],YA.prototype,"setAudioFrameCallback",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],YA.prototype,"play",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],YA.prototype,"stop",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],YA.prototype,"close",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t.name]}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",Object)],YA.prototype,"pipe",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],YA.prototype,"unpipe",null);class XA extends YA{get __className__(){return"MicrophoneAudioTrack"}constructor(e,t,i,n){super(e,t.encoderConfig?RT(t.encoderConfig):{},n,xC("GET_VOLUME_OF_MUTED_AUDIO_TRACK"),!0),oh(this,"_config",void 0),oh(this,"_deviceName","default"),oh(this,"_constraints",void 0),oh(this,"_originalConstraints",void 0),oh(this,"_enabled",!0),this._config=t,this._constraints=i,this._originalConstraints=i,this._deviceName=e.label,"boolean"==typeof t.bypassWebAudio&&(this._bypassWebAudio=t.bypassWebAudio),(Ib()||kb())&&rA.bindInterruptDetectorTrack(this),this.on(FT.UPDATE_TRACK_SOURCE,(()=>{this.bindProcessorContextEvents()})),aA()&&this.bindProcessorContextEvents()}async setDevice(e){if($C.info("[".concat(this.getTrackId(),"] start set device to ").concat(e)),this._enabled)try{const t=await AA.getDeviceById(e),i={};i.audio=qA({},this._constraints),i.audio.deviceId={exact:e},this._originMediaStreamTrack.stop();let n=null;try{n=await CA(i,this.getTrackId())}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice failed"),e.toString()),n=await CA({audio:this._constraints},this.getTrackId()),await this._updateOriginMediaStreamTrack(n.getAudioTracks()[0],!1),e}await this._updateOriginMediaStreamTrack(n.getAudioTracks()[0],!1),this._deviceName=t.label,this._config.microphoneId=e,this._constraints.deviceId={exact:e}}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice error"),e.toString()),e}else try{const t=await AA.getDeviceById(e);this._deviceName=t.label,this._config.microphoneId=e,this._constraints.deviceId={exact:e}}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice error"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] set device to ").concat(e," success"))}async setEnabled(e,t,i){if(t)return $C.debug("[".concat(this.getTrackId(),"] setEnabled false (do not close microphone)")),await super._setEnabled(e);if(!i){if(e===this._enabled)return;this.stateCheck("enabled",e)}if($C.info("[".concat(this.getTrackId(),"] start setEnabled"),e),!e){var n;this._originMediaStreamTrack.onended=null,this._originMediaStreamTrack.stop(),null===(n=this._source.clonedTrack)||void 0===n||n.stop(),i||(this._enabled=!1);try{await __(this,kT.NEED_DISABLE_TRACK,this)}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setEnabled false failed"),e.toString()),e}return}const r=qA({},this._constraints),s=AA.searchDeviceIdByName(this._deviceName);s&&!r.deviceId&&(r.deviceId=s);try{i||(this._enabled=!0);const e=await CA({audio:this._constraints},this.getTrackId());await this._updateOriginMediaStreamTrack(e.getAudioTracks()[0],!1),await __(this,kT.NEED_ENABLE_TRACK,this)}catch(e){throw i||(this._enabled=!1),$C.error("[".concat(this.getTrackId(),"] setEnabled true failed"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] setEnabled success"))}close(){super.close(),(Ib()||kb())&&rA.unbindInterruptDetectorTrack(this)}onTrackEnded(){if((wb()||Lb())&&this._enabled&&!this._isClosed&&rA.duringInterruption){const e=async()=>{rA.off(dT.IOS_INTERRUPTION_END,e),this._enabled&&!this._isClosed&&($C.debug("[".concat(this.getTrackId(),"] try capture microphone media device for interrupted iOS device.")),await this.setEnabled(!1),await this.setEnabled(!0))};rA.on(dT.IOS_INTERRUPTION_END,e)}else $C.debug("[".concat(this.getTrackId(),"] track ended")),this.safeEmit(PT.TRACK_ENDED)}async renewMediaStreamTrack(e){const t=e||this._constraints,i=AA.searchDeviceIdByName(this._deviceName);if(i&&!t.deviceId&&(t.deviceId=i),this._constraints=t,this._enabled){this._originMediaStreamTrack.stop();const e=await CA({audio:this._constraints},this.getTrackId());await this._updateOriginMediaStreamTrack(e.getAudioTracks()[0],!0)}}bindProcessorContextEvents(){this.processorContext.on(KT.REQUEST_UPDATE_CONSTRAINTS,(async(e,t,i)=>{try{const i=Object.assign({},this._originalConstraints,...e);await this.renewMediaStreamTrack(i),t()}catch(e){i(e)}})),this.processorContext.on(KT.REQUEST_CONSTRAINTS,(async e=>{e(this._originMediaStreamTrack.getSettings())}))}}Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],XA.prototype,"setDevice",null),Mw([q_("MicrophoneAudioTrack","_enabledMutex"),tw({argsMap:(e,t,i)=>[e.getTrackId(),t,i]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Boolean,Boolean]),xw("design:returntype",nb)],XA.prototype,"setEnabled",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],XA.prototype,"close",null);class ZA extends YA{get __className__(){return"BufferSourceAudioTrack"}constructor(e,t,i,n){super(t.createOutputTrack(),i,n),oh(this,"source",void 0),oh(this,"_bufferSource",void 0),this.source=e,this._bufferSource=t,this._bufferSource.on(BT.AUDIO_SOURCE_STATE_CHANGE,(e=>{this.safeEmit(PT.SOURCE_STATE_CHANGE,e)}));try{this._mediaStreamTrack=this._source.createOutputTrack()}catch(e){}}get currentState(){return this._bufferSource.currentState}get duration(){return this._bufferSource.duration}get playbackSpeed(){return this._bufferSource.playbackSpeed}getCurrentTime(){return this._bufferSource.currentTime}startProcessAudioBuffer(e){e&&this._bufferSource.updateOptions(e),this._bufferSource.startProcessAudioBuffer()}pauseProcessAudioBuffer(){this._bufferSource.pauseProcessAudioBuffer()}seekAudioBuffer(e){this._bufferSource.seekAudioBuffer(e)}resumeProcessAudioBuffer(){this._bufferSource.resumeProcessAudioBuffer()}stopProcessAudioBuffer(){this._bufferSource.stopProcessAudioBuffer()}close(){this.source=null,this._bufferSource.destroy(),super.close()}setAudioBufferPlaybackSpeed(e){Hb(e,"speed",0),this._bufferSource.setAudioBufferPlaybackSpeed(e)}}Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t,e.duration]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",void 0)],ZA.prototype,"startProcessAudioBuffer",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],ZA.prototype,"pauseProcessAudioBuffer",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",void 0)],ZA.prototype,"seekAudioBuffer",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],ZA.prototype,"resumeProcessAudioBuffer",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],ZA.prototype,"stopProcessAudioBuffer",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],ZA.prototype,"close",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",void 0)],ZA.prototype,"setAudioBufferPlaybackSpeed",null);class QA extends YA{get __className__(){return"MixingAudioTrack"}get isActive(){for(const e of this.trackList)if(e._enabled&&!e._isClosed&&!e.muted)return!0;return!1}constructor(){const e=oA().createMediaStreamDestination();super(e.stream.getAudioTracks()[0],void 0,B_(8,"track-mix-")),oh(this,"trackList",void 0),oh(this,"destNode",void 0);try{this._mediaStreamTrack=this._source.createOutputTrack()}catch(e){}this.destNode=e,this.trackList=[]}hasAudioTrack(e){return-1!==this.trackList.indexOf(e)}addAudioTrack(e){-1===this.trackList.indexOf(e)?($C.debug("add ".concat(e.getTrackId()," to mixing track")),e._source.outputNode.connect(this.destNode),this.trackList.push(e),this.updateEncoderConfig()):$C.debug("track ".concat(e.getTrackId()," is already added"))}removeAudioTrack(e){if(-1!==this.trackList.indexOf(e)){$C.debug("remove ".concat(e.getTrackId()," from mixing track"));try{e._source.outputNode.disconnect(this.destNode)}catch(e){}T_(this.trackList,e),this.updateEncoderConfig()}}updateEncoderConfig(){const e={};this.trackList.forEach((t=>{t._encoderConfig&&((t._encoderConfig.bitrate||0)>(e.bitrate||0)&&(e.bitrate=t._encoderConfig.bitrate),(t._encoderConfig.sampleRate||0)>(e.sampleRate||0)&&(e.sampleRate=t._encoderConfig.sampleRate),(t._encoderConfig.sampleSize||0)>(e.sampleSize||0)&&(e.sampleSize=t._encoderConfig.sampleSize),t._encoderConfig.stereo&&(e.stereo=!0))})),this._encoderConfig=e}_updateRtpTransceiver(e){this._rtpTransceiver!==e&&(this._rtpTransceiver=e,this.trackList.forEach((t=>{t instanceof QA?t.emit(DT.TRANSCEIVER_UPDATED,e):t._updateRtpTransceiver(e)})))}}function JA(e){const t={};e.facingMode&&(t.facingMode=e.facingMode),e.cameraId&&(t.deviceId={exact:e.cameraId});const i=wT(e.encoderConfig);return null!=i.width&&(t.width=i.width),null!=i.height&&(t.height=i.height),!xb()&&i.frameRate&&(t.frameRate=i.frameRate),pb().name===lb.EDGE&&"object"==typeof t.frameRate&&(t.frameRate.max=60),Cb()&&(t.frameRate={ideal:30,max:30}),t}function eR(e){const t={};if(xb()||(void 0!==e.AGC&&(t.autoGainControl=e.AGC),void 0!==e.AEC&&(t.echoCancellation=e.AEC),void 0!==e.ANS&&(t.noiseSuppression=e.ANS,yb()&&e.ANS&&(t.googHighpassFilter=e.ANS))),e.encoderConfig){const i=RT(e.encoderConfig);t.channelCount=i.stereo?2:1,t.sampleRate=i.sampleRate,t.sampleSize=i.sampleSize}return e.microphoneId&&(t.deviceId={exact:e.microphoneId}),Pb()&&(t.sampleRate=void 0),t}class tR extends fA{set currentState(e){e!==this._currentState&&(this._currentState=e,this.safeEmit(BT.AUDIO_SOURCE_STATE_CHANGE,this._currentState))}get currentState(){return this._currentState}constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};super(),oh(this,"audioBuffer",void 0),oh(this,"sourceNode",void 0),oh(this,"startPlayTime",0),oh(this,"startPlayOffset",0),oh(this,"pausePlayTime",0),oh(this,"options",void 0),oh(this,"currentLoopCount",0),oh(this,"currentPlaybackSpeed",100),oh(this,"_currentState","stopped"),this.audioBuffer=e,this.options=t,this.startPlayOffset=this.options.startPlayTime||0}createWebAudioDiagram(){return this.context.createGain()}get duration(){return this.audioBuffer?this.audioBuffer.duration:0}get playbackSpeed(){return this.currentPlaybackSpeed}get currentTime(){return this.audioBuffer?"stopped"===this.currentState?0:"paused"===this.currentState?this.pausePlayTime:((this.context.currentTime-this.startPlayTime)*(this.playbackSpeed/100)+this.startPlayOffset)%this.audioBuffer.duration:0}updateOptions(e){"stopped"===this.currentState?(this.options=e,this.startPlayOffset=this.options.startPlayTime||0):$C.warning("can not set audio source options")}startProcessAudioBuffer(){this.sourceNode&&this.stopProcessAudioBuffer(),this.sourceNode=this.createSourceNode(),this.startSourceNode(),this.currentState="playing"}pauseProcessAudioBuffer(){this.sourceNode&&"playing"===this.currentState&&(this.pausePlayTime=this.currentTime,this.sourceNode.onended=null,this.sourceNode.stop(),this.sourceNode.buffer=null,this.sourceNode=this.createSourceNode(),this.currentState="paused")}seekAudioBuffer(e){this.sourceNode&&(this.sourceNode.onended=null,"playing"===this.currentState&&this.sourceNode.stop(),this.sourceNode=this.createSourceNode(),"playing"===this.currentState?(this.startPlayOffset=e,this.startSourceNode()):"paused"===this.currentState&&(this.pausePlayTime=e))}resumeProcessAudioBuffer(){"paused"===this.currentState&&this.sourceNode&&(this.startPlayOffset=this.pausePlayTime,this.pausePlayTime=0,this.startSourceNode(),this.currentState="playing")}stopProcessAudioBuffer(){if(this.sourceNode){this.sourceNode.onended=null;try{this.sourceNode.stop()}catch(e){}this.reset()}}destroy(){this.audioBuffer=null,super.destroy()}setAudioBufferPlaybackSpeed(e){this.sourceNode&&("playing"===this.currentState&&(this.startPlayOffset=this.currentTime,this.startPlayTime=this.context.currentTime),this.sourceNode.playbackRate.value=e/100),this.currentPlaybackSpeed=e}startSourceNode(){this.sourceNode&&this.sourceNode.buffer&&(this.sourceNode.start(0,this.startPlayOffset),this.startPlayTime=this.context.currentTime,this.sourceNode.onended=this.handleSourceNodeEnded.bind(this))}createSourceNode(){const e=this.context.createBufferSource();return e.buffer=this.audioBuffer,e.loop=!!this.options.loop,e.connect(this.outputNode),e.playbackRate.value=this.currentPlaybackSpeed/100,e}handleSourceNodeEnded(){if(this.currentLoopCount+=1,this.options.cycle&&this.options.cycle>this.currentLoopCount)return this.startPlayOffset=0,this.sourceNode=void 0,void this.startProcessAudioBuffer();this.reset()}reset(){this.startPlayOffset=this.options.startPlayTime||0,this.currentState="stopped",this.sourceNode&&(this.sourceNode.disconnect(),this.sourceNode=void 0),this.currentLoopCount=0}}const nR=new Map;async function rR(e,t){let i=null;if("string"==typeof e){const t=nR.get(e);if(t)return $C.debug("use cached audio resource: ",e),t;try{i=(await Z_((()=>gC.get(e,{responseType:"arraybuffer"})),void 0,void 0,{maxRetryCount:3})).data}catch(e){throw new Fb(Bb.FETCH_AUDIO_FILE_FAILED,e.toString())}}else{const t=new nb(((t,i)=>{const n=new FileReader;n.onload=e=>{e.target?t(e.target.result):i(new Fb(Bb.READ_LOCAL_AUDIO_FILE_ERROR))},n.onerror=()=>{i(new Fb(Bb.READ_LOCAL_AUDIO_FILE_ERROR))},n.readAsArrayBuffer(e)}));i=await t}const n=await function(e){const t=oA();return new nb(((i,n)=>{t.decodeAudioData(e,(e=>{i(e)}),(e=>{n(new Fb(Bb.DECODE_AUDIO_FILE_FAILED,e.toString()))}))}))}(i);return"string"==typeof e&&t&&nR.set(e,n),n}const iR=e=>{const t=document.createElement("canvas");return t.width=2,t.height=2,new nb(((i,n)=>{t.toBlob((async e=>{if(t.remove(),e){const n=await oR(e);i({buffer:n,width:t.width,height:t.height})}else n(new Fb(Bb.CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED))}),e,1)}))},oR=async e=>{const t=await e.arrayBuffer();return new Uint8Array(t)},aR=new class extends r_{get visibility(){return document.visibilityState}get lastHiddenTime(){return this._lastHiddenTime}get lastVisibleTime(){return this._lastVisibleTime}constructor(){super(),oh(this,"_lastHiddenTime",0),oh(this,"_lastVisibleTime",0),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState?this._lastHiddenTime=performance.now():this._lastVisibleTime=performance.now(),$C.debug("document visibility went ".concat(document.visibilityState)),this.emit("VISIBILITY_CHANGE",document.visibilityState)}))}};function sR(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function cR(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?sR(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):sR(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class lR{get videoElementStatus(){return this._videoElementStatus}set videoElementStatus(e){e!==this._videoElementStatus&&($C.debug("[".concat(this.trackId,"] video-element-status change ").concat(this._videoElementStatus," => ").concat(e)),this._videoElementStatus=e)}constructor(e){oh(this,"trackId",void 0),oh(this,"config",void 0),oh(this,"onFirstVideoFrameDecoded",void 0),oh(this,"freezeTimeCounterList",[]),oh(this,"renderFreezeAccTime",0),oh(this,"isKeepLastFrame",!1),oh(this,"timeUpdatedCount",0),oh(this,"freezeTime",0),oh(this,"playbackTime",0),oh(this,"lastTimeUpdatedTime",0),oh(this,"autoplayFailed",!1),oh(this,"videoTrack",void 0),oh(this,"videoElement",void 0),oh(this,"cacheVideoElement",void 0),oh(this,"videoElementCheckInterval",void 0),oh(this,"_videoElementStatus",YT.NONE),oh(this,"isGettingVideoDimensions",!1),oh(this,"startGetVideoDimensions",(()=>{const e=()=>{if(this.isGettingVideoDimensions=!0,this.videoElement.videoWidth*this.videoElement.videoHeight>4)return $C.debug("[".concat(this.trackId,"] current video dimensions:"),this.videoElement.videoWidth,this.videoElement.videoHeight),void(this.isGettingVideoDimensions=!1);setTimeout(e,500)};!this.isGettingVideoDimensions&&e()})),oh(this,"autoResumeAfterInterruption",(()=>{this.videoTrack&&"live"===this.videoTrack.readyState&&"running"===rA.curState&&($C.debug("[track-".concat(this.trackId,"] video element paused, auto resume for ").concat(mb())),Nb()?(this.videoElement.srcObject=null,this.videoElement.srcObject=new MediaStream([this.videoTrack]),this.videoElement.play()):(this.videoElement.pause(),this.videoElement.play()))})),oh(this,"handleVideoEvents",(e=>{switch(e.type){case"play":case"playing":this.startGetVideoDimensions(),this.videoElementStatus=YT.PLAYING;break;case"loadeddata":if(this.onFirstVideoFrameDecoded&&this.onFirstVideoFrameDecoded(),this.cacheVideoElement){try{this.cacheVideoElement.srcObject=null,this.cacheVideoElement.remove()}catch(e){}this.cacheVideoElement=void 0}break;case"canplay":this.videoElementStatus=YT.CANPLAY;break;case"stalled":this.videoElementStatus=YT.STALLED;break;case"suspend":this.videoElementStatus=YT.SUSPEND;break;case"pause":this.videoElementStatus=YT.PAUSED,wb()||Lb()||Eb()&&this.autoplayFailed||!this.videoTrack||"live"!==this.videoTrack.readyState||($C.debug("[track-".concat(this.trackId,"] video element paused, auto resume")),this.videoElement.play());break;case"waiting":this.videoElementStatus=YT.WAITING;break;case"abort":this.videoElementStatus=YT.ABORT;break;case"ended":this.videoElementStatus=YT.ENDED;break;case"emptied":this.videoElementStatus=YT.EMPTIED;break;case"error":{this.videoElementStatus=YT.ERROR;const e=this.videoElement.error;e&&$C.error("[".concat(this.trackId,"] media error, code: ").concat(e.code,", message: ").concat(e.message));break}case"timeupdate":{const e=performance.now();if(this.timeUpdatedCount+=1,this.timeUpdatedCount<10)return void(this.lastTimeUpdatedTime=e);const t=e-this.lastTimeUpdatedTime,i=this.lastTimeUpdatedTime;if(this.lastTimeUpdatedTime=e,aR.lastVisibleTime<aR.lastHiddenTime||i<aR.lastHiddenTime||i<aR.lastVisibleTime)return;for(t>xC("VIDEO_FREEZE_DURATION")&&(this.freezeTime+=t),this.playbackTime+=t;this.playbackTime>=6e3;){this.playbackTime-=6e3;const e=Math.min(6e3,this.freezeTime);this.freezeTimeCounterList.push(e),this.freezeTime=Math.max(0,this.freezeTime-6e3)}break}}})),oh(this,"autoResumeAfterInterruptionOnIOS15_16",(()=>{this.videoTrack&&"live"===this.videoTrack.readyState&&($C.debug("[track-".concat(this.trackId,"] video element paused, auto resume for ").concat(mb())),Nb()?(this.videoElement.srcObject=null,this.videoElement.srcObject=new MediaStream([this.videoTrack]),this.videoElement.play()):(this.videoElement.pause(),this.videoElement.play()))})),this.trackId=e.trackId,this.config=e,e.element instanceof HTMLVideoElement?this.videoElement=e.element:this.videoElement=document.createElement("video"),rA.on(dT.IOS_INTERRUPTION_END,this.autoResumeAfterInterruption),rA.on(dT.IOS_15_16_INTERRUPTION_END,this.autoResumeAfterInterruptionOnIOS15_16)}getVideoElement(){return this.videoElement}getContainerElement(){var e;return null!==(e=this.videoElement.parentElement)&&void 0!==e?e:void 0}updateConfig(e){this.config=e,this.trackId=e.trackId,e.element!==this.videoElement&&(this.destroy(),this.videoElement=e.element),this.videoTrack&&this.initVideoElement()}updateVideoTrack(e){this.videoTrack!==e&&(this.videoTrack=e,this.initVideoElement())}play(e){const t=this.videoElement.play();t&&t.catch&&t.catch((t=>{e&&LA(e,"video",t.message,this.trackId),"NotAllowedError"===t.name?($C.warning("detected video element autoplay failed",t),this.autoplayFailed=!0,this.handleAutoPlayFailed()):$C.warning("[".concat(this.trackId,"] play warning: "),t)}));const i=pb();if(("Safari"===i.name&&15===Number(i.version)||Ib())&&t&&t.then){const e=()=>{this.config.mirror&&(this.videoElement.style.transform="rotateY(180deg)")};t.then(e).catch(e)}}getCurrentFrame(){const e=document.createElement("canvas");e.width=this.videoElement.videoWidth,e.height=this.videoElement.videoHeight;const t=e.getContext("2d");if(!t)return $C.error("create canvas context failed!"),new ImageData(2,2);t.drawImage(this.videoElement,0,0,e.width,e.height);const i=t.getImageData(0,0,e.width,e.height);return e.remove(),i}async getCurrentFrameToUint8Array(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;const i=document.createElement("canvas");i.width=this.videoElement.videoWidth,i.height=this.videoElement.videoHeight;const n=i.getContext("2d");return n?(n.drawImage(this.videoElement,0,0,i.width,i.height),new nb(((n,r)=>{i.toBlob((async e=>{if(i.remove(),e){const t=await oR(e);n({buffer:t,width:i.width,height:i.height})}else r(new Fb(Bb.CONVERTING_VIDEO_FRAME_TO_BLOB_FAILED))}),e,t<0?.1:t>1?1:t)}))):await iR(e)}destroy(){rA.off(dT.IOS_INTERRUPTION_END,this.autoResumeAfterInterruption),rA.off(dT.IOS_15_16_INTERRUPTION_END,this.autoResumeAfterInterruptionOnIOS15_16),this.videoElement.srcObject=null,this.resetVideoElement(),this.freezeTimeCounterList=[]}initVideoElement(){if(this.videoElementStatus=YT.INIT,!this.videoElementCheckInterval&&(dR.forEach((e=>{this.videoElement.addEventListener(e,this.handleVideoEvents)})),this.videoElementCheckInterval=window.setInterval((()=>{(function(e){return e!==document.body&&document.body.contains(e)})(this.videoElement)||(this.videoElementStatus=YT.DESTROYED)}),1e3),xC("ENABLE_VIDEO_FRAME_CALLBACK"))){var e,t;let i;const n=(e,t)=>{if(this.videoElementStatus===YT.PLAYING){if(i){const e=t.presentationTime-i.presentationTime;e>xC("VIDEO_FREEZE_DURATION")&&aR.lastVisibleTime>=aR.lastHiddenTime&&i.timestamp>aR.lastVisibleTime&&i.timestamp>aR.lastHiddenTime&&(this.renderFreezeAccTime+=e)}i=cR(cR({},t),{},{timestamp:e})}var r,s;xC("ENABLE_VIDEO_FRAME_CALLBACK")&&(null===(r=(s=this.videoElement).requestVideoFrameCallback)||void 0===r||r.call(s,n))};null===(e=(t=this.videoElement).requestVideoFrameCallback)||void 0===e||e.call(t,n)}this.videoElement.controls=!1,this.videoElement.setAttribute("playsinline",""),Pb()&&(this.videoElement.poster="noposter");const i=pb();"Safari"===i.name&&15===Number(i.version)||Ib()||!this.config.mirror||(this.videoElement.style.transform="rotateY(180deg)"),this.config.fit?this.videoElement.style.objectFit=this.config.fit:this.videoElement.style.objectFit="cover",this.videoElement.setAttribute("muted",""),this.videoElement.muted=!0,this.videoElement.srcObject&&this.videoElement.srcObject instanceof MediaStream?this.videoElement.srcObject.getVideoTracks()[0]!==this.videoTrack&&(this.videoElement.srcObject=this.videoTrack?new MediaStream([this.videoTrack]):null,Cb()&&this.videoElement.load()):(this.videoElement.srcObject=this.videoTrack?new MediaStream([this.videoTrack]):null,Cb()&&this.videoElement.load());const n=this.videoElement.play();void 0!==n&&n.catch((e=>{$C.debug("[".concat(this.trackId,"] playback interrupted"),e.toString())}))}resetVideoElement(){dR.forEach((e=>{this.videoElement&&this.videoElement.removeEventListener(e,this.handleVideoEvents)})),this.videoElementCheckInterval&&(window.clearInterval(this.videoElementCheckInterval),this.videoElementCheckInterval=void 0),this.videoElementStatus=YT.NONE}handleAutoPlayFailed(){const e=t=>{t.preventDefault(),this.videoElement.play().then((()=>{$C.debug("[".concat(this.trackId,"] Video element for trackId:").concat(this.trackId," autoplay resumed."))})).catch((e=>{$C.error(e)})),this.autoplayFailed=!1,Ub()?document.body.removeEventListener("click",e,!0):(document.body.removeEventListener("touchstart",e,!0),document.body.removeEventListener("mousedown",e,!0))};Ub()?document.body.addEventListener("click",e,!0):(document.body.addEventListener("touchstart",e,!0),document.body.addEventListener("mousedown",e,!0)),IA()}}const dR=["play","playing","loadeddata","canplay","pause","stalled","suspend","waiting","abort","emptied","ended","timeupdate","error"];class uR extends lR{constructor(e){super(e),oh(this,"container",void 0),oh(this,"slot",void 0),this.slot=e.element,this.updateConfig(e)}updateConfig(e){this.config=e,this.trackId=e.trackId;const t=e.element;t!==this.slot&&(this.destroy(),this.slot=t),this.createElements()}updateVideoTrack(e){this.videoTrack!==e&&(this.videoTrack=e,this.createElements())}play(e){var t;null!==(t=this.container)&&void 0!==t&&t.contains(this.videoElement)&&super.play(e)}getCurrentFrame(){var e;return null!==(e=this.container)&&void 0!==e&&e.contains(this.videoElement)?super.getCurrentFrame():new ImageData(2,2)}async getCurrentFrameToUint8Array(e){var t;let i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return null!==(t=this.container)&&void 0!==t&&t.contains(this.videoElement)?await super.getCurrentFrameToUint8Array(e,i):await iR(e)}destroy(){if(super.destroy(),this.videoElement.remove(),this.videoElement=document.createElement("video"),this.container){try{this.container.remove(),this.slot.removeChild(this.container)}catch(e){}this.container=void 0}}createElements(){this.container||(this.container=document.createElement("div")),this.container.id="agora-video-player-".concat(this.trackId),this.container.style.width="100%",this.container.style.height="100%",this.container.style.position="relative",this.container.style.overflow="hidden",this.videoTrack?(this.container.style.backgroundColor="black",xC("KEEP_LAST_FRAME")&&this.isKeepLastFrame&&this.videoElement.paused&&this.resetVideoElement(),this.mountedVideoElement()):this.unmountedVideoElement(),this.slot.appendChild(this.container)}mountedVideoElement(){var e;!this.container||null!==(e=this.container)&&void 0!==e&&e.contains(this.videoElement)||this.container.appendChild(this.videoElement),super.initVideoElement(),this.videoElement.id="video_".concat(this.trackId),this.videoElement.className="agora_video_player",this.videoElement.style.width="100%",this.videoElement.style.height="100%",this.videoElement.style.position="absolute",this.videoElement.style.left="0",this.videoElement.style.top="0"}unmountedVideoElement(){var e;if(null!==(e=this.container)&&void 0!==e&&e.contains(this.videoElement)){super.resetVideoElement();try{this.container&&this.container.removeChild(this.videoElement)}catch(e){}this.videoElement=document.createElement("video")}}resetVideoElement(){var e;null!==(e=this.container)&&void 0!==e&&e.contains(this.videoElement)&&(super.resetVideoElement(),this.cacheVideoElement=this.videoElement,this.videoElement=document.createElement("video"))}getContainerElement(){return this.container}}function hR(e){return new nb(((t,i)=>{let n=!1;const r=document.createElement("video");r.setAttribute("autoplay",""),r.setAttribute("muted",""),r.muted=!0,r.autoplay=!0,r.setAttribute("playsinline",""),r.setAttribute("style","position: fixed; top: 0; left: 0; width: 1px; height: 1px"),document.body.appendChild(r);const s=wb()?"canplay":"playing";r.addEventListener(s,(()=>{const e=r.videoWidth,i=r.videoHeight;!e&&Cb()||(n=!0,r.srcObject=null,r.remove(),t([e,i]))})),r.srcObject=new MediaStream([e]),r.play().catch(V_),setTimeout((()=>{n||(r.srcObject=null,r.remove(),t([r.videoWidth,r.videoHeight]))}),4e3)}))}const fR=async(e,t,i)=>{const n=function(e){const t=[];for(let i=0;i<e.length;i+=2)t.push(parseInt(e.slice(i,i+2),16));return Uint8Array.from(t)}(function(e){const t="0123456789abcdef";function i(e){let i,n="";for(i=0;i<=3;i++)n+=t.charAt(e>>8*i+4&15)+t.charAt(e>>8*i&15);return n}function n(e,t){const i=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(i>>16)<<16|65535&i}function r(e,t,i,r,s,o){return n(function(e,t){return e<<t|e>>>32-t}(n(n(t,e),n(r,o)),s),i)}function s(e,t,i,n,s,o,a){return r(t&i|~t&n,e,t,s,o,a)}function o(e,t,i,n,s,o,a){return r(t&n|i&~n,e,t,s,o,a)}function a(e,t,i,n,s,o,a){return r(t^i^n,e,t,s,o,a)}function c(e,t,i,n,s,o,a){return r(i^(t|~n),e,t,s,o,a)}const l=function(e){let t;const i=1+(e.length+8>>6),n=new Array(16*i);for(t=0;t<16*i;t++)n[t]=0;for(t=0;t<e.length;t++)n[t>>2]|=e.charCodeAt(t)<<t%4*8;return n[t>>2]|=128<<t%4*8,n[16*i-2]=8*e.length,n}(e);let d,h,u,p,f,m=1732584193,v=-271733879,_=-1732584194,g=271733878;for(d=0;d<l.length;d+=16)h=m,u=v,p=_,f=g,m=s(m,v,_,g,l[d+0],7,-680876936),g=s(g,m,v,_,l[d+1],12,-389564586),_=s(_,g,m,v,l[d+2],17,606105819),v=s(v,_,g,m,l[d+3],22,-1044525330),m=s(m,v,_,g,l[d+4],7,-176418897),g=s(g,m,v,_,l[d+5],12,1200080426),_=s(_,g,m,v,l[d+6],17,-1473231341),v=s(v,_,g,m,l[d+7],22,-45705983),m=s(m,v,_,g,l[d+8],7,1770035416),g=s(g,m,v,_,l[d+9],12,-1958414417),_=s(_,g,m,v,l[d+10],17,-42063),v=s(v,_,g,m,l[d+11],22,-1990404162),m=s(m,v,_,g,l[d+12],7,1804603682),g=s(g,m,v,_,l[d+13],12,-40341101),_=s(_,g,m,v,l[d+14],17,-1502002290),v=s(v,_,g,m,l[d+15],22,1236535329),m=o(m,v,_,g,l[d+1],5,-165796510),g=o(g,m,v,_,l[d+6],9,-1069501632),_=o(_,g,m,v,l[d+11],14,643717713),v=o(v,_,g,m,l[d+0],20,-373897302),m=o(m,v,_,g,l[d+5],5,-701558691),g=o(g,m,v,_,l[d+10],9,38016083),_=o(_,g,m,v,l[d+15],14,-660478335),v=o(v,_,g,m,l[d+4],20,-405537848),m=o(m,v,_,g,l[d+9],5,568446438),g=o(g,m,v,_,l[d+14],9,-1019803690),_=o(_,g,m,v,l[d+3],14,-187363961),v=o(v,_,g,m,l[d+8],20,1163531501),m=o(m,v,_,g,l[d+13],5,-1444681467),g=o(g,m,v,_,l[d+2],9,-51403784),_=o(_,g,m,v,l[d+7],14,1735328473),v=o(v,_,g,m,l[d+12],20,-1926607734),m=a(m,v,_,g,l[d+5],4,-378558),g=a(g,m,v,_,l[d+8],11,-2022574463),_=a(_,g,m,v,l[d+11],16,1839030562),v=a(v,_,g,m,l[d+14],23,-35309556),m=a(m,v,_,g,l[d+1],4,-1530992060),g=a(g,m,v,_,l[d+4],11,1272893353),_=a(_,g,m,v,l[d+7],16,-155497632),v=a(v,_,g,m,l[d+10],23,-1094730640),m=a(m,v,_,g,l[d+13],4,681279174),g=a(g,m,v,_,l[d+0],11,-358537222),_=a(_,g,m,v,l[d+3],16,-722521979),v=a(v,_,g,m,l[d+6],23,76029189),m=a(m,v,_,g,l[d+9],4,-640364487),g=a(g,m,v,_,l[d+12],11,-421815835),_=a(_,g,m,v,l[d+15],16,530742520),v=a(v,_,g,m,l[d+2],23,-995338651),m=c(m,v,_,g,l[d+0],6,-198630844),g=c(g,m,v,_,l[d+7],10,1126891415),_=c(_,g,m,v,l[d+14],15,-1416354905),v=c(v,_,g,m,l[d+5],21,-57434055),m=c(m,v,_,g,l[d+12],6,1700485571),g=c(g,m,v,_,l[d+3],10,-1894986606),_=c(_,g,m,v,l[d+10],15,-1051523),v=c(v,_,g,m,l[d+1],21,-2054922799),m=c(m,v,_,g,l[d+8],6,1873313359),g=c(g,m,v,_,l[d+15],10,-30611744),_=c(_,g,m,v,l[d+6],15,-1560198380),v=c(v,_,g,m,l[d+13],21,1309151649),m=c(m,v,_,g,l[d+4],6,-145523070),g=c(g,m,v,_,l[d+11],10,-1120210379),_=c(_,g,m,v,l[d+2],15,718787259),v=c(v,_,g,m,l[d+9],21,-343485551),m=n(m,h),v=n(v,u),_=n(_,p),g=n(g,f);return i(m)+i(v)+i(_)+i(g)}(""+t+i)).slice(0,16),r=n.slice(0,12),s=await window.crypto.subtle.importKey("raw",n,"AES-GCM",!0,["encrypt"]);return new Uint8Array(await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},s,e))},pR=async(e,t,i)=>await fR(e.buffer,t,i);function gR(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function mR(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?gR(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gR(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class vR extends JT{get isPlaying(){return!(!this._player||this._player.videoElementStatus!==YT.PLAYING)}get processorContext(){return this._processorContext}set processorContext(e){this._processorContext=e}get __className__(){return"LocalVideoTrack"}constructor(e,t,i,n,r,s){if(super(e,r),oh(this,"trackMediaType","video"),oh(this,"_player",void 0),oh(this,"_videoVisibleTimer",null),oh(this,"_previousVideoVisibleStatus",void 0),oh(this,"_clearPreviousVideoVisibleStatus",(()=>this._previousVideoVisibleStatus=void 0)),oh(this,"_encoderConfig",void 0),oh(this,"_scalabilityMode",{numSpatialLayers:1,numTemporalLayers:1}),oh(this,"_optimizationMode",void 0),oh(this,"_videoHeight",void 0),oh(this,"_videoWidth",void 0),oh(this,"_forceBitrateLimit",void 0),oh(this,"_enabled",!0),oh(this,"processorDestination",void 0),oh(this,"_processorContext",void 0),Eb()){const{width:t,height:i}=e.getSettings();this._videoWidth=t,this._videoHeight=i}else this.updateMediaStreamTrackResolution();if(this._encoderConfig=t,this._scalabilityMode=i,this._optimizationMode=n,this._hints=s||[],-1===this._hints.indexOf(NT.SCREEN_TRACK))this.updateBitrateFromProfile();else if(function(e,t,i){const n=pb();return!(n.name!==e||!n.osVersion)&&(i?Number(n.version)>=t&&Number(n.version)<=i:Number(n.version)===t)}(lb.CHROME,115)&&-1!==gb().indexOf("Windows")){const t=function(e,t){if("VideoFrame"in window&&"TransformStream"in window&&uA().supportWebRTCInsertableStream){const i=new MediaStreamTrackProcessor(e),n=new MediaStreamTrackGenerator({kind:"video"});let r,s,o=Date.now();const a=()=>{c&&(clearInterval(c),c=void 0),r&&(r.close(),r=void 0),e.stop(),s=void 0,n.removeEventListener("ended",a)};let c=window.setInterval((()=>{if(s&&r&&Date.now()-o>(null!=t?t:1e3))try{"live"===n.readyState?s.enqueue(r.clone()):a()}catch(e){a()}}),null!=t?t:1e3);const l=new TransformStream({transform:(e,t)=>{"live"===n.readyState?(s=t,o=Date.now(),void 0===r?(r=e,t.enqueue(e.clone())):(t.enqueue(r),r=e)):e.close()}});return n.addEventListener("ended",a),i.readable.pipeThrough(l).pipeTo(n.writable),n}}(e);t&&($C.info("local screen video track begin to inject frame"),this._mediaStreamTrack=t)}t&&-1!==this._hints.indexOf(NT.CUSTOM_TRACK)&&this.setEncoderConfiguration(t),this.processorContext=new FA(this.getTrackId(),"local"),this.processorDestination=new BA(this.processorContext),this.bindProcessorDestinationEvents()}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e){const t=document.getElementById(e);t?e=t:($C.warning("[".concat(this.getTrackId(),'] can not find "#').concat(e,'" element, use document.body')),e=document.body)}$C.debug("[".concat(this.getTrackId(),"] start video playback in ").concat(e instanceof HTMLVideoElement?"HTMLVideoElement":"HTMLElement"),JSON.stringify(t));const i=mR(mR(mR({},this._getDefaultPlayerConfig()),t),{},{trackId:this.getTrackId(),element:e});this._player?this._player.updateConfig(i):(e instanceof HTMLVideoElement?this._player=new lR(i):this._player=new uR(i),this._player.updateVideoTrack(this._mediaStreamTrack)),this._player.play(),this._videoVisibleTimer&&window.clearInterval(this._videoVisibleTimer),this._clearPreviousVideoVisibleStatus(),this._videoVisibleTimer=window.setInterval((()=>{try{const e=this.getVideoElementVisibleStatus();this.safeEmit(PT.VIDEO_ELEMENT_VISIBLE_STATUS,e)}catch(e){}}),xC("CHECK_VIDEO_VISIBLE_INTERVAL"))}stop(){this._player&&(this._videoVisibleTimer&&(window.clearInterval(this._videoVisibleTimer),this._videoVisibleTimer=null),this._clearPreviousVideoVisibleStatus(),this._player.destroy(),this._player=void 0,$C.debug("[".concat(this.getTrackId(),"] stop video playback")))}async setEnabled(e,t){if(!t){if(e===this._enabled)return;this.stateCheck("enabled",e)}if($C.info("[".concat(this.getTrackId(),"] start setEnabled"),e),!e){this._originMediaStreamTrack.enabled=!1;try{await __(this,kT.NEED_DISABLE_TRACK,this)}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setEnabled to false error"),e.toString()),e}return t||(this._enabled=!1),void $C.info("[".concat(this.getTrackId(),"] setEnabled to false success"))}this._originMediaStreamTrack.enabled=!0;try{await __(this,kT.NEED_ENABLE_TRACK,this)}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setEnabled to true error"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] setEnabled to true success")),t||(this._enabled=!0)}async setMuted(e){e!==this._muted&&(this.stateCheck("muted",e),this._muted=e,this._originMediaStreamTrack.enabled=!e,$C.debug("[".concat(this.getTrackId(),"] start set muted: ").concat(e)),e?await __(this,kT.NEED_MUTE_TRACK,this):await __(this,kT.NEED_UNMUTE_TRACK,this))}async setEncoderConfiguration(e,t){if(!this._enabled)throw new Fb(Bb.TRACK_IS_DISABLED,"can not set encoder configuration when track is disabled");if(e=wT(e),this._forceBitrateLimit&&(e.bitrateMax=this._forceBitrateLimit.max_bitrate?this._forceBitrateLimit.max_bitrate:e.bitrateMax,e.bitrateMin=this._forceBitrateLimit.min_bitrate?this._forceBitrateLimit.min_bitrate:e.bitrateMin),e.width||e.height||e.frameRate){const t=JA({encoderConfig:e});(Eb()||wb()||Lb())&&(t.deviceId=void 0),$C.debug("[".concat(this.getTrackId(),"] setEncoderConfiguration applyConstraints"),JSON.stringify(e),JSON.stringify(t));try{await this._originMediaStreamTrack.applyConstraints(t),this.updateMediaStreamTrackResolution()}catch(e){const t=new Fb(Bb.UNEXPECTED_ERROR,e.toString());throw $C.error("[".concat(this.getTrackId(),"] applyConstraints error"),t.toString()),t}}this._encoderConfig=e,-1===this._hints.indexOf(NT.SCREEN_TRACK)&&this.updateBitrateFromProfile();try{await __(this,kT.NEED_UPDATE_VIDEO_ENCODER,this)}catch(e){return e.throw($C)}}getStats(){return N_((()=>{$C.warning("[deprecated] LocalVideoTrack.getStats will be removed in the future, use AgoraRTCClient.getLocalVideoStats instead")}),"localVideoTrackGetStatsWarning"),y_(this,kT.GET_STATS)||mR({},jT)}async setBeautyEffect(e){$C.error("LocalVideoTrack.setBeautyEffect was deprecated, please migrate to agora-extension-beauty-effect")}getCurrentFrameData(){return this._player?this._player.getCurrentFrame():new ImageData(2,2)}async getCurrentFrameImage(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return this._player?this._player.getCurrentFrameToUint8Array(e,t):await iR(e)}async setBitrateLimit(e){if($C.debug("[".concat(this.getTrackId(),"] set bitrate limit, ").concat(JSON.stringify(e))),e){this._forceBitrateLimit=e,this._encoderConfig&&(this._encoderConfig.bitrateMax?this._encoderConfig.bitrateMax=this._encoderConfig.bitrateMax<e.max_bitrate?this._encoderConfig.bitrateMax:e.max_bitrate:this._encoderConfig.bitrateMax=e.max_bitrate,this._encoderConfig.bitrateMin,this._encoderConfig.bitrateMin=e.min_bitrate);try{await __(this,kT.NEED_UPDATE_VIDEO_ENCODER,this)}catch(e){return e.throw($C)}}}async setOptimizationMode(e){if("motion"!==e&&"detail"!==e&&"balanced"!==e)return void $C.error(Bb.INVALID_PARAMS,"optimization mode must be motion, detail or balanced");const t=this._optimizationMode;try{this._optimizationMode=e,await __(this,kT.SET_OPTIMIZATION_MODE,this)}catch(e){throw this._optimizationMode=t,$C.error("[".concat(this.getTrackId(),"] set optimization mode failed"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] set optimization mode success (").concat(e,")"))}setScalabiltyMode(e){if(1===e.numSpatialLayers&&1!==e.numTemporalLayers)return $C.error(Bb.INVALID_PARAMS,"scalability mode currently not supported, no SVC."),void(this._scalabilityMode={numSpatialLayers:1,numTemporalLayers:1});this._scalabilityMode=e,$C.info("[".concat(this.getTrackId(),"] set scalability mode success (").concat(e,")"))}updateMediaStreamTrackResolution(){hR(this._originMediaStreamTrack).then((e=>{let[t,i]=e;this._videoHeight=i,this._videoWidth=t})).catch(V_)}_updatePlayerSource(){this._player&&this._player.updateVideoTrack(this._mediaStreamTrack)}_getDefaultPlayerConfig(){return{fit:"contain"}}updateBitrateFromProfile(){if(!this._encoderConfig)return;const{width:e,height:t,frameRate:i}=this.getMediaStreamTrackSettings();if(!e||!t||!i)return;const[n,r]=function(e,t,i,n){let r;const s=200*Math.pow(i/15,.6)*Math.pow(e*t/640/360,.75),o=s;if("STANDARD_BITRATE"===n)r=4*s;else{if("COMPATIABLE_BITRATE"!==n)return;r=2*s}return[Math.floor(r),Math.floor(o)]}(e,t,i,xC("BITRATE_ADAPTER_TYPE"))||[void 0,void 0];this._encoderConfig.bitrateMin||this._encoderConfig.bitrateMax||(this._encoderConfig.bitrateMin=r,this._encoderConfig.bitrateMax=n,$C.debug("[".concat(this.getTrackId(),"] update bitrate from profile, [w: ").concat(e,", h: ").concat(t,", fps: ").concat(i,"] => [brMax: ").concat(n,", brMin: ").concat(r,"]")))}getVideoElementVisibleStatus(){try{var e,t;const i=null==this||null===(e=this._player)||void 0===e?void 0:e.getContainerElement(),n={track:this,element:null==this||null===(t=this._player)||void 0===t?void 0:t.getVideoElement(),slot:null==i?void 0:i.parentElement},{element:r,slot:s}=n;if(this.isPlaying&&r instanceof HTMLVideoElement&&s instanceof HTMLElement){const e=Qb.checkOneElementVisible(r),t=Object.assign({},e);if(t.visible!==this._previousVideoVisibleStatus){this._previousVideoVisibleStatus=t.visible;const e=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.LOCAL_VIDEO_TRACK_GET_VIDEO_VISIBLE,options:[this.getTrackId()]});t.visible?e.onSuccess("Video is visible"):e.onSuccess("Invisible because of ".concat(t.reason))}return t}return}catch(e){throw new Fb(Bb.GET_VIDEO_ELEMENT_VISIBLE_ERROR,e.message)}}async renewMediaStreamTrack(e){}pipe(e){if(this.processor===e)return e;if(e._source)throw new Fb(Bb.INVALID_OPERATION,"Processor ".concat(e.name," already piped, please call unpipe beforehand."));return this.unpipe(),this.processor=e,this.processor._source=this,e.updateInput({track:this._originMediaStreamTrack,context:this.processorContext}),e}unpipe(){if(!this.processor)return;const e=this.processor;this.processor._source=void 0,this.processor=void 0,e.reset()}close(){super.close(),this.unbindProcessorDestinationEvents(),this.unbindProcessorContextEvents(),this.unpipe(),this.processorDestination._source&&this.processorDestination._source.unpipe()}clone(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this._encoderConfig;e&&(i=mR(mR({},i),wT(e))),i=I_(i);const n=B_(8,"track-video-cloned-"),r=new vR(t?this._mediaStreamTrack.clone():this._mediaStreamTrack,i,I_(this._scalabilityMode),this._optimizationMode,n,I_(this._hints));return e&&i&&r.setEncoderConfiguration(i),$C.debug("clone video track from ".concat(this.getTrackId()," to ").concat(n,", clone ").concat(t)),r}async replaceTrack(e,t){if(!(e instanceof MediaStreamTrack))throw new Fb(Bb.INVALID_PARAMS,"track should be an instance of MediaStreamTrack");if("video"!==e.kind)throw new Fb(Bb.INVALID_PARAMS,"track should be a video MediaStreamTrack");await this._updateOriginMediaStreamTrack(e,t,!0),this.updateMediaStreamTrackResolution()}bindProcessorDestinationEvents(){this.processorDestination.on(WT.ON_TRACK,(async e=>{e?e!==this._mediaStreamTrack&&(this._mediaStreamTrack=e,this._updatePlayerSource(),await __(this,kT.NEED_REPLACE_TRACK,this)):this._mediaStreamTrack!==this._originMediaStreamTrack&&(this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource(),await __(this,kT.NEED_REPLACE_TRACK,this))}))}unbindProcessorDestinationEvents(){this.processorDestination.removeAllListeners(WT.ON_TRACK)}unbindProcessorContextEvents(){this.processorContext.removeAllListeners(KT.REQUEST_UPDATE_CONSTRAINTS),this.processorContext.removeAllListeners(KT.REQUEST_CONSTRAINTS)}}Mw([tw({argsMap:(e,t,i)=>[e.getTrackId(),"string"==typeof t?t:t instanceof HTMLVideoElement?"HTMLVideoElement":"HTMLElement",i]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Object,Object]),xw("design:returntype",void 0)],vR.prototype,"play",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],vR.prototype,"stop",null),Mw([q_("LocalVideoTrack","_enabledMutex"),tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Boolean]),xw("design:returntype",nb)],vR.prototype,"setEnabled",null),Mw([q_("LocalVideoTrack","_enabledMutex"),tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean]),xw("design:returntype",nb)],vR.prototype,"setMuted",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Object,Boolean]),xw("design:returntype",nb)],vR.prototype,"setEncoderConfiguration",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",Object)],vR.prototype,"getStats",null),Mw([tw({argsMap:(e,t,i)=>[e.getTrackId(),t,i]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Object]),xw("design:returntype",nb)],vR.prototype,"setBeautyEffect",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",ImageData)],vR.prototype,"getCurrentFrameData",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[String,Number]),xw("design:returntype",nb)],vR.prototype,"getCurrentFrameImage",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],vR.prototype,"setBitrateLimit",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],vR.prototype,"setOptimizationMode",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",void 0)],vR.prototype,"setScalabiltyMode",null),Mw([DA(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],vR.prototype,"updateMediaStreamTrackResolution",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t.name]}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",Object)],vR.prototype,"pipe",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],vR.prototype,"unpipe",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],vR.prototype,"close",null),Mw([tw({argsMap:(e,t,i)=>[e.getTrackId(),t.label,i]}),xw("design:type",Function),xw("design:paramtypes",[MediaStreamTrack,Boolean]),xw("design:returntype",nb)],vR.prototype,"replaceTrack",null);class bR extends vR{get __className__(){return"CameraVideoTrack"}constructor(e,t,i,n,r,s){super(e,wT(t.encoderConfig),n,r,s),oh(this,"_config",void 0),oh(this,"_originalConstraints",void 0),oh(this,"_constraints",void 0),oh(this,"_enabled",!0),oh(this,"_deviceName","default"),oh(this,"tryResumeVideoForIOS15_16WeChat",(async()=>{(Ib()||kb())&&!function(){const e=pb();if(e.os!==cb.IOS||!e.osVersion)return!1;const t=e.osVersion.split(".");return 15===Number(t[0])&&Number(t[1])>=2}()&&Mb()&&this._enabled&&!this._isClosed&&($C.debug("[".concat(this.getTrackId(),"] try capture camera media device for interrupted iOS 15 device on WeChat.")),await this.renewMediaStreamTrack())})),this._config=t,this._originalConstraints=i,this._constraints=i,this._deviceName=e.label,this._encoderConfig=wT(this._config.encoderConfig),rA.on(dT.IOS_15_16_INTERRUPTION_END,this.tryResumeVideoForIOS15_16WeChat),rA.on(dT.IOS_INTERRUPTION_END,this.tryResumeVideoForIOS15_16WeChat),this.bindProcessorContextEvents()}async setDevice(e){return"string"==typeof e?this._setDeviceById(e):e.deviceId?this._setDeviceById(e.deviceId):e.facingMode?this._setDeviceByFacingModel(e.facingMode):void 0}async _setDeviceById(e){if($C.info("[".concat(this.getTrackId(),"] set device to ").concat(e)),this._enabled)try{const t=await AA.getDeviceById(e),i={};i.video=mR({},this._constraints),i.video.deviceId={exact:e},i.video.facingMode=void 0,this._originMediaStreamTrack.stop();let n=null;try{n=await CA(i,this.getTrackId())}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice failed"),e.toString()),n=await CA({video:this._constraints},this.getTrackId()),await this._updateOriginMediaStreamTrack(n.getVideoTracks()[0],!1),e}await this._updateOriginMediaStreamTrack(n.getVideoTracks()[0],!1),this.updateMediaStreamTrackResolution(),this._deviceName=t.label,this._config.cameraId=e,this._constraints.deviceId={exact:e}}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice error"),e.toString()),e}else try{const t=await AA.getDeviceById(e);this._deviceName=t.label,this._config.cameraId=e,this._constraints.deviceId={exact:e}}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setDevice error"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] setDevice success"))}async _setDeviceByFacingModel(e){$C.info("[".concat(this.getTrackId(),"] set facingMode ").concat(e));const t={video:mR(mR({},this._constraints),{},{deviceId:void 0,facingMode:{exact:e}})};if(this._enabled){this._originMediaStreamTrack.stop();let e=null;try{e=await CA(t,this.getTrackId())}catch(t){throw $C.error("[".concat(this.getTrackId(),"] setDeviceByFacingModel failed"),t.toString()),e=await CA({video:this._constraints},this.getTrackId()),await this._updateOriginMediaStreamTrack(e.getVideoTracks()[0],!1),t}await this._updateOriginMediaStreamTrack(e.getVideoTracks()[0],!1),this.updateMediaStreamTrackResolution()}this._deviceName="",this._config.facingMode=e,this._config.cameraId=void 0,this._constraints=mR({},t.video),$C.info("[".concat(this.getTrackId(),"] setDeviceByFacingModel success"))}async setEnabled(e,t){if(!t){if(e===this._enabled)return;this.stateCheck("enabled",e)}if($C.info("[".concat(this.getTrackId(),"] start setEnabled"),e),e){try{if(this.isExternalTrack)this._originMediaStreamTrack.enabled=!0;else{const e=await CA({video:this._constraints},this.getTrackId());await this._updateOriginMediaStreamTrack(e.getVideoTracks()[0],!1)}await __(this,kT.NEED_ENABLE_TRACK,this)}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setEnabled true error"),e.toString()),e}this.updateMediaStreamTrackResolution(),$C.info("[".concat(this.getTrackId(),"] setEnabled to true success")),t||(this._enabled=!0)}else{this.isExternalTrack?this._originMediaStreamTrack.enabled=!1:(this._originMediaStreamTrack.onended=null,this._originMediaStreamTrack.stop()),t||(this._enabled=!1);try{await __(this,kT.NEED_DISABLE_TRACK,this)}catch(e){throw $C.error("[".concat(this.getTrackId(),"] setEnabled to false error"),e.toString()),e}$C.info("[".concat(this.getTrackId(),"] setEnabled to false success"))}}async setEncoderConfiguration(e,t){if(!this._enabled)throw new Fb(Bb.TRACK_IS_DISABLED,"can not set encoder configuration when track is disabled");e=wT(e),this._forceBitrateLimit&&(e.bitrateMax=this._forceBitrateLimit.max_bitrate?this._forceBitrateLimit.max_bitrate:e.bitrateMax,e.bitrateMin=this._forceBitrateLimit.min_bitrate?this._forceBitrateLimit.min_bitrate:e.bitrateMin);const i=O_(this._config);i.encoderConfig=e;const n=JA(i);(Eb()||wb()||Lb())&&(n.deviceId=void 0),$C.debug("[".concat(this.getTrackId(),"] setEncoderConfiguration applyConstraints"),JSON.stringify(e),JSON.stringify(n));try{await this._originMediaStreamTrack.applyConstraints(n),this.updateMediaStreamTrackResolution()}catch(e){const t=new Fb(Bb.UNEXPECTED_ERROR,e.toString());throw $C.error("[".concat(this.getTrackId(),"] applyConstraints error"),t.toString()),t}this._config=i,this._constraints=n,this._originalConstraints=n,this._encoderConfig=e,-1===this._hints.indexOf(NT.SCREEN_TRACK)&&this.updateBitrateFromProfile();try{await __(this,kT.NEED_UPDATE_VIDEO_ENCODER,this)}catch(e){return e.throw($C)}}_getDefaultPlayerConfig(){return{mirror:!0,fit:"cover"}}onTrackEnded(){if((wb()||Lb())&&this._enabled&&!this._isClosed&&rA.duringInterruption){const e=async()=>{rA.off(dT.IOS_INTERRUPTION_END,e),this._enabled&&!this._isClosed&&($C.debug("[".concat(this.getTrackId(),"] try capture camera media device for interrupted iOS device.")),await this.setEnabled(!1),await this.setEnabled(!0))};rA.on(dT.IOS_INTERRUPTION_END,e)}else $C.debug("[".concat(this.getTrackId(),"] track ended")),this.safeEmit(PT.TRACK_ENDED)}async renewMediaStreamTrack(e){const t=e||this._constraints,i=AA.searchDeviceIdByName(this._deviceName);if(i&&!t.deviceId&&(t.deviceId={exact:i}),this._enabled){const e=await CA({video:t},this.getTrackId());this._constraints=t,await this._updateOriginMediaStreamTrack(e.getVideoTracks()[0],!0),this.updateMediaStreamTrackResolution()}}close(){super.close(),rA.off(dT.IOS_15_16_INTERRUPTION_END,this.tryResumeVideoForIOS15_16WeChat),rA.off(dT.IOS_INTERRUPTION_END,this.tryResumeVideoForIOS15_16WeChat)}clone(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this._encoderConfig;e&&(i=mR(mR({},i),wT(e))),i=I_(i);const n=B_(8,"track-cam-cloned-"),r=new bR(t?this._mediaStreamTrack.clone():this._mediaStreamTrack,I_(mR(mR({},this._config),{},{encoderConfig:i})),I_(this._constraints),I_(this._scalabilityMode),this._optimizationMode,n);return e&&i&&r.setEncoderConfiguration(i),$C.debug("clone track from ".concat(this.getTrackId()," to ").concat(n,", clone ").concat(t)),r}bindProcessorContextEvents(){this.processorContext.on(KT.REQUEST_UPDATE_CONSTRAINTS,(async(e,t,i)=>{try{const i=Object.assign({},this._originalConstraints,...e);await this.renewMediaStreamTrack(i),t()}catch(e){i(e)}})),this.processorContext.on(KT.REQUEST_CONSTRAINTS,(async e=>{e(this._originMediaStreamTrack.getSettings())}))}}function _R(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function yR(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_R(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_R(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ER(e,t,i,n){i.optimizationMode&&(n&&n.width&&n.height?(i.encoderConfig=yR(yR({},n),{},{bitrateMin:n.bitrateMin,bitrateMax:n.bitrateMax}),"motion"!==i.optimizationMode&&"detail"!==i.optimizationMode||(t.contentHint=i.optimizationMode,t.contentHint===i.optimizationMode?$C.debug("[".concat(e,"] set content hint to"),i.optimizationMode):$C.debug("[".concat(e,"] set content hint failed")))):$C.warning("[".concat(e,"] can not apply optimization mode bitrate config, no encoderConfig")))}function CR(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function wR(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?CR(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):CR(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],bR.prototype,"setDevice",null),Mw([q_("CameraVideoTrack","_enabledMutex"),tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Boolean]),xw("design:returntype",nb)],bR.prototype,"setEnabled",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),DA(),xw("design:type",Function),xw("design:paramtypes",[Object,Boolean]),xw("design:returntype",nb)],bR.prototype,"setEncoderConfiguration",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],bR.prototype,"close",null);class SR extends QT{getUserId(){return this._userId}constructor(e,t,i,n){super(e,"track-".concat(e.kind,"-").concat(t,"-").concat(n.clientId,"_").concat(B_(5,""))),oh(this,"_userId",void 0),oh(this,"_uintId",void 0),oh(this,"_isDestroyed",!1),oh(this,"store",void 0),oh(this,"processor",void 0),this._userId=t,this._uintId=i,this.store=n}_updateOriginMediaStreamTrack(e){this._originMediaStreamTrack=e,this._mediaStreamTrack=e,this._updatePlayerSource(),this.processor&&this.processor.updateInput({track:this._originMediaStreamTrack,context:this.processorContext})}_destroy(){this._isDestroyed=!0,$C.info("[".concat(this.getTrackId(),"] is destroyed")),this.stop(),super.close()}getProcessorStats(){return this.processorContext.gatherStats()}getProcessorUsage(){return this.processorContext.gatherUsage()}}class TR extends SR{get isPlaying(){return!(!this._player||this._player.videoElementStatus!==YT.PLAYING)}get __className__(){return"RemoteVideoTrack"}constructor(e,t,i,n){super(e,t,i,n),oh(this,"_videoVisibleTimer",null),oh(this,"_previousVideoVisibleStatus",void 0),oh(this,"_clearPreviousVideoVisibleStatus",(()=>this._previousVideoVisibleStatus=void 0)),oh(this,"trackMediaType","video"),oh(this,"_videoWidth",void 0),oh(this,"_videoHeight",void 0),oh(this,"_player",void 0),oh(this,"processorDestination",void 0),oh(this,"processorContext",void 0),this.updateMediaStreamTrackResolution(),this.processorContext=new FA(this.getTrackId(),"remote"),this.processorDestination=new BA(this.processorContext),this.bindProcessorDestinationEvents()}getStats(){return N_((()=>{$C.warning("[deprecated] RemoteVideoTrack.getStats will be removed in the future, use AgoraRTCClient.getRemoteVideoStats instead")}),"remoteVideoTrackGetStatsWarning"),y_(this,kT.GET_STATS)||wR({},zT)}play(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof e){const t=document.getElementById(e);t?e=t:($C.warning("[".concat(this.getTrackId(),'] can not find "#').concat(e,'" element, use document.body')),e=document.body)}$C.debug("[".concat(this.getTrackId(),"] start video playback in ").concat(e instanceof HTMLVideoElement?"HTMLVideoElement":"HTMLElement"),JSON.stringify(t));const i=wR(wR({fit:"cover"},t),{},{trackId:this.getTrackId(),element:e});this._player?this._player.updateConfig(i):(e instanceof HTMLVideoElement?this._player=new lR(i):this._player=new uR(i),this._player.updateVideoTrack(this._mediaStreamTrack),this._player.onFirstVideoFrameDecoded=()=>{this.store.subscribe(this.getUserId(),"video",void 0,void 0,Date.now()),this.safeEmit(UT.FIRST_FRAME_DECODED)}),this._player.play(this.store.sessionId||void 0),this._videoVisibleTimer&&window.clearInterval(this._videoVisibleTimer),this._clearPreviousVideoVisibleStatus(),this._videoVisibleTimer=window.setInterval((()=>{try{const e=this.getVideoElementVisibleStatus();this.safeEmit(UT.VIDEO_ELEMENT_VISIBLE_STATUS,e)}catch(e){}}),xC("CHECK_VIDEO_VISIBLE_INTERVAL"))}stop(){this._player&&(this._videoVisibleTimer&&(window.clearInterval(this._videoVisibleTimer),this._videoVisibleTimer=null),this._clearPreviousVideoVisibleStatus(),this._player.destroy(),this._player=void 0,$C.debug("[".concat(this.getTrackId(),"] stop video playback")))}getCurrentFrameData(){return this._player?this._player.getCurrentFrame():new ImageData(2,2)}updateMediaStreamTrackResolution(){hR(this._originMediaStreamTrack).then((e=>{let[t,i]=e;this._videoHeight=i,this._videoWidth=t})).catch(V_)}_updatePlayerSource(){$C.debug("[".concat(this.getTrackId(),"] update player source track")),this._player&&this._player.updateVideoTrack(this._mediaStreamTrack)}getVideoElementVisibleStatus(){try{var e,t;const i=null==this||null===(e=this._player)||void 0===e?void 0:e.getContainerElement(),n={track:this,element:null==this||null===(t=this._player)||void 0===t?void 0:t.getVideoElement(),slot:null==i?void 0:i.parentElement},{element:r,slot:s}=n;if(this.isPlaying&&r instanceof HTMLVideoElement&&s instanceof HTMLElement){const e=Qb.checkOneElementVisible(r),t=Object.assign({},e);if(t.visible!==this._previousVideoVisibleStatus){this._previousVideoVisibleStatus=t.visible;const e=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.REMOTE_VIDEO_TRACK_GET_VIDEO_VISIBLE,options:[this.getTrackId()]});t.visible?e.onSuccess("Video is visible"):e.onSuccess("Invisible because of ".concat(t.reason))}return t}return}catch(e){throw new Fb(Bb.GET_VIDEO_ELEMENT_VISIBLE_ERROR,e.message)}}pipe(e){if(this.processor===e)return e;if(e._source)throw new Fb(Bb.INVALID_OPERATION,"Processor ".concat(e.name," already piped, please call unpipe beforehand."));return this.unpipe(),this.processor=e,this.processor._source=this,e.updateInput({track:this._originMediaStreamTrack,context:this.processorContext}),e}unpipe(){if(!this.processor)return;const e=this.processor;this.processor._source=void 0,this.processor=void 0,e.reset()}bindProcessorDestinationEvents(){this.processorDestination.on(WT.ON_TRACK,(async e=>{e?e!==this._mediaStreamTrack&&(this._mediaStreamTrack=e,this._updatePlayerSource()):this._mediaStreamTrack!==this._originMediaStreamTrack&&(this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource())}))}unbindProcessorDestinationEvents(){this.processorDestination.removeAllListeners(WT.ON_TRACK)}_destroy(){super._destroy(),this.unbindProcessorDestinationEvents()}}Mw([tw({argsMap:(e,t,i)=>[e.getTrackId(),"string"==typeof t?t:t instanceof HTMLVideoElement?"HTMLVideoElement":"HTMLElement",i]}),xw("design:type",Function),xw("design:paramtypes",[Object,Object]),xw("design:returntype",void 0)],TR.prototype,"play",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],TR.prototype,"stop",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t.name]}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",Object)],TR.prototype,"pipe",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],TR.prototype,"unpipe",null);class AR extends SR{get isPlaying(){return this._useAudioElement?xA.isPlaying(this.getTrackId()):this._source.isPlayed}get __className__(){return"RemoteAudioTrack"}constructor(e,t,i,n){super(e,t,i,n),oh(this,"trackMediaType","audio"),oh(this,"_source",void 0),oh(this,"_useAudioElement",!0),oh(this,"_volume",100),oh(this,"processorContext",void 0),oh(this,"processorDestination",void 0),oh(this,"_played",!1),oh(this,"_bypassWebAudio",!1),xC("DISABLE_WEBAUDIO")?(this._source=new HA,this._bypassWebAudio=!0,this._useAudioElement=!0):(this._source=new pA(e,!0),xC("REMOTE_AUDIO_TRACK_USES_WEB_AUDIO")&&(this._useAudioElement=!1)),this._source.once(BT.RECEIVE_TRACK_BUFFER,(()=>{this.safeEmit(UT.FIRST_FRAME_DECODED)})),this.processorContext=new jA(this._source.context,this.getTrackId(),"remote"),this.processorDestination=new VA(this.processorContext),this.bindProcessorDestinationEvents(),this._source.on(BT.UPDATE_SOURCE,(()=>{this.processor&&this.processor.updateInput({node:this._source.processSourceNode,context:this.processorContext})}))}setAudioFrameCallback(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4096;if(!e)return this._source.removeAllListeners(BT.ON_AUDIO_BUFFER),void this._source.stopGetAudioBuffer();this._source.startGetAudioBuffer(t),this._source.removeAllListeners(BT.ON_AUDIO_BUFFER),this._source.on(BT.ON_AUDIO_BUFFER,(t=>e(t)))}setVolume(e){this._volume=e,this._useAudioElement?xA.setVolume(this.getTrackId(),e):this._source.setVolume(e/100)}async setPlaybackDevice(e){if(!this._useAudioElement)throw new Fb(Bb.NOT_SUPPORTED,"your browser does not support setting the audio output device");await xA.setSinkID(this.getTrackId(),e)}getVolumeLevel(){return this._source.getAccurateVolumeLevel()}getStats(){return N_((()=>{$C.warning("[deprecated] RemoteAudioTrack.getStats will be removed in the future, use AgoraRTCClient.getRemoteAudioStats instead")}),"remoteAudioTrackGetStatsWarning"),y_(this,kT.GET_STATS)||wR({},HT)}play(){$C.debug("[".concat(this.getTrackId(),"] start audio playback")),this._played=!0,this._useAudioElement?($C.debug("[".concat(this.getTrackId(),"] use audio element to play")),xA.play(this._mediaStreamTrack,this.getTrackId(),this._volume,this.store.sessionId||void 0)):this._source.play()}stop(){$C.debug("[".concat(this.getTrackId(),"] stop audio playback")),this._played=!1,this._useAudioElement?xA.stop(this.getTrackId()):this._source.stop()}_destroy(){super._destroy(),this._played=!1,this.unbindProcessorDestinationEvents(),this._source.destroy()}_isFreeze(){return this._source.isFreeze}_updatePlayerSource(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];$C.debug("[".concat(this.getTrackId(),"] update player source track")),e&&this._source.updateTrack(this._mediaStreamTrack),this._useAudioElement&&xA.updateTrack(this.getTrackId(),this._mediaStreamTrack)}pipe(e){if(this._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"can not pipe extension when WebAudio disabled");if(this.processor===e)return e;if(e._source)throw new Fb(Bb.INVALID_OPERATION,"Processor ".concat(e.name," already piped, please call unpipe beforehand."));return this.unpipe(),this.processor=e,this.processor._source=this,e.updateInput({track:this._originMediaStreamTrack,node:this._source.processSourceNode,context:this.processorContext}),e}unpipe(){var e;if(this._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"can not unpipe extension when WebAudio disabled");if(!this.processor)return;const t=this.processor;null===(e=this._source.processSourceNode)||void 0===e||e.disconnect(),this.processor._source=!1,this.processor=void 0,t.reset()}bindProcessorDestinationEvents(){this.processorDestination.on(WT.ON_TRACK,(async e=>{e?e!==this._mediaStreamTrack&&(this._mediaStreamTrack=e,this._updatePlayerSource(!1),this._source.processedNode=this._source.createMediaStreamSourceNode(e)):this._mediaStreamTrack!==this._originMediaStreamTrack&&(this._mediaStreamTrack=this._originMediaStreamTrack,this._updatePlayerSource())})),this.processorDestination.on(WT.ON_NODE,(e=>{this._source.processedNode=e;const t=!e;this._useAudioElement!==t&&(this._played?(this.stop(),this._useAudioElement=t,this.play()):this._useAudioElement=t)}))}unbindProcessorDestinationEvents(){this.processorDestination.removeAllListeners(WT.ON_TRACK),this.processorDestination.removeAllListeners(WT.ON_NODE)}}function RR(e){let t=e.length;for(;--t>=0;)e[t]=0}Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t],throttleTime:300}),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",void 0)],AR.prototype,"setVolume",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t]}),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],AR.prototype,"setPlaybackDevice",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],AR.prototype,"play",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],AR.prototype,"stop",null),Mw([tw({argsMap:(e,t)=>[e.getTrackId(),t.name]}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",Object)],AR.prototype,"pipe",null),Mw([tw({argsMap:e=>[e.getTrackId()]}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],AR.prototype,"unpipe",null);const OR=256,IR=286,kR=30,NR=15,LR=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),MR=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),xR=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),DR=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),PR=new Array(576);RR(PR);const UR=new Array(60);RR(UR);const BR=new Array(512);RR(BR);const FR=new Array(256);RR(FR);const VR=new Array(29);RR(VR);const jR=new Array(kR);function HR(e,t,i,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=i,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let $R,zR,WR;function KR(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}RR(jR);const GR=e=>e<256?BR[e]:BR[256+(e>>>7)],qR=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},YR=(e,t,i)=>{e.bi_valid>16-i?(e.bi_buf|=t<<e.bi_valid&65535,qR(e,e.bi_buf),e.bi_buf=t>>16-e.bi_valid,e.bi_valid+=i-16):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=i)},XR=(e,t,i)=>{YR(e,i[2*t],i[2*t+1])},ZR=(e,t)=>{let i=0;do{i|=1&e,e>>>=1,i<<=1}while(--t>0);return i>>>1},QR=(e,t,i)=>{const n=new Array(16);let r,s,o=0;for(r=1;r<=NR;r++)o=o+i[r-1]<<1,n[r]=o;for(s=0;s<=t;s++){let t=e[2*s+1];0!==t&&(e[2*s]=ZR(n[t]++,t))}},JR=e=>{let t;for(t=0;t<IR;t++)e.dyn_ltree[2*t]=0;for(t=0;t<kR;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},eO=e=>{e.bi_valid>8?qR(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},tO=(e,t,i,n)=>{const r=2*t,s=2*i;return e[r]<e[s]||e[r]===e[s]&&n[t]<=n[i]},nO=(e,t,i)=>{const n=e.heap[i];let r=i<<1;for(;r<=e.heap_len&&(r<e.heap_len&&tO(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!tO(t,n,e.heap[r],e.depth));)e.heap[i]=e.heap[r],i=r,r<<=1;e.heap[i]=n},rO=(e,t,i)=>{let n,r,s,o,a=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+a++],n+=(255&e.pending_buf[e.sym_buf+a++])<<8,r=e.pending_buf[e.sym_buf+a++],0===n?XR(e,r,t):(s=FR[r],XR(e,s+OR+1,t),o=LR[s],0!==o&&(r-=VR[s],YR(e,r,o)),n--,s=GR(n),XR(e,s,i),o=MR[s],0!==o&&(n-=jR[s],YR(e,n,o)))}while(a<e.sym_next);XR(e,256,t)},iO=(e,t)=>{const i=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,s=t.stat_desc.elems;let o,a,c,l=-1;for(e.heap_len=0,e.heap_max=573,o=0;o<s;o++)0!==i[2*o]?(e.heap[++e.heap_len]=l=o,e.depth[o]=0):i[2*o+1]=0;for(;e.heap_len<2;)c=e.heap[++e.heap_len]=l<2?++l:0,i[2*c]=1,e.depth[c]=0,e.opt_len--,r&&(e.static_len-=n[2*c+1]);for(t.max_code=l,o=e.heap_len>>1;o>=1;o--)nO(e,i,o);c=s;do{o=e.heap[1],e.heap[1]=e.heap[e.heap_len--],nO(e,i,1),a=e.heap[1],e.heap[--e.heap_max]=o,e.heap[--e.heap_max]=a,i[2*c]=i[2*o]+i[2*a],e.depth[c]=(e.depth[o]>=e.depth[a]?e.depth[o]:e.depth[a])+1,i[2*o+1]=i[2*a+1]=c,e.heap[1]=c++,nO(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const i=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,s=t.stat_desc.has_stree,o=t.stat_desc.extra_bits,a=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,d,h,u,p,f,m=0;for(u=0;u<=NR;u++)e.bl_count[u]=0;for(i[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)d=e.heap[l],u=i[2*i[2*d+1]+1]+1,u>c&&(u=c,m++),i[2*d+1]=u,d>n||(e.bl_count[u]++,p=0,d>=a&&(p=o[d-a]),f=i[2*d],e.opt_len+=f*(u+p),s&&(e.static_len+=f*(r[2*d+1]+p)));if(0!==m){do{for(u=c-1;0===e.bl_count[u];)u--;e.bl_count[u]--,e.bl_count[u+1]+=2,e.bl_count[c]--,m-=2}while(m>0);for(u=c;0!==u;u--)for(d=e.bl_count[u];0!==d;)h=e.heap[--l],h>n||(i[2*h+1]!==u&&(e.opt_len+=(u-i[2*h+1])*i[2*h],i[2*h+1]=u),d--)}})(e,t),QR(i,l,e.bl_count)},oO=(e,t,i)=>{let n,r,s=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),t[2*(i+1)+1]=65535,n=0;n<=i;n++)r=o,o=t[2*(n+1)+1],++a<c&&r===o||(a<l?e.bl_tree[2*r]+=a:0!==r?(r!==s&&e.bl_tree[2*r]++,e.bl_tree[32]++):a<=10?e.bl_tree[34]++:e.bl_tree[36]++,a=0,s=r,0===o?(c=138,l=3):r===o?(c=6,l=3):(c=7,l=4))},aO=(e,t,i)=>{let n,r,s=-1,o=t[1],a=0,c=7,l=4;for(0===o&&(c=138,l=3),n=0;n<=i;n++)if(r=o,o=t[2*(n+1)+1],!(++a<c&&r===o)){if(a<l)do{XR(e,r,e.bl_tree)}while(0!=--a);else 0!==r?(r!==s&&(XR(e,r,e.bl_tree),a--),XR(e,16,e.bl_tree),YR(e,a-3,2)):a<=10?(XR(e,17,e.bl_tree),YR(e,a-3,3)):(XR(e,18,e.bl_tree),YR(e,a-11,7));a=0,s=r,0===o?(c=138,l=3):r===o?(c=6,l=3):(c=7,l=4)}};let sO=!1;const cO=(e,t,i,n)=>{YR(e,0+(n?1:0),3),eO(e),qR(e,i),qR(e,~i),i&&e.pending_buf.set(e.window.subarray(t,t+i),e.pending),e.pending+=i};var lO=(e,t,i,n)=>{let r,s,o=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,i=4093624447;for(t=0;t<=31;t++,i>>>=1)if(1&i&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<OR;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),iO(e,e.l_desc),iO(e,e.d_desc),o=(e=>{let t;for(oO(e,e.dyn_ltree,e.l_desc.max_code),oO(e,e.dyn_dtree,e.d_desc.max_code),iO(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*DR[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),r=e.opt_len+3+7>>>3,s=e.static_len+3+7>>>3,s<=r&&(r=s)):r=s=i+5,i+4<=r&&-1!==t?cO(e,t,i,n):4===e.strategy||s===r?(YR(e,2+(n?1:0),3),rO(e,PR,UR)):(YR(e,4+(n?1:0),3),((e,t,i,n)=>{let r;for(YR(e,t-257,5),YR(e,i-1,5),YR(e,n-4,4),r=0;r<n;r++)YR(e,e.bl_tree[2*DR[r]+1],3);aO(e,e.dyn_ltree,t-1),aO(e,e.dyn_dtree,i-1)})(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),rO(e,e.dyn_ltree,e.dyn_dtree)),JR(e),n&&eO(e)},dO={_tr_init:e=>{sO||((()=>{let e,t,i,n,r;const s=new Array(16);for(i=0,n=0;n<28;n++)for(VR[n]=i,e=0;e<1<<LR[n];e++)FR[i++]=n;for(FR[i-1]=n,r=0,n=0;n<16;n++)for(jR[n]=r,e=0;e<1<<MR[n];e++)BR[r++]=n;for(r>>=7;n<kR;n++)for(jR[n]=r<<7,e=0;e<1<<MR[n]-7;e++)BR[256+r++]=n;for(t=0;t<=NR;t++)s[t]=0;for(e=0;e<=143;)PR[2*e+1]=8,e++,s[8]++;for(;e<=255;)PR[2*e+1]=9,e++,s[9]++;for(;e<=279;)PR[2*e+1]=7,e++,s[7]++;for(;e<=287;)PR[2*e+1]=8,e++,s[8]++;for(QR(PR,287,s),e=0;e<kR;e++)UR[2*e+1]=5,UR[2*e]=ZR(e,5);$R=new HR(PR,LR,257,IR,NR),zR=new HR(UR,MR,0,kR,NR),WR=new HR(new Array(0),xR,0,19,7)})(),sO=!0),e.l_desc=new KR(e.dyn_ltree,$R),e.d_desc=new KR(e.dyn_dtree,zR),e.bl_desc=new KR(e.bl_tree,WR),e.bi_buf=0,e.bi_valid=0,JR(e)},_tr_stored_block:cO,_tr_flush_block:lO,_tr_tally:(e,t,i)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=i,0===t?e.dyn_ltree[2*i]++:(e.matches++,t--,e.dyn_ltree[2*(FR[i]+OR+1)]++,e.dyn_dtree[2*GR(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{YR(e,2,3),XR(e,256,PR),(e=>{16===e.bi_valid?(qR(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},uO=(e,t,i,n)=>{let r=65535&e|0,s=e>>>16&65535|0,o=0;for(;0!==i;){o=i>2e3?2e3:i,i-=o;do{r=r+t[n++]|0,s=s+r|0}while(--o);r%=65521,s%=65521}return r|s<<16|0};const hO=new Uint32Array((()=>{let e,t=[];for(var i=0;i<256;i++){e=i;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[i]=e}return t})());var fO=(e,t,i,n)=>{const r=hO,s=n+i;e^=-1;for(let i=n;i<s;i++)e=e>>>8^r[255&(e^t[i])];return-1^e},pO={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},gO={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:mO,_tr_stored_block:vO,_tr_flush_block:bO,_tr_tally:_O,_tr_align:yO}=dO,{Z_NO_FLUSH:EO,Z_PARTIAL_FLUSH:CO,Z_FULL_FLUSH:wO,Z_FINISH:SO,Z_BLOCK:TO,Z_OK:AO,Z_STREAM_END:RO,Z_STREAM_ERROR:OO,Z_DATA_ERROR:IO,Z_BUF_ERROR:kO,Z_DEFAULT_COMPRESSION:NO,Z_FILTERED:LO,Z_HUFFMAN_ONLY:MO,Z_RLE:xO,Z_FIXED:DO,Z_DEFAULT_STRATEGY:PO,Z_UNKNOWN:UO,Z_DEFLATED:BO}=gO,FO=286,VO=30,jO=19,HO=2*FO+1,$O=15,zO=258,WO=262,KO=42,GO=113,qO=666,YO=(e,t)=>(e.msg=pO[t],t),XO=e=>2*e-(e>4?9:0),ZO=e=>{let t=e.length;for(;--t>=0;)e[t]=0},QO=e=>{let t,i,n,r=e.w_size;t=e.hash_size,n=t;do{i=e.head[--n],e.head[n]=i>=r?i-r:0}while(--t);t=r,n=t;do{i=e.prev[--n],e.prev[n]=i>=r?i-r:0}while(--t)};let JO=(e,t,i)=>(t<<e.hash_shift^i)&e.hash_mask;const eI=e=>{const t=e.state;let i=t.pending;i>e.avail_out&&(i=e.avail_out),0!==i&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+i),e.next_out),e.next_out+=i,t.pending_out+=i,e.total_out+=i,e.avail_out-=i,t.pending-=i,0===t.pending&&(t.pending_out=0))},tI=(e,t)=>{bO(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,eI(e.strm)},nI=(e,t)=>{e.pending_buf[e.pending++]=t},rI=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},iI=(e,t,i,n)=>{let r=e.avail_in;return r>n&&(r=n),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),i),1===e.state.wrap?e.adler=uO(e.adler,t,r,i):2===e.state.wrap&&(e.adler=fO(e.adler,t,r,i)),e.next_in+=r,e.total_in+=r,r)},oI=(e,t)=>{let i,n,r=e.max_chain_length,s=e.strstart,o=e.prev_length,a=e.nice_match;const c=e.strstart>e.w_size-WO?e.strstart-(e.w_size-WO):0,l=e.window,d=e.w_mask,h=e.prev,u=e.strstart+zO;let p=l[s+o-1],f=l[s+o];e.prev_length>=e.good_match&&(r>>=2),a>e.lookahead&&(a=e.lookahead);do{if(i=t,l[i+o]===f&&l[i+o-1]===p&&l[i]===l[s]&&l[++i]===l[s+1]){s+=2,i++;do{}while(l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&l[++s]===l[++i]&&s<u);if(n=zO-(u-s),s=u-zO,n>o){if(e.match_start=t,o=n,n>=a)break;p=l[s+o-1],f=l[s+o]}}}while((t=h[t&d])>c&&0!=--r);return o<=e.lookahead?o:e.lookahead},aI=e=>{const t=e.w_size;let i,n,r;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-WO)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),QO(e),n+=t),0===e.strm.avail_in)break;if(i=iI(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=i,e.lookahead+e.insert>=3)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=JO(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=JO(e,e.ins_h,e.window[r+3-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead<WO&&0!==e.strm.avail_in)},sI=(e,t)=>{let i,n,r,s=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,o=0,a=e.strm.avail_in;do{if(i=65535,r=e.bi_valid+42>>3,e.strm.avail_out<r)break;if(r=e.strm.avail_out-r,n=e.strstart-e.block_start,i>n+e.strm.avail_in&&(i=n+e.strm.avail_in),i>r&&(i=r),i<s&&(0===i&&t!==SO||t===EO||i!==n+e.strm.avail_in))break;o=t===SO&&i===n+e.strm.avail_in?1:0,vO(e,0,0,o),e.pending_buf[e.pending-4]=i,e.pending_buf[e.pending-3]=i>>8,e.pending_buf[e.pending-2]=~i,e.pending_buf[e.pending-1]=~i>>8,eI(e.strm),n&&(n>i&&(n=i),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,i-=n),i&&(iI(e.strm,e.strm.output,e.strm.next_out,i),e.strm.next_out+=i,e.strm.avail_out-=i,e.strm.total_out+=i)}while(0===o);return a-=e.strm.avail_in,a&&(a>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=a&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-a,e.strm.next_in),e.strstart),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.block_start=e.strstart),e.high_water<e.strstart&&(e.high_water=e.strstart),o?4:t!==EO&&t!==SO&&0===e.strm.avail_in&&e.strstart===e.block_start?2:(r=e.window_size-e.strstart,e.strm.avail_in>r&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,r+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),r>e.strm.avail_in&&(r=e.strm.avail_in),r&&(iI(e.strm,e.window,e.strstart,r),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.high_water<e.strstart&&(e.high_water=e.strstart),r=e.bi_valid+42>>3,r=e.pending_buf_size-r>65535?65535:e.pending_buf_size-r,s=r>e.w_size?e.w_size:r,n=e.strstart-e.block_start,(n>=s||(n||t===SO)&&t!==EO&&0===e.strm.avail_in&&n<=r)&&(i=n>r?r:n,o=t===SO&&0===e.strm.avail_in&&i===n?1:0,vO(e,e.block_start,i,o),e.block_start+=i,eI(e.strm)),o?3:1)},cI=(e,t)=>{let i,n;for(;;){if(e.lookahead<WO){if(aI(e),e.lookahead<WO&&t===EO)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=JO(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==i&&e.strstart-i<=e.w_size-WO&&(e.match_length=oI(e,i)),e.match_length>=3)if(n=_O(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=JO(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=JO(e,e.ins_h,e.window[e.strstart+1]);else n=_O(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(tI(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===SO?(tI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(tI(e,!1),0===e.strm.avail_out)?1:2},lI=(e,t)=>{let i,n,r;for(;;){if(e.lookahead<WO){if(aI(e),e.lookahead<WO&&t===EO)return 1;if(0===e.lookahead)break}if(i=0,e.lookahead>=3&&(e.ins_h=JO(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==i&&e.prev_length<e.max_lazy_match&&e.strstart-i<=e.w_size-WO&&(e.match_length=oI(e,i),e.match_length<=5&&(e.strategy===LO||3===e.match_length&&e.strstart-e.match_start>4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-3,n=_O(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=JO(e,e.ins_h,e.window[e.strstart+3-1]),i=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(tI(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=_O(e,0,e.window[e.strstart-1]),n&&tI(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=_O(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===SO?(tI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(tI(e,!1),0===e.strm.avail_out)?1:2};function dI(e,t,i,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=i,this.max_chain=n,this.func=r}const uI=[new dI(0,0,0,0,sI),new dI(4,4,8,4,cI),new dI(4,5,16,8,cI),new dI(4,6,32,32,cI),new dI(4,4,16,16,lI),new dI(8,16,32,32,lI),new dI(8,16,128,128,lI),new dI(8,32,128,256,lI),new dI(32,128,258,1024,lI),new dI(32,258,258,4096,lI)];function hI(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=BO,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(2*HO),this.dyn_dtree=new Uint16Array(2*(2*VO+1)),this.bl_tree=new Uint16Array(2*(2*jO+1)),ZO(this.dyn_ltree),ZO(this.dyn_dtree),ZO(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array($O+1),this.heap=new Uint16Array(2*FO+1),ZO(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*FO+1),ZO(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const fI=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==KO&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==GO&&t.status!==qO?1:0},pI=e=>{if(fI(e))return YO(e,OO);e.total_in=e.total_out=0,e.data_type=UO;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?KO:GO,e.adler=2===t.wrap?0:1,t.last_flush=-2,mO(t),AO},gI=e=>{const t=pI(e);var i;return t===AO&&((i=e.state).window_size=2*i.w_size,ZO(i.head),i.max_lazy_match=uI[i.level].max_lazy,i.good_match=uI[i.level].good_length,i.nice_match=uI[i.level].nice_length,i.max_chain_length=uI[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=2,i.match_available=0,i.ins_h=0),t},mI=(e,t,i,n,r,s)=>{if(!e)return OO;let o=1;if(t===NO&&(t=6),n<0?(o=0,n=-n):n>15&&(o=2,n-=16),r<1||r>9||i!==BO||n<8||n>15||t<0||t>9||s<0||s>DO||8===n&&1!==o)return YO(e,OO);8===n&&(n=9);const a=new hI;return e.state=a,a.strm=e,a.status=KO,a.wrap=o,a.gzhead=null,a.w_bits=n,a.w_size=1<<a.w_bits,a.w_mask=a.w_size-1,a.hash_bits=r+7,a.hash_size=1<<a.hash_bits,a.hash_mask=a.hash_size-1,a.hash_shift=~~((a.hash_bits+3-1)/3),a.window=new Uint8Array(2*a.w_size),a.head=new Uint16Array(a.hash_size),a.prev=new Uint16Array(a.w_size),a.lit_bufsize=1<<r+6,a.pending_buf_size=4*a.lit_bufsize,a.pending_buf=new Uint8Array(a.pending_buf_size),a.sym_buf=a.lit_bufsize,a.sym_end=3*(a.lit_bufsize-1),a.level=t,a.strategy=s,a.method=i,gI(e)};var vI={deflateInit:(e,t)=>mI(e,t,BO,15,8,PO),deflateInit2:mI,deflateReset:gI,deflateResetKeep:pI,deflateSetHeader:(e,t)=>fI(e)||2!==e.state.wrap?OO:(e.state.gzhead=t,AO),deflate:(e,t)=>{if(fI(e)||t>TO||t<0)return e?YO(e,OO):OO;const i=e.state;if(!e.output||0!==e.avail_in&&!e.input||i.status===qO&&t!==SO)return YO(e,0===e.avail_out?kO:OO);const n=i.last_flush;if(i.last_flush=t,0!==i.pending){if(eI(e),0===e.avail_out)return i.last_flush=-1,AO}else if(0===e.avail_in&&XO(t)<=XO(n)&&t!==SO)return YO(e,kO);if(i.status===qO&&0!==e.avail_in)return YO(e,kO);if(i.status===KO&&0===i.wrap&&(i.status=GO),i.status===KO){let t=BO+(i.w_bits-8<<4)<<8,n=-1;if(n=i.strategy>=MO||i.level<2?0:i.level<6?1:6===i.level?2:3,t|=n<<6,0!==i.strstart&&(t|=32),t+=31-t%31,rI(i,t),0!==i.strstart&&(rI(i,e.adler>>>16),rI(i,65535&e.adler)),e.adler=1,i.status=GO,eI(e),0!==i.pending)return i.last_flush=-1,AO}if(57===i.status)if(e.adler=0,nI(i,31),nI(i,139),nI(i,8),i.gzhead)nI(i,(i.gzhead.text?1:0)+(i.gzhead.hcrc?2:0)+(i.gzhead.extra?4:0)+(i.gzhead.name?8:0)+(i.gzhead.comment?16:0)),nI(i,255&i.gzhead.time),nI(i,i.gzhead.time>>8&255),nI(i,i.gzhead.time>>16&255),nI(i,i.gzhead.time>>24&255),nI(i,9===i.level?2:i.strategy>=MO||i.level<2?4:0),nI(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(nI(i,255&i.gzhead.extra.length),nI(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=fO(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69;else if(nI(i,0),nI(i,0),nI(i,0),nI(i,0),nI(i,0),nI(i,9===i.level?2:i.strategy>=MO||i.level<2?4:0),nI(i,3),i.status=GO,eI(e),0!==i.pending)return i.last_flush=-1,AO;if(69===i.status){if(i.gzhead.extra){let t=i.pending,n=(65535&i.gzhead.extra.length)-i.gzindex;for(;i.pending+n>i.pending_buf_size;){let r=i.pending_buf_size-i.pending;if(i.pending_buf.set(i.gzhead.extra.subarray(i.gzindex,i.gzindex+r),i.pending),i.pending=i.pending_buf_size,i.gzhead.hcrc&&i.pending>t&&(e.adler=fO(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex+=r,eI(e),0!==i.pending)return i.last_flush=-1,AO;t=0,n-=r}let r=new Uint8Array(i.gzhead.extra);i.pending_buf.set(r.subarray(i.gzindex,i.gzindex+n),i.pending),i.pending+=n,i.gzhead.hcrc&&i.pending>t&&(e.adler=fO(e.adler,i.pending_buf,i.pending-t,t)),i.gzindex=0}i.status=73}if(73===i.status){if(i.gzhead.name){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=fO(e.adler,i.pending_buf,i.pending-n,n)),eI(e),0!==i.pending)return i.last_flush=-1,AO;n=0}t=i.gzindex<i.gzhead.name.length?255&i.gzhead.name.charCodeAt(i.gzindex++):0,nI(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=fO(e.adler,i.pending_buf,i.pending-n,n)),i.gzindex=0}i.status=91}if(91===i.status){if(i.gzhead.comment){let t,n=i.pending;do{if(i.pending===i.pending_buf_size){if(i.gzhead.hcrc&&i.pending>n&&(e.adler=fO(e.adler,i.pending_buf,i.pending-n,n)),eI(e),0!==i.pending)return i.last_flush=-1,AO;n=0}t=i.gzindex<i.gzhead.comment.length?255&i.gzhead.comment.charCodeAt(i.gzindex++):0,nI(i,t)}while(0!==t);i.gzhead.hcrc&&i.pending>n&&(e.adler=fO(e.adler,i.pending_buf,i.pending-n,n))}i.status=103}if(103===i.status){if(i.gzhead.hcrc){if(i.pending+2>i.pending_buf_size&&(eI(e),0!==i.pending))return i.last_flush=-1,AO;nI(i,255&e.adler),nI(i,e.adler>>8&255),e.adler=0}if(i.status=GO,eI(e),0!==i.pending)return i.last_flush=-1,AO}if(0!==e.avail_in||0!==i.lookahead||t!==EO&&i.status!==qO){let n=0===i.level?sI(i,t):i.strategy===MO?((e,t)=>{let i;for(;;){if(0===e.lookahead&&(aI(e),0===e.lookahead)){if(t===EO)return 1;break}if(e.match_length=0,i=_O(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,i&&(tI(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===SO?(tI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(tI(e,!1),0===e.strm.avail_out)?1:2})(i,t):i.strategy===xO?((e,t)=>{let i,n,r,s;const o=e.window;for(;;){if(e.lookahead<=zO){if(aI(e),e.lookahead<=zO&&t===EO)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(r=e.strstart-1,n=o[r],n===o[++r]&&n===o[++r]&&n===o[++r])){s=e.strstart+zO;do{}while(n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&n===o[++r]&&r<s);e.match_length=zO-(s-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(i=_O(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(i=_O(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),i&&(tI(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===SO?(tI(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(tI(e,!1),0===e.strm.avail_out)?1:2})(i,t):uI[i.level].func(i,t);if(3!==n&&4!==n||(i.status=qO),1===n||3===n)return 0===e.avail_out&&(i.last_flush=-1),AO;if(2===n&&(t===CO?yO(i):t!==TO&&(vO(i,0,0,!1),t===wO&&(ZO(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),eI(e),0===e.avail_out))return i.last_flush=-1,AO}return t!==SO?AO:i.wrap<=0?RO:(2===i.wrap?(nI(i,255&e.adler),nI(i,e.adler>>8&255),nI(i,e.adler>>16&255),nI(i,e.adler>>24&255),nI(i,255&e.total_in),nI(i,e.total_in>>8&255),nI(i,e.total_in>>16&255),nI(i,e.total_in>>24&255)):(rI(i,e.adler>>>16),rI(i,65535&e.adler)),eI(e),i.wrap>0&&(i.wrap=-i.wrap),0!==i.pending?AO:RO)},deflateEnd:e=>{if(fI(e))return OO;const t=e.state.status;return e.state=null,t===GO?YO(e,IO):AO},deflateSetDictionary:(e,t)=>{let i=t.length;if(fI(e))return OO;const n=e.state,r=n.wrap;if(2===r||1===r&&n.status!==KO||n.lookahead)return OO;if(1===r&&(e.adler=uO(e.adler,t,i,0)),n.wrap=0,i>=n.w_size){0===r&&(ZO(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(i-n.w_size,i),0),t=e,i=n.w_size}const s=e.avail_in,o=e.next_in,a=e.input;for(e.avail_in=i,e.next_in=0,e.input=t,aI(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=JO(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,aI(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=o,e.input=a,e.avail_in=s,n.wrap=r,AO},deflateInfo:"pako deflate (from Nodeca project)"};const bI=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var _I={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const i=t.shift();if(i){if("object"!=typeof i)throw new TypeError(i+"must be non-object");for(const t in i)bI(i,t)&&(e[t]=i[t])}}return e},flattenChunks:e=>{let t=0;for(let i=0,n=e.length;i<n;i++)t+=e[i].length;const i=new Uint8Array(t);for(let t=0,n=0,r=e.length;t<r;t++){let r=e[t];i.set(r,n),n+=r.length}return i}};let yI=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){yI=!1}const EI=new Uint8Array(256);for(let e=0;e<256;e++)EI[e]=e>=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;EI[254]=EI[254]=1;var CI={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,i,n,r,s,o=e.length,a=0;for(r=0;r<o;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),a+=i<128?1:i<2048?2:i<65536?3:4;for(t=new Uint8Array(a),s=0,r=0;s<a;r++)i=e.charCodeAt(r),55296==(64512&i)&&r+1<o&&(n=e.charCodeAt(r+1),56320==(64512&n)&&(i=65536+(i-55296<<10)+(n-56320),r++)),i<128?t[s++]=i:i<2048?(t[s++]=192|i>>>6,t[s++]=128|63&i):i<65536?(t[s++]=224|i>>>12,t[s++]=128|i>>>6&63,t[s++]=128|63&i):(t[s++]=240|i>>>18,t[s++]=128|i>>>12&63,t[s++]=128|i>>>6&63,t[s++]=128|63&i);return t},buf2string:(e,t)=>{const i=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,r;const s=new Array(2*i);for(r=0,n=0;n<i;){let t=e[n++];if(t<128){s[r++]=t;continue}let o=EI[t];if(o>4)s[r++]=65533,n+=o-1;else{for(t&=2===o?31:3===o?15:7;o>1&&n<i;)t=t<<6|63&e[n++],o--;o>1?s[r++]=65533:t<65536?s[r++]=t:(t-=65536,s[r++]=55296|t>>10&1023,s[r++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&yI)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let i="";for(let n=0;n<t;n++)i+=String.fromCharCode(e[n]);return i})(s,r)},utf8border:(e,t)=>{(t=t||e.length)>e.length&&(t=e.length);let i=t-1;for(;i>=0&&128==(192&e[i]);)i--;return i<0||0===i?t:i+EI[e[i]]>t?i:t}},wI=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const SI=Object.prototype.toString,{Z_NO_FLUSH:TI,Z_SYNC_FLUSH:AI,Z_FULL_FLUSH:RI,Z_FINISH:OI,Z_OK:II,Z_STREAM_END:kI,Z_DEFAULT_COMPRESSION:NI,Z_DEFAULT_STRATEGY:LI,Z_DEFLATED:MI}=gO;function xI(e){this.options=_I.assign({level:NI,method:MI,chunkSize:16384,windowBits:15,memLevel:8,strategy:LI},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new wI,this.strm.avail_out=0;let i=vI.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(i!==II)throw new Error(pO[i]);if(t.header&&vI.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?CI.string2buf(t.dictionary):"[object ArrayBuffer]"===SI.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,i=vI.deflateSetDictionary(this.strm,e),i!==II)throw new Error(pO[i]);this._dict_set=!0}}function DI(e,t){const i=new xI(t);if(i.push(e,!0),i.err)throw i.msg||pO[i.err];return i.result}xI.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize;let r,s;if(this.ended)return!1;for(s=t===~~t?t:!0===t?OI:TI,"string"==typeof e?i.input=CI.string2buf(e):"[object ArrayBuffer]"===SI.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;)if(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),(s===AI||s===RI)&&i.avail_out<=6)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else{if(r=vI.deflate(i,s),r===kI)return i.next_out>0&&this.onData(i.output.subarray(0,i.next_out)),r=vI.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===II;if(0!==i.avail_out){if(s>0&&i.next_out>0)this.onData(i.output.subarray(0,i.next_out)),i.avail_out=0;else if(0===i.avail_in)break}else this.onData(i.output)}return!0},xI.prototype.onData=function(e){this.chunks.push(e)},xI.prototype.onEnd=function(e){e===II&&(this.result=_I.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var PI={Deflate:xI,deflate:DI,deflateRaw:function(e,t){return(t=t||{}).raw=!0,DI(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,DI(e,t)},constants:gO};const UI=16209;var BI=function(e,t){let i,n,r,s,o,a,c,l,d,h,u,p,f,m,v,_,g,y,E,C,w,S,T,A;const R=e.state;i=e.next_in,T=e.input,n=i+(e.avail_in-5),r=e.next_out,A=e.output,s=r-(t-e.avail_out),o=r+(e.avail_out-257),a=R.dmax,c=R.wsize,l=R.whave,d=R.wnext,h=R.window,u=R.hold,p=R.bits,f=R.lencode,m=R.distcode,v=(1<<R.lenbits)-1,_=(1<<R.distbits)-1;e:do{p<15&&(u+=T[i++]<<p,p+=8,u+=T[i++]<<p,p+=8),g=f[u&v];t:for(;;){if(y=g>>>24,u>>>=y,p-=y,y=g>>>16&255,0===y)A[r++]=65535&g;else{if(!(16&y)){if(0==(64&y)){g=f[(65535&g)+(u&(1<<y)-1)];continue t}if(32&y){R.mode=16191;break e}e.msg="invalid literal/length code",R.mode=UI;break e}E=65535&g,y&=15,y&&(p<y&&(u+=T[i++]<<p,p+=8),E+=u&(1<<y)-1,u>>>=y,p-=y),p<15&&(u+=T[i++]<<p,p+=8,u+=T[i++]<<p,p+=8),g=m[u&_];n:for(;;){if(y=g>>>24,u>>>=y,p-=y,y=g>>>16&255,!(16&y)){if(0==(64&y)){g=m[(65535&g)+(u&(1<<y)-1)];continue n}e.msg="invalid distance code",R.mode=UI;break e}if(C=65535&g,y&=15,p<y&&(u+=T[i++]<<p,p+=8,p<y&&(u+=T[i++]<<p,p+=8)),C+=u&(1<<y)-1,C>a){e.msg="invalid distance too far back",R.mode=UI;break e}if(u>>>=y,p-=y,y=r-s,C>y){if(y=C-y,y>l&&R.sane){e.msg="invalid distance too far back",R.mode=UI;break e}if(w=0,S=h,0===d){if(w+=c-y,y<E){E-=y;do{A[r++]=h[w++]}while(--y);w=r-C,S=A}}else if(d<y){if(w+=c+d-y,y-=d,y<E){E-=y;do{A[r++]=h[w++]}while(--y);if(w=0,d<E){y=d,E-=y;do{A[r++]=h[w++]}while(--y);w=r-C,S=A}}}else if(w+=d-y,y<E){E-=y;do{A[r++]=h[w++]}while(--y);w=r-C,S=A}for(;E>2;)A[r++]=S[w++],A[r++]=S[w++],A[r++]=S[w++],E-=3;E&&(A[r++]=S[w++],E>1&&(A[r++]=S[w++]))}else{w=r-C;do{A[r++]=A[w++],A[r++]=A[w++],A[r++]=A[w++],E-=3}while(E>2);E&&(A[r++]=A[w++],E>1&&(A[r++]=A[w++]))}break}}break}}while(i<n&&r<o);E=p>>3,i-=E,p-=E<<3,u&=(1<<p)-1,e.next_in=i,e.next_out=r,e.avail_in=i<n?n-i+5:5-(i-n),e.avail_out=r<o?o-r+257:257-(r-o),R.hold=u,R.bits=p};const FI=15,VI=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),jI=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),HI=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),$I=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var zI=(e,t,i,n,r,s,o,a)=>{const c=a.bits;let l,d,h,u,p,f,m=0,v=0,_=0,g=0,y=0,E=0,C=0,w=0,S=0,T=0,A=null;const R=new Uint16Array(16),b=new Uint16Array(16);let O,I,k,N=null;for(m=0;m<=FI;m++)R[m]=0;for(v=0;v<n;v++)R[t[i+v]]++;for(y=c,g=FI;g>=1&&0===R[g];g--);if(y>g&&(y=g),0===g)return r[s++]=20971520,r[s++]=20971520,a.bits=1,0;for(_=1;_<g&&0===R[_];_++);for(y<_&&(y=_),w=1,m=1;m<=FI;m++)if(w<<=1,w-=R[m],w<0)return-1;if(w>0&&(0===e||1!==g))return-1;for(b[1]=0,m=1;m<FI;m++)b[m+1]=b[m]+R[m];for(v=0;v<n;v++)0!==t[i+v]&&(o[b[t[i+v]]++]=v);if(0===e?(A=N=o,f=20):1===e?(A=VI,N=jI,f=257):(A=HI,N=$I,f=0),T=0,v=0,m=_,p=s,E=y,C=0,h=-1,S=1<<y,u=S-1,1===e&&S>852||2===e&&S>592)return 1;for(;;){O=m-C,o[v]+1<f?(I=0,k=o[v]):o[v]>=f?(I=N[o[v]-f],k=A[o[v]-f]):(I=96,k=0),l=1<<m-C,d=1<<E,_=d;do{d-=l,r[p+(T>>C)+d]=O<<24|I<<16|k|0}while(0!==d);for(l=1<<m-1;T&l;)l>>=1;if(0!==l?(T&=l-1,T+=l):T=0,v++,0==--R[m]){if(m===g)break;m=t[i+o[v]]}if(m>y&&(T&u)!==h){for(0===C&&(C=y),p+=_,E=m-C,w=1<<E;E+C<g&&(w-=R[E+C],!(w<=0));)E++,w<<=1;if(S+=1<<E,1===e&&S>852||2===e&&S>592)return 1;h=T&u,r[h]=y<<24|E<<16|p-s|0}}return 0!==T&&(r[p+T]=m-C<<24|64<<16|0),a.bits=y,0};const{Z_FINISH:WI,Z_BLOCK:KI,Z_TREES:GI,Z_OK:qI,Z_STREAM_END:YI,Z_NEED_DICT:XI,Z_STREAM_ERROR:ZI,Z_DATA_ERROR:QI,Z_MEM_ERROR:JI,Z_BUF_ERROR:ek,Z_DEFLATED:tk}=gO,nk=16180,rk=16190,ik=16191,ok=16192,ak=16194,sk=16199,ck=16200,lk=16206,dk=16209,uk=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function hk(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const fk=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode<nk||t.mode>16211?1:0},pk=e=>{if(fk(e))return ZI;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=nk,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,qI},gk=e=>{if(fk(e))return ZI;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,pk(e)},mk=(e,t)=>{let i;if(fk(e))return ZI;const n=e.state;return t<0?(i=0,t=-t):(i=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?ZI:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=i,n.wbits=t,gk(e))},vk=(e,t)=>{if(!e)return ZI;const i=new hk;e.state=i,i.strm=e,i.window=null,i.mode=nk;const n=mk(e,t);return n!==qI&&(e.state=null),n};let bk,_k,yk=!0;const Ek=e=>{if(yk){bk=new Int32Array(512),_k=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(zI(1,e.lens,0,288,bk,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;zI(2,e.lens,0,32,_k,0,e.work,{bits:5}),yk=!1}e.lencode=bk,e.lenbits=9,e.distcode=_k,e.distbits=5},Ck=(e,t,i,n)=>{let r;const s=e.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),n>=s.wsize?(s.window.set(t.subarray(i-s.wsize,i),0),s.wnext=0,s.whave=s.wsize):(r=s.wsize-s.wnext,r>n&&(r=n),s.window.set(t.subarray(i-n,i-n+r),s.wnext),(n-=r)?(s.window.set(t.subarray(i-n,i),0),s.wnext=n,s.whave=s.wsize):(s.wnext+=r,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=r))),0};var wk={inflateReset:gk,inflateReset2:mk,inflateResetKeep:pk,inflateInit:e=>vk(e,15),inflateInit2:vk,inflate:(e,t)=>{let i,n,r,s,o,a,c,l,d,h,u,p,f,m,v,_,g,y,E,C,w,S,T=0;const A=new Uint8Array(4);let R,b;const O=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(fk(e)||!e.output||!e.input&&0!==e.avail_in)return ZI;i=e.state,i.mode===ik&&(i.mode=ok),o=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,l=i.hold,d=i.bits,h=a,u=c,S=qI;e:for(;;)switch(i.mode){case nk:if(0===i.wrap){i.mode=ok;break}for(;d<16;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(2&i.wrap&&35615===l){0===i.wbits&&(i.wbits=15),i.check=0,A[0]=255&l,A[1]=l>>>8&255,i.check=fO(i.check,A,2,0),l=0,d=0,i.mode=16181;break}if(i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=dk;break}if((15&l)!==tk){e.msg="unknown compression method",i.mode=dk;break}if(l>>>=4,d-=4,w=8+(15&l),0===i.wbits&&(i.wbits=w),w>15||w>i.wbits){e.msg="invalid window size",i.mode=dk;break}i.dmax=1<<i.wbits,i.flags=0,e.adler=i.check=1,i.mode=512&l?16189:ik,l=0,d=0;break;case 16181:for(;d<16;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(i.flags=l,(255&i.flags)!==tk){e.msg="unknown compression method",i.mode=dk;break}if(57344&i.flags){e.msg="unknown header flags set",i.mode=dk;break}i.head&&(i.head.text=l>>8&1),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=fO(i.check,A,2,0)),l=0,d=0,i.mode=16182;case 16182:for(;d<32;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.head&&(i.head.time=l),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,A[2]=l>>>16&255,A[3]=l>>>24&255,i.check=fO(i.check,A,4,0)),l=0,d=0,i.mode=16183;case 16183:for(;d<16;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.head&&(i.head.xflags=255&l,i.head.os=l>>8),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=fO(i.check,A,2,0)),l=0,d=0,i.mode=16184;case 16184:if(1024&i.flags){for(;d<16;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.length=l,i.head&&(i.head.extra_len=l),512&i.flags&&4&i.wrap&&(A[0]=255&l,A[1]=l>>>8&255,i.check=fO(i.check,A,2,0)),l=0,d=0}else i.head&&(i.head.extra=null);i.mode=16185;case 16185:if(1024&i.flags&&(p=i.length,p>a&&(p=a),p&&(i.head&&(w=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(n.subarray(s,s+p),w)),512&i.flags&&4&i.wrap&&(i.check=fO(i.check,n,p,s)),a-=p,s+=p,i.length-=p),i.length))break e;i.length=0,i.mode=16186;case 16186:if(2048&i.flags){if(0===a)break e;p=0;do{w=n[s+p++],i.head&&w&&i.length<65536&&(i.head.name+=String.fromCharCode(w))}while(w&&p<a);if(512&i.flags&&4&i.wrap&&(i.check=fO(i.check,n,p,s)),a-=p,s+=p,w)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=16187;case 16187:if(4096&i.flags){if(0===a)break e;p=0;do{w=n[s+p++],i.head&&w&&i.length<65536&&(i.head.comment+=String.fromCharCode(w))}while(w&&p<a);if(512&i.flags&&4&i.wrap&&(i.check=fO(i.check,n,p,s)),a-=p,s+=p,w)break e}else i.head&&(i.head.comment=null);i.mode=16188;case 16188:if(512&i.flags){for(;d<16;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(4&i.wrap&&l!==(65535&i.check)){e.msg="header crc mismatch",i.mode=dk;break}l=0,d=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=ik;break;case 16189:for(;d<32;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}e.adler=i.check=uk(l),l=0,d=0,i.mode=rk;case rk:if(0===i.havedict)return e.next_out=o,e.avail_out=c,e.next_in=s,e.avail_in=a,i.hold=l,i.bits=d,XI;e.adler=i.check=1,i.mode=ik;case ik:if(t===KI||t===GI)break e;case ok:if(i.last){l>>>=7&d,d-=7&d,i.mode=lk;break}for(;d<3;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}switch(i.last=1&l,l>>>=1,d-=1,3&l){case 0:i.mode=16193;break;case 1:if(Ek(i),i.mode=sk,t===GI){l>>>=2,d-=2;break e}break;case 2:i.mode=16196;break;case 3:e.msg="invalid block type",i.mode=dk}l>>>=2,d-=2;break;case 16193:for(l>>>=7&d,d-=7&d;d<32;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",i.mode=dk;break}if(i.length=65535&l,l=0,d=0,i.mode=ak,t===GI)break e;case ak:i.mode=16195;case 16195:if(p=i.length,p){if(p>a&&(p=a),p>c&&(p=c),0===p)break e;r.set(n.subarray(s,s+p),o),a-=p,s+=p,c-=p,o+=p,i.length-=p;break}i.mode=ik;break;case 16196:for(;d<14;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(i.nlen=257+(31&l),l>>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,i.nlen>286||i.ndist>30){e.msg="too many length or distance symbols",i.mode=dk;break}i.have=0,i.mode=16197;case 16197:for(;i.have<i.ncode;){for(;d<3;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.lens[O[i.have++]]=7&l,l>>>=3,d-=3}for(;i.have<19;)i.lens[O[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,R={bits:i.lenbits},S=zI(0,i.lens,0,19,i.lencode,0,i.work,R),i.lenbits=R.bits,S){e.msg="invalid code lengths set",i.mode=dk;break}i.have=0,i.mode=16198;case 16198:for(;i.have<i.nlen+i.ndist;){for(;T=i.lencode[l&(1<<i.lenbits)-1],v=T>>>24,_=T>>>16&255,g=65535&T,!(v<=d);){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(g<16)l>>>=v,d-=v,i.lens[i.have++]=g;else{if(16===g){for(b=v+2;d<b;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(l>>>=v,d-=v,0===i.have){e.msg="invalid bit length repeat",i.mode=dk;break}w=i.lens[i.have-1],p=3+(3&l),l>>>=2,d-=2}else if(17===g){for(b=v+3;d<b;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}l>>>=v,d-=v,w=0,p=3+(7&l),l>>>=3,d-=3}else{for(b=v+7;d<b;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}l>>>=v,d-=v,w=0,p=11+(127&l),l>>>=7,d-=7}if(i.have+p>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=dk;break}for(;p--;)i.lens[i.have++]=w}}if(i.mode===dk)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=dk;break}if(i.lenbits=9,R={bits:i.lenbits},S=zI(1,i.lens,0,i.nlen,i.lencode,0,i.work,R),i.lenbits=R.bits,S){e.msg="invalid literal/lengths set",i.mode=dk;break}if(i.distbits=6,i.distcode=i.distdyn,R={bits:i.distbits},S=zI(2,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,R),i.distbits=R.bits,S){e.msg="invalid distances set",i.mode=dk;break}if(i.mode=sk,t===GI)break e;case sk:i.mode=ck;case ck:if(a>=6&&c>=258){e.next_out=o,e.avail_out=c,e.next_in=s,e.avail_in=a,i.hold=l,i.bits=d,BI(e,u),o=e.next_out,r=e.output,c=e.avail_out,s=e.next_in,n=e.input,a=e.avail_in,l=i.hold,d=i.bits,i.mode===ik&&(i.back=-1);break}for(i.back=0;T=i.lencode[l&(1<<i.lenbits)-1],v=T>>>24,_=T>>>16&255,g=65535&T,!(v<=d);){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(_&&0==(240&_)){for(y=v,E=_,C=g;T=i.lencode[C+((l&(1<<y+E)-1)>>y)],v=T>>>24,_=T>>>16&255,g=65535&T,!(y+v<=d);){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}l>>>=y,d-=y,i.back+=y}if(l>>>=v,d-=v,i.back+=v,i.length=g,0===_){i.mode=16205;break}if(32&_){i.back=-1,i.mode=ik;break}if(64&_){e.msg="invalid literal/length code",i.mode=dk;break}i.extra=15&_,i.mode=16201;case 16201:if(i.extra){for(b=i.extra;d<b;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.length+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=16202;case 16202:for(;T=i.distcode[l&(1<<i.distbits)-1],v=T>>>24,_=T>>>16&255,g=65535&T,!(v<=d);){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(0==(240&_)){for(y=v,E=_,C=g;T=i.distcode[C+((l&(1<<y+E)-1)>>y)],v=T>>>24,_=T>>>16&255,g=65535&T,!(y+v<=d);){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}l>>>=y,d-=y,i.back+=y}if(l>>>=v,d-=v,i.back+=v,64&_){e.msg="invalid distance code",i.mode=dk;break}i.offset=g,i.extra=15&_,i.mode=16203;case 16203:if(i.extra){for(b=i.extra;d<b;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}i.offset+=l&(1<<i.extra)-1,l>>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=dk;break}i.mode=16204;case 16204:if(0===c)break e;if(p=u-c,i.offset>p){if(p=i.offset-p,p>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=dk;break}p>i.wnext?(p-=i.wnext,f=i.wsize-p):f=i.wnext-p,p>i.length&&(p=i.length),m=i.window}else m=r,f=o-i.offset,p=i.length;p>c&&(p=c),c-=p,i.length-=p;do{r[o++]=m[f++]}while(--p);0===i.length&&(i.mode=ck);break;case 16205:if(0===c)break e;r[o++]=i.length,c--,i.mode=ck;break;case lk:if(i.wrap){for(;d<32;){if(0===a)break e;a--,l|=n[s++]<<d,d+=8}if(u-=c,e.total_out+=u,i.total+=u,4&i.wrap&&u&&(e.adler=i.check=i.flags?fO(i.check,r,u,o-u):uO(i.check,r,u,o-u)),u=c,4&i.wrap&&(i.flags?l:uk(l))!==i.check){e.msg="incorrect data check",i.mode=dk;break}l=0,d=0}i.mode=16207;case 16207:if(i.wrap&&i.flags){for(;d<32;){if(0===a)break e;a--,l+=n[s++]<<d,d+=8}if(4&i.wrap&&l!==(4294967295&i.total)){e.msg="incorrect length check",i.mode=dk;break}l=0,d=0}i.mode=16208;case 16208:S=YI;break e;case dk:S=QI;break e;case 16210:return JI;default:return ZI}return e.next_out=o,e.avail_out=c,e.next_in=s,e.avail_in=a,i.hold=l,i.bits=d,(i.wsize||u!==e.avail_out&&i.mode<dk&&(i.mode<lk||t!==WI))&&Ck(e,e.output,e.next_out,u-e.avail_out),h-=e.avail_in,u-=e.avail_out,e.total_in+=h,e.total_out+=u,i.total+=u,4&i.wrap&&u&&(e.adler=i.check=i.flags?fO(i.check,r,u,e.next_out-u):uO(i.check,r,u,e.next_out-u)),e.data_type=i.bits+(i.last?64:0)+(i.mode===ik?128:0)+(i.mode===sk||i.mode===ak?256:0),(0===h&&0===u||t===WI)&&S===qI&&(S=ek),S},inflateEnd:e=>{if(fk(e))return ZI;let t=e.state;return t.window&&(t.window=null),e.state=null,qI},inflateGetHeader:(e,t)=>{if(fk(e))return ZI;const i=e.state;return 0==(2&i.wrap)?ZI:(i.head=t,t.done=!1,qI)},inflateSetDictionary:(e,t)=>{const i=t.length;let n,r,s;return fk(e)?ZI:(n=e.state,0!==n.wrap&&n.mode!==rk?ZI:n.mode===rk&&(r=1,r=uO(r,t,i,0),r!==n.check)?QI:(s=Ck(e,t,i,i),s?(n.mode=16210,JI):(n.havedict=1,qI)))},inflateInfo:"pako inflate (from Nodeca project)"},Sk=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const Tk=Object.prototype.toString,{Z_NO_FLUSH:Ak,Z_FINISH:Rk,Z_OK:Ok,Z_STREAM_END:Ik,Z_NEED_DICT:kk,Z_STREAM_ERROR:Nk,Z_DATA_ERROR:Lk,Z_MEM_ERROR:Mk}=gO;function xk(e){this.options=_I.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new wI,this.strm.avail_out=0;let i=wk.inflateInit2(this.strm,t.windowBits);if(i!==Ok)throw new Error(pO[i]);if(this.header=new Sk,wk.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=CI.string2buf(t.dictionary):"[object ArrayBuffer]"===Tk.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(i=wk.inflateSetDictionary(this.strm,t.dictionary),i!==Ok)))throw new Error(pO[i])}function Dk(e,t){const i=new xk(t);if(i.push(e),i.err)throw i.msg||pO[i.err];return i.result}xk.prototype.push=function(e,t){const i=this.strm,n=this.options.chunkSize,r=this.options.dictionary;let s,o,a;if(this.ended)return!1;for(o=t===~~t?t:!0===t?Rk:Ak,"[object ArrayBuffer]"===Tk.call(e)?i.input=new Uint8Array(e):i.input=e,i.next_in=0,i.avail_in=i.input.length;;){for(0===i.avail_out&&(i.output=new Uint8Array(n),i.next_out=0,i.avail_out=n),s=wk.inflate(i,o),s===kk&&r&&(s=wk.inflateSetDictionary(i,r),s===Ok?s=wk.inflate(i,o):s===Lk&&(s=kk));i.avail_in>0&&s===Ik&&i.state.wrap>0&&0!==e[i.next_in];)wk.inflateReset(i),s=wk.inflate(i,o);switch(s){case Nk:case Lk:case kk:case Mk:return this.onEnd(s),this.ended=!0,!1}if(a=i.avail_out,i.next_out&&(0===i.avail_out||s===Ik))if("string"===this.options.to){let e=CI.utf8border(i.output,i.next_out),t=i.next_out-e,r=CI.buf2string(i.output,e);i.next_out=t,i.avail_out=n-t,t&&i.output.set(i.output.subarray(e,e+t),0),this.onData(r)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(s!==Ok||0!==a){if(s===Ik)return s=wk.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===i.avail_in)break}}return!0},xk.prototype.onData=function(e){this.chunks.push(e)},xk.prototype.onEnd=function(e){e===Ok&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=_I.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var Pk={Inflate:xk,inflate:Dk,inflateRaw:function(e,t){return(t=t||{}).raw=!0,Dk(e,t)},ungzip:Dk,constants:gO};const{Deflate:Uk,deflate:Bk,deflateRaw:Fk,gzip:Vk}=PI,{Inflate:jk,inflate:Hk,inflateRaw:$k,ungzip:zk}=Pk;var Wk,Kk=Bk,Gk=Hk;!function(e){e[e.ONE_BYTE=0]="ONE_BYTE",e[e.TWO_BYTE=1]="TWO_BYTE"}(Wk||(Wk={}));class qk{constructor(){oh(this,"_sequence",0),oh(this,"_startTime",Date.now()),oh(this,"isUseOneByte",!0)}get startTime(){const e=Date.now()-this._startTime;return e<Math.pow(2,16)?e:(this._startTime+=Math.pow(2,16),this.startTime)}get sequence(){return this._sequence<Math.pow(2,32)?this._sequence++:(this._sequence-=Math.pow(2,32),this.sequence)}serialize(e){const t={commonPacketHeader:{length:0,reserved:0,extension:0,sequence:this.sequence},commonStreamHeader:this.startTime,extension:void 0,payload:e};if(e.byteLength>128){const i=new Uint8Array(4);i.set([1,0,0,0]);const n={id:0,length:4,data:i.buffer},r={profile:this.isUseOneByte?0:1,length:this.isUseOneByte?5:6,datas:[n]};t.commonPacketHeader.extension=1,t.extension=r,t.payload=this.compress(e),t.commonPacketHeader.length=8+(t.extension.length+2)+t.payload.byteLength}else t.commonPacketHeader.length=8+t.payload.byteLength;const i=new ArrayBuffer(t.commonPacketHeader.length),n=new Uint8Array(i),r=new DataView(i);let s=0;if(r.setUint16(s,t.commonPacketHeader.extension<<15|t.commonPacketHeader.reserved<<14|t.commonPacketHeader.length,!0),s+=2,r.setUint32(s,t.commonPacketHeader.sequence,!0),s+=4,r.setUint16(s,t.commonStreamHeader,!0),s+=2,t.extension){const e=this.serializeExtension(t.extension);n.set(new Uint8Array(e),s),s+=e.byteLength}if(n.set(new Uint8Array(t.payload),s),s+=t.payload.byteLength,s!==t.commonPacketHeader.length)throw Error("serialize error!");return i}deserialize(e){if(e.byteLength<4)return new ArrayBuffer(0);const t=new DataView(e);let i=0;const n=t.getUint16(i,!0);i+=2;const r=(32768&n)>>15;let s,o;if(t.getUint16(i+2,!0),t.getUint16(i,!0),i+=4,t.getUint16(i,!0),i+=2,r){o=this.deserializeExtension(e.slice(i)),i+=2+o.length,s=e.slice(i);let t=!1;if(o.datas.length>0){const e=o.datas.find((e=>0===e.id));e&&(t=1==(1&new DataView(e.data).getUint32(0,!0)))}s=t?this.decompress(s):s}else s=e.slice(8);return s}serializeExtension(e){const{profile:t,length:i,datas:n}=e,r=new ArrayBuffer(i+2),s=new Uint8Array(r),o=new DataView(r);let a=0;if(o.setUint8(a++,t),o.setUint8(a++,i),n.forEach((e=>{t?(o.setUint8(a++,e.id),o.setUint8(a++,e.length),s.set(new Uint8Array(e.data),a),a+=e.data.byteLength):(o.setUint8(a++,e.id|e.length<<4),s.set(new Uint8Array(e.data),a),a+=e.data.byteLength)})),a!==i+2)throw Error("serialize extension error, is ".concat(a,"!==").concat(i+2));return r}deserializeExtension(e){const t=new DataView(e);let i=0;const n=t.getUint8(i);i++;const r=t.getUint8(i);i++;const s=n===Wk.TWO_BYTE,o=[],a=new DataView(e,2);let c=0;for(;c<r;){let e=0,t=0,i=new ArrayBuffer(0);s?(e=a.getUint8(c),c++,t=a.getUint8(c),c++):(e=15&a.getUint8(c),t=a.getUint8(c)>>4,c++),t>0&&(i=a.buffer.slice(c+2,c+2+t),c+=i.byteLength),o.push({id:e,length:t,data:i})}if(c!==r)throw Error("parse error");return{profile:n,length:r,datas:o}}decompress(e){return Gk(new Uint8Array(e))}compress(e){return Kk(new Uint8Array(e))}}class Yk extends r_{constructor(e,t){super(),oh(this,"_version",1),oh(this,"_type",3),oh(this,"_config",void 0),oh(this,"_originDataChannel",void 0),oh(this,"_dataStreamPacketHeader",new ArrayBuffer(4)),oh(this,"_dataStreamPacketHandler",void 0),oh(this,"_datachannelEventMap",new Map),this._config=e,t&&(this._originDataChannel=t,this._bandDataChannelEvents(t)),this._initPacketHeader(),this._dataStreamPacketHandler=new qk}get id(){return this._config.id}get ordered(){return this._config.ordered}get maxRetransmits(){return xC("DATASTREAM_MAX_RETRANSMITS")}get metadata(){return this._config.metadata}get readyState(){var e,t;return null!==(e=null===(t=this._originDataChannel)||void 0===t?void 0:t.readyState)&&void 0!==e?e:"connecting"}get _originDataChannelId(){var e,t;return null!==(e=null===(t=this._originDataChannel)||void 0===t?void 0:t.id)&&void 0!==e?e:null}getChannelId(){return this.id}getConfig(){return this._config}_close(){this._originDataChannel&&(this._unbindDataChannelEvents(this._originDataChannel),this._originDataChannel=void 0)}async _waitTillOpen(){return new nb(((e,t)=>{if(this._originDataChannel){"open"===this._originDataChannel.readyState&&e();const i=setTimeout((()=>{var e;t(new Fb(Bb.DATACHANNEL_CONNECTION_TIMEOUT,"Cannot create datachannel, id: ".concat(null===(e=this._originDataChannel)||void 0===e?void 0:e.id)))}),1e4);this._originDataChannel.onopen=()=>{clearTimeout(i),this._originDataChannel&&this._bandDataChannelEvents(this._originDataChannel),e()},this._originDataChannel.onerror=()=>{throw clearTimeout(i),new Fb(Bb.DATACHANNEL_CONNECTION_TIMEOUT)}}else t(new Fb(Bb.DATACHANNEL_CONNECTION_TIMEOUT,"cannot find dataChannel"))}))}_updateOriginDataChannel(e){this._originDataChannel=e,this._bandDataChannelEvents(e)}_initPacketHeader(){const e=new DataView(this._dataStreamPacketHeader);e.setUint16(0,this._version),e.setUint8(2,this._type),e.setUint8(3,this._config.id)}_bandDataChannelEvents(e){this._unbindDataChannelEvents(e),[ZT.OPEN,ZT.CLOSE,ZT.ERROR].forEach((t=>{const i=()=>{this.emit(t)};this._datachannelEventMap.set(t,i),e.addEventListener(t,i)}))}_unbindDataChannelEvents(e){Array.from(this._datachannelEventMap.entries()).forEach((t=>{let[i,n]=t;e.removeEventListener(i,n)})),this._datachannelEventMap.clear()}}class Xk extends Yk{constructor(e){super(e),oh(this,"_messageListener",void 0),this._messageListener=e=>{if(e.data.byteLength<this._dataStreamPacketHeader.byteLength)throw Error("invalid byteLength: the byte length must exceed "+this._dataStreamPacketHeader.byteLength);const t=e.data.slice(0,this._dataStreamPacketHeader.byteLength);if(new DataView(t).getUint8(3)!==this.id)return;let i=e.data.slice(this._dataStreamPacketHeader.byteLength);i=this._dataStreamPacketHandler.deserialize(i),this.emit(ZT.MESSAGE,i)}}_updateOriginDataChannel(e){super._updateOriginDataChannel(e),this._bandRemoteDataChannelEvents()}_close(){this._originDataChannel&&(this._originDataChannel.removeEventListener("message",this._messageListener),super._close())}_bandRemoteDataChannelEvents(){this._originDataChannel&&this._originDataChannel.addEventListener("message",this._messageListener)}}class Zk extends Yk{send(e){if(this._originDataChannel){let t=e;t=this._dataStreamPacketHandler.serialize(e);const i=new Uint8Array(this._dataStreamPacketHeader.byteLength+t.byteLength);i.set(new Uint8Array(this._dataStreamPacketHeader),0),i.set(new Uint8Array(t),this._dataStreamPacketHeader.byteLength),this._originDataChannel.send(i.buffer)}}}class Qk extends r_{constructor(){super(...arguments),oh(this,"resultStorage",new Map)}setLocalAudioStats(e,t,i){this.record("AUDIO_INPUT_LEVEL_TOO_LOW",e,this.checkAudioInputLevel(i,t)),this.record("SEND_AUDIO_BITRATE_TOO_LOW",e,this.checkSendAudioBitrate(i,t))}setLocalVideoStats(e,t,i){this.record("SEND_VIDEO_BITRATE_TOO_LOW",e,this.checkSendVideoBitrate(i,t)),this.record("FRAMERATE_INPUT_TOO_LOW",e,this.checkFramerateInput(i,t)),this.record("FRAMERATE_SENT_TOO_LOW",e,this.checkFramerateSent(i))}setRemoteAudioStats(e,t){const i=e.getUserId();this.record("AUDIO_OUTPUT_LEVEL_TOO_LOW",i,this.checkAudioOutputLevel(t))}setRemoteVideoStats(e,t){const i=e.getUserId();this.record("RECV_VIDEO_DECODE_FAILED",i,this.checkVideoDecode(t))}record(e,t,i){if(xC("STATS_UPDATE_INTERVAL")>500)return;this.resultStorage.has(e)||this.resultStorage.set(e,{result:[],isPrevNormal:!0});const n=this.resultStorage.get(e);if(n&&(n.result.push(i),n.result.length>=5)){var r;const i=Di(r=n.result).call(r,!0);n.isPrevNormal&&!i&&this.emit("exception",Jk[e],e,t),!n.isPrevNormal&&i&&this.emit("exception",Jk[e]+2e3,e+"_RECOVER",t),n.isPrevNormal=i,n.result=[]}}checkAudioOutputLevel(e){return!(e.receiveBitrate>0&&0===e.receiveLevel)}checkAudioInputLevel(e,t){return t instanceof QA&&!t.isActive||!!t.muted||0!==e.sendVolumeLevel}checkFramerateInput(e,t){let i=null;t._encoderConfig&&t._encoderConfig.frameRate&&(i=cN(t._encoderConfig.frameRate));const n=e.captureFrameRate;return!i||!n||!(i>10&&n<5||i<10&&i>=5&&n<=1)}checkFramerateSent(e){return!(e.captureFrameRate&&e.sendFrameRate&&e.captureFrameRate>5&&e.sendFrameRate<=1)}checkSendVideoBitrate(e,t){return!!t.muted||0!==e.sendBitrate}checkSendAudioBitrate(e,t){return t instanceof QA&&!t.isActive||!!t.muted||0!==e.sendBitrate}checkVideoDecode(e){return 0===e.receiveBitrate||0!==e.decodeFrameRate}}const Jk={FRAMERATE_INPUT_TOO_LOW:1001,FRAMERATE_SENT_TOO_LOW:1002,SEND_VIDEO_BITRATE_TOO_LOW:1003,RECV_VIDEO_DECODE_FAILED:1005,AUDIO_INPUT_LEVEL_TOO_LOW:2001,AUDIO_OUTPUT_LEVEL_TOO_LOW:2002,SEND_AUDIO_BITRATE_TOO_LOW:2003},eN=new class{markSubscribeStart(e,t){performance.mark("agora-web-sdk/".concat(e,"/subscribe-").concat(t))}markPublishStart(e,t){performance.mark("agora-web-sdk/".concat(e,"/publish-").concat(t))}measureFromSubscribeStart(e,t){const i=performance.getEntriesByName("agora-web-sdk/".concat(e,"/subscribe-").concat(t));if(i.length>0){const e=i[i.length-1];return Math.round(performance.now()-e.startTime)}return 0}measureFromPublishStart(e,t){const i=performance.getEntriesByName("agora-web-sdk/".concat(e,"/publish-").concat(t));if(i.length>0){const e=i[i.length-1];return Math.round(performance.now()-e.startTime)}return 0}};function tN(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function nN(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tN(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tN(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class rN{constructor(e){oh(this,"store",void 0),oh(this,"onStatsException",void 0),oh(this,"onUploadPublishDuration",void 0),oh(this,"onStatsChanged",void 0),oh(this,"localStats",new Map),oh(this,"remoteStats",new Map),oh(this,"updateStatsInterval",void 0),oh(this,"trafficStats",void 0),oh(this,"trafficStatsPeerList",[]),oh(this,"uplinkStats",void 0),oh(this,"exceptionMonitor",void 0),oh(this,"p2pChannel",void 0),oh(this,"scalabilityMode",cw.L1T1),oh(this,"updateStats",(()=>{this.p2pChannel&&(this.updateRemoteStats(this.p2pChannel),this.updateLocalStats(this.p2pChannel))})),this.store=e,this.updateStatsInterval=window.setInterval(this.updateStats,1e3),this.exceptionMonitor=new Qk,this.exceptionMonitor.on("exception",((e,t,i)=>{this.onStatsException&&this.onStatsException(e,t,i)}))}reset(){this.localStats=new Map,this.remoteStats=new Map,this.trafficStats=void 0,this.trafficStatsPeerList=[],this.uplinkStats=void 0}getLocalAudioTrackStats(){return this.localStats.get(hS.LocalAudioTrack)||nN({},VT)}getLocalVideoTrackStats(){return this.localStats.get(hS.LocalVideoTrack)||nN({},jT)}getRemoteAudioTrackStats(e){const t=(e,t)=>{if(!this.trafficStats)return t;const i=this.trafficStats.peer_delay.find((t=>t.peer_uid===e));return i&&(t.publishDuration=i.B_ppad+(Date.now()-this.trafficStats.timestamp)),t},i={};if(e){var n;const r=null===(n=this.remoteStats.get(e))||void 0===n?void 0:n.audioStats;r&&(i[e]=t(e,r))}else Array.from(this.remoteStats.entries()).forEach((e=>{let[n,{audioStats:r}]=e;r&&(i[n]=t(n,r))}));return i}getRemoteNetworkQualityStats(e){const t={};if(e){var i;const n=null===(i=this.remoteStats.get(e))||void 0===i?void 0:i.networkStats;n&&(t[e]=n)}else Array.from(this.remoteStats.entries()).forEach((e=>{let[i,{networkStats:n}]=e;n&&(t[i]=n)}));return t}getRemoteVideoTrackStats(e){const t=(e,t)=>{if(!this.trafficStats)return t;const i=this.trafficStats.peer_delay.find((t=>t.peer_uid===e));return i&&(t.publishDuration=i.B_ppvd+(Date.now()-this.trafficStats.timestamp)),t},i={};if(e){var n;const r=null===(n=this.remoteStats.get(e))||void 0===n?void 0:n.videoStats;r&&(i[e]=t(e,r))}else Array.from(this.remoteStats.entries()).forEach((e=>{let[n,{videoStats:r}]=e;r&&(i[n]=t(n,r))}));return i}getRTCStats(){let e=0,t=0,i=0,n=0;const r=this.localStats.get(hS.LocalAudioTrack);r&&(e+=r.sendBytes,t+=r.sendBitrate);const s=this.localStats.get(hS.LocalVideoTrack);s&&(e+=s.sendBytes,t+=s.sendBitrate);const o=this.localStats.get(hS.LocalVideoLowTrack);o&&(e+=o.sendBytes,t+=o.sendBitrate),this.remoteStats.forEach((e=>{let{audioStats:t,videoStats:r}=e;t&&(i+=t.receiveBytes,n+=t.receiveBitrate),r&&(i+=r.receiveBytes,n+=r.receiveBitrate)}));let a=1;return this.trafficStats&&(a+=this.trafficStats.peer_delay.length),{Duration:0,UserCount:a,SendBitrate:t,SendBytes:e,RecvBytes:i,RecvBitrate:n,OutgoingAvailableBandwidth:this.uplinkStats?this.uplinkStats.B_uab/1e3:0,RTT:this.trafficStats?2*this.trafficStats.B_acd:0}}addLocalStats(e){this.localStats.set(e,void 0)}removeLocalStats(e){e?this.localStats.delete(e):this.localStats.clear()}addRemoteStats(e){this.remoteStats.set(e,{})}removeRemoteStats(e){e?this.remoteStats.delete(e):this.remoteStats.clear()}addP2PChannel(e){this.p2pChannel=e}updateTrafficStats(e){e.peer_delay=e.peer_delay.filter((e=>void 0!==e.B_ppad||void 0!==e.B_ppvd)),e.peer_delay.filter((e=>-1===this.trafficStatsPeerList.indexOf(e.peer_uid))).forEach((e=>{var t;const i=null===(t=this.p2pChannel)||void 0===t?void 0:t.getRemoteMedia(e.peer_uid),n=null!=i&&i.videoSSRC?eN.measureFromSubscribeStart(this.store.clientId,i.videoSSRC):0,r=null!=i&&i.audioSSRC?eN.measureFromSubscribeStart(this.store.clientId,i.audioSSRC):0;void 0!==e.B_ppad&&void 0!==e.B_ppvd&&(this.onUploadPublishDuration&&this.onUploadPublishDuration(e.peer_uid,e.B_ppad,e.B_ppvd,n>r?n:r),this.trafficStatsPeerList.push(e.peer_uid))})),this.trafficStats=e}updateUplinkStats(e){this.uplinkStats&&this.uplinkStats.B_fir!==e.B_fir&&$C.debug("[".concat(this.store.clientId,"]: Period fir changes to ").concat(e.B_fir)),this.uplinkStats=e}static isRemoteVideoFreeze(e,t,i){if(!e)return!1;const n=!!i&&t.framesDecodeFreezeTime>i.framesDecodeFreezeTime,r=!i||t.framesDecodeCount>i.framesDecodeCount;return n||!r}static isRemoteAudioFreeze(e){return!!e&&e._isFreeze()}isLocalVideoFreeze(e){return!(!e.inputFrame||!e.sentFrame)&&e.inputFrame.frameRate>5&&e.sentFrame.frameRate<3}updateLocalStats(e){Array.from(this.localStats.entries()).forEach((t=>{let[i,n]=t;switch(i){case hS.LocalVideoTrack:case hS.LocalVideoLowTrack:{const t=n,s=nN({},jT),o=e.getStats(),a=e.getLocalMedia(i);if(o){const i=o.videoSend.find((e=>e.ssrc===(null==a?void 0:a.ssrcs[0].ssrcId)));if(i){const n=e.getLocalVideoSize(),r=e.getEncoderConfig(hS.LocalVideoTrack);"H264"!==i.codec&&"H265"!==i.codec&&"VP8"!==i.codec&&"VP9"!==i.codec&&"AV1X"!==i.codec&&"AV1"!==i.codec||(s.codecType=i.codec),s.sendBytes=i.bytes,s.sendBitrate=t?8*Math.max(0,s.sendBytes-t.sendBytes):0,i.inputFrame?(s.captureFrameRate=i.inputFrame.frameRate,s.captureResolutionHeight=i.inputFrame.height,s.captureResolutionWidth=i.inputFrame.width):n&&(s.captureResolutionWidth=n.width,s.captureResolutionHeight=n.height),i.sentFrame?(s.sendFrameRate=i.sentFrame.frameRate,s.sendResolutionHeight=i.sentFrame.height,s.sendResolutionWidth=i.sentFrame.width):n&&(s.sendResolutionWidth=n.width,s.sendResolutionHeight=n.height),i.avgEncodeMs&&(s.encodeDelay=i.avgEncodeMs),r&&r.bitrateMax&&(s.targetSendBitrate=1e3*r.bitrateMax),s.sendPackets=i.packets,s.sendPacketsLost=i.packetsLost,s.sendJitterMs=i.jitterMs,s.sendRttMs=i.rttMs,s.totalDuration=t?t.totalDuration+1:1,s.totalFreezeTime=t?t.totalFreezeTime:0,this.isLocalVideoFreeze(i)&&(s.totalFreezeTime+=1),i.scalabilityMode&&this.scalabilityMode!==i.scalabilityMode&&($C.debug("[".concat(this.store.clientId,"]: The scalabilityMode of the video sending stream is ").concat(i.scalabilityMode)),this.scalabilityMode=i.scalabilityMode)}this.trafficStats&&(s.currentPacketLossRate=(this.trafficStats.B_pvlr4||0)/100)}var r;this.localStats.set(i,s),((null==t?void 0:t.sendResolutionWidth)!==s.sendResolutionWidth||(null==t?void 0:t.sendResolutionHeight)!==s.sendResolutionHeight)&&(null===(r=this.onStatsChanged)||void 0===r||r.call(this,"resolution",{width:s.sendResolutionWidth,height:s.sendResolutionHeight})),s&&a&&this.exceptionMonitor.setLocalVideoStats(this.store.uid,a.track,s);break}case hS.LocalAudioTrack:{const t=n,r=nN({},VT),s=e.getStats(),o=e.getLocalMedia(i);if(s){const i=s.audioSend.find((e=>e.ssrc===(null==o?void 0:o.ssrcs[0].ssrcId)));if(i){if("opus"!==i.codec&&"aac"!==i.codec&&"PCMU"!==i.codec&&"PCMA"!==i.codec&&"G722"!==i.codec||(r.codecType=i.codec),i.inputLevel)r.sendVolumeLevel=Math.round(32767*i.inputLevel);else{const t=e.getLocalAudioVolume();t&&(r.sendVolumeLevel=Math.round(32767*t))}r.sendBytes=i.bytes,r.sendPackets=i.packets,r.sendPacketsLost=i.packetsLost,r.sendJitterMs=i.jitterMs,r.sendRttMs=i.rttMs,r.sendBitrate=t?8*Math.max(0,r.sendBytes-t.sendBytes):0}}this.trafficStats&&(r.currentPacketLossRate=(this.trafficStats.B_palr4||0)/100),this.localStats.set(hS.LocalAudioTrack,r),r&&o&&this.exceptionMonitor.setLocalAudioStats(this.store.uid,o.track,r);break}}}))}updateRemoteStats(e){Array.from(this.remoteStats.entries()).forEach((t=>{let[i,{videoStats:n,audioStats:r,videoPcStats:s}]=t;const o=r,a=n,c=s,l=nN({},HT),d=nN({},zT),h=nN({},$T),{audioTrack:u,videoTrack:p,audioSSRC:f,videoSSRC:m}=e.getRemoteMedia(i),v=e.getStats(),_=null==v?void 0:v.audioRecv.find((e=>e.ssrc===f)),g=null==v?void 0:v.videoRecv.find((e=>e.ssrc===m)),y=this.trafficStats&&this.trafficStats.peer_delay.find((e=>e.peer_uid===i));if(_&&("opus"!==_.codec&&"aac"!==_.codec&&"PCMU"!==_.codec&&"PCMA"!==_.codec&&"G722"!==_.codec||(l.codecType=_.codec),_.outputLevel?l.receiveLevel=Math.round(32767*_.outputLevel):u&&(l.receiveLevel=Math.round(32767*u.getVolumeLevel())),l.receiveBytes=_.bytes,l.receivePackets=_.packets,l.receivePacketsLost=_.packetsLost,l.packetLossRate=l.receivePacketsLost/(l.receivePackets+l.receivePacketsLost),l.receiveBitrate=o?8*Math.max(0,l.receiveBytes-o.receiveBytes):0,l.totalDuration=o?o.totalDuration+1:1,l.totalFreezeTime=o?o.totalFreezeTime:0,l.freezeRate=l.totalFreezeTime/l.totalDuration,l.receiveDelay=_.jitterBufferMs,l.totalDuration>10&&rN.isRemoteAudioFreeze(u)&&(l.totalFreezeTime+=1)),g){"H264"!==g.codec&&"H265"!==g.codec&&"VP8"!==g.codec&&"VP9"!==g.codec&&"AV1X"!==g.codec&&"AV1"!==g.codec||(d.codecType=g.codec),d.receiveBytes=g.bytes,d.receiveBitrate=a?8*Math.max(0,d.receiveBytes-a.receiveBytes):0,d.decodeFrameRate=g.decodeFrameRate<0?0:g.decodeFrameRate,d.renderFrameRate=g.decodeFrameRate<0?0:g.decodeFrameRate,g.outputFrame&&(d.renderFrameRate=g.outputFrame.frameRate),g.receivedFrame?(d.receiveFrameRate=g.receivedFrame.frameRate,d.receiveResolutionHeight=g.receivedFrame.height,d.receiveResolutionWidth=g.receivedFrame.width):p&&(d.receiveResolutionHeight=p._videoHeight||0,d.receiveResolutionWidth=p._videoWidth||0),void 0!==g.framesRateFirefox&&(d.receiveFrameRate=Math.round(g.framesRateFirefox)),d.receivePackets=g.packets,d.receivePacketsLost=g.packetsLost,d.packetLossRate=d.receivePacketsLost/(d.receivePackets+d.receivePacketsLost),d.totalDuration=a?a.totalDuration+1:1,d.totalFreezeTime=a?a.totalFreezeTime:0,d.receiveDelay=g.jitterBufferMs||0;const t=!!m&&e.getRemoteVideoIsReady(m);p&&t&&rN.isRemoteVideoFreeze(p,g,c)&&(d.totalFreezeTime+=1),d.freezeRate=d.totalFreezeTime/d.totalDuration}y&&(l.end2EndDelay=y.B_ad,d.end2EndDelay=y.B_vd,l.transportDelay=y.B_ed,d.transportDelay=y.B_ed,l.currentPacketLossRate=y.B_ealr4/100,d.currentPacketLossRate=y.B_evlr4/100,h.uplinkNetworkQuality=y.B_punq?y.B_punq:0,h.downlinkNetworkQuality=y.B_pdnq?y.B_pdnq:0),this.remoteStats.set(i,{audioStats:l,videoStats:d,videoPcStats:g,networkStats:h}),u&&this.exceptionMonitor.setRemoteAudioStats(u,l),p&&this.exceptionMonitor.setRemoteVideoStats(p,d)}))}}function iN(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function oN(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?iN(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):iN(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function aN(e){return e.match(/^[\.\:\d]+$/)?"".concat(e.replace(/[^\d]/g,"-"),".").concat(xC("TURN_DOMAIN")):($C.info("Cannot recognized as IP address ".concat(e,". Used As Host instead")),e)}function sN(e,t){var i,n;const r=xC("GATEWAY_DOMAINS");let s=r[1]&&-1!==t.indexOf(r[1])?1:0;e.addresses=e.addresses||[];const o=e.addresses.map((e=>e.domain_prefix?{address:"".concat(e.domain_prefix,".").concat(r[s++%r.length],":").concat(e.port)}:e.ip.match(/^[\.\:\d]+$/)?{ip:e.ip,port:e.port,address:"".concat(e.ip.replace(/[^\d]/g,"-"),".").concat(r[s++%r.length],":").concat(e.port)}:($C.info("Cannot recognized as IP address ".concat(e.ip,". Used As Host instead")),{ip:e.ip,port:e.port,address:"".concat(e.ip,":").concat(e.port)})));if(null!==(i=e.detail)&&void 0!==i&&i[18]&&"string"==typeof(null===(n=e.detail)||void 0===n?void 0:n[18])){const t=e.detail[18],i=null==t?void 0:t.split(";");for(let e=0;e<i.length;e++){var a;const t=gT(a=i[e]).call(a);o[e]&&t&&(o[e].ip6=t)}}return{gatewayAddrs:o,uid:e.uid,cid:e.cid,cert:e.cert,vid:e.detail&&e.detail[8],uni_lbs_ip:e.detail&&e.detail[1],res:e,csIp:e.detail&&e.detail[502]}}function cN(e){return"number"==typeof e?e:e.exact||e.ideal||e.max||e.min||0}function lN(e){const t=e._encoderConfig;if(!t)return{};const i={resolution:t.width&&t.height?"".concat(cN(t.width),"x").concat(cN(t.height)):void 0,maxVideoBW:t.bitrateMax,minVideoBW:t.bitrateMin};return"number"==typeof t.frameRate?(i.maxFrameRate=t.frameRate,i.minFrameRate=t.frameRate):t.frameRate&&(i.maxFrameRate=t.frameRate.max||t.frameRate.ideal||t.frameRate.exact||t.frameRate.min,i.minFrameRate=t.frameRate.min||t.frameRate.ideal||t.frameRate.exact||t.frameRate.max),i}function dN(e){const t={connectionType:0,googRtt:e.rtt};switch(e.selectedCandidatePair.localCandidate.candidateType){case"relay":{const i=e.selectedCandidatePair.localCandidate.relayProtocol;"udp"===i&&(t.connectionType=1),"tcp"===i&&(t.connectionType=3),"tls"===i&&(t.connectionType=4);break}case"srflx":t.connectionType=2}return t}function uN(e){return e>=0&&e<.17?1:e>=.17&&e<.36?2:e>=.36&&e<.59?3:e>=.59&&e<=1?4:e>1?5:0}function hN(e,t){let i,n,r;switch(t){case lT.CHOOSE_SERVER:n=4096,r="choose server";break;case lT.CLOUD_PROXY:n=1048576,r="proxy";break;case lT.CLOUD_PROXY_5:n=4194304,r="proxy5";break;case lT.CLOUD_PROXY_FALLBACK:n=4194310,r="proxy fallback";break;default:throw new Dw(Bb.UNEXPECTED_ERROR,"multi unlibs response transformer get unknown service id",{csIp:e.detail&&e.detail[502],retry:!1})}if(e.response_body.forEach((t=>{t.buffer&&t.buffer.flag===n&&(i={code:t.buffer.code,addresses:(t.buffer.edges_services||[]).map((e=>oN(oN({},e),{},{ticket:t.buffer.cert}))),server_ts:e.enter_ts,uid:t.buffer.uid,cid:t.buffer.cid,cname:t.buffer.cname,detail:oN(oN({},t.buffer.detail),e.detail),flag:t.buffer.flag,opid:e.opid,cert:t.buffer.cert})})),!i)throw new Dw(Bb.MULTI_UNILBS_RESPONSE_ERROR,"cannot parse response ".concat(r," from multi unilbs response"),{csIp:e.detail&&e.detail[502]});return i}async function fN(e,t){return await nb.all(e.addresses.map((async e=>({address:aN(e.ip),tcpport:e.port,udpport:e.port,username:t&&xC("ENCRYPT_PROXY_USERNAME_AND_PSW")&&window.isSecureContext?t.toString():iw.username,password:t&&xC("ENCRYPT_PROXY_USERNAME_AND_PSW")&&window.isSecureContext?await n_(t.toString()):iw.password}))))}function pN(e,t){const i=t._videoHeight||t.getMediaStreamTrack(!0).getSettings().height;return i?Math.max(i/cN(e.height),1):($C.warning("can't get ori-track's height, default scale down 4 times for low stream"),4)}function gN(e){let{candidateType:t,relayProtocol:i,type:n,address:r,port:s,protocol:o}=e;return"local-candidate"===n?{candidateType:t,relayProtocol:i,protocol:o}:{candidateType:t,relayProtocol:i,address:r,port:s,protocol:o}}function mN(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}class vN extends r_{get url(){return this._url?this._url:null}get reconnectMode(){return this._reconnectMode}set reconnectMode(e){var t;Di(t=["tryNext","recover"]).call(t,e)&&this.resetReconnectCount(e),this._reconnectMode=e}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,"reconnecting"===this._state?this.emit(yS.RECONNECTING,this.reconnectReason):"connected"===this._state?this.emit(yS.CONNECTED):"closed"===this._state?this.emit(yS.CLOSED):"failed"===this._state&&this.emit(yS.FAILED))}constructor(e,t,i,n){super(),oh(this,"connectionID",0),oh(this,"currentURLIndex",0),oh(this,"reconnectReason",void 0),oh(this,"_reconnectMode","tryNext"),oh(this,"_name",void 0),oh(this,"_state","closed"),oh(this,"_retryConfig",void 0),oh(this,"_reconnectCount",0),oh(this,"_forceCloseTimeout",5e3),oh(this,"_onlineReconnectListener",void 0),oh(this,"_closeEstablishingTransmitter",(()=>{})),oh(this,"_store",void 0),oh(this,"_joinChannelServiceRecordIndex",void 0),oh(this,"_useCompress",void 0),oh(this,"_inflateLength",0),oh(this,"_deflateLength",0),this._store=n,this._name=e,this._retryConfig=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?mN(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):mN(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},t),this._useCompress=i}resetReconnectCount(e){$C.debug("".concat(this._name," reset reconnect count, reason: ").concat(e)),this._reconnectCount=0}close(e,t){if(this.currentURLIndex=0,this.resetReconnectCount("close"),this._reconnectInterrupter&&this._reconnectInterrupter(),this._transmitter){this._transmitter.onclose=null,this._transmitter.onopen=null,this._transmitter.onmessage=null;const e=this._transmitter;t?setTimeout((()=>e.close()),500):e.close(),this._transmitter=void 0}this.state=e?"failed":"closed",this._closeEstablishingTransmitter&&this._closeEstablishingTransmitter()}reconnect(e,t){if(!this._transmitter)return void $C.warning("[".concat(this._name,"] can not reconnect, no websocket"));var i;void 0!==e&&(this.reconnectMode=e),$C.debug("[".concat(this._name,"] reconnect is triggered initiative")),"number"==typeof this._joinChannelServiceRecordIndex&&(null===(i=this._store)||void 0===i||i.recordJoinChannelService({status:"error",errors:[new Error(t)]},this._joinChannelServiceRecordIndex));const n=this._transmitter.onclose;this._transmitter.onclose=null,this._transmitter.close(),n&&n.bind(this._transmitter)({code:9999,reason:t})}getInflateData(){const e=this._inflateLength,t=this._deflateLength;return this.clearInflateData(),{inflateLength:e,deflateLength:t}}setInflateData(e){this._deflateLength=this._deflateLength+e.originLength,this._inflateLength=this._inflateLength+e.compressedLength}clearInflateData(){this._inflateLength=0,this._deflateLength=0}}var bN;!function(e){e[e.Default=0]="Default",e[e.Ack=1]="Ack"}(bN||(bN={}));class _N{constructor(e,t,i){oh(this,"version",1),oh(this,"initialRTO",void 0),oh(this,"maxBatchAckCount",void 0),oh(this,"maxRTO",void 0),oh(this,"initialRTT",void 0),oh(this,"ID",void 0),oh(this,"rtt",void 0),oh(this,"packetNumber",1),oh(this,"rtoRatioMap",new Map),oh(this,"timeoutMap",new Map),oh(this,"unorderedPacketQueue",[]),oh(this,"batchAckPacketQueue",[]),oh(this,"lastOrderedPacketNumber",0),oh(this,"batchAckTimer",void 0),oh(this,"sendImpl",void 0),oh(this,"receiveImpl",void 0),this.sendImpl=e,this.receiveImpl=t,this.ID=B_(7,"transmitter-"),this.initialRTO=void 0!==(null==i?void 0:i.initialRTO)?i.initialRTO:xC("TRANSMITTER_INITIAL_RTO"),this.initialRTT=void 0!==(null==i?void 0:i.initialRTT)?i.initialRTT:xC("TRANSMITTER_INITIAL_RTT"),this.rtt=void 0!==(null==i?void 0:i.initialRTT)?i.initialRTT:xC("TRANSMITTER_INITIAL_RTT"),this.maxBatchAckCount=void 0!==(null==i?void 0:i.maxBatchAckCount)?i.maxBatchAckCount:xC("TRANSMITTER_MAX_BATCH_ACK_COUNT"),this.maxRTO=void 0!==(null==i?void 0:i.maxRTO)?i.maxRTO:xC("TRANSMITTER_MAX_RTO")}packetize(e,t){return{type:bN.Default,version:this.version,packetNumber:t,payload:e}}serialize(e){switch(e.type){case bN.Default:{let t;t="string"==typeof e.payload?(new TextEncoder).encode(e.payload):e.payload;const i=new ArrayBuffer(t.length+15),n=new DataView(i);return n.setUint16(0,e.version),n.setUint8(2,e.type),n.setUint32(3,e.packetNumber),Yb(n,7,BigInt(e.sendTs)),new Uint8Array(n.buffer).set(t,15),i}case bN.Ack:{const t=new ArrayBuffer(16),i=new DataView(t);return i.setUint16(0,e.version),i.setUint8(2,e.type),i.setUint32(3,e.maxAckPacketNumber),i.setUint8(7,e.shift),Yb(i,8,BigInt(e.ackSendTs)),t}}}deserialize(e){const t=new DataView(e),i=t.getUint16(0),n=t.getUint8(2);switch(n){case bN.Default:{const r=t.getUint32(3),s=qb(t,7),o=e.slice(15),a=(new TextDecoder).decode(o);return{version:i,type:n,packetNumber:r,sendTs:Number(s),payload:a}}case bN.Ack:{const e=t.getUint32(3),r=t.getUint8(7),s=qb(t,8);return{version:i,type:n,maxAckPacketNumber:e,shift:r,ackSendTs:Number(s)}}default:throw $C.error("[".concat(this.ID,"] Unrecognized packet type ").concat(n)),new Error("Unrecognized packet type ".concat(n))}}sendMessage(e){const t=this.packetize(e,this.packetNumber);this.packetNumber=4294967295===this.packetNumber?1:this.packetNumber+1;const i=this.calculateRTO(t),n=window.setTimeout((()=>{this.resendMessage(t)}),i);this.timeoutMap.set(t.packetNumber,n),this.sendPacket(t)}onData(e){const t=this.deserialize(e);t.type===bN.Default?this.ack(t):t.type===bN.Ack&&(this.updateRTT(t,Math.round(performance.now())),this.clearRTO(t))}close(){this.rtt=this.initialRTT,this.packetNumber=1,Array.from(this.timeoutMap.entries()).forEach((e=>{let[t,i]=e;window.clearTimeout(i)})),this.timeoutMap=new Map,this.rtoRatioMap=new Map,this.unorderedPacketQueue=[],this.batchAckPacketQueue=[],this.lastOrderedPacketNumber=0,void 0!==this.batchAckTimer&&window.clearTimeout(this.batchAckTimer)}resendMessage(e){const t=this.calculateRTO(e),i=window.setTimeout((()=>{this.resendMessage(e)}),t);this.timeoutMap.set(e.packetNumber,i),this.sendPacket(e)}calculateRTO(e){const t=this.rtoRatioMap.get(e.packetNumber);if(void 0===t)return this.rtoRatioMap.set(e.packetNumber,1),this.initialRTO;{const i=9*this.rtt/8*t;return this.rtoRatioMap.set(e.packetNumber,t+1),i>this.maxRTO?this.maxRTO:i}}updateRTT(e,t){const i=e.ackSendTs;this.rtt=this.rtt*(7/8)+(t-i-this.rtt)/8}ack(e){if(e.packetNumber===this.lastOrderedPacketNumber+1)for(this.batchAckPacketQueue.length>=this.maxBatchAckCount&&this.batchAck(),this.batchAckTimer?this.batchAckPacketQueue.push(e):(this.batchAckPacketQueue.push(e),this.batchAckTimer=window.setTimeout((()=>{this.batchAck()}),this.rtt/8)),this.lastOrderedPacketNumber+=1,this.receiveImpl(e.payload);;){const e=this.unorderedPacketQueue[0];if(!e){this.unorderedPacketQueue.shift();break}this.batchAckTimer&&this.batchAck(),this.receiveImpl(e.payload),this.unorderedPacketQueue.shift(),this.lastOrderedPacketNumber+=1}else if(e.packetNumber<=this.lastOrderedPacketNumber){const t={ackSendTs:e.sendTs,maxAckPacketNumber:e.packetNumber,shift:0,type:bN.Ack,version:this.version};this.sendPacket(t)}else if(e.packetNumber>this.lastOrderedPacketNumber){this.unorderedPacketQueue[e.packetNumber-this.lastOrderedPacketNumber-2]=e;const t={ackSendTs:e.sendTs,maxAckPacketNumber:e.packetNumber,shift:0,type:bN.Ack,version:this.version};this.sendPacket(t)}}batchAck(){window.clearTimeout(this.batchAckTimer),this.batchAckTimer=void 0;const e={ackSendTs:this.batchAckPacketQueue[this.batchAckPacketQueue.length-1].sendTs,maxAckPacketNumber:this.batchAckPacketQueue[this.batchAckPacketQueue.length-1].packetNumber,shift:this.batchAckPacketQueue.length-1,type:bN.Ack,version:this.version};this.sendPacket(e),this.batchAckPacketQueue=[]}sendPacket(e){e.type===bN.Default&&(e.sendTs=Math.round(performance.now()));const t=this.serialize(e);this.sendImpl(t)}clearRTO(e){for(let t=e.maxAckPacketNumber-e.shift;t<=e.maxAckPacketNumber;t++){const e=this.timeoutMap.get(t);void 0!==e&&window.clearTimeout(e),this.timeoutMap.delete(t),this.rtoRatioMap.delete(t)}}}class yN extends vN{constructor(e,t){super(e,t,arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3?arguments[3]:void 0),oh(this,"_initMutex",void 0),oh(this,"_reconnectInterrupter",void 0),oh(this,"_url",void 0),oh(this,"_transmitter",void 0),oh(this,"_addresses",void 0),oh(this,"_reliableTransmission",void 0),this._initMutex=new G_("datachannel");const{timeout:i,timeoutFactor:n}=t,r=Math.max(300,Math.floor(3*i/5)),s=Math.max(1.2,Math.floor(8*n)/10);h_.ONLINE&&(this._retryConfig.timeout=r,this._retryConfig.timeoutFactor=s),C_.on(f_.NETWORK_STATE_CHANGE,((e,t)=>{e!==t&&(this.resetReconnectCount("network state change: ".concat(t," -> ").concat(e)),e===h_.ONLINE?(this._retryConfig.timeout=r,this._retryConfig.timeoutFactor=s):(this._retryConfig.timeout=i,this._retryConfig.timeoutFactor=n))}))}getConnection(){if(this._reliableTransmission)return this._reliableTransmission}async init(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;this._forceCloseTimeout=t;const i=(t,i)=>{this._addresses=e,this.currentURLIndex=this._addresses.findIndex((e=>e.fingerprint||xC("FINGERPRINT")));const n=this._addresses[this.currentURLIndex];this.state="connecting",this.createTransmitterConnection(n).then(t).catch(i),this.once(yS.CLOSED,(()=>i(new Dw(Bb.WS_DISCONNECT)))),this.once(yS.CONNECTED,(()=>t()))};return this._initMutex.lock().then((e=>new nb(((e,t)=>{i(e,t)})).then((()=>{e()})).catch((()=>{e()}))))}sendMessage(e){let t=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!this._transmitter||!this._reliableTransmission)throw new Dw(Bb.WS_ABORT,"datachannel is not ready");try{t||(e=JSON.stringify(e)),this._reliableTransmission.sendMessage(e)}catch(e){throw new Dw(Bb.WS_ERR,"send datachannel signal message error"+e.toString())}}unbindDcCloseEventListener(){this._transmitter&&(this._transmitter.onclose=null)}sendMessageWithJSON(e){const t=JSON.stringify(e);return{compressed:t,compressedLength:t.length,origin:e}}sendMessageWithUint8Array(e){return{compressed:e,compressedLength:e.byteLength,origin:e}}createTransmitterConnection(e){return this.connectionID+=1,this._joinChannelServiceRecordIndex=void 0,this._url="dc://".concat(e.ip,":").concat(e.port),new nb(((t,i)=>{var n;const r=()=>{$C.debug("[".concat(this._name,"] datachannel opened:"),this._url),this.reconnectMode="retry",this.state="connected",this.resetReconnectCount("opened"),t()},s=async e=>{var n;if(null===(n=this._closeEstablishingTransmitter)||void 0===n||n.call(this),$C.debug("[".concat(this._name,"] datachannel close ").concat(this._url,", code: ").concat(e.code,", reason: ").concat(e.reason,", current mode: ").concat(this.reconnectMode)),this._reconnectCount<this._retryConfig.maxRetryCount){"connected"===this.state&&(this.reconnectReason=e.reason,this.state="reconnecting");const n=y_(this,yS.WILL_RECONNECT,this.reconnectMode)||this.reconnectMode,r=await this.reconnectWithAction(n);if("closed"===this.state)return void $C.debug("[".concat(this.connectionID,"] dc is closed, no need to reconnect"));if(!r)return i(new Dw(Bb.WS_DISCONNECT,"datachannel reconnect failed: ".concat(e.code))),void this.close(!0);t()}else i(new Dw(Bb.WS_DISCONNECT,"datachannel close: ".concat(e.code))),this.close()},o=e=>{var t;null===(t=this._reliableTransmission)||void 0===t||t.onData(e.data)};this._transmitter&&(this._transmitter.onclose=null,this._transmitter.close()),this._reliableTransmission&&(this._reliableTransmission.close(),this._reliableTransmission=void 0),$C.debug("[".concat(this._name,"] start connect, address: ").concat(JSON.stringify(e)));const a=null===(n=this._store)||void 0===n?void 0:n.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"gateway"}),c=Date.now();b_(this,yS.TO_CONNECT_DATACHANNEL,e).then((e=>{var t,i;if(!e)throw new Error("transmissonInfo not exist yet");const{transmitter:n,close:l}=e;this._transmitter=n,null===(t=this._store)||void 0===t||t.signalChannelOpen();const d=Date.now()-c;$C.debug("[choose dc] dc open cost ".concat(d,"ms")),this._reliableTransmission=new _N((e=>{var t;this._transmitter&&"open"===this._transmitter.readyState&&(null===(t=this._transmitter)||void 0===t||t.send(e))}),(e=>{"string"==typeof e&&this.emit(yS.ON_MESSAGE,e)})),this._closeEstablishingTransmitter=()=>{var e;null===(e=this._reliableTransmission)||void 0===e||e.close(),this._reliableTransmission=void 0,l()},r&&r(),n.onclose=s,n.onmessage=o,null===(i=this._store)||void 0===i||i.recordJoinChannelService({endTs:Date.now(),status:"success"},a),this._joinChannelServiceRecordIndex=a})).catch((e=>{var t;if(null===(t=this._store)||void 0===t||t.recordJoinChannelService({endTs:Date.now(),status:e instanceof Dw&&e.code===Bb.WS_ABORT?"aborted":"error",errors:[e]},a),"closed"!==this.state){if(e instanceof Dw&&e.code===Bb.WS_ERR){const t=new Dw(Bb.WS_ERR,"init datachannel failed! Error: ".concat(e.toString()));return $C.error("[".concat(this._name,"]").concat(t)),void i(t)}s&&s(e)}else i(new Dw(Bb.WS_DISCONNECT,"datachannel is closed: ".concat(e.toString())))}))}))}async reconnectWithAction(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(this._reconnectCount>=this._retryConfig.maxRetryCount)return!1;if(!this._addresses)return!1;if("closed"===this.state)return!1;this._onlineReconnectListener||C_.networkState!==h_.OFFLINE||(this._onlineReconnectListener=C_.onlineWaiter&&C_.onlineWaiter.then((()=>{this._onlineReconnectListener=void 0})));let i=!0;if(this._reconnectInterrupter=()=>{i=!1},t){const t=X_(this._reconnectCount,this._retryConfig);$C.debug("[".concat(this._name,"] wait ").concat(t,"ms to reconnect datachannel, mode: ").concat(e)),await nb.race([U_(t),this._onlineReconnectListener||new nb((()=>{}))])}if("closed"===this.state||!i)return!1;this._reconnectCount+=1;const n=async(e,t)=>{this.emit(yS.RECONNECT_CREATE_CONNECTION,t),await this.createTransmitterConnection(e)};try{if("retry"===e){const t=this._addresses[this.currentURLIndex];this.emit(yS.RECONNECT_WAITTING_FINISH,e),await n(t,e)}else if("tryNext"===e){this.currentURLIndex+=1;for(let e=this.currentURLIndex;e<this._addresses.length;e++){if(this._addresses[e].fingerprint||xC("FINGERPRINT")){this.currentURLIndex=e;break}this.currentURLIndex+=1}if(this.currentURLIndex>=this._addresses.length)return $C.debug("[".concat(this._name,"] the available addresses are exhausted, change to recover")),await this.reconnectWithAction("recover",!1);$C.debug("[".concat(this._name,"] datachannel url length: ").concat(this._addresses.length," current index: ").concat(this.currentURLIndex));const t=this._addresses[this.currentURLIndex];this.emit(yS.RECONNECT_WAITTING_FINISH,e),await n(t,e)}else"recover"===e&&($C.debug("[".concat(this._name,"] start to failback to websocket")),this.resetReconnectCount("recover mode"),this.emit(yS.RECONNECT_WAITTING_FINISH,e),this.emit(yS.FAILBACK));return!0}catch(i){var r,s;return $C.error("[".concat(this._name,"] reconnect failed"),i.toString()),null!=i&&null!==(r=i.data)&&void 0!==r&&r.desc&&Array.isArray(i.data.desc)&&i.data.desc.length&&Di(s=i.data.desc).call(s,"dynamic key expired")?(this.emit(yS.ON_TOKEN_PRIVILEGE_DID_EXPIRE),!1):await this.reconnectWithAction(e,t)}}}class EN extends r_{get connectionState(){return this._connectionState}set connectionState(e){e!==this._connectionState&&(this._connectionState=e,e===gw.CONNECTED?this.emit(mw.WS_CONNECTED):e===gw.RECONNECTING?this.emit(mw.WS_RECONNECTING,this._websocketReconnectReason):e===gw.CLOSED&&this.emit(mw.WS_CLOSED,this._disconnectedReason))}get currentURLIndex(){return this.websocket.currentURLIndex}get url(){return this.websocket?this.websocket.url:null}get rtt(){return this.rttRolling.mean()}constructor(e,t){super(),oh(this,"_disconnectedReason",void 0),oh(this,"_websocketReconnectReason",void 0),oh(this,"_connectionState",gw.CLOSED),oh(this,"reconnectToken",void 0),oh(this,"websocket",void 0),oh(this,"openConnectionTime",void 0),oh(this,"clientId",void 0),oh(this,"lastMsgTime",Date.now()),oh(this,"uploadCache",[]),oh(this,"uploadCacheInterval",void 0),oh(this,"rttRolling",new dy(5)),oh(this,"pingpongTimer",void 0),oh(this,"inflateDataTimer",void 0),oh(this,"pingpongTimeoutCount",0),oh(this,"joinResponse",void 0),oh(this,"multiIpOption",void 0),oh(this,"initError",void 0),oh(this,"spec",void 0),oh(this,"store",void 0),oh(this,"onWebsocketMessage",(e=>{if(e instanceof ArrayBuffer)return void this.emit(mw.ON_BINARY_DATA,e);const t=JSON.parse(e);if(this.lastMsgTime=Date.now(),Object.prototype.hasOwnProperty.call(t,"_id")){const e="res-@".concat(t._id);this.emit(e,t._result,t._message)}else if(Object.prototype.hasOwnProperty.call(t,"_type")&&(this.emit(t._type,t._message),t._type===_w.ON_NOTIFICATION&&this.handleNotification(t._message),t._type===_w.ON_USER_BANNED))switch(t._message.error_code){case 14:this.close(l_.UID_BANNED);break;case 15:this.close(l_.IP_BANNED);break;case 16:this.close(l_.CHANNEL_BANNED)}})),this.clientId=e.clientId,this.spec=e,this.store=t,this.websocket=new yN("gateway-".concat(this.clientId),this.spec.retryConfig,!0,t),this.handleWebsocketEvents(),window.addEventListener("offline",(()=>{this.connectionState===gw.CONNECTED&&this.reconnect("retry",_S.OFFLINE)}))}async request(e,t,i,n){const r=B_(6,""),s={_id:r,_type:e,_message:t},o=this.websocket.connectionID,a=()=>new nb(((t,i)=>{if(this.connectionState===gw.CONNECTED)return t();const n=()=>{this.off(mw.WS_CLOSED,r),t()},r=()=>{this.off(mw.WS_CONNECTED,n),i(new Dw(Bb.WS_ABORT))};this.once(mw.WS_CONNECTED,n),this.once(mw.WS_CLOSED,r),e!==vw.PUBLISH&&e!==vw.SUBSCRIBE&&e!==vw.UNSUBSCRIBE&&e!==vw.UNPUBLISH&&e!==vw.CONTROL&&e!==vw.RESTART_ICE||this.once(mw.DISCONNECT_P2P,(()=>{i(new Dw(Bb.DISCONNECT_P2P))})),e!==vw.PUBLISH&&e!==vw.RESTART_ICE||this.once(mw.ABORT_P2P_EXECUTION,(()=>{i(new Dw(Bb.DISCONNECT_P2P))}))}));if(this.connectionState!==gw.CONNECTING&&this.connectionState!==gw.RECONNECTING||e===vw.JOIN||e===vw.REJOIN||await a(),e===vw.LEAVE&&(this.websocket.unbindDcCloseEventListener(),n=!0),this.websocket.sendMessage(s,!0,!1),n)return;const c=new nb(((i,n)=>{let s=!1;const a=(n,r)=>{s=!0,i({isSuccess:"success"===n,message:r||{}}),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.emit(mw.REQUEST_SUCCESS,e,t)};this.once("res-@".concat(r),a);const c=()=>{n(new Dw(Bb.WS_ABORT,"type: ".concat(e))),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.off("res-@".concat(r),a)};this.once(mw.WS_CLOSED,c),this.once(mw.WS_RECONNECTING,c),U_(xC("SIGNAL_REQUEST_TIMEOUT")).then((()=>{this.websocket.connectionID!==o||s||($C.warning("dc request timeout, type: ".concat(e)),this.emit(mw.REQUEST_TIMEOUT,e,t))}))}));let l=null;try{l=await c}catch(n){if(this.connectionState===gw.CLOSED||e===vw.LEAVE)throw new Dw(Bb.WS_ABORT);return!this.spec.forceWaitGatewayResponse||i?n.throw():e===vw.JOIN||e===vw.REJOIN?null:(await a(),await this.request(e,t))}if(l.isSuccess)return l.message;const d=Number(l.message.error_code||l.message.code),h=xS(d),u=new Dw(Bb.UNEXPECTED_RESPONSE,"".concat(h.desc,": ").concat(l.message.error_str),{code:d,data:l.message});return"success"===h.action?l.message:($C.warning("[".concat(this.websocket.connectionID,"] unexpected response from type ").concat(e,", error_code: ").concat(d,", message: ").concat(h.desc,", action: ").concat(h.action)),d===pw.ERR_TOO_MANY_BROADCASTERS?e===vw.JOIN||e===vw.REJOIN?(this.initError=u,this.close(),u.throw()):u.throw():"failed"===h.action?u.throw():"quit"===h.action?(this.initError=u,this.close(),u.throw()):(d===pw.ERR_JOIN_BY_MULTI_IP?(this.multiIpOption=l.message.option,$C.warning("[".concat(this.clientId,"] detect multi ip, recover")),this.reconnect("recover",_S.MULTI_IP)):this.reconnect(h.action,_S.SERVER_ERROR),e===vw.JOIN||e===vw.REJOIN?null:await this.request(e,t)))}waitMessage(e,t){return new nb((i=>{const n=r=>{(!t||t(r))&&(this.off(e,n),i(r))};this.on(e,n)}))}upload(e,t){const i={_type:e,_message:t};try{this.websocket.sendMessage(i)}catch(e){const t=xC("MAX_UPLOAD_CACHE")||50;this.uploadCache.push(i),this.uploadCache.length>t&&this.uploadCache.splice(0,1),this.uploadCache.length>0&&!this.uploadCacheInterval&&(this.uploadCacheInterval=window.setInterval((()=>{if(this.connectionState!==gw.CONNECTED)return;const e=this.uploadCache.splice(0,1)[0];0===this.uploadCache.length&&(window.clearInterval(this.uploadCacheInterval),this.uploadCacheInterval=void 0),this.upload(e._type,e._message)}),xC("UPLOAD_CACHE_INTERVAL")||2e3))}}send(e,t){const i={_type:e,_message:t};this.websocket.sendMessage(i)}init(e,t){return this.initError=void 0,this.multiIpOption=void 0,this.joinResponse=void 0,this.reconnectToken=void 0,this.openConnectionTime=void 0,new nb(((i,n)=>{this.once(mw.WS_CONNECTED,(()=>i(this.joinResponse))),this.once(mw.WS_CLOSED,(()=>n(this.initError||new Dw(Bb.WS_ABORT)))),this.connectionState=gw.CONNECTING,this.websocket.init(e).catch(n),this.websocket.once(yS.FAILBACK,(()=>{void 0===this.openConnectionTime&&n(new Dw(Bb.INIT_DATACHANNEL_TIMEOUT))})),this.inflateDataTimer&&window.clearInterval(this.inflateDataTimer),this.inflateDataTimer=window.setInterval((()=>{this.handleInflateData()}),2e4),setTimeout((()=>{t&&void 0===this.openConnectionTime&&($C.debug("[".concat(this.clientId,"] init datachannel timeout while join with failback to websocket")),n(new Dw(Bb.INIT_DATACHANNEL_TIMEOUT)))}),xC("DC_JOIN_WITH_FAILBACK"))}))}close(e){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.inflateDataTimer&&(this.handleInflateData(),window.clearInterval(this.inflateDataTimer),this.inflateDataTimer=void 0),this.reconnectToken=void 0,this.joinResponse=void 0,this._disconnectedReason=e||l_.LEAVE,this.connectionState=gw.CLOSED,$C.debug("[".concat(this.clientId,"] ")+"will close datachannel in signal"),this.websocket.close(),e===l_.FALLBACK&&(this.websocket.removeAllListeners(),this.websocket=new yN("gateway-".concat(this.clientId),this.spec.retryConfig,!0,this.store),this.handleWebsocketEvents())}async join(){if(!this.joinResponse){this.emit(mw.ABORT_P2P_EXECUTION);const e=await b_(this,mw.DATACHANNEL_CONNECTING),t=await this.request(vw.JOIN,e);if(!t)return this.emit(mw.REPORT_JOIN_GATEWAY,Bb.TIMEOUT,this.url||""),!1;this.joinResponse=t,this.emit(mw.JOIN_RESPONSE,this.joinResponse),this.reconnectToken=this.joinResponse.rejoin_token}return this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),!0}async rejoin(){if(!this.reconnectToken)throw new Dw(Bb.UNEXPECTED_ERROR,"can not rejoin, no rejoin token");const e=E_(this,mw.REQUEST_REJOIN_INFO);e.token=this.reconnectToken;const t=await this.request(vw.REJOIN,e);return!!t&&(this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),t.peers&&t.peers.forEach((e=>{this.emit(_w.ON_USER_ONLINE,{uid:e.uid}),e.audio&&this.emit(_w.ON_ADD_AUDIO_STREAM,{uid:e.uid,uint_id:e.uint_id,audio:!0,ssrcId:e.audio_ssrc}),e.video&&this.emit(_w.ON_ADD_VIDEO_STREAM,{uid:e.uid,uint_id:e.uint_id,video:!0,ssrcId:e.video_ssrc}),e.audio_mute?this.emit(_w.MUTE_AUDIO,{uid:e.uid}):this.emit(_w.UNMUTE_AUDIO,{uid:e.uid}),e.video_mute?this.emit(_w.MUTE_VIDEO,{uid:e.uid}):this.emit(_w.UNMUTE_VIDEO,{uid:e.uid}),e.audio_enable_local?this.emit(_w.ENABLE_LOCAL_AUDIO,{uid:e.uid}):this.emit(_w.DISABLE_LOCAL_AUDIO,{uid:e.uid}),e.video_enable_local?this.emit(_w.ENABLE_LOCAL_VIDEO,{uid:e.uid}):this.emit(_w.DISABLE_LOCAL_VIDEO,{uid:e.uid}),e.audio||e.video||this.emit(_w.ON_REMOVE_STREAM,{uid:e.uid,uint_id:e.uint_id})})),!0)}reconnect(e,t){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.websocket.reconnect(e,t)}handleNotification(e){$C.debug("[".concat(this.clientId,"] receive notification: "),e);const t=xS(e.code);if("success"!==t.action){if("failed"!==t.action)return"quit"===t.action?("ERR_REPEAT_JOIN_CHANNEL"===t.desc&&this.close(l_.UID_BANNED),void this.close()):void this.reconnect(t.action,_S.SERVER_ERROR);$C.error("[".concat(this.clientId,"] ignore error: "),t.desc)}}handlePingPong(){if(!this.websocket||"connected"!==this.websocket.state)return;this.pingpongTimeoutCount>0&&this.rttRolling.add(3e3),this.pingpongTimeoutCount+=1;const e=xC("PING_PONG_TIME_OUT"),t=Date.now();this.pingpongTimeoutCount>=e&&($C.warning("PINGPONG Timeout. Last Socket Message: ".concat(t-this.lastMsgTime,"ms")),t-this.lastMsgTime>xC("WEBSOCKET_TIMEOUT_MIN"))?this.reconnect("retry",_S.TIMEOUT):this.request(vw.PING,void 0,!0).then((()=>{this.pingpongTimeoutCount=0;const e=Date.now()-t;this.rttRolling.add(e),xC("REPORT_STATS")&&this.send(vw.PING_BACK,{pingpongElapse:e})})).catch((e=>{}))}handleInflateData(){const{inflateLength:e,deflateLength:t}=this.websocket.getInflateData();0!==e&&0!==t&&this.upload(bw.WS_INFLATE_DATA_LENGTH,{ws_deflate_length:t,ws_inflate_length:e})}handleWebsocketEvents(){this.websocket.on(yS.RECONNECT_WAITTING_FINISH,(e=>{this.emit(mw.WS_RECONNECT_WAITTING_FINISH,e)})),this.websocket.on(yS.RECONNECT_CREATE_CONNECTION,(e=>{this.emit(mw.WS_RECONNECT_CREATE_CONNECTION,e)})),this.websocket.on(yS.ON_MESSAGE,this.onWebsocketMessage),this.websocket.on(yS.CLOSED,(()=>{this.connectionState=gw.CLOSED})),this.websocket.on(yS.FAILED,(()=>{this._disconnectedReason=l_.NETWORK_ERROR,this.connectionState=gw.CLOSED})),this.websocket.on(yS.RECONNECTING,(e=>{this._websocketReconnectReason=e,this.joinResponse=void 0,this.connectionState===gw.CONNECTED?this.connectionState=gw.RECONNECTING:this.connectionState=gw.CONNECTING})),this.websocket.on(yS.WILL_RECONNECT,((e,t)=>{if(E_(this,mw.IS_P2P_DISCONNECTED)&&"retry"===e)return $C.debug("".concat(this.clientId," reconnect mode is retry, but p2p lost, change to tryNext")),this.reconnectToken=void 0,this.emit(mw.NEED_RENEW_SESSION),this.emit(mw.DISCONNECT_P2P),t("tryNext");"retry"!==e&&($C.debug("".concat(this.clientId," websockt will_connect event, renewSession reconnectMode is ").concat(e)),this.reconnectToken=void 0,this.emit(mw.NEED_RENEW_SESSION),this.emit(mw.DISCONNECT_P2P)),t(e)})),this.websocket.on(yS.CONNECTED,(()=>{this.openConnectionTime=Date.now(),this.reconnectToken?this.rejoin().catch((e=>{$C.warning("[".concat(this.clientId,"] rejoin failed ").concat(e)),this.reconnect("tryNext",_S.SERVER_ERROR)})):this.join().catch((e=>{if(this.emit(mw.REPORT_JOIN_GATEWAY,e.message||e.code,this.url||""),e instanceof Dw&&e.code===Bb.UNEXPECTED_RESPONSE&&e.data.code===pw.ERR_NO_AUTHORIZED)return $C.warning("[".concat(this.clientId,"] reconnect no authorized, recover")),void this.reconnect("recover",_S.SERVER_ERROR);$C.error("[".concat(this.clientId,"] join gateway request failed"),e.toString()),this.spec.forceWaitGatewayResponse?this.reconnect("tryNext",_S.SERVER_ERROR):(this.initError=e,this.close())}))})),this.websocket.on(yS.REQUEST_NEW_URLS,((e,t)=>{b_(this,mw.REQUEST_RECOVER,this.multiIpOption).then(e).catch(t)})),this.websocket.on(yS.ON_TOKEN_PRIVILEGE_DID_EXPIRE,(()=>{this.emit(_w.ON_TOKEN_PRIVILEGE_DID_EXPIRE)})),this.websocket.on(yS.TO_CONNECT_DATACHANNEL,(async(e,t,i)=>b_(this,mw.DATACHANNEL_PRECONNECT,e).then(t).catch(i))),this.websocket.on(yS.FAILBACK,(()=>{void 0!==this.openConnectionTime&&this.emit(mw.DATACHANNEL_FAILBACK)}))}}class CN extends r_{constructor(e){super(),oh(this,"_signal",void 0),oh(this,"_sequence",0),oh(this,"_userMap",new Map),oh(this,"_encoder",new TextEncoder),this._signal=e}async send(e,t,i,n,r){var s,o,a;"string"!=typeof t&&(t=JSON.stringify(t)),n=null!==(s=n)&&void 0!==s?s:B_(6,""),r=null!==(o=r)&&void 0!==o?o:this._sequence++;const c={_id:n,_type:e,_seq:null!==(a=r)&&void 0!==a?a:this._sequence++,_message:t};if(xC("SHOW_P2P_LOG")&&$C.debug("send message",c),this.sendStreamMessage(JSON.stringify(c)),i)return;const l=new nb(((t,i)=>{const r=window.setTimeout((()=>{this.off("res-@".concat(n),s),$C.warning("[external-signal] request timeout, type: ".concat(e)),0===this._userMap.size?i(new Fb(Bb.INVALID_REMOTE_USER)):i(new Fb(Bb.TIMEOUT))}),xC("EXTERNAL_SIGNAL_REQUEST_TIMEOUT")),s=(e,n)=>{r&&window.clearTimeout(r),"success"===e?t({isSuccess:!0,message:n}):i(new Fb(Bb.UNEXPECTED_ERROR,n))};this.once("res-@".concat(n),s)}));let d;try{d=await l}catch(i){if(i.code===Bb.TIMEOUT)return await this.send(e,t,!1,n,r);throw i}return d.isSuccess?d.message:void 0}sendStreamMessage(e){this._splitMessage(e).forEach((e=>{this._signal.request(vw.DATA_STREAM,{payload:M_(this._encoder.encode(e))})}))}onMessage(e){const{_uid:t}=e;let i;const n=this._userMap.get(t);if(n?i=n.splitMessageMap:(i=new Map,this._userMap.set(t,{isStart:!1,splitMessageMap:i,nextExpectedSequenceNumber:0,receivedMessagesMap:new Map})),"id"in e&&"total"in e){var r;const{id:n,total:s}=e,o=null!==(r=i.get(n))&&void 0!==r?r:[];if(o.push(e),i.has(n)||i.set(n,o),o.length!==s)return;{const r=ef(o).call(o,((e,t)=>e.index-t.index)).map((e=>e.payload)).join("");i.delete(n),(e=JSON.parse(r))._uid=t}}this.handleReceivedMessage(e)}setStart(e){this._userMap.has(e)?this._userMap.get(e).isStart=!0:this._userMap.set(e,{isStart:!0,splitMessageMap:new Map,nextExpectedSequenceNumber:0,receivedMessagesMap:new Map}),this.handleReceivedMessage()}setEnd(e){return this._userMap.delete(e),0===this._userMap.size}ack(e,t,i){this.send(AS.ACK,JSON.stringify({success:!i,message:t}),!0,e)}handleReceivedMessage(e){const t=()=>{this._userMap.forEach((e=>{const{receivedMessagesMap:t,nextExpectedSequenceNumber:i}=e;for(;t.has(i);){const n=t.get(i);t.delete(i),this.receiveMessage(n),e.nextExpectedSequenceNumber++}}))};if(!e)return void t();const{_uid:i,_seq:n}=e,r=this._userMap.get(i),{receivedMessagesMap:s,isStart:o,nextExpectedSequenceNumber:a}=r;n<a?$C.debug("[external-signal] receive old message, seq: ".concat(n)):(s.set(n,e),o&&n===a&&(this.receiveMessage(e),s.delete(a),r.nextExpectedSequenceNumber++,t()))}receiveMessage(e){const{_id:t,_type:i,_message:n,_uid:r}=e;if(xC("SHOW_P2P_LOG")&&$C.debug("收到消息",e),t)switch(e._type){case AS.PUBLISH:const s=JSON.parse(n);this._signal.emit(i,s,r),this.ack(e._id);break;case AS.CONTROL:case AS.UNPUBLISH:case AS.DO_SUBSCRIBE:case AS.DO_UNSUBSCRIBE:{const t=JSON.parse(n);t.uid=r,b_(this._signal,i,t).then((t=>{this.ack(e._id,t)})).catch((t=>{this.ack(e._id,void 0,!0)}));break}case AS.ACK:{const{success:e,message:i}=JSON.parse(n);this.emit("res-@".concat(t),e?"success":"failed",i);break}case AS.CALL:b_(this,i,n).then((e=>{this.ack(t,e)}));break;case AS.RESTART_ICE:case AS.EXCHANGE_SDP:case AS.SUBSCRIBE:case AS.UNSUBSCRIBE:b_(this._signal,i,n).then((e=>{this.ack(t,e)})).catch((t=>{this.ack(e._id,void 0,!0)}));break;case AS.CANDIDATE:this._signal.emit(i,n),this.ack(t);break;case AS.JOIN:this.emit(i,JSON.parse(n));break;default:this.emit(i,n),this.ack(t)}}_splitMessage(e){if(e.length<CN.MAX_MESSAGE_SIZE)return[e];const t=[],i=B_(6,"");let n=0;const r=Math.ceil(e.length/800);for(;e.length>0;){n++;const s=e.slice(0,800);t.push({id:i,index:n,total:r,payload:s}),e=e.slice(800)}return t.map((e=>JSON.stringify(e)))}clear(){this._sequence=0,this._userMap.clear()}}oh(CN,"MAX_MESSAGE_SIZE",1024);class wN extends r_{get connectionState(){return this._connectionState}set connectionState(e){e!==this._connectionState&&(this._connectionState=e,e===gw.CONNECTED?this.emit(mw.WS_CONNECTED):e===gw.RECONNECTING?this.emit(mw.WS_RECONNECTING,this._websocketReconnectReason):e===gw.CLOSED&&this.emit(mw.WS_CLOSED,this._disconnectedReason))}get currentURLIndex(){return this.websocket.currentURLIndex}get url(){return this.websocket&&this.websocket.url||null}get rtt(){return this.rttRolling.mean()}constructor(e,t){super(),oh(this,"_disconnectedReason",void 0),oh(this,"_websocketReconnectReason",void 0),oh(this,"_connectionState",gw.CLOSED),oh(this,"reconnectToken",void 0),oh(this,"_userInRoom",!1),oh(this,"_userOnlineTime",void 0),oh(this,"websocket",void 0),oh(this,"openConnectionTime",void 0),oh(this,"clientId",void 0),oh(this,"lastMsgTime",Date.now()),oh(this,"uploadCache",[]),oh(this,"uploadCacheInterval",void 0),oh(this,"rttRolling",new dy(5)),oh(this,"pingpongTimer",void 0),oh(this,"wsInflateDataTimer",void 0),oh(this,"pingpongTimeoutCount",0),oh(this,"joinResponse",void 0),oh(this,"multiIpOption",void 0),oh(this,"initError",void 0),oh(this,"spec",void 0),oh(this,"store",void 0),oh(this,"_external_signal",void 0),oh(this,"onWebsocketMessage",(e=>{if(e.data instanceof ArrayBuffer)return void this.emit(mw.ON_BINARY_DATA,e.data);const t=JSON.parse(e.data);if(this.lastMsgTime=Date.now(),Object.prototype.hasOwnProperty.call(t,"_id")){const e="res-@".concat(t._id);this.emit(e,t._result,t._message)}else if(Object.prototype.hasOwnProperty.call(t,"_type")){switch(t._type){case _w.ON_DATA_STREAM:return void this.handleDataStream(t._message);case _w.MUTE_AUDIO:case _w.MUTE_VIDEO:case _w.ON_P2P_LOST:return;case _w.ON_USER_ONLINE:this.emit(t._type,t._message);const{uid:e}=t._message;return this._external_signal.setStart(e),void this._external_signal.send(AS.JOIN,{onlineTime:this._userOnlineTime},!0)}if(this.emit(t._type,t._message),t._type===_w.ON_NOTIFICATION&&this.handleNotification(t._message),t._type===_w.ON_USER_BANNED)switch(t._message.error_code){case 14:this.close(l_.UID_BANNED);break;case 15:this.close(l_.IP_BANNED);break;case 16:this.close(l_.CHANNEL_BANNED)}if(t._type===_w.ON_USER_LICENSE_BANNED)switch(t._message.error_code){case pw.ERR_LICENSE_MISSING:this.close(l_.LICENSE_MISSING);break;case pw.ERR_LICENSE_EXPIRED:this.close(l_.LICENSE_EXPIRED);break;case pw.ERR_LICENSE_MINUTES_EXCEEDED:this.close(l_.LICENSE_MINUTES_EXCEEDED);break;case pw.ERR_LICENSE_PERIOD_INVALID:this.close(l_.LICENSE_PERIOD_INVALID);break;case pw.ERR_LICENSE_MULTIPLE_SDK_SERVICE:this.close(l_.LICENSE_MULTIPLE_SDK_SERVICE);break;case pw.ERR_LICENSE_ILLEGAL:this.close(l_.LICENSE_ILLEGAL);break;default:this.close()}}})),this.clientId=e.clientId,this.spec=e,this.store=t,this.websocket=new GS("gateway-".concat(this.clientId),this.spec.retryConfig,!0,xC("JOIN_GATEWAY_USE_DUAL_DOMAIN"),xC("JOIN_GATEWAY_USE_443PORT_ONLY"),t),this.handleWebsocketEvents(),window.addEventListener("offline",(()=>{this.connectionState===gw.CONNECTED&&this.reconnect("retry",u_.OFFLINE)})),this._external_signal=new CN(this),this._handleSignalP2PEvents()}async request(e,t,i,n){const r=B_(6,""),s={_id:r,_type:e,_message:t},o=this.websocket.connectionID,a=()=>new nb(((t,i)=>{if(this.connectionState===gw.CONNECTED)return t();const n=()=>{this.off(mw.WS_CLOSED,r),t()},r=()=>{this.off(mw.WS_CONNECTED,n),i(new Fb(Bb.WS_ABORT))};this.once(mw.WS_CONNECTED,n),this.once(mw.WS_CLOSED,r),e!==vw.PUBLISH&&e!==vw.SUBSCRIBE&&e!==vw.UNSUBSCRIBE&&e!==vw.UNPUBLISH&&e!==vw.CONTROL&&e!==vw.RESTART_ICE||this.once(mw.DISCONNECT_P2P,(()=>{i(new Fb(Bb.DISCONNECT_P2P))})),e!==vw.PUBLISH&&e!==vw.RESTART_ICE||this.once(mw.ABORT_P2P_EXECUTION,(()=>{i(new Fb(Bb.DISCONNECT_P2P))}))}));if(this.connectionState!==gw.CONNECTING&&this.connectionState!==gw.RECONNECTING||e===vw.JOIN||e===vw.REJOIN||await a(),this.websocket.sendMessage(s,!0),n)return;const c=new nb(((i,n)=>{let s=!1;const a=(n,r)=>{s=!0,i({isSuccess:"success"===n,message:r||{}}),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.emit(mw.REQUEST_SUCCESS,e,t)};this.once("res-@".concat(r),a);const c=()=>{n(new Fb(Bb.WS_ABORT,"type: ".concat(e))),this.off(mw.WS_CLOSED,c),this.off(mw.WS_RECONNECTING,c),this.off("res-@".concat(r),a)};this.once(mw.WS_CLOSED,c),this.once(mw.WS_RECONNECTING,c),U_(xC("SIGNAL_REQUEST_TIMEOUT")).then((()=>{this.websocket.connectionID!==o||s||($C.warning("[".concat(this.clientId,"] ws request timeout, type: ").concat(e)),this.emit(mw.REQUEST_TIMEOUT,e,t))}))}));let l=null;try{l=await c}catch(n){if(this.connectionState===gw.CLOSED||e===vw.LEAVE)throw new Fb(Bb.WS_ABORT);return!this.spec.forceWaitGatewayResponse||i?n.throw():e===vw.JOIN||e===vw.REJOIN?null:(await a(),await this.request(e,t))}if(l.isSuccess)return l.message;const d=Number(l.message.error_code||l.message.code),h=xS(d),u=new Fb(Bb.UNEXPECTED_RESPONSE,"".concat(h.desc,": ").concat(l.message.error_str),{code:d,data:l.message});return"success"===h.action?l.message:($C.warning("[".concat(this.clientId,"] [").concat(this.websocket.connectionID,"] unexpected response from type ").concat(e,", error_code: ").concat(d,", message: ").concat(h.desc,", action: ").concat(h.action)),d===pw.ERR_TOO_MANY_BROADCASTERS?e===vw.JOIN||e===vw.REJOIN?(this.initError=u,this.close(),u.throw()):u.throw():"failed"===h.action?u.throw():"quit"===h.action?(this.initError=u,this.close(),u.throw()):(d===pw.ERR_JOIN_BY_MULTI_IP?(this.multiIpOption=l.message.option,$C.warning("[".concat(this.clientId,"] detect multi ip, recover")),this.reconnect("recover",u_.MULTI_IP)):this.reconnect(h.action,u_.SERVER_ERROR),e===vw.JOIN||e===vw.REJOIN?null:await this.request(e,t)))}waitMessage(e,t){return new nb((i=>{const n=r=>{(!t||t(r))&&(this.off(e,n),i(r))};this.on(e,n)}))}upload(e,t){const i={_type:e,_message:t};try{this.websocket.sendMessage(i)}catch(e){const t=xC("MAX_UPLOAD_CACHE")||50;this.uploadCache.push(i),this.uploadCache.length>t&&this.uploadCache.splice(0,1),this.uploadCache.length>0&&!this.uploadCacheInterval&&(this.uploadCacheInterval=window.setInterval((()=>{if(this.connectionState!==gw.CONNECTED)return;const e=this.uploadCache.splice(0,1)[0];0===this.uploadCache.length&&(window.clearInterval(this.uploadCacheInterval),this.uploadCacheInterval=void 0),this.upload(e._type,e._message)}),xC("UPLOAD_CACHE_INTERVAL")||2e3))}}send(e,t){const i={_type:e,_message:t};this.websocket.sendMessage(i)}async sendExtensionMessage(e,t,i){return await this.waitTillUserOnline(),await this._external_signal.send(e,t,i)}init(e,t){return this.initError=void 0,this.multiIpOption=void 0,this.joinResponse=void 0,this.reconnectToken=void 0,this.openConnectionTime=void 0,new nb(((t,i)=>{this.once(mw.WS_CONNECTED,(()=>t(this.joinResponse))),this.once(mw.WS_CLOSED,(()=>i(this.initError||new Fb(Bb.WS_ABORT)))),this.connectionState=gw.CONNECTING,this.websocket.init(e).catch(i),this.wsInflateDataTimer&&window.clearInterval(this.wsInflateDataTimer),this.wsInflateDataTimer=window.setInterval((()=>{this.handleWsInflateData()}),2e4)}))}close(e){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.wsInflateDataTimer&&(this.handleWsInflateData(),window.clearInterval(this.wsInflateDataTimer),this.wsInflateDataTimer=void 0),this.reconnectToken=void 0,this.joinResponse=void 0,this._disconnectedReason=e||l_.LEAVE,this.connectionState=gw.CLOSED,$C.debug("[".concat(this.clientId,"] ")+"will close websocket in signal"),this.websocket.close(),e===l_.FALLBACK&&(this.websocket.removeAllListeners(),this.websocket=new GS("gateway-".concat(this.clientId),this.spec.retryConfig,!0,xC("JOIN_GATEWAY_USE_DUAL_DOMAIN"),xC("JOIN_GATEWAY_USE_443PORT_ONLY"),this.store),this.handleWebsocketEvents())}async join(){if(!this.joinResponse){this.emit(mw.ABORT_P2P_EXECUTION);const e=await b_(this,mw.REQUEST_JOIN_INFO),t=await this.request(vw.JOIN,e);if(!t)return this.emit(mw.REPORT_JOIN_GATEWAY,Bb.TIMEOUT,this.url||""),!1;this.joinResponse=t,this.emit(mw.JOIN_RESPONSE,this.joinResponse),this.reconnectToken=this.joinResponse.rejoin_token}return this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),this._userOnlineTime=(new Date).getTime(),this._external_signal.clear(),!0}async rejoin(){if(!this.reconnectToken)throw new Fb(Bb.UNEXPECTED_ERROR,"can not rejoin, no rejoin token");const e=E_(this,mw.REQUEST_REJOIN_INFO);return e.token=this.reconnectToken,!!await this.request(vw.REJOIN,e)&&(this.connectionState=gw.CONNECTED,this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval(this.handlePingPong.bind(this),3e3),!0)}reconnect(e,t){this.pingpongTimer&&(this.pingpongTimeoutCount=0,window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0),this.websocket.reconnect(e,t)}handleDataStream(e){try{var t;const i=L_(e.payload),n=(new TextDecoder).decode(i),r=JSON.parse(n);"total"in r&&"id"in r||Di(t=Object.values(AS)).call(t,r._type)?(e.seq&&delete e.seq,r._uid=e.uid,this._external_signal.onMessage(r)):this.emit(_w.ON_DATA_STREAM,e)}catch(e){}}handleNotification(e){$C.debug("[".concat(this.clientId,"] receive notification: "),e);const t=xS(e.code);if("success"!==t.action){if("failed"!==t.action)return"quit"===t.action?("ERR_REPEAT_JOIN_CHANNEL"===t.desc&&this.close(l_.UID_BANNED),void this.close()):void this.reconnect(t.action,u_.SERVER_ERROR);$C.error("[".concat(this.clientId,"] ignore error: "),t.desc)}}handlePingPong(){if(!this.websocket||"connected"!==this.websocket.state)return;this.pingpongTimeoutCount>0&&this.rttRolling.add(3e3),this.pingpongTimeoutCount+=1;const e=xC("PING_PONG_TIME_OUT"),t=Date.now();this.pingpongTimeoutCount>=e&&($C.warning("[".concat(this.clientId,"] PINGPONG Timeout. Last Socket Message: ").concat(t-this.lastMsgTime,"ms")),t-this.lastMsgTime>xC("WEBSOCKET_TIMEOUT_MIN"))?this.reconnect("retry",u_.TIMEOUT):this.request(vw.PING,void 0,!0).then((()=>{this.pingpongTimeoutCount=0;const e=Date.now()-t;this.rttRolling.add(e),xC("REPORT_STATS")&&this.send(vw.PING_BACK,{pingpongElapse:e})})).catch((e=>{}))}handleWsInflateData(){const{wsInflateLength:e,wsDeflateLength:t}=this.websocket.getWsInflateData();0!==e&&0!==t&&this.upload(bw.WS_INFLATE_DATA_LENGTH,{ws_deflate_length:t,ws_inflate_length:e})}handleWebsocketEvents(){this.websocket.on(Cw.RECONNECT_WAITTING_FINISH,(e=>{this.emit(mw.WS_RECONNECT_WAITTING_FINISH,e)})),this.websocket.on(Cw.RECONNECT_CREATE_CONNECTION,(e=>{this.emit(mw.WS_RECONNECT_CREATE_CONNECTION,e)})),this.websocket.on(Cw.ON_MESSAGE,this.onWebsocketMessage),this.websocket.on(Cw.CLOSED,(()=>{this.connectionState=gw.CLOSED})),this.websocket.on(Cw.FAILED,(()=>{this._disconnectedReason=l_.NETWORK_ERROR,this.connectionState=gw.CLOSED})),this.websocket.on(Cw.RECONNECTING,(e=>{this._websocketReconnectReason=e,this.joinResponse=void 0,this.connectionState===gw.CONNECTED?this.connectionState=gw.RECONNECTING:this.connectionState=gw.CONNECTING})),this.websocket.on(Cw.WILL_RECONNECT,((e,t,i)=>{if(E_(this,mw.IS_P2P_DISCONNECTED)&&"retry"===e)return $C.debug("".concat(this.clientId," reconnect mode is retry, but p2p lost, change to tryNext")),this.reconnectToken=void 0,this.emit(mw.NEED_RENEW_SESSION),this.emit(mw.DISCONNECT_P2P),i("tryNext");"retry"!==e&&($C.debug("".concat(this.clientId," websocket will_connect event, renewSession reconnectMode is ").concat(e)),this.reconnectToken=void 0,this.emit(mw.NEED_RENEW_SESSION),this.emit(mw.DISCONNECT_P2P)),i(e)})),this.websocket.on(Cw.CONNECTED,(()=>{this.openConnectionTime=Date.now(),this.reconnectToken?this.rejoin().catch((e=>{$C.warning("[".concat(this.clientId,"] rejoin failed ").concat(e)),this.reconnect("tryNext",u_.SERVER_ERROR)})):this.join().catch((e=>{if(this.emit(mw.REPORT_JOIN_GATEWAY,e.message||e.code,this.url||""),e instanceof Fb&&e.code===Bb.UNEXPECTED_RESPONSE&&e.data.code===pw.ERR_NO_AUTHORIZED)return $C.warning("[".concat(this.clientId,"] reconnect no authorized, recover")),void this.reconnect("recover",u_.SERVER_ERROR);$C.error("[".concat(this.clientId,"] join gateway request failed"),e.toString()),this.spec.forceWaitGatewayResponse?this.reconnect("tryNext",u_.SERVER_ERROR):(this.initError=e,this.close())}))})),this.websocket.on(Cw.REQUEST_NEW_URLS,((e,t)=>{b_(this,mw.REQUEST_RECOVER,this.multiIpOption).then(e).catch(t)})),this.websocket.on(Cw.ON_TOKEN_PRIVILEGE_DID_EXPIRE,(()=>{this.emit(_w.ON_TOKEN_PRIVILEGE_DID_EXPIRE)}))}_handleSignalP2PEvents(){this._external_signal.on(AS.JOIN,(async e=>{if(this._userOnlineTime&&this._userOnlineTime<e.onlineTime){const e=await b_(this,mw.P2P_START,void 0),t=await this._external_signal.send(AS.CALL,e);this.emit(mw.P2P_CONNECTION,t,!0)}this._userInRoom=!0,this.emit("user-online")})),this.on(_w.ON_USER_OFFLINE,(async e=>{this._external_signal.clear(),this._userInRoom=!1})),this._external_signal.on(AS.CALL,(async(e,t,i)=>{this._userInRoom=!0,this.emit("user-online");try{t(await b_(this,mw.P2P_START,e))}catch(e){i(e)}}))}async waitTillUserOnline(){return new nb((e=>{if(this._userInRoom)e();else{const t=()=>{this.off("user-online",t),e()};this.on("user-online",t)}}))}}function SN(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function TN(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?SN(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):SN(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const AN=new Map;class RN extends r_{get state(){return this._state}set state(e){if(e===this._state)return;const t=this._state;this._state=e,"DISCONNECTED"===e&&this._disconnectedReason?this.emit(Qw.CONNECTION_STATE_CHANGE,e,t,this._disconnectedReason):this.emit(Qw.CONNECTION_STATE_CHANGE,e,t)}get joinGatewayStartTime(){return this._joinGatewayStartTime}set joinGatewayStartTime(e){$C.debug("[".concat(this.store.clientId,"] set joinGatewayStartTime at ").concat(e)),this._joinGatewayStartTime=e}constructor(e,t){super(),oh(this,"store",void 0),oh(this,"joinInfo",void 0),oh(this,"key",void 0),oh(this,"ntpOffset",0),oh(this,"signal",void 0),oh(this,"role",void 0),oh(this,"inChannelInfo",{joinAt:null,duration:0}),oh(this,"spec",void 0),oh(this,"_state","DISCONNECTED"),oh(this,"_statsCollector",void 0),oh(this,"_disconnectedReason",void 0),oh(this,"isSignalRecover",!1),oh(this,"hasChangeBGPAddress",!1),oh(this,"trafficStatsInterval",void 0),oh(this,"networkQualityInterval",void 0),oh(this,"_joinGatewayStartTime",0),oh(this,"_signalTimeout",!1),oh(this,"_clientRoleOptions",void 0),oh(this,"_isProactiveJoin",!1),this.store=e,this.spec=t,this.signal=this.store.useP2P?new wN(TN(TN({},t),{},{retryConfig:t.websocketRetryConfig}),e):this.store.useDataChannel?new EN(TN(TN({},t),{},{retryConfig:t.websocketRetryConfig}),e):new YS(TN(TN({},t),{},{retryConfig:t.websocketRetryConfig}),e),this._statsCollector=t.statsCollector,this.role=t.role||"audience",this._clientRoleOptions=t.clientRoleOptions,this.handleSignalEvents()}async join(e,t,i){if(this.signal instanceof EN){let t=!1;"disabled"!==e.cloudProxyServer?($C.debug("[".concat(this.store.clientId,"] Dc is not supported, because cloudProxyServer are not supported (").concat(e.cloudProxyServer,")")),t=!0):"".concat(e.apResponse.cid,"_").concat(e.apResponse.cert).length>255||"".concat(e.apResponse.cid,"_").concat(e.apResponse.cert).length<22?($C.debug("[".concat(this.store.clientId,"] Dc is not supported, because ticket length is incorrect, it has to be between 22 and 255")),t=!0):e.apResponse.addresses.some((e=>e.fingerprint))||xC("FINGERPRINT")||($C.debug("[".concat(this.store.clientId,"] Dc is not supported, because fingerprint does not exist")),t=!0),t&&this.resetSignal()}this.store.joinGatewayStart(),"disabled"!==e.cloudProxyServer&&(this.hasChangeBGPAddress=!0);const n=Date.now();let r=AN.get(e.cname);if(r||(r=new Map,AN.set(e.cname,r)),this._isProactiveJoin=!0,r.has(e.uid)){const t=new Dw(Bb.UID_CONFLICT);throw nw.joinGateway(e.sid,{lts:n,succ:!1,ec:t.message,addr:null,uid:e.uid,cid:e.cid,firstSuccess:this._isProactiveJoin,avoidJoinStartTime:this.store.avoidJoinStart,isProxy:!!e.proxyServer,signalChannel:this.signal instanceof EN?"1":"0"}),this._isProactiveJoin=!1,t}r.set(e.uid,!0),this.joinInfo=e,this.key=t;let s=0;this.joinGatewayStartTime=n;const o=e.proxyServer;try{let t;if($C.debug("[".concat(this.store.clientId,"] use ").concat(this.signal instanceof EN?"datachannel":"websocket"," join uid ").concat(s)),this.signal instanceof EN)t=await this.signal.init(e.apResponse.addresses,i);else{const n=e.gatewayAddrs.map((t=>{let{address:i}=t;const[n,r]=i.split(":"),s={host:n,port:r};return e.proxyServer&&(s.proxy=e.proxyServer),s}));t=await this.signal.init(n,i)}s=t.uid,$C.debug("[".concat(this.store.clientId,"] ").concat(this.signal instanceof EN?"datachannel":"websocket"," join uid ").concat(s," cost ").concat(Date.now()-this.joinGatewayStartTime))}catch(t){if(t&&t.code===Bb.INIT_WEBSOCKET_TIMEOUT)throw $C.warning("[".concat(this.store.clientId,"] User join failed"),t.toString()),t;if(t&&t.code===Bb.INIT_DATACHANNEL_TIMEOUT)throw $C.warning("[".concat(this.store.clientId,"] User join datachannel failed"),t.toString()),this.resetSignal(),t;throw $C.error("[".concat(this.store.clientId,"] User join failed"),t.toString()),nw.joinGateway(e.sid,{lts:n,succ:!1,ec:t.message,addr:this.signal.url,uid:e.uid,cid:e.cid,firstSuccess:this._isProactiveJoin,avoidJoinStartTime:this.store.avoidJoinStart,isProxy:!!o,signalChannel:this.signal instanceof EN?"1":"0"}),this._isProactiveJoin=!1,r.delete(e.uid),this.signal.close(),t}return this.state="CONNECTED",this.inChannelInfo.joinAt=Date.now(),$C.debug("[".concat(this.store.clientId,"] Connected to gateway server")),this.trafficStatsInterval=window.setInterval((()=>{this.updateTrafficStats().catch((e=>{$C.warning("[".concat(this.store.clientId,"] get traffic stats error"),e.toString())}))}),3e3),this.networkQualityInterval=window.setInterval((()=>{navigator&&void 0!==navigator.onLine&&!navigator.onLine?this.emit(Qw.NETWORK_QUALITY,{downlinkNetworkQuality:6,uplinkNetworkQuality:6}):this._signalTimeout?this.emit(Qw.NETWORK_QUALITY,{downlinkNetworkQuality:5,uplinkNetworkQuality:5}):"CONNECTED"===this.state&&this._statsCollector.trafficStats?this.emit(Qw.NETWORK_QUALITY,{uplinkNetworkQuality:uN(this._statsCollector.trafficStats.B_unq),downlinkNetworkQuality:uN(this._statsCollector.trafficStats.B_dnq)}):this.emit(Qw.NETWORK_QUALITY,{uplinkNetworkQuality:0,downlinkNetworkQuality:0})}),2e3),this.store.joinGatewayEnd(),s}async leave(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1?arguments[1]:void 0;if("DISCONNECTED"!==this.state){t!==l_.FALLBACK&&(this.state="DISCONNECTING");try{e||this.signal.connectionState!==gw.CONNECTED||await function(e,t){return t===1/0?e:nb.race([e,P_(t)])}(this.signal.request(vw.LEAVE,void 0,!0),3e3)}catch(e){$C.warning("[".concat(this.store.clientId,"] leave request failed, ignore"),e)}this.signal.close(t),t!==l_.FALLBACK&&(this.state="DISCONNECTED"),this.reset()}}async publish(e,t,i){if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not publish when connection state is ".concat(this.state));const n={state:"offer",p2p_id:this.store.p2pId,ortc:t,mode:this.spec.mode,extend:xC("PUB_EXTEND"),twcc:!!xC("PUBLISH_TWCC"),rtx:!!xC("USE_PUB_RTX")};try{return(await this.signal.request(vw.PUBLISH,n,!0))._message}catch(n){if(i&&n.data&&n.data.code===pw.ERR_PUBLISH_REQUEST_INVALID)return $C.warning("[".concat(this.store.clientId,"] receive publish error code, retry"),n.toString()),await this.tryUnpubBeforeRepub(e,t),this.publish(e,t,!1);throw n}}async publishDataChannel(e,t,i){var n;if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not publish when connection state is ".concat(this.state));const r={stream_id:t.streamId,ordered:t.ordered?1:0,max_retrans_times:null!==(n=t.maxRetransmits)&&void 0!==n?n:10,channel_id:t.channelId,metadata:t.metadata};try{await this.signal.request(vw.PUBLISH_DATASTREAM,r,!0)}catch(n){if(i&&n.data&&n.data.code===pw.ERR_PUBLISH_REQUEST_INVALID)return $C.warning("[".concat(this.store.clientId,"] receive publish datachannels error code, retry"),n.toString()),await this.tryUnpubDataChannelBeforeRepub(e,t),this.publishDataChannel(e,t,!1);throw n}}async unpublish(e,t){try{if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not publish when connection state is ".concat(this.state));await this.signal.request(vw.UNPUBLISH,{stream_id:t,ortc:e},!0)}catch(e){$C.warning("[".concat(this.store.clientId,"] unpublish warning: "),e)}}async unpublishDataChannel(e){try{if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not publish when connection state is ".concat(this.state));await nb.all(e.map((e=>this.signal.request(vw.UNPUBLISH_DATASTREAM,{channel_id:e},!0))))}catch(e){$C.warning("unpublish datachannels warning: ",e)}}async subscribe(e,t,i){if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not subscribe when connection state is ".concat(this.state));const n={stream_id:e,stream_type:t.stream_type,mode:this.spec.mode,codec:this.spec.codec,p2p_id:this.store.p2pId,twcc:!!xC("SUBSCRIBE_TWCC"),rtx:!!xC("USE_SUB_RTX"),extend:xC("SUB_EXTEND"),ssrcId:t.ssrcId,svc:Array.isArray(xC("SVC"))&&0!==xC("SVC").length?xC("SVC"):void 0};try{return(await this.signal.request(vw.SUBSCRIBE,n,!0))._message}catch(n){if(i&&n.data&&n.data.code===pw.ERR_SUBSCRIBE_REQUEST_INVALID)return $C.warning("[".concat(this.store.clientId,"] receiver subscribe error code, retry"),n.toString()),await this.tryUnsubBeforeResub(e,t),await this.subscribe(e,t,!1);throw n}}async subscribeDataChannel(e,t,i){if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not subscribe datachannel when connection state is ".concat(this.state));const n={uid:e,stream_id:t.id,channel_id:t.datachannelId};try{return void await this.signal.request(vw.SUBSCRIBE_DATASTREAM,n,!0)}catch(n){if(i&&n.data&&n.data.code===pw.ERR_SUBSCRIBE_REQUEST_INVALID)return $C.warning("[".concat(this.store.clientId,"] receiver subscribe datachannel error code, retry"),n.toString()),await this.tryUnsubDataChannelBeforeResub(e,t),await this.subscribeDataChannel(e,t,!1);throw n}}async subscribeAll(e,t){if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not massSubscribe when connection state is ".concat(this.state));const i={p2p_id:this.store.p2pId,users:e,dtx:!1,rtx:!!xC("USE_SUB_RTX")};try{return await this.signal.request(vw.SUBSCRIBE_STREAMS,i,!0)}catch(i){if(t&&i.data&&i.data.code===pw.ERR_SUBSCRIBE_REQUEST_INVALID)return $C.warning("[".concat(this.store.clientId,"] receiver massSubscribe error code, retry"),i.toString()),await this.tryMassUnsubBeforeResub(e),await this.subscribeAll(e,!1);throw i}}async setVideoProfile(e){const t=function(e){if(!(e.bitrateMax&&e.bitrateMin&&e.frameRate&&e.height&&e.width))return;let t=e.frameRate,i=e.width,n=e.height,r=!0;return"number"!=typeof t&&(t=t.exact||t.ideal||t.max||t.min||0,t||(r=!1)),"number"!=typeof i&&(i=i.exact||i.ideal||i.max||i.min||0,i||(r=!1)),"number"!=typeof n&&(n=n.exact||n.ideal||n.max||n.min||0,t||(r=!1)),r?{stream_type:0,width:i,height:n,fps:t,start_bps:1e3*e.bitrateMax,min_bps:1e3*e.bitrateMin,target_bps:1e3*e.bitrateMax}:void 0}(e);if(t)return this.signal.request(vw.SET_VIDEO_PROFILE,t);$C.debug("[".concat(this.store.clientId,"] encoder config is not complete, do not report to gateway"))}async unsubscribe(e,t){try{await this.signal.request(vw.UNSUBSCRIBE,{p2p_id:this.store.p2pId,ortc:e,stream_id:t},!0)}catch(e){$C.warning("[".concat(this.store.clientId,"] unsubscribe warning: "),e)}}async unsubscribeDataChannel(e,t){try{if("CONNECTED"!==this.state&&"RECONNECTING"!==this.state)throw new Dw(Bb.INVALID_OPERATION,"can not publish when connection state is ".concat(this.state));await nb.all(e.map((e=>this.signal.request(vw.UNSUBSCRIBE_DATASTREAM,{stream_id:e,uid:t},!0))))}catch(e){$C.warning("unsubscribeDataChannel warning: ",e)}}async massUnsubscribe(e){try{await this.signal.request(vw.UNSUBSCRIBE_STREAMS,e,!0)}catch(e){$C.warning("[".concat(this.store.clientId,"] massUnsubscribeAll warning: "),e)}}async reconnectPC(e){const{iceParameters:t,dtlsParameters:i,rtpCapabilities:n}=e;return{gatewayEstablishParams:await this.signal.request(vw.CONNECT_PC,{p2p_id:this.store.p2pId,stream_id:this.store.uid,ortc:{iceParameters:t,dtlsParameters:i,rtpCapabilities:n}},!0),gatewayAddress:this.getCurrentGatewayAddress()}}getGatewayInfo(){return this.signal.request(vw.GATEWAY_INFO)}async renewToken(e){await this.signal.request(vw.RENEW_TOKEN,e),this.key=e.token}async setClientRole(e,t){if(t&&(this._clientRoleOptions=Object.assign({},t)),"CONNECTED"!==this.state)return void(this.role=e);let i,n=0;"audience"===e?this._clientRoleOptions&&this._clientRoleOptions.delay?(i=this._clientRoleOptions.delay,n=1):n=this._clientRoleOptions&&this._clientRoleOptions.level?this._clientRoleOptions.level:2:n=0,await this.signal.request(vw.SET_CLIENT_ROLE,{role:e,level:n,delay:i,client_ts:Date.now()}),this.role=e}async setRemoteVideoStreamType(e,t){await this.signal.request(vw.SWITCH_VIDEO_STREAM,{stream_id:e,stream_type:t})}async setDefaultRemoteVideoStreamType(e){await this.signal.request(vw.DEFAULT_VIDEO_STREAM,{stream_type:e})}async setStreamFallbackOption(e,t){await this.signal.request(vw.SET_FALLBACK_OPTION,{stream_id:e,fallback_type:t})}async pickSVCLayer(e,t){await this.signal.request(vw.PICK_SVC_LAYER,{stream_id:e,spatial_layer:t.spatialLayer,temporal_layer:t.temporalLayer})}async setRTM2Flag(e){await this.signal.request(vw.SET_RTM2_FLAG,{rtm2_flag:e})}async sendExtensionMessage(e,t,i){if(this.signal instanceof wN)return this.signal.sendExtensionMessage(e,t,i)}getInChannelInfo(){return this.inChannelInfo.joinAt&&(this.inChannelInfo.duration=Date.now()-this.inChannelInfo.joinAt),TN({},this.inChannelInfo)}async getGatewayVersion(){return(await this.signal.request(vw.GATEWAY_INFO)).version}reset(){if(this.inChannelInfo.joinAt&&(this.inChannelInfo.duration=Date.now()-this.inChannelInfo.joinAt,this.inChannelInfo.joinAt=null),this.trafficStatsInterval&&(window.clearInterval(this.trafficStatsInterval),this.trafficStatsInterval=void 0),this.joinInfo){const e=AN.get(this.joinInfo.cname);e&&e.delete(this.joinInfo.uid)}this.joinInfo=void 0,this.key=void 0,this.networkQualityInterval&&(window.clearInterval(this.networkQualityInterval),this.networkQualityInterval=void 0)}updateTurnConfigFromSignal(){if(!this.joinInfo)return;const e=function(e){let t;return t=e.startsWith("dc")?e.match(/(dc\:\/\/)?([^:]+):(\d+)/):e.match(/(wss\:\/\/)?([^:]+):(\d+)/),t?{username:iw.username,password:iw.password,turnServerURL:t[2],tcpport:parseInt(t[3])+30,udpport:parseInt(t[3])+30,forceturn:!1}:null}(("disabled"===this.joinInfo.cloudProxyServer?this.signal.url:this.joinInfo.gatewayAddrs[this.signal.currentURLIndex].address)||"");this.joinInfo.turnServer.serversFromGateway=[],e&&"off"!==this.joinInfo.turnServer.mode&&"disabled"===this.joinInfo.cloudProxyServer&&this.joinInfo.turnServer.serversFromGateway.push(TN(TN({},iw),{},{turnServerURL:e.turnServerURL,tcpport:e.tcpport,udpport:e.udpport,username:this.joinInfo.uid.toString(),password:this.joinInfo.token}))}async updateTrafficStats(){if("CONNECTED"!==this.state)return;const e=await this.signal.request(vw.TRAFFIC_STATS,void 0,!0);e.timestamp=Date.now(),null!=e.ntp_offset&&(this.ntpOffset=e.ntp_offset),e.peer_delay.forEach((e=>{const t=this._statsCollector.trafficStats&&this._statsCollector.trafficStats.peer_delay.find((t=>t.peer_uid===e.peer_uid));t&&t.B_st!==e.B_st&&R_((()=>{this.emit(Qw.STREAM_TYPE_CHANGE,e.peer_uid,e.B_st)}))})),this._statsCollector.updateTrafficStats(e)}getJoinMessage(e){if(!this.joinInfo||!this.key)throw new Dw(Bb.UNEXPECTED_ERROR,"can not generate join message, no join info");const t=Object.assign({},this.joinInfo.apResponse);let i=xC("REPORT_APP_SCENARIO");if("string"!=typeof i)try{i=JSON.stringify(i)}catch(e){i=void 0}i&&i.length>128&&(i=void 0);const n=TN({license:this.joinInfo.license,p2p_id:this.store.p2pId,session_id:this.joinInfo.sid,app_id:this.joinInfo.appId,channel_key:this.key,channel_name:this.joinInfo.cname,sdk_version:IC,browser:navigator.userAgent,process_id:xC("PROCESS_ID"),mode:this.store.useP2P?"p2p":this.spec.mode,codec:this.spec.codec,role:this.role,has_changed_gateway:this.hasChangeBGPAddress,ap_response:t,extend:xC("JOIN_EXTEND"),details:{6:this.joinInfo.stringUid,cservice_map:"proxy3"===this.joinInfo.cloudProxyServer?"1":"proxy5"===this.joinInfo.cloudProxyServer?"2":void 0},features:{rejoin:!0},optionalInfo:this.joinInfo.optionalInfo,appScenario:i,attributes:{userAttributes:{enablePublishedUserList:xC("ENABLE_PUBLISHED_USER_LIST"),maxSubscription:xC("MAX_SUBSCRIPTION"),subscribeAudioFilterTopN:"number"==typeof xC("SUBSCRIBE_AUDIO_FILTER_TOPN")?xC("SUBSCRIBE_AUDIO_FILTER_TOPN"):void 0,enablePublishAudioFilter:"boolean"==typeof xC("ENABLE_PUBLISH_AUDIO_FILTER")?xC("ENABLE_PUBLISH_AUDIO_FILTER"):void 0,enableUserLicenseCheck:"boolean"==typeof xC("ENABLE_USER_LICENSE_CHECK")?xC("ENABLE_USER_LICENSE_CHECK"):void 0,enableRTX:!0===xC("USE_PUB_RTX")||!0===xC("USE_SUB_RTX")||void 0,disableFEC:xC("DISABLE_FEC"),enableNTPReport:!!xC("ENABLE_NTP_REPORT")||void 0,enableInstantVideo:!!xC("ENABLE_INSTANT_VIDEO")||void 0,enableDataStream2:"boolean"==typeof xC("ENABLE_DATASTREAM_2")?xC("ENABLE_DATASTREAM_2"):void 0,rtm2Flag:"number"==typeof xC("RTM2_FLAG")?xC("RTM2_FLAG"):void 0,enableUserAutoRebalanceCheck:!!xC("ENABLE_USER_AUTO_REBALANCE_CHECK"),enableXR:"boolean"==typeof xC("USE_XR")?xC("USE_XR"):void 0}},join_ts:this.joinGatewayStartTime},e);return this.joinInfo.stringUid&&(n.string_uid=this.joinInfo.stringUid),this.joinInfo.aesmode&&this.joinInfo.aespassword&&(n.aes_mode=this.joinInfo.aesmode,xC("ENCRYPT_AES")?(n.aes_secret=this.joinInfo.aespassword,n.aes_encrypt=!0):n.aes_secret=this.joinInfo.aespassword,this.joinInfo.aessalt&&(n.aes_salt=this.joinInfo.aessalt)),t.addresses[this.signal.websocket.currentURLIndex]&&(n.ap_response.ticket=t.addresses[this.signal.websocket.currentURLIndex].ticket,delete t.addresses),void 0!==this.joinInfo.defaultVideoStream&&(n.default_video_stream=this.joinInfo.defaultVideoStream),n}getRejoinMessage(){if(!this.joinInfo)throw new Dw(Bb.UNEXPECTED_ERROR,"can not generate rejoin message, no join info");return{session_id:this.joinInfo.sid,channel_name:this.joinInfo.cname,cid:this.joinInfo.cid,uid:this.joinInfo.uid,vid:Number(this.joinInfo.vid)}}handleSignalEvents(){this.signal.on(mw.WS_RECONNECT_WAITTING_FINISH,(e=>{var t;Di(t=["tryNext","recover"]).call(t,e)&&this.joinInfo&&nw.adjustSessionStartTime(this.joinInfo.sid)})),this.signal.on(mw.WS_RECONNECT_CREATE_CONNECTION,(e=>{this.joinGatewayStartTime=Date.now()})),this.signal.on(mw.WS_RECONNECTING,(e=>{this.joinInfo&&nw.WebSocketQuit(this.joinInfo.sid,{lts:Date.now(),succ:-1,cname:this.joinInfo.cname,uid:this.joinInfo.uid,cid:this.joinInfo.cid,errorCode:e||u_.NETWORK_ERROR}),this.joinInfo&&(this.state="RECONNECTING",nw.sessionInit(this.joinInfo.sid,{lts:(new Date).getTime(),extend:this.isSignalRecover?{recover:!0}:{rejoin:!0},cname:this.joinInfo.cname,appid:this.joinInfo.appId,mode:this.spec.mode}),this.isSignalRecover=!1,this.joinGatewayStartTime=Date.now())})),this.signal.on(mw.WS_CLOSED,(e=>{let t;switch(e){case l_.LEAVE:t=u_.LEAVE;break;case l_.UID_BANNED:case l_.IP_BANNED:case l_.CHANNEL_BANNED:case l_.SERVER_ERROR:t=u_.SERVER_ERROR;break;case l_.FALLBACK:t=u_.FALLBACK;break;case l_.LICENSE_MISSING:case l_.LICENSE_EXPIRED:case l_.LICENSE_MINUTES_EXCEEDED:case l_.LICENSE_PERIOD_INVALID:case l_.LICENSE_MULTIPLE_SDK_SERVICE:case l_.LICENSE_ILLEGAL:case l_.TOKEN_EXPIRE:t=e;break;default:t=u_.NETWORK_ERROR}$C.debug("[".concat(this.store.clientId,"] [signal] websocket closed, reason: ").concat(t||"undefined -> "+u_.NETWORK_ERROR)),this.joinInfo&&nw.WebSocketQuit(this.joinInfo.sid,{lts:Date.now(),succ:e===l_.LEAVE?1:-1,cname:this.joinInfo.cname,uid:this.joinInfo.uid,cid:this.joinInfo.cid,errorCode:t}),this._disconnectedReason=e,e!==l_.FALLBACK&&(this.state="DISCONNECTED"),this.reset()})),this.signal.on(mw.WS_CONNECTED,(()=>{if(this.updateTurnConfigFromSignal(),this.state="CONNECTED",this.joinInfo&&("audience"===this.role&&this._clientRoleOptions&&(this._clientRoleOptions.level||this._clientRoleOptions.delay)&&($C.debug("[".concat(this.store.clientId,"] patch to send set client role, role: ").concat(this.role,", mode: ").concat(this.spec.mode,", level: ").concat(this._clientRoleOptions.level,", delay: ").concat(this._clientRoleOptions.delay)),this.setClientRole(this.role,this._clientRoleOptions)),nw.joinGateway(this.joinInfo.sid,{lts:this.joinGatewayStartTime,succ:!0,ec:null,vid:this.joinInfo.vid,addr:this.signal.url,uid:this.joinInfo.uid,cid:this.joinInfo.cid,firstSuccess:this._isProactiveJoin,avoidJoinStartTime:this.store.avoidJoinStart,isProxy:!!this.joinInfo.proxyServer,signalChannel:this.signal instanceof EN?"1":"0"}),this._isProactiveJoin=!1,this.joinInfo.useLocalAccessPoint&&1===this.joinInfo.setLocalAPVersion)){const e=this.signal.url&&this.signal.url.match(/wss\:\/\/([^:]+):(\d+)/);if(!e)return void $C.error("[".concat(this.store.clientId,"] set local access point after joined failed: ").concat(e));MC("EVENT_REPORT_DOMAIN",e[1]),MC("EVENT_REPORT_BACKUP_DOMAIN",e[1]),MC("LOG_UPLOAD_SERVER","".concat(e[1],":6444"))}})),this.signal.on(_w.ON_UPLINK_STATS,(e=>{this._statsCollector.updateUplinkStats(e)})),this.signal.on(mw.REQUEST_RECOVER,((e,t,i)=>{if(!this.joinInfo)return i(new Dw(Bb.UNEXPECTED_ERROR,"gateway: can not recover, no join info"));e&&(this.joinInfo.multiIP=e,this.hasChangeBGPAddress=!0),this.isSignalRecover=!0,b_(this,Qw.REQUEST_NEW_GATEWAY_LIST).then(t).catch(i)})),this.signal.on(mw.REQUEST_JOIN_INFO,(async e=>{var t;if(this.updateTurnConfigFromSignal(),this.store.useP2P)return void e(this.getJoinMessage({ortc:{}}));const{iceParameters:i,dtlsParameters:n,rtpCapabilities:r}=await b_(this,Qw.REQUEST_P2P_CONNECTION_PARAMS,{turnServer:null===(t=this.joinInfo)||void 0===t?void 0:t.turnServer});e(this.getJoinMessage({ortc:{iceParameters:i,dtlsParameters:n,rtpCapabilities:r,version:"2"}}))})),this.signal.on(mw.REQUEST_REJOIN_INFO,(e=>{e(this.getRejoinMessage())})),this.signal.on(mw.REPORT_JOIN_GATEWAY,((e,t)=>{this.joinInfo&&(nw.joinGateway(this.joinInfo.sid,{lts:this.joinGatewayStartTime,succ:!1,ec:e,addr:t,uid:this.joinInfo.uid,cid:this.joinInfo.cid,firstSuccess:this._isProactiveJoin,avoidJoinStartTime:this.store.avoidJoinStart,isProxy:!!this.joinInfo.proxyServer,signalChannel:this.signal instanceof EN?"1":"0"}),this._isProactiveJoin=!1)})),this.signal.on(mw.IS_P2P_DISCONNECTED,(e=>{e(E_(this,Qw.IS_P2P_DISCONNECTED))})),this.signal.on(mw.DISCONNECT_P2P,(()=>{this.emit(Qw.DISCONNECT_P2P)})),this.signal.on(mw.NEED_RENEW_SESSION,(()=>{this.emit(Qw.NEED_RENEW_SESSION)})),this.signal.on(mw.REQUEST_SUCCESS,(()=>{this._signalTimeout=!1})),this.signal.on(mw.REQUEST_TIMEOUT,(()=>{this._signalTimeout=!0})),this.signal.on(mw.JOIN_RESPONSE,(e=>{const t=this.getCurrentGatewayAddress();this.emit(Qw.JOIN_RESPONSE,e,t)})),this.signal.on(mw.DATACHANNEL_PRECONNECT,(async(e,t,i)=>{this.updateTurnConfigFromSignal();const n=this.getCurrentGatewayAddress();return b_(this,Qw.DATACHANNEL_PRECONNECT,e,n).then(t).catch(i)})),this.signal.on(mw.DATACHANNEL_CONNECTING,(async e=>{const{iceParameters:t,dtlsParameters:i,rtpCapabilities:n}=await b_(this,Qw.REQUEST_DC_CONNECTION_PARAMS);e(this.getJoinMessage({ortc:{iceParameters:t,dtlsParameters:i,rtpCapabilities:n,version:"2"}}))})),this.signal.on(mw.DATACHANNEL_FAILBACK,(()=>{$C.warning("[".concat(this.store.clientId,"] User join datachannel failed")),this.reset(),this.resetSignal(),this.emit(Qw.DATACHANNEL_FAILBACK)}))}async tryUnsubBeforeResub(e,t){try{await this.signal.request(vw.UNSUBSCRIBE,{p2p_id:this.store.p2pId,stream_id:e,ortc:[t]},!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] tryUnsubBeforeResub warning"),e),e}}async tryUnsubDataChannelBeforeResub(e,t){try{await this.signal.request(vw.UNSUBSCRIBE,{stream_id:t.id},!0)}catch(e){throw $C.warning("unsubscribe datachannel warning",e),e}}async tryUnpubBeforeRepub(e,t){try{await this.signal.request(vw.UNPUBLISH,{stream_id:e,ortc:t},!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] tryUnpubBeforeRepub warning: "),e),e}}async tryUnpubDataChannelBeforeRepub(e,t){try{await this.signal.request(vw.UNPUBLISH_DATASTREAM,{channnel_id:t.channelId},!0)}catch(e){throw $C.warning("unpublish datastream warning: ",e),e}}async tryMassUnsubBeforeResub(e){const t={users:e.map((e=>({stream_id:e.stream_id,stream_type:e.stream_type})))};try{await this.signal.request(vw.UNSUBSCRIBE_STREAMS,t,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] tryMassUnsubBeforeResub warning"),e),e}}async muteLocal(e,t){const i={action:e.find((e=>e.stream_type===Zw.Audio))?"mute_local_audio":"mute_local_video",p2p_id:this.store.p2pId,ortc:e,stream_id:t};try{await this.signal.request(vw.CONTROL,i,!0,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] gateway muteLocal warning: "),e),e}}async unmuteLocal(e,t){const i={action:e.find((e=>e.stream_type===Zw.Audio))?"unmute_local_audio":"unmute_local_video",p2p_id:this.store.p2pId,ortc:e,stream_id:t};try{await this.signal.request(vw.CONTROL,i,!0,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] gateway unmuteLocal warning: "),e),e}}async muteRemote(e,t){const i={action:e===lS.AUDIO?"mute_remote_audio":"mute_remote_video",p2p_id:this.store.p2pId,stream_id:t};try{await this.signal.request(vw.CONTROL,i,!0,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] gateway muteRemote warning: "),e),e}}async unmuteRemote(e,t){const i={action:e===lS.AUDIO?"unmute_remote_audio":"unmute_remote_video",p2p_id:this.store.p2pId,stream_id:t};try{await this.signal.request(vw.CONTROL,i,!0,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] gateway unmuteRemote warning: "),e),e}}uploadStats(e,t){this.signal.upload(e,t)}getSignalRTT(){return this.signal.rtt}async restartICE(e){const t={p2p_id:this.store.p2pId,stream_id:this.store.uid,ortc:e};try{return await this.signal.request(vw.RESTART_ICE,t,!0)}catch(e){throw $C.warning("[".concat(this.store.clientId,"] P2PChannel.restartICE warning: "),e),e}}reconnect(){"CONNECTED"===this.state&&this.signal.reconnect(void 0,u_.P2P_FAILED)}getCurrentGatewayAddress(){var e;if(!xC("GATEWAY_WSS_ADDRESS"))return null!==(e=this.joinInfo)&&void 0!==e&&e.gatewayAddrs?this.joinInfo.gatewayAddrs[this.signal.currentURLIndex]:void 0}async setPublishAudioFilterEnabled(e){await this.signal.request(vw.SET_PARAMETER,{enablePublishAudioFilter:e})}resetSignal(){this.signal&&(this.signal.removeAllListeners(),this.signal.close(l_.FALLBACK)),this.store.useDataChannel=!1,this.signal=new YS(TN(TN({},this.spec),{},{retryConfig:this.spec.websocketRetryConfig}),this.store),this.handleSignalEvents(),this.emit(Qw.RESET_SIGNAL,tS.websocket)}}let ON=0,IN=0;function kN(e,t,i,n){return new nb(((r,s)=>{t.timeout=t.timeout||xC("HTTP_CONNECT_TIMEOUT"),t.responseType=t.responseType||"json",t.data&&!i?(t.data=JSON.stringify(t.data),ON+=x_(t.data)):i&&(t.data.size?ON+=t.data.size:t.data instanceof FormData?ON+=D_(t.data):ON+=x_(JSON.stringify(t.data))),t.headers=t.headers||{},t.headers["Content-Type"]=t.headers["Content-Type"]||"application/json",t.method="POST",t.url=e,gC.request(t).then((e=>{"string"==typeof e.data?IN+=x_(e.data):e.data instanceof ArrayBuffer||e.data instanceof Uint8Array?IN+=e.data.byteLength:IN+=x_(JSON.stringify(e.data)),n&&r({data:e.data,headers:e.headers}),r(e.data)})).catch((e=>{gC.isCancel(e)?s(new Dw(Bb.OPERATION_ABORTED,"cancel token canceled")):"ECONNABORTED"===e.code?s(new Dw(Bb.NETWORK_TIMEOUT,e.message)):e.response?s(new Dw(Bb.NETWORK_RESPONSE_ERROR,e.response.status)):s(new Dw(Bb.NETWORK_ERROR,e.message))}))}))}!function(){var e;function t(e){var t=0;return function(){return t<e.length?{done:!1,value:e[t++]}:{done:!0}}}var n,i="function"==typeof Object.defineProperties?Object.defineProperty:function(e,t,i){return e==Array.prototype||e==Object.prototype||(e[t]=i.value),e},r=function(e){e=["object"==typeof globalThis&&globalThis,e,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof q&&q];for(var t=0;t<e.length;++t){var i=e[t];if(i&&i.Math==Math)return i}throw Error("Cannot find global object")}(this);function s(e,t){if(t)e:{var n=r;e=e.split(".");for(var s=0;s<e.length-1;s++){var o=e[s];if(!(o in n))break e;n=n[o]}(t=t(s=n[e=e[e.length-1]]))!=s&&null!=t&&i(n,e,{configurable:!0,writable:!0,value:t})}}function o(e){return(e={next:e})[Symbol.iterator]=function(){return this},e}function a(e){var i="undefined"!=typeof Symbol&&Symbol.iterator&&e[Symbol.iterator];return i?i.call(e):{next:t(e)}}if(s("Symbol",(function(e){function t(e,t){this.A=e,i(this,"description",{configurable:!0,writable:!0,value:t})}if(e)return e;t.prototype.toString=function(){return this.A};var n="jscomp_symbol_"+(1e9*Math.random()>>>0)+"_",r=0;return function e(i){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new t(n+(i||"")+"_"+r++,i)}})),s("Symbol.iterator",(function(e){if(e)return e;e=Symbol("Symbol.iterator");for(var n="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),s=0;s<n.length;s++){var a=r[n[s]];"function"==typeof a&&"function"!=typeof a.prototype[e]&&i(a.prototype,e,{configurable:!0,writable:!0,value:function(){return o(t(this))}})}return e})),"function"==typeof Object.setPrototypeOf)n=Object.setPrototypeOf;else{var c;e:{var l={};try{l.__proto__={a:!0},c=l.a;break e}catch(e){}c=!1}n=c?function(e,t){if(e.__proto__=t,e.__proto__!==t)throw new TypeError(e+" is not extensible");return e}:null}var d=n;function h(){this.m=!1,this.j=null,this.v=void 0,this.h=1,this.u=this.C=0,this.l=null}function u(e){if(e.m)throw new TypeError("Generator is already running");e.m=!0}function p(e,t){return e.h=3,{value:t}}function f(e){this.g=new h,this.G=e}function m(e,t,i,n){try{var r=t.call(e.g.j,i);if(!(r instanceof Object))throw new TypeError("Iterator result "+r+" is not an object");if(!r.done)return e.g.m=!1,r;var s=r.value}catch(t){return e.g.j=null,e.g.s(t),v(e)}return e.g.j=null,n.call(e.g,s),v(e)}function v(e){for(;e.g.h;)try{var t=e.G(e.g);if(t)return e.g.m=!1,{value:t.value,done:!1}}catch(t){e.g.v=void 0,e.g.s(t)}if(e.g.m=!1,e.g.l){if(t=e.g.l,e.g.l=null,t.F)throw t.D;return{value:t.return,done:!0}}return{value:void 0,done:!0}}function _(e){this.next=function(t){return e.o(t)},this.throw=function(t){return e.s(t)},this.return=function(t){return function(e,t){u(e.g);var i=e.g.j;return i?m(e,"return"in i?i.return:function(e){return{value:e,done:!0}},t,e.g.return):(e.g.return(t),v(e))}(e,t)},this[Symbol.iterator]=function(){return this}}function g(e,t){return t=new _(new f(t)),d&&e.prototype&&d(t,e.prototype),t}if(h.prototype.o=function(e){this.v=e},h.prototype.s=function(e){this.l={D:e,F:!0},this.h=this.C||this.u},h.prototype.return=function(e){this.l={return:e},this.h=this.u},f.prototype.o=function(e){return u(this.g),this.g.j?m(this,this.g.j.next,e,this.g.o):(this.g.o(e),v(this))},f.prototype.s=function(e){return u(this.g),this.g.j?m(this,this.g.j.throw,e,this.g.o):(this.g.s(e),v(this))},s("Array.prototype.entries",(function(e){return e||function(){return function(e,t){e instanceof String&&(e+="");var i=0,n=!1,r={next:function(){if(!n&&i<e.length){var r=i++;return{value:t(r,e[r]),done:!1}}return n=!0,{done:!0,value:void 0}}};return r[Symbol.iterator]=function(){return r},r}(this,(function(e,t){return[e,t]}))}})),"undefined"!=typeof Blob&&("undefined"==typeof FormData||!FormData.prototype.keys)){var y=function(e,t){for(var i=0;i<e.length;i++)t(e[i])},E=function(e){return e.replace(/\r?\n|\r/g,"\r\n")},C=function(e,t,i){return t instanceof Blob?(i=void 0!==i?String(i+""):"string"==typeof t.name?t.name:"blob",t.name===i&&"[object Blob]"!==Object.prototype.toString.call(t)||(t=new File([t],i)),[String(e),t]):[String(e),String(t)]},w=function(e,t){if(e.length<t)throw new TypeError(t+" argument required, but only "+e.length+" present.")},S="object"==typeof globalThis?globalThis:"object"==typeof window?window:"object"==typeof self?self:this,T=S.FormData,A=S.XMLHttpRequest&&S.XMLHttpRequest.prototype.send,R=S.Request&&S.fetch,b=S.navigator&&S.navigator.sendBeacon,O=S.Element&&S.Element.prototype,I=S.Symbol&&Symbol.toStringTag;I&&(Blob.prototype[I]||(Blob.prototype[I]="Blob"),"File"in S&&!File.prototype[I]&&(File.prototype[I]="File"));try{new File([],"")}catch(e){S.File=function(e,t,i){return e=new Blob(e,i||{}),Object.defineProperties(e,{name:{value:t},lastModified:{value:+(i&&void 0!==i.lastModified?new Date(i.lastModified):new Date)},toString:{value:function(){return"[object File]"}}}),I&&Object.defineProperty(e,I,{value:"File"}),e}}var k=function(e){return e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22")},N=function(e){this.i=[];var t=this;e&&y(e.elements,(function(e){if(e.name&&!e.disabled&&"submit"!==e.type&&"button"!==e.type&&!e.matches("form fieldset[disabled] *"))if("file"===e.type){var i=e.files&&e.files.length?e.files:[new File([],"",{type:"application/octet-stream"})];y(i,(function(i){t.append(e.name,i)}))}else"select-multiple"===e.type||"select-one"===e.type?y(e.options,(function(i){!i.disabled&&i.selected&&t.append(e.name,i.value)})):"checkbox"===e.type||"radio"===e.type?e.checked&&t.append(e.name,e.value):(i="textarea"===e.type?E(e.value):e.value,t.append(e.name,i))}))};if((e=N.prototype).append=function(e,t,i){w(arguments,2),this.i.push(C(e,t,i))},e.delete=function(e){w(arguments,1);var t=[];e=String(e),y(this.i,(function(i){i[0]!==e&&t.push(i)})),this.i=t},e.entries=function e(){var t,i=this;return g(e,(function(e){if(1==e.h&&(t=0),3!=e.h)return t<i.i.length?e=p(e,i.i[t]):(e.h=0,e=void 0),e;t++,e.h=2}))},e.forEach=function(e,t){w(arguments,1);for(var i=a(this),n=i.next();!n.done;n=i.next()){var r=a(n.value);n=r.next().value,r=r.next().value,e.call(t,r,n,this)}},e.get=function(e){w(arguments,1);var t=this.i;e=String(e);for(var i=0;i<t.length;i++)if(t[i][0]===e)return t[i][1];return null},e.getAll=function(e){w(arguments,1);var t=[];return e=String(e),y(this.i,(function(i){i[0]===e&&t.push(i[1])})),t},e.has=function(e){w(arguments,1),e=String(e);for(var t=0;t<this.i.length;t++)if(this.i[t][0]===e)return!0;return!1},e.keys=function e(){var t,i,n,s=this;return g(e,(function(e){if(1==e.h&&(t=a(s),i=t.next()),3!=e.h)return i.done?void(e.h=0):(n=i.value,p(e,a(n).next().value));i=t.next(),e.h=2}))},e.set=function(e,t,i){w(arguments,2),e=String(e);var n=[],r=C(e,t,i),s=!0;y(this.i,(function(t){t[0]===e?s&&(s=!n.push(r)):n.push(t)})),s&&n.push(r),this.i=n},e.values=function e(){var t,i,n,r,s=this;return g(e,(function(e){if(1==e.h&&(t=a(s),i=t.next()),3!=e.h)return i.done?void(e.h=0):(n=i.value,(r=a(n)).next(),p(e,r.next().value));i=t.next(),e.h=2}))},N.prototype._asNative=function(){for(var e=new T,t=a(this),i=t.next();!i.done;i=t.next()){var n=a(i.value);i=n.next().value,n=n.next().value,e.append(i,n)}return e},N.prototype._blob=function(){var e="----formdata-polyfill-"+Math.random(),t=[],i="--"+e+'\r\nContent-Disposition: form-data; name="';return this.forEach((function(e,n){return"string"==typeof e?t.push(i+k(E(n))+'"\r\n\r\n'+E(e)+"\r\n"):t.push(i+k(E(n))+'"; filename="'+k(e.name)+'"\r\nContent-Type: '+(e.type||"application/octet-stream")+"\r\n\r\n",e,"\r\n")})),t.push("--"+e+"--"),new Blob(t,{type:"multipart/form-data; boundary="+e})},N.prototype[Symbol.iterator]=function(){return this.entries()},N.prototype.toString=function(){return"[object FormData]"},O&&!O.matches&&(O.matches=O.matchesSelector||O.mozMatchesSelector||O.msMatchesSelector||O.oMatchesSelector||O.webkitMatchesSelector||function(e){for(var t=(e=(this.document||this.ownerDocument).querySelectorAll(e)).length;0<=--t&&e.item(t)!==this;);return-1<t}),I&&(N.prototype[I]="FormData"),A){var L=S.XMLHttpRequest.prototype.setRequestHeader;S.XMLHttpRequest.prototype.setRequestHeader=function(e,t){L.call(this,e,t),"content-type"===e.toLowerCase()&&(this.B=!0)},S.XMLHttpRequest.prototype.send=function(e){e instanceof N?(e=e._blob(),this.B||this.setRequestHeader("Content-Type",e.type),A.call(this,e)):A.call(this,e)}}R&&(S.fetch=function(e,t){return t&&t.body&&t.body instanceof N&&(t.body=t.body._blob()),R.call(this,e,t)}),b&&(S.navigator.sendBeacon=function(e,t){return t instanceof N&&(t=t._asNative()),b.call(this,e,t)}),S.FormData=N}}();const NN=()=>{const e=xC("AREAS");return 0===e.length&&e.push(nS.GLOBAL),ly(e).call(e,((e,t,i)=>{const n=LN(t);return n?0===i?n:"".concat(e,",").concat(n):e}),"")},LN=e=>e===nS.OVERSEA?"".concat(oS.ASIA,",").concat(oS.EUROPE,",").concat(oS.AFRICA,",").concat(oS.NORTH_AMERICA,",").concat(oS.SOUTH_AMERICA,",").concat(oS.OCEANIA):oS[e],MN=e=>{const t={CODE:"",WEBCS_DOMAIN:[],WEBCS_DOMAIN_BACKUP_LIST:[],PROXY_CS:[],CDS_AP:[],ACCOUNT_REGISTER:[],UAP_AP:[],EVENT_REPORT_DOMAIN:[],EVENT_REPORT_BACKUP_DOMAIN:[],LOG_UPLOAD_SERVER:[],PROXY_SERVER_TYPE3:[]};return e.map((e=>{const i=aS[e],n=Object.keys(i);n&&n.map((e=>{"CODE"!==e&&(t[e]=t[e].concat(i[e]))}))})),t},xN={GLOBAL:{ASIA:[nS.CHINA,nS.JAPAN,nS.INDIA,nS.KOREA,nS.HKMC],EUROPE:[],NORTH_AMERICA:[nS.US],SOUTH_AMERICA:[],OCEANIA:[],AFRICA:[]}},DN=Object.keys(xN[nS.GLOBAL]),PN=[nS.CHINA,nS.NORTH_AMERICA,nS.EUROPE,nS.ASIA,nS.JAPAN,nS.INDIA,nS.OCEANIA,nS.SOUTH_AMERICA,nS.AFRICA,nS.KOREA,nS.HKMC,nS.US],UN=function(e,t){let i=[];if(Di(e).call(e,nS.GLOBAL)){const s=[nS.GLOBAL,nS.OVERSEA],o=Object.keys(aS);if(t===nS.GLOBAL)throw new Dw(Bb.INVALID_PARAMS,"GLOBAL is an invalid excludedArea value");if(t===nS.CHINA)i=[nS.OVERSEA];else if(r=t,Di(DN).call(DN,r)){const e=(n=t,xN[nS.GLOBAL][n]||[]),r=[...s,t,...e];i=o.filter((e=>!Di(r).call(r,e)))}else if(function(e){let t=!1;return DN.forEach((i=>{var n;Di(n=xN[nS.GLOBAL][i]).call(n,e)&&(t=!0)})),t}(t)){const e=function(e){let t;return DN.forEach((i=>{var n;Di(n=xN[nS.GLOBAL][i]).call(n,e)&&(t=i)})),t}(t),n=[...s,e,t];i=o.filter((e=>!Di(n).call(n,e)))}else i=e;i=function(e){const t=[];return PN.forEach((i=>{Di(e).call(e,i)&&t.push(i)})),t.concat(e.filter((e=>!Di(PN).call(PN,e))))}(i)}else i=e;var n,r;return i};function BN(e){var t,i;if(!e&&Di(t=xC("AREAS")).call(t,nS.EXTENSIONS))return $C.debug("update area from ap : reset"),void FN(rw,!0);if(!Di(i=xC("AREAS")).call(i,nS.GLOBAL)||!e)return;let n=aS.EXTENSIONS;n&&(n={CODE:LN(nS.EXTENSIONS),WEBCS_DOMAIN:["ap-web-1-".concat(e,".agora.io")],WEBCS_DOMAIN_BACKUP_LIST:["ap-web-2-".concat(e,".ap.sd-rtn.com")],PROXY_CS:["proxy-ap-web-".concat(e,".agora.io")],CDS_AP:["cds-ap-web-1-".concat(e,".agora.io"),"cds-ap-web-2-".concat(e,".ap.sd-rtn.com")],ACCOUNT_REGISTER:["sua-ap-web-1-".concat(e,".agora.io"),"sua-ap-web-2-".concat(e,".ap.sd-rtn.com")],UAP_AP:["uap-ap-web-1-".concat(e,".agora.io"),"uap-ap-web-2-".concat(e,".ap.sd-rtn.com")],EVENT_REPORT_DOMAIN:["statscollector-1-".concat(e,".agora.io")],EVENT_REPORT_BACKUP_DOMAIN:["statscollector-2-".concat(e,".agora.io")],LOG_UPLOAD_SERVER:["logservice-".concat(e,".agora.io")],PROXY_SERVER_TYPE3:["webrtc-cloud-proxy-".concat(e,".agora.io")]},$C.debug("update area from ap success: ".concat(e,",config is "),n),MC("AREAS",[nS.EXTENSIONS],!0),Object.keys(n).map((e=>{MC(e,"LOG_UPLOAD_SERVER"===e||"EVENT_REPORT_DOMAIN"===e||"EVENT_REPORT_BACKUP_DOMAIN"===e||"PROXY_SERVER_TYPE3"===e?n[e][0]:n[e])})))}function FN(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const i=nw.reportApiInvoke(null,{name:a_.SET_AREA,options:e,tag:s_.TRACER});try{let n=[];if("string"==typeof e&&(n=[e]),Array.isArray(e)&&(e.forEach((e=>{if(!Di(iS).call(iS,e))throw new Dw(Bb.INVALID_PARAMS,"invalid area code")})),n=e),"[object Object]"===Object.prototype.toString.call(e)){const{areaCode:t,excludedArea:i}=e;if(!t)throw new Dw(Bb.INVALID_PARAMS,"area code is needed");let r=t;"string"==typeof t&&(r=[t]),n=i?UN(r,i):r}if(!t){if(DC.AREAS){const e=new Dw(Bb.PROHIBITED_OPERATION,"setArea is prohibited because of config-distribute");return i.onError(e),void $C.warning("setArea is prohibited because of config-distribute")}if(Di(n).call(n,nS.GLOBAL)&&xC("AREAS")===nS.EXTENSIONS){const e=new Dw(Bb.PROHIBITED_OPERATION,"setArea is prohibited because of ap extensions");return i.onError(e),void $C.warning("setArea is prohibited because of ap extensions")}}MC("AREAS",n,t);const r=MN(n);Object.keys(r).map((e=>{MC(e,"LOG_UPLOAD_SERVER"===e||"EVENT_REPORT_DOMAIN"===e||"EVENT_REPORT_BACKUP_DOMAIN"===e||"PROXY_SERVER_TYPE3"===e?r[e][0]:r[e])})),$C.debug("set area success:",n.join(","))}catch(e){throw i.onError(e),e}i.onSuccess()}function VN(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function jN(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?VN(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):VN(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}let HN=1;function $N(e,t,i,n,r){HN+=1;const s={sid:i.sid,command:"convergeAllocateEdge",uid:"666",appId:i.appId,ts:Math.floor(Date.now()/1e3),seq:HN,requestId:HN,version:IC,cname:i.cname},o={service_name:t,json_body:JSON.stringify(s)};let a,c,l=e[0];return Z_((async()=>{a=Date.now();const e=await kN(l,{data:o,cancelToken:n,headers:{"X-Packet-Service-Type":"0","X-Packet-URI":"61"}});if(c=Date.now()-a,0!==e.code){const t=new Dw(Bb.UNEXPECTED_RESPONSE,"live streaming ap error, code"+e.code,{retry:!0,responseTime:c});throw $C.error(t.toString()),t}const i=JSON.parse(e.json_body);if(200!==i.code){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"live streaming app center error, code: ".concat(i.code,", reason: ").concat(i.reason),{code:i.code,responseTime:c});throw $C.error(e.toString()),e}if(!i.servers||0===i.servers.length){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"live streaming app center empty server",{code:i.code,responseTime:c});throw $C.error(e.toString()),e}const r=function(e,t){return{addressList:e.servers.map((e=>"wss://".concat(e.address.replace(/\./g,"-"),".").concat(xC("WORKER_DOMAIN"),":").concat(e.wss,"?serviceName=").concat(encodeURIComponent(t)))),workerToken:e.workerToken,vid:e.vid}}(i,t);return xC("LIVE_STREAMING_ADDRESS")&&(r.addressList=xC("LIVE_STREAMING_ADDRESS")instanceof Array?xC("LIVE_STREAMING_ADDRESS"):[xC("LIVE_STREAMING_ADDRESS")]),jN(jN({},r),{},{responseTime:c})}),((n,r)=>(nw.apworkerEvent(i.sid,{success:!0,sc:200,serviceName:t,responseDetail:JSON.stringify(n.addressList),firstSuccess:0===r,responseTime:c,serverIp:e[r%e.length]}),!1)),((n,r)=>(nw.apworkerEvent(i.sid,{success:!1,sc:n.data&&n.data.code||200,serviceName:t,responseTime:c,serverIp:e[r%e.length]}),!!(n.code!==Bb.OPERATION_ABORTED&&n.code!==Bb.UNEXPECTED_RESPONSE||n.data&&n.data.retry)&&(l=e[(r+1)%e.length],!0))),r)}let zN=1;function WN(e,t,i,n){let{url:r,areaCode:s}=e;const o=Date.now();let a;const[c,l]=XN(t,s,[lT.CHOOSE_SERVER]);let d=C_.networkState;return Z_((async()=>{d&&C_.networkState===h_.OFFLINE&&C_.onlineWaiter&&await nb.race([C_.onlineWaiter,U_(n&&n.maxRetryTimeout||Y_.maxRetryTimeout)]),d=C_.networkState;const{data:e,headers:s}=await kN(r,{data:c,cancelToken:i,headers:{"Content-Type":"multipart/form-data;"}},!0,!0);a="1"===s.http3?1:-1,nw.reportResourceTiming(r,t.sid),GN(e,r,t,o,[lT.CHOOSE_SERVER],a);const l=hN(e,lT.CHOOSE_SERVER);return qN(l),sN(l,r)}),(e=>(e&&nw.joinChooseServer(t.sid,{lts:o,succ:!0,csAddr:r,opid:l,serverList:e.gatewayAddrs.map((e=>e.address)),ec:null,cid:e.cid.toString(),uid:e.uid.toString(),csIp:e.csIp,unilbsServerIds:[lT.CHOOSE_SERVER].toString(),isHttp3:a}),!1)),(e=>e.code!==Bb.OPERATION_ABORTED&&(e.code===Bb.CAN_NOT_GET_GATEWAY_SERVER?e.data.retry:(nw.joinChooseServer(t.sid,{lts:o,succ:!1,csAddr:r,serverList:null,opid:l,ec:e.code,csIp:e.data&&e.data.csIp,unilbsServerIds:[lT.CHOOSE_SERVER].toString(),extend:JSON.stringify({networkState:d}),isHttp3:a}),$C.warning("[".concat(t.clientId,"] Choose server network error, retry"),e),!0))),n)}function KN(e,t,i,n){let r,{url:s,areaCode:o,serviceIds:a}=e;const c=Date.now(),[l,d]=XN(t,o,a);let h;return Z_((async()=>{h&&C_.networkState===h_.OFFLINE&&C_.onlineWaiter&&await nb.race([C_.onlineWaiter,U_(n&&n.maxRetryTimeout||Y_.maxRetryTimeout)]),h=C_.networkState;const{data:e,headers:o}=await kN(s,{data:l,cancelToken:i,headers:{"Content-Type":"multipart/form-data;"}},!0,!0);r="1"===o.http3?1:-1,nw.reportResourceTiming(s,t.sid),GN(e,s,t,c,a,r);const d=hN(e,lT.CHOOSE_SERVER),u=hN(e,"proxy5"===t.cloudProxyServer?lT.CLOUD_PROXY_5:"proxy3"===t.cloudProxyServer||"proxy4"===t.cloudProxyServer?lT.CLOUD_PROXY:lT.CLOUD_PROXY_FALLBACK);return qN(d),{gatewayInfo:sN(d,s),proxyInfo:u,url:s}}),(e=>(e.gatewayInfo&&nw.joinChooseServer(t.sid,{lts:c,succ:!0,csAddr:s,serverList:e.gatewayInfo.gatewayAddrs.map((e=>e.address)),ec:null,opid:d,cid:e.gatewayInfo.cid.toString(),uid:e.gatewayInfo.uid.toString(),csIp:e.gatewayInfo.csIp,unilbsServerIds:a.toString(),isHttp3:r}),e.proxyInfo&&nw.joinWebProxyAP(t.sid,{lts:c,sucess:1,apServerAddr:s,turnServerAddrList:e.proxyInfo.addresses.map((e=>e.ip)).join(","),errorCode:null,eventType:t.cloudProxyServer,unilbsServerIds:a.toString()}),!1)),(e=>e.code!==Bb.OPERATION_ABORTED&&(e.code===Bb.CAN_NOT_GET_GATEWAY_SERVER?e.data.retry:(nw.joinWebProxyAP(t.sid,{lts:c,sucess:0,apServerAddr:s,turnServerAddrList:null,errorCode:e.code,eventType:t.cloudProxyServer,unilbsServerIds:a.toString(),extend:JSON.stringify({networkState:h})}),$C.warning("[".concat(t.clientId,"] multi unilbs network error, retry"),e),!0))),n)}const GN=(e,t,i,n,r,s)=>{const o=[],a=o=>{4096===o.flag?nw.joinChooseServer(i.sid,{lts:n,succ:!1,csAddr:t,opid:e.opid,serverList:null,ec:o.error.message,csIp:o.error.data&&o.error.data.csIp,unilbsServerIds:r.toString(),isHttp3:s}):1048576!==o.flag&&4194304!==o.flag&&4194310!==o.flag||nw.joinWebProxyAP(i.sid,{lts:n,sucess:0,apServerAddr:t,turnServerAddrList:null,errorCode:o.error.code,eventType:i.cloudProxyServer,unilbsServerIds:r.toString()})};if(e.response_body.forEach((t=>{const i=t.buffer.code;if(23===t.uri&&0===i&&!t.buffer.edges_services)if(4194310===t.buffer.flag)$C.warning("no edge services in ap response of proxy fallback, will not set proxy in iceServers"),t.buffer.edges_services=[];else{const i={error:new Dw(Bb.CAN_NOT_GET_GATEWAY_SERVER,"no edge services in ap response",{retry:!0,csIp:e.detail[502]}),flag:t.buffer.flag};o.push(i),a(i)}if(0!==i){const n=LS(i),r={error:new Dw(Bb.CAN_NOT_GET_GATEWAY_SERVER,n.desc,{desc:n.desc,retry:n.retry,csIp:e.detail[502]}),flag:t.buffer.flag};4194310===t.buffer.flag?$C.warning(r.error.toString()):o.push(r),a(r)}})),o.length)throw $C.warning("[".concat(i.clientId,"] multi unilbs ").concat(t," failed, ").concat(o.map((e=>"flag: ".concat(e.flag,", message: ").concat(e.error.message,", retry: ").concat(e.error.data.retry))).join(" | "))),new Dw(Bb.CAN_NOT_GET_GATEWAY_SERVER,o.map((e=>"flag: ".concat(e.flag,", message: ").concat(e.error.message))).join(" | "),{retry:!!o.find((e=>e.error.data.retry)),csIp:e.detail[502],desc:[...new Set(o.map((e=>{var t;return null==e||null===(t=e.error)||void 0===t||null===(t=t.data)||void 0===t?void 0:t.desc})).filter((e=>!!e)))]})},qN=e=>{var t,i,n,r;if(e.addresses&&0===e.addresses.length&&0===e.code)throw new Dw(Bb.CAN_NOT_GET_GATEWAY_SERVER,"void gateway address",{retry:!0,csIp:e.detail&&e.detail[502]});if(xC("AP_AREA")&&(null!==(n=e.detail)&&void 0!==n&&n[23]&&"string"==typeof(null===(r=e.detail)||void 0===r?void 0:r[23])?BN(e.detail[23].toLowerCase()):BN()),null!==(t=e.detail)&&void 0!==t&&t[19]&&"string"==typeof(null===(i=e.detail)||void 0===i?void 0:i[19])){const t=e.detail[19],i=null==t?void 0:t.split(";");for(let t=0;t<i.length;t++){var s;const n=gT(s=i[t]).call(s);e.addresses[t]&&i&&(e.addresses[t].fingerprint=n)}}if(xC("GATEWAY_ADDRESS")&&xC("GATEWAY_ADDRESS").length>0){$C.debug("assign gateway address to",xC("GATEWAY_ADDRESS"));const t=xC("GATEWAY_ADDRESS").map((t=>{var i,n;const r=null!==(i=null===(n=e.addresses.find((e=>e.ip===t.ip&&e.port===t.port)))||void 0===n?void 0:n.fingerprint)&&void 0!==i?i:"";return{ip:t.ip,port:t.port,ticket:e.addresses[0]&&e.addresses[0].ticket,fingerprint:r}}));e.addresses=t}},YN=(e,t)=>{if(e.response_body&&e.response_body.length){const t=e.response_body[0];if(0!==t.buffer.code){const e=LS(t.buffer.code);throw new Dw(Bb.UPDATE_TICKET_FAILED,"[".concat(t.buffer.code,"]: ").concat(e.desc),{retry:e.retry})}return t.buffer.ticket}throw $C.debug("update ticket request received ap response without response body:",t),new Dw(Bb.UPDATE_TICKET_FAILED,"cannot find response body from ap response",{retry:!1})},XN=(e,t,i)=>{const n=Math.floor(Math.random()*10**12),r={appid:e.appId,client_ts:Date.now(),opid:n,sid:e.sid,request_bodies:[{uri:22,buffer:{cname:e.cname,detail:jN({6:e.stringUid,11:t,12:xC("USE_NEW_TOKEN")?"1":void 0,22:t},xC("AP_RTM")?{26:"RTM2"}:{}),key:e.token,service_ids:i,uid:e.uid||0}}]};r.request_bodies.forEach((t=>{e.multiIP&&e.multiIP.gateway_ip&&(t.buffer.detail[5]=JSON.stringify({vocs_ip:[e.multiIP.uni_lbs_ip],vos_ip:[e.multiIP.gateway_ip]}))}));const s=new FormData;return s.append("request",JSON.stringify(r)),[s,n]},ZN=(e,t)=>{const i=Math.floor(Math.random()*10**12),n={appid:e.appId,client_ts:Date.now(),opid:i,sid:e.sid,request_bodies:[{uri:28,buffer:{cname:e.cname,detail:{1:"",6:e.stringUid,12:"1"},token:e.token,service_ids:t,uid:e.uid||0,edges_services:e.apResponse.addresses.map((e=>({ip:e.ip,port:e.port})))}}]},r=new FormData;return r.append("request",JSON.stringify(n)),[r,i]};let QN=0;function JN(e){return nb.all(e.map((e=>e.then((e=>{throw e}),(e=>e))))).then((e=>{throw e}),(e=>e))}const eL=async e=>{let{fragementLength:t,referenceList:i,asyncMapHandler:n,allFailedhandler:r,promisesCollector:s}=e,o=0;const a=t;let c,l=0;const d=async()=>{const e=(()=>{const e=o*a,t=e+a;return i.slice(e,t).map(n)})();s&&s.push(...e);try{c=await JN(e)}catch(e){if(l+=a,o++,!(l>=i.length))return void await d();r(e)}e.forEach((e=>e.cancel()))};return await d(),c};async function tL(e,t,i,n){const r=async function(e,t,i,n){let r=null;const s=[],o=async()=>{const r=xC("WEBCS_DOMAIN").slice(0,xC("AJAX_REQUEST_CONCURRENT")).map((t=>({url:e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(t+"/api/v2/transpond/webrtc?v=2"):"https://".concat(t,"/api/v2/transpond/webrtc?v=2"),areaCode:NN()}))),o=n.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"chooseServer",urls:r.map((e=>e.url))}),a=await eL({fragementLength:xC("FRAGEMENT_LENGTH"),referenceList:r,asyncMapHandler:n=>($C.debug("[".concat(e.clientId,"] Connect to choose_server:"),n.url),WN(n,e,t,i)),allFailedhandler:e=>{throw n.recordJoinChannelService({endTs:Date.now(),status:"error",errors:e},o),e[0]},promisesCollector:s});return n.recordJoinChannelService({endTs:Date.now(),status:"success"},o),a},a=async()=>{if(await U_(1e3),null!==r)return r;const o=xC("WEBCS_DOMAIN_BACKUP_LIST").map((t=>({url:e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(t+"/api/v2/transpond/webrtc?v=2"):"https://".concat(t,"/api/v2/transpond/webrtc?v=2"),areaCode:NN()}))),a=n.recordJoinChannelService({endTs:void 0,startTs:Date.now(),status:"pending",service:"chooseServer",urls:o.map((e=>e.url))}),c=await eL({fragementLength:xC("FRAGEMENT_LENGTH"),referenceList:o,asyncMapHandler:n=>($C.debug("[".concat(e.clientId,"] Connect to backup choose_server:"),n.url),WN(n,e,t,i)),allFailedhandler:e=>{throw n.recordJoinChannelService({endTs:Date.now(),status:"error",errors:e},a),e[0]},promisesCollector:s});return n.recordJoinChannelService({endTs:Date.now(),status:"success"},a),c};try{return r=await JN([o(),a()]),s.length&&s.forEach((e=>e.cancel&&"function"==typeof e.cancel&&e.cancel())),r}catch(e){throw e[0]}}(e,t,i,n);return{gatewayInfo:await r}}async function nL(e,t,i,n,r){const s=e.cloudProxyServer;if("disabled"===s){if(!n)return;if(e.useLocalAccessPoint)return await tL(e,t,i,r);if(xC("JOIN_WITH_FALLBACK_MEDIA_PROXY")){const{gatewayInfo:n,proxyInfo:s}=await oL(e,t,i,r);return e.turnServer&&"auto"!==e.turnServer.mode||(e.turnServer={mode:"manual",servers:s.map((e=>({turnServerURL:e.address,tcpport:e.tcpport||iw.tcpport,udpport:e.udpport||iw.udpport,username:e.username||iw.username,password:e.password||iw.password,forceturn:!1,security:!0})))}),{gatewayInfo:n}}return await tL(e,t,i,r)}const{proxyInfo:o,gatewayInfo:a}=await oL(e,t,i,r),c={gatewayInfo:a};return e.turnServer={mode:"manual",servers:o.map((e=>({turnServerURL:e.address,tcpport:"proxy3"===s?void 0:e.tcpport?e.tcpport:iw.tcpport,udpport:"proxy4"===s?void 0:e.udpport?e.udpport:iw.udpport,username:e.username||iw.username,password:e.password||iw.password,forceturn:"proxy4"!==s,security:"proxy5"===s})))},$C.debug("[".concat(e.clientId,"] set proxy server: ").concat(e.proxyServer,", mode: ").concat(s)),c}async function rL(e,t,i,n,r){const s=xC("ACCOUNT_REGISTER").slice(0,xC("AJAX_REQUEST_CONCURRENT"));let o=[];o=t.proxyServer?s.map((e=>"https://".concat(t.proxyServer,"/ap/?url=").concat(e+"/api/v1"))):s.map((e=>"https://".concat(e,"/api/v1")));const a=null==r?void 0:r.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"stringUID",urls:o});try{const s=await async function(e,t,i,n,r){const s=Date.now(),o={sid:i.sid,opid:10,appid:i.appId,string_uid:t};let a=e[0];const c=await Z_((()=>kN(a+"".concat(-1===a.indexOf("?")?"?":"&","action=stringuid"),{data:o,cancelToken:n,headers:{"X-Packet-Service-Type":0,"X-Packet-URI":72}})),((i,n)=>{if(0===i.code){if(i.uid<=0||i.uid>=Math.pow(2,32))throw $C.error("Invalid Uint Uid ".concat(t," => ").concat(i.uid),i),nw.reqUserAccount(o.sid,{lts:s,success:!1,serverAddr:a,stringUid:o.string_uid,uid:i.uid,errorCode:Bb.INVALID_UINT_UID_FROM_STRING_UID,extend:o}),new Dw(Bb.INVALID_UINT_UID_FROM_STRING_UID);return nw.reqUserAccount(o.sid,{lts:s,success:!0,serverAddr:a,stringUid:o.string_uid,uid:i.uid,errorCode:null,extend:o}),!1}const r=LS(i.code);return r.retry&&(a=e[(n+1)%e.length]),nw.reqUserAccount(o.sid,{lts:s,success:!1,serverAddr:a,stringUid:o.string_uid,uid:i.uid,errorCode:r.desc,extend:o}),r.retry}),((t,i)=>t.code!==Bb.OPERATION_ABORTED&&(nw.reqUserAccount(o.sid,{lts:s,success:!1,serverAddr:a,stringUid:o.string_uid,uid:null,errorCode:t.code,extend:o}),a=e[(i+1)%e.length],!0)),r);if(0!==c.code){const e=LS(c.code);throw new Dw(Bb.UNEXPECTED_RESPONSE,e.desc)}return c}(o,e,t,i,n);return null==r||r.recordJoinChannelService({status:"success",endTs:Date.now()},a),s.uid}catch(e){throw null==r||r.recordJoinChannelService({status:"error",endTs:Date.now(),errors:[e]},a),e}}async function iL(e,t,i){const n=xC("CDS_AP").slice(0,xC("AJAX_REQUEST_CONCURRENT")).map((t=>e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(t+"/api/v1"):"https://".concat(t,"/api/v1?action=config"))).map((n=>function(e,t,i,n){const r=pb(),s={flag:64,cipher_method:0,features:{device:r.name,system:r.os,system_general:navigator.userAgent,vendor:t.appId,version:IC,cname:t.cname,sid:t.sid,session_id:t.sid,detail:"",proxyServer:t.proxyServer}};return Z_((()=>kN(e,{data:s,timeout:1e3,cancelToken:i,headers:{"X-Packet-Service-Type":0,"X-Packet-URI":54}})),void 0,(e=>e.code!==Bb.OPERATION_ABORTED),n)}(n,e,t,i)));let r=null,s=null,o={};try{r=await JN(n)}catch(e){if(e.code===Bb.OPERATION_ABORTED)throw e;s=e}if(n.forEach((e=>e.cancel())),nw.reportApiInvoke(e.sid,{name:a_.REQUEST_CONFIG_DISTRIBUTE,options:{error:s,res:r}}).onSuccess(),r&&r.test_tags)try{o=function(e){if(!e.test_tags)return{};const t=e.test_tags,i=Object.keys(t),n={};return i.forEach((e=>{var i;const r=gT(i=e.slice(4)).call(i),s=JSON.parse(t[e])[1];n[r]=s})),n}(r)}catch(e){}return o}async function oL(e,t,i,n){const r=xC("PROXY_SERVER_TYPE3"),s=(e,t,i)=>{let n=i||r;return Array.isArray(n)&&(n=t%2==0?r[1]:r[0]),"https://".concat(n,"/ap/?url=").concat(e)};let o=null;const a=[],c=async()=>{const r=xC("WEBCS_DOMAIN").slice(0,xC("AJAX_REQUEST_CONCURRENT")).map(((t,i)=>{let n;return n="disabled"===e.cloudProxyServer&&e.proxyServer?s("".concat(t,"/api/v2/transpond/webrtc?v=2"),i,e.proxyServer):"disabled"===e.cloudProxyServer||"fallback"===e.cloudProxyServer?"https://".concat(t,"/api/v2/transpond/webrtc?v=2"):s("".concat(t,"/api/v2/transpond/webrtc?v=2"),i),{url:n,areaCode:NN(),serviceIds:[lT.CHOOSE_SERVER,"proxy5"===e.cloudProxyServer?lT.CLOUD_PROXY_5:"proxy3"===e.cloudProxyServer||"proxy4"===e.cloudProxyServer?lT.CLOUD_PROXY:lT.CLOUD_PROXY_FALLBACK]}})),o=n.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"chooseServer",urls:r.map((e=>e.url))}),c=await eL({fragementLength:xC("FRAGEMENT_LENGTH"),referenceList:r,asyncMapHandler:n=>($C.debug("[".concat(e.clientId,"] Connect to choose_server:"),n.url),KN(n,e,t,i)),allFailedhandler:e=>{throw n.recordJoinChannelService({endTs:Date.now(),status:"error",errors:e},o),e[0]},promisesCollector:a});return n.recordJoinChannelService({endTs:Date.now(),status:"success"},o),c},l=async()=>{if(await U_(1e3),null!==o)return o;const r=xC("WEBCS_DOMAIN_BACKUP_LIST").map(((t,i)=>{let n;return n="disabled"===e.cloudProxyServer&&e.proxyServer?s("".concat(t,"/api/v2/transpond/webrtc?v=2"),i,e.proxyServer):"disabled"===e.cloudProxyServer||"fallback"===e.cloudProxyServer?"https://".concat(t,"/api/v2/transpond/webrtc?v=2"):s("".concat(t,"/api/v2/transpond/webrtc?v=2"),i),{url:n,areaCode:NN(),serviceIds:[lT.CHOOSE_SERVER,"proxy5"===e.cloudProxyServer?lT.CLOUD_PROXY_5:"proxy3"===e.cloudProxyServer||"proxy4"===e.cloudProxyServer?lT.CLOUD_PROXY:lT.CLOUD_PROXY_FALLBACK]}})),c=n.recordJoinChannelService({startTs:Date.now(),status:"pending",service:"chooseServer",urls:r.map((e=>e.url))}),l=await eL({fragementLength:xC("FRAGEMENT_LENGTH"),referenceList:r,asyncMapHandler:n=>($C.debug("[".concat(e.clientId,"] Connect to backup choose_server:"),n.url),KN(n,e,t,i)),allFailedhandler:e=>{throw n.recordJoinChannelService({endTs:Date.now(),status:"error",errors:e},c),e[0]},promisesCollector:a});return n.recordJoinChannelService({endTs:Date.now(),status:"success"},c),l};let d,h,u;try{({gatewayInfo:d,proxyInfo:h,url:u}=await JN([c(),l()]))}catch(e){throw e[0]}if(a.length&&a.forEach((e=>e.cancel&&"function"==typeof e.cancel&&e.cancel())),!d||!h)throw new Dw(Bb.UNEXPECTED_ERROR,"missing gateway or proxy response").print();if(e.apUrl=u,"disabled"!==e.cloudProxyServer&&Array.isArray(r)&&u){const t=/^https?:\/\/(.+?)(\/.*)?$/.exec(u)[1];Di(r).call(r,t)&&(e.proxyServer=t,$C.setProxyServer(t),nw.setProxyServer(t))}return o={gatewayInfo:d,proxyInfo:await fN(h,d.uid)},o}async function aL(e,t,i,n){const r=xC("UAP_AP").slice(0,xC("AJAX_REQUEST_CONCURRENT")).map((e=>t.proxyServer?"https://".concat(t.proxyServer,"/ap/?url=").concat(e+"/api/v1?action=uap"):"https://".concat(e,"/api/v1?action=uap")));return await $N(r,e,t,i,n)}async function sL(e,t,i){const n=xC("UAP_AP").slice(0,xC("AJAX_REQUEST_CONCURRENT")).map((t=>e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(t+"/api/v1?action=uap"):"https://".concat(t,"/api/v1?action=uap"))).map((n=>function(e,t,i,n){const r={command:"convergeAllocateEdge",sid:t.sid,appId:t.appId,token:t.token,ts:Date.now(),version:IC,cname:t.cname,uid:t.uid.toString(),requestId:zN,seq:zN};zN+=1;const s={service_name:"tele_channel",json_body:JSON.stringify(r)};return Z_((async()=>{const t=await kN(e,{data:s,cancelToken:i,headers:{"X-Packet-Service-Type":0,"X-Packet-URI":61}});if(0!==t.code){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"cross channel ap error, code"+t.code,{retry:!0});throw $C.error(e.toString()),e}const n=JSON.parse(t.json_body);if(200!==n.code){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"cross channel app center error, code: ".concat(n.code,", reason: ").concat(n.reason));throw $C.error(e.toString()),e}if(!n.servers||0===n.servers.length){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"cross channel app center empty server");throw $C.error(e.toString()),e}return{vid:n.vid,workerToken:n.workerToken,addressList:(xC("CHANNEL_MEDIA_RELAY_SERVERS")||n.servers).map((e=>"wss://".concat(e.address.replace(/\./g,"-"),".").concat(xC("WORKER_DOMAIN"),":").concat(e.wss)))}}),void 0,(e=>!!(e.code!==Bb.OPERATION_ABORTED&&e.code!==Bb.UNEXPECTED_RESPONSE||e.data&&e.data.retry)),n)}(n,e,t,i)));try{const e=await JN(n);return n.forEach((e=>e.cancel())),e}catch(e){throw e[0]}}async function cL(e,t,i){let n=null;const r=[],s=async s=>{const o=xC(s?"WEBCS_DOMAIN_BACKUP_LIST":"WEBCS_DOMAIN").map((t=>e.proxyServer?"https://".concat(e.proxyServer,"/ap/?url=").concat(t+"/api/v2/transpond/webrtc?v=2"):"https://".concat(t,"/api/v2/transpond/webrtc?v=2")));return s&&(await U_(1e3),null!==n)?n:await eL({fragementLength:xC("FRAGEMENT_LENGTH"),referenceList:o,asyncMapHandler:n=>($C.debug("[".concat(e.clientId,"] update ticket, Connect to ").concat(s?"backup":""," choose_server:"),n),function(e,t,i,n){const[r]=ZN(t,[lT.CHOOSE_SERVER]);let s=C_.networkState;return Z_((async()=>{s&&C_.networkState===h_.OFFLINE&&C_.onlineWaiter&&await nb.race([C_.onlineWaiter,U_(n&&n.maxRetryTimeout||Y_.maxRetryTimeout)]),s=C_.networkState;const t=await kN(e,{data:r,cancelToken:i,headers:{"Content-Type":"multipart/form-data;"}},!0);return YN(t,e)}),(()=>!1),(e=>e.code!==Bb.OPERATION_ABORTED&&(e.code===Bb.UPDATE_TICKET_FAILED?e.data.retry:($C.warning("[".concat(t.clientId,"] update ticket network error, retry"),e),!0))),n)}(n,e,t,i)),allFailedhandler:e=>{throw e[0]},promisesCollector:r})};try{return n=await JN([s(!1),s(!0)]),r.length&&r.forEach((e=>e.cancel&&"function"==typeof e.cancel&&e.cancel())),n}catch(e){throw e[0]}}function lL(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function dL(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?lL(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):lL(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class uL extends r_{constructor(){super(),oh(this,"configs",void 0),oh(this,"joinInfo",void 0),oh(this,"cancelToken",void 0),oh(this,"retryConfig",{timeout:3e3,timeoutFactor:1.5,maxRetryCount:1,maxRetryTimeout:1e4}),oh(this,"interval",void 0),oh(this,"mutex",new G_("config-distribute")),oh(this,"mutableParamsRead",!1)}startGetConfigDistribute(e,t){this.joinInfo=e,this.cancelToken=t,this.interval&&this.stopGetConfigDistribute(),xC("ENABLE_CONFIG_DISTRIBUTE")&&(this.updateConfigDistribute(),this.interval=window.setInterval((()=>{this.updateConfigDistribute()}),xC("CONFIG_DISTRIBUTE_INTERVAL")))}stopGetConfigDistribute(){this.interval&&clearInterval(this.interval),this.interval=void 0,this.joinInfo=void 0,this.cancelToken=void 0}async awaitConfigDistributeComplete(){this.mutex.isLocked&&(await this.mutex.lock())()}async updateConfigDistribute(){if(this.mutableParamsRead||(this.mutableParamsRead=!0,nw.reportApiInvoke(null,{options:void 0,name:a_.LOAD_CONFIG_FROM_LOCALSTORAGE,tag:s_.TRACER}).onSuccess(JSON.stringify(DC))),!this.joinInfo||!this.cancelToken||!this.retryConfig)return void $C.debug("[config-distribute] get config distribute interrupted have no joininfo");let e;const t=await this.mutex.lock();try{e=await iL(this.joinInfo,this.cancelToken,this.retryConfig),$C.debug("[config-distribute] get config distribute",JSON.stringify(e)),e.limit_bitrate&&this.handleBitrateLimit(e.limit_bitrate),this.cacheGlobalParameterConfig(e),this.configs=e}catch(e){const t=new Dw(Bb.NETWORK_RESPONSE_ERROR,e);$C.warning("[config-distribute] ".concat(t.toString()))}finally{t()}}getBitrateLimit(){return this.configs?this.configs.limit_bitrate:void 0}handleBitrateLimit(e){var t;(t=e)&&t.uplink&&t.id&&void 0!==t.uplink.max_bitrate&&void 0!==t.uplink.min_bitrate&&(this.configs&&this.configs.limit_bitrate?this.configs&&this.configs.limit_bitrate&&this.configs.limit_bitrate.id!==e.id&&this.emit(sS.UPDATE_BITRATE_LIMIT,e):this.emit(sS.UPDATE_BITRATE_LIMIT,e))}getLowStreamConfigDistribute(){return this.configs&&this.configs.limit_bitrate&&dL({},this.configs.limit_bitrate.low_stream_uplink)}cacheGlobalParameterConfig(e){var t;const i=ef(t=Object.keys(e).filter((e=>/^webrtc_ng_global_parameter/.test(e)))).call(t);for(let t=0;t<i.length;t++)for(let n=i.length-1;n>t;n--){const t=i[n];if("number"==typeof e[t].__priority){const r=e[t].__priority,s=i[n-1];if("number"==typeof e[s].__priority){if(!(r>e[s].__priority))continue;{const e=t;i[n]=i[n-1],i[n-1]=e}}else{const e=t;i[n]=i[n-1],i[n-1]=e}}}const n={};i.forEach((t=>{const i=e[t],r=i.__expires;Object.keys(i).forEach((e=>{"__priority"===e||"__expires"===e||Object.prototype.hasOwnProperty.call(n,e)||(n[e]=dL({value:i[e]},r&&{expires:r}))}))}));try{!function(e){try{const t=Date.now();Object.keys(e).forEach((i=>{switch(i){case"ENABLE_EVENT_REPORT":case"UPLOAD_LOG":if(Object.prototype.hasOwnProperty.call(LC,i)){const{value:n,expires:r}=e[i];if(r&&r<=t)return;DC[i]=n,LC[i]=n,$C.debug("Update global parameters from config distribute",i,n)}}}))}catch(t){$C.error("Error update config immediately: ".concat(e),t.message)}}(n);const e=JSON.stringify(n),t=window.btoa(e);window.localStorage.setItem("websdk_ng_global_parameter",t),$C.debug("Caching global parameters ".concat(e))}catch(e){$C.error("Error caching global parameters:",e.message)}}}function hL(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function fL(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?hL(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):hL(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class pL extends r_{constructor(e,t,i,n){super(),oh(this,"spec",void 0),oh(this,"token",void 0),oh(this,"websocket",void 0),oh(this,"pingpongTimer",void 0),oh(this,"reconnectMode","retry"),oh(this,"serviceMode",void 0),oh(this,"reqId",0),oh(this,"commandReqId",0),oh(this,"handleWebSocketOpen",(()=>{this.reconnectMode="retry",this.startPingPong()})),oh(this,"handleWebSocketMessage",(e=>{if(!e.data)return;const t=JSON.parse(e.data);t.requestId?this.emit("@".concat(t.requestId,"-").concat(t.sid),t):this.serviceMode===ww.INJECT?this.emit($w.INJECT_STREAM_STATUS,t):(nw.workerEvent(this.spec.sid,{actionType:"status",serverCode:t.code,workerType:this.serviceMode===ww.TRANSCODE?1:2}),this.emit($w.PUBLISH_STREAM_STATUS,t))})),this.spec=t,this.token=e,this.serviceMode=n,this.websocket=new qS("live-streaming",i),this.websocket.on(Cw.CONNECTED,this.handleWebSocketOpen),this.websocket.on(Cw.ON_MESSAGE,this.handleWebSocketMessage),this.websocket.on(Cw.REQUEST_NEW_URLS,((e,t)=>{b_(this,$w.REQUEST_NEW_ADDRESS).then(e).catch(t)})),this.websocket.on(Cw.RECONNECTING,(()=>{this.websocket.reconnectMode=this.reconnectMode}))}init(e){return this.websocket.init(e)}async request(e,t,i,n){this.reqId+=1,"request"===e&&(this.commandReqId+=1);const r=this.commandReqId,s=this.reqId;if(!s||!this.websocket)throw new Dw(Bb.UNEXPECTED_ERROR);const o=fL({command:e,sdkVersion:"4.19.1"===IC?"0.0.1":IC,seq:s,requestId:s,allocate:i,cname:this.spec.cname,appId:this.spec.appId,sid:this.spec.sid,uid:this.spec.uid.toString(),ts:Math.floor(Date.now()/1e3)},t);if("closed"===this.websocket.state)throw new Dw(Bb.WS_DISCONNECT);const a=()=>new nb(((e,t)=>{this.websocket.once(Cw.CLOSED,(()=>t(new Dw(Bb.WS_ABORT)))),this.websocket.once(Cw.CONNECTED,e)}));"connected"!==this.websocket.state&&await a(),o.clientRequest&&(o.clientRequest.workerToken=this.token);const c=new nb(((e,t)=>{const i=()=>{t(new Dw(Bb.WS_ABORT))};this.websocket.once(Cw.RECONNECTING,i),this.websocket.once(Cw.CLOSED,i),this.once("@".concat(s,"-").concat(this.spec.sid),(t=>{e(t)}))}));n&&nw.workerEvent(this.spec.sid,fL(fL({},n),{},{requestId:r,actionType:"request",payload:JSON.stringify(t.clientRequest),serverCode:0,code:0}));const l=Date.now();this.websocket.sendMessage(o);let d=null;try{d=await c}catch(n){if("closed"===this.websocket.state)throw n;return await a(),await this.request(e,t,i)}return n&&nw.workerEvent(this.spec.sid,fL(fL({},n),{},{requestId:r,actionType:"response",payload:JSON.stringify(d.serverResponse),serverCode:d.code,success:200===d.code,responseTime:Date.now()-l})),200!==d.code&&this.handleResponseError(d),d}tryNextAddress(){this.reconnectMode="tryNext",this.websocket.reconnect("tryNext")}close(){const e="4.19.1"===IC?"0.0.1":IC;this.reqId+=1,"connected"===this.websocket.state?(this.websocket.sendMessage({command:"request",appId:this.spec.appId,cname:this.spec.cname,uid:this.spec.uid.toString(),sdkVersion:e,sid:this.spec.sid,seq:this.reqId,ts:Math.floor(Date.now()/1e3),requestId:this.reqId,clientRequest:{command:"DestroyWorker"}}),this.websocket.close(!1,!0)):this.websocket.close(!1),this.pingpongTimer&&(window.clearInterval(this.pingpongTimer),this.pingpongTimer=void 0)}handleResponseError(e){switch(e.code){case Ww.LIVE_STREAM_RESPONSE_ALREADY_EXISTS_STREAM:return void $C.warning("live stream response already exists stream");case Ww.LIVE_STREAM_RESPONSE_TRANSCODING_PARAMETER_ERROR:case Ww.LIVE_STREAM_RESPONSE_BAD_STREAM:case Ww.LIVE_STREAM_RESPONSE_WM_PARAMETER_ERROR:return new Dw(Bb.LIVE_STREAMING_INVALID_ARGUMENT,"",{code:e.code}).throw();case Ww.LIVE_STREAM_RESPONSE_WM_WORKER_NOT_EXIST:if("UnpublishStream"===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return;throw new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream response wm worker not exist",{retry:!0});case Ww.LIVE_STREAM_RESPONSE_NOT_AUTHORIZED:return new Dw(Bb.LIVE_STREAMING_PUBLISH_STREAM_NOT_AUTHORIZED,"",{code:e.code}).throw();case Ww.LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE:{const t=new Dw(Bb.LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE);return this.emit($w.WARNING,t,e.serverResponse.url)}case Ww.LIVE_STREAM_RESPONSE_REQUEST_TOO_OFTEN:{const t=new Dw(Bb.LIVE_STREAMING_WARN_FREQUENT_REQUEST);return this.emit($w.WARNING,t,e.serverResponse.url)}case Ww.LIVE_STREAM_RESPONSE_NOT_FOUND_PUBLISH:throw new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream response wm worker not exist",{retry:!0});case Ww.LIVE_STREAM_RESPONSE_NOT_SUPPORTED:return new Dw(Bb.LIVE_STREAMING_TRANSCODING_NOT_SUPPORTED,"",{code:e.code}).throw();case Ww.LIVE_STREAM_RESPONSE_MAX_STREAM_NUM:{const t=new Dw(Bb.LIVE_STREAMING_WARN_STREAM_NUM_REACH_LIMIT);return this.emit($w.WARNING,t,e.serverResponse.url)}case Ww.LIVE_STREAM_RESPONSE_INTERNAL_SERVER_ERROR:return new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"",{code:e.code}).throw();case Ww.LIVE_STREAM_RESPONSE_RESOURCE_LIMIT:throw new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"live stream resource limit",{retry:!0,changeAddress:!0});case Ww.LIVE_STREAM_RESPONSE_WORKER_LOST:case Ww.LIVE_STREAM_RESPONSE_WORKER_QUIT:if("UnpublishStream"===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return;throw new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{retry:!0,changeAddress:!0});case Ww.ERROR_FAIL_SEND_MESSAGE:if("UnpublishStream"===e.serverResponse.command||"UninjectStream"===e.serverResponse.command)return;if("UpdateTranscoding"===e.serverResponse.command||"ControlStream"===e.serverResponse.command)return new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{code:e.code}).throw();throw new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"error fail send message",{retry:!0,changeAddress:!0});case Ww.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH:return new Dw(Bb.LIVE_STREAMING_CDN_ERROR,"",{code:e.code}).throw()}}startPingPong(){this.pingpongTimer&&window.clearInterval(this.pingpongTimer),this.pingpongTimer=window.setInterval((()=>{"connected"===this.websocket.state&&this.request("ping",{}).catch(V_)}),6e3)}}function gL(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function mL(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?gL(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):gL(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class vL extends r_{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Y_,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Y_;super(),oh(this,"onLiveStreamWarning",void 0),oh(this,"onLiveStreamError",void 0),oh(this,"onInjectStatusChange",void 0),oh(this,"spec",void 0),oh(this,"retryTimeout",1e4),oh(this,"connection",void 0),oh(this,"httpRetryConfig",void 0),oh(this,"wsRetryConfig",void 0),oh(this,"streamingTasks",new Map),oh(this,"isStartingStreamingTask",!1),oh(this,"taskMutex",new G_("live-streaming")),oh(this,"cancelToken",gC.CancelToken.source()),oh(this,"transcodingConfig",void 0),oh(this,"injectConfig",mL({},Hw)),oh(this,"injectLoopTimes",0),oh(this,"uapResponse",void 0),oh(this,"lastTaskId",1),oh(this,"statusError",new Map),this.spec=e,this.httpRetryConfig=i,this.wsRetryConfig=t}async setTranscodingConfig(e){const t=mL(mL({},jw),e);66!==t.videoCodecProfile&&77!==t.videoCodecProfile&&100!==t.videoCodecProfile&&($C.debug("[".concat(this.spec.clientId,"] set transcoding config, fix video codec profile: ").concat(t.videoCodecProfile," -> 100")),t.videoCodecProfile=100),t.transcodingUsers||(t.transcodingUsers=t.userConfigs),t.transcodingUsers&&(t.transcodingUsers=t.transcodingUsers.map((e=>mL(mL(mL({},Bw),e),{},{zOrder:e.zOrder?e.zOrder+1:1})))),function(e){Kb(e.width)||Hb(e.width,"config.width",0,1e4),Kb(e.height)||Hb(e.height,"config.height",0,1e4),Kb(e.videoBitrate)||Hb(e.videoBitrate,"config.videoBitrate",1,1e6),Kb(e.videoFrameRate)||Hb(e.videoFrameRate,"config.videoFrameRate"),Kb(e.lowLatency)||Vb(e.lowLatency,"config.lowLatency"),Kb(e.audioSampleRate)||jb(e.audioSampleRate,"config.audioSampleRate",[32e3,44100,48e3]),Kb(e.audioBitrate)||Hb(e.audioBitrate,"config.audioBitrate",1,128),Kb(e.audioChannels)||jb(e.audioChannels,"config.audioChannels",[1,2,3,4,5]),Kb(e.videoGop)||Hb(e.videoGop,"config.videoGop"),Kb(e.videoCodecProfile)||jb(e.videoCodecProfile,"config.videoCodecProfile",[66,77,100]),Kb(e.userCount)||Hb(e.userCount,"config.userCount",0,17),Kb(e.backgroundColor)||Hb(e.backgroundColor,"config.backgroundColor",0,16777215),Kb(e.userConfigExtraInfo)||zb(e.userConfigExtraInfo,"config.userConfigExtraInfo",0,4096,!1),e.transcodingUsers&&!Kb(e.transcodingUsers)&&(Wb(e.transcodingUsers,"config.transcodingUsers"),e.transcodingUsers.forEach(((e,t)=>{Uw(e.uid),Kb(e.x)||Hb(e.x,"transcodingUser[".concat(t,"].x"),0,1e4),Kb(e.y)||Hb(e.y,"transcodingUser[".concat(t,"].y"),0,1e4),Kb(e.width)||Hb(e.width,"transcodingUser[".concat(t,"].width"),0,1e4),Kb(e.height)||Hb(e.height,"transcodingUser[".concat(t,"].height"),0,1e4),Kb(e.zOrder)||Hb(e.zOrder-1,"transcodingUser[".concat(t,"].zOrder"),0,100),Kb(e.alpha)||Hb(e.alpha,"transcodingUser[".concat(t,"].alpha"),0,1,!1)}))),Kb(e.watermark)||Vw(e.watermark,"watermark"),Kb(e.backgroundImage)||Vw(e.backgroundImage,"backgroundImage"),e.images&&!Kb(e.images)&&(Wb(e.images,"config.images"),e.images.forEach(((e,t)=>{Vw(e,"images[".concat(t,"]"))})))}(t);const i=[];t.images&&i.push(...t.images.map((e=>mL(mL(mL({},Fw),e),{},{zOrder:255})))),t.backgroundImage&&(i.push(mL(mL(mL({},Fw),t.backgroundImage),{},{zOrder:0})),delete t.backgroundImage),t.watermark&&(i.push(mL(mL(mL({},Fw),t.watermark),{},{zOrder:255})),delete t.watermark),t.images=i,t.transcodingUsers&&(t.userConfigs=t.transcodingUsers.map((e=>mL({},e))),t.userCount=t.transcodingUsers.length,delete t.transcodingUsers);const n=(t.userConfigs||[]).map((e=>"number"==typeof e.uid?nb.resolve(e.uid):rL(e.uid,this.spec,this.cancelToken.token,this.httpRetryConfig)));if((await nb.all(n)).forEach(((e,i)=>{t.userConfigs&&t.userConfigs[i]&&(t.userConfigs[i].uid=e)})),this.transcodingConfig=t,this.connection)try{var r;const e=await this.connection.request("request",{clientRequest:{command:"UpdateTranscoding",transcodingConfig:this.transcodingConfig}},!1,{command:"UpdateTranscoding",workerType:1,requestByUser:!0,tid:Array.from(Lw(r=this.streamingTasks).call(r)).map((e=>e.taskId)).join("#")});$C.debug("[".concat(this.spec.clientId,"] update live transcoding config success, code: ").concat(e.code,", config:"),JSON.stringify(this.transcodingConfig))}catch(e){if(!e.data||!e.data.retry)throw e;e.data.changeAddress&&this.connection.tryNextAddress(),this.streamingTasks.forEach((t=>{$C.warning("[".concat(this.spec.clientId,"] live streaming receive error"),e.toString(),"try to republish",t.url),this.startLiveStreamingTask(t.url,t.mode,e).then((()=>{$C.debug("[".concat(this.spec.clientId,"] live streaming republish ").concat(t.url," success"))})).catch((e=>{$C.error("[".concat(this.spec.clientId,"] live streaming republish failed"),t.url,e.toString()),this.onLiveStreamError&&this.onLiveStreamError(t.url,e)}))}))}}setInjectStreamConfig(e,t){this.injectConfig=Object.assign({},this.injectConfig,e),this.injectLoopTimes=t}async startLiveStreamingTask(e,t,i){var n;if(Array.from(Lw(n=this.streamingTasks).call(n)).find((e=>e.mode===ww.INJECT))&&t===ww.INJECT)return new Dw(Bb.LIVE_STREAMING_TASK_CONFLICT,"inject stream over limit").throw();if(!this.transcodingConfig&&t===ww.TRANSCODE)throw new Dw(Bb.INVALID_OPERATION,"[LiveStreaming] no transcoding config found, can not start transcoding streaming task");let r={command:"PublishStream",ts:Date.now(),url:e,uid:this.spec.uid.toString(),autoDestroyTime:100,acceptImageTimeout:!0};$C.debug("[".concat(this.spec.clientId,"] start live streaming ").concat(e,", mode: ").concat(t));const s=await this.taskMutex.lock();if(!this.connection&&i)return void s();if(this.streamingTasks.get(e)&&!i)return s(),new Dw(Bb.LIVE_STREAMING_TASK_CONFLICT).throw();try{this.connection||(this.connection=await this.connect(t))}catch(e){throw s(),e}switch(t){case ww.TRANSCODE:r.transcodingConfig=mL({},this.transcodingConfig);break;case ww.RAW:break;case ww.INJECT:r={cname:this.spec.cname,command:"InjectStream",sid:this.spec.sid,transcodingConfig:this.injectConfig,ts:Date.now(),url:e,loopTimes:this.injectLoopTimes}}this.uapResponse&&this.uapResponse.vid&&(r.vid=this.uapResponse.vid),this.isStartingStreamingTask=!0;const o=this.lastTaskId++;try{const n=new nb(((t,n)=>{U_(this.retryTimeout).then((()=>{if(i)return n(i);const t=this.statusError.get(e);return t?(this.statusError.delete(e),n(t)):void 0}))})),a=await nb.race([this.connection.request("request",{clientRequest:r},!0,{url:e,command:"PublishStream",workerType:t===ww.TRANSCODE?1:2,requestByUser:!i,tid:o.toString()}),n]);this.isStartingStreamingTask=!1,$C.debug("[".concat(this.spec.clientId,"] live streaming started, code: ").concat(a.code)),this.streamingTasks.set(e,{clientRequest:r,mode:t,url:e,taskId:o}),s()}catch(n){if(s(),this.isStartingStreamingTask=!1,!n.data||!n.data.retry||i)throw n;return n.data.changeAddress?(this.connection.tryNextAddress(),await this.startLiveStreamingTask(e,t,n)):await this.startLiveStreamingTask(e,t,n)}}stopLiveStreamingTask(e){return new nb(((t,i)=>{const n=this.streamingTasks.get(e);if(!n||!this.connection)return new Dw(Bb.UNEXPECTED_ERROR,"can not find streaming task to stop").throw();const r=n.mode;n.abortTask=()=>{$C.debug("[".concat(this.spec.clientId,"] stop live streaming success(worker exception)")),this.streamingTasks.delete(e),t()},this.connection.request("request",{clientRequest:{command:r===ww.INJECT?"UninjectStream":"UnpublishStream",url:n.url}},!1,{url:e,command:"UnPublishStream",workerType:r===ww.TRANSCODE?1:2,requestByUser:!0,tid:(this.lastTaskId++).toString()}).then((i=>{$C.debug("[".concat(this.spec.clientId,"] stop live streaming success, code: ").concat(i.code)),this.streamingTasks.delete(e),0===this.streamingTasks.size&&r!==ww.INJECT&&(this.connection&&this.connection.close(),this.connection=void 0),t(),r===ww.INJECT&&this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_STOP_SUCCESS,this.spec.uid,e)})).catch(i)}))}async controlInjectStream(e,t,i,n){const r=this.streamingTasks.get(e);if(!r||!this.connection||r.mode!==ww.INJECT)throw new Dw(Bb.INVALID_OPERATION,"can not find inject stream task to control");return(await this.connection.request("request",{clientRequest:{command:"ControlStream",url:e,control:t,audioVolume:i,position:n}})).serverResponse}resetAllTask(){var e;const t=Array.from(Lw(e=this.streamingTasks).call(e));this.terminate();for(const e of t)this.startLiveStreamingTask(e.url,e.mode).catch((t=>{this.onLiveStreamError&&this.onLiveStreamError(e.url,t)}))}terminate(){this.cancelToken&&this.cancelToken.cancel(),this.streamingTasks=new Map,this.isStartingStreamingTask=!1,this.statusError=new Map,this.cancelToken=gC.CancelToken.source(),this.uapResponse=void 0,this.connection&&this.connection.close(),this.connection=void 0}async connect(e){if(this.connection)throw new Dw(Bb.UNEXPECTED_ERROR,"live streaming connection has already connected");const t=await b_(this,zw.REQUEST_WORKER_MANAGER_LIST,e);return this.uapResponse=t,this.connection=new pL(t.workerToken,this.spec,this.wsRetryConfig,e),this.connection.on($w.WARNING,((e,t)=>this.onLiveStreamWarning&&this.onLiveStreamWarning(t,e))),this.connection.on($w.PUBLISH_STREAM_STATUS,(e=>this.handlePublishStreamServer(e))),this.connection.on($w.INJECT_STREAM_STATUS,(e=>this.handleInjectStreamServerStatus(e))),this.connection.on($w.REQUEST_NEW_ADDRESS,((t,i)=>{if(!this.connection)return i(new Dw(Bb.UNEXPECTED_ERROR,"can not get new live streaming address list"));b_(this,zw.REQUEST_WORKER_MANAGER_LIST,e).then((e=>{this.uapResponse=e,t(e.addressList)})).catch(i)})),await this.connection.init(t.addressList),this.connection}handlePublishStreamServer(e){const t=e.serverStatus&&e.serverStatus.url||"empty_url",i=this.streamingTasks.get(t),n=e.reason;switch(e.code){case Ww.PUBLISH_STREAM_STATUS_ERROR_PUBLISH_BROKEN:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_CONNECT:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_HANDSHAKE:case Ww.PUBLISH_STREAM_STATUS_ERROR_RTMP_PUBLISH:{const n=new Dw(Bb.LIVE_STREAMING_CDN_ERROR,"",{code:e.code});if(i)return $C.error(n.toString()),this.onLiveStreamError&&this.onLiveStreamError(t,n);if(!this.isStartingStreamingTask)return;this.statusError.set(t,n)}case Ww.LIVE_STREAM_RESPONSE_FAILED_LOAD_IMAGE:{const e=new Dw(Bb.LIVE_STREAMING_WARN_FAILED_LOAD_IMAGE,n);return this.onLiveStreamWarning&&this.onLiveStreamWarning(t,e)}case Ww.LIVE_STREAM_RESPONSE_WORKER_LOST:case Ww.LIVE_STREAM_RESPONSE_WORKER_QUIT:{var r;if(!this.connection)return;this.connection.tryNextAddress();const t=Array.from(Lw(r=this.streamingTasks).call(r));for(const i of t)i.abortTask?i.abortTask():($C.warning("[".concat(this.spec.clientId,"] publish stream status code"),e.code,"try to republish",i.url),this.startLiveStreamingTask(i.url,i.mode,new Dw(Bb.LIVE_STREAMING_INTERNAL_SERVER_ERROR,"",{code:e.code})).then((()=>{$C.debug("[".concat(this.spec.clientId,"] republish live stream success"),i.url)})).catch((e=>{$C.error(e.toString()),this.onLiveStreamError&&this.onLiveStreamError(i.url,e)})));return}}}handleInjectStreamServerStatus(e){const t=Number(e.uid),i=e.serverStatus&&e.serverStatus.url;switch(e.code){case 200:return void(this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_START_SUCCESS,t,i));case 451:return this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_START_ALREADY_EXISTS,t,i),void this.streamingTasks.delete(i);case 453:return this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_START_UNAUTHORIZED,t,i),void this.streamingTasks.delete(i);case 470:return this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_BROKEN,t,i),void this.streamingTasks.delete(i);case 499:return this.onInjectStatusChange&&this.onInjectStatusChange(Sw.INJECT_STREAM_STATUS_START_TIMEOUT,t,i),void this.streamingTasks.delete(i);default:return void $C.debug("inject stream server status",e)}}hasUrl(e){return this.streamingTasks.has(e)}}class bL{constructor(){oh(this,"destChannelMediaInfos",new Map),oh(this,"srcChannelMediaInfo",void 0)}setSrcChannelInfo(e){rS(e),this.srcChannelMediaInfo=e}addDestChannelInfo(e){rS(e),this.destChannelMediaInfos.set(e.channelName,e)}removeDestChannelInfo(e){Pw(e),this.destChannelMediaInfos.delete(e)}getSrcChannelMediaInfo(){return this.srcChannelMediaInfo}getDestChannelMediaInfo(){return this.destChannelMediaInfos}}function _L(e){if(!(e instanceof bL))return new Dw(Bb.INVALID_PARAMS,"Config should be instance of [ChannelMediaRelayConfiguration]").throw();const t=e.getSrcChannelMediaInfo(),i=e.getDestChannelMediaInfo();return t?0===i.size?new Dw(Bb.INVALID_PARAMS,"destChannelMediaInfo should not be empty").throw():void 0:new Dw(Bb.INVALID_PARAMS,"srcChannelMediaInfo should not be empty").throw()}class yL extends r_{constructor(e,t,i){super(),oh(this,"ws",void 0),oh(this,"requestId",1),oh(this,"heartBeatTimer",void 0),oh(this,"joinInfo",void 0),oh(this,"clientId",void 0),oh(this,"onOpen",(()=>{this.emit("open"),this.startHeartBeatCheck()})),oh(this,"onClose",(e=>{this.emit("close"),this.dispose()})),oh(this,"onMessage",(e=>{const t=JSON.parse(e.data);if(!t||"serverResponse"!==t.command||!t.requestId)return t&&"serverStatus"===t.command&&t.serverStatus&&t.serverStatus.command?(this.emit("status",t.serverStatus),void this.emit(t.serverStatus.command,t.serverStatus)):void 0;this.emit("req_".concat(t.requestId),t)})),this.joinInfo=e,this.clientId=t,this.ws=new qS("cross-channel-".concat(this.clientId),i),this.ws.on(Cw.RECONNECTING,(()=>{this.ws.reconnectMode="retry",this.emit("reconnecting")})),this.ws.on(Cw.CONNECTED,this.onOpen),this.ws.on(Cw.ON_MESSAGE,this.onMessage),this.ws.on(Cw.CLOSED,this.onClose)}isConnect(){return"connected"===this.ws.state}sendMessage(e){const t=this.requestId++;return e.requestId=t,e.seq=t,this.ws.sendMessage(e),t}waitStatus(e){return new nb(((t,i)=>{const n=window.setTimeout((()=>{i(new Dw(Bb.TIMEOUT,"wait status timeout, status: ".concat(e)))}),5e3);this.once(e,(r=>{window.clearTimeout(n),r.state&&0!==r.state?i(new Dw(Bb.CROSS_CHANNEL_WAIT_STATUS_ERROR,"wait status error, status: ".concat(e))):t(void 0)})),this.once("dispose",(()=>{window.clearTimeout(n),i(new Dw(Bb.WS_ABORT))}))}))}async request(e){if("closed"===this.ws.state)throw new Dw(Bb.WS_DISCONNECT);const t=()=>new nb(((e,t)=>{this.ws.once(Cw.CLOSED,(()=>t(new Dw(Bb.WS_ABORT)))),this.ws.once(Cw.CONNECTED,e)}));"connected"!==this.ws.state&&await t();const i=this.sendMessage(e),n=new nb(((e,t)=>{const n=()=>{t(new Dw(Bb.WS_ABORT))};this.ws.once(Cw.RECONNECTING,n),this.ws.once(Cw.CLOSED,n),this.once("req_".concat(i),e),U_(3e3).then((()=>{this.removeAllListeners("req_".concat(i)),this.ws.off(Cw.RECONNECTING,n),this.ws.off(Cw.CLOSED,n),t(new Dw(Bb.TIMEOUT,"cross channel ws request timeout"))}))})),r=await n;if(!r||200!==r.code)throw new Dw(Bb.CROSS_CHANNEL_SERVER_ERROR_RESPONSE,"response: ".concat(JSON.stringify(r)));return r}async connect(e){this.ws.removeAllListeners(Cw.REQUEST_NEW_URLS),this.ws.on(Cw.REQUEST_NEW_URLS,(t=>{t(e)})),await this.ws.init(e)}dispose(){this.clearHeartBeatCheck(),this.emit("dispose"),this.removeAllListeners(),this.ws.close()}sendPing(e){const t=this.requestId++;return e.requestId=t,this.ws.sendMessage(e),t}startHeartBeatCheck(){this.heartBeatTimer&&window.clearInterval(this.heartBeatTimer),this.heartBeatTimer=window.setInterval((()=>{this.sendPing({command:"ping",appId:this.joinInfo.appId,cname:this.joinInfo.cname,uid:this.joinInfo.uid.toString(),sid:this.joinInfo.sid,ts:+new Date,requestId:0})}),3e3)}clearHeartBeatCheck(){window.clearInterval(this.heartBeatTimer),this.heartBeatTimer=void 0}}class EL extends r_{set state(e){e!==this._state&&(e!==Yw.RELAY_STATE_FAILURE&&(this.errorCode=Xw.RELAY_OK),this.emit("state",e,this.errorCode),this._state=e)}get state(){return this._state}constructor(e,t,i,n,r){super(),oh(this,"joinInfo",void 0),oh(this,"sid",void 0),oh(this,"clientId",void 0),oh(this,"cancelToken",gC.CancelToken.source()),oh(this,"workerToken",void 0),oh(this,"requestId",0),oh(this,"signal",void 0),oh(this,"prevChannelMediaConfig",void 0),oh(this,"httpRetryConfig",void 0),oh(this,"_resolution",void 0),oh(this,"_state",Yw.RELAY_STATE_IDLE),oh(this,"errorCode",Xw.RELAY_OK),oh(this,"onStatus",(e=>{$C.debug("[".concat(this.clientId,"] ChannelMediaStatus: ").concat(JSON.stringify(e))),e&&e.command&&("onAudioPacketReceived"===e.command&&this.emit("event",qw.PACKET_RECEIVED_AUDIO_FROM_SRC),"onVideoPacketReceived"===e.command&&this.emit("event",qw.PACKET_RECEIVED_VIDEO_FROM_SRC),"onSrcTokenPrivilegeDidExpire"===e.command&&(this.errorCode=Xw.SRC_TOKEN_EXPIRED,this.state=Yw.RELAY_STATE_FAILURE),"onDestTokenPrivilegeDidExpire"===e.command&&(this.errorCode=Xw.DEST_TOKEN_EXPIRED,this.state=Yw.RELAY_STATE_FAILURE))})),oh(this,"onReconnect",(async()=>{$C.debug("[".concat(this.clientId,"] ChannelMediaSocket disconnect, reconnecting")),this.emit("event",qw.NETWORK_DISCONNECTED),this.state=Yw.RELAY_STATE_IDLE,this.prevChannelMediaConfig&&this.sendStartRelayMessage(this.prevChannelMediaConfig).catch((e=>{this.state!==Yw.RELAY_STATE_IDLE&&($C.error("auto restart channel media relay failed",e.toString()),this.errorCode=Xw.SERVER_CONNECTION_LOST,this.state=Yw.RELAY_STATE_FAILURE)}))})),this.joinInfo=e,this.clientId=t,this.sid=F_(),this.signal=new yL(this.joinInfo,this.clientId,i),this.httpRetryConfig=n,this._resolution=r}async startChannelMediaRelay(e){if(this.state!==Yw.RELAY_STATE_IDLE)throw new Dw(Bb.INVALID_OPERATION);this.state=Yw.RELAY_STATE_CONNECTING,await this.connect(),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: connect success"));try{await this.sendStartRelayMessage(e)}catch(e){if(e.data&&e.data.serverResponse&&"SetSourceChannel"===e.data.serverResponse.command)throw new Dw(Bb.CROSS_CHANNEL_FAILED_JOIN_SRC);if(e.data&&e.data.serverResponse&&"SetDestChannelStatus"===e.serverResponse.command)throw new Dw(Bb.CROSS_CHANNEL_FAILED_JOIN_DEST);if(e.data&&e.data.serverResponse&&"StartPacketTransfer"===e.serverResponse.command)throw new Dw(Bb.CROSS_CHANNEL_FAILED_PACKET_SENT_TO_DEST);throw e}this.prevChannelMediaConfig=e}async updateChannelMediaRelay(e){if(this.state!==Yw.RELAY_STATE_RUNNING)throw new Dw(Bb.INVALID_OPERATION);await this.sendUpdateMessage(e),this.prevChannelMediaConfig=e}async setVideoProfile(e){if(this._resolution=e,this.state!==Yw.RELAY_STATE_RUNNING)throw new Dw(Bb.INVALID_OPERATION);const t=this.genMessage(Gw.SetVideoProfile);await this.signal.request(t),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: setVideoProfile success"))}async stopChannelMediaRelay(){await this.sendStopRelayMessage(),$C.debug("[".concat(this.clientId,"] stopChannelMediaRelay: send stop message success")),this.state=Yw.RELAY_STATE_IDLE,this.dispose()}dispose(){$C.debug("[".concat(this.clientId,"] disposeChannelMediaRelay")),this.cancelToken.cancel(),this.cancelToken=gC.CancelToken.source(),this.state=Yw.RELAY_STATE_IDLE,this.emit("dispose"),this.signal.dispose(),this.prevChannelMediaConfig=void 0}async connect(){const e=await sL(this.joinInfo,this.cancelToken.token,this.httpRetryConfig);this.workerToken=e.workerToken,await this.signal.connect(e.addressList),this.emit("event",qw.NETWORK_CONNECTED),this.signal.on("status",this.onStatus),this.signal.on("reconnecting",this.onReconnect)}async sendStartRelayMessage(e){const t=this.genMessage(Gw.StopPacketTransfer);await this.signal.request(t),await this.signal.waitStatus("Normal Quit"),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: StopPacketTransfer success"));const i=this.genMessage(Gw.SetSdkProfile,e);await this.signal.request(i),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: SetSdkProfile success"));const n=this.genMessage(Gw.SetSourceChannel,e);await this.signal.request(n),await this.signal.waitStatus("SetSourceChannelStatus"),this.emit("event",qw.PACKET_JOINED_SRC_CHANNEL),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: SetSourceChannel success"));const r=this.genMessage(Gw.SetSourceUserId,e);await this.signal.request(r),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: SetSourceUserId success"));const s=this.genMessage(Gw.SetDestChannel,e);await this.signal.request(s),await this.signal.waitStatus("SetDestChannelStatus"),this.emit("event",qw.PACKET_JOINED_DEST_CHANNEL),$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: SetDestChannel success"));const o=this.genMessage(Gw.StartPacketTransfer,e);await this.signal.request(o),this.emit("event",qw.PACKET_SENT_TO_DEST_CHANNEL),this.state=Yw.RELAY_STATE_RUNNING,$C.debug("[".concat(this.clientId,"] startChannelMediaRelay: StartPacketTransfer success")),this.setVideoProfile(this._resolution)}async sendUpdateMessage(e){const t=this.genMessage(Gw.UpdateDestChannel,e);await this.signal.request(t),this.emit("event",qw.PACKET_UPDATE_DEST_CHANNEL),$C.debug("[".concat(this.clientId,"] sendUpdateMessage: UpdateDestChannel success"))}async sendStopRelayMessage(){const e=this.genMessage(Gw.StopPacketTransfer);await this.signal.request(e),$C.debug("[".concat(this.clientId,"] sendStopRelayMessage: StopPacketTransfer success"))}genMessage(e,t){const i=[],n=[],r=[];this.requestId+=1;const s={appId:this.joinInfo.appId,cname:this.joinInfo.cname,uid:this.joinInfo.uid.toString(),sdkVersion:IC,sid:this.sid,ts:Date.now(),requestId:this.requestId,seq:this.requestId,allocate:!0,clientRequest:{}};"4.19.1"===s.sdkVersion&&(s.sdkVersion="0.0.1");let o=null,a=null;switch(e){case Gw.SetSdkProfile:return s.clientRequest={command:"SetSdkProfile",type:"multi_channel"},s;case Gw.SetSourceChannel:if(a=t&&t.getSrcChannelMediaInfo(),!a)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find source config");return s.clientRequest={command:"SetSourceChannel",uid:"0",channelName:a.channelName,token:a.token||this.joinInfo.appId},s;case Gw.SetSourceUserId:if(a=t&&t.getSrcChannelMediaInfo(),!a)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find source config");return s.clientRequest={command:"SetSourceUserId",uid:a.uid+""},s;case Gw.SetDestChannel:if(o=t&&t.getDestChannelMediaInfo(),!o)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find dest config");return o.forEach((e=>{i.push(e.channelName),n.push(e.uid+""),r.push(e.token||this.joinInfo.appId)})),s.clientRequest={command:"SetDestChannel",channelName:i,uid:n,token:r},s;case Gw.StartPacketTransfer:return s.clientRequest={command:"StartPacketTransfer"},s;case Gw.Reconnect:return s.clientRequest={command:"Reconnect"},s;case Gw.StopPacketTransfer:return s.clientRequest={command:"StopPacketTransfer"},s;case Gw.UpdateDestChannel:if(o=t&&t.getDestChannelMediaInfo(),!o)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find dest config");return o.forEach((e=>{i.push(e.channelName),n.push(e.uid+""),r.push(e.token||this.joinInfo.appId)})),s.clientRequest={command:"UpdateDestChannel",channelName:i,uid:n,token:r},s;case Gw.SetVideoProfile:s.clientRequest={command:"SetVideoProfile",width:this._resolution.width,height:this._resolution.height}}return s}}class CL{get hasVideo(){return this._video_enabled_&&!this._video_muted_&&this._video_added_}get hasAudio(){return this._audio_enabled_&&!this._audio_muted_&&this._audio_added_}get audioTrack(){if(this.hasAudio)return this._audioTrack}get videoTrack(){if(this.hasVideo)return this._videoTrack}get dataChannels(){return this._dataChannels}constructor(e,t){oh(this,"uid",void 0),oh(this,"_uintid",void 0),oh(this,"_trust_in_room_",!0),oh(this,"_trust_audio_enabled_state_",!0),oh(this,"_trust_video_enabled_state_",!0),oh(this,"_trust_audio_mute_state_",!0),oh(this,"_trust_video_mute_state_",!0),oh(this,"_audio_muted_",!1),oh(this,"_video_muted_",!1),oh(this,"_audio_enabled_",!0),oh(this,"_video_enabled_",!0),oh(this,"_audio_added_",!1),oh(this,"_video_added_",!1),oh(this,"_trust_video_stream_added_state_",!0),oh(this,"_trust_audio_stream_added_state_",!0),oh(this,"_audioTrack",void 0),oh(this,"_videoTrack",void 0),oh(this,"_dataChannels",[]),oh(this,"_audioSSRC",void 0),oh(this,"_videoSSRC",void 0),oh(this,"_audioOrtc",void 0),oh(this,"_videoOrtc",void 0),oh(this,"_cname",void 0),oh(this,"_rtxSsrcId",void 0),this.uid=e,this._uintid=t}}var wL=tb,SL=am;Fr({target:"Promise",stat:!0,forced:!0},{withResolvers:function(){var e=SL.f(this);return{promise:e.promise,resolve:e.resolve,reject:e.reject}}});var TL=am,AL=Hg;Fr({target:"Promise",stat:!0,forced:!0},{try:function(e){var t=TL.f(this),i=AL(e);return(i.error?t.reject:t.resolve)(i.value),t.promise}});var RL=Z(wL),OL=Ha.f("asyncIterator"),IL=Z(OL);function kL(e,t){this.v=e,this.k=t}function NL(e){var t,i;function n(t,i){try{var s=e[t](i),o=s.value,a=o instanceof kL;RL.resolve(a?o.v:o).then((function(i){if(a){var c="return"===t?"return":"next";if(!o.k||i.done)return n(c,i);i=e[c](i).value}r(s.done?"return":"normal",i)}),(function(e){n("throw",e)}))}catch(e){r("throw",e)}}function r(e,r){switch(e){case"return":t.resolve({value:r,done:!0});break;case"throw":t.reject(r);break;default:t.resolve({value:r,done:!1})}(t=t.next)?n(t.key,t.arg):i=null}this._invoke=function(e,r){return new RL((function(s,o){var a={key:e,arg:r,resolve:s,reject:o,next:null};i?i=i.next=a:(t=i=a,n(e,r))}))},"function"!=typeof e.return&&(this.return=void 0)}function LL(e){return function(){return new NL(e.apply(this,arguments))}}function ML(e){return new kL(e,0)}function xL(e){var t={},i=!1;function n(t,n){return i=!0,{done:!1,value:new kL(n=new RL((function(i){i(e[t](n))})),1)}}return t[void 0!==Uu&&eh||"@@iterator"]=function(){return this},t.next=function(e){return i?(i=!1,e):n("next",e)},"function"==typeof e.throw&&(t.throw=function(e){if(i)throw i=!1,e;return n("throw",e)}),"function"==typeof e.return&&(t.return=function(e){return i?(i=!1,e):n("return",e)}),t}NL.prototype["function"==typeof Uu&&IL||"@@asyncIterator"]=function(){return this},NL.prototype.next=function(e){return this._invoke("next",e)},NL.prototype.throw=function(e){return this._invoke("throw",e)},NL.prototype.return=function(e){return this._invoke("return",e)};var DL=Z(OL),PL={exports:{}};!function(e,t){e.exports=(()=>{var e={8:(e,t,i)=>{i.r(t),i.d(t,{Parser:()=>w,Printer:()=>b,parse:()=>N,print:()=>L});const n="\n",r="".concat("\r").concat(n),s=" ";let o;function a(e){return e>="0"&&e<="9"}function c(e){return e>="!"&&e<="~"}function l(e){return c(e)||e>=""&&e<="ÿ"}function d(e){return"!"===e||e>="#"&&e<="'"||e>="*"&&e<="+"||e>="-"&&e<="."||e>="0"&&e<="9"||e>="A"&&e<="Z"||e>="^"&&e<="~"}function h(e){return e>="1"&&e<="9"}function u(e){return e>="A"&&e<="Z"||e>="a"&&e<="z"}function p(e){return"d"===e||"h"===e||"m"===e||"s"===e}function f(e){return e>""&&e<"\t"||e>"\v"&&e<"\f"||e>""&&e<"ÿ"}function m(e){return u(e)||a(e)||"+"===e||"/"===e}function v(e){return a(e)||u(e)||"+"===e||"/"===e||"-"===e||"_"===e}function _(e){return u(e)||a(e)||"+"===e||"/"===e}function g(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function y(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?g(Object(i),!0).forEach((function(t){E(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):g(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function E(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}!function(e){e.VERSION="v",e.ORIGIN="o",e.SESSION_NAME="s",e.INFORMATION="i",e.URI="u",e.EMAIL="e",e.PHONE="p",e.CONNECTION="c",e.BANDWIDTH="b",e.TIME="t",e.REPEAT="r",e.ZONE_ADJUSTMENTS="z",e.KEY="k",e.ATTRIBUTE="a",e.MEDIA="m"}(o||(o={}));class C{consumeText(e,t){let i=t;for(;i<e.length;){const t=e[i];if("\0"===t||"\r"===t||t===n)break;i+=1}if(i-t==0)throw new Error("Invalid text, at ".concat(e));return i}consumeUnicastAddress(e,t,i){return this.consumeTill(e,t,s)}consumeOneOrMore(e,t,i){let n=t;for(;i(e[n]);)n++;if(n-t==0)throw new Error("Invalid rule at ".concat(t,"."));return n}consumeSpace(e,t){if(e[t]===s)return t+1;throw new Error("Invalid space at ".concat(t,"."))}consumeIP4Address(e,t){let i=t;for(let t=0;t<4;t++)if(i=this.consumeDecimalUChar(e,i),3!==t){if("."!==e[i])throw new Error("Invalid IP4 address.");i++}return i}consumeDecimalUChar(e,t){let i=t;for(let t=0;t<3&&a(e[i]);t++,i++);if(i-t==0)throw new Error("Invalid decimal uchar.");const n=parseInt(e.slice(t,i));if(n>=0&&n<=255)return i;throw new Error("Invalid decimal uchar")}consumeIP6Address(e,t){let i=this.consumeHexpart(e,t);return":"===e[i]?(i+=1,i=this.consumeIP4Address(e,i),i):i}consumeHexpart(e,t){let i=t;if(":"===e[i]&&":"===e[i+1]){i+=2;try{i=this.consumeHexseq(e,i)}catch(e){}return i}if(i=this.consumeHexseq(e,i),":"===e[i]&&":"===e[i+1]){i+=2;try{i=this.consumeHexseq(e,i)}catch(e){}return i}return i}consumeHexseq(e,t){let i=t;for(;i=this.consumeHex4(e,i),":"===e[i]&&":"!==e[i+1];)i+=1;return i}consumeHex4(e,t){let i=0;for(;i<4;i++)if(!((n=e[t+i])>="0"&&n<="9"||n>="a"&&n<="f"||n>="A"&&n<="F")){if(0===i)throw new Error("Invalid hex 4");break}var n;return t+i}consumeFQDN(e,t){let i=t;for(;a(e[i])||u(e[i])||"-"===e[i]||"."===e[i];)i+=1;if(i-t<4)throw new Error("Invalid FQDN");return i}consumeExtnAddr(e,t){return this.consumeOneOrMore(e,t,l)}consumeMulticastAddress(e,t,i){switch(i){case"IP4":case"ip4":return this.consumeIP4MulticastAddress(e,t);case"IP6":case"ip6":return this.consumeIP6MulticastAddress(e,t);default:try{return this.consumeFQDN(e,t)}catch(i){return this.consumeExtnAddr(e,t)}}}consumeIP6MulticastAddress(e,t){const i=this.consumeHexpart(e,t);return"/"===e[i]?this.consumeInteger(e,i+1):i}consumeIP4MulticastAddress(e,t){let i=t+3;const n=e.slice(t,i),r=parseInt(n);if(r<224||r>239)throw new Error("Invalid IP4 multicast address, IPv4 multicast addresses may be in the range 224.0.0.0 to 239.255.255.255.");for(let t=0;t<3;t++){if("."!==e[i])throw new Error("Invalid IP4 multicast address.");i+=1,i=this.consumeDecimalUChar(e,i)}return"/"===e[i]&&(i+=1),i=this.consumeTTL(e,i),"/"===e[i]&&(i=this.consumeInteger(e,i)),i}consumeInteger(e,t){if(!h(e[t]))throw new Error("Invalid integer.");for(t+=1;a(e[t]);)t+=1;return t}consumeTTL(e,t){if("0"===e[t])return t+1;if(!h(e[t]))throw new Error("Invalid TTL.");t+=1;for(let i=0;i<2&&a(e[t]);i++)t+=1;return t}consumeToken(e,t){return this.consumeOneOrMore(e,t,d)}consumeTime(e,t){let i=t;if("0"===e[i])return i+1;for(h(e[i])&&(i+=1);a(e[i]);)i++;if(i-t<10)throw new Error("Invalid time");return i}consumeAddress(e,t){return this.consumeTill(e,t,s)}consumeTypedTime(e,t){let i=t;return i=this.consumeOneOrMore(e,i,a),p(e[i])?i+1:i}consumeRepeatInterval(e,t){if(!h(e[t]))throw new Error("Invalid repeat interval");for(t+=1;a(e[t]);)t+=1;return p(e[t])&&(t+=1),t}consumePort(e,t){return this.consumeOneOrMore(e,t,a)}consume(e,t,i){for(let n=0;n<i.length;n++){if(t+n>=e.length)throw new Error("consume exceeding value length");if(e[t+n]!==i[n])throw new Error("consume ".concat(i," failed at ").concat(n))}return t+i.length}consumeTill(e,t,i){let n=t;for(;n<e.length&&("string"!=typeof i||e[n]!==i)&&("function"!=typeof i||!i(e[n]));)n++;return n}}class w extends C{constructor(){super(),E(this,"records",[]),E(this,"currentLine",0)}parse(e){const t=this.probeEOL(e);this.records=e.split(t).filter((e=>!!e.trim())).map(this.parseLine),this.currentLine=0;const i=this.parseVersion(),n=this.parseOrigin(),r=this.parseSessionName(),s=this.parseInformation(),o=this.parseUri(),a=this.parseEmail(),c=this.parsePhone(),l=this.parseConnection(),d=this.parseBandWidth(),h=this.parseTimeFields(),u=this.parseKey(),p=this.parseSessionAttribute(),f=this.parseMediaDescription();if(this.currentLine!==this.records.length)throw new Error("parsing failed, non exhaustive sdp lines.");return{version:i,origin:n,sessionName:r,information:s,uri:o,emails:a,phones:c,connection:l,bandwidths:d,timeFields:h,key:u,attributes:p,mediaDescriptions:f}}getCurrentRecord(){const e=this.records[this.currentLine];if(!e)throw new Error("Record doesn't exit.");return e}probeEOL(e){for(let t=0;t<e.length;t++)if(e[t]===n)return"\r"===e[t-1]?r:n;throw new Error("Invalid newline character.")}parseLine(e,t){if(e.length<2)throw new Error("Invalid sdp line, sdp line should be of form <type>=<value>.");const i=e[0];if("="!==e[1])throw new Error('Invalid sdp line, <type> should be a single character followed by an "=" sign.');return{type:i,value:e.slice(2),line:t,cur:0}}parseSessionAttribute(){const e=new T;for(;this.currentLine<this.records.length;){const t=this.getCurrentRecord();if(t.type!==o.ATTRIBUTE)break;const i={attField:this.extractOneOrMore(t,(e=>d(e)&&":"!==e)),_cur:0};":"===t.value[t.cur]&&(t.cur+=1,i.attValue=this.extractOneOrMore(t,f)),e.parse(i),this.currentLine++}return e.digest()}parseMediaAttributes(e){const t=new A(e);for(;this.currentLine<this.records.length;){const e=this.getCurrentRecord();if(e.type!==o.ATTRIBUTE)break;const i={attField:this.extractOneOrMore(e,(e=>d(e)&&":"!==e)),_cur:0};":"===e.value[e.cur]&&(e.cur+=1,i.attValue=this.extractOneOrMore(e,f)),t.parse(i),this.currentLine++}return t.digest()}parseKey(){const e=this.getCurrentRecord();if(e.type===o.KEY){if("prompt"===e.value||"clear:"===e.value||"base64:"===e.value||"uri:"===e.value)return e.value;throw this.currentLine++,new Error("Invalid key.")}}parseZone(){const e=this.getCurrentRecord();if(e.type===o.ZONE_ADJUSTMENTS){const t=[];for(;;)try{const i=this.extract(e,this.consumeTime);this.consumeSpaceForRecord(e);let n=!1;"-"===e.value[e.cur]&&(n=!0,e.cur+=1);const r=this.extract(e,this.consumeTypedTime);t.push({time:i,typedTime:r,back:n})}catch(e){break}if(0===t.length)throw new Error("Invalid zone adjustments");return this.currentLine++,t}return[]}parseRepeat(){const e=[];for(;;){const t=this.getCurrentRecord();if(t.type!==o.REPEAT)break;{const i=this.extract(t,this.consumeRepeatInterval),n=this.parseTypedTime(t);e.push({repeatInterval:i,typedTimes:n}),this.currentLine++}}return e}parseTypedTime(e){const t=[];for(;;)try{this.consumeSpaceForRecord(e),t.push(this.extract(e,this.consumeTypedTime))}catch(e){break}if(0===t.length)throw new Error("Invalid typed time.");return t}parseTime(){const e=this.getCurrentRecord(),t=this.extract(e,this.consumeTime);this.consumeSpaceForRecord(e);const i=this.extract(e,this.consumeTime);return this.currentLine++,{startTime:t,stopTime:i}}parseBandWidth(){const e=[];for(;this.currentLine<this.records.length;){const t=this.getCurrentRecord();if(t.type!==o.BANDWIDTH)break;{const i=this.extractOneOrMore(t,d);if(":"!==t.value[t.cur])throw new Error("Invalid bandwidth field.");t.cur++;const n=this.extractOneOrMore(t,a);e.push({bwtype:i,bandwidth:n}),this.currentLine++}}return e}parseVersion(){const e=this.getCurrentRecord();if(e.type!==o.VERSION)throw new Error("first sdp record must be version");const t=e.value.slice(0,this.consumeOneOrMore(e.value,0,a));if(t.length!==e.value.length)throw new Error('invalid proto version, "v='.concat(e.value,'"'));return this.currentLine++,t}parseOrigin(){const e=this.getCurrentRecord();if(e.type!==o.ORIGIN)throw new Error("second line of sdp must be origin");const t=this.extractOneOrMore(e,l);this.consumeSpaceForRecord(e);const i=this.extractOneOrMore(e,a);this.consumeSpaceForRecord(e);const n=this.extractOneOrMore(e,a);this.consumeSpaceForRecord(e);const r=this.extractOneOrMore(e,d);this.consumeSpaceForRecord(e);const s=this.extractOneOrMore(e,d);this.consumeSpaceForRecord(e);const c=this.extract(e,this.consumeUnicastAddress);return this.currentLine++,{username:t,sessId:i,sessVersion:n,nettype:r,addrtype:s,unicastAddress:c}}parseSessionName(){const e=this.getCurrentRecord();if(e.type===o.SESSION_NAME){const t=this.extract(e,this.consumeText);return this.currentLine++,t}}parseInformation(){const e=this.getCurrentRecord();if(e.type!==o.INFORMATION)return;const t=this.extract(e,this.consumeText);return this.currentLine++,t}parseUri(){const e=this.getCurrentRecord();if(e.type===o.URI)return this.currentLine++,e.value}parseEmail(){const e=[];for(;;){const t=this.getCurrentRecord();if(t.type!==o.EMAIL)break;e.push(t.value),this.currentLine++}return e}parsePhone(){const e=[];for(;;){const t=this.getCurrentRecord();if(t.type!==o.PHONE)break;e.push(t.value),this.currentLine++}return e}parseConnection(){const e=this.getCurrentRecord();if(e.type===o.CONNECTION){const t=this.extractOneOrMore(e,d);this.consumeSpaceForRecord(e);const i=this.extractOneOrMore(e,d);this.consumeSpaceForRecord(e);const n=this.extract(e,this.consumeAddress);return this.currentLine++,{nettype:t,addrtype:i,address:n}}}parseMedia(){const e=this.getCurrentRecord(),t=this.extract(e,this.consumeToken);this.consumeSpaceForRecord(e);let i=this.extract(e,this.consumePort);"/"===e.value[e.cur]&&(e.cur+=1,i+=this.extract(e,this.consumeInteger)),this.consumeSpaceForRecord(e);const n=[];for(n.push(this.extract(e,this.consumeToken));"/"===e.value[e.cur];)e.cur+=1,n.push(this.extract(e,this.consumeToken));if(0===n.length)throw new Error("Invalid proto");const r=this.parseFmt(e);return this.currentLine++,{mediaType:t,port:i,protos:n,fmts:r}}parseTimeFields(){const e=[];for(;this.getCurrentRecord().type===o.TIME;){const t=this.parseTime(),i=this.parseRepeat(),n=this.parseZone();e.push({time:t,repeats:i,zones:n})}return e}parseMediaDescription(){const e=[];for(;this.currentLine<this.records.length&&this.getCurrentRecord().type===o.MEDIA;){const t=this.parseMedia(),i=this.parseInformation(),n=this.parseConnections(),r=this.parseBandWidth(),s=this.parseKey(),o=this.parseMediaAttributes(t);e.push({media:t,information:i,connections:n,bandwidths:r,key:s,attributes:o})}return e}parseConnections(){const e=[];for(;this.currentLine<this.records.length&&this.getCurrentRecord().type===o.CONNECTION;)e.push(this.parseConnection());return e}parseFmt(e){const t=[];for(;;)try{this.consumeSpaceForRecord(e),t.push(this.extract(e,this.consumeToken))}catch(e){break}if(0===t.length)throw new Error("Invalid fmts");return t}extract(e,t,...i){const n=t.call(this,e.value,e.cur,...i),r=e.value.slice(e.cur,n);return e.cur=n,r}extractOneOrMore(e,t){const i=this.consumeOneOrMore(e.value,e.cur,t),n=e.value.slice(e.cur,i);return e.cur=i,n}consumeSpaceForRecord(e){if(e.value[e.cur]!==s)throw new Error("Invalid space at ".concat(e.cur,"."));e.cur+=1}}class S extends C{constructor(...e){super(...e),E(this,"attributes",void 0),E(this,"digested",!1)}extractOneOrMore(e,t,i){const n=this.consumeOneOrMore(e.attValue,e._cur,t),r=e.attValue.slice(e._cur,n),[s,o]=i||[];if("number"==typeof s&&r.length<s)throw new Error("error in length, should be more or equal than ".concat(s," characters."));if("number"==typeof o&&r.length>o)throw new Error("error in length, should be less or equal than ".concat(o," characters."));return e._cur=n,r}consumeAttributeSpace(e){if(e.attValue[e._cur]!==s)throw new Error("Invalid space at ".concat(e._cur,"."));e._cur+=1}extract(e,t,...i){if(!e.attValue)throw new Error("Nothing to extract from attValue.");const n=t.call(this,e.attValue,e._cur,...i),r=e.attValue.slice(e._cur,n);return e._cur=n,r}atEnd(e){if(!e.attValue)throw new Error;return e._cur>=e.attValue.length}peekChar(e){if(!e.attValue)throw new Error;return e.attValue[e._cur]}peek(e,t){if(!e.attValue)throw new Error;for(let i=0;i<t.length;i++)if(t[i]!==e.attValue[e._cur+i])return!1;return!0}parseIceUfrag(e){if(this.attributes.iceUfrag)throw new Error("Invalid ice-ufrag, should be only a single line if 'a=ice-ufrag'");this.attributes.iceUfrag=this.extractOneOrMore(e,m,[4,256])}parseIcePwd(e){if(this.attributes.icePwd)throw new Error("Invalid ice-pwd, should be only a single line if 'a=ice-pwd'");this.attributes.icePwd=this.extractOneOrMore(e,m,[22,256])}parseIceOptions(e){if(this.attributes.iceOptions)throw new Error("Invalid ice-options, should be only one 'ice-options' line");const t=[];for(;!this.atEnd(e);){t.push(this.extractOneOrMore(e,m));try{this.consumeAttributeSpace(e)}catch(t){if(this.atEnd(e))break;throw t}}this.attributes.iceOptions=t}parseFingerprint(e){const t=this.extract(e,this.consumeToken);this.consumeAttributeSpace(e);const i=this.extract(e,this.consumeTill);this.attributes.fingerprints.push({hashFunction:t,fingerprint:i})}parseExtmap(e){const t=this.extractOneOrMore(e,a);let i;"/"===this.peekChar(e)&&(this.extract(e,this.consume,"/"),i=this.extract(e,this.consumeToken)),this.consumeAttributeSpace(e);const n=this.extract(e,this.consumeTill,s),r=y(y({entry:parseInt(t,10)},i&&{direction:i}),{},{extensionName:n});this.peekChar(e)===s&&(this.consumeAttributeSpace(e),r.extensionAttributes=this.extract(e,this.consumeTill)),this.attributes.extmaps.push(r)}parseSetup(e){if(this.attributes.setup)throw new Error("must only be one single 'a=setup' line.");const t=this.extract(e,this.consumeTill);if("active"!==t&&"passive"!==t&&"actpass"!==t&&"holdconn"!==t)throw new Error("role must be one of 'active', 'passive', 'actpass', 'holdconn'.");this.attributes.setup=t}}class T extends S{constructor(...e){super(...e),E(this,"attributes",{unrecognized:[],groups:[],extmaps:[],fingerprints:[],identities:[]})}parse(e){if(this.digested)throw new Error("already digested");try{switch(e.attField){case"group":this.parseGroup(e);break;case"ice-lite":this.parseIceLite();break;case"ice-ufrag":this.parseIceUfrag(e);break;case"ice-pwd":this.parseIcePwd(e);break;case"ice-options":this.parseIceOptions(e);break;case"fingerprint":this.parseFingerprint(e);break;case"setup":this.parseSetup(e);break;case"tls-id":this.parseTlsId(e);break;case"identity":this.parseIdentity(e);break;case"extmap":this.parseExtmap(e);break;case"msid-semantic":this.parseMsidSemantic(e);break;default:e.ignored=!0,this.attributes.unrecognized.push(e)}}catch(t){throw console.error("parsing session attribute ".concat(e.attField,' error, "a=').concat(e.attField,":").concat(e.attValue,'"')),t}if(!e.ignored&&e.attValue&&!this.atEnd(e))throw new Error("attribute parsing error")}digest(){return this.digested=!0,this.attributes}parseGroup(e){const t=this.extract(e,this.consumeToken),i=[];for(;!this.atEnd(e)&&this.peekChar(e)===s;)this.consumeAttributeSpace(e),i.push(this.extract(e,this.consumeToken));this.attributes.groups.push({semantic:t,identificationTag:i})}parseIceLite(){if(this.attributes.iceLite)throw new Error("Invalid ice-lite, should be only a single line of 'a=ice-lite'");this.attributes.iceLite=!0}parseTlsId(e){if(this.attributes.tlsId)throw new Error("must be only one tld-id line");this.attributes.tlsId=this.extractOneOrMore(e,v)}parseIdentity(e){const t=this.extractOneOrMore(e,_),i=[];for(;!this.atEnd(e)&&this.peekChar(e)===s;){this.consumeAttributeSpace(e);const t=this.extract(e,this.consumeToken);this.extract(e,this.consume,"=");const n=this.extractOneOrMore(e,(e=>e!==s&&f(e)));i.push({name:t,value:n})}this.attributes.identities.push({assertionValue:t,extensions:i})}parseMsidSemantic(e){this.peekChar(e)===s&&this.consumeAttributeSpace(e);const t={semantic:this.extract(e,this.consumeToken),identifierList:[]};for(;;){try{this.consumeAttributeSpace(e)}catch(e){break}if("*"===this.peekChar(e)){this.extract(e,this.consume,"*"),t.applyForAll=!0;break}{const i=this.extract(e,this.consumeTill,s);t.identifierList.push(i)}}this.attributes.msidSemantic=t}}class A extends S{constructor(e){super(),E(this,"attributes",void 0),-1!==e.protos.indexOf("RTP")||e.protos.indexOf("rtp"),this.attributes={unrecognized:[],candidates:[],extmaps:[],fingerprints:[],imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:[],ssrcGroups:[],rtcpFeedbackWildcards:[],payloads:[]}}parse(e){if(this.digested)throw new Error("already digested");try{switch(e.attField){case"extmap":this.parseExtmap(e);break;case"setup":this.parseSetup(e);break;case"ice-ufrag":this.parseIceUfrag(e);break;case"ice-pwd":this.parseIcePwd(e);break;case"ice-options":this.parseIceOptions(e);break;case"candidate":this.parseCandidate(e);break;case"remote-candidate":this.parseRemoteCandidate(e);break;case"end-of-candidates":this.parseEndOfCandidates();break;case"fingerprint":this.parseFingerprint(e);break;case"rtpmap":this.parseRtpmap(e);break;case"ptime":this.parsePtime(e);break;case"maxptime":this.parseMaxPtime(e);break;case"sendrecv":case"recvonly":case"sendonly":case"inactive":this.parseDirection(e);break;case"ssrc":this.parseSSRC(e);break;case"fmtp":this.parseFmtp(e);break;case"rtcp-fb":this.parseRtcpFb(e);break;case"rtcp-mux":this.parseRTCPMux();break;case"rtcp-mux-only":this.parseRTCPMuxOnly();break;case"rtcp-rsize":this.parseRTCPRsize();break;case"rtcp":this.parseRTCP(e);break;case"mid":this.parseMid(e);break;case"msid":this.parseMsid(e);break;case"imageattr":this.parseImageAttr(e);break;case"rid":this.parseRid(e);break;case"simulcast":this.parseSimulcast(e);break;case"sctp-port":this.parseSctpPort(e);break;case"max-message-size":this.parseMaxMessageSize(e);break;case"ssrc-group":this.parseSSRCGroup(e);break;default:e.ignored=!0,this.attributes.unrecognized.push(e)}}catch(t){throw console.error("parsing media attribute ".concat(e.attField,' error, "a=').concat(e.attField,":").concat(e.attValue,'"')),t}if(!e.ignored&&e.attValue&&!this.atEnd(e))throw new Error("attribute parsing error")}parseCandidate(e){const t=this.extractOneOrMore(e,m,[1,32]);this.consumeAttributeSpace(e);const i=this.extractOneOrMore(e,a,[1,5]);this.consumeAttributeSpace(e);const n=this.extract(e,this.consumeToken);this.consumeAttributeSpace(e);const r=this.extractOneOrMore(e,a,[1,10]);this.consumeAttributeSpace(e);const o=this.extract(e,this.consumeAddress);this.consumeAttributeSpace(e);const l=this.extract(e,this.consumePort);this.consumeAttributeSpace(e),this.extract(e,this.consume,"typ"),this.consumeAttributeSpace(e);const d={foundation:t,componentId:i,transport:n,priority:r,connectionAddress:o,port:l,type:this.extract(e,this.consumeToken),extension:{}};for(this.peek(e," raddr")&&(this.extract(e,this.consume," raddr"),this.consumeAttributeSpace(e),d.relAddr=this.extract(e,this.consumeAddress)),this.peek(e," rport")&&(this.extract(e,this.consume," rport"),this.consumeAttributeSpace(e),d.relPort=this.extract(e,this.consumePort));this.peekChar(e)===s;){this.consumeAttributeSpace(e);const t=this.extract(e,this.consumeToken);this.consumeAttributeSpace(e),d.extension[t]=this.extractOneOrMore(e,c)}this.attributes.candidates.push(d)}parseRemoteCandidate(e){const t=[];for(;;){const i=this.extractOneOrMore(e,a,[1,5]);this.consumeAttributeSpace(e);const n=this.extract(e,this.consumeAddress);this.consumeAttributeSpace(e);const r=this.extract(e,this.consumePort);t.push({componentId:i,connectionAddress:n,port:r});try{this.consumeAttributeSpace(e)}catch(e){break}}this.attributes.remoteCandidatesList.push(t)}parseEndOfCandidates(){if(this.attributes.endOfCandidates)throw new Error("must be only one line of end-of-candidates");this.attributes.endOfCandidates=!0}parseRtpmap(e){const t=this.extract(e,this.consumeToken);this.consumeAttributeSpace(e);const i=this.extract(e,this.consumeTill,"/");this.extract(e,this.consume,"/");const n={encodingName:i,clockRate:this.extractOneOrMore(e,a)};this.atEnd(e)||"/"!==this.peekChar(e)||(this.extract(e,this.consume,"/"),n.encodingParameters=parseInt(this.extract(e,this.consumeTill),10));const r=this.attributes.payloads.find((e=>e.payloadType===parseInt(t,10)));r?r.rtpMap=n:this.attributes.payloads.push({payloadType:parseInt(t,10),rtpMap:n,rtcpFeedbacks:[]})}parsePtime(e){if(this.attributes.ptime)throw new Error("must be only one line of ptime");this.attributes.ptime=this.extract(e,this.consumeTill)}parseMaxPtime(e){if(this.attributes.maxPtime)throw new Error("must be only one line of ptime");this.attributes.maxPtime=this.extract(e,this.consumeTill)}parseDirection(e){if(this.attributes.direction)throw new Error("must be only one line of direction info");this.attributes.direction=e.attField}parseSSRC(e){const t=this.extractOneOrMore(e,a);this.consumeAttributeSpace(e);const i=this.extract(e,this.consumeTill,":");let n;":"===this.peekChar(e)&&(this.extract(e,this.consume,":"),n=this.extract(e,this.consumeTill));const r=this.attributes.ssrcs.find((e=>e.ssrcId===parseInt(t,10)));r?r.attributes[i]=n:this.attributes.ssrcs.push({ssrcId:parseInt(t,10),attributes:{[i]:n}})}parseFmtp(e){const t=this.extract(e,this.consumeTill,s);this.consumeAttributeSpace(e);const i=this.extract(e,this.consumeTill),n={};i.split(";").forEach((e=>{let[t,i]=e.split("=");t=t.trim();const r="string"==typeof i?i.trim():null;"string"==typeof t&&t.length>0&&(n[t]=r)}));const r=this.attributes.payloads.find((e=>e.payloadType===parseInt(t,10)));r?r.fmtp={parameters:n}:this.attributes.payloads.push({payloadType:parseInt(t,10),rtcpFeedbacks:[],fmtp:{parameters:n}})}parseFmtParameters(e){const t={},i=this.extract(e,this.consumeTill,"=");e._cur++;const n=this.extract(e,this.consumeTill,";");for(t[i]=n;";"===e.attValue[e._cur];){const i=this.extract(e,this.consumeTill,"=");e._cur++;const n=this.extract(e,this.consumeTill,";");t[i]=n}return t}parseRtcpFb(e){let t="";t="*"===this.peekChar(e)?this.extract(e,this.consume,"*"):this.extract(e,this.consumeTill,s),this.consumeAttributeSpace(e);const i=this.extract(e,this.consumeTill,s);let n;if("trr-int"===i)n={type:i,interval:this.extract(e,this.consumeTill)};else{const t={type:i};this.peekChar(e)===s&&(this.consumeAttributeSpace(e),t.parameter=this.extract(e,this.consumeToken),this.peekChar(e)===s&&(t.additional=this.extract(e,this.consumeTill))),n=t}if("*"===t)this.attributes.rtcpFeedbackWildcards.push(n);else{const e=this.attributes.payloads.find((e=>e.payloadType===parseInt(t,10)));e?e.rtcpFeedbacks.push(n):this.attributes.payloads.push({payloadType:parseInt(t,10),rtcpFeedbacks:[n]})}}parseRTCPMux(){if(this.attributes.rtcpMux)throw new Error("must be single line of rtcp-mux");this.attributes.rtcpMux=!0}parseRTCPMuxOnly(){if(this.attributes.rtcpMuxOnly)throw new Error("must be single line of rtcp-only");this.attributes.rtcpMuxOnly=!0}parseRTCPRsize(){if(this.attributes.rtcpRsize)throw new Error("must be single line of rtcp-rsize");this.attributes.rtcpRsize=!0}parseRTCP(e){if(this.attributes.rtcp)throw new Error("must be single line of rtcp");const t={port:this.extract(e,this.consumePort)};this.peekChar(e)===s&&(this.consumeAttributeSpace(e),t.netType=this.extractOneOrMore(e,d),this.consumeAttributeSpace(e),t.addressType=this.extractOneOrMore(e,d),this.consumeAttributeSpace(e),t.address=this.extract(e,this.consumeAddress)),this.attributes.rtcp=t}parseMsid(e){const t={id:this.extractOneOrMore(e,d,[1,64])};this.peekChar(e)===s&&(this.consumeAttributeSpace(e),t.appdata=this.extractOneOrMore(e,d,[1,64])),this.attributes.msids.push(t)}parseImageAttr(e){this.attributes.imageattr.push(e.attValue)}parseRid(e){const t=this.extractOneOrMore(e,(e=>u(e)||a(e)||"_"===e||"-"===e));this.consumeAttributeSpace(e);const i={id:t,direction:this.extract(e,this.consumeToken),params:[]};if(this.peekChar(e)===s){if(this.consumeAttributeSpace(e),this.peek(e,"pt=")){this.extract(e,this.consume,"pt=");const t=[];for(;;){const i=this.extract(e,this.consumeToken);t.push(i);try{this.extract(e,this.consume,",")}catch(e){break}}i.payloads=t,this.peekChar(e)===s&&this.extract(e,this.consume,s)}for(;;){const t=this.extract(e,this.consumeToken);switch(t){case"depend":{const n={type:t,rids:this.extract(e,this.consume,"=").split(",")};i.params.push(n);break}default:{const n={type:t};"="===this.peekChar(e)&&(this.extract(e,this.consume,"="),n.val=this.extract(e,this.consumeTill,";")),i.params.push(n)}}try{this.extract(e,this.consume,";")}catch(e){break}}}this.attributes.rids.push(i)}parseSimulcast(e){if(this.attributes.simulcast)throw new Error("must be single line of simulcast");this.attributes.simulcast=e.attValue,this.extract(e,this.consumeTill)}parseSctpPort(e){this.attributes.sctpPort=this.extractOneOrMore(e,a,[1,5])}parseMaxMessageSize(e){this.attributes.maxMessageSize=this.extractOneOrMore(e,a,[1,void 0])}digest(){return this.digested=!0,this.attributes}parseMid(e){this.attributes.mid=this.extract(e,this.consumeToken)}parseSSRCGroup(e){const t=this.extract(e,this.consumeToken),i=[];for(;;)try{this.consumeAttributeSpace(e);const t=this.extract(e,this.consumeInteger);i.push(parseInt(t,10))}catch(e){break}this.attributes.ssrcGroups.push({semantic:t,ssrcIds:i})}}function R(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}class b{constructor(){R(this,"eol",r)}print(e,t){let i="";return t&&(this.eol=t),i+=this.printVersion(e.version),i+=this.printOrigin(e.origin),i+=this.printSessionName(e.sessionName),i+=this.printInformation(e.information),i+=this.printUri(e.uri),i+=this.printEmail(e.emails),i+=this.printPhone(e.phones),i+=this.printConnection(e.connection),i+=this.printBandwidth(e.bandwidths),i+=this.printTimeFields(e.timeFields),i+=this.printKey(e.key),i+=this.printSessionAttributes(e.attributes),i+=this.printMediaDescription(e.mediaDescriptions),i}printVersion(e){return"v=".concat(e).concat(this.eol)}printOrigin(e){return"o=".concat(e.username," ").concat(e.sessId," ").concat(e.sessVersion," ").concat(e.nettype," ").concat(e.addrtype," ").concat(e.unicastAddress).concat(this.eol)}printSessionName(e){return e?"s=".concat(e).concat(this.eol):""}printInformation(e){return e?"i=".concat(e).concat(this.eol):""}printUri(e){return e?"u=".concat(e).concat(this.eol):""}printEmail(e){let t="";for(const i of e)t+="e=".concat(i).concat(this.eol);return t}printPhone(e){let t="";for(const i of e)t+="e=".concat(i).concat(this.eol);return t}printConnection(e){return e?"c=".concat(e.nettype," ").concat(e.addrtype," ").concat(e.address).concat(this.eol):""}printBandwidth(e){let t="";for(const i of e)t+="b=".concat(i.bwtype,":").concat(i.bandwidth).concat(this.eol);return t}printTimeFields(e){let t="";for(const i of e){t+="t=".concat(i.time.startTime," ").concat(i.time.startTime).concat(this.eol);for(const e of i.repeats)t+="r=".concat(e.repeatInterval," ").concat(e.typedTimes.join(" ")).concat(this.eol);i.zoneAdjustments&&(t+="z=",t+="z=".concat(i.zoneAdjustments.map((e=>"".concat(e.time," ").concat(e.back?"-":""," ").concat(e.typedTime))).join(" ")).concat(this.eol),t+=this.eol)}return t}printKey(e){return e?"k=".concat(e).concat(this.eol):""}printAttributes(e){let t="";for(const i of e)t+="a=".concat(i.attField).concat(i.attValue?":".concat(i.attValue):"").concat(this.eol);return t}printMediaDescription(e){let t="";for(const i of e)t+=this.printMedia(i.media),t+=this.printInformation(i.information),t+=this.printConnections(i.connections),t+=this.printBandwidth(i.bandwidths),t+=this.printKey(i.key),t+=this.printMediaAttributes(i);return t}printConnections(e){let t="";for(const i of e)t+=this.printConnection(i);return t}printMedia(e){return"m=".concat(e.mediaType," ").concat(e.port," ").concat(e.protos.join("/")," ").concat(e.fmts.join(" ")).concat(this.eol)}printSessionAttributes(e){return new I(this.eol).print(e)}printMediaAttributes(e){return new k(this.eol).print(e)}}class O{constructor(e){R(this,"eol",void 0),this.eol=e}printIceUfrag(e){return void 0===e?"":"a=ice-ufrag:".concat(e).concat(this.eol)}printIcePwd(e){return void 0===e?"":"a=ice-pwd:".concat(e).concat(this.eol)}printIceOptions(e){return void 0===e?"":"a=ice-options:".concat(e.join(s)).concat(this.eol)}printFingerprints(e){return e.length>0?e.map((e=>"a=fingerprint:".concat(e.hashFunction).concat(s).concat(e.fingerprint))).join(this.eol)+this.eol:""}printExtmap(e){return e.map((e=>"a=extmap:".concat(e.entry).concat(e.direction?"/".concat(e.direction):"").concat(s).concat(e.extensionName).concat(e.extensionAttributes?"".concat(s).concat(e.extensionAttributes):"").concat(this.eol))).join("")}printSetup(e){return void 0===e?"":"a=setup:".concat(e).concat(this.eol)}printUnrecognized(e){return e.map((e=>"a=".concat(e.attField).concat(e.attValue?":".concat(e.attValue):"").concat(this.eol))).join("")}}class I extends O{print(e){let t="";return t+=this.printGroups(e.groups),t+=this.printMsidSemantic(e.msidSemantic),t+=this.printIceLite(e.iceLite),t+=this.printIceUfrag(e.iceUfrag),t+=this.printIcePwd(e.icePwd),t+=this.printIceOptions(e.iceOptions),t+=this.printFingerprints(e.fingerprints),t+=this.printSetup(e.setup),t+=this.printTlsId(e.tlsId),t+=this.printIdentity(e.identities),t+=this.printExtmap(e.extmaps),t+=this.printUnrecognized(e.unrecognized),t}printGroups(e){let t="";return e.length>0&&(t+=e.map((e=>"a=group:".concat(e.semantic).concat(e.identificationTag.map((e=>"".concat(s).concat(e))).join("")).concat(this.eol))).join("")),t}printIceLite(e){return void 0===e?"":"a=ice-lite"+this.eol}printTlsId(e){return e?"a=tls-id:".concat(e).concat(this.eol):""}printIdentity(e){return 0===e.length?"":e.map((e=>"a=identity:".concat(e.assertionValue).concat(e.extensions.map((e=>"".concat(s).concat(e.name).concat(e.value?"=".concat(e.value):"")))))).join(this.eol)+this.eol}printMsidSemantic(e){if(!e)return"";let t="a=msid-semantic:".concat(e.semantic);return e.applyForAll?t+="".concat(s,"*"):e.identifierList.length>0&&(t+=e.identifierList.map((e=>"".concat(s).concat(e)))),t+this.eol}}class k extends O{print(e){const t=e.attributes;let i="";return i+=this.printRTCP(t.rtcp),i+=this.printIceUfrag(t.iceUfrag),i+=this.printIcePwd(t.icePwd),i+=this.printIceOptions(t.iceOptions),i+=this.printCandidates(t.candidates),i+=this.printRemoteCandidatesList(t.remoteCandidatesList),i+=this.printEndOfCandidates(t.endOfCandidates),i+=this.printFingerprints(t.fingerprints),i+=this.printSetup(t.setup),i+=this.printMid(t.mid),i+=this.printExtmap(t.extmaps),i+=this.printRTPRelated(t),i+=this.printPtime(t.ptime),i+=this.printMaxPtime(t.maxPtime),i+=this.printDirection(t.direction),i+=this.printSSRCGroups(t.ssrcGroups),i+=this.printSSRC(t.ssrcs),i+=this.printRTCPMux(t.rtcpMux),i+=this.printRTCPMuxOnly(t.rtcpMuxOnly),i+=this.printRTCPRsize(t.rtcpRsize),i+=this.printMSId(t.msids),i+=this.printImageattr(t.imageattr),i+=this.printRid(t.rids),i+=this.printSimulcast(t.simulcast),i+=this.printSCTPPort(t.sctpPort),i+=this.printMaxMessageSize(t.maxMessageSize),i+=this.printUnrecognized(t.unrecognized),i}printCandidates(e){return e.map((e=>"a=candidate:".concat(e.foundation).concat(s).concat(e.componentId).concat(s).concat(e.transport).concat(s).concat(e.priority).concat(s).concat(e.connectionAddress).concat(s).concat(e.port).concat(s,"typ").concat(s).concat(e.type).concat(e.relAddr?"".concat(s,"raddr").concat(s).concat(e.relAddr):"").concat(e.relPort?"".concat(s,"rport").concat(s).concat(e.relPort):"").concat(Object.keys(e.extension).map((t=>"".concat(s).concat(t).concat(s).concat(e.extension[t]))).join("")).concat(this.eol))).join("")}printRemoteCandidatesList(e){return e.map((e=>"a=remote-candidates:".concat(e.join(s)).concat(this.eol))).join("")}printEndOfCandidates(e){return void 0===e?"":"a=end-of-candidates"+this.eol}printRTPRelated(e){if(!e.payloads)return"";const t=e.payloads;let i="";i+=e.rtcpFeedbackWildcards.map((e=>this.printRTCPFeedback("*",e))).join("");for(const e of t)i+=this.printRtpMap(e.payloadType,e.rtpMap),i+=this.printFmtp(e.payloadType,e.fmtp),i+=e.rtcpFeedbacks.map((t=>this.printRTCPFeedback(e.payloadType,t))).join("");return i}printFmtp(e,t){if(!t)return"";const i=Object.keys(t.parameters);return 1===i.length&&null===t.parameters[i[0]]?"a=fmtp:".concat(e).concat(s).concat(i[0]).concat(this.eol):"a=fmtp:".concat(e).concat(s).concat(Object.keys(t.parameters).map((e=>"".concat(e,"=").concat(t.parameters[e]))).join(";")).concat(this.eol)}printRtpMap(e,t){return t?"a=rtpmap:".concat(e).concat(s).concat(t.encodingName,"/").concat(t.clockRate).concat(t.encodingParameters?"/".concat(t.encodingParameters):"").concat(this.eol):""}printRTCPFeedback(e,t){let i="a=rtcp-fb:".concat(e).concat(s),n=t;return"trr-int"===n.type?i+="ttr-int".concat(s).concat(n.interval):(i+="".concat(n.type),n.parameter&&(i+="".concat(s).concat(n.parameter),n.additional&&(i+="".concat(s).concat(n.additional)))),i+this.eol}printPtime(e){return void 0===e?"":"a=ptime:".concat(e).concat(this.eol)}printMaxPtime(e){return void 0===e?"":"a=maxptime:".concat(e).concat(this.eol)}printDirection(e){return void 0===e?"":"a=".concat(e).concat(this.eol)}printSSRC(e){return e.map((e=>Object.keys(e.attributes).map((t=>"a=ssrc:".concat(e.ssrcId.toString(10)).concat(s).concat(t).concat(e.attributes[t]?":".concat(e.attributes[t]):"").concat(this.eol))).join(""))).join("")}printRTCPMux(e){return void 0===e?"":"a=rtcp-mux".concat(this.eol)}printRTCPMuxOnly(e){return void 0===e?"":"a=rtcp-mux-only".concat(this.eol)}printRTCPRsize(e){return void 0===e?"":"a=rtcp-rsize".concat(this.eol)}printRTCP(e){if(void 0===e)return"";let t="a=rtcp:".concat(e.port);return e.netType&&(t+="".concat(s).concat(e.netType)),e.addressType&&(t+="".concat(s).concat(e.addressType)),e.address&&(t+="".concat(s).concat(e.address)),t+this.eol}printMSId(e){return e.map((e=>"a=msid:".concat(e.id).concat(e.appdata?"".concat(s).concat(e.appdata):"").concat(this.eol))).join("")}printImageattr(e){return e.map((e=>"a=imageattr:".concat(e).concat(this.eol))).join("")}printRid(e){return e.map((e=>{let t="a=rid:".concat(e.id).concat(s).concat(e.direction);return e.payloads&&(t+="".concat(s,"pt=").concat(e.payloads.join(","))),e.params.length>0&&(t+="".concat(s).concat(e.params.map((e=>"depend"===e.type?"depend=".concat(e.rids.join(",")):"".concat(e.type,"=").concat(e.val))).join(";"))),t+this.eol})).join("")}printSimulcast(e){return void 0===e?"":"a=simulcast:".concat(e).concat(this.eol)}printSCTPPort(e){return void 0===e?"":"a=sctp-port:".concat(e).concat(this.eol)}printMaxMessageSize(e){return void 0===e?"":"a=max-message-size:".concat(e).concat(this.eol)}printMid(e){return void 0===e?"":"a=mid:".concat(e).concat(this.eol)}printSSRCGroups(e){return e.map((e=>"a=ssrc-group:".concat(e.semantic).concat(e.ssrcIds.map((e=>"".concat(s).concat(e.toString(10)))).join("")).concat(this.eol))).join("")}}function N(e){return(new w).parse(e)}function L(e,t){return(new b).print(e,t)}}},t={};function i(n){if(t[n])return t[n].exports;var r=t[n]={exports:{}};return e[n](r,r.exports,i),r.exports}return i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i(8)})()}(PL);var UL=PL.exports;function BL(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function FL(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?BL(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):BL(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function VL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3?arguments[3]:void 0;const{filterRTX:r,filterVideoFec:s,filterAudioFec:o,filterAudioCodec:a,filterVideoCodec:c}=t,{useXR:l}=i;let d=[],h=[],u=[],p=[],f=!1,m=!1;if(UL.parse(e).mediaDescriptions.forEach((e=>{n&&n!==e.attributes.direction||("video"!==e.media.mediaType||f||(h=e.attributes.payloads,p=e.attributes.extmaps,f=!0),"audio"!==e.media.mediaType||m||(d=e.attributes.payloads,u=e.attributes.extmaps,m=!0))})),!p||0===h.length)throw new Error("Cannot get video capabilities from SDP.");if(!u||0===d.length)throw new Error("Cannot get audio capabilities from SDP.");return h.forEach((e=>{var t;null!==(t=e.rtpMap)&&void 0!==t&&t.clockRate&&(e.rtpMap.clockRate=parseInt(e.rtpMap.clockRate)),l&&e.rtcpFeedbacks.push({type:"rrtr"})})),d.forEach((e=>{var t;null!==(t=e.rtpMap)&&void 0!==t&&t.clockRate&&(e.rtpMap.clockRate=parseInt(e.rtpMap.clockRate)),l&&e.rtcpFeedbacks.push({type:"rrtr"})})),r&&(d=d.filter((e=>{var t;return"rtx"!==(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLowerCase())})),h=h.filter((e=>{var t;return"rtx"!==(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLowerCase())}))),s&&(h=h.filter((e=>{var t;return!/(red)|(ulpfec)|(flexfec)/i.test((null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName)||"")}))),o&&(d=d.filter((e=>{var t;return!/(red)|(ulpfec)|(flexfec)/i.test((null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName)||"")}))),a&&(null==a?void 0:a.length)>0&&(d=d.filter((e=>{var t;return Di(a).call(a,(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLowerCase())||"")}))),c&&(null==c?void 0:c.length)>0&&(h=h.filter((e=>{var t;return Di(c).call(c,(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLowerCase())||"")}))),{audioCodecs:d,videoCodecs:h,audioExtensions:u,videoExtensions:p}}function jL(e){const t=UL.parse(e);let i,n;for(const e of t.mediaDescriptions){if(!i){const t=e.attributes.iceUfrag,n=e.attributes.icePwd;if(!t||!n)throw new Error("Cannot get iceUfrag or icePwd from SDP.");i={iceUfrag:t,icePwd:n}}if(!n){const t=e.attributes.fingerprints;t.length>0&&(n={fingerprints:t})}}if(!n&&t.attributes.fingerprints.length>0&&(n={fingerprints:t.attributes.fingerprints}),!n||!i)throw new Error("Cannot get iceParameters or dtlsParameters from SDP.");return{iceParameters:i,dtlsParameters:n}}function HL(e,t){const i=[],n=e.attributes.ssrcGroups.filter((e=>"FID"===e.semantic)),r=e.attributes.ssrcGroups.find((e=>"SIM"===e.semantic)),s=e.attributes.ssrcs;if(r)r.ssrcIds.forEach((e=>{var r;const s=null===(r=n.find((t=>t.ssrcIds[0]===e)))||void 0===r?void 0:r.ssrcIds[1];i.push({ssrcId:e,rtx:t?s:void 0})}));else if(n.length>0){const e=n[0].ssrcIds[0],r=n[0].ssrcIds[1];i.push({ssrcId:e,rtx:t?r:void 0})}else{if(0===s.length)throw new Error("No ssrcs found on local media description.");i.push({ssrcId:s[0].ssrcId})}return i}function $L(e,t){const{cname:i}=e;let n;t&&t.ip&&"number"==typeof t.port?(n=[{foundation:"udpcandidate",componentId:"1",transport:"udp",priority:"2103266323",connectionAddress:t.ip,port:t.port.toString(),type:"host",extension:{}}],$C.debug("Using remote candidate from AP ".concat(t.ip,":").concat(t.port)),t.ip6&&(n.push({foundation:"udpcandidate",componentId:"1",transport:"udp",priority:"2103266323",connectionAddress:t.ip6,port:t.port.toString(),type:"host",extension:{}}),$C.debug("Using IPV6 remote candidate from AP ".concat(t.ip6,":").concat(t.port)))):n=e.iceParameters.candidates.map((e=>({foundation:e.foundation,componentId:"1",transport:e.protocol,priority:e.priority.toString(),connectionAddress:e.ip,port:e.port.toString(),type:e.type,extension:{}})));const r={fingerprints:e.dtlsParameters.fingerprints.map((e=>({hashFunction:e.algorithm,fingerprint:e.fingerprint})))},s={iceUfrag:e.iceParameters.iceUfrag,icePwd:e.iceParameters.icePwd};let o;switch(e.dtlsParameters.role){case"server":o="passive";break;case"client":o="active";break;case"auto":o="actpass"}return{dtlsParameters:r,iceParameters:s,candidates:n,rtpCapabilities:JL(e.rtpCapabilities),setup:o,cname:i}}function zL(e,t,i){const n=[],r=[];return e.forEach((e=>{let{ssrcId:s,rtx:o}=e;const a=B_(8,"track-"),c={ssrcId:s,attributes:FL({label:a,mslabel:i=i||B_(10,""),msid:"".concat(i," ").concat(a)},t&&{cname:t})};if(n.push(c),void 0!==o){const e={ssrcId:o,attributes:FL({label:a,mslabel:i,msid:"".concat(i," ").concat(a)},t&&{cname:t})};n.push(e),r.push({semantic:"FID",ssrcIds:[s,o]})}})),e.length>1&&r.push({semantic:"SIM",ssrcIds:e.map((e=>{let{ssrcId:t}=e;return t}))}),{ssrcs:n,ssrcGroups:r}}function WL(e,t){t instanceof YA&&e.attributes.payloads.forEach((e=>{var i;const n=null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase();if(!n||-1===["opus","pcmu","pcma","g722"].indexOf(n))return;e.fmtp||(e.fmtp={parameters:{}}),e.fmtp.parameters.minptime="10",e.fmtp.parameters.useinbandfec="1";const r=t._encoderConfig;r&&"pcmu"!==n&&"pcma"!==n&&"g722"!==n&&(r.bitrate&&!Cb()&&(e.fmtp.parameters.maxaveragebitrate="".concat(Math.floor(1e3*r.bitrate))),r.sampleRate&&(e.fmtp.parameters.maxplaybackrate="".concat(r.sampleRate),e.fmtp.parameters["sprop-maxcapturerate"]="".concat(r.sampleRate)),r.stereo&&(e.fmtp.parameters.stereo="1",e.fmtp.parameters["sprop-stereo"]="1"))}))}function KL(e){const t=e.attributes.unrecognized.findIndex((e=>"x-google-flag"===e.attField&&"conference"===e.attValue));-1!==t&&e.attributes.unrecognized.splice(t,1)}function GL(e,t){var i;if(!(t instanceof vR&&t._encoderConfig&&-1===t._hints.indexOf(NT.SCREEN_TRACK)))return;const n=t._encoderConfig;uA().supportMinBitrate&&n.bitrateMin&&e.attributes.payloads.forEach((e=>{var t,i;Di(t=["h264","h265","vp8","vp9","av1"]).call(t,(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"")&&(e.fmtp||(e.fmtp={parameters:{}}),e.fmtp.parameters["x-google-min-bitrate"]="".concat(n.bitrateMin))})),uA().supportMinBitrate&&!Di(i=t._hints).call(i,NT.LOW_STREAM)&&n.bitrateMax&&e.attributes.payloads.forEach((e=>{var t,i;Di(t=["h264","h265","vp8","vp9","av1"]).call(t,(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"")&&(e.fmtp||(e.fmtp={parameters:{}}),e.fmtp.parameters["x-google-start-bitrate"]="".concat(xC("X_GOOGLE_START_BITRATE")||Math.floor(n.bitrateMax)))}))}function qL(e){if("video"!==e.media.mediaType)return;const t=pb();if(t.name!==lb.SAFARI&&t.os!==cb.IOS)return;const i=e.attributes.extmaps.findIndex((e=>/video-orientation/g.test(e.extensionName)));-1!==i&&e.attributes.extmaps.splice(i,1)}function YL(e,t,i){if(!t)return;let n,r;if("video"===e.media.mediaType?(n=i.videoExtensions,r=i.videoCodecs):(n=i.audioExtensions,r=i.audioCodecs),!0===t.twcc){const t=n.find((e=>"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"===e.extensionName));t&&(e.attributes.extmaps.find((e=>"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"===e.extensionName))||e.attributes.extmaps.push({entry:t.entry,extensionName:"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"}),function(e,t){return t.filter((t=>!!e.find((e=>e.payloadType===t.payloadType&&!!e.rtcpFeedbacks.find((e=>"transport-cc"===e.type))))))}(r,e.attributes.payloads).forEach((e=>{e.rtcpFeedbacks.find((e=>"transport-cc"===e.type))||e.rtcpFeedbacks.push({type:"transport-cc"})})))}else if(!1===t.twcc){const t=e.attributes.extmaps.findIndex((e=>"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"===e.extensionName));-1!==t&&e.attributes.extmaps.splice(t,1),e.attributes.payloads.forEach((e=>{const t=e.rtcpFeedbacks.findIndex((e=>"transport-cc"===e.type));-1!==t&&e.rtcpFeedbacks.splice(t,1)}))}if(!0===t.remb){const t=n.find((e=>"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"===e.extensionName));t&&(e.attributes.extmaps.find((e=>"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"===e.extensionName))||e.attributes.extmaps.push({entry:t.entry,extensionName:"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"}),function(e,t){return t.filter((t=>!!e.find((e=>e.payloadType===t.payloadType&&!!e.rtcpFeedbacks.find((e=>"goog-remb"===e.type))))))}(r,e.attributes.payloads).forEach((e=>{e.rtcpFeedbacks.find((e=>"goog-remb"===e.type))||e.rtcpFeedbacks.push({type:"goog-remb"})})))}else if(!1===t.remb){const t=e.attributes.extmaps.findIndex((e=>"http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"===e.extensionName));-1!==t&&e.attributes.extmaps.splice(t,1),e.attributes.payloads.forEach((e=>{const t=e.rtcpFeedbacks.findIndex((e=>"goog-remb"===e.type));-1!==t&&e.rtcpFeedbacks.splice(t,1)}))}}function XL(e,t,i){if(Cb())return;if("video"!==e.media.mediaType)return;if(!(t instanceof vR))return;if("vp9"!==i&&"vp8"!==i)return;if("vp8"===i&&!xC("SIMULCAST"))return;if(void 0===t._scalabilityMode||t._scalabilityMode.numSpatialLayers<=1)return;const n="vp8"===i?2:t._scalabilityMode.numSpatialLayers,r=e.attributes.ssrcs[0],s=e.attributes.ssrcGroups.find((e=>"FID"===e.semantic&&e.ssrcIds[0]===r.ssrcId)),o={semantic:"SIM",ssrcIds:[r.ssrcId]};for(let t=1;t<n;t++)e.attributes.ssrcs.push({ssrcId:r.ssrcId+t,attributes:O_(r.attributes)}),o.ssrcIds.push(r.ssrcId+t),s&&(e.attributes.ssrcs.push({ssrcId:s.ssrcIds[1]+t,attributes:O_(r.attributes)}),e.attributes.ssrcGroups.push({semantic:"FID",ssrcIds:[r.ssrcId+t,s.ssrcIds[1]+t]}));e.attributes.ssrcGroups.unshift(o)}async function ZL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{filterRTX:i,filterVideoFec:n,filterAudioFec:r,filterAudioCodec:s,filterVideoCodec:o}=e,{useXR:a}=t,c=new RTCPeerConnection;c.addTransceiver("video",{direction:"sendonly"}),c.addTransceiver("audio",{direction:"sendonly"}),c.addTransceiver("video",{direction:"recvonly"}),c.addTransceiver("audio",{direction:"recvonly"});const l=(await c.createOffer()).sdp,d=VL(l,{filterRTX:i,filterVideoFec:n,filterAudioFec:r,filterAudioCodec:s,filterVideoCodec:o},{useXR:a},"sendonly"),h=VL(l,{filterRTX:i,filterVideoFec:n,filterAudioFec:r,filterAudioCodec:s,filterVideoCodec:o},{useXR:a},"recvonly"),u={audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},p={audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},f={audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]};if(QL(d,h,"videoExtensions",u,p,f),QL(d,h,"videoCodecs",u,p,f),QL(d,h,"audioExtensions",u,p,f),QL(d,h,"audioCodecs",u,p,f),xC("RAISE_H264_BASELINE_PRIORITY")){const e=f.videoCodecs.findIndex((e=>{var t,i;return"h264"===(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLocaleLowerCase())&&"42001f"===(null===(i=e.fmtp)||void 0===i?void 0:i.parameters["profile-level-id"])}));if(-1!==e){const t=f.videoCodecs.findIndex((e=>{var t;return"h264"===(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLocaleLowerCase())}));if(t<e){$C.debug("raising H264 baseline profile priority");const i=f.videoCodecs[e];f.videoCodecs.splice(e,1),f.videoCodecs.splice(t,0,i)}-1!==t&&(p.videoCodecs=p.videoCodecs.filter((e=>{var t,i;return!("h264"===(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLocaleLowerCase())&&"42001f"!==(null===(i=e.fmtp)||void 0===i?void 0:i.parameters["profile-level-id"]))}))),-1!==t&&xC("FILTER_SEND_H264_BASELINE")&&(u.videoCodecs=u.videoCodecs.filter((e=>{var t,i;return!("h264"===(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLocaleLowerCase())&&"42001f"!==(null===(i=e.fmtp)||void 0===i?void 0:i.parameters["profile-level-id"]))})))}}try{c.close()}catch(e){}return{send:u,recv:p,sendrecv:f}}function QL(e,t,i,n,r,s){if("videoExtensions"===i||"audioExtensions"===i){const o=[];return e[i].forEach((e=>{t[i].some(((t,i)=>{if(e.entry===t.entry&&e.extensionName===t.extensionName)return o.push(i),!0}))?s[i].push(e):n[i].push(e)})),void t[i].forEach(((e,t)=>{-1===o.indexOf(t)&&r[i].push(e)}))}if("videoCodecs"===i||"audioCodecs"===i){const o=[];return e[i].forEach((e=>{t[i].some(((t,i)=>{if(e.payloadType===t.payloadType&&JSON.stringify(e)===JSON.stringify(t))return o.push(i),!0}))?s[i].push(e):n[i].push(e)})),void t[i].forEach(((e,t)=>{-1===o.indexOf(t)&&r[i].push(e)}))}}function JL(e){const{send:t,recv:i,sendrecv:n}=e;if(!n){if(!t||!i)throw new Error("cannot merge rtp capabilities because one of send or recv is empty!");return{send:t,recv:i}}let r,s;return t?(r={audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},r.audioCodecs=[...t.audioCodecs,...n.audioCodecs],r.videoCodecs=[...t.videoCodecs,...n.videoCodecs],r.audioExtensions=[...t.audioExtensions,...n.audioExtensions],r.videoExtensions=[...t.videoExtensions,...n.videoExtensions]):r=n,i?(s={audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},s.audioCodecs=[...i.audioCodecs,...n.audioCodecs],s.videoCodecs=[...i.videoCodecs,...n.videoCodecs],s.audioExtensions=[...i.audioExtensions,...n.audioExtensions],s.videoExtensions=[...i.videoExtensions,...n.videoExtensions]):s=n,{send:r,recv:s}}function eM(e){"audio"===e.media.mediaType&&e.attributes.payloads.filter((e=>{var t;return"opus"===(null===(t=e.rtpMap)||void 0===t?void 0:t.encodingName.toLowerCase())})).forEach((e=>{e.fmtp||(e.fmtp={parameters:{}}),e.fmtp.parameters.stereo="1",e.fmtp.parameters["sprop-stereo"]="1"}))}function tM(e){e.mediaDescriptions.forEach((e=>{"video"!==e.media.mediaType&&"audio"!==e.media.mediaType||e.attributes.payloads.forEach((e=>{-1===e.rtcpFeedbacks.findIndex((e=>"rrtr"===e.type))&&e.rtcpFeedbacks.push({type:"rrtr"})}))}))}function nM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function rM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?nM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):nM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function iM(e){if(Array.isArray(e))return e.map((e=>e));if(!oM(e))return e;const t={};for(const i in e){const n=e[i];oM(n)||Array.isArray(n)?t[i]=iM(n):t[i]=n}return t}function oM(e){return!("object"!=typeof e||Array.isArray(e)||!e)}class aM{constructor(e){oh(this,"input",[]),oh(this,"size",void 0),this.size=e}add(e){this.input.push(e),this.input.length>this.size&&this.input.splice(0,1)}diffMean(){return 0===this.input.length?0:(this.input[this.input.length-1]-this.input[0])/this.input.length}}const sM={address:"unknown",candidateType:"unknown",id:"unknown",port:0,priority:0,protocol:"unknown",type:"unknown"},cM={timestamp:0,bitrate:{actualEncoded:0,transmit:0},sendPacketLossRate:0,recvPacketLossRate:0,videoRecv:[],videoSend:[],audioRecv:[],audioSend:[],selectedCandidatePair:{id:"unknown",localCandidate:sM,remoteCandidate:sM}},lM={firsCount:0,nacksCount:0,plisCount:0,framesDecodeCount:0,framesDecodeInterval:0,framesDecodeFreezeTime:0,decodeFrameRate:0,bytes:0,packetsLost:0,packetLostRate:0,packets:0,ssrc:0,qpSumPerFrame:0},dM={firsCount:0,nacksCount:0,plisCount:0,frameCount:0,bytes:0,packets:0,packetsLost:0,packetLostRate:0,ssrc:0,rttMs:0,jitterMs:0,qpSumPerFrame:0},uM={bytes:0,packets:0,packetsLost:0,packetLostRate:0,ssrc:0,rttMs:0,jitterMs:0},hM={jitterBufferMs:0,jitterMs:0,bytes:0,packetsLost:0,packetLostRate:0,packets:0,ssrc:0,receivedFrames:0,droppedFrames:0,concealedSamples:0};function fM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function pM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class gM{constructor(e,t){oh(this,"onFirstVideoReceived",void 0),oh(this,"onFirstVideoDecoded",void 0),oh(this,"onFirstAudioReceived",void 0),oh(this,"onFirstVideoDecodedTimeout",void 0),oh(this,"onFirstAudioDecoded",void 0),oh(this,"onSelectedLocalCandidateChanged",void 0),oh(this,"onSelectedRemoteCandidateChanged",void 0),oh(this,"videoIsReady",!1),oh(this,"videoIsReady2",{}),oh(this,"pc",void 0),oh(this,"options",void 0),oh(this,"intervalTimer",void 0),oh(this,"stats",iM(cM)),oh(this,"isFirstVideoReceived",{}),oh(this,"isFirstVideoDecoded",{}),oh(this,"isFirstAudioReceived",{}),oh(this,"isFirstAudioDecoded",{}),oh(this,"isFirstVideoDecodedTimeout",{}),oh(this,"lossRateWindowStats",[]),this.pc=e,this.options=t,this.intervalTimer=window.setInterval((async()=>{this.updateStats()}),this.options.updateInterval)}getStats(){return this.stats}getSelectedCandidatePair(){return new nb((e=>{e({local:pM({},sM),remote:pM({},sM)})}))}setVideoIsReady(e){this.videoIsReady=e}setVideoIsReady2(e,t){this.videoIsReady2[e]=t}getVideoIsReady(e){return this.videoIsReady2[e]||!1}setIsFirstAudioDecoded(e){}destroy(){window.clearInterval(this.intervalTimer),this.pc=void 0}calcLossRate(e){this.lossRateWindowStats.push(e),this.lossRateWindowStats.length>this.options.lossRateInterval&&this.lossRateWindowStats.splice(0,1);const t=this.lossRateWindowStats.length,i=["videoSend","audioSend","videoRecv","audioRecv"];let n=0,r=0,s=0,o=0;for(const a of i)e[a].forEach(((e,i)=>{if(!this.lossRateWindowStats[t-1][a][i]||!this.lossRateWindowStats[0][a][i])return;const c=this.lossRateWindowStats[t-1][a][i].packets-this.lossRateWindowStats[0][a][i].packets,l=this.lossRateWindowStats[t-1][a][i].packetsLost-this.lossRateWindowStats[0][a][i].packetsLost;"videoSend"===a||"audioSend"===a?(n+=c,s+=l):(r+=c,o+=l),Number.isNaN(c)||Number.isNaN(c)?e.packetLostRate=0:e.packetLostRate=c<=0||l<=0?0:l/(c+l)}));e.sendPacketLossRate=n<=0||s<=0?0:s/(n+s),e.recvPacketLossRate=r<=0||o<=0?0:o/(r+o)}}function mM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?mM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):mM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class bM extends gM{constructor(){super(...arguments),oh(this,"_stats",cM),oh(this,"lastDecodeVideoReceiverStats",new Map)}async updateStats(){const e=await this._getStats(),t=this.statsResponsesToObjects(e);this._stats=iM(cM);const i=t.filter((e=>"ssrc"===e.type));this.processSSRCStats(i);const n=t.find((e=>"VideoBwe"===e.type));n&&this.processBandwidthStats(n),this._stats.timestamp=Date.now(),this.calcLossRate(this._stats),this.stats=this._stats}processBandwidthStats(e){this._stats.bitrate={actualEncoded:Number(e.googActualEncBitrate),targetEncoded:Number(e.googTargetEncBitrate),retransmit:Number(e.googRetransmitBitrate),transmit:Number(e.googTransmitBitrate)},this._stats.sendBandwidth=Number(e.googAvailableSendBandwidth)}processSSRCStats(e){e.forEach((e=>{var t;const i=Di(t=e.id).call(t,"send");switch("".concat(e.mediaType,"_").concat(i?"send":"recv")){case"video_send":{const t=iM(dM);t.codec=e.googCodecName,t.adaptionChangeReason="none",e.googCpuLimitedResolution&&(t.adaptionChangeReason="cpu"),e.googBandwidthLimitedResolution&&(t.adaptionChangeReason="bandwidth"),t.avgEncodeMs=Number(e.googAvgEncodeMs),t.inputFrame={width:Number(e.googFrameWidthInput)||Number(e.googFrameWidthSent),height:Number(e.googFrameHeightInput)||Number(e.googFrameHeightSent),frameRate:Number(e.googFrameRateInput)},t.sentFrame={width:Number(e.googFrameWidthSent),height:Number(e.googFrameHeightSent),frameRate:Number(e.googFrameRateInput)},t.firsCount=Number(e.googFirReceived),t.nacksCount=Number(e.googNacksReceived),t.plisCount=Number(e.googPlisReceived),t.frameCount=Number(e.framesEncoded),t.bytes=Number(e.bytesSent),t.packets=Number(e.packetsSent),t.packetsLost=Number(e.packetsLost),t.ssrc=Number(e.ssrc),t.rttMs=Number(e.googRtt||0),this._stats.videoSend.push(t),this._stats.rtt=t.rttMs;break}case"video_recv":{const t=iM(lM),i=this.lastDecodeVideoReceiverStats.get(Number(e.ssrc));if(t.codec=e.googCodecName,t.targetDelayMs=Number(e.googTargetDelayMs),t.renderDelayMs=Number(e.googRenderDelayMs),t.currentDelayMs=Number(e.googCurrentDelayMs),t.minPlayoutDelayMs=Number(e.googMinPlayoutDelayMs),t.decodeMs=Number(e.googDecodeMs),t.maxDecodeMs=Number(e.googMaxDecodeMs),t.receivedFrame={width:Number(e.googFrameWidthReceived),height:Number(e.googFrameHeightReceived),frameRate:Number(e.googFrameRateReceived)},t.decodedFrame={width:Number(e.googFrameWidthReceived),height:Number(e.googFrameHeightReceived),frameRate:Number(e.googFrameRateDecoded)},t.decodeFrameRate=Number(e.googFrameRateDecoded),t.outputFrame={width:Number(e.googFrameWidthReceived),height:Number(e.googFrameHeightReceived),frameRate:Number(e.googFrameRateOutput)},t.jitterBufferMs=Number(e.googJitterBufferMs),t.firsCount=Number(e.googFirsSent),t.nacksCount=Number(e.googNacksSent),t.plisCount=Number(e.googPlisSent),t.framesDecodeCount=Number(e.framesDecoded),t.bytes=Number(e.bytesReceived),t.packets=Number(e.packetsReceived),t.packetsLost=Number(e.packetsLost),t.ssrc=Number(e.ssrc),t.packets>0&&!this.isFirstVideoReceived[t.ssrc]&&(this.onFirstVideoReceived&&this.onFirstVideoReceived(t.ssrc),this.isFirstVideoReceived[t.ssrc]=!0),t.framesDecodeCount>0&&!this.isFirstVideoDecoded[t.ssrc]&&(this.onFirstVideoDecoded&&this.onFirstVideoDecoded(t.ssrc,t.decodedFrame.width,t.decodedFrame.height),this.isFirstVideoDecoded[t.ssrc]=!0),i){const n=i.stats,r=Date.now()-i.lts;t.framesDecodeFreezeTime=n.framesDecodeFreezeTime,t.framesDecodeInterval=n.framesDecodeInterval,t.framesDecodeCount>n.framesDecodeCount&&this.isFirstVideoDecoded[t.ssrc]?(i.lts=Date.now(),t.framesDecodeInterval=r,t.framesDecodeInterval>=this.options.freezeRateLimit&&(this.getVideoIsReady(parseInt(e.ssrc,10))?t.framesDecodeFreezeTime+=t.framesDecodeInterval:this.setVideoIsReady2(parseInt(e.ssrc,10),!0))):t.framesDecodeCount<i.stats.framesDecodeCount&&(t.framesDecodeInterval=0)}this.lastDecodeVideoReceiverStats.set(t.ssrc,{stats:vM({},t),lts:Date.now()}),this._stats.videoRecv.push(t);break}case"audio_recv":{const t=iM(hM);t.codec=e.googCodecName,t.outputLevel=Math.abs(Number(e.audioOutputLevel))/32767,t.decodingCNG=Number(e.googDecodingCNG),t.decodingCTN=Number(e.googDecodingCTN),t.decodingCTSG=Number(e.googDecodingCTSG),t.decodingNormal=Number(e.googDecodingNormal),t.decodingPLC=Number(e.googDecodingPLC),t.decodingPLCCNG=Number(e.googDecodingPLCCNG),t.expandRate=Number(e.googExpandRate),t.accelerateRate=Number(e.googAccelerateRate),t.preemptiveExpandRate=Number(e.googPreemptiveExpandRate),t.secondaryDecodedRate=Number(e.googSecondaryDecodedRate),t.speechExpandRate=Number(e.googSpeechExpandRate),t.preferredJitterBufferMs=Number(e.googPreferredJitterBufferMs),t.jitterBufferMs=Number(e.googJitterBufferMs),t.jitterMs=Number(e.googJitterReceived),t.bytes=Number(e.bytesReceived),t.packets=Number(e.packetsReceived),t.packetsLost=Number(e.packetsLost),t.ssrc=Number(e.ssrc),t.receivedFrames=Number(e.googDecodingCTN)||Number(e.packetsReceived),t.droppedFrames=Number(e.googDecodingPLC)+Number(e.googDecodingPLCCNG)||Number(e.packetsLost),t.receivedFrames>0&&!this.isFirstAudioReceived[t.ssrc]&&(this.onFirstAudioReceived&&this.onFirstAudioReceived(t.ssrc),this.isFirstAudioReceived[t.ssrc]=!0),t.decodingNormal>0&&!this.isFirstAudioDecoded[t.ssrc]&&(this.onFirstAudioDecoded&&this.onFirstAudioDecoded(t.ssrc),this.isFirstAudioDecoded[t.ssrc]=!0),this._stats.audioRecv.push(t);break}case"audio_send":{const t=iM(uM);t.codec=e.googCodecName,t.inputLevel=Math.abs(Number(e.audioInputLevel))/32767,t.aecReturnLoss=Number(e.googEchoCancellationReturnLoss||0),t.aecReturnLossEnhancement=Number(e.googEchoCancellationReturnLossEnhancement||0),t.residualEchoLikelihood=Number(e.googResidualEchoLikelihood||0),t.residualEchoLikelihoodRecentMax=Number(e.googResidualEchoLikelihoodRecentMax||0),t.bytes=Number(e.bytesSent),t.packets=Number(e.packetsSent),t.packetsLost=Number(e.packetsLost),t.ssrc=Number(e.ssrc),t.rttMs=Number(e.googRtt||0),this._stats.rtt=t.rttMs,this._stats.audioSend.push(t);break}}}))}_getStats(){return new nb(((e,t)=>{this.pc.getStats(e,t)}))}statsResponsesToObjects(e){const t=[];return e.result().forEach((e=>{const i={id:e.id,timestamp:e.timestamp.valueOf().toString(),type:e.type};e.names().forEach((t=>{i[t]=e.stat(t)})),t.push(i)})),t}}function _M(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function yM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_M(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_M(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class EM extends gM{constructor(){super(...arguments),oh(this,"_stats",cM),oh(this,"report",void 0),oh(this,"lastDecodeVideoReceiverStats",new Map),oh(this,"lastVideoFramesRecv",new Map),oh(this,"lastVideoFramesSent",new Map),oh(this,"lastVideoFramesDecode",new Map),oh(this,"lastVideoJBDelay",new Map),oh(this,"lastAudioJBDelay",new Map),oh(this,"mediaBytesSent",new Map),oh(this,"mediaBytesRetransmit",new Map),oh(this,"mediaBytesTargetEncode",new Map),oh(this,"lastEncoderMs",new Map)}async updateStats(){this.report=await this.pc.getStats(),this._stats=iM(cM),this.report.forEach((e=>{switch(e.type){case lw.OUTBOUND:case lw.INBOUND:{const t=e.mediaType||e.kind,i=!t&&"frameWidth"in e,n=!t&&!("frameWidth"in e);e.type===lw.OUTBOUND?"audio"===t||n?this.processAudioOutboundStats(e):("video"===t||i)&&this.processVideoOutboundStats(e):e.type===lw.INBOUND&&("audio"===t||n?this.processAudioInboundStats(e):("video"===t||i)&&this.processVideoInboundStats(e));break}case lw.TRANSPORT:{const t=this.report.get(e.selectedCandidatePairId);t&&this.processCandidatePairStats(t);break}case lw.CANDIDATE_PAIR:e.selected&&this.processCandidatePairStats(e)}})),this.updateSendBitrate(),this._stats.timestamp=Date.now(),this.calcLossRate(this._stats),this.stats=this._stats}async getSelectedCandidatePair(){const e=await this.pc.getStats(),t={local:yM({},sM),remote:yM({},sM)};return e.forEach((i=>{let n;if(i.type===lw.TRANSPORT&&(n=e.get(i.selectedCandidatePairId)),i.type===lw.CANDIDATE_PAIR&&i.selected&&(n=i),n){const i=(e,t)=>{e.type=t.type,e.id=t.id,t.address&&(e.address=t.address),t.candidateType&&(e.candidateType=t.candidateType),t.port&&(e.port=t.port),t.priority&&(e.priority=t.priority),t.protocol&&(e.protocol=t.protocol),t.relayProtocol&&(e.relayProtocol=t.relayProtocol)};if(n.localCandidateId){const r=e.get(n.localCandidateId);r&&i(t.local,r)}if(n.remoteCandidateId){const r=e.get(n.remoteCandidateId);r&&i(t.remote,r)}}})),t}processCandidatePairStats(e){if(this._stats.sendBandwidth=e.availableOutgoingBitrate||0,e.currentRoundTripTime&&(this._stats.rtt=1e3*e.currentRoundTripTime),this._stats.videoSend.forEach((t=>{e.currentRoundTripTime&&(t.rttMs=1e3*e.currentRoundTripTime)})),this._stats.audioSend.forEach((t=>{e.currentRoundTripTime&&(t.rttMs=1e3*e.currentRoundTripTime)})),this._stats.selectedCandidatePair.id=e.id,e.localCandidateId){const t=this.report.get(e.localCandidateId);t&&this.processCandidateStats(t)}if(e.remoteCandidateId){const t=this.report.get(e.remoteCandidateId);t&&this.processCandidateStats(t)}}processCandidateStats(e){let t;e.type===lw.LOCAL_CANDIDATE&&(t=this._stats.selectedCandidatePair.localCandidate),e.type===lw.REMOTE_CANDIDATE&&(t=this._stats.selectedCandidatePair.remoteCandidate),t&&(t.type=e.type,t.id=e.id,e.address&&(t.address=e.address),e.candidateType&&(t.candidateType=e.candidateType),e.port&&(t.port=e.port),e.priority&&(t.priority=e.priority),e.protocol&&(t.protocol=e.protocol),e.relayProtocol&&(t.relayProtocol=e.relayProtocol),e.type===lw.LOCAL_CANDIDATE&&this.stats.selectedCandidatePair.localCandidate.id!==t.id&&this.onSelectedLocalCandidateChanged&&this.onSelectedLocalCandidateChanged(yM({},t),yM({},this.stats.selectedCandidatePair.localCandidate)),e.type===lw.REMOTE_CANDIDATE&&this.stats.selectedCandidatePair.remoteCandidate.id!==t.id&&this.onSelectedRemoteCandidateChanged&&this.onSelectedRemoteCandidateChanged(yM({},t),yM({},this.stats.selectedCandidatePair.remoteCandidate)))}processAudioInboundStats(e){let t=this._stats.audioRecv.find((t=>t.ssrc===e.ssrc));t||(t=iM(hM),this._stats.audioRecv.push(t)),t.ssrc=e.ssrc,t.packets=e.packetsReceived,t.packetsLost=e.packetsLost,t.bytes=e.bytesReceived,t.jitterMs=1e3*e.jitter,this.processAudioTrackReceiverStats(e,e.trackId,t),e.codecId&&(t.codec=this.getCodecFromCodecStats(e.codecId)),t.receivedFrames||(t.receivedFrames=e.packetsReceived),t.droppedFrames||(t.droppedFrames=e.packetsLost),t.receivedFrames>0&&!this.isFirstAudioReceived[t.ssrc]&&(this.onFirstAudioReceived&&this.onFirstAudioReceived(t.ssrc),this.isFirstAudioReceived[t.ssrc]=!0),t.outputLevel&&t.outputLevel>0&&!this.isFirstAudioDecoded[t.ssrc]&&(this.onFirstAudioDecoded&&this.onFirstAudioDecoded(t.ssrc),this.isFirstAudioDecoded[t.ssrc]=!0),"number"==typeof e.concealedSamples&&(t.concealedSamples=e.concealedSamples)}processVideoInboundStats(e){let t=this._stats.videoRecv.find((t=>t.ssrc===e.ssrc));t||(t=iM(lM),this._stats.videoRecv.push(t)),t.ssrc=e.ssrc,t.packets=e.packetsReceived,t.packetsLost=e.packetsLost,t.bytes=e.bytesReceived,t.firsCount=e.firCount,t.nacksCount=e.nackCount,t.plisCount=e.pliCount,t.framesDecodeCount=e.framesDecoded,t.totalInterFrameDelay=e.totalInterFrameDelay,t.totalSquaredInterFrameDelay=e.totalSquaredInterFrameDelay;const i=this.lastDecodeVideoReceiverStats.get(t.ssrc),n=this.lastVideoFramesDecode.get(t.ssrc),r=Date.now();if(t.framesDecodeCount>0&&!this.isFirstVideoDecoded[t.ssrc]){const e=t.decodedFrame?t.decodedFrame.width:0,i=t.decodedFrame?t.decodedFrame.height:0;this.onFirstVideoDecoded&&this.onFirstVideoDecoded(t.ssrc,e,i),this.isFirstVideoDecoded[t.ssrc]=!0}if(i){const n=i.stats,s=r-i.lts;t.framesDecodeFreezeTime=n.framesDecodeFreezeTime,t.framesDecodeInterval=n.framesDecodeInterval,!this.isFirstVideoDecoded[t.ssrc]&&s>this.options.firstVideoDecodedTimeout&&!this.isFirstVideoDecodedTimeout[t.ssrc]&&(this.onFirstVideoDecodedTimeout&&this.onFirstVideoDecodedTimeout(t.ssrc),this.isFirstVideoDecodedTimeout[t.ssrc]=!0),t.framesDecodeCount>n.framesDecodeCount&&this.isFirstVideoDecoded[t.ssrc]?(i.lts=Date.now(),t.framesDecodeInterval=s,t.framesDecodeInterval>=this.options.freezeRateLimit&&(this.getVideoIsReady(parseInt(e.ssrc))?t.framesDecodeFreezeTime+=t.framesDecodeInterval:this.setVideoIsReady2(parseInt(e.ssrc,10),!0))):t.framesDecodeCount<n.framesDecodeCount&&(t.framesDecodeInterval=0),e.framesDecoded&&e.qpSum&&(i.stats.framesDecodeCount>e.framesDecoded?t.qpSumPerFrame=e.qpSum/e.framesDecoded:t.qpSumPerFrame=(e.qpSum-i.qpSum)/(e.framesDecoded-i.stats.framesDecodeCount))}n&&r-n.lts>=800?(t.decodeFrameRate=Math.round((t.framesDecodeCount-n.count)/((r-n.lts)/1e3)),this.lastVideoFramesDecode.set(t.ssrc,{count:t.framesDecodeCount,lts:r,rate:t.decodeFrameRate})):n?t.decodeFrameRate=n.rate:this.lastVideoFramesDecode.set(t.ssrc,{count:t.framesDecodeCount,lts:r,rate:0}),e.totalDecodeTime&&(t.decodeMs=1e3*e.totalDecodeTime),this.processVideoTrackReceiverStats(e,e.trackId,t),e.codecId&&(t.codec=this.getCodecFromCodecStats(e.codecId)),e.framerateMean&&(t.framesRateFirefox=e.framerateMean),t.packets>0&&!this.isFirstVideoReceived[t.ssrc]&&(this.onFirstVideoReceived&&this.onFirstVideoReceived(t.ssrc),this.isFirstVideoReceived[t.ssrc]=!0),this.lastDecodeVideoReceiverStats.set(t.ssrc,{stats:yM({},t),lts:i?i.lts:Date.now(),qpSum:e.qpSum})}processVideoOutboundStats(e){let t=this._stats.videoSend.find((t=>t.ssrc===e.ssrc));t||(t=iM(dM),this._stats.videoSend.push(t));const i=this.mediaBytesSent.get(e.ssrc);if(i)i.add(e.bytesSent);else{const t=new aM(10);t.add(e.bytesSent),this.mediaBytesSent.set(e.ssrc,t)}if(void 0!==e.retransmittedBytesSent){const t=this.mediaBytesRetransmit.get(e.ssrc);if(t)t.add(e.retransmittedBytesSent);else{const t=new aM(10);t.add(e.retransmittedBytesSent),this.mediaBytesRetransmit.set(e.ssrc,t)}}if(e.totalEncodedBytesTarget){const t=this.mediaBytesTargetEncode.get(e.ssrc);if(t)t.add(e.totalEncodedBytesTarget);else{const t=new aM(10);t.add(e.totalEncodedBytesTarget),this.mediaBytesTargetEncode.set(e.ssrc,t)}}if(t.ssrc=e.ssrc,t.bytes=e.bytesSent,t.packets=e.packetsSent,t.firsCount=e.firCount,t.nacksCount=e.nackCount,t.plisCount=e.pliCount,t.frameCount=e.framesEncoded,t.adaptionChangeReason=e.qualityLimitationReason,t.scalabilityMode=e.scalabilityMode,e.totalEncodeTime&&e.framesEncoded){const i=this.lastEncoderMs.get(e.ssrc);if(!i||i.lastFrameCount>e.framesEncoded)t.avgEncodeMs=1e3*e.totalEncodeTime/e.framesEncoded;else{const n=e.framesEncoded-i.lastFrameCount,r=e.totalEncodeTime-i.lastEncoderTime;t.avgEncodeMs=1e3*r/n}}if(e.framesEncoded&&e.qpSum){const i=this.lastEncoderMs.get(e.ssrc);!i||i.lastFrameCount>e.framesEncoded?t.qpSumPerFrame=e.qpSum/e.framesEncoded:t.qpSumPerFrame=(e.qpSum-i.lastQpSum)/(e.framesEncoded-i.lastFrameCount)}if(this.lastEncoderMs.set(e.ssrc,{lastFrameCount:e.framesEncoded,lastEncoderTime:e.totalEncodeTime,lastQpSum:e.qpSum,lts:Date.now()}),e.codecId&&(t.codec=this.getCodecFromCodecStats(e.codecId)),e.mediaSourceId&&this.processVideoMediaSource(e.mediaSourceId,t),this.processVideoTrackSenderStats(e,e.trackId,t),e.remoteId)this.processRemoteInboundStats(e.remoteId,t);else{const i=this.findRemoteStatsId(e.ssrc,lw.REMOTE_INBOUND);i&&this.processRemoteInboundStats(i,t)}}processAudioOutboundStats(e){let t=this._stats.audioSend.find((t=>t.ssrc===e.ssrc));if(t||(t=iM(uM),this._stats.audioSend.push(t)),t.ssrc=e.ssrc,t.packets=e.packetsSent,t.bytes=e.bytesSent,e.mediaSourceId&&this.processAudioMediaSource(e.mediaSourceId,t),e.codecId&&(t.codec=this.getCodecFromCodecStats(e.codecId)),this.processAudioTrackSenderStats(e,e.trackId,t),e.remoteId)this.processRemoteInboundStats(e.remoteId,t);else{const i=this.findRemoteStatsId(e.ssrc,lw.REMOTE_INBOUND);i&&this.processRemoteInboundStats(i,t)}}findRemoteStatsId(e,t){var i;const n=Array.from(Lw(i=this.report).call(i)).find((i=>i.type===t&&i.ssrc===e));return n?n.id:null}processVideoMediaSource(e,t){const i=this.report.get(e);i&&i.width&&i.height&&i.framesPerSecond&&(t.inputFrame={width:i.width,height:i.height,frameRate:i.framesPerSecond})}processAudioMediaSource(e,t){const i=this.report.get(e);i&&(t.inputLevel=i.audioLevel)}processVideoTrackSenderStats(e,t,i){var n,r,s,o;const a=t?this.report.get(t):void 0,c=null!==(n=null==a?void 0:a.framesSent)&&void 0!==n?n:e.framesSent;if("number"!=typeof c)return;let l=null!==(r=null==a?void 0:a.frameWidth)&&void 0!==r?r:e.frameWidth,d=null!==(s=null==a?void 0:a.frameHeight)&&void 0!==s?s:e.frameHeight,h=null!==(o=null==a?void 0:a.framesPerSecond)&&void 0!==o?o:e.framesPerSecond;if("number"==typeof l&&"number"==typeof d||(l=0,d=0),null==h){const e=Date.now(),t=this.lastVideoFramesSent.get(i.ssrc);t&&e-t.lts>=800?(h=Math.round((c-t.count)/((e-t.lts)/1e3)),this.lastVideoFramesSent.set(i.ssrc,{count:c,lts:e,rate:h})):t?h=t.rate:this.lastVideoFramesSent.set(i.ssrc,{count:c,lts:e,rate:0})}i.sentFrame={width:l,height:d,frameRate:Math.max(0,h)}}processVideoTrackReceiverStats(e,t,i){var n,r,s,o,a;const c=t?this.report.get(t):void 0,l=null!==(n=null==c?void 0:c.framesReceived)&&void 0!==n?n:e.framesReceived,d=null!==(r=null==c?void 0:c.frameWidth)&&void 0!==r?r:e.frameWidth,h=null!==(s=null==c?void 0:c.frameHeight)&&void 0!==s?s:e.frameHeight,u=null!==(o=null==c?void 0:c.jitterBufferDelay)&&void 0!==o?o:e.jitterBufferDelay,p=null!==(a=null==c?void 0:c.jitterBufferEmittedCount)&&void 0!==a?a:e.jitterBufferEmittedCount;if("number"==typeof l){const e=this.lastVideoFramesRecv.get(i.ssrc),t=Date.now();i.framesReceivedCount=l;let n=0;e&&t-e.lts>=800?(n=Math.round((l-e.count)/((t-e.lts)/1e3)),this.lastVideoFramesRecv.set(i.ssrc,{count:l,lts:t,rate:n})):e?n=e.rate:this.lastVideoFramesRecv.set(i.ssrc,{count:l,lts:t,rate:0}),i.receivedFrame={width:d||0,height:h||0,frameRate:n||0},i.decodedFrame={width:d||0,height:h||0,frameRate:i.decodeFrameRate||0},i.outputFrame={width:d||0,height:h||0,frameRate:i.decodeFrameRate||0}}if(u&&p){const e=this.lastVideoJBDelay.get(i.ssrc)||{jitterBufferDelay:0,jitterBufferEmittedCount:0,jitterBufferMs:0};let t=e.jitterBufferMs;const n=p-e.jitterBufferEmittedCount;n>0&&(t=1e3*(u-e.jitterBufferDelay)/n),i.jitterBufferMs=t,i.currentDelayMs=Math.round(t),this.lastVideoJBDelay.set(i.ssrc,{jitterBufferDelay:u,jitterBufferEmittedCount:p,jitterBufferMs:i.currentDelayMs})}}processAudioTrackSenderStats(e,t,i){var n,r,s,o;const a=t?this.report.get(t):void 0,c=null!==(n=null!==(r=null==a?void 0:a.echoReturnLoss)&&void 0!==r?r:e.echoReturnLoss)&&void 0!==n?n:0,l=null!==(s=null!==(o=null==a?void 0:a.echoReturnLossEnhancement)&&void 0!==o?o:e.echoReturnLossEnhancement)&&void 0!==s?s:0;i.aecReturnLoss=c,i.aecReturnLossEnhancement=l}processAudioTrackReceiverStats(e,t,i){var n,r,s,o,a,c,l;const d=t?this.report.get(t):void 0,h=null!==(n=null==d?void 0:d.removedSamplesForAcceleration)&&void 0!==n?n:e.removedSamplesForAcceleration,u=null!==(r=null==d?void 0:d.totalSamplesReceived)&&void 0!==r?r:e.totalSamplesReceived,p=null!==(s=null==d?void 0:d.jitterBufferDelay)&&void 0!==s?s:e.jitterBufferDelay,f=null!==(o=null==d?void 0:d.jitterBufferEmittedCount)&&void 0!==o?o:e.jitterBufferEmittedCount,m=null!==(a=null==d?void 0:d.audioLevel)&&void 0!==a?a:null==e?void 0:e.audioLevel,v=null!==(c=null==d?void 0:d.totalSamplesDuration)&&void 0!==c?c:null==e?void 0:e.totalSamplesDuration,_=null!==(l=null==d?void 0:d.concealedSamples)&&void 0!==l?l:e.concealedSamples;if(h&&u&&(i.accelerateRate=h/u),p&&f){const e=this.lastAudioJBDelay.get(i.ssrc)||{jitterBufferDelay:0,jitterBufferEmittedCount:0,jitterBufferMs:0};let t=e.jitterBufferMs;const n=f-e.jitterBufferEmittedCount;n>0&&(t=1e3*(p-e.jitterBufferDelay)/n),i.jitterBufferMs=Math.round(t),this.lastAudioJBDelay.set(i.ssrc,{jitterBufferDelay:p,jitterBufferEmittedCount:f,jitterBufferMs:i.jitterBufferMs})}i.outputLevel=m;let g=1920;v&&u&&(g=u/v/50,i.receivedFrames=Math.round(u/g)),_&&(i.droppedFrames=Math.round(_/g))}processRemoteInboundStats(e,t){const i=this.report.get(e);i&&(t.packetsLost=i.packetsLost,i.roundTripTime&&(t.rttMs=1e3*i.roundTripTime),i.jitter&&(t.jitterMs=1e3*i.jitter),i.timestamp&&(t.timestamp=i.timestamp))}getCodecFromCodecStats(e){const t=this.report.get(e);if(!t)return"";const i=t.mimeType.match(/\/(.*)$/);return i&&i[1]?i[1]:""}updateSendBitrate(){let e=0,t=null,i=null;this.mediaBytesSent.forEach((t=>{e+=t.diffMean()})),this.mediaBytesRetransmit.forEach((e=>{t=null===t?e.diffMean():t+e.diffMean()})),this.mediaBytesTargetEncode.forEach((e=>{i=null===i?e.diffMean():i+e.diffMean()}));const n=null!==t?e-t:e;this._stats.bitrate={actualEncoded:8*n/(this.options.updateInterval/1e3),transmit:8*e/(this.options.updateInterval/1e3)},null!==t&&(this._stats.bitrate.retransmit=8*t/(this.options.updateInterval/1e3)),null!==i&&(this._stats.bitrate.targetEncoded=8*i/(this.options.updateInterval/1e3))}}class CM extends gM{updateStats(){return nb.resolve()}}function wM(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:8,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:500,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1e4;const s=function(){const e=navigator.userAgent.toLocaleLowerCase().match(/chrome\/[\d]*/i);return e&&e[0]?Number(e[0].split("/")[1]):null}();return s?s<76?new bM(e,{updateInterval:t,lossRateInterval:i,freezeRateLimit:n,firstVideoDecodedTimeout:r}):new EM(e,{updateInterval:t,lossRateInterval:i,freezeRateLimit:n,firstVideoDecodedTimeout:r}):function(e){return!!window.RTCStatsReport&&e.getStats()instanceof nb}(e)?new EM(e,{updateInterval:t,lossRateInterval:i,freezeRateLimit:n,firstVideoDecodedTimeout:r}):new CM(e,{updateInterval:t,lossRateInterval:i,freezeRateLimit:n,firstVideoDecodedTimeout:r})}function SM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function TM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?SM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):SM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class AM extends kS{get peerConnectionState(){return this.peerConnection.connectionState}get iceConnectionState(){return this.peerConnection.iceConnectionState}get currentLocalDescription(){return this.peerConnection.currentLocalDescription}get currentRemoteDescription(){return this.peerConnection.currentRemoteDescription}constructor(e,t){super(e,t),oh(this,"store",void 0),oh(this,"peerConnection",void 0),oh(this,"remoteSDP",void 0),oh(this,"initialOffer",void 0),oh(this,"statsFilter",void 0),oh(this,"useRTX",!1),oh(this,"localCapabilities",void 0),oh(this,"localCandidateCount",0),oh(this,"allCandidatesReceived",!1),oh(this,"establishPromise",void 0),oh(this,"mutex",new G_("P2PConnection-mutex")),this.store=t,this.peerConnection=new RTCPeerConnection(AM.resolvePCConfiguration(e),{optional:[{googDscp:!0}]}),this.statsFilter=wM(this.peerConnection,xC("STATS_UPDATE_INTERVAL"),void 0,Cb()?1200:void 0),this.bindPCEvents(),this.bindStatsEvents(),this.store.p2pId=this.store.p2pId+1,this.establishPromise=this.establish()}async establish(){try{const e=await this.peerConnection.createOffer({offerToReceiveAudio:!0,offerToReceiveVideo:!0});if(!e.sdp)throw new Error("Cannot get initialOffer.sdp when trying to establish PeerConnection.");const t=jL(e.sdp),i=VL(e.sdp,{filterRTX:!this.useRTX,filterVideoFec:xC("FILTER_VIDEO_FEC"),filterAudioFec:xC("FILTER_AUDIO_FEC"),filterAudioCodec:["opus"]});return this.localCapabilities=i,this.initialOffer=e,TM(TM({},t),{},{rtpCapabilities:{send:{audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},recv:{audioCodecs:[],audioExtensions:[],videoCodecs:[],videoExtensions:[]},sendrecv:i},offerSDP:e.sdp})}catch(e){throw new Fb(Bb.GET_LOCAL_CONNECTION_PARAMS_FAILED,e.toString())}}async connect(e,t,i,n,r,s){try{if(!this.initialOffer)throw new Error("Cannot establish P2PConnection without initial offer.");this.remoteSDP=new class{constructor(e){oh(this,"sessionDesc",void 0),oh(this,"localCapabilities",void 0),oh(this,"rtpCapabilities",void 0),oh(this,"candidates",void 0),oh(this,"iceParameters",void 0),oh(this,"dtlsParameters",void 0),oh(this,"setup",void 0),oh(this,"currentMidIndex",void 0),oh(this,"cname",void 0),e=O_(e);const{remoteIceParameters:t,remoteDtlsParameters:i,candidates:n,remoteRTPCapabilities:r,remoteSetup:s,localCapabilities:o,sdkCodec:a,cname:c}=e,l=UL.parse("v=0\no=- 0 0 IN IP4 127.0.0.1\ns=AgoraGateway\nt=0 0\na=group:BUNDLE audio video\na=msid-semantic: WMS\na=ice-lite\nm=audio 9 UDP/TLS/RTP/SAVPF 0\nc=IN IP4 127.0.0.1\na=rtcp:9 IN IP4 0.0.0.0\na=sendrecv\na=rtcp-mux\na=rtcp-rsize\na=mid:audio\nm=video 9 UDP/TLS/RTP/SAVPF 0\nc=IN IP4 127.0.0.1\na=rtcp:9 IN IP4 0.0.0.0\na=sendrecv\na=rtcp-mux\na=rtcp-rsize\na=mid:video\n");this.rtpCapabilities=r,this.candidates=n,this.iceParameters=t,this.dtlsParameters=i,this.setup=s,this.localCapabilities=o,this.cname=c;for(let e=0;e<l.mediaDescriptions.length;e++){const o=l.mediaDescriptions[e];o.attributes.iceUfrag=t.iceUfrag,o.attributes.icePwd=t.icePwd,o.attributes.fingerprints=i.fingerprints,o.attributes.candidates=n,o.attributes.setup=s,"video"===o.media.mediaType&&(o.media.fmts=r.videoCodecs.map((e=>e.payloadType.toString(10))),o.attributes.payloads=r.videoCodecs,o.attributes.extmaps=r.videoExtensions),"audio"===o.media.mediaType&&(o.media.fmts=r.audioCodecs.map((e=>e.payloadType.toString(10))),o.attributes.payloads=r.audioCodecs,o.attributes.extmaps=r.audioExtensions),l.mediaDescriptions[e]=this.mungMediaDesc(o)}this.sessionDesc=l,this.currentMidIndex=l.mediaDescriptions.length-1}toString(){return UL.print(this.sessionDesc)}send(e,t,i){const{ssrcs:n,ssrcGroups:r}=zL(t,this.cname),s=this.sessionDesc.mediaDescriptions.find((t=>e===lS.VIDEO?"video"===t.media.mediaType:"audio"===t.media.mediaType)),o=n[0].attributes.label,a=n[0].attributes.mslabel;return s.attributes.ssrcs=s.attributes.ssrcs.concat(n),s.attributes.ssrcGroups=s.attributes.ssrcGroups.concat(r),{id:o,mslabel:a}}batchSend(e){return e.map((e=>{let{kind:t,ssrcMsg:i}=e;return this.send(t,i,void 0)}))}stopSending(e){this.sessionDesc.mediaDescriptions.forEach((t=>{const i=[],n=[],r=[];t.attributes.ssrcs.forEach((t=>{Di(e).call(e,t.attributes.label||"")?r.push(t):i.push(t)})),t.attributes.ssrcGroups.forEach((e=>{var t;Di(t=r.map((e=>e.ssrcId))).call(t,e.ssrcIds[0])||n.push(e)})),t.attributes.ssrcs=i,t.attributes.ssrcGroups=n}))}mute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.mute."));t.attributes.direction="inactive"}unmute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.unmute."));t.attributes.direction="sendonly"}receive(e,t,i){e.forEach(((e,t)=>{const i=e._mediaStreamTrack,n=this.sessionDesc.mediaDescriptions.findIndex((e=>e.attributes.mid===i.kind)),r=this.mungRecvMediaDsec(this.sessionDesc.mediaDescriptions[n],e);this.sessionDesc.mediaDescriptions[n]=r}))}stopReceiving(e){}updateCandidates(e){e===dS.TCP?this.candidates.forEach((e=>{-1===this.candidates.findIndex((t=>"tcp"===t.transport&&t.connectionAddress===e.connectionAddress&&t.port===e.port))&&this.candidates.push(rM(rM({},e),{},{foundation:"tcpcandidate",priority:Number(e.priority)-1+"",transport:"tcp",port:Number(e.port)+90+""}))})):this.candidates=this.candidates.filter((e=>"tcp"!==e.transport));for(const e of this.sessionDesc.mediaDescriptions)e.attributes.candidates=this.candidates}restartICE(e){e=O_(e),this.iceParameters=e,this.sessionDesc.mediaDescriptions.forEach((t=>{t.attributes.iceUfrag=e.iceUfrag,t.attributes.icePwd=e.icePwd}))}predictReceivingMids(e){const t=[];for(let i=0;i<e;i++)t.push((this.currentMidIndex+i+1).toString(10));return t}mungRecvMediaDsec(e,t){const i=O_(e);return WL(i,t),GL(i,t),i}updateRecvMedia(e,t){const i=this.sessionDesc.mediaDescriptions.findIndex((t=>t.attributes.mid===e));if(-1!==i){const e=this.mungRecvMediaDsec(this.sessionDesc.mediaDescriptions[i],t);this.sessionDesc.mediaDescriptions[i]=e}}bumpMid(e){this.currentMidIndex+=e}updateTrackLabel(e,t,i){const n=this.sessionDesc.mediaDescriptions.find((t=>e===lS.VIDEO?"video"===t.attributes.mid:"audio"===t.attributes.mid));if(n){const e=n.attributes.ssrcs.find((e=>e.attributes.label===t));var r;e&&(e.attributes.label=i,null===(r=e.attributes.msid)||void 0===r||r.replace(t,i))}}mungMediaDesc(e){const t=O_(e);return KL(t),function(e){const t=e.attributes.extmaps.find((e=>"http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01"===e.extensionName));t&&e.attributes.extmaps.splice(e.attributes.extmaps.indexOf(t),1),e.attributes.payloads.forEach((e=>{const t=e.rtcpFeedbacks.findIndex((e=>"transport-cc"===e.type));-1!==t&&e.rtcpFeedbacks.splice(t,1)}))}(t),t}getSSRC(e){for(const t of this.sessionDesc.mediaDescriptions)for(const i of t.attributes.ssrcs)if(i.attributes.label===e)return[i]}}({remoteIceParameters:e,remoteDtlsParameters:t,candidates:i,remoteRTPCapabilities:n.send,remoteSetup:r,localCapabilities:this.localCapabilities,sdkCodec:this.store.codec,cname:s});const o=this.remoteSDP.toString();await this.peerConnection.setLocalDescription(this.initialOffer),await this.peerConnection.setRemoteDescription({type:"answer",sdp:o})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.connect failed; ".concat(e.toString()))}}send(e,t){var i=this;return LL((function*(){const n=yield ML(i.mutex.lock());try{if(!i.remoteSDP)throw new Error("Cannot call P2PConnection.send before remote SDP created");const r=e.map((e=>i.peerConnection.addTrack(e._mediaStreamTrack))),s=yield ML(i.peerConnection.createOffer()),o=UL.parse(s.sdp),a=e.map((e=>{const t=e._mediaStreamTrack,n=o.mediaDescriptions.find((e=>e.attributes.mid===t.kind));if(!n)throw new Error("Cannot extract ssrc from mediaDescription.");return function(e,t,i){const n=e.attributes.ssrcs.filter((e=>e.attributes.label===t)),r=e.attributes.ssrcGroups;if(0===n.length)throw new Error("Cannot extract ssrc from plan-b SDP.");if(r&&n.length>1){const e=r.find((e=>-1!==e.ssrcIds.indexOf(n[0].ssrcId)));return e?[{ssrcId:e.ssrcIds[0],rtx:i?e.ssrcIds[1]:void 0}]:[{ssrcId:n[0].ssrcId}]}return[{ssrcId:n[0].ssrcId}]}(n,t.id,i.useRTX)}));let c;try{c=yield a}catch(e){throw r.forEach((e=>{Eb()&&e.replaceTrack(null),i.peerConnection.removeTrack(e)})),e}const l=i.mungSendOfferSDP(s.sdp,e);i.remoteSDP.receive(e,t,c);const d=i.remoteSDP.toString();return yield ML(i.peerConnection.setLocalDescription({type:"offer",sdp:l})),yield ML(i.applySendEncodings(r,e)),yield ML(i.peerConnection.setRemoteDescription({type:"answer",sdp:d})),e.map(((e,t)=>{const i=e._mediaStreamTrack.id;return{localSSRC:a[t],id:i}}))}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.send failed; ".concat(e.toString()))}finally{n()}}))()}async stopSending(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.stopSending before remote SDP created");const t=this.peerConnection.getSenders().filter((t=>{var i;return-1!==e.indexOf((null===(i=t.track)||void 0===i?void 0:i.id)||"")}));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length when trying to call P2PConnection.stopSending.");t.map((e=>{Eb()&&e.replaceTrack(null),this.peerConnection.removeTrack(e)}));const i=await this.peerConnection.createOffer();await this.peerConnection.setLocalDescription(i),this.remoteSDP.stopReceiving(e);const n=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"answer",sdp:n})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.stopSending failed; ".concat(e.toString()))}}async receive(e,t,i,n){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.receive ".concat(e," before remoteSDP created."));const{id:i,mslabel:r}=this.remoteSDP.send(e,t,n),s=new nb(((t,n)=>{const s=setTimeout((()=>{n(new Error("Cannot receive track, id: ".concat(i)))}),1e4),o=n=>{const a=pb();if(("Safari"===a.name&&11===Number(a.version)||wb())&&n.track.id!==i&&n.streams[0].id===r){var c;const r=n.streams[0].getTracks()[0];return null===(c=this.remoteSDP)||void 0===c||c.updateTrackLabel(e,i,n.track.id),this.peerConnection.removeEventListener("track",o),clearTimeout(s),void t(r)}if(n.track.id===i)return this.peerConnection.removeEventListener("track",o),clearTimeout(s),void t(n.track)};this.peerConnection.addEventListener("track",o)})),o=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:o});const a=await this.peerConnection.createAnswer();return await this.peerConnection.setLocalDescription(a),{track:await s,id:i}}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.receive failed; ".concat(e.toString()))}}async stopReceiving(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.stopReceiving before remote SDP created.");this.remoteSDP.stopSending(e);const t=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const i=await this.peerConnection.createAnswer();await this.peerConnection.setLocalDescription(i)}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection stopReceiving failed; ".concat(e.toString()))}}async muteRemote(e){}async unmuteRemote(e){}async muteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.muteLocal before remote SDP created.");const t=this.peerConnection.getSenders().filter((t=>{var i;return-1!==e.indexOf((null===(i=t.track)||void 0===i?void 0:i.id)||"")}));if(t.length!==e.length)throw new Error("sender' length doesn't match mids' length.");t.map((e=>{if(Eb()&&e.track)e.track.enabled=!1;else{const t=e.getParameters();t.encodings.forEach((e=>e.active=!1)),e.setParameters(t)}}))}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.muteLocal failed; ".concat(e.toString()))}}async unmuteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.unmuteLocal before remote SDP created.");const t=this.peerConnection.getSenders().filter((t=>{var i;return-1!==e.indexOf((null===(i=t.track)||void 0===i?void 0:i.id)||"")}));if(t.length!==e.length)throw new Error("Senders' length doesn't match mids' length.");t.map((async e=>{if(Eb()&&e.track)e.track.enabled=!0;else{const t=e.getParameters();t.encodings.forEach((e=>e.active=!0)),await e.setParameters(t)}}));const i=await this.peerConnection.createOffer();await this.peerConnection.setLocalDescription(i);const n=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"answer",sdp:n})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.unmuteLocal failed; ".concat(e.toString()))}}restartICE(e){var t=this;return LL((function*(){const i=yield ML(t.mutex.lock("From P2PConnection.restartICE"));try{if(!t.remoteSDP)throw new Error("Cannot restartICE before remoteSDP created.");if(uA().supportPCSetConfiguration){const i=t.peerConnection.getConfiguration(),n=e===dS.RELAY?"relay":"all";i.iceTransportPolicy!==n&&($C.debug("[".concat(t.store.clientId,"] restartICE change iceTransportPolicy from [").concat(i.iceTransportPolicy,"] to [").concat(n,"]")),i.iceTransportPolicy=n,t.peerConnection.setConfiguration(i))}else if(e===dS.RELAY)return;e!==dS.RELAY&&t.remoteSDP.updateCandidates(e);const n=yield ML(t.peerConnection.createOffer({iceRestart:!0}));if(!n.sdp)throw new Error("Cannot restartICE because restart offer SDP does not exist.");const r=jL(n.sdp),{remoteIceParameters:s}=yield r.iceParameters;t.remoteSDP.restartICE(s);const o=t.remoteSDP.toString();yield ML(t.peerConnection.setLocalDescription(n)),yield ML(t.peerConnection.setRemoteDescription({type:"answer",sdp:o}))}catch(e){$C.warning("[".concat(t.store.clientId,"] restart ICE failed, abort operation"),e)}finally{i()}}))()}close(){var e;this.peerConnection.close(),null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,"closed"),this.unbindPCEvents(),this.unbindStatsEvents(),this.removeAllListeners(),this.statsFilter.destroy()}getStats(){return this.statsFilter.getStats()}getRemoteVideoIsReady(e){return this.statsFilter.getVideoIsReady(e)}async updateEncoderConfig(e,t){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.updateEncoderConfig before remote SDP created.");const e=await this.peerConnection.createOffer(),i=this.mungSendOfferSDP(e.sdp,[t]);this.remoteSDP.updateRecvMedia(t._mediaStreamTrack.kind,t);const n=this.remoteSDP.toString();await this.peerConnection.setLocalDescription({type:"offer",sdp:i}),await this.peerConnection.setRemoteDescription({type:"answer",sdp:n})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,e.toString())}}async updateSendParameters(e,t){const i=this.peerConnection.getSenders().filter((t=>{var i;return(null===(i=t.track)||void 0===i?void 0:i.id)===e}));1===i.length&&await this.applySendEncodings(i,[t])}setStatsRemoteVideoIsReady(e,t){this.statsFilter.setVideoIsReady2(e,t)}async replaceTrack(e,t){const i=this.peerConnection.getSenders().find((e=>{var i;return(null===(i=e.track)||void 0===i?void 0:i.id)===t}));i&&await i.replaceTrack(e._mediaStreamTrack)}createDataChannels(e,t){throw new Fb(Bb.NOT_SUPPORTED,"Planb mode does not support createDataChannels.")}stopDataChannels(e){throw new Fb(Bb.NOT_SUPPORTED,"Planb mode does not support stopDataChannels.")}bindPCEvents(){this.peerConnection.oniceconnectionstatechange=()=>{var e;null===(e=this.onICEConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.iceConnectionState)},this.peerConnection.onconnectionstatechange=()=>{var e;null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.connectionState)},this.peerConnection.onicecandidate=e=>{e.candidate?this.localCandidateCount+=1:(this.peerConnection.onicecandidate=null,this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] local candidate count"),this.localCandidateCount))},setTimeout((()=>{this.allCandidatesReceived||(this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] onicecandidate timeout, local candidate count"),this.localCandidateCount))}),xC("CANDIDATE_TIMEOUT"))}unbindPCEvents(){this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicecandidateerror=null,this.peerConnection.onicecandidate=null,this.peerConnection.ontrack=null}static resolvePCConfiguration(e){const t={iceServers:[],sdpSemantics:"plan-b"};return e.iceServers?t.iceServers=e.iceServers:e.turnServer&&"off"!==e.turnServer.mode&&(g_(e.turnServer.servers)?t.iceServers=e.turnServer.servers:(t.iceServers&&t.iceServers.push(...AM.turnServerConfigToIceServers(e.turnServer.servers)),xC("USE_TURN_SERVER_OF_GATEWAY")&&t.iceServers&&e.turnServer.serversFromGateway&&t.iceServers.push(...AM.turnServerConfigToIceServers(e.turnServer.serversFromGateway)),e.turnServer.servers.concat(e.turnServer.serversFromGateway||[]).forEach((e=>{e.forceturn&&(t.iceTransportPolicy="relay")})))),t}static turnServerConfigToIceServers(e){const t=[];return e.forEach((e=>{e.security?e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turns:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=tcp")}):(e.udpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.udpport,"?transport=udp")}),e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=tcp")}))})),t}async updateRtpSenderEncodings(e,t){var i;if(t||(t=this.peerConnection.getSenders().find((t=>{var i;return(null===(i=t.track)||void 0===i?void 0:i.id)===e._mediaStreamTrack.id}))),!t)return $C.warn("[".concat(e.getTrackId(),"] no rtpSender found}"));if(!uA().supportSetRtpSenderParameters)return $C.warn("Browser not support set rtp-sender parameters");const n={},r={};if(e instanceof vR)switch(e._optimizationMode){case"motion":n.degradationPreference="maintain-framerate";break;case"detail":n.degradationPreference="maintain-resolution";break;default:n.degradationPreference="balanced"}if(xC("DSCP_TYPE")&&Db()){var s;const e=xC("DSCP_TYPE");Di(s=["very-low","low","medium","high"]).call(s,e)&&(r.networkPriority=e)}const o=t.getParameters(),a=null===(i=o.encodings)||void 0===i?void 0:i[0];a&&Object.assign(a,r),Object.assign(o,n),$C.debug("[".concat(e.getTrackId(),"] updateRtpSenderEncodings: ").concat(JSON.stringify(o.encodings))),await t.setParameters(o)}async applySendEncodings(e,t){try{if(!uA().supportSetRtpSenderParameters)return;if(e.length!==t.length)return;for(let i=0;i<e.length;i++){const n=e[i],r=t[i];n&&r&&await this.updateRtpSenderEncodings(r,n)}}catch(e){$C.debug("[".concat(this.store.clientId,"] Apply RTPSendEncodings failed."))}}mungSendOfferSDP(e,t){const i=UL.parse(e);return t.forEach(((e,t)=>{const n=e._mediaStreamTrack,r=i.mediaDescriptions.find((e=>e.attributes.mid===n.kind));r&&WL(r,e)})),UL.print(i)}bindStatsEvents(){this.statsFilter.onFirstAudioReceived=e=>{var t;null===(t=this.onFirstAudioReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoReceived=e=>{var t;null===(t=this.onFirstVideoReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstAudioDecoded=e=>{var t;null===(t=this.onFirstAudioDecoded)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoDecoded=(e,t,i)=>{var n;null===(n=this.onFirstVideoDecoded)||void 0===n||n.call(this,e,t,i)},this.statsFilter.onSelectedLocalCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedLocalCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onSelectedRemoteCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedRemoteCandidateChanged)||void 0===i||i.call(this,e,t)}}unbindStatsEvents(){this.statsFilter.onFirstAudioReceived=void 0,this.statsFilter.onFirstVideoReceived=void 0,this.statsFilter.onFirstAudioDecoded=void 0,this.statsFilter.onFirstVideoDecoded=void 0,this.statsFilter.onSelectedLocalCandidateChanged=void 0,this.statsFilter.onSelectedRemoteCandidateChanged=void 0}async batchReceive(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.batchReceive before remoteSDP created.");const t=this.remoteSDP.batchSend(e).map(((t,i)=>{let{id:n,mslabel:r}=t;const{kind:s}=e[i];return new nb(((e,t)=>{const i=setTimeout((()=>{t(new Error("Cannot receive track, id: ".concat(n)))}),1e4),o=t=>{const a=pb();if("Safari"===a.name&&11===Number(a.version)&&t.track.id!==n&&t.streams[0].id===r){var c;const r=t.streams[0].getTracks()[0];return null===(c=this.remoteSDP)||void 0===c||c.updateTrackLabel(s,n,t.track.id),this.peerConnection.removeEventListener("track",o),clearTimeout(i),void e({track:r,id:n})}if(t.track.id===n)return this.peerConnection.removeEventListener("track",o),clearTimeout(i),void e({track:t.track,id:n})};this.peerConnection.addEventListener("track",o)}))})),i=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:i});const n=await this.peerConnection.createAnswer();return await this.peerConnection.setLocalDescription(n),await nb.all(t)}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.receive failed; ".concat(e.toString()))}}async getRemoteSSRC(e){if(!this.remoteSDP)return;const t=this.remoteSDP.getSSRC(e);return null==t?void 0:t[0].ssrcId}setConfiguration(e){if(uA().supportPCSetConfiguration){const t=AM.resolvePCConfiguration(e);this.peerConnection.setConfiguration(t)}}}function RM(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("Locking from P2PConnection.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}function OM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function IM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?OM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):OM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([RM,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],AM.prototype,"connect",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],AM.prototype,"stopSending",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String,Array,String,Object]),xw("design:returntype",nb)],AM.prototype,"receive",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],AM.prototype,"stopReceiving",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],AM.prototype,"muteRemote",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],AM.prototype,"unmuteRemote",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],AM.prototype,"muteLocal",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],AM.prototype,"unmuteLocal",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],AM.prototype,"close",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],AM.prototype,"updateEncoderConfig",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],AM.prototype,"updateSendParameters",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[JT,String]),xw("design:returntype",nb)],AM.prototype,"replaceTrack",null),Mw([RM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],AM.prototype,"getRemoteSSRC",null);const kM="9",NM=4e4;function LM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function MM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?LM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):LM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}let xM=class e extends kS{get currentLocalDescription(){return this.peerConnection.currentLocalDescription}get currentRemoteDescription(){return this.peerConnection.currentRemoteDescription}get peerConnectionState(){return this.peerConnection.connectionState}get iceConnectionState(){return this.peerConnection.iceConnectionState}get dtlsTransportState(){var e,t;return null!==(e=null===(t=this.peerConnection.getReceivers()[0])||void 0===t||null===(t=t.transport)||void 0===t?void 0:t.state)&&void 0!==e?e:null}constructor(t,i){super(t,i),oh(this,"store",void 0),oh(this,"peerConnection",void 0),oh(this,"remoteSDP",void 0),oh(this,"initialOffer",void 0),oh(this,"transportEventReceiver",void 0),oh(this,"statsFilter",void 0),oh(this,"useXR",xC("USE_XR")),oh(this,"localCapabilities",void 0),oh(this,"localCandidateCount",0),oh(this,"allCandidatesReceived",!1),oh(this,"dataStreamChannelMap",new Map),oh(this,"establishPromise",void 0),oh(this,"mutex",new G_("P2PConnection-mutex")),this.store=i,this.peerConnection=new RTCPeerConnection(e.resolvePCConfiguration(t),{optional:[{googDscp:!0}]}),this.statsFilter=wM(this.peerConnection,xC("STATS_UPDATE_INTERVAL"),void 0,Cb()?1200:void 0),this.bindPCEvents(),this.bindStatsEvents(),this.store.p2pId=this.store.p2pId+1,this.establishPromise=this.establish()}async establish(){try{this.peerConnection.addTransceiver("video",{direction:"recvonly"}),this.peerConnection.addTransceiver("audio",{direction:"recvonly"});const e=await this.peerConnection.createOffer();if(!e.sdp)throw new Error("Cannot get initialOffer.sdp when trying to establish PeerConnection.");const t=jL(e.sdp),i=await ZL({filterRTX:!xC("USE_PUB_RTX")&&!xC("USE_SUB_RTX"),filterVideoFec:xC("FILTER_VIDEO_FEC"),filterAudioFec:xC("FILTER_AUDIO_FEC")},{useXR:this.useXR});return this.localCapabilities=JL(i),this.initialOffer=e,MM(MM({},t),{},{rtpCapabilities:i,offerSDP:e.sdp})}catch(e){throw new Fb(Bb.GET_LOCAL_CONNECTION_PARAMS_FAILED,e.toString())}}async connect(e,t,i,n,r,s){try{if(!this.initialOffer)throw new Error("Cannot establish P2PConnection without initial offer.");this.remoteSDP=new class{get localCapabilities(){return O_(this._localCapabilities)}get rtpCapabilities(){return O_(this._rtpCapabilities)}get candidates(){return O_(this._candidates)}get iceParameters(){return O_(this._iceParameters)}get dtlsParameters(){return O_(this._dtlsParameters)}constructor(e){oh(this,"sessionDesc",void 0),oh(this,"_localCapabilities",void 0),oh(this,"_rtpCapabilities",void 0),oh(this,"_candidates",void 0),oh(this,"_iceParameters",void 0),oh(this,"_dtlsParameters",void 0),oh(this,"setup",void 0),oh(this,"currentMidIndex",void 0),oh(this,"cname",void 0),oh(this,"firefoxSsrcMidMap",new Map),e=O_(e);const{remoteIceParameters:t,remoteDtlsParameters:i,candidates:n,remoteRTPCapabilities:r,remoteSetup:s,localCapabilities:o,cname:a}=e,c=UL.parse("v=0\no=- 0 0 IN IP4 127.0.0.1\ns=AgoraGateway\nt=0 0\na=group:BUNDLE 0 1\na=msid-semantic: WMS\na=ice-lite\nm=video 9 UDP/TLS/RTP/SAVPF 0\nc=IN IP4 127.0.0.1\na=rtcp:9 IN IP4 0.0.0.0\na=sendonly\na=rtcp-mux\na=rtcp-rsize\na=mid:0\nm=audio 9 UDP/TLS/RTP/SAVPF 0\nc=IN IP4 127.0.0.1\na=rtcp:9 IN IP4 0.0.0.0\na=sendonly\na=rtcp-mux\na=rtcp-rsize\na=mid:1\n");this._rtpCapabilities=r,this._candidates=n,this._iceParameters=t,this._dtlsParameters=i,this._localCapabilities=o,this.setup=s,this.cname=a;const l=this.rtpCapabilities.send;for(const e of c.mediaDescriptions){if(e.attributes.iceUfrag=t.iceUfrag,e.attributes.icePwd=t.icePwd,e.attributes.fingerprints=i.fingerprints,e.attributes.candidates=n,e.attributes.setup=s,"video"===e.media.mediaType&&(e.media.fmts=l.videoCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=l.videoCodecs,e.attributes.extmaps=l.videoExtensions,xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:NM,rtx:xC("USE_SUB_RTX")?40001:void 0}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}if("audio"===e.media.mediaType&&(e.media.fmts=l.audioCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=l.audioCodecs,e.attributes.extmaps=l.audioExtensions,eM(e),xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:2e4}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}}this.sessionDesc=c,this.currentMidIndex=c.mediaDescriptions.length-1}preloadRemoteMedia(){const e=xC("PRELOAD_MEDIA_COUNT");this.rtpCapabilities;const t=this.candidates,i=this.dtlsParameters,n=this.iceParameters,r=this.rtpCapabilities.send;for(let s=1;s<e;s++){const e=2*s+2e4,o=2*s+NM,{ssrcs:a,ssrcGroups:c}=zL([{ssrcId:e}],this.cname),{ssrcs:l,ssrcGroups:d}=zL([{ssrcId:o,rtx:xC("USE_SUB_RTX")?o+1:void 0}],this.cname);this.sessionDesc.mediaDescriptions.push({media:{mediaType:"video",port:kM,protos:["UDP","TLS","RTP","SAVPF"],fmts:r.videoCodecs.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:n.iceUfrag,icePwd:n.icePwd,unrecognized:[],candidates:t,extmaps:r.videoExtensions,fingerprints:i.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:l,ssrcGroups:d,rtcpFeedbackWildcards:[],payloads:r.videoCodecs,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:"sendonly",rtcpMux:!0,rtcpRsize:!0,mid:"".concat(2*s)}}),this.sessionDesc.mediaDescriptions.push({media:{mediaType:"audio",port:kM,protos:["UDP","TLS","RTP","SAVPF"],fmts:r.audioCodecs.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:n.iceUfrag,icePwd:n.icePwd,unrecognized:[],candidates:t,extmaps:r.audioExtensions,fingerprints:i.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:a,ssrcGroups:c,rtcpFeedbackWildcards:[],payloads:r.audioCodecs,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:"sendonly",rtcpMux:!0,rtcpRsize:!0,mid:"".concat(2*s+1)}}),this.currentMidIndex+=2}this.updateBundleMids()}toString(){return UL.print(this.sessionDesc)}send(e,t,i,n){const{ssrcs:r,ssrcGroups:s}=zL(t,this.cname,xC("SYNC_GROUP")?i:void 0),o=this.findPreloadMediaDesc(r);if(o){if(Cb()&&this.firefoxSsrcMidMap.set(r[0].ssrcId,o.attributes.mid),n&&(n.twcc||n.remb)){const e=this.sessionDesc.mediaDescriptions.indexOf(o);return this.sessionDesc.mediaDescriptions[e]=this.mungSendMediaDesc(o,n),{mid:o.attributes.mid,needExchangeSDP:!0}}return{mid:o.attributes.mid,needExchangeSDP:!1}}{const t=this.findAvailableMediaIndex(e,r);let i;return-1===t||1===t&&(Eb()||Rb())||0===t&&xC("USE_SUB_RTX")||Ob()?(i=this.createOrRecycleSendMedia(e,r,s,"sendonly",n),this.updateBundleMids()):(i=O_(this.sessionDesc.mediaDescriptions[t]),i.attributes.direction="sendonly",i.attributes.ssrcs=r,i.attributes.ssrcGroups=s,this.sessionDesc.mediaDescriptions[t]=this.mungSendMediaDesc(i,n)),Cb()&&this.firefoxSsrcMidMap.set(r[0].ssrcId,i.attributes.mid),{mid:i.attributes.mid,needExchangeSDP:!0}}}sendDataChannel(){const{mediaDesc:e,needExchangeSDP:t}=this.createOrRecycleDataChannel();return this.updateBundleMids(),{mid:e.attributes.mid,needExchangeSDP:t}}batchSend(e){const t=e.map((e=>{let{kind:t,ssrcMsg:i,mslabel:n}=e;return this.send(t,i,n)})),i=[];let n=!1;return t.forEach((e=>{let{mid:t,needExchangeSDP:r}=e;r&&(n=!0),i.push(t)})),{mids:i,needExchangeSDP:n}}stopSending(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>t.attributes.mid&&-1!==e.indexOf(t.attributes.mid)));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.stopSending.");t.forEach((e=>{"0"===e.attributes.mid||Cb()||Ob()?e.attributes.ssrcs=[]:(e.attributes.ssrcs=[],e.attributes.direction="inactive",e.media.port="0")})),this.updateBundleMids()}mute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.mute."));t.attributes.direction="inactive"}unmute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.unmute."));t.attributes.direction="sendonly"}muteRemote(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>Di(e).call(e,t.attributes.mid||"")));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.muteRemote.");t.forEach((e=>{e.attributes.direction="inactive"}))}unmuteRemote(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>Di(e).call(e,t.attributes.mid||"")));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.muteRemote.");t.forEach((e=>{e.attributes.direction="recvonly"}))}receive(e,t,i,n){e.forEach(((e,r)=>{this.createOrRecycleRecvMedia(e,[],"recvonly",t,i,n[r])})),this.updateBundleMids()}stopReceiving(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>-1!==e.indexOf(t.attributes.mid)));if(t.length!==e.length)throw new Error("MediaDescriptions' length doesn't match mids's length when calling RemoteSDP.receive.");t.forEach((e=>{e.media.port="0",e.attributes.direction="inactive"})),this.updateBundleMids()}updateCandidates(e){const t=this._candidates.filter((e=>"udp"===e.transport));if(e===dS.TCP){if(0===t.length)return;if(xC("TCP_CANDIDATE_ONLY")){const e=this._candidates.filter((e=>"tcp"===e.transport));t.forEach((t=>{-1===e.findIndex((e=>e.connectionAddress===t.connectionAddress))&&e.push(IM(IM({},t),{},{foundation:"tcpcandidate",priority:Number(t.priority)-1+"",transport:"tcp",port:Number(t.port)+90+""}))})),this._candidates=e}else{const e=[];t.forEach((t=>{e.push(IM(IM({},t),{},{foundation:"tcpcandidate",priority:Number(t.priority)-1+"",transport:"tcp",port:Number(t.port)+90+""}))})),this._candidates=[...t,...e]}}else if(e===dS.RELAY){if(0!==t.length)return;{const e=this._candidates.filter((e=>"tcp"===e.transport));e.forEach((e=>{t.push(IM(IM({},e),{},{foundation:"udpcandidate",priority:Number(e.priority)+1+"",transport:"udp",port:Number(e.port)-90+""}))})),this._candidates=[...t,...e]}}else 0===t.length?(this._candidates.filter((e=>"tcp"===e.transport)).forEach((e=>{t.push(IM(IM({},e),{},{foundation:"udpcandidate",priority:Number(e.priority)+1+"",transport:"udp",port:Number(e.port)-90+""}))})),this._candidates=t):this._candidates=this._candidates.filter((e=>"tcp"!==e.transport));for(const e of this.sessionDesc.mediaDescriptions)e.attributes.candidates=this.candidates}restartICE(e){e=O_(e),this._iceParameters=e,this.sessionDesc.mediaDescriptions.forEach((t=>{t.attributes.iceUfrag=e.iceUfrag,t.attributes.icePwd=e.icePwd}))}predictReceivingMids(e){const t=[];for(let i=0;i<e;i++)t.push((this.currentMidIndex+i+1).toString(10));return t}findAvailableMediaIndex(e,t){return this.sessionDesc.mediaDescriptions.findIndex((i=>{const n=i.media.mediaType===e&&"0"!==i.media.port&&("sendonly"===i.attributes.direction||"sendrecv"===i.attributes.direction)&&0===i.attributes.ssrcs.length;if(Cb()){if(n){const e=this.firefoxSsrcMidMap.get(t[0].ssrcId);return!(e||"0"!==i.attributes.mid&&"1"!==i.attributes.mid)||!(!e||e!==i.attributes.mid)}return!1}return n}))}createOrRecycleDataChannel(){for(const e of this.sessionDesc.mediaDescriptions)if("application"===e.media.mediaType)return{mediaDesc:e,needExchangeSDP:!1};this.currentMidIndex+=1;const e="".concat(this.currentMidIndex),t={media:{mediaType:"application",port:kM,protos:["UDP","DTLS","SCTP"],fmts:["webrtc-datachannel"]},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:this.iceParameters.iceUfrag,icePwd:this.iceParameters.icePwd,unrecognized:[],candidates:this.candidates,extmaps:[],fingerprints:this.dtlsParameters.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:[],ssrcGroups:[],rtcpFeedbackWildcards:[],payloads:[],rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,mid:"".concat(e),sctpPort:"5000"}};return this.sessionDesc.mediaDescriptions.push(t),{mediaDesc:t,needExchangeSDP:!0}}createOrRecycleRecvMedia(e,t,i,n,r,s){const o=e._mediaStreamTrack.kind,a=this.rtpCapabilities.recv,c=this.localCapabilities.send;let l=[];if(o===lS.VIDEO){var d,h;if(xC("H264_PROFILE_LEVEL_ID")&&"h264"===n&&(l=a.videoCodecs.filter((e=>{var t,i,r;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,n)&&(null==e||null===(r=e.fmtp)||void 0===r?void 0:r.parameters["profile-level-id"])===xC("H264_PROFILE_LEVEL_ID")}))),!l||0===(null===(d=l)||void 0===d?void 0:d.length)){const e=c.videoCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,n)}));0!==e.length&&(l=a.videoCodecs.filter((t=>e.some((e=>e.payloadType===t.payloadType)))))}if(xC("USE_PUB_RTX")){const e=l.map((e=>e.payloadType.toString())),t=a.videoCodecs.filter((t=>{var i,n;return"rtx"===(null===(i=t.rtpMap)||void 0===i?void 0:i.encodingName)&&Di(e).call(e,(null===(n=t.fmtp)||void 0===n?void 0:n.parameters.apt)||"")}));l=[...l,...t]}0===l.length&&($C.warning("codec ".concat(n," not included in rtpCapabilities, fallback to default payloads: ").concat(null===(h=a.videoCodecs[0].rtpMap)||void 0===h?void 0:h.encodingName)),l=a.videoCodecs)}else l=a.audioCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,r)})),0===l.length&&($C.warning("codec ".concat(r," not included in rtpCapabilities, fallback to opus")),l=a.audioCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,"opus")})));const u=o===lS.VIDEO?a.videoExtensions:a.audioExtensions;this.currentMidIndex+=1;const p="".concat(this.currentMidIndex);let f={media:{mediaType:o,port:kM,protos:["UDP","TLS","RTP","SAVPF"],fmts:l.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:this.iceParameters.iceUfrag,icePwd:this.iceParameters.icePwd,unrecognized:[],candidates:this.candidates,extmaps:u,fingerprints:this.dtlsParameters.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:t,ssrcGroups:[],rtcpFeedbackWildcards:[],payloads:l,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:i,rtcpMux:!0,rtcpRsize:!0,mid:"".concat(p)}};f=this.mungRecvMediaDsec(f,e,s);const m=this.findFirstClosedMedia(o);if(m){const e=this.sessionDesc.mediaDescriptions.indexOf(m);this.sessionDesc.mediaDescriptions[e]=f}else this.sessionDesc.mediaDescriptions.push(f);return f}createOrRecycleSendMedia(e,t,i,n,r){const s=this.rtpCapabilities.send,o=e===lS.VIDEO?s.videoCodecs:s.audioCodecs,a=e===lS.VIDEO?s.videoExtensions:s.audioExtensions;this.currentMidIndex+=1;const c="".concat(this.currentMidIndex);let l={media:{mediaType:e,port:kM,protos:["UDP","TLS","RTP","SAVPF"],fmts:o.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:this.iceParameters.iceUfrag,icePwd:this.iceParameters.icePwd,unrecognized:[],candidates:this.candidates,extmaps:a,fingerprints:this.dtlsParameters.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:t,ssrcGroups:i,rtcpFeedbackWildcards:[],payloads:o,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:n,rtcpMux:!0,rtcpRsize:!0,mid:"".concat(c)}};l=this.mungSendMediaDesc(l,r);const d=this.findFirstClosedMedia(e);if(d){const e=this.sessionDesc.mediaDescriptions.indexOf(d);this.sessionDesc.mediaDescriptions[e]=l}else this.sessionDesc.mediaDescriptions.push(l);return l}updateBundleMids(){this.sessionDesc.attributes.groups[0].identificationTag=this.sessionDesc.mediaDescriptions.filter((e=>"0"!==e.media.port)).map((e=>e.attributes.mid))}mungRecvMediaDsec(e,t,i){const n=O_(e);return KL(n),WL(n,t),GL(n,t),qL(n),YL(n,i,this.localCapabilities.send),n}mungSendMediaDesc(e,t){const i=O_(e);return YL(i,t,this.localCapabilities.recv),eM(i),i}updateRecvMedia(e,t){const i=this.sessionDesc.mediaDescriptions.findIndex((t=>t.attributes.mid===e));if(-1!==i){const e=this.mungRecvMediaDsec(this.sessionDesc.mediaDescriptions[i],t);this.sessionDesc.mediaDescriptions[i]=e}}bumpMid(e){this.currentMidIndex+=e}findFirstClosedMedia(e){return this.sessionDesc.mediaDescriptions.find((t=>Cb()?"0"===t.media.port&&t.media.mediaType===e:"0"===t.media.port))}findPreloadMediaDesc(e){return this.sessionDesc.mediaDescriptions.find((t=>{var i;return(null===(i=t.attributes)||void 0===i||null===(i=i.ssrcs[0])||void 0===i?void 0:i.ssrcId)===e[0].ssrcId}))}getSSRC(e){var t;return null===(t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e)))||void 0===t?void 0:t.attributes.ssrcs}}({remoteIceParameters:e,remoteDtlsParameters:t,candidates:i,remoteRTPCapabilities:n,remoteSetup:r,localCapabilities:this.localCapabilities,cname:s});const o=this.remoteSDP.toString(),a=UL.parse(this.initialOffer.sdp),c=a.mediaDescriptions.find((e=>"audio"===e.media.mediaType));c&&eM(c),this.useXR&&tM(a);const l=UL.print(a),d=this.logSDPExchange(l||"","offer","local","connect");this.store.descriptionStart(),await this.peerConnection.setLocalDescription({type:"offer",sdp:l}),null==d||d(o),await this.peerConnection.setRemoteDescription({type:"answer",sdp:o});const h=this.peerConnection.getTransceivers()[0];if(null!=h&&h.receiver&&this.tryBindTransportEvents(h.receiver),xC("PRELOAD_MEDIA_COUNT")>0){this.remoteSDP.preloadRemoteMedia();const e=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:e});const t=await this.peerConnection.createAnswer();await this.peerConnection.setLocalDescription(t)}}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.connect failed; ".concat(e.toString()))}}send(e,t,i){var n=this;return LL((function*(){const r=yield ML(n.mutex.lock("From P2PConnection.send"));try{if(!n.remoteSDP)throw new Error("Cannot call P2PConnection.send before remote SDP created");const s=[];e.forEach((e=>{const t=n.peerConnection.addTransceiver(e._mediaStreamTrack,{direction:"sendonly"});s.push(t),e._updateRtpTransceiver(t)})),Cb()&&!0===xC("SIMULCAST")&&(yield ML(n.applySimulcastForFirefox(s,e)));const o=yield ML(n.peerConnection.createOffer()),a=n.remoteSDP.predictReceivingMids(e.length),c=n.mungSendOfferSDP(o.sdp,e,a),l=UL.parse(c),d=a.map((e=>{const t=l.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("Cannot extract ssrc from mediaDescription.");return HL(t,xC("USE_PUB_RTX"))}));let h;try{h=yield d}catch(r){h=[],n.remoteSDP.receive(e,t,i,h);const s=n.remoteSDP.toString();throw yield ML(n.peerConnection.setLocalDescription({type:"offer",sdp:c})),yield ML(n.peerConnection.setRemoteDescription({type:"answer",sdp:s})),yield ML(n.stopSending(a,!0)),r}n.remoteSDP.receive(e,t,i,h);const u=n.remoteSDP.toString(),p=n.logSDPExchange(c,"offer","local","send");return yield ML(n.peerConnection.setLocalDescription({type:"offer",sdp:c})),yield ML(n.applySimulcastEncodings(s,e)),yield ML(n.applySendEncodings(s,e)),null==p||p(u),yield ML(n.peerConnection.setRemoteDescription({type:"answer",sdp:u})),s.map(((e,t)=>{const i=a[t];return{localSSRC:d[t],id:i,transceiver:e}}))}catch(e){throw e instanceof Fb?e:new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.send failed; ".concat(e.toString()))}finally{r()}}))()}async createDataChannels(e,t){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.createDataChannels before remote SDP created");let i=this.dataStreamChannelMap.get(e);i&&"open"===i.readyState?$C.debug("[P2PConnection] Channels are already available and can be reused directly."):(i=this.peerConnection.createDataChannel("datastream-channel",{ordered:!1,maxRetransmits:xC("DATASTREAM_MAX_RETRANSMITS")}),i.binaryType="arraybuffer",this.dataStreamChannelMap.set(e,i)),t.forEach((e=>{e._updateOriginDataChannel(i)}));const{needExchangeSDP:n}=this.remoteSDP.sendDataChannel();if(n){const e=this.remoteSDP.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:e});const t=await this.peerConnection.createAnswer();await this.peerConnection.setLocalDescription(t),$C.debug("[P2PConnection] createDataChannels by exchanging SDP.")}else $C.debug("[P2PConnection] createDataChannels no need to exchange SDP.");return}catch(e){throw e instanceof Fb?e:new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.createDataChannels failed; ".concat(e.toString()))}}async stopDataChannels(e){try{const t=this.dataStreamChannelMap.get(e);return null==t||t.close(),void this.dataStreamChannelMap.delete(e)}catch(e){throw e instanceof Fb?e:new Fb(Bb.DATACHANNEL_FAILED,"P2PConnection.stopDataChannels failed; ".concat(e.toString()))}}async stopSending(e,t){const i=t?void 0:await this.mutex.lock("From P2PConnection.stopSending");try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.stopSending before remote SDP created");const t=this.peerConnection.getTransceivers().filter((t=>-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length when trying to call P2PConnection.stopSending.");t.map((e=>{var t;e.direction="inactive",null===(t=e.stop)||void 0===t||t.call(e)}));const n=await this.peerConnection.createOffer(),r=this.logSDPExchange(n.sdp||"","offer","local","stopSending");await this.peerConnection.setLocalDescription(n),this.remoteSDP.stopReceiving(e);const s=this.remoteSDP.toString();null==r||r(s),await this.peerConnection.setRemoteDescription({type:"answer",sdp:s})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.stopSending failed; ".concat(e.toString()))}finally{i&&i()}}async receive(e,t,i,n){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.receive ".concat(e," before remoteSDP created."));const{mid:r,needExchangeSDP:s}=this.remoteSDP.send(e,t,i,n);if(s){const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","receive");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer(),s=this.mungReceiveAnswerSDP(n.sdp,r,e);null==i||i(s||""),await this.peerConnection.setLocalDescription({type:"answer",sdp:s}),$C.debug("[".concat(this.store.clientId,"] [P2PConnection] receive ").concat(e," by exchanging SDP."))}else $C.debug("[".concat(this.store.clientId,"] [P2PConnection] receive ").concat(e," no need to exchange SDP."));const o=this.peerConnection.getTransceivers().find((e=>e.mid===r));if(!o)throw new Error("Cannot get transceiver after setLocalDescription.");return{track:o.receiver.track,id:r,transceiver:o}}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.receive failed; ".concat(e.toString()))}}async batchReceive(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.batchReceive before remoteSDP created.");const{mids:t,needExchangeSDP:i}=this.remoteSDP.batchSend(e);if(i){const e=this.remoteSDP.toString(),t=this.logSDPExchange(e,"offer","remote","receive");await this.peerConnection.setRemoteDescription({type:"offer",sdp:e});const i=await this.peerConnection.createAnswer();null==t||t(i.sdp||""),await this.peerConnection.setLocalDescription(i),$C.debug("[".concat(this.store.clientId,"] [P2PConnection] batchReceive by exchanging SDP."))}else $C.debug("[".concat(this.store.clientId,"] [P2PConnection] batchReceive no need to exchange SDP."));return t.map((e=>{const t=this.peerConnection.getTransceivers().find((t=>t.mid===e));if(!t)throw new Error("Cannot get transceiver after setLocalDescription.");return{track:t.receiver.track,id:e,transceiver:t}}))}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.receive failed; ".concat(e.toString()))}}async stopReceiving(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.stopReceiving before remote SDP created.");this.remoteSDP.stopSending(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","stopReceiving");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection stopReceiving failed; ".concat(e.toString()))}}async muteRemote(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.muteRemote mid=".concat(e," before remote SDP created."));this.remoteSDP.mute(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","muteRemote");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.muteRemote failed; ".concat(e.toString()))}}async unmuteRemote(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.unmuteRemote mid=".concat(e," before remote SDP created."));this.remoteSDP.unmute(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","unmuteRemote");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.unmuteRemote failed; ".concat(e.toString()))}}async muteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.muteLocal before remote SDP created.");const t=this.peerConnection.getTransceivers().filter((t=>t.mid&&-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length.");t.map((e=>{e.direction="inactive"}));const i=await this.peerConnection.createOffer(),n=this.logSDPExchange(i.sdp||"","offer","local","muteLocal");await this.peerConnection.setLocalDescription(i),this.remoteSDP.muteRemote(e);const r=this.remoteSDP.toString();null==n||n(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.muteLocal failed; ".concat(e.toString()))}}async unmuteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.unmuteLocal before remote SDP created.");const t=this.peerConnection.getTransceivers().filter((t=>t.mid&&-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length.");t.map((async(e,t)=>{e.direction="sendonly"}));const i=await this.peerConnection.createOffer(),n=this.logSDPExchange(i.sdp||"","offer","local","unmuteLocal");await this.peerConnection.setLocalDescription(i),this.remoteSDP.unmuteRemote(e);const r=this.remoteSDP.toString();null==n||n(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.unmuteLocal failed; ".concat(e.toString()))}}restartICE(e){var t=this;return LL((function*(){const i=yield ML(t.mutex.lock("From P2PConnection.restartICE"));try{if(!t.remoteSDP)throw new Error("Cannot restartICE before remoteSDP created.");if(uA().supportPCSetConfiguration){const i=t.peerConnection.getConfiguration(),n=e===dS.RELAY?"relay":"all";i.iceTransportPolicy!==n&&($C.debug("[".concat(t.store.clientId,"] restartICE change iceTransportPolicy from [").concat(i.iceTransportPolicy,"] to [").concat(n,"]")),i.iceTransportPolicy=n,t.peerConnection.setConfiguration(i))}else if(e===dS.RELAY)return;t.remoteSDP.updateCandidates(e);const n=yield ML(t.peerConnection.createOffer({iceRestart:!0}));if(!n.sdp)throw new Error("Cannot restartICE because restart offer SDP does not exist.");const r=jL(n.sdp),{remoteIceParameters:s}=yield r.iceParameters;t.remoteSDP.restartICE(s);const o=t.remoteSDP.toString(),a=t.logSDPExchange(n.sdp||"","offer","local","restartICE");t.store.descriptionStart(),yield ML(t.peerConnection.setLocalDescription(n)),null==a||a(o),yield ML(t.peerConnection.setRemoteDescription({type:"answer",sdp:o}))}catch(e){$C.warning("[".concat(t.store.clientId,"] restart ICE failed, abort operation"),e)}finally{i()}}))()}close(){var e;this.peerConnection.close(),null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,"closed"),this.tryUnbindTransportEvents(),this.unbindPCEvents(),this.unbindStatsEvents(),this.removeAllListeners(),this.transportEventReceiver=void 0,this.statsFilter.destroy(),this.dataStreamChannelMap.clear()}getStats(){return this.statsFilter.getStats()}getRemoteVideoIsReady(e){return this.statsFilter.getVideoIsReady(e)}async updateEncoderConfig(e,t){try{if(!this.remoteSDP)throw new Error("Cannot call P2PConnection.updateEncoderConfig before remote SDP created.");const i=await this.peerConnection.createOffer(),n=this.mungSendOfferSDP(i.sdp,[t],[e]);this.remoteSDP.updateRecvMedia(e,t);const r=this.remoteSDP.toString(),s=this.logSDPExchange(n,"offer","local","updateEncoderConfig");await this.peerConnection.setLocalDescription({type:"offer",sdp:n}),null==s||s(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,e.toString())}}async updateSendParameters(e,t){const i=this.peerConnection.getTransceivers().filter((t=>t.mid===e));1===i.length&&(this.isVP8Simulcast(t)?Cb()||await this.applySimulcastEncodings(i,[t]):await this.applySendEncodings(i,[t]))}setStatsRemoteVideoIsReady(e,t){this.statsFilter.setVideoIsReady2(e,t)}async replaceTrack(e,t){const i=this.peerConnection.getTransceivers().find((e=>e.mid===t));i&&await i.sender.replaceTrack(e._mediaStreamTrack)}async getSelectedCandidatePair(){const e=this.peerConnection.getReceivers();if(e.length>0&&e[0].transport&&e[0].transport.iceTransport&&e[0].transport.iceTransport.getSelectedCandidatePair&&e[0].transport.iceTransport.getSelectedCandidatePair()){const t=e[0].transport.iceTransport,{local:i,remote:n}=t.getSelectedCandidatePair();return{local:MM(MM({},sM),{},{candidateType:i.type,protocol:i.protocol,address:i.address,port:i.port}),remote:MM(MM({},sM),{},{candidateType:n.type,protocol:n.protocol,address:n.address,port:n.port})}}return this.statsFilter.getSelectedCandidatePair()}bindPCEvents(){this.peerConnection.oniceconnectionstatechange=()=>{var e;null===(e=this.onICEConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.iceConnectionState)},this.peerConnection.onconnectionstatechange=()=>{var e;null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.connectionState)},this.peerConnection.onicecandidate=e=>{e.candidate?this.localCandidateCount+=1:(this.peerConnection.onicecandidate=null,this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] local candidate count"),this.localCandidateCount))},setTimeout((()=>{this.allCandidatesReceived||(this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] onicecandidate timeout, local candidate count"),this.localCandidateCount))}),xC("CANDIDATE_TIMEOUT"))}unbindPCEvents(){this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicecandidateerror=null,this.peerConnection.onicecandidate=null,this.peerConnection.ontrack=null}static resolvePCConfiguration(t){const i={iceServers:[]};return t.iceServers?i.iceServers=t.iceServers:t.turnServer&&"off"!==t.turnServer.mode&&(g_(t.turnServer.servers)?i.iceServers=t.turnServer.servers:(i.iceServers&&i.iceServers.push(...e.turnServerConfigToIceServers(t.turnServer.servers)),xC("USE_TURN_SERVER_OF_GATEWAY")&&i.iceServers&&t.turnServer.serversFromGateway&&i.iceServers.push(...e.turnServerConfigToIceServers(t.turnServer.serversFromGateway)),xC("FORCE_TURN_TCP")?i.iceTransportPolicy="relay":t.turnServer.servers.concat(t.turnServer.serversFromGateway||[]).forEach((e=>{e.forceturn&&(i.iceTransportPolicy="relay")})))),xC("ENABLE_ENCODED_TRANSFORM")&&uA().supportWebRTCEncodedTransform&&(i.encodedInsertableStreams=!0),i}static turnServerConfigToIceServers(e){const t=[];return e.forEach((e=>{e.security?e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turns:".concat(aN(e.turnServerURL),":").concat(e.tcpport,"?transport=tcp")}):(e.udpport&&!xC("FORCE_TURN_TCP")&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.udpport,"?transport=udp")}),e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=tcp")}))})),t}tryBindTransportEvents(e){const t=e.transport;if(t){this.transportEventReceiver=e,t.onstatechange=()=>{var e;null!=t&&t.state&&(null===(e=this.onDTLSTransportStateChange)||void 0===e||e.call(this,t.state))},t.onerror=e=>{var t;null===(t=this.onDTLSTransportError)||void 0===t||t.call(this,"error"in e?e.error:e)};const i=t.iceTransport;i&&(i.onstatechange=()=>{const e=null==t?void 0:t.iceTransport.state;var i;e&&(null===(i=this.onICETransportStateChange)||void 0===i||i.call(this,e))},i.getSelectedCandidatePair&&(i.onselectedcandidatepairchange=()=>{if(i.getSelectedCandidatePair()){const{local:e,remote:t}=i.getSelectedCandidatePair();$C.info("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] selectedcandidatepairchange: local ").concat(JSON.stringify({candidateType:e.type,protocol:e.protocol}),", remote ").concat(JSON.stringify({candidateType:t.type,protocol:t.protocol,address:t.address,port:t.port})," )"))}}))}}tryUnbindTransportEvents(){this.transportEventReceiver&&this.transportEventReceiver.transport&&(this.transportEventReceiver.transport.onstatechange=null,this.transportEventReceiver.transport.onerror=null,this.transportEventReceiver.transport.iceTransport&&(this.transportEventReceiver.transport.iceTransport.onstatechange=null))}async updateRtpSenderEncodings(e,t){var i;if(t||(t=this.peerConnection.getSenders().find((t=>t.track===e._mediaStreamTrack))),!t)return $C.warn("[".concat(e.getTrackId(),"] no rtpSender found}"));if(this.isVP8Simulcast(e))return $C.warn("[updateRtpSenderEncodings] Track is VP8 simulcast, please apply simulcast encodings");if(!uA().supportSetRtpSenderParameters)return $C.warn("[updateRtpSenderEncodings] Browser not support set rtp-sender parameters");const n={},r={};switch(e._optimizationMode){case"motion":n.degradationPreference="maintain-framerate";break;case"detail":n.degradationPreference="maintain-resolution";break;default:n.degradationPreference="balanced"}if(e._encoderConfig){var s;const{bitrateMax:t,frameRate:i,scaleResolutionDownBy:n}=e._encoderConfig;t&&(r.maxBitrate=1e3*t),Di(s=e._hints).call(s,NT.LOW_STREAM)&&(i&&(r.maxFramerate=cN(i)),n&&n>=1&&(r.scaleResolutionDownBy=n))}if(xC("DSCP_TYPE")&&Db()){var o;const e=xC("DSCP_TYPE");Di(o=["very-low","low","medium","high"]).call(o,e)&&(r.networkPriority=e)}const a=t.getParameters(),c=null===(i=a.encodings)||void 0===i?void 0:i[0];Cb()&&!c&&(n.encodings=[r]),c&&Object.assign(c,r),Object.assign(a,n),$C.debug("[".concat(e.getTrackId(),"] updateRtpSenderEncodings: ").concat(JSON.stringify(a.encodings))),await t.setParameters(a)}async applySendEncodings(e,t){try{if(!uA().supportSetRtpSenderParameters)return;if(e.length!==t.length)return;for(let i=0;i<e.length;i++){const n=e[i],r=t[i];r instanceof vR&&!this.isVP8Simulcast(r)&&await this.updateRtpSenderEncodings(r,n.sender)}}catch(e){$C.debug("[".concat(this.store.clientId,"] Apply RTPSendEncodings failed."))}}mungSendOfferSDP(e,t,i){const n=UL.parse(e);return t.forEach(((e,t)=>{const r=i[t],s=n.mediaDescriptions.find((e=>e.attributes.mid===r));s&&(WL(s,e),XL(s,e,this.store.codec))})),UL.print(n)}mungReceiveAnswerSDP(e,t,i){const n=UL.parse(e),r=n.mediaDescriptions.find((e=>e.attributes.mid===t));return r&&(i===lS.AUDIO&&"audio"===r.media.mediaType&&eM(r),this.useXR&&tM(n)),UL.print(n)}bindStatsEvents(){this.statsFilter.onFirstAudioReceived=e=>{var t;null===(t=this.onFirstAudioReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoReceived=e=>{var t;null===(t=this.onFirstVideoReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstAudioDecoded=e=>{var t;null===(t=this.onFirstAudioDecoded)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoDecoded=(e,t,i)=>{var n;null===(n=this.onFirstVideoDecoded)||void 0===n||n.call(this,e,t,i)},this.statsFilter.onSelectedLocalCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedLocalCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onSelectedRemoteCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedRemoteCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onFirstVideoDecodedTimeout=e=>{var t;null===(t=this.onFirstVideoDecodedTimeout)||void 0===t||t.call(this,e)}}unbindStatsEvents(){this.statsFilter.onFirstAudioReceived=void 0,this.statsFilter.onFirstVideoReceived=void 0,this.statsFilter.onFirstAudioDecoded=void 0,this.statsFilter.onFirstVideoDecoded=void 0,this.statsFilter.onSelectedLocalCandidateChanged=void 0,this.statsFilter.onSelectedRemoteCandidateChanged=void 0,this.statsFilter.onFirstVideoDecodedTimeout=void 0}async applySimulcastForFirefox(e,t){if(e.length===t.length)for(let a=0;a<e.length;a++){var i,n,r,s,o;const c=e[a],l=t[a];if(l instanceof vR&&!Di(i=l._hints).call(i,NT.LOW_STREAM)&&null!==(n=l._encoderConfig)&&void 0!==n&&n.bitrateMax&&(null===(r=l._encoderConfig)||void 0===r?void 0:r.bitrateMax)>200&&null!==(s=l._scalabilityMode)&&void 0!==s&&s.numSpatialLayers&&(null===(o=l._scalabilityMode)||void 0===o?void 0:o.numSpatialLayers)>1&&"vp8"===this.store.codec){const e={},t={high:1e3*(l._encoderConfig.bitrateMax-50),medium:5e4};e.encodings=[{rid:"m",active:!0,maxBitrate:t.medium,scaleResolutionDownBy:4},{rid:"h",active:!0,maxBitrate:t.high}];const i=c.sender.getParameters();await c.sender.setParameters(Object.assign(i,e))}}}async applySimulcastEncodings(e,t){if(!Cb()&&e.length===t.length)for(let i=0;i<e.length;i++){const n=t[i];if(n instanceof vR&&this.isVP8Simulcast(n)){const t=e[i],r={},s={high:1e3*(n._encoderConfig.bitrateMax-50),medium:5e4};r.encodings=[{active:!0,adaptivePtime:!1,networkPriority:"high",priority:"high",maxBitrate:s.high},{active:!0,adaptivePtime:!1,networkPriority:"low",priority:"low",maxBitrate:s.medium,scaleResolutionDownBy:4}];const o=t.sender.getParameters();await t.sender.setParameters(Object.assign(o,r))}}}isVP8Simulcast(e){var t,i,n,r,s;return!!(e instanceof vR&&xC("SIMULCAST")&&"vp8"===this.store.codec&&!Di(t=e._hints).call(t,NT.LOW_STREAM)&&null!==(i=e._encoderConfig)&&void 0!==i&&i.bitrateMax&&(null===(n=e._encoderConfig)||void 0===n?void 0:n.bitrateMax)>200&&null!==(r=e._scalabilityMode)&&void 0!==r&&r.numSpatialLayers&&(null===(s=e._scalabilityMode)||void 0===s?void 0:s.numSpatialLayers)>1)}logSDPExchange(e,t,i,n){if(xC("SDP_LOGGING"))return $C.upload("[".concat(this.store.clientId,"] exchanging ").concat(i," ").concat(t," SDP during P2PConnection.").concat(n,"\n"),e),"offer"===t?e=>{this.logSDPExchange(e,"answer","local"===i?"remote":"local",n)}:void 0}async getRemoteSSRC(e){if(!this.remoteSDP)return;const t=this.remoteSDP.getSSRC(e);return null==t?void 0:t[0].ssrcId}setConfiguration(t){if(uA().supportPCSetConfiguration){const i=e.resolvePCConfiguration(t);this.peerConnection.setConfiguration(i)}}};function DM(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("From P2PConnection.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}function PM(e,t){let i=document.createElement("video"),n=document.createElement("canvas");i.setAttribute("style","display:none"),n.setAttribute("style","display:none"),i.setAttribute("muted",""),i.muted=!0,i.setAttribute("autoplay",""),i.autoplay=!0,i.setAttribute("playsinline",""),n.width=cN(t.width),n.height=cN(t.height);const r=cN(t.framerate||15);document.body.append(i),document.body.append(n);let s=e._mediaStreamTrack;i.srcObject=new MediaStream([s]),i.play();const o=n.getContext("2d");if(!o)throw new Dw(Bb.UNEXPECTED_ERROR,"can not get canvas context");const a=uA(),c=n.captureStream(a.supportRequestFrame?0:r).getVideoTracks()[0];c.canvas||(c.canvas=n),n.startCapture=()=>{if(!i)return n.stopCapture&&n.stopCapture();if(i.paused&&i.play(),i.videoHeight>2&&i.videoWidth>2){const e=i.videoWidth,t=i.videoHeight/e,r=n.width*t;Math.abs(r-n.height)>=2&&($C.debug("adjust low stream resolution","".concat(n.width,"x").concat(n.height," -> ").concat(n.width,"x").concat(r)),n.height=r)}o.drawImage(i,0,0,n.width,n.height),c.requestFrame&&c.requestFrame(),s!==e._mediaStreamTrack&&(s=e._mediaStreamTrack,i.srcObject=new MediaStream([s]))},n.stopCapture=lA((()=>n.startCapture&&n.startCapture()),r);const l=c.stop;return c.stop=()=>{l.call(c),i&&(i.remove(),i.srcObject=null,i=null),n&&(n.width=0,n.remove(),n.stopCapture&&n.stopCapture(),n.startCapture=void 0,n.stopCapture=void 0,n=null),$C.debug("clean low stream renderer")},c}function UM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function BM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?UM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):UM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],xM.prototype,"connect",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Object,Array]),xw("design:returntype",nb)],xM.prototype,"createDataChannels",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String,Array,String,Object]),xw("design:returntype",nb)],xM.prototype,"receive",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],xM.prototype,"batchReceive",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],xM.prototype,"stopReceiving",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],xM.prototype,"muteRemote",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],xM.prototype,"unmuteRemote",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],xM.prototype,"muteLocal",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],xM.prototype,"unmuteLocal",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],xM.prototype,"close",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],xM.prototype,"updateEncoderConfig",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],xM.prototype,"updateSendParameters",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[JT,String]),xw("design:returntype",nb)],xM.prototype,"replaceTrack",null),Mw([DM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],xM.prototype,"getRemoteSSRC",null);const FM="v=0\no=- 0 0 IN IP4 127.0.0.1\ns=AgoraGateway\nt=0 0\na=group:BUNDLE 0\na=msid-semantic: WMS\na=ice-lite\nm=application 9 UDP/DTLS/SCTP webrtc-datachannel\nc=IN IP4 127.0.0.1\na=mid:0\n",VM="9",jM=2e4,HM=4e4;class $M{get localCapabilities(){return O_(this._localCapabilities)}get rtpCapabilities(){return O_(this._rtpCapabilities)}get candidates(){return O_(this._candidates)}get iceParameters(){return O_(this._iceParameters)}get dtlsParameters(){return O_(this._dtlsParameters)}constructor(e){oh(this,"sessionDesc",void 0),oh(this,"_localCapabilities",void 0),oh(this,"_rtpCapabilities",void 0),oh(this,"_candidates",void 0),oh(this,"_iceParameters",void 0),oh(this,"_dtlsParameters",void 0),oh(this,"setup",void 0),oh(this,"currentMidIndex",void 0),oh(this,"cname",void 0),oh(this,"firefoxSsrcMidMap",new Map),e=O_(e);const{remoteIceParameters:t,remoteDtlsParameters:i,candidates:n,remoteRTPCapabilities:r,remoteSetup:s,localCapabilities:o,cname:a}=e,c=UL.parse(FM);this._rtpCapabilities=r,this._candidates=n,this._iceParameters=t,this._dtlsParameters=i,this._localCapabilities=o,this.setup=s,this.cname=a;const l=this.rtpCapabilities.send;for(const e of c.mediaDescriptions){if(e.attributes.iceUfrag=t.iceUfrag,e.attributes.icePwd=t.icePwd,e.attributes.fingerprints=i.fingerprints,e.attributes.candidates=n,e.attributes.setup=s,"application"===e.media.mediaType&&(e.attributes.sctpPort="5000"),"video"===e.media.mediaType&&(e.media.fmts=l.videoCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=l.videoCodecs,e.attributes.extmaps=l.videoExtensions,xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:HM,rtx:xC("USE_SUB_RTX")?40001:void 0}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}if("audio"===e.media.mediaType&&(e.media.fmts=l.audioCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=l.audioCodecs,e.attributes.extmaps=l.audioExtensions,eM(e),xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:jM}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}}this.sessionDesc=c,this.currentMidIndex=c.mediaDescriptions.length-1}updateRemoteRTPCapabilities(e){const t=UL.parse(FM);this._rtpCapabilities=e;const i=this.rtpCapabilities.send;for(const e of t.mediaDescriptions){if(e.attributes.iceUfrag=this._iceParameters.iceUfrag,e.attributes.icePwd=this._iceParameters.icePwd,e.attributes.fingerprints=this._dtlsParameters.fingerprints,e.attributes.candidates=this._candidates,e.attributes.setup=this.setup,"application"===e.media.mediaType&&(e.attributes.sctpPort="5000"),"video"===e.media.mediaType&&(e.media.fmts=i.videoCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=i.videoCodecs,e.attributes.extmaps=i.videoExtensions,xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:HM,rtx:xC("USE_SUB_RTX")?40001:void 0}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}if("audio"===e.media.mediaType&&(e.media.fmts=i.audioCodecs.map((e=>e.payloadType.toString(10))),e.attributes.payloads=i.audioCodecs,e.attributes.extmaps=i.audioExtensions,xC("PRELOAD_MEDIA_COUNT")>0)){const{ssrcs:t,ssrcGroups:i}=zL([{ssrcId:jM}],this.cname);e.attributes.ssrcs=t,e.attributes.ssrcGroups=i}}this.sessionDesc=t,this.currentMidIndex=t.mediaDescriptions.length-1}preloadRemoteMedia(e){this.rtpCapabilities;const t=this.candidates,i=this.dtlsParameters,n=this.iceParameters,r=this.rtpCapabilities.send;for(let s=1;s<e;s++){const e=2*s+jM,o=2*s+HM,{ssrcs:a,ssrcGroups:c}=zL([{ssrcId:e}],this.cname),{ssrcs:l,ssrcGroups:d}=zL([{ssrcId:o,rtx:xC("USE_SUB_RTX")?o+1:void 0}],this.cname);this.sessionDesc.mediaDescriptions.push({media:{mediaType:"video",port:VM,protos:["UDP","TLS","RTP","SAVPF"],fmts:r.videoCodecs.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:n.iceUfrag,icePwd:n.icePwd,unrecognized:[],candidates:t,extmaps:r.videoExtensions,fingerprints:i.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:l,ssrcGroups:d,rtcpFeedbackWildcards:[],payloads:r.videoCodecs,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:"sendonly",rtcpMux:!0,rtcpRsize:!0,mid:"".concat(2*s-1)}}),this.sessionDesc.mediaDescriptions.push({media:{mediaType:"audio",port:VM,protos:["UDP","TLS","RTP","SAVPF"],fmts:r.audioCodecs.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:n.iceUfrag,icePwd:n.icePwd,unrecognized:[],candidates:t,extmaps:r.audioExtensions,fingerprints:i.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:a,ssrcGroups:c,rtcpFeedbackWildcards:[],payloads:r.audioCodecs,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:"sendonly",rtcpMux:!0,rtcpRsize:!0,mid:"".concat(2*s)}}),this.currentMidIndex+=2}this.updateBundleMids()}toString(){return UL.print(this.sessionDesc)}send(e,t,i,n){const{ssrcs:r,ssrcGroups:s}=zL(t,this.cname,xC("SYNC_GROUP")?i:void 0),o=this.findPreloadMediaDesc(r);if(o){if(Cb()&&this.firefoxSsrcMidMap.set(r[0].ssrcId,o.attributes.mid),n&&(n.twcc||n.remb)){const e=this.sessionDesc.mediaDescriptions.indexOf(o);return this.sessionDesc.mediaDescriptions[e]=this.mungSendMediaDesc(o,n),{mid:o.attributes.mid,needExchangeSDP:!0}}return{mid:o.attributes.mid,needExchangeSDP:!1}}{const t=this.findAvailableMediaIndex(e,r);let i;return-1===t||Eb()||wb()||Rb()||0===t&&xC("USE_SUB_RTX")?(i=this.createOrRecycleSendMedia(e,r,s,"sendonly",n),this.updateBundleMids()):(i=O_(this.sessionDesc.mediaDescriptions[t]),i.attributes.direction="sendonly",i.attributes.ssrcs=r,i.attributes.ssrcGroups=s,this.sessionDesc.mediaDescriptions[t]=this.mungSendMediaDesc(i,n)),Cb()&&this.firefoxSsrcMidMap.set(r[0].ssrcId,i.attributes.mid),{mid:i.attributes.mid,needExchangeSDP:!0}}}batchSend(e){const t=e.map((e=>{let{kind:t,ssrcMsg:i,mslabel:n}=e;return this.send(t,i,n)})),i=[];let n=!1;return t.forEach((e=>{let{mid:t,needExchangeSDP:r}=e;r&&(n=!0),i.push(t)})),{mids:i,needExchangeSDP:n}}stopSending(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>t.attributes.mid&&-1!==e.indexOf(t.attributes.mid)));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.stopSending.");t.forEach((e=>{"0"===e.attributes.mid||Cb()||Eb()||wb()?e.attributes.ssrcs=[]:(e.attributes.ssrcs=[],e.attributes.direction="inactive",e.media.port="0")})),this.updateBundleMids()}mute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.mute."));t.attributes.direction="inactive"}unmute(e){const t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("mediaDescription not found with ".concat(e," in remote SDP when calling RemoteSDP.unmute."));t.attributes.direction="sendonly"}muteRemote(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>Di(e).call(e,t.attributes.mid||"")));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.muteRemote.");t.forEach((e=>{e.attributes.direction="inactive"}))}unmuteRemote(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>Di(e).call(e,t.attributes.mid||"")));if(t.length!==e.length)throw new Error("mediaDescriptions' length doesn't match mids' length when calling RemoteSDP.muteRemote.");t.forEach((e=>{e.attributes.direction="recvonly"}))}receive(e,t,i,n){e.forEach(((e,r)=>{this.createOrRecycleRecvMedia(e,[],"recvonly",t,i,n[r])})),this.updateBundleMids()}stopReceiving(e){const t=this.sessionDesc.mediaDescriptions.filter((t=>-1!==e.indexOf(t.attributes.mid)));if(t.length!==e.length)throw new Error("MediaDescriptions' length doesn't match mids's length when calling RemoteSDP.receive.");t.forEach((e=>{e.media.port="0",e.attributes.direction="inactive"})),this.updateBundleMids()}updateCandidates(e){e===dS.TCP?this._candidates.forEach((e=>{-1===this._candidates.findIndex((t=>"tcp"===t.transport&&t.connectionAddress===e.connectionAddress&&t.port===e.port))&&this._candidates.push(BM(BM({},e),{},{foundation:"tcpcandidate",priority:Number(e.priority)-1+"",transport:"tcp",port:Number(e.port)+90+""}))})):this._candidates=this._candidates.filter((e=>"tcp"!==e.transport));for(const e of this.sessionDesc.mediaDescriptions)e.attributes.candidates=this.candidates}restartICE(e){e=O_(e),this._iceParameters=e,this.sessionDesc.mediaDescriptions.forEach((t=>{t.attributes.iceUfrag=e.iceUfrag,t.attributes.icePwd=e.icePwd}))}predictReceivingMids(e){const t=[];for(let i=0;i<e;i++)t.push((this.currentMidIndex+i+1).toString(10));return t}findAvailableMediaIndex(e,t){return this.sessionDesc.mediaDescriptions.findIndex((i=>{const n=i.media.mediaType===e&&"0"!==i.media.port&&("sendonly"===i.attributes.direction||"sendrecv"===i.attributes.direction)&&0===i.attributes.ssrcs.length;if(Cb()){if(n){const e=this.firefoxSsrcMidMap.get(t[0].ssrcId);return!(e||"0"!==i.attributes.mid&&"1"!==i.attributes.mid)||!(!e||e!==i.attributes.mid)}return!1}return n}))}createOrRecycleRecvMedia(e,t,i,n,r,s){const o=e._mediaStreamTrack.kind,a=this.rtpCapabilities.recv,c=this.localCapabilities.send;let l=[];if(o===lS.VIDEO){var d,h;if(xC("H264_PROFILE_LEVEL_ID")&&"h264"===n&&(l=a.videoCodecs.filter((e=>{var t,i,r;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,n)&&(null==e||null===(r=e.fmtp)||void 0===r?void 0:r.parameters["profile-level-id"])===xC("H264_PROFILE_LEVEL_ID")}))),!l||0===(null===(d=l)||void 0===d?void 0:d.length)){const e=c.videoCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,n)}));0!==e.length&&(l=a.videoCodecs.filter((t=>e.some((e=>e.payloadType===t.payloadType)))))}if(xC("USE_PUB_RTX")){const e=l.map((e=>e.payloadType.toString())),t=a.videoCodecs.filter((t=>{var i,n;return"rtx"===(null===(i=t.rtpMap)||void 0===i?void 0:i.encodingName)&&Di(e).call(e,(null===(n=t.fmtp)||void 0===n?void 0:n.parameters.apt)||"")}));l=[...l,...t]}0===l.length&&($C.warning("codec ".concat(n," not included in rtpCapabilities, fallback to default payloads: ").concat(null===(h=a.videoCodecs[0].rtpMap)||void 0===h?void 0:h.encodingName)),l=a.videoCodecs)}else l=a.audioCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,r)})),0===l.length&&($C.warning("codec ".concat(r," not included in rtpCapabilities, fallback to opus")),l=a.audioCodecs.filter((e=>{var t,i;return Di(t=(null===(i=e.rtpMap)||void 0===i?void 0:i.encodingName.toLowerCase())||"").call(t,"opus")})));const u=o===lS.VIDEO?a.videoExtensions:a.audioExtensions;this.currentMidIndex+=1;const p="".concat(this.currentMidIndex);let f={media:{mediaType:o,port:VM,protos:["UDP","TLS","RTP","SAVPF"],fmts:l.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:this.iceParameters.iceUfrag,icePwd:this.iceParameters.icePwd,unrecognized:[],candidates:this.candidates,extmaps:u,fingerprints:this.dtlsParameters.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:t,ssrcGroups:[],rtcpFeedbackWildcards:[],payloads:l,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:i,rtcpMux:!0,rtcpRsize:!0,mid:"".concat(p)}};f=this.mungRecvMediaDsec(f,e,s);const m=this.findFirstClosedMedia(o);if(m){const e=this.sessionDesc.mediaDescriptions.indexOf(m);this.sessionDesc.mediaDescriptions[e]=f}else this.sessionDesc.mediaDescriptions.push(f);return f}createOrRecycleSendMedia(e,t,i,n,r){const s=this.rtpCapabilities.send,o=e===lS.VIDEO?s.videoCodecs:s.audioCodecs,a=e===lS.VIDEO?s.videoExtensions:s.audioExtensions;this.currentMidIndex+=1;const c="".concat(this.currentMidIndex);let l={media:{mediaType:e,port:VM,protos:["UDP","TLS","RTP","SAVPF"],fmts:o.map((e=>e.payloadType.toString(10)))},connections:[{nettype:"IN",addrtype:"IP4",address:"127.0.0.1"}],bandwidths:[],attributes:{iceUfrag:this.iceParameters.iceUfrag,icePwd:this.iceParameters.icePwd,unrecognized:[],candidates:this.candidates,extmaps:a,fingerprints:this.dtlsParameters.fingerprints,imageattr:[],msids:[],remoteCandidatesList:[],rids:[],ssrcs:t,ssrcGroups:i,rtcpFeedbackWildcards:[],payloads:o,rtcp:{port:"9",netType:"IN",addressType:"IP4",address:"0.0.0.0"},setup:this.setup,direction:n,rtcpMux:!0,rtcpRsize:!0,mid:"".concat(c)}};l=this.mungSendMediaDesc(l,r);const d=this.findFirstClosedMedia(e);if(d){const e=this.sessionDesc.mediaDescriptions.indexOf(d);this.sessionDesc.mediaDescriptions[e]=l}else this.sessionDesc.mediaDescriptions.push(l);return l}updateBundleMids(){this.sessionDesc.attributes.groups[0].identificationTag=this.sessionDesc.mediaDescriptions.filter((e=>"0"!==e.media.port)).map((e=>e.attributes.mid))}mungRecvMediaDsec(e,t,i){const n=O_(e);return KL(n),WL(n,t),GL(n,t),qL(n),YL(n,i,this.localCapabilities.send),n}mungSendMediaDesc(e,t){const i=O_(e);return YL(i,t,this.localCapabilities.recv),eM(i),i}updateRecvMedia(e,t){const i=this.sessionDesc.mediaDescriptions.findIndex((t=>t.attributes.mid===e));if(-1!==i){const e=this.mungRecvMediaDsec(this.sessionDesc.mediaDescriptions[i],t);this.sessionDesc.mediaDescriptions[i]=e}}bumpMid(e){this.currentMidIndex+=e}findFirstClosedMedia(e){return this.sessionDesc.mediaDescriptions.find((t=>Cb()?"0"===t.media.port&&t.media.mediaType===e:"0"===t.media.port))}findPreloadMediaDesc(e){return this.sessionDesc.mediaDescriptions.find((t=>{var i;return(null===(i=t.attributes)||void 0===i||null===(i=i.ssrcs[0])||void 0===i?void 0:i.ssrcId)===e[0].ssrcId}))}getSSRC(e){var t;return null===(t=this.sessionDesc.mediaDescriptions.find((t=>t.attributes.mid===e)))||void 0===t?void 0:t.attributes.ssrcs}}function zM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function WM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?zM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):zM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class KM extends kS{get currentLocalDescription(){return this.peerConnection.currentLocalDescription}get currentRemoteDescription(){return this.peerConnection.currentRemoteDescription}get peerConnectionState(){return this.peerConnection.connectionState}get iceConnectionState(){return this.peerConnection.iceConnectionState}constructor(e,t,i){super(e,t),oh(this,"store",void 0),oh(this,"peerConnection",void 0),oh(this,"remoteSDP",void 0),oh(this,"initialOffer",void 0),oh(this,"transportEventReceiver",void 0),oh(this,"statsFilter",void 0),oh(this,"useXR",xC("USE_XR")),oh(this,"localCapabilities",void 0),oh(this,"localCandidateCount",0),oh(this,"allCandidatesReceived",!1),oh(this,"dataStreamChannelMap",new Map),oh(this,"establishPromise",void 0),oh(this,"mutex",new G_("NVExtentionsConnection-mutex")),oh(this,"rtcMedia",void 0),this.store=t,this.peerConnection=i,this.statsFilter=wM(this.peerConnection,xC("STATS_UPDATE_INTERVAL"),void 0,Cb()?1200:void 0),this.bindPCEvents(),this.bindStatsEvents(),this.store.p2pId=this.store.p2pId+1,this.establishPromise=this.establish()}async establish(e){try{const e=await this.peerConnection.createOffer();if(!e.sdp)throw new Error("Cannot get initialOffer.sdp when trying to establish PeerConnection.");const t=jL(e.sdp),i=await ZL({filterRTX:!xC("USE_PUB_RTX")&&!xC("USE_SUB_RTX"),filterVideoFec:xC("FILTER_VIDEO_FEC"),filterAudioFec:xC("FILTER_AUDIO_FEC")},{useXR:this.useXR});return this.localCapabilities=i,this.initialOffer=e,WM(WM({},t),{},{rtpCapabilities:i,offerSDP:e.sdp})}catch(e){throw new Dw(Bb.GET_LOCAL_CONNECTION_PARAMS_FAILED,e.toString())}}async connect(e,t,i,n,r,s){try{if(!this.initialOffer)throw new Error("Cannot establish NVConnection without initial offer.");this.remoteSDP=new $M({remoteIceParameters:e,remoteDtlsParameters:t,candidates:i,remoteRTPCapabilities:n,remoteSetup:r,localCapabilities:JL(this.localCapabilities),cname:s});const o=this.remoteSDP.toString(),a=UL.parse(this.initialOffer.sdp),c=a.mediaDescriptions.find((e=>"audio"===e.media.mediaType));c&&eM(c),this.useXR&&tM(a);const l=UL.print(a),d=this.logSDPExchange(l||"","offer","local","connect");await this.peerConnection.setLocalDescription({type:"offer",sdp:l}),null==d||d(o),await this.peerConnection.setRemoteDescription({type:"answer",sdp:o})}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NV.connect failed; ".concat(e.toString()))}}async updateRemoteConnect(e){var t,i,n;null===(t=this.remoteSDP)||void 0===t||t.updateRemoteRTPCapabilities(e),null===(i=this.remoteSDP)||void 0===i||i.preloadRemoteMedia(2);const r=null===(n=this.remoteSDP)||void 0===n?void 0:n.toString();await this.peerConnection.setRemoteDescription({type:"offer",sdp:r});const s=await this.peerConnection.createAnswer();await this.peerConnection.setLocalDescription(s),$C.debug("[NVExtentionsConnection] updateRemoteRTPCapabilities by exchanging SDP.")}send(e,t,i){var n=this;return LL((function*(){const r=yield ML(n.mutex.lock("From NVExtentionsConnection.send"));try{if(!n.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.send before remote SDP created");const s=[];e.forEach((e=>{const t=n.peerConnection.addTransceiver(e._mediaStreamTrack,{direction:"sendonly"});s.push(t)})),Cb()&&!0===xC("SIMULCAST")&&(yield ML(n.applySimulcastForFirefox(s,e)));const o=yield ML(n.peerConnection.createOffer()),a=n.remoteSDP.predictReceivingMids(e.length),c=n.mungSendOfferSDP(o.sdp,e,a),l=UL.parse(c),d=a.map((e=>{const t=l.mediaDescriptions.find((t=>t.attributes.mid===e));if(!t)throw new Error("Cannot extract ssrc from mediaDescription.");return HL(t,xC("USE_PUB_RTX"))}));let h;try{h=yield d}catch(r){h=[],n.remoteSDP.receive(e,t,i,h);const s=n.remoteSDP.toString();throw yield ML(n.peerConnection.setLocalDescription({type:"offer",sdp:c})),yield ML(n.peerConnection.setRemoteDescription({type:"answer",sdp:s})),yield ML(n.stopSending(a,!0)),r}n.remoteSDP.receive(e,t,i,h);const u=n.remoteSDP.toString(),p=n.logSDPExchange(c,"offer","local","send");return yield ML(n.peerConnection.setLocalDescription({type:"offer",sdp:c})),yield ML(n.applySimulcastEncodings(s,e)),yield ML(n.applySendEncodings(s,e)),null==p||p(u),yield ML(n.peerConnection.setRemoteDescription({type:"answer",sdp:u})),s.map(((e,t)=>{const i=a[t];return{localSSRC:d[t],id:i,transceiver:e}}))}catch(e){throw e instanceof Dw?e:new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.send failed; ".concat(e.toString()))}finally{r()}}))()}async stopSending(e,t){const i=t?void 0:await this.mutex.lock("From NVExtentionsConnection.stopSending");try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.stopSending before remote SDP created");const t=this.peerConnection.getTransceivers().filter((t=>-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length when trying to call NVExtentionsConnection.stopSending.");t.map((e=>{var t;e.direction="inactive",null===(t=e.stop)||void 0===t||t.call(e)}));const n=await this.peerConnection.createOffer(),r=this.logSDPExchange(n.sdp||"","offer","local","stopSending");await this.peerConnection.setLocalDescription(n),this.remoteSDP.stopReceiving(e);const s=this.remoteSDP.toString();null==r||r(s),await this.peerConnection.setRemoteDescription({type:"answer",sdp:s})}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.stopSending failed; ".concat(e.toString()))}finally{i&&i()}}async createDataChannels(e,t){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.createDataChannels before remote SDP created");let i=this.dataStreamChannelMap.get(e);return i&&"open"===i.readyState?$C.debug("[P2PConnection] Channels are already available and can be reused directly."):(i=this.peerConnection.createDataChannel("datastream-channel",{ordered:!1,maxRetransmits:xC("DATASTREAM_MAX_RETRANSMITS")}),i.binaryType="arraybuffer",this.dataStreamChannelMap.set(e,i)),void t.forEach((e=>{e._updateOriginDataChannel(i)}))}catch(e){throw e instanceof Dw?e:new Dw(Bb.DATACHANNEL_FAILED,"NVExtentionsConnection.createDataChannels failed; ".concat(e.toString()))}}async stopDataChannels(e){try{const t=this.dataStreamChannelMap.get(e);return null==t||t.close(),void this.dataStreamChannelMap.delete(e)}catch(e){throw e instanceof Dw?e:new Dw(Bb.DATACHANNEL_FAILED,"NVExtentionsConnection.stopDataChannels failed; ".concat(e.toString()))}}async receive(e,t,i,n){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.receive ".concat(e," before remoteSDP created."));const{mid:r,needExchangeSDP:s}=this.remoteSDP.send(e,t,i,n);if(s){const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","receive");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer(),s=this.mungReceiveAnswerSDP(n.sdp,r,e);null==i||i(s||""),await this.peerConnection.setLocalDescription({type:"answer",sdp:s}),$C.debug("[NVExtentionsConnection] receive ".concat(e," by exchanging SDP."))}else $C.debug("[NVExtentionsConnection] receive ".concat(e," no need to exchange SDP."));const o=this.peerConnection.getTransceivers().find((e=>e.mid===r));if(!o)throw new Error("Cannot get transceiver after setLocalDescription.");return{track:o.receiver.track,id:r}}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.receive failed; ".concat(e.toString()))}}async batchReceive(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.batchReceive before remoteSDP created.");const{mids:t,needExchangeSDP:i}=this.remoteSDP.batchSend(e);if(i){const e=this.remoteSDP.toString(),t=this.logSDPExchange(e,"offer","remote","receive");await this.peerConnection.setRemoteDescription({type:"offer",sdp:e});const i=await this.peerConnection.createAnswer();null==t||t(i.sdp||""),await this.peerConnection.setLocalDescription(i),$C.debug("[NVExtentionsConnection] batchReceive by exchanging SDP.")}else $C.debug("[NVExtentionsConnection] batchReceive no need to exchange SDP.");return t.map((e=>{const t=this.peerConnection.getTransceivers().find((t=>t.mid===e));if(!t)throw new Error("Cannot get transceiver after setLocalDescription.");return{track:t.receiver.track,id:e}}))}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.receive failed; ".concat(e.toString()))}}async stopReceiving(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.stopReceiving before remote SDP created.");this.remoteSDP.stopSending(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","stopReceiving");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection stopReceiving failed; ".concat(e.toString()))}}async muteRemote(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.muteRemote mid=".concat(e," before remote SDP created."));this.remoteSDP.mute(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","muteRemote");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.muteRemote failed; ".concat(e.toString()))}}async unmuteRemote(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.unmuteRemote mid=".concat(e," before remote SDP created."));this.remoteSDP.unmute(e);const t=this.remoteSDP.toString(),i=this.logSDPExchange(t,"offer","remote","unmuteRemote");await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();null==i||i(n.sdp||""),await this.peerConnection.setLocalDescription(n)}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.unmuteRemote failed; ".concat(e.toString()))}}async muteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.muteLocal before remote SDP created.");const t=this.peerConnection.getTransceivers().filter((t=>t.mid&&-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length.");t.map((e=>{e.direction="inactive"}));const i=await this.peerConnection.createOffer(),n=this.logSDPExchange(i.sdp||"","offer","local","muteLocal");await this.peerConnection.setLocalDescription(i),this.remoteSDP.muteRemote(e);const r=this.remoteSDP.toString();null==n||n(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.muteLocal failed; ".concat(e.toString()))}}async unmuteLocal(e){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.unmuteLocal before remote SDP created.");const t=this.peerConnection.getTransceivers().filter((t=>t.mid&&-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length.");t.map((async(e,t)=>{e.direction="sendonly"}));const i=await this.peerConnection.createOffer(),n=this.logSDPExchange(i.sdp||"","offer","local","unmuteLocal");await this.peerConnection.setLocalDescription(i),this.remoteSDP.unmuteRemote(e);const r=this.remoteSDP.toString();null==n||n(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,"NVExtentionsConnection.unmuteLocal failed; ".concat(e.toString()))}}restartICE(e){var t=this;return LL((function*(){const i=yield ML(t.mutex.lock("From NVExtentionsConnection.restartICE"));try{if(!t.remoteSDP)throw new Error("Cannot restartICE before remoteSDP created.");if(uA().supportPCSetConfiguration){const i=t.peerConnection.getConfiguration(),n=e===dS.RELAY?"relay":"all";i.iceTransportPolicy!==n&&($C.debug("restartICE change iceTransportPolicy from [".concat(i.iceTransportPolicy,"] to [").concat(n,"]")),i.iceTransportPolicy=n,t.peerConnection.setConfiguration(i))}else if(e===dS.RELAY)return;e!==dS.RELAY&&t.remoteSDP.updateCandidates(e);const n=yield ML(t.peerConnection.createOffer({iceRestart:!0}));if(!n.sdp)throw new Error("Cannot restartICE because restart offer SDP does not exist.");const r=jL(n.sdp),{remoteIceParameters:s}=yield r.iceParameters;t.remoteSDP.restartICE(s);const o=t.remoteSDP.toString(),a=t.logSDPExchange(n.sdp||"","offer","local","restartICE");yield ML(t.peerConnection.setLocalDescription(n)),null==a||a(o),yield ML(t.peerConnection.setRemoteDescription({type:"answer",sdp:o}))}catch(e){$C.warning("restart ICE failed, abort operation",e)}finally{i()}}))()}close(){var e;null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,"closed"),this.unbindPCEvents(),this.unbindStatsEvents(),this.removeAllListeners(),this.transportEventReceiver=void 0,this.statsFilter.destroy(),this.dataStreamChannelMap.clear()}getStats(){return this.statsFilter.getStats()}getRemoteVideoIsReady(e){return this.statsFilter.getVideoIsReady(e)}async updateEncoderConfig(e,t){try{if(!this.remoteSDP)throw new Error("Cannot call NVExtentionsConnection.updateEncoderConfig before remote SDP created.");const i=await this.peerConnection.createOffer(),n=this.mungSendOfferSDP(i.sdp,[t],[e]);this.remoteSDP.updateRecvMedia(e,t);const r=this.remoteSDP.toString(),s=this.logSDPExchange(n,"offer","local","updateEncoderConfig");await this.peerConnection.setLocalDescription({type:"offer",sdp:n}),null==s||s(r),await this.peerConnection.setRemoteDescription({type:"answer",sdp:r})}catch(e){throw new Dw(Bb.EXCHANGE_SDP_FAILED,e.toString())}}async updateSendParameters(e,t){const i=this.peerConnection.getTransceivers().filter((t=>t.mid===e));1===i.length&&(this.isVP8Simulcast(t)?Cb()||await this.applySimulcastEncodings(i,[t]):await this.applySendEncodings(i,[t]))}setStatsRemoteVideoIsReady(e,t){this.statsFilter.setVideoIsReady2(e,t)}async replaceTrack(e,t){const i=this.peerConnection.getTransceivers().find((e=>e.mid===t));i&&await i.sender.replaceTrack(e._mediaStreamTrack)}getP2PConnectionParams(){var e;if(null===(e=this.peerConnection.currentLocalDescription)||void 0===e||!e.sdp||!this.localCapabilities)throw new Error;return WM(WM({},jL(this.peerConnection.currentLocalDescription.sdp)),{},{rtpCapabilities:this.localCapabilities})}bindPCEvents(){this.peerConnection.oniceconnectionstatechange=()=>{var e;null===(e=this.onICEConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.iceConnectionState)},this.peerConnection.onconnectionstatechange=()=>{var e;null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.connectionState)},this.peerConnection.onicecandidate=e=>{e.candidate?this.localCandidateCount+=1:(this.peerConnection.onicecandidate=null,this.allCandidatesReceived=!0,$C.debug("[pc-".concat(this.store.p2pId,"] local candidate count"),this.localCandidateCount))},setTimeout((()=>{this.allCandidatesReceived||(this.allCandidatesReceived=!0,$C.debug("[pc-".concat(this.store.p2pId,"] onicecandidate timeout, local candidate count"),this.localCandidateCount))}),xC("CANDIDATE_TIMEOUT"))}unbindPCEvents(){this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicecandidateerror=null,this.peerConnection.onicecandidate=null,this.peerConnection.ontrack=null}static resolvePCConfiguration(e){const t={iceServers:[]};return e.iceServers?t.iceServers=e.iceServers:e.turnServer&&"off"!==e.turnServer.mode&&(g_(e.turnServer.servers)?t.iceServers=e.turnServer.servers:(t.iceServers&&t.iceServers.push(...KM.turnServerConfigToIceServers(e.turnServer.servers)),xC("USE_TURN_SERVER_OF_GATEWAY")&&t.iceServers&&e.turnServer.serversFromGateway&&t.iceServers.push(...KM.turnServerConfigToIceServers(e.turnServer.serversFromGateway)),xC("FORCE_TURN_TCP")?t.iceTransportPolicy="relay":e.turnServer.servers.concat(e.turnServer.serversFromGateway||[]).forEach((e=>{e.forceturn&&(t.iceTransportPolicy="relay")})))),t}static turnServerConfigToIceServers(e){const t=[];return e.forEach((e=>{e.security?e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turns:".concat(aN(e.turnServerURL),":").concat(e.tcpport,"?transport=tcp")}):(e.udpport&&!xC("FORCE_TURN_TCP")&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.udpport,"?transport=udp")}),e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=tcp")}))})),t}async applySendEncodings(e,t){try{if(!uA().supportSetRtpSenderParameters)return;if(e.length!==t.length)return;for(let d=0;d<e.length;d++){const h=e[d],u=t[d];if(u&&u instanceof vR){var i,n,r;if(this.isVP8Simulcast(u))continue;const e={},t={};switch(u._optimizationMode){case"motion":e.degradationPreference="maintain-framerate";break;case"detail":e.degradationPreference="maintain-resolution";break;default:e.degradationPreference="balanced"}var s,o,a,c;if(null!==(i=u._encoderConfig)&&void 0!==i&&i.bitrateMax&&(t.maxBitrate=1e3*(null===(s=u._encoderConfig)||void 0===s?void 0:s.bitrateMax)),Di(n=u._hints).call(n,NT.LOW_STREAM)&&(null!==(o=u._encoderConfig)&&void 0!==o&&o.frameRate&&(t.maxFramerate=cN(u._encoderConfig.frameRate)),null!==(a=u._encoderConfig)&&void 0!==a&&a.scaleResolutionDownBy&&(null===(c=u._encoderConfig)||void 0===c?void 0:c.scaleResolutionDownBy)>1&&(t.scaleResolutionDownBy=u._encoderConfig.scaleResolutionDownBy)),xC("DSCP_TYPE")&&Db()){var l;const e=xC("DSCP_TYPE");Di(l=["very-low","low","medium","high"]).call(l,e)&&(t.networkPriority=e)}const d=h.sender.getParameters(),p=null===(r=d.encodings)||void 0===r?void 0:r[0];Cb()&&!p&&(e.encodings=[t]),p&&Object.assign(p,t),Object.assign(d,e),await h.sender.setParameters(d)}}}catch(e){$C.debug("Apply RTPSendEncodings failed.")}}mungSendOfferSDP(e,t,i){const n=UL.parse(e);return t.forEach(((e,t)=>{const r=i[t],s=n.mediaDescriptions.find((e=>e.attributes.mid===r));s&&(WL(s,e),XL(s,e,this.store.codec))})),UL.print(n)}mungReceiveAnswerSDP(e,t,i){const n=UL.parse(e),r=n.mediaDescriptions.find((e=>e.attributes.mid===t));return r&&i===lS.AUDIO&&"audio"===r.media.mediaType&&eM(r),this.useXR&&tM(n),UL.print(n)}bindStatsEvents(){this.statsFilter.onFirstAudioReceived=e=>{var t;null===(t=this.onFirstAudioReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoReceived=e=>{var t;null===(t=this.onFirstVideoReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstAudioDecoded=e=>{var t;null===(t=this.onFirstAudioDecoded)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoDecoded=(e,t,i)=>{var n;null===(n=this.onFirstVideoDecoded)||void 0===n||n.call(this,e,t,i)},this.statsFilter.onSelectedLocalCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedLocalCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onSelectedRemoteCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedRemoteCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onFirstVideoDecodedTimeout=e=>{var t;null===(t=this.onFirstVideoDecodedTimeout)||void 0===t||t.call(this,e)}}unbindStatsEvents(){this.statsFilter.onFirstAudioReceived=void 0,this.statsFilter.onFirstVideoReceived=void 0,this.statsFilter.onFirstAudioDecoded=void 0,this.statsFilter.onFirstVideoDecoded=void 0,this.statsFilter.onSelectedLocalCandidateChanged=void 0,this.statsFilter.onSelectedRemoteCandidateChanged=void 0,this.statsFilter.onFirstVideoDecodedTimeout=void 0}async applySimulcastForFirefox(e,t){if(e.length===t.length)for(let a=0;a<e.length;a++){var i,n,r,s,o;const c=e[a],l=t[a];if(l instanceof vR&&!Di(i=l._hints).call(i,NT.LOW_STREAM)&&null!==(n=l._encoderConfig)&&void 0!==n&&n.bitrateMax&&(null===(r=l._encoderConfig)||void 0===r?void 0:r.bitrateMax)>200&&null!==(s=l._scalabilityMode)&&void 0!==s&&s.numSpatialLayers&&(null===(o=l._scalabilityMode)||void 0===o?void 0:o.numSpatialLayers)>1&&"vp8"===this.store.codec){const e={},t={high:1e3*(l._encoderConfig.bitrateMax-50),medium:5e4};e.encodings=[{rid:"m",active:!0,maxBitrate:t.medium,scaleResolutionDownBy:4},{rid:"h",active:!0,maxBitrate:t.high}];const i=c.sender.getParameters();await c.sender.setParameters(Object.assign(i,e))}}}async applySimulcastEncodings(e,t){if(!Cb()&&e.length===t.length)for(let i=0;i<e.length;i++){const n=t[i];if(n instanceof vR&&this.isVP8Simulcast(n)){const t=e[i],r={},s={high:1e3*(n._encoderConfig.bitrateMax-50),medium:5e4};r.encodings=[{active:!0,adaptivePtime:!1,networkPriority:"high",priority:"high",maxBitrate:s.high},{active:!0,adaptivePtime:!1,networkPriority:"low",priority:"low",maxBitrate:s.medium,scaleResolutionDownBy:4}];const o=t.sender.getParameters();await t.sender.setParameters(Object.assign(o,r))}}}isVP8Simulcast(e){var t,i,n,r,s;return!!(e instanceof vR&&xC("SIMULCAST")&&"vp8"===this.store.codec&&!Di(t=e._hints).call(t,NT.LOW_STREAM)&&null!==(i=e._encoderConfig)&&void 0!==i&&i.bitrateMax&&(null===(n=e._encoderConfig)||void 0===n?void 0:n.bitrateMax)>200&&null!==(r=e._scalabilityMode)&&void 0!==r&&r.numSpatialLayers&&(null===(s=e._scalabilityMode)||void 0===s?void 0:s.numSpatialLayers)>1)}logSDPExchange(e,t,i,n){if(xC("SDP_LOGGING"))return $C.upload("exchanging ".concat(i," ").concat(t," SDP during NVExtentionsConnection.").concat(n,"\n"),e),"offer"===t?e=>{this.logSDPExchange(e,"answer","local"===i?"remote":"local",n)}:void 0}async getRemoteSSRC(e){if(!this.remoteSDP)return;const t=this.remoteSDP.getSSRC(e);return null==t?void 0:t[0].ssrcId}setConfiguration(e){if(uA().supportPCSetConfiguration){const t=KM.resolvePCConfiguration(e);this.peerConnection.setConfiguration(t)}}}function GM(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("From NVExtentionsConnection.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}function qM(e){var t,i,n,r=2;for("undefined"!=typeof Symbol&&(i=DL,n=Symbol.iterator);r--;){if(i&&null!=(t=e[i]))return t.call(e);if(n&&null!=(t=e[n]))return new YM(t.call(e));i="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function YM(e){function t(e){if(Object(e)!==e)return nb.reject(new TypeError(e+" is not an object."));var t=e.done;return nb.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(YM=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var i=this.s.return;return void 0===i?nb.resolve({value:e,done:!0}):t(i.apply(this.s,arguments))},throw:function(e){var i=this.s.return;return void 0===i?nb.reject(e):t(i.apply(this.s,arguments))}},new YM(e)}Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],KM.prototype,"connect",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],KM.prototype,"updateRemoteConnect",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Object,Array]),xw("design:returntype",nb)],KM.prototype,"createDataChannels",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String,Array,String,Object]),xw("design:returntype",nb)],KM.prototype,"receive",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],KM.prototype,"batchReceive",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],KM.prototype,"stopReceiving",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],KM.prototype,"muteRemote",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],KM.prototype,"unmuteRemote",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],KM.prototype,"muteLocal",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],KM.prototype,"unmuteLocal",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],KM.prototype,"close",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],KM.prototype,"updateEncoderConfig",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],KM.prototype,"updateSendParameters",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[JT,String]),xw("design:returntype",nb)],KM.prototype,"replaceTrack",null),Mw([GM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],KM.prototype,"getRemoteSSRC",null);class XM extends kS{get currentLocalDescription(){return this.peerConnection.currentLocalDescription}get currentRemoteDescription(){return this.peerConnection.currentRemoteDescription}get peerConnectionState(){return this.peerConnection.connectionState}get iceConnectionState(){return this.peerConnection.iceConnectionState}constructor(e,t){super(e,t),oh(this,"store",void 0),oh(this,"peerConnection",void 0),oh(this,"cname",void 0),oh(this,"mutex",new G_("DataChannelConnection-mutex")),oh(this,"dataChannel",void 0),oh(this,"_p2pConnection",void 0),oh(this,"establishPromise",void 0),oh(this,"_nvMedia",void 0),this.store=t,this.store.dcId=this.store.dcId+1,this.peerConnection=new RTCPeerConnection(XM.resolvePCConfiguration(e),{optional:[{googDscp:!0}]}),this.dataChannel=this.peerConnection.createDataChannel("agora-signal",{ordered:!1,maxPacketLifeTime:50}),this.dataChannel.binaryType="arraybuffer",this._p2pConnection=new KM(e,t,this.peerConnection),this.bindPCEvents(),this.establishPromise=this._p2pConnection.establishPromise}async establish(){var e;const t=null===(e=this._nvMedia)||void 0===e?void 0:e.getLocalRtpCapabilities();return await this._p2pConnection.establish(t)}getP2PConnectionParams(){return this._p2pConnection.getP2PConnectionParams()}async connect(e,t,i,n,r,s){return this.cname=s,await this._p2pConnection.connect(e,t,i,n,r,s),await new nb(((e,t)=>{const n=setTimeout((()=>{this.closeSignal(),t(new Dw(Bb.DATACHANNEL_CONNECTION_TIMEOUT,"Datachannel connection timed out, candidates: ".concat(JSON.stringify(i))))}),2e3);this.dataChannel.onopen=()=>{if("open"===this.dataChannel.readyState)return clearTimeout(n),void e()},this.dataChannel.onerror=e=>{this.closeSignal(),t(e)}})),{transmitter:this.dataChannel,close:this.closeSignal.bind(this)}}send(e,t,i){var n=this;return LL((function*(){const r=yield ML(n.mutex.lock("From DataChannelConnection.send"));try{return yield*xL(qM(n._p2pConnection.send(e,t,i)))}finally{r()}}))()}async stopSending(e,t){return this._p2pConnection.stopSending(e,t)}async createDataChannels(e,t){return this._p2pConnection.createDataChannels(e,t)}async stopDataChannels(e){return this._p2pConnection.stopDataChannels(e)}async receive(e,t,i,n){return this._nvMedia?($C.debug("[DataChannelConnection] receive ".concat(e," by DataChannel.")),await this._nvMedia.reveiveByRTCMedia(e,t,this.cname)):($C.debug("[DataChannelConnection] receive ".concat(e," by WebRTC.")),await this._p2pConnection.receive(e,t,i,n))}async batchReceive(e){return[...await this._p2pConnection.batchReceive(e)]}async stopReceiving(e){return await this._p2pConnection.stopReceiving(e)}async muteRemote(e){return await this._p2pConnection.muteRemote(e)}async unmuteRemote(e){return await this._p2pConnection.unmuteRemote(e)}async muteLocal(e){return await this._p2pConnection.muteLocal(e)}async unmuteLocal(e){return await this._p2pConnection.unmuteLocal(e)}restartICE(e){var t=this;return LL((function*(){return yield*xL(qM(t._p2pConnection.restartICE(e)))}))()}close(){var e;null===(e=this._nvMedia)||void 0===e||e.close(),this._p2pConnection.close(),this.unbindConnectionEvents(this._p2pConnection)}getStats(){return this._p2pConnection.getStats()}getRemoteVideoIsReady(e){return this._p2pConnection.getRemoteVideoIsReady(e)}updateRemoteConnect(e){var t;null===(t=this._nvMedia)||void 0===t||t.setRemoteRtpCapabilities(e),this._p2pConnection.updateRemoteConnect(e)}async updateEncoderConfig(e,t){return await this._p2pConnection.updateEncoderConfig(e,t)}async updateSendParameters(e,t){return await this._p2pConnection.updateSendParameters(e,t)}setStatsRemoteVideoIsReady(e,t){this._p2pConnection.setStatsRemoteVideoIsReady(e,t)}async replaceTrack(e,t){return await this._p2pConnection.replaceTrack(e,t)}async getRemoteSSRC(e){return this._p2pConnection.getRemoteSSRC(e)}logSDPExchange(e,t,i,n){if(xC("SDP_LOGGING"))return $C.upload("exchanging ".concat(i," ").concat(t," SDP during DataChannelConnection.").concat(n,"\n"),e),"offer"===t?e=>{this.logSDPExchange(e,"answer","local"===i?"remote":"local",n)}:void 0}static resolvePCConfiguration(e){const t={iceServers:[]};return e.iceServers?t.iceServers=e.iceServers:e.turnServer&&"off"!==e.turnServer.mode&&(g_(e.turnServer.servers)?t.iceServers=e.turnServer.servers:(t.iceServers&&t.iceServers.push(...XM.turnServerConfigToIceServers(e.turnServer.servers)),xC("USE_TURN_SERVER_OF_GATEWAY")&&t.iceServers&&e.turnServer.serversFromGateway&&t.iceServers.push(...XM.turnServerConfigToIceServers(e.turnServer.serversFromGateway)),xC("FORCE_TURN_TCP")?t.iceTransportPolicy="relay":e.turnServer.servers.concat(e.turnServer.serversFromGateway||[]).forEach((e=>{e.forceturn&&(t.iceTransportPolicy="relay")})))),t}static turnServerConfigToIceServers(e){const t=[];return e.forEach((e=>{e.security?e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turns:".concat(aN(e.turnServerURL),":").concat(e.tcpport,"?transport=tcp")}):(e.udpport&&!xC("FORCE_TURN_TCP")&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.udpport,"?transport=udp")}),e.tcpport&&t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=tcp")}))})),t}bindPCEvents(){this._p2pConnection.onICEConnectionStateChange=e=>{var t;return null===(t=this.onICEConnectionStateChange)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onConnectionStateChange=e=>{var t;return null===(t=this.onConnectionStateChange)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onDTLSTransportStateChange=e=>{var t;return null===(t=this.onDTLSTransportStateChange)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onDTLSTransportError=e=>{var t;return null===(t=this.onDTLSTransportError)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onICETransportStateChange=e=>{var t;return null===(t=this.onICETransportStateChange)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onFirstAudioReceived=e=>{var t;return null===(t=this.onFirstAudioReceived)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onFirstVideoReceived=e=>{var t;return null===(t=this.onFirstVideoReceived)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onFirstAudioDecoded=e=>{var t;return null===(t=this.onFirstAudioDecoded)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onFirstVideoDecoded=(e,t,i)=>{var n;return null===(n=this.onFirstVideoDecoded)||void 0===n?void 0:n.call(this,e,t,i)},this._p2pConnection.onFirstVideoDecodedTimeout=e=>{var t;return null===(t=this.onFirstVideoDecodedTimeout)||void 0===t?void 0:t.call(this,e)},this._p2pConnection.onSelectedLocalCandidateChanged=(e,t)=>{var i;return null===(i=this.onSelectedLocalCandidateChanged)||void 0===i?void 0:i.call(this,e,t)},this._p2pConnection.onSelectedRemoteCandidateChanged=(e,t)=>{var i;return null===(i=this.onSelectedRemoteCandidateChanged)||void 0===i?void 0:i.call(this,e,t)}}closeSignal(){this.dataChannel.close(),this.peerConnection.close()}unbindConnectionEvents(e){e.onConnectionStateChange=void 0,e.onICEConnectionStateChange=void 0,e.onICETransportStateChange=void 0,e.onDTLSTransportStateChange=void 0,e.onDTLSTransportError=void 0,e.onFirstAudioDecoded=void 0,e.onFirstAudioReceived=void 0,e.onFirstVideoDecoded=void 0,e.onFirstVideoReceived=void 0,e.onSelectedLocalCandidateChanged=void 0,e.onSelectedRemoteCandidateChanged=void 0,e.onFirstVideoDecodedTimeout=void 0}setConfiguration(e){this._p2pConnection.setConfiguration(e)}}function ZM(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("From DataChannelConnection.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}function QM(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function JM(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?QM(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):QM(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],XM.prototype,"connect",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[Object,Array]),xw("design:returntype",nb)],XM.prototype,"createDataChannels",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String,Array,String,Object]),xw("design:returntype",nb)],XM.prototype,"receive",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],XM.prototype,"stopReceiving",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],XM.prototype,"muteRemote",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],XM.prototype,"unmuteRemote",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],XM.prototype,"muteLocal",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],XM.prototype,"unmuteLocal",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],XM.prototype,"close",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],XM.prototype,"updateEncoderConfig",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],XM.prototype,"updateSendParameters",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[JT,String]),xw("design:returntype",nb)],XM.prototype,"replaceTrack",null),Mw([ZM,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],XM.prototype,"getRemoteSSRC",null);class ex extends r_{constructor(){super(),oh(this,"uplinkStatsUploadInterval",void 0),oh(this,"uplinkRelatedStatsUploadInterval",void 0),oh(this,"uplinkDenoiserStatsUploadInterval",void 0),oh(this,"transportStatsUploadInterval",void 0),oh(this,"uplinkExtensionStatsUploadInterval",void 0),oh(this,"downlinkExtensionStatsUploadInterval",void 0),oh(this,"extensionUsageStatsUploadInterval",void 0),oh(this,"downlinkStatsUploadInterval",void 0),oh(this,"downlinkRelatedStatsUploadInterval",void 0),oh(this,"lastStats",void 0),oh(this,"uploadUnplinkStarted",!1),oh(this,"uploadDownlinkStarted",!1),oh(this,"uploadTransportStarted",!1),oh(this,"uploadExtensionUsageStarted",!1),oh(this,"requestStats",void 0),oh(this,"requestTransportStats",void 0),oh(this,"requestLocalMedia",void 0),oh(this,"requestRemoteMedia",void 0),oh(this,"requestAllTracks",void 0),oh(this,"requestVideoIsReady",void 0),oh(this,"requestUpload",void 0)}startUploadTransportStats(e){this.uploadTransportStarted||(this.uploadTransportStarted=!0,this.transportStatsUploadInterval&&window.clearInterval(this.transportStatsUploadInterval),this.transportStatsUploadInterval=window.setInterval((()=>{var t;const i=null===(t=this.requestStats)||void 0===t?void 0:t.call(this);if(i){const t=dN(i);if(e){var n;const e=null===(n=this.requestStats)||void 0===n?void 0:n.call(this,!0);if(e){const i=dN(e);t.connectionType+=i.connectionType<<3}t.connectionType+=110}else t.connectionType+=100;R_((()=>{var e;null===(e=this.requestUpload)||void 0===e||e.call(this,bw.TRANSPORT_STATS,t)}))}}),1e3))}startUploadExtensionUsageStats(){if(this.uploadExtensionUsageStarted)return;this.uploadExtensionUsageStarted=!0,this.extensionUsageStatsUploadInterval&&window.clearInterval(this.extensionUsageStatsUploadInterval);const e=new Map;this.extensionUsageStatsUploadInterval=window.setInterval((async()=>{var t,i,n;const r=Date.now(),s={connectionInterval:xC("EXTENSION_USAGE_UPLOAD_INTERVAL")/1e3,details:[],lts:r};let o=[];const a=(null===(t=this.requestAllTracks)||void 0===t?void 0:t.call(this))||[];for(const e of a)!e.muted&&e.enabled&&(o=o.concat(await e.getProcessorUsage()));const c=(null===(i=this.requestRemoteMedia)||void 0===i?void 0:i.call(this))||[];for(const[e,t]of c)t.has(lS.VIDEO)&&e.videoTrack&&(o=o.concat(await e.videoTrack.getProcessorUsage())),t.has(lS.AUDIO)&&e.audioTrack&&(o=o.concat(await e.audioTrack.getProcessorUsage()));if(0===o.length)return;s.details=function(e,t){const i={};for(const{id:o,value:a,level:c,direction:l}of e){var n;const e=null!==(n=t.get(o))&&void 0!==n?n:0,d=2===a?e+xC("EXTENSION_USAGE_UPLOAD_INTERVAL")/1e3:e;var r,s;t.set(o,d),i[o]?(2===a&&(i[o].value=a),c>i[o].level&&(i[o].level=c),"remote"===l&&(i[o].remoteUidCount+=1),i[o].totalTs=null!==(r=t.get(o))&&void 0!==r?r:0):i[o]={value:a,level:c,remoteUidCount:"local"===l?0:1,totalTs:null!==(s=t.get(o))&&void 0!==s?s:0}}return Object.keys(i).map((e=>{const{level:t,value:n,totalTs:r}=i[e];return{id:e,level:t,value:n,totalTs:r}}))}(o,e);const l=Date.now(),d=l>r?l:r+1;null===(n=this.requestUpload)||void 0===n||n.call(this,bw.EXTENSION_USAGE_STATS,{usageStats:s,sendTs:d})}),xC("EXTENSION_USAGE_UPLOAD_INTERVAL"))}startUploadUplinkStats(){this.uploadUnplinkStarted||(this.uploadUnplinkStarted=!0,this.uplinkStatsUploadInterval&&window.clearInterval(this.uplinkStatsUploadInterval),this.uplinkStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestStats)||void 0===e?void 0:e.call(this);t&&(this.uploadUplinkStats(t),this.lastStats=t)}),3e3),this.uplinkRelatedStatsUploadInterval&&window.clearInterval(this.uplinkRelatedStatsUploadInterval),this.uplinkRelatedStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestStats)||void 0===e?void 0:e.call(this);t&&this.uploadRelatedUplinkStats(t,this.lastStats),this.lastStats=t}),1e3),this.uplinkDenoiserStatsUploadInterval&&window.clearInterval(this.uplinkDenoiserStatsUploadInterval),this.uplinkDenoiserStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestAllTracks)||void 0===e?void 0:e.call(this);t&&this.uploadDenoiserStats(t)}),2e3),this.uplinkExtensionStatsUploadInterval&&window.clearInterval(this.uplinkExtensionStatsUploadInterval),this.uplinkExtensionStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestAllTracks)||void 0===e?void 0:e.call(this);t&&this.uploadExtensionStats(t)}),2e3))}uploadUplinkStats(e){var t;((null===(t=this.requestLocalMedia)||void 0===t?void 0:t.call(this))||[]).forEach((t=>{let[i,{track:n,ssrcs:r}]=t;switch(i){case hS.LocalVideoLowTrack:case hS.LocalVideoTrack:{const t=function(e,t,i){var n;const r=t.videoSend.find((t=>t.ssrc===e));if(!r)return null;const s={id:B_(10,""),timestamp:new Date(t.timestamp).toISOString(),mediaType:"video",type:"ssrc",ssrc:r.ssrc.toString()};switch(s.A_vstd=i._originMediaStreamTrack&&!i._originMediaStreamTrack.enabled||i._mediaStreamTrack&&!i._mediaStreamTrack.enabled?"1":"0",r.sentFrame&&(s.A_fhs=r.sentFrame.height.toString(),s.A_frs=r.sentFrame.frameRate.toString(),s.A_fws=r.sentFrame.width.toString()),r.adaptionChangeReason){case"none":s.A_ac="0";break;case"cpu":s.A_ac="1";break;case"bandwidth":s.A_ac="2";break;case"other":s.A_ac="3"}return s.A_lvps=XT[i._player?i._player.videoElementStatus:"uninit"].toString(),s.A_nr=null===(n=r.nacksCount)||void 0===n?void 0:n.toString(),r.avgEncodeMs&&(s.A_aem=r.avgEncodeMs.toFixed(0).toString()),xC("P2P")&&(r.bytes&&(s.bytesSent=r.bytes.toString()),"number"==typeof r.packetsLost&&(s.packetsLost=r.packetsLost.toString()),r.packets&&(s.packetsSent=r.packets.toString())),s}(r[0].ssrcId,e,n),s=i===hS.LocalVideoTrack?function(e,t,i){var n,r,s,o,a,c,l,d;const h=t.videoSend.find((t=>t.ssrc===e));if(!h)return null;const u={id:B_(10,""),timestamp:new Date(t.timestamp).toISOString(),mediaType:"video",type:"ssrc",ssrc:h.ssrc.toString()},p=null!==(n=null!==(r=null===(s=h.inputFrame)||void 0===s?void 0:s.height)&&void 0!==r?r:null==i?void 0:i._videoHeight)&&void 0!==n?n:0,f=null!==(o=null!==(a=null===(c=h.inputFrame)||void 0===c?void 0:c.width)&&void 0!==a?a:null==i?void 0:i._videoWidth)&&void 0!==o?o:0,m=null!==(l=null===(d=h.inputFrame)||void 0===d?void 0:d.frameRate)&&void 0!==l?l:0;return p&&(u.A_fhi=p+""),f&&(u.A_fwi=f+""),m&&(u.A_fri=m+""),u}(r[0].ssrcId,e,n):null;t&&R_((()=>{var e;return null===(e=this.requestUpload)||void 0===e?void 0:e.call(this,bw.PUBLISH_STATS,{stream_type:i===hS.LocalVideoLowTrack?"low":"high",stats:JM(JM({},t),s)})}));const o=function(e){const t={id:"bweforvideo",timestamp:new Date(e.timestamp).toISOString(),type:"VideoBwe"};return e.bitrate.retransmit&&(t.A_rb=e.bitrate.retransmit.toString()),e.bitrate.targetEncoded&&(t.A_teb=e.bitrate.targetEncoded.toString()),t.A_aeb=e.bitrate.actualEncoded.toString(),t.A_tb=e.bitrate.transmit.toString(),void 0!==e.sendBandwidth&&(t.A_asb=e.sendBandwidth.toString()),t}(e);o&&setTimeout((()=>{var e;return null===(e=this.requestUpload)||void 0===e?void 0:e.call(this,bw.PUBLISH_STATS,{stream_type:i===hS.LocalVideoLowTrack?"low":"high",stats:o})}),1e3);break}case hS.LocalAudioTrack:{const t=function(e,t,i){const n=t.audioSend.find((t=>t.ssrc===e));if(!n)return null;const r={id:B_(10,""),timestamp:new Date(t.timestamp).toISOString(),mediaType:"audio",type:"ssrc",ssrc:n.ssrc.toString()};return r.A_astd=i._originMediaStreamTrack&&!i._originMediaStreamTrack.enabled||i._mediaStreamTrack&&!i._mediaStreamTrack.enabled?"1":"0",n.inputLevel?r.A_ail=Math.round(100*n.inputLevel).toString():r.A_ail=Math.round(100*i._source.getAccurateVolumeLevel()).toString(),r.A_apil=Math.round(100*i._source.getAccurateVolumeLevel()).toString(),n.aecReturnLoss&&(r.A_ecrl=Math.round(n.aecReturnLoss).toString()),n.aecReturnLossEnhancement&&(r.A_ecrle=Math.round(n.aecReturnLossEnhancement).toString()),xC("P2P")&&(n.bytes&&(r.bytesSent=n.bytes.toString()),"number"==typeof n.packetsLost&&(r.packetsLost=n.packetsLost.toString()),n.packets&&(r.packetsSent=n.packets.toString())),r}(r[0].ssrcId,e,n);t&&R_((()=>{var e;return null===(e=this.requestUpload)||void 0===e?void 0:e.call(this,bw.PUBLISH_STATS,{stream_type:"high",stats:t})}));break}}}))}uploadRelatedUplinkStats(e,t){var i;((null===(i=this.requestLocalMedia)||void 0===i?void 0:i.call(this))||[]).filter((e=>{let[t]=e;return t===hS.LocalVideoLowTrack||t===hS.LocalVideoTrack})).forEach((t=>{let[i,{ssrcs:n}]=t;const r=function(e,t){const i=t.videoSend.find((t=>t.ssrc===e));return i?{mediaType:"video",isVideoMute:!1,frameRateInput:i.inputFrame&&i.inputFrame.frameRate.toString(),frameRateSent:i.sentFrame&&i.sentFrame.frameRate.toString(),googRtt:i.rttMs.toString(),qpSumPerFrame:Math.floor(i.qpSumPerFrame).toString()}:null}(n[0].ssrcId,e);r&&R_((()=>{var e;null===(e=this.requestUpload)||void 0===e||e.call(this,bw.PUBLISH_RELATED_STATS,{stream_type:i===hS.LocalVideoLowTrack?"low":"high",stats:r})}))}))}uploadDenoiserStats(e){for(let r=0;r<e.length;r++){const s=e[r];if(s instanceof XA){var t,i,n;const e=null===(t=(i=s._external).getDenoiserStats)||void 0===t?void 0:t.call(i);return void(e&&(null===(n=this.requestUpload)||void 0===n||n.call(this,bw.DENOISER_STATS,e)))}}}uploadExtensionStats(e){for(let t=0;t<e.length;t++)e[t].getProcessorStats().forEach((e=>{var t;null===(t=this.requestUpload)||void 0===t||t.call(this,e.type,e.stats)}))}stopUploadUplinkStats(){this.uploadUnplinkStarted&&(this.uploadUnplinkStarted=!1,this.uplinkStatsUploadInterval&&window.clearInterval(this.uplinkStatsUploadInterval),this.uplinkRelatedStatsUploadInterval&&window.clearInterval(this.uplinkRelatedStatsUploadInterval),this.uplinkDenoiserStatsUploadInterval&&window.clearInterval(this.uplinkDenoiserStatsUploadInterval),this.uplinkStatsUploadInterval=void 0,this.uplinkRelatedStatsUploadInterval=void 0,this.uplinkDenoiserStatsUploadInterval=void 0)}startUploadDownlinkStats(){if(this.uploadDownlinkStarted)return;let e;this.uploadDownlinkStarted=!0,this.downlinkStatsUploadInterval&&window.clearInterval(this.downlinkStatsUploadInterval);let t=!1;this.downlinkStatsUploadInterval=window.setInterval((()=>{var i;const n=null===(i=this.requestStats)||void 0===i?void 0:i.call(this,!0);n&&(this.uploadDownlinkStats(n,t,e),e=n),t=!t}),3e3),this.downlinkRelatedStatsUploadInterval&&window.clearInterval(this.downlinkRelatedStatsUploadInterval),this.downlinkRelatedStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestStats)||void 0===e?void 0:e.call(this,!0);t&&(this.uploadRelatedDownlinkStats(t,this.lastStats),this.lastStats=t)}),1e3),this.downlinkExtensionStatsUploadInterval&&window.clearInterval(this.downlinkExtensionStatsUploadInterval),this.downlinkExtensionStatsUploadInterval=window.setInterval((()=>{var e;const t=null===(e=this.requestRemoteMedia)||void 0===e?void 0:e.call(this);t&&this.uploadDownlinkExtensionStats(t)}),2e3)}uploadDownlinkStats(e,t,i){var n;((null===(n=this.requestRemoteMedia)||void 0===n?void 0:n.call(this))||[]).forEach((n=>{let[r,s]=n;if(s.has(lS.VIDEO)&&r.videoTrack){const n=r.videoTrack?function(e,t,i,n,r){const s=t.videoRecv.find((t=>t.ssrc===e));if(!s)return null;const o={id:B_(10,""),timestamp:new Date(t.timestamp).toISOString(),mediaType:"video",type:"ssrc",ssrc:s.ssrc.toString()};var a,c;if(o.bytesReceived=s.bytes.toString(),o.packetsLost=s.packetsLost.toString(),o.packetsReceived=s.packets.toString(),s.framesRateFirefox&&(o.A_frr=s.framesRateFirefox.toString()),s.receivedFrame?(o.A_frr=s.receivedFrame.frameRate.toString(),o.A_fhr=s.receivedFrame.height.toString(),o.A_fwr=s.receivedFrame.width.toString()):(o.A_fhr=null===(a=n._videoHeight)||void 0===a?void 0:a.toString(),o.A_fwr=null===(c=n._videoWidth)||void 0===c?void 0:c.toString()),o.A_frd=s.decodeFrameRate.toString(),s.outputFrame&&(o.A_fro=s.outputFrame.frameRate.toString()),void 0!==s.jitterBufferMs&&(o.A_jbm=Math.floor(s.jitterBufferMs).toString()),void 0!==s.currentDelayMs&&(o.A_cdm=Math.floor(s.currentDelayMs).toString()),o.A_fs=s.firsCount.toString(),o.A_ns=s.nacksCount.toString(),o.A_ps=s.plisCount.toString(),n&&(o.A_vrtd=n._originMediaStreamTrack.enabled&&n._mediaStreamTrack.enabled?"0":"1"),n._player&&n._player.freezeTimeCounterList.length>0&&(o.A_vrft=Math.round(n._player.freezeTimeCounterList.splice(0,1)[0]).toString()),r&&n._player&&"visible"===aR.visibility){const e=Math.min(6e3,n._player.renderFreezeAccTime);o.A_vrrft=Math.round(e).toString(),n._player.renderFreezeAccTime=Math.max(0,n._player.renderFreezeAccTime-e)}if(o.A_rvps=XT[n._player?n._player.videoElementStatus:"uninit"].toString(),i){const t=i.videoRecv.find((t=>t.ssrc===e));if(t&&void 0!==s.totalInterFrameDelay&&void 0!==s.totalSquaredInterFrameDelay&&void 0!==t.totalInterFrameDelay&&void 0!==t.totalSquaredInterFrameDelay){const e=s.totalInterFrameDelay-t.totalInterFrameDelay,i=s.totalSquaredInterFrameDelay-t.totalSquaredInterFrameDelay,n=s.framesDecodeCount-t.framesDecodeCount,r=e/n*1e3,a=Math.round(1e3*Math.sqrt((i-Math.pow(e,2)/n)/n));!isNaN(a)&&r+a>Math.max(3*r,r+150)&&(o.A_ifdsd=a.toString())}}return o}(r._videoSSRC,e,i,r.videoTrack,t):void 0;n&&R_((()=>{var e;return null===(e=this.requestUpload)||void 0===e?void 0:e.call(this,bw.SUBSCRIBE_STATS,{stream_id:r.uid,stats:n})}))}if(s.has(lS.AUDIO)&&r.audioTrack){const t=r.audioTrack?function(e,t,i,n){const r=t.audioRecv.find((t=>t.ssrc===e));if(!r)return null;const s={id:B_(10,""),timestamp:new Date(t.timestamp).toISOString(),mediaType:"audio",type:"ssrc",ssrc:r.ssrc.toString()};if(s.bytesReceived=r.bytes.toString(),s.packetsLost=r.packetsLost.toString(),s.packetsReceived=r.packets.toString(),r.outputLevel?s.A_aol=Math.round(100*r.outputLevel).toString():s.A_aol=Math.round(100*n._source.getAccurateVolumeLevel()).toString(),s.A_apol=Math.round(100*n._source.getAccurateVolumeLevel()).toString(),n&&(s.A_artd=n._originMediaStreamTrack.enabled&&n._mediaStreamTrack.enabled?"0":"1"),s.A_jr=r.jitterMs.toString(),s.A_jbm=Math.floor(r.jitterBufferMs).toString(),s.A_cdm=Math.floor(r.jitterBufferMs).toString(),s.A_raps=XT[xA.getPlayerState(n.getTrackId())].toString(),i){const t=i.audioRecv.find((t=>t.ssrc===e));if(t){const e=r.concealedSamples-t.concealedSamples;e>0&&(s.A_cs=Math.round(e).toString())}}return s}(r._audioSSRC,e,i,r.audioTrack):void 0;t&&R_((()=>{var e;return null===(e=this.requestUpload)||void 0===e?void 0:e.call(this,bw.SUBSCRIBE_STATS,{stream_id:r.uid,stats:t})}))}}))}uploadRelatedDownlinkStats(e,t){var i;((null===(i=this.requestRemoteMedia)||void 0===i?void 0:i.call(this))||[]).forEach((i=>{let[n,r]=i;if(r.has(lS.VIDEO)&&n.videoTrack){var s;const i=!0===(n._videoSSRC&&(null===(s=this.requestVideoIsReady)||void 0===s?void 0:s.call(this,n._videoSSRC))||!1),r=function(e,t,i,n,r,s){const o=i.videoRecv.find((t=>t.ssrc===e)),a=r?r.videoRecv.find((t=>t.ssrc===e)):void 0;if(!o)return null;const c=rN.isRemoteVideoFreeze(s,o,a)&&t,l={mediaType:"video",isVideoMute:!1,peerId:n,frameRateReceived:o.receivedFrame&&o.receivedFrame.frameRate.toString(),frameRateDecoded:o.decodedFrame&&o.decodedFrame.frameRate.toString(),isFreeze:c,bytesReceived:o.bytes.toString(),packetsReceived:o.packets.toString(),packetsLost:o.packetsLost.toString(),qpSumPerFrame:Math.floor(o.qpSumPerFrame).toString()};return o.framesRateFirefox&&(l.frameRateDecoded=o.framesRateFirefox.toString(),l.frameRateReceived=o.framesRateFirefox.toString()),l}(n._videoSSRC,i,e,n.uid,t,n.videoTrack);r&&R_((()=>{var e;null===(e=this.requestUpload)||void 0===e||e.call(this,bw.SUBSCRIBE_RELATED_STATS,{stream_id:n.uid,stats:r})}))}if(r.has(lS.AUDIO)&&n.audioTrack){const t=function(e,t,i,n){const r=t.audioRecv.find((t=>t.ssrc===e));if(!r)return null;const s=rN.isRemoteAudioFreeze(n);return{mediaType:"audio",isAudioMute:!1,peerId:i,googJitterReceived:r.jitterMs.toString(),isFreeze:s,bytesReceived:r.bytes.toString(),packetsReceived:r.packets.toString(),packetsLost:r.packetsLost.toString(),frameReceived:r.receivedFrames.toString(),frameDropped:r.droppedFrames.toString()}}(n._audioSSRC,e,n.uid,n.audioTrack);t&&R_((()=>{var e;null===(e=this.requestUpload)||void 0===e||e.call(this,bw.SUBSCRIBE_RELATED_STATS,{stream_id:n.uid,stats:t})}))}}))}stopUploadDownlinkStats(){this.uploadDownlinkStarted&&(this.uploadDownlinkStarted=!1,this.downlinkStatsUploadInterval&&window.clearInterval(this.downlinkStatsUploadInterval),this.downlinkRelatedStatsUploadInterval&&window.clearInterval(this.downlinkRelatedStatsUploadInterval),this.downlinkStatsUploadInterval=void 0,this.downlinkRelatedStatsUploadInterval=void 0)}stopUploadTransportStats(){this.uploadTransportStarted&&(this.uploadTransportStarted=!1,this.transportStatsUploadInterval&&window.clearInterval(this.transportStatsUploadInterval),this.transportStatsUploadInterval=void 0)}stopUploadExtensionUsageStats(){this.uploadExtensionUsageStarted&&(this.uploadExtensionUsageStarted=!1,this.extensionUsageStatsUploadInterval&&window.clearInterval(this.extensionUsageStatsUploadInterval),this.extensionUsageStatsUploadInterval=void 0)}uploadDownlinkExtensionStats(e){e.forEach((e=>{let[t,i]=e;i.has(lS.VIDEO)&&t.videoTrack&&t.videoTrack.getProcessorStats().forEach((e=>{var t;null===(t=this.requestUpload)||void 0===t||t.call(this,e.type,e.stats)})),i.has(lS.AUDIO)&&t.audioTrack&&t.audioTrack.getProcessorStats().forEach((e=>{var t;null===(t=this.requestUpload)||void 0===t||t.call(this,e.type,e.stats)}))}))}}function tx(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function nx(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?tx(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):tx(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function rx(e){var t,i,n,r=2;for("undefined"!=typeof Symbol&&(i=DL,n=Symbol.iterator);r--;){if(i&&null!=(t=e[i]))return t.call(e);if(n&&null!=(t=e[n]))return new ix(t.call(e));i="@@asyncIterator",n="@@iterator"}throw new TypeError("Object is not async iterable")}function ix(e){function t(e){if(Object(e)!==e)return nb.reject(new TypeError(e+" is not an object."));var t=e.done;return nb.resolve(e.value).then((function(e){return{value:e,done:t}}))}return(ix=function(e){this.s=e,this.n=e.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(e){var i=this.s.return;return void 0===i?nb.resolve({value:e,done:!0}):t(i.apply(this.s,arguments))},throw:function(e){var i=this.s.return;return void 0===i?nb.reject(e):t(i.apply(this.s,arguments))}},new ix(e)}class ox extends r_{get state(){return this._state}set state(e){const t=this._state;this._state=e,this.emit(pS.StateChange,t,this._state)}constructor(e,t){super(),oh(this,"store",void 0),oh(this,"statsUploader",void 0),oh(this,"connection",void 0),oh(this,"localTrackMap",new Map),oh(this,"remoteUserMap",new Map),oh(this,"localDataChannels",[]),oh(this,"remoteDataChannelMap",new Map),oh(this,"pendingLocalTracks",[]),oh(this,"pendingRemoteTracks",[]),oh(this,"pendingLocalDataChannels",[]),oh(this,"pendingRemoteDataChannels",[]),oh(this,"statsCollector",void 0),oh(this,"isPlanB",!1),oh(this,"shouldForwardP2PCreation",void 0),oh(this,"iceFailedCount",0),oh(this,"dtlsFailedCount",0),oh(this,"mutex",new G_("P2PChannel-mutex")),oh(this,"_state",fS.Disconnected),oh(this,"_pcStatsUploadType",xC("NEW_ICE_RESTART")?uS.FIRST_CONNECTION:uS.OLD_FIRST_CONNECTION),oh(this,"_isInRestartIce",!1),oh(this,"_isStartRestartIce",!1),oh(this,"_restartStates",["disconnected","failed"]),oh(this,"_restartTimer",void 0),oh(this,"_isFirstConnected",!0),oh(this,"handleMuteLocalTrack",(async(e,t,i)=>{const n=await this.mutex.lock("Locking from P2PChannel.handleMuteLocalTrack");try{if(!this.connection||this.state!==fS.Connected)return void i(new Fb(Bb.INVALID_OPERATION,"Cannot call P2PChannel.handleMuteLocalTrack before connection established."));const r=this.filterTobeMutedTracks(e);if(0===r.length)return void t();const s=r.find((e=>"videoLowTrack"===e[0]));s&&s[1].track._originMediaStreamTrack.stop(),await this.connection.muteLocal(r.map((e=>{let[,{id:t}]=e;return t})));const o=this.createMuteMessage(r);await __(this,pS.RequestMuteLocal,o),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleUnmuteLocalTrack",(async(e,t,i)=>{const n=await this.mutex.lock("Locking from P2PChannel.handleUnmuteLocalTrack");try{if(!this.connection||this.state!==fS.Connected)return void i(new Fb(Bb.INVALID_OPERATION,"Cannot call P2PChannel.handleUnmuteLocalTrack before connection established."));const r=this.filterTobeUnmutedTracks(e);if(0===r.length)return void t();const s=r.find((e=>"videoLowTrack"===e[0]));if(s){const t=s[1];if(t.track._originMediaStreamTrack.stop(),!xC("DISABLE_DUAL_STREAM_USE_ENCODING")&&uA().supportDualStreamEncoding){const i=e._mediaStreamTrack.clone();t.track._mediaStreamTrack=i,t.track._originMediaStreamTrack=i}else{const i=PM(e,E_(this,pS.RequestLowStreamParameter));t.track._mediaStreamTrack=i,t.track._originMediaStreamTrack=i}await new nb(((e,i)=>{this.handleReplaceTrack(t.track,e,i,!0)}))}await this.connection.unmuteLocal(r.map((e=>{let[,{id:t}]=e;return t})));const o=this.createUnmuteMessage(r);await __(this,pS.RequestUnmuteLocal,o),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleUpdateVideoEncoder",(async(e,t,i)=>{const n=await this.mutex.lock("Locking from P2PChannel.handleSetVideoEncoder");try{const i=this.localTrackMap.get(hS.LocalVideoTrack);if(!this.connection||!i||i.track!==e||this.state!==fS.Connected)return void t();const{id:r,track:s}=i;await this.connection.updateSendParameters(r,s),await this.connection.updateEncoderConfig(r,s),this.emit(pS.UpdateVideoEncoder,s),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleSetOptimizationMode",(async(e,t,i)=>{const n=await this.mutex.lock("Locking from P2PChannel.handleSetOptimizationMode");try{const i=this.localTrackMap.get(hS.LocalVideoTrack);if(!this.connection||!i||i.track!==e||this.state!==fS.Connected)return;const{id:r,track:s}=i;await this.connection.updateSendParameters(r,s),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleReplaceTrack",(async(e,t,i,n)=>{let r;$C.debug("[".concat(this.store.clientId,"] P2PChannel handleReplaceTrack for [track-id-").concat(e.getTrackId(),"]")),"boolean"==typeof n&&n||(r=await this.mutex.lock("From P2PChannel.handleReplaceTrack"));try{var s;const i=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(!this.connection||!i||this.state!==fS.Connected)return void t();if(await(null===(s=this.connection)||void 0===s?void 0:s.replaceTrack(e,i[1].id)),this.isPlanB){const t=i[1];t.id=e._mediaStreamTrack.id,this.localTrackMap.set(i[0],t)}if(i[0]===hS.LocalVideoTrack&&!xC("DISABLE_DUAL_STREAM_USE_ENCODING")&&uA().supportDualStreamEncoding){const t=this.localTrackMap.get(hS.LocalVideoLowTrack);if(t){const i=e._mediaStreamTrack.clone();t.track._originMediaStreamTrack.stop(),t.track._mediaStreamTrack=i,t.track._originMediaStreamTrack=i,await new nb(((e,i)=>{this.handleReplaceTrack(t.track,e,i,!0)}))}}t()}catch(e){i(e)}finally{var o;null===(o=r)||void 0===o||o()}})),oh(this,"handleGetLocalVideoStats",(e=>{e(this.statsCollector.getLocalVideoTrackStats())})),oh(this,"handleGetLocalAudioStats",(e=>{e(this.statsCollector.getLocalAudioTrackStats())})),oh(this,"handleGetRemoteVideoStats",(e=>this.statsCollector.getRemoteVideoTrackStats(e.uid)[e.uid])),oh(this,"handleGetRemoteAudioStats",(e=>this.statsCollector.getRemoteAudioTrackStats(e.uid)[e.uid])),this.store=e,this.statsCollector=t,this.statsCollector.addP2PChannel(this),this.statsUploader=new ex,this.bindStatsUploaderEvents(),this.isPlanB=!uA().supportUnifiedPlan||xC("CHROME_FORCE_PLAN_B")&&Db(),this.shouldForwardP2PCreation=xC("FORWARD_P2P_CREATION")&&uA().supportPCSetConfiguration&&function(){const e=gb();return e===cb.ANDROID||e===cb.IOS||e===cb.HARMONY_OS}(),this.shouldForwardP2PCreation&&(this.connection=this.store.useDataChannel?new XM({},this.store):this.isPlanB?new AM({},this.store):new xM({},this.store),this.bindConnectionEvents(this.connection))}async startP2PConnection(e,t){var i;this.state=fS.New;const n=this.shouldForwardP2PCreation&&"closed"===(null===(i=this.connection)||void 0===i?void 0:i.peerConnectionState);if(this.shouldForwardP2PCreation&&!n||(n&&this.connection&&($C.warning("[".concat(this.store.clientId,"] P2PChannel.startP2PConnection ForwardP2P closed.")),this.connection.close(),this.unbindConnectionEvents(this.connection)),this.connection=this.store.useDataChannel?new XM(e,this.store):this.isPlanB?new AM(e,this.store):new xM(e,this.store),this.bindConnectionEvents(this.connection)),!this.connection)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot P2PChannel.startConnection before P2PConnection initialization .");return this._pcStatsUploadType=xC("NEW_ICE_RESTART")?uS.FIRST_CONNECTION:uS.OLD_FIRST_CONNECTION,this._isFirstConnected=!0,this._isInRestartIce=!1,this._isStartRestartIce=!1,this.connection.setConfiguration(e),this.connection.establishPromise}async connect(e,t,i,n,r,s){if(!this.connection)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot P2PChannel.connect before P2PChannel.startP2PConnection .");this.connection instanceof XM?this.connection.updateRemoteConnect(n):(this.store.peerConnectionStart(),await this.connection.connect(e,t,i,n,r,s),this.statsUploader.startUploadTransportStats(),this.statsUploader.startUploadExtensionUsageStats(),this.state=fS.Connected)}async preConnect(e,t,i,n,r,s){if(!this.connection)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot P2PChannel.connect before P2PChannel.startP2PConnection .");this.store.peerConnectionStart();const o=await this.connection.connect(e,t,i,n,r,s);return this.statsUploader.startUploadTransportStats(),this.statsUploader.startUploadExtensionUsageStats(),this.state=fS.Connected,o}getEstablishParams(){if(this.connection instanceof XM)return this.connection.getP2PConnectionParams();throw new Error("Only DataChannelConnection needs to obtain establishParams")}async publishDataChannel(e){if(!this.connection){if(this.state===fS.Disconnected)throw new Fb(Bb.UNEXPECTED_ERROR,"PeerConnection already disconnected.");const t=e.filter((e=>-1!==this.pendingLocalDataChannels.findIndex((t=>t.id===e.id))));return void(this.pendingLocalDataChannels=this.pendingLocalDataChannels.concat(t))}const t=this.filterTobePublishedDataChannels(e);0!==t.length&&(t.forEach((e=>{const t=Date.now();this.store.publish(e.id.toString(),"datachannel",t)})),await this.connection.createDataChannels(this.store.uid,t),t.forEach((e=>{this.localDataChannels.push(e);const t=Date.now();this.store.publish(e.id+"","datachannel",void 0,t)})))}publish(e,t,i){var n=this;return LL((function*(){const r=yield ML(n.mutex.lock("From P2PChannel.publish"));try{if(!n.connection||n.state!==fS.Connected){if(n.state===fS.Disconnected)throw new Fb(Bb.UNEXPECTED_ERROR,"PeerConnection already disconnected.");n.throwIfTrackTypeNotMatch(e);const t=e.filter((e=>-1===n.pendingLocalTracks.indexOf(e)));return void(n.pendingLocalTracks=n.pendingLocalTracks.concat(t))}n.store.pubId=n.store.pubId+1,eN.markPublishStart(n.store.clientId,n.store.pubId);const s=n.filterTobePublishedTracks(e,t,i);if(0===s.length)return void(yield ML(n.tryToUnmuteAudio(e)));yield*xL(rx(n.doPublish(n.connection,s)))}finally{r()}}))()}doPublish(e,t){var i=this;return LL((function*(){t.forEach((e=>{let{track:t,type:n}=e;const r=Date.now();i.store.publish(t.getTrackId(),n===hS.LocalAudioTrack?"audio":"video",r)})),i.bindLocalTrackEvents(t);const n=yield ML(e.send(t.map((e=>{let{track:t}=e;return t})),i.store.codec,i.store.audioCodec)),r=(yield ML(n.next())).value,s=i.createGatewayPublishMessage(t,r);let o;try{o=yield s}catch(e){throw n.throw(e),(null==e?void 0:e.code)===Bb.WS_ABORT&&t.forEach((e=>{let{track:t}=e;-1===i.pendingLocalTracks.indexOf(t)&&i.pendingLocalTracks.push(t)})),i.unbindLocalTrackEvents(t),e}const a=i.mapPubResToRemoteConfig(s,o),c=(yield ML(n.next(a))).value;t.forEach((e=>{let{type:t}=e;i.statsCollector.addLocalStats(t)})),i.assignLocalTracks(t,c),i.statsUploader.startUploadUplinkStats(),t.forEach((e=>{let{track:t,type:n}=e;const r=Date.now();i.store.publish(t.getTrackId(),n===hS.LocalAudioTrack?"audio":"video",void 0,r)}))}))()}async updateVideoStreamParameter(e,t){const i=this.localTrackMap.get(t);if(!i)return;if(!(i.track instanceof vR))return $C.warn("[updateVideoStreamParameter]: track is not an instance of LocalVideoTrack");if(!(this.connection instanceof xM||this.connection instanceof AM))return $C.warn("[updateVideoStreamParameter]: connection is not P2PConnection or P2PConnectionPlanB");const{track:n}=i,r=function(e,t){const i={};return e.height&&e.width&&(i.scaleResolutionDownBy=pN(e,t)),i.maxFramerate=e.framerate?cN(e.framerate):void 0,i.maxBitrate=e.bitrate?1e3*e.bitrate:void 0,i}(e,n);if(n._encoderConfig||(n._encoderConfig={}),t!==hS.LocalVideoLowTrack||!xC("DISABLE_DUAL_STREAM_USE_ENCODING")&&uA().supportDualStreamEncoding)null!=r.scaleResolutionDownBy&&(n._encoderConfig.scaleResolutionDownBy=r.scaleResolutionDownBy);else{const t=n._originMediaStreamTrack;if(!t.canvas)return $C.warn("[".concat(n.getTrackId(),"] no canvas on track"));!function(e,t){const i=e.canvas;t.width&&(i.width=cN(t.width)),t.height&&(i.height=cN(t.height)),t.framerate&&(i.stopCapture&&i.stopCapture(),i.stopCapture=lA((()=>{!i.startCapture&&i.stopCapture&&i.stopCapture(),i.startCapture&&i.startCapture()}),cN(t.framerate)))}(t,e)}null!=r.maxBitrate&&(n._encoderConfig.bitrateMax=r.maxBitrate/1e3),null!=r.maxFramerate&&(n._encoderConfig.frameRate&&"object"==typeof n._encoderConfig.frameRate?n._encoderConfig.frameRate.max=r.maxFramerate:n._encoderConfig.frameRate={max:r.maxFramerate}),$C.debug("[".concat(n.getTrackId(),"] LowStreamEncoderConfig: , ").concat(JSON.stringify(n._encoderConfig))),await this.connection.updateRtpSenderEncodings(n)}publishLowStream(e){var t=this;return LL((function*(){if(!t.connection||t.state!==fS.Connected)return;const i=yield ML(t.mutex.lock("Locking from P2PChannel.publishLowStream"));try{const r=t.localTrackMap.get(hS.LocalVideoTrack);if(!r)throw new Fb(Bb.UNEXPECTED_ERROR,"Could not find high stream");if(t.localTrackMap.has(hS.LocalVideoLowTrack))throw new Fb(Bb.UNEXPECTED_ERROR,"[".concat(t.store.clientId,"] Can't publish low stream when stream already publish"));const s=[{track:t.getLowVideoTrack(r.track,e),type:hS.LocalVideoLowTrack}];if(yield*xL(rx(t.doPublish(t.connection,s))),r.track.muted||!r.track.enabled){var n;const e=null===(n=t.localTrackMap.get(hS.LocalVideoLowTrack))||void 0===n?void 0:n.id;void 0!==e&&(yield ML(t.connection.muteLocal([e])))}}finally{i()}}))()}async republish(){this.pendingLocalTracks.length>0&&($C.debug("[".concat(this.store.clientId,"] Emit P2PChannelEvents.RequestRePublish to republish tracks.")),await b_(this,pS.RequestRePublish,this.pendingLocalTracks),this.emit(pS.MediaReconnectEnd,this.store.uid),this.pendingLocalTracks=[]),this.pendingLocalDataChannels.length>0&&($C.debug("Emit P2PChannelEvents.RequestRePublishDataChannel to republish datachannels."),await b_(this,pS.RequestRePublishDataChannel,this.pendingLocalDataChannels),this.pendingLocalDataChannels=[])}async reSubscribe(e){for(let e=this.pendingRemoteTracks.length-1;e>=0;e--){const{user:t,kind:i}=this.pendingRemoteTracks[e];(i!==lS.AUDIO||t._audio_added_&&t._audioSSRC)&&(i!==lS.VIDEO||t._video_added_&&t._videoSSRC)||this.pendingRemoteTracks.splice(e,1)}if(e)await b_(this,pS.RequestReSubscribe,this.pendingRemoteTracks);else for(const{user:e,kind:t}of this.pendingRemoteTracks)await this.subscribe(e,t,t===lS.VIDEO?e._videoSSRC:e._audioSSRC);this.pendingRemoteTracks.forEach((e=>{let{user:t}=e;this.emit(pS.MediaReconnectEnd,t.uid)})),this.pendingRemoteTracks=[]}async unpublish(e){if(!this.connection||this.state!==fS.Connected)return void e.forEach((e=>{const t=this.pendingLocalTracks.indexOf(e);-1!==t&&this.pendingLocalTracks.splice(t,1)}));const t=this.filterTobeUnpublishedTracks(e);if(0===t.length)return;const i=t.find((e=>"videoLowTrack"===e[0]));return i&&i[1].track.close(),this.doUnpublish(this.connection,t)}async unpublishDataChannel(e){if(!this.connection||this.state!==fS.Connected)return void e.forEach((e=>{const t=this.pendingLocalDataChannels.indexOf(e);-1!==t&&this.pendingLocalDataChannels.splice(t,1)}));const t=this.filterTobeUnpublishedDataChannels(e);return 0!==t.length?(t.forEach((e=>{const t=this.localDataChannels.indexOf(e);-1!==t&&this.localDataChannels.splice(t,1)})),0===this.localDataChannels.length&&await this.connection.stopDataChannels(this.store.uid),t.map((e=>e.id))):void 0}async unpublishLowStream(){if(!this.connection||this.state!==fS.Connected)return;const e=this.localTrackMap.get(hS.LocalVideoLowTrack);if(!e)return;e.track.close();const t=[[hS.LocalVideoLowTrack,e]];return this.doUnpublish(this.connection,t)}async doUnpublish(e,t){const i=this.createGatewayUnpublishMessage(t);return await e.stopSending(t.map((e=>{let[,{id:t}]=e;return t}))),this.withdrawLocalTracks(t),this.unbindLocalTrackEvents(t.map((e=>{let[t,{track:i}]=e;return{type:t,track:i}}))),t.forEach((e=>{let[t]=e;this.statsCollector.removeLocalStats(t)})),0===this.localTrackMap.size&&this.statsUploader.stopUploadUplinkStats(),i}async subscribeDataChannel(e,t){if(!this.connection||this.state!==fS.Connected)throw new Fb(Bb.INVALID_OPERATION,"Cannot subscribe remote user when peerConnection disconnected.");const i=t.filter((t=>{var i;return!(null!==(i=this.remoteDataChannelMap.get(e))&&void 0!==i&&i.get(t.id))}));if(0!==i.length)return await this.connection.createDataChannels(e.uid,i),i.forEach((t=>{var i;this.remoteDataChannelMap.has(e)?null===(i=this.remoteDataChannelMap.get(e))||void 0===i||i.set(t.id,t):this.remoteDataChannelMap.set(e,new Map([[t.id,t]]));const n=this.pendingRemoteDataChannels.findIndex((i=>{let{user:n,id:r}=i;return n.uid===e.uid&&r===t.id}));-1!==n&&this.pendingRemoteDataChannels.splice(n,1)})),i.map((e=>e.id))}async subscribe(e,t,i,n,r){var s;if(!this.connection||this.state!==fS.Connected)throw new Fb(Bb.INVALID_OPERATION,"Cannot subscribe remote user when peerConnection disconnected.");if(null!==(s=this.remoteUserMap.get(e))&&void 0!==s&&s.has(t))return;let o,a,c;if(r){const i=r.find((e=>{let{stream_type:i}=e;return i===t}));if(!i)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot subscribe to remote ".concat(t," for user: ").concat(e.uid," because subscribe answer from gateway does not contain stream_type: ").concat(t,"."));const n=await this.connection.receive(t,i.ssrcs,String(e._uintid),i.attributes);this.connection instanceof xM&&(c=n.transceiver),o=n.track,a=n.id}else{const r=await this.connection.receive(t,[{ssrcId:i,rtx:n}],String(e._uintid),void 0);this.connection instanceof xM&&(c=r.transceiver),o=r.track,a=r.id}t===lS.AUDIO?(e._audioTrack?e._audioTrack._updateOriginMediaStreamTrack(o):(e._audioTrack=new AR(o,e.uid,e._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote audio track: ").concat(e._audioTrack.getTrackId()))),c&&e._audioTrack._updateRtpTransceiver(c),this.bindRemoteTrackEvents(e,e._audioTrack)):(e._videoTrack?e._videoTrack._updateOriginMediaStreamTrack(o):(e._videoTrack=new TR(o,e.uid,e._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote video track: ").concat(e._videoTrack.getTrackId()))),c&&e._videoTrack._updateRtpTransceiver(c),this.bindRemoteTrackEvents(e,e._videoTrack));const l=this.remoteUserMap.get(e);l?l.set(t,a):this.remoteUserMap.set(e,new Map([[t,a]])),this.statsCollector.addRemoteStats(e.uid),this.statsUploader.startUploadDownlinkStats();const d=this.pendingRemoteTracks.findIndex((i=>{let{user:n,kind:r}=i;return n.uid===e.uid&&t===r}));-1!==d&&(this.pendingRemoteTracks.splice(d,1),this.emit(pS.MediaReconnectEnd,e.uid))}async massSubscribe(e){return this.massSubscribeNoLock(e)}async massSubscribeNoLock(e){if(!this.connection||this.state!==fS.Connected)throw new Fb(Bb.INVALID_OPERATION,"Cannot subscribeAll remote users when peerConnection disconnected.");e=e.filter((e=>{var t;let{user:i,mediaType:n}=e;return!(null!==(t=this.remoteUserMap.get(i))&&void 0!==t&&t.has(n))}));const t=await this.connection.batchReceive(e.map((e=>{let{user:t,mediaType:i,ssrcId:n,rtxSsrcId:r}=e;return{kind:i,ssrcMsg:[{ssrcId:n,rtx:r}],mslabel:String(t._uintid)}})));e.forEach(((e,i)=>{let{user:n,mediaType:r}=e;const{track:s,id:o,transceiver:a}=t[i];r===lS.AUDIO?(n._audioTrack?n._audioTrack._updateOriginMediaStreamTrack(s):(n._audioTrack=new AR(s,n.uid,n._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote audio track: ").concat(n._audioTrack.getTrackId()))),a&&n._audioTrack._updateRtpTransceiver(a),this.bindRemoteTrackEvents(n,n._audioTrack)):(n._videoTrack?n._videoTrack._updateOriginMediaStreamTrack(s):(n._videoTrack=new TR(s,n.uid,n._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote video track: ").concat(n._videoTrack.getTrackId()))),a&&n._videoTrack._updateRtpTransceiver(a),this.bindRemoteTrackEvents(n,n._videoTrack));const c=this.remoteUserMap.get(n);c?c.set(r,o):this.remoteUserMap.set(n,new Map([[r,o]])),this.statsCollector.addRemoteStats(n.uid),this.statsUploader.startUploadDownlinkStats();const l=this.pendingRemoteTracks.findIndex((e=>{let{user:t,kind:i}=e;return t.uid===n.uid&&r===i}));-1!==l&&(this.pendingRemoteTracks.splice(l,1),this.emit(pS.MediaReconnectEnd,n.uid))}))}async unsubscribe(e,t,i){const n=this.pendingRemoteTracks.filter((i=>{let{user:n,kind:r}=i;return void 0!==t?n.uid===e.uid&&t===r:n.uid===e.uid}));if(n.forEach((e=>{const t=this.pendingRemoteTracks.indexOf(e);this.pendingRemoteTracks.splice(t,1)})),this.connection&&this.state===fS.Connected||i||n.forEach((t=>{let{kind:i}=t;var n;if(i===lS.AUDIO)null===(n=e._audioTrack)||void 0===n||n._destroy(),e._audioTrack=void 0;else if(i===lS.VIDEO){var r;null===(r=e._videoTrack)||void 0===r||r._destroy(),e._videoTrack=void 0}})),!this.connection||this.state!==fS.Connected)return;const r=this.filterTobeUnSubscribedTracks(e,t);if(0===r.length)return;await this.connection.stopReceiving(r.map((e=>{let[,{id:t}]=e;return t})));const s=this.createUnsubscribeMessage(r);return this.withdrawRemoteTracks(r),0===this.remoteUserMap.size&&this.statsUploader.stopUploadDownlinkStats(),r.forEach((e=>{let[t,{kind:n}]=e;var r,s;if(n===lS.VIDEO&&t._videoSSRC&&(null===(r=this.connection)||void 0===r||r.setStatsRemoteVideoIsReady(t._videoSSRC,!1)),n===lS.VIDEO)this.unbindRemoteTrackEvents(t._videoTrack),i||(null===(s=t._videoTrack)||void 0===s||s._destroy(),t._videoTrack=void 0);else if(n===lS.AUDIO){var o;this.unbindRemoteTrackEvents(t._audioTrack),i||(null===(o=t._audioTrack)||void 0===o||o._destroy(),t._audioTrack=void 0)}})),s}async unsubscribeDataChannel(e,t){if(t.forEach((e=>{const t=this.pendingRemoteDataChannels.findIndex((t=>t.id===e.id));-1!==t&&this.pendingRemoteDataChannels.splice(t,1)})),!this.connection)return;const i=this.filterTobeUnSubscribedDataChannels(e,t);if(0===i.length)return;t.forEach((e=>{e._close()}));const n=this.remoteDataChannelMap.get(e);return i.forEach((e=>{n&&n.delete(e.id)})),n&&0===n.size&&(this.remoteDataChannelMap.delete(e),await this.connection.stopDataChannels(e.uid)),i.map((e=>e.id))}async massUnsubscribe(e){return this.massUnsubscribeNoLock(e)}async massUnsubscribeNoLock(e){let t=[];for(const{user:i,mediaType:n}of e){const e=this.pendingRemoteTracks.filter((e=>{let{user:t,kind:r}=e;return void 0!==n?t.uid===i.uid&&n===r:t.uid===i.uid}));e.forEach((e=>{const t=this.pendingRemoteTracks.indexOf(e);this.pendingRemoteTracks.splice(t,1)})),t=t.concat(e)}if(!this.connection||this.state!==fS.Connected)return void t.forEach((e=>{let{user:t,kind:i}=e;var n;if(i===lS.AUDIO)null===(n=t._audioTrack)||void 0===n||n._destroy(),t._audioTrack=void 0;else if(i===lS.VIDEO){var r;null===(r=t._videoTrack)||void 0===r||r._destroy(),t._videoTrack=void 0}}));const i=ly(e).call(e,((e,t)=>{let{user:i,mediaType:n}=t;const r=this.filterTobeUnSubscribedTracks(i,n);return e.concat(r)}),[]);if(0===i.length)return;await this.connection.stopReceiving(i.map((e=>{let[,{id:t}]=e;return t})));const n=this.createUnsubscribeAllMessage(i);return this.withdrawRemoteTracks(i),0===this.remoteUserMap.size&&this.statsUploader.stopUploadDownlinkStats(),i.forEach((e=>{let[t,{kind:i}]=e;var n,r;if(i===lS.VIDEO&&t._videoSSRC&&(null===(n=this.connection)||void 0===n||n.setStatsRemoteVideoIsReady(t._videoSSRC,!1)),i===lS.VIDEO)this.unbindRemoteTrackEvents(t._videoTrack),null===(r=t._videoTrack)||void 0===r||r._destroy(),t._videoTrack=void 0;else if(i===lS.AUDIO){var s;this.unbindRemoteTrackEvents(t._audioTrack),null===(s=t._audioTrack)||void 0===s||s._destroy(),t._audioTrack=void 0}})),n}async muteRemote(e,t){if(!this.connection)return;const i=this.remoteUserMap.get(e);if(!i)return void $C.warning("[".concat(this.store.clientId,"] P2PChannel.muteRemote has no remote user ").concat(e.uid,"."));if(!i.get(t))return void $C.warning("[".concat(this.store.clientId,"] P2PChannel.muteRemote has no remote user ").concat(e.uid," media type ").concat(t,"."));const n=t===lS.VIDEO?e._videoSSRC:e._audioSSRC;void 0!==n&&this.connection.setStatsRemoteVideoIsReady(n,!1)}async unmuteRemote(e,t){return this.unmuteRemoteNoLock(e,t)}async unmuteRemoteNoLock(e,t){if(!this.connection)return;const i=this.remoteUserMap.get(e);i?i.get(t)||$C.warning("[".concat(this.store.clientId,"] P2PChannel.unmuteRemote has no remote user ").concat(e.uid," media type ").concat(t,".")):$C.warning("[".concat(this.store.clientId,"] P2PChannel.unmuteRemote has no remote user ").concat(e.uid,"."))}getAllTracks(e){const t=this.localTrackMap.get(hS.LocalAudioTrack);if((null==t?void 0:t.track)instanceof QA){const i=t.track;return Array.from(this.localTrackMap.entries()).filter((e=>{let[t]=e;return t!==hS.LocalAudioTrack})).filter((t=>{let[i]=t;return!(e&&i===hS.LocalVideoLowTrack)})).map((e=>{let[,{track:t}]=e;return t})).concat(i.trackList)}return Array.from(this.localTrackMap.entries()).filter((t=>{let[i]=t;return!(e&&i===hS.LocalVideoLowTrack)})).map((e=>{let[,{track:t}]=e;return t}))}getAllDataChannels(){return this.localDataChannels}reportPublishEvent(e,t,i,n,r){if(e){const i=this.localTrackMap.get(hS.LocalAudioTrack),s=n?this.localTrackMap.get(hS.LocalVideoLowTrack):this.localTrackMap.get(hS.LocalVideoTrack);nw.publish(this.store.sessionId,{eventElapse:eN.measureFromPublishStart(this.store.clientId,this.store.pubId),succ:e,ec:t,audioName:null==i?void 0:i.track.getTrackLabel(),videoName:null==s?void 0:s.track.getTrackLabel(),screenshare:-1!==(null==s?void 0:s.track._hints.indexOf(NT.SCREEN_TRACK)),audio:!!i,video:!!s,p2pid:this.store.p2pId,publishRequestid:this.store.pubId,extend:r})}else{var s;i||(i=[]);const o=i.find((e=>e instanceof YA)),a=n?null===(s=this.localTrackMap.get(hS.LocalVideoTrack))||void 0===s?void 0:s.track:i.find((e=>e instanceof vR));nw.publish(this.store.sessionId,{eventElapse:eN.measureFromPublishStart(this.store.clientId,this.store.pubId),succ:e,ec:t,audioName:null==o?void 0:o.getTrackLabel(),videoName:null==a?void 0:a.getTrackLabel(),screenshare:-1!==(null==a?void 0:a._hints.indexOf(NT.SCREEN_TRACK)),audio:!!o,video:!!a,p2pid:this.store.p2pId,publishRequestid:this.store.pubId,extend:r})}}reportSubscribeEvent(e,t,i,n){const r=n===lS.VIDEO?i._videoSSRC:i._audioSSRC;r&&nw.subscribe(this.store.sessionId,{succ:e,ec:t,video:n===lS.VIDEO,audio:n===lS.AUDIO,peerid:i.uid,subscribeRequestid:n===lS.VIDEO?i._videoSSRC:i._audioSSRC,p2pid:this.store.p2pId,eventElapse:eN.measureFromSubscribeStart(this.store.clientId,r)})}reset(){$C.debug("[".concat(this.store.clientId,"] P2PChannel.reset")),this.mutex=new G_("P2PChannel-mutex"),this.connection&&(this.connection.close(),this.unbindConnectionEvents(this.connection),this.connection=void 0),this.shouldForwardP2PCreation&&(this.connection=this.store.useDataChannel?new XM({},this.store):this.isPlanB?new AM({},this.store):new xM({},this.store),this.bindConnectionEvents(this.connection)),this.statsUploader.stopUploadUplinkStats(),this.statsUploader.stopUploadDownlinkStats(),this.statsUploader.stopUploadTransportStats(),this.statsUploader.stopUploadExtensionUsageStats(),this.unbindLocalTrackEvents(),this.unbindAllRemoteTrackEvents(),this.unbindRtpTransceiver();const e=this.localTrackMap.get(hS.LocalAudioTrack);if((null==e?void 0:e.track)instanceof QA){if(e.track.trackList.length>0){const t=e.track;e.track.trackList.forEach((e=>{t.removeAudioTrack(e)}))}e.track.close()}this.localTrackMap.clear(),this.remoteUserMap.clear(),this.statsCollector.removeRemoteStats(),this.statsCollector.removeLocalStats(),this.iceFailedCount=0,this.dtlsFailedCount=0,this.pendingLocalTracks=[],this.pendingRemoteTracks=[],this.localDataChannels=[],this.remoteDataChannelMap.clear(),this.pendingLocalDataChannels=[],this.pendingRemoteDataChannels=[],this.state=fS.Disconnected}getStats(){var e;return null===(e=this.connection)||void 0===e?void 0:e.getStats()}getRemoteVideoIsReady(e){var t;return(null===(t=this.connection)||void 0===t?void 0:t.getRemoteVideoIsReady(e))||!1}getLocalAudioVolume(){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(e)return e.track.getVolumeLevel()}getLocalVideoSize(){const e=this.localTrackMap.get(hS.LocalVideoTrack);if(e)return{width:e.track._videoWidth||0,height:e.track._videoHeight||0}}getEncoderConfig(e){const t=this.localTrackMap.get(e);return t&&t.track instanceof vR||t&&t.track instanceof YA?t.track._encoderConfig:void 0}getLocalMedia(e){return this.localTrackMap.get(e)}hasLocalMedia(){return this.localTrackMap.size>0}hasRemoteMedia(e,t){if(!e)return this.remoteUserMap.size>0;const i=this.remoteUserMap.get(e);return!!i&&(!t||i.has(t))}async hasRemoteMediaWithLock(e,t){if(!e)return this.remoteUserMap.size>0;const i=this.remoteUserMap.get(e);return!!i&&(!t||i.has(t))}getRemoteMedia(e){var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t.uid===e));return i?{audioTrack:i.audioTrack,audioSSRC:i._audioSSRC,videoTrack:i.videoTrack,videoSSRC:i._videoSSRC}:{}}getAudioLevels(){let e=Array.from(this.remoteUserMap.entries()).map((e=>{let[t]=e;return{uid:t.uid,level:t.audioTrack?100*t.audioTrack._source.getAccurateVolumeLevel():0}}));const t=this.localTrackMap.get(hS.LocalAudioTrack);return t&&e.push({level:100*t.track._source.getAccurateVolumeLevel(),uid:this.store.uid}),e=ef(e).call(e,((e,t)=>e.level-t.level)),e}async disconnectForReconnect(){this.connection&&($C.debug("[".concat(this.store.clientId,"] P2PChannel.disconnectForReconnect closing P2PConnection")),this.state=fS.Reconnecting,xC("KEEP_LAST_FRAME")&&0!==this.remoteUserMap.size&&Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t]=e;var i;t._videoTrack&&t._videoTrack._player&&(null===(i=t._videoTrack._player.getVideoElement())||void 0===i||i.pause(),t._videoTrack._player.isKeepLastFrame=!0,t._videoTrack._originMediaStreamTrack.stop())})),this.connection.close(),this.unbindConnectionEvents(this.connection),this.connection=void 0,this.shouldForwardP2PCreation&&(this.connection=this.store.useDataChannel?new XM({},this.store):this.isPlanB?new AM({},this.store):new xM({},this.store),this.bindConnectionEvents(this.connection)),0!==this.localTrackMap.size&&(Array.from(this.localTrackMap.entries()).forEach((e=>{var t;let[i,{track:n}]=e;switch(i){case hS.LocalVideoTrack:Di(t=n._hints).call(t,NT.LOW_STREAM)?n.close():this.pendingLocalTracks.push(n);break;case hS.LocalAudioTrack:n instanceof QA?this.pendingLocalTracks=this.pendingLocalTracks.concat(n.trackList):this.pendingLocalTracks.push(n);case hS.LocalVideoLowTrack:}})),this.emit(pS.MediaReconnectStart,this.store.uid)),this.unbindLocalTrackEvents(),this.localTrackMap.clear(),0!==this.remoteUserMap.size&&Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t,i]=e;Array.from(fh(i).call(i)).forEach((e=>{this.setPendingRemoteMedia(t,e)})),this.emit(pS.MediaReconnectStart,t.uid)})),this.unbindAllRemoteTrackEvents(),this.remoteUserMap.clear(),0!==this.localDataChannels.length&&(this.localDataChannels.forEach((e=>{this.pendingLocalDataChannels.push(e)})),this.localDataChannels.length=0),0!==this.remoteDataChannelMap.size&&(Array.from(this.remoteDataChannelMap.entries()).forEach((e=>{let[t,i]=e;Array.from(fh(i).call(i)).forEach((e=>{this.setPendingRemoteDataChannel(t,e)}))})),this.remoteDataChannelMap.clear()),this.statsUploader.stopUploadUplinkStats(),this.statsUploader.stopUploadDownlinkStats(),this.statsUploader.stopUploadTransportStats(),$C.debug("[".concat(this.store.clientId,"] P2PChannel disconnected, waiting to reconnect.")))}hasPendingRemoteDataChannel(e,t){for(const i of this.pendingRemoteDataChannels){const{user:n,id:r}=i;if((e instanceof CL?e.uid:e)===n.uid&&r===t)return!0}return!1}setPendingRemoteDataChannel(e,t){this.hasPendingRemoteDataChannel(e,t)||this.pendingRemoteDataChannels.push({user:e,id:t})}hasPendingRemoteMedia(e,t){for(const i of this.pendingRemoteTracks){const{user:n,kind:r}=i;if((e instanceof CL?e.uid:e)===n.uid&&t===r)return!0}return!1}setPendingRemoteMedia(e,t){this.hasPendingRemoteMedia(e,t)||this.pendingRemoteTracks.push({user:e,kind:t})}restartICE(e){var t=this;return LL((function*(){if(!t.connection||t.state!==fS.Connected||t.connection instanceof XM)return;const i=yield ML(t.mutex.lock("From P2PChannel.restartICE"));let n;try{n=yield ML(t.connection.restartICE(e));const r=yield ML(n.next());if(r.done)return;const s=r.value,o=yield s;switch(t.reportPCDisconnectedOrFailed(e),e){case dS.TCP:t._pcStatsUploadType=uS.TCP_RESTART;break;case dS.RELAY:t._pcStatsUploadType=uS.RELAY_RESTART;break;default:t._pcStatsUploadType=uS.OLD_RESTART}t._isInRestartIce=!0,n.next(o)}catch(e){var r;null===(r=n)||void 0===r||r.throw(e)}finally{i()}}))()}getUplinkNetworkQuality(){if(!this.connection)return 0;const e=this.connection.getStats(),t=this.localTrackMap.get(hS.LocalVideoTrack),i=this.localTrackMap.get(hS.LocalAudioTrack),n=e.videoSend.find((e=>e.ssrc===(null==t?void 0:t.ssrcs[0].ssrcId))),r=e.audioSend.find((e=>e.ssrc===(null==i?void 0:i.ssrcs[0].ssrcId)));if(!n||!r)return 1;const s=y_(this,pS.NeedSignalRTT),o=n?n.rttMs:void 0,a=r?r.rttMs:void 0,c=o&&a?(o+a)/2:o||a,l=(c&&s?(c+s)/2:c||s)||0,d=100*e.sendPacketLossRate*.7/50+.3*l/1500,h=d<.17?1:d<.36?2:d<.59?3:d<.1?4:5,u=null==t?void 0:t.track;if(u&&u._encoderConfig&&-1===u._hints.indexOf(NT.SCREEN_TRACK)){const t=u._encoderConfig.bitrateMax,i=e.bitrate.actualEncoded;if(t&&i){const e=(1e3*t-i)/(1e3*t);return ow[e<.15?0:e<.3?1:e<.45?2:e<.6?3:4][h]}}return h}getDownlinkNetworkQuality(){if(!this.connection)return 0;const e=this.connection.getStats();let t=0;return Array.from(this.remoteUserMap.entries()).forEach((i=>{let[n]=i;const r=n._audioSSRC,s=n._videoSSRC,o=e.audioRecv.find((e=>e.ssrc===r)),a=e.videoRecv.find((e=>e.ssrc===s));if(!o&&!a)return void(t+=1);const c=y_(this,pS.NeedSignalRTT),l=e.rtt,d=(l&&c?(l+c)/2:l||c)||0,h=o?o.jitterMs:void 0,u=e.recvPacketLossRate;let p=.7*u*100/50+.3*d/1500;h&&(p=.6*u*100/50+.2*d/1500+.2*h/400),t+=p<.1?1:p<.17?2:p<.36?3:p<.59?4:5})),this.remoteUserMap.size>0?Math.round(t/this.remoteUserMap.size):t}async muteLocalTrack(e){return new nb(((t,i)=>{this.handleMuteLocalTrack(e,t,i)}))}filterTobePublishedTracks(e,t,i){const n=[],r=uA(),s=this.getAllTracks();e=A_(e=e.filter((e=>-1===s.indexOf(e))));let o=!1,a=!1;for(const s of e){if(s instanceof vR&&(this.localTrackMap.has(hS.LocalVideoTrack)||o?new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS).throw():(n.push({track:s,type:hS.LocalVideoTrack}),o=!0),t)){const e=this.getLowVideoTrack(s,i);n.push({track:e,type:hS.LocalVideoLowTrack})}if(s instanceof YA){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(e){if(!(e.track instanceof QA))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser does not support audio mixing");if(s._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio");e.track.addAudioTrack(s),this.bindLocalAudioTrackEvents(s,!0)}else if(a){const e=n.find((e=>{let{type:t}=e;return t===hS.LocalAudioTrack}));if(!(e.track instanceof QA))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser does not support audio mixing");if(s._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio");e.track.addAudioTrack(s)}else{if(!r.webAudioMediaStreamDest||s instanceof QA||s._bypassWebAudio)n.push({track:s,type:hS.LocalAudioTrack});else{const e=new QA;e.addAudioTrack(s),n.push({track:e,type:hS.LocalAudioTrack})}a=!0}}}return n}filterTobeUnpublishedTracks(e){const t=[],i=this.getAllTracks();e=A_(e=e.filter((e=>-1!==i.indexOf(e))));for(const i of e){if(i instanceof YA){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(!e)continue;e.track instanceof QA?(e.track.removeAudioTrack(i),this.unbindLocalAudioTrackEvents(i),0===e.track.trackList.length&&(t.push([hS.LocalAudioTrack,e]),e.track.close())):t.push([hS.LocalAudioTrack,e])}if(i instanceof vR){const e=this.localTrackMap.get(hS.LocalVideoTrack);if(!e)continue;t.push([hS.LocalVideoTrack,e]);const i=this.localTrackMap.get(hS.LocalVideoLowTrack);i&&t.push([hS.LocalVideoLowTrack,i])}}return t}filterTobePublishedDataChannels(e){return(e=A_(e)).filter((e=>-1===this.localDataChannels.findIndex((t=>t.id===e.id))))}filterTobeUnpublishedDataChannels(e){return(e=(e=A_(e)).filter((e=>-1!==this.localDataChannels.indexOf(e)))).filter((e=>e._originDataChannel))}bindLocalTrackEvents(e){e.forEach((e=>{let{track:t,type:i}=e;switch(i){case hS.LocalVideoTrack:t.addListener(kT.GET_STATS,this.handleGetLocalVideoStats),t.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),t.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),t.addListener(kT.NEED_UPDATE_VIDEO_ENCODER,this.handleUpdateVideoEncoder),t.addListener(kT.SET_OPTIMIZATION_MODE,this.handleSetOptimizationMode),t.addListener(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),t.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),t.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack);break;case hS.LocalAudioTrack:this.bindLocalAudioTrackEvents(t);case hS.LocalVideoLowTrack:}}))}bindLocalAudioTrackEvents(e,t){e instanceof QA?e.trackList.forEach((e=>{e.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.addListener(kT.GET_STATS,this.handleGetLocalAudioStats),e.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack)})):(e.addListener(kT.GET_STATS,this.handleGetLocalAudioStats),e.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack),t||e.addListener(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack))}unbindLocalTrackEvents(e){e||(e=Array.from(this.localTrackMap.entries()).map((e=>{let[t,{track:i}]=e;return{track:i,type:t}}))),e.forEach((e=>{let{track:t,type:i}=e;switch(i){case hS.LocalVideoTrack:t.off(kT.GET_STATS,this.handleGetLocalVideoStats),t.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),t.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),t.off(kT.NEED_UPDATE_VIDEO_ENCODER,this.handleUpdateVideoEncoder),t.off(kT.SET_OPTIMIZATION_MODE,this.handleSetOptimizationMode),t.off(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),t.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),t.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack);break;case hS.LocalAudioTrack:this.unbindLocalAudioTrackEvents(t);case hS.LocalVideoLowTrack:}}))}unbindLocalAudioTrackEvents(e){e instanceof QA?e.trackList.forEach((e=>{e.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.off(kT.GET_STATS,this.handleGetLocalAudioStats),e.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack)})):(e.off(kT.GET_STATS,this.handleGetLocalAudioStats),e.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.off(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),e.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack))}bindRemoteTrackEvents(e,t){t instanceof TR&&t.addListener(kT.GET_STATS,(t=>{t(this.handleGetRemoteVideoStats(e))})),t instanceof AR&&t.addListener(kT.GET_STATS,(t=>{t(this.handleGetRemoteAudioStats(e))}))}unbindRemoteTrackEvents(e){e&&e.removeAllListeners(kT.GET_STATS)}unbindAllRemoteTrackEvents(){Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t,i]=e;i.has(lS.AUDIO)&&this.unbindRemoteTrackEvents(t._audioTrack),i.has(lS.VIDEO)&&this.unbindRemoteTrackEvents(t._videoTrack)}))}createGatewayPublishMessage(e,t){return e.map(((e,i)=>{var n;let r,s,{track:o,type:a}=e;switch(a){case hS.LocalAudioTrack:r=Zw.Audio,s={dtx:o instanceof XA&&o._config.DTX,hq:!1,lq:!1,stereo:!1,speech:!1};break;case hS.LocalVideoTrack:r=Di(n=o._hints).call(n,NT.SCREEN_TRACK)?Zw.Screen:Zw.High,s=nx(nx({},lN(o)),{},{codec:this.store.codec});break;case hS.LocalVideoLowTrack:r=Zw.Low,s=nx(nx({},lN(o)),{},{codec:this.store.codec})}return{stream_type:r,attributes:s,ssrcs:t[i]}}))}createGatewayUnpublishMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}assignLocalTracks(e,t){e.forEach(((e,i)=>{let{track:n,type:r}=e;this.localTrackMap.set(r,{track:n,id:t[i].id,ssrcs:t[i].localSSRC})}))}withdrawLocalTracks(e){e.forEach((e=>{let[t]=e;this.localTrackMap.delete(t)}))}bindConnectionEvents(e){e.onConnectionStateChange=async t=>{if($C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onConnectionStateChange(").concat(t,")")),this.emit(pS.PeerConnectionStateChange,t),"connected"!==t||this.store.keyMetrics.peerConnectionEnd||this.store.peerConnectionEnd(),"connected"===t&&(this._restartTimer&&(clearTimeout(this._restartTimer),this._restartTimer=void 0),(this._isFirstConnected||this._isInRestartIce)&&this.reportPCStats(Date.now(),!0,this._pcStatsUploadType),this._isInRestartIce=!1,this._isFirstConnected=!1,this._isStartRestartIce=!1),xC("NEW_ICE_RESTART")){var i;if(Di(i=this._restartStates).call(i,t)){if(this._isStartRestartIce)return;this._isStartRestartIce=!0;const t=t=>{"disconnected"!==e.iceConnectionState&&"checking"!==e.iceConnectionState&&"failed"!==e.iceConnectionState||($C.debug("[".concat(this.store.clientId,"] [P2PChannel] start use restartICE, type is ").concat(t)),"CONNECTED"===y_(this,pS.QueryClientConnectionState)&&this.emit(pS.RequestRestartICE,t))},i=()=>{"disconnected"!==e.iceConnectionState&&"checking"!==e.iceConnectionState&&"failed"!==e.iceConnectionState||(this.reportPCStats(Date.now(),!1,this._pcStatsUploadType),$C.debug("[".concat(this.store.clientId,"] P2PConnection disconnected timeout, force reconnect")),setTimeout((()=>this.emit(pS.P2PLost)),0),this.iceFailedCount+=1,this.requestReconnect())},n=xC("ICE_RESTART_INTERVAL");return void(this._restartTimer=window.setTimeout((()=>{if(xC("JOIN_WITH_FALLBACK_MEDIA_PROXY_FORCE")&&uA().supportPCSetConfiguration)t(dS.RELAY),this._restartTimer=window.setTimeout(i,n);else if(Cb())t(dS.UDP),this._restartTimer=window.setTimeout(i,4e3);else{if(t(dS.TCP),uA().supportPCSetConfiguration)return void(this._restartTimer=window.setTimeout((()=>{t(dS.RELAY),this._restartTimer=window.setTimeout(i,n)}),n));this._restartTimer=window.setTimeout(i,n)}}),800))}}else{if("disconnected"===t&&"disconnected"===e.iceConnectionState)return setTimeout((()=>{"disconnected"===e.iceConnectionState&&xC("ICE_RESTART")&&"CONNECTED"===y_(this,pS.QueryClientConnectionState)&&this.emit(pS.RequestRestartICE)}),800),void setTimeout((()=>{"disconnected"===e.peerConnectionState&&($C.debug("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection disconnected timeout 4000ms, force reconnect")),this.reportPCStats(Date.now(),!1,this._pcStatsUploadType),this._isInRestartIce=!1,setTimeout((()=>this.emit(pS.P2PLost)),0),this.iceFailedCount+=1,this.requestReconnect())}),4e3);"failed"===t&&($C.debug("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection state failed, force reconnect")),this.reportPCDisconnectedOrFailed(),setTimeout((()=>this.emit(pS.P2PLost)),0),this.iceFailedCount+=1,await this.requestReconnect())}},e.onICEConnectionStateChange=e=>{"connected"!==e||this.store.keyMetrics.iceConnectionEnd||this.store.iceConnectionEnd(),$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onICEConnectionStateChange(").concat(e,")")),nw.reportApiInvoke(this.store.sessionId,{name:"ICEConnectionStateChange",options:e,tag:s_.TRACER}).onSuccess(),this.emit(pS.IceConnectionStateChange,e)},e.onICETransportStateChange=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onICETransportStateChange(").concat(e,")"))},e.onDTLSTransportStateChange=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onDTLSTransportStateChange(").concat(e,")"))},e.onDTLSTransportError=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onDTLSTransportError(").concat(e,")"))},e.onFirstAudioDecoded=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._audioSSRC===e));var n;i&&(this.store.subscribe(i.uid,"audio",void 0,void 0,void 0,Date.now()),null===(n=i.audioTrack)||void 0===n||n.emit(UT.FIRST_FRAME_DECODED),nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_AUDIO_DECODE,YC.FIRST_AUDIO_DECODE,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId}))},e.onFirstAudioReceived=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._audioSSRC===e));i&&nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_AUDIO_RECEIVED,YC.FIRST_AUDIO_RECEIVED,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId})},e.onFirstVideoDecoded=(e,t,i)=>{this.reportVideoFirstFrameDecoded(e,t,i)},e.onFirstVideoReceived=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._videoSSRC===e));i&&nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_VIDEO_RECEIVED,YC.FIRST_VIDEO_RECEIVED,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId})},e.onSelectedLocalCandidateChanged=(e,t)=>{const i="relay"===e.candidateType,n="relay"===t.candidateType;"unknown"!==t.candidateType&&i===n||this.emit(pS.ConnectionTypeChange,i),$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.SelectedLocalCandidateChanged(").concat(JSON.stringify(gN(t))," -> ").concat(JSON.stringify(gN(e)),")"))},e.onSelectedRemoteCandidateChanged=(e,t)=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.SelectedRemoteCandidateChanged(").concat(JSON.stringify(gN(t))," -> ").concat(JSON.stringify(gN(e)),")"))},e.onFirstVideoDecodedTimeout=e=>{this.reportVideoFirstFrameDecoded(e,void 0,void 0,!0)}}unbindConnectionEvents(e){e.onConnectionStateChange=void 0,e.onICEConnectionStateChange=void 0,e.onICETransportStateChange=void 0,e.onDTLSTransportStateChange=void 0,e.onDTLSTransportError=void 0,e.onFirstAudioDecoded=void 0,e.onFirstAudioReceived=void 0,e.onFirstVideoDecoded=void 0,e.onFirstVideoReceived=void 0,e.onSelectedLocalCandidateChanged=void 0,e.onSelectedRemoteCandidateChanged=void 0,e.onFirstVideoDecodedTimeout=void 0}filterTobeMutedTracks(e){const t=[];if(-1===this.getAllTracks().indexOf(e))return t;const i=this.localTrackMap.get(hS.LocalAudioTrack);if(e instanceof YA&&(null==i?void 0:i.track)instanceof QA)return i.track.isActive||t.push([hS.LocalAudioTrack,i]),t;const n=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(n&&(t.push(n),n[0]===hS.LocalVideoTrack)){const e=this.localTrackMap.get(hS.LocalVideoLowTrack);e&&t.push([hS.LocalVideoLowTrack,e])}return t}filterTobeUnmutedTracks(e){const t=[],i=this.localTrackMap.get(hS.LocalAudioTrack);if(e instanceof YA&&(null==i?void 0:i.track)instanceof QA)return i.track.isActive&&t.push([hS.LocalAudioTrack,i]),t;const n=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(n)if(n[0]===hS.LocalVideoTrack){t.push(n);const e=this.localTrackMap.get(hS.LocalVideoLowTrack);e&&t.push([hS.LocalVideoLowTrack,e])}else t.push(n);return t}createMuteMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}createUnmuteMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}filterTobeUnSubscribedTracks(e,t){const i=[],n=this.remoteUserMap.get(e);if(!n)return i;if(t){const r=n.get(t);if(!r)return i;i.push([e,{kind:t,id:r}])}else Array.from(n.entries()).forEach((t=>{let[n,r]=t;i.push([e,{kind:n,id:r}])}));return i}filterTobeUnSubscribedDataChannels(e,t){const i=[];return t.forEach((t=>{var n;null!==(n=this.remoteDataChannelMap.get(e))&&void 0!==n&&n.has(t.id)&&i.push(t)})),i}createUnsubscribeMessage(e){const t=[];return e.forEach((e=>{let[i,{kind:n,id:r}]=e;switch(n){case lS.VIDEO:return void(i._videoSSRC&&t.push({stream_type:lS.VIDEO,ssrcId:i._videoSSRC}));case lS.AUDIO:return void(i._audioSSRC&&t.push({stream_type:lS.AUDIO,ssrcId:i._audioSSRC}))}})),t}createUnsubscribeAllMessage(e){const t=new Map;return e.forEach((e=>{let[i,{kind:n}]=e;if(t.has(i)){let e=t.get(i);n===lS.VIDEO?e|=eS.Video:e|=eS.Audio,t.set(i,e)}else n===lS.VIDEO?t.set(i,eS.Video):t.set(i,eS.Audio)})),{users:Array.from(t.entries()).map((e=>{let[t,i]=e;return{stream_id:t.uid,stream_type:i}}))}}withdrawRemoteTracks(e){e.forEach((e=>{let[t,{kind:i}]=e;const n=this.remoteUserMap.get(t);n&&(n.delete(i),0===Array.from(n.entries()).length&&this.remoteUserMap.delete(t))}))}async updateBitrateLimit(e){const t=this.localTrackMap.get(hS.LocalVideoTrack),i=this.localTrackMap.get(hS.LocalVideoLowTrack);t&&await t.track.setBitrateLimit(e.uplink),i&&e.low_stream_uplink&&await i.track.setBitrateLimit({max_bitrate:e.low_stream_uplink.bitrate,min_bitrate:e.low_stream_uplink.bitrate||0})}isP2PDisconnected(){return!this.connection||"connected"!==this.connection.peerConnectionState}mapPubResToRemoteConfig(e,t){return e.map(((e,i)=>{var n;let{stream_type:r}=e;return null===(n=t.find((e=>{let{stream_type:t}=e;return r===t})))||void 0===n?void 0:n.attributes}))}async tryToUnmuteAudio(e){for(let i=0;i<e.length;i++)if(e[i]instanceof YA){var t;const n=this.filterTobeUnmutedTracks(e[i]);if(0===n.length)continue;await(null===(t=this.connection)||void 0===t?void 0:t.unmuteLocal(n.map((e=>{let[,{id:t}]=e;return t}))));const r=this.createUnmuteMessage(n);return void await __(this,pS.RequestUnmuteLocal,r)}}bindStatsUploaderEvents(){this.statsUploader.requestStats=()=>this.getStats(),this.statsUploader.requestLocalMedia=()=>Array.from(this.localTrackMap.entries()),this.statsUploader.requestRemoteMedia=()=>Array.from(this.remoteUserMap.entries()),this.statsUploader.requestVideoIsReady=e=>{var t;return!(null===(t=this.connection)||void 0===t||!t.getRemoteVideoIsReady(e))},this.statsUploader.requestUpload=(e,t)=>this.emit(pS.RequestUploadStats,e,t),this.statsUploader.requestAllTracks=()=>this.getAllTracks()}unbindStatsUploaderEvents(){this.statsUploader.requestStats=void 0,this.statsUploader.requestLocalMedia=void 0,this.statsUploader.requestRemoteMedia=void 0,this.statsUploader.requestVideoIsReady=void 0}async requestReconnect(){this.dtlsFailedCount+=1,await U_(X_(this.dtlsFailedCount,Y_)),this.emit(pS.RequestReconnect)}async reconnectP2P(){const e=Array.from(this.localTrackMap.entries()),t=this.createGatewayUnpublishMessage(e);Array.from(this.remoteUserMap.entries()),t.length>0&&await b_(this,pS.RequestUnpublishForReconnectPC,t),this.disconnectForReconnect(),this.emit(pS.RequestReconnectPC)}canPublishLowStream(){return this.localTrackMap.has(hS.LocalVideoTrack)||this.pendingLocalTracks.some((e=>e instanceof vR))}throwIfTrackTypeNotMatch(e){if(e.filter((e=>e instanceof vR)).length>1)throw new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS);if(e.filter((e=>e instanceof YA)).length>1&&(e.some((e=>e instanceof YA&&e._bypassWebAudio))||!uA().webAudioMediaStreamDest))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser doesn't support MediaStreamDestNode");for(const t of e){if(t instanceof vR&&this.pendingLocalTracks.some((e=>e instanceof vR)))throw new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS);if(t instanceof YA&&this.pendingLocalTracks.some((e=>e instanceof YA))&&(!uA().webAudioMediaStreamDest||t._bypassWebAudio||this.pendingLocalTracks.some((e=>e instanceof YA&&e._bypassWebAudio))))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser doesn't support MediaStreamDestNode")}}getLowVideoTrack(e,t){const i=!xC("DISABLE_DUAL_STREAM_USE_ENCODING")&&uA().supportDualStreamEncoding,n=nx(nx({},{width:160,height:120,framerate:15,bitrate:50}),t);let r;r=i?e._mediaStreamTrack.clone():PM(e,n);const s=B_(8,"track-low-"),o=new vR(r,nx(nx({},i&&{scaleResolutionDownBy:pN(n,e)}),{},{frameRate:n.framerate,bitrateMax:n.bitrate,bitrateMin:n.bitrate}),void 0,void 0,s);return o.on(DT.TRANSCEIVER_UPDATED,(t=>{e._updateRtpTransceiver(t,LT.LOW_STREAM)})),o._hints.push(NT.LOW_STREAM),e.addListener(kT.NEED_CLOSE,(()=>{o.close()})),o}async globalLock(){return this.mutex.lock("From P2PChannel.globalLock")}async reportPCStats(e,t,i){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;if(this.connection&&this.connection instanceof xM){var r,s,o,a;const c=this.store.keyMetrics.descriptionStart||0,{iceConnectionState:l,dtlsTransportState:d,peerConnectionState:h}=this.connection,{local:u,remote:p}=await this.connection.getSelectedCandidatePair();nw.pcStats(this.store.sessionId,{startTime:c,eventElapse:e-c||0,iceconnectionsate:l,dtlsstate:d,connectionstate:h,intSucc:t?1:2,error:n,selectedLocalCandidateProtocol:null!==(r=null==u?void 0:u.protocol)&&void 0!==r?r:"",selectedLocalCandidateType:null!==(s=u.candidateType)&&void 0!==s?s:"",selectedLocalCandidateAddress:"".concat(u.address,":").concat(u.port),selectedRemoteCandidateProtocol:null!==(o=p.protocol)&&void 0!==o?o:"",selectedRemoteCandidateType:null!==(a=p.candidateType)&&void 0!==a?a:"",selectedRemoteCandidateAddress:"".concat(p.address,":").concat(p.port),restartCnt:i})}}reportVideoFirstFrameDecoded(e,t,i,n){var r;const s=Array.from(fh(r=this.remoteUserMap).call(r)).find((t=>t._videoSSRC===e));if(s){n||this.store.subscribe(s.uid,"video",void 0,void 0,void 0,void 0,Date.now());const r=this.store.keyMetrics,o=r.subscribe.find((e=>e.userId===s.uid&&"video"===e.type));nw.firstRemoteVideoDecode(this.store.sessionId,qC.FIRST_VIDEO_DECODE,YC.FIRST_VIDEO_DECODE,{peer:s._uintid,videowidth:t,videoheight:i,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId,apEnd:r.requestAPEnd||0,apStart:r.requestAPStart||0,joinGwEnd:r.joinGatewayEnd||0,joinGwStart:r.joinGatewayStart||0,pcEnd:r.peerConnectionEnd||0,pcStart:r.peerConnectionStart||0,subscriberEnd:(null==o?void 0:o.subscribeEnd)||0,subscriberStart:(null==o?void 0:o.subscribeStart)||0,videoAddNotify:(null==o?void 0:o.streamAdded)||0,state:n?1:0})}}async remoteMediaSsrcChanged(e,t,i){if(!this.connection)return!1;const n=this.remoteUserMap.get(e);if(!n)return!1;const r=n.get(t);if(!r)return!1;const s=await this.connection.getRemoteSSRC(r);return void 0!==s&&s!==i}resetConnection(e){$C.debug("[".concat(this.store.clientId,"] [P2PChannel] reset connection to ").concat(e)),this.state===fS.Connected?($C.debug("[".concat(this.store.clientId,"] [P2PChannel] fallback to websocket but P2PChannel state still connected, disconnect first")),this.disconnectForReconnect()):(this.connection&&(this.connection.close(),this.unbindConnectionEvents(this.connection),this.connection=void 0),this.shouldForwardP2PCreation&&(this.connection=e===tS.datachannel?new XM({},this.store):this.isPlanB?new AM({},this.store):new xM({},this.store),this.bindConnectionEvents(this.connection)))}unbindRtpTransceiver(){0!==this.localTrackMap.size&&Array.from(this.localTrackMap.entries()).forEach((e=>{let[t,{track:i}]=e;t===hS.LocalVideoLowTrack?i._updateRtpTransceiver(void 0,LT.LOW_STREAM):i._updateRtpTransceiver(void 0)}))}reportPCDisconnectedOrFailed(e){this.connection&&this.connection instanceof xM&&("disconnected"!==this.connection.iceConnectionState&&"checking"!==this.connection.iceConnectionState&&"failed"!==this.connection.iceConnectionState||(this._isFirstConnected?(this.reportPCStats(Date.now(),!1,this._pcStatsUploadType),this._isFirstConnected=!1):this._pcStatsUploadType===uS.TCP_RESTART&&e===dS.RELAY?this.reportPCStats(Date.now(),!1,this._pcStatsUploadType):this.reportPCStats(Date.now(),!1,uS.DISCONNECTED_OR_FAILED)))}}function ax(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("From P2PChannel.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}function sx(e){let t=bx();return function(e,t){let i=e.appId;void 0!==i&&(Lx(t,10),Tx(t,i));let n=e.cid;void 0!==n&&(Lx(t,16),Lx(t,n));let r=e.cname;void 0!==r&&(Lx(t,26),Tx(t,r));let s=e.deviceId;void 0!==s&&(Lx(t,34),Tx(t,s));let o=e.elapse;void 0!==o&&(Lx(t,40),Mx(t,o));let a=e.fileSize;void 0!==a&&(Lx(t,48),Mx(t,mx(a)));let c=e.height;void 0!==c&&(Lx(t,56),Mx(t,mx(c)));let l=e.jpg;void 0!==l&&(Lx(t,66),Lx(t,l.length),function(e,t){let i=Cx(e,t.length);e.bytes.set(t,i)}(t,l));let d=e.networkType;void 0!==d&&(Lx(t,72),Mx(t,mx(d)));let h=e.osType;void 0!==h&&(Lx(t,80),Mx(t,mx(h)));let u=e.requestId;void 0!==u&&(Lx(t,90),Tx(t,u));let p=e.sdkVersion;void 0!==p&&(Lx(t,98),Tx(t,p));let f=e.sequence;void 0!==f&&(Lx(t,104),Mx(t,mx(f)));let m=e.sid;void 0!==m&&(Lx(t,114),Tx(t,m));let v=e.timestamp;void 0!==v&&(Lx(t,120),Mx(t,v));let _=e.uid;void 0!==_&&(Lx(t,128),Lx(t,_));let g=e.vid;void 0!==g&&(Lx(t,136),Lx(t,g));let y=e.width;void 0!==y&&(Lx(t,144),Mx(t,mx(y)));let E=e.service;void 0!==E&&(Lx(t,152),Lx(t,E));let C=e.callbackData;void 0!==C&&(Lx(t,162),Tx(t,C));let w=e.jpgEncryption;void 0!==w&&(Lx(t,168),Lx(t,w));let S=e.requestType;void 0!==S&&(Lx(t,176),Lx(t,S));let T=e.scorePorn;void 0!==T&&(Lx(t,185),kx(t,T));let A=e.scoreSexy;void 0!==A&&(Lx(t,193),kx(t,A));let R=e.scoreNeutral;void 0!==R&&(Lx(t,201),kx(t,R));let b=e.scene;void 0!==b&&(Lx(t,208),Lx(t,b));let O=e.ossFilePrefix;void 0!==O&&(Lx(t,218),Tx(t,O));let I=e.serviceVendor;if(void 0!==I)for(let e of I){Lx(t,226);let i=bx();dx(e,i),Lx(t,i.limit),Ax(t,i),_x(i)}}(e,t),function(e){let t=e.bytes,i=e.limit;return t.length===i?t:t.subarray(0,i)}(t)}function cx(e){return function(e){let t={};e:for(;!Ex(e);){let i=Nx(e);switch(i>>>3){case 0:break e;case 1:t.code=Nx(e);break;case 2:t.msg=Sx(e,Nx(e));break;case 3:{let i=ux(e);t.data=lx(e),e.limit=i;break}default:hx(e,7&i)}}return t}({bytes:t=e,offset:0,limit:t.length});var t}function lx(e){let t={};e:for(;!Ex(e);){let i=Nx(e);switch(i>>>3){case 0:break e;case 1:t.requestId=Sx(e,Nx(e));break;case 2:t.requestType=Nx(e)>>>0;break;case 3:t.scorePorn=Ix(e);break;case 4:t.scoreSexy=Ix(e);break;case 5:t.scoreNeutral=Ix(e);break;case 6:t.requestScene=Nx(e)>>>0;break;case 7:t.scene=Nx(e)>>>0;break;default:hx(e,7&i)}}return t}function dx(e,t){let i=e.service;void 0!==i&&(Lx(t,8),Lx(t,i));let n=e.vendor;void 0!==n&&(Lx(t,16),Lx(t,n));let r=e.token;void 0!==r&&(Lx(t,26),Tx(t,r));let s=e.callbackUrl;void 0!==s&&(Lx(t,34),Tx(t,s))}function ux(e){let t=Nx(e),i=e.limit;return e.limit=e.offset+t,i}function hx(e,t){switch(t){case 0:for(;128&Rx(e););break;case 2:yx(e,Nx(e));break;case 5:yx(e,4);break;case 1:yx(e,8);break;default:throw new Error("Unimplemented type: "+t)}}Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Object,Boolean]),xw("design:returntype",nb)],ox.prototype,"startP2PConnection",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],ox.prototype,"connect",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Object,Object,Array,Object,String,String]),xw("design:returntype",nb)],ox.prototype,"preConnect",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],ox.prototype,"publishDataChannel",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],ox.prototype,"unpublish",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],ox.prototype,"unpublishDataChannel",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],ox.prototype,"unpublishLowStream",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,Array]),xw("design:returntype",nb)],ox.prototype,"subscribeDataChannel",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String,Number,Number,Array]),xw("design:returntype",nb)],ox.prototype,"subscribe",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],ox.prototype,"massSubscribe",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String,Boolean]),xw("design:returntype",nb)],ox.prototype,"unsubscribe",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,Array]),xw("design:returntype",nb)],ox.prototype,"unsubscribeDataChannel",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],ox.prototype,"massUnsubscribe",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],ox.prototype,"muteRemote",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],ox.prototype,"unmuteRemote",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],ox.prototype,"hasRemoteMediaWithLock",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],ox.prototype,"disconnectForReconnect",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],ox.prototype,"updateBitrateLimit",null),Mw([ax,xw("design:type",Function),xw("design:paramtypes",[CL,String,Number]),xw("design:returntype",nb)],ox.prototype,"remoteMediaSsrcChanged",null);let fx=new Float32Array(1);new Uint8Array(fx.buffer);let px=new Float64Array(1),gx=new Uint8Array(px.buffer);function mx(e){return{low:e|=0,high:e>>31,unsigned:e>=0}}let vx=[];function bx(){const e=vx.pop();return e?(e.offset=e.limit=0,e):{bytes:new Uint8Array(64),offset:0,limit:0}}function _x(e){vx.push(e)}function yx(e,t){if(e.offset+t>e.limit)throw new Error("Skip past limit");e.offset+=t}function Ex(e){return e.offset>=e.limit}function Cx(e,t){let i=e.bytes,n=e.offset,r=e.limit,s=n+t;if(s>i.length){let t=new Uint8Array(2*s);t.set(i),e.bytes=t}return e.offset=s,s>r&&(e.limit=s),n}function wx(e,t){let i=e.offset;if(i+t>e.limit)throw new Error("Read past limit");return e.offset+=t,i}function Sx(e,t){let i=wx(e,t),n=String.fromCharCode,r=e.bytes,s="�",o="";for(let e=0;e<t;e++){let a,c,l,d,h=r[e+i];0==(128&h)?o+=n(h):192==(224&h)?e+1>=t?o+=s:(a=r[e+i+1],128!=(192&a)?o+=s:(d=(31&h)<<6|63&a,d<128?o+=s:(o+=n(d),e++))):224==(240&h)?e+2>=t?o+=s:(a=r[e+i+1],c=r[e+i+2],32896!=(49344&(a|c<<8))?o+=s:(d=(15&h)<<12|(63&a)<<6|63&c,d<2048||d>=55296&&d<=57343?o+=s:(o+=n(d),e+=2))):240==(248&h)?e+3>=t?o+=s:(a=r[e+i+1],c=r[e+i+2],l=r[e+i+3],8421504!=(12632256&(a|c<<8|l<<16))?o+=s:(d=(7&h)<<18|(63&a)<<12|(63&c)<<6|63&l,d<65536||d>1114111?o+=s:(d-=65536,o+=n(55296+(d>>10),56320+(1023&d)),e+=3))):o+=s}return o}function Tx(e,t){let i=t.length,n=0;for(let e=0;e<i;e++){let r=t.charCodeAt(e);r>=55296&&r<=56319&&e+1<i&&(r=(r<<10)+t.charCodeAt(++e)-56613888),n+=r<128?1:r<2048?2:r<65536?3:4}Lx(e,n);let r=Cx(e,n),s=e.bytes;for(let e=0;e<i;e++){let n=t.charCodeAt(e);n>=55296&&n<=56319&&e+1<i&&(n=(n<<10)+t.charCodeAt(++e)-56613888),n<128?s[r++]=n:(n<2048?s[r++]=n>>6&31|192:(n<65536?s[r++]=n>>12&15|224:(s[r++]=n>>18&7|240,s[r++]=n>>12&63|128),s[r++]=n>>6&63|128),s[r++]=63&n|128)}}function Ax(e,t){let i=Cx(e,t.limit),n=e.bytes,r=t.bytes;for(let e=0,s=t.limit;e<s;e++)n[e+i]=r[e]}function Rx(e){return e.bytes[wx(e,1)]}function Ox(e,t){let i=Cx(e,1);e.bytes[i]=t}function Ix(e){let t=wx(e,8),i=e.bytes;return gx[0]=i[t++],gx[1]=i[t++],gx[2]=i[t++],gx[3]=i[t++],gx[4]=i[t++],gx[5]=i[t++],gx[6]=i[t++],gx[7]=i[t++],px[0]}function kx(e,t){let i=Cx(e,8),n=e.bytes;px[0]=t,n[i++]=gx[0],n[i++]=gx[1],n[i++]=gx[2],n[i++]=gx[3],n[i++]=gx[4],n[i++]=gx[5],n[i++]=gx[6],n[i++]=gx[7]}function Nx(e){let t,i=0,n=0;do{t=Rx(e),i<32&&(n|=(127&t)<<i),i+=7}while(128&t);return n}function Lx(e,t){for(t>>>=0;t>=128;)Ox(e,127&t|128),t>>>=7;Ox(e,t)}function Mx(e,t){let i=t.low>>>0,n=(t.low>>>28|t.high<<4)>>>0,r=t.high>>>24,s=0===r?0===n?i<16384?i<128?1:2:i<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:r<128?9:10,o=Cx(e,s),a=e.bytes;switch(s){case 10:a[o+9]=r>>>7&1;case 9:a[o+8]=9!==s?128|r:127&r;case 8:a[o+7]=8!==s?n>>>21|128:n>>>21&127;case 7:a[o+6]=7!==s?n>>>14|128:n>>>14&127;case 6:a[o+5]=6!==s?n>>>7|128:n>>>7&127;case 5:a[o+4]=5!==s?128|n:127&n;case 4:a[o+3]=4!==s?i>>>21|128:i>>>21&127;case 3:a[o+2]=3!==s?i>>>14|128:i>>>14&127;case 2:a[o+1]=2!==s?i>>>7|128:i>>>7&127;case 1:a[o]=1!==s?128|i:127&i}}function xx(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}const Dx=new Map([["moderation",1],["supervise",2]]);class Px extends r_{get connectionState(){return this._connectionState}set connectionState(e){if(this._connectionState===e)return;const t=this._connectionState;this._connectionState=e,this.emit(bS.CONNECTION_STATE_CHANGE,t,e)}get inspectType(){return this._inspectType}set inspectType(e){var t;this._inspectMode=ly(t=e.map((e=>Dx.get(e)||0))).call(t,((e,t)=>e+t)),this._inspectType=e}get quality(){return this._quality}set quality(e){this._quality=e>1?1:e<.1?.1:e,this.qualityTimer&&(window.clearTimeout(this.qualityTimer),this.qualityTimer=null),this._quality>=1||(this.qualityTimer=window.setTimeout((()=>{this.quality=this._quality/this.qualityRatio}),6e4))}constructor(e){super(),oh(this,"name","AgoraRTCVideoContentInspect"),oh(this,"_connectionState",mS.CONNECTING),oh(this,"_innerConnectionState",void 0),oh(this,"sequence",0),oh(this,"inspectStartTime",void 0),oh(this,"workerManagerConnection",void 0),oh(this,"workerConnection",void 0),oh(this,"workerMessageLengthLimit",void 0),oh(this,"inspectIntervalMinimum",void 0),oh(this,"qualityRatio",void 0),oh(this,"_connectInfo",void 0),oh(this,"_cancelTokenSource",gC.CancelToken.source()),oh(this,"_retryConfig",void 0),oh(this,"wmSequence",0),oh(this,"inspectInterval",void 0),oh(this,"inspectTimer",null),oh(this,"ossFilePrefix",void 0),oh(this,"extraInfo",void 0),oh(this,"_inspectType",void 0),oh(this,"_inspectMode",void 0),oh(this,"_quality",1),oh(this,"qualityTimer",null),oh(this,"_inspectId",void 0),oh(this,"_needWorkUrlOnly",!1),oh(this,"inspectImage",(()=>{if(this.connectionState!==mS.CONNECTED)throw new Dw(Bb.OPERATION_ABORTED,"content inspect service connection status is ".concat(this.connectionState));this.inspectTimer&&(window.clearInterval(this.inspectTimer),this.inspectTimer=null),this.inspectTimer=window.setInterval((()=>{this.connectionState===mS.CONNECTED?this.requestToInspectImage():$C.debug("[".concat(this._inspectId,"] Inspect State is not connected , "),this.connectionState)}),this.inspectInterval<this.inspectIntervalMinimum?this.inspectIntervalMinimum:this.inspectInterval),this.requestToInspectImage()})),this._inspectId=B_(5,"inspect-"),this.workerMessageLengthLimit=xC("VIDEO_INSPECT_WORKER_MESSAGE_LENGTH_LIMIT"),this.inspectIntervalMinimum=xC("VIDEO_INSPECT_INTERVAL_MINIMUM"),this.qualityRatio=xC("VIDEO_INSPECT_QUALITY_RATIO"),this.inspectInterval=e.interval,this.ossFilePrefix=e.ossFilePrefix,this.extraInfo=e.extraInfo,this.inspectType=e.inspectType,this.inspectStartTime=Number(Date.now()),this.workerManagerConnection=new qS("worker-manager-"+this._inspectId,Y_),this.on(bS.STATE_CHANGE,((e,t)=>{this._innerConnectionState=e,$C.debug("[".concat(this._inspectId,"] Inspect operation :").concat(vS[e]," ").concat(t||""))})),this.handleWorkerManagerEvents(),this.workerConnection=new qS("worker-"+this._inspectId,Y_),this.handleWorkerEvents()}async init(e,t){this.emit(bS.STATE_CHANGE,vS.CONNECT_AP),this._connectInfo=e;const i=this._cancelTokenSource.token;return this._retryConfig=t,new nb(((n,r)=>{this.on(bS.CONNECTION_STATE_CHANGE,((e,t)=>{t===mS.CONNECTED&&n()})),this.requestAP(e,i,t).then((e=>{this.connectWorkerManager(e)})).catch((e=>{r(e)}))}))}async requestAP(e,t,i){const n=xC("WEBCS_DOMAIN").map((e=>"https://".concat(e,"/api/v1"))),r=await function(e,t,i,n){let{appId:r,areaCode:s,cname:o,sid:a,token:c,uid:l}=t;QN++;const d="image_moderation_api",h={service_name:d,json_body:JSON.stringify({appId:r,areaCode:s,cname:o,command:"allocateEdge",requestId:QN,seq:QN,sid:a,token:c,ts:Date.now(),uid:l+""})};let u,p,f=e[0];return Z_((async()=>{u=Date.now();const e=await kN(f,{data:h,cancelToken:i,headers:{"X-Packet-Service-Type":"0","X-Packet-URI":"61"},params:{action:"wrtc_gateway"}});if(p=Date.now()-u,0!==e.code){const t=new Dw(Bb.UNEXPECTED_RESPONSE,"image inspect ap error, code"+e.code,{retry:!0,responseTime:p});throw $C.error(t.toString()),t}const t=JSON.parse(e.json_body);if(200!==t.code){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"image inspect ap error, code: ".concat(t.code,", reason: ").concat(t.reason),{code:t.code,responseTime:p});throw $C.error(e.toString()),e}if(!t.servers||!Array.isArray(t.servers)||0===t.servers.length){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"image inspect ap empty server",{code:t.code,responseTime:p});throw $C.error(e.toString()),e}const n=xC("VIDEO_INSPECT_WORKER_MANAGER_HOST"),r=xC("VIDEO_INSPECT_WORKER_MANAGER_PORT");return{addressList:t.servers.map((e=>{let{address:t,wss:i}=e;if(t&&i)return"wss://".concat(t.replace(/\./g,"-"),".").concat(n,":").concat(r||i)})).filter((e=>!!e)),workerToken:t.workerToken,vid:t.vid,responseTime:p}}),((t,i)=>(nw.apworkerEvent(a,{success:!0,sc:200,serviceName:d,responseDetail:JSON.stringify(t.addressList),firstSuccess:0===i,responseTime:p,serverIp:e[i%e.length]}),!1)),((t,i)=>(nw.apworkerEvent(a,{success:!1,sc:t.data&&t.data.code||200,serviceName:d,responseTime:p,serverIp:e[i%e.length]}),!!(t.code!==Bb.OPERATION_ABORTED&&t.code!==Bb.UNEXPECTED_RESPONSE||t.data&&t.data.retry)&&(f=e[(i+1)%e.length],!0))),n)}(n,e,t,i);this.emit(bS.STATE_CHANGE,vS.AP_CONNECTED);const{addressList:s}=r;return this.wmSequence++,s}async connectWorkerManager(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this._needWorkUrlOnly=t,this.emit(bS.STATE_CHANGE,vS.CONNECT_WORKER_MANAGER),await this.workerManagerConnection.init(e,1e4)}async connectWorker(e){await this.workerConnection.init([e])}handleWorkerManagerEvents(){this.workerManagerConnection.on(Cw.CONNECTED,(async()=>{this.emit(bS.STATE_CHANGE,vS.WORKER_MANAGER_CONNECTED,this.workerManagerConnection.url),this.workerManagerConnection.sendMessage({appId:this._connectInfo.appId,cname:this._connectInfo.cname,uid:this._connectInfo.uid+"",sdkVersion:"4.19.1",sid:this._connectInfo.sid,seq:this.wmSequence,ts:Number(Date.now()),requestId:Math.floor(1e12*Math.random()),allocate:!0,clientRequest:{command:"join"}},!0)})),this.workerManagerConnection.on(Cw.CLOSED,(()=>{this._innerConnectionState<vS.GET_WORKER_MANAGER_RESPONSE&&$C.debug("[".concat(this._inspectId,"] Inspect worker manager is closed before connecting worker"))})),this.workerManagerConnection.on(Cw.FAILED,(()=>{this._innerConnectionState<vS.GET_WORKER_MANAGER_RESPONSE&&$C.debug("[".concat(this._inspectId,"] Connecting inspect worker manager is failed before connecting worker"))})),this.workerManagerConnection.on(Cw.RECONNECTING,(()=>{this._innerConnectionState<vS.GET_WORKER_MANAGER_RESPONSE&&$C.debug("[".concat(this._inspectId,"] Inspect worker manager is reconnecting before connecting worker"))})),this.workerManagerConnection.on(Cw.ON_MESSAGE,(async e=>{this.emit(bS.STATE_CHANGE,vS.GET_WORKER_MANAGER_RESPONSE);const t=this.workerManagerConnection.url;this.workerManagerConnection.close();const i=JSON.parse(e.data);if(200!==i.code)throw $C.error("[".concat(this._inspectId,"] Unexpected code ").concat(i.code," from worker manager")),new Dw(Bb.UNEXPECTED_RESPONSE,"response code of worker is unexpected",i);if(!(i.serverResponse&&i.serverResponse.portWss&&t))throw $C.error("[".concat(this._inspectId,"] Unexpected content from worker manager : ").concat(JSON.stringify(i))),new Dw(Bb.UNEXPECTED_RESPONSE,"response content of worker is unexpected",i);{const e=xC("VIDEO_INSPECT_WORKER_PORT")||i.serverResponse.portWss,n=t.replace(/:\d+\/?$/,":".concat(e));this.emit(bS.STATE_CHANGE,vS.CONNECT_WORKER,n),this._needWorkUrlOnly?this.emit(bS.REQUEST_NEW_WORKER_URL,n):await this.connectWorker(n)}})),this.workerManagerConnection.on(Cw.WILL_RECONNECT,((e,t,i)=>{i(e)})),this.workerManagerConnection.on(Cw.REQUEST_NEW_URLS,((e,t)=>{this.requestAP(this._connectInfo,this._cancelTokenSource.token,this._retryConfig).then(e).catch(t)}))}handleWorkerEvents(){this.workerConnection.on(Cw.CONNECTED,(async()=>{this.emit(bS.STATE_CHANGE,vS.WORKER_CONNECTED,this.workerConnection.url),this.connectionState=mS.CONNECTED})),this.workerConnection.on(Cw.ON_MESSAGE,(async e=>{if(e.data instanceof ArrayBuffer){const i=cx(new Uint8Array(e.data));if(xC("SHOW_VIDEO_INSPECT_WORKER_MESSAGE")&&$C.debug("[".concat(this._inspectId,"] Response message for worker of inspect content "),JSON.stringify(i)),200===i.code){if(Array.isArray(this.inspectType)&&1===this.inspectType.length&&"supervise"===this.inspectType[0])return void this.emit(bS.INSPECT_RESULT,void 0,void 0);if(i.data&&i.data.scorePorn&&i.data.scoreSexy&&i.data.scoreNeutral){var t;const e={porn:i.data.scorePorn,sexy:i.data.scoreSexy,neutral:i.data.scoreNeutral},n=ly(t=Object.keys(e)).call(t,((t,i)=>e[t]>e[i]?t:i),"porn"),r=Object.keys(e).find((e=>e===n));this.emit(bS.INSPECT_RESULT,r)}else this.emit(bS.INSPECT_RESULT,void 0,new Dw(Bb.UNEXPECTED_RESPONSE,i.code+"","There is an unexpected data on message"))}else this.emit(bS.INSPECT_RESULT,void 0,new Dw(Bb.UNEXPECTED_RESPONSE,i.code+"",i.msg))}else $C.error("[".concat(this._inspectId,"] Unexpected message type from worker")),this.emit(bS.INSPECT_RESULT,void 0,new Dw(Bb.UNEXPECTED_RESPONSE,"invalid worker message type"))})),this.workerConnection.on(Cw.CLOSED,(()=>{this.connectionState=mS.CLOSED})),this.workerConnection.on(Cw.FAILED,(()=>{this.connectionState=mS.CLOSED})),this.workerConnection.on(Cw.RECONNECTING,(()=>{this.connectionState=this.connectionState===mS.CONNECTED?mS.RECONNECTING:mS.CONNECTING})),this.workerConnection.on(Cw.WILL_RECONNECT,((e,t,i)=>{"recover"===e&&i(e),i("tryNext")})),this.workerConnection.on(Cw.REQUEST_NEW_URLS,((e,t)=>{this.workerManagerConnection.close(),this.once(bS.REQUEST_NEW_WORKER_URL,(t=>{e([t])})),this.requestAP(this._connectInfo,this._cancelTokenSource.token,this._retryConfig).then((e=>{this.connectWorkerManager(e,!0)})).catch((e=>{t(e)}))}))}static intToLong(e){return{low:e|=0,high:e>>31,unsigned:e>=0}}async requestToInspectImage(){this.sequence++;const e=y_(this,bS.CLIENT_LOCAL_VIDEO_TRACK),t={appId:this._connectInfo.appId,cname:this._connectInfo.cname,cid:this._connectInfo.cid,sid:this._connectInfo.sid,uid:this._connectInfo.uid,vid:this._connectInfo.vid};if(e){if(!e.isPlaying)return void this.emit(bS.INSPECT_RESULT,void 0,new Dw(Bb.INVALID_OPERATION,"Only the track being played can be inspected"));const i=await this.generateRequestData(e,t);this.workerConnection.sendMessage(i,!0,!0)}else this.emit(bS.INSPECT_RESULT,void 0,new Dw(Bb.INVALID_OPERATION,"Only the track being published can be inspected"))}async generateRequestData(e,t){let{appId:i,cname:n,cid:r,vid:s,sid:o,uid:a}=t;const c=Date.now(),l=await e.getCurrentFrameImage("image/jpeg",this.quality),d=await pR(l,i,n),h=this.sequence+"-"+r+"-"+a+"-"+c+"-"+B_(12,""),u={appId:i,cid:r,cname:n,deviceId:"",elapse:Px.intToLong(Number(c-this.inspectStartTime)),fileSize:d.byteLength,jpgEncryption:2,height:l.height,width:l.width,jpg:d,networkType:6,osType:7,requestId:h,sdkVersion:"4.19.1",sequence:this.sequence,sid:o,timestamp:Px.intToLong(c),uid:a,vid:s,service:this._inspectMode,callbackData:this.extraInfo,ossFilePrefix:this.ossFilePrefix};void 0===this.extraInfo&&delete u.callbackData,void 0===this.ossFilePrefix&&delete u.ossFilePrefix;const p=sx(u);if(p.byteLength<this.workerMessageLengthLimit){if(xC("SHOW_VIDEO_INSPECT_WORKER_MESSAGE")){const e=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xx(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xx(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},u);delete e.jpg,$C.debug("[".concat(this._inspectId,"] Request message for worker of inspect content "),JSON.stringify(e))}return p}{const t=this.quality*this.qualityRatio;return this.quality=t,await this.generateRequestData(e,{appId:i,cname:n,cid:r,vid:s,sid:o,uid:a})}}close(){this._cancelTokenSource.cancel(),this._cancelTokenSource=gC.CancelToken.source(),this.workerManagerConnection&&this.workerManagerConnection.close(),this.workerConnection&&this.workerConnection.close(),this.inspectTimer&&window.clearInterval(this.inspectTimer),this.inspectTimer=null,this.connectionState=mS.CLOSED,this.emit(bS.STATE_CHANGE,vS.CLOSED)}}function Ux(e){let t=function(){const e=jx.pop();return e?(e.offset=e.limit=0,e):{bytes:new Uint8Array(64),offset:0,limit:0}}();return function(e,t){let i=e.appId;void 0!==i&&(Qx(t,10),qx(t,i));let n=e.cid;void 0!==n&&(Qx(t,16),Qx(t,n));let r=e.cname;void 0!==r&&(Qx(t,26),qx(t,r));let s=e.deviceId;void 0!==s&&(Qx(t,34),qx(t,s));let o=e.elapse;void 0!==o&&(Qx(t,40),eD(t,o));let a=e.fileSize;void 0!==a&&(Qx(t,48),eD(t,Vx(a)));let c=e.height;void 0!==c&&(Qx(t,56),eD(t,Vx(c)));let l=e.jpg;void 0!==l&&(Qx(t,66),Qx(t,l.length),Kx(t,l));let d=e.networkType;void 0!==d&&(Qx(t,72),eD(t,Vx(d)));let h=e.osType;void 0!==h&&(Qx(t,80),eD(t,Vx(h)));let u=e.requestId;void 0!==u&&(Qx(t,90),qx(t,u));let p=e.sdkVersion;void 0!==p&&(Qx(t,98),qx(t,p));let f=e.sequence;void 0!==f&&(Qx(t,104),eD(t,Vx(f)));let m=e.sid;void 0!==m&&(Qx(t,114),qx(t,m));let v=e.timestamp;void 0!==v&&(Qx(t,120),eD(t,v));let _=e.uid;void 0!==_&&(Qx(t,128),Qx(t,_));let g=e.vid;void 0!==g&&(Qx(t,136),Qx(t,g));let y=e.width;void 0!==y&&(Qx(t,144),eD(t,Vx(y)));let E=e.service;void 0!==E&&(Qx(t,152),Qx(t,E));let C=e.callbackData;void 0!==C&&(Qx(t,162),Qx(t,C.length),Kx(t,C));let w=e.ticket;void 0!==w&&(Qx(t,170),qx(t,w))}(e,t),function(e){let t=e.bytes,i=e.limit;return t.length===i?t:t.subarray(0,i)}(t)}function Bx(e){return function(e){let t={};e:for(;!$x(e);){let i=Zx(e);switch(i>>>3){case 0:break e;case 1:t.code=Zx(e);break;case 2:t.msg=Gx(e,Zx(e));break;case 3:t.requestId=Gx(e,Zx(e));break;case 4:t.timestamp=Jx(e,!1);break;default:Fx(e,7&i)}}return t}({bytes:t=e,offset:0,limit:t.length});var t}function Fx(e,t){switch(t){case 0:for(;128&Yx(e););break;case 2:Hx(e,Zx(e));break;case 5:Hx(e,4);break;case 1:Hx(e,8);break;default:throw new Error("Unimplemented type: "+t)}}function Vx(e){return{low:e|=0,high:e>>31,unsigned:e>=0}}let jx=[];function Hx(e,t){if(e.offset+t>e.limit)throw new Error("Skip past limit");e.offset+=t}function $x(e){return e.offset>=e.limit}function zx(e,t){let i=e.bytes,n=e.offset,r=e.limit,s=n+t;if(s>i.length){let t=new Uint8Array(2*s);t.set(i),e.bytes=t}return e.offset=s,s>r&&(e.limit=s),n}function Wx(e,t){let i=e.offset;if(i+t>e.limit)throw new Error("Read past limit");return e.offset+=t,i}function Kx(e,t){let i=zx(e,t.length);e.bytes.set(t,i)}function Gx(e,t){let i=Wx(e,t),n=String.fromCharCode,r=e.bytes,s="�",o="";for(let e=0;e<t;e++){let a,c,l,d,h=r[e+i];0==(128&h)?o+=n(h):192==(224&h)?e+1>=t?o+=s:(a=r[e+i+1],128!=(192&a)?o+=s:(d=(31&h)<<6|63&a,d<128?o+=s:(o+=n(d),e++))):224==(240&h)?e+2>=t?o+=s:(a=r[e+i+1],c=r[e+i+2],32896!=(49344&(a|c<<8))?o+=s:(d=(15&h)<<12|(63&a)<<6|63&c,d<2048||d>=55296&&d<=57343?o+=s:(o+=n(d),e+=2))):240==(248&h)?e+3>=t?o+=s:(a=r[e+i+1],c=r[e+i+2],l=r[e+i+3],8421504!=(12632256&(a|c<<8|l<<16))?o+=s:(d=(7&h)<<18|(63&a)<<12|(63&c)<<6|63&l,d<65536||d>1114111?o+=s:(d-=65536,o+=n(55296+(d>>10),56320+(1023&d)),e+=3))):o+=s}return o}function qx(e,t){let i=t.length,n=0;for(let e=0;e<i;e++){let r=t.charCodeAt(e);r>=55296&&r<=56319&&e+1<i&&(r=(r<<10)+t.charCodeAt(++e)-56613888),n+=r<128?1:r<2048?2:r<65536?3:4}Qx(e,n);let r=zx(e,n),s=e.bytes;for(let e=0;e<i;e++){let n=t.charCodeAt(e);n>=55296&&n<=56319&&e+1<i&&(n=(n<<10)+t.charCodeAt(++e)-56613888),n<128?s[r++]=n:(n<2048?s[r++]=n>>6&31|192:(n<65536?s[r++]=n>>12&15|224:(s[r++]=n>>18&7|240,s[r++]=n>>12&63|128),s[r++]=n>>6&63|128),s[r++]=63&n|128)}}function Yx(e){return e.bytes[Wx(e,1)]}function Xx(e,t){let i=zx(e,1);e.bytes[i]=t}function Zx(e){let t,i=0,n=0;do{t=Yx(e),i<32&&(n|=(127&t)<<i),i+=7}while(128&t);return n}function Qx(e,t){for(t>>>=0;t>=128;)Xx(e,127&t|128),t>>>=7;Xx(e,t)}function Jx(e,t){let i,n=0,r=0,s=0;return i=Yx(e),n=127&i,128&i&&(i=Yx(e),n|=(127&i)<<7,128&i&&(i=Yx(e),n|=(127&i)<<14,128&i&&(i=Yx(e),n|=(127&i)<<21,128&i&&(i=Yx(e),r=127&i,128&i&&(i=Yx(e),r|=(127&i)<<7,128&i&&(i=Yx(e),r|=(127&i)<<14,128&i&&(i=Yx(e),r|=(127&i)<<21,128&i&&(i=Yx(e),s=127&i,128&i&&(i=Yx(e),s|=(127&i)<<7))))))))),{low:n|r<<28,high:r>>>4|s<<24,unsigned:t}}function eD(e,t){let i=t.low>>>0,n=(t.low>>>28|t.high<<4)>>>0,r=t.high>>>24,s=0===r?0===n?i<16384?i<128?1:2:i<1<<21?3:4:n<16384?n<128?5:6:n<1<<21?7:8:r<128?9:10,o=zx(e,s),a=e.bytes;switch(s){case 10:a[o+9]=r>>>7&1;case 9:a[o+8]=9!==s?128|r:127&r;case 8:a[o+7]=8!==s?n>>>21|128:n>>>21&127;case 7:a[o+6]=7!==s?n>>>14|128:n>>>14&127;case 6:a[o+5]=6!==s?n>>>7|128:n>>>7&127;case 5:a[o+4]=5!==s?128|n:127&n;case 4:a[o+3]=4!==s?i>>>21|128:i>>>21&127;case 3:a[o+2]=3!==s?i>>>14|128:i>>>14&127;case 2:a[o+1]=2!==s?i>>>7|128:i>>>7&127;case 1:a[o]=1!==s?128|i:127&i}}const tD={},nD={},rD=4294967296,iD=rD*rD,oD=iD/2,aD=uD(0,!0),sD=uD(0),cD=hD(0,-2147483648,!1),lD=hD(-1,2147483647,!1),dD=hD(-1,-1,!0);function uD(e,t){let i,n,r;return t?(r=0<=(e>>>=0)&&e<256)&&(n=nD[e],n)?n:(i=hD(e,0,!0),r&&(nD[e]=i),i):(r=-128<=(e|=0)&&e<128)&&(n=tD[e],n)?n:(i=hD(e,e<0?-1:0,!1),r&&(tD[e]=i),i)}function hD(e,t,i){return{low:0|e,high:0|t,unsigned:!!i}}function fD(e,t){if(isNaN(e))return t?aD:sD;if(t){if(e<0)return aD;if(e>=iD)return dD}else{if(e<=-oD)return cD;if(e+1>=oD)return lD}return e<0?t?aD:sD:hD(e%rD|0,e/rD|0,t)}function pD(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}class gD extends r_{get connectionState(){return this._connectionState}set connectionState(e){if(this._connectionState===e)return;const t=this._connectionState;this._connectionState=e,this.emit(SS.CONNECTION_STATE_CHANGE,e,t)}get quality(){return this._quality}set quality(e){this._quality=e>1?1:e<.1?.1:e,this._qualityTimer&&(window.clearTimeout(this._qualityTimer),this._qualityTimer=null),this._quality>=1||(this._qualityTimer=window.setTimeout((()=>{this.quality=this._quality/this._qualityRatio}),6e4))}constructor(e){var t;super(),oh(this,"name","AgoraRTCImageModeration"),oh(this,"_connectionState",wS.CONNECTING),oh(this,"_sequence",0),oh(this,"_moderationStartTime",void 0),oh(this,"_workerConnection",void 0),oh(this,"_workerMessageLengthLimit",void 0),oh(this,"_qualityRatio",void 0),oh(this,"_connectInfo",void 0),oh(this,"_cancelTokenSource",gC.CancelToken.source()),oh(this,"_retryConfig",void 0),oh(this,"_moderationInterval",void 0),oh(this,"_moderationTimer",null),oh(this,"_moderationMode",1),oh(this,"_quality",1),oh(this,"_qualityTimer",null),oh(this,"_ticket",void 0),oh(this,"_moderationIntervalMinimum",void 0),oh(this,"_uploadFailedNum",0),oh(this,"_uploadNum",0),oh(this,"_uploadTimer",null),oh(this,"_moderationId",void 0),oh(this,"inspectImage",(()=>{if(this.connectionState!==wS.CONNECTED)throw new Dw(Bb.OPERATION_ABORTED,"image moderation service connection status is ".concat(this.connectionState));this._moderationTimer&&(window.clearInterval(this._moderationTimer),this._moderationTimer=null),this._moderationTimer=window.setInterval((()=>{this.connectionState===wS.CONNECTED?this.requestToInspectImage():$C.debug("[".concat(this._moderationId,"] Moderation State is not connected , "),this.connectionState)}),this._moderationInterval<this._moderationIntervalMinimum?this._moderationIntervalMinimum:this._moderationInterval),this.requestToInspectImage()})),this._moderationId=B_(5,"image-moderation-"),this._workerMessageLengthLimit=xC("IMAGE_MODERATION_WORKER_MESSAGE_LENGTH_LIMIT"),this._moderationIntervalMinimum=xC("IMAGE_MODERATION_INTERVAL_MINIMUM"),this._moderationInterval=null!==(t=e.interval)&&void 0!==t?t:1e3,this._qualityRatio=xC("IMAGE_MODERATION_QUALITY_RATIO"),this._moderationStartTime=Number(Date.now()),this._workerConnection=new qS("worker-"+this._moderationId,Y_),this.on(SS.STATE_CHANGE,((e,t)=>{$C.debug("[".concat(this._moderationId,"] Moderation operation :").concat(TS[e]," ").concat(t||""))})),this.handleWorkerEvents()}async init(e,t){this.emit(SS.STATE_CHANGE,TS.CONNECT_AP),this._connectInfo=e;const i=this._cancelTokenSource.token;return this._retryConfig=t,new nb(((n,r)=>{this.on(SS.CONNECTION_STATE_CHANGE,((e,t)=>{e===wS.CONNECTED&&n()})),this.requestAP(e,i,t).then((e=>{this.connectWorker(e)})).catch((e=>{r(e)}))}))}updateConfig(e){var t;this._moderationInterval=null!==(t=e.interval)&&void 0!==t?t:1e3,$C.debug("[".concat(this._moderationId,"] updateConfig: ").concat(JSON.stringify(e))),this.connectionState===wS.CONNECTED&&this.inspectImage()}async requestAP(e,t,i){const n=xC("WEBCS_DOMAIN").map((e=>"https://".concat(e,"/api/v1"))),r=await function(e,t,i,n){let{appId:r,areaCode:s,cname:o,sid:a,token:c,uid:l}=t;QN++;const d="moderation_plugin",h={service_name:d,json_body:JSON.stringify({appId:r,areaCode:s,cname:o,command:"allocateEdge",requestId:QN,seq:QN,sid:a,appToken:c,ts:Date.now(),uid:l+""})};let u,p,f=e[0];return Z_((async()=>{u=Date.now();const e=await kN(f,{data:h,cancelToken:i,headers:{"X-Packet-Service-Type":"0","X-Packet-URI":"61"},params:{action:"wrtc_gateway"}});if(p=Date.now()-u,0!==e.code){const t=new Dw(Bb.UNEXPECTED_RESPONSE,"moderation plugin ap error, code"+e.code,{retry:!0,responseTime:p});throw $C.error(t.toString()),t}const t=JSON.parse(e.json_body);if(200!==t.code){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"moderation plugin ap error, code: ".concat(t.code,", reason: ").concat(t.reason),{code:t.code,responseTime:p});throw $C.error(e.toString()),e}if(!t.servers||!Array.isArray(t.servers)||0===t.servers.length){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"moderation plugin ap empty server",{code:t.code,responseTime:p});throw $C.error(e.toString()),e}if(!t.servers.some((e=>!!e.wss))){const e=new Dw(Bb.UNEXPECTED_RESPONSE,"moderation plugin ap empty port",{code:t.code,responseTime:p});throw $C.error(e.toString()),e}const n=xC("IMAGE_MODERATION_WORKER_HOST");return{addressList:t.servers.map((e=>{let{address:t,wss:i}=e;if(t&&i)return"wss://".concat(t.replace(/\./g,"-"),".").concat(n,":").concat(i,"/moderation")})).filter((e=>!!e)),workerToken:t.workerToken,vid:t.vid,ticket:t.appTicket,responseTime:p}}),((t,i)=>(nw.apworkerEvent(a,{success:!0,sc:200,serviceName:d,responseDetail:JSON.stringify(t.addressList),firstSuccess:0===i,responseTime:p,serverIp:e[i%e.length]}),!1)),((t,i)=>(nw.apworkerEvent(a,{success:!1,sc:t.data&&t.data.code||200,serviceName:d,responseTime:p,serverIp:e[i%e.length]}),!!(t.code!==Bb.OPERATION_ABORTED&&t.code!==Bb.UNEXPECTED_RESPONSE||t.data&&t.data.retry)&&(f=e[(i+1)%e.length],!0))),n)}(n,e,t,i);this.emit(SS.STATE_CHANGE,TS.AP_CONNECTED);const{addressList:s,ticket:o}=r;return this._ticket=o,s}async connectWorker(e){this.emit(SS.STATE_CHANGE,TS.CONNECT_WORKER),await this._workerConnection.init(e,1e4)}handleWorkerEvents(){this._workerConnection.on(Cw.CONNECTED,(async()=>{this.emit(SS.STATE_CHANGE,TS.WORKER_CONNECTED,this._workerConnection.url),this.connectionState=wS.CONNECTED})),this._workerConnection.on(Cw.CLOSED,(()=>{this.connectionState=wS.CLOSED})),this._workerConnection.on(Cw.FAILED,(()=>{this.connectionState=wS.CLOSED})),this._workerConnection.on(Cw.RECONNECTING,(()=>{this.connectionState=this.connectionState===wS.CONNECTED?wS.RECONNECTING:wS.CONNECTING})),this._workerConnection.on(Cw.ON_MESSAGE,(async e=>{if(e.data instanceof ArrayBuffer){const t=Bx(new Uint8Array(e.data));xC("SHOW_IMAGE_MODERATION_WORKER_MESSAGE")&&$C.debug("[".concat(this._moderationId,"] Response message for worker of image moderation "),JSON.stringify(t)),this._uploadNum++,void 0===t.code||0===t.code||(this._uploadFailedNum++,$C.error("[".concat(this._moderationId,"] Error response from worke, code is ").concat(t.code,", msg is ").concat(t.msg)),this._uploadTimer||(this._uploadTimer=window.setTimeout((()=>{nw.reportApiInvoke(this._connectInfo.sid||null,{name:a_.IMAGE_MODERATION_UPLOAD,options:[this._uploadFailedNum,this._uploadNum,t.code],tag:s_.TRACER}).onError(new Dw(Bb.IMAGE_MODERATION_UPLOAD_FAILED,t.msg)),this._uploadTimer=null}),xC("IMAGE_MODERATION_UPLOAD_REPORT_INTERVAL"))))}else $C.error("[".concat(this._moderationId,"] Unexpected message type from worker"))})),this._workerConnection.on(Cw.WILL_RECONNECT,((e,t,i)=>{"recover"===e&&i(e),i("tryNext")})),this._workerConnection.on(Cw.REQUEST_NEW_URLS,((e,t)=>{this.requestAP(this._connectInfo,this._cancelTokenSource.token,this._retryConfig).then(e).catch(t)}))}static intToLong(e){return{low:e|=0,high:e>>31,unsigned:e>=0}}async requestToInspectImage(){const e=y_(this,SS.CLIENT_LOCAL_VIDEO_TRACK),t={appId:this._connectInfo.appId,cname:this._connectInfo.cname,cid:this._connectInfo.cid,sid:this._connectInfo.sid,uid:this._connectInfo.uid,vid:this._connectInfo.vid};if(e){if(!e.isPlaying)return void(xC("SHOW_IMAGE_MODERATION_WORKER_MESSAGE")&&$C.debug("Only the track being played can be inspected"));this._sequence++;const i=await this.generateRequestData(e,t);this._workerConnection.sendMessage(i,!0,!0)}else xC("SHOW_IMAGE_MODERATION_WORKER_MESSAGE")&&$C.debug("Only the track being published can be inspected")}async generateRequestData(e,t){let{appId:i,cname:n,cid:r,vid:s,sid:o,uid:a}=t;const c=Date.now(),l=await e.getCurrentFrameImage("image/jpeg",this.quality),d=await pR(l,i,n),h=this._sequence+"-"+r+"-"+a+"-"+c+"-"+B_(12,""),u={appId:i,cid:r,cname:n,deviceId:"",elapse:gD.intToLong(Number(c-this._moderationStartTime)),fileSize:l.buffer.byteLength,height:l.height,width:l.width,jpg:d,networkType:6,osType:7,requestId:h,sdkVersion:"4.19.1",sequence:this._sequence,sid:o,timestamp:fD(c),uid:a,vid:s,service:this._moderationMode,ticket:this._ticket},p=Ux(u);if(p.byteLength<this._workerMessageLengthLimit){if(xC("SHOW_IMAGE_MODERATION_WORKER_MESSAGE")){const e=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?pD(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):pD(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},u);delete e.jpg,$C.debug("[".concat(this._moderationId,"] Request message for worker of image moderation service: "),JSON.stringify(e))}return p}{const t=this.quality*this._qualityRatio;return this.quality=t,await this.generateRequestData(e,{appId:i,cname:n,cid:r,vid:s,sid:o,uid:a})}}close(){this._cancelTokenSource.cancel(),this._cancelTokenSource=gC.CancelToken.source(),this._workerConnection&&this._workerConnection.close(),this._moderationTimer&&window.clearInterval(this._moderationTimer),this._moderationTimer=null,this._uploadTimer&&window.clearTimeout(this._uploadTimer),this._uploadTimer=null,this.connectionState=wS.CLOSED,this.emit(SS.STATE_CHANGE,TS.CLOSED)}}function mD(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function vD(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?mD(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):mD(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}class bD extends IS{get currentLocalDescription(){return this.peerConnection.currentLocalDescription}get currentRemoteDescription(){return this.peerConnection.currentRemoteDescription}get peerConnectionState(){return this.peerConnection.connectionState}get iceConnectionState(){return this.peerConnection.iceConnectionState}get dtlsTransportState(){var e,t;return null!==(e=null===(t=this.peerConnection.getReceivers()[0])||void 0===t||null===(t=t.transport)||void 0===t?void 0:t.state)&&void 0!==e?e:null}constructor(e,t,i){super(e,t),oh(this,"direction",void 0),oh(this,"store",void 0),oh(this,"peerConnection",void 0),oh(this,"transportEventReceiver",void 0),oh(this,"statsFilter",void 0),oh(this,"localCandidateCount",0),oh(this,"allCandidatesReceived",!1),oh(this,"mutex",new G_("P2PConnection-mutex")),oh(this,"dataChannel",void 0),oh(this,"onLocalCandidate",void 0),this.store=t,this.peerConnection=new RTCPeerConnection(bD.resolvePCConfiguration(e),{optional:[{googDscp:!0}]}),this.direction=null!=i?i:Ew.SEND_ONLY,this.dataChannel=this.peerConnection.createDataChannel("agora-p2p-signal",{ordered:!0}),this.statsFilter=wM(this.peerConnection,xC("STATS_UPDATE_INTERVAL"),void 0,Cb()?1200:void 0),this.bindPCEvents(),this.bindStatsEvents(),this.store.p2pId=this.store.p2pId+1}async establish(e){try{if(e){await this.peerConnection.setRemoteDescription({type:"offer",sdp:e});const t=await this.peerConnection.createAnswer();if(await this.peerConnection.setLocalDescription(t),!t.sdp)throw new Error("Cannot get answer sdp when trying to establish PeerConnection.");return t.sdp}{const e=await this.peerConnection.createOffer();if(!e.sdp)throw new Error("Cannot get initialOffer.sdp when trying to establish PeerConnection.");return await this.peerConnection.setLocalDescription(e),e.sdp}}catch(e){throw new Fb(Bb.GET_LOCAL_CONNECTION_PARAMS_FAILED,e.toString())}}async connect(e){try{await this.peerConnection.setRemoteDescription({type:"answer",sdp:e})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.connect failed; ".concat(e.toString()))}}async addRemoteCandidate(e){try{await this.peerConnection.addIceCandidate(e)}catch(e){throw new Fb(Bb.ADD_CANDIDATE_FAILED,"P2PConnection.addRemoteCandidate failed; ".concat(e.toString()))}}async send(e){try{const t=[];e.forEach((e=>{const i=this.peerConnection.addTransceiver(e._mediaStreamTrack,{direction:"sendonly"});t.push(i)})),Cb()&&!0===xC("SIMULCAST")&&await this.applySimulcastForFirefox(t,e),await this.applySimulcastEncodings(t,e),await this.applySendEncodings(t,e);const i=await this.peerConnection.createOffer();if(await this.peerConnection.setLocalDescription(i),!i.sdp)throw new Error("Cannot get offer.sdp when trying to send PeerConnection.");const n=t.map((e=>{const t=this.getLocalSSRC(e.mid,i.sdp);if(!t)throw new Error("Cannot get ssrc when trying to send PeerConnection.");return{mid:e.mid,localSSRC:[{ssrcId:t}]}}));return{sdp:i.sdp,trackMessage:n}}catch(e){throw e instanceof Fb?e:new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.send failed; ".concat(e.toString()))}}async stopSending(e,t){const i=t?void 0:await this.mutex.lock("From P2PConnection.stopSending");try{const t=this.peerConnection.getTransceivers().filter((t=>-1!==e.indexOf(t.mid)));if(t.length!==e.length)throw new Error("Transceivers' length (".concat(t.length,") doesn't match mids' length (").concat(e.length,") when trying to call P2PConnection.stopSending."));t.map((e=>{var t;e.direction="inactive",null===(t=e.stop)||void 0===t||t.call(e),this.peerConnection.removeTrack(e.sender)}));const n=await this.peerConnection.createOffer();if(await this.peerConnection.setLocalDescription(n),!n.sdp)throw new Error("Cannot get offer.sdp when trying to send PeerConnection.");return n.sdp}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.stopSending failed; ".concat(e.toString()))}finally{i&&i()}}async receive(e,t,i){try{await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();if(!n.sdp)throw new Error("Cannot get answer sdp when trying to receive track.");await this.peerConnection.setLocalDescription(n),$C.debug("[".concat(this.store.clientId,"] [P2PConnection] receive ").concat(e," by exchanging SDP."));const r=this.getRemoteMid(i,t);if(void 0===r)throw new Error("Cannot get transceiver mid when trying to receive track.");const s=this.peerConnection.getTransceivers().find((e=>e.mid===r));if(!s||null===s.mid)throw new Error("Cannot get transceiver after setLocalDescription.");return{track:s.receiver.track,mid:s.mid,sdp:n.sdp}}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.receive failed; ".concat(e.toString()))}}async setDescription(e,t){try{if("remote"===e){await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const i=await this.peerConnection.createAnswer();if(!i.sdp)throw new Error("Cannot get answer sdp when trying to receive track.");return await this.peerConnection.setLocalDescription(i),$C.debug("[".concat(this.store.clientId,"] [P2PConnection] exchanging SDP, type is ").concat(e)),i.sdp}await this.peerConnection.setRemoteDescription({type:"answer",sdp:t})}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection.setDescription failed; ".concat(e.toString()))}}async stopReceiving(e,t){try{const i=this.peerConnection.getTransceivers().filter((t=>-1!==e.indexOf(t.mid)));if(i.length!==e.length)throw new Error("Transceivers' length doesn't match mids' length when trying to call P2PConnection.stopSending.");i.map((e=>{var t;e.direction="inactive",null===(t=e.stop)||void 0===t||t.call(e)})),await this.peerConnection.setRemoteDescription({type:"offer",sdp:t});const n=await this.peerConnection.createAnswer();if(await this.peerConnection.setLocalDescription(n),!n.sdp)throw new Error("Cannot get answer sdp when trying to receive track.");return n.sdp}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection stopReceiving failed; ".concat(e.toString()))}}async restartICE(){try{const e=await this.peerConnection.createOffer({iceRestart:!0});if(!e.sdp)throw new Error("Cannot restartICE because restart offer SDP does not exist.");return this.store.descriptionStart(),await this.peerConnection.setLocalDescription(e),e.sdp}catch(e){throw new Fb(Bb.EXCHANGE_SDP_FAILED,"P2PConnection stopReceiving failed; ".concat(e.toString()))}}close(){var e;this.peerConnection.close(),null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,"closed"),this.tryUnbindTransportEvents(),this.unbindPCEvents(),this.unbindStatsEvents(),this.transportEventReceiver=void 0,this.statsFilter.destroy()}getStats(){return this.statsFilter.getStats()}getRemoteVideoIsReady(e){return this.statsFilter.getVideoIsReady(e)}async updateEncoderConfig(e,t){}async updateSendParameters(e,t){const i=this.peerConnection.getTransceivers().filter((t=>t.mid===e));1===i.length&&(this.isVP8Simulcast(t)?Cb()||await this.applySimulcastEncodings(i,[t]):await this.applySendEncodings(i,[t]))}setStatsRemoteVideoIsReady(e,t){this.statsFilter.setVideoIsReady2(e,t)}async replaceTrack(e,t){const i=this.peerConnection.getTransceivers().find((e=>e.mid===t));i&&await i.sender.replaceTrack(e._mediaStreamTrack)}async getSelectedCandidatePair(){const e=this.peerConnection.getReceivers();if(e.length>0&&e[0].transport&&e[0].transport.iceTransport&&e[0].transport.iceTransport.getSelectedCandidatePair&&e[0].transport.iceTransport.getSelectedCandidatePair()){const t=e[0].transport.iceTransport,{local:i,remote:n}=t.getSelectedCandidatePair();return{local:vD(vD({},sM),{},{candidateType:i.type,protocol:i.protocol,address:i.address,port:i.port}),remote:vD(vD({},sM),{},{candidateType:n.type,protocol:n.protocol,address:n.address,port:n.port})}}return this.statsFilter.getSelectedCandidatePair()}bindPCEvents(){this.peerConnection.oniceconnectionstatechange=()=>{var e;null===(e=this.onICEConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.iceConnectionState)},this.peerConnection.onconnectionstatechange=()=>{var e;null===(e=this.onConnectionStateChange)||void 0===e||e.call(this,this.peerConnection.connectionState)},this.peerConnection.onicecandidate=e=>{var t;e.candidate&&(null===(t=this.onLocalCandidate)||void 0===t||t.call(this,e.candidate)),e.candidate?this.localCandidateCount+=1:(this.peerConnection.onicecandidate=null,this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] local candidate count"),this.localCandidateCount))},setTimeout((()=>{this.allCandidatesReceived||(this.allCandidatesReceived=!0,$C.debug("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] onicecandidate timeout, local candidate count"),this.localCandidateCount))}),xC("CANDIDATE_TIMEOUT"))}unbindPCEvents(){this.peerConnection.oniceconnectionstatechange=null,this.peerConnection.onconnectionstatechange=null,this.peerConnection.onsignalingstatechange=null,this.peerConnection.onicecandidateerror=null,this.peerConnection.onicecandidate=null,this.peerConnection.ontrack=null}static resolvePCConfiguration(e){const t={iceServers:[]};return e.iceServers?t.iceServers=e.iceServers:e.turnServer&&"off"!==e.turnServer.mode&&(g_(e.turnServer.servers)?t.iceServers=e.turnServer.servers:(t.iceServers&&t.iceServers.push(...bD.turnServerConfigToIceServers(e.turnServer.servers)),xC("USE_TURN_SERVER_OF_GATEWAY")&&t.iceServers&&e.turnServer.serversFromGateway&&t.iceServers.push(...bD.turnServerConfigToIceServers(e.turnServer.serversFromGateway)),xC("FORCE_TURN_TCP")?t.iceTransportPolicy="relay":e.turnServer.servers.concat(e.turnServer.serversFromGateway||[]).forEach((e=>{e.forceturn&&(t.iceTransportPolicy="relay")})))),xC("ENABLE_ENCODED_TRANSFORM")&&uA().supportWebRTCEncodedTransform&&(t.encodedInsertableStreams=!0),t}static turnServerConfigToIceServers(e){const t=[];return e.forEach((e=>{e.tcpport&&(t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turns:".concat(aN(e.turnServerURL),":").concat(e.tcpport,"?transport=tcp")}),t.push({username:e.username,credential:e.password,credentialType:"password",urls:"turn:".concat(e.turnServerURL,":").concat(e.tcpport,"?transport=udp")}),t.push({username:e.username,credential:e.password,credentialType:"password",urls:"stun:".concat(e.turnServerURL,":").concat(e.tcpport)}))})),t}tryBindTransportEvents(e){const t=e.transport;if(t){this.transportEventReceiver=e,t.onstatechange=()=>{var e;null!=t&&t.state&&(null===(e=this.onDTLSTransportStateChange)||void 0===e||e.call(this,t.state))},t.onerror=e=>{var t;null===(t=this.onDTLSTransportError)||void 0===t||t.call(this,"error"in e?e.error:e)};const i=t.iceTransport;i&&(i.onstatechange=()=>{const e=null==t?void 0:t.iceTransport.state;var i;e&&(null===(i=this.onICETransportStateChange)||void 0===i||i.call(this,e))},i.getSelectedCandidatePair&&(i.onselectedcandidatepairchange=()=>{if(i.getSelectedCandidatePair()){const{local:e,remote:t}=i.getSelectedCandidatePair();$C.info("[".concat(this.store.clientId,"] [pc-").concat(this.store.p2pId,"] selectedcandidatepairchange: local ").concat(JSON.stringify({candidateType:e.type,protocol:e.protocol}),", remote ").concat(JSON.stringify({candidateType:t.type,protocol:t.protocol,address:t.address,port:t.port})," )"))}}))}}tryUnbindTransportEvents(){this.transportEventReceiver&&this.transportEventReceiver.transport&&(this.transportEventReceiver.transport.onstatechange=null,this.transportEventReceiver.transport.onerror=null,this.transportEventReceiver.transport.iceTransport&&(this.transportEventReceiver.transport.iceTransport.onstatechange=null))}async updateRtpSenderEncodings(e,t){var i;if(t||(t=this.peerConnection.getSenders().find((t=>t.track===e._mediaStreamTrack))),!t)return $C.warn("[".concat(e.getTrackId(),"] no rtpSender found}"));if(this.isVP8Simulcast(e))return $C.warn("[updateRtpSenderEncodings] Track is VP8 simulcast, please apply simulcast encodings");if(!uA().supportSetRtpSenderParameters)return $C.warn("[updateRtpSenderEncodings] Browser not support set rtp-sender parameters");const n={},r={};switch(e._optimizationMode){case"motion":n.degradationPreference="maintain-framerate";break;case"detail":n.degradationPreference="maintain-resolution";break;default:n.degradationPreference="balanced"}if(e._encoderConfig){var s;const{bitrateMax:t,frameRate:i,scaleResolutionDownBy:n}=e._encoderConfig;t&&(r.maxBitrate=1e3*t),Di(s=e._hints).call(s,NT.LOW_STREAM)&&(i&&(r.maxFramerate=cN(i)),n&&n>=1&&(r.scaleResolutionDownBy=n))}if(xC("DSCP_TYPE")&&Db()){var o;const e=xC("DSCP_TYPE");Di(o=["very-low","low","medium","high"]).call(o,e)&&(r.networkPriority=e)}const a=t.getParameters(),c=null===(i=a.encodings)||void 0===i?void 0:i[0];Cb()&&!c&&(n.encodings=[r]),c&&Object.assign(c,r),Object.assign(a,n),$C.debug("[".concat(e.getTrackId(),"] updateRtpSenderEncodings: ").concat(JSON.stringify(a.encodings))),await t.setParameters(a)}async applySendEncodings(e,t){try{if(!uA().supportSetRtpSenderParameters)return;if(e.length!==t.length)return;for(let i=0;i<e.length;i++){const n=e[i],r=t[i];r instanceof vR&&!this.isVP8Simulcast(r)&&await this.updateRtpSenderEncodings(r,n.sender)}}catch(e){$C.debug("[".concat(this.store.clientId,"] Apply RTPSendEncodings failed."))}}mungSendOfferSDP(e,t,i){const n=UL.parse(e);return t.forEach(((e,t)=>{const r=i[t],s=n.mediaDescriptions.find((e=>e.attributes.mid===r));s&&(WL(s,e),XL(s,e,this.store.codec))})),UL.print(n)}bindStatsEvents(){this.statsFilter.onFirstAudioReceived=e=>{var t;null===(t=this.onFirstAudioReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoReceived=e=>{var t;null===(t=this.onFirstVideoReceived)||void 0===t||t.call(this,e)},this.statsFilter.onFirstAudioDecoded=e=>{var t;null===(t=this.onFirstAudioDecoded)||void 0===t||t.call(this,e)},this.statsFilter.onFirstVideoDecoded=(e,t,i)=>{var n;null===(n=this.onFirstVideoDecoded)||void 0===n||n.call(this,e,t,i)},this.statsFilter.onSelectedLocalCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedLocalCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onSelectedRemoteCandidateChanged=(e,t)=>{var i;null===(i=this.onSelectedRemoteCandidateChanged)||void 0===i||i.call(this,e,t)},this.statsFilter.onFirstVideoDecodedTimeout=e=>{var t;null===(t=this.onFirstVideoDecodedTimeout)||void 0===t||t.call(this,e)}}unbindStatsEvents(){this.statsFilter.onFirstAudioReceived=void 0,this.statsFilter.onFirstVideoReceived=void 0,this.statsFilter.onFirstAudioDecoded=void 0,this.statsFilter.onFirstVideoDecoded=void 0,this.statsFilter.onSelectedLocalCandidateChanged=void 0,this.statsFilter.onSelectedRemoteCandidateChanged=void 0,this.statsFilter.onFirstVideoDecodedTimeout=void 0}async applySimulcastForFirefox(e,t){if(e.length===t.length)for(let a=0;a<e.length;a++){var i,n,r,s,o;const c=e[a],l=t[a];if(l instanceof vR&&!Di(i=l._hints).call(i,NT.LOW_STREAM)&&null!==(n=l._encoderConfig)&&void 0!==n&&n.bitrateMax&&(null===(r=l._encoderConfig)||void 0===r?void 0:r.bitrateMax)>200&&null!==(s=l._scalabilityMode)&&void 0!==s&&s.numSpatialLayers&&(null===(o=l._scalabilityMode)||void 0===o?void 0:o.numSpatialLayers)>1&&"vp8"===this.store.codec){const e={},t={high:1e3*(l._encoderConfig.bitrateMax-50),medium:5e4};e.encodings=[{rid:"m",active:!0,maxBitrate:t.medium,scaleResolutionDownBy:4},{rid:"h",active:!0,maxBitrate:t.high}];const i=c.sender.getParameters();await c.sender.setParameters(Object.assign(i,e))}}}async applySimulcastEncodings(e,t){if(!Cb()&&e.length===t.length)for(let i=0;i<e.length;i++){const n=t[i];if(n instanceof vR&&this.isVP8Simulcast(n)){const t=e[i],r={},s={high:1e3*(n._encoderConfig.bitrateMax-50),medium:5e4};r.encodings=[{active:!0,adaptivePtime:!1,networkPriority:"high",priority:"high",maxBitrate:s.high},{active:!0,adaptivePtime:!1,networkPriority:"low",priority:"low",maxBitrate:s.medium,scaleResolutionDownBy:4}];const o=t.sender.getParameters();await t.sender.setParameters(Object.assign(o,r))}}}isVP8Simulcast(e){var t,i,n,r,s;return!!(e instanceof vR&&xC("SIMULCAST")&&"vp8"===this.store.codec&&!Di(t=e._hints).call(t,NT.LOW_STREAM)&&null!==(i=e._encoderConfig)&&void 0!==i&&i.bitrateMax&&(null===(n=e._encoderConfig)||void 0===n?void 0:n.bitrateMax)>200&&null!==(r=e._scalabilityMode)&&void 0!==r&&r.numSpatialLayers&&(null===(s=e._scalabilityMode)||void 0===s?void 0:s.numSpatialLayers)>1)}logSDPExchange(e,t,i,n){if(xC("SDP_LOGGING"))return $C.upload("[".concat(this.store.clientId,"] exchanging ").concat(i," ").concat(t," SDP during P2PConnection.").concat(n,"\n"),e),"offer"===t?e=>{this.logSDPExchange(e,"answer","local"===i?"remote":"local",n)}:void 0}getLocalSSRC(e,t){var i,n;if(t=null!==(i=t)&&void 0!==i?i:null===(n=this.currentLocalDescription)||void 0===n?void 0:n.sdp){var r;const i=null===(r=UL.parse(t).mediaDescriptions.find((t=>t.attributes.mid===e)))||void 0===r?void 0:r.attributes.ssrcs;return null==i?void 0:i[0].ssrcId}}getRemoteMid(e,t){var i,n,r;if(t=null!==(i=t)&&void 0!==i?i:null===(n=this.currentRemoteDescription)||void 0===n?void 0:n.sdp)return null===(r=UL.parse(t).mediaDescriptions.find((t=>t.attributes.ssrcs.some((t=>t.ssrcId===e)))))||void 0===r?void 0:r.attributes.mid}async getRemoteSSRC(e,t){var i,n;if(t=null!==(i=t)&&void 0!==i?i:null===(n=this.currentRemoteDescription)||void 0===n?void 0:n.sdp){var r;const i=null===(r=UL.parse(t).mediaDescriptions.find((t=>t.attributes.mid===e)))||void 0===r?void 0:r.attributes.ssrcs;return null==i?void 0:i[0].ssrcId}}}function _D(e,t,i){const n=e[t];if("function"!=typeof n)throw new Error("Cannot use mutex on object property.");return i.value=async function(){const e=this.mutex,i=await e.lock("From P2PConnection.".concat(t));try{for(var r=arguments.length,s=new Array(r),o=0;o<r;o++)s[o]=arguments[o];return await n.apply(this,s)}finally{i()}},i}var yD;function ED(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function CD(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ED(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ED(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],bD.prototype,"establish",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],bD.prototype,"connect",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[RTCIceCandidate]),xw("design:returntype",nb)],bD.prototype,"addRemoteCandidate",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],bD.prototype,"send",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String,String,Number]),xw("design:returntype",nb)],bD.prototype,"receive",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String,String]),xw("design:returntype",nb)],bD.prototype,"setDescription",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[Array,String]),xw("design:returntype",nb)],bD.prototype,"stopReceiving",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],bD.prototype,"restartICE",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],bD.prototype,"close",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],bD.prototype,"updateEncoderConfig",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[String,JT]),xw("design:returntype",nb)],bD.prototype,"updateSendParameters",null),Mw([_D,xw("design:type",Function),xw("design:paramtypes",[JT,String]),xw("design:returntype",nb)],bD.prototype,"replaceTrack",null),function(e){e.SEND_ONLY="SEND_ONLY",e.RECEIVE_ONLY="RECEIVE_ONLY"}(yD||(yD={}));class wD extends r_{get state(){return this._state}set state(e){const t=this._state;this._state=e,this.emit(pS.StateChange,t,this._state)}constructor(e,t){super(),oh(this,"store",void 0),oh(this,"statsUploader",void 0),oh(this,"sendConnection",void 0),oh(this,"recvConnection",void 0),oh(this,"localTrackMap",new Map),oh(this,"remoteUserMap",new Map),oh(this,"localDataChannels",[]),oh(this,"pendingLocalTracks",[]),oh(this,"pendingRemoteTracks",[]),oh(this,"statsCollector",void 0),oh(this,"dtlsFailedCount",0),oh(this,"sendMutex",new G_("P2PChannel2-send-mutex")),oh(this,"recvMutex",new G_("P2PChannel2-recv-mutex")),oh(this,"_state",fS.Disconnected),oh(this,"_restartStates",["disconnected","failed"]),oh(this,"_restartTimer",void 0),oh(this,"handleMuteLocalTrack",(async(e,t,i)=>{const n=await this.sendMutex.lock("Locking from P2PChannel2.handleMuteLocalTrack");try{if(!this.sendConnection||this.state!==fS.Connected)return void i(new Fb(Bb.INVALID_OPERATION,"Cannot call P2PChannel2.handleMuteLocalTrack before sendConnection established."));const o=this.filterTobeMutedTracks(e);if(0===o.length)return void t();const a=o.find((e=>"videoLowTrack"===e[0]));a&&a[1].track._originMediaStreamTrack.stop();let c=!1;var r,s;c="video"===e.trackMediaType?!(null===(r=this.localTrackMap.get(hS.LocalAudioTrack))||void 0===r||!r.track._muted):void 0===(null===(s=this.localTrackMap.get(hS.LocalVideoTrack))||void 0===s?void 0:s.id);const l=o.filter((e=>{let[t,i]=e;return(t!==hS.LocalAudioTrack||c)&&void 0!==i.id})).map((e=>{let[,t]=e;return t}));let d;l.length>0&&(d=await this.sendConnection.stopSending(l.map((e=>e.id))),l.forEach((e=>{e.id=void 0,e.ssrcs=void 0})));const h=this.createMuteMessage(o),u="video"===e.trackMediaType?RS.MUTE_LOCAL_VIDEO:RS.MUTE_LOCAL_AUDIO,p=await b_(this,pS.RequestP2PMuteLocal,{action:u,sdp:d,message:h,isMuteAll:c});p&&await this.sendConnection.setDescription("local",p),(d||"audio"===e.trackMediaType)&&await __(this,pS.RequestMuteLocal,h),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleUnmuteLocalTrack",(async(e,t,i)=>{const n=await this.sendMutex.lock("Locking from P2PChannel2.handleUnmuteLocalTrack");try{if(!this.sendConnection||this.state!==fS.Connected)return void i(new Fb(Bb.INVALID_OPERATION,"Cannot call P2PChannel2.handleUnmuteLocalTrack before sendConnection established."));const r=this.filterTobeUnmutedTracks(e);if(0===r.length)return void t();const s=this.createUnmuteMessage(r),o="video"===e.trackMediaType?RS.UNMUTE_LOCAL_VIDEO:RS.UNMUTE_LOCAL_AUDIO;await __(this,pS.RequestP2PMuteLocal,{action:o,message:s}),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleUpdateVideoEncoder",(async(e,t,i)=>{const n=await this.sendMutex.lock("Locking from P2PChannel2.handleSetVideoEncoder");try{const i=this.localTrackMap.get(hS.LocalVideoTrack);if(!this.sendConnection||!i||i.track!==e||this.state!==fS.Connected)return void t();const{id:r,track:s}=i;r&&(await this.sendConnection.updateSendParameters(r,s),await this.sendConnection.updateEncoderConfig(r,s),this.emit(pS.UpdateVideoEncoder,s)),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleSetOptimizationMode",(async(e,t,i)=>{const n=await this.sendMutex.lock("Locking from P2PChannel2.handleSetOptimizationMode");try{const i=this.localTrackMap.get(hS.LocalVideoTrack);if(!this.sendConnection||!i||i.track!==e||this.state!==fS.Connected)return;const{id:r,track:s}=i;r&&await this.sendConnection.updateSendParameters(r,s),t()}catch(e){i(e)}finally{n()}})),oh(this,"handleReplaceTrack",(async(e,t,i,n)=>{let r;$C.debug("[".concat(this.store.clientId,"] P2PChannel2 handleReplaceTrack for [track-id-").concat(e.getTrackId(),"]")),"boolean"==typeof n&&n||(r=await this.sendMutex.lock("From P2PChannel2.handleReplaceTrack"));try{var s;const i=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(!this.sendConnection||!i||void 0===i[1].id||this.state!==fS.Connected)return void t();if(await(null===(s=this.sendConnection)||void 0===s?void 0:s.replaceTrack(e,i[1].id)),i[0]===hS.LocalVideoTrack&&uA().supportDualStreamEncoding){const t=this.localTrackMap.get(hS.LocalVideoLowTrack);if(t){const i=e._mediaStreamTrack.clone();t.track._originMediaStreamTrack.stop(),t.track._mediaStreamTrack=i,t.track._originMediaStreamTrack=i,await new nb(((e,i)=>{this.handleReplaceTrack(t.track,e,i,!0)}))}}t()}catch(e){i(e)}finally{var o;null===(o=r)||void 0===o||o()}})),oh(this,"handleGetLocalVideoStats",(e=>{e(this.statsCollector.getLocalVideoTrackStats())})),oh(this,"handleGetLocalAudioStats",(e=>{e(this.statsCollector.getLocalAudioTrackStats())})),oh(this,"handleGetRemoteVideoStats",(e=>this.statsCollector.getRemoteVideoTrackStats(e.uid)[e.uid])),oh(this,"handleGetRemoteAudioStats",(e=>this.statsCollector.getRemoteAudioTrackStats(e.uid)[e.uid])),this.store=e,this.statsCollector=t,this.statsCollector.addP2PChannel(this),this.statsUploader=new ex,this.bindStatsUploaderEvents()}async startP2PConnection(e,t){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support startP2PConnection.")}async connect(e,t,i,n,r,s){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support connect.")}async startP2P(e,t){if(this.state=fS.New,this.sendConnection&&($C.warning("[".concat(this.store.clientId,"] P2PChannel.startP2P reset P2PConnection.")),this.sendConnection.close(),this.unbindConnectionEvents(this.sendConnection)),this.recvConnection&&($C.warning("[".concat(this.store.clientId,"] P2PChannel.startP2P reset P2PConnection.")),this.recvConnection.close(),this.unbindConnectionEvents(this.recvConnection)),this.sendConnection=new bD(e,this.store),this.bindConnectionEvents(this.sendConnection),this.recvConnection=new bD(e,this.store,Ew.RECEIVE_ONLY),this.bindConnectionEvents(this.recvConnection),t){this.store.peerConnectionStart(),await this.recvConnection.establish(t);const e=await this.sendConnection.establish(t);return this.statsUploader.startUploadTransportStats(!0),this.statsUploader.startUploadExtensionUsageStats(),this.state=fS.Connected,e}return await this.recvConnection.establish(t),this.sendConnection.establish(t)}async p2pConnect(e){if(!this.sendConnection||!this.recvConnection)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot P2PChannel2.connect before P2PChannel2.startP2PConnection .");this.store.peerConnectionStart(),await this.recvConnection.connect(e),await this.sendConnection.connect(e),this.statsUploader.startUploadTransportStats(),this.statsUploader.startUploadExtensionUsageStats(),this.state=fS.Connected}async addRemoteCandidate(e){if(!this.sendConnection||!this.recvConnection)throw new Fb(Bb.UNEXPECTED_ERROR,"Cannot P2PChannel2.connect before P2PChannel2.addRemoteCandidate .");await this.recvConnection.addRemoteCandidate(e),await this.sendConnection.addRemoteCandidate(e)}async publish(e,t,i){if(!this.sendConnection||this.state!==fS.Connected){this.throwIfTrackTypeNotMatch(e);const t=e.filter((e=>-1===this.pendingLocalTracks.indexOf(e)));return void(this.pendingLocalTracks=this.pendingLocalTracks.concat(t))}this.store.pubId=this.store.pubId+1,eN.markPublishStart(this.store.clientId,this.store.pubId);const n=this.filterTobePublishedTracks(e,t,i);if(0===n.length)return void await this.tryToUnmuteAudio(e);n.forEach((e=>{let{track:t,type:i}=e;const n=Date.now();this.store.publish(t.getTrackId(),i===hS.LocalAudioTrack?"audio":"video",n)})),this.bindLocalTrackEvents(n);const r=this.createGatewayPublishMessage(n);return this.assignLocalTracks(n),n.forEach((e=>{let{track:t,type:i}=e;const n=Date.now();this.store.publish(t.getTrackId(),i===hS.LocalAudioTrack?"audio":"video",void 0,n)})),r}async dopublish(e){if(!this.sendConnection||this.state!==fS.Connected)return;const t=this.localTrackMap.get(e);if(t){const{sdp:i,trackMessage:n}=await this.sendConnection.send([t.track]),{mid:r,localSSRC:s}=n[0];t.id=r,t.ssrcs=s,this.statsCollector.addLocalStats(e),this.statsUploader.startUploadUplinkStats();const o=await b_(this,pS.RequestP2PPublish,{kind:e===hS.LocalAudioTrack?lS.AUDIO:lS.VIDEO,sdp:i,ssrcId:s[0].ssrcId});await this.sendConnection.setDescription("local",o);const a=this.createUnmuteMessage([[e,t]]);await __(this,pS.RequestUnmuteLocal,a)}}async setDescription(e,t){let i,n;"local"===e?(i=await this.sendMutex.lock("From P2PChannel.restartICE"),n=this.sendConnection):(i=await this.recvMutex.lock("From P2PChannel.restartICE"),n=this.recvConnection);try{if(!n||this.state!==fS.Connected)return;return await n.setDescription(e,t)}finally{i()}}publishLowStream(e){return LL((function*(){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support publishLowStream.")}))()}async republish(){this.pendingLocalTracks.length>0&&($C.debug("[".concat(this.store.clientId,"] Emit P2PChannelEvents.RequestRePublish to republish tracks.")),await b_(this,pS.RequestRePublish,this.pendingLocalTracks),this.emit(pS.MediaReconnectEnd,this.store.uid),this.pendingLocalTracks=[])}async unpublish(e){if(!this.sendConnection||this.state!==fS.Connected)return void(0===e.length?this.pendingLocalTracks.length=0:this.pendingLocalTracks=this.pendingLocalTracks.filter((t=>!Di(e).call(e,t))));const t=this.filterTobeUnpublishedTracks(e);if(0===t.length)return;this.unbindLocalTrackEvents(t.map((e=>{let[t,{track:i}]=e;return{type:t,track:i}})));const i=t.filter((e=>{let[,{id:t}]=e;return void 0!==t}));if(!this.sendConnection||this.state!==fS.Connected)return void e.forEach((e=>{const t=this.pendingLocalTracks.indexOf(e);-1!==t&&this.pendingLocalTracks.splice(t,1)}));const n=t.find((e=>"videoLowTrack"===e[0]));let r;n&&n[1].track.close();const s=this.createGatewayUnpublishMessage(t);i.length>0&&(r=await this.sendConnection.stopSending(i.map((e=>{let[,{id:t}]=e;return t})))),this.withdrawLocalTracks(t),this.unbindLocalTrackEvents(t.map((e=>{let[t,{track:i}]=e;return{type:t,track:i}}))),t.forEach((e=>{let[t]=e;this.statsCollector.removeLocalStats(t)})),0===this.localTrackMap.size&&this.statsUploader.stopUploadUplinkStats();const o=this.createMuteMessage(t);return await nb.all(o.map((async e=>{await __(this,pS.RequestMuteLocal,[e])}))),{sdp:r,unpubMsg:s}}async unpublishLowStream(){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support unpublishLowStream.")}async doUnpublish(e){if(!this.sendConnection||this.state!==fS.Connected)return;const t=[];if(e!==lS.AUDIO){const e=this.localTrackMap.get(hS.LocalVideoTrack);void 0!==(null==e?void 0:e.id)&&t.push([hS.LocalVideoTrack,e]);const i=this.localTrackMap.get(hS.LocalVideoLowTrack);void 0!==(null==i?void 0:i.id)&&t.push([hS.LocalVideoLowTrack,i]),this.statsCollector.removeLocalStats(hS.LocalVideoTrack),this.statsCollector.removeLocalStats(hS.LocalVideoLowTrack)}if(e!==lS.VIDEO){const e=this.localTrackMap.get(hS.LocalAudioTrack);void 0!==(null==e?void 0:e.id)&&t.push([hS.LocalAudioTrack,e]),this.statsCollector.removeLocalStats(hS.LocalAudioTrack)}if(t.length>0){const i=await this.sendConnection.stopSending(t.map((e=>{let[,t]=e;return t.id})));t.forEach((e=>{let[,t]=e;t.id=void 0,t.ssrcs=void 0}));const n=await b_(this,pS.RequestP2PUnPublish,{sdp:i,kind:e});await this.sendConnection.setDescription("local",n);const r=this.createMuteMessage(t);await nb.all(r.map((async e=>{await __(this,pS.RequestMuteLocal,[e])})))}}async subscribe(e,t,i,n){var r;if(!this.recvConnection||this.state!==fS.Connected)throw new Fb(Bb.INVALID_OPERATION,"Cannot subscribe remote user when recvConnection disconnected.");if(null!==(r=this.remoteUserMap.get(e))&&void 0!==r&&r.has(t))return;const{track:s,mid:o,sdp:a}=await this.recvConnection.receive(t,i,n);t===lS.AUDIO?(e._audioSSRC=n,e._audioTrack?e._audioTrack._updateOriginMediaStreamTrack(s):(e._audioTrack=new AR(s,e.uid,e._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote audio track: ").concat(e._audioTrack.getTrackId()))),this.bindRemoteTrackEvents(e,e._audioTrack)):(e._videoSSRC=n,e._videoTrack?e._videoTrack._updateOriginMediaStreamTrack(s):(e._videoTrack=new TR(s,e.uid,e._uintid,this.store),$C.info("[".concat(this.store.clientId,"] [").concat(this.store.p2pId,"] create remote video track: ").concat(e._videoTrack.getTrackId()))),this.bindRemoteTrackEvents(e,e._videoTrack));const c=this.remoteUserMap.get(e);c?c.set(t,o):this.remoteUserMap.set(e,new Map([[t,o]])),this.statsCollector.addRemoteStats(e.uid),this.statsUploader.startUploadDownlinkStats(),await __(this,pS.RequestP2PUnmuteRemote,t);const l=this.pendingRemoteTracks.findIndex((i=>{let{user:n,kind:r}=i;return n.uid===e.uid&&t===r}));return-1!==l&&(this.pendingRemoteTracks.splice(l,1),this.emit(pS.MediaReconnectEnd,e.uid)),a}async unsubscribe(e,t,i,n){const r=this.pendingRemoteTracks.filter((t=>{let{user:n,kind:r}=t;return void 0!==i?n.uid===e.uid&&i===r:n.uid===e.uid}));if(r.forEach((e=>{const t=this.pendingRemoteTracks.indexOf(e);this.pendingRemoteTracks.splice(t,1)})),this.recvConnection&&this.state===fS.Connected||n||r.forEach((t=>{let{kind:i}=t;var n;if(i===lS.AUDIO)null===(n=e._audioTrack)||void 0===n||n._destroy(),e._audioTrack=void 0;else if(i===lS.VIDEO){var r;null===(r=e._videoTrack)||void 0===r||r._destroy(),e._videoTrack=void 0}})),!this.recvConnection||this.state!==fS.Connected)return;const s=this.filterTobeUnSubscribedTracks(e,i);if(0===s.length)return void(i!==lS.VIDEO&&__(this,pS.RequestP2PMuteRemote,lS.AUDIO));const o=await this.recvConnection.stopReceiving(s.map((e=>{let[,{id:t}]=e;return t})),t);return this.withdrawRemoteTracks(s),0===this.remoteUserMap.size&&this.statsUploader.stopUploadDownlinkStats(),s.forEach((e=>{let[t,{kind:i}]=e;var r,s;if(i===lS.VIDEO&&t._videoSSRC&&(null===(r=this.recvConnection)||void 0===r||r.setStatsRemoteVideoIsReady(t._videoSSRC,!1)),i===lS.VIDEO)this.unbindRemoteTrackEvents(t._videoTrack),n||(null===(s=t._videoTrack)||void 0===s||s._destroy(),t._videoTrack=void 0);else if(i===lS.AUDIO){var o;this.unbindRemoteTrackEvents(t._audioTrack),n||(null===(o=t._audioTrack)||void 0===o||o._destroy(),t._audioTrack=void 0)}})),s.filter((e=>{let[,{kind:t}]=e;return t!==lS.AUDIO})).forEach((e=>{let[,{kind:t}]=e;__(this,pS.RequestP2PMuteRemote,t)})),i!==lS.VIDEO&&__(this,pS.RequestP2PMuteRemote,lS.AUDIO),o}getAllDataChannels(){return this.localDataChannels}async massSubscribe(e){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support massSubscribe.")}async massSubscribeNoLock(e){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support massSubscribeNoLock.")}async massUnsubscribe(e){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support massUnsubscribe.")}async massUnsubscribeNoLock(e){throw new Fb(Bb.NOT_SUPPORTED,"p2p mode does not support massUnsubscribeNoLock.")}async muteRemote(e,t){if(!this.recvConnection)return;const i=this.remoteUserMap.get(e);if(!i)return void $C.warning("[".concat(this.store.clientId,"] P2PChannel2.muteRemote has no remote user ").concat(e.uid,"."));if(!i.get(t))return void $C.warning("[".concat(this.store.clientId,"] P2PChannel2.muteRemote has no remote user ").concat(e.uid," media type ").concat(t,"."));const n=t===lS.VIDEO?e._videoSSRC:e._audioSSRC;void 0!==n&&this.recvConnection.setStatsRemoteVideoIsReady(n,!1)}async unmuteRemote(e,t){return this.unmuteRemoteNoLock(e,t)}async unmuteRemoteNoLock(e,t){if(!this.recvConnection)return;const i=this.remoteUserMap.get(e);i?i.get(t)||$C.warning("[".concat(this.store.clientId,"] P2PChannel2.unmuteRemote has no remote user ").concat(e.uid," media type ").concat(t,".")):$C.warning("[".concat(this.store.clientId,"] P2PChannel2.unmuteRemote has no remote user ").concat(e.uid,"."))}getAllTracks(e){const t=this.localTrackMap.get(hS.LocalAudioTrack);if((null==t?void 0:t.track)instanceof QA){const i=t.track;return Array.from(this.localTrackMap.entries()).filter((e=>{let[t]=e;return t!==hS.LocalAudioTrack})).filter((t=>{let[i]=t;return!(e&&i===hS.LocalVideoLowTrack)})).map((e=>{let[,{track:t}]=e;return t})).concat(i.trackList)}return Array.from(this.localTrackMap.entries()).filter((t=>{let[i]=t;return!(e&&i===hS.LocalVideoLowTrack)})).map((e=>{let[,{track:t}]=e;return t}))}reportPublishEvent(e,t,i,n,r){if(e){const i=this.localTrackMap.get(hS.LocalAudioTrack),s=n?this.localTrackMap.get(hS.LocalVideoLowTrack):this.localTrackMap.get(hS.LocalVideoTrack);nw.publish(this.store.sessionId,{eventElapse:eN.measureFromPublishStart(this.store.clientId,this.store.pubId),succ:e,ec:t,audioName:null==i?void 0:i.track.getTrackLabel(),videoName:null==s?void 0:s.track.getTrackLabel(),screenshare:-1!==(null==s?void 0:s.track._hints.indexOf(NT.SCREEN_TRACK)),audio:!!i,video:!!s,p2pid:this.store.p2pId,publishRequestid:this.store.pubId,extend:r})}else{var s;i||(i=[]);const o=i.find((e=>e instanceof YA)),a=n?null===(s=this.localTrackMap.get(hS.LocalVideoTrack))||void 0===s?void 0:s.track:i.find((e=>e instanceof vR));nw.publish(this.store.sessionId,{eventElapse:eN.measureFromPublishStart(this.store.clientId,this.store.pubId),succ:e,ec:t,audioName:null==o?void 0:o.getTrackLabel(),videoName:null==a?void 0:a.getTrackLabel(),screenshare:-1!==(null==a?void 0:a._hints.indexOf(NT.SCREEN_TRACK)),audio:!!o,video:!!a,p2pid:this.store.p2pId,publishRequestid:this.store.pubId,extend:r})}}reportSubscribeEvent(e,t,i,n){const r=n===lS.VIDEO?i._videoSSRC:i._audioSSRC;r&&nw.subscribe(this.store.sessionId,{succ:e,ec:t,video:n===lS.VIDEO,audio:n===lS.AUDIO,peerid:i.uid,subscribeRequestid:n===lS.VIDEO?i._videoSSRC:i._audioSSRC,p2pid:this.store.p2pId,eventElapse:eN.measureFromSubscribeStart(this.store.clientId,r)})}reset(){$C.debug("[".concat(this.store.clientId,"] P2PChannel2.reset")),this.sendMutex=new G_("P2PChannel2-send-mutex"),this.sendMutex=new G_("P2PChannel2-recv-mutex"),this.sendConnection&&(this.sendConnection.close(),this.unbindConnectionEvents(this.sendConnection),this.sendConnection=void 0),this.recvConnection&&(this.recvConnection.close(),this.unbindConnectionEvents(this.recvConnection),this.recvConnection=void 0),this.statsUploader.stopUploadUplinkStats(),this.statsUploader.stopUploadDownlinkStats(),this.statsUploader.stopUploadTransportStats(),this.statsUploader.stopUploadExtensionUsageStats(),this.unbindLocalTrackEvents(),this.unbindAllRemoteTrackEvents(),this.unbindRtpTransceiver();const e=this.localTrackMap.get(hS.LocalAudioTrack);if((null==e?void 0:e.track)instanceof QA){if(e.track.trackList.length>0){const t=e.track;e.track.trackList.forEach((e=>{t.removeAudioTrack(e)}))}e.track.close()}this.localTrackMap.clear(),this.remoteUserMap.clear(),this.statsCollector.removeRemoteStats(),this.statsCollector.removeLocalStats(),this.dtlsFailedCount=0,this.pendingLocalTracks=[],this.pendingRemoteTracks=[],this.state=fS.Disconnected}getStats(e){var t,i;return e?null===(i=this.recvConnection)||void 0===i?void 0:i.getStats():null===(t=this.sendConnection)||void 0===t?void 0:t.getStats()}getRemoteVideoIsReady(e){var t;return(null===(t=this.recvConnection)||void 0===t?void 0:t.getRemoteVideoIsReady(e))||!1}getLocalAudioVolume(){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(e)return e.track.getVolumeLevel()}getLocalVideoSize(){const e=this.localTrackMap.get(hS.LocalVideoTrack);if(e)return{width:e.track._videoWidth||0,height:e.track._videoHeight||0}}getEncoderConfig(e){const t=this.localTrackMap.get(e);return t&&t.track instanceof vR||t&&t.track instanceof YA?t.track._encoderConfig:void 0}getLocalMedia(e){return this.localTrackMap.get(e)}hasLocalMedia(){return this.localTrackMap.size>0}hasRemoteMedia(e,t){if(!e)return this.remoteUserMap.size>0;const i=this.remoteUserMap.get(e);return!!i&&(!t||i.has(t))}async hasRemoteMediaWithLock(e,t){if(!e)return this.remoteUserMap.size>0;const i=this.remoteUserMap.get(e);return!!i&&(!t||i.has(t))}getRemoteMedia(e){var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t.uid===e));return i?{audioTrack:i.audioTrack,audioSSRC:i._audioSSRC,videoTrack:i.videoTrack,videoSSRC:i._videoSSRC}:{}}getAudioLevels(){let e=Array.from(this.remoteUserMap.entries()).map((e=>{let[t]=e;return{uid:t.uid,level:t.audioTrack?100*t.audioTrack._source.getAccurateVolumeLevel():0}}));const t=this.localTrackMap.get(hS.LocalAudioTrack);return t&&e.push({level:100*t.track._source.getAccurateVolumeLevel(),uid:this.store.uid}),e=ef(e).call(e,((e,t)=>e.level-t.level)),e}async disconnectForReconnect(){this.sendConnection&&this.recvConnection&&($C.debug("[".concat(this.store.clientId,"] P2PChannel2.disconnectForReconnect closing P2PConnection")),this.state=fS.Reconnecting,xC("KEEP_LAST_FRAME")&&0!==this.remoteUserMap.size&&Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t]=e;var i;t._videoTrack&&t._videoTrack._player&&(null===(i=t._videoTrack._player.getVideoElement())||void 0===i||i.pause(),t._videoTrack._player.isKeepLastFrame=!0,t._videoTrack._originMediaStreamTrack.stop())})),this.sendConnection.close(),this.unbindConnectionEvents(this.sendConnection),this.sendConnection=void 0,this.recvConnection.close(),this.unbindConnectionEvents(this.recvConnection),this.recvConnection=void 0,0!==this.localTrackMap.size&&(Array.from(this.localTrackMap.entries()).forEach((e=>{var t;let[i,{track:n}]=e;switch(i){case hS.LocalVideoTrack:Di(t=n._hints).call(t,NT.LOW_STREAM)?n.close():this.pendingLocalTracks.push(n);break;case hS.LocalAudioTrack:n instanceof QA?this.pendingLocalTracks=this.pendingLocalTracks.concat(n.trackList):this.pendingLocalTracks.push(n);case hS.LocalVideoLowTrack:}})),this.emit(pS.MediaReconnectStart,this.store.uid)),this.unbindLocalTrackEvents(),this.localTrackMap.clear(),0!==this.remoteUserMap.size&&Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t,i]=e;Array.from(fh(i).call(i)).forEach((e=>{this.setPendingRemoteMedia(t,e)})),this.emit(pS.MediaReconnectStart,t.uid)})),this.unbindAllRemoteTrackEvents(),this.remoteUserMap.clear(),this.statsUploader.stopUploadUplinkStats(),this.statsUploader.stopUploadDownlinkStats(),this.statsUploader.stopUploadTransportStats(),$C.debug("[".concat(this.store.clientId,"] P2PChannel2 disconnected, waiting to reconnect.")))}hasPendingRemoteMedia(e,t){for(const i of this.pendingRemoteTracks){const{user:n,kind:r}=i;if((e instanceof CL?e.uid:e)===n.uid&&t===r)return!0}return!1}setPendingRemoteMedia(e,t){this.hasPendingRemoteMedia(e,t)||this.pendingRemoteTracks.push({user:e,kind:t})}async restartICE(e){let t;t=e.direction===Ew.SEND_ONLY?await this.sendMutex.lock("From P2PChannel.restartICE"):await this.recvMutex.lock("From P2PChannel.restartICE");try{const i=await e.restartICE(),n=await b_(this,pS.RequestP2PRestartICE,i);e.setDescription("local",n)}finally{t()}}getUplinkNetworkQuality(){if(!this.sendConnection)return 0;const e=this.sendConnection.getStats(),t=this.localTrackMap.get(hS.LocalVideoTrack),i=this.localTrackMap.get(hS.LocalAudioTrack),n=e.videoSend.find((e=>{var i;return e.ssrc===(null==t||null===(i=t.ssrcs)||void 0===i?void 0:i[0].ssrcId)})),r=e.audioSend.find((e=>{var t;return e.ssrc===(null==i||null===(t=i.ssrcs)||void 0===t?void 0:t[0].ssrcId)}));if(!n||!r)return 1;const s=y_(this,pS.NeedSignalRTT),o=n?n.rttMs:void 0,a=r?r.rttMs:void 0,c=o&&a?(o+a)/2:o||a,l=(c&&s?(c+s)/2:c||s)||0,d=100*e.sendPacketLossRate*.7/50+.3*l/1500,h=d<.17?1:d<.36?2:d<.59?3:d<.1?4:5,u=null==t?void 0:t.track;if(u&&u._encoderConfig&&-1===u._hints.indexOf(NT.SCREEN_TRACK)){const t=u._encoderConfig.bitrateMax,i=e.bitrate.actualEncoded;if(t&&i){const e=(1e3*t-i)/(1e3*t);return ow[e<.15?0:e<.3?1:e<.45?2:e<.6?3:4][h]}}return h}getDownlinkNetworkQuality(){if(!this.recvConnection)return 0;const e=this.recvConnection.getStats();let t=0;return Array.from(this.remoteUserMap.entries()).forEach((i=>{let[n]=i;const r=n._audioSSRC,s=n._videoSSRC,o=e.audioRecv.find((e=>e.ssrc===r)),a=e.videoRecv.find((e=>e.ssrc===s));if(!o&&!a)return void(t+=1);const c=y_(this,pS.NeedSignalRTT),l=e.rtt,d=(l&&c?(l+c)/2:l||c)||0,h=o?o.jitterMs:void 0,u=e.recvPacketLossRate;let p=.7*u*100/50+.3*d/1500;h&&(p=.6*u*100/50+.2*d/1500+.2*h/400),t+=p<.1?1:p<.17?2:p<.36?3:p<.59?4:5})),this.remoteUserMap.size>0?Math.round(t/this.remoteUserMap.size):t}async muteLocalTrack(e){return new nb(((t,i)=>{this.handleMuteLocalTrack(e,t,i)}))}filterTobePublishedTracks(e,t,i){const n=[],r=uA(),s=this.getAllTracks();e=A_(e=e.filter((e=>-1===s.indexOf(e))));let o=!1,a=!1;for(const s of e){if(s instanceof vR&&(this.localTrackMap.has(hS.LocalVideoTrack)||o?new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS).throw():(n.push({track:s,type:hS.LocalVideoTrack}),o=!0),t)){const e=this.getLowVideoTrack(s,i);n.push({track:e,type:hS.LocalVideoLowTrack})}if(s instanceof YA){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(e){if(!(e.track instanceof QA))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser does not support audio mixing");if(s._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio");e.track.addAudioTrack(s),this.bindLocalAudioTrackEvents(s,!0)}else if(a){const e=n.find((e=>{let{type:t}=e;return t===hS.LocalAudioTrack}));if(!(e.track instanceof QA))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser does not support audio mixing");if(s._bypassWebAudio)throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio");e.track.addAudioTrack(s)}else{if(!r.webAudioMediaStreamDest||s instanceof QA||s._bypassWebAudio)n.push({track:s,type:hS.LocalAudioTrack});else{const e=new QA;e.addAudioTrack(s),n.push({track:e,type:hS.LocalAudioTrack})}a=!0}}}return n}filterTobeUnpublishedTracks(e){const t=[],i=this.getAllTracks();e=A_(e=e.filter((e=>-1!==i.indexOf(e))));for(const i of e){if(i instanceof YA){const e=this.localTrackMap.get(hS.LocalAudioTrack);if(!e)continue;e.track instanceof QA?(e.track.removeAudioTrack(i),this.unbindLocalAudioTrackEvents(i),0===e.track.trackList.length&&(t.push([hS.LocalAudioTrack,e]),e.track.close())):t.push([hS.LocalAudioTrack,e])}if(i instanceof vR){const e=this.localTrackMap.get(hS.LocalVideoTrack);if(!e)continue;t.push([hS.LocalVideoTrack,e]);const i=this.localTrackMap.get(hS.LocalVideoLowTrack);i&&t.push([hS.LocalVideoLowTrack,i])}}return t}bindLocalTrackEvents(e){e.forEach((e=>{let{track:t,type:i}=e;switch(i){case hS.LocalVideoTrack:t.addListener(kT.GET_STATS,this.handleGetLocalVideoStats),t.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),t.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),t.addListener(kT.NEED_UPDATE_VIDEO_ENCODER,this.handleUpdateVideoEncoder),t.addListener(kT.SET_OPTIMIZATION_MODE,this.handleSetOptimizationMode),t.addListener(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),t.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),t.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack);break;case hS.LocalAudioTrack:this.bindLocalAudioTrackEvents(t);case hS.LocalVideoLowTrack:}}))}bindLocalAudioTrackEvents(e,t){e instanceof QA?e.trackList.forEach((e=>{e.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.addListener(kT.GET_STATS,this.handleGetLocalAudioStats),e.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack)})):(e.addListener(kT.GET_STATS,this.handleGetLocalAudioStats),e.addListener(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.addListener(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.addListener(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack),t||e.addListener(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack))}unbindLocalTrackEvents(e){e||(e=Array.from(this.localTrackMap.entries()).map((e=>{let[t,{track:i}]=e;return{track:i,type:t}}))),e.forEach((e=>{let{track:t,type:i}=e;switch(i){case hS.LocalVideoTrack:t.off(kT.GET_STATS,this.handleGetLocalVideoStats),t.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),t.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),t.off(kT.NEED_UPDATE_VIDEO_ENCODER,this.handleUpdateVideoEncoder),t.off(kT.SET_OPTIMIZATION_MODE,this.handleSetOptimizationMode),t.off(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),t.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),t.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack);break;case hS.LocalAudioTrack:this.unbindLocalAudioTrackEvents(t);case hS.LocalVideoLowTrack:}}))}unbindLocalAudioTrackEvents(e){e instanceof QA?e.trackList.forEach((e=>{e.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.off(kT.GET_STATS,this.handleGetLocalAudioStats),e.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack)})):(e.off(kT.GET_STATS,this.handleGetLocalAudioStats),e.off(kT.NEED_DISABLE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_ENABLE_TRACK,this.handleUnmuteLocalTrack),e.off(kT.NEED_REPLACE_TRACK,this.handleReplaceTrack),e.off(kT.NEED_MUTE_TRACK,this.handleMuteLocalTrack),e.off(kT.NEED_UNMUTE_TRACK,this.handleUnmuteLocalTrack))}bindRemoteTrackEvents(e,t){t instanceof TR&&t.addListener(kT.GET_STATS,(t=>{t(this.handleGetRemoteVideoStats(e))})),t instanceof AR&&t.addListener(kT.GET_STATS,(t=>{t(this.handleGetRemoteAudioStats(e))}))}unbindRemoteTrackEvents(e){e&&e.removeAllListeners(kT.GET_STATS)}unbindAllRemoteTrackEvents(){Array.from(this.remoteUserMap.entries()).forEach((e=>{let[t,i]=e;i.has(lS.AUDIO)&&this.unbindRemoteTrackEvents(t._audioTrack),i.has(lS.VIDEO)&&this.unbindRemoteTrackEvents(t._videoTrack)}))}createGatewayPublishMessage(e){return e.map((e=>{var t;let i,n,{track:r,type:s}=e;switch(s){case hS.LocalAudioTrack:i=Zw.Audio,n={dtx:r instanceof XA&&r._config.DTX,hq:!1,lq:!1,stereo:!1,speech:!1};break;case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High,n=CD(CD({},lN(r)),{},{codec:this.store.codec});break;case hS.LocalVideoLowTrack:i=Zw.Low,n=CD(CD({},lN(r)),{},{codec:this.store.codec})}return{kind:s===hS.LocalAudioTrack?lS.AUDIO:lS.VIDEO,stream_type:i,attributes:n,isMuted:r.muted||!r.enabled}}))}createGatewayUnpublishMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}assignLocalTracks(e){e.forEach((e=>{let{track:t,type:i}=e;this.localTrackMap.set(i,{track:t})}))}withdrawLocalTracks(e){e.forEach((e=>{let[t]=e;this.localTrackMap.delete(t)}))}bindConnectionEvents(e){e.onConnectionStateChange=async t=>{var i;if($C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onConnectionStateChange(").concat(t,")")),this.emit(pS.PeerConnectionStateChange,t),"connected"!==t||this.store.keyMetrics.peerConnectionEnd||this.store.peerConnectionEnd(),Di(i=this._restartStates).call(i,t)||e.direction===Ew.SEND_ONLY){if(this._restartTimer)return;const t=()=>{"disconnected"!==e.iceConnectionState&&"checking"!==e.iceConnectionState&&"failed"!==e.iceConnectionState||($C.debug("[".concat(this.store.clientId,"] [P2PChannel] start use restartICE")),"CONNECTED"===y_(this,pS.QueryClientConnectionState)&&this.restartICE(e))};this._restartTimer=window.setTimeout((()=>{t(),this._restartTimer=void 0}),800)}},e.onICEConnectionStateChange=e=>{"connected"!==e||this.store.keyMetrics.iceConnectionEnd||this.store.iceConnectionEnd(),$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onICEConnectionStateChange(").concat(e,")")),nw.reportApiInvoke(this.store.sessionId,{name:"ICEConnectionStateChange",options:e,tag:s_.TRACER}).onSuccess(),this.emit(pS.IceConnectionStateChange,e)},e.onICETransportStateChange=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onICETransportStateChange(").concat(e,")"))},e.onDTLSTransportStateChange=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onDTLSTransportStateChange(").concat(e,")"))},e.onDTLSTransportError=e=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.onDTLSTransportError(").concat(e,")"))},e.onFirstAudioDecoded=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._audioSSRC===e));var n;i&&(this.store.subscribe(i.uid,"audio",void 0,void 0,void 0,Date.now()),null===(n=i.audioTrack)||void 0===n||n.emit(UT.FIRST_FRAME_DECODED),nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_AUDIO_DECODE,YC.FIRST_AUDIO_DECODE,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId}))},e.onFirstAudioReceived=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._audioSSRC===e));i&&nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_AUDIO_RECEIVED,YC.FIRST_AUDIO_RECEIVED,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId})},e.onFirstVideoDecoded=(e,t,i)=>{this.reportVideoFirstFrameDecoded(e,t,i)},e.onFirstVideoReceived=e=>{var t;const i=Array.from(fh(t=this.remoteUserMap).call(t)).find((t=>t._videoSSRC===e));i&&nw.firstRemoteFrame(this.store.sessionId,qC.FIRST_VIDEO_RECEIVED,YC.FIRST_VIDEO_RECEIVED,{peer:i._uintid,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId})},e.onSelectedLocalCandidateChanged=(e,t)=>{const i="relay"===e.candidateType,n="relay"===t.candidateType;"unknown"!==t.candidateType&&i===n||this.emit(pS.ConnectionTypeChange,i),$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.SelectedLocalCandidateChanged(").concat(JSON.stringify(gN(t))," -> ").concat(JSON.stringify(gN(e)),")"))},e.onSelectedRemoteCandidateChanged=(e,t)=>{$C.info("[".concat(this.store.clientId,"] [p2pId: ").concat(this.store.p2pId,"]: P2PConnection.SelectedRemoteCandidateChanged(").concat(JSON.stringify(gN(t))," -> ").concat(JSON.stringify(gN(e)),")"))},e.onFirstVideoDecodedTimeout=e=>{this.reportVideoFirstFrameDecoded(e,void 0,void 0,!0)},e.onLocalCandidate=e=>{this.emit(pS.LocalCandidate,e)}}unbindConnectionEvents(e){e.onConnectionStateChange=void 0,e.onICEConnectionStateChange=void 0,e.onICETransportStateChange=void 0,e.onDTLSTransportStateChange=void 0,e.onDTLSTransportError=void 0,e.onFirstAudioDecoded=void 0,e.onFirstAudioReceived=void 0,e.onFirstVideoDecoded=void 0,e.onFirstVideoReceived=void 0,e.onSelectedLocalCandidateChanged=void 0,e.onSelectedRemoteCandidateChanged=void 0,e.onFirstVideoDecodedTimeout=void 0,e.onLocalCandidate=void 0}filterTobeMutedTracks(e){const t=[];if(-1===this.getAllTracks().indexOf(e))return t;const i=this.localTrackMap.get(hS.LocalAudioTrack);if(e instanceof YA&&(null==i?void 0:i.track)instanceof QA)return i.track.isActive||t.push([hS.LocalAudioTrack,i]),t;const n=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(n&&(t.push(n),n[0]===hS.LocalVideoTrack)){const e=this.localTrackMap.get(hS.LocalVideoLowTrack);e&&t.push([hS.LocalVideoLowTrack,e])}return t}filterTobeUnmutedTracks(e){const t=[],i=this.localTrackMap.get(hS.LocalAudioTrack);if(e instanceof YA&&(null==i?void 0:i.track)instanceof QA)return i.track.isActive&&t.push([hS.LocalAudioTrack,i]),t;const n=Array.from(this.localTrackMap.entries()).find((t=>{let[,{track:i}]=t;return e===i}));if(n)if(n[0]===hS.LocalVideoTrack){t.push(n);const e=this.localTrackMap.get(hS.LocalVideoLowTrack);e&&t.push([hS.LocalVideoLowTrack,e])}else t.push(n);return t}createMuteMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}createUnmuteMessage(e){return e.map((e=>{var t;let i,[n,{track:r,ssrcs:s,id:o}]=e;switch(n){case hS.LocalAudioTrack:i=Zw.Audio;break;case hS.LocalVideoTrack:i=Di(t=r._hints).call(t,NT.SCREEN_TRACK)?Zw.Screen:Zw.High;break;case hS.LocalVideoLowTrack:i=Zw.Low}return{stream_type:i,ssrcs:s,mid:o}}))}filterTobeUnSubscribedTracks(e,t){const i=[],n=this.remoteUserMap.get(e);if(!n)return i;if(t){const r=n.get(t);if(!r)return i;i.push([e,{kind:t,id:r}])}else Array.from(n.entries()).forEach((t=>{let[n,r]=t;i.push([e,{kind:n,id:r}])}));return i}createUnsubscribeMessage(e){const t=[];return e.forEach((e=>{let[i,{kind:n,id:r}]=e;switch(n){case lS.VIDEO:return void(i._videoSSRC&&t.push({stream_type:lS.VIDEO,ssrcId:i._videoSSRC}));case lS.AUDIO:return void(i._audioSSRC&&t.push({stream_type:lS.AUDIO,ssrcId:i._audioSSRC}))}})),t}withdrawRemoteTracks(e){e.forEach((e=>{let[t,{kind:i}]=e;const n=this.remoteUserMap.get(t);n&&(n.delete(i),0===Array.from(n.entries()).length&&this.remoteUserMap.delete(t))}))}async updateBitrateLimit(e){const t=this.localTrackMap.get(hS.LocalVideoTrack),i=this.localTrackMap.get(hS.LocalVideoLowTrack);t&&await t.track.setBitrateLimit(e.uplink),i&&e.low_stream_uplink&&await i.track.setBitrateLimit({max_bitrate:e.low_stream_uplink.bitrate,min_bitrate:e.low_stream_uplink.bitrate||0})}isP2PDisconnected(){if(this.sendConnection&&this.recvConnection){const e=this.sendConnection.peerConnectionState,t=this.recvConnection.peerConnectionState;return"connected"!==e&&"connected"!==t}return!0}async tryToUnmuteAudio(e){for(let t=0;t<e.length;t++)if(e[t]instanceof YA){const i=this.filterTobeUnmutedTracks(e[t]);if(0===i.length)continue;const n=this.createUnmuteMessage(i);return void await __(this,pS.RequestUnmuteLocal,n)}}bindStatsUploaderEvents(){this.statsUploader.requestStats=e=>this.getStats(e),this.statsUploader.requestLocalMedia=()=>Array.from(this.localTrackMap.entries()).filter((e=>{let[,{ssrcs:t}]=e;return!!t})),this.statsUploader.requestRemoteMedia=()=>Array.from(this.remoteUserMap.entries()),this.statsUploader.requestVideoIsReady=e=>{var t;return!(null===(t=this.recvConnection)||void 0===t||!t.getRemoteVideoIsReady(e))},this.statsUploader.requestUpload=(e,t)=>this.emit(pS.RequestUploadStats,e,t),this.statsUploader.requestAllTracks=()=>this.getAllTracks()}unbindStatsUploaderEvents(){this.statsUploader.requestStats=void 0,this.statsUploader.requestLocalMedia=void 0,this.statsUploader.requestRemoteMedia=void 0,this.statsUploader.requestVideoIsReady=void 0}async requestReconnect(){this.dtlsFailedCount+=1,await U_(X_(this.dtlsFailedCount,Y_)),this.emit(pS.RequestReconnect)}async reconnectP2P(){}canPublishLowStream(){return this.localTrackMap.has(hS.LocalVideoTrack)||this.pendingLocalTracks.some((e=>e instanceof vR))}throwIfTrackTypeNotMatch(e){if(e.filter((e=>e instanceof vR)).length>1)throw new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS);if(e.filter((e=>e instanceof YA)).length>1&&(e.some((e=>e instanceof YA&&e._bypassWebAudio))||!uA().webAudioMediaStreamDest))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser doesn't support MediaStreamDestNode");for(const t of e){if(t instanceof vR&&this.pendingLocalTracks.some((e=>e instanceof vR)))throw new Fb(Bb.CAN_NOT_PUBLISH_MULTIPLE_VIDEO_TRACKS);if(t instanceof YA&&this.pendingLocalTracks.some((e=>e instanceof YA))&&(!uA().webAudioMediaStreamDest||t._bypassWebAudio||this.pendingLocalTracks.some((e=>e instanceof YA&&e._bypassWebAudio))))throw new Fb(Bb.NOT_SUPPORTED,"cannot publish multiple tracks which one of them configured with bypassWebAudio or your browser doesn't support MediaStreamDestNode")}}getLowVideoTrack(e,t){const i=!xC("DISABLE_DUAL_STREAM_USE_ENCODING")&&uA().supportDualStreamEncoding,n=CD(CD({},{width:160,height:120,framerate:15,bitrate:50}),t);let r;r=i?e._mediaStreamTrack.clone():PM(e,n);const s=B_(8,"track-low-"),o=new vR(r,CD(CD({},i&&{scaleResolutionDownBy:pN(n,e)}),{},{frameRate:n.framerate,bitrateMax:n.bitrate,bitrateMin:n.bitrate}),void 0,void 0,s);return o.on(DT.TRANSCEIVER_UPDATED,(t=>{e._updateRtpTransceiver(t,LT.LOW_STREAM)})),o._hints.push(NT.LOW_STREAM),e.addListener(kT.NEED_CLOSE,(()=>{o.close()})),o}async globalLock(){return this.recvMutex.lock("From P2PChannel2.globalLock")}reportVideoFirstFrameDecoded(e,t,i,n){var r;const s=Array.from(fh(r=this.remoteUserMap).call(r)).find((t=>t._videoSSRC===e));if(s){n||this.store.subscribe(s.uid,"video",void 0,void 0,void 0,void 0,Date.now());const r=this.store.keyMetrics,o=r.subscribe.find((e=>e.userId===s.uid&&"video"===e.type));nw.firstRemoteVideoDecode(this.store.sessionId,qC.FIRST_VIDEO_DECODE,YC.FIRST_VIDEO_DECODE,{peer:s._uintid,videowidth:t,videoheight:i,subscribeElapse:eN.measureFromSubscribeStart(this.store.clientId,e),subscribeRequestid:e,p2pid:this.store.p2pId,apEnd:r.requestAPEnd||0,apStart:r.requestAPStart||0,joinGwEnd:r.joinGatewayEnd||0,joinGwStart:r.joinGatewayStart||0,pcEnd:r.peerConnectionEnd||0,pcStart:r.peerConnectionStart||0,subscriberEnd:(null==o?void 0:o.subscribeEnd)||0,subscriberStart:(null==o?void 0:o.subscribeStart)||0,videoAddNotify:(null==o?void 0:o.streamAdded)||0,state:n?1:0})}}async remoteMediaSsrcChanged(e,t,i){if(!this.recvConnection)return!1;const n=this.remoteUserMap.get(e);if(!n)return!1;const r=n.get(t);if(!r)return!1;const s=await this.recvConnection.getRemoteSSRC(r);return void 0!==s&&s!==i}resetConnection(e){$C.debug("[".concat(this.store.clientId,"] [P2PChannel2] reset connection to ").concat(e)),this.state===fS.Connected?($C.debug("[".concat(this.store.clientId,"] [P2PChannel2] fallback to websocket but P2PChannel2 state still connected, disconnect first")),this.disconnectForReconnect()):(this.sendConnection&&(this.sendConnection.close(),this.unbindConnectionEvents(this.sendConnection),this.sendConnection=void 0),this.recvConnection&&(this.recvConnection.close(),this.unbindConnectionEvents(this.recvConnection),this.recvConnection=void 0))}async publishDataChannel(e){throw new Fb(Bb.NOT_SUPPORTED)}async unpublishDataChannel(e){throw new Fb(Bb.NOT_SUPPORTED)}async subscribeDataChannel(e,t){throw new Fb(Bb.NOT_SUPPORTED)}async unsubscribeDataChannel(e,t){throw new Fb(Bb.NOT_SUPPORTED)}hasPendingRemoteDataChannel(e,t){throw new Fb(Bb.NOT_SUPPORTED)}setPendingRemoteDataChannel(e,t){throw new Fb(Bb.NOT_SUPPORTED)}async preConnect(e,t,i,n,r,s){throw new Fb(Bb.NOT_SUPPORTED)}getEstablishParams(){throw new Fb(Bb.NOT_SUPPORTED)}async reSubscribe(e){throw new Fb(Bb.NOT_SUPPORTED)}async updateVideoStreamParameter(e,t){throw new Fb(Bb.NOT_SUPPORTED)}unbindRtpTransceiver(){0!==this.localTrackMap.size&&Array.from(this.localTrackMap.entries()).forEach((e=>{let[t,{track:i}]=e;t===hS.LocalVideoLowTrack?i._updateRtpTransceiver(void 0,LT.LOW_STREAM):i._updateRtpTransceiver(void 0)}))}}function SD(e){return function(t,i,n){const r=t[i];if("function"!=typeof r)throw new Error("Cannot use mutex on object property.");return n.value=async function(){for(var t=arguments.length,n=new Array(t),s=0;s<t;s++)n[s]=arguments[s];switch(e){case yD.SEND_ONLY:{const e=await this.sendMutex.lock("From P2PChannel2.".concat(i));try{return await r.apply(this,n)}finally{e()}}case yD.RECEIVE_ONLY:{const e=await this.recvMutex.lock("From P2PChannel2.".concat(i));try{return await r.apply(this,n)}finally{e()}}default:{const e=await this.sendMutex.lock("From P2PChannel2.".concat(i)),t=await this.recvMutex.lock("From P2PChannel2.".concat(i));try{return await r.apply(this,n)}finally{e(),t()}}}},n}}function TD(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function AD(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?TD(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):TD(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}Mw([SD(),xw("design:type",Function),xw("design:paramtypes",[Object,String]),xw("design:returntype",nb)],wD.prototype,"startP2P",null),Mw([SD(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],wD.prototype,"p2pConnect",null),Mw([SD(yD.SEND_ONLY),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],wD.prototype,"dopublish",null),Mw([SD(yD.SEND_ONLY),xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],wD.prototype,"unpublish",null),Mw([SD(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],wD.prototype,"unpublishLowStream",null),Mw([SD(yD.SEND_ONLY),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],wD.prototype,"doUnpublish",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String,String,Number]),xw("design:returntype",nb)],wD.prototype,"subscribe",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String,String,Boolean]),xw("design:returntype",nb)],wD.prototype,"unsubscribe",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],wD.prototype,"muteRemote",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],wD.prototype,"unmuteRemote",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String]),xw("design:returntype",nb)],wD.prototype,"hasRemoteMediaWithLock",null),Mw([SD(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],wD.prototype,"disconnectForReconnect",null),Mw([SD(yD.RECEIVE_ONLY),xw("design:type",Function),xw("design:paramtypes",[CL,String,Number]),xw("design:returntype",nb)],wD.prototype,"remoteMediaSsrcChanged",null);const RD=Date.now(),OD=20,ID=new Map,kD=new Map;async function ND(e){const t=ID.get(e),i=Array.isArray(t)&&t[t.length-1],n=kD.get(e);if(!i)return void(n.isSyncing=!1);const r={uid:i.uid,payload:L_(i.payload)};0===n.firstRecvTs&&(n.firstRecvTs=i.recvTs,n.firstSendTs=i.sendTs);const s=i.sendTs-n.firstSendTs,o=s-(Date.now()-n.firstRecvTs);o>0&&(n.firstRecvTs=Date.now()-s);let a=i.mediaDelay+o;a<=0?(t.pop(),LD(i.context,r),a=0):a=Math.min(a,OD),setTimeout((()=>t.length&&ND(e)),a)}function LD(e,t){e.safeEmit(d_.STREAM_MESSAGE,t.uid,t.payload),e.onStreamMessage&&e.onStreamMessage(t)}function MD(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,i=arguments.length>2?arguments[2]:void 0;if(!e.syncWithAudio)return LD(i,{uid:e.uid,payload:L_(e.payload)});const n="".concat(i.id,"-").concat(e.uid),r=ID.get(n)||[],s=r.findIndex((t=>e.sendTs>=t.sendTs)),o=AD(AD({},e),{},{context:i,mediaDelay:t,recvTs:Date.now()});-1===s?r.push(o):r.splice(s,0,o),ID.set(n,r);let a=!1;var c;kD.has(n)?a=!(null===(c=kD.get(n))||void 0===c||!c.isSyncing):kD.set(n,{isSyncing:a,firstRecvTs:0,firstSendTs:0}),a||ND(n)}function xD(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function DD(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?xD(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):xD(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}G_.setLogger($C);class PD extends r_{get connectionState(){return this._gateway.state}get remoteUsers(){return this._users}get localTracks(){return this._p2pChannel.getAllTracks(!0)}get uid(){return this._uid}get channelName(){return this._channelName}get localDataChannels(){return this._p2pChannel.getAllDataChannels()}get mode(){return this._config.mode}get role(){var e;return(null===(e=this._config)||void 0===e?void 0:e.role)||"audience"}get codec(){return this._config.codec}get audioCodec(){return this._config.audioCodec||"opus"}get isStringUID(){return!!this._joinInfo&&!!this._joinInfo.stringUid}get __className__(){return"Client"}constructor(e){let t;if(super(),oh(this,"store",void 0),oh(this,"_uid",void 0),oh(this,"_channelName",void 0),oh(this,"_uintUid",void 0),oh(this,"_users",[]),oh(this,"_config",void 0),oh(this,"_clientId",void 0),oh(this,"_appId",void 0),oh(this,"_sessionId",null),oh(this,"_key",void 0),oh(this,"_joinInfo",void 0),oh(this,"_gateway",void 0),oh(this,"_statsCollector",void 0),oh(this,"_configDistribute",void 0),oh(this,"_leaveMutex",new G_("client-leave")),oh(this,"_publishMutex",new G_("client-publish")),oh(this,"_renewTokenMutex",new G_("client-renewtoken")),oh(this,"_subscribeMutex",new G_("client-subscribe")),oh(this,"_encryptionMode","none"),oh(this,"_encryptionSecret",null),oh(this,"_encryptionSalt",null),oh(this,"_proxyServer",void 0),oh(this,"_turnServer",{servers:[],mode:"auto"}),oh(this,"_cloudProxyServerMode","disabled"),oh(this,"_isDualStreamEnabled",!1),oh(this,"_defaultStreamFallbackType",void 0),oh(this,"_lowStreamParameter",void 0),oh(this,"_streamFallbackTypeCacheMap",new Map),oh(this,"_remoteStreamTypeCacheMap",new Map),oh(this,"_axiosCancelSource",gC.CancelToken.source()),oh(this,"_audioVolumeIndicationInterval",void 0),oh(this,"_networkQualityInterval",void 0),oh(this,"_userOfflineTimeout",void 0),oh(this,"_streamRemovedTimeout",void 0),oh(this,"_injectStreamingClient",void 0),oh(this,"_liveTranscodeStreamingClient",void 0),oh(this,"_liveRawStreamingClient",void 0),oh(this,"_channelMediaRelayClient",void 0),oh(this,"_networkQualitySensitivity","normal"),oh(this,"_p2pChannel",void 0),oh(this,"_useLocalAccessPoint",!1),oh(this,"_setLocalAPVersion",void 0),oh(this,"_joinAndNotLeaveYet",!1),oh(this,"_numberOfJoinCount",0),oh(this,"_remoteDefaultVideoStreamType",void 0),oh(this,"_inspect",void 0),oh(this,"_moderation",void 0),oh(this,"_license",void 0),oh(this,"_pendingPublishedUsers",[]),oh(this,"ntpAlignErrorCount",0),oh(this,"remoteInboundOffset",0),oh(this,"_handleLocalTrackEnable",((e,t,i)=>{this.publish(e,!1).then(t).catch(i)})),oh(this,"_handleLocalTrackDisable",((e,t,i)=>{this.unpublish(e).then(t).catch(i)})),oh(this,"_handleUserOnline",(e=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(e.uid,this.channelName))return void $C.debug("[".concat(e.uid,"] will be ignored in local"));this.isStringUID&&"string"!=typeof e.uid&&$C.error("[".concat(this._clientId,"] StringUID is Mixed with UintUID"));const t=this._users.find((t=>t.uid===e.uid));if(t)t._trust_in_room_=!0;else{const t=new CL(e.uid,e.uint_id||e.uid);this._users.push(t),$C.debug("[".concat(this._clientId,"] user online"),e.uid),this.safeEmit(d_.USER_JOINED,t)}})),oh(this,"_handleUserOffline",(e=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(e.uid,this.channelName))return;const t=this._users.find((t=>t.uid===e.uid));t&&(this._handleRemoveStream(e),this._handleRemoveDataChannels(e),T_(this._users,t),this._remoteStreamTypeCacheMap.delete(t.uid),this._streamFallbackTypeCacheMap.delete(t.uid),$C.debug("[".concat(this._clientId,"] user offline"),e.uid,"reason:",e.reason),this.safeEmit(d_.USER_LEAVED,t,e.reason))})),oh(this,"_handleAddAudioOrVideoStream",((e,t,i,n,r,s,o)=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(t,this.channelName))return;const a=this._users.find((e=>e.uid===t));if(!a)return void $C.error("[".concat(this._clientId,"] can not find target user!(on_add_stream)"));$C.debug("[".concat(this._clientId,"] stream added with uid ").concat(t,", type ").concat(e)),this.store.subscribe(a.uid,e,void 0,void 0,void 0,Date.now());const c="audio"===e?a.hasAudio:a.hasVideo;a._uintid||(a._uintid=r||t),"audio"===e?a._trust_audio_stream_added_state_=!0:a._trust_video_stream_added_state_=!0,"audio"===e?(a._audio_added_=!0,void 0!==i&&(a._audioSSRC=i),void 0!==n&&(a._cname=n),s&&(a._audioOrtc=s)):(a._video_added_=!0,void 0!==i&&(a._videoSSRC=i),void 0!==n&&(a._cname=n),void 0!==o&&(a._rtxSsrcId=o),s&&(a._videoOrtc=s)),("audio"===e?a.hasAudio:a.hasVideo)&&!c&&($C.info("[".concat(this._clientId,"] remote user ").concat(a.uid," published ").concat(e)),this.safeEmit(d_.USER_PUBLISHED,a,e)),"video"===e?nw.onGatewayStream(this._sessionId,qC.ON_ADD_VIDEO_STREAM,YC.ON_ADD_VIDEO_STREAM,{peer:r||t,ssrc:a._videoSSRC}):nw.onGatewayStream(this._sessionId,qC.ON_ADD_AUDIO_STREAM,YC.ON_ADD_AUDIO_STREAM,{peer:r||t,ssrc:a._audioSSRC}),this._p2pChannel.remoteMediaSsrcChanged(a,e,i).then((t=>{if(t&&($C.debug("[".concat(this._clientId,"] resubscribe ").concat(e," for user ").concat(a.uid," after rejoin because SSRC id changed.")),this._p2pChannel instanceof ox))return this._p2pChannel.unsubscribe(a,e,!0).then((()=>this._subscribe(a,e,!0).catch((e=>{$C.error("[".concat(this._clientId,"] resubscribe error"),e.toString())}))))})),this._p2pChannel.hasPendingRemoteMedia(a,e)&&($C.debug("[".concat(this._clientId,"] resubscribe ").concat(e," for user ").concat(a.uid," after reconnect.")),this._subscribe(a,e,!0).catch((e=>{$C.error("[".concat(this._clientId,"] resubscribe error"),e.toString())})))})),oh(this,"_handleRemoveStream",((e,t,i)=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(e.uid,this.channelName))return;const n=this._users.find((t=>t.uid===e.uid));if(!n)return void $C.warning("[".concat(this._clientId,"] can not find target user!(on_remove_stream)"));$C.debug("[".concat(this._clientId,"] stream removed with uid ").concat(e.uid));let r=()=>{};if(n.hasAudio&&n.hasVideo?r=()=>{$C.info("[".concat(this._clientId,"] remote user ").concat(n.uid," unpublished audio track")),this.safeEmit(d_.USER_UNPUBLISHED,n,"audio"),$C.info("[".concat(this._clientId,"] remote user ").concat(n.uid," unpublished video track")),this.safeEmit(d_.USER_UNPUBLISHED,n,"video")}:n.hasVideo?r=()=>{$C.info("[".concat(this._clientId,"] remote user ").concat(n.uid," unpublished video track")),this.safeEmit(d_.USER_UNPUBLISHED,n,"video")}:n.hasAudio&&(r=()=>{$C.info("[".concat(this._clientId,"] remote user ").concat(n.uid," unpublished audio track")),this.safeEmit(d_.USER_UNPUBLISHED,n,"audio")}),n._trust_audio_stream_added_state_=!0,n._trust_video_stream_added_state_=!0,n._audio_added_=!1,n._video_added_=!1,this._p2pChannel instanceof ox)this._p2pChannel.unsubscribe(n).then((e=>{if(e)return this._gateway.unsubscribe(e,n.uid)}));else if(t&&i)if(e.sdp){const{sdp:r}=e;this._p2pChannel.unsubscribe(n,r).then((e=>{e&&t(e)})).catch(i)}else t&&t();n._audioSSRC=void 0,n._videoSSRC=void 0,n._audioOrtc=void 0,n._videoOrtc=void 0,n._rtxSsrcId=void 0,nw.onGatewayStream(this._sessionId,qC.ON_REMOVE_STREAM,YC.ON_REMOVE_STREAM,{peer:e.uint_id||e.uid}),r()})),oh(this,"_handleSetStreamLocalEnable",((e,t,i)=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(t,this.channelName))return;const n=this._users.find((e=>e.uid===t));if(!n)return void $C.error("[".concat(this._clientId,"] can not find target user!(disable_local)"));$C.debug("[".concat(this._clientId,"] local ").concat(e," ").concat(i?"enabled":"disabled"," with uid ").concat(t));const r="audio"===e?n.hasAudio:n.hasVideo;if("audio"===e){n._trust_audio_enabled_state_=!0;const e=n._audio_enabled_;if(n._audio_enabled_=i,n._audio_enabled_===e)return;{const e=n._audio_enabled_?"enable-local-audio":"disable-local-audio";$C.debug("[".concat(this._clientId,"] user-info-updated, uid: ").concat(t,", msg: ").concat(e)),this.safeEmit(d_.USER_INFO_UPDATED,t,e)}}else{n._trust_video_enabled_state_=!0;const e=n._video_enabled_;if(n._video_enabled_=i,n._video_enabled_===e)return;{const e=n._video_enabled_?"enable-local-video":"disable-local-video";$C.debug("[".concat(this._clientId,"] user-info-update, uid: ").concat(t,", msg: ").concat(e)),this.safeEmit(d_.USER_INFO_UPDATED,t,e)}}const s="audio"===e?n.hasAudio:n.hasVideo;return r!==s?!r&&s?($C.info("[".concat(this._clientId,"] remote user ").concat(t," published ").concat(e)),void this.safeEmit(d_.USER_PUBLISHED,n,e)):("video"===e&&n._videoTrack&&n._videoTrack._destroy(),"audio"===e&&n._audioTrack,this._p2pChannel.muteRemote(n,e),$C.info("[".concat(this._clientId,"] remote user ").concat(t," unpublished ").concat(e)),void this.safeEmit(d_.USER_UNPUBLISHED,n,e)):void 0})),oh(this,"_handleMuteStream",((e,t,i,n,r,s)=>{if(xC("BLOCK_LOCAL_CLIENT")&&sw(e,this.channelName))return;$C.debug("[".concat(this._clientId,"] receive mute message"),e,t,i);const o=this._users.find((t=>t.uid===e));if(!o)return void $C.warning("[".concat(this._clientId,"] can not find remote user, ignore mute event, uid: ").concat(e));const a="audio"===t?o.hasAudio:o.hasVideo;if("audio"===t){o._trust_audio_mute_state_=!0;const t=o._audio_muted_;if(o._audio_muted_=i,o._audio_muted_===t)return;{const t=o._audio_muted_?"mute-audio":"unmute-audio";$C.debug("[".concat(this._clientId,"] user-info-update, uid: ").concat(e,", msg: ").concat(t)),this.safeEmit(d_.USER_INFO_UPDATED,e,t)}}else{o._trust_video_mute_state_=!0;const t=o._video_muted_;if(o._video_muted_=i,o._video_muted_===t)return;{const t=o._video_muted_?"mute-video":"unmute-video";$C.debug("[".concat(this._clientId,"] user-info-update, uid: ").concat(e,", msg: ").concat(t)),this.safeEmit(d_.USER_INFO_UPDATED,e,t)}}const c="audio"===t?o.hasAudio:o.hasVideo;if(a!==c){if(!a&&c)return this.store.useP2P||("audio"===t?o._audioSSRC:o._videoSSRC)?($C.info("[".concat(this._clientId,"] remote user ").concat(e," published ").concat(t)),void this.safeEmit(d_.USER_PUBLISHED,o,t)):void $C.warning("[".concat(this._clientId,"] remote user ").concat(e," receive ").concat(t," unmute message  before add stream message, ").concat(t," SSRC doesn't exist yet."));"video"===t&&o._videoTrack&&o._videoTrack._destroy(),"audio"===t&&o._audioTrack,r&&s&&this._p2pChannel instanceof wD&&(n?this._p2pChannel.unsubscribe(o,n,t).then((e=>{r(e)})).catch(s):r()),this._p2pChannel.muteRemote(o,t),$C.info("[".concat(this._clientId,"] remote user ").concat(e," unpublished ").concat(t)),this.safeEmit(d_.USER_UNPUBLISHED,o,t)}})),oh(this,"_handleP2PLost",(async e=>{$C.debug("[".concat(this._clientId,"] receive p2p lost"),e),parseInt(e.p2pid,10)===this.store.p2pId?await this._p2pChannel.requestReconnect():$C.warning("[".concat(this._clientId,"] P2PLost stream not found"),e)})),oh(this,"_handleTokenWillExpire",(()=>{$C.debug("[".concat(this._clientId,"] received message onTokenPrivilegeWillExpire")),this.safeEmit(d_.ON_TOKEN_PRIVILEGE_WILL_EXPIRE)})),oh(this,"_handleBeforeUnload",(e=>{"beforeunload"===e.type&&void 0!==e.returnValue&&""!==e.returnValue||(this.leave(),$C.info("[".concat(this._clientId,"] auto leave onbeforeunload or pagehide")))})),oh(this,"_handleUpdateNetworkQuality",(()=>{if("normal"===this._networkQualitySensitivity)return;if(navigator&&void 0!==navigator.onLine&&!navigator.onLine)return void this.safeEmit(d_.NETWORK_QUALITY,{downlinkNetworkQuality:6,uplinkNetworkQuality:6});const e={downlinkNetworkQuality:0,uplinkNetworkQuality:0};e.uplinkNetworkQuality=this._p2pChannel.getUplinkNetworkQuality(),e.downlinkNetworkQuality=this._p2pChannel.getDownlinkNetworkQuality(),this.safeEmit(d_.NETWORK_QUALITY,e)})),oh(this,"_handleP2PAddAudioOrVideoStream",((e,t)=>{const i=this._users.find((e=>e.uid===t));if(!i)return void $C.error("[".concat(this._clientId,"] can not find target user!(on_add_stream)"));$C.debug("[".concat(this._clientId,"] stream added with uid ").concat(t,", type ").concat(e)),this.store.subscribe(i.uid,e,void 0,void 0,void 0,Date.now());const n="audio"===e?i.hasAudio:i.hasVideo;"audio"===e?i._trust_audio_stream_added_state_=!0:i._trust_video_stream_added_state_=!0,"audio"===e?i._audio_added_=!0:i._video_added_=!0,("audio"===e?i.hasAudio:i.hasVideo)&&!n&&($C.info("[".concat(this._clientId,"] remote user ").concat(i.uid," published ").concat(e)),this.safeEmit(d_.USER_PUBLISHED,i,e)),this._p2pChannel.hasPendingRemoteMedia(i,e)&&($C.debug("[".concat(this._clientId,"] resubscribe ").concat(e," for user ").concat(i.uid," after reconnect.")),this._subscribe(i,e,!0).catch((e=>{$C.error("[".concat(this._clientId,"] resubscribe error"),e.toString())})))})),this._config=e,this._clientId=B_(5,"client-"),this.store=new OC(e.codec,e.audioCodec,e.mode,this._clientId),this.store.clientCreated(),e.proxyServer&&this.setProxyServer(e.proxyServer,!0),e.turnServer&&this.setTurnServer(e.turnServer,!0),$C.info("[".concat(this._clientId,"] Initializing AgoraRTC client v").concat(IC," build: ").concat(NC,", mode: ").concat(this.mode,", codec: ").concat(this.codec)),e.clientRoleOptions)try{v_(e.clientRoleOptions),t=Object.assign({},e.clientRoleOptions)}catch(e){$C.warning("[".concat(this._clientId,"] ").concat(e.toString()))}this._statsCollector=new rN(this.store),this._statsCollector.onStatsException=(e,t,i)=>{$C.debug("[".concat(this._clientId,"] receive exception msg, code: ").concat(e,", msg: ").concat(t,", uid: ").concat(i)),this.safeEmit(d_.EXCEPTION,{code:e,msg:t,uid:i})},this._statsCollector.onUploadPublishDuration=(e,t,i,n)=>{const r=this._users.find((t=>t.uid===e));r&&nw.peerPublishStatus(this._sessionId,{subscribeElapse:n,audioPublishDuration:t,videoPublishDuration:i,peer:r._uintid})},this.store.useDataChannel=uA().supportDataChannel&&xC("SIGNAL_CHANNEL"),this.store.useP2P=xC("P2P"),this._gateway=new RN(this.store,{clientId:this._clientId,mode:this.mode,codec:this.codec,websocketRetryConfig:e.websocketRetryConfig||Y_,httpRetryConfig:e.httpRetryConfig||Y_,forceWaitGatewayResponse:void 0===e.forceWaitGatewayResponse||e.forceWaitGatewayResponse,statsCollector:this._statsCollector,role:e.role,clientRoleOptions:t}),this._configDistribute=new uL,this.store.useP2P?(this._p2pChannel=new wD(this.store,this._statsCollector),this._handleP2PEvents()):this._p2pChannel=new ox(this.store,this._statsCollector),this._handleP2PChannelEvents(),this._handleGatewayEvents(),this._handleGatewaySignalEvents()}async joinMeta(e,t,i,n,r){let s=!(arguments.length>5&&void 0!==arguments[5])||arguments[5],o=arguments.length>6&&void 0!==arguments[6]&&arguments[6];MC("JOIN_GATEWAY_USE_443PORT_ONLY",s),MC("JOIN_GATEWAY_USE_DUAL_DOMAIN",o);const a=this._gateway.signal.websocket;return a instanceof GS&&(a.use443PortOnly=s,a.tryDoubleDomain=o),async function(e,t,i){ob.get(e)||ob.set(e,[]),ab.get(e)||ab.set(e,t),sb.get(e)||sb.set(e,0);const n=ob.get(e),r=ab.get(e);if(!n||!r)throw new Error("concurrent: deferQueue or maxConcurrency is null");if(sb.get(e)===r){const e=ib();n.push(e),await e.promise}sb.set(e,sb.get(e)+1);for(var s=arguments.length,o=new Array(s>3?s-3:0),a=3;a<s;a++)o[a-3]=arguments[a];const c=await i(...o);return sb.set(e,sb.get(e)-1),sb.get(e)===r-1&&n.length>0&&(n[0].resolve(),n.shift()),0===sb.get(e)&&(ob.set(e,[]),ab.set(e,0),sb.set(e,0)),c}("client.join",xC("JOIN_MAX_CONCURRENCY"),this.join.bind(this),e,t,i,n,r)}async join(e,t,i,n,r){const s=++this._numberOfJoinCount;this.store.joinStart(),n&&(this.store.uid=n);const o=wC(),a=SC()?window.isSecureContext:"Browser Not Support";if(!SC()&&!o||!window.isSecureContext){const e="The website must be running in a secure context (About secure context: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts ), otherwise the media collection will be restricted by the browser";$C.warning(e)}const c=F_();"DISCONNECTED"===this.connectionState&&(this.store.avoidJoinStart=Math.round(Date.now()),$C.debug("[".concat(this._clientId,"] set avoidJoinStart to ").concat(this.store.avoidJoinStart)));const l=nw.reportApiInvoke(c,{name:a_.JOIN,options:[e,t,i,n],states:{isHttps:o,isSecureContext:a},tag:s_.TRACER});nw.setAppId(e);try{if(!i&&null!==i)throw new Dw(Bb.INVALID_PARAMS,"Invalid token: ".concat(i,". If you don not use token, set it to null"));i&&zb(i,"token",1,2047),zb(e,"appid",1,2047),Pw(t),n&&Uw(n),r&&zb(r,"optionalInfo",1,2047)}catch(e){throw l.onError(e),e}if($C.info("[".concat(this._clientId,"] start join channel ").concat(t,", join number: ").concat(s)),this._leaveMutex.isLocked&&($C.debug("[".concat(this._clientId,"] join: waiting leave operation")),(await this._leaveMutex.lock())(),$C.debug("[".concat(this._clientId,"] join: continue"))),this._joinAndNotLeaveYet=!0,"DISCONNECTED"!==this.connectionState){const e=new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Client already in connecting/connected state"));throw l.onError(e),e}this._sessionId||(this._sessionId=c,this.store.sessionId=this._sessionId),this._gateway.state="CONNECTING";const d=DD({clientId:this._clientId,appId:e,sid:this._sessionId,cname:t,uid:"string"!=typeof n?n:null,turnServer:this._turnServer,proxyServer:this._proxyServer,token:i||e,cloudProxyServer:this._cloudProxyServerMode,optionalInfo:r,license:this._license,useLocalAccessPoint:this._useLocalAccessPoint},void 0!==this._remoteDefaultVideoStreamType&&{defaultVideoStream:this._remoteDefaultVideoStreamType});if(this._useLocalAccessPoint&&(d.setLocalAPVersion=this._setLocalAPVersion),"string"==typeof n&&(d.stringUid=n,this._uintUid?(d.uid=this._uintUid,this._uintUid=void 0):d.uid=0),"none"!==this._encryptionMode&&this._encryptionSecret){if(d.aesmode=this._encryptionMode,d.aespassword=await t_(this._encryptionSecret),!this._joinAndNotLeaveYet)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Client already left"));this._encryptionSalt&&(d.aessalt=this._encryptionSalt)}this._startSession(this._sessionId,{channel:t,appId:e});const h=this._sessionId;setTimeout((()=>{"CONNECTING"===this.connectionState&&h===this._sessionId&&nw.joinChannelTimeout(this._sessionId,5)}),5e3);try{var u;let n;const r=d.cloudProxyServer;if(Di(u=["proxy3","proxy4","proxy5"]).call(u,r)){const e=xC("PROXY_SERVER_TYPE3");Array.isArray(e)?d.proxyServer=e[0]:d.proxyServer=e}if(nw.setProxyServer(d.proxyServer),$C.setProxyServer(d.proxyServer),this.store.requestAPStart(),d.stringUid&&!d.uid){const e=await rL(d.stringUid,d,this._axiosCancelSource.token,this._config.httpRetryConfig||Y_,this.store);$C.debug("[".concat(this._clientId,"] getUserAccount Success ").concat(d.stringUid," => ").concat(e)),d.uid=e,n=await nL(d,this._axiosCancelSource.token,this._config.httpRetryConfig||Y_,!0,this.store)}else n=await nL(d,this._axiosCancelSource.token,this._config.httpRetryConfig||Y_,!0,this.store);if(!this._joinAndNotLeaveYet)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Client already left"));this.store.requestAPEnd(),setTimeout((()=>{this._configDistribute.startGetConfigDistribute(d,this._axiosCancelSource.token),this._configDistribute.on(sS.UPDATE_BITRATE_LIMIT,(e=>{this._p2pChannel.updateBitrateLimit(e)}))}),0),this._key=i||e;const s=n.gatewayInfo;this._joinInfo=DD(DD({},d),{},{cid:s.cid,uid:d.uid?d.uid:s.uid,vid:s.vid,apResponse:s.res,uni_lbs_ip:s.uni_lbs_ip,gatewayAddrs:s.gatewayAddrs});const o=await this._joinGateway();if(!this._joinAndNotLeaveYet)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Client already left"));l.onSuccess(o),this._appId=e,this._channelName=d.cname,this._uid=o,this.store.uid=o,setTimeout((()=>{this._networkQualityInterval&&window.clearInterval(this._networkQualityInterval),this._networkQualityInterval=window.setInterval(this._handleUpdateNetworkQuality,2e3),window.addEventListener(Eb()?"beforeunload":"pagehide",this._handleBeforeUnload)}),0);const a=d.stringUid?"string uid: ".concat(d.stringUid,",uid: ").concat(d.uid):"uid: ".concat(this._uid);return $C.info("[".concat(this._clientId,"] Joining channel success: channel: ").concat(t,",").concat(a)),setTimeout((()=>{$C.startUpload()}),5e3),this.store.joinEnd(),p=this,Di(aw).call(aw,p)||aw.push(p),o}catch(e){const t=Array.isArray(e)?e[0]:e;throw t&&t.code===Bb.OPERATION_ABORTED?$C.warning("[".concat(this._clientId,"] join number: ").concat(s,", Joining channel failed, rollback"),t):$C.error("[".concat(this._clientId,"] join number: ").concat(s,", Joining channel failed, rollback"),t),t.code!==Bb.OPERATION_ABORTED&&this._numberOfJoinCount===s&&(this._gateway.state="DISCONNECTED",this._reset()),l.onError(t),t}var p}_joinGateway(){if(!this._joinInfo||!this._key)throw new Dw(Bb.INVALID_OPERATION);return this._gateway.join(this._joinInfo,this._key,!("disabled"!==this._joinInfo.cloudProxyServer||this._joinInfo.proxyServer||!xC("JOIN_WITH_FALLBACK_SIGNAL_PROXY"))).then((e=>e)).catch((e=>{if(e.code===Bb.INIT_WEBSOCKET_TIMEOUT)return this._gateway.leave(!0,l_.FALLBACK),e;if(e.code===Bb.INIT_DATACHANNEL_TIMEOUT)return this._gateway.leave(!0,l_.FALLBACK),e;throw e})).then((e=>{if(e instanceof Dw){if(e.code===Bb.INIT_WEBSOCKET_TIMEOUT){if($C.info("[".concat(this._clientId,"] join timeout, fallback to proxy")),!this._joinInfo||!this._key)throw new Dw(Bb.INVALID_OPERATION);this._joinInfo.cloudProxyServer="fallback",this._cloudProxyServerMode="fallback",this.store.cloudProxyServerMode="fallback";const e=xC("PROXY_SERVER_TYPE3");if(Array.isArray(e))if(this._joinInfo.apUrl){const t=/^https?:\/\/(.+?)(\/.*)?$/.exec(this._joinInfo.apUrl)[1].split("."),i=t.slice(t.length-2).join(".");e.forEach((e=>{this._joinInfo&&Di(e).call(e,i)&&(this._joinInfo.proxyServer=e)})),this._joinInfo.proxyServer||(this._joinInfo.proxyServer=e[0])}else this._joinInfo.proxyServer=e[0];else this._joinInfo.proxyServer=e;const t=xC("LOG_UPLOAD_SERVER").match(/.+:(\d{1,5})$/);return t&&t[1]&&"443"!==t[1]&&$C.setProxyServer(this._joinInfo.proxyServer),"443"!==xC("STATS_COLLECTOR_PORT").toString()&&nw.setProxyServer(this._joinInfo.proxyServer),nw.reportApiInvoke(this._sessionId,{name:a_.JOIN_FALLBACK_TO_PROXY,options:[this._joinInfo.proxyServer],tag:s_.TRACER}).onSuccess(),this.safeEmit(d_.JOIN_FALLBACK_TO_PROXY,this._joinInfo.proxyServer),xC("JOIN_WITH_FALLBACK_MEDIA_PROXY_FORCE")&&this._joinInfo.turnServer.servers.forEach((e=>{"forceturn"in e&&(e.forceturn=!0)})),this._gateway.join(this._joinInfo,this._key)}if($C.info("[".concat(this._clientId,"] join by datachannel timeout, fallback to websocket")),!this._joinInfo||!this._key)throw new Dw(Bb.INVALID_OPERATION);return nw.reportApiInvoke(this._sessionId,{name:a_.DATACHANNEL_FAILBACK,options:[this.store.clientId],tag:s_.TRACER}).onSuccess(),this._joinGateway()}return e})).then((e=>e))}async leave(){$C.info("[".concat(this._clientId,"] Leaving channel")),window.removeEventListener(Eb()?"beforeunload":"pagehide",this._handleBeforeUnload),this._reset(),function(e){const t=aw.indexOf(e);-1!==t&&aw.splice(t,1)}(this);const e=await this._leaveMutex.lock();if("DISCONNECTED"===this.connectionState)return $C.info("[".concat(this._clientId,"] Leaving channel repeated, success")),void e();await this._gateway.leave("CONNECTED"!==this.connectionState),$C.info("[".concat(this._clientId,"] Leaving channel success")),this._joinAndNotLeaveYet=!1,this.store.resetJoinChannelServiceRecords(),e()}async publish(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!Array.isArray(e)){if(!(e instanceof JT))return this._publishDataChannel(e);e=[e]}if(0===e.length)throw new Dw(Bb.INVALID_PARAMS,"param list is empty");const i=e;if("audience"===this._gateway.role)throw new Dw(Bb.INVALID_OPERATION,"audience can not publish stream");for(const e of i){if(!(e instanceof JT))throw new Dw(Bb.INVALID_PARAMS,"parameter is not local track");if(!e._enabled&&t)throw new Dw(Bb.TRACK_IS_DISABLED,"can not publish a disabled track: ".concat(e.getTrackId()))}$C.info("[".concat(this._clientId,"] Publishing tracks, id ").concat(i.map((e=>"".concat(e.getTrackId()," ")))));const n=await this._publishMutex.lock();await this._configDistribute.awaitConfigDistributeComplete(),t&&i.forEach((e=>{const t=this._configDistribute.getBitrateLimit();e instanceof vR&&t&&e.setBitrateLimit(t.uplink)}));try{await this._publishHighStream(i),$C.info("[".concat(this._clientId,"] Publish success, id ").concat(i.map((e=>"".concat(e.getTrackId()," ")))))}catch(e){throw $C.error("[".concat(this._clientId,"] publish error"),e.toString()),e}finally{n()}}async _publishDataChannel(e){Hb(e.id,"id",0,65535,!0),Vb(e.ordered,"ordered"),zb(e.metadata,"metadata",0,512),$C.info("[".concat(this._clientId,"] Publishing datachannels, id ").concat(e.id));const t=await this._publishMutex.lock();try{if(-1!==this._p2pChannel.getAllDataChannels().findIndex((t=>t.id===e.id)))throw new Dw(Bb.INVALID_PARAMS,"Invalid id: ".concat(e.id,". If you want to republish the datachannel, unpublish first"));if(!this._joinInfo||void 0===this._uid)throw new Dw(Bb.INVALID_OPERATION,"Can't publish datachannel, haven't joined yet!");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"can not publish datachannel in ".concat(this.connectionState," state"));if("auto"===this._turnServer.mode&&xC("FORCE_TURN")&&!xC("TURN_ENABLE_TCP")&&!xC("TURN_ENABLE_UDP"))throw new Dw(Bb.UNEXPECTED_ERROR,"force TURN With No TURN Configuration");const i=new Zk(e);await this._p2pChannel.publishDataChannel([i]);try{const t={streamId:e.id,ordered:e.ordered,maxRetransmits:xC("DATASTREAM_MAX_RETRANSMITS"),metadata:e.metadata,channelId:i._originDataChannelId};await this._gateway.publishDataChannel(this._uid,t,!0)}catch(e){if(e.code!==Bb.DISCONNECT_P2P)throw e}return await i._waitTillOpen(),$C.info("[".concat(this._clientId,"] Publish dataChannels success, id ").concat(i.id)),i}catch(e){throw $C.error("[".concat(this._clientId,"] publish datachannels error"),e.toString()),e}finally{t()}}async unpublish(e){if(!this._joinInfo||void 0===this._uid)throw new Dw(Bb.INVALID_OPERATION,"Can't unpublish stream, haven't joined yet!");let t=[];if(e)if(Array.isArray(e))t=e;else{if(!(e instanceof JT))return this._unpublishDataChannel([e]);t=[e]}else this.store.useP2P||await this._unpublishDataChannel(),t=this._p2pChannel.getAllTracks(!0);$C.info("[".concat(this._clientId,"] Unpublish tracks, tracks ").concat(t.map((e=>"".concat(e.getTrackId()," ")))," "));const i=await this._publishMutex.lock();try{if(this._p2pChannel instanceof wD){const e=await this._p2pChannel.unpublish(t);if(e){const t=await this._gateway.sendExtensionMessage(AS.UNPUBLISH,e);t&&await this._p2pChannel.setDescription("local",t)}}else{const e=await this._p2pChannel.unpublish(t);e&&await this._gateway.unpublish(e,this._uid),$C.info("[".concat(this._clientId,"] Unpublish success,tracks ").concat(t.map((e=>"".concat(e.getTrackId())))))}}catch(e){throw $C.error("[".concat(this._clientId,"] unpublish error"),e.toString()),e}finally{i&&i()}}async _unpublishDataChannel(e){void 0!==e&&0!==e.length||(e=this._p2pChannel.getAllDataChannels()),$C.info("[".concat(this._clientId,"] Unpublish datachannels, datachannels ").concat(e.map((e=>"".concat(e.id," ")))," "));const t=await this._publishMutex.lock();try{const i=await this._p2pChannel.unpublishDataChannel(e);i&&await this._gateway.unpublishDataChannel(i),$C.info("[".concat(this._clientId,"] Unpublish dataChannel success,dataChannel ").concat(e.map((e=>"".concat(e.id)))))}catch(e){throw $C.error("[".concat(this._clientId,"] unpublish dataChannel error"),e.toString()),e}finally{t&&t()}}async subscribe(e,t,i){return"datachannel"===t?this._subscribeDataChannel(e,i):this._subscribe(e,t)}async _subscribeDataChannel(e,t){var i;if(Hb(t,"channelId",0,65535,!0),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe datachannel, not joined");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe datachannel in ".concat(this.connectionState," state"));if(!this._users.find((t=>t===e)))throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", this user is not in the channel")),new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");if(!e.hasAudio&&!e.hasVideo&&0===e._dataChannels.length)throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", user is not published")),new Dw(Bb.INVALID_REMOTE_USER,"user is not published");const n=null===(i=e._dataChannels)||void 0===i?void 0:i.find((e=>e.id===t));if(!n)throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid," with mediaType datachannel, remote datachannel is not published")),new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);const r=await this._subscribeMutex.lock();$C.info("[".concat(this._clientId,"] subscribe user ").concat(e.uid,", mediaType: datachannel"));try{const o=await this._p2pChannel.subscribeDataChannel(e,[n]);if(o&&Di(o).call(o,n.id))try{var s;if(!n._originDataChannelId)throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid," with mediaType datachannel, cannot get RTCDatachannel")),new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);const t={id:n.id,datachannelId:n._originDataChannelId,ordered:n.ordered,maxRetransmits:n.maxRetransmits,metadata:null!==(s=n.metadata)&&void 0!==s?s:""};await this._gateway.subscribeDataChannel(e.uid,t,!0)}catch(t){if((null==t?void 0:t.code)!==Bb.WS_ABORT)throw await this._p2pChannel.unsubscribeDataChannel(e,[n]),t;await this._p2pChannel.unsubscribeDataChannel(e,[n]),this._p2pChannel.setPendingRemoteDataChannel(e,n.id)}return await n._waitTillOpen(),$C.info("[".concat(this._clientId,"] subscribe success user ").concat(e.uid,", mediaType: datachannel")),n}finally{r()}}async _p2pSubscribe(e,t,i){if(jb(t,"mediaType",["audio","video"]),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream, not joined");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream in ".concat(this.connectionState," state"));if(!this._users.find((t=>t===e))){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", this user is not in the channel")),t}if(!e.hasAudio&&!e.hasVideo){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not published");throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", user is not published")),t}if(!i&&("audio"===t&&!e.hasAudio||"video"===t&&!e.hasVideo)){const i=new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid," with mediaType ").concat(t,", remote track is not published")),i}const n=await this._subscribeMutex.lock();$C.info("[".concat(this._clientId,"] subscribe user ").concat(e.uid,", mediaType: ").concat(t));const r="audio"===t?hS.LocalAudioTrack:this._joinInfo.defaultVideoStream===MT.LOW_STREAM?hS.LocalVideoLowTrack:hS.LocalVideoTrack;try{await this._p2pChannel.hasRemoteMediaWithLock(e,t)?await this._p2pChannel.unmuteRemote(e,t):(this.store.subscribe(e.uid,t,Date.now()),this._p2pChannel instanceof wD&&await this._gateway.sendExtensionMessage(AS.SUBSCRIBE,{trackType:r})),$C.info("[".concat(this._clientId,"] subscribe success user ").concat(e.uid,", mediaType: ").concat(t)),this._defaultStreamFallbackType&&this.setStreamFallbackOption(e.uid,this._defaultStreamFallbackType).catch((e=>{$C.warning("[".concat(this._clientId,"] auto set fallback failed"),e)}));const i="audio"===t?e._audioTrack:e._videoTrack;if(!i)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find remote track in user object");return i}catch(t){throw $C.error("[".concat(this._clientId,"] subscribe user ").concat(e.uid," error"),t),t}finally{n()}}async _subscribe(e,t,i){if(this._p2pChannel instanceof wD)return this._p2pSubscribe(e,t);if(jb(t,"mediaType",["audio","video"]),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream, not joined");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream in ".concat(this.connectionState," state"));if(!this._users.find((t=>t===e))){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", this user is not in the channel")),t}if(!e.hasAudio&&!e.hasVideo){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not published");throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid,", user is not published")),t}if(!(i||("audio"!==t||e.hasAudio&&void 0!==e._audioSSRC)&&("video"!==t||e.hasVideo&&void 0!==e._videoSSRC))){const i=new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);throw $C.error("[".concat(this._clientId,"] can not subscribe ").concat(e.uid," with mediaType ").concat(t,", remote track is not published")),i}let n="audio"===t?e._audioSSRC:e._videoSSRC,r="audio"===t?e._audioOrtc:e._videoOrtc,s="video"===t?e._rtxSsrcId:void 0,o={stream_type:"audio"===t?lS.AUDIO:lS.VIDEO,ssrcId:n};const a=await this._subscribeMutex.lock();$C.info("[".concat(this._clientId,"] subscribe user ").concat(e.uid,", mediaType: ").concat(t));try{if(await this._p2pChannel.hasRemoteMediaWithLock(e,t))await this._p2pChannel.unmuteRemote(e,t);else try{const i="audio"===t?e._audioSSRC:e._videoSSRC;void 0!==i&&i!==n&&(n=i,r="audio"===t?e._audioOrtc:e._videoOrtc,s="video"===t?e._rtxSsrcId:void 0,o={stream_type:"audio"===t?lS.AUDIO:lS.VIDEO,ssrcId:n}),eN.markSubscribeStart(this.store.clientId,n),this.store.subscribe(e.uid,t,Date.now()),await this._p2pChannel.subscribe(e,t,n,s,r);try{await this._gateway.subscribe(e.uid,o,!0)}catch(i){if((null==i?void 0:i.code)!==Bb.WS_ABORT)throw await this._p2pChannel.unsubscribe(e,t),i;await this._p2pChannel.unsubscribe(e,t,!0),this._p2pChannel.setPendingRemoteMedia(e,t)}this.store.subscribe(e.uid,t,void 0,Date.now()),this._p2pChannel.reportSubscribeEvent(!0,null,e,t)}catch(i){throw this._p2pChannel.reportSubscribeEvent(!1,null==i?void 0:i.code,e,t),i}$C.info("[".concat(this._clientId,"] subscribe success user ").concat(e.uid,", mediaType: ").concat(t)),this._defaultStreamFallbackType&&this.setStreamFallbackOption(e.uid,this._defaultStreamFallbackType).catch((e=>{$C.warning("[".concat(this._clientId,"] auto set fallback failed"),e)}));const i="audio"===t?e._audioTrack:e._videoTrack;if(!i)throw new Dw(Bb.UNEXPECTED_ERROR,"can not find remote track in user object");return i}catch(t){throw $C.error("[".concat(this._clientId,"] subscribe user ").concat(e.uid," error"),t),t}finally{a()}}async massSubscribe(e){if(Wb(e,"subscribeList"),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream, not joined");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Can't subscribe stream in ".concat(this.connectionState," state"));const t=Date.now(),i=new Map,n=await this._subscribeMutex.lock();$C.info("[".concat(this._clientId,"]start massSubscribe user ").concat(e.map((e=>{let{user:t,mediaType:i}=e;return"user: ".concat(null==t?void 0:t.uid,", mediaType: ").concat(i)})).join("; ")));const r=(e=[...e]).map((e=>{let{user:t,mediaType:i}=e;return{user:t,mediaType:i}})),s=await this._p2pChannel.globalLock();try{var o;for(let t=e.length-1;t>=0;t--){const n=e[t],{user:s,mediaType:o}=n;if(jb(o,"mediaType",["audio","video"]),!s){const e=new Dw(Bb.INVALID_PARAMS,"user property does not exist in subscribeList item");throw $C.error("[".concat(this._clientId,"] user property does not exist in subscribeList item")),e}if(!this._users.find((e=>e===s))){const i=new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");$C.error("[".concat(this._clientId,"] can not massSubscribe ").concat(s.uid,", this user is not in the channel")),r[t].error=i,e.splice(t,1);continue}if("audio"===o&&(!s.hasAudio||void 0===s._audioSSRC)||"video"===o&&(!s.hasVideo||void 0===s._videoSSRC)){const i=new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);$C.error("[".concat(this._clientId,"] can not subscribe ").concat(s.uid," with mediaType ").concat(o,", remote user is not published")),r[t].error=i,e.splice(t,1);continue}const a=eS.Video|eS.LwoVideo,c=i.get(s);if(c){if("video"===o?c&a:c&eS.Audio){e.splice(t,1),$C.warning("[".concat(this._clientId,"] repeat massSubscribe user:").concat(s.uid,", mediaType:").concat(o," twice"));continue}i.set(s,c|("video"===o?a:eS.Audio))}else i.set(s,"video"===o?a:eS.Audio)}for(let t=e.length-1;t>=0;t--){const n=e[t],{user:r,mediaType:s}=n,o=eS.Video|eS.LwoVideo;if(this._p2pChannel.hasRemoteMedia(r,s)){await this._p2pChannel.unmuteRemoteNoLock(r,s);const n=i.get(r);i.set(r,"video"===s?n^o:n^eS.Audio),e.splice(t,1)}}this.store.massSubscribe(e.map((e=>({userId:e.user.uid,type:e.mediaType}))),t);const a=ly(o=Array.from(i.entries())).call(o,((e,t)=>{let[i,n]=t;if(0===n)return e;const r={stream_id:i.uid,stream_type:n};return n&eS.Audio&&(r.audio_ssrc=i._audioSSRC),n&eS.Video&&(r.video_ssrc=i._videoSSRC),e.push(r),e}),[]);try{e.length>0&&await this._p2pChannel.massSubscribeNoLock(e.map((e=>{let{user:t,mediaType:i}=e;return{user:t,mediaType:i,ssrcId:i===lS.VIDEO?t._videoSSRC:t._audioSSRC,rtxSsrcId:i===lS.VIDEO?t._rtxSsrcId:void 0}})));const i=new Map;if(a.length>0){const e=await this._gateway.subscribeAll(a,!0);((null==e?void 0:e.users)||[]).forEach((e=>{let{stream_id:t,video_error_code:n,audio_error_code:r,error_code:s}=e;(n||r||s)&&i.set(t,{video_error_code:n,audio_error_code:r,error_code:s})}))}if(Array.from(i.entries()).length>0){const e=Array.from(i.entries()).map((e=>{let t,[i,n]=e;return n.error_code||n.video_error_code&&n.audio_error_code?t=void 0:n.video_error_code?t=lS.VIDEO:n.audio_error_code&&(t=lS.AUDIO),{user:this.remoteUsers.find((e=>e.uid===i)),mediaType:t}}));await this._p2pChannel.massUnsubscribeNoLock(e)}for(const e of r){const t=i.get(e.user.uid);if(t){const i=t.error_code||"audio"===e.mediaType&&t.audio_error_code||"video"===e.mediaType&&t.video_error_code;if(i){const t=xS(i);$C.error("user:".concat(e.user.uid," mediaType:").concat(e.mediaType," has massSubscribe error ").concat(t.desc)),e.error=new Dw(Bb.SUBSCRIBE_FAILED,"code ".concat(i,": ").concat(t.desc))}}e.error||("video"===e.mediaType?e.track=e.user.videoTrack:e.track=e.user.audioTrack)}return this.store.massSubscribe(r.filter((e=>!e.error)).map((e=>({userId:e.user.uid,type:e.mediaType}))),void 0,Date.now()),r.forEach((e=>{var i;nw.subscribe(this.store.sessionId,{succ:!!e.error,ec:(null===(i=e.error)||void 0===i?void 0:i.code)||null,video:e.mediaType===lS.VIDEO,audio:e.mediaType===lS.AUDIO,peerid:e.user.uid,subscribeRequestid:e.mediaType===lS.VIDEO?e.user._videoSSRC:e.user._audioSSRC,p2pid:this.store.p2pId,eventElapse:Math.floor(performance.now()-t)},!0)})),$C.info("[".concat(this._clientId,"] massSubscribe success ").concat(e.map((e=>{let{user:t,mediaType:i}=e;return"user: ".concat(null==t?void 0:t.uid,", mediaType: ").concat(i)})).join("; "))),r}catch(t){throw await this._p2pChannel.massUnsubscribeNoLock(e),t}}finally{s(),n()}}async unsubscribe(e,t,i){if(t||this.store.useP2P){if("datachannel"===t)return this._unsubscribeDataChannel(e,i)}else await this._unsubscribeDataChannel(e,i);if(t&&jb(t,"mediaType",["audio","video"]),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't unsubscribe stream, haven't joined yet!");if(!this._users.find((t=>t===e))){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");throw $C.error("[".concat(this._clientId,"] can not unsubscribe ").concat(e.uid,", user is not in the channel")),t}$C.info("[".concat(this._clientId,"] unsubscribe uid: ").concat(e.uid,", mediaType: ").concat(t));const n=await this._subscribeMutex.lock();try{if(this._p2pChannel instanceof wD)await this._gateway.sendExtensionMessage(AS.UNSUBSCRIBE,{mediaType:t});else{const i=await this._p2pChannel.unsubscribe(e,t);i&&await this._gateway.unsubscribe(i,e.uid),$C.info("[".concat(this._clientId,"] unsubscribe success uid: ").concat(e.uid,", mediaType: ").concat(t))}}catch(t){if(t.code===Bb.DISCONNECT_P2P)return void $C.warning("disconnecting p2p, abort unsubscribe request.");throw $C.error("[".concat(this._clientId,"] unsubscribe user ").concat(e.uid," error"),t.toString()),t}finally{n()}}async _unsubscribeDataChannel(e,t){if(t&&Hb(t,"id",0,65535,!0),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't unsubscribe datachannel, haven't joined yet!");if(!this._users.find((t=>t===e))){const t=new Dw(Bb.INVALID_REMOTE_USER,"user is not in the channel");throw $C.error("[".concat(this._clientId,"] can not unsubscribe ").concat(e.uid,", user is not in the channel")),t}let i;if("number"==typeof t){const n=e._dataChannels.find((e=>e.id===t));n&&(i=[n])}else i=e._dataChannels;if(void 0===i){const i=new Dw(Bb.REMOTE_USER_IS_NOT_PUBLISHED);throw $C.error("[".concat(this._clientId,"] can not unsubscribe ").concat(e.uid," with channelId ").concat(t,", remote datachannel is not published")),i}$C.info("[".concat(this._clientId,"] unsubscribe uid: ").concat(e.uid,", mediaType: datachannel, ids: ").concat(i.map((e=>e.id))));try{const t=await this._p2pChannel.unsubscribeDataChannel(e,i);t&&await this._gateway.unsubscribeDataChannel(t,e.uid),$C.info("[".concat(this._clientId,"] unsubscribe datachannel success uid: ").concat(e.uid,", mediaType: datachannel, ids: ").concat(t))}catch(t){if(t.code===Bb.DISCONNECT_P2P)return void $C.warning("disconnecting p2p, abort unsubscribe request.");throw $C.error("[".concat(this._clientId,"] unsubscribe user ").concat(e.uid," error"),t.toString()),t}}async massUnsubscribe(e){if(Wb(e,"unsubscribeList"),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't unsubscribeAll stream, haven't joined yet!");$C.info("[".concat(this._clientId,"] start massUnsubscribe ").concat(e.map((e=>{let{user:t,mediaType:i}=e;return"user: ".concat(null==t?void 0:t.uid,", mediaType: ").concat(i,";")})).join())),e=[...e];const t=new Map;for(let i=e.length-1;i>=0;i--){const{user:n,mediaType:r}=e[i];if(!n){const e=new Dw(Bb.INVALID_PARAMS,"user property does not exist in unsubscribeList item");throw $C.error("[".concat(this._clientId,"] user property does not exist in unsubscribeList item")),e}if(jb(r,"mediaType",["video","audio",void 0]),!this._users.find((e=>e===n))){$C.warning("[".concat(this._clientId,"] can not unsubscribe ").concat(n.uid,", user is not in the channel")),e.splice(i,1);continue}const s=eS.Video|eS.LwoVideo;if(t.has(n)){const o=t.get(n);let a;switch(r){case"video":a=o&s;break;case"audio":a=o&eS.Audio;break;default:a=o&(eS.Audio|s)}if(a){$C.warning("[".concat(this._clientId,"] repeat massUnsubscribe user:").concat(n.uid,",mediaType:").concat(r," twice.")),e.splice(i,1);continue}r?"audio"===r?t.set(n,o|eS.Audio):"video"===r&&t.set(n,o|s):t.set(n,o|eS.Audio|s)}else r?"audio"===r?t.set(n,eS.Audio):"video"===r&&t.set(n,s):t.set(n,eS.Audio|s)}try{const t=await this._p2pChannel.massUnsubscribe(e);t&&await this._gateway.massUnsubscribe(t),$C.info("[".concat(this._clientId,"] massUnsubscribe success ").concat(e.map((e=>{let{user:t,mediaType:i}=e;return"user: ".concat(null==t?void 0:t.uid,", mediaType: ").concat(i,";")})).join()))}catch(e){if(e.code===Bb.DISCONNECT_P2P)return void $C.warning("[".concat(this._clientId,"] disconnecting p2p, abort unsubscribe request."));throw $C.error("[".concat(this._clientId,"] massUnsubscribe error"),e.toString()),e}}async setLowStreamParameter(e){!function(e){if(!e)throw new Fb(Bb.INVALID_PARAMS);Kb(e.width)||$b(e.width,"streamParameter.width"),Kb(e.height)||$b(e.height,"streamParameter.height"),Kb(e.framerate)||$b(e.framerate,"streamParameter.framerate"),Kb(e.bitrate)||Hb(e.bitrate,"streamParameter.bitrate")}(e),(!e.width&&e.height||e.width&&!e.height)&&$C.warning("[".concat(this._clientId,"] The width and height parameters take effect only when both are set")),$C.info("[".concat(this._clientId,"] set low stream parameter to"),JSON.stringify(e));const t=this._configDistribute.getLowStreamConfigDistribute();if(t&&t.bitrate&&e.bitrate&&t.bitrate<e.bitrate&&(e.bitrate=t.bitrate),this._lowStreamParameter=e,this._isDualStreamEnabled)return this._p2pChannel.updateVideoStreamParameter(e,hS.LocalVideoLowTrack)}async enableDualStream(){if(!uA().supportDualStream)throw nw.streamSwitch(this._sessionId,{lts:Date.now(),isdual:!0,succ:!1}),new Dw(Bb.NOT_SUPPORTED,"Your browser is not support dual stream");if(this._isDualStreamEnabled)throw new Dw(Bb.INVALID_OPERATION,"Dual stream is already enabled");if(this._p2pChannel.canPublishLowStream())try{await this._publishLowStream()}catch(e){throw nw.streamSwitch(this._sessionId,{lts:Date.now(),isdual:!0,succ:!1}),e}this._isDualStreamEnabled=!0,nw.streamSwitch(this._sessionId,{lts:Date.now(),isdual:!0,succ:!0}),$C.info("[".concat(this._clientId,"] enable dual stream"))}async disableDualStream(){if(this._isDualStreamEnabled){if(!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't publish stream, haven't joined yet!");if(this._p2pChannel.getLocalMedia(hS.LocalVideoLowTrack))try{const e=await this._p2pChannel.unpublishLowStream();e&&await this._gateway.unpublish(e,this._joinInfo.stringUid||this._joinInfo.uid)}catch(e){throw nw.streamSwitch(this._sessionId,{lts:Date.now(),isdual:!1,succ:!1}),e}this._isDualStreamEnabled=!1,nw.streamSwitch(this._sessionId,{lts:Date.now(),isdual:!1,succ:!0}),$C.info("[".concat(this._clientId,"] disable dual stream"))}}async setClientRole(e,t){if(function(e){jb(e,"role",["audience","host"])}(e),t&&v_(t),"rtc"===this.mode)throw $C.warning("[".concat(this._clientId,"]rtc mode can not use setClientRole")),new Dw(Bb.INVALID_OPERATION,"rtc mode can not use setClientRole");if(t&&t.level&&"host"===e)throw new Dw(Bb.INVALID_OPERATION,"host mode can not set audience latency level");if("audience"===e&&this._p2pChannel.hasLocalMedia())throw new Dw(Bb.INVALID_OPERATION,"can not set client role to audience when publishing stream");await this._gateway.setClientRole(e,t),this._config.role=e,$C.info("[".concat(this._clientId,"] set client role to ").concat(e,", level: ").concat(t&&t.level))}getRemoteInboundOffset(){var e;const t=null===(e=this._p2pChannel.getStats())||void 0===e?void 0:e.audioSend[0];if(!t||!t.timestamp)return 0;const i=t.timestamp-Date.now();return Math.abs(i)>1e3+t.rttMs+100?this.ntpAlignErrorCount+=1:this.ntpAlignErrorCount=0,this.ntpAlignErrorCount>=3?i:0}getNtpWallTimeInMs(){return"visible"===document.visibilityState&&(this.remoteInboundOffset=this.getRemoteInboundOffset()),this.remoteInboundOffset+Date.now()+this._gateway.ntpOffset}setProxyServer(e,t){if(zb(e,"proxyServer"),!t){if("DISCONNECTED"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Set proxy server before join channel");if("disabled"!==this._cloudProxyServerMode||this._useLocalAccessPoint)throw new Dw(Bb.INVALID_OPERATION,"You have already set the proxy")}this._proxyServer=e,nw.setProxyServer(this._proxyServer),$C.setProxyServer(this._proxyServer),$C.info("[".concat(this._clientId,"] Set proxy server ").concat(t?"by initialize call":""," success."))}setTurnServer(e,t){if(Array.isArray(e)||(e=[e]),!t){if("DISCONNECTED"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Set turn server before join channel");if("disabled"!==this._cloudProxyServerMode||this._useLocalAccessPoint)throw new Dw(Bb.INVALID_OPERATION,"You have already set the proxy")}if(g_(e))return this._turnServer={servers:e,mode:"original-manual"},void $C.info("[".concat(this._clientId,"] Set original turnserver ").concat(t?"by initialize call":""," success: ").concat(e.map((e=>e.urls)).join(","),"."));e.forEach((e=>m_(e))),this._turnServer={servers:e,mode:"manual"},$C.info("[".concat(this._clientId,"] Set turnserver ").concat(t?"by initialize call":""," success."))}setLicense(e){if("DISCONNECTED"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"you should set license before join channel");if(zb(e,"license",32,32),!/^[A-Za-z\d]+$/.test(e))throw new Dw(Bb.INVALID_PARAMS,"license should only contains characters from A-Z a-z 0-9");this._license=e,$C.info("[".concat(this._clientId,"] set license success"),e)}startProxyServer(e){if("DISCONNECTED"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Start proxy server before join channel");if(this._proxyServer||"manual"===this._turnServer.mode||this._useLocalAccessPoint)throw new Dw(Bb.INVALID_OPERATION,"You have already set the proxy");const t=[3,4,5];let i;switch(void 0===e&&(e=3),e){case 1:case 2:throw new Dw(Bb.NOT_SUPPORTED,"proxy mode 1/2 has been deprecated and not supported.");case 3:i="proxy3";break;case 4:i="proxy4";break;case 5:i="proxy5";break;default:throw new Dw(Bb.INVALID_PARAMS,"proxy server mode must be ".concat(t.join("|")))}this._cloudProxyServerMode=i,this.store.cloudProxyServerMode=i,$C.info("[".concat(this._clientId,"] set cloud proxy server mode to"),this._cloudProxyServerMode)}stopProxyServer(){if("DISCONNECTED"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Stop proxy server after leave channel");nw.setProxyServer(),$C.setProxyServer(),this._cloudProxyServerMode="disabled",this.store.cloudProxyServerMode="disabled",$C.info("[".concat(this._clientId,"] set cloud proxy server mode to"),this._cloudProxyServerMode),this._proxyServer=void 0,this._turnServer={mode:"auto",servers:[]}}setLocalAccessPointsV2(e){if(!e.accessPoints)throw new Dw(Bb.INVALID_PARAMS,"accessPoints is required.");Wb(e.accessPoints.serverList,"accessPoints.serverList"),zb(e.accessPoints.domain,"accessPoints.domain");const t=(e,t)=>{Hb(e,t,0,65535,!0)};let i=443;if(e.accessPoints.port&&(t(e.accessPoints.port,"accessPoints.port"),i=e.accessPoints.port),this._proxyServer||"disabled"!==this._cloudProxyServerMode)throw new Dw(Bb.INVALID_OPERATION,"set local access point failed, You have already set the cloud proxy");xC("CLOSE_AFB_FOR_LOCAL_AP")&&(MC("JOIN_WITH_FALLBACK_SIGNAL_PROXY",!1),MC("JOIN_WITH_FALLBACK_MEDIA_PROXY",!1));const n=/^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/,r=e.accessPoints.domain,s=e.accessPoints.serverList.map((e=>n.test(e)?"".concat(e.replace(/\./g,"-"),".").concat(r):e)),o=s.map((e=>"".concat(e,":").concat(i)));this._useLocalAccessPoint=!0,this._setLocalAPVersion=2,MC("WEBCS_DOMAIN",o),MC("WEBCS_DOMAIN_BACKUP_LIST",o),MC("GATEWAY_DOMAINS",[r]),e.report&&e.report.hostname&&Array.isArray(e.report.hostname)&&e.report.hostname.length?(Wb(e.report.hostname,"report.hostname"),MC("EVENT_REPORT_DOMAIN",e.report.hostname[0]),MC("EVENT_REPORT_BACKUP_DOMAIN",e.report.hostname[1]||e.report.hostname[0])):(MC("EVENT_REPORT_DOMAIN",s[0]),MC("EVENT_REPORT_BACKUP_DOMAIN",s[1]||s[0]));let a=6443;e.report&&e.report.port&&(t(e.report.port,"report.port"),a=e.report.port),MC("STATS_COLLECTOR_PORT",a),e.report?MC("ENABLE_EVENT_REPORT",!0):MC("ENABLE_EVENT_REPORT",!1);let c="";e.log&&e.log.hostname&&Array.isArray(e.log.hostname)&&e.log.hostname.length?(Wb(e.log.hostname,"log.hostname"),c=e.log.hostname[0]):c=s[0];let l=6444;e.log&&e.log.port&&(t(e.log.port,"log.port"),l=e.log.port),MC("LOG_UPLOAD_SERVER","".concat(c,":").concat(l));let d=[];e.cds&&e.cds.hostname&&Array.isArray(e.cds.hostname)&&e.cds.hostname.length?(Wb(e.cds.hostname,"cds.hostname"),d=e.cds.hostname):d=s;let h=443;e.cds&&e.cds.port&&(t(e.cds.port,"cds.port"),h=e.cds.port),MC("CDS_AP",d.map((e=>"".concat(e,":").concat(h)))),e.cds?MC("ENABLE_CONFIG_DISTRIBUTE",!0):MC("ENABLE_CONFIG_DISTRIBUTE",!1),$C.info("set local access point v2 success")}setLocalAccessPoints(e,t){if(Wb(e,"serverList"),zb(t,"domain"),this._proxyServer||"disabled"!==this._cloudProxyServerMode)throw new Dw(Bb.INVALID_OPERATION,"set local access point failed, You have already set the cloud proxy");const i=/^(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$/;e=e.map((e=>i.test(e)?"".concat(e.replace(/\./g,"-"),".").concat(t):e)),this._useLocalAccessPoint=!0,this._setLocalAPVersion=1,MC("WEBCS_DOMAIN",e),MC("WEBCS_DOMAIN_BACKUP_LIST",e),MC("GATEWAY_DOMAINS",[t]),MC("EVENT_REPORT_DOMAIN",e[0]),MC("EVENT_REPORT_BACKUP_DOMAIN",e[1]||e[0]),MC("LOG_UPLOAD_SERVER","".concat(e[0],":6444")),$C.info("[".concat(this._clientId,"] set local access point success"))}async setRemoteDefaultVideoStreamType(e){if(jb(e,"streamType",[0,1]),this._remoteDefaultVideoStreamType=e,this._joinInfo)try{await this._gateway.setDefaultRemoteVideoStreamType(e),this._joinInfo.defaultVideoStream=this._remoteDefaultVideoStreamType}catch(e){throw $C.error("[".concat(this._clientId,"] set default remote video stream type error"),e.toString()),e}else $C.debug("[".concat(this._clientId,"] haven't joined yet, cache remoteDefaultVideoStreamType ").concat(e))}async setRemoteVideoStreamType(e,t){jb(t,"streamType",[0,1]);try{await this._gateway.setRemoteVideoStreamType(e,t),setTimeout((()=>{const t=this._users.find((t=>t.uid===e));t&&t.videoTrack&&t.videoTrack.updateMediaStreamTrackResolution()}),2e3)}catch(e){throw $C.error("[".concat(this._clientId,"] set remote video stream type error"),e.toString()),e}$C.info("[".concat(this._clientId,"] set remote ").concat(e," video stream type to ").concat(t)),this._remoteStreamTypeCacheMap.set(e,t)}async setStreamFallbackOption(e,t){jb(t,"fallbackType",[0,1,2]);try{await this._gateway.setStreamFallbackOption(e,t)}catch(e){throw $C.error("[".concat(this._clientId,"] set stream fallback option"),e.toString()),e}$C.info("[".concat(this._clientId,"] set remote ").concat(e," stream fallback type to ").concat(t)),this._streamFallbackTypeCacheMap.set(e,t)}setEncryptionConfig(e,t,i){!function(e){jb(e,"encryptionMode",["aes-128-xts","aes-256-xts","aes-128-ecb","sm4-128-ecb","aes-128-gcm","aes-256-gcm","aes-128-gcm2","aes-256-gcm2","none"])}(e),zb(t,"secret");const n=["aes-128-gcm2","aes-256-gcm2"];if(Di(n).call(n,e)){if(!i||!(i instanceof Uint8Array&&32===i.length))throw new Dw(Bb.INVALID_PARAMS,"salt must be an Uint8Array and exactly equal to 32 bytes")}else if(i)throw new Dw(Bb.INVALID_PARAMS,"current encrypt mode does not need salt");new RegExp("^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[!@#$%^&*,.<>?/:;'\"|{}\\[\\]])(?=.{8,})").test(t)||$C.warning("The secret is not strong:\n      The secret must contain at least 1 lowercase alphabetical character,\n      The secret must contain at least 1 uppercase alphabetical character,\n      The secret must contain at least 1 numeric character,\n      The secret must contain at least one special character,\n      The secret must be eight characters or longer.\n      "),this._encryptionMode=e,this._encryptionSecret=t,i&&(this._encryptionSalt=M_(i))}async renewToken(e){if(zb(e,"token",1,2047),!this._key||!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"renewToken should not be called before user join");const t=this._key;this._key=e,this._joinInfo&&(this._joinInfo.token=e);const i=await this._renewTokenMutex.lock();try{if(xC("USE_NEW_TOKEN")){$C.debug("[".concat(this._clientId,"] start renew token with ticket from unilbs"));const t=await cL(this._joinInfo,this._axiosCancelSource.token,this._config.httpRetryConfig||Y_);$C.debug("[".concat(this._clientId,"] get ticket from unilbs success")),await this._gateway.renewToken({token:e,ticket:t})}else $C.debug("[".concat(this._clientId,"] start renew token without ticket")),await this._gateway.renewToken({token:e});$C.debug("[".concat(this._clientId,"] renewToken success"))}catch(e){throw this._key=t,this._joinInfo.token=t,$C.error("[".concat(this._clientId,"] renewToken failed"),e.toString()),e}finally{i()}}enableAudioVolumeIndicator(){this._audioVolumeIndicationInterval?$C.warning("you have already enabled audio volume indicator!"):this._audioVolumeIndicationInterval=window.setInterval((()=>{const e=this._p2pChannel.getAudioLevels();this.safeEmit(d_.VOLUME_INDICATOR,e)}),xC("AUDIO_VOLUME_INDICATION_INTERVAL")||2e3)}getRTCStats(){const e=this._statsCollector.getRTCStats(),t=this._gateway.getInChannelInfo();return e.Duration=Math.round(t.duration/1e3),e}async startLiveStreaming(e,t){if(!t){if("h264"!==this.codec)throw new Dw(Bb.LIVE_STREAMING_INVALID_RAW_STREAM,"raw streaming is only support h264");if(!this._p2pChannel.hasLocalMedia())throw new Dw(Bb.LIVE_STREAMING_INVALID_RAW_STREAM,"can not find stream to raw streaming")}if(this._liveRawStreamingClient&&this._liveRawStreamingClient.hasUrl(e)||this._liveTranscodeStreamingClient&&this._liveTranscodeStreamingClient.hasUrl(e))throw new Dw(Bb.LIVE_STREAMING_TASK_CONFLICT);const i=t?ww.TRANSCODE:ww.RAW;return this._createLiveStreamingClient(i).startLiveStreamingTask(e,i)}setLiveTranscoding(e){return this._createLiveStreamingClient(ww.TRANSCODE).setTranscodingConfig(e)}async stopLiveStreaming(e){const t=[this._liveRawStreamingClient,this._liveTranscodeStreamingClient].filter((t=>t&&t.hasUrl(e)));if(!t.length)throw new Dw(Bb.INVALID_PARAMS,"can not find live streaming url to stop");await nb.all(t.map((t=>t&&t.stopLiveStreamingTask(e))))}async addInjectStreamUrl(e,t){if(!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"can not addInjectStreamUrl, no joininfo");const i=this._createLiveStreamingClient(ww.INJECT);i.setInjectStreamConfig(t,0),await i.startLiveStreamingTask(e,ww.INJECT)}async removeInjectStreamUrl(){var e;const t=this._createLiveStreamingClient(ww.INJECT),i=Array.from(Lw(e=t.streamingTasks).call(e)).find((e=>e.mode===ww.INJECT));if(!this._joinInfo||!i)throw new Dw(Bb.INVALID_OPERATION,"can remove addInjectStreamUrl, no joininfo or inject task");await t.stopLiveStreamingTask(i.url)}async startChannelMediaRelay(e){_L(e);const t=this._createChannelMediaRelayClient();await t.startChannelMediaRelay(e)}async updateChannelMediaRelay(e){_L(e);const t=this._createChannelMediaRelayClient();await t.updateChannelMediaRelay(e)}async stopChannelMediaRelay(){const e=this._createChannelMediaRelayClient();await e.stopChannelMediaRelay(),this._statsCollector.onStatsChanged&&(this._statsCollector.onStatsChanged=void 0)}sendStreamMessage(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"can not send data stream, not joined");if(("string"==typeof e||e instanceof Uint8Array)&&(e={payload:e}),"string"==typeof e.payload){const t=new TextEncoder;e.payload=t.encode(e.payload)}if(new Blob([e.payload]).size>1024)throw new Dw(Bb.INVALID_PARAMS,"stream message out of range.");return this._gateway.signal.request(vw.DATA_STREAM,{payload:M_(e.payload),syncWithAudio:e.syncWithAudio,sendTs:Date.now()-RD},!t)}sendMetadata(e){if(!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"can not send metadata, not joined");if(new Blob([e]).size>1024)throw new Dw(Bb.METADATA_OUT_OF_RANGE);return this._gateway.signal.request(vw.SEND_METADATA,{session_id:this._joinInfo.sid,metadata:M_(e)})}async sendCustomReportMessage(e){if(Array.isArray(e)||(e=[e]),e.forEach(KC),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"can not send custom report, not joined");await nw.sendCustomReportMessage(this._joinInfo.sid,e)}getLocalAudioStats(){return this._statsCollector.getLocalAudioTrackStats()}getRemoteAudioStats(){return this._statsCollector.getRemoteAudioTrackStats()}getLocalVideoStats(){return this._statsCollector.getLocalVideoTrackStats()}getRemoteVideoStats(){return this._statsCollector.getRemoteVideoTrackStats()}getRemoteNetworkQuality(){return this._statsCollector.getRemoteNetworkQualityStats()}async pickSVCLayer(e,t){jb(t.spatialLayer,"spatialLayer",[0,1,2,3]),jb(t.temporalLayer,"temporalLayer",[0,1,2,3]);try{await this._gateway.pickSVCLayer(e,t)}catch(e){throw $C.error("[".concat(this._clientId,"] pick SVC layer failed"),e.toString()),e}}setRTM2Flag(e){if(jb(e,"flag",[0,1]),!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"Can't setRtm2Flag, not joined");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"Can't setRtm2Flag in ".concat(this.connectionState," state"));return this._gateway.setRTM2Flag(e)}_reset(){if($C.debug("[".concat(this._clientId,"] reset client")),this._axiosCancelSource.cancel(),this._axiosCancelSource=gC.CancelToken.source(),this._streamFallbackTypeCacheMap=new Map,this._remoteStreamTypeCacheMap=new Map,this._configDistribute.stopGetConfigDistribute(),this._joinInfo=void 0,this._proxyServer=void 0,this._defaultStreamFallbackType=void 0,this._sessionId=null,this.store.sessionId=null,this._statsCollector.reset(),this._key=void 0,this._appId=void 0,this._uid=void 0,this.store.uid=void 0,this._channelName=void 0,this._encryptionMode="none",this._encryptionSecret=null,this._encryptionSalt=null,this._pendingPublishedUsers=[],this._users.forEach((e=>{e._audioTrack&&e._audioTrack._destroy(),e._videoTrack&&e._videoTrack._destroy(),e._dataChannels&&(e._dataChannels.forEach((e=>e._close())),e._dataChannels.length=0)})),this._users=[],this._audioVolumeIndicationInterval&&(window.clearInterval(this._audioVolumeIndicationInterval),this._audioVolumeIndicationInterval=void 0),"fallback"===this._cloudProxyServerMode&&(this._cloudProxyServerMode="disabled",this.store.cloudProxyServerMode="disabled"),this._p2pChannel.reset(),this._publishMutex=new G_("client-publish"),this._subscribeMutex=new G_("client-subscribe"),this._networkQualityInterval&&(window.clearInterval(this._networkQualityInterval),this._networkQualityInterval=void 0),this._injectStreamingClient&&(this._injectStreamingClient.terminate(),this._injectStreamingClient.removeAllListeners(),this._injectStreamingClient=void 0),this._liveRawStreamingClient&&(this._liveRawStreamingClient.terminate(),this._liveRawStreamingClient.removeAllListeners(),this._liveRawStreamingClient=void 0),this._liveTranscodeStreamingClient&&(this._liveTranscodeStreamingClient.terminate(),this._liveTranscodeStreamingClient.removeAllListeners(),this._liveTranscodeStreamingClient=void 0),this._channelMediaRelayClient&&(this._channelMediaRelayClient.dispose(),this._channelMediaRelayClient=void 0),this._inspect)try{this._inspect.close(),this._inspect=void 0}catch(e){}if(this._moderation)try{this.setImageModeration(!1)}catch(e){}}_startSession(e,t){const i=e||F_();e?$C.debug("[".concat(this._clientId,"] new Session ").concat(i)):$C.debug("[".concat(this._clientId,"] renewSession ").concat(this._sessionId," => ").concat(i)),this._sessionId=i,this.store.sessionId=i,t?nw.sessionInit(this._sessionId,{lts:(new Date).getTime(),cname:t.channel,appid:t.appId,mode:this.mode}):this._joinInfo?nw.sessionInit(this._sessionId,{lts:(new Date).getTime(),cname:this._joinInfo.cname,appid:this._joinInfo.appId,mode:this.mode}):this._gateway.joinInfo&&nw.sessionInit(this._sessionId,{lts:(new Date).getTime(),cname:this._gateway.joinInfo.cname,appid:this._gateway.joinInfo.appId,mode:this.mode}),this._joinInfo&&(this._joinInfo.sid=i),this._gateway.joinInfo&&(this._gateway.joinInfo.sid=i)}async _publishHighStream(e){if(!this._joinInfo||void 0===this._uid)throw new Dw(Bb.INVALID_OPERATION,"Can't publish stream, haven't joined yet!");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"can not publish stream in ".concat(this.connectionState," state"));if("auto"===this._turnServer.mode&&xC("FORCE_TURN")&&!xC("TURN_ENABLE_TCP")&&!xC("TURN_ENABLE_UDP"))throw new Dw(Bb.UNEXPECTED_ERROR,"force TURN With No TURN Configuration");$C.debug("[".concat(this._clientId,"] publish high stream"));try{if(this._p2pChannel instanceof wD){const n=await this._p2pChannel.publish(e,this._isDualStreamEnabled,this._lowStreamParameter);if(n)try{await this._gateway.sendExtensionMessage(AS.PUBLISH,n)}catch(t){throw this._p2pChannel.unpublish(e),t}}else{const i=await this._p2pChannel.publish(e,this._isDualStreamEnabled,this._lowStreamParameter),n=(await i.next()).value;if(n){var t;let r;try{r=await this._gateway.publish(this._uid,n,!0)}catch(e){if(e.code!==Bb.DISCONNECT_P2P)throw i.throw(e),e}await i.next((null===(t=r)||void 0===t?void 0:t.ortc)||[])}this._p2pChannel.reportPublishEvent(!0,null);for(const t of e)t instanceof vR&&t._encoderConfig&&this._gateway.setVideoProfile(t._encoderConfig),!t.muted&&t.enabled||await this._p2pChannel.muteLocalTrack(t)}}catch(t){if(this._p2pChannel.reportPublishEvent(!1,null==t?void 0:t.code,e),(null==t?void 0:t.code)===Bb.WS_ABORT)return;throw t}}async _publishLowStream(){if(!this._joinInfo||void 0===this._uid)throw new Dw(Bb.INVALID_OPERATION,"Can't publish stream, haven't joined yet!");if("CONNECTED"!==this.connectionState&&"RECONNECTING"!==this.connectionState)throw new Dw(Bb.INVALID_OPERATION,"can not publish stream in ".concat(this.connectionState," state"));$C.debug("[".concat(this._clientId,"] publish low stream"));const e=this._configDistribute.getLowStreamConfigDistribute();e&&e.bitrate&&(this._lowStreamParameter||(this._lowStreamParameter={width:160,height:120,framerate:15,bitrate:50}),this._lowStreamParameter&&this._lowStreamParameter.bitrate&&e.bitrate<this._lowStreamParameter.bitrate&&(this._lowStreamParameter.bitrate=e.bitrate));try{const e=await this._p2pChannel.publishLowStream(this._lowStreamParameter),i=(await e.next()).value;if(i){var t;let n;try{n=await this._gateway.publish(this._uid,i,!0)}catch(t){if(t.code!==Bb.DISCONNECT_P2P)throw e.throw(t),t}e.next((null===(t=n)||void 0===t?void 0:t.ortc)||[]),this._p2pChannel.reportPublishEvent(!0,null,void 0,!0)}}catch(e){if(this._p2pChannel.reportPublishEvent(!1,null==e?void 0:e.code,void 0,!0),(null==e?void 0:e.code)===Bb.WS_ABORT)return;throw e}}_createLiveStreamingClient(e){if(!this._joinInfo||!this._appId)return new Dw(Bb.INVALID_OPERATION,"can not create live streaming client, please join channel first").throw();const t=()=>new vL(this._joinInfo,this._config.websocketRetryConfig||Y_,this._config.httpRetryConfig||Y_),i=e=>{e.onLiveStreamError=(e,t)=>{nw.reportApiInvoke(this._sessionId,{name:a_.ON_LIVE_STREAM_ERROR,options:[e,t],tag:s_.TRACER}).onSuccess(),this.safeEmit(d_.LIVE_STREAMING_ERROR,e,t)},e.onLiveStreamWarning=(e,t)=>{nw.reportApiInvoke(this._sessionId,{name:a_.ON_LIVE_STREAM_WARNING,options:[e,t],tag:s_.TRACER}).onSuccess(),this.safeEmit(d_.LIVE_STREAMING_WARNING,e,t)},e.on(zw.REQUEST_WORKER_MANAGER_LIST,((e,t,i)=>{if(!this._joinInfo)return i(new Dw(Bb.INVALID_OPERATION,"can not find join info to get worker manager"));aL(e,this._joinInfo,this._axiosCancelSource.token,Y_).then(t).catch(i)}))};switch(e){case ww.RAW:return this._liveRawStreamingClient||(this._liveRawStreamingClient=t(),i(this._liveRawStreamingClient)),this._liveRawStreamingClient;case ww.TRANSCODE:return this._liveTranscodeStreamingClient||(this._liveTranscodeStreamingClient=t(),i(this._liveTranscodeStreamingClient)),this._liveTranscodeStreamingClient;case ww.INJECT:return this._injectStreamingClient||(this._injectStreamingClient=t(),this._injectStreamingClient.on(zw.REQUEST_WORKER_MANAGER_LIST,((e,t,i)=>{if(!this._joinInfo)return i(new Dw(Bb.INVALID_OPERATION,"can not find join info to get worker manager"));aL(e,this._joinInfo,this._axiosCancelSource.token,Y_).then(t).catch(i)})),this._injectStreamingClient.onInjectStatusChange=(e,t,i)=>{this.safeEmit(d_.INJECT_STREAM_STATUS,e,t,i)}),this._injectStreamingClient}}_createChannelMediaRelayClient(){if(!this._joinInfo)return new Dw(Bb.INVALID_OPERATION,"can not create channel media relay client, please join channel first").throw();if(!this._channelMediaRelayClient){const{sendResolutionWidth:e,sendResolutionHeight:t}=this.getLocalVideoStats(),i={width:e,height:t};this._channelMediaRelayClient=new EL(this._joinInfo,this._clientId,this._config.websocketRetryConfig||Y_,this._config.httpRetryConfig||Y_,i),this._channelMediaRelayClient.on("state",(e=>{e===Yw.RELAY_STATE_FAILURE&&this._channelMediaRelayClient&&this._channelMediaRelayClient.dispose(),this.safeEmit(d_.CHANNEL_MEDIA_RELAY_STATE,e)})),this._channelMediaRelayClient.on("event",(e=>{this.safeEmit(d_.CHANNEL_MEDIA_RELAY_EVENT,e)})),this._statsCollector.onStatsChanged=(e,t)=>{var i;"resolution"===e&&(null===(i=this._channelMediaRelayClient)||void 0===i||i.setVideoProfile(t))}}return this._channelMediaRelayClient}_handleUpdateDataChannel(e,t){const{added:i,deleted:n}=e,r=[];Array.isArray(i)&&i.length>0&&i.forEach((e=>{const{uid:i,stream_id:n,ordered:s,max_retrans_times:o,metadata:a}=e,c=this._users.find((e=>e._uintid===i));if(c){if($C.debug("[".concat(this._clientId,"] data_channel added with uid ").concat(i)),Di(r).call(r,c)||r.push(c),c._uintid||(c._uintid=i),-1===c._dataChannels.findIndex((t=>t.id===e.stream_id))){const e={id:n,ordered:!!s,maxRetransmits:o,metadata:a},i=new Xk(e);c._dataChannels.push(i),$C.info("[".concat(this._clientId,"] remote user ").concat(c.uid," published datachannel")),t||this.safeEmit(d_.USER_PUBLISHED,c,"datachannel",e)}this._p2pChannel.hasPendingRemoteDataChannel(c,e.stream_id)&&($C.debug("[".concat(this._clientId,"] resubscribe datachannel for user ").concat(c.uid," after reconnect.")),this._subscribeDataChannel(c,e.stream_id).catch((e=>{$C.error("[".concat(this._clientId,"] resubscribe datachannel error"),e.toString())})))}else $C.error("[".concat(this._clientId,"] can not find target user!(on_add_data_channel)"))})),t&&(this.safeEmit(d_.PUBLISHED_USER_LIST,this._pendingPublishedUsers),this._pendingPublishedUsers=[]),Array.isArray(n)&&n.length>0&&n.forEach((e=>{const{uid:t,stream_id:i}=e,n=this._users.find((e=>e._uintid===t));if(!n)return void $C.error("[".concat(this._clientId,"] can not find target user!(on_delete_data_channel)"));const r=n._dataChannels.find((t=>t.id===e.stream_id));r&&($C.debug("[".concat(this._clientId,"] data_stream delete with uid ").concat(t)),this._p2pChannel.unsubscribeDataChannel(n,[r]).then((e=>{if(e)return n._dataChannels=n._dataChannels.filter((e=>e!==r)),this._gateway.unsubscribeDataChannel(e,n.uid)})),$C.info("[".concat(this._clientId,"] remote user ").concat(t," unpublished datachannel ,id:").concat(r.id)),this.safeEmit(d_.USER_UNPUBLISHED,n,"datachannel",r._config))}))}_handleRemoveDataChannels(e){const t=this._users.find((t=>t.uid===e.uid));if(t){if(void 0!==t._dataChannels&&t._dataChannels.length>0){$C.debug("[".concat(this._clientId,"] datachannel removed with uid ").concat(e.uid));const i=()=>{$C.info("[".concat(this._clientId,"] remote user ").concat(t.uid," unpublished datachannel")),t._dataChannels.forEach((e=>{this.safeEmit(d_.USER_UNPUBLISHED,t,"datachannel",e._config)}))};this._p2pChannel.unsubscribeDataChannel(t,t._dataChannels).then((e=>{if(e)return this._gateway.unsubscribeDataChannel(e,t.uid)})),i()}}else $C.warning("[".concat(this._clientId,"] can not find target user!(on_remove_datachannel)"))}_handleGatewayEvents(){this._gateway.on(Qw.DISCONNECT_P2P,(async()=>{await this._p2pChannel.disconnectForReconnect()})),this._gateway.on(Qw.CONNECTION_STATE_CHANGE,((e,t,i)=>{var n;if(i===l_.FALLBACK)return;const r=()=>{this.safeEmit(d_.CONNECTION_STATE_CHANGE,e,t,i)};if(nw.reportApiInvoke(this._sessionId||(null===(n=this._gateway.joinInfo)||void 0===n?void 0:n.sid)||null,{name:a_.CONNECTION_STATE_CHANGE,options:[e,t,i],tag:s_.TRACER}).onSuccess(JSON.stringify({cur:e,prev:t,reason:i})),$C.info("[".concat(this._clientId,"] connection state change: ").concat(t," -> ").concat(e)),"DISCONNECTED"===e)return this._reset(),void r();if("RECONNECTING"===e)this._users.forEach((e=>{e._trust_in_room_=!1,e._trust_audio_enabled_state_=!1,e._trust_video_enabled_state_=!1,e._trust_audio_mute_state_=!1,e._trust_video_mute_state_=!1,e._trust_audio_stream_added_state_=!1,e._trust_video_stream_added_state_=!1,e._audioSSRC=void 0,e._videoSSRC=void 0,e._videoOrtc=void 0,e._audioOrtc=void 0,e._cname=void 0,e._rtxSsrcId=void 0})),this._userOfflineTimeout&&window.clearTimeout(this._userOfflineTimeout),this._streamRemovedTimeout&&window.clearTimeout(this._streamRemovedTimeout),this._userOfflineTimeout=void 0,this._streamRemovedTimeout=void 0;else if("CONNECTED"===e){var s;this._streamFallbackTypeCacheMap.forEach(((e,t)=>{this._gateway.setStreamFallbackOption(t,e).catch((e=>{$C.warning("[".concat(this._clientId,"] auto set stream fallback option failed"),e)}))})),this._remoteStreamTypeCacheMap.forEach(((e,t)=>{this._gateway.setRemoteVideoStreamType(t,e).catch((e=>{$C.warning("[".concat(this._clientId,"] auto set remote stream type failed"),e)}))})),void 0!==this._remoteDefaultVideoStreamType&&void 0===(null===(s=this._joinInfo)||void 0===s?void 0:s.defaultVideoStream)&&this.setRemoteDefaultVideoStreamType(this._remoteDefaultVideoStreamType).then((()=>{$C.debug("[".concat(this._clientId,"] setRemoteDefaultVideoStreamType after gateway connected"))})).catch((e=>{$C.error("[".concat(this._clientId,"] setRemoteDefaultVideoStreamType after gateway failed, ").concat(e))})),this.store.useP2P||(this._p2pChannel.republish(),this._userOfflineTimeout=window.setTimeout((()=>{"CONNECTED"===this.connectionState&&(this._userOfflineTimeout=void 0,this._users.filter((e=>!e._trust_in_room_)).forEach((e=>{$C.debug("[".concat(this._clientId,"] user offline timeout, emit user offline ").concat(e.uid)),this._handleUserOffline({uid:e.uid})})))}),3e3),this._streamRemovedTimeout=window.setTimeout((()=>{"CONNECTED"===this.connectionState&&(this._streamRemovedTimeout=void 0,this._users.forEach((e=>{e._trust_audio_mute_state_||($C.debug("[".concat(this._clientId,"] auto dispatch audio unmute event ").concat(e.uid)),this._handleMuteStream(e.uid,lS.AUDIO,!1)),e._trust_video_mute_state_||($C.debug("[".concat(this._clientId,"] auto dispatch video unmute event ").concat(e.uid)),this._handleMuteStream(e.uid,lS.VIDEO,!1)),e._trust_audio_enabled_state_||($C.debug("[".concat(this._clientId,"] auto dispatch enable local audio ").concat(e.uid)),this._handleSetStreamLocalEnable("audio",e.uid,!0)),e._trust_video_enabled_state_||($C.debug("[".concat(this._clientId,"] auto dispatch enable local video ").concat(e.uid)),this._handleSetStreamLocalEnable("video",e.uid,!0)),e._trust_video_stream_added_state_||($C.debug("[".concat(this._clientId,"] auto dispatch reset video stream added ").concat(e.uid)),this._handleResetAddStream(e,"video")),e._trust_audio_stream_added_state_||($C.debug("[".concat(this._clientId,"] auto dispatch reset audio stream added ").concat(e.uid)),this._handleResetAddStream(e,"audio")),e._video_added_||e._audio_added_||($C.debug("[".concat(this._clientId,"] auto dispatch stream remove ").concat(e.uid)),this._handleRemoveStream({uid:e.uid,uint_id:e._uintid}))})))}),1e3))}r()})),this._gateway.on(Qw.REQUEST_NEW_GATEWAY_LIST,((e,t)=>{if(!this._joinInfo)return t(new Dw(Bb.UNEXPECTED_ERROR,"can not recover, no join info"));tL(this._joinInfo,this._axiosCancelSource.token,this._config.httpRetryConfig||Y_,this.store).then((t=>{this._joinInfo&&(this._joinInfo.apResponse=t.gatewayInfo.res,this._joinInfo.gatewayAddrs=t.gatewayInfo.gatewayAddrs,this._joinInfo.uni_lbs_ip=t.gatewayInfo.uni_lbs_ip);const i=[];t.gatewayInfo.gatewayAddrs.forEach((e=>{let{address:t}=e;const[n,r]=t.split(":");this._joinInfo&&this._joinInfo.proxyServer?i.push({proxy:this._joinInfo.proxyServer,host:n,port:r}):i.push({host:n,port:r})})),e(i)})).catch(t)})),this._gateway.on(Qw.NETWORK_QUALITY,(e=>{"normal"===this._networkQualitySensitivity&&this.safeEmit(d_.NETWORK_QUALITY,e)})),this._gateway.on(Qw.STREAM_TYPE_CHANGE,((e,t)=>{this.safeEmit(d_.STREAM_TYPE_CHANGED,e,t),nw.reportApiInvoke(this._sessionId,{name:a_.STREAM_TYPE_CHANGE,options:[e,t],tag:s_.TRACER}).onSuccess(JSON.stringify({uid:e,streamType:t}))})),this._gateway.on(Qw.IS_P2P_DISCONNECTED,(e=>{this._p2pChannel.isP2PDisconnected()?e(!0):this._p2pChannel.hasLocalMedia()||this._p2pChannel.hasRemoteMedia()?e(!1):e(!0)})),this._gateway.on(Qw.NEED_RENEW_SESSION,(()=>{this._startSession()})),this._gateway.on(Qw.REQUEST_P2P_CONNECTION_PARAMS,(async(e,t,i)=>{try{t(await this._p2pChannel.startP2PConnection(e))}catch(e){i(e)}})),this._gateway.on(Qw.JOIN_RESPONSE,((e,t)=>{if(this.store.useP2P)return;const{dtlsParameters:i,iceParameters:n,candidates:r,rtpCapabilities:s,setup:o,cname:a}=$L(e.ortc,t);this._p2pChannel.connect(n,i,r,s,o,a)})),this._gateway.on(Qw.REQUEST_DC_CONNECTION_PARAMS,(e=>{e(this._p2pChannel.getEstablishParams())})),this._gateway.on(Qw.RESET_SIGNAL,(e=>{this._p2pChannel.resetConnection(e),this._handleGatewaySignalEvents()})),this._gateway.on(Qw.DATACHANNEL_FAILBACK,(()=>{this._joinGateway()})),this._gateway.on(Qw.DATACHANNEL_PRECONNECT,(async(e,t,i,n)=>{var r,s,o,a,c,l;await this._p2pChannel.startP2PConnection({turnServer:null===(r=this._joinInfo)||void 0===r?void 0:r.turnServer},!0);const d=function(e,t){let i;return t&&t.ip&&"number"==typeof t.port?(i=[{foundation:"udpcandidate",componentId:"1",transport:"udp",priority:"2103266323",connectionAddress:t.ip,port:t.port.toString(),type:"host",extension:{}}],$C.debug("Using remote candidate from AP ".concat(t.ip,":").concat(t.port)),t.ip6&&(i.push({foundation:"udpcandidate",componentId:"1",transport:"udp",priority:"2103266323",connectionAddress:t.ip6,port:t.port.toString(),type:"host",extension:{}}),$C.debug("Using IPV6 remote candidate from AP ".concat(t.ip6,":").concat(t.port)))):i=[{foundation:"udpcandidate",componentId:"1",transport:"udp",priority:"2103266323",connectionAddress:e.ip,port:e.port.toString(),type:"host",extension:{}}],i}(e,t);return this._p2pChannel.preConnect({iceUfrag:"".concat(null===(s=this._joinInfo)||void 0===s?void 0:s.apResponse.cid,"_").concat(null===(o=this._joinInfo)||void 0===o?void 0:o.apResponse.cert),icePwd:"".concat(null===(a=this._joinInfo)||void 0===a?void 0:a.apResponse.cid,"_").concat(null===(c=this._joinInfo)||void 0===c?void 0:c.apResponse.cert)},{fingerprints:[{hashFunction:"sha-256",fingerprint:null!==(l=xC("FINGERPRINT"))&&void 0!==l?l:e.fingerprint}]},d,{send:{audioCodecs:[],videoCodecs:[],audioExtensions:[],videoExtensions:[]},recv:{audioCodecs:[],videoCodecs:[],audioExtensions:[],videoExtensions:[]}},"active","o/i14u9pJrxRKAsu").then(i).catch(n)}))}_handleGatewaySignalEvents(){this._gateway.signal.on(_w.ON_USER_ONLINE,this._handleUserOnline),this._gateway.signal.on(_w.ON_USER_OFFLINE,this._handleUserOffline),this._gateway.signal.on(_w.ON_ADD_AUDIO_STREAM,(e=>this._handleAddAudioOrVideoStream("audio",e.uid,e.ssrcId,e.cname,e.uint_id,e.ortc))),this._gateway.signal.on(_w.ON_ADD_VIDEO_STREAM,(e=>this._handleAddAudioOrVideoStream("video",e.uid,e.ssrcId,e.cname,e.uint_id,e.ortc,e.rtxSsrcId))),this._gateway.signal.on(_w.ON_REMOTE_DATASTREAM_UPDATE,(e=>{this._handleUpdateDataChannel(e)})),this._gateway.signal.on(_w.ON_REMOTE_FULL_DATASTREAM_INFO,(e=>{this._handleUpdateDataChannel({added:e.datastreams,deleted:[]},!0)})),this._gateway.signal.on(_w.ON_REMOVE_STREAM,this._handleRemoveStream),this._gateway.signal.on(_w.ON_P2P_LOST,this._handleP2PLost),this._gateway.signal.on(_w.MUTE_AUDIO,(e=>this._handleMuteStream(e.uid,lS.AUDIO,!0))),this._gateway.signal.on(_w.UNMUTE_AUDIO,(e=>this._handleMuteStream(e.uid,lS.AUDIO,!1))),this._gateway.signal.on(_w.MUTE_VIDEO,(e=>this._handleMuteStream(e.uid,lS.VIDEO,!0))),this._gateway.signal.on(_w.UNMUTE_VIDEO,(e=>this._handleMuteStream(e.uid,lS.VIDEO,!1))),this._gateway.signal.on(_w.RECEIVE_METADATA,(e=>{const t=L_(e.metadata);this.safeEmit(d_.RECEIVE_METADATA,e.uid,t)})),this._gateway.signal.on(_w.ON_DATA_STREAM,(async e=>{if(!e)return;let t=0;if(e.ordered||e.syncWithAudio){const i=this._p2pChannel.getStats(),n=this.remoteUsers.find((t=>t.uid===e.uid)),r=null==i?void 0:i.audioRecv.find((e=>e.ssrc===(null==n?void 0:n._audioSSRC)));t=null==r?void 0:r.jitterBufferMs}null==t&&(t=0),MD(e,t,{id:this._clientId,onStreamMessage:"function"==typeof this.onStreamMessage?this.onStreamMessage.bind(this):void 0,safeEmit:this.safeEmit.bind(this)})})),this._gateway.signal.on(_w.ON_CRYPT_ERROR,(()=>{N_((()=>{$C.warning("[".concat(this._clientId,"] on crypt error")),this.safeEmit(d_.CRYPT_ERROR)}),this._sessionId)})),this._gateway.signal.on(_w.ON_TOKEN_PRIVILEGE_WILL_EXPIRE,this._handleTokenWillExpire),this._gateway.signal.on(_w.ON_TOKEN_PRIVILEGE_DID_EXPIRE,(()=>{$C.warning("[".concat(this._clientId,"] received message onTokenPrivilegeDidExpire, please get new token and join again")),this._gateway.leave(!0,l_.TOKEN_EXPIRE),this.safeEmit(d_.ON_TOKEN_PRIVILEGE_DID_EXPIRE),this._reset()})),this._gateway.signal.on(_w.ON_STREAM_FALLBACK_UPDATE,(e=>{$C.debug("[".concat(this._clientId,"] stream fallback peerId: ").concat(e.stream_id,", attr: ").concat(e.stream_type)),this.safeEmit(d_.STREAM_FALLBACK,e.stream_id,1===e.stream_type?"fallback":"recover")})),this._gateway.signal.on(_w.ON_PUBLISH_STREAM,(e=>{this.uid===this._uid&&(this._p2pChannel.reportPublishEvent(!0,null,void 0,!1,JSON.stringify({proxy:e.proxy})),$C.info("[".concat(this._clientId,"] on publish stream, ").concat(JSON.stringify(e))))})),this._gateway.signal.on(_w.ENABLE_LOCAL_VIDEO,(e=>{this._handleSetStreamLocalEnable("video",e.uid,!0)})),this._gateway.signal.on(_w.DISABLE_LOCAL_VIDEO,(e=>{this._handleSetStreamLocalEnable("video",e.uid,!1)})),this._gateway.signal.on(mw.REQUEST_TIMEOUT,((e,t)=>{if(this._joinInfo)switch(e){case vw.PUBLISH:{if(!t)return;const e=t.ortc;if(e){var i,n;const r=e.some((e=>{let{stream_type:t}=e;return t===Zw.Audio})),s=e.some((e=>{let{stream_type:t}=e;return t!==Zw.Audio})),o=e.some((e=>{let{stream_type:t}=e;return t===Zw.Screen||t===Zw.ScreenLow}));"offer"===t.state&&nw.publish(this._joinInfo.sid,{eventElapse:eN.measureFromPublishStart(this.store.clientId,this.store.pubId),succ:!1,ec:Bb.TIMEOUT,audio:r,video:s,p2pid:t.p2p_id,publishRequestid:this.store.pubId,screenshare:o,audioName:r?null===(i=e.find((e=>{let{stream_type:t}=e;return t===Zw.Audio})))||void 0===i||null===(i=i.ssrcs[0])||void 0===i?void 0:i.ssrcId.toString():void 0,videoName:s?null===(n=e.find((e=>{let{stream_type:t}=e;return t!==Zw.Audio})))||void 0===n||null===(n=n.ssrcs[0])||void 0===n?void 0:n.ssrcId.toString():void 0})}break}case vw.SUBSCRIBE:t&&nw.subscribe(this._joinInfo.sid,{succ:!1,ec:Bb.TIMEOUT,audio:t.stream_type===lS.AUDIO,video:t.stream_type===lS.VIDEO,peerid:t.stream_id,subscribeRequestid:t.ssrcId,p2pid:this.store.p2pId,eventElapse:eN.measureFromSubscribeStart(this.store.clientId,t.ssrcId)})}})),this._gateway.signal.on(_w.ON_P2P_OK,(e=>{this.uid,this._uid})),this._gateway.signal.on(_w.ON_PUBLISHED_USER_LIST,(e=>{if(null==e||!e.users)return;xC("BLOCK_LOCAL_CLIENT")&&(e.users=e.users.filter((e=>!sw(e.string_id||e.stream_id,this.channelName))));const t=[],i=[];for(const n of e.users){let e=this._users.find((e=>e._uintid===n.stream_id));e?e._trust_in_room_=!0:(e=new CL(n.string_id||n.stream_id,n.stream_id),this._users.push(e),0===this.getListeners(d_.PUBLISHED_USER_LIST).length&&($C.debug("[".concat(this._clientId,"] user online"),n.stream_id),this.safeEmit(d_.USER_JOINED,e)));const r=eS.Audio&n.stream_type,s=(eS.Video|eS.LwoVideo)&n.stream_type,o=0!=(65280&n.stream_type),a=r&&e.hasAudio,c=s&&e.hasVideo;s&&(e._trust_video_stream_added_state_=!0,e._video_added_=!0,e._videoSSRC=n.video_ssrc,e._rtxSsrcId=n.video_rtx),r&&(e._trust_audio_stream_added_state_=!0,e._audio_added_=!0,e._audioSSRC=n.audio_ssrc),r&&!a&&0===this.getListeners(d_.PUBLISHED_USER_LIST).length&&($C.info("[".concat(this._clientId,"] remote user ").concat(e.uid," published audio")),this.safeEmit(d_.USER_PUBLISHED,e,"audio")),s&&!c&&0===this.getListeners(d_.PUBLISHED_USER_LIST).length&&($C.info("[".concat(this._clientId,"] remote user ").concat(e.uid," published video")),this.safeEmit(d_.USER_PUBLISHED,e,"video")),(r&&!a||s&&!c||o)&&t.push(e),s&&this._p2pChannel.hasPendingRemoteMedia(e,"video")&&i.push({user:e,mediaType:"video"}),r&&this._p2pChannel.hasPendingRemoteMedia(e,"audio")&&i.push({user:e,mediaType:"audio"})}i.length>0&&($C.debug("[".concat(this._clientId,"] RE massSubscribe after reconnect ").concat(i.map((e=>"user: ".concat(e.user.uid,", mediaType: ").concat(e.mediaType))).join("; ")," ")),this.massSubscribe(i).catch((e=>{$C.error("[".concat(this._clientId,"] mass resubscribe error"),e.toString())}))),this.getListeners(d_.PUBLISHED_USER_LIST).length>0?xC("ENABLE_DATASTREAM_2")?this._pendingPublishedUsers=t:($C.info("[".concat(this._clientId,"] client emit user-list event, users: ").concat(t.map((e=>e.uid)).join(", "))),this.safeEmit(d_.PUBLISHED_USER_LIST,t)):$C.info("[".concat(this._clientId,"] client not emit user-list event case there is no user-list listener, users: ").concat(t.map((e=>e.uid)).join(", ")))}))}_handleP2PEvents(){this._gateway.signal.on(_w.ON_USER_OFFLINE,(()=>{this._p2pChannel.disconnectForReconnect()})),this._gateway.signal.on(AS.PUBLISH,(async(e,t)=>{e.forEach((e=>e.kind===lS.VIDEO?(this._handleP2PAddAudioOrVideoStream("video",t),e.isMuted?this._handleMuteStream(t,lS.VIDEO,!0):this._handleMuteStream(t,lS.VIDEO,!1)):(this._handleP2PAddAudioOrVideoStream("audio",t),e.isMuted?this._handleMuteStream(t,lS.AUDIO,!0):this._handleMuteStream(t,lS.AUDIO,!1))))})),this._gateway.signal.on(mw.P2P_START,(async(e,t)=>{var i;this._p2pChannel instanceof wD&&t(await this._p2pChannel.startP2P({turnServer:null===(i=this._joinInfo)||void 0===i?void 0:i.turnServer},e))})),this._gateway.signal.on(mw.P2P_CONNECTION,(async e=>{this._p2pChannel instanceof wD&&await this._p2pChannel.p2pConnect(e)})),this._gateway.signal.on(mw.P2P_REMOTE_CANDIDATE_UPDATE,(e=>{this._p2pChannel instanceof wD&&this._p2pChannel.addRemoteCandidate(JSON.parse(e))})),this._gateway.signal.on(AS.SUBSCRIBE,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{trackType:n}=JSON.parse(e);try{await this._p2pChannel.dopublish(n),t()}catch(e){i(e)}}})),this._gateway.signal.on(AS.UNSUBSCRIBE,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{mediaType:n}=JSON.parse(e);try{await this._p2pChannel.doUnpublish(n),t()}catch(e){i(e)}}})),this._gateway.signal.on(AS.EXCHANGE_SDP,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{type:n,sdp:r}=JSON.parse(e);try{t(await this._p2pChannel.setDescription(n,r))}catch(e){i(e)}}})),this._gateway.signal.on(AS.UNPUBLISH,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{unpubMsg:n,uid:r}=e;if(1===n.length){const s=n[0].stream_type===Zw.Audio?lS.AUDIO:lS.VIDEO;this._handleMuteStream(r,s,!0);const{sdp:o}=e;if(this._p2pChannel instanceof wD&&o){const e=this._users.find((e=>e.uid===r));if(!e)return $C.warning("[".concat(this._clientId,"] can not find remote user, ignore mute event, uid: ").concat(r)),void t();this._p2pChannel.unsubscribe(e,o,s).then((e=>{e&&t(e)})).catch(i)}else t()}else this._handleRemoveStream(e,t,i)}})),this._gateway.signal.on(AS.CONTROL,(async(e,t,i)=>{const{action:n,sdp:r,isMuteAll:s,uid:o}=e;switch(n){case RS.MUTE_LOCAL_VIDEO:this._handleMuteStream(o,lS.VIDEO,!0,r,t,i);break;case RS.MUTE_LOCAL_AUDIO:t(),this._handleMuteStream(o,lS.AUDIO,!0);break;case RS.UNMUTE_LOCAL_VIDEO:t(),this._handleP2PAddAudioOrVideoStream("video",o),this._handleMuteStream(o,lS.VIDEO,!1);break;case RS.UNMUTE_LOCAL_AUDIO:t(),this._handleP2PAddAudioOrVideoStream("audio",o),this._handleMuteStream(o,lS.AUDIO,!1)}s&&this._handleRemoveStream(e,t,i)})),this._gateway.signal.on(AS.DO_SUBSCRIBE,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{kind:n,sdp:r,ssrcId:s,uid:o}=e,a=this._users.find((e=>e.uid===o));if(!a)return $C.error("[".concat(this._clientId,"] can not find target user!(on_add_stream)")),void t();try{t(await this._p2pChannel.subscribe(a,n,r,s))}catch(e){i(e)}}})),this._gateway.signal.on(AS.DO_UNSUBSCRIBE,(async(e,t,i)=>{if(this._p2pChannel instanceof wD){const{uid:n,kind:r,sdp:s}=e,o=this._users.find((e=>e.uid===n));if(!o)return $C.error("[".concat(this._clientId,"] can not find target user!(on_add_stream)")),void t();try{t(await this._p2pChannel.unsubscribe(o,s,r))}catch(e){i(e)}}})),this._gateway.signal.on(AS.RESTART_ICE,(async(e,t,i)=>{if(this._p2pChannel instanceof wD)try{t(await this._p2pChannel.setDescription("remote",e))}catch(e){i(e)}})),this._p2pChannel.on(pS.RequestP2PRestartICE,(async(e,t,i)=>{try{t(await this._gateway.sendExtensionMessage(AS.RESTART_ICE,e))}catch(e){i(e)}})),this._p2pChannel.on(pS.LocalCandidate,(e=>{this._gateway.sendExtensionMessage(AS.CANDIDATE,JSON.stringify(e))})),this._p2pChannel.on(pS.RequestP2PMuteLocal,(async(e,t,i)=>{try{t(await this._gateway.sendExtensionMessage(AS.CONTROL,e))}catch(e){i(e)}})),this._p2pChannel.on(pS.RequestP2PPublish,(async(e,t,i)=>{try{t(await this._gateway.sendExtensionMessage(AS.DO_SUBSCRIBE,e))}catch(e){i(e)}})),this._p2pChannel.on(pS.RequestP2PUnPublish,(async(e,t,i)=>{try{t(await this._gateway.sendExtensionMessage(AS.DO_UNSUBSCRIBE,e))}catch(e){i(e)}})),this._p2pChannel.on(pS.RequestP2PUnmuteRemote,(async(e,t,i)=>{if(this._joinInfo)try{await this._gateway.unmuteRemote(e,this._joinInfo.stringUid||this._joinInfo.uid),t()}catch(e){e.code===Bb.DISCONNECT_P2P?t():i(e)}else t()})),this._p2pChannel.on(pS.RequestP2PMuteRemote,(async(e,t,i)=>{if(this._joinInfo)try{await this._gateway.muteRemote(e,this._joinInfo.stringUid||this._joinInfo.uid),t()}catch(e){e.code===Bb.DISCONNECT_P2P?t():i(e)}else t()})),this._p2pChannel.on(pS.StateChange,((e,t)=>{t===fS.Connected&&this._p2pChannel.republish()}))}_handleP2PChannelEvents(){this._p2pChannel.on(pS.RequestMuteLocal,(async(e,t,i)=>{if(this._joinInfo)try{await this._gateway.muteLocal(e,this._joinInfo.stringUid||this._joinInfo.uid),t()}catch(e){e.code===Bb.DISCONNECT_P2P?t():i(e)}else t()})),this._p2pChannel.on(pS.RequestUnmuteLocal,(async(e,t,i)=>{if(this._joinInfo)try{await this._gateway.unmuteLocal(e,this._joinInfo.stringUid||this._joinInfo.uid),t()}catch(e){e.code===Bb.DISCONNECT_P2P?t():i(e)}else t()})),this._p2pChannel.on(pS.RequestRePublish,((e,t,i)=>{this.publish(e,!1).then(t).catch(i)})),this._p2pChannel.on(pS.RequestRePublishDataChannel,((e,t,i)=>{nb.all(e.map((async e=>{await this._p2pChannel.publishDataChannel([e]);const t={streamId:e.id,ordered:e.ordered,maxRetransmits:e.maxRetransmits,metadata:e.metadata,channelId:e._originDataChannelId};try{await this._gateway.publishDataChannel(this._uid,t,!0)}catch(e){if(e.code!==Bb.DISCONNECT_P2P)throw e}}))).then(t).catch(i)})),this._p2pChannel.on(pS.RequestReSubscribe,(async(e,t,i)=>{try{for(const{user:t,kind:i}of e)i===lS.VIDEO?await this.subscribe(t,"video"):await this.subscribe(t,"audio");t()}catch(e){i(e)}})),this._p2pChannel.on(pS.RequestUploadStats,((e,t)=>{this._gateway.uploadStats(e,t)})),this._p2pChannel.on(pS.MediaReconnectStart,(e=>{this.safeEmit(d_.MEDIA_RECONNECT_START,e)})),this._p2pChannel.on(pS.MediaReconnectEnd,(e=>{this.safeEmit(d_.MEDIA_RECONNECT_END,e)})),this._p2pChannel.on(pS.NeedSignalRTT,(e=>{e(this._gateway.getSignalRTT())})),this._p2pChannel.on(pS.RequestRestartICE,(async e=>{if(this._p2pChannel instanceof wD)return;const t=await this._p2pChannel.restartICE(e),i=await t.next();if(i.done)return;const n=i.value;let r;try{r=await this._gateway.restartICE({iceParameters:n})}catch(e){return void t.throw(e)}const{iceParameters:s}=function(e){const t=e.iceParameters;return{iceParameters:{iceUfrag:t.iceUfrag,icePwd:t.icePwd}}}(r);await t.next({remoteIceParameters:s})})),this._p2pChannel.on(pS.RequestReconnect,(async()=>{this._gateway.reconnect()})),this._p2pChannel.on(pS.RequestReconnectPC,(async()=>{var e;const{iceParameters:t,dtlsParameters:i,rtpCapabilities:n}=await this._p2pChannel.startP2PConnection({turnServer:null===(e=this._joinInfo)||void 0===e?void 0:e.turnServer}),{gatewayEstablishParams:r,gatewayAddress:s}=await this._gateway.reconnectPC({iceParameters:t,dtlsParameters:i,rtpCapabilities:n}),{dtlsParameters:o,iceParameters:a,candidates:c,rtpCapabilities:l,setup:d,cname:h}=$L(r,s);await this._p2pChannel.connect(a,o,c,l,d,h),await this._p2pChannel.republish(),await this._p2pChannel.reSubscribe()})),this._p2pChannel.on(pS.RequestUnpublishForReconnectPC,(async(e,t,i)=>{this._joinInfo&&void 0!==this._uid?(await this._gateway.unpublish(e,this._uid),t()):i()})),this._p2pChannel.on(pS.P2PLost,(()=>{this.safeEmit(d_.P2P_LOST,this.store.uid)})),this._p2pChannel.on(pS.UpdateVideoEncoder,(e=>{e._encoderConfig&&this._gateway.setVideoProfile(e._encoderConfig)})),this._p2pChannel.on(pS.ConnectionTypeChange,(e=>{this.safeEmit(d_.IS_USING_CLOUD_PROXY,e)})),this._p2pChannel.on(pS.RequestLowStreamParameter,(e=>{e(this._lowStreamParameter||{width:160,height:120,framerate:15,bitrate:50})})),this._p2pChannel.on(pS.QueryClientConnectionState,(e=>{e(this.connectionState)}))}getKeyMetrics(){return this.store.keyMetrics}async enableContentInspect(e){if("CONNECTED"!==this.connectionState||!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Client did not join channel"));if(this._inspect)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] Inspect content service already in connecting/connected state"));if(!e)throw new Dw(Bb.INVALID_PARAMS,"[".concat(this._clientId,"] inspectConfig is necessary"));if(!e.inspectType||!Array.isArray(e.inspectType))throw new Dw(Bb.INVALID_PARAMS,"[".concat(this._clientId,"] inspectConfig.inspectType is necessary and is an instance of Array."));{const t=[...new Set(e.inspectType)];t.forEach((e=>{var t;if(!Di(t=["supervise","moderation"]).call(t,e))throw new Dw(Bb.INVALID_PARAMS,"[".concat(this._clientId,"] ").concat(e," is not a valid inspect type."))})),e.inspectType=t}if(e&&e.extraInfo&&e.extraInfo.length>1024)throw new Dw(Bb.INVALID_PARAMS,"[".concat(this._clientId,"] inspectConfig.extraInfo length cannot exceed 1024 bytes"));try{const t=new Px(e);this._inspect=t,this.handleVideoInspectEvents(this._inspect),await t.init({appId:this._joinInfo.appId,areaCode:"",cname:this._joinInfo.cname,sid:this._joinInfo.sid,token:this._joinInfo.token,uid:this._joinInfo.uid,cid:this._joinInfo.cid,vid:this._joinInfo.vid?Number(this._joinInfo.vid):0},Y_)}catch(e){throw Array.isArray(e)?e[0]:e}}async disableContentInspect(){if(!this._inspect)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] inspectVideoContent not started"));try{this._inspect.close(),this._inspect=void 0}catch(e){throw Array.isArray(e)?e[0]:e}}async setImageModeration(e,t){if(Vb(e,"enabled"),e){if(!t)throw new Dw(Bb.INVALID_PARAMS,"[".concat(this._clientId,"] config is necessary"));if(Hb(t.interval,"interval",1e3,1/0),"CONNECTED"!==this.connectionState||!this._joinInfo)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,'] can not enable image moderation, not joined"'));try{if(this._moderation)return void this._moderation.updateConfig(t);const e=new gD(t);this._moderation=e,this.handleImageModerationEvents(this._moderation),await e.init({appId:this._joinInfo.appId,areaCode:"",cname:this._joinInfo.cname,sid:this._joinInfo.sid,token:this._joinInfo.token,uid:this._joinInfo.uid,cid:this._joinInfo.cid,vid:this._joinInfo.vid?Number(this._joinInfo.vid):0},Y_)}catch(e){throw Array.isArray(e)?e[0]:e}}else{if(!this._moderation)throw new Dw(Bb.INVALID_OPERATION,"[".concat(this._clientId,"] image moderation not started"));try{this._moderation.close(),this._moderation.removeAllListeners(),this._moderation=void 0}catch(e){throw Array.isArray(e)?e[0]:e}}}handleImageModerationEvents(e){e.on(SS.CONNECTION_STATE_CHANGE,((t,i)=>{if(this.safeEmit(d_.IMAGE_MODERATION_CONNECTION_STATE_CHANGE,t,i),t===wS.CONNECTED){if("CONNECTED"!==this.connectionState)throw this.setImageModeration(!1),new Dw(Bb.OPERATION_ABORTED,"Image moderation was cancelled because it left the channel");e.inspectImage()}})),e.on(SS.CLIENT_LOCAL_VIDEO_TRACK,(e=>{e(this.localTracks.filter((e=>"video"===e.trackMediaType))[0])}))}handleVideoInspectEvents(e){e.on(bS.CONNECTION_STATE_CHANGE,((t,i)=>{if(this.safeEmit(d_.CONTENT_INSPECT_CONNECTION_STATE_CHANGE,t,i),i===mS.CONNECTED){if("CONNECTED"!==this.connectionState)return void this.safeEmit(d_.CONTENT_INSPECT_ERROR,new Dw(Bb.OPERATION_ABORTED,"Content inspect was cancelled because it left the channel"));e.inspectImage()}})),e.on(bS.INSPECT_RESULT,((e,t)=>{var i;if((null==t?void 0:t.code)===Bb.INVALID_OPERATION&&"DISCONNECTED"===this.connectionState)return $C.debug("Stop inspect content because that has left channel"),null==this||null===(i=this._inspect)||void 0===i||i.close(),void(this._inspect=void 0);this.safeEmit(d_.CONTENT_INSPECT_RESULT,e,t)})),e.on(bS.CLIENT_LOCAL_VIDEO_TRACK,(e=>{e(this.localTracks.filter((e=>"video"===e.trackMediaType))[0])}))}getJoinChannelServiceRecords(){return $C.debug("getJoinChannelServiceRecords"),this.store.joinChannelServiceRecords}async setPublishAudioFilterEnabled(e){Vb(e,"enabled"),MC("ENABLE_PUBLISH_AUDIO_FILTER",e),this._joinInfo&&await this._gateway.setPublishAudioFilterEnabled(e)}_handleResetAddStream(e,t){switch(t){case"audio":e._audio_added_=!1,e._trust_audio_stream_added_state_=!0;break;case"video":e._video_added_=!1,e._trust_video_stream_added_state_=!0}}}Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"leave",null),Mw([tw({argsMap:(e,t)=>{if(!Array.isArray(t)){if(!(t instanceof JT))return[t];t=[t]}return t.map((e=>e?Object(e).toString():"null"))}}),xw("design:type",Function),xw("design:paramtypes",[Object,Boolean]),xw("design:returntype",nb)],PD.prototype,"publish",null),Mw([tw({argsMap:(e,t)=>(t||(t=[]),t instanceof Zk?[t.getChannelId()]:(Array.isArray(t)||(t=[t]),t.map((e=>e.getTrackId()))))}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],PD.prototype,"unpublish",null),Mw([tw({argsMap:(e,t,i,n)=>[t.uid,i,n]}),xw("design:type",Function),xw("design:paramtypes",[CL,String,Number]),xw("design:returntype",nb)],PD.prototype,"subscribe",null),Mw([tw({argsMap:(e,t)=>t.map((e=>{let{user:t,mediaType:i}=e;return[null==t?void 0:t.uid,i]}))}),xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],PD.prototype,"massSubscribe",null),Mw([tw({argsMap:(e,t,i,n)=>[t.uid,i,n]}),xw("design:type",Function),xw("design:paramtypes",[CL,String,Number]),xw("design:returntype",nb)],PD.prototype,"unsubscribe",null),Mw([tw({argsMap:(e,t)=>t.map((e=>{let{user:t,mediaType:i}=e;return{uid:null==t?void 0:t.uid,mediaType:i}}))}),xw("design:type",Function),xw("design:paramtypes",[Array]),xw("design:returntype",nb)],PD.prototype,"massUnsubscribe",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],PD.prototype,"setLowStreamParameter",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"enableDualStream",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"disableDualStream",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String,Object]),xw("design:returntype",nb)],PD.prototype,"setClientRole",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String,Boolean]),xw("design:returntype",void 0)],PD.prototype,"setProxyServer",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object,Boolean]),xw("design:returntype",void 0)],PD.prototype,"setTurnServer",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",void 0)],PD.prototype,"setLicense",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",void 0)],PD.prototype,"startProxyServer",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],PD.prototype,"stopProxyServer",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",void 0)],PD.prototype,"setLocalAccessPointsV2",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Array,String]),xw("design:returntype",void 0)],PD.prototype,"setLocalAccessPoints",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",nb)],PD.prototype,"setRemoteDefaultVideoStreamType",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object,Number]),xw("design:returntype",nb)],PD.prototype,"setRemoteVideoStreamType",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object,Number]),xw("design:returntype",nb)],PD.prototype,"setStreamFallbackOption",null),Mw([tw({argsMap:(e,t)=>[t]}),xw("design:type",Function),xw("design:paramtypes",[String,String,Uint8Array]),xw("design:returntype",void 0)],PD.prototype,"setEncryptionConfig",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],PD.prototype,"renewToken",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",void 0)],PD.prototype,"enableAudioVolumeIndicator",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String,Boolean]),xw("design:returntype",nb)],PD.prototype,"startLiveStreaming",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],PD.prototype,"setLiveTranscoding",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String]),xw("design:returntype",nb)],PD.prototype,"stopLiveStreaming",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[String,Object]),xw("design:returntype",nb)],PD.prototype,"addInjectStreamUrl",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"removeInjectStreamUrl",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[bL]),xw("design:returntype",nb)],PD.prototype,"startChannelMediaRelay",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[bL]),xw("design:returntype",nb)],PD.prototype,"updateChannelMediaRelay",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"stopChannelMediaRelay",null),Mw([tw({argsMap:(e,t)=>(Array.isArray(t)||(t=[t]),[JSON.stringify(t)])}),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],PD.prototype,"sendCustomReportMessage",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object,Object]),xw("design:returntype",nb)],PD.prototype,"pickSVCLayer",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Number]),xw("design:returntype",nb)],PD.prototype,"setRTM2Flag",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Object]),xw("design:returntype",nb)],PD.prototype,"enableContentInspect",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",nb)],PD.prototype,"disableContentInspect",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Boolean,Object]),xw("design:returntype",nb)],PD.prototype,"setImageModeration",null),Mw([tw({reportResult:!0}),xw("design:type",Function),xw("design:paramtypes",[]),xw("design:returntype",Array)],PD.prototype,"getJoinChannelServiceRecords",null),Mw([tw(),xw("design:type",Function),xw("design:paramtypes",[Boolean]),xw("design:returntype",nb)],PD.prototype,"setPublishAudioFilterEnabled",null);const UD=pb().name;class BD{constructor(e,t){oh(this,"id",0),oh(this,"element",void 0),oh(this,"peerPair",void 0),oh(this,"context",void 0),oh(this,"audioPlayerElement",void 0),oh(this,"audioTrack",void 0),BD.count+=1,this.id=BD.count,this.element=e,this.context=t}initPeers(){this.peerPair=[new RTCPeerConnection,new RTCPeerConnection],this.peerPair[1].ontrack=e=>{const t=document.createElement("audio");t.srcObject=new MediaStream([e.track]),t.play(),this.audioPlayerElement=t}}async switchSdp(){if(!this.peerPair)return;const e=async(e,t)=>{const i="offer"===t?await e.createOffer():await e.createAnswer();return await e.setLocalDescription(i),"complete"===e.iceGatheringState?e.localDescription:new nb((t=>{e.onicegatheringstatechange=()=>{"complete"===e.iceGatheringState&&t(e.localDescription)}}))},t=async(e,t)=>await e.setRemoteDescription(t);try{const i=await e(this.peerPair[0],"offer");await t(this.peerPair[1],i);const n=await e(this.peerPair[1],"answer");await t(this.peerPair[0],n)}catch(e){throw new Dw(Bb.LOCAL_AEC_ERROR,e.toString()).print()}}async getTracksFromMediaElement(e){if(this.audioTrack)return this.audioTrack;let t;try{e instanceof HTMLVideoElement&&(e.captureStream?e.captureStream():e.mozCaptureStream()),t=this.context.createMediaStreamDestination(),this.context.createMediaElementSource(e).connect(t)}catch(e){throw new Dw(Bb.LOCAL_AEC_ERROR,e.toString()).print()}if(!t)throw new Dw(Bb.LOCAL_AEC_ERROR,"no dest node when local aec").print();const i=t.stream.getAudioTracks()[0];return this.audioTrack=i,i}getElement(){return this.element}async startEchoCancellation(){this.context.resume(),this.peerPair&&this.close(),this.initPeers();const e=this.element,t=await this.getTracksFromMediaElement(e);this.peerPair&&this.peerPair[0].addTrack(t),await this.switchSdp()}close(){$C.debug("close echo cancellation unit, id is",this.id),this.audioPlayerElement&&this.audioPlayerElement.pause(),this.peerPair&&this.peerPair.forEach((e=>{e.close()})),this.peerPair=void 0,this.audioPlayerElement=void 0}}oh(BD,"count",0);const FD=window.AudioContext||window.webkitAudioContext;class VD{constructor(){oh(this,"units",[]),oh(this,"context",void 0)}processExternalMediaAEC(e){if(!this._doesEnvironmentNeedAEC())return $C.debug("the system does not need to process local aec"),-1;this.context||(this.context=new FD);let t=this.units.find((t=>t&&t.getElement()===e));return t||(t=new BD(e,this.context),this.units.push(t)),t.startEchoCancellation(),$C.debug("start processing local audio echo cancellation, id is",t.id),t.id}_doesEnvironmentNeedAEC(){return pb().name!==lb.SAFARI}}Mw([tw({report:nw}),xw("design:type",Function),xw("design:paramtypes",[HTMLAudioElement]),xw("design:returntype",Number)],VD.prototype,"processExternalMediaAEC",null);const jD=new VD;function HD(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function $D(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?HD(Object(i),!0).forEach((function(t){oh(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):HD(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}const zD=window||document;function WD(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!zD)return;const i=KD._cspEventHandlerPointer;if(i&&t)return void console.error(i,t);const n=e=>{if(!(e&&e.blockedURI&&(KD.onSecurityPolicyViolation||KD.getListeners(ES.SECURITY_POLICY_VIOLATION).length>0)))return;const t=e.blockedURI;xC("CSP_DETECTED_HOSTNAME_LIST").some((e=>Di(t).call(t,e)))&&(KD.onSecurityPolicyViolation&&"function"==typeof KD.onSecurityPolicyViolation&&KD.onSecurityPolicyViolation(e),KD.getListeners(ES.SECURITY_POLICY_VIOLATION).length>0&&KD.safeEmit(ES.SECURITY_POLICY_VIOLATION,e))};i&&zD.removeEventListener("securitypolicyviolation",i),(t||e&&"function"==typeof e||KD.getListeners(ES.SECURITY_POLICY_VIOLATION).length>0)&&zD.addEventListener("securitypolicyviolation",n),KD._cspEventHandlerPointer=n}MC("PROCESS_ID","process-".concat(B_(8,""),"-").concat(B_(4,""),"-").concat(B_(4,""),"-").concat(B_(4,""),"-").concat(B_(12,""))),function(){const e=pb();dA.getDisplayMedia=!(!navigator.mediaDevices||!navigator.mediaDevices.getDisplayMedia),dA.getStreamFromExtension=e.name===lb.CHROME&&Number(e.version)>34,dA.supportUnifiedPlan=function(){if(!window.RTCRtpTransceiver)return!1;if(!("currentDirection"in RTCRtpTransceiver.prototype))return!1;const e=new RTCPeerConnection;let t=!1;try{e.addTransceiver("audio"),t=!0}catch(e){}return e.close(),t}(),dA.supportMinBitrate=e.name===lb.CHROME||e.name===lb.EDGE,dA.supportSetRtpSenderParameters=function(){const e=pb();return!!(window.RTCRtpSender&&window.RTCRtpSender.prototype.setParameters&&window.RTCRtpSender.prototype.getParameters)&&(!!Db()||!(!Eb()&&!vb())||e.name===lb.FIREFOX&&Number(e.version)>=64)}(),e.name===lb.SAFARI&&(Number(e.version)>=14?dA.supportDualStream=!0:dA.supportDualStream=!1),dA.webAudioMediaStreamDest=function(){const e=pb();return!(e.name===lb.SAFARI&&Number(e.version)<12)}(),dA.supportReplaceTrack=!!window.RTCRtpSender&&"function"==typeof RTCRtpSender.prototype.replaceTrack,dA.supportWebGL="undefined"!=typeof WebGLRenderingContext,dA.supportRequestFrame=!!window.CanvasCaptureMediaStreamTrack,Db()||(dA.webAudioWithAEC=!0),dA.supportShareAudio=function(){const e=pb();return(e.os===cb.WIN_10||e.os===cb.WIN_81||e.os===cb.WIN_7||e.os===cb.LINUX||e.os===cb.MAC_OS)&&e.name===lb.CHROME&&Number(e.version)>=74}(),dA.supportDataChannel=!!(Sb(76)||function(e){const t=pb();return!(t.name!==lb.FIREFOX||!t.osVersion)&&Number(t.version)>=e}(68)||function(e){const t=pb();return!(t.name!==lb.SAFARI||!t.osVersion)&&Number(t.version)>=e}(14)),dA.supportPCSetConfiguration=function(){const e=window.RTCPeerConnection;return!Cb()&&!!e&&e.prototype.setConfiguration instanceof Function}(),dA.supportWebRTCEncodedTransform=function(){const e=pb();return"Chrome"===e.name&&Number(e.version)>=86}(),dA.supportWebRTCInsertableStream=function(){const e=pb();return(e.name===lb.CHROME||e.name===lb.EDGE)&&Number(e.version)>=94&&"MediaStreamTrackGenerator"in window&&"MediaStreamTrackProcessor"in window}(),R_((()=>{dA.supportDualStreamEncoding=function(){const e=pb();return!!xC("DISABLE_WEBAUDIO")||"Safari"===e.name&&Number(e.version)>=14||!!("Chrome"===e.name&&/Windows/i.test(e.os||"")&&Number(e.version)>=100&&xC("CHROME_DUAL_STREAM_USE_ENCODING"))}(),$C.info("browser compatibility",JSON.stringify(dA),JSON.stringify(e))}))}(),function(){let e;try{e=window.localStorage.getItem("websdk_ng_global_parameter")}catch(e){return void $C.error("Error loading sdk config",e.message)}if(e)try{const t=JSON.parse(window.atob(e)),i=Date.now();$C.debug("Loading global parameters from cache",t),Object.keys(t).forEach((e=>{if(Object.prototype.hasOwnProperty.call(LC,e)){const{value:n,expires:r}=t[e];if(r&&r<=i)return;DC[e]=n,LC[e]=n}}))}catch(t){$C.error("Error loading mutableParamsCache: ".concat(e),t.message)}}(),Array.isArray(DC.AREAS)&&DC.AREAS.length>0&&FN(DC.AREAS,!0);const KD=function(e){const t=new r_,i=e,n={getListeners:t.getListeners.bind(t),on:(e,i)=>(function(e,t){e===ES.SECURITY_POLICY_VIOLATION&&WD(t,!0)}(e,i),t.on.bind(t)(e,i)),addListener:t.addListener.bind(t),once:t.once.bind(t),off:t.off.bind(t),removeAllListeners:t.removeAllListeners.bind(t),emit:t.emit.bind(t),safeEmit:t.safeEmit.bind(t)};return $D($D({},i),n)}({__TRACK_LIST__:OT,VERSION:IC,BUILD:NC,ESM_BUNDLER:!1,ESM:!1,UMD:!0,DEV:!1,setParameter:(e,t,i)=>{$C.debug("setParameter key:".concat(e,", value:").concat(JSON.stringify(t))),MC(e,t,i)},getParameter:xC,getSupportedCodec:async function(){let e={audio:[],video:[]};try{let t=new RTCPeerConnection;t.addTransceiver("video",{direction:"recvonly"}),t.addTransceiver("audio",{direction:"recvonly"});const i=(await t.createOffer()).sdp;if(!i)return e;t.close(),t=null,e=function(e){const t={video:[],audio:[]};return e.match(/ VP8/i)&&t.video.push("VP8"),e.match(/ VP9/i)&&t.video.push("VP9"),e.match(/ AV1/i)&&t.video.push("AV1"),e.match(/ H264/i)&&t.video.push("H264"),e.match(/ H265/i)&&t.video.push("H265"),e.match(/ opus/i)&&t.audio.push("OPUS"),e.match(/ PCMU/i)&&t.audio.push("PCMU"),e.match(/ PCMA/i)&&t.audio.push("PCMA"),e.match(/ G722/i)&&t.audio.push("G722"),t}(i)}catch(e){throw new Dw(Bb.CREATE_OFFER_FAILED,e.toString&&e.toString()).print()}return e},checkSystemRequirements:function(){const e=nw.reportApiInvoke(null,{name:a_.CHECK_SYSTEM_REQUIREMENTS,options:[],tag:s_.TRACER});let t=!1;try{const e=window.RTCPeerConnection,i=navigator.mediaDevices&&navigator.mediaDevices.getUserMedia,n=window.WebSocket;t=!!(e&&i&&n)}catch(e){return $C.error("check system requirement failed: ",e),!1}let i=!1;const n=pb();n.name===lb.CHROME&&Number(n.version)>=58&&(!_b()||bb())&&(i=!0),n.name===lb.FIREFOX&&Number(n.version)>=56&&(i=!0),n.name===lb.OPERA&&Number(n.version)>=45&&(i=!0),n.name===lb.SAFARI&&Number(n.version)>=11&&(i=!0),(Mb()||pb().name===lb.QQ)&&(i=!0),$C.debug("checkSystemRequirements, api:",t,"browser",i);const r=t&&i;return e.onSuccess(r),r},getDevices:function(e){return AA.enumerateDevices(!0,!0,e)},getMicrophones:function(e){return AA.getRecordingDevices(e)},getCameras:function(e){return AA.getCamerasDevices(e)},getElectronScreenSources:vA,getPlaybackDevices:function(e){return AA.getSpeakers(e)},createClient:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{codec:"vp8",audioCodec:"opus",mode:"rtc"};const t=nw.reportApiInvoke(null,{name:a_.CREATE_CLIENT,options:[e],tag:s_.TRACER});try{!function(e){jb(e.codec,"config.codec",["vp8","vp9","av1","h264","h265"]),jb(e.mode,"config.mode",["rtc","live"]),void 0!==e.audioCodec&&jb(e.audioCodec,"config.audioCodec",["opus","pcmu","pcma","g722"]),void 0!==e.proxyServer&&zb(e.proxyServer,"config.proxyServer",1,1e4),void 0!==e.turnServer&&m_(e.turnServer),void 0!==e.httpRetryConfig&&p_(e.httpRetryConfig),void 0!==e.websocketRetryConfig&&p_(e.websocketRetryConfig)}(e)}catch(e){throw t.onError(e),e}return void 0===e.audioCodec&&(e.audioCodec="opus"),t.onSuccess(),new PD(DD(DD({forceWaitGatewayResponse:!0},e),{},{role:"rtc"===e.mode?"host":e.role||"audience"}))},createCameraVideoTrack:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_CAM_VIDEO_TRACK,options:[yR({},e)]}),i=JA(e),n=B_(8,"track-cam-");let r=null;$C.info("start create camera video track with config",JSON.stringify(e),"trackId",n);try{r=(await CA({video:i},n)).getVideoTracks()[0]||null}catch(e){throw t.onError(e),e}if(!r){const e=new Fb(Bb.UNEXPECTED_ERROR,"can not find track in media stream");return t.onError(e),e.throw($C)}e.optimizationMode&&ER(n,r,e,wT(e.encoderConfig));const s=new bR(r,e,i,e.scalabiltyMode?TT(e.scalabiltyMode):{numSpatialLayers:1,numTemporalLayers:1},e.optimizationMode,n);return t.onSuccess(s.getTrackId()),$C.info("create camera video success, trackId:",n),s},createCustomVideoTrack:function(e){const t=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_CUSTOM_VIDEO_TRACK,options:[e]}),i=new vR(e.mediaStreamTrack,{width:e.width,height:e.height,frameRate:e.frameRate,bitrateMax:e.bitrateMax,bitrateMin:e.bitrateMin},e.scalabiltyMode?TT(e.scalabiltyMode):{numSpatialLayers:1,numTemporalLayers:1},e.optimizationMode,B_(8,"track-cus-"),[NT.CUSTOM_TRACK]);return t.onSuccess(i.getTrackId()),$C.info("create custom video track success with config",e,"trackId",i.getTrackId()),i},createScreenVideoTrack:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"disable";const i=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_SCREEN_VIDEO_TRACK,options:[yR({},e),t]});e.encoderConfig?"string"==typeof e.encoderConfig||e.encoderConfig.width&&e.encoderConfig.height||(e.encoderConfig.width={max:1920},e.encoderConfig.height={max:1080}):e.encoderConfig="1080p_2";const n=function(e){const t={};e.screenSourceType&&(t.mediaSource=e.screenSourceType),e.extensionId&&yb()&&(t.extensionId=e.extensionId);const{displaySurface:i,selfBrowserSurface:n,surfaceSwitching:r,systemAudio:s}=e;(Sb(107)||Tb(107)||Ab(93))&&(i&&(jb(i,"displaySurface",["browser","window","monitor"]),t.displaySurface=i),n?(jb(n,"selfBrowserSurface",["exclude","include"]),t.selfBrowserSurface=n):t.selfBrowserSurface="include",r&&(jb(r,"surfaceSwitching",["exclude","include"]),t.surfaceSwitching=r)),(Sb(105)||Tb(105)||Ab(91))&&s&&(jb(s,"systemAudio",["exclude","include"]),t.systemAudio=s),e.electronScreenSourceId&&(t.sourceId=e.electronScreenSourceId);const o=e.encoderConfig?ST(e.encoderConfig):null;return t.mandatory={chromeMediaSource:"desktop",maxWidth:o?o.width:void 0,maxHeight:o?o.height:void 0},o&&(o.frameRate&&("number"==typeof o.frameRate?(t.mandatory.maxFrameRate=o.frameRate,t.mandatory.minFrameRate=o.frameRate):(t.mandatory.maxFrameRate=o.frameRate.max||o.frameRate.ideal||o.frameRate.exact||void 0,t.mandatory.minFrameRate=o.frameRate.min||o.frameRate.ideal||o.frameRate.exact||void 0),t.frameRate=o.frameRate),o.width&&(t.width=o.width),o.height&&(t.height=o.height)),t}(e),r=B_(8,"track-scr-v-");let s=null,o=null;const a=uA();if(!a.supportShareAudio&&"enable"===t){const e=new Fb(Bb.NOT_SUPPORTED,"your browser or platform is not support share-screen with audio");return i.onError(e),e.throw($C)}$C.info("start create screen video track with config",e,"withAudio",t,"trackId",r);try{const e=await CA({screen:n,screenAudio:"auto"===t?a.supportShareAudio:"enable"===t},r);s=e.getVideoTracks()[0]||null,o=e.getAudioTracks()[0]||null}catch(e){throw i.onError(e),e}if(!s){const e=new Fb(Bb.UNEXPECTED_ERROR,"can not find track in media stream");return i.onError(e),e.throw($C)}if(!o&&"enable"===t){s&&s.stop();const e=new Fb(Bb.SHARE_AUDIO_NOT_ALLOWED);return i.onError(e),e.throw($C)}e.optimizationMode||(e.optimizationMode="detail"),e.optimizationMode&&(ER(r,s,e,e.encoderConfig&&ST(e.encoderConfig)||void 0),e.encoderConfig&&"string"!=typeof e.encoderConfig&&(e.encoderConfig.bitrateMin=e.encoderConfig.bitrateMax));const c=new vR(s,e.encoderConfig?ST(e.encoderConfig):{},e.scalabiltyMode?TT(e.scalabiltyMode):{numSpatialLayers:1,numTemporalLayers:1},e.optimizationMode,r,[NT.SCREEN_TRACK]);if(!o)return i.onSuccess(c.getTrackId()),$C.info("create screen video track success","video:",c.getTrackId()),c;const l=new YA(o,void 0,B_(8,"track-scr-a-"),!1,!0);return i.onSuccess([c.getTrackId(),l.getTrackId()]),$C.info("create screen video track success","video:",c.getTrackId(),"audio:",l.getTrackId()),[c,l]},createMicrophoneAndCameraTracks:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const i=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_MIC_AND_CAM_TRACKS,options:[e,t]}),n=JA(t),r=eR(e),s=B_(8,"track-mic-"),o=B_(8,"track-cam-");let a=null,c=null;$C.info("start create camera video track(".concat(o,") and microphone audio track(").concat(s,") with config, audio: ").concat(JSON.stringify(e),", video: ").concat(JSON.stringify(t)));try{const e=await CA({audio:r,video:n},"".concat(s,"-").concat(o));a=e.getAudioTracks()[0],c=e.getVideoTracks()[0]}catch(e){throw i.onError(e),e}if(!a||!c){const e=new Fb(Bb.UNEXPECTED_ERROR,"can not find tracks in media stream");return i.onError(e),e.throw($C)}t.optimizationMode&&ER(o,c,t,wT(t.encoderConfig));const l=new XA(a,e,r,s),d=new bR(c,t,n,t.scalabiltyMode?TT(t.scalabiltyMode):{numSpatialLayers:1,numTemporalLayers:1},t.optimizationMode,o);return i.onSuccess([l.getTrackId(),d.getTrackId()]),$C.info("create camera video track(".concat(o,") and microphone audio track(").concat(s,") success")),[l,d]},createMicrophoneAudioTrack:async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_MIC_AUDIO_TRACK,options:[e]}),i=eR(e),n=B_(8,"track-mic-");let r=null;$C.info("start create microphone audio track with config",JSON.stringify(e),"trackId",n);try{r=(await CA({audio:i},n)).getAudioTracks()[0]||null}catch(e){throw t.onError(e),e}if(!r){const e=new Fb(Bb.UNEXPECTED_ERROR,"can not find track in media stream");return t.onError(e),e.throw($C)}const s=new XA(r,e,i,n);return t.onSuccess(s.getTrackId()),$C.info("create microphone audio track success, trackId:",n),s},createCustomAudioTrack:function(e){const t=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_CUSTOM_AUDIO_TRACK,options:[e]}),i=new YA(e.mediaStreamTrack,e.encoderConfig?RT(e.encoderConfig):{},B_(8,"track-cus-"),!1,!0);return $C.info("create custom audio track success with config",e,"trackId",i.getTrackId()),t.onSuccess(i.getTrackId()),i},createBufferSourceAudioTrack:async function(e){var t;const{cacheOnlineFile:i,encoderConfig:n}=e;let{source:r}=e;const s={source:r instanceof AudioBuffer?"AudioBuffer":r instanceof File?null!==(t=File.name)&&void 0!==t?t:"File":r,cacheOnlineFile:i,encoderConfig:n},o=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CREATE_BUFFER_AUDIO_TRACK,options:[s]});if(xC("DISABLE_WEBAUDIO"))throw new Fb(Bb.NOT_SUPPORTED,"can not create BufferSourceAudioTrack when WebAudio disabled");const a=B_(8,"track-buf-");$C.info("start create buffer source audio track with config",JSON.stringify(s),"trackId",a);const c=r;if(!(r instanceof AudioBuffer))try{r=await rR(r,i)}catch(e){return o.onError(e),e.throw($C)}const l=new tR(r),d=new ZA(c,l,n?RT(n):{},a);return $C.info("create buffer source audio track success, trackId:",a),o.onSuccess(d.getTrackId()),d},setAppType:function(e){if($C.debug("setAppType: ".concat(e)),!(Number.isInteger(e)&&e>=0))throw $C.debug("Invalid appType"),new Dw(Bb.INVALID_PARAMS,"invalid app type",e);MC("APP_TYPE",Math.floor(e))},setLogLevel:function(e){$C.setLogLevel(e)},enableLogUpload:function(){xC("USE_NEW_LOG")?MC("UPLOAD_LOG",!0):$C.enableLogUpload()},disableLogUpload:function(){xC("USE_NEW_LOG")?MC("UPLOAD_LOG",!1):$C.disableLogUpload()},createChannelMediaRelayConfiguration:function(){return new bL},checkAudioTrackIsActive:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;const i=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CHECK_AUDIO_TRACK_IS_ACTIVE,options:[t]});if(!(e instanceof YA||e instanceof AR)){const e=new Dw(Bb.INVALID_TRACK,"the parameter is not a audio track");return i.onError(e),e.throw()}t&&t<1e3&&(t=1e3);const n=e instanceof YA?e.getTrackLabel():"remote_track",r=e.getVolumeLevel();let s=r,o=r;const a=Date.now();return new nb((r=>{const c=setInterval((()=>{const l=e.getVolumeLevel();s=l>s?l:s,o=l<o?l:o;const d=s-o>1e-4,h=Date.now()-a;if(d||h>t){clearInterval(c);const t=d,o={duration:h,deviceLabel:n,maxVolumeLevel:s,result:t};$C.info("[track-".concat(e.getTrackId(),"] check audio track active completed. ").concat(JSON.stringify(o))),i.onSuccess(o),r(t)}}),200)}))},checkVideoTrackIsActive:async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;const i=nw.reportApiInvoke(null,{tag:s_.TRACER,name:a_.CHECK_VIDEO_TRACK_IS_ACTIVE,options:[t]});if(!(e instanceof vR||e instanceof TR)){const e=new Dw(Bb.INVALID_TRACK,"the parameter is not a video track");return i.onError(e),e.throw()}t&&t<1e3&&(t=1e3);const n=e instanceof vR?e.getTrackLabel():"remote_track",r=e.getMediaStreamTrack(!0),s=document.createElement("video");s.style.width="1px",s.style.height="1px",s.setAttribute("muted",""),s.muted=!0,s.setAttribute("playsinline",""),s.controls=!1,(Eb()||vb())&&(s.style.opacity="0.01",s.style.position="fixed",s.style.left="0",s.style.top="0",document.body.appendChild(s)),s.srcObject=new MediaStream([r]),s.play();const o=document.createElement("canvas");o.width=160,o.height=120;let a=0,c=0;try{const e=Date.now();a=await function(e,t,i,n){let r,s=0,o=null;return new nb(((a,c)=>{function l(){s>n&&r&&(r(),a(s));const t=i.getContext("2d");if(!t){const e=new Dw(Bb.UNEXPECTED_ERROR,"can not get canvas 2d context.");return $C.error(e.toString()),void c(e)}t.drawImage(e,0,0,160,120);const l=t.getImageData(0,0,i.width,i.height),d=Math.floor(l.data.length/3);if(o){for(let e=0;e<d;e+=3)if(l.data[e]!==o[e])return s+=1,void(o=l.data);o=l.data}else o=l.data}setTimeout((()=>{r&&(r(),a(s))}),t),r=lA((()=>{l()}),30)}))}(s,t,o,4),c=Date.now()-e}catch(e){throw i.onError(e),e}UD===lb.SAFARI&&(s.pause(),s.remove()),s.srcObject=null;const l=a>4,d={duration:c,changedPicNum:a,deviceLabel:n,result:l};return $C.info("[track-".concat(e.getTrackId(),"] check video track active completed. ").concat(JSON.stringify(d))),i.onSuccess(d),l},setArea:FN,audioElementPlayCenter:xA,processExternalMediaAEC:function(e){jD.processExternalMediaAEC(e)},registerExtensions:function(e){e.forEach((e=>{const t=e;t.__registered__=!0,t.logger.hookLog=$C.extLog,t.reporter.hookApiInvoke=nw.extApiInvoke,t.parameters&&Object.keys(t.parameters).forEach((e=>{t.parameters[e]=xC(e)}))}))},ChannelMediaRelayError:Xw,ChannelMediaRelayEvent:qw,ChannelMediaRelayState:Yw,RemoteStreamFallbackType:xT,RemoteStreamType:MT,ConnectionDisconnectedReason:l_,AudienceLatencyLevelType:c_,AREAS:nS});return Object.defineProperties(KD,{onAudioAutoplayFailed:{get:()=>OA.onAudioAutoplayFailed,set:e=>{OA.onAudioAutoplayFailed=e}},onAutoplayFailed:{get:()=>OA.onAutoplayFailed,set:e=>{OA.onAutoplayFailed=e}},_onSecurityPolicyViolation:{value:void 0,writable:!0},_cspEventHandlerPointer:{value:void 0,writable:!0},onSecurityPolicyViolation:{get:()=>KD._onSecurityPolicyViolation,set(e){KD._onSecurityPolicyViolation=e,WD(e)}},__CLIENT_LIST__:{get:()=>xC("SHOW_GLOBAL_CLIENT_LIST")?aw:[]}}),AA.on(qT.CAMERA_DEVICE_CHANGED,(e=>{$C.info("camera device changed",JSON.stringify(e)),KD.onCameraChanged&&KD.onCameraChanged(e),KD.safeEmit(ES.CAMERA_CHANGED,e)})),AA.on(qT.RECORDING_DEVICE_CHANGED,(e=>{$C.info("microphone device changed",JSON.stringify(e)),KD.onMicrophoneChanged&&KD.onMicrophoneChanged(e),KD.safeEmit(ES.MICROPHONE_CHANGED,e)})),AA.on(qT.PLAYOUT_DEVICE_CHANGED,(e=>{$C.debug("playout device changed",JSON.stringify(e)),KD.onPlaybackDeviceChanged&&KD.onPlaybackDeviceChanged(e),KD.safeEmit(ES.PLAYBACK_DEVICE_CHANGED,e)})),xA.onAutoplayFailed=()=>{$C.info("detect audio element autoplay failed"),OA.onAudioAutoplayFailed&&OA.onAudioAutoplayFailed()},rA.on("autoplay-failed",(()=>{$C.info("detect webaudio autoplay failed"),OA.onAudioAutoplayFailed&&OA.onAudioAutoplayFailed(),KD.safeEmit(ES.AUTOPLAY_FAILED)})),C_.on(f_.NETWORK_STATE_CHANGE,((e,t)=>{$C.info("[network-indicator] network state changed, ".concat(t," => ").concat(e))})),window&&(window.__ARTC__=KD),KD}()}).call(this,n(23),n(42),n(46).Buffer)},function(e,t,n){(function(t){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function r(e,t,n){if("string"!=typeof e)return new r.Bootstrap(e,t,n);var o=document.querySelectorAll(e);t&&t.iframe_document&&(o=t.iframe_document.querySelectorAll(e));for(var a=[],c=0;c<o.length;c++){var i=o[c]["data-froala.editor"];i?a.push(i):a.push(new r.Bootstrap(o[c],t,n))}return 1==a.length?a[0]:a}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a)for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},writable:!0,configurable:!0}),function(){var i=/^\s*:scope/gi,s=/,\s*:scope/gi,e=document.createElement("div");function t(t,n){var r=t[n];t[n]=function(t){var n,o=!1,c=!1;if(!t||Array.isArray(t)||!t.match(i)&&!t.match(s))return r.call(this,t);this.parentNode||(e.appendChild(this),c=!0);var a=this.parentNode;return this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),o=!0),n=r.call(a,t.replace(i,"#".concat(this.id)).replace(s,",#".concat(this.id))),o&&(this.id=""),c&&e.removeChild(this),n}}try{var n=e.querySelectorAll(":scope *");if(!n||Array.isArray(n))throw"error"}catch(e){t(Element.prototype,"querySelector"),t(Element.prototype,"querySelectorAll"),t(HTMLElement.prototype,"querySelector"),t(HTMLElement.prototype,"querySelectorAll")}}(),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){if("Element"in e){var t="classList",n="prototype",r=e.Element[n],a=Object,o=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(""===t)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return i.call(e,t)},l=function(e){for(var t=o.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,a=n.length;r<a;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},d=l[n]=[],h=function(){return new l(this)};if(s[n]=Error[n],d.item=function(e){return this[e]||null},d.contains=function(e){return~c(this,e+"")},d.add=function(){for(var e,t=arguments,n=0,r=t.length,a=!1;e=t[n]+"",~c(this,e)||(this.push(e),a=!0),++n<r;);a&&this._updateClassName()},d.remove=function(){var e,t,n=arguments,r=0,a=n.length,o=!1;do{for(e=n[r]+"",t=c(this,e);~t;)this.splice(t,1),o=!0,t=c(this,e)}while(++r<a);o&&this._updateClassName()},d.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&"remove":!1!==t&&"add";return r&&this[r](e),!0===t||!1===t?t:!n},d.replace=function(e,t){var n=c(e+"");~n&&(this.splice(n,1,t),this._updateClassName())},d.toString=function(){return this.join(" ")},a.defineProperty){var p={get:h,enumerable:!0,configurable:!0};try{a.defineProperty(r,t,p)}catch(e){void 0!==e.number&&-2146823252!==e.number||(p.enumerable=!1,a.defineProperty(r,t,p))}}else a[n].__defineGetter__&&r.__defineGetter__(t,h)}}(self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,r=arguments.length;for(n=0;n<r;n++)e=arguments[n],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(" "),r=n.indexOf(e+"");~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}()),r.RegisterPlugins=function(e){for(var t=0;t<e.length;t++)e[t].call(r)},Object.assign(r,{DEFAULTS:{initOnClick:!1,pluginsEnabled:null},MODULES:{},PLUGINS:{},VERSION:"4.0.10",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),r.MODULES.node=function(i){var e=i.$;function s(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]}function t(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&0<=r.BLOCK_TAGS.indexOf(e.tagName.toLowerCase())}function n(e){var t={},n=e.attributes;if(n)for(var r=0;r<n.length;r++){var a=n[r];t[a.nodeName]=a.value}return t}function o(e){for(var t="",r=n(e),o=Object.keys(r).sort(),a=0;a<o.length;a++){var c=o[a],i=r[c];i.indexOf("'")<0&&0<=i.indexOf('"')?t+=" ".concat(c,"='").concat(i,"'"):(0<=i.indexOf('"')&&0<=i.indexOf("'")&&(i=i.replace(/"/g,"&quot;")),t+=" ".concat(c,'="').concat(i,'"'))}return t}function c(e){return e===i.el}return{isBlock:t,isEmpty:function(e,n){if(!e)return!0;if(e.querySelector("table"))return!1;var o=s(e);1===o.length&&t(o[0])&&(o=s(o[0]));for(var c=!1,a=0;a<o.length;a++){var l=o[a];if(!(n&&i.node.hasClass(l,"fr-marker")||l.nodeType===Node.TEXT_NODE&&0===l.textContent.length)){if("BR"!==l.tagName&&0<(l.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(c)return!1;"BR"===l.tagName&&(c=!0)}}return!(e.querySelectorAll(r.VOID_ELEMENTS.join(",")).length-e.querySelectorAll("br").length||e.querySelector("".concat(i.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<e.querySelectorAll(r.BLOCK_TAGS.join(",")).length||e.querySelector("".concat(i.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)")))},blockParent:function(e){for(;e&&e.parentNode!==i.el&&(!e.parentNode||!i.node.hasClass(e.parentNode,"fr-inner"));)if(t(e=e.parentNode))return e;return null},deepestParent:function(e,n,o){if(void 0===n&&(n=[]),void 0===o&&(o=!0),n.push(i.el),0<=n.indexOf(e.parentNode)||e.parentNode&&i.node.hasClass(e.parentNode,"fr-inner")||e.parentNode&&0<=r.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)&&o)return null;for(;n.indexOf(e.parentNode)<0&&e.parentNode&&!i.node.hasClass(e.parentNode,"fr-inner")&&(r.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)<0||!o)&&(!t(e)||t(e.parentNode))&&(!t(e)||!t(e.parentNode)||!o);)e=e.parentNode;return e},rawAttributes:n,attributes:o,clearAttributes:function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--){var r=t[n];e.removeAttribute(r.nodeName)}},openTagString:function(e){return"<".concat(e.tagName.toLowerCase()).concat(o(e),">")},closeTagString:function(e){return"</".concat(e.tagName.toLowerCase(),">")},isFirstSibling:function e(t,n){void 0===n&&(n=!0);for(var r=t.previousSibling;r&&n&&i.node.hasClass(r,"fr-marker");)r=r.previousSibling;return!r||r.nodeType===Node.TEXT_NODE&&""===r.textContent&&e(r)},isLastSibling:function g(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&i.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&g(n)},isList:function(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:c,contents:s,isVoid:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=r.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function(e){return e===i.doc.activeElement&&(!i.doc.hasFocus||i.doc.hasFocus())&&Boolean(c(e)||e.type||e.href||~e.tabIndex)},isEditable:function(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function(t,n){return t instanceof e&&(t=t.get(0)),t&&t.classList&&t.classList.contains(n)},filter:function(e){return i.browser.msie?e:{acceptNode:e}}}},Object.assign(r.DEFAULTS,{DOMPurify:window.DOMPurify,htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"],htmlRemoveTags:["script","style"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap"],htmlAllowedStyleProps:[".*"],htmlAllowComments:!0,htmlUntouched:!1,fullPage:!1}),r.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},r.MODULES.clean=function(e){var t,p,u,n,g=e.$;function a(t){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("class")&&0<=t.getAttribute("class").indexOf("fr-marker"))return!1;var n,r=e.node.contents(t),o=[];for(n=0;n<r.length;n++)r[n].nodeType!==Node.ELEMENT_NODE||e.node.isVoid(r[n])?r[n].nodeType===Node.TEXT_NODE&&(r[n].textContent=r[n].textContent.replace(/\u200b/g,"")):r[n].textContent.replace(/\u200b/g,"").length!==r[n].textContent.length&&a(r[n]);if(t.nodeType===Node.ELEMENT_NODE&&!e.node.isVoid(t)&&(t.normalize(),r=e.node.contents(t),o=t.querySelectorAll(".fr-marker"),r.length-o.length==0)){for(n=0;n<r.length;n++)if(r[n].nodeType===Node.ELEMENT_NODE&&(r[n].getAttribute("class")||"").indexOf("fr-marker")<0)return!1;for(n=0;n<o.length;n++)t.parentNode.insertBefore(o[n].cloneNode(!0),t);return t.parentNode.removeChild(t),!1}}function s(t,n){if(t.nodeType===Node.COMMENT_NODE)return"\x3c!--".concat(t.nodeValue,"--\x3e");if(t.nodeType===Node.TEXT_NODE)return n?t.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;").replace(/\u0009/g,"");if(t.nodeType!==Node.ELEMENT_NODE)return t.outerHTML;if(t.nodeType===Node.ELEMENT_NODE&&0<=["STYLE","SCRIPT","NOSCRIPT"].indexOf(t.tagName))return t.outerHTML;if(t.nodeType===Node.ELEMENT_NODE&&"svg"===t.tagName){var r=document.createElement("div"),o=t.cloneNode(!0);return r.appendChild(o),r.innerHTML}if("IFRAME"===t.tagName)return t.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">");var a=t.childNodes;if(0===a.length)return t.outerHTML;for(var c="",i=0;i<a.length;i++)"PRE"===t.tagName&&(n=!0),c+=s(a[i],n);return e.node.openTagString(t)+c+e.node.closeTagString(t)}var o=[];function c(e){var t=e.replace(/;;/gi,";");return";"!==(t=t.replace(/^;/gi,"")).charAt(t.length)&&(t+=";"),t}function l(t){var r;for(r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var o=r.match(u),l=null;"style"===r&&e.opts.htmlAllowedStyleProps.length&&(l=t[r].match(n)),o&&l?t[r]=c(l.join(";")):o&&("style"!==r||l)||delete t[r]}for(var a="",d=Object.keys(t).sort(),i=0;i<d.length;i++)t[r=d[i]].indexOf('"')<0?a+=" ".concat(r,'="').concat(t[r],'"'):a+=" ".concat(r,"='").concat(t[r],"'");return a}function d(t,n){var r,o=document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");g(o).append(t);var a="";if(o){var c=e.node.contents(o);for(r=0;r<c.length;r++)n(c[r]);for(c=e.node.contents(o),r=0;r<c.length;r++)a+=s(c[r])}return a}function b(t,n,r){var c=t=function(e){return o=[],(e=(e=(e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,(function(e){return o.push(e),"[FROALA.EDITOR.SCRIPT ".concat(o.length-1,"]")}))).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi,(function(e){return o.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(o.length-1,"]")}))).replace(/<meta((?:[\w\W]*?)) http-equiv="/g,'<meta$1 data-fr-http-equiv="')).replace(/<img((?:[\w\W]*?)) src="/g,'<img$1 data-fr-src="')}(t),a=null;return e.opts.fullPage&&(c=e.html.extractNode(t,"body")||(0<=t.indexOf("<body")?"":t),r&&(a=e.html.extractNode(t,"head")||"")),c=d(c,n),a&&(a=d(a,n)),function(t){return(t=(t=t.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi,(function(t,n){return 0<=e.opts.htmlRemoveTags.indexOf("script")?"":o[parseInt(n,10)]}))).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi,(function(t,n){if(0<=e.opts.htmlRemoveTags.indexOf("noscript"))return"";var r=o[parseInt(n,10)].replace(/&lt;/g,"<").replace(/&gt;/g,">"),c=g(r);if(c&&c.length){var a=d(c.html(),f);c.html(a),r=c.get(0).outerHTML}return r}))).replace(/<img((?:[\w\W]*?)) data-fr-src="/g,'<img$1 src="')}(function(t,n,r){if(e.opts.fullPage){var o=e.html.extractDoctype(r),a=l(e.html.extractNodeAttrs(r,"html"));n=null===n?e.html.extractNode(r,"head")||"<title></title>":n;var c=l(e.html.extractNodeAttrs(r,"head")),i=l(e.html.extractNodeAttrs(r,"body"));return"".concat(o,"<html").concat(a,"><head").concat(c,">").concat(n,"</head><body").concat(i,">").concat(t,"</body></html>")}return t}(c,a,t))}function h(t){var n=e.doc.createElement("DIV");return n.innerText=t,n.textContent}function f(o){for(var l=e.node.contents(o),d=0;d<l.length;d++)l[d].nodeType!==Node.TEXT_NODE&&f(l[d]);!function(i){if("SPAN"===i.tagName&&0<=(i.getAttribute("class")||"").indexOf("fr-marker"))return!1;if("PRE"===i.tagName&&function(e){var t=e.innerHTML;0<=t.indexOf("\n")&&(e.innerHTML=t.replace(/\n/g,"<br>"))}(i),i.nodeType===Node.ELEMENT_NODE&&(i.getAttribute("data-fr-src")&&0!==i.getAttribute("data-fr-src").indexOf("blob:")&&i.setAttribute("data-fr-src",e.helpers.sanitizeURL(h(i.getAttribute("data-fr-src")))),i.getAttribute("href")&&i.setAttribute("href",e.helpers.sanitizeURL(h(i.getAttribute("href")))),i.getAttribute("src")&&i.setAttribute("src",e.helpers.sanitizeURL(h(i.getAttribute("src")))),i.getAttribute("srcdoc")&&i.setAttribute("srcdoc",e.clean.html(i.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(i.tagName)&&(i.innerHTML=i.innerHTML.trim())),!e.opts.pasteAllowLocalImages&&i.nodeType===Node.ELEMENT_NODE&&"IMG"===i.tagName&&i.getAttribute("data-fr-src")&&0===i.getAttribute("data-fr-src").indexOf("file://"))return i.parentNode.removeChild(i),!1;if(i.nodeType===Node.ELEMENT_NODE&&r.HTML5Map[i.tagName]&&""===e.node.attributes(i)){var o=r.HTML5Map[i.tagName],l="<".concat(o,">").concat(i.innerHTML,"</").concat(o,">");i.insertAdjacentHTML("beforebegin",l),(i=i.previousSibling).parentNode.removeChild(i.nextSibling)}if(e.opts.htmlAllowComments||i.nodeType!==Node.COMMENT_NODE)if(i.tagName&&i.tagName.match(p))"STYLE"==i.tagName&&e.helpers.isMac()&&function(){var e,t=i.innerHTML.trim(),n=[],r=/{([^}]+)}/g;for(t=t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|<!--[\s\S]*?-->$/,"");e=r.exec(t);)n.push(e[1]);for(var a=function(e){var r=t.substring(0,t.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(r)&&i.parentNode.querySelectorAll(r).forEach((function(t){t.removeAttribute("class"),t.setAttribute("style",n[e])})),t=t.substring(t.indexOf("}")+1)},o=0;-1!=t.indexOf("{");o++)a(o)}(),i.parentNode.removeChild(i);else if(i.tagName&&!i.tagName.match(t))"svg"===i.tagName?i.parentNode.removeChild(i):e.browser.safari&&"path"===i.tagName&&i.parentNode&&"svg"===i.parentNode.tagName||(i.outerHTML=i.innerHTML);else{var d=i.attributes;if(d)for(var f=d.length-1;0<=f;f--){var a=d[f],m=a.nodeName.match(u),s=null;"style"===a.nodeName&&e.opts.htmlAllowedStyleProps.length&&(s=a.value.match(n)),m&&s?a.value=c(s.join(";")):m&&("style"!==a.nodeName||s)||i.removeAttribute(a.nodeName)}}else 0!==i.data.indexOf("[FROALA.EDITOR")&&i.parentNode.removeChild(i)}(o)}return{_init:function(){e.opts.fullPage&&g.merge(e.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function(r,o,c,l){void 0===o&&(o=[]),void 0===c&&(c=[]),void 0===l&&(l=!1);var a,d=g.merge([],e.opts.htmlAllowedTags);for(a=0;a<o.length;a++)0<=d.indexOf(o[a])&&d.splice(d.indexOf(o[a]),1);var i=g.merge([],e.opts.htmlAllowedAttrs);for(a=0;a<c.length;a++)0<=i.indexOf(c[a])&&i.splice(i.indexOf(c[a]),1);return i.push("data-fr-.*"),i.push("fr-.*"),t=new RegExp("^".concat(d.join("$|^"),"$"),"gi"),u=new RegExp("^".concat(i.join("$|^"),"$"),"gi"),p=new RegExp("^".concat(e.opts.htmlRemoveTags.join("$|^"),"$"),"gi"),n=e.opts.htmlAllowedStyleProps.length?new RegExp("((^|;|\\s)".concat(e.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"),":.+?(?=(;)|$))"),"gi"):null,r=b(r,f,!0),void 0!==e.opts.DOMPurify&&(r=e.opts.DOMPurify.sanitize(r)),r},toHTML5:function(){var t=e.el.querySelectorAll(Object.keys(r.HTML5Map).join(","));if(t.length){var n=!1;e.el.querySelector(".fr-marker")||(e.selection.save(),n=!0);for(var o=0;o<t.length;o++)""===e.node.attributes(t[o])&&g(t[o]).replaceWith("<".concat(r.HTML5Map[t[o].tagName],">").concat(t[o].innerHTML,"</").concat(r.HTML5Map[t[o].tagName],">"));n&&e.selection.restore()}},tables:function(){!function(){for(var t=e.el.querySelectorAll("tr"),n=0;n<t.length;n++){for(var r=t[n].children,o=!0,a=0;a<r.length;a++)if("TH"!==r[a].tagName){o=!1;break}if(!1!==o&&0!==r.length){for(var c=t[n];c&&"TABLE"!==c.tagName&&"THEAD"!==c.tagName;)c=c.parentNode;var i=c;"THEAD"!==i.tagName&&(i=e.doc.createElement("THEAD"),c.insertBefore(i,c.firstChild)),i.appendChild(t[n])}}}()},lists:function(){!function(){var t,n=[];do{if(n.length){var r=n[0],o=e.doc.createElement("ul");r.parentNode.insertBefore(o,r);do{var a=r;r=r.nextSibling,o.appendChild(a)}while(r&&"LI"===r.tagName)}n=[];for(var c=e.el.querySelectorAll("li"),i=0;i<c.length;i++)t=c[i],e.node.isList(t.parentNode)||n.push(c[i])}while(0<n.length)}(),function(){for(var t=e.el.querySelectorAll("ol + ol, ul + ul"),n=0;n<t.length;n++){var r=t[n];if(e.node.isList(r.previousSibling)&&e.node.openTagString(r)===e.node.openTagString(r.previousSibling)){for(var o=e.node.contents(r),a=0;a<o.length;a++)r.previousSibling.appendChild(o[a]);r.parentNode.removeChild(r)}}}(),function(){for(var t=e.el.querySelectorAll("ul, ol"),n=0;n<t.length;n++)for(var r=e.node.contents(t[n]),o=null,a=r.length-1;0<=a;a--)!r[a].tagName&&e.opts.htmlUntouched||"LI"===r[a].tagName||"UL"==r[a].tagName||"OL"==r[a].tagName?o=null:"BR"==r[a].tagName?g(r[a]).remove():(o||(o=g(e.doc.createElement("LI"))).insertBefore(r[a]),o.prepend(r[a]))}(),function(){var t,n,r;do{n=!1;var o=e.el.querySelectorAll("li:empty");for(t=0;t<o.length;t++)o[t].parentNode.removeChild(o[t]);var a=e.el.querySelectorAll("ul, ol");for(t=0;t<a.length;t++)(r=a[t]).querySelector("LI")||(n=!0,r.parentNode.removeChild(r))}while(!0===n)}(),function(){for(var t=e.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"),n=0;n<t.length;n++){var r=t[n],o=r.previousSibling;o&&("LI"===o.tagName?o.appendChild(r):g(r).wrap("<li></li>"))}}(),function(){for(var t=e.el.querySelectorAll("li > ul, li > ol"),n=0;n<t.length;n++){var r=t[n];if(r.nextSibling)for(var o=r.nextSibling;0<o.childNodes.length;)r.append(o.childNodes[0])}}(),function(){for(var t=e.el.querySelectorAll("li > ul, li > ol"),n=0;n<t.length;n++){var r=t[n];if(e.node.isFirstSibling(r)&&"none"!=r.parentNode.style.listStyleType)g(r).before("<br/>");else if(r.previousSibling&&"BR"===r.previousSibling.tagName){for(var o=r.previousSibling.previousSibling;o&&e.node.hasClass(o,"fr-marker");)o=o.previousSibling;o&&"BR"!==o.tagName&&g(r.previousSibling).remove()}}}(),function(){for(var t=e.el.querySelectorAll("li:empty"),n=0;n<t.length;n++)g(t[n]).remove()}()},invisibleSpaces:function(t){return t.replace(/\u200b/g,"").length===t.length?t:e.clean.exec(t,a)},exec:b}},r.XS=0,r.SM=1,r.MD=2,r.LG=3,r.LinkRegExCommon="[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.","]{1,}"),r.LinkRegExEnd="((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&amp;\\/~+#-\\'*-_{}]*)|())",r.LinkRegExTLD="((".concat(r.LinkRegExCommon,")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"),r.LinkRegExHTTP="((ftp|http|https):\\/\\/".concat(r.LinkRegExCommon,")"),r.LinkRegExAuth="((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat(r.LinkRegExCommon,")"),r.LinkRegExWWW="(www\\.".concat(r.LinkRegExCommon,"\\.[a-z0-9-]{2,24})"),r.LinkRegEx="(".concat(r.LinkRegExTLD,"|").concat(r.LinkRegExHTTP,"|").concat(r.LinkRegExWWW,"|").concat(r.LinkRegExAuth,")").concat(r.LinkRegExEnd),r.LinkProtocols=["mailto","tel","sms","notes","data"],r.MAIL_REGEX=/.+@.+\..+/i,r.MODULES.helpers=function(t){var i,s=t.$;function n(){var e={},t=function(){var e,t=-1;return"Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),t}();if(0<t)e.msie=!0;else{var n=navigator.userAgent.toLowerCase(),r=/(edge)[ /]([\w.]+)/.exec(n)||/(chrome)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],a=r[1]||"";r[2],r[1]&&(e[a]=!0),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0)}return e.msie&&(e.version=t),e}function o(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!a()}function c(){return/(Android)/g.test(navigator.userAgent)&&!a()}function l(){return/(Blackberry)/g.test(navigator.userAgent)}function a(){return/(Windows Phone)/gi.test(navigator.userAgent)}var d=null;return{_init:function(){t.browser=n()},isIOS:o,isMac:function(){return null===d&&(d=0<=navigator.platform.toUpperCase().indexOf("MAC")),d},isAndroid:c,isBlackberry:l,isWindowsPhone:a,isMobile:function(){return c()||o()||l()},isEmail:function(e){return!/^(https?:|ftps?:|)\/\//i.test(e)&&r.MAIL_REGEX.test(e)},requestAnimationFrame:function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}},getPX:function(e){return parseInt(e,10)||0},screenSize:function(e){try{var n=0;if((n=e?t.$box.width():t.$sc.width())<768)return r.XS;if(768<=n&&n<992)return r.SM;if(992<=n&&n<1200)return r.MD;if(1200<=n)return r.LG}catch(e){return r.LG}},isTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch},sanitizeURL:function(e){return/^(https?:|ftps?:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||new RegExp("^(".concat(r.LinkProtocols.join("|"),"):"),"i").test(e)?e:e=encodeURIComponent(e).replace(/%23/g,"#").replace(/%2F/g,"/").replace(/%25/g,"%").replace(/mailto%3A/gi,"mailto:").replace(/file%3A/gi,"file:").replace(/sms%3A/gi,"sms:").replace(/tel%3A/gi,"tel:").replace(/notes%3A/gi,"notes:").replace(/data%3Aimage/gi,"data:image").replace(/blob%3A/gi,"blob:").replace(/%3A(\d)/gi,":$1").replace(/webkit-fake-url%3A/gi,"webkit-fake-url:").replace(/%3F/g,"?").replace(/%3D/g,"=").replace(/%26/g,"&").replace(/&amp;/g,"&").replace(/%2C/g,",").replace(/%3B/g,";").replace(/%2B/g,"+").replace(/%40/g,"@").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%7B/g,"{").replace(/%7D/g,"}")},isArray:function(t){return t&&!Object.prototype.propertyIsEnumerable.call(t,"length")&&"object"===e(t)&&"number"==typeof t.length},RGBToHex:function(e){function t(e){return"0".concat(parseInt(e,10).toString(16)).slice(-2)}try{return e&&"transparent"!==e?/^#[0-9A-F]{6}$/i.test(e)?e:(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),"#".concat(t(e[1])).concat(t(e[2])).concat(t(e[3])).toUpperCase()):""}catch(e){return null}},HEXtoRGB:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?"rgb(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),")"):""},isURL:function(e){return!!/^(https?:|ftps?:|)\/\//i.test(e)&&(e=String(e).replace(/</g,"%3C").replace(/>/g,"%3E").replace(/"/g,"%22").replace(/ /g,"%20"),new RegExp("^".concat(r.LinkRegExHTTP).concat(r.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function(e){e.css||(e=s(e));var n=(e.css("text-align")||"").replace(/-(.*)-/g,"");if(["left","right","justify","center"].indexOf(n)<0){if(!i){var r=s('<div dir="'.concat("rtl"===t.opts.direction?"rtl":"auto",'" style="text-align: ').concat(t.$el.css("text-align"),'; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>'));s("body").first().append(r);var o=r.find("#s1").get(0).getBoundingClientRect().left,a=r.find("#s2").get(0).getBoundingClientRect().left;r.remove(),i=o<a?"left":"right"}n=i}return n},scrollTop:function(){return t.o_win.pageYOffset?t.o_win.pageYOffset:t.o_doc.documentElement&&t.o_doc.documentElement.scrollTop?t.o_doc.documentElement.scrollTop:t.o_doc.body.scrollTop?t.o_doc.body.scrollTop:0},scrollLeft:function(){return t.o_win.pageXOffset?t.o_win.pageXOffset:t.o_doc.documentElement&&t.o_doc.documentElement.scrollLeft?t.o_doc.documentElement.scrollLeft:t.o_doc.body.scrollLeft?t.o_doc.body.scrollLeft:0},isInViewPort:function(e){var t=e.getBoundingClientRect();return 0<=(t={top:Math.round(t.top),bottom:Math.round(t.bottom)}).top&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)||t.top<=0&&t.bottom>=(window.innerHeight||document.documentElement.clientHeight)}}},r.MODULES.events=function(e){var t,n=e.$,i={};function s(e,t,n){h(e,t,n)}function o(t){if(void 0===t&&(t=!0),!e.$wp)return!1;if(e.helpers.isIOS()&&e.$win.get(0).focus(),e.core.hasFocus())return!1;if(!e.core.hasFocus()&&t){var o=e.$win.scrollTop();if(e.browser.msie&&e.$box&&e.$box.css("position","fixed"),e.browser.msie&&e.$wp&&e.$wp.css("overflow","visible"),e.browser.msie&&e.$sc&&e.$sc.css("position","fixed"),e.browser.msie||(p(),e.el.focus(),e.events.trigger("focus"),l()),e.browser.msie&&e.$sc&&e.$sc.css("position",""),e.browser.msie&&e.$box&&e.$box.css("position",""),e.browser.msie&&e.$wp&&e.$wp.css("overflow","auto"),o!==e.$win.scrollTop()&&e.$win.scrollTop(o),!e.selection.info(e.el).atStart)return!1}if(!e.core.hasFocus()||0<e.$el.find(".fr-marker").length)return!1;if(e.selection.info(e.el).atStart&&e.selection.isCollapsed()&&null!==e.html.defaultTag()){var c=e.markers.insert();if(c&&!e.node.blockParent(c)){n(c).remove();var d=e.$el.find(e.html.blockTagsQuery()).get(0);d&&(n(d).prepend(r.MARKERS),e.selection.restore())}else c&&n(c).remove()}}var c=!1;function l(){t=!0}function p(){t=!1}function u(){return t}function d(t,n,r){var o,a=t.split(" ");if(1<a.length){for(var c=0;c<a.length;c++)d(a[c],n,r);return!0}void 0===r&&(r=!1),o=0!==t.indexOf("shared.")?(i[t]=i[t]||[],i[t]):(e.shared._events[t]=e.shared._events[t]||[],e.shared._events[t]),r?o.unshift(n):o.push(n)}var g=[];function h(t,n,r,o,a){"function"==typeof r&&(a=o,o=r,r=!1);var c=a?e.shared.$_events:g,i=a?e.sid:e.id,s="".concat(n.trim().split(" ").join(".ed".concat(i," ")),".ed").concat(i);r?t.on(s,r,o):t.on(s,o),c.push([t,s])}function f(e){for(var t=0;t<e.length;t++)e[t][0].off(e[t][1])}function m(t,n,r){if(!e.edit.isDisabled()||r){var o,a;if(0!==t.indexOf("shared."))o=i[t];else{if(0<e.shared.count)return!1;o=e.shared._events[t]}if(o)for(var c=0;c<o.length;c++)if(!1===(a=o[c].apply(e,n)))return!1;return(!e.opts.events||!e.opts.events[t]||!1!==(a=e.opts.events[t].apply(e,n)))&&a}}function b(){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&delete i[e]}function v(){for(var t in e.shared._events)Object.prototype.hasOwnProperty.call(e.shared._events,t)&&delete e.shared._events[t]}return{_init:function(){e.shared.$_events=e.shared.$_events||[],e.shared._events={},e.helpers.isMobile()?(e._mousedown="touchstart",e._mouseup="touchend",e._move="touchmove",e._mousemove="touchmove"):(e._mousedown="mousedown",e._mouseup="mouseup",e._move="",e._mousemove="mousemove"),s(e.$el,"click mouseup mousemove mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart",(function(e){m(e.type,[e])})),d("mousedown",(function(){for(var t=0;t<r.INSTANCES.length;t++)r.INSTANCES[t]!==e&&r.INSTANCES[t].popups&&r.INSTANCES[t].popups.areVisible()&&r.INSTANCES[t].$el.find(".fr-marker").remove()})),s(e.$win,e._mousedown,(function(e){m("window.mousedown",[e]),l()})),s(e.$win,e._mouseup,(function(e){m("window.mouseup",[e])})),s(e.$win,"beforeinput cut copy keydown keyup touchmove touchend",(function(e){m("window.".concat(e.type),[e])})),s(e.$doc,"dragend drop",(function(e){m("document.".concat(e.type),[e])})),s(e.$el,"beforeinput keydown keypress keyup input",(function(e){m(e.type,[e])})),s(e.$el,"focus",(function(t){u()&&(o(!1),!1===c&&(m(t.type,[t]),e.helpers.isMobile()&&p()))})),s(e.$el,"blur",(function(t){u()&&!0===c&&(m(t.type,[t]),e.helpers.isMobile()&&e.opts.toolbarContainer&&(e.shared.selected_editor=e.id),l())})),h(e.$el,"mousedown",'[contenteditable="true"]',(function(){p(),e.$el.blur()})),d("focus",(function(){c=!0})),d("blur",(function(){c=!1})),l(),s(e.$el,"cut copy paste beforepaste",(function(e){m(e.type,[e])})),d("destroy",b),d("shared.destroy",v)},on:d,trigger:m,bindClick:function(t,r,o){h(t,e._mousedown,r,(function(t){e.edit.isDisabled()||function(t){var r=n(t.currentTarget);e.edit.isDisabled()||e.node.hasClass(r.get(0),"fr-disabled")?t.preventDefault():"mousedown"===t.type&&1!==t.which||(e.helpers.isMobile()||t.preventDefault(),(e.helpers.isAndroid()||e.helpers.isWindowsPhone())&&0===r.parents(".fr-dropdown-menu").length&&(t.preventDefault(),t.stopPropagation()),r.addClass("fr-selected"),e.events.trigger("commands.mousedown",[r]))}(t)}),!0),h(t,"".concat(e._mouseup," ").concat(e._move),r,(function(t){e.edit.isDisabled()||function(t,r){var o=n(t.currentTarget);if(e.edit.isDisabled()||e.node.hasClass(o.get(0),"fr-disabled"))return t.preventDefault(),!1;if("mouseup"===t.type&&1!==t.which)return!0;if(e.button.getButtons(".fr-selected",!0).get(0)==o.get(0)&&!e.node.hasClass(o.get(0),"fr-selected"))return!0;if("touchmove"!==t.type){if(t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault(),!e.node.hasClass(o.get(0),"fr-selected"))return e.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),!1;if(e.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),o.data("dragging")||o.attr("disabled"))return o.removeData("dragging"),!1;var c=o.data("timeout");c&&(clearTimeout(c),o.removeData("timeout")),r.apply(e,[t])}else o.data("timeout")||o.data("timeout",setTimeout((function(){o.data("dragging",!0)}),100))}(t,o)}),!0),h(t,"mousedown click mouseup",r,(function(t){e.edit.isDisabled()||t.stopPropagation()}),!0),d("window.mouseup",(function(){e.edit.isDisabled()||(t.find(r).removeClass("fr-selected"),l())})),h(t,"mouseover",r,(function(){n(this).hasClass("fr-options")&&n(this).prev(".fr-btn").addClass("fr-btn-hover"),n(this).next(".fr-btn").hasClass("fr-options")&&n(this).next(".fr-btn").addClass("fr-btn-hover")})),h(t,"mouseout",r,(function(){n(this).hasClass("fr-options")&&n(this).prev(".fr-btn").removeClass("fr-btn-hover"),n(this).next(".fr-btn").hasClass("fr-options")&&n(this).next(".fr-btn").removeClass("fr-btn-hover")}))},disableBlur:p,enableBlur:l,blurActive:u,focus:o,chainTrigger:function(t,n,r){if(!e.edit.isDisabled()||r){var o,a;if(0!==t.indexOf("shared."))o=i[t];else{if(0<e.shared.count)return!1;o=e.shared._events[t]}if(o)for(var c=0;c<o.length;c++)void 0!==(a=o[c].apply(e,[n]))&&(n=a);return e.opts.events&&e.opts.events[t]&&void 0!==(a=e.opts.events[t].apply(e,[n]))&&(n=a),n}},$on:h,$off:function(){f(g),g=[],0===e.shared.count&&(f(e.shared.$_events),e.shared.$_events=[])}}},Object.assign(r.DEFAULTS,{indentMargin:20}),r.COMMANDS={bold:{title:"Bold",toggle:!0,refresh:function(e){var t=this.format.is("strong");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},italic:{title:"Italic",toggle:!0,refresh:function(e){var t=this.format.is("em");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},underline:{title:"Underline",toggle:!0,refresh:function(e){var t=this.format.is("u");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},strikeThrough:{title:"Strikethrough",toggle:!0,refresh:function(e){var t=this.format.is("s");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},subscript:{title:"Subscript",toggle:!0,refresh:function(e){var t=this.format.is("sub");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},superscript:{title:"Superscript",toggle:!0,refresh:function(e){var t=this.format.is("sup");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},outdent:{title:"Decrease Indent"},indent:{title:"Increase Indent"},undo:{title:"Undo",undo:!1,forcedRefresh:!0,disabled:!0},redo:{title:"Redo",undo:!1,forcedRefresh:!0,disabled:!0},insertHR:{title:"Insert Horizontal Line"},clearFormatting:{title:"Clear Formatting"},selectAll:{title:"Select All",undo:!1},moreText:{title:"More Text",undo:!1},moreParagraph:{title:"More Paragraph",undo:!1},moreRich:{title:"More Rich",undo:!1},moreMisc:{title:"More Misc",undo:!1}},r.RegisterCommand=function(e,t){r.COMMANDS[e]=t},r.MODULES.commands=function(i){var s=i.$;function e(e){return i.html.defaultTag()&&(e="<".concat(i.html.defaultTag(),">").concat(e,"</").concat(i.html.defaultTag(),">")),e}var t={bold:function(){c("bold","strong")},subscript:function(){i.format.is("sup")&&i.format.remove("sup"),c("subscript","sub")},superscript:function(){i.format.is("sub")&&i.format.remove("sub"),c("superscript","sup")},italic:function(){c("italic","em")},strikeThrough:function(){c("strikeThrough","s")},underline:function(){c("underline","u")},undo:function(){i.undo.run()},redo:function(){i.undo.redo()},indent:function(){l(1)},outdent:function(){l(-1)},show:function(){i.opts.toolbarInline&&i.toolbar.showInline(null,!0)},insertHR:function(){i.selection.remove();var t="";i.core.isEmpty()&&(t=e(t="<br>"));var n='<hr id="fr-just" class="fr-just">'.concat(t);i.opts.trackChangesEnabled&&(n=i.track_changes.wrapInTracking(s(n),"hrWrapper").get(0).outerHTML),i.html.insert(n);var o,c=i.$el.find("hr#fr-just").length?i.$el.find("hr#fr-just"):i.$el.find(".fr-just");c.removeAttr("id"),c.removeAttr("class");var a=i.opts.trackChangesEnabled&&"SPAN"===c[0].parentNode.tagName&&"P"===c[0].parentNode.parentNode.tagName;if(0===c.next().length){var l=i.html.defaultTag();l&&!a?c.after(s(i.doc.createElement(l)).append("<br>").get(0)):a?c[0].parentNode.after(s(i.doc.createElement(l)).append("<br>").get(0)):c.after("<br>")}c.prev().is("hr")?o=i.selection.setAfter(c.get(0),!1):c.next().is("hr")?o=i.selection.setBefore(c.get(0),!1):a||i.selection.setAfter(c.get(0),!1)?i.selection.setAfter(c[0].parentNode,!1):i.selection.setBefore(c.get(0),!1),o||void 0===o||(t=e(t="".concat(r.MARKERS,"<br>")),c.after(t)),i.selection.restore()},clearFormatting:function(){i.format.remove()},selectAll:function(){i.doc.execCommand("selectAll",!1,!1)},moreText:function(e){n(e)},moreParagraph:function(e){n(e)},moreRich:function(e){n(e)},moreMisc:function(e){n(e)},moreTrackChanges:function(){n("trackChanges")}};function n(e){var t=i.$tb.find("[data-cmd=".concat(e,"]")),n=i.$tb.find("[data-cmd=html]");i.opts.trackChangesEnabled?n&&n.addClass("fr-disabled"):n&&n.removeClass("fr-disabled"),function(e){i.helpers.isMobile()&&i.opts.toolbarInline&&i.events.disableBlur();var t=i.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"),'"]'));"trackChanges"===e.data("cmd")&&(t=i.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("id"),'"]'))),i.$tb.find(".fr-open").not(e).not('[data-cmd="trackChanges"]').removeClass("fr-open"),e.toggleClass("fr-open"),i.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"),i.$tb.find(".fr-expanded").not(t).length?(i.$tb.find(".fr-expanded").not(t).each((function(t,n){0!=s(n).data("name").indexOf("trackChanges-")&&0!=s(n).data("name").indexOf("moreRich-")?s(n).toggleClass("fr-expanded"):e.parents('[data-name^="moreRich-"]').length||0==s(n).data("name").indexOf("trackChanges-")||s(n).find('[id^="trackChanges-"]').length&&i.opts.trackChangesEnabled||s(n).toggleClass("fr-expanded")})),t.toggleClass("fr-expanded")):(t.toggleClass("fr-expanded"),i.$box.toggleClass("fr-toolbar-open"),i.$tb.toggleClass("fr-toolbar-open"))}(t),i.toolbar.setMoreToolbarsHeight()}function o(e,n){if(!(i.markdown&&i.markdown.isEnabled()&&("bold"===e||"italic"===e||"underline"===e)||i.opts.trackChangesEnabled&&"markdown"===e)&&!1!==i.events.trigger("commands.before",s.merge([e],n||[]))){var o=r.COMMANDS[e]&&r.COMMANDS[e].callback||t[e],c=!0,a=!1;r.COMMANDS[e]&&(void 0!==r.COMMANDS[e].focus&&(c=r.COMMANDS[e].focus),void 0!==r.COMMANDS[e].accessibilityFocus&&(a=r.COMMANDS[e].accessibilityFocus)),(!i.core.hasFocus()&&c||!i.core.hasFocus()&&a&&i.accessibility.hasFocus())&&(i.el.focus(),i.events.trigger("focus")),r.COMMANDS[e]&&!1!==r.COMMANDS[e].undo&&(i.$el.find(".fr-marker").length&&(i.events.disableBlur(),i.selection.restore()),i.undo.saveStep()),o&&o.apply(i,s.merge([e],n||[])),i.events.trigger("commands.after",s.merge([e],n||[])),r.COMMANDS[e]&&!1!==r.COMMANDS[e].undo&&i.undo.saveStep()}}function c(e,t){i.format.toggle(t)}function l(e){i.selection.save(),i.html.wrap(!0,!0,!0,!0),i.selection.restore();for(var t=i.selection.blocks(),n=0;n<t.length;n++)if("LI"!==t[n].tagName||"LI"!==t[n].parentNode.tagName){var r=s(t[n]);"LI"!=t[n].tagName&&"LI"==t[n].parentNode.tagName&&(r=s(t[n].parentNode));var a="rtl"===i.opts.direction||"rtl"===r.css("direction")?"margin-right":"margin-left",o=i.helpers.getPX(r.css(a));if(r.width()<2*i.opts.indentMargin&&0<e)continue;"UL"!=t[n].parentNode.tagName&&"OL"!=t[n].parentNode.tagName&&"LI"!=t[n].parentNode.tagName&&r.css(a,Math.max(o+e*i.opts.indentMargin,0)||""),r.removeClass("fr-temp-div")}i.selection.save(),i.html.unwrap(),i.selection.restore()}function a(e){return function(){o(e)}}var d={};for(var h in t)Object.prototype.hasOwnProperty.call(t,h)&&(d[h]=a(h));return Object.assign(d,{exec:o,_init:function(){i.events.on("keydown",(function(e){var t=i.selection.element();if(t&&"HR"===t.tagName&&!i.keys.isArrow(e.which))return e.preventDefault(),!1})),i.events.on("keyup",(function(e){var t=i.selection.element();if(t&&"HR"===t.tagName)if(e.which===r.KEYCODE.ARROW_LEFT||e.which===r.KEYCODE.ARROW_UP){if(t.previousSibling)return i.node.isBlock(t.previousSibling)?i.selection.setAtEnd(t.previousSibling):s(t).before(r.MARKERS),i.selection.restore(),!1}else if((e.which===r.KEYCODE.ARROW_RIGHT||e.which===r.KEYCODE.ARROW_DOWN)&&t.nextSibling)return i.node.isBlock(t.nextSibling)?i.selection.setAtStart(t.nextSibling):s(t).after(r.MARKERS),i.selection.restore(),!1})),i.events.on("mousedown",(function(e){if(e.target&&"HR"===e.target.tagName)return e.preventDefault(),e.stopPropagation(),!1})),i.events.on("mouseup",(function(){var e=i.selection.element();e===i.selection.endElement()&&e&&"HR"===e.tagName&&(e.nextSibling&&(i.node.isBlock(e.nextSibling)?i.selection.setAtStart(e.nextSibling):s(e).after(r.MARKERS)),i.selection.restore())}))}})},r.MODULES.cursorLists=function(b){var e=b.$;function t(e){for(var t=e;"LI"!==t.tagName;)t=t.parentNode;return t}function n(e){for(var t=e;!b.node.isList(t);)t=t.parentNode;return t}function o(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+="".concat(r.name,"='").concat(r.value,"' ")}return t}return{_startEnter:function(c){var l,d=t(c),h=d.nextSibling,a=d.previousSibling,f=b.html.defaultTag();if(b.node.isEmpty(d,!0)&&h){for(var i="",s="",m=c.parentNode;!b.node.isList(m)&&m.parentNode&&("LI"!==m.parentNode.tagName||m.parentNode===d);)-1<["OL","LI","UL"].indexOf(m.tagName)&&(i=b.node.openTagString(m)+i,s+=b.node.closeTagString(m)),m=m.parentNode;i=b.node.openTagString(m)+i,s+=b.node.closeTagString(m);var v="";if(m.parentNode&&"LI"===m.parentNode.tagName)if(m.parentNode.attributes.length){var _=o(m.parentNode.attributes);v="".concat(s,"<li ").concat(_,">").concat(r.MARKERS,"<br>").concat(i)}else v="".concat(s,"<li>").concat(r.MARKERS,"<br>").concat(i);else v=f?"".concat(s,"<").concat(f,">").concat(r.MARKERS,"<br></").concat(f,">").concat(i):"".concat(s+r.MARKERS,"<br>").concat(i);for(;["UL","OL"].indexOf(m.tagName)<0||m.parentNode&&"LI"===m.parentNode.tagName;)m=m.parentNode;e(d).replaceWith('<span id="fr-break"></span>');var y=b.node.openTagString(m)+e(m).html()+b.node.closeTagString(m);y=y.replace(/<span id="fr-break"><\/span>/g,v),e(m).replaceWith(y),b.$el.find("li:empty").remove(),b.$el.find("li > p > span:empty").length&&b.$el.find("li > p > span:empty")[0].parentNode.parentNode.remove()}else if(a&&h||!b.node.isEmpty(d,!0)){var p="<br>",u=c.parentNode;for(u&&"A"===u.tagName&&(u=null);u&&"LI"!==u.tagName;)p=b.node.openTagString(u)+p+b.node.closeTagString(u),u=u.parentNode;if(u&&u.attributes.length){var E=o(u.attributes);e(d).before("<li ".concat(E,">").concat(p,"</li>"))}else e(d).before("<li>".concat(p,"</li>"));e(c).remove()}else if(a){l=n(d);for(var g="".concat(r.MARKERS,"<br>"),C=c.parentNode;C&&"LI"!==C.tagName;)g=b.node.openTagString(C)+g+b.node.closeTagString(C),C=C.parentNode;if(l.parentNode&&"LI"===l.parentNode.tagName)if(l.parentNode.attributes.length){var w=o(l.parentNode.attributes);e(l.parentNode).after("<li ".concat(w,">").concat(g,"</li>"))}else e(l.parentNode).after("<li>".concat(g,"</li>"));else f?e(l).after("<".concat(f,">").concat(g,"</").concat(f,">")):e(l).after(g);e(d).remove()}else(l=n(d)).parentNode&&"LI"===l.parentNode.tagName?h?e(l.parentNode).before("".concat(b.node.openTagString(d)+r.MARKERS,"<br></li>")):e(l.parentNode).after("".concat(b.node.openTagString(d)+r.MARKERS,"<br></li>")):f?e(l).before("<".concat(f,">").concat(r.MARKERS,"<br></").concat(f,">")):e(l).before("".concat(r.MARKERS,"<br>")),e(d).remove()},_middleEnter:function(n){for(var o=t(n),c="",l=n,a="",d="",i=!1;l!==o;){var s="A"===(l=l.parentNode).tagName&&b.cursor.isAtEnd(n,l)?"fr-to-remove":"";i||l==o||b.node.isBlock(l)||(i=!0,a+=r.INVISIBLE_SPACE),a=b.node.openTagString(e(l).clone().addClass(s).get(0))+a,d+=b.node.closeTagString(l)}c=d+c+a+r.MARKERS+(b.opts.keepFormatOnDelete?r.INVISIBLE_SPACE:""),e(n).replaceWith('<span id="fr-break"></span>');var h=b.node.openTagString(o)+e(o).html()+b.node.closeTagString(o);h=h.replace(/<span id="fr-break"><\/span>/g,c),e(o).replaceWith(h)},_endEnter:function(n){for(var o=t(n),c=r.MARKERS,l="",a=n,d=!1;a!==o;)if(!(a=a.parentNode).classList.contains("fr-img-space-wrap")&&!a.classList.contains("fr-img-space-wrap2")){var i="A"===a.tagName&&b.cursor.isAtEnd(n,a)?"fr-to-remove":"";d||a===o||b.node.isBlock(a)||(d=!0,l+=r.INVISIBLE_SPACE),l=b.node.openTagString(e(a).clone().addClass(i).get(0))+l,c+=b.node.closeTagString(a)}var s=l+c;e(n).remove(),e(o).after(s)},_backspace:function(o){var c=t(o),l=c.previousSibling;if(l){l=e(l).find(b.html.blockTagsQuery()).get(-1)||l,e(o).replaceWith(r.MARKERS);var d=b.node.contents(l);d.length&&"BR"===d[d.length-1].tagName&&e(d[d.length-1]).remove(),e(c).find(b.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===c&&e(this).replaceWith(e(this).html()+(b.node.isEmpty(this)?"":"<br>"))}));for(var a,h=b.node.contents(c)[0];h&&!b.node.isList(h);)a=h.nextSibling,e(l).append(h),h=a;for(l=c.previousSibling;h;)a=h.nextSibling,e(l).append(h),h=a;1<(d=b.node.contents(l)).length&&"BR"===d[d.length-1].tagName&&e(d[d.length-1]).remove(),e(c).remove()}else{var i=n(c);if(e(o).replaceWith(r.MARKERS),i.parentNode&&"LI"===i.parentNode.tagName){var s=i.previousSibling;b.node.isBlock(s)?(e(c).find(b.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===c&&e(this).replaceWith(e(this).html()+(b.node.isEmpty(this)?"":"<br>"))})),e(s).append(e(c).html())):e(i).before(e(c).html())}else{var f=b.html.defaultTag();f&&0===e(c).find(b.html.blockTagsQuery()).length?e(i).before("<".concat(f,">").concat(e(c).html(),"</").concat(f,">")):e(i).before(e(c).html())}e(c).remove(),b.html.wrap(),0===e(i).find("li").length&&e(i).remove()}},_del:function(n){var o,c=t(n),l=c.nextSibling;if(l){(o=b.node.contents(l)).length&&"BR"===o[0].tagName&&e(o[0]).remove(),e(l).find(b.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===l&&e(this).replaceWith(e(this).html()+(b.node.isEmpty(this)?"":"<br>"))}));for(var a,d=n,i=b.node.contents(l)[0];i&&!b.node.isList(i);)a=i.nextSibling,e(d).after(i),d=i,i=a;for(;i;)a=i.nextSibling,e(c).append(i),i=a;e(n).replaceWith(r.MARKERS),e(l).remove()}else{for(var s=c;!s.nextSibling&&s!==b.el;)s=s.parentNode;if(s===b.el)return!1;if(s=s.nextSibling,b.node.isBlock(s)){if(r.NO_DELETE_TAGS.indexOf(s.tagName)<0){if(e(n).replaceWith(r.MARKERS),(o=b.node.contents(c)).length&&"BR"===o[o.length-1].tagName&&e(o[o.length-1]).remove(),s.isContentEditable&&"DIV"===s.tagName&&(!b.node.isBlock(s.previousSibling)||"DIV"===s.previousSibling.tagName))return;e(c).append(e(s).html()),e(s).remove()}}else{for((o=b.node.contents(c)).length&&"BR"===o[o.length-1].tagName&&e(o[o.length-1]).remove(),e(n).replaceWith(r.MARKERS);s&&!b.node.isBlock(s)&&"BR"!==s.tagName;)e(c).append(e(s)),s=s.nextSibling;e(s).remove()}}}}},r.NO_DELETE_TAGS=["TH","TD","TR","TABLE","FORM"],r.SIMPLE_ENTER_TAGS=["TH","TD","LI","DL","DT","FORM"],r.MODULES.cursor=function(g){var e=g.$;function u(e){return!!e&&(g.node.isBlock(e)?"P"!==e.tagName||!e.nextElementSibling||!e.parentElement||"OL"!==e.nextElementSibling.tagName||"LI"!==e.parentElement.tagName:e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?u(e.nextSibling):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&u(e.parentNode))}function t(e){return!!e&&(!!g.node.isBlock(e)||(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?t(e.previousSibling):!e.previousSibling&&(!(e.previousSibling||!g.node.hasClass(e.parentNode,"fr-inner"))||t(e.parentNode))))}function n(e,t){return!!e&&e!==g.$wp.get(0)&&(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?n(e.previousSibling,t):!e.previousSibling&&(e.parentNode===t||n(e.parentNode,t)))}function b(e,t){return!!e&&e!==g.$wp.get(0)&&(e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?b(e.nextSibling,t):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&(e.parentNode===t||b(e.parentNode,t)))}function o(t){return 0<e(t).parentsUntil(g.$el,"LI").length&&0===e(t).parentsUntil("LI","TABLE").length}function c(e,t){var n=new RegExp("".concat(t?"^":"","(([\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+\\u200D)*[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]{2})").concat(t?"":"$"),"i"),r=e.match(n);return r?r[0].length:1}function l(t){for(var n,o=t;!o.previousSibling;)if(o=o.parentNode,g.node.isElement(o))return!1;o=o.previousSibling;var d=g.opts.htmlAllowedEmptyTags,a=o.tagName&&o.tagName.toLowerCase();if((!g.node.isBlock(o)||o.lastChild&&a&&0<=d.indexOf(a))&&g.node.isEditable(o)){for(n=g.node.contents(o);o.nodeType!==Node.TEXT_NODE&&!g.node.isDeletable(o)&&n.length&&g.node.isEditable(o);)o=n[n.length-1],n=g.node.contents(o);if(o.nodeType===Node.TEXT_NODE){var h=o.textContent,i=h.length;if(h.length&&"\n"===h[h.length-1])return o.textContent=h.substring(0,i-2),0===o.textContent.length&&o.parentNode.removeChild(o),l(t);g.opts.tabSpaces&&h.length>=g.opts.tabSpaces&&0===h.substr(h.length-g.opts.tabSpaces,h.length-1).replace(/ /g,"").replace(new RegExp(r.UNICODE_NBSP,"g"),"").length&&(i=h.length-g.opts.tabSpaces+1),o.textContent=h.substring(0,i-c(h));var s=o.textContent;(g.opts.enter===r.ENTER_BR&&0<s.length&&" "===s.charAt(s.length-1)||0===s.length&&t.previousSibling&&3===t.previousSibling.nodeType&&"TD"!==t.parentNode.tagName&&"LI"!==t.parentNode.tagName&&h!==String.fromCharCode(8203))&&(t.insertAdjacentHTML("beforebegin",r.INVISIBLE_SPACE),o=o.nextSibling),g.opts.trackChangesEnabled&&0===o.textContent.length&&e(o.parentElement).data("tracking")&&0===e(o.parentElement).find("[data-tracking-deleted=true]").length&&(e(t).insertBefore(o.parentElement),e(o.parentElement).remove(),o=e(t)[0].previousSibling),g.opts.htmlUntouched&&!t.nextSibling&&o.textContent.length&&" "===o.textContent[o.textContent.length-1]&&(o.textContent=o.textContent.substring(0,o.textContent.length-1)+r.UNICODE_NBSP);var f=h.length!==o.textContent.length;if(g.opts.enter!==r.ENTER_BR&&o&&o.previousSibling&&o.previousSibling.previousSibling&&"BR"===o.previousSibling.previousSibling.tagName&&o.previousSibling.previousSibling.remove(),0===o.textContent.length&&"LI"===o.parentNode.tagName&&o.previousSibling&&"BR"===o.previousSibling.tagName&&o.previousSibling.remove(),0===o.textContent.length)if(f&&g.opts.keepFormatOnDelete)e(o).after(r.INVISIBLE_SPACE+r.MARKERS);else if(0!==h.length&&g.node.isBlock(o.parentNode))e(o).after(r.MARKERS);else if((2!=o.parentNode.childNodes.length||o.parentNode!=t.parentNode)&&1!=o.parentNode.childNodes.length||g.node.isBlock(o.parentNode)||g.node.isElement(o.parentNode)||!g.node.isDeletable(o.parentNode)){for(var m,v=o;!g.node.isElement(o.parentNode)&&g.node.isEmpty(o.parentNode)&&r.NO_DELETE_TAGS.indexOf(o.parentNode.tagName)<0;)if("A"===(o=o.parentNode).tagName){var _=o.childNodes[0];for(e(o).before(_),m=!0;0<_.childNodes.length;)_=_.childNodes[0];o.parentNode.removeChild(o),o=_;break}m||(o=v),e(o).after(r.MARKERS),g.node.isElement(o.parentNode)&&!t.nextSibling&&o.previousSibling&&"BR"===o.previousSibling.tagName&&e(t).after("<br>");var p=o.parentNode;o.parentNode.removeChild(o),g.node.isEmpty(p)&&e(p).html(r.INVISIBLE_SPACE+r.MARKERS)}else e(o.parentNode).after(r.MARKERS),e(o.parentNode).remove();else e(o).after(r.MARKERS)}else g.node.isDeletable(o)?(e(o).after(r.MARKERS),e(o).remove()):t.nextSibling&&"BR"===t.nextSibling.tagName&&g.node.isVoid(o)&&"BR"!==o.tagName?(e(t.nextSibling).remove(),e(t).replaceWith(r.MARKERS)):!1!==g.events.trigger("node.remove",[e(o)])&&(e(o).after(r.MARKERS),e(o).remove())}else if(r.NO_DELETE_TAGS.indexOf(o.tagName)<0&&(g.node.isEditable(o)||g.node.isDeletable(o)))if(g.node.isDeletable(o))e(t).replaceWith(r.MARKERS),e(o).remove();else if(g.node.isEmpty(o)&&!g.node.isList(o))e(o).remove(),e(t).replaceWith(r.MARKERS);else{for(g.node.isList(o)&&(o=e(o).find("li").last().get(0)),(n=g.node.contents(o))&&0<n.length&&"BR"===n[n.length-1].tagName&&e(n[n.length-1]).remove(),n=g.node.contents(o);n&&0<n.length&&g.node.isBlock(n[n.length-1]);)o=n[n.length-1],n=g.node.contents(o);e(o).append(r.MARKERS);for(var u=t;!u.previousSibling;)u=u.parentNode;for(;u&&"BR"!==u.tagName&&!g.node.isBlock(u);){var y=u;u=u.nextSibling,e(o).append(y)}u&&"BR"===u.tagName&&e(u).remove(),e(t).remove()}else t.nextSibling&&"BR"===t.nextSibling.tagName&&e(t.nextSibling).remove();return!0}function d(t){var n=0<e(t).parentsUntil(g.$el,"BLOCKQUOTE").length,o=g.node.deepestParent(t,[],!n);if(o&&"BLOCKQUOTE"===o.tagName){var c=g.node.deepestParent(t,[e(t).parentsUntil(g.$el,"BLOCKQUOTE").get(0)]);c&&c.nextSibling&&(o=c)}if(null!==o){var a,l=o.nextSibling;if(g.node.isBlock(o)&&(g.node.isEditable(o)||g.node.isDeletable(o))&&l&&r.NO_DELETE_TAGS.indexOf(l.tagName)<0)if(g.node.isDeletable(l))e(l).remove(),e(t).replaceWith(r.MARKERS);else if(g.node.isBlock(l)&&g.node.isEditable(l))if(g.node.isList(l))if(g.node.isEmpty(o,!0))e(o).remove(),e(l).find("li").first().prepend(r.MARKERS);else{var i=e(l).find("li").first();"BLOCKQUOTE"===o.tagName&&(a=g.node.contents(o)).length&&g.node.isBlock(a[a.length-1])&&(o=a[a.length-1]),0===i.find("ul, ol").length&&(e(t).replaceWith(r.MARKERS),i.find(g.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===i.get(0)&&e(this).replaceWith(e(this).html()+(g.node.isEmpty(this)?"":"<br>"))})),e(o).append(g.node.contents(i.get(0))),i.remove(),0===e(l).find("li").length&&e(l).remove())}else{if((a=g.node.contents(l)).length&&"BR"===a[0].tagName&&e(a[0]).remove(),"BLOCKQUOTE"!==l.tagName&&"BLOCKQUOTE"===o.tagName)for(a=g.node.contents(o);a.length&&g.node.isBlock(a[a.length-1]);)o=a[a.length-1],a=g.node.contents(o);else if("BLOCKQUOTE"===l.tagName&&"BLOCKQUOTE"!==o.tagName)for(a=g.node.contents(l);a.length&&g.node.isBlock(a[0]);)l=a[0],a=g.node.contents(l);e(t).replaceWith(r.MARKERS),e(o).append(l.innerHTML),e(l).remove()}else{for(e(t).replaceWith(r.MARKERS);l&&"BR"!==l.tagName&&!g.node.isBlock(l)&&g.node.isEditable(l);){var s=l;l=l.nextSibling,e(o).append(s)}l&&"BR"===l.tagName&&g.node.isEditable(l)&&e(l).remove()}}}function h(t){for(var n,l=t;!l.nextSibling;)if(l=l.parentNode,g.node.isElement(l))return!1;if("BR"===(l=l.nextSibling).tagName&&g.node.isEditable(l))if(l.nextSibling){if(g.node.isBlock(l.nextSibling)&&g.node.isEditable(l.nextSibling)){if(!(r.NO_DELETE_TAGS.indexOf(l.nextSibling.tagName)<0))return void e(l).remove();l=l.nextSibling,e(l.previousSibling).remove()}}else if(u(l))return void(o(t)?g.cursorLists._del(t):g.node.deepestParent(l)&&((!g.node.isEmpty(g.node.blockParent(l))||(g.node.blockParent(l).nextSibling&&r.NO_DELETE_TAGS.indexOf(g.node.blockParent(l).nextSibling.tagName))<0)&&e(l).remove(),l&&l.parentNode&&8203===l.parentNode.textContent.charCodeAt()&&l.parentNode.childNodes[1]&&"BR"===l.parentNode.childNodes[1].tagName&&l.parentNode.tagName.toLowerCase()===g.html.defaultTag()&&l.parentNode.nextSibling&&"TABLE"===l.parentNode.nextSibling.tagName&&e(l.parentNode).remove(),d(t)));if(!g.node.isBlock(l)&&g.node.isEditable(l)){for(n=g.node.contents(l);l.nodeType!==Node.TEXT_NODE&&n.length&&!g.node.isDeletable(l)&&g.node.isEditable(l);)l=n[0],n=g.node.contents(l);l.nodeType===Node.TEXT_NODE?(e(l).before(r.MARKERS),l.textContent.length&&(l.textContent=l.textContent.substring(c(l.textContent,!0),l.textContent.length))):(g.node.isDeletable(l)||!1!==g.events.trigger("node.remove",[e(l)]))&&(e(l).before(r.MARKERS),e(l).remove()),e(t).remove()}else if(r.NO_DELETE_TAGS.indexOf(l.tagName)<0&&(g.node.isEditable(l)||g.node.isDeletable(l)))if(g.node.isDeletable(l))e(t).replaceWith(r.MARKERS),e(l).remove();else if(g.node.isList(l))t.previousSibling?(e(l).find("li").first().prepend(t),g.cursorLists._backspace(t)):(e(l).find("li").first().prepend(r.MARKERS),e(t).remove());else if((n=g.node.contents(l))&&0<n.length&&"BR"===n[0].tagName&&e(n[0]).remove(),n&&0<n.length&&"BLOCKQUOTE"===l.tagName){var h=n[0];for(e(t).before(r.MARKERS);h&&"BR"!==h.tagName;){var a=h;h=h.nextSibling,e(t).before(a)}h&&"BR"===h.tagName&&e(h).remove()}else e(t).after(e(l).html()).after(r.MARKERS),e(l).remove()}function i(){for(var e=g.el.querySelectorAll("blockquote:empty"),t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t])}function f(t,n,o){var c,a=g.node.deepestParent(t,[],!o);if(a&&"BLOCKQUOTE"===a.tagName)return b(t,a)?(c=g.html.defaultTag(),n?e(t).replaceWith("<br>"+r.MARKERS):c?e(a).after("<".concat(c,">").concat(r.MARKERS,"<br></").concat(c,">")):e(a).after("".concat(r.MARKERS,"<br>")),e(t).remove()):m(t,n,o),!1;if(null===a)(c=g.html.defaultTag())&&g.node.isElement(t.parentNode)?e(t).replaceWith("<".concat(c,">").concat(r.MARKERS,"<br></").concat(c,">")):!t.previousSibling||e(t.previousSibling).is("br")||t.nextSibling?e(t).replaceWith("<br>".concat(r.MARKERS)):e(t).replaceWith("<br>".concat(r.MARKERS,"<br>"));else{var l=t,i="";"PRE"!=a.tagName||t.nextSibling||(n=!0),g.node.isBlock(a)&&!n||(i="<br/>");var s,d="",h="",f="",v="";(c=g.html.defaultTag())&&g.node.isBlock(a)&&(f="<".concat(c,">"),v="</".concat(c,">"),a.tagName===c.toUpperCase()&&(f=g.node.openTagString(e(a).clone().removeAttr("id").get(0))));do{if(l=l.parentNode,!n||l!==a||n&&!g.node.isBlock(a))if(d+=g.node.closeTagString(l),l===a&&g.node.isBlock(a))h=f+h;else{var p=("A"===l.tagName||g.node.hasClass(l,"fa"))&&b(t,l)?"fr-to-remove":"";h="isPasted"===l.getAttribute("id")?g.node.openTagString(e(l).clone().attr("style","").addClass(p).get(0))+h:g.node.openTagString(e(l).clone().addClass(p).get(0))+h}}while(l!==a);i=d+i+h+(t.parentNode===a&&g.node.isBlock(a)?"":r.INVISIBLE_SPACE)+r.MARKERS,g.node.isBlock(a)&&!e(a).find("*").last().is("br")&&e(a).append("<br/>"),e(t).after('<span id="fr-break"></span>'),e(t).remove(),a.nextSibling&&!g.node.isBlock(a.nextSibling)||g.node.isBlock(a)||e(a).after("<br>"),s=(s=!n&&g.node.isBlock(a)?g.node.openTagString(a)+e(a).html()+v:g.node.openTagString(a)+e(a).html()+g.node.closeTagString(a)).replace(/<span id="fr-break"><\/span>/g,i),e(a).replaceWith(s)}}function m(t,o,c){var l=g.node.deepestParent(t,[],!c);if(null===l)g.html.defaultTag()&&t.parentNode===g.el?e(t).replaceWith("<".concat(g.html.defaultTag(),">").concat(r.MARKERS,"<br></").concat(g.html.defaultTag(),">")):(t.nextSibling&&!g.node.isBlock(t.nextSibling)||e(t).after("<br>"),e(t).replaceWith("<br>".concat(r.MARKERS)));else if(t.previousSibling&&"IMG"==t.previousSibling.tagName||t.nextSibling&&"IMG"==t.nextSibling.tagName)e(t).replaceWith("<"+g.html.defaultTag()+">"+r.MARKERS+"<br></"+g.html.defaultTag()+">");else{var a=t,d="";"PRE"===l.tagName&&(o=!0),g.node.isBlock(l)&&!o||(d="<br>");var i="",s="";do{var h=a;if(a=a.parentNode,"BLOCKQUOTE"===l.tagName&&g.node.isEmpty(h)&&!g.node.hasClass(h,"fr-marker")&&e(h).contains(t)&&e(h).after(t),"BLOCKQUOTE"!==l.tagName||!b(t,a)&&!n(t,a))if(!o||a!==l||o&&!g.node.isBlock(l)){i+=g.node.closeTagString(a);var f="A"==a.tagName&&b(t,a)||g.node.hasClass(a,"fa")?"fr-to-remove":"";s=g.node.openTagString(e(a).clone().addClass(f).removeAttr("id").get(0))+s,g.opts.enter!==r.ENTER_DIV&&a===l&&"DIV"===l.tagName&&(i="<br>",s="")}else"BLOCKQUOTE"==l.tagName&&o&&(s=i="")}while(a!==l);var m=l===t.parentNode&&g.node.isBlock(l)||t.nextSibling;if("BLOCKQUOTE"===l.tagName)if(t.previousSibling&&g.node.isBlock(t.previousSibling)&&t.nextSibling&&"BR"===t.nextSibling.tagName&&(e(t.nextSibling).after(t),t.nextSibling&&"BR"===t.nextSibling.tagName&&e(t.nextSibling).remove()),o)d=i+d+r.MARKERS+s;else{var v=g.html.defaultTag();d="".concat(i+d+(v?"<".concat(v,">"):"")+r.MARKERS,"<br>").concat(v?"</".concat(v,">"):"").concat(s)}else d=i+d+s+(m?"":r.INVISIBLE_SPACE)+r.MARKERS;e(t).replaceWith('<span id="fr-break"></span>');var p=g.node.openTagString(l)+e(l).html()+g.node.closeTagString(l);p=p.replace(/<span id="fr-break"><\/span>/g,d),e(l).replaceWith(p)}}function v(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}function _(){var e=g.selection.get(),t=null;if(g.selection.inEditor()&&e.rangeCount)for(var n=g.selection.ranges(),r=0;r<n.length;r++){var a=n[r];t=g.selection.rangeElement(a.startContainer,a.startOffset);break}return t}return{enter:function(c){var l=g.markers.insert();if(!l)return!0;for(var d=l.parentNode;d&&!g.node.isElement(d);){if("false"===d.getAttribute("contenteditable"))return e(l).replaceWith(r.MARKERS),g.selection.restore(),!1;if("true"===d.getAttribute("contenteditable"))break;d=d.parentNode}g.el.normalize();var h=!1;0<e(l).parentsUntil(g.$el,"BLOCKQUOTE").length&&(h=!0),e(l).parentsUntil(g.$el,"TD, TH").length&&(h=!1),u(l)?!o(l)||c||h?f(l,c,h):g.cursorLists._endEnter(l):t(l)?!o(l)||c||h?function o(c,l,d){var h,a=g.node.deepestParent(c,[],!d);if(a&&"TABLE"===a.tagName)return e(a).find("td, th").first().prepend(c),o(c,l,d);if(a&&"BLOCKQUOTE"===a.tagName)if(n(c,a)){if(!l)return(h=g.html.defaultTag())?e(a).before("<".concat(h,">").concat(r.MARKERS,"<br></").concat(h,">")):e(a).before("".concat(r.MARKERS,"<br>")),e(c).remove(),!1}else b(c,a)?f(c,l,!0):m(c,l,!0);if(null===a)(h=g.html.defaultTag())&&g.node.isElement(c.parentNode)?e(c).replaceWith("<".concat(h,">").concat(r.MARKERS,"<br></").concat(h,">")):e(c).replaceWith("<br>".concat(r.MARKERS));else{if(h=g.html.defaultTag(),g.node.isBlock(a))if("PRE"===a.tagName&&(l=!0),l)e(c).remove(),e(a).prepend("<br>".concat(r.MARKERS));else if(c.nextSibling&&"IMG"==c.nextSibling.tagName||c.nextSibling&&c.nextSibling.nextElementSibling&&"IMG"==c.nextSibling.nextElementSibling)e(c).replaceWith("<"+g.html.defaultTag()+">"+r.MARKERS+"<br></"+g.html.defaultTag()+">");else{if(g.node.isEmpty(a,!0))return f(c,l,d);if(g.opts.keepFormatOnDelete||"DIV"===a.tagName||"div"===g.html.defaultTag())if(!g.opts.keepFormatOnDelete&&"DIV"===a.tagName||"div"===g.html.defaultTag())e(a).before("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">");else if(g.opts.keepFormatOnDelete&&"DIV"!==a.tagName&&"div"!==g.html.defaultTag()&&t(g.selection.get().focusNode))e(a).before("".concat(g.node.openTagString(e(a).clone().removeAttr("id").get(0)),"<br>").concat(g.node.closeTagString(a)));else{for(var v=c,i=r.INVISIBLE_SPACE;v!==a&&!g.node.isElement(v);)v=v.parentNode,i=g.node.openTagString(v)+i+g.node.closeTagString(v);e(a).before(i)}else e(a).before("".concat(g.node.openTagString(e(a).clone().removeAttr("id").get(0)),"<br>").concat(g.node.closeTagString(a)))}else e(a).before("<br>");e(c).remove()}}(l,c,h):g.cursorLists._startEnter(l):!o(l)||c||h?m(l,c,h):g.cursorLists._middleEnter(l),g.$el.find(".fr-to-remove").each((function(){for(var t=g.node.contents(this),n=0;n<t.length;n++)t[n].nodeType===Node.TEXT_NODE&&(t[n].textContent=t[n].textContent.replace(/\u200B/g,""));e(this).replaceWith(this.innerHTML)})),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists(),g.spaces.normalizeAroundCursor()),g.selection.restore();var a=g.o_win.innerHeight;if(g.$oel[0].offsetHeight>a){var y=_();if(y){var i=v(y);i=i.top;var s=y.getBoundingClientRect().top;g.opts.scrollableContainer&&g.opts.enter!==r.ENTER_BR&&"BR"===y.tagName&&(s=i=y.parentNode.offsetTop),y.parentNode&&"TD"===y.parentNode.tagName&&a<s?g.o_win.scroll(0,s-50):s<0?g.o_win.scroll(0,i-80):!g.opts.scrollableContainer&&a<s+20?g.o_win.scroll(0,i-a+50):g.opts.scrollableContainer&&s+2*g.$tb.height()>g.$sc[0].scrollTop+e(g.$sc).height()&&g.$sc[0].scroll(0,i-e(g.$sc).height()+2*g.$tb.height())}}else if(g.opts.scrollableContainer&&g.opts.toolbarSticky){var E=_();if(E){var C=v(E);C=C.top;var w=E.getBoundingClientRect().top;g.opts.enter!==r.ENTER_BR&&"BR"===E.tagName&&(w=C=E.parentNode.offsetTop),(g.opts.iframe&&w+2*g.$tb.height()>g.$sc[0].scrollTop+e(g.$sc).height()||w+2*g.$tb.height()>e(g.$sc).height())&&g.$sc[0].scroll(0,C-e(g.$sc).height()+2*g.$tb.height())}}},backspace:function(){var d=!1,h=g.markers.insert();if(!h)return!0;for(var f=h.parentNode;f&&!g.node.isElement(f);){if("false"===f.getAttribute("contenteditable"))return e(h).replaceWith(r.MARKERS),g.selection.restore(),!1;if(f.innerText.length&&"true"===f.getAttribute("contenteditable"))break;f=f.parentNode}g.el.normalize();var m=h.previousSibling;if(m){var a=m.textContent;a&&a.length&&8203===a.charCodeAt(a.length-1)&&(1===a.length?e(m).remove():m.textContent=m.textContent.substr(0,a.length-c(a)))}return u(h)?o(h)&&n(h,e(h).parents("li").first().get(0))?g.cursorLists._backspace(h):d=l(h):t(h)?o(h)&&n(h,e(h).parents("li").first().get(0))?g.cursorLists._backspace(h):function(t){for(var n=0<e(t).parentsUntil(g.$el,"BLOCKQUOTE").length,o=g.node.deepestParent(t,[],!n),c=o;o&&!o.previousSibling&&"BLOCKQUOTE"!==o.tagName&&o.parentElement!==g.el&&!g.node.hasClass(o.parentElement,"fr-inner")&&r.SIMPLE_ENTER_TAGS.indexOf(o.parentElement.tagName)<0;)o=o.parentElement;if(o&&"BLOCKQUOTE"===o.tagName){var a=g.node.deepestParent(t,[e(t).parentsUntil(g.$el,"BLOCKQUOTE").get(0)]);a&&a.previousSibling&&(c=o=a)}if(null!==o){var l,i=o.previousSibling;if(g.node.isBlock(o)&&g.node.isEditable(o))if(i&&r.NO_DELETE_TAGS.indexOf(i.tagName)<0){if(g.node.isDeletable(i))e(i).remove(),e(t).replaceWith(r.MARKERS);else if(g.node.isEditable(i))if(g.node.isBlock(i))if(g.node.isEmpty(i)&&!g.node.isList(i))e(i).remove(),e(t).after(g.opts.keepFormatOnDelete?r.INVISIBLE_SPACE:"");else{if(g.node.isList(i)&&(i=e(i).find("li").last().get(0)),(l=g.node.contents(i)).length&&"BR"===l[l.length-1].tagName&&e(l[l.length-1]).remove(),"BLOCKQUOTE"===i.tagName&&"BLOCKQUOTE"!==o.tagName)for(l=g.node.contents(i);l.length&&g.node.isBlock(l[l.length-1]);)i=l[l.length-1],l=g.node.contents(i);else if("BLOCKQUOTE"!==i.tagName&&"BLOCKQUOTE"===c.tagName)for(l=g.node.contents(c);l.length&&g.node.isBlock(l[0]);)c=l[0],l=g.node.contents(c);if(g.node.isEmpty(o))e(t).remove(),g.selection.setAtEnd(i,!0);else{e(t).replaceWith(r.MARKERS);var s=i.childNodes;g.node.isBlock(s[s.length-1])?e(s[s.length-1]).append(c.innerHTML):e(i).append(c.innerHTML)}e(c).remove(),g.node.isEmpty(o)&&e(o).remove()}else e(t).replaceWith(r.MARKERS),"BLOCKQUOTE"===o.tagName&&i.nodeType===Node.ELEMENT_NODE?e(i).remove():(e(i).after(g.node.isEmpty(o)?"":e(o).html()),e(o).remove(),"BR"===i.tagName&&e(i).remove())}else if(i)8203===o.textContent.charCodeAt()&&o.childNodes[1]&&"BR"===o.childNodes[1].tagName&&o.tagName.toLowerCase()===g.html.defaultTag()&&o.previousSibling&&"TABLE"===o.previousSibling.tagName&&e(o).remove();else if(o&&"BLOCKQUOTE"===o.tagName&&0===e(o).text().replace(/\u200B/g,"").length)e(o).remove();else{var d=o.nextSibling;g.node.isEmpty(o)&&o.parentNode&&g.node.isEditable(o.parentNode)&&!d&&(o.parentNode!=g.el&&"TD"!==o.parentNode.tagName?e(o.parentNode).remove():o.parentNode!=g.el&&"TD"===o.parentNode.tagName&&e(o).remove())}}}(h):d=l(h),e(h).remove(),i(),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists(),g.spaces.normalizeAroundCursor()),g.selection.restore(),d},del:function(){var n=g.markers.insert();if(!n)return!1;if(g.el.normalize(),u(n))if(o(n))if(0===e(n).parents("li").first().find("ul, ol").length)g.cursorLists._del(n);else{var r=e(n).parents("li").first().find("ul, ol").first().find("li").first();(r=r.find(g.html.blockTagsQuery()).get(-1)||r).prepend(n),g.cursorLists._backspace(n)}else d(n);else t(n),h(n);e(n).remove(),i(),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists()),g.spaces.normalizeAroundCursor(),g.selection.restore()},isAtEnd:b,isAtStart:n}},r.MODULES.data=function(e){function p(e){return e}function t(e){for(var t=e.toString(),n=0,r=0;r<t.length;r++)n+=parseInt(t.charAt(r),10);return 10<n?n%9+1:n}function n(e,t,n){for(var r=Math.abs(n);0<r--;)e-=t;return n<0&&(e+=123),e}function u(t){return t&&"block"!==t.css("display")||t&&0===e.helpers.getPX(t.css("height"))?(t.remove(),!0):!(!t||"absolute"!==t.css("position")&&"fixed"!==t.css("position")||(t.remove(),0))}function r(t){return t&&0===e.$box.find(t).length}function g(){if(10<C&&(e[p(E("0ppecjvc=="))](),setTimeout((function(){d.FE=null}),10)),!e.$box)return!1;e.$wp.prepend(E(p(E(_)))),b=e.$wp.find("> div").first(),l=b.find("> a"),"rtl"===e.opts.direction&&b.css("left","auto").css("right",0).attr("direction","rtl"),C++}function o(e){for(var t=[E("9qqG-7amjlwq=="),E("KA3B3C2A6D1D5H5H1A3=="),E("3B9B3B5F3C4G3E3=="),E("QzbzvxyB2yA-9m=="),E("ji1kacwmgG5bc=="),E("nmA-13aogi1A3c1jd=="),E("BA9ggq=="),E("emznbjbH3fij=="),E("tkC-22d1qC-13sD1wzF-7=="),E("tA3jjf=="),E("1D1brkm==")],n=0;n<t.length;n++)if(String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),e.endsWith(t[n]))return!0;return!1}function c(){var e=E(p(m)),t=E(p("tzgatD-13eD1dtdrvmF3c1nrC-7saQcdav==")).split(".");try{return window.parent.document.querySelector(e)&&window[t[1]][t[2]]}catch(e){return!1}}var b,l,d=e.$,h="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2FC1A3NB2IF1HE1TH4WB8eB-11zVG2F3I3yYB5ZG4CB2DA15CC5AD3F1A1KG1oLA10B1A6wQF1H3vgale2C4F4XA2qc2A5D5B3pepmriKB3OE1HD1fUC10pjD-11E-11TB4YJ3bC-16zE-11yc1B2CE2BC3jhjKC1pdA-21OA6C1D5B-8vF4QA11pD6sqf1C3lldA-16BD4A2H3qoEA7bB-16rmNH5H1F1vSB7RE2A3TH4YC5A5b1A4d1B3whepyAC3AA2zknC3mbgf1SC4WH4PD8TC5ZB2C3H3jb2A5ZA2EF2aoFC5qqHC4B1H1zeGA7UA5RF4TA29TA6ZC4d1C3hyWA10A3rBB2E3decorationRD3QC10UD3E6E6ZD2F3F3fme2E5uxxrEC9C3E4fB-11azhHB1LD7D6VF4VVTPC6b1C4TYG3qzDD6B3B3AH4I2H2kxbHE1JD1yihfd1QD6WB1D4mhrc1B5rvFG3A14A7cDA2OC1AA1JB5zC-16KA6WB4C-8wvlTB5A5lkZB2C2C7zynBD2D2bI-7C-21d1HE2cubyvPC8A6VB3aroxxZE4C4F4e1I2BE1WjdifH1H4A14NA1GB1YG-10tWA3A14A9sVA2C5XH2A29b2A6gsleGG2jaED2D-13fhE1OA8NjwytyTD4e1sc1D-16ZC3B5C-9e1C2FB6EFF5B2C2JH4E1C2tdLE5A3UG4G-7b2D3B4fA-9oh1G3kqvB4AG3ibnjcAC6D2B1cDA9KC2QA6bRC4VA30RB8hYB2A4A-8h1A21A2B2==",f="7D4YH4fkhHB3pqDC3H2E1fkMD1IB1NF1D3QD9wB5rxqlh1A8c2B4ZA3FD2AA6FB5EB3jJG4D2J-7aC-21GB6PC5RE4TC11QD6XC4XE3XH3mlvnqjbaOA2OC2BE6A1fmI-7ujwbc1G5f1F3e1C11mXF4owBG3E1yD1E4F1D2D-8B-8C-7yC-22HD1MF5UE4cWA3D8D6a1B2C3H3a3I3sZA4B3A2akfwEB3xHD5D1F1wIC11pA-16xdxtVI2C9A6YC4a1A2F3B2GA6B4C3lsjyJB1eMA1D-11MF5PE4ja1D3D7byrf1C3e1C7D-16lwqAF3H2A1B-21wNE1MA1OG1HB2A-16tSE5UD4RB3icRA4F-10wtwzBB3E1C3CC2DA8LA2LA1EB1kdH-8uVB7decorg1J2B7B6qjrqGI2J1C6ijehIB1hkemC-13hqkrH4H-7QD6XF5XF3HLNAC3CB2aD2CD2KB10B4ycg1A-8KA4H4B11jVB5TC4yqpB-21pd1E4pedzGB6MD5B3ncB-7MA4LD2JB6PD5uH-8TB9C7YD5XD2E3I3jmiDB3zeimhLD8E2F2JC1H-9ivkPC5lG-10SB1D3H3A-21rc1A3d1E3fsdqwfGA2KA1OrC-22LA6D1B4afUB16SC7AitC-8qYA11fsxcajGA15avjNE2A-9h1hDB16B9tPC1C5F5UC1G3B8d2A5d1D4RnHJ3C3JB5D3ucMG1yzD-17hafjC-8VD3yWC6e1YD2H3ZE2C8C5oBA3H3D2vFA4WzJC4C2i1A-65fNB8afWA1H4A26mvkC-13ZB3E3h1A21BC4eFB2GD2AA5ghqND2A2B2==",m="MekC-11nB-8tIzpD7pewxvzC6mD-16xerg1==",v="lC4B3A3B2B5A1C2E4G1A2==",_="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==",y=function(){for(var e=0,t=document.domain,n=t.split("."),r="_gd".concat((new Date).getTime());e<n.length-1&&-1===document.cookie.indexOf("".concat(r,"=").concat(r));)t=n.slice(-1-++e).join("."),document.cookie="".concat(r,"=").concat(r,";domain=").concat(t,";");return document.cookie="".concat(r,"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(t,";"),(t||"").replace(/(^\.*)|(\.*$)/g,"")}(),E=p((function(e){if(!e)return e;for(var r="",o=p("charCodeAt"),c=p("fromCharCode"),a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(e[0]),l=1;l<e.length-2;l++){for(var i=t(++a),s=e[o](l),d="";/[0-9-]/.test(e[l+1]);)d+=e[++l];s=n(s,i,d=parseInt(d,10)||0),s^=a-1&31,r+=String[c](s)}return r})),C=0;return{_init:function(){var t=e.opts.key||[""],n=E(p("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9=="));"string"==typeof t&&(t=[t]);for(var m,C,a,w=!(e.ul=!0),i=0,s=0;s<t.length;s++){var S=(C=t[s],4===(a=(E(C)||"").split("|")).length&&"V3"===a[0]?[a[1],a[3],a[2]]:[null,null,""]),T=S[2];if(T===E(p(E("LGnD1KNZf1CPBYCAZB-8F3UDSLLSG1VFf1A3C2==")))||0<=T.indexOf(y,T.length-y.length)||o(y)||c()){if(null!==(m=S[1])&&!(0==m.indexOf("TRIAL")?(m=new Date(m.replace(/TRIAL/,"")),new Date(m)<new Date&&(h=f,1)):new Date(m)<new Date(E(v)))||!(0<(y||"").length)||o(y)||c()){e.ul=!1;break}w=!0,_=h,i=S[0]||-1}}var A=new Image;!0===e.ul&&(g(),A.src=w?"".concat(p(E(n)),"e=").concat(i):"".concat(p(E(n)),"u")),!0===e.ul&&(e.events.on("contentChanged",(function(){(u(b)||u(l)||r(b)||r(l))&&g()})),e.events.on("html.get",(function(e){return e+E("qD2H-9G3ioD-17qA1tE1B-8qI3A4hA-13C-11E2C1njfldD1E6pg1C-8sC3hfbkcD2G3stC-22gqgB3G2B-7vtoA4nweeD1A31A15B9uC-16A1F5dkykdc1B8dE-11bA3F2D3A9gd1E7F2tlI-8H-7vtxB2A5B2C3B2F2B5A6ldbyC4iqC-22D-17E-13mA3D2dywiB3oxlvfC1H4C2TjqbzlnI3ntB4E3qA2zaqsC6D3pmnkoE3C6D5wvuE3bwifdhB6hch1E4xibD-17dmrC1rG-7pntnF6nB-8F1D2A11C8plrkmF2F3MC-16bocqA2WwA-21ayeA1C4d1isC-22rD-13D6DfjpjtC2E6hB2G2G4A-7D2==")}))),e.events.on("html.set",(function(){var t=e.el.querySelector('[data-f-id="pbf"]');t&&d(t).remove()})),e.events.on("destroy",(function(){b&&b.length&&b.remove()}),!0)}}},r.MODULES.edit=function(e){function t(){if(e.browser.mozilla)try{e.doc.execCommand("enableObjectResizing",!1,"false"),e.doc.execCommand("enableInlineTableEditing",!1,"false")}catch(e){}if(e.browser.msie)try{e.doc.body.addEventListener("mscontrolselect",(function(e){return e.srcElement.focus(),!1}))}catch(e){}}var n=!1;function r(){return n}return{_init:function(){e.events.on("focus",(function(){r()?e.edit.off():e.edit.on()}))},on:function(){e.$wp?(e.$el.attr("contenteditable",!0),e.$el.removeClass("fr-disabled").attr("aria-disabled",!1),t()):e.$el.is("a")&&e.$el.attr("contenteditable",!0),e.events.trigger("edit.on",[],!0),n=!1},off:function(){e.events.disableBlur(),e.$wp?(e.$el.attr("contenteditable",!1),e.$el.addClass("fr-disabled").attr("aria-disabled",!0)):e.$el.is("a")&&e.$el.attr("contenteditable",!1),e.events.trigger("edit.off"),e.events.enableBlur(),n=!0},disableDesign:t,isDisabled:r}},r.MODULES.format=function(e){var t=e.$;function n(e,t){var n=e;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n+="id"===r?"#".concat(t[r]):"class"===r?".".concat(t[r]):"[".concat(r,'="').concat(t[r],'"]'));return n}function o(e,t){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}function b(n,r,o){var c,a,l,i={strong:{prop:"font-weight",val:"bold"},em:{prop:"font-style",val:"italic"}};if(n){if(e.node.isBlock(n)&&n.hasAttribute("contenteditable")&&"false"===n.getAttribute("contenteditable")||n.parentNode&&n.parentNode.hasAttribute("contenteditable")&&"false"===n.parentNode.getAttribute("contenteditable")){if(n.nextSibling&&t(n.nextSibling).hasClass("fr-marker"))return;if(n.nextSibling)return void b(n.nextSibling,r,o);if(n.parentNode&&e.node.isEditable(n.parentNode))return void b(n.parentNode,r,o)}for(;n&&n.nodeType===Node.COMMENT_NODE;)n=n.nextSibling;if(n){if(e.node.isBlock(n)&&"HR"!==n.tagName&&"LI"!==n.tagName)return e.node.hasClass(n.firstChild,"fr-marker")?b(n.firstChild.nextSibling,r,o):b(n.firstChild,r,o),!1;var s=t(e.doc.createElement(r));s.attr(o),s.insertBefore(n),(c=f(n))&&(0<=["strong","em"].indexOf(r)||"span"===r&&o.hasOwnProperty("style"))&&(l="span"===r?(a=(i=o.style.replace(/;$/,"").split(":"))[0].trim(),i[1].trim()):(a=i[r].prop,i[r].val),"background-color"!==a&&(t(c).css(a,l),function(e,n){var r,o=e.childNodes;for(r=0;r<o.length;r++)0<=["UL","OL","LI"].indexOf(o[r].tagName)&&""===o[r].style[n]&&t(o[r]).css(n,"initial")}(c,a)));for(var d=n;d&&!t(d).hasClass("fr-marker")&&0===t(d).find(".fr-marker").length&&"UL"!==d.tagName&&"OL"!==d.tagName;){var h=d;if("SPAN"===d.tagName&&t(d).hasClass("fr-tracking-deleted"))d=d.nextSibling;else{if(e.node.isBlock(d)&&"HR"!==n.tagName)return b(d.firstChild,r,o),!1;if("SPAN"===d.tagName&&e.node.isEditable(d))return b(d.firstChild,r,o),!1;if(d.tagName&&d.hasAttribute("contenteditable")&&"false"===d.getAttribute("contenteditable"))return void b(d.nextSibling,r,o);if(!e.node.isEditable(d.parentNode))return e.selection.restore(),void e.toolbar.disable();d=d.nextSibling,s.append(h)}}if(d)(t(d).find(".fr-marker").length||"UL"===d.tagName||"OL"===d.tagName)&&b(d.firstChild,r,o);else{for(var m=s.get(0).parentNode;m&&!m.nextSibling&&!e.node.isElement(m);)m=m.parentNode;if(m){var v=m.nextSibling;v&&(e.node.isBlock(v)?"HR"===v.tagName?b(v.nextSibling,r,o):b(v.firstChild,r,o):b(v,r,o))}}s.is(":empty")&&s.remove()}}}function c(c,l){var d;if(void 0===l&&(l={}),l.style&&delete l.style,e.selection.isCollapsed()){e.markers.insert();var h=e.$el.find(".fr-marker");h.get(0).nextSibling&&e.node.isBlock(h.get(0).nextSibling)&&!h.get(0).previousSibling&&"LI"===h.get(0).parentNode.tagName&&h.get(0).nextSibling.prepend(h.get(0)),h.replaceWith(function(e,t){var n="<".concat(e);for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n+=" ".concat(r,'="').concat(t[r],'"'));return n+">"}(c,l)+r.INVISIBLE_SPACE+r.MARKERS+function(e){return"</".concat(e,">")}(c)),e.selection.restore()}else{var a;e.selection.save(),b(e.$el.find('.fr-marker[data-type="true"]').length&&e.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling,c,l);do{for(a=e.$el.find("".concat(n(c,l)," > ").concat(n(c,l))),d=0;d<a.length;d++)a[d].outerHTML=a[d].innerHTML}while(a.length);e.el.normalize();var f=e.el.querySelectorAll(".fr-marker");for(d=0;d<f.length;d++){var i=t(f[d]);!0===i.data("type")?o(i.get(0).nextSibling,n(c,l))&&i.next().prepend(i):o(i.get(0).previousSibling,n(c,l))&&i.prev().append(i)}e.selection.restore()}}function l(t,r,c,l){if(!l){var a=!1;if(!0===t.data("type"))for(;e.node.isFirstSibling(t.get(0))&&!t.parent().is(e.$el)&&!t.parent().is("ol")&&!t.parent().is("ul");)t.parent().before(t),a=!0;else if(!1===t.data("type"))for(;e.node.isLastSibling(t.get(0))&&!t.parent().is(e.$el)&&!t.parent().is("ol")&&!t.parent().is("ul");)t.parent().after(t),a=!0;if(a)return!0}if(t.parents(r).length||void 0===r){var d,i="",s="",h=t.parent();if(h.is(e.$el)||e.node.isBlock(h.get(0)))return!1;for(;!(e.node.isBlock(h.parent().get(0))||void 0!==r&&o(h.get(0),n(r,c)));)i+=e.node.closeTagString(h.get(0)),s=e.node.openTagString(h.get(0))+s,h=h.parent();var f=t.get(0).outerHTML;return t.replaceWith('<span id="mark"></span>'),d=h.html().replace(/<span id="mark"><\/span>/,i+e.node.closeTagString(h.get(0))+s+f+i+e.node.openTagString(h.get(0))+s),h.replaceWith(e.node.openTagString(h.get(0))+d+e.node.closeTagString(h.get(0))),!0}return!1}function d(c,d){void 0===d&&(d={}),d.style&&delete d.style;var h=e.selection.isCollapsed();e.selection.save();for(var f=!0;f;){f=!1;for(var a=e.$el.find(".fr-marker"),m=0;m<a.length;m++){var i=t(a[m]),s=null;if(i.attr("data-cloned")||h||(s=i.clone().removeClass("fr-marker").addClass("fr-clone"),i.data("type")&&"true"===i.data("type").toString()?i.attr("data-cloned",!0).after(s):i.attr("data-cloned",!0).before(s)),l(i,c,d,h)){f=!0;break}}}!function r(c,l,d,h){for(var a,f={strong:{prop:"font-weight",val:"bold"},em:{prop:"font-style",val:"italic"}},i=e.node.contents(c.get(0)),s=0;s<i.length;s++){var m=i[s];if(m.innerHTML&&8203==m.innerHTML.charCodeAt()&&m.tagName.toLocaleLowerCase()==d&&m.childNodes.length<2&&!e.helpers.isMobile()&&(m.outerHTML=m.innerHTML),e.node.hasClass(m,"fr-marker"))l=(l+1)%2;else if(l)if(0<t(m).find(".fr-marker").length)l=r(t(m),l,d,h);else{(a="LI"===m.tagName?m:t(m).parentsUntil(e.$el,"li").get(0))&&(void 0===d||0<=["strong","em"].indexOf(d))&&(d?t(a).css(f[d].prop,""):a.style=""),(a=m.parentNode!==e.el?m.parentNode:null)&&1===a.nodeType&&"a"!==d&&a.hasAttribute("style")&&"SPAN"!==a.tagName&&"LI"!==a.tagName?a.style="":m&&1===m.nodeType&&"a"!==d&&m.hasAttribute("style")&&(m.style="");for(var v=t(m).find(d||"*:not(br)"),_=v.length-1;0<=_;_--){var y=v[_];(a="LI"===y.tagName?y:t(y).parentsUntil(e.$el,"li").get(0))&&(!d||0<=["strong","em"].indexOf(d))&&(d?t(a).css(f[d].prop,""):a.style=""),e.node.isBlock(y)||e.node.isVoid(y)||void 0!==d&&!o(y,n(d,h))?e.node.isBlock(y)&&void 0===d&&"TABLE"!==m.tagName&&e.node.clearAttributes(y):e.node.hasClass(y,"fr-clone")||e.node.hasClass(y,"fr-tracking-deleted")||t(y).data("tracking")||(y.outerHTML=y.innerHTML)}void 0===d&&m.nodeType===Node.ELEMENT_NODE&&!e.node.isVoid(m)||o(m,n(d,h))?e.node.isBlock(m)||(e.node.hasClass(m,"fr-clone")||e.opts.trackChangesEnabled?!e.node.hasClass(m,"fr-clone")&&e.opts.trackChangesEnabled&&m.parentNode&&(m.outerHTML=m.innerHTML):m.outerHTML=m.innerHTML):void 0===d&&m.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(m)&&"TABLE"!==m.tagName&&e.node.clearAttributes(m)}else 0<t(m).find(".fr-marker").length&&(l=r(t(m),l,d,h))}return l}(e.$el,0,c,d),h||(e.$el.find(".fr-marker").remove(),e.$el.find(".fr-clone").removeClass("fr-clone").addClass("fr-marker")),h&&e.$el.find(".fr-marker").before(r.INVISIBLE_SPACE).after(r.INVISIBLE_SPACE),e.html.cleanEmptyTags(),e.el.normalize(),e.selection.restore();var v=e.win.getSelection()&&e.win.getSelection().anchorNode;if(v){var _=e.node.blockParent(v),y=!!v.textContent.replace(/\u200B/g,"").length,E=e.win.getSelection().getRangeAt(0),p=E.startOffset,u=E.endOffset;e.selection.text().replace(/\u200B/g,"").length||function e(t,n){if(t&&n){if(t.isSameNode(n)?t.textContent=t.textContent.replace(/\u200B(?=.*\u200B)/g,""):t.nodeType===Node.TEXT_NODE&&(t.textContent=t.textContent.replace(/\u200B/g,"")),!t.childNodes.length)return!1;Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){e(t,n)}))}}(_,v);var C=e.win.getSelection().getRangeAt(0);if(v.nodeType===Node.TEXT_NODE){if(!y||!e.selection.text().length&&p===u){var g=v.textContent.search(/\u200B/g)+1;if(e.browser.msie){var w=e.doc.createRange();e.selection.get().removeAllRanges(),w.setStart(v,g),w.setEnd(v,g),e.selection.get().addRange(w)}else C.setStart(v,g),C.setEnd(v,g)}}else{var S,b,T=0,A=t(v).contents();if(e.browser.msie){for(;b=A[T];)b.nodeType===Node.TEXT_NODE&&0<=b.textContent.search(/\u200B/g)&&(S=b),T++;S=t(S)}else S=A.filter((function(e){return e.nodeType===Node.TEXT_NODE&&0<=e.textContent.search(/\u200B/g)}));if(S.length&&!e.opts.trackChangesEnabled){var R=S.text().search(/\u200B/g)+1;C.setStart(S.get(0),R),C.setEnd(S.get(0),R)}}}}function h(n,o){var c,d,a,h,i,s,v,_=null;if(e.selection.isCollapsed()){e.markers.insert();var y=(d=e.$el.find(".fr-marker")).parent();if(e.node.openTagString(y.get(0))==='<span style="'.concat(n,": ").concat(y.css(n),';">')){if(e.node.isEmpty(y.get(0)))_=t(e.doc.createElement("span")).attr("style","".concat(n,": ").concat(o,";")).html("".concat(r.INVISIBLE_SPACE).concat(r.MARKERS)),y.replaceWith(_);else{var E={};E["style*"]="".concat(n,":"),l(d,"span",E,!0),d=e.$el.find(".fr-marker"),o?(_=t(e.doc.createElement("span")).attr("style","".concat(n,": ").concat(o,";")).html("".concat(r.INVISIBLE_SPACE).concat(r.MARKERS)),d.replaceWith(_)):d.replaceWith(r.INVISIBLE_SPACE+r.MARKERS)}e.html.cleanEmptyTags()}else e.node.isEmpty(y.get(0))&&y.is("span")?(d.replaceWith(r.MARKERS),y.css(n,o)):(d.get(0).nextSibling&&e.node.isBlock(d.get(0).nextSibling)&&!d.get(0).previousSibling&&"LI"===d.get(0).parentNode.tagName&&d.get(0).nextSibling.prepend(d.get(0)),_=t('<span style="'.concat(n,": ").concat(o,';">').concat(r.INVISIBLE_SPACE).concat(r.MARKERS,"</span>")),d.replaceWith(_));_&&m(_,n,o)}else{if(e.selection.save(),null===o||"color"===n&&0<e.$el.find(".fr-marker").parents("u, a").length){var p=e.$el.find(".fr-marker");for(c=0;c<p.length;c++)if(!0===(d=t(p[c])).data("type")||"true"===d.data("type"))for(;e.node.isFirstSibling(d.get(0))&&!d.parent().is(e.$el)&&!e.node.isElement(d.parent().get(0))&&!e.node.isBlock(d.parent().get(0));)d.parent().before(d);else for(;e.node.isLastSibling(d.get(0))&&!d.parent().is(e.$el)&&!e.node.isElement(d.parent().get(0))&&!e.node.isBlock(d.parent().get(0));)d.parent().after(d)}for(var u=e.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling;u.firstChild;)u=u.firstChild;var C={class:"fr-unprocessed"};for(o&&(C.style="".concat(n,": ").concat(o,";")),b(u,"span",C),e.$el.find(".fr-marker + .fr-unprocessed").each((function(){t(this).prepend(t(this).prev())})),e.$el.find(".fr-unprocessed + .fr-marker").each((function(){t(this).prev().append(t(this))})),(o||"").match(/\dem$/)&&e.$el.find("span.fr-unprocessed").removeClass("fr-unprocessed");0<e.$el.find("span.fr-unprocessed").length;){if(a=f(_=e.$el.find("span.fr-unprocessed").first().removeClass("fr-unprocessed")),_.parent().get(0).normalize(),_.parent().is("span")&&1===_.parent().get(0).childNodes.length){var g=o;e.browser.msie&&!o&&(g=""),_.parent().css(n,g);var w=_;_=_.parent(),w.replaceWith(w.html())}for(h=_.find("span"),a&&"background-color"!==n&&(a.normalize(),h=t(a).find("span:not(.fr-unprocessed)")),c=h.length-1;0<=c;c--)i=h[c],s=n,v=void 0,(v=t(i)).css(s,""),""===v.attr("style")&&v.replaceWith(v.html());m(_,n,o)}}!function(){for(var n;0<e.$el.find(".fr-split:empty").length;)e.$el.find(".fr-split:empty").remove();e.$el.find(".fr-split").removeClass("fr-split"),e.$el.find('[style=""]').removeAttr("style"),e.$el.find('[class=""]').removeAttr("class"),e.html.cleanEmptyTags();for(var r=e.$el.find("span"),o=r.length-1;0<=o;o--){var c=r[o];c.attributes&&0!==c.attributes.length||t(c).replaceWith(c.innerHTML)}e.el.normalize();var a=e.$el.find("span[style] + span[style]");for(n=0;n<a.length;n++){var d=t(a[n]),i=t(a[n]).prev();d.get(0).previousSibling===i.get(0)&&e.node.openTagString(d.get(0))===e.node.openTagString(i.get(0))&&(d.prepend(i.html()),i.remove())}e.$el.find("span[style] span[style]").each((function(){if(0<=t(this).attr("style").indexOf("font-size")){var e=t(this).parents("span[style]");e.attr("style")&&0<=e.attr("style").indexOf("background-color")&&(t(this).attr("style","".concat(t(this).attr("style"),";").concat(e.attr("style"))),l(t(this),"span[style]",{},!1))}})),e.el.normalize(),e.selection.restore()}()}function f(n){var r,o,c,a,l,i;if(r="LI"===n.tagName?n:t(n).parentsUntil(e.$el,"li").get(0)){if((i=e.selection.info(r)).atStart&&i.atEnd)return r;if(i.atStart&&!i.atEnd&&(o=t(r).find(".fr-marker[data-type=false]").get(0),c=t(o).parentsUntil(e.$el,"li").get(0),a=t(o).parent().get(0),(l=o.nextSibling)&&0<=["UL","OL"].indexOf(l.tagName)||!c.isSameNode(r)||!l&&("LI"===a.tagName||!a.nextSibling||0<=["UL","OL"].indexOf(a.nextSibling.tagName)||e.node.isVoid(a.nextSibling))))return r}}function m(n,r,o){var c,a,l,i=n.parentsUntil(e.$el,"span[style]"),s=[];for(c=i.length-1;0<=c;c--)a=i[c],l=r,0===t(a).attr("style").indexOf("".concat(l,":"))||0<=t(a).attr("style").indexOf(";".concat(l,":"))||0<=t(a).attr("style").indexOf("; ".concat(l,":"))||s.push(i[c]);if((i=i.not(s)).length){for(var d="",h="",f="",m="",p=n.get(0);p=p.parentNode,t(p).addClass("fr-split"),d+=e.node.closeTagString(p),h=e.node.openTagString(t(p).clone().addClass("fr-split").get(0))+h,i.get(0)!==p&&(f+=e.node.closeTagString(p),m=e.node.openTagString(t(p).clone().addClass("fr-split").get(0))+m),i.get(0)!==p;);var u="".concat(d+e.node.openTagString(t(i.get(0)).clone().css(r,o||"").get(0))+m+n.css(r,"").get(0).outerHTML+f,"</span>").concat(h);n.replaceWith('<span id="fr-break"></span>');var v=i.get(0).outerHTML;t(i.get(0)).replaceWith(v.replace(/<span id="fr-break"><\/span>/g,(function(){return u})))}}function a(t,r){void 0===r&&(r={}),r.style&&delete r.style;var c=e.selection.ranges(0),l=c.startContainer;if(l.nodeType===Node.ELEMENT_NODE&&0<l.childNodes.length&&l.childNodes[c.startOffset]&&(l=l.childNodes[c.startOffset]),!c.collapsed&&l.nodeType===Node.TEXT_NODE&&c.startOffset===(l.textContent||"").length){for(;!e.node.isBlock(l.parentNode)&&!l.nextSibling;)l=l.parentNode;l.nextSibling&&(l=l.nextSibling)}for(var a=l;a&&a.nodeType===Node.ELEMENT_NODE&&!o(a,n(t,r));)a=a.firstChild;if(a&&a.nodeType===Node.ELEMENT_NODE&&o(a,n(t,r)))return!0;var d=l;for(d&&d.nodeType!==Node.ELEMENT_NODE&&(d=d.parentNode);d&&d.nodeType===Node.ELEMENT_NODE&&d!==e.el&&!o(d,n(t,r));)d=d.parentNode;return!(!d||d.nodeType!==Node.ELEMENT_NODE||d===e.el||!o(d,n(t,r)))}return{is:a,toggle:function(e,t){a(e,t)?d(e,t):c(e,t)},apply:c,remove:d,applyStyle:h,removeStyle:function(e){h(e,null)}}},r.MODULES.spaces=function(e){function t(t,n){var o=t.previousSibling,c=t.nextSibling,a=t.textContent,l=t.parentNode,i=[r.ENTER_P,r.ENTER_DIV,r.ENTER_BR];if(!e.html.isPreformatted(l)){n&&(a=a.replace(/[\f\n\r\t\v ]{2,}/g," "),c&&"BR"!==c.tagName&&!e.node.isBlock(c)||!(e.node.isBlock(l)||e.node.isLink(l)&&!l.nextSibling||e.node.isElement(l))||(a=a.replace(/[\f\n\r\t\v ]{1,}$/g,"")),o&&"BR"!==o.tagName&&!e.node.isBlock(o)||!(e.node.isBlock(l)||e.node.isLink(l)&&!l.previousSibling||e.node.isElement(l))||(a=a.replace(/^[\f\n\r\t\v ]{1,}/g,"")),(e.node.isBlock(c)||e.node.isBlock(o))&&(!o||o&&"A"!==o.tagName)&&(a=a.replace(/^[\f\n\r\t\v ]{1,}/g,""))," "===a&&(o&&e.node.isVoid(o)||c&&e.node.isVoid(c))&&!(o&&c&&e.node.isVoid(o)||c&&o&&e.node.isVoid(c))&&(a="")),(!o&&e.node.isBlock(c)||!c&&e.node.isBlock(o))&&e.node.isBlock(l)&&l!==e.el&&(a=a.replace(/^[\f\n\r\t\v ]{1,}/g,"")),n||(a=a.replace(new RegExp(r.UNICODE_NBSP,"g")," "));for(var s="",d=0;d<a.length;d++)32!=a.charCodeAt(d)||0!==d&&32!=s.charCodeAt(d-1)||!((e.opts.enter===r.ENTER_BR||e.opts.enter===r.ENTER_DIV)&&(o&&"BR"===o.tagName||c&&"BR"===c.tagName)||o&&c&&o.tagName===c.tagName||!(o&&c&&e.node.isVoid(o)||o&&c&&e.node.isVoid(c))||o&&c&&0<=["STRONG","U","EM"].indexOf(o.tagName)&&"BR"===c.tagName)?s+=a[d]:s+=r.UNICODE_NBSP;e.browser.chrome&&1<s.length&&32===s.charCodeAt(s.length-1)&&(c&&c.nextSibling&&c.nextSibling.nextSibling&&"BR"===c.nextSibling.nextSibling.tagName||c&&"BR"===c.tagName)&&(s=s.substring(0,s.length-1)+r.UNICODE_NBSP),(!c||c&&e.node.isBlock(c)||c&&c.nodeType===Node.ELEMENT_NODE&&e.win.getComputedStyle(c)&&"block"===e.win.getComputedStyle(c).display)&&(!e.node.isVoid(o)||o&&-1!==["P","DIV","BR"].indexOf(o.tagName)&&-1!==i.indexOf(e.opts.enter))&&(s=s.replace(/ $/,r.UNICODE_NBSP)),!o||e.node.isVoid(o)||e.node.isBlock(o)||1!==(s=s.replace(/^\u00A0([^ $])/," $1")).length||160!==s.charCodeAt(0)||!c||e.node.isVoid(c)||e.node.isBlock(c)||e.node.hasClass(o,"fr-marker")&&e.node.hasClass(c,"fr-marker")||(s=" "),n||(s=s.replace(/([^ \u00A0])\u00A0([^ \u00A0])/g,"$1 $2")),t.textContent!==s&&(t.textContent=s)}}function n(n,r){if(void 0!==n&&n||(n=e.el),void 0===r&&(r=!1),!n.getAttribute||"false"!==n.getAttribute("contenteditable"))if(n.nodeType===Node.TEXT_NODE)t(n,r);else if(n.nodeType===Node.ELEMENT_NODE)for(var o=e.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,e.node.filter((function(t){for(var n=t.parentNode;n&&n!==e.el;){if("STYLE"===n.tagName||"IFRAME"===n.tagName)return!1;if("PRE"===n.tagName)return!1;n=n.parentNode}return null!==t.textContent.match(/([ \u00A0\f\n\r\t\v]{2,})|(^[ \u00A0\f\n\r\t\v]{1,})|([ \u00A0\f\n\r\t\v]{1,}$)/g)&&!e.node.hasClass(t.parentNode,"fr-marker")})),!1);o.nextNode();)t(o.currentNode,r)}return{normalize:n,normalizeAroundCursor:function(){for(var t=[],r=e.el.querySelectorAll(".fr-marker"),o=0;o<r.length;o++){for(var c=null,l=(c=e.node.blockParent(r[o])||r[o]).nextSibling,i=c.previousSibling;l&&"BR"===l.tagName;)l=l.nextSibling;for(;i&&"BR"===i.tagName;)i=i.previousSibling;c&&t.indexOf(c)<0&&t.push(c),i&&t.indexOf(i)<0&&t.push(i),l&&t.indexOf(l)<0&&t.push(l)}for(var s=0;s<t.length;s++)n(t[s])}}},r.INVISIBLE_SPACE="&#8203;",r.HAIR_SPACE="&#8202;",r.START_MARKER='<span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;">'.concat(r.INVISIBLE_SPACE,"</span>"),r.END_MARKER='<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;">'.concat(r.INVISIBLE_SPACE,"</span>"),r.MARKERS=r.START_MARKER+r.END_MARKER,r.MODULES.markers=function(e){var t=e.$;function n(){if(!e.$wp)return null;try{var n=e.selection.ranges(0),o=n.commonAncestorContainer;if(o!==e.el&&!e.$el.contains(o))return null;var c=n.cloneRange(),l=n.cloneRange();c.collapse(!0);var a=t(e.doc.createElement("SPAN")).addClass("fr-marker").attr("style","display: none; line-height: 0;").html(r.INVISIBLE_SPACE).get(0);if(c.insertNode(a),a=e.$el.find("span.fr-marker").get(0)){for(var d=a.nextSibling;d&&d.nodeType===Node.TEXT_NODE&&0===d.textContent.length;)t(d).remove(),d=e.$el.find("span.fr-marker").get(0).nextSibling;return e.selection.clear(),e.selection.get().addRange(l),a}return null}catch(e){}}function o(){e.$el.find(".fr-marker").remove()}return{place:function(n,o,c){var l,a,d;try{var i=n.cloneRange();if(i.collapse(o),i.insertNode(function(n,o){var c=t(e.doc.createElement("SPAN"));return c.addClass("fr-marker").attr("data-id",o).attr("data-type",n).attr("style","display: ".concat(e.browser.safari?"none":"inline-block","; line-height: 0;")).html(r.INVISIBLE_SPACE),c.get(0)}(o,c)),!0===o)for(d=(l=e.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(c,'"]')).get(0)).nextSibling;d&&d.nodeType===Node.TEXT_NODE&&0===d.textContent.length;)t(d).remove(),d=l.nextSibling;if(!0===o&&!n.collapsed){for(;!e.node.isElement(l.parentNode)&&!d;)-1</\bfa\b/g.test(l.parentNode.className)&&"I"===l.parentNode.tagName?t(l.parentNode).before(l):t(l.parentNode).after(l),d=l.nextSibling;if(d&&d.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(d)&&"HR"!==d.tagName){for(a=[d];d=a[0],(a=e.node.contents(d))[0]&&e.node.isBlock(a[0]););t(d).prepend(t(l))}}if(!1===o&&!n.collapsed){if((d=(l=e.$el.find('span.fr-marker[data-type="false"][data-id="'.concat(c,'"]')).get(0)).previousSibling)&&d.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(d)&&"HR"!==d.tagName){for(a=[d];d=a[a.length-1],(a=e.node.contents(d))[a.length-1]&&e.node.isBlock(a[a.length-1]););t(d).append(t(l))}(l.parentNode&&0<=["TD","TH"].indexOf(l.parentNode.tagName)||!l.previousSibling&&e.node.isBlock(l.parentElement))&&(l.parentNode.previousSibling&&!l.previousSibling?t(l.parentNode.previousSibling).append(l):0<=["TD","TH"].indexOf(l.parentNode.tagName)&&l.parentNode.firstChild===l&&(l.parentNode.previousSibling?t(l.parentNode.previousSibling).append(l):l.parentNode.parentNode&&l.parentNode.parentNode.previousSibling&&t(l.parentNode.parentNode.previousSibling).append(l)))}var s=e.$el.find('span.fr-marker[data-type="'.concat(o,'"][data-id="').concat(c,'"]')).get(0);return s&&(s.style.display="none"),s}catch(e){return null}},insert:n,split:function(){e.selection.isCollapsed()||e.selection.remove();var r=e.$el.find(".fr-marker").get(0);if(r||(r=n()),!r)return null;var o=e.node.deepestParent(r);if(o||(o=e.node.blockParent(r))&&"LI"!==o.tagName&&(o=null),o)if(e.node.isBlock(o)&&e.node.isEmpty(o))"LI"!==o.tagName||o.parentNode.firstElementChild!==o||e.node.isEmpty(o.parentNode)?t(o).replaceWith('<span class="fr-marker"></span>'):t(o).append('<span class="fr-marker"></span>');else if(e.cursor.isAtStart(r,o))t(o).before('<span class="fr-marker"></span>'),t(r).remove();else if(e.cursor.isAtEnd(r,o))t(o).after('<span class="fr-marker"></span>'),t(r).remove();else{for(var c=r,l="",a="";c=c.parentNode,l+=e.node.closeTagString(c),a=e.node.openTagString(c)+a,c!==o;);t(r).replaceWith('<span id="fr-break"></span>');var d=e.node.openTagString(o)+t(o).html()+e.node.closeTagString(o);d=d.replace(/<span id="fr-break"><\/span>/g,"".concat(l,'<span class="fr-marker"></span>').concat(a)),t(o).replaceWith(d)}return e.$el.find(".fr-marker").get(0)},insertAtPoint:function(t){var r,c=t.clientX,l=t.clientY;o();var a=null;if(void 0!==e.doc.caretPositionFromPoint?(r=e.doc.caretPositionFromPoint(c,l),(a=e.doc.createRange()).setStart(r.offsetNode,r.offset),a.setEnd(r.offsetNode,r.offset)):void 0!==e.doc.caretRangeFromPoint&&(r=e.doc.caretRangeFromPoint(c,l),(a=e.doc.createRange()).setStart(r.startContainer,r.startOffset),a.setEnd(r.startContainer,r.startOffset)),null!==a&&void 0!==e.win.getSelection){var d=e.win.getSelection();d.removeAllRanges(),d.addRange(a)}else if(void 0!==e.doc.body.createTextRange)try{(a=e.doc.body.createTextRange()).moveToPoint(c,l);var i=a.duplicate();i.moveToPoint(c,l),a.setEndPoint("EndToEnd",i),a.select()}catch(e){return!1}n()},remove:o}},r.MODULES.selection=function(e){var t=e.$;function s(){var t="";return e.win.getSelection?t=e.win.getSelection():e.doc.getSelection?t=e.doc.getSelection():e.doc.selection&&(t=e.doc.selection.createRange().text),t.toString()}function n(){return e.win.getSelection?e.win.getSelection():e.doc.getSelection?e.doc.getSelection():e.doc.selection.createRange()}function o(t){var r=n(),o=[];if(r&&r.getRangeAt&&r.rangeCount){o=[];for(var c=0;c<r.rangeCount;c++)o.push(r.getRangeAt(c))}else o=e.doc.createRange?[e.doc.createRange()]:[];return void 0!==t?o[t]:o}function c(){var e=n();try{e.removeAllRanges?e.removeAllRanges():e.empty?e.empty():e.clear&&e.clear()}catch(e){}}function p(e,t){var n=e;return n.nodeType===Node.ELEMENT_NODE&&0<n.childNodes.length&&n.childNodes[t]&&(n=n.childNodes[t]),n.nodeType===Node.TEXT_NODE&&(n=n.parentNode),n}function l(){if(e.$wp){e.markers.remove();var n,r,c=o(),l=[];for(r=0;r<c.length;r++)if(c[r].startContainer!==e.doc||e.browser.msie){var a=(n=c[r]).collapsed,d=e.markers.place(n,!0,r),i=e.markers.place(n,!1,r);if(void 0!==d&&d||!a||(t(".fr-marker").remove(),e.selection.setAtEnd(e.el)),e.el.normalize(),e.browser.safari&&!a)try{(n=e.doc.createRange()).setStartAfter(d),n.setEndBefore(i),l.push(n)}catch(e){}}if(e.browser.safari&&l.length)for(e.selection.clear(),r=0;r<l.length;r++)e.selection.get().addRange(l[r])}}function d(){var r,o=e.el.querySelectorAll('.fr-marker[data-type="true"]');if(!e.$wp)return e.markers.remove(),!1;if(0===o.length)return!1;if(e.browser.msie||e.browser.edge)for(r=0;r<o.length;r++)o[r].style.display="inline-block";e.core.hasFocus()||e.browser.msie||e.browser.webkit||e.$el.focus(),c();var l=n();for(r=0;r<o.length;r++){var d=t(o[r]).data("id"),a=o[r],f=e.doc.createRange(),i=e.$el.find('.fr-marker[data-type="false"][data-id="'.concat(d,'"]'));(e.browser.msie||e.browser.edge)&&i.css("display","inline-block");var s=null;if(0<i.length){i=i[0];try{for(var m=!1,v=a.nextSibling,_=null;v&&v.nodeType===Node.TEXT_NODE&&0===v.textContent.length;)v=(_=v).nextSibling,t(_).remove();for(var y=i.nextSibling;y&&y.nodeType===Node.TEXT_NODE&&0===y.textContent.length;)y=(_=y).nextSibling,t(_).remove();if(a.nextSibling===i||i.nextSibling===a){for(var p=a.nextSibling===i?a:i,u=p===a?i:a,E=p.previousSibling;E&&E.nodeType===Node.TEXT_NODE&&0===E.length;)E=(_=E).previousSibling,t(_).remove();if(E&&E.nodeType===Node.TEXT_NODE)for(;E&&E.previousSibling&&E.previousSibling.nodeType===Node.TEXT_NODE;)E.previousSibling.textContent+=E.textContent,E=E.previousSibling,t(E.nextSibling).remove();for(var g=u.nextSibling;g&&g.nodeType===Node.TEXT_NODE&&0===g.length;)g=(_=g).nextSibling,t(_).remove();if(g&&g.nodeType===Node.TEXT_NODE)for(;g&&g.nextSibling&&g.nextSibling.nodeType===Node.TEXT_NODE;)g.nextSibling.textContent=g.textContent+g.nextSibling.textContent,g=g.nextSibling,t(g.previousSibling).remove();if(E&&(e.node.isVoid(E)||e.node.isBlock(E))&&(E=null),g&&(e.node.isVoid(g)||e.node.isBlock(g))&&(g=null),E&&g&&E.nodeType===Node.TEXT_NODE&&g.nodeType===Node.TEXT_NODE){t(a).remove(),t(i).remove();var C=E.textContent.length;E.textContent+=g.textContent,t(g).remove(),e.spaces.normalize(E),f.setStart(E,C),f.setEnd(E,C),m=!0}else!E&&g&&g.nodeType===Node.TEXT_NODE?(t(a).remove(),t(i).remove(),e.opts.htmlUntouched||e.spaces.normalize(g),s=t(e.doc.createTextNode("​")).get(0),t(g).before(s),f.setStart(g,0),f.setEnd(g,0),m=!0):!g&&E&&E.nodeType===Node.TEXT_NODE&&(t(a).remove(),t(i).remove(),e.opts.htmlUntouched||e.spaces.normalize(E),s=t(e.doc.createTextNode("​")).get(0),t(E).after(s),f.setStart(E,E.textContent.length),f.setEnd(E,E.textContent.length),m=!0)}if(!m){var w=void 0,b=void 0;b=(e.browser.chrome||e.browser.edge)&&a.nextSibling===i?(w=h(i,f,!0)||f.setStartAfter(i),h(a,f,!1)||f.setEndBefore(a)):(a.previousSibling===i&&(i=(a=i).nextSibling),i.nextSibling&&"BR"===i.nextSibling.tagName||!i.nextSibling&&e.node.isBlock(a.previousSibling)||a.previousSibling&&"BR"===a.previousSibling.tagName||(a.style.display="inline",i.style.display="inline",s=t(e.doc.createTextNode("​")).get(0)),w=h(a,f,!0)||t(a).before(s)&&f.setStartBefore(a),h(i,f,!1)||t(i).after(s)&&f.setEndAfter(i)),"function"==typeof w&&w(),"function"==typeof b&&b()}}catch(e){}}s&&t(s).remove();try{l.addRange(f)}catch(e){}}e.markers.remove()}function h(n,r,o){var c,a=n.previousSibling,l=n.nextSibling;return a&&l&&a.nodeType===Node.TEXT_NODE&&l.nodeType===Node.TEXT_NODE?(c=a.textContent.length,o?(l.textContent=a.textContent+l.textContent,t(a).remove(),t(n).remove(),e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setStart(l,c)}):(a.textContent+=l.textContent,t(l).remove(),t(n).remove(),e.opts.htmlUntouched||e.spaces.normalize(a),function(){r.setEnd(a,c)})):a&&!l&&a.nodeType===Node.TEXT_NODE?(c=a.textContent.length,o?(e.opts.htmlUntouched||e.spaces.normalize(a),function(){r.setStart(a,c)}):(e.opts.htmlUntouched||e.spaces.normalize(a),function(){r.setEnd(a,c)})):!(!l||a||l.nodeType!==Node.TEXT_NODE)&&(o?(e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setStart(l,0)}):(e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setEnd(l,0)}))}function f(){for(var e=o(),t=0;t<e.length;t++)if(!e[t].collapsed)return!1;return!0}function a(t){var n,r,o=!1,a=!1;if(e.win.getSelection){var c=e.win.getSelection();c.rangeCount&&((r=(n=c.getRangeAt(0)).cloneRange()).selectNodeContents(t),r.setEnd(n.startContainer,n.startOffset),o=i(r),r.selectNodeContents(t),r.setStart(n.endContainer,n.endOffset),a=i(r))}else e.doc.selection&&"Control"!==e.doc.selection.type&&((r=(n=e.doc.selection.createRange()).duplicate()).moveToElementText(t),r.setEndPoint("EndToStart",n),o=i(r),r.moveToElementText(t),r.setEndPoint("StartToEnd",n),a=i(r));return{atStart:o,atEnd:a}}function i(e){return""===e.toString().replace(/[\u200B-\u200D\uFEFF]/g,"")}function m(n,r){void 0===r&&(r=!0);var o=t(n).html();o&&o.replace(/\u200b/g,"").length!==o.length&&t(n).html(o.replace(/\u200b/g,""));for(var c=e.node.contents(n),a=0;a<c.length;a++)c[a].nodeType!==Node.ELEMENT_NODE?t(c[a]).remove():(m(c[a],0===a),0===a&&(r=!1));if(n.nodeType===Node.TEXT_NODE){var l=t(document.createElement("span")).attr("data-first","true").attr("data-text","true");t(n)[0].replaceWith(l[0])}else r&&t(n).attr("data-first",!0)}function v(){return 0===t(this).find("fr-inner").length}function u(){try{if(!e.$wp)return!1;for(var t=o(0).commonAncestorContainer;t&&!e.node.isElement(t);)t=t.parentNode;return!!e.node.isElement(t)}catch(e){return!1}}function _(t,n){if(!t||0<t.getElementsByClassName("fr-marker").length)return!1;for(var o=t.firstChild;o&&(e.node.isBlock(o)||n&&!e.node.isVoid(o)&&o.nodeType===Node.ELEMENT_NODE);)o=(t=o).firstChild;t.innerHTML=r.MARKERS+t.innerHTML}function y(t,n){if(!t||0<t.getElementsByClassName("fr-marker").length)return!1;for(var o=t.lastChild;o&&(e.node.isBlock(o)||n&&!e.node.isVoid(o)&&o.nodeType===Node.ELEMENT_NODE);)o=(t=o).lastChild;var c=e.doc.createElement("SPAN");for(c.setAttribute("id","fr-sel-markers"),c.innerHTML=r.MARKERS;t.parentNode&&e.opts.htmlAllowedEmptyTags&&0<=e.opts.htmlAllowedEmptyTags.indexOf(t.tagName.toLowerCase());)t=t.parentNode;t.appendChild(c);var a=t.querySelector("#fr-sel-markers");a.outerHTML=a.innerHTML}return{text:s,get:n,ranges:o,clear:c,element:function(){var r=n();try{if(r.rangeCount){var c,l=o(0),d=l.startContainer;if(e.node.isElement(d)&&0===l.startOffset&&d.childNodes.length)for(;d.childNodes.length&&d.childNodes[0].nodeType===Node.ELEMENT_NODE;)d=d.childNodes[0];if(d.nodeType===Node.TEXT_NODE&&l.startOffset===(d.textContent||"").length&&d.nextSibling&&(d=d.nextSibling),d.nodeType===Node.ELEMENT_NODE){var a=!1;if(0<d.childNodes.length&&d.childNodes[l.startOffset]){for(c=d.childNodes[l.startOffset];c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;if(c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,a=!0),!a&&1<d.childNodes.length&&0<l.startOffset&&d.childNodes[l.startOffset-1]){for(c=d.childNodes[l.startOffset-1];c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,a=!0)}}else!l.collapsed&&d.nextSibling&&d.nextSibling.nodeType===Node.ELEMENT_NODE&&(c=d.nextSibling)&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,a=!0);!a&&0<d.childNodes.length&&t(d.childNodes[0]).text().replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&["BR","IMG","HR"].indexOf(d.childNodes[0].tagName)<0&&(d=d.childNodes[0])}for(;d.nodeType!==Node.ELEMENT_NODE&&d.parentNode||d.nodeType===Node.ELEMENT_NODE&&"BR"===d.nodeName&&d.parentNode;)d=d.parentNode;for(var h=d;h&&"HTML"!==h.tagName;){if(h===e.el)return d;h=t(h).parent()[0]}}}catch(e){}return e.el},endElement:function(){var r=n();try{if(r.rangeCount){var c,l=o(0),d=l.endContainer;if(d.nodeType===Node.ELEMENT_NODE){var a=!1;0<d.childNodes.length&&d.childNodes[l.endOffset]&&t(d.childNodes[l.endOffset]).text()===s()?(d=d.childNodes[l.endOffset],a=!0):!l.collapsed&&d.previousSibling&&d.previousSibling.nodeType===Node.ELEMENT_NODE?(c=d.previousSibling)&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,a=!0):!l.collapsed&&0<d.childNodes.length&&d.childNodes[l.endOffset]&&(c=d.childNodes[l.endOffset].previousSibling).nodeType===Node.ELEMENT_NODE&&c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,a=!0),!a&&0<d.childNodes.length&&t(d.childNodes[d.childNodes.length-1]).text()===s()&&["BR","IMG","HR"].indexOf(d.childNodes[d.childNodes.length-1].tagName)<0&&(d=d.childNodes[d.childNodes.length-1])}for(d.nodeType===Node.TEXT_NODE&&0===l.endOffset&&d.previousSibling&&d.previousSibling.nodeType===Node.ELEMENT_NODE&&(d=d.previousSibling);d.nodeType!==Node.ELEMENT_NODE&&d.parentNode;)d=d.parentNode;for(var h=d;h&&"HTML"!==h.tagName;){if(h===e.el)return d;h=t(h).parent()[0]}}}catch(e){}return e.el},save:l,restore:d,isCollapsed:f,isFull:function(){if(f())return!1;e.selection.save();var t,n=e.el.querySelectorAll("td, th, img, br");for(t=0;t<n.length;t++)(n[t].nextSibling||"IMG"===n[t].tagName)&&(n[t].innerHTML='<span class="fr-mk" style="display: none;">&nbsp;</span>'.concat(n[t].innerHTML));var r=!1,o=a(e.el);for(o.atStart&&o.atEnd&&(r=!0),n=e.el.querySelectorAll(".fr-mk"),t=0;t<n.length;t++)n[t].parentNode.removeChild(n[t]);return e.selection.restore(),r},inEditor:u,remove:function(){if(f())return!0;var n;function o(e){for(var n=e.previousSibling;n&&n.nodeType===Node.TEXT_NODE&&0===n.textContent.length;){var r=n;n=n.previousSibling,t(r).remove()}return n}function c(e){for(var n=e.nextSibling;n&&n.nodeType===Node.TEXT_NODE&&0===n.textContent.length;){var r=n;n=n.nextSibling,t(r).remove()}return n}l();var h=e.$el.find('.fr-marker[data-type="true"]');for(n=0;n<h.length;n++)for(var a=h[n];!(o(a)||e.node.isBlock(a.parentNode)||e.$el.is(a.parentNode)||e.node.hasClass(a.parentNode,"fr-inner"));)t(a.parentNode).before(a);var _=e.$el.find('.fr-marker[data-type="false"]');for(n=0;n<_.length;n++){for(var i=_[n];!(c(i)||e.node.isBlock(i.parentNode)||e.$el.is(i.parentNode)||e.node.hasClass(i.parentNode,"fr-inner"));)t(i.parentNode).after(i);i.parentNode&&e.node.isBlock(i.parentNode)&&e.node.isEmpty(i.parentNode)&&!e.$el.is(i.parentNode)&&!e.node.hasClass(i.parentNode,"fr-inner")&&e.opts.keepFormatOnDelete&&t(i.parentNode).after(i)}if(function(){for(var n=e.$el.find(".fr-marker"),r=0;r<n.length;r++)if(t(n[r]).parentsUntil('.fr-element, [contenteditable="true"]','[contenteditable="false"]').length)return!1;return!0}()){!function n(r,o){var c=e.node.contents(r.get(0));0<=["TD","TH"].indexOf(r.get(0).tagName)&&1===r.find(".fr-marker").length&&(e.node.hasClass(c[0],"fr-marker")||"BR"==c[0].tagName&&e.node.hasClass(c[0].nextElementSibling,"fr-marker"))&&r.attr("data-del-cell",!0);for(var l=0;l<c.length;l++){var a=c[l];e.node.hasClass(a,"fr-marker")?o=(o+1)%2:o?0<t(a).find(".fr-marker").length?o=n(t(a),o):["TD","TH"].indexOf(a.tagName)<0&&!e.node.hasClass(a,"fr-inner")?!e.opts.keepFormatOnDelete||0<e.$el.find("[data-first]").length||e.node.isVoid(a)?t(a).remove():m(a):e.node.hasClass(a,"fr-inner")?0===t(a).find(".fr-inner").length?t(a).html("<br>"):t(a).find(".fr-inner").filter(v).html("<br>"):(t(a).empty(),t(a).attr("data-del-cell",!0)):0<t(a).find(".fr-marker").length&&(o=n(t(a),o))}return o}(e.$el,0);var s=e.$el.find('[data-first="true"]');if(s.length)e.$el.find(".fr-marker").remove(),s.append(r.INVISIBLE_SPACE+r.MARKERS).removeAttr("data-first"),s.attr("data-text")&&s.replaceWith(s.html());else for(e.$el.find("table").filter((function(){return 0<t(this).find("[data-del-cell]").length&&t(this).find("[data-del-cell]").length===t(this).find("td, th").length})).remove(),e.$el.find("[data-del-cell]").removeAttr("data-del-cell"),h=e.$el.find('.fr-marker[data-type="true"]'),n=0;n<h.length;n++){var y=h[n],E=y.nextSibling,C=e.$el.find('.fr-marker[data-type="false"][data-id="'.concat(t(y).data("id"),'"]')).get(0);if(C){if(y&&(!E||E!==C)){var w=e.node.blockParent(y),p=e.node.blockParent(C),u=!1,S=!1;if(w&&0<=["UL","OL"].indexOf(w.tagName)&&(u=!(w=null)),p&&0<=["UL","OL"].indexOf(p.tagName)&&(S=!(p=null)),t(y).after(C),w!==p)if(null!==w||u)if(null!==p||S||0!==t(w).parentsUntil(e.$el,"table").length)w&&p&&0===t(w).parentsUntil(e.$el,"table").length&&0===t(p).parentsUntil(e.$el,"table").length&&!t(w).contains(p)&&!t(p).contains(w)&&(t(w).append(t(p).html()),t(p).remove());else{for(E=w;!E.nextSibling&&E.parentNode!==e.el;)E=E.parentNode;for(E=E.nextSibling;E&&"BR"!==E.tagName;){var g=E.nextSibling;t(w).append(E),E=g}E&&"BR"===E.tagName&&t(E).remove()}else{var T=e.node.deepestParent(y);T?(t(T).after(t(p).html()),t(p).remove()):0===t(p).parentsUntil(e.$el,"table").length&&(t(y).next().after(t(p).html()),t(p).remove())}}}else C=t(y).clone().attr("data-type",!1),t(y).after(C)}}e.$el.find("li:empty").remove(),e.opts.keepFormatOnDelete||e.html.fillEmptyBlocks(),e.html.cleanEmptyTags(!0),e.opts.htmlUntouched||(e.clean.lists(),e.$el.find("li:empty").append("<br>"),e.spaces.normalize());var A=e.$el.find(".fr-marker").last().get(0),b=e.$el.find(".fr-marker").first().get(0);void 0!==A&&void 0!==b&&!A.nextSibling&&b.previousSibling&&"BR"===b.previousSibling.tagName&&e.node.isElement(A.parentNode)&&e.node.isElement(b.parentNode)&&e.$el.append("<br>"),d()},blocks:function(r){var c,l,d=[],a=n();if(u()&&a.rangeCount){var h=o();for(c=0;c<h.length;c++){var i=h[c],s=p(i.startContainer,i.startOffset),f=p(i.endContainer,i.endOffset);(l=e.node.blockParent(s))&&d.indexOf(l)<0&&d.push(l),(e.node.isBlock(s)||e.node.hasClass(s,"fr-inner"))&&d.indexOf(s)<0&&d.push(s);for(var m=[],v=s;v!==f&&v!==e.el;)m.indexOf(v)<0&&v.children&&v.children.length?(m.push(v),v=v.children[0]):v.nextSibling?v=v.nextSibling:v.parentNode&&(v=v.parentNode,m.push(v)),e.node.isBlock(v)&&m.indexOf(v)<0&&d.indexOf(v)<0&&(v!==f||0<i.endOffset)&&d.push(v);e.node.isBlock(f)&&d.indexOf(f)<0&&0<i.endOffset&&d.push(f),(l=e.node.blockParent(f))&&d.indexOf(l)<0&&d.push(l)}}for(c=d.length-1;0<c;c--)if(t(d[c-1]).contains(d[c])){if(r&&t(d[c]).find("ul, ol").length)continue;d.splice(c-1,1)}else if(t(d[c]).contains(d[c-1])){if(r&&t(d[c]).find("ul, ol").length)continue;d.splice(c,1)}return d},info:a,setAtEnd:y,setAtStart:_,setBefore:function(n,o){void 0===o&&(o=!0);for(var c=n.previousSibling;c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.previousSibling;return c?(e.node.isBlock(c)?y(c):"BR"===c.tagName?t(c).before(r.MARKERS):t(c).after(r.MARKERS),!0):!!o&&(e.node.isBlock(n)?_(n):t(n).before(r.MARKERS),!0)},setAfter:function(n,o){void 0===o&&(o=!0);for(var c=n.nextSibling;c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;return c?(e.node.isBlock(c)?_(c):t(c).before(r.MARKERS),!0):!!o&&(e.node.isBlock(n)?y(n):t(n).after(r.MARKERS),!0)},rangeElement:p}},Object.assign(r.DEFAULTS,{language:null}),r.LANGUAGE={},r.MODULES.language=function(e){var t;return{_init:function(){r.LANGUAGE&&(t=r.LANGUAGE[e.opts.language]),t&&t.direction&&(e.opts.direction=t.direction)},translate:function(e){return t&&t.translation[e]&&t.translation[e].length?t.translation[e]:e}}},Object.assign(r.DEFAULTS,{placeholderText:"Type something"}),r.MODULES.placeholder=function(e){var p=e.$;function t(){e.$placeholder||(e.$placeholder=p(e.doc.createElement("SPAN")).addClass("fr-placeholder"),e.$wp.append(e.$placeholder));var t=e.opts.iframe?e.$iframe.prev().outerHeight(!0):e.$el.prev().outerHeight(!0),n=0,r=0,o=0,a=0,c=0,i=0,s=e.node.contents(e.el),l=p(e.selection.element()).css("text-align");if(s.length&&s[0].nodeType===Node.ELEMENT_NODE){var d=p(s[0]);(0<e.$wp.prev().length||0<e.$el.prev().length)&&e.ready&&(n=e.helpers.getPX(d.css("margin-top")),a=e.helpers.getPX(d.css("padding-top")),r=e.helpers.getPX(d.css("margin-left")),o=e.helpers.getPX(d.css("margin-right")),c=e.helpers.getPX(d.css("padding-left")),i=e.helpers.getPX(d.css("padding-right"))),e.$placeholder.css("font-size",d.css("font-size")),e.$placeholder.css("line-height",d.css("line-height"))}else e.$placeholder.css("font-size",e.$el.css("font-size")),e.$placeholder.css("line-height",e.$el.css("line-height"));e.$wp.addClass("show-placeholder"),e.$placeholder.css({marginTop:Math.max(e.helpers.getPX(e.$el.css("margin-top")),n)+(t||0),paddingTop:Math.max(e.helpers.getPX(e.$el.css("padding-top")),a),paddingLeft:Math.max(e.helpers.getPX(e.$el.css("padding-left")),c),marginLeft:Math.max(e.helpers.getPX(e.$el.css("margin-left")),r),paddingRight:Math.max(e.helpers.getPX(e.$el.css("padding-right")),i),marginRight:Math.max(e.helpers.getPX(e.$el.css("margin-right")),o),textAlign:l}).text(e.language.translate(e.opts.placeholderText||e.$oel.attr("placeholder")||"")),e.$placeholder.html(e.$placeholder.text().replace(/\n/g,"<br>"))}function n(){e.$wp.removeClass("show-placeholder")}function r(){if(!e.$wp)return!1;e.core.isEmpty()?t():n()}return{_init:function(){if(!e.$wp)return!1;e.events.on("init input keydown keyup contentChanged initialized",r)},show:t,hide:n,refresh:r,isVisible:function(){return!e.$wp||e.node.hasClass(e.$wp.get(0),"show-placeholder")}}},r.UNICODE_NBSP=String.fromCharCode(160),r.VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],r.BLOCK_TAGS=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video"],Object.assign(r.DEFAULTS,{htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script",".fa",".fr-emoticon",".fr-inner","path","line","hr"],htmlDoNotWrapTags:["script","style"],htmlSimpleAmpersand:!1,htmlIgnoreCSSProperties:[],htmlExecuteScripts:!0}),r.MODULES.html=function(e){var t=e.$;function n(){return e.opts.enter===r.ENTER_P?"p":e.opts.enter===r.ENTER_DIV?"div":e.opts.enter===r.ENTER_BR?null:void 0}function s(t,n){return!(!t||t===e.el)&&(n?-1!=["PRE","SCRIPT","STYLE"].indexOf(t.tagName)||s(t.parentNode,n):-1!==["PRE","SCRIPT","STYLE"].indexOf(t.tagName))}function o(t){var n,o=[],c=[];if(t){var a=e.el.querySelectorAll(".fr-marker");for(n=0;n<a.length;n++){var l=e.node.blockParent(a[n])||a[n];if(l){var i=l.nextSibling,s=l.previousSibling;l&&c.indexOf(l)<0&&e.node.isBlock(l)&&c.push(l),s&&e.node.isBlock(s)&&c.indexOf(s)<0&&c.push(s),i&&e.node.isBlock(i)&&c.indexOf(i)<0&&c.push(i)}}}else c=e.el.querySelectorAll(p());var d=p();for(d+=",".concat(r.VOID_ELEMENTS.join(",")),d+=", .fr-inner",d+=",".concat(e.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"),n=c.length-1;0<=n;n--)if(!(c[n].textContent&&0<c[n].textContent.replace(/\u200B|\n/g,"").length||0<c[n].querySelectorAll(d).length)){for(var h=e.node.contents(c[n]),f=!1,m=0;m<h.length;m++)if(h[m].nodeType!==Node.COMMENT_NODE&&h[m].textContent&&0<h[m].textContent.replace(/\u200B|\n/g,"").length){f=!0;break}f||o.push(c[n])}return o}function p(){return r.BLOCK_TAGS.join(", ")}function c(n){var o,c,l=t.merge([],r.VOID_ELEMENTS);l=t.merge(l,e.opts.htmlAllowedEmptyTags),l=void 0===n?t.merge(l,r.BLOCK_TAGS):t.merge(l,r.NO_DELETE_TAGS),o=e.el.querySelectorAll("*:empty:not(".concat(l.join("):not("),"):not(.fr-marker):not(template)"));do{c=!1;for(var a=0;a<o.length;a++)0!==o[a].attributes.length&&void 0===o[a].getAttribute("href")||(o[a].parentNode.removeChild(o[a]),c=!0);o=e.el.querySelectorAll("*:empty:not(".concat(l.join("):not("),"):not(.fr-marker):not(template)"))}while(o.length&&c)}function i(r,o){var c=n();if(o&&(c="div"),c){for(var l=e.doc.createDocumentFragment(),a=null,d=!1,i=r.firstChild,s=!1;i;){var h=i.nextSibling;if(i.nodeType===Node.ELEMENT_NODE&&(e.node.isBlock(i)||0<=e.opts.htmlDoNotWrapTags.indexOf(i.tagName.toLowerCase())&&!e.node.hasClass(i,"fr-marker")))a=null,l.appendChild(i.cloneNode(!0));else if(i.nodeType!==Node.ELEMENT_NODE&&i.nodeType!==Node.TEXT_NODE)a=null,l.appendChild(i.cloneNode(!0));else if("BR"===i.tagName)null===a?(a=e.doc.createElement(c),s=!0,o&&(a.setAttribute("class","fr-temp-div"),a.setAttribute("data-empty",!0)),a.appendChild(i.cloneNode(!0)),l.appendChild(a)):!1===d&&(a.appendChild(e.doc.createElement("br")),o&&(a.setAttribute("class","fr-temp-div"),a.setAttribute("data-empty",!0))),a=null;else{var f=i.textContent;if(i.nodeType!==Node.TEXT_NODE||0<f.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length||f.replace(/(^ *)|( *$)/g,"").length&&f.indexOf("\n")<0){if("SPAN"===i.tagName&&t(i).hasClass("fr-marker")&&!i.previousSibling){l.appendChild(i),i=h;continue}if("SPAN"===i.tagName&&t(i).hasClass("fr-marker")&&i.previousSibling&&i.previousSibling.nodeType===Node.ELEMENT_NODE){l.appendChild(i),s=!0,i=h;continue}null===a&&(a=e.doc.createElement(c),s=!0,o&&a.setAttribute("class","fr-temp-div"),l.appendChild(a),d=!1),a.appendChild(i.cloneNode(!0)),d||e.node.hasClass(i,"fr-marker")||i.nodeType===Node.TEXT_NODE&&0===f.replace(/ /g,"").length||(d=!0)}else s=!0}i=h}s&&(r.innerHTML="",r.appendChild(l))}}function l(e,t){for(var n=e.length-1;0<=n;n--)i(e[n],t)}function d(t,n,r,o,a){if(!e.$wp)return!1;void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===o&&(o=!1),void 0===a&&(a=!1);var c=e.$wp.scrollTop();i(e.el,t),o&&l(e.el.querySelectorAll(".fr-inner"),t),n&&l(e.el.querySelectorAll("td, th"),t),r&&l(e.el.querySelectorAll("blockquote"),t),a&&l(e.el.querySelectorAll("li"),t),c!==e.$wp.scrollTop()&&e.$wp.scrollTop(c)}function h(t){if(void 0===t&&(t=e.el),t&&0<=["SCRIPT","STYLE","PRE"].indexOf(t.tagName))return!1;for(var n=e.doc.createTreeWalker(t,NodeFilter.SHOW_TEXT,e.node.filter((function(e){return null!==e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g)})),!1);n.nextNode();){var r=n.currentNode;if(!s(r.parentNode,!0)){var o=e.node.isBlock(r.parentNode)||e.node.isElement(r.parentNode),a=r.textContent.replace(/(?!^)( ){2,}(?!$)/g," ").replace(/\n/g," ").replace(/^[ ]{2,}/g," ").replace(/[ ]{2,}$/g," ");if(o){var c=r.previousSibling,i=r.nextSibling;c&&i&&" "===a?a=e.node.isBlock(c)&&e.node.isBlock(i)?"":" ":(c||(a=a.replace(/^ */,"")),i||(a=a.replace(/ *$/,"")))}r.textContent=a}}}function f(e,t,n){var r=new RegExp(t,"gi").exec(e);return r?r[n]:null}function m(e){var t=e.doctype,n="<!DOCTYPE html>";return t&&(n="<!DOCTYPE ".concat(t.name).concat(t.publicId?' PUBLIC "'.concat(t.publicId,'"'):"").concat(!t.publicId&&t.systemId?" SYSTEM":"").concat(t.systemId?' "'.concat(t.systemId,'"'):"",">")),n}function v(t){var n=t.parentNode;if(n&&(e.node.isBlock(n)||e.node.isElement(n))&&["TD","TH"].indexOf(n.tagName)<0){for(var o=t.previousSibling,c=t.nextSibling;o&&(o.nodeType===Node.TEXT_NODE&&0===o.textContent.replace(/\n|\r/g,"").length||e.node.hasClass(o,"fr-tmp"));)o=o.previousSibling;if(c)return!1;o&&n&&"BR"!==o.tagName&&!e.node.isBlock(o)&&!c&&0<n.textContent.replace(/\u200B/g,"").length&&0<o.textContent.length&&!e.node.hasClass(o,"fr-marker")&&(e.el===n&&!c&&e.opts.enter===r.ENTER_BR&&e.browser.msie||t.parentNode.removeChild(t))}else!n||e.node.isBlock(n)||e.node.isElement(n)||t.previousSibling||t.nextSibling||!e.node.isDeletable(t.parentNode)||v(t.parentNode)}function g(){e.opts.htmlUntouched||(c(),d(),h(),e.spaces.normalize(null,!0),e.html.fillEmptyBlocks(),e.clean.lists(),e.clean.tables(),e.clean.toHTML5(),e.html.cleanBRs()),e.selection.restore(),a(),e.placeholder.refresh()}function a(){e.node.isEmpty(e.el)&&(null!==n()?e.el.querySelector(p())||e.el.querySelector("".concat(e.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||(e.core.hasFocus()?(e.$el.html("<".concat(n(),">").concat(r.MARKERS,"<br/></").concat(n(),">")),e.selection.restore()):e.$el.html("<".concat(n(),"><br/></").concat(n(),">"))):e.el.querySelector("*:not(.fr-marker):not(br)")||(e.core.hasFocus()?(e.$el.html("".concat(r.MARKERS,"<br/>")),e.selection.restore()):e.$el.html("<br/>")))}function _(e,t){return f(e,"<".concat(t,"[^>]*?>([\\w\\W]*)</").concat(t,">"),1)}function y(n,r){var o=t("<div ".concat(f(n,"<".concat(r,"([^>]*?)>"),1)||"",">"));return e.node.rawAttributes(o.get(0))}function b(e){return(f(e,"<!DOCTYPE([^>]*?)>",0)||"<!DOCTYPE html>").replace(/\n/g," ").replace(/ {2,}/g," ")}function E(t,n){e.opts.htmlExecuteScripts?t.html(n):t.get(0).innerHTML=n}function C(e){var t;return(t=/:not\(([^)]*)\)/g).test(e)&&(e=e.replace(t,"     $1 ")),100*(e.match(/(#[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(\[[^]]+\])/g)||[]).length+10*(e.match(/(\.[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(:[\w-]+\([^)]*\))/gi)||[]).length+10*(e.match(/(:[^\s+>~.[:]+)/g)||[]).length+(e.match(/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi)||[]).length+((e=(e=e.replace(/[*\s+>~]/g," ")).replace(/[#.]/g," ")).match(/([^\s+>~.[:]+)/g)||[]).length}function w(t){if(e.events.trigger("html.processGet",[t]),t&&t.getAttribute&&""===t.getAttribute("class")&&t.removeAttribute("class"),t&&t.getAttribute&&""===t.getAttribute("style")&&t.removeAttribute("style"),t&&t.nodeType===Node.ELEMENT_NODE){var n,r=t.querySelectorAll('[class=""],[style=""]');for(n=0;n<r.length;n++){var o=r[n];""===o.getAttribute("class")&&o.removeAttribute("class"),""===o.getAttribute("style")&&o.removeAttribute("style")}if("BR"===t.tagName)v(t);else{var a=t.querySelectorAll("br");for(n=0;n<a.length;n++)v(a[n])}}}function S(e,t){return e[3]-t[3]}function T(){for(var t=e.el.querySelectorAll("input, textarea"),n=0;n<t.length;n++)"checkbox"!==t[n].type&&"radio"!==t[n].type||(t[n].checked?t[n].setAttribute("checked",t[n].checked):e.$(t[n]).removeAttr("checked")),t[n].getAttribute("value")&&t[n].setAttribute("value",t[n].value)}function A(t){var n=e.doc.createElement("div");return n.innerHTML=t,null!==n.querySelector(p())}function u(n){var r=null;if(void 0===n&&(r=e.selection.element()),e.opts.keepFormatOnDelete)return!1;var o,c,a=r?(r.textContent.match(/\u200B/g)||[]).length-r.querySelectorAll(".fr-marker").length:0;if((e.el.textContent.match(/\u200B/g)||[]).length-e.el.querySelectorAll(".fr-marker").length===a)return!1;do{c=!1,o=e.el.querySelectorAll("*:not(.fr-marker)");for(var l=0;l<o.length;l++){var i=o[l];if(r!==i){var s=i.textContent;0===i.children.length&&1===s.length&&8203===s.charCodeAt(0)&&"TD"!==i.tagName&&(t(i).remove(),c=!0)}}}while(c)}function R(){u(),e.placeholder&&setTimeout(e.placeholder.refresh,0)}return{defaultTag:n,isPreformatted:s,emptyBlocks:o,emptyBlockTagsQuery:function(){return"".concat(r.BLOCK_TAGS.join(":empty, "),":empty")},blockTagsQuery:p,fillEmptyBlocks:function(t){var n=o(t);e.node.isEmpty(e.el)&&e.opts.enter===r.ENTER_BR&&n.push(e.el);for(var c=0;c<n.length;c++){var l=n[c];"false"===l.getAttribute("contenteditable")||l.querySelector("".concat(e.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||e.node.isVoid(l)||"TABLE"!==l.tagName&&"TBODY"!==l.tagName&&"TR"!==l.tagName&&"UL"!==l.tagName&&"OL"!==l.tagName&&l.appendChild(e.doc.createElement("br"))}if(e.browser.msie&&e.opts.enter===r.ENTER_BR){var a=e.node.contents(e.el);a.length&&a[a.length-1].nodeType===Node.TEXT_NODE&&e.$el.append("<br>")}},cleanEmptyTags:c,cleanWhiteTags:u,cleanBlankSpaces:h,blocks:function(){return e.$el.get(0).querySelectorAll(p())},getDoctype:m,set:function(n){var r=e.clean.html((n||"").trim(),[],[],e.opts.fullPage),o=new RegExp("%3A//","g"),c=r.replace(o,"://");if(e.opts.fullPage){var a=_(c,"body")||(0<=c.indexOf("<body")?"":c),l=y(c,"body"),i=_(c,"head")||"<title></title>",s=y(c,"head"),d=t("<div>");d.append(i).contents().each((function(){(this.nodeType===Node.COMMENT_NODE||0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName))&&this.parentNode.removeChild(this)}));var h=d.html().trim();i=t("<div>").append(i).contents().map((function(){return this.nodeType===Node.COMMENT_NODE?"\x3c!--".concat(this.nodeValue,"--\x3e"):0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName)?this.outerHTML:""})).toArray().join("");var f=b(c),m=y(c,"html");E(e.$el,"".concat(h,"\n").concat(a)),e.node.clearAttributes(e.el),e.$el.attr(l),e.$el.addClass("fr-view"),e.$el.attr("spellcheck",e.opts.spellcheck),e.$el.attr("dir",e.opts.direction),E(e.$head,i),e.node.clearAttributes(e.$head.get(0)),e.$head.attr(s),e.node.clearAttributes(e.$html.get(0)),e.$html.attr(m),e.iframe_document.doctype.parentNode.replaceChild(function(e,t){var n=e.match(/<!DOCTYPE ?([^ ]*) ?([^ ]*) ?"?([^"]*)"? ?"?([^"]*)"?>/i);return n?t.implementation.createDocumentType(n[1],n[3],n[4]):t.implementation.createDocumentType("html")}(f,e.iframe_document),e.iframe_document.doctype)}else E(e.$el,c);var p=e.edit.isDisabled();e.edit.on(),e.core.injectStyle(e.opts.iframeDefaultStyle+e.opts.iframeStyle),g(),e.opts.useClasses||(e.$el.find("[fr-original-class]").each((function(){this.setAttribute("class",this.getAttribute("fr-original-class")),this.removeAttribute("fr-original-class")})),e.$el.find("[fr-original-style]").each((function(){this.setAttribute("style",this.getAttribute("fr-original-style")),this.removeAttribute("fr-original-style")}))),p&&e.edit.off(),e.events.trigger("html.set"),e.events.trigger("charCounter.update")},syncInputs:T,get:function(t,n){if(!e.$wp)return e.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;var r="";e.events.trigger("html.beforeGet");var o,a,c=[],i={},s=[];if(T(),!e.opts.useClasses&&!n){var l=new RegExp("^".concat(e.opts.htmlIgnoreCSSProperties.join("$|^"),"$"),"gi");for(o=0;o<e.doc.styleSheets.length;o++){var d=void 0,h=0;try{d=e.doc.styleSheets[o].cssRules,e.doc.styleSheets[o].ownerNode&&"STYLE"===e.doc.styleSheets[o].ownerNode.nodeType&&(h=1)}catch(e){}if(d)for(var f=0,p=d.length;f<p;f++)if(d[f].selectorText&&0<d[f].style.cssText.length){var u=d[f].selectorText.replace(/body |\.fr-view /g,"").replace(/::/g,":"),v=void 0;try{v=e.el.querySelectorAll(u)}catch(e){v=[]}for(a=0;a<v.length;a++){!v[a].getAttribute("fr-original-style")&&v[a].getAttribute("style")?(v[a].setAttribute("fr-original-style",v[a].getAttribute("style")),c.push(v[a])):v[a].getAttribute("fr-original-style")||(v[a].setAttribute("fr-original-style",""),c.push(v[a])),i[v[a]]||(i[v[a]]={});for(var g=1e3*h+C(d[f].selectorText),_=d[f].style.cssText.split(";"),y=0;y<_.length;y++){var b=_[y].trim().split(":")[0];if(b&&!b.match(l)&&(i[v[a]][b]||(i[v[a]][b]=0)<=(v[a].getAttribute("fr-original-style")||"").indexOf("".concat(b,":"))&&(i[v[a]][b]=1e4),g>=i[v[a]][b]&&(i[v[a]][b]=g,_[y].trim().length))){var E=_[y].trim().split(":");E.splice(0,1),s.push([v[a],b.trim(),E.join(":").trim(),g])}}}}}for(s.sort(S),o=0;o<s.length;o++){var A=s[o];A[0].style[A[1]]=A[2]}for(o=0;o<c.length;o++)if(c[o].getAttribute("class")&&(c[o].setAttribute("fr-original-class",c[o].getAttribute("class")),c[o].removeAttribute("class")),0<(c[o].getAttribute("fr-original-style")||"").trim().length){var R=c[o].getAttribute("fr-original-style").split(";");for(a=0;a<R.length;a++)if(0<R[a].indexOf(":")){var O=R[a].split(":"),I=O[0];O.splice(0,1),c[o].style[I.trim()]=O.join(":").trim()}}}if(e.node.isEmpty(e.el))e.opts.fullPage&&(r=m(e.iframe_document),r+="<html".concat(e.node.attributes(e.$html.get(0)),">").concat(e.$html.find("head").get(0).outerHTML,"<body></body></html>"));else if(void 0===t&&(t=!1),e.opts.fullPage){r=m(e.iframe_document),e.$el.removeClass("fr-view");var k=e.opts.heightMin,N=e.opts.height,L=e.opts.heightMax;e.opts.heightMin=null,e.opts.height=null,e.opts.heightMax=null,e.size.refresh(),r+="<html".concat(e.node.attributes(e.$html.get(0)),">").concat(e.$html.html(),"</html>"),e.opts.heightMin=k,e.opts.height=N,e.opts.heightMax=L,e.size.refresh(),e.$el.addClass("fr-view")}else r=e.$el.html();if(!e.opts.useClasses&&!n)for(o=0;o<c.length;o++)c[o].getAttribute("fr-original-class")&&(c[o].setAttribute("class",c[o].getAttribute("fr-original-class")),c[o].removeAttribute("fr-original-class")),null!==c[o].getAttribute("fr-original-style")&&void 0!==c[o].getAttribute("fr-original-style")?(0!==c[o].getAttribute("fr-original-style").length?c[o].setAttribute("style",c[o].getAttribute("fr-original-style")):c[o].removeAttribute("style"),c[o].removeAttribute("fr-original-style")):c[o].removeAttribute("style");e.opts.fullPage&&(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/<style data-fr-style="true">(?:[\w\W]*?)<\/style>/g,"")).replace(/<link([^>]*)data-fr-style="true"([^>]*)>/g,"")).replace(/<style(?:[\w\W]*?)class="firebugResetStyles"(?:[\w\W]*?)>(?:[\w\W]*?)<\/style>/g,"")).replace(/<body((?:[\w\W]*?)) spellcheck="true"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$2>$3</body>")).replace(/<body((?:[\w\W]*?)) contenteditable="(true|false)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?)) dir="([\w]*)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?))class="([\w\W]*?)(fr-rtl|fr-ltr)([\w\W]*?)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,'<body$1class="$2$4"$5>$6</body>')).replace(/<body((?:[\w\W]*?)) class=""((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$2>$3</body>")),e.opts.htmlSimpleAmpersand&&(r=r.replace(/&amp;/gi,"&")),e.events.trigger("html.afterGet"),t||(r=r.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,"")),r=e.clean.invisibleSpaces(r),r=e.clean.exec(r,w);var M=e.events.chainTrigger("html.get",r);return"string"==typeof M&&(r=M),(r=r.replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g,(function(e){return e.replace(/<br>/g,"\n")}))).replace(/<meta((?:[\w\W]*?)) data-fr-http-equiv="/g,'<meta$1 http-equiv="')},getSelected:function(){function n(n,r){for(;r&&(r.nodeType===Node.TEXT_NODE||!e.node.isBlock(r))&&!e.node.isElement(r)&&!e.node.hasClass(r,"fr-inner")&&!(r.nextSibling&&("BR"===r.nextSibling.nodeName||e.node.isBlock(r.nextSibling))||r.previousSibling&&("BR"===r.previousSibling.nodeName||e.node.isBlock(r.previousSibling))||e.node.hasClass(r.parentNode,"fr-view"));)r&&r.nodeType!==Node.TEXT_NODE&&t(n).wrapInner(e.node.openTagString(r)+e.node.closeTagString(r)),r=r.parentNode;r&&n.innerHTML===r.innerHTML?n.innerHTML=r.outerHTML:r.innerText&&-1!=r.innerText.indexOf(n.innerHTML)?n.innerHTML=e.node.openTagString(r)+r.innerHTML+e.node.closeTagString(r):(r.nextSibling&&("BR"===r.nextSibling.nodeName||e.node.isBlock(r.nextSibling))||r.previousSibling&&("BR"===r.previousSibling.nodeName||e.node.isBlock(r.previousSibling))&&r.wholeText)&&(n.innerHTML=r.wholeText)}var o,c,l="";if(void 0!==e.win.getSelection){e.browser.mozilla&&(e.selection.save(),1<e.$el.find('.fr-marker[data-type="false"]').length&&(e.$el.find('.fr-marker[data-type="false"][data-id="0"]').remove(),e.$el.find('.fr-marker[data-type="false"]:last').attr("data-id","0"),e.$el.find(".fr-marker").not('[data-id="0"]').remove()),e.selection.restore());for(var a=e.selection.ranges(),d=0;d<a.length;d++){var i=document.createElement("div");i.appendChild(a[d].cloneContents()),n(i,(c=o=void 0,c=null,e.win.getSelection?(o=e.win.getSelection())&&o.rangeCount&&(c=o.getRangeAt(0).commonAncestorContainer).nodeType!==Node.ELEMENT_NODE&&e.opts.enter!==r.ENTER_BR&&(c=c.parentNode):(o=e.doc.selection)&&"Control"!==o.type&&(c=o.createRange().parentElement()),null!==c&&(0<=t(c).parents().toArray().indexOf(e.el)||c===e.el)?c:null)),0<t(i).find(".fr-element").length&&(i=e.el),l+=i.innerHTML}}else void 0!==e.doc.selection&&"Text"===e.doc.selection.type&&(l=e.doc.selection.createRange().htmlText);return l},insert:function(n,r,o){var c;if(e.selection.isCollapsed()||e.selection.remove(),c=r?n:e.clean.html(n),0===n.indexOf('<i class="fa ')&&(c="<span>&nbsp;".concat(c,"</span>")),n.indexOf('class="fr-marker"')<0&&(c=function(t){var n=e.doc.createElement("div");return n.innerHTML=t,e.selection.setAtEnd(n,!0),n.innerHTML}(c)),e.node.isEmpty(e.el)&&!e.opts.keepFormatOnDelete&&A(c))e.opts.trackChangesEnabled?e.track_changes.pasteInEmptyEdior(c):e.el.innerHTML=c;else{(function(){var t=e.selection.ranges(0).commonAncestorContainer;return t!==e.el&&!e.$el.contains(t)})()&&e.selection.restore();var a=e.markers.insert();if(a)if(e.opts.trackChangesEnabled)e.track_changes.pasteInEdior(c);else{e.node.isLastSibling(a)&&t(a).parent().hasClass("fr-deletable")&&t(a).insertAfter(t(a).parent());var l=e.node.blockParent(a);if((A(c)||o)&&(e.node.deepestParent(a)||l&&"LI"===l.tagName)){if(l&&"LI"===l.tagName&&(c=function(n){if(!e.html.defaultTag())return n;var r=e.doc.createElement("div");r.innerHTML=n;for(var o=r.querySelectorAll(":scope > ".concat(e.html.defaultTag())),c=o.length-1;0<=c;c--){var a=o[c];e.node.isBlock(a.previousSibling)||(a.previousSibling&&!e.node.isEmpty(a)&&t("<br>").insertAfter(a.previousSibling),a.outerHTML=a.innerHTML)}return r.innerHTML}(c)),!(a=e.markers.split()))return!1;a.outerHTML=c}else a.outerHTML=c}else e.el.innerHTML+=c}g(),e.keys.positionCaret(),e.events.trigger("html.inserted")},wrap:d,unwrap:function(){e.$el.find("div.fr-temp-div").each((function(){this.previousSibling&&this.previousSibling.nodeType===Node.TEXT_NODE&&t(this).before("<br>"),t(this).attr("data-empty")||!this.nextSibling||e.node.isBlock(this.nextSibling)&&!t(this.nextSibling).hasClass("fr-temp-div")?t(this).replaceWith(t(this).html()):t(this).replaceWith("".concat(t(this).html(),"<br>"))})),e.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter((function(){return""===t(this).attr("class")})).removeAttr("class")},escapeEntities:function(e){return e.replace(/</gi,"&lt;").replace(/>/gi,"&gt;").replace(/"/gi,"&quot;").replace(/'/gi,"&#39;")},checkIfEmpty:a,extractNode:_,extractNodeAttrs:y,extractDoctype:b,cleanBRs:function(){for(var t=e.el.getElementsByTagName("br"),n=0;n<t.length;n++)v(t[n])},_init:function(){e.events.$on(e.$el,"mousemove","span.fr-word-select",(function(e){var t=window.getSelection();t=window.getSelection();var n=document.createRange();n.selectNodeContents(e.target),t.removeAllRanges(),t.addRange(n)})),e.$wp&&(e.events.on("mouseup",R),e.events.on("keydown",R),e.events.on("contentChanged",a))},_setHtml:E}},r.ENTER_P=0,r.ENTER_DIV=1,r.ENTER_BR=2,r.KEYCODE={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,FF_HYPHEN:173,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,HYPHEN:189,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,IME:229},Object.assign(r.DEFAULTS,{enter:r.ENTER_P,multiLine:!0,tabSpaces:0}),r.MODULES.keys=function(e){var t,n,o,a=e.$,p=!1;function u(t){if(e.selection.isCollapsed())if(["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&e.cursor.backspace(),e.helpers.isIOS()){var n=e.selection.ranges(0);n.deleteContents(),n.insertNode(document.createTextNode("​")),e.selection.get().modify("move","forward","character")}else["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&t.preventDefault(),t.stopPropagation();else t.preventDefault(),t.stopPropagation(),e.selection.remove();e.placeholder.refresh()}function c(t){["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&t.preventDefault(),t.stopPropagation(),""!==e.selection.text()||e.selection.element().hasAttribute("contenteditable")&&"false"===e.selection.element().getAttribute("contenteditable")||!e.selection.isCollapsed()&&"IMG"==e.selection.element().tagName?e.selection.remove():e.cursor.del(),e.placeholder.refresh()}function l(){if(e.browser.mozilla&&e.selection.isCollapsed()&&!p){var t=e.selection.ranges(0),n=t.startContainer,r=t.startOffset;n&&n.nodeType===Node.TEXT_NODE&&r<=n.textContent.length&&0<r&&32===n.textContent.charCodeAt(r-1)&&(e.selection.save(),e.spaces.normalize(),e.selection.restore())}}function d(){e.selection.isFull()&&setTimeout((function(){var t=e.html.defaultTag();t?e.$el.html("<".concat(t,">").concat(r.MARKERS,"<br/></").concat(t,">")):e.$el.html("".concat(r.MARKERS,"<br/>")),e.selection.restore(),e.placeholder.refresh(),e.button.bulkRefresh(),e.undo.saveStep()}),0)}function h(){p=!1}function i(){p=!1}function g(){var t=e.html.defaultTag();t?e.$el.html("<".concat(t,">").concat(r.MARKERS,"<br/></").concat(t,">")):e.$el.html("".concat(r.MARKERS,"<br/>")),e.selection.restore()}function f(e,t){if(e.parentElement&&(-1<e.innerHTML.indexOf("<span")||-1<e.parentElement.innerHTML.indexOf("<span")||-1<e.parentElement.parentElement.innerHTML.indexOf("<span"))&&(e.classList.contains("fr-img-space-wrap")||e.parentElement.classList.contains("fr-img-space-wrap")||e.parentElement.parentElement.classList.contains("fr-img-space-wrap"))){if(a(e.parentElement).is("p")){var n=e.parentElement.innerHTML;return(n=n.replace(/<br>/g,"")).length<1?e.parentElement.insertAdjacentHTML("afterbegin","&nbsp;"):"&nbsp;"!=n&&" "!=n&&"Backspace"==t.key?u(t):"&nbsp;"!=n&&" "!=n&&"Delete"==t.key&&c(t),!0}if(a(e).is("p")){var r=e.innerHTML.replace(/<br>/g,"");return r.length<1?e.insertAdjacentHTML("afterbegin","&nbsp;"):"&nbsp;"!=r&&" "!=r&&"Backspace"==t.key?u(t):"&nbsp;"!=r&&" "!=r&&"Delete"==t.key&&c(t),!0}}return!1}function s(n){var o=e.selection.element();if(o&&0<=["INPUT","TEXTAREA"].indexOf(o.tagName))return!0;if(n&&b(n.which))return!0;e.events.disableBlur();var l=n.which;if(16===l)return!0;if((t=l)===r.KEYCODE.IME)return p=!0;if(p=!1,_(n))return!0;var d=y(l)&&!_(n)&&!n.altKey,a=l===r.KEYCODE.BACKSPACE||l===r.KEYCODE.DELETE;if((e.selection.isFull()&&!e.opts.keepFormatOnDelete&&!e.placeholder.isVisible()||a&&e.placeholder.isVisible()&&e.opts.keepFormatOnDelete)&&(d||a)&&(g(),!y(l)))return n.preventDefault(),!0;if(l===r.KEYCODE.ENTER)!e.helpers.isIOS()&&n.shiftKey||o.classList.contains("fr-inner")||o.parentElement.classList.contains("fr-inner")?function(t){t.preventDefault(),t.stopPropagation(),e.opts.multiLine&&(e.selection.isCollapsed()||e.selection.remove(),e.cursor.enter(!0))}(n):function(t){e.opts.multiLine?(e.helpers.isIOS()||(t.preventDefault(),t.stopPropagation()),e.selection.isCollapsed()||e.selection.remove(),e.cursor.enter()):(t.preventDefault(),t.stopPropagation())}(n);else if(l===r.KEYCODE.BACKSPACE&&(n.metaKey||n.ctrlKey))setTimeout((function(){e.events.disableBlur(),e.events.focus()}),0);else if(l!==r.KEYCODE.BACKSPACE||_(n)||n.altKey)if(l!==r.KEYCODE.DELETE||_(n)||n.altKey||n.shiftKey)l===r.KEYCODE.SPACE?function(t){var n=e.selection.element();if(!e.helpers.isMobile()&&n&&"A"===n.tagName){t.preventDefault(),t.stopPropagation(),e.selection.isCollapsed()||e.selection.remove();var o=e.markers.insert();if(o){var c=o.previousSibling;!o.nextSibling&&o.parentNode&&"A"===o.parentNode.tagName?(o.parentNode.insertAdjacentHTML("afterend","&nbsp;".concat(r.MARKERS)),o.parentNode.removeChild(o)):(c&&c.nodeType===Node.TEXT_NODE&&1===c.textContent.length&&160===c.textContent.charCodeAt(0)?c.textContent+=" ":o.insertAdjacentHTML("beforebegin","&nbsp;"),o.outerHTML=r.MARKERS),e.selection.restore()}}}(n):l===r.KEYCODE.TAB?function(t){if(0<e.opts.tabSpaces)if(e.selection.isCollapsed()){e.undo.saveStep(),t.preventDefault(),t.stopPropagation();for(var n="",r=0;r<e.opts.tabSpaces;r++)n+="&nbsp;";e.html.insert(n),e.placeholder.refresh(),e.undo.saveStep()}else t.preventDefault(),t.stopPropagation(),t.shiftKey?e.commands.outdent():e.commands.indent()}(n):_(n)||!y(n.which)||e.selection.isCollapsed()||n.ctrlKey||n.altKey||e.selection.remove();else{if(f(o,n))return n.preventDefault(),void n.stopPropagation();e.placeholder.isVisible()?(e.opts.keepFormatOnDelete||g(),n.preventDefault(),n.stopPropagation()):c(n)}else{if(f(o,n))return n.preventDefault(),void n.stopPropagation();e.placeholder.isVisible()?(e.opts.keepFormatOnDelete||g(),n.preventDefault(),n.stopPropagation()):u(n)}e.events.enableBlur()}function m(){if(!e.$wp)return!0;var t;if(e.opts.height||e.opts.heightMax){t=e.position.getBoundingRect().top,(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top);var n=e.selection.blocks(),r=null;n&&0<n.length&&n[0].offsetTop&&(r=n[0].getBoundingClientRect().top),!e.opts.iframe&&t>e.$wp.offset().top-e.helpers.scrollTop()+e.$wp.height()-20?e.$wp.scrollTop(t+e.$wp.scrollTop()-(e.$wp.height()+e.$wp.offset().top)+e.helpers.scrollTop()+20):e.opts.iframe&&r>e.$wp.height()&&r&&e.$wp.scrollTop(r-e.$wp.height()+80)}else t=e.position.getBoundingRect().top,e.opts.toolbarBottom&&(t+=e.opts.toolbarStickyOffset),(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top,t-=e.helpers.scrollTop()),(t+=e.opts.toolbarStickyOffset)>e.o_win.innerHeight-20&&a(e.o_win).scrollTop(t+e.helpers.scrollTop()-e.o_win.innerHeight+20),t=e.position.getBoundingRect().top,e.opts.toolbarBottom||(t-=e.opts.toolbarStickyOffset),(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top,t-=e.helpers.scrollTop()),t<100&&a(e.o_win).scrollTop(t+e.helpers.scrollTop()-100)}function v(n){var o=e.selection.element();if(o&&0<=["INPUT","TEXTAREA"].indexOf(o.tagName))return!0;if(n&&0===n.which&&t&&(n.which=t),e.helpers.isAndroid()&&e.browser.mozilla)return!0;if(p)return!1;if(n&&e.helpers.isIOS()&&n.which===r.KEYCODE.ENTER&&e.doc.execCommand("undo"),!e.selection.isCollapsed())return!0;if(n&&(n.which===r.KEYCODE.META||n.which===r.KEYCODE.CTRL))return!0;if(n&&b(n.which))return!0;if(n&&!e.helpers.isIOS()&&(n.which===r.KEYCODE.ENTER||n.which===r.KEYCODE.BACKSPACE||37<=n.which&&n.which<=40&&!e.browser.msie))try{m()}catch(e){}var c=e.selection.element();(function(e){if(!e)return!1;var t=e.innerHTML;return!!((t=t.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,""))&&/\u200B/.test(t)&&0<t.replace(/\u200B/gi,"").length)})(c)&&!e.node.hasClass(c,"fr-marker")&&"IFRAME"!==c.tagName&&function(t){return!e.helpers.isIOS()||0===((t.textContent||"").match(/[\u3041-\u3096\u30A0-\u30FF\u4E00-\u9FFF\u3130-\u318F\uAC00-\uD7AF]/gi)||[]).length}(c)&&(e.selection.save(),function(t){var n=t;-1<["STRONG","U","EM"].indexOf(t.nodeName)&&t.parentNode&&(n=t.parentNode);for(var r=e.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,e.node.filter((function(e){return/\u200B/gi.test(e.textContent)})),!1);r.nextNode();){var o=r.currentNode;o.textContent=o.textContent.replace(/\u200B/gi,"")}}(c),e.selection.restore())}function _(e){if(-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}function b(e){if(e>=r.KEYCODE.ARROW_LEFT&&e<=r.KEYCODE.ARROW_DOWN)return!0}function y(t){if(t>=r.KEYCODE.ZERO&&t<=r.KEYCODE.NINE)return!0;if(t>=r.KEYCODE.NUM_ZERO&&t<=r.KEYCODE.NUM_MULTIPLY)return!0;if(t>=r.KEYCODE.A&&t<=r.KEYCODE.Z)return!0;if(e.browser.webkit&&0===t)return!0;switch(t){case r.KEYCODE.SPACE:case r.KEYCODE.QUESTION_MARK:case r.KEYCODE.NUM_PLUS:case r.KEYCODE.NUM_MINUS:case r.KEYCODE.NUM_PERIOD:case r.KEYCODE.NUM_DIVISION:case r.KEYCODE.SEMICOLON:case r.KEYCODE.FF_SEMICOLON:case r.KEYCODE.DASH:case r.KEYCODE.EQUALS:case r.KEYCODE.FF_EQUALS:case r.KEYCODE.COMMA:case r.KEYCODE.PERIOD:case r.KEYCODE.SLASH:case r.KEYCODE.APOSTROPHE:case r.KEYCODE.SINGLE_QUOTE:case r.KEYCODE.OPEN_SQUARE_BRACKET:case r.KEYCODE.BACKSLASH:case r.KEYCODE.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}function E(t){var c=t.which;if(_(t)||37<=c&&c<=40||!y(c)&&c!==r.KEYCODE.DELETE&&c!==r.KEYCODE.BACKSPACE&&c!==r.KEYCODE.ENTER&&c!==r.KEYCODE.IME)return!0;n||(o=e.snapshot.get(),e.undo.canDo()||e.undo.saveStep()),clearTimeout(n),n=setTimeout((function(){n=null,e.undo.saveStep()}),Math.max(250,e.opts.typingTimer))}function C(t){var r=t.which;if(_(t)||37<=r&&r<=40)return!0;o&&n?(e.undo.saveStep(o),o=null):void 0!==r&&0!==r||o||n||e.undo.saveStep()}function w(t){if(t&&"BR"===t.tagName)return!1;try{return 0===(t.textContent||"").length&&t.querySelector&&!t.querySelector(":scope > br")||t.childNodes&&1===t.childNodes.length&&t.childNodes[0].getAttribute&&("false"===t.childNodes[0].getAttribute("contenteditable")||e.node.hasClass(t.childNodes[0],"fr-img-caption"))}catch(e){return!1}}function S(t){var n=e.el.childNodes,o=e.html.defaultTag(),c=e.node.blockParent(e.selection.blocks()[0]);return c&&"TR"==c.tagName&&null==c.getAttribute("contenteditable")&&(c=c.closest("table")),!e.node.isEditable(t.target)||c&&"false"===c.getAttribute("contenteditable")?e.toolbar.disable():e.toolbar.enable(),!(!t.target||t.target===e.el)||0===n.length||void(n[0].offsetHeight+n[0].offsetTop<=t.offsetY?w(n[n.length-1])&&(o?e.$el.append("<".concat(o,">").concat(r.MARKERS,"<br></").concat(o,">")):e.$el.append("".concat(r.MARKERS,"<br>")),e.selection.restore(),m()):t.offsetY<=10&&w(n[0])&&(o?e.$el.prepend("<".concat(o,">").concat(r.MARKERS,"<br></").concat(o,">")):e.$el.prepend("".concat(r.MARKERS,"<br>")),e.selection.restore(),m()))}function T(){n&&clearTimeout(n)}return{_init:function(){e.events.on("keydown",E),e.events.on("input",l),e.events.on("mousedown",i),e.events.on("keyup input",C),e.events.on("keypress",h),e.events.on("keydown",s),e.events.on("keyup",v),e.events.on("destroy",T),e.events.on("html.inserted",v),e.events.on("cut",d),e.opts.multiLine&&e.events.on("click",S),e.events.on("initialized",(function(){e.el.addEventListener("compositionstart",(function(){if(e.selection.isCollapsed()){var t=e.selection.ranges(0),n=t.startContainer,o=t.startOffset;if(n&&n.nodeType===Node.TEXT_NODE&&o<=n.textContent.length&&0<o&&8203===n.textContent.charCodeAt(o-1)){e.selection.save();var c=e.$el.find(".fr-marker");a(c.get(0).previousSibling).before(r.HAIR_SPACE),c.get(0).previousSibling.textContent=c.get(0).previousSibling.textContent.replace(/\u200B/gi,""),e.selection.restore()}}})),e.el.addEventListener("compositionend",(function(){if(e.selection.isCollapsed()){var t=e.selection.ranges(0),n=t.startContainer,r=t.startOffset;if(n&&n.nodeType===Node.TEXT_NODE&&r<=n.textContent.length&&0<r&&8202===n.textContent.charCodeAt(0)){e.selection.save();var o=e.$el.find(".fr-marker");o.get(0).previousSibling.textContent=o.get(0).previousSibling.textContent.replace(/\u200A/gi,""),e.selection.restore()}}}))}))},ctrlKey:_,isCharacter:y,isArrow:b,forceUndo:function(){n&&(clearTimeout(n),e.undo.saveStep(),o=null)},isIME:function(){return p},isBrowserAction:function(e){var t=e.which;return _(e)||t===r.KEYCODE.F5},positionCaret:m}},Object.assign(r.DEFAULTS,{pastePlain:!1,pasteDeniedTags:["colgroup","col","meta"],pasteDeniedAttrs:["class","id"],pasteAllowedStyleProps:[".*"],pasteAllowLocalImages:!1}),r.MODULES.paste=function(e){var i,s,t,n,o,c,l=e.$;function d(t,n){try{e.win.localStorage.setItem("fr-copied-html",t),e.win.localStorage.setItem("fr-copied-text",n)}catch(e){}}function h(t){var n=e.html.getSelected();d(n,l(e.doc.createElement("div")).html(n).text()),"cut"===t.type&&(e.undo.saveStep(),setTimeout((function(){e.selection.save(),e.html.wrap(),e.selection.restore(),e.events.focus(),e.undo.saveStep()}),0))}var f=!1;function m(r){if("INPUT"===r.target.nodeName&&"text"===r.target.type)return!0;if(e.edit.isDisabled())return!1;if(v(r.target))return!1;if(f)return!1;if(r.originalEvent&&(r=r.originalEvent),r&&r.clipboardData&&r.clipboardData.getData&&((r.clipboardData||window.clipboardData).getData("text/html")||"").match('content="Microsoft OneNote'))return!1;if(!1===e.events.trigger("paste.before",[r]))return r.preventDefault(),!1;if(r&&r.clipboardData&&r.clipboardData.getData){var c="";if(n=r.clipboardData.types,e.helpers.isArray(n))for(var d=0;d<n.length;d++)c+="".concat(n[d],";");else c=n;if(i="",/text\/rtf/.test(c)&&(s=r.clipboardData.getData("text/rtf")),/text\/html/.test(c)&&!e.browser.safari?(i=r.clipboardData.getData("text/html"),e.browser.mozilla&&("<p></p>"===i||""===i||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(i)||/<!--StartFragment-->([<p></p>]*)<!--EndFragment-->/.test(i))&&(i=e.win.localStorage.getItem("fr-copied-html"))):/text\/rtf/.test(c)&&e.browser.safari?i=s:/public.rtf/.test(c)&&e.browser.safari&&(i=r.clipboardData.getData("text/rtf")),t=r.clipboardData.getData("text"),""!==i)return y(),r.preventDefault&&(r.stopPropagation(),r.preventDefault()),!1;i=null}return function(){if(e.selection.save(),e.events.disableBlur(),i=null,o){o.html("");var t=_(e.selection.get().anchorNode)+e.$wp.offset().top;o.css("top",t),e.browser.edge&&e.opts.iframe&&e.$el.append(o)}else{var n=document.getElementsByTagName("BODY")[0],r=window.getComputedStyle(n).transform;if("none"!==r){var c=_(e.selection.get().anchorNode)+e.$wp.offset().top;o=l('<div contenteditable="true" style="position: fixed; top: '+c+'px; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>')}else o=l('<div contenteditable="true" style="position: fixed; top: 0; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>');e.browser.webkit||e.browser.mozilla?("none"===r&&o.css("top",e.$sc.scrollTop()),e.$el.after(o)):e.browser.edge&&e.opts.iframe?e.$el.append(o):e.$box.after(o),e.events.on("destroy",(function(){o.remove()}))}var a;e.helpers.isIOS()&&e.$sc&&(a=e.$sc.scrollTop()),e.opts.iframe&&e.$el.attr("contenteditable","false"),o.focus(),e.helpers.isIOS()&&e.$sc&&e.$sc.scrollTop(a),e.win.setTimeout(y,1)}(),!1}function v(e){return e&&"false"===e.contentEditable}function a(t){if(t.originalEvent&&(t=t.originalEvent),v(t.target))return!1;if(t&&t.dataTransfer&&t.dataTransfer.getData){var o="";if(n=t.dataTransfer.types,e.helpers.isArray(n))for(var d=0;d<n.length;d++)o+="".concat(n[d],";");else o=n;if(i="",/text\/rtf/.test(o)&&(s=t.dataTransfer.getData("text/rtf")),/text\/html/.test(o)?i=t.dataTransfer.getData("text/html"):/text\/rtf/.test(o)&&e.browser.safari?i=s:/text\/plain/.test(o)&&!this.browser.mozilla&&(i=e.html.escapeEntities(t.dataTransfer.getData("text/plain")).replace(/\n/g,"<br>")),""!==i){e.keys.forceUndo(),c=e.snapshot.get(),e.selection.save(),e.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");var h=e.markers.insertAtPoint(t);if(e.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"),e.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"),e.selection.restore(),e.selection.remove(),e.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"),!1!==h){var a=e.el.querySelector(".fr-marker");return l(a).replaceWith(r.MARKERS),e.selection.restore(),y(),t.preventDefault&&(t.stopPropagation(),t.preventDefault()),!1}}else i=null}}function _(e){return e.nodeType===Node.TEXT_NODE?e.parentNode.offsetTop:e.offsetTop}function y(){e.opts.iframe&&e.$el.attr("contenteditable","true"),e.browser.edge&&e.opts.iframe&&e.$box.after(o),c||(e.keys.forceUndo(),c=e.snapshot.get()),i||(i=o.get(0).innerHTML,t=o.text(),e.selection.restore(),e.events.enableBlur());var n=i.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi),r=e.events.chainTrigger("paste.beforeCleanup",i);r&&"string"==typeof r&&(i=r),(!n||n&&!1!==e.events.trigger("paste.wordPaste",[i]))&&C(i,n)}function E(e){for(var t="",n=0;n++<e;)t+="&nbsp;";return t}function C(o,d,h){var f,a=null,m=null;if(0<=o.toLowerCase().indexOf("<body")){var i="";0<=o.indexOf("<style")&&(i=o.replace(/[.\s\S\w\W<>]*(<style[^>]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi,"$1")),o=(o=(o=i+o.replace(/[.\s\S\w\W<>]*<body[^>]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi,"$1")).replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g,(function(e){return e.replace(/\n/g,"<br />")}))).replace(/ \n/g," ").replace(/\n /g," ").replace(/([^>])\n([^<])/g,"$1 $2")}var s=!1;0<=o.indexOf('id="docs-internal-guid')&&(o=o.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g,"$1"),s=!0),(0<=o.indexOf('content="Sheets"')||0<=o.indexOf("google-sheets-html-origin"))&&(o=o.replace(/width:0px;/g,""));var v=!1;if(!d)if((v=function(){var r=null;try{r=e.win.localStorage.getItem("fr-copied-text")}catch(e){}return!(!r||!t||n&&-1===n.indexOf("text/html")||t.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")!==r.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")&&t.replace(/\s/g,"")!==r.replace(/\s/g,""))}())&&(o=e.win.localStorage.getItem("fr-copied-html")),v)o=e.clean.html(o,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs);else{var _=e.opts.htmlAllowedStyleProps;e.opts.htmlAllowedStyleProps=e.opts.pasteAllowedStyleProps,e.opts.htmlAllowComments=!1,o=(o=(o=o.replace(/<span class="Apple-tab-span">\s*<\/span>/g,E(e.opts.tabSpaces||4))).replace(/<span class="Apple-tab-span" style="white-space:pre">(\t*)<\/span>/g,(function(t,n){return E(n.length*(e.opts.tabSpaces||4))}))).replace(/\t/g,E(e.opts.tabSpaces||4)),o=e.clean.html(o,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs),e.opts.htmlAllowedStyleProps=_,e.opts.htmlAllowComments=!0,e.html.defaultTag()&&"div"===e.html.defaultTag()||(o=w(o)),o=(o=o.replace(/\r/g,"")).replace(/^ */g,"").replace(/ *$/g,"")}!d||e.wordPaste&&h||(0===(o=o.replace(/^\n*/g,"").replace(/^ /g,"")).indexOf("<colgroup>")&&(o="<table>".concat(o,"</table>")),o=w(o=function(t){var n;t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<p(.*?)class="?'?MsoListParagraph"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ul><li>$3</li></ul>")).replace(/<p(.*?)class="?'?NumberedText"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ol><li>$3</li></ol>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ul><li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ol><li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListBullet"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li></ul>")).replace(/<p(.*?)class="?'?NumberedTextCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li></ol>")).replace(/<span([^<]*?)style="?'?mso-list:Ignore"?'?([\s\S]*?)>([\s\S]*?)<span/gi,"<span><span")).replace(/<!--\[if !supportLists\]-->([\s\S]*?)<!--\[endif\]-->/gi,"")).replace(/<!\[if !supportLists\]>([\s\S]*?)<!\[endif\]>/gi,"")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi," ")).replace(/<!--[\s\S]*?-->/gi,"")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi,"");var r,o=["style","script","applet","embed","noframes","noscript"];for(n=0;n<o.length;n++){var a=new RegExp("<".concat(o[n],".*?").concat(o[n],"(.*?)>"),"gi");t=t.replace(a,"")}for(t=(t=(t=t.replace(/&nbsp;/gi," ")).replace(/<td([^>]*)><\/td>/g,"<td$1><br></td>")).replace(/<th([^>]*)><\/th>/g,"<th$1><br></th>");(t=(r=t).replace(/<[^/>][^>]*><\/[^>]+>/gi,""))!==r;);t=(t=t.replace(/<lilevel([^1])([^>]*)>/gi,'<li data-indent="true"$2>')).replace(/<lilevel1([^>]*)>/gi,"<li$1>"),t=(t=(t=e.clean.html(t,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs)).replace(/<a>(.[^<]+)<\/a>/gi,"$1")).replace(/<br> */g,"<br>");var c=e.o_doc.createElement("div");c.innerHTML=t;var i=c.querySelectorAll("li[data-indent]");for(n=0;n<i.length;n++){var s=i[n],l=s.previousElementSibling;if(l&&"LI"===l.tagName){var d=l.querySelector(":scope > ul, :scope > ol");d||(d=document.createElement("ul"),l.appendChild(d)),d.appendChild(s)}else s.removeAttribute("data-indent")}return e.html.cleanBlankSpaces(c),c.innerHTML}(o))),e.opts.pastePlain&&(o=function(t){var n,r=null,o=e.doc.createElement("div");o.innerHTML=t;var a=o.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");for(n=0;n<a.length;n++)(r=a[n]).innerText&&(r.outerHTML="<".concat(e.html.defaultTag()||"DIV",">").concat(r.innerText,"</").concat(e.html.defaultTag()||"DIV",">"));for(n=(a=o.querySelectorAll("*:not(".concat("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not("),")"))).length-1;0<=n;n--)(r=a[n]).outerHTML=r.innerHTML;return function t(n){for(var r=e.node.contents(n),o=0;o<r.length;o++)r[o].nodeType!==Node.TEXT_NODE&&r[o].nodeType!==Node.ELEMENT_NODE?r[o].parentNode.removeChild(r[o]):t(r[o])}(o),o.innerHTML}(o));var y=e.events.chainTrigger("paste.afterCleanup",o);if("string"==typeof y&&(o=y),""!==o){var C=e.o_doc.createElement("div");0<=(C.innerHTML=o).indexOf("<body>")?(e.html.cleanBlankSpaces(C),e.spaces.normalize(C,!0)):e.spaces.normalize(C);var p=C.getElementsByTagName("span");for(f=p.length-1;0<=f;f--){var u=p[f];0===u.attributes.length&&(u.outerHTML=u.innerHTML)}if(!0===e.opts.linkAlwaysBlank){var S=C.getElementsByTagName("a");for(f=S.length-1;0<=f;f--){var g=S[f];g.getAttribute("target")||g.setAttribute("target","_blank")}}var T=e.selection.element(),A=!1;if(T&&l(T).parentsUntil(e.el,"ul, ol").length&&(A=!0),A){var b=C.children;1===b.length&&0<=["OL","UL"].indexOf(b[0].tagName)&&(b[0].outerHTML=b[0].innerHTML)}if(!s){var R=C.getElementsByTagName("br");for(f=R.length-1;0<=f;f--){var O=R[f];e.node.isBlock(O.previousSibling)&&O.parentNode.removeChild(O)}}if(e.opts.enter===r.ENTER_BR)for(f=(a=C.querySelectorAll("p, div")).length-1;0<=f;f--)0===(m=a[f]).attributes.length&&(m.outerHTML=m.innerHTML+(m.nextSibling&&!e.node.isEmpty(m)?"<br>":""));else if(e.opts.enter===r.ENTER_DIV)for(f=(a=C.getElementsByTagName("p")).length-1;0<=f;f--)0===(m=a[f]).attributes.length&&(m.outerHTML="<div>".concat(m.innerHTML,"</div>"));else e.opts.enter===r.ENTER_P&&1===C.childNodes.length&&"P"===C.childNodes[0].tagName&&0===C.childNodes[0].attributes.length&&(C.childNodes[0].outerHTML=C.childNodes[0].innerHTML);if(C.children&&0<C.children.length)if(e.opts.trackChangesEnabled)for(var I=0;I<C.children.length;I++)C.children[I].setAttribute("id","isPasted");else C.children[0].setAttribute("id","isPasted");o=C.innerHTML,v&&(o=function(t){var n,o=e.o_doc.createElement("div");o.innerHTML=t;for(var c=o.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat(r.VOID_ELEMENTS.join("):not("),"):not(").concat(e.opts.htmlAllowedEmptyTags.join("):not("),")"));c.length;){for(n=0;n<c.length;n++)c[n].parentNode.removeChild(c[n]);c=o.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat(r.VOID_ELEMENTS.join("):not("),"):not(").concat(e.opts.htmlAllowedEmptyTags.join("):not("),")"))}return o.innerHTML}(o)),e.html.insert(o,!0)}e.events.trigger("paste.after"),e.undo.saveStep(c),c=null,e.undo.saveStep()}function p(e){for(var t=e.length-1;0<=t;t--)e[t].attributes&&e[t].attributes.length&&e.splice(t,1);return e}function w(t){var n,r=e.o_doc.createElement("div");r.innerHTML=t;for(var o=p(Array.prototype.slice.call(r.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")));o.length;){var a=o[o.length-1];if(e.html.defaultTag()&&"div"!==e.html.defaultTag())a.querySelector(e.html.blockTagsQuery())?a.outerHTML=a.innerHTML:a.outerHTML="<".concat(e.html.defaultTag(),">").concat(a.innerHTML,"</").concat(e.html.defaultTag(),">");else{var c=a.querySelectorAll("*");!c.length||"BR"!==c[c.length-1].tagName&&0===a.innerText.length||!c.length||"BR"!==c[c.length-1].tagName||c[c.length-1].nextSibling?a.outerHTML=a.innerHTML+(a.nextSibling?"<br>":""):a.outerHTML=a.innerHTML}o=p(Array.prototype.slice.call(r.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))}for(o=p(Array.prototype.slice.call(r.querySelectorAll("div:not([style])")));o.length;){for(n=0;n<o.length;n++){var i=o[n],s=i.innerHTML.replace(/\u0009/gi,"").trim();i.outerHTML=s}o=p(Array.prototype.slice.call(r.querySelectorAll("div:not([style])")))}return r.innerHTML}function u(){e.el.removeEventListener("copy",h),e.el.removeEventListener("cut",h),e.el.removeEventListener("paste",m)}return{_init:function(){e.el.addEventListener("copy",h),e.el.addEventListener("cut",h),e.el.addEventListener("paste",m,{capture:!0}),e.events.on("drop",a),e.browser.msie&&e.browser.version<11&&(e.events.on("mouseup",(function(e){2===e.button&&(setTimeout((function(){f=!1}),50),f=!0)}),!0),e.events.on("beforepaste",m)),e.events.on("destroy",u)},cleanEmptyTagsAndDivs:w,getRtfClipboard:function(){return s},saveCopiedText:d,clean:C}},Object.assign(r.DEFAULTS,{shortcutsEnabled:[],shortcutsHint:!0}),r.SHORTCUTS_MAP={},r.RegisterShortcut=function(e,t,n,o,a,c){r.SHORTCUTS_MAP[(a?"^":"")+(c?"@":"")+e]={cmd:t,val:n,letter:o,shift:a,option:c},r.DEFAULTS.shortcutsEnabled.push(t)},r.RegisterShortcut(r.KEYCODE.E,"show",null,"E",!1,!1),r.RegisterShortcut(r.KEYCODE.B,"bold",null,"B",!1,!1),r.RegisterShortcut(r.KEYCODE.I,"italic",null,"I",!1,!1),r.RegisterShortcut(r.KEYCODE.U,"underline",null,"U",!1,!1),r.RegisterShortcut(r.KEYCODE.S,"strikeThrough",null,"S",!1,!1),r.RegisterShortcut(r.KEYCODE.CLOSE_SQUARE_BRACKET,"indent",null,"]",!1,!1),r.RegisterShortcut(r.KEYCODE.OPEN_SQUARE_BRACKET,"outdent",null,"[",!1,!1),r.RegisterShortcut(r.KEYCODE.Z,"undo",null,"Z",!1,!1),r.RegisterShortcut(r.KEYCODE.Z,"redo",null,"Z",!0,!1),r.RegisterShortcut(r.KEYCODE.Y,"redo",null,"Y",!1,!1),r.MODULES.shortcuts=function(s){var e=null,t=!1;function n(e){if(!s.core.hasFocus())return!0;var n=e.which,o=-1!==navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey;if("keyup"===e.type&&t&&n!==r.KEYCODE.META)return t=!1;"keydown"===e.type&&(t=!1);var c=(e.shiftKey?"^":"")+(e.altKey?"@":"")+n,a=s.node.blockParent(s.selection.blocks()[0]);if(a&&"TR"==a.tagName&&null==a.getAttribute("contenteditable")&&(a=a.closest("table")),o&&r.SHORTCUTS_MAP[c]&&(!a||"false"!==a.getAttribute("contenteditable"))){var l=r.SHORTCUTS_MAP[c].cmd;if(l&&0<=s.opts.shortcutsEnabled.indexOf(l)){var i=r.SHORTCUTS_MAP[c].val;if(!1===s.events.trigger("shortcut",[e,l,i]))return!(t=!0);if(l&&(s.commands[l]||r.COMMANDS[l]&&r.COMMANDS[l].callback))return e.preventDefault(),e.stopPropagation(),"keydown"===e.type&&((s.commands[l]||r.COMMANDS[l].callback)(),t=!0),!1}}}return{_init:function(){s.events.on("keydown",n,!0),s.events.on("keyup",n,!0)},get:function(t){if(!s.opts.shortcutsHint)return null;if(!e)for(var n in e={},r.SHORTCUTS_MAP)Object.prototype.hasOwnProperty.call(r.SHORTCUTS_MAP,n)&&0<=s.opts.shortcutsEnabled.indexOf(r.SHORTCUTS_MAP[n].cmd)&&(e["".concat(r.SHORTCUTS_MAP[n].cmd,".").concat(r.SHORTCUTS_MAP[n].val||"")]={shift:r.SHORTCUTS_MAP[n].shift,option:r.SHORTCUTS_MAP[n].option,letter:r.SHORTCUTS_MAP[n].letter});var o=e[t];return o?(s.helpers.isMac()?String.fromCharCode(8984):"".concat(s.language.translate("Ctrl"),"+"))+(o.shift?s.helpers.isMac()?String.fromCharCode(8679):"".concat(s.language.translate("Shift"),"+"):"")+(o.option?s.helpers.isMac()?String.fromCharCode(8997):"".concat(s.language.translate("Alt"),"+"):"")+o.letter:null}}},r.MODULES.snapshot=function(e){function t(e){for(var t=e.parentNode.childNodes,n=0,r=null,a=0;a<t.length;a++){if(r){var o=t[a].nodeType===Node.TEXT_NODE&&""===t[a].textContent,i=r.nodeType===Node.TEXT_NODE&&t[a].nodeType===Node.TEXT_NODE,s=r.nodeType===Node.TEXT_NODE&&""===r.textContent;o||i||s||n++}if(t[a]===e)return n;r=t[a]}}function a(n){var r=[];if(!n.parentNode)return[];for(;!e.node.isElement(n);)r.push(t(n)),n=n.parentNode;return r.reverse()}function n(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;){var n=e.previousSibling;n&&n.nodeType===Node.TEXT_NODE&&(t+=n.textContent.length),e=n}return t}function r(t){for(var n=e.el,r=0;r<t.length;r++)n=n.childNodes[t[r]];return n}function o(t,n){try{var o=r(n.scLoc),c=n.scOffset,a=r(n.ecLoc),l=n.ecOffset,i=e.doc.createRange();i.setStart(o,c),i.setEnd(a,l),t.addRange(i)}catch(e){}}return{get:function(){var t,r={};if(e.events.trigger("snapshot.before"),r.html=(e.$wp?e.$el.html():e.$oel.get(0).outerHTML).replace(/ style=""/g,""),r.ranges=[],e.$wp&&e.selection.inEditor()&&e.core.hasFocus())for(var o=e.selection.ranges(),c=0;c<o.length;c++)r.ranges.push({scLoc:a((t=o[c]).startContainer),scOffset:n(t.startContainer,t.startOffset),ecLoc:a(t.endContainer),ecOffset:n(t.endContainer,t.endOffset)});return e.events.trigger("snapshot.after",[r]),r},restore:function(t){e.$el.html()!==t.html&&(e.opts.htmlExecuteScripts?e.$el.html(t.html):e.el.innerHTML=t.html);var n=e.selection.get();e.selection.clear(),e.events.focus(!0);for(var r=0;r<t.ranges.length;r++)o(n,t.ranges[r])},equal:function(t,n){return t.html===n.html&&(!e.core.hasFocus()||JSON.stringify(t.ranges)===JSON.stringify(n.ranges))}}},r.MODULES.undo=function(e){function t(t){var n=t.which;e.keys.ctrlKey(t)&&(n===r.KEYCODE.Z&&t.shiftKey&&t.preventDefault(),n===r.KEYCODE.Z&&t.preventDefault())}var n=null;function o(){if(e.undo_stack&&!e.undoing)for(;e.undo_stack.length>e.undo_index;)e.undo_stack.pop()}function a(){e.undo_index=0,e.undo_stack=[]}function c(){e.undo_stack=[]}return{_init:function(){a(),e.events.on("initialized",(function(){n=(e.$wp?e.$el.html():e.$oel.get(0).outerHTML).replace(/ style=""/g,"")})),e.events.on("blur",(function(){e.el.querySelector(".fr-dragging")||e.undo.saveStep()})),e.events.on("keydown",t),e.events.on("destroy",c)},run:function(){if(1<e.undo_index){e.undoing=!0;var t=e.undo_stack[--e.undo_index-1];clearTimeout(e._content_changed_timer),e.snapshot.restore(t),n=t.html,e.popups.hideAll(),e.toolbar.enable(),e.events.trigger("contentChanged"),e.events.trigger("commands.undo"),e.undoing=!1,e.selection.restore()}},redo:function(){if(e.undo_index<e.undo_stack.length){e.undoing=!0;var t=e.undo_stack[e.undo_index++];clearTimeout(e._content_changed_timer),e.snapshot.restore(t),n=t.html,e.popups.hideAll(),e.toolbar.enable(),e.events.trigger("contentChanged"),e.events.trigger("commands.redo"),e.undoing=!1}},canDo:function(){return!(0===e.undo_stack.length||e.undo_index<=1)},canRedo:function(){return e.undo_index!==e.undo_stack.length},dropRedo:o,reset:a,saveStep:function(t){if(e.undo_stack&&!e.undoing&&!e.el.querySelector(".fr-marker"))if(void 0===t){if((t=e.snapshot.get())&&t.html&&e.undo_stack[e.undo_stack.length-1]&&t.html===e.undo_stack[e.undo_stack.length-1].html)return;e.undo_stack[e.undo_index-1]&&e.snapshot.equal(e.undo_stack[e.undo_index-1],t)||(o(),e.undo_stack.push(t),e.undo_index++,function(e,t){var n=t.split("fr-selected-cell").join("");n=n.split(' class=""').join("");var r=e.split("fr-selected-cell").join("");return n===r.split(' class=""').join("")}(n,t.html)||(e.events.trigger("contentChanged"),n=t.html))}else o(),0<e.undo_index?e.undo_stack[e.undo_index-1]=t:(e.undo_stack.push(t),e.undo_index++)}}},Object.assign(r.DEFAULTS,{height:null,heightMax:null,heightMin:null,width:null}),r.MODULES.size=function(e){function t(){a(),e.opts.height&&e.$el.css("minHeight",e.opts.height-e.helpers.getPX(e.$el.css("padding-top"))-e.helpers.getPX(e.$el.css("padding-bottom")));var t=!1;if(e.opts.fullPage)for(var n=e.$el.find("span,p,div"),r=0;r<n.length;r++)if(n[r].style.height&&n[r].style.height.includes("vh")){t=!0;break}e.opts.fullPage&&t&&(e.opts.heightMin&&e.$iframe.css("minHeight",e.opts.heightMin),e.opts.heightMax&&e.$iframe.css("maxHeight",e.opts.heightMax),e.$el.css("overflow-y","auto")),e.$iframe.height(e.$el.outerHeight(!0))}function a(){e.opts.heightMin?e.$el.css("minHeight",e.opts.heightMin):e.$el.css("minHeight",""),e.opts.heightMax?(e.$wp.css("maxHeight",e.opts.heightMax),e.$wp.css("overflow","auto")):(e.$wp.css("maxHeight",""),e.$wp.css("overflow","")),e.opts.height?(e.$wp.css("height",e.opts.height),e.$wp.css("overflow","auto"),e.$el.css("minHeight",e.opts.height-e.helpers.getPX(e.$el.css("padding-top"))-e.helpers.getPX(e.$el.css("padding-bottom")))):(e.$wp.css("height",""),e.opts.heightMin||e.$el.css("minHeight",""),e.opts.heightMax||e.$wp.css("overflow","")),e.opts.width&&e.$box.width(e.opts.width)}return{_init:function(){if(!e.$wp)return!1;a(),e.$iframe&&(e.events.on("keyup keydown",(function(){setTimeout(t,0)}),!0),e.events.on("commands.after html.set init initialized paste.after",t))},syncIframe:t,refresh:a}},Object.assign(r.DEFAULTS,{documentReady:!1,editorClass:null,typingTimer:500,iframe:!1,requestWithCORS:!0,requestWithCredentials:!1,requestHeaders:{},useClasses:!0,spellcheck:!0,iframeDefaultStyle:'html{margin:0px;height:auto;}body{height:auto;padding:20px;background:transparent;color:#000000;position:relative;z-index: 2;-webkit-user-select:auto;margin:0px;overflow:hidden;min-height:20px;}body:after{content:"";display:block;clear:both;}body::-moz-selection{background:#b5d6fd;color:#000;}body::selection{background:#b5d6fd;color:#000;}',iframeStyle:"",iframeStyleFiles:[],direction:"auto",zIndex:1,tabIndex:null,disableRightClick:!1,scrollableContainer:"body",keepFormatOnDelete:!1,theme:null}),r.MODULES.core=function(i){var e=i.$;function t(){if(i.$box.addClass("fr-box".concat(i.opts.editorClass?" ".concat(i.opts.editorClass):"")),i.$box.attr("role","application"),i.$wp.addClass("fr-wrapper"),i.opts.documentReady&&i.$box.addClass("fr-document"),i.opts.iframe||i.$el.addClass("fr-element fr-view"),(i.opts.height&&i.opts.height<window.innerHeight||i.opts.heightMax&&i.opts.heightMax<window.innerHeight)&&i.$el.addClass("fr-element-scroll-visible"),i.opts.iframe){i.$iframe.addClass("fr-iframe"),i.$el.addClass("fr-view");for(var e=0;e<i.o_doc.styleSheets.length;e++){var t=void 0;try{t=i.o_doc.styleSheets[e].cssRules}catch(e){}if(t)for(var n=0,r=t.length;n<r;n++)!t[n].selectorText||0!==t[n].selectorText.indexOf(".fr-view")&&0!==t[n].selectorText.indexOf(".fr-element")||0<t[n].style.cssText.length&&(0===t[n].selectorText.indexOf(".fr-view")?i.opts.iframeStyle+="".concat(t[n].selectorText.replace(/\.fr-view/g,"body"),"{").concat(t[n].style.cssText,"}"):i.opts.iframeStyle+="".concat(t[n].selectorText.replace(/\.fr-element/g,"body"),"{").concat(t[n].style.cssText,"}"))}}"auto"!==i.opts.direction&&i.$box.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(i.opts.direction)),i.$el.attr("dir",i.opts.direction),i.$wp.attr("dir",i.opts.direction),1<i.opts.zIndex&&i.$box.css("z-index",i.opts.zIndex),i.opts.theme&&i.$box.addClass("".concat(i.opts.theme,"-theme")),i.opts.tabIndex=i.opts.tabIndex||i.$oel.attr("tabIndex"),i.opts.tabIndex&&i.$el.attr("tabIndex",i.opts.tabIndex)}return{_init:function(){if(r.INSTANCES.push(i),i.drag_support={filereader:"undefined"!=typeof FileReader,formdata:Boolean(i.win.FormData),progress:"upload"in new XMLHttpRequest},i.$wp){t(),i.html.set(i._original_html),i.$el.attr("spellcheck",i.opts.spellcheck),i.helpers.isMobile()&&(i.$el.attr("autocomplete",i.opts.spellcheck?"on":"off"),i.$el.attr("autocorrect",i.opts.spellcheck?"on":"off"),i.$el.attr("autocapitalize",i.opts.spellcheck?"on":"off")),i.opts.disableRightClick&&i.events.$on(i.$el,"contextmenu",(function(e){if(2===e.button)return e.preventDefault(),e.stopPropagation(),!1}));try{i.doc.execCommand("styleWithCSS",!1,!1)}catch(e){}}"TEXTAREA"===i.$oel.get(0).tagName&&(i.events.on("contentChanged",(function(){i.$oel.val(i.html.get())})),i.events.on("form.submit",(function(){i.$oel.val(i.html.get())})),i.events.on("form.reset",(function(){i.html.set(i._original_html)})),i.$oel.val(i.html.get())),i.helpers.isIOS()&&i.events.$on(i.$doc,"selectionchange",(function(){i.$doc.get(0).hasFocus()||i.$win.get(0).focus()})),i.events.trigger("init"),i.opts.autofocus&&!i.opts.initOnClick&&i.$wp&&i.events.on("initialized",(function(){i.events.focus(!0)}))},destroy:function(e){"TEXTAREA"===i.$oel.get(0).tagName&&i.$oel.val(e),i.$box&&i.$box.removeAttr("role"),i.$wp&&("TEXTAREA"===i.$oel.get(0).tagName?(i.$el.html(""),i.$wp.html(""),i.$box.replaceWith(i.$oel),i.$oel.show()):(i.$wp.replaceWith(e),i.$el.html(""),i.$box.removeClass("fr-view fr-ltr fr-box ".concat(i.opts.editorClass||"")),i.opts.theme&&i.$box.addClass("".concat(i.opts.theme,"-theme")))),this.$wp=null,this.$el=null,this.el=null,this.$box=null},isEmpty:function(){return i.node.isEmpty(i.el)},getXHR:function(e,t){var n=new XMLHttpRequest;for(var r in n.open(t,e,!0),i.opts.requestWithCredentials&&(n.withCredentials=!0),i.opts.requestHeaders)Object.prototype.hasOwnProperty.call(i.opts.requestHeaders,r)&&n.setRequestHeader(r,i.opts.requestHeaders[r]);return n},injectStyle:function(t){if(i.opts.iframe){i.$head.find("style[data-fr-style], link[data-fr-style]").remove(),i.$head.append('<style data-fr-style="true">'.concat(t,"</style>"));for(var n=0;n<i.opts.iframeStyleFiles.length;n++){var r=e('<link data-fr-style="true" rel="stylesheet" href="'.concat(i.opts.iframeStyleFiles[n],'">'));r.get(0).addEventListener("load",i.size.syncIframe),i.$head.append(r)}}},hasFocus:function(){return i.browser.mozilla&&i.helpers.isMobile()?i.selection.inEditor():i.node.hasFocus(i.el)||0<i.$el.find("*:focus").length},sameInstance:function(e){if(!e)return!1;var t=e.data("instance");return!!t&&t.id===i.id}}},r.POPUP_TEMPLATES={"text.edit":"[_EDIT_]"},r.RegisterTemplate=function(e,t){r.POPUP_TEMPLATES[e]=t},r.MODULES.popups=function(u){var e,t=u.$;u.shared.popups||(u.shared.popups={});var n,g=u.shared.popups;function o(e,t){t.isVisible()||(t=u.$sc),t.is(g[e].data("container"))||(g[e].data("container",t),t.append(g[e]))}function a(e){var t;e.find(".fr-upload-progress").addClass("fr-height-set"),e.find(".fr-upload-progress").removeClass("fr-height-auto"),u.popups.get("filesManager.insert").removeClass("fr-height-auto"),e.find(".fr-files-upload-layer").hasClass("fr-active")&&(t=1),e.find(".fr-files-by-url-layer").hasClass("fr-active")&&(t=2),e.find(".fr-files-embed-layer").hasClass("fr-active")&&(t=3),e.find(".fr-upload-progress-layer").get(0).clientHeight+10<e.find(".fr-upload-progress").get(0).clientHeight&&e.find(".fr-upload-progress").addClass("fr-height-auto"),400<e[0].clientHeight&&(e[0].childNodes[4].style.height="".concat(e[0].clientHeight-(e[0].childNodes[0].clientHeight+e[0].childNodes[t].clientHeight)-80,"px"))}var c=2e3;function i(){t(this).toggleClass("fr-not-empty",!0)}function s(){var e=t(this);e.toggleClass("fr-not-empty",""!==e.val())}function l(e){return g[e]&&u.node.hasClass(g[e],"fr-active")&&u.core.sameInstance(g[e])||!1}function b(e){for(var t in g)if(Object.prototype.hasOwnProperty.call(g,t)&&l(t)&&(void 0===e||g[t].data("instance")===e))return g[t];return!1}function d(e){var r=null;if(r="string"!=typeof e?e:g[e],"filesManager.insert"===e&&void 0!==u.filesManager&&u.filesManager.isChildWindowOpen())return!1;if(r&&u.node.hasClass(r,"fr-active")&&(r.removeClass("fr-active fr-above"),u.events.trigger("popups.hide.".concat(e)),u.$tb&&(1<u.opts.zIndex?u.$tb.css("zIndex",u.opts.zIndex+1):u.$tb.css("zIndex","")),u.events.disableBlur(),r.find("input, textarea, button").each((function(){this===this.ownerDocument.activeElement&&this.blur()})),r.find("input, textarea").attr("disabled","disabled"),n))for(var o=0;o<n.length;o++)t(n[o]).removeClass("fr-btn-active-popup")}function h(e){for(var t in void 0===e&&(e=[]),g)Object.prototype.hasOwnProperty.call(g,t)&&e.indexOf(t)<0&&d(t)}function f(){u.shared.exit_flag=!0}function m(){u.shared.exit_flag=!1}function v(){return u.shared.exit_flag}function _(e,n){var o,c=function(e,t){var n=r.POPUP_TEMPLATES[e];if(!n)return null;for(var o in"function"==typeof n&&(n=n.apply(u)),t)Object.prototype.hasOwnProperty.call(t,o)&&(n=n.replace("[_".concat(o.toUpperCase(),"_]"),t[o]));return n}(e,n),a=t(u.doc.createElement("DIV"));if(!c)return"filesManager.insert"===e?a.addClass("fr-popup fr-files-manager fr-empty"):a.addClass("fr-popup fr-empty"),(o=t("body").first()).append(a),a.data("container",o),g[e]=a;"filesManager.insert"===e?a.addClass("fr-popup fr-files-manager".concat(u.helpers.isMobile()?" fr-mobile":" fr-desktop").concat(u.opts.toolbarInline?" fr-inline":"")):a.addClass("fr-popup".concat(u.helpers.isMobile()?" fr-mobile":" fr-desktop").concat(u.opts.toolbarInline?" fr-inline":"")),a.html(c),u.opts.theme&&a.addClass("".concat(u.opts.theme,"-theme")),1<u.opts.zIndex&&(!u.opts.editInPopup&&u.$tb?u.$tb.css("z-index",u.opts.zIndex+2):a.css("z-index",u.opts.zIndex+2)),"auto"!==u.opts.direction&&a.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(u.opts.direction)),a.find("input, textarea").attr("dir",u.opts.direction).attr("disabled","disabled"),(o=t("body").first()).append(a),a.data("container",o);var l=(g[e]=a).find(".fr-color-hex-layer");if(0<l.length){var i=u.helpers.getPX(a.find(".fr-color-set > span").css("width")),s=u.helpers.getPX(l.css("paddingLeft")),d=u.helpers.getPX(l.css("paddingRight"));l.css("width",i*u.opts.colorsStep+s+d)}return u.button.bindCommands(a,!1),a}function y(i){var s=g[i];return{_windowResize:function(){var e=s.data("instance")||u;if(!e.helpers.isMobile()&&s.isVisible()){var t=s.find(".fr-file-progress-bar-layer");if("file.insert"===i&&0<t.length&&t.hasClass("fr-active")){var n=u.$tb.find('.fr-command[data-cmd="insertFile"]');e.events.disableBlur();var r=u.button.getPosition(n),a=r.left,o=r.top;u.position.at(a,o,g[i],0),e.events.enableBlur()}else e.events.disableBlur(),e.popups.hide(i),e.events.enableBlur()}},_inputFocus:function(e){var n=s.data("instance")||u,r=t(e.currentTarget);if(r.is("input:file")&&r.closest(".fr-layer").addClass("fr-input-focus"),e.preventDefault(),e.stopPropagation(),setTimeout((function(){n.events.enableBlur()}),100),n.helpers.isMobile()){var o=t(n.o_win).scrollTop();setTimeout((function(){t(n.o_win).scrollTop(o)}),0)}},_inputBlur:function(e){var n=s.data("instance")||u,r=t(e.currentTarget);r.is("input:file")&&r.closest(".fr-layer").removeClass("fr-input-focus"),document.activeElement!==this&&t(this).isVisible()&&(n.events.blurActive()&&n.events.trigger("blur"),n.events.enableBlur())},_editorKeydown:function(e){var t=s.data("instance")||u;t.keys.ctrlKey(e)||e.which===r.KEYCODE.ALT||e.which===r.KEYCODE.ESC||(l(i)&&s.findVisible(".fr-back").length?t.button.exec(s.findVisible(".fr-back").first()):e.which!==r.KEYCODE.ALT&&t.popups.hide(i))},_preventFocus:function(e){var n=s.data("instance")||u,r=e.originalEvent?e.originalEvent.target||e.originalEvent.originalTarget:null;"mouseup"===e.type||t(r).is(":focus")||n.events.disableBlur(),"mouseup"!==e.type||t(r).hasClass("fr-command")||0<t(r).parents(".fr-command").length||t(r).hasClass("fr-dropdown-content")||u.button.hideActiveDropdowns(s),(u.browser.safari||u.browser.mozilla)&&"mousedown"===e.type&&t(r).is("input[type=file]")&&n.events.disableBlur();var o="input, textarea, button, select, label, .fr-command";if(r&&!t(r).is(o)&&0===t(r).parents(o).length)return e.stopPropagation(),!1;r&&t(r).is(o)&&e.stopPropagation(),m()},_editorMouseup:function(){s.isVisible()&&v()&&0<s.findVisible("input:focus, textarea:focus, button:focus, select:focus").length&&u.events.disableBlur()},_windowMouseup:function(e){if(!u.core.sameInstance(s))return!0;var t=s.data("instance")||u;s.isVisible()&&v()&&(e.stopPropagation(),t.markers.remove(),t.popups.hide(i),m())},_windowKeydown:function(e){if(!u.core.sameInstance(s))return!0;var t=s.data("instance")||u,n=e.which;if(r.KEYCODE.ESC===n){if(t.popups.isVisible(i)&&t.opts.toolbarInline)return e.stopPropagation(),t.popups.isVisible(i)&&(s.findVisible(".fr-back").length?(t.button.exec(s.findVisible(".fr-back").first()),t.accessibility.focusPopupButton(s)):s.findVisible(".fr-dismiss").length?t.button.exec(s.findVisible(".fr-dismiss").first()):(t.popups.hide(i),t.toolbar.showInline(null,!0),t.accessibility.focusPopupButton(s))),!1;if(t.popups.isVisible(i))return s.findVisible(".fr-back").length?(t.button.exec(s.findVisible(".fr-back").first),t.accessibility.focusPopupButton(s)):s.findVisible(".fr-dismiss").length?t.button.exec(s.findVisible(".fr-dismiss").first()):(t.popups.hide(i),t.accessibility.focusPopupButton(s)),!1}},_repositionPopup:function(){if(!u.opts.height&&!u.opts.heightMax||u.opts.toolbarInline)return!0;if(u.$wp&&l(i)&&s.parent().get(0)===u.$sc.get(0)){var e=s.offset().top-u.$wp.offset().top,t=u.$wp.outerHeight();u.node.hasClass(s.get(0),"fr-above")&&(e+=s.outerHeight()),t<e||e<0?s.addClass("fr-hidden"):s.removeClass("fr-hidden")}},handleWindowClick:function(e){if(!u.core.sameInstance(s))return!0;var n=s.data("instance")||u;s.isVisible()&&e.target&&(0<t(e.target).find("body").length||"BODY"===t(e.target)[0].tagName)&&(e.stopPropagation(),n.popups.hide(i))}}}function E(e,n){u.events.on("mouseup",e._editorMouseup,!0),u.$wp&&u.events.on("keydown",e._editorKeydown),u.events.on("focus",(function(){g[n].removeClass("focused")})),u.events.on("blur",(function(){b()&&u.markers.remove(),u.helpers.isMobile()?g[n].hasClass("focused")?(h(),g[n].removeClass("focused")):g[n].addClass("focused"):g[n].find("iframe").length||h()})),u.$wp&&!u.helpers.isMobile()&&u.events.$on(u.$wp,"scroll.popup".concat(n),e._repositionPopup),u.events.on("window.mouseup",e._windowMouseup,!0),u.events.on("window.keydown",e._windowKeydown,!0),u.opts.iframe&&window.addEventListener("click",e.handleWindowClick),g[n].data("inst".concat(u.id),!0),u.events.on("destroy",(function(){u.core.sameInstance(g[n])&&(t("body").first().append(g[n]),g[n].removeClass("fr-active"))}),!0)}function p(){var e=t(this).prev().children().first();e.attr("checked",!e.attr("checked"))}function C(){for(var e in g)if(Object.prototype.hasOwnProperty.call(g,e)){var t=g[e];t&&(t.html("").removeData().remove(),g[e]=null)}g=[]}return u.shared.exit_flag=!1,{_init:function(){e=window.innerHeight,u.events.on("shared.destroy",C,!0),u.events.on("window.mousedown",f),u.events.on("window.touchmove",m),u.events.$on(t(u.o_win),"scroll",m),u.events.on("mousedown",(function(e){b()&&(e.stopPropagation(),u.$el.find(".fr-marker").remove(),f(),u.events.disableBlur())}))},create:function(e,n){var r=_(e,n),o=y(e);E(o,e),u.events.$on(r,"mousedown mouseup touchstart touchend touch","*",o._preventFocus,!0),u.events.$on(r,"focus","input, textarea, button, select",o._inputFocus,!0),u.events.$on(r,"blur","input, textarea, button, select",o._inputBlur,!0);var a=r.find("input, textarea");return function(e){for(var n=0;n<e.length;n++){var r=e[n],o=t(r);0===o.next().length&&o.attr("placeholder")&&(o.after('<label for="'.concat(o.attr("id"),'">').concat(o.attr("placeholder"),"</label>")),o.attr("placeholder",""))}}(a),u.events.$on(a,"focus",i),u.events.$on(a,"blur change",s),u.events.$on(r,"click",".fr-checkbox + label",p),u.accessibility.registerPopup(e),u.helpers.isIOS()&&u.events.$on(r,"touchend","label",(function(){t("#".concat(t(this).attr("for"))).prop("checked",(function(e,t){return!t}))}),!0),u.events.$on(t(u.o_win),"resize",o._windowResize,!0),"filesManager.insert"===e&&g["filesManager.insert"].css("zIndex",2147483641),r},get:function(e){var t=g[e];return t&&!t.data("inst".concat(u.id))&&E(y(e),e),t},show:function(e,t,r,c,a){if(l(e)||(b()&&0<u.$el.find(".fr-marker").length?(u.events.disableBlur(),u.selection.restore()):b()||(u.events.disableBlur(),u.events.focus(),u.events.enableBlur())),h([e]),!g[e])return!1;var d=u.button.getButtons(".fr-dropdown.fr-active");d.removeClass("fr-active").attr("aria-expanded",!1).parents(".fr-toolbar").css("zIndex","").find("> .fr-dropdown-wrapper").css("height",""),d.next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),g[e].data("instance",u),u.$tb&&u.$tb.data("instance",u);var i=l(e);g[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");var s=g[e].data("container");if(function(e,t){t.isVisible()||(t=u.$sc),t.contains([g[e].get(0)])||t.append(g[e])}(e,s),u.opts.toolbarInline&&s&&u.$tb&&s.get(0)===u.$tb.get(0)&&(o(e,u.$sc),r=u.$tb.offset().top-u.helpers.getPX(u.$tb.css("margin-top")),t=u.$tb.offset().left+u.$tb.outerWidth()/2,u.node.hasClass(u.$tb.get(0),"fr-above")&&r&&(r+=u.$tb.outerHeight()),c=0),s=g[e].data("container"),u.opts.iframe&&!c&&!i){var f=u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-top")),v=u.helpers.getPX(u.$wp.find(".fr-iframe").css("padding-left"));t&&(t-=u.$iframe.offset().left+v),r&&(r-=u.$iframe.offset().top+f)}s.is(u.$tb)?u.$tb.css("zIndex",(u.opts.zIndex||1)+4):g[e].css("zIndex",(u.opts.zIndex||1)+3),u.opts.toolbarBottom&&s&&u.$tb&&s.get(0)===u.$tb.get(0)&&(g[e].addClass("fr-above"),r&&(r-=g[e].outerHeight())),a&&(t-=g[e].width()/2),t+g[e].outerWidth()>u.$sc.offset().left+u.$sc.width()&&(t-=t+g[e].outerWidth()-u.$sc.offset().left-u.$sc.width()),t<u.$sc.offset().left&&"rtl"===u.opts.direction&&(t=u.$sc.offset().left),g[e].removeClass("fr-active"),u.position.at(t,r,g[e],c||0);var _=u.node.blockParent(u.selection.blocks()[0]);if(_&&"false"===_.getAttribute("contenteditable"))g[e].removeClass("fr-active");else{var E=u.selection.element().parentElement.getAttribute("contenteditable");E&&"false"===E?g[e].removeClass("fr-active"):g[e].addClass("fr-active")}i||u.accessibility.focusPopup(g[e]),u.opts.toolbarInline&&u.toolbar.hide(),u.$tb&&(n=u.$tb.find(".fr-btn-active-popup")),u.events.trigger("popups.show.".concat(e)),y(e)._repositionPopup(),m()},hide:d,onHide:function(e,t){u.events.on("popups.hide.".concat(e),t)},hideAll:h,setContainer:o,refresh:function(e){g[e].data("instance",u),u.events.trigger("popups.refresh.".concat(e));for(var n=g[e].find(".fr-command"),r=0;r<n.length;r++){var o=t(n[r]);0===o.parents(".fr-dropdown-menu").length&&u.button.refresh(o)}},onRefresh:function(e,t){u.events.on("popups.refresh.".concat(e),t)},onShow:function(e,t){u.events.on("popups.show.".concat(e),t)},isVisible:l,setFileListHeight:a,areVisible:b,setPopupDimensions:function(t,n){n&&t.find(".fr-upload-progress-layer").get(0).clientHeight<c&&(t.find(".fr-upload-progress").addClass("fr-height-auto"),u.popups.get("filesManager.insert").addClass("fr-height-auto"),t.find(".fr-upload-progress").removeClass("fr-height-set"),c=2e3),t.get(0).clientHeight>window.innerHeight/2&&(window.innerWidth<500?t.get(0).clientHeight>.6*e&&a(t):400<t.get(0).clientHeight&&a(t),c=t.find(".fr-upload-progress-layer").get(0).clientHeight);var r=window.innerWidth;switch(!0){case r<=320:t.width(200);break;case r<=420:t.width(250);break;case r<=520:t.width(300);break;case r<=720:t.width(400);break;case 720<r:t.width(530)}}}},r.MODULES.accessibility=function(e){var p=e.$,t=!0;function n(t){for(var n=e.$el.find('[contenteditable="true"]'),r=!1,o=0;n.get(o);)p(n.get(o)).is(":focus")&&(r=!0),o++;if(t&&t.length&&!r){t.data("blur-event-set")||t.parents(".fr-popup").length||(e.events.$on(t,"blur",(function(){var n=t.parents(".fr-toolbar, .fr-popup").data("instance")||e;n.events.blurActive()&&!e.core.hasFocus()&&n.events.trigger("blur"),setTimeout((function(){n.events.enableBlur()}),100)}),!0),t.data("blur-event-set",!0));var a=t.parents(".fr-toolbar, .fr-popup").data("instance")||e;e.browser.safari&&(e.shared.safariSelection=e.selection.get().getRangeAt(0).cloneRange()),a.events.disableBlur(),t.get(0).focus(),e.shared.$f_el=t}}function u(e,t){var r=t?"last":"first",o=s(g(e))[r]();if(o.length)return n(o),!0}function i(t){return t.is("input, textarea, select")&&c(),e.events.disableBlur(),t.get(0).focus(),!0}function o(t,n){var r=t.find("input, textarea, button, select").filter((function(){return p(this).isVisible()})).not(":disabled");if((r=n?r.last():r.first()).length)return i(r);if(e.shared.with_kb){var o=t.findVisible(".fr-active-item").first();if(o.length)return i(o);var a=t.findVisible("[tabIndex]").first();if(a.length)return i(a)}}function c(){0===e.$el.find(".fr-marker").length&&e.core.hasFocus()&&e.selection.save()}function l(){var t=e.popups.areVisible();if(t){var n=t.find(".fr-buttons");return n.find("button:focus, .fr-group span:focus").length?!u(t.data("instance").$tb):!u(n)}return!u(e.$tb)}function d(){var t=null;return e.shared.$f_el.is(".fr-dropdown.fr-active")?t=e.shared.$f_el:e.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active")&&(t=e.shared.$f_el.closest(".fr-dropdown-menu").prev()),t}function s(t){for(var n=-1,r=0;r<t.length;r++)p(t[r]).hasClass("fr-open")&&(n=r);var o=t.index(e.$tb.find(".fr-more-toolbar.fr-expanded > button.fr-command").first());if(0<o&&-1!==n){var a=t.slice(o,t.length),c=(t=t.slice(0,o)).slice(0,n+1),i=t.slice(n+1,t.length);t=c;for(var s=0;s<a.length;s++)t.push(a[s]);for(var l=0;l<i.length;l++)t.push(i[l])}return t}function g(e){return e.findVisible("button:not(.fr-disabled), .fr-group span.fr-command").filter((function(e){var t=p(e).parents(".fr-more-toolbar");return 0===t.length||0<t.length&&t.hasClass("fr-expanded")}))}function h(t,r,c){if(e.shared.$f_el){var l=d();l&&(e.button.click(l),e.shared.$f_el=l);var i,a=s(g(t)),h=a.index(e.shared.$f_el);return 0===h&&!c||h===a.length-1&&c?(r&&(t.parent().is(".fr-popup")&&(i=!o(t.parent().children().not(".fr-buttons"),!c)),!1===i&&(e.shared.$f_el=null)),r&&!1===i||u(t,!c)):n(p(a.get(h+(c?1:-1)))),!1}}function f(e,t){return h(e,t,!0)}function m(e,t){return h(e,t)}function b(t){if(e.shared.$f_el){var r;if(e.shared.$f_el.is(".fr-dropdown.fr-active"))return n(r=t?e.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()),!1;if(e.shared.$f_el.is("a.fr-command"))return(r=t?e.shared.$f_el.closest("li").nextAllVisible().first().find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.closest("li").prevAllVisible().first().find(".fr-command:not(.fr-disabled)").first()).length||(r=t?e.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()),n(r),!1}}function v(){if(e.shared.$f_el){if(e.shared.$f_el.hasClass("fr-dropdown"))e.button.click(e.shared.$f_el);else if(e.shared.$f_el.is("button.fr-back")){e.opts.toolbarInline&&(e.events.disableBlur(),e.events.focus());var t=e.popups.areVisible(e);t&&(e.shared.with_kb=!1),e.button.click(e.shared.$f_el),y(t)}else{if(e.events.disableBlur(),e.button.click(e.shared.$f_el),e.shared.$f_el.attr("data-group-name")){var r=e.$tb.find('.fr-more-toolbar[data-name="'.concat(e.shared.$f_el.attr("data-group-name"),'"]')),o=e.shared.$f_el;r.hasClass("fr-expanded")&&(o=r.findVisible("button:not(.fr-disabled)").first()),o&&n(o)}else if(e.shared.$f_el.attr("data-popup")){var c=e.popups.areVisible(e);c&&c.data("popup-button",e.shared.$f_el)}else if(e.shared.$f_el.attr("data-modal")){var a=e.modals.areVisible(e);a&&a.data("modal-button",e.shared.$f_el)}e.shared.$f_el=null}return!1}}function _(){e.shared.$f_el&&(e.events.disableBlur(),e.shared.$f_el.blur(),e.shared.$f_el=null),!1!==e.events.trigger("toolbar.focusEditor")&&(e.events.disableBlur(),e.$el.get(0).focus(),e.events.focus())}function a(n){n&&n.length&&(e.events.$on(n,"keydown",(function(t){if(!p(t.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command"))return!0;var r=n.parents(".fr-popup").data("instance")||n.data("instance")||e;if(e.shared.with_kb=!0,e.browser.safari&&e.shared.safariSelection){var o=e.shared.safariSelection,c=o.startContainer,a=o.endContainer,l=o.startOffset,i=o.endOffset,s=e.doc.createRange();s.setStart(c,l),s.setEnd(a,i),e.selection.get().addRange(s)}var d=r.accessibility.exec(t,n);return e.shared.with_kb=!1,d}),!0),e.events.$on(n,"mouseenter","[tabIndex]",(function(r){var o=n.parents(".fr-popup").data("instance")||n.data("instance")||e;if(!t)return r.stopPropagation(),void r.preventDefault();var c=p(r.currentTarget);o.shared.$f_el&&o.shared.$f_el.not(c)&&o.accessibility.focusEditor()}),!0),e.$tb&&e.events.$on(e.$tb,"transitionend",".fr-more-toolbar",(function(){e.shared.$f_el=p(document.activeElement)})))}function y(e){var t=e.data("popup-button");t&&setTimeout((function(){n(t),e.data("popup-button",null)}),0)}function E(t){var n=e.popups.areVisible(t);n&&n.data("popup-button",null)}function C(t){var n=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey;if(t.which!==r.KEYCODE.F10||n||t.shiftKey||!t.altKey)return!0;e.shared.with_kb=!0;var c=e.popups.areVisible(e),d=!1;return c&&(d=o(c.children().not(".fr-buttons"))),d||l(),e.shared.with_kb=!1,t.preventDefault(),t.stopPropagation(),!1}return{_init:function(){e.$wp?e.events.on("keydown",C,!0):e.events.$on(e.$win,"keydown",C,!0),e.events.on("mousedown",(function(t){E(e),e.shared.$f_el&&e.el.isSameNode(e.shared.$f_el[0])&&(e.accessibility.restoreSelection(),t.stopPropagation(),e.events.disableBlur(),e.shared.$f_el=null)}),!0),e.events.on("blur",(function(){e.shared.$f_el=null,E(e)}),!0)},registerPopup:function(n){var c=e.popups.get(n),l=function(t){var n=e.popups.get(t);return{_tiKeydown:function(c){var l=n.data("instance")||e;if(!1===l.events.trigger("popup.tab",[c]))return!1;var d=c.which,h=n.find(":focus").first();if(r.KEYCODE.TAB===d){c.preventDefault();var a=n.children().not(".fr-buttons"),f=a.findVisible("input, textarea, button, select").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(),i=f.indexOf(this)+(c.shiftKey?-1:1);if(0<=i&&i<f.length)return l.events.disableBlur(),p(f[i]).focus(),c.stopPropagation(),!1;var s=n.find(".fr-buttons");if(s.length&&u(s,Boolean(c.shiftKey)))return c.stopPropagation(),!1;if(o(a))return c.stopPropagation(),!1}else{if(r.KEYCODE.ENTER!==d||!c.target||"TEXTAREA"===c.target.tagName)return r.KEYCODE.ESC===d?(c.preventDefault(),c.stopPropagation(),l.accessibility.restoreSelection(),l.popups.isVisible(t)&&n.findVisible(".fr-back").length?(l.opts.toolbarInline&&(l.events.disableBlur(),l.events.focus()),l.button.exec(n.findVisible(".fr-back").first()),y(n)):l.popups.isVisible(t)&&n.findVisible(".fr-dismiss").length?l.button.exec(n.findVisible(".fr-dismiss").first()):(l.popups.hide(t),l.opts.toolbarInline&&l.toolbar.showInline(null,!0),y(n)),!1):r.KEYCODE.SPACE===d&&(h.is(".fr-submit")||h.is(".fr-dismiss"))?(c.preventDefault(),c.stopPropagation(),l.events.disableBlur(),l.button.exec(h),!0):l.keys.isBrowserAction(c)||h.is("input[type=text], textarea")||r.KEYCODE.SPACE===d&&(h.is(".fr-link-attr")||h.is("input[type=file]"))?void c.stopPropagation():(c.stopPropagation(),c.preventDefault(),!1);var m=null;0<n.findVisible(".fr-submit").length?m=n.findVisible(".fr-submit").first():n.findVisible(".fr-dismiss").length&&(m=n.findVisible(".fr-dismiss").first()),m&&(c.preventDefault(),c.stopPropagation(),l.events.disableBlur(),l.button.exec(m))}},_tiMouseenter:function(){E(n.data("instance")||e)}}}(n);a(c.find(".fr-buttons")),e.events.$on(c,"mouseenter","tabIndex",l._tiMouseenter,!0),e.events.$on(c.children().not(".fr-buttons"),"keydown","[tabIndex]",l._tiKeydown,!0),e.popups.onHide(n,(function(){(c.data("instance")||e).accessibility.restoreSelection()})),e.popups.onShow(n,(function(){t=!1,setTimeout((function(){t=!0}),0)}))},registerToolbar:a,focusToolbarElement:n,focusToolbar:u,focusContent:o,focusPopup:function(n){var a=n.children().not(".fr-buttons");a.data("mouseenter-event-set")||(e.events.$on(a,"mouseenter","[tabIndex]",(function(r){var o=n.data("instance")||e;if(!t)return r.stopPropagation(),void r.preventDefault();var c=a.find(":focus").first();c.length&&!c.is("input, button, textarea, select")&&(o.events.disableBlur(),c.blur(),o.events.disableBlur(),o.events.focus())})),a.data("mouseenter-event-set",!0)),!o(a)&&e.shared.with_kb&&u(n.find(".fr-buttons"))},focusModal:function(t){e.core.hasFocus()||(e.events.disableBlur(),e.events.focus()),e.accessibility.saveSelection(),e.events.disableBlur(),e.el.blur(),e.selection.clear(),e.events.disableBlur(),e.shared.with_kb?t.find(".fr-command[tabIndex], [tabIndex]").first().focus():t.find("[tabIndex]").first().focus()},focusEditor:_,focusPopupButton:y,focusModalButton:function(e){var t=e.data("modal-button");t&&setTimeout((function(){n(t),e.data("modal-button",null)}),0)},hasFocus:function(){return null!==e.shared.$f_el},exec:function(t,o){var c=-1!==navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey,h=t.which,a=!1;return h!==r.KEYCODE.TAB||c||t.shiftKey||t.altKey?h!==r.KEYCODE.ARROW_RIGHT||c||t.shiftKey||t.altKey?h!==r.KEYCODE.TAB||c||!t.shiftKey||t.altKey?h!==r.KEYCODE.ARROW_LEFT||c||t.shiftKey||t.altKey?h!==r.KEYCODE.ARROW_UP||c||t.shiftKey||t.altKey?h!==r.KEYCODE.ARROW_DOWN||c||t.shiftKey||t.altKey?h!==r.KEYCODE.ENTER&&h!==r.KEYCODE.SPACE||c||t.shiftKey||t.altKey?h!==r.KEYCODE.ESC||c||t.shiftKey||t.altKey?h!==r.KEYCODE.F10||c||t.shiftKey||!t.altKey||(a=l()):a=function(t){if(e.shared.$f_el){var r=d();return r?(e.button.click(r),n(r)):t.parent().findVisible(".fr-back").length?(e.shared.with_kb=!1,e.opts.toolbarInline&&(e.events.disableBlur(),e.events.focus()),e.button.exec(t.parent().findVisible(".fr-back")).first(),y(t.parent())):e.shared.$f_el.is("button, .fr-group span")&&(t.parent().is(".fr-popup")?(e.accessibility.restoreSelection(),e.shared.$f_el=null,!1!==e.events.trigger("toolbar.esc")&&(e.popups.hide(t.parent()),e.opts.toolbarInline&&e.toolbar.showInline(null,!0),y(t.parent()))):_()),!1}}(o):a=v():a=e.shared.$f_el&&e.shared.$f_el.is(".fr-dropdown:not(.fr-active)")?v():b(!0):a=b():a=m(o):a=m(o,!0):a=f(o):a=f(o,!0),e.shared.$f_el||void 0!==a||(a=!0),!a&&e.keys.isBrowserAction(t)&&(a=!0),!!a||(t.preventDefault(),t.stopPropagation(),!1)},saveSelection:c,restoreSelection:function(){e.$el.find(".fr-marker").length&&(e.events.disableBlur(),e.selection.restore(),e.events.enableBlur())}}},Object.assign(r.DEFAULTS,{tooltips:!0}),r.MODULES.tooltip=function(e){var p=e.$;function t(){e.helpers.isMobile()||e.$tooltip&&e.$tooltip.removeClass("fr-visible").css("left","-3000px").css("position","fixed")}function a(t,n){if(!e.helpers.isMobile()){var o=t.attr("id")&&t.attr("id").split("-")[0],c=t.attr("title"),a=e.opts.trackChangesEnabled,l=e.opts.showChangesEnabled;if(e.opts.toolbarContainer){for(var i=!1,s=0;s<r.INSTANCES.length;s++)if(r.INSTANCES[s].core.hasFocus()){a=r.INSTANCES[s].opts.trackChangesEnabled,l=r.INSTANCES[s].opts.showChangesEnabled,i=!0;break}i||(l=a=t.hasClass("fr-active"))}if("trackChanges"===o)c=a?"Disable Track Changes":"Enable Track Changes";else if("showChanges"===o)c=l?"Hide Changes":"Show Changes";else if(("applyAll"===o||"removeAll"===o||"applyLast"===o||"removeLast"===o)&&0===e.track_changes.getPendingChanges().length)return;if(t.data("title",c),t.data("title")){e.$tooltip||e.opts.tooltips&&!e.helpers.isMobile()&&(e.shared.$tooltip?e.$tooltip=e.shared.$tooltip:(e.shared.$tooltip=p(e.doc.createElement("DIV")).addClass("fr-tooltip"),e.$tooltip=e.shared.$tooltip,e.opts.theme&&e.$tooltip.addClass("".concat(e.opts.theme,"-theme")),p(e.o_doc).find("body").first().append(e.$tooltip)),e.events.on("shared.destroy",(function(){e.$tooltip.html("").removeData().remove(),e.$tooltip=null}),!0)),t.removeAttr("title"),e.$tooltip.text(e.language.translate(t.data("title"))),e.$tooltip.addClass("fr-visible");var d=t.offset().left+(t.outerWidth()-e.$tooltip.outerWidth())/2;d<0&&(d=0),d+e.$tooltip.outerWidth()>p(e.o_win).width()&&(d=p(e.o_win).width()-e.$tooltip.outerWidth()),void 0===n&&(n=e.opts.toolbarBottom),t.offset().top-p(window).scrollTop()+t.outerHeight()+10>=p(window).height()&&(n=!0);var h=n?t.offset().top-e.$tooltip.height():t.offset().top+t.outerHeight();e.$tooltip.css("position",""),e.$tooltip.css("left",d),e.$tooltip.css("top",Math.ceil(h)),"static"!==p(e.o_doc).find("body").first().css("position")?(e.$tooltip.css("margin-left",-p(e.o_doc).find("body").first().offset().left),e.$tooltip.css("margin-top",-p(e.o_doc).find("body").first().offset().top)):(e.$tooltip.css("margin-left",""),e.$tooltip.css("margin-top",""))}}}return{hide:t,to:a,bind:function(n,r,o){e.opts.tooltips&&!e.helpers.isMobile()&&(e.events.$on(n,"mouseover",r,(function(t){e.node.hasClass(t.currentTarget,"fr-disabled")||e.edit.isDisabled()||a(p(t.currentTarget),o)}),!0),e.events.$on(n,"mouseout ".concat(e._mousedown," ").concat(e._mouseup),r,(function(){t()}),!0))}}},r.TOOLBAR_VISIBLE_BUTTONS=3,r.MODULES.button=function(g){var e=g.$,i=[];(g.opts.toolbarInline||g.opts.toolbarContainer)&&(g.shared.buttons||(g.shared.buttons=[]),i=g.shared.buttons);var s=[];function t(t,n,r){for(var o=e(),a=0;a<t.length;a++){var c=e(t[a]);if(c.is(n)&&(o=o.add(c)),r&&c.is(".fr-dropdown")){var i=c.next().find(n);o=o.add(i)}}return o}function n(n,r){var o,c=e();if(!n)return c;for(o in c=(c=c.add(t(i,n,r))).add(t(s,n,r)),g.shared.popups)if(Object.prototype.hasOwnProperty.call(g.shared.popups,o)){var a=g.shared.popups[o].children().find(n);c=c.add(a)}for(o in g.shared.modals)if(Object.prototype.hasOwnProperty.call(g.shared.modals,o)){var l=g.shared.modals[o].$modal.find(n);c=c.add(l)}return c}function o(t){var o=t.next(),c=g.node.hasClass(t.get(0),"fr-active"),l=n(".fr-dropdown.fr-active").not(t),a=t.parents(".fr-toolbar, .fr-popup").data("instance")||g;a.helpers.isIOS()&&!a.el.querySelector(".fr-marker")&&(a.selection.save(),a.selection.clear(),a.selection.restore()),o.parents(".fr-more-toolbar").addClass("fr-overflow-visible");var d=0,i=0,s=o.find("> .fr-dropdown-wrapper");if(!c){var h=t.data("cmd");o.find(".fr-command").removeClass("fr-active").attr("aria-selected",!1),r.COMMANDS[h]&&r.COMMANDS[h].refreshOnShow&&r.COMMANDS[h].refreshOnShow.apply(a,[t,o]),o.css("left",t.offset().left-t.parents(".fr-btn-wrap, .fr-toolbar, .fr-buttons").offset().left-("rtl"===g.opts.direction?o.width()-t.outerWidth():0)),o.addClass("test-height"),d=o.outerHeight(),i=g.helpers.getPX(s.css("max-height")),o.removeClass("test-height"),o.css("top","").css("bottom","");var f=t.outerHeight()/10;if(!g.opts.toolbarBottom&&o.offset().top+t.outerHeight()+d<e(g.o_doc).height())o.css("top",t.position().top+t.outerHeight()-f);else{var m=0,v=t.parents(".fr-more-toolbar");0<v.length&&(m=v.first().height()),o.css("bottom",t.parents(".fr-popup, .fr-toolbar").first().height()-m-t.position().top)}}t.addClass("fr-blink").toggleClass("fr-active"),t.hasClass("fr-options")&&t.prev().toggleClass("fr-expanded"),t.hasClass("fr-active")?(o.attr("aria-hidden",!1),t.attr("aria-expanded",!0),function(e,t,n){n<=t&&(e.parent().css("overflow","auto"),e.parent().css("overflow-x","hidden")),e.css("height",Math.min(t,n))}(s,d,i)):(o.attr("aria-hidden",!0).css("overflow",""),t.attr("aria-expanded",!1),s.css("height","")),setTimeout((function(){t.removeClass("fr-blink")}),300),o.css("margin-left",""),o.offset().left+o.outerWidth()>g.$sc.offset().left+g.$sc.width()&&o.css("margin-left",-(o.offset().left+o.outerWidth()-g.$sc.offset().left-g.$sc.width())),o.offset().left<g.$sc.offset().left&&"rtl"===g.opts.direction&&o.css("margin-left",g.$sc.offset().left),l.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),l.prev(".fr-expanded").removeClass("fr-expanded"),l.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),0!==t.parents(".fr-popup").length||g.opts.toolbarInline||(g.node.hasClass(t.get(0),"fr-active")?g.$tb.css("zIndex",(g.opts.zIndex||1)+4):g.$tb.css("zIndex",""));var p=o.find("a.fr-command.fr-active").first();g.helpers.isMobile()||(p.length?(g.accessibility.focusToolbarElement(p),s.scrollTop(Math.abs(p.parents(".fr-dropdown-content").offset().top-p.offset().top)-p.offset().top)):(g.accessibility.focusToolbarElement(t),s.scrollTop(0)))}function c(e){e.addClass("fr-blink"),setTimeout((function(){e.removeClass("fr-blink")}),500);for(var t=e.data("cmd"),r=[];void 0!==e.data("param".concat(r.length+1));)r.push(e.data("param".concat(r.length+1)));var o=n(".fr-dropdown.fr-active");o.length&&(o.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),o.prev(".fr-expanded").removeClass("fr-expanded"),o.parents(".fr-toolbar:not(.fr-inline)").css("zIndex","")),e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t,r)}function l(e){var t=e.parents(".fr-popup, .fr-toolbar").data("instance"),n=g.popups.get("link.insert");if(0===e.parents(".fr-popup").length&&e.data("popup")&&!e.hasClass("fr-btn-active-popup")&&(e.attr("id")==="insertLink-".concat(g.id)&&n&&n.hasClass("fr-active")||e.addClass("fr-btn-active-popup")),0!==e.parents(".fr-popup").length||e.data("popup")||t.popups.hideAll(),t.popups.areVisible()&&!t.popups.areVisible(t)){for(var l=0;l<r.INSTANCES.length;l++)r.INSTANCES[l]!==t&&r.INSTANCES[l].popups&&r.INSTANCES[l].popups.areVisible()&&r.INSTANCES[l].$el.find(".fr-marker").remove();t.popups.hideAll()}g.node.hasClass(e.get(0),"fr-dropdown")?o(e):(function(e){c(e)}(e),r.COMMANDS[e.data("cmd")]&&!1!==r.COMMANDS[e.data("cmd")].refreshAfterCallback&&t.button.bulkRefresh())}function d(t){l(e(t.currentTarget))}function h(e){var t=e.find(".fr-dropdown.fr-active");t.length&&(t.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),t.prev().removeClass("fr-expanded"))}function p(e){e.preventDefault(),e.stopPropagation()}function u(e){if(e.stopPropagation(),!g.helpers.isMobile())return!1}function f(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if(g.helpers.isMobile()&&!1===t.showOnMobile)return"";var r=t.displaySelection;"function"==typeof r&&(r=r(g));var a="";if("options"!==t.type)if(r){var o="function"==typeof t.defaultSelection?t.defaultSelection(g):t.defaultSelection;a='<span style="width:'.concat(t.displaySelectionWidth||100,'px">').concat(g.language.translate(o||t.title),"</span>")}else a=g.icon.create(t.icon||e),a+='<span class="fr-sr-only">'.concat(g.language.translate(t.title)||"","</span>");var i=t.popup?' data-popup="true"':"",s=t.modal?' data-modal="true"':"",c=g.shortcuts.get("".concat(e,"."));c=c?" (".concat(c,")"):"";var l="".concat(e,"-").concat(g.id),d="dropdown-menu-".concat(l),h='<button id="'.concat(l,'"').concat(t.more_btn?' data-group-name="'.concat(l,'" '):"",'type="button" tabIndex="-1" role="button"').concat(t.toggle?' aria-pressed="false"':"").concat("dropdown"===t.type||"options"===t.type?' aria-controls="'.concat(d,'" aria-expanded="false" aria-haspopup="true"'):"").concat(t.disabled?' aria-disabled="true"':"",' title="').concat(g.language.translate(t.title)||"").concat(c,'" class="fr-command fr-btn').concat("dropdown"===t.type||"options"==t.type?" fr-dropdown":"").concat("options"==t.type?" fr-options":"").concat("more"==t.type?" fr-more":"").concat(t.displaySelection?" fr-selection":"").concat(t.back?" fr-back":"").concat(t.disabled?" fr-disabled":"").concat(n?"":" fr-hidden",'" data-cmd="').concat(e,'"').concat(i).concat(s,">").concat(a,"</button>");if("dropdown"===t.type||"options"===t.type){var p='<div id="'.concat(d,'" class="fr-dropdown-menu" role="listbox" aria-labelledby="').concat(l,'" aria-hidden="true"><div class="fr-dropdown-wrapper" role="presentation"><div class="fr-dropdown-content" role="presentation">');p+=function(e,t){var n="";if(t.html)"function"==typeof t.html?n+=t.html.call(g):n+=t.html;else{var r=t.options;for(var a in"function"==typeof r&&(r=r()),n+='<ul class="fr-dropdown-list" role="presentation">',r)if(Object.prototype.hasOwnProperty.call(r,a)){var o=g.shortcuts.get("".concat(e,".").concat(a));o=o?'<span class="fr-shortcut">'.concat(o,"</span>"):"",n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="'.concat("options"===t.type?e.replace(/Options/g,""):e,'" data-param1="').concat(a,'" title="').concat(r[a],'">').concat(g.language.translate(r[a]),"</a></li>")}n+="</ul>"}return n}(e,t),h+=p+="</div></div></div>"}return t.hasOptions&&t.hasOptions.apply(g)&&(h='<div class="fr-btn-wrap">'.concat(h," ").concat(f(e+"Options",Object.assign({},t,{type:"options",hasOptions:!1}),n),"  </div>")),h}function m(a){var t=g.$tb&&g.$tb.data("instance")||g;if(!1===g.events.trigger("buttons.refresh"))return!0;setTimeout((function(){for(var n=t.selection.inEditor()&&t.core.hasFocus(),o=0;o<a.length;o++){var c=e(a[o]),l=c.data("cmd");0===c.parents(".fr-popup").length?n||r.COMMANDS[l]&&r.COMMANDS[l].forcedRefresh?t.button.refresh(c):g.node.hasClass(c.get(0),"fr-dropdown")||(c.removeClass("fr-active"),c.attr("aria-pressed")&&c.attr("aria-pressed",!1)):c.parents(".fr-popup").isVisible()&&t.button.refresh(c)}}),0)}function v(){m(i),m(s)}function _(){i=[],s=[]}g.shared.popup_buttons||(g.shared.popup_buttons=[]),s=g.shared.popup_buttons;var a=null;function b(){clearTimeout(a),a=setTimeout(v,50)}return{_init:function(){g.opts.toolbarInline?g.events.on("toolbar.show",v):(g.events.on("mouseup",b),g.events.on("keyup",b),g.events.on("blur",b),g.events.on("focus",b),g.events.on("contentChanged",b),g.helpers.isMobile()&&g.events.$on(g.$doc,"selectionchange",v)),g.events.on("shared.destroy",_)},build:f,buildList:function(e,t){for(var n="",o=0;o<e.length;o++){var a=e[o],c=r.COMMANDS[a];c&&void 0!==c.plugin&&g.opts.pluginsEnabled.indexOf(c.plugin)<0||(c?n+=f(a,c,void 0===t||0<=t.indexOf(a)):"|"===a?n+='<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>':"-"===a&&(n+='<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>'))}return n},buildGroup:function(e){var t="",n="";for(var o in e){var a=e[o];if(a.buttons){for(var c="",i="",s=0,l="left",d=r.TOOLBAR_VISIBLE_BUTTONS,h=0;h<a.buttons.length;h++){var m=a.buttons[h],p=r.COMMANDS[m];p||("|"==m?c+='<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>':"-"==m&&(c+='<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>')),!p||p&&void 0!==p.plugin&&g.opts.pluginsEnabled.indexOf(p.plugin)<0||(void 0!==e[o].align&&(l=e[o].align),void 0!==e[o].buttonsVisible&&(d=e[o].buttonsVisible),e.showMoreButtons&&d<=s?i+=f(m,p,!0):c+=f(m,p,!0),s++)}if(e.showMoreButtons&&d<s){var u=o,v=r.COMMANDS[u];v.more_btn=!0,c+=f(u,v,!0)}"trackChanges"!==o&&(t+='<div class="fr-btn-grp fr-float-'.concat(l,'">').concat(c,"</div>")),e.showMoreButtons&&0<i.length&&(n+='<div class="fr-more-toolbar" data-name="'.concat(o+"-"+g.id,'">').concat(i,"</div>"))}}return g.opts.toolbarBottom?g.helpers.isMobile()?'<div class="fr-bottom-extended">'.concat(n,"</div><div>").concat(t,"</div>"):"".concat(n,'<div class="fr-newline"></div>').concat(t):"".concat(t,'<div class="fr-newline"></div>').concat(n)},bindCommands:function(t,n){g.events.bindClick(t,".fr-command:not(.fr-disabled)",d),g.events.$on(t,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu",p,!0),g.events.$on(t,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu .fr-dropdown-wrapper",u,!0);var o=t.get(0).ownerDocument,c="defaultView"in o?o.defaultView:o.parentWindow;function a(n){(!n||n.type===g._mouseup&&n.target!==e("html").get(0)||"keydown"===n.type&&(g.keys.isCharacter(n.which)&&!g.keys.ctrlKey(n)||n.which===r.KEYCODE.ESC))&&(h(t),g.opts.iframe&&function(t){var n=t.find(".fr-popup.fr-active");if(n.length){n.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),n.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),n.prev().removeClass("fr-expanded");var r=g.$tb.find(".fr-btn-active-popup");e(r[0]).removeClass("fr-btn-active-popup")}}(t))}g.events.$on(e(c),"".concat(g._mouseup," resize keydown"),a,!0),g.opts.iframe&&g.events.$on(g.$win,g._mouseup,a,!0),g.node.hasClass(t.get(0),"fr-popup")?e.merge(s,t.find(".fr-btn").toArray()):e.merge(i,t.find(".fr-btn").toArray()),g.tooltip.bind(t,".fr-btn, .fr-title",n)},refresh:function(e){var t,n=e.parents(".fr-popup, .fr-toolbar").data("instance")||g,o=e.data("cmd");g.node.hasClass(e.get(0),"fr-dropdown")?t=e.next():(e.removeClass("fr-active"),e.attr("aria-pressed")&&e.attr("aria-pressed",!1)),r.COMMANDS[o]&&r.COMMANDS[o].refresh?r.COMMANDS[o].refresh.apply(n,[e,t]):g.refresh[o]&&n.refresh[o](e,t)},bulkRefresh:v,exec:c,click:l,hideActiveDropdowns:h,addButtons:function(e){for(var t=0;t<e.length;t++)i.push(e[t])},getButtons:n,getPosition:function(e){var t=e.offset().left,n=g.opts.toolbarBottom?10:e.outerHeight()-10;return{left:t,top:e.offset().top+n}}}},r.ICON_TEMPLATES={font_awesome:'<i class="fa fa-[NAME]" aria-hidden="true"></i>',font_awesome_5:'<i class="fas fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5r:'<i class="far fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5l:'<i class="fal fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5b:'<i class="fab fa-[FA5NAME]" aria-hidden="true"></i>',text:'<span style="text-align: center;">[NAME]</span>',image:"<img src=[SRC] alt=[ALT] />",svg:'<svg class="fr-svg" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="[PATH]"/></svg>',empty:" "},r.ICONS={bold:{NAME:"bold",SVG_KEY:"bold"},italic:{NAME:"italic",SVG_KEY:"italic"},underline:{NAME:"underline",SVG_KEY:"underline"},strikeThrough:{NAME:"strikethrough",SVG_KEY:"strikeThrough"},subscript:{NAME:"subscript",SVG_KEY:"subscript"},superscript:{NAME:"superscript",SVG_KEY:"superscript"},cancel:{NAME:"cancel",SVG_KEY:"cancel"},color:{NAME:"tint",SVG_KEY:"textColor"},outdent:{NAME:"outdent",SVG_KEY:"outdent"},indent:{NAME:"indent",SVG_KEY:"indent"},undo:{NAME:"rotate-left",FA5NAME:"undo",SVG_KEY:"undo"},redo:{NAME:"rotate-right",FA5NAME:"redo",SVG_KEY:"redo"},insert:{NAME:"insert",SVG_KEY:"insert"},insertAll:{NAME:"insertAll",SVG_KEY:"insertAll"},insertHR:{NAME:"minus",SVG_KEY:"horizontalLine"},clearFormatting:{NAME:"eraser",SVG_KEY:"clearFormatting"},selectAll:{NAME:"mouse-pointer",SVG_KEY:"selectAll"},minimize:{NAME:"minimize",SVG_KEY:"minimize"},moreText:{NAME:"ellipsis-v",SVG_KEY:"textMore"},moreParagraph:{NAME:"ellipsis-v",SVG_KEY:"paragraphMore"},moreRich:{NAME:"ellipsis-v",SVG_KEY:"insertMore"},moreMisc:{NAME:"ellipsis-v",SVG_KEY:"more"}},r.DefineIconTemplate=function(e,t){r.ICON_TEMPLATES[e]=t},r.DefineIcon=function(e,t){r.ICONS[e]=t},Object.assign(r.DEFAULTS,{iconsTemplate:"svg"}),r.MODULES.icon=function(a){return{create:function(e){var t=null,n=r.ICONS[e];if(void 0!==n){var o=n.template||r.ICON_DEFAULT_TEMPLATE||a.opts.iconsTemplate;o&&o.apply&&(o=o.apply(a)),n.FA5NAME||(n.FA5NAME=n.NAME),"svg"!==o||n.PATH||(n.PATH=r.SVG[n.SVG_KEY]||""),o&&(o=r.ICON_TEMPLATES[o])&&(t=o.replace(/\[([a-zA-Z0-9]*)\]/g,(function(t,r){return"NAME"===r?n[r]||e:n[r]})))}return t||e},getTemplate:function(e){var t=r.ICONS[e],n=a.opts.iconsTemplate;return void 0!==t?n=t.template||r.ICON_DEFAULT_TEMPLATE||a.opts.iconsTemplate:n},getFileIcon:function(e){var t=r.FILEICONS[e];return void 0!==t?t:e}}},r.SVG={add:"M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z",advancedImageEditor:"M3,17v2h6v-2H3z M3,5v2h10V5H3z M13,21v-2h8v-2h-8v-2h-2v6H13z M7,9v2H3v2h4v2h2V9H7z M21,13v-2H11v2H21z M15,9h2V7h4V5h-4  V3h-2V9z",alignCenter:"M9,18h6v-2H9V18z M6,11v2h12v-2H6z M3,6v2h18V6H3z",alignJustify:"M3,18h18v-2H3V18z M3,11v2h18v-2H3z M3,6v2h18V6H3z",alignLeft:"M3,18h6v-2H3V18z M3,11v2h12v-2H3z M3,6v2h18V6H3z",alignRight:"M15,18h6v-2h-6V18z M9,11v2h12v-2H9z M3,6v2h18V6H3z",anchors:"M16,4h-4H8C6.9,4,6,4.9,6,6v4v10l6-2.6l6,2.6V10V6C18,4.9,17.1,4,16,4z M16,17l-4-1.8L8,17v-7V6h4h4v4V17z",autoplay:"M 7.570312 0.292969 C 7.542969 0.292969 7.515625 0.292969 7.488281 0.296875 C 7.203125 0.324219 6.984375 0.539062 6.980469 0.792969 L 6.925781 3.535156 C 2.796875 3.808594 -0.0078125 6.425781 -0.0859375 10.09375 C -0.121094 11.96875 0.710938 13.6875 2.265625 14.921875 C 3.769531 16.117188 5.839844 16.796875 8.097656 16.828125 C 8.140625 16.828125 12.835938 16.898438 13.035156 16.886719 C 15.171875 16.796875 17.136719 16.128906 18.558594 15.003906 C 20.066406 13.816406 20.882812 12.226562 20.917969 10.40625 C 20.960938 8.410156 20.023438 6.605469 18.289062 5.335938 C 18.214844 5.277344 18.128906 5.230469 18.035156 5.203125 C 17.636719 5.074219 17.222656 5.199219 17 5.476562 L 15.546875 7.308594 C 15.304688 7.609375 15.363281 8.007812 15.664062 8.265625 C 16.351562 8.851562 16.707031 9.625 16.6875 10.5 C 16.652344 12.25 15.070312 13.390625 12.757812 13.535156 C 12.59375 13.539062 8.527344 13.472656 8.164062 13.464844 C 5.703125 13.429688 4.101562 12.191406 4.140625 10.3125 C 4.175781 8.570312 5.132812 7.46875 6.847656 7.199219 L 6.796875 9.738281 C 6.792969 9.992188 7 10.214844 7.285156 10.253906 C 7.3125 10.257812 7.339844 10.257812 7.367188 10.257812 C 7.503906 10.261719 7.632812 10.222656 7.738281 10.148438 L 14.039062 5.785156 C 14.171875 5.691406 14.253906 5.558594 14.253906 5.410156 C 14.257812 5.261719 14.1875 5.125 14.058594 5.027344 L 7.941406 0.414062 C 7.835938 0.335938 7.707031 0.292969 7.570312 0.292969 ",back:"M20 11L7.83 11 11.425 7.405 10.01 5.991 5.416 10.586 5.414 10.584 4 11.998 4.002 12 4 12.002 5.414 13.416 5.416 13.414 10.01 18.009 11.425 16.595 7.83 13 20 13 20 13 20 11 20 11Z",backgroundColor:"M9.91752,12.24082l7.74791-5.39017,1.17942,1.29591-6.094,7.20747L9.91752,12.24082M7.58741,12.652l4.53533,4.98327a.93412.93412,0,0,0,1.39531-.0909L20.96943,8.7314A.90827.90827,0,0,0,20.99075,7.533l-2.513-2.76116a.90827.90827,0,0,0-1.19509-.09132L7.809,11.27135A.93412.93412,0,0,0,7.58741,12.652ZM2.7939,18.52772,8.41126,19.5l1.47913-1.34617-3.02889-3.328Z",blockquote:"M10.31788,5l.93817,1.3226A12.88271,12.88271,0,0,0,8.1653,9.40125a5.54242,5.54242,0,0,0-.998,3.07866v.33733q.36089-.04773.66067-.084a4.75723,4.75723,0,0,1,.56519-.03691,2.87044,2.87044,0,0,1,2.11693.8427,2.8416,2.8416,0,0,1,.8427,2.09274,3.37183,3.37183,0,0,1-.8898,2.453A3.143,3.143,0,0,1,8.10547,19,3.40532,3.40532,0,0,1,5.375,17.7245,4.91156,4.91156,0,0,1,4.30442,14.453,9.3672,9.3672,0,0,1,5.82051,9.32933,14.75716,14.75716,0,0,1,10.31788,5Zm8.39243,0,.9369,1.3226a12.88289,12.88289,0,0,0-3.09075,3.07865,5.54241,5.54241,0,0,0-.998,3.07866v.33733q.33606-.04773.63775-.084a4.91773,4.91773,0,0,1,.58938-.03691,2.8043,2.8043,0,0,1,2.1042.83,2.89952,2.89952,0,0,1,.80578,2.10547,3.42336,3.42336,0,0,1-.86561,2.453A3.06291,3.06291,0,0,1,16.49664,19,3.47924,3.47924,0,0,1,13.742,17.7245,4.846,4.846,0,0,1,12.64721,14.453,9.25867,9.25867,0,0,1,14.17476,9.3898,15.26076,15.26076,0,0,1,18.71031,5Z",bold:"M15.25,11.8h0A3.68,3.68,0,0,0,17,9a3.93,3.93,0,0,0-3.86-4H6.65V19h7a3.74,3.74,0,0,0,3.7-3.78V15.1A3.64,3.64,0,0,0,15.25,11.8ZM8.65,7h4.2a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61,2.23,2.23,0,0,1-.63.09H8.65Zm4.6,10H8.65V13h4.6a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61A2.23,2.23,0,0,1,13.25,17Z",cancel:"M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z",cellBackground:"M16.6,12.4L7.6,3.5L6.2,4.9l2.4,2.4l-5.2,5.2c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4  l5.5-5.5C17.2,14,17.2,13,16.6,12.4z M5.2,13.5L10,8.7l4.8,4.8H5.2z M19,15c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2  C21,17.2,19,15,19,15z",cellBorderColor:"M22,22H2v2h20V22z",cellOptions:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M9.5,6.5h5V9h-5V6.5z M8,17.5H4  c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z   M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4  c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0V9z",cellStyle:"M20,19.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L12.3,17h3.8l1.7-3.5l1.4,3.5H23L20,19.9z M20,5H4C2.9,5,2,5.9,2,7v10  c0,1.1,0.9,2,2,2h7.5l-0.6-0.6L10,17.5H9.5V15h5.4l1.1-2.3v-2.2h4.5v3H20l0.6,1.5H22V7C22,5.9,21.1,5,20,5z M3.5,7  c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0.1,0h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M4,17.5c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0-0.1v-2H8v2.5H4  z M14.5,9h-5V6.5h5V9z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0.1V9z",clearFormatting:"M11.48,10.09l-1.2-1.21L8.8,7.41,6.43,5,5.37,6.1,8.25,9,4.66,19h2l1.43-4h5.14l1.43,4h2l-.89-2.51L18.27,19l1.07-1.06L14.59,13.2ZM8.8,13l.92-2.56L12.27,13Zm.56-7.15L9.66,5h2l1.75,4.9Z",close:"M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z",codeView:"M9.4,16.6,4.8,12,9.4,7.4,8,6,2,12l6,6Zm5.2,0L19.2,12,14.6,7.4,16,6l6,6-6,6Z",cogs:"M18.877 12.907a6.459 6.459 0 0 0 0 -1.814l1.952 -1.526a0.468 0.468 0 0 0 0.111 -0.593l-1.851 -3.2a0.461 0.461 0 0 0 -0.407 -0.231 0.421 0.421 0 0 0 -0.157 0.028l-2.3 0.925a6.755 6.755 0 0 0 -1.563 -0.907l-0.352 -2.452a0.451 0.451 0 0 0 -0.453 -0.388h-3.7a0.451 0.451 0 0 0 -0.454 0.388L9.347 5.588A7.077 7.077 0 0 0 7.783 6.5l-2.3 -0.925a0.508 0.508 0 0 0 -0.166 -0.028 0.457 0.457 0 0 0 -0.4 0.231l-1.851 3.2a0.457 0.457 0 0 0 0.111 0.593l1.952 1.526A7.348 7.348 0 0 0 5.063 12a7.348 7.348 0 0 0 0.064 0.907L3.175 14.433a0.468 0.468 0 0 0 -0.111 0.593l1.851 3.2a0.461 0.461 0 0 0 0.407 0.231 0.421 0.421 0 0 0 0.157 -0.028l2.3 -0.925a6.74 6.74 0 0 0 1.564 0.907L9.7 20.864a0.451 0.451 0 0 0 0.454 0.388h3.7a0.451 0.451 0 0 0 0.453 -0.388l0.352 -2.452a7.093 7.093 0 0 0 1.563 -0.907l2.3 0.925a0.513 0.513 0 0 0 0.167 0.028 0.457 0.457 0 0 0 0.4 -0.231l1.851 -3.2a0.468 0.468 0 0 0 -0.111 -0.593Zm-0.09 2.029l-0.854 1.476 -2.117 -0.852 -0.673 0.508a5.426 5.426 0 0 1 -1.164 0.679l-0.795 0.323 -0.33 2.269h-1.7l-0.32 -2.269 -0.793 -0.322a5.3 5.3 0 0 1 -1.147 -0.662L8.2 15.56l-2.133 0.86 -0.854 -1.475 1.806 -1.411 -0.1 -0.847c-0.028 -0.292 -0.046 -0.5 -0.046 -0.687s0.018 -0.4 0.045 -0.672l0.106 -0.854L5.217 9.064l0.854 -1.475 2.117 0.851 0.673 -0.508a5.426 5.426 0 0 1 1.164 -0.679l0.8 -0.323 0.331 -2.269h1.7l0.321 2.269 0.792 0.322a5.3 5.3 0 0 1 1.148 0.661l0.684 0.526 2.133 -0.859 0.853 1.473 -1.8 1.421 0.1 0.847a5 5 0 0 1 0.046 0.679c0 0.193 -0.018 0.4 -0.045 0.672l-0.106 0.853ZM12 14.544A2.544 2.544 0 1 1 14.546 12 2.552 2.552 0 0 1 12 14.544Z",columns:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4  c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M20.5,17  c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0  V9z",edit:"M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0  c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z",exitFullscreen:"M5,16H8v3h2V14H5ZM8,8H5v2h5V5H8Zm6,11h2V16h3V14H14ZM16,8V5H14v5h5V8Z",fileInsert:"M 8.09375 12.75 L 5.90625 12.75 C 5.542969 12.75 5.25 12.394531 5.25 11.953125 L 5.25 6.375 L 2.851562 6.375 C 2.367188 6.375 2.121094 5.660156 2.464844 5.242188 L 6.625 0.1875 C 6.832031 -0.0585938 7.167969 -0.0585938 7.371094 0.1875 L 11.535156 5.242188 C 11.878906 5.660156 11.632812 6.375 11.148438 6.375 L 8.75 6.375 L 8.75 11.953125 C 8.75 12.394531 8.457031 12.75 8.09375 12.75 Z M 14 12.484375 L 14 16.203125 C 14 16.644531 13.707031 17 13.34375 17 L 0.65625 17 C 0.292969 17 0 16.644531 0 16.203125 L 0 12.484375 C 0 12.042969 0.292969 11.6875 0.65625 11.6875 L 4.375 11.6875 L 4.375 11.953125 C 4.375 12.980469 5.0625 13.8125 5.90625 13.8125 L 8.09375 13.8125 C 8.9375 13.8125 9.625 12.980469 9.625 11.953125 L 9.625 11.6875 L 13.34375 11.6875 C 13.707031 11.6875 14 12.042969 14 12.484375 Z M 10.609375 15.40625 C 10.609375 15.039062 10.363281 14.742188 10.0625 14.742188 C 9.761719 14.742188 9.515625 15.039062 9.515625 15.40625 C 9.515625 15.773438 9.761719 16.070312 10.0625 16.070312 C 10.363281 16.070312 10.609375 15.773438 10.609375 15.40625 Z M 12.359375 15.40625 C 12.359375 15.039062 12.113281 14.742188 11.8125 14.742188 C 11.511719 14.742188 11.265625 15.039062 11.265625 15.40625 C 11.265625 15.773438 11.511719 16.070312 11.8125 16.070312 C 12.113281 16.070312 12.359375 15.773438 12.359375 15.40625 Z M 12.359375 15.40625 ",fileManager:"M 0 5.625 L 20.996094 5.625 L 21 15.75 C 21 16.371094 20.410156 16.875 19.6875 16.875 L 1.3125 16.875 C 0.585938 16.875 0 16.371094 0 15.75 Z M 0 5.625 M 21 4.5 L 0 4.5 L 0 2.25 C 0 1.628906 0.585938 1.125 1.3125 1.125 L 6.921875 1.125 C 7.480469 1.125 8.015625 1.316406 8.40625 1.652344 L 9.800781 2.847656 C 10.195312 3.183594 10.730469 3.375 11.289062 3.375 L 19.6875 3.375 C 20.414062 3.375 21 3.878906 21 4.5 Z M 21 4.5",markdown:"M5.55006 17.75V7.35L8.96006 16.89H10.7101L14.2301 7.37V14.0729C14.3951 14.1551 14.5499 14.265 14.6875 14.4026L14.7001 14.4151V11.64C14.7001 10.8583 15.2127 10.1963 15.9201 9.97171V5H13.6801L10.0401 14.86L6.51006 5H4.00006V17.75H5.55006ZM17.2001 11.64C17.2001 11.2258 16.8643 10.89 16.4501 10.89C16.0359 10.89 15.7001 11.2258 15.7001 11.64V16.8294L13.9804 15.1097C13.6875 14.8168 13.2126 14.8168 12.9197 15.1097C12.6269 15.4026 12.6269 15.8775 12.9197 16.1703L15.9197 19.1703C16.2126 19.4632 16.6875 19.4632 16.9804 19.1703L19.9804 16.1703C20.2733 15.8775 20.2733 15.4026 19.9804 15.1097C19.6875 14.8168 19.2126 14.8168 18.9197 15.1097L17.2001 16.8294V11.64Z",fontAwesome:"M18.99018,13.98212V7.52679c-.08038-1.21875-1.33929-.683-1.33929-.683-2.933,1.39282-4.36274.61938-5.85938.15625a6.23272,6.23272,0,0,0-2.79376-.20062l-.00946.004A1.98777,1.98777,0,0,0,7.62189,5.106a.984.984,0,0,0-.17517-.05432c-.02447-.0055-.04882-.01032-.0736-.0149A.9565.9565,0,0,0,7.1908,5H6.82539a.9565.9565,0,0,0-.18232.0368c-.02472.00458-.04907.0094-.07348.01484a.985.985,0,0,0-.17523.05438,1.98585,1.98585,0,0,0-.573,3.49585v9.394A1.004,1.004,0,0,0,6.82539,19H7.1908a1.00406,1.00406,0,0,0,1.00409-1.00409V15.52234c3.64221-1.09827,5.19709.64282,7.09888.57587a5.57291,5.57291,0,0,0,3.25446-1.05805A1.2458,1.2458,0,0,0,18.99018,13.98212Z",fontFamily:"M16,19h2L13,5H11L6,19H8l1.43-4h5.14Zm-5.86-6L12,7.8,13.86,13Z",fontSize:"M20.75,19h1.5l-3-10h-1.5l-3,10h1.5L17,16.5h3Zm-3.3-4,1.05-3.5L19.55,15Zm-5.7,4h2l-5-14h-2l-5,14h2l1.43-4h5.14ZM5.89,13,7.75,7.8,9.61,13Z",fullscreen:"M7,14H5v5h5V17H7ZM5,10H7V7h3V5H5Zm12,7H14v2h5V14H17ZM14,5V7h3v3h2V5Z",help:"M11,17h2v2h-2V17z M12,5C9.8,5,8,6.8,8,9h2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,2-3,1.7-3,5v1h2v-1c0-2.2,3-2.5,3-5  C16,6.8,14.2,5,12,5z",horizontalLine:"M5,12h14 M19,11H5v2h14V11z",imageAltText:"M19,7h-6v12h-2V7H5V5h6h2h6V7z",imageCaption:"M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z   M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z M22,22H2v2h20V22z",imageClass:"M9.5,13.4l-2.9-2.9h3.8L12.2,7l1.4,3.5h3.8l-3,2.9l0.9,3.6L12,15.1L8.8,17L9.5,13.4z M22,6v12c0,1.1-0.9,2-2,2H4  c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,6H4v12h16V8.8V6z",imageDisplay:"M3,5h18v2H3V5z M13,9h8v2h-8V9z M13,13h8v2h-8V13z M3,17h18v2H3V17z M3,9h8v6H3V9z",imageManager:"M20,6h-7l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V6h6.2l2,2H20V18z   M18,16l-3.8-5H14l-2.9,3.8L9,12.1L6,16H18z M10,9.5C10,8.7,9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11S10,10.3,10,9.5z",imageSize:"M16.9,4c-0.3,0-0.5,0.2-0.8,0.3L3.3,13c-0.9,0.6-1.1,1.9-0.5,2.8l2.2,3.3c0.4,0.7,1.2,1,2,0.8c0.3,0,0.5-0.2,0.8-0.3  L20.7,11c0.9-0.6,1.1-1.9,0.5-2.8l-2.2-3.3C18.5,4.2,17.7,3.9,16.9,4L16.9,4z M16.9,9.9L18.1,9l-2-2.9L17,5.6c0.1,0,0.1-0.1,0.2-0.1  c0.2,0,0.4,0,0.5,0.2L19.9,9c0.2,0.2,0.1,0.5-0.1,0.7L7,18.4c-0.1,0-0.1,0.1-0.2,0.1c-0.2,0-0.4,0-0.5-0.2L4.1,15  c-0.2-0.2-0.1-0.5,0.1-0.7L5,13.7l2,2.9l1.2-0.8l-2-2.9L7.5,12l1.1,1.7l1.2-0.8l-1.1-1.7l1.2-0.8l2,2.9l1.2-0.8l-2-2.9l1.2-0.8  l1.1,1.7l1.2-0.8l-1.1-1.7L14.9,7L16.9,9.9z",indent:"M3,9v6l3-3L3,9z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",inlineClass:"M9.9,13.313A1.2,1.2,0,0,1,9.968,13H6.277l1.86-5.2,1.841,5.148A1.291,1.291,0,0,1,11.212,12h.426l-2.5-7h-2l-5,14h2l1.43-4H9.9Zm2.651,6.727a2.884,2.884,0,0,1-.655-2.018v-2.71A1.309,1.309,0,0,1,13.208,14h3.113a3.039,3.039,0,0,1,2,1.092s1.728,1.818,2.964,2.928a1.383,1.383,0,0,1,.318,1.931,1.44,1.44,0,0,1-.19.215l-3.347,3.31a1.309,1.309,0,0,1-1.832.258h0a1.282,1.282,0,0,1-.258-.257l-1.71-1.728Zm2.48-3.96a.773.773,0,1,0,.008,0Z",inlineStyle:"M11.88,15h.7l.7-1.7-3-8.3h-2l-5,14h2l1.4-4Zm-4.4-2,1.9-5.2,1.9,5.2ZM15.4,21.545l3.246,1.949-.909-3.637L20.72,17H16.954l-1.429-3.506L13.837,17H10.071l2.857,2.857-.779,3.637Z",insert:"M13.889,11.611c-0.17,0.17-0.443,0.17-0.612,0l-3.189-3.187l-3.363,3.36c-0.171,0.171-0.441,0.171-0.612,0c-0.172-0.169-0.172-0.443,0-0.611l3.667-3.669c0.17-0.17,0.445-0.172,0.614,0l3.496,3.493C14.058,11.167,14.061,11.443,13.889,11.611 M18.25,10c0,4.558-3.693,8.25-8.25,8.25c-4.557,0-8.25-3.692-8.25-8.25c0-4.557,3.693-8.25,8.25-8.25C14.557,1.75,18.25,5.443,18.25,10 M17.383,10c0-4.07-3.312-7.382-7.383-7.382S2.618,5.93,2.618,10S5.93,17.381,10,17.381S17.383,14.07,17.383,10",insertEmbed:"M20.73889,15.45929a3.4768,3.4768,0,0,0-5.45965-.28662L9.5661,12.50861a3.49811,3.49811,0,0,0-.00873-1.01331l5.72174-2.66809a3.55783,3.55783,0,1,0-.84527-1.81262L8.70966,9.6839a3.50851,3.50851,0,1,0,.0111,4.63727l5.7132,2.66412a3.49763,3.49763,0,1,0,6.30493-1.526ZM18.00745,5.01056A1.49993,1.49993,0,1,1,16.39551,6.3894,1.49994,1.49994,0,0,1,18.00745,5.01056ZM5.99237,13.49536a1.49989,1.49989,0,1,1,1.61194-1.37878A1.49982,1.49982,0,0,1,5.99237,13.49536Zm11.78211,5.494a1.49993,1.49993,0,1,1,1.61193-1.37885A1.49987,1.49987,0,0,1,17.77448,18.98932Z",insertFile:"M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z",insertImage:"M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z   M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z",insertLink:"M11,17H7A5,5,0,0,1,7,7h4V9H7a3,3,0,0,0,0,6h4ZM17,7H13V9h4a3,3,0,0,1,0,6H13v2h4A5,5,0,0,0,17,7Zm-1,4H8v2h8Z",insertMore:"M16.5,13h-6v6h-2V13h-6V11h6V5h2v6h6Zm5,4.5A1.5,1.5,0,1,1,20,16,1.5,1.5,0,0,1,21.5,17.5Zm0-4A1.5,1.5,0,1,1,20,12,1.5,1.5,0,0,1,21.5,13.5Zm0-4A1.5,1.5,0,1,1,20,8,1.5,1.5,0,0,1,21.5,9.5Z",insertTable:"M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M9.5,13.5v-3  h5v3H9.5z M14.5,15v2.5h-5V15H14.5z M9.5,9V6.5h5V9H9.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M3.5,17  v-2H8v2.5H4C3.7,17.5,3.5,17.3,3.5,17z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M16,9V6.5h4  c0.3,0,0.5,0.2,0.5,0.5v2H16z",insertVideo:"M15,8v8H5V8H15m2,2.5V7a1,1,0,0,0-1-1H4A1,1,0,0,0,3,7V17a1,1,0,0,0,1,1H16a1,1,0,0,0,1-1V13.5l2.29,2.29A1,1,0,0,0,21,15.08V8.91a1,1,0,0,0-1.71-.71Z",upload:"M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z",uploadFiles:"M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z",italic:"M11.76,9h2l-2.2,10h-2Zm1.68-4a1,1,0,1,0,1,1,1,1,0,0,0-1-1Z",search:"M15.5 14h-0.79l-0.28 -0.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09 -0.59 4.23 -1.57l0.27 0.28v0.79l5 4.99L20.49 19l-4.99 -5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z",lineHeight:"M6.25,7h2.5L5.25,3.5,1.75,7h2.5V17H1.75l3.5,3.5L8.75,17H6.25Zm4-2V7h12V5Zm0,14h12V17h-12Zm0-6h12V11h-12Z",linkStyles:"M19,17.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L11.3,15h3.8l1.7-3.5l1.4,3.5H22L19,17.9z M20,12c0,0.3-0.1,0.7-0.2,1h2.1  c0.1-0.3,0.1-0.6,0.1-1c0-2.8-2.2-5-5-5h-4v2h4C18.7,9,20,10.3,20,12z M14.8,11H8v2h3.3h2.5L14.8,11z M9.9,16.4L8.5,15H7  c-1.7,0-3-1.3-3-3s1.3-3,3-3h4V7H7c-2.8,0-5,2.2-5,5s2.2,5,5,5h3.5L9.9,16.4z",mention:"M12.4,5c-4.1,0-7.5,3.4-7.5,7.5S8.3,20,12.4,20h3.8v-1.5h-3.8c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6v1.1  c0,0.6-0.5,1.2-1.1,1.2s-1.1-0.6-1.1-1.2v-1.1c0-2.1-1.7-3.8-3.8-3.8s-3.7,1.7-3.7,3.8s1.7,3.8,3.8,3.8c1,0,2-0.4,2.7-1.1  c0.5,0.7,1.3,1.1,2.2,1.1c1.5,0,2.6-1.2,2.6-2.7v-1.1C19.9,8.4,16.6,5,12.4,5z M12.4,14.7c-1.2,0-2.3-1-2.3-2.2s1-2.3,2.3-2.3  s2.3,1,2.3,2.3S13.6,14.7,12.4,14.7z",minimize:"M5,12h14 M19,11H5v2h14V11z",more:"M13.5,17c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,16.2,13.5,17z M13.5,12c0,0.8-0.7,1.5-1.5,1.5 s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,11.2,13.5,12z M13.5,7c0,0.8-0.7,1.5-1.5,1.5S10.5,7.8,10.5,7s0.7-1.5,1.5-1.5 S13.5,6.2,13.5,7z",openLink:"M17,17H7V7h3V5H7C6,5,5,6,5,7v10c0,1,1,2,2,2h10c1,0,2-1,2-2v-3h-2V17z M14,5v2h1.6l-5.8,5.8l1.4,1.4L17,8.4V10h2V5H14z",orderedList:"M2.5,16h2v.5h-1v1h1V18h-2v1h3V15h-3Zm1-7h1V5h-2V6h1Zm-1,2H4.3L2.5,13.1V14h3V13H3.7l1.8-2.1V10h-3Zm5-5V8h14V6Zm0,12h14V16H7.5Zm0-5h14V11H7.5Z",outdent:"M3,12l3,3V9L3,12z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",pageBreaker:"M3,9v6l3-3L3,9z M21,9H8V4h2v3h9V4h2V9z M21,20h-2v-3h-9v3H8v-5h13V20z M11,13H8v-2h3V13z M16,13h-3v-2h3V13z M21,13h-3v-2  h3V13z",paragraphFormat:"M10.15,5A4.11,4.11,0,0,0,6.08,8.18,4,4,0,0,0,10,13v6h2V7h2V19h2V7h2V5ZM8,9a2,2,0,0,1,2-2v4A2,2,0,0,1,8,9Z",paragraphMore:"M7.682,5a4.11,4.11,0,0,0-4.07,3.18,4,4,0,0,0,3.11,4.725h0l.027.005a3.766,3.766,0,0,0,.82.09v6h2V7h2V19h2V7h2V5ZM5.532,9a2,2,0,0,1,2-2v4A2,2,0,0,1,5.532,9Zm14.94,8.491a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,17.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,13.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,9.491Z",paragraphStyle:"M4,9c0-1.1,0.9-2,2-2v4C4.9,11,4,10.1,4,9z M16.7,20.5l3.2,1.9L19,18.8l3-2.9h-3.7l-1.4-3.5L15.3,16h-3.8l2.9,2.9l-0.9,3.6  L16.7,20.5z M10,17.4V19h1.6L10,17.4z M6.1,5c-1.9,0-3.6,1.3-4,3.2c-0.5,2.1,0.8,4.2,2.9,4.7c0,0,0,0,0,0h0.2C5.5,13,5.8,13,6,13v6  h2V7h2v7h2V7h2V5H6.1z",pdfExport:"M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z M16.3,13.5  c-0.2-0.6-1.1-0.8-2.6-0.8c-0.1,0-0.1,0-0.2,0c-0.3-0.3-0.8-0.9-1-1.2c-0.2-0.2-0.3-0.3-0.4-0.6c0.2-0.7,0.2-1,0.3-1.5  c0.1-0.9,0-1.6-0.2-1.8c-0.4-0.2-0.7-0.2-0.9-0.2c-0.1,0-0.3,0.2-0.7,0.7c-0.2,0.7-0.1,1.8,0.6,2.8c-0.2,0.8-0.7,1.6-1,2.4  c-0.8,0.2-1.5,0.7-1.9,1.1c-0.7,0.7-0.9,1.1-0.7,1.6c0,0.3,0.2,0.6,0.7,0.6c0.3-0.1,0.3-0.2,0.7-0.3c0.6-0.3,1.2-1.7,1.7-2.4  c0.8-0.2,1.7-0.3,2-0.3c0.1,0,0.3,0,0.6,0c0.8,0.8,1.2,1.1,1.8,1.2c0.1,0,0.2,0,0.3,0c0.3,0,0.8-0.1,1-0.6  C16.4,14.1,16.4,13.9,16.3,13.5z M8.3,15.7c-0.1,0.1-0.2,0.1-0.2,0.1c0-0.1,0-0.3,0.6-0.8c0.2-0.2,0.6-0.3,0.9-0.7  C9,15,8.6,15.5,8.3,15.7z M11.3,9c0-0.1,0.1-0.2,0.1-0.2S11.6,9,11.5,10c0,0.1,0,0.3-0.1,0.7C11.3,10.1,11,9.5,11.3,9z M10.9,13.1  c0.2-0.6,0.6-1,0.7-1.5c0.1,0.1,0.1,0.1,0.2,0.2c0.1,0.2,0.3,0.7,0.7,0.9C12.2,12.8,11.6,13,10.9,13.1z M15.2,14.1  c-0.1,0-0.1,0-0.2,0c-0.2,0-0.7-0.2-1-0.7c1.1,0,1.6,0.2,1.6,0.6C15.5,14.1,15.4,14.1,15.2,14.1z",print:"M16.1,17c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1s-0.4,1-1,1C16.5,18,16.1,17.6,16.1,17z M22,15v4c0,1.1-0.9,2-2,2H4  c-1.1,0-2-0.9-2-2v-4c0-1.1,0.9-2,2-2h1V5c0-1.1,0.9-2,2-2h7.4L19,7.6V13h1C21.1,13,22,13.9,22,15z M7,13h10V9h-4V5H7V13z M20,15H4  v4h16V15z",redo:"M13.6,9.4c1.7,0.3,3.2,0.9,4.6,2L21,8.5v7h-7l2.7-2.7C13,10.1,7.9,11,5.3,14.7c-0.2,0.3-0.4,0.5-0.5,0.8L3,14.6  C5.1,10.8,9.3,8.7,13.6,9.4z",removeTable:"M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",insertAll:"M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 ",remove:"M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",replaceImage:"M16,5v3H4v2h12v3l4-4L16,5z M8,19v-3h12v-2H8v-3l-4,4L8,19z",row:"M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M16,6.5h4  c0.3,0,0.5,0.2,0.5,0.5v2H16V6.5z M9.5,6.5h5V9h-5V6.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.5  v-2H8V17.5z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z",selectAll:"M5,7h2V5C5.9,5,5,5.9,5,7z M5,11h2V9H5V11z M9,19h2v-2H9V19z M5,11h2V9H5V11z M15,5h-2v2h2V5z M17,5v2h2C19,5.9,18.1,5,17,5  z M7,19v-2H5C5,18.1,5.9,19,7,19z M5,15h2v-2H5V15z M11,5H9v2h2V5z M13,19h2v-2h-2V19z M17,11h2V9h-2V11z M17,19c1.1,0,2-0.9,2-2h-2  V19z M17,11h2V9h-2V11z M17,15h2v-2h-2V15z M13,19h2v-2h-2V19z M13,7h2V5h-2V7z M9,15h6V9H9V15z M11,11h2v2h-2V11z",smile:"M11.991,3A9,9,0,1,0,21,12,8.99557,8.99557,0,0,0,11.991,3ZM12,19a7,7,0,1,1,7-7A6.99808,6.99808,0,0,1,12,19Zm3.105-5.2h1.503a4.94542,4.94542,0,0,1-9.216,0H8.895a3.57808,3.57808,0,0,0,6.21,0ZM7.5,9.75A1.35,1.35,0,1,1,8.85,11.1,1.35,1.35,0,0,1,7.5,9.75Zm6.3,0a1.35,1.35,0,1,1,1.35,1.35A1.35,1.35,0,0,1,13.8,9.75Z",spellcheck:"M19.1,13.6l-5.6,5.6l-2.7-2.7l-1.4,1.4l4.1,4.1l7-7L19.1,13.6z M10.8,13.7l2.7,2.7l0.8-0.8L10.5,5h-2l-5,14h2l1.4-4h2.6  L10.8,13.7z M9.5,7.8l1.9,5.2H7.6L9.5,7.8z",star:"M12.1,7.7l1,2.5l0.4,0.9h1h2.4l-2.1,2l-0.6,0.6l0.2,0.9l0.6,2.3l-2.2-1.3L12,15.2l-0.8,0.5L9,17l0.5-2.5l0.1-0.8L9,13.1  l-2-2h2.5h0.9l0.4-0.8L12.1,7.7 M12.2,4L9.5,9.6H3.4L8,14.2L6.9,20l5.1-3.1l5.3,3.1l-1.5-5.8l4.8-4.6h-6.1L12.2,4L12.2,4z",strikeThrough:"M3,12.20294H21v1.5H16.63422a3.59782,3.59782,0,0,1,.34942,1.5929,3.252,3.252,0,0,1-1.31427,2.6997A5.55082,5.55082,0,0,1,12.20251,19a6.4421,6.4421,0,0,1-2.62335-.539,4.46335,4.46335,0,0,1-1.89264-1.48816,3.668,3.668,0,0,1-.67016-2.15546V14.704h.28723v-.0011h.34149v.0011H9.02v.11334a2.18275,2.18275,0,0,0,.85413,1.83069,3.69,3.69,0,0,0,2.32836.67926,3.38778,3.38778,0,0,0,2.07666-.5462,1.73346,1.73346,0,0,0,.7013-1.46655,1.69749,1.69749,0,0,0-.647-1.43439,3.00525,3.00525,0,0,0-.27491-.17725H3ZM16.34473,7.05981A4.18163,4.18163,0,0,0,14.6236,5.5462,5.627,5.627,0,0,0,12.11072,5,5.16083,5.16083,0,0,0,8.74719,6.06213,3.36315,3.36315,0,0,0,7.44006,8.76855a3.22923,3.22923,0,0,0,.3216,1.42786h2.59668c-.08338-.05365-.18537-.10577-.25269-.16064a1.60652,1.60652,0,0,1-.65283-1.30036,1.79843,1.79843,0,0,1,.68842-1.5108,3.12971,3.12971,0,0,1,1.96948-.55243,3.04779,3.04779,0,0,1,2.106.6687,2.35066,2.35066,0,0,1,.736,1.83258v.11341h2.00317V9.17346A3.90013,3.90013,0,0,0,16.34473,7.05981Z",subscript:"M10.4,12l3.6,3.6L12.6,17L9,13.4L5.4,17L4,15.6L7.6,12L4,8.4L5.4,7L9,10.6L12.6,7L14,8.4L10.4,12z M18.31234,19.674  l1.06812-1.1465c0.196-0.20141,0.37093-0.40739,0.5368-0.6088c0.15975-0.19418,0.30419-0.40046,0.432-0.617  c0.11969-0.20017,0.21776-0.41249,0.29255-0.6334c0.07103-0.21492,0.10703-0.43986,0.10662-0.66621  c0.00297-0.28137-0.04904-0.56062-0.1531-0.82206c-0.09855-0.24575-0.25264-0.46534-0.45022-0.6416  c-0.20984-0.18355-0.45523-0.32191-0.72089-0.40646c-0.63808-0.19005-1.3198-0.17443-1.94851,0.04465  c-0.28703,0.10845-0.54746,0.2772-0.76372,0.49487c-0.20881,0.20858-0.37069,0.45932-0.47483,0.73548  c-0.10002,0.26648-0.15276,0.54838-0.15585,0.833l-0.00364,0.237H17.617l0.00638-0.22692  c0.00158-0.12667,0.01966-0.25258,0.05377-0.37458c0.03337-0.10708,0.08655-0.20693,0.15679-0.29437  c0.07105-0.08037,0.15959-0.14335,0.25882-0.1841c0.22459-0.08899,0.47371-0.09417,0.7018-0.01458  c0.0822,0.03608,0.15559,0.08957,0.21509,0.15679c0.06076,0.07174,0.10745,0.15429,0.13761,0.24333  c0.03567,0.10824,0.05412,0.22141,0.05469,0.33538c-0.00111,0.08959-0.0118,0.17881-0.0319,0.26612  c-0.02913,0.10428-0.07076,0.20465-0.124,0.29893c-0.07733,0.13621-0.1654,0.26603-0.26338,0.38823  c-0.13438,0.17465-0.27767,0.34226-0.42929,0.50217l-2.15634,2.35315V21H21v-1.326H18.31234z",superscript:"M10.4,12,14,15.6,12.6,17,9,13.4,5.4,17,4,15.6,7.6,12,4,8.4,5.4,7,9,10.6,12.6,7,14,8.4Zm8.91234-3.326,1.06812-1.1465c.196-.20141.37093-.40739.5368-.6088a4.85745,4.85745,0,0,0,.432-.617,3.29,3.29,0,0,0,.29255-.6334,2.11079,2.11079,0,0,0,.10662-.66621,2.16127,2.16127,0,0,0-.1531-.82206,1.7154,1.7154,0,0,0-.45022-.6416,2.03,2.03,0,0,0-.72089-.40646,3.17085,3.17085,0,0,0-1.94851.04465,2.14555,2.14555,0,0,0-.76372.49487,2.07379,2.07379,0,0,0-.47483.73548,2.446,2.446,0,0,0-.15585.833l-.00364.237H18.617L18.62338,5.25a1.45865,1.45865,0,0,1,.05377-.37458.89552.89552,0,0,1,.15679-.29437.70083.70083,0,0,1,.25882-.1841,1.00569,1.00569,0,0,1,.7018-.01458.62014.62014,0,0,1,.21509.15679.74752.74752,0,0,1,.13761.24333,1.08893,1.08893,0,0,1,.05469.33538,1.25556,1.25556,0,0,1-.0319.26612,1.34227,1.34227,0,0,1-.124.29893,2.94367,2.94367,0,0,1-.26338.38823,6.41629,6.41629,0,0,1-.42929.50217L17.19709,8.92642V10H22V8.674Z",symbols:"M15.77493,16.98885a8.21343,8.21343,0,0,0,1.96753-2.57651,7.34824,7.34824,0,0,0,.6034-3.07618A6.09092,6.09092,0,0,0,11.99515,5a6.13347,6.13347,0,0,0-4.585,1.79187,6.417,6.417,0,0,0-1.756,4.69207,6.93955,6.93955,0,0,0,.622,2.97415,8.06587,8.06587,0,0,0,1.949,2.53076H5.41452V19h5.54114v-.04331h-.00147V16.84107a5.82825,5.82825,0,0,1-2.2052-2.2352A6.40513,6.40513,0,0,1,7.97672,11.447,4.68548,4.68548,0,0,1,9.07785,8.19191a3.73232,3.73232,0,0,1,2.9173-1.22462,3.76839,3.76839,0,0,1,2.91241,1.21489,4.482,4.482,0,0,1,1.11572,3.154,6.71141,6.71141,0,0,1-.75384,3.24732,5.83562,5.83562,0,0,1-2.22357,2.25759v2.11562H13.0444V19h5.54108V16.98885Z",tags:"M8.9749 7.47489a1.5 1.5 0 1 1 -1.5 1.5A1.5 1.5 0 0 1 8.9749 7.47489Zm3.78866 -3.12713L16.5362 8.12041l0.33565 0.33564 2.77038 2.77038a2.01988 2.01988 0 0 1 0.59 1.42 1.95518 1.95518 0 0 1 -0.5854 1.40455l0.00044 0.00043 -5.59583 5.59583 -0.00043 -0.00044a1.95518 1.95518 0 0 1 -1.40455 0.5854 1.98762 1.98762 0 0 1 -1.41 -0.58L8.45605 16.87185l-0.33564 -0.33565L4.35777 12.77357a1.99576 1.99576 0 0 1 -0.59 -1.42V9.36358l0 -3.59582a2.00579 2.00579 0 0 1 2 -2l3.59582 0h1.98995A1.98762 1.98762 0 0 1 12.76356 4.34776ZM15.46186 9.866l-0.33564 -0.33564L11.36359 5.76776H5.76776v5.59583L9.866 15.46186l2.7794 2.7794 5.5878 -5.60385 -0.001 -0.001Z",tableHeader:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4  l0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M14.5,17.5h-5V15h5V17.5z M14.5,13.5h-5v-3h5V13.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5l0,0  H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9h-4.4H16h-1.5h-5H8H7.9H3.5V7c0-0.3,0.2-0.5,0.4-0.5l0,0h4l0,0h8.2l0,0H20  c0.3,0,0.5,0.2,0.5,0.4l0,0V9z",tableStyle:"M20.0171,19.89752l.9,3.6-3.2-1.9-3.3,1.9.8-3.6-2.9-2.9h3.8l1.7-3.5,1.4,3.5h3.8ZM20,5H4A2.00591,2.00591,0,0,0,2,7V17a2.00591,2.00591,0,0,0,2,2h7.49115l-.58826-.58826L9.99115,17.5H9.5V14.9975h5.36511L16,12.66089V10.5h4.5v3h-.52783l.599,1.4975H22V7A2.00591,2.00591,0,0,0,20,5ZM3.5,7A.4724.4724,0,0,1,4,6.5H8V9H3.5Zm0,3.5H8v3H3.5Zm.5,7a.4724.4724,0,0,1-.5-.5V15H8v2.5Zm10.5-4h-5v-3h5Zm0-4.5h-5V6.5h5Zm6,0H16V6.5h4a.4724.4724,0,0,1,.5.5Z",textColor:"M15.2,13.494s-3.6,3.9-3.6,6.3a3.65,3.65,0,0,0,7.3.1v-.1C18.9,17.394,15.2,13.494,15.2,13.494Zm-1.47-1.357.669-.724L12.1,5h-2l-5,14h2l1.43-4h2.943A24.426,24.426,0,0,1,13.726,12.137ZM11.1,7.8l1.86,5.2H9.244Z",textMore:"M13.55,19h2l-5-14h-2l-5,14h2l1.4-4h5.1Zm-5.9-6,1.9-5.2,1.9,5.2Zm12.8,4.5a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,17.5Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,13.5Zm0-4A1.5,1.5,0,1,1,18.95,8,1.5,1.5,0,0,1,20.45,9.5Z",underline:"M19,20v2H5V20Zm-3-6.785a4,4,0,0,1-5.74,3.4A3.75,3.75,0,0,1,8,13.085V5.005H6v8.21a6,6,0,0,0,8,5.44,5.851,5.851,0,0,0,4-5.65v-8H16ZM16,5v0h2V5ZM8,5H6v0H8Z",undo:"M10.4,9.4c-1.7,0.3-3.2,0.9-4.6,2L3,8.5v7h7l-2.7-2.7c3.7-2.6,8.8-1.8,11.5,1.9c0.2,0.3,0.4,0.5,0.5,0.8l1.8-0.9  C18.9,10.8,14.7,8.7,10.4,9.4z",unlink:"M14.4,11l1.6,1.6V11H14.4z M17,7h-4v1.9h4c1.7,0,3.1,1.4,3.1,3.1c0,1.3-0.8,2.4-1.9,2.8l1.4,1.4C21,15.4,22,13.8,22,12  C22,9.2,19.8,7,17,7z M2,4.3l3.1,3.1C3.3,8.1,2,9.9,2,12c0,2.8,2.2,5,5,5h4v-1.9H7c-1.7,0-3.1-1.4-3.1-3.1c0-1.6,1.2-2.9,2.8-3.1  L8.7,11H8v2h2.7l2.3,2.3V17h1.7l4,4l1.4-1.4L3.4,2.9L2,4.3z",unorderedList:"M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,5.5C3.2,5.5,2.5,6.2,2.5,7  S3.2,8.5,4,8.5S5.5,7.8,5.5,7S4.8,5.5,4,5.5z M4,15.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,15.5,4,15.5z   M7.5,6v2h14V6H7.5z M7.5,18h14v-2h-14V18z M7.5,13h14v-2h-14V13z",verticalAlignBottom:"M16,13h-3V3h-2v10H8l4,4L16,13z M3,19v2h18v-2H3z",verticalAlignMiddle:"M3,11v2h18v-2H3z M8,18h3v3h2v-3h3l-4-4L8,18z M16,6h-3V3h-2v3H8l4,4L16,6z",verticalAlignTop:"M8,11h3v10h2V11h3l-4-4L8,11z M21,5V3H3v2H21z",trackChanges:"M17.2 20H12.4599L13.9938 19.2076L14.0305 19.1886L14.0616 19.1612C14.1036 19.1242 14.1373 19.0786 14.1603 19.0275C14.1806 18.9825 14.1923 18.9342 14.1948 18.885H14.2H14.3384L14.4364 18.7874L14.7049 18.52H15.45C15.5747 18.52 15.6942 18.4705 15.7823 18.3823C15.8705 18.2942 15.92 18.1746 15.92 18.05C15.92 17.9253 15.8705 17.8058 15.7823 17.7176C15.7351 17.6704 15.6789 17.6343 15.6177 17.6109L17.33 15.9056V19.87C17.33 19.8871 17.3266 19.904 17.3201 19.9197C17.3136 19.9355 17.304 19.9499 17.2919 19.9619C17.2799 19.974 17.2655 19.9836 17.2497 19.9901C17.234 19.9966 17.2171 20 17.2 20ZM4.13 20H11.2508C11.2396 19.9629 11.2337 19.9242 11.2337 19.885C11.2337 19.8133 11.2533 19.7431 11.29 19.6819L11.2739 19.6734L11.8838 18.52H5C4.87535 18.52 4.7558 18.4705 4.66766 18.3823C4.57952 18.2942 4.53 18.1746 4.53 18.05C4.53 17.9253 4.57952 17.8058 4.66766 17.7176C4.7558 17.6295 4.87535 17.58 5 17.58H12.3809L12.3925 17.5582L12.4187 17.5284C12.4558 17.4864 12.5014 17.4527 12.5525 17.4297C12.5836 17.4156 12.6163 17.4057 12.6498 17.4001C12.6522 17.3065 12.6877 17.2166 12.7503 17.1467L13 17.37C12.9902 17.381 12.9847 17.3952 12.9847 17.41C12.9847 17.4247 12.9902 17.439 13 17.45L14.13 18.55H14.2L19.09 13.68V13.6L17.99 12.5C17.979 12.4902 17.9647 12.4847 17.95 12.4847C17.9352 12.4847 17.921 12.4902 17.91 12.5L13 17.37L12.7641 17.1322L15.1759 14.74H5C4.87535 14.74 4.7558 14.6905 4.66766 14.6023C4.57952 14.5142 4.53 14.3946 4.53 14.27C4.53 14.1453 4.57952 14.0258 4.66766 13.9376C4.7558 13.8495 4.87535 13.8 5 13.8H15.45C15.5747 13.8 15.6942 13.8495 15.7823 13.9376C15.8169 13.9722 15.8454 14.0115 15.8675 14.0541L17.33 12.6034V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20ZM11.7889 20H11.8785C11.8902 19.9746 11.898 19.9475 11.9015 19.9197L11.8661 19.9866L11.8117 19.9578L13.84 18.91C13.8464 18.9044 13.8515 18.8974 13.855 18.8897C13.8585 18.8819 13.8603 18.8735 13.8603 18.865C13.8603 18.8565 13.8585 18.8481 13.855 18.8403C13.8515 18.8325 13.8464 18.8256 13.84 18.82L12.76 17.75C12.7544 17.7436 12.7474 17.7385 12.7397 17.735C12.7319 17.7315 12.7235 17.7297 12.715 17.7297C12.7065 17.7297 12.6981 17.7315 12.6903 17.735C12.6825 17.7385 12.6756 17.7436 12.67 17.75L11.57 19.83L11.5023 19.7942L11.58 19.85C11.5727 19.8602 11.5687 19.8724 11.5687 19.885C11.5687 19.8975 11.5727 19.9098 11.58 19.92L11.67 20H11.73L11.7642 19.9823L11.7889 20ZM13.1 4.65L16.6 8.15C16.6212 8.17232 16.6355 8.20028 16.6412 8.23051C16.6469 8.26075 16.6437 8.29199 16.6321 8.32048C16.6205 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5207 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8312 4.72925 12.8412 4.6995 12.8588 4.67429C12.8765 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9893 4.60315 13.0195 4.60884C13.0497 4.61453 13.0777 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60183 10.9735 6.54621C10.9534 6.49058 10.9224 6.43948 10.8825 6.39582C10.8425 6.35216 10.7944 6.31681 10.7408 6.29179C10.6871 6.26677 10.6291 6.25257 10.57 6.25H5C4.88239 6.25773 4.77251 6.3113 4.69397 6.39918C4.61543 6.48707 4.57451 6.60226 4.58 6.72C4.57451 6.83774 4.61543 6.95293 4.69397 7.04082C4.77251 7.12871 4.88239 7.18227 5 7.19H10.6C10.714 7.1774 10.8189 7.12173 10.8933 7.03438C10.9676 6.94702 11.0058 6.83457 11 6.72ZM11.1 8.14001H5C4.87535 8.14001 4.7558 8.18953 4.66766 8.27767C4.57952 8.36582 4.53 8.48536 4.53 8.61001C4.53 8.73467 4.57952 8.85421 4.66766 8.94236C4.7558 9.0305 4.87535 9.08001 5 9.08001H11.1C11.2247 9.08001 11.3442 9.0305 11.4323 8.94236C11.5205 8.85421 11.57 8.73467 11.57 8.61001C11.57 8.48536 11.5205 8.36582 11.4323 8.27767C11.3442 8.18953 11.2247 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8036 10.8536C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8036 10.1464C15.7098 10.0527 15.5826 10 15.45 10H5C4.86739 10 4.74021 10.0527 4.64645 10.1464C4.55268 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55268 10.7598 4.64645 10.8536C4.74021 10.9473 4.86739 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4986 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.4159 12.0552C11.3337 11.9673 11.2202 11.9152 11.1 11.91H5C4.94089 11.9126 4.88286 11.9268 4.82924 11.9518C4.77562 11.9768 4.72746 12.0122 4.68752 12.0558C4.64758 12.0995 4.61664 12.1506 4.59648 12.2062C4.57631 12.2618 4.56731 12.3209 4.57 12.38C4.56451 12.5004 4.60649 12.6181 4.6869 12.7079C4.76731 12.7976 4.87974 12.8523 5 12.86ZM11.1 16.63H5C4.87535 16.63 4.7558 16.5805 4.66766 16.4923C4.57952 16.4042 4.53 16.2846 4.53 16.16C4.53 16.0353 4.57952 15.9158 4.66766 15.8276C4.7558 15.7395 4.87535 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4323 15.8276C11.5205 15.9158 11.57 16.0353 11.57 16.16C11.57 16.2846 11.5205 16.4042 11.4323 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM18.8503 11.592C18.7991 11.6175 18.7545 11.6544 18.72 11.7L18.26 12.14C18.2501 12.151 18.2447 12.1652 18.2447 12.18C18.2447 12.1947 18.2501 12.209 18.26 12.22L19.37 13.32C19.381 13.3298 19.3952 13.3353 19.41 13.3353C19.4247 13.3353 19.439 13.3298 19.45 13.32L19.86 12.91C19.9057 12.867 19.9421 12.8151 19.967 12.7575C19.9919 12.6998 20.0047 12.6377 20.0047 12.575C20.0047 12.5122 19.9919 12.4501 19.967 12.3925C19.9421 12.3349 19.9057 12.283 19.86 12.24L19.31 11.7C19.2755 11.6544 19.2309 11.6175 19.1797 11.592C19.1285 11.5666 19.0721 11.5533 19.015 11.5533C18.9578 11.5533 18.9014 11.5666 18.8503 11.592Z",showTrackChanges:"M17.2421 13.6048C17.2631 13.6136 17.2841 13.6226 17.305 13.6317V9.29505H13.2626C13.1897 9.30481 13.1159 9.30481 13.043 9.29505C12.7532 9.21632 12.4953 9.04872 12.3056 8.81577C12.1158 8.58283 12.0037 8.29625 11.985 7.99627V4H4.12976C4.09534 4 4.06234 4.01368 4.038 4.03804C4.01367 4.0624 4 4.09543 4 4.12988V19.8552C4 19.8896 4.01367 19.9227 4.038 19.947C4.06234 19.9714 4.09534 19.9851 4.12976 19.9851H13.4875C13.0501 19.8216 12.6281 19.6155 12.2277 19.3686C11.8529 19.1551 11.4911 18.9196 11.1442 18.6632C11.0697 18.6152 10.9982 18.5628 10.9302 18.5065H4.99812C4.87371 18.5065 4.75438 18.457 4.66641 18.3689C4.57843 18.2809 4.529 18.1614 4.529 18.0369C4.529 17.9124 4.57843 17.7929 4.66641 17.7049C4.75438 17.6168 4.87371 17.5673 4.99812 17.5673H10.4396C10.4472 17.4488 10.4756 17.3324 10.5235 17.2235C10.5939 17.017 10.6761 16.8149 10.7694 16.6182H4.99812C4.87371 16.6182 4.75438 16.5687 4.66641 16.4807C4.57843 16.3926 4.529 16.2732 4.529 16.1487C4.529 16.0241 4.57843 15.9047 4.66641 15.8166C4.75438 15.7286 4.87371 15.6791 4.99812 15.6791H11.0867C11.1576 15.6791 11.2268 15.6952 11.2895 15.7253C11.5204 15.361 11.7938 15.027 12.1033 14.73H4.99812C4.87371 14.73 4.75438 14.6805 4.66641 14.5924C4.57843 14.5044 4.529 14.385 4.529 14.2604C4.529 14.1359 4.57843 14.0164 4.66641 13.9284C4.75438 13.8403 4.87371 13.7909 4.99812 13.7909H13.4434C13.9833 13.525 14.5656 13.3516 15.166 13.2795L15.1923 13.2763H15.2189H15.4925C16.0923 13.2609 16.6886 13.3728 17.2421 13.6048ZM13.0829 4.64939L16.5764 8.14613C16.5975 8.16843 16.6118 8.19636 16.6174 8.22657C16.6231 8.25677 16.62 8.28798 16.6084 8.31645C16.5968 8.34492 16.5773 8.36944 16.5521 8.38707C16.527 8.40471 16.4973 8.41471 16.4666 8.41587H13.043L12.8134 8.18609V4.75929C12.8146 4.72857 12.8246 4.69884 12.8422 4.67366C12.8598 4.64849 12.8843 4.62893 12.9128 4.61733C12.9412 4.60573 12.9724 4.60259 13.0026 4.60827C13.0328 4.61396 13.0607 4.62824 13.0829 4.64939ZM10.9869 6.71746C10.9896 6.65841 10.9806 6.59941 10.9604 6.54383C10.9403 6.48825 10.9094 6.4372 10.8696 6.39358C10.8297 6.34997 10.7816 6.31465 10.7281 6.28965C10.6746 6.26466 10.6167 6.25047 10.5577 6.2479H4.99813C4.88074 6.25562 4.77106 6.30914 4.69267 6.39694C4.61428 6.48475 4.57343 6.59983 4.57891 6.71746C4.57343 6.83509 4.61428 6.95017 4.69267 7.03798C4.77106 7.12579 4.88074 7.1793 4.99813 7.18702H10.5876C10.7014 7.17444 10.8061 7.11882 10.8803 7.03154C10.9545 6.94427 10.9927 6.83192 10.9869 6.71746ZM11.0867 8.13614H4.99812C4.87371 8.13614 4.75438 8.18561 4.66641 8.27367C4.57843 8.36173 4.529 8.48116 4.529 8.6057C4.529 8.73023 4.57843 8.84967 4.66641 8.93773C4.75438 9.02579 4.87371 9.07526 4.99812 9.07526H11.0867C11.2111 9.07526 11.3304 9.02579 11.4184 8.93773C11.5064 8.84967 11.5558 8.73023 11.5558 8.6057C11.5558 8.48116 11.5064 8.36173 11.4184 8.27367C11.3304 8.18561 11.2111 8.13614 11.0867 8.13614ZM4.99812 10.9935H15.4285C15.5609 10.9935 15.6878 10.9408 15.7814 10.8472C15.875 10.7535 15.9276 10.6264 15.9276 10.4939C15.9276 10.3614 15.875 10.2344 15.7814 10.1407C15.6878 10.047 15.5609 9.9944 15.4285 9.9944H4.99812C4.86576 9.9944 4.73883 10.047 4.64523 10.1407C4.55164 10.2344 4.49906 10.3614 4.49906 10.4939C4.49906 10.6264 4.55164 10.7535 4.64523 10.8472C4.73883 10.9408 4.86576 10.9935 4.99812 10.9935ZM4.99812 12.8517H11.0867C11.2076 12.844 11.3208 12.7898 11.4027 12.7004C11.4845 12.611 11.5287 12.4934 11.5259 12.3722C11.5286 12.252 11.4841 12.1355 11.402 12.0477C11.3199 11.9599 11.2067 11.9078 11.0867 11.9026H4.99812C4.93912 11.9052 4.8812 11.9194 4.82769 11.9444C4.77417 11.9694 4.7261 12.0047 4.68623 12.0483C4.64637 12.0919 4.61549 12.143 4.59536 12.1985C4.57523 12.2541 4.56625 12.3131 4.56893 12.3722C4.56345 12.4925 4.60535 12.6101 4.68561 12.6998C4.76587 12.7894 4.87809 12.844 4.99812 12.8517ZM19.97 17.4974C19.5787 16.5636 19.0431 15.6971 18.383 14.9298C18.0152 14.5351 17.5679 14.2233 17.0706 14.0148C16.5732 13.8064 16.0373 13.7062 15.4984 13.7209H15.2189C14.4787 13.8098 13.7684 14.0666 13.1423 14.4717C12.5162 14.8769 11.9906 15.4196 11.6057 16.0587C11.3211 16.4677 11.0959 16.9151 10.937 17.3875C10.9006 17.464 10.8817 17.5476 10.8817 17.6323C10.8817 17.717 10.9006 17.8006 10.937 17.877C11.0642 18.0428 11.2196 18.1849 11.3961 18.2967C11.7346 18.5476 12.0879 18.7778 12.4541 18.986C13.4096 19.5767 14.497 19.92 15.6182 19.9851C16.4392 20.0504 17.2632 19.9005 18.0088 19.5501C18.7544 19.1998 19.3959 18.661 19.8702 17.9869C19.9311 17.923 19.9729 17.8432 19.9905 17.7566C20.0082 17.67 20.0011 17.5801 19.97 17.4974ZM15.9775 19.1758C14.3849 19.068 12.8507 18.5331 11.5358 17.6273C11.5788 17.5678 11.6255 17.5111 11.6756 17.4574C12.3061 16.569 13.1295 15.8359 14.0832 15.3126C13.8003 15.7406 13.6785 16.2566 13.7417 16.7681C13.7676 17.0339 13.8465 17.2918 13.9737 17.5265C14.1009 17.7613 14.2739 17.9681 14.4823 18.1348C14.6907 18.3016 14.9304 18.4248 15.1872 18.4972C15.4441 18.5696 15.7128 18.5897 15.9775 18.5564C16.305 18.4971 16.6137 18.3609 16.8785 18.159C17.1432 17.9572 17.3564 17.6954 17.5005 17.3951C17.6446 17.0949 17.7156 16.7647 17.7077 16.4317C17.6997 16.0987 17.613 15.7723 17.4547 15.4793C17.2614 15.3391 17.0533 15.2235 16.8351 15.1339C17.0715 15.226 17.2966 15.3485 17.5046 15.4993C18.0049 15.8976 18.4424 16.3691 18.8022 16.898L18.8927 17.0137L18.8927 17.0137C19.0823 17.2564 19.2729 17.5004 19.4709 17.7072C18.5404 18.6311 17.288 19.1576 15.9775 19.1758ZM16.3168 15.769C16.2085 15.8106 16.1171 15.8873 16.0574 15.9869C15.9977 16.0865 15.9731 16.2032 15.9875 16.3185C15.9949 16.3856 16.0156 16.4505 16.0483 16.5096C16.081 16.5686 16.1251 16.6206 16.178 16.6624C16.2309 16.7042 16.2916 16.7351 16.3566 16.7532C16.4216 16.7714 16.4895 16.7764 16.5564 16.7681H16.6063C16.5618 16.9495 16.4637 17.1132 16.3248 17.238C16.186 17.3627 16.0127 17.4427 15.8278 17.4674H15.6481C15.4335 17.4396 15.2337 17.3427 15.0789 17.1913C14.924 17.04 14.8226 16.8423 14.7897 16.6282C14.7628 16.3782 14.8311 16.1271 14.981 15.9253C15.1305 15.7238 15.3504 15.5861 15.5968 15.5395C15.3446 15.5862 15.12 15.7284 14.9697 15.9364C14.8191 16.1448 14.7547 16.4034 14.7897 16.6582C14.8226 16.8723 14.924 17.0699 15.0789 17.2213C15.2337 17.3727 15.4335 17.4696 15.6481 17.4974H15.8377C16.0209 17.4708 16.1919 17.39 16.3289 17.2654C16.4658 17.1408 16.5625 16.978 16.6063 16.7981C16.7293 16.7633 16.8359 16.686 16.9072 16.5799C16.9785 16.4737 17.0098 16.3457 16.9956 16.2186C16.9882 16.1515 16.9675 16.0865 16.9348 16.0275C16.9021 15.9685 16.858 15.9165 16.805 15.8747C16.7521 15.8329 16.6914 15.802 16.6264 15.7838C16.5615 15.7657 16.4936 15.7607 16.4266 15.769H16.3168Z",acceptAllChanges:"M9.36499 16.7348C9.38499 16.7547 9.41212 16.7659 9.44041 16.7659H10.9881C10.9028 16.6008 10.9289 16.3933 11.0663 16.2541L11.7266 15.585H10.1444C10.0549 15.5701 9.97363 15.5238 9.91498 15.4547C9.85639 15.3856 9.82422 15.298 9.82422 15.2074C9.82422 15.1169 9.85639 15.0292 9.91498 14.9601C9.97363 14.891 10.0549 14.8448 10.1444 14.8298H12.4879C12.5584 14.785 12.6407 14.7607 12.7257 14.7607C12.8106 14.7607 12.893 14.785 12.9635 14.8298H16.5295L18.3303 13.0091C18.4135 12.925 18.5271 12.8776 18.6456 12.8777C18.7642 12.8777 18.8777 12.9252 18.9609 13.0094L20 14.0621V8.25532H16.8001C16.7301 8.27288 16.6568 8.27288 16.5868 8.25532C16.3485 8.1935 16.1367 8.0565 15.9829 7.86478C15.8292 7.67306 15.7416 7.43688 15.7335 7.19149V4H9.44041C9.41293 4.0024 9.38718 4.01437 9.36767 4.03383C9.34816 4.05329 9.33615 4.07897 9.33375 4.10638V16.6596C9.33375 16.6878 9.34499 16.7148 9.36499 16.7348ZM10.0744 17.2979H11.4803L12.259 18.0957H5.06727C5.01734 18.0957 4.96838 18.1057 4.9232 18.1246C4.8788 18.1431 4.83798 18.1702 4.80335 18.2048C4.7333 18.2746 4.69398 18.3693 4.69398 18.468C4.69398 18.5668 4.7333 18.6615 4.80335 18.7313C4.87333 18.8011 4.96832 18.8404 5.06727 18.8404H12.9857L13.7947 19.6693L14.0836 19.9574H4.10733C4.09291 19.9591 4.07829 19.9576 4.06457 19.9528C4.05085 19.9481 4.03838 19.9403 4.02812 19.9301C4.01785 19.9198 4.01004 19.9074 4.00529 19.8937C4.00054 19.88 3.99896 19.8654 4.00067 19.8511V7.29787C4.00067 7.26966 4.01191 7.2426 4.03191 7.22265C4.05192 7.2027 4.07905 7.19149 4.10733 7.19149H8.70447V9.05319H5.06727C4.97294 9.05867 4.88453 9.10069 4.8208 9.17019C4.757 9.23973 4.72302 9.33135 4.72594 9.42553C4.72289 9.52082 4.75654 9.61364 4.82002 9.6849C4.88356 9.75613 4.97203 9.80038 5.06727 9.8085H8.70447V10.5638H5.06727C5.01968 10.5652 4.97274 10.5759 4.92932 10.5954C4.88583 10.6148 4.84664 10.6426 4.8139 10.6772C4.78122 10.7118 4.7557 10.7525 4.73877 10.7969C4.72184 10.8413 4.7139 10.8887 4.71527 10.9361C4.7139 10.9837 4.72184 11.031 4.73877 11.0754C4.74424 11.0897 4.75055 11.1037 4.75778 11.1171C4.76162 11.1243 4.76566 11.1313 4.76995 11.1382C4.78265 11.1585 4.79736 11.1776 4.8139 11.1951C4.84664 11.2297 4.88583 11.2575 4.92932 11.2769C4.95491 11.2884 4.98173 11.2968 5.0092 11.3021C5.02834 11.3058 5.04774 11.3079 5.06727 11.3085H8.70447V12.0638H5.06734C4.97782 12.0789 4.89651 12.1251 4.83792 12.1942C4.77926 12.2633 4.7471 12.351 4.7471 12.4415C4.7471 12.5321 4.77926 12.6197 4.83792 12.6888C4.89651 12.758 4.97782 12.8041 5.06734 12.8192H8.70447V13.5745H5.06734C4.97782 13.5895 4.89651 13.6357 4.83792 13.7048C4.81383 13.7332 4.79424 13.7647 4.77946 13.7983C4.7583 13.8465 4.7471 13.8988 4.7471 13.9522C4.7471 14.0427 4.77926 14.1303 4.83792 14.1994C4.89651 14.2686 4.97782 14.3147 5.06734 14.3298H8.70447V15.0744H5.06727C4.97776 15.0895 4.89651 15.1357 4.83785 15.2048C4.77926 15.2739 4.7471 15.3616 4.7471 15.4521C4.7471 15.5043 4.75778 15.5556 4.77809 15.6029C4.793 15.6376 4.81305 15.6701 4.83785 15.6994C4.89651 15.7685 4.97776 15.8147 5.06727 15.8298H8.70447V16.5851H5.06727C4.97776 16.6001 4.89651 16.6463 4.83785 16.7154C4.79489 16.7661 4.76618 16.8267 4.75387 16.8912C4.74938 16.9146 4.7471 16.9386 4.7471 16.9628C4.7471 17.0533 4.77926 17.1409 4.83785 17.21C4.89651 17.2792 4.97776 17.3253 5.06727 17.3404H9.95241C9.99552 17.3331 10.0367 17.3187 10.0744 17.2979ZM20 15.3204L18.5709 16.7659H19.8933C19.9216 16.7659 19.9487 16.7547 19.9687 16.7348C19.9887 16.7148 20 16.6878 20 16.6596V15.3204ZM14.7526 16.6264L13.7248 15.585H15.7825L14.7526 16.6264ZM14.9498 6.08721C14.9465 6.06854 14.9416 6.05023 14.9353 6.03244C14.9202 5.98939 14.897 5.94929 14.8665 5.91442C14.8145 5.85488 14.7444 5.81394 14.6669 5.79787H10.1337C10.0348 5.79787 9.93978 5.83709 9.8698 5.90693C9.79975 5.97676 9.76043 6.07146 9.76043 6.17022C9.76043 6.19463 9.76283 6.21879 9.76752 6.24239C9.77462 6.2782 9.78692 6.31268 9.80398 6.34479C9.82123 6.37716 9.8433 6.40709 9.8698 6.43348C9.93978 6.50332 10.0348 6.54257 10.1337 6.54257H14.6669C14.6811 6.54023 14.6951 6.53702 14.7088 6.53299C14.7206 6.52955 14.7322 6.52549 14.7436 6.52082C14.7624 6.51309 14.7806 6.50371 14.7979 6.4928C14.8378 6.46764 14.8722 6.43468 14.8991 6.39599C14.9259 6.35729 14.9447 6.31359 14.9543 6.26749C14.9554 6.26232 14.9563 6.25716 14.9571 6.25197C14.9579 6.24739 14.9586 6.24281 14.9591 6.23824C14.9612 6.22129 14.962 6.20424 14.9616 6.18723C14.961 6.16727 14.9588 6.14733 14.9549 6.12766C14.9539 6.11406 14.9523 6.10055 14.9498 6.08721ZM15.0189 7.29788H10.1445C10.0549 7.31291 9.97363 7.35911 9.91504 7.42823C9.85639 7.49738 9.82422 7.585 9.82422 7.67555C9.82422 7.76609 9.85639 7.85369 9.91504 7.92284C9.97363 7.99196 10.0549 8.03815 10.1445 8.05319H15.0189C15.0321 8.05241 15.0451 8.05095 15.058 8.04877C15.0745 8.04601 15.0906 8.04212 15.1064 8.03718C15.1669 8.01822 15.2219 7.98361 15.2654 7.93618C15.3291 7.86664 15.3632 7.77502 15.3602 7.68084C15.3606 7.67392 15.3608 7.66701 15.3608 7.66009C15.3609 7.65087 15.3606 7.64165 15.3599 7.63247C15.3592 7.62263 15.358 7.61279 15.3565 7.60302C15.3532 7.58188 15.3479 7.56104 15.3409 7.54072C15.3254 7.49575 15.301 7.45426 15.2693 7.41868C15.2492 7.39621 15.2265 7.37638 15.2017 7.35959C15.1872 7.34979 15.172 7.34102 15.1562 7.33339C15.1132 7.31265 15.0665 7.3006 15.0189 7.29788ZM10.1445 9.56381H18.496C18.5856 9.54877 18.6669 9.50258 18.7255 9.43346C18.7841 9.3643 18.8163 9.27671 18.8163 9.18617C18.8163 9.09562 18.7841 9.008 18.7255 8.93884C18.6669 8.86973 18.5856 8.82353 18.496 8.8085H10.1445C10.0549 8.82353 9.97363 8.86973 9.91504 8.93884C9.85639 9.008 9.82422 9.09562 9.82422 9.18617C9.82422 9.24412 9.83738 9.30087 9.86224 9.35236C9.87624 9.38132 9.89395 9.40859 9.91504 9.43346C9.97363 9.50258 10.0549 9.54877 10.1445 9.56381ZM10.1445 11.0638H15.0189C15.1084 11.0488 15.1897 11.0026 15.2483 10.9335C15.2854 10.8898 15.3118 10.8387 15.3263 10.7842C15.3347 10.7525 15.3391 10.7195 15.3391 10.6861C15.3391 10.5956 15.3069 10.508 15.2483 10.4389C15.1897 10.3697 15.1084 10.3235 15.0189 10.3085H10.1445C10.0549 10.3235 9.97363 10.3697 9.91504 10.4389C9.85639 10.508 9.82422 10.5956 9.82422 10.6861C9.82422 10.7424 9.83666 10.7976 9.8601 10.8478C9.87442 10.8785 9.89284 10.9073 9.91504 10.9335C9.97363 11.0026 10.0549 11.0488 10.1445 11.0638ZM18.496 12.5745H10.1444C10.0549 12.5594 9.97363 12.5132 9.91498 12.4441C9.85639 12.3749 9.82422 12.2873 9.82422 12.1968C9.82422 12.1062 9.85639 12.0186 9.91498 11.9495C9.97363 11.8803 10.0549 11.8342 10.1444 11.8191H18.496C18.5856 11.8342 18.6669 11.8803 18.7255 11.9495C18.7841 12.0186 18.8163 12.1062 18.8163 12.1968C18.8163 12.2873 18.7841 12.3749 18.7255 12.4441C18.6971 12.4776 18.6633 12.5058 18.6259 12.5276C18.5861 12.5507 18.5421 12.5667 18.496 12.5745ZM15.0189 14.0744H10.1444C10.0968 14.0731 10.0499 14.0624 10.0064 14.0429C9.96296 14.0234 9.92376 13.9956 9.89102 13.961C9.85834 13.9265 9.83282 13.8857 9.81589 13.8413C9.79897 13.7969 9.79102 13.7496 9.79239 13.7021C9.79102 13.6546 9.79897 13.6073 9.81589 13.5628C9.83282 13.5184 9.85834 13.4778 9.89102 13.4432C9.92376 13.4086 9.96296 13.3808 10.0064 13.3613C10.0499 13.3419 10.0968 13.3311 10.1444 13.3297H15.0189C15.0661 13.3311 15.1125 13.3419 15.1554 13.3615C15.1983 13.381 15.2368 13.4091 15.2686 13.4438C15.3005 13.4785 15.325 13.5193 15.3407 13.5637C15.3564 13.608 15.363 13.6551 15.3602 13.7021C15.3631 13.7963 15.3291 13.8879 15.2653 13.9574C15.2016 14.027 15.1132 14.0689 15.0189 14.0744ZM16.6188 4.52128L19.4133 7.30852C19.4293 7.32624 19.4401 7.34808 19.4443 7.37157C19.4485 7.39506 19.446 7.41925 19.4371 7.4414C19.4282 7.46356 19.4133 7.48278 19.394 7.4969C19.3747 7.51102 19.3518 7.51947 19.328 7.52128H16.5868L16.4054 7.34043V4.60639C16.4073 4.5826 16.4157 4.55979 16.4299 4.54056C16.444 4.52133 16.4633 4.50644 16.4855 4.49757C16.5077 4.48871 16.532 4.48624 16.5556 4.49043C16.5791 4.49462 16.601 4.50531 16.6188 4.52128ZM18.6454 13.3192L20 14.6915L14.7522 20L14.7416 19.9894L14.1123 19.3617L13.3976 18.6277L11.3817 16.5638L12.7257 15.2021L14.7522 17.2553L18.6454 13.3192Z",rejectAllChanges:"M9.54637 16.5847H8.96997V15.8295H12.786C12.8024 15.8265 12.8186 15.8223 12.8343 15.817C12.8535 15.8105 12.8719 15.8023 12.8897 15.7926C12.9315 15.7697 12.969 15.738 12.9997 15.6991C13.0268 15.6649 13.0478 15.6261 13.0621 15.5847H13.571V16.7656H9.79386C9.78396 16.7479 9.77269 16.731 9.76011 16.7151C9.70552 16.6459 9.62976 16.5998 9.54637 16.5847ZM13.4717 12.9573V13.3295H9.72523C9.6809 13.3309 9.63716 13.3416 9.59671 13.361C9.57578 13.3711 9.55595 13.3834 9.53745 13.3977C9.5201 13.411 9.50391 13.4262 9.48917 13.4429C9.45872 13.4775 9.43494 13.5182 9.41917 13.5626C9.41778 13.5664 9.41644 13.5703 9.41523 13.5742H8.96997V12.8189H12.786C12.8694 12.8039 12.9452 12.7577 12.9997 12.6886C13.0078 12.6784 13.0153 12.6677 13.0223 12.6568L13.029 12.6458L13.033 12.6389L13.0397 12.6266C13.0452 12.6157 13.0503 12.6046 13.055 12.5931C13.0576 12.5869 13.0599 12.5806 13.0621 12.5742H13.6872C13.6453 12.5965 13.607 12.6269 13.5746 12.6644C13.5059 12.7439 13.469 12.849 13.4717 12.9573ZM9.82598 14.0742H13.4758C13.4809 14.0932 13.4904 14.1108 13.5037 14.1251C13.5242 14.147 13.552 14.1593 13.581 14.1593H13.6008L13.571 14.1912V14.8295H9.72523C9.64183 14.8445 9.56614 14.8907 9.51149 14.9598C9.4845 14.994 9.46351 15.0328 9.4492 15.0741H8.96997V14.3295H9.54637C9.62976 14.3145 9.70552 14.2683 9.76011 14.1992C9.78947 14.162 9.81166 14.1195 9.82598 14.0742ZM18.9075 8.2552V12.5317H17.7846V12.323C17.7978 12.2827 17.8047 12.2399 17.8047 12.1965C17.8047 12.106 17.7747 12.0184 17.7201 11.9493C17.6655 11.8801 17.5897 11.834 17.5063 11.8189H9.72523C9.64183 11.834 9.56614 11.8801 9.51149 11.9493C9.48444 11.9835 9.46351 12.0222 9.4492 12.0636H8.96997V11.3083H9.54637C9.63425 11.3028 9.71662 11.2608 9.776 11.1913C9.80687 11.1551 9.83029 11.113 9.84527 11.0676L9.84654 11.0637H14.2667C14.3501 11.0486 14.4258 11.0024 14.4805 10.9333C14.5231 10.8794 14.5507 10.8142 14.5607 10.7452C14.5636 10.7258 14.565 10.706 14.565 10.686C14.565 10.6658 14.5635 10.6458 14.5606 10.626C14.5572 10.6026 14.5516 10.5796 14.5442 10.5573C14.5299 10.5144 14.5084 10.4741 14.4805 10.4387C14.4258 10.3696 14.3501 10.3234 14.2667 10.3083H9.72529C9.6832 10.3159 9.64299 10.3314 9.60653 10.3538C9.57081 10.3759 9.5386 10.4045 9.51155 10.4387C9.49639 10.4579 9.4831 10.4785 9.47182 10.5002C9.46133 10.5205 9.45259 10.5417 9.44568 10.5636H8.96997V9.80838H9.16873C9.25656 9.80286 9.33899 9.76085 9.39837 9.69131C9.45775 9.62177 9.48947 9.53022 9.48674 9.43601C9.48711 9.42951 9.48735 9.42302 9.48741 9.41653C9.48741 9.41049 9.48729 9.40445 9.48705 9.39848C9.49457 9.41055 9.50269 9.42218 9.51155 9.43334C9.56614 9.50249 9.64189 9.54866 9.72529 9.56372H17.5063C17.5897 9.54866 17.6655 9.50249 17.7201 9.43334C17.7747 9.36419 17.8047 9.2766 17.8047 9.18603C17.8047 9.09552 17.7747 9.00786 17.7201 8.93878C17.6655 8.86963 17.5897 8.82346 17.5063 8.8084H9.72529C9.64189 8.82346 9.56614 8.86963 9.51155 8.93878C9.4569 9.00786 9.42694 9.09552 9.42694 9.18603L9.427 9.19707L9.42754 9.20875C9.41972 9.19661 9.41123 9.18499 9.40201 9.17389C9.38478 9.15311 9.36537 9.1346 9.34427 9.11863C9.33735 9.11344 9.33026 9.1085 9.32298 9.10383C9.31855 9.10097 9.31406 9.09824 9.30951 9.09565L9.30424 9.09266L9.29659 9.08857C9.28792 9.08402 9.27906 9.07993 9.27009 9.07623C9.2616 9.07279 9.25298 9.06974 9.24431 9.06701C9.21974 9.05935 9.19439 9.05461 9.16873 9.05305H8.96997V4.10638C8.97221 4.07897 8.9834 4.05328 9.00157 4.03383C9.01975 4.01437 9.04374 4.0024 9.06935 4H14.9325V7.1914C14.9401 7.43679 15.0216 7.67296 15.1649 7.86468C15.3082 8.0564 15.5055 8.19338 15.7275 8.2552C15.7927 8.27277 15.861 8.27277 15.9262 8.2552H18.9075ZM13.571 17.2975V19.4251L13.5722 19.4615C13.5835 19.6376 13.6323 19.8068 13.7133 19.957H4.10061C4.08718 19.9587 4.07355 19.9571 4.06077 19.9524C4.04799 19.9477 4.03637 19.9399 4.02681 19.9296C4.01724 19.9194 4.00997 19.907 4.00554 19.8933C4.00111 19.8796 3.99964 19.865 4.00124 19.8506V7.29778C4.00124 7.26957 4.01171 7.24251 4.03034 7.22256C4.04898 7.20261 4.07426 7.1914 4.10061 7.1914H8.38368V9.05305H4.99497C4.90708 9.05857 4.82471 9.10052 4.76533 9.17006C4.70589 9.2396 4.67423 9.33121 4.67696 9.42536C4.67411 9.52067 4.70547 9.61346 4.76461 9.68475C4.8238 9.75598 4.90623 9.80026 4.99497 9.80838H8.38368V10.5636H4.99497C4.96682 10.5645 4.93898 10.5692 4.91199 10.5774C4.89647 10.5821 4.88124 10.588 4.86644 10.5952C4.8494 10.6034 4.83308 10.613 4.81762 10.6241C4.79627 10.6393 4.77655 10.657 4.7589 10.6771C4.72846 10.7116 4.70468 10.7523 4.68891 10.7967C4.67314 10.8411 4.66574 10.8885 4.66701 10.9359C4.66641 10.9597 4.66792 10.9834 4.67156 11.0067C4.6752 11.03 4.68102 11.053 4.68891 11.0752C4.70468 11.1196 4.72846 11.1603 4.7589 11.1949C4.7731 11.211 4.78862 11.2256 4.80524 11.2386C4.81452 11.2459 4.82417 11.2527 4.83417 11.259C4.84461 11.2655 4.85534 11.2714 4.86644 11.2767C4.9069 11.2962 4.95063 11.3069 4.99497 11.3083H8.38368V12.0636H4.99503C4.91163 12.0787 4.83587 12.1249 4.78128 12.194C4.7526 12.2303 4.7307 12.2717 4.71639 12.3159C4.70347 12.3559 4.69667 12.3983 4.69667 12.4413C4.69667 12.5318 4.72664 12.6194 4.78128 12.6886C4.809 12.7237 4.84218 12.7529 4.87906 12.7751C4.89416 12.7842 4.90993 12.7921 4.92619 12.7988C4.94833 12.8079 4.97137 12.8147 4.99503 12.8189H8.38368V13.5742H4.99503C4.95275 13.5819 4.91242 13.5975 4.87584 13.62C4.8403 13.642 4.80822 13.6705 4.78128 13.7046C4.72664 13.7737 4.69667 13.8613 4.69667 13.9519C4.69667 14.0424 4.72664 14.13 4.78128 14.1992C4.83587 14.2683 4.91163 14.3145 4.99503 14.3295H8.38368V15.0741H4.99497C4.94644 15.0829 4.90047 15.1022 4.85977 15.1304C4.83878 15.145 4.81919 15.162 4.80136 15.1811C4.79439 15.1885 4.78765 15.1964 4.78122 15.2045C4.77188 15.2163 4.76327 15.2287 4.75539 15.2416C4.74441 15.2594 4.73495 15.2781 4.727 15.2975C4.71924 15.3163 4.71293 15.3358 4.70808 15.3558C4.70407 15.3723 4.7011 15.389 4.69922 15.4061C4.69752 15.4212 4.69667 15.4364 4.69667 15.4518C4.69667 15.5423 4.72664 15.6299 4.78122 15.6991C4.83587 15.7682 4.91157 15.8144 4.99497 15.8295H8.38368V16.5847H4.99497C4.91157 16.5998 4.83587 16.6459 4.78122 16.7151C4.72664 16.7842 4.69667 16.8718 4.69667 16.9624C4.69667 17.0529 4.72664 17.1405 4.78122 17.2097C4.83587 17.2788 4.91157 17.325 4.99497 17.34H9.54637C9.58655 17.3328 9.62496 17.3183 9.66008 17.2975H13.571ZM15.7573 4.52124L18.3609 7.30839C18.3758 7.32612 18.3858 7.34796 18.3897 7.37145C18.3937 7.39493 18.3914 7.41913 18.3831 7.44128C18.3748 7.46343 18.3609 7.48266 18.3429 7.49678C18.325 7.51089 18.3036 7.51934 18.2814 7.52115H15.7275L15.5585 7.34031V4.60634C15.5602 4.58255 15.5681 4.55975 15.5813 4.54051C15.5945 4.52128 15.6125 4.50639 15.6332 4.49753C15.6539 4.48867 15.6765 4.48619 15.6984 4.49038C15.7203 4.49457 15.7407 4.50526 15.7573 4.52124ZM14.1248 5.91437C14.1732 5.97391 14.2021 6.04884 14.2071 6.1276C14.2157 6.17377 14.2155 6.22129 14.2065 6.26739C14.2045 6.27778 14.2021 6.28804 14.1992 6.29817L14.1944 6.31388C14.1847 6.34291 14.1715 6.3705 14.1551 6.39595C14.13 6.43465 14.098 6.46757 14.0608 6.49276C14.0354 6.5099 14.008 6.52328 13.9794 6.53244C13.9661 6.53672 13.9525 6.5401 13.9387 6.5425H9.71529C9.62309 6.5425 9.5346 6.50328 9.4694 6.43342C9.40413 6.36362 9.3675 6.26889 9.3675 6.17013C9.3675 6.07144 9.40413 5.97671 9.4694 5.90691C9.5346 5.83704 9.62309 5.79783 9.71529 5.79783H13.9387C13.9718 5.80516 14.0034 5.81769 14.0326 5.83484C14.0672 5.85522 14.0984 5.88204 14.1248 5.91437ZM14.2667 7.29776H9.72529C9.69606 7.30302 9.66773 7.31211 9.64092 7.3247C9.62612 7.33171 9.61175 7.33977 9.59798 7.34879C9.56565 7.36996 9.53642 7.39664 9.51155 7.42813C9.4569 7.49722 9.42694 7.58487 9.42694 7.67538C9.42694 7.70155 9.42942 7.72752 9.43434 7.75285C9.44635 7.81505 9.47273 7.87355 9.51155 7.9227C9.55292 7.9751 9.60647 8.01432 9.66628 8.03678C9.67762 8.04107 9.6892 8.04477 9.70097 8.04775C9.70898 8.04983 9.71711 8.05158 9.72529 8.05308H14.2667C14.3546 8.04756 14.437 8.00555 14.4964 7.93601C14.5558 7.86647 14.5875 7.77492 14.5847 7.68071C14.5874 7.63318 14.5813 7.58559 14.5667 7.54059C14.5522 7.4956 14.5296 7.45417 14.5 7.41859C14.4704 7.38301 14.4346 7.35398 14.3946 7.33327C14.3546 7.31256 14.3111 7.30048 14.2667 7.29776ZM4.99497 18.84H12.786C12.8783 18.84 12.9667 18.8008 13.032 18.731C13.0972 18.6611 13.1338 18.5664 13.1338 18.4677C13.1338 18.3689 13.0972 18.2742 13.032 18.2044C12.9667 18.1346 12.8783 18.0954 12.786 18.0954H4.99497C4.90277 18.0954 4.81428 18.1346 4.74908 18.2044C4.68381 18.2742 4.64718 18.3689 4.64718 18.4677C4.64718 18.5664 4.68381 18.6611 4.74908 18.731C4.81428 18.8008 4.90277 18.84 4.99497 18.84ZM17.5858 12.7444H19.5733H19.623C19.7249 12.7499 19.821 12.7971 19.8913 12.8764C19.9616 12.9556 20.0007 13.0607 20.0006 13.17V13.8295C20.0007 13.8458 19.9976 13.862 19.9914 13.8769C19.9853 13.8918 19.9764 13.9052 19.9652 13.9163C19.9539 13.9273 19.9407 13.9357 19.9262 13.9409C19.9118 13.9461 19.8965 13.948 19.8814 13.9465H13.7797C13.7507 13.9465 13.7229 13.9342 13.7024 13.9123C13.6819 13.8903 13.6704 13.8606 13.6704 13.8295V13.17C13.6677 13.0617 13.7046 12.9566 13.7733 12.8771C13.842 12.7976 13.9371 12.75 14.0381 12.7444H16.0256V12.5104C16.0352 12.439 16.0687 12.3737 16.1199 12.3268C16.1711 12.2798 16.2365 12.2544 16.3039 12.2551H17.2976C17.3667 12.2517 17.4345 12.276 17.4878 12.3232C17.541 12.3704 17.576 12.4371 17.5858 12.5104V12.7444ZM14.0679 19.4251V14.1912H19.5037V19.4251C19.4935 19.585 19.4256 19.7344 19.3143 19.8416C19.203 19.9488 19.0571 20.0055 18.9075 19.9996H14.6642C14.5146 20.0055 14.3687 19.9488 14.2574 19.8416C14.1461 19.7344 14.0781 19.585 14.0679 19.4251ZM15.5983 15.1593H15.2505C15.0969 15.1593 14.9723 15.2926 14.9723 15.4572V18.7336C14.9723 18.8981 15.0969 19.0315 15.2505 19.0315H15.5983C15.752 19.0315 15.8766 18.8981 15.8766 18.7336V15.4572C15.8766 15.2926 15.752 15.1593 15.5983 15.1593ZM16.9598 15.1593H16.612C16.4583 15.1593 16.3337 15.2926 16.3337 15.4572V18.7336C16.3337 18.8981 16.4583 19.0315 16.612 19.0315H16.9598C17.1135 19.0315 17.238 18.8981 17.238 18.7336V15.4572C17.238 15.2926 17.1135 15.1593 16.9598 15.1593ZM17.9635 15.1593H18.3113C18.465 15.1593 18.5895 15.2926 18.5895 15.4572V18.7336C18.5895 18.8981 18.465 19.0315 18.3113 19.0315H17.9635C17.8098 19.0315 17.6852 18.8981 17.6852 18.7336V15.4572C17.6852 15.2926 17.8098 15.1593 17.9635 15.1593Z",acceptSingleChange:"M17.2 20H15.6628L17.33 18.3091V19.87C17.33 19.8871 17.3266 19.904 17.3201 19.9197C17.3136 19.9355 17.304 19.9499 17.2919 19.9619C17.2799 19.974 17.2655 19.9836 17.2497 19.9901C17.234 19.9966 17.2171 20 17.2 20ZM4.13 20H14.4978L14.1823 19.6791L13.5135 18.9904L13.5123 18.9891L13.0529 18.52H5C4.87537 18.52 4.75586 18.4705 4.66766 18.3823C4.57953 18.2942 4.53003 18.1747 4.53003 18.05C4.53003 17.9253 4.57953 17.8058 4.66766 17.7177C4.75586 17.6295 4.87537 17.58 5 17.58H12.1323L11.6235 17.0604L11.6231 16.48L12.8831 15.19L13.4765 15.1896L15.0807 16.8276L17.33 14.5413V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20ZM13.1 4.65L16.6 8.15C16.6212 8.17232 16.6355 8.20028 16.6412 8.23051C16.6469 8.26075 16.6437 8.29199 16.6321 8.32048C16.6205 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5208 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8312 4.72925 12.8412 4.6995 12.8588 4.67429C12.8765 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9893 4.60315 13.0195 4.60884C13.0497 4.61453 13.0777 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60184 10.9735 6.5462C10.9534 6.49057 10.9224 6.43948 10.8825 6.39581C10.8425 6.35217 10.7944 6.3168 10.7408 6.29178C10.6871 6.26678 10.6292 6.25256 10.57 6.25H5C4.88239 6.25772 4.77252 6.31131 4.69397 6.39917C4.61542 6.48706 4.57452 6.60226 4.58002 6.72C4.57452 6.83774 4.61542 6.95294 4.69397 7.04083C4.77252 7.12869 4.88239 7.18228 5 7.19H10.6C10.7141 7.1774 10.8189 7.12173 10.8933 7.03436C10.9677 6.94702 11.0058 6.83456 11 6.72ZM11.1 8.14001H5C4.87537 8.14001 4.75586 8.18954 4.66766 8.27768C4.57953 8.36581 4.53003 8.48535 4.53003 8.61002C4.53003 8.73468 4.57953 8.85422 4.66766 8.94235C4.71558 8.99023 4.77277 9.02673 4.83496 9.05008C4.86932 9.06296 4.90521 9.07184 4.94189 9.07642C4.96106 9.0788 4.98047 9.08002 5 9.08002H11.1C11.2247 9.08002 11.3442 9.03049 11.4324 8.94235C11.5205 8.85422 11.57 8.73468 11.57 8.61002C11.57 8.48535 11.5205 8.36581 11.4324 8.27768C11.3442 8.18954 11.2247 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8035 10.8535C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8035 10.1465C15.7098 10.0527 15.5826 10 15.45 10H5C4.86737 10 4.74023 10.0527 4.64642 10.1465C4.55267 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55267 10.7598 4.64642 10.8535C4.74023 10.9473 4.86737 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4986 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.416 12.0552C11.3337 11.9673 11.2203 11.9152 11.1 11.91H5C4.94086 11.9126 4.88287 11.9268 4.82922 11.9518C4.77563 11.9768 4.72748 12.0122 4.6875 12.0558C4.65833 12.0878 4.63391 12.1237 4.61505 12.1624C4.60809 12.1767 4.60193 12.1913 4.5965 12.2062C4.58264 12.2443 4.5741 12.2841 4.57092 12.3243C4.56946 12.3428 4.56915 12.3614 4.57001 12.38C4.56451 12.5004 4.60651 12.6181 4.68689 12.7079C4.76733 12.7976 4.87976 12.8523 5 12.86ZM15.45 14.74H5C4.87537 14.74 4.75586 14.6905 4.66766 14.6023C4.57953 14.5142 4.53003 14.3947 4.53003 14.27C4.53003 14.1453 4.57953 14.0258 4.66766 13.9377C4.75586 13.8495 4.87537 13.8 5 13.8H15.45C15.5747 13.8 15.6942 13.8495 15.7823 13.9377C15.8705 14.0258 15.92 14.1453 15.92 14.27C15.92 14.3947 15.8705 14.5142 15.7823 14.6023C15.6942 14.6905 15.5747 14.74 15.45 14.74ZM11.1 16.63H5C4.87537 16.63 4.75586 16.5805 4.66766 16.4923C4.57953 16.4042 4.53003 16.2846 4.53003 16.16C4.53003 16.0353 4.57953 15.9158 4.66766 15.8276C4.75586 15.7395 4.87537 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4324 15.8276C11.5205 15.9158 11.57 16.0353 11.57 16.16C11.57 16.2846 11.5205 16.4042 11.4324 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM18.73 13.71L20 15.01L15.08 20L15.07 19.99L14.48 19.39L13.81 18.7L11.92 16.77L13.18 15.48L15.08 17.42L18.73 13.71Z",rejectSingleChange:"M17.0495 11.5C17.1461 11.5 17.241 11.5173 17.33 11.5501V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20H13.2305C13.1075 19.8287 13.0338 19.6249 13.0205 19.4112L13.0195 19.3956V18.52H5C4.87537 18.52 4.75586 18.4705 4.66772 18.3823C4.57959 18.2942 4.53003 18.1747 4.53003 18.05C4.53003 18.0119 4.53467 17.9742 4.54358 17.9378C4.56396 17.8552 4.60657 17.7788 4.66772 17.7177C4.75586 17.6295 4.87537 17.58 5 17.58H13.0195V14.74H5C4.87537 14.74 4.75586 14.6905 4.66772 14.6023C4.57959 14.5142 4.53003 14.3947 4.53003 14.27C4.53003 14.1453 4.57959 14.0258 4.66772 13.9377C4.75586 13.8495 4.87537 13.8 5 13.8H12.8393C12.6229 13.6377 12.4998 13.3897 12.4998 13.1032C12.4997 12.8414 12.6008 12.5847 12.7513 12.3911C12.9 12.1998 13.1561 12 13.4994 12L15.2519 12C15.2928 11.8972 15.3589 11.7915 15.4649 11.6992C15.6135 11.5698 15.8041 11.499 16.0011 11.5H17.0495ZM13.1 4.65L16.6 8.15C16.6211 8.17232 16.6354 8.20028 16.6411 8.23051C16.6468 8.26075 16.6437 8.29199 16.6321 8.32048C16.6204 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5207 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8311 4.72925 12.8411 4.6995 12.8588 4.67429C12.8764 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9892 4.60315 13.0194 4.60884C13.0497 4.61453 13.0776 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60184 10.9735 6.5462C10.9716 6.5408 10.9695 6.53543 10.9673 6.53012C10.9626 6.51852 10.9575 6.50717 10.9518 6.49603C10.9406 6.47391 10.9275 6.45273 10.9127 6.43274C10.9033 6.41992 10.8932 6.40759 10.8824 6.39581C10.8425 6.35217 10.7943 6.3168 10.7407 6.29178C10.6871 6.26678 10.629 6.25256 10.5699 6.25H5C4.88232 6.25772 4.77246 6.31131 4.69397 6.39917C4.61536 6.48706 4.57446 6.60226 4.57996 6.72C4.57715 6.7811 4.58679 6.84152 4.60767 6.8978C4.61523 6.91803 4.62415 6.93771 4.63452 6.9567C4.65088 6.98669 4.67078 7.01495 4.69397 7.04083C4.77246 7.12869 4.88232 7.18228 5 7.19H10.6C10.714 7.1774 10.8188 7.12173 10.8932 7.03436C10.922 7.00049 10.9454 6.96283 10.9629 6.92273C10.9725 6.9006 10.9805 6.87775 10.9865 6.8544C10.9933 6.82791 10.9977 6.80075 10.9995 6.77325C11.0001 6.76453 11.0004 6.75574 11.0005 6.74695C11.0006 6.73798 11.0005 6.729 11 6.72ZM11.1 8.14001H5C4.97534 8.14001 4.95081 8.14194 4.92676 8.14575C4.89587 8.15063 4.8656 8.15857 4.83643 8.1694C4.77368 8.19272 4.71606 8.2294 4.66772 8.27768C4.57959 8.36581 4.53003 8.48535 4.53003 8.61002C4.53003 8.73468 4.57959 8.85422 4.66772 8.94235C4.75586 9.03049 4.87537 9.08002 5 9.08002H11.1C11.2247 9.08002 11.3442 9.03049 11.4324 8.94235C11.4617 8.91306 11.4867 8.88028 11.5071 8.845C11.5349 8.79691 11.554 8.74414 11.5634 8.68915C11.5677 8.66318 11.5701 8.63672 11.5701 8.61002C11.5701 8.48535 11.5205 8.36581 11.4324 8.27768C11.3929 8.23831 11.3474 8.20663 11.2979 8.18365C11.2365 8.15518 11.1689 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8036 10.8535C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8036 10.1465C15.7098 10.0527 15.5826 10 15.45 10H5C4.86743 10 4.74023 10.0527 4.64648 10.1465C4.55273 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55273 10.7598 4.64648 10.8535C4.74023 10.9473 4.86743 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4987 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.4159 12.0552C11.3336 11.9673 11.2202 11.9152 11.1 11.91H5C4.94092 11.9126 4.88281 11.9268 4.82922 11.9518C4.77563 11.9768 4.72742 12.0122 4.6875 12.0558C4.64758 12.0995 4.6167 12.1506 4.59644 12.2062C4.58899 12.2266 4.58313 12.2475 4.57874 12.2687C4.57129 12.3052 4.56824 12.3426 4.56995 12.38C4.56445 12.5004 4.60645 12.6181 4.68689 12.7079C4.76733 12.7976 4.87976 12.8523 5 12.86ZM11.1 16.63H5C4.87537 16.63 4.75586 16.5805 4.66772 16.4923C4.57959 16.4042 4.53003 16.2846 4.53003 16.16C4.53003 16.0353 4.57959 15.9158 4.66772 15.8276C4.75586 15.7395 4.87537 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4324 15.8276C11.5205 15.9158 11.5701 16.0353 11.5701 16.16C11.5701 16.2846 11.5205 16.4042 11.4324 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM19.59 12.53H17.36V12.3C17.3574 12.2195 17.3236 12.1432 17.2657 12.0872C17.2078 12.0313 17.1305 12 17.05 12H16C15.9242 11.9994 15.8509 12.0265 15.7938 12.0762C15.7367 12.126 15.6997 12.1949 15.69 12.27V12.5H13.44C13.3768 12.4994 13.3142 12.5125 13.2565 12.5382C13.1988 12.564 13.1473 12.6019 13.1055 12.6493C13.0638 12.6968 13.0327 12.7526 13.0145 12.8132C12.9963 12.8737 12.9913 12.9374 13 13V13.67C13 13.6871 13.0033 13.704 13.0099 13.7198C13.0164 13.7355 13.026 13.7499 13.038 13.7619C13.0501 13.774 13.0644 13.7836 13.0802 13.7901C13.096 13.7966 13.1129 13.8 13.13 13.8H19.84C19.8611 13.8054 19.8834 13.8054 19.9045 13.8C19.9257 13.7946 19.9452 13.7839 19.9611 13.7689C19.9771 13.754 19.989 13.7352 19.9958 13.7144C20.0026 13.6937 20.004 13.6715 20 13.65V13C20.0028 12.8866 19.9617 12.7765 19.8853 12.6927C19.809 12.6088 19.7031 12.5577 19.59 12.55V12.53ZM13.52 14V19.38C13.5303 19.5454 13.6054 19.7 13.7289 19.8105C13.8525 19.9209 14.0145 19.9782 14.18 19.97H18.84C19.0055 19.9782 19.1676 19.9209 19.2911 19.8105C19.4146 19.7 19.4897 19.5454 19.5 19.38V14H13.52ZM15.52 18.67C15.52 18.7522 15.4874 18.8311 15.4292 18.8892C15.3711 18.9473 15.2922 18.98 15.21 18.98H14.83C14.7478 18.98 14.669 18.9473 14.6108 18.8892C14.5527 18.8311 14.52 18.7522 14.52 18.67V15.33C14.52 15.2893 14.528 15.249 14.5436 15.2114C14.5592 15.1738 14.582 15.1396 14.6108 15.1108C14.6396 15.082 14.6738 15.0592 14.7114 15.0436C14.749 15.028 14.7893 15.02 14.83 15.02H15.21C15.2507 15.02 15.291 15.028 15.3287 15.0436C15.3663 15.0592 15.4004 15.082 15.4292 15.1108C15.458 15.1396 15.4808 15.1738 15.4964 15.2114C15.512 15.249 15.52 15.2893 15.52 15.33V18.67ZM17.01 18.67C17.01 18.7522 16.9774 18.8311 16.9192 18.8892C16.8611 18.9473 16.7822 18.98 16.7 18.98H16.32C16.2798 18.98 16.2399 18.9719 16.2029 18.9562C16.1658 18.9405 16.1323 18.9176 16.1043 18.8886C16.0763 18.8597 16.0544 18.8254 16.0399 18.7879C16.0254 18.7503 16.0187 18.7102 16.02 18.67V15.33C16.0187 15.2898 16.0254 15.2497 16.0399 15.2121C16.0544 15.1746 16.0763 15.1403 16.1043 15.1114C16.1323 15.0824 16.1658 15.0595 16.2029 15.0438C16.2399 15.0281 16.2798 15.02 16.32 15.02H16.7C16.7407 15.02 16.781 15.028 16.8187 15.0436C16.8563 15.0592 16.8904 15.082 16.9192 15.1108C16.948 15.1396 16.9708 15.1738 16.9864 15.2114C17.002 15.249 17.01 15.2893 17.01 15.33V18.67ZM18.51 18.67C18.51 18.7107 18.502 18.751 18.4864 18.7886C18.4708 18.8262 18.448 18.8604 18.4192 18.8892C18.3904 18.918 18.3563 18.9408 18.3187 18.9564C18.281 18.972 18.2407 18.98 18.2 18.98H17.82C17.7378 18.98 17.659 18.9473 17.6008 18.8892C17.5427 18.8311 17.51 18.7522 17.51 18.67V15.33C17.51 15.2893 17.518 15.249 17.5336 15.2114C17.5492 15.1738 17.572 15.1396 17.6008 15.1108C17.6296 15.082 17.6638 15.0592 17.7014 15.0436C17.739 15.028 17.7793 15.02 17.82 15.02H18.2C18.2407 15.02 18.281 15.028 18.3187 15.0436C18.3563 15.0592 18.3904 15.082 18.4192 15.1108C18.448 15.1396 18.4708 15.1738 18.4864 15.2114C18.502 15.249 18.51 15.2893 18.51 15.33V18.67Z"},r.FILEICONS={docIcon:{extension:".doc",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9.617188 46.875 C 13.234375 46.875 16.160156 43.929688 16.160156 40.292969 C 16.160156 36.695312 13.234375 33.75 9.617188 33.75 L 7.402344 33.75 C 6.820312 33.75 6.371094 34.199219 6.371094 34.78125 L 6.371094 45.84375 C 6.371094 46.335938 6.714844 46.757812 7.191406 46.855469 L 7.402344 46.875 Z M 9.617188 44.792969 L 8.453125 44.792969 L 8.453125 35.832031 L 9.617188 35.832031 C 12.089844 35.832031 14.078125 37.835938 14.078125 40.292969 C 14.078125 42.789062 12.089844 44.773438 9.617188 44.792969 Z M 24.816406 46.875 C 26.539062 46.875 28.191406 46.085938 29.296875 44.867188 C 30.460938 43.648438 31.191406 41.980469 31.191406 40.125 C 31.191406 38.269531 30.460938 36.617188 29.296875 35.382812 C 28.191406 34.144531 26.539062 33.375 24.816406 33.375 C 23.015625 33.375 21.367188 34.144531 20.222656 35.382812 C 19.058594 36.617188 18.367188 38.269531 18.367188 40.125 C 18.367188 41.980469 19.058594 43.648438 20.222656 44.867188 C 21.367188 46.085938 23.015625 46.875 24.816406 46.875 Z M 24.816406 44.738281 C 23.617188 44.738281 22.566406 44.230469 21.777344 43.386719 C 20.992188 42.582031 20.503906 41.398438 20.503906 40.125 C 20.503906 38.851562 20.992188 37.667969 21.777344 36.84375 C 22.566406 36 23.617188 35.511719 24.816406 35.511719 C 25.941406 35.511719 26.992188 36 27.777344 36.84375 C 28.546875 37.667969 29.054688 38.851562 29.054688 40.125 C 29.054688 41.398438 28.546875 42.582031 27.777344 43.386719 C 26.992188 44.230469 25.941406 44.738281 24.816406 44.738281 Z M 39.996094 46.875 C 41.648438 46.875 43.148438 46.332031 44.328125 45.414062 C 44.777344 45.054688 44.851562 44.382812 44.515625 43.914062 C 44.140625 43.460938 43.445312 43.386719 43.015625 43.707031 C 42.171875 44.382812 41.160156 44.738281 39.996094 44.738281 C 38.703125 44.738281 37.503906 44.210938 36.621094 43.386719 C 35.777344 42.5625 35.253906 41.398438 35.253906 40.125 C 35.253906 38.851562 35.777344 37.726562 36.621094 36.863281 C 37.503906 36.039062 38.703125 35.511719 39.996094 35.511719 C 41.160156 35.511719 42.191406 35.867188 43.015625 36.542969 C 43.445312 36.882812 44.140625 36.804688 44.515625 36.335938 C 44.851562 35.867188 44.777344 35.210938 44.328125 34.835938 C 43.148438 33.917969 41.648438 33.375 39.996094 33.375 C 36.246094 33.394531 33.132812 36.414062 33.117188 40.125 C 33.132812 43.855469 36.246094 46.875 39.996094 46.875 Z M 39.996094 46.875 "/>\n      </g>'},gifIcon:{extension:".gif",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.394531 46.875 C 18.988281 46.875 20.46875 46.332031 21.648438 45.414062 C 21.835938 45.28125 21.949219 45.132812 22.003906 44.960938 L 22.003906 44.945312 C 22.023438 44.90625 22.023438 44.886719 22.042969 44.851562 C 22.0625 44.738281 22.097656 44.664062 22.097656 44.53125 L 22.097656 40.386719 C 22.097656 39.789062 21.613281 39.335938 21.011719 39.335938 L 17.28125 39.335938 C 16.699219 39.335938 16.210938 39.789062 16.210938 40.386719 C 16.210938 40.96875 16.699219 41.457031 17.28125 41.457031 L 19.960938 41.457031 L 19.960938 44.023438 C 19.210938 44.457031 18.332031 44.738281 17.394531 44.738281 C 16.042969 44.738281 14.863281 44.230469 14.019531 43.367188 C 13.136719 42.523438 12.613281 41.382812 12.613281 40.144531 C 12.613281 38.867188 13.136719 37.726562 14.019531 36.882812 C 14.863281 36.019531 16.042969 35.511719 17.394531 35.511719 C 18.519531 35.511719 19.550781 35.90625 20.355469 36.523438 C 20.824219 36.898438 21.519531 36.804688 21.875 36.355469 C 22.230469 35.886719 22.15625 35.195312 21.667969 34.835938 C 20.503906 33.917969 18.988281 33.375 17.394531 33.375 C 13.585938 33.375 10.472656 36.375 10.472656 40.144531 C 10.472656 43.894531 13.585938 46.875 17.394531 46.875 Z M 26.945312 46.875 C 27.507812 46.875 27.996094 46.425781 27.996094 45.84375 L 27.996094 34.78125 C 27.996094 34.199219 27.507812 33.75 26.945312 33.75 C 26.363281 33.75 25.914062 34.199219 25.914062 34.78125 L 25.914062 45.84375 C 25.914062 46.425781 26.363281 46.875 26.945312 46.875 Z M 33.066406 46.875 C 33.648438 46.875 34.117188 46.40625 34.117188 45.84375 L 34.117188 41.34375 L 38.488281 41.34375 C 39.050781 41.34375 39.519531 40.875 39.519531 40.292969 C 39.519531 39.75 39.050781 39.261719 38.488281 39.261719 L 34.117188 39.261719 L 34.117188 35.832031 L 39.199219 35.832031 C 39.742188 35.832031 40.230469 35.363281 40.230469 34.78125 C 40.230469 34.21875 39.742188 33.75 39.199219 33.75 L 33.066406 33.75 C 32.488281 33.75 32.035156 34.21875 32.035156 34.78125 L 32.035156 45.84375 C 32.035156 46.40625 32.488281 46.875 33.066406 46.875 Z M 33.066406 46.875 "/>\n      </g>'},jpegIcon:{extension:".jpeg",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9 43.75 C 11.140625 43.75 12.890625 42.015625 12.890625 39.875 L 12.890625 33.671875 C 12.890625 33.1875 12.5 32.8125 12.03125 32.8125 C 11.546875 32.8125 11.15625 33.1875 11.15625 33.671875 L 11.15625 39.875 C 11.15625 41.046875 10.1875 42.015625 9 42.015625 C 8.046875 42.015625 7.234375 41.390625 6.953125 40.53125 C 6.8125 40.078125 6.328125 39.828125 5.859375 39.984375 C 5.421875 40.109375 5.15625 40.59375 5.3125 41.0625 C 5.8125 42.625 7.28125 43.75 9 43.75 Z M 15.640625 43.75 C 16.125 43.75 16.515625 43.359375 16.515625 42.890625 L 16.515625 39.5 L 18.4375 39.5 C 20.296875 39.5 21.796875 38 21.796875 36.171875 C 21.796875 34.3125 20.296875 32.8125 18.4375 32.8125 L 15.640625 32.8125 C 15.171875 32.8125 14.78125 33.1875 14.78125 33.671875 L 14.78125 42.890625 C 14.78125 43.359375 15.171875 43.75 15.640625 43.75 Z M 18.4375 37.765625 L 16.515625 37.765625 L 16.515625 34.546875 L 18.4375 34.546875 C 19.34375 34.546875 20.046875 35.265625 20.0625 36.171875 C 20.046875 37.046875 19.34375 37.765625 18.4375 37.765625 Z M 29.234375 43.75 C 29.6875 43.75 30.09375 43.359375 30.09375 42.890625 C 30.09375 42.40625 29.6875 42.015625 29.234375 42.015625 L 25 42.015625 L 25 39.140625 L 28.640625 39.140625 C 29.109375 39.140625 29.5 38.75 29.5 38.265625 C 29.5 37.8125 29.109375 37.40625 28.640625 37.40625 L 25 37.40625 L 25 34.546875 L 29.234375 34.546875 C 29.6875 34.546875 30.09375 34.15625 30.09375 33.671875 C 30.09375 33.1875 29.6875 32.8125 29.234375 32.8125 L 24.125 32.8125 C 23.640625 32.8125 23.265625 33.1875 23.265625 33.671875 L 23.265625 42.890625 C 23.265625 43.359375 23.640625 43.75 24.125 43.75 C 24.125 43.75 24.140625 43.734375 24.140625 43.734375 C 24.140625 43.734375 24.140625 43.75 24.171875 43.75 Z M 37.1875 43.75 C 38.515625 43.75 39.75 43.296875 40.734375 42.53125 C 40.890625 42.421875 40.984375 42.296875 41.03125 42.15625 L 41.03125 42.140625 C 41.046875 42.109375 41.046875 42.09375 41.0625 42.0625 C 41.078125 41.96875 41.109375 41.90625 41.109375 41.796875 L 41.109375 38.34375 C 41.109375 37.914062 40.8125 37.578125 40.410156 37.492188 L 40.203125 37.46875 L 37.09375 37.46875 C 36.609375 37.46875 36.203125 37.84375 36.203125 38.34375 C 36.203125 38.828125 36.609375 39.234375 37.09375 39.234375 L 39.328125 39.234375 L 39.328125 41.375 C 38.703125 41.734375 37.96875 41.96875 37.1875 41.96875 C 36.0625 41.96875 35.078125 41.546875 34.375 40.828125 C 33.640625 40.125 33.203125 39.171875 33.203125 38.140625 C 33.203125 37.078125 33.640625 36.125 34.375 35.421875 C 35.078125 34.703125 36.0625 34.28125 37.1875 34.28125 C 38.125 34.28125 38.984375 34.609375 39.65625 35.125 C 40.046875 35.4375 40.625 35.359375 40.921875 34.984375 C 41.21875 34.59375 41.15625 34.015625 40.75 33.71875 C 39.78125 32.953125 38.515625 32.5 37.1875 32.5 C 34.015625 32.5 31.421875 35 31.421875 38.140625 C 31.421875 41.265625 34.015625 43.75 37.1875 43.75 Z M 37.1875 43.75 "/>\n      </g>'},logIcon:{extension:".log",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 13.542969 46.875 C 14.085938 46.875 14.574219 46.40625 14.574219 45.84375 C 14.574219 45.261719 14.085938 44.792969 13.542969 44.792969 L 8.460938 44.792969 L 8.460938 34.78125 C 8.460938 34.21875 7.992188 33.75 7.410156 33.75 C 6.828125 33.75 6.378906 34.21875 6.378906 34.78125 L 6.378906 45.84375 C 6.378906 46.40625 6.828125 46.875 7.410156 46.875 Z M 21.742188 46.875 C 23.46875 46.875 25.117188 46.085938 26.222656 44.867188 C 27.386719 43.648438 28.117188 41.980469 28.117188 40.125 C 28.117188 38.269531 27.386719 36.617188 26.222656 35.382812 C 25.117188 34.144531 23.46875 33.375 21.742188 33.375 C 19.941406 33.375 18.292969 34.144531 17.148438 35.382812 C 15.984375 36.617188 15.292969 38.269531 15.292969 40.125 C 15.292969 41.980469 15.984375 43.648438 17.148438 44.867188 C 18.292969 46.085938 19.941406 46.875 21.742188 46.875 Z M 21.742188 44.738281 C 20.542969 44.738281 19.492188 44.230469 18.703125 43.386719 C 17.917969 42.582031 17.429688 41.398438 17.429688 40.125 C 17.429688 38.851562 17.917969 37.667969 18.703125 36.84375 C 19.492188 36 20.542969 35.511719 21.742188 35.511719 C 22.867188 35.511719 23.917969 36 24.703125 36.84375 C 25.472656 37.667969 25.980469 38.851562 25.980469 40.125 C 25.980469 41.398438 25.472656 42.582031 24.703125 43.386719 C 23.917969 44.230469 22.867188 44.738281 21.742188 44.738281 Z M 37.300781 46.875 C 38.894531 46.875 40.375 46.332031 41.558594 45.414062 C 41.746094 45.28125 41.855469 45.132812 41.914062 44.960938 L 41.914062 44.945312 L 41.949219 44.851562 C 41.96875 44.738281 42.007812 44.664062 42.007812 44.53125 L 42.007812 40.386719 C 42.007812 39.789062 41.519531 39.335938 40.917969 39.335938 L 37.1875 39.335938 C 36.605469 39.335938 36.121094 39.789062 36.121094 40.386719 C 36.121094 40.96875 36.605469 41.457031 37.1875 41.457031 L 39.871094 41.457031 L 39.871094 44.023438 C 39.121094 44.457031 38.238281 44.738281 37.300781 44.738281 C 35.949219 44.738281 34.769531 44.230469 33.925781 43.367188 C 33.042969 42.523438 32.519531 41.382812 32.519531 40.144531 C 32.519531 38.867188 33.042969 37.726562 33.925781 36.882812 C 34.769531 36.019531 35.949219 35.511719 37.300781 35.511719 C 38.425781 35.511719 39.457031 35.90625 40.261719 36.523438 C 40.730469 36.898438 41.425781 36.804688 41.78125 36.355469 C 42.136719 35.886719 42.0625 35.195312 41.574219 34.835938 C 40.414062 33.917969 38.894531 33.375 37.300781 33.375 C 33.496094 33.375 30.382812 36.375 30.382812 40.144531 C 30.382812 43.894531 33.496094 46.875 37.300781 46.875 Z M 37.300781 46.875 "/>\n      </g>'},movIcon:{extension:".mov",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 15.472656 46.875 C 16.035156 46.875 16.523438 46.40625 16.523438 45.84375 L 16.523438 34.78125 C 16.523438 34.289062 16.152344 33.882812 15.679688 33.777344 L 15.472656 33.75 L 15.453125 33.75 C 15.117188 33.75 14.816406 33.898438 14.609375 34.179688 L 10.878906 39.355469 L 7.148438 34.179688 C 6.960938 33.898438 6.625 33.75 6.324219 33.75 L 6.265625 33.75 C 5.703125 33.75 5.234375 34.21875 5.234375 34.78125 L 5.234375 45.84375 C 5.234375 46.40625 5.703125 46.875 6.265625 46.875 C 6.847656 46.875 7.316406 46.40625 7.316406 45.84375 L 7.316406 37.949219 L 10 41.699219 C 10.203125 41.980469 10.523438 42.132812 10.859375 42.132812 L 10.898438 42.132812 C 11.234375 42.132812 11.535156 41.980469 11.742188 41.699219 L 14.441406 37.949219 L 14.441406 45.84375 C 14.441406 46.40625 14.890625 46.875 15.472656 46.875 Z M 25.460938 46.875 C 27.1875 46.875 28.835938 46.085938 29.941406 44.867188 C 31.105469 43.648438 31.835938 41.980469 31.835938 40.125 C 31.835938 38.269531 31.105469 36.617188 29.941406 35.382812 C 28.835938 34.144531 27.1875 33.375 25.460938 33.375 C 23.660156 33.375 22.011719 34.144531 20.867188 35.382812 C 19.703125 36.617188 19.011719 38.269531 19.011719 40.125 C 19.011719 41.980469 19.703125 43.648438 20.867188 44.867188 C 22.011719 46.085938 23.660156 46.875 25.460938 46.875 Z M 25.460938 44.738281 C 24.261719 44.738281 23.210938 44.230469 22.421875 43.386719 C 21.636719 42.582031 21.148438 41.398438 21.148438 40.125 C 21.148438 38.851562 21.636719 37.667969 22.421875 36.84375 C 23.210938 36 24.261719 35.511719 25.460938 35.511719 C 26.585938 35.511719 27.636719 36 28.421875 36.84375 C 29.191406 37.667969 29.699219 38.851562 29.699219 40.125 C 29.699219 41.398438 29.191406 42.582031 28.421875 43.386719 C 27.636719 44.230469 26.585938 44.738281 25.460938 44.738281 Z M 38.683594 46.855469 L 38.71875 46.855469 C 38.777344 46.835938 38.8125 46.820312 38.871094 46.820312 C 38.886719 46.800781 38.886719 46.800781 38.90625 46.800781 C 38.964844 46.78125 39.019531 46.726562 39.058594 46.707031 L 39.09375 46.6875 L 39.207031 46.59375 C 39.226562 46.574219 39.226562 46.574219 39.246094 46.539062 L 39.339844 46.425781 C 39.355469 46.425781 39.355469 46.425781 39.355469 46.40625 C 39.394531 46.367188 39.414062 46.292969 39.433594 46.257812 L 44.0625 35.304688 C 44.269531 34.800781 44.027344 34.179688 43.5 33.976562 C 42.996094 33.75 42.375 33.992188 42.152344 34.519531 L 38.496094 43.199219 L 34.839844 34.519531 C 34.613281 33.992188 34.011719 33.75 33.507812 33.976562 C 32.964844 34.179688 32.71875 34.800781 32.945312 35.304688 L 37.539062 46.257812 C 37.574219 46.292969 37.613281 46.367188 37.632812 46.40625 C 37.632812 46.425781 37.652344 46.425781 37.652344 46.425781 C 37.667969 46.460938 37.707031 46.5 37.746094 46.539062 C 37.746094 46.574219 37.761719 46.574219 37.761719 46.59375 C 37.820312 46.632812 37.855469 46.648438 37.894531 46.6875 L 37.914062 46.6875 C 37.96875 46.726562 38.042969 46.78125 38.082031 46.800781 L 38.101562 46.800781 C 38.101562 46.800781 38.121094 46.800781 38.121094 46.820312 C 38.15625 46.820312 38.230469 46.835938 38.269531 46.855469 L 38.308594 46.855469 L 38.402344 46.871094 L 38.496094 46.875 C 38.550781 46.875 38.605469 46.875 38.683594 46.855469 Z M 38.683594 46.855469 "/>\n      </g>'},ogvIcon:{extension:".ogv",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 11.511719 46.875 C 13.238281 46.875 14.886719 46.085938 15.996094 44.867188 C 17.15625 43.648438 17.886719 41.980469 17.886719 40.125 C 17.886719 38.269531 17.15625 36.617188 15.996094 35.382812 C 14.886719 34.144531 13.238281 33.375 11.511719 33.375 C 9.714844 33.375 8.0625 34.144531 6.917969 35.382812 C 5.757812 36.617188 5.0625 38.269531 5.0625 40.125 C 5.0625 41.980469 5.757812 43.648438 6.917969 44.867188 C 8.0625 46.085938 9.714844 46.875 11.511719 46.875 Z M 11.511719 44.738281 C 10.3125 44.738281 9.261719 44.230469 8.476562 43.386719 C 7.6875 42.582031 7.199219 41.398438 7.199219 40.125 C 7.199219 38.851562 7.6875 37.667969 8.476562 36.84375 C 9.261719 36 10.3125 35.511719 11.511719 35.511719 C 12.636719 35.511719 13.6875 36 14.476562 36.84375 C 15.246094 37.667969 15.75 38.851562 15.75 40.125 C 15.75 41.398438 15.246094 42.582031 14.476562 43.386719 C 13.6875 44.230469 12.636719 44.738281 11.511719 44.738281 Z M 27.25 46.875 C 28.84375 46.875 30.324219 46.332031 31.507812 45.414062 C 31.695312 45.28125 31.804688 45.132812 31.863281 44.960938 L 31.863281 44.945312 C 31.882812 44.90625 31.882812 44.886719 31.898438 44.851562 C 31.917969 44.738281 31.957031 44.664062 31.957031 44.53125 L 31.957031 40.386719 C 31.957031 39.789062 31.46875 39.335938 30.867188 39.335938 L 27.136719 39.335938 C 26.554688 39.335938 26.070312 39.789062 26.070312 40.386719 C 26.070312 40.96875 26.554688 41.457031 27.136719 41.457031 L 29.820312 41.457031 L 29.820312 44.023438 C 29.070312 44.457031 28.1875 44.738281 27.25 44.738281 C 25.898438 44.738281 24.71875 44.230469 23.875 43.367188 C 22.992188 42.523438 22.46875 41.382812 22.46875 40.144531 C 22.46875 38.867188 22.992188 37.726562 23.875 36.882812 C 24.71875 36.019531 25.898438 35.511719 27.25 35.511719 C 28.375 35.511719 29.40625 35.90625 30.210938 36.523438 C 30.679688 36.898438 31.375 36.804688 31.730469 36.355469 C 32.085938 35.886719 32.011719 35.195312 31.523438 34.835938 C 30.363281 33.917969 28.84375 33.375 27.25 33.375 C 23.445312 33.375 20.332031 36.375 20.332031 40.144531 C 20.332031 43.894531 23.445312 46.875 27.25 46.875 Z M 40.191406 46.855469 L 40.230469 46.855469 C 40.285156 46.835938 40.324219 46.820312 40.378906 46.820312 C 40.398438 46.800781 40.398438 46.800781 40.417969 46.800781 C 40.472656 46.78125 40.53125 46.726562 40.566406 46.707031 C 40.605469 46.6875 40.605469 46.6875 40.605469 46.6875 L 40.71875 46.59375 C 40.738281 46.574219 40.738281 46.574219 40.753906 46.539062 L 40.847656 46.425781 C 40.867188 46.425781 40.867188 46.425781 40.867188 46.40625 C 40.90625 46.367188 40.925781 46.292969 40.941406 46.257812 L 45.574219 35.304688 C 45.78125 34.800781 45.535156 34.179688 45.011719 33.976562 C 44.503906 33.75 43.886719 33.992188 43.660156 34.519531 L 40.003906 43.199219 L 36.347656 34.519531 C 36.125 33.992188 35.523438 33.75 35.019531 33.976562 C 34.472656 34.179688 34.230469 34.800781 34.457031 35.304688 L 39.050781 46.257812 C 39.085938 46.292969 39.125 46.367188 39.144531 46.40625 C 39.144531 46.425781 39.160156 46.425781 39.160156 46.425781 C 39.179688 46.460938 39.21875 46.5 39.253906 46.539062 C 39.253906 46.574219 39.273438 46.574219 39.273438 46.59375 C 39.332031 46.632812 39.367188 46.648438 39.40625 46.6875 L 39.425781 46.6875 C 39.480469 46.726562 39.554688 46.78125 39.59375 46.800781 L 39.613281 46.800781 C 39.613281 46.800781 39.628906 46.800781 39.628906 46.820312 C 39.667969 46.820312 39.742188 46.835938 39.78125 46.855469 L 39.816406 46.855469 L 39.910156 46.871094 L 40.003906 46.875 C 40.0625 46.875 40.117188 46.875 40.191406 46.855469 Z M 40.191406 46.855469 "/>\n      </g>'},pngIcon:{extension:".png",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.523438 46.875 C 8.105469 46.875 8.574219 46.40625 8.574219 45.84375 L 8.574219 41.773438 L 10.878906 41.773438 C 13.109375 41.773438 14.910156 39.976562 14.910156 37.78125 C 14.910156 35.550781 13.109375 33.75 10.878906 33.75 L 7.523438 33.75 C 6.960938 33.75 6.492188 34.199219 6.492188 34.78125 L 6.492188 45.84375 C 6.492188 46.40625 6.960938 46.875 7.523438 46.875 Z M 10.878906 39.695312 L 8.574219 39.695312 L 8.574219 35.832031 L 10.878906 35.832031 C 11.964844 35.832031 12.808594 36.695312 12.828125 37.78125 C 12.808594 38.832031 11.964844 39.695312 10.878906 39.695312 Z M 26.75 46.875 C 27.3125 46.875 27.78125 46.40625 27.78125 45.84375 L 27.78125 34.949219 C 27.78125 34.40625 27.3125 33.9375 26.75 33.9375 C 26.1875 33.9375 25.738281 34.40625 25.738281 34.949219 L 25.738281 42.675781 L 19.679688 34.292969 C 19.363281 33.84375 18.722656 33.75 18.253906 34.070312 C 17.972656 34.273438 17.824219 34.613281 17.84375 34.929688 L 17.84375 45.84375 C 17.84375 46.40625 18.292969 46.875 18.875 46.875 C 19.417969 46.875 19.886719 46.40625 19.886719 45.84375 L 19.886719 38.0625 L 25.886719 46.386719 C 25.90625 46.425781 25.941406 46.460938 25.980469 46.5 C 26.167969 46.726562 26.449219 46.875 26.75 46.875 Z M 38.082031 46.875 C 39.675781 46.875 41.15625 46.332031 42.339844 45.414062 C 42.527344 45.28125 42.636719 45.132812 42.695312 44.960938 L 42.695312 44.945312 C 42.714844 44.90625 42.714844 44.886719 42.730469 44.851562 C 42.75 44.738281 42.789062 44.664062 42.789062 44.53125 L 42.789062 40.386719 C 42.789062 39.789062 42.300781 39.335938 41.699219 39.335938 L 37.96875 39.335938 C 37.386719 39.335938 36.902344 39.789062 36.902344 40.386719 C 36.902344 40.96875 37.386719 41.457031 37.96875 41.457031 L 40.652344 41.457031 L 40.652344 44.023438 C 39.902344 44.457031 39.019531 44.738281 38.082031 44.738281 C 36.730469 44.738281 35.550781 44.230469 34.707031 43.367188 C 33.824219 42.523438 33.300781 41.382812 33.300781 40.144531 C 33.300781 38.867188 33.824219 37.726562 34.707031 36.882812 C 35.550781 36.019531 36.730469 35.511719 38.082031 35.511719 C 39.207031 35.511719 40.238281 35.90625 41.042969 36.523438 C 41.511719 36.898438 42.207031 36.804688 42.5625 36.355469 C 42.917969 35.886719 42.84375 35.195312 42.355469 34.835938 C 41.195312 33.917969 39.675781 33.375 38.082031 33.375 C 34.277344 33.375 31.164062 36.375 31.164062 40.144531 C 31.164062 43.894531 34.277344 46.875 38.082031 46.875 Z M 38.082031 46.875 "/>\n      </g>'},txtIcon:{extension:".txt",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 12.847656 46.875 C 13.429688 46.875 13.878906 46.425781 13.878906 45.84375 L 13.878906 35.832031 L 16.859375 35.832031 C 17.421875 35.832031 17.890625 35.34375 17.890625 34.78125 C 17.890625 34.199219 17.421875 33.75 16.859375 33.75 L 8.855469 33.75 C 8.273438 33.75 7.824219 34.199219 7.824219 34.78125 C 7.824219 35.34375 8.273438 35.832031 8.855469 35.832031 L 11.816406 35.832031 L 11.816406 45.84375 C 11.816406 46.425781 12.285156 46.875 12.847656 46.875 Z M 29.019531 46.875 C 29.222656 46.875 29.429688 46.800781 29.617188 46.667969 C 30.085938 46.351562 30.160156 45.695312 29.84375 45.242188 L 26.28125 40.367188 L 29.84375 35.53125 C 30.160156 35.0625 30.085938 34.425781 29.617188 34.105469 C 29.148438 33.75 28.53125 33.84375 28.175781 34.332031 L 25.023438 38.644531 L 21.855469 34.332031 C 21.535156 33.84375 20.878906 33.75 20.429688 34.105469 C 19.960938 34.425781 19.867188 35.0625 20.1875 35.53125 L 23.75 40.367188 L 20.1875 45.242188 C 19.867188 45.695312 19.960938 46.351562 20.429688 46.667969 C 20.597656 46.800781 20.804688 46.875 21.03125 46.875 C 21.347656 46.875 21.648438 46.707031 21.855469 46.445312 L 25.023438 42.113281 L 28.175781 46.445312 C 28.378906 46.707031 28.679688 46.875 29.019531 46.875 Z M 37.464844 46.875 C 38.042969 46.875 38.496094 46.425781 38.496094 45.84375 L 38.496094 35.832031 L 41.476562 35.832031 C 42.039062 35.832031 42.507812 35.34375 42.507812 34.78125 C 42.507812 34.199219 42.039062 33.75 41.476562 33.75 L 33.46875 33.75 C 32.886719 33.75 32.4375 34.199219 32.4375 34.78125 C 32.4375 35.34375 32.886719 35.832031 33.46875 35.832031 L 36.433594 35.832031 L 36.433594 45.84375 C 36.433594 46.425781 36.902344 46.875 37.464844 46.875 Z M 37.464844 46.875 "/>\n      </g>'},webmIcon:{extension:".webm",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.195312 43.734375 L 7.242188 43.734375 C 7.273438 43.71875 7.304688 43.703125 7.367188 43.703125 C 7.367188 43.6875 7.382812 43.6875 7.382812 43.6875 L 7.398438 43.6875 C 7.429688 43.671875 7.476562 43.625 7.523438 43.59375 L 7.554688 43.59375 C 7.585938 43.5625 7.617188 43.53125 7.648438 43.515625 C 7.648438 43.5 7.664062 43.5 7.664062 43.46875 L 7.757812 43.375 C 7.757812 43.375 7.757812 43.359375 7.773438 43.359375 C 7.789062 43.328125 7.820312 43.265625 7.835938 43.21875 L 9.882812 38.375 L 11.929688 43.21875 C 11.945312 43.265625 11.960938 43.328125 11.992188 43.359375 C 11.992188 43.359375 11.992188 43.375 12.023438 43.375 L 12.085938 43.46875 C 12.101562 43.5 12.101562 43.5 12.117188 43.515625 C 12.148438 43.53125 12.179688 43.5625 12.226562 43.59375 L 12.242188 43.59375 C 12.273438 43.625 12.320312 43.671875 12.382812 43.6875 C 12.398438 43.6875 12.398438 43.6875 12.414062 43.703125 C 12.445312 43.703125 12.476562 43.71875 12.523438 43.734375 L 12.570312 43.734375 L 12.640625 43.746094 L 12.710938 43.75 C 12.773438 43.75 12.820312 43.75 12.867188 43.734375 L 12.898438 43.734375 C 12.945312 43.71875 12.992188 43.703125 13.023438 43.703125 C 13.023438 43.6875 13.039062 43.6875 13.039062 43.6875 L 13.054688 43.6875 C 13.117188 43.671875 13.148438 43.625 13.195312 43.59375 L 13.210938 43.59375 C 13.242188 43.5625 13.289062 43.53125 13.320312 43.515625 C 13.320312 43.5 13.335938 43.5 13.335938 43.46875 C 13.367188 43.4375 13.398438 43.40625 13.414062 43.375 C 13.414062 43.375 13.429688 43.359375 13.429688 43.359375 C 13.460938 43.328125 13.492188 43.265625 13.507812 43.21875 L 17.335938 34.109375 C 17.523438 33.6875 17.320312 33.171875 16.898438 33 C 16.445312 32.8125 15.945312 33.015625 15.757812 33.453125 L 12.710938 40.6875 L 10.695312 35.890625 C 10.539062 35.546875 10.210938 35.359375 9.882812 35.359375 C 9.539062 35.359375 9.210938 35.546875 9.070312 35.890625 L 7.054688 40.6875 L 3.992188 33.453125 C 3.820312 33.015625 3.304688 32.8125 2.882812 33 C 2.429688 33.171875 2.242188 33.6875 2.414062 34.109375 L 6.257812 43.21875 C 6.289062 43.265625 6.304688 43.328125 6.335938 43.359375 L 6.335938 43.375 C 6.367188 43.40625 6.382812 43.4375 6.414062 43.46875 C 6.429688 43.5 6.429688 43.5 6.445312 43.515625 C 6.492188 43.53125 6.507812 43.5625 6.554688 43.59375 L 6.570312 43.59375 C 6.601562 43.625 6.664062 43.671875 6.710938 43.6875 C 6.726562 43.6875 6.726562 43.6875 6.742188 43.703125 C 6.773438 43.703125 6.804688 43.71875 6.851562 43.734375 L 6.898438 43.734375 L 6.976562 43.746094 L 7.054688 43.75 C 7.101562 43.75 7.148438 43.75 7.195312 43.734375 Z M 25.179688 43.75 C 25.632812 43.75 26.039062 43.359375 26.039062 42.890625 C 26.039062 42.40625 25.632812 42.015625 25.179688 42.015625 L 20.945312 42.015625 L 20.945312 39.140625 L 24.585938 39.140625 C 25.054688 39.140625 25.445312 38.75 25.445312 38.265625 C 25.445312 37.8125 25.054688 37.40625 24.585938 37.40625 L 20.945312 37.40625 L 20.945312 34.546875 L 25.179688 34.546875 C 25.632812 34.546875 26.039062 34.15625 26.039062 33.671875 C 26.039062 33.1875 25.632812 32.8125 25.179688 32.8125 L 20.070312 32.8125 C 19.585938 32.8125 19.210938 33.1875 19.210938 33.671875 L 19.210938 42.890625 C 19.210938 43.359375 19.585938 43.75 20.070312 43.75 C 20.070312 43.75 20.085938 43.734375 20.085938 43.734375 C 20.085938 43.734375 20.085938 43.75 20.117188 43.75 Z M 31.539062 43.75 C 33.382812 43.75 34.882812 42.25 34.882812 40.390625 C 34.882812 39.203125 34.242188 38.15625 33.304688 37.5625 C 33.679688 37.0625 33.898438 36.453125 33.898438 35.78125 C 33.898438 34.140625 32.570312 32.8125 30.929688 32.8125 L 28.710938 32.8125 C 28.242188 32.8125 27.851562 33.1875 27.851562 33.671875 L 27.851562 42.890625 C 27.851562 43.359375 28.242188 43.75 28.710938 43.75 L 28.757812 43.734375 C 28.757812 43.734375 28.757812 43.75 28.773438 43.75 Z M 30.929688 37.046875 L 29.585938 37.046875 L 29.585938 34.546875 L 30.929688 34.546875 C 31.617188 34.546875 32.164062 35.09375 32.164062 35.78125 C 32.164062 36.46875 31.617188 37.046875 30.929688 37.046875 Z M 31.539062 42.015625 L 29.585938 42.015625 L 29.585938 38.78125 L 31.539062 38.78125 C 32.429688 38.796875 33.148438 39.5 33.148438 40.390625 C 33.148438 41.296875 32.429688 42 31.539062 42.015625 Z M 45.664062 43.75 C 46.132812 43.75 46.539062 43.359375 46.539062 42.890625 L 46.539062 33.671875 C 46.539062 33.269531 46.242188 32.9375 45.859375 32.839844 L 45.664062 32.8125 L 45.648438 32.8125 C 45.367188 32.8125 45.117188 32.9375 44.945312 33.171875 L 41.835938 37.484375 L 38.726562 33.171875 C 38.570312 32.9375 38.289062 32.8125 38.039062 32.8125 L 37.992188 32.8125 C 37.523438 32.8125 37.132812 33.203125 37.132812 33.671875 L 37.132812 42.890625 C 37.132812 43.359375 37.523438 43.75 37.992188 43.75 C 38.476562 43.75 38.867188 43.359375 38.867188 42.890625 L 38.867188 36.3125 L 41.101562 39.4375 C 41.273438 39.671875 41.539062 39.796875 41.820312 39.796875 L 41.851562 39.796875 C 42.132812 39.796875 42.382812 39.671875 42.554688 39.4375 L 44.804688 36.3125 L 44.804688 42.890625 C 44.804688 43.359375 45.179688 43.75 45.664062 43.75 Z M 45.664062 43.75 "/>\n      </g>'},webpIcon:{extension:".webp",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9.234375 43.734375 L 9.28125 43.734375 C 9.3125 43.71875 9.34375 43.703125 9.40625 43.703125 L 9.414062 43.6875 C 9.421875 43.6875 9.421875 43.6875 9.4375 43.6875 C 9.46875 43.671875 9.515625 43.625 9.5625 43.59375 L 9.59375 43.59375 C 9.625 43.5625 9.65625 43.53125 9.6875 43.515625 C 9.6875 43.5 9.703125 43.5 9.703125 43.46875 L 9.796875 43.375 C 9.796875 43.375 9.796875 43.359375 9.8125 43.359375 C 9.828125 43.328125 9.859375 43.265625 9.875 43.21875 L 11.921875 38.375 L 13.96875 43.21875 C 13.984375 43.265625 14 43.328125 14.03125 43.359375 C 14.03125 43.359375 14.03125 43.375 14.0625 43.375 L 14.125 43.46875 C 14.140625 43.5 14.140625 43.5 14.15625 43.515625 L 14.203125 43.546875 L 14.265625 43.59375 C 14.265625 43.59375 14.265625 43.59375 14.28125 43.59375 C 14.3125 43.625 14.359375 43.671875 14.421875 43.6875 C 14.4375 43.6875 14.4375 43.6875 14.453125 43.703125 C 14.484375 43.703125 14.515625 43.71875 14.5625 43.734375 L 14.609375 43.734375 L 14.679688 43.746094 L 14.75 43.75 C 14.8125 43.75 14.859375 43.75 14.90625 43.734375 L 14.9375 43.734375 C 14.984375 43.71875 15.03125 43.703125 15.0625 43.703125 C 15.0625 43.6875 15.078125 43.6875 15.078125 43.6875 L 15.09375 43.6875 C 15.15625 43.671875 15.1875 43.625 15.234375 43.59375 L 15.25 43.59375 C 15.28125 43.5625 15.328125 43.53125 15.359375 43.515625 C 15.359375 43.5 15.375 43.5 15.375 43.46875 C 15.40625 43.4375 15.4375 43.40625 15.453125 43.375 L 15.46875 43.359375 C 15.5 43.328125 15.53125 43.265625 15.546875 43.21875 L 19.375 34.109375 C 19.5625 33.6875 19.359375 33.171875 18.9375 33 C 18.484375 32.8125 17.984375 33.015625 17.796875 33.453125 L 14.75 40.6875 L 12.734375 35.890625 C 12.578125 35.546875 12.25 35.359375 11.921875 35.359375 C 11.578125 35.359375 11.25 35.546875 11.109375 35.890625 L 9.09375 40.6875 L 6.03125 33.453125 C 5.859375 33.015625 5.34375 32.8125 4.921875 33 C 4.46875 33.171875 4.28125 33.6875 4.453125 34.109375 L 8.296875 43.21875 C 8.328125 43.265625 8.34375 43.328125 8.375 43.359375 L 8.375 43.375 C 8.40625 43.40625 8.421875 43.4375 8.453125 43.46875 C 8.46875 43.5 8.46875 43.5 8.484375 43.515625 L 8.539062 43.546875 L 8.59375 43.59375 C 8.59375 43.59375 8.59375 43.59375 8.609375 43.59375 C 8.640625 43.625 8.703125 43.671875 8.75 43.6875 C 8.765625 43.6875 8.765625 43.6875 8.78125 43.703125 C 8.8125 43.703125 8.84375 43.71875 8.890625 43.734375 L 8.9375 43.734375 L 9.015625 43.746094 L 9.09375 43.75 C 9.140625 43.75 9.1875 43.75 9.234375 43.734375 Z M 27.21875 43.75 C 27.671875 43.75 28.078125 43.359375 28.078125 42.890625 C 28.078125 42.40625 27.671875 42.015625 27.21875 42.015625 L 22.984375 42.015625 L 22.984375 39.140625 L 26.625 39.140625 C 27.09375 39.140625 27.484375 38.75 27.484375 38.265625 C 27.484375 37.8125 27.09375 37.40625 26.625 37.40625 L 22.984375 37.40625 L 22.984375 34.546875 L 27.21875 34.546875 C 27.671875 34.546875 28.078125 34.15625 28.078125 33.671875 C 28.078125 33.1875 27.671875 32.8125 27.21875 32.8125 L 22.109375 32.8125 C 21.625 32.8125 21.25 33.1875 21.25 33.671875 L 21.25 42.890625 C 21.25 43.359375 21.625 43.75 22.109375 43.75 L 22.125 43.734375 C 22.125 43.734375 22.125 43.75 22.15625 43.75 Z M 33.578125 43.75 C 35.421875 43.75 36.921875 42.25 36.921875 40.390625 C 36.921875 39.203125 36.28125 38.15625 35.34375 37.5625 C 35.71875 37.0625 35.9375 36.453125 35.9375 35.78125 C 35.9375 34.140625 34.609375 32.8125 32.96875 32.8125 L 30.75 32.8125 C 30.28125 32.8125 29.890625 33.1875 29.890625 33.671875 L 29.890625 42.890625 C 29.890625 43.359375 30.28125 43.75 30.75 43.75 C 30.765625 43.75 30.765625 43.734375 30.796875 43.734375 C 30.796875 43.734375 30.796875 43.75 30.8125 43.75 Z M 32.96875 37.046875 L 31.625 37.046875 L 31.625 34.546875 L 32.96875 34.546875 C 33.65625 34.546875 34.203125 35.09375 34.203125 35.78125 C 34.203125 36.46875 33.65625 37.046875 32.96875 37.046875 Z M 33.578125 42.015625 L 31.625 42.015625 L 31.625 38.78125 L 33.578125 38.78125 C 34.46875 38.796875 35.1875 39.5 35.1875 40.390625 C 35.1875 41.296875 34.46875 42 33.578125 42.015625 Z M 40.03125 43.75 C 40.515625 43.75 40.90625 43.359375 40.90625 42.890625 L 40.90625 39.5 L 42.828125 39.5 C 44.6875 39.5 46.1875 38 46.1875 36.171875 C 46.1875 34.3125 44.6875 32.8125 42.828125 32.8125 L 40.03125 32.8125 C 39.5625 32.8125 39.171875 33.1875 39.171875 33.671875 L 39.171875 42.890625 C 39.171875 43.359375 39.5625 43.75 40.03125 43.75 Z M 42.828125 37.765625 L 40.90625 37.765625 L 40.90625 34.546875 L 42.828125 34.546875 C 43.734375 34.546875 44.4375 35.265625 44.453125 36.171875 C 44.4375 37.046875 43.734375 37.765625 42.828125 37.765625 Z M 42.828125 37.765625 "/>\n      </g>'},wmvIcon:{extension:".wmv",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.484375 43.734375 L 8.53125 43.734375 C 8.5625 43.71875 8.59375 43.703125 8.65625 43.703125 L 8.664062 43.6875 C 8.671875 43.6875 8.671875 43.6875 8.6875 43.6875 C 8.71875 43.671875 8.765625 43.625 8.8125 43.59375 L 8.84375 43.59375 C 8.875 43.5625 8.90625 43.53125 8.9375 43.515625 C 8.9375 43.5 8.953125 43.5 8.953125 43.46875 L 9.046875 43.375 C 9.046875 43.375 9.046875 43.359375 9.0625 43.359375 C 9.078125 43.328125 9.109375 43.265625 9.125 43.21875 L 11.171875 38.375 L 13.21875 43.21875 C 13.234375 43.265625 13.25 43.328125 13.28125 43.359375 C 13.28125 43.359375 13.28125 43.375 13.3125 43.375 L 13.375 43.46875 C 13.390625 43.5 13.390625 43.5 13.40625 43.515625 L 13.453125 43.546875 L 13.515625 43.59375 C 13.515625 43.59375 13.515625 43.59375 13.53125 43.59375 C 13.5625 43.625 13.609375 43.671875 13.671875 43.6875 C 13.6875 43.6875 13.6875 43.6875 13.703125 43.703125 C 13.734375 43.703125 13.765625 43.71875 13.8125 43.734375 L 13.859375 43.734375 L 13.929688 43.746094 L 14 43.75 C 14.0625 43.75 14.109375 43.75 14.15625 43.734375 L 14.1875 43.734375 C 14.234375 43.71875 14.28125 43.703125 14.3125 43.703125 C 14.3125 43.6875 14.328125 43.6875 14.328125 43.6875 L 14.34375 43.6875 C 14.40625 43.671875 14.4375 43.625 14.484375 43.59375 L 14.5 43.59375 C 14.53125 43.5625 14.578125 43.53125 14.609375 43.515625 C 14.609375 43.5 14.625 43.5 14.625 43.46875 C 14.65625 43.4375 14.6875 43.40625 14.703125 43.375 L 14.71875 43.359375 C 14.75 43.328125 14.78125 43.265625 14.796875 43.21875 L 18.625 34.109375 C 18.8125 33.6875 18.609375 33.171875 18.1875 33 C 17.734375 32.8125 17.234375 33.015625 17.046875 33.453125 L 14 40.6875 L 11.984375 35.890625 C 11.828125 35.546875 11.5 35.359375 11.171875 35.359375 C 10.828125 35.359375 10.5 35.546875 10.359375 35.890625 L 8.34375 40.6875 L 5.28125 33.453125 C 5.109375 33.015625 4.59375 32.8125 4.171875 33 C 3.71875 33.171875 3.53125 33.6875 3.703125 34.109375 L 7.546875 43.21875 C 7.578125 43.265625 7.59375 43.328125 7.625 43.359375 L 7.625 43.375 C 7.65625 43.40625 7.671875 43.4375 7.703125 43.46875 C 7.71875 43.5 7.71875 43.5 7.734375 43.515625 L 7.789062 43.546875 L 7.84375 43.59375 C 7.84375 43.59375 7.84375 43.59375 7.859375 43.59375 C 7.890625 43.625 7.953125 43.671875 8 43.6875 C 8.015625 43.6875 8.015625 43.6875 8.03125 43.703125 C 8.0625 43.703125 8.09375 43.71875 8.140625 43.734375 L 8.1875 43.734375 L 8.265625 43.746094 L 8.34375 43.75 C 8.390625 43.75 8.4375 43.75 8.484375 43.734375 Z M 29.03125 43.75 C 29.5 43.75 29.90625 43.359375 29.90625 42.890625 L 29.90625 33.671875 C 29.90625 33.269531 29.609375 32.9375 29.226562 32.839844 L 29.03125 32.8125 L 29.015625 32.8125 C 28.734375 32.8125 28.484375 32.9375 28.3125 33.171875 L 25.203125 37.484375 L 22.09375 33.171875 C 21.9375 32.9375 21.65625 32.8125 21.40625 32.8125 L 21.359375 32.8125 C 20.890625 32.8125 20.5 33.203125 20.5 33.671875 L 20.5 42.890625 C 20.5 43.359375 20.890625 43.75 21.359375 43.75 C 21.84375 43.75 22.234375 43.359375 22.234375 42.890625 L 22.234375 36.3125 L 24.46875 39.4375 C 24.640625 39.671875 24.90625 39.796875 25.1875 39.796875 L 25.21875 39.796875 C 25.5 39.796875 25.75 39.671875 25.921875 39.4375 L 28.171875 36.3125 L 28.171875 42.890625 C 28.171875 43.359375 28.546875 43.75 29.03125 43.75 Z M 37.015625 43.734375 L 37.0625 43.734375 C 37.09375 43.71875 37.125 43.703125 37.1875 43.703125 L 37.195312 43.6875 C 37.203125 43.6875 37.203125 43.6875 37.21875 43.6875 C 37.25 43.671875 37.296875 43.625 37.34375 43.59375 L 37.375 43.59375 C 37.40625 43.5625 37.4375 43.53125 37.46875 43.515625 C 37.46875 43.5 37.484375 43.5 37.484375 43.46875 L 37.578125 43.375 C 37.578125 43.375 37.578125 43.359375 37.59375 43.359375 C 37.609375 43.328125 37.640625 43.265625 37.65625 43.21875 L 39.703125 38.375 L 41.75 43.21875 C 41.765625 43.265625 41.78125 43.328125 41.8125 43.359375 C 41.8125 43.359375 41.8125 43.375 41.84375 43.375 L 41.90625 43.46875 C 41.921875 43.5 41.921875 43.5 41.9375 43.515625 L 41.984375 43.546875 L 42.046875 43.59375 C 42.046875 43.59375 42.046875 43.59375 42.0625 43.59375 C 42.09375 43.625 42.140625 43.671875 42.203125 43.6875 C 42.21875 43.6875 42.21875 43.6875 42.234375 43.703125 C 42.265625 43.703125 42.296875 43.71875 42.34375 43.734375 L 42.390625 43.734375 L 42.460938 43.746094 L 42.53125 43.75 C 42.59375 43.75 42.640625 43.75 42.6875 43.734375 L 42.71875 43.734375 C 42.765625 43.71875 42.8125 43.703125 42.84375 43.703125 C 42.84375 43.6875 42.859375 43.6875 42.859375 43.6875 L 42.875 43.6875 C 42.9375 43.671875 42.96875 43.625 43.015625 43.59375 L 43.03125 43.59375 C 43.0625 43.5625 43.109375 43.53125 43.140625 43.515625 C 43.140625 43.5 43.15625 43.5 43.15625 43.46875 C 43.1875 43.4375 43.21875 43.40625 43.234375 43.375 L 43.25 43.359375 C 43.28125 43.328125 43.3125 43.265625 43.328125 43.21875 L 47.15625 34.109375 C 47.34375 33.6875 47.140625 33.171875 46.71875 33 C 46.265625 32.8125 45.765625 33.015625 45.578125 33.453125 L 42.53125 40.6875 L 40.515625 35.890625 C 40.359375 35.546875 40.03125 35.359375 39.703125 35.359375 C 39.359375 35.359375 39.03125 35.546875 38.890625 35.890625 L 36.875 40.6875 L 33.8125 33.453125 C 33.640625 33.015625 33.125 32.8125 32.703125 33 C 32.25 33.171875 32.0625 33.6875 32.234375 34.109375 L 36.078125 43.21875 C 36.109375 43.265625 36.125 43.328125 36.15625 43.359375 L 36.15625 43.375 C 36.1875 43.40625 36.203125 43.4375 36.234375 43.46875 C 36.25 43.5 36.25 43.5 36.265625 43.515625 L 36.320312 43.546875 L 36.375 43.59375 C 36.375 43.59375 36.375 43.59375 36.390625 43.59375 C 36.421875 43.625 36.484375 43.671875 36.53125 43.6875 C 36.546875 43.6875 36.546875 43.6875 36.5625 43.703125 C 36.59375 43.703125 36.625 43.71875 36.671875 43.734375 L 36.71875 43.734375 L 36.796875 43.746094 L 36.875 43.75 C 36.921875 43.75 36.96875 43.75 37.015625 43.734375 Z M 37.015625 43.734375 "/>\n      </g>'},xlsIcon:{extension:".xls",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.21875 46.875 C 17.425781 46.875 17.632812 46.800781 17.820312 46.667969 C 18.289062 46.351562 18.363281 45.695312 18.042969 45.242188 L 14.480469 40.367188 L 18.042969 35.53125 C 18.363281 35.0625 18.289062 34.425781 17.820312 34.105469 C 17.351562 33.75 16.730469 33.84375 16.375 34.332031 L 13.226562 38.644531 L 10.054688 34.332031 C 9.738281 33.84375 9.082031 33.75 8.632812 34.105469 C 8.164062 34.425781 8.070312 35.0625 8.386719 35.53125 L 11.949219 40.367188 L 8.386719 45.242188 C 8.070312 45.695312 8.164062 46.351562 8.632812 46.667969 C 8.800781 46.800781 9.007812 46.875 9.230469 46.875 C 9.550781 46.875 9.851562 46.707031 10.054688 46.445312 L 13.226562 42.113281 L 16.375 46.445312 C 16.582031 46.707031 16.882812 46.875 17.21875 46.875 Z M 29.351562 46.875 C 29.894531 46.875 30.382812 46.40625 30.382812 45.84375 C 30.382812 45.261719 29.894531 44.792969 29.351562 44.792969 L 24.269531 44.792969 L 24.269531 34.78125 C 24.269531 34.21875 23.800781 33.75 23.21875 33.75 C 22.636719 33.75 22.1875 34.21875 22.1875 34.78125 L 22.1875 45.84375 C 22.1875 46.335938 22.53125 46.757812 23.007812 46.855469 L 23.222656 46.875 Z M 37.28125 46.855469 C 38.613281 46.855469 39.832031 46.460938 40.75 45.789062 C 41.6875 45.113281 42.363281 44.082031 42.363281 42.882812 C 42.363281 42.300781 42.195312 41.738281 41.914062 41.289062 C 41.480469 40.59375 40.804688 40.105469 40.039062 39.730469 C 39.289062 39.375 38.40625 39.132812 37.449219 38.945312 L 37.414062 38.945312 C 36.398438 38.757812 35.554688 38.457031 35.070312 38.117188 C 34.824219 37.949219 34.65625 37.78125 34.5625 37.632812 C 34.46875 37.480469 34.429688 37.332031 34.429688 37.105469 C 34.429688 36.710938 34.636719 36.300781 35.144531 35.925781 C 35.648438 35.550781 36.398438 35.289062 37.242188 35.289062 C 38.386719 35.289062 39.304688 35.851562 40.261719 36.488281 C 40.710938 36.789062 41.3125 36.65625 41.59375 36.207031 C 41.894531 35.773438 41.761719 35.175781 41.332031 34.875 C 40.375 34.257812 39.042969 33.375 37.242188 33.375 C 36.023438 33.375 34.882812 33.730469 34 34.367188 C 33.136719 35.007812 32.5 35.980469 32.5 37.105469 C 32.5 37.667969 32.648438 38.195312 32.929688 38.644531 C 33.34375 39.300781 33.960938 39.769531 34.675781 40.105469 C 35.386719 40.445312 36.210938 40.667969 37.09375 40.835938 L 37.132812 40.835938 C 38.238281 41.042969 39.15625 41.363281 39.699219 41.71875 C 39.980469 41.90625 40.148438 42.09375 40.261719 42.28125 C 40.375 42.46875 40.429688 42.636719 40.429688 42.882812 C 40.429688 43.351562 40.1875 43.820312 39.625 44.230469 C 39.0625 44.644531 38.21875 44.925781 37.28125 44.925781 C 35.949219 44.945312 34.523438 44.15625 33.699219 43.480469 C 33.289062 43.144531 32.667969 43.199219 32.332031 43.613281 C 32.011719 44.023438 32.070312 44.644531 32.480469 44.980469 C 33.550781 45.824219 35.257812 46.835938 37.28125 46.855469 Z M 37.28125 46.855469 "/>\n      </g>'},xlsxIcon:{extension:".xlsx",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 13.070312 43.75 C 13.242188 43.75 13.414062 43.6875 13.570312 43.578125 C 13.960938 43.3125 14.023438 42.765625 13.757812 42.390625 L 10.789062 38.328125 L 13.757812 34.296875 C 14.023438 33.90625 13.960938 33.375 13.570312 33.109375 C 13.179688 32.8125 12.664062 32.890625 12.367188 33.296875 L 9.742188 36.890625 L 7.101562 33.296875 C 6.835938 32.890625 6.289062 32.8125 5.914062 33.109375 C 5.523438 33.375 5.445312 33.90625 5.710938 34.296875 L 8.679688 38.328125 L 5.710938 42.390625 C 5.445312 42.765625 5.523438 43.3125 5.914062 43.578125 C 6.054688 43.6875 6.226562 43.75 6.414062 43.75 C 6.679688 43.75 6.929688 43.609375 7.101562 43.390625 L 9.742188 39.78125 L 12.367188 43.390625 C 12.539062 43.609375 12.789062 43.75 13.070312 43.75 Z M 23.179688 43.75 C 23.632812 43.75 24.039062 43.359375 24.039062 42.890625 C 24.039062 42.40625 23.632812 42.015625 23.179688 42.015625 L 18.945312 42.015625 L 18.945312 33.671875 C 18.945312 33.203125 18.554688 32.8125 18.070312 32.8125 C 17.585938 32.8125 17.210938 33.203125 17.210938 33.671875 L 17.210938 42.890625 C 17.210938 43.359375 17.585938 43.75 18.070312 43.75 Z M 29.789062 43.734375 C 30.898438 43.734375 31.914062 43.40625 32.679688 42.84375 C 33.460938 42.28125 34.023438 41.421875 34.023438 40.421875 C 34.023438 39.9375 33.882812 39.46875 33.648438 39.09375 C 33.289062 38.515625 32.726562 38.109375 32.085938 37.796875 C 31.460938 37.5 30.726562 37.296875 29.929688 37.140625 L 29.898438 37.140625 C 29.054688 36.984375 28.351562 36.734375 27.945312 36.453125 C 27.742188 36.3125 27.601562 36.171875 27.523438 36.046875 C 27.445312 35.921875 27.414062 35.796875 27.414062 35.609375 C 27.414062 35.28125 27.585938 34.9375 28.007812 34.625 C 28.429688 34.3125 29.054688 34.09375 29.757812 34.09375 C 30.710938 34.09375 31.476562 34.5625 32.273438 35.09375 C 32.648438 35.34375 33.148438 35.234375 33.382812 34.859375 C 33.632812 34.5 33.523438 34 33.164062 33.75 C 32.367188 33.234375 31.257812 32.5 29.757812 32.5 C 28.742188 32.5 27.789062 32.796875 27.054688 33.328125 C 26.335938 33.859375 25.804688 34.671875 25.804688 35.609375 C 25.804688 36.078125 25.929688 36.515625 26.164062 36.890625 C 26.507812 37.4375 27.023438 37.828125 27.617188 38.109375 C 28.210938 38.390625 28.898438 38.578125 29.632812 38.71875 L 29.664062 38.71875 C 30.585938 38.890625 31.351562 39.15625 31.804688 39.453125 C 32.039062 39.609375 32.179688 39.765625 32.273438 39.921875 C 32.367188 40.078125 32.414062 40.21875 32.414062 40.421875 C 32.414062 40.8125 32.210938 41.203125 31.742188 41.546875 C 31.273438 41.890625 30.570312 42.125 29.789062 42.125 C 28.679688 42.140625 27.492188 41.484375 26.804688 40.921875 C 26.460938 40.640625 25.945312 40.6875 25.664062 41.03125 C 25.398438 41.375 25.445312 41.890625 25.789062 42.171875 C 26.679688 42.875 28.101562 43.71875 29.789062 43.734375 Z M 43.179688 43.75 C 43.351562 43.75 43.523438 43.6875 43.679688 43.578125 C 44.070312 43.3125 44.132812 42.765625 43.867188 42.390625 L 40.898438 38.328125 L 43.867188 34.296875 C 44.132812 33.90625 44.070312 33.375 43.679688 33.109375 C 43.289062 32.8125 42.773438 32.890625 42.476562 33.296875 L 39.851562 36.890625 L 37.210938 33.296875 C 36.945312 32.890625 36.398438 32.8125 36.023438 33.109375 C 35.632812 33.375 35.554688 33.90625 35.820312 34.296875 L 38.789062 38.328125 L 35.820312 42.390625 C 35.554688 42.765625 35.632812 43.3125 36.023438 43.578125 C 36.164062 43.6875 36.335938 43.75 36.523438 43.75 C 36.789062 43.75 37.039062 43.609375 37.210938 43.390625 L 39.851562 39.78125 L 42.476562 43.390625 C 42.648438 43.609375 42.898438 43.75 43.179688 43.75 Z M 43.179688 43.75 "/>\n      </g>'},zipIcon:{extension:".zip",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 20.175781 46.875 C 20.855469 46.875 21.402344 46.351562 21.402344 45.671875 C 21.402344 44.992188 20.855469 44.445312 20.175781 44.445312 L 13.132812 44.445312 L 21.183594 33.488281 L 21.183594 33.445312 C 21.203125 33.421875 21.226562 33.378906 21.25 33.335938 C 21.269531 33.3125 21.269531 33.289062 21.292969 33.269531 C 21.3125 33.203125 21.3125 33.179688 21.335938 33.136719 C 21.335938 33.09375 21.378906 33.070312 21.378906 33.007812 C 21.378906 32.984375 21.378906 32.960938 21.402344 32.917969 L 21.402344 32.679688 C 21.402344 32.632812 21.402344 32.613281 21.378906 32.546875 C 21.378906 32.503906 21.378906 32.480469 21.335938 32.4375 C 21.335938 32.414062 21.3125 32.371094 21.3125 32.304688 C 21.292969 32.285156 21.269531 32.242188 21.269531 32.21875 C 21.25 32.195312 21.226562 32.152344 21.203125 32.109375 C 21.183594 32.066406 21.160156 32.042969 21.117188 32.023438 C 21.09375 32 21.074219 31.957031 21.050781 31.933594 C 21.03125 31.914062 21.007812 31.867188 20.964844 31.847656 C 20.941406 31.824219 20.941406 31.804688 20.898438 31.78125 L 20.875 31.78125 C 20.832031 31.757812 20.8125 31.738281 20.765625 31.714844 C 20.746094 31.695312 20.722656 31.648438 20.65625 31.648438 L 20.570312 31.605469 L 20.4375 31.585938 C 20.417969 31.585938 20.375 31.5625 20.351562 31.5625 L 10.75 31.5625 C 10.070312 31.5625 9.546875 32.085938 9.546875 32.765625 C 9.546875 33.421875 10.070312 33.992188 10.75 33.992188 L 17.8125 33.992188 L 9.785156 44.972656 L 9.765625 44.972656 C 9.742188 45.015625 9.71875 45.058594 9.699219 45.082031 C 9.699219 45.101562 9.675781 45.148438 9.632812 45.167969 C 9.632812 45.210938 9.609375 45.257812 9.609375 45.277344 C 9.589844 45.320312 9.589844 45.367188 9.566406 45.386719 L 9.566406 45.496094 C 9.546875 45.539062 9.546875 45.585938 9.546875 45.648438 L 9.546875 45.738281 C 9.546875 45.78125 9.566406 45.824219 9.566406 45.890625 C 9.566406 45.933594 9.589844 45.957031 9.589844 45.976562 L 9.632812 46.109375 C 9.632812 46.152344 9.675781 46.175781 9.699219 46.21875 C 9.699219 46.242188 9.71875 46.261719 9.742188 46.328125 C 9.765625 46.351562 9.785156 46.394531 9.808594 46.414062 C 9.828125 46.4375 9.851562 46.460938 9.894531 46.480469 L 9.9375 46.542969 L 9.984375 46.589844 C 10.003906 46.613281 10.027344 46.632812 10.046875 46.632812 L 10.046875 46.65625 C 10.070312 46.679688 10.09375 46.679688 10.136719 46.699219 C 10.179688 46.722656 10.222656 46.742188 10.246094 46.742188 C 10.265625 46.789062 10.289062 46.789062 10.3125 46.808594 C 10.375 46.808594 10.421875 46.832031 10.464844 46.832031 C 10.484375 46.851562 10.507812 46.851562 10.53125 46.851562 L 10.648438 46.871094 Z M 26.214844 46.875 C 26.871094 46.875 27.4375 46.351562 27.4375 45.671875 L 27.4375 32.765625 C 27.4375 32.085938 26.871094 31.5625 26.214844 31.5625 C 25.535156 31.5625 25.011719 32.085938 25.011719 32.765625 L 25.011719 45.671875 C 25.011719 46.351562 25.535156 46.875 26.214844 46.875 Z M 32.734375 46.875 C 33.410156 46.875 33.957031 46.328125 33.957031 45.671875 L 33.957031 40.925781 L 36.648438 40.925781 C 39.25 40.925781 41.351562 38.824219 41.351562 36.265625 C 41.351562 33.664062 39.25 31.5625 36.648438 31.5625 L 32.734375 31.5625 C 32.078125 31.5625 31.53125 32.085938 31.53125 32.765625 L 31.53125 45.671875 C 31.53125 46.328125 32.078125 46.875 32.734375 46.875 Z M 36.648438 38.496094 L 33.957031 38.496094 L 33.957031 33.992188 L 36.648438 33.992188 C 37.917969 33.992188 38.902344 34.996094 38.921875 36.265625 C 38.902344 37.492188 37.917969 38.496094 36.648438 38.496094 Z M 36.648438 38.496094 "/>\n      </g>'},docxIcon:{extension:".docx",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.789062 43.75 C 9.589844 43.75 10.988281 43.269531 11.984375 42.304688 C 12.980469 41.339844 13.476562 39.984375 13.476562 38.234375 C 13.476562 36.496094 12.980469 35.144531 11.984375 34.179688 C 10.988281 33.214844 9.589844 32.734375 7.789062 32.734375 L 4.695312 32.734375 C 4.394531 32.734375 4.15625 32.816406 3.984375 32.984375 C 3.8125 33.152344 3.726562 33.386719 3.726562 33.6875 L 3.726562 42.796875 C 3.726562 43.097656 3.8125 43.332031 3.984375 43.5 C 4.15625 43.667969 4.394531 43.75 4.695312 43.75 Z M 7.664062 42.109375 L 5.742188 42.109375 L 5.742188 34.375 L 7.664062 34.375 C 10.195312 34.375 11.460938 35.660156 11.460938 38.234375 C 11.460938 40.816406 10.195312 42.109375 7.664062 42.109375 Z M 20.414062 43.890625 C 21.476562 43.890625 22.402344 43.660156 23.1875 43.203125 C 23.972656 42.746094 24.582031 42.089844 25.007812 41.234375 C 25.433594 40.378906 25.648438 39.378906 25.648438 38.234375 C 25.648438 37.089844 25.4375 36.089844 25.015625 35.242188 C 24.59375 34.394531 23.988281 33.738281 23.203125 33.28125 C 22.417969 32.824219 21.488281 32.59375 20.414062 32.59375 C 19.339844 32.59375 18.410156 32.824219 17.617188 33.28125 C 16.824219 33.738281 16.21875 34.394531 15.796875 35.242188 C 15.375 36.089844 15.164062 37.089844 15.164062 38.234375 C 15.164062 39.378906 15.378906 40.378906 15.804688 41.234375 C 16.230469 42.089844 16.839844 42.746094 17.625 43.203125 C 18.410156 43.660156 19.339844 43.890625 20.414062 43.890625 Z M 20.414062 42.28125 C 19.394531 42.28125 18.597656 41.933594 18.03125 41.234375 C 17.464844 40.535156 17.179688 39.535156 17.179688 38.234375 C 17.179688 36.933594 17.464844 35.933594 18.03125 35.242188 C 18.597656 34.550781 19.394531 34.203125 20.414062 34.203125 C 21.425781 34.203125 22.214844 34.550781 22.78125 35.242188 C 23.347656 35.933594 23.632812 36.933594 23.632812 38.234375 C 23.632812 39.535156 23.347656 40.535156 22.78125 41.234375 C 22.214844 41.933594 21.425781 42.28125 20.414062 42.28125 Z M 32.601562 43.890625 C 33.289062 43.890625 33.933594 43.789062 34.539062 43.585938 C 35.144531 43.382812 35.679688 43.089844 36.148438 42.703125 C 36.285156 42.597656 36.378906 42.488281 36.429688 42.367188 C 36.480469 42.246094 36.507812 42.109375 36.507812 41.953125 C 36.507812 41.722656 36.445312 41.53125 36.320312 41.375 C 36.195312 41.21875 36.042969 41.140625 35.867188 41.140625 C 35.753906 41.140625 35.644531 41.160156 35.539062 41.203125 C 35.433594 41.246094 35.332031 41.296875 35.226562 41.359375 C 34.746094 41.683594 34.316406 41.910156 33.9375 42.046875 C 33.558594 42.183594 33.144531 42.25 32.695312 42.25 C 31.613281 42.25 30.792969 41.910156 30.234375 41.234375 C 29.675781 40.558594 29.398438 39.558594 29.398438 38.234375 C 29.398438 36.921875 29.675781 35.925781 30.234375 35.25 C 30.792969 34.574219 31.613281 34.234375 32.695312 34.234375 C 33.164062 34.234375 33.589844 34.300781 33.976562 34.429688 C 34.363281 34.558594 34.777344 34.792969 35.226562 35.125 C 35.445312 35.269531 35.660156 35.34375 35.867188 35.34375 C 36.042969 35.34375 36.195312 35.265625 36.320312 35.109375 C 36.445312 34.953125 36.507812 34.761719 36.507812 34.53125 C 36.507812 34.363281 36.480469 34.222656 36.429688 34.109375 C 36.378906 33.996094 36.285156 33.886719 36.148438 33.78125 C 35.679688 33.394531 35.144531 33.101562 34.539062 32.898438 C 33.933594 32.695312 33.289062 32.59375 32.601562 32.59375 C 31.539062 32.59375 30.609375 32.824219 29.8125 33.28125 C 29.015625 33.738281 28.402344 34.394531 27.976562 35.242188 C 27.550781 36.089844 27.335938 37.089844 27.335938 38.234375 C 27.335938 39.378906 27.550781 40.378906 27.976562 41.234375 C 28.402344 42.089844 29.015625 42.746094 29.8125 43.203125 C 30.609375 43.660156 31.539062 43.890625 32.601562 43.890625 Z M 46.132812 43.84375 C 46.382812 43.84375 46.605469 43.75 46.796875 43.5625 C 46.988281 43.375 47.085938 43.15625 47.085938 42.90625 C 47.085938 42.707031 47.003906 42.511719 46.835938 42.3125 L 43.445312 38.15625 L 46.710938 34.171875 C 46.867188 34.003906 46.945312 33.808594 46.945312 33.578125 C 46.945312 33.328125 46.847656 33.113281 46.65625 32.929688 C 46.464844 32.746094 46.242188 32.65625 45.992188 32.65625 C 45.730469 32.65625 45.507812 32.769531 45.320312 33 L 42.273438 36.765625 L 39.226562 33 C 39.027344 32.769531 38.800781 32.65625 38.539062 32.65625 C 38.289062 32.65625 38.070312 32.746094 37.882812 32.929688 C 37.695312 33.113281 37.601562 33.328125 37.601562 33.578125 C 37.601562 33.808594 37.679688 34.003906 37.835938 34.171875 L 41.101562 38.15625 L 37.695312 42.3125 C 37.539062 42.5 37.460938 42.699219 37.460938 42.90625 C 37.460938 43.15625 37.558594 43.371094 37.75 43.554688 C 37.941406 43.738281 38.164062 43.828125 38.414062 43.828125 C 38.675781 43.828125 38.898438 43.71875 39.085938 43.5 L 42.273438 39.5625 L 45.445312 43.5 C 45.644531 43.730469 45.871094 43.84375 46.132812 43.84375 Z M 46.132812 43.84375 "/>\n      </g>'},jpgIcon:{extension:".jpg",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.789062 47.007812 L 9.488281 46.960938 C 12.214844 46.757812 13.578125 45.277344 13.578125 42.523438 L 13.578125 32.742188 C 13.578125 32.320312 13.453125 31.980469 13.195312 31.726562 C 12.941406 31.472656 12.59375 31.34375 12.15625 31.34375 C 11.734375 31.34375 11.394531 31.472656 11.140625 31.726562 C 10.886719 31.980469 10.757812 32.320312 10.757812 32.742188 L 10.757812 42.523438 C 10.757812 43.238281 10.605469 43.769531 10.296875 44.117188 C 9.992188 44.46875 9.539062 44.660156 8.941406 44.6875 L 8.242188 44.730469 C 7.847656 44.761719 7.558594 44.867188 7.378906 45.046875 C 7.195312 45.230469 7.105469 45.496094 7.105469 45.847656 C 7.105469 46.664062 7.667969 47.050781 8.789062 47.007812 Z M 18.304688 47.007812 C 18.742188 47.007812 19.089844 46.878906 19.34375 46.625 C 19.597656 46.367188 19.726562 46.023438 19.726562 45.585938 L 19.726562 40.882812 L 23.640625 40.882812 C 25.289062 40.882812 26.574219 40.464844 27.492188 39.632812 C 28.410156 38.804688 28.871094 37.644531 28.871094 36.15625 C 28.871094 34.667969 28.410156 33.511719 27.492188 32.6875 C 26.574219 31.863281 25.289062 31.453125 23.640625 31.453125 L 18.261719 31.453125 C 17.839844 31.453125 17.507812 31.570312 17.265625 31.804688 C 17.023438 32.035156 16.90625 32.363281 16.90625 32.789062 L 16.90625 45.585938 C 16.90625 46.023438 17.03125 46.367188 17.289062 46.625 C 17.542969 46.878906 17.882812 47.007812 18.304688 47.007812 Z M 23.292969 38.714844 L 19.726562 38.714844 L 19.726562 33.640625 L 23.292969 33.640625 C 25.230469 33.640625 26.203125 34.488281 26.203125 36.179688 C 26.203125 37.871094 25.230469 38.714844 23.292969 38.714844 Z M 38.605469 47.070312 C 39.320312 47.070312 40.0625 47.011719 40.835938 46.898438 C 41.609375 46.78125 42.285156 46.621094 42.871094 46.414062 C 43.410156 46.242188 43.765625 46.015625 43.941406 45.738281 C 44.117188 45.460938 44.203125 44.988281 44.203125 44.316406 L 44.203125 39.613281 C 44.203125 39.292969 44.101562 39.03125 43.898438 38.835938 C 43.695312 38.640625 43.425781 38.539062 43.089844 38.539062 L 39.21875 38.539062 C 38.867188 38.539062 38.59375 38.628906 38.398438 38.804688 C 38.199219 38.976562 38.101562 39.226562 38.101562 39.546875 C 38.101562 39.867188 38.199219 40.117188 38.398438 40.289062 C 38.59375 40.464844 38.867188 40.554688 39.21875 40.554688 L 41.6875 40.554688 L 41.6875 44.425781 C 40.699219 44.703125 39.707031 44.839844 38.714844 44.839844 C 35.390625 44.839844 33.726562 42.945312 33.726562 39.152344 C 33.726562 37.300781 34.132812 35.90625 34.941406 34.964844 C 35.75 34.023438 36.949219 33.554688 38.539062 33.554688 C 39.238281 33.554688 39.867188 33.644531 40.421875 33.828125 C 40.972656 34.007812 41.574219 34.324219 42.214844 34.777344 C 42.390625 34.894531 42.542969 34.980469 42.671875 35.03125 C 42.804688 35.082031 42.949219 35.105469 43.109375 35.105469 C 43.359375 35.105469 43.570312 34.996094 43.746094 34.777344 C 43.921875 34.558594 44.007812 34.289062 44.007812 33.96875 C 44.007812 33.75 43.96875 33.558594 43.886719 33.398438 C 43.808594 33.238281 43.679688 33.078125 43.503906 32.917969 C 42.191406 31.808594 40.507812 31.257812 38.453125 31.257812 C 36.90625 31.257812 35.5625 31.574219 34.425781 32.207031 C 33.289062 32.84375 32.410156 33.753906 31.789062 34.941406 C 31.171875 36.128906 30.859375 37.535156 30.859375 39.152344 C 30.859375 40.800781 31.171875 42.21875 31.789062 43.40625 C 32.410156 44.597656 33.304688 45.503906 34.46875 46.132812 C 35.636719 46.757812 37.015625 47.070312 38.605469 47.070312 Z M 38.605469 47.070312 "/>\n      </g>'},mp3Icon:{extension:".mp3",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 43.828125 43.710938 C 43.605469 44.28125 43.273438 44.804688 42.84375 45.265625 C 42.40625 45.730469 41.867188 46.113281 41.242188 46.398438 C 40.597656 46.699219 39.851562 46.855469 39.027344 46.855469 C 38.328125 46.855469 37.703125 46.757812 37.160156 46.570312 C 36.609375 46.378906 36.160156 46.136719 35.769531 45.839844 C 35.386719 45.550781 35.050781 45.210938 34.796875 44.832031 C 34.570312 44.507812 34.394531 44.195312 34.265625 43.890625 C 34.140625 43.59375 34.054688 43.335938 33.996094 43.101562 C 33.792969 42.261719 34.304688 41.417969 35.140625 41.210938 C 35.980469 41.007812 36.828125 41.519531 37.03125 42.355469 C 37.039062 42.390625 37.066406 42.488281 37.144531 42.671875 C 37.191406 42.777344 37.265625 42.914062 37.371094 43.0625 C 37.4375 43.160156 37.53125 43.257812 37.65625 43.351562 C 37.792969 43.453125 37.972656 43.542969 38.195312 43.625 C 38.332031 43.667969 38.59375 43.730469 39.027344 43.730469 C 39.390625 43.730469 39.695312 43.675781 39.925781 43.566406 C 40.1875 43.445312 40.398438 43.300781 40.558594 43.132812 C 40.71875 42.957031 40.839844 42.773438 40.914062 42.578125 C 40.996094 42.371094 41.03125 42.195312 41.03125 42.023438 C 41.03125 41.789062 41 41.585938 40.921875 41.398438 C 40.871094 41.257812 40.785156 41.148438 40.660156 41.039062 C 40.515625 40.910156 40.296875 40.792969 40.011719 40.699219 C 39.6875 40.59375 39.253906 40.539062 38.738281 40.535156 C 37.882812 40.527344 37.1875 39.832031 37.1875 38.972656 L 37.1875 38.832031 C 37.1875 37.984375 37.859375 37.292969 38.699219 37.265625 C 39.070312 37.257812 39.398438 37.195312 39.679688 37.101562 C 39.921875 37.011719 40.121094 36.902344 40.273438 36.773438 C 40.40625 36.652344 40.507812 36.519531 40.582031 36.359375 C 40.652344 36.210938 40.6875 36.027344 40.6875 35.8125 C 40.6875 35.523438 40.644531 35.289062 40.574219 35.125 C 40.5 34.96875 40.414062 34.847656 40.304688 34.757812 C 40.1875 34.660156 40.042969 34.582031 39.867188 34.53125 C 39.402344 34.386719 38.878906 34.398438 38.480469 34.542969 C 38.289062 34.617188 38.121094 34.714844 37.976562 34.84375 C 37.820312 34.984375 37.695312 35.148438 37.59375 35.339844 C 37.484375 35.550781 37.40625 35.773438 37.367188 36.039062 C 37.230469 36.890625 36.429688 37.472656 35.574219 37.335938 C 34.722656 37.195312 34.140625 36.398438 34.28125 35.542969 C 34.378906 34.9375 34.5625 34.378906 34.835938 33.871094 C 35.109375 33.355469 35.464844 32.898438 35.890625 32.519531 C 36.320312 32.132812 36.824219 31.828125 37.382812 31.617188 C 38.433594 31.226562 39.667969 31.199219 40.78125 31.539062 C 41.351562 31.714844 41.863281 31.992188 42.308594 32.355469 C 42.777344 32.753906 43.148438 33.242188 43.414062 33.824219 C 43.679688 34.402344 43.8125 35.070312 43.8125 35.8125 C 43.8125 36.476562 43.679688 37.097656 43.421875 37.660156 C 43.25 38.046875 43.023438 38.394531 42.746094 38.707031 C 43.242188 39.148438 43.609375 39.671875 43.835938 40.261719 C 44.046875 40.804688 44.15625 41.398438 44.15625 42.023438 C 44.15625 42.578125 44.046875 43.148438 43.828125 43.710938 Z M 31.445312 38.492188 C 31.148438 39.140625 30.734375 39.703125 30.199219 40.164062 C 29.6875 40.605469 29.078125 40.957031 28.390625 41.199219 C 27.71875 41.4375 26.976562 41.5625 26.191406 41.5625 L 25 41.5625 L 25 45 C 25 45.859375 24.296875 46.5625 23.4375 46.5625 C 22.578125 46.5625 21.875 45.859375 21.875 45 L 21.875 32.8125 C 21.875 31.945312 22.578125 31.25 23.4375 31.25 L 26.191406 31.25 C 27.890625 31.25 29.257812 31.667969 30.253906 32.5 C 31.339844 33.398438 31.886719 34.714844 31.886719 36.40625 C 31.886719 37.148438 31.738281 37.851562 31.445312 38.492188 Z M 18.730469 45.210938 C 18.730469 46.070312 18.03125 46.773438 17.167969 46.773438 C 16.300781 46.773438 15.605469 46.070312 15.605469 45.210938 L 15.605469 39.28125 L 14.015625 43.140625 C 14.007812 43.164062 13.996094 43.191406 13.984375 43.214844 C 13.71875 43.777344 13.15625 44.117188 12.566406 44.117188 L 12.53125 44.117188 C 11.9375 44.117188 11.375 43.777344 11.109375 43.214844 L 11.082031 43.160156 L 9.339844 39.101562 L 9.339844 45.210938 C 9.339844 46.070312 8.640625 46.773438 7.777344 46.773438 C 6.910156 46.773438 6.214844 46.070312 6.214844 45.210938 L 6.214844 32.824219 C 6.214844 31.960938 6.910156 31.261719 7.777344 31.261719 L 7.835938 31.261719 C 8.472656 31.261719 9.046875 31.617188 9.335938 32.1875 L 12.527344 39.09375 L 15.59375 32.207031 C 15.894531 31.617188 16.46875 31.261719 17.105469 31.261719 L 17.167969 31.261719 C 18.03125 31.261719 18.730469 31.960938 18.730469 32.824219 Z M 41.382812 28.125 L 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.136719 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.136719 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 41.382812 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 28.257812 34.902344 C 27.835938 34.550781 27.140625 34.375 26.191406 34.375 L 25 34.375 L 25 38.4375 L 26.191406 38.4375 C 26.621094 38.4375 27.007812 38.375 27.34375 38.253906 C 27.667969 38.140625 27.929688 37.992188 28.148438 37.804688 C 28.34375 37.632812 28.492188 37.4375 28.601562 37.195312 C 28.710938 36.964844 28.757812 36.703125 28.757812 36.40625 C 28.757812 35.324219 28.382812 35.003906 28.257812 34.902344 "/>\n      <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(99.607843%,99.607843%,99.607843%);stroke-opacity:1;stroke-miterlimit:4;" d="M 11.34125 13.57875 C 11.345 13.5925 11.3525 13.62375 11.36375 13.67375 C 11.3775 13.7225 11.3975 13.78125 11.42625 13.85 C 11.45375 13.9175 11.49375 13.9875 11.54625 14.0625 C 11.5975 14.13875 11.66625 14.20875 11.75 14.27125 C 11.83375 14.33625 11.9375 14.38875 12.0575 14.43125 C 12.1775 14.4725 12.32 14.49375 12.4875 14.49375 C 12.67875 14.49375 12.845 14.46125 12.9875 14.39375 C 13.13 14.32875 13.24875 14.245 13.34375 14.1425 C 13.43875 14.0425 13.51125 13.93 13.55875 13.8075 C 13.6075 13.6825 13.63125 13.56375 13.63125 13.4475 C 13.63125 13.31125 13.6075 13.1825 13.5625 13.065 C 13.515 12.9475 13.4425 12.845 13.3425 12.7575 C 13.2425 12.67 13.115 12.6 12.96 12.55 C 12.805 12.49875 12.6175 12.4725 12.4 12.4725 L 12.4 12.42625 C 12.57 12.42 12.72375 12.3925 12.8625 12.34375 C 13.0025 12.29625 13.11875 12.2275 13.21625 12.14375 C 13.31375 12.05875 13.3875 11.96 13.44125 11.845 C 13.4925 11.7275 13.52 11.60125 13.52 11.46 C 13.52 11.29375 13.4925 11.1525 13.43875 11.0325 C 13.38375 10.91375 13.31125 10.81625 13.21875 10.74 C 13.1275 10.66375 13.0225 10.6075 12.90375 10.5725 C 12.78625 10.535 12.66375 10.5175 12.5375 10.5175 C 12.395 10.5175 12.26125 10.54 12.14 10.58625 C 12.0175 10.6325 11.91 10.69625 11.81875 10.77875 C 11.72625 10.8625 11.64875 10.96 11.5875 11.07375 C 11.5275 11.18875 11.48625 11.315 11.4625 11.45375 M 7.5 14.4 L 7.5 10.5 L 8.3825 10.5 C 8.8075 10.5 9.13375 10.595 9.3625 10.78375 C 9.59 10.975 9.7025 11.2625 9.7025 11.65 C 9.7025 11.81625 9.6725 11.97125 9.6075 12.11125 C 9.5425 12.2525 9.4525 12.37375 9.335 12.475 C 9.21875 12.5775 9.0775 12.65625 8.9175 12.71375 C 8.75625 12.77125 8.5775 12.8 8.3825 12.8 L 7.6 12.8 M 2.4875 14.4675 L 2.4875 10.50375 L 2.5075 10.50375 C 2.5225 10.50375 2.53375 10.5125 2.5425 10.52625 L 3.9925 13.58625 C 3.99875 13.5975 4.005 13.6075 4.00875 13.6175 M 4.02125 13.6175 C 4.02625 13.6075 4.03125 13.5975 4.0375 13.58625 L 5.44 10.52625 C 5.4475 10.5125 5.45875 10.50375 5.4725 10.50375 L 5.4925 10.50375 L 5.4925 14.4675 " transform="matrix(3.125,0,0,3.125,0,0)"/>\n      </g>'},mp4Icon:{extension:".mp4",path:'<g id="surface6" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 36.898438 40.625 L 40.625 35.480469 L 40.625 40.625 Z M 28.761719 36.40625 C 28.761719 36.703125 28.707031 36.964844 28.605469 37.195312 C 28.496094 37.433594 28.347656 37.632812 28.148438 37.804688 C 27.929688 37.992188 27.667969 38.144531 27.34375 38.257812 C 27.003906 38.375 26.621094 38.4375 26.191406 38.4375 L 25 38.4375 L 25 34.375 L 26.191406 34.375 C 27.140625 34.375 27.835938 34.554688 28.253906 34.902344 C 28.378906 35.007812 28.761719 35.324219 28.761719 36.40625 Z M 44.6875 43.75 L 43.75 43.75 L 43.75 45.3125 C 43.75 46.175781 43.050781 46.875 42.1875 46.875 C 41.324219 46.875 40.625 46.175781 40.625 45.3125 L 40.625 43.75 L 34.066406 43.75 C 33.199219 43.75 32.503906 43.050781 32.503906 42.1875 L 32.503906 41.875 C 32.503906 41.546875 32.605469 41.226562 32.800781 40.957031 L 39.363281 31.898438 C 39.660156 31.492188 40.128906 31.25 40.628906 31.25 L 42.1875 31.25 C 43.050781 31.25 43.75 31.949219 43.75 32.8125 L 43.75 40.625 L 44.6875 40.625 C 45.550781 40.625 46.25 41.324219 46.25 42.1875 C 46.25 43.050781 45.550781 43.75 44.6875 43.75 Z M 31.445312 38.492188 C 31.148438 39.140625 30.730469 39.703125 30.195312 40.167969 C 29.6875 40.605469 29.082031 40.957031 28.390625 41.203125 C 27.71875 41.441406 26.976562 41.5625 26.191406 41.5625 L 25 41.5625 L 25 45 C 25 45.863281 24.300781 46.5625 23.4375 46.5625 C 22.578125 46.5625 21.875 45.863281 21.875 45 L 21.875 32.8125 C 21.875 31.949219 22.578125 31.25 23.4375 31.25 L 26.191406 31.25 C 27.890625 31.25 29.257812 31.671875 30.253906 32.5 C 31.339844 33.398438 31.886719 34.714844 31.886719 36.40625 C 31.886719 37.148438 31.738281 37.851562 31.445312 38.492188 Z M 18.730469 45.210938 C 18.730469 46.070312 18.027344 46.773438 17.167969 46.773438 C 16.300781 46.773438 15.605469 46.070312 15.605469 45.210938 L 15.605469 39.6875 L 14.035156 43.105469 C 14.019531 43.144531 14.003906 43.179688 13.984375 43.214844 C 13.71875 43.78125 13.15625 44.117188 12.566406 44.117188 L 12.53125 44.117188 C 11.941406 44.117188 11.378906 43.78125 11.113281 43.214844 C 11.097656 43.183594 11.078125 43.152344 11.066406 43.125 L 9.339844 39.484375 L 9.339844 45.210938 C 9.339844 46.070312 8.640625 46.773438 7.777344 46.773438 C 6.910156 46.773438 6.214844 46.070312 6.214844 45.210938 L 6.214844 32.824219 C 6.214844 31.960938 6.910156 31.261719 7.777344 31.261719 L 7.835938 31.261719 C 8.472656 31.261719 9.046875 31.617188 9.335938 32.191406 L 9.355469 32.226562 L 12.523438 38.90625 L 15.578125 32.242188 C 15.585938 32.226562 15.597656 32.210938 15.605469 32.191406 C 15.894531 31.617188 16.46875 31.261719 17.105469 31.261719 L 17.164062 31.261719 C 18.027344 31.261719 18.726562 31.960938 18.726562 32.824219 L 18.726562 45.210938 Z M 41.382812 28.125 L 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 41.382812 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface6" mask="url(#mask0)"/>\n      <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(99.607843%,99.607843%,99.607843%);stroke-opacity:1;stroke-miterlimit:4;" d="M 14.3 13.5 L 10.90125 13.5 L 10.90125 13.4 L 13.00125 10.5 L 13.5 10.5 L 13.5 14.5 M 7.5 14.4 L 7.5 10.5 L 8.3825 10.5 C 8.8075 10.5 9.13375 10.595 9.3625 10.78375 C 9.59 10.975 9.7025 11.2625 9.7025 11.65 C 9.7025 11.81625 9.6725 11.97125 9.6075 12.11125 C 9.5425 12.2525 9.4525 12.37375 9.335 12.47625 C 9.21875 12.5775 9.0775 12.65625 8.9175 12.71375 C 8.75625 12.77125 8.5775 12.8 8.3825 12.8 L 7.6 12.8 M 2.4875 14.4675 L 2.4875 10.50375 L 2.5075 10.50375 C 2.5225 10.50375 2.53375 10.5125 2.5425 10.52625 L 3.9925 13.58625 C 3.99875 13.5975 4.005 13.6075 4.00875 13.6175 M 4.02125 13.6175 C 4.02625 13.6075 4.03125 13.5975 4.0375 13.58625 L 5.44 10.52625 C 5.4475 10.5125 5.45875 10.50375 5.4725 10.50375 L 5.4925 10.50375 L 5.4925 14.4675 " transform="matrix(3.125,0,0,3.125,0,0)"/>\n      </g>'},oggIcon:{extension:".ogg",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.976562 47.070312 C 10.464844 47.070312 11.757812 46.75 12.859375 46.109375 C 13.960938 45.46875 14.808594 44.550781 15.40625 43.351562 C 16.003906 42.15625 16.304688 40.757812 16.304688 39.152344 C 16.304688 37.550781 16.007812 36.152344 15.417969 34.964844 C 14.828125 33.777344 13.980469 32.859375 12.882812 32.21875 C 11.78125 31.578125 10.480469 31.257812 8.976562 31.257812 C 7.472656 31.257812 6.167969 31.578125 5.0625 32.21875 C 3.953125 32.859375 3.101562 33.777344 2.511719 34.964844 C 1.921875 36.152344 1.625 37.550781 1.625 39.152344 C 1.625 40.757812 1.925781 42.15625 2.523438 43.351562 C 3.121094 44.550781 3.972656 45.46875 5.070312 46.109375 C 6.171875 46.75 7.472656 47.070312 8.976562 47.070312 Z M 8.976562 44.820312 C 7.546875 44.820312 6.433594 44.332031 5.640625 43.351562 C 4.847656 42.375 4.449219 40.976562 4.449219 39.152344 C 4.449219 37.332031 4.847656 35.933594 5.640625 34.964844 C 6.433594 33.996094 7.546875 33.507812 8.976562 33.507812 C 10.390625 33.507812 11.496094 33.996094 12.289062 34.964844 C 13.085938 35.933594 13.484375 37.332031 13.484375 39.152344 C 13.484375 40.976562 13.085938 42.375 12.289062 43.351562 C 11.496094 44.332031 10.390625 44.820312 8.976562 44.820312 Z M 26.410156 47.070312 C 27.125 47.070312 27.871094 47.011719 28.640625 46.898438 C 29.414062 46.78125 30.09375 46.621094 30.675781 46.414062 C 31.214844 46.242188 31.574219 46.015625 31.75 45.738281 C 31.921875 45.460938 32.011719 44.988281 32.011719 44.316406 L 32.011719 39.613281 C 32.011719 39.292969 31.910156 39.03125 31.703125 38.835938 C 31.5 38.640625 31.230469 38.539062 30.894531 38.539062 L 27.023438 38.539062 C 26.671875 38.539062 26.398438 38.628906 26.203125 38.804688 C 26.007812 38.976562 25.90625 39.226562 25.90625 39.546875 C 25.90625 39.867188 26.007812 40.117188 26.203125 40.289062 C 26.398438 40.464844 26.671875 40.554688 27.023438 40.554688 L 29.496094 40.554688 L 29.496094 44.425781 C 28.503906 44.703125 27.511719 44.839844 26.519531 44.839844 C 23.195312 44.839844 21.53125 42.945312 21.53125 39.152344 C 21.53125 37.300781 21.9375 35.90625 22.746094 34.964844 C 23.554688 34.023438 24.753906 33.554688 26.34375 33.554688 C 27.046875 33.554688 27.671875 33.644531 28.226562 33.828125 C 28.78125 34.007812 29.378906 34.324219 30.019531 34.777344 C 30.195312 34.894531 30.347656 34.980469 30.480469 35.03125 C 30.609375 35.082031 30.757812 35.105469 30.917969 35.105469 C 31.164062 35.105469 31.375 34.996094 31.550781 34.777344 C 31.726562 34.558594 31.8125 34.289062 31.8125 33.96875 C 31.8125 33.75 31.773438 33.558594 31.695312 33.398438 C 31.613281 33.238281 31.484375 33.078125 31.3125 32.917969 C 30 31.808594 28.3125 31.257812 26.257812 31.257812 C 24.710938 31.257812 23.371094 31.574219 22.234375 32.207031 C 21.09375 32.84375 20.214844 33.753906 19.597656 34.941406 C 18.976562 36.128906 18.667969 37.535156 18.667969 39.152344 C 18.667969 40.800781 18.976562 42.21875 19.597656 43.40625 C 20.214844 44.597656 21.109375 45.503906 22.277344 46.132812 C 23.441406 46.757812 24.820312 47.070312 26.410156 47.070312 Z M 42.445312 47.070312 C 43.160156 47.070312 43.902344 47.011719 44.675781 46.898438 C 45.449219 46.78125 46.128906 46.621094 46.710938 46.414062 C 47.25 46.242188 47.609375 46.015625 47.78125 45.738281 C 47.957031 45.460938 48.046875 44.988281 48.046875 44.316406 L 48.046875 39.613281 C 48.046875 39.292969 47.941406 39.03125 47.738281 38.835938 C 47.535156 38.640625 47.265625 38.539062 46.929688 38.539062 L 43.058594 38.539062 C 42.707031 38.539062 42.433594 38.628906 42.238281 38.804688 C 42.039062 38.976562 41.941406 39.226562 41.941406 39.546875 C 41.941406 39.867188 42.039062 40.117188 42.238281 40.289062 C 42.433594 40.464844 42.707031 40.554688 43.058594 40.554688 L 45.53125 40.554688 L 45.53125 44.425781 C 44.539062 44.703125 43.546875 44.839844 42.554688 44.839844 C 39.230469 44.839844 37.566406 42.945312 37.566406 39.152344 C 37.566406 37.300781 37.972656 35.90625 38.78125 34.964844 C 39.589844 34.023438 40.789062 33.554688 42.378906 33.554688 C 43.078125 33.554688 43.707031 33.644531 44.261719 33.828125 C 44.816406 34.007812 45.414062 34.324219 46.054688 34.777344 C 46.230469 34.894531 46.382812 34.980469 46.515625 35.03125 C 46.644531 35.082031 46.792969 35.105469 46.953125 35.105469 C 47.199219 35.105469 47.410156 34.996094 47.585938 34.777344 C 47.761719 34.558594 47.847656 34.289062 47.847656 33.96875 C 47.847656 33.75 47.808594 33.558594 47.726562 33.398438 C 47.648438 33.238281 47.519531 33.078125 47.34375 32.917969 C 46.03125 31.808594 44.347656 31.257812 42.292969 31.257812 C 40.746094 31.257812 39.40625 31.574219 38.265625 32.207031 C 37.128906 32.84375 36.25 33.753906 35.632812 34.941406 C 35.011719 36.128906 34.703125 37.535156 34.703125 39.152344 C 34.703125 40.800781 35.011719 42.21875 35.632812 43.40625 C 36.25 44.597656 37.144531 45.503906 38.3125 46.132812 C 39.476562 46.757812 40.855469 47.070312 42.445312 47.070312 Z M 42.445312 47.070312 "/>\n      </g>'},pdfIcon:{extension:".pdf",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.59375 25 L 39.4375 25 C 41.476562 25.003906 43.484375 25.472656 45.3125 26.375 L 45.3125 15.375 C 45.347656 14.191406 44.867188 13.054688 44 12.25 L 34.625 2.875 C 33.875 2.003906 32.773438 1.523438 31.625 1.5625 L 6.625 1.5625 C 5.589844 1.5625 4.75 2.402344 4.75 3.4375 L 4.75 26.375 C 6.566406 25.480469 8.566406 25.007812 10.59375 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.71875 L 42.15625 12.5 L 34.53125 12.5 C 34.480469 12.511719 34.425781 12.511719 34.375 12.5 Z M 6.25 25.71875 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.300781 13.980469 32.316406 15.253906 33.75 15.625 C 33.957031 15.675781 34.167969 15.675781 34.375 15.625 L 43.75 15.625 L 43.75 25.71875 C 44.859375 26.09375 45.910156 26.621094 46.875 27.28125 L 46.875 15.375 C 46.964844 13.722656 46.3125 12.117188 45.09375 11 L 35.71875 1.625 C 34.648438 0.523438 33.160156 -0.0664062 31.625 0 L 6.625 0 C 5.703125 -0.015625 4.8125 0.339844 4.152344 0.984375 C 3.496094 1.632812 3.125 2.515625 3.125 3.4375 L 3.125 27.28125 C 4.09375 26.625 5.144531 26.101562 6.25 25.71875 Z M 6.25 25.71875 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.625 28.125 C 6.335938 28.117188 4.136719 29.023438 2.515625 30.640625 C 0.898438 32.261719 -0.0078125 34.460938 0 36.75 L 0 41.375 C 0 46.136719 3.863281 50 8.625 50 L 41.375 50 C 46.132812 49.984375 49.984375 46.132812 50 41.375 L 50 36.75 C 50 31.988281 46.136719 28.125 41.375 28.125 Z M 8.625 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.40625 41.78125 L 12.09375 41.78125 L 12.09375 45.84375 C 12.003906 46.351562 11.5625 46.726562 11.046875 46.726562 C 10.53125 46.726562 10.089844 46.351562 10 45.84375 L 10 34.78125 C 10 34.210938 10.460938 33.75 11.03125 33.75 L 14.40625 33.75 C 15.925781 33.617188 17.390625 34.351562 18.191406 35.648438 C 18.992188 36.945312 18.992188 38.585938 18.191406 39.882812 C 17.390625 41.179688 15.925781 41.914062 14.40625 41.78125 Z M 12.09375 39.6875 L 14.40625 39.6875 C 15.152344 39.78125 15.882812 39.4375 16.289062 38.804688 C 16.691406 38.171875 16.691406 37.359375 16.289062 36.726562 C 15.882812 36.09375 15.152344 35.75 14.40625 35.84375 L 12.09375 35.84375 Z M 12.09375 39.6875 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 20.3125 45.84375 L 20.3125 34.78125 C 20.3125 34.210938 20.773438 33.75 21.34375 33.75 L 23.5625 33.75 C 27.1875 33.75 30.125 36.6875 30.125 40.3125 C 30.125 43.9375 27.1875 46.875 23.5625 46.875 L 21.34375 46.875 C 20.773438 46.875 20.3125 46.414062 20.3125 45.84375 Z M 22.40625 44.78125 L 23.5625 44.78125 C 26.03125 44.78125 28.03125 42.78125 28.03125 40.3125 C 28.03125 37.84375 26.03125 35.84375 23.5625 35.84375 L 22.40625 35.84375 Z M 22.40625 44.78125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 33.1875 45.84375 L 33.1875 34.78125 C 33.183594 34.476562 33.3125 34.1875 33.542969 33.992188 C 33.769531 33.792969 34.074219 33.703125 34.375 33.75 L 40.625 33.75 C 41.132812 33.839844 41.507812 34.28125 41.507812 34.796875 C 41.507812 35.3125 41.132812 35.753906 40.625 35.84375 L 35.25 35.84375 L 35.25 39.28125 L 39.625 39.28125 C 40.195312 39.28125 40.65625 39.742188 40.65625 40.3125 C 40.65625 40.882812 40.195312 41.34375 39.625 41.34375 L 35.25 41.34375 L 35.25 45.84375 C 35.257812 46.359375 34.882812 46.796875 34.375 46.875 C 34.074219 46.921875 33.769531 46.832031 33.542969 46.632812 C 33.3125 46.4375 33.183594 46.148438 33.1875 45.84375 Z M 33.1875 45.84375 "/>\n      </g>'},defaultIcon:{extension:".default",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 3.117188 44.777344 C 1.394531 44.777344 0 43.386719 0 41.671875 L 0 3.484375 C 0 1.769531 1.394531 0.378906 3.117188 0.378906 L 25.792969 0.378906 C 27.164062 0.304688 28.5 0.808594 29.480469 1.765625 L 37.980469 10.230469 C 39.144531 11.242188 39.769531 12.730469 39.683594 14.265625 L 39.683594 41.671875 C 39.683594 43.386719 38.289062 44.777344 36.5625 44.777344 Z M 25.511719 3.203125 L 3.117188 3.203125 C 2.960938 3.203125 2.832031 3.328125 2.832031 3.484375 L 2.832031 41.671875 C 2.832031 41.828125 2.960938 41.957031 3.117188 41.957031 L 36.5625 41.957031 C 36.679688 41.949219 36.785156 41.867188 36.820312 41.757812 L 36.820312 14.492188 L 28.34375 14.492188 C 28.160156 14.539062 27.964844 14.539062 27.777344 14.492188 C 26.480469 14.15625 25.554688 13.007812 25.511719 11.671875 Z M 28.34375 4.640625 L 28.34375 11.671875 C 28.390625 11.683594 28.441406 11.683594 28.488281 11.671875 L 35.402344 11.671875 Z M 28.34375 4.640625 "/>\n      </g>'}},r.MODULES.modals=function(e){var i=e.$;e.shared.modals||(e.shared.modals={});var a,t=e.shared.modals;function n(){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=t[e];n&&n.$modal&&n.$modal.removeData().remove()}a&&a.removeData().remove(),t={}}function s(n,r){if(t[n]){var o=t[n].$modal,c=o.data("instance")||e;c.events.enableBlur(),o.hide(),a.hide(),i(c.o_doc).find("body").first().removeClass("fr-prevent-scroll fr-mobile"),o.removeClass("fr-active"),r||(c.accessibility.restoreSelection(),c.events.trigger("modals.hide"))}}function o(n){var r;if("string"==typeof n){if(!t[n])return;r=t[n].$modal}else r=n;return r&&e.node.hasClass(r,"fr-active")&&e.core.sameInstance(r)||!1}return{_init:function(){e.events.on("shared.destroy",n,!0)},get:function(e){return t[e]},create:function(n,o,c){if(o='<div class="fr-modal-head-line">'.concat(o,"</div>"),e.shared.$overlay||(e.shared.$overlay=i(e.doc.createElement("DIV")).addClass("fr-overlay"),i("body").first().append(e.shared.$overlay)),a=e.shared.$overlay,e.opts.theme&&a.addClass("".concat(e.opts.theme,"-theme")),!t[n]){var l=function(t,n){var o='<div tabIndex="-1" class="fr-modal'.concat(e.opts.theme?" ".concat(e.opts.theme,"-theme"):"",'"><div class="fr-modal-wrapper">'),c='<button title="'.concat(e.language.translate("Cancel"),'" class="fr-command fr-btn fr-modal-close"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24"><path d="').concat(r.SVG.close,'"/></svg></button>');o+='<div class="fr-modal-head">'.concat(t).concat(c,"</div>"),o+='<div tabIndex="-1" class="fr-modal-body">'.concat(n,"</div>"),o+="</div></div>";var a=i(e.doc.createElement("DIV"));return a.html(o),a.find("> .fr-modal")}(o,c);t[n]={$modal:l,$head:l.find(".fr-modal-head"),$body:l.find(".fr-modal-body")},e.helpers.isMobile()||l.addClass("fr-desktop"),i("body").first().append(l),e.events.$on(l,"click",".fr-modal-close",(function(){s(n)}),!0),t[n].$body.css("margin-top",t[n].$head.outerHeight()),e.events.$on(l,"keydown",(function(t){var o=t.which;return o===r.KEYCODE.ESC?(s(n),e.accessibility.focusModalButton(l),!1):!(!i(t.currentTarget).is("input[type=text], textarea")&&o!==r.KEYCODE.ARROW_UP&&o!==r.KEYCODE.ARROW_DOWN&&!e.keys.isBrowserAction(t)&&(t.preventDefault(),t.stopPropagation(),1))}),!0),s(n,!0)}return t[n]},show:function(n){if(t[n]){var r=t[n].$modal;r.data("instance",e),r.show(),a.show(),i(e.o_doc).find("body").first().addClass("fr-prevent-scroll"),e.helpers.isMobile()&&i(e.o_doc).find("body").first().addClass("fr-mobile"),r.addClass("fr-active"),e.accessibility.focusModal(r)}},hide:s,resize:function(n){if(t[n]){var r=t[n],o=r.$modal,c=r.$body,a=e.o_win.innerHeight,l=o.find(".fr-modal-wrapper"),i=a-l.outerHeight(!0)+(l.height()-(c.outerHeight(!0)-c.height())),s="auto";i<c.get(0).scrollHeight&&(s=i),c.height(s)}},isVisible:o,areVisible:function(e){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&o(n)&&(void 0===e||t[n].$modal.data("instance")===e))return t[n].$modal;return!1}}},r.MODULES.position=function(e){var t=e.$;function a(){var n=e.selection.ranges(0),o=n.getBoundingClientRect();if(0===o.top&&0===o.left&&0===o.width||0===o.height){var c=!1,l=e.opts.toolbarInline&&n.startContainer&&n.startContainer.firstChild&&"BR"===n.startContainer.firstChild.tagName;0===e.$el.find(".fr-marker").length&&(l?t(n.startContainer.firstChild).after(r.MARKERS):e.selection.save(),c=!0);var a=e.$el.find(".fr-marker").first();a.css("display","inline"),a.css("line-height","");var d=a.offset(),i=a.outerHeight();a.css("display","none"),a.css("line-height",0),(o={}).left=d&&d.left,o.width=0,o.height=i,o.top=d&&d.top-(e.helpers.isMobile()&&!e.helpers.isIOS()||e.opts.iframe?0:e.helpers.scrollTop()),a&&0<a.length&&(o.top-=t(a.get(0).parentNode).height()),o.right=1,o.bottom=1,o.ok=!0,c&&(l?e.$el.find(".fr-marker").remove():e.selection.restore())}return o}function n(t,n,r,o){var a=r.data("container");if(!a||"BODY"===a.get(0).tagName&&"static"===a.css("position")||(t&&(t-=a.offset().left),n&&(n-=a.offset().top),"BODY"!==a.get(0).tagName?(t&&(t+=a.get(0).scrollLeft),n&&(n+=a.get(0).scrollTop)):"absolute"===a.css("position")&&(t&&(t+=a.position().left),n&&(n+=a.position().top))),e.opts.iframe&&a&&e.$tb&&a.get(0)!==e.$tb.get(0)){var c=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),i=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));t&&(t+=e.$iframe.offset().left+i),n&&(n+=e.$iframe.offset().top+c)}var s=function(t,n){var r=t.outerWidth(!0);return n+r>e.$sc.get(0).clientWidth-10&&(n=e.$sc.get(0).clientWidth-r-10),n<0&&(n=10),n}(r,t);t&&r.css("left",s),n&&r.css("top",function(t,n,r){var o=t.outerHeight(!0);if(!e.helpers.isMobile()&&e.$tb&&t.parent().get(0)!==e.$tb.get(0)){var a=t.parent().offset().top,c=n-o-(r||0);t.parent().get(0)===e.$sc.get(0)&&(a-=t.parent().position().top);var i=e.$sc.get(0).clientHeight;a+n+o>e.$sc.offset().top+i&&0<t.parent().offset().top+c&&0<c?c>e.$wp.scrollTop()&&(n=c,t.addClass("fr-above")):t.removeClass("fr-above")}return n}(r,n,o))}function i(n){var r=t(n),o=r.is(".fr-sticky-on"),c=r.data("sticky-top"),a=r.data("sticky-scheduled");if(void 0===c){r.data("sticky-top",0);var l=t('<div class="fr-sticky-dummy" style="height: '.concat(r.outerHeight(),'px;"></div>'));e.$box.prepend(l)}else e.$box.find(".fr-sticky-dummy").css("height",r.outerHeight());if(e.core.hasFocus()||0<e.$tb.findVisible("input:focus").length){var i=e.helpers.scrollTop(),s=Math.min(Math.max(i-e.$tb.parent().offset().top,0),e.$tb.parent().outerHeight()-r.outerHeight());if(s!==c&&s!==a&&(clearTimeout(r.data("sticky-timeout")),r.data("sticky-scheduled",s),r.outerHeight()<i-e.$tb.parent().offset().top&&r.addClass("fr-opacity-0"),r.data("sticky-timeout",setTimeout((function(){var t=e.helpers.scrollTop(),n=Math.min(Math.max(t-e.$tb.parent().offset().top,0),e.$tb.parent().outerHeight()-r.outerHeight());0<n&&"BODY"===e.$tb.parent().get(0).tagName&&(n+=e.$tb.parent().position().top),n!==c&&(r.css("top",Math.max(n,0)),r.data("sticky-top",n),r.data("sticky-scheduled",n)),r.removeClass("fr-opacity-0")}),100))),!o){var d=e.$tb.parent(),h=d.get(0).offsetWidth-d.get(0).clientWidth;r.css("top","0"),r.width(d.width()-h),r.addClass("fr-sticky-on"),e.$box.addClass("fr-sticky-box")}}else clearTimeout(t(n).css("sticky-timeout")),r.css("top","0"),r.css("position",""),r.css("width",""),r.data("sticky-top",0),r.removeClass("fr-sticky-on"),e.$box.removeClass("fr-sticky-box")}function o(n){if(n.offsetWidth){var r=t(n),o=r.outerHeight(),c=r.data("sticky-position"),a=t("body"===e.opts.scrollableContainer?e.o_win:e.opts.scrollableContainer).outerHeight(),l=0,i=0;"body"!==e.opts.scrollableContainer&&(l=e.$sc.offset().top,i=t(e.o_win).outerHeight()-l-a);var s="body"===e.opts.scrollableContainer?e.helpers.scrollTop():l,d=r.is(".fr-sticky-on");r.data("sticky-parent")||r.data("sticky-parent",r.parent());var h=r.data("sticky-parent"),f=h.offset().top,m=h.outerHeight();if(r.data("sticky-offset")?e.$box.find(".fr-sticky-dummy").css("height","".concat(o,"px")):(r.data("sticky-offset",!0),r.after('<div class="fr-sticky-dummy" style="height: '.concat(o,'px;"></div>'))),!c){var p="auto"!==r.css("top")||"auto"!==r.css("bottom");p||r.css("position","fixed"),c={top:e.node.hasClass(r.get(0),"fr-top"),bottom:e.node.hasClass(r.get(0),"fr-bottom")},p||r.css("position",""),r.data("sticky-position",c),r.data("top",e.node.hasClass(r.get(0),"fr-top")?r.css("top"):"auto"),r.data("bottom",e.node.hasClass(r.get(0),"fr-bottom")?r.css("bottom"):"auto")}var u=e.helpers.getPX(r.data("top")),v=e.helpers.getPX(r.data("bottom")),g=c.top&&f<s+u&&s+u<=f+m-o&&(e.helpers.isInViewPort(e.$sc.get(0))||"body"===e.opts.scrollableContainer),_=c.bottom&&f+o<s+a-v&&s+a-v<f+m;if(g||_){var y=h.get(0).offsetWidth-h.get(0).clientWidth;r.css("width","".concat(h.get(0).getBoundingClientRect().width-y,"px")),d||(r.addClass("fr-sticky-on"),r.removeClass("fr-sticky-off"),r.css("top")&&("auto"!==r.data("top")?r.css("top",e.helpers.getPX(r.data("top"))+l):r.data("top","auto")),r.css("bottom")&&("auto"!==r.data("bottom")?r.css("bottom",e.helpers.getPX(r.data("bottom"))+i):r.css("bottom","auto")))}else e.node.hasClass(r.get(0),"fr-sticky-off")||(r.css("width",""),r.removeClass("fr-sticky-on"),r.addClass("fr-sticky-off"),r.css("top")&&"auto"!==r.data("top")&&c.top&&r.css("top",0),r.css("bottom")&&"auto"!==r.data("bottom")&&c.bottom&&r.css("bottom",0))}}function s(){if(e.helpers.requestAnimationFrame()(s),!1!==e.events.trigger("position.refresh"))for(var n=0;n<e._stickyElements.length;n++)if(e.opts.toolbarBottom){var r=e.$tb.parent(),o=r.get(0).offsetWidth-r.get(0).clientWidth,c=t(e._stickyElements[n]);c.width(r.width()-o),c.addClass("fr-sticky-on"),e.$box.addClass("fr-sticky-box")}else i(e._stickyElements[n])}function c(){if(e._stickyElements)for(var t=0;t<e._stickyElements.length;t++)o(e._stickyElements[t])}return{_init:function(){e._stickyElements=[],e.helpers.isIOS()?(s(),e.events.$on(t(e.o_win),"scroll",(function(){if(e.core.hasFocus())for(var n=0;n<e._stickyElements.length;n++){var r=t(e._stickyElements[n]),o=r.parent(),c=e.helpers.scrollTop();r.outerHeight()<c-o.offset().top&&(e.opts.toolbarBottom&&e.helpers.isIOS()||(r.addClass("fr-opacity-0"),r.data("sticky-top",-1),r.data("sticky-scheduled",-1)))}}),!0)):("body"!==e.opts.scrollableContainer&&e.events.$on(t(e.opts.scrollableContainer),"scroll",c,!0),e.events.$on(t(e.o_win),"scroll",c,!0),e.events.$on(t(e.o_win),"resize",c,!0),e.events.on("initialized",c),e.events.on("focus",c),e.events.$on(t(e.o_win),"resize","textarea",c,!0)),e.events.on("destroy",(function(){e._stickyElements=[]}))},forSelection:function(t){var r=a();if(null!=r.top){t.css({top:0,left:0});var o=r.top+r.height,c=r.left+r.width/2-t.get(0).offsetWidth/2+e.helpers.scrollLeft();e.opts.iframe||(o+=e.helpers.scrollTop()),n(c,o,t,r.height)}},addSticky:function(t){t.addClass("fr-sticky"),e.helpers.isIOS()&&!e.opts.toolbarBottom&&t.addClass("fr-sticky-ios"),t.removeClass("fr-sticky"),e._stickyElements.push(t.get(0))},refresh:c,at:n,getBoundingRect:a}},r.MODULES.refresh=function(e){var t=e.$;function n(e,t){e.toggleClass("fr-disabled",t).attr("aria-disabled",t)}function r(n){var r=e.$tb.find('.fr-more-toolbar[data-name="'.concat(n.attr("data-group-name"),'"]')),o=function(n,r){var o=0,c=r.find("> .fr-command, > .fr-btn-wrap");c.each((function(e,n){o+=t(n).outerWidth()}));var a,l=e.helpers.getPX(t(c[0]).css("margin-left")),i=e.helpers.getPX(t(c[0]).css("margin-right"));return(a="rtl"===e.opts.direction?e.$tb.outerWidth()-n.offset().left+e.$tb.offset().left-(o+n.outerWidth()+c.length*(l+i))/2:n.offset().left-e.$tb.offset().left-(o-n.outerWidth()+c.length*(l+i))/2)+o+c.length*(l+i)>e.$tb.outerWidth()&&(a-=(o+c.length*(l+i)-n.outerWidth())/2),a<0&&(a=0),a}(n,r);"rtl"===e.opts.direction?r.css("padding-right",o):r.css("padding-left",o)}return{undo:function(t){n(t,!e.undo.canDo())},redo:function(t){n(t,!e.undo.canRedo())},outdent:function(r){if(e.node.hasClass(r.get(0),"fr-no-refresh"))return!1;if(t("button#markdown-".concat(e.id,".fr-active")).length)return!1;for(var o=e.selection.blocks(),c=0;c<o.length;c++){var l="rtl"===e.opts.direction||"rtl"===t(o[c]).css("direction")?"margin-right":"margin-left",a=o[0].parentElement;if("HTML"!=a.parentNode.tagName&&"P"!=a.parentNode.tagName&&"DIV"!=a.parentNode.tagName&&"UL"!=a.parentNode.tagName&&"OL"!=a.parentNode.tagName&&"LI"!=a.parentNode.tagName)return n(r,!0),!0;if(o[0].previousSibling&&"none"==a.parentNode.style.listStyleType)return n(r,!0),!0;if("LI"===o[c].tagName||"LI"===o[c].parentNode.tagName)return n(r,!1),!0;if(0<e.helpers.getPX(t(o[c]).css(l)))return n(r,!1),!0}n(r,!0)},indent:function(r){if(e.node.hasClass(r.get(0),"fr-no-refresh"))return!1;if(t("button#markdown-".concat(e.id,".fr-active")).length)return!1;for(var o=e.selection.blocks(),c=0;c<o.length;c++){for(var l=o[c].previousSibling;l&&l.nodeType===Node.TEXT_NODE&&0===l.textContent.length;)l=l.previousSibling;if("LI"!==o[c].tagName||l)return n(r,!1),!0;n(r,!0)}},moreText:r,moreParagraph:r,moreMisc:r,moreRich:r}},Object.assign(r.DEFAULTS,{attribution:!0,toolbarBottom:!1,toolbarButtons:null,toolbarButtonsXS:null,toolbarButtonsSM:null,toolbarButtonsMD:null,toolbarContainer:null,toolbarInline:!1,toolbarSticky:!0,toolbarStickyOffset:0,toolbarVisibleWithoutSelection:!1}),r.TOOLBAR_BUTTONS={moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["trackChanges","markdown","insertLink","insertFiles","insertImage","insertVideo","insertTable","emoticons","fontAwesome","specialCharacters","embedly","insertFile","insertHR"],buttonsVisible:4},moreMisc:{buttons:["undo","redo","fullscreen","print","getPDF","spellChecker","selectAll","html","help"],align:"right",buttonsVisible:2},trackChanges:{buttons:["showChanges","applyAll","removeAll","applyLast","removeLast"],buttonsVisible:0}},r.TOOLBAR_BUTTONS_MD=null,(r.TOOLBAR_BUTTONS_SM={}).moreText=Object.assign({},r.TOOLBAR_BUTTONS.moreText,{buttonsVisible:2}),r.TOOLBAR_BUTTONS_SM.moreParagraph=Object.assign({},r.TOOLBAR_BUTTONS.moreParagraph,{buttonsVisible:2}),r.TOOLBAR_BUTTONS_SM.moreRich=Object.assign({},r.TOOLBAR_BUTTONS.moreRich,{buttonsVisible:2}),r.TOOLBAR_BUTTONS_SM.moreMisc=Object.assign({},r.TOOLBAR_BUTTONS.moreMisc,{buttonsVisible:2}),r.TOOLBAR_BUTTONS_SM.trackChanges=Object.assign({},r.TOOLBAR_BUTTONS.trackChanges,{buttonsVisible:0}),(r.TOOLBAR_BUTTONS_XS={}).moreText=Object.assign({},r.TOOLBAR_BUTTONS.moreText,{buttonsVisible:0}),r.TOOLBAR_BUTTONS_XS.moreParagraph=Object.assign({},r.TOOLBAR_BUTTONS.moreParagraph,{buttonsVisible:0}),r.TOOLBAR_BUTTONS_XS.moreRich=Object.assign({},r.TOOLBAR_BUTTONS.moreRich,{buttonsVisible:0}),r.TOOLBAR_BUTTONS_XS.moreMisc=Object.assign({},r.TOOLBAR_BUTTONS.moreMisc,{buttonsVisible:2}),r.TOOLBAR_BUTTONS_XS.trackChanges=Object.assign({},r.TOOLBAR_BUTTONS.trackChanges,{buttonsVisible:0}),r.POWERED_BY='<a id="fr-logo" href="https://froala.com/wysiwyg-editor" target="_blank" title="Froala WYSIWYG HTML Editor"><span>Powered by</span><svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 822.8 355.33"><defs><style>.fr-logo{fill:#b1b2b7;}</style></defs><title>Froala</title><path class="fr-logo" d="M123.58,78.65A16.16,16.16,0,0,0,111.13,73H16.6C7.6,73,0,80.78,0,89.94V128.3a16.45,16.45,0,0,0,32.9,0V104.14h78.5A15.63,15.63,0,0,0,126.87,91.2,15.14,15.14,0,0,0,123.58,78.65Z"/><path class="fr-logo" d="M103.54,170a16.05,16.05,0,0,0-11.44-4.85H15.79A15.81,15.81,0,0,0,0,180.93v88.69a16.88,16.88,0,0,0,5,11.92,16,16,0,0,0,11.35,4.7h.17a16.45,16.45,0,0,0,16.41-16.6v-73.4H92.2A15.61,15.61,0,0,0,107.89,181,15.1,15.1,0,0,0,103.54,170Z"/><path class="fr-logo" d="M233,144.17c-5.29-6.22-16-7.52-24.14-7.52-16.68,0-28.72,7.71-36.5,23.47v-5.67a16.15,16.15,0,1,0-32.3,0v115.5a16.15,16.15,0,1,0,32.3,0v-38.7c0-19.09,3.5-63.5,35.9-63.5a44.73,44.73,0,0,1,5.95.27h.12c12.79,1.2,20.06-2.73,21.6-11.69C236.76,151.48,235.78,147.39,233,144.17Z"/><path class="fr-logo" d="M371.83,157c-13.93-13.11-32.9-20.33-53.43-20.33S279,143.86,265.12,157c-14.67,13.88-22.42,32.82-22.42,54.77,0,21.68,8,41.28,22.4,55.2,13.92,13.41,32.85,20.8,53.3,20.8s39.44-7.38,53.44-20.79c14.55-13.94,22.56-33.54,22.56-55.21S386.39,170.67,371.83,157Zm-9.73,54.77c0,25.84-18.38,44.6-43.7,44.6s-43.7-18.76-43.7-44.6c0-25.15,18.38-43.4,43.7-43.4S362.1,186.59,362.1,211.74Z"/><path class="fr-logo" d="M552.7,138.14a16.17,16.17,0,0,0-16,16.3v1C526.41,143.85,509,136.64,490,136.64c-19.83,0-38.19,7.24-51.69,20.4C424,171,416.4,190,416.4,212c0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,552.7,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C513.73,168.34,536.4,183.55,536.4,211.74Z"/><path class="fr-logo" d="M623.5,61.94a16.17,16.17,0,0,0-16,16.3v191.7a16.15,16.15,0,1,0,32.3,0V78.24A16.32,16.32,0,0,0,623.5,61.94Z"/><path class="fr-logo" d="M806.5,138.14a16.17,16.17,0,0,0-16,16.3v1c-10.29-11.63-27.74-18.84-46.7-18.84-19.83,0-38.19,7.24-51.69,20.4-14.33,14-21.91,33-21.91,55,0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,806.5,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C767.53,168.34,790.2,183.55,790.2,211.74Z"/></svg></a>',r.MODULES.toolbar=function(t){var n,o=t.$,c=[];function l(t){var n={};if(Array.isArray(t)){if(!Array.isArray(t[0])){for(var r=[],o=[],a=0;a<t.length;a++)"|"===t[a]||"-"===t[a]?(0<o.length&&r.push(o),o=[]):o.push(t[a]);0<o.length&&r.push(o),t=r}t.forEach((function(e,t){n["group".concat(t+1)]={buttons:e}})),n.showMoreButtons=!1}else"object"!==e(t)||Array.isArray(t)||((n=t).showMoreButtons=!0);return n}function d(){var e=t.helpers.screenSize();return c[n=e]}function h(){for(var e=t.$tb.find(".fr-more-toolbar"),n=0;n<e.length;n++){var r=o(e[n]);r.hasClass("fr-expanded")?function(){var e=t.helpers.getPX(r.css("padding-left")),n=r.find("> .fr-command, > .fr-btn-wrap"),c=o(n[0]),l=t.helpers.getPX(c.css("margin-left")),a=t.helpers.getPX(c.css("margin-right")),d=t.helpers.getPX(c.css("margin-top")),i=t.helpers.getPX(c.css("margin-bottom"));if(n.each((function(t,n){e+=o(n).outerWidth()+l+a})),t.$tb.outerWidth()<e){var s=Math.floor(e/t.$tb.outerWidth());e+=s*(e/r[0].childElementCount),s=Math.ceil(e/t.$tb.outerWidth());var h=(t.helpers.getPX(c.css("height"))+d+i)*s;r.css("height",h)}}():r.css("height","")}!t.helpers.isMobile()&&t.opts.toolbarBottom?t.$tb.find(".fr-toolbar .fr-more-toolbar").removeClass("position-relative"):t.$tb.find(".fr-toolbar .fr-more-toolbar").addClass("position-relative")}function a(){if(0==t.$tb.find("[data-name='trackChanges-".concat(t.id,"']")).length&&-1<t.opts.pluginsEnabled.indexOf("track_changes")){t.$tb.append(o('<div class="fr-more-toolbar"></div>').data("name","trackChanges-".concat(t.id)));for(var e=0,c=["showChanges","applyAll","removeAll","applyLast","removeLast"];e<c.length;e++){var l=c[e],f=r.COMMANDS[l];if(f){f.more_btn=!0;var a=o(t.button.build(l,f,!0));t.button.addButtons(a),t.$tb.find("[data-name='trackChanges-".concat(t.id,"']")).append(a)}}}if(n!==t.helpers.screenSize()){var m=d(),i=o(),s=o();for(var v in t.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").addClass("fr-hidden"),function(){for(var e=t.$tb.find(".fr-btn-grp, .fr-more-toolbar"),n=function(t){var n=o(e[t]);n.children().each((function(e,t){n.before(t)})),n.remove()},r=0;r<e.length;r++)n(r)}(),m){var _=m[v];if(_.buttons&&("trackChanges"!==v||-1!==t.opts.pluginsEnabled.indexOf("track_changes"))){var y=void 0,E=0,p=3,u=void 0;"trackChanges"!==v&&(u=o('<div class="fr-btn-grp fr-float-'.concat(m[v].align?m[v].align:"left",'"></div>'))),m.showMoreButtons&&(y=o('<div class="fr-more-toolbar"></div>').data("name","".concat(v,"-").concat(t.id)),"trackChanges"!==v&&"moreRich"!==v||!t.opts.trackChangesEnabled||y.addClass("fr-expanded"));for(var C=0;C<_.buttons.length;C++){void 0!==_.buttonsVisible&&(p=_.buttonsVisible);var g=t.$tb.find('> .fr-command[data-cmd="'+_.buttons[C]+'"], > div.fr-btn-wrap > .fr-command[data-cmd="'+_.buttons[C]+'"]'),w=null;t.node.hasClass(g.next().get(0),"fr-dropdown-menu")&&(w=g.next()),t.node.hasClass(g.next().get(0),"fr-options")&&(g.removeClass("fr-hidden"),g.next().removeClass("fr-hidden"),g=g.parent()),g.removeClass("fr-hidden"),m.showMoreButtons&&p<=E?(y.append(g),w&&y.append(w)):(u.append(g),w&&u.append(w)),E++}if(m.showMoreButtons&&p<E){var S=t.$tb.find('.fr-command[data-cmd="'.concat(v,'"]'));if(0<S.length)S.removeClass("fr-hidden fr-open");else{var b=v,T=r.COMMANDS[b];T&&(T.more_btn=!0,S=o(t.button.build(b,T,!0)),t.button.addButtons(S))}u&&u.append(S)}u&&i.push(u),m.showMoreButtons&&s.push(y)}}t.opts.toolbarBottom?(t.$tb.append(s),t.$tb.find(".fr-newline").remove(),t.$tb.append('<div class="fr-newline"></div>'),t.$tb.append(i)):(t.$tb.append(i),t.$tb.find(".fr-newline").remove(),t.$tb.append('<div class="fr-newline"></div>'),t.$tb.append(s)),t.$tb.removeClass("fr-toolbar-open"),t.$box.removeClass("fr-toolbar-open"),t.events.trigger("codeView.toggle")}h()}function f(e,n){setTimeout((function(){if((!e||e.which!=r.KEYCODE.ESC)&&t.selection.inEditor()&&t.core.hasFocus()&&!t.popups.areVisible()&&"false"!=o(t.selection.blocks()[0]).closest("table").attr("contenteditable")&&(t.opts.toolbarVisibleWithoutSelection||!t.selection.isCollapsed()&&!t.keys.isIME()||n)){if(t.$tb.data("instance",t),!1===t.events.trigger("toolbar.show",[e]))return;t.$tb.show(),t.opts.toolbarContainer||t.position.forSelection(t.$tb),1<t.opts.zIndex?t.$tb.css("z-index",t.opts.zIndex+1):t.$tb.css("z-index",null)}}),0)}function m(e){return(!e||"blur"!==e.type||document.activeElement!==t.el)&&(!(!e||"keydown"!==e.type||!t.keys.ctrlKey(e))||!!t.button.getButtons(".fr-dropdown.fr-active").next().find(t.o_doc.activeElement).length||(t.helpers.isMobile()&&t.opts.toolbarInline&&(t.$tb.find(".fr-expanded").toggleClass("fr-expanded"),t.$tb.find(".fr-open").removeClass("fr-open"),t.$tb.removeClass("fr-toolbar-open"),h()),void(!1!==t.events.trigger("toolbar.hide")&&t.$tb.hide())))}c[r.XS]=l(t.opts.toolbarButtonsXS||t.opts.toolbarButtons||r.TOOLBAR_BUTTONS_XS||r.TOOLBAR_BUTTONS||[]),c[r.SM]=l(t.opts.toolbarButtonsSM||t.opts.toolbarButtons||r.TOOLBAR_BUTTONS_SM||r.TOOLBAR_BUTTONS||[]),c[r.MD]=l(t.opts.toolbarButtonsMD||t.opts.toolbarButtons||r.TOOLBAR_BUTTONS_MD||r.TOOLBAR_BUTTONS||[]),c[r.LG]=l(t.opts.toolbarButtons||r.TOOLBAR_BUTTONS||[]);var v=null;function i(e){clearTimeout(v),e&&e.which===r.KEYCODE.ESC||(v=setTimeout(f,t.opts.typingTimer))}function s(){t.events.on("window.mousedown",m),t.events.on("keydown",m),t.events.on("blur",m),t.events.$on(t.$tb,"transitionend",".fr-more-toolbar",(function(){t.position.forSelection(t.$tb)})),t.helpers.isMobile()||t.events.on("window.mouseup",f),t.helpers.isMobile()?t.helpers.isIOS()||(t.events.on("window.touchend",f),t.browser.mozilla&&setInterval(f,200)):t.events.on("window.keyup",i),t.events.on("keydown",(function(e){e&&e.which===r.KEYCODE.ESC&&t.events.trigger("toolbar.esc")})),t.events.on("keydown",(function(e){if(e.which===r.KEYCODE.ALT)return e.stopPropagation(),!1}),!0),t.events.$on(t.$wp,"scroll.toolbar",f),t.events.on("commands.after",f),t.helpers.isMobile()&&(t.events.$on(t.$doc,"selectionchange",i),t.events.$on(t.$doc,"orientationchange",f))}function _(){t.$tb.html("").removeData().remove(),t.$tb=null,t.$second_tb&&(t.$second_tb.html("").removeData().remove(),t.$second_tb=null)}function y(){t.$box.removeClass("fr-top fr-bottom fr-inline fr-basic"),t.$box.find(".fr-sticky-dummy").remove()}function E(){t.opts.theme&&t.$tb.addClass("".concat(t.opts.theme,"-theme")),1<t.opts.zIndex&&t.$tb.css("z-index",t.opts.zIndex+1),"auto"!==t.opts.direction&&t.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(t.opts.direction)),t.helpers.isMobile()?t.$tb.addClass("fr-mobile"):t.$tb.addClass("fr-desktop"),t.opts.toolbarContainer?(t.opts.toolbarInline&&(s(),m()),t.opts.toolbarBottom?t.$tb.addClass("fr-bottom"):t.$tb.addClass("fr-top")):t.opts.toolbarInline?(t.$sc.append(t.$tb),t.$tb.data("container",t.$sc),t.$tb.addClass("fr-inline"),s(),t.opts.toolbarBottom=!1):(t.opts.toolbarBottom?(t.$box.append(t.$tb),t.$tb.addClass("fr-bottom"),t.$box.addClass("fr-bottom")):(t.opts.toolbarBottom=!1,t.$box.prepend(t.$tb),t.$tb.addClass("fr-top"),t.$box.addClass("fr-top")),t.$tb.addClass("fr-basic"),t.opts.toolbarSticky&&(t.opts.toolbarStickyOffset&&(t.opts.toolbarBottom?t.$tb.css("bottom",t.opts.toolbarStickyOffset):t.$tb.css("top",t.opts.toolbarStickyOffset)),t.position.addSticky(t.$tb))),function(){var e=t.button.buildGroup(d());t.$tb.append(e),h(),t.button.bindCommands(t.$tb)}(),function(){t.events.$on(o(t.o_win),"resize",a),t.events.$on(o(t.o_win),"orientationchange",a),t.opts.toolbarButtons&&-1<JSON.stringify(t.opts.toolbarButtons).indexOf("trackChanges")&&a();var e=t.$tb.find(".fr-more-toolbar[data-name=trackChanges-".concat(t.id,"]")),n=0!==e.length&&e.hasClass("fr-expanded");if(t.opts.trackChangesEnabled&&!n){var r=t.$tb.find(".fr-command.fr-btn[data-cmd=trackChanges");e.addClass("fr-expanded"),r.toggleClass("fr-open"),t.toolbar.enable()}}(),t.accessibility.registerToolbar(t.$tb),t.events.$on(t.$tb,"".concat(t._mousedown," ").concat(t._mouseup),(function(e){var n=e.originalEvent?e.originalEvent.target||e.originalEvent.originalTarget:null;if(n&&"INPUT"!==n.tagName&&!t.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1}),!0),t.helpers.isMobile()&&t.events.$on(t.$tb,"click",(function(){t.popups.areVisible().length||t.id!==t.shared.selected_editor&&t.shared.selected_editor||t.$el.focus()})),t.events.$on(t.$tb,"transitionend",".fr-more-toolbar",(function(){t.$box.hasClass("fr-fullscreen")&&(t.opts.height=t.o_win.innerHeight-(t.opts.toolbarInline?0:t.$tb.outerHeight()+(t.$second_tb?t.$second_tb.outerHeight():0)),t.size.refresh())}))}var C=!1;return{_init:function(){if(t.$sc=o(t.opts.scrollableContainer).first(),!t.$wp)return!1;t.opts.toolbarInline||t.opts.toolbarBottom||(t.$second_tb=o(t.doc.createElement("div")).attr("class","fr-second-toolbar"),t.$box.append(t.$second_tb),(!1!==t.ul||t.opts.attribution)&&t.$second_tb.prepend(r.POWERED_BY)),t.opts.toolbarContainer?(t.shared.$tb?(t.$tb=t.shared.$tb,t.opts.toolbarInline&&s()):(t.shared.$tb=o(t.doc.createElement("DIV")),t.shared.$tb.addClass("fr-toolbar"),t.$tb=t.shared.$tb,o(t.opts.toolbarContainer).append(t.$tb),E(),t.$tb.data("instance",t)),t.opts.toolbarInline?t.$box.addClass("fr-inline"):t.$box.addClass("fr-basic"),t.events.on("focus",(function(){t.$tb.data("instance",t)}),!0),t.opts.toolbarInline=!1):t.opts.toolbarInline?(t.$box.addClass("fr-inline"),t.shared.$tb?(t.$tb=t.shared.$tb,s()):(t.shared.$tb=o(t.doc.createElement("DIV")),t.shared.$tb.addClass("fr-toolbar"),t.$tb=t.shared.$tb,E())):(t.$box.addClass("fr-basic"),t.$tb=o(t.doc.createElement("DIV")),t.$tb.addClass("fr-toolbar"),E(),t.$tb.data("instance",t)),t.events.on("destroy",y,!0),t.events.on(t.opts.toolbarInline||t.opts.toolbarContainer?"shared.destroy":"destroy",_,!0),t.events.on("edit.on",(function(){t.$tb.removeClass("fr-disabled").removeAttr("aria-disabled")})),t.events.on("edit.off",(function(){t.$tb.addClass("fr-disabled").attr("aria-disabled",!0)})),t.events.on("shortcut",(function(e,n,r){var o;if(n&&!r?o=t.$tb.find('.fr-command[data-cmd="'.concat(n,'"]')):n&&r&&(o=t.$tb.find('.fr-command[data-cmd="'.concat(n,'"][data-param1="').concat(r,'"]'))),o.length&&(e.preventDefault(),e.stopPropagation(),o.parents(".fr-toolbar").data("instance",t),"keydown"===e.type))return t.button.exec(o),!1}))},hide:m,show:function(){if(!1===t.events.trigger("toolbar.show"))return!1;t.$tb.show()},showInline:f,disable:function(){!C&&t.$tb&&(t.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled",!0),C=!0)},enable:function(){C&&t.$tb&&(t.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled",!1),C=!1),t.button.bulkRefresh()},setMoreToolbarsHeight:h}};var o=["scroll","wheel","touchmove","touchstart","touchend"],c=["webkit","moz","ms","o"],l=["transitionend"],a=document.createElement("div").style,d=["Webkit","Moz","ms","O","css","style"],s={visibility:"hidden",display:"block"},h=["focus","blur","click"],i={},f=function(e,t){return{altKey:e.altKey,bubbles:e.bubbles,cancelable:e.cancelable,changedTouches:e.changedTouches,ctrlKey:e.ctrlKey,detail:e.detail,eventPhase:e.eventPhase,metaKey:e.metaKey,pageX:e.pageX,pageY:e.pageY,shiftKey:e.shiftKey,view:e.view,char:e.char,key:e.key,keyCode:e.keyCode,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pointerId:e.pointerId,pointerType:e.pointerType,screenX:e.screenX,screenY:e.screenY,targetTouches:e.targetTouches,toElement:e.toElement,touches:e.touches,type:e.type,which:e.which,target:e.target,currentTarget:t,originalEvent:e,stopPropagation:function(){e.stopPropagation()},stopImmediatePropagation:function(){e.stopImmediatePropagation()},preventDefault:function(){-1===o.indexOf(e.type)&&e.preventDefault()}}},p=function(e){return e.ownerDocument&&e.ownerDocument.body&&e.ownerDocument.body.contains(e)||"#document"===e.nodeName||"HTML"===e.nodeName||e===window},u=function(e,t){return function(n){var r=n.target;if(t)for(t=g(t);r&&r!==this;)Element.prototype.matches.call(r,g(t))&&e.call(r,f(n,r)),r=r.parentNode;else p(r)&&e.call(r,f(n,r))}},m=function(e,t){return new b(e,t)},g=function(e){return e&&"string"==typeof e?e.replace(/^\s*>/g,":scope >").replace(/,\s*>/g,", :scope >"):e},v=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},_=m;m.fn=m.prototype={constructor:m,length:0,contains:function(e){if(!e)return!1;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(this.contains(e[t])&&this!=e[t])return!0;return!1}for(var n=0;n<this.length;n++)for(var r=e;r;){if(r==this[n]||r[0]&&r[0].isEqualNode(this[n]))return!0;r=r.parentNode}return!1},findVisible:function(e){for(var t=this.find(e),n=t.length-1;0<=n;n--)_(t[n]).isVisible()||t.splice(n,1);return t},formatParams:function(e){return"".concat(Object.keys(e).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))})).join("&"))||""},ajax:function(e){var t=new XMLHttpRequest,n=this.formatParams(e.data);for(var r in"GET"===e.method.toUpperCase()&&(e.url=n?e.url+"?"+n:e.url),t.open(e.method,e.url,!0),e.withCredentials&&(t.withCredentials=!0),e.crossDomain&&t.setRequestHeader("Access-Control-Allow-Origin","*"),e.headers)Object.prototype.hasOwnProperty.call(e.headers,r)&&t.setRequestHeader(r,e.headers[r]);Object.prototype.hasOwnProperty.call(e.headers,"Content-Type")||("json"===e.dataType?t.setRequestHeader("Content-Type","application/json"):t.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")),t.onload=function(){if(200==t.status){var n=t.responseText;"json"===e.dataType&&(n=JSON.parse(n)),e.done(n,t.status,t)}else e.fail(t)},t.send(n)},prevAll:function(){var e=_();if(!this[0])return e;for(var t=this[0];t&&t.previousSibling;)t=t.previousSibling,e.push(t);return e},index:function(e){return e?"string"==typeof e?[].indexOf.call(_(e),this[0]):[].indexOf.call(this,e.length?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},isVisible:function(){return!!this[0]&&!!(this[0].offsetWidth||this[0].offsetHeight||this[0].getClientRects().length)},toArray:function(){return[].slice.call(this)},get:function(e){return null==e?[].slice.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=m.merge(this.constructor(),e);return t.prevObject=this,t},wrapAll:function(e){var t;return this[0]&&(v(e)&&(e=e.call(this[0])),t=m(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){if("string"==typeof e){for(var t=e.split(" "),n=0;n<t.length&&0===t[n].trim().length;)n++;if(n<t.length&&(_(e).length&&t[n].trim()===_(e)[0].tagName&&(e=document.createElement(t[n].trim())),n++),"string"!=typeof e)for(var r=_(e);n<t.length;n++){t[n]=t[n].trim();var a=t[n].split("=");r.attr(a[0],a[1].replace('"',""))}}for(;this[0].firstChild&&this[0].firstChild!==e&&"string"!=typeof e;)e.appendChild(this[0].firstChild)},wrap:function(e){var t=v(e);return this.each((function(n){_(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){this.nodeName&&this.nodeName.toLowerCase()===name.toLowerCase()||m(this).replaceWith(this.childNodes)}))},grep:function(e,t,n){for(var r=[],a=0,o=e.length,i=!n;a<o;a++)!t(e[a],a)!==i&&r.push(e[a]);return r},map:function(e){return this.pushStack(m.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack([].slice.apply(this,arguments))},each:function(e){if(this.length)for(var t=0;t<this.length&&!1!==e.call(this[t],t,this[t]);t++);return this},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]]:[])},empty:function(){for(var e=0;e<this.length;e++)this[e].innerHTML=""},contents:function(){for(var e=_(),t=0;t<this.length;t++)for(var n=this[t].childNodes,r=0;r<n.length;r++)e.push(n[r]);return e},attr:function(t,n){if("object"===e(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&null!==t[r]&&this.attr(r,t[r]);return this}if(void 0===n)return 0===this.length||!this[0].getAttribute&&"checked"!==t?void 0:"checked"===t?this[0].checked:"tagName"===t?this[0].tagName:this[0].getAttribute(t);if("checked"===t)for(var o=0;o<this.length;o++)this[o].checked=n;else if("tagName"===t)for(var a=0;a<this.length;a++)this[a].tagName=n;else for(var c=0;c<this.length;c++)this[c].setAttribute(t,n);return this},removeAttr:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute&&this[t].removeAttribute(e);return this},hide:function(){return this.css("display","none"),this},show:function(){return this.css("display","block"),this},focus:function(){return this.length&&this[0].focus(),this},blur:function(){return this.length&&this[0].blur(),this},data:function(t,n){if(void 0!==n){for(var r=0;r<this.length;r++)"object"!==e(this[r]["data-"+t]=n)&&"function"!=typeof n&&this[r].setAttribute&&this[r].setAttribute("data-"+t,n);return this}if(void 0!==n)return this.attr("data-"+t,n);if(0!==this.length)for(var o=0;o<this.length;o++){var a=this[o]["data-"+t];if(null==a&&this[o].getAttribute&&(a=this[o].getAttribute("data-"+t)),void 0!==a&&null!=a)return a}},removeData:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute&&this[t].removeAttribute("data-"+e),this[t]["data-"+e]=null;return this},getCorrectStyleName:function(e){if(!i[e]){var t;e in a&&(t=e);for(var n=e[0].toUpperCase()+e.slice(1),r=d.length;r--;)(e=d[r]+n)in a&&(t=e);i[e]=t}return i[e]},css:function(e,t){if(void 0!==t){if(0===this.length)return this;("string"!=typeof t||""===t.trim()||isNaN(t))&&"number"!=typeof t||!/(margin)|(padding)|(height)|(width)|(top)|(left)|(right)|(bottom)/gi.test(e)||/(line-height)/gi.test(e)||(t+="px");for(var n=0;n<this.length;n++)e=_(this).getCorrectStyleName(e),this[n].style[e]=t;return this}if("string"==typeof e){if(0===this.length)return;var r=this[0].ownerDocument||document,a=r.defaultView||r.parentWindow;return e=_(this).getCorrectStyleName(e),a.getComputedStyle(this[0])[e]}for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&this.css(o,e[o]);return this},toggleClass:function(e,t){if(1<e.split(" ").length){for(var n=e.split(" "),r=0;r<n.length;r++)this.toggleClass(n[r],t);return this}for(var a=0;a<this.length;a++)void 0===t?this[a].classList.contains(e)?this[a].classList.remove(e):this[a].classList.add(e):t?this[a].classList.contains(e)||this[a].classList.add(e):this[a].classList.contains(e)&&this[a].classList.remove(e);return this},addClass:function(e){if(0===e.length)return this;if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)this.addClass(t[n]);return this}for(var r=0;r<this.length;r++)this[r].classList.add(e);return this},removeClass:function(e){if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)t[n]=t[n].trim(),t[n].length&&this.removeClass(t[n]);return this}for(var r=0;r<this.length;r++)e.length&&this[r].classList.remove(e);return this},getClass:function(e){return e.getAttribute&&e.getAttribute("class")||""},stripAndCollapse:function(e){return(e.match(/[^\x20\t\r\n\f]+/g)||[]).join(" ")},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+_(this).stripAndCollapse(_(this).getClass(n))+" ").indexOf(t))return!0;return!1},scrollTop:function(e){if(void 0===e)return 0===this.length?void 0:this[0]===document?document.documentElement.scrollTop:this[0].scrollTop;for(var t=0;t<this.length;t++)this[t]===document?window.scrollTo(document.documentElement.scrollLeft,e):this[t].scrollTop=e},scrollLeft:function(e){if(void 0===e)return 0===this.length?void 0:this[0]===document?document.documentElement.scrollLeft:this[0].scrollLeft;for(var t=0;t<this.length;t++)this[t]===document?window.scrollTo(e,document.documentElement.scrollTop):this[t].scrollLeft=e},on:function(e,t,n){if(1<e.split(" ").length){for(var r=e.split(" "),a=0;a<r.length;a++)if(-1!==l.indexOf(e))for(var d=0;d<c.length;d++)this.on(c[d]+e[0].toUpperCase()+e.slice(1),t,n);else this.on(r[a],t,n);return this}n="function"==typeof t?u(t,null):u(n,t);for(var i=0;i<this.length;i++){var s=_(this[i]);s.data("events")||s.data("events",[]),s.data("events").push([e,n]);var h=e.split(".");h=h[0],0<=o.indexOf(h)?s.get(0).addEventListener(h,n,{passive:!0}):s.get(0).addEventListener(h,n)}},off:function(e){if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)this.off(t[n]);return this}for(var r=0;r<this.length;r++){var a=_(this[r]);if(a.data("events")){var o=e.split(".");o=o[0];for(var i=a.data("events")||[],s=i.length-1;0<=s;s--){var c=i[s];c[0]==e&&(a.get(0).removeEventListener(o,c[1]),i.splice(s,1))}}}},trigger:function(e){for(var t=0;t<this.length;t++){var n=void 0;"function"==typeof Event?n=0<=e.search(/^mouse/g)?new MouseEvent(e,{view:window,cancelable:!0,bubbles:!0}):new Event(e):0<=e.search(/^mouse/g)?(n=document.createEvent("MouseEvents")).initMouseEvent(e,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null):(n=document.createEvent("Event")).initEvent(e,!0,!0),0<=h.indexOf(e)&&"function"==typeof this[t][e]?this[t][e]():this[t].dispatchEvent(n)}},triggerHandler:function(){},val:function(e){if(void 0===e)return this[0].value;for(var t=0;t<this.length;t++)this[t].value=e;return this},siblings:function(){return _(this[0]).parent().children().not(this)},find:function(t){var n=_();if("string"!=typeof t){for(var r=0;r<t.length;r++)for(var o=0;o<this.length;o++)if(this[o]!==t[r]&&_(this[o]).contains(t[r])){n.push(t[r]);break}return n}var a=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":e(HTMLElement))?t instanceof HTMLElement:t&&"object"===e(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName};t=g(t);for(var c=0;c<this.length;c++)if(this[c].querySelectorAll){var i=[];if(t&&"string"==typeof t)try{i=this[c].querySelectorAll(t)}catch(e){i=this[c].children}else a(t)&&(i=[t]);for(var s=0;s<i.length;s++)n.push(i[s])}return n},children:function(){for(var e=_(),t=0;t<this.length;t++)for(var n=this[t].children,r=0;r<n.length;r++)e.push(n[r]);return e},not:function(e){if("string"==typeof e)for(var t=this.length-1;0<=t;t--)Element.prototype.matches.call(this[t],e)&&this.splice(t,1);else if(e instanceof m){for(var n=this.length-1;0<=n;n--)for(var r=0;r<e.length;r++)if(this[n]===e[r]){this.splice(n,1);break}}else for(var a=this.length-1;0<=a;a--)this[a]===e[0]&&this.splice(a,1);return this},add:function(e){for(var t=0;t<e.length;t++)this.push(e[t]);return this},closest:function(e){for(var t=0;t<this.length;t++){var n=Element.prototype.closest.call(this[t],e);if(n)return _(n)}return _()},html:function(e){if(void 0===e)return 0===this.length?void 0:this[0].innerHTML;if("string"==typeof e)for(var t=0;t<this.length;t++){this[t].innerHTML=e;for(var n=this[t].children,r=this[t].ownerDocument||document,a=0;a<n.length;a++)if("SCRIPT"===n[a].tagName){var o=r.createElement("script");o.innerHTML=n[a].innerHTML,n[a].hasAttribute("async")&&o.setAttribute("async",""),o.src=n[a].src,n[a].hasAttribute("defer")&&o.setAttribute("defer",""),r.head.appendChild(o).parentNode.removeChild(o)}}else{this[0].innerHTML="",this.append(e[0]);var i=this[0].ownerDocument||document;if("SCRIPT"===e[0].tagName){var s=i.createElement("script");s.innerHTML=e[0].innerHTML,i.head.appendChild(s).parentNode.removeChild(s)}}return this},text:function(e){if(!e)return this.length?this[0].textContent:"";for(var t=0;t<this.length;t++)this[t].textContent=e},after:function(e){if(e)if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t];if(n.nodeType!=Node.ELEMENT_NODE){var r=n.ownerDocument.createElement("SPAN");_(n).after(r),_(r).after(e).remove()}else n.insertAdjacentHTML("afterend",e)}else{var a=this[0];if(a.nextSibling)if(e instanceof m)for(var o=0;o<e.length;o++)a.nextSibling.parentNode.insertBefore(e[o],a.nextSibling);else a.nextSibling.parentNode.insertBefore(e,a.nextSibling);else _(a.parentNode).append(e)}return this},clone:function(e){for(var t=_(),n=0;n<this.length;n++)t.push(this[n].cloneNode(e));return t},replaceWith:function(e){if("string"==typeof e)for(var t=0;t<this.length;t++)this[t].parentNode&&(this[t].outerHTML=e);else if(e.length)for(var n=0;n<this.length;n++)this.replaceWith(e[n]);else this.after(e).remove()},insertBefore:function(e){return _(e).before(this[0]),this},before:function(e){if(e instanceof m){for(var t=0;t<e.length;t++)this.before(e[t]);return this}if(e)if("string"==typeof e)for(var n=0;n<this.length;n++){var r=this[n];if(r.nodeType!=Node.ELEMENT_NODE){var a=r.ownerDocument.createElement("SPAN");_(r).before(a),_(a).before(e).remove()}else r.parentNode&&r.insertAdjacentHTML("beforebegin",e)}else{var o=this[0];if(o.parentNode)if(e instanceof m)for(var i=0;i<e.length;i++)o.parentNode.insertBefore(e[i],o);else o.parentNode.insertBefore(e,o)}return this},append:function(e){if(0==this.length)return this;if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t],r=n.ownerDocument.createElement("SPAN");_(n).append(r),_(r).after(e).remove()}else if(e instanceof m||Array.isArray(e))for(var a=0;a<e.length;a++)this.append(e[a]);else"function"!=typeof e&&this[0].appendChild(e);return this},prepend:function(e){if(0==this.length)return this;if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t],r=n.ownerDocument.createElement("SPAN");_(n).prepend(r),_(r).before(e).remove()}else if(e instanceof m)for(var a=0;a<e.length;a++)this.prepend(e[a]);else{var o=this[0];o.firstChild?o.firstChild?o.insertBefore(e,o.firstChild):o.appendChild(e):_(o).append(e)}return this},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},prev:function(){return this.length&&this[0].previousElementSibling?_(this[0].previousElementSibling):_()},next:function(){return this.length&&this[0].nextElementSibling?_(this[0].nextElementSibling):_()},nextAllVisible:function(){return this.next()},prevAllVisible:function(){return this.prev()},outerHeight:function(e){if(0!==this.length){var t=this[0];if(t===t.window)return t.innerHeight;var n={},r=this.isVisible();if(!r)for(var a in s)n[a]=t.style[a],t.style[a]=s[a];var o=t.offsetHeight;if(e&&(o+=parseInt(_(t).css("marginTop"))+parseInt(_(t).css("marginBottom"))),!r)for(var i in s)t.style[i]=n[i];return o}},outerWidth:function(e){if(0!==this.length){var t=this[0];if(t===t.window)return t.outerWidth;var n={},r=this.isVisible();if(!r)for(var a in s)n[a]=t.style[a],t.style[a]=s[a];var o=t.offsetWidth;if(e&&(o+=parseInt(_(t).css("marginLeft"))+parseInt(_(t).css("marginRight"))),!r)for(var i in s)t.style[i]=n[i];return o}},width:function(e){if(void 0===e){if(this[0]instanceof HTMLDocument)return this[0].body.offsetWidth;if(this[0])return this[0].offsetWidth}else this[0].style.width=e+"px"},height:function(e){var t=this[0];if(void 0===e){if(t instanceof HTMLDocument){var n=t.documentElement;return Math.max(t.body.scrollHeight,n.scrollHeight,t.body.offsetHeight,n.offsetHeight,n.clientHeight)}return t.offsetHeight}t.style.height=e+"px"},is:function(e){return 0!==this.length&&("string"==typeof e&&this[0].matches?this[0].matches(e):e instanceof m?this[0]==e[0]:this[0]==e)},parent:function(){return 0===this.length?_():_(this[0].parentNode)},_matches:function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return e&&!t?n:n.call(e,t)},parents:function(e){for(var t=_(),n=0;n<this.length;n++)for(var r=this[n].parentNode;r&&r!=document&&this._matches(r);)e?this._matches(r,e)&&t.push(r):t.push(r),r=r.parentNode;return t},parentsUntil:function(e,t){var n=_();e instanceof m&&0<e.length&&(e=e[0]);for(var r=0;r<this.length;r++)for(var a=this[r].parentNode;a&&a!=document&&a!=e&&this[r]!=e&&("string"!=typeof e||!Element.prototype.matches.call(a,e));)t?Element.prototype.matches.call(a,t)&&n.push(a):n.push(a),a=a.parentNode;return n},insertAfter:function(e){var t=e.parent()[0];t&&t.insertBefore(this[0],e[0].nextElementSibling)},filter:function(e){var t=_();if("function"==typeof e)for(var n=0;n<this.length;n++)e.call(this[n],this[n])&&t.push(this[n]);else if("string"==typeof e)for(var r=0;r<this.length;r++)this[r].matches(e)&&t.push(this[r]);return t},offset:function(){if(0!==this.length){var e=this[0].getBoundingClientRect(),t=this[0].ownerDocument.defaultView;return{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}}},position:function(){return{left:this[0].offsetLeft,top:this[0].offsetTop}},push:[].push,splice:[].splice},m.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e},m.merge=function(e,t){for(var n=+t.length,r=0,a=e.length;r<n;r++)e[a++]=t[r];return e.length=a,e},m.map=function(e,t,n){var r,a,o=0,i=[];if(Array.isArray(e))for(r=e.length;o<r;o++)null!=(a=t(e[o],o,n))&&i.push(a);else for(o in e)null!=(a=t(e[o],o,n))&&i.push(a);return[].concat.apply([],i)};var b=function(e,t){if(!e)return this;if("string"==typeof e&&"<"===e[0]){var n=document.createElement("DIV");return n.innerHTML=e,_(n.firstElementChild)}if(t=t instanceof m?t[0]:t,"string"!=typeof e)return e instanceof m?e:(this[0]=e,this.length=1,this);e=g(e);for(var r=(t||document).querySelectorAll(e),a=0;a<r.length;a++)this[a]=r[a];return this.length=r.length,this};b.prototype=m.prototype;var y=r;function E(){this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=m(this.doc),this.$win=m(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(y.PLUGINS)),this.opts.initOnClick?(this.load(y.MODULES),this.$el.on("touchstart.init",(function(){m(this).data("touched",!0)})),this.$el.on("touchmove.init",(function(){m(this).removeData("touched")})),this.$el.on("mousedown.init touchend.init dragenter.init focus.init",function(e){if("touchend"===e.type&&!this.$el.data("touched"))return!0;if(1===e.which||!e.which){this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"),this.load(y.MODULES),this.load(y.PLUGINS);var t=e.originalEvent&&e.originalEvent.originalTarget;if(t&&"IMG"===t.tagName&&m(t).trigger("mousedown"),void 0===this.ul&&this.destroy(),"touchend"===e.type&&this.image&&e.originalEvent&&e.originalEvent.target&&m(e.originalEvent.target).is("img")){var n=this;setTimeout((function(){n.image.edit(m(e.originalEvent.target))}),100)}this.ready=!0,this.events.trigger("initialized")}}.bind(this)),this.events.trigger("initializationDelayed")):(this.load(y.MODULES),this.load(y.PLUGINS),m(this.o_win).scrollTop(this.c_scroll),void 0===this.ul&&this.destroy(),this.ready=!0,this.events.trigger("initialized"))}if(y.Bootstrap=function(t,n,r){this.id=++y.ID,this.$=m;var o={};"function"==typeof n&&(r=n,n={}),r&&(n.events||(n.events={}),n.events.initialized=r),n&&n.documentReady&&(o.toolbarButtons=[["fullscreen","undo","redo","getPDF","print"],["bold","italic","underline","textColor","backgroundColor","clearFormatting"],["alignLeft","alignCenter","alignRight","alignJustify"],["formatOL","formatUL","indent","outdent"],["paragraphFormat"],["fontFamily"],["fontSize"],["insertLink","insertImage","quote"]],o.paragraphFormatSelection=!0,o.fontFamilySelection=!0,o.fontSizeSelection=!0,o.placeholderText="",o.quickInsertEnabled=!1,o.charCounterCount=!1),this.opts=Object.assign({},Object.assign({},y.DEFAULTS,o,"object"===e(n)&&n));var a=JSON.stringify(this.opts);y.OPTS_MAPPING[a]=y.OPTS_MAPPING[a]||this.id,this.sid=y.OPTS_MAPPING[a],y.SHARED[this.sid]=y.SHARED[this.sid]||{},this.shared=y.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=m(t),this.$oel.data("froala.editor",this),this.o_doc=t.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow,this.c_scroll=m(this.o_win).scrollTop(),this._init()},y.Bootstrap.prototype._init=function(){var e=this.$oel.get(0).tagName;this.$oel.closest("label").length;var t=function(){"TEXTAREA"!==e&&(this._original_html=this._original_html||this.$oel.html()),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=m('<iframe src="about:blank" frameBorder="0">'),this.$wp=m("<div></div>"),this.$box.html(this.$wp),this.$wp.append(this.$iframe),this.$iframe.get(0).contentWindow.document.open(),this.$iframe.get(0).contentWindow.document.write("<!DOCTYPE html>"),this.$iframe.get(0).contentWindow.document.write("<html><head></head><body></body></html>"),this.$iframe.get(0).contentWindow.document.close(),this.iframe_document=this.$iframe.get(0).contentWindow.document,this.$el=m(this.iframe_document.querySelector("body")),this.el=this.$el.get(0),this.$head=m(this.iframe_document.querySelector("head")),this.$html=m(this.iframe_document.querySelector("html"))):(this.$el=m(this.o_doc.createElement("DIV")),this.el=this.$el.get(0),this.$wp=m(this.o_doc.createElement("DIV")).append(this.$el),this.$box.html(this.$wp)),setTimeout(E.bind(this),0)}.bind(this),n=function(){this.$box=m("<div>"),this.$oel.before(this.$box).hide(),this._original_html=this.$oel.val();var e=this;this.$oel.parents("form").on("submit.".concat(this.id),(function(){e.events.trigger("form.submit")})),this.$oel.parents("form").on("reset.".concat(this.id),(function(){e.events.trigger("form.reset")})),t()}.bind(this),r=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.$el.attr("contenteditable",!0).css("outline","none").css("display","inline-block"),this.opts.multiLine=!1,this.opts.toolbarInline=!1,setTimeout(E.bind(this),0)}.bind(this),a=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.opts.toolbarInline=!1,setTimeout(E.bind(this),0)}.bind(this),o=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.opts.toolbarInline=!1,this.$oel.on("click.popup",(function(e){e.preventDefault()})),setTimeout(E.bind(this),0)}.bind(this);this.opts.editInPopup?o():"TEXTAREA"===e?n():"A"===e?r():"IMG"===e?a():"BUTTON"===e||"INPUT"===e?(this.opts.editInPopup=!0,this.opts.toolbarInline=!1,o()):t()},y.Bootstrap.prototype.load=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if(this[t])continue;if(y.PLUGINS[t]&&this.opts.pluginsEnabled.indexOf(t)<0)continue;if(this[t]=new e[t](this),this[t]._init&&(this[t]._init(),this.opts.initOnClick&&"core"===t))return!1}},y.Bootstrap.prototype.destroy=function(){this.destrying=!0,this.shared.count--,this.events&&this.events.$off();var e=this.html&&this.html.get();if(this.opts.iframe&&(this.events.disableBlur(),this.win.focus(),this.events.enableBlur()),this.events&&(this.events.trigger("destroy",[],!0),this.events.trigger("shared.destroy",[],!0)),0===this.shared.count){for(var t in this.shared)Object.prototype.hasOwnProperty.call(this.shared,t)&&(this.shared[t]=null,y.SHARED[this.sid][t]=null);delete y.SHARED[this.sid]}this.$oel.parents("form").off(".".concat(this.id)),this.$oel.off("click.popup"),this.$oel.removeData("froala.editor"),this.$oel.off("froalaEditor"),this.core&&this.core.destroy(e),y.INSTANCES.splice(y.INSTANCES.indexOf(this),1)},r.PLUGINS.align=function(a){var e=a.$;return{apply:function(t){var n=a.selection.element();if(e(n).parents(".fr-img-caption").length)e(n).css("text-align",t);else{a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var r=a.selection.blocks(),o=0;o<r.length;o++)e(r[o]).css("text-align",t).removeClass("fr-temp-div"),""===e(r[o]).attr("class")&&e(r[o]).removeAttr("class"),""===e(r[o]).attr("style")&&e(r[o]).removeAttr("style");a.selection.save(),a.html.unwrap(),a.selection.restore()}},refresh:function(t){var n=a.selection.blocks();if(n.length){var r=a.helpers.getAlignment(e(n[0]));t.find("> *").first().replaceWith(a.icon.create("align-".concat(r)))}},refreshOnShow:function(t,n){var r=a.selection.blocks();if(r.length){var o=a.helpers.getAlignment(e(r[0]));n.find('a.fr-command[data-param1="'.concat(o,'"]')).addClass("fr-active").attr("aria-selected",!0)}},refreshForToolbar:function(t){var n=a.selection.blocks();if(n.length){var r=a.helpers.getAlignment(e(n[0]));r=r.charAt(0).toUpperCase()+r.slice(1),"align".concat(r)===t.attr("data-cmd")&&t.addClass("fr-active")}}}},r.DefineIcon("align",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),r.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),r.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),r.RegisterCommand("align",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.align.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="align"data-param1="\n        '.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.icon.create("align-".concat(n)),'<span class="fr-sr-only">\n        ').concat(this.language.translate(t[n]),"</span></a></li>"));return e+"</ul>"},callback:function(e,t){this.align.apply(t)},refresh:function(e){this.align.refresh(e)},refreshOnShow:function(e,t){this.align.refreshOnShow(e,t)},plugin:"align"}),r.RegisterCommand("alignLeft",{type:"button",icon:"align-left",title:"Align Left",callback:function(){this.align.apply("left")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),r.RegisterCommand("alignRight",{type:"button",icon:"align-right",title:"Align Right",callback:function(){this.align.apply("right")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),r.RegisterCommand("alignCenter",{type:"button",icon:"align-center",title:"Align Center",callback:function(){this.align.apply("center")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),r.RegisterCommand("alignJustify",{type:"button",icon:"align-justify",title:"Align Justify",callback:function(){this.align.apply("justify")},refresh:function(e){this.align.refreshForToolbar(e)},plugin:"align"}),Object.assign(r.DEFAULTS,{charCounterMax:-1,charCounterCount:!0}),r.PLUGINS.charCounter=function(e){var t,n=e.$,a=function(){return(e.el.textContent||"").replace(/\u200B/g,"").length};function o(t){if(e.opts.charCounterMax<0)return!0;if(a()<e.opts.charCounterMax)return!0;var n=t.which;return!(!e.keys.ctrlKey(t)&&e.keys.isCharacter(n)||n===r.KEYCODE.IME)||(t.preventDefault(),t.stopPropagation(),e.events.trigger("charCounter.exceeded"),!1)}function c(t){return e.opts.charCounterMax<0||n("<div>").html(t).text().length+a()<=e.opts.charCounterMax?t:(e.events.trigger("charCounter.exceeded"),"")}function i(){if(e.opts.charCounterCount){var n=a()+(0<e.opts.charCounterMax?"/"+e.opts.charCounterMax:"");t.text("".concat(e.language.translate("Characters")," : ").concat(n)),e.opts.toolbarBottom&&t.css("margin-bottom",e.$tb.outerHeight(!0));var r=e.$wp.get(0).offsetWidth-e.$wp.get(0).clientWidth;0<=r&&("rtl"==e.opts.direction?t.css("margin-left",r):t.css("margin-right",r))}}return{_init:function(){return!!e.$wp&&!!e.opts.charCounterCount&&((t=n(document.createElement("span")).attr("class","fr-counter")).css("bottom",e.$wp.css("border-bottom-width")),e.$second_tb?e.$second_tb.append(t):e.$wp.append(t),e.events.on("keydown",o,!0),e.events.on("paste.afterCleanup",c),e.events.on("keyup contentChanged input",(function(){e.events.trigger("charCounter.update")})),e.events.on("charCounter.update",i),e.events.trigger("charCounter.update"),void e.events.on("destroy",(function(){n(e.o_win).off("resize.char".concat(e.id)),t.removeData().remove(),t=null})))},count:a}},r.PLUGINS.codeBeautifier=function(){var e,t,n,r,o={};function c(e,t){var n={"@page":!0,"@font-face":!0,"@keyframes":!0,"@media":!0,"@supports":!0,"@document":!0},r={"@media":!0,"@supports":!0,"@document":!0};t=t||{},e=(e=e||"").replace(/\r\n|[\r\u2028\u2029]/g,"\n");var a=t.indent_size||4,o=t.indent_char||" ",i=void 0===t.selector_separator_newline||t.selector_separator_newline,s=void 0!==t.end_with_newline&&t.end_with_newline,c=void 0===t.newline_between_rules||t.newline_between_rules,l=t.eol?t.eol:"\n";"string"==typeof a&&(a=parseInt(a,10)),t.indent_with_tabs&&(o="\t",a=1),l=l.replace(/\\r/,"\r").replace(/\\n/,"\n");var d,h=/^\s+$/,p=-1,u=0;function f(){return(d=e.charAt(++p))||""}function g(t){var n,r=p;return t&&v(),n=e.charAt(p+1)||"",p=r-1,f(),n}function m(t){for(var n=p;f();)if("\\"===d)f();else{if(-1!==t.indexOf(d))break;if("\n"===d)break}return e.substring(n,p+1)}function v(){for(var e="";h.test(g());)f(),e+=d;return e}function b(){var e="";for(d&&h.test(d)&&(e=d);h.test(f());)e+=d;return e}function _(t){var n=p;for(t="/"===g(),f();f();){if(!t&&"*"===d&&"/"===g()){f();break}if(t&&"\n"===d)return e.substring(n,p)}return e.substring(n,p)+d}function y(t){return e.substring(p-t.length,p).toLowerCase()===t}function E(){for(var t=0,n=p+1;n<e.length;n++){var r=e.charAt(n);if("{"===r)return!0;if("("===r)t+=1;else if(")"===r){if(0===t)return!1;t-=1}else if(" "===r||"}"===r)return!1}return!1}for(var C,w,S,T=e.match(/^[\t ]*/)[0],A=new Array(a+1).join(o),R=0,O=0,I={"{":function(e){I.singleSpace(),k.push(e),I.newLine()},"}":function(e){I.newLine(),k.push(e),I.newLine()},_lastCharWhitespace:function(){return h.test(k[k.length-1])},newLine:function(e){k.length&&(e||"\n"===k[k.length-1]||I.trim(),k.push("\n"),T&&k.push(T))},singleSpace:function(){k.length&&!I._lastCharWhitespace()&&k.push(" ")},preserveSingleSpace:function(){C&&I.singleSpace()},trim:function(){for(;I._lastCharWhitespace();)k.pop()}},k=[],N=!1,L=!1,M=!1,x="",D="";;){var P=b();C=""!==P;var U=-1!==P.indexOf("\n");if(D=x,!(x=d))break;if("/"===d&&"*"===g()){var B=0===R;(U||B)&&I.newLine(),k.push(_()),I.newLine(),B&&I.newLine(!0)}else if("/"===d&&"/"===g())U||"{"===D||I.trim(),I.singleSpace(),k.push(_()),I.newLine();else if("@"===d){I.preserveSingleSpace(),k.push(d);var F=(w=p,S=m(": , {}()[]/='\""),p=w-1,f(),S);F.match(/[ :]$/)&&(f(),F=m(": ").replace(/\s$/,""),k.push(F),I.singleSpace()),(F=F.replace(/\s$/,""))in n&&(O+=1,F in r&&(M=!0))}else"#"===d&&"{"===g()?(I.preserveSingleSpace(),k.push(m("}"))):"{"===d?"}"===g(!0)?(v(),f(),I.singleSpace(),k.push("{}"),I.newLine(),c&&0===R&&I.newLine(!0)):(R++,T+=A,I["{"](d),N=M?(M=!1,O<R):O<=R):"}"===d?(R--,T=T.slice(0,-a),I["}"](d),L=N=!1,O&&O--,c&&0===R&&I.newLine(!0)):":"===d?(v(),!N&&!M||y("&")||E()?":"===g()?(f(),k.push("::")):k.push(":"):(L=!0,k.push(":"),I.singleSpace())):'"'===d||"'"===d?(I.preserveSingleSpace(),k.push(m(d))):" "===d?(L=!1,k.push(d),I.newLine()):"("===d?y("url")?(k.push(d),v(),f()&&(")"!==d&&'"'!==d&&"'"!==d?k.push(m(")")):p--)):(u++,I.preserveSingleSpace(),k.push(d),v()):")"===d?(k.push(d),u--):","===d?(k.push(d),v(),i&&!L&&u<1?I.newLine():I.singleSpace()):("]"===d||("["===d?I.preserveSingleSpace():"="===d?(v(),d="="):I.preserveSingleSpace()),k.push(d))}var V="";return T&&(V+=T),V+=k.join("").replace(/[\r\n\t ]+$/,""),s&&(V+="\n"),"\n"!=l&&(V=V.replace(/[\n]/g,l)),V}function q(e,t){for(var n=0;n<t.length;n+=1)if(t[n]===e)return!0;return!1}function l(e){return e.replace(/^\s+|\s+$/g,"")}function d(e,t){return new a(e,t).beautify()}e=o,t="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ﬀ-ﬆﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼＡ-Ｚａ-ｚｦ-ﾾￂ-ￇￊ-ￏￒ-ￗￚ-ￜ",n=new RegExp("[".concat(t,"]")),r=new RegExp("[".concat(t," ").concat("̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ؚؠ-ىٲ-ۓۧ-ۨۻ-ۼܰ-݊ࠀ-ࠔࠛ-ࠣࠥ-ࠧࠩ-࠭ࡀ-ࡗࣤ-ࣾऀ-ःऺ-़ा-ॏ॑-ॗॢ-ॣ०-९ঁ-ঃ়া-ৄেৈৗয়-ৠਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢ-ૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୟ-ୠ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఁ-ఃె-ైొ-్ౕౖౢ-ౣ౦-౯ಂಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢ-ೣ೦-೯ംഃെ-ൈൗൢ-ൣ൦-൯ංඃ්ා-ුූෘ-ෟෲෳิ-ฺเ-ๅ๐-๙ິ-ູ່-ໍ໐-໙༘༙༠-༩༹༵༷ཁ-ཇཱ-྄྆-྇ྍ-ྗྙ-ྼ࿆က-ဩ၀-၉ၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟ᜎ-ᜐᜠ-ᜰᝀ-ᝐᝲᝳក-ឲ៝០-៩᠋-᠍᠐-᠙ᤠ-ᤫᤰ-᤻ᥑ-ᥭᦰ-ᧀᧈ-ᧉ᧐-᧙ᨀ-ᨕᨠ-ᩓ᩠-᩿᩼-᪉᪐-᪙ᭆ-ᭋ᭐-᭙᭫-᭳᮰-᮹᯦-᯳ᰀ-ᰢ᱀-᱉ᱛ-ᱽ᳐-᳒ᴀ-ᶾḁ-ἕ‌‍‿⁀⁔⃐-⃥⃜⃡-⃰ⶁ-ⶖⷠ-ⷿ〡-〨゙゚Ꙁ-ꙭꙴ-꙽ꚟ꛰-꛱ꟸ-ꠀ꠆ꠋꠣ-ꠧꢀ-ꢁꢴ-꣄꣐-꣙ꣳ-ꣷ꤀-꤉ꤦ-꤭ꤰ-ꥅꦀ-ꦃ꦳-꧀ꨀ-ꨧꩀ-ꩁꩌ-ꩍ꩐-꩙ꩻꫠ-ꫩꫲ-ꫳꯀ-ꯡ꯬꯭꯰-꯹ﬠ-ﬨ︀-️︠-︦︳︴﹍-﹏０-９＿","]")),e.newline=/[\n\r\u2028\u2029]/,e.lineBreak=new RegExp("\r\n|".concat(e.newline.source)),e.allLineBreaks=new RegExp(e.lineBreak.source,"g"),e.isIdentifierStart=function(e){return e<65?36===e||64===e:e<91||(e<97?95===e:e<123||170<=e&&n.test(String.fromCharCode(e)))},e.isIdentifierChar=function(e){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||170<=e&&r.test(String.fromCharCode(e))))};var h={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function a(e,t){var n,a,r,c,i,s,d,f,p,v,y,u,E,g=[],C="";function w(e,t){var r=0;return e&&(r=e.indentation_level,!n.just_added_newline()&&e.line_indent_level>r&&(r=e.line_indent_level)),{mode:t,parent:e,last_text:e?e.last_text:"",last_word:e?e.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,if_block:!1,else_block:!1,do_block:!1,do_while:!1,in_case_statement:!1,in_case:!1,case_body:!1,indentation_level:r,line_indent_level:e?e.line_indent_level:r,start_line_index:n.get_line_number(),ternary_depth:0}}for(u={TK_START_EXPR:function(){D();var e=h.Expression;if("["===c.text){if("TK_WORD"===i||")"===f.last_text)return"TK_RESERVED"===i&&q(f.last_text,r.line_starters)&&(n.space_before_token=!0),k(e),O(),I(),void(E.space_in_paren&&(n.space_before_token=!0));e=h.ArrayLiteral,N(f.mode)&&("["!==f.last_text&&(","!==f.last_text||"]"!==s&&"}"!==s)||E.keep_array_indentation||A())}else"TK_RESERVED"===i&&"for"===f.last_text?e=h.ForInitializer:"TK_RESERVED"===i&&q(f.last_text,["if","while"])&&(e=h.Conditional);" "===f.last_text||"TK_START_BLOCK"===i?A():"TK_END_EXPR"===i||"TK_START_EXPR"===i||"TK_END_BLOCK"===i||"."===f.last_text?T(c.wanted_newline):"TK_RESERVED"===i&&"("===c.text||"TK_WORD"===i||"TK_OPERATOR"===i?"TK_RESERVED"===i&&("function"===f.last_word||"typeof"===f.last_word)||"*"===f.last_text&&"function"===s?E.space_after_anon_function&&(n.space_before_token=!0):"TK_RESERVED"!==i||!q(f.last_text,r.line_starters)&&"catch"!==f.last_text||E.space_before_conditional&&(n.space_before_token=!0):n.space_before_token=!0,"("===c.text&&"TK_RESERVED"===i&&"await"===f.last_word&&(n.space_before_token=!0),"("===c.text&&("TK_EQUALS"!==i&&"TK_OPERATOR"!==i||x()||T()),k(e),O(),E.space_in_paren&&(n.space_before_token=!0),I()},TK_END_EXPR:function(){for(;f.mode===h.Statement;)M();f.multiline_frame&&T("]"===c.text&&N(f.mode)&&!E.keep_array_indentation),E.space_in_paren&&("TK_START_EXPR"!==i||E.space_in_empty_paren?n.space_before_token=!0:(n.trim(),n.space_before_token=!1)),"]"===c.text&&E.keep_array_indentation?(O(),M()):(M(),O()),n.remove_redundant_indentation(p),f.do_while&&p.mode===h.Conditional&&(p.mode=h.Expression,f.do_block=!1,f.do_while=!1)},TK_START_BLOCK:function(){var e=U(1),t=U(2);t&&(":"===t.text&&q(e.type,["TK_STRING","TK_WORD","TK_RESERVED"])||q(e.text,["get","set"])&&q(t.type,["TK_WORD","TK_RESERVED"]))?q(s,["class","interface"])?k(h.BlockStatement):k(h.ObjectLiteral):k(h.BlockStatement);var r=!e.comments_before.length&&"}"===e.text&&"function"===f.last_word&&"TK_END_EXPR"===i;"expand"===E.brace_style||"none"===E.brace_style&&c.wanted_newline?"TK_OPERATOR"!==i&&(r||"TK_EQUALS"===i||"TK_RESERVED"===i&&P(f.last_text)&&"else"!==f.last_text)?n.space_before_token=!0:A(!1,!0):"TK_OPERATOR"!==i&&"TK_START_EXPR"!==i?"TK_START_BLOCK"===i?A():n.space_before_token=!0:N(p.mode)&&","===f.last_text&&("}"===s?n.space_before_token=!0:A()),O(),I()},TK_END_BLOCK:function(){for(;f.mode===h.Statement;)M();var e="TK_START_BLOCK"===i;"expand"===E.brace_style?e||A():e||(N(f.mode)&&E.keep_array_indentation?(E.keep_array_indentation=!1,A(),E.keep_array_indentation=!0):A()),M(),O()},TK_WORD:B,TK_RESERVED:B,TK_SEMICOLON:function(){for(D()&&(n.space_before_token=!1);f.mode===h.Statement&&!f.if_block&&!f.do_block;)M();O()},TK_STRING:function(){D()||"TK_RESERVED"===i||"TK_WORD"===i?n.space_before_token=!0:"TK_COMMA"===i||"TK_START_EXPR"===i||"TK_EQUALS"===i||"TK_OPERATOR"===i?x()||T():A(),O()},TK_EQUALS:function(){D(),f.declaration_statement&&(f.declaration_assignment=!0),n.space_before_token=!0,O(),n.space_before_token=!0},TK_OPERATOR:function(){if(D(),"TK_RESERVED"===i&&P(f.last_text))return n.space_before_token=!0,void O();if("*"!==c.text||"TK_DOT"!==i){if(":"===c.text&&f.in_case)return f.case_body=!0,I(),O(),A(),void(f.in_case=!1);if("::"!==c.text){"TK_OPERATOR"===i&&T();var e=!0,t=!0;q(c.text,["--","++","!","~"])||q(c.text,["-","+"])&&(q(i,["TK_START_BLOCK","TK_START_EXPR","TK_EQUALS","TK_OPERATOR"])||q(f.last_text,r.line_starters)||","===f.last_text)?(t=e=!1,!c.wanted_newline||"--"!==c.text&&"++"!==c.text||A(!1,!0)," "===f.last_text&&L(f.mode)&&(e=!0),"TK_RESERVED"===i?e=!0:"TK_END_EXPR"===i?e=!("]"===f.last_text&&("--"===c.text||"++"===c.text)):"TK_OPERATOR"===i&&(e=q(c.text,["--","-","++","+"])&&q(f.last_text,["--","-","++","+"]),q(c.text,["+","-"])&&q(f.last_text,["--","++"])&&(t=!0)),f.mode!==h.BlockStatement&&f.mode!==h.Statement||"{"!==f.last_text&&" "!==f.last_text||A()):":"===c.text?0===f.ternary_depth?e=!1:f.ternary_depth-=1:"?"===c.text?f.ternary_depth+=1:"*"===c.text&&"TK_RESERVED"===i&&"function"===f.last_text&&(t=e=!1),n.space_before_token=n.space_before_token||e,O(),n.space_before_token=t}else O()}else O()},TK_COMMA:function(){if(f.declaration_statement)return L(f.parent.mode)&&(f.declaration_assignment=!1),O(),void(f.declaration_assignment?A(f.declaration_assignment=!1,!0):(n.space_before_token=!0,E.comma_first&&T()));O(),f.mode===h.ObjectLiteral||f.mode===h.Statement&&f.parent.mode===h.ObjectLiteral?(f.mode===h.Statement&&M(),A()):(n.space_before_token=!0,E.comma_first&&T())},TK_BLOCK_COMMENT:function(){if(n.raw)return n.add_raw_token(c),void(c.directives&&"end"===c.directives.preserve&&(E.test_output_raw||(n.raw=!1)));if(c.directives)return A(!1,!0),O(),"start"===c.directives.preserve&&(n.raw=!0),void A(!1,!0);if(!o.newline.test(c.text)&&!c.wanted_newline)return n.space_before_token=!0,O(),void(n.space_before_token=!0);var e,t=function(e){var t,n=[];for(t=(e=e.replace(/\x0d/g,"")).indexOf("\n");-1!==t;)n.push(e.substring(0,t)),t=(e=e.substring(t+1)).indexOf("\n");return e.length&&n.push(e),n}(c.text),r=!1,d=!1,a=c.whitespace_before,h=a.length;for(A(!1,!0),1<t.length&&(function(e,t){for(var n=0;n<e.length;n++)if(l(e[n]).charAt(0)!==t)return!1;return!0}(t.slice(1),"*")?r=!0:function(e,t){for(var n,r=0,a=e.length;r<a;r++)if((n=e[r])&&0!==n.indexOf(t))return!1;return!0}(t.slice(1),a)&&(d=!0)),O(t[0]),e=1;e<t.length;e++)A(!1,!0),r?O(" ".concat(t[e].replace(/^\s+/g,""))):d&&t[e].length>h?O(t[e].substring(h)):n.add_token(t[e]);A(!1,!0)},TK_COMMENT:function(){c.wanted_newline?A(!1,!0):n.trim(!0),n.space_before_token=!0,O(),A(!1,!0)},TK_DOT:function(){D(),"TK_RESERVED"===i&&P(f.last_text)?n.space_before_token=!0:T(")"===f.last_text&&E.break_chained_methods),O()},TK_UNKNOWN:function(){O(),"\n"===c.text[c.text.length-1]&&A()},TK_EOF:function(){for(;f.mode===h.Statement;)M()}},E={},void 0!==(t=t||{}).braces_on_own_line&&(E.brace_style=t.braces_on_own_line?"expand":"collapse"),E.brace_style=t.brace_style?t.brace_style:E.brace_style?E.brace_style:"collapse","expand-strict"===E.brace_style&&(E.brace_style="expand"),E.indent_size=t.indent_size?parseInt(t.indent_size,10):4,E.indent_char=t.indent_char?t.indent_char:" ",E.eol=t.eol?t.eol:"\n",E.preserve_newlines=void 0===t.preserve_newlines||t.preserve_newlines,E.break_chained_methods=void 0!==t.break_chained_methods&&t.break_chained_methods,E.max_preserve_newlines=void 0===t.max_preserve_newlines?0:parseInt(t.max_preserve_newlines,10),E.space_in_paren=void 0!==t.space_in_paren&&t.space_in_paren,E.space_in_empty_paren=void 0!==t.space_in_empty_paren&&t.space_in_empty_paren,E.jslint_happy=void 0!==t.jslint_happy&&t.jslint_happy,E.space_after_anon_function=void 0!==t.space_after_anon_function&&t.space_after_anon_function,E.keep_array_indentation=void 0!==t.keep_array_indentation&&t.keep_array_indentation,E.space_before_conditional=void 0===t.space_before_conditional||t.space_before_conditional,E.unescape_strings=void 0!==t.unescape_strings&&t.unescape_strings,E.wrap_line_length=void 0===t.wrap_line_length?0:parseInt(t.wrap_line_length,10),E.e4x=void 0!==t.e4x&&t.e4x,E.end_with_newline=void 0!==t.end_with_newline&&t.end_with_newline,E.comma_first=void 0!==t.comma_first&&t.comma_first,E.test_output_raw=void 0!==t.test_output_raw&&t.test_output_raw,E.jslint_happy&&(E.space_after_anon_function=!0),t.indent_with_tabs&&(E.indent_char="\t",E.indent_size=1),E.eol=E.eol.replace(/\\r/,"\r").replace(/\\n/,"\n"),d="";0<E.indent_size;)d+=E.indent_char,E.indent_size-=1;var b=0;if(e&&e.length){for(;" "===e.charAt(b)||"\t"===e.charAt(b);)C+=e.charAt(b),b+=1;e=e.substring(b)}function S(e){var t=e.newlines;if(E.keep_array_indentation&&N(f.mode))for(var n=0;n<t;n+=1)A(0<n);else if(E.max_preserve_newlines&&t>E.max_preserve_newlines&&(t=E.max_preserve_newlines),E.preserve_newlines&&1<e.newlines){A();for(var r=1;r<t;r+=1)A(!0)}u[(c=e).type]()}function T(e){e=void 0!==e&&e,n.just_added_newline()||(E.preserve_newlines&&c.wanted_newline||e||E.wrap_line_length&&n.current_line.get_character_count()+c.text.length+(n.space_before_token?1:0)>=E.wrap_line_length)&&A(!1,!0)}function A(e,t){if(!t&&" "!==f.last_text&&","!==f.last_text&&"="!==f.last_text&&"TK_OPERATOR"!==i)for(;f.mode===h.Statement&&!f.if_block&&!f.do_block;)M();n.add_new_line(e)&&(f.multiline_frame=!0)}function R(){n.just_added_newline()&&(E.keep_array_indentation&&N(f.mode)&&c.wanted_newline?(n.current_line.push(c.whitespace_before),n.space_before_token=!1):n.set_indent(f.indentation_level)&&(f.line_indent_level=f.indentation_level))}function O(e){n.raw?n.add_raw_token(c):(E.comma_first&&"TK_COMMA"===i&&n.just_added_newline()&&","===n.previous_line.last()&&(n.previous_line.pop(),R(),n.add_token(","),n.space_before_token=!0),e=e||c.text,R(),n.add_token(e))}function I(){f.indentation_level+=1}function k(e){p=f?(v.push(f),f):w(null,e),f=w(p,e)}function N(e){return e===h.ArrayLiteral}function L(e){return q(e,[h.Expression,h.ForInitializer,h.Conditional])}function M(){0<v.length&&(p=f,f=v.pop(),p.mode===h.Statement&&n.remove_redundant_indentation(p))}function x(){return f.parent.mode===h.ObjectLiteral&&f.mode===h.Statement&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===i&&q(f.last_text,["get","set"]))}function D(){return!!("TK_RESERVED"===i&&q(f.last_text,["const","let","const"])&&"TK_WORD"===c.type||"TK_RESERVED"===i&&"do"===f.last_text||"TK_RESERVED"===i&&"return"===f.last_text&&!c.wanted_newline||"TK_RESERVED"===i&&"else"===f.last_text&&("TK_RESERVED"!==c.type||"if"!==c.text)||"TK_END_EXPR"===i&&(p.mode===h.ForInitializer||p.mode===h.Conditional)||"TK_WORD"===i&&f.mode===h.BlockStatement&&!f.in_case&&"--"!==c.text&&"++"!==c.text&&"function"!==s&&"TK_WORD"!==c.type&&"TK_RESERVED"!==c.type||f.mode===h.ObjectLiteral&&(":"===f.last_text&&0===f.ternary_depth||"TK_RESERVED"===i&&q(f.last_text,["get","set"])))&&(k(h.Statement),I(),"TK_RESERVED"===i&&q(f.last_text,["const","let","const"])&&"TK_WORD"===c.type&&(f.declaration_statement=!0),x()||T("TK_RESERVED"===c.type&&q(c.text,["do","for","if","while"])),!0)}function P(e){return q(e,["case","return","do","if","throw","else"])}function U(e){var t=a+(e||0);return t<0||t>=g.length?null:g[t]}function B(){if("TK_RESERVED"===c.type&&f.mode!==h.ObjectLiteral&&q(c.text,["set","get"])&&(c.type="TK_WORD"),"TK_RESERVED"===c.type&&f.mode===h.ObjectLiteral&&":"===U(1).text&&(c.type="TK_WORD"),D()||!c.wanted_newline||L(f.mode)||"TK_OPERATOR"===i&&"--"!==f.last_text&&"++"!==f.last_text||"TK_EQUALS"===i||!E.preserve_newlines&&"TK_RESERVED"===i&&q(f.last_text,["const","let","const","set","get"])||A(),f.do_block&&!f.do_while){if("TK_RESERVED"===c.type&&"while"===c.text)return n.space_before_token=!0,O(),n.space_before_token=!0,void(f.do_while=!0);A(),f.do_block=!1}if(f.if_block)if(f.else_block||"TK_RESERVED"!==c.type||"else"!==c.text){for(;f.mode===h.Statement;)M();f.if_block=!1,f.else_block=!1}else f.else_block=!0;return"TK_RESERVED"===c.type&&("case"===c.text||"default"===c.text&&f.in_case_statement)?(A(),(f.case_body||E.jslint_happy)&&(0<f.indentation_level&&(!f.parent||f.indentation_level>f.parent.indentation_level)&&(f.indentation_level-=1),f.case_body=!1),O(),f.in_case=!0,void(f.in_case_statement=!0)):("TK_RESERVED"===c.type&&"function"===c.text&&((q(f.last_text,["}"," "])||n.just_added_newline()&&!q(f.last_text,["[","{",":","=",","]))&&(n.just_added_blankline()||c.comments_before.length||(A(),A(!0))),"TK_RESERVED"===i||"TK_WORD"===i?"TK_RESERVED"===i&&q(f.last_text,["get","set","new","return","export","async"])||"TK_RESERVED"===i&&"default"===f.last_text&&"export"===s?n.space_before_token=!0:A():"TK_OPERATOR"===i||"="===f.last_text?n.space_before_token=!0:(f.multiline_frame||!L(f.mode)&&!N(f.mode))&&A()),"TK_COMMA"!==i&&"TK_START_EXPR"!==i&&"TK_EQUALS"!==i&&"TK_OPERATOR"!==i||x()||T(),"TK_RESERVED"===c.type&&q(c.text,["function","get","set"])?(O(),void(f.last_word=c.text)):(y="NONE","TK_END_BLOCK"===i?"TK_RESERVED"===c.type&&q(c.text,["else","catch","finally"])?"expand"===E.brace_style||"end-expand"===E.brace_style||"none"===E.brace_style&&c.wanted_newline?y="NEWLINE":(y="SPACE",n.space_before_token=!0):y="NEWLINE":"TK_SEMICOLON"===i&&f.mode===h.BlockStatement?y="NEWLINE":"TK_SEMICOLON"===i&&L(f.mode)?y="SPACE":"TK_STRING"===i?y="NEWLINE":"TK_RESERVED"===i||"TK_WORD"===i||"*"===f.last_text&&"function"===s?y="SPACE":"TK_START_BLOCK"===i?y="NEWLINE":"TK_END_EXPR"===i&&(n.space_before_token=!0,y="NEWLINE"),"TK_RESERVED"===c.type&&q(c.text,r.line_starters)&&")"!==f.last_text&&(y="else"===f.last_text||"export"===f.last_text?"SPACE":"NEWLINE"),"TK_RESERVED"===c.type&&q(c.text,["else","catch","finally"])?"TK_END_BLOCK"!==i||"expand"===E.brace_style||"end-expand"===E.brace_style||"none"===E.brace_style&&c.wanted_newline?A():(n.trim(!0),"}"!==n.current_line.last()&&A(),n.space_before_token=!0):"NEWLINE"===y?"TK_RESERVED"===i&&P(f.last_text)?n.space_before_token=!0:"TK_END_EXPR"!==i?"TK_START_EXPR"===i&&"TK_RESERVED"===c.type&&q(c.text,["const","let","const"])||":"===f.last_text||("TK_RESERVED"===c.type&&"if"===c.text&&"else"===f.last_text?n.space_before_token=!0:A()):"TK_RESERVED"===c.type&&q(c.text,r.line_starters)&&")"!==f.last_text&&A():f.multiline_frame&&N(f.mode)&&","===f.last_text&&"}"===s?A():"SPACE"===y&&(n.space_before_token=!0),O(),f.last_word=c.text,"TK_RESERVED"===c.type&&"do"===c.text&&(f.do_block=!0),void("TK_RESERVED"===c.type&&"if"===c.text&&(f.if_block=!0))))}i="TK_START_BLOCK",s="",(n=new m(d,C)).raw=E.test_output_raw,v=[],k(h.BlockStatement),this.beautify=function(){var t,o;for(r=new _(e,E,d),g=r.tokenize(),a=0;t=U();){for(var c=0;c<t.comments_before.length;c++)S(t.comments_before[c]);S(t),s=f.last_text,i=t.type,f.last_text=t.text,a+=1}return o=n.get_code(),E.end_with_newline&&(o+="\n"),"\n"!=E.eol&&(o=o.replace(/[\n]/g,E.eol)),o}}function f(e){var t=0,n=-1,a=[],r=!0;this.set_indent=function(r){t=e.baseIndentLength+r*e.indent_length,n=r},this.get_character_count=function(){return t},this.is_empty=function(){return r},this.last=function(){return this._empty?null:a[a.length-1]},this.push=function(e){a.push(e),t+=e.length,r=!1},this.pop=function(){var e=null;return r||(e=a.pop(),t-=e.length,r=0===a.length),e},this.remove_indent=function(){0<n&&(n-=1,t-=e.indent_length)},this.trim=function(){for(;" "===this.last();)a.pop(),t-=1;r=0===a.length},this.toString=function(){var t="";return this._empty||(0<=n&&(t=e.indent_cache[n]),t+=a.join("")),t}}function m(e,t){t=t||"",this.indent_cache=[t],this.baseIndentLength=t.length,this.indent_length=e.length,this.raw=!1;var n=[];this.baseIndentString=t,this.indent_string=e,this.previous_line=null,this.current_line=null,this.space_before_token=!1,this.add_outputline=function(){this.previous_line=this.current_line,this.current_line=new f(this),n.push(this.current_line)},this.add_outputline(),this.get_line_number=function(){return n.length},this.add_new_line=function(e){return!(1===this.get_line_number()&&this.just_added_newline()||!e&&this.just_added_newline()||(this.raw||this.add_outputline(),0))},this.get_code=function(){return n.join("\n").replace(/[\r\n\t ]+$/,"")},this.set_indent=function(e){if(1<n.length){for(;e>=this.indent_cache.length;)this.indent_cache.push(this.indent_cache[this.indent_cache.length-1]+this.indent_string);return this.current_line.set_indent(e),!0}return this.current_line.set_indent(0),!1},this.add_raw_token=function(e){for(var t=0;t<e.newlines;t++)this.add_outputline();this.current_line.push(e.whitespace_before),this.current_line.push(e.text),this.space_before_token=!1},this.add_token=function(e){this.add_space_before_token(),this.current_line.push(e)},this.add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&this.current_line.push(" "),this.space_before_token=!1},this.remove_redundant_indentation=function(e){if(!e.multiline_frame&&e.mode!==h.ForInitializer&&e.mode!==h.Conditional)for(var t=e.start_line_index,r=n.length;t<r;)n[t].remove_indent(),t++},this.trim=function(r){for(r=void 0!==r&&r,this.current_line.trim(e,t);r&&1<n.length&&this.current_line.is_empty();)n.pop(),this.current_line=n[n.length-1],this.current_line.trim();this.previous_line=1<n.length?n[n.length-2]:null},this.just_added_newline=function(){return this.current_line.is_empty()},this.just_added_blankline=function(){return!!this.just_added_newline()&&(1===n.length||n[n.length-2].is_empty())}}var v=function(e,t,n,r,a,o){this.type=e,this.text=t,this.comments_before=[],this.newlines=n||0,this.wanted_newline=0<n,this.whitespace_before=r||"",this.parent=null,this.directives=null};function _(e,t,n){var r="\n\r\t ".split(""),c=/[0-9]/,d=/[01234567]/,h=/[0123456789abcdefABCDEF]/,f="+ - * / % & ++ -- = += -= *= /= %= == === != !== > < >= <= >> << >>> >>>= >>= <<= && &= | || ! ~ , : ? ^ ^= |= :: =>".split(" ");this.line_starters="continue,try,throw,return,const,let,const,if,switch,case,default,for,while,break,function,import,export".split(",");var m,_,y,E,C,w,S=this.line_starters.concat(["do","in","else","get","set","new","catch","finally","typeof","yield","async","await"]),T=/([\s\S]*?)((?:\*\/)|$)/g,A=/([^\n\r\u2028\u2029]*)/g,R=/\/\* beautify( \w+[:]\w+)+ \*\//g,O=/ (\w+)[:](\w+)/g,I=/([\s\S]*?)((?:\/\*\sbeautify\signore:end\s\*\/)|$)/g,k=/((<\?php|<\?=)[\s\S]*?\?>)|(<%[\s\S]*?%>)/g;function i(){var n,N,L=[];if(m=0,_="",w<=C)return["","TK_EOF"];N=E.length?E[E.length-1]:new v("TK_START_BLOCK","{");var M=e.charAt(C);for(C+=1;q(M,r);){if(o.newline.test(M)?"\n"===M&&"\r"===e.charAt(C-2)||(m+=1,L=[]):L.push(M),w<=C)return["","TK_EOF"];M=e.charAt(C),C+=1}if(L.length&&(_=L.join("")),c.test(M)){var a=!0,x=!0,i=c;for("0"===M&&C<w&&/[Xxo]/.test(e.charAt(C))?(x=a=!1,M+=e.charAt(C),C+=1,i=/[o]/.test(e.charAt(C))?d:h):(M="",C-=1);C<w&&i.test(e.charAt(C));)M+=e.charAt(C),C+=1,a&&C<w&&"."===e.charAt(C)&&(M+=e.charAt(C),C+=1,a=!1),x&&C<w&&/[Ee]/.test(e.charAt(C))&&(M+=e.charAt(C),(C+=1)<w&&/[+-]/.test(e.charAt(C))&&(M+=e.charAt(C),C+=1),a=x=!1);return[M,"TK_WORD"]}if(o.isIdentifierStart(e.charCodeAt(C-1))){if(C<w)for(;o.isIdentifierChar(e.charCodeAt(C))&&(M+=e.charAt(C),(C+=1)!==w););return"TK_DOT"===N.type||"TK_RESERVED"===N.type&&q(N.text,["set","get"])||!q(M,S)?[M,"TK_WORD"]:"in"===M?[M,"TK_OPERATOR"]:[M,"TK_RESERVED"]}if("("===M||"["===M)return[M,"TK_START_EXPR"];if(")"===M||"]"===M)return[M,"TK_END_EXPR"];if("{"===M)return[M,"TK_START_BLOCK"];if("}"===M)return[M,"TK_END_BLOCK"];if(" "===M)return[M,"TK_SEMICOLON"];if("/"===M){var s="";if("*"===e.charAt(C)){C+=1,T.lastIndex=C;var D=T.exec(e);s="/*".concat(D[0]),C+=D[0].length;var P=function(e){if(!e.match(R))return null;var t={};O.lastIndex=0;for(var n=O.exec(e);n;)t[n[1]]=n[2],n=O.exec(e);return t}(s);return P&&"start"===P.ignore&&(I.lastIndex=C,s+=(D=I.exec(e))[0],C+=D[0].length),[s=s.replace(o.lineBreak,"\n"),"TK_BLOCK_COMMENT",P]}if("/"===e.charAt(C)){C+=1,A.lastIndex=C;var U=A.exec(e);return s="//".concat(U[0]),C+=U[0].length,[s,"TK_COMMENT"]}}if("`"===M||"'"===M||'"'===M||("/"===M||t.e4x&&"<"===M&&e.slice(C-1).match(/^<([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/))&&("TK_RESERVED"===N.type&&q(N.text,["return","case","throw","else","do","typeof","yield"])||"TK_END_EXPR"===N.type&&")"===N.text&&N.parent&&"TK_RESERVED"===N.parent.type&&q(N.parent.text,["if","while","for"])||q(N.type,["TK_COMMENT","TK_START_EXPR","TK_START_BLOCK","TK_END_BLOCK","TK_OPERATOR","TK_EQUALS","TK_EOF","TK_SEMICOLON","TK_COMMA"]))){var B=M,p=!1,u=!1;if(n=M,"/"===B)for(var F=!1;C<w&&(p||F||e.charAt(C)!==B)&&!o.newline.test(e.charAt(C));)n+=e.charAt(C),p?p=!1:(p="\\"===e.charAt(C),"["===e.charAt(C)?F=!0:"]"===e.charAt(C)&&(F=!1)),C+=1;else if(t.e4x&&"<"===B){var g=/<(\/?)([-a-zA-Z:0-9_.]+|{[^{}]*}|!\[CDATA\[[\s\S]*?\]\])(\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{.*?}))*\s*(\/?)\s*>/g,V=e.slice(C-1),j=g.exec(V);if(j&&0===j.index){for(var b=j[2],H=0;j;){var $=!!j[1],z=j[2],W=!!j[j.length-1]||"![CDATA["===z.slice(0,8);if(z!==b||W||($?--H:++H),H<=0)break;j=g.exec(V)}var K=j?j.index+j[0].length:V.length;return V=V.slice(0,K),C+=K-1,[V=V.replace(o.lineBreak,"\n"),"TK_STRING"]}}else for(;C<w&&(p||e.charAt(C)!==B&&("`"===B||!o.newline.test(e.charAt(C))));)(p||"`"===B)&&o.newline.test(e.charAt(C))?("\r"===e.charAt(C)&&"\n"===e.charAt(C+1)&&(C+=1),n+="\n"):n+=e.charAt(C),p=p?("x"!==e.charAt(C)&&"u"!==e.charAt(C)||(u=!0),!1):"\\"===e.charAt(C),C+=1;if(u&&t.unescape_strings&&(n=function(e){for(var t,n=!1,r="",a=0,o="",i=0;n||a<e.length;)if(t=e.charAt(a),a++,n){if(n=!1,"x"===t)o=e.substr(a,2),a+=2;else{if("u"!==t){r+="\\".concat(t);continue}o=e.substr(a,4),a+=4}if(!o.match(/^[0123456789abcdefABCDEF]+$/))return e;if(0<=(i=parseInt(o,16))&&i<32){r+="x"===t?"\\x".concat(o):"\\u".concat(o);continue}if(34===i||39===i||92===i)r+="\\".concat(String.fromCharCode(i));else{if("x"===t&&126<i&&i<=255)return e;r+=String.fromCharCode(i)}}else"\\"===t?n=!0:r+=t;return r}(n)),C<w&&e.charAt(C)===B&&(n+=B,C+=1,"/"===B))for(;C<w&&o.isIdentifierStart(e.charCodeAt(C));)n+=e.charAt(C),C+=1;return[n,"TK_STRING"]}if("#"===M){if(0===E.length&&"!"===e.charAt(C)){for(n=M;C<w&&"\n"!==M;)n+=M=e.charAt(C),C+=1;return["".concat(l(n),"\n"),"TK_UNKNOWN"]}var G="#";if(C<w&&c.test(e.charAt(C))){for(;G+=M=e.charAt(C),(C+=1)<w&&"#"!==M&&"="!==M;);return"#"===M||("["===e.charAt(C)&&"]"===e.charAt(C+1)?(G+="[]",C+=2):"{"===e.charAt(C)&&"}"===e.charAt(C+1)&&(G+="{}",C+=2)),[G,"TK_WORD"]}}if("<"===M&&("?"===e.charAt(C)||"%"===e.charAt(C))){k.lastIndex=C-1;var Y=k.exec(e);if(Y)return M=Y[0],C+=M.length-1,[M=M.replace(o.lineBreak,"\n"),"TK_STRING"]}if("<"===M&&"\x3c!--"===e.substring(C-1,C+3)){for(C+=3,M="\x3c!--";!o.newline.test(e.charAt(C))&&C<w;)M+=e.charAt(C),C++;return y=!0,[M,"TK_COMMENT"]}if("-"===M&&y&&"--\x3e"===e.substring(C-1,C+2))return y=!1,C+=2,["--\x3e","TK_COMMENT"];if("."===M)return[M,"TK_DOT"];if(q(M,f)){for(;C<w&&q(M+e.charAt(C),f)&&(M+=e.charAt(C),!(w<=(C+=1))););return","===M?[M,"TK_COMMA"]:"="===M?[M,"TK_EQUALS"]:[M,"TK_OPERATOR"]}return[M,"TK_UNKNOWN"]}this.tokenize=function(){var t,n,r;w=e.length,C=0,y=!1,E=[];for(var o=null,a=[],c=[];!n||"TK_EOF"!==n.type;){for(r=i(),t=new v(r[1],r[0],m,_);"TK_COMMENT"===t.type||"TK_BLOCK_COMMENT"===t.type||"TK_UNKNOWN"===t.type;)"TK_BLOCK_COMMENT"===t.type&&(t.directives=r[2]),c.push(t),r=i(),t=new v(r[1],r[0],m,_);c.length&&(t.comments_before=c,c=[]),"TK_START_BLOCK"===t.type||"TK_START_EXPR"===t.type?(t.parent=n,a.push(o),o=t):("TK_END_BLOCK"===t.type||"TK_END_EXPR"===t.type)&&o&&("]"===t.text&&"["===o.text||")"===t.text&&"("===o.text||"}"===t.text&&"{"===o.text)&&(t.parent=o.parent,o=a.pop()),E.push(t),n=t}return E}}return{run:function(e,t){function i(e){return e.replace(/\s+$/g,"")}var n,r,a,o,l,s,h,f,m,b,v,_,y,E;for(void 0!==(t=t||{}).wrap_line_length&&0!==parseInt(t.wrap_line_length,10)||void 0===t.max_char||0===parseInt(t.max_char,10)||(t.wrap_line_length=t.max_char),r=void 0!==t.indent_inner_html&&t.indent_inner_html,a=void 0===t.indent_size?4:parseInt(t.indent_size,10),o=void 0===t.indent_char?" ":t.indent_char,s=void 0===t.brace_style?"collapse":t.brace_style,l=0===parseInt(t.wrap_line_length,10)?32786:parseInt(t.wrap_line_length||250,10),h=t.unformatted||["a","span","img","bdo","em","strong","dfn","code","samp","kbd","const","cite","abbr","acronym","q","sub","sup","tt","i","b","big","small","u","s","strike","font","ins","del","address","pre"],f=void 0===t.preserve_newlines||t.preserve_newlines,m=f?isNaN(parseInt(t.max_preserve_newlines,10))?32786:parseInt(t.max_preserve_newlines,10):0,b=void 0!==t.indent_handlebars&&t.indent_handlebars,v=void 0===t.wrap_attributes?"auto":t.wrap_attributes,_=void 0===t.wrap_attributes_indent_size?a:parseInt(t.wrap_attributes_indent_size,10)||a,y=void 0!==t.end_with_newline&&t.end_with_newline,E=Array.isArray(t.extra_liners)?t.extra_liners.concat():"string"==typeof t.extra_liners?t.extra_liners.split(","):"head,body,/html".split(","),t.indent_with_tabs&&(o="\t",a=1),(n=new function(){return this.pos=0,this.token="",this.current_mode="CONTENT",this.tags={parent:"parent1",parentcount:1,parent1:""},this.tag_type="",this.token_text=this.last_token=this.last_text=this.token_type="",this.newlines=0,this.indent_content=r,this.Utils={whitespace:"\n\r\t ".split(""),single_token:"br,input,link,meta,source,!doctype,basefont,base,area,hr,wbr,param,img,isindex,embed".split(","),extra_liners:E,in_array:function(e,t){for(var n=0;n<t.length;n++)if(e===t[n])return!0;return!1}},this.is_whitespace=function(e){for(;0<e.length;e++)if(!this.Utils.in_array(e.charAt(0),this.Utils.whitespace))return!1;return!0},this.traverse_whitespace=function(){var e="";if(e=this.input.charAt(this.pos),this.Utils.in_array(e,this.Utils.whitespace)){for(this.newlines=0;this.Utils.in_array(e,this.Utils.whitespace);)f&&"\n"===e&&this.newlines<=m&&(this.newlines+=1),this.pos++,e=this.input.charAt(this.pos);return!0}return!1},this.space_or_wrap=function(e){this.line_char_count>=this.wrap_line_length?(this.print_newline(!1,e),this.print_indentation(e)):(this.line_char_count++,e.push(" "))},this.get_content=function(){for(var e="",t=[];"<"!=this.input.charAt(this.pos);){if(this.pos>=this.input.length)return t.length?t.join(""):["","TK_EOF"];if(this.traverse_whitespace())this.space_or_wrap(t);else{if(b){var n=this.input.substr(this.pos,3);if("{{#"===n||"{{/"===n)break;if("{{!"===n)return[this.get_tag(),"TK_TAG_HANDLEBARS_COMMENT"];if("{{"===this.input.substr(this.pos,2)&&"{{else}}"===this.get_tag(!0))break}e=this.input.charAt(this.pos),this.pos++,this.line_char_count++,t.push(e)}}return t.length?t.join(""):""},this.get_contents_to=function(e){if(this.pos===this.input.length)return["","TK_EOF"];var t="",n=new RegExp("</".concat(e,"\\s*>"),"igm");n.lastIndex=this.pos;var r=n.exec(this.input),a=r?r.index:this.input.length;return this.pos<a&&(t=this.input.substring(this.pos,a),this.pos=a),t},this.record_tag=function(e){this.tags["".concat(e,"count")]?this.tags["".concat(e,"count")]++:this.tags["".concat(e,"count")]=1,this.tags[e+this.tags["".concat(e,"count")]]=this.indent_level,this.tags[e+this.tags["".concat(e,"count")]+"parent"]=this.tags.parent,this.tags.parent=e+this.tags["".concat(e,"count")]},this.retrieve_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]],this.tags.parent=this.tags[t+"parent"]),delete this.tags[e+this.tags["".concat(e,"count")]+"parent"],delete this.tags[e+this.tags["".concat(e,"count")]],1===this.tags["".concat(e,"count")]?delete this.tags["".concat(e,"count")]:this.tags["".concat(e,"count")]--}},this.indent_to_tag=function(e){if(this.tags["".concat(e,"count")]){for(var t=this.tags.parent;t&&e+this.tags["".concat(e,"count")]!==t;)t=this.tags["".concat(t,"parent")];t&&(this.indent_level=this.tags[e+this.tags["".concat(e,"count")]])}},this.get_tag=function(e){var t,n,r="",a=[],c="",i=!1,s=!0,l=this.pos,d=this.line_char_count;e=void 0!==e&&e;do{if(this.pos>=this.input.length)return e&&(this.pos=l,this.line_char_count=d),a.length?a.join(""):["","TK_EOF"];if(r=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(r,this.Utils.whitespace))i=!0;else{if("'"!==r&&'"'!==r||(r+=this.get_unformatted(r),i=!0),"="===r&&(i=!1),a.length&&"="!=a[a.length-1]&&">"!=r&&i){if(this.space_or_wrap(a),i=!1,!s&&"force"===v&&"/"!=r){this.print_newline(!0,a),this.print_indentation(a);for(var f=0;f<_;f++)a.push(o)}for(var m=0;m<a.length;m++)if(" "===a[m]){s=!1;break}}if(b&&"<"===n&&r+this.input.charAt(this.pos)==="{{"&&(r+=this.get_unformatted("}}"),a.length&&" "!=a[a.length-1]&&"<"!=a[a.length-1]&&(r=" ".concat(r)),i=!0),"<"!==r||n||(t=this.pos-1,n="<"),b&&!n&&2<=a.length&&"{"===a[a.length-1]&&"{"===a[a.length-2]&&(t="#"===r||"/"===r||"!"===r?this.pos-3:this.pos-2,n="{"),this.line_char_count++,a.push(r),a[1]&&("!"===a[1]||"?"===a[1]||"%"===a[1])){a=[this.get_comment(t)];break}if(b&&a[1]&&"{"===a[1]&&a[2]&&"!"===a[2]){a=[this.get_comment(t)];break}if(b&&"{"===n&&2<a.length&&"}"===a[a.length-2]&&"}"===a[a.length-1])break}}while(">"!=r);var p,u,y=a.join("");p=-1!=y.indexOf(" ")?y.indexOf(" "):"{"===y[0]?y.indexOf("}"):y.indexOf(">"),u="<"!==y[0]&&b?"#"===y[2]?3:2:1;var g=y.substring(u,p).toLowerCase();return"/"===y.charAt(y.length-2)||this.Utils.in_array(g,this.Utils.single_token)?e||(this.tag_type="SINGLE"):b&&"{"===y[0]&&"else"===g?e||(this.indent_to_tag("if"),this.tag_type="HANDLEBARS_ELSE",this.indent_content=!0,this.traverse_whitespace()):this.is_unformatted(g,h)?(c=this.get_unformatted("</".concat(g,">"),y),a.push(c),this.pos,this.tag_type="SINGLE"):"script"===g&&(-1===y.search("type")||-1<y.search("type")&&-1<y.search(/\b(text|application)\/(x-)?(javascript|ecmascript|jscript|livescript)/))?e||(this.record_tag(g),this.tag_type="SCRIPT"):"style"===g&&(-1===y.search("type")||-1<y.search("type")&&-1<y.search("text/css"))?e||(this.record_tag(g),this.tag_type="STYLE"):"!"===g.charAt(0)?e||(this.tag_type="SINGLE",this.traverse_whitespace()):e||("/"===g.charAt(0)?(this.retrieve_tag(g.substring(1)),this.tag_type="END"):(this.record_tag(g),"html"!=g.toLowerCase()&&(this.indent_content=!0),this.tag_type="START"),this.traverse_whitespace()&&this.space_or_wrap(a),this.Utils.in_array(g,this.Utils.extra_liners)&&(this.print_newline(!1,this.output),this.output.length&&"\n"!=this.output[this.output.length-2]&&this.print_newline(!0,this.output))),e&&(this.pos=l,this.line_char_count=d),a.join("")},this.get_comment=function(e){var t="",n=">",r=!1;this.pos=e;var a=this.input.charAt(this.pos);for(this.pos++;this.pos<=this.input.length&&((t+=a)[t.length-1]!==n[n.length-1]||-1==t.indexOf(n));)!r&&t.length<10&&(0===t.indexOf("<![if")?(n="<![endif]>",r=!0):0===t.indexOf("<![cdata[")?(n="]]>",r=!0):0===t.indexOf("<![")?(n="]>",r=!0):0===t.indexOf("\x3c!--")?(n="--\x3e",r=!0):0===t.indexOf("{{!")?(n="}}",r=!0):0===t.indexOf("<?")?(n="?>",r=!0):0===t.indexOf("<%")&&(n="%>",r=!0)),a=this.input.charAt(this.pos),this.pos++;return t},this.get_unformatted=function(e,t){if(t&&-1!=t.toLowerCase().indexOf(e))return"";var n="",r="",a=0,o=!0;do{if(this.pos>=this.input.length)return r;if(n=this.input.charAt(this.pos),this.pos++,this.Utils.in_array(n,this.Utils.whitespace)){if(!o){this.line_char_count--;continue}if("\n"===n||"\r"===n){r+="\n",this.line_char_count=0;continue}}r+=n,this.line_char_count++,o=!0,b&&"{"===n&&r.length&&"{"===r[r.length-2]&&(a=(r+=this.get_unformatted("}}")).length)}while(-1===r.toLowerCase().indexOf(e,a));return r},this.get_token=function(){var e;if("TK_TAG_SCRIPT"!==this.last_token&&"TK_TAG_STYLE"!==this.last_token)return"CONTENT"===this.current_mode?"string"!=typeof(e=this.get_content())?e:[e,"TK_CONTENT"]:"TAG"===this.current_mode?"string"!=typeof(e=this.get_tag())?e:[e,"TK_TAG_".concat(this.tag_type)]:void 0;var t=this.last_token.substr(7);return"string"!=typeof(e=this.get_contents_to(t))?e:[e,"TK_".concat(t)]},this.get_full_indent=function(e){return(e=this.indent_level+e||0)<1?"":new Array(e+1).join(this.indent_string)},this.is_unformatted=function(e,t){if(!this.Utils.in_array(e,t))return!1;if("a"!=e.toLowerCase()||!this.Utils.in_array("a",t))return!0;var n=(this.get_tag(!0)||"").match(/^\s*<\s*\/?([a-z]*)\s*[^>]*>\s*$/);return!(n&&!this.Utils.in_array(n,t))},this.printer=function(e,t,n,r,a){this.input=e||"",this.output=[],this.indent_character=t,this.indent_string="",this.indent_size=n,this.brace_style=a,this.indent_level=0,this.wrap_line_length=r;for(var o=this.line_char_count=0;o<this.indent_size;o++)this.indent_string+=this.indent_character;this.print_newline=function(e,t){this.line_char_count=0,t&&t.length&&(e||"\n"!=t[t.length-1])&&("\n"!=t[t.length-1]&&(t[t.length-1]=i(t[t.length-1])),t.push("\n"))},this.print_indentation=function(e){for(var t=0;t<this.indent_level;t++)e.push(this.indent_string),this.line_char_count+=this.indent_string.length},this.print_token=function(e){this.is_whitespace(e)&&!this.output.length||((e||""!==e)&&this.output.length&&"\n"===this.output[this.output.length-1]&&(this.print_indentation(this.output),e=function(e){return e.replace(/^\s+/g,"")}(e)),this.print_token_raw(e))},this.print_token_raw=function(e){0<this.newlines&&(e=i(e)),e&&""!==e&&(1<e.length&&"\n"===e[e.length-1]?(this.output.push(e.slice(0,-1)),this.print_newline(!1,this.output)):this.output.push(e));for(var t=0;t<this.newlines;t++)this.print_newline(0<t,this.output);this.newlines=0},this.indent=function(){this.indent_level++},this.unindent=function(){0<this.indent_level&&this.indent_level--}},this}).printer(e,o,a,l,s);;){var p=n.get_token();if(n.token_text=p[0],n.token_type=p[1],"TK_EOF"===n.token_type)break;switch(n.token_type){case"TK_TAG_START":n.print_newline(!1,n.output),n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_STYLE":case"TK_TAG_SCRIPT":n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_END":if("TK_CONTENT"===n.last_token&&""===n.last_text){var u=n.token_text.match(/\w+/)[0],C=null;n.output.length&&(C=n.output[n.output.length-1].match(/(?:<|{{#)\/?\s*(\w+)/)),(null===C||C[1]!=u&&!n.Utils.in_array(C[1],h))&&n.print_newline(!1,n.output)}n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_SINGLE":var g=n.token_text.match(/^\s*<([a-z-]+)/i);g&&n.Utils.in_array(g[1],h)||n.print_newline(!1,n.output),n.print_token(n.token_text),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_ELSE":n.print_token(n.token_text),n.indent_content&&(n.indent(),n.indent_content=!1),n.current_mode="CONTENT";break;case"TK_TAG_HANDLEBARS_COMMENT":case"TK_CONTENT":n.print_token(n.token_text),n.current_mode="TAG";break;case"TK_STYLE":case"TK_SCRIPT":if(""!==n.token_text){n.print_newline(!1,n.output);var w=n.token_text,S=void 0,T=1;"TK_SCRIPT"===n.token_type?S=d:"TK_STYLE"===n.token_type&&(S=c),"keep"===t.indent_scripts?T=0:"separate"===t.indent_scripts&&(T=-n.indent_level);var A=n.get_full_indent(T);if(S)w=S(w.replace(/^\s*/,A),t);else{var R=w.match(/^\s*/)[0].match(/[^\n\r]*$/)[0].split(n.indent_string).length-1,O=n.get_full_indent(T-R);w=w.replace(/^\s*/,A).replace(/\r\n|\r|\n/g,"\n"+O).replace(/\s+$/,"")}w&&(n.print_token_raw(w),n.print_newline(!0,n.output))}n.current_mode="TAG";break;default:""!==n.token_text&&n.print_token(n.token_text)}n.last_token=n.token_type,n.last_text=n.token_text}var I=n.output.join("").replace(/[\r\n\t ]+$/,"");return y&&(I+="\n"),I}}},Object.assign(r.DEFAULTS,{codeMirror:window.CodeMirror,codeMirrorOptions:{lineNumbers:!0,tabMode:"indent",indentWithTabs:!0,lineWrapping:!0,mode:"text/html",tabSize:2},codeBeautifierOptions:{end_with_newline:!0,indent_inner_html:!0,extra_liners:["p","h1","h2","h3","h4","h5","h6","blockquote","pre","ul","ol","table","dl"],brace_style:"expand",indent_char:"\t",indent_size:1,wrap_line_length:0},codeViewKeepActiveButtons:["fullscreen"]}),r.PLUGINS.codeView=function(e){var t,n,p=e.$,u=function(){return e.$box.hasClass("fr-code-view")};function r(){return n?n.getValue():t.val()}function g(){u()&&(n&&n.setSize(null,e.opts.height?e.opts.height:"auto"),e.opts.heightMin||e.opts.height?(e.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",e.opts.heightMin||e.opts.height),t.css("height",e.opts.height)):e.$box.find(".CodeMirror-scroll, .CodeMirror-gutters").css("min-height",""))}var o,c=!1;function b(){u()&&e.events.trigger("blur")}function l(){u()&&c&&e.events.trigger("focus")}function d(d){t||(function(){t=p('<textarea class="fr-code" tabIndex="-1">'),e.$wp.append(t),t.attr("dir",e.opts.direction),e.$box.hasClass("fr-basic")||(o=p('<a data-cmd="html" title="Code View" class="fr-command fr-btn html-switch'.concat(e.helpers.isMobile()?"":" fr-desktop",'" role="button" tabIndex="-1"><i class="fa fa-code"></i></button>')),e.$box.append(o),e.events.bindClick(e.$box,"a.html-switch",(function(){e.events.trigger("commands.before",["html"]),h(!1),e.events.trigger("commands.after",["html"])})));var n=function(){return!u()};e.events.on("buttons.refresh",n),e.events.on("copy",n,!0),e.events.on("cut",n,!0),e.events.on("paste",n,!0),e.events.on("destroy",f,!0),e.events.on("html.set",(function(){u()&&h(!0)})),e.events.on("codeView.update",g),e.events.on("codeView.toggle",(function(){e.$box.hasClass("fr-code-view")&&h()})),e.events.on("form.submit",(function(){u()&&(e.html.set(r()),e.events.trigger("contentChanged",[],!0))}),!0)}(),!n&&e.opts.codeMirror?((n=e.opts.codeMirror.fromTextArea(t.get(0),e.opts.codeMirrorOptions)).on("blur",b),n.on("focus",l)):(e.events.$on(t,"keydown keyup change input",(function(){e.opts.height?this.removeAttribute("rows"):(this.rows=1,0===this.value.length?this.style.height="auto":this.style.height="".concat(this.scrollHeight,"px"))})),e.events.$on(t,"blur",b),e.events.$on(t,"focus",l))),e.undo.saveStep(),e.html.cleanEmptyTags(),e.html.cleanWhiteTags(!0),e.core.hasFocus()&&(e.core.isEmpty()||(e.selection.save(),e.$el.find('.fr-marker[data-type="true"]').first().replaceWith('<span class="fr-tmp fr-sm">F</span>'),e.$el.find('.fr-marker[data-type="false"]').last().replaceWith('<span class="fr-tmp fr-em">F</span>')));var m=e.html.get(!1,!0);e.$el.find("span.fr-tmp").remove(),e.$box.toggleClass("fr-code-view",!0);var v,_,a=!1;if(e.core.hasFocus()&&(a=!0,e.events.disableBlur(),e.$el.blur()),m=(m=m.replace(/<span class="fr-tmp fr-sm">F<\/span>/,"FROALA-SM")).replace(/<span class="fr-tmp fr-em">F<\/span>/,"FROALA-EM"),e.codeBeautifier&&!m.includes("fr-embedly")&&(m=e.codeBeautifier.run(m,e.opts.codeBeautifierOptions)),n){v=m.indexOf("FROALA-SM"),(_=m.indexOf("FROALA-EM"))<v?v=_:_-=9;var y=(m=m.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).substring(0,v).length-m.substring(0,v).replace(/\n/g,"").length,i=m.substring(0,_).length-m.substring(0,_).replace(/\n/g,"").length;v=m.substring(0,v).length-m.substring(0,m.substring(0,v).lastIndexOf("\n")+1).length,_=m.substring(0,_).length-m.substring(0,m.substring(0,_).lastIndexOf("\n")+1).length,n.setSize(null,e.opts.height?e.opts.height:"auto"),e.opts.heightMin&&e.$box.find(".CodeMirror-scroll").css("min-height",e.opts.heightMin),n.setValue(m),c=!a,n.focus(),c=!0,n.setSelection({line:y,ch:v},{line:i,ch:_}),n.refresh(),n.clearHistory()}else{v=m.indexOf("FROALA-SM"),_=m.indexOf("FROALA-EM")-9,e.opts.heightMin&&t.css("min-height",e.opts.heightMin),e.opts.height&&t.css("height",e.opts.height),e.opts.heightMax&&t.css("max-height",e.opts.height||e.opts.heightMax),t.val(m.replace(/FROALA-SM/g,"").replace(/FROALA-EM/g,"")).trigger("change");var s=p(e.o_doc).scrollTop();c=!a,t.focus(),c=!0,t.get(0).setSelectionRange(v,_),p(e.o_doc).scrollTop(s)}e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(d).filter((function(){return e.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0})).addClass("fr-disabled").attr("aria-disabled",!0),d.addClass("fr-active").attr("aria-pressed",!0),!e.helpers.isMobile()&&e.opts.toolbarInline&&e.toolbar.hide()}function h(t){void 0===t&&(t=!u());var n=e.$tb.find('.fr-command[data-cmd="html"]');t?(e.popups.hideAll(),d(n)):(e.$box.toggleClass("fr-code-view",!1),function(t){var n=r();e.html.set(n),e.$el.blur(),e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(t).removeClass("fr-disabled").attr("aria-disabled",!1),t.removeClass("fr-active").attr("aria-pressed",!1),e.selection.setAtStart(e.el),e.selection.restore(),e.placeholder.refresh(),e.undo.saveStep()}(n),e.events.trigger("codeView.update"))}function f(){u()&&h(!1),n&&n.toTextArea(),t.val("").removeData().remove(),t=null,o&&(o.remove(),o=null)}return{_init:function(){if(e.events.on("focus",(function(){e.opts.toolbarContainer&&function(){var t=e.$tb.find('.fr-command[data-cmd="html"]');u()?(e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(t).filter((function(){return e.opts.codeViewKeepActiveButtons.indexOf(p(this).data("cmd"))<0})).addClass("fr-disabled").attr("aria-disabled",!1),t.addClass("fr-active").attr("aria-pressed",!1)):(e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(t).removeClass("fr-disabled").attr("aria-disabled",!1),t.removeClass("fr-active").attr("aria-pressed",!1))}()})),!e.$wp)return!1},toggle:h,isActive:u,get:r}},r.RegisterCommand("html",{title:"Code View",undo:!1,focus:!1,forcedRefresh:!0,toggle:!0,callback:function(){this.codeView.toggle()},plugin:"codeView"}),r.DefineIcon("html",{NAME:"code",SVG_KEY:"codeView"}),Object.assign(r.POPUP_TEMPLATES,{"textColor.picker":"[_BUTTONS_][_TEXT_COLORS_][_CUSTOM_COLOR_]","backgroundColor.picker":"[_BUTTONS_][_BACKGROUND_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(r.DEFAULTS,{colorsText:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsBackground:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],colorsStep:7,colorsHEXInput:!0,colorsButtons:["colorsBack","|","-"]}),r.PLUGINS.colors=function(e){var t=e.$,s='<div class="fr-color-hex-layer fr-active fr-layer" id="fr-color-hex-layer- \n  '.concat(e.id,'"><div class="fr-input-line"><input maxlength="7" id="[ID]"\n  type="text" placeholder="').concat(e.language.translate("HEX Color"),'" \n  tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button \n  type="button" class="fr-command fr-submit" data-cmd="[COMMAND]" tabIndex="2" role="button">\n  ').concat(e.language.translate("OK"),"</button></div></div>");function n(t){for(var n="text"===t?e.opts.colorsText:e.opts.colorsBackground,r='<div class="fr-color-set fr-'.concat(t,'-color fr-selected-set">'),o=0;o<n.length;o++)0!==o&&o%e.opts.colorsStep==0&&(r+="<br>"),"REMOVE"!==n[o]?r+='<span class="fr-command fr-select-color" style="background:'.concat(n[o],';" \n        tabIndex="-1" aria-selected="false" role="button" data-cmd="apply').concat(t,'Color" \n        data-param1="').concat(n[o],'"><span class="fr-sr-only"> ').concat(e.language.translate("Color")).concat(n[o]," \n        &nbsp;&nbsp;&nbsp;</span></span>"):r+='<span class="fr-command fr-select-color" data-cmd="apply'.concat(t,'Color"\n         tabIndex="-1" role="button" data-param1="REMOVE" \n         title="').concat(e.language.translate("Clear Formatting"),'">').concat(e.icon.create("remove"),' \n        <span class="fr-sr-only"> ').concat(e.language.translate("Clear Formatting")," </span></span>");return"".concat(r,"</div>")}function o(n){var r,o=e.popups.get("".concat(n,"Color.picker")),c=t(e.selection.element());r="background"===n?"background-color":"color";var a=o.find(".fr-".concat(n,"-color .fr-select-color"));for(a.find(".fr-selected-color").remove(),a.removeClass("fr-active-item"),a.not('[data-param1="REMOVE"]').attr("aria-selected",!1);c.get(0)!==e.el;){if("transparent"!==c.css(r)&&"rgba(0, 0, 0, 0)"!==c.css(r)){var l=o.find(".fr-".concat(n,'-color .fr-select-color[data-param1="').concat(e.helpers.RGBToHex(c.css(r)),'"]'));l.append('<span class="fr-selected-color" aria-hidden="true"></span>'),l.addClass("fr-active-item").attr("aria-selected",!0);break}c=c.parent()}!function(n){var r=e.popups.get("".concat(n,"Color.picker")),o=r.find(".fr-".concat(n,"-color .fr-active-item")).attr("data-param1"),c=r.find(".fr-color-hex-layer input");o||(o=""),c.length&&t(c.val(o).input).trigger("change")}(n)}function c(t){"REMOVE"!==t?e.format.applyStyle("background-color",e.helpers.HEXtoRGB(t)):e.format.removeStyle("background-color"),e.popups.hide("backgroundColor.picker")}function a(t){"REMOVE"!==t?e.format.applyStyle("color",e.helpers.HEXtoRGB(t)):e.format.removeStyle("color"),e.popups.hide("textColor.picker")}return{showColorsPopup:function(c){var l=e.$tb.find('.fr-command[data-cmd="'.concat(c,'"]')),d=e.popups.get("".concat(c,".picker"));if(d||(d=function(o){var c="";e.opts.toolbarInline&&0<e.opts.colorsButtons.length&&(c+='<div class="fr-buttons fr-colors-buttons fr-tabs">\n        '.concat(e.button.buildList(e.opts.colorsButtons),"\n        </div>"));var l,d="";l="textColor"===o?(e.opts.colorsHEXInput&&(d=s.replace(/\[ID\]/g,"fr-color-hex-layer-text-".concat(e.id)).replace(/\[COMMAND\]/g,"customTextColor")),{buttons:c,text_colors:n("text"),custom_color:d}):(e.opts.colorsHEXInput&&(d=s.replace(/\[ID\]/g,"fr-color-hex-layer-background-".concat(e.id)).replace(/\[COMMAND\]/g,"customBackgroundColor")),{buttons:c,background_colors:n("background"),custom_color:d});var a=e.popups.create("".concat(o,".picker"),l);return function(n,g){e.events.on("popup.tab",(function(o){var c=t(o.currentTarget);if(!e.popups.isVisible(g)||!c.is("span"))return!0;var l=o.which,d=!0;if(r.KEYCODE.TAB===l){var a=n.find(".fr-buttons");d=!e.accessibility.focusToolbar(a,!!o.shiftKey)}else if(r.KEYCODE.ARROW_UP===l||r.KEYCODE.ARROW_DOWN===l||r.KEYCODE.ARROW_LEFT===l||r.KEYCODE.ARROW_RIGHT===l){if(c.is("span.fr-select-color")){var h=c.parent().find("span.fr-select-color"),i=h.index(c),s=e.opts.colorsStep,f=Math.floor(h.length/s),m=i%s,v=Math.floor(i/s)*s+m,p=f*s;r.KEYCODE.ARROW_UP===l?v=((v-s)%p+p)%p:r.KEYCODE.ARROW_DOWN===l?v=(v+s)%p:r.KEYCODE.ARROW_LEFT===l?v=((v-1)%p+p)%p:r.KEYCODE.ARROW_RIGHT===l&&(v=(v+1)%p);var u=t(h.get(v));e.events.disableBlur(),u.focus(),d=!1}}else r.KEYCODE.ENTER===l&&(e.button.exec(c),d=!1);return!1===d&&(o.preventDefault(),o.stopPropagation()),d}),!0)}(a,"".concat(o,".picker")),a}(c)),!d.hasClass("fr-active"))if(e.popups.setContainer("".concat(c,".picker"),e.$tb),o("textColor"===c?"text":"background"),l.isVisible()){var h=e.button.getPosition(l),a=h.left,f=h.top;e.popups.show("".concat(c,".picker"),a,f,l.outerHeight())}else e.position.forSelection(d),e.popups.show("".concat(c,".picker"))},background:c,customColor:function(t){var n=e.popups.get("".concat(t,"Color.picker")).find(".fr-color-hex-layer input");if(n.length){var r=n.val();"background"===t?c(r):a(r)}},text:a,back:function(){e.popups.hide("textColor.picker"),e.popups.hide("backgroundColor.picker"),e.toolbar.showInline()}}},r.DefineIcon("textColor",{NAME:"tint",SVG_KEY:"textColor"}),r.RegisterCommand("textColor",{title:"Text Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("textColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("textColor.picker")):this.colors.showColorsPopup("textColor")}}),r.RegisterCommand("applytextColor",{undo:!0,callback:function(e,t){this.colors.text(t)}}),r.RegisterCommand("customTextColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("text")}}),r.DefineIcon("backgroundColor",{NAME:"paint-brush",SVG_KEY:"backgroundColor"}),r.RegisterCommand("backgroundColor",{title:"Background Color",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("backgroundColor.picker")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("backgroundColor.picker")):this.colors.showColorsPopup("backgroundColor")}}),r.RegisterCommand("applybackgroundColor",{undo:!0,callback:function(e,t){this.colors.background(t)}}),r.RegisterCommand("customBackgroundColor",{title:"OK",undo:!0,callback:function(){this.colors.customColor("background")}}),r.DefineIcon("colorsBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("colorsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.colors.back()}}),r.DefineIcon("remove",{NAME:"eraser",SVG_KEY:"remove"}),Object.assign(r.DEFAULTS,{dragInline:!0}),r.PLUGINS.draggable=function(e){var t=e.$;function n(n){return!(!n.originalEvent||!n.originalEvent.target||n.originalEvent.target.nodeType!==Node.TEXT_NODE)||(n.target&&"A"===n.target.tagName&&1===n.target.childNodes.length&&"IMG"===n.target.childNodes[0].tagName&&(n.target=n.target.childNodes[0]),t(n.target).hasClass("fr-draggable")?(e.undo.canDo()||e.undo.saveStep(),e.opts.dragInline?e.$el.attr("contenteditable",!0):e.$el.attr("contenteditable",!1),e.opts.toolbarInline&&e.toolbar.hide(),t(n.target).addClass("fr-dragging"),e.browser.msie||e.browser.edge||e.selection.clear(),void n.originalEvent.dataTransfer.setData("text","Froala")):(n.preventDefault(),!1))}var p,u=function(t){return!(t&&("HTML"===t.tagName||"BODY"===t.tagName||e.node.isElement(t)))};function o(t,n,r){if(e.opts.iframe){var o=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),a=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));t+=e.$iframe.offset().top+o,n+=e.$iframe.offset().left+a}p.offset().top!==t&&p.css("top",t),p.offset().left!==n&&p.css("left",n),p.width()!==r&&p.css("width",r)}function c(n){n.originalEvent.dataTransfer.dropEffect="move",e.opts.dragInline?(!function(){for(var e=null,t=0;t<r.INSTANCES.length;t++)if((e=r.INSTANCES[t].$el.find(".fr-dragging")).length)return e.get(0)}()||e.browser.msie||e.browser.edge)&&n.preventDefault():(n.preventDefault(),function(n){var c=e.doc.elementFromPoint(n.originalEvent.pageX-e.win.pageXOffset,n.originalEvent.pageY-e.win.pageYOffset);if(!u(c)){for(var l=0,d=c;!u(d)&&d===c&&0<n.originalEvent.pageY-e.win.pageYOffset-l;)l++,d=e.doc.elementFromPoint(n.originalEvent.pageX-e.win.pageXOffset,n.originalEvent.pageY-e.win.pageYOffset-l);(!u(d)||p&&0===e.$el.find(d).length&&d!==p.get(0))&&(d=null);for(var a=0,h=c;!u(h)&&h===c&&n.originalEvent.pageY-e.win.pageYOffset+a<t(e.doc).height();)a++,h=e.doc.elementFromPoint(n.originalEvent.pageX-e.win.pageXOffset,n.originalEvent.pageY-e.win.pageYOffset+a);(!u(h)||p&&0===e.$el.find(h).length&&h!==p.get(0))&&(h=null),c=null===h&&d?d:h&&null===d?h:h&&d?l<a?d:h:null}if(t(c).hasClass("fr-drag-helper"))return!1;if(c&&!e.node.isBlock(c)&&(c=e.node.blockParent(c)),c&&0<=["TD","TH","TR","THEAD","TBODY"].indexOf(c.tagName)&&(c=t(c).parents("table").get(0)),c&&0<=["LI"].indexOf(c.tagName)&&(c=t(c).parents("UL, OL").get(0)),c&&!t(c).hasClass("fr-drag-helper")){var i;p||(r.$draggable_helper||(r.$draggable_helper=t(document.createElement("div")).attr("class","fr-drag-helper")),p=r.$draggable_helper,e.events.on("shared.destroy",(function(){p.html("").removeData().remove(),p=null}),!0)),i=n.originalEvent.pageY<t(c).offset().top+t(c).outerHeight()/2;var s=t(c),f=0;i||0!==s.next().length?(i||(s=s.next()),"before"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(0<s.prev().length&&(f=parseFloat(s.prev().css("margin-bottom"))||0),f=Math.max(f,parseFloat(s.css("margin-top"))||0),o(s.offset().top-f/2-e.$box.offset().top,s.offset().left-e.win.pageXOffset-e.$box.offset().left,s.width()),p.data("fr-position","before"))):"after"===p.data("fr-position")&&s.is(p.data("fr-tag"))||(f=parseFloat(s.css("margin-bottom"))||0,o(s.offset().top+t(c).height()+f/2-e.$box.offset().top,s.offset().left-e.win.pageXOffset-e.$box.offset().left,s.width()),p.data("fr-position","after")),p.data("fr-tag",s),p.addClass("fr-visible"),e.$box.append(p)}else p&&0<e.$box.find(p).length&&p.removeClass("fr-visible")}(n))}function l(t){t.originalEvent.dataTransfer.dropEffect="move",e.opts.dragInline||t.preventDefault()}function d(t){e.$el.attr("contenteditable",!0);var n=e.$el.find(".fr-dragging");p&&p.hasClass("fr-visible")&&e.$box.find(p).length?a(t):n.length&&(t.preventDefault(),t.stopPropagation()),p&&e.$box.find(p).length&&p.removeClass("fr-visible"),n.removeClass("fr-dragging")}function a(n){var o,c;e.$el.attr("contenteditable",!0);for(var l=0;l<r.INSTANCES.length;l++)if((o=r.INSTANCES[l].$el.find(".fr-dragging")).length){c=r.INSTANCES[l];break}if(o.length){if(n.preventDefault(),n.stopPropagation(),p&&p.hasClass("fr-visible")&&e.$box.find(p).length)p.data("fr-tag")[p.data("fr-position")]('<span class="fr-marker"></span>'),p.removeClass("fr-visible");else if(!1===e.markers.insertAtPoint(n.originalEvent))return!1;if(o.removeClass("fr-dragging"),!1===(o=e.events.chainTrigger("element.beforeDrop",o)))return!1;var a=o;if(o.parent().is("A")&&1===o.parent().get(0).childNodes.length&&(a=o.parent()),e.core.isEmpty()?e.events.focus():(e.$el.find(".fr-marker").replaceWith(r.MARKERS),e.selection.restore()),c===e||e.undo.canDo()||e.undo.saveStep(),e.core.isEmpty())e.$el.html(a);else{var d=e.markers.insert();0===a.find(d).length?t(d).replaceWith(a):0===o.find(d).length&&t(d).replaceWith(o),o.after(r.MARKERS),e.selection.restore()}return e.popups.hideAll(),e.selection.save(),e.$el.find(e.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").not(e.opts.htmlAllowedEmptyTags.join(",")).remove(),e.html.wrap(),e.html.fillEmptyBlocks(),e.selection.restore(),e.undo.saveStep(),e.opts.iframe&&e.size.syncIframe(),c!==e&&(c.popups.hideAll(),c.$el.find(c.html.emptyBlockTagsQuery()).not("TD, TH, LI, .fr-inner").remove(),c.html.wrap(),c.html.fillEmptyBlocks(),c.undo.saveStep(),c.events.trigger("element.dropped"),c.opts.iframe&&c.size.syncIframe()),e.events.trigger("element.dropped",[a]),!1}p&&p.removeClass("fr-visible"),e.undo.canDo()||e.undo.saveStep(),setTimeout((function(){e.undo.saveStep()}),0)}function h(t){if(t&&"DIV"===t.tagName&&e.node.hasClass(t,"fr-drag-helper"))t.parentNode.removeChild(t);else if(t&&t.nodeType===Node.ELEMENT_NODE)for(var n=t.querySelectorAll("div.fr-drag-helper"),r=0;r<n.length;r++)n[r].parentNode.removeChild(n[r])}return{_init:function(){e.opts.enter===r.ENTER_BR&&(e.opts.dragInline=!0),e.events.on("dragstart",n,!0),e.events.on("dragover",c,!0),e.events.on("dragenter",l,!0),e.events.on("document.dragend",d,!0),e.events.on("document.drop",d,!0),e.events.on("drop",a,!0),e.events.on("html.processGet",h)}}},Object.assign(r.DEFAULTS,{editInPopup:!1}),r.MODULES.editInPopup=function(e){function t(){e.events.$on(e.$el,e._mouseup,(function(){setTimeout((function(){!function(){var t,n=e.popups.get("text.edit");t="INPUT"===e.el.tagName?e.$el.attr("placeholder"):e.$el.text(),n.find("input").val(t).trigger("change"),e.popups.setContainer("text.edit",e.$sc),e.popups.show("text.edit",e.$el.offset().left+e.$el.outerWidth()/2,e.$el.offset().top+e.$el.outerHeight(),e.$el.outerHeight())}()}),10)}))}return{_init:function(){e.opts.editInPopup&&(function(){var t={edit:'<div id="fr-text-edit-'.concat(e.id,'" class="fr-layer fr-text-edit-layer"><div class="fr-input-line"><input type="text" placeholder="').concat(e.language.translate("Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="updateText" tabIndex="2">').concat(e.language.translate("Update"),"</button></div></div>")};e.popups.create("text.edit",t)}(),t())},update:function(){var t=e.popups.get("text.edit").find("input").val();0===t.length&&(t=e.opts.placeholderText),"INPUT"===e.el.tagName?e.$el.attr("placeholder",t):e.$el.text(t),e.events.trigger("contentChanged"),e.popups.hide("text.edit")}}},r.RegisterCommand("updateText",{focus:!1,undo:!1,callback:function(){this.editInPopup.update()}}),Object.assign(r.POPUP_TEMPLATES,{emoticons:"[_BUTTONS_][_CUSTOM_LAYER_]"}),Object.assign(r.DEFAULTS,{emoticonsSet:[{id:"people",name:"Smileys & People",code:"1f600",emoticons:[{code:"1f600",desc:"Grinning face"},{code:"1f601",desc:"Grinning Face with Smiling Eyes"},{code:"1f602",desc:"Face with Tears of Joy"},{code:"1f603",desc:"Smiling Face with Open Mouth"},{code:"1f604",desc:"Smiling Face with Open Mouth and Smiling Eyes"},{code:"1f605",desc:"Smiling Face with Open Mouth and Cold Sweat"},{code:"1f606",desc:"Smiling Face with Open Mouth and Tightly-Closed Eyes"},{code:"1f609",desc:"Winking Face"},{code:"1f60a",desc:"Smiling Face with Smiling Eyes"},{code:"1f608",desc:"Face Savouring Delicious Food"},{code:"1f60e",desc:"Smiling Face with Sunglasses"},{code:"1f60d",desc:"Smiling Face with Heart-Shaped Eyes"},{code:"1f618",desc:"Face Throwing a Kiss"},{code:"1f617",desc:"Kissing Face"},{code:"1f619",desc:"Kissing Face with Smiling Eyes"},{code:"1f61a",desc:"Kissing Face with Closed Eyes"},{code:"263a",desc:"White Smiling Face"},{code:"1f642",desc:"Slightly Smiling Face"},{code:"1f610",desc:"Neutral Face"},{code:"1f611",desc:"Expressionless Face"},{code:"1f636",desc:"Face Without Mouth"},{code:"1f60f",desc:"Smirking Face"},{code:"1f623",desc:"Persevering Face"},{code:"1f625",desc:"Disappointed but Relieved Face"},{code:"1f62e",desc:"Face with Open Mouth"},{code:"1f62f",desc:"Hushed Face"},{code:"1f62a",desc:"Sleepy Face"},{code:"1f62b",desc:"Tired Face"},{code:"1f634",desc:"Sleeping Face"},{code:"1f60c",desc:"Relieved Face"},{code:"1f61b",desc:"Face with Stuck-out Tongue"},{code:"1f61c",desc:"Face with Stuck-out Tongue and Winking Eye"},{code:"1f61d",desc:"Face with Stuck-out Tongue and Tightly-Closed Eyes"},{code:"1f612",desc:"Unamused Face"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f613",desc:"Face with Cold Sweat"},{code:"1f614",desc:"Pensive Face"},{code:"1f615",desc:"Confused Face"},{code:"1f632",desc:"Astonished  Face"},{code:"1f616",desc:"Confounded Face"},{code:"1f61e",desc:"Disappointed Face"},{code:"1f61f",desc:"Worried Face"},{code:"1f624",desc:"Face with Look of Triumph"},{code:"1f622",desc:"Crying Face"},{code:"1f62d",desc:"Loudly Crying Face"},{code:"1f626",desc:"Frowning Face with Open Mouth"},{code:"1f627",desc:"Anguished Face"},{code:"1f628",desc:"Fearful Face"},{code:"1f629",desc:"Weary Face"},{code:"1f62c",desc:"Grimacing Face"},{code:"1f630",desc:"Face with Open Mouth and Cold Sweat"},{code:"1f631",desc:"Face Screaming in Fear"},{code:"1f633",desc:"Flushed Face"},{code:"1f635",desc:"Dizzy Face"},{code:"1f621",desc:"Pouting Face"},{code:"1f620",desc:"Angry Face"},{code:"1f637",desc:"Face with Medical Mask"},{code:"1f607",desc:"Smiling Face with Halo"},{code:"1f608",desc:"Smiling Face with Horns"},{code:"1f47f",desc:"Imp"},{code:"1f479",desc:"Japanese Ogre"},{code:"1f47a",desc:"Japanese Goblin"},{code:"1f480",desc:"Skull"},{code:"1f47b",desc:"Ghost"},{code:"1f47d",desc:"Extraterrestrial Alien"},{code:"1f47e",desc:"Alien Monster"},{code:"1f4a9",desc:"Pile of Poo"},{code:"1f63a",desc:"Smiling Cat Face with Open Mouth"},{code:"1f638",desc:"Grinning Cat Face with Smiling Eyes"},{code:"1f639",desc:"Cat Face with Tears of Joy"},{code:"1f63b",desc:"Smiling Cat Face with Heart-Shaped Eyes"},{code:"1f63c",desc:"Cat Face with Wry Smile"},{code:"1f63d",desc:"Kissing Cat Face with Closed Eyes"},{code:"1f640",desc:"Weary Cat Face"},{code:"1f63f",desc:"Crying Cat Face"},{code:"1f63e",desc:"Pouting Cat Face"},{code:"1f648",desc:"See-No-Evil Monkey"},{code:"1f649",desc:"Hear-No-Evil Monkey"},{code:"1f64a",desc:"Speak-No-Evil Monkey"},{code:"1f476",desc:"Baby"},{code:"1f466",desc:"Boy"},{code:"1f467",desc:"Girl"},{code:"1f468",desc:"Man"},{code:"1f469",desc:"Woman"},{code:"1f474",desc:"Older Man"},{code:"1f475",desc:"Older Woman"},{code:"1f46e",desc:"Police Officer"},{code:"1f482",desc:" Guardsman"},{code:"1f477",desc:" Construction Worker"},{code:"1f478",desc:"Princess"},{code:"1f473",desc:"Man with Turban"},{code:"1f472",desc:"Man with Gua Pi Mao"},{code:"1f471",desc:"Person with Blond Hair"},{code:"1f470",desc:"Bride with Veil"},{code:"1f47c",desc:"Baby Angel"},{code:"1f385",desc:"Father Christmas"},{code:"1f64e",desc:"Person with Pouting Face"},{code:"1f645",desc:"Face with No Good Gesture"},{code:"1f646",desc:"Face with Ok Gesture"},{code:"1f481",desc:"Information Desk Person"},{code:"1f64b",desc:"Happy Person Raising One Hand"},{code:"1f647",desc:"Person Bowing Deeply"},{code:"1f486",desc:"Face Massage"},{code:"1f487",desc:"Haircut"},{code:"1f6b6",desc:"Pedestrian"},{code:"1f3c3",desc:"Runner"},{code:"1f483",desc:"Dancer"},{code:"1f46f",desc:"Woman with Bunny Ears"},{code:"1f6c0",desc:"Bath"},{code:"1f464",desc:"Bust in Silhouette"},{code:"1f465",desc:"Busts in Silhouette"},{code:"1f3c7",desc:"Horse Racing"},{code:"1f3c2",desc:" Snowboarder"},{code:"1f3c4",desc:" Surfer"},{code:"1f6a3",desc:" Rowboat"},{code:"1f3ca",desc:" Swimmer"},{code:"1f6b4",desc:" Bicyclist"},{code:"1f6b5",desc:"Mountain Bicyclist"},{code:"1f46b",desc:" Man and Woman Holding Hands"},{code:"1f46c",desc:"Two Men Holding Hands"},{code:"1f46d",desc:"Two Women Holding Hands"},{code:"1f48f",desc:"Kiss"},{code:"1f468-2764-1f48b-1f468",uCode:"👨‍❤️‍💋‍👨",desc:"Man Kiss Man"},{code:"1f469-2764-1f48b-1f469",uCode:"👩‍❤️‍👩",desc:"Woman Kiss Woman"},{code:"1f491",desc:"Couple with Heart"},{code:"1f468-2764-1f468",uCode:"👨‍❤️‍👨",desc:"Man Heart Man"},{code:"1f469-2764-1f469",uCode:"👩‍❤️‍👩",desc:"Woman Heart Woman"},{code:"1f46a",desc:"Family"},{code:"1f468",desc:"Man Woman Boy"},{code:"1f468-1f469-1f467",desc:"Man Woman Girl"},{code:"1f468-1f469-1f467-1f466",desc:"Man Woman Girl Boy"},{code:"1f468-1f469-1f466-1f466",desc:"Man Woman Boy Boy"},{code:"1f468-1f469-1f467-1f467",desc:"Man Woman Girl Girl"},{code:"1f468-1f468-1f466",desc:"Man Man Boy"},{code:"1f468-1f468-1f467",desc:"Man Man Girl"},{code:"1f468-1f468-1f467-1f466",desc:"Man Man Girl Boy"},{code:"1f468-1f468-1f466-1f466",desc:"Man Man Boy Boy"},{code:"1f469-1f469-1f466",desc:"Woman Woman Boy"},{code:"1f469-1f469-1f467",desc:"Woman Woman Girl"},{code:"1f469-1f469-1f467-1f466",desc:"Woman Woman Girl Boy"},{code:"1f469-1f469-1f467-1f467",desc:"Woman Woman Girl Girl"},{code:"1f4aa",desc:"Flexed Biceps"},{code:"1f448",desc:"White Left Pointing Backhand Index"},{code:"1f449",desc:"White Right Pointing Backhand Index"},{code:"1f446",desc:"White Up Pointing Backhand Index"},{code:"1f447",desc:"White Down Pointing Backhand Index"},{code:"270c",desc:"Victory Hand"},{code:"270b",desc:"Raised Hand"},{code:"1f44c",desc:"Ok Hand Sign"},{code:"1f44d",desc:"Thumbs Up Sign"},{code:"1f44e",desc:"Thumbs Down Sign"},{code:"270a",desc:"Raised Fist"},{code:"1f44a",desc:"Fisted Hand Sign"},{code:"1f44b",desc:"Waving Hand Sign"},{code:"1f44f",desc:"Clapping Hands Sign"},{code:"1f450",desc:"Open  Hands Sign"},{code:"1f64c",desc:"Person Raising Both Hands in Celebration"},{code:"1f64f",desc:"Person with Folded Hands"},{code:"1f485",desc:"Nail Polish"},{code:"1f442",desc:"Ear"},{code:"1f443",desc:"Nose"},{code:"1f463",desc:"Footprints"},{code:"1f440",desc:"Eyes"},{code:"1f445",desc:"Tongue"},{code:"1f444",desc:"Mouth"},{code:"1f48b",desc:"Kiss Mark"},{code:"1f498",desc:"Heart with Arrow"},{code:"2764",desc:"Heavy Black Heart"},{code:"1f493",desc:"Heavy Black Heart"},{code:"1f494",desc:"Broken Heart"},{code:"1f495",desc:"Two Hearts"},{code:"1f496",desc:"Sparkling Hearts"},{code:"1f497",desc:"Growing Hearts"},{code:"1f499",desc:"Blue Heart"},{code:"1f49a",desc:"Green Heart"},{code:"1f49b",desc:"Yellow Heart"},{code:"1f49c",desc:"Purple Heart"},{code:"1f49d",desc:"Heart with Ribbon"},{code:"1f49e",desc:"Revolving Hearts"},{code:"1f49f",desc:"Heart Decoration"},{code:"1f48c",desc:"Love Letter"},{code:"1f4a4",desc:"Sleeping Symbol"},{code:"1f4a2",desc:"Anger Symbol"},{code:"1f4a3",desc:"Bomb"},{code:"1f4a5",desc:"Collision Symbol"},{code:"1f4a6",desc:"Splashing Sweat Symbol"},{code:"1f4a8",desc:"Dash Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ab",desc:"Dizzy Symbol"},{code:"1f4ac",desc:"Speech Balloon"},{code:"1f4ad",desc:"Thought Balloon"},{code:"1f453",desc:"Eyeglasses"},{code:"1f454",desc:"Necktie"},{code:"1f455",desc:"T-Shirt"},{code:"1f456",desc:"Jeans"},{code:"1f457",desc:"Dress"},{code:"1f458",desc:"Kimono"},{code:"1f459",desc:"Bikini"},{code:"1f45a",desc:"Womans Clothes"},{code:"1f45b",desc:"Purse"},{code:"1f45c",desc:"Handbag"},{code:"1f45d",desc:"Pouch"},{code:"1f392",desc:"School Satchel"},{code:"1f45e",desc:"Mans Shoe"},{code:"1f45f",desc:"Athletic Shoe"},{code:"1f460",desc:"High-Heeled Shoe"},{code:"1f461",desc:"Womans Sandal"},{code:"1f462",desc:"Womans Boots"},{code:"1f451",desc:"Crown"},{code:"1f452",desc:"Womans Hat"},{code:"1f462",desc:"Top Hat"},{code:"1f393",desc:"Graduation Cap"},{code:"1f484",desc:"Lipstick"},{code:"1f48d",desc:"Ring"},{code:"1f48e",desc:"Gem Stone"}]},{id:"nature",name:"Animals & Nature",code:"1F435",emoticons:[{code:"1F435",desc:"Monkey Face"},{code:"1F412",desc:"Monkey"},{code:"1F436",desc:"Dog Face"},{code:"1F415",desc:"Dog"},{code:"1F429",desc:"Poodle"},{code:"1F43A",desc:"Wolf Face"},{code:"1F431",desc:"Cat Face"},{code:"1F408",desc:"Cat"},{code:"1F42F",desc:"Tiger Face"},{code:"1F405",desc:"Tiger"},{code:"1F406",desc:"Leopard"},{code:"1F434",desc:"Horse Face"},{code:"1F40E",desc:"Horse"},{code:"1F42E",desc:"Cow Face"},{code:"1F402",desc:"Ox"},{code:"1F403",desc:"Water Buffalo"},{code:"1F404",desc:"Cow"},{code:"1F437",desc:"Pig Face"},{code:"1F416",desc:"Pig"},{code:"1F417",desc:"Boar"},{code:"1F43D",desc:"Pig Nose"},{code:"1F40F",desc:"Ram"},{code:"1F411",desc:"Sheep"},{code:"1F410",desc:"Goat"},{code:"1F42A",desc:"Dromedary Camel"},{code:"1F42B",desc:"Bactrian Camel"},{code:"1F418",desc:"Elephant"},{code:"1F42D",desc:"Mouse Face"},{code:"1F401",desc:"Mouse"},{code:"1F400",desc:"Rat"},{code:"1F439",desc:"Hamster Face"},{code:"1F430",desc:"Rabbit Face"},{code:"1F407",desc:"Rabbit"},{code:"1F43B",desc:"Bear Face"},{code:"1F428",desc:"Koala"},{code:"1F43C",desc:"Panda Face"},{code:"1F43E",desc:"Paw Prints"},{code:"1F414",desc:"Chicken"},{code:"1F413",desc:"Rooster"},{code:"1F423",desc:"Hatching Chick"},{code:"1F424",desc:"Baby Chick"},{code:"1F425",desc:"Front-Facing Baby Chick"},{code:"1F426",desc:"Bird"},{code:"1F427",desc:"Penguin"},{code:"1F438",desc:"Frog Face"},{code:"1F40A",desc:"Crocodile"},{code:"1F422",desc:"Turtle"},{code:"1F40D",desc:"Snake"},{code:"1F432",desc:"Dragon Face"},{code:"1F409",desc:"Dragon"},{code:"1F433",desc:"Spouting Whale"},{code:"1F40B",desc:"Whale"},{code:"1F42C",desc:"Dolphin"},{code:"1F41F",desc:"Fish"},{code:"1F420",desc:"Tropical Fish"},{code:"1F421",desc:"Blowfish"},{code:"1F419",desc:"Octopus"},{code:"1F41A",desc:"Spiral Shell"},{code:"1F40C",desc:"Snail"},{code:"1F41B",desc:"Bug"},{code:"1F41C",desc:"Ant"},{code:"1F41D",desc:"Honeybee"},{code:"1F41E",desc:"Lady Beetle"},{code:"1F490",desc:"Bouquet"},{code:"1F338",desc:"Cherry Blossom"},{code:"1F4AE",desc:"White Flower"},{code:"1F339",desc:"Rose"},{code:"1F33A",desc:"Hibiscus"},{code:"1F33B",desc:"Sunflower"},{code:"1F33C",desc:"Blossom"},{code:"1F337",desc:"Tulip"},{code:"1F331",desc:"Seedling"},{code:"1F332",desc:"Evergreen Tree"},{code:"1F333",desc:"Deciduous Tree"},{code:"1F334",desc:"Palm Tree"},{code:"1F335",desc:"Cactus"},{code:"1F33E",desc:"Ear of Rice"},{code:"1F33F",desc:"Herb"},{code:"2618",desc:"Four Leaf Clover"},{code:"1F341",desc:"Maple Leaf"},{code:"1F342",desc:"Fallen Leaf"},{code:"1F343",desc:"Leaf Fluttering in Wind"}]},{id:"foods",name:"Food & Drink",code:"1F347",emoticons:[{code:"1F347",desc:"Grapes"},{code:"1F348",desc:"Melon"},{code:"1F349",desc:"Watermelon"},{code:"1F34A",desc:"Tangerine"},{code:"1F34B",desc:"Lemon"},{code:"1F34C",desc:"Banana"},{code:"1F34D",desc:"Pineapple"},{code:"1F34E",desc:"Red Apple"},{code:"1F34F",desc:"Green Apple"},{code:"1F350",desc:"Pear"},{code:"1F351",desc:"Peach"},{code:"1F352",desc:"Cherries"},{code:"1F353",desc:"Strawberry"},{code:"1F345",desc:"Tomato"},{code:"1F346",desc:"Aubergine"},{code:"1F33D",desc:"Ear of Maize"},{code:"1F344",desc:"Mushroom"},{code:"1F330",desc:"Chestnut"},{code:"1F35E",desc:"Bread"},{code:"1F356",desc:"Meat on Bone"},{code:"1F357",desc:"Poultry Leg"},{code:"1F354",desc:"Hamburger"},{code:"1F35F",desc:"French Fries"},{code:"1F355",desc:"Slice of Pizza"},{code:"1F373",desc:"Cooking"},{code:"1F372",desc:"Pot of Food"},{code:"1F371",desc:"Bento Box"},{code:"1F358",desc:"Rice Cracker"},{code:"1F359",desc:"Rice Ball"},{code:"1F35A",desc:"Cooked Rice"},{code:"1F35B",desc:"Curry and Rice"},{code:"1F35C",desc:"Steaming Bowl"},{code:"1F35D",desc:"Spaghetti"},{code:"1F360",desc:"Roasted Sweet Potato"},{code:"1F362",desc:"Oden"},{code:"1F363",desc:"Sushi"},{code:"1F364",desc:"Fried Shrimp"},{code:"1F365",desc:"Fish Cake with Swirl Design"},{code:"1F361",desc:"Dango"},{code:"1F366",desc:"Soft Ice Cream"},{code:"1F367",desc:"Shaved Ice"},{code:"1F368",desc:"Ice Cream"},{code:"1F369",desc:"Doughnut"},{code:"1F36A",desc:"Cookie"},{code:"1F382",desc:"Birthday Cake"},{code:"1F370",desc:"Shortcake"},{code:"1F36B",desc:"Chocolate Bar"},{code:"1F36C",desc:"Candy"},{code:"1F36D",desc:"Lollipop"},{code:"1F36E",desc:"Custard"},{code:"1F36F",desc:"Honey Pot"},{code:"1F37C",desc:"Baby Bottle"},{code:"2615",desc:"Hot Beverage"},{code:"1F375",desc:"Teacup Without Handle"},{code:"1F376",desc:"Sake Bottle and Cup"},{code:"1F377",desc:"Wine Glass"},{code:"1F378",desc:"Cocktail Glass"},{code:"1F379",desc:"Tropical Drink"},{code:"1F37A",desc:"Beer Mug"},{code:"1F37B",desc:"Clinking Beer Mugs"},{code:"1F374",desc:"Fork and Knife"},{code:"1F52A",desc:"Hocho"}]},{id:"activity",name:"Activities",code:"1f383",emoticons:[{code:"1f383",desc:" Jack-O-Lantern"},{code:"1f384",desc:"Christmas Tree"},{code:"1f386",desc:" Fireworks"},{code:"1f387",desc:"Firework Sparkler"},{code:"2728",desc:" Sparkles"},{code:"1f388",desc:"Balloon"},{code:"1f389",desc:"Party Popper"},{code:"1f38a",desc:"Confetti Ball"},{code:"1f38b",desc:"Tanabata Tree"},{code:"1f38d",desc:"Pine Decoration"},{code:"1f38e",desc:"Japanese Dolls"},{code:"1f38f",desc:"Carp Streamer"},{code:"1f390",desc:"Wind Chime"},{code:"1f391",desc:"Moon Viewing Ceremony"},{code:"1f380",desc:"Ribbon"},{code:"1f381",desc:"Wrapped Present"},{code:"1f3ab",desc:"Ticket"},{code:"1f3c6",desc:"Trophy"},{code:"1f388",desc:"Balloon"},{code:"26bd",desc:"Soccer Ball"},{code:"26be",desc:"Baseball"},{code:"1f3c0",desc:"Basketball and Hoop"},{code:"1f3c8",desc:"American Football"},{code:"1f3c9",desc:"Rugby Football"},{code:"1f3be",desc:"Tennis Racquet and Ball"},{code:"1f3b1",desc:"Billiards"},{code:"1f3b3",desc:"Bowling"},{code:"1f3af",desc:"Direct Hit"},{code:"26f3",desc:"Flag in Hole"},{code:"1f3a3",desc:"Fishing Pole and Fish"},{code:"1f3bd",desc:"Running Shirt with Sash"},{code:"1f3bf",desc:"Ski and Ski Boot"},{code:"1f3ae",desc:"Video Game"},{code:"1f3b2",desc:"Game Die"},{code:"2660",desc:"Black Spade Suit"},{code:"2665",desc:"Black Heart SuiT"},{code:"2666",desc:"Black Diamond Suit"},{code:"2663",desc:"Black Club Suit"},{code:"1f0cf",desc:"Playing Card Black Joker"},{code:"1f004",desc:"Mahjong Tile Red Dragon"},{code:"1f3b4",desc:"Flower Playing Cards"}]},{id:"places",name:"Travel & Places",code:"1f30d",emoticons:[{code:"1f30d",desc:"Earth Globe Europe-Africa"},{code:"1f30e",desc:"Earth Globe Americas"},{code:"1f30f",desc:"Earth Globe Asia-Australia"},{code:"1f310",desc:"Globe with Meridians"},{code:"1f5fe",desc:"Silhouette of Japan"},{code:"1f30b",desc:"Volcano"},{code:"1f5fb",desc:"Mount Fuji"},{code:"1f3e0",desc:"House Building"},{code:"1f3e1",desc:"House with Garden"},{code:"1f3e2",desc:"Office Building"},{code:"1f3e3",desc:"Japanese Post Office"},{code:"1f3e4",desc:"European Post Office"},{code:"1f3e5",desc:"Hospital"},{code:"1f3e6",desc:"Bank"},{code:"1f3e8",desc:"Hotel"},{code:"1f3e9",desc:"Love Hotel"},{code:"1f3ea",desc:"Convenience Store"},{code:"1f3eb",desc:"School"},{code:"1f3ec",desc:"Department Store"},{code:"1f3ed",desc:"Factory"},{code:"1f3ef",desc:"Japanese Castle"},{code:"1f3f0",desc:"European Castle"},{code:"1f492",desc:"Wedding"},{code:"1f5fc",desc:"Tokyo Tower"},{code:"1f5fd",desc:"Statue of Liberty"},{code:"26ea",desc:"Church"},{code:"26f2",desc:"Fountain"},{code:"26fa",desc:"Tent"},{code:"1f301",desc:"Foggy"},{code:"1f303",desc:"Night with Stars"},{code:"1f304",desc:"Sunrise over Mountains"},{code:"1f305",desc:"Sunrise"},{code:"1f306",desc:"Cityscape at Dusk"},{code:"1f307",desc:"Sunset over Buildings"},{code:"1f309",desc:"Bridge at Night"},{code:"2668",desc:"Hot Springs"},{code:"1f30c",desc:"Milky Way"},{code:"1f3a0",desc:"Carousel Horse"},{code:"1f3a1",desc:"Ferris Wheel"},{code:"1f3a2",desc:"Roller Coaster"},{code:"1f488",desc:"Barber Pole"},{code:"1f3aa",desc:"Circus Tent"},{code:"1f3ad",desc:"Performing Arts"},{code:"1f3a8",desc:"Artist Palette"},{code:"1f3b0",desc:"Slot Machine"},{code:"1f682",desc:"Steam Locomotive"},{code:"1f683",desc:"Railway Car"},{code:"1f684",desc:"High-Speed Train"},{code:"1f685",desc:"High-Speed Train with Bullet Nose"},{code:"1f686",desc:"Train"},{code:"1f687",desc:"Metro"},{code:"1f688",desc:"Light Rail"},{code:"1f689",desc:"Station"},{code:"1f68a",desc:"Tram"},{code:"1f69d",desc:"Monorail"},{code:"1f69e",desc:"Mountain Railway"},{code:"1f68b",desc:"Tram Car"},{code:"1f68c",desc:"Bus"},{code:"1f68d",desc:"Oncoming Bus"},{code:"1f68e",desc:"Trolleybus"},{code:"1f690",desc:"Minibus"},{code:"1f691",desc:"Ambulance"},{code:"1f692",desc:"Fire Engine"},{code:"1f693",desc:"Police Car"},{code:"1f694",desc:"Oncoming Police Car"},{code:"1f695",desc:"Taxi"},{code:"1f695",desc:"Oncoming Taxi"},{code:"1f697",desc:"Automobile"},{code:"1f698",desc:"Oncoming Automobile"},{code:"1f699",desc:"Recreational Vehicle"},{code:"1f69a",desc:"Delivery Truck"},{code:"1f69b",desc:"Articulated Lorry"},{code:"1f69c",desc:"Tractor"},{code:"1f6b2",desc:"Bicycle"},{code:"1f68f",desc:"Bus Stop"},{code:"26fd",desc:"Fuel Pump"},{code:"1f6a8",desc:"Police Cars Revolving Light"},{code:"1f6a5",desc:"Horizontal Traffic Light"},{code:"1f6a6",desc:"Vertical Traffic Light"},{code:"1f6a7",desc:"Construction Sign"},{code:"2693",desc:"Anchor"},{code:"26f5",desc:"Sailboat"},{code:"1f6a4",desc:"Speedboat"},{code:"1f6a2",desc:"Ship"},{code:"2708",desc:"Airplane"},{code:"1f4ba",desc:"Seat"},{code:"1f681",desc:"Helicopter"},{code:"1f69f",desc:"Suspension Railway"},{code:"1f6a0",desc:"Mountain Cableway"},{code:"1f6a1",desc:"Aerial Tramway"},{code:"1f680",desc:"Rocket"},{code:"1f6aa",desc:"Door"},{code:"1f6bd",desc:"Toilet"},{code:"1f6bf",desc:"Shower"},{code:"1f6c1",desc:"Bathtub"},{code:"231b",desc:"Hourglass"},{code:"23f3",desc:"Hourglass with Flowing Sand"},{code:"231a",desc:"Watch"},{code:"23f0",desc:"Alarm Clock"},{code:"1f55b",desc:"Clock Face Twelve Oclock"},{code:"1f567",desc:"Clock Face Twelve-Thirty"},{code:"1f550",desc:"Clock Face One Oclock"},{code:"1f55c",desc:"Clock Face One-thirty"},{code:"1f551",desc:"Clock Face Two Oclock"},{code:"1f55d",desc:"Clock Face Two-thirty"},{code:"1f552",desc:"Clock Face Three Oclock"},{code:"1f55e",desc:"Clock Face Three-thirty"},{code:"1f553",desc:"Clock Face Four Oclock"},{code:"1f55f",desc:"Clock Face Four-thirty"},{code:"1f554",desc:"Clock Face Five Oclock"},{code:"1f560",desc:"Clock Face Five-thirty"},{code:"1f555",desc:"Clock Face Six Oclock"},{code:"1f561",desc:"Clock Face Six-thirty"},{code:"1f556",desc:"Clock Face Seven Oclock"},{code:"1f562",desc:"Clock Face Seven-thirty"},{code:"1f557",desc:"Clock Face Eight Oclock"},{code:"1f563",desc:"Clock Face Eight-thirty"},{code:"1f558",desc:"Clock Face Nine Oclock"},{code:"1f564",desc:"Clock Face Nine-thirty"},{code:"1f559",desc:"Clock Face Ten Oclock"},{code:"1f565",desc:"Clock Face Ten-thirty"},{code:"1f55a",desc:"Clock Face Eleven Oclock"},{code:"1f566",desc:"Clock Face Eleven-thirty"},{code:"1f311",desc:"New Moon Symbol"},{code:"1f312",desc:"Waxing Crescent Moon Symbol"},{code:"1f313",desc:"First Quarter Moon Symbol"},{code:"1f314",desc:"Waxing Gibbous Moon Symbol"},{code:"1f315",desc:"Full Moon Symbol"},{code:"1f316",desc:"Waning Gibbous Moon Symbol"},{code:"1f317",desc:"Last Quarter Moon Symbol"},{code:"1f318",desc:"Waning Crescent Moon Symbol"},{code:"1f319",desc:"Crescent Moon"},{code:"1f31a",desc:"New Moon with Face"},{code:"1f31b",desc:"First Quarter Moon with Face"},{code:"1f31c",desc:"Last Quarter Moon with Face"},{code:"2600",desc:"Black Sun with Rays"},{code:"1f31d",desc:"Full Moon with Face"},{code:"1f31e",desc:"Sun with Face"},{code:"2b50",desc:"White Medium Star"},{code:"1f31f",desc:"Glowing Star"},{code:"1f320",desc:"Shooting Star"},{code:"2601",desc:"Cloud"},{code:"26c5",desc:"Sun Behind Cloud"},{code:"1f300",desc:"Cyclone"},{code:"1f308",desc:"Rainbow"},{code:"1f302",desc:"Closed Umbrella"},{code:"2614",desc:"Umbrella with Rain Drops"},{code:"26a1",desc:"High Voltage Sign"},{code:"2744",desc:"Snowflake"},{code:"2603",desc:"Snowman Without Snow"},{code:"1f525",desc:"Fire"},{code:"1f4a7",desc:"Droplet"},{code:"1F30A",desc:"Water Wave"}]},{id:"objects",name:"Objects",code:"1F507",emoticons:[{code:"1F507",desc:"Speaker with Cancellation Stroke"},{code:"1F508",desc:"Speaker"},{code:"1F509",desc:"Speaker with One Sound Wave"},{code:"1F50A",desc:"Speaker with Three Sound Wave"},{code:"1F4E2",desc:"Public Address Loudspeaker"},{code:"1F4E3",desc:"Cheering Megaphone"},{code:"1F4EF",desc:"Postal Horn"},{code:"1F514",desc:"Bell"},{code:"1F515",desc:"Bell with Cancellation Stroke"},{code:"1F3BC",desc:"Musical Score"},{code:"1F3B5",desc:"Musical Note"},{code:"1F3B6",desc:"Multiple Musical Notes"},{code:"1F3A4",desc:"Microphone"},{code:"1F3A7",desc:"Headphone"},{code:"1F4FB",desc:"Radio"},{code:"1F3B7",desc:"Saxophone"},{code:"1F3B8",desc:"Guitar"},{code:"1F3B9",desc:"Musical Keyboard"},{code:"1F3BA",desc:"Trumpet"},{code:"1F3BB",desc:"Violin"},{code:"1F4F1",desc:"Mobile Phone"},{code:"1F4F2",desc:"Mobile Phone with Rightwards Arrow at Left"},{code:"260E",desc:"Black Telephone"},{code:"1F4DE",desc:"Telephone Receiver"},{code:"1F4DF",desc:"Pager"},{code:"1F4E0",desc:"Fax Machine"},{code:"1F50B",desc:"Battery"},{code:"1F50C",desc:"Electric Plug"},{code:"1F4BB",desc:"Personal Computer"},{code:"1F4BD",desc:"Minidisc"},{code:"1F4BE",desc:"Floppy Disk"},{code:"1F4BF",desc:"Optical Disk"},{code:"1F4C0",desc:"Dvd"},{code:"1F3A5",desc:"Movie Camera"},{code:"1F3AC",desc:"Clapper Board"},{code:"1F4FA",desc:"Television"},{code:"1F4F7",desc:"Camera"},{code:"1F4F9",desc:"Video Camera"},{code:"1F4FC",desc:"Videocassette"},{code:"1F50D",desc:"Left-Pointing Magnifying Glass"},{code:"1F50E",desc:"Right-Pointing Magnifying Glass"},{code:"1F52C",desc:"Microscope"},{code:"1F52D",desc:"Telelscope"},{code:"1F4E1",desc:"Satellite Antenna"},{code:"1F4A1",desc:"Electric Light Bulb"},{code:"1F526",desc:"Electric Torch"},{code:"1F3EE",desc:"Izakaya Lantern"},{code:"1F4D4",desc:"Notebook with Decorative Cover"},{code:"1F4D5",desc:"Closed Book"},{code:"1F4D6",desc:"Open Book"},{code:"1F4D7",desc:"Green Book"},{code:"1F4D8",desc:"Blue Book"},{code:"1F4D9",desc:"Orange Book"},{code:"1F4DA",desc:"Books"},{code:"1F4D3",desc:"Notebook"},{code:"1F4D2",desc:"Ledger"},{code:"1F4C3",desc:"Curl"},{code:"1F4DC",desc:"Scroll"},{code:"1F4C4",desc:"Page Facing Up"},{code:"1F4F0",desc:"Newspaper"},{code:"1F4D1",desc:"Bookmark Tabs"},{code:"1F516",desc:"Bookmark"},{code:"1F4B0",desc:"Money Bag"},{code:"1F4B4",desc:"Banknote with Yen Sign"},{code:"1F4B5",desc:"Banknote with Dollar Sign"},{code:"1F4B6",desc:"Banknote with Euro Sign"},{code:"1F4B7",desc:"Banknote with Pound Sign"},{code:"1F4B8",desc:"Money with Wings"},{code:"1F4B3",desc:"Credit Card"},{code:"1F4B9",desc:"Chart with Upwards Trend and Yen Sign"},{code:"1F4B1",desc:"Currency Exchange"},{code:"1F4B2",desc:"Heavy Dollar Sign"},{code:"2709",desc:"Envelope"},{code:"1F4E7",desc:"E-Mail Symbol"},{code:"1F4E8",desc:"Incoming Envelope"},{code:"1F4E9",desc:"Envelope with Downwards Arrow Above"},{code:"1F4E4",desc:"Outbox Tray"},{code:"1F4E5",desc:"Inbox Tray"},{code:"1F4E6",desc:"Package"},{code:"1F4BE",desc:"Closed Mailbox with Raised Flag"},{code:"1F4EA",desc:"Closed Mailbox with Lowered Flag"},{code:"1F4EC",desc:"Open Mailbox with Raised Flag"},{code:"1F4ED",desc:"Open Mailbox with Lowered Flag"},{code:"1F5F3",desc:"Postbox"},{code:"270F",desc:"Pencil"},{code:"2712",desc:"Black Nib"},{code:"1F4DD",desc:"Memo"},{code:"1F4BC",desc:"Briefcase"},{code:"1F4C1",desc:"File Folder"},{code:"1F4C2",desc:"Open File Folder"},{code:"1F4C5",desc:"Calender"},{code:"1F4C6",desc:"Tear-off Calender"},{code:"1F4C7",desc:"Card Index"},{code:"1F4C8",desc:"Chart with Upwards Trend"},{code:"1F4C9",desc:"Chart with Downwards Trend"},{code:"1F4CA",desc:"Bar Chart"},{code:"1F4CB",desc:"Clipboard"},{code:"1F4CC",desc:"Pushpin"},{code:"1F4CD",desc:"Round Pushpin"},{code:"1F4CE",desc:"Paperclip"},{code:"1F4CF",desc:"Straight Ruler"},{code:"1F4D0",desc:"Triangular Ruler"},{code:"2702",desc:"Black Scissors"},{code:"1F512",desc:"Lock"},{code:"1F513",desc:"Open Lock"},{code:"1F50F",desc:"Lock with Ink Pen"},{code:"1F510",desc:"Closed Lock with Key"},{code:"1F511",desc:"Key"},{code:"1F528",desc:"Hammer"},{code:"1F52B",desc:"Pistol"},{code:"1F527",desc:"Wrench"},{code:"1F529",desc:"Nut and Bolt"},{code:"1F517",desc:"Link Symbol"},{code:"1F489",desc:"Syringe"},{code:"1F48A",desc:"Pill"},{code:"1F6AC",desc:"Smoking Symbol"},{code:"1F5FF",desc:"Moyai"},{code:"1F52E",desc:"Crystal Ball"}]},{id:"symbols",name:"Symbols",code:"1F3E7",emoticons:[{code:"1F3E7",desc:"Automated Teller Machine"},{code:"1F6AE",desc:"Put Litter in Its Place Symbol"},{code:"1F6B0",desc:"Potable Water Symbol"},{code:"267F",desc:"Wheelchair Symbol"},{code:"1F6B9",desc:"Mens Symbol"},{code:"1F6BA",desc:"Womens Symbol"},{code:"1F6BB",desc:"Restroom"},{code:"1F6BC",desc:"Baby Symbol"},{code:"1F6BE",desc:"Water Closet"},{code:"1F6C2",desc:"Passport Control"},{code:"1F6C3",desc:"Customs"},{code:"1F6C4",desc:"Baggage Claim"},{code:"1F6C5",desc:"Left Luggage"},{code:"26A0",desc:"Warning Sign"},{code:"1F6B8",desc:"Children Crossing"},{code:"26D4",desc:"No Entry"},{code:"1F6AB",desc:"No Entry Sign"},{code:"1F6B3",desc:"No Bicycles"},{code:"1F6AD",desc:"No Smoking Symbol"},{code:"1F6AF",desc:"Do Not Litter Symbol"},{code:"1F6B1",desc:"Non-Potable Water Symbol"},{code:"1F6B7",desc:"No Pedestrians"},{code:"1F4F5",desc:"No Mobile Phones"},{code:"1F51E",desc:"No One Under Eighteen Symbol"},{code:"2B06",desc:"Upwards Black Arrow"},{code:"2197",desc:"North East Arrow"},{code:"27A1",desc:"Black Rightwards Arrow"},{code:"2198",desc:"South East Arrow"},{code:"2B07",desc:"Downwards Black Arrow"},{code:"2199",desc:"South West Arrow"},{code:"2B05",desc:"Leftwards Black Arrow"},{code:"2196",desc:"North West Arrow"},{code:"2195",desc:"Up Down Arrow"},{code:"2194",desc:"Left Right Arrow"},{code:"21A9",desc:"Leftwards Arrow with Hook"},{code:"21AA",desc:"Rightwards Arrow with Hook"},{code:"2934",desc:"Arrow Pointing Rightwards Then Curving Upwards"},{code:"2935",desc:"Arrow Pointing Rightwards Then Curving Downwards"},{code:"1F503",desc:"Clockwise Downwards and Upwards Open Circle Arrows"},{code:"1F504",desc:"Anticlockwise Downwards and Upwards Open Circle Arrows"},{code:"1F519",desc:"Back with Leftwards Arrow Above"},{code:"1F51A",desc:"End with Leftwards Arrow Above"},{code:"1F51B",desc:"On with Exclamation Mark with Left Right Arrow Above"},{code:"1F51C",desc:"Soon with Rightwards Arrow Above"},{code:"1F51D",desc:"Top with Upwards Arrow Above"},{code:"1F52F",desc:"Six Pointed Star with Middle Dot"},{code:"2648",desc:"Aries"},{code:"2649",desc:"Taurus"},{code:"264A",desc:"Gemini"},{code:"264B",desc:"Cancer"},{code:"264C",desc:"Leo"},{code:"264D",desc:"Virgo"},{code:"264E",desc:"Libra"},{code:"264F",desc:"Scorpius"},{code:"2650",desc:"Sagittarius"},{code:"2651",desc:"Capricorn"},{code:"2652",desc:"Aquarius"},{code:"2653",desc:"Pisces"},{code:"26CE",desc:"Ophiuchus"},{code:"1F500",desc:"Twisted Rightwards Arrows"},{code:"1F501",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows"},{code:"1F502",desc:"Clockwise Rightwards and Leftwards Open Circle Arrows with Circled One Overlay"},{code:"25B6",desc:"Black Right-Pointing Triangle"},{code:"23E9",desc:"Black Right-Pointing Double Triangle"},{code:"25C0",desc:"Black Left-Pointing Triangle"},{code:"23EA",desc:"Black Left-Pointing Double Triangle"},{code:"1F53C",desc:"Up-Pointing Small Red Triangle"},{code:"23EB",desc:"Black Up-Pointing Double Triangle"},{code:"1F53D",desc:"Down-Pointing Small Red Triangle"},{code:"23EC",desc:"Black Down-Pointing Double Triangle"},{code:"1F3A6",desc:"Cinema"},{code:"1F505",desc:"Low Brightness Symbol"},{code:"1F506",desc:"High Brightness Symbol"},{code:"1F4F6",desc:"Antenna with Bars"},{code:"1F4F3",desc:"Vibration Mode"},{code:"1F4F4",desc:"Mobile Phone off"},{code:"267B",desc:"Black Universal Recycling Symbol"},{code:"1F531",desc:"Trident Emblem"},{code:"1F4DB",desc:"Name Badge"},{code:"1F530",desc:"Japanese Symbol for Beginner"},{code:"2B55",desc:"Heavy Large Circle"},{code:"2705",desc:"White Heavy Check Mark"},{code:"2611",desc:"Ballot Box with Check"},{code:"2714",desc:"Heavy Check Mark"},{code:"2716",desc:"Heavy Multiplication X"},{code:"274C",desc:"Cross Mark"},{code:"274E",desc:"Negative Squared Cross Mark"},{code:"2795",desc:"Heavy Plus Sign"},{code:"2796",desc:"Heavy Minus Sign"},{code:"2797",desc:"Heavy Division Sign"},{code:"27B0",desc:"Curly Loop"},{code:"27BF",desc:"Double Curly Loop"},{code:"303D",desc:"Part Alternation Mark"},{code:"2733",desc:"Eight Spoked Asterisk"},{code:"2734",desc:"Eight Pointed Black Star"},{code:"2747",desc:"Sparkle"},{code:"203C",desc:"Double Exclamation Mark"},{code:"2049",desc:"Exclamation Question Mark"},{code:"2753",desc:"Black Question Mark Ornament"},{code:"2754",desc:"White Question Mark Ornament"},{code:"2755",desc:"White Exclamation Mark Ornament"},{code:"2757",desc:"Heavy Exclamation Mark Symbol"},{code:"3030",desc:"Wavy Dash"},{code:"2122",desc:"Trade Mark Sign"},{code:"1F51F",desc:"Keycap Ten"},{code:"1F4AF",desc:"Hundred Points Symbol"},{code:"1F520",desc:"Input Symbol for Latin Capital Letters"},{code:"1F521",desc:"Input Symbol for Latin Small Letters"},{code:"1F522",desc:"Input Symbol for Numbers"},{code:"1F523",desc:"Input Symbol for Symbols"},{code:"1F524",desc:"Input Symbol for Latin Letters"},{code:"1F170",desc:"Negative Squared Latin Capital Letter a"},{code:"1F18E",desc:"Negative Squared Ab"},{code:"1F171",desc:"Negative Squared Latin Capital Letter B"},{code:"1F191",desc:"Squared Cl"},{code:"1F192",desc:"Squared Cool"},{code:"1F193",desc:"Squared Free"},{code:"2139",desc:"Information Source"},{code:"1F194",desc:"Squared Id"},{code:"24C2",desc:"Circled Latin Capital Letter M"},{code:"1F195",desc:"Squared New"},{code:"1F196",desc:"Squared Ng"},{code:"1F17E",desc:"Negative Squared Latin Capital Letter O"},{code:"1F197",desc:"Squared Ok"},{code:"1F17F",desc:"Negative Squared Latin Capital Letter P"},{code:"1F198",desc:"Squared Sos"},{code:"1F199",desc:"Squared Up with Exclamation Mark"},{code:"1F19A",desc:"Squared Vs"},{code:"1F201",desc:"Squared Katakana Koko"},{code:"1F202",desc:"Squared Katakana Sa"},{code:"1F237",desc:"Squared Cjk Unified Ideograph-6708"},{code:"1F236",desc:"Squared Cjk Unified Ideograph-6709"},{code:"1F22F",desc:"Squared Cjk Unified Ideograph-6307"},{code:"1F250",desc:"Circled Ideograph Advantage"},{code:"1F239",desc:"Squared Cjk Unified Ideograph-5272"},{code:"1F21A",desc:"Squared Cjk Unified Ideograph-7121"},{code:"1F232",desc:"Squared Cjk Unified Ideograph-7981"},{code:"1F251",desc:"Circled Ideograph Accept"},{code:"1F238",desc:"Squared Cjk Unified Ideograph-7533"},{code:"1F234",desc:"Squared Cjk Unified Ideograph-5408"},{code:"1F233",desc:"Squared Cjk Unified Ideograph-7a7a"},{code:"3297",desc:"Circled Ideograph Congratulation"},{code:"3299",desc:"Circled Ideograph Secret"},{code:"1F23A",desc:"Squared Cjk Unified Ideograph-55b6"},{code:"1F235",desc:"Squared Cjk Unified Ideograph-6e80"},{code:"25AA",desc:"Black Small Square"},{code:"25AB",desc:"White Small Square"},{code:"25FB",desc:"White Medium Square"},{code:"25FC",desc:"Black Medium Square"},{code:"25FD",desc:"White Medium Small Square"},{code:"25FE",desc:"Black Medium Small Square"},{code:"2B1B",desc:"Black Large Square"},{code:"2B1C",desc:"White Large Square"},{code:"1F536",desc:"Large Orange Diamond"},{code:"1F537",desc:"Large Blue Diamond"},{code:"1F538",desc:"Small Orange Diamond"},{code:"1F539",desc:"Small Blue Diamond"},{code:"1F53A",desc:"Up-Pointing Red Triangle"},{code:"1F53B",desc:"Down-Pointing Red Triangle"},{code:"1F4A0",desc:"Diamond Shape with a Dot Inside"},{code:"1F518",desc:"Radio Button"},{code:"1F532",desc:"Black Square Button"},{code:"1F533",desc:"White Square Button"},{code:"26AA",desc:"Medium White Circle"},{code:"26AB",desc:"Medium Black Circle"},{code:"1F534",desc:"Large Red Circle"},{code:"1F535",desc:"Large Blue Circle"}]},{id:"flags",name:"Flags",code:"1F3C1",emoticons:[{code:"1f3c1",desc:"Chequered Flag"},{code:"1f1e8-1f1f3",desc:"China Flag"},{code:"1f38c",desc:"Crossed Flags"},{code:"1f1e9-1f1ea",desc:"Germany Flag"},{code:"1f1ea-1f1f8",desc:"Spain Flag"},{code:"1f1e6-1f1e8",desc:"Ascension Island Flag"},{code:"1f1e6-1f1e9",desc:"Andorra Flag"},{code:"1f1e6-1f1ea",desc:"United Arab Emirates Flag"},{code:"1f1e6-1f1eb",desc:"Afghanistan Flag"},{code:"1f1e6-1f1ec",desc:"Antigua & Barbuda Flag"},{code:"1f1e6-1f1ee",desc:"Anguilla Flag"},{code:"1f1e6-1f1f1",desc:"Albania Flag"},{code:"1f1e6-1f1f2",desc:"Armenia Flag"},{code:"1f1e6-1f1f4",desc:"Angola Flag"},{code:"1f1e6-1f1f6",desc:"Antarctica Flag"},{code:"1f1e6-1f1f7",desc:"Argentina Flag"},{code:"1f1e6-1f1f8",desc:"American Samoa Flag"},{code:"1f1e6-1f1f9",desc:"Austria Flag"},{code:"1f1e6-1f1fa",desc:"Australia Flag"},{code:"1f1e6-1f1fc",desc:"Aruba Flag"},{code:"1f1e6-1f1fd",desc:"Åland Islands Flag"},{code:"1f1e6-1f1ff",desc:"Azerbaijan Flag"},{code:"1f1e7-1f1e7",desc:"Barbados Flag"},{code:"1f1e7-1f1e9",desc:"Bangladesh Flag"},{code:"1f1e7-1f1ea",desc:"Belgium Flag"},{code:"1f1e7-1f1eb",desc:"Burkina Faso Flag"},{code:"1f1e7-1f1ec",desc:"Bulgaria Flag"},{code:"1f1e7-1f1ed",desc:"Bahrain Flag"},{code:"1f1e7-1f1ee",desc:"Burundi Flag"},{code:"1f1e7-1f1ef",desc:"Benin Flag"},{code:"1f1e7-1f1f1",desc:"St. Barthélemy Flag"},{code:"1f1e7-1f1f2",desc:"Bermuda Flag"},{code:"1f1e7-1f1f4",desc:"Bolivia Flag"},{code:"1f1e7-1f1f6",desc:"Caribbean Netherlands Flag"},{code:"1f1e7-1f1f7",desc:"Brazil Flag"},{code:"1f1e7-1f1f8",desc:"Bahamas Flag"},{code:"1f1e7-1f1f9",desc:"Bhutan Flag"},{code:"1f1e7-1f1fb",desc:"Bouvet Island Flag"},{code:"1f1e7-1f1fc",desc:"Botswana Flag"},{code:"1f1e7-1f1fe",desc:"Belarus Flag"},{code:"1f1e7-1f1ff",desc:"Belize Flag"},{code:"1f1e8-1f1e6",desc:"Canada Flag"},{code:"1f1e8-1f1e8",desc:"Cocos (keeling) Islands Flag"},{code:"1f1e8-1f1e9",desc:"Congo - Kinshasa Flag"},{code:"1f1e8-1f1eb",desc:"Central African Republic Flag"},{code:"1f1e8-1f1ec",desc:"Congo - Brazzaville Flag"},{code:"1f1e8-1f1ed",desc:"Switzerland Flag"},{code:"1f1e8-1f1ee",desc:"Côte D’ivoire Flag"},{code:"1f1e8-1f1f0",desc:"Cook Islands Flag"},{code:"1f1e8-1f1f1",desc:"Chile Flag"},{code:"1f1e8-1f1f2",desc:"Cameroon Flag"},{code:"1f1e8-1f1f4",desc:"Colombia Flag"},{code:"1f1e8-1f1f7",desc:"Costa Rica Flag"},{code:"1f1e8-1f1fa",desc:"Cuba Flag"},{code:"1f1e8-1f1fb",desc:"Cape Verde Flag"},{code:"1f1e8-1f1fc",desc:"Curaçao Flag"},{code:"1f1e8-1f1fd",desc:"Christmas Island Flag"},{code:"1f1e8-1f1fe",desc:"Cyprus Flag"},{code:"1f1e8-1f1ff",desc:'Czechia Flag"'},{code:"1f1e9-1f1ec",desc:"Diego Garcia Flag"},{code:"1f1e9-1f1ef",desc:"Djibouti Flag"},{code:"1f1e9-1f1f0",desc:"Denmark Flag"},{code:"1f1e9-1f1f2",desc:"Dominica Flag"},{code:"1f1e9-1f1f4",desc:"Dominican Republic Flag"},{code:"1f1e9-1f1ff",desc:"Algeria Flag"},{code:"1f1ea-1f1e6",desc:"Ceuta & Melilla Flag"},{code:"1f1ea-1f1e8",desc:"Ecuador Flag"},{code:"1f1ea-1f1ea",desc:"Estonia Flag"},{code:"1f1ea-1f1ec",desc:"Egypt Flag"},{code:"1f1ea-1f1ed",desc:"Western Sahara Flag"},{code:"1f1ea-1f1f7",desc:"Eritrea Flag"},{code:"1f1ea-1f1f9",desc:"Ethiopia Flag"},{code:"1f1ea-1f1fa",desc:"European Union Flag"},{code:"1f1eb-1f1ee",desc:"Finland Flag"},{code:"1f1eb-1f1ef",desc:"Fiji Flag"},{code:"1f1eb-1f1f0",desc:"Falkland Islands Flag"},{code:"1f1eb-1f1f2",desc:"Micronesia Flag"},{code:"1f1eb-1f1f4",desc:"Faroe Islands Flag"},{code:"1f1ec-1f1e6",desc:"Gabon Flag"},{code:"1f1ec-1f1e9",desc:"Grenada Flag"},{code:"1f1ec-1f1ea",desc:"Georgia Flag"},{code:"1f1ec-1f1eb",desc:"French Guiana Flag"},{code:"1f1ec-1f1ec",desc:"Guernsey Flag"},{code:"1f1ec-1f1ed",desc:"Ghana Flag"},{code:"1f1ec-1f1ee",desc:"Gibraltar Flag"},{code:"1f1ec-1f1f1",desc:"Greenland Flag"},{code:"1f1ec-1f1f2",desc:"Gambia Flag"},{code:"1f1ec-1f1f3",desc:"Guinea Flag"},{code:"1f1ec-1f1f5",desc:"Guadeloupe Flag"},{code:"1f1ec-1f1f6",desc:"Equatorial Guinea Flag"},{code:"1f1ec-1f1f7",desc:"Greece Flag"},{code:"1f1ec-1f1f8",desc:"South Georgia & South Sandwich Islands Flag"},{code:"1f1ec-1f1f9",desc:"Guatemala Flag"},{code:"1f1ec-1f1fa",desc:"Guam Flag"},{code:"1f1ec-1f1fc",desc:"Guinea-Bissau Flag"},{code:"1f1ec-1f1fe",desc:"Guyana Flag"},{code:"1f1ed-1f1f0",desc:"Hong Kong Sar China Flag"},{code:"1f1ed-1f1f2",desc:"Heard & Mcdonald Islands Flag"},{code:"1f1ed-1f1f3",desc:"Honduras Flag"},{code:"1f1ed-1f1f7",desc:"Croatia Flag"},{code:"1f1ed-1f1f9",desc:"Haiti Flag"},{code:"1f1ed-1f1fa",desc:"Hungary Flag"},{code:"1f1ee-1f1e8",desc:"Canary Islands Flag"},{code:"1f1ee-1f1e9",desc:"Indonesia Flag"},{code:"1f1ee-1f1ea",desc:"Ireland Flag"},{code:"1f1ee-1f1f1",desc:"Israel Flag"},{code:"1f1ee-1f1f2",desc:"Isle of Man Flag"},{code:"1f1ee-1f1f3",desc:"India Flag"},{code:"1f1ee-1f1f4",desc:"British Indian Ocean Territory Flag"},{code:"1f1ee-1f1f6",desc:"Iraq Flag"},{code:"1f1ee-1f1f7",desc:"Iran Flag"},{code:"1f1ee-1f1f8",desc:"Iceland Flag"},{code:"1f1ef-1f1ea",desc:"Jersey Flag"},{code:"1f1ef-1f1f2",desc:"Jamaica Flag"},{code:"1f1ef-1f1f4",desc:"Jordan Flag"},{code:"1f1f0-1f1ea",desc:"Kenya Flag"},{code:"1f1f0-1f1ec",desc:"Kyrgyzstan Flag"},{code:"1f1f0-1f1ed",desc:"Cambodia Flag"},{code:"1f1f0-1f1ee",desc:"Kiribati Flag"},{code:"1f1f0-1f1f2",desc:"Comoros Flag"},{code:"1f1f0-1f1f3",desc:"St. Kitts & Nevis Flag"},{code:"1f1f0-1f1f5",desc:"North Korea Flag"},{code:"1f1f0-1f1fc",desc:"Kuwait Flag"},{code:"1f1f0-1f1fe",desc:"Cayman Islands Flag"},{code:"1f1f0-1f1ff",desc:"Kazakhstan Flag"},{code:"1f1f1-1f1e6",desc:"Laos Flag"},{code:"1f1f1-1f1e7",desc:"Lebanon Flag"},{code:"1f1f1-1f1e8",desc:"St. Lucia Flag"},{code:"1f1f1-1f1ee",desc:"Liechtenstein Flag"},{code:"1f1f1-1f1f0",desc:"Sri Lanka Flag"},{code:"1f1f1-1f1f7",desc:"Liberia Flag"},{code:"1f1f1-1f1f8",desc:"Lesotho Flag"},{code:"1f1f1-1f1f9",desc:"Lithuania Flag"},{code:"1f1f1-1f1fa",desc:"Luxembourg Flag"},{code:"1f1f1-1f1fb",desc:"Latvia Flag"},{code:"1f1f1-1f1fe",desc:"Libya Flag"},{code:"1f1f2-1f1e6",desc:"Morocco Flag"},{code:"1f1f2-1f1e8",desc:"Monaco Flag"},{code:"1f1f2-1f1e9",desc:"Moldova Flag"},{code:"1f1f2-1f1ea",desc:"Montenegro Flag"},{code:"1f1f2-1f1eb",desc:"St. Martin Flag"},{code:"1f1f2-1f1ec",desc:"Madagascar Flag"},{code:"1f1f2-1f1ed",desc:"Marshall Islands Flag"},{code:"1f1f2-1f1f0",desc:"Macedonia Flag"},{code:"1f1f2-1f1f1",desc:"Mali Flag"},{code:"1f1f2-1f1f2",desc:"Myanmar (burma) Flag"},{code:"1f1f2-1f1f3",desc:"Mongolia Flag"},{code:"1f1f2-1f1f4",desc:"Macau Sar China Flag"},{code:"1f1f2-1f1f5",desc:"Northern Mariana Islands Flag"},{code:"1f1f2-1f1f6",desc:"Martinique Flag"},{code:"1f1f2-1f1f7",desc:"Mauritania Flag"},{code:"1f1f2-1f1f8",desc:"Montserrat Flag"},{code:"1f1f2-1f1f9",desc:"Malta Flag"},{code:"1f1f2-1f1fa",desc:"Mauritius Flag"},{code:"1f1f2-1f1fb",desc:"Maldives Flag"},{code:"1f1f2-1f1fc",desc:"Malawi Flag"},{code:"1f1f2-1f1fd",desc:"Mexico Flag"},{code:"1f1f2-1f1fe",desc:"Malaysia Flag"},{code:"1f1f2-1f1ff",desc:"Mozambique Flag"},{code:"1f1f3-1f1e6",desc:"Namibia Flag"},{code:"1f1f3-1f1e8",desc:"New Caledonia Flag"},{code:"1f1f3-1f1ea",desc:"Niger Flag"},{code:"1f1f3-1f1eb",desc:"Norfolk Island Flag"},{code:"1f1f3-1f1ec",desc:"Nigeria Flag"},{code:"1f1f3-1f1ee",desc:"Nicaragua Flag"},{code:"1f1f3-1f1f1",desc:"Netherlands Flag"},{code:"1f1f3-1f1f4",desc:"Norway Flag"},{code:"1f1f3-1f1f5",desc:"Nepal Flag"},{code:"1f1f3-1f1f7",desc:"Nauru Flag"},{code:"1f1f3-1f1fa",desc:"Niue Flag"},{code:"1f1f3-1f1ff",desc:"New Zealand Flag"},{code:"1f1f4-1f1f2",desc:"Oman Flag"},{code:"1f1f8-1f1ff",desc:"Swaziland Flag"},{code:"1f1f5-1f1e6",desc:"Panama Flag"},{code:"1f1f5-1f1ea",desc:"Peru Flag"},{code:"1f1f5-1f1eb",desc:"French Polynesia Flag"},{code:"1f1f5-1f1ec",desc:"Papua New Guinea Flag"},{code:"1f1f5-1f1ed",desc:"Philippines Flag"},{code:"1f1f5-1f1f0",desc:"Pakistan Flag"},{code:"1f1f5-1f1f1",desc:"Poland Flag"},{code:"1f1f5-1f1f2",desc:"St. Pierre & Miquelon  Flag"},{code:"1f1f5-1f1f3",desc:"Pitcairn Islands Flag"},{code:"1f1f5-1f1f7",desc:"Puerto Rico Flag"},{code:"1f1f5-1f1f8",desc:"Palestinian Territories Flag"},{code:"1f1f5-1f1f9",desc:"Portugal Flag"},{code:"1f1f5-1f1fc",desc:"Palau Flag"},{code:"1f1f5-1f1fe",desc:"Paraguay Flag"},{code:"1f1f6-1f1e6",desc:"Qatar Flag"},{code:"1f1f7-1f1ea",desc:"Réunion Flag"},{code:"1f1f7-1f1f4",desc:"Romania Flag"},{code:"1f1f7-1f1f8",desc:"Serbia Flag"},{code:"1f1f7-1f1fc",desc:"Rwanda Flag"},{code:"1f1f8-1f1e6",desc:"Saudi Arabia Flag"},{code:"1f1f8-1f1e7",desc:"Solomon Islands Flag"},{code:"1f1f8-1f1e8",desc:"Seychelles Flag"},{code:"1f1f8-1f1e9",desc:"Sudan Flag"},{code:"1f1f8-1f1ea",desc:"Sweden Flag"},{code:"1f1f8-1f1ec",desc:"Singapore Flag"},{code:"1f1f8-1f1ee",desc:"Slovenia Flag"},{code:"1f1f8-1f1ed",desc:"St. Helena  Flag"},{code:"1f1f8-1f1ef",desc:"Svalbard & Jan Mayen  Flag"},{code:"1f1f8-1f1f1",desc:"Sierra Leone Flag"},{code:"1f1f8-1f1f2",desc:"San Marino Flag"},{code:"1f1f8-1f1f3",desc:"Senegal Flag"},{code:"1f1f8-1f1f4",desc:"Somalia Flag"},{code:"1f1f8-1f1f7",desc:"Suriname Flag"},{code:"1f1f8-1f1f8",desc:"South Sudan  Flag"},{code:"1f1f8-1f1f9",desc:"São Tomé & Príncipe Flag"},{code:"1f1f8-1f1fb",desc:"El Salvador Flag"},{code:"1f1f8-1f1fd",desc:"Sint Maarten Flag"},{code:"1f1f8-1f1fe",desc:"Syria Flag"},{code:"1f1f9-1f1e6",desc:"Tristan Da Cunha Flag"},{code:"1f1f9-1f1e8",desc:"Turks & Caicos Islands  Flag"},{code:"1f1f9-1f1eb",desc:"French Southern Territories Flag"},{code:"1f1f9-1f1ec",desc:"Togo Flag"},{code:"1f1f9-1f1ed",desc:"Thailand Flag"},{code:"1f1f9-1f1ef",desc:"Tajikistan Flag"},{code:"1f1f9-1f1f0",desc:"Tokelau Flag"},{code:"1f1f9-1f1f1",desc:"Timor-Leste Flag"},{code:"1f1f9-1f1f2",desc:"Turkmenistan Flag"},{code:"1f1f9-1f1f3",desc:"Tunisia Flag"},{code:"1f1f9-1f1f4",desc:"Tonga Flag"},{code:"1f1f9-1f1f7",desc:"Turkey Flag"},{code:"1f1f9-1f1f9",desc:"Trinidad & Tobago Flag"},{code:"1f1f9-1f1fb",desc:"Tuvalu Flag"},{code:"1f1f9-1f1fc",desc:"Taiwan Flag"},{code:"1f1f9-1f1ff",desc:"Tanzania Flag"},{code:"1f1fa-1f1e6",desc:"Ukraine City  Flag"},{code:"1f1fa-1f1ec",desc:"Uganda Flag"},{code:"1f1fa-1f1f2",desc:"U.s. Outlying Islands  Flag"},{code:"1f1fa-1f1fe",desc:"Uruguay  Flag"},{code:"1f1fa-1f1ff",desc:"Uzbekistan Flag"},{code:"1f1fb-1f1e6",desc:"Vatican City  Flag"},{code:"1f1fb-1f1e8",desc:"St. Vincent & Grenadines Flag"},{code:"1f1fb-1f1ea",desc:"Venezuela Flag"},{code:"1f1fb-1f1ec",desc:"British Virgin Islands Flag"},{code:"1f1fb-1f1ee",desc:"U.s. Virgin Islands Flag"},{code:"1f1fb-1f1f3",desc:"Vietnam Flag"},{code:"1f1fc-1f1f8",desc:"Samoa Flag"},{code:"1f1fb-1f1fa",desc:"Vanuatu Flag"},{code:"1f1fc-1f1eb",desc:'"Wallis & Futuna Flag'},{code:"1f1fd-1f1f0",desc:"Kosovo Flag"},{code:"1f1fe-1f1ea",desc:"Yemen Flag"},{code:"1f1fe-1f1f9",desc:"Mayotte Flag"},{code:"1f1ff-1f1e6",desc:"South Africa Flag"},{code:"1f1ff-1f1f2",desc:"Zambia Flag"},{code:"1f1ff-1f1fc",desc:"Zimbabwe Flag"},{code:"1f1eb-1f1f7",desc:"France Flag"},{code:"1f1ec-1f1e7",desc:"United Kingdom  Flag"},{code:"1f1ee-1f1f9",desc:"Italy Flag"},{code:"1f1ef-1f1f5",desc:"Japan Flag"},{code:"1f1f0-1f1f7",desc:"South Korea Flag"},{code:"1f1f7-1f1fa",desc:"Russia Flag"},{code:"1F6A9",desc:"Triangular Flag on Post"},{code:"1f1fa-1f1f8",desc:"United States Flag"}]}],emoticonsButtons:["emoticonsBack","|"],emoticonsUseImage:!0}),r.PLUGINS.emoticons=function(e){var t=e.$,a=e.opts.emoticonsSet,n=a&&a[0],i="";function s(){if(!e.selection.isCollapsed())return!1;var t=e.selection.element(),n=e.selection.endElement();if(t&&e.node.hasClass(t,"fr-emoticon"))return t;if(n&&e.node.hasClass(n,"fr-emoticon"))return n;var r=e.selection.ranges(0),o=r.startContainer;if(o.nodeType==Node.ELEMENT_NODE&&0<o.childNodes.length&&0<r.startOffset){var a=o.childNodes[r.startOffset-1];if(e.node.hasClass(a,"fr-emoticon"))return a}return!1}function o(){return"".concat(function(t,n){return'<div class="fr-buttons fr-tabs fr-tabs-scroll">\n                        '.concat(function(t,n){var a="";return t.forEach((function(t){var r={image:t.code.toLowerCase()},o={elementClass:t.id===n.id?"fr-active fr-active-tab":"",emoticonsUnicodeClass:e.opts.emoticonsUseImage?"":"fr-tabs-unicode",title:e.language.translate(t.name),dataCmd:"setEmoticonCategory",dataParam1:t.id,image:e.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(r.image,'.svg"/>'):"&#x".concat(r.image,";")};a+='<button class="fr-command fr-btn '.concat(o.elementClass," ").concat(o.emoticonsUnicodeClass,'" \n      title="').concat(o.title,'" data-cmd="').concat(o.dataCmd,'" data-param1="').concat(o.dataParam1,'">\n       ').concat(o.image," </button>")})),a}(t,n),"\n                        </div>")}(a,n),"\n                      ").concat(function(t){return'\n        <div class="fr-icon-container fr-emoticon-container">\n            '.concat(function(t){var a="";return t.emoticons.forEach((function(t){var n=t.code.split("-").reduce((function(e,t){return e?"".concat(e,"&zwj;&#x").concat(t.toLowerCase(),";"):"&#x".concat(t.toLowerCase(),";")}),""),r={image:t.code.toLowerCase(),compiledCode:t.uCode?t.uCode:n},o={dataParam1:t.code.toLowerCase(),dataParam2:r.compiledCode,title:e.language.translate(t.desc),image:e.opts.emoticonsUseImage?'<img src="https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/'.concat(r.image,'.svg"/>'):"".concat(r.compiledCode),desc:e.language.translate(t.desc)};a+='<span class="fr-command fr-emoticon fr-icon" role="button" \n      data-cmd="insertEmoticon" data-param1="'.concat(o.dataParam1,'" \n      data-param2="').concat(o.dataParam2,'"  title="').concat(o.title,'" >\n      ').concat(o.image,'<span class="fr-sr-only">').concat(o.desc,"&nbsp;&nbsp;&nbsp;</span></span>")})),a}(t),"\n        </div>\n        ")}(n),"\n                      ").concat(e.opts.emoticonsUseImage?'<p style="font-size: 12px; text-align: center; padding: 0 5px;">Emoji free by <a class="fr-link" tabIndex="-1" href="http://emojione.com/" target="_blank" rel="nofollow noopener noreferrer" role="link" aria-label="Open Emoji One website.">Emoji One</a></p>':"")}return{_init:function(){var n=function(){for(var t=e.el.querySelectorAll(".fr-emoticon:not(.fr-deletable)"),n=0;n<t.length;n++)t[n].className+=" fr-deletable"};n(),e.events.on("html.set",n),e.events.on("keydown",(function(n){if(e.keys.isCharacter(n.which)&&e.selection.inEditor()){var o=e.selection.ranges(0),c=s();e.node.hasClass(c,"fr-emoticon-img")&&c&&(0===o.startOffset&&e.selection.element()===c?t(c).before(r.MARKERS+r.INVISIBLE_SPACE):t(c).after(r.INVISIBLE_SPACE+r.MARKERS),e.selection.restore())}})),e.events.on("keyup",(function(n){for(var o=e.el.querySelectorAll(".fr-emoticon"),c=0;c<o.length;c++)void 0!==o[c].textContent&&0===o[c].textContent.replace(/\u200B/gi,"").length&&t(o[c]).remove();if(!(n.which>=r.KEYCODE.ARROW_LEFT&&n.which<=r.KEYCODE.ARROW_DOWN)){var l=s();e.node.hasClass(l,"fr-emoticon-img")&&(t(l).append(r.MARKERS),e.selection.restore())}}))},insert:function(n,o){var c=s(),l=e.selection.ranges(0);c?(0===l.startOffset&&e.selection.element()===c?t(c).before(r.MARKERS+r.INVISIBLE_SPACE):0<l.startOffset&&e.selection.element()===c&&l.commonAncestorContainer.parentNode.classList.contains("fr-emoticon")&&t(c).after(r.INVISIBLE_SPACE+r.MARKERS),e.selection.restore(),e.html.insert('<span class="fr-emoticon fr-deletable'.concat(o?" fr-emoticon-img":"",'"').concat(o?' style="background: url('.concat(o,');"'):"",">").concat(o?"&nbsp;":n,"</span>&nbsp;").concat(r.MARKERS),!0)):e.html.insert('<span class="fr-emoticon fr-deletable'.concat(o?" fr-emoticon-img":"",'"').concat(o?' style="background: url('.concat(o,');"'):"",">").concat(o?"&nbsp;":n,"</span>&nbsp;"),!0)},setEmoticonCategory:function(t){n=a.filter((function(e){return e.id===t}))[0],e.popups.get("emoticons").html(i+o())},showEmoticonsPopup:function(){var n=e.popups.get("emoticons");if(n||(n=function(){e.opts.toolbarInline&&0<e.opts.emoticonsButtons.length&&(i='<div class="fr-buttons fr-emoticons-buttons fr-tabs">'.concat(e.button.buildList(e.opts.emoticonsButtons),"</div>"));var n={buttons:i,custom_layer:o()},c=e.popups.create("emoticons",n);return function(g){e.events.on("popup.tab",(function(n){var o=t(n.currentTarget);if(!e.popups.isVisible("emoticons")||!o.is("span, a"))return!0;var c,l,a,d=n.which;if(r.KEYCODE.TAB==d){if(o.is("span.fr-emoticon")&&n.shiftKey||o.is("a")&&!n.shiftKey){var i=g.find(".fr-buttons");c=!e.accessibility.focusToolbar(i,!!n.shiftKey)}if(!1!==c){var s=g.find("span.fr-emoticon:focus").first().concat(g.findVisible(" div.fr-tabs").first().concat(g.find("a")));o.is("span.fr-emoticon")&&(s=s.not("span.fr-emoticon:not(:focus)")),l=s.index(o),l=n.shiftKey?((l-1)%s.length+s.length)%s.length:(l+1)%s.length,a=s.get(l),e.events.disableBlur(),a.focus(),c=!1}}else if(r.KEYCODE.ARROW_UP==d||r.KEYCODE.ARROW_DOWN==d||r.KEYCODE.ARROW_LEFT==d||r.KEYCODE.ARROW_RIGHT==d){if(o.is("span.fr-emoticon")){var h=o.parent().find("span.fr-emoticon");l=h.index(o);var f=e.opts.emoticonsStep,m=Math.floor(h.length/f),v=l%f,u=Math.floor(l/f)*f+v,_=m*f;r.KEYCODE.ARROW_UP==d?u=((u-f)%_+_)%_:r.KEYCODE.ARROW_DOWN==d?u=(u+f)%_:r.KEYCODE.ARROW_LEFT==d?u=((u-1)%_+_)%_:r.KEYCODE.ARROW_RIGHT==d&&(u=(u+1)%_),a=t(h.get(u)),e.events.disableBlur(),a.focus(),c=!1}}else r.KEYCODE.ENTER==d&&(o.is("a")?o[0].click():e.button.exec(o),c=!1);return!1===c&&(n.preventDefault(),n.stopPropagation()),c}),!0)}(c),c}()),!n.hasClass("fr-active")){e.popups.refresh("emoticons"),e.popups.setContainer("emoticons",e.$tb);var c=e.$tb.find('.fr-command[data-cmd="emoticons"]'),l=e.button.getPosition(c),d=l.left,a=l.top;e.popups.show("emoticons",d,a,c.outerHeight())}},back:function(){e.popups.hide("emoticons"),e.toolbar.showInline()}}},r.DefineIcon("emoticons",{NAME:"smile-o",FA5NAME:"smile",SVG_KEY:"smile"}),r.RegisterCommand("emoticons",{title:"Emoticons",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("emoticons")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("emoticons")):this.emoticons.showEmoticonsPopup()},plugin:"emoticons"}),r.RegisterCommand("insertEmoticon",{callback:function(e,t,n){this.emoticons.insert(n,this.opts.emoticonsUseImage?"https://cdnjs.cloudflare.com/ajax/libs/emojione/2.0.1/assets/svg/".concat(t,".svg"):null),this.popups.hide("emoticons")}}),r.RegisterCommand("setEmoticonCategory",{undo:!1,focus:!1,callback:function(e,t){this.emoticons.setEmoticonCategory(t)}}),r.DefineIcon("emoticonsBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("emoticonsBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.emoticons.back()}}),Object.assign(r.DEFAULTS,{entities:"&quot;&#39;&iexcl;&cent;&pound;&curren;&yen;&brvbar;&sect;&uml;&copy;&ordf;&laquo;&not;&shy;&reg;&macr;&deg;&plusmn;&sup2;&sup3;&acute;&micro;&para;&middot;&cedil;&sup1;&ordm;&raquo;&frac14;&frac12;&frac34;&iquest;&Agrave;&Aacute;&Acirc;&Atilde;&Auml;&Aring;&AElig;&Ccedil;&Egrave;&Eacute;&Ecirc;&Euml;&Igrave;&Iacute;&Icirc;&Iuml;&ETH;&Ntilde;&Ograve;&Oacute;&Ocirc;&Otilde;&Ouml;&times;&Oslash;&Ugrave;&Uacute;&Ucirc;&Uuml;&Yacute;&THORN;&szlig;&agrave;&aacute;&acirc;&atilde;&auml;&aring;&aelig;&ccedil;&egrave;&eacute;&ecirc;&euml;&igrave;&iacute;&icirc;&iuml;&eth;&ntilde;&ograve;&oacute;&ocirc;&otilde;&ouml;&divide;&oslash;&ugrave;&uacute;&ucirc;&uuml;&yacute;&thorn;&yuml;&OElig;&oelig;&Scaron;&scaron;&Yuml;&fnof;&circ;&tilde;&Alpha;&Beta;&Gamma;&Delta;&Epsilon;&Zeta;&Eta;&Theta;&Iota;&Kappa;&Lambda;&Mu;&Nu;&Xi;&Omicron;&Pi;&Rho;&Sigma;&Tau;&Upsilon;&Phi;&Chi;&Psi;&Omega;&alpha;&beta;&gamma;&delta;&epsilon;&zeta;&eta;&theta;&iota;&kappa;&lambda;&mu;&nu;&xi;&omicron;&pi;&rho;&sigmaf;&sigma;&tau;&upsilon;&phi;&chi;&psi;&omega;&thetasym;&upsih;&piv;&ensp;&emsp;&thinsp;&zwnj;&zwj;&lrm;&rlm;&ndash;&mdash;&lsquo;&rsquo;&sbquo;&ldquo;&rdquo;&bdquo;&dagger;&Dagger;&bull;&hellip;&permil;&prime;&Prime;&lsaquo;&rsaquo;&oline;&frasl;&euro;&image;&weierp;&real;&trade;&alefsym;&larr;&uarr;&rarr;&darr;&harr;&crarr;&lArr;&uArr;&rArr;&dArr;&hArr;&forall;&part;&exist;&empty;&nabla;&isin;&notin;&ni;&prod;&sum;&minus;&lowast;&radic;&prop;&infin;&ang;&and;&or;&cap;&cup;&int;&there4;&sim;&cong;&asymp;&ne;&equiv;&le;&ge;&sub;&sup;&nsub;&sube;&supe;&oplus;&otimes;&perp;&sdot;&lceil;&rceil;&lfloor;&rfloor;&lang;&rang;&loz;&spades;&clubs;&hearts;&diams;"}),r.PLUGINS.entities=function(a){var e,i,s=a.$;function t(t){var n=t.textContent;if(n.match(e)){for(var r="",o=0;o<n.length;o++)i[n[o]]?r+=i[n[o]]:r+=n[o];t.textContent=r}}function n(e){if(e&&0<=["STYLE","SCRIPT","svg","IFRAME"].indexOf(e.tagName))return!0;for(var r=a.node.contents(e),o=0;o<r.length;o++)r[o].nodeType===Node.TEXT_NODE?t(r[o]):n(r[o]);return e.nodeType===Node.TEXT_NODE&&t(e),!1}var r=function(e){return 0===e.length?"":a.clean.exec(e,n).replace(/\&amp;/g,"&")};return{_init:function(){a.opts.htmlSimpleAmpersand||(a.opts.entities="".concat(a.opts.entities,"&amp;"));var t=s(document.createElement("div")).html(a.opts.entities).text(),n=a.opts.entities.split(";");i={},e="";for(var o=0;o<t.length;o++){var c=t.charAt(o);i[c]="".concat(n[o],";"),e+="\\".concat(c+(o<t.length-1?"|":""))}e=new RegExp("(".concat(e,")"),"g"),a.events.on("html.get",r,!0)}}},Object.assign(r.POPUP_TEMPLATES,{"file.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_PROGRESS_BAR_]"}),Object.assign(r.DEFAULTS,{fileUpload:!0,fileUploadURL:null,fileUploadParam:"file",fileUploadParams:{},fileUploadToS3:!1,fileUploadToAzure:!1,fileUploadMethod:"POST",fileMaxSize:10485760,fileAllowedTypes:["*"],fileInsertButtons:["fileBack","|"],fileUseSelectedText:!1}),r.PLUGINS.file=function(e){var t,p=e.$,n="https://i.froala.com/upload",u=2,o=3,g=4,c=5,l=6,d={};function h(){var t=e.popups.get("file.insert");t||(t=w()),t.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),t.find(".fr-file-progress-bar-layer").addClass("fr-active"),t.find(".fr-buttons").hide(),a(e.language.translate("Uploading"),0)}function f(t){var n=e.popups.get("file.insert");n&&(n.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),n.find(".fr-file-progress-bar-layer").removeClass("fr-active"),n.find(".fr-buttons").show(),t&&(e.events.focus(),e.popups.hide("file.insert")))}function a(t,n){var r=e.popups.get("file.insert");if(r){var o=r.find(".fr-file-progress-bar-layer");o.find("h3").text(t+(n?" ".concat(n,"%"):"")),o.removeClass("fr-error"),n?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width","".concat(n,"%"))):o.find("div").addClass("fr-indeterminate")}}function m(t,n,r){e.edit.on(),e.events.focus(!0),e.selection.restore(),e.opts.fileUseSelectedText&&e.selection.text().length&&(n=e.selection.text()),e.html.insert('<a href="'.concat(t,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(n,"</a>"));var o=e.$el.find("#fr-inserted-file");o.removeAttr("id"),e.popups.hide("file.insert"),e.undo.saveStep(),A(),e.events.trigger("file.inserted",[o,r])}function v(t,n,r){var c=this.status,a=this.response,l=this.responseXML,i=this.responseText;try{if(e.opts.fileUploadToS3||e.opts.fileUploadToAzure)if(201===c){var s;if(e.opts.fileUploadToAzure){if(!1===e.events.trigger("file.uploadedToAzure",[this.responseURL,r,a],!0))return e.edit.on(),!1;s=n}else s=function(t){try{var n=p(t).find("Location").text(),r=p(t).find("Key").text();return!1===e.events.trigger("file.uploadedToS3",[n,r,t],!0)?(e.edit.on(),!1):n}catch(e){return E(g,t),!1}}(l);s&&m(s,t,a||l)}else E(g,a||l);else if(200<=c&&c<300){var d=function(t){try{if(!1===e.events.trigger("file.uploaded",[t],!0))return e.edit.on(),!1;var n=JSON.parse(t);return n.link?n:(E(u,t),!1)}catch(e){return E(g,t),!1}}(i);d&&m(d.link,t,a||i)}else E(o,a||i)}catch(e){E(g,a||i)}}function _(){E(g,this.response||this.responseText||this.responseXML)}function y(t){if(t.lengthComputable){var n=t.loaded/t.total*100|0;a(e.language.translate("Uploading"),n)}}function E(t,n){e.edit.on(),function(t){h();var n=e.popups.get("file.insert").find(".fr-file-progress-bar-layer");n.addClass("fr-error");var r=n.find("h3");r.text(t),e.events.disableBlur(),r.focus()}(e.language.translate("Something went wrong. Please try again.")),e.events.trigger("file.error",[{code:t,message:d[t]},n])}function C(){e.edit.on(),f(!0)}function i(t){if(void 0!==t&&0<t.length){var r=t[0].type;if(t[0].name&&t[0].name.endsWith(".msg")&&(r="application/vnd.ms-outlook"),!1===e.events.trigger("file.beforeUpload",[t]))return!1;var o,d=t[0];if(!(null!==e.opts.fileUploadURL&&e.opts.fileUploadURL!==n||e.opts.fileUploadToS3||e.opts.fileUploadToAzure))return function(t){var i=new FileReader;i.onload=function(){for(var n=i.result,r=atob(i.result.split(",")[1]),o=[],c=0;c<r.length;c++)o.push(r.charCodeAt(c));var a=t.type;t.name&&t.name.endsWith(".msg")&&(a="application/vnd.ms-outlook"),n=window.URL.createObjectURL(new Blob([new Uint8Array(o)],{type:a})),e.file.insert(n,t.name,null)},h(),i.readAsDataURL(t)}(d),!1;if(d.size>e.opts.fileMaxSize)return E(c),!1;if(e.opts.fileAllowedTypes.indexOf("*")<0&&e.opts.fileAllowedTypes.indexOf(r.replace(/file\//g,""))<0)return E(l),!1;if(e.drag_support.formdata&&(o=e.drag_support.formdata?new FormData:null),o){var a;if(!1!==e.opts.fileUploadToS3)for(a in o.append("key",e.opts.fileUploadToS3.keyStart+(new Date).getTime()+"-"+(d.name||"untitled")),o.append("success_action_status","201"),o.append("X-Requested-With","xhr"),o.append("Content-Type",r),e.opts.fileUploadToS3.params)e.opts.fileUploadToS3.params.hasOwnProperty(a)&&o.append(a,e.opts.fileUploadToS3.params[a]);for(a in e.opts.fileUploadParams)e.opts.fileUploadParams.hasOwnProperty(a)&&o.append(a,e.opts.fileUploadParams[a]);o.append(e.opts.fileUploadParam,d);var f,i,s=e.opts.fileUploadURL;e.opts.fileUploadToS3&&(s=e.opts.fileUploadToS3.uploadURL?e.opts.fileUploadToS3.uploadURL:"https://".concat(e.opts.fileUploadToS3.region,".amazonaws.com/").concat(e.opts.fileUploadToS3.bucket));var m=e.opts.fileUploadMethod;e.opts.fileUploadToAzure&&(s=e.opts.fileUploadToAzure.uploadURL?"".concat(e.opts.fileUploadToAzure.uploadURL,"/").concat(d.name):encodeURI("https://".concat(e.opts.fileUploadToAzure.account,".blob.core.windows.net/").concat(e.opts.fileUploadToAzure.container,"/").concat(d.name)),f=s,e.opts.fileUploadToAzure.SASToken&&(s+=e.opts.fileUploadToAzure.SASToken),m="PUT");var w=e.core.getXHR(s,m);if(e.opts.fileUploadToAzure){var S=(new Date).toUTCString();if(!e.opts.fileUploadToAzure.SASToken&&e.opts.fileUploadToAzure.accessKey){var T=e.opts.fileUploadToAzure.account,p=e.opts.fileUploadToAzure.container;if(e.opts.fileUploadToAzure.uploadURL){var u=e.opts.fileUploadToAzure.uploadURL.split("/");p=u.pop(),T=u.pop().split(".")[0]}var A="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(S,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+T+"/"+p+"/"+d.name),R=m+"\n\n\n"+d.size+"\n\n"+r+"\n\n\n\n\n\n\n"+A+"\n"+g,O=e.cryptoJSPlugin.cryptoJS.HmacSHA256(R,e.cryptoJSPlugin.cryptoJS.enc.Base64.parse(e.opts.fileUploadToAzure.accessKey)).toString(e.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+T+":"+O;i=O,w.setRequestHeader("Authorization",b)}for(a in w.setRequestHeader("x-ms-version","2019-07-07"),w.setRequestHeader("x-ms-date",S),w.setRequestHeader("Content-Type",r),w.setRequestHeader("x-ms-blob-type","BlockBlob"),e.opts.fileUploadParams)e.opts.fileUploadParams.hasOwnProperty(a)&&w.setRequestHeader(a,e.opts.fileUploadParams[a]);for(a in e.opts.fileUploadToAzure.params)e.opts.fileUploadToAzure.params.hasOwnProperty(a)&&w.setRequestHeader(a,e.opts.fileUploadToAzure.params[a])}w.onload=function(){v.call(w,d.name,f,i)},w.onerror=_,w.upload.onprogress=y,w.onabort=C,h();var I=e.popups.get("file.insert");I&&(I.off("abortUpload"),I.on("abortUpload",(function(){4!==w.readyState&&w.abort()}))),w.send(e.opts.fileUploadToAzure?d:o)}}}function s(){f()}function w(t){if(t)return e.popups.onHide("file.insert",s),!0;var n;e.opts.fileUpload||e.opts.fileInsertButtons.splice(e.opts.fileInsertButtons.indexOf("fileUpload"),1),n='<div class="fr-buttons fr-tabs">'.concat(e.button.buildList(e.opts.fileInsertButtons),"</div>");var r="";e.opts.fileUpload&&(r='<div class="fr-file-upload-layer fr-layer fr-active" id="fr-file-upload-layer-'.concat(e.id,'"><strong>').concat(e.language.translate("Drop file"),"</strong><br>(").concat(e.language.translate("or click"),')<div class="fr-form"><input type="file" name="').concat(e.opts.fileUploadParam,'" accept="').concat(0<=e.opts.fileAllowedTypes.indexOf("*")?"/":"").concat(e.opts.fileAllowedTypes.join(", ").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-file-upload-layer-').concat(e.id,'" role="button"></div></div>'));var o={buttons:n,upload_layer:r,progress_bar:'<div class="fr-file-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="fileDismissError" tabIndex="2" role="button">OK</button></div></div>'},a=e.popups.create("file.insert",o);return function(t){e.events.$on(t,"dragover dragenter",".fr-file-upload-layer",(function(){return p(this).addClass("fr-drop"),!1}),!0),e.events.$on(t,"dragleave dragend",".fr-file-upload-layer",(function(){return p(this).removeClass("fr-drop"),!1}),!0),e.events.$on(t,"drop",".fr-file-upload-layer",(function(n){n.preventDefault(),n.stopPropagation(),p(this).removeClass("fr-drop");var r=n.originalEvent.dataTransfer;r&&r.files&&(t.data("instance")||e).file.upload(r.files)}),!0),e.helpers.isIOS()&&e.events.$on(t,"touchstart",'.fr-file-upload-layer input[type="file"]',(function(){p(this).trigger("click")})),e.events.$on(t,"change",'.fr-file-upload-layer input[type="file"]',(function(){if(this.files){var n=t.data("instance")||e;n.events.disableBlur(),t.find("input:focus").blur(),n.events.enableBlur(),n.file.upload(this.files)}p(this).val("")}),!0)}(a),a}function S(t){e.node.hasClass(t,"fr-file")}function T(t){var n=t.originalEvent.dataTransfer;if(n&&n.files&&n.files.length){var o=n.files[0];if(o&&void 0!==o.type){if(o.type.indexOf("image")<0){if(!e.opts.fileUpload)return t.preventDefault(),t.stopPropagation(),!1;e.markers.remove(),e.markers.insertAtPoint(t.originalEvent),e.$el.find(".fr-marker").replaceWith(r.MARKERS),e.popups.hideAll();var c=e.popups.get("file.insert");return c||(c=w()),e.popups.setContainer("file.insert",e.$sc),e.popups.show("file.insert",t.originalEvent.pageX,t.originalEvent.pageY),h(),i(n.files),t.preventDefault(),t.stopPropagation(),!1}}else o.type.indexOf("image")<0&&(t.preventDefault(),t.stopPropagation())}}function A(){var n,r=Array.prototype.slice.call(e.el.querySelectorAll("a.fr-file")),o=[];for(n=0;n<r.length;n++)o.push(r[n].getAttribute("href"));if(t)for(n=0;n<t.length;n++)o.indexOf(t[n].getAttribute("href"))<0&&e.events.trigger("file.unlink",[t[n]]);t=r}return d[1]="File cannot be loaded from the passed link.",d[u]="No link in upload response.",d[o]="Error during file upload.",d[g]="Parsing response failed.",d[c]="File is too large.",d[l]="File file type is invalid.",d[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",{_init:function(){e.events.on("drop",T),e.events.$on(e.$win,"keydown",(function(t){var n=t.which,o=e.popups.get("file.insert");o&&n===r.KEYCODE.ESC&&o.trigger("abortUpload")})),e.events.on("destroy",(function(){var t=e.popups.get("file.insert");t&&t.trigger("abortUpload")})),e.events.on("link.beforeRemove",S),e.$wp&&(A(),e.events.on("contentChanged",A)),w(!0)},showInsertPopup:function(){var t=e.$tb.find('.fr-command[data-cmd="insertFile"]'),n=e.popups.get("file.insert");if(n||(n=w()),f(),!n.hasClass("fr-active"))if(e.popups.refresh("file.insert"),e.popups.setContainer("file.insert",e.$tb),t.isVisible){var r=e.button.getPosition(t),o=r.left,a=r.top;e.popups.show("file.insert",o,a,t.outerHeight())}else e.position.forSelection(n),e.popups.show("file.insert")},upload:i,insert:m,back:function(){e.events.disableBlur(),e.selection.restore(),e.events.enableBlur(),e.popups.hide("file.insert"),e.toolbar.showInline()},hideProgressBar:f}},r.DefineIcon("insertFile",{NAME:"file-o",FA5NAME:"file",SVG_KEY:"insertFile"}),r.RegisterCommand("insertFile",{title:"Upload File",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("file.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("file.insert")):this.file.showInsertPopup()},plugin:"file"}),r.DefineIcon("fileBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("fileBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.file.back()},refresh:function(e){this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),r.RegisterCommand("fileDismissError",{title:"OK",callback:function(){this.file.hideProgressBar(!0)}}),Object.assign(r.POPUP_TEMPLATES,{"filesManager.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_PROGRESS_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(r.DEFAULTS,{filesInsertButtons:["imageBack","|","filesUpload","filesByURL","filesEmbed"],filesInsertButtons2:["deleteAll","insertAll","cancel","minimize"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,filesManagerUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,filesManagerUploadParam:"file",filesManagerUploadParams:{},googleOptions:{},filesManagerUploadToS3:!1,filesManagerUploadToAzure:!1,filesManagerUploadMethod:"POST",filesManagerMaxSize:10485760,filesManagerAllowedTypes:["*"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),r.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],r.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,r.IMAGE_EMBED_REGEX=/^\W*((<img(.|\n)*>(\s|\n)*))\W*$/i,r.IMAGE_TYPE="image/png",r.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,r.PLUGINS.filesManager=function(t){var n,i,o,c,l,d,s,h,f=t.$,m="https://i.froala.com/upload",p=!1,v=!1,_=new Map,y=new Map,E=new Map,C=new Map,w=new Map,S=new Map,T=0,a=[],u=-1,A=[],R=0,g=["file","image","imageTUI","video"],O=1,I=2,k=3,N=4,L=5,M=6,x=10,D=["video/avi","video/mpeg","video/x-ms-wmv"],P={};function b(){var e=t.popups.get("filesManager.insert"),n=e.find(".fr-files-by-url-layer input");n.val(""),e.find(".fr-files-embed-layer textarea").val("").trigger("change"),n.trigger("change")}function U(e){var n;t.hasOwnProperty("imageTUI")||(s="fr-disabled"),S.forEach((function(e,t){Y(t)})),B()?(n=t.popups.get("filesManager.insert"))||(n=je()):(n=t.popups.get("filesManager.insert"))||(n=function(){var e='<div class="fr-buttons fr-tabs">'.concat(t.button.buildList(t.opts.fileInsertButtons),"</div>"),n="<div style= 'padding:10px'>\n    <div class = 'fr-message'><h3 style ='font-size: 16px; margin: 10px 10px;font-weight: normal;'>".concat(t.language.translate(function(){var e="",n=function(){var e=[];return g.forEach((function(n){t.opts.pluginsEnabled.indexOf(n)<0&&e.push(n.charAt(0).toUpperCase()+n.slice(1))})),e}();return e=n.join(", "),1<n.length?e+=" plugin are":e+=" plugin is",e}()+" not enabled. Do you want to enable?"),"</h3></div>\n    <div style='text-align:right;'>\n      <button class='fr-trim-button fr-plugins-enable'>").concat(t.language.translate("Enable"),"</button>               \n      <button class='fr-trim-button fr-plugins-cancel'>").concat(t.language.translate("Cancel"),"</button>\n    </div>"),r={buttons:e,upload_layer:n,by_url_layer:"",embed_layer:"",upload_progress_layer:"",progress_bar:""},o=t.popups.create("filesManager.insert",r);return xe(o),o}());var r=t.$tb.find('.fr-command[data-cmd="insertFiles"]');if(Q(),e||!n.hasClass("fr-active"))if(e||X(),t.popups.refresh("filesManager.insert"),t.popups.setContainer("filesManager.insert",t.$tb),r.isVisible()){var o=t.button.getPosition(r,_.size),a=o.left,c=o.top;t.popups.show("filesManager.insert",a,c,r.outerHeight())}else t.position.forSelection(n),t.popups.show("filesManager.insert");t.popups.setPopupDimensions(n),B()&&t.popups.setFileListHeight(n),n.find(".fr-upload-progress")&&0==_.size&&n.find(".fr-upload-progress").addClass("fr-none")}function B(){var e=!0;return g.forEach((function(n){t.opts.pluginsEnabled.indexOf(n)<0&&(e=!1)})),e}function F(){Q()}function V(){if(c||function(){var e;if(t.shared.$image_resizer?(c=t.shared.$image_resizer,d=t.shared.$img_overlay,t.events.on("destroy",(function(){f("body").first().append(c.removeClass("fr-active"))}),!0)):(t.shared.$image_resizer=f(document.createElement("div")).attr("class","fr-image-resizer"),c=t.shared.$image_resizer,t.events.$on(c,"mousedown",(function(e){e.stopPropagation()}),!0),t.opts.imageResize&&(c.append(j("nw")+j("ne")+j("sw")+j("se")),t.shared.$img_overlay=f(document.createElement("div")).attr("class","fr-image-overlay"),d=t.shared.$img_overlay,e=c.get(0).ownerDocument,f(e).find("body").first().append(d))),t.events.on("shared.destroy",(function(){c.html("").removeData().remove(),c=null,t.opts.imageResize&&(d.remove(),d=null)}),!0),t.helpers.isMobile()||t.events.$on(f(t.o_win),"resize",(function(){n&&!n.hasClass("fr-uploading")?it(!0):n&&(V(),replace(),Z(!1))})),t.opts.imageResize){e=c.get(0).ownerDocument,t.events.$on(c,t._mousedown,".fr-handler",$),t.events.$on(f(e),t._mousemove,z),t.events.$on(f(e.defaultView||e.parentWindow),t._mouseup,W),t.events.$on(d,"mouseleave",W);var o=1,a=null,l=0;t.events.on("keydown",(function(e){if(n){var c=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,d=e.which;(d!==a||200<e.timeStamp-l)&&(o=1),(d==r.KEYCODE.EQUALS||t.browser.mozilla&&d==r.KEYCODE.FF_EQUALS)&&c&&!e.altKey?o=Ye.call(this,e,1,1,o):(d==r.KEYCODE.HYPHEN||t.browser.mozilla&&d==r.KEYCODE.FF_HYPHEN)&&c&&!e.altKey?o=Ye.call(this,e,2,-1,o):t.keys.ctrlKey(e)||d!=r.KEYCODE.ENTER||(n.before("<br>"),Se(n)),a=d,l=e.timeStamp}}),!0),t.events.on("keyup",(function(){o=1}))}}(),!n)return!1;var e=t.$wp||t.$sc;e.append(c),c.data("instance",t);var o=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),l=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);l-=t.helpers.getPX(e.css("border-left-width")),o-=t.helpers.getPX(e.css("border-top-width")),t.$el.is("img")&&t.$sc.is("body")&&(l=o=0);var h=lt();ut()&&(h=h.find(".fr-img-wrap"));var a=0,m=0;t.opts.iframe&&(a=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-top")),m=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-left"))),c.css("top",(t.opts.iframe?h.offset().top+a:h.offset().top+o)-1).css("left",(t.opts.iframe?h.offset().left+m:h.offset().left+l)-1).css("width",h.get(0).getBoundingClientRect().width).css("height",h.get(0).getBoundingClientRect().height).addClass("fr-active")}function j(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function H(e){ut()?n.parents(".fr-img-caption").css("width",e):n.css("width",e)}function $(e){if(!t.core.sameInstance(c))return!0;if(e.preventDefault(),e.stopPropagation(),t.$el.find("img.fr-error").left)return!1;t.undo.canDo()||t.undo.saveStep();var r=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var o=t.$oel.get(0).ownerDocument,h=o.defaultView||o.parentWindow,a=!1;try{a=h.location!=h.parent.location&&!(h.$&&h.$.FE)}catch(e){}a&&h.frameElement&&(r+=t.helpers.getPX(f(h.frameElement).offset().left)+h.frameElement.clientLeft)}(l=f(this)).data("start-x",r),l.data("start-width",n.width()),l.data("start-height",n.height());var m=n.width();if(t.opts.imageResizeWithPercent){var i=n.parentsUntil(t.$el,t.html.blockTagsQuery()).get(0)||t.el;m=(m/f(i).outerWidth()*100).toFixed(2)+"%"}H(m),d.show(),t.popups.hideAll(),at()}function z(e){if(!t.core.sameInstance(c))return!0;var r;if(l&&n){if(e.preventDefault(),t.$el.find("img.fr-error").left)return!1;var o=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!o)return!1;var d=o-l.data("start-x"),a=l.data("start-width");if((l.hasClass("fr-hnw")||l.hasClass("fr-hsw"))&&(d=0-d),t.opts.imageResizeWithPercent){var h=n.parentsUntil(t.$el,t.html.blockTagsQuery()).get(0)||t.el;a=((a+d)/f(h).outerWidth()*100).toFixed(2),t.opts.imageRoundPercent&&(a=Math.round(a)),H("".concat(a,"%")),(r=ut()?(t.helpers.getPX(n.parents(".fr-img-caption").css("width"))/f(h).outerWidth()*100).toFixed(2):(t.helpers.getPX(n.css("width"))/f(h).outerWidth()*100).toFixed(2))===a||t.opts.imageRoundPercent||H("".concat(r,"%")),n.css("height","").removeAttr("height")}else a+d>=t.opts.imageMinWidth&&(H(a+d),r=ut()?t.helpers.getPX(n.parents(".fr-img-caption").css("width")):t.helpers.getPX(n.css("width"))),r!==a+d&&H(r),((n.attr("style")||"").match(/(^height:)|(; *height:)/)||n.attr("height"))&&(n.css("height",l.data("start-height")*n.width()/l.data("start-width")),n.removeAttr("height"));V(),t.events.trigger("image.resize",[ct()])}}function W(e){if(!t.core.sameInstance(c))return!0;if(l&&n){if(e&&e.stopPropagation(),t.$el.find("img.fr-error").left)return!1;l=null,d.hide(),V(),t.undo.saveStep(),t.events.trigger("image.resizeEnd",[ct()])}else c.removeClass("fr-active")}function K(){S.forEach((function(e,n){var r=t.popups.get("filesManager.insert");r.find(".fr-checkbox-file-"+n).get(0).disabled=!0,document.getElementById("fr-file-autoplay-button-"+n)&&(document.getElementById("fr-file-autoplay-button-"+n).disabled=!0,document.getElementById("fr-file-autoplay-button-"+n).parentElement.classList.add("fr-checkbox-disabled"),document.getElementById("fr-file-autoplay-button-"+n).parentElement.classList.remove("fr-files-checkbox")),r.find(".fr-checkbox-"+n).get(0).classList.remove("fr-files-checkbox"),r.find(".fr-checkbox-"+n).get(0).classList.add("fr-checkbox-disabled")}))}function G(e,r,o,c){t.edit.on(),n&&n.addClass("fr-error"),P[e]?(e!=k&&e!=I&&e!=N||Ee(100,c,!0),S.set(c,P[e]),K(),S.forEach((function(e,n){t.popups.get("filesManager.insert"),document.getElementById("fr-file-edit-button-".concat(n))&&(document.getElementById("fr-file-edit-button-".concat(n)).classList.add("fr-disabled"),document.getElementById("fr-file-view-button-".concat(n)).classList.add("fr-disabled"),document.getElementById("fr-file-insert-button-".concat(n)).classList.add("fr-disabled"))})),te(t.language.translate(P[e]),c)):te(t.language.translate("Something went wrong. Please try again."),c),!n&&o&&Xe(o),t.events.trigger("filesManager.error",[{code:e,message:P[e]},r,o])}function q(){var e=t.popups.get("filesManager.insert"),n=e.find('.fr-command[data-cmd="insertAll"]'),r=e.find('.fr-command[data-cmd="deleteAll"]'),o=!0;w.forEach((function(e,t,n){w.get(t)&&(o=!1)})),o?n.addClass("fr-disabled"):n.removeClass("fr-disabled"),o?r.addClass("fr-disabled"):r.removeClass("fr-disabled")}function Y(e){y.get(e)&&y.get(e).link&&t.events.trigger("filesManager.removed",[y.get(e).link]);var n=t.popups.get("filesManager.insert");void 0!==n.find(".fr-file-"+e).get(0)&&(n.find(".fr-file-"+e).get(0).outerHTML=""),y.delete(e),_.delete(e),w.delete(e),q(),0==_.size&&(R=0),S.delete(e),t.popups.setPopupDimensions(n,!0),t.opts.toolbarBottom?U(!0):t.popups.setPopupDimensions(n),n.find(".fr-upload-progress")&&0==_.size&&n.find(".fr-upload-progress").addClass("fr-none")}function X(){for(var e=t.popups.get("filesManager.insert"),n=e.find(".fr-insert-checkbox"),r=0;r<n.length;r++)n.get(r).children.target.checked=!1,e.find(".fr-file-"+n.get(r).id.split("-").pop()).get(0).classList.add("fr-unchecked");if(o)document.getElementById("fr-file-autoplay-button-".concat(o))&&(document.getElementById("fr-file-autoplay-button-".concat(o)).checked=!1),A=A.filter((function(e){return e!=o}));else{for(var c=e.find(".fr-file-autoplay-button"),a=0;a<c.length;a++)c.get(a).checked=!1;A=[]}w=new Map,q()}function Z(e){var r=t.popups.get("filesManager.insert");if(r||(r=je()),r.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),r.find(".fr-files-progress-bar-layer").addClass("fr-active"),r.find(".fr-buttons").hide(),n){var o=lt();t.popups.setContainer("filesManager.insert",t.$sc);var c=o.offset().left,a=o.offset().top+o.height();t.popups.show("filesManager.insert",c,a,o.outerHeight())}void 0===e&&J(t.language.translate("Uploading"),0)}function Q(e){var r=t.popups.get("filesManager.insert");if(r&&(r.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),r.find(".fr-files-progress-bar-layer").removeClass("fr-active"),r.find(".fr-buttons").show(),e||t.$el.find("img.fr-error").length)){if(t.events.focus(),t.$el.find("img.fr-error").length&&(t.$el.find("img.fr-error").remove(),t.undo.saveStep(),t.undo.run(),t.undo.dropRedo()),!t.$wp&&n){var o=n;it(!0),t.selection.setAfter(o.get(0)),t.selection.restore()}t.popups.hide("filesManager.insert")}}function J(e,n){var r=t.popups.get("filesManager.insert");if(r){var o=r.find(".fr-files-progress-bar-layer");o.find("h3").text(e+(n?" ".concat(n,"%"):"")),o.removeClass("fr-error"),n?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width","".concat(n,"%"))):o.find("div").addClass("fr-indeterminate")}}function ee(e){Z();var n=t.popups.get("filesManager.insert").find(".fr-files-progress-bar-layer");n.addClass("fr-error");var r=n.find("h3");r.text(e),t.events.disableBlur(),r.focus()}function te(e,n){var r=t.popups.get("filesManager.insert"),o=r.find(".fr-upload-progress-layer"),a=r.find(".fr-file-".concat(n));o.addClass("fr-error"),a.find("h5").text(e)}P[O]="File cannot be loaded from the passed link.",P[I]="No link in upload response.",P[k]="Error during file upload.",P[N]="Parsing response failed.",P[L]="File is too large.",P[M]="File type is invalid.",P[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",P[8]="File is corrupted.",P[9]="Error during file loading.",P[x]="File upload cancelled";var ne,re,ie,oe,ae,se,ce,le,de,ue,he="";function fe(e){he=e,ne=document.getElementsByClassName(e),Array.prototype.map.call(ne,(function(e){!function(e){if(e.addEventListener("dragover",(function(e){e.preventDefault(),e.stopPropagation(),re=e.pageX,ie=e.pageY;var t=document.getElementById("filesList");ie+20>t.getBoundingClientRect().bottom&&pe(t,0,10),ie-20<t.getBoundingClientRect().top&&pe(t,0,-10)}),!1),t.helpers.isMobile()&&e.getElementsByClassName("dot")[0].addEventListener("touchmove",(function(e){e.preventDefault(),e.stopPropagation();for(var t=e.target;t&&!t.classList.contains(he);)t=t.parentElement;for(var n=document.elementFromPoint(e.targetTouches[0].clientX,e.targetTouches[0].clientY);n&&!n.classList.contains(he);)n=n.parentElement;var r=document.getElementsByClassName("fr-hovered-over-file");Array.prototype.forEach.call(r,(function(e){e.classList.remove("fr-hovered-over-file")})),n&&!t.classList.contains("fr-unchecked")&&n.classList.add("fr-hovered-over-file");var a=document.getElementById("filesList");e.targetTouches[0].clientY+5>a.getBoundingClientRect().bottom&&pe(a,0,5),e.targetTouches[0].clientY-5<a.getBoundingClientRect().top&&pe(a,0,-5)}),!1),e.ondrag=ge,e.ondragend=me,t.helpers.isMobile()){var n=e.getElementsByClassName("dot");n[0].addEventListener("touchmove",ge,!1),n[0].addEventListener("touchend",me,!1)}}(e)}))}function pe(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function ge(e){for(t.helpers.isMobile()&&(ae=event.touches[0].clientX,se=event.touches[0].clientY),oe=e.target;!oe.classList.contains(he);)oe=oe.parentElement;oe.classList.contains(he)&&!oe.classList.contains("fr-unchecked")?t.helpers.isMobile()&&oe.classList.add("drag-sort-active"):oe=void 0}function me(e){var n;if(void 0!==oe){var r,o;if(t.helpers.isMobile())for(r=ae,o=se,n=event.target;!n.classList.contains(he);)n=n.parentElement;else r=event.clientX,o=event.clientY;t.helpers.isMobile()||!t.browser.safari&&!t.browser.mozilla||(r=re,o=ie);for(var a=document.elementFromPoint(r,o);a&&!a.classList.contains(he);)a=a.parentElement;a&&!a.classList.contains(he)?a=void 0:a&&oe!==a&&function(e,t){var n,r,a=e.parentNode,o=t.parentNode;if(a&&o&&!a.isEqualNode(t)&&!o.isEqualNode(e)){for(var i=0;i<a.children.length;i++)a.children[i].isEqualNode(e)&&(n=i);for(i=0;i<o.children.length;i++)o.children[i].isEqualNode(t)&&(r=i);a.isEqualNode(o)&&n<r&&r++,a.insertBefore(t,a.children[n]),o.insertBefore(e,o.children[r])}}(oe,a),t.helpers.isMobile()&&(n.classList.remove("fr-hovered-over-file"),a.classList.remove("fr-hovered-over-file"))}}function ve(e){var n=t.popups.get("filesManager.insert");n.find(".fr-upload-progress-layer").hasClass("fr-active")||n.find(".fr-upload-progress-layer").addClass("fr-active"),n.find(".fr-upload-progress").removeClass("fr-none");var r=_.get(e),o=function(e){var n,r={weekday:"long",year:"numeric",month:"long",day:"numeric"};try{n=e.toLocaleDateString(t.opts.language?t.opts.language:void 0,r)}catch(t){n=e.toLocaleDateString(void 0,r)}return n+""}(new Date),a=w.get(e)?"":"fr-unchecked ",c="\n        <div id='fr-file-".concat(e,"' class='fr-file-list-item fr-file-").concat(e," ").concat(a,"' draggable = \"").concat(!a,'" >\n        <div class=\'fr-file-item-left\' >\n\n    \n            <div class="fr-file-item-insert-checkbox fr-files-checkbox-line">\n            ').concat(t.helpers.isMobile()?"<div id='fr-pick-".concat(e,"}' class='dot'>\n            </div>"):"",'\n            <div id="checkbox-key-').concat(e,'" class="fr-files-checkbox fr-insert-checkbox  fr-checkbox-').concat(e,'">\n            <input name="target" class="fr-insert-attr fr-checkbox-file-').concat(e,' fr-file-insert-check" data-cmd="fileInsertCheckbox"\n             data-checked="_blank" type="checkbox" id="fr-link-target-').concat(t.id,'" tabIndex="0" />\n            <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','\n            </span>\n        </div>\n                <label id="fr-label-target-').concat(t.id,"\"></label>\n            </div>\n    \n            <div class='fr-file-item-icon fr-file-item-icon-").concat(e,"' >\n                <img src='https://secure.webtoolhub.com/static/resources/icons/set112/f2afb6f7.png' alt='Image preview' class='thumbnail-padding' height='36px' width='36px' />\n            </div>\n\n            <div class='fr-file-item-description' >\n                <div class='fr-file-name fr-files-manager-tooltip'>\n                   ").concat(function(e,t,n){return null==t&&(t=100),null==n&&(n="..."),e.length>t?e.substring(0,t-n.length)+n:e}(r.name,20),'\n                      <span class="').concat(20<r.name.length?"tooltiptext":"fr-none",'">').concat(r.name,"\n                      </span>\n                 </div>\n                 <div class='fr-file-details'>\n                 <div class='fr-file-date'>").concat(o,"\n                 </div>\n \n                 <div class='fr-file-size'>\n                     ").concat(function(e){if(0==e)return"0 Bytes";var t=Math.floor(Math.log(e)/Math.log(1024));return" | "+1*(e/Math.pow(1024,t)).toFixed(2)+" "+["Bytes","KB","MB","GB","TB"][t]}(r.size),"\n                 </div>\n                 </div>\n\n                  <div class='fr-file-error'>\n                    <h5 class='fr-file-error-h5'></h5>\n                 </div>\n             </div>\n    \n        </div>\n\n        <div class='fr-file-item-right fr-file-item-right-").concat(e,"'>")+ye(e)+"</div>\n    </div>";n.find(".fr-upload-progress-layer")[0].innerHTML=c+n.find(".fr-upload-progress-layer")[0].innerHTML,_.forEach((function(e,t,r){w.get(t)&&n.find("input.fr-insert-attr.fr-checkbox-file-".concat(t))[0].setAttribute("checked",null)})),A.forEach((function(e){document.getElementById("fr-file-autoplay-button-"+e).checked=!0})),_e(e,r),Q(),t.opts.toolbarBottom?U(!0):t.popups.setPopupDimensions(n),fe("fr-file-list-item")}function be(e){switch(e){case"application/msword":return t.icon.getFileIcon("docIcon");case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return t.icon.getFileIcon("docxIcon");case"image/gif":return t.icon.getFileIcon("gifIcon");case"image/jpeg":return t.icon.getFileIcon("jpegIcon");case"image/jpeg":return t.icon.getFileIcon("jpgIcon");case"type/text":return t.icon.getFileIcon("logIcon");case"video/quicktime":return t.icon.getFileIcon("movIcon");case"audio/mp3":case"audio/mpeg":return t.icon.getFileIcon("mp3Icon");case"video/mp4":return t.icon.getFileIcon("mp4Icon");case"audio/ogg":return t.icon.getFileIcon("oggIcon");case"video/ogg":return t.icon.getFileIcon("ogvIcon");case"application/pdf":return t.icon.getFileIcon("pdfIcon");case"image/png":return t.icon.getFileIcon("pngIcon");case"text/plain":return t.icon.getFileIcon("txtIcon");case"video/webm":return t.icon.getFileIcon("webmIcon");case"image/webp":return t.icon.getFileIcon("webpIcon");case"video/x-ms-wmv":return t.icon.getFileIcon("wmvIcon");case"application/vnd.ms-excel":return t.icon.getFileIcon("xlsIcon");case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return t.icon.getFileIcon("xlsxIcon");case"application/x-zip-compressed":case"application/zip":return t.icon.getFileIcon("zipIcon");default:return t.icon.getFileIcon("defaultIcon")}}function _e(e,a,n){var r=t.popups.get("filesManager.insert"),o=r.find(".fr-file-item-icon-"+e).get(0);if(Pe(Ie(a))&&"image/gif"!=Ie(a)&&"image/webp"!=Ie(a)){"a"!=o.children[0].localName&&(o.innerHTML="<a target='_blank' href=''>"+o.innerHTML+"</a>"),r.find(".fr-file-item-icon-"+e).get(0).children[0].children[0];var i=new FileReader;if(null!=n&&n){var c=_.get(e);a.name=c.name,_.set(e,a)}if(i.onloadend=function(){r.find(".fr-file-item-icon-"+e).get(0).children[0].children[0].src=i.result;for(var t=atob(i.result.split(",")[1]),n=[],o=0;o<t.length;o++)n.push(t.charCodeAt(o));r.find(".fr-file-item-icon-"+e).get(0).children[0].href=window.URL.createObjectURL(new Blob([new Uint8Array(n)],{type:Ie(a)})),r.find(".fr-file-item-icon-"+e).get(0).classList.add("file-item-thumbnail-hover")},a)i.readAsDataURL(a);else{var s=be(Ie(a));o.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 5" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n        '.concat(s.path,"\n        </svg>")}}else{var l=be(Ie(a));o.innerHTML='<svg height="40px" width="40px" viewBox="0 0 55 55" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n      '.concat(l.path,"\n      </svg>")}}function ye(e){var n="";if(Be(Ie(_.get(e)))){var r="fr-files-checkbox",o="";Ve(Ie(_.get(e)))||(r="fr-checkbox-disabled",o="disabled"),n='\n      <div class="fr-files-checkbox-line align-autoplay">\n      <div id="checkbox-key-'.concat(e,'" class="').concat(r," fr-autoplay-checkbox  fr-checkbox-").concat(e,'">  \n                   \n      <input type="checkbox" id="fr-file-autoplay-button-').concat(e,'" class="fr-file-button-').concat(e,' fr-file-autoplay-button" data-title="Edit" data-param1="').concat(e,'" role="button" ').concat(o,"/>\n\n      <span>").concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>'," </span>\n      </div>      \n      <label  class='fr-autoplay-checkbox-label'>Autoplay </label>\n      </div>")}var a="application/msword",c="application/vnd.openxmlformats-officedocument.wordprocessingml.document",i="";return!Fe(Ie(_.get(e)))&&Ve(Ie(_.get(e)))||(s="fr-disabled"),Be(Ie(_.get(e)))&&(s="fr-disabled"),Ue(Ie(_.get(e)))&&(s="fr-disabled",Ie(_.get(e))!=a&&Ie(_.get(e))!=c||t.opts.googleOptions&&!t.helpers.isMobile()&&t.opts.googleOptions.API_KEY&&t.opts.googleOptions.CLIENT_ID&&(s=""),"text/plain"!=Ie(_.get(e))&&Ie(_.get(e))!=a&&"application/pdf"!=Ie(_.get(e))&&Ie(_.get(e))!=c&&"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"!=Ie(_.get(e))&&"application/vnd.ms-excel"!=Ie(_.get(e))&&"type/text"!=Ie(_.get(e))||(i="")),"video/url"===Ie(_.get(e))&&(s="fr-disabled"),n+'<div class=\'fr-file-item-action-buttons\' >\n                <button type="button" id="fr-file-insert-button-'.concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n                fr-file-button-").concat(e," fr-file-insert-button-").concat(e,' fr-file-insert-button" data-cmd="imageInsertByUpload" data-title="Insert" data-param1="').concat(e,'" tabIndex="2" role="button">\n                <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-5 0 28 28" xlmns = "http://w3.org/200/svg"><path d = \'M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 \'></path></svg>\n                </button>\n\n                <button type="button" id="fr-file-edit-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(s," fr-img-icon fr-btn fr-command fr-submit \n                fr-file-action-icons fr-file-edit-button-").concat(e," fr-file-button-").concat(e,' fr-file-edit-button" data-cmd="editImage" data-title="Edit" data-param1="').concat(e,'" role="button">\n                <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "0 4 25 25" xlmns = "http://w3.org/200/svg"><path d = \'M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0  c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z\'></path></svg>\n                </button>\n                \n                <span class="fr-file-view-').concat(e,'"><button type="button" id="fr-file-view-button-').concat(e,'" class=" fr-doc-edit-').concat(e," ").concat(i," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n                fr-file-view-button-").concat(e,' fr-file-view-button" data-cmd="viewImage" data-title="View" data-param1="').concat(e,'" tabIndex="2" role="button">\n                <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "15 19 21 21" xlmns = "http://w3.org/200/svg"> <path style="fill:none;stroke-width:0.9077;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(0%,0%,0%);stroke-opacity:1;stroke-miterlimit:10;" d="M 19.086094 16.541466 C 16.185625 16.541466 14.318281 19.447115 14.318281 19.447115 L 14.318281 19.555288 C 14.318281 19.555288 16.176719 22.475962 19.077187 22.475962 C 21.977656 22.475962 23.847969 19.576322 23.847969 19.576322 L 23.847969 19.465144 C 23.847969 19.465144 21.989531 16.541466 19.086094 16.541466 Z M 19.07125 21.024639 C 18.248906 21.024639 17.583906 20.357572 17.583906 19.53726 C 17.583906 18.716947 18.248906 18.04988 19.07125 18.04988 C 19.890625 18.04988 20.555625 18.716947 20.555625 19.53726 C 20.555625 20.357572 19.890625 21.024639 19.07125 21.024639 Z M 19.07125 21.024639 " transform="matrix(1.315789,0,0,1.3,0,0)"/></svg></button></span>\n\n                <button type="button" id="fr-file-delete-button-').concat(e,'" class=" fr-doc-edit-').concat(e," fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons\n                fr-file-button-").concat(e,' fr-file-delete-button" data-cmd="deleteImage" data-title="Delete" data-param1="').concat(e,'" role="button">\n                <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n                </button>\n                 \n            </div>\n            <div id="user_area-').concat(e,"\" style=\"display: none;\">\n            \n              <div id=\"file_container\"></div>\n\n              <div style='display:block;text-align: center; margin-left:50%; id='edit-file-loader' class='fr-file-loader'></div>\n\n          </div> \n            ")}function Ee(e,n,r){var o=t.popups.get("filesManager.insert");if(!r&&e<=100){o.find(".fr-checkbox-file-"+n).get(0).disabled=!0,o.find(".fr-checkbox-"+n).get(0).classList.remove("fr-files-checkbox"),o.find(".fr-checkbox-"+n).get(0).classList.add("fr-checkbox-disabled");var a=o.find(".fr-file-progress-circle-"+n),c=o.find(".fr-file-upload-percent-"+n);return 50<e?a.get(0).setAttribute("class","fr-file-progress-circle-"+n+" progress-circle p"+Math.floor(e)+" over50"):a.get(0).setAttribute("class","fr-file-progress-circle-"+n+" progress-circle p"+Math.floor(e)),c.get(0).innerHTML=Math.floor(e)+"%",void Ce(n,e,r)}r&&(o.find(".fr-checkbox-file-"+n).get(0).disabled=!1,o.find(".fr-checkbox-"+n).get(0).classList.remove("fr-checkbox-disabled"),o.find(".fr-checkbox-"+n).get(0).classList.add("fr-files-checkbox"),o.find(".fr-file-item-right-"+n).get(0).innerHTML=ye(n),Ce(n,100,r))}function Ce(e,n,r){var o=t.popups.get("filesManager.insert");o.find(".fr-progress-bar").removeClass("fr-none").addClass("fr-display-block"),o.find(".fr-upload-progress").hasClass("fr-height-set")&&t.popups.setFileListHeight(o);var a=0;C.set(e,n),C.forEach((function(e,t){a+=e})),a/=C.size,100==n&&r&&T++,o.find('.fr-command[data-cmd="filesUpload"]').addClass("fr-disabled"),o.find('.fr-command[data-cmd="filesByURL"]').addClass("fr-disabled"),o.find('.fr-command[data-cmd="filesEmbed"]').addClass("fr-disabled"),o.find(".fr-progress-bar").get(0).style.width=a+"%",T==C.size&&(o.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),C=new Map,T=0,o.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),o.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),o.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"))}function we(e,r){Q(),t.popups.get("filesManager.insert").find(".fr-upload-progress-layer").addClass("fr-active"),e.forEach((function(o,c){Pe(Ie(o))&&t.opts.imageUploadRemoteUrls&&t.opts.imageCORSProxy&&t.opts.imageUpload?Me(o,e,n,r[c]):y.set(r[c],o)}))}function Se(e){e&&e.get&&function(e){if("false"==f(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&ue)return!0;if(e&&t.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var o=0;o<r.INSTANCES.length;o++)r.INSTANCES[o]!=t&&r.INSTANCES[o].events.trigger("image.hideResizer");t.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),t.helpers.isMobile()&&(t.events.disableBlur(),t.$el.blur(),t.events.enableBlur()),t.opts.iframe&&t.size.syncIframe(),n=f(this),V(),t.browser.msie?(t.popups.areVisible()&&t.events.disableBlur(),t.win.getSelection&&(t.win.getSelection().removeAllRanges(),t.win.getSelection().addRange(t.doc.createRange()))):t.selection.clear(),t.helpers.isIOS()&&(t.events.disableBlur(),t.$el.blur()),t.button.bulkRefresh(),t.events.trigger("video.hideResizer")}.call(e.get(0))}function Te(){var e=f(this);e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),(0==a.length||0<a.length&&a.length==u)&&(h=e),"VIDEO"==e.get(0).tagName||"AUDIO"==e.get(0).tagName?t.selection.setAfter(e.parent()):t.selection.setAfter(e),t.undo.saveStep(),t.events.trigger("filesManager.loaded",[e]),Re(a)}function Ae(){var e,n=Array.prototype.slice.call(t.el.querySelectorAll("video, .fr-video > *")),r=[];for(e=0;e<n.length;e++)r.push(n[e].getAttribute("src")),f(n[e]).toggleClass("fr-draggable",t.opts.videoMove),""===n[e].getAttribute("class")&&n[e].removeAttribute("class"),""===n[e].getAttribute("style")&&n[e].removeAttribute("style");if(ce)for(e=0;e<ce.length;e++)r.indexOf(ce[e].getAttribute("src"))<0&&t.events.trigger("video.removed",[f(ce[e])]);ce=n}function Re(e){if(null!=e){if(0==e.length)return void(null!=h&&("VIDEO"==h.get(0).tagName?t.video._editVideo(h.parent()):"IMG"==h.get(0).tagName?t.image.edit(h):h.trigger("click"),t.toolbar.disable()));ke(e.shift(),e)}}function Oe(e){var r=!1;if(Be(Ie(y.get(e))))t.trimVideoPlugin.trimVideo(_.get(e),e,_),r=!0;else if(Pe(Ie(y.get(e)))){var o=y.get(e).link,c=t.o_doc.createElement("img");c.src=o,n=c,i=e,t.imageTUI.launch(t,!1,e),r=!0}else if(Ue(Ie(y.get(e)))){var a={apiKey:t.opts.googleOptions.API_KEY,clientId:t.opts.googleOptions.CLIENT_ID,authorizeButton:"authorize_button-".concat(e),signoutButton:"signout_button",userArea:"user_area-".concat(e),fileInput:"file_input",fileIndex:e,file:_.get(e),fileContainer:"file_container",loadingText:"File is being uploaded...",events:{onInvalidFile:function(e){},onError:function(e){}}};de=function(p){var e,r=["https://www.googleapis.com/discovery/v1/apis/drive/v2/rest"],u="id,title,mimeType,userPermission,editable,copyable,shared,fileSize",o="-------314159265358979323846",g="\r\n--"+o+"\r\n",c="\r\n--"+o+"--",l=(document.getElementById(p.authorizeButton),document.getElementById(p.userArea));function d(){gapi.client.init({apiKey:p.apiKey,clientId:p.clientId,discoveryDocs:r,scope:"https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.file https://www.googleapis.com/auth/drive.appdata"}).then((function(){gapi.auth2.getAuthInstance().isSignedIn.listen(h),h(gapi.auth2.getAuthInstance().isSignedIn.get()),!gapi.auth2.getAuthInstance().isSignedIn.get()||void 0!==gapi.auth.getToken()&&void 0===gapi.auth.getToken().access_token?Promise.resolve(gapi.auth2.getAuthInstance().signIn()).then((function(){i()})):i()}),(function(e){p.events.onError(e)}))}function h(e){e&&(l.style.display="block")}function a(r){var o=gapi.auth.getToken().access_token,c="https://docs.google.com/feeds/download/documents/export/Export?id="+e+"&format=docx&access_token="+o,a=new XMLHttpRequest;a.open("get",c),a.responseType="arraybuffer",a.onload=function(){var e=new Blob([new Uint8Array(this.response)],{type:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"}),r=_.get(p.fileIndex);e.name=r.name,e.lastModified=r.lastModified,e.lastModifiedDate=r.lastModifiedDate,_.set(p.fileIndex,e),t.filesManager.upload(e,y,n,p.fileIndex),f()},a.send()}function i(e){!function(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),n=0;n<t.length;n++)t[n].setAttribute("disabled",!0),t[n].classList.add("fr-disabled")}(p.fileIndex);var t=p.file;t?function(e,t){var n=new FileReader;n.readAsArrayBuffer(e),n.onload=function(r){for(var l={title:e.name,mimeType:"application/vnd.google-apps.document"},d="",h=new Uint8Array(n.result),a=h.byteLength,f=0;f<a;f++)d+=String.fromCharCode(h[f]);var i=btoa(d),s=g+"Content-Type: application/json; charset=UTF-8\r\n\r\n"+JSON.stringify(l)+g+"Content-Type: application/octet-stream\r\nContent-Transfer-Encoding: base64\r\n\r\n"+i+c,m=gapi.client.request({path:"/upload/drive/v2/files",method:"POST",params:{uploadType:"multipart",fields:u},headers:{"Content-Type":'multipart/related; boundary="'+o+'"',"Content-Length":s.Length},body:s});t||(t=function(e){}),m.execute((function(e,n){e.error?p.events.onError(e.error):t(e)}))}}(t,s):p.events.onInvalidFile("File is not selected")}function s(n){e=n.id;var r="https://docs.google.com/document/d/"+n.id+"/edit",o=t.o_doc.body,c=t.o_doc.createElement("div");c.setAttribute("id","editDocContainer"),c.style.cssText="position: fixed; top: 0;left: 0;padding: 0;width: 100%;height: 100%;background: rgba(255,255,255,1);z-index: 9998;display:block",c.innerHTML='<div style="margin-top:25px; text-align:center"><label>Sign Out : </label><input type="checkbox" id ="markSignOut" role="button"/>  <button id="signout_button"  class="fr-trim-button" >Save </button> <button id="cancel_file_edit" class="fr-trim-button">Cancel</button></div>  <iframe title="Edit your file" frameBorder="0" width="100%" height="700px" src="'+r+'"></iframe>',o.appendChild(c),document.getElementById("signout_button").onclick=a,document.getElementById("cancel_file_edit").onclick=f}function f(){document.getElementById("markSignOut").checked&&gapi.auth2.getAuthInstance().signOut().then((function(){gapi.auth.getToken()&&(gapi.auth.getToken().access_token=void 0)}));var e=document.getElementById("editDocContainer");e.parentNode.removeChild(e),document.getElementById("user_area-".concat(p.fileIndex))&&(document.getElementById("user_area-".concat(p.fileIndex)).style.display="none"),function(e){for(var t=document.getElementsByClassName("fr-doc-edit-".concat(e)),n=0;n<t.length;n++)t[n].removeAttribute("disabled"),t[n].classList.remove("fr-disabled")}(p.fileIndex)}p.events||(p.events={}),p.events.onInvalidFile=p.events.onInvalidFile||function(e){},p.events.onError=p.events.onError||function(e){};var m={handleClientLoad:function(){gapi.load("client:auth2",d)}};return m}(a),function(e,t){var n=function(e,t){var n=document.createElement("script");n.src=e,n.onload=function(){this.onload=function(){},de.handleClientLoad()},n.onreadystatechange=function(){"complete"===this.readyState&&this.onload()},(document.getElementsByTagName("head")[0]||document.body).appendChild(n)};!function r(){0!=e.length?n(e.shift(),r):t&&t()}()}(["https://apis.google.com/js/api.js"],(function(){}))}r&&(p=!0)}function Ie(e){var t;if(""!=e.type)return e.type;if(e.name&&e.name.endsWith(".msg"))return t="application/vnd.ms-outlook";var n=/(?:\.([^.]+))?$/.exec(e.name)[1];return[[".doc","application/msword"],[".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],[".gif","image/gif"],[".jpeg","image/jpeg"],[".jpg","image/jpeg"],[".txt","text/plain"],[".log","type/text"],[".mov","video/quicktime"],[".mp3","audio/mpeg"],[".mp4","video/mp4"],[".ogg","audio/ogg"],[".ogv","video/ogg"],[".pdf","application/pdf"],[".png","image/png"],[".webm","video/webm"],[".webp","image/webp"],[".wmv","video/x-ms-wmv"],[".xls","application/vnd.ms-excel"],[".xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],[".zip","application/x-zip-compressed"]].forEach((function(e,r){e[0]==".".concat(n)&&(t=e[1])})),t}function ke(s,e){if(Ue(Ie(y.get(s)))||!Ve(Ie(y.get(s)))){var n=y.get(s).link,r=y.get(s).text;!r&&_.get(s)&&_.get(s).name&&(r=_.get(s).name);var c=y.get(s).response;t.edit.on(),t.events.focus(!0),t.selection.restore(),t.opts.fileUseSelectedText&&t.selection.text().length&&(r=t.selection.text()),t.html.insert('<a href="'.concat(n,'" target="_blank" id="fr-inserted-file" class="fr-file">').concat(r,"</a>"));var a=t.$el.find("#fr-inserted-file");a.removeAttr("id"),t.undo.saveStep(),function(){var e,n=Array.prototype.slice.call(t.el.querySelectorAll("a.fr-file")),r=[];for(e=0;e<n.length;e++)r.push(n[e].getAttribute("href"));if(le)for(e=0;e<le.length;e++)r.indexOf(le[e].getAttribute("href"))<0&&t.events.trigger("file.unlink",[le[e]]);le=n}(),t.selection.clear(),t.selection.setAfter(a),t.events.trigger("file.inserted",[a,c]),Re(e)}if(Pe(Ie(y.get(s)))&&Ve(Ie(y.get(s)))){var i=y.get(s).link,l=y.get(s).sanitize,d=y.get(s).data,h=y.get(s).$existing_img,m=y.get(s).response;h&&"string"==typeof h&&(h=t.$(h)),t.edit.off(),J(t.language.translate("Loading image")),l&&(i=t.helpers.sanitizeURL(i));var v=new Image;v.onload=function(){var e,n;if(h){t.undo.canDo()||h.hasClass("fr-uploading")||t.undo.saveStep();var r=h.data("fr-old-src");h.data("fr-image-pasted")&&(r=null),t.$wp?((e=h.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),r&&h.attr("src",r),h.replaceWith(e)):e=h;for(var o=e.get(0).attributes,a=0;a<o.length;a++){var c=o[a];0===c.nodeName.indexOf("data-")&&e.removeAttr(c.nodeName)}if(void 0!==d)for(n in d)d.hasOwnProperty(n)&&"link"!=n&&e.attr("data-".concat(n),d[n]);e.on("load",Te),e.attr("src",i),t.edit.on(),t.undo.saveStep(),t.events.disableBlur(),t.$el.blur(),t.events.trigger(r?"image.replaced":"image.inserted",[e,m])}else e=function(e,n,r){var o,a=f(document.createElement("img")).attr("src",e);if(n&&void 0!==n)for(o in n)n.hasOwnProperty(o)&&"link"!=o&&(" data-".concat(o,'="').concat(n[o],'"'),a.attr("data-".concat(o),n[o]));var c=t.opts.imageDefaultWidth;c&&"auto"!=c&&(c=t.opts.imageResizeWithPercent?"100%":"".concat(c,"px")),a.attr("style",c?"width: ".concat(c,";"):""),st(a,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),a.on("load",r),a.on("error",r),t.edit.on(),t.events.focus(!0),t.selection.restore(),t.undo.saveStep(),t.opts.imageSplitHTML?t.markers.split():t.markers.insert(),t.html.wrap();var i=t.$el.find(".fr-marker");return i.length?(i.parent().is("hr")&&i.parent().after(i),t.node.isLastSibling(i)&&i.parent().hasClass("fr-deletable")&&i.insertAfter(i.parent()),i.replaceWith(a)):t.$el.append(a),a}(i,d,Te),t.undo.saveStep(),t.events.disableBlur(),t.$el.blur(),t.events.trigger("image.inserted",[e,m])},v.onerror=function(){G(O,null,null,s),Re(e)},v.src=i}if((Be(Ie(y.get(s)))||Fe(Ie(y.get(s))))&&Ve(Ie(y.get(s))))if(o=s,"video/url"==Ie(y.get(s))){var p=!1;if(void 0!==document.getElementById("fr-file-autoplay-button-"+s)&&(p=document.getElementById("fr-file-autoplay-button-"+s).checked),p&&void 0!==y.get(s)&&-1<y.get(s).video.indexOf("iframe")&&y.get(s).video.indexOf("autoplay=1")<0){var u=y.get(s).video.substring(y.get(s).video.indexOf("src")+3),E="&";(u=(u=u.substring(u.indexOf('"')+1)).substring(0,u.indexOf('"'))).indexOf("?")<0&&(E="?"),y.get(s).video=y.get(s).video.replace(u,u+=E+"autoplay=1&mute=1")}else!p&&y.get(s).video.indexOf(!1)&&(-1<y.get(s).video.indexOf("&autoplay=1")&&(y.get(s).video=y.get(s).video.replace("&autoplay=1","")),-1<y.get(s).video.indexOf("?autoplay=1")&&(y.get(s).video=y.get(s).video.replace("?autoplay=1","")));t.events.focus(!0),t.selection.restore(),t.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(y.get(s).video,"</span>"),!1,t.opts.videoSplitHTML),t.popups.hide("filesManager.insert");var g=t.$el.find(".fr-jiv");g.removeClass("fr-jiv"),g.toggleClass("fr-rv",t.opts.videoResponsive),function(e,n,r){!t.opts.htmlUntouched&&t.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(r[0]," fr-dv").concat(n[0]))):"inline"==n?(e.css({display:"inline-block"}),"center"==r?e.css({float:"none"}):"left"==r?e.css({float:"left"}):e.css({float:"right"})):(e.css({display:"block",clear:"both"}),"left"==r?e.css({textAlign:"left"}):"right"==r?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(g,t.opts.videoDefaultDisplay,t.opts.videoDefaultAlign),g.toggleClass("fr-draggable",t.opts.videoMove),t.events.trigger("video.inserted",[g]),Te.call(g)}else{var C=y.get(s).link,S=y.get(s).sanitize,b=y.get(s).data,T=y.get(s).$existing_img,R=y.get(s).response;t.edit.off(),S&&(C=t.helpers.sanitizeURL(C)),function(){var e,n;if(T){t.undo.canDo()||T.find("video").hasClass("fr-uploading")||t.undo.saveStep();var r=T.find("video").data("fr-old-src"),o=T.data("fr-replaced");T.data("fr-replaced",!1),t.$wp?((e=T.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),e.find("video").off("canplay"),r&&T.find("video").attr("src",r),T.replaceWith(e)):e=T;for(var a=e.find("video").get(0).attributes,c=0;c<a.length;c++){var i=a[c];0===i.nodeName.indexOf("data-")&&e.find("video").removeAttr(i.nodeName)}if(void 0!==b)for(n in b)b.hasOwnProperty(n)&&"link"!=n&&e.find("video").attr("data-".concat(n),b[n]);e.find("video").on("canplay",Te),e.find("video").attr("src",C),t.edit.on(),Ae(),t.undo.saveStep(),t.$el.blur(),t.events.trigger(o?"video.replaced":"video.inserted",[e,R])}else e=function(e,n,r,o,a){var c,i="";if(n&&void 0!==n)for(c in n)n.hasOwnProperty(c)&&"link"!=c&&(i+=" data-".concat(c,'="').concat(n[c],'"'));var s,l=t.opts.videoDefaultWidth;if(l&&"auto"!=l&&(l="".concat(l,"px")),Fe(o))s=f(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+t.opts.videoDefaultDisplay[0]+("center"!=t.opts.videoDefaultAlign?" fr-fv"+t.opts.videoDefaultAlign[0]:"")).html('<audio src="'+e+'" '+i+" controls>"+t.language.translate("Your browser does not support HTML5 video.")+"</audio>");else{var d="";document.getElementById("fr-file-autoplay-button-"+a).checked&&(d="autoplay"),s=f(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+t.opts.videoDefaultDisplay[0]+("center"!=t.opts.videoDefaultAlign?" fr-fv"+t.opts.videoDefaultAlign[0]:"")).html('<video src="'+e+'" '+i+(l?' style="width: '+l+';" ':"")+d+"  controls>"+t.language.translate("Your browser does not support HTML5 video.")+"</video>")}s.toggleClass("fr-draggable",t.opts.videoMove),t.edit.on(),t.events.focus(!0),t.selection.restore(),t.undo.saveStep(),t.opts.videoSplitHTML?t.markers.split():t.markers.insert(),t.html.wrap();var h=t.$el.find(".fr-marker");t.node.isLastSibling(h)&&h.parent().hasClass("fr-deletable")&&h.insertAfter(h.parent()),h.replaceWith(s);var p="";return p=Fe(o)?"audio":"video",s.find(p).get(0).readyState>s.find(p).get(0).HAVE_FUTURE_DATA||t.helpers.isIOS()?r.call(s.find(p).get(0)):(s.find(p).on("canplaythrough load",r),s.find(p).on("error",r)),s}(C,b,Te,Ie(y.get(s)),s),Ae(),t.undo.saveStep(),t.events.trigger("video.inserted",[e,R])}()}t.popups.hide("filesManager.insert"),w.delete(s);var I=t.popups.get("filesManager.insert");I.find("input.fr-insert-attr.fr-checkbox-file-".concat(s))[0].checked=!1,I.find(".fr-file-"+s).get(0).classList.add("fr-unchecked"),q(),document.getElementById("fr-file-autoplay-button-"+s)&&(document.getElementById("fr-file-autoplay-button-"+s).checked=!1),A=A.filter((function(e){return e!=s}))}function Ne(e,n){try{if(!1===t.events.trigger("filesManager.uploaded",[e],!0))return t.edit.on(),!1;var r=JSON.parse(e);return r.link?r:(G(I,e,null,n),!1)}catch(t){return G(N,e,null,n),!1}}function Le(e,n){try{var r=f(e).find("Location").text(),o=f(e).find("Key").text();return!1===t.events.trigger("filesManager.uploadedToS3",[r,o,e],!0)?(t.edit.on(),!1):r}catch(t){return G(N,e,null,n),!1}}function Me(e,r,o,c){if(-1<D.indexOf(Ie(e))||!Ie(e))return G(M,null,null,c),!1;if(!1===t.events.trigger("filesManager.beforeUpload",[r]))return!1;if(!(null!==t.opts.filesManagerUploadURL&&t.opts.filesManagerUploadURL!=m||t.opts.filesManagerUploadToS3||t.opts.filesManagerUploadToAzure))return function(s,e,t){var n=new FileReader;n.onload=function(){var r=n.result;if(n.result.indexOf("svg+xml")<0){for(var o=atob(n.result.split(",")[1]),c=[],l=0;l<o.length;l++)c.push(o.charCodeAt(l));if(r=window.URL.createObjectURL(new Blob([new Uint8Array(c)],{type:Ie(e)})),Pe(Ie(e))){var a={link:r,sanitize:!1,data:null,$existing_img:t,response:null,type:Ie(e)};y.set(s,a)}if(Ue(Ie(e))){var d={link:r,text:e.name,response:null,type:Ie(e)};y.set(s,d)}if(Be(Ie(e))||Fe(Ie(e))){var i={link:r,sanitize:!1,data:null,$existing_img:t,type:Ie(e)};y.set(s,i)}}},n.readAsDataURL(e)}(c,e),!1;if(Pe(Ie(e))&&(e.name||(e.name=(new Date).getTime()+"."+(Ie(e)||"image/jpeg").replace(/image\//g,""))),e.size>t.opts.filesManagerMaxSize)return G(L,null,null,c),!1;if(t.opts.filesManagerAllowedTypes.indexOf("*")<0&&t.opts.filesManagerAllowedTypes.indexOf(Ie(e))<0)return G(M,null,null,c),!1;var a;if(function(e){isNaN(e)||(t.popups.get("filesManager.insert").find(".fr-file-item-right-"+e).get(0).innerHTML='<div class=\'fr-file-item-action-buttons\' >\n    <button type="button" id="fr-file-cancel-upload-button-'.concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n    fr-file-button-').concat(e,' fr-file-cancel-upload-button" data-cmd="cancelUpload" data-title="Cancel" data-param1="').concat(e,'" role="button">\n    <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z\'></path></svg>\n    </button>\n\n    <button type="button" id="fr-upload-delete-button-').concat(e,'" class="fr-img-icon fr-btn fr-command fr-submit fr-file-action-icons \n    fr-file-button-').concat(e,' fr-upload-delete-button" data-cmd="deleteUpload" data-title="Delete" data-param1="').concat(e,'" role="button">\n    <svg style=\'margin:0px !important; opacity:0.9\' class = "fr-svg" focusable="false" width="16px" height="16px" viewBox = "-2 3 30 30" xlmns = "http://w3.org/200/svg"><path d = \'M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z\'></path></svg>\n    </button>\n\n    <div class=\'progress-circle p0 fr-file-progress-circle-').concat(e,"'>\n                  <span class='fr-file-upload-percent-").concat(e," fr-file-upload-percent'>0%</span>\n                  <div class='left-half-clipper'>\n                    <div class='first50-bar'></div>\n                    <div class='value-bar'></div>\n                  </div>\n                </div>\n            </div>"),C.set(e,0))}(c),t.drag_support.formdata&&(a=t.drag_support.formdata?new FormData:null),a){var l;if(!1!==t.opts.filesManagerUploadToS3)for(l in a.append("key",t.opts.filesManagerUploadToS3.keyStart+(new Date).getTime()+"-"+(e.name||"untitled")),a.append("success_action_status","201"),a.append("X-Requested-With","xhr"),a.append("Content-Type",Ie(e)),t.opts.filesManagerUploadToS3.params)t.opts.filesManagerUploadToS3.params.hasOwnProperty(l)&&a.append(l,t.opts.filesManagerUploadToS3.params[l]);for(l in t.opts.filesManagerUploadParams)t.opts.filesManagerUploadParams.hasOwnProperty(l)&&a.append(l,t.opts.filesManagerUploadParams[l]);a.append(t.opts.filesManagerUploadParam,e,e.name);var i,s,d=t.opts.filesManagerUploadURL;t.opts.filesManagerUploadToS3&&(d=t.opts.filesManagerUploadToS3.uploadURL?t.opts.filesManagerUploadToS3.uploadURL:"https://".concat(t.opts.filesManagerUploadToS3.region,".amazonaws.com/").concat(t.opts.filesManagerUploadToS3.bucket)),t.opts.filesManagerUploadToAzure&&(d=t.opts.filesManagerUploadToAzure.uploadURL?"".concat(t.opts.filesManagerUploadToAzure.uploadURL,"/").concat(e.name):encodeURI("https://".concat(t.opts.filesManagerUploadToAzure.account,".blob.core.windows.net/").concat(t.opts.filesManagerUploadToAzure.container,"/").concat(e.name)),i=d,t.opts.filesManagerUploadToAzure.SASToken&&(d+=t.opts.filesManagerUploadToAzure.SASToken),t.opts.filesManagerUploadMethod="PUT");var h=t.core.getXHR(d,t.opts.filesManagerUploadMethod);if(t.opts.filesManagerUploadToAzure){var f=(new Date).toUTCString();if(!t.opts.filesManagerUploadToAzure.SASToken&&t.opts.filesManagerUploadToAzure.accessKey){var v=t.opts.filesManagerUploadToAzure.account,p=t.opts.filesManagerUploadToAzure.container;if(t.opts.filesManagerUploadToAzure.uploadURL){var u=t.opts.filesManagerUploadToAzure.uploadURL.split("/");p=u.pop(),v=u.pop().split(".")[0]}var _="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(f,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+v+"/"+p+"/"+e.name),w=t.opts.filesManagerUploadMethod+"\n\n\n"+e.size+"\n\n"+Ie(e)+"\n\n\n\n\n\n\n"+_+"\n"+g,T=t.cryptoJSPlugin.cryptoJS.HmacSHA256(w,t.cryptoJSPlugin.cryptoJS.enc.Base64.parse(t.opts.filesManagerUploadToAzure.accessKey)).toString(t.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+v+":"+T;s=T,h.setRequestHeader("Authorization",b)}for(l in h.setRequestHeader("x-ms-version","2019-07-07"),h.setRequestHeader("x-ms-date",f),h.setRequestHeader("Content-Type",Ie(e)),h.setRequestHeader("x-ms-blob-type","BlockBlob"),t.opts.filesManagerUploadParams)t.opts.filesManagerUploadParams.hasOwnProperty(l)&&h.setRequestHeader(l,t.opts.filesManagerUploadParams[l]);for(l in t.opts.filesManagerUploadToAzure.params)t.opts.filesManagerUploadToAzure.params.hasOwnProperty(l)&&h.setRequestHeader(l,t.opts.filesManagerUploadToAzure.params[l])}h.onload=function(){Ue(Ie(e))?function(e,n,r,o,a){var c=this.status,i=this.response,s=this.responseXML,l=this.responseText;try{if(t.opts.filesManagerUploadToS3||t.opts.filesManagerUploadToAzure)if(201===c){var d;if(t.opts.filesManagerUploadToAzure){if(!1===t.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,i],!0))return t.edit.on(),!1;d=o}else d=Le(s,n);if(d){var h={link:d,text:e,response:i,type:r};y.set(n,h)}}else G(N,i||s,null,n);else if(200<=c&&c<300){var f=Ne(l,n);if(f){var p={link:f.link,text:e,response:i,type:r};y.set(n,p)}}else G(k,i||l,null,n)}catch(e){G(N,i||l,null,n)}}.call(h,e.name,c,Ie(e),i,s):function(e,n,r,o,a){var c=this.status,i=this.response,s=this.responseXML,l=this.responseText;try{if(t.opts.filesManagerUploadToS3||t.opts.filesManagerUploadToAzure)if(201==c){var d;if(t.opts.filesManagerUploadToAzure){if(!1===t.events.trigger("filesManager.uploadedToAzure",[this.responseURL,a,i],!0))return t.edit.on(),!1;d=o}else d=Le(s,n);if(d){var h={link:d,sanitize:!1,data:[],$existing_img:e,response:i||s,type:r};y.set(n,h)}}else G(N,i||s,e,n);else if(200<=c&&c<300){var f=Ne(l,n);if(f){var p={link:f.link,sanitize:!1,data:f,$existing_img:e,response:i||s,type:r};y.set(n,p)}}else G(k,i||l,e,n)}catch(t){G(N,i||l,e,n)}}.call(h,n,c,Ie(e),i,s),S.has(c)||Ee(100,c,!0)},h.onerror=function(){G(N,this.response||this.responseText||this.responseXML,null,c)},h.upload.onprogress=function(e){!function(e,t){e.lengthComputable&&Ee(e.loaded/e.total*100|0,t,!1)}(e,c)},h.onabort=function(e){!function(e,t){G(x,t,n,e)}(c,e)},h.send(t.opts.filesManagerUploadToAzure?e:a),E.set(c,h)}}function xe(e){t.events.$on(e,"click",".fr-upload-progress-layer",(function(e){if(t.helpers.isMobile())return e.stopPropagation(),!1}),!0),t.events.$on(e,"dragover dragenter",".fr-upload-progress-layer",(function(e){e.preventDefault();for(var t=0;t<e.originalEvent.dataTransfer.types.length;t++)"Files"==e.originalEvent.dataTransfer.types[t]&&(e.originalEvent.dataTransfer.dropEffect="none");return!1}),!0),t.events.$on(e,"dragleave dragend",".fr-upload-progress-layer",(function(e){return e.preventDefault(),!1}),!0),t.events.$on(e,"dragover dragenter",".fr-files-upload-layer",(function(e){return f(this).addClass("fr-drop"),(t.browser.msie||t.browser.edge)&&e.preventDefault(),!1}),!0),t.events.$on(e,"dragleave dragend",".fr-files-upload-layer",(function(e){return f(this).removeClass("fr-drop"),(t.browser.msie||t.browser.edge)&&e.preventDefault(),!1}),!0),t.events.$on(e,"click",".fr-insert-checkbox",(function(t){if(this.classList.contains("fr-checkbox-disabled"))return this.children.target.disabled=!0,void(this.children.target.checked=!1);var n=parseInt(this.id.split("-").pop());w.set(n,this.children.target.checked);for(var r=e.find('.fr-command[data-cmd="insertAll"]'),o=e.find('.fr-command[data-cmd="deleteAll"]'),a=e.find('input.fr-file-insert-check[type="checkbox"]'),c=a.length,i=!0,s=0;s<c;s++)1==a[s].checked&&(i=!1);i?r.addClass("fr-disabled"):r.removeClass("fr-disabled"),i?o.addClass("fr-disabled"):o.removeClass("fr-disabled"),this.children.target.checked?(e.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","true"),e.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.remove("fr-unchecked")):(this.id.split("-").pop(),e.find(".fr-file-"+this.id.split("-").pop()).get(0).setAttribute("draggable","false"),e.find(".fr-file-"+this.id.split("-").pop()).get(0).classList.add("fr-unchecked"))})),t.events.$on(e,"click",".fr-file-insert-button",(function(e){this.classList.contains("fr-disabled")||ke(parseInt(this.id.split("-").pop()))})),t.events.$on(e,"click",".fr-file-autoplay-button",(function(e){if(this.parentNode.classList.contains("fr-checkbox-disabled"))return this.disabled=!0,void(this.checked=!1);De(parseInt(this.id.split("-").pop()))})),t.events.$on(e,"click",".fr-file-edit-button",(function(t){var n=parseInt(this.id.split("-").pop());e.find(".fr-file-edit-button-".concat(n)).hasClass("fr-disabled")||Oe(n)})),t.events.$on(e,"click",".fr-file-view-button",(function(n){var r=parseInt(this.id.split("-").pop());e.find(".fr-file-view-button-".concat(r)).hasClass("fr-disabled")||function(e){if(!Ve(Ie(y.get(e)))){var n=y.get(e).link,r=y.get(e).link;if(_.get(e)&&_.get(e).name?r=_.get(e).name:y.get(e).text&&(r=y.get(e).text),0===n.indexOf("blob:")&&t.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(_.get(e),r);else{var o=document.createElement("a");o.href=n,o.download=r,o.click()}return!1}var a=t.popups.get("filesManager.insert");if(0<a.find(".fr-file-view-image-"+e).length)a.find(".fr-file-view-image-"+e)[0].remove();else{for(var c=a.find(".fr-file-view"),i=0;i<c.length;i++)c.get(i).remove();var s=a.find(".fr-file-view-"+e);if(Pe(Ie(y.get(e)))){var l='<div class="fr-file-view-modal">\n              <div class="fr-file-view-modal-content">\n              <div class="fr-file-view-close">&times;</div> \n                <img src="'+y.get(e).link+"\" class ='fr-file-view-image'/>\n                </div>\n              </div>";s[0].innerHTML=l+s[0].innerHTML}else if(Be(Ie(y.get(e)))){var d;if(y.get(e).hasOwnProperty("video")){var h=y.get(e).video.substring(y.get(e).video.indexOf("src")+3),f=h.substring(h.indexOf('"')+1);f=f.substring(0,f.indexOf('"')),d='<div class="fr-file-view-modal">\n        <div class="fr-file-view-modal-content ">\n          <div class="fr-file-view-close">&times;</div> \n          <iframe width="640" height="360" src="'.concat(f+"&autoplay=1&mute=1",'" allow="autoplay" frameborder="0" class = "fr-file-view-image"></iframe>\n        </div>\n      </div>')}else d='<div class="fr-file-view-modal">\n          <div class="fr-file-view-modal-content ">\n            <div class="fr-file-view-close">&times;</div> \n            <video controls src="'+y.get(e).link+"\"  class ='fr-file-view-image' autoplay></video>\n          </div>\n        </div>";s[0].innerHTML=d+s[0].innerHTML}else if(Fe(Ie(y.get(e)))){var p='<div class="fr-file-view-modal">\n        <div class="fr-file-view-modal-content ">\n          <div  class="fr-file-view-close">&times;</div> \n          <audio controls="controls"  class =\'fr-file-view-image\' autoplay>\n\n          <source src="'.concat(y.get(e).link,'" type="').concat(Ie(y.get(e)),'" />\n\n            Your browser does not support the audio element.\n          </audio>\n        </div>\n      </div>');s[0].innerHTML=p+s[0].innerHTML}else if(Ue(Ie(y.get(e)))){var u=y.get(e).link,m=y.get(e).text;if(u.endsWith(".pdf")||u.endsWith(".txt")){var g='<div class="fr-file-view-modal">\t\n              <div class="fr-file-view-modal-content " >\t\n              <div class="fr-file-view-close">&times;</div> \t\n              <iframe src="'.concat(u,"\" style='background-color: white;' height='50%' width='50%' title=\"").concat(m,'" class="fr-file fr-file-view-image"></iframe>\t\n            </div>\t\n            </div>');s[0].innerHTML=g+s[0].innerHTML}else if(0===u.indexOf("blob:")&&t.browser.msie&&window.navigator&&window.navigator.msSaveBlob)window.navigator.msSaveBlob(_.get(e),m);else{var v=document.createElement("a");v.href=u,v.download=m,v.click()}}}}(r)})),t.events.$on(e,"click",".fr-file-delete-button",(function(e){Y(parseInt(this.id.split("-").pop()))})),t.events.$on(e,"click",".fr-file-cancel-upload-button",(function(e){!function(e){var n=t.popups.get("filesManager.insert");n.find(".fr-file-item-right-"+e).get(0).innerHTML=ye(e),E.get(e).abort(),Ce(e,100,!0),n.find(".fr-checkbox-file-"+e).get(0).disabled=!0}(parseInt(this.id.split("-").pop()))})),t.events.$on(e,"click",".fr-upload-delete-button",(function(e){!function(e){0!=E.get(e).readyState&&(E.get(e).abort(),Ce(e,100,!0),E.delete(e)),Y(e)}(parseInt(this.id.split("-").pop()))})),t.events.$on(e,"click",".fr-file-view-close",(function(t){e.find(".fr-file-view-modal").get(0).outerHTML=""})),t.events.$on(e,"click",".fr-plugins-enable",(function(e){g.forEach((function(e){t.opts.pluginsEnabled.indexOf(e)<0&&t.opts.pluginsEnabled.push(e)})),function(e){for(var n in e)if(!t[n]){if(r.PLUGINS[n]&&t.opts.pluginsEnabled.indexOf(n)<0)continue;t[n]=new e[n](t),t[n]._init&&t[n]._init()}}(r.PLUGINS),t.popups.get("filesManager.insert").get(0).outerHTML="",je(),U(!0)})),t.events.$on(e,"click",".fr-plugins-cancel",(function(e){t.popups.hide("filesManager.insert")})),t.events.$on(e,"drop",".fr-upload-progress",(function(e){e.preventDefault(),e.stopPropagation()})),t.events.$on(e,"drop",".fr-files-upload-layer",(function(r){r.preventDefault(),r.stopPropagation(),f(this).removeClass("fr-drop");var o=r.originalEvent.dataTransfer;if(o&&o.files){var c=e.data("instance")||t;c.events.disableBlur();for(var l=[],a=0;a<o.files.length;a++){var d=R;_.set(d,o.files[a]),ve(d),w.set(d,!1),l.push(d),R++}for(var i=0;i<l.length;i++)c.filesManager.upload(_.get(l[i]),o.files,n,l[i]);c.events.enableBlur()}}),!0),t.helpers.isIOS()&&t.events.$on(e,"touchstart",'.fr-files-upload-layer input[type="file"]',(function(){f(this).trigger("click")}),!0),t.events.$on(e,"change",'.fr-files-upload-layer input[type="file"]',(function(){if(this.files){var r=e.data("instance")||t;r.events.disableBlur(),e.find("input:focus").blur(),r.events.enableBlur();var o=[];if(void 0!==this.files&&0<this.files.length){for(var c=0;c<this.files.length;c++){var l=R;_.set(l,this.files[c]),ve(l),w.set(l,!1),++R,o.push(l)}for(var a=0;a<o.length;a++)r.filesManager.upload(_.get(o[a]),this.files,n,o[a])}}f(this).val("")}),!0)}function De(e){document.getElementById("fr-file-autoplay-button-"+e).checked?A.push(e):A=A.filter((function(t){return t!=e}))}function Pe(e){return e&&"image"===e.split("/")[0]}function Ue(e){return e&&"image"!=e.split("/")[0]&&e&&"video"!=e.split("/")[0]&&e&&"audio"!=e.split("/")[0]}function Be(e){return e&&"video"===e.split("/")[0]}function Fe(e){return e&&"audio"===e.split("/")[0]}function Ve(e){if("audio/ogg"==e||"video/ogg"==e||"image/webp"==e||"video/webm"==e){if(t.browser.msie||t.browser.edge||t.browser.safari)return!1;if(t.helpers.isMobile()){if("audio/ogg"==e||"video/ogg"==e)return!1;if(!t.helpers.isAndroid()&&!t.browser.chrome)return!1}}return!0}function je(e){if(e)return t.popups.onRefresh("filesManager.insert",b),t.popups.onHide("filesManager.insert",F),!0;var r,o,c="";t.opts.imageUpload||-1===t.opts.filesInsertButtons.indexOf("filesUpload")||t.opts.imageInsertButtons.splice(t.opts.filesInsertButtons.indexOf("filesUpload"),1);var a=t.button.buildList(t.opts.filesInsertButtons),l=t.button.buildList(t.opts.filesInsertButtons2);""!==a&&(c='<div class="fr-buttons fr-tabs">'.concat(a,'<span class="fr-align-right">').concat(l,"</span></div>"));var i=t.opts.filesInsertButtons.indexOf("filesUpload"),s=t.opts.filesInsertButtons.indexOf("filesByURL"),d=t.opts.filesInsertButtons.indexOf("filesEmbed"),h="";0<=i&&(r=" fr-active",0<=s&&s<i&&(r=""),h='<div class="fr-files-upload-layer'.concat(r,' fr-layer " id="fr-files-upload-layer-').concat(t.id,'"><div style="display:flex"><div class="fr-upload-section"><div class = \'fr-blue-decorator\'><div class = \'fr-cloud-icon\'><svg class = "fr-svg" focusable="false" width="26px" height="26px" viewBox = "0 0 24 24" xlmns = "http://w3.org/200/svg"><path d = \'M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z\'></path></svg></div>Drag & Drop One or More Files<br><div class="decorated"><span> OR </span></div> Click Browse Files </div> </div><div class="fr-form"><input type="file" accept="').concat(t.opts.filesManagerAllowedTypes.join(",").toLowerCase(),'" tabIndex="-1" aria - labelledby="fr-files-upload-layer-').concat(t.id,'"role="button" multiple></div> </div></div>'));var f="";0<=d&&(r=" fr-active",(i<d&&0<=i||s<d&&0<=s)&&(r=""),f='<div class="fr-files-embed-layer fr-layer'.concat(r,'" id="fr-files-embed-layer-').concat(t.id,'"><div class="fr-input-line padding-top-15"><textarea data-gramm_editor="false" style=\'height:60px\' id="fr-files-embed-layer-text').concat(t.id,'" type="text" placeholder="').concat(t.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="insertEmbed" tabIndex="2" role="button">').concat(t.language.translate("Insert"),"</button></div></div>"));var m="";0<=s&&(r=" fr-active",0<=i&&i<s&&(r=""),m='<div class="fr-files-by-url-layer'.concat(r,' fr-layer" id="fr-files-by-url-layer-').concat(t.id,'"><div class="fr-input-line fr-by-url-padding"><input id="fr-files-by-url-layer-text-').concat(t.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="filesInsertByURL" tabIndex="2" role="button">').concat(t.language.translate("Add"),"</button></div></div>"));var p={buttons:c,upload_layer:h,by_url_layer:m,embed_layer:f,upload_progress_layer:"<div class = ' fr-margin-16 fr-upload-progress' id=\"fr-upload-progress-layer-".concat(t.id,"\" ><div  class='fr-progress-bar-style'><div class='fr-progress-bar fr-none'></div></div><div id='filesList' class = 'fr-upload-progress-layer fr-layer'></div></div>"),progress_bar:'<div class="fr-files-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="filesDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=t.opts.imageInsertButtons.length&&(o=t.popups.create("filesManager.insert",p)),t.$wp&&t.events.$on(t.$wp,"scroll",(function(){n&&t.popups.isVisible("filesManager.insert")&&replace()})),xe(o),t.popups.setPopupDimensions(o),o}function He(e){var t=e.split("/").pop();if(t.split(".").length<2){var n=new Date;return t+"-"+n.getDate()+"/"+(n.getMonth()+1)+"/"+n.getFullYear()}return t}function $e(){n&&t.popups.get("image.alt").find("input").val(n.attr("alt")||"").trigger("change")}function ze(){var e=t.popups.get("image.alt");e||(e=We()),Q(),t.popups.refresh("image.alt"),t.popups.setContainer("image.alt",t.$sc);var n=lt();ut()&&(n=n.find(".fr-img-wrap"));var r=n.offset().left+n.outerWidth()/2,o=n.offset().top+n.outerHeight();t.popups.show("image.alt",r,o,n.outerHeight(),!0)}function We(e){if(e)return t.popups.onRefresh("image.alt",$e),!0;var r={buttons:'<div class="fr-buttons fr-tabs">'.concat(t.button.buildList(t.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(t.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(t.id,'" type="text" placeholder="').concat(t.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(t.language.translate("Update"),"</button></div></div>")},o=t.popups.create("image.alt",r);return t.$wp&&t.events.$on(t.$wp,"scroll.image-alt",(function(){n&&t.popups.isVisible("image.alt")&&ze()})),o}function Ke(){var e=t.popups.get("image.size");if(n)if(ut()){var r=n.parent();r.get(0).style.width||(r=n.parent().parent()),e.find('input[name="width"]').val(r.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(r.get(0).style.height).trigger("change")}else e.find('input[name="width"]').val(n.get(0).style.width).trigger("change"),e.find('input[name="height"]').val(n.get(0).style.height).trigger("change")}function Ge(){var e=t.popups.get("image.size");e||(e=qe()),Q(),t.popups.refresh("image.size"),t.popups.setContainer("image.size",t.$sc);var n=lt();ut()&&(n=n.find(".fr-img-wrap"));var r=n.offset().left+n.outerWidth()/2,o=n.offset().top+n.outerHeight();t.popups.show("image.size",r,o,n.outerHeight(),!0)}function qe(e){if(e)return t.popups.onRefresh("image.size",Ke),!0;var r={buttons:'<div class="fr-buttons fr-tabs">'.concat(t.button.buildList(t.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(t.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(t.id,'" type="text" name="width" placeholder="').concat(t.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(t.id,'" type="text" name="height" placeholder="').concat(t.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(t.language.translate("Update"),"</button></div></div>")},o=t.popups.create("image.size",r);return t.$wp&&t.events.$on(t.$wp,"scroll.image-size",(function(){n&&t.popups.isVisible("image.size")&&Ge()})),o}function Ye(e,t,n,r){return e.pageX=t,$.call(this,e),e.pageX=e.pageX+n*Math.floor(Math.pow(1.1,r)),z.call(this,e),W.call(this,e),++r}function Xe(e){(e=e||lt())&&!1!==t.events.trigger("image.beforeRemove",[e])&&(t.popups.hideAll(),it(!0),t.undo.canDo()||t.undo.saveStep(),e.get(0)==t.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(t.selection.setBefore(e.get(0).parentNode)||t.selection.setAfter(e.get(0).parentNode)||e.parent().after(r.MARKERS),f(e.get(0).parentNode).remove()):(t.selection.setBefore(e.get(0))||t.selection.setAfter(e.get(0))||e.after(r.MARKERS),e.remove()),t.html.fillEmptyBlocks(),t.selection.restore()),t.undo.saveStep())}function Ze(e){var o=e.which;if(n&&(o==r.KEYCODE.BACKSPACE||o==r.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),Xe(),!1;if(n&&o==r.KEYCODE.ESC){var c=n;return it(!0),t.selection.setAfter(c.get(0)),t.selection.restore(),e.preventDefault(),!1}if(!n||o!=r.KEYCODE.ARROW_LEFT&&o!=r.KEYCODE.ARROW_RIGHT)return n&&o===r.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),it(!0),!1):n&&o!=r.KEYCODE.F10&&!t.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var l=n.get(0);return it(!0),o==r.KEYCODE.ARROW_LEFT?t.selection.setBefore(l):t.selection.setAfter(l),t.selection.restore(),e.preventDefault(),!1}function Qe(e){if(e&&"IMG"==e.tagName){if(t.node.hasClass(e,"fr-uploading")||t.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):t.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&t.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var n=e.parentNode.parentNode;n.removeAttribute("contenteditable"),n.removeAttribute("draggable"),n.classList.remove("fr-draggable");var r=e.nextSibling;r&&r.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var o=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),a=0;a<o.length;a++)Qe(o[a])}function Je(e){var n=e.target.result,r=t.opts.imageDefaultWidth;r&&"auto"!=r&&(r+=t.opts.imageResizeWithPercent?"%":"px"),t.undo.saveStep(),t.html.insert('<img data-fr-image-pasted="true" src="'.concat(n,'"').concat(r?' style="width: '.concat(r,';"'):"",">"));var o=t.$el.find('img[data-fr-image-pasted="true"]');o&&st(o,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),t.events.trigger("paste.after")}function et(e,n){var r=new FileReader;r.onload=function(e){var n=t.opts.imageDefaultWidth;n&&"auto"!=n&&(n+=t.opts.imageResizeWithPercent?"%":"px"),t.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(n?' style="width: '.concat(n,';"'):"",">"));var r=t.$el.find('img[data-fr-image-pasted="true"]');r&&st(r,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),t.events.trigger("paste.after")}(n),r.readAsDataURL(e,n)}function tt(e){if(e&&e.clipboardData&&e.clipboardData.items){var t=(e.clipboardData||window.clipboardData).getData("text/html")||"",n=(new DOMParser).parseFromString(t,"text/html").querySelector("img");if(n){if(!n)return!1;var o=n.src,a=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))a=e.clipboardData.items[0].getAsFile();else for(var c=0;c<e.clipboardData.items.length;c++)if(a=e.clipboardData.items[c].getAsFile()){r.IMAGE_TYPE=a.type;break}if(a)return et(a,o),!1}else{var i=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))i=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(i=e.clipboardData.items[s].getAsFile());s++);if(i)return function(e){var t=new FileReader;t.onload=Je,t.readAsDataURL(e)}(i),!1}}}function nt(e){return e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function it(e){n&&(rt||!0===e)&&(t.toolbar.enable(),c&&c.removeClass("fr-active"),t.popups.hide("image.edit"),n=null,at(),l=null,d&&d.hide())}var rt=!1;function ot(){rt=!0}function at(){rt=!1}function st(e,n,r){!t.opts.htmlUntouched&&t.opts.useClasses?(f(e).removeClass("fr-fil fr-fir fr-dib fr-dii"),r&&f(e).addClass("fr-fi".concat(r[0])),n&&f(e).addClass("fr-di".concat(n[0]))):"inline"==n?(e.css({display:"inline-block",verticalAlign:"bottom",margin:t.opts.imageDefaultMargin}),"center"==r?e.css({float:"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*t.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==r?e.css({float:"left",marginLeft:0,maxWidth:"calc(100% - ".concat(t.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({float:"right",marginRight:0,maxWidth:"calc(100% - ".concat(t.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==n&&(e.css({display:"block",float:"none",verticalAlign:"top",margin:"".concat(t.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==r?e.css({marginLeft:0,textAlign:"left"}):"right"==r&&e.css({marginRight:0,textAlign:"right"}))}function ct(){return n}function lt(){return ut()?n.parents(".fr-img-caption").first():n}function ut(){return!!n&&0<n.parents(".fr-img-caption").length}return{_init:function(){var e;t.events.$on(t.$el,t._mousedown,"IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(e){if("false"==f(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.helpers.isMobile()||t.selection.clear(),v=!0,t.popups.areVisible()&&t.events.disableBlur(),t.browser.msie&&(t.events.disableBlur(),t.$el.attr("contenteditable",!1)),t.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()})),t.events.$on(t.$el,t._mousedown,".fr-img-caption .fr-inner",(function(e){t.core.hasFocus()||t.events.focus(),e.stopPropagation()})),t.events.$on(t.$el,"paste",".fr-img-caption .fr-inner",(function(e){!0===t.opts.toolbarInline&&(t.toolbar.hide(),e.stopPropagation())})),t.events.$on(t.$el,t._mouseup,"IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(e){if("false"==f(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;v&&(v=!1,e.stopPropagation(),t.browser.msie&&(t.$el.attr("contenteditable",!0),t.events.enableBlur()))})),t.events.on("keyup",(function(e){if(e.shiftKey&&""===t.selection.text().replace(/\n/g,"")&&t.keys.isArrow(e.which)){var n=t.selection.element(),r=t.selection.endElement();n&&"IMG"==n.tagName?Se(f(n)):r&&"IMG"==r.tagName&&Se(f(r))}}),!0),t.events.on("window.mousedown",ot),t.events.on("window.touchmove",at),t.events.on("mouseup window.mouseup",(function(){if(n)return it(),!1;at()})),t.events.on("commands.mousedown",(function(e){0<e.parents(".fr-toolbar").length&&it()})),t.events.on("image.resizeEnd",(function(){t.opts.iframe&&t.size.syncIframe()})),t.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",(function(){it(!(v=!1))})),t.events.on("modals.hide",(function(){n&&t.selection.clear()})),t.events.on("image.resizeEnd",(function(){t.win.getSelection&&Se(n)})),t.opts.imageAddNewLine&&t.events.on("image.inserted",(function(e){var n=e.get(0);for(n.nextSibling&&"BR"===n.nextSibling.tagName&&(n=n.nextSibling);n&&!t.node.isElement(n);)n=t.node.isLastSibling(n)?n.parentNode:null;t.node.isElement(n)&&(t.opts.enter===r.ENTER_BR?e.after("<br>"):f(t.node.blockParent(e.get(0))).after("<".concat(t.html.defaultTag(),"><br></").concat(t.html.defaultTag(),">")))})),"IMG"==t.el.tagName&&t.$el.addClass("fr-view"),t.helpers.isMobile()&&(t.events.$on(t.$el,"touchstart","IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(){ue=!1})),t.events.$on(t.$el,"touchmove",(function(){ue=!0}))),t.$wp?(t.events.on("window.keydown keydown",Ze,!0),t.events.on("keyup",(function(e){if(n&&e.which==r.KEYCODE.ENTER)return!1}),!0),t.events.$on(t.$el,"keydown",(function(){var e=t.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&t.node.isLastSibling(e))&&(e=e.parentNode),t.node.hasClass(e,"fr-inner")||(t.node.hasClass(e,"fr-img-caption")||(e=f(e).parents(".fr-img-caption").get(0)),t.node.hasClass(e,"fr-img-caption")&&(t.opts.trackChangesEnabled||f(e).after(r.INVISIBLE_SPACE+r.MARKERS),t.selection.restore()))}))):t.events.$on(t.$win,"keydown",Ze),t.events.on("toolbar.esc",(function(){if(n){if(t.$wp)t.events.disableBlur(),t.events.focus();else{var e=n;it(!0),t.selection.setAfter(e.get(0)),t.selection.restore()}return!1}}),!0),t.events.on("toolbar.focusEditor",(function(){if(n)return!1}),!0),t.events.on("window.cut window.copy",(function(e){if(n&&t.popups.isVisible("image.edit")&&!t.popups.get("image.edit").find(":focus").length){var o=lt();ut()?(o.before(r.START_MARKER),o.after(r.END_MARKER),t.selection.restore(),t.paste.saveCopiedText(o.get(0).outerHTML,o.text())):t.paste.saveCopiedText(n.get(0).outerHTML,n.attr("alt")),"copy"==e.type?setTimeout((function(){Se(n)})):(it(!0),t.undo.saveStep(),setTimeout((function(){t.undo.saveStep()}),0))}}),!0),t.browser.msie&&t.events.on("keydown",(function(e){if(!t.selection.isCollapsed()||!n)return!0;var o=e.which;o==r.KEYCODE.C&&t.keys.ctrlKey(e)?t.events.trigger("window.copy"):o==r.KEYCODE.X&&t.keys.ctrlKey(e)&&t.events.trigger("window.cut")})),t.events.$on(f(t.o_win),"keydown",(function(e){var t=e.which;if(n&&t==r.KEYCODE.BACKSPACE)return e.preventDefault(),!1})),t.events.$on(t.$win,"keydown",(function(e){var t=e.which;n&&n.hasClass("fr-uploading")&&t==r.KEYCODE.ESC&&n.trigger("abortUpload")})),t.events.on("destroy",(function(){n&&n.hasClass("fr-uploading")&&n.trigger("abortUpload")})),t.events.on("paste.before",tt),t.events.on("paste.beforeCleanup",nt),t.events.on("html.processGet",Qe),t.opts.imageOutputSize&&t.events.on("html.beforeGet",(function(){e=t.el.querySelectorAll("img");for(var n=0;n<e.length;n++){var r=e[n].style.width||f(e[n]).width(),o=e[n].style.height||f(e[n]).height();r&&e[n].setAttribute("width","".concat(r).replace(/px/,"")),o&&e[n].setAttribute("height","".concat(o).replace(/px/,""))}})),t.opts.iframe&&t.events.on("image.loaded",t.size.syncIframe),t.events.$on(f(t.o_win),"orientationchange.image",(function(){setTimeout((function(){n&&Se(n)}),100)})),function(e){if(e)return t.$wp&&t.events.$on(t.$wp,"scroll.image-edit",(function(){n&&t.popups.isVisible("image.edit")&&t.events.disableBlur()})),!0;var r="";if(0<t.opts.imageEditButtons.length){var o={buttons:r+='<div class="fr-buttons"> \n        '.concat(t.button.buildList(t.opts.imageEditButtons),"\n        </div>")};t.popups.create("image.edit",o)}}(!0),je(!0),qe(!0),We(!0),t.events.on("node.remove",(function(e){if("IMG"==e.get(0).tagName)return Xe(e),!1})),t.events.on("popups.hide.filesManager.insert",(function(e){t.filesManager.minimizePopup(o)}))},showInsertPopup:U,showLayer:function(e){var r,o,c=t.popups.get("filesManager.insert");if(n||t.opts.toolbarInline){if(n){var a=lt();ut()&&(a=a.find(".fr-img-wrap")),o=a.offset().top+a.outerHeight(),r=a.offset().left}}else{var l=t.$tb.find('.fr-command[data-cmd="insertFiles"]');r=l.offset().left,o=l.offset().top+(t.opts.toolbarBottom?10:l.outerHeight()-10)}!n&&t.opts.toolbarInline&&(o=c.offset().top-t.helpers.getPX(c.css("margin-top")),c.hasClass("fr-above")&&(o+=c.outerHeight())),c.find(".fr-layer").removeClass("fr-active"),c.find(".fr-".concat(e,"-layer")).addClass("fr-active"),c.find(".fr-upload-progress-layer").addClass("fr-active"),t.popups.show("filesManager.insert",r,o,n?n.outerHeight():0),t.accessibility.focusPopup(c)},refreshUploadButton:function(e){var n=t.popups.get("filesManager.insert");n&&n.find(".fr-files-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function(e){var n=t.popups.get("filesManager.insert");n&&n.find(".fr-files-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:Me,insertByURL:function(){for(var e,o=t.popups.get("filesManager.insert").find(".fr-files-by-url-layer input"),c=o.val().trim().split(/[ ,]+/),l=[],a=0,d=0;d<c.length;d++)e=c[d],new RegExp("^(https?:\\/\\/)?((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|((\\d{1,3}\\.){3}\\d{1,3}))(\\:\\d+)?(\\/[-a-z\\d%_.~+]*)*(\\?[;&a-z\\d%_.~+=-]*)?(\\#[-a-z\\d_]*)?$","i").test(e)&&(l[a]=c[d],a++);if(0!=l.length){if(0<o.val().trim().length&&0<l.length){var s=[],h=[],f=R,m=l.length;l.forEach((function(e,o){if(0==e.trim().length)R==f+--m&&we(s,h);else{Q(),Z(),J(t.language.translate("Loading file(s)"));var c=e.trim(),l=function(e){if(void 0===e)return e;var n=null;if(/^http/.test(e)||(e="https://".concat(e)),t.helpers.isURL(e))for(var o=0;o<r.VIDEO_PROVIDERS.length;o++){var c=r.VIDEO_PROVIDERS[o];if(c.test_regex.test(e)&&new RegExp(t.opts.videoAllowedProviders.join("|")).test(c.provider)){n=e.replace(c.url_regex,c.url_text),n=c.html.replace(/\{url\}/,n);break}}return n}(c);if(l){var a={link:c,name:c,type:"video/url",size:2,video:l};_.set(f+o,a),ve(f+o),Q(),Z(),J(t.language.translate("Loading file(s)")),y.set(f+o,a),++R==f+m&&we(s,h)}else{var d=new XMLHttpRequest;d.onload=function(){if(200==this.status){var e=new Blob([this.response],{type:this.response.type||""});e.name=He(c),e.link=c,Pe(this.response.type)?(e.sanitize=!0,e.existing_image=n):Ue(this.response.type)&&(e.text=He(c)),s.push(e),h.push(f+o),_.set(f+o,e),ve(f+o),(-1<D.indexOf(Ie(e))||!Ie(e))&&G(M,null,null,f+o)}else{var r=new Blob([this.response],{type:this.response.type||" "});r.name=He(c),r.link=c,_.set(f+o,r),ve(f+o),G(O,this.response,n,f+o)}Q(),Z(),J(t.language.translate("Loading file(s)")),++R==f+m&&we(s,h)},d.onerror=function(){var e={link:c,name:He(c),size:0,type:""};G(9,this.response,n,f+o);var r=R;_.set(r,e),ve(r),Q(),Z(),J(t.language.translate("Loading file(s)")),++R==f+m&&we(s,h)},d.open("GET","".concat(t.opts.imageCORSProxy,"/").concat(c),!0),d.responseType="blob",d.send()}}})),o.val(""),o.blur()}}else ee(t.language.translate("Url entered is invalid. Please try again."))},insertAllFiles:function(){a=[];var e=t.popups.get("filesManager.insert");u=-1,h=null,e.find(".fr-insert-checkbox").toArray().forEach((function(e,t,n){e.children.target.checked&&(a.push(parseInt(e.id.split("-").pop())),Pe(y.get(parseInt(e.id.split("-").pop())).type)&&-1==u&&(u=t))})),Re(a),q()},deleteAllFiles:function(){t.popups.get("filesManager.insert").find(".fr-insert-checkbox").toArray().forEach((function(e,t,n){if(e.children.target.checked){var r=parseInt(e.id.split("-").pop());E.has(r)&&E.delete(r),Y(r)}})),q()},get:ct,getEl:lt,insert:ke,showProgressBar:Z,remove:Xe,hideProgressBar:Q,applyStyle:function(r,o,c){if(void 0===o&&(o=t.opts.imageStyles),void 0===c&&(c=t.opts.imageMultipleStyles),!n)return!1;var l=lt();if(!c){var a=Object.keys(o);a.splice(a.indexOf(r),1),l.removeClass(a.join(" "))}"object"==e(o[r])?(l.removeAttr("style"),l.css(o[r].style)):l.toggleClass(r),Se(n)},showAltPopup:ze,showSizePopup:Ge,setAlt:function(e){if(n){var r=t.popups.get("image.alt");n.attr("alt",e||r.find("input").val()||""),r.find("input:focus").blur(),Se(n)}},setSize:function(e,r){if(n){var o=t.popups.get("image.size");e=e||o.find('input[name="width"]').val()||"",r=r||o.find('input[name="height"]').val()||"";var c=/^[\d]+((px)|%)*$/g;n.removeAttr("width").removeAttr("height"),e.match(c)?n.css("width",e):n.css("width",""),r.match(c)?n.css("height",r):n.css("height",""),ut()&&(n.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(c)?n.parents(".fr-img-caption").css("width",e):n.parents(".fr-img-caption").css("width",""),r.match(c)?n.parents(".fr-img-caption").css("height",r):n.parents(".fr-img-caption").css("height","")),o&&o.find("input:focus").blur(),Se(n)}},toggleCaption:function(){var e;if(n&&!ut()){(e=n).parent().is("a")&&(e=n.parent());var o,c,l=n.parents("ul")&&0<n.parents("ul").length?n.parents("ul"):n.parents("ol")&&0<n.parents("ol").length?n.parents("ol"):[];if(0<l.length){var a=l.find("li").length,d=n.parents("li"),i=document.createElement("li");a-1===d.index()&&(l.append(i),i.innerHTML="&nbsp;")}e.attr("style")&&(c=-1<(o=e.attr("style").split(":")).indexOf("width")?o[o.indexOf("width")+1].replace(";",""):"");var s=t.opts.imageResizeWithPercent?(-1<c.indexOf("px")?null:c)||"100%":n.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(t.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+n.attr("class")+'" style="'+(t.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span><p class="fr-img-space-wrap2">&nbsp;</p></div>'),e.wrap('<span class="fr-img-wrap"></span>'),n.after('<span class="fr-inner"'.concat(t.browser.mozilla?"":' contenteditable="true"',">").concat(r.START_MARKER).concat(t.language.translate("Image Caption")).concat(r.END_MARKER,"</span>")),n.removeAttr("class").removeAttr("style").removeAttr("width"),n.parents(".fr-img-caption").css("width",s),it(!0),t.selection.restore()}else e=lt(),n.insertAfter(e),n.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove(),Se(n)},refreshEmbedButton:function(e){var n=t.popups.get("filesManager.insert");n&&n.find(".fr-files-embed-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},insertEmbed:function(e){void 0===e&&(e=t.popups.get("filesManager.insert").find(".fr-files-embed-layer textarea").val()||""),0===e.length||!r.VIDEO_EMBED_REGEX.test(e)&&!r.IMAGE_EMBED_REGEX.test(e)?(ee(t.language.translate("Something went wrong. Please try again.")),r.VIDEO_EMBED_REGEX.test(e)&&t.events.trigger("video.codeError",[e])):function(e,o){var c,l;r.VIDEO_EMBED_REGEX.test(e)?(c="video",l=t.opts.videoSplitHTML):r.IMAGE_EMBED_REGEX.test(e)&&(c="image",l=t.opts.imageSplitHTML),t.events.focus(!0),t.selection.restore();var a=!1;n&&(Xe(),a=!0),t.html.insert('<span id="fr-inserted-file" contenteditable="true" draggable="true" class="fr-'.concat(c,' fr-jiv fr-deletable">').concat(e,"</span>"),!1,l),t.popups.hide("filesManager.insert");var d=t.$el.find(".fr-jiv");d.removeClass("fr-jiv"),"video"==c&&(d.toggleClass("fr-rv",t.opts.videoResponsive),function(e,n,r){!t.opts.htmlUntouched&&t.opts.useClasses?(e.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),e.addClass("fr-fv".concat(r[0]," fr-dv").concat(n[0]))):"inline"==n?(e.css({display:"inline-block"}),"center"==r?e.css({float:"none"}):"left"==r?e.css({float:"left"}):e.css({float:"right"})):(e.css({display:"block",clear:"both"}),"left"==r?e.css({textAlign:"left"}):"right"==r?e.css({textAlign:"right"}):e.css({textAlign:"center"}))}(d,t.opts.videoDefaultDisplay,t.opts.videoDefaultAlign),d.toggleClass("fr-draggable",t.opts.videoMove),t.events.trigger(a?"video.replaced":"video.inserted",[d])),"image"==c&&(st(d,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),d.find("img").removeClass("fr-dii"),d.find("img").addClass("fr-dib"),d.toggleClass("fr-draggable",t.opts.imageMove),t.events.trigger(a?"image.replaced":"image.inserted",[d])),o&&(h=d,t.selection.clear(),t.toolbar.disable(),t.video._editVideo(h))}(e)},hasCaption:ut,exitEdit:it,edit:Se,cancelFileInsert:function(){this.file_manager_dialog_open=!1,E.forEach((function(e,t){4!=e.readyState&&(e.abort(),Y(t))}));var e=t.popups.get("filesManager.insert");e.find(".fr-progress-bar").removeClass("fr-display-block").addClass("fr-none"),e.find('.fr-command[data-cmd="filesUpload"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesByURL"]').removeClass("fr-disabled"),e.find('.fr-command[data-cmd="filesEmbed"]').removeClass("fr-disabled"),T=0,E=new Map,C=new Map,X(),t.popups.hide("filesManager.insert")},minimizePopup:function(e){this.file_manager_dialog_open=!1,t.popups.hide("filesManager.insert"),X()},editImage:Oe,saveImage:function(e){var t=y.get(i);t.link=window.URL.createObjectURL(new Blob(e,{type:"image/png"})),y.set(i,t)},_showErrorMessage:ee,_showFileErrorMessage:te,getFileThumbnail:_e,deleteFile:Y,checkAutoplay:De,checkInsertAllState:q,_disableInsertCheckbox:K,_getFileType:Ie,isChildWindowOpen:function(){return p},setChildWindowState:function(e){void 0!==e&&(p=e)},resetAllFilesCheckbox:X}},r.DefineIcon("insertFiles",{NAME:"image",SVG_KEY:"fileManager"}),r.RegisterShortcut(r.KEYCODE.P,"insertFiles",null,"P"),r.RegisterCommand("insertFiles",{title:"Insert Files",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("filesManager.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("filesManager.insert")):this.filesManager.showInsertPopup()},plugin:"filesManager"}),r.DefineIcon("cloudIcon",{NAME:"cloudIcon",SVG_KEY:"uploadFiles"}),r.DefineIcon("filesUpload",{NAME:"uploadFiles",SVG_KEY:"uploadFiles"}),r.RegisterCommand("filesUpload",{title:"Upload Files",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-upload")},refresh:function(e){this.filesManager.refreshUploadButton(e)}}),r.DefineIcon("filesByURL",{NAME:"link",SVG_KEY:"insertLink"}),r.RegisterCommand("filesByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-by-url")},refresh:function(e){this.filesManager.refreshByURLButton(e)}}),r.DefineIcon("filesEmbed",{NAME:"code",SVG_KEY:"codeView"}),r.RegisterCommand("filesEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.showLayer("files-embed")},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),r.DefineIcon("insertAll",{NAME:"insertAll",SVG_KEY:"fileInsert"}),r.RegisterCommand("insertAll",{title:"Insert",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.insertAllFiles()}}),r.DefineIcon("deleteAll",{NAME:"remove",SVG_KEY:"remove"}),r.RegisterCommand("deleteAll",{title:"Delete",undo:!1,focus:!1,toggle:!0,disabled:!0,callback:function(){this.filesManager.deleteAllFiles()}}),r.DefineIcon("cancel",{NAME:"cancel",SVG_KEY:"cancel"}),r.RegisterCommand("cancel",{title:"Cancel",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.cancelFileInsert()},refresh:function(e){}}),r.DefineIcon("minimize",{NAME:"minimize",SVG_KEY:"minimize"}),r.RegisterCommand("minimize",{title:"Minimize",undo:!1,focus:!1,toggle:!0,callback:function(){this.filesManager.minimizePopup("image.insert",!0)},refresh:function(e){this.filesManager.refreshEmbedButton(e)}}),r.RegisterCommand("filesInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.filesManager.insertByURL()},refresh:function(e){e.text(this.language.translate("Add"))}}),r.RegisterCommand("imageInsertByUpload",{title:"Insert",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),r.RegisterCommand("viewImage",{title:"View Image",undo:!0,refreshAfterCallback:!1,callback:function(e,t){},refresh:function(e){}}),r.RegisterCommand("insertEmbed",{undo:!0,focus:!0,callback:function(){this.filesManager.insertEmbed(),this.popups.get("filesManager.insert").find("textarea")[0].value="",this.popups.get("filesManager.insert").find("textarea").removeClass("fr-not-empty")}}),r.RegisterCommand("filesDismissError",{title:"OK",undo:!1,callback:function(){this.filesManager.hideProgressBar(!0)}}),r.PLUGINS.cryptoJSPlugin=function(e){var r,o,c,l,a,d,i,h,s,f,m,p,u,v,g,_,y,b,E,C,w,S,T,A,R,O,I,k,N,L,M,x,D,P,U,B,F,V,j,H,$,z,W,K,G,Y,X,Z,q,Q,J,ee,te,ne,re,ie,oe,ae,se,ce,le,de,ue,he,fe,pe,ge,me,ve,be,_e=_e||function(e,r){var o;if("undefined"!=typeof window&&window.crypto&&(o=window.crypto),!o&&"undefined"!=typeof window&&window.msCrypto&&(o=window.msCrypto),!o&&void 0!==t&&t.crypto&&(o=t.crypto),!o)try{o=n(646)}catch(e){}var c=function(){if(o){if("function"==typeof o.getRandomValues)try{return o.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof o.randomBytes)try{return o.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},l=Object.create||function(){function e(){}return function(t){var n;return e.prototype=t,n=new e,e.prototype=null,n}}(),a={},d=a.lib={},i=d.Base={extend:function(e){var t=l(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),(t.init.prototype=t).$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},h=d.WordArray=i.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||f).stringify(this)},concat:function(e){var t=this.words,n=e.words,r=this.sigBytes,a=e.sigBytes;if(this.clamp(),r%4)for(var o=0;o<a;o++){var i=n[o>>>2]>>>24-o%4*8&255;t[r+o>>>2]|=i<<24-(r+o)%4*8}else for(o=0;o<a;o+=4)t[r+o>>>2]=n[o>>>2];return this.sigBytes+=a,this},clamp:function(){var t=this.words,n=this.sigBytes;t[n>>>2]&=4294967295<<32-n%4*8,t.length=e.ceil(n/4)},clone:function(){var e=i.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n<e;n+=4)t.push(c());return new h.init(t,e)}}),s=a.enc={},f=s.Hex={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++){var o=t[a>>>2]>>>24-a%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r+=2)n[r>>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new h.init(n,t/2)}},m=s.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a++){var o=t[a>>>2]>>>24-a%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new h.init(n,t)}},p=s.Utf8={stringify:function(e){try{return decodeURIComponent(escape(m.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return m.parse(unescape(encodeURIComponent(e)))}},u=d.BufferedBlockAlgorithm=i.extend({reset:function(){this._data=new h.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var n,r=this._data,o=r.words,a=r.sigBytes,c=this.blockSize,i=a/(4*c),s=(i=t?e.ceil(i):e.max((0|i)-this._minBufferSize,0))*c,l=e.min(4*s,a);if(s){for(var d=0;d<s;d+=c)this._doProcessBlock(o,d);n=o.splice(0,s),r.sigBytes-=l}return new h.init(n,l)},clone:function(){var e=i.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0}),v=(d.Hasher=u.extend({cfg:i.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){u.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,n){return new e.init(n).finalize(t)}},_createHmacHelper:function(e){return function(t,n){return new v.HMAC.init(e,n).finalize(t)}}}),a.algo={});return a}(Math);return o=(r=_e).lib.WordArray,r.enc.Base64={stringify:function(e){var t=e.words,n=e.sigBytes,r=this._map;e.clamp();for(var a=[],o=0;o<n;o+=3)for(var i=(t[o>>>2]>>>24-o%4*8&255)<<16|(t[o+1>>>2]>>>24-(o+1)%4*8&255)<<8|t[o+2>>>2]>>>24-(o+2)%4*8&255,s=0;s<4&&o+.75*s<n;s++)a.push(r.charAt(i>>>6*(3-s)&63));var c=r.charAt(64);if(c)for(;a.length%4;)a.push(c);return a.join("")},parse:function(e){var t=e.length,n=this._map,r=this._reverseMap;if(!r){r=this._reverseMap=[];for(var a=0;a<n.length;a++)r[n.charCodeAt(a)]=a}var c=n.charAt(64);if(c){var i=e.indexOf(c);-1!==i&&(t=i)}return function(e,t,n){for(var r=[],a=0,c=0;c<t;c++)if(c%4){var l=n[e.charCodeAt(c-1)]<<c%4*2|n[e.charCodeAt(c)]>>>6-c%4*2;r[a>>>2]|=l<<24-a%4*8,a++}return o.create(r,a)}(e,t,r)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="},function(e){var t=_e,n=t.lib,r=n.WordArray,o=n.Hasher,a=t.algo,c=[];!function(){for(var t=0;t<64;t++)c[t]=4294967296*e.abs(e.sin(t+1))|0}();var l=a.MD5=o.extend({_doReset:function(){this._hash=new r.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,a=e[r];e[r]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var o=this._hash.words,i=e[t+0],s=e[t+1],l=e[t+2],v=e[t+3],_=e[t+4],y=e[t+5],p=e[t+6],u=e[t+7],E=e[t+8],g=e[t+9],C=e[t+10],w=e[t+11],b=e[t+12],S=e[t+13],T=e[t+14],A=e[t+15],R=o[0],O=o[1],I=o[2],k=o[3];O=m(O=m(O=m(O=m(O=f(O=f(O=f(O=f(O=h(O=h(O=h(O=h(O=d(O=d(O=d(O=d(O,I=d(I,k=d(k,R=d(R,O,I,k,i,7,c[0]),O,I,s,12,c[1]),R,O,l,17,c[2]),k,R,v,22,c[3]),I=d(I,k=d(k,R=d(R,O,I,k,_,7,c[4]),O,I,y,12,c[5]),R,O,p,17,c[6]),k,R,u,22,c[7]),I=d(I,k=d(k,R=d(R,O,I,k,E,7,c[8]),O,I,g,12,c[9]),R,O,C,17,c[10]),k,R,w,22,c[11]),I=d(I,k=d(k,R=d(R,O,I,k,b,7,c[12]),O,I,S,12,c[13]),R,O,T,17,c[14]),k,R,A,22,c[15]),I=h(I,k=h(k,R=h(R,O,I,k,s,5,c[16]),O,I,p,9,c[17]),R,O,w,14,c[18]),k,R,i,20,c[19]),I=h(I,k=h(k,R=h(R,O,I,k,y,5,c[20]),O,I,C,9,c[21]),R,O,A,14,c[22]),k,R,_,20,c[23]),I=h(I,k=h(k,R=h(R,O,I,k,g,5,c[24]),O,I,T,9,c[25]),R,O,v,14,c[26]),k,R,E,20,c[27]),I=h(I,k=h(k,R=h(R,O,I,k,S,5,c[28]),O,I,l,9,c[29]),R,O,u,14,c[30]),k,R,b,20,c[31]),I=f(I,k=f(k,R=f(R,O,I,k,y,4,c[32]),O,I,E,11,c[33]),R,O,w,16,c[34]),k,R,T,23,c[35]),I=f(I,k=f(k,R=f(R,O,I,k,s,4,c[36]),O,I,_,11,c[37]),R,O,u,16,c[38]),k,R,C,23,c[39]),I=f(I,k=f(k,R=f(R,O,I,k,S,4,c[40]),O,I,i,11,c[41]),R,O,v,16,c[42]),k,R,p,23,c[43]),I=f(I,k=f(k,R=f(R,O,I,k,g,4,c[44]),O,I,b,11,c[45]),R,O,A,16,c[46]),k,R,l,23,c[47]),I=m(I,k=m(k,R=m(R,O,I,k,i,6,c[48]),O,I,u,10,c[49]),R,O,T,15,c[50]),k,R,y,21,c[51]),I=m(I,k=m(k,R=m(R,O,I,k,b,6,c[52]),O,I,v,10,c[53]),R,O,C,15,c[54]),k,R,s,21,c[55]),I=m(I,k=m(k,R=m(R,O,I,k,E,6,c[56]),O,I,A,10,c[57]),R,O,p,15,c[58]),k,R,S,21,c[59]),I=m(I,k=m(k,R=m(R,O,I,k,_,6,c[60]),O,I,w,10,c[61]),R,O,l,15,c[62]),k,R,g,21,c[63]),o[0]=o[0]+R|0,o[1]=o[1]+O|0,o[2]=o[2]+I|0,o[3]=o[3]+k|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,o=8*t.sigBytes;n[o>>>5]|=128<<24-o%32;var a=e.floor(r/4294967296),c=r;n[15+(o+64>>>9<<4)]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8),n[14+(o+64>>>9<<4)]=16711935&(c<<8|c>>>24)|4278255360&(c<<24|c>>>8),t.sigBytes=4*(n.length+1),this._process();for(var i=this._hash,s=i.words,l=0;l<4;l++){var d=s[l];s[l]=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8)}return i},clone:function(){var e=o.clone.call(this);return e._hash=this._hash.clone(),e}});function d(e,t,n,r,a,o,i){var s=e+(t&n|~t&r)+a+i;return(s<<o|s>>>32-o)+t}function h(e,t,n,r,a,o,i){var s=e+(t&r|n&~r)+a+i;return(s<<o|s>>>32-o)+t}function f(e,t,n,r,a,o,i){var s=e+(t^n^r)+a+i;return(s<<o|s>>>32-o)+t}function m(e,t,n,r,a,o,i){var s=e+(n^(t|~r))+a+i;return(s<<o|s>>>32-o)+t}t.MD5=o._createHelper(l),t.HmacMD5=o._createHmacHelper(l)}(Math),l=(c=_e).lib,a=l.WordArray,d=l.Hasher,i=c.algo,h=[],s=i.SHA1=d.extend({_doReset:function(){this._hash=new a.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],a=n[1],o=n[2],i=n[3],s=n[4],c=0;c<80;c++){if(c<16)h[c]=0|e[t+c];else{var l=h[c-3]^h[c-8]^h[c-14]^h[c-16];h[c]=l<<1|l>>>31}var d=(r<<5|r>>>27)+s+h[c];d+=c<20?1518500249+(a&o|~a&i):c<40?1859775393+(a^o^i):c<60?(a&o|a&i|o&i)-1894007588:(a^o^i)-899497514,s=i,i=o,o=a<<30|a>>>2,a=r,r=d}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=Math.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=d.clone.call(this);return e._hash=this._hash.clone(),e}}),c.SHA1=d._createHelper(s),c.HmacSHA1=d._createHmacHelper(s),function(a){var e=_e,t=e.lib,n=t.WordArray,r=t.Hasher,o=e.algo,i=[],c=[];!function(){function e(e){for(var t=a.sqrt(e),n=2;n<=t;n++)if(!(e%n))return!1;return!0}function t(e){return 4294967296*(e-(0|e))|0}for(var n=2,r=0;r<64;)e(n)&&(r<8&&(i[r]=t(a.pow(n,.5))),c[r]=t(a.pow(n,1/3)),r++),n++}();var l=[],s=o.SHA256=r.extend({_doReset:function(){this._hash=new n.init(i.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],a=n[1],o=n[2],i=n[3],s=n[4],d=n[5],h=n[6],f=n[7],m=0;m<64;m++){if(m<16)l[m]=0|e[t+m];else{var p=l[m-15],u=(p<<25|p>>>7)^(p<<14|p>>>18)^p>>>3,v=l[m-2],g=(v<<15|v>>>17)^(v<<13|v>>>19)^v>>>10;l[m]=u+l[m-7]+g+l[m-16]}var _=r&a^r&o^a&o,y=(r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22),b=f+((s<<26|s>>>6)^(s<<21|s>>>11)^(s<<7|s>>>25))+(s&d^~s&h)+c[m]+l[m];f=h,h=d,d=s,s=i+b|0,i=o,o=a,a=r,r=b+(y+_)|0}n[0]=n[0]+r|0,n[1]=n[1]+a|0,n[2]=n[2]+o|0,n[3]=n[3]+i|0,n[4]=n[4]+s|0,n[5]=n[5]+d|0,n[6]=n[6]+h|0,n[7]=n[7]+f|0},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=a.floor(n/4294967296),t[15+(r+64>>>9<<4)]=n,e.sigBytes=4*t.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}});e.SHA256=r._createHelper(s),e.HmacSHA256=r._createHmacHelper(s)}(Math),function(){var e=_e,a=e.lib.WordArray,t=e.enc;function i(e){return e<<8&4278255360|e>>>8&16711935}t.Utf16=t.Utf16BE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a+=2){var o=t[a>>>2]>>>16-a%4*8&65535;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=e.charCodeAt(r)<<16-r%2*16;return a.create(n,2*t)}},t.Utf16LE={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],a=0;a<n;a+=2){var o=i(t[a>>>2]>>>16-a%4*8&65535);r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r<t;r++)n[r>>>1]|=i(e.charCodeAt(r)<<16-r%2*16);return a.create(n,2*t)}}}(),function(){if("function"==typeof ArrayBuffer){var e=_e.lib.WordArray,a=e.init;(e.init=function(e){if(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),(e instanceof Int8Array||"undefined"!=typeof Uint8ClampedArray&&e instanceof Uint8ClampedArray||e instanceof Int16Array||e instanceof Uint16Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Float32Array||e instanceof Float64Array)&&(e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength)),e instanceof Uint8Array){for(var t=e.byteLength,n=[],r=0;r<t;r++)n[r>>>2]|=e[r]<<24-r%4*8;a.call(this,n,t)}else a.apply(this,arguments)}).prototype=e}}(),function(e){var t=_e,n=t.lib,r=n.WordArray,a=n.Hasher,o=t.algo,c=r.create([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13]),l=r.create([5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11]),d=r.create([11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6]),h=r.create([8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]),f=r.create([0,1518500249,1859775393,2400959708,2840853838]),m=r.create([1352829926,1548603684,1836072691,2053994217,0]),i=o.RIPEMD160=a.extend({_doReset:function(){this._hash=r.create([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(e,t){for(var n=0;n<16;n++){var r=t+n,a=e[r];e[r]=16711935&(a<<8|a>>>24)|4278255360&(a<<24|a>>>8)}var o,i,s,S,T,A,R,p,u,O,g,I=this._hash.words,k=f.words,b=m.words,N=c.words,L=l.words,M=d.words,x=h.words;for(A=o=I[0],R=i=I[1],p=s=I[2],u=S=I[3],O=T=I[4],n=0;n<80;n+=1)g=o+e[t+N[n]]|0,g+=n<16?v(i,s,S)+k[0]:n<32?_(i,s,S)+k[1]:n<48?y(i,s,S)+k[2]:n<64?E(i,s,S)+k[3]:C(i,s,S)+k[4],g=(g=w(g|=0,M[n]))+T|0,o=T,T=S,S=w(s,10),s=i,i=g,g=A+e[t+L[n]]|0,g+=n<16?C(R,p,u)+b[0]:n<32?E(R,p,u)+b[1]:n<48?y(R,p,u)+b[2]:n<64?_(R,p,u)+b[3]:v(R,p,u)+b[4],g=(g=w(g|=0,x[n]))+O|0,A=O,O=u,u=w(p,10),p=R,R=g;g=I[1]+s+u|0,I[1]=I[2]+S+O|0,I[2]=I[3]+T+A|0,I[3]=I[4]+o+R|0,I[4]=I[0]+i+p|0,I[0]=g},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;t[r>>>5]|=128<<24-r%32,t[14+(r+64>>>9<<4)]=16711935&(n<<8|n>>>24)|4278255360&(n<<24|n>>>8),e.sigBytes=4*(t.length+1),this._process();for(var a=this._hash,o=a.words,i=0;i<5;i++){var s=o[i];o[i]=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8)}return a},clone:function(){var e=a.clone.call(this);return e._hash=this._hash.clone(),e}});function v(e,t,n){return e^t^n}function _(e,t,n){return e&t|~e&n}function y(e,t,n){return(e|~t)^n}function E(e,t,n){return e&n|t&~n}function C(e,t,n){return e^(t|~n)}function w(e,t){return e<<t|e>>>32-t}t.RIPEMD160=a._createHelper(i),t.HmacRIPEMD160=a._createHmacHelper(i)}(Math),m=(f=_e).lib.Base,p=f.enc.Utf8,f.algo.HMAC=m.extend({init:function(e,t){e=this._hasher=new e.init,"string"==typeof t&&(t=p.parse(t));var n=e.blockSize,r=4*n;t.sigBytes>r&&(t=e.finalize(t)),t.clamp();for(var a=this._oKey=t.clone(),o=this._iKey=t.clone(),i=a.words,s=o.words,c=0;c<n;c++)i[c]^=1549556828,s[c]^=909522486;a.sigBytes=o.sigBytes=r,this.reset()},reset:function(){var e=this._hasher;e.reset(),e.update(this._iKey)},update:function(e){return this._hasher.update(e),this},finalize:function(e){var t=this._hasher,n=t.finalize(e);return t.reset(),t.finalize(this._oKey.clone().concat(n))}}),g=(v=(u=_e).lib).Base,_=v.WordArray,b=(y=u.algo).SHA1,E=y.HMAC,C=y.PBKDF2=g.extend({cfg:g.extend({keySize:4,hasher:b,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n=this.cfg,r=E.create(n.hasher,e),a=_.create(),o=_.create([1]),i=a.words,s=o.words,c=n.keySize,l=n.iterations;i.length<c;){var d=r.update(t).finalize(o);r.reset();for(var h=d.words,p=h.length,u=d,f=1;f<l;f++){u=r.finalize(u),r.reset();for(var g=u.words,m=0;m<p;m++)h[m]^=g[m]}a.concat(d),s[0]++}return a.sigBytes=4*c,a}}),u.PBKDF2=function(e,t,n){return C.create(n).compute(e,t)},T=(S=(w=_e).lib).Base,A=S.WordArray,O=(R=w.algo).MD5,I=R.EvpKDF=T.extend({cfg:T.extend({keySize:4,hasher:O,iterations:1}),init:function(e){this.cfg=this.cfg.extend(e)},compute:function(e,t){for(var n,r=this.cfg,a=r.hasher.create(),o=A.create(),i=o.words,s=r.keySize,c=r.iterations;i.length<s;){n&&a.update(n),n=a.update(e).finalize(t),a.reset();for(var l=1;l<c;l++)n=a.finalize(n),a.reset();o.concat(n)}return o.sigBytes=4*s,o}}),w.EvpKDF=function(e,t,n){return I.create(n).compute(e,t)},N=(k=_e).lib.WordArray,L=k.algo,M=L.SHA256,x=L.SHA224=M.extend({_doReset:function(){this._hash=new N.init([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428])},_doFinalize:function(){var e=M._doFinalize.call(this);return e.sigBytes-=4,e}}),k.SHA224=M._createHelper(x),k.HmacSHA224=M._createHmacHelper(x),P=(D=_e).lib,U=P.Base,B=P.WordArray,(F=D.x64={}).Word=U.extend({init:function(e,t){this.high=e,this.low=t}}),F.WordArray=U.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:8*e.length},toX32:function(){for(var e=this.words,t=e.length,n=[],r=0;r<t;r++){var a=e[r];n.push(a.high),n.push(a.low)}return B.create(n,this.sigBytes)},clone:function(){for(var e=U.clone.call(this),t=e.words=this.words.slice(0),n=t.length,r=0;r<n;r++)t[r]=t[r].clone();return e}}),function(p){var e=_e,t=e.lib,u=t.WordArray,n=t.Hasher,r=e.x64.Word,o=e.algo,c=[],l=[],d=[];!function(){for(var e=1,t=0,n=0;n<24;n++){c[e+5*t]=(n+1)*(n+2)/2%64;var o=(2*e+3*t)%5;e=t%5,t=o}for(e=0;e<5;e++)for(t=0;t<5;t++)l[e+5*t]=t+(2*e+3*t)%5*5;for(var a=1,h=0;h<24;h++){for(var i=0,s=0,f=0;f<7;f++){if(1&a){var m=(1<<f)-1;m<32?s^=1<<m:i^=1<<m-32}128&a?a=a<<1^113:a<<=1}d[h]=r.create(i,s)}}();var h=[];!function(){for(var e=0;e<25;e++)h[e]=r.create()}();var a=o.SHA3=n.extend({cfg:n.cfg.extend({outputLength:512}),_doReset:function(){for(var e=this._state=[],t=0;t<25;t++)e[t]=new r.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(e,t){for(var n=this._state,r=this.blockSize/2,a=0;a<r;a++){var o=e[t+2*a],i=e[t+2*a+1];o=16711935&(o<<8|o>>>24)|4278255360&(o<<24|o>>>8),i=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),(O=n[a]).high^=i,O.low^=o}for(var s=0;s<24;s++){for(var f=0;f<5;f++){for(var m=0,v=0,_=0;_<5;_++)m^=(O=n[f+5*_]).high,v^=O.low;var p=h[f];p.high=m,p.low=v}for(f=0;f<5;f++){var u=h[(f+4)%5],y=h[(f+1)%5],g=y.high,E=y.low;for(m=u.high^(g<<1|E>>>31),v=u.low^(E<<1|g>>>31),_=0;_<5;_++)(O=n[f+5*_]).high^=m,O.low^=v}for(var C=1;C<25;C++){var b=(O=n[C]).high,w=O.low,S=c[C];v=S<32?(m=b<<S|w>>>32-S,w<<S|b>>>32-S):(m=w<<S-32|b>>>64-S,b<<S-32|w>>>64-S);var T=h[l[C]];T.high=m,T.low=v}var A=h[0],R=n[0];for(A.high=R.high,A.low=R.low,f=0;f<5;f++)for(_=0;_<5;_++){var O=n[C=f+5*_],I=h[C],k=h[(f+1)%5+5*_],N=h[(f+2)%5+5*_];O.high=I.high^~k.high&N.high,O.low=I.low^~k.low&N.low}O=n[0];var L=d[s];O.high^=L.high,O.low^=L.low}},_doFinalize:function(){var e=this._data,t=e.words,n=(this._nDataBytes,8*e.sigBytes),r=32*this.blockSize;t[n>>>5]|=1<<24-n%32,t[(p.ceil((n+1)/r)*r>>>5)-1]|=128,e.sigBytes=4*t.length,this._process();for(var a=this._state,o=this.cfg.outputLength/8,i=o/8,s=[],c=0;c<i;c++){var l=a[c],d=l.high,h=l.low;d=16711935&(d<<8|d>>>24)|4278255360&(d<<24|d>>>8),h=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8),s.push(h),s.push(d)}return new u.init(s,o)},clone:function(){for(var e=n.clone.call(this),t=e._state=this._state.slice(0),r=0;r<25;r++)t[r]=t[r].clone();return e}});e.SHA3=n._createHelper(a),e.HmacSHA3=n._createHmacHelper(a)}(Math),function(){var e=_e,t=e.lib.Hasher,n=e.x64,r=n.Word,a=n.WordArray,o=e.algo;function i(){return r.create.apply(r,arguments)}var c=[i(1116352408,3609767458),i(1899447441,602891725),i(3049323471,3964484399),i(3921009573,2173295548),i(961987163,4081628472),i(1508970993,3053834265),i(2453635748,2937671579),i(2870763221,3664609560),i(3624381080,2734883394),i(310598401,1164996542),i(607225278,1323610764),i(1426881987,3590304994),i(1925078388,4068182383),i(2162078206,991336113),i(2614888103,633803317),i(3248222580,3479774868),i(3835390401,2666613458),i(4022224774,944711139),i(264347078,2341262773),i(604807628,2007800933),i(770255983,1495990901),i(1249150122,1856431235),i(1555081692,3175218132),i(1996064986,2198950837),i(2554220882,3999719339),i(2821834349,766784016),i(2952996808,2566594879),i(3210313671,3203337956),i(3336571891,1034457026),i(3584528711,2466948901),i(113926993,3758326383),i(338241895,168717936),i(666307205,1188179964),i(773529912,1546045734),i(1294757372,1522805485),i(1396182291,2643833823),i(1695183700,2343527390),i(1986661051,1014477480),i(2177026350,1206759142),i(2456956037,344077627),i(2730485921,1290863460),i(2820302411,3158454273),i(3259730800,3505952657),i(3345764771,106217008),i(3516065817,3606008344),i(3600352804,1432725776),i(4094571909,1467031594),i(275423344,851169720),i(430227734,3100823752),i(506948616,1363258195),i(659060556,3750685593),i(883997877,3785050280),i(958139571,3318307427),i(1322822218,3812723403),i(1537002063,2003034995),i(1747873779,3602036899),i(1955562222,1575990012),i(2024104815,1125592928),i(2227730452,2716904306),i(2361852424,442776044),i(2428436474,593698344),i(2756734187,3733110249),i(3204031479,2999351573),i(3329325298,3815920427),i(3391569614,3928383900),i(3515267271,566280711),i(3940187606,3454069534),i(4118630271,4000239992),i(116418474,1914138554),i(174292421,2731055270),i(289380356,3203993006),i(460393269,320620315),i(685471733,587496836),i(852142971,1086792851),i(1017036298,365543100),i(1126000580,2618297676),i(1288033470,3409855158),i(1501505948,4234509866),i(1607167915,987167468),i(1816402316,1246189591)],l=[];!function(){for(var e=0;e<80;e++)l[e]=i()}();var s=o.SHA512=t.extend({_doReset:function(){this._hash=new a.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],a=n[1],o=n[2],i=n[3],s=n[4],d=n[5],h=n[6],f=n[7],m=r.high,p=r.low,u=a.high,v=a.low,g=o.high,_=o.low,y=i.high,b=i.low,E=s.high,C=s.low,w=d.high,S=d.low,T=h.high,A=h.low,R=f.high,O=f.low,I=m,k=p,N=u,L=v,M=g,x=_,D=y,P=b,U=E,B=C,F=w,V=S,j=T,H=A,$=R,z=O,W=0;W<80;W++){var K,G,Y=l[W];if(W<16)G=Y.high=0|e[t+2*W],K=Y.low=0|e[t+2*W+1];else{var X=l[W-15],Z=X.high,q=X.low,Q=(Z>>>1|q<<31)^(Z>>>8|q<<24)^Z>>>7,J=(q>>>1|Z<<31)^(q>>>8|Z<<24)^(q>>>7|Z<<25),ee=l[W-2],te=ee.high,ne=ee.low,re=(te>>>19|ne<<13)^(te<<3|ne>>>29)^te>>>6,ie=(ne>>>19|te<<13)^(ne<<3|te>>>29)^(ne>>>6|te<<26),oe=l[W-7],ae=oe.high,se=oe.low,ce=l[W-16],le=ce.high,de=ce.low;G=(G=(G=Q+ae+((K=J+se)>>>0<J>>>0?1:0))+re+((K+=ie)>>>0<ie>>>0?1:0))+le+((K+=de)>>>0<de>>>0?1:0),Y.high=G,Y.low=K}var ue,he=U&F^~U&j,fe=B&V^~B&H,pe=I&N^I&M^N&M,ge=k&L^k&x^L&x,me=(I>>>28|k<<4)^(I<<30|k>>>2)^(I<<25|k>>>7),ve=(k>>>28|I<<4)^(k<<30|I>>>2)^(k<<25|I>>>7),be=(U>>>14|B<<18)^(U>>>18|B<<14)^(U<<23|B>>>9),_e=(B>>>14|U<<18)^(B>>>18|U<<14)^(B<<23|U>>>9),ye=c[W],Ee=ye.high,Ce=ye.low,we=$+be+((ue=z+_e)>>>0<z>>>0?1:0),Se=ve+ge;$=j,z=H,j=F,H=V,F=U,V=B,U=D+(we=(we=(we=we+he+((ue+=fe)>>>0<fe>>>0?1:0))+Ee+((ue+=Ce)>>>0<Ce>>>0?1:0))+G+((ue+=K)>>>0<K>>>0?1:0))+((B=P+ue|0)>>>0<P>>>0?1:0)|0,D=M,P=x,M=N,x=L,N=I,L=k,I=we+(me+pe+(Se>>>0<ve>>>0?1:0))+((k=ue+Se|0)>>>0<ue>>>0?1:0)|0}p=r.low=p+k,r.high=m+I+(p>>>0<k>>>0?1:0),v=a.low=v+L,a.high=u+N+(v>>>0<L>>>0?1:0),_=o.low=_+x,o.high=g+M+(_>>>0<x>>>0?1:0),b=i.low=b+P,i.high=y+D+(b>>>0<P>>>0?1:0),C=s.low=C+B,s.high=E+U+(C>>>0<B>>>0?1:0),S=d.low=S+V,d.high=w+F+(S>>>0<V>>>0?1:0),A=h.low=A+H,h.high=T+j+(A>>>0<H>>>0?1:0),O=f.low=O+z,f.high=R+$+(O>>>0<z>>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=t.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32});e.SHA512=t._createHelper(s),e.HmacSHA512=t._createHmacHelper(s)}(),j=(V=_e).x64,H=j.Word,$=j.WordArray,z=V.algo,W=z.SHA512,K=z.SHA384=W.extend({_doReset:function(){this._hash=new $.init([new H.init(3418070365,3238371032),new H.init(1654270250,914150663),new H.init(2438529370,812702999),new H.init(355462360,4144912697),new H.init(1731405415,4290775857),new H.init(2394180231,1750603025),new H.init(3675008525,1694076839),new H.init(1203062813,3204075428)])},_doFinalize:function(){var e=W._doFinalize.call(this);return e.sigBytes-=16,e}}),V.SHA384=W._createHelper(K),V.HmacSHA384=W._createHmacHelper(K),_e.lib.Cipher||(X=(Y=(G=_e).lib).Base,Z=Y.WordArray,q=Y.BufferedBlockAlgorithm,(Q=G.enc).Utf8,J=Q.Base64,ee=G.algo.EvpKDF,te=Y.Cipher=q.extend({cfg:X.extend(),createEncryptor:function(e,t){return this.create(this._ENC_XFORM_MODE,e,t)},createDecryptor:function(e,t){return this.create(this._DEC_XFORM_MODE,e,t)},init:function(e,t,n){this.cfg=this.cfg.extend(n),this._xformMode=e,this._key=t,this.reset()},reset:function(){q.reset.call(this),this._doReset()},process:function(e){return this._append(e),this._process()},finalize:function(e){return e&&this._append(e),this._doFinalize()},keySize:4,ivSize:4,_ENC_XFORM_MODE:1,_DEC_XFORM_MODE:2,_createHelper:function(){function a(e){return"string"==typeof e?de:ce}return function(e){return{encrypt:function(t,n,r){return a(n).encrypt(e,t,n,r)},decrypt:function(t,n,r){return a(n).decrypt(e,t,n,r)}}}}()}),Y.StreamCipher=te.extend({_doFinalize:function(){return this._process(!0)},blockSize:1}),ne=G.mode={},re=Y.BlockCipherMode=X.extend({createEncryptor:function(e,t){return this.Encryptor.create(e,t)},createDecryptor:function(e,t){return this.Decryptor.create(e,t)},init:function(e,t){this._cipher=e,this._iv=t}}),ie=ne.CBC=function(){var e=re.extend();function t(e,t,n){var r,a=this._iv;a?(r=a,this._iv=void 0):r=this._prevBlock;for(var o=0;o<n;o++)e[t+o]^=r[o]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize;t.call(this,e,n,o),r.encryptBlock(e,n),this._prevBlock=e.slice(n,n+o)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize,a=e.slice(n,n+o);r.decryptBlock(e,n),t.call(this,e,n,o),this._prevBlock=a}}),e}(),oe=(G.pad={}).Pkcs7={pad:function(e,t){for(var n=4*t,r=n-e.sigBytes%n,a=r<<24|r<<16|r<<8|r,o=[],i=0;i<r;i+=4)o.push(a);var s=Z.create(o,r);e.concat(s)},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},Y.BlockCipher=te.extend({cfg:te.cfg.extend({mode:ie,padding:oe}),reset:function(){var e;te.reset.call(this);var t=this.cfg,n=t.iv,r=t.mode;this._xformMode==this._ENC_XFORM_MODE?e=r.createEncryptor:(e=r.createDecryptor,this._minBufferSize=1),this._mode&&this._mode.__creator==e?this._mode.init(this,n&&n.words):(this._mode=e.call(r,this,n&&n.words),this._mode.__creator=e)},_doProcessBlock:function(e,t){this._mode.processBlock(e,t)},_doFinalize:function(){var e,t=this.cfg.padding;return this._xformMode==this._ENC_XFORM_MODE?(t.pad(this._data,this.blockSize),e=this._process(!0)):(e=this._process(!0),t.unpad(e)),e},blockSize:4}),ae=Y.CipherParams=X.extend({init:function(e){this.mixIn(e)},toString:function(e){return(e||this.formatter).stringify(this)}}),se=(G.format={}).OpenSSL={stringify:function(e){var t=e.ciphertext,n=e.salt;return(n?Z.create([1398893684,1701076831]).concat(n).concat(t):t).toString(J)},parse:function(e){var t,n=J.parse(e),r=n.words;return 1398893684==r[0]&&1701076831==r[1]&&(t=Z.create(r.slice(2,4)),r.splice(0,4),n.sigBytes-=16),ae.create({ciphertext:n,salt:t})}},ce=Y.SerializableCipher=X.extend({cfg:X.extend({format:se}),encrypt:function(e,t,n,r){r=this.cfg.extend(r);var a=e.createEncryptor(n,r),o=a.finalize(t),i=a.cfg;return ae.create({ciphertext:o,key:n,iv:i.iv,algorithm:e,mode:i.mode,padding:i.padding,blockSize:e.blockSize,formatter:r.format})},decrypt:function(e,t,n,r){return r=this.cfg.extend(r),t=this._parse(t,r.format),e.createDecryptor(n,r).finalize(t.ciphertext)},_parse:function(e,t){return"string"==typeof e?t.parse(e,this):e}}),le=(G.kdf={}).OpenSSL={execute:function(e,t,n,r){r||(r=Z.random(8));var a=ee.create({keySize:t+n}).compute(e,r),o=Z.create(a.words.slice(t),4*n);return a.sigBytes=4*t,ae.create({key:a,iv:o,salt:r})}},de=Y.PasswordBasedCipher=ce.extend({cfg:ce.cfg.extend({kdf:le}),encrypt:function(e,t,n,r){var a=(r=this.cfg.extend(r)).kdf.execute(n,e.keySize,e.ivSize);r.iv=a.iv;var o=ce.encrypt.call(this,e,t,a.key,r);return o.mixIn(a),o},decrypt:function(e,t,n,r){r=this.cfg.extend(r),t=this._parse(t,r.format);var a=r.kdf.execute(n,e.keySize,e.ivSize,t.salt);return r.iv=a.iv,ce.decrypt.call(this,e,t,a.key,r)}})),_e.mode.CFB=function(){var e=_e.lib.BlockCipherMode.extend();function t(e,t,n,r){var a,o=this._iv;o?(a=o.slice(0),this._iv=void 0):a=this._prevBlock,r.encryptBlock(a,0);for(var i=0;i<n;i++)e[t+i]^=a[i]}return e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize;t.call(this,e,n,o,r),this._prevBlock=e.slice(n,n+o)}}),e.Decryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize,a=e.slice(n,n+o);t.call(this,e,n,o,r),this._prevBlock=a}}),e}(),_e.mode.ECB=((ue=_e.lib.BlockCipherMode.extend()).Encryptor=ue.extend({processBlock:function(e,t){this._cipher.encryptBlock(e,t)}}),ue.Decryptor=ue.extend({processBlock:function(e,t){this._cipher.decryptBlock(e,t)}}),ue),_e.pad.AnsiX923={pad:function(e,t){var n=e.sigBytes,r=4*t,a=r-n%r,o=n+a-1;e.clamp(),e.words[o>>>2]|=a<<24-o%4*8,e.sigBytes+=a},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},_e.pad.Iso10126={pad:function(e,t){var n=4*t,r=n-e.sigBytes%n;e.concat(_e.lib.WordArray.random(r-1)).concat(_e.lib.WordArray.create([r<<24],1))},unpad:function(e){var t=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=t}},_e.pad.Iso97971={pad:function(e,t){e.concat(_e.lib.WordArray.create([2147483648],1)),_e.pad.ZeroPadding.pad(e,t)},unpad:function(e){_e.pad.ZeroPadding.unpad(e),e.sigBytes--}},_e.mode.OFB=(fe=(he=_e.lib.BlockCipherMode.extend()).Encryptor=he.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,a=this._iv,o=this._keystream;a&&(o=this._keystream=a.slice(0),this._iv=void 0),n.encryptBlock(o,0);for(var i=0;i<r;i++)e[t+i]^=o[i]}}),he.Decryptor=fe,he),_e.pad.NoPadding={pad:function(){},unpad:function(){}},ge=(pe=_e).lib.CipherParams,me=pe.enc.Hex,pe.format.Hex={stringify:function(e){return e.ciphertext.toString(me)},parse:function(e){var t=me.parse(e);return ge.create({ciphertext:t})}},function(){var e=_e,t=e.lib.BlockCipher,n=e.algo,r=[],o=[],c=[],p=[],u=[],l=[],g=[],d=[],h=[],b=[];!function(){for(var e=[],t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;var n=0,f=0;for(t=0;t<256;t++){var a=f^f<<1^f<<2^f<<3^f<<4;a=a>>>8^255&a^99,r[n]=a;var m=e[o[a]=n],i=e[m],s=e[i],v=257*e[a]^16843008*a;c[n]=v<<24|v>>>8,p[n]=v<<16|v>>>16,u[n]=v<<8|v>>>24,l[n]=v,v=16843009*s^65537*i^257*m^16843008*n,g[a]=v<<24|v>>>8,d[a]=v<<16|v>>>16,h[a]=v<<8|v>>>24,b[a]=v,n?(n=m^e[e[e[s^m]]],f^=e[e[f]]):n=f=1}}();var f=[0,1,2,4,8,16,32,64,128,27,54],m=n.AES=t.extend({_doReset:function(){if(!this._nRounds||this._keyPriorReset!==this._key){for(var e=this._keyPriorReset=this._key,t=e.words,n=e.sigBytes/4,o=4*((this._nRounds=n+6)+1),a=this._keySchedule=[],c=0;c<o;c++)c<n?a[c]=t[c]:(l=a[c-1],c%n?6<n&&c%n==4&&(l=r[l>>>24]<<24|r[l>>>16&255]<<16|r[l>>>8&255]<<8|r[255&l]):(l=r[(l=l<<8|l>>>24)>>>24]<<24|r[l>>>16&255]<<16|r[l>>>8&255]<<8|r[255&l],l^=f[c/n|0]<<24),a[c]=a[c-n]^l);for(var i=this._invKeySchedule=[],s=0;s<o;s++){if(c=o-s,s%4)var l=a[c];else l=a[c-4];i[s]=s<4||c<=4?l:g[r[l>>>24]]^d[r[l>>>16&255]]^h[r[l>>>8&255]]^b[r[255&l]]}}},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._keySchedule,c,p,u,l,r)},decryptBlock:function(e,t){var n=e[t+1];e[t+1]=e[t+3],e[t+3]=n,this._doCryptBlock(e,t,this._invKeySchedule,g,d,h,b,o),n=e[t+1],e[t+1]=e[t+3],e[t+3]=n},_doCryptBlock:function(e,t,n,r,a,o,i,s){for(var c=this._nRounds,l=e[t]^n[0],d=e[t+1]^n[1],h=e[t+2]^n[2],p=e[t+3]^n[3],u=4,f=1;f<c;f++){var g=r[l>>>24]^a[d>>>16&255]^o[h>>>8&255]^i[255&p]^n[u++],m=r[d>>>24]^a[h>>>16&255]^o[p>>>8&255]^i[255&l]^n[u++],v=r[h>>>24]^a[p>>>16&255]^o[l>>>8&255]^i[255&d]^n[u++],b=r[p>>>24]^a[l>>>16&255]^o[d>>>8&255]^i[255&h]^n[u++];l=g,d=m,h=v,p=b}g=(s[l>>>24]<<24|s[d>>>16&255]<<16|s[h>>>8&255]<<8|s[255&p])^n[u++],m=(s[d>>>24]<<24|s[h>>>16&255]<<16|s[p>>>8&255]<<8|s[255&l])^n[u++],v=(s[h>>>24]<<24|s[p>>>16&255]<<16|s[l>>>8&255]<<8|s[255&d])^n[u++],b=(s[p>>>24]<<24|s[l>>>16&255]<<16|s[d>>>8&255]<<8|s[255&h])^n[u++],e[t]=g,e[t+1]=m,e[t+2]=v,e[t+3]=b},keySize:8});e.AES=t._createHelper(m)}(),function(){var e=_e,t=e.lib,a=t.WordArray,n=t.BlockCipher,r=e.algo,o=[57,49,41,33,25,17,9,1,58,50,42,34,26,18,10,2,59,51,43,35,27,19,11,3,60,52,44,36,63,55,47,39,31,23,15,7,62,54,46,38,30,22,14,6,61,53,45,37,29,21,13,5,28,20,12,4],c=[14,17,11,24,1,5,3,28,15,6,21,10,23,19,12,4,26,8,16,7,27,20,13,2,41,52,31,37,47,55,30,40,51,45,33,48,44,49,39,56,34,53,46,42,50,36,29,32],l=[1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28],p=[{0:8421888,268435456:32768,536870912:8421378,805306368:2,1073741824:512,1342177280:8421890,1610612736:8389122,1879048192:8388608,2147483648:514,2415919104:8389120,2684354560:33280,2952790016:8421376,3221225472:32770,3489660928:8388610,3758096384:0,4026531840:33282,134217728:0,402653184:8421890,671088640:33282,939524096:32768,1207959552:8421888,1476395008:512,1744830464:8421378,2013265920:2,2281701376:8389120,2550136832:33280,2818572288:8421376,3087007744:8389122,3355443200:8388610,3623878656:32770,3892314112:514,4160749568:8388608,1:32768,268435457:2,536870913:8421888,805306369:8388608,1073741825:8421378,1342177281:33280,1610612737:512,1879048193:8389122,2147483649:8421890,2415919105:8421376,2684354561:8388610,2952790017:33282,3221225473:514,3489660929:8389120,3758096385:32770,4026531841:0,134217729:8421890,402653185:8421376,671088641:8388608,939524097:512,1207959553:32768,1476395009:8388610,1744830465:2,2013265921:33282,2281701377:32770,2550136833:8389122,2818572289:514,3087007745:8421888,3355443201:8389120,3623878657:0,3892314113:33280,4160749569:8421378},{0:1074282512,16777216:16384,33554432:524288,50331648:1074266128,67108864:1073741840,83886080:1074282496,100663296:1073758208,117440512:16,134217728:540672,150994944:1073758224,167772160:1073741824,184549376:540688,201326592:524304,218103808:0,234881024:16400,251658240:1074266112,8388608:1073758208,25165824:540688,41943040:16,58720256:1073758224,75497472:1074282512,92274688:1073741824,109051904:524288,125829120:1074266128,142606336:524304,159383552:0,176160768:16384,192937984:1074266112,209715200:1073741840,226492416:540672,243269632:1074282496,260046848:16400,268435456:0,285212672:1074266128,301989888:1073758224,318767104:1074282496,335544320:1074266112,352321536:16,369098752:540688,385875968:16384,402653184:16400,419430400:524288,436207616:524304,452984832:1073741840,469762048:540672,486539264:1073758208,503316480:1073741824,520093696:1074282512,276824064:540688,293601280:524288,310378496:1074266112,327155712:16384,343932928:1073758208,360710144:1074282512,377487360:16,394264576:1073741824,411041792:1074282496,427819008:1073741840,444596224:1073758224,461373440:524304,478150656:0,494927872:16400,511705088:1074266128,528482304:540672},{0:260,1048576:0,2097152:67109120,3145728:65796,4194304:65540,5242880:67108868,6291456:67174660,7340032:67174400,8388608:67108864,9437184:67174656,10485760:65792,11534336:67174404,12582912:67109124,13631488:65536,14680064:4,15728640:256,524288:67174656,1572864:67174404,2621440:0,3670016:67109120,4718592:67108868,5767168:65536,6815744:65540,7864320:260,8912896:4,9961472:256,11010048:67174400,12058624:65796,13107200:65792,14155776:67109124,15204352:67174660,16252928:67108864,16777216:67174656,17825792:65540,18874368:65536,19922944:67109120,20971520:256,22020096:67174660,23068672:67108868,24117248:0,25165824:67109124,26214400:67108864,27262976:4,28311552:65792,29360128:67174400,30408704:260,31457280:65796,32505856:67174404,17301504:67108864,18350080:260,19398656:67174656,20447232:0,21495808:65540,22544384:67109120,23592960:256,24641536:67174404,25690112:65536,26738688:67174660,27787264:65796,28835840:67108868,29884416:67109124,30932992:67174400,31981568:4,33030144:65792},{0:2151682048,65536:2147487808,131072:4198464,196608:2151677952,262144:0,327680:4198400,393216:2147483712,458752:4194368,524288:2147483648,589824:4194304,655360:64,720896:2147487744,786432:2151678016,851968:4160,917504:4096,983040:2151682112,32768:2147487808,98304:64,163840:2151678016,229376:2147487744,294912:4198400,360448:2151682112,425984:0,491520:2151677952,557056:4096,622592:2151682048,688128:4194304,753664:4160,819200:2147483648,884736:4194368,950272:4198464,1015808:2147483712,1048576:4194368,1114112:4198400,1179648:2147483712,1245184:0,1310720:4160,1376256:2151678016,1441792:2151682048,1507328:2147487808,1572864:2151682112,1638400:2147483648,1703936:2151677952,1769472:4198464,1835008:2147487744,1900544:4194304,1966080:64,2031616:4096,1081344:2151677952,1146880:2151682112,1212416:0,1277952:4198400,1343488:4194368,1409024:2147483648,1474560:2147487808,1540096:64,1605632:2147483712,1671168:4096,1736704:2147487744,1802240:2151678016,1867776:4160,1933312:2151682048,1998848:4194304,2064384:4198464},{0:128,4096:17039360,8192:262144,12288:536870912,16384:537133184,20480:16777344,24576:553648256,28672:262272,32768:16777216,36864:537133056,40960:536871040,45056:553910400,49152:553910272,53248:0,57344:17039488,61440:553648128,2048:17039488,6144:553648256,10240:128,14336:17039360,18432:262144,22528:537133184,26624:553910272,30720:536870912,34816:537133056,38912:0,43008:553910400,47104:16777344,51200:536871040,55296:553648128,59392:16777216,63488:262272,65536:262144,69632:128,73728:536870912,77824:553648256,81920:16777344,86016:553910272,90112:537133184,94208:16777216,98304:553910400,102400:553648128,106496:17039360,110592:537133056,114688:262272,118784:536871040,122880:0,126976:17039488,67584:553648256,71680:16777216,75776:17039360,79872:537133184,83968:536870912,88064:17039488,92160:128,96256:553910272,100352:262272,104448:553910400,108544:0,112640:553648128,116736:16777344,120832:262144,124928:537133056,129024:536871040},{0:268435464,256:8192,512:270532608,768:270540808,1024:268443648,1280:2097152,1536:2097160,1792:268435456,2048:0,2304:268443656,2560:2105344,2816:8,3072:270532616,3328:2105352,3584:8200,3840:270540800,128:270532608,384:270540808,640:8,896:2097152,1152:2105352,1408:268435464,1664:268443648,1920:8200,2176:2097160,2432:8192,2688:268443656,2944:270532616,3200:0,3456:270540800,3712:2105344,3968:268435456,4096:268443648,4352:270532616,4608:270540808,4864:8200,5120:2097152,5376:268435456,5632:268435464,5888:2105344,6144:2105352,6400:0,6656:8,6912:270532608,7168:8192,7424:268443656,7680:270540800,7936:2097160,4224:8,4480:2105344,4736:2097152,4992:268435464,5248:268443648,5504:8200,5760:270540808,6016:270532608,6272:270540800,6528:270532616,6784:8192,7040:2105352,7296:2097160,7552:0,7808:268435456,8064:268443656},{0:1048576,16:33555457,32:1024,48:1049601,64:34604033,80:0,96:1,112:34603009,128:33555456,144:1048577,160:33554433,176:34604032,192:34603008,208:1025,224:1049600,240:33554432,8:34603009,24:0,40:33555457,56:34604032,72:1048576,88:33554433,104:33554432,120:1025,136:1049601,152:33555456,168:34603008,184:1048577,200:1024,216:34604033,232:1,248:1049600,256:33554432,272:1048576,288:33555457,304:34603009,320:1048577,336:33555456,352:34604032,368:1049601,384:1025,400:34604033,416:1049600,432:1,448:0,464:34603008,480:33554433,496:1024,264:1049600,280:33555457,296:34603009,312:1,328:33554432,344:1048576,360:1025,376:34604032,392:33554433,408:34603008,424:0,440:34604033,456:1049601,472:1024,488:33555456,504:1048577},{0:134219808,1:131072,2:134217728,3:32,4:131104,5:134350880,6:134350848,7:2048,8:134348800,9:134219776,10:133120,11:134348832,12:2080,13:0,14:134217760,15:133152,2147483648:2048,2147483649:134350880,2147483650:134219808,2147483651:134217728,2147483652:134348800,2147483653:133120,2147483654:133152,2147483655:32,2147483656:134217760,2147483657:2080,2147483658:131104,2147483659:134350848,2147483660:0,2147483661:134348832,2147483662:134219776,2147483663:131072,16:133152,17:134350848,18:32,19:2048,20:134219776,21:134217760,22:134348832,23:131072,24:0,25:131104,26:134348800,27:134219808,28:134350880,29:133120,30:2080,31:134217728,2147483664:131072,2147483665:2048,2147483666:134348832,2147483667:133152,2147483668:32,2147483669:134348800,2147483670:134217728,2147483671:134219808,2147483672:134350880,2147483673:134217760,2147483674:134219776,2147483675:0,2147483676:133120,2147483677:2080,2147483678:131104,2147483679:134350848}],u=[4160749569,528482304,33030144,2064384,129024,8064,504,2147483679],d=r.DES=n.extend({_doReset:function(){for(var e=this._key.words,t=[],n=0;n<56;n++){var r=o[n]-1;t[n]=e[r>>>5]>>>31-r%32&1}for(var a=this._subKeys=[],d=0;d<16;d++){var i=a[d]=[],s=l[d];for(n=0;n<24;n++)i[n/6|0]|=t[(c[n]-1+s)%28]<<31-n%6,i[4+(n/6|0)]|=t[28+(c[n+24]-1+s)%28]<<31-n%6;for(i[0]=i[0]<<1|i[0]>>>31,n=1;n<7;n++)i[n]=i[n]>>>4*(n-1)+3;i[7]=i[7]<<5|i[7]>>>27}var h=this._invSubKeys=[];for(n=0;n<16;n++)h[n]=a[15-n]},encryptBlock:function(e,t){this._doCryptBlock(e,t,this._subKeys)},decryptBlock:function(e,t){this._doCryptBlock(e,t,this._invSubKeys)},_doCryptBlock:function(e,t,n){this._lBlock=e[t],this._rBlock=e[t+1],h.call(this,4,252645135),h.call(this,16,65535),g.call(this,2,858993459),g.call(this,8,16711935),h.call(this,1,1431655765);for(var r=0;r<16;r++){for(var a=n[r],o=this._lBlock,i=this._rBlock,s=0,c=0;c<8;c++)s|=p[c][((i^a[c])&u[c])>>>0];this._lBlock=i,this._rBlock=o^s}var l=this._lBlock;this._lBlock=this._rBlock,this._rBlock=l,h.call(this,1,1431655765),g.call(this,8,16711935),g.call(this,2,858993459),h.call(this,16,65535),h.call(this,4,252645135),e[t]=this._lBlock,e[t+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});function h(e,t){var n=(this._lBlock>>>e^this._rBlock)&t;this._rBlock^=n,this._lBlock^=n<<e}function g(e,t){var n=(this._rBlock>>>e^this._lBlock)&t;this._lBlock^=n,this._rBlock^=n<<e}e.DES=n._createHelper(d);var i=r.TripleDES=n.extend({_doReset:function(){var e=this._key.words;if(2!==e.length&&4!==e.length&&e.length<6)throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");var t=e.slice(0,2),n=e.length<4?e.slice(0,2):e.slice(2,4),r=e.length<6?e.slice(0,2):e.slice(4,6);this._des1=d.createEncryptor(a.create(t)),this._des2=d.createEncryptor(a.create(n)),this._des3=d.createEncryptor(a.create(r))},encryptBlock:function(e,t){this._des1.encryptBlock(e,t),this._des2.decryptBlock(e,t),this._des3.encryptBlock(e,t)},decryptBlock:function(e,t){this._des3.decryptBlock(e,t),this._des2.encryptBlock(e,t),this._des1.decryptBlock(e,t)},keySize:6,ivSize:2,blockSize:2});e.TripleDES=n._createHelper(i)}(),function(){var e=_e,t=e.lib.StreamCipher,n=e.algo,r=n.RC4=t.extend({_doReset:function(){for(var e=this._key,t=e.words,n=e.sigBytes,r=this._S=[],a=0;a<256;a++)r[a]=a;a=0;for(var o=0;a<256;a++){var i=a%n,s=t[i>>>2]>>>24-i%4*8&255;o=(o+r[a]+s)%256;var c=r[a];r[a]=r[o],r[o]=c}this._i=this._j=0},_doProcessBlock:function(e,t){e[t]^=a.call(this)},keySize:8,ivSize:0});function a(){for(var e=this._S,t=this._i,n=this._j,r=0,a=0;a<4;a++){n=(n+e[t=(t+1)%256])%256;var o=e[t];e[t]=e[n],e[n]=o,r|=e[(e[t]+e[n])%256]<<24-8*a}return this._i=t,this._j=n,r}e.RC4=t._createHelper(r);var o=n.RC4Drop=r.extend({cfg:r.cfg.extend({drop:192}),_doReset:function(){r._doReset.call(this);for(var e=this.cfg.drop;0<e;e--)a.call(this)}});e.RC4Drop=t._createHelper(o)}(),_e.mode.CTRGladman=function(){var e=_e.lib.BlockCipherMode.extend();function t(e){if(255==(e>>24&255)){var t=e>>16&255,n=e>>8&255,r=255&e;255===t?(t=0,255===n?(n=0,255===r?r=0:++r):++n):++t,e=0,e+=t<<16,e+=n<<8,e+=r}else e+=1<<24;return e}var n=e.Encryptor=e.extend({processBlock:function(e,n){var r=this._cipher,o=r.blockSize,a=this._iv,c=this._counter;a&&(c=this._counter=a.slice(0),this._iv=void 0),function(e){0===(e[0]=t(e[0]))&&(e[1]=t(e[1]))}(c);var i=c.slice(0);r.encryptBlock(i,0);for(var s=0;s<o;s++)e[n+s]^=i[s]}});return e.Decryptor=n,e}(),function(){var e=_e,t=e.lib.StreamCipher,n=e.algo,a=[],r=[],o=[],c=n.Rabbit=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=0;n<4;n++)e[n]=16711935&(e[n]<<8|e[n]>>>24)|4278255360&(e[n]<<24|e[n]>>>8);var r=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],a=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]];for(n=this._b=0;n<4;n++)p.call(this);for(n=0;n<8;n++)a[n]^=r[n+4&7];if(t){var o=t.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&l,h=l<<16|65535&c;for(a[0]^=c,a[1]^=d,a[2]^=l,a[3]^=h,a[4]^=c,a[5]^=d,a[6]^=l,a[7]^=h,n=0;n<4;n++)p.call(this)}},_doProcessBlock:function(e,t){var n=this._X;p.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var c=e[n]+t[n],a=65535&c,l=c>>>16,i=((a*a>>>17)+a*l>>>15)+l*l,s=((4294901760&c)*c|0)+((65535&c)*c|0);o[n]=i^s}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.Rabbit=t._createHelper(c)}(),_e.mode.CTR=(be=(ve=_e.lib.BlockCipherMode.extend()).Encryptor=ve.extend({processBlock:function(e,t){var n=this._cipher,r=n.blockSize,a=this._iv,o=this._counter;a&&(o=this._counter=a.slice(0),this._iv=void 0);var i=o.slice(0);n.encryptBlock(i,0),o[r-1]=o[r-1]+1|0;for(var s=0;s<r;s++)e[t+s]^=i[s]}}),ve.Decryptor=be,ve),function(){var e=_e,t=e.lib.StreamCipher,n=e.algo,a=[],r=[],o=[],c=n.RabbitLegacy=t.extend({_doReset:function(){for(var e=this._key.words,t=this.cfg.iv,n=this._X=[e[0],e[3]<<16|e[2]>>>16,e[1],e[0]<<16|e[3]>>>16,e[2],e[1]<<16|e[0]>>>16,e[3],e[2]<<16|e[1]>>>16],r=this._C=[e[2]<<16|e[2]>>>16,4294901760&e[0]|65535&e[1],e[3]<<16|e[3]>>>16,4294901760&e[1]|65535&e[2],e[0]<<16|e[0]>>>16,4294901760&e[2]|65535&e[3],e[1]<<16|e[1]>>>16,4294901760&e[3]|65535&e[0]],a=this._b=0;a<4;a++)p.call(this);for(a=0;a<8;a++)r[a]^=n[a+4&7];if(t){var o=t.words,i=o[0],s=o[1],c=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8),l=16711935&(s<<8|s>>>24)|4278255360&(s<<24|s>>>8),d=c>>>16|4294901760&l,h=l<<16|65535&c;for(r[0]^=c,r[1]^=d,r[2]^=l,r[3]^=h,r[4]^=c,r[5]^=d,r[6]^=l,r[7]^=h,a=0;a<4;a++)p.call(this)}},_doProcessBlock:function(e,t){var n=this._X;p.call(this),a[0]=n[0]^n[5]>>>16^n[3]<<16,a[1]=n[2]^n[7]>>>16^n[5]<<16,a[2]=n[4]^n[1]>>>16^n[7]<<16,a[3]=n[6]^n[3]>>>16^n[1]<<16;for(var r=0;r<4;r++)a[r]=16711935&(a[r]<<8|a[r]>>>24)|4278255360&(a[r]<<24|a[r]>>>8),e[t+r]^=a[r]},blockSize:4,ivSize:2});function p(){for(var e=this._X,t=this._C,n=0;n<8;n++)r[n]=t[n];for(t[0]=t[0]+1295307597+this._b|0,t[1]=t[1]+3545052371+(t[0]>>>0<r[0]>>>0?1:0)|0,t[2]=t[2]+886263092+(t[1]>>>0<r[1]>>>0?1:0)|0,t[3]=t[3]+1295307597+(t[2]>>>0<r[2]>>>0?1:0)|0,t[4]=t[4]+3545052371+(t[3]>>>0<r[3]>>>0?1:0)|0,t[5]=t[5]+886263092+(t[4]>>>0<r[4]>>>0?1:0)|0,t[6]=t[6]+1295307597+(t[5]>>>0<r[5]>>>0?1:0)|0,t[7]=t[7]+3545052371+(t[6]>>>0<r[6]>>>0?1:0)|0,this._b=t[7]>>>0<r[7]>>>0?1:0,n=0;n<8;n++){var c=e[n]+t[n],a=65535&c,l=c>>>16,i=((a*a>>>17)+a*l>>>15)+l*l,s=((4294901760&c)*c|0)+((65535&c)*c|0);o[n]=i^s}e[0]=o[0]+(o[7]<<16|o[7]>>>16)+(o[6]<<16|o[6]>>>16)|0,e[1]=o[1]+(o[0]<<8|o[0]>>>24)+o[7]|0,e[2]=o[2]+(o[1]<<16|o[1]>>>16)+(o[0]<<16|o[0]>>>16)|0,e[3]=o[3]+(o[2]<<8|o[2]>>>24)+o[1]|0,e[4]=o[4]+(o[3]<<16|o[3]>>>16)+(o[2]<<16|o[2]>>>16)|0,e[5]=o[5]+(o[4]<<8|o[4]>>>24)+o[3]|0,e[6]=o[6]+(o[5]<<16|o[5]>>>16)+(o[4]<<16|o[4]>>>16)|0,e[7]=o[7]+(o[6]<<8|o[6]>>>24)+o[5]|0}e.RabbitLegacy=t._createHelper(c)}(),_e.pad.ZeroPadding={pad:function(e,t){var n=4*t;e.clamp(),e.sigBytes+=n-(e.sigBytes%n||n)},unpad:function(e){var t=e.words,n=e.sigBytes-1;for(n=e.sigBytes-1;0<=n;n--)if(t[n>>>2]>>>24-n%4*8&255){e.sigBytes=n+1;break}}},{init:function(){},cryptoJS:_e}},Object.assign(r.DEFAULTS,{fontFamily:{"Arial,Helvetica,sans-serif":"Arial","Georgia,serif":"Georgia","Impact,Charcoal,sans-serif":"Impact","Tahoma,Geneva,sans-serif":"Tahoma","Times New Roman,Times,serif,-webkit-standard":"Times New Roman","Verdana,Geneva,sans-serif":"Verdana"},fontFamilySelection:!1,fontFamilyDefaultSelection:"Font Family"}),r.PLUGINS.fontFamily=function(a){var e=a.$;function i(t){var n=t.replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'| /g,"").split(",");return e(this).grep(n,(function(e){return 0<e.length}))}function s(e,t){for(var n=0;n<e.length;n++)for(var r=0;r<t.length;r++)if(e[n].toLowerCase()===t[r].toLowerCase())return[n,r];return null}function t(){var t=i(e(a.selection.element()).css("font-family")),n=[];for(var r in a.opts.fontFamily)if(a.opts.fontFamily.hasOwnProperty(r)){var o=s(t,i(r));o&&n.push([r,o])}return 0===n.length?null:(n.sort((function(e,t){var n=e[1][0]-t[1][0];return 0===n?e[1][1]-t[1][1]:n})),n[0][0])}return{apply:function(e){a.format.applyStyle("font-family",e)},refreshOnShow:function(e,n){n.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),n.find('.fr-command[data-param1="'.concat(t(),'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function(n){if(a.opts.fontFamilySelection){var r=e(a.selection.element()).css("font-family").replace(/(sans-serif|serif|monospace|cursive|fantasy)/gi,"").replace(/"|'|/g,"").split(",");n.find("> span").text(a.opts.fontFamily[t()]||r[0]||a.language.translate(a.opts.fontFamilyDefaultSelection))}}}},r.RegisterCommand("fontFamily",{type:"dropdown",displaySelection:function(e){return e.opts.fontFamilySelection},defaultSelection:function(e){return e.opts.fontFamilyDefaultSelection},displaySelectionWidth:120,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontFamily;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontFamily" data-param1="'.concat(n,'" \n        style="font-family: ').concat(n,'" title="').concat(t[n],'">').concat(t[n],"</a></li>"));return e+"</ul>"},title:"Font Family",callback:function(e,t){this.fontFamily.apply(t)},refresh:function(e){this.fontFamily.refresh(e)},refreshOnShow:function(e,t){this.fontFamily.refreshOnShow(e,t)},plugin:"fontFamily"}),r.DefineIcon("fontFamily",{NAME:"font",SVG_KEY:"fontFamily"}),Object.assign(r.DEFAULTS,{fontSize:["8","9","10","11","12","14","18","24","30","36","48","60","72","96"],fontSizeSelection:!1,fontSizeDefaultSelection:"12",fontSizeUnit:"px"}),r.PLUGINS.fontSize=function(e){var a=e.$;return{apply:function(t){e.format.applyStyle("font-size",t)},refreshOnShow:function(t,n){var r=a(e.selection.element()).css("font-size");"pt"===e.opts.fontSizeUnit&&(r="".concat(Math.round(72*parseFloat(r,10)/96),"pt")),n.find(".fr-command.fr-active").removeClass("fr-active").attr("aria-selected",!1),n.find('.fr-command[data-param1="'.concat(r,'"]')).addClass("fr-active").attr("aria-selected",!0)},refresh:function(t){if(e.opts.fontSizeSelection){var n=e.helpers.getPX(a(e.selection.element()).css("font-size"));"pt"===e.opts.fontSizeUnit&&(n="".concat(Math.round(72*parseFloat(n,10)/96),"pt")),t.find("> span").text(n)}}}},r.RegisterCommand("fontSize",{type:"dropdown",title:"Font Size",displaySelection:function(e){return e.opts.fontSizeSelection},displaySelectionWidth:30,defaultSelection:function(e){return e.opts.fontSizeDefaultSelection},html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.fontSize,n=0;n<t.length;n++){var r=t[n];e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="fontSize" data-param1="'.concat(r).concat(this.opts.fontSizeUnit,'" title="').concat(r,'">').concat(r,"</a></li>")}return e+"</ul>"},callback:function(e,t){this.fontSize.apply(t)},refresh:function(e){this.fontSize.refresh(e)},refreshOnShow:function(e,t){this.fontSize.refreshOnShow(e,t)},plugin:"fontSize"}),r.DefineIcon("fontSize",{NAME:"text-height",SVG_KEY:"fontSize"}),Object.assign(r.POPUP_TEMPLATES,{"forms.edit":"[_BUTTONS_]","forms.update":"[_BUTTONS_][_TEXT_LAYER_]"}),Object.assign(r.DEFAULTS,{formEditButtons:["inputStyle","inputEdit"],formStyles:{"fr-rounded":"Rounded","fr-large":"Large"},formMultipleStyles:!0,formUpdateButtons:["inputBack","|"]}),r.PLUGINS.forms=function(i){var s,e=i.$;function t(t){i.selection.clear(),e(this).data("mousedown",!0)}function n(t){e(this).data("mousedown")&&(t.stopPropagation(),e(this).removeData("mousedown"),c(s=this)),t.preventDefault()}function r(){i.$el.find("input, textarea, button").removeData("mousedown")}function a(){e(this).removeData("mousedown")}function o(){return s||null}function c(t){if(-1==["checkbox","radio"].indexOf(t.type)){var n=i.popups.get("forms.edit");n||(n=function(){var e="";0<i.opts.formEditButtons.length&&(e='<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formEditButtons),"</div>"));var t={buttons:e},n=i.popups.create("forms.edit",t);return i.$wp&&i.events.$on(i.$wp,"scroll.link-edit",(function(){o()&&i.popups.isVisible("forms.edit")&&c(o())})),n}());var r=e(s=t);i.popups.refresh("forms.edit"),i.popups.setContainer("forms.edit",i.$sc);var l=r.offset().left+r.outerWidth()/2,a=r.offset().top+r.outerHeight();i.popups.show("forms.edit",l,a,r.outerHeight())}}function l(){var t=i.popups.get("forms.update"),n=o();if(n){var r=e(n);r.is("button")?t.find('input[type="text"][name="text"]').val(r.text()):r.is("input[type=button]")||r.is("input[type=submit]")||r.is("input[type=reset]")?t.find('input[type="text"][name="text"]').val(r.val()):t.find('input[type="text"][name="text"]').val(r.attr("placeholder"))}t.find('input[type="text"][name="text"]').trigger("change")}function d(){s=null}function p(e){if(e)return i.popups.onRefresh("forms.update",l),i.popups.onHide("forms.update",d),!0;var t="";1<=i.opts.formUpdateButtons.length&&(t='<div class="fr-buttons">'.concat(i.button.buildList(i.opts.formUpdateButtons),"</div>"));var n=0,r={buttons:t,text_layer:'<div class="fr-forms-text-layer fr-layer fr-active"> \n    <div class="fr-input-line"><input name="text" type="text" placeholder="Text" tabIndex=" '.concat(++n,' "></div>\n    <div class="fr-action-buttons"><button class="fr-command fr-submit" data-cmd="updateInput" href="#" tabIndex="').concat(2,'" type="button">').concat(i.language.translate("Update"),"</button></div></div>")};return i.popups.create("forms.update",r)}return{_init:function(){i.events.$on(i.$el,i._mousedown,"input, textarea, button",t),i.events.$on(i.$el,i._mouseup,"input, textarea, button",n),i.events.$on(i.$el,"touchmove","input, textarea, button",a),i.events.$on(i.$el,i._mouseup,r),i.events.$on(i.$win,i._mouseup,r),p(!0),i.events.$on(i.$el,"submit","form",(function(e){return e.preventDefault(),!1}))},updateInput:function(){var t=i.popups.get("forms.update"),n=o();if(n){var r=e(n),l=t.find('input[type="text"][name="text"]').val()||"";r.is("button")?l.length?r.text(l):r.text("​"):-1!=["button","submit","reset"].indexOf(n.type)?r.attr("value",l):r.attr("placeholder",l),i.popups.hide("forms.update"),c(n)}},getInput:o,applyStyle:function(t,n,r){void 0===n&&(n=i.opts.formStyles),void 0===r&&(r=i.opts.formMultipleStyles);var c=o();if(!c)return!1;if(!r){var a=Object.keys(n);a.splice(a.indexOf(t),1),e(c).removeClass(a.join(" "))}e(c).toggleClass(t)},showUpdatePopup:function(){var t=o();if(t){var n=e(t),r=i.popups.get("forms.update");r||(r=p()),i.popups.isVisible("forms.update")||i.popups.refresh("forms.update"),i.popups.setContainer("forms.update",i.$sc);var c=n.offset().left+n.outerWidth()/2,a=n.offset().top+n.outerHeight();i.popups.show("forms.update",c,a,n.outerHeight())}},showEditPopup:c,back:function(){i.events.disableBlur(),i.selection.restore(),i.events.enableBlur();var e=o();e&&i.$wp&&("BUTTON"===e.tagName&&i.selection.restore(),c(e))}}},r.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),r.DefineIcon("inputStyle",{NAME:"magic",SVG_KEY:"inlineStyle"}),r.RegisterCommand("inputStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list">',t=this.opts.formStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li><a class="fr-command" tabIndex="-1" data-cmd="inputStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){var n=this.forms.getInput();n&&(this.forms.applyStyle(t),this.forms.showEditPopup(n))},refreshOnShow:function(e,t){var n=this.$,r=this.forms.getInput();if(r){var a=n(r);t.find(".fr-command").each((function(){var e=n(this).data("param1");n(this).toggleClass("fr-active",a.hasClass(e))}))}}}),r.DefineIcon("inputEdit",{NAME:"edit",SVG_KEY:"edit"}),r.RegisterCommand("inputEdit",{title:"Edit Button",undo:!1,refreshAfterCallback:!1,callback:function(){this.forms.showUpdatePopup()}}),r.DefineIcon("inputBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("inputBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.forms.back()}}),r.RegisterCommand("updateInput",{undo:!1,focus:!1,title:"Update",callback:function(){this.forms.updateInput()}}),r.PLUGINS.fullscreen=function(a){var e,t,n,r,i=a.$,s=function(){return a.$box.hasClass("fr-fullscreen")};function o(){if(a.helpers.isIOS()&&a.core.hasFocus())return a.$el.blur(),setTimeout(l,250),!1;e=a.helpers.scrollTop(),a.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),a.helpers.isMobile()&&(a.opts.toolbarBottom?a.$tb[0].removeAttribute("style"):(a.$tb.data("parent",a.$tb.parent()),a.$box.prepend(a.$tb),a.$tb.data("sticky-dummy")&&a.$tb.after(a.$tb.data("sticky-dummy")))),t=a.opts.height,n=a.opts.heightMax,r=a.opts.z_index,a.opts.height=a.o_win.innerHeight-(a.opts.toolbarInline?0:a.$tb.outerHeight()+(a.$second_tb?a.$second_tb.outerHeight():0)),a.opts.zIndex=2147483641,a.opts.heightMax=null,a.size.refresh(),a.opts.toolbarInline&&a.toolbar.showInline();for(var o=a.$box.parent();!o.first().is("body");)o.addClass("fr-fullscreen-wrapper"),o=o.parent();a.opts.toolbarContainer&&a.$box.prepend(a.$tb),a.events.trigger("charCounter.update"),a.events.trigger("codeView.update"),a.$win.trigger("scroll")}function c(){if(a.helpers.isIOS()&&a.core.hasFocus())return a.$el.blur(),setTimeout(l,250),!1;a.$box.toggleClass("fr-fullscreen"),i("body").first().toggleClass("fr-fullscreen"),a.$tb.data("parent")&&a.$tb.data("parent").prepend(a.$tb),a.$tb.data("sticky-dummy")&&a.$tb.after(a.$tb.data("sticky-dummy")),a.opts.height=t,a.opts.heightMax=n,a.opts.zIndex=r,a.size.refresh(),i(a.o_win).scrollTop(e),a.opts.toolbarInline&&a.toolbar.showInline(),a.events.trigger("charCounter.update"),a.opts.toolbarSticky&&a.opts.toolbarStickyOffset&&(a.opts.toolbarBottom?a.$tb.css("bottom",a.opts.toolbarStickyOffset).data("bottom",a.opts.toolbarStickyOffset):a.$tb.css("top",a.opts.toolbarStickyOffset).data("top",a.opts.toolbarStickyOffset));for(var o=a.$box.parent();!o.first().is("body");)o.removeClass("fr-fullscreen-wrapper"),o=o.parent();a.opts.toolbarContainer&&i(a.opts.toolbarContainer).append(a.$tb),i(a.o_win).trigger("scroll"),a.events.trigger("codeView.update")}function l(){s()?c():o(),d(a.$tb.find('.fr-command[data-cmd="fullscreen"]'));var e=a.$tb.find('.fr-command[data-cmd="moreText"]'),t=a.$tb.find('.fr-command[data-cmd="moreParagraph"]'),n=a.$tb.find('.fr-command[data-cmd="moreRich"]'),r=a.$tb.find('.fr-command[data-cmd="moreMisc"]');e.length&&a.refresh.moreText(e),t.length&&a.refresh.moreParagraph(t),n.length&&a.refresh.moreRich(n),r.length&&a.refresh.moreMisc(r)}function d(e){var t=s();e.toggleClass("fr-active",t).attr("aria-pressed",t),e.find("> *").not(".fr-sr-only").replaceWith(t?a.icon.create("fullscreenCompress"):a.icon.create("fullscreen"))}return{_init:function(){if(!a.$wp)return!1;a.events.$on(i(a.o_win),"resize",(function(){s()&&(c(),o())})),a.events.on("toolbar.hide",(function(){if(s()&&a.helpers.isMobile())return!1})),a.events.on("position.refresh",(function(){if(a.helpers.isIOS())return!s()})),a.events.on("destroy",(function(){s()&&c()}),!0)},toggle:l,refresh:d,isActive:s}},r.RegisterCommand("fullscreen",{title:"Fullscreen",undo:!1,focus:!1,accessibilityFocus:!0,forcedRefresh:!0,toggle:!0,callback:function(){this.fullscreen.toggle()},refresh:function(e){this.fullscreen.refresh(e)},plugin:"fullscreen"}),r.DefineIcon("fullscreen",{NAME:"expand",SVG_KEY:"fullscreen"}),r.DefineIcon("fullscreenCompress",{NAME:"compress",SVG_KEY:"exitFullscreen"}),Object.assign(r.DEFAULTS,{helpSets:[{title:"Inline Editor",commands:[{val:"OSkeyE",desc:"Show the editor"}]},{title:"Common actions",commands:[{val:"OSkeyC",desc:"Copy"},{val:"OSkeyX",desc:"Cut"},{val:"OSkeyV",desc:"Paste"},{val:"OSkeyZ",desc:"Undo"},{val:"OSkeyShift+Z",desc:"Redo"},{val:"OSkeyK",desc:"Insert Link"},{val:"OSkeyP",desc:"Insert Image"}]},{title:"Basic Formatting",commands:[{val:"OSkeyA",desc:"Select All"},{val:"OSkeyB",desc:"Bold"},{val:"OSkeyI",desc:"Italic"},{val:"OSkeyU",desc:"Underline"},{val:"OSkeyS",desc:"Strikethrough"},{val:"OSkey]",desc:"Increase Indent"},{val:"OSkey[",desc:"Decrease Indent"}]},{title:"Quote",commands:[{val:"OSkey'",desc:"Increase quote level"},{val:"OSkeyShift+'",desc:"Decrease quote level"}]},{title:"Image / Video",commands:[{val:"OSkey+",desc:"Resize larger"},{val:"OSkey-",desc:"Resize smaller"}]},{title:"Table",commands:[{val:"Alt+Space",desc:"Select table cell"},{val:"Shift+Left/Right arrow",desc:"Extend selection one cell"},{val:"Shift+Up/Down arrow",desc:"Extend selection one row"}]},{title:"Navigation",commands:[{val:"OSkey/",desc:"Shortcuts"},{val:"Alt+F10",desc:"Focus popup / toolbar"},{val:"Esc",desc:"Return focus to previous position"}]}]}),r.PLUGINS.help=function(s){var e,a=s.$,t="help";return{_init:function(){},show:function(){if(!e){var n="<h4>".concat(s.language.translate("Shortcuts"),"</h4>"),r=function(){for(var e='<div class="fr-help-modal">',t=0;t<s.opts.helpSets.length;t++){var n=s.opts.helpSets[t],r="<table>";r+="<thead><tr><th>".concat(s.language.translate(n.title),"</th></tr></thead>"),r+="<tbody>";for(var a=0;a<n.commands.length;a++){var o=n.commands[a];r+="<tr>",r+="<td>".concat(s.language.translate(o.desc),"</td>"),r+="<td>".concat(o.val.replace("OSkey",s.helpers.isMac()?"&#8984;":"Ctrl+"),"</td>"),r+="</tr>"}e+=r+="</tbody></table>"}return e+"</div>"}(),o=s.modals.create(t,n,r);e=o.$modal,s.events.$on(a(s.o_win),"resize",(function(){s.modals.resize(t)}))}s.modals.show(t),s.modals.resize(t)},hide:function(){s.modals.hide(t)}}},r.DefineIcon("help",{NAME:"question",SVG_KEY:"help"}),r.RegisterShortcut(r.KEYCODE.SLASH,"help",null,"/"),r.RegisterCommand("help",{title:"Help",icon:"help",undo:!1,focus:!1,modal:!0,callback:function(){this.help.show()},plugin:"help",showOnMobile:!1}),Object.assign(r.POPUP_TEMPLATES,{"image.insert":"[_BUTTONS_][_UPLOAD_LAYER_][_BY_URL_LAYER_][_PROGRESS_BAR_]","image.edit":"[_BUTTONS_]","image.alt":"[_BUTTONS_][_ALT_LAYER_]","image.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(r.DEFAULTS,{imageInsertButtons:["imageBack","|","imageUpload","imageByURL"],imageEditButtons:["imageReplace","imageAlign","imageCaption","imageRemove","imageLink","linkOpen","linkEdit","linkRemove","-","imageDisplay","imageStyle","imageAlt","imageSize"],imageAltButtons:["imageBack","|"],imageSizeButtons:["imageBack","|"],imageUpload:!0,imageUploadURL:null,imageCORSProxy:"https://cors-anywhere.froala.com",imageUploadRemoteUrls:!0,imageUploadParam:"file",imageUploadParams:{},imageUploadToS3:!1,imageUploadToAzure:!1,imageUploadMethod:"POST",imageMaxSize:10485760,imageAllowedTypes:["jpeg","jpg","png","gif","webp"],imageResize:!0,imageResizeWithPercent:!1,imageRoundPercent:!1,imageDefaultWidth:300,imageDefaultAlign:"center",imageDefaultDisplay:"block",imageSplitHTML:!1,imageStyles:{"fr-rounded":"Rounded","fr-bordered":"Bordered","fr-shadow":"Shadow"},imageMove:!0,imageMultipleStyles:!0,imageTextNear:!0,imagePaste:!0,imagePasteProcess:!1,imageMinWidth:16,imageOutputSize:!1,imageDefaultMargin:5,imageAddNewLine:!1}),r.IMAGE_ALLOW_REGEX=/\.(gif|jpe?g|tiff?|png|webp|bmp)$/i,r.PLUGINS.image=function(t){var n,o,c,l,s,d,h=t.$,f="https://i.froala.com/upload",m=!1,v=1,p=2,u=3,_=4,y=5,E=6,a={};function C(){var e=t.popups.get("image.insert").find(".fr-image-by-url-layer input");e.val(""),n&&e.val(n.attr("src")),e.trigger("change")}function i(e){return window.pageYOffset+e.get(0).getBoundingClientRect().top}function w(){var e=t.popups.get("image.edit");if(e||(e=M()),e){var r=n;t.popups.setContainer("image.edit",t.$sc),t.popups.refresh("image.edit");var o=r.offset().left+r.outerWidth()/2,c=r&&i(r),a=t.$wp&&i(t.$wp);a||(a=c);var l=0;t.opts.iframe?((l=t.$wp.scrollTop()+e.outerHeight())<r.get(0).getBoundingClientRect().top&&(l=r.get(0).getBoundingClientRect().top),l>r.get(0).getBoundingClientRect().top+r.height()&&(l=r.get(0).getBoundingClientRect().top+r.height())):l=a<c?c:t.$wp&&c+r.height()<a+t.$wp.height()?c+r.height():a+e.outerHeight(),n.hasClass("fr-uploading")?x():t.popups.show("image.edit",o,l,1,!0)}}function g(){D()}function S(e){0<e.parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first());var t=e.hasClass("fr-dib")?"block":e.hasClass("fr-dii")?"inline":null,n=e.hasClass("fr-fil")?"left":e.hasClass("fr-fir")?"right":be(e);ve(e,t,n),e.removeClass("fr-dib fr-dii fr-fir fr-fil")}function T(){for(var e,n="IMG"==t.el.tagName?[t.el]:t.el.querySelectorAll("img"),r=0;r<n.length;r++){var o=h(n[r]);!t.opts.htmlUntouched&&t.opts.useClasses?((t.opts.imageDefaultAlign||t.opts.imageDefaultDisplay)&&(0<(e=o).parents(".fr-img-caption").length&&(e=e.parents(".fr-img-caption").first()),e.hasClass("fr-dii")||e.hasClass("fr-dib")||(e.addClass("fr-fi".concat(be(e)[0])),e.addClass("fr-di".concat(_e(e)[0])),e.css("margin",""),e.css("float",""),e.css("display",""),e.css("z-index",""),e.css("position",""),e.css("overflow",""),e.css("vertical-align",""))),t.opts.imageTextNear||(0<o.parents(".fr-img-caption").length?o.parents(".fr-img-caption").first().removeClass("fr-dii").addClass("fr-dib"):o.removeClass("fr-dii").addClass("fr-dib"))):t.opts.htmlUntouched||t.opts.useClasses||(t.opts.imageDefaultAlign||t.opts.imageDefaultDisplay)&&S(o),t.opts.iframe&&o.on("load",t.size.syncIframe)}}function b(e){void 0===e&&(e=!0);var n,r=Array.prototype.slice.call(t.el.querySelectorAll("img")),o=[];for(n=0;n<r.length;n++)if(o.push(r[n].getAttribute("src")),h(r[n]).toggleClass("fr-draggable",t.opts.imageMove),""===r[n].getAttribute("class")&&r[n].removeAttribute("class"),""===r[n].getAttribute("style")&&r[n].removeAttribute("style"),r[n].parentNode&&r[n].parentNode.parentNode&&t.node.hasClass(r[n].parentNode.parentNode,"fr-img-caption")){var a=r[n].parentNode.parentNode;t.browser.mozilla||a.setAttribute("contenteditable",!1),a.setAttribute("draggable",!1),a.classList.add("fr-draggable");var c=r[n].nextSibling;c&&!t.browser.mozilla&&c.setAttribute("contenteditable",!0)}if(s)for(n=0;n<s.length;n++)o.indexOf(s[n].getAttribute("src"))<0&&t.events.trigger("image.removed",[h(s[n])]);if(s&&e){var i=[];for(n=0;n<s.length;n++)i.push(s[n].getAttribute("src"));for(n=0;n<r.length;n++)i.indexOf(r[n].getAttribute("src"))<0&&t.events.trigger("image.loaded",[h(r[n])])}s=r}function A(){if(o||function(){var e;if(t.shared.$image_resizer?(o=t.shared.$image_resizer,l=t.shared.$img_overlay,t.events.on("destroy",(function(){h("body").first().append(o.removeClass("fr-active"))}),!0)):(t.shared.$image_resizer=h(document.createElement("div")).attr("class","fr-image-resizer"),o=t.shared.$image_resizer,t.events.$on(o,"mousedown",(function(e){e.stopPropagation()}),!0),t.opts.imageResize&&(o.append(R("nw")+R("ne")+R("sw")+R("se")),t.shared.$img_overlay=h(document.createElement("div")).attr("class","fr-image-overlay"),l=t.shared.$img_overlay,e=o.get(0).ownerDocument,h(e).find("body").first().append(l))),t.events.on("shared.destroy",(function(){o.html("").removeData().remove(),o=null,t.opts.imageResize&&(l.remove(),l=null)}),!0),t.helpers.isMobile()||t.events.$on(h(t.o_win),"resize",(function(){n&&!n.hasClass("fr-uploading")?fe(!0):n&&(A(),ye(),x(!1))})),t.opts.imageResize){e=o.get(0).ownerDocument,t.events.$on(o,t._mousedown,".fr-handler",I),t.events.$on(h(e),t._mousemove,k),t.events.$on(h(e.defaultView||e.parentWindow),t._mouseup,N),t.events.$on(l,"mouseleave",N);var c=1,a=null,d=0;t.events.on("keydown",(function(e){if(n){var o=-1!=navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey,l=e.which;(l!==a||200<e.timeStamp-d)&&(c=1),(l==r.KEYCODE.EQUALS||t.browser.mozilla&&l==r.KEYCODE.FF_EQUALS)&&o&&!e.altKey?c=ne.call(this,e,1,1,c):(l==r.KEYCODE.HYPHEN||t.browser.mozilla&&l==r.KEYCODE.FF_HYPHEN)&&o&&!e.altKey?c=ne.call(this,e,2,-1,c):t.keys.ctrlKey(e)||l!=r.KEYCODE.ENTER||(n.before("<br>"),B(n)),a=l,d=e.timeStamp}}),!0),t.events.on("keyup",(function(){c=1}))}}(),!n)return!1;var e=t.$wp||t.$sc;e.append(o),o.data("instance",t);var c=e.scrollTop()-("static"!=e.css("position")?e.offset().top:0),d=e.scrollLeft()-("static"!=e.css("position")?e.offset().left:0);d-=t.helpers.getPX(e.css("border-left-width")),c-=t.helpers.getPX(e.css("border-top-width")),t.$el.is("img")&&t.$sc.is("body")&&(d=c=0);var f=we();Se()&&(f=f.find(".fr-img-wrap"));var a=0,m=0;t.opts.iframe&&(a=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-top")),m=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-left"))),o.css("top",(t.opts.iframe?f.offset().top+a:f.offset().top+c)-1).css("left",(t.opts.iframe?f.offset().left+m:f.offset().left+d)-1).css("width",f.get(0).getBoundingClientRect().width).css("height",f.get(0).getBoundingClientRect().height).addClass("fr-active")}function R(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function O(e){Se()?n.parents(".fr-img-caption").css("width",e):n.css("width",e)}function I(e){if(!t.core.sameInstance(o))return!0;if(e.preventDefault(),e.stopPropagation(),t.$el.find("img.fr-error").left)return!1;t.undo.canDo()||t.undo.saveStep();var r=e.pageX||e.originalEvent.touches[0].pageX;if("mousedown"==e.type){var d=t.$oel.get(0).ownerDocument,f=d.defaultView||d.parentWindow,a=!1;try{a=f.location!=f.parent.location&&!(f.$&&f.$.FE)}catch(e){}a&&f.frameElement&&(r+=t.helpers.getPX(h(f.frameElement).offset().left)+f.frameElement.clientLeft)}(c=h(this)).data("start-x",r),c.data("start-width",n.width()),c.data("start-height",n.height());var m=n.width();if(t.opts.imageResizeWithPercent){var i=n.parentsUntil(t.$el,t.html.blockTagsQuery()).get(0)||t.el;m=(m/h(i).outerWidth()*100).toFixed(2)+"%"}O(m),l.show(),t.popups.hideAll(),me()}function k(e){if(!t.core.sameInstance(o))return!0;var r;if(c&&n){if(e.preventDefault(),t.$el.find("img.fr-error").left)return!1;var l=e.pageX||(e.originalEvent.touches?e.originalEvent.touches[0].pageX:null);if(!l)return!1;var d=l-c.data("start-x"),a=c.data("start-width");if((c.hasClass("fr-hnw")||c.hasClass("fr-hsw"))&&(d=0-d),t.opts.imageResizeWithPercent){var f=n.parentsUntil(t.$el,t.html.blockTagsQuery()).get(0)||t.el;a=((a+d)/h(f).outerWidth()*100).toFixed(2),t.opts.imageRoundPercent&&(a=Math.round(a)),O("".concat(a,"%")),(r=Se()?(t.helpers.getPX(n.parents(".fr-img-caption").css("width"))/h(f).outerWidth()*100).toFixed(2):(t.helpers.getPX(n.css("width"))/h(f).outerWidth()*100).toFixed(2))===a||t.opts.imageRoundPercent||O("".concat(r,"%")),n.css("height","").removeAttr("height")}else a+d>=t.opts.imageMinWidth&&(O(a+d),r=Se()?t.helpers.getPX(n.parents(".fr-img-caption").css("width")):t.helpers.getPX(n.css("width"))),r!==a+d&&O(r),((n.attr("style")||"").match(/(^height:)|(; *height:)/)||n.attr("height"))&&(n.css("height",c.data("start-height")*n.width()/c.data("start-width")),n.removeAttr("height"));A(),t.events.trigger("image.resize",[Ce()])}}function N(e){if(!t.core.sameInstance(o))return!0;if(c&&n){if(e&&e.stopPropagation(),t.$el.find("img.fr-error").left)return!1;c=null,l.hide(),A(),w(),t.undo.saveStep(),t.events.trigger("image.resizeEnd",[Ce()])}else o.removeClass("fr-active")}function L(e,r,o){t.edit.on(),n&&n.addClass("fr-error"),a[e]?U(t.language.translate(a[e])):U(t.language.translate("Something went wrong. Please try again.")),!n&&o&&re(o),t.events.trigger("image.error",[{code:e,message:a[e]},r,o])}function M(e){if(e)return t.$wp&&t.events.$on(t.$wp,"scroll.image-edit",(function(){n&&t.popups.isVisible("image.edit")&&(t.events.disableBlur(),w())})),!0;var r="";if(0<t.opts.imageEditButtons.length){var o={buttons:r+='<div class="fr-buttons">\n        '.concat(t.button.buildList(t.opts.imageEditButtons),"\n        </div>")};return t.popups.create("image.edit",o)}return!1}function x(e){var r=t.popups.get("image.insert");if(r||(r=X()),r.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),r.find(".fr-image-progress-bar-layer").addClass("fr-active"),r.find(".fr-buttons").hide(),n){var o=we();t.popups.setContainer("image.insert",t.$sc);var c=o.offset().left,a=o.offset().top+o.height();t.popups.show("image.insert",c,a,o.outerHeight())}void 0===e&&P(t.language.translate("Uploading"),0)}function D(e){var r=t.popups.get("image.insert");if(r&&(r.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),r.find(".fr-image-progress-bar-layer").removeClass("fr-active"),r.find(".fr-buttons").show(),e||t.$el.find("img.fr-error").length)){if(t.events.focus(),t.$el.find("img.fr-error").length&&(t.$el.find("img.fr-error").remove(),t.undo.saveStep(),t.undo.run(),t.undo.dropRedo()),!t.$wp&&n){var o=n;fe(!0),t.selection.setAfter(o.get(0)),t.selection.restore()}t.popups.hide("image.insert")}}function P(e,n){var r=t.popups.get("image.insert");if(r){var o=r.find(".fr-image-progress-bar-layer");o.find("h3").text(e+(n?" ".concat(n,"%"):"")),o.removeClass("fr-error"),n?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width","".concat(n,"%"))):o.find("div").addClass("fr-indeterminate")}}function U(e){x();var n=t.popups.get("image.insert").find(".fr-image-progress-bar-layer");n.addClass("fr-error");var r=n.find("h3");r.text(e),t.events.disableBlur(),r.focus()}function B(e){he.call(e.get(0))}function F(){var e=h(this);t.popups.hide("image.insert"),e.removeClass("fr-uploading"),e.next().is("br")&&e.next().remove(),B(e),t.events.trigger("image.loaded",[e])}function V(i,e,s,n,r){n&&"string"==typeof n&&(n=t.$(n)),t.edit.off(),P(t.language.translate("Loading image")),e&&(i=t.helpers.sanitizeURL(i));var o=new Image;o.onload=function(){var e,o;if(n){t.undo.canDo()||n.hasClass("fr-uploading")||t.undo.saveStep();var c=n.data("fr-old-src");n.data("fr-image-pasted")&&(c=null),t.$wp?((e=n.clone().removeData("fr-old-src").removeClass("fr-uploading").removeAttr("data-fr-image-pasted")).off("load"),c&&n.attr("src",c),!t.opts.trackChangesEnabled||n[0].parentNode&&"SPAN"===n[0].parentNode.tagName&&n[0].parentNode.hasAttribute("data-tracking")||t.track_changes.replaceSpecialItem(n),n.replaceWith(e)):e=n;for(var l=e.get(0).attributes,a=0;a<l.length;a++){var d=l[a];(0===d.nodeName.indexOf("data-")||s&&s.hasOwnProperty(d.nodeName))&&e.removeAttr(d.nodeName)}if(void 0!==s)for(o in s)s.hasOwnProperty(o)&&"link"!=o&&e.attr("".concat(o),s[o]);e.on("load",F),e.attr("src",i),t.edit.on(),b(!1),n[0].src!=i&&t.selection.restore(),t.undo.saveStep(),t.events.disableBlur(),t.$el.blur(),t.events.trigger(c?"image.replaced":"image.inserted",[e,r])}else(e=z(i,s,F))&&(b(!1),t.undo.saveStep(),t.events.disableBlur(),t.$el.blur(),t.events.trigger("image.inserted",[e,r]))},o.onerror=function(){L(v)},x(t.language.translate("Loading image")),o.src=i}function j(e,n,r){P(t.language.translate("Loading image"));var o=this.status,a=this.response,c=this.responseXML,i=this.responseText;try{if(t.opts.imageUploadToS3||t.opts.imageUploadToAzure)if(201==o){var s;if(t.opts.imageUploadToAzure){if(!1===t.events.trigger("image.uploadedToAzure",[this.responseURL,r,a],!0))return t.edit.on(),!1;s=n}else s=function(e){try{var n=h(e).find("Location").text(),r=h(e).find("Key").text();return!1===t.events.trigger("image.uploadedToS3",[n,r,e],!0)?(t.edit.on(),!1):n}catch(t){return L(_,e),!1}}(c);s&&V(s,!1,[],e,a||c)}else L(_,a||c,e);else if(200<=o&&o<300){var l=function(e){try{if(!1===t.events.trigger("image.uploaded",[e],!0))return t.edit.on(),!1;var n=JSON.parse(e);return n.link?n:(L(p,e),!1)}catch(t){return L(_,e),!1}}(i);l&&V(l.link,!1,l,e,a||i)}else L(u,a||i,e)}catch(t){L(_,a||i,e)}}function H(){L(_,this.response||this.responseText||this.responseXML)}function $(e){if(e.lengthComputable){var n=e.loaded/e.total*100|0;P(t.language.translate("Uploading"),n)}}function z(e,n,r){var o,a=h(document.createElement("img")).attr("src",e);if(n&&void 0!==n)for(o in n)n.hasOwnProperty(o)&&"link"!=o&&(" data-".concat(o,'="').concat(n[o],'"'),a.attr("".concat(o),n[o]));var c=t.opts.imageDefaultWidth;c&&"auto"!=c&&(c=t.opts.imageResizeWithPercent?"100%":"".concat(c,"px")),a.attr("style",c?"width: ".concat(c,";"):""),ve(a,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),a.on("load",r),a.on("error",r),t.edit.on(),t.events.focus(!0),t.selection.restore(),t.undo.saveStep(),t.opts.imageSplitHTML?t.markers.split():t.markers.insert(),t.html.wrap();var i=t.$el.find(".fr-marker");if(i.length)(i.parent().is("hr")||i.parent().is("IMG"))&&i.parent().after(i),t.node.isLastSibling(i)&&i.parent().hasClass("fr-deletable")&&i.insertAfter(i.parent()),i.replaceWith(a);else{if(t.opts.trackChangesEnabled)return D(!0),!1;t.$el.append(a)}return t.selection.clear(),a}function W(){t.edit.on(),D(!0)}function K(e,r){if(void 0!==e&&0<e.length){if(!1===t.events.trigger("image.beforeUpload",[e,r]))return!1;var o,c=e[0];if(!(null!==t.opts.imageUploadURL&&t.opts.imageUploadURL!=f||t.opts.imageUploadToS3||t.opts.imageUploadToAzure))return function(a,e){var i=new FileReader;i.onload=function(){var n=i.result;if(i.result.indexOf("svg+xml")<0){for(var r=atob(i.result.split(",")[1]),o=[],c=0;c<r.length;c++)o.push(r.charCodeAt(c));n=window.URL.createObjectURL(new Blob([new Uint8Array(o)],{type:a.type})),e&&e.data("fr-old-src",e.attr("src")),t.image.insert(n,!1,null,e)}else t.image.insert(n,null,null,t.image.get())},x(),i.readAsDataURL(a)}(c,r||n),!1;if(c.name||(c.name=(new Date).getTime()+"."+(c.type||"image/jpeg").replace(/image\//g,"")),c.size>t.opts.imageMaxSize)return L(y),!1;if(t.opts.imageAllowedTypes.indexOf(c.type.replace(/image\//g,""))<0)return L(E),!1;if(t.drag_support.formdata&&(o=t.drag_support.formdata?new FormData:null),o){var a;if(!1!==t.opts.imageUploadToS3)for(a in o.append("key",t.opts.imageUploadToS3.keyStart+(new Date).getTime()+"-"+(c.name||"untitled")),o.append("success_action_status","201"),o.append("X-Requested-With","xhr"),o.append("Content-Type",c.type),t.opts.imageUploadToS3.params)t.opts.imageUploadToS3.params.hasOwnProperty(a)&&o.append(a,t.opts.imageUploadToS3.params[a]);for(a in t.opts.imageUploadParams)t.opts.imageUploadParams.hasOwnProperty(a)&&o.append(a,t.opts.imageUploadParams[a]);o.append(t.opts.imageUploadParam,c,c.name);var l,i,s=t.opts.imageUploadURL,d=t.opts.imageUploadMethod;t.opts.imageUploadToS3&&(s=t.opts.imageUploadToS3.uploadURL?t.opts.imageUploadToS3.uploadURL:"https://".concat(t.opts.imageUploadToS3.region,".amazonaws.com/").concat(t.opts.imageUploadToS3.bucket)),t.opts.imageUploadToAzure&&(l=s=t.opts.imageUploadToAzure.uploadURL?"".concat(t.opts.imageUploadToAzure.uploadURL,"/").concat(c.name):encodeURI("https://".concat(t.opts.imageUploadToAzure.account,".blob.core.windows.net/").concat(t.opts.imageUploadToAzure.container,"/").concat(c.name)),t.opts.imageUploadToAzure.SASToken&&(s+=t.opts.imageUploadToAzure.SASToken),d="PUT");var m=t.core.getXHR(s,d);if(t.opts.imageUploadToAzure){var v=(new Date).toUTCString();if(!t.opts.imageUploadToAzure.SASToken&&t.opts.imageUploadToAzure.accessKey){var _=t.opts.imageUploadToAzure.account,p=t.opts.imageUploadToAzure.container;if(t.opts.imageUploadToAzure.uploadURL){var u=t.opts.imageUploadToAzure.uploadURL.split("/");p=u.pop(),_=u.pop().split(".")[0]}var C="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(v,"\nx-ms-version:2019-07-07"),g=encodeURI("/"+_+"/"+p+"/"+c.name),w=d+"\n\n\n"+c.size+"\n\n"+c.type+"\n\n\n\n\n\n\n"+C+"\n"+g,S=t.cryptoJSPlugin.cryptoJS.HmacSHA256(w,t.cryptoJSPlugin.cryptoJS.enc.Base64.parse(t.opts.imageUploadToAzure.accessKey)).toString(t.cryptoJSPlugin.cryptoJS.enc.Base64),b="SharedKey "+_+":"+S;i=S,m.setRequestHeader("Authorization",b)}for(a in m.setRequestHeader("x-ms-version","2019-07-07"),m.setRequestHeader("x-ms-date",v),m.setRequestHeader("Content-Type",c.type),m.setRequestHeader("x-ms-blob-type","BlockBlob"),t.opts.imageUploadParams)t.opts.imageUploadParams.hasOwnProperty(a)&&m.setRequestHeader(a,t.opts.imageUploadParams[a]);for(a in t.opts.imageUploadToAzure.params)t.opts.imageUploadToAzure.params.hasOwnProperty(a)&&m.setRequestHeader(a,t.opts.imageUploadToAzure.params[a])}!function(e,n,r,a,o,i){function s(){var c=h(this);c.off("load"),c.addClass("fr-uploading"),c.next().is("br")&&c.next().remove(),t.placeholder.refresh(),B(c),A(),x(),t.edit.off(),e.onload=function(){j.call(e,c,o,i)},e.onerror=H,e.upload.onprogress=$,e.onabort=W,h(c.off("abortUpload")).on("abortUpload",(function(){4!=e.readyState&&(e.abort(),a?(a.attr("src",a.data("fr-old-src")),a.removeClass("fr-uploading")):c.remove(),fe(!0))})),e.send(t.opts.imageUploadToAzure?r:n)}var c=new FileReader;c.onload=function(){var e=c.result;if(c.result.indexOf("svg+xml")<0){for(var n=atob(c.result.split(",")[1]),r=[],o=0;o<n.length;o++)r.push(n.charCodeAt(o));e=window.URL.createObjectURL(new Blob([new Uint8Array(r)],{type:"image/jpeg"}))}a?(a.on("load",s),a.on("error",(function(){s(),h(this).off("error")})),t.edit.on(),t.undo.saveStep(),a.data("fr-old-src",a.attr("src")),a.attr("src",e)):z(e,null,s)},c.readAsDataURL(r)}(m,o,c,r||n,l,i)}}}function G(e){if(e.is("img")&&0<e.parents(".fr-img-caption").length)return e.parents(".fr-img-caption")}function Y(e){var n=e.originalEvent.dataTransfer;if(n&&n.files&&n.files.length){var o=n.files[0];if(o&&o.type&&-1!==o.type.indexOf("image")&&0<=t.opts.imageAllowedTypes.indexOf(o.type.replace(/image\//g,""))){if(!t.opts.imageUpload)return e.preventDefault(),e.stopPropagation(),!1;t.markers.remove(),t.markers.insertAtPoint(e.originalEvent),t.$el.find(".fr-marker").replaceWith(r.MARKERS),0===t.$el.find(".fr-marker").length&&t.selection.setAtEnd(t.el),t.popups.hideAll();var c=t.popups.get("image.insert");c||(c=X()),t.popups.setContainer("image.insert",t.$sc);var a=e.originalEvent.pageX,l=e.originalEvent.pageY;if(t.opts.iframe){var i=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-top")),s=t.helpers.getPX(t.$wp.find(".fr-iframe").css("padding-left"));l+=t.$iframe.offset().top+i,a+=t.$iframe.offset().left+s}return t.popups.show("image.insert",a,l),x(),0<=t.opts.imageAllowedTypes.indexOf(o.type.replace(/image\//g,""))?(fe(!0),K(n.files)):L(E),e.preventDefault(),e.stopPropagation(),!1}}}function X(e){if(e)return t.popups.onRefresh("image.insert",C),t.popups.onHide("image.insert",g),!0;var r,o,c="";t.opts.imageUpload||-1===t.opts.imageInsertButtons.indexOf("imageUpload")||t.opts.imageInsertButtons.splice(t.opts.imageInsertButtons.indexOf("imageUpload"),1);var a=t.button.buildList(t.opts.imageInsertButtons);""!==a&&(c='<div class="fr-buttons fr-tabs">'.concat(a,"</div>"));var l=t.opts.imageInsertButtons.indexOf("imageUpload"),i=t.opts.imageInsertButtons.indexOf("imageByURL"),s="";0<=l&&(r=" fr-active",0<=i&&i<l&&(r=""),s='<div class="fr-image-upload-layer'.concat(r,' fr-layer" id="fr-image-upload-layer-').concat(t.id,'"><strong>').concat(t.language.translate("Drop image"),"</strong><br>(").concat(t.language.translate("or click"),')<div class="fr-form"><input type="file" accept="image/').concat(t.opts.imageAllowedTypes.join(", image/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-image-upload-layer-').concat(t.id,'" role="button"></div></div>'));var d="";0<=i&&(r=" fr-active",0<=l&&l<i&&(r=""),d='<div class="fr-image-by-url-layer'.concat(r,' fr-layer" id="fr-image-by-url-layer-').concat(t.id,'"><div class="fr-input-line"><input id="fr-image-by-url-layer-text-').concat(t.id,'" type="text" placeholder="http://" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageInsertByURL" tabIndex="2" role="button">').concat(t.language.translate("Insert"),"</button></div></div>"));var f={buttons:c,upload_layer:s,by_url_layer:d,progress_bar:'<div class="fr-image-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="imageDismissError" tabIndex="2" role="button">OK</button></div></div>'};return 1<=t.opts.imageInsertButtons.length&&(o=t.popups.create("image.insert",f)),t.$wp&&t.events.$on(t.$wp,"scroll",(function(){n&&t.popups.isVisible("image.insert")&&ye()})),function(e){t.events.$on(e,"dragover dragenter",".fr-image-upload-layer",(function(e){return h(this).addClass("fr-drop"),(t.browser.msie||t.browser.edge)&&e.preventDefault(),!1}),!0),t.events.$on(e,"dragleave dragend",".fr-image-upload-layer",(function(e){return h(this).removeClass("fr-drop"),(t.browser.msie||t.browser.edge)&&e.preventDefault(),!1}),!0),t.events.$on(e,"drop",".fr-image-upload-layer",(function(n){n.preventDefault(),n.stopPropagation(),h(this).removeClass("fr-drop");var r=n.originalEvent.dataTransfer;if(r&&r.files){var o=e.data("instance")||t;o.events.disableBlur(),o.image.upload(r.files),o.events.enableBlur()}}),!0),t.helpers.isIOS()&&t.events.$on(e,"touchstart",'.fr-image-upload-layer input[type="file"]',(function(){h(this).trigger("click")}),!0),t.events.$on(e,"change",'.fr-image-upload-layer input[type="file"]',(function(){if(this.files){var r=e.data("instance")||t;r.events.disableBlur(),e.find("input:focus").blur(),r.events.enableBlur(),r.image.upload(this.files,n)}h(this).val("")}),!0)}(o),o}function q(){n&&t.popups.get("image.alt").find("input").val(n.attr("alt")||"").trigger("change")}function Z(){var e=t.popups.get("image.alt");e||(e=Q()),D(),t.popups.refresh("image.alt"),t.popups.setContainer("image.alt",t.$sc);var r=we(),o=r.outerWidth()/2;Se()&&(r=r.find(".fr-img-wrap"),o=n.outerWidth()/2);var c=r.offset().left+o,a=r.offset().top+r.outerHeight(),l=r.outerHeight();t.opts.iframe&&Se()&&(l=n?n.outerHeight():0),t.popups.show("image.alt",c,a,l,!0)}function Q(e){if(e)return t.popups.onRefresh("image.alt",q),!0;var r={buttons:'<div class="fr-buttons fr-tabs">'.concat(t.button.buildList(t.opts.imageAltButtons),"</div>"),alt_layer:'<div class="fr-image-alt-layer fr-layer fr-active" id="fr-image-alt-layer-'.concat(t.id,'"><div class="fr-input-line"><input id="fr-image-alt-layer-text-').concat(t.id,'" type="text" placeholder="').concat(t.language.translate("Alternative Text"),'" tabIndex="1"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetAlt" tabIndex="2" role="button">').concat(t.language.translate("Update"),"</button></div></div>")},o=t.popups.create("image.alt",r);return t.$wp&&t.events.$on(t.$wp,"scroll.image-alt",(function(){n&&t.popups.isVisible("image.alt")&&Z()})),o}function J(){var e=t.popups.get("image.size"),r=n.get(0).style.height?n.get(0).style.height:"auto",o=n.get(0).style.width?n.get(0).style.width:"auto";if(n)if(Se()){var c=n.parent();c.get(0).style.width||(c=n.parent().parent()),e.find('input[name="width"]').val(o).trigger("change"),e.find('input[name="height"]').val(r).trigger("change")}else e.find('input[name="width"]').val(o).trigger("change"),e.find('input[name="height"]').val(r).trigger("change")}function ee(){var e=t.popups.get("image.size");e||(e=te()),D(),t.popups.refresh("image.size"),t.popups.setContainer("image.size",t.$sc);var r=we(),o=r.outerWidth()/2;Se()&&(r=r.find(".fr-img-wrap"),o=n.outerWidth()/2);var c=r.outerHeight();t.opts.iframe&&Se()&&(c=n?n.outerHeight():0);var a=r.offset().left+o,l=r.offset().top+r.outerHeight();t.popups.show("image.size",a,l,c,!0)}function te(e){if(e)return t.popups.onRefresh("image.size",J),!0;var r={buttons:'<div class="fr-buttons fr-tabs">'.concat(t.button.buildList(t.opts.imageSizeButtons),"</div>"),size_layer:'<div class="fr-image-size-layer fr-layer fr-active" id="fr-image-size-layer-'.concat(t.id,'"><div class="fr-image-group"><div class="fr-input-line"><input id="fr-image-size-layer-width-\'').concat(t.id,'" type="text" name="width" placeholder="').concat(t.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-image-size-layer-height').concat(t.id,'" type="text" name="height" placeholder="').concat(t.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="imageSetSize" tabIndex="2" role="button">').concat(t.language.translate("Update"),"</button></div></div>")},o=t.popups.create("image.size",r);return t.$wp&&t.events.$on(t.$wp,"scroll.image-size",(function(){n&&t.popups.isVisible("image.size")&&ee()})),o}function ne(e,t,n,r){return e.pageX=t,I.call(this,e),e.pageX=e.pageX+n*Math.floor(Math.pow(1.1,r)),k.call(this,e),N.call(this,e),++r}function re(e){if(e=e||we(),t.opts.trackChangesEnabled&&!t.helpers.isMobile()&&(!e[0].parentNode||"SPAN"!==e[0].parentNode.tagName||!e[0].parentNode.hasAttribute("data-tracking")))return t.track_changes.removeSpecialItem(e),t.popups.hideAll(),void fe(!0);e&&!1!==t.events.trigger("image.beforeRemove",[e])&&(t.popups.hideAll(),Ee(),fe(!0),t.undo.canDo()||t.undo.saveStep(),e.get(0)==t.el?e.removeAttr("src"):(e.get(0).parentNode&&"A"==e.get(0).parentNode.tagName?(t.selection.setBefore(e.get(0).parentNode)||t.selection.setAfter(e.get(0).parentNode)||e.parent().after(r.MARKERS),h(e.get(0).parentNode).remove()):(t.selection.setBefore(e.get(0))||t.selection.setAfter(e.get(0))||e.after(r.MARKERS),e.remove()),t.html.fillEmptyBlocks(),t.selection.restore()),t.undo.saveStep())}function ie(e){var o=e.which;if(n&&(o==r.KEYCODE.BACKSPACE||o==r.KEYCODE.DELETE))return e.preventDefault(),e.stopPropagation(),re(),!1;if(n&&o==r.KEYCODE.ESC){var c=n;return fe(!0),t.selection.setAfter(c.get(0)),t.selection.restore(),e.preventDefault(),!1}if(!n||o!=r.KEYCODE.ARROW_LEFT&&o!=r.KEYCODE.ARROW_RIGHT)return n&&o===r.KEYCODE.TAB?(e.preventDefault(),e.stopPropagation(),fe(!0),!1):n&&o!=r.KEYCODE.F10&&!t.keys.isBrowserAction(e)?(e.preventDefault(),e.stopPropagation(),!1):void 0;var l=n.get(0);return fe(!0),o==r.KEYCODE.ARROW_LEFT?t.selection.setBefore(l):t.selection.setAfter(l),t.selection.restore(),e.preventDefault(),!1}function oe(e){if(e&&"IMG"==e.tagName){if(t.node.hasClass(e,"fr-uploading")||t.node.hasClass(e,"fr-error")?e.parentNode.removeChild(e):t.node.hasClass(e,"fr-draggable")&&e.classList.remove("fr-draggable"),e.parentNode&&e.parentNode.parentNode&&t.node.hasClass(e.parentNode.parentNode,"fr-img-caption")){var n=e.parentNode.parentNode;n.removeAttribute("contenteditable"),n.removeAttribute("draggable"),n.classList.remove("fr-draggable");var r=e.nextSibling;r&&r.removeAttribute("contenteditable")}}else if(e&&e.nodeType==Node.ELEMENT_NODE)for(var o=e.querySelectorAll("img.fr-uploading, img.fr-error, img.fr-draggable"),a=0;a<o.length;a++)oe(o[a])}function ae(e){if(!1===t.events.trigger("image.beforePasteUpload",[e]))return h(e).removeAttr("data-fr-image-pasted"),!1;n=h(e),A(),w(),ye(),x(),n.on("load",(function(){var e=[];A(),h(t.popups.get("image.insert").get(0)).find("div.fr-active.fr-error").length<1&&x(),h(this).data("events").filter((function(t){"load"===t[0]&&e.push(t)})),e.length<=1&&h(this).off("load")}));for(var r=h(e).attr("src").split(","),o=atob(r[1]),c=[],a=0;a<o.length;a++)c.push(o.charCodeAt(a));K([t.browser.safari&&!t.opts.imageUploadURL?new Blob([new Uint8Array(c)],{type:r[0].replace(/data\:/g,"")}):new Blob([new Uint8Array(c)],{type:r[0].replace(/data\:/g,"").replace(/;base64/g,"")})],n)}function se(){t.opts.imagePaste?t.$el.find("img[data-fr-image-pasted]").each((function(e,n){if(t.opts.imagePasteProcess){var o=t.opts.imageDefaultWidth;o&&"auto"!=o&&(o+=t.opts.imageResizeWithPercent?"%":"px"),h(n).css("width",o).removeClass("fr-dii fr-dib fr-fir fr-fil"),ve(h(n),t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign)}if(0===n.src.indexOf("data:"))ae(n);else if(0===n.src.indexOf("blob:")||0===n.src.indexOf("http")&&t.opts.imageUploadRemoteUrls&&t.opts.imageCORSProxy){var c=new Image;c.crossOrigin="Anonymous",c.onload=function(){var e=t.o_doc.createElement("CANVAS"),o=e.getContext("2d");e.height=this.naturalHeight,e.width=this.naturalWidth,o.drawImage(this,0,0),setTimeout((function(){ae(n)}),0),n.src=e.toDataURL(r.IMAGE_TYPE)},t.browser.msie&&r.IMAGE_ALLOW_REGEX.test(n.src)&&(r.IMAGE_TYPE="image/"+n.src.split(r.IMAGE_ALLOW_REGEX)[1]),c.src=(0===n.src.indexOf("blob:")?"":"".concat(t.opts.imageCORSProxy,"/"))+n.src,0!==n.src.indexOf("blob:")&&t.undo.saveStep()}else 0!==n.src.indexOf("http")||0===n.src.indexOf("https://mail.google.com/mail")?(t.selection.save(),h(n).remove(),t.selection.restore()):h(n).removeAttr("data-fr-image-pasted")})):t.$el.find("img[data-fr-image-pasted]").remove()}function ce(e){var n=e.target.result,r=t.opts.imageDefaultWidth;r&&"auto"!=r&&(r+=t.opts.imageResizeWithPercent?"%":"px"),t.undo.saveStep(),t.html.insert('<img data-fr-image-pasted="true" src="'.concat(n,'"').concat(r?' style="width: '.concat(r,';"'):"",">"));var o=t.$el.find('img[data-fr-image-pasted="true"]');o&&ve(o,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),t.events.trigger("paste.after")}function le(e,n){var r=new FileReader;r.onload=function(e){var n=t.opts.imageDefaultWidth;n&&"auto"!=n&&(n+=t.opts.imageResizeWithPercent?"%":"px"),t.html.insert('<img data-fr-image-pasted="true" src="'.concat(e,'"').concat(n?' style="width: '.concat(n,';"'):"",">"));var r=t.$el.find('img[data-fr-image-pasted="true"]');r&&ve(r,t.opts.imageDefaultDisplay,t.opts.imageDefaultAlign),t.events.trigger("paste.after")}(n),r.readAsDataURL(e,n)}function de(e){if(e&&e.clipboardData&&e.clipboardData.items){var n=(e.clipboardData||window.clipboardData).getData("text/html")||"";t.browser.mozilla&&(""===n||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(n))&&(n=t.win.localStorage.getItem("fr-copied-html"));var o=(new DOMParser).parseFromString(n,"text/html").querySelector("img");if(o){if(!o)return!1;var c=o.src,a=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))a=e.clipboardData.items[0].getAsFile();else for(var l=0;l<e.clipboardData.items.length;l++)if(a=e.clipboardData.items[l].getAsFile()){r.IMAGE_TYPE=a.type;break}if(a)return le(a,c),!1}else{var i=null;if(e.clipboardData.types&&-1!=[].indexOf.call(e.clipboardData.types,"text/rtf")||e.clipboardData.getData("text/rtf"))i=e.clipboardData.items[0].getAsFile();else for(var s=0;s<e.clipboardData.items.length&&!(i=e.clipboardData.items[s].getAsFile());s++);if(i)return function(e){var t=new FileReader;t.onload=ce,t.readAsDataURL(e)}(i),!1}}}function ue(e){return e.replace(/<img /gi,'<img data-fr-image-pasted="true" ')}function he(e){if("false"==h(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(e&&"touchend"==e.type&&d)return!0;if(e&&t.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1;for(var o=0;o<r.INSTANCES.length;o++)r.INSTANCES[o]!=t&&r.INSTANCES[o].events.trigger("image.hideResizer");t.toolbar.disable(),e&&(e.stopPropagation(),e.preventDefault()),t.helpers.isMobile()&&(t.events.disableBlur(),t.$el.blur(),t.events.enableBlur()),t.opts.iframe&&t.size.syncIframe(),n=h(this),Ee(),A(),w(),t.browser.msie?(t.popups.areVisible()&&t.events.disableBlur(),t.win.getSelection&&(t.win.getSelection().removeAllRanges(),t.win.getSelection().addRange(t.doc.createRange()))):t.selection.clear(),t.helpers.isIOS()&&(t.events.disableBlur(),t.$el.blur()),t.button.bulkRefresh(),t.events.trigger("video.hideResizer")}function fe(e){n&&(pe||!0===e)&&(t.toolbar.enable(),o.removeClass("fr-active"),t.popups.hideAll(),n=null,me(),c=null,l&&l.hide())}a[v]="Image cannot be loaded from the passed link.",a[p]="No link in upload response.",a[u]="Error during file upload.",a[_]="Parsing response failed.",a[y]="File is too large.",a[E]="Image file type is invalid.",a[7]="Files can be uploaded only to same domain in IE 8 and IE 9.";var pe=!(a[8]="Image file is corrupted.");function ge(){pe=!0}function me(){pe=!1}function ve(e,n,r){!t.opts.htmlUntouched&&t.opts.useClasses?(e.removeClass("fr-fil fr-fir fr-dib fr-dii"),r&&e.addClass("fr-fi".concat(r[0])),n&&e.addClass("fr-di".concat(n[0]))):"inline"==n?(e.css({display:"inline-block",verticalAlign:"bottom",margin:t.opts.imageDefaultMargin}),"center"==r?e.css({float:"none",marginBottom:"",marginTop:"",maxWidth:"calc(100% - ".concat(2*t.opts.imageDefaultMargin,"px)"),textAlign:"center"}):"left"==r?e.css({float:"left",marginLeft:0,maxWidth:"calc(100% - ".concat(t.opts.imageDefaultMargin,"px)"),textAlign:"left"}):e.css({float:"right",marginRight:0,maxWidth:"calc(100% - ".concat(t.opts.imageDefaultMargin,"px)"),textAlign:"right"})):"block"==n&&(e.css({display:"block",float:"none",verticalAlign:"top",margin:"".concat(t.opts.imageDefaultMargin,"px auto"),textAlign:"center"}),"left"==r?e.css({marginLeft:0,textAlign:"left"}):"right"==r&&e.css({marginRight:0,textAlign:"right"}))}function be(e){if(void 0===e&&(e=we()),e){if(e.hasClass("fr-fil"))return"left";if(e.hasClass("fr-fir"))return"right";if(e.hasClass("fr-dib")||e.hasClass("fr-dii"))return"center";var t=e.css("float");if(e.css("float","none"),"block"==e.css("display")){if(e.css("float",""),e.css("float")!=t&&e.css("float",t),0===parseInt(e.css("margin-left"),10))return"left";if(0===parseInt(e.css("margin-right"),10))return"right"}else{if(e.css("float",""),e.css("float")!=t&&e.css("float",t),"left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function _e(e){void 0===e&&(e=we());var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function ye(){var e=t.popups.get("image.insert");e||(e=X()),t.popups.isVisible("image.insert")||(D(),t.popups.refresh("image.insert"),t.popups.setContainer("image.insert",t.$sc));var r=we(),o=r.outerWidth()/2;Se()&&(r=r.find(".fr-img-wrap"),o=n.outerWidth()/2);var c=r.offset().left+o,a=r.outerHeight(!0);t.opts.iframe&&Se()&&(a=n?n.outerHeight():0);var l=r.offset().top+r.outerHeight();t.popups.show("image.insert",c,l,a,!0)}function Ee(){if(n){t.events.disableBlur(),t.selection.clear();var e=t.doc.createRange();e.selectNode(n.get(0)),t.browser.msie&&e.collapse(!0),t.selection.get().addRange(e),t.events.enableBlur()}}function Ce(){return n}function we(){return Se()?n.parents(".fr-img-caption").first():n}function Se(){return!!n&&0<n.parents(".fr-img-caption").length}function Te(e){for(var t=document.createDocumentFragment();e.firstChild;){var n=e.removeChild(e.firstChild);t.appendChild(n)}e.parentNode.replaceChild(t,e)}return{_init:function(){var e;t.events.$on(t.$el,t._mousedown,"IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(e){if("false"==h(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;t.helpers.isMobile()||t.selection.clear(),m=!0,t.popups.areVisible()&&t.events.disableBlur(),t.browser.msie&&(t.events.disableBlur(),t.$el.attr("contenteditable",!1)),t.draggable||"touchstart"==e.type||e.preventDefault(),e.stopPropagation()})),t.events.$on(t.$el,t._mousedown,".fr-img-caption .fr-inner",(function(e){t.core.hasFocus()||t.events.focus(),e.stopPropagation()})),t.events.$on(t.$el,"paste",".fr-img-caption .fr-inner",(function(e){!0===t.opts.toolbarInline&&(t.toolbar.hide(),e.stopPropagation())})),t.events.$on(t.$el,t._mouseup,"IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(e){if("false"==h(this).parents("contenteditable").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;m&&(m=!1,e.stopPropagation(),t.browser.msie&&(t.$el.attr("contenteditable",!0),t.events.enableBlur()))})),t.events.on("keyup",(function(e){if(e.shiftKey&&""===t.selection.text().replace(/\n/g,"")&&t.keys.isArrow(e.which)){var n=t.selection.element(),r=t.selection.endElement();n&&"IMG"==n.tagName?B(h(n)):r&&"IMG"==r.tagName&&B(h(r))}}),!0),t.events.on("drop",Y),t.events.on("element.beforeDrop",G),t.events.on("mousedown window.mousedown",ge),t.events.on("window.touchmove",me),t.events.on("mouseup window.mouseup",(function(){if(n&&!t.helpers.isMobile())return fe(),!1;me()})),t.events.on("commands.mousedown",(function(e){0<e.parents(".fr-toolbar").length&&fe()})),t.events.on("image.resizeEnd",(function(){t.opts.iframe&&t.size.syncIframe()})),t.events.on("blur image.hideResizer commands.undo commands.redo element.dropped",(function(){fe(!(m=!1))})),t.events.on("modals.hide",(function(){n&&(Ee(),t.selection.clear())})),t.events.on("image.resizeEnd",(function(){t.win.getSelection&&B(n)})),t.opts.imageAddNewLine&&t.events.on("image.inserted",(function(e){var n=e.get(0);for(n.nextSibling&&"BR"===n.nextSibling.tagName&&(n=n.nextSibling);n&&!t.node.isElement(n);)n=t.node.isLastSibling(n)?n.parentNode:null;t.node.isElement(n)&&(t.opts.enter===r.ENTER_BR?e.after("<br>"):h(t.node.blockParent(e.get(0))).after("<".concat(t.html.defaultTag(),"><br></").concat(t.html.defaultTag(),">")))})),"IMG"==t.el.tagName&&t.$el.addClass("fr-view"),t.events.$on(t.$el,t.helpers.isMobile()&&!t.helpers.isWindowsPhone()?"touchend":"click","IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',he),t.helpers.isMobile()&&(t.events.$on(t.$el,"touchstart","IMG"==t.el.tagName?null:'img:not([contenteditable="false"])',(function(){d=!1})),t.events.$on(t.$el,"touchmove",(function(){d=!0}))),t.$wp?(t.events.on("window.keydown keydown",ie,!0),t.events.on("keyup",(function(e){if(n&&e.which==r.KEYCODE.ENTER)return!1}),!0),t.events.$on(t.$el,"keydown",(function(){var e=t.selection.element();(e.nodeType===Node.TEXT_NODE||"BR"==e.tagName&&t.node.isLastSibling(e))&&(e=e.parentNode),t.node.hasClass(e,"fr-inner")||(t.node.hasClass(e,"fr-img-caption")||(e=h(e).parents(".fr-img-caption").get(0)),t.node.hasClass(e,"fr-img-caption")&&(t.opts.trackChangesEnabled||h(e).after(r.INVISIBLE_SPACE+r.MARKERS),t.selection.restore()))}))):t.events.$on(t.$win,"keydown",ie),t.events.on("toolbar.esc",(function(){if(n){if(t.$wp)t.events.disableBlur(),t.events.focus();else{var e=n;fe(!0),t.selection.setAfter(e.get(0)),t.selection.restore()}return!1}}),!0),t.events.on("toolbar.focusEditor",(function(){if(n)return!1}),!0),t.events.on("window.cut window.copy",(function(e){if(n&&t.popups.isVisible("image.edit")&&!t.popups.get("image.edit").find(":focus").length){var o=we();Se()?(o.before(r.START_MARKER),o.after(r.END_MARKER),t.selection.restore(),t.paste.saveCopiedText(o.get(0).outerHTML,o.text())):(Ee(),t.paste.saveCopiedText(n.get(0).outerHTML,n.attr("alt"))),"copy"==e.type?setTimeout((function(){B(n)})):(fe(!0),t.undo.saveStep(),setTimeout((function(){t.undo.saveStep()}),0))}}),!0),t.browser.msie&&t.events.on("keydown",(function(e){if(!t.selection.isCollapsed()||!n)return!0;var o=e.which;o==r.KEYCODE.C&&t.keys.ctrlKey(e)?t.events.trigger("window.copy"):o==r.KEYCODE.X&&t.keys.ctrlKey(e)&&t.events.trigger("window.cut")})),t.events.$on(h(t.o_win),"keydown",(function(e){var t=e.which;if(n&&t==r.KEYCODE.BACKSPACE)return e.preventDefault(),!1})),t.events.$on(t.$win,"keydown",(function(e){var t=e.which;n&&n.hasClass("fr-uploading")&&t==r.KEYCODE.ESC&&n.trigger("abortUpload")})),t.events.on("destroy",(function(){n&&n.hasClass("fr-uploading")&&n.trigger("abortUpload")})),t.events.on("paste.before",de),t.events.on("paste.beforeCleanup",ue),t.events.on("paste.after",se),t.events.on("html.set",T),t.events.on("html.inserted",T),T(),t.events.on("destroy",(function(){s=[]})),t.events.on("html.processGet",oe),t.opts.imageOutputSize&&t.events.on("html.beforeGet",(function(){e=t.el.querySelectorAll("img");for(var n=0;n<e.length;n++){var r=e[n].style.width||h(e[n]).width(),o=e[n].style.height||h(e[n]).height();r&&e[n].setAttribute("width","".concat(r).replace(/px/,"")),o&&e[n].setAttribute("height","".concat(o).replace(/px/,""))}})),t.opts.iframe&&t.events.on("image.loaded",t.size.syncIframe),t.$wp&&(b(),t.events.on("contentChanged",b)),t.events.$on(h(t.o_win),"orientationchange.image",(function(){setTimeout((function(){n&&B(n)}),100)})),M(!0),X(!0),te(!0),Q(!0),t.events.on("node.remove",(function(e){if("IMG"==e.get(0).tagName)return re(e),!1}))},showInsertPopup:function(){var e=t.$tb.find('.fr-command[data-cmd="insertImage"]'),n=t.popups.get("image.insert");if(n||(n=X()),D(),!n.hasClass("fr-active"))if(t.popups.refresh("image.insert"),t.popups.setContainer("image.insert",t.$tb),e.isVisible()){var r=t.button.getPosition(e),o=r.left,a=r.top;t.popups.show("image.insert",o,a,e.outerHeight())}else t.position.forSelection(n),t.popups.show("image.insert")},showLayer:function(e){var r,o,c=t.popups.get("image.insert");if(n||t.opts.toolbarInline){if(n){var a=we(),l=0;Se()&&(a=a.find(".fr-img-wrap"),l=n.outerWidth()/2),o=a.offset().top+a.outerHeight(),r=a.offset().left+l}}else{var i=t.$tb.find('.fr-command[data-cmd="insertImage"]');r=i.offset().left,o=i.offset().top+(t.opts.toolbarBottom?10:i.outerHeight()-10)}!n&&t.opts.toolbarInline&&(o=c.offset().top-t.helpers.getPX(c.css("margin-top")),c.hasClass("fr-above")&&(o+=c.outerHeight())),c.find(".fr-layer").removeClass("fr-active"),c.find(".fr-".concat(e,"-layer")).addClass("fr-active"),t.popups.show("image.insert",r,o,n?n.outerHeight():0,Se()),t.accessibility.focusPopup(c)},refreshUploadButton:function(e){var n=t.popups.get("image.insert");n&&n.find(".fr-image-upload-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},refreshByURLButton:function(e){var n=t.popups.get("image.insert");n&&n.find(".fr-image-by-url-layer").hasClass("fr-active")&&e.addClass("fr-active").attr("aria-pressed",!0)},upload:K,insertByURL:function(){var e=t.popups.get("image.insert").find(".fr-image-by-url-layer input");if(0<e.val().length){x(),P(t.language.translate("Loading image"));var r=e.val().trim();if(t.opts.imageUploadRemoteUrls&&t.opts.imageCORSProxy&&t.opts.imageUpload){var o=new XMLHttpRequest;o.onload=function(){200==this.status?K([new Blob([this.response],{type:this.response.type||"image/png"})],n):L(v)},o.onerror=function(){V(r,!0,[],n)},o.open("GET","".concat(t.opts.imageCORSProxy,"/").concat(r),!0),o.responseType="blob",o.send()}else V(r,!0,[],n);e.val(""),e.blur()}},align:function(e){var n=we();n.removeClass("fr-fir fr-fil"),!t.opts.htmlUntouched&&t.opts.useClasses?"left"==e?n.addClass("fr-fil"):"right"==e&&n.addClass("fr-fir"):ve(n,_e(),e),Ee(),A(),w(),t.selection.clear()},refreshAlign:function(e){n&&e.find("> *").first().replaceWith(t.icon.create("image-align-".concat(be())))},refreshAlignOnShow:function(e,t){n&&t.find('.fr-command[data-param1="'.concat(be(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function(e){var n=we();n.removeClass("fr-dii fr-dib"),!t.opts.htmlUntouched&&t.opts.useClasses?"inline"==e?n.addClass("fr-dii"):"block"==e&&n.addClass("fr-dib"):ve(n,e,be()),Ee(),A(),w(),t.selection.clear()},refreshDisplayOnShow:function(e,t){n&&t.find('.fr-command[data-param1="'.concat(_e(),'"]')).addClass("fr-active").attr("aria-selected",!0)},replace:ye,back:function(){n?(t.events.disableBlur(),h(".fr-popup input:focus").blur(),B(n)):(t.events.disableBlur(),t.selection.restore(),t.events.enableBlur(),t.popups.hide("image.insert"),t.toolbar.showInline())},get:Ce,getEl:we,insert:V,showProgressBar:x,remove:re,hideProgressBar:D,applyStyle:function(r,o,c){if(void 0===o&&(o=t.opts.imageStyles),void 0===c&&(c=t.opts.imageMultipleStyles),!n)return!1;var l=we();if(!c){var a=Object.keys(o);a.splice(a.indexOf(r),1),l.removeClass(a.join(" "))}"object"==e(o[r])?(l.removeAttr("style"),l.css(o[r].style)):l.toggleClass(r),B(n)},showAltPopup:Z,showSizePopup:ee,setAlt:function(e){if(n){var r=t.popups.get("image.alt");n.attr("alt",e||r.find("input").val()||""),r.find("input:focus").blur(),B(n)}},setSize:function(e,r){if(n){var o=t.popups.get("image.size");e=e||o.find('input[name="width"]').val()||"",r=r||o.find('input[name="height"]').val()||"";var c=/^[\d]+((px)|%)*$/g;n.removeAttr("width").removeAttr("height"),e.match(c)?n.css("width",e):n.css("width",""),r.match(c)?n.css("height",r):n.css("height",""),Se()&&(n.parents(".fr-img-caption").removeAttr("width").removeAttr("height"),e.match(c)?n.parents(".fr-img-caption").css("width",e):n.parents(".fr-img-caption").css("width",""),r.match(c)?n.parents(".fr-img-caption").css("height",r):n.parents(".fr-img-caption").css("height","")),o&&o.find("input:focus").blur(),B(n)}},toggleCaption:function(){var e;if(n&&!Se()){(e=n).parent().is("a")&&(e=n.parent());var o,c,l=n.parents("ul")&&0<n.parents("ul").length?n.parents("ul"):n.parents("ol")&&0<n.parents("ol").length?n.parents("ol"):[];if(0<l.length){var a=l.find("li").length,d=n.parents("li"),i=document.createElement("li");a-1===d.index()&&(l.append(i),i.innerHTML="&nbsp;")}e.attr("style")?c=-1<(o=e.attr("style").split(":")).indexOf("width")?o[o.indexOf("width")+1].replace(";",""):"":e.attr("width")&&(c=e.attr("width"));var s=t.opts.imageResizeWithPercent?(-1<c.indexOf("px")?null:c)||"100%":n.width()+"px";e.wrap('<div class="fr-img-space-wrap"><span '+(t.browser.mozilla?"":'contenteditable="false"')+'class="fr-img-caption '+n.attr("class")+'" style="'+(t.opts.useClasses?"":e.attr("style"))+'" draggable="false"></span></div>'),e.wrap('<span class="fr-img-wrap"></span>'),n.after('<span class="fr-inner"'.concat(t.browser.mozilla?"":' contenteditable="true"',">").concat(r.START_MARKER).concat(t.language.translate("Image Caption")).concat(r.END_MARKER,"</span>")),n.parents(".fr-img-caption").css("width",s);var h=n.parents(".fr-img-space-wrap").length;1==h?Te(document.querySelector(".fr-img-space-wrap")):1<h&&(Te(document.querySelector(".fr-img-space-wrap")),Te(document.querySelector(".fr-img-space-wrap2"))),fe(!0),t.selection.restore()}else{if(e=we(),n.insertBefore(e),null!==e[0].querySelector("a")){for(var f,m=e[0].querySelector("a"),v=document.createElement("a"),p=0,u=m.attributes,_=u.length;p<_;p++)f=u[p],v.setAttribute(f.nodeName,f.nodeValue);n.wrap(v)}n.attr("class",e.attr("class").replace("fr-img-caption","")).attr("style",e.attr("style")),e.remove();var g=n.parents(".fr-img-space-wrap").length;1==g?Te(document.querySelector(".fr-img-space-wrap")):1<g&&(Te(document.querySelector(".fr-img-space-wrap")),Te(document.querySelector(".fr-img-space-wrap2"))),B(n)}},hasCaption:Se,exitEdit:fe,edit:B}},r.DefineIcon("insertImage",{NAME:"image",SVG_KEY:"insertImage"}),r.RegisterShortcut(r.KEYCODE.P,"insertImage",null,"P"),r.RegisterCommand("insertImage",{title:"Insert Image",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("image.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("image.insert")):this.image.showInsertPopup()},plugin:"image"}),r.DefineIcon("imageUpload",{NAME:"upload",SVG_KEY:"upload"}),r.RegisterCommand("imageUpload",{title:"Upload Image",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-upload")},refresh:function(e){this.image.refreshUploadButton(e)}}),r.DefineIcon("imageByURL",{NAME:"link",SVG_KEY:"insertLink"}),r.RegisterCommand("imageByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.image.showLayer("image-by-url")},refresh:function(e){this.image.refreshByURLButton(e)}}),r.RegisterCommand("imageInsertByURL",{title:"Insert Image",undo:!0,refreshAfterCallback:!1,callback:function(){this.image.insertByURL()},refresh:function(e){this.image.get()?e.text(this.language.translate("Replace")):e.text(this.language.translate("Insert"))}}),r.DefineIcon("imageDisplay",{NAME:"star",SVG_KEY:"imageDisplay"}),r.RegisterCommand("imageDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.image.display(t)},refresh:function(e){this.opts.imageTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.image.refreshDisplayOnShow(e,t)}}),r.DefineIcon("image-align",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("image-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("image-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),r.DefineIcon("image-align-center",{NAME:"align-justify",SVG_KEY:"alignCenter"}),r.DefineIcon("imageAlign",{NAME:"align-justify",SVG_KEY:"alignJustify"}),r.RegisterCommand("imageAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.imageAlign.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="imageAlign" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.icon.create("image-align-".concat(n)),'<span class="fr-sr-only">').concat(this.language.translate(t[n]),"</span></a></li>"));return e+"</ul>"},callback:function(e,t){this.image.align(t)},refresh:function(e){this.image.refreshAlign(e)},refreshOnShow:function(e,t){this.image.refreshAlignOnShow(e,t)}}),r.DefineIcon("imageReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),r.RegisterCommand("imageReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.image.replace()}}),r.DefineIcon("imageRemove",{NAME:"trash",SVG_KEY:"remove"}),r.RegisterCommand("imageRemove",{title:"Remove",callback:function(){this.image.remove()}}),r.DefineIcon("imageBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("imageBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.image.back()},refresh:function(e){this.$,this.image.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),r.RegisterCommand("imageDismissError",{title:"OK",undo:!1,callback:function(){this.image.hideProgressBar(!0)}}),r.DefineIcon("imageStyle",{NAME:"magic",SVG_KEY:"imageClass"}),r.RegisterCommand("imageStyle",{title:"Style",type:"dropdown",html:function(){var t='<ul class="fr-dropdown-list" role="presentation">',n=this.opts.imageStyles;for(var r in n)if(n.hasOwnProperty(r)){var o=n[r];"object"==e(o)&&(o=o.title),t+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="imageStyle" data-param1="'.concat(r,'">').concat(this.language.translate(o),"</a></li>")}return t+"</ul>"},callback:function(e,t){this.image.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,r=this.image.getEl();r&&t.find(".fr-command").each((function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)}))}}),r.DefineIcon("imageAlt",{NAME:"info",SVG_KEY:"imageAltText"}),r.RegisterCommand("imageAlt",{undo:!1,focus:!1,popup:!0,title:"Alternative Text",callback:function(){this.image.showAltPopup()}}),r.RegisterCommand("imageSetAlt",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setAlt()}}),r.DefineIcon("imageSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),r.RegisterCommand("imageSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.image.showSizePopup()}}),r.RegisterCommand("imageSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.image.setSize()}}),r.DefineIcon("imageCaption",{NAME:"commenting",FA5NAME:"comment-alt",SVG_KEY:"imageCaption"}),r.RegisterCommand("imageCaption",{undo:!0,focus:!1,title:"Image Caption",refreshAfterCallback:!0,callback:function(){this.image.toggleCaption()},refresh:function(e){this.image.get()&&e.toggleClass("fr-active",this.image.hasCaption())}}),Object.assign(r.DEFAULTS,{imageManagerLoadURL:"https://i.froala.com/load-files",imageManagerLoadMethod:"get",imageManagerLoadParams:{},imageManagerPreloader:null,imageManagerDeleteURL:"",imageManagerDeleteMethod:"post",imageManagerDeleteParams:{},imageManagerPageSize:12,imageManagerScrollOffset:20,imageManagerToggleTags:!0}),r.PLUGINS.imageManager=function(s){var e,t,n,i,o,c,p,u,l,g,d,h=s.$,b="image_manager",f=10,m=11,v=12,_=13,y=14,E=15,C=21,w=22,a={};function S(){var e=h(window).outerWidth();return e<768?2:e<1200?3:4}function T(){o.empty();for(var e=0;e<d;e++)o.append('<div class="fr-list-column"></div>')}function A(){if(l<p.length&&n[0].scrollTop>=n[0].scrollHeight-s.opts.imageManagerScrollOffset-n.outerHeight()){u++;for(var e=s.opts.imageManagerPageSize*(u-1);e<Math.min(p.length,s.opts.imageManagerPageSize*u);e++)R(p[e])}}function R(a){var e=new Image,i=h(document.createElement("div")).attr("class","fr-image-container fr-empty fr-image-"+g++).attr("data-loading",s.language.translate("Loading")+"..").attr("data-deleting",s.language.translate("Deleting")+"..");N(!1),e.onload=function(){i.height(Math.floor(i.width()/e.width*e.height));var n=h(document.createElement("img"));if(a.thumb)n.attr("src",a.thumb);else{if(D(y,a),!a.url)return D(E,a),!1;n.attr("src",a.url)}if(a.url&&n.attr("data-url",a.url),a.tag)if(t.find(".fr-modal-more.fr-not-available").removeClass("fr-not-available"),t.find(".fr-modal-tags").show(),0<=a.tag.indexOf(",")){for(var r=a.tag.split(","),o=0;o<r.length;o++)r[o]=r[o].trim(),0===c.find('a[title="'.concat(r[o],'"]')).length&&c.append('<a role="button" title="'.concat(r[o],'">').concat(r[o],"</a>"));n.attr("data-tag",r.join())}else 0===c.find('a[title="'.concat(a.tag.trim(),'"]')).length&&c.append('<a role="button" title="'.concat(a.tag.trim(),'">').concat(a.tag.trim(),"</a>")),n.attr("data-tag",a.tag.trim());for(var d in a.name&&n.attr("alt",a.name),a)a.hasOwnProperty(d)&&"thumb"!==d&&"url"!==d&&"tag"!==d&&n.attr("data-".concat(d),a[d]);i.append(n).append(h(s.icon.create("imageManagerDelete")).addClass("fr-delete-img").attr("title",s.language.translate("Delete"))).append(h(s.icon.create("imageManagerInsert")).addClass("fr-insert-img").attr("title",s.language.translate("Insert"))),c.find(".fr-selected-tag").each((function(e,t){F(n,t.text)||i.hide()})),n.on("load",(function(){i.removeClass("fr-empty"),i.height("auto"),l++,k(I(parseInt(n.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1)),N(!1),l%s.opts.imageManagerPageSize==0&&A()})),s.events.trigger("imageManager.imageLoaded",[n])},e.onerror=function(){l++,i.remove(),k(I(parseInt(i.attr("class").match(/fr-image-(\d+)/)[1],10)+1)),D(f,a),l%s.opts.imageManagerPageSize==0&&A()},e.src=a.thumb||a.url,O().append(i)}function O(){var e,a;return o.find(".fr-list-column").each((function(t,n){var r=h(n);(0===t||r.outerHeight()<a)&&(a=r.outerHeight(),e=r)})),e}function I(e){void 0===e&&(e=0);for(var t=[],n=g-1;e<=n;n--){var r=o.find(".fr-image-".concat(n));r.length&&(t.push(r),h(document.createElement("div")).attr("id","fr-image-hidden-container").append(r),o.find(".fr-image-".concat(n)).remove())}return t}function k(e){for(var t=e.length-1;0<=t;t--)O().append(e[t])}function N(t){if(void 0===t&&(t=!0),!e.isVisible())return!0;var n=S();if(n!==d){d=n;var r=I();T(),k(r)}s.modals.resize(b),t&&A()}function L(e){for(var t,n=e[0].attributes,r=n.length,a={};r--;)n[r]&&"src"!==(t=n[r].name)&&(a[t]=n[r].value);return a}function M(t){var n=h(t.currentTarget).siblings("img"),r=e.data("instance")||s,o=e.data("current-image");if(s.modals.hide(b),r.image.showProgressBar(),o)o.data("fr-old-src",o.attr("src")),o.trigger("click");else{r.events.focus(!0),r.selection.restore();var a=r.position.getBoundingRect(),c=a.left+a.width/2+h(s.doc).scrollLeft(),i=a.top+a.height+h(s.doc).scrollTop();r.popups.setContainer("image.insert",s.$sc),r.popups.show("image.insert",c,i)}r.image.insert(n.data("url"),!1,L(n),o)}function x(t){var n=h(t.currentTarget).siblings("img"),r=s.language.translate("Are you sure? Image will be deleted.");confirm(r)&&(s.opts.imageManagerDeleteURL?!1!==s.events.trigger("imageManager.beforeDeleteImage",[n])&&(n.parent().addClass("fr-image-deleting"),h(this).ajax({method:s.opts.imageManagerDeleteMethod,url:s.opts.imageManagerDeleteURL,data:Object.assign(Object.assign({src:n.attr("src")},L(n)),s.opts.imageManagerDeleteParams),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(t,r,o){s.events.trigger("imageManager.imageDeleted",[t]);var c=I(parseInt(n.parent().attr("class").match(/fr-image-(\d+)/)[1],10)+1);n.parent().remove(),k(c),e.find("#fr-modal-tags > a").each((function(){0===e.find('#fr-image-list [data-tag*="'.concat(h(this).text(),'"]')).length&&h(this).removeClass("fr-selected-tag").hide()})),U(),N(!0)},fail:function(e){D(C,e.response||e.responseText)}})):D(w))}function D(e,t){10<=e&&e<20?i.hide():20<=e&&e<30&&h(".fr-image-deleting").removeClass("fr-image-deleting"),s.events.trigger("imageManager.error",[{code:e,message:a[e]},t])}function P(){var e=t.find(".fr-modal-head-line").outerHeight(),r=c.outerHeight();t.toggleClass("fr-show-tags"),t.hasClass("fr-show-tags")?(t.css("height",e+r),n.css("marginTop",e+r),c.find("a").css("opacity",1)):(t.css("height",e),n.css("marginTop",e),c.find("a").css("opacity",0))}function U(){var e=c.find(".fr-selected-tag");0<e.length?(o.find("img").parents().show(),e.each((function(e,t){o.find("img").each((function(e,n){var r=h(n);F(r,t.text)||r.parent().hide()}))}))):o.find("img").parents().show(),k(I()),A()}function B(e){e.preventDefault();var t=h(e.currentTarget);t.toggleClass("fr-selected-tag"),s.opts.imageManagerToggleTags&&t.siblings("a").removeClass("fr-selected-tag"),U()}function F(e,t){for(var n=(e.attr("data-tag")||"").split(","),r=0;r<n.length;r++)if(n[r]===t)return!0;return!1}return a[f]="Image cannot be loaded from the passed link.",a[m]="Error during load images request.",a[v]="Missing imageManagerLoadURL option.",a[_]="Parsing load response failed.",a[y]="Missing image thumb.",a[E]="Missing image URL.",a[C]="Error during delete image request.",a[w]="Missing imageManagerDeleteURL option.",{require:["image"],_init:function(){if(!s.$wp&&"IMG"!==s.el.tagName)return!1},show:function(){if(!e){var f,y='<button class="fr-command fr-btn fr-modal-more fr-not-available" id="fr-modal-more-'.concat(s.sid,'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24""><path d="').concat(r.SVG.tags,'"/></svg></button><h4 data-text="true">').concat(s.language.translate("Manage Images"),'</h4></div>\n      <div class="fr-modal-tags" id="fr-modal-tags">');f=s.opts.imageManagerPreloader?'<img class="fr-preloader" id="fr-preloader" alt="'.concat(s.language.translate("Loading"),'.." src="').concat(s.opts.imageManagerPreloader,'" style="display: none;">'):'<span class="fr-preloader" id="fr-preloader" style="display: none;">'.concat(s.language.translate("Loading"),"</span>"),f+='<div class="fr-image-list" id="fr-image-list"></div>';var E=s.modals.create(b,y,f);e=E.$modal,t=E.$head,n=E.$body}e.data("current-image",s.image.get()),s.modals.show(b),i||(i=e.find("#fr-preloader"),o=e.find("#fr-image-list"),c=e.find("#fr-modal-tags"),d=S(),T(),t.css("height",t.find(".fr-modal-head-line").outerHeight()),s.events.$on(h(s.o_win),"resize",(function(){N(!!p)})),s.events.bindClick(o,".fr-insert-img",M),s.events.bindClick(o,".fr-delete-img",x),s.helpers.isMobile()&&(s.events.bindClick(o,"div.fr-image-container",(function(t){e.find(".fr-mobile-selected").removeClass("fr-mobile-selected"),h(t.currentTarget).addClass("fr-mobile-selected")})),e.on(s._mousedown,(function(){e.find(".fr-mobile-selected").removeClass("fr-mobile-selected")}))),e.on(s._mousedown+" "+s._mouseup,(function(e){e.stopPropagation()})),e.on(s._mousedown,"*",(function(){s.events.disableBlur()})),n.on("scroll",A),s.events.bindClick(e,"button#fr-modal-more-".concat(s.sid),P),s.events.bindClick(c,"a",B)),function(){i.show(),o.find(".fr-list-column").empty(),s.opts.imageManagerLoadURL?h(this).ajax({url:s.opts.imageManagerLoadURL,method:s.opts.imageManagerLoadMethod,data:s.opts.imageManagerLoadParams,crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,n){s.events.trigger("imageManager.imagesLoaded",[e]),function(e,t){try{o.find(".fr-list-column").empty(),g=l=u=0,p=JSON.parse(e),A()}catch(e){D(_,t)}}(e,n.response),i.hide()},fail:function(e){D(m,e.response||e.responseText)}}):D(v)}()},hide:function(){s.modals.hide(b)}}},!r.PLUGINS.image)throw new Error("Image manager plugin requires image plugin.");function C(e){var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:"Remove only spaces, ' and \" from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids",type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as <br> (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex: <div>foo</div>",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `<em>` and `<strong>`",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including `<html>`, `<head>` and `<body>` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(!1===e)return JSON.parse(JSON.stringify(t));var n={};for(var r in t)t.hasOwnProperty(r)&&(n[r]=t[r].defaultValue);return n}r.DEFAULTS.imageInsertButtons.push("imageManager"),r.RegisterCommand("imageManager",{title:"Browse",undo:!1,focus:!1,modal:!0,callback:function(){this.imageManager.show()},plugin:"imageManager"}),r.DefineIcon("imageManager",{NAME:"folder",SVG_KEY:"imageManager"}),r.DefineIcon("imageManagerInsert",{NAME:"plus",SVG_KEY:"add"}),r.DefineIcon("imageManagerDelete",{NAME:"trash",SVG_KEY:"remove"}),Object.assign(r.DEFAULTS,{inlineClasses:{"fr-class-code":"Code","fr-class-highlighted":"Highlighted","fr-class-transparency":"Transparent"}}),r.PLUGINS.inlineClass=function(e){var t=e.$;return{apply:function(t){e.format.toggle("span",{class:t})},refreshOnShow:function(n,r){r.find(".fr-command").each((function(){var n=t(this).data("param1"),r=e.format.is("span",{class:n});t(this).toggleClass("fr-active",r).attr("aria-selected",r)}))}}},r.RegisterCommand("inlineClass",{type:"dropdown",title:"Inline Class",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineClasses;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineClass" data-param1="'.concat(n,'" title="').concat(t[n],'">').concat(t[n],"</a></li>"));return e+"</ul>"},callback:function(e,t){this.inlineClass.apply(t)},refreshOnShow:function(e,t){this.inlineClass.refreshOnShow(e,t)},plugin:"inlineClass"}),r.DefineIcon("inlineClass",{NAME:"tag",SVG_KEY:"inlineClass"}),Object.assign(r.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),r.PLUGINS.inlineStyle=function(a){return{apply:function(e){for(var t=e.split(";"),n=0;n<t.length;n++){var r=t[n].split(":");t[n].length&&2==r.length&&a.format.applyStyle(r[0].trim(),r[1].trim())}}}},r.RegisterCommand("inlineStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.inlineStyles;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n]+(-1===t[n].indexOf("display:block;")?" display:block;":"");e+='<li role="presentation"><span style="'.concat(r,'" role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="inlineStyle" data-param1="').concat(t[n],'" title="').concat(this.language.translate(n),'">').concat(this.language.translate(n),"</a></span></li>")}return e+"</ul>"},title:"Inline Style",callback:function(e,t){this.inlineStyle.apply(t)},plugin:"inlineStyle"}),r.DefineIcon("inlineStyle",{NAME:"paint-brush",SVG_KEY:"inlineStyle"}),Object.assign(r.DEFAULTS,{lineBreakerTags:["table","hr","form","dl","span.fr-video",".fr-embedly","img"],lineBreakerOffset:15,lineBreakerHorizontalOffset:10}),r.PLUGINS.lineBreaker=function(e){var g,t,a,n=e.$;function o(t,r){var o,c,a,l,i,s,d,h;if(null==t)i=(l=r.parent()).offset().top,o=(d=r.offset().top)-Math.min((d-i)/2,e.opts.lineBreakerOffset),a=l.outerWidth(),c=l.offset().left;else if(null==r)(s=(l=t.parent()).offset().top+l.outerHeight())<(h=t.offset().top+t.outerHeight())&&(s=(l=n(l).parent()).offset().top+l.outerHeight()),o=h+Math.min(Math.abs(s-h)/2,e.opts.lineBreakerOffset),a=l.outerWidth(),c=l.offset().left;else{l=t.parent();var f=t.offset().top+t.height(),m=r.offset().top;if(m<f)return!1;o=(f+m)/2,a=l.outerWidth(),c=l.offset().left}if(e.opts.iframe){var p=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),u=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));c+=e.$iframe.offset().left-e.helpers.scrollLeft()+u,o+=e.$iframe.offset().top-e.helpers.scrollTop()+p}e.$box.append(g),g.css("top",o-e.win.pageYOffset),g.css("left",c-e.win.pageXOffset),g.css("width",a),g.data("tag1",t),g.data("tag2",r),g.addClass("fr-visible").data("instance",e)}function c(t){if(t){var r=n(t);if(0===e.$el.find(r).length)return null;if(t.nodeType!=Node.TEXT_NODE&&r.is(e.opts.lineBreakerTags.join(",")))return r;if(0<r.parents(e.opts.lineBreakerTags.join(",")).length)return t=r.parents(e.opts.lineBreakerTags.join(",")).get(0),0!==e.$el.find(n(t)).length&&n(t).is(e.opts.lineBreakerTags.join(","))?n(t):null}return null}function l(t,r){var o=e.doc.elementFromPoint(t,r);return o&&!n(o).closest(".fr-line-breaker").length&&!e.node.isElement(o)&&o!=e.$wp.get(0)&&function(t){if(void 0!==t.inFroalaWrapper)return t.inFroalaWrapper;for(var n=t;t.parentNode&&t.parentNode!==e.$wp.get(0);)t=t.parentNode;return n.inFroalaWrapper=t.parentNode==e.$wp.get(0),n.inFroalaWrapper}(o)?o:null}function i(t,n,r){for(var o=r,a=null;o<=e.opts.lineBreakerOffset&&!a;)(a=l(t,n-o))||(a=l(t,n+o)),o+=r;return a}function d(t,n,r){for(var o=null,a=100;!o&&t>e.$box.offset().left&&t<e.$box.offset().left+e.$box.outerWidth()&&0<a;)(o=l(t,n))||(o=i(t,n,5)),"left"==r?t-=e.opts.lineBreakerHorizontalOffset:t+=e.opts.lineBreakerHorizontalOffset,a-=e.opts.lineBreakerHorizontalOffset;return o}function h(t){var n=a=null,r=null,l=e.doc.elementFromPoint(t.pageX-e.win.pageXOffset,t.pageY-e.win.pageYOffset);(n=l&&("HTML"==l.tagName||"BODY"==l.tagName||e.node.isElement(l)||0<=(l.getAttribute("class")||"").indexOf("fr-line-breaker"))?((r=i(t.pageX-e.win.pageXOffset,t.pageY-e.win.pageYOffset,1))||(r=d(t.pageX-e.win.pageXOffset-e.opts.lineBreakerHorizontalOffset,t.pageY-e.win.pageYOffset,"left")),r||(r=d(t.pageX-e.win.pageXOffset+e.opts.lineBreakerHorizontalOffset,t.pageY-e.win.pageYOffset,"right")),c(r)):c(l))?function(t,n){var r,l,a=t.offset().top,d=t.offset().top+t.outerHeight();if(Math.abs(d-n)<=e.opts.lineBreakerOffset||Math.abs(n-a)<=e.opts.lineBreakerOffset)if(Math.abs(d-n)<Math.abs(n-a)){var i=null;for((l=t.get(0)).nextSibling&&(i=l.nextSibling.offsetParent?l.nextSibling:null);i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.length;)i=i.nextSibling;if(!i)return o(t,null),!0;if(r=c(i))return o(t,r),!0}else{if(!(l=t.get(0)).previousSibling)return o(null,t),!0;if(r=c(l.previousSibling))return o(r,t),!0}g.removeClass("fr-visible").removeData("instance")}(n,t.pageY):e.core.sameInstance(g)&&g.removeClass("fr-visible").removeData("instance")}function f(n){return!(g.hasClass("fr-visible")&&!e.core.sameInstance(g))&&(e.popups.areVisible()||e.el.querySelector(".fr-selected-cell")?(g.removeClass("fr-visible"),!0):void(!1!==t||e.edit.isDisabled()||(a&&clearTimeout(a),a=setTimeout(h,30,n))))}function s(){a&&clearTimeout(a),g&&g.hasClass("fr-visible")&&g.removeClass("fr-visible").removeData("instance")}var m=function(){t=!0,s()},p=function(){t=!1};function u(t){t.preventDefault();var n=g.data("instance")||e;g.removeClass("fr-visible").removeData("instance");var o=g.data("tag1"),c=g.data("tag2"),a=e.html.defaultTag();null==o?a&&"TD"!=c.parent().get(0).tagName&&0===c.parents(a).length?c.before("<".concat(a,">").concat(r.MARKERS,"<br></").concat(a,">")):c.before("".concat(r.MARKERS,"<br>")):a&&"TD"!=o.parent().get(0).tagName&&0===o.parents(a).length?o.after("<".concat(a,">").concat(r.MARKERS,"<br></").concat(a,">")):o.after("".concat(r.MARKERS,"<br>")),n.selection.restore(),e.toolbar.enable()}return{_init:function(){if(!e.$wp)return!1;e.shared.$line_breaker||(e.shared.$line_breaker=n(document.createElement("div")).attr("class","fr-line-breaker").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(e.language.translate("Break"),'"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><rect x="17" y="7" width="2" height="8"/><rect x="10" y="13" width="7" height="2"/><path d="M10.000,10.000 L10.000,18.013 L5.000,14.031 L10.000,10.000 Z"/></svg></a>'))),g=e.shared.$line_breaker,e.events.on("shared.destroy",(function(){g.html("").removeData().remove(),g=null}),!0),e.events.on("destroy",(function(){g.removeData("instance").removeClass("fr-visible"),n("body").first().append(g),clearTimeout(a)}),!0),e.events.$on(g,"mousemove",(function(e){e.stopPropagation()}),!0),e.events.bindClick(g,"a",u),t=!1,e.events.$on(e.$win,"mousemove",f),e.events.$on(n(e.win),"scroll",s),e.events.on("popups.show.table.edit",s),e.events.on("commands.after",s),e.events.$on(n(e.win),"mousedown",m),e.events.$on(n(e.win),"mouseup",p)}}},Object.assign(r.DEFAULTS,{lineHeights:{Default:"",Single:"1",1.15:"1.15",1.5:"1.5",Double:"2"}}),r.PLUGINS.lineHeight=function(e){var s=e.$;return{_init:function(){},apply:function(t){e.selection.save(),e.html.wrap(!0,!0,!0,!0),e.selection.restore();var n=e.selection.blocks();n.length&&s(n[0]).parent().is("td")&&e.format.applyStyle("line-height",t.toString()),e.selection.save();for(var o=0;o<n.length;o++)s(n[o]).css("line-height",t),e.opts.enter!==r.ENTER_BR||n.length&&s(n[0]).parent().is("td")||(s(n[o]).hasClass("fr-temp-div")&&s(n[o]).removeClass("fr-temp-div"),""===s(n[o]).attr("class")&&s(n[o]).removeAttr("class")),""===s(n[o]).attr("style")&&s(n[o]).removeAttr("style");e.html.unwrap(),e.selection.restore()},refreshOnShow:function(t,n){var r=e.selection.blocks();if(r.length){var i=s(r[0]);n.find(".fr-command").each((function(){var e=s(this).data("param1"),t=i.attr("style"),n=0<=(t||"").indexOf("line-height: "+e+";");if(t){var r=t.substring(t.indexOf("line-height")),a=r.substr(0,r.indexOf(";")),o=a&&a.split(":")[1];o&&o.length||"Default"!==i.text()||(n=!0)}t&&-1!==t.indexOf("line-height")||""!==e||(n=!0),s(this).toggleClass("fr-active",n).attr("aria-selected",n)}))}}}},r.RegisterCommand("lineHeight",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.lineHeights;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command '.concat(n,'" tabIndex="-1" role="option" data-cmd="lineHeight" data-param1="').concat(t[n],'" title="').concat(this.language.translate(n),'">').concat(this.language.translate(n),"</a></li>"));return e+"</ul>"},title:"Line Height",callback:function(e,t){this.lineHeight.apply(t)},refreshOnShow:function(e,t){this.lineHeight.refreshOnShow(e,t)},plugin:"lineHeight"}),r.DefineIcon("lineHeight",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"lineHeight"}),Object.assign(r.POPUP_TEMPLATES,{"link.edit":"[_BUTTONS_]","link.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),Object.assign(r.DEFAULTS,{linkEditButtons:["linkOpen","linkStyle","linkEdit","linkRemove"],linkInsertButtons:["linkBack","|","linkList"],linkAttributes:{},linkAutoPrefix:"http://",linkStyles:{"fr-green":"Green","fr-strong":"Thick"},linkMultipleStyles:!0,linkConvertEmailAddress:!0,linkAlwaysBlank:!1,linkAlwaysNoFollow:!1,linkNoOpener:!0,linkNoReferrer:!0,linkList:[{text:"Froala",href:"https://froala.com",target:"_blank"},{text:"Google",href:"https://google.com",target:"_blank"},{displayText:"Facebook",href:"https://facebook.com"}],linkText:!0}),r.PLUGINS.link=function(e){var t=e.$;function b(){var n=e.image?e.image.get():null;if(n||!e.$wp)return"A"==e.el.tagName?e.el:n&&n.get(0).parentNode&&"A"==n.get(0).parentNode.tagName?n.get(0).parentNode:void 0;var r=e.selection.ranges(0).commonAncestorContainer;try{r&&(r.contains&&r.contains(e.el)||!e.el.contains(r)||e.el==r)&&(r=null)}catch(e){r=null}if(r&&"A"===r.tagName)return r;var o=e.selection.element(),c=e.selection.endElement();"A"==o.tagName||e.node.isElement(o)||(o=t(o).parentsUntil(e.$el,"a").first().get(0)),"A"==c.tagName||e.node.isElement(c)||(c=t(c).parentsUntil(e.$el,"a").first().get(0));try{c&&(c.contains&&c.contains(e.el)||!e.el.contains(c)||e.el==c)&&(c=null)}catch(e){c=null}try{o&&(o.contains&&o.contains(e.el)||!e.el.contains(o)||e.el==o)&&(o=null)}catch(e){o=null}return c&&c==o&&"A"==c.tagName?(e.browser.msie||e.helpers.isMobile())&&(e.selection.info(o).atEnd||e.selection.info(o).atStart)?null:o:null}function n(){var t,n,r,o,a=e.image?e.image.get():null,c=[];if(a)"A"==a.get(0).parentNode.tagName&&c.push(a.get(0).parentNode);else if(e.win.getSelection){var i=e.win.getSelection();if(i.getRangeAt&&i.rangeCount){o=e.doc.createRange();for(var s=0;s<i.rangeCount;++s)if((n=(t=i.getRangeAt(s)).commonAncestorContainer)&&1!=n.nodeType&&(n=n.parentNode),n&&"a"==n.nodeName.toLowerCase())c.push(n);else{r=n.getElementsByTagName("a");for(var l=0;l<r.length;++l)o.selectNodeContents(r[l]),o.compareBoundaryPoints(t.END_TO_START,t)<1&&-1<o.compareBoundaryPoints(t.START_TO_END,t)&&c.push(r[l])}}}else if(e.doc.selection&&"Control"!=e.doc.selection.type)if("a"==(n=(t=e.doc.selection.createRange()).parentElement()).nodeName.toLowerCase())c.push(n);else{r=n.getElementsByTagName("a"),o=e.doc.body.createTextRange();for(var d=0;d<r.length;++d)o.moveToElementText(r[d]),-1<o.compareEndPoints("StartToEnd",t)&&o.compareEndPoints("EndToStart",t)<1&&c.push(r[d])}return c}function o(a){if(e.core.hasFocus()){if(c(),a&&"keyup"===a.type&&(a.altKey||a.which==r.KEYCODE.ALT))return!0;setTimeout((function(){if(!a||a&&(1==a.which||"mouseup"!=a.type)){var n=b(),o=e.image?e.image.get():null;if(n&&!o){if(e.image){var c=e.node.contents(n);if(1==c.length&&"IMG"==c[0].tagName){var l=e.selection.ranges(0);return 0===l.startOffset&&0===l.endOffset?t(n).before(r.INVISIBLE_SPACE+r.MARKERS):t(n).after(r.INVISIBLE_SPACE+r.MARKERS),e.selection.restore(),!1}}a&&a.stopPropagation(),i(n)}}}),e.helpers.isIOS()?100:0)}}function i(n){var r=e.popups.get("link.edit");r||(r=function(){var t="";1<=e.opts.linkEditButtons.length&&("A"==e.el.tagName&&0<=e.opts.linkEditButtons.indexOf("linkRemove")&&e.opts.linkEditButtons.splice(e.opts.linkEditButtons.indexOf("linkRemove"),1),t='<div class="fr-buttons">'.concat(e.button.buildList(e.opts.linkEditButtons),"</div>"));var n={buttons:t},r=e.popups.create("link.edit",n);return e.$wp&&e.events.$on(e.$wp,"scroll.link-edit",(function(){b()&&e.popups.isVisible("link.edit")&&i(b())})),r}());var o=t(n);e.popups.isVisible("link.edit")||e.popups.refresh("link.edit"),e.popups.setContainer("link.edit",e.$sc);var c=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();e.popups.show("link.edit",c,a,o.outerHeight(),!0)}function c(){e.popups.hide("link.edit")}function l(){var n=e.popups.get("link.insert"),r=b();if(r){var o,c,a=t(r),l=n.find('input.fr-link-attr[type="text"]'),i=n.find('input.fr-link-attr[type="checkbox"]');for(o=0;o<l.length;o++)(c=t(l[o])).val(a.attr(c.attr("name")||""));for(i.attr("checked",!1),o=0;o<i.length;o++)c=t(i[o]),a.attr(c.attr("name"))==c.data("checked")&&c.attr("checked",!0);n.find('input.fr-link-attr[type="text"][name="text"]').val(a.text())}else n.find('input.fr-link-attr[type="text"]').val(""),n.find('input.fr-link-attr[type="checkbox"]').attr("checked",!1),n.find('input.fr-link-attr[type="text"][name="text"]').val(e.selection.text());n.find("input.fr-link-attr").trigger("change"),e.image&&e.image.get()?n.find('.fr-link-attr[name="text"]').parent().hide():n.find('.fr-link-attr[name="text"]').parent().show()}function s(t){if(t)return e.popups.onRefresh("link.insert",l),!0;var n="";1<=e.opts.linkInsertButtons.length&&(n='<div class="fr-buttons fr-tabs">'.concat(e.button.buildList(e.opts.linkInsertButtons),"</div>"));var r="",o=0;for(var a in r='<div class="fr-link-insert-layer fr-layer fr-active" id="fr-link-insert-layer-'.concat(e.id,'">'),r+='<div class="fr-input-line"><input id="fr-link-insert-layer-url-'.concat(e.id,'" name="href" type="text" class="fr-link-attr" placeholder="').concat(e.language.translate("URL"),'" tabIndex="').concat(++o,'"></div>'),e.opts.linkText&&(r+='<div class="fr-input-line"><input id="fr-link-insert-layer-text-'.concat(e.id,'" name="text" type="text" class="fr-link-attr" placeholder="').concat(e.language.translate("Text"),'" tabIndex="').concat(++o,'"></div>')),e.opts.linkAttributes)if(e.opts.linkAttributes.hasOwnProperty(a)){var c=e.opts.linkAttributes[a];r+='<div class="fr-input-line"><input name="'.concat(a,'" type="text" class="fr-link-attr" placeholder="').concat(e.language.translate(c),'" tabIndex="').concat(++o,'"></div>')}e.opts.linkAlwaysBlank||(r+='<div class="fr-checkbox-line"><span class="fr-checkbox"><input name="target" class="fr-link-attr" data-checked="_blank" type="checkbox" id="fr-link-target-'.concat(e.id,'" tabIndex="').concat(++o,'"><span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span><label id="fr-label-target-').concat(e.id,'">').concat(e.language.translate("Open in new tab"),"</label></div>"));var i={buttons:n,input_layer:r+='<div class="fr-action-buttons"><button class="fr-command fr-submit" role="button" data-cmd="linkInsert" href="#" tabIndex="'.concat(++o,'" type="button">').concat(e.language.translate("Insert"),"</button></div></div>")},s=e.popups.create("link.insert",i);return e.$wp&&e.events.$on(e.$wp,"scroll.link-insert",(function(){(e.image?e.image.get():null)&&e.popups.isVisible("link.insert")&&f(),e.popups.isVisible("link.insert")&&h()})),s}function d(c,l,d){if(e.opts.trackChangesEnabled){if(e.edit.on(),e.events.focus(!0),e.undo.saveStep(),e.markers.insert(),e.html.wrap(),!e.$el.find(".fr-marker").length)return void e.popups.hide("link.insert");e.markers.remove()}if(void 0===d&&(d={}),!1===e.events.trigger("link.beforeInsert",[c,l,d]))return!1;var h=e.image?e.image.get():null;h||"A"==e.el.tagName?"A"==e.el.tagName&&e.$el.focus():(e.selection.restore(),e.popups.hide("link.insert"));var a=c;if(e.opts.linkConvertEmailAddress&&e.helpers.isEmail(c)&&!/^mailto:.*/i.test(c)&&(c="mailto:".concat(c)),""===e.opts.linkAutoPrefix||new RegExp("^("+r.LinkProtocols.join("|")+"):.","i").test(c)||/^data:image.*/i.test(c)||/^(https?:|ftps?:|file:|)\/\//i.test(c)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(c)||["/","{","[","#","(","."].indexOf((c||"")[0])<0&&(c=e.opts.linkAutoPrefix+c),c=e.helpers.sanitizeURL(c),e.opts.linkAlwaysBlank&&(d.target="_blank"),e.opts.linkAlwaysNoFollow&&(d.rel="nofollow"),e.helpers.isEmail(a)&&(d.target=null,d.rel=null),"_blank"==d.target?(e.opts.linkNoOpener&&(d.rel?d.rel+=" noopener":d.rel="noopener"),e.opts.linkNoReferrer&&(d.rel?d.rel+=" noreferrer":d.rel="noreferrer")):null==d.target&&(d.rel?d.rel=d.rel.replace(/noopener/,"").replace(/noreferrer/,""):d.rel=null),l=l||"",c===e.opts.linkAutoPrefix)return e.popups.get("link.insert").find('input[name="href"]').addClass("fr-error"),e.events.trigger("link.bad",[a]),!1;var f,i=b();if(i){if((f=t(i)).attr("href",c),0<l.length&&f.text()!=l&&!h){if(e.opts.trackChangesEnabled){var s=t(f.get(0).outerHTML);s.insertBefore(f.parent());var m=e.track_changes.wrapLinkInTracking(s,e.track_changes.getPendingChanges().length-1),v=e.track_changes.wrapInDelete(m);f.parent().append(v)}for(var _=f.get(0);1===_.childNodes.length&&_.childNodes[0].nodeType==Node.ELEMENT_NODE;)_=_.childNodes[0];t(_).text(l)}for(var y in h||f.prepend(r.START_MARKER).append(r.END_MARKER),d)d[y]?f.attr(y,d[y]):f.removeAttr(y);h||e.selection.restore()}else{h?(h.wrap('<a href="'.concat(c,'"></a>')),e.image.hasCaption()&&h.parent().append(h.parents(".fr-img-caption").find(".fr-inner"))):(e.format.remove("a"),e.selection.isCollapsed()?(l=0===l.length?a:l,e.html.insert('<a href="'.concat(c,'">').concat(r.START_MARKER).concat(l.replace(/&/g,"&amp;").replace(/</,"&lt;",">","&gt;")).concat(r.END_MARKER,"</a>")),e.selection.restore()):0<l.length&&l!=e.selection.text().replace(/\n/g,"")?(e.selection.remove(),e.html.insert('<a href="'.concat(c,'">').concat(r.START_MARKER).concat(l.replace(/&/g,"&amp;")).concat(r.END_MARKER,"</a>")),e.selection.restore()):(function(){if(!e.selection.isCollapsed()){e.selection.save();for(var n=e.$el.find(".fr-marker").addClass("fr-unprocessed").toArray();n.length;){var r=t(n.pop());r.removeClass("fr-unprocessed");var o=e.node.deepestParent(r.get(0));if(o){for(var c=r.get(0),a="",l="";c=c.parentNode,e.node.isBlock(c)||(a+=e.node.closeTagString(c),l=e.node.openTagString(c)+l),c!=o;);var i=e.node.openTagString(r.get(0))+r.html()+e.node.closeTagString(r.get(0));r.replaceWith('<span id="fr-break"></span>');var s=o.outerHTML;s=(s=s.replace(/<span id="fr-break"><\/span>/g,a+i+l)).replace(l+a,""),o.outerHTML=s}n=e.$el.find(".fr-marker.fr-unprocessed").toArray()}e.html.cleanEmptyTags(),e.selection.restore()}}(),e.format.apply("a",{href:c})));for(var p=n(),u=0;u<p.length;u++)(f=t(p[u])).attr(d),f.removeAttr("_moz_dirty");1==p.length&&e.$wp&&!h&&(t(p[0]).prepend(r.START_MARKER).append(r.END_MARKER),e.selection.restore())}if(h){var E=e.popups.get("link.insert");E&&E.find("input:focus").blur(),e.image.edit(h)}else o()}function h(){c();var n=b();if(n){var r=e.popups.get("link.insert");r||(r=s()),e.popups.isVisible("link.insert")||(e.popups.refresh("link.insert"),e.selection.save(),e.helpers.isMobile()&&(e.events.disableBlur(),e.$el.blur(),e.events.enableBlur())),e.popups.setContainer("link.insert",e.$sc);var o=(e.image?e.image.get():null)||t(n),l=o.offset().left+o.outerWidth()/2,a=o.offset().top+o.outerHeight();e.popups.show("link.insert",l,a,o.outerHeight(),!0)}}function f(){var n=e.image?e.image.getEl():null;if(n){var r=e.popups.get("link.insert"),o=n.outerWidth()/2;e.image.hasCaption()&&(n=n.find(".fr-img-wrap"),t(n)&&t(n).find("img")&&(o=t(n).find("img").outerWidth()/2)),r||(r=s()),l(),e.popups.setContainer("link.insert",e.$sc);var c=n.offset().left+o,a=n.offset().top+n.outerHeight(),d=n.outerHeight();e.opts.iframe&&e.image.hasCaption()&&t(n)&&t(n).find("img")&&(d=t(n).find("img").outerHeight()),e.popups.show("link.insert",c,a,d,!0)}}return{_init:function(){e.events.on("keyup",(function(e){e.which!=r.KEYCODE.ESC&&o(e)})),e.events.on("window.mouseup",o),e.events.$on(e.$el,"click","a",(function(t){e.edit.isDisabled()&&t.preventDefault()})),e.helpers.isMobile()&&e.events.$on(e.$doc,"selectionchange",o),s(!0),"A"==e.el.tagName&&e.$el.addClass("fr-view"),e.events.on("toolbar.esc",(function(){if(e.popups.isVisible("link.edit"))return e.events.disableBlur(),e.events.focus(),!1}),!0)},remove:function(){var n=b(),r=e.image?e.image.get():null;if(!1===e.events.trigger("link.beforeRemove",[n]))return!1;if(r&&n)if(e.image.hasCaption()){r.addClass("img-link-caption"),t(n).replaceWith(t(n).html());var o=document.querySelectorAll("img.img-link-caption");e.image.edit(t(o[0])),t(o[0]).removeClass("img-link-caption")}else r.unwrap(),e.image.edit(r);else n&&(e.selection.save(),t(n).replaceWith(t(n).html()),e.selection.restore(),c())},showInsertPopup:function(){var t=e.$tb.find('.fr-command[data-cmd="insertLink"]'),n=e.popups.get("link.insert");if(n||(n=s()),!n.hasClass("fr-active"))if(e.popups.refresh("link.insert"),e.popups.setContainer("link.insert",e.$tb||e.$sc),t.isVisible()){var r=e.button.getPosition(t),o=r.left,a=r.top;e.popups.show("link.insert",o,a,t.outerHeight())}else e.position.forSelection(n),e.popups.show("link.insert")},usePredefined:function(n){var r,o,c=e.opts.linkList[n],a=e.popups.get("link.insert"),l=a.find('input.fr-link-attr[type="text"]'),i=a.find('input.fr-link-attr[type="checkbox"]');for(c.rel&&(a.rel=c.rel),o=0;o<l.length;o++)c[(r=t(l[o])).attr("name")]?(r.val(c[r.attr("name")]),r.toggleClass("fr-not-empty",!0)):"text"!=r.attr("name")&&r.val("");for(o=0;o<i.length;o++)(r=t(i[o])).attr("checked",r.data("checked")==c[r.attr("name")]);e.accessibility.focusPopup(a)},insertCallback:function(){var n,r,o=e.popups.get("link.insert"),c=o.find('input.fr-link-attr[type="text"]'),a=o.find('input.fr-link-attr[type="checkbox"]'),l=(c.filter('[name="href"]').val()||"").trim(),i=e.opts.linkText?c.filter('[name="text"]').val():"",s={};for(r=0;r<c.length;r++)n=t(c[r]),["href","text"].indexOf(n.attr("name"))<0&&(s[n.attr("name")]=n.val());for(r=0;r<a.length;r++)(n=t(a[r])).is(":checked")?s[n.attr("name")]=n.data("checked"):s[n.attr("name")]=n.data("unchecked")||null;o.rel&&(s.rel=o.rel);var h=e.helpers.scrollTop();d(l,i,s),t(e.o_win).scrollTop(h)},insert:d,update:h,get:b,allSelected:n,back:function(){e.image&&e.image.get()?e.image.back():(e.events.disableBlur(),e.selection.restore(),e.events.enableBlur(),b()&&e.$wp?(e.selection.restore(),c(),o()):"A"==e.el.tagName?(e.$el.focus(),o()):(e.popups.hide("link.insert"),e.toolbar.showInline()))},imageLink:f,applyStyle:function(n,r,c){void 0===c&&(c=e.opts.linkMultipleStyles),void 0===r&&(r=e.opts.linkStyles);var l=b();if(!l)return!1;if(!c){var a=Object.keys(r);a.splice(a.indexOf(n),1),t(l).removeClass(a.join(" "))}t(l).toggleClass(n),o()}}},r.DefineIcon("insertLink",{NAME:"link",SVG_KEY:"insertLink"}),r.RegisterShortcut(r.KEYCODE.K,"insertLink",null,"K"),r.RegisterCommand("insertLink",{title:"Insert Link",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("link.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("link.insert")):this.link.showInsertPopup()},plugin:"link"}),r.DefineIcon("linkOpen",{NAME:"external-link",FA5NAME:"external-link-alt",SVG_KEY:"openLink"}),r.RegisterCommand("linkOpen",{title:"Open Link",undo:!1,refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},callback:function(){var e=this.link.get();e&&(-1!==e.href.indexOf("mailto:")?this.o_win.open(e.href).close():(e.target||(e.target="_self"),this.browser.msie||this.browser.edge?this.o_win.open(e.href,e.target):this.o_win.open(e.href,e.target,"noopener")),this.popups.hide("link.edit"))},plugin:"link"}),r.DefineIcon("linkEdit",{NAME:"edit",SVG_KEY:"edit"}),r.RegisterCommand("linkEdit",{title:"Edit Link",undo:!1,refreshAfterCallback:!1,popup:!0,callback:function(){this.link.update()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),r.DefineIcon("linkRemove",{NAME:"unlink",SVG_KEY:"unlink"}),r.RegisterCommand("linkRemove",{title:"Unlink",callback:function(){this.link.remove()},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),r.DefineIcon("linkBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("linkBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.link.back()},refresh:function(e){var t=this.link.get()&&this.doc.hasFocus();this.image&&this.image.get()||t||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))},plugin:"link"}),r.DefineIcon("linkList",{NAME:"search",SVG_KEY:"search"}),r.RegisterCommand("linkList",{title:"Choose Link",type:"dropdown",focus:!1,undo:!1,refreshAfterCallback:!1,html:function(){for(var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkList,n=0;n<t.length;n++)e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkList" data-param1="'.concat(n,'">').concat(t[n].displayText||t[n].text,"</a></li>");return e+"</ul>"},callback:function(e,t){this.link.usePredefined(t)},plugin:"link"}),r.RegisterCommand("linkInsert",{focus:!1,refreshAfterCallback:!1,callback:function(){this.link.insertCallback()},refresh:function(e){this.link.get()?e.text(this.language.translate("Update")):e.text(this.language.translate("Insert"))},plugin:"link"}),r.DefineIcon("imageLink",{NAME:"link",SVG_KEY:"insertLink"}),r.RegisterCommand("imageLink",{title:"Insert Link",undo:!1,focus:!1,popup:!0,callback:function(){this.link.imageLink()},refresh:function(e){var t;this.link.get()?((t=e.prev()).hasClass("fr-separator")&&t.removeClass("fr-hidden"),e.addClass("fr-hidden")):((t=e.prev()).hasClass("fr-separator")&&t.addClass("fr-hidden"),e.removeClass("fr-hidden"))},plugin:"link"}),r.DefineIcon("linkStyle",{NAME:"magic",SVG_KEY:"linkStyles"}),r.RegisterCommand("linkStyle",{title:"Style",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.linkStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="linkStyle" data-param1="'.concat(n,'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){this.link.applyStyle(t)},refreshOnShow:function(e,t){var n=this.$,r=this.link.get();if(r){var a=n(r);t.find(".fr-command").each((function(){var e=n(this).data("param1"),t=a.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)}))}},refresh:function(e){this.link.get()?e.removeClass("fr-hidden"):e.addClass("fr-hidden")},plugin:"link"}),Object.assign(r.DEFAULTS,{listAdvancedTypes:!0}),r.PLUGINS.lists=function(u){var e=u.$;function t(e){return'<span class="fr-open-'.concat(e.toLowerCase(),'"></span>')}function p(e){return'<span class="fr-close-'.concat(e.toLowerCase(),'"></span>')}function n(t,n){!function(t,n){for(var r=[],o=0;o<t.length;o++){var a=t[o].parentNode;"LI"==t[o].tagName&&a.tagName!=n&&r.indexOf(a)<0&&r.push(a)}for(var c=r.length-1;0<=c;c--){var i=e(r[c]);i.replaceWith("<".concat(n.toLowerCase()," ").concat(u.node.attributes(i.get(0)),">").concat(i.html(),"</").concat(n.toLowerCase(),">"))}}(t,n);var r,o=u.html.defaultTag(),a=null;t.length&&(r="rtl"==u.opts.direction||"rtl"==e(t[0]).css("direction")?"margin-right":"margin-left");for(var c=0;c<t.length;c++)if("TD"!=t[c].tagName&&"TH"!=t[c].tagName&&"LI"!=t[c].tagName){var i=u.helpers.getPX(e(t[c]).css(r))||0;(t[c].style.marginLeft=null)===a&&(a=i);var s=0<a?"<".concat(n,' style="').concat(r,": ").concat(a,'px ">'):"<".concat(n,">"),l="</".concat(n,">");for(i-=a;0<i/u.opts.indentMargin;)s+="</".concat(n,">"),l+=l,i-=u.opts.indentMargin;o&&t[c].tagName.toLowerCase()==o?e(t[c]).replaceWith("".concat(s,"<li").concat(u.node.attributes(t[c]),">").concat(e(t[c]).html(),"</li>").concat(l)):e(t[c]).wrap("".concat(s,"<li></li>").concat(l))}u.clean.lists()}function o(n){var r,o;for(r=n.length-1;0<=r;r--)for(o=r-1;0<=o;o--){if(e(n[o]).find(n[r]).length||n[o]==n[r]){n.splice(r,1);break}if(e(n[o]).contains(n[r])){n.splice(o,1);break}}var c=[];for(r=0;r<n.length;r++){var a=e(n[r]),l=n[r].parentNode,i=a.attr("class");if(a.before(p(l.tagName)),"LI"==l.parentNode.tagName)a.before(p("LI")),a.after(t("LI"));else if("OL"==l.parentNode.tagName)a.before(p("OL")),a.after(t("OL"));else{var s="";i&&(s+=' class="'.concat(i,'"'));var d="rtl"==u.opts.direction||"rtl"==a.css("direction")?"margin-right":"margin-left";u.helpers.getPX(e(l).css(d))&&0<=(e(l).attr("style")||"").indexOf("".concat(d,":"))&&(s+=' style="'.concat(d,":").concat(u.helpers.getPX(e(l).css(d)),'px;"')),u.html.defaultTag()&&0===a.find(u.html.blockTagsQuery()).length&&a.wrapInner(u.html.defaultTag()+s),u.node.isEmpty(a.get(0),!0)||0!==a.find(u.html.blockTagsQuery()).length||("DIV"==l.parentNode.tagName&&u.html.defaultTag()?(a.prepend(t(u.html.defaultTag())),a.append(p(u.html.defaultTag()))):a.append("<br>")),a.append(t("LI")),a.prepend(p("LI"))}a.after(t(l.tagName)),"LI"==l.parentNode.tagName&&(l=l.parentNode.parentNode),c.indexOf(l)<0&&c.push(l)}for(r=0;r<c.length;r++){var h=e(c[r]),f=h.html();f=(f=f.replace(/<span class="fr-close-([a-z]*)"><\/span>/g,"</$1>")).replace(/<span class="fr-open-([a-z]*)"><\/span>/g,"<$1>"),h.replaceWith(u.node.openTagString(h.get(0))+f+u.node.closeTagString(h.get(0)))}u.$el.find("li:empty").remove(),u.$el.find("ul:empty, ol:empty").remove(),u.clean.lists(),u.$el.find("ul:empty, ol:empty").remove(),u.html.wrap()}function c(t){if("indent"==t||"outdent"==t){var n=!1,r=u.selection.blocks(),c=[],a=r[0].previousSibling||r[0].parentElement;if("outdent"==t){if("UL"!=r[0].parentNode.tagName&&"UL"!=a.parentNode.tagName&&"OL"!=a.parentNode.tagName&&"LI"!=a.parentNode.tagName)return;if(!r[0].previousSibling&&"none"==a.parentNode.style.listStyleType)return void function(e){for(u.selection.save();0<e.childNodes.length;)e.parentNode.parentNode.append(e.childNodes[0]);u.clean.lists(),u.selection.restore()}(a)}else{if("UL"!=a.parentNode.tagName&&"OL"!=a.parentNode.tagName&&"LI"!=a.parentNode.tagName)return;if(!r[0].previousSibling||"LI"!=r[0].previousSibling.tagName)return void function(e){u.selection.save();for(var t="OL"==e.tagName?document.createElement("ol"):document.createElement("ul");0<e.childNodes.length;)t.append(e.childNodes[0]);var n=document.createElement("li");t.append(n),e.append(t),u.clean.lists(),u.selection.restore()}(a)}for(var l=0;l<r.length;l++)"LI"==r[l].tagName?(n=!0,c.push(r[l])):"LI"==r[l].parentNode.tagName&&(n=!0,c.push(r[l].parentNode));n&&("indent"==t?function(t){u.selection.save();for(var n=0;n<t.length;n++){var r=t[n].previousSibling;if(r){var o=e(t[n]).find("> ul, > ol").last().get(0);if(o){var a=e(document.createElement("li"));if(o.childNodes.length)for(var c=o.childNodes[0].attributes,i=0;i<c.length;i++){var s=c[i];"style"===s.name&&(a[0].style.cssText+=s.value)}e(o).prepend(a);for(var l=u.node.contents(t[n])[0];l&&!u.node.isList(l);){var d=l.nextSibling;a.append(l),l=d}e(r).append(e(o)),e(t[n]).remove()}else{var h=e(r).find("> ul, > ol").last().get(0);if(h)e(h).append(e(t[n]));else{var f=e("<".concat(t[n].parentNode.tagName,">"));e(r).append(f),f.append(e(t[n]))}}}}u.clean.lists(),u.selection.restore()}(c):function(e){u.selection.save(),o(e),u.selection.restore()}(c))}}return{_init:function(){u.events.on("commands.after",c),u.events.on("keydown",(function(e){if(e.which==r.KEYCODE.TAB){for(var t=u.selection.blocks(),n=[],o=0;o<t.length;o++)"LI"==t[o].tagName?n.push(t[o]):"LI"==t[o].parentNode.tagName&&n.push(t[o].parentNode);if(1<n.length||n.length&&(u.selection.info(n[0]).atStart||u.node.isEmpty(n[0])))return e.preventDefault(),e.stopPropagation(),e.shiftKey?u.commands.outdent():u.commands.indent(),!1}}),!0)},format:function(t,r){var c,l;for(u.html.syncInputs(),u.selection.save(),u.html.wrap(!0,!0,!0,!0),u.selection.restore(),l=u.selection.blocks(!0),c=0;c<l.length;c++)"LI"!=l[c].tagName&&"LI"==l[c].parentNode.tagName&&(l[c]=l[c].parentNode);if(u.selection.save(),function(e,t){for(var n=!0,r=0;r<e.length;r++){if("LI"!=e[r].tagName)return!1;e[r].parentNode.tagName!=t&&(n=!1)}return n}(l,t)?r||o(l):n(l,t),u.html.unwrap(),u.selection.restore(),r=r||"default"){for(l=u.selection.blocks(),c=0;c<l.length;c++)"LI"!=l[c].tagName&&"LI"==l[c].parentNode.tagName&&(l[c]=l[c].parentNode);for(c=0;c<l.length;c++)"LI"==l[c].tagName&&(e(l[c].parentNode).css("list-style-type","default"===r?"":r),0===(e(l[c].parentNode).attr("style")||"").length&&e(l[c].parentNode).removeAttr("style"))}},refresh:function(t,n){var r=e(u.selection.element());if(r.get(0)!=u.el){var o=r.get(0);(o="LI"!=o.tagName&&o.firstElementChild&&"LI"!=o.firstElementChild.tagName?r.parents("li").get(0):"LI"==o.tagName||o.firstElementChild?o.firstElementChild&&"LI"==o.firstElementChild.tagName?r.get(0).firstChild:r.get(0):r.parents("li").get(0))&&o.parentNode.tagName==n&&u.el.contains(o.parentNode)&&t.addClass("fr-active")}}}},r.DefineIcon("formatOLSimple",{NAME:"list-ol",SVG_KEY:"orderedList"}),r.RegisterCommand("formatOLSimple",{title:"Ordered List",type:"button",options:{default:"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),r.RegisterCommand("formatUL",{title:"Unordered List",type:"button",hasOptions:function(){return this.opts.listAdvancedTypes},options:{default:"Default",circle:"Circle",disc:"Disc",square:"Square"},refresh:function(e){this.lists.refresh(e,"UL")},callback:function(e,t){this.lists.format("UL",t)},plugin:"lists"}),r.RegisterCommand("formatOL",{title:"Ordered List",hasOptions:function(){return this.opts.listAdvancedTypes},options:{default:"Default","lower-alpha":"Lower Alpha","lower-greek":"Lower Greek","lower-roman":"Lower Roman","upper-alpha":"Upper Alpha","upper-roman":"Upper Roman"},refresh:function(e){this.lists.refresh(e,"OL")},callback:function(e,t){this.lists.format("OL",t)},plugin:"lists"}),r.DefineIcon("formatUL",{NAME:"list-ul",SVG_KEY:"unorderedList"}),r.DefineIcon("formatOL",{NAME:"list-ol",SVG_KEY:"orderedList"}),Object.assign(r.DEFAULTS,{paragraphFormat:{N:"Normal",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",PRE:"Code"},paragraphFormatSelection:!1,paragraphDefaultSelection:"Paragraph Format"}),r.PLUGINS.paragraphFormat=function(u){var e=u.$;function g(t,n){var r=u.html.defaultTag();if(n&&n.toLowerCase()!=r)if(0<t.find("ul, ol").length){var o=e("<"+n+">");t.prepend(o);for(var a=u.node.contents(t.get(0))[0];a&&["UL","OL"].indexOf(a.tagName)<0;){var c=a.nextSibling;o.append(a),a=c}}else t.html("<"+n+">"+t.html()+"</"+n+">")}return{apply:function(t){"N"==t&&(t=u.html.defaultTag()),u.selection.save(),u.html.wrap(!0,!0,!u.opts.paragraphFormat.BLOCKQUOTE,!0,!0),u.selection.restore();var n,r,o,a,c,i,s,l,d=u.selection.blocks();u.selection.save(),u.$el.find("pre").attr("skip",!0);for(var h=0;h<d.length;h++)if(d[h].tagName!=t&&!u.node.isList(d[h])){var f=e(d[h]);if("LI"==d[h].tagName)g(f,t);else if("LI"==d[h].parentNode.tagName&&d[h])i=f,s=t,l=u.html.defaultTag(),s&&s.toLowerCase()!=l||(s='div class="fr-temp-div"'),i.replaceWith(e("<"+s+">").html(i.html()));else if(0<=["TD","TH"].indexOf(d[h].parentNode.tagName))o=f,a=t,c=u.html.defaultTag(),a||(a='div class="fr-temp-div"'+(u.node.isEmpty(o.get(0),!0)?' data-empty="true"':"")),a.toLowerCase()==c?(u.node.isEmpty(o.get(0),!0)||o.append("<br/>"),o.replaceWith(o.html())):o.replaceWith(e("<"+a+">").html(o.html()));else{if("PRE"===t&&null===f[0].nextSibling){var p=e("<br>");f[0].after(p[0])}n=f,(r=t)||(r='div class="fr-temp-div"'+(u.node.isEmpty(n.get(0),!0)?' data-empty="true"':"")),("H1"==r||"H2"==r||"H3"==r||"H4"==r||"H5"==r)&&-1<u.node.attributes(n.get(0)).indexOf("font-size:")?n.replaceWith(e("<"+r+" "+u.node.attributes(n.get(0)).replace(/font-size:[0-9]+px;?/,"")+">").html(n.html()).removeAttr("data-empty")):n.replaceWith(e("<"+r+" "+u.node.attributes(n.get(0))+">").html(n.html()).removeAttr("data-empty"))}}u.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each((function(){e(this).prev().append("<br>"+e(this).html()),e(this).remove()})),u.$el.find("pre").removeAttr("skip"),u.html.unwrap(),u.selection.restore()},refreshOnShow:function(e,t){var n=u.selection.blocks();if(n.length){var r=n[0],a="N",o=u.html.defaultTag();r.tagName.toLowerCase()!=o&&r!=u.el&&(a=r.tagName),t.find('.fr-command[data-param1="'+a+'"]').addClass("fr-active").attr("aria-selected",!0)}else t.find('.fr-command[data-param1="N"]').addClass("fr-active").attr("aria-selected",!0)},refresh:function(e){if(u.opts.paragraphFormatSelection){var t=u.selection.blocks();if(t.length){var n=t[0],r="N",a=u.html.defaultTag();n.tagName.toLowerCase()!=a&&n!=u.el&&(r=n.tagName),0<=["LI","TD","TH"].indexOf(r)&&(r="N"),e.find(">span").text(u.language.translate(u.opts.paragraphFormat[r]))}else e.find(">span").text(u.language.translate(u.opts.paragraphFormat.N))}}}},r.RegisterCommand("paragraphFormat",{type:"dropdown",displaySelection:function(e){return e.opts.paragraphFormatSelection},defaultSelection:function(e){return e.language.translate(e.opts.paragraphDefaultSelection)},displaySelectionWidth:80,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphFormat;for(var n in t)if(t.hasOwnProperty(n)){var r=this.shortcuts.get("paragraphFormat."+n);r=r?'<span class="fr-shortcut">'+r+"</span>":"",e+='<li role="presentation"><'+("N"==n?this.html.defaultTag()||"DIV":n)+' style="padding: 0 !important; margin: 0 !important; border: 0 !important; background-color: transparent !important; '+("PRE"==n||"N"==n?"font-size: 15px":"font-weight: bold !important; ")+("H1"==n?"font-size: 2em !important; ":"")+("H2"==n?"font-size: 1.5em !important; ":"")+("H3"==n?"font-size: 1.17em !important; ":"")+("H4"==n?"font-size: 15px !important;":"")+'"  role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="paragraphFormat" data-param1="'+n+'" title="'+this.language.translate(t[n])+'">'+this.language.translate(t[n])+"</a></"+("N"==n?this.html.defaultTag()||"DIV":n)+"></li>"}return e+"</ul>"},title:"Paragraph Format",callback:function(e,t){this.paragraphFormat.apply(t)},refresh:function(e){this.paragraphFormat.refresh(e)},refreshOnShow:function(e,t){this.paragraphFormat.refreshOnShow(e,t)},plugin:"paragraphFormat"}),r.DefineIcon("paragraphFormat",{NAME:"paragraph",SVG_KEY:"paragraphFormat"}),Object.assign(r.DEFAULTS,{paragraphStyles:{"fr-text-gray":"Gray","fr-text-bordered":"Bordered","fr-text-spaced":"Spaced","fr-text-uppercase":"Uppercase"},paragraphMultipleStyles:!0}),r.PLUGINS.paragraphStyle=function(e){var t=e.$;return{_init:function(){},apply:function(n,r,o){void 0===r&&(r=e.opts.paragraphStyles),void 0===o&&(o=e.opts.paragraphMultipleStyles);var c="";o||((c=Object.keys(r)).splice(c.indexOf(n),1),c=c.join(" ")),e.selection.save(),e.html.wrap(!0,!0,!0,!0),e.selection.restore();var a=e.selection.blocks();e.selection.save();for(var l=t(a[0]).hasClass(n),i=0;i<a.length;i++)t(a[i]).removeClass(c).toggleClass(n,!l),t(a[i]).hasClass("fr-temp-div")&&t(a[i]).removeClass("fr-temp-div"),""===t(a[i]).attr("class")&&t(a[i]).removeAttr("class");if(1===a.length&&"fr-text-bordered"===n&&null===a[0].nextSibling){var s=t("<br>");a[0].after(s[0])}e.html.unwrap(),e.selection.restore()},refreshOnShow:function(n,r){var o=e.selection.blocks();if(o.length){var c=t(o[0]);r.find(".fr-command").each((function(){var e=t(this).data("param1"),n=c.hasClass(e);t(this).toggleClass("fr-active",n).attr("aria-selected",n)}))}}}},r.RegisterCommand("paragraphStyle",{type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.paragraphStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command '.concat(n,'" tabIndex="-1" role="option" data-cmd="paragraphStyle" data-param1="').concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},title:"Paragraph Style",callback:function(e,t){this.paragraphStyle.apply(t)},refreshOnShow:function(e,t){this.paragraphStyle.refreshOnShow(e,t)},plugin:"paragraphStyle"}),r.DefineIcon("paragraphStyle",{NAME:"magic",SVG_KEY:"paragraphStyle"}),Object.assign(r.DEFAULTS,{html2pdf:window.html2pdf}),r.PLUGINS.print=function(e){return{run:function(){!function(t){var n=e.html.get(),r=null;e.shared.print_iframe?r=e.shared.print_iframe:((r=document.createElement("iframe")).name="fr-print",r.style.position="fixed",r.style.top="0",r.style.left="-9999px",r.style.height="100%",r.style.width="0",r.style.overflow="hidden",r.style["z-index"]="2147483647",r.style.tabIndex="-1",e.events.on("shared.destroy",(function(){r.remove()})),e.shared.print_iframe=r);try{document.body.removeChild(r)}catch(e){}document.body.appendChild(r);var o=function e(){t(),r.removeEventListener("load",e)};r.addEventListener("load",o);var a=r.contentWindow;a.document.open(),a.document.write("<!DOCTYPE html><html "+(e.opts.documentReady?'style="margin: 0; padding: 0;"':"")+"><head><title>"+document.title+"</title>"),Array.prototype.forEach.call(document.querySelectorAll("style"),(function(e){e=e.cloneNode(!0),a.document.write(e.outerHTML)}));var c=document.querySelectorAll("link[rel=stylesheet]");Array.prototype.forEach.call(c,(function(e){var t=document.createElement("link");t.rel=e.rel,t.href=e.href,t.media="print",t.type="text/css",t.media="all",a.document.write(t.outerHTML)})),a.document.write('</head><body style="height:auto;text-align: '+("rtl"==e.opts.direction?"right":"left")+"; direction: "+e.opts.direction+"; "+(e.opts.documentReady?" padding: 2cm; width: 17cm; margin: 0;":"")+'"><div class="fr-view">'),a.document.write(n),a.document.write("</div></body></html>"),a.document.close()}((function(){setTimeout((function(){e.events.disableBlur(),window.frames["fr-print"].focus(),window.frames["fr-print"].print(),e.$win.get(0).focus(),e.events.disableBlur(),e.events.focus()}),0)}))},toPDF:function(){e.opts.html2pdf&&(e.$el.css("text-align","left"),e.opts.html2pdf().set({margin:[10,20],html2canvas:{useCORS:!0}}).from(e.el).save(),setTimeout((function(){e.$el.css("text-align","")}),100))}}},r.DefineIcon("print",{NAME:"print",SVG_KEY:"print"}),r.RegisterCommand("print",{title:"Print",undo:!1,focus:!1,plugin:"print",callback:function(){this.print.run()}}),r.DefineIcon("getPDF",{NAME:"file-pdf-o",FA5NAME:"file-pdf",SVG_KEY:"pdfExport"}),r.RegisterCommand("getPDF",{title:"Download PDF",type:"button",focus:!1,undo:!1,callback:function(){this.print.toPDF()}}),Object.assign(r.DEFAULTS,{quickInsertButtons:["image","video","embedly","table","ul","ol","hr"],quickInsertTags:["p","div","h1","h2","h3","h4","h5","h6","pre","blockquote"],quickInsertEnabled:!0}),r.QUICK_INSERT_BUTTONS={},r.DefineIcon("quickInsert",{SVG_KEY:"add",template:"svg"}),r.RegisterQuickInsertButton=function(e,t){r.QUICK_INSERT_BUTTONS[e]=Object.assign({undo:!0},t)},r.RegisterQuickInsertButton("image",{icon:"insertImage",requiredPlugin:"image",title:"Insert Image",undo:!1,callback:function(){var e=this,t=e.$;e.shared.$qi_image_input||(e.shared.$qi_image_input=t(document.createElement("input")).attr("accept","image/"+e.opts.imageAllowedTypes.join(", image/").toLowerCase()).attr("name","quickInsertImage".concat(this.id)).attr("style","display: none;").attr("type","file"),t("body").first().append(e.shared.$qi_image_input),e.events.$on(e.shared.$qi_image_input,"change",(function(){var e=t(this).data("inst");this.files&&(e.quickInsert.hide(),e.image.upload(this.files)),t(this).val("")}),!0)),e.$qi_image_input=e.shared.$qi_image_input,e.helpers.isMobile()&&e.selection.save(),e.events.disableBlur(),e.$qi_image_input.data("inst",e)[0].click()}}),r.RegisterQuickInsertButton("video",{icon:"insertVideo",requiredPlugin:"video",title:"Insert Video",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of the video you want to insert."));e&&this.video.insertByURL(e)}}),r.RegisterQuickInsertButton("embedly",{icon:"embedly",requiredPlugin:"embedly",title:"Embed URL",undo:!1,callback:function(){var e=prompt(this.language.translate("Paste the URL of any web content you want to insert."));e&&this.embedly.add(e)}}),r.RegisterQuickInsertButton("table",{icon:"insertTable",requiredPlugin:"table",title:"Insert Table",callback:function(){this.table.insert(2,2)}}),r.RegisterQuickInsertButton("ol",{icon:"formatOL",requiredPlugin:"lists",title:"Ordered List",callback:function(){this.lists.format("OL")}}),r.RegisterQuickInsertButton("ul",{icon:"formatUL",requiredPlugin:"lists",title:"Unordered List",callback:function(){this.lists.format("UL")}}),r.RegisterQuickInsertButton("hr",{icon:"insertHR",title:"Insert Horizontal Line",callback:function(){this.commands.insertHR()}}),r.PLUGINS.quickInsert=function(i){var s,e,t=i.$,n=!1;function o(n){var o,c,l;if(o=n.offset().top-i.$box.offset().top,c=(i.$iframe&&i.$iframe.offset().left||0)+n.offset().left-n.position().left-4<s.outerWidth()?n.offset().left+s.outerWidth():0-s.outerWidth(),i.opts.enter!=r.ENTER_BR?l=(s.outerHeight()-n.outerHeight())/2:(t(document.createElement("span")).html(r.INVISIBLE_SPACE).insertAfter(n),l=(s.outerHeight()-n.next().outerHeight())/2,n.next().remove()),i.opts.iframe){var a=i.helpers.getPX(i.$wp.find(".fr-iframe").css("padding-top"));o+=i.$iframe.offset().top+a}s.hasClass("fr-on")&&0<=o&&e.css("top",o-l),0<=o&&o-Math.abs(l)<=i.$box.outerHeight()-n.outerHeight()?(s.hasClass("fr-hidden")&&(s.hasClass("fr-on")&&d(),s.removeClass("fr-hidden")),s.css("top",o-l)):s.hasClass("fr-visible")&&!i.opts.toolbarInline&&(s.addClass("fr-hidden"),p()),s.css("left",c)}function a(n){i.markdown&&i.markdown.isEnabled()||(s||(i.shared.$quick_insert||(i.shared.$quick_insert=t(document.createElement("div")).attr("class","fr-quick-insert").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(i.language.translate("Quick Insert"),'">').concat(i.icon.create("quickInsert"),"</a>"))),s=i.shared.$quick_insert,i.tooltip.bind(i.$box,".fr-quick-insert > a.fr-floating-btn"),i.events.on("destroy",(function(){t("body").first().append(s.removeClass("fr-on")),e&&(p(),t("body").first().append(e.css("left",-9999).css("top",-9999)))}),!0),i.events.on("shared.destroy",(function(){s.html("").removeData().remove(),s=null,e&&(e.html("").removeData().remove(),e=null)}),!0),i.events.on("commands.before",l),i.events.on("commands.after",(function(){i.popups.areVisible()||c()})),i.events.bindClick(i.$box,".fr-quick-insert > a",d),i.events.bindClick(i.$box,".fr-qi-helper > a.fr-btn",(function(e){var n=t(e.currentTarget).data("cmd");if(!1===i.events.trigger("quickInsert.commands.before",[n]))return!1;r.QUICK_INSERT_BUTTONS[n].callback.apply(i,[e.currentTarget]),r.QUICK_INSERT_BUTTONS[n].undo&&i.undo.saveStep(),i.events.trigger("quickInsert.commands.after",[n]),i.quickInsert.hide()})),i.events.$on(i.$wp,"scroll",u),i.events.$on(i.$tb,"transitionend",".fr-more-toolbar",u)),s.hasClass("fr-on")&&p(),i.$box.append(s),o(n),s.data("tag",n),s.addClass("fr-visible"))}function c(){if(i.core.hasFocus()){var e=i.selection.element();if(i.opts.enter==r.ENTER_BR||i.node.isBlock(e)||(e=i.node.blockParent(e)),i.opts.enter==r.ENTER_BR&&!i.node.isBlock(e)){var n=i.node.deepestParent(e);n&&(e=n)}var o=function(){return i.opts.enter!=r.ENTER_BR&&i.node.isEmpty(e)&&0<=i.opts.quickInsertTags.indexOf(e.tagName.toLowerCase())},c=function(){return i.opts.enter==r.ENTER_BR&&("BR"==e.tagName&&(!e.previousSibling||"BR"==e.previousSibling.tagName||i.node.isBlock(e.previousSibling))||i.node.isEmpty(e)&&(!e.previousSibling||"BR"==e.previousSibling.tagName||i.node.isBlock(e.previousSibling))&&(!e.nextSibling||"BR"==e.nextSibling.tagName||i.node.isBlock(e.nextSibling)))};e&&(o()||c())?s&&s.data("tag").is(t(e))&&s.hasClass("fr-on")?p():i.selection.isCollapsed()&&a(t(e)):l()}}function l(){s&&!n&&(s.hasClass("fr-on")&&p(),s.removeClass("fr-visible fr-on"),s.css("left",-9999).css("top",-9999))}function d(o){if(o&&o.preventDefault(),s.hasClass("fr-on")&&!s.hasClass("fr-hidden"))p();else{if(!i.shared.$qi_helper){for(var c=i.opts.quickInsertButtons,l='<div class="fr-qi-helper">',d=0,a=0;a<c.length;a++){var h=r.QUICK_INSERT_BUTTONS[c[a]];h&&(!h.requiredPlugin||r.PLUGINS[h.requiredPlugin]&&0<=i.opts.pluginsEnabled.indexOf(h.requiredPlugin))&&(l+='<a class="fr-btn fr-floating-btn" role="button" title="'.concat(i.language.translate(h.title),'" tabIndex="-1" data-cmd="').concat(c[a],'" style="transition-delay: ').concat(.025*d++,'s;">').concat(i.icon.create(h.icon),"</a>"))}l+="</div>",i.shared.$qi_helper=t(l),i.tooltip.bind(i.shared.$qi_helper,"a.fr-btn"),i.events.$on(i.shared.$qi_helper,"mousedown",(function(e){e.preventDefault()}),!0)}e=i.shared.$qi_helper,i.$box.append(e),n=!0,setTimeout((function(){n=!1,e.css("top",parseFloat(s.css("top"))),e.css("left",parseFloat(s.css("left"))+s.outerWidth()),e.find("a").addClass("fr-size-1"),s.addClass("fr-on")}),10)}}function p(){var e=i.$box.find(".fr-qi-helper");e.length&&function(){for(var t=e.find("a"),n=0;n<t.length;n++)!function(n){setTimeout((function(){e.children().eq(t.length-1-n).removeClass("fr-size-1")}),25*n)}(n);setTimeout((function(){e.css("left",-9999),s&&!s.hasClass("fr-hidden")&&s.removeClass("fr-on")}),25*n)}()}function u(){s.hasClass("fr-visible")&&o(s.data("tag"))}return{_init:function(){if(!i.$wp||!i.opts.quickInsertEnabled)return!1;i.popups.onShow("image.edit",l),i.events.on("mouseup",c),i.helpers.isMobile()&&i.events.$on(t(i.o_doc),"selectionchange",c),i.events.on("blur",l),i.events.on("keyup",c),i.events.on("keydown",(function(){setTimeout((function(){c()}),0)}))},hide:l}},r.PLUGINS.quote=function(e){var i=e.$;function s(t){for(;t.parentNode&&t.parentNode!=e.el;)t=t.parentNode;return t}return{apply:function(t){e.selection.save(),e.html.wrap(!0,!0,!0,!0),e.selection.restore(),"increase"==t?function(){var t,n=e.selection.blocks();for(t=0;t<n.length;t++)n[t]=s(n[t]);e.selection.save();var r=i(document.createElement("blockquote"));for(r.insertBefore(n[0]),t=0;t<n.length;t++)r.append(n[t]);e.opts.trackChangesEnabled&&e.track_changes.addQuote(r),e.html.unwrap(),e.selection.restore()}():"decrease"==t&&function(){var t,n=e.opts.trackChangesEnabled,r=e.selection.blocks();for(t=0;t<r.length;t++)"BLOCKQUOTE"!=r[t].tagName&&(r[t]=n&&i(r[t]).parentsUntil(e.$el,"[data-track-id^=pending]").get(0)||i(r[t]).parentsUntil(e.$el,"BLOCKQUOTE").get(0));for(e.selection.save(),t=0;t<r.length;t++)r[t]&&(n?e.track_changes.removeQuote(i(r[t]),t):i(r[t]).replaceWith(r[t].innerHTML));e.html.unwrap(),e.selection.restore()}()}}},r.RegisterShortcut(r.KEYCODE.SINGLE_QUOTE,"quote","increase","'"),r.RegisterShortcut(r.KEYCODE.SINGLE_QUOTE,"quote","decrease","'",!0),r.RegisterCommand("quote",{title:"Quote",type:"dropdown",html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t={increase:"Increase",decrease:"Decrease"};for(var n in t)if(t.hasOwnProperty(n)){var r=this.shortcuts.get("quote.".concat(n));e+='<li role="presentation"><a class="fr-command fr-active '.concat(n,'" tabIndex="-1" role="option" data-cmd="quote" data-param1="').concat(n,'" title="').concat(t[n],'">').concat(this.language.translate(t[n])).concat(r?'<span class="fr-shortcut">'.concat(r,"</span>"):"","</a></li>")}return e+"</ul>"},callback:function(e,t){this.quote.apply(t)},plugin:"quote"}),r.DefineIcon("quote",{NAME:"quote-left",SVG_KEY:"blockquote"}),Object.assign(r.DEFAULTS,{saveInterval:1e4,saveURL:null,saveParams:{},saveParam:"body",saveMethod:"POST"}),r.PLUGINS.save=function(s){var e=s.$,t=null,n=null,r=!1,o=1,c=2,l={};function p(e,t){s.events.trigger("save.error",[{code:e,message:l[e]},t])}function a(t){void 0===t&&(t=s.html.get());var r=t,l=s.events.trigger("save.before",[t]);if(!1===l)return!1;if("string"==typeof l&&(t=l),s.opts.saveURL){var d={};for(var a in s.opts.saveParams)if(s.opts.saveParams.hasOwnProperty(a)){var h=s.opts.saveParams[a];d[a]="function"==typeof h?h.call(this):h}var i={};i[s.opts.saveParam]=t,e(this).ajax({method:s.opts.saveMethod,url:s.opts.saveURL,data:Object.assign(i,d),crossDomain:s.opts.requestWithCORS,withCredentials:s.opts.requestWithCredentials,headers:s.opts.requestHeaders,done:function(e,t,o){n=r,s.events.trigger("save.after",[e])},fail:function(e){p(c,e.response||e.responseText)}})}else p(o)}function d(){clearTimeout(t),t=setTimeout((function(){var e=s.html.get();(n!=e||r)&&(r=!1,a(n=e))}),0)}return l[o]="Missing saveURL option.",l[c]="Something went wrong during save.",{_init:function(){if(s.opts.letteringClass)for(var e=s.opts.letteringClass,r=s.$el.find(".".concat(e)).length,o=0;o<r;o++)s.$el.find(".".concat(e))[o].innerHTML=s.$el.find(".".concat(e))[o].innerText.replace(/([\w'-]+|[?.",])/g,"<span class = 'fr-word-select'>$1</span>");s.opts.saveInterval&&(n=s.html.get(),s.events.on("contentChanged",(function(){setTimeout(d,s.opts.saveInterval)})),s.events.on("keydown destroy",(function(){clearTimeout(t)})))},save:a,reset:function(){d(),r=!1},force:function(){r=!0}}},r.DefineIcon("save",{NAME:"floppy-o",FA5NAME:"save"}),r.RegisterCommand("save",{title:"Save",undo:!1,focus:!1,refreshAfterCallback:!1,callback:function(){this.save.save()},plugin:"save"}),Object.assign(r.DEFAULTS,{specialCharactersSets:[{title:"Latin",char:"&iexcl;",list:[{char:"&iexcl;",desc:"INVERTED EXCLAMATION MARK"},{char:"&cent;",desc:"CENT SIGN"},{char:"&pound;",desc:"POUND SIGN"},{char:"&curren;",desc:"CURRENCY SIGN"},{char:"&yen;",desc:"YEN SIGN"},{char:"&brvbar;",desc:"BROKEN BAR"},{char:"&sect;",desc:"SECTION SIGN"},{char:"&uml;",desc:"DIAERESIS"},{char:"&copy;",desc:"COPYRIGHT SIGN"},{char:"&trade;",desc:"TRADEMARK SIGN"},{char:"&ordf;",desc:"FEMININE ORDINAL INDICATOR"},{char:"&laquo;",desc:"LEFT-POINTING DOUBLE ANGLE QUOTATION MARK"},{char:"&not;",desc:"NOT SIGN"},{char:"&reg;",desc:"REGISTERED SIGN"},{char:"&macr;",desc:"MACRON"},{char:"&deg;",desc:"DEGREE SIGN"},{char:"&plusmn;",desc:"PLUS-MINUS SIGN"},{char:"&sup2;",desc:"SUPERSCRIPT TWO"},{char:"&sup3;",desc:"SUPERSCRIPT THREE"},{char:"&acute;",desc:"ACUTE ACCENT"},{char:"&micro;",desc:"MICRO SIGN"},{char:"&para;",desc:"PILCROW SIGN"},{char:"&middot;",desc:"MIDDLE DOT"},{char:"&cedil;",desc:"CEDILLA"},{char:"&sup1;",desc:"SUPERSCRIPT ONE"},{char:"&ordm;",desc:"MASCULINE ORDINAL INDICATOR"},{char:"&raquo;",desc:"RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK"},{char:"&frac14;",desc:"VULGAR FRACTION ONE QUARTER"},{char:"&frac12;",desc:"VULGAR FRACTION ONE HALF"},{char:"&frac34;",desc:"VULGAR FRACTION THREE QUARTERS"},{char:"&iquest;",desc:"INVERTED QUESTION MARK"},{char:"&Agrave;",desc:"LATIN CAPITAL LETTER A WITH GRAVE"},{char:"&Aacute;",desc:"LATIN CAPITAL LETTER A WITH ACUTE"},{char:"&Acirc;",desc:"LATIN CAPITAL LETTER A WITH CIRCUMFLEX"},{char:"&Atilde;",desc:"LATIN CAPITAL LETTER A WITH TILDE"},{char:"&Auml;",desc:"LATIN CAPITAL LETTER A WITH DIAERESIS "},{char:"&Aring;",desc:"LATIN CAPITAL LETTER A WITH RING ABOVE"},{char:"&AElig;",desc:"LATIN CAPITAL LETTER AE"},{char:"&Ccedil;",desc:"LATIN CAPITAL LETTER C WITH CEDILLA"},{char:"&Egrave;",desc:"LATIN CAPITAL LETTER E WITH GRAVE"},{char:"&Eacute;",desc:"LATIN CAPITAL LETTER E WITH ACUTE"},{char:"&Ecirc;",desc:"LATIN CAPITAL LETTER E WITH CIRCUMFLEX"},{char:"&Euml;",desc:"LATIN CAPITAL LETTER E WITH DIAERESIS"},{char:"&Igrave;",desc:"LATIN CAPITAL LETTER I WITH GRAVE"},{char:"&Iacute;",desc:"LATIN CAPITAL LETTER I WITH ACUTE"},{char:"&Icirc;",desc:"LATIN CAPITAL LETTER I WITH CIRCUMFLEX"},{char:"&Iuml;",desc:"LATIN CAPITAL LETTER I WITH DIAERESIS"},{char:"&ETH;",desc:"LATIN CAPITAL LETTER ETH"},{char:"&Ntilde;",desc:"LATIN CAPITAL LETTER N WITH TILDE"},{char:"&Ograve;",desc:"LATIN CAPITAL LETTER O WITH GRAVE"},{char:"&Oacute;",desc:"LATIN CAPITAL LETTER O WITH ACUTE"},{char:"&Ocirc;",desc:"LATIN CAPITAL LETTER O WITH CIRCUMFLEX"},{char:"&Otilde;",desc:"LATIN CAPITAL LETTER O WITH TILDE"},{char:"&Ouml;",desc:"LATIN CAPITAL LETTER O WITH DIAERESIS"},{char:"&times;",desc:"MULTIPLICATION SIGN"},{char:"&Oslash;",desc:"LATIN CAPITAL LETTER O WITH STROKE"},{char:"&Ugrave;",desc:"LATIN CAPITAL LETTER U WITH GRAVE"},{char:"&Uacute;",desc:"LATIN CAPITAL LETTER U WITH ACUTE"},{char:"&Ucirc;",desc:"LATIN CAPITAL LETTER U WITH CIRCUMFLEX"},{char:"&Uuml;",desc:"LATIN CAPITAL LETTER U WITH DIAERESIS"},{char:"&Yacute;",desc:"LATIN CAPITAL LETTER Y WITH ACUTE"},{char:"&THORN;",desc:"LATIN CAPITAL LETTER THORN"},{char:"&szlig;",desc:"LATIN SMALL LETTER SHARP S"},{char:"&agrave;",desc:"LATIN SMALL LETTER A WITH GRAVE"},{char:"&aacute;",desc:"LATIN SMALL LETTER A WITH ACUTE "},{char:"&acirc;",desc:"LATIN SMALL LETTER A WITH CIRCUMFLEX"},{char:"&atilde;",desc:"LATIN SMALL LETTER A WITH TILDE"},{char:"&auml;",desc:"LATIN SMALL LETTER A WITH DIAERESIS"},{char:"&aring;",desc:"LATIN SMALL LETTER A WITH RING ABOVE"},{char:"&aelig;",desc:"LATIN SMALL LETTER AE"},{char:"&ccedil;",desc:"LATIN SMALL LETTER C WITH CEDILLA"},{char:"&egrave;",desc:"LATIN SMALL LETTER E WITH GRAVE"},{char:"&eacute;",desc:"LATIN SMALL LETTER E WITH ACUTE"},{char:"&ecirc;",desc:"LATIN SMALL LETTER E WITH CIRCUMFLEX"},{char:"&euml;",desc:"LATIN SMALL LETTER E WITH DIAERESIS"},{char:"&igrave;",desc:"LATIN SMALL LETTER I WITH GRAVE"},{char:"&iacute;",desc:"LATIN SMALL LETTER I WITH ACUTE"},{char:"&icirc;",desc:"LATIN SMALL LETTER I WITH CIRCUMFLEX"},{char:"&iuml;",desc:"LATIN SMALL LETTER I WITH DIAERESIS"},{char:"&eth;",desc:"LATIN SMALL LETTER ETH"},{char:"&ntilde;",desc:"LATIN SMALL LETTER N WITH TILDE"},{char:"&ograve;",desc:"LATIN SMALL LETTER O WITH GRAVE"},{char:"&oacute;",desc:"LATIN SMALL LETTER O WITH ACUTE"},{char:"&ocirc;",desc:"LATIN SMALL LETTER O WITH CIRCUMFLEX"},{char:"&otilde;",desc:"LATIN SMALL LETTER O WITH TILDE"},{char:"&ouml;",desc:"LATIN SMALL LETTER O WITH DIAERESIS"},{char:"&divide;",desc:"DIVISION SIGN"},{char:"&oslash;",desc:"LATIN SMALL LETTER O WITH STROKE"},{char:"&ugrave;",desc:"LATIN SMALL LETTER U WITH GRAVE"},{char:"&uacute;",desc:"LATIN SMALL LETTER U WITH ACUTE"},{char:"&ucirc;",desc:"LATIN SMALL LETTER U WITH CIRCUMFLEX"},{char:"&uuml;",desc:"LATIN SMALL LETTER U WITH DIAERESIS"},{char:"&yacute;",desc:"LATIN SMALL LETTER Y WITH ACUTE"},{char:"&thorn;",desc:"LATIN SMALL LETTER THORN"},{char:"&yuml;",desc:"LATIN SMALL LETTER Y WITH DIAERESIS"}]},{title:"Greek",char:"&Alpha;",list:[{char:"&Alpha;",desc:"GREEK CAPITAL LETTER ALPHA"},{char:"&Beta;",desc:"GREEK CAPITAL LETTER BETA"},{char:"&Gamma;",desc:"GREEK CAPITAL LETTER GAMMA"},{char:"&Delta;",desc:"GREEK CAPITAL LETTER DELTA"},{char:"&Epsilon;",desc:"GREEK CAPITAL LETTER EPSILON"},{char:"&Zeta;",desc:"GREEK CAPITAL LETTER ZETA"},{char:"&Eta;",desc:"GREEK CAPITAL LETTER ETA"},{char:"&Theta;",desc:"GREEK CAPITAL LETTER THETA"},{char:"&Iota;",desc:"GREEK CAPITAL LETTER IOTA"},{char:"&Kappa;",desc:"GREEK CAPITAL LETTER KAPPA"},{char:"&Lambda;",desc:"GREEK CAPITAL LETTER LAMBDA"},{char:"&Mu;",desc:"GREEK CAPITAL LETTER MU"},{char:"&Nu;",desc:"GREEK CAPITAL LETTER NU"},{char:"&Xi;",desc:"GREEK CAPITAL LETTER XI"},{char:"&Omicron;",desc:"GREEK CAPITAL LETTER OMICRON"},{char:"&Pi;",desc:"GREEK CAPITAL LETTER PI"},{char:"&Rho;",desc:"GREEK CAPITAL LETTER RHO"},{char:"&Sigma;",desc:"GREEK CAPITAL LETTER SIGMA"},{char:"&Tau;",desc:"GREEK CAPITAL LETTER TAU"},{char:"&Upsilon;",desc:"GREEK CAPITAL LETTER UPSILON"},{char:"&Phi;",desc:"GREEK CAPITAL LETTER PHI"},{char:"&Chi;",desc:"GREEK CAPITAL LETTER CHI"},{char:"&Psi;",desc:"GREEK CAPITAL LETTER PSI"},{char:"&Omega;",desc:"GREEK CAPITAL LETTER OMEGA"},{char:"&alpha;",desc:"GREEK SMALL LETTER ALPHA"},{char:"&beta;",desc:"GREEK SMALL LETTER BETA"},{char:"&gamma;",desc:"GREEK SMALL LETTER GAMMA"},{char:"&delta;",desc:"GREEK SMALL LETTER DELTA"},{char:"&epsilon;",desc:"GREEK SMALL LETTER EPSILON"},{char:"&zeta;",desc:"GREEK SMALL LETTER ZETA"},{char:"&eta;",desc:"GREEK SMALL LETTER ETA"},{char:"&theta;",desc:"GREEK SMALL LETTER THETA"},{char:"&iota;",desc:"GREEK SMALL LETTER IOTA"},{char:"&kappa;",desc:"GREEK SMALL LETTER KAPPA"},{char:"&lambda;",desc:"GREEK SMALL LETTER LAMBDA"},{char:"&mu;",desc:"GREEK SMALL LETTER MU"},{char:"&nu;",desc:"GREEK SMALL LETTER NU"},{char:"&xi;",desc:"GREEK SMALL LETTER XI"},{char:"&omicron;",desc:"GREEK SMALL LETTER OMICRON"},{char:"&pi;",desc:"GREEK SMALL LETTER PI"},{char:"&rho;",desc:"GREEK SMALL LETTER RHO"},{char:"&sigmaf;",desc:"GREEK SMALL LETTER FINAL SIGMA"},{char:"&sigma;",desc:"GREEK SMALL LETTER SIGMA"},{char:"&tau;",desc:"GREEK SMALL LETTER TAU"},{char:"&upsilon;",desc:"GREEK SMALL LETTER UPSILON"},{char:"&phi;",desc:"GREEK SMALL LETTER PHI"},{char:"&chi;",desc:"GREEK SMALL LETTER CHI"},{char:"&psi;",desc:"GREEK SMALL LETTER PSI"},{char:"&omega;",desc:"GREEK SMALL LETTER OMEGA"},{char:"&thetasym;",desc:"GREEK THETA SYMBOL"},{char:"&upsih;",desc:"GREEK UPSILON WITH HOOK SYMBOL"},{char:"&straightphi;",desc:"GREEK PHI SYMBOL"},{char:"&piv;",desc:"GREEK PI SYMBOL"},{char:"&Gammad;",desc:"GREEK LETTER DIGAMMA"},{char:"&gammad;",desc:"GREEK SMALL LETTER DIGAMMA"},{char:"&varkappa;",desc:"GREEK KAPPA SYMBOL"},{char:"&varrho;",desc:"GREEK RHO SYMBOL"},{char:"&straightepsilon;",desc:"GREEK LUNATE EPSILON SYMBOL"},{char:"&backepsilon;",desc:"GREEK REVERSED LUNATE EPSILON SYMBOL"}]},{title:"Cyrillic",char:"&#x400",list:[{char:"&#x400",desc:"CYRILLIC CAPITAL LETTER IE WITH GRAVE"},{char:"&#x401",desc:"CYRILLIC CAPITAL LETTER IO"},{char:"&#x402",desc:"CYRILLIC CAPITAL LETTER DJE"},{char:"&#x403",desc:"CYRILLIC CAPITAL LETTER GJE"},{char:"&#x404",desc:"CYRILLIC CAPITAL LETTER UKRAINIAN IE"},{char:"&#x405",desc:"CYRILLIC CAPITAL LETTER DZE"},{char:"&#x406",desc:"CYRILLIC CAPITAL LETTER BYELORUSSIAN-UKRAINIAN I"},{char:"&#x407",desc:"CYRILLIC CAPITAL LETTER YI"},{char:"&#x408",desc:"CYRILLIC CAPITAL LETTER JE"},{char:"&#x409",desc:"CYRILLIC CAPITAL LETTER LJE"},{char:"&#x40A",desc:"CYRILLIC CAPITAL LETTER NJE"},{char:"&#x40B",desc:"CYRILLIC CAPITAL LETTER TSHE"},{char:"&#x40C",desc:"CYRILLIC CAPITAL LETTER KJE"},{char:"&#x40D",desc:"CYRILLIC CAPITAL LETTER I WITH GRAVE"},{char:"&#x40E",desc:"CYRILLIC CAPITAL LETTER SHORT U"},{char:"&#x40F",desc:"CYRILLIC CAPITAL LETTER DZHE"},{char:"&#x410",desc:"CYRILLIC CAPITAL LETTER A"},{char:"&#x411",desc:"CYRILLIC CAPITAL LETTER BE"},{char:"&#x412",desc:"CYRILLIC CAPITAL LETTER VE"},{char:"&#x413",desc:"CYRILLIC CAPITAL LETTER GHE"},{char:"&#x414",desc:"CYRILLIC CAPITAL LETTER DE"},{char:"&#x415",desc:"CYRILLIC CAPITAL LETTER IE"},{char:"&#x416",desc:"CYRILLIC CAPITAL LETTER ZHE"},{char:"&#x417",desc:"CYRILLIC CAPITAL LETTER ZE"},{char:"&#x418",desc:"CYRILLIC CAPITAL LETTER I"},{char:"&#x419",desc:"CYRILLIC CAPITAL LETTER SHORT I"},{char:"&#x41A",desc:"CYRILLIC CAPITAL LETTER KA"},{char:"&#x41B",desc:"CYRILLIC CAPITAL LETTER EL"},{char:"&#x41C",desc:"CYRILLIC CAPITAL LETTER EM"},{char:"&#x41D",desc:"CYRILLIC CAPITAL LETTER EN"},{char:"&#x41E",desc:"CYRILLIC CAPITAL LETTER O"},{char:"&#x41F",desc:"CYRILLIC CAPITAL LETTER PE"},{char:"&#x420",desc:"CYRILLIC CAPITAL LETTER ER"},{char:"&#x421",desc:"CYRILLIC CAPITAL LETTER ES"},{char:"&#x422",desc:"CYRILLIC CAPITAL LETTER TE"},{char:"&#x423",desc:"CYRILLIC CAPITAL LETTER U"},{char:"&#x424",desc:"CYRILLIC CAPITAL LETTER EF"},{char:"&#x425",desc:"CYRILLIC CAPITAL LETTER HA"},{char:"&#x426",desc:"CYRILLIC CAPITAL LETTER TSE"},{char:"&#x427",desc:"CYRILLIC CAPITAL LETTER CHE"},{char:"&#x428",desc:"CYRILLIC CAPITAL LETTER SHA"},{char:"&#x429",desc:"CYRILLIC CAPITAL LETTER SHCHA"},{char:"&#x42A",desc:"CYRILLIC CAPITAL LETTER HARD SIGN"},{char:"&#x42B",desc:"CYRILLIC CAPITAL LETTER YERU"},{char:"&#x42C",desc:"CYRILLIC CAPITAL LETTER SOFT SIGN"},{char:"&#x42D",desc:"CYRILLIC CAPITAL LETTER E"},{char:"&#x42E",desc:"CYRILLIC CAPITAL LETTER YU"},{char:"&#x42F",desc:"CYRILLIC CAPITAL LETTER YA"},{char:"&#x430",desc:"CYRILLIC SMALL LETTER A"},{char:"&#x431",desc:"CYRILLIC SMALL LETTER BE"},{char:"&#x432",desc:"CYRILLIC SMALL LETTER VE"},{char:"&#x433",desc:"CYRILLIC SMALL LETTER GHE"},{char:"&#x434",desc:"CYRILLIC SMALL LETTER DE"},{char:"&#x435",desc:"CYRILLIC SMALL LETTER IE"},{char:"&#x436",desc:"CYRILLIC SMALL LETTER ZHE"},{char:"&#x437",desc:"CYRILLIC SMALL LETTER ZE"},{char:"&#x438",desc:"CYRILLIC SMALL LETTER I"},{char:"&#x439",desc:"CYRILLIC SMALL LETTER SHORT I"},{char:"&#x43A",desc:"CYRILLIC SMALL LETTER KA"},{char:"&#x43B",desc:"CYRILLIC SMALL LETTER EL"},{char:"&#x43C",desc:"CYRILLIC SMALL LETTER EM"},{char:"&#x43D",desc:"CYRILLIC SMALL LETTER EN"},{char:"&#x43E",desc:"CYRILLIC SMALL LETTER O"},{char:"&#x43F",desc:"CYRILLIC SMALL LETTER PE"},{char:"&#x440",desc:"CYRILLIC SMALL LETTER ER"},{char:"&#x441",desc:"CYRILLIC SMALL LETTER ES"},{char:"&#x442",desc:"CYRILLIC SMALL LETTER TE"},{char:"&#x443",desc:"CYRILLIC SMALL LETTER U"},{char:"&#x444",desc:"CYRILLIC SMALL LETTER EF"},{char:"&#x445",desc:"CYRILLIC SMALL LETTER HA"},{char:"&#x446",desc:"CYRILLIC SMALL LETTER TSE"},{char:"&#x447",desc:"CYRILLIC SMALL LETTER CHE"},{char:"&#x448",desc:"CYRILLIC SMALL LETTER SHA"},{char:"&#x449",desc:"CYRILLIC SMALL LETTER SHCHA"},{char:"&#x44A",desc:"CYRILLIC SMALL LETTER HARD SIGN"},{char:"&#x44B",desc:"CYRILLIC SMALL LETTER YERU"},{char:"&#x44C",desc:"CYRILLIC SMALL LETTER SOFT SIGN"},{char:"&#x44D",desc:"CYRILLIC SMALL LETTER E"},{char:"&#x44E",desc:"CYRILLIC SMALL LETTER YU"},{char:"&#x44F",desc:"CYRILLIC SMALL LETTER YA"},{char:"&#x450",desc:"CYRILLIC SMALL LETTER IE WITH GRAVE"},{char:"&#x451",desc:"CYRILLIC SMALL LETTER IO"},{char:"&#x452",desc:"CYRILLIC SMALL LETTER DJE"},{char:"&#x453",desc:"CYRILLIC SMALL LETTER GJE"},{char:"&#x454",desc:"CYRILLIC SMALL LETTER UKRAINIAN IE"},{char:"&#x455",desc:"CYRILLIC SMALL LETTER DZE"},{char:"&#x456",desc:"CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I"},{char:"&#x457",desc:"CYRILLIC SMALL LETTER YI"},{char:"&#x458",desc:"CYRILLIC SMALL LETTER JE"},{char:"&#x459",desc:"CYRILLIC SMALL LETTER LJE"},{char:"&#x45A",desc:"CYRILLIC SMALL LETTER NJE"},{char:"&#x45B",desc:"CYRILLIC SMALL LETTER TSHE"},{char:"&#x45C",desc:"CYRILLIC SMALL LETTER KJE"},{char:"&#x45D",desc:"CYRILLIC SMALL LETTER I WITH GRAVE"},{char:"&#x45E",desc:"CYRILLIC SMALL LETTER SHORT U"},{char:"&#x45F",desc:"CYRILLIC SMALL LETTER DZHE"}]},{title:"Punctuation",char:"&ndash;",list:[{char:"&ndash;",desc:"EN DASH"},{char:"&mdash;",desc:"EM DASH"},{char:"&lsquo;",desc:"LEFT SINGLE QUOTATION MARK"},{char:"&rsquo;",desc:"RIGHT SINGLE QUOTATION MARK"},{char:"&sbquo;",desc:"SINGLE LOW-9 QUOTATION MARK"},{char:"&ldquo;",desc:"LEFT DOUBLE QUOTATION MARK"},{char:"&rdquo;",desc:"RIGHT DOUBLE QUOTATION MARK"},{char:"&bdquo;",desc:"DOUBLE LOW-9 QUOTATION MARK"},{char:"&dagger;",desc:"DAGGER"},{char:"&Dagger;",desc:"DOUBLE DAGGER"},{char:"&bull;",desc:"BULLET"},{char:"&hellip;",desc:"HORIZONTAL ELLIPSIS"},{char:"&permil;",desc:"PER MILLE SIGN"},{char:"&prime;",desc:"PRIME"},{char:"&Prime;",desc:"DOUBLE PRIME"},{char:"&lsaquo;",desc:"SINGLE LEFT-POINTING ANGLE QUOTATION MARK"},{char:"&rsaquo;",desc:"SINGLE RIGHT-POINTING ANGLE QUOTATION MARK"},{char:"&oline;",desc:"OVERLINE"},{char:"&frasl;",desc:"FRACTION SLASH"}]},{title:"Currency",char:"&#x20A0",list:[{char:"&#x20A0",desc:"EURO-CURRENCY SIGN"},{char:"&#x20A1",desc:"COLON SIGN"},{char:"&#x20A2",desc:"CRUZEIRO SIGN"},{char:"&#x20A3",desc:"FRENCH FRANC SIGN"},{char:"&#x20A4",desc:"LIRA SIGN"},{char:"&#x20A5",desc:"MILL SIGN"},{char:"&#x20A6",desc:"NAIRA SIGN"},{char:"&#x20A7",desc:"PESETA SIGN"},{char:"&#x20A8",desc:"RUPEE SIGN"},{char:"&#x20A9",desc:"WON SIGN"},{char:"&#x20AA",desc:"NEW SHEQEL SIGN"},{char:"&#x20AB",desc:"DONG SIGN"},{char:"&#x20AC",desc:"EURO SIGN"},{char:"&#x20AD",desc:"KIP SIGN"},{char:"&#x20AE",desc:"TUGRIK SIGN"},{char:"&#x20AF",desc:"DRACHMA SIGN"},{char:"&#x20B0",desc:"GERMAN PENNY SYMBOL"},{char:"&#x20B1",desc:"PESO SIGN"},{char:"&#x20B2",desc:"GUARANI SIGN"},{char:"&#x20B3",desc:"AUSTRAL SIGN"},{char:"&#x20B4",desc:"HRYVNIA SIGN"},{char:"&#x20B5",desc:"CEDI SIGN"},{char:"&#x20B6",desc:"LIVRE TOURNOIS SIGN"},{char:"&#x20B7",desc:"SPESMILO SIGN"},{char:"&#x20B8",desc:"TENGE SIGN"},{char:"&#x20B9",desc:"INDIAN RUPEE SIGN"}]},{title:"Arrows",char:"&#x2190",list:[{char:"&#x2190",desc:"LEFTWARDS ARROW"},{char:"&#x2191",desc:"UPWARDS ARROW"},{char:"&#x2192",desc:"RIGHTWARDS ARROW"},{char:"&#x2193",desc:"DOWNWARDS ARROW"},{char:"&#x2194",desc:"LEFT RIGHT ARROW"},{char:"&#x2195",desc:"UP DOWN ARROW"},{char:"&#x2196",desc:"NORTH WEST ARROW"},{char:"&#x2197",desc:"NORTH EAST ARROW"},{char:"&#x2198",desc:"SOUTH EAST ARROW"},{char:"&#x2199",desc:"SOUTH WEST ARROW"},{char:"&#x219A",desc:"LEFTWARDS ARROW WITH STROKE"},{char:"&#x219B",desc:"RIGHTWARDS ARROW WITH STROKE"},{char:"&#x219C",desc:"LEFTWARDS WAVE ARROW"},{char:"&#x219D",desc:"RIGHTWARDS WAVE ARROW"},{char:"&#x219E",desc:"LEFTWARDS TWO HEADED ARROW"},{char:"&#x219F",desc:"UPWARDS TWO HEADED ARROW"},{char:"&#x21A0",desc:"RIGHTWARDS TWO HEADED ARROW"},{char:"&#x21A1",desc:"DOWNWARDS TWO HEADED ARROW"},{char:"&#x21A2",desc:"LEFTWARDS ARROW WITH TAIL"},{char:"&#x21A3",desc:"RIGHTWARDS ARROW WITH TAIL"},{char:"&#x21A4",desc:"LEFTWARDS ARROW FROM BAR"},{char:"&#x21A5",desc:"UPWARDS ARROW FROM BAR"},{char:"&#x21A6",desc:"RIGHTWARDS ARROW FROM BAR"},{char:"&#x21A7",desc:"DOWNWARDS ARROW FROM BAR"},{char:"&#x21A8",desc:"UP DOWN ARROW WITH BASE"},{char:"&#x21A9",desc:"LEFTWARDS ARROW WITH HOOK"},{char:"&#x21AA",desc:"RIGHTWARDS ARROW WITH HOOK"},{char:"&#x21AB",desc:"LEFTWARDS ARROW WITH LOOP"},{char:"&#x21AC",desc:"RIGHTWARDS ARROW WITH LOOP"},{char:"&#x21AD",desc:"LEFT RIGHT WAVE ARROW"},{char:"&#x21AE",desc:"LEFT RIGHT ARROW WITH STROKE"},{char:"&#x21AF",desc:"DOWNWARDS ZIGZAG ARROW"},{char:"&#x21B0",desc:"UPWARDS ARROW WITH TIP LEFTWARDS"},{char:"&#x21B1",desc:"UPWARDS ARROW WITH TIP RIGHTWARDS"},{char:"&#x21B2",desc:"DOWNWARDS ARROW WITH TIP LEFTWARDS"},{char:"&#x21B3",desc:"DOWNWARDS ARROW WITH TIP RIGHTWARDS"},{char:"&#x21B4",desc:"RIGHTWARDS ARROW WITH CORNER DOWNWARDS"},{char:"&#x21B5",desc:"DOWNWARDS ARROW WITH CORNER LEFTWARDS"},{char:"&#x21B6",desc:"ANTICLOCKWISE TOP SEMICIRCLE ARROW"},{char:"&#x21B7",desc:"CLOCKWISE TOP SEMICIRCLE ARROW"},{char:"&#x21B8",desc:"NORTH WEST ARROW TO LONG BAR"},{char:"&#x21B9",desc:"LEFTWARDS ARROW TO BAR OVER RIGHTWARDS ARROW TO BAR"},{char:"&#x21BA",desc:"ANTICLOCKWISE OPEN CIRCLE ARROW"},{char:"&#x21BB",desc:"CLOCKWISE OPEN CIRCLE ARROW"},{char:"&#x21BC",desc:"LEFTWARDS HARPOON WITH BARB UPWARDS"},{char:"&#x21BD",desc:"LEFTWARDS HARPOON WITH BARB DOWNWARDS"},{char:"&#x21BE",desc:"UPWARDS HARPOON WITH BARB RIGHTWARDS"},{char:"&#x21BF",desc:"UPWARDS HARPOON WITH BARB LEFTWARDS"},{char:"&#x21C0",desc:"RIGHTWARDS HARPOON WITH BARB UPWARDS"},{char:"&#x21C1",desc:"RIGHTWARDS HARPOON WITH BARB DOWNWARDS"},{char:"&#x21C2",desc:"DOWNWARDS HARPOON WITH BARB RIGHTWARDS"},{char:"&#x21C3",desc:"DOWNWARDS HARPOON WITH BARB LEFTWARDS"},{char:"&#x21C4",desc:"RIGHTWARDS ARROW OVER LEFTWARDS ARROW"},{char:"&#x21C5",desc:"UPWARDS ARROW LEFTWARDS OF DOWNWARDS ARROW"},{char:"&#x21C6",desc:"LEFTWARDS ARROW OVER RIGHTWARDS ARROW"},{char:"&#x21C7",desc:"LEFTWARDS PAIRED ARROWS"},{char:"&#x21C8",desc:"UPWARDS PAIRED ARROWS"},{char:"&#x21C9",desc:"RIGHTWARDS PAIRED ARROWS"},{char:"&#x21CA",desc:"DOWNWARDS PAIRED ARROWS"},{char:"&#x21CB",desc:"LEFTWARDS HARPOON OVER RIGHTWARDS HARPOON"},{char:"&#x21CC",desc:"RIGHTWARDS HARPOON OVER LEFTWARDS HARPOON"},{char:"&#x21CD",desc:"LEFTWARDS DOUBLE ARROW WITH STROKE"},{char:"&#x21CE",desc:"LEFT RIGHT DOUBLE ARROW WITH STROKE"},{char:"&#x21CF",desc:"RIGHTWARDS DOUBLE ARROW WITH STROKE"},{char:"&#x21D0",desc:"LEFTWARDS DOUBLE ARROW"},{char:"&#x21D1",desc:"UPWARDS DOUBLE ARROW"},{char:"&#x21D2",desc:"RIGHTWARDS DOUBLE ARROW"},{char:"&#x21D3",desc:"DOWNWARDS DOUBLE ARROW"},{char:"&#x21D4",desc:"LEFT RIGHT DOUBLE ARROW"},{char:"&#x21D5",desc:"UP DOWN DOUBLE ARROW"},{char:"&#x21D6",desc:"NORTH WEST DOUBLE ARROW"},{char:"&#x21D7",desc:"NORTH EAST DOUBLE ARROW"},{char:"&#x21D8",desc:"SOUTH EAST DOUBLE ARROW"},{char:"&#x21D9",desc:"SOUTH WEST DOUBLE ARROW"},{char:"&#x21DA",desc:"LEFTWARDS TRIPLE ARROW"},{char:"&#x21DB",desc:"RIGHTWARDS TRIPLE ARROW"},{char:"&#x21DC",desc:"LEFTWARDS SQUIGGLE ARROW"},{char:"&#x21DD",desc:"RIGHTWARDS SQUIGGLE ARROW"},{char:"&#x21DE",desc:"UPWARDS ARROW WITH DOUBLE STROKE"},{char:"&#x21DF",desc:"DOWNWARDS ARROW WITH DOUBLE STROKE"},{char:"&#x21E0",desc:"LEFTWARDS DASHED ARROW"},{char:"&#x21E1",desc:"UPWARDS DASHED ARROW"},{char:"&#x21E2",desc:"RIGHTWARDS DASHED ARROW"},{char:"&#x21E3",desc:"DOWNWARDS DASHED ARROW"},{char:"&#x21E4",desc:"LEFTWARDS ARROW TO BAR"},{char:"&#x21E5",desc:"RIGHTWARDS ARROW TO BAR"},{char:"&#x21E6",desc:"LEFTWARDS WHITE ARROW"},{char:"&#x21E7",desc:"UPWARDS WHITE ARROW"},{char:"&#x21E8",desc:"RIGHTWARDS WHITE ARROW"},{char:"&#x21E9",desc:"DOWNWARDS WHITE ARROW"},{char:"&#x21EA",desc:"UPWARDS WHITE ARROW FROM BAR"},{char:"&#x21EB",desc:"UPWARDS WHITE ARROW ON PEDESTAL"},{char:"&#x21EC",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH HORIZONTAL BAR"},{char:"&#x21ED",desc:"UPWARDS WHITE ARROW ON PEDESTAL WITH VERTICAL BAR"},{char:"&#x21EE",desc:"UPWARDS WHITE DOUBLE ARROW"},{char:"&#x21EF",desc:"UPWARDS WHITE DOUBLE ARROW ON PEDESTAL"},{char:"&#x21F0",desc:"RIGHTWARDS WHITE ARROW FROM WALL"},{char:"&#x21F1",desc:"NORTH WEST ARROW TO CORNER"},{char:"&#x21F2",desc:"SOUTH EAST ARROW TO CORNER"},{char:"&#x21F3",desc:"UP DOWN WHITE ARROW"},{char:"&#x21F4",desc:"RIGHT ARROW WITH SMALL CIRCLE"},{char:"&#x21F5",desc:"DOWNWARDS ARROW LEFTWARDS OF UPWARDS ARROW"},{char:"&#x21F6",desc:"THREE RIGHTWARDS ARROWS"},{char:"&#x21F7",desc:"LEFTWARDS ARROW WITH VERTICAL STROKE"},{char:"&#x21F8",desc:"RIGHTWARDS ARROW WITH VERTICAL STROKE"},{char:"&#x21F9",desc:"LEFT RIGHT ARROW WITH VERTICAL STROKE"},{char:"&#x21FA",desc:"LEFTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{char:"&#x21FB",desc:"RIGHTWARDS ARROW WITH DOUBLE VERTICAL STROKE"},{char:"&#x21FC",desc:"LEFT RIGHT ARROW WITH DOUBLE VERTICAL STROKE"},{char:"&#x21FD",desc:"LEFTWARDS OPEN-HEADED ARROW"},{char:"&#x21FE",desc:"RIGHTWARDS OPEN-HEADED ARROW"},{char:"&#x21FF",desc:"LEFT RIGHT OPEN-HEADED ARROW"}]},{title:"Math",char:"&forall;",list:[{char:"&forall;",desc:"FOR ALL"},{char:"&part;",desc:"PARTIAL DIFFERENTIAL"},{char:"&exist;",desc:"THERE EXISTS"},{char:"&empty;",desc:"EMPTY SET"},{char:"&nabla;",desc:"NABLA"},{char:"&isin;",desc:"ELEMENT OF"},{char:"&notin;",desc:"NOT AN ELEMENT OF"},{char:"&ni;",desc:"CONTAINS AS MEMBER"},{char:"&prod;",desc:"N-ARY PRODUCT"},{char:"&sum;",desc:"N-ARY SUMMATION"},{char:"&minus;",desc:"MINUS SIGN"},{char:"&lowast;",desc:"ASTERISK OPERATOR"},{char:"&radic;",desc:"SQUARE ROOT"},{char:"&prop;",desc:"PROPORTIONAL TO"},{char:"&infin;",desc:"INFINITY"},{char:"&ang;",desc:"ANGLE"},{char:"&and;",desc:"LOGICAL AND"},{char:"&or;",desc:"LOGICAL OR"},{char:"&cap;",desc:"INTERSECTION"},{char:"&cup;",desc:"UNION"},{char:"&int;",desc:"INTEGRAL"},{char:"&there4;",desc:"THEREFORE"},{char:"&sim;",desc:"TILDE OPERATOR"},{char:"&cong;",desc:"APPROXIMATELY EQUAL TO"},{char:"&asymp;",desc:"ALMOST EQUAL TO"},{char:"&ne;",desc:"NOT EQUAL TO"},{char:"&equiv;",desc:"IDENTICAL TO"},{char:"&le;",desc:"LESS-THAN OR EQUAL TO"},{char:"&ge;",desc:"GREATER-THAN OR EQUAL TO"},{char:"&sub;",desc:"SUBSET OF"},{char:"&sup;",desc:"SUPERSET OF"},{char:"&nsub;",desc:"NOT A SUBSET OF"},{char:"&sube;",desc:"SUBSET OF OR EQUAL TO"},{char:"&supe;",desc:"SUPERSET OF OR EQUAL TO"},{char:"&oplus;",desc:"CIRCLED PLUS"},{char:"&otimes;",desc:"CIRCLED TIMES"},{char:"&perp;",desc:"UP TACK"}]},{title:"Misc",char:"&spades;",list:[{char:"&spades;",desc:"BLACK SPADE SUIT"},{char:"&clubs;",desc:"BLACK CLUB SUIT"},{char:"&hearts;",desc:"BLACK HEART SUIT"},{char:"&diams;",desc:"BLACK DIAMOND SUIT"},{char:"&#x2669",desc:"QUARTER NOTE"},{char:"&#x266A",desc:"EIGHTH NOTE"},{char:"&#x266B",desc:"BEAMED EIGHTH NOTES"},{char:"&#x266C",desc:"BEAMED SIXTEENTH NOTES"},{char:"&#x266D",desc:"MUSIC FLAT SIGN"},{char:"&#x266E",desc:"MUSIC NATURAL SIGN"},{char:"&#x2600",desc:"BLACK SUN WITH RAYS"},{char:"&#x2601",desc:"CLOUD"},{char:"&#x2602",desc:"UMBRELLA"},{char:"&#x2603",desc:"SNOWMAN"},{char:"&#x2615",desc:"HOT BEVERAGE"},{char:"&#x2618",desc:"SHAMROCK"},{char:"&#x262F",desc:"YIN YANG"},{char:"&#x2714",desc:"HEAVY CHECK MARK"},{char:"&#x2716",desc:"HEAVY MULTIPLICATION X"},{char:"&#x2744",desc:"SNOWFLAKE"},{char:"&#x275B",desc:"HEAVY SINGLE TURNED COMMA QUOTATION MARK ORNAMENT"},{char:"&#x275C",desc:"HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT"},{char:"&#x275D",desc:"HEAVY DOUBLE TURNED COMMA QUOTATION MARK ORNAMENT"},{char:"&#x275E",desc:"HEAVY DOUBLE COMMA QUOTATION MARK ORNAMENT"},{char:"&#x2764",desc:"HEAVY BLACK HEART"}]}],specialCharButtons:["specialCharBack","|"]}),Object.assign(r.POPUP_TEMPLATES,{specialCharacters:"[_BUTTONS_][_CUSTOM_LAYER_]"}),r.PLUGINS.specialCharacters=function(g){var e=g.$,t=g.opts.specialCharactersSets[0],a=g.opts.specialCharactersSets,i="";function s(){return'\n        <div class="fr-buttons fr-tabs fr-tabs-scroll">\n          '.concat(function(e,t){var n="";return e.forEach((function(e){var r={elementClass:e.title===t.title?"fr-active fr-active-tab":"",title:e.title,dataParam1:e.title,desc:e.char};n+='<button class="fr-command fr-btn fr-special-character-category '.concat(r.elementClass,'" title="').concat(r.title,'" data-cmd="setSpecialCharacterCategory" data-param1="').concat(r.dataParam1,'"><span>').concat(r.desc,"</span></button>")})),n}(a,t),'\n        </div>\n        <div class="fr-icon-container fr-sc-container">\n          ').concat(function(e){var t="";return e.list.forEach((function(e){var n={dataParam1:e.char,title:e.desc,splCharValue:e.char};t+='<span class="fr-command fr-special-character fr-icon" role="button" \n      data-cmd="insertSpecialCharacter" data-param1="'.concat(n.dataParam1,'" \n      title="').concat(n.title,'">').concat(n.splCharValue,"</span>")})),t}(t),"\n        </div>")}return{setSpecialCharacterCategory:function(e){t=a.filter((function(t){return t.title===e}))[0],g.popups.get("specialCharacters").html(i+s())},showSpecialCharsPopup:function(){var t=g.popups.get("specialCharacters");if(t||(t=function(){g.opts.toolbarInline&&0<g.opts.specialCharButtons.length&&(i='<div class="fr-buttons fr-tabs">'.concat(g.button.buildList(g.opts.specialCharButtons),"</div>"));var t={buttons:i,custom_layer:s()},n=g.popups.create("specialCharacters",t);return function(t){g.events.on("popup.tab",(function(n){var o=e(n.currentTarget);if(!g.popups.isVisible("specialCharacters")||!o.is("span, a"))return!0;var c,l,a,d=n.which;if(r.KEYCODE.TAB==d){if(o.is("span.fr-icon")&&n.shiftKey||o.is("a")&&!n.shiftKey){var i=t.find(".fr-buttons");c=!g.accessibility.focusToolbar(i,!!n.shiftKey)}if(!1!==c){var s=t.find("span.fr-icon:focus").first().concat(t.findVisible(" span.fr-icon").first().concat(t.find("a")));o.is("span.fr-icon")&&(s=s.not("span.fr-icon:not(:focus)")),l=s.index(o),l=n.shiftKey?((l-1)%s.length+s.length)%s.length:(l+1)%s.length,a=s.get(l),g.events.disableBlur(),a.focus(),c=!1}}else if(r.KEYCODE.ARROW_UP==d||r.KEYCODE.ARROW_DOWN==d||r.KEYCODE.ARROW_LEFT==d||r.KEYCODE.ARROW_RIGHT==d){if(o.is("span.fr-icon")){var h=o.parent().find("span.fr-icon");l=h.index(o);var f=Math.floor(h.length/11),m=l%11,p=11*Math.floor(l/11)+m,u=11*f;r.KEYCODE.ARROW_UP==d?p=((p-11)%u+u)%u:r.KEYCODE.ARROW_DOWN==d?p=(p+11)%u:r.KEYCODE.ARROW_LEFT==d?p=((p-1)%u+u)%u:r.KEYCODE.ARROW_RIGHT==d&&(p=(p+1)%u),a=e(h.get(p)),g.events.disableBlur(),a.focus(),c=!1}}else r.KEYCODE.ENTER==d&&(o.is("a")?o[0].click():g.button.exec(o),c=!1);return!1===c&&(n.preventDefault(),n.stopPropagation()),c}),!0)}(n),n}()),!t.hasClass("fr-active")){g.popups.refresh("specialCharacters"),g.popups.setContainer("specialCharacters",g.$tb);var n=g.$tb.find('.fr-command[data-cmd="specialCharacters"]'),o=g.button.getPosition(n),c=o.left,a=o.top;g.popups.show("specialCharacters",c,a,outerHeight)}},back:function(){g.popups.hide("specialCharacters"),g.toolbar.showInline()}}},r.DefineIcon("specialCharacters",{NAME:"dollar-sign",SVG_KEY:"symbols"}),r.RegisterCommand("specialCharacters",{title:"Special Characters",icon:"specialCharacters",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,plugin:"specialCharacters",showOnMobile:!0,callback:function(){this.popups.isVisible("specialCharacters")?(this.$el.find(".fr-marker")&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("specialCharacters")):this.specialCharacters.showSpecialCharsPopup()}}),r.RegisterCommand("insertSpecialCharacter",{callback:function(e,t){this.undo.saveStep(),this.html.insert(t),this.undo.saveStep(),this.popups.hide("specialCharacters")}}),r.RegisterCommand("setSpecialCharacterCategory",{undo:!1,focus:!1,callback:function(e,t){this.specialCharacters.setSpecialCharacterCategory(t)}}),r.DefineIcon("specialCharBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("specialCharBack",{title:"Back",undo:!1,focus:!1,back:!0,refreshAfterCallback:!1,callback:function(){this.specialCharacters.back()}}),Object.assign(r.POPUP_TEMPLATES,{"table.insert":"[_BUTTONS_][_ROWS_COLUMNS_]","table.edit":"[_BUTTONS_]","table.colors":"[_BUTTONS_][_COLORS_][_CUSTOM_COLOR_]"}),Object.assign(r.DEFAULTS,{tableInsertMaxSize:10,tableEditButtons:["tableHeader","tableRemove","tableRows","tableColumns","tableStyle","-","tableCells","tableCellBackground","tableCellVerticalAlign","tableCellHorizontalAlign","tableCellStyle"],tableInsertButtons:["tableBack","|"],tableResizer:!0,tableDefaultWidth:"100%",tableResizerOffset:5,tableResizingLimit:30,tableColorsButtons:["tableBack","|"],tableColors:["#61BD6D","#1ABC9C","#54ACD2","#2C82C9","#9365B8","#475577","#CCCCCC","#41A85F","#00A885","#3D8EB9","#2969B0","#553982","#28324E","#000000","#F7DA64","#FBA026","#EB6B56","#E25041","#A38F84","#EFEFEF","#FFFFFF","#FAC51C","#F37934","#D14841","#B8312F","#7C706B","#D1D5D8","REMOVE"],tableColorsStep:7,tableCellStyles:{"fr-highlighted":"Highlighted","fr-thick":"Thick"},tableStyles:{"fr-dashed-borders":"Dashed Borders","fr-alternate-rows":"Alternate Rows"},tableCellMultipleStyles:!0,tableMultipleStyles:!0,tableInsertHelper:!0,tableInsertHelperOffset:15}),r.PLUGINS.table=function(e){var t,n,a,o,c,i,l,d=e.$;function u(){var t=S();if(t){var n=e.popups.get("table.edit");if(n||(n=p()),n){e.popups.setContainer("table.edit",e.$sc);var r=N(t),o=r.left+(r.right-r.left)/2,a=r.bottom;e.popups.show("table.edit",o,a,r.bottom-r.top,!0),e.edit.isDisabled()&&(1<ee().length&&e.toolbar.disable(),e.$el.removeClass("fr-no-selection"),e.edit.on(),e.button.bulkRefresh(),e.selection.setAtEnd(e.$el.find(".fr-selected-cell").last().get(0)),e.selection.restore())}}}function s(){var t=S();if(t){var n=e.popups.get("table.colors");n||(n=function(){var t="";0<e.opts.tableColorsButtons.length&&(t='<div class="fr-buttons fr-tabs">'.concat(e.button.buildList(e.opts.tableColorsButtons),"</div>"));var n="";e.opts.colorsHEXInput&&(n='<div class="fr-color-hex-layer fr-table-colors-hex-layer fr-active fr-layer" id="fr-table-colors-hex-layer-'.concat(e.id,'"><div class="fr-input-line"><input maxlength="7" id="fr-table-colors-hex-layer-text-').concat(e.id,'" type="text" placeholder="').concat(e.language.translate("HEX Color"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="tableCellBackgroundCustomColor" tabIndex="2" role="button">').concat(e.language.translate("OK"),"</button></div></div>"));var o={buttons:t,colors:function(){for(var t='<div class="fr-color-set fr-table-colors">',n=0;n<e.opts.tableColors.length;n++)0!==n&&n%e.opts.tableColorsStep==0&&(t+="<br>"),"REMOVE"!=e.opts.tableColors[n]?t+='<span class="fr-command" style="background: '.concat(e.opts.tableColors[n],';" tabIndex="-1" role="button" data-cmd="tableCellBackgroundColor" data-param1="').concat(e.opts.tableColors[n],'"><span class="fr-sr-only">').concat(e.language.translate("Color")," ").concat(e.opts.tableColors[n],"&nbsp;&nbsp;&nbsp;</span></span>"):t+='<span class="fr-command" data-cmd="tableCellBackgroundColor" tabIndex="-1" role="button" data-param1="REMOVE" title="'.concat(e.language.translate("Clear Formatting"),'">').concat(e.icon.create("tableColorRemove"),'<span class="fr-sr-only">').concat(e.language.translate("Clear Formatting"),"</span></span>");return t+"</div>"}(),custom_color:n},c=e.popups.create("table.colors",o);return e.events.$on(e.$wp,"scroll.table-colors",(function(){e.popups.isVisible("table.colors")&&s()})),function(t){e.events.on("popup.tab",(function(n){var o=d(n.currentTarget);if(!e.popups.isVisible("table.colors")||!o.is("span"))return!0;var c=n.which,l=!0;if(r.KEYCODE.TAB==c){var a=t.find(".fr-buttons");l=!e.accessibility.focusToolbar(a,!!n.shiftKey)}else if(r.KEYCODE.ARROW_UP==c||r.KEYCODE.ARROW_DOWN==c||r.KEYCODE.ARROW_LEFT==c||r.KEYCODE.ARROW_RIGHT==c){var h=o.parent().find("span.fr-command"),i=h.index(o),s=e.opts.colorsStep,f=Math.floor(h.length/s),m=i%s,v=Math.floor(i/s)*s+m,p=f*s;r.KEYCODE.ARROW_UP==c?v=((v-s)%p+p)%p:r.KEYCODE.ARROW_DOWN==c?v=(v+s)%p:r.KEYCODE.ARROW_LEFT==c?v=((v-1)%p+p)%p:r.KEYCODE.ARROW_RIGHT==c&&(v=(v+1)%p);var u=d(h.get(v));e.events.disableBlur(),u.focus(),l=!1}else r.KEYCODE.ENTER==c&&(e.button.exec(o),l=!1);return!1===l&&(n.preventDefault(),n.stopPropagation()),l}),!0)}(c),c}()),e.popups.setContainer("table.colors",e.$sc);var o=N(t),c=(o.left+o.right)/2,a=o.bottom;!function(){var t=e.popups.get("table.colors"),n=e.$el.find(".fr-selected-cell").first(),r=e.helpers.RGBToHex(n.css("background-color")),o=t.find(".fr-table-colors-hex-layer input");t.find(".fr-selected-color").removeClass("fr-selected-color fr-active-item"),t.find('span[data-param1="'.concat(r,'"]')).addClass("fr-selected-color fr-active-item"),o.val(r).trigger("change")}(),e.popups.show("table.colors",c,a,o.bottom-o.top,!0)}}function h(){0===ee().length&&e.toolbar.enable()}function f(t){if(t)return e.popups.onHide("table.insert",(function(){e.popups.get("table.insert").find('.fr-table-size .fr-select-table-size > span[data-row="1"][data-col="1"]').trigger("mouseover")})),!0;var n="";0<e.opts.tableInsertButtons.length&&(n='<div class="fr-buttons fr-tabs">'.concat(e.button.buildList(e.opts.tableInsertButtons),"</div>"));var o={buttons:n,rows_columns:function(){for(var t='<div class="fr-table-size"><div class="fr-table-size-info">1 &times; 1</div><div class="fr-select-table-size">',n=1;n<=e.opts.tableInsertMaxSize;n++){for(var r=1;r<=e.opts.tableInsertMaxSize;r++){var o="inline-block";2<n&&!e.helpers.isMobile()&&(o="none");var a="fr-table-cell ";1==n&&1==r&&(a+=" hover"),t+='<span class="fr-command '.concat(a,'" tabIndex="-1" data-cmd="tableInsert" data-row="').concat(n,'" data-col="').concat(r,'" data-param1="').concat(n,'" data-param2="').concat(r,'" style="display: ').concat(o,';" role="button"><span></span><span class="fr-sr-only">').concat(n," &times; ").concat(r,"&nbsp;&nbsp;&nbsp;</span></span>")}t+='<div class="new-line"></div>'}return t+"</div></div>"}()},c=e.popups.create("table.insert",o);return e.events.$on(c,"mouseover",".fr-table-size .fr-select-table-size .fr-table-cell",(function(e){m(d(e.currentTarget))}),!0),function(t){e.events.$on(t,"focus","[tabIndex]",(function(e){m(d(e.currentTarget))})),e.events.on("popup.tab",(function(t){var n=d(t.currentTarget);if(!e.popups.isVisible("table.insert")||!n.is("span, a"))return!0;var o,c=t.which;if(r.KEYCODE.ARROW_UP==c||r.KEYCODE.ARROW_DOWN==c||r.KEYCODE.ARROW_LEFT==c||r.KEYCODE.ARROW_RIGHT==c){if(n.is("span.fr-table-cell")){var a=n.parent().find("span.fr-table-cell"),l=a.index(n),i=e.opts.tableInsertMaxSize,s=l%i,h=Math.floor(l/i);r.KEYCODE.ARROW_UP==c?h=Math.max(0,h-1):r.KEYCODE.ARROW_DOWN==c?h=Math.min(e.opts.tableInsertMaxSize-1,h+1):r.KEYCODE.ARROW_LEFT==c?s=Math.max(0,s-1):r.KEYCODE.ARROW_RIGHT==c&&(s=Math.min(e.opts.tableInsertMaxSize-1,s+1));var f=h*i+s,v=d(a.get(f));m(v),e.events.disableBlur(),v.focus(),o=!1}}else r.KEYCODE.ENTER==c&&(e.button.exec(n),o=!1);return!1===o&&(t.preventDefault(),t.stopPropagation()),o}),!0)}(c),c}function m(t){var n=t.data("row");null!==n&&(n=parseInt(n));var r=t.data("col");null!==r&&(r=parseInt(r));var o=t.parent();o.siblings(".fr-table-size-info").html("".concat(n," &times; ").concat(r)),o.find("> span").removeClass("hover fr-active-item");for(var a=1;a<=e.opts.tableInsertMaxSize;a++)for(var c=0;c<=e.opts.tableInsertMaxSize;c++){var i=o.find('> span[data-row="'.concat(a,'"][data-col="').concat(c,'"]'));a<=n&&c<=r?i.addClass("hover"):a<=n+1||a<=2&&!e.helpers.isMobile()?i.css("display","inline-block"):2<a&&!e.helpers.isMobile()&&i.css("display","none")}t.addClass("fr-active-item")}function p(t){if(t)return e.popups.onHide("table.edit",h),!0;if(0<e.opts.tableEditButtons.length){var n={buttons:'<div class="fr-buttons">'.concat(e.button.buildList(e.opts.tableEditButtons),"</div>")},r=e.popups.create("table.edit",n);return e.events.$on(e.$wp,"scroll.table-edit",(function(){e.popups.isVisible("table.edit")&&u()})),r}return!1}function v(){if(0<ee().length){var t=te();e.selection.setBefore(t.get(0))||e.selection.setAfter(t.get(0)),e.selection.restore(),e.popups.hide("table.edit"),e.opts.trackChangesEnabled?(e.track_changes.removedTable(t),O()):t.remove(),e.toolbar.enable()}}function g(t){var n=te();if(0<n.length){if(0<e.$el.find("th.fr-selected-cell").length&&"above"==t)return;var r,o,a,c=S(),i=k(c);if(null==i)return;o="above"==t?i.min_i:i.max_i;var s="<tr>";for(r=0;r<c[o].length;r++)if("below"==t&&o<c.length-1&&c[o][r]==c[o+1][r]||"above"==t&&0<o&&c[o][r]==c[o-1][r]){if(0===r||0<r&&c[o][r]!=c[o][r-1]){var l=d(c[o][r]);l.attr("rowspan",parseInt(l.attr("rowspan"),10)+1)}}else s+='<td style="'+d(c[o][r]).attr("style")+'" ><br></td>';s+="</tr>",a=0<e.$el.find("th.fr-selected-cell").length&&"below"==t?d(n.find("tbody").not(n.find("> table tbody"))):d(n.find("tr").not(n.find("> table tr")).get(o)),"below"==t?"TBODY"==a.attr("tagName")?a.prepend(s):a[0].parentNode&&a[0].insertAdjacentHTML("afterend",s):"above"==t&&(a.before(s),e.popups.isVisible("table.edit")&&u())}}function _(e,t,n){var r,a,o,i,s,c=0,l=S(n);if(e<(t=Math.min(t,l[0].length-1)))for(a=e;a<=t;a++)if(!(e<a&&l[0][a]==l[0][a-1])&&1<(i=Math.min(parseInt(l[0][a].getAttribute("colspan"),10)||1,t-e+1))&&l[0][a]==l[0][a+1])for(c=i-1,r=1;r<l.length;r++)if(l[r][a]!=l[r-1][a]){for(o=a;o<a+i;o++)if(void 0!==l[r][o])if(1<(s=parseInt(l[r][o].getAttribute("colspan"),10)||1)&&l[r][o]==l[r][o+1])o+=c=Math.min(c,s-1);else if(!(c=Math.max(0,c-1)))break;if(!c)break}c&&b(l,c,"colspan",0,l.length-1,e,t)}function y(e,t,n){var r,a,o,i,s,c=0,l=S(n);if(e<(t=Math.min(t,l.length-1)))for(r=e;r<=t;r++)if(!(e<r&&l[r][0]==l[r-1][0])&&void 0!==l[r][0]&&1<(i=Math.min(parseInt(l[r][0].getAttribute("rowspan"),10)||1,t-e+1))&&l[r][0]==l[r+1][0])for(c=i-1,a=1;a<l[0].length;a++)if(l[r][a]!=l[r][a-1]){for(o=r;o<r+i;o++)if(void 0!==l[o][a])if(1<(s=parseInt(l[o][a].getAttribute("rowspan"),10)||1)&&l[o][a]==l[o+1][a])o+=c=Math.min(c,s-1);else if(!(c=Math.max(0,c-1)))break;if(!c)break}c&&b(l,c,"rowspan",e,t,0,l[0].length-1)}function b(e,t,n,r,a,o,i){var s,c,l;for(s=r;s<=a;s++)for(c=o;c<=i;c++)r<s&&e[s][c]==e[s-1][c]||o<c&&e[s][c]==e[s][c-1]||void 0!==e[s][c]&&1<(l=parseInt(e[s][c].getAttribute(n),10)||1)&&(1<l-t?e[s][c].setAttribute(n,l-t):e[s][c].removeAttribute(n))}function E(e,t,n,r,a){y(e,t,a),_(n,r,a)}function C(t){var n=e.$el.find(".fr-selected-cell");"REMOVE"!=t?n.css("background-color",e.helpers.HEXtoRGB(t)):n.css("background-color",""),u()}function w(e){e.style.removeProperty("border"),e.style.removeProperty("border-top"),e.style.removeProperty("border-bottom"),e.style.removeProperty("border-left"),e.style.removeProperty("border-right")}function S(e){var t=[];if(null==(e=e||null)&&0<ee().length&&(e=te()),e){for(var n=e.find("tr:empty"),r=n.length-1;0<=r;r--)d(n[r]).remove();e.findVisible("tr").not(e.find("> table tr")).each((function(s,e){var n=d(e),r=0;n.find("> th, > td").each((function(e,n){for(var o=d(n),c=parseInt(o.attr("colspan"),10)||1,a=parseInt(o.attr("rowspan"),10)||1,l=s;l<s+a;l++)for(var i=r;i<r+c;i++)t[l]||(t[l]=[]),t[l][i]?r++:t[l][i]=n;r+=c}))}))}return t}function T(e,t){for(var n=0;n<t.length;n++)for(var r=0;r<t[n].length;r++)if(t[n][r]==e)return{row:n,col:r}}function A(e,t,n){for(var r=e+1,a=t+1;r<n.length;){if(n[r][t]!=n[e][t]){r--;break}r++}for(r==n.length&&r--;a<n[e].length;){if(n[e][a]!=n[e][t]){a--;break}a++}return a==n[e].length&&a--,{row:r,col:a}}function R(){e.el.querySelector(".fr-cell-fixed")&&e.el.querySelector(".fr-cell-fixed").classList.remove("fr-cell-fixed"),e.el.querySelector(".fr-cell-handler")&&e.el.querySelector(".fr-cell-handler").classList.remove("fr-cell-handler")}function O(){var t=e.$el.find(".fr-selected-cell");0<t.length&&t.each((function(){var e=d(this);e.removeClass("fr-selected-cell"),""===e.attr("class")&&e.removeAttr("class")})),R()}function I(){e.events.disableBlur(),e.selection.clear(),e.$el.addClass("fr-no-selection"),e.$el.blur(),e.events.enableBlur()}function k(t){var n=e.$el.find(".fr-selected-cell");if(0<n.length){var r,o=t.length,a=0,c=t[0].length,i=0;for(r=0;r<n.length;r++){var s=T(n[r],t),l=A(s.row,s.col,t);o=Math.min(s.row,o),a=Math.max(l.row,a),c=Math.min(s.col,c),i=Math.max(l.col,i)}return{min_i:o,max_i:a,min_j:c,max_j:i}}return null}function N(e){var t=k(e);if(null!=t){var n=d(e[t.min_i][t.min_j]),r=d(e[t.min_i][t.max_j]),a=d(e[t.max_i][t.min_j]);return{left:n.length&&n.offset().left,right:r.length&&r.offset().left+r.outerWidth(),top:n.length&&n.offset().top,bottom:a.length&&a.offset().top+a.outerHeight()}}}function L(t,n){if(d(t).is(n))O(),d(t).addClass("fr-selected-cell");else{I(),e.edit.off();var r=S(),o=T(t,r),a=T(n,r),c=function u(e,t,n,r,a){var o,i,s,c,l=e,h=t,f=n,p=r;for(o=l;o<=h;o++)(1<(parseInt(d(a[o][f]).attr("rowspan"),10)||1)||1<(parseInt(d(a[o][f]).attr("colspan"),10)||1))&&(c=A((s=T(a[o][f],a)).row,s.col,a),l=Math.min(s.row,l),h=Math.max(c.row,h),f=Math.min(s.col,f),p=Math.max(c.col,p)),(1<(parseInt(d(a[o][p]).attr("rowspan"),10)||1)||1<(parseInt(d(a[o][p]).attr("colspan"),10)||1))&&(c=A((s=T(a[o][p],a)).row,s.col,a),l=Math.min(s.row,l),h=Math.max(c.row,h),f=Math.min(s.col,f),p=Math.max(c.col,p));for(i=f;i<=p;i++)(1<(parseInt(d(a[l][i]).attr("rowspan"),10)||1)||1<(parseInt(d(a[l][i]).attr("colspan"),10)||1))&&(c=A((s=T(a[l][i],a)).row,s.col,a),l=Math.min(s.row,l),h=Math.max(c.row,h),f=Math.min(s.col,f),p=Math.max(c.col,p)),(1<(parseInt(d(a[h][i]).attr("rowspan"),10)||1)||1<(parseInt(d(a[h][i]).attr("colspan"),10)||1))&&(c=A((s=T(a[h][i],a)).row,s.col,a),l=Math.min(s.row,l),h=Math.max(c.row,h),f=Math.min(s.col,f),p=Math.max(c.col,p));return l==e&&h==t&&f==n&&p==r?{min_i:e,max_i:t,min_j:n,max_j:r}:u(l,h,f,p,a)}(Math.min(o.row,a.row),Math.max(o.row,a.row),Math.min(o.col,a.col),Math.max(o.col,a.col),r);O(),t.classList.add("fr-cell-fixed"),n.classList.add("fr-cell-handler");for(var i=c.min_i;i<=c.max_i;i++)for(var s=c.min_j;s<=c.max_j;s++)d(t).closest("table").is(d(r[i][s]).closest("table"))&&d(r[i][s]).addClass("fr-selected-cell")}}function M(t){var n=null,r=d(t.target);return"TD"==t.target.tagName||"TH"==t.target.tagName?n=t.target:0<r.closest("th",r.closest("thead")[0]).length?n=r.closest("th",r.closest("thead")[0]).get(0):0<r.closest("td",r.closest("tr")[0]).length&&(n=r.closest("td",r.closest("tr")[0]).get(0)),-1===e.$el.html.toString().search(n)?null:n}function x(){O(),e.popups.hide("table.edit")}function D(t){var n=M(t);if("false"==d(n).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;if(0<ee().length&&!n&&x(),!e.edit.isDisabled()||e.popups.isVisible("table.edit"))if(1!=t.which||1==t.which&&e.helpers.isMac()&&t.ctrlKey)(3==t.which||1==t.which&&e.helpers.isMac()&&t.ctrlKey)&&n&&x();else if(o=!0,n){0<ee().length&&!t.shiftKey&&x(),t.stopPropagation(),e.events.trigger("image.hideResizer"),e.events.trigger("video.hideResizer"),a=!0;var r=n.tagName.toLowerCase();t.shiftKey&&0<e.$el.find("".concat(r,".fr-selected-cell")).length?d(e.$el.find("".concat(r,".fr-selected-cell")).closest("table")).is(d(n).closest("table"))?L(c,n):I():((e.keys.ctrlKey(t)||t.shiftKey)&&"TD"===t.currentTarget.tagName&&(1<ee().length||0===d(n).find(e.selection.element()).length&&!d(n).is(e.selection.element()))&&I(),c=n,0<e.opts.tableEditButtons.length&&L(c,c))}}function P(n){if(!e.edit.isDisabled()&&e.popups.areVisible())return!0;var r=M(n);if(1===ee().length&&null===r&&(e.toolbar.enable(),O()),(1===ee().length&&r&&"TD"!==r.tagName&&"TH"!==r.tagName||!a&&!e.$tb.is(n.target)&&!e.$tb.is(d(n.target).closest(".fr-toolbar")))&&(e.toolbar.enable(),O()),("BODY"===n.target.tagName||"HTML"===n.target.tagName)&&!r&&0<ee().length&&e.toolbar.enable(),!(1!=n.which||1==n.which&&e.helpers.isMac()&&n.ctrlKey)&&(o=!1,a&&(a=!1,M(n)||1!=ee().length?0<ee().length?e.selection.isCollapsed()?(u(),e.toolbar.enable()):(O(),e.edit.on()):ee().length||(e.$el.removeClass("fr-no-selection"),e.edit.on()):O()),l)){l=!1,t.removeClass("fr-moving"),e.$el.removeClass("fr-no-selection"),e.edit.on();var c=parseFloat(t.css("left"))+e.opts.tableResizerOffset+e.$wp.offset().left;e.opts.iframe&&(c-=e.$iframe.offset().left),t.data("release-position",c),t.removeData("max-left"),t.removeData("max-right"),function(){var n=t.data("origin"),r=t.data("release-position");if(n!==r){var o=t.data("first"),c=t.data("second"),a=t.data("table"),l=a.outerWidth();if(e.undo.canDo()||e.undo.saveStep(),null!=o&&null!=c){var i,s,h,f=S(a),m=[],v=[],p=[],u=[];for(i=0;i<f.length;i++)s=d(f[i][o]),h=d(f[i][c]),m[i]=s.outerWidth(),p[i]=h.outerWidth(),v[i]=m[i]/l*100,u[i]=p[i]/l*100;for(i=0;i<f.length;i++)if(s=d(f[i][o]),h=d(f[i][c]),f[i][o]!=f[i][c]){var _=(v[i]*(m[i]+r-n)/m[i]).toFixed(4);s.css("width",_+"%"),h.css("width",(v[i]+u[i]-_).toFixed(4)+"%")}}else{var g,y=a.parent(),E=l/y.width()*100,b=(parseInt(a.css("margin-left"),10)||0)/y.width()*100,C=(parseInt(a.css("margin-right"),10)||0)/y.width()*100;"rtl"==e.opts.direction&&0===c||"rtl"!=e.opts.direction&&0!==c?(g=(l+r-n)/l*E,a.css("margin-right","calc(100% - ".concat(Math.round(g).toFixed(4),"% - ").concat(Math.round(b).toFixed(4),"%)"))):("rtl"==e.opts.direction&&0!==c||"rtl"!=e.opts.direction&&0===c)&&(g=(l-r+n)/l*E,a.css("margin-left","calc(100% - ".concat(Math.round(g).toFixed(4),"% - ").concat(Math.round(C).toFixed(4),"%)"))),a.css("width","".concat(Math.round(g).toFixed(4),"%"))}e.selection.restore(),e.undo.saveStep(),e.events.trigger("table.resized",[a.get(0)])}t.removeData("origin"),t.removeData("release-position"),t.removeData("first"),t.removeData("second"),t.removeData("table")}(),j()}}function U(t){if(!(d(t.currentTarget).is(d(t.originalEvent.relatedTarget))||t.currentTarget.contains(t.originalEvent.relatedTarget)||t.originalEvent.relatedTarget&&t.originalEvent.relatedTarget.contains(t.currentTarget))&&(e.events.$on(d("input"),"click",ne),!0===a&&0<e.opts.tableEditButtons.length)){if(d(t.currentTarget).closest("table").is(te())){if("TD"==t.currentTarget.tagName&&0===e.$el.find("th.fr-selected-cell").length)return void L(c,t.currentTarget);if("TH"==t.currentTarget.tagName&&0===e.$el.find("td.fr-selected-cell").length)return void L(c,t.currentTarget)}I()}}function B(t,n,r,o){for(var a,c=n;c!=e.el&&"TD"!=c.tagName&&"TH"!=c.tagName&&("up"==o?a=c.previousElementSibling:"down"==o&&(a=c.nextElementSibling),!a);)c=c.parentNode;"TD"==c.tagName||"TH"==c.tagName?function(t,n){for(var r=t;r&&"TABLE"!=r.tagName&&r.parentNode!=e.el;)r=r.parentNode;if(r&&"TABLE"==r.tagName){var o=S(d(r));"up"==n?F(T(t,o),r,o):"down"==n&&V(T(t,o),r,o)}}(c,o):a&&("up"==o&&e.selection.setAtEnd(a),"down"==o&&e.selection.setAtStart(a))}function F(t,n,r){0<d(".tribute-container").length&&"none"!=d(".tribute-container").css("display")||(0<t.row?e.selection.setAtEnd(r[t.row-1][t.col]):B(0,n,0,"up"))}function V(t,n,r){if(!(0<d(".tribute-container").length&&"none"!=d(".tribute-container").css("display"))){var o=parseInt(r[t.row][t.col].getAttribute("rowspan"),10)||1;t.row<r.length-o?e.selection.setAtStart(r[t.row+o][t.col]):B(0,n,0,"down")}}function j(){t&&(t.find("div").css("opacity",0),t.css("top",0),t.css("left",0),t.css("height",0),t.find("div").css("height",0),t.hide())}function H(){n&&n.removeClass("fr-visible").css("left","-9999px")}function $(n,r){var o=d(r),c=o.closest("table"),a=c.parent();if(r&&"TD"!=r.tagName&&"TH"!=r.tagName&&(0<o.closest("td").length?r=o.closest("td"):0<o.closest("th").length&&(r=o.closest("th"))),!r||"TD"!=r.tagName&&"TH"!=r.tagName)t&&o.get(0)!=t.get(0)&&o.parent().get(0)!=t.get(0)&&e.core.sameInstance(t)&&j();else{if(o=d(r),0===e.$el.find(o).length)return!1;var h=o.offset().left-1,i=h+o.outerWidth();if(Math.abs(n.pageX-h)<=e.opts.tableResizerOffset||Math.abs(i-n.pageX)<=e.opts.tableResizerOffset){var s,f,m,v,_,p=S(c),u=T(r,p),y=A(u.row,u.col,p),g=c.offset().top,E=c.outerHeight()-1;"rtl"!=e.opts.direction?n.pageX-h<=e.opts.tableResizerOffset?(m=h,0<u.col?(v=h-Y(u.col-1,p)+e.opts.tableResizingLimit,_=h+Y(u.col,p)-e.opts.tableResizingLimit,s=u.col-1,f=u.col):(s=null,f=0,v=c.offset().left-1-parseInt(c.css("margin-left"),10),_=c.offset().left-1+c.width()-p[0].length*e.opts.tableResizingLimit)):i-n.pageX<=e.opts.tableResizerOffset&&(m=i,y.col<p[y.row].length&&p[y.row][y.col+1]?(v=i-Y(y.col,p)+e.opts.tableResizingLimit,_=i+Y(y.col+1,p)-e.opts.tableResizingLimit,s=y.col,f=y.col+1):(s=y.col,f=null,v=c.offset().left-1+p[0].length*e.opts.tableResizingLimit,_=a.offset().left-1+a.width()+parseFloat(a.css("padding-left")))):i-n.pageX<=e.opts.tableResizerOffset?(m=i,0<u.col?(v=i-Y(u.col,p)+e.opts.tableResizingLimit,_=i+Y(u.col-1,p)-e.opts.tableResizingLimit,s=u.col,f=u.col-1):(s=null,f=0,v=c.offset().left+p[0].length*e.opts.tableResizingLimit,_=a.offset().left-1+a.width()+parseFloat(a.css("padding-left")))):n.pageX-h<=e.opts.tableResizerOffset&&(m=h,y.col<p[y.row].length&&p[y.row][y.col+1]?(v=h-Y(y.col+1,p)+e.opts.tableResizingLimit,_=h+Y(y.col,p)-e.opts.tableResizingLimit,s=y.col+1,f=y.col):(s=y.col,f=null,v=a.offset().left+parseFloat(a.css("padding-left")),_=c.offset().left-1+c.width()-p[0].length*e.opts.tableResizingLimit)),t||(e.shared.$table_resizer||(e.shared.$table_resizer=d(document.createElement("div")).attr("class","fr-table-resizer").html("<div></div>")),t=e.shared.$table_resizer,e.events.$on(t,"mousedown",(function(n){return!e.core.sameInstance(t)||(0<ee().length&&x(),1==n.which?(e.selection.save(),l=!0,t.addClass("fr-moving"),I(),e.edit.off(),t.find("div").css("opacity",1),!1):void 0)})),e.events.$on(t,"mousemove",(function(n){if(!e.core.sameInstance(t))return!0;l&&(e.opts.iframe&&(n.pageX-=e.$iframe.offset().left),q(n))})),e.events.on("shared.destroy",(function(){t.html("").removeData().remove(),t=null}),!0),e.events.on("destroy",(function(){e.$el.find(".fr-selected-cell").removeClass("fr-selected-cell"),d("body").first().append(t.hide())}),!0)),t.data("table",c),t.data("first",s),t.data("second",f),t.data("instance",e),e.$wp.append(t);var C=m-e.win.pageXOffset-e.opts.tableResizerOffset-e.$wp.offset().left,b=g-e.$wp.offset().top+e.$wp.scrollTop();if(e.opts.iframe){var w=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),R=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));C+=e.$iframe.offset().left+R,b+=e.$iframe.offset().top+w,v+=e.$iframe.offset().left,_+=e.$iframe.offset().left}t.data("max-left",v),t.data("max-right",_),t.data("origin",m-e.win.pageXOffset),t.css("top",b),t.css("left",C),t.css("height",E),t.find("div").css("height",E),t.css("padding-left",e.opts.tableResizerOffset),t.css("padding-right",e.opts.tableResizerOffset),t.show()}else e.core.sameInstance(t)&&j()}}function z(t,r){if(e.$box.find(".fr-line-breaker").isVisible())return!1;n||Q(),e.$box.append(n),n.data("instance",e);var o,c=d(r).find("tr").first(),a=t.pageX,l=0,i=0;if(e.opts.iframe){var s=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),h=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));l+=e.$iframe.offset().left-e.helpers.scrollLeft()+h,i+=e.$iframe.offset().top-e.helpers.scrollTop()+s}c.find("th, td").each((function(){var t=d(this);return t.offset().left<=a&&a<t.offset().left+t.outerWidth()/2?(o=parseInt(n.find("a").css("width"),10),n.css("top",i+t.offset().top-e.$box.offset().top-o-5),n.css("left",l+t.offset().left-e.$box.offset().left-o/2),n.data("selected-cell",t),n.data("position","before"),n.addClass("fr-visible"),!1):t.offset().left+t.outerWidth()/2<=a&&a<t.offset().left+t.outerWidth()?(o=parseInt(n.find("a").css("width"),10),n.css("top",i+t.offset().top-e.$box.offset().top-o-5),n.css("left",l+t.offset().left-e.$box.offset().left+t.outerWidth()-o/2),n.data("selected-cell",t),n.data("position","after"),n.addClass("fr-visible"),!1):void 0}))}function W(t,r){if(e.$box.find(".fr-line-breaker").isVisible())return!1;n||Q(),e.$box.append(n),n.data("instance",e);var o,c=d(r),a=t.pageY,l=0,i=0;if(e.opts.iframe){var s=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),h=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));l+=e.$iframe.offset().left-e.helpers.scrollLeft()+h,i+=e.$iframe.offset().top-e.helpers.scrollTop()+s}c.find("tr").each((function(){var t=d(this);o=parseInt(n.find("a").css("width"),10);var r=l+t.offset().left-e.$box.offset().left;return r=0!==e.$box.offset().left?r-o-5:r+o-5,t.offset().top<=a&&a<t.offset().top+t.outerHeight()/2?(n.css("top",i+t.offset().top-e.$box.offset().top-o/2),n.css("left",r),n.data("selected-cell",t.find("td").first()),n.data("position","above"),n.addClass("fr-visible"),!1):t.offset().top+t.outerHeight()/2<=a&&a<t.offset().top+t.outerHeight()?(n.css("top",i+t.offset().top-e.$box.offset().top+t.outerHeight()-o/2),n.css("left",r),n.data("selected-cell",t.find("td").first()),n.data("position","below"),n.addClass("fr-visible"),!1):void 0}))}function K(t){i=null;var r=e.doc.elementFromPoint(t.pageX-e.win.pageXOffset,t.pageY-e.win.pageYOffset);e.opts.tableResizer&&(!e.popups.areVisible()||e.popups.areVisible()&&e.popups.isVisible("table.edit"))&&$(t,r),!e.opts.tableInsertHelper||e.popups.areVisible()||e.$tb.hasClass("fr-inline")&&e.$tb.isVisible()||function(t,r){if(0===ee().length){var o,c,a;if(r&&("HTML"==r.tagName||"BODY"==r.tagName||e.node.isElement(r)))for(o=1;o<=e.opts.tableInsertHelperOffset;o++){if(c=e.doc.elementFromPoint(t.pageX-e.win.pageXOffset,t.pageY-e.win.pageYOffset+o),d(c).hasClass("fr-tooltip"))return!0;if(c&&("TH"==c.tagName||"TD"==c.tagName||"TABLE"==c.tagName)&&(d(c).parents(".fr-wrapper").length||e.opts.iframe)&&"false"!=d(c).closest("table").attr("contenteditable"))return z(t,d(c).closest("table")),!0;if(a=e.doc.elementFromPoint(t.pageX-e.win.pageXOffset+o,t.pageY-e.win.pageYOffset),d(a).hasClass("fr-tooltip"))return!0;if(a&&("TH"==a.tagName||"TD"==a.tagName||"TABLE"==a.tagName)&&(d(a).parents(".fr-wrapper").length||e.opts.iframe)&&"false"!=d(a).closest("table").attr("contenteditable"))return W(t,d(a).closest("table")),!0}e.core.sameInstance(n)&&H()}}(t,r)}function G(){if(l){var n=t.data("table").offset().top-e.win.pageYOffset;if(e.opts.iframe){var r=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top"));n+=e.$iframe.offset().top-e.helpers.scrollTop()+r}t.css("top",n)}}function Y(e,t){var n,r=d(t[0][e]).outerWidth();for(n=1;n<t.length;n++)r=Math.min(r,d(t[n][e]).outerWidth());return r}function X(e,t,n){var r,a=0;for(r=e;r<=t;r++)a+=Y(r,n);return a}function q(n){if(1<ee().length&&o&&I(),!1===o&&!1===a&&!1===l)i&&clearTimeout(i),e.edit.isDisabled()&&!e.popups.isVisible("table.edit")||(i=setTimeout(K,30,n));else if(l){var r=n.pageX-e.win.pageXOffset;e.opts.iframe&&(r+=e.$iframe.offset().left);var c=t.data("max-left"),d=t.data("max-right");c<=r&&r<=d?t.css("left",r-e.opts.tableResizerOffset-e.$wp.offset().left):r<c&&parseFloat(t.css("left"),10)>c-e.opts.tableResizerOffset?t.css("left",c-e.opts.tableResizerOffset-e.$wp.offset().left):d<r&&parseFloat(t.css("left"),10)<d-e.opts.tableResizerOffset&&t.css("left",d-e.opts.tableResizerOffset-e.$wp.offset().left)}else o&&H()}function Z(t){e.node.isEmpty(t.get(0))?t.prepend(r.MARKERS):t.prepend(r.START_MARKER).append(r.END_MARKER)}function Q(){e.shared.$ti_helper||(e.shared.$ti_helper=d(document.createElement("div")).attr("class","fr-insert-helper").html('<a class="fr-floating-btn" role="button" tabIndex="-1" title="'.concat(e.language.translate("Insert"),'"><svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"><path d="M22,16.75 L16.75,16.75 L16.75,22 L15.25,22.000 L15.25,16.75 L10,16.75 L10,15.25 L15.25,15.25 L15.25,10 L16.75,10 L16.75,15.25 L22,15.25 L22,16.75 Z"/></svg></a>')),e.events.bindClick(e.shared.$ti_helper,"a",(function(){var t=n.data("selected-cell"),r=n.data("position"),o=n.data("instance")||e;"before"==r||"after"==r?(e.undo.saveStep(),t.addClass("fr-selected-cell"),o.table.insertColumn(r),t.removeClass("fr-selected-cell"),e.undo.saveStep()):("above"==r||"below"==r)&&(e.undo.saveStep(),t.addClass("fr-selected-cell"),o.table.insertRow(r),t.removeClass("fr-selected-cell"),e.undo.saveStep()),H()})),e.events.on("shared.destroy",(function(){e.shared.$ti_helper.html("").removeData().remove(),e.shared.$ti_helper=null}),!0),e.events.$on(e.shared.$ti_helper,"mousemove",(function(e){e.stopPropagation()}),!0),e.events.$on(d(e.o_win),"scroll",(function(){H()}),!0),e.events.$on(e.$wp,"scroll",(function(){H()}),!0)),n=e.shared.$ti_helper,e.events.on("destroy",(function(){n=null})),e.tooltip.bind(e.$box,".fr-insert-helper > a.fr-floating-btn")}function J(){c=null,clearTimeout(i)}function ee(){return e.el.querySelectorAll(".fr-selected-cell")}function te(){var t=ee();if(t.length){for(var n=t[0];n&&"TABLE"!=n.tagName&&n.parentNode!=e.el;)n=n.parentNode;return n&&"TABLE"==n.tagName?d(n):d([])}return d([])}function ne(e){a=!1}return{_init:function(){if(!e.$wp)return!1;if(e.helpers.isMobile()&&(e.events.$on(e.$el,"mousedown",D),e.events.$on(e.$win,"mouseup",P)),!e.helpers.isMobile()){l=a=o=!1,e.events.$on(e.$el,"mousedown",D),e.popups.onShow("image.edit",(function(){O(),a=o=!1})),e.popups.onShow("link.edit",(function(){O(),a=o=!1})),e.events.on("commands.mousedown",(function(e){0<e.parents(".fr-toolbar").length&&O()})),e.events.$on(e.$el,"mouseover","th, td",U),e.events.$on(e.$win,"mouseup",P),e.opts.iframe&&e.events.$on(d(e.o_win),"mouseup",P),e.events.$on(e.$win,"mousemove",q),e.events.$on(d(e.o_win),"scroll",G),e.events.on("contentChanged",(function(){0<ee().length&&(u(),e.$el.find("img").on("load.selected-cells",(function(){d(this).off("load.selected-cells"),0<ee().length&&u()})))})),e.events.$on(d(e.o_win),"resize",(function(){O()})),e.events.on("toolbar.esc",(function(){if(0<ee().length)return e.events.disableBlur(),e.events.focus(),!1}),!0),e.events.$on(d(e.o_win),"keydown",(function(){o&&a&&(a=o=!1,e.$el.removeClass("fr-no-selection"),e.edit.on(),e.selection.setAtEnd(e.$el.find(".fr-selected-cell").last().get(0)),e.selection.restore(),O())})),e.events.$on(e.$el,"keydown",(function(t){t.shiftKey?!1===function(t){var n=ee();if(null!=n&&0<n.length){var o,c=S(),a=t.which,l=T(1==n.length?o=n[0]:(o=e.el.querySelector(".fr-cell-fixed"),e.el.querySelector(".fr-cell-handler")),c);if(r.KEYCODE.ARROW_RIGHT==a){if(l.col<c[0].length-1)return L(o,c[l.row][l.col+1]),!1}else if(r.KEYCODE.ARROW_DOWN==a){if(l.row<c.length-1)return L(o,c[l.row+1][l.col]),!1}else if(r.KEYCODE.ARROW_LEFT==a){if(0<l.col)return L(o,c[l.row][l.col-1]),!1}else if(r.KEYCODE.ARROW_UP==a&&0<l.row)return L(o,c[l.row-1][l.col]),!1}}(t)&&setTimeout((function(){u()}),0):function(t){var n=t.which,o=e.selection.blocks();if(o.length&&("TD"==(o=o[0]).tagName||"TH"==o.tagName)){for(var c=o;c&&"TABLE"!=c.tagName&&c.parentNode!=e.el;)c=c.parentNode;if(c&&"TABLE"==c.tagName&&(r.KEYCODE.ARROW_LEFT==n||r.KEYCODE.ARROW_UP==n||r.KEYCODE.ARROW_RIGHT==n||r.KEYCODE.ARROW_DOWN==n)&&(0<ee().length&&x(),e.browser.webkit&&(r.KEYCODE.ARROW_UP==n||r.KEYCODE.ARROW_DOWN==n))){var a=e.selection.ranges(0).startContainer;if(a.nodeType==Node.TEXT_NODE&&(r.KEYCODE.ARROW_UP==n&&(a.previousSibling&&"BR"!==a.previousSibling.tagName||a.previousSibling&&"BR"===a.previousSibling.tagName&&a.previousSibling.previousSibling)||r.KEYCODE.ARROW_DOWN==n&&(a.nextSibling&&"BR"!==a.nextSibling.tagName||a.nextSibling&&"BR"===a.nextSibling.tagName&&a.nextSibling.nextSibling)))return;t.preventDefault(),t.stopPropagation();var l=S(d(c)),i=T(o,l);r.KEYCODE.ARROW_UP==n?F(i,c,l):r.KEYCODE.ARROW_DOWN==n&&V(i,c,l),e.selection.restore()}}}(t)})),e.events.on("keydown",(function(t){if(!1===function(t){if(t.which==r.KEYCODE.TAB){var n;if(0<ee().length)n=e.$el.find(".fr-selected-cell").last();else{var o=e.selection.element();"TD"==o.tagName||"TH"==o.tagName?n=d(o):o!=e.el&&(0<d(o).parentsUntil(e.$el,"td").length?n=d(o).parents("td").first():0<d(o).parentsUntil(e.$el,"th").length&&(n=d(o).parents("th").first()))}if(n)return t.preventDefault(),!!(0===e.selection.get().focusOffset&&0<d(e.selection.element()).parentsUntil(e.$el,"ol, ul").length&&(0<d(e.selection.element()).closest("li").prev().length||d(e.selection.element()).is("li")&&0<d(e.selection.element()).prev().length))||(x(),t.shiftKey?0<n.prev().length?Z(n.prev()):0<n.closest("tr").length&&0<n.closest("tr").prev().length?Z(n.closest("tr").prev().find("td").last()):0<n.closest("tbody").length&&0<n.closest("table").find("thead tr").length&&Z(n.closest("table").find("thead tr th").last()):0<n.next().length?Z(n.next()):0<n.closest("tr").length&&0<n.closest("tr").next().length?Z(n.closest("tr").next().find("td").first()):0<n.closest("thead").length&&0<n.closest("table").find("tbody tr").length?Z(n.closest("table").find("tbody tr td").first()):(n.addClass("fr-selected-cell"),g("below"),O(),Z(n.closest("tr").next().find("td").first())),e.selection.restore(),!1)}}(t))return!1;var n=ee();if(0<n.length){if(0<n.length&&e.keys.ctrlKey(t)&&t.which==r.KEYCODE.A)return O(),e.popups.isVisible("table.edit")&&e.popups.hide("table.edit"),n=[],!0;if(t.which==r.KEYCODE.ESC&&e.popups.isVisible("table.edit"))return O(),e.popups.hide("table.edit"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),!(n=[]);if(1<n.length&&(t.which==r.KEYCODE.BACKSPACE||t.which==r.KEYCODE.DELETE)){e.undo.saveStep();for(var o=0;o<n.length;o++)d(n[o]).html("<br>"),o==n.length-1&&d(n[o]).prepend(r.MARKERS);return e.selection.restore(),e.undo.saveStep(),!(n=[])}if(1<n.length&&t.which!=r.KEYCODE.F10&&!e.keys.isBrowserAction(t))return t.preventDefault(),!(n=[])}else if(!(n=[])===function(t){if(t.altKey&&t.which==r.KEYCODE.SPACE){var n,o=e.selection.element();if("TD"==o.tagName||"TH"==o.tagName?n=o:0<d(o).closest("td").length?n=d(o).closest("td").get(0):0<d(o).closest("th").length&&(n=d(o).closest("th").get(0)),n)return t.preventDefault(),L(n,n),u(),!1}}(t))return!1}),!0);var t=[];e.events.on("html.beforeGet",(function(){t=ee();for(var e=0;e<t.length;e++)t[e].className=(t[e].className||"").replace(/fr-selected-cell/g,"")})),e.events.on("html.afterGet",(function(){for(var e=0;e<t.length;e++)t[e].className=(t[e].className?t[e].className.trim()+" ":"")+"fr-selected-cell";t=[]})),f(!0),p(!0)}e.events.on("destroy",J)},insert:function(t,n){var o,c,a="<table "+(e.opts.tableDefaultWidth?'style="width: '+e.opts.tableDefaultWidth+';" ':"")+'class="fr-inserted-table"><tbody>',l=100/n;for(o=0;o<t;o++){for(a+="<tr>",c=0;c<n;c++)a+="<td"+(e.opts.tableDefaultWidth?' style="width: '+l.toFixed(4)+'%;"':"")+">",0===o&&0===c&&(a+=r.MARKERS),a+="<br></td>";a+="</tr>"}if(a+="</tbody></table>",e.opts.trackChangesEnabled){e.edit.on(),e.events.focus(!0),e.selection.restore(),e.undo.saveStep(),e.markers.insert(),e.html.wrap();var i=e.$el.find(".fr-marker");e.node.isLastSibling(i)&&i.parent().hasClass("fr-deletable")&&i.insertAfter(i.parent()),i.replaceWith(a),e.selection.clear()}else e.html.insert(a);e.selection.restore();var s=e.$el.find(".fr-inserted-table");s.removeClass("fr-inserted-table"),e.events.trigger("table.inserted",[s.get(0)])},remove:v,insertRow:g,deleteRow:function(){var t=te();if(0<t.length){var n,r,o,a=S(),c=k(a);if(null==c)return;if(0===c.min_i&&c.max_i==a.length-1)v();else{for(n=c.max_i;n>=c.min_i;n--){for(o=d(t.find("tr").not(t.find("> table tr")).get(n)),r=0;r<a[n].length;r++)if(0===r||a[n][r]!=a[n][r-1]){var i=d(a[n][r]);if(1<parseInt(i.attr("rowspan"),10)){var s=parseInt(i.attr("rowspan"),10)-1;1==s?i.removeAttr("rowspan"):i.attr("rowspan",s)}if(n<a.length-1&&a[n][r]==a[n+1][r]&&(0===n||a[n][r]!=a[n-1][r])){for(var l=a[n][r],h=r;0<h&&a[n][h]==a[n][h-1];)h--;0===h?d(t.find("tr").not(t.find("> table tr")).get(n+1)).prepend(l):d(a[n+1][h-1])[0].parentNode&&d(a[n+1][h-1])[0].insertAdjacentElement("afterend",l)}}var f=o.parent();o.remove(),0===f.find("tr").length&&f.remove(),a=S(t)}E(0,a.length-1,0,a[0].length-1,t),0<c.min_i?e.selection.setAtEnd(a[c.min_i-1][0]):e.selection.setAtEnd(a[0][0]),e.selection.restore(),e.popups.hide("table.edit")}}},insertColumn:function(t){var n=te();if(0<n.length){var r,o=S(),c=k(o);r="before"==t?c.min_j:c.max_j;var l,h=100/o[0].length,p=100/(o[0].length+1);n.find("th, td").each((function(){(l=d(this)).data("old-width",l.outerWidth()/n.outerWidth()*100)})),n.find("tr").not(n.find("> table tr")).each((function(e){for(var n,c=d(this),l=0,a=0;l-1<r;){if(!(n=c.find("> th, > td").get(a))){n=null;break}n==o[e][l]?(l+=parseInt(d(n).attr("colspan"),10)||1,a++):(l+=parseInt(d(o[e][l]).attr("colspan"),10)||1,"after"==t&&(n=0===a?-1:c.find("> th, > td").get(a-1)))}var f,i=d(n);if("after"==t&&r<l-1||"before"==t&&0<r&&o[e][r]==o[e][r-1]){if(0===e||0<e&&o[e][r]!=o[e-1][r]){var s=parseInt(i.attr("colspan"),10)+1;i.attr("colspan",s),i.css("width",(i.data("old-width")*p/h+p).toFixed(4)+"%"),i.removeData("old-width")}}else f=0<c.find("th").length?'<th style="width: '.concat(p.toFixed(4),'%;"><br></th>'):'<td style="width: '.concat(p.toFixed(4),'%;"><br></td>'),-1==n?c.prepend(f):null==n?c.append(f):"before"==t?i.before(f):"after"==t&&i[0].parentNode&&i[0].insertAdjacentHTML("afterend",f)})),n.find("th, td").each((function(){(l=d(this)).data("old-width")&&(l.css("width",(l.data("old-width")*p/h).toFixed(4)+"%"),l.removeData("old-width"))})),e.popups.isVisible("table.edit")&&u()}},deleteColumn:function(){var t=te();if(0<t.length){var n,r,o,a=S(),c=k(a);if(null==c)return;if(0===c.min_j&&c.max_j==a[0].length-1)v();else{var i=0;for(n=0;n<a.length;n++)for(r=0;r<a[0].length;r++)(o=d(a[n][r])).hasClass("fr-selected-cell")||(o.data("old-width",o.outerWidth()/t.outerWidth()*100),(r<c.min_j||r>c.max_j)&&(i+=o.outerWidth()/t.outerWidth()*100));for(i/=a.length,r=c.max_j;r>=c.min_j;r--)for(n=0;n<a.length;n++)if(0===n||a[n][r]!=a[n-1][r])if(o=d(a[n][r]),1<(parseInt(o.attr("colspan"),10)||1)){var s=parseInt(o.attr("colspan"),10)-1;1==s?o.removeAttr("colspan"):o.attr("colspan",s),o.css("width",(100*(o.data("old-width")-Y(r,a))/i).toFixed(4)+"%"),o.removeData("old-width")}else{var l=d(o.parent().get(0));o.remove(),0===l.find("> th, > td").length&&(0===l.prev().length||0===l.next().length||l.prev().find("> th[rowspan], > td[rowspan]").length<l.prev().find("> th, > td").length)&&l.remove()}E(0,a.length-1,0,a[0].length-1,t),0<c.min_j?e.selection.setAtEnd(a[c.min_i][c.min_j-1]):e.selection.setAtEnd(a[c.min_i][0]),e.selection.restore(),e.popups.hide("table.edit"),t.find("th, td").each((function(){(o=d(this)).data("old-width")&&(o.css("width",(100*o.data("old-width")/i).toFixed(4)+"%"),o.removeData("old-width"))}))}}},mergeCells:function(){if(1<ee().length&&(0===e.$el.find("th.fr-selected-cell").length||0===e.$el.find("td.fr-selected-cell").length)){R();var t,n,r=k(S());if(null==r)return;var o=e.$el.find(".fr-selected-cell"),a=d(o[0]),c=a.parent().find(".fr-selected-cell"),i=a.closest("table"),s=a.html(),l=0;for(t=0;t<c.length;t++)l+=d(c[t]).outerWidth();for(a.css("width",Math.min(100,l/i.outerWidth()*100).toFixed(4)+"%"),r.min_j<r.max_j&&a.attr("colspan",r.max_j-r.min_j+1),r.min_i<r.max_i&&a.attr("rowspan",r.max_i-r.min_i+1),t=1;t<o.length;t++)"<br>"!=(n=d(o[t])).html()&&""!==n.html()&&(s+="<br>".concat(n.html())),n.remove();a.html(s),e.selection.setAtEnd(a.get(0)),e.selection.restore(),e.toolbar.enable(),y(r.min_i,r.max_i,i);var h=i.find("tr:empty");for(t=h.length-1;0<=t;t--)d(h[t]).remove();_(r.min_j,r.max_j,i),u()}},splitCellVertically:function(){if(1==ee().length){var t=e.$el.find(".fr-selected-cell"),n=parseInt(t.attr("colspan"),10)||1,r=t.parent().outerWidth(),o=t.outerWidth(),a=t.clone().html("<br>"),c=S(),i=T(t.get(0),c);if(1<n){var s=Math.ceil(n/2);o=X(i.col,i.col+s-1,c)/r*100;var l=X(i.col+s,i.col+n-1,c)/r*100;1<s?t.attr("colspan",s):t.removeAttr("colspan"),1<n-s?a.attr("colspan",n-s):a.removeAttr("colspan"),t.css("width",o.toFixed(4)+"%"),a.css("width",l.toFixed(4)+"%")}else{var h;for(h=0;h<c.length;h++)if(0===h||c[h][i.col]!=c[h-1][i.col]){var f=d(c[h][i.col]);if(!f.is(t)){var m=(parseInt(f.attr("colspan"),10)||1)+1;f.attr("colspan",m)}}o=o/r*100/2,t.css("width","".concat(o.toFixed(4),"%")),a.css("width","".concat(o.toFixed(4),"%"))}t[0].parentNode&&t[0].insertAdjacentElement("afterend",a[0]),O(),e.popups.hide("table.edit")}},splitCellHorizontally:function(){if(1==ee().length){var t=e.$el.find(".fr-selected-cell"),n=t.parent(),r=t.closest("table"),o=parseInt(t.attr("rowspan"),10),a=S(),c=T(t.get(0),a),i=t.clone().html("<br>");if(1<o){var s=Math.ceil(o/2);1<s?t.attr("rowspan",s):t.removeAttr("rowspan"),1<o-s?i.attr("rowspan",o-s):i.removeAttr("rowspan");for(var l=c.row+s,h=0===c.col?c.col:c.col-1;0<=h&&(a[l][h]==a[l][h-1]||0<l&&a[l][h]==a[l-1][h]);)h--;-1==h?d(r.find("tr").not(r.find("> table tr")).get(l)).prepend(i):d(a[l][h])[0].parentNode&&d(a[l][h])[0].insertAdjacentElement("afterend",i[0])}else{var f,m=d(document.createElement("tr")).append(i);for(f=0;f<a[0].length;f++)if(0===f||a[c.row][f]!=a[c.row][f-1]){var p=d(a[c.row][f]);p.is(t)||p.attr("rowspan",(parseInt(p.attr("rowspan"),10)||1)+1)}n[0].parentNode&&n[0].insertAdjacentElement("afterend",m[0])}O(),e.popups.hide("table.edit")}},addHeader:function(){var e=te();if(0<e.length&&0===e.find("th").length){var t,n="<thead><tr>",r=0;for(e.find("tr").first().find("> td").each((function(){var e=d(this);r+=parseInt(e.attr("colspan"),10)||1})),t=0;t<r;t++)n+="<th><br></th>";n+="</tr></thead>",e.prepend(n),u()}},removeHeader:function(){var t=te(),n=t.find("thead");if(0<n.length)if(0===t.find("tbody tr").length)v();else if(n.remove(),0<ee().length)u();else{e.popups.hide("table.edit");var r=t.find("tbody tr").first().find("td").first().get(0);r&&(e.selection.setAtEnd(r),e.selection.restore())}},setBackground:C,showInsertPopup:function(){var t=e.$tb.find('.fr-command[data-cmd="insertTable"]'),n=e.popups.get("table.insert");if(n||(n=f()),!n.hasClass("fr-active")){e.popups.refresh("table.insert"),e.popups.setContainer("table.insert",e.$tb);var r=e.button.getPosition(t),o=r.left,a=r.top;e.popups.show("table.insert",o,a,t.outerHeight())}},showEditPopup:u,showColorsPopup:s,back:function(){0<ee().length?u():(e.popups.hide("table.insert"),e.toolbar.showInline())},verticalAlign:function(t){e.$el.find(".fr-selected-cell").css("vertical-align",t)},horizontalAlign:function(t){e.$el.find(".fr-selected-cell").css("text-align",t)},applyStyle:function(t,n,r,o){if(0<n.length){if(e.opts.useClasses||("TABLE"===n.get(0).tagName?function e(t,n){var r=t.childNodes;if(0<r.length)for(var o=0;o<r.length;o++)"TD"===r[o].tagName?"fr-dashed-borders"===n||"fr-highlighted"===n||"fr-thick"===n?w(r[o]):"fr-alternate-rows"===n&&r[o].style.removeProperty("background-color"):e(r[o],n)}(n.get(0),t):w(n.get(0))),!r){var a=Object.keys(o);a.splice(a.indexOf(t),1),n.removeClass(a.join(" "))}n.toggleClass(t)}},selectedTable:te,selectedCells:ee,customColor:function(){var t=e.popups.get("table.colors").find(".fr-table-colors-hex-layer input");t.length&&C(t.val())},selectCells:L}},r.DefineIcon("insertTable",{NAME:"table",SVG_KEY:"insertTable"}),r.RegisterCommand("insertTable",{title:"Insert Table",undo:!1,focus:!0,refreshOnCallback:!1,popup:!0,callback:function(){this.popups.isVisible("table.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("table.insert")):this.table.showInsertPopup()},plugin:"table"}),r.RegisterCommand("tableInsert",{callback:function(e,t,n){this.table.insert(t,n),this.popups.hide("table.insert")}}),r.DefineIcon("tableHeader",{NAME:"header",FA5NAME:"heading",SVG_KEY:"tableHeader"}),r.RegisterCommand("tableHeader",{title:"Table Header",focus:!1,toggle:!0,callback:function(){this.popups.get("table.edit").find('.fr-command[data-cmd="tableHeader"]').hasClass("fr-active")?this.table.removeHeader():this.table.addHeader()},refresh:function(e){var t=this.table.selectedTable();0<t.length&&(0===t.find("th").length?e.removeClass("fr-active").attr("aria-pressed",!1):e.addClass("fr-active").attr("aria-pressed",!0))}}),r.DefineIcon("tableRows",{NAME:"bars",SVG_KEY:"row"}),r.RegisterCommand("tableRows",{type:"dropdown",focus:!1,title:"Row",options:{above:"Insert row above",below:"Insert row below",delete:"Delete row"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.tableRows.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableRows" data-param1="'+n+'" title="'+this.language.translate(t[n])+'">'+this.language.translate(t[n])+"</a></li>");return e+"</ul>"},callback:function(e,t){"above"==t||"below"==t?this.table.insertRow(t):this.table.deleteRow()}}),r.DefineIcon("tableColumns",{NAME:"bars fa-rotate-90",SVG_KEY:"columns"}),r.RegisterCommand("tableColumns",{type:"dropdown",focus:!1,title:"Column",options:{before:"Insert column before",after:"Insert column after",delete:"Delete column"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.tableColumns.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableColumns" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){"before"==t||"after"==t?this.table.insertColumn(t):this.table.deleteColumn()}}),r.DefineIcon("tableCells",{NAME:"square-o",FA5NAME:"square",SVG_KEY:"cellOptions"}),r.RegisterCommand("tableCells",{type:"dropdown",focus:!1,title:"Cell",options:{merge:"Merge cells","vertical-split":"Vertical split","horizontal-split":"Horizontal split"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.tableCells.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCells" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){"merge"==t?this.table.mergeCells():"vertical-split"==t?this.table.splitCellVertically():this.table.splitCellHorizontally()},refreshOnShow:function(e,t){1<this.$el.find(".fr-selected-cell").length?(t.find('a[data-param1="vertical-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="horizontal-split"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="merge"]').removeClass("fr-disabled").attr("aria-disabled",!1)):(t.find('a[data-param1="merge"]').addClass("fr-disabled").attr("aria-disabled",!0),t.find('a[data-param1="vertical-split"]').removeClass("fr-disabled").attr("aria-disabled",!1),t.find('a[data-param1="horizontal-split"]').removeClass("fr-disabled").attr("aria-disabled",!1))}}),r.DefineIcon("tableRemove",{NAME:"trash",SVG_KEY:"removeTable"}),r.RegisterCommand("tableRemove",{title:"Remove Table",focus:!1,callback:function(){this.table.remove()}}),r.DefineIcon("tableStyle",{NAME:"paint-brush",SVG_KEY:"tableStyle"}),r.RegisterCommand("tableStyle",{title:"Table Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableStyle" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell").closest("table"),this.opts.tableMultipleStyles,this.opts.tableStyles)},refreshOnShow:function(e,t){var n=this.$,r=this.$el.find(".fr-selected-cell").closest("table");r&&t.find(".fr-command").each((function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)}))}}),r.DefineIcon("tableCellBackground",{NAME:"tint",SVG_KEY:"cellBackground"}),r.RegisterCommand("tableCellBackground",{title:"Cell Background",focus:!1,popup:!0,callback:function(){this.table.showColorsPopup()}}),r.RegisterCommand("tableCellBackgroundColor",{undo:!0,focus:!1,callback:function(e,t){this.table.setBackground(t)}}),r.DefineIcon("tableBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("tableBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.table.back()},refresh:function(e){0!==this.table.selectedCells().length||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next(".fr-separator").removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next(".fr-separator").addClass("fr-hidden"))}}),r.DefineIcon("tableCellVerticalAlign",{NAME:"arrows-v",FA5NAME:"arrows-alt-v",SVG_KEY:"verticalAlignMiddle"}),r.RegisterCommand("tableCellVerticalAlign",{type:"dropdown",focus:!1,title:"Vertical Align",options:{Top:"Align Top",Middle:"Align Middle",Bottom:"Align Bottom"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.tableCellVerticalAlign.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellVerticalAlign" data-param1="'.concat(n.toLowerCase(),'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(n),"</a></li>"));return e+"</ul>"},callback:function(e,t){this.table.verticalAlign(t)},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.$el.find(".fr-selected-cell").css("vertical-align")+'"]').addClass("fr-active").attr("aria-selected",!0)}}),r.DefineIcon("tableCellHorizontalAlign",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),r.DefineIcon("align-center",{NAME:"align-center",SVG_KEY:"alignCenter"}),r.DefineIcon("align-justify",{NAME:"align-justify",SVG_KEY:"alignJustify"}),r.RegisterCommand("tableCellHorizontalAlign",{type:"dropdown",focus:!1,title:"Horizontal Align",options:{left:"Align Left",center:"Align Center",right:"Align Right",justify:"Align Justify"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.tableCellHorizontalAlign.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="tableCellHorizontalAlign" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.icon.create("align-".concat(n)),'<span class="fr-sr-only">').concat(this.language.translate(t[n]),"</span></a></li>"));return e+"</ul>"},callback:function(e,t){this.table.horizontalAlign(t)},refresh:function(e){var t=this.table.selectedCells(),n=this.$;t.length&&e.find("> *").first().replaceWith(this.icon.create("align-".concat(this.helpers.getAlignment(n(t[0])))))},refreshOnShow:function(e,t){t.find('.fr-command[data-param1="'+this.helpers.getAlignment(this.$el.find(".fr-selected-cell").first())+'"]').addClass("fr-active").attr("aria-selected",!0)}}),r.DefineIcon("tableCellStyle",{NAME:"magic",SVG_KEY:"cellStyle"}),r.RegisterCommand("tableCellStyle",{title:"Cell Style",type:"dropdown",focus:!1,html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=this.opts.tableCellStyles;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="tableCellStyle" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.language.translate(t[n]),"</a></li>"));return e+"</ul>"},callback:function(e,t){this.table.applyStyle(t,this.$el.find(".fr-selected-cell"),this.opts.tableCellMultipleStyles,this.opts.tableCellStyles)},refreshOnShow:function(e,t){var n=this.$,r=this.$el.find(".fr-selected-cell").first();r&&t.find(".fr-command").each((function(){var e=n(this).data("param1"),t=r.hasClass(e);n(this).toggleClass("fr-active",t).attr("aria-selected",t)}))}}),r.RegisterCommand("tableCellBackgroundCustomColor",{title:"OK",undo:!0,callback:function(){this.table.customColor()}}),r.DefineIcon("tableColorRemove",{NAME:"eraser",SVG_KEY:"remove"}),r.URLRegEx="(^| |\\u00A0)(".concat(r.LinkRegEx,"|([a-z0-9+-_.]{1,}@[a-z0-9+-_.]{1,}\\.[a-z0-9+-_]{1,}))$"),r.PLUGINS.url=function(i){var s=i.$,e=null;function t(t,n,r){for(var o="";r.length&&"."==r[r.length-1];)o+=".",r=r.substring(0,r.length-1);var a=r;if(i.opts.linkConvertEmailAddress)i.helpers.isEmail(a)&&!/^mailto:.*/i.test(a)&&(a="mailto:".concat(a));else if(i.helpers.isEmail(a))return n+r;return/^((http|https|ftp|ftps|mailto|tel|sms|notes|data)\:)/i.test(a)||(a="//".concat(a)),(n||"")+"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(e?' rel="'.concat(e,'"'):"",' data-fr-linked="true" href="').concat(a,'">').concat(r.replace(/&amp;/g,"&").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),"</a>").concat(o)}var n=function(){return new RegExp(r.URLRegEx,"gi")};function o(r){return i.opts.linkAlwaysNoFollow&&(e="nofollow"),i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(e?e+=" noopener":e="noopener"),i.opts.linkNoReferrer&&(e?e+=" noreferrer":e="noreferrer")),r.replace(n(),t)}function c(e){var t=e.split(" ");return t[t.length-1]}function l(){var e=i.selection.ranges(0),t=e.startContainer;if(!t||t.nodeType!==Node.TEXT_NODE||e.startOffset!==(t.textContent||"").length)return!1;if(function e(t){return!!t&&("A"===t.tagName||!(!t.parentNode||t.parentNode==i.el)&&e(t.parentNode))}(t))return!1;if(n().test(c(t.textContent))){s(t).before(o(t.textContent));var r=s(t.parentNode).find("a[data-fr-linked]");r.removeAttr("data-fr-linked"),t.parentNode.removeChild(t),i.events.trigger("url.linked",[r.get(0)])}else if(t.textContent.split(" ").length<=2&&t.previousSibling&&"A"===t.previousSibling.tagName){var l=t.previousSibling.innerText+t.textContent;if(n().test(c(l))){var a=(new DOMParser).parseFromString(o(l),"text/html").body.childNodes;t.parentNode.replaceChild(a[0],t.previousSibling),a.length&&s(t).before(a[0]),t.parentNode.removeChild(t)}}}return{_init:function(){i.events.on("keypress",(function(e){!i.selection.isCollapsed()||")"!=e.key&&"("!=e.key||l()}),!0),i.events.on("keydown",(function(e){var t=e.which;!i.selection.isCollapsed()||t!=r.KEYCODE.ENTER&&t!=r.KEYCODE.SPACE||l()}),!0),i.events.on("paste.beforeCleanup",(function(e){if(i.helpers.isURL(e)){var t=null;return i.opts.linkAlwaysBlank&&(i.opts.linkNoOpener&&(t?t+=" noopener":t="noopener"),i.opts.linkNoReferrer&&(t?t+=" noreferrer":t="noreferrer")),"<a".concat(i.opts.linkAlwaysBlank?' target="_blank"':"").concat(t?' rel="'.concat(t,'"'):"",' href="').concat(e,'" >').concat(e,"</a>")}}))}}},Object.assign(r.POPUP_TEMPLATES,{"video.insert":"[_BUTTONS_][_BY_URL_LAYER_][_EMBED_LAYER_][_UPLOAD_LAYER_][_PROGRESS_BAR_]","video.edit":"[_BUTTONS_]","video.size":"[_BUTTONS_][_SIZE_LAYER_]"}),Object.assign(r.DEFAULTS,{videoAllowedTypes:["mp4","webm","ogg","mp3","mpeg","url"],videoAllowedProviders:[".*"],videoDefaultAlign:"center",videoDefaultDisplay:"block",videoDefaultWidth:600,videoEditButtons:["videoReplace","videoRemove","videoDisplay","videoAlign","videoSize","autoplay"],videoInsertButtons:["videoBack","|","videoByURL","videoEmbed","videoUpload"],videoMaxSize:52428800,videoMove:!0,videoResize:!0,videoResponsive:!1,videoSizeButtons:["videoBack","|"],videoSplitHTML:!1,videoTextNear:!0,videoUpload:!0,videoUploadMethod:"POST",videoUploadParam:"file",videoUploadParams:{},videoUploadToS3:!1,videoUploadToAzure:!1,videoUploadURL:null}),r.VIDEO_PROVIDERS=[{test_regex:/^.*((youtu.be)|(youtube.com))\/((v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))?\??v?=?([^#\&\?]*).*/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:m\.)?(?:youtube\.com|youtu\.be)\/(?:watch\?v=|embed\/)?([0-9a-zA-Z_\-]+)(.+)?/g,url_text:"https://www.youtube.com/embed/$1?$2",html:'<iframe width="640" height="360" src="{url}&wmode=opaque&rel=0" frameborder="0" allowfullscreen></iframe>',provider:"youtube"},{test_regex:/^.*(?:vimeo.com)\/(?:channels(\/\w+\/)?|groups\/*\/videos\/\u200b\d+\/|video\/|)(\d+)(?:$|\/|\?)/,url_regex:/(?:https?:\/\/)?(?:www\.|player\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/(?:[^\/]*)\/videos\/|album\/(?:\d+)\/video\/|video\/|)(\d+)(?:[a-zA-Z0-9_\-]+)?(\/[a-zA-Z0-9_\-]+)?/i,url_text:"https://player.vimeo.com/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vimeo"},{test_regex:/^.+(dailymotion.com|dai.ly)\/(video|hub)?\/?([^_]+)[^#]*(#video=([^_&]+))?/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:dailymotion\.com|dai\.ly)\/(?:video|hub)?\/?(.+)/g,url_text:"https://www.dailymotion.com/embed/video/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"dailymotion"},{test_regex:/^.+(screen.yahoo.com)\/[^_&]+/,url_regex:"",url_text:"",html:'<iframe width="640" height="360" src="{url}?format=embed" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"yahoo"},{test_regex:/^.+(rutube.ru)\/[^_&]+/,url_regex:/(?:https?:\/\/)?(?:www\.)?(?:rutube\.ru)\/(?:video)?\/?(.+)/g,url_text:"https://rutube.ru/play/embed/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen="true" mozallowfullscreen="true" webkitallowfullscreen="true" allowtransparency="true"></iframe>',provider:"rutube"},{test_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/,url_regex:/^(?:.+)vidyard.com\/(?:watch)?\/?([^.&/]+)\/?(?:[^_.&]+)?/g,url_text:"https://play.vidyard.com/$1",html:'<iframe width="640" height="360" src="{url}" frameborder="0" allowfullscreen></iframe>',provider:"vidyard"}],r.VIDEO_EMBED_REGEX=/^\W*((<iframe(.|\n)*>(\s|\n)*<\/iframe>)|(<embed(.|\n)*>))\W*$/i,r.PLUGINS.video=function(e){var s,t,n,o,c,l,d=e.$,h="https://i.froala.com/upload",p=2,u=3,f=4,m=5,v=6,a={};function g(){var t=e.popups.get("video.insert");t.find(".fr-video-by-url-layer input").val("").trigger("change");var n=t.find(".fr-video-embed-layer textarea");n.val("").trigger("change"),(n=t.find(".fr-video-upload-layer input")).val("").trigger("change")}function _(){var t=e.popups.get("video.edit");if(t||(t=function(){var t="";if(0<e.opts.videoEditButtons.length){e.opts.videoResponsive&&(-1<e.opts.videoEditButtons.indexOf("videoSize")&&e.opts.videoEditButtons.splice(e.opts.videoEditButtons.indexOf("videoSize"),1),-1<e.opts.videoEditButtons.indexOf("videoDisplay")&&e.opts.videoEditButtons.splice(e.opts.videoEditButtons.indexOf("videoDisplay"),1),-1<e.opts.videoEditButtons.indexOf("videoAlign")&&e.opts.videoEditButtons.splice(e.opts.videoEditButtons.indexOf("videoAlign"),1));var n={buttons:t+='<div class="fr-buttons"> \n      '.concat(e.button.buildList(e.opts.videoEditButtons)," \n      </div>")},r=e.popups.create("video.edit",n);return e.events.$on(e.$wp,"scroll.video-edit",(function(){o&&e.popups.isVisible("video.edit")&&(e.events.disableBlur(),A(o))})),r}return!1}()),t){e.popups.setContainer("video.edit",e.$sc),e.popups.refresh("video.edit");var n=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video")),r=n.offset().left+n.outerWidth()/2,c=n.offset().top+n.outerHeight(),a=n.get(0).src?n.get(0).src:n.get(0).currentSrc,l=!(!(a=(a=a.split("."))[a.length-1]).includes("pdf")&&!a.includes("txt"));n.hasClass("fr-file")||l||o.find("audio").get(0)?(document.getElementById("autoplay-".concat(e.id))&&(document.getElementById("autoplay-".concat(e.id)).style.display="none"),document.getElementById("videoReplace-".concat(e.id))&&(document.getElementById("videoReplace-".concat(e.id)).style.display="none")):(document.getElementById("autoplay-".concat(e.id))&&(document.getElementById("autoplay-".concat(e.id)).style.display=""),document.getElementById("videoReplace-".concat(e.id))&&(document.getElementById("videoReplace-".concat(e.id)).style.display="")),e.popups.show("video.edit",r,c,n.outerHeight(),!0)}}function i(t){if(t)return e.popups.onRefresh("video.insert",g),e.popups.onHide("video.insert",Z),!0;var n="";e.opts.videoUpload||-1===e.opts.videoInsertButtons.indexOf("videoUpload")||e.opts.videoInsertButtons.splice(e.opts.videoInsertButtons.indexOf("videoUpload"),1);var r=e.button.buildList(e.opts.videoInsertButtons);""!==r&&(n='<div class="fr-buttons">'+r+"</div>");var o,a="",c=e.opts.videoInsertButtons.indexOf("videoUpload"),i=e.opts.videoInsertButtons.indexOf("videoByURL"),s=e.opts.videoInsertButtons.indexOf("videoEmbed");0<=i&&(o=" fr-active",(c<i&&0<=c||s<i&&0<=s)&&(o=""),a='<div class="fr-video-by-url-layer fr-layer'.concat(o,'" id="fr-video-by-url-layer-').concat(e.id,'"><div class="fr-input-line"><input id="fr-video-by-url-layer-text-').concat(e.id,'" type="text" placeholder="').concat(e.language.translate("Paste in a video URL"),'" tabIndex="1" aria-required="true"></div><div class="fr-action-buttons"><span style=\'float:left\'><div class="fr-checkbox-line fr-autoplay-margin"><span class="fr-checkbox"> <input id=\'videoPluginAutoplay\' data-checked="_blank" type="checkbox"> <span>').concat('<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="10" height="10" viewBox="0 0 32 32"><path d="M27 4l-15 15-7-7-5 5 12 12 20-20z" fill="#FFF"></path></svg>','</span></span> <label id="fr-label-target-').concat(e.id,'">Autoplay</label></div> </span><button type="button" class="fr-command fr-submit" data-cmd="videoInsertByURL" tabIndex="2" role="button">').concat(e.language.translate("Insert"),"</button></div></div>"));var l="";0<=s&&(o=" fr-active",(c<s&&0<=c||i<s&&0<=i)&&(o=""),l='<div class="fr-video-embed-layer fr-layer'.concat(o,'" id="fr-video-embed-layer-').concat(e.id,'"><div class="fr-input-line"><textarea id="fr-video-embed-layer-text').concat(e.id,'" type="text" placeholder="').concat(e.language.translate("Embedded Code"),'" tabIndex="1" aria-required="true" rows="5"></textarea></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoInsertEmbed" tabIndex="2" role="button">').concat(e.language.translate("Insert"),"</button></div></div>"));var h="";0<=c&&(o=" fr-active",(s<c&&0<=s||i<c&&0<=i)&&(o=""),h='<div class="fr-video-upload-layer fr-layer'.concat(o,'" id="fr-video-upload-layer-').concat(e.id,'"><strong>').concat(e.language.translate("Drop video"),"</strong><br>(").concat(e.language.translate("or click"),')<div class="fr-form"><input type="file" accept="video/').concat(e.opts.videoAllowedTypes.join(", video/").toLowerCase(),'" tabIndex="-1" aria-labelledby="fr-video-upload-layer-').concat(e.id,'" role="button"></div></div>'));var f={buttons:n,by_url_layer:a,embed_layer:l,upload_layer:h,progress_bar:'<div class="fr-video-progress-bar-layer fr-layer"><h3 tabIndex="-1" class="fr-message">Uploading</h3><div class="fr-loader"><span class="fr-progress"></span></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-dismiss" data-cmd="videoDismissError" tabIndex="2" role="button">OK</button></div></div>'},m=e.popups.create("video.insert",f);return function(t){e.events.$on(t,"dragover dragenter",".fr-video-upload-layer",(function(){return d(this).addClass("fr-drop"),!1}),!0),e.events.$on(t,"dragleave dragend",".fr-video-upload-layer",(function(){return d(this).removeClass("fr-drop"),!1}),!0),e.events.$on(t,"drop",".fr-video-upload-layer",(function(n){n.preventDefault(),n.stopPropagation(),d(this).removeClass("fr-drop");var r=n.originalEvent.dataTransfer;if(r&&r.files){var o=t.data("instance")||e;o.events.disableBlur(),o.video.upload(r.files),o.events.enableBlur()}}),!0),e.helpers.isIOS()&&e.events.$on(t,"touchstart",'.fr-video-upload-layer input[type="file"]',(function(){d(this).trigger("click")}),!0),e.events.$on(t,"change",'.fr-video-upload-layer input[type="file"]',(function(){if(this.files){var n=t.data("instance")||e;n.events.disableBlur(),t.find("input:focus").blur(),n.events.enableBlur(),n.video.upload(this.files)}d(this).val("")}),!0)}(m),m}function y(t){e.events.focus(!0),e.selection.restore();var n=!1;if(o&&(X(),n=!0),e.opts.trackChangesEnabled){e.edit.on(),e.events.focus(!0),e.selection.restore(),e.undo.saveStep(),e.markers.insert(),e.html.wrap();var r=e.$el.find(".fr-marker");e.node.isLastSibling(r)&&r.parent().hasClass("fr-deletable")&&r.insertAfter(r.parent()),r.replaceWith('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(t,"</span>")),e.selection.clear()}else e.html.insert('<span contenteditable="false" draggable="true" class="fr-jiv fr-video fr-deletable">'.concat(t,"</span>"),!1,e.opts.videoSplitHTML);e.popups.hide("video.insert");var c=e.$el.find(".fr-jiv");c.removeClass("fr-jiv"),c.toggleClass("fr-rv",e.opts.videoResponsive),Q(c,e.opts.videoDefaultDisplay,e.opts.videoDefaultAlign),c.toggleClass("fr-draggable",e.opts.videoMove),e.events.trigger(n?"video.replaced":"video.inserted",[c])}function E(){var t=d(this);e.popups.hide("video.insert"),t.removeClass("fr-uploading"),t.parent().next().is("br")&&t.parent().next().remove(),A(t.parent()),e.events.trigger("video.loaded",[t.parent()])}function C(s,t,n,r,o){e.edit.off(),T("Loading video"),t&&(s=e.helpers.sanitizeURL(s));var c=function(){var t,c;if(r){e.undo.canDo()||r.find("video").hasClass("fr-uploading")||e.undo.saveStep();var l=r.find("video").data("fr-old-src"),d=r.data("fr-replaced");if(r.data("fr-replaced",!1),0<r.find("iframe").length)r.remove(),t=N(s,n,E);else{e.$wp?((t=r.clone(!0)).find("video").removeData("fr-old-src").removeClass("fr-uploading"),t.find("video").off("canplay"),l&&r.find("video").attr("src",l),r.replaceWith(t)):t=r;for(var a=t.find("video").get(0).attributes,h=0;h<a.length;h++){var i=a[h];0===i.nodeName.indexOf("data-")&&t.find("video").removeAttr(i.nodeName)}if(void 0!==n)for(c in n)n.hasOwnProperty(c)&&"link"!=c&&t.find("video").attr("data-".concat(c),n[c]);t.find("video").on("canplay",E),t.find("video").attr("src",s)}e.edit.on(),U(),e.undo.saveStep(),e.$el.blur(),e.events.trigger(d?"video.replaced":"video.inserted",[t,o])}else t=N(s,n,E),U(),e.undo.saveStep(),e.events.trigger("video.inserted",[t,o])};w("Loading video"),c()}function w(t){var n=e.popups.get("video.insert");if(n||(n=i()),n.find(".fr-layer.fr-active").removeClass("fr-active").addClass("fr-pactive"),n.find(".fr-video-progress-bar-layer").addClass("fr-active"),n.find(".fr-buttons").hide(),o){var r=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video"));e.popups.setContainer("video.insert",e.$sc);var c=r.offset().left,a=r.offset().top+r.height();e.popups.show("video.insert",c,a,r.outerHeight())}void 0===t&&T(e.language.translate("Uploading"),0)}function S(t){var n=e.popups.get("video.insert");if(n&&(n.find(".fr-layer.fr-pactive").addClass("fr-active").removeClass("fr-pactive"),n.find(".fr-video-progress-bar-layer").removeClass("fr-active"),n.find(".fr-buttons").show(),t||e.$el.find("video.fr-error").length)){if(e.events.focus(),e.$el.find("video.fr-error").length&&(e.$el.find("video.fr-error").parent().remove(),e.undo.saveStep(),e.undo.run(),e.undo.dropRedo()),!e.$wp&&o){var r=o;V(!0),e.selection.setAfter(r.find("video").get(0)),e.selection.restore()}e.popups.hide("video.insert")}}function T(t,n){var r=e.popups.get("video.insert");if(r){var o=r.find(".fr-video-progress-bar-layer");o.find("h3").text(t+(n?" ".concat(n,"%"):"")),o.removeClass("fr-error"),n?(o.find("div").removeClass("fr-indeterminate"),o.find("div > span").css("width","".concat(n,"%"))):o.find("div").addClass("fr-indeterminate")}}function b(t){w();var n=e.popups.get("video.insert").find(".fr-video-progress-bar-layer");n.addClass("fr-error");var r=n.find("h3");r.text(t),e.events.disableBlur(),r.focus()}function A(e){F.call(e.get(0))}function R(t,n,r){T("Loading video");var o=this.status,a=this.response,c=this.responseXML,i=this.responseText;try{if(e.opts.videoUploadToS3||e.opts.videoUploadToAzure)if(201==o){var s;if(e.opts.videoUploadToAzure){if(!1===e.events.trigger("video.uploadedToAzure",[this.responseURL,r,a],!0))return e.edit.on(),!1;s=n}else s=function(t){try{var n=d(t).find("Location").text(),r=d(t).find("Key").text();return!1===e.events.trigger("video.uploadedToS3",[n,r,t],!0)?(e.edit.on(),!1):n}catch(e){return W(f,t),!1}}(c);s&&C(s,!1,[],t,a||c)}else W(f,a||c);else if(200<=o&&o<300){var l=function(t){try{if(!1===e.events.trigger("video.uploaded",[t],!0))return e.edit.on(),!1;var n=JSON.parse(t);return n.link?n:(W(p,t),!1)}catch(e){return W(f,t),!1}}(i);l&&C(l.link,!1,l,t,a||i)}else W(u,a||i)}catch(e){W(f,a||i)}}function O(){W(f,this.response||this.responseText||this.responseXML)}function I(t){if(t.lengthComputable){var n=t.loaded/t.total*100|0;T(e.language.translate("Uploading"),n)}}function k(){e.edit.on(),S(!0)}function N(t,n,r){var o,a="";if(n&&void 0!==n)for(o in n)n.hasOwnProperty(o)&&"link"!=o&&(a+=" data-".concat(o,'="').concat(n[o],'"'));var c=e.opts.videoDefaultWidth;c&&"auto"!=c&&(c="".concat(c,"px")),e.helpers.isMobile()&&e.browser.safari&&(a+=" autoplay playsinline");var i=d(document.createElement("span")).attr("contenteditable","false").attr("draggable","true").attr("class","fr-video fr-dv"+e.opts.videoDefaultDisplay[0]+("center"!=e.opts.videoDefaultAlign?" fr-fv"+e.opts.videoDefaultAlign[0]:"")).html('<video src="'+t+'" '+a+(c?' style="width: '+c+';" ':"")+" controls>"+e.language.translate("Your browser does not support HTML5 video.")+"</video>");i.toggleClass("fr-draggable",e.opts.videoMove),e.edit.on(),e.events.focus(!0),e.selection.restore(),e.undo.saveStep(),e.opts.videoSplitHTML?e.markers.split():(e.cursor.enter(),e.markers.insert()),e.html.wrap();var s=e.$el.find(".fr-marker");return e.node.isLastSibling(s)&&s.parent().hasClass("fr-deletable")&&s.insertAfter(s.parent()),s.replaceWith(i),e.selection.clear(),i.find("video").get(0).readyState>i.find("video").get(0).HAVE_FUTURE_DATA||e.helpers.isIOS()?r.call(i.find("video").get(0)):i.find("video").on("canplaythrough load",r),i}function L(r){if(!e.core.sameInstance(n))return!0;r.preventDefault(),r.stopPropagation();var o=r.pageX||(r.originalEvent.touches?r.originalEvent.touches[0].pageX:null),c=r.pageY||(r.originalEvent.touches?r.originalEvent.touches[0].pageY:null);if(!o||!c)return!1;if("mousedown"==r.type){var l=e.$oel.get(0).ownerDocument,a=l.defaultView||l.parentWindow,h=!1;try{h=a.location!=a.parent.location&&!(a.$&&a.$.FE)}catch(e){}h&&a.frameElement&&(o+=e.helpers.getPX(d(a.frameElement).offset().left)+a.frameElement.clientLeft,c=r.clientY+e.helpers.getPX(d(a.frameElement).offset().top)+a.frameElement.clientTop)}e.undo.canDo()||e.undo.saveStep(),(t=d(this)).data("start-x",o),t.data("start-y",c),s.show(),e.popups.hideAll(),H()}function M(r){if(!e.core.sameInstance(n))return!0;if(t){r.preventDefault();var c=r.pageX||(r.originalEvent.touches?r.originalEvent.touches[0].pageX:null),l=r.pageY||(r.originalEvent.touches?r.originalEvent.touches[0].pageY:null);if(!c||!l)return!1;var d=t.data("start-x"),a=t.data("start-y");t.data("start-x",c),t.data("start-y",l);var h=c-d,i=l-a,s=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video")),f=s.width(),m=s.height();(t.hasClass("fr-hnw")||t.hasClass("fr-hsw"))&&(h=0-h),(t.hasClass("fr-hnw")||t.hasClass("fr-hne"))&&(i=0-i),s.css("width",f+h),s.css("height",m+i),s.removeAttr("width"),s.removeAttr("height"),B()}}function x(r){if(!e.core.sameInstance(n))return!0;t&&o&&(r&&r.stopPropagation(),t=null,s.hide(),B(),_(),e.undo.saveStep())}function D(e){return'<div class="fr-handler fr-h'.concat(e,'"></div>')}function P(e,t,n,r){return e.pageX=t,e.pageY=t,L.call(this,e),e.pageX=e.pageX+n*Math.floor(Math.pow(1.1,r)),e.pageY=e.pageY+n*Math.floor(Math.pow(1.1,r)),M.call(this,e),x.call(this,e),++r}function U(){var t,n=Array.prototype.slice.call(e.el.querySelectorAll("video, .fr-video > *")),r=[];for(t=0;t<n.length;t++)r.push(n[t].getAttribute("src")),d(n[t]).toggleClass("fr-draggable",e.opts.videoMove),""===n[t].getAttribute("class")&&n[t].removeAttribute("class"),""===n[t].getAttribute("style")&&n[t].removeAttribute("style");if(c)for(t=0;t<c.length;t++)r.indexOf(c[t].getAttribute("src"))<0&&e.events.trigger("video.removed",[d(c[t])]);c=n}function B(){n||function(){var t;if(e.shared.$video_resizer?(n=e.shared.$video_resizer,s=e.shared.$vid_overlay,e.events.on("destroy",(function(){d("body").first().append(n.removeClass("fr-active"))}),!0)):(e.shared.$video_resizer=d(document.createElement("div")).attr("class","fr-video-resizer"),n=e.shared.$video_resizer,e.events.$on(n,"mousedown",(function(e){e.stopPropagation()}),!0),e.opts.videoResize&&(n.append(D("nw")+D("ne")+D("sw")+D("se")),e.shared.$vid_overlay=d(document.createElement("div")).attr("class","fr-video-overlay"),s=e.shared.$vid_overlay,t=n.get(0).ownerDocument,d(t).find("body").first().append(s))),e.events.on("shared.destroy",(function(){n.html("").removeData().remove(),n=null,e.opts.videoResize&&(s.remove(),s=null)}),!0),e.helpers.isMobile()||e.events.$on(d(e.o_win),"resize.video",(function(){V(!0)})),e.opts.videoResize){t=n.get(0).ownerDocument,e.events.$on(n,e._mousedown,".fr-handler",L),e.events.$on(d(t),e._mousemove,M),e.events.$on(d(t.defaultView||t.parentWindow),e._mouseup,x),e.events.$on(s,"mouseleave",x);var c=1,a=null,l=0;e.events.on("keydown",(function(t){if(o){var n=-1!=navigator.userAgent.indexOf("Mac OS X")?t.metaKey:t.ctrlKey,d=t.which;(d!==a||200<t.timeStamp-l)&&(c=1),(d==r.KEYCODE.EQUALS||e.browser.mozilla&&d==r.KEYCODE.FF_EQUALS)&&n&&!t.altKey?c=P.call(this,t,1,1,c):(d==r.KEYCODE.HYPHEN||e.browser.mozilla&&d==r.KEYCODE.FF_HYPHEN)&&n&&!t.altKey&&(c=P.call(this,t,2,-1,c)),a=d,l=t.timeStamp}})),e.events.on("keyup",(function(){c=1}))}}(),(e.$wp||e.$sc).append(n),n.data("instance",e);var t=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video")),c=0,l=0;e.opts.iframe&&(l=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),c=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"))),n.css("top",(e.opts.iframe?t.offset().top+l-1:t.offset().top-e.$wp.offset().top-1)+e.$wp.scrollTop()).css("left",(e.opts.iframe?t.offset().left+c-1:t.offset().left-e.$wp.offset().left-1)+e.$wp.scrollLeft()).css("width",t.get(0).getBoundingClientRect().width).css("height",t.get(0).getBoundingClientRect().height).addClass("fr-active")}function F(t){if(t&&"touchend"==t.type&&l)return!0;if(t&&e.edit.isDisabled())return t.stopPropagation(),t.preventDefault(),!1;if(e.edit.isDisabled())return!1;for(var n=0;n<r.INSTANCES.length;n++)r.INSTANCES[n]!=e&&r.INSTANCES[n].events.trigger("video.hideResizer");e.toolbar.disable(),e.helpers.isMobile()&&(e.events.disableBlur(),e.$el.blur(),e.events.enableBlur()),e.$el.find(".fr-video.fr-active").removeClass("fr-active"),(o=d(this)).addClass("fr-active"),e.opts.iframe&&e.size.syncIframe(),te(),B(),_(),e.selection.clear(),e.button.bulkRefresh(),e.events.trigger("image.hideResizer")}function V(t){o&&(e.shared.vid_exit_flag||!0===t)&&(n.removeClass("fr-active"),e.toolbar.enable(),o.removeClass("fr-active"),o=null,H())}function j(){e.shared.vid_exit_flag=!0}function H(){e.shared.vid_exit_flag=!1}function $(t){var n=t.originalEvent.dataTransfer;if(n&&n.files&&n.files.length){var o=n.files[0];if(o&&o.type&&-1!==o.type.indexOf("video")){if(!e.opts.videoUpload)return t.preventDefault(),t.stopPropagation(),!1;e.markers.remove(),e.markers.insertAtPoint(t.originalEvent),e.$el.find(".fr-marker").replaceWith(r.MARKERS),e.popups.hideAll();var c=e.popups.get("video.insert");return c||(c=i()),e.popups.setContainer("video.insert",e.$sc),e.popups.show("video.insert",t.originalEvent.pageX,t.originalEvent.pageY),w(),0<=e.opts.videoAllowedTypes.indexOf(o.type.replace(/video\//g,""))?z(n.files):W(v),t.preventDefault(),t.stopPropagation(),!1}}}function z(t){if(void 0!==t&&0<t.length){if(!1===e.events.trigger("video.beforeUpload",[t]))return!1;var n,r=t[0];if(!(null!==e.opts.videoUploadURL&&e.opts.videoUploadURL!=h||e.opts.videoUploadToS3||e.opts.videoUploadToAzure))return function(e){o&&o.find("iframe")&&o.find("iframe").length&&X();var a=new FileReader;a.onload=function(){a.result;for(var t=atob(a.result.split(",")[1]),n=[],r=0;r<t.length;r++)n.push(t.charCodeAt(r));C(window.URL.createObjectURL(new Blob([new Uint8Array(n)],{type:e.type})),!1,null,o)},w(),a.readAsDataURL(e)}(r),!1;if(r.size>e.opts.videoMaxSize)return W(m),!1;if(e.opts.videoAllowedTypes.indexOf(r.type.replace(/video\//g,""))<0)return W(v),!1;if(e.drag_support.formdata&&(n=e.drag_support.formdata?new FormData:null),n){var c;if(!1!==e.opts.videoUploadToS3)for(c in n.append("key",e.opts.videoUploadToS3.keyStart+(new Date).getTime()+"-"+(r.name||"untitled")),n.append("success_action_status","201"),n.append("X-Requested-With","xhr"),n.append("Content-Type",r.type),e.opts.videoUploadToS3.params)e.opts.videoUploadToS3.params.hasOwnProperty(c)&&n.append(c,e.opts.videoUploadToS3.params[c]);for(c in e.opts.videoUploadParams)e.opts.videoUploadParams.hasOwnProperty(c)&&n.append(c,e.opts.videoUploadParams[c]);n.append(e.opts.videoUploadParam,r);var a,l,i=e.opts.videoUploadURL;e.opts.videoUploadToS3&&(i=e.opts.videoUploadToS3.uploadURL?e.opts.videoUploadToS3.uploadURL:"https://".concat(e.opts.videoUploadToS3.region,".amazonaws.com/").concat(e.opts.videoUploadToS3.bucket));var s=e.opts.videoUploadMethod;e.opts.videoUploadToAzure&&(i=e.opts.videoUploadToAzure.uploadURL?"".concat(e.opts.videoUploadToAzure.uploadURL,"/").concat(r.name):encodeURI("https://".concat(e.opts.videoUploadToAzure.account,".blob.core.windows.net/").concat(e.opts.videoUploadToAzure.container,"/").concat(r.name)),a=i,e.opts.videoUploadToAzure.SASToken&&(i+=e.opts.videoUploadToAzure.SASToken),s="PUT");var f=e.core.getXHR(i,s);if(e.opts.videoUploadToAzure){var _=(new Date).toUTCString();if(!e.opts.videoUploadToAzure.SASToken&&e.opts.videoUploadToAzure.accessKey){var y=e.opts.videoUploadToAzure.account,E=e.opts.videoUploadToAzure.container;if(e.opts.videoUploadToAzure.uploadURL){var p=e.opts.videoUploadToAzure.uploadURL.split("/");E=p.pop(),y=p.pop().split(".")[0]}var u="x-ms-blob-type:BlockBlob\nx-ms-date:".concat(_,"\nx-ms-version:2019-07-07"),S=encodeURI("/"+y+"/"+E+"/"+r.name),g=s+"\n\n\n"+r.size+"\n\n"+r.type+"\n\n\n\n\n\n\n"+u+"\n"+S,T=e.cryptoJSPlugin.cryptoJS.HmacSHA256(g,e.cryptoJSPlugin.cryptoJS.enc.Base64.parse(e.opts.videoUploadToAzure.accessKey)).toString(e.cryptoJSPlugin.cryptoJS.enc.Base64),A="SharedKey "+y+":"+T;l=T,f.setRequestHeader("Authorization",A)}for(c in f.setRequestHeader("x-ms-version","2019-07-07"),f.setRequestHeader("x-ms-date",_),f.setRequestHeader("Content-Type",r.type),f.setRequestHeader("x-ms-blob-type","BlockBlob"),e.opts.videoUploadParams)e.opts.videoUploadParams.hasOwnProperty(c)&&f.setRequestHeader(c,e.opts.videoUploadParams[c]);for(c in e.opts.videoUploadToAzure.params)e.opts.videoUploadToAzure.params.hasOwnProperty(c)&&f.setRequestHeader(c,e.opts.videoUploadToAzure.params[c])}f.onload=function(){R.call(f,o,a,l)},f.onerror=O,f.upload.onprogress=I,f.onabort=k,w(),e.events.disableBlur(),e.edit.off(),e.events.enableBlur();var b=e.popups.get("video.insert");b&&d(b.off("abortUpload")).on("abortUpload",(function(){4!=f.readyState&&f.abort()})),f.send(e.opts.videoUploadToAzure?r:n)}}}function W(t,n){e.edit.on(),o&&o.find("video").addClass("fr-error"),b(e.language.translate("Something went wrong. Please try again.")),e.events.trigger("video.error",[{code:t,message:a[t]},n])}function K(){if(o){var t=e.popups.get("video.size"),n=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video"));t.find('input[name="width"]').val(n.get(0).style.width||n.attr("width")).trigger("change"),t.find('input[name="height"]').val(n.get(0).style.height||n.attr("height")).trigger("change")}}function G(t){if(t)return e.popups.onRefresh("video.size",K),!0;var n={buttons:'<div class="fr-buttons fr-tabs">'.concat(e.button.buildList(e.opts.videoSizeButtons),"</div>"),size_layer:'<div class="fr-video-size-layer fr-layer fr-active" id="fr-video-size-layer-'.concat(e.id,'"><div class="fr-video-group"><div class="fr-input-line"><input id="fr-video-size-layer-width-').concat(e.id,'" type="text" name="width" placeholder="').concat(e.language.translate("Width"),'" tabIndex="1"></div><div class="fr-input-line"><input id="fr-video-size-layer-height-').concat(e.id,'" type="text" name="height" placeholder="').concat(e.language.translate("Height"),'" tabIndex="1"></div></div><div class="fr-action-buttons"><button type="button" class="fr-command fr-submit" data-cmd="videoSetSize" tabIndex="2" role="button">').concat(e.language.translate("Update"),"</button></div></div>")},r=e.popups.create("video.size",n);return e.events.$on(e.$wp,"scroll",(function(){o&&e.popups.isVisible("video.size")&&(e.events.disableBlur(),A(o))})),r}function Y(e){if(void 0===e&&(e=o),e){if(e.hasClass("fr-fvl"))return"left";if(e.hasClass("fr-fvr"))return"right";if(e.hasClass("fr-dvb")||e.hasClass("fr-dvi"))return"center";if("block"==e.css("display")){if("left"==e.css("text-algin"))return"left";if("right"==e.css("text-align"))return"right"}else{if("left"==e.css("float"))return"left";if("right"==e.css("float"))return"right"}}return"center"}function q(e){void 0===e&&(e=o);var t=e.css("float");return e.css("float","none"),"block"==e.css("display")?(e.css("float",""),e.css("float")!=t&&e.css("float",t),"block"):(e.css("float",""),e.css("float")!=t&&e.css("float",t),"inline")}function X(){if(o&&!1!==e.events.trigger("video.beforeRemove",[o])){var t=o;if(e.popups.hideAll(),V(!0),e.opts.trackChangesEnabled&&(!t[0].parentNode||"SPAN"!==t[0].parentNode.tagName||!t[0].parentNode.hasAttribute("data-tracking")))return void e.track_changes.removeSpecialItem(t);e.selection.setBefore(t.get(0))||e.selection.setAfter(t.get(0)),t.remove(),e.selection.restore(),e.html.fillEmptyBlocks()}}function Z(){S()}function Q(t,n,r){!e.opts.htmlUntouched&&e.opts.useClasses?(t.removeClass("fr-fvl fr-fvr fr-dvb fr-dvi"),t.addClass("fr-fv".concat(r[0]," fr-dv").concat(n[0]))):"inline"==n?(t.css({display:"inline-block"}),"center"==r?t.css({float:"none"}):"left"==r?t.css({float:"left"}):t.css({float:"right"})):(t.css({display:"block",clear:"both"}),"left"==r?t.css({textAlign:"left"}):"right"==r?t.css({textAlign:"right"}):t.css({textAlign:"center"}))}function J(){var t=e.$el.find("video").filter((function(){return 0===d(this).parents("span.fr-video").length}));if(0!=t.length){t.wrap(d(document.createElement("span")).attr("class","fr-video fr-deletable").attr("contenteditable","false")),e.$el.find("embed, iframe").filter((function(){if(e.browser.safari&&this.getAttribute("src")&&this.setAttribute("src",this.src),0<d(this).parents("span.fr-video").length)return!1;for(var t=d(this).attr("src"),n=0;n<r.VIDEO_PROVIDERS.length;n++){var o=r.VIDEO_PROVIDERS[n];if(o.test_regex.test(t)&&new RegExp(e.opts.videoAllowedProviders.join("|")).test(o.provider))return!0}return!1})).map((function(){return 0===d(this).parents("object").length?this:d(this).parents("object").get(0)})).wrap(d(document.createElement("span")).attr("class","fr-video").attr("contenteditable","false"));for(var n,o,c,a,l=e.$el.find("span.fr-video, video"),i=0;i<l.length;i++){var s=d(l[i]);!e.opts.htmlUntouched&&e.opts.useClasses?((a=s).hasClass("fr-dvi")||a.hasClass("fr-dvb")||(a.addClass("fr-fv".concat(Y(a)[0])),a.addClass("fr-dv".concat(q(a)[0]))),e.opts.videoTextNear||s.removeClass("fr-dvi").addClass("fr-dvb")):e.opts.htmlUntouched||e.opts.useClasses||(o=(n=s).hasClass("fr-dvb")?"block":n.hasClass("fr-dvi")?"inline":null,c=n.hasClass("fr-fvl")?"left":n.hasClass("fr-fvr")?"right":Y(n),Q(n,o,c),n.removeClass("fr-dvb fr-dvi fr-fvr fr-fvl"))}l.toggleClass("fr-draggable",e.opts.videoMove)}}function ee(t){document.getElementById("autoplay-".concat(e.id)).style.cssText="background:".concat(t)}function te(){if(o){e.selection.clear();var t=e.doc.createRange();t.selectNode(o.get(0)),e.selection.get().addRange(t)}}return a[1]="Video cannot be loaded from the passed link.",a[p]="No link in upload response.",a[u]="Error during file upload.",a[f]="Parsing response failed.",a[m]="File is too large.",a[v]="Video file type is invalid.",a[7]="Files can be uploaded only to same domain in IE 8 and IE 9.",e.shared.vid_exit_flag=!1,{_init:function(){e.opts.videoResponsive&&(e.opts.videoResize=!1),e.events.on("drop",$,!0),e.events.on("mousedown window.mousedown",j),e.events.on("window.touchmove",H),e.events.on("mouseup window.mouseup",V),e.events.on("commands.mousedown",(function(e){0<e.parents(".fr-toolbar").length&&V()})),e.events.on("video.hideResizer commands.undo commands.redo element.dropped",(function(){V(!0)})),e.helpers.isMobile()&&(e.events.$on(e.$el,"touchstart","span.fr-video",(function(){l=!1})),e.events.$on(e.$el,"touchmove",(function(){l=!0}))),e.events.on("html.set",J),J(),e.events.$on(e.$el,"mousedown","span.fr-video",(function(t){t.stopPropagation(),(e.browser.msie||e.browser.edge)&&(t.target.innerText||(t.target.dragDrop(),F.call(this,t)))})),e.events.$on(e.$el,"click touchend","span.fr-video",(function(e){if(e.target.innerText.length||"false"==d(this).parents("[contenteditable]").not(".fr-element").not(".fr-img-caption").not("body").first().attr("contenteditable"))return!0;F.call(this,e)})),e.events.on("keydown",(function(t){var n=t.which;return!o||n!=r.KEYCODE.BACKSPACE&&n!=r.KEYCODE.DELETE?o&&n==r.KEYCODE.ESC?(V(!0),t.preventDefault(),!1):o&&n!=r.KEYCODE.F10&&!e.keys.isBrowserAction(t)?(t.preventDefault(),!1):void 0:(t.preventDefault(),X(),e.undo.saveStep(),!1)}),!0),e.events.on("toolbar.esc",(function(){if(o)return e.events.disableBlur(),e.events.focus(),!1}),!0),e.events.on("toolbar.focusEditor",(function(){if(o)return!1}),!0),e.events.on("keydown",(function(){e.$el.find("span.fr-video:empty").remove()})),e.$wp&&(U(),e.events.on("contentChanged",U)),i(!0),G(!0)},showInsertPopup:function(){var t=e.$tb.find('.fr-command[data-cmd="insertVideo"]'),n=e.popups.get("video.insert");if(n||(n=i()),S(),!n.hasClass("fr-active"))if(e.popups.refresh("video.insert"),e.popups.setContainer("video.insert",e.$tb),t.isVisible()){var r=e.button.getPosition(t),o=r.left,a=r.top;e.popups.show("video.insert",o,a,t.outerHeight())}else e.position.forSelection(n),e.popups.show("video.insert")},showLayer:function(t){var n,r,c=e.popups.get("video.insert");if(!o&&!e.opts.toolbarInline){var a=e.$tb.find('.fr-command[data-cmd="insertVideo"]');n=a.offset().left,r=a.offset().top+(e.opts.toolbarBottom?10:a.outerHeight()-10)}e.opts.toolbarInline&&(r=c.offset().top-e.helpers.getPX(c.css("margin-top")),c.hasClass("fr-above")&&(r+=c.outerHeight())),c.find(".fr-layer").removeClass("fr-active"),c.find(".fr-".concat(t,"-layer")).addClass("fr-active"),e.popups.show("video.insert",n,r,0),e.accessibility.focusPopup(c)},refreshByURLButton:function(t){var n=e.popups.get("video.insert");n&&n.find(".fr-video-by-url-layer").hasClass("fr-active")&&t.addClass("fr-active").attr("aria-pressed",!0)},refreshEmbedButton:function(t){var n=e.popups.get("video.insert");n&&n.find(".fr-video-embed-layer").hasClass("fr-active")&&t.addClass("fr-active").attr("aria-pressed",!0)},refreshUploadButton:function(t){var n=e.popups.get("video.insert");n&&n.find(".fr-video-upload-layer").hasClass("fr-active")&&t.addClass("fr-active").attr("aria-pressed",!0)},upload:z,insertByURL:function(t){var n=!!document.getElementById("videoPluginAutoplay")&&document.getElementById("videoPluginAutoplay").checked;void 0===t&&(t=(e.popups.get("video.insert").find('.fr-video-by-url-layer input[type="text"]').val()||"").trim());var o=null;if(/^http/.test(t)||(t="https://".concat(t)),e.helpers.isURL(t))for(var c=0;c<r.VIDEO_PROVIDERS.length;c++){var a=r.VIDEO_PROVIDERS[c],l="autoplay=1&mute=1";if(a.html.includes("autoplay=1")&&document.getElementById("videoPluginAutoplay").checked)a.html=a.html,document.getElementById("videoPluginAutoplay").checked=!1;else if(n){var i=a.html.indexOf("{url}")+5;a.html=[a.html.slice(0,i),l,a.html.slice(i)].join(""),n=!1,document.getElementById("videoPluginAutoplay").checked=!1}else(a=r.VIDEO_PROVIDERS[c]).html=a.html.replace(l,"");if(a.test_regex.test(t)&&new RegExp(e.opts.videoAllowedProviders.join("|")).test(a.provider)){o=t.replace(a.url_regex,a.url_text),o=a.html.replace(/\{url\}/,o);break}}o?y(o):(b(e.language.translate("Something went wrong. Please try again.")),e.events.trigger("video.linkError",[t]))},insertEmbed:function(t){void 0===t&&(t=e.popups.get("video.insert").find(".fr-video-embed-layer textarea").val()||""),0!==t.length&&r.VIDEO_EMBED_REGEX.test(t)?y(t):(b(e.language.translate("Something went wrong. Please try again.")),e.events.trigger("video.codeError",[t]))},insert:y,align:function(t){o.removeClass("fr-fvr fr-fvl"),!e.opts.htmlUntouched&&e.opts.useClasses?"left"==t?o.addClass("fr-fvl"):"right"==t&&o.addClass("fr-fvr"):Q(o,q(),t),te(),B(),_(),e.selection.clear()},refreshAlign:function(t){if(!o)return!1;t.find(">*").first().replaceWith(e.icon.create("video-align-".concat(Y())))},refreshAlignOnShow:function(e,t){o&&t.find('.fr-command[data-param1="'.concat(Y(),'"]')).addClass("fr-active").attr("aria-selected",!0)},display:function(t){o.removeClass("fr-dvi fr-dvb"),!e.opts.htmlUntouched&&e.opts.useClasses?"inline"==t?o.addClass("fr-dvi"):"block"==t&&o.addClass("fr-dvb"):Q(o,t,Y()),te(),B(),_(),e.selection.clear()},refreshDisplayOnShow:function(e,t){o&&t.find('.fr-command[data-param1="'.concat(q(),'"]')).addClass("fr-active").attr("aria-selected",!0)},remove:X,hideProgressBar:S,showSizePopup:function(){var t=e.popups.get("video.size");t||(t=G()),S(),e.popups.refresh("video.size"),e.popups.setContainer("video.size",e.$sc);var n=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video")),r=n.offset().left+n.outerWidth()/2,c=n.offset().top+n.height();e.popups.show("video.size",r,c,n.height(),!0)},replace:function(){var t=e.popups.get("video.insert");t||(t=i()),e.popups.isVisible("video.insert")||(S(),e.popups.refresh("video.insert"),e.popups.setContainer("video.insert",e.$sc));var n=o.offset().left+o.outerWidth()/2,r=o.offset().top+o.height();e.popups.show("video.insert",n,r,o.outerHeight(),!0)},back:function(){o?(e.events.disableBlur(),o[0].click()):(e.events.disableBlur(),e.selection.restore(),e.events.enableBlur(),e.popups.hide("video.insert"),e.toolbar.showInline())},setSize:function(t,n){if(o){var r=e.popups.get("video.size"),c=o.find("iframe, embed, ".concat(o.find("iframe, embed, audio").get(0)?"audio":"video"));c.css("width",t||r.find('input[name="width"]').val()),c.css("height",n||r.find('input[name="height"]').val()),c.get(0).style.width&&c.removeAttr("width"),c.get(0).style.height&&c.removeAttr("height"),r.find("input:focus").blur(),setTimeout((function(){o.trigger("click")}),e.helpers.isAndroid()?50:0)}},get:function(){return o},showProgressBar:w,_editVideo:A,setAutoplay:function(){var e;if(o.find("iframe, embed, audio").get(0))(e=o.find("iframe, embed, audio")).get(0).src.includes("autoplay=1")?(ee("#FFFFFF"),e.get(0).src=e.get(0).src.replace("&autoplay=1","")):(ee("#D6D6D6"),e.get(0).src=e.get(0).src+"&autoplay=1");else if((e=o.find("iframe, embed, video")).get(0).outerHTML.includes("autoplay"))ee("#FFFFFF"),e.get(0).outerHTML=e.get(0).outerHTML.replace("autoplay","");else{ee("#D6D6D6");var t=e.get(0).outerHTML.indexOf("class")-1;e.get(0).outerHTML=[e.get(0).outerHTML.slice(0,t),"autoplay",e.get(0).outerHTML.slice(t)].join("")}}}},r.RegisterCommand("insertVideo",{title:"Insert Video",undo:!1,focus:!0,refreshAfterCallback:!1,popup:!0,callback:function(){this.popups.isVisible("video.insert")?(this.$el.find(".fr-marker").length&&(this.events.disableBlur(),this.selection.restore()),this.popups.hide("video.insert")):this.video.showInsertPopup()},plugin:"video"}),r.DefineIcon("insertVideo",{NAME:"video-camera",FA5NAME:"camera",SVG_KEY:"insertVideo"}),r.DefineIcon("videoByURL",{NAME:"link",SVG_KEY:"insertLink"}),r.RegisterCommand("videoByURL",{title:"By URL",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-by-url")},refresh:function(e){this.video.refreshByURLButton(e)}}),r.DefineIcon("videoEmbed",{NAME:"code",SVG_KEY:"codeView"}),r.RegisterCommand("videoEmbed",{title:"Embedded Code",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-embed")},refresh:function(e){this.video.refreshEmbedButton(e)}}),r.DefineIcon("videoUpload",{NAME:"upload",SVG_KEY:"upload"}),r.RegisterCommand("videoUpload",{title:"Upload Video",undo:!1,focus:!1,toggle:!0,callback:function(){this.video.showLayer("video-upload")},refresh:function(e){this.video.refreshUploadButton(e)}}),r.RegisterCommand("videoInsertByURL",{undo:!0,focus:!0,callback:function(){this.video.insertByURL()}}),r.RegisterCommand("videoInsertEmbed",{undo:!0,focus:!0,callback:function(){this.video.insertEmbed()}}),r.DefineIcon("videoDisplay",{NAME:"star",SVG_KEY:"star"}),r.RegisterCommand("videoDisplay",{title:"Display",type:"dropdown",options:{inline:"Inline",block:"Break Text"},callback:function(e,t){this.video.display(t)},refresh:function(e){this.opts.videoTextNear||e.addClass("fr-hidden")},refreshOnShow:function(e,t){this.video.refreshDisplayOnShow(e,t)}}),r.DefineIcon("video-align",{NAME:"align-left",SVG_KEY:"align Left"}),r.DefineIcon("video-align-left",{NAME:"align-left",SVG_KEY:"alignLeft"}),r.DefineIcon("video-align-right",{NAME:"align-right",SVG_KEY:"alignRight"}),r.DefineIcon("video-align-center",{NAME:"align-justify",SVG_KEY:"alignJustify"}),r.DefineIcon("videoAlign",{NAME:"align-center",SVG_KEY:"alignCenter"}),r.RegisterCommand("videoAlign",{type:"dropdown",title:"Align",options:{left:"Align Left",center:"None",right:"Align Right"},html:function(){var e='<ul class="fr-dropdown-list" role="presentation">',t=r.COMMANDS.videoAlign.options;for(var n in t)t.hasOwnProperty(n)&&(e+='<li role="presentation"><a class="fr-command fr-title" tabIndex="-1" role="option" data-cmd="videoAlign" data-param1="'.concat(n,'" title="').concat(this.language.translate(t[n]),'">').concat(this.icon.create("video-align-".concat(n)),'<span class="fr-sr-only">').concat(this.language.translate(t[n]),"</span></a></li>"));return e+"</ul>"},callback:function(e,t){this.video.align(t)},refresh:function(e){this.video.refreshAlign(e)},refreshOnShow:function(e,t){this.video.refreshAlignOnShow(e,t)}}),r.DefineIcon("videoReplace",{NAME:"exchange",FA5NAME:"exchange-alt",SVG_KEY:"replaceImage"}),r.RegisterCommand("videoReplace",{title:"Replace",undo:!1,focus:!1,popup:!0,refreshAfterCallback:!1,callback:function(){this.video.replace()}}),r.DefineIcon("videoRemove",{NAME:"trash",SVG_KEY:"remove"}),r.RegisterCommand("videoRemove",{title:"Remove",callback:function(){this.video.remove()}}),r.DefineIcon("autoplay",{NAME:"autoplay",SVG_KEY:"autoplay"}),r.RegisterCommand("autoplay",{undo:!1,focus:!1,popup:!0,title:"Autoplay",callback:function(){this.video.setAutoplay()}}),r.DefineIcon("videoSize",{NAME:"arrows-alt",SVG_KEY:"imageSize"}),r.RegisterCommand("videoSize",{undo:!1,focus:!1,popup:!0,title:"Change Size",callback:function(){this.video.showSizePopup()}}),r.DefineIcon("videoBack",{NAME:"arrow-left",SVG_KEY:"back"}),r.RegisterCommand("videoBack",{title:"Back",undo:!1,focus:!1,back:!0,callback:function(){this.video.back()},refresh:function(e){this.video.get()||this.opts.toolbarInline?(e.removeClass("fr-hidden"),e.next().hasClass("fr-separator")&&e.next().removeClass("fr-hidden")):(e.addClass("fr-hidden"),e.next().hasClass("fr-separator")&&e.next().addClass("fr-hidden"))}}),r.RegisterCommand("videoDismissError",{title:"OK",undo:!1,callback:function(){this.video.hideProgressBar(!0)}}),r.RegisterCommand("videoSetSize",{undo:!0,focus:!1,title:"Update",refreshAfterCallback:!1,callback:function(){this.video.setSize()}}),Object.assign(r.DEFAULTS,{wordDeniedTags:[],wordDeniedAttrs:[],wordAllowedStyleProps:["font-family","font-size","background","color","width","text-align","vertical-align","background-color","padding","margin","height","margin-top","margin-left","margin-right","margin-bottom","text-decoration","font-weight","font-style","text-indent","border","border-.*","line-height","list-style-type"],wordPasteModal:!0,wordPasteKeepFormatting:!0}),r.PLUGINS.wordPaste=function(e){var i,a,t=e.$,s="word_paste",p={};function n(t){var n=e.opts.wordAllowedStyleProps;t||(e.opts.wordAllowedStyleProps=[]),0===a.indexOf("<colgroup>")&&(a="<table>"+a+"</table>"),a=C(a=a.replace(/<span[\n\r ]*style='mso-spacerun:yes'>([\r\n\u00a0 ]*)<\/span>/g,(function(e,t){for(var n="",r=0;r++<t.length;)n+="&nbsp;";return n})),e.paste.getRtfClipboard());var r=e.doc.createElement("DIV");r.innerHTML=a,e.html.cleanBlankSpaces(r),a=r.innerHTML,a=(a=e.paste.cleanEmptyTagsAndDivs(a)).replace(/\u200b/g,""),e.modals.hide(s),e.paste.clean(a,!0,!0),e.opts.wordAllowedStyleProps=n}function o(e){e.parentNode&&e.parentNode.removeChild(e)}function u(e,t){if(t(e))for(var n=e.firstChild;n;){var r=n,a=n.previousSibling;n=n.nextSibling,u(r,t),r.previousSibling||r.nextSibling||r.parentNode||!n||a===n.previousSibling||!n.parentNode?r.previousSibling||r.nextSibling||r.parentNode||!n||n.previousSibling||n.nextSibling||n.parentNode||(a?n=a.nextSibling?a.nextSibling.nextSibling:null:e.firstChild&&(n=e.firstChild.nextSibling)):n=a?a.nextSibling:e.firstChild}}function c(e){if(!e.getAttribute("style")||!/mso-list:[\s]*l/gi.test(e.getAttribute("style").replace(/\n/gi,"")))return!1;try{if(!e.querySelector('[style="mso-list:Ignore"]'))return!!(e.outerHTML&&0<=e.outerHTML.indexOf("\x3c!--[if !supportLists]--\x3e"))}catch(e){return!1}return!0}function l(e){return e.getAttribute("style").replace(/\n/gi,"").replace(/.*level([0-9]+?).*/gi,"$1")}function d(t,n){var r=t.cloneNode(!0);if(-1!==["H1","H2","H3","H4","H5","H6"].indexOf(t.tagName)){var o=document.createElement(t.tagName.toLowerCase());o.setAttribute("style",t.getAttribute("style")),o.innerHTML=r.innerHTML,r.innerHTML=o.outerHTML}u(r,(function(t){if(t.nodeType==Node.COMMENT_NODE&&(e.browser.msie||e.browser.safari||e.browser.edge))try{if("[if !supportLists]"===t.data){for(t=t.nextSibling;t&&t.nodeType!==Node.COMMENT_NODE;){var r=t.nextSibling;t.parentNode.removeChild(t),t=r}t&&t.nodeType==Node.COMMENT_NODE&&t.parentNode.removeChild(t)}}catch(e){}return t.nodeType===Node.ELEMENT_NODE&&("mso-list:\nIgnore"===t.getAttribute("style")&&t.setAttribute("style","mso-list:Ignore"),"mso-list:Ignore"===t.getAttribute("style")&&t.parentNode.removeChild(t),t.setAttribute("style",function(e){var t="",n=e.getAttribute("style");return n&&["line-height","font-family","font-size","color","background"].forEach((function(e){var r=n.match(new RegExp(e+":.*(;|)"));r&&(t+=r[0]+";")})),t}(t)),E(t,n)),!0}));var a=r.innerHTML;return a.replace(/<!--[\s\S]*?-->/gi,"")}function h(e,t){for(var n=document.createElement(t),r=0;r<e.attributes.length;r++){var a=e.attributes[r].name;n.setAttribute(a,e.getAttribute(a))}return n.innerHTML=e.innerHTML,e.parentNode.replaceChild(n,e),n}function f(e){var t=e.getAttribute("align");t&&(e.style["text-align"]=t,e.removeAttribute("align"))}function m(e){return e.replace(/\n|\r|\n\r|&quot;/g,"")}function v(e,t,n){if(t){var r=e.getAttribute("style");r&&";"!==r.slice(-1)&&(r+=";"),t&&";"!==t.slice(-1)&&(t+=";"),t=t.replace(/\n/gi,"");var a=null;a=n?(r||"")+t:t+(r||""),e.setAttribute("style",a)}}var _=null;function y(e,t,n){for(var r=e.split(n),a=1;a<r.length;a++){var o=r[a];if(1<(o=o.split("shplid")).length){o=o[1];for(var i="",s=0;s<o.length&&"\\"!==o[s]&&"{"!==o[s]&&" "!==o[s]&&"\r"!==o[s]&&"\n"!==o[s];)i+=o[s],s++;var c=o.split("bliptag");if(c&&c.length<2)continue;var l=null;if(-1!==c[0].indexOf("pngblip")?l="image/png":-1!==c[0].indexOf("jpegblip")&&(l="image/jpeg"),!l)continue;var d=c[1].split("}");if(d&&d.length<2)continue;var h=void 0;if(2<d.length&&-1!==d[0].indexOf("blipuid"))h=d[1].split(" ");else{if((h=d[0].split(" "))&&h.length<2)continue;h.shift()}var p=h.join("");_[t+i]={image_hex:p,image_type:l}}}}function g(n,r){if(r){var o;if("IMG"===n.tagName){var c=n.getAttribute("src");if(!c||-1===c.indexOf("file://"))return;if(0===c.indexOf("file://")&&e.helpers.isURL(n.getAttribute("alt")))return void n.setAttribute("src",n.getAttribute("alt"));(o=p[n.getAttribute("v:shapes")])||(o=n.getAttribute("v:shapes"),n.parentNode&&n.parentNode.parentNode&&0<=n.parentNode.parentNode.innerHTML.indexOf("msEquation")&&(o=null))}else o=n.parentNode.getAttribute("o:spid");if(n.removeAttribute("height"),o){!function(e){_={},y(e,"i","\\shppict"),y(e,"s","\\shp{")}(r);var a=_[o.substring(7)];if(a){var l=function(e){for(var t=e.match(/[0-9a-f]{2}/gi),n=[],r=0;r<t.length;r++)n.push(String.fromCharCode(parseInt(t[r],16)));var a=n.join("");return btoa(a)}(a.image_hex),i="data:"+a.image_type+";base64,"+l;"IMG"===n.tagName?(n.src=i,n.setAttribute("data-fr-image-pasted",!0)):t(n.parentNode).before('<img data-fr-image-pasted="true" src="'+i+'" style="'+n.parentNode.getAttribute("style")+'">').remove()}}}}function E(t,n){var l=t.tagName,d=l.toLowerCase();if(t.firstElementChild&&("I"===t.firstElementChild.tagName?h(t.firstElementChild,"em"):"B"===t.firstElementChild.tagName&&h(t.firstElementChild,"strong")),-1!==["SCRIPT","APPLET","EMBED","NOFRAMES","NOSCRIPT"].indexOf(l))return o(t),!1;for(var a=["META","LINK","XML","ST1:","O:","W:","FONT"],_=0;_<a.length;_++)if(-1!==l.indexOf(a[_]))return t.innerHTML&&(t.outerHTML=t.innerHTML),o(t),!1;if("TD"!==l){var i=t.getAttribute("class")||"MsoNormal";if(n&&i){for(var s=(i=m(i)).split(" "),y=0;y<s.length;y++){var E=[],C="."+s[y];E.push(C),C=d+C,E.push(C);for(var w=0;w<E.length;w++)n[E[w]]&&v(t,n[E[w]])}t.removeAttribute("class")}n&&n[d]&&v(t,n[d])}if(-1!==["P","H1","H2","H3","H4","H5","H6","PRE"].indexOf(l)){var p=t.getAttribute("class");if(p&&(n&&n[l.toLowerCase()+"."+p]&&v(t,n[l.toLowerCase()+"."+p]),-1!==p.toLowerCase().indexOf("mso"))){var u=m(p);(u=u.replace(/[0-9a-z-_]*mso[0-9a-z-_]*/gi,""))?t.setAttribute("class",u):t.removeAttribute("class")}var S=t.getAttribute("style");if(S){var g=S.match(/text-align:.+?[; "]{1,1}/gi);g&&g[g.length-1].replace(/(text-align:.+?[; "]{1,1})/gi,"$1")}f(t)}if("TR"===l&&function(t,n){e.node.clearAttributes(t);for(var l=t.firstElementChild,d=0,a=!1,h=null;l;){l.firstElementChild&&-1!==l.firstElementChild.tagName.indexOf("W:")&&(l.innerHTML=l.firstElementChild.innerHTML),(h=l.getAttribute("width"))||a||(a=!0),d+=parseInt(h,10),(!l.firstChild||l.firstChild&&l.firstChild.data===r.UNICODE_NBSP)&&(l.firstChild&&o(l.firstChild),l.innerHTML="<br>");for(var i=l.firstElementChild,s=1===l.children.length;i;)"P"!==i.tagName||c(i)||s&&f(i),i=i.nextElementSibling;if(n){var _=l.getAttribute("class");if(_){var y=(_=m(_)).match(/xl[0-9]+/gi);if(y){var E="."+y[0];n[E]&&v(l,n[E])}}n.td&&v(l,n.td)}var C=l.getAttribute("style");C&&(C=m(C))&&";"!==C.slice(-1)&&(C+=";");var p=l.getAttribute("valign");if(!p&&C){var u=C.match(/vertical-align:.+?[; "]{1,1}/gi);u&&(p=u[u.length-1].replace(/vertical-align:(.+?)[; "]{1,1}/gi,"$1"))}var w=null;if(C){var g=C.match(/text-align:.+?[; "]{1,1}/gi);g&&(w=g[g.length-1].replace(/text-align:(.+?)[; "]{1,1}/gi,"$1")),"general"===w&&(w=null)}var S=null;if(C){var T=C.match(/background:.+?[; "]{1,1}/gi);T&&(S=T[T.length-1].replace(/background:(.+?)[; "]{1,1}/gi,"$1"))}var b=l.getAttribute("colspan"),A=l.getAttribute("rowspan");b&&l.setAttribute("colspan",b),A&&l.setAttribute("rowspan",A),p&&(l.style["vertical-align"]=p),w&&(l.style["text-align"]=w),S&&(l.style["background-color"]=S),h&&l.setAttribute("width",h),l=l.nextElementSibling}for(l=t.firstElementChild;l;)h=l.getAttribute("width"),a?l.removeAttribute("width"):l.setAttribute("width",100*parseInt(h,10)/d+"%"),l=l.nextElementSibling}(t,n),"A"!==l||t.attributes.getNamedItem("href")||t.attributes.getNamedItem("name")||!t.innerHTML||(t.outerHTML=t.innerHTML),"A"==l&&t.getAttribute("href")&&t.querySelector("img"))for(var T=t.querySelectorAll("span"),A=0;A<T.length;A++)T[A].innerText||(T[A].outerHTML=T[A].innerHTML);if("TD"!==l&&"TH"!==l||t.innerHTML||(t.innerHTML="<br>"),"TABLE"===l&&(t.style.width=t.style.width),t.getAttribute("lang")&&t.removeAttribute("lang"),t.getAttribute("style")&&-1!==t.getAttribute("style").toLowerCase().indexOf("mso")){var b=m(t.getAttribute("style"));(b=b.replace(/[0-9a-z-_]*mso[0-9a-z-_]*:.+?(;{1,1}|$)/gi,""))?t.setAttribute("style",b):t.removeAttribute("style")}return!0}function C(t,n){0<=t.indexOf("<html")&&(t=t.replace(/[.\s\S\w\W<>]*(<html[^>]*>[.\s\S\w\W<>]*<\/html>)[.\s\S\w\W<>]*/i,"$1")),function(e){for(var t=e.split("v:shape"),n=1;n<t.length;n++){var r=t[n],a=r.split(' id="')[1];if(a&&1<a.length){a=a.split('"')[0];var o=r.split(' o:spid="')[1];o&&1<o.length&&(o=o.split('"')[0],p[a]=o)}}}(t);var f=(new DOMParser).parseFromString(t,"text/html"),v=f.head,a=f.body,s=function(e){var t={},n=e.getElementsByTagName("style");if(n.length){var r=n[0].innerHTML.match(/[\S ]+\s+{[\s\S]+?}/gi);if(r)for(var a=0;a<r.length;a++){var o=r[a],i=o.replace(/([\S ]+\s+){[\s\S]+?}/gi,"$1"),s=o.replace(/[\S ]+\s+{([\s\S]+?)}/gi,"$1");i=i.replace(/^[\s]|[\s]$/gm,""),s=s.replace(/^[\s]|[\s]$/gm,""),i=i.replace(/\n|\r|\n\r/g,""),s=s.replace(/\n|\r|\n\r/g,"");for(var c=i.split(", "),l=0;l<c.length;l++)t[c[l]]=s}}return t}(v);u(a,(function(e){if(e.nodeType===Node.TEXT_NODE&&/\n|\u00a0|\r/.test(e.data)){if(!/\S| /.test(e.data)&&!/[\u00a0]+/.test(e.data))return e.data===r.UNICODE_NBSP?(e.data="​",!0):1===e.data.length&&10===e.data.charCodeAt(0)?(e.data=" ",!0):(o(e),!1);e.data=e.data.replace(/\n|\r/gi," ")}return!0})),u(a,(function(e){return e.nodeType!==Node.ELEMENT_NODE||"V:IMAGEDATA"!==e.tagName&&"IMG"!==e.tagName||g(e,n),!0}));for(var _=a.querySelectorAll("ul > ul, ul > ol, ol > ul, ol > ol"),i=_.length-1;0<=i;i--)_[i].previousElementSibling&&"LI"===_[i].previousElementSibling.tagName&&_[i].previousElementSibling.appendChild(_[i]);u(a,(function(e){if(e.nodeType===Node.TEXT_NODE)return e.data=e.data.replace(/<br>(\n|\r)/gi,"<br>"),!1;if(e.nodeType===Node.ELEMENT_NODE){if(c(e)){var t=e.parentNode,n=e.previousSibling,r=function e(t,n,r,o){var a,h,i=/[0-9a-zA-Z]./gi,s=!1,f=navigator.userAgent.toLowerCase();-1!=f.indexOf("safari")&&(f=-1<f.indexOf("chrome")?1:"safari"),t.innerHTML.includes("mso-list:\nIgnore")&&(t.innerHTML=t.innerHTML.replace(/mso-list:\nIgnore/gi,"mso-list:Ignore"));var m,v,_,p,y,u=t.querySelector('span[style="mso-list:Ignore"]');null==u&&"safari"==f&&(u=t.querySelector('span[lang="PT-BR"]')),u&&(s=s||i.test(u.textContent)),null!==u&&(y=u.textContent.trim().split(".")[0]),_=1==s?("1"==(y=u.textContent.trim().split(".")[0])?p="decimal;":"i"==y?p="lower-roman;":"I"==y?p="upper-roman;":"o"==y?p="circle;":y.match(/^v$/)||(y.match(/^[a-z]$/)||y.match(/^[a-z]\)$/)?p="lower-alpha;":(y.match(/^[A-Z]$/)||y.match(/^[A-Z]\)$/))&&(p="upper-alpha;")),p="list-style-type: "+p,"ol"):(null!=u&&(y=u.textContent.trim().split(".")[0]),"§"==y?p="square;":"·"==y&&(p="disc;"),p="list-style-type: "+p,"ul");var g,E="";null==u||null==u.textContent||isNaN(parseInt(u.textContent.trim().split(".")[1],10))||(E=' class="decimal_type" ');var C,b=l(t),w=t.style.marginLeft;if(w.includes("in")?(C="in",w=parseFloat(w)-.5):w.includes("pt")&&(C="px",w=parseFloat(w)-10),1==b)if(g=p?"<"+_+' style = "'+p+"; margin-left:"+w+C+';">':"<"+_+' style="margin-left:'+w+C+';">',"list-style-type: upper-alpha;"==p){var S=y.charCodeAt(0)-64;g=p?"<"+_+E+' start="'+S+'" style = "'+p+" margin-left:"+w+C+';">':"<"+_+">"}else if("list-style-type: lower-alpha;"==p){var T=y.charCodeAt(0)-96;g=p?"<"+_+E+' start="'+T+'" style = "'+p+"margin-left:"+w+C+';">':"<"+_+">"}else g=p?"<"+_+E+' style = "'+p+";margin-left:"+w+C+';">':"<"+_+' style="margin-left:'+w+C+';">';else if("list-style-type: upper-alpha;"==p){var A=y.charCodeAt(0)-64;g=p?"<"+_+E+' style = "'+p+' start="'+A+'">':"<"+_+">"}else if("list-style-type: lower-alpha;"==p){var R=y.charCodeAt(0)-96;g=p?"<"+_+E+' style = "'+p+' start="'+R+'">':"<"+_+">"}else g=p?"<"+_+E+' style = "'+p+'">':"<"+_+">";for(var O=!1;t;){if(!c(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}var I=l(t);if((r=r||I)<I)g+=(v=e(t,n,I,t.style.marginLeft)).el.outerHTML,t=v.currentNode;else{if(I<r)break;t.firstElementChild&&t.firstElementChild.firstElementChild&&t.firstElementChild.firstElementChild.firstChild&&(i.lastIndex=0),h&&h.firstElementChild&&h.firstElementChild.firstElementChild&&h.firstElementChild.firstElementChild.firstChild&&(i.lastIndex=0,a=i.test(h.firstElementChild.firstElementChild.firstChild.data||h.firstElementChild.firstElementChild.firstChild.firstChild&&h.firstElementChild.firstElementChild.firstChild.firstChild.data||""));var k=!1;(!o&&!t.style.marginLeft||o&&t.style.marginLeft&&o===t.style.marginLeft)&&(k=!0),o=t.style.marginLeft,k||void 0===a?(m=d(t,n),t.nextSibling&&null!=t.nextSibling.innerText&&null!=t.nextSibling.innerText&&!g.includes('class="decimal_type"')&&(isNaN(parseInt(t.nextSibling.innerText.trim().split(".")[1],10))||(g=g.substring(3,0)+' class="decimal_type"'+g.substring(3,g.length))),g+="<li>"+m+"</li>"):(1==I&&(g+="</"+_+">",O=!0,h=null),g+=(v=e(t,n,I,t.style.marginLeft)).el.outerHTML,t=v.currentNode);var N=t&&t.nextElementSibling;if(N&&(h=N.previousElementSibling),t&&!c(t)){if(t.outerHTML&&0<t.outerHTML.indexOf("mso-bookmark")&&0==(t.textContent||"").length){t=t.nextElementSibling;continue}break}t&&t.parentNode&&t.parentNode.removeChild(t),t=N}}O||(g+="</"+_+">");var L=document.createElement("div");return L.innerHTML=g,{el:L,currentNode:t}}(e,s).el,a=null;return(a=n?n.nextSibling:t.firstChild)?t.insertBefore(r,a):t.appendChild(r),!1}return"FONT"===e.tagName&&s["."+e.getAttribute("class")]&&(e=h(e,"span")),E(e,s)}if(e.nodeType!==Node.COMMENT_NODE)return!0;if(-1<e.data.indexOf("[if !supportLineBreakNewLine]"))for(var f=e.nextSibling;f;)(f=e.nextSibling)&&o(f),f.data&&-1<f.data.indexOf("[endif]")&&(f=null);if(-1<e.data.indexOf("[if supportFields]")&&-1<e.data.indexOf("FORMCHECKBOX")){var i=document.createElement("input");i.type="checkbox",e.parentNode.insertBefore(i,e.nextSibling)}return o(e),!1})),u(a,(function(e){if(e.nodeType===Node.ELEMENT_NODE){var t=e.tagName;if(!e.innerHTML&&-1===["BR","IMG","INPUT"].indexOf(t)){for(var n=e.parentNode;n&&(o(e),!(e=n).innerHTML)&&"TD"!==e.parentNode.tagName;)n=e.parentNode;return!1}!function(e){var t=e.getAttribute("style");if(t){(t=m(t))&&";"!==t.slice(-1)&&(t+=";");var n=t.match(/(^|\S+?):.+?;{1,1}/gi);if(n){for(var r={},a=0;a<n.length;a++){var o=n[a].split(":");2===o.length&&("text-align"===o[0]&&"SPAN"===e.tagName||(r[o[0]]=o[1]))}var i="";for(var s in r)if(r.hasOwnProperty(s)){if("font-size"===s&&"pt;"===r[s].slice(-3)){var c=null;try{c=parseFloat(r[s].slice(0,-3),10)}catch(e){c=null}c&&(c=Math.round(1.33*c),r[s]=c+"px;")}i+=s+":"+r[s]}i&&e.setAttribute("style",i)}}}(e)}return!0})),u(a,(function(e){if(e&&"A"===e.nodeName&&""===e.href){for(var t=document.createDocumentFragment();e.firstChild;)t.appendChild(e.firstChild);e.parentNode.replaceChild(t,e)}return!0}));var y=a.outerHTML,C=e.opts.htmlAllowedStyleProps;return e.opts.htmlAllowedStyleProps=e.opts.wordAllowedStyleProps,y=e.clean.html(y,e.opts.wordDeniedTags,e.opts.wordDeniedAttrs,!1),e.opts.htmlAllowedStyleProps=C,y}return{_init:function(){e.events.on("paste.wordPaste",(function(r){return a=r,e.opts.wordPasteModal?function(){if(!i){var n='<h4><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 74.95 73.23" style="height: 25px; vertical-align: text-bottom; margin-right: 5px; display: inline-block"><defs><style>.a{fill:#2a5699;}.b{fill:#fff;}</style></defs><path class="a" d="M615.15,827.22h5.09V834c9.11.05,18.21-.09,27.32.05a2.93,2.93,0,0,1,3.29,3.25c.14,16.77,0,33.56.09,50.33-.09,1.72.17,3.63-.83,5.15-1.24.89-2.85.78-4.3.84-8.52,0-17,0-25.56,0v6.81h-5.32c-13-2.37-26-4.54-38.94-6.81q0-29.8,0-59.59c13.05-2.28,26.11-4.5,39.17-6.83Z" transform="translate(-575.97 -827.22)"/><path class="b" d="M620.24,836.59h28.1v54.49h-28.1v-6.81h22.14v-3.41H620.24v-4.26h22.14V873.2H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24v-4.26h22.14v-3.41H620.24V846h22.14v-3.41H620.24Zm-26.67,15c1.62-.09,3.24-.16,4.85-.25,1.13,5.75,2.29,11.49,3.52,17.21,1-5.91,2-11.8,3.06-17.7,1.7-.06,3.41-.15,5.1-.26-1.92,8.25-3.61,16.57-5.71,24.77-1.42.74-3.55,0-5.24.09-1.13-5.64-2.45-11.24-3.47-16.9-1,5.5-2.29,10.95-3.43,16.42q-2.45-.13-4.92-.3c-1.41-7.49-3.07-14.93-4.39-22.44l4.38-.18c.88,5.42,1.87,10.82,2.64,16.25,1.2-5.57,2.43-11.14,3.62-16.71Z" transform="translate(-575.97 -827.22)"/></svg> '+e.language.translate("Word Paste Detected")+"</h4>",r=function(){var t='<div class="fr-word-paste-modal" style="padding: 20px 20px 10px 20px;">';return t+='<p style="text-align: left;">'+e.language.translate("The pasted content is coming from a Microsoft Word document. Do you want to keep the format or clean it up?")+"</p>",(t+='<div style="text-align: right; margin-top: 50px;"><button class="fr-remove-word fr-command">'+e.language.translate("Clean")+'</button> <button class="fr-keep-word fr-command">'+e.language.translate("Keep")+"</button></div>")+"</div>"}(),o=e.modals.create(s,n,r),c=o.$body;i=o.$modal,o.$modal.addClass("fr-middle"),e.events.bindClick(c,"button.fr-remove-word",(function(){(i.data("instance")||e).wordPaste.clean()})),e.events.bindClick(c,"button.fr-keep-word",(function(){(i.data("instance")||e).wordPaste.clean(!0)})),e.events.$on(t(e.o_win),"resize",(function(){e.modals.resize(s)}))}e.modals.show(s),e.modals.resize(s)}():n(e.opts.wordPasteKeepFormatting),!1}))},clean:n,_wordClean:C}};var w={},S={},T={},A=C(!0),R="vanilla",O={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:C(!0),allOn:function(){var e=C(!0),t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}()};function I(t,n){var r=n?"Error in "+n+" extension->":"Error in unnamed extension",o={valid:!0,error:""};w.helper.isArray(t)||(t=[t]);for(var a=0;a<t.length;++a){var c=r+" sub-extension "+a+": ",i=t[a];if("object"!==e(i))return o.valid=!1,o.error=c+"must be an object, but "+e(i)+" given",o;if(!w.helper.isString(i.type))return o.valid=!1,o.error=c+'property "type" must be a string, but '+e(i.type)+" given",o;var s=i.type=i.type.toLowerCase();if("language"===s&&(s=i.type="lang"),"html"===s&&(s=i.type="output"),"lang"!==s&&"output"!==s&&"listener"!==s)return o.valid=!1,o.error=c+"type "+s+' is not recognized. Valid values: "lang/language", "output/html" or "listener"',o;if("listener"===s){if(w.helper.isUndefined(i.listeners))return o.valid=!1,o.error=c+'. Extensions of type "listener" must have a property called "listeners"',o}else if(w.helper.isUndefined(i.filter)&&w.helper.isUndefined(i.regex))return o.valid=!1,o.error=c+s+' extensions must define either a "regex" property or a "filter" method',o;if(i.listeners){if("object"!==e(i.listeners))return o.valid=!1,o.error=c+'"listeners" property must be an object but '+e(i.listeners)+" given",o;for(var l in i.listeners)if(i.listeners.hasOwnProperty(l)&&"function"!=typeof i.listeners[l])return o.valid=!1,o.error=c+'"listeners" property must be an hash of [event name]: [callback]. listeners.'+l+" must be a function but "+e(i.listeners[l])+" given",o}if(i.filter){if("function"!=typeof i.filter)return o.valid=!1,o.error=c+'"filter" must be a function, but '+e(i.filter)+" given",o}else if(i.regex){if(w.helper.isString(i.regex)&&(i.regex=new RegExp(i.regex,"g")),!(i.regex instanceof RegExp))return o.valid=!1,o.error=c+'"regex" property must either be a string or a RegExp object, but '+e(i.regex)+" given",o;if(w.helper.isUndefined(i.replace))return o.valid=!1,o.error=c+'"regex" extensions must implement a replace string or function',o}}return o}function k(e,t){return"¨E"+t.charCodeAt(0)+"E"}w.helper={},w.extensions={},w.setOption=function(e,t){return A[e]=t,this},w.getOption=function(e){return A[e]},w.getOptions=function(){return A},w.resetOptions=function(){A=C(!0)},w.setFlavor=function(e){if(!O.hasOwnProperty(e))throw Error(e+" flavor was not found");w.resetOptions();var t=O[e];for(var n in R=e,t)t.hasOwnProperty(n)&&(A[n]=t[n])},w.getFlavor=function(){return R},w.getFlavorOptions=function(e){if(O.hasOwnProperty(e))return O[e]},w.getDefaultOptions=function(e){return C(e)},w.subParser=function(e,t){if(w.helper.isString(e)){if(void 0===t){if(S.hasOwnProperty(e))return S[e];throw Error("SubParser named "+e+" not registered!")}S[e]=t}},w.extension=function(e,t){if(!w.helper.isString(e))throw Error("Extension 'name' must be a string");if(e=w.helper.stdExtName(e),w.helper.isUndefined(t)){if(!T.hasOwnProperty(e))throw Error("Extension named "+e+" is not registered!");return T[e]}"function"==typeof t&&(t=t()),w.helper.isArray(t)||(t=[t]);var n=I(t,e);if(!n.valid)throw Error(n.error);T[e]=t},w.getAllExtensions=function(){return T},w.removeExtension=function(e){delete T[e]},w.resetExtensions=function(){T={}},w.validateExtension=function(e){return!!I(e,null).valid},w.hasOwnProperty("helper")||(w.helper={}),w.helper.isString=function(e){return"string"==typeof e||e instanceof String},w.helper.isFunction=function(e){return e&&"[object Function]"==={}.toString.call(e)},w.helper.isArray=function(e){return Array.isArray(e)},w.helper.isUndefined=function(e){return void 0===e},w.helper.forEach=function(t,n){if(w.helper.isUndefined(t))throw new Error("obj param is required");if(w.helper.isUndefined(n))throw new Error("callback param is required");if(!w.helper.isFunction(n))throw new Error("callback param must be a function/closure");if("function"==typeof t.forEach)t.forEach(n);else if(w.helper.isArray(t))for(var r=0;r<t.length;r++)n(t[r],r,t);else{if("object"!==e(t))throw new Error("obj does not seem to be an array or an iterable object");for(var o in t)t.hasOwnProperty(o)&&n(t[o],o,t)}},w.helper.stdExtName=function(e){return e.replace(/[_?*+\/\\.^-]/g,"").replace(/\s/g,"").toLowerCase()},w.helper.escapeCharactersCallback=k,w.helper.escapeCharacters=function(e,t,n){var r="(["+t.replace(/([\[\]\\])/g,"\\$1")+"])";n&&(r="\\\\"+r);var a=new RegExp(r,"g");return e.replace(a,k)},w.helper.unescapeHTMLEntities=function(e){return e.replace(/&quot;/g,'"').replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&amp;/g,"&")};var N=function(e,t,n,r){var a,o,i,s,c,l=r||"",d=-1<l.indexOf("g"),h=new RegExp(t+"|"+n,"g"+l.replace(/g/g,"")),p=new RegExp(t,l.replace(/g/g,"")),u=[];do{for(a=0;i=h.exec(e);)if(p.test(i[0]))a++||(s=(o=h.lastIndex)-i[0].length);else if(a&&!--a){c=i.index+i[0].length;var f={left:{start:s,end:o},match:{start:o,end:i.index},right:{start:i.index,end:c},wholeMatch:{start:s,end:c}};if(u.push(f),!d)return u}}while(a&&(h.lastIndex=o));return u};w.helper.matchRecursiveRegExp=function(e,t,n,r){for(var a=N(e,t,n,r),o=[],i=0;i<a.length;++i)o.push([e.slice(a[i].wholeMatch.start,a[i].wholeMatch.end),e.slice(a[i].match.start,a[i].match.end),e.slice(a[i].left.start,a[i].left.end),e.slice(a[i].right.start,a[i].right.end)]);return o},w.helper.replaceRecursiveRegExp=function(e,t,n,r,a){if(!w.helper.isFunction(t)){var o=t;t=function(){return o}}var i=N(e,n,r,a),s=e,c=i.length;if(0<c){var l=[];0!==i[0].wholeMatch.start&&l.push(e.slice(0,i[0].wholeMatch.start));for(var d=0;d<c;++d)l.push(t(e.slice(i[d].wholeMatch.start,i[d].wholeMatch.end),e.slice(i[d].match.start,i[d].match.end),e.slice(i[d].left.start,i[d].left.end),e.slice(i[d].right.start,i[d].right.end))),d<c-1&&l.push(e.slice(i[d].wholeMatch.end,i[d+1].wholeMatch.start));i[c-1].wholeMatch.end<e.length&&l.push(e.slice(i[c-1].wholeMatch.end)),s=l.join("")}return s},w.helper.regexIndexOf=function(e,t,n){if(!w.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";if(t instanceof RegExp==0)throw"InvalidArgumentError: second parameter of showdown.helper.regexIndexOf function must be an instance of RegExp";var r=e.substring(n||0).search(t);return 0<=r?r+(n||0):r},w.helper.splitAtIndex=function(e,t){if(!w.helper.isString(e))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[e.substring(0,t),e.substring(t)]},w.helper.encodeEmailAddress=function(e){var t=[function(e){return"&#"+e.charCodeAt(0)+";"},function(e){return"&#x"+e.charCodeAt(0).toString(16)+";"},function(e){return e}];return e.replace(/./g,(function(e){if("@"===e)e=t[Math.floor(2*Math.random())](e);else{var n=Math.random();e=.9<n?t[2](e):.45<n?t[1](e):t[0](e)}return e}))},w.helper.padEnd=function(e,t,n){return t>>=0,n=String(n||" "),e.length>t?String(e):((t-=e.length)>n.length&&(n+=n.repeat(t/n.length)),String(e)+n.slice(0,t))},"undefined"==typeof console&&(console={warn:function(e){alert(e)},log:function(e){alert(e)},error:function(e){throw e}}),w.helper.regexes={asteriskDashAndColon:/([*_:~])/g},w.helper.emojis={"+1":"👍","-1":"👎",100:"💯",1234:"🔢","1st_place_medal":"🥇","2nd_place_medal":"🥈","3rd_place_medal":"🥉","8ball":"🎱",a:"🅰️",ab:"🆎",abc:"🔤",abcd:"🔡",accept:"🉑",aerial_tramway:"🚡",airplane:"✈️",alarm_clock:"⏰",alembic:"⚗️",alien:"👽",ambulance:"🚑",amphora:"🏺",anchor:"⚓️",angel:"👼",anger:"💢",angry:"😠",anguished:"😧",ant:"🐜",apple:"🍎",aquarius:"♒️",aries:"♈️",arrow_backward:"◀️",arrow_double_down:"⏬",arrow_double_up:"⏫",arrow_down:"⬇️",arrow_down_small:"🔽",arrow_forward:"▶️",arrow_heading_down:"⤵️",arrow_heading_up:"⤴️",arrow_left:"⬅️",arrow_lower_left:"↙️",arrow_lower_right:"↘️",arrow_right:"➡️",arrow_right_hook:"↪️",arrow_up:"⬆️",arrow_up_down:"↕️",arrow_up_small:"🔼",arrow_upper_left:"↖️",arrow_upper_right:"↗️",arrows_clockwise:"🔃",arrows_counterclockwise:"🔄",art:"🎨",articulated_lorry:"🚛",artificial_satellite:"🛰",astonished:"😲",athletic_shoe:"👟",atm:"🏧",atom_symbol:"⚛️",avocado:"🥑",b:"🅱️",baby:"👶",baby_bottle:"🍼",baby_chick:"🐤",baby_symbol:"🚼",back:"🔙",bacon:"🥓",badminton:"🏸",baggage_claim:"🛄",baguette_bread:"🥖",balance_scale:"⚖️",balloon:"🎈",ballot_box:"🗳",ballot_box_with_check:"☑️",bamboo:"🎍",banana:"🍌",bangbang:"‼️",bank:"🏦",bar_chart:"📊",barber:"💈",baseball:"⚾️",basketball:"🏀",basketball_man:"⛹️",basketball_woman:"⛹️&zwj;♀️",bat:"🦇",bath:"🛀",bathtub:"🛁",battery:"🔋",beach_umbrella:"🏖",bear:"🐻",bed:"🛏",bee:"🐝",beer:"🍺",beers:"🍻",beetle:"🐞",beginner:"🔰",bell:"🔔",bellhop_bell:"🛎",bento:"🍱",biking_man:"🚴",bike:"🚲",biking_woman:"🚴&zwj;♀️",bikini:"👙",biohazard:"☣️",bird:"🐦",birthday:"🎂",black_circle:"⚫️",black_flag:"🏴",black_heart:"🖤",black_joker:"🃏",black_large_square:"⬛️",black_medium_small_square:"◾️",black_medium_square:"◼️",black_nib:"✒️",black_small_square:"▪️",black_square_button:"🔲",blonde_man:"👱",blonde_woman:"👱&zwj;♀️",blossom:"🌼",blowfish:"🐡",blue_book:"📘",blue_car:"🚙",blue_heart:"💙",blush:"😊",boar:"🐗",boat:"⛵️",bomb:"💣",book:"📖",bookmark:"🔖",bookmark_tabs:"📑",books:"📚",boom:"💥",boot:"👢",bouquet:"💐",bowing_man:"🙇",bow_and_arrow:"🏹",bowing_woman:"🙇&zwj;♀️",bowling:"🎳",boxing_glove:"🥊",boy:"👦",bread:"🍞",bride_with_veil:"👰",bridge_at_night:"🌉",briefcase:"💼",broken_heart:"💔",bug:"🐛",building_construction:"🏗",bulb:"💡",bullettrain_front:"🚅",bullettrain_side:"🚄",burrito:"🌯",bus:"🚌",business_suit_levitating:"🕴",busstop:"🚏",bust_in_silhouette:"👤",busts_in_silhouette:"👥",butterfly:"🦋",cactus:"🌵",cake:"🍰",calendar:"📆",call_me_hand:"🤙",calling:"📲",camel:"🐫",camera:"📷",camera_flash:"📸",camping:"🏕",cancer:"♋️",candle:"🕯",candy:"🍬",canoe:"🛶",capital_abcd:"🔠",capricorn:"♑️",car:"🚗",card_file_box:"🗃",card_index:"📇",card_index_dividers:"🗂",carousel_horse:"🎠",carrot:"🥕",cat:"🐱",cat2:"🐈",cd:"💿",chains:"⛓",champagne:"🍾",chart:"💹",chart_with_downwards_trend:"📉",chart_with_upwards_trend:"📈",checkered_flag:"🏁",cheese:"🧀",cherries:"🍒",cherry_blossom:"🌸",chestnut:"🌰",chicken:"🐔",children_crossing:"🚸",chipmunk:"🐿",chocolate_bar:"🍫",christmas_tree:"🎄",church:"⛪️",cinema:"🎦",circus_tent:"🎪",city_sunrise:"🌇",city_sunset:"🌆",cityscape:"🏙",cl:"🆑",clamp:"🗜",clap:"👏",clapper:"🎬",classical_building:"🏛",clinking_glasses:"🥂",clipboard:"📋",clock1:"🕐",clock10:"🕙",clock1030:"🕥",clock11:"🕚",clock1130:"🕦",clock12:"🕛",clock1230:"🕧",clock130:"🕜",clock2:"🕑",clock230:"🕝",clock3:"🕒",clock330:"🕞",clock4:"🕓",clock430:"🕟",clock5:"🕔",clock530:"🕠",clock6:"🕕",clock630:"🕡",clock7:"🕖",clock730:"🕢",clock8:"🕗",clock830:"🕣",clock9:"🕘",clock930:"🕤",closed_book:"📕",closed_lock_with_key:"🔐",closed_umbrella:"🌂",cloud:"☁️",cloud_with_lightning:"🌩",cloud_with_lightning_and_rain:"⛈",cloud_with_rain:"🌧",cloud_with_snow:"🌨",clown_face:"🤡",clubs:"♣️",cocktail:"🍸",coffee:"☕️",coffin:"⚰️",cold_sweat:"😰",comet:"☄️",computer:"💻",computer_mouse:"🖱",confetti_ball:"🎊",confounded:"😖",confused:"😕",congratulations:"㊗️",construction:"🚧",construction_worker_man:"👷",construction_worker_woman:"👷&zwj;♀️",control_knobs:"🎛",convenience_store:"🏪",cookie:"🍪",cool:"🆒",policeman:"👮",copyright:"©️",corn:"🌽",couch_and_lamp:"🛋",couple:"👫",couple_with_heart_woman_man:"💑",couple_with_heart_man_man:"👨&zwj;❤️&zwj;👨",couple_with_heart_woman_woman:"👩&zwj;❤️&zwj;👩",couplekiss_man_man:"👨&zwj;❤️&zwj;💋&zwj;👨",couplekiss_man_woman:"💏",couplekiss_woman_woman:"👩&zwj;❤️&zwj;💋&zwj;👩",cow:"🐮",cow2:"🐄",cowboy_hat_face:"🤠",crab:"🦀",crayon:"🖍",credit_card:"💳",crescent_moon:"🌙",cricket:"🏏",crocodile:"🐊",croissant:"🥐",crossed_fingers:"🤞",crossed_flags:"🎌",crossed_swords:"⚔️",crown:"👑",cry:"😢",crying_cat_face:"😿",crystal_ball:"🔮",cucumber:"🥒",cupid:"💘",curly_loop:"➰",currency_exchange:"💱",curry:"🍛",custard:"🍮",customs:"🛃",cyclone:"🌀",dagger:"🗡",dancer:"💃",dancing_women:"👯",dancing_men:"👯&zwj;♂️",dango:"🍡",dark_sunglasses:"🕶",dart:"🎯",dash:"💨",date:"📅",deciduous_tree:"🌳",deer:"🦌",department_store:"🏬",derelict_house:"🏚",desert:"🏜",desert_island:"🏝",desktop_computer:"🖥",male_detective:"🕵️",diamond_shape_with_a_dot_inside:"💠",diamonds:"♦️",disappointed:"😞",disappointed_relieved:"😥",dizzy:"💫",dizzy_face:"😵",do_not_litter:"🚯",dog:"🐶",dog2:"🐕",dollar:"💵",dolls:"🎎",dolphin:"🐬",door:"🚪",doughnut:"🍩",dove:"🕊",dragon:"🐉",dragon_face:"🐲",dress:"👗",dromedary_camel:"🐪",drooling_face:"🤤",droplet:"💧",drum:"🥁",duck:"🦆",dvd:"📀","e-mail":"📧",eagle:"🦅",ear:"👂",ear_of_rice:"🌾",earth_africa:"🌍",earth_americas:"🌎",earth_asia:"🌏",egg:"🥚",eggplant:"🍆",eight_pointed_black_star:"✴️",eight_spoked_asterisk:"✳️",electric_plug:"🔌",elephant:"🐘",email:"✉️",end:"🔚",envelope_with_arrow:"📩",euro:"💶",european_castle:"🏰",european_post_office:"🏤",evergreen_tree:"🌲",exclamation:"❗️",expressionless:"😑",eye:"👁",eye_speech_bubble:"👁&zwj;🗨",eyeglasses:"👓",eyes:"👀",face_with_head_bandage:"🤕",face_with_thermometer:"🤒",fist_oncoming:"👊",factory:"🏭",fallen_leaf:"🍂",family_man_woman_boy:"👪",family_man_boy:"👨&zwj;👦",family_man_boy_boy:"👨&zwj;👦&zwj;👦",family_man_girl:"👨&zwj;👧",family_man_girl_boy:"👨&zwj;👧&zwj;👦",family_man_girl_girl:"👨&zwj;👧&zwj;👧",family_man_man_boy:"👨&zwj;👨&zwj;👦",family_man_man_boy_boy:"👨&zwj;👨&zwj;👦&zwj;👦",family_man_man_girl:"👨&zwj;👨&zwj;👧",family_man_man_girl_boy:"👨&zwj;👨&zwj;👧&zwj;👦",family_man_man_girl_girl:"👨&zwj;👨&zwj;👧&zwj;👧",family_man_woman_boy_boy:"👨&zwj;👩&zwj;👦&zwj;👦",family_man_woman_girl:"👨&zwj;👩&zwj;👧",family_man_woman_girl_boy:"👨&zwj;👩&zwj;👧&zwj;👦",family_man_woman_girl_girl:"👨&zwj;👩&zwj;👧&zwj;👧",family_woman_boy:"👩&zwj;👦",family_woman_boy_boy:"👩&zwj;👦&zwj;👦",family_woman_girl:"👩&zwj;👧",family_woman_girl_boy:"👩&zwj;👧&zwj;👦",family_woman_girl_girl:"👩&zwj;👧&zwj;👧",family_woman_woman_boy:"👩&zwj;👩&zwj;👦",family_woman_woman_boy_boy:"👩&zwj;👩&zwj;👦&zwj;👦",family_woman_woman_girl:"👩&zwj;👩&zwj;👧",family_woman_woman_girl_boy:"👩&zwj;👩&zwj;👧&zwj;👦",family_woman_woman_girl_girl:"👩&zwj;👩&zwj;👧&zwj;👧",fast_forward:"⏩",fax:"📠",fearful:"😨",feet:"🐾",female_detective:"🕵️&zwj;♀️",ferris_wheel:"🎡",ferry:"⛴",field_hockey:"🏑",file_cabinet:"🗄",file_folder:"📁",film_projector:"📽",film_strip:"🎞",fire:"🔥",fire_engine:"🚒",fireworks:"🎆",first_quarter_moon:"🌓",first_quarter_moon_with_face:"🌛",fish:"🐟",fish_cake:"🍥",fishing_pole_and_fish:"🎣",fist_raised:"✊",fist_left:"🤛",fist_right:"🤜",flags:"🎏",flashlight:"🔦",fleur_de_lis:"⚜️",flight_arrival:"🛬",flight_departure:"🛫",floppy_disk:"💾",flower_playing_cards:"🎴",flushed:"😳",fog:"🌫",foggy:"🌁",football:"🏈",footprints:"👣",fork_and_knife:"🍴",fountain:"⛲️",fountain_pen:"🖋",four_leaf_clover:"🍀",fox_face:"🦊",framed_picture:"🖼",free:"🆓",fried_egg:"🍳",fried_shrimp:"🍤",fries:"🍟",frog:"🐸",frowning:"😦",frowning_face:"☹️",frowning_man:"🙍&zwj;♂️",frowning_woman:"🙍",middle_finger:"🖕",fuelpump:"⛽️",full_moon:"🌕",full_moon_with_face:"🌝",funeral_urn:"⚱️",game_die:"🎲",gear:"⚙️",gem:"💎",gemini:"♊️",ghost:"👻",gift:"🎁",gift_heart:"💝",girl:"👧",globe_with_meridians:"🌐",goal_net:"🥅",goat:"🐐",golf:"⛳️",golfing_man:"🏌️",golfing_woman:"🏌️&zwj;♀️",gorilla:"🦍",grapes:"🍇",green_apple:"🍏",green_book:"📗",green_heart:"💚",green_salad:"🥗",grey_exclamation:"❕",grey_question:"❔",grimacing:"😬",grin:"😁",grinning:"😀",guardsman:"💂",guardswoman:"💂&zwj;♀️",guitar:"🎸",gun:"🔫",haircut_woman:"💇",haircut_man:"💇&zwj;♂️",hamburger:"🍔",hammer:"🔨",hammer_and_pick:"⚒",hammer_and_wrench:"🛠",hamster:"🐹",hand:"✋",handbag:"👜",handshake:"🤝",hankey:"💩",hatched_chick:"🐥",hatching_chick:"🐣",headphones:"🎧",hear_no_evil:"🙉",heart:"❤️",heart_decoration:"💟",heart_eyes:"😍",heart_eyes_cat:"😻",heartbeat:"💓",heartpulse:"💗",hearts:"♥️",heavy_check_mark:"✔️",heavy_division_sign:"➗",heavy_dollar_sign:"💲",heavy_heart_exclamation:"❣️",heavy_minus_sign:"➖",heavy_multiplication_x:"✖️",heavy_plus_sign:"➕",helicopter:"🚁",herb:"🌿",hibiscus:"🌺",high_brightness:"🔆",high_heel:"👠",hocho:"🔪",hole:"🕳",honey_pot:"🍯",horse:"🐴",horse_racing:"🏇",hospital:"🏥",hot_pepper:"🌶",hotdog:"🌭",hotel:"🏨",hotsprings:"♨️",hourglass:"⌛️",hourglass_flowing_sand:"⏳",house:"🏠",house_with_garden:"🏡",houses:"🏘",hugs:"🤗",hushed:"😯",ice_cream:"🍨",ice_hockey:"🏒",ice_skate:"⛸",icecream:"🍦",id:"🆔",ideograph_advantage:"🉐",imp:"👿",inbox_tray:"📥",incoming_envelope:"📨",tipping_hand_woman:"💁",information_source:"ℹ️",innocent:"😇",interrobang:"⁉️",iphone:"📱",izakaya_lantern:"🏮",jack_o_lantern:"🎃",japan:"🗾",japanese_castle:"🏯",japanese_goblin:"👺",japanese_ogre:"👹",jeans:"👖",joy:"😂",joy_cat:"😹",joystick:"🕹",kaaba:"🕋",key:"🔑",keyboard:"⌨️",keycap_ten:"🔟",kick_scooter:"🛴",kimono:"👘",kiss:"💋",kissing:"😗",kissing_cat:"😽",kissing_closed_eyes:"😚",kissing_heart:"😘",kissing_smiling_eyes:"😙",kiwi_fruit:"🥝",koala:"🐨",koko:"🈁",label:"🏷",large_blue_circle:"🔵",large_blue_diamond:"🔷",large_orange_diamond:"🔶",last_quarter_moon:"🌗",last_quarter_moon_with_face:"🌜",latin_cross:"✝️",laughing:"😆",leaves:"🍃",ledger:"📒",left_luggage:"🛅",left_right_arrow:"↔️",leftwards_arrow_with_hook:"↩️",lemon:"🍋",leo:"♌️",leopard:"🐆",level_slider:"🎚",libra:"♎️",light_rail:"🚈",link:"🔗",lion:"🦁",lips:"👄",lipstick:"💄",lizard:"🦎",lock:"🔒",lock_with_ink_pen:"🔏",lollipop:"🍭",loop:"➿",loud_sound:"🔊",loudspeaker:"📢",love_hotel:"🏩",love_letter:"💌",low_brightness:"🔅",lying_face:"🤥",m:"Ⓜ️",mag:"🔍",mag_right:"🔎",mahjong:"🀄️",mailbox:"📫",mailbox_closed:"📪",mailbox_with_mail:"📬",mailbox_with_no_mail:"📭",man:"👨",man_artist:"👨&zwj;🎨",man_astronaut:"👨&zwj;🚀",man_cartwheeling:"🤸&zwj;♂️",man_cook:"👨&zwj;🍳",man_dancing:"🕺",man_facepalming:"🤦&zwj;♂️",man_factory_worker:"👨&zwj;🏭",man_farmer:"👨&zwj;🌾",man_firefighter:"👨&zwj;🚒",man_health_worker:"👨&zwj;⚕️",man_in_tuxedo:"🤵",man_judge:"👨&zwj;⚖️",man_juggling:"🤹&zwj;♂️",man_mechanic:"👨&zwj;🔧",man_office_worker:"👨&zwj;💼",man_pilot:"👨&zwj;✈️",man_playing_handball:"🤾&zwj;♂️",man_playing_water_polo:"🤽&zwj;♂️",man_scientist:"👨&zwj;🔬",man_shrugging:"🤷&zwj;♂️",man_singer:"👨&zwj;🎤",man_student:"👨&zwj;🎓",man_teacher:"👨&zwj;🏫",man_technologist:"👨&zwj;💻",man_with_gua_pi_mao:"👲",man_with_turban:"👳",tangerine:"🍊",mans_shoe:"👞",mantelpiece_clock:"🕰",maple_leaf:"🍁",martial_arts_uniform:"🥋",mask:"😷",massage_woman:"💆",massage_man:"💆&zwj;♂️",meat_on_bone:"🍖",medal_military:"🎖",medal_sports:"🏅",mega:"📣",melon:"🍈",memo:"📝",men_wrestling:"🤼&zwj;♂️",menorah:"🕎",mens:"🚹",metal:"🤘",metro:"🚇",microphone:"🎤",microscope:"🔬",milk_glass:"🥛",milky_way:"🌌",minibus:"🚐",minidisc:"💽",mobile_phone_off:"📴",money_mouth_face:"🤑",money_with_wings:"💸",moneybag:"💰",monkey:"🐒",monkey_face:"🐵",monorail:"🚝",moon:"🌔",mortar_board:"🎓",mosque:"🕌",motor_boat:"🛥",motor_scooter:"🛵",motorcycle:"🏍",motorway:"🛣",mount_fuji:"🗻",mountain:"⛰",mountain_biking_man:"🚵",mountain_biking_woman:"🚵&zwj;♀️",mountain_cableway:"🚠",mountain_railway:"🚞",mountain_snow:"🏔",mouse:"🐭",mouse2:"🐁",movie_camera:"🎥",moyai:"🗿",mrs_claus:"🤶",muscle:"💪",mushroom:"🍄",musical_keyboard:"🎹",musical_note:"🎵",musical_score:"🎼",mute:"🔇",nail_care:"💅",name_badge:"📛",national_park:"🏞",nauseated_face:"🤢",necktie:"👔",negative_squared_cross_mark:"❎",nerd_face:"🤓",neutral_face:"😐",new:"🆕",new_moon:"🌑",new_moon_with_face:"🌚",newspaper:"📰",newspaper_roll:"🗞",next_track_button:"⏭",ng:"🆖",no_good_man:"🙅&zwj;♂️",no_good_woman:"🙅",night_with_stars:"🌃",no_bell:"🔕",no_bicycles:"🚳",no_entry:"⛔️",no_entry_sign:"🚫",no_mobile_phones:"📵",no_mouth:"😶",no_pedestrians:"🚷",no_smoking:"🚭","non-potable_water":"🚱",nose:"👃",notebook:"📓",notebook_with_decorative_cover:"📔",notes:"🎶",nut_and_bolt:"🔩",o:"⭕️",o2:"🅾️",ocean:"🌊",octopus:"🐙",oden:"🍢",office:"🏢",oil_drum:"🛢",ok:"🆗",ok_hand:"👌",ok_man:"🙆&zwj;♂️",ok_woman:"🙆",old_key:"🗝",older_man:"👴",older_woman:"👵",om:"🕉",on:"🔛",oncoming_automobile:"🚘",oncoming_bus:"🚍",oncoming_police_car:"🚔",oncoming_taxi:"🚖",open_file_folder:"📂",open_hands:"👐",open_mouth:"😮",open_umbrella:"☂️",ophiuchus:"⛎",orange_book:"📙",orthodox_cross:"☦️",outbox_tray:"📤",owl:"🦉",ox:"🐂",package:"📦",page_facing_up:"📄",page_with_curl:"📃",pager:"📟",paintbrush:"🖌",palm_tree:"🌴",pancakes:"🥞",panda_face:"🐼",paperclip:"📎",paperclips:"🖇",parasol_on_ground:"⛱",parking:"🅿️",part_alternation_mark:"〽️",partly_sunny:"⛅️",passenger_ship:"🛳",passport_control:"🛂",pause_button:"⏸",peace_symbol:"☮️",peach:"🍑",peanuts:"🥜",pear:"🍐",pen:"🖊",pencil2:"✏️",penguin:"🐧",pensive:"😔",performing_arts:"🎭",persevere:"😣",person_fencing:"🤺",pouting_woman:"🙎",phone:"☎️",pick:"⛏",pig:"🐷",pig2:"🐖",pig_nose:"🐽",pill:"💊",pineapple:"🍍",ping_pong:"🏓",pisces:"♓️",pizza:"🍕",place_of_worship:"🛐",plate_with_cutlery:"🍽",play_or_pause_button:"⏯",point_down:"👇",point_left:"👈",point_right:"👉",point_up:"☝️",point_up_2:"👆",police_car:"🚓",policewoman:"👮&zwj;♀️",poodle:"🐩",popcorn:"🍿",post_office:"🏣",postal_horn:"📯",postbox:"📮",potable_water:"🚰",potato:"🥔",pouch:"👝",poultry_leg:"🍗",pound:"💷",rage:"😡",pouting_cat:"😾",pouting_man:"🙎&zwj;♂️",pray:"🙏",prayer_beads:"📿",pregnant_woman:"🤰",previous_track_button:"⏮",prince:"🤴",princess:"👸",printer:"🖨",purple_heart:"💜",purse:"👛",pushpin:"📌",put_litter_in_its_place:"🚮",question:"❓",rabbit:"🐰",rabbit2:"🐇",racehorse:"🐎",racing_car:"🏎",radio:"📻",radio_button:"🔘",radioactive:"☢️",railway_car:"🚃",railway_track:"🛤",rainbow:"🌈",rainbow_flag:"🏳️&zwj;🌈",raised_back_of_hand:"🤚",raised_hand_with_fingers_splayed:"🖐",raised_hands:"🙌",raising_hand_woman:"🙋",raising_hand_man:"🙋&zwj;♂️",ram:"🐏",ramen:"🍜",rat:"🐀",record_button:"⏺",recycle:"♻️",red_circle:"🔴",registered:"®️",relaxed:"☺️",relieved:"😌",reminder_ribbon:"🎗",repeat:"🔁",repeat_one:"🔂",rescue_worker_helmet:"⛑",restroom:"🚻",revolving_hearts:"💞",rewind:"⏪",rhinoceros:"🦏",ribbon:"🎀",rice:"🍚",rice_ball:"🍙",rice_cracker:"🍘",rice_scene:"🎑",right_anger_bubble:"🗯",ring:"💍",robot:"🤖",rocket:"🚀",rofl:"🤣",roll_eyes:"🙄",roller_coaster:"🎢",rooster:"🐓",rose:"🌹",rosette:"🏵",rotating_light:"🚨",round_pushpin:"📍",rowing_man:"🚣",rowing_woman:"🚣&zwj;♀️",rugby_football:"🏉",running_man:"🏃",running_shirt_with_sash:"🎽",running_woman:"🏃&zwj;♀️",sa:"🈂️",sagittarius:"♐️",sake:"🍶",sandal:"👡",santa:"🎅",satellite:"📡",saxophone:"🎷",school:"🏫",school_satchel:"🎒",scissors:"✂️",scorpion:"🦂",scorpius:"♏️",scream:"😱",scream_cat:"🙀",scroll:"📜",seat:"💺",secret:"㊙️",see_no_evil:"🙈",seedling:"🌱",selfie:"🤳",shallow_pan_of_food:"🥘",shamrock:"☘️",shark:"🦈",shaved_ice:"🍧",sheep:"🐑",shell:"🐚",shield:"🛡",shinto_shrine:"⛩",ship:"🚢",shirt:"👕",shopping:"🛍",shopping_cart:"🛒",shower:"🚿",shrimp:"🦐",signal_strength:"📶",six_pointed_star:"🔯",ski:"🎿",skier:"⛷",skull:"💀",skull_and_crossbones:"☠️",sleeping:"😴",sleeping_bed:"🛌",sleepy:"😪",slightly_frowning_face:"🙁",slightly_smiling_face:"🙂",slot_machine:"🎰",small_airplane:"🛩",small_blue_diamond:"🔹",small_orange_diamond:"🔸",small_red_triangle:"🔺",small_red_triangle_down:"🔻",smile:"😄",smile_cat:"😸",smiley:"😃",smiley_cat:"😺",smiling_imp:"😈",smirk:"😏",smirk_cat:"😼",smoking:"🚬",snail:"🐌",snake:"🐍",sneezing_face:"🤧",snowboarder:"🏂",snowflake:"❄️",snowman:"⛄️",snowman_with_snow:"☃️",sob:"😭",soccer:"⚽️",soon:"🔜",sos:"🆘",sound:"🔉",space_invader:"👾",spades:"♠️",spaghetti:"🍝",sparkle:"❇️",sparkler:"🎇",sparkles:"✨",sparkling_heart:"💖",speak_no_evil:"🙊",speaker:"🔈",speaking_head:"🗣",speech_balloon:"💬",speedboat:"🚤",spider:"🕷",spider_web:"🕸",spiral_calendar:"🗓",spiral_notepad:"🗒",spoon:"🥄",squid:"🦑",stadium:"🏟",star:"⭐️",star2:"🌟",star_and_crescent:"☪️",star_of_david:"✡️",stars:"🌠",station:"🚉",statue_of_liberty:"🗽",steam_locomotive:"🚂",stew:"🍲",stop_button:"⏹",stop_sign:"🛑",stopwatch:"⏱",straight_ruler:"📏",strawberry:"🍓",stuck_out_tongue:"😛",stuck_out_tongue_closed_eyes:"😝",stuck_out_tongue_winking_eye:"😜",studio_microphone:"🎙",stuffed_flatbread:"🥙",sun_behind_large_cloud:"🌥",sun_behind_rain_cloud:"🌦",sun_behind_small_cloud:"🌤",sun_with_face:"🌞",sunflower:"🌻",sunglasses:"😎",sunny:"☀️",sunrise:"🌅",sunrise_over_mountains:"🌄",surfing_man:"🏄",surfing_woman:"🏄&zwj;♀️",sushi:"🍣",suspension_railway:"🚟",sweat:"😓",sweat_drops:"💦",sweat_smile:"😅",sweet_potato:"🍠",swimming_man:"🏊",swimming_woman:"🏊&zwj;♀️",symbols:"🔣",synagogue:"🕍",syringe:"💉",taco:"🌮",tada:"🎉",tanabata_tree:"🎋",taurus:"♉️",taxi:"🚕",tea:"🍵",telephone_receiver:"📞",telescope:"🔭",tennis:"🎾",tent:"⛺️",thermometer:"🌡",thinking:"🤔",thought_balloon:"💭",ticket:"🎫",tickets:"🎟",tiger:"🐯",tiger2:"🐅",timer_clock:"⏲",tipping_hand_man:"💁&zwj;♂️",tired_face:"😫",tm:"™️",toilet:"🚽",tokyo_tower:"🗼",tomato:"🍅",tongue:"👅",top:"🔝",tophat:"🎩",tornado:"🌪",trackball:"🖲",tractor:"🚜",traffic_light:"🚥",train:"🚋",train2:"🚆",tram:"🚊",triangular_flag_on_post:"🚩",triangular_ruler:"📐",trident:"🔱",triumph:"😤",trolleybus:"🚎",trophy:"🏆",tropical_drink:"🍹",tropical_fish:"🐠",truck:"🚚",trumpet:"🎺",tulip:"🌷",tumbler_glass:"🥃",turkey:"🦃",turtle:"🐢",tv:"📺",twisted_rightwards_arrows:"🔀",two_hearts:"💕",two_men_holding_hands:"👬",two_women_holding_hands:"👭",u5272:"🈹",u5408:"🈴",u55b6:"🈺",u6307:"🈯️",u6708:"🈷️",u6709:"🈶",u6e80:"🈵",u7121:"🈚️",u7533:"🈸",u7981:"🈲",u7a7a:"🈳",umbrella:"☔️",unamused:"😒",underage:"🔞",unicorn:"🦄",unlock:"🔓",up:"🆙",upside_down_face:"🙃",v:"✌️",vertical_traffic_light:"🚦",vhs:"📼",vibration_mode:"📳",video_camera:"📹",video_game:"🎮",violin:"🎻",virgo:"♍️",volcano:"🌋",volleyball:"🏐",vs:"🆚",vulcan_salute:"🖖",walking_man:"🚶",walking_woman:"🚶&zwj;♀️",waning_crescent_moon:"🌘",waning_gibbous_moon:"🌖",warning:"⚠️",wastebasket:"🗑",watch:"⌚️",water_buffalo:"🐃",watermelon:"🍉",wave:"👋",wavy_dash:"〰️",waxing_crescent_moon:"🌒",wc:"🚾",weary:"😩",wedding:"💒",weight_lifting_man:"🏋️",weight_lifting_woman:"🏋️&zwj;♀️",whale:"🐳",whale2:"🐋",wheel_of_dharma:"☸️",wheelchair:"♿️",white_check_mark:"✅",white_circle:"⚪️",white_flag:"🏳️",white_flower:"💮",white_large_square:"⬜️",white_medium_small_square:"◽️",white_medium_square:"◻️",white_small_square:"▫️",white_square_button:"🔳",wilted_flower:"🥀",wind_chime:"🎐",wind_face:"🌬",wine_glass:"🍷",wink:"😉",wolf:"🐺",woman:"👩",woman_artist:"👩&zwj;🎨",woman_astronaut:"👩&zwj;🚀",woman_cartwheeling:"🤸&zwj;♀️",woman_cook:"👩&zwj;🍳",woman_facepalming:"🤦&zwj;♀️",woman_factory_worker:"👩&zwj;🏭",woman_farmer:"👩&zwj;🌾",woman_firefighter:"👩&zwj;🚒",woman_health_worker:"👩&zwj;⚕️",woman_judge:"👩&zwj;⚖️",woman_juggling:"🤹&zwj;♀️",woman_mechanic:"👩&zwj;🔧",woman_office_worker:"👩&zwj;💼",woman_pilot:"👩&zwj;✈️",woman_playing_handball:"🤾&zwj;♀️",woman_playing_water_polo:"🤽&zwj;♀️",woman_scientist:"👩&zwj;🔬",woman_shrugging:"🤷&zwj;♀️",woman_singer:"👩&zwj;🎤",woman_student:"👩&zwj;🎓",woman_teacher:"👩&zwj;🏫",woman_technologist:"👩&zwj;💻",woman_with_turban:"👳&zwj;♀️",womans_clothes:"👚",womans_hat:"👒",women_wrestling:"🤼&zwj;♀️",womens:"🚺",world_map:"🗺",worried:"😟",wrench:"🔧",writing_hand:"✍️",x:"❌",yellow_heart:"💛",yen:"💴",yin_yang:"☯️",yum:"😋",zap:"⚡️",zipper_mouth_face:"🤐",zzz:"💤",octocat:'<img alt=":octocat:" height="20" width="20" align="absmiddle" src="https://assets-cdn.github.com/images/icons/emoji/octocat.png">',showdown:"<span style=\"font-family: 'Anonymous Pro', monospace; text-decoration: underline; text-decoration-style: dashed; text-decoration-color: #3e8b8a;text-underline-position: under;\">S</span>"},w.Converter=function(t){var a={},i=[],s=[],n={},r=R,o={parsed:{},raw:"",format:""};function c(e,t){if(t=t||null,w.helper.isString(e)){if(t=e=w.helper.stdExtName(e),w.extensions[e])return void function(e,t){"function"==typeof e&&(e=e(new w.Converter)),w.helper.isArray(e)||(e=[e]);var n=I(e,t);if(!n.valid)throw Error(n.error);for(var r=0;r<e.length;++r)switch(e[r].type){case"lang":i.push(e[r]);break;case"output":s.push(e[r]);break;default:throw Error("Extension loader error: Type unrecognized!!!")}}(w.extensions[e],e);if(w.helper.isUndefined(T[e]))throw Error('Extension "'+e+'" could not be loaded. It was either not found or is not a valid extension.');e=T[e]}"function"==typeof e&&(e=e()),w.helper.isArray(e)||(e=[e]);var n=I(e,t);if(!n.valid)throw Error(n.error);for(var r=0;r<e.length;++r){switch(e[r].type){case"lang":i.push(e[r]);break;case"output":s.push(e[r])}if(e[r].hasOwnProperty("listeners"))for(var a in e[r].listeners)e[r].listeners.hasOwnProperty(a)&&l(a,e[r].listeners[a])}}function l(t,r){if(!w.helper.isString(t))throw Error("Invalid argument in converter.listen() method: name must be a string, but "+e(t)+" given");if("function"!=typeof r)throw Error("Invalid argument in converter.listen() method: callback must be a function, but "+e(r)+" given");n.hasOwnProperty(t)||(n[t]=[]),n[t].push(r)}!function(){for(var n in t=t||{},A)A.hasOwnProperty(n)&&(a[n]=A[n]);if("object"!==e(t))throw Error("Converter expects the passed parameter to be an object, but "+e(t)+" was passed instead.");for(var r in t)t.hasOwnProperty(r)&&(a[r]=t[r]);a.extensions&&w.helper.forEach(a.extensions,c)}(),this._dispatch=function(e,t,r,o){if(n.hasOwnProperty(e))for(var a=0;a<n[e].length;++a){var c=n[e][a](e,t,this,r,o);c&&void 0!==c&&(t=c)}return t},this.listen=function(e,t){return l(e,t),this},this.makeHtml=function(e){if(!e)return e;var t={gHtmlBlocks:[],gHtmlMdBlocks:[],gHtmlSpans:[],gUrls:{},gTitles:{},gDimensions:{},gListLevel:0,hashLinkCounts:{},langExtensions:i,outputModifiers:s,converter:this,ghCodeBlocks:[],metadata:{parsed:{},raw:"",format:""}};return e=(e=(e=(e=(e=e.replace(/\xa8/g,"¨T")).replace(/\$/g,"¨D")).replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/\u00A0/g,"&nbsp;"),a.smartIndentationFix&&(e=function(e){var t=e.match(/^\s*/)[0].length,n=new RegExp("^\\s{0,"+t+"}","gm");return e.replace(n,"")}(e)),e="\n\n"+e+"\n\n",e=(e=w.subParser("detab")(e,a,t)).replace(/^[ \t]+$/gm,""),w.helper.forEach(i,(function(n){e=w.subParser("runExtension")(n,e,a,t)})),e=w.subParser("metadata")(e,a,t),e=w.subParser("hashPreCodeTags")(e,a,t),e=w.subParser("githubCodeBlocks")(e,a,t),e=w.subParser("hashHTMLBlocks")(e,a,t),e=w.subParser("hashCodeTags")(e,a,t),e=w.subParser("stripLinkDefinitions")(e,a,t),e=w.subParser("blockGamut")(e,a,t),e=w.subParser("unhashHTMLSpans")(e,a,t),e=(e=(e=w.subParser("unescapeSpecialChars")(e,a,t)).replace(/\xa8D/g,"$$")).replace(/\xa8T/g,"¨"),e=w.subParser("completeHTMLDocument")(e,a,t),w.helper.forEach(s,(function(n){e=w.subParser("runExtension")(n,e,a,t)})),o=t.metadata,e},this.makeMarkdown=this.makeMd=function(e,t){if(e=(e=(e=e.replace(/\r\n/g,"\n")).replace(/\r/g,"\n")).replace(/>[ \t]+</,">¨NBSP;<"),!t){if(!window||!window.document)throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");t=window.document}var n=t.createElement("div");n.innerHTML=e;var r={preList:function(e){for(var t=e.querySelectorAll("pre"),n=[],r=0;r<t.length;++r)if(1===t[r].childElementCount&&"code"===t[r].firstChild.tagName.toLowerCase()){var a=t[r].firstChild.innerHTML.trim(),o=t[r].firstChild.getAttribute("data-language")||"";if(""===o)for(var i=t[r].firstChild.className.split(" "),s=0;s<i.length;++s){var c=i[s].match(/^language-(.+)$/);if(null!==c){o=c[1];break}}a=w.helper.unescapeHTMLEntities(a),n.push(a),t[r].outerHTML='<precode language="'+o+'" precodenum="'+r.toString()+'"></precode>'}else n.push(t[r].innerHTML),t[r].innerHTML="",t[r].setAttribute("prenum",r.toString());return n}(n)};!function s(e){for(var t=0;t<e.childNodes.length;++t){var n=e.childNodes[t];3===n.nodeType?/\S/.test(n.nodeValue)?(n.nodeValue=n.nodeValue.split("\n").join(" "),n.nodeValue=n.nodeValue.replace(/(\s)+/g,"$1")):(e.removeChild(n),--t):1===n.nodeType&&s(n)}}(n);for(var a=n.childNodes,o="",i=0;i<a.length;i++)o+=w.subParser("makeMarkdown.node")(a[i],r);return o},this.setOption=function(e,t){a[e]=t},this.getOption=function(e){return a[e]},this.getOptions=function(){return a},this.addExtension=function(e,t){c(e,t=t||null)},this.useExtension=function(e){c(e)},this.setFlavor=function(e){if(!O.hasOwnProperty(e))throw Error(e+" flavor was not found");var t=O[e];for(var n in r=e,t)t.hasOwnProperty(n)&&(a[n]=t[n])},this.getFlavor=function(){return r},this.removeExtension=function(e){w.helper.isArray(e)||(e=[e]);for(var t=0;t<e.length;++t){for(var n=e[t],r=0;r<i.length;++r)i[r]===n&&i[r].splice(r,1);for(;0<s.length;++r)s[0]===n&&s[0].splice(r,1)}},this.getAllExtensions=function(){return{language:i,output:s}},this.getMetadata=function(e){return e?o.raw:o.parsed},this.getMetadataFormat=function(){return o.format},this._setMetadataPair=function(e,t){o.parsed[e]=t},this._setMetadataFormat=function(e){o.format=e},this._setMetadataRaw=function(e){o.raw=e}},w.subParser("anchors",(function(e,t,n){var r=function(e,r,o,c,a,l,i){if(w.helper.isUndefined(i)&&(i=""),o=o.toLowerCase(),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))c="";else if(!c){if(o||(o=r.toLowerCase().replace(/ ?\n/g," ")),c="#"+o,w.helper.isUndefined(n.gUrls[o]))return e;c=n.gUrls[o],w.helper.isUndefined(n.gTitles[o])||(i=n.gTitles[o])}var s='<a href="'+(c=c.replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback))+'"';return""!==i&&null!==i&&(s+=' title="'+(i=(i=i.replace(/"/g,"&quot;")).replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback))+'"'),t.openLinksInNewWindow&&!/^#/.test(c)&&(s+=' rel="noopener noreferrer" target="¨E95Eblank"'),s+">"+r+"</a>"};return e=(e=(e=(e=(e=n.converter._dispatch("anchors.before",e,t,n)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,r)).replace(/\[([^\[\]]+)]()()()()()/g,r),t.ghMentions&&(e=e.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gim,(function(e,n,r,o,a){if("\\"===r)return n+o;if(!w.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var c=t.ghMentionsLink.replace(/\{u}/g,a),i="";return t.openLinksInNewWindow&&(i=' rel="noopener noreferrer" target="¨E95Eblank"'),n+'<a href="'+c+'"'+i+">"+o+"</a>"}))),n.converter._dispatch("anchors.after",e,t,n)}));var L=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,M=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,x=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,D=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gim,P=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,U=function(p){return function(e,t,n,r,a,o,i){var s=n=n.replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback),c="",l="",d=t||"",h=i||"";return/^www\./i.test(n)&&(n=n.replace(/^www\./i,"http://www.")),p.excludeTrailingPunctuationFromURLs&&o&&(c=o),p.openLinksInNewWindow&&(l=' rel="noopener noreferrer" target="¨E95Eblank"'),d+'<a href="'+n+'"'+l+">"+s+"</a>"+c+h}},B=function(a,e){return function(t,n,r){var o="mailto:";return n=n||"",r=w.subParser("unescapeSpecialChars")(r,a,e),a.encodeEmails?(o=w.helper.encodeEmailAddress(o+r),r=w.helper.encodeEmailAddress(r)):o+=r,n+'<a href="'+o+'">'+r+"</a>"}};return w.subParser("autoLinks",(function(e,t,n){return e=(e=(e=n.converter._dispatch("autoLinks.before",e,t,n)).replace(x,U(t))).replace(P,B(t,n)),n.converter._dispatch("autoLinks.after",e,t,n)})),w.subParser("simplifiedAutoLinks",(function(e,t,n){return t.simplifiedAutoLink?(e=n.converter._dispatch("simplifiedAutoLinks.before",e,t,n),e=(e=t.excludeTrailingPunctuationFromURLs?e.replace(M,U(t)):e.replace(L,U(t))).replace(D,B(t,n)),e=n.converter._dispatch("simplifiedAutoLinks.after",e,t,n)):e})),w.subParser("blockGamut",(function(e,t,n){return e=n.converter._dispatch("blockGamut.before",e,t,n),e=w.subParser("blockQuotes")(e,t,n),e=w.subParser("headers")(e,t,n),e=w.subParser("horizontalRule")(e,t,n),e=w.subParser("lists")(e,t,n),e=w.subParser("codeBlocks")(e,t,n),e=w.subParser("tables")(e,t,n),e=w.subParser("hashHTMLBlocks")(e,t,n),e=w.subParser("paragraphs")(e,t,n),n.converter._dispatch("blockGamut.after",e,t,n)})),w.subParser("blockQuotes",(function(e,t,n){e=n.converter._dispatch("blockQuotes.before",e,t,n),e+="\n\n";var r=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(r=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),e=e.replace(r,(function(e){return e=(e=(e=e.replace(/^[ \t]*>[ \t]?/gm,"")).replace(/\xa80/g,"")).replace(/^[ \t]+$/gm,""),e=w.subParser("githubCodeBlocks")(e,t,n),e=(e=(e=w.subParser("blockGamut")(e,t,n)).replace(/(^|\n)/g,"$1  ")).replace(/(\s*<pre>[^\r]+?<\/pre>)/gm,(function(e,t){var n=t;return(n=n.replace(/^ {2}/gm,"¨0")).replace(/\xa80/g,"")})),w.subParser("hashBlock")("<blockquote>\n"+e+"\n</blockquote>",t,n)})),n.converter._dispatch("blockQuotes.after",e,t,n)})),w.subParser("codeBlocks",(function(e,i,s){return e=s.converter._dispatch("codeBlocks.before",e,i,s),e=(e=(e+="¨0").replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=\xa80))/g,(function(e,t,n){var r=t,a=n,o="\n";return r=w.subParser("outdent")(r,i,s),r=w.subParser("encodeCode")(r,i,s),r=(r=(r=w.subParser("detab")(r,i,s)).replace(/^\n+/g,"")).replace(/\n+$/g,""),i.omitExtraWLInCodeBlocks&&(o=""),r="<pre><code>"+r+o+"</code></pre>",w.subParser("hashBlock")(r,i,s)+a}))).replace(/\xa80/,""),s.converter._dispatch("codeBlocks.after",e,i,s)})),w.subParser("codeSpans",(function(e,t,i){return void 0===(e=i.converter._dispatch("codeSpans.before",e,t,i))&&(e=""),e=e.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,(function(e,n,r,o){var a=o;return a=(a=a.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,""),a=n+"<code>"+(a=w.subParser("encodeCode")(a,t,i))+"</code>",w.subParser("hashHTMLSpans")(a,t,i)})),i.converter._dispatch("codeSpans.after",e,t,i)})),w.subParser("completeHTMLDocument",(function(e,t,n){if(!t.completeHTMLDocument)return e;e=n.converter._dispatch("completeHTMLDocument.before",e,t,n);var r="html",a="<!DOCTYPE HTML>\n",o="",i='<meta charset="utf-8">\n',s="",c="";for(var l in void 0!==n.metadata.parsed.doctype&&(a="<!DOCTYPE "+n.metadata.parsed.doctype+">\n","html"!==(r=n.metadata.parsed.doctype.toString().toLowerCase())&&"html5"!==r||(i='<meta charset="utf-8">')),n.metadata.parsed)if(n.metadata.parsed.hasOwnProperty(l))switch(l.toLowerCase()){case"doctype":break;case"title":o="<title>"+n.metadata.parsed.title+"</title>\n";break;case"charset":i="html"===r||"html5"===r?'<meta charset="'+n.metadata.parsed.charset+'">\n':'<meta name="charset" content="'+n.metadata.parsed.charset+'">\n';break;case"language":case"lang":s=' lang="'+n.metadata.parsed[l]+'"',c+='<meta name="'+l+'" content="'+n.metadata.parsed[l]+'">\n';break;default:c+='<meta name="'+l+'" content="'+n.metadata.parsed[l]+'">\n'}return e=a+"<html"+s+">\n<head>\n"+o+i+c+"</head>\n<body>\n"+e.trim()+"\n</body>\n</html>",n.converter._dispatch("completeHTMLDocument.after",e,t,n)})),w.subParser("detab",(function(e,t,n){return e=(e=(e=(e=(e=(e=n.converter._dispatch("detab.before",e,t,n)).replace(/\t(?=\t)/g,"    ")).replace(/\t/g,"¨A¨B")).replace(/\xa8B(.+?)\xa8A/g,(function(e,t){for(var n=t,r=4-n.length%4,a=0;a<r;a++)n+=" ";return n}))).replace(/\xa8A/g,"    ")).replace(/\xa8B/g,""),n.converter._dispatch("detab.after",e,t,n)})),w.subParser("ellipsis",(function(e,t,n){return e=(e=n.converter._dispatch("ellipsis.before",e,t,n)).replace(/\.\.\./g,"…"),n.converter._dispatch("ellipsis.after",e,t,n)})),w.subParser("emoji",(function(e,t,n){return t.emoji?(e=(e=n.converter._dispatch("emoji.before",e,t,n)).replace(/:([\S]+?):/g,(function(e,t){return w.helper.emojis.hasOwnProperty(t)?w.helper.emojis[t]:e})),n.converter._dispatch("emoji.after",e,t,n)):e})),w.subParser("encodeAmpsAndAngles",(function(e,t,n){return e=(e=(e=(e=(e=n.converter._dispatch("encodeAmpsAndAngles.before",e,t,n)).replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&amp;")).replace(/<(?![a-z\/?$!])/gi,"&lt;")).replace(/</g,"&lt;")).replace(/>/g,"&gt;"),n.converter._dispatch("encodeAmpsAndAngles.after",e,t,n)})),w.subParser("encodeBackslashEscapes",(function(e,t,n){return e=(e=(e=n.converter._dispatch("encodeBackslashEscapes.before",e,t,n)).replace(/\\(\\)/g,w.helper.escapeCharactersCallback)).replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,w.helper.escapeCharactersCallback),n.converter._dispatch("encodeBackslashEscapes.after",e,t,n)})),w.subParser("encodeCode",(function(e,t,n){return e=(e=n.converter._dispatch("encodeCode.before",e,t,n)).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/([*_{}\[\]\\=~-])/g,w.helper.escapeCharactersCallback),n.converter._dispatch("encodeCode.after",e,t,n)})),w.subParser("escapeSpecialCharsWithinTagAttributes",(function(e,t,n){return e=(e=(e=n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",e,t,n)).replace(/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,(function(e){return e.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,w.helper.escapeCharactersCallback)}))).replace(/<!(--(?:(?:[^>-]|-[^>])(?:[^-]|-[^-])*)--)>/gi,(function(e){return e.replace(/([\\`*_~=|])/g,w.helper.escapeCharactersCallback)})),n.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",e,t,n)})),w.subParser("githubCodeBlocks",(function(e,t,i){return t.ghCodeBlocks?(e=i.converter._dispatch("githubCodeBlocks.before",e,t,i),e=(e=(e+="¨0").replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,(function(e,n,r,o){var a=t.omitExtraWLInCodeBlocks?"":"\n";return o=w.subParser("encodeCode")(o,t,i),o="<pre><code"+(r?' class="'+r+" language-"+r+'"':"")+">"+(o=(o=(o=w.subParser("detab")(o,t,i)).replace(/^\n+/g,"")).replace(/\n+$/g,""))+a+"</code></pre>",o=w.subParser("hashBlock")(o,t,i),"\n\n¨G"+(i.ghCodeBlocks.push({text:e,codeblock:o})-1)+"G\n\n"}))).replace(/\xa80/,""),i.converter._dispatch("githubCodeBlocks.after",e,t,i)):e})),w.subParser("hashBlock",(function(e,t,n){return e=(e=n.converter._dispatch("hashBlock.before",e,t,n)).replace(/(^\n+|\n+$)/g,""),e="\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n",n.converter._dispatch("hashBlock.after",e,t,n)})),w.subParser("hashCodeTags",(function(e,t,i){e=i.converter._dispatch("hashCodeTags.before",e,t,i);var s=function(e,n,r,o){var a=r+w.subParser("encodeCode")(n,t,i)+o;return"¨C"+(i.gHtmlSpans.push(a)-1)+"C"};return e=w.helper.replaceRecursiveRegExp(e,s,"<code\\b[^>]*>","</code>","gim"),i.converter._dispatch("hashCodeTags.after",e,t,i)})),w.subParser("hashElement",(function(e,t,n){return function(e,t){var r=t;return r=(r=(r=r.replace(/\n\n/g,"\n")).replace(/^\n/,"")).replace(/\n+$/g,""),"\n\n¨K"+(n.gHtmlBlocks.push(r)-1)+"K\n\n"}})),w.subParser("hashHTMLBlocks",(function(e,t,n){e=n.converter._dispatch("hashHTMLBlocks.before",e,t,n);var r=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],i=function(e,t,r,o){var a=e;return-1!==r.search(/\bmarkdown\b/)&&(a=r+n.converter.makeHtml(t)+o),"\n\n¨K"+(n.gHtmlBlocks.push(a)-1)+"K\n\n"};t.backslashEscapesHTMLTags&&(e=e.replace(/\\<(\/?[^>]+?)>/g,(function(e,t){return"&lt;"+t+"&gt;"})));for(var o=0;o<r.length;++o)for(var a,s=new RegExp("^ {0,3}(<"+r[o]+"\\b[^>]*>)","im"),c="<"+r[o]+"\\b[^>]*>",l="</"+r[o]+">";-1!==(a=w.helper.regexIndexOf(e,s));){var d=w.helper.splitAtIndex(e,a),h=w.helper.replaceRecursiveRegExp(d[1],i,c,l,"im");if(h===d[1])break;e=d[0].concat(h)}return e=e.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,w.subParser("hashElement")(e,t,n)),e=(e=w.helper.replaceRecursiveRegExp(e,(function(e){return"\n\n¨K"+(n.gHtmlBlocks.push(e)-1)+"K\n\n"}),"^ {0,3}\x3c!--","--\x3e","gm")).replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,w.subParser("hashElement")(e,t,n)),n.converter._dispatch("hashHTMLBlocks.after",e,t,n)})),w.subParser("hashHTMLSpans",(function(e,t,n){function r(e){return"¨C"+(n.gHtmlSpans.push(e)-1)+"C"}return e=(e=(e=(e=(e=n.converter._dispatch("hashHTMLSpans.before",e,t,n)).replace(/<[^>]+?\/>/gi,(function(e){return r(e)}))).replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,(function(e){return r(e)}))).replace(/<[^>]+?>/gi,(function(e){return r(e)})),n.converter._dispatch("hashHTMLSpans.after",e,t,n)})),w.subParser("unhashHTMLSpans",(function(e,t,n){e=n.converter._dispatch("unhashHTMLSpans.before",e,t,n);for(var r=0;r<n.gHtmlSpans.length;++r){for(var a=n.gHtmlSpans[r],o=0;/\xa8C(\d+)C/.test(a);){var i=RegExp.$1;if(a=a.replace("¨C"+i+"C",n.gHtmlSpans[i]),10===o)break;++o}e=e.replace("¨C"+r+"C",a)}return n.converter._dispatch("unhashHTMLSpans.after",e,t,n)})),w.subParser("hashPreCodeTags",(function(e,t,i){e=i.converter._dispatch("hashPreCodeTags.before",e,t,i);var s=function(e,n,r,o){var a=r+w.subParser("encodeCode")(n,t,i)+o;return"\n\n¨G"+(i.ghCodeBlocks.push({text:e,codeblock:a})-1)+"G\n\n"};return e=w.helper.replaceRecursiveRegExp(e,s,"^ {0,3}<pre\\b[^>]*>\\s*<code\\b[^>]*>","^ {0,3}</code>\\s*</pre>","gim"),i.converter._dispatch("hashPreCodeTags.after",e,t,i)})),w.subParser("headers",(function(e,t,n){e=n.converter._dispatch("headers.before",e,t,n);var r=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),o=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,c=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;e=(e=e.replace(o,(function(e,o){var c=w.subParser("spanGamut")(o,t,n),l=t.noHeaderId?"":' id="'+d(o)+'"',a="<h"+r+l+">"+c+"</h"+r+">";return w.subParser("hashBlock")(a,t,n)}))).replace(c,(function(e,o){var c=w.subParser("spanGamut")(o,t,n),l=t.noHeaderId?"":' id="'+d(o)+'"',a=r+1,h="<h"+a+l+">"+c+"</h"+a+">";return w.subParser("hashBlock")(h,t,n)}));var l=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;function d(e){var r,o;if(t.customizedHeaderId){var c=e.match(/\{([^{]+?)}\s*$/);c&&c[1]&&(e=c[1])}return r=e,o=w.helper.isString(t.prefixHeaderId)?t.prefixHeaderId:!0===t.prefixHeaderId?"section-":"",t.rawPrefixHeaderId||(r=o+r),r=t.ghCompatibleHeaderId?r.replace(/ /g,"-").replace(/&amp;/g,"").replace(/\xa8T/g,"").replace(/\xa8D/g,"").replace(/[&+$,\/:;=?@"#{}|^\xa8~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?r.replace(/ /g,"-").replace(/&amp;/g,"&").replace(/\xa8T/g,"¨").replace(/\xa8D/g,"$").replace(/["']/g,"-").toLowerCase():r.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(r=o+r),n.hashLinkCounts[r]?r=r+"-"+n.hashLinkCounts[r]++:n.hashLinkCounts[r]=1,r}return e=e.replace(l,(function(e,o,c){var l=c;t.customizedHeaderId&&(l=c.replace(/\s?\{([^{]+?)}\s*$/,""));var a=w.subParser("spanGamut")(l,t,n),h=t.noHeaderId?"":' id="'+d(c)+'"',i=r-1+o.length,s="<h"+i+h+">"+a+"</h"+i+">";return w.subParser("hashBlock")(s,t,n)})),n.converter._dispatch("headers.after",e,t,n)})),w.subParser("horizontalRule",(function(e,t,n){e=n.converter._dispatch("horizontalRule.before",e,t,n);var r=w.subParser("hashBlock")("<hr />",t,n);return e=(e=(e=e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,r)).replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,r),n.converter._dispatch("horizontalRule.after",e,t,n)})),w.subParser("images",(function(e,t,p){function n(e,t,n,r,a,o,i,s){var c=p.gUrls,l=p.gTitles,d=p.gDimensions;if(n=n.toLowerCase(),s||(s=""),-1<e.search(/\(<?\s*>? ?(['"].*['"])?\)$/m))r="";else if(""===r||null===r){if(""!==n&&null!==n||(n=t.toLowerCase().replace(/ ?\n/g," ")),r="#"+n,w.helper.isUndefined(c[n]))return e;r=c[n],w.helper.isUndefined(l[n])||(s=l[n]),w.helper.isUndefined(d[n])||(a=d[n].width,o=d[n].height)}t=t.replace(/"/g,"&quot;").replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback);var h='<img src="'+(r=r.replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback))+'" alt="'+t+'"';return s&&w.helper.isString(s)&&(h+=' title="'+(s=s.replace(/"/g,"&quot;").replace(w.helper.regexes.asteriskDashAndColon,w.helper.escapeCharactersCallback))+'"'),a&&o&&(h+=' width="'+(a="*"===a?"auto":a)+'"',h+=' height="'+(o="*"===o?"auto":o)+'"'),h+" />"}return e=(e=(e=(e=(e=(e=p.converter._dispatch("images.before",e,t,p)).replace(/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,(function(e,t,r,o,a,c,i,s){return n(e,t,r,o=o.replace(/\s/g,""),a,c,0,s)}))).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,n)).replace(/!\[([^\]]*?)][ \t]*()\([ \t]?<?([\S]+?(?:\([\S]*?\)[\S]*?)?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,n)).replace(/!\[([^\[\]]+)]()()()()()/g,n),p.converter._dispatch("images.after",e,t,p)})),w.subParser("italicsAndBold",(function(e,t,n){function r(e,t,n){return t+e+n}return e=n.converter._dispatch("italicsAndBold.before",e,t,n),e=t.literalMidWordUnderscores?(e=(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return r(t,"<strong><em>","</em></strong>")}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return r(t,"<strong>","</strong>")}))).replace(/\b_(\S[\s\S]*?)_\b/g,(function(e,t){return r(t,"<em>","</em>")})):(e=(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/_([^\s_][\s\S]*?)_/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),e=t.literalMidWordAsterisks?(e=(e=e.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong><em>","</em></strong>")}))).replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<strong>","</strong>")}))).replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,(function(e,t,n){return r(n,t+"<em>","</em>")})):(e=(e=e.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong><em>","</em></strong>"):e}))).replace(/\*\*(\S[\s\S]*?)\*\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<strong>","</strong>"):e}))).replace(/\*([^\s*][\s\S]*?)\*/g,(function(e,t){return/\S$/.test(t)?r(t,"<em>","</em>"):e})),n.converter._dispatch("italicsAndBold.after",e,t,n)})),w.subParser("lists",(function(e,p,t){function u(e,n){t.gListLevel++,e=e.replace(/\n{2,}$/,"\n");var r=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80| {0,3}([*+-]|\d+[.])[ \t]+))/gm,o=/\n[ \t]*\n(?!\xa80)/.test(e+="¨0");return p.disableForced4SpacesIndentedSublists&&(r=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(\xa80|\2([*+-]|\d+[.])[ \t]+))/gm),e=(e=e.replace(r,(function(e,n,r,c,a,l,i){i=i&&""!==i.trim();var s=w.subParser("outdent")(a,p,t),d="";return l&&p.tasklists&&(d=' class="task-list-item" style="list-style-type: none;"',s=s.replace(/^[ \t]*\[(x|X| )?]/m,(function(){var e='<input type="checkbox" disabled style="margin: 0px 0.35em 0.25em -1.6em; vertical-align: middle;"';return i&&(e+=" checked"),e+">"}))),s=s.replace(/^([-*+]|\d\.)[ \t]+[\S\n ]*/g,(function(e){return"¨A"+e})),"<li"+d+">"+(s=(s=n||-1<s.search(/\n{2,}/)?(s=w.subParser("githubCodeBlocks")(s,p,t),w.subParser("blockGamut")(s,p,t)):(s=(s=w.subParser("lists")(s,p,t)).replace(/\n$/,""),s=(s=w.subParser("hashHTMLBlocks")(s,p,t)).replace(/\n\n+/g,"\n\n"),o?w.subParser("paragraphs")(s,p,t):w.subParser("spanGamut")(s,p,t))).replace("¨A",""))+"</li>\n"}))).replace(/\xa80/g,""),t.gListLevel--,n&&(e=e.replace(/\s+$/,"")),e}function n(e,t){if("ol"===t){var n=e.match(/^ *(\d+)\./);if(n&&"1"!==n[1])return' start="'+n[1]+'"'}return""}function g(e){return"ul"===e?' style="list-style: disc !important;padding: 0px 0px 0px 40px !important;"':' style="list-style: decimal !important;padding: 0px 0px 0px 40px !important;"'}function a(e,a,t){var i=p.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,s=p.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,r="ul"===a?i:s,o="",c=g(a);if(-1!==e.search(r))!function l(d){var h=d.search(r),f=n(e,a);c=g(a),-1!==h?(o+="\n\n<"+a+c+f+">\n"+u(d.slice(0,h),!!t)+"</"+a+">\n",r="ul"==(a="ul"===a?"ol":"ul")?i:s,l(d.slice(h))):o+="\n\n<"+a+c+f+">\n"+u(d,!!t)+"</"+a+">\n"}(e);else{var l=n(e,a);o="\n\n<"+a+c+l+">\n"+u(e,!!t)+"</"+a+">\n"}return o}return e=t.converter._dispatch("lists.before",e,p,t),e+="¨0",e=(e=t.gListLevel?e.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n){return a(t,-1<n.search(/[*+-]/g)?"ul":"ol",!0)})):e.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(\xa80|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,(function(e,t,n,r){return a(n,-1<r.search(/[*+-]/g)?"ul":"ol",!1)}))).replace(/\xa80/,""),t.converter._dispatch("lists.after",e,p,t)})),w.subParser("metadata",(function(e,t,n){if(!t.metadata)return e;function a(e){(e=(e=(n.metadata.raw=e).replace(/&/g,"&amp;").replace(/"/g,"&quot;")).replace(/\n {4}/g," ")).replace(/^([\S ]+): +([\s\S]+?)$/gm,(function(e,t,r){return n.metadata.parsed[t]=r,""}))}return e=(e=(e=(e=n.converter._dispatch("metadata.before",e,t,n)).replace(/^\s*\xab\xab\xab+(\S*?)\n([\s\S]+?)\n\xbb\xbb\xbb+\n/,(function(e,t,n){return a(n),"¨M"}))).replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,(function(e,t,r){return t&&(n.metadata.format=t),a(r),"¨M"}))).replace(/\xa8M/g,""),n.converter._dispatch("metadata.after",e,t,n)})),w.subParser("outdent",(function(e,t,n){return e=(e=(e=n.converter._dispatch("outdent.before",e,t,n)).replace(/^(\t|[ ]{1,4})/gm,"¨0")).replace(/\xa80/g,""),n.converter._dispatch("outdent.after",e,t,n)})),w.subParser("paragraphs",(function(e,t,n){for(var r=(e=(e=(e=n.converter._dispatch("paragraphs.before",e,t,n)).replace(/^\n+/g,"")).replace(/\n+$/g,"")).split(/\n{2,}/g),a=[],o=r.length,i=0;i<o;i++){var s=r[i];0<=s.search(/\xa8(K|G)(\d+)\1/g)?a.push(s):0<=s.search(/\S/)&&(s=(s=w.subParser("spanGamut")(s,t,n)).replace(/^([ \t]*)/g,"<p>"),s+="</p>",a.push(s))}for(o=a.length,i=0;i<o;i++){for(var c="",l=a[i],d=!1;/\xa8(K|G)(\d+)\1/.test(l);){var h=RegExp.$1,p=RegExp.$2;c=(c="K"===h?n.gHtmlBlocks[p]:d?w.subParser("encodeCode")(n.ghCodeBlocks[p].text,t,n):n.ghCodeBlocks[p].codeblock).replace(/\$/g,"$$$$"),l=l.replace(/(\n\n)?\xa8(K|G)\d+\2(\n\n)?/,c),/^<pre\b[^>]*>\s*<code\b[^>]*>/.test(l)&&(d=!0)}a[i]=l}return e=(e=(e=a.join("\n")).replace(/^\n+/g,"")).replace(/\n+$/g,""),n.converter._dispatch("paragraphs.after",e,t,n)})),w.subParser("runExtension",(function(e,t,n,r){if(e.filter)t=e.filter(t,r.converter,n);else if(e.regex){var a=e.regex;a instanceof RegExp||(a=new RegExp(a,"g")),t=t.replace(a,e.replace)}return t})),w.subParser("spanGamut",(function(e,t,n){return e=n.converter._dispatch("spanGamut.before",e,t,n),e=w.subParser("codeSpans")(e,t,n),e=w.subParser("escapeSpecialCharsWithinTagAttributes")(e,t,n),e=w.subParser("encodeBackslashEscapes")(e,t,n),e=w.subParser("images")(e,t,n),e=w.subParser("anchors")(e,t,n),e=w.subParser("autoLinks")(e,t,n),e=w.subParser("simplifiedAutoLinks")(e,t,n),e=w.subParser("emoji")(e,t,n),e=w.subParser("underline")(e,t,n),e=w.subParser("italicsAndBold")(e,t,n),e=w.subParser("strikethrough")(e,t,n),e=w.subParser("ellipsis")(e,t,n),e=w.subParser("hashHTMLSpans")(e,t,n),e=w.subParser("encodeAmpsAndAngles")(e,t,n),t.simpleLineBreaks?/\n\n\xa8K/.test(e)||(e=e.replace(/\n+/g,"<br />\n")):e=e.replace(/  +\n/g,"<br />\n"),n.converter._dispatch("spanGamut.after",e,t,n)})),w.subParser("strikethrough",(function(e,t,a){return t.strikethrough&&(e=(e=a.converter._dispatch("strikethrough.before",e,t,a)).replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,(function(e,n){return function(e){return t.simplifiedAutoLink&&(e=w.subParser("simplifiedAutoLinks")(e,t,a)),"<del>"+e+"</del>"}(n)})),e=a.converter._dispatch("strikethrough.after",e,t,a)),e})),w.subParser("stripLinkDefinitions",(function(e,s,t){var n=function(e,n,r,o,a,c,i){return n=n.toLowerCase(),r.match(/^data:.+?\/.+?;base64,/)?t.gUrls[n]=r.replace(/\s/g,""):t.gUrls[n]=w.subParser("encodeAmpsAndAngles")(r,s,t),c?c+i:(i&&(t.gTitles[n]=i.replace(/"|'/g,"&quot;")),s.parseImgDimensions&&o&&a&&(t.gDimensions[n]={width:o,height:a}),"")};return(e=(e=(e+="¨0").replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?(data:.+?\/.+?;base64,[A-Za-z0-9+/=\n]+?)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=\xa80)|(?=\n\[))/gm,n)).replace(/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*<?([^>\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=\xa80))/gm,n)).replace(/\xa80/,"")})),w.subParser("tables",(function(e,t,b){if(!t.tables)return e;function n(e){var n,r=e.split("\n");for(n=0;n<r.length;++n)/^ {0,3}\|/.test(r[n])&&(r[n]=r[n].replace(/^ {0,3}\|/,"")),/\|[ \t]*$/.test(r[n])&&(r[n]=r[n].replace(/\|[ \t]*$/,"")),r[n]=w.subParser("codeSpans")(r[n],t,b);var o,a,c,i,s,l=r[0].split("|").map((function(e){return e.trim()})),d=r[1].split("|").map((function(e){return e.trim()})),h=[],f=[],p=[],u=[];for(r.shift(),r.shift(),n=0;n<r.length;++n)""!==r[n].trim()&&h.push(r[n].split("|").map((function(e){return e.trim()})));if(l.length<d.length)return e;for(n=0;n<d.length;++n)p.push((o=d[n],/^:[ \t]*--*$/.test(o)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(o)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(o)?' style="text-align:center;"':""));for(n=0;n<l.length;++n)w.helper.isUndefined(p[n])&&(p[n]=""),f.push((a=l[n],c=p[n],i=void 0,i="",a=a.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(i=' id="'+a.replace(/ /g,"_").toLowerCase()+'"'),"<th"+i+c+">"+(a=w.subParser("spanGamut")(a,t,b))+"</th>\n"));for(n=0;n<h.length;++n){for(var m=[],g=0;g<f.length;++g)w.helper.isUndefined(h[n][g]),m.push((s=h[n][g],"<td"+p[g]+">"+w.subParser("spanGamut")(s,t,b)+"</td>\n"));u.push(m)}return function(e,t){for(var n="<table>\n<thead>\n<tr>\n",r=e.length,a=0;a<r;++a)n+=e[a];for(n+="</tr>\n</thead>\n<tbody>\n",a=0;a<t.length;++a){n+="<tr>\n";for(var o=0;o<r;++o)n+=t[a][o];n+="</tr>\n"}return n+"</tbody>\n</table>\n"}(f,u)}return e=(e=(e=(e=b.converter._dispatch("tables.before",e,t,b)).replace(/\\(\|)/g,w.helper.escapeCharactersCallback)).replace(/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|\xa80)/gm,n)).replace(/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|\xa80)/gm,n),b.converter._dispatch("tables.after",e,t,b)})),w.subParser("underline",(function(e,t,n){return t.underline?(e=n.converter._dispatch("underline.before",e,t,n),e=(e=t.literalMidWordUnderscores?(e=e.replace(/\b___(\S[\s\S]*?)___\b/g,(function(e,t){return"<u>"+t+"</u>"}))).replace(/\b__(\S[\s\S]*?)__\b/g,(function(e,t){return"<u>"+t+"</u>"})):(e=e.replace(/___(\S[\s\S]*?)___/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/__(\S[\s\S]*?)__/g,(function(e,t){return/\S$/.test(t)?"<u>"+t+"</u>":e}))).replace(/(_)/g,w.helper.escapeCharactersCallback),e=n.converter._dispatch("underline.after",e,t,n)):e})),w.subParser("unescapeSpecialChars",(function(e,t,n){return e=(e=n.converter._dispatch("unescapeSpecialChars.before",e,t,n)).replace(/\xa8E(\d+)E/g,(function(e,t){var n=parseInt(t);return String.fromCharCode(n)})),n.converter._dispatch("unescapeSpecialChars.after",e,t,n)})),w.subParser("makeMarkdown.blockquote",(function(e,t){var n="";if(e.hasChildNodes())for(var r=e.childNodes,a=r.length,o=0;o<a;++o){var i=w.subParser("makeMarkdown.node")(r[o],t);""!==i&&(n+=i)}return"> "+(n=n.trim()).split("\n").join("\n> ")})),w.subParser("makeMarkdown.codeBlock",(function(e,t){var n=e.getAttribute("language"),r=e.getAttribute("precodenum");return"```"+n+"\n"+t.preList[r]+"\n```"})),w.subParser("makeMarkdown.codeSpan",(function(e){return"`"+e.innerHTML+"`"})),w.subParser("makeMarkdown.emphasis",(function(e,t){var n="";if(e.hasChildNodes()){n+="*";for(var r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);n+="*"}return n})),w.subParser("makeMarkdown.header",(function(e,t,n){var r=new Array(n+1).join("#"),a="";if(e.hasChildNodes()){a=r+" ";for(var o=e.childNodes,i=o.length,s=0;s<i;++s)a+=w.subParser("makeMarkdown.node")(o[s],t)}return a})),w.subParser("makeMarkdown.hr",(function(){return"---"})),w.subParser("makeMarkdown.image",(function(e){var t="";return e.hasAttribute("src")&&(t+="!["+e.getAttribute("alt")+"](",t+="<"+e.getAttribute("src")+">",e.hasAttribute("width")&&e.hasAttribute("height")&&(t+=" ="+e.getAttribute("width")+"x"+e.getAttribute("height")),e.hasAttribute("title")&&(t+=' "'+e.getAttribute("title")+'"'),t+=")"),t})),w.subParser("makeMarkdown.links",(function(e,t){var n="";if(e.hasChildNodes()&&e.hasAttribute("href")){var r=e.childNodes,a=r.length;n="[";for(var o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);n+="](",n+="<"+e.getAttribute("href")+">",e.hasAttribute("title")&&(n+=' "'+e.getAttribute("title")+'"'),n+=")"}return n})),w.subParser("makeMarkdown.list",(function(e,t,n){var r="";if(!e.hasChildNodes())return"";for(var a=e.childNodes,o=a.length,i=e.getAttribute("start")||1,s=0;s<o;++s)void 0!==a[s].tagName&&"li"===a[s].tagName.toLowerCase()&&(r+=("ol"===n?i.toString()+". ":"- ")+w.subParser("makeMarkdown.listItem")(a[s],t),++i);return(r+="\n\x3c!-- --\x3e\n").trim()})),w.subParser("makeMarkdown.listItem",(function(e,t){for(var n="",r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);return/\n$/.test(n)?n=n.split("\n").join("\n    ").replace(/^ {4}$/gm,"").replace(/\n\n+/g,"\n\n"):n+="\n",n})),w.subParser("makeMarkdown.node",(function(e,t,n){n=n||!1;var r="";if(3===e.nodeType)return w.subParser("makeMarkdown.txt")(e,t);if(8===e.nodeType)return"\x3c!--"+e.data+"--\x3e\n\n";if(1!==e.nodeType)return"";switch(e.tagName.toLowerCase()){case"h1":n||(r=w.subParser("makeMarkdown.header")(e,t,1)+"\n\n");break;case"h2":n||(r=w.subParser("makeMarkdown.header")(e,t,2)+"\n\n");break;case"h3":n||(r=w.subParser("makeMarkdown.header")(e,t,3)+"\n\n");break;case"h4":n||(r=w.subParser("makeMarkdown.header")(e,t,4)+"\n\n");break;case"h5":n||(r=w.subParser("makeMarkdown.header")(e,t,5)+"\n\n");break;case"h6":n||(r=w.subParser("makeMarkdown.header")(e,t,6)+"\n\n");break;case"p":n||(r=w.subParser("makeMarkdown.paragraph")(e,t)+"\n\n");break;case"blockquote":n||(r=w.subParser("makeMarkdown.blockquote")(e,t)+"\n\n");break;case"hr":n||(r=w.subParser("makeMarkdown.hr")(e,t)+"\n\n");break;case"ol":n||(r=w.subParser("makeMarkdown.list")(e,t,"ol")+"\n\n");break;case"ul":n||(r=w.subParser("makeMarkdown.list")(e,t,"ul")+"\n\n");break;case"precode":n||(r=w.subParser("makeMarkdown.codeBlock")(e,t)+"\n\n");break;case"pre":n||(r=w.subParser("makeMarkdown.pre")(e,t)+"\n\n");break;case"table":n||(r=w.subParser("makeMarkdown.table")(e,t)+"\n\n");break;case"code":r=w.subParser("makeMarkdown.codeSpan")(e,t);break;case"em":case"i":r=w.subParser("makeMarkdown.emphasis")(e,t);break;case"strong":case"b":r=w.subParser("makeMarkdown.strong")(e,t);break;case"del":r=w.subParser("makeMarkdown.strikethrough")(e,t);break;case"a":r=w.subParser("makeMarkdown.links")(e,t);break;case"img":r=w.subParser("makeMarkdown.image")(e,t);break;default:r=e.outerHTML+"\n\n"}return r})),w.subParser("makeMarkdown.paragraph",(function(e,t){var n="";if(e.hasChildNodes())for(var r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);return n.trim()})),w.subParser("makeMarkdown.pre",(function(e,t){var n=e.getAttribute("prenum");return"<pre>"+t.preList[n]+"</pre>"})),w.subParser("makeMarkdown.strikethrough",(function(e,t){var n="";if(e.hasChildNodes()){n+="~~";for(var r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);n+="~~"}return n})),w.subParser("makeMarkdown.strong",(function(e,t){var n="";if(e.hasChildNodes()){n+="**";for(var r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t);n+="**"}return n})),w.subParser("makeMarkdown.table",(function(e,t){var n,r,a="",o=[[],[]],i=e.querySelectorAll("thead>tr>th"),s=e.querySelectorAll("tbody>tr");for(n=0;n<i.length;++n){var c=w.subParser("makeMarkdown.tableCell")(i[n],t),l="---";if(i[n].hasAttribute("style"))switch(i[n].getAttribute("style").toLowerCase().replace(/\s/g,"")){case"text-align:left;":l=":---";break;case"text-align:right;":l="---:";break;case"text-align:center;":l=":---:"}o[0][n]=c.trim(),o[1][n]=l}for(n=0;n<s.length;++n){var d=o.push([])-1,h=s[n].getElementsByTagName("td");for(r=0;r<i.length;++r){var p=" ";void 0!==h[r]&&(p=w.subParser("makeMarkdown.tableCell")(h[r],t)),o[d].push(p)}}var u=3;for(n=0;n<o.length;++n)for(r=0;r<o[n].length;++r){var f=o[n][r].length;u<f&&(u=f)}for(n=0;n<o.length;++n){for(r=0;r<o[n].length;++r)1===n?":"===o[n][r].slice(-1)?o[n][r]=w.helper.padEnd(o[n][r].slice(-1),u-1,"-")+":":o[n][r]=w.helper.padEnd(o[n][r],u,"-"):o[n][r]=w.helper.padEnd(o[n][r],u);a+="| "+o[n].join(" | ")+" |\n"}return a.trim()})),w.subParser("makeMarkdown.tableCell",(function(e,t){var n="";if(!e.hasChildNodes())return"";for(var r=e.childNodes,a=r.length,o=0;o<a;++o)n+=w.subParser("makeMarkdown.node")(r[o],t,!0);return n.trim()})),w.subParser("makeMarkdown.txt",(function(e){var t=e.nodeValue;return t=(t=t.replace(/ +/g," ")).replace(/\xa8NBSP;/g," "),(t=(t=(t=(t=(t=(t=(t=(t=w.helper.unescapeHTMLEntities(t)).replace(/([*_~|`])/g,"\\$1")).replace(/^(\s*)>/g,"\\$1>")).replace(/^#/gm,"\\#")).replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3")).replace(/^( {0,3}\d+)\./gm,"$1\\.")).replace(/^( {0,3})([+-])/gm,"$1\\$2")).replace(/]([\s]*)\(/g,"\\]$1\\(")).replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:")})),r.PLUGINS.markdown=function(e){var i,t,n,r,s,o=e.$,a=!1,c="",l="";function p(n){n=function(e){var t=e,n=e.match(/(\[\^(.+?)\])[^:]/g),r=e.match(/(\[\^(.+?)\]:)/g);if(n&&r){n.forEach((function(e,t,n){n[t]=n[t].substring(0,n[t].length-1)})),n=n.filter((function(e,t){return n.indexOf(e)===t})),r=r.filter((function(e,t){return r.indexOf(e)===t}));for(var a=1,o=0;o<n.length;o++){var i="";if(1==a&&(i='<hr class="footnote-sep"><ol>'),-1<r.indexOf(n[o]+":")){for(var s=-1<(t=(t=t.split(r[o]).join("{ftnt-plc}")).replace(r[o].substring(0,r[o].length-1),'<sup id="fnref:'.concat(a,'"><a href="#fn:').concat(a,'" class="footnote-a">').concat(a,"</a></sup>"))).indexOf(n[o])?1:0,c=0;s&&(c++,s=-1<(t=t.replace(r[o].substring(0,r[o].length-1),'<sup id="fnref:'.concat(a,":").concat(c,'"><a href="#fn:').concat(a,":").concat(c,'" class="footnote-a">').concat(a,":").concat(c,"</a></sup>"))).indexOf(n[o])?1:0););var l=(t=t.split("{ftnt-plc}").join(r[o])).indexOf(r[o]),d=t,h=d.substring(l,d.length-1);if(h=h.split("\n")[0],t=t.replace(h,""),-1<h.indexOf(": ")){h=h.split(": ")[1],h+='<a href="#fnref:'.concat(a,'" class="footnote-a">↩</a>');for(var p=c;0!=c;)h+='<a href="#fnref:'.concat(a,":").concat(p-c+1,'" class="footnote-a">↩</a>'),c--;h+="</p></li>",t=t+i+'<li id="fn:'.concat(a,'"><p>')+h,a++}}}1!=a&&(t+="</ol>")}return t}(n=function(e){for(var t=/^[A-Za-z0-9]/g,n=/^:[ ]{1}(.+?)+/g,r=e.split("\n"),a=r,o=r.length-1,i=1;i<o;i++)null!==r[i].match(n)&&(null!==r[i-1].match(t)&&i<o-1&&null!==r[i+1].match(n)?(a[i-1]="<dl><dt>"+r[i-1]+"</dt>",a[i]="<dd>"+r[i].substring(2)+"</dd>"):null!==r[i-1].match(t)&&(i<o-1&&null===r[i+1].match(n)||i==o-1)?(a[i-1]="<dl><dt>"+r[i-1]+"</dt>",a[i]="<dd>"+r[i].substring(2)+"</dd></dl>"):i<o-1&&null!==r[i+1].match(n)?a[i]="<dd>"+r[i].substring(2)+"</dd>":a[i]="<dd>"+r[i].substring(2)+"</dd></dl>");return a.join("\n")}(n=function(e){var t=e.indexOf("```"),a=0;return-1<t&&(a=-1<(a=e.substring(t+1).indexOf("```"))?a+3:a),e.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,(function(e,n,r){return t<r&&r<a?"---":"<hr />\n"}))}(n=function(e){return-1<(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.split("</p>").join("</p>\n")).split("</div>").join("\n")).replace(/(<([^>]+)>)/gi,"")).replace(/&gt;/gi,">")).replace(/&lt;/gi,"<")).split("&quot;").join('"')).split("&amp;").join("&")).split("&#39;").join("'")).split("&nbsp;").join(" ")).replace(/\|+\n[^\|]/g,(function(e){return e.replace("\n","\n\n")}))).indexOf("Powered by Froala Editor")&&(e=e.replace("Powered by Froala Editor","")),e}(n)))),n=r.makeHtml(n),e.$wp.find(t)[0].innerHTML=n}return{_init:function(){if(e.events.on("contentChanged",(function(){a&&p(e.html.get(!1,!1))}),!0),e.events.$on(o(e.o_win),"resize",(function(){a&&(t[0].style.width=e.$wp[0].clientWidth-e.$el[0].clientWidth+2+"px")})),r=new w.Converter({strikethrough:!0,tables:!0,tablesHeaderId:!0,simpleLineBreaks:!0,ghCodeBlocks:!0,tasklists:!0,customizedHeaderId:!0,requireSpaceBeforeHeadingText:!0,underline:!0}),e.$tb&&(n=e.$tb.find('.fr-command[data-cmd="markdown"]')),!e.$wp)return!1},refresh:function(e){var t=a;e.toggleClass("fr-active",t).attr("aria-pressed",t)},toggle:function(){a?(l=e.html.get(!0,!0),e.opts.pastePlain=!1,e.$el.removeClass("fr-markdown-editor"),e.$wp.append(s[0].firstChild),o(s).remove(),e.$wp.find(i).remove(),e.$wp.find(t).remove(),e.$wp[0].lastChild.after(e.$placeholder[0]),e.$el.removeAttr("style"),e.size.refresh(),e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").not(n).removeClass("fr-disabled").attr("aria-disabled",!1),e.html.set(c)):function(){var a;c=e.html.get(!0,!0),e.html.set(l),e.opts.pastePlain=!0,e.$el.addClass("fr-markdown-editor"),s=o('<div class="fr-wrapper-markdown" />'),e.opts.heightMin?s.css("min-height","".concat(e.opts.heightMin,"px")):s.css("min-height","200px"),e.opts.heightMax?(s.css("maxHeight","".concat(e.opts.heightMax,"px")),s.css("overflow","auto")):(s.css("maxHeight",""),s.css("overflow","")),e.opts.height&&(s.css("height","".concat(e.opts.height,"px")),s.css("overflow","auto"),s.css("minHeight",e.opts.height-e.helpers.getPX(e.$el.css("padding-top"))-e.helpers.getPX(e.$el.css("padding-bottom")))),e.$wp.append(s),s[0].appendChild(e.$el[0]),i=o('<div class="gutter-horizontal"><div class="e-resize-handler"><i class="fa fa-circle-thin" aria-hidden="true"></i></div></div>'),o(s).append(i[0]),t=o('<div class="fr-element fr-markdown-view"></div>'),o(s).append(t[0]),o(s).after(e.$placeholder[0]),e.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").not(n).filter((function(){return"fullscreen"!==o(this).data("cmd")&&"moreMisc"!==o(this).data("cmd")})).addClass("fr-disabled").attr("aria-disabled",!0),o(i).on("mousedown touchstart",(function(n){a={e:n,offsetLeft:i[0].offsetLeft,offsetTop:i[0].offsetTop,firstWidth:e.$el[0].offsetWidth,secondWidth:t[0].offsetWidth};var r=function(n){e.selection.clear();var r={x:n.clientX-a.e.clientX,y:n.clientY-a.e.clientY};r.x=Math.min(Math.max(r.x,-a.firstWidth),a.secondWidth),a.firstWidth+r.x<125||a.secondWidth-r.x<125||(i[0].style.left=a.offsetLeft+r.x+"px",e.$el[0].style.width=a.firstWidth+r.x+"px",t[0].style.width=a.secondWidth-r.x+"px")},o=function(n){e.selection.clear();var r={x:n.changedTouches[0].clientX-a.e.changedTouches[0].clientX,y:n.changedTouches[0].clientY-a.e.changedTouches[0].clientY};r.x=Math.min(Math.max(r.x,-a.firstWidth),a.secondWidth),a.firstWidth+r.x<100||a.secondWidth-r.x<100||(i[0].style.left=a.offsetLeft+r.x+"px",e.$el[0].style.width=a.firstWidth+r.x+"px",t[0].style.width=a.secondWidth-r.x+"px")},c=function(){document.onmousemove=document.onmouseup=null,document.ontouchmove=document.ontouchend=null};document.onmousemove=r,document.ontouchmove=o,document.onmouseup=c,document.ontouchend=c})),p(l)}(),a=!a},isEnabled:function(){return a}}},r.DefineIcon("markdown",{NAME:"markdown",SVG_KEY:"markdown"}),r.RegisterCommand("markdown",{title:"Markdown",undo:!1,focus:!1,toggle:!0,forcedRefresh:!0,accessibilityFocus:!0,callback:function(){this.markdown.toggle()},refresh:function(e){this.markdown.refresh(e)},plugin:"markdown"}),r}()}).call(this,n(23))},function(e,t,n){"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=n(154),t.createHash=t.Hash=n(182),t.createHmac=t.Hmac=n(412);var r=n(669),o=Object.keys(r),c=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(o);t.getHashes=function(){return c};var p=n(415);t.pbkdf2=p.pbkdf2,t.pbkdf2Sync=p.pbkdf2Sync;var l=n(671);t.Cipher=l.Cipher,t.createCipher=l.createCipher,t.Cipheriv=l.Cipheriv,t.createCipheriv=l.createCipheriv,t.Decipher=l.Decipher,t.createDecipher=l.createDecipher,t.Decipheriv=l.Decipheriv,t.createDecipheriv=l.createDecipheriv,t.getCiphers=l.getCiphers,t.listCiphers=l.listCiphers;var d=n(686);t.DiffieHellmanGroup=d.DiffieHellmanGroup,t.createDiffieHellmanGroup=d.createDiffieHellmanGroup,t.getDiffieHellman=d.getDiffieHellman,t.createDiffieHellman=d.createDiffieHellman,t.DiffieHellman=d.DiffieHellman;var h=n(691);t.createSign=h.createSign,t.Sign=h.Sign,t.createVerify=h.createVerify,t.Verify=h.Verify,t.createECDH=n(732);var f=n(733);t.publicEncrypt=f.publicEncrypt,t.privateEncrypt=f.privateEncrypt,t.publicDecrypt=f.publicDecrypt,t.privateDecrypt=f.privateDecrypt;var m=n(736);t.randomFill=m.randomFill,t.randomFillSync=m.randomFillSync,t.createCredentials=function(){throw new Error(["sorry, createCredentials is not implemented yet","we accept pull requests","https://github.com/crypto-browserify/crypto-browserify"].join("\n"))},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},function(e,t,n){(t=e.exports=n(400)).Stream=t,t.Readable=t,t.Writable=n(404),t.Duplex=n(156),t.Transform=n(405),t.PassThrough=n(653),t.finished=n(277),t.pipeline=n(654)},,function(e,t,n){"use strict";function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=n(46).Buffer,d=n(650).inspect,h=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,f;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,o=l.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,n=o,r=i,l.prototype.copy.call(t,n,r),i+=p.data.length,p=p.next;return o}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var p=this.head,t=1,n=p.data;for(e-=n.length;p=p.next;){var r=p.data,o=e>r.length?r.length:e;if(o===r.length?n+=r:n+=r.slice(0,e),0==(e-=o)){o===r.length?(++t,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=r.slice(o));break}++t}return this.length-=t,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),p=this.head,n=1;for(p.data.copy(t),e-=p.data.length;p=p.next;){var r=p.data,o=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,o),0==(e-=o)){o===r.length?(++n,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=r.slice(o));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return d(this,function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?r(Object(source),!0).forEach((function(t){o(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):r(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&c(t.prototype,n),f&&c(t,f),e}()},,function(e,t,n){"use strict";(function(t){var r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=n(277),l=Symbol("lastResolve"),d=Symbol("lastReject"),h=Symbol("error"),f=Symbol("ended"),m=Symbol("lastPromise"),v=Symbol("handlePromise"),_=Symbol("stream");function y(e,t){return{value:e,done:t}}function E(e){var t=e[l];if(null!==t){var data=e[_].read();null!==data&&(e[m]=null,e[l]=null,e[d]=null,t(y(data,!1)))}}function C(e){t.nextTick(E,e)}var w=Object.getPrototypeOf((function(){})),S=Object.setPrototypeOf((o(r={get stream(){return this[_]},next:function(){var e=this,n=this[h];if(null!==n)return Promise.reject(n);if(this[f])return Promise.resolve(y(void 0,!0));if(this[_].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[h]?r(e[h]):n(y(void 0,!0))}))}));var r,o=this[m];if(o)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[f]?n(y(void 0,!0)):t[v](n,r)}),r)}}(o,this));else{var data=this[_].read();if(null!==data)return Promise.resolve(y(data,!1));r=new Promise(this[v])}return this[m]=r,r}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[_].destroy(null,(function(e){e?n(e):t(y(void 0,!0))}))}))})),r),w);e.exports=function(e){var t,n=Object.create(S,(o(t={},_,{value:e,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,h,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,v,{value:function(e,t){var data=n[_].read();data?(n[m]=null,n[l]=null,n[d]=null,e(y(data,!1))):(n[l]=e,n[d]=t)},writable:!0}),t));return n[m]=null,c(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[d];return null!==t&&(n[m]=null,n[l]=null,n[d]=null,t(e)),void(n[h]=e)}var r=n[l];null!==r&&(n[m]=null,n[l]=null,n[d]=null,r(y(void 0,!0))),n[f]=!0})),e.on("readable",C.bind(null,n)),n}}).call(this,n(42))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=o;var r=n(405);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(13)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var o=n(155).codes,c=o.ERR_MISSING_ARGS,l=o.ERR_STREAM_DESTROYED;function d(e){if(e)throw e}function h(e,t,o,c){c=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(c);var d=!1;e.on("close",(function(){d=!0})),void 0===r&&(r=n(277)),r(e,{readable:t,writable:o},(function(e){if(e)return c(e);d=!0,c()}));var h=!1;return function(t){if(!d&&!h)return h=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void c(t||new l("pipe"))}}function f(e){e()}function m(e,t){return e.pipe(t)}function v(e){return e.length?"function"!=typeof e[e.length-1]?d:e.pop():d}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=v(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new c("streams");var l=t.map((function(e,i){var n=i<t.length-1;return h(e,n,i>0,(function(e){r||(r=e),e&&l.forEach(f),n||(l.forEach(f),o(r))}))}));return t.reduce(m)}},function(e,t,n){var r=n(13),o=n(157),c=n(17).Buffer,l=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function h(){this.init(),this._w=d,o.call(this,64,56)}function f(e){return e<<30|e>>>2}function m(s,b,e,t){return 0===s?b&e|~b&t:2===s?b&e|b&t|e&t:b^e^t}r(h,o),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(e){for(var t,n=this._w,a=0|this._a,b=0|this._b,r=0|this._c,o=0|this._d,c=0|this._e,i=0;i<16;++i)n[i]=e.readInt32BE(4*i);for(;i<80;++i)n[i]=n[i-3]^n[i-8]^n[i-14]^n[i-16];for(var d=0;d<80;++d){var s=~~(d/20),h=0|((t=a)<<5|t>>>27)+m(s,b,r,o)+c+n[d]+l[s];c=o,o=r,r=f(b),b=a,a=h}this._a=a+this._a|0,this._b=b+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0},h.prototype._hash=function(){var e=c.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=h},function(e,t,n){var r=n(13),o=n(157),c=n(17).Buffer,l=[1518500249,1859775393,-1894007588,-899497514],d=new Array(80);function h(){this.init(),this._w=d,o.call(this,64,56)}function f(e){return e<<5|e>>>27}function m(e){return e<<30|e>>>2}function v(s,b,e,t){return 0===s?b&e|~b&t:2===s?b&e|b&t|e&t:b^e^t}r(h,o),h.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},h.prototype._update=function(e){for(var t,n=this._w,a=0|this._a,b=0|this._b,r=0|this._c,o=0|this._d,c=0|this._e,i=0;i<16;++i)n[i]=e.readInt32BE(4*i);for(;i<80;++i)n[i]=(t=n[i-3]^n[i-8]^n[i-14]^n[i-16])<<1|t>>>31;for(var d=0;d<80;++d){var s=~~(d/20),h=f(a)+v(s,b,r,o)+c+n[d]+l[s]|0;c=o,o=r,r=m(b),b=a,a=h}this._a=a+this._a|0,this._b=b+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0},h.prototype._hash=function(){var e=c.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=h},function(e,t,n){var r=n(13),o=n(406),c=n(157),l=n(17).Buffer,d=new Array(64);function h(){this.init(),this._w=d,c.call(this,64,56)}r(h,o),h.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},h.prototype._hash=function(){var e=l.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=h},function(e,t,n){var r=n(13),o=n(407),c=n(157),l=n(17).Buffer,d=new Array(160);function h(){this.init(),this._w=d,c.call(this,128,112)}r(h,o),h.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},h.prototype._hash=function(){var e=l.allocUnsafe(48);function t(t,n,r){e.writeInt32BE(t,r),e.writeInt32BE(n,r+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=h},function(e,t,n){e.exports=o;var r=n(137).EventEmitter;function o(){r.call(this)}n(13)(o,r),o.Readable=n(280),o.Writable=n(664),o.Duplex=n(665),o.Transform=n(666),o.PassThrough=n(667),o.Stream=o,o.prototype.pipe=function(e,t){var source=this;function n(t){e.writable&&!1===e.write(t)&&source.pause&&source.pause()}function o(){source.readable&&source.resume&&source.resume()}source.on("data",n),e.on("drain",o),e._isStdio||t&&!1===t.end||(source.on("end",l),source.on("close",d));var c=!1;function l(){c||(c=!0,e.end())}function d(){c||(c=!0,"function"==typeof e.destroy&&e.destroy())}function h(e){if(f(),0===r.listenerCount(this,"error"))throw e}function f(){source.removeListener("data",n),e.removeListener("drain",o),source.removeListener("end",l),source.removeListener("close",d),source.removeListener("error",h),e.removeListener("error",h),source.removeListener("end",f),source.removeListener("close",f),e.removeListener("close",f)}return source.on("error",h),e.on("error",h),source.on("end",f),source.on("close",f),e.on("close",f),e.emit("pipe",source),e}},,function(e,t,n){"use strict";var r=n(281).Buffer,o=n(662);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e},e.prototype.concat=function(e){if(0===this.length)return r.alloc(0);if(1===this.length)return this.head.data;for(var t,n,o,c=r.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,n=c,o=i,t.copy(n,o),i+=p.data.length,p=p.next;return c},e}(),o&&o.inspect&&o.inspect.custom&&(e.exports.prototype[o.inspect.custom]=function(){var e=o.inspect({length:this.length});return this.constructor.name+" "+e})},,function(e,t,n){"use strict";e.exports=c;var r=n(411),o=Object.create(n(183));function c(e){if(!(this instanceof c))return new c(e);r.call(this,e)}o.inherits=n(13),o.inherits(c,r),c.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){e.exports=n(282)},function(e,t,n){e.exports=n(139)},function(e,t,n){e.exports=n(280).Transform},function(e,t,n){e.exports=n(280).PassThrough},function(e,t,n){"use strict";var r=n(13),o=n(17).Buffer,c=n(121),l=o.alloc(128),d=64;function h(e,t){c.call(this,"digest"),"string"==typeof t&&(t=o.from(t)),this._alg=e,this._key=t,t.length>d?t=e(t):t.length<d&&(t=o.concat([t,l],d));for(var n=this._ipad=o.allocUnsafe(d),r=this._opad=o.allocUnsafe(d),i=0;i<d;i++)n[i]=54^t[i],r[i]=92^t[i];this._hash=[n]}r(h,c),h.prototype._update=function(data){this._hash.push(data)},h.prototype._final=function(){var e=this._alg(o.concat(this._hash));return this._alg(o.concat([this._opad,e]))},e.exports=h},function(e,t,n){e.exports=n(414)},function(e,t,n){(function(t){var r,o,c=n(17).Buffer,l=n(416),d=n(417),h=n(418),f=n(419),m=t.crypto&&t.crypto.subtle,v={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},_=[];function y(){return o||(o=t.process&&t.process.nextTick?t.process.nextTick:t.queueMicrotask?t.queueMicrotask:t.setImmediate?t.setImmediate:t.setTimeout)}function E(e,t,n,r,o){return m.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return m.deriveBits({name:"PBKDF2",salt:t,iterations:n,hash:{name:o}},e,r<<3)})).then((function(e){return c.from(e)}))}e.exports=function(e,n,o,C,w,S){"function"==typeof w&&(S=w,w=void 0);var T=v[(w=w||"sha1").toLowerCase()];if(T&&"function"==typeof t.Promise){if(l(o,C),e=f(e,d,"Password"),n=f(n,d,"Salt"),"function"!=typeof S)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){y()((function(){t(null,e)}))}),(function(e){y()((function(){t(e)}))}))}(function(e){if(t.process&&!t.process.browser)return Promise.resolve(!1);if(!m||!m.importKey||!m.deriveBits)return Promise.resolve(!1);if(void 0!==_[e])return _[e];var n=E(r=r||c.alloc(8),r,10,128,e).then((function(){return!0})).catch((function(){return!1}));return _[e]=n,n}(T).then((function(t){return t?E(e,n,o,C,T):h(e,n,o,C,w)})),S)}else y()((function(){var t;try{t=h(e,n,o,C,w)}catch(e){return S(e)}S(null,t)}))}}).call(this,n(23))},function(e,t,n){var r=n(672),o=n(284),c=n(285),l=n(685),d=n(214);function h(e,t,n){if(e=e.toLowerCase(),c[e])return o.createCipheriv(e,t,n);if(l[e])return new r({key:t,iv:n,mode:e});throw new TypeError("invalid suite type")}function f(e,t,n){if(e=e.toLowerCase(),c[e])return o.createDecipheriv(e,t,n);if(l[e])return new r({key:t,iv:n,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var n,r;if(e=e.toLowerCase(),c[e])n=c[e].key,r=c[e].iv;else{if(!l[e])throw new TypeError("invalid suite type");n=8*l[e].key,r=l[e].iv}var o=d(t,!1,n,r);return h(e,o.key,o.iv)},t.createCipheriv=t.Cipheriv=h,t.createDecipher=t.Decipher=function(e,t){var n,r;if(e=e.toLowerCase(),c[e])n=c[e].key,r=c[e].iv;else{if(!l[e])throw new TypeError("invalid suite type");n=8*l[e].key,r=l[e].iv}var o=d(t,!1,n,r);return f(e,o.key,o.iv)},t.createDecipheriv=t.Decipheriv=f,t.listCiphers=t.getCiphers=function(){return Object.keys(l).concat(o.getCiphers())}},function(e,t,n){var r=n(121),o=n(673),c=n(13),l=n(17).Buffer,d={"des-ede3-cbc":o.CBC.instantiate(o.EDE),"des-ede3":o.EDE,"des-ede-cbc":o.CBC.instantiate(o.EDE),"des-ede":o.EDE,"des-cbc":o.CBC.instantiate(o.DES),"des-ecb":o.DES};function h(e){r.call(this);var t,n=e.mode.toLowerCase(),o=d[n];t=e.decrypt?"decrypt":"encrypt";var c=e.key;l.isBuffer(c)||(c=l.from(c)),"des-ede"!==n&&"des-ede-cbc"!==n||(c=l.concat([c,c.slice(0,8)]));var h=e.iv;l.isBuffer(h)||(h=l.from(h)),this._des=o.create({key:c,iv:h,type:t})}d.des=d["des-cbc"],d.des3=d["des-ede3-cbc"],e.exports=h,c(h,r),h.prototype._update=function(data){return l.from(this._des.update(data))},h.prototype._final=function(){return l.from(this._des.final())}},function(e,t,n){"use strict";t.utils=n(420),t.Cipher=n(283),t.DES=n(421),t.CBC=n(674),t.EDE=n(675)},function(e,t,n){"use strict";var r=n(83),o=n(13),c={};function l(e){r.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var i=0;i<this.iv.length;i++)this.iv[i]=e[i]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}o(t,e);for(var n=Object.keys(c),i=0;i<n.length;i++){var r=n[i];t.prototype[r]=c[r]}return t.create=function(e){return new t(e)},t},c._cbcInit=function(){var e=new l(this.options.iv);this._cbcState=e},c._update=function(e,t,n,r){var o=this._cbcState,c=this.constructor.super_.prototype,l=o.iv;if("encrypt"===this.type){for(var i=0;i<this.blockSize;i++)l[i]^=e[t+i];c._update.call(this,l,0,n,r);for(i=0;i<this.blockSize;i++)l[i]=n[r+i]}else{c._update.call(this,e,t,n,r);for(i=0;i<this.blockSize;i++)n[r+i]^=l[i];for(i=0;i<this.blockSize;i++)l[i]=e[t+i]}}},function(e,t,n){"use strict";var r=n(83),o=n(13),c=n(283),l=n(421);function d(e,t){r.equal(t.length,24,"Invalid key length");var n=t.slice(0,8),o=t.slice(8,16),c=t.slice(16,24);this.ciphers="encrypt"===e?[l.create({type:"encrypt",key:n}),l.create({type:"decrypt",key:o}),l.create({type:"encrypt",key:c})]:[l.create({type:"decrypt",key:c}),l.create({type:"encrypt",key:o}),l.create({type:"decrypt",key:n})]}function h(e){c.call(this,e);var t=new d(this.type,this.options.key);this._edeState=t}o(h,c),e.exports=h,h.create=function(e){return new h(e)},h.prototype._update=function(e,t,n,r){var o=this._edeState;o.ciphers[0]._update(e,t,n,r),o.ciphers[1]._update(n,r,n,r),o.ciphers[2]._update(n,r,n,r)},h.prototype._pad=l.prototype._pad,h.prototype._unpad=l.prototype._unpad},function(e,t,n){var r=n(285),o=n(425),c=n(17).Buffer,l=n(426),d=n(121),h=n(213),f=n(214);function m(e,t,n){d.call(this),this._cache=new _,this._cipher=new h.AES(t),this._prev=c.from(n),this._mode=e,this._autopadding=!0}n(13)(m,d),m.prototype._update=function(data){var e,t;this._cache.add(data);for(var n=[];e=this._cache.get();)t=this._mode.encrypt(this,e),n.push(t);return c.concat(n)};var v=c.alloc(16,16);function _(){this.cache=c.allocUnsafe(0)}function y(e,t,n){var d=r[e.toLowerCase()];if(!d)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=c.from(t)),t.length!==d.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof n&&(n=c.from(n)),"GCM"!==d.mode&&n.length!==d.iv)throw new TypeError("invalid iv length "+n.length);return"stream"===d.type?new l(d.module,t,n):"auth"===d.type?new o(d.module,t,n):new m(d.module,t,n)}m.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(v))throw this._cipher.scrub(),new Error("data not multiple of block length")},m.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},_.prototype.add=function(data){this.cache=c.concat([this.cache,data])},_.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},_.prototype.flush=function(){for(var e=16-this.cache.length,t=c.allocUnsafe(e),i=-1;++i<e;)t.writeUInt8(e,i);return c.concat([this.cache,t])},t.createCipheriv=y,t.createCipher=function(e,t){var n=r[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var o=f(t,!1,n.key,n.iv);return y(e,o.key,o.iv)}},function(e,t){t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},function(e,t,n){var r=n(184);t.encrypt=function(e,t){var data=r(t,e._prev);return e._prev=e._cipher.encryptBlock(data),e._prev},t.decrypt=function(e,t){var n=e._prev;e._prev=t;var o=e._cipher.decryptBlock(t);return r(o,n)}},function(e,t,n){var r=n(17).Buffer,o=n(184);function c(e,data,t){var n=data.length,c=o(data,e._cache);return e._cache=e._cache.slice(n),e._prev=r.concat([e._prev,t?data:c]),c}t.encrypt=function(e,data,t){for(var n,o=r.allocUnsafe(0);data.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=r.allocUnsafe(0)),!(e._cache.length<=data.length)){o=r.concat([o,c(e,data,t)]);break}n=e._cache.length,o=r.concat([o,c(e,data.slice(0,n),t)]),data=data.slice(n)}return o}},function(e,t,n){var r=n(17).Buffer;function o(e,t,n){var o=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=r.concat([e._prev.slice(1),r.from([n?t:o])]),o}t.encrypt=function(e,t,n){for(var c=t.length,l=r.allocUnsafe(c),i=-1;++i<c;)l[i]=o(e,t[i],n);return l}},function(e,t,n){var r=n(17).Buffer;function o(e,t,n){for(var r,o,i=-1,l=0;++i<8;)r=t&1<<7-i?128:0,l+=(128&(o=e._cipher.encryptBlock(e._prev)[0]^r))>>i%8,e._prev=c(e._prev,n?r:o);return l}function c(e,t){var n=e.length,i=-1,o=r.allocUnsafe(e.length);for(e=r.concat([e,r.from([t])]);++i<n;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,n){for(var c=t.length,l=r.allocUnsafe(c),i=-1;++i<c;)l[i]=o(e,t[i],n);return l}},function(e,t,n){(function(e){var r=n(184);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(t,n){for(;t._cache.length<n.length;)t._cache=e.concat([t._cache,o(t)]);var c=t._cache.slice(0,n.length);return t._cache=t._cache.slice(n.length),r(n,c)}}).call(this,n(46).Buffer)},function(e,t,n){var r=n(17).Buffer,o=r.alloc(16,0);function c(e){var t=r.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function l(e){this.h=e,this.state=r.alloc(16,0),this.cache=r.allocUnsafe(0)}l.prototype.ghash=function(e){for(var i=-1;++i<e.length;)this.state[i]^=e[i];this._multiply()},l.prototype._multiply=function(){for(var e,t,n,r=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],o=[0,0,0,0],i=-1;++i<128;){for(0!=(this.state[~~(i/8)]&1<<7-i%8)&&(o[0]^=r[0],o[1]^=r[1],o[2]^=r[2],o[3]^=r[3]),n=0!=(1&r[3]),t=3;t>0;t--)r[t]=r[t]>>>1|(1&r[t-1])<<31;r[0]=r[0]>>>1,n&&(r[0]=r[0]^225<<24)}this.state=c(o)},l.prototype.update=function(e){var t;for(this.cache=r.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},l.prototype.final=function(e,t){return this.cache.length&&this.ghash(r.concat([this.cache,o],16)),this.ghash(c([0,e,0,t])),this.state},e.exports=l},function(e,t,n){var r=n(425),o=n(17).Buffer,c=n(285),l=n(426),d=n(121),h=n(213),f=n(214);function m(e,t,n){d.call(this),this._cache=new v,this._last=void 0,this._cipher=new h.AES(t),this._prev=o.from(n),this._mode=e,this._autopadding=!0}function v(){this.cache=o.allocUnsafe(0)}function _(e,t,n){var d=c[e.toLowerCase()];if(!d)throw new TypeError("invalid suite type");if("string"==typeof n&&(n=o.from(n)),"GCM"!==d.mode&&n.length!==d.iv)throw new TypeError("invalid iv length "+n.length);if("string"==typeof t&&(t=o.from(t)),t.length!==d.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===d.type?new l(d.module,t,n,!0):"auth"===d.type?new r(d.module,t,n,!0):new m(d.module,t,n)}n(13)(m,d),m.prototype._update=function(data){var e,t;this._cache.add(data);for(var n=[];e=this._cache.get(this._autopadding);)t=this._mode.decrypt(this,e),n.push(t);return o.concat(n)},m.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");var i=-1;for(;++i<t;)if(e[i+(16-t)]!==t)throw new Error("unable to decrypt data");if(16===t)return;return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},m.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},v.prototype.add=function(data){this.cache=o.concat([this.cache,data])},v.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},v.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var n=c[e.toLowerCase()];if(!n)throw new TypeError("invalid suite type");var r=f(t,!1,n.key,n.iv);return _(e,r.key,r.iv)},t.createDecipheriv=_},function(e,t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},function(e,t,n){(function(e){var r=n(427),o=n(689),c=n(690);var l={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(t){var n=new e(o[t].prime,"hex"),r=new e(o[t].gen,"hex");return new c(n,r)},t.createDiffieHellman=t.DiffieHellman=function t(n,o,d,h){return e.isBuffer(o)||void 0===l[o]?t(n,"binary",o,d):(o=o||"binary",h=h||"binary",d=d||new e([2]),e.isBuffer(d)||(d=new e(d,h)),"number"==typeof n?new c(r(n,d),d,!0):(e.isBuffer(n)||(n=new e(n,o)),new c(n,d,!0)))}}).call(this,n(46).Buffer)},,,function(e){e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},function(e,t,n){(function(t){var r=n(50),o=new(n(428)),c=new r(24),l=new r(11),d=new r(10),h=new r(3),f=new r(7),m=n(427),v=n(154);function _(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._pub=new r(e),this}function y(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this._priv=new r(e),this}e.exports=C;var E={};function C(e,t,n){this.setGenerator(t),this.__prime=new r(e),this._prime=r.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,n?(this.setPublicKey=_,this.setPrivateKey=y):this._primeCode=8}function w(e,n){var r=new t(e.toArray());return n?r.toString(n):r}Object.defineProperty(C.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var n=t.toString("hex"),r=[n,e.toString(16)].join("_");if(r in E)return E[r];var v,_=0;if(e.isEven()||!m.simpleSieve||!m.fermatTest(e)||!o.test(e))return _+=1,_+="02"===n||"05"===n?8:4,E[r]=_,_;switch(o.test(e.shrn(1))||(_+=2),n){case"02":e.mod(c).cmp(l)&&(_+=8);break;case"05":(v=e.mod(d)).cmp(h)&&v.cmp(f)&&(_+=8);break;default:_+=4}return E[r]=_,_}(this.__prime,this.__gen)),this._primeCode}}),C.prototype.generateKeys=function(){return this._priv||(this._priv=new r(v(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},C.prototype.computeSecret=function(e){var n=(e=(e=new r(e)).toRed(this._prime)).redPow(this._priv).fromRed(),o=new t(n.toArray()),c=this.getPrime();if(o.length<c.length){var l=new t(c.length-o.length);l.fill(0),o=t.concat([l,o])}return o},C.prototype.getPublicKey=function(e){return w(this._pub,e)},C.prototype.getPrivateKey=function(e){return w(this._priv,e)},C.prototype.getPrime=function(e){return w(this.__prime,e)},C.prototype.getGenerator=function(e){return w(this._gen,e)},C.prototype.setGenerator=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.__gen=e,this._gen=new r(e),this}}).call(this,n(46).Buffer)},function(e,t,n){var r=n(17).Buffer,o=n(182),c=n(692),l=n(13),d=n(700),h=n(731),f=n(414);function m(e){c.Writable.call(this);var data=f[e];if(!data)throw new Error("Unknown message digest");this._hashType=data.hash,this._hash=o(data.hash),this._tag=data.id,this._signType=data.sign}function v(e){c.Writable.call(this);var data=f[e];if(!data)throw new Error("Unknown message digest");this._hash=o(data.hash),this._tag=data.id,this._signType=data.sign}function _(e){return new m(e)}function y(e){return new v(e)}Object.keys(f).forEach((function(e){f[e].id=r.from(f[e].id,"hex"),f[e.toLowerCase()]=f[e]})),l(m,c.Writable),m.prototype._write=function(data,e,t){this._hash.update(data),t()},m.prototype.update=function(data,e){return"string"==typeof data&&(data=r.from(data,e)),this._hash.update(data),this},m.prototype.sign=function(e,t){this.end();var n=this._hash.digest(),r=d(n,e,this._hashType,this._signType,this._tag);return t?r.toString(t):r},l(v,c.Writable),v.prototype._write=function(data,e,t){this._hash.update(data),t()},v.prototype.update=function(data,e){return"string"==typeof data&&(data=r.from(data,e)),this._hash.update(data),this},v.prototype.verify=function(e,t,n){"string"==typeof t&&(t=r.from(t,n)),this.end();var o=this._hash.digest();return h(t,o,e,this._signType,this._tag)},e.exports={Sign:_,Verify:y,createSign:_,createVerify:y}},function(e,t,n){(t=e.exports=n(429)).Stream=t,t.Readable=t,t.Writable=n(433),t.Duplex=n(159),t.Transform=n(434),t.PassThrough=n(698),t.finished=n(287),t.pipeline=n(699)},,function(e,t,n){"use strict";function r(object,e){var t=Object.keys(object);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(object);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(object,e).enumerable}))),t.push.apply(t,n)}return t}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var l=n(46).Buffer,d=n(695).inspect,h=d&&d.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,n,f;return t=e,(n=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(s){if(0===this.length)return"";for(var p=this.head,e=""+p.data;p=p.next;)e+=s+p.data;return e}},{key:"concat",value:function(e){if(0===this.length)return l.alloc(0);for(var t,n,r,o=l.allocUnsafe(e>>>0),p=this.head,i=0;p;)t=p.data,n=o,r=i,l.prototype.copy.call(t,n,r),i+=p.data.length,p=p.next;return o}},{key:"consume",value:function(e,t){var n;return e<this.head.data.length?(n=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):n=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),n}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var p=this.head,t=1,n=p.data;for(e-=n.length;p=p.next;){var r=p.data,o=e>r.length?r.length:e;if(o===r.length?n+=r:n+=r.slice(0,e),0==(e-=o)){o===r.length?(++t,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=r.slice(o));break}++t}return this.length-=t,n}},{key:"_getBuffer",value:function(e){var t=l.allocUnsafe(e),p=this.head,n=1;for(p.data.copy(t),e-=p.data.length;p=p.next;){var r=p.data,o=e>r.length?r.length:e;if(r.copy(t,t.length-e,0,o),0==(e-=o)){o===r.length?(++n,p.next?this.head=p.next:this.head=this.tail=null):(this.head=p,p.data=r.slice(o));break}++n}return this.length-=n,t}},{key:h,value:function(e,t){return d(this,function(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?r(Object(source),!0).forEach((function(t){o(e,t,source[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(source)):r(Object(source)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(source,t))}))}return e}({},t,{depth:0,customInspect:!1}))}}])&&c(t.prototype,n),f&&c(t,f),e}()},,function(e,t,n){"use strict";(function(t){var r;function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var c=n(287),l=Symbol("lastResolve"),d=Symbol("lastReject"),h=Symbol("error"),f=Symbol("ended"),m=Symbol("lastPromise"),v=Symbol("handlePromise"),_=Symbol("stream");function y(e,t){return{value:e,done:t}}function E(e){var t=e[l];if(null!==t){var data=e[_].read();null!==data&&(e[m]=null,e[l]=null,e[d]=null,t(y(data,!1)))}}function C(e){t.nextTick(E,e)}var w=Object.getPrototypeOf((function(){})),S=Object.setPrototypeOf((o(r={get stream(){return this[_]},next:function(){var e=this,n=this[h];if(null!==n)return Promise.reject(n);if(this[f])return Promise.resolve(y(void 0,!0));if(this[_].destroyed)return new Promise((function(n,r){t.nextTick((function(){e[h]?r(e[h]):n(y(void 0,!0))}))}));var r,o=this[m];if(o)r=new Promise(function(e,t){return function(n,r){e.then((function(){t[f]?n(y(void 0,!0)):t[v](n,r)}),r)}}(o,this));else{var data=this[_].read();if(null!==data)return Promise.resolve(y(data,!1));r=new Promise(this[v])}return this[m]=r,r}},Symbol.asyncIterator,(function(){return this})),o(r,"return",(function(){var e=this;return new Promise((function(t,n){e[_].destroy(null,(function(e){e?n(e):t(y(void 0,!0))}))}))})),r),w);e.exports=function(e){var t,n=Object.create(S,(o(t={},_,{value:e,writable:!0}),o(t,l,{value:null,writable:!0}),o(t,d,{value:null,writable:!0}),o(t,h,{value:null,writable:!0}),o(t,f,{value:e._readableState.endEmitted,writable:!0}),o(t,v,{value:function(e,t){var data=n[_].read();data?(n[m]=null,n[l]=null,n[d]=null,e(y(data,!1))):(n[l]=e,n[d]=t)},writable:!0}),t));return n[m]=null,c(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=n[d];return null!==t&&(n[m]=null,n[l]=null,n[d]=null,t(e)),void(n[h]=e)}var r=n[l];null!==r&&(n[m]=null,n[l]=null,n[d]=null,r(y(void 0,!0))),n[f]=!0})),e.on("readable",C.bind(null,n)),n}}).call(this,n(42))},function(e,t){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},function(e,t,n){"use strict";e.exports=o;var r=n(434);function o(e){if(!(this instanceof o))return new o(e);r.call(this,e)}n(13)(o,r),o.prototype._transform=function(e,t,n){n(null,e)}},function(e,t,n){"use strict";var r;var o=n(158).codes,c=o.ERR_MISSING_ARGS,l=o.ERR_STREAM_DESTROYED;function d(e){if(e)throw e}function h(e,t,o,c){c=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(c);var d=!1;e.on("close",(function(){d=!0})),void 0===r&&(r=n(287)),r(e,{readable:t,writable:o},(function(e){if(e)return c(e);d=!0,c()}));var h=!1;return function(t){if(!d&&!h)return h=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void c(t||new l("pipe"))}}function f(e){e()}function m(e,t){return e.pipe(t)}function v(e){return e.length?"function"!=typeof e[e.length-1]?d:e.pop():d}e.exports=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,o=v(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new c("streams");var l=t.map((function(e,i){var n=i<t.length-1;return h(e,n,i>0,(function(e){r||(r=e),e&&l.forEach(f),n||(l.forEach(f),o(r))}))}));return t.reduce(m)}},function(e,t,n){var r=n(17).Buffer,o=n(412),c=n(288),l=n(289).ec,d=n(438),h=n(216),f=n(444);function m(e,q,t,n){if((e=r.from(e.toArray())).length<q.byteLength()){var c=r.alloc(q.byteLength()-e.length);e=r.concat([c,e])}var l=t.length,d=function(e,q){e=(e=v(e,q)).mod(q);var t=r.from(e.toArray());if(t.length<q.byteLength()){var n=r.alloc(q.byteLength()-t.length);t=r.concat([n,t])}return t}(t,q),h=r.alloc(l);h.fill(1);var f=r.alloc(l);return f=o(n,f).update(h).update(r.from([0])).update(e).update(d).digest(),h=o(n,f).update(h).digest(),{k:f=o(n,f).update(h).update(r.from([1])).update(e).update(d).digest(),v:h=o(n,f).update(h).digest()}}function v(e,q){var t=new d(e),n=(e.length<<3)-q.bitLength();return n>0&&t.ishrn(n),t}function _(q,e,t){var n,c;do{for(n=r.alloc(0);8*n.length<q.bitLength();)e.v=o(t,e.k).update(e.v).digest(),n=r.concat([n,e.v]);c=v(n,q),e.k=o(t,e.k).update(e.v).update(r.from([0])).digest(),e.v=o(t,e.k).update(e.v).digest()}while(-1!==c.cmp(q));return c}function y(g,e,p,q){return g.toRed(d.mont(p)).redPow(e).fromRed().mod(q)}e.exports=function(e,t,n,o,E){var C=h(t);if(C.curve){if("ecdsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");return function(e,t){var n=f[t.curve.join(".")];if(!n)throw new Error("unknown curve "+t.curve.join("."));var o=new l(n).keyFromPrivate(t.privateKey).sign(e);return r.from(o.toDER())}(e,C)}if("dsa"===C.type){if("dsa"!==o)throw new Error("wrong private key type");return function(e,t,n){var o,c=t.params.priv_key,p=t.params.p,q=t.params.q,g=t.params.g,l=new d(0),h=v(e,q).mod(q),s=!1,f=m(c,q,e,n);for(;!1===s;)l=y(g,o=_(q,f,n),p,q),0===(s=o.invm(q).imul(h.add(c.mul(l))).mod(q)).cmpn(0)&&(s=!1,l=new d(0));return function(e,s){e=e.toArray(),s=s.toArray(),128&e[0]&&(e=[0].concat(e));128&s[0]&&(s=[0].concat(s));var t=[48,e.length+s.length+4,2,e.length];return t=t.concat(e,[2,s.length],s),r.from(t)}(l,s)}(e,C,n)}if("rsa"!==o&&"ecdsa/rsa"!==o)throw new Error("wrong private key type");e=r.concat([E,e]);for(var w=C.modulus.byteLength(),S=[0,1];e.length+S.length+1<w;)S.push(255);S.push(0);for(var i=-1;++i<e.length;)S.push(e[i]);return c(S,C)},e.exports.getKey=m,e.exports.makeKey=_},function(e,t,n){(function(e){!function(e,t){"use strict";function r(e,t){if(!e)throw new Error(t||"Assertion failed")}function o(e,t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}function c(e,base,t){if(c.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==base&&"be"!==base||(t=base,base=10),this._init(e||0,base||10,t||"be"))}var l;"object"==typeof e?e.exports=c:t.BN=c,c.BN=c,c.wordSize=26;try{l="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:n(702).Buffer}catch(e){}function d(e,t){var n=e.charCodeAt(t);return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:void r(!1,"Invalid character in "+e)}function h(e,t,n){var r=d(e,n);return n-1>=t&&(r|=d(e,n-1)<<4),r}function f(e,t,n,o){for(var c=0,b=0,l=Math.min(e.length,n),i=t;i<l;i++){var d=e.charCodeAt(i)-48;c*=o,b=d>=49?d-49+10:d>=17?d-17+10:d,r(d>=0&&b<o,"Invalid character"),c+=b}return c}function m(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(c.isBN=function(e){return e instanceof c||null!==e&&"object"==typeof e&&e.constructor.wordSize===c.wordSize&&Array.isArray(e.words)},c.max=function(e,t){return e.cmp(t)>0?e:t},c.min=function(e,t){return e.cmp(t)<0?e:t},c.prototype._init=function(e,base,t){if("number"==typeof e)return this._initNumber(e,base,t);if("object"==typeof e)return this._initArray(e,base,t);"hex"===base&&(base=16),r(base===(0|base)&&base>=2&&base<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n<e.length&&(16===base?this._parseHex(e,n,t):(this._parseBase(e,base,n),"le"===t&&this._initArray(this.toArray(),base,t)))},c.prototype._initNumber=function(e,base,t){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(r(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===t&&this._initArray(this.toArray(),base,t)},c.prototype._initArray=function(e,base,t){if(r("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var n,o,c=0;if("be"===t)for(i=e.length-1,n=0;i>=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);else if("le"===t)for(i=0,n=0;i<e.length;i+=3)o=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[n]|=o<<c&67108863,this.words[n+1]=o>>>26-c&67108863,(c+=24)>=26&&(c-=26,n++);return this._strip()},c.prototype._parseHex=function(e,t,n){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var r,o=0,c=0;if("be"===n)for(i=e.length-1;i>=t;i-=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;else for(i=(e.length-t)%2==0?t+1:t;i<e.length;i+=2)r=h(e,t,i)<<o,this.words[c]|=67108863&r,o>=18?(o-=18,c+=1,this.words[c]|=r>>>26):o+=8;this._strip()},c.prototype._parseBase=function(e,base,t){this.words=[0],this.length=1;for(var n=0,r=1;r<=67108863;r*=base)n++;n--,r=r/base|0;for(var o=e.length-t,c=o%n,l=Math.min(o,o-c)+t,d=0,i=t;i<l;i+=n)d=f(e,i,i+n,base),this.imuln(r),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d);if(0!==c){var h=1;for(d=f(e,i,e.length,base),i=0;i<c;i++)h*=base;this.imuln(h),this.words[0]+d<67108864?this.words[0]+=d:this._iaddn(d)}this._strip()},c.prototype.copy=function(e){e.words=new Array(this.length);for(var i=0;i<this.length;i++)e.words[i]=this.words[i];e.length=this.length,e.negative=this.negative,e.red=this.red},c.prototype._move=function(e){m(e,this)},c.prototype.clone=function(){var e=new c(null);return this.copy(e),e},c.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},c.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},c.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{c.prototype[Symbol.for("nodejs.util.inspect.custom")]=v}catch(e){c.prototype.inspect=v}else c.prototype.inspect=v;function v(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var _=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],y=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],E=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];c.prototype.toString=function(base,e){var t;if(e=0|e||1,16===(base=base||10)||"hex"===base){t="";for(var n=0,o=0,i=0;i<this.length;i++){var c=this.words[i],l=(16777215&(c<<n|o)).toString(16);t=0!==(o=c>>>24-n&16777215)||i!==this.length-1?_[6-l.length]+l+t:l+t,(n+=2)>=26&&(n-=26,i--)}for(0!==o&&(t=o.toString(16)+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}if(base===(0|base)&&base>=2&&base<=36){var d=y[base],h=E[base];t="";var f=this.clone();for(f.negative=0;!f.isZero();){var m=f.modrn(h).toString(base);t=(f=f.idivn(h)).isZero()?m+t:_[d-m.length]+m+t}for(this.isZero()&&(t="0"+t);t.length%e!=0;)t="0"+t;return 0!==this.negative&&(t="-"+t),t}r(!1,"Base should be between 2 and 36")},c.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},c.prototype.toJSON=function(){return this.toString(16,2)},l&&(c.prototype.toBuffer=function(e,t){return this.toArrayLike(l,e,t)}),c.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)};function C(e,t,n){n.negative=t.negative^e.negative;var r=e.length+t.length|0;n.length=r,r=r-1|0;var a=0|e.words[0],b=0|t.words[0],o=a*b,c=67108863&o,l=o/67108864|0;n.words[0]=c;for(var d=1;d<r;d++){for(var h=l>>>26,f=67108863&l,m=Math.min(d,t.length-1),v=Math.max(0,d-e.length+1);v<=m;v++){var i=d-v|0;h+=(o=(a=0|e.words[i])*(b=0|t.words[v])+f)/67108864|0,f=67108863&o}n.words[d]=0|f,l=0|h}return 0!==l?n.words[d]=0|l:n.length--,n._strip()}c.prototype.toArrayLike=function(e,t,n){this._strip();var o=this.byteLength(),c=n||Math.max(1,o);r(o<=c,"byte array longer than desired length"),r(c>0,"Requested array length <= 0");var l=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,c);return this["_toArrayLike"+("le"===t?"LE":"BE")](l,o),l},c.prototype._toArrayLikeLE=function(e,t){for(var n=0,r=0,i=0,o=0;i<this.length;i++){var c=this.words[i]<<o|r;e[n++]=255&c,n<e.length&&(e[n++]=c>>8&255),n<e.length&&(e[n++]=c>>16&255),6===o?(n<e.length&&(e[n++]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n<e.length)for(e[n++]=r;n<e.length;)e[n++]=0},c.prototype._toArrayLikeBE=function(e,t){for(var n=e.length-1,r=0,i=0,o=0;i<this.length;i++){var c=this.words[i]<<o|r;e[n--]=255&c,n>=0&&(e[n--]=c>>8&255),n>=0&&(e[n--]=c>>16&255),6===o?(n>=0&&(e[n--]=c>>24&255),r=0,o=0):(r=c>>>24,o+=2)}if(n>=0)for(e[n--]=r;n>=0;)e[n--]=0},Math.clz32?c.prototype._countBits=function(e){return 32-Math.clz32(e)}:c.prototype._countBits=function(e){var t=e,n=0;return t>=4096&&(n+=13,t>>>=13),t>=64&&(n+=7,t>>>=7),t>=8&&(n+=4,t>>>=4),t>=2&&(n+=2,t>>>=2),n+t},c.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,n=0;return 0==(8191&t)&&(n+=13,t>>>=13),0==(127&t)&&(n+=7,t>>>=7),0==(15&t)&&(n+=4,t>>>=4),0==(3&t)&&(n+=2,t>>>=2),0==(1&t)&&n++,n},c.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},c.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,i=0;i<this.length;i++){var b=this._zeroBits(this.words[i]);if(e+=b,26!==b)break}return e},c.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},c.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},c.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},c.prototype.isNeg=function(){return 0!==this.negative},c.prototype.neg=function(){return this.clone().ineg()},c.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},c.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var i=0;i<e.length;i++)this.words[i]=this.words[i]|e.words[i];return this._strip()},c.prototype.ior=function(e){return r(0==(this.negative|e.negative)),this.iuor(e)},c.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},c.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},c.prototype.iuand=function(e){var b;b=this.length>e.length?e:this;for(var i=0;i<b.length;i++)this.words[i]=this.words[i]&e.words[i];return this.length=b.length,this._strip()},c.prototype.iand=function(e){return r(0==(this.negative|e.negative)),this.iuand(e)},c.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},c.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},c.prototype.iuxor=function(e){var a,b;this.length>e.length?(a=this,b=e):(a=e,b=this);for(var i=0;i<b.length;i++)this.words[i]=a.words[i]^b.words[i];if(this!==a)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=a.length,this._strip()},c.prototype.ixor=function(e){return r(0==(this.negative|e.negative)),this.iuxor(e)},c.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},c.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},c.prototype.inotn=function(e){r("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),n=e%26;this._expand(t),n>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return n>0&&(this.words[i]=~this.words[i]&67108863>>26-n),this._strip()},c.prototype.notn=function(e){return this.clone().inotn(e)},c.prototype.setn=function(e,t){r("number"==typeof e&&e>=0);var n=e/26|0,o=e%26;return this._expand(n+1),this.words[n]=t?this.words[n]|1<<o:this.words[n]&~(1<<o),this._strip()},c.prototype.iadd=function(e){var t,a,b;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(a=this,b=e):(a=e,b=this);for(var n=0,i=0;i<b.length;i++)t=(0|a.words[i])+(0|b.words[i])+n,this.words[i]=67108863&t,n=t>>>26;for(;0!==n&&i<a.length;i++)t=(0|a.words[i])+n,this.words[i]=67108863&t,n=t>>>26;if(this.length=a.length,0!==n)this.words[this.length]=n,this.length++;else if(a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this},c.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},c.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var a,b,n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(a=this,b=e):(a=e,b=this);for(var r=0,i=0;i<b.length;i++)r=(t=(0|a.words[i])-(0|b.words[i])+r)>>26,this.words[i]=67108863&t;for(;0!==r&&i<a.length;i++)r=(t=(0|a.words[i])+r)>>26,this.words[i]=67108863&t;if(0===r&&i<a.length&&a!==this)for(;i<a.length;i++)this.words[i]=a.words[i];return this.length=Math.max(this.length,i),a!==this&&(this.negative=1),this._strip()},c.prototype.sub=function(e){return this.clone().isub(e)};var w=function(e,t,n){var r,o,c,a=e.words,b=t.words,l=n.words,d=0,h=0|a[0],f=8191&h,m=h>>>13,v=0|a[1],_=8191&v,y=v>>>13,E=0|a[2],C=8191&E,w=E>>>13,S=0|a[3],T=8191&S,A=S>>>13,R=0|a[4],O=8191&R,I=R>>>13,k=0|a[5],N=8191&k,L=k>>>13,M=0|a[6],x=8191&M,D=M>>>13,P=0|a[7],U=8191&P,B=P>>>13,F=0|a[8],V=8191&F,j=F>>>13,H=0|a[9],$=8191&H,z=H>>>13,W=0|b[0],K=8191&W,G=W>>>13,Y=0|b[1],X=8191&Y,Z=Y>>>13,Q=0|b[2],J=8191&Q,ee=Q>>>13,te=0|b[3],ne=8191&te,re=te>>>13,ie=0|b[4],oe=8191&ie,ae=ie>>>13,se=0|b[5],ce=8191&se,le=se>>>13,de=0|b[6],ue=8191&de,he=de>>>13,fe=0|b[7],pe=8191&fe,ge=fe>>>13,me=0|b[8],ve=8191&me,be=me>>>13,_e=0|b[9],ye=8191&_e,Ee=_e>>>13;n.negative=e.negative^t.negative,n.length=19;var Ce=(d+(r=Math.imul(f,K))|0)+((8191&(o=(o=Math.imul(f,G))+Math.imul(m,K)|0))<<13)|0;d=((c=Math.imul(m,G))+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,r=Math.imul(_,K),o=(o=Math.imul(_,G))+Math.imul(y,K)|0,c=Math.imul(y,G);var we=(d+(r=r+Math.imul(f,X)|0)|0)+((8191&(o=(o=o+Math.imul(f,Z)|0)+Math.imul(m,X)|0))<<13)|0;d=((c=c+Math.imul(m,Z)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,r=Math.imul(C,K),o=(o=Math.imul(C,G))+Math.imul(w,K)|0,c=Math.imul(w,G),r=r+Math.imul(_,X)|0,o=(o=o+Math.imul(_,Z)|0)+Math.imul(y,X)|0,c=c+Math.imul(y,Z)|0;var Se=(d+(r=r+Math.imul(f,J)|0)|0)+((8191&(o=(o=o+Math.imul(f,ee)|0)+Math.imul(m,J)|0))<<13)|0;d=((c=c+Math.imul(m,ee)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,r=Math.imul(T,K),o=(o=Math.imul(T,G))+Math.imul(A,K)|0,c=Math.imul(A,G),r=r+Math.imul(C,X)|0,o=(o=o+Math.imul(C,Z)|0)+Math.imul(w,X)|0,c=c+Math.imul(w,Z)|0,r=r+Math.imul(_,J)|0,o=(o=o+Math.imul(_,ee)|0)+Math.imul(y,J)|0,c=c+Math.imul(y,ee)|0;var Te=(d+(r=r+Math.imul(f,ne)|0)|0)+((8191&(o=(o=o+Math.imul(f,re)|0)+Math.imul(m,ne)|0))<<13)|0;d=((c=c+Math.imul(m,re)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,r=Math.imul(O,K),o=(o=Math.imul(O,G))+Math.imul(I,K)|0,c=Math.imul(I,G),r=r+Math.imul(T,X)|0,o=(o=o+Math.imul(T,Z)|0)+Math.imul(A,X)|0,c=c+Math.imul(A,Z)|0,r=r+Math.imul(C,J)|0,o=(o=o+Math.imul(C,ee)|0)+Math.imul(w,J)|0,c=c+Math.imul(w,ee)|0,r=r+Math.imul(_,ne)|0,o=(o=o+Math.imul(_,re)|0)+Math.imul(y,ne)|0,c=c+Math.imul(y,re)|0;var Ae=(d+(r=r+Math.imul(f,oe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ae)|0)+Math.imul(m,oe)|0))<<13)|0;d=((c=c+Math.imul(m,ae)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,r=Math.imul(N,K),o=(o=Math.imul(N,G))+Math.imul(L,K)|0,c=Math.imul(L,G),r=r+Math.imul(O,X)|0,o=(o=o+Math.imul(O,Z)|0)+Math.imul(I,X)|0,c=c+Math.imul(I,Z)|0,r=r+Math.imul(T,J)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(A,J)|0,c=c+Math.imul(A,ee)|0,r=r+Math.imul(C,ne)|0,o=(o=o+Math.imul(C,re)|0)+Math.imul(w,ne)|0,c=c+Math.imul(w,re)|0,r=r+Math.imul(_,oe)|0,o=(o=o+Math.imul(_,ae)|0)+Math.imul(y,oe)|0,c=c+Math.imul(y,ae)|0;var Re=(d+(r=r+Math.imul(f,ce)|0)|0)+((8191&(o=(o=o+Math.imul(f,le)|0)+Math.imul(m,ce)|0))<<13)|0;d=((c=c+Math.imul(m,le)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,r=Math.imul(x,K),o=(o=Math.imul(x,G))+Math.imul(D,K)|0,c=Math.imul(D,G),r=r+Math.imul(N,X)|0,o=(o=o+Math.imul(N,Z)|0)+Math.imul(L,X)|0,c=c+Math.imul(L,Z)|0,r=r+Math.imul(O,J)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(I,J)|0,c=c+Math.imul(I,ee)|0,r=r+Math.imul(T,ne)|0,o=(o=o+Math.imul(T,re)|0)+Math.imul(A,ne)|0,c=c+Math.imul(A,re)|0,r=r+Math.imul(C,oe)|0,o=(o=o+Math.imul(C,ae)|0)+Math.imul(w,oe)|0,c=c+Math.imul(w,ae)|0,r=r+Math.imul(_,ce)|0,o=(o=o+Math.imul(_,le)|0)+Math.imul(y,ce)|0,c=c+Math.imul(y,le)|0;var Oe=(d+(r=r+Math.imul(f,ue)|0)|0)+((8191&(o=(o=o+Math.imul(f,he)|0)+Math.imul(m,ue)|0))<<13)|0;d=((c=c+Math.imul(m,he)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,r=Math.imul(U,K),o=(o=Math.imul(U,G))+Math.imul(B,K)|0,c=Math.imul(B,G),r=r+Math.imul(x,X)|0,o=(o=o+Math.imul(x,Z)|0)+Math.imul(D,X)|0,c=c+Math.imul(D,Z)|0,r=r+Math.imul(N,J)|0,o=(o=o+Math.imul(N,ee)|0)+Math.imul(L,J)|0,c=c+Math.imul(L,ee)|0,r=r+Math.imul(O,ne)|0,o=(o=o+Math.imul(O,re)|0)+Math.imul(I,ne)|0,c=c+Math.imul(I,re)|0,r=r+Math.imul(T,oe)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(A,oe)|0,c=c+Math.imul(A,ae)|0,r=r+Math.imul(C,ce)|0,o=(o=o+Math.imul(C,le)|0)+Math.imul(w,ce)|0,c=c+Math.imul(w,le)|0,r=r+Math.imul(_,ue)|0,o=(o=o+Math.imul(_,he)|0)+Math.imul(y,ue)|0,c=c+Math.imul(y,he)|0;var Ie=(d+(r=r+Math.imul(f,pe)|0)|0)+((8191&(o=(o=o+Math.imul(f,ge)|0)+Math.imul(m,pe)|0))<<13)|0;d=((c=c+Math.imul(m,ge)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,r=Math.imul(V,K),o=(o=Math.imul(V,G))+Math.imul(j,K)|0,c=Math.imul(j,G),r=r+Math.imul(U,X)|0,o=(o=o+Math.imul(U,Z)|0)+Math.imul(B,X)|0,c=c+Math.imul(B,Z)|0,r=r+Math.imul(x,J)|0,o=(o=o+Math.imul(x,ee)|0)+Math.imul(D,J)|0,c=c+Math.imul(D,ee)|0,r=r+Math.imul(N,ne)|0,o=(o=o+Math.imul(N,re)|0)+Math.imul(L,ne)|0,c=c+Math.imul(L,re)|0,r=r+Math.imul(O,oe)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(I,oe)|0,c=c+Math.imul(I,ae)|0,r=r+Math.imul(T,ce)|0,o=(o=o+Math.imul(T,le)|0)+Math.imul(A,ce)|0,c=c+Math.imul(A,le)|0,r=r+Math.imul(C,ue)|0,o=(o=o+Math.imul(C,he)|0)+Math.imul(w,ue)|0,c=c+Math.imul(w,he)|0,r=r+Math.imul(_,pe)|0,o=(o=o+Math.imul(_,ge)|0)+Math.imul(y,pe)|0,c=c+Math.imul(y,ge)|0;var ke=(d+(r=r+Math.imul(f,ve)|0)|0)+((8191&(o=(o=o+Math.imul(f,be)|0)+Math.imul(m,ve)|0))<<13)|0;d=((c=c+Math.imul(m,be)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,r=Math.imul($,K),o=(o=Math.imul($,G))+Math.imul(z,K)|0,c=Math.imul(z,G),r=r+Math.imul(V,X)|0,o=(o=o+Math.imul(V,Z)|0)+Math.imul(j,X)|0,c=c+Math.imul(j,Z)|0,r=r+Math.imul(U,J)|0,o=(o=o+Math.imul(U,ee)|0)+Math.imul(B,J)|0,c=c+Math.imul(B,ee)|0,r=r+Math.imul(x,ne)|0,o=(o=o+Math.imul(x,re)|0)+Math.imul(D,ne)|0,c=c+Math.imul(D,re)|0,r=r+Math.imul(N,oe)|0,o=(o=o+Math.imul(N,ae)|0)+Math.imul(L,oe)|0,c=c+Math.imul(L,ae)|0,r=r+Math.imul(O,ce)|0,o=(o=o+Math.imul(O,le)|0)+Math.imul(I,ce)|0,c=c+Math.imul(I,le)|0,r=r+Math.imul(T,ue)|0,o=(o=o+Math.imul(T,he)|0)+Math.imul(A,ue)|0,c=c+Math.imul(A,he)|0,r=r+Math.imul(C,pe)|0,o=(o=o+Math.imul(C,ge)|0)+Math.imul(w,pe)|0,c=c+Math.imul(w,ge)|0,r=r+Math.imul(_,ve)|0,o=(o=o+Math.imul(_,be)|0)+Math.imul(y,ve)|0,c=c+Math.imul(y,be)|0;var Ne=(d+(r=r+Math.imul(f,ye)|0)|0)+((8191&(o=(o=o+Math.imul(f,Ee)|0)+Math.imul(m,ye)|0))<<13)|0;d=((c=c+Math.imul(m,Ee)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,r=Math.imul($,X),o=(o=Math.imul($,Z))+Math.imul(z,X)|0,c=Math.imul(z,Z),r=r+Math.imul(V,J)|0,o=(o=o+Math.imul(V,ee)|0)+Math.imul(j,J)|0,c=c+Math.imul(j,ee)|0,r=r+Math.imul(U,ne)|0,o=(o=o+Math.imul(U,re)|0)+Math.imul(B,ne)|0,c=c+Math.imul(B,re)|0,r=r+Math.imul(x,oe)|0,o=(o=o+Math.imul(x,ae)|0)+Math.imul(D,oe)|0,c=c+Math.imul(D,ae)|0,r=r+Math.imul(N,ce)|0,o=(o=o+Math.imul(N,le)|0)+Math.imul(L,ce)|0,c=c+Math.imul(L,le)|0,r=r+Math.imul(O,ue)|0,o=(o=o+Math.imul(O,he)|0)+Math.imul(I,ue)|0,c=c+Math.imul(I,he)|0,r=r+Math.imul(T,pe)|0,o=(o=o+Math.imul(T,ge)|0)+Math.imul(A,pe)|0,c=c+Math.imul(A,ge)|0,r=r+Math.imul(C,ve)|0,o=(o=o+Math.imul(C,be)|0)+Math.imul(w,ve)|0,c=c+Math.imul(w,be)|0;var Le=(d+(r=r+Math.imul(_,ye)|0)|0)+((8191&(o=(o=o+Math.imul(_,Ee)|0)+Math.imul(y,ye)|0))<<13)|0;d=((c=c+Math.imul(y,Ee)|0)+(o>>>13)|0)+(Le>>>26)|0,Le&=67108863,r=Math.imul($,J),o=(o=Math.imul($,ee))+Math.imul(z,J)|0,c=Math.imul(z,ee),r=r+Math.imul(V,ne)|0,o=(o=o+Math.imul(V,re)|0)+Math.imul(j,ne)|0,c=c+Math.imul(j,re)|0,r=r+Math.imul(U,oe)|0,o=(o=o+Math.imul(U,ae)|0)+Math.imul(B,oe)|0,c=c+Math.imul(B,ae)|0,r=r+Math.imul(x,ce)|0,o=(o=o+Math.imul(x,le)|0)+Math.imul(D,ce)|0,c=c+Math.imul(D,le)|0,r=r+Math.imul(N,ue)|0,o=(o=o+Math.imul(N,he)|0)+Math.imul(L,ue)|0,c=c+Math.imul(L,he)|0,r=r+Math.imul(O,pe)|0,o=(o=o+Math.imul(O,ge)|0)+Math.imul(I,pe)|0,c=c+Math.imul(I,ge)|0,r=r+Math.imul(T,ve)|0,o=(o=o+Math.imul(T,be)|0)+Math.imul(A,ve)|0,c=c+Math.imul(A,be)|0;var Me=(d+(r=r+Math.imul(C,ye)|0)|0)+((8191&(o=(o=o+Math.imul(C,Ee)|0)+Math.imul(w,ye)|0))<<13)|0;d=((c=c+Math.imul(w,Ee)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863,r=Math.imul($,ne),o=(o=Math.imul($,re))+Math.imul(z,ne)|0,c=Math.imul(z,re),r=r+Math.imul(V,oe)|0,o=(o=o+Math.imul(V,ae)|0)+Math.imul(j,oe)|0,c=c+Math.imul(j,ae)|0,r=r+Math.imul(U,ce)|0,o=(o=o+Math.imul(U,le)|0)+Math.imul(B,ce)|0,c=c+Math.imul(B,le)|0,r=r+Math.imul(x,ue)|0,o=(o=o+Math.imul(x,he)|0)+Math.imul(D,ue)|0,c=c+Math.imul(D,he)|0,r=r+Math.imul(N,pe)|0,o=(o=o+Math.imul(N,ge)|0)+Math.imul(L,pe)|0,c=c+Math.imul(L,ge)|0,r=r+Math.imul(O,ve)|0,o=(o=o+Math.imul(O,be)|0)+Math.imul(I,ve)|0,c=c+Math.imul(I,be)|0;var xe=(d+(r=r+Math.imul(T,ye)|0)|0)+((8191&(o=(o=o+Math.imul(T,Ee)|0)+Math.imul(A,ye)|0))<<13)|0;d=((c=c+Math.imul(A,Ee)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,r=Math.imul($,oe),o=(o=Math.imul($,ae))+Math.imul(z,oe)|0,c=Math.imul(z,ae),r=r+Math.imul(V,ce)|0,o=(o=o+Math.imul(V,le)|0)+Math.imul(j,ce)|0,c=c+Math.imul(j,le)|0,r=r+Math.imul(U,ue)|0,o=(o=o+Math.imul(U,he)|0)+Math.imul(B,ue)|0,c=c+Math.imul(B,he)|0,r=r+Math.imul(x,pe)|0,o=(o=o+Math.imul(x,ge)|0)+Math.imul(D,pe)|0,c=c+Math.imul(D,ge)|0,r=r+Math.imul(N,ve)|0,o=(o=o+Math.imul(N,be)|0)+Math.imul(L,ve)|0,c=c+Math.imul(L,be)|0;var De=(d+(r=r+Math.imul(O,ye)|0)|0)+((8191&(o=(o=o+Math.imul(O,Ee)|0)+Math.imul(I,ye)|0))<<13)|0;d=((c=c+Math.imul(I,Ee)|0)+(o>>>13)|0)+(De>>>26)|0,De&=67108863,r=Math.imul($,ce),o=(o=Math.imul($,le))+Math.imul(z,ce)|0,c=Math.imul(z,le),r=r+Math.imul(V,ue)|0,o=(o=o+Math.imul(V,he)|0)+Math.imul(j,ue)|0,c=c+Math.imul(j,he)|0,r=r+Math.imul(U,pe)|0,o=(o=o+Math.imul(U,ge)|0)+Math.imul(B,pe)|0,c=c+Math.imul(B,ge)|0,r=r+Math.imul(x,ve)|0,o=(o=o+Math.imul(x,be)|0)+Math.imul(D,ve)|0,c=c+Math.imul(D,be)|0;var Pe=(d+(r=r+Math.imul(N,ye)|0)|0)+((8191&(o=(o=o+Math.imul(N,Ee)|0)+Math.imul(L,ye)|0))<<13)|0;d=((c=c+Math.imul(L,Ee)|0)+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,r=Math.imul($,ue),o=(o=Math.imul($,he))+Math.imul(z,ue)|0,c=Math.imul(z,he),r=r+Math.imul(V,pe)|0,o=(o=o+Math.imul(V,ge)|0)+Math.imul(j,pe)|0,c=c+Math.imul(j,ge)|0,r=r+Math.imul(U,ve)|0,o=(o=o+Math.imul(U,be)|0)+Math.imul(B,ve)|0,c=c+Math.imul(B,be)|0;var Ue=(d+(r=r+Math.imul(x,ye)|0)|0)+((8191&(o=(o=o+Math.imul(x,Ee)|0)+Math.imul(D,ye)|0))<<13)|0;d=((c=c+Math.imul(D,Ee)|0)+(o>>>13)|0)+(Ue>>>26)|0,Ue&=67108863,r=Math.imul($,pe),o=(o=Math.imul($,ge))+Math.imul(z,pe)|0,c=Math.imul(z,ge),r=r+Math.imul(V,ve)|0,o=(o=o+Math.imul(V,be)|0)+Math.imul(j,ve)|0,c=c+Math.imul(j,be)|0;var Be=(d+(r=r+Math.imul(U,ye)|0)|0)+((8191&(o=(o=o+Math.imul(U,Ee)|0)+Math.imul(B,ye)|0))<<13)|0;d=((c=c+Math.imul(B,Ee)|0)+(o>>>13)|0)+(Be>>>26)|0,Be&=67108863,r=Math.imul($,ve),o=(o=Math.imul($,be))+Math.imul(z,ve)|0,c=Math.imul(z,be);var Fe=(d+(r=r+Math.imul(V,ye)|0)|0)+((8191&(o=(o=o+Math.imul(V,Ee)|0)+Math.imul(j,ye)|0))<<13)|0;d=((c=c+Math.imul(j,Ee)|0)+(o>>>13)|0)+(Fe>>>26)|0,Fe&=67108863;var Ve=(d+(r=Math.imul($,ye))|0)+((8191&(o=(o=Math.imul($,Ee))+Math.imul(z,ye)|0))<<13)|0;return d=((c=Math.imul(z,Ee))+(o>>>13)|0)+(Ve>>>26)|0,Ve&=67108863,l[0]=Ce,l[1]=we,l[2]=Se,l[3]=Te,l[4]=Ae,l[5]=Re,l[6]=Oe,l[7]=Ie,l[8]=ke,l[9]=Ne,l[10]=Le,l[11]=Me,l[12]=xe,l[13]=De,l[14]=Pe,l[15]=Ue,l[16]=Be,l[17]=Fe,l[18]=Ve,0!==d&&(l[19]=d,n.length++),n};function S(e,t,n){n.negative=t.negative^e.negative,n.length=e.length+t.length;for(var r=0,o=0,c=0;c<n.length-1;c++){var l=o;o=0;for(var d=67108863&r,h=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=h;f++){var i=c-f,m=(0|e.words[i])*(0|t.words[f]),v=67108863&m;d=67108863&(v=v+d|0),o+=(l=(l=l+(m/67108864|0)|0)+(v>>>26)|0)>>>26,l&=67108863}n.words[c]=d,r=l,l=o}return 0!==r?n.words[c]=r:n.length--,n._strip()}function T(e,t,n){return S(e,t,n)}function A(e,t){this.x=e,this.y=t}Math.imul||(w=C),c.prototype.mulTo=function(e,t){var n=this.length+e.length;return 10===this.length&&10===e.length?w(this,e,t):n<63?C(this,e,t):n<1024?S(this,e,t):T(this,e,t)},A.prototype.makeRBT=function(e){for(var t=new Array(e),n=c.prototype._countBits(e)-1,i=0;i<e;i++)t[i]=this.revBin(i,n,e);return t},A.prototype.revBin=function(e,t,n){if(0===e||e===n-1)return e;for(var r=0,i=0;i<t;i++)r|=(1&e)<<t-i-1,e>>=1;return r},A.prototype.permute=function(e,t,n,r,o,c){for(var i=0;i<c;i++)r[i]=t[e[i]],o[i]=n[e[i]]},A.prototype.transform=function(e,t,n,r,o,c){this.permute(c,e,t,n,r,o);for(var s=1;s<o;s<<=1)for(var l=s<<1,d=Math.cos(2*Math.PI/l),h=Math.sin(2*Math.PI/l),p=0;p<o;p+=l)for(var f=d,m=h,v=0;v<s;v++){var _=n[p+v],y=r[p+v],E=n[p+v+s],C=r[p+v+s],w=f*E-m*C;C=f*C+m*E,E=w,n[p+v]=_+E,r[p+v]=y+C,n[p+v+s]=_-E,r[p+v+s]=y-C,v!==l&&(w=d*f-h*m,m=d*m+h*f,f=w)}},A.prototype.guessLen13b=function(e,t){var n=1|Math.max(t,e),r=1&n,i=0;for(n=n/2|0;n;n>>>=1)i++;return 1<<i+1+r},A.prototype.conjugate=function(e,t,n){if(!(n<=1))for(var i=0;i<n/2;i++){var r=e[i];e[i]=e[n-i-1],e[n-i-1]=r,r=t[i],t[i]=-t[n-i-1],t[n-i-1]=-r}},A.prototype.normalize13b=function(e,t){for(var n=0,i=0;i<t/2;i++){var r=8192*Math.round(e[2*i+1]/t)+Math.round(e[2*i]/t)+n;e[i]=67108863&r,n=r<67108864?0:r/67108864|0}return e},A.prototype.convert13b=function(e,t,n,o){for(var c=0,i=0;i<t;i++)c+=0|e[i],n[2*i]=8191&c,c>>>=13,n[2*i+1]=8191&c,c>>>=13;for(i=2*t;i<o;++i)n[i]=0;r(0===c),r(0==(-8192&c))},A.prototype.stub=function(e){for(var t=new Array(e),i=0;i<e;i++)t[i]=0;return t},A.prototype.mulp=function(e,t,n){var r=2*this.guessLen13b(e.length,t.length),o=this.makeRBT(r),c=this.stub(r),l=new Array(r),d=new Array(r),h=new Array(r),f=new Array(r),m=new Array(r),v=new Array(r),_=n.words;_.length=r,this.convert13b(e.words,e.length,l,r),this.convert13b(t.words,t.length,f,r),this.transform(l,c,d,h,r,o),this.transform(f,c,m,v,r,o);for(var i=0;i<r;i++){var y=d[i]*m[i]-h[i]*v[i];h[i]=d[i]*v[i]+h[i]*m[i],d[i]=y}return this.conjugate(d,h,r),this.transform(d,h,_,c,r,o),this.conjugate(_,c,r),this.normalize13b(_,r),n.negative=e.negative^t.negative,n.length=e.length+t.length,n._strip()},c.prototype.mul=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},c.prototype.mulf=function(e){var t=new c(null);return t.words=new Array(this.length+e.length),T(this,e,t)},c.prototype.imul=function(e){return this.clone().mulTo(e,this)},c.prototype.imuln=function(e){var t=e<0;t&&(e=-e),r("number"==typeof e),r(e<67108864);for(var n=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,c=(67108863&o)+(67108863&n);n>>=26,n+=o/67108864|0,n+=c>>>26,this.words[i]=67108863&c}return 0!==n&&(this.words[i]=n,this.length++),t?this.ineg():this},c.prototype.muln=function(e){return this.clone().imuln(e)},c.prototype.sqr=function(){return this.mul(this)},c.prototype.isqr=function(){return this.imul(this.clone())},c.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),n=0;n<t.length;n++){var r=n/26|0,o=n%26;t[n]=e.words[r]>>>o&1}return t}(e);if(0===t.length)return new c(1);for(var n=this,i=0;i<t.length&&0===t[i];i++,n=n.sqr());if(++i<t.length)for(var q=n.sqr();i<t.length;i++,q=q.sqr())0!==t[i]&&(n=n.mul(q));return n},c.prototype.iushln=function(e){r("number"==typeof e&&e>=0);var i,t=e%26,s=(e-t)/26,n=67108863>>>26-t<<26-t;if(0!==t){var o=0;for(i=0;i<this.length;i++){var c=this.words[i]&n,l=(0|this.words[i])-c<<t;this.words[i]=l|o,o=c>>>26-t}o&&(this.words[i]=o,this.length++)}if(0!==s){for(i=this.length-1;i>=0;i--)this.words[i+s]=this.words[i];for(i=0;i<s;i++)this.words[i]=0;this.length+=s}return this._strip()},c.prototype.ishln=function(e){return r(0===this.negative),this.iushln(e)},c.prototype.iushrn=function(e,t,n){var o;r("number"==typeof e&&e>=0),o=t?(t-t%26)/26:0;var c=e%26,s=Math.min((e-c)/26,this.length),mask=67108863^67108863>>>c<<c,l=n;if(o-=s,o=Math.max(0,o),l){for(var i=0;i<s;i++)l.words[i]=this.words[i];l.length=s}if(0===s);else if(this.length>s)for(this.length-=s,i=0;i<this.length;i++)this.words[i]=this.words[i+s];else this.words[0]=0,this.length=1;var d=0;for(i=this.length-1;i>=0&&(0!==d||i>=o);i--){var h=0|this.words[i];this.words[i]=d<<26-c|h>>>c,d=h&mask}return l&&0!==d&&(l.words[l.length++]=d),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},c.prototype.ishrn=function(e,t,n){return r(0===this.negative),this.iushrn(e,t,n)},c.prototype.shln=function(e){return this.clone().ishln(e)},c.prototype.ushln=function(e){return this.clone().iushln(e)},c.prototype.shrn=function(e){return this.clone().ishrn(e)},c.prototype.ushrn=function(e){return this.clone().iushrn(e)},c.prototype.testn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26,q=1<<t;return!(this.length<=s)&&!!(this.words[s]&q)},c.prototype.imaskn=function(e){r("number"==typeof e&&e>=0);var t=e%26,s=(e-t)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=s)return this;if(0!==t&&s++,this.length=Math.min(s,this.length),0!==t){var mask=67108863^67108863>>>t<<t;this.words[this.length-1]&=mask}return this._strip()},c.prototype.maskn=function(e){return this.clone().imaskn(e)},c.prototype.iaddn=function(e){return r("number"==typeof e),r(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},c.prototype._iaddn=function(e){this.words[0]+=e;for(var i=0;i<this.length&&this.words[i]>=67108864;i++)this.words[i]-=67108864,i===this.length-1?this.words[i+1]=1:this.words[i+1]++;return this.length=Math.max(this.length,i+1),this},c.prototype.isubn=function(e){if(r("number"==typeof e),r(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var i=0;i<this.length&&this.words[i]<0;i++)this.words[i]+=67108864,this.words[i+1]-=1;return this._strip()},c.prototype.addn=function(e){return this.clone().iaddn(e)},c.prototype.subn=function(e){return this.clone().isubn(e)},c.prototype.iabs=function(){return this.negative=0,this},c.prototype.abs=function(){return this.clone().iabs()},c.prototype._ishlnsubmul=function(e,t,n){var i,o,c=e.length+n;this._expand(c);var l=0;for(i=0;i<e.length;i++){o=(0|this.words[i+n])+l;var d=(0|e.words[i])*t;l=((o-=67108863&d)>>26)-(d/67108864|0),this.words[i+n]=67108863&o}for(;i<this.length-n;i++)l=(o=(0|this.words[i+n])+l)>>26,this.words[i+n]=67108863&o;if(0===l)return this._strip();for(r(-1===l),l=0,i=0;i<this.length;i++)l=(o=-(0|this.words[i])+l)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},c.prototype._wordDiv=function(e,t){var n=(this.length,e.length),a=this.clone(),b=e,r=0|b.words[b.length-1];0!==(n=26-this._countBits(r))&&(b=b.ushln(n),a.iushln(n),r=0|b.words[b.length-1]);var q,o=a.length-b.length;if("mod"!==t){(q=new c(null)).length=o+1,q.words=new Array(q.length);for(var i=0;i<q.length;i++)q.words[i]=0}var l=a.clone()._ishlnsubmul(b,1,o);0===l.negative&&(a=l,q&&(q.words[o]=1));for(var d=o-1;d>=0;d--){var h=67108864*(0|a.words[b.length+d])+(0|a.words[b.length+d-1]);for(h=Math.min(h/r|0,67108863),a._ishlnsubmul(b,h,d);0!==a.negative;)h--,a.negative=0,a._ishlnsubmul(b,1,d),a.isZero()||(a.negative^=1);q&&(q.words[d]=h)}return q&&q._strip(),a._strip(),"div"!==t&&0!==n&&a.iushrn(n),{div:q||null,mod:a}},c.prototype.divmod=function(e,t,n){return r(!e.isZero()),this.isZero()?{div:new c(0),mod:new c(0)}:0!==this.negative&&0===e.negative?(l=this.neg().divmod(e,t),"mod"!==t&&(div=l.div.neg()),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.iadd(e)),{div:div,mod:o}):0===this.negative&&0!==e.negative?(l=this.divmod(e.neg(),t),"mod"!==t&&(div=l.div.neg()),{div:div,mod:l.mod}):0!=(this.negative&e.negative)?(l=this.neg().divmod(e.neg(),t),"div"!==t&&(o=l.mod.neg(),n&&0!==o.negative&&o.isub(e)),{div:l.div,mod:o}):e.length>this.length||this.cmp(e)<0?{div:new c(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new c(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new c(this.modrn(e.words[0]))}:this._wordDiv(e,t);var div,o,l},c.prototype.div=function(e){return this.divmod(e,"div",!1).div},c.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},c.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},c.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var n=0!==t.div.negative?t.mod.isub(e):t.mod,r=e.ushrn(1),o=e.andln(1),c=n.cmp(r);return c<0||1===o&&0===c?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},c.prototype.modrn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var p=(1<<26)%e,n=0,i=this.length-1;i>=0;i--)n=(p*n+(0|this.words[i]))%e;return t?-n:n},c.prototype.modn=function(e){return this.modrn(e)},c.prototype.idivn=function(e){var t=e<0;t&&(e=-e),r(e<=67108863);for(var n=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*n;this.words[i]=o/e|0,n=o%e}return this._strip(),t?this.ineg():this},c.prototype.divn=function(e){return this.clone().idivn(e)},c.prototype.egcd=function(p){r(0===p.negative),r(!p.isZero());var e=this,t=p.clone();e=0!==e.negative?e.umod(p):e.clone();for(var n=new c(1),o=new c(0),l=new c(0),d=new c(1),g=0;e.isEven()&&t.isEven();)e.iushrn(1),t.iushrn(1),++g;for(var h=t.clone(),f=e.clone();!e.isZero();){for(var i=0,m=1;0==(e.words[0]&m)&&i<26;++i,m<<=1);if(i>0)for(e.iushrn(i);i-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(h),o.isub(f)),n.iushrn(1),o.iushrn(1);for(var v=0,_=1;0==(t.words[0]&_)&&v<26;++v,_<<=1);if(v>0)for(t.iushrn(v);v-- >0;)(l.isOdd()||d.isOdd())&&(l.iadd(h),d.isub(f)),l.iushrn(1),d.iushrn(1);e.cmp(t)>=0?(e.isub(t),n.isub(l),o.isub(d)):(t.isub(e),l.isub(n),d.isub(o))}return{a:l,b:d,gcd:t.iushln(g)}},c.prototype._invmp=function(p){r(0===p.negative),r(!p.isZero());var a=this,b=p.clone();a=0!==a.negative?a.umod(p):a.clone();for(var e,t=new c(1),n=new c(0),o=b.clone();a.cmpn(1)>0&&b.cmpn(1)>0;){for(var i=0,l=1;0==(a.words[0]&l)&&i<26;++i,l<<=1);if(i>0)for(a.iushrn(i);i-- >0;)t.isOdd()&&t.iadd(o),t.iushrn(1);for(var d=0,h=1;0==(b.words[0]&h)&&d<26;++d,h<<=1);if(d>0)for(b.iushrn(d);d-- >0;)n.isOdd()&&n.iadd(o),n.iushrn(1);a.cmp(b)>=0?(a.isub(b),t.isub(n)):(b.isub(a),n.isub(t))}return(e=0===a.cmpn(1)?t:n).cmpn(0)<0&&e.iadd(p),e},c.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var a=this.clone(),b=e.clone();a.negative=0,b.negative=0;for(var t=0;a.isEven()&&b.isEven();t++)a.iushrn(1),b.iushrn(1);for(;;){for(;a.isEven();)a.iushrn(1);for(;b.isEven();)b.iushrn(1);var n=a.cmp(b);if(n<0){var r=a;a=b,b=r}else if(0===n||0===b.cmpn(1))break;a.isub(b)}return b.iushln(t)},c.prototype.invm=function(e){return this.egcd(e).a.umod(e)},c.prototype.isEven=function(){return 0==(1&this.words[0])},c.prototype.isOdd=function(){return 1==(1&this.words[0])},c.prototype.andln=function(e){return this.words[0]&e},c.prototype.bincn=function(e){r("number"==typeof e);var t=e%26,s=(e-t)/26,q=1<<t;if(this.length<=s)return this._expand(s+1),this.words[s]|=q,this;for(var n=q,i=s;0!==n&&i<this.length;i++){var o=0|this.words[i];n=(o+=n)>>>26,o&=67108863,this.words[i]=o}return 0!==n&&(this.words[i]=n,this.length++),this},c.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},c.prototype.cmpn=function(e){var t,n=e<0;if(0!==this.negative&&!n)return-1;if(0===this.negative&&n)return 1;if(this._strip(),this.length>1)t=1;else{n&&(e=-e),r(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:o<e?-1:1}return 0!==this.negative?0|-t:t},c.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},c.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,i=this.length-1;i>=0;i--){var a=0|this.words[i],b=0|e.words[i];if(a!==b){a<b?t=-1:a>b&&(t=1);break}}return t},c.prototype.gtn=function(e){return 1===this.cmpn(e)},c.prototype.gt=function(e){return 1===this.cmp(e)},c.prototype.gten=function(e){return this.cmpn(e)>=0},c.prototype.gte=function(e){return this.cmp(e)>=0},c.prototype.ltn=function(e){return-1===this.cmpn(e)},c.prototype.lt=function(e){return-1===this.cmp(e)},c.prototype.lten=function(e){return this.cmpn(e)<=0},c.prototype.lte=function(e){return this.cmp(e)<=0},c.prototype.eqn=function(e){return 0===this.cmpn(e)},c.prototype.eq=function(e){return 0===this.cmp(e)},c.red=function(e){return new M(e)},c.prototype.toRed=function(e){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},c.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},c.prototype._forceRed=function(e){return this.red=e,this},c.prototype.forceRed=function(e){return r(!this.red,"Already a number in reduction context"),this._forceRed(e)},c.prototype.redAdd=function(e){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},c.prototype.redIAdd=function(e){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},c.prototype.redSub=function(e){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},c.prototype.redISub=function(e){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},c.prototype.redShl=function(e){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},c.prototype.redMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},c.prototype.redIMul=function(e){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},c.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},c.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},c.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},c.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},c.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},c.prototype.redPow=function(e){return r(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var R={k256:null,p224:null,p192:null,p25519:null};function O(e,p){this.name=e,this.p=new c(p,16),this.n=this.p.bitLength(),this.k=new c(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function I(){O.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function k(){O.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function N(){O.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function L(){O.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(e){if("string"==typeof e){var t=c._prime(e);this.m=t.p,this.prime=t}else r(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){M.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new c(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}O.prototype._tmp=function(){var e=new c(null);return e.words=new Array(Math.ceil(this.n/13)),e},O.prototype.ireduce=function(e){var t,n=e;do{this.split(n,this.tmp),t=(n=(n=this.imulK(n)).iadd(this.tmp)).bitLength()}while(t>this.n);var r=t<this.n?-1:n.ucmp(this.p);return 0===r?(n.words[0]=0,n.length=1):r>0?n.isub(this.p):void 0!==n.strip?n.strip():n._strip(),n},O.prototype.split=function(input,e){input.iushrn(this.n,0,e)},O.prototype.imulK=function(e){return e.imul(this.k)},o(I,O),I.prototype.split=function(input,output){for(var mask=4194303,e=Math.min(input.length,9),i=0;i<e;i++)output.words[i]=input.words[i];if(output.length=e,input.length<=9)return input.words[0]=0,void(input.length=1);var t=input.words[9];for(output.words[output.length++]=t&mask,i=10;i<input.length;i++){var n=0|input.words[i];input.words[i-10]=(n&mask)<<4|t>>>22,t=n}t>>>=22,input.words[i-10]=t,0===t&&input.length>10?input.length-=10:input.length-=9},I.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,i=0;i<e.length;i++){var n=0|e.words[i];t+=977*n,e.words[i]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},o(k,O),o(N,O),o(L,O),L.prototype.imulK=function(e){for(var t=0,i=0;i<e.length;i++){var n=19*(0|e.words[i])+t,r=67108863&n;n>>>=26,e.words[i]=r,t=n}return 0!==t&&(e.words[e.length++]=t),e},c._prime=function(e){if(R[e])return R[e];var t;if("k256"===e)t=new I;else if("p224"===e)t=new k;else if("p192"===e)t=new N;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new L}return R[e]=t,t},M.prototype._verify1=function(a){r(0===a.negative,"red works only with positives"),r(a.red,"red works only with red numbers")},M.prototype._verify2=function(a,b){r(0==(a.negative|b.negative),"red works only with positives"),r(a.red&&a.red===b.red,"red works only with red numbers")},M.prototype.imod=function(a){return this.prime?this.prime.ireduce(a)._forceRed(this):(m(a,a.umod(this.m)._forceRed(this)),a)},M.prototype.neg=function(a){return a.isZero()?a.clone():this.m.sub(a)._forceRed(this)},M.prototype.add=function(a,b){this._verify2(a,b);var e=a.add(b);return e.cmp(this.m)>=0&&e.isub(this.m),e._forceRed(this)},M.prototype.iadd=function(a,b){this._verify2(a,b);var e=a.iadd(b);return e.cmp(this.m)>=0&&e.isub(this.m),e},M.prototype.sub=function(a,b){this._verify2(a,b);var e=a.sub(b);return e.cmpn(0)<0&&e.iadd(this.m),e._forceRed(this)},M.prototype.isub=function(a,b){this._verify2(a,b);var e=a.isub(b);return e.cmpn(0)<0&&e.iadd(this.m),e},M.prototype.shl=function(a,e){return this._verify1(a),this.imod(a.ushln(e))},M.prototype.imul=function(a,b){return this._verify2(a,b),this.imod(a.imul(b))},M.prototype.mul=function(a,b){return this._verify2(a,b),this.imod(a.mul(b))},M.prototype.isqr=function(a){return this.imul(a,a.clone())},M.prototype.sqr=function(a){return this.mul(a,a)},M.prototype.sqrt=function(a){if(a.isZero())return a.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var t=this.m.add(new c(1)).iushrn(2);return this.pow(a,t)}for(var q=this.m.subn(1),s=0;!q.isZero()&&0===q.andln(1);)s++,q.iushrn(1);r(!q.isZero());var n=new c(1).toRed(this),o=n.redNeg(),l=this.m.subn(1).iushrn(1),d=this.m.bitLength();for(d=new c(2*d*d).toRed(this);0!==this.pow(d,l).cmp(o);)d.redIAdd(o);for(var h=this.pow(d,q),f=this.pow(a,q.addn(1).iushrn(1)),m=this.pow(a,q),v=s;0!==m.cmp(n);){for(var _=m,i=0;0!==_.cmp(n);i++)_=_.redSqr();r(i<v);var b=this.pow(h,new c(1).iushln(v-i-1));f=f.redMul(b),h=b.redSqr(),m=m.redMul(h),v=i}return f},M.prototype.invm=function(a){var e=a._invmp(this.m);return 0!==e.negative?(e.negative=0,this.imod(e).redNeg()):this.imod(e)},M.prototype.pow=function(a,e){if(e.isZero())return new c(1).toRed(this);if(0===e.cmpn(1))return a.clone();var t=new Array(16);t[0]=new c(1).toRed(this),t[1]=a;for(var i=2;i<t.length;i++)t[i]=this.mul(t[i-1],a);var n=t[0],r=0,o=0,l=e.bitLength()%26;for(0===l&&(l=26),i=e.length-1;i>=0;i--){for(var d=e.words[i],h=l-1;h>=0;h--){var f=d>>h&1;n!==t[0]&&(n=this.sqr(n)),0!==f||0!==r?(r<<=1,r|=f,(4===++o||0===i&&0===h)&&(n=this.mul(n,t[r]),o=0,r=0)):o=0}l=26}return n},M.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},M.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},c.mont=function(e){return new x(e)},o(x,M),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(a,b){if(a.isZero()||b.isZero())return a.words[0]=0,a.length=1,a;var e=a.imul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},x.prototype.mul=function(a,b){if(a.isZero()||b.isZero())return new c(0)._forceRed(this);var e=a.mul(b),t=e.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),u=e.isub(t).iushrn(this.shift),n=u;return u.cmp(this.m)>=0?n=u.isub(this.m):u.cmpn(0)<0&&(n=u.iadd(this.m)),n._forceRed(this)},x.prototype.invm=function(a){return this.imod(a._invmp(this.m).mul(this.r2))._forceRed(this)}}(e,this)}).call(this,n(201)(e))},,function(e){e.exports=JSON.parse('{"name":"elliptic","version":"6.5.4","description":"EC cryptography","main":"lib/elliptic.js","files":["lib"],"scripts":{"lint":"eslint lib test","lint:fix":"npm run lint -- --fix","unit":"istanbul test _mocha --reporter=spec test/index.js","test":"npm run lint && npm run unit","version":"grunt dist && git add dist/"},"repository":{"type":"git","url":"git@github.com:indutny/elliptic"},"keywords":["EC","Elliptic","curve","Cryptography"],"author":"Fedor Indutny <fedor@indutny.com>","license":"MIT","bugs":{"url":"https://github.com/indutny/elliptic/issues"},"homepage":"https://github.com/indutny/elliptic","devDependencies":{"brfs":"^2.0.2","coveralls":"^3.1.0","eslint":"^7.6.0","grunt":"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1","istanbul":"^0.4.5","mocha":"^8.0.1"},"dependencies":{"bn.js":"^4.11.9","brorand":"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1","inherits":"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}}')},function(e,t,n){"use strict";var r=n(84),o=n(50),c=n(13),l=n(215),d=r.assert;function h(e){l.call(this,"short",e),this.a=new o(e.a,16).toRed(this.red),this.b=new o(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function f(e,t,n,r){l.BasePoint.call(this,e,"affine"),null===t&&null===n?(this.x=null,this.y=null,this.inf=!0):(this.x=new o(t,16),this.y=new o(n,16),r&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function m(e,t,n,r){l.BasePoint.call(this,e,"jacobian"),null===t&&null===n&&null===r?(this.x=this.curve.one,this.y=this.curve.one,this.z=new o(0)):(this.x=new o(t,16),this.y=new o(n,16),this.z=new o(r,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}c(h,l),e.exports=h,h.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,n;if(e.beta)t=new o(e.beta,16).toRed(this.red);else{var r=this._getEndoRoots(this.p);t=(t=r[0].cmp(r[1])<0?r[0]:r[1]).toRed(this.red)}if(e.lambda)n=new o(e.lambda,16);else{var c=this._getEndoRoots(this.n);0===this.g.mul(c[0]).x.cmp(this.g.x.redMul(t))?n=c[0]:(n=c[1],d(0===this.g.mul(n).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:n,basis:e.basis?e.basis.map((function(e){return{a:new o(e.a,16),b:new o(e.b,16)}})):this._getEndoBasis(n)}}},h.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:o.mont(e),n=new o(2).toRed(t).redInvm(),r=n.redNeg(),s=new o(3).toRed(t).redNeg().redSqrt().redMul(n);return[r.redAdd(s).fromRed(),r.redSub(s).fromRed()]},h.prototype._getEndoBasis=function(e){for(var t,n,r,c,l,d,h,f,m,v=this.n.ushrn(Math.floor(this.n.bitLength()/2)),u=e,_=this.n.clone(),y=new o(1),E=new o(0),C=new o(0),w=new o(1),i=0;0!==u.cmpn(0);){var q=_.div(u);f=_.sub(q.mul(u)),m=C.sub(q.mul(y));var S=w.sub(q.mul(E));if(!r&&f.cmp(v)<0)t=h.neg(),n=y,r=f.neg(),c=m;else if(r&&2==++i)break;h=f,_=u,u=f,C=y,y=m,w=E,E=S}l=f.neg(),d=m;var T=r.sqr().add(c.sqr());return l.sqr().add(d.sqr()).cmp(T)>=0&&(l=t,d=n),r.negative&&(r=r.neg(),c=c.neg()),l.negative&&(l=l.neg(),d=d.neg()),[{a:r,b:c},{a:l,b:d}]},h.prototype._endoSplit=function(e){var t=this.endo.basis,n=t[0],r=t[1],o=r.b.mul(e).divRound(this.n),c=n.b.neg().mul(e).divRound(this.n),l=o.mul(n.a),d=c.mul(r.a),h=o.mul(n.b),f=c.mul(r.b);return{k1:e.sub(l).sub(d),k2:h.add(f).neg()}},h.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),r=n.redSqrt();if(0!==r.redSqr().redSub(n).cmp(this.zero))throw new Error("invalid point");var c=r.fromRed().isOdd();return(t&&!c||!t&&c)&&(r=r.redNeg()),this.point(e,r)},h.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,n=e.y,r=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);return 0===n.redSqr().redISub(o).cmpn(0)},h.prototype._endoWnafMulAdd=function(e,t,n){for(var r=this._endoWnafT1,o=this._endoWnafT2,i=0;i<e.length;i++){var c=this._endoSplit(t[i]),p=e[i],l=p._getBeta();c.k1.negative&&(c.k1.ineg(),p=p.neg(!0)),c.k2.negative&&(c.k2.ineg(),l=l.neg(!0)),r[2*i]=p,r[2*i+1]=l,o[2*i]=c.k1,o[2*i+1]=c.k2}for(var d=this._wnafMulAdd(1,r,o,2*i,n),h=0;h<2*i;h++)r[h]=null,o[h]=null;return d},c(f,l.BasePoint),h.prototype.point=function(e,t,n){return new f(this,e,t,n)},h.prototype.pointFromJSON=function(e,t){return f.fromJSON(this,e,t)},f.prototype._getBeta=function(){if(this.curve.endo){var pre=this.precomputed;if(pre&&pre.beta)return pre.beta;var e=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(pre){var t=this.curve,n=function(p){return t.point(p.x.redMul(t.endo.beta),p.y)};pre.beta=e,e.precomputed={beta:null,naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(n)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(n)}}}return e}},f.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},f.fromJSON=function(e,t,n){"string"==typeof t&&(t=JSON.parse(t));var r=e.point(t[0],t[1],n);if(!t[2])return r;function o(t){return e.point(t[0],t[1],n)}var pre=t[2];return r.precomputed={beta:null,doubles:pre.doubles&&{step:pre.doubles.step,points:[r].concat(pre.doubles.points.map(o))},naf:pre.naf&&{wnd:pre.naf.wnd,points:[r].concat(pre.naf.points.map(o))}},r},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return this.inf},f.prototype.add=function(p){if(this.inf)return p;if(p.inf)return this;if(this.eq(p))return this.dbl();if(this.neg().eq(p))return this.curve.point(null,null);if(0===this.x.cmp(p.x))return this.curve.point(null,null);var e=this.y.redSub(p.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(p.x).redInvm()));var t=e.redSqr().redISub(this.x).redISub(p.x),n=e.redMul(this.x.redSub(t)).redISub(this.y);return this.curve.point(t,n)},f.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var a=this.curve.a,t=this.x.redSqr(),n=e.redInvm(),r=t.redAdd(t).redIAdd(t).redIAdd(a).redMul(n),o=r.redSqr().redISub(this.x.redAdd(this.x)),c=r.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,c)},f.prototype.getX=function(){return this.x.fromRed()},f.prototype.getY=function(){return this.y.fromRed()},f.prototype.mul=function(e){return e=new o(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o):this.curve._wnafMulAdd(1,r,o,2)},f.prototype.jmulAdd=function(e,t,n){var r=[this,t],o=[e,n];return this.curve.endo?this.curve._endoWnafMulAdd(r,o,!0):this.curve._wnafMulAdd(1,r,o,2,!0)},f.prototype.eq=function(p){return this===p||this.inf===p.inf&&(this.inf||0===this.x.cmp(p.x)&&0===this.y.cmp(p.y))},f.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var pre=this.precomputed,n=function(p){return p.neg()};t.precomputed={naf:pre.naf&&{wnd:pre.naf.wnd,points:pre.naf.points.map(n)},doubles:pre.doubles&&{step:pre.doubles.step,points:pre.doubles.points.map(n)}}}return t},f.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},c(m,l.BasePoint),h.prototype.jpoint=function(e,t,n){return new m(this,e,t,n)},m.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),n=this.x.redMul(t),r=this.y.redMul(t).redMul(e);return this.curve.point(n,r)},m.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},m.prototype.add=function(p){if(this.isInfinity())return p;if(p.isInfinity())return this;var e=p.z.redSqr(),t=this.z.redSqr(),n=this.x.redMul(e),r=p.x.redMul(t),o=this.y.redMul(e.redMul(p.z)),c=p.y.redMul(t.redMul(this.z)),l=n.redSub(r),d=o.redSub(c);if(0===l.cmpn(0))return 0!==d.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=l.redSqr(),h3=h2.redMul(l),h=n.redMul(h2),f=d.redSqr().redIAdd(h3).redISub(h).redISub(h),m=d.redMul(h.redISub(f)).redISub(o.redMul(h3)),v=this.z.redMul(p.z).redMul(l);return this.curve.jpoint(f,m,v)},m.prototype.mixedAdd=function(p){if(this.isInfinity())return p.toJ();if(p.isInfinity())return this;var e=this.z.redSqr(),t=this.x,n=p.x.redMul(e),r=this.y,o=p.y.redMul(e).redMul(this.z),c=t.redSub(n),l=r.redSub(o);if(0===c.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h2=c.redSqr(),h3=h2.redMul(c),d=t.redMul(h2),h=l.redSqr().redIAdd(h3).redISub(d).redISub(d),f=l.redMul(d.redISub(h)).redISub(r.redMul(h3)),m=this.z.redMul(c);return this.curve.jpoint(h,f,m)},m.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var i;if(this.curve.zeroA||this.curve.threeA){var t=this;for(i=0;i<e;i++)t=t.dbl();return t}var a=this.curve.a,n=this.curve.tinv,r=this.x,o=this.y,c=this.z,l=c.redSqr().redSqr(),d=o.redAdd(o);for(i=0;i<e;i++){var h=r.redSqr(),f=d.redSqr(),m=f.redSqr(),v=h.redAdd(h).redIAdd(h).redIAdd(a.redMul(l)),_=r.redMul(f),y=v.redSqr().redISub(_.redAdd(_)),E=_.redISub(y),C=v.redMul(E);C=C.redIAdd(C).redISub(m);var w=d.redMul(c);i+1<e&&(l=l.redMul(m)),r=y,c=w,d=C}return this.curve.jpoint(r,d.redMul(n),c)},m.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},m.prototype._zeroDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),c=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(r).redISub(c);s=s.redIAdd(s);var l=r.redAdd(r).redIAdd(r),d=l.redSqr().redISub(s).redISub(s),h=c.redIAdd(c);h=(h=h.redIAdd(h)).redIAdd(h),e=d,t=l.redMul(s.redISub(d)).redISub(h),n=this.y.redAdd(this.y)}else{var a=this.x.redSqr(),b=this.y.redSqr(),f=b.redSqr(),m=this.x.redAdd(b).redSqr().redISub(a).redISub(f);m=m.redIAdd(m);var v=a.redAdd(a).redIAdd(a),_=v.redSqr(),y=f.redIAdd(f);y=(y=y.redIAdd(y)).redIAdd(y),e=_.redISub(m).redISub(m),t=v.redMul(m.redISub(e)).redISub(y),n=(n=this.y.redMul(this.z)).redIAdd(n)}return this.curve.jpoint(e,t,n)},m.prototype._threeDbl=function(){var e,t,n;if(this.zOne){var r=this.x.redSqr(),o=this.y.redSqr(),c=o.redSqr(),s=this.x.redAdd(o).redSqr().redISub(r).redISub(c);s=s.redIAdd(s);var l=r.redAdd(r).redIAdd(r).redIAdd(this.curve.a),d=l.redSqr().redISub(s).redISub(s);e=d;var h=c.redIAdd(c);h=(h=h.redIAdd(h)).redIAdd(h),t=l.redMul(s.redISub(d)).redISub(h),n=this.y.redAdd(this.y)}else{var f=this.z.redSqr(),m=this.y.redSqr(),v=this.x.redMul(m),_=this.x.redSub(f).redMul(this.x.redAdd(f));_=_.redAdd(_).redIAdd(_);var y=v.redIAdd(v),E=(y=y.redIAdd(y)).redAdd(y);e=_.redSqr().redISub(E),n=this.y.redAdd(this.z).redSqr().redISub(m).redISub(f);var C=m.redSqr();C=(C=(C=C.redIAdd(C)).redIAdd(C)).redIAdd(C),t=_.redMul(y.redISub(e)).redISub(C)}return this.curve.jpoint(e,t,n)},m.prototype._dbl=function(){var a=this.curve.a,e=this.x,t=this.y,n=this.z,r=n.redSqr().redSqr(),o=e.redSqr(),c=t.redSqr(),l=o.redAdd(o).redIAdd(o).redIAdd(a.redMul(r)),d=e.redAdd(e),h=(d=d.redIAdd(d)).redMul(c),f=l.redSqr().redISub(h.redAdd(h)),m=h.redISub(f),v=c.redSqr();v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v);var _=l.redMul(m).redISub(v),y=t.redAdd(t).redMul(n);return this.curve.jpoint(f,_,y)},m.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),n=this.z.redSqr(),r=t.redSqr(),o=e.redAdd(e).redIAdd(e),c=o.redSqr(),l=this.x.redAdd(t).redSqr().redISub(e).redISub(r),d=(l=(l=(l=l.redIAdd(l)).redAdd(l).redIAdd(l)).redISub(c)).redSqr(),h=r.redIAdd(r);h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var u=o.redIAdd(l).redSqr().redISub(c).redISub(d).redISub(h),f=t.redMul(u);f=(f=f.redIAdd(f)).redIAdd(f);var m=this.x.redMul(d).redISub(f);m=(m=m.redIAdd(m)).redIAdd(m);var v=this.y.redMul(u.redMul(h.redISub(u)).redISub(l.redMul(d)));v=(v=(v=v.redIAdd(v)).redIAdd(v)).redIAdd(v);var _=this.z.redAdd(l).redSqr().redISub(n).redISub(d);return this.curve.jpoint(m,v,_)},m.prototype.mul=function(e,t){return e=new o(e,t),this.curve._wnafMul(this,e)},m.prototype.eq=function(p){if("affine"===p.type)return this.eq(p.toJ());if(this===p)return!0;var e=this.z.redSqr(),t=p.z.redSqr();if(0!==this.x.redMul(t).redISub(p.x.redMul(e)).cmpn(0))return!1;var n=e.redMul(this.z),r=t.redMul(p.z);return 0===this.y.redMul(r).redISub(p.y.redMul(n)).cmpn(0)},m.prototype.eqXToP=function(e){var t=this.z.redSqr(),n=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(n))return!0;for(var r=e.clone(),o=this.curve.redN.redMul(t);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(n.redIAdd(o),0===this.x.cmp(n))return!0}},m.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},m.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},function(e,t,n){"use strict";var r=n(50),o=n(13),c=n(215),l=n(84);function d(e){c.call(this,"mont",e),this.a=new r(e.a,16).toRed(this.red),this.b=new r(e.b,16).toRed(this.red),this.i4=new r(4).toRed(this.red).redInvm(),this.two=new r(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function h(e,t,n){c.BasePoint.call(this,e,"projective"),null===t&&null===n?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new r(t,16),this.z=new r(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}o(d,c),e.exports=d,d.prototype.validate=function(e){var t=e.normalize().x,n=t.redSqr(),r=n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);return 0===r.redSqrt().redSqr().cmp(r)},o(h,c.BasePoint),d.prototype.decodePoint=function(e,t){return this.point(l.toArray(e,t),1)},d.prototype.point=function(e,t){return new h(this,e,t)},d.prototype.pointFromJSON=function(e){return h.fromJSON(this,e)},h.prototype.precompute=function(){},h.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},h.fromJSON=function(e,t){return new h(e,t[0],t[1]||e.one)},h.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},h.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},h.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),n=e.redSub(t),r=e.redMul(t),o=n.redMul(t.redAdd(this.curve.a24.redMul(n)));return this.curve.point(r,o)},h.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.diffAdd=function(p,e){var a=this.x.redAdd(this.z),b=this.x.redSub(this.z),t=p.x.redAdd(p.z),n=p.x.redSub(p.z).redMul(a),r=t.redMul(b),o=e.z.redMul(n.redAdd(r).redSqr()),c=e.x.redMul(n.redISub(r).redSqr());return this.curve.point(o,c)},h.prototype.mul=function(e){for(var t=e.clone(),a=this,b=this.curve.point(null,null),n=[];0!==t.cmpn(0);t.iushrn(1))n.push(t.andln(1));for(var i=n.length-1;i>=0;i--)0===n[i]?(a=a.diffAdd(b,this),b=b.dbl()):(b=a.diffAdd(b,this),a=a.dbl());return b},h.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},h.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},h.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},h.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},function(e,t,n){"use strict";var r=n(84),o=n(50),c=n(13),l=n(215),d=r.assert;function h(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,l.call(this,"edwards",e),this.a=new o(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new o(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new o(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),d(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function f(e,t,n,r,c){l.BasePoint.call(this,e,"projective"),null===t&&null===n&&null===r?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new o(t,16),this.y=new o(n,16),this.z=r?new o(r,16):this.curve.one,this.t=c&&new o(c,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}c(h,l),e.exports=h,h.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},h.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},h.prototype.jpoint=function(e,t,n,r){return this.point(e,t,n,r)},h.prototype.pointFromX=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=this.c2.redSub(this.a.redMul(n)),c=this.one.redSub(this.c2.redMul(this.d).redMul(n)),l=r.redMul(c.redInvm()),d=l.redSqrt();if(0!==d.redSqr().redSub(l).cmp(this.zero))throw new Error("invalid point");var h=d.fromRed().isOdd();return(t&&!h||!t&&h)&&(d=d.redNeg()),this.point(e,d)},h.prototype.pointFromY=function(e,t){(e=new o(e,16)).red||(e=e.toRed(this.red));var n=e.redSqr(),r=n.redSub(this.c2),c=n.redMul(this.d).redMul(this.c2).redSub(this.a),l=r.redMul(c.redInvm());if(0===l.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var d=l.redSqrt();if(0!==d.redSqr().redSub(l).cmp(this.zero))throw new Error("invalid point");return d.fromRed().isOdd()!==t&&(d=d.redNeg()),this.point(d,e)},h.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),n=e.y.redSqr(),r=t.redMul(this.a).redAdd(n),o=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));return 0===r.cmp(o)},c(f,l.BasePoint),h.prototype.pointFromJSON=function(e){return f.fromJSON(this,e)},h.prototype.point=function(e,t,n,r){return new f(this,e,t,n,r)},f.fromJSON=function(e,t){return new f(e,t[0],t[1],t[2])},f.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},f.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},f.prototype._extDbl=function(){var a=this.x.redSqr(),b=this.y.redSqr(),e=this.z.redSqr();e=e.redIAdd(e);var t=this.curve._mulA(a),n=this.x.redAdd(this.y).redSqr().redISub(a).redISub(b),g=t.redAdd(b),r=g.redSub(e),o=t.redSub(b),c=n.redMul(r),l=g.redMul(o),d=n.redMul(o),h=r.redMul(g);return this.curve.point(c,l,h,d)},f.prototype._projDbl=function(){var e,t,n,r,o,c,b=this.x.redAdd(this.y).redSqr(),l=this.x.redSqr(),d=this.y.redSqr();if(this.curve.twisted){var h=(r=this.curve._mulA(l)).redAdd(d);this.zOne?(e=b.redSub(l).redSub(d).redMul(h.redSub(this.curve.two)),t=h.redMul(r.redSub(d)),n=h.redSqr().redSub(h).redSub(h)):(o=this.z.redSqr(),c=h.redSub(o).redISub(o),e=b.redSub(l).redISub(d).redMul(c),t=h.redMul(r.redSub(d)),n=h.redMul(c))}else r=l.redAdd(d),o=this.curve._mulC(this.z).redSqr(),c=r.redSub(o).redSub(o),e=this.curve._mulC(b.redISub(r)).redMul(c),t=this.curve._mulC(r).redMul(l.redISub(d)),n=r.redMul(c);return this.curve.point(e,t,n)},f.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},f.prototype._extAdd=function(p){var a=this.y.redSub(this.x).redMul(p.y.redSub(p.x)),b=this.y.redAdd(this.x).redMul(p.y.redAdd(p.x)),e=this.t.redMul(this.curve.dd).redMul(p.t),t=this.z.redMul(p.z.redAdd(p.z)),n=b.redSub(a),r=t.redSub(e),g=t.redAdd(e),o=b.redAdd(a),c=n.redMul(r),l=g.redMul(o),d=n.redMul(o),h=r.redMul(g);return this.curve.point(c,l,h,d)},f.prototype._projAdd=function(p){var e,t,a=this.z.redMul(p.z),b=a.redSqr(),n=this.x.redMul(p.x),r=this.y.redMul(p.y),o=this.curve.d.redMul(n).redMul(r),c=b.redSub(o),g=b.redAdd(o),l=this.x.redAdd(this.y).redMul(p.x.redAdd(p.y)).redISub(n).redISub(r),d=a.redMul(c).redMul(l);return this.curve.twisted?(e=a.redMul(g).redMul(r.redSub(this.curve._mulA(n))),t=c.redMul(g)):(e=a.redMul(g).redMul(r.redSub(n)),t=this.curve._mulC(c).redMul(g)),this.curve.point(d,e,t)},f.prototype.add=function(p){return this.isInfinity()?p:p.isInfinity()?this:this.curve.extended?this._extAdd(p):this._projAdd(p)},f.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},f.prototype.mulAdd=function(e,p,t){return this.curve._wnafMulAdd(1,[this,p],[e,t],2,!1)},f.prototype.jmulAdd=function(e,p,t){return this.curve._wnafMulAdd(1,[this,p],[e,t],2,!0)},f.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},f.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},f.prototype.getX=function(){return this.normalize(),this.x.fromRed()},f.prototype.getY=function(){return this.normalize(),this.y.fromRed()},f.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},f.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var n=e.clone(),r=this.curve.redN.redMul(this.z);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(r),0===this.x.cmp(t))return!0}},f.prototype.toP=f.prototype.normalize,f.prototype.mixedAdd=f.prototype.add},function(e,t,n){"use strict";t.sha1=n(708),t.sha224=n(709),t.sha256=n(272),t.sha384=n(710),t.sha512=n(437)},function(e,t,n){"use strict";var r=n(98),o=n(181),c=n(396),l=r.rotl32,d=r.sum32,h=r.sum32_5,f=c.ft_1,m=o.BlockHash,v=[1518500249,1859775393,2400959708,3395469782];function _(){if(!(this instanceof _))return new _;m.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}r.inherits(_,m),e.exports=_,_.blockSize=512,_.outSize=160,_.hmacStrength=80,_.padLength=64,_.prototype._update=function(e,t){for(var n=this.W,i=0;i<16;i++)n[i]=e[t+i];for(;i<n.length;i++)n[i]=l(n[i-3]^n[i-8]^n[i-14]^n[i-16],1);var a=this.h[0],b=this.h[1],r=this.h[2],o=this.h[3],c=this.h[4];for(i=0;i<n.length;i++){var s=~~(i/20),m=h(l(a,5),f(s,b,r,o),c,n[i],v[s]);c=o,o=r,r=l(b,30),b=a,a=m}this.h[0]=d(this.h[0],a),this.h[1]=d(this.h[1],b),this.h[2]=d(this.h[2],r),this.h[3]=d(this.h[3],o),this.h[4]=d(this.h[4],c)},_.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"big"):r.split32(this.h,"big")}},function(e,t,n){"use strict";var r=n(98),o=n(272);function c(){if(!(this instanceof c))return new c;o.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}r.inherits(c,o),e.exports=c,c.blockSize=512,c.outSize=224,c.hmacStrength=192,c.padLength=64,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,7),"big"):r.split32(this.h.slice(0,7),"big")}},function(e,t,n){"use strict";var r=n(98),o=n(437);function c(){if(!(this instanceof c))return new c;o.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}r.inherits(c,o),e.exports=c,c.blockSize=1024,c.outSize=384,c.hmacStrength=192,c.padLength=128,c.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h.slice(0,12),"big"):r.split32(this.h.slice(0,12),"big")}},function(e,t,n){"use strict";var r=n(98),o=n(181),c=r.rotl32,l=r.sum32,d=r.sum32_3,h=r.sum32_4,f=o.BlockHash;function m(){if(!(this instanceof m))return new m;f.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function v(e,t,n,r){return e<=15?t^n^r:e<=31?t&n|~t&r:e<=47?(t|~n)^r:e<=63?t&r|n&~r:t^(n|~r)}function _(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function y(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}r.inherits(m,f),t.ripemd160=m,m.blockSize=512,m.outSize=160,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var n=this.h[0],r=this.h[1],o=this.h[2],f=this.h[3],m=this.h[4],S=n,T=r,A=o,R=f,O=m,I=0;I<80;I++){var k=l(c(h(n,v(I,r,o,f),e[E[I]+t],_(I)),s[I]),m);n=m,m=f,f=c(o,10),o=r,r=k,k=l(c(h(S,v(79-I,T,A,R),e[C[I]+t],y(I)),w[I]),O),S=O,O=R,R=c(A,10),A=T,T=k}k=d(this.h[1],o,R),this.h[1]=d(this.h[2],f,O),this.h[2]=d(this.h[3],m,S),this.h[3]=d(this.h[4],n,T),this.h[4]=d(this.h[0],r,A),this.h[0]=k},m.prototype._digest=function(e){return"hex"===e?r.toHex32(this.h,"little"):r.split32(this.h,"little")};var E=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],C=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],s=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],w=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(e,t,n){"use strict";var r=n(98),o=n(83);function c(e,t,n){if(!(this instanceof c))return new c(e,t,n);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(r.toArray(t,n))}e.exports=c,c.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),o(e.length<=this.blockSize);for(var i=e.length;i<this.blockSize;i++)e.push(0);for(i=0;i<e.length;i++)e[i]^=54;for(this.inner=(new this.Hash).update(e),i=0;i<e.length;i++)e[i]^=106;this.outer=(new this.Hash).update(e)},c.prototype.update=function(e,t){return this.inner.update(e,t),this},c.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},function(e,t){e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},function(e,t,n){"use strict";var r=n(50),o=n(715),c=n(84),l=n(290),d=n(286),h=c.assert,f=n(716),m=n(717);function v(e){if(!(this instanceof v))return new v(e);"string"==typeof e&&(h(Object.prototype.hasOwnProperty.call(l,e),"Unknown curve "+e),e=l[e]),e instanceof l.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=v,v.prototype.keyPair=function(e){return new f(this,e)},v.prototype.keyFromPrivate=function(e,t){return f.fromPrivate(this,e,t)},v.prototype.keyFromPublic=function(e,t){return f.fromPublic(this,e,t)},v.prototype.genKeyPair=function(e){e||(e={});for(var t=new o({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||d(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),n=this.n.byteLength(),c=this.n.sub(new r(2));;){var l=new r(t.generate(n));if(!(l.cmp(c)>0))return l.iaddn(1),this.keyFromPrivate(l)}},v.prototype._truncateToN=function(e,t){var n=8*e.byteLength()-this.n.bitLength();return n>0&&(e=e.ushrn(n)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},v.prototype.sign=function(e,t,n,c){"object"==typeof n&&(c=n,n=null),c||(c={}),t=this.keyFromPrivate(t,n),e=this._truncateToN(new r(e,16));for(var l=this.n.byteLength(),d=t.getPrivate().toArray("be",l),h=e.toArray("be",l),f=new o({hash:this.hash,entropy:d,nonce:h,pers:c.pers,persEnc:c.persEnc||"utf8"}),v=this.n.sub(new r(1)),_=0;;_++){var y=c.k?c.k(_):new r(f.generate(this.n.byteLength()));if(!((y=this._truncateToN(y,!0)).cmpn(1)<=0||y.cmp(v)>=0)){var E=this.g.mul(y);if(!E.isInfinity()){var C=E.getX(),w=C.umod(this.n);if(0!==w.cmpn(0)){var s=y.invm(this.n).mul(w.mul(t.getPrivate()).iadd(e));if(0!==(s=s.umod(this.n)).cmpn(0)){var S=(E.getY().isOdd()?1:0)|(0!==C.cmp(w)?2:0);return c.canonical&&s.cmp(this.nh)>0&&(s=this.n.sub(s),S^=1),new m({r:w,s:s,recoveryParam:S})}}}}}},v.prototype.verify=function(e,t,n,o){e=this._truncateToN(new r(e,16)),n=this.keyFromPublic(n,o);var c=(t=new m(t,"hex")).r,s=t.s;if(c.cmpn(1)<0||c.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var p,l=s.invm(this.n),d=l.mul(e).umod(this.n),h=l.mul(c).umod(this.n);return this.curve._maxwellTrick?!(p=this.g.jmulAdd(d,n.getPublic(),h)).isInfinity()&&p.eqXToP(c):!(p=this.g.mulAdd(d,n.getPublic(),h)).isInfinity()&&0===p.getX().umod(this.n).cmp(c)},v.prototype.recoverPubKey=function(e,t,n,o){h((3&n)===n,"The recovery param is more than two bits"),t=new m(t,o);var c=this.n,l=new r(e),d=t.r,s=t.s,f=1&n,v=n>>1;if(d.cmp(this.curve.p.umod(this.curve.n))>=0&&v)throw new Error("Unable to find sencond key candinate");d=v?this.curve.pointFromX(d.add(this.curve.n),f):this.curve.pointFromX(d,f);var _=t.r.invm(c),y=c.sub(l).mul(_).umod(c),E=s.mul(_).umod(c);return this.g.mulAdd(y,d,E)},v.prototype.getKeyRecoveryParam=function(e,t,n,r){if(null!==(t=new m(t,r)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(n))return i}throw new Error("Unable to find valid recovery factor")}},function(e,t,n){"use strict";var r=n(291),o=n(435),c=n(83);function l(e){if(!(this instanceof l))return new l(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=o.toArray(e.entropy,e.entropyEnc||"hex"),n=o.toArray(e.nonce,e.nonceEnc||"hex"),r=o.toArray(e.pers,e.persEnc||"hex");c(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,n,r)}e.exports=l,l.prototype._init=function(e,t,n){var r=e.concat(t).concat(n);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(r),this._reseed=1,this.reseedInterval=281474976710656},l.prototype._hmac=function(){return new r.hmac(this.hash,this.K)},l.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},l.prototype.reseed=function(e,t,n,r){"string"!=typeof t&&(r=n,n=t,t=null),e=o.toArray(e,t),n=o.toArray(n,r),c(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(n||[])),this._reseed=1},l.prototype.generate=function(e,t,n,r){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(r=n,n=t,t=null),n&&(n=o.toArray(n,r||"hex"),this._update(n));for(var c=[];c.length<e;)this.V=this._hmac().update(this.V).digest(),c=c.concat(this.V);var l=c.slice(0,e);return this._update(n),this._reseed++,o.encode(l,t)}},function(e,t,n){"use strict";var r=n(50),o=n(84).assert;function c(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=c,c.fromPublic=function(e,t,n){return t instanceof c?t:new c(e,{pub:t,pubEnc:n})},c.fromPrivate=function(e,t,n){return t instanceof c?t:new c(e,{priv:t,privEnc:n})},c.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},c.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},c.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},c.prototype._importPrivate=function(e,t){this.priv=new r(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},c.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?o(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||o(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},c.prototype.derive=function(e){return e.validate()||o(e.validate(),"public point not validated"),e.mul(this.priv).getX()},c.prototype.sign=function(e,t,n){return this.ec.sign(e,this,t,n)},c.prototype.verify=function(e,t){return this.ec.verify(e,t,this)},c.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},function(e,t,n){"use strict";var r=n(50),o=n(84),c=o.assert;function l(e,t){if(e instanceof l)return e;this._importDER(e,t)||(c(e.r&&e.s,"Signature without r or s"),this.r=new r(e.r,16),this.s=new r(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function d(){this.place=0}function h(e,p){var t=e[p.place++];if(!(128&t))return t;var n=15&t;if(0===n||n>4)return!1;for(var r=0,i=0,o=p.place;i<n;i++,o++)r<<=8,r|=e[o],r>>>=0;return!(r<=127)&&(p.place=o,r)}function f(e){for(var i=0,t=e.length-1;!e[i]&&!(128&e[i+1])&&i<t;)i++;return 0===i?e:e.slice(i)}function m(e,t){if(t<128)e.push(t);else{var n=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|n);--n;)e.push(t>>>(n<<3)&255);e.push(t)}}e.exports=l,l.prototype._importDER=function(data,e){data=o.toArray(data,e);var p=new d;if(48!==data[p.place++])return!1;var t=h(data,p);if(!1===t)return!1;if(t+p.place!==data.length)return!1;if(2!==data[p.place++])return!1;var n=h(data,p);if(!1===n)return!1;var c=data.slice(p.place,n+p.place);if(p.place+=n,2!==data[p.place++])return!1;var l=h(data,p);if(!1===l)return!1;if(data.length!==l+p.place)return!1;var s=data.slice(p.place,l+p.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===s[0]){if(!(128&s[1]))return!1;s=s.slice(1)}return this.r=new r(c),this.s=new r(s),this.recoveryParam=null,!0},l.prototype.toDER=function(e){var t=this.r.toArray(),s=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&s[0]&&(s=[0].concat(s)),t=f(t),s=f(s);!(s[0]||128&s[1]);)s=s.slice(1);var n=[2];m(n,t.length),(n=n.concat(t)).push(2),m(n,s.length);var r=n.concat(s),c=[48];return m(c,r.length),c=c.concat(r),o.encode(c,e)}},function(e,t,n){"use strict";var r=n(291),o=n(290),c=n(84),l=c.assert,d=c.parseBytes,h=n(719),f=n(720);function m(e){if(l("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof m))return new m(e);e=o[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=r.sha512}e.exports=m,m.prototype.sign=function(e,t){e=d(e);var n=this.keyFromSecret(t),r=this.hashInt(n.messagePrefix(),e),o=this.g.mul(r),c=this.encodePoint(o),l=this.hashInt(c,n.pubBytes(),e).mul(n.priv()),h=r.add(l).umod(this.curve.n);return this.makeSignature({R:o,S:h,Rencoded:c})},m.prototype.verify=function(e,t,n){e=d(e),t=this.makeSignature(t);var r=this.keyFromPublic(n),o=this.hashInt(t.Rencoded(),r.pubBytes(),e),c=this.g.mul(t.S());return t.R().add(r.pub().mul(o)).eq(c)},m.prototype.hashInt=function(){for(var e=this.hash(),i=0;i<arguments.length;i++)e.update(arguments[i]);return c.intFromLE(e.digest()).umod(this.curve.n)},m.prototype.keyFromPublic=function(e){return h.fromPublic(this,e)},m.prototype.keyFromSecret=function(e){return h.fromSecret(this,e)},m.prototype.makeSignature=function(e){return e instanceof f?e:new f(this,e)},m.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},m.prototype.decodePoint=function(e){var t=(e=c.parseBytes(e)).length-1,n=e.slice(0,t).concat(-129&e[t]),r=0!=(128&e[t]),o=c.intFromLE(n);return this.curve.pointFromY(o,r)},m.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},m.prototype.decodeInt=function(e){return c.intFromLE(e)},m.prototype.isPoint=function(e){return e instanceof this.pointClass}},function(e,t,n){"use strict";var r=n(84),o=r.assert,c=r.parseBytes,l=r.cachedProperty;function d(e,t){this.eddsa=e,this._secret=c(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=c(t.pub)}d.fromPublic=function(e,t){return t instanceof d?t:new d(e,{pub:t})},d.fromSecret=function(e,t){return t instanceof d?t:new d(e,{secret:t})},d.prototype.secret=function(){return this._secret},l(d,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),l(d,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),l(d,"privBytes",(function(){var e=this.eddsa,t=this.hash(),n=e.encodingLength-1,a=t.slice(0,e.encodingLength);return a[0]&=248,a[n]&=127,a[n]|=64,a})),l(d,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),l(d,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),l(d,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),d.prototype.sign=function(e){return o(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},d.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},d.prototype.getSecret=function(e){return o(this._secret,"KeyPair is public only"),r.encode(this.secret(),e)},d.prototype.getPublic=function(e){return r.encode(this.pubBytes(),e)},e.exports=d},function(e,t,n){"use strict";var r=n(50),o=n(84),c=o.assert,l=o.cachedProperty,d=o.parseBytes;function h(e,t){this.eddsa=e,"object"!=typeof t&&(t=d(t)),Array.isArray(t)&&(t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),c(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof r&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}l(h,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),l(h,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),l(h,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),l(h,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),h.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},h.prototype.toHex=function(){return o.encode(this.toBytes(),"hex").toUpperCase()},e.exports=h},,function(e,t,n){"use strict";var r=n(439);t.certificate=n(728);var o=r.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=o;var c=r.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=c;var l=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(d),this.key("subjectPublicKey").bitstr())}));t.PublicKey=l;var d=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),h=r.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(d),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=h;var f=r.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=f;var m=r.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=m,t.DSAparam=r.define("DSAparam",(function(){this.int()}));var v=r.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(_),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=v;var _=r.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})}));t.signature=r.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},function(e,t,n){"use strict";const r=n(440),o=n(442),c=n(13);function l(e,body){this.name=e,this.body=body,this.decoders={},this.encoders={}}t.define=function(e,body){return new l(e,body)},l.prototype._createNamed=function(e){const t=this.name;function n(e){this._initNamed(e,t)}return c(n,e),n.prototype._initNamed=function(t,n){e.call(this,t,n)},new n(this)},l.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(o[e])),this.decoders[e]},l.prototype.decode=function(data,e,t){return this._getDecoder(e).decode(data,t)},l.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(r[e])),this.encoders[e]},l.prototype.encode=function(data,e,t){return this._getEncoder(e).encode(data,t)}},function(e,t,n){"use strict";const r=n(13),o=n(441);function c(e){o.call(this,e),this.enc="pem"}r(c,o),e.exports=c,c.prototype.encode=function(data,e){const p=o.prototype.encode.call(this,data).toString("base64"),t=["-----BEGIN "+e.label+"-----"];for(let i=0;i<p.length;i+=64)t.push(p.slice(i,i+64));return t.push("-----END "+e.label+"-----"),t.join("\n")}},function(e,t,n){"use strict";const r=n(13),o=n(292).Buffer,c=n(443);function l(e){c.call(this,e),this.enc="pem"}r(l,c),e.exports=l,l.prototype.decode=function(data,e){const t=data.toString().split(/[\r\n]+/g),label=e.label.toUpperCase(),n=/^-----(BEGIN|END) ([^-]+)-----$/;let r=-1,l=-1;for(let i=0;i<t.length;i++){const e=t[i].match(n);if(null!==e&&e[2]===label){if(-1!==r){if("END"!==e[1])break;l=i;break}if("BEGIN"!==e[1])break;r=i}}if(-1===r||-1===l)throw new Error("PEM section not found for: "+label);const d=t.slice(r+1,l).join("");d.replace(/[^a-z0-9+/=]+/gi,"");const input=o.from(d,"base64");return c.prototype.decode.call(this,input,e)}},function(e,t,n){"use strict";const base=t;base.Reporter=n(294).Reporter,base.DecoderBuffer=n(185).DecoderBuffer,base.EncoderBuffer=n(185).EncoderBuffer,base.Node=n(293)},function(e,t,n){"use strict";const r=t;r._reverse=function(map){const e={};return Object.keys(map).forEach((function(t){(0|t)==t&&(t|=0);const n=map[t];e[n]=t})),e},r.der=n(295)},function(e,t,n){"use strict";var r=n(439),o=r.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),c=r.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),l=r.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),d=r.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(l),this.key("subjectPublicKey").bitstr())})),h=r.define("RelativeDistinguishedName",(function(){this.setof(c)})),f=r.define("RDNSequence",(function(){this.seqof(h)})),m=r.define("Name",(function(){this.choice({rdnSequence:this.use(f)})})),v=r.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(o),this.key("notAfter").use(o))})),_=r.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),y=r.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(l),this.key("issuer").use(m),this.key("validity").use(v),this.key("subject").use(m),this.key("subjectPublicKeyInfo").use(d),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(_).optional())})),E=r.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(y),this.key("signatureAlgorithm").use(l),this.key("signatureValue").bitstr())}));e.exports=E},function(e){e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},function(e,t,n){var r=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,c=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,l=n(214),d=n(284),h=n(17).Buffer;e.exports=function(e,t){var n,f=e.toString(),m=f.match(r);if(m){var v="aes"+m[1],_=h.from(m[2],"hex"),y=h.from(m[3].replace(/[\r\n]/g,""),"base64"),E=l(t,_.slice(0,8),parseInt(m[1],10)).key,C=[],w=d.createDecipheriv(v,E,_);C.push(w.update(y)),C.push(w.final()),n=h.concat(C)}else{var S=f.match(c);n=h.from(S[2].replace(/[\r\n]/g,""),"base64")}return{tag:f.match(o)[1],data:n}}},function(e,t,n){var r=n(17).Buffer,o=n(438),c=n(289).ec,l=n(216),d=n(444);function h(b,q){if(b.cmpn(0)<=0)throw new Error("invalid sig");if(b.cmp(q)>=q)throw new Error("invalid sig")}e.exports=function(e,t,n,f,m){var v=l(n);if("ec"===v.type){if("ecdsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");return function(e,t,n){var r=d[n.data.algorithm.curve.join(".")];if(!r)throw new Error("unknown curve "+n.data.algorithm.curve.join("."));var o=new c(r),l=n.data.subjectPrivateKey.data;return o.verify(t,e,l)}(e,t,v)}if("dsa"===v.type){if("dsa"!==f)throw new Error("wrong public key type");return function(e,t,n){var p=n.data.p,q=n.data.q,g=n.data.g,r=n.data.pub_key,c=l.signature.decode(e,"der"),s=c.s,d=c.r;h(s,q),h(d,q);var f=o.mont(p),m=s.invm(q);return 0===g.toRed(f).redPow(new o(t).mul(m).mod(q)).fromRed().mul(r.toRed(f).redPow(d.mul(m).mod(q)).fromRed()).mod(p).mod(q).cmp(d)}(e,t,v)}if("rsa"!==f&&"ecdsa/rsa"!==f)throw new Error("wrong public key type");t=r.concat([m,t]);for(var _=v.modulus.byteLength(),y=[1],E=0;t.length+y.length+2<_;)y.push(255),E++;y.push(0);for(var i=-1;++i<t.length;)y.push(t[i]);y=r.from(y);var C=o.mont(v.modulus);e=(e=new o(e).toRed(C)).redPow(new o(v.publicExponent)),e=r.from(e.fromRed().toArray());var w=E<8?1:0;for(_=Math.min(e.length,y.length),e.length!==y.length&&(w=1),i=-1;++i<_;)w|=e[i]^y[i];return 0===w}},function(e,t,n){(function(t){var r=n(289),o=n(50);e.exports=function(e){return new l(e)};var c={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function l(e){this.curveType=c[e],this.curveType||(this.curveType={name:e}),this.curve=new r.ec(this.curveType.name),this.keys=void 0}function d(e,n,r){Array.isArray(e)||(e=e.toArray());var o=new t(e);if(r&&o.length<r){var c=new t(r-o.length);c.fill(0),o=t.concat([c,o])}return n?o.toString(n):o}c.p224=c.secp224r1,c.p256=c.secp256r1=c.prime256v1,c.p192=c.secp192r1=c.prime192v1,c.p384=c.secp384r1,c.p521=c.secp521r1,l.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},l.prototype.computeSecret=function(e,n,r){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),d(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},l.prototype.getPublicKey=function(e,t){var n=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(n[n.length-1]%2?n[0]=7:n[0]=6),d(n,e)},l.prototype.getPrivateKey=function(e){return d(this.keys.getPrivate(),e)},l.prototype.setPublicKey=function(e,n){return n=n||"utf8",t.isBuffer(e)||(e=new t(e,n)),this.keys._importPublic(e),this},l.prototype.setPrivateKey=function(e,n){n=n||"utf8",t.isBuffer(e)||(e=new t(e,n));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}}).call(this,n(46).Buffer)},function(e,t,n){t.publicEncrypt=n(734),t.privateDecrypt=n(735),t.privateEncrypt=function(e,n){return t.publicEncrypt(e,n,!0)},t.publicDecrypt=function(e,n){return t.privateDecrypt(e,n,!0)}},function(e,t,n){var r=n(216),o=n(154),c=n(182),l=n(445),d=n(446),h=n(50),f=n(447),m=n(288),v=n(17).Buffer;e.exports=function(e,t,n){var _;_=e.padding?e.padding:n?1:4;var y,E=r(e);if(4===_)y=function(e,t){var n=e.modulus.byteLength(),r=t.length,f=c("sha1").update(v.alloc(0)).digest(),m=f.length,_=2*m;if(r>n-_-2)throw new Error("message too long");var y=v.alloc(n-r-_-2),E=n-m-1,C=o(m),w=d(v.concat([f,y,v.alloc(1,1),t],E),l(C,E)),S=d(C,l(w,m));return new h(v.concat([v.alloc(1),S,w],n))}(E,t);else if(1===_)y=function(e,t,n){var r,c=t.length,l=e.modulus.byteLength();if(c>l-11)throw new Error("message too long");r=n?v.alloc(l-c-3,255):function(e){var t,n=v.allocUnsafe(e),i=0,r=o(2*e),c=0;for(;i<e;)c===r.length&&(r=o(2*e),c=0),(t=r[c++])&&(n[i++]=t);return n}(l-c-3);return new h(v.concat([v.from([0,n?1:2]),r,v.alloc(1),t],l))}(E,t,n);else{if(3!==_)throw new Error("unknown padding");if((y=new h(t)).cmp(E.modulus)>=0)throw new Error("data too long for modulus")}return n?m(y,E):f(y,E)}},function(e,t,n){var r=n(216),o=n(445),c=n(446),l=n(50),d=n(288),h=n(182),f=n(447),m=n(17).Buffer;e.exports=function(e,t,n){var v;v=e.padding?e.padding:n?1:4;var _,y=r(e),E=y.modulus.byteLength();if(t.length>E||new l(t).cmp(y.modulus)>=0)throw new Error("decryption error");_=n?f(new l(t),y):d(t,y);var C=m.alloc(E-_.length);if(_=m.concat([C,_],E),4===v)return function(e,t){var n=e.modulus.byteLength(),r=h("sha1").update(m.alloc(0)).digest(),l=r.length;if(0!==t[0])throw new Error("decryption error");var d=t.slice(1,l+1),f=t.slice(l+1),v=c(d,o(f,l)),_=c(f,o(v,n-l-1));if(function(a,b){a=m.from(a),b=m.from(b);var e=0,t=a.length;a.length!==b.length&&(e++,t=Math.min(a.length,b.length));var i=-1;for(;++i<t;)e+=a[i]^b[i];return e}(r,_.slice(0,l)))throw new Error("decryption error");var i=l;for(;0===_[i];)i++;if(1!==_[i++])throw new Error("decryption error");return _.slice(i)}(y,_);if(1===v)return function(e,t,n){var r=t.slice(0,2),i=2,o=0;for(;0!==t[i++];)if(i>=t.length){o++;break}var c=t.slice(2,i-1);("0002"!==r.toString("hex")&&!n||"0001"!==r.toString("hex")&&n)&&o++;c.length<8&&o++;if(o)throw new Error("decryption error");return t.slice(i)}(0,_,n);if(3===v)return _;throw new Error("unknown padding")}},function(e,t,n){"use strict";(function(e,r){function o(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var c=n(17),l=(n(154),c.Buffer),d=c.kMaxLength,h=e.crypto||e.msCrypto,f=Math.pow(2,32)-1;function m(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>f||e<0)throw new TypeError("offset must be a uint32");if(e>d||e>t)throw new RangeError("offset out of range")}function v(e,t,n){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>f||e<0)throw new TypeError("size must be a uint32");if(e+t>n||e>d)throw new RangeError("buffer too small")}function _(e,t,n,o){var c=e.buffer,l=new Uint8Array(c,t,n);return h.getRandomValues(l),o?void r.nextTick((function(){o(null,e)})):e}h&&h.getRandomValues?(t.randomFill=function(t,n,r,o){if(!(l.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof n)o=n,n=0,r=t.length;else if("function"==typeof r)o=r,r=t.length-n;else if("function"!=typeof o)throw new TypeError('"cb" argument must be a function');return m(n,t.length),v(r,n,t.length),_(t,n,r,o)},t.randomFillSync=function(t,n,r){void 0===n&&(n=0);if(!(l.isBuffer(t)||t instanceof e.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');m(n,t.length),void 0===r&&(r=t.length-n);return v(r,n,t.length),_(t,n,r)}):(t.randomFill=o,t.randomFillSync=o)}).call(this,n(23),n(42))},function(e,t,n){var content=n(738);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(36).default)("29055110",content,!0,{sourceMap:!1})},function(e,t,n){var r=n(35)((function(i){return i[1]}));r.push([e.i,'/*!\n * froala_editor v4.0.10 (https://www.froala.com/wysiwyg-editor)\n * License https://froala.com/wysiwyg-editor/terms/\n * Copyright 2014-2022 Froala Labs\n */.fr-element,.fr-element:focus{outline:0 solid transparent}.fr-view.fr-element-scroll-visible{overflow-x:visible!important}.fr-box.fr-basic{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.fr-box.fr-basic .fr-element{box-sizing:border-box;color:#414141;font-family:sans-serif;font-size:14px;line-height:1.6;min-height:60px;overflow-x:auto;padding:20px;text-align:left}.fr-box.fr-basic.fr-rtl .fr-element{text-align:right}.fr-element{background:transparent;position:relative;-webkit-user-select:auto;z-index:2}.fr-element a{user-select:auto;-o-user-select:auto;-moz-user-select:auto;-khtml-user-select:auto;-webkit-user-select:auto;-ms-user-select:auto}.fr-element.fr-disabled{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-element [contenteditable=true]{outline:0 solid transparent}.fr-box a.fr-floating-btn{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#fff;border:none;border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-sizing:border-box;color:#333;display:block;height:40px;left:0;line-height:40px;outline:none;text-align:center;top:0;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0);-webkit-transition:background .2s ease 0s,color .2s ease 0s,transform .2s ease 0s;-moz-transition:background .2s ease 0s,color .2s ease 0s,transform .2s ease 0s;-ms-transition:background .2s ease 0s,color .2s ease 0s,transform .2s ease 0s;-o-transition:background .2s ease 0s,color .2s ease 0s,transform .2s ease 0s;width:40px}.fr-box a.fr-floating-btn svg{fill:#333;-webkit-transition:transform .2s ease 0s;-moz-transition:transform .2s ease 0s;-ms-transition:transform .2s ease 0s;-o-transition:transform .2s ease 0s}.fr-box a.fr-floating-btn i,.fr-box a.fr-floating-btn svg{font-size:14px;line-height:40px}.fr-box a.fr-floating-btn.fr-btn+.fr-btn{margin-left:10px}.fr-box a.fr-floating-btn:hover{background:#ebebeb;cursor:pointer}.fr-box a.fr-floating-btn:hover svg{fill:#333}.fr-box .fr-visible a.fr-floating-btn{-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1)}iframe.fr-iframe{border:none;box-sizing:border-box;display:block;position:relative;width:100%;z-index:2}.fr-wrapper{position:relative;z-index:1}.fr-wrapper:after{clear:both;content:"";display:block;height:0}.fr-wrapper .fr-placeholder{color:#aaa;display:none;font-family:sans-serif;font-size:14px;left:0;overflow:hidden;position:absolute;right:0;top:0;z-index:1}.fr-wrapper.show-placeholder .fr-placeholder{display:block;text-overflow:ellipsis;white-space:nowrap}.fr-wrapper ::-moz-selection{background:rgba(181,214,253,.8);color:#000}.fr-wrapper ::selection{background:rgba(181,214,253,.8);color:#000}.fr-box.fr-basic .fr-wrapper{background:#fff;border:1px solid;border-color:#ccc #ccc #efefef;left:0;top:0}.fr-box.fr-basic.fr-top .fr-wrapper{border-top:0}.fr-box.fr-basic.fr-bottom .fr-wrapper{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-bottom:0;border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;-webkit-border-radius:10px 10px 0 0}@media (min-width:992px){.fr-box.fr-document{min-width:21cm}.fr-box.fr-document .fr-wrapper{background:#efefef;min-width:21cm;padding:30px;text-align:left}.fr-box.fr-document .fr-wrapper .fr-element{background:#fff;margin:auto;min-height:26cm!important;overflow:visible;padding:1cm 2cm;text-align:left;width:21cm;z-index:auto}.fr-box.fr-document .fr-wrapper .fr-element hr{background:#efefef;border:none;height:1cm;margin-left:-2cm;margin-right:-2cm;outline:none}.fr-box.fr-document .fr-wrapper .fr-element img{z-index:1}}.fr-tooltip{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#222;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#fff;font-family:Arial,Helvetica,sans-serif;font-size:11px;left:0;left:-3000px;line-height:22px;-webkit-opacity:0;-moz-opacity:0;opacity:0;padding:0 8px;position:absolute;text-rendering:optimizelegibility;top:0;-webkit-transition:opacity .2s ease 0s;-moz-transition:opacity .2s ease 0s;-ms-transition:opacity .2s ease 0s;-o-transition:opacity .2s ease 0s;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;z-index:2147483647}.fr-tooltip,.fr-tooltip.fr-visible{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"}.fr-tooltip.fr-visible{-webkit-opacity:1;-moz-opacity:1;opacity:1}.fr-modal .fr-btn-wrap,.fr-popup .fr-btn-wrap,.fr-toolbar .fr-btn-wrap{float:left;position:relative;white-space:nowrap}.fr-modal .fr-btn-wrap.fr-hidden,.fr-popup .fr-btn-wrap.fr-hidden,.fr-toolbar .fr-btn-wrap.fr-hidden{display:none}.fr-modal .fr-command.fr-btn,.fr-popup .fr-command.fr-btn,.fr-toolbar .fr-command.fr-btn{background:transparent;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:0;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;box-sizing:border-box;color:#333;cursor:pointer;float:left;height:40px;line-height:1;margin:4px 2px;-moz-outline:0;outline:none;padding:0;position:relative;text-align:left;-webkit-text-decoration:none;text-decoration:none;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;z-index:2}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-options,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-options,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-options{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0}.fr-modal .fr-command.fr-btn.fr-btn-hover,.fr-popup .fr-command.fr-btn.fr-btn-hover,.fr-toolbar .fr-command.fr-btn.fr-btn-hover{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px 0 0 4px}.fr-modal .fr-command.fr-btn::-moz-focus-inner,.fr-popup .fr-command.fr-btn::-moz-focus-inner,.fr-toolbar .fr-command.fr-btn::-moz-focus-inner{border:0;padding:0}.fr-modal .fr-command.fr-btn.fr-btn-text,.fr-popup .fr-command.fr-btn.fr-btn-text,.fr-toolbar .fr-command.fr-btn.fr-btn-text{width:auto}.fr-modal .fr-command.fr-btn i,.fr-modal .fr-command.fr-btn svg,.fr-popup .fr-command.fr-btn i,.fr-popup .fr-command.fr-btn svg,.fr-toolbar .fr-command.fr-btn i,.fr-toolbar .fr-command.fr-btn svg{display:block;float:none;margin:8px 7px;text-align:center;width:24px}.fr-modal .fr-command.fr-btn svg.fr-svg,.fr-popup .fr-command.fr-btn svg.fr-svg,.fr-toolbar .fr-command.fr-btn svg.fr-svg{height:24px}.fr-modal .fr-command.fr-btn svg path,.fr-popup .fr-command.fr-btn svg path,.fr-toolbar .fr-command.fr-btn svg path{fill:#333;-webkit-transition:all .5s;-moz-transition:all .5s;-ms-transition:all .5s;-o-transition:all .5s}.fr-modal .fr-command.fr-btn span.fr-sr-only,.fr-popup .fr-command.fr-btn span.fr-sr-only,.fr-toolbar .fr-command.fr-btn span.fr-sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fr-modal .fr-command.fr-btn span,.fr-popup .fr-command.fr-btn span,.fr-toolbar .fr-command.fr-btn span{display:block;float:left;font-size:14px;font-weight:700;height:17px;line-height:17px;min-width:30px;overflow:hidden;padding:0 4px;text-overflow:ellipsis;white-space:nowrap}.fr-modal .fr-command.fr-btn img,.fr-popup .fr-command.fr-btn img,.fr-toolbar .fr-command.fr-btn img{margin:8px 7px;width:24px}.fr-modal .fr-command.fr-btn.fr-btn-active-popup,.fr-popup .fr-command.fr-btn.fr-btn-active-popup,.fr-toolbar .fr-command.fr-btn.fr-btn-active-popup{background:#d6d6d6}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-selection span,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-selection span,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-selection span{font-weight:400}.fr-modal .fr-command.fr-btn.fr-dropdown i,.fr-modal .fr-command.fr-btn.fr-dropdown img,.fr-modal .fr-command.fr-btn.fr-dropdown span,.fr-modal .fr-command.fr-btn.fr-dropdown svg,.fr-popup .fr-command.fr-btn.fr-dropdown i,.fr-popup .fr-command.fr-btn.fr-dropdown img,.fr-popup .fr-command.fr-btn.fr-dropdown span,.fr-popup .fr-command.fr-btn.fr-dropdown svg,.fr-toolbar .fr-command.fr-btn.fr-dropdown i,.fr-toolbar .fr-command.fr-btn.fr-dropdown img,.fr-toolbar .fr-command.fr-btn.fr-dropdown span,.fr-toolbar .fr-command.fr-btn.fr-dropdown svg{margin-left:3px;margin-right:11px}.fr-modal .fr-command.fr-btn.fr-dropdown:after,.fr-popup .fr-command.fr-btn.fr-dropdown:after,.fr-toolbar .fr-command.fr-btn.fr-dropdown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #333;content:"";height:0;position:absolute;right:2px;top:18px;-webkit-transition:all .3s;-moz-transition:all .3s;-ms-transition:all .3s;-o-transition:all .3s;width:0}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-active,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active{fill:#333;background:#d6d6d6;-webkit-transition:.5s ease;-moz-transition:.5s ease;-ms-transition:.5s ease;-o-transition:.5s ease}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-active:hover,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:hover,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:hover{fill:#333;background:#ebebeb}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-active:hover:after,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:hover:after,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:hover:after{border-top-color:#333}.fr-modal .fr-command.fr-btn.fr-dropdown.fr-active:after,.fr-popup .fr-command.fr-btn.fr-dropdown.fr-active:after,.fr-toolbar .fr-command.fr-btn.fr-dropdown.fr-active:after{border-bottom:4px solid #222;border-top:0}.fr-modal .fr-command.fr-btn.fr-disabled,.fr-popup .fr-command.fr-btn.fr-disabled,.fr-toolbar .fr-command.fr-btn.fr-disabled{color:#bdbdbd;cursor:default;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.3;-moz-opacity:.3;opacity:.3}.fr-modal .fr-command.fr-btn.fr-disabled:after,.fr-popup .fr-command.fr-btn.fr-disabled:after,.fr-toolbar .fr-command.fr-btn.fr-disabled:after{border-top-color:#bdbdbd}.fr-modal .fr-command.fr-btn.fr-hidden,.fr-popup .fr-command.fr-btn.fr-hidden,.fr-toolbar .fr-command.fr-btn.fr-hidden{display:none}.fr-modal .fr-tabs .fr-command.fr-btn,.fr-popup .fr-tabs .fr-command.fr-btn,.fr-toolbar .fr-tabs .fr-command.fr-btn{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;height:40px;margin:0;width:46px}.fr-modal .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active,.fr-modal .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active-tab,.fr-popup .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active,.fr-popup .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active-tab,.fr-toolbar .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active,.fr-toolbar .fr-tabs .fr-command.fr-btn:not(:hover):not(:focus).fr-active-tab{background:#fff}.fr-modal .fr-tabs .fr-command.fr-btn span,.fr-popup .fr-tabs .fr-command.fr-btn span,.fr-toolbar .fr-tabs .fr-command.fr-btn span{height:27px}.fr-modal .fr-tabs .fr-command.fr-btn img,.fr-modal .fr-tabs .fr-command.fr-btn svg,.fr-popup .fr-tabs .fr-command.fr-btn img,.fr-popup .fr-tabs .fr-command.fr-btn svg,.fr-toolbar .fr-tabs .fr-command.fr-btn img,.fr-toolbar .fr-tabs .fr-command.fr-btn svg{height:24px;margin:8px 11px;width:24px}.fr-modal .fr-btn-grp .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-modal .fr-buttons:not(.fr-tabs) .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-modal .fr-more-toolbar .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-popup .fr-btn-grp .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-popup .fr-buttons:not(.fr-tabs) .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-popup .fr-more-toolbar .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-toolbar .fr-btn-grp .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-toolbar .fr-buttons:not(.fr-tabs) .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path,.fr-toolbar .fr-more-toolbar .fr-command.fr-btn.fr-active:not(.fr-dropdown) svg path{fill:#0098f7}.fr-modal.fr-disabled .fr-btn,.fr-modal.fr-disabled .fr-btn.fr-active,.fr-popup.fr-disabled .fr-btn,.fr-popup.fr-disabled .fr-btn.fr-active,.fr-toolbar.fr-disabled .fr-btn,.fr-toolbar.fr-disabled .fr-btn.fr-active{color:#bdbdbd;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.3;-moz-opacity:.3;opacity:.3}.fr-modal.fr-disabled .fr-btn.fr-active.fr-dropdown:after,.fr-modal.fr-disabled .fr-btn.fr-dropdown:after,.fr-popup.fr-disabled .fr-btn.fr-active.fr-dropdown:after,.fr-popup.fr-disabled .fr-btn.fr-dropdown:after,.fr-toolbar.fr-disabled .fr-btn.fr-active.fr-dropdown:after,.fr-toolbar.fr-disabled .fr-btn.fr-dropdown:after{border-top-color:#bdbdbd}.fr-modal.fr-rtl .fr-btn-grp.fr-float-left,.fr-popup.fr-rtl .fr-btn-grp.fr-float-left,.fr-toolbar.fr-rtl .fr-btn-grp.fr-float-left{float:right}.fr-modal.fr-rtl .fr-btn-grp.fr-float-right,.fr-popup.fr-rtl .fr-btn-grp.fr-float-right,.fr-toolbar.fr-rtl .fr-btn-grp.fr-float-right{float:left}.fr-modal.fr-rtl .fr-btn-wrap,.fr-modal.fr-rtl .fr-command.fr-btn,.fr-popup.fr-rtl .fr-btn-wrap,.fr-popup.fr-rtl .fr-command.fr-btn,.fr-toolbar.fr-rtl .fr-btn-wrap,.fr-toolbar.fr-rtl .fr-command.fr-btn{float:right}.fr-modal.fr-rtl .fr-btn-wrap.fr-dropdown.fr-options,.fr-modal.fr-rtl .fr-command.fr-btn.fr-dropdown.fr-options,.fr-popup.fr-rtl .fr-btn-wrap.fr-dropdown.fr-options,.fr-popup.fr-rtl .fr-command.fr-btn.fr-dropdown.fr-options,.fr-toolbar.fr-rtl .fr-btn-wrap.fr-dropdown.fr-options,.fr-toolbar.fr-rtl .fr-command.fr-btn.fr-dropdown.fr-options{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;-webkit-border-radius:4px 0 0 4px}.fr-modal.fr-rtl .fr-btn-wrap.fr-btn-hover,.fr-modal.fr-rtl .fr-command.fr-btn.fr-btn-hover,.fr-popup.fr-rtl .fr-btn-wrap.fr-btn-hover,.fr-popup.fr-rtl .fr-command.fr-btn.fr-btn-hover,.fr-toolbar.fr-rtl .fr-btn-wrap.fr-btn-hover,.fr-toolbar.fr-rtl .fr-command.fr-btn.fr-btn-hover{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;-webkit-border-radius:0 4px 4px 0}.fr-toolbar.fr-inline>.fr-btn-wrap:not(.fr-hidden),.fr-toolbar.fr-inline>.fr-command.fr-btn:not(.fr-hidden){display:inline-flex;float:none}.fr-desktop .fr-command.fr-btn-hover,.fr-desktop .fr-command.fr-expanded,.fr-desktop .fr-command:focus,.fr-desktop .fr-command:hover{color:#333;outline:0}.fr-desktop .fr-command.fr-btn-hover:not(.fr-table-cell),.fr-desktop .fr-command.fr-expanded:not(.fr-table-cell),.fr-desktop .fr-command:focus:not(.fr-table-cell),.fr-desktop .fr-command:hover:not(.fr-table-cell){background:#ebebeb}.fr-desktop .fr-command.fr-btn-hover:after,.fr-desktop .fr-command.fr-expanded:after,.fr-desktop .fr-command:focus:after,.fr-desktop .fr-command:hover:after{border-top-color:#333}.fr-desktop .fr-command.fr-selected:not(.fr-table-cell),.fr-desktop .fr-command:active{background:#d6d6d6;color:#333}.fr-desktop .fr-command.fr-active.fr-btn-hover,.fr-desktop .fr-command.fr-active.fr-expanded,.fr-desktop .fr-command.fr-active:focus,.fr-desktop .fr-command.fr-active:hover{background:#ebebeb}.fr-desktop .fr-command.fr-active:active{background:#d6d6d6}.fr-desktop .fr-command.fr-disabled.fr-selected,.fr-desktop .fr-command.fr-disabled:focus,.fr-desktop .fr-command.fr-disabled:hover{background:transparent}.fr-desktop.fr-disabled .fr-command.fr-selected,.fr-desktop.fr-disabled .fr-command:focus,.fr-desktop.fr-disabled .fr-command:hover{background:transparent}.fr-popup.fr-mobile .fr-command.fr-blink,.fr-toolbar.fr-mobile .fr-command.fr-blink{background:#d6d6d6}.fr-command.fr-btn.fr-options{margin-left:-5px;width:16px}.fr-command.fr-btn.fr-options.fr-btn-hover,.fr-command.fr-btn.fr-options:focus,.fr-command.fr-btn.fr-options:hover{border-left:1px solid #fafafa;-webkit-transition:border-left 0s,background-color .5s;-moz-transition:border-left 0s,background-color .5s;-ms-transition:border-left 0s,background-color .5s;-o-transition:border-left 0s,background-color .5s}.fr-command.fr-btn+.fr-dropdown-menu{-webkit-overflow-scrolling:touch;zoom:1;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:4px;-moz-border-radius:4px;-webkit-border-radius:4px;bottom:auto;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);display:inline-block;height:auto;overflow:hidden;position:absolute;right:auto;z-index:4}.fr-command.fr-btn+.fr-dropdown-menu.test-height .fr-dropdown-wrapper{height:auto;max-height:275px;-webkit-transition:none;-moz-transition:none;-ms-transition:none;-o-transition:none}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper{margin-top:0!important}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper{box-sizing:border-box;display:inline-block;float:left;height:0;margin:0 auto auto;padding:0;position:relative;text-align:left;-webkit-transition:height .3s;-moz-transition:height .3s;-ms-transition:height .3s;-o-transition:height .3s}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content{position:relative}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list{list-style-type:none;margin:0;min-width:72px;padding:8px 0}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li{font-size:15px;margin:0;padding:0}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;color:inherit;cursor:pointer;display:flex;line-height:200%;padding:0 20px;-webkit-text-decoration:none;text-decoration:none;white-space:nowrap}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a svg{height:24px;margin:3px 4px;width:24px}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a svg path{fill:#333}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a.fr-active{background:#d6d6d6}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a.fr-disabled{color:#bdbdbd;cursor:default}.fr-command.fr-btn+.fr-dropdown-menu .fr-dropdown-wrapper .fr-dropdown-content ul.fr-dropdown-list li a .fr-shortcut{font-weight:700;margin-left:20px;-webkit-opacity:.75;-moz-opacity:.75;opacity:.75}.fr-command.fr-btn.fr-active+.fr-dropdown-menu{box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);display:inline-block}.fr-bottom>.fr-command.fr-btn+.fr-dropdown-menu{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px 2px 0 0;-moz-border-radius:2px 2px 0 0;-webkit-border-radius:2px 2px 0 0}.fr-popup.fr-rtl .fr-dropdown-wrapper,.fr-toolbar.fr-rtl .fr-dropdown-wrapper{text-align:right!important}body.fr-prevent-scroll{overflow:hidden}body.fr-prevent-scroll.fr-mobile{-webkit-overflow-scrolling:touch;position:fixed}.fr-modal{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;bottom:0;color:#222;font-family:Arial,Helvetica,sans-serif;left:0;line-height:1.2;overflow-x:auto;overflow-y:scroll;position:fixed;right:0;text-align:center;text-rendering:optimizelegibility;top:0;width:100%;z-index:2147483640}.fr-modal.fr-middle .fr-modal-wrapper{left:50%;margin:0 auto;position:absolute;top:50%;-webkit-transform:translate(-50%,-50%);-moz-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);-o-transform:translate(-50%,-50%)}.fr-modal .fr-modal-wrapper{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#fff;border:0;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);display:inline-block;margin:20px auto;min-width:300px;overflow:hidden;position:relative;width:90%}@media (min-width:768px) and (max-width:991px){.fr-modal .fr-modal-wrapper{margin:30px auto;width:70%}}@media (min-width:992px){.fr-modal .fr-modal-wrapper{margin:50px auto;width:960px}}.fr-modal .fr-modal-wrapper .fr-modal-head{background:#fff;border-bottom:1px solid #efefef;min-height:42px;overflow:hidden;position:absolute;-webkit-transition:all .2s ease 0s;-moz-transition:all .2s ease 0s;-ms-transition:all .2s ease 0s;-o-transition:all .2s ease 0s;width:100%;z-index:3}.fr-modal .fr-modal-wrapper .fr-modal-head .fr-modal-head-line{height:56px;padding:0 10px}.fr-modal .fr-modal-wrapper .fr-modal-head .fr-modal-close{margin:10px;position:absolute;right:0;top:0}.fr-modal .fr-modal-wrapper .fr-modal-head h4{display:inline-block;float:left;font-size:20px;font-weight:400;line-height:18px;margin:0;padding:19px 10px}.fr-modal .fr-modal-wrapper div.fr-modal-body{height:100%;min-height:150px;overflow-y:auto;padding-bottom:20px}.fr-modal .fr-modal-wrapper div.fr-modal-body:focus{outline:0}.fr-modal .fr-modal-wrapper div.fr-modal-body button.fr-command{background:none;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:none;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#0098f7;cursor:pointer;font-size:16px;height:36px;line-height:1;outline:none;padding:10px;-webkit-text-decoration:none;text-decoration:none;-webkit-transition:background .2s ease 0s;-moz-transition:background .2s ease 0s;-ms-transition:background .2s ease 0s;-o-transition:background .2s ease 0s}.fr-modal .fr-modal-wrapper div.fr-modal-body button.fr-command+button{margin-left:24px}.fr-modal .fr-modal-wrapper div.fr-modal-body button.fr-command:focus,.fr-modal .fr-modal-wrapper div.fr-modal-body button.fr-command:hover{background:#ebebeb;color:#0098f7}.fr-modal .fr-modal-wrapper div.fr-modal-body button.fr-command:active{background:#d6d6d6;color:#0098f7}.fr-modal .fr-modal-wrapper div.fr-modal-body button::-moz-focus-inner{border:0}.fr-desktop .fr-modal-wrapper .fr-modal-head i:hover{background:#ebebeb}.fr-overlay{background:#000;bottom:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;-webkit-opacity:.5;-moz-opacity:.5;opacity:.5;position:fixed;right:0;top:0;z-index:2147483639}ol.decimal_type{counter-reset:item}ol.decimal_type>li{display:block}ol.decimal_type>li:before{content:counters(item,".") ". ";counter-increment:item}.fr-popup{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);box-sizing:border-box;color:#222;display:none;font-family:Arial,Helvetica,sans-serif;line-height:1.2;margin-top:10px;position:absolute;text-align:left;text-rendering:optimizelegibility;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;z-index:2147483635}.fr-popup .fr-icon{box-sizing:content-box;cursor:pointer;font-size:20px;font-weight:400;line-height:1;padding:6px;text-align:center;vertical-align:middle}.fr-popup .fr-icon-container{box-sizing:border-box;max-height:200px;overflow:auto;padding:20px}@supports not (-ms-high-contrast:none){.fr-popup .fr-icon-container{display:grid;grid-template-columns:repeat(auto-fill,minmax(36px,36px))}}@media (min-width:768px){.fr-popup .fr-icon-container{min-width:276px}}@media (-ms-high-contrast:none),screen and (-ms-high-contrast:active){.fr-popup .fr-icon-container{display:inline-flex}}@media (-ms-high-contrast:none) and (max-width:768px),screen and (-ms-high-contrast:active) and (max-width:768px){.fr-popup .fr-icon-container{width:236px}}.fr-popup .fr-input-focus{background:#f5f5f5}.fr-popup.fr-above{border-top:0;margin-top:-10px}.fr-popup.fr-active{display:block}.fr-popup.fr-empty,.fr-popup.fr-hidden{display:none!important}.fr-popup .fr-hs{display:block!important}.fr-popup .fr-hs.fr-hidden{display:none!important}.fr-popup .fr-input-line{padding:15px 0;position:relative}.fr-popup .fr-input-line input[type=number],.fr-popup .fr-input-line input[type=text],.fr-popup .fr-input-line textarea{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#fff;border:1px solid #999;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;color:#222;font-size:14px;margin-bottom:1px;padding:4px 12px;position:relative;-webkit-transition:border .5s,padding .5s;-moz-transition:border .5s,padding .5s;-ms-transition:border .5s,padding .5s;-o-transition:border .5s,padding .5s;width:100%;z-index:2}.fr-popup .fr-input-line input[type=number]:hover,.fr-popup .fr-input-line input[type=text]:hover,.fr-popup .fr-input-line textarea:hover{border:1px solid #515151}.fr-popup .fr-input-line input[type=number]:focus,.fr-popup .fr-input-line input[type=text]:focus,.fr-popup .fr-input-line textarea:focus{border:2px solid #0098f7;padding:3px 11px}.fr-popup .fr-input-line input[type=number],.fr-popup .fr-input-line input[type=text]{height:46px}.fr-popup .fr-input-line input+label,.fr-popup .fr-input-line textarea+label{background:#fff;color:grey;cursor:text;display:block;font-size:14px;left:12px;padding:0;position:absolute;top:29px;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;-ms-transition:all .5s ease;-o-transition:all .5s ease;z-index:3}.fr-popup .fr-input-line input.fr-not-empty+label,.fr-popup .fr-input-line textarea.fr-not-empty+label{color:gray;font-size:11px;left:4px;padding:0 4px;top:9px;width:auto}.fr-popup input,.fr-popup textarea{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;outline:none;user-select:text;-o-user-select:text;-moz-user-select:text;-khtml-user-select:text;-webkit-user-select:text;-ms-user-select:text}.fr-popup textarea{resize:none}.fr-popup .fr-buttons{line-height:0;white-space:nowrap}.fr-popup .fr-buttons .fr-btn{display:inline-block;float:none;margin-left:4px;margin-right:4px}.fr-popup .fr-buttons .fr-btn i{float:left}.fr-popup .fr-buttons .fr-separator{display:inline-block;float:none}.fr-popup .fr-buttons.fr-tabs{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;-webkit-border-radius:6px 6px 0 0;overflow:hidden}@media (max-width:768px){.fr-popup .fr-buttons.fr-tabs.fr-tabs-scroll{overflow:scroll;overflow-y:hidden;width:276px}}.fr-popup .fr-buttons:not(.fr-tabs){padding:5px}.fr-popup .fr-layer{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:6px;-moz-border-radius:6px;-webkit-border-radius:6px;box-sizing:border-box;display:none;margin:20px;width:195px}@media (min-width:768px){.fr-popup .fr-layer{width:260px}}.fr-popup .fr-layer.fr-active{display:inline-block}.fr-popup .fr-action-buttons{height:36px;text-align:right;z-index:7}.fr-popup .fr-action-buttons button.fr-command{background:none;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:none;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;color:#0098f7;cursor:pointer;font-size:16px;height:36px;line-height:1;outline:none;padding:10px;-webkit-text-decoration:none;text-decoration:none;-webkit-transition:background .2s ease 0s;-moz-transition:background .2s ease 0s;-ms-transition:background .2s ease 0s;-o-transition:background .2s ease 0s}.fr-popup .fr-action-buttons button.fr-command+button{margin-left:24px}.fr-popup .fr-action-buttons button.fr-command:focus,.fr-popup .fr-action-buttons button.fr-command:hover{background:#ebebeb;color:#0098f7}.fr-popup .fr-action-buttons button.fr-command:active{background:#d6d6d6;color:#0098f7}.fr-popup .fr-action-buttons button::-moz-focus-inner{border:0}.fr-popup .fr-checkbox{border-radius:100%;box-sizing:content-box;display:inline-block;height:18px;line-height:1;padding:10px;position:relative;vertical-align:middle;width:18px}.fr-popup .fr-checkbox svg{display:none;height:10px;margin-left:2px;margin-top:2px;width:10px}.fr-popup .fr-checkbox span{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;display:inline-block;height:18px;position:relative;-webkit-transition:background .2s ease 0s,border-color .2s ease 0s;-moz-transition:background .2s ease 0s,border-color .2s ease 0s;-ms-transition:background .2s ease 0s,border-color .2s ease 0s;-o-transition:background .2s ease 0s,border-color .2s ease 0s;width:18px;z-index:1}.fr-popup .fr-checkbox input{border:0;cursor:pointer;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:18px;left:7px;margin:0;-webkit-opacity:0;-moz-opacity:0;opacity:0;padding:0;position:absolute;top:7px;width:18px;z-index:2}.fr-popup .fr-checkbox input:not(:checked)+span{border:2px solid #999}.fr-popup .fr-checkbox input:not(:checked):active+span{background-color:#f5f5f5}.fr-popup .fr-checkbox input:not(:checked):focus+span,.fr-popup .fr-checkbox input:not(:checked):hover+span{border-color:#515151}.fr-popup .fr-checkbox input:checked+span{background:#0098f7;border:2px solid #0098f7}.fr-popup .fr-checkbox input:checked+span svg{display:block}.fr-popup .fr-checkbox input:checked:active+span{background-color:#ecf5ff}.fr-popup .fr-checkbox input:checked:focus+span,.fr-popup .fr-checkbox input:checked:hover+span{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.8;-moz-opacity:.8;opacity:.8}.fr-popup .fr-checkbox-line{font-size:14px;line-height:1.4px;margin-top:10px}.fr-popup .fr-checkbox-line label{cursor:pointer;margin:0 5px;vertical-align:middle}.fr-popup.fr-rtl{direction:rtl;text-align:right}.fr-popup.fr-rtl .fr-action-buttons{text-align:left}.fr-popup.fr-rtl .fr-input-line input+label,.fr-popup.fr-rtl .fr-input-line textarea+label{left:auto;right:0}.fr-popup.fr-rtl .fr-buttons .fr-separator.fr-vs{float:right}.fr-text-edit-layer{box-sizing:border-box;display:block!important;width:250px}.fr-toolbar{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;color:#222;font-family:Arial,Helvetica,sans-serif;line-height:1.2;padding-bottom:0;position:relative;text-align:left;text-rendering:optimizelegibility;-webkit-transition:padding-bottom .5s;-moz-transition:padding-bottom .5s;-ms-transition:padding-bottom .5s;-o-transition:padding-bottom .5s;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-toolbar:after{clear:both;content:"";display:block}.fr-toolbar:after{height:0}.fr-toolbar .fr-newline{background:#efefef;clear:both;content:"";display:block;height:1px;margin-left:9px;margin-right:9px;-webkit-transition:height .5s;-moz-transition:height .5s;-ms-transition:height .5s;-o-transition:height .5s}.fr-toolbar.fr-toolbar-open .fr-newline{height:0}.fr-toolbar .fr-float-right{float:right}.fr-toolbar .fr-float-left{float:left}.fr-toolbar .fr-more-toolbar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;box-sizing:border-box;float:left;height:0;overflow:hidden;-webkit-transition:height .5s;-moz-transition:height .5s;-ms-transition:height .5s;-o-transition:height .5s;width:100%}.fr-toolbar .fr-more-toolbar.fr-expanded{height:48px}.fr-toolbar .fr-more-toolbar.fr-overflow-visible{overflow:visible}.fr-toolbar .fr-more-toolbar>.fr-command.fr-btn{margin-left:4px;margin-right:4px}.fr-toolbar .fr-btn-grp{display:inline-block;margin:0 17px 0 12px}@media (max-width:768px){.fr-toolbar .fr-btn-grp{margin:0 7px 0 6px}}.fr-toolbar .fr-command.fr-btn.fr-open{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;margin-bottom:-1px;margin-top:10px}.fr-toolbar .fr-command.fr-btn.fr-open:not(:hover):not(:focus):not(:active){background:#f5f5f5}.fr-toolbar.fr-rtl{text-align:right}.fr-toolbar.fr-inline{border:0;box-shadow:0 3px 5px -1px rgba(0,0,0,.2),0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12);display:none;margin-top:5px;position:absolute;white-space:nowrap;z-index:2147483630}.fr-toolbar.fr-inline.fr-above{border-top:0;margin-top:-10px}.fr-toolbar.fr-inline .fr-newline{height:0}.fr-toolbar.fr-inline .fr-more-toolbar{position:absolute!important}.fr-toolbar.fr-inline .fr-more-toolbar.fr-expanded{position:relative!important}.fr-toolbar.fr-top{border-bottom:0;border-radius:10px 10px 0 0;-moz-border-radius:10px 10px 0 0;-webkit-border-radius:10px 10px 0 0;top:0}.fr-toolbar.fr-bottom,.fr-toolbar.fr-top{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.fr-toolbar.fr-bottom{border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;-webkit-border-radius:0 0 10px 10px;border-top:0;bottom:0;padding-bottom:0}.fr-toolbar.fr-bottom .fr-newline{padding-top:0;-webkit-transition:padding-top .5s;-moz-transition:padding-top .5s;-ms-transition:padding-top .5s;-o-transition:padding-top .5s}.fr-toolbar.fr-bottom.fr-toolbar-open .fr-newline{background:#fff;padding-top:48px}.fr-toolbar.fr-bottom .fr-command.fr-btn.fr-open{border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;-webkit-border-radius:0 0 4px 4px;margin-bottom:10px;margin-top:-1px}.fr-toolbar.fr-bottom .fr-command.fr-btn.fr-open,.fr-toolbar.fr-sticky-on{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.fr-toolbar.fr-sticky-on{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.fr-separator{background:#ebebeb;display:block;float:left;vertical-align:top}.fr-separator+.fr-separator{display:none}.fr-separator.fr-vs{height:32px;margin:8px 4px;width:1px}.fr-separator.fr-hs{clear:both;height:1px;margin:0 4px;width:calc(100% - 8px)}.fr-separator.fr-hidden{display:none!important}.fr-rtl .fr-separator{float:right}.fr-toolbar.fr-inline .fr-separator.fr-hs{float:none}.fr-toolbar.fr-inline .fr-separator.fr-vs{display:inline-block;float:none}.fr-second-toolbar{background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border-radius:0 0 10px 10px;-moz-border-radius:0 0 10px 10px;-webkit-border-radius:0 0 10px 10px;border-top:0;line-height:1.4}.fr-second-toolbar:after{clear:both;content:"";display:block;height:0}.fr-second-toolbar:empty{margin-top:-1px;min-height:10px;position:relative;z-index:2}#fr-logo{float:left;outline:none}#fr-logo>span{color:#b1b2b7;display:inline-block;float:left;font-family:sans-serif;font-size:12px;font-weight:500;padding:11px 5px 10px 15px;-webkit-transition:color .3s;-moz-transition:color .3s;-ms-transition:color .3s;-o-transition:color .3s}#fr-logo>svg{cursor:pointer;height:20px;margin:7px 0;width:47px}#fr-logo>svg *{-webkit-transition:fill .3s;-moz-transition:fill .3s;-ms-transition:fill .3s;-o-transition:fill .3s}#fr-logo:focus>span,#fr-logo:hover>span{color:#0098f7}#fr-logo:focus>svg .fr-logo,#fr-logo:hover>svg .fr-logo{fill:#0098f7}.fr-visibility-helper{display:none;margin-left:0!important}@media (min-width:768px){.fr-visibility-helper{margin-left:1px!important}}@media (min-width:992px){.fr-visibility-helper{margin-left:2px!important}}@media (min-width:1200px){.fr-visibility-helper{margin-left:3px!important}}.fr-opacity-0{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:0;-moz-opacity:0;opacity:0}.fr-box{position:relative}.fr-sticky{position:-moz-sticky;position:-ms-sticky;position:-o-sticky;position:sticky}.fr-sticky-off{position:relative}.fr-sticky-on{position:fixed;z-index:10}.fr-sticky-on.fr-sticky-ios{left:0;position:absolute;right:0;width:auto!important}.fr-sticky-dummy{display:none}.fr-sticky-box>.fr-sticky-dummy,.fr-sticky-on+.fr-sticky-dummy{display:block}span.fr-sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fr-highlight-change>.fr-embedly>.embedly-card>.embedly-card-hug>iframe,.fr-highlight-change>.fr-video>embed,.fr-highlight-change>.fr-video>iframe,.fr-highlight-change>.fr-video>video,.fr-highlight-change>img,.fr-highlight-change>p,.fr-view .fr-highlight-change,.fr-view .fr-highlight-change>span:not(.fr-tracking-deleted){background-color:#f3eec3;opacity:.5}.fr-highlight-change.fr-highlight-change>hr,.fr-highlight-change.fr-highlight-change>table td{border-color:#f3eec3}.fr-tracking-deleted.fr-tracking-deleted>hr,.fr-tracking-deleted.fr-tracking-deleted>table td{border-color:#dc3545}.fr-tracking-deleted img,.fr-tracking-deleted>.fr-embedly>.embedly-card>.embedly-card-hug>iframe,.fr-tracking-deleted>.fr-video>iframe,.fr-tracking-deleted>.fr-video>video{background-color:#dc3545;opacity:.5}.fr-view .fr-tracking-deleted{background-color:#dc3545;opacity:1;pointer-events:none;-webkit-text-decoration:line-through;text-decoration:line-through;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fr-highlight-change>.fr-embedly>.embedly-card>.embedly-card-hug>iframe,.fr-highlight-change>.fr-video>embed,.fr-highlight-change>.fr-video>iframe,.fr-highlight-change>.fr-video>video,.fr-tracking-deleted>.fr-embedly>.embedly-card>.embedly-card-hug>iframe,.fr-tracking-deleted>.fr-video>iframe,.fr-tracking-deleted>.fr-video>video{padding:10px!important}.fr-highlight-change img,.fr-tracking-deleted img{border:2px solid #f3eec3}.fr-highlight-change #isPasted :not(table):not(tbody):not(tr):not(td){background-color:#f3eec3;opacity:.5}.fr-highlight-change #isPasted>table td{border-color:#f3eec3;opacity:.5}.fr-track-hide{display:none}.fr-track-hide-mobile{height:0;overflow:hidden;position:absolute;width:0}.fr-ios-mobile-disable-select{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fr-bottom-extended{box-sizing:border-box;display:flex;flex-wrap:wrap}.position-relative{position:relative!important}.fr-box .fr-counter{border-radius:2px 0 0 0;-moz-border-radius:2px 0 0 0;-webkit-border-radius:2px 0 0 0;color:#999;content:attr(data-chars);float:right;font-family:sans-serif;font-size:14px;padding:10px;z-index:1}.fr-box .fr-counter,.fr-box.fr-rtl .fr-counter{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.fr-box.fr-rtl .fr-counter{border-left:none;border-radius:0 2px 0 0;-moz-border-radius:0 2px 0 0;-webkit-border-radius:0 2px 0 0;left:0;right:auto}.fr-box.fr-code-view .fr-counter{display:none}textarea.fr-code{background:#fff;border:none;box-sizing:border-box;color:#000;display:none;font-family:"Courier New",monospace;font-size:14px;margin:0;outline:none;padding:10px;resize:none;-moz-resize:none;-webkit-resize:none;width:100%}.fr-box.fr-rtl textarea.fr-code{direction:rtl}.fr-box .CodeMirror{display:none}.fr-box.fr-code-view textarea.fr-code{display:block}.fr-box.fr-code-view .fr-element,.fr-box.fr-code-view .fr-iframe,.fr-box.fr-code-view .fr-placeholder{display:none}.fr-box.fr-code-view .CodeMirror,.fr-box.fr-inline.fr-code-view .fr-command.fr-btn.html-switch{display:block}.fr-box.fr-inline .fr-command.fr-btn.html-switch{background:#fff;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:0;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;box-sizing:border-box;color:#333;cursor:pointer;display:none;line-height:1;-moz-outline:0;outline:0;padding:8px 7px;position:absolute;right:0;text-align:left;-webkit-text-decoration:none;text-decoration:none;top:0;-webkit-transition:background .2s ease 0s;-moz-transition:background .2s ease 0s;-ms-transition:background .2s ease 0s;-o-transition:background .2s ease 0s;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none;z-index:2}.fr-box.fr-inline .fr-command.fr-btn.html-switch i{font-size:24px;text-align:center;width:24px}.fr-box.fr-inline .fr-command.fr-btn.html-switch.fr-desktop:hover{background:#ebebeb}.fr-popup .fr-layer.fr-color-hex-layer{float:left;margin:0;padding:0 20px 20px}.fr-popup .fr-layer.fr-color-hex-layer .fr-input-line{float:left;padding:15px 0 0;width:calc(100% - 50px)}.fr-popup .fr-layer.fr-color-hex-layer .fr-action-buttons{float:right;height:40px;margin:0;padding:17px 0 0;width:38px}.fr-popup .fr-layer.fr-color-hex-layer .fr-action-buttons button.fr-command{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;font-size:13px;height:40px;width:38px}.fr-popup .fr-separator+.fr-colors-tabs{margin-left:2px;margin-right:2px}.fr-popup .fr-color-set{display:none;line-height:0}.fr-popup .fr-color-set.fr-selected-set{display:block;padding:20px 20px 0}.fr-popup .fr-color-set>span{display:inline-block;height:32px;position:relative;width:32px;z-index:1}.fr-popup .fr-color-set>span>i,.fr-popup .fr-color-set>span>svg{bottom:0;cursor:default;font-size:13px;height:24px;left:0;line-height:32px;margin:4px;position:absolute;text-align:center;width:24px}.fr-popup .fr-color-set>span>i path,.fr-popup .fr-color-set>span>svg path{fill:#222}.fr-popup .fr-color-set>span .fr-selected-color{bottom:0;color:#fff;cursor:default;font-family:FontAwesome;font-size:13px;font-weight:400;left:0;line-height:32px;position:absolute;right:0;text-align:center;top:0}.fr-popup .fr-color-set>span:focus,.fr-popup .fr-color-set>span:hover{outline:1px solid #222;z-index:2}.fr-rtl .fr-popup .fr-colors-tabs .fr-colors-tab.fr-selected-tab[data-param1=text]~[data-param1=background]:after{-webkit-transform:translate3d(100%,0,0);-moz-transform:translate3d(100%,0,0);-ms-transform:translate3d(100%,0,0);-o-transform:translate3d(100%,0,0)}.fr-drag-helper{background:#0098f7;display:none;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:2px;margin-top:-1px;-webkit-opacity:.2;-moz-opacity:.2;opacity:.2;position:absolute;z-index:2147483640}.fr-drag-helper.fr-visible{display:block}.fr-dragging{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.4;-moz-opacity:.4;opacity:.4}.fr-popup .fr-emoticon{font-family:"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;height:24px;width:24px}.fr-popup .fr-emoticon img{height:24px;width:24px}.fr-popup .fr-command.fr-btn.fr-tabs-unicode{padding:0 0 0 14px}@media (-ms-high-contrast:none) and (min-width:768px),screen and (-ms-high-contrast:active) and (min-width:768px){.fr-popup .fr-icon-container.fr-emoticon-container{width:368px}}.fr-popup .fr-file-upload-layer{border:2px dashed #bdbdbd;box-sizing:border-box;font-size:14px;letter-spacing:1px;line-height:140%;margin:20px;padding:25px 0;position:relative;text-align:center}.fr-popup .fr-file-upload-layer:hover{background:#ebebeb}.fr-popup .fr-file-upload-layer.fr-drop{background:#ebebeb;border-color:#0098f7}.fr-popup .fr-file-upload-layer .fr-form{bottom:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;margin:0!important;-webkit-opacity:0;-moz-opacity:0;opacity:0;overflow:hidden;padding:0!important;position:absolute;right:0;top:0;width:100%!important;z-index:2147483640}.fr-popup .fr-file-upload-layer .fr-form input{bottom:0;cursor:pointer;font-size:400px;height:100%;margin:0;position:absolute;right:0;top:0;width:500%}.fr-popup .fr-file-progress-bar-layer{box-sizing:border-box}.fr-popup .fr-file-progress-bar-layer>h3{font-size:16px;font-weight:400;margin:10px 0}.fr-popup .fr-file-progress-bar-layer>div.fr-action-buttons{display:none}.fr-popup .fr-file-progress-bar-layer>div.fr-loader{background:#b3e0fd;height:10px;margin-top:20px;overflow:hidden;position:relative;width:100%}.fr-popup .fr-file-progress-bar-layer>div.fr-loader span{background:#0098f7;display:block;height:100%;-webkit-transition:width .2s ease 0s;-moz-transition:width .2s ease 0s;-ms-transition:width .2s ease 0s;-o-transition:width .2s ease 0s;width:0}.fr-popup .fr-file-progress-bar-layer>div.fr-loader.fr-indeterminate span{width:30%!important}.fr-popup .fr-file-progress-bar-layer>div.fr-loader.fr-indeterminate span{animation:loading 2s linear infinite;position:absolute;top:0}.fr-popup .fr-file-progress-bar-layer.fr-error>div.fr-loader{display:none}.fr-popup .fr-file-progress-bar-layer.fr-error>div.fr-action-buttons{display:block}.fr-height-auto{height:auto!important}.fr-by-url-padding{padding:11.5px 0}.fr-popup .fr-upload-progress-layer{border-radius:0;box-sizing:border-box;margin:auto!important;max-height:100%;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;padding-left:20px;padding-top:15px;width:100%!important}.fr-popup .fr-files-by-url-layer,.fr-popup .fr-files-embed-layer,.fr-popup .fr-files-upload-layer{width:calc(100% - 40px)!important}.fr-popup .fr-files-upload-layer{border:2px dashed #bdbdbd;font-size:10px;letter-spacing:1px;line-height:140%;margin:20px;position:relative;text-align:center}.fr-popup .fr-files-upload-layer:hover{background:#ebebeb}.fr-popup .fr-files-upload-layer.fr-drop{background:#ebebeb;border-color:#0098f7}.fr-popup .fr-files-upload-layer .fr-form{bottom:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;margin:0!important;-webkit-opacity:0;-moz-opacity:0;opacity:0;overflow:hidden;padding:0!important;position:absolute;right:0;top:0;width:100%!important;z-index:2147483640}.fr-popup .fr-files-upload-layer .fr-form input{bottom:0;cursor:pointer;font-size:400px;height:100%;margin:0;position:absolute;right:0;top:0;width:500%}.fr-popup .fr-files-progress-bar-layer{width:calc(100% - 40px);width:-moz-available;width:-webkit-stretch;width:-webkit-fill-available;width:stretch}.fr-popup .fr-files-progress-bar-layer>h3{font-size:16px;font-weight:400;margin:10px 0}.fr-popup .fr-files-progress-bar-layer>div.fr-action-buttons{display:none}.fr-popup .fr-files-progress-bar-layer>div.fr-loader{background:#b3e0fd;height:10px;margin-top:20px;overflow:hidden;position:relative;width:100%}.fr-popup .fr-files-progress-bar-layer>div.fr-loader span{background:#0098f7;display:block;height:100%;-webkit-transition:width .2s ease 0s;-moz-transition:width .2s ease 0s;-ms-transition:width .2s ease 0s;-o-transition:width .2s ease 0s;width:0}.fr-popup .fr-files-progress-bar-layer>div.fr-loader.fr-indeterminate span{width:30%!important}.fr-popup .fr-files-progress-bar-layer>div.fr-loader.fr-indeterminate span{animation:loading 2s linear infinite;position:absolute;top:0}.fr-popup .fr-files-progress-bar-layer.fr-error>div.fr-loader{display:none}.fr-popup .fr-files-progress-bar-layer.fr-error>div.fr-action-buttons{display:block}.fr-progress-bar-style{width:calc(100% - 40px)}.fr-progress-bar{background-color:#4caf50;height:8px;margin-bottom:8px;margin-left:20px;margin-right:20px;position:relative;width:100%;width:-moz-available;width:-webkit-stretch;width:-webkit-fill-available;width:stretch}.fr-pull-left{float:left}.fr-pull-right{float:right}.fr-icons{display:inline;padding:10px 20px 0}.fr-transform-135{transform:rotate(135deg)}.fr-icons i{color:#999588;cursor:pointer;font-size:20px;margin:4px;padding:2px}.fr-blue-decorator{background:#4a7fba;color:#fff;display:grid;padding:5px}.fr-upload-progress{padding:1px}.fr-upload-section{position:relative;width:100%;width:-moz-available;width:-webkit-stretch;width:-webkit-fill-available;width:stretch}@media screen and (max-width:399px){.fr-upload-section{margin-left:7px;margin-right:7px}.fr-files-upload-layer{padding-bottom:7px;padding-top:7px}}@media screen and (min-width:400px) and (max-width:469px){.fr-upload-section{margin-left:7px;margin-right:7px}.fr-files-upload-layer{padding-bottom:7px;padding-top:7px}}@media screen and (min-width:470px) and (max-width:680px){.fr-upload-section{margin-left:7px;margin-right:7px}.fr-files-upload-layer{padding-bottom:7px;padding-top:7px}}@media screen and (min-width:681px){.fr-upload-section{margin-left:35px;margin-right:35px}.fr-files-upload-layer{padding-bottom:20px;padding-top:20px}}.half-circle{background-color:#fff;border-bottom:0;border-top-left-radius:110px;border-top-right-radius:110px;height:25px;left:50%;margin-left:-25px;margin-top:-1px;position:relative;transform:rotate(180deg);width:60px;z-index:1}.decorated{overflow:hidden;text-align:center}.decorated>span{display:inline-block;position:relative}.decorated>span:after,.decorated>span:before{border-bottom:2px solid #fff;content:"";margin:0 20px;position:absolute;top:50%;width:100%}.decorated>span:before{right:100%}.decorated>span:after{left:100%}.fr-align-right{float:right}.checkbox-container{cursor:pointer;display:inline-block;font-size:13px;margin-bottom:12px;padding-left:20px;position:relative;-webkit-user-select:none;-moz-user-select:none;user-select:none}.fr-files-checkbox-line{align-items:center;display:flex;font-size:10px}.fr-files-checkbox-line label{cursor:pointer;vertical-align:middle}.fr-autoplay-checkbox input,.fr-insert-checkbox input{height:13px!important;width:13px!important}button[data-cmd=insertFiles]{padding-left:2px!important;padding-top:2.7px!important}button[data-cmd=autoplay] svg{position:relative!important;top:3.2px!important}button[data-cmd=insertAll]{padding-left:4px!important}button[data-cmd=insertAll] svg{position:relative!important;top:3.2px!important}.checkbox-container input{cursor:pointer;height:0;opacity:0;position:absolute;width:0}.checkmark{background-color:#eee;height:15px;left:0;position:absolute;top:0;width:15px}.fr-file-list-item{align-items:center;border-bottom:1px solid #ddd;justify-content:space-between;padding-bottom:7px;padding-top:7px;position:relative;top:-20px}.fr-file-item-left,.fr-file-list-item{display:flex;flex-wrap:wrap}.fr-file-item-icon{align-items:center;display:flex;padding-left:7px}.fr-file-item-description{display:flex;flex-direction:column;flex-wrap:wrap;justify-content:center;margin-left:5px;max-width:400px}.fr-cloud-icon{background-color:#fff;border-radius:50%;display:flex;height:30px;justify-content:center;margin:-18px auto 0;position:relative;width:32px}.fr-files-checkbox{border-radius:100%;box-sizing:content-box;display:inline-block;height:13px;line-height:1;padding-right:5px;position:relative;vertical-align:middle;width:13px}.fr-files-checkbox svg{display:none;height:10px;margin-left:0;margin-top:0;width:10px}.fr-files-checkbox span{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;display:inline-block;height:15px;position:relative;-webkit-transition:background .2s ease 0s,border-color .2s ease 0s;-moz-transition:background .2s ease 0s,border-color .2s ease 0s;-ms-transition:background .2s ease 0s,border-color .2s ease 0s;-o-transition:background .2s ease 0s,border-color .2s ease 0s;width:15px;z-index:1}.fr-files-checkbox input{border:0;cursor:pointer;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:18px;margin:0;-webkit-opacity:0;-moz-opacity:0;opacity:0;padding:0;position:absolute;width:18px;z-index:2}.fr-files-checkbox input:not(:checked)+span{border:2px solid #999}.fr-files-checkbox input:not(:checked):active+span{background-color:#f5f5f5}.fr-files-checkbox input:not(:checked):focus+span,.fr-files-checkbox input:not(:checked):hover+span{border-color:#515151}.fr-files-checkbox input:checked+span{background:#0098f7;border:2px solid #0098f7}.fr-files-checkbox input:checked+span svg{display:block}.fr-files-checkbox input:checked:active+span{background-color:#ecf5ff}.fr-files-checkbox input:checked:focus+span,.fr-files-checkbox input:checked:hover+span{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.8;-moz-opacity:.8;opacity:.8}.fr-checkbox-disabled{border-radius:100%;box-sizing:content-box;display:inline-block;height:13px!important;line-height:1;opacity:.4;padding-right:5px;position:relative;vertical-align:middle;width:13px!important}.fr-checkbox-disabled svg{display:none;height:10px;margin-left:2px;margin-top:2px;width:10px}.fr-checkbox-disabled span{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;display:inline-block;height:15px;position:relative;-webkit-transition:background .2s ease 0s,border-color .2s ease 0s;-moz-transition:background .2s ease 0s,border-color .2s ease 0s;-ms-transition:background .2s ease 0s,border-color .2s ease 0s;-o-transition:background .2s ease 0s,border-color .2s ease 0s;width:15px;z-index:1}.fr-checkbox-disabled input{border:0;cursor:default;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";height:13px!important;left:7px;margin:0;-webkit-opacity:0;-moz-opacity:0;opacity:0;padding:0;position:absolute;top:7px;width:13px!important;z-index:2}.fr-checkbox-disabled input:not(:checked)+span{border:2px solid #999}.fr-checkbox-disabled input:not(:checked):active+span{background-color:#f5f5f5}.fr-checkbox-disabled input:checked+span{background:#0098f7;border:2px solid #0098f7}.fr-checkbox-disabled input:checked+span svg{display:block}.fr-checkbox-disabled input:checked:active+span{background-color:#ecf5ff}.fr-file-view{max-width:60%;position:absolute;right:10%;z-index:2147483642}.file-item-thumbnail-hover{transition:transform .2s}.file-item-thumbnail-hover:hover{transform:scale(1.3)}.fr-file-name{font-size:12px;font-weight:700;padding-top:5px}.fr-margin-16{margin-bottom:16px}.fr-none{display:none}.fr-display-block{display:block}.fr-files-manager-tooltip{position:relative}.padding-top-15{padding-bottom:0!important;padding-top:15px!important}.fr-files-manager-tooltip .tooltiptext{word-wrap:break-word;background-color:#000;border-radius:2px;color:#fff;font-size:10px;font-weight:100;left:50%;max-width:250px;padding:4px;position:absolute;text-align:left;top:80%;visibility:hidden;width:-moz-max-content;width:max-content;word-break:break-word;z-index:2147483647}.fr-files-manager-tooltip:hover .tooltiptext{visibility:visible}.fr-file-details{display:flex;flex-wrap:wrap;font-size:10px}.fr-file-date{word-wrap:break-word;max-width:110px;word-break:break-word}.fr-file-date,.fr-file-size{color:#444;padding-bottom:2px;padding-top:2px}.dot{background-image:radial-gradient(circle,grey 1px,transparent 2px);background-size:100% 33.33%;height:20px;margin-left:2px;margin-right:2px;width:20px}.fr-file-action-icons{color:#999;height:25px!important;margin-left:5px!important;margin-right:5px;padding:5px!important}@media screen and (max-width:700px){.fr-files-manager-tooltip .tooltiptext{word-wrap:break-word;font-size:8px;left:0;max-width:250px;top:90%;visibility:hidden;word-break:break-word}}@media screen and (max-width:500px){.fr-files-manager-tooltip .tooltiptext{word-wrap:break-word;left:0;max-width:100px;top:90%;visibility:hidden;word-break:break-word}.fr-file-item-description{width:130px}.fr-file-item-right{width:100%}.progress-circle{font-size:6px}}@media screen and (max-width:320px){.fr-files-manager-tooltip .tooltiptext{word-wrap:break-word;font-size:8px;left:-50%;max-width:100px;top:90%;visibility:hidden;word-break:break-word}.dot{margin-left:0;margin-right:3px;width:20px}.fr-file-item-description{width:80px}.fr-file-details{display:flex;flex-wrap:wrap;font-size:9px}.fr-file-name{font-size:10px}.fr-file-action-icons{padding:0!important}}@media screen and (min-width:501px){.progress-circle{font-size:9px}}.fr-file-view-modal{background-color:#000;background-color:rgba(0,0,0,.7);display:block;height:100%;left:0;overflow:auto;position:fixed;position:-ms-page;top:0;width:100%;z-index:2147483641}.fr-file-view-modal-content{display:inline-block;text-align:center}.fr-file-view-image{bottom:0;left:0;margin:auto;max-height:70%;max-width:80%;position:absolute;right:0;top:0}.fr-file-view-close{color:#f1f1f1;font-size:40px;font-weight:700;position:absolute;right:35px;top:15px;transition:.3s}.fr-file-view-close:focus,.fr-file-view-close:hover{color:#bbb;cursor:pointer;-webkit-text-decoration:none;text-decoration:none}.fr-file-error{color:red;font-size:12px;font-weight:200;padding-bottom:5px}.fr-file-error-h5{margin:0}.fr-file-item-right{align-items:center;display:flex;justify-content:flex-end;margin-right:20px}.fr-file-item-action-buttons{align-items:center;display:flex;justify-content:space-around}.fr-file-item-autoplay-checkbox{align-items:center;margin:0 5px 0 0;padding:0}.fr-autoplay-checkbox-label{cursor:default!important;margin:0}.checkbox-container:hover input~.checkmark{background-color:#ccc}.checkbox-container input:checked~.checkmark{background-color:#2196f3}.checkmark:after{content:"";display:none;position:absolute}.checkbox-container input:checked~.checkmark:after{display:block}.checkbox-container .checkmark:after{border:solid #fff;border-width:0 3px 3px 0;height:7px;left:5px;top:2px;transform:rotate(45deg);width:3px}.file-item-details .file-name{display:inline;font-weight:700}.file-item-details .file-description{display:inline;font-size:11px;font-weight:300}.fr-width-10{display:inline-block;width:10%}.fr-width-20{display:inline-block;width:20%}.fr-width-30{display:inline-block;width:30%}.fr-width-40{display:inline-block;width:40%}.fr-width-50{display:inline-block;width:50%}.fr-width-60{display:inline-block;width:60%}.fr-width-100{display:inline-block;width:100%}.fr-width-80{display:inline-block;width:80%}.fr-width-90{display:inline-block;width:90%}.fr-width-85{display:inline-block;width:85%}.fr-width-5{display:inline-block;width:5%}.fr-width-7{display:inline-block;width:7%}.fr-img-icon{color:#aaa;font-size:16px;padding:0 4px}.fr-position-content{position:relative;top:10px}.file-error{color:red}#myprogressBar{background-color:#4caf50;height:5px;position:relative;top:-30px;width:10%}.fr-files-manager{z-index:2147483641!important}.progress-circle{background-color:#f2e9e1;border-radius:50%;height:5.1em;line-height:5em;margin:0 0 0 10px;padding:0;position:relative;width:5em}.progress-circle:after{background-color:#fff;border:none;border-radius:50%;content:" ";display:block;height:4.3em;left:.35em;position:absolute;text-align:center;top:.35em;width:4.3em}.progress-circle span{color:#53777a;display:block;line-height:5em;position:absolute;text-align:center;width:5em;z-index:2}.progress-circle.over50 .left-half-clipper{clip:rect(auto,auto,auto,auto)}.progress-circle.over50 .first50-bar{clip:rect(0,5em,5em,2.5em);background-color:#53777a;border-radius:50%;height:5em;position:absolute;width:5em}.progress-circle:not(.over50) .first50-bar{display:none}.progress-circle.p0 .value-bar{display:none}.progress-circle.p1 .value-bar{transform:rotate(4deg)}.progress-circle.p2 .value-bar{transform:rotate(7deg)}.progress-circle.p3 .value-bar{transform:rotate(11deg)}.progress-circle.p4 .value-bar{transform:rotate(14deg)}.progress-circle.p5 .value-bar{transform:rotate(18deg)}.progress-circle.p6 .value-bar{transform:rotate(22deg)}.progress-circle.p7 .value-bar{transform:rotate(25deg)}.progress-circle.p8 .value-bar{transform:rotate(29deg)}.progress-circle.p9 .value-bar{transform:rotate(32deg)}.progress-circle.p10 .value-bar{transform:rotate(36deg)}.progress-circle.p11 .value-bar{transform:rotate(40deg)}.progress-circle.p12 .value-bar{transform:rotate(43deg)}.progress-circle.p13 .value-bar{transform:rotate(47deg)}.progress-circle.p14 .value-bar{transform:rotate(50deg)}.progress-circle.p15 .value-bar{transform:rotate(54deg)}.progress-circle.p16 .value-bar{transform:rotate(58deg)}.progress-circle.p17 .value-bar{transform:rotate(61deg)}.progress-circle.p18 .value-bar{transform:rotate(65deg)}.progress-circle.p19 .value-bar{transform:rotate(68deg)}.progress-circle.p20 .value-bar{transform:rotate(72deg)}.progress-circle.p21 .value-bar{transform:rotate(76deg)}.progress-circle.p22 .value-bar{transform:rotate(79deg)}.progress-circle.p23 .value-bar{transform:rotate(83deg)}.progress-circle.p24 .value-bar{transform:rotate(86deg)}.progress-circle.p25 .value-bar{transform:rotate(90deg)}.progress-circle.p26 .value-bar{transform:rotate(94deg)}.progress-circle.p27 .value-bar{transform:rotate(97deg)}.progress-circle.p28 .value-bar{transform:rotate(101deg)}.progress-circle.p29 .value-bar{transform:rotate(104deg)}.progress-circle.p30 .value-bar{transform:rotate(108deg)}.progress-circle.p31 .value-bar{transform:rotate(112deg)}.progress-circle.p32 .value-bar{transform:rotate(115deg)}.progress-circle.p33 .value-bar{transform:rotate(119deg)}.progress-circle.p34 .value-bar{transform:rotate(122deg)}.progress-circle.p35 .value-bar{transform:rotate(126deg)}.progress-circle.p36 .value-bar{transform:rotate(130deg)}.progress-circle.p37 .value-bar{transform:rotate(133deg)}.progress-circle.p38 .value-bar{transform:rotate(137deg)}.progress-circle.p39 .value-bar{transform:rotate(140deg)}.progress-circle.p40 .value-bar{transform:rotate(144deg)}.progress-circle.p41 .value-bar{transform:rotate(148deg)}.progress-circle.p42 .value-bar{transform:rotate(151deg)}.progress-circle.p43 .value-bar{transform:rotate(155deg)}.progress-circle.p44 .value-bar{transform:rotate(158deg)}.progress-circle.p45 .value-bar{transform:rotate(162deg)}.progress-circle.p46 .value-bar{transform:rotate(166deg)}.progress-circle.p47 .value-bar{transform:rotate(169deg)}.progress-circle.p48 .value-bar{transform:rotate(173deg)}.progress-circle.p49 .value-bar{transform:rotate(176deg)}.progress-circle.p50 .value-bar{transform:rotate(180deg)}.progress-circle.p51 .value-bar{transform:rotate(184deg)}.progress-circle.p52 .value-bar{transform:rotate(187deg)}.progress-circle.p53 .value-bar{transform:rotate(191deg)}.progress-circle.p54 .value-bar{transform:rotate(194deg)}.progress-circle.p55 .value-bar{transform:rotate(198deg)}.progress-circle.p56 .value-bar{transform:rotate(202deg)}.progress-circle.p57 .value-bar{transform:rotate(205deg)}.progress-circle.p58 .value-bar{transform:rotate(209deg)}.progress-circle.p59 .value-bar{transform:rotate(212deg)}.progress-circle.p60 .value-bar{transform:rotate(216deg)}.progress-circle.p61 .value-bar{transform:rotate(220deg)}.progress-circle.p62 .value-bar{transform:rotate(223deg)}.progress-circle.p63 .value-bar{transform:rotate(227deg)}.progress-circle.p64 .value-bar{transform:rotate(230deg)}.progress-circle.p65 .value-bar{transform:rotate(234deg)}.progress-circle.p66 .value-bar{transform:rotate(238deg)}.progress-circle.p67 .value-bar{transform:rotate(241deg)}.progress-circle.p68 .value-bar{transform:rotate(245deg)}.progress-circle.p69 .value-bar{transform:rotate(248deg)}.progress-circle.p70 .value-bar{transform:rotate(252deg)}.progress-circle.p71 .value-bar{transform:rotate(256deg)}.progress-circle.p72 .value-bar{transform:rotate(259deg)}.progress-circle.p73 .value-bar{transform:rotate(263deg)}.progress-circle.p74 .value-bar{transform:rotate(266deg)}.progress-circle.p75 .value-bar{transform:rotate(270deg)}.progress-circle.p76 .value-bar{transform:rotate(274deg)}.progress-circle.p77 .value-bar{transform:rotate(277deg)}.progress-circle.p78 .value-bar{transform:rotate(281deg)}.progress-circle.p79 .value-bar{transform:rotate(284deg)}.progress-circle.p80 .value-bar{transform:rotate(288deg)}.progress-circle.p81 .value-bar{transform:rotate(292deg)}.progress-circle.p82 .value-bar{transform:rotate(295deg)}.progress-circle.p83 .value-bar{transform:rotate(299deg)}.progress-circle.p84 .value-bar{transform:rotate(302deg)}.progress-circle.p85 .value-bar{transform:rotate(306deg)}.progress-circle.p86 .value-bar{transform:rotate(310deg)}.progress-circle.p87 .value-bar{transform:rotate(313deg)}.progress-circle.p88 .value-bar{transform:rotate(317deg)}.progress-circle.p89 .value-bar{transform:rotate(320deg)}.progress-circle.p90 .value-bar{transform:rotate(324deg)}.progress-circle.p91 .value-bar{transform:rotate(328deg)}.progress-circle.p92 .value-bar{transform:rotate(331deg)}.progress-circle.p93 .value-bar{transform:rotate(335deg)}.progress-circle.p94 .value-bar{transform:rotate(338deg)}.progress-circle.p95 .value-bar{transform:rotate(342deg)}.progress-circle.p96 .value-bar{transform:rotate(346deg)}.progress-circle.p97 .value-bar{transform:rotate(349deg)}.progress-circle.p98 .value-bar{transform:rotate(353deg)}.progress-circle.p99 .value-bar{transform:rotate(356deg)}.progress-circle.p100 .value-bar{transform:rotate(1turn)}.left-half-clipper{clip:rect(0,5em,5em,2.5em)}.left-half-clipper,.value-bar{border-radius:50%;height:5em;position:absolute;width:5em}.value-bar{clip:rect(0,2.5em,5em,0);border:.45em solid #53777a;box-sizing:border-box}.align-autoplay{align-items:flex-end;margin-right:7px}.fr-hovered-over-file{background-color:#f0f0f0}.thumbnail-padding{padding-right:4px}body.fr-fullscreen{height:100%;overflow:hidden;position:fixed;width:100%}.fr-box.fr-fullscreen{bottom:0;left:0;margin:0!important;position:fixed;right:0;top:0;width:auto!important;z-index:2147483630!important}.fr-box.fr-fullscreen .fr-wrapper{background-color:#fff}.fr-box.fr-fullscreen .fr-toolbar,.fr-box.fr-fullscreen.fr-basic.fr-bottom .fr-wrapper,.fr-box.fr-fullscreen.fr-basic.fr-top .fr-wrapper{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0}.fr-box.fr-fullscreen .fr-toolbar.fr-top{top:0!important}.fr-box.fr-fullscreen .fr-toolbar.fr-bottom{bottom:0!important}.fr-box.fr-fullscreen .fr-second-toolbar{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;margin-top:0}.fr-fullscreen-wrapper{margin:0!important;overflow:visible!important;padding:0!important;width:100%!important;z-index:2147483640!important}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal{padding:20px 20px 10px;text-align:left}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table{border-collapse:collapse;font-size:14px;line-height:1.5;width:100%}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table+table{margin-top:20px}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table tr{border:0}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table th{text-align:left}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table td,.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table th{padding:6px 0 4px}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table tbody tr{border-bottom:1px solid #ebebeb}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table tbody td:first-child{color:#646464;width:60%}.fr-modal .fr-modal-wrapper .fr-modal-body .fr-help-modal table tbody td:nth-child(n+2){letter-spacing:.5px}.fr-element img{cursor:pointer;padding:0 1px}.fr-image-resizer{border:1px solid #0098f7;box-sizing:content-box;display:none;position:absolute;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-image-resizer.fr-active{display:block}.fr-image-resizer .fr-handler{background:#0098f7;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #fff;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;box-sizing:border-box;display:block;position:absolute;z-index:4}.fr-image-resizer .fr-handler.fr-hnw{cursor:nw-resize}.fr-image-resizer .fr-handler.fr-hne{cursor:ne-resize}.fr-image-resizer .fr-handler.fr-hsw{cursor:sw-resize}.fr-image-resizer .fr-handler.fr-hse{cursor:se-resize}.fr-image-resizer .fr-handler{height:12px;width:12px}.fr-image-resizer .fr-handler.fr-hnw{left:-6px;top:-6px}.fr-image-resizer .fr-handler.fr-hne{right:-6px;top:-6px}.fr-image-resizer .fr-handler.fr-hsw{bottom:-6px;left:-6px}.fr-image-resizer .fr-handler.fr-hse{bottom:-6px;right:-6px}@media (min-width:1200px){.fr-image-resizer .fr-handler{height:10px;width:10px}.fr-image-resizer .fr-handler.fr-hnw{left:-5px;top:-5px}.fr-image-resizer .fr-handler.fr-hne{right:-5px;top:-5px}.fr-image-resizer .fr-handler.fr-hsw{bottom:-5px;left:-5px}.fr-image-resizer .fr-handler.fr-hse{bottom:-5px;right:-5px}}.fr-image-overlay{bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:2147483640}.fr-popup .fr-image-upload-layer{border:2px dashed #bdbdbd;font-size:14px;letter-spacing:1px;line-height:140%;margin:20px;padding:25px 0;position:relative;text-align:center}.fr-popup .fr-image-upload-layer:hover{background:#ebebeb}.fr-popup .fr-image-upload-layer.fr-drop{background:#ebebeb;border-color:#0098f7}.fr-popup .fr-image-upload-layer .fr-form{bottom:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;margin:0!important;-webkit-opacity:0;-moz-opacity:0;opacity:0;overflow:hidden;padding:0!important;position:absolute;right:0;top:0;width:100%!important;z-index:2147483640}.fr-popup .fr-image-upload-layer .fr-form input{bottom:0;cursor:pointer;font-size:400px;height:100%;margin:0;position:absolute;right:0;top:0;width:500%}.fr-popup .fr-image-progress-bar-layer>h3{font-size:16px;font-weight:400;margin:10px 0}.fr-popup .fr-image-progress-bar-layer>div.fr-action-buttons{display:none}.fr-popup .fr-image-progress-bar-layer>div.fr-loader{background:#b3e0fd;height:10px;margin-top:20px;overflow:hidden;position:relative;width:100%}.fr-popup .fr-image-progress-bar-layer>div.fr-loader span{background:#0098f7;display:block;height:100%;-webkit-transition:width .2s ease 0s;-moz-transition:width .2s ease 0s;-ms-transition:width .2s ease 0s;-o-transition:width .2s ease 0s;width:0}.fr-popup .fr-image-progress-bar-layer>div.fr-loader.fr-indeterminate span{width:30%!important}.fr-popup .fr-image-progress-bar-layer>div.fr-loader.fr-indeterminate span{animation:loading 2s linear infinite;position:absolute;top:0}.fr-popup .fr-image-progress-bar-layer.fr-error>div.fr-loader{display:none}.fr-popup .fr-image-progress-bar-layer.fr-error>div.fr-action-buttons{display:block}.fr-image-size-layer .fr-image-group .fr-input-line{display:inline-block;width:calc(50% - 5px)}.fr-image-size-layer .fr-image-group .fr-input-line+.fr-input-line{margin-left:10px}.fr-uploading{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.4;-moz-opacity:.4;opacity:.4}@keyframes loading{0%{left:-25%}to{left:100%}}img.fr-draggable{-webkit-user-select:none;-moz-user-select:none;user-select:none}.fr-modal .fr-modal-head .fr-modal-head-line:after{clear:both;content:"";display:block;height:0}.fr-modal .fr-modal-head .fr-modal-head-line .fr-modal-more{margin-top:10px}.fr-modal .fr-modal-head .fr-modal-head-line .fr-modal-more.fr-not-available{opacity:0;padding:12px 0;width:0}.fr-modal .fr-modal-head .fr-modal-tags{display:none;padding:0 20px;text-align:left}.fr-modal .fr-modal-head .fr-modal-tags a{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background-color:#f5f5f5;border-radius:32px;-moz-border-radius:32px;-webkit-border-radius:32px;cursor:pointer;display:inline-block;margin:8px 0 8px 8px;opacity:0;padding:6px 12px;-webkit-text-decoration:none;text-decoration:none;-webkit-transition:opacity .2s ease 0s,background .2s ease 0s;-moz-transition:opacity .2s ease 0s,background .2s ease 0s;-ms-transition:opacity .2s ease 0s,background .2s ease 0s;-o-transition:opacity .2s ease 0s,background .2s ease 0s}.fr-modal .fr-modal-head .fr-modal-tags a:focus{background-color:#ebebeb;outline:none}.fr-modal .fr-modal-head .fr-modal-tags a:hover{background-color:#ebebeb}.fr-modal .fr-modal-head .fr-modal-tags a:active{background-color:#d6d6d6}.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag{background-color:#ecf5ff;color:#0098f7}.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:focus{background-color:#ebebeb;outline:none}.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:hover{background-color:#ebebeb}.fr-modal .fr-modal-head .fr-modal-tags a.fr-selected-tag:active{background-color:#d6d6d6}.fr-show-tags .fr-modal-more svg path{fill:#0098f7}div.fr-modal-body{-webkit-transition:background .2s ease 0s;-moz-transition:background .2s ease 0s;-ms-transition:background .2s ease 0s;-o-transition:background .2s ease 0s}div.fr-modal-body .fr-preloader{display:block;margin:50px auto}div.fr-modal-body div.fr-image-list{margin:0 20px;padding:0;text-align:center}div.fr-modal-body div.fr-image-list .fr-list-column{float:left;width:calc(50% - 10px)}@media (min-width:768px) and (max-width:1199px){div.fr-modal-body div.fr-image-list .fr-list-column{width:calc(33.33333% - 13.33333px)}}@media (min-width:1200px){div.fr-modal-body div.fr-image-list .fr-list-column{width:calc(25% - 15px)}}div.fr-modal-body div.fr-image-list .fr-list-column+.fr-list-column{margin-left:20px}div.fr-modal-body div.fr-image-list div.fr-image-container{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;display:block;overflow:hidden;position:relative;width:100%}div.fr-modal-body div.fr-image-list div.fr-image-container:first-child{margin-top:20px}div.fr-modal-body div.fr-image-list div.fr-image-container+div{margin-top:20px}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-image-deleting:after{background:#000;bottom:0;content:"";-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;-webkit-opacity:.5;-moz-opacity:.5;opacity:.5;position:absolute;right:0;top:0;-webkit-transition:opacity .2s ease 0s;-moz-transition:opacity .2s ease 0s;-ms-transition:opacity .2s ease 0s;-o-transition:opacity .2s ease 0s;z-index:2}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-image-deleting:before{bottom:0;color:#fff;content:attr(data-deleting);font-size:15px;height:20px;left:0;margin:auto;position:absolute;right:0;top:0;z-index:3}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-empty{background:#ccc;height:95px;z-index:1}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-empty:after{bottom:0;content:attr(data-loading);display:inline-block;height:20px;left:0;margin:auto;position:absolute;right:0;top:0}div.fr-modal-body div.fr-image-list div.fr-image-container img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:1;-moz-opacity:1;opacity:1;position:relative;-webkit-transform:translateZ(0);-moz-transform:translateZ(0);-ms-transform:translateZ(0);-o-transform:translateZ(0);-webkit-transition:opacity .2s ease 0s,filter .2s ease 0s;-moz-transition:opacity .2s ease 0s,filter .2s ease 0s;-ms-transition:opacity .2s ease 0s,filter .2s ease 0s;-o-transition:opacity .2s ease 0s,filter .2s ease 0s;vertical-align:middle;width:100%;z-index:2}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-mobile-selected img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.75;-moz-opacity:.75;opacity:.75}div.fr-modal-body div.fr-image-list div.fr-image-container.fr-mobile-selected .fr-delete-img,div.fr-modal-body div.fr-image-list div.fr-image-container.fr-mobile-selected .fr-insert-img{display:inline-block}div.fr-modal-body div.fr-image-list div.fr-image-container .fr-delete-img,div.fr-modal-body div.fr-image-list div.fr-image-container .fr-insert-img{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:100%;-moz-border-radius:100%;-webkit-border-radius:100%;box-sizing:border-box;cursor:pointer;display:none;line-height:40px;margin:0;position:absolute;-webkit-text-decoration:none;text-decoration:none;top:50%;-webkit-transition:background .2s ease 0s,color .2s ease 0s;-moz-transition:background .2s ease 0s,color .2s ease 0s;-ms-transition:background .2s ease 0s,color .2s ease 0s;-o-transition:background .2s ease 0s,color .2s ease 0s;z-index:3}div.fr-modal-body div.fr-image-list div.fr-image-container .fr-delete-img{fill:#fff;background:#b8312f;left:50%;padding:8px;-webkit-transform:translateY(-50%) translateX(25%);-moz-transform:translateY(-50%) translateX(25%);-ms-transform:translateY(-50%) translateX(25%);-o-transform:translateY(-50%) translateX(25%)}div.fr-modal-body div.fr-image-list div.fr-image-container .fr-insert-img{fill:#0098f7;background:#fff;left:50%;padding:8px;-webkit-transform:translateY(-50%) translateX(-125%);-moz-transform:translateY(-50%) translateX(-125%);-ms-transform:translateY(-50%) translateX(-125%);-o-transform:translateY(-50%) translateX(-125%)}.fr-desktop .fr-modal-wrapper div.fr-modal-body div.fr-image-list div.fr-image-container:hover img{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:.75;-moz-opacity:.75;opacity:.75}.fr-desktop .fr-modal-wrapper div.fr-modal-body div.fr-image-list div.fr-image-container:hover .fr-delete-img,.fr-desktop .fr-modal-wrapper div.fr-modal-body div.fr-image-list div.fr-image-container:hover .fr-insert-img{display:inline-block;height:40px;width:40px}.fr-desktop .fr-modal-wrapper div.fr-modal-body div.fr-image-list div.fr-image-container .fr-delete-img:hover{background:#bf4644;color:#fff}.fr-desktop .fr-modal-wrapper div.fr-modal-body div.fr-image-list div.fr-image-container .fr-insert-img:hover{background:#ebebeb}.fr-line-breaker{border-top:1px solid #0098f7;cursor:text;display:none;position:fixed;z-index:2}.fr-line-breaker.fr-visible{display:block}.fr-line-breaker a.fr-floating-btn{left:calc(50% - 20px);position:absolute;top:-20px}.fr-line-breaker a.fr-floating-btn svg{height:24px;margin:8px;width:24px}.fr-wrapper-markdown{display:flex}.fr-markdown-view{box-sizing:inherit;width:calc(52% - 1px)}.fr-markdown-editor{background-color:#eee;box-sizing:inherit;width:calc(48% - 1px)}.fr-markdown-editor>p{margin:0}.fr-markdown-view>p{margin-top:0}.gutter-horizontal{background-color:#dadada;cursor:col-resize;display:flex;width:2px;z-index:9}.e-resize-handler{align-items:center;align-self:center;color:#c5c5c5;display:flex;font-size:10px;justify-content:center;position:relative;width:1px;z-index:9}.fr-markdown-view>dl{margin-bottom:1rem;margin-top:0}.fr-markdown-view>dt{font-weight:700}.fr-markdown-view>dd{margin-bottom:.5rem;margin-left:0}.fr-markdown-view>pre{word-wrap:break-word;background-color:#f8f8f8;border:1px solid #dfdfdf;margin-bottom:1.5em;margin-top:1.5em;padding:.125rem .3125rem .0625rem;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap}.fr-markdown-view>code{background-color:#f8f8f8;border:1px solid #dfdfdf;color:#333;font-family:Consolas,"Liberation Mono",Courier,monospace;font-weight:400;padding:.125rem .3125rem .0625rem}.fr-markdown-view>pre code{background-color:transparent;border:0;padding:0}.fr-markdown-view>sup{top:-.5em}.footnote-a{background-color:transparent;color:#007bff;-webkit-text-decoration:none;text-decoration:none}.fr-markdown-view>hr{border:0;border-top:1px solid rgba(0,0,0,.1);margin-bottom:1rem;margin-top:1rem}.blockquote{border-left:5px solid #eee;font-size:1.25rem;margin:0 0 1rem;padding:10px 20px}.fr-markdown-view>table{background-color:transparent;border-collapse:collapse;border-spacing:0;margin-bottom:20px;max-width:100%;width:100%}.fr-markdown-view>table>tbody>tr>td,.fr-markdown-view>table>tbody>tr>th,.fr-markdown-view>table>thead>tr>td,.fr-markdown-view>table>thead>tr>th{border:1px solid #ddd;line-height:1.42857143;padding:8px;vertical-align:top}.fr-markdown-view>table>thead>tr>td,.fr-markdown-view>table>thead>tr>th{border-bottom-width:2px}.fr-markdown-view>table>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.fr-markdown-view>a{color:#337ab7;-webkit-text-decoration:none;text-decoration:none}.fr-markdown-view>h1{font-size:2em!important}.fr-markdown-view>h2{font-size:1.5em!important}.fr-quick-insert{box-sizing:content-box;padding-right:10px;position:absolute;white-space:nowrap;z-index:2147483639}.fr-quick-insert a.fr-floating-btn svg{height:24px;margin:8px;width:24px}.fr-quick-insert.fr-on a.fr-floating-btn svg{-webkit-transform:rotate(135deg);-moz-transform:rotate(135deg);-ms-transform:rotate(135deg);-o-transform:rotate(135deg)}.fr-quick-insert.fr-hidden{display:none}.fr-qi-helper{padding-left:20px;position:absolute;white-space:nowrap;z-index:3}.fr-qi-helper a.fr-btn.fr-floating-btn{background:#fff;color:#222;display:inline-block;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:0;-moz-opacity:0;opacity:0;padding:6px 10px 10px;text-align:center;-webkit-transform:scale(0);-moz-transform:scale(0);-ms-transform:scale(0);-o-transform:scale(0)}.fr-qi-helper a.fr-btn.fr-floating-btn svg{fill:#222}.fr-qi-helper a.fr-btn.fr-floating-btn.fr-size-1{-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:1;-moz-opacity:1;opacity:1;-webkit-transform:scale(1);-moz-transform:scale(1);-ms-transform:scale(1);-o-transform:scale(1)}.fr-popup .fr-buttons.fr-tabs .fr-special-character-category{padding:10px 15px}.fr-popup .fr-buttons.fr-tabs .fr-special-character-category span{font-size:16px;font-weight:400}.fr-popup .fr-special-character{height:24px;width:24px}@media (-ms-high-contrast:none) and (min-width:768px),screen and (-ms-high-contrast:active) and (min-width:768px){.fr-popup .fr-icon-container.fr-sc-container{width:368px}}.fr-element table td.fr-selected-cell,.fr-element table th.fr-selected-cell{border:1px double #0098f7}.fr-element table tr{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-element table td,.fr-element table th{user-select:text;-o-user-select:text;-moz-user-select:text;-khtml-user-select:text;-webkit-user-select:text;-ms-user-select:text}.fr-element .fr-no-selection table td,.fr-element .fr-no-selection table th{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-table-resizer{cursor:col-resize;display:none;position:absolute;z-index:3}.fr-table-resizer.fr-moving{z-index:2}.fr-table-resizer div{border-right:1px solid #0098f7;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";-webkit-opacity:0;-moz-opacity:0;opacity:0}.fr-no-selection{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-popup .fr-table-size{margin:20px}.fr-popup .fr-table-size .fr-table-size-info{font-size:14px;text-align:center}.fr-popup .fr-table-size .fr-select-table-size{line-height:0;padding:5px;white-space:nowrap}.fr-popup .fr-table-size .fr-select-table-size>span{background:transparent;display:inline-block;padding:0 4px 4px 0}.fr-popup .fr-table-size .fr-select-table-size>span>span{border:1px solid #ddd;display:inline-block;height:18px;width:18px}.fr-popup .fr-table-size .fr-select-table-size>span.hover{background:transparent}.fr-popup .fr-table-size .fr-select-table-size>span.hover>span{background:rgba(0,152,247,.3);border:1px solid #0098f7}.fr-popup .fr-table-size .fr-select-table-size .new-line:after{clear:both;content:"";display:block;height:0}.fr-popup.fr-above .fr-table-size .fr-select-table-size>span{display:inline-block!important}.fr-popup .fr-table-colors{display:block;padding:20px 20px 0}.fr-popup.fr-desktop .fr-table-size .fr-select-table-size>span>span{height:12px;width:12px}.fr-insert-helper{position:absolute;white-space:nowrap;z-index:9999}#fr-form-container{background-color:#f5f5f5;background-color:#fefefe;border-radius:5px;margin:auto;overflow:auto;position:relative;top:10%;width:60%;z-index:9002}.fr-trim-video-name{font-family:Arial,Helvetica,sans-serif;padding-top:15px}.fr-file-loader{align-items:center;animation:spin 2s linear infinite;border:4px solid #f3f3f3;border-radius:50%;border-top-color:#53777a;display:inline-block!important;display:block!important;height:20px;width:20px}.fr-trim-button{background:none;background-color:#eff5fa;border:none;border-radius:5px;color:#0098f7;cursor:pointer;font-size:16px;height:36px;line-height:1;margin-top:5px;outline:none;padding:10px;-webkit-text-decoration:none;text-decoration:none}.fr-trim-button:hover{background:#ebebeb}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.fr-slidecontainer{width:100%}.fr-slider{-webkit-appearance:none;background:#d3d3d3;height:15px;width:100%}.fr-video-trim-buttons{margin-top:10px;padding-bottom:5px;padding-right:15px;text-align:right}.fr-slider::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;border-radius:50%;cursor:pointer;height:15px;width:15px}.fr-slider::-moz-range-thumb{background:#3498db;border-radius:50%;cursor:pointer;height:15px;width:15px}.fr-range-value-start{position:absolute}.fr-range-value-start>span{background:#03a9f4;border-radius:6px;color:#fff;display:block;font-size:12px;height:24px;left:50%;line-height:24px;position:absolute;text-align:center;transform:translate(-85%);width:60px}.fr-range-value-start>span:before{border-left:5px solid transparent;border-right:5px solid transparent;content:"";height:0;left:86%;margin-left:-5px;margin-top:-1px;position:absolute;width:0}.fr-range-value-end{position:absolute}.fr-range-value-end>span{background:#03a9f4;border-radius:6px;color:#fff;display:block;font-size:12px;height:24px;left:14%;line-height:24px;position:absolute;text-align:center;transform:translate(-8%);width:60px}.fr-range-value-end>span:before{border-left:5px solid transparent;border-right:5px solid transparent;content:"";height:0;left:14%;margin-left:-5px;margin-top:-1px;position:absolute;width:0}#startTimeValue{top:-153%!important}#startTimeValue span:before{border-top:10px solid #03a9f4;top:100%}#endTimeValue{top:-153%!important}#endTimeValue span:before{border-top:10px solid #03a9f4;top:100%}.fr-range-slider{height:15px;position:relative;width:80%}.fr-range-slider>input{border-radius:10px;height:6px;left:0;outline:none;pointer-events:none;position:absolute;top:10px;width:100%}.fr-range-slider>input::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;background:#3498db;border-radius:7px;cursor:pointer;height:15px;margin-top:-3.6px;pointer-events:all;position:relative;width:15px;z-index:1}.fr-range-slider>input::-moz-range-thumb{-moz-appearance:none;border-radius:7px;height:15px;margin-top:-3.6px;pointer-events:all;position:relative;width:9px;z-index:10}.fr-range-slider>input::-moz-range-track{background-color:#000;border:0;border-radius:50%;height:15px;margin-top:-3.6px;position:relative;z-index:-1}.fr-range-slider>input:last-of-type::-moz-range-track{-moz-appearance:none;background:none transparent;border:0}.fr-range-slider>input[type=range]::-moz-focus-outer{border:0}@media screen and (max-width:430px){.range-value span{font-size:10px;width:40px}#fr-form-container{top:20%}}#fr-video-edit{height:50%;margin-bottom:20px;padding-bottom:8px;padding-top:8px;text-align:center;width:80%}.fr-element .fr-video{user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-element .fr-video:after{background:transparent;bottom:0;content:"";cursor:pointer;display:block;left:0;position:absolute;right:0;top:0;z-index:1}.fr-element .fr-video.fr-active>*{position:relative;z-index:2}.fr-element .fr-video>*{border:none;box-sizing:content-box;max-width:100%}.fr-box .fr-video-resizer{border:1px solid #0098f7;display:none;position:absolute;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-box .fr-video-resizer.fr-active{display:block}.fr-box .fr-video-resizer .fr-handler{background:#0098f7;border:1px solid #fff;box-sizing:border-box;display:block;position:absolute;z-index:4}.fr-box .fr-video-resizer .fr-handler.fr-hnw{cursor:nw-resize}.fr-box .fr-video-resizer .fr-handler.fr-hne{cursor:ne-resize}.fr-box .fr-video-resizer .fr-handler.fr-hsw{cursor:sw-resize}.fr-box .fr-video-resizer .fr-handler.fr-hse{cursor:se-resize}.fr-box .fr-video-resizer .fr-handler{height:12px;width:12px}.fr-box .fr-video-resizer .fr-handler.fr-hnw{left:-6px;top:-6px}.fr-box .fr-video-resizer .fr-handler.fr-hne{right:-6px;top:-6px}.fr-box .fr-video-resizer .fr-handler.fr-hsw{bottom:-6px;left:-6px}.fr-box .fr-video-resizer .fr-handler.fr-hse{bottom:-6px;right:-6px}@media (min-width:1200px){.fr-box .fr-video-resizer .fr-handler{height:10px;width:10px}.fr-box .fr-video-resizer .fr-handler.fr-hnw{left:-5px;top:-5px}.fr-box .fr-video-resizer .fr-handler.fr-hne{right:-5px;top:-5px}.fr-box .fr-video-resizer .fr-handler.fr-hsw{bottom:-5px;left:-5px}.fr-box .fr-video-resizer .fr-handler.fr-hse{bottom:-5px;right:-5px}}.fr-popup .fr-video-size-layer .fr-video-group .fr-input-line{display:inline-block;width:calc(50% - 5px)}.fr-popup .fr-video-size-layer .fr-video-group .fr-input-line+.fr-input-line{margin-left:10px}.fr-popup .fr-video-upload-layer{border:2px dashed #bdbdbd;font-size:14px;letter-spacing:1px;line-height:140%;margin:20px;padding:25px 0;position:relative;text-align:center}.fr-popup .fr-video-upload-layer:hover{background:#ebebeb}.fr-popup .fr-video-upload-layer.fr-drop{background:#ebebeb;border-color:#0098f7}.fr-popup .fr-video-upload-layer .fr-form{bottom:0;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";left:0;margin:0!important;-webkit-opacity:0;-moz-opacity:0;opacity:0;overflow:hidden;padding:0!important;position:absolute;right:0;top:0;width:100%!important;z-index:2147483640}.fr-popup .fr-video-upload-layer .fr-form input{bottom:0;cursor:pointer;font-size:400px;height:100%;margin:0;position:absolute;right:0;top:0;width:500%}.fr-popup .fr-video-progress-bar-layer>h3{font-size:16px;font-weight:400;margin:10px 0}.fr-popup .fr-video-progress-bar-layer>div.fr-action-buttons{display:none}.fr-popup .fr-video-progress-bar-layer>div.fr-loader{background:#b3e0fd;height:10px;margin-top:20px;overflow:hidden;position:relative;width:100%}.fr-popup .fr-video-progress-bar-layer>div.fr-loader span{background:#0098f7;display:block;height:100%;-webkit-transition:width .2s ease 0s;-moz-transition:width .2s ease 0s;-ms-transition:width .2s ease 0s;-o-transition:width .2s ease 0s;width:0}.fr-popup .fr-video-progress-bar-layer>div.fr-loader.fr-indeterminate span{width:30%!important}.fr-popup .fr-video-progress-bar-layer>div.fr-loader.fr-indeterminate span{animation:loading 2s linear infinite;position:absolute;top:0}.fr-popup .fr-video-progress-bar-layer.fr-error>div.fr-loader{display:none}.fr-popup .fr-video-progress-bar-layer.fr-error>div.fr-action-buttons{display:block}.fr-video-overlay{bottom:0;display:none;left:0;position:fixed;right:0;top:0;z-index:2147483640}.fr-autoplay-margin{margin-top:0!important}.fr-clearfix:after{clear:both;content:"";display:block;height:0}.fr-hide-by-clipping{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fr-view .fr-img-caption.fr-rounded img,.fr-view img.fr-rounded{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.fr-view .fr-img-caption.fr-shadow img,.fr-view img.fr-shadow{box-shadow:10px 10px 5px 0 #ccc}.fr-view .fr-img-caption.fr-bordered img,.fr-view img.fr-bordered{border:5px solid #ccc}.fr-view img.fr-bordered{box-sizing:content-box}.fr-view .fr-img-caption.fr-bordered img{box-sizing:border-box}.fr-view{word-wrap:break-word}.fr-view span[style~="color:"] a{color:inherit}.fr-view strong{font-weight:700}.fr-view table[border="0"] td:not([class]),.fr-view table[border="0"] td[class=""],.fr-view table[border="0"] th:not([class]),.fr-view table[border="0"] th[class=""]{border-width:0}.fr-view table{border:none;border-collapse:collapse;empty-cells:show;max-width:100%}.fr-view table td{min-width:5px}.fr-view table.fr-dashed-borders td,.fr-view table.fr-dashed-borders th{border-style:dashed}.fr-view table.fr-alternate-rows tbody tr:nth-child(2n){background:#f5f5f5}.fr-view table td,.fr-view table th{border:1px solid #ddd}.fr-view table td:empty,.fr-view table th:empty{height:20px}.fr-view table td.fr-highlighted,.fr-view table th.fr-highlighted{border:1px double red}.fr-view table td.fr-thick,.fr-view table th.fr-thick{border-width:2px}.fr-view table th{background:#ececec}.fr-view hr{-moz-column-break-after:always;break-after:always;clear:both;page-break-after:always;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-view .fr-file{position:relative}.fr-view .fr-file:after{content:"\\1F4CE";font-weight:400;position:relative}.fr-view pre{word-wrap:break-word;overflow:visible;white-space:pre-wrap}.fr-view[dir=rtl] blockquote{border-left:none;border-right:2px solid #5e35b1;margin-right:0;padding-left:0;padding-right:5px}.fr-view[dir=rtl] blockquote blockquote{border-color:#00bcd4}.fr-view[dir=rtl] blockquote blockquote blockquote{border-color:#43a047}.fr-view blockquote{border-left:2px solid #5e35b1;color:#5e35b1;margin-left:0;padding-left:5px}.fr-view blockquote blockquote{border-color:#00bcd4;color:#00bcd4}.fr-view blockquote blockquote blockquote{border-color:#43a047;color:#43a047}.fr-view span.fr-emoticon{display:inline;font-family:"Apple Color Emoji","Segoe UI Emoji","NotoColorEmoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";font-weight:400;line-height:0}.fr-view span.fr-emoticon.fr-emoticon-img{background-repeat:no-repeat!important;display:inline-block;font-size:inherit;height:1em;line-height:1;margin:-.1em .1em .1em;min-height:20px;min-width:20px;vertical-align:middle;width:1em}.fr-view .fr-text-gray{color:#aaa!important}.fr-view .fr-text-bordered{border-bottom:1px solid #222;border-top:1px solid #222;padding:10px 0}.fr-view .fr-text-spaced{letter-spacing:1px}.fr-view .fr-text-uppercase{text-transform:uppercase}.fr-view .fr-class-highlighted{background-color:#ff0}.fr-view .fr-class-code{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#f5f5f5;border-color:#ccc;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;font-family:"Courier New",Courier,monospace;padding:10px}.fr-view .fr-class-transparency{opacity:.5}.fr-view img{max-width:100%;position:relative}.fr-view img.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}.fr-view img.fr-dib.fr-fil{margin-left:0;text-align:left}.fr-view img.fr-dib.fr-fir{margin-right:0;text-align:right}.fr-view img.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}.fr-view img.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}.fr-view img.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}.fr-view span.fr-img-caption{max-width:100%;position:relative}.fr-view span.fr-img-caption.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}.fr-view span.fr-img-caption.fr-dib.fr-fil{margin-left:0;text-align:left}.fr-view span.fr-img-caption.fr-dib.fr-fir{margin-right:0;text-align:right}.fr-view span.fr-img-caption.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}.fr-view span.fr-img-caption.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}.fr-view span.fr-img-caption.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}.fr-view .fr-video{position:relative;text-align:center}.fr-view .fr-video.fr-rv{height:0;overflow:hidden;padding-bottom:56.25%;padding-top:30px}.fr-view .fr-video.fr-rv embed,.fr-view .fr-video.fr-rv object,.fr-view .fr-video.fr-rv>iframe{position:absolute!important}.fr-view .fr-video.fr-rv embed,.fr-view .fr-video.fr-rv object,.fr-view .fr-video.fr-rv>iframe{height:100%;left:0;top:0;width:100%}.fr-view .fr-video>*{border:none;box-sizing:content-box;max-width:100%}.fr-view .fr-video.fr-dvb{clear:both;display:block}.fr-view .fr-video.fr-dvb.fr-fvl{text-align:left}.fr-view .fr-video.fr-dvb.fr-fvr{text-align:right}.fr-view .fr-video.fr-dvi{display:inline-block}.fr-view .fr-video.fr-dvi.fr-fvl{float:left}.fr-view .fr-video.fr-dvi.fr-fvr{float:right}.fr-view a.fr-strong{font-weight:700}.fr-view a.fr-green{color:green}.fr-view .fr-img-caption{text-align:center}.fr-view .fr-img-caption .fr-img-wrap{margin:auto;padding:0;text-align:center;width:100%}.fr-view .fr-img-caption .fr-img-wrap a{display:block}.fr-view .fr-img-caption .fr-img-wrap img{display:block;margin:auto;width:100%}.fr-view .fr-img-caption .fr-img-wrap>span{box-sizing:border-box;display:block;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";font-size:14px;font-weight:400;margin:auto;-webkit-opacity:.9;-moz-opacity:.9;opacity:.9;padding:5px 5px 10px;text-align:center;width:100%}.fr-view button.fr-rounded,.fr-view input.fr-rounded,.fr-view textarea.fr-rounded{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.fr-view button.fr-large,.fr-view input.fr-large,.fr-view textarea.fr-large{font-size:24px}a.fr-view.fr-strong{font-weight:700}a.fr-view.fr-green{color:green}img.fr-view{max-width:100%;position:relative}img.fr-view.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}img.fr-view.fr-dib.fr-fil{margin-left:0;text-align:left}img.fr-view.fr-dib.fr-fir{margin-right:0;text-align:right}img.fr-view.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}img.fr-view.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}img.fr-view.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}span.fr-img-caption.fr-view{max-width:100%;position:relative}span.fr-img-caption.fr-view.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}span.fr-img-caption.fr-view.fr-dib.fr-fil{margin-left:0;text-align:left}span.fr-img-caption.fr-view.fr-dib.fr-fir{margin-right:0;text-align:right}span.fr-img-caption.fr-view.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}span.fr-img-caption.fr-view.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}span.fr-img-caption.fr-view.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}',""]),r.locals={},e.exports=r},function(e,t,n){var content=n(740);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(36).default)("6f271ca8",content,!0,{sourceMap:!1})},function(e,t,n){var r=n(35)((function(i){return i[1]}));r.push([e.i,'/*!\n * froala_editor v4.0.10 (https://www.froala.com/wysiwyg-editor)\n * License https://froala.com/wysiwyg-editor/terms/\n * Copyright 2014-2022 Froala Labs\n */.fr-clearfix:after{clear:both;content:"";display:block;height:0}.fr-hide-by-clipping{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.fr-view .fr-img-caption.fr-rounded img,.fr-view img.fr-rounded{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.fr-view .fr-img-caption.fr-shadow img,.fr-view img.fr-shadow{box-shadow:10px 10px 5px 0 #ccc}.fr-view .fr-img-caption.fr-bordered img,.fr-view img.fr-bordered{border:5px solid #ccc}.fr-view img.fr-bordered{box-sizing:content-box}.fr-view .fr-img-caption.fr-bordered img{box-sizing:border-box}.fr-view{word-wrap:break-word}.fr-view span[style~="color:"] a{color:inherit}.fr-view strong{font-weight:700}.fr-view table[border="0"] td:not([class]),.fr-view table[border="0"] td[class=""],.fr-view table[border="0"] th:not([class]),.fr-view table[border="0"] th[class=""]{border-width:0}.fr-view table{border:none;border-collapse:collapse;empty-cells:show;max-width:100%}.fr-view table td{min-width:5px}.fr-view table.fr-dashed-borders td,.fr-view table.fr-dashed-borders th{border-style:dashed}.fr-view table.fr-alternate-rows tbody tr:nth-child(2n){background:#f5f5f5}.fr-view table td,.fr-view table th{border:1px solid #ddd}.fr-view table td:empty,.fr-view table th:empty{height:20px}.fr-view table td.fr-highlighted,.fr-view table th.fr-highlighted{border:1px double red}.fr-view table td.fr-thick,.fr-view table th.fr-thick{border-width:2px}.fr-view table th{background:#ececec}.fr-view hr{-moz-column-break-after:always;break-after:always;clear:both;page-break-after:always;user-select:none;-o-user-select:none;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;-ms-user-select:none}.fr-view .fr-file{position:relative}.fr-view .fr-file:after{content:"\\1F4CE";font-weight:400;position:relative}.fr-view pre{word-wrap:break-word;overflow:visible;white-space:pre-wrap}.fr-view[dir=rtl] blockquote{border-left:none;border-right:2px solid #5e35b1;margin-right:0;padding-left:0;padding-right:5px}.fr-view[dir=rtl] blockquote blockquote{border-color:#00bcd4}.fr-view[dir=rtl] blockquote blockquote blockquote{border-color:#43a047}.fr-view blockquote{border-left:2px solid #5e35b1;color:#5e35b1;margin-left:0;padding-left:5px}.fr-view blockquote blockquote{border-color:#00bcd4;color:#00bcd4}.fr-view blockquote blockquote blockquote{border-color:#43a047;color:#43a047}.fr-view span.fr-emoticon{display:inline;font-family:"Apple Color Emoji","Segoe UI Emoji","NotoColorEmoji","Segoe UI Symbol","Android Emoji","EmojiSymbols";font-weight:400;line-height:0}.fr-view span.fr-emoticon.fr-emoticon-img{background-repeat:no-repeat!important;display:inline-block;font-size:inherit;height:1em;line-height:1;margin:-.1em .1em .1em;min-height:20px;min-width:20px;vertical-align:middle;width:1em}.fr-view .fr-text-gray{color:#aaa!important}.fr-view .fr-text-bordered{border-bottom:1px solid #222;border-top:1px solid #222;padding:10px 0}.fr-view .fr-text-spaced{letter-spacing:1px}.fr-view .fr-text-uppercase{text-transform:uppercase}.fr-view .fr-class-highlighted{background-color:#ff0}.fr-view .fr-class-code{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;background:#f5f5f5;border-color:#ccc;border-radius:2px;-moz-border-radius:2px;-webkit-border-radius:2px;font-family:"Courier New",Courier,monospace;padding:10px}.fr-view .fr-class-transparency{opacity:.5}.fr-view img{max-width:100%;position:relative}.fr-view img.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}.fr-view img.fr-dib.fr-fil{margin-left:0;text-align:left}.fr-view img.fr-dib.fr-fir{margin-right:0;text-align:right}.fr-view img.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}.fr-view img.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}.fr-view img.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}.fr-view span.fr-img-caption{max-width:100%;position:relative}.fr-view span.fr-img-caption.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}.fr-view span.fr-img-caption.fr-dib.fr-fil{margin-left:0;text-align:left}.fr-view span.fr-img-caption.fr-dib.fr-fir{margin-right:0;text-align:right}.fr-view span.fr-img-caption.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}.fr-view span.fr-img-caption.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}.fr-view span.fr-img-caption.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}.fr-view .fr-video{position:relative;text-align:center}.fr-view .fr-video.fr-rv{height:0;overflow:hidden;padding-bottom:56.25%;padding-top:30px}.fr-view .fr-video.fr-rv embed,.fr-view .fr-video.fr-rv object,.fr-view .fr-video.fr-rv>iframe{position:absolute!important}.fr-view .fr-video.fr-rv embed,.fr-view .fr-video.fr-rv object,.fr-view .fr-video.fr-rv>iframe{height:100%;left:0;top:0;width:100%}.fr-view .fr-video>*{border:none;box-sizing:content-box;max-width:100%}.fr-view .fr-video.fr-dvb{clear:both;display:block}.fr-view .fr-video.fr-dvb.fr-fvl{text-align:left}.fr-view .fr-video.fr-dvb.fr-fvr{text-align:right}.fr-view .fr-video.fr-dvi{display:inline-block}.fr-view .fr-video.fr-dvi.fr-fvl{float:left}.fr-view .fr-video.fr-dvi.fr-fvr{float:right}.fr-view a.fr-strong{font-weight:700}.fr-view a.fr-green{color:green}.fr-view .fr-img-caption{text-align:center}.fr-view .fr-img-caption .fr-img-wrap{margin:auto;padding:0;text-align:center;width:100%}.fr-view .fr-img-caption .fr-img-wrap a{display:block}.fr-view .fr-img-caption .fr-img-wrap img{display:block;margin:auto;width:100%}.fr-view .fr-img-caption .fr-img-wrap>span{box-sizing:border-box;display:block;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";font-size:14px;font-weight:400;margin:auto;-webkit-opacity:.9;-moz-opacity:.9;opacity:.9;padding:5px 5px 10px;text-align:center;width:100%}.fr-view button.fr-rounded,.fr-view input.fr-rounded,.fr-view textarea.fr-rounded{-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box;border-radius:10px;-moz-border-radius:10px;-webkit-border-radius:10px}.fr-view button.fr-large,.fr-view input.fr-large,.fr-view textarea.fr-large{font-size:24px}a.fr-view.fr-strong{font-weight:700}a.fr-view.fr-green{color:green}img.fr-view{max-width:100%;position:relative}img.fr-view.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}img.fr-view.fr-dib.fr-fil{margin-left:0;text-align:left}img.fr-view.fr-dib.fr-fir{margin-right:0;text-align:right}img.fr-view.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}img.fr-view.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}img.fr-view.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}span.fr-img-caption.fr-view{max-width:100%;position:relative}span.fr-img-caption.fr-view.fr-dib{display:block;float:none;margin:5px auto;vertical-align:top}span.fr-img-caption.fr-view.fr-dib.fr-fil{margin-left:0;text-align:left}span.fr-img-caption.fr-view.fr-dib.fr-fir{margin-right:0;text-align:right}span.fr-img-caption.fr-view.fr-dii{display:inline-block;float:none;margin-left:5px;margin-right:5px;max-width:calc(100% - 10px);vertical-align:bottom}span.fr-img-caption.fr-view.fr-dii.fr-fil{float:left;margin:5px 5px 5px 0;max-width:calc(100% - 5px)}span.fr-img-caption.fr-view.fr-dii.fr-fir{float:right;margin:5px 0 5px 5px;max-width:calc(100% - 5px)}',""]),r.locals={},e.exports=r},,,,,function(e,t,n){"use strict";var r=n(746),o=n(753),c=n(760),l=n(763),d=n(768),h=n(296),f=n(450);h(t,"__esModule",{value:!0}),t.default=void 0;var m=f(n(771)),v=f(n(787)),_=f(n(788)),y=f(n(790));function E(object,e){var t=r(object);if(o){var n=o(object);e&&(n=n.filter((function(e){return c(object,e).enumerable}))),t.push.apply(t,n)}return t}function C(e){for(var i=1;i<arguments.length;i++){var source=null!=arguments[i]?arguments[i]:{};i%2?E(Object(source),!0).forEach((function(t){(0,v.default)(e,t,source[t])})):l?d(e,l(source)):E(Object(source)).forEach((function(t){h(e,t,c(source,t))}))}return e}t.default=function(e){var t={props:["tag","value","config","onManualControllerReady"],watch:{value:function(){this.model=this.value,this.updateValue()}},render:function(e){return e(this.currentTag,[this.$slots.default])},created:function(){this.currentTag=this.tag||this.currentTag,this.model=this.value},mounted:function(){-1!=this.SPECIAL_TAGS.indexOf(this.currentTag)&&(this.hasSpecialTag=!0),this.onManualControllerReady?this.generateManualController():this.createEditor()},beforeDestroy:function(){this.destroyEditor()},data:function(){return{initEvents:[],currentTag:"div",_editor:null,currentConfig:null,defaultConfig:{immediateVueModelUpdate:!1,vueIgnoreAttrs:null},editorInitialized:!1,SPECIAL_TAGS:["img","button","input","a"],INNER_HTML_ATTR:"innerHTML",hasSpecialTag:!1,model:null,oldModel:null}},methods:{updateValue:function(){(0,_.default)(this.oldModel)!=(0,_.default)(this.model)&&this.setContent()},createEditor:function(){this.editorInitialized||(this.currentConfig=this.clone(this.config||this.defaultConfig),this.currentConfig=C({},this.currentConfig),this.setContent(!0),this.registerEvents(),this.initListeners(),this._editor=new y.default(this.$el,this.currentConfig),this.editorInitialized=!0)},clone:function(e){var t,n=this;if(!e)return e;if([Number,String,Boolean].forEach((function(n){e instanceof n&&(t=n(e))})),void 0===t)if("[object Array]"===Object.prototype.toString.call(e))t=[],e.forEach((function(e,r,o){t[r]=n.clone(e)}));else if("object"==(0,m.default)(e))if(e.nodeType&&"function"==typeof e.cloneNode)t=e.cloneNode(!0);else if(e.prototype)t=e;else if(e instanceof Date)t=new Date(e);else for(var i in t={},e)t[i]=n.clone(e[i]);else t=e;return t},setContent:function(e){(this.editorInitialized||e)&&(this.model||""==this.model)&&(this.oldModel=this.model,this.hasSpecialTag?this.setSpecialTagContent():this.setNormalTagContent(e))},setNormalTagContent:function(e){var t=this;function n(){t._editor.html.set(t.model||""),t._editor.undo.saveStep(),t._editor.undo.reset()}e?this.registerEvent("initialized",(function(){n()})):n()},setSpecialTagContent:function(){var e=this.model;if(e){for(var t in e)e.hasOwnProperty(t)&&t!=this.INNER_HTML_ATTR&&this.$el.setAttribute(t,e[t]);e.hasOwnProperty(this.INNER_HTML_ATTR)&&(this.$el.innerHTML=e[this.INNER_HTML_ATTR])}},destroyEditor:function(){this._editor&&(this._editor.destroy(),this.editorInitialized=!1,this._editor=null)},getEditor:function(){return this._editor},generateManualController:function(){var e={initialize:this.createEditor,destroy:this.destroyEditor,getEditor:this.getEditor};this.onManualControllerReady(e)},updateModel:function(){var e="";if(this.hasSpecialTag){for(var t=this.$el[0].attributes,n={},i=0;i<t.length;i++){var r=t[i].name;this.currentConfig.vueIgnoreAttrs&&-1!=this.currentConfig.vueIgnoreAttrs.indexOf(r)||(n[r]=t[i].value)}this.$el[0].innerHTML&&(n[this.INNER_HTML_ATTR]=this.$el[0].innerHTML),e=n}else{var o=this._editor.html.get();"string"==typeof o&&(e=o)}this.oldModel=e,this.$emit("input",e)},initListeners:function(){var e=this;this.registerEvent("initialized",(function(){e._editor.events&&(e._editor.events.on("contentChanged",(function(){e.updateModel()})),e.currentConfig.immediateVueModelUpdate&&e._editor.events.on("keyup",(function(){e.updateModel()})))}))},registerEvent:function(e,t){e&&t&&("initialized"==e?this.initEvents.push(t):(this.currentConfig.events||(this.currentConfig.events={}),this.currentConfig.events[e]=t))},registerEvents:function(){this.registerInitialized();var e=this.currentConfig.events;if(e)for(var t in e)e.hasOwnProperty(t)&&"initialized"!=t&&this.registerEvent(t,e[t])},registerInitialized:function(){var e=this;this.currentConfig.events||(this.currentConfig.events={}),this.currentConfig.events.initialized&&this.registerEvent("initialized",this.currentConfig.events.initialized),this.currentConfig.events.initialized=function(){for(var i=0;i<e.initEvents.length;i++)e.initEvents[i].call(e._editor)}}}};e.component("Froala",t);var n={props:["tag","value"],watch:{value:function(e){this._element.innerHTML=e}},created:function(){this.currentTag=this.tag||this.currentTag},render:function(e){return e(this.currentTag,{class:"fr-view"})},mounted:function(){this._element=this.$el,this.value&&(this._element.innerHTML=this.value)},data:function(){return{currentTag:"div",_element:null}}};e.component("FroalaView",n)}},function(e,t,n){e.exports=n(747)},,,,,,,function(e,t,n){e.exports=n(754)},,,,,,,function(e,t,n){e.exports=n(761)},,,function(e,t,n){e.exports=n(764)},,,,,function(e,t,n){e.exports=n(769)},,,function(e,t,n){var r=n(772),o=n(777);function c(t){return e.exports=c="function"==typeof r&&"symbol"==typeof o?function(e){return typeof e}:function(e){return e&&"function"==typeof r&&e.constructor===r&&e!==r.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,c(t)}e.exports=c,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports=n(773)},,,,,function(e,t,n){e.exports=n(778)},,,,,,,,,,function(e,t,n){var r=n(296);e.exports=function(e,t,n){return t in e?r(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){e.exports=n(789)},,function(e,t,n){e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,n,r){if("string"!=typeof e)return new t.Bootstrap(e,n,r);var o=document.querySelectorAll(e);n&&n.iframe_document&&(o=n.iframe_document.querySelectorAll(e));for(var c=[],i=0;i<o.length;i++){var a=o[i]["data-froala.editor"];a?c.push(a):c.push(new t.Bootstrap(o[i],n,r))}return 1==c.length?c[0]:c}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var o=arguments[r];if(null!=o)for(var i in o)Object.prototype.hasOwnProperty.call(o,i)&&(n[i]=o[i])}return n},writable:!0,configurable:!0}),function(){var a=/^\s*:scope/gi,s=/,\s*:scope/gi,e=document.createElement("div");function t(t,n){var i=t[n];t[n]=function(t){var n,r=!1,o=!1;if(!t||Array.isArray(t)||!t.match(a)&&!t.match(s))return i.call(this,t);this.parentNode||(e.appendChild(this),o=!0);var c=this.parentNode;return this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),r=!0),n=i.call(c,t.replace(a,"#".concat(this.id)).replace(s,",#".concat(this.id))),r&&(this.id=""),o&&e.removeChild(this),n}}try{var n=e.querySelectorAll(":scope *");if(!n||Array.isArray(n))throw"error"}catch(e){t(Element.prototype,"querySelector"),t(Element.prototype,"querySelectorAll"),t(HTMLElement.prototype,"querySelector"),t(HTMLElement.prototype,"querySelectorAll")}}(),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){if("Element"in e){var t="classList",n="prototype",r=e.Element[n],o=Object,i=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},a=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function(e,t){this.name=e,this.code=DOMException[e],this.message=t},c=function(e,t){if(""===t)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return a.call(e,t)},l=function(e){for(var t=i.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,o=n.length;r<o;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},d=l[n]=[],h=function(){return new l(this)};if(s[n]=Error[n],d.item=function(e){return this[e]||null},d.contains=function(e){return~c(this,e+"")},d.add=function(){for(var e,t=arguments,n=0,r=t.length,o=!1;e=t[n]+"",~c(this,e)||(this.push(e),o=!0),++n<r;);o&&this._updateClassName()},d.remove=function(){var e,t,n=arguments,r=0,o=n.length,i=!1;do{for(e=n[r]+"",t=c(this,e);~t;)this.splice(t,1),i=!0,t=c(this,e)}while(++r<o);i&&this._updateClassName()},d.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&"remove":!1!==t&&"add";return r&&this[r](e),!0===t||!1===t?t:!n},d.replace=function(e,t){var n=c(e+"");~n&&(this.splice(n,1,t),this._updateClassName())},d.toString=function(){return this.join(" ")},o.defineProperty){var p={get:h,enumerable:!0,configurable:!0};try{o.defineProperty(r,t,p)}catch(e){void 0!==e.number&&-2146823252!==e.number||(p.enumerable=!1,o.defineProperty(r,t,p))}}else o[n].__defineGetter__&&r.__defineGetter__(t,h)}}(self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function(e){var t=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var n,r=arguments.length;for(n=0;n<r;n++)e=arguments[n],t.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(" "),r=n.indexOf(e+"");~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}()),t.RegisterPlugins=function(e){for(var n=0;n<e.length;n++)e[n].call(t)},Object.assign(t,{DEFAULTS:{initOnClick:!1,pluginsEnabled:null},MODULES:{},PLUGINS:{},VERSION:"4.0.10",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),t.MODULES.node=function(a){var e=a.$;function s(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]}function n(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&0<=t.BLOCK_TAGS.indexOf(e.tagName.toLowerCase())}function r(e){var t={},n=e.attributes;if(n)for(var r=0;r<n.length;r++){var o=n[r];t[o.nodeName]=o.value}return t}function o(e){for(var t="",n=r(e),o=Object.keys(n).sort(),c=0;c<o.length;c++){var i=o[c],a=n[i];a.indexOf("'")<0&&0<=a.indexOf('"')?t+=" ".concat(i,"='").concat(a,"'"):(0<=a.indexOf('"')&&0<=a.indexOf("'")&&(a=a.replace(/"/g,"&quot;")),t+=" ".concat(i,'="').concat(a,'"'))}return t}function c(e){return e===a.el}return{isBlock:n,isEmpty:function(e,r){if(!e)return!0;if(e.querySelector("table"))return!1;var o=s(e);1===o.length&&n(o[0])&&(o=s(o[0]));for(var c=!1,l=0;l<o.length;l++){var i=o[l];if(!(r&&a.node.hasClass(i,"fr-marker")||i.nodeType===Node.TEXT_NODE&&0===i.textContent.length)){if("BR"!==i.tagName&&0<(i.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(c)return!1;"BR"===i.tagName&&(c=!0)}}return!(e.querySelectorAll(t.VOID_ELEMENTS.join(",")).length-e.querySelectorAll("br").length||e.querySelector("".concat(a.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<e.querySelectorAll(t.BLOCK_TAGS.join(",")).length||e.querySelector("".concat(a.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)")))},blockParent:function(e){for(;e&&e.parentNode!==a.el&&(!e.parentNode||!a.node.hasClass(e.parentNode,"fr-inner"));)if(n(e=e.parentNode))return e;return null},deepestParent:function(e,r,o){if(void 0===r&&(r=[]),void 0===o&&(o=!0),r.push(a.el),0<=r.indexOf(e.parentNode)||e.parentNode&&a.node.hasClass(e.parentNode,"fr-inner")||e.parentNode&&0<=t.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)&&o)return null;for(;r.indexOf(e.parentNode)<0&&e.parentNode&&!a.node.hasClass(e.parentNode,"fr-inner")&&(t.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)<0||!o)&&(!n(e)||n(e.parentNode))&&(!n(e)||!n(e.parentNode)||!o);)e=e.parentNode;return e},rawAttributes:r,attributes:o,clearAttributes:function(e){for(var t=e.attributes,n=t.length-1;0<=n;n--){var r=t[n];e.removeAttribute(r.nodeName)}},openTagString:function(e){return"<".concat(e.tagName.toLowerCase()).concat(o(e),">")},closeTagString:function(e){return"</".concat(e.tagName.toLowerCase(),">")},isFirstSibling:function u(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&a.node.hasClass(n,"fr-marker");)n=n.previousSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&u(n)},isLastSibling:function g(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&a.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&g(n)},isList:function(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:c,contents:s,isVoid:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=t.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function(e){return e===a.doc.activeElement&&(!a.doc.hasFocus||a.doc.hasFocus())&&Boolean(c(e)||e.type||e.href||~e.tabIndex)},isEditable:function(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function(t,n){return t instanceof e&&(t=t.get(0)),t&&t.classList&&t.classList.contains(n)},filter:function(e){return a.browser.msie?e:{acceptNode:e}}}},Object.assign(t.DEFAULTS,{DOMPurify:window.DOMPurify,htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"],htmlRemoveTags:["script","style"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap"],htmlAllowedStyleProps:[".*"],htmlAllowComments:!0,htmlUntouched:!1,fullPage:!1}),t.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},t.MODULES.clean=function(e){var n,p,r,u,g=e.$;function o(t){if(t.nodeType===Node.ELEMENT_NODE&&t.getAttribute("class")&&0<=t.getAttribute("class").indexOf("fr-marker"))return!1;var n,r=e.node.contents(t),c=[];for(n=0;n<r.length;n++)r[n].nodeType!==Node.ELEMENT_NODE||e.node.isVoid(r[n])?r[n].nodeType===Node.TEXT_NODE&&(r[n].textContent=r[n].textContent.replace(/\u200b/g,"")):r[n].textContent.replace(/\u200b/g,"").length!==r[n].textContent.length&&o(r[n]);if(t.nodeType===Node.ELEMENT_NODE&&!e.node.isVoid(t)&&(t.normalize(),r=e.node.contents(t),c=t.querySelectorAll(".fr-marker"),r.length-c.length==0)){for(n=0;n<r.length;n++)if(r[n].nodeType===Node.ELEMENT_NODE&&(r[n].getAttribute("class")||"").indexOf("fr-marker")<0)return!1;for(n=0;n<c.length;n++)t.parentNode.insertBefore(c[n].cloneNode(!0),t);return t.parentNode.removeChild(t),!1}}function s(t,n){if(t.nodeType===Node.COMMENT_NODE)return"\x3c!--".concat(t.nodeValue,"--\x3e");if(t.nodeType===Node.TEXT_NODE)return n?t.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t.textContent.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\u00A0/g,"&nbsp;").replace(/\u0009/g,"");if(t.nodeType!==Node.ELEMENT_NODE)return t.outerHTML;if(t.nodeType===Node.ELEMENT_NODE&&0<=["STYLE","SCRIPT","NOSCRIPT"].indexOf(t.tagName))return t.outerHTML;if(t.nodeType===Node.ELEMENT_NODE&&"svg"===t.tagName){var r=document.createElement("div"),o=t.cloneNode(!0);return r.appendChild(o),r.innerHTML}if("IFRAME"===t.tagName)return t.outerHTML.replace(/&lt;/g,"<").replace(/&gt;/g,">");var c=t.childNodes;if(0===c.length)return t.outerHTML;for(var i="",a=0;a<c.length;a++)"PRE"===t.tagName&&(n=!0),i+=s(c[a],n);return e.node.openTagString(t)+i+e.node.closeTagString(t)}var c=[];function l(e){var t=e.replace(/;;/gi,";");return";"!==(t=t.replace(/^;/gi,"")).charAt(t.length)&&(t+=";"),t}function d(t){var n;for(n in t)if(Object.prototype.hasOwnProperty.call(t,n)){var o=n.match(r),c=null;"style"===n&&e.opts.htmlAllowedStyleProps.length&&(c=t[n].match(u)),o&&c?t[n]=l(c.join(";")):o&&("style"!==n||c)||delete t[n]}for(var d="",i=Object.keys(t).sort(),a=0;a<i.length;a++)t[n=i[a]].indexOf('"')<0?d+=" ".concat(n,'="').concat(t[n],'"'):d+=" ".concat(n,"='").concat(t[n],"'");return d}function h(t,n){var r,o=document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");g(o).append(t);var c="";if(o){var i=e.node.contents(o);for(r=0;r<i.length;r++)n(i[r]);for(i=e.node.contents(o),r=0;r<i.length;r++)c+=s(i[r])}return c}function f(t,n,r){var o=t=function(e){return c=[],(e=(e=(e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,(function(e){return c.push(e),"[FROALA.EDITOR.SCRIPT ".concat(c.length-1,"]")}))).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi,(function(e){return c.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(c.length-1,"]")}))).replace(/<meta((?:[\w\W]*?)) http-equiv="/g,'<meta$1 data-fr-http-equiv="')).replace(/<img((?:[\w\W]*?)) src="/g,'<img$1 data-fr-src="')}(t),l=null;return e.opts.fullPage&&(o=e.html.extractNode(t,"body")||(0<=t.indexOf("<body")?"":t),r&&(l=e.html.extractNode(t,"head")||"")),o=h(o,n),l&&(l=h(l,n)),function(t){return(t=(t=t.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi,(function(t,n){return 0<=e.opts.htmlRemoveTags.indexOf("script")?"":c[parseInt(n,10)]}))).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi,(function(t,n){if(0<=e.opts.htmlRemoveTags.indexOf("noscript"))return"";var r=c[parseInt(n,10)].replace(/&lt;/g,"<").replace(/&gt;/g,">"),o=g(r);if(o&&o.length){var l=h(o.html(),m);o.html(l),r=o.get(0).outerHTML}return r}))).replace(/<img((?:[\w\W]*?)) data-fr-src="/g,'<img$1 src="')}(function(t,n,r){if(e.opts.fullPage){var o=e.html.extractDoctype(r),c=d(e.html.extractNodeAttrs(r,"html"));n=null===n?e.html.extractNode(r,"head")||"<title></title>":n;var i=d(e.html.extractNodeAttrs(r,"head")),a=d(e.html.extractNodeAttrs(r,"body"));return"".concat(o,"<html").concat(c,"><head").concat(i,">").concat(n,"</head><body").concat(a,">").concat(t,"</body></html>")}return t}(o,l,t))}function b(t){var n=e.doc.createElement("DIV");return n.innerText=t,n.textContent}function m(o){for(var c=e.node.contents(o),d=0;d<c.length;d++)c[d].nodeType!==Node.TEXT_NODE&&m(c[d]);!function(a){if("SPAN"===a.tagName&&0<=(a.getAttribute("class")||"").indexOf("fr-marker"))return!1;if("PRE"===a.tagName&&function(e){var t=e.innerHTML;0<=t.indexOf("\n")&&(e.innerHTML=t.replace(/\n/g,"<br>"))}(a),a.nodeType===Node.ELEMENT_NODE&&(a.getAttribute("data-fr-src")&&0!==a.getAttribute("data-fr-src").indexOf("blob:")&&a.setAttribute("data-fr-src",e.helpers.sanitizeURL(b(a.getAttribute("data-fr-src")))),a.getAttribute("href")&&a.setAttribute("href",e.helpers.sanitizeURL(b(a.getAttribute("href")))),a.getAttribute("src")&&a.setAttribute("src",e.helpers.sanitizeURL(b(a.getAttribute("src")))),a.getAttribute("srcdoc")&&a.setAttribute("srcdoc",e.clean.html(a.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(a.tagName)&&(a.innerHTML=a.innerHTML.trim())),!e.opts.pasteAllowLocalImages&&a.nodeType===Node.ELEMENT_NODE&&"IMG"===a.tagName&&a.getAttribute("data-fr-src")&&0===a.getAttribute("data-fr-src").indexOf("file://"))return a.parentNode.removeChild(a),!1;if(a.nodeType===Node.ELEMENT_NODE&&t.HTML5Map[a.tagName]&&""===e.node.attributes(a)){var o=t.HTML5Map[a.tagName],c="<".concat(o,">").concat(a.innerHTML,"</").concat(o,">");a.insertAdjacentHTML("beforebegin",c),(a=a.previousSibling).parentNode.removeChild(a.nextSibling)}if(e.opts.htmlAllowComments||a.nodeType!==Node.COMMENT_NODE)if(a.tagName&&a.tagName.match(p))"STYLE"==a.tagName&&e.helpers.isMac()&&function(){var e,t=a.innerHTML.trim(),n=[],r=/{([^}]+)}/g;for(t=t.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|<!--[\s\S]*?-->$/,"");e=r.exec(t);)n.push(e[1]);for(var o=function(e){var r=t.substring(0,t.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(r)&&a.parentNode.querySelectorAll(r).forEach((function(t){t.removeAttribute("class"),t.setAttribute("style",n[e])})),t=t.substring(t.indexOf("}")+1)},i=0;-1!=t.indexOf("{");i++)o(i)}(),a.parentNode.removeChild(a);else if(a.tagName&&!a.tagName.match(n))"svg"===a.tagName?a.parentNode.removeChild(a):e.browser.safari&&"path"===a.tagName&&a.parentNode&&"svg"===a.parentNode.tagName||(a.outerHTML=a.innerHTML);else{var d=a.attributes;if(d)for(var h=d.length-1;0<=h;h--){var f=d[h],i=f.nodeName.match(r),s=null;"style"===f.nodeName&&e.opts.htmlAllowedStyleProps.length&&(s=f.value.match(u)),i&&s?f.value=l(s.join(";")):i&&("style"!==f.nodeName||s)||a.removeAttribute(f.nodeName)}}else 0!==a.data.indexOf("[FROALA.EDITOR")&&a.parentNode.removeChild(a)}(o)}return{_init:function(){e.opts.fullPage&&g.merge(e.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function(t,o,c,l){void 0===o&&(o=[]),void 0===c&&(c=[]),void 0===l&&(l=!1);var d,i=g.merge([],e.opts.htmlAllowedTags);for(d=0;d<o.length;d++)0<=i.indexOf(o[d])&&i.splice(i.indexOf(o[d]),1);var a=g.merge([],e.opts.htmlAllowedAttrs);for(d=0;d<c.length;d++)0<=a.indexOf(c[d])&&a.splice(a.indexOf(c[d]),1);return a.push("data-fr-.*"),a.push("fr-.*"),n=new RegExp("^".concat(i.join("$|^"),"$"),"gi"),r=new RegExp("^".concat(a.join("$|^"),"$"),"gi"),p=new RegExp("^".concat(e.opts.htmlRemoveTags.join("$|^"),"$"),"gi"),u=e.opts.htmlAllowedStyleProps.length?new RegExp("((^|;|\\s)".concat(e.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"),":.+?(?=(;)|$))"),"gi"):null,t=f(t,m,!0),void 0!==e.opts.DOMPurify&&(t=e.opts.DOMPurify.sanitize(t)),t},toHTML5:function(){var n=e.el.querySelectorAll(Object.keys(t.HTML5Map).join(","));if(n.length){var r=!1;e.el.querySelector(".fr-marker")||(e.selection.save(),r=!0);for(var o=0;o<n.length;o++)""===e.node.attributes(n[o])&&g(n[o]).replaceWith("<".concat(t.HTML5Map[n[o].tagName],">").concat(n[o].innerHTML,"</").concat(t.HTML5Map[n[o].tagName],">"));r&&e.selection.restore()}},tables:function(){!function(){for(var t=e.el.querySelectorAll("tr"),n=0;n<t.length;n++){for(var r=t[n].children,o=!0,c=0;c<r.length;c++)if("TH"!==r[c].tagName){o=!1;break}if(!1!==o&&0!==r.length){for(var i=t[n];i&&"TABLE"!==i.tagName&&"THEAD"!==i.tagName;)i=i.parentNode;var a=i;"THEAD"!==a.tagName&&(a=e.doc.createElement("THEAD"),i.insertBefore(a,i.firstChild)),a.appendChild(t[n])}}}()},lists:function(){!function(){var t,n=[];do{if(n.length){var r=n[0],o=e.doc.createElement("ul");r.parentNode.insertBefore(o,r);do{var c=r;r=r.nextSibling,o.appendChild(c)}while(r&&"LI"===r.tagName)}n=[];for(var i=e.el.querySelectorAll("li"),a=0;a<i.length;a++)t=i[a],e.node.isList(t.parentNode)||n.push(i[a])}while(0<n.length)}(),function(){for(var t=e.el.querySelectorAll("ol + ol, ul + ul"),n=0;n<t.length;n++){var r=t[n];if(e.node.isList(r.previousSibling)&&e.node.openTagString(r)===e.node.openTagString(r.previousSibling)){for(var o=e.node.contents(r),c=0;c<o.length;c++)r.previousSibling.appendChild(o[c]);r.parentNode.removeChild(r)}}}(),function(){for(var t=e.el.querySelectorAll("ul, ol"),n=0;n<t.length;n++)for(var r=e.node.contents(t[n]),o=null,c=r.length-1;0<=c;c--)!r[c].tagName&&e.opts.htmlUntouched||"LI"===r[c].tagName||"UL"==r[c].tagName||"OL"==r[c].tagName?o=null:"BR"==r[c].tagName?g(r[c]).remove():(o||(o=g(e.doc.createElement("LI"))).insertBefore(r[c]),o.prepend(r[c]))}(),function(){var t,n,r;do{n=!1;var o=e.el.querySelectorAll("li:empty");for(t=0;t<o.length;t++)o[t].parentNode.removeChild(o[t]);var c=e.el.querySelectorAll("ul, ol");for(t=0;t<c.length;t++)(r=c[t]).querySelector("LI")||(n=!0,r.parentNode.removeChild(r))}while(!0===n)}(),function(){for(var t=e.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"),n=0;n<t.length;n++){var r=t[n],o=r.previousSibling;o&&("LI"===o.tagName?o.appendChild(r):g(r).wrap("<li></li>"))}}(),function(){for(var t=e.el.querySelectorAll("li > ul, li > ol"),n=0;n<t.length;n++){var r=t[n];if(r.nextSibling)for(var o=r.nextSibling;0<o.childNodes.length;)r.append(o.childNodes[0])}}(),function(){for(var t=e.el.querySelectorAll("li > ul, li > ol"),n=0;n<t.length;n++){var r=t[n];if(e.node.isFirstSibling(r)&&"none"!=r.parentNode.style.listStyleType)g(r).before("<br/>");else if(r.previousSibling&&"BR"===r.previousSibling.tagName){for(var o=r.previousSibling.previousSibling;o&&e.node.hasClass(o,"fr-marker");)o=o.previousSibling;o&&"BR"!==o.tagName&&g(r.previousSibling).remove()}}}(),function(){for(var t=e.el.querySelectorAll("li:empty"),n=0;n<t.length;n++)g(t[n]).remove()}()},invisibleSpaces:function(t){return t.replace(/\u200b/g,"").length===t.length?t:e.clean.exec(t,o)},exec:f}},t.XS=0,t.SM=1,t.MD=2,t.LG=3,t.LinkRegExCommon="[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.","]{1,}"),t.LinkRegExEnd="((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&amp;\\/~+#-\\'*-_{}]*)|())",t.LinkRegExTLD="((".concat(t.LinkRegExCommon,")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"),t.LinkRegExHTTP="((ftp|http|https):\\/\\/".concat(t.LinkRegExCommon,")"),t.LinkRegExAuth="((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat(t.LinkRegExCommon,")"),t.LinkRegExWWW="(www\\.".concat(t.LinkRegExCommon,"\\.[a-z0-9-]{2,24})"),t.LinkRegEx="(".concat(t.LinkRegExTLD,"|").concat(t.LinkRegExHTTP,"|").concat(t.LinkRegExWWW,"|").concat(t.LinkRegExAuth,")").concat(t.LinkRegExEnd),t.LinkProtocols=["mailto","tel","sms","notes","data"],t.MAIL_REGEX=/.+@.+\..+/i,t.MODULES.helpers=function(i){var a,s=i.$;function n(){var e={},t=function(){var e,t=-1;return"Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),t}();if(0<t)e.msie=!0;else{var n=navigator.userAgent.toLowerCase(),r=/(edge)[ /]([\w.]+)/.exec(n)||/(chrome)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],o=r[1]||"";r[2],r[1]&&(e[o]=!0),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0)}return e.msie&&(e.version=t),e}function r(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!l()}function o(){return/(Android)/g.test(navigator.userAgent)&&!l()}function c(){return/(Blackberry)/g.test(navigator.userAgent)}function l(){return/(Windows Phone)/gi.test(navigator.userAgent)}var d=null;return{_init:function(){i.browser=n()},isIOS:r,isMac:function(){return null===d&&(d=0<=navigator.platform.toUpperCase().indexOf("MAC")),d},isAndroid:o,isBlackberry:c,isWindowsPhone:l,isMobile:function(){return o()||r()||c()},isEmail:function(e){return!/^(https?:|ftps?:|)\/\//i.test(e)&&t.MAIL_REGEX.test(e)},requestAnimationFrame:function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}},getPX:function(e){return parseInt(e,10)||0},screenSize:function(e){try{var n=0;if((n=e?i.$box.width():i.$sc.width())<768)return t.XS;if(768<=n&&n<992)return t.SM;if(992<=n&&n<1200)return t.MD;if(1200<=n)return t.LG}catch(e){return t.LG}},isTouch:function(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch},sanitizeURL:function(e){return/^(https?:|ftps?:|)\/\//i.test(e)||/^([A-Za-z]:(\\){1,2}|[A-Za-z]:((\\){1,2}[^\\]+)+)(\\)?$/i.test(e)||new RegExp("^(".concat(t.LinkProtocols.join("|"),"):"),"i").test(e)?e:e=encodeURIComponent(e).replace(/%23/g,"#").replace(/%2F/g,"/").replace(/%25/g,"%").replace(/mailto%3A/gi,"mailto:").replace(/file%3A/gi,"file:").replace(/sms%3A/gi,"sms:").replace(/tel%3A/gi,"tel:").replace(/notes%3A/gi,"notes:").replace(/data%3Aimage/gi,"data:image").replace(/blob%3A/gi,"blob:").replace(/%3A(\d)/gi,":$1").replace(/webkit-fake-url%3A/gi,"webkit-fake-url:").replace(/%3F/g,"?").replace(/%3D/g,"=").replace(/%26/g,"&").replace(/&amp;/g,"&").replace(/%2C/g,",").replace(/%3B/g,";").replace(/%2B/g,"+").replace(/%40/g,"@").replace(/%5B/g,"[").replace(/%5D/g,"]").replace(/%7B/g,"{").replace(/%7D/g,"}")},isArray:function(t){return t&&!Object.prototype.propertyIsEnumerable.call(t,"length")&&"object"===e(t)&&"number"==typeof t.length},RGBToHex:function(e){function t(e){return"0".concat(parseInt(e,10).toString(16)).slice(-2)}try{return e&&"transparent"!==e?/^#[0-9A-F]{6}$/i.test(e)?e:(e=e.match(/^rgb\((\d+),\s*(\d+),\s*(\d+)\)$/),"#".concat(t(e[1])).concat(t(e[2])).concat(t(e[3])).toUpperCase()):""}catch(e){return null}},HEXtoRGB:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,n,r){return t+t+n+n+r+r}));var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?"rgb(".concat(parseInt(t[1],16),", ").concat(parseInt(t[2],16),", ").concat(parseInt(t[3],16),")"):""},isURL:function(e){return!!/^(https?:|ftps?:|)\/\//i.test(e)&&(e=String(e).replace(/</g,"%3C").replace(/>/g,"%3E").replace(/"/g,"%22").replace(/ /g,"%20"),new RegExp("^".concat(t.LinkRegExHTTP).concat(t.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function(e){e.css||(e=s(e));var t=(e.css("text-align")||"").replace(/-(.*)-/g,"");if(["left","right","justify","center"].indexOf(t)<0){if(!a){var n=s('<div dir="'.concat("rtl"===i.opts.direction?"rtl":"auto",'" style="text-align: ').concat(i.$el.css("text-align"),'; position: fixed; left: -3000px;"><span id="s1">.</span><span id="s2">.</span></div>'));s("body").first().append(n);var r=n.find("#s1").get(0).getBoundingClientRect().left,o=n.find("#s2").get(0).getBoundingClientRect().left;n.remove(),a=r<o?"left":"right"}t=a}return t},scrollTop:function(){return i.o_win.pageYOffset?i.o_win.pageYOffset:i.o_doc.documentElement&&i.o_doc.documentElement.scrollTop?i.o_doc.documentElement.scrollTop:i.o_doc.body.scrollTop?i.o_doc.body.scrollTop:0},scrollLeft:function(){return i.o_win.pageXOffset?i.o_win.pageXOffset:i.o_doc.documentElement&&i.o_doc.documentElement.scrollLeft?i.o_doc.documentElement.scrollLeft:i.o_doc.body.scrollLeft?i.o_doc.body.scrollLeft:0},isInViewPort:function(e){var t=e.getBoundingClientRect();return 0<=(t={top:Math.round(t.top),bottom:Math.round(t.bottom)}).top&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)||t.top<=0&&t.bottom>=(window.innerHeight||document.documentElement.clientHeight)}}},t.MODULES.events=function(e){var n,i=e.$,a={};function s(e,t,n){d(e,t,n)}function r(n){if(void 0===n&&(n=!0),!e.$wp)return!1;if(e.helpers.isIOS()&&e.$win.get(0).focus(),e.core.hasFocus())return!1;if(!e.core.hasFocus()&&n){var r=e.$win.scrollTop();if(e.browser.msie&&e.$box&&e.$box.css("position","fixed"),e.browser.msie&&e.$wp&&e.$wp.css("overflow","visible"),e.browser.msie&&e.$sc&&e.$sc.css("position","fixed"),e.browser.msie||(p(),e.el.focus(),e.events.trigger("focus"),c()),e.browser.msie&&e.$sc&&e.$sc.css("position",""),e.browser.msie&&e.$box&&e.$box.css("position",""),e.browser.msie&&e.$wp&&e.$wp.css("overflow","auto"),r!==e.$win.scrollTop()&&e.$win.scrollTop(r),!e.selection.info(e.el).atStart)return!1}if(!e.core.hasFocus()||0<e.$el.find(".fr-marker").length)return!1;if(e.selection.info(e.el).atStart&&e.selection.isCollapsed()&&null!==e.html.defaultTag()){var o=e.markers.insert();if(o&&!e.node.blockParent(o)){i(o).remove();var l=e.$el.find(e.html.blockTagsQuery()).get(0);l&&(i(l).prepend(t.MARKERS),e.selection.restore())}else o&&i(o).remove()}}var o=!1;function c(){n=!0}function p(){n=!1}function l(){return n}function u(t,n,r){var o,c=t.split(" ");if(1<c.length){for(var i=0;i<c.length;i++)u(c[i],n,r);return!0}void 0===r&&(r=!1),o=0!==t.indexOf("shared.")?(a[t]=a[t]||[],a[t]):(e.shared._events[t]=e.shared._events[t]||[],e.shared._events[t]),r?o.unshift(n):o.push(n)}var g=[];function d(t,n,r,o,c){"function"==typeof r&&(c=o,o=r,r=!1);var i=c?e.shared.$_events:g,a=c?e.sid:e.id,s="".concat(n.trim().split(" ").join(".ed".concat(a," ")),".ed").concat(a);r?t.on(s,r,o):t.on(s,o),i.push([t,s])}function h(e){for(var t=0;t<e.length;t++)e[t][0].off(e[t][1])}function f(t,n,r){if(!e.edit.isDisabled()||r){var o,c;if(0!==t.indexOf("shared."))o=a[t];else{if(0<e.shared.count)return!1;o=e.shared._events[t]}if(o)for(var i=0;i<o.length;i++)if(!1===(c=o[i].apply(e,n)))return!1;return(!e.opts.events||!e.opts.events[t]||!1!==(c=e.opts.events[t].apply(e,n)))&&c}}function m(){for(var e in a)Object.prototype.hasOwnProperty.call(a,e)&&delete a[e]}function b(){for(var t in e.shared._events)Object.prototype.hasOwnProperty.call(e.shared._events,t)&&delete e.shared._events[t]}return{_init:function(){e.shared.$_events=e.shared.$_events||[],e.shared._events={},e.helpers.isMobile()?(e._mousedown="touchstart",e._mouseup="touchend",e._move="touchmove",e._mousemove="touchmove"):(e._mousedown="mousedown",e._mouseup="mouseup",e._move="",e._mousemove="mousemove"),s(e.$el,"click mouseup mousemove mousedown touchstart touchend dragenter dragover dragleave dragend drop dragstart",(function(e){f(e.type,[e])})),u("mousedown",(function(){for(var n=0;n<t.INSTANCES.length;n++)t.INSTANCES[n]!==e&&t.INSTANCES[n].popups&&t.INSTANCES[n].popups.areVisible()&&t.INSTANCES[n].$el.find(".fr-marker").remove()})),s(e.$win,e._mousedown,(function(e){f("window.mousedown",[e]),c()})),s(e.$win,e._mouseup,(function(e){f("window.mouseup",[e])})),s(e.$win,"beforeinput cut copy keydown keyup touchmove touchend",(function(e){f("window.".concat(e.type),[e])})),s(e.$doc,"dragend drop",(function(e){f("document.".concat(e.type),[e])})),s(e.$el,"beforeinput keydown keypress keyup input",(function(e){f(e.type,[e])})),s(e.$el,"focus",(function(t){l()&&(r(!1),!1===o&&(f(t.type,[t]),e.helpers.isMobile()&&p()))})),s(e.$el,"blur",(function(t){l()&&!0===o&&(f(t.type,[t]),e.helpers.isMobile()&&e.opts.toolbarContainer&&(e.shared.selected_editor=e.id),c())})),d(e.$el,"mousedown",'[contenteditable="true"]',(function(){p(),e.$el.blur()})),u("focus",(function(){o=!0})),u("blur",(function(){o=!1})),c(),s(e.$el,"cut copy paste beforepaste",(function(e){f(e.type,[e])})),u("destroy",m),u("shared.destroy",b)},on:u,trigger:f,bindClick:function(t,n,r){d(t,e._mousedown,n,(function(t){e.edit.isDisabled()||function(t){var n=i(t.currentTarget);e.edit.isDisabled()||e.node.hasClass(n.get(0),"fr-disabled")?t.preventDefault():"mousedown"===t.type&&1!==t.which||(e.helpers.isMobile()||t.preventDefault(),(e.helpers.isAndroid()||e.helpers.isWindowsPhone())&&0===n.parents(".fr-dropdown-menu").length&&(t.preventDefault(),t.stopPropagation()),n.addClass("fr-selected"),e.events.trigger("commands.mousedown",[n]))}(t)}),!0),d(t,"".concat(e._mouseup," ").concat(e._move),n,(function(t){e.edit.isDisabled()||function(t,n){var r=i(t.currentTarget);if(e.edit.isDisabled()||e.node.hasClass(r.get(0),"fr-disabled"))return t.preventDefault(),!1;if("mouseup"===t.type&&1!==t.which)return!0;if(e.button.getButtons(".fr-selected",!0).get(0)==r.get(0)&&!e.node.hasClass(r.get(0),"fr-selected"))return!0;if("touchmove"!==t.type){if(t.stopPropagation(),t.stopImmediatePropagation(),t.preventDefault(),!e.node.hasClass(r.get(0),"fr-selected"))return e.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),!1;if(e.button.getButtons(".fr-selected",!0).removeClass("fr-selected"),r.data("dragging")||r.attr("disabled"))return r.removeData("dragging"),!1;var o=r.data("timeout");o&&(clearTimeout(o),r.removeData("timeout")),n.apply(e,[t])}else r.data("timeout")||r.data("timeout",setTimeout((function(){r.data("dragging",!0)}),100))}(t,r)}),!0),d(t,"mousedown click mouseup",n,(function(t){e.edit.isDisabled()||t.stopPropagation()}),!0),u("window.mouseup",(function(){e.edit.isDisabled()||(t.find(n).removeClass("fr-selected"),c())})),d(t,"mouseover",n,(function(){i(this).hasClass("fr-options")&&i(this).prev(".fr-btn").addClass("fr-btn-hover"),i(this).next(".fr-btn").hasClass("fr-options")&&i(this).next(".fr-btn").addClass("fr-btn-hover")})),d(t,"mouseout",n,(function(){i(this).hasClass("fr-options")&&i(this).prev(".fr-btn").removeClass("fr-btn-hover"),i(this).next(".fr-btn").hasClass("fr-options")&&i(this).next(".fr-btn").removeClass("fr-btn-hover")}))},disableBlur:p,enableBlur:c,blurActive:l,focus:r,chainTrigger:function(t,n,r){if(!e.edit.isDisabled()||r){var o,c;if(0!==t.indexOf("shared."))o=a[t];else{if(0<e.shared.count)return!1;o=e.shared._events[t]}if(o)for(var i=0;i<o.length;i++)void 0!==(c=o[i].apply(e,[n]))&&(n=c);return e.opts.events&&e.opts.events[t]&&void 0!==(c=e.opts.events[t].apply(e,[n]))&&(n=c),n}},$on:d,$off:function(){h(g),g=[],0===e.shared.count&&(h(e.shared.$_events),e.shared.$_events=[])}}},Object.assign(t.DEFAULTS,{indentMargin:20}),t.COMMANDS={bold:{title:"Bold",toggle:!0,refresh:function(e){var t=this.format.is("strong");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},italic:{title:"Italic",toggle:!0,refresh:function(e){var t=this.format.is("em");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},underline:{title:"Underline",toggle:!0,refresh:function(e){var t=this.format.is("u");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},strikeThrough:{title:"Strikethrough",toggle:!0,refresh:function(e){var t=this.format.is("s");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},subscript:{title:"Subscript",toggle:!0,refresh:function(e){var t=this.format.is("sub");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},superscript:{title:"Superscript",toggle:!0,refresh:function(e){var t=this.format.is("sup");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},outdent:{title:"Decrease Indent"},indent:{title:"Increase Indent"},undo:{title:"Undo",undo:!1,forcedRefresh:!0,disabled:!0},redo:{title:"Redo",undo:!1,forcedRefresh:!0,disabled:!0},insertHR:{title:"Insert Horizontal Line"},clearFormatting:{title:"Clear Formatting"},selectAll:{title:"Select All",undo:!1},moreText:{title:"More Text",undo:!1},moreParagraph:{title:"More Paragraph",undo:!1},moreRich:{title:"More Rich",undo:!1},moreMisc:{title:"More Misc",undo:!1}},t.RegisterCommand=function(e,n){t.COMMANDS[e]=n},t.MODULES.commands=function(a){var s=a.$;function e(e){return a.html.defaultTag()&&(e="<".concat(a.html.defaultTag(),">").concat(e,"</").concat(a.html.defaultTag(),">")),e}var i={bold:function(){o("bold","strong")},subscript:function(){a.format.is("sup")&&a.format.remove("sup"),o("subscript","sub")},superscript:function(){a.format.is("sub")&&a.format.remove("sub"),o("superscript","sup")},italic:function(){o("italic","em")},strikeThrough:function(){o("strikeThrough","s")},underline:function(){o("underline","u")},undo:function(){a.undo.run()},redo:function(){a.undo.redo()},indent:function(){c(1)},outdent:function(){c(-1)},show:function(){a.opts.toolbarInline&&a.toolbar.showInline(null,!0)},insertHR:function(){a.selection.remove();var n="";a.core.isEmpty()&&(n=e(n="<br>"));var r='<hr id="fr-just" class="fr-just">'.concat(n);a.opts.trackChangesEnabled&&(r=a.track_changes.wrapInTracking(s(r),"hrWrapper").get(0).outerHTML),a.html.insert(r);var o,c=a.$el.find("hr#fr-just").length?a.$el.find("hr#fr-just"):a.$el.find(".fr-just");c.removeAttr("id"),c.removeAttr("class");var l=a.opts.trackChangesEnabled&&"SPAN"===c[0].parentNode.tagName&&"P"===c[0].parentNode.parentNode.tagName;if(0===c.next().length){var i=a.html.defaultTag();i&&!l?c.after(s(a.doc.createElement(i)).append("<br>").get(0)):l?c[0].parentNode.after(s(a.doc.createElement(i)).append("<br>").get(0)):c.after("<br>")}c.prev().is("hr")?o=a.selection.setAfter(c.get(0),!1):c.next().is("hr")?o=a.selection.setBefore(c.get(0),!1):l||a.selection.setAfter(c.get(0),!1)?a.selection.setAfter(c[0].parentNode,!1):a.selection.setBefore(c.get(0),!1),o||void 0===o||(n=e(n="".concat(t.MARKERS,"<br>")),c.after(n)),a.selection.restore()},clearFormatting:function(){a.format.remove()},selectAll:function(){a.doc.execCommand("selectAll",!1,!1)},moreText:function(e){n(e)},moreParagraph:function(e){n(e)},moreRich:function(e){n(e)},moreMisc:function(e){n(e)},moreTrackChanges:function(){n("trackChanges")}};function n(e){var t=a.$tb.find("[data-cmd=".concat(e,"]")),n=a.$tb.find("[data-cmd=html]");a.opts.trackChangesEnabled?n&&n.addClass("fr-disabled"):n&&n.removeClass("fr-disabled"),function(e){a.helpers.isMobile()&&a.opts.toolbarInline&&a.events.disableBlur();var t=a.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("data-group-name"),'"]'));"trackChanges"===e.data("cmd")&&(t=a.$tb.find('.fr-more-toolbar[data-name="'.concat(e.attr("id"),'"]'))),a.$tb.find(".fr-open").not(e).not('[data-cmd="trackChanges"]').removeClass("fr-open"),e.toggleClass("fr-open"),a.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"),a.$tb.find(".fr-expanded").not(t).length?(a.$tb.find(".fr-expanded").not(t).each((function(t,n){0!=s(n).data("name").indexOf("trackChanges-")&&0!=s(n).data("name").indexOf("moreRich-")?s(n).toggleClass("fr-expanded"):e.parents('[data-name^="moreRich-"]').length||0==s(n).data("name").indexOf("trackChanges-")||s(n).find('[id^="trackChanges-"]').length&&a.opts.trackChangesEnabled||s(n).toggleClass("fr-expanded")})),t.toggleClass("fr-expanded")):(t.toggleClass("fr-expanded"),a.$box.toggleClass("fr-toolbar-open"),a.$tb.toggleClass("fr-toolbar-open"))}(t),a.toolbar.setMoreToolbarsHeight()}function r(e,n){if(!(a.markdown&&a.markdown.isEnabled()&&("bold"===e||"italic"===e||"underline"===e)||a.opts.trackChangesEnabled&&"markdown"===e)&&!1!==a.events.trigger("commands.before",s.merge([e],n||[]))){var r=t.COMMANDS[e]&&t.COMMANDS[e].callback||i[e],o=!0,c=!1;t.COMMANDS[e]&&(void 0!==t.COMMANDS[e].focus&&(o=t.COMMANDS[e].focus),void 0!==t.COMMANDS[e].accessibilityFocus&&(c=t.COMMANDS[e].accessibilityFocus)),(!a.core.hasFocus()&&o||!a.core.hasFocus()&&c&&a.accessibility.hasFocus())&&(a.el.focus(),a.events.trigger("focus")),t.COMMANDS[e]&&!1!==t.COMMANDS[e].undo&&(a.$el.find(".fr-marker").length&&(a.events.disableBlur(),a.selection.restore()),a.undo.saveStep()),r&&r.apply(a,s.merge([e],n||[])),a.events.trigger("commands.after",s.merge([e],n||[])),t.COMMANDS[e]&&!1!==t.COMMANDS[e].undo&&a.undo.saveStep()}}function o(e,t){a.format.toggle(t)}function c(e){a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var t=a.selection.blocks(),n=0;n<t.length;n++)if("LI"!==t[n].tagName||"LI"!==t[n].parentNode.tagName){var r=s(t[n]);"LI"!=t[n].tagName&&"LI"==t[n].parentNode.tagName&&(r=s(t[n].parentNode));var o="rtl"===a.opts.direction||"rtl"===r.css("direction")?"margin-right":"margin-left",i=a.helpers.getPX(r.css(o));if(r.width()<2*a.opts.indentMargin&&0<e)continue;"UL"!=t[n].parentNode.tagName&&"OL"!=t[n].parentNode.tagName&&"LI"!=t[n].parentNode.tagName&&r.css(o,Math.max(i+e*a.opts.indentMargin,0)||""),r.removeClass("fr-temp-div")}a.selection.save(),a.html.unwrap(),a.selection.restore()}function l(e){return function(){r(e)}}var d={};for(var h in i)Object.prototype.hasOwnProperty.call(i,h)&&(d[h]=l(h));return Object.assign(d,{exec:r,_init:function(){a.events.on("keydown",(function(e){var t=a.selection.element();if(t&&"HR"===t.tagName&&!a.keys.isArrow(e.which))return e.preventDefault(),!1})),a.events.on("keyup",(function(e){var n=a.selection.element();if(n&&"HR"===n.tagName)if(e.which===t.KEYCODE.ARROW_LEFT||e.which===t.KEYCODE.ARROW_UP){if(n.previousSibling)return a.node.isBlock(n.previousSibling)?a.selection.setAtEnd(n.previousSibling):s(n).before(t.MARKERS),a.selection.restore(),!1}else if((e.which===t.KEYCODE.ARROW_RIGHT||e.which===t.KEYCODE.ARROW_DOWN)&&n.nextSibling)return a.node.isBlock(n.nextSibling)?a.selection.setAtStart(n.nextSibling):s(n).after(t.MARKERS),a.selection.restore(),!1})),a.events.on("mousedown",(function(e){if(e.target&&"HR"===e.target.tagName)return e.preventDefault(),e.stopPropagation(),!1})),a.events.on("mouseup",(function(){var e=a.selection.element();e===a.selection.endElement()&&e&&"HR"===e.tagName&&(e.nextSibling&&(a.node.isBlock(e.nextSibling)?a.selection.setAtStart(e.nextSibling):s(e).after(t.MARKERS)),a.selection.restore())}))}})},t.MODULES.cursorLists=function(e){var b=e.$;function n(e){for(var t=e;"LI"!==t.tagName;)t=t.parentNode;return t}function r(t){for(var n=t;!e.node.isList(n);)n=n.parentNode;return n}function o(e){for(var t="",n=0;n<e.length;n++){var r=e[n];t+="".concat(r.name,"='").concat(r.value,"' ")}return t}return{_startEnter:function(c){var l,d=n(c),h=d.nextSibling,f=d.previousSibling,i=e.html.defaultTag();if(e.node.isEmpty(d,!0)&&h){for(var a="",s="",m=c.parentNode;!e.node.isList(m)&&m.parentNode&&("LI"!==m.parentNode.tagName||m.parentNode===d);)-1<["OL","LI","UL"].indexOf(m.tagName)&&(a=e.node.openTagString(m)+a,s+=e.node.closeTagString(m)),m=m.parentNode;a=e.node.openTagString(m)+a,s+=e.node.closeTagString(m);var v="";if(m.parentNode&&"LI"===m.parentNode.tagName)if(m.parentNode.attributes.length){var _=o(m.parentNode.attributes);v="".concat(s,"<li ").concat(_,">").concat(t.MARKERS,"<br>").concat(a)}else v="".concat(s,"<li>").concat(t.MARKERS,"<br>").concat(a);else v=i?"".concat(s,"<").concat(i,">").concat(t.MARKERS,"<br></").concat(i,">").concat(a):"".concat(s+t.MARKERS,"<br>").concat(a);for(;["UL","OL"].indexOf(m.tagName)<0||m.parentNode&&"LI"===m.parentNode.tagName;)m=m.parentNode;b(d).replaceWith('<span id="fr-break"></span>');var y=e.node.openTagString(m)+b(m).html()+e.node.closeTagString(m);y=y.replace(/<span id="fr-break"><\/span>/g,v),b(m).replaceWith(y),e.$el.find("li:empty").remove(),e.$el.find("li > p > span:empty").length&&e.$el.find("li > p > span:empty")[0].parentNode.parentNode.remove()}else if(f&&h||!e.node.isEmpty(d,!0)){var p="<br>",E=c.parentNode;for(E&&"A"===E.tagName&&(E=null);E&&"LI"!==E.tagName;)p=e.node.openTagString(E)+p+e.node.closeTagString(E),E=E.parentNode;if(E&&E.attributes.length){var u=o(E.attributes);b(d).before("<li ".concat(u,">").concat(p,"</li>"))}else b(d).before("<li>".concat(p,"</li>"));b(c).remove()}else if(f){l=r(d);for(var g="".concat(t.MARKERS,"<br>"),C=c.parentNode;C&&"LI"!==C.tagName;)g=e.node.openTagString(C)+g+e.node.closeTagString(C),C=C.parentNode;if(l.parentNode&&"LI"===l.parentNode.tagName)if(l.parentNode.attributes.length){var w=o(l.parentNode.attributes);b(l.parentNode).after("<li ".concat(w,">").concat(g,"</li>"))}else b(l.parentNode).after("<li>".concat(g,"</li>"));else i?b(l).after("<".concat(i,">").concat(g,"</").concat(i,">")):b(l).after(g);b(d).remove()}else(l=r(d)).parentNode&&"LI"===l.parentNode.tagName?h?b(l.parentNode).before("".concat(e.node.openTagString(d)+t.MARKERS,"<br></li>")):b(l.parentNode).after("".concat(e.node.openTagString(d)+t.MARKERS,"<br></li>")):i?b(l).before("<".concat(i,">").concat(t.MARKERS,"<br></").concat(i,">")):b(l).before("".concat(t.MARKERS,"<br>")),b(d).remove()},_middleEnter:function(r){for(var o=n(r),c="",l=r,d="",i="",a=!1;l!==o;){var s="A"===(l=l.parentNode).tagName&&e.cursor.isAtEnd(r,l)?"fr-to-remove":"";a||l==o||e.node.isBlock(l)||(a=!0,d+=t.INVISIBLE_SPACE),d=e.node.openTagString(b(l).clone().addClass(s).get(0))+d,i+=e.node.closeTagString(l)}c=i+c+d+t.MARKERS+(e.opts.keepFormatOnDelete?t.INVISIBLE_SPACE:""),b(r).replaceWith('<span id="fr-break"></span>');var h=e.node.openTagString(o)+b(o).html()+e.node.closeTagString(o);h=h.replace(/<span id="fr-break"><\/span>/g,c),b(o).replaceWith(h)},_endEnter:function(r){for(var o=n(r),c=t.MARKERS,l="",d=r,i=!1;d!==o;)if(!(d=d.parentNode).classList.contains("fr-img-space-wrap")&&!d.classList.contains("fr-img-space-wrap2")){var a="A"===d.tagName&&e.cursor.isAtEnd(r,d)?"fr-to-remove":"";i||d===o||e.node.isBlock(d)||(i=!0,l+=t.INVISIBLE_SPACE),l=e.node.openTagString(b(d).clone().addClass(a).get(0))+l,c+=e.node.closeTagString(d)}var s=l+c;b(r).remove(),b(o).after(s)},_backspace:function(o){var c=n(o),l=c.previousSibling;if(l){l=b(l).find(e.html.blockTagsQuery()).get(-1)||l,b(o).replaceWith(t.MARKERS);var d=e.node.contents(l);d.length&&"BR"===d[d.length-1].tagName&&b(d[d.length-1]).remove(),b(c).find(e.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===c&&b(this).replaceWith(b(this).html()+(e.node.isEmpty(this)?"":"<br>"))}));for(var h,i=e.node.contents(c)[0];i&&!e.node.isList(i);)h=i.nextSibling,b(l).append(i),i=h;for(l=c.previousSibling;i;)h=i.nextSibling,b(l).append(i),i=h;1<(d=e.node.contents(l)).length&&"BR"===d[d.length-1].tagName&&b(d[d.length-1]).remove(),b(c).remove()}else{var a=r(c);if(b(o).replaceWith(t.MARKERS),a.parentNode&&"LI"===a.parentNode.tagName){var s=a.previousSibling;e.node.isBlock(s)?(b(c).find(e.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===c&&b(this).replaceWith(b(this).html()+(e.node.isEmpty(this)?"":"<br>"))})),b(s).append(b(c).html())):b(a).before(b(c).html())}else{var f=e.html.defaultTag();f&&0===b(c).find(e.html.blockTagsQuery()).length?b(a).before("<".concat(f,">").concat(b(c).html(),"</").concat(f,">")):b(a).before(b(c).html())}b(c).remove(),e.html.wrap(),0===b(a).find("li").length&&b(a).remove()}},_del:function(r){var o,c=n(r),l=c.nextSibling;if(l){(o=e.node.contents(l)).length&&"BR"===o[0].tagName&&b(o[0]).remove(),b(l).find(e.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===l&&b(this).replaceWith(b(this).html()+(e.node.isEmpty(this)?"":"<br>"))}));for(var d,i=r,a=e.node.contents(l)[0];a&&!e.node.isList(a);)d=a.nextSibling,b(i).after(a),i=a,a=d;for(;a;)d=a.nextSibling,b(c).append(a),a=d;b(r).replaceWith(t.MARKERS),b(l).remove()}else{for(var s=c;!s.nextSibling&&s!==e.el;)s=s.parentNode;if(s===e.el)return!1;if(s=s.nextSibling,e.node.isBlock(s)){if(t.NO_DELETE_TAGS.indexOf(s.tagName)<0){if(b(r).replaceWith(t.MARKERS),(o=e.node.contents(c)).length&&"BR"===o[o.length-1].tagName&&b(o[o.length-1]).remove(),s.isContentEditable&&"DIV"===s.tagName&&(!e.node.isBlock(s.previousSibling)||"DIV"===s.previousSibling.tagName))return;b(c).append(b(s).html()),b(s).remove()}}else{for((o=e.node.contents(c)).length&&"BR"===o[o.length-1].tagName&&b(o[o.length-1]).remove(),b(r).replaceWith(t.MARKERS);s&&!e.node.isBlock(s)&&"BR"!==s.tagName;)b(c).append(b(s)),s=s.nextSibling;b(s).remove()}}}}},t.NO_DELETE_TAGS=["TH","TD","TR","TABLE","FORM"],t.SIMPLE_ENTER_TAGS=["TH","TD","LI","DL","DT","FORM"],t.MODULES.cursor=function(g){var e=g.$;function n(e){return!!e&&(g.node.isBlock(e)?"P"!==e.tagName||!e.nextElementSibling||!e.parentElement||"OL"!==e.nextElementSibling.tagName||"LI"!==e.parentElement.tagName:e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?n(e.nextSibling):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&n(e.parentNode))}function u(e){return!!e&&(!!g.node.isBlock(e)||(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?u(e.previousSibling):!e.previousSibling&&(!(e.previousSibling||!g.node.hasClass(e.parentNode,"fr-inner"))||u(e.parentNode))))}function r(e,t){return!!e&&e!==g.$wp.get(0)&&(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?r(e.previousSibling,t):!e.previousSibling&&(e.parentNode===t||r(e.parentNode,t)))}function o(e,t){return!!e&&e!==g.$wp.get(0)&&(e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?o(e.nextSibling,t):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&(e.parentNode===t||o(e.parentNode,t)))}function b(t){return 0<e(t).parentsUntil(g.$el,"LI").length&&0===e(t).parentsUntil("LI","TABLE").length}function c(e,t){var n=new RegExp("".concat(t?"^":"","(([\\uD83C-\\uDBFF\\uDC00-\\uDFFF]+\\u200D)*[\\uD83C-\\uDBFF\\uDC00-\\uDFFF]{2})").concat(t?"":"$"),"i"),r=e.match(n);return r?r[0].length:1}function l(n){for(var r,o=n;!o.previousSibling;)if(o=o.parentNode,g.node.isElement(o))return!1;o=o.previousSibling;var d=g.opts.htmlAllowedEmptyTags,h=o.tagName&&o.tagName.toLowerCase();if((!g.node.isBlock(o)||o.lastChild&&h&&0<=d.indexOf(h))&&g.node.isEditable(o)){for(r=g.node.contents(o);o.nodeType!==Node.TEXT_NODE&&!g.node.isDeletable(o)&&r.length&&g.node.isEditable(o);)o=r[r.length-1],r=g.node.contents(o);if(o.nodeType===Node.TEXT_NODE){var i=o.textContent,a=i.length;if(i.length&&"\n"===i[i.length-1])return o.textContent=i.substring(0,a-2),0===o.textContent.length&&o.parentNode.removeChild(o),l(n);g.opts.tabSpaces&&i.length>=g.opts.tabSpaces&&0===i.substr(i.length-g.opts.tabSpaces,i.length-1).replace(/ /g,"").replace(new RegExp(t.UNICODE_NBSP,"g"),"").length&&(a=i.length-g.opts.tabSpaces+1),o.textContent=i.substring(0,a-c(i));var s=o.textContent;(g.opts.enter===t.ENTER_BR&&0<s.length&&" "===s.charAt(s.length-1)||0===s.length&&n.previousSibling&&3===n.previousSibling.nodeType&&"TD"!==n.parentNode.tagName&&"LI"!==n.parentNode.tagName&&i!==String.fromCharCode(8203))&&(n.insertAdjacentHTML("beforebegin",t.INVISIBLE_SPACE),o=o.nextSibling),g.opts.trackChangesEnabled&&0===o.textContent.length&&e(o.parentElement).data("tracking")&&0===e(o.parentElement).find("[data-tracking-deleted=true]").length&&(e(n).insertBefore(o.parentElement),e(o.parentElement).remove(),o=e(n)[0].previousSibling),g.opts.htmlUntouched&&!n.nextSibling&&o.textContent.length&&" "===o.textContent[o.textContent.length-1]&&(o.textContent=o.textContent.substring(0,o.textContent.length-1)+t.UNICODE_NBSP);var f=i.length!==o.textContent.length;if(g.opts.enter!==t.ENTER_BR&&o&&o.previousSibling&&o.previousSibling.previousSibling&&"BR"===o.previousSibling.previousSibling.tagName&&o.previousSibling.previousSibling.remove(),0===o.textContent.length&&"LI"===o.parentNode.tagName&&o.previousSibling&&"BR"===o.previousSibling.tagName&&o.previousSibling.remove(),0===o.textContent.length)if(f&&g.opts.keepFormatOnDelete)e(o).after(t.INVISIBLE_SPACE+t.MARKERS);else if(0!==i.length&&g.node.isBlock(o.parentNode))e(o).after(t.MARKERS);else if((2!=o.parentNode.childNodes.length||o.parentNode!=n.parentNode)&&1!=o.parentNode.childNodes.length||g.node.isBlock(o.parentNode)||g.node.isElement(o.parentNode)||!g.node.isDeletable(o.parentNode)){for(var m,v=o;!g.node.isElement(o.parentNode)&&g.node.isEmpty(o.parentNode)&&t.NO_DELETE_TAGS.indexOf(o.parentNode.tagName)<0;)if("A"===(o=o.parentNode).tagName){var _=o.childNodes[0];for(e(o).before(_),m=!0;0<_.childNodes.length;)_=_.childNodes[0];o.parentNode.removeChild(o),o=_;break}m||(o=v),e(o).after(t.MARKERS),g.node.isElement(o.parentNode)&&!n.nextSibling&&o.previousSibling&&"BR"===o.previousSibling.tagName&&e(n).after("<br>");var p=o.parentNode;o.parentNode.removeChild(o),g.node.isEmpty(p)&&e(p).html(t.INVISIBLE_SPACE+t.MARKERS)}else e(o.parentNode).after(t.MARKERS),e(o.parentNode).remove();else e(o).after(t.MARKERS)}else g.node.isDeletable(o)?(e(o).after(t.MARKERS),e(o).remove()):n.nextSibling&&"BR"===n.nextSibling.tagName&&g.node.isVoid(o)&&"BR"!==o.tagName?(e(n.nextSibling).remove(),e(n).replaceWith(t.MARKERS)):!1!==g.events.trigger("node.remove",[e(o)])&&(e(o).after(t.MARKERS),e(o).remove())}else if(t.NO_DELETE_TAGS.indexOf(o.tagName)<0&&(g.node.isEditable(o)||g.node.isDeletable(o)))if(g.node.isDeletable(o))e(n).replaceWith(t.MARKERS),e(o).remove();else if(g.node.isEmpty(o)&&!g.node.isList(o))e(o).remove(),e(n).replaceWith(t.MARKERS);else{for(g.node.isList(o)&&(o=e(o).find("li").last().get(0)),(r=g.node.contents(o))&&0<r.length&&"BR"===r[r.length-1].tagName&&e(r[r.length-1]).remove(),r=g.node.contents(o);r&&0<r.length&&g.node.isBlock(r[r.length-1]);)o=r[r.length-1],r=g.node.contents(o);e(o).append(t.MARKERS);for(var y=n;!y.previousSibling;)y=y.parentNode;for(;y&&"BR"!==y.tagName&&!g.node.isBlock(y);){var u=y;y=y.nextSibling,e(o).append(u)}y&&"BR"===y.tagName&&e(y).remove(),e(n).remove()}else n.nextSibling&&"BR"===n.nextSibling.tagName&&e(n.nextSibling).remove();return!0}function i(n){var r=0<e(n).parentsUntil(g.$el,"BLOCKQUOTE").length,o=g.node.deepestParent(n,[],!r);if(o&&"BLOCKQUOTE"===o.tagName){var c=g.node.deepestParent(n,[e(n).parentsUntil(g.$el,"BLOCKQUOTE").get(0)]);c&&c.nextSibling&&(o=c)}if(null!==o){var l,i=o.nextSibling;if(g.node.isBlock(o)&&(g.node.isEditable(o)||g.node.isDeletable(o))&&i&&t.NO_DELETE_TAGS.indexOf(i.tagName)<0)if(g.node.isDeletable(i))e(i).remove(),e(n).replaceWith(t.MARKERS);else if(g.node.isBlock(i)&&g.node.isEditable(i))if(g.node.isList(i))if(g.node.isEmpty(o,!0))e(o).remove(),e(i).find("li").first().prepend(t.MARKERS);else{var a=e(i).find("li").first();"BLOCKQUOTE"===o.tagName&&(l=g.node.contents(o)).length&&g.node.isBlock(l[l.length-1])&&(o=l[l.length-1]),0===a.find("ul, ol").length&&(e(n).replaceWith(t.MARKERS),a.find(g.html.blockTagsQuery()).not("ol, ul, table").each((function(){this.parentNode===a.get(0)&&e(this).replaceWith(e(this).html()+(g.node.isEmpty(this)?"":"<br>"))})),e(o).append(g.node.contents(a.get(0))),a.remove(),0===e(i).find("li").length&&e(i).remove())}else{if((l=g.node.contents(i)).length&&"BR"===l[0].tagName&&e(l[0]).remove(),"BLOCKQUOTE"!==i.tagName&&"BLOCKQUOTE"===o.tagName)for(l=g.node.contents(o);l.length&&g.node.isBlock(l[l.length-1]);)o=l[l.length-1],l=g.node.contents(o);else if("BLOCKQUOTE"===i.tagName&&"BLOCKQUOTE"!==o.tagName)for(l=g.node.contents(i);l.length&&g.node.isBlock(l[0]);)i=l[0],l=g.node.contents(i);e(n).replaceWith(t.MARKERS),e(o).append(i.innerHTML),e(i).remove()}else{for(e(n).replaceWith(t.MARKERS);i&&"BR"!==i.tagName&&!g.node.isBlock(i)&&g.node.isEditable(i);){var s=i;i=i.nextSibling,e(o).append(s)}i&&"BR"===i.tagName&&g.node.isEditable(i)&&e(i).remove()}}}function d(r){for(var o,l=r;!l.nextSibling;)if(l=l.parentNode,g.node.isElement(l))return!1;if("BR"===(l=l.nextSibling).tagName&&g.node.isEditable(l))if(l.nextSibling){if(g.node.isBlock(l.nextSibling)&&g.node.isEditable(l.nextSibling)){if(!(t.NO_DELETE_TAGS.indexOf(l.nextSibling.tagName)<0))return void e(l).remove();l=l.nextSibling,e(l.previousSibling).remove()}}else if(n(l))return void(b(r)?g.cursorLists._del(r):g.node.deepestParent(l)&&((!g.node.isEmpty(g.node.blockParent(l))||(g.node.blockParent(l).nextSibling&&t.NO_DELETE_TAGS.indexOf(g.node.blockParent(l).nextSibling.tagName))<0)&&e(l).remove(),l&&l.parentNode&&8203===l.parentNode.textContent.charCodeAt()&&l.parentNode.childNodes[1]&&"BR"===l.parentNode.childNodes[1].tagName&&l.parentNode.tagName.toLowerCase()===g.html.defaultTag()&&l.parentNode.nextSibling&&"TABLE"===l.parentNode.nextSibling.tagName&&e(l.parentNode).remove(),i(r)));if(!g.node.isBlock(l)&&g.node.isEditable(l)){for(o=g.node.contents(l);l.nodeType!==Node.TEXT_NODE&&o.length&&!g.node.isDeletable(l)&&g.node.isEditable(l);)l=o[0],o=g.node.contents(l);l.nodeType===Node.TEXT_NODE?(e(l).before(t.MARKERS),l.textContent.length&&(l.textContent=l.textContent.substring(c(l.textContent,!0),l.textContent.length))):(g.node.isDeletable(l)||!1!==g.events.trigger("node.remove",[e(l)]))&&(e(l).before(t.MARKERS),e(l).remove()),e(r).remove()}else if(t.NO_DELETE_TAGS.indexOf(l.tagName)<0&&(g.node.isEditable(l)||g.node.isDeletable(l)))if(g.node.isDeletable(l))e(r).replaceWith(t.MARKERS),e(l).remove();else if(g.node.isList(l))r.previousSibling?(e(l).find("li").first().prepend(r),g.cursorLists._backspace(r)):(e(l).find("li").first().prepend(t.MARKERS),e(r).remove());else if((o=g.node.contents(l))&&0<o.length&&"BR"===o[0].tagName&&e(o[0]).remove(),o&&0<o.length&&"BLOCKQUOTE"===l.tagName){var d=o[0];for(e(r).before(t.MARKERS);d&&"BR"!==d.tagName;){var h=d;d=d.nextSibling,e(r).before(h)}d&&"BR"===d.tagName&&e(d).remove()}else e(r).after(e(l).html()).after(t.MARKERS),e(l).remove()}function a(){for(var e=g.el.querySelectorAll("blockquote:empty"),t=0;t<e.length;t++)e[t].parentNode.removeChild(e[t])}function h(n,r,c){var l,d=g.node.deepestParent(n,[],!c);if(d&&"BLOCKQUOTE"===d.tagName)return o(n,d)?(l=g.html.defaultTag(),r?e(n).replaceWith("<br>"+t.MARKERS):l?e(d).after("<".concat(l,">").concat(t.MARKERS,"<br></").concat(l,">")):e(d).after("".concat(t.MARKERS,"<br>")),e(n).remove()):f(n,r,c),!1;if(null===d)(l=g.html.defaultTag())&&g.node.isElement(n.parentNode)?e(n).replaceWith("<".concat(l,">").concat(t.MARKERS,"<br></").concat(l,">")):!n.previousSibling||e(n.previousSibling).is("br")||n.nextSibling?e(n).replaceWith("<br>".concat(t.MARKERS)):e(n).replaceWith("<br>".concat(t.MARKERS,"<br>"));else{var i=n,a="";"PRE"!=d.tagName||n.nextSibling||(r=!0),g.node.isBlock(d)&&!r||(a="<br/>");var s,h="",m="",v="",_="";(l=g.html.defaultTag())&&g.node.isBlock(d)&&(v="<".concat(l,">"),_="</".concat(l,">"),d.tagName===l.toUpperCase()&&(v=g.node.openTagString(e(d).clone().removeAttr("id").get(0))));do{if(i=i.parentNode,!r||i!==d||r&&!g.node.isBlock(d))if(h+=g.node.closeTagString(i),i===d&&g.node.isBlock(d))m=v+m;else{var p=("A"===i.tagName||g.node.hasClass(i,"fa"))&&o(n,i)?"fr-to-remove":"";m="isPasted"===i.getAttribute("id")?g.node.openTagString(e(i).clone().attr("style","").addClass(p).get(0))+m:g.node.openTagString(e(i).clone().addClass(p).get(0))+m}}while(i!==d);a=h+a+m+(n.parentNode===d&&g.node.isBlock(d)?"":t.INVISIBLE_SPACE)+t.MARKERS,g.node.isBlock(d)&&!e(d).find("*").last().is("br")&&e(d).append("<br/>"),e(n).after('<span id="fr-break"></span>'),e(n).remove(),d.nextSibling&&!g.node.isBlock(d.nextSibling)||g.node.isBlock(d)||e(d).after("<br>"),s=(s=!r&&g.node.isBlock(d)?g.node.openTagString(d)+e(d).html()+_:g.node.openTagString(d)+e(d).html()+g.node.closeTagString(d)).replace(/<span id="fr-break"><\/span>/g,a),e(d).replaceWith(s)}}function f(n,c,l){var d=g.node.deepestParent(n,[],!l);if(null===d)g.html.defaultTag()&&n.parentNode===g.el?e(n).replaceWith("<".concat(g.html.defaultTag(),">").concat(t.MARKERS,"<br></").concat(g.html.defaultTag(),">")):(n.nextSibling&&!g.node.isBlock(n.nextSibling)||e(n).after("<br>"),e(n).replaceWith("<br>".concat(t.MARKERS)));else if(n.previousSibling&&"IMG"==n.previousSibling.tagName||n.nextSibling&&"IMG"==n.nextSibling.tagName)e(n).replaceWith("<"+g.html.defaultTag()+">"+t.MARKERS+"<br></"+g.html.defaultTag()+">");else{var h=n,i="";"PRE"===d.tagName&&(c=!0),g.node.isBlock(d)&&!c||(i="<br>");var a="",s="";do{var f=h;if(h=h.parentNode,"BLOCKQUOTE"===d.tagName&&g.node.isEmpty(f)&&!g.node.hasClass(f,"fr-marker")&&e(f).contains(n)&&e(f).after(n),"BLOCKQUOTE"!==d.tagName||!o(n,h)&&!r(n,h))if(!c||h!==d||c&&!g.node.isBlock(d)){a+=g.node.closeTagString(h);var m="A"==h.tagName&&o(n,h)||g.node.hasClass(h,"fa")?"fr-to-remove":"";s=g.node.openTagString(e(h).clone().addClass(m).removeAttr("id").get(0))+s,g.opts.enter!==t.ENTER_DIV&&h===d&&"DIV"===d.tagName&&(a="<br>",s="")}else"BLOCKQUOTE"==d.tagName&&c&&(s=a="")}while(h!==d);var v=d===n.parentNode&&g.node.isBlock(d)||n.nextSibling;if("BLOCKQUOTE"===d.tagName)if(n.previousSibling&&g.node.isBlock(n.previousSibling)&&n.nextSibling&&"BR"===n.nextSibling.tagName&&(e(n.nextSibling).after(n),n.nextSibling&&"BR"===n.nextSibling.tagName&&e(n.nextSibling).remove()),c)i=a+i+t.MARKERS+s;else{var _=g.html.defaultTag();i="".concat(a+i+(_?"<".concat(_,">"):"")+t.MARKERS,"<br>").concat(_?"</".concat(_,">"):"").concat(s)}else i=a+i+s+(v?"":t.INVISIBLE_SPACE)+t.MARKERS;e(n).replaceWith('<span id="fr-break"></span>');var p=g.node.openTagString(d)+e(d).html()+g.node.closeTagString(d);p=p.replace(/<span id="fr-break"><\/span>/g,i),e(d).replaceWith(p)}}function m(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}function v(){var e=g.selection.get(),t=null;if(g.selection.inEditor()&&e.rangeCount)for(var n=g.selection.ranges(),r=0;r<n.length;r++){var o=n[r];t=g.selection.rangeElement(o.startContainer,o.startOffset);break}return t}return{enter:function(c){var l=g.markers.insert();if(!l)return!0;for(var d=l.parentNode;d&&!g.node.isElement(d);){if("false"===d.getAttribute("contenteditable"))return e(l).replaceWith(t.MARKERS),g.selection.restore(),!1;if("true"===d.getAttribute("contenteditable"))break;d=d.parentNode}g.el.normalize();var _=!1;0<e(l).parentsUntil(g.$el,"BLOCKQUOTE").length&&(_=!0),e(l).parentsUntil(g.$el,"TD, TH").length&&(_=!1),n(l)?!b(l)||c||_?h(l,c,_):g.cursorLists._endEnter(l):u(l)?!b(l)||c||_?function n(c,l,d){var m,v=g.node.deepestParent(c,[],!d);if(v&&"TABLE"===v.tagName)return e(v).find("td, th").first().prepend(c),n(c,l,d);if(v&&"BLOCKQUOTE"===v.tagName)if(r(c,v)){if(!l)return(m=g.html.defaultTag())?e(v).before("<".concat(m,">").concat(t.MARKERS,"<br></").concat(m,">")):e(v).before("".concat(t.MARKERS,"<br>")),e(c).remove(),!1}else o(c,v)?h(c,l,!0):f(c,l,!0);if(null===v)(m=g.html.defaultTag())&&g.node.isElement(c.parentNode)?e(c).replaceWith("<".concat(m,">").concat(t.MARKERS,"<br></").concat(m,">")):e(c).replaceWith("<br>".concat(t.MARKERS));else{if(m=g.html.defaultTag(),g.node.isBlock(v))if("PRE"===v.tagName&&(l=!0),l)e(c).remove(),e(v).prepend("<br>".concat(t.MARKERS));else if(c.nextSibling&&"IMG"==c.nextSibling.tagName||c.nextSibling&&c.nextSibling.nextElementSibling&&"IMG"==c.nextSibling.nextElementSibling)e(c).replaceWith("<"+g.html.defaultTag()+">"+t.MARKERS+"<br></"+g.html.defaultTag()+">");else{if(g.node.isEmpty(v,!0))return h(c,l,d);if(g.opts.keepFormatOnDelete||"DIV"===v.tagName||"div"===g.html.defaultTag())if(!g.opts.keepFormatOnDelete&&"DIV"===v.tagName||"div"===g.html.defaultTag())e(v).before("<"+g.html.defaultTag()+"><br></"+g.html.defaultTag()+">");else if(g.opts.keepFormatOnDelete&&"DIV"!==v.tagName&&"div"!==g.html.defaultTag()&&u(g.selection.get().focusNode))e(v).before("".concat(g.node.openTagString(e(v).clone().removeAttr("id").get(0)),"<br>").concat(g.node.closeTagString(v)));else{for(var i=c,a=t.INVISIBLE_SPACE;i!==v&&!g.node.isElement(i);)i=i.parentNode,a=g.node.openTagString(i)+a+g.node.closeTagString(i);e(v).before(a)}else e(v).before("".concat(g.node.openTagString(e(v).clone().removeAttr("id").get(0)),"<br>").concat(g.node.closeTagString(v)))}else e(v).before("<br>");e(c).remove()}}(l,c,_):g.cursorLists._startEnter(l):!b(l)||c||_?f(l,c,_):g.cursorLists._middleEnter(l),g.$el.find(".fr-to-remove").each((function(){for(var t=g.node.contents(this),n=0;n<t.length;n++)t[n].nodeType===Node.TEXT_NODE&&(t[n].textContent=t[n].textContent.replace(/\u200B/g,""));e(this).replaceWith(this.innerHTML)})),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists(),g.spaces.normalizeAroundCursor()),g.selection.restore();var y=g.o_win.innerHeight;if(g.$oel[0].offsetHeight>y){var i=v();if(i){var a=m(i);a=a.top;var s=i.getBoundingClientRect().top;g.opts.scrollableContainer&&g.opts.enter!==t.ENTER_BR&&"BR"===i.tagName&&(s=a=i.parentNode.offsetTop),i.parentNode&&"TD"===i.parentNode.tagName&&y<s?g.o_win.scroll(0,s-50):s<0?g.o_win.scroll(0,a-80):!g.opts.scrollableContainer&&y<s+20?g.o_win.scroll(0,a-y+50):g.opts.scrollableContainer&&s+2*g.$tb.height()>g.$sc[0].scrollTop+e(g.$sc).height()&&g.$sc[0].scroll(0,a-e(g.$sc).height()+2*g.$tb.height())}}else if(g.opts.scrollableContainer&&g.opts.toolbarSticky){var E=v();if(E){var C=m(E);C=C.top;var w=E.getBoundingClientRect().top;g.opts.enter!==t.ENTER_BR&&"BR"===E.tagName&&(w=C=E.parentNode.offsetTop),(g.opts.iframe&&w+2*g.$tb.height()>g.$sc[0].scrollTop+e(g.$sc).height()||w+2*g.$tb.height()>e(g.$sc).height())&&g.$sc[0].scroll(0,C-e(g.$sc).height()+2*g.$tb.height())}}},backspace:function(){var o=!1,d=g.markers.insert();if(!d)return!0;for(var h=d.parentNode;h&&!g.node.isElement(h);){if("false"===h.getAttribute("contenteditable"))return e(d).replaceWith(t.MARKERS),g.selection.restore(),!1;if(h.innerText.length&&"true"===h.getAttribute("contenteditable"))break;h=h.parentNode}g.el.normalize();var f=d.previousSibling;if(f){var m=f.textContent;m&&m.length&&8203===m.charCodeAt(m.length-1)&&(1===m.length?e(f).remove():f.textContent=f.textContent.substr(0,m.length-c(m)))}return n(d)?b(d)&&r(d,e(d).parents("li").first().get(0))?g.cursorLists._backspace(d):o=l(d):u(d)?b(d)&&r(d,e(d).parents("li").first().get(0))?g.cursorLists._backspace(d):function(n){for(var r=0<e(n).parentsUntil(g.$el,"BLOCKQUOTE").length,o=g.node.deepestParent(n,[],!r),c=o;o&&!o.previousSibling&&"BLOCKQUOTE"!==o.tagName&&o.parentElement!==g.el&&!g.node.hasClass(o.parentElement,"fr-inner")&&t.SIMPLE_ENTER_TAGS.indexOf(o.parentElement.tagName)<0;)o=o.parentElement;if(o&&"BLOCKQUOTE"===o.tagName){var l=g.node.deepestParent(n,[e(n).parentsUntil(g.$el,"BLOCKQUOTE").get(0)]);l&&l.previousSibling&&(c=o=l)}if(null!==o){var i,a=o.previousSibling;if(g.node.isBlock(o)&&g.node.isEditable(o))if(a&&t.NO_DELETE_TAGS.indexOf(a.tagName)<0){if(g.node.isDeletable(a))e(a).remove(),e(n).replaceWith(t.MARKERS);else if(g.node.isEditable(a))if(g.node.isBlock(a))if(g.node.isEmpty(a)&&!g.node.isList(a))e(a).remove(),e(n).after(g.opts.keepFormatOnDelete?t.INVISIBLE_SPACE:"");else{if(g.node.isList(a)&&(a=e(a).find("li").last().get(0)),(i=g.node.contents(a)).length&&"BR"===i[i.length-1].tagName&&e(i[i.length-1]).remove(),"BLOCKQUOTE"===a.tagName&&"BLOCKQUOTE"!==o.tagName)for(i=g.node.contents(a);i.length&&g.node.isBlock(i[i.length-1]);)a=i[i.length-1],i=g.node.contents(a);else if("BLOCKQUOTE"!==a.tagName&&"BLOCKQUOTE"===c.tagName)for(i=g.node.contents(c);i.length&&g.node.isBlock(i[0]);)c=i[0],i=g.node.contents(c);if(g.node.isEmpty(o))e(n).remove(),g.selection.setAtEnd(a,!0);else{e(n).replaceWith(t.MARKERS);var s=a.childNodes;g.node.isBlock(s[s.length-1])?e(s[s.length-1]).append(c.innerHTML):e(a).append(c.innerHTML)}e(c).remove(),g.node.isEmpty(o)&&e(o).remove()}else e(n).replaceWith(t.MARKERS),"BLOCKQUOTE"===o.tagName&&a.nodeType===Node.ELEMENT_NODE?e(a).remove():(e(a).after(g.node.isEmpty(o)?"":e(o).html()),e(o).remove(),"BR"===a.tagName&&e(a).remove())}else if(a)8203===o.textContent.charCodeAt()&&o.childNodes[1]&&"BR"===o.childNodes[1].tagName&&o.tagName.toLowerCase()===g.html.defaultTag()&&o.previousSibling&&"TABLE"===o.previousSibling.tagName&&e(o).remove();else if(o&&"BLOCKQUOTE"===o.tagName&&0===e(o).text().replace(/\u200B/g,"").length)e(o).remove();else{var d=o.nextSibling;g.node.isEmpty(o)&&o.parentNode&&g.node.isEditable(o.parentNode)&&!d&&(o.parentNode!=g.el&&"TD"!==o.parentNode.tagName?e(o.parentNode).remove():o.parentNode!=g.el&&"TD"===o.parentNode.tagName&&e(o).remove())}}}(d):o=l(d),e(d).remove(),a(),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists(),g.spaces.normalizeAroundCursor()),g.selection.restore(),o},del:function(){var t=g.markers.insert();if(!t)return!1;if(g.el.normalize(),n(t))if(b(t))if(0===e(t).parents("li").first().find("ul, ol").length)g.cursorLists._del(t);else{var r=e(t).parents("li").first().find("ul, ol").first().find("li").first();(r=r.find(g.html.blockTagsQuery()).get(-1)||r).prepend(t),g.cursorLists._backspace(t)}else i(t);else u(t),d(t);e(t).remove(),a(),g.html.fillEmptyBlocks(!0),g.opts.htmlUntouched||(g.html.cleanEmptyTags(),g.clean.lists()),g.spaces.normalizeAroundCursor(),g.selection.restore()},isAtEnd:o,isAtStart:r}},t.MODULES.data=function(e){function p(e){return e}function t(e){for(var t=e.toString(),n=0,r=0;r<t.length;r++)n+=parseInt(t.charAt(r),10);return 10<n?n%9+1:n}function n(e,t,n){for(var r=Math.abs(n);0<r--;)e-=t;return n<0&&(e+=123),e}function r(t){return t&&"block"!==t.css("display")||t&&0===e.helpers.getPX(t.css("height"))?(t.remove(),!0):!(!t||"absolute"!==t.css("position")&&"fixed"!==t.css("position")||(t.remove(),0))}function u(t){return t&&0===e.$box.find(t).length}function g(){if(10<C&&(e[p(E("0ppecjvc=="))](),setTimeout((function(){d.FE=null}),10)),!e.$box)return!1;e.$wp.prepend(E(p(E(_)))),l=e.$wp.find("> div").first(),b=l.find("> a"),"rtl"===e.opts.direction&&l.css("left","auto").css("right",0).attr("direction","rtl"),C++}function o(e){for(var t=[E("9qqG-7amjlwq=="),E("KA3B3C2A6D1D5H5H1A3=="),E("3B9B3B5F3C4G3E3=="),E("QzbzvxyB2yA-9m=="),E("ji1kacwmgG5bc=="),E("nmA-13aogi1A3c1jd=="),E("BA9ggq=="),E("emznbjbH3fij=="),E("tkC-22d1qC-13sD1wzF-7=="),E("tA3jjf=="),E("1D1brkm==")],n=0;n<t.length;n++)if(String.prototype.endsWith||(String.prototype.endsWith=function(e,t){return(void 0===t||t>this.length)&&(t=this.length),this.substring(t-e.length,t)===e}),e.endsWith(t[n]))return!0;return!1}function c(){var e=E(p(m)),t=E(p("tzgatD-13eD1dtdrvmF3c1nrC-7saQcdav==")).split(".");try{return window.parent.document.querySelector(e)&&window[t[1]][t[2]]}catch(e){return!1}}var l,b,d=e.$,h="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2FC1A3NB2IF1HE1TH4WB8eB-11zVG2F3I3yYB5ZG4CB2DA15CC5AD3F1A1KG1oLA10B1A6wQF1H3vgale2C4F4XA2qc2A5D5B3pepmriKB3OE1HD1fUC10pjD-11E-11TB4YJ3bC-16zE-11yc1B2CE2BC3jhjKC1pdA-21OA6C1D5B-8vF4QA11pD6sqf1C3lldA-16BD4A2H3qoEA7bB-16rmNH5H1F1vSB7RE2A3TH4YC5A5b1A4d1B3whepyAC3AA2zknC3mbgf1SC4WH4PD8TC5ZB2C3H3jb2A5ZA2EF2aoFC5qqHC4B1H1zeGA7UA5RF4TA29TA6ZC4d1C3hyWA10A3rBB2E3decorationRD3QC10UD3E6E6ZD2F3F3fme2E5uxxrEC9C3E4fB-11azhHB1LD7D6VF4VVTPC6b1C4TYG3qzDD6B3B3AH4I2H2kxbHE1JD1yihfd1QD6WB1D4mhrc1B5rvFG3A14A7cDA2OC1AA1JB5zC-16KA6WB4C-8wvlTB5A5lkZB2C2C7zynBD2D2bI-7C-21d1HE2cubyvPC8A6VB3aroxxZE4C4F4e1I2BE1WjdifH1H4A14NA1GB1YG-10tWA3A14A9sVA2C5XH2A29b2A6gsleGG2jaED2D-13fhE1OA8NjwytyTD4e1sc1D-16ZC3B5C-9e1C2FB6EFF5B2C2JH4E1C2tdLE5A3UG4G-7b2D3B4fA-9oh1G3kqvB4AG3ibnjcAC6D2B1cDA9KC2QA6bRC4VA30RB8hYB2A4A-8h1A21A2B2==",f="7D4YH4fkhHB3pqDC3H2E1fkMD1IB1NF1D3QD9wB5rxqlh1A8c2B4ZA3FD2AA6FB5EB3jJG4D2J-7aC-21GB6PC5RE4TC11QD6XC4XE3XH3mlvnqjbaOA2OC2BE6A1fmI-7ujwbc1G5f1F3e1C11mXF4owBG3E1yD1E4F1D2D-8B-8C-7yC-22HD1MF5UE4cWA3D8D6a1B2C3H3a3I3sZA4B3A2akfwEB3xHD5D1F1wIC11pA-16xdxtVI2C9A6YC4a1A2F3B2GA6B4C3lsjyJB1eMA1D-11MF5PE4ja1D3D7byrf1C3e1C7D-16lwqAF3H2A1B-21wNE1MA1OG1HB2A-16tSE5UD4RB3icRA4F-10wtwzBB3E1C3CC2DA8LA2LA1EB1kdH-8uVB7decorg1J2B7B6qjrqGI2J1C6ijehIB1hkemC-13hqkrH4H-7QD6XF5XF3HLNAC3CB2aD2CD2KB10B4ycg1A-8KA4H4B11jVB5TC4yqpB-21pd1E4pedzGB6MD5B3ncB-7MA4LD2JB6PD5uH-8TB9C7YD5XD2E3I3jmiDB3zeimhLD8E2F2JC1H-9ivkPC5lG-10SB1D3H3A-21rc1A3d1E3fsdqwfGA2KA1OrC-22LA6D1B4afUB16SC7AitC-8qYA11fsxcajGA15avjNE2A-9h1hDB16B9tPC1C5F5UC1G3B8d2A5d1D4RnHJ3C3JB5D3ucMG1yzD-17hafjC-8VD3yWC6e1YD2H3ZE2C8C5oBA3H3D2vFA4WzJC4C2i1A-65fNB8afWA1H4A26mvkC-13ZB3E3h1A21BC4eFB2GD2AA5ghqND2A2B2==",m="MekC-11nB-8tIzpD7pewxvzC6mD-16xerg1==",v="lC4B3A3B2B5A1C2E4G1A2==",_="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==",y=function(){for(var e=0,t=document.domain,n=t.split("."),r="_gd".concat((new Date).getTime());e<n.length-1&&-1===document.cookie.indexOf("".concat(r,"=").concat(r));)t=n.slice(-1-++e).join("."),document.cookie="".concat(r,"=").concat(r,";domain=").concat(t,";");return document.cookie="".concat(r,"=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain=").concat(t,";"),(t||"").replace(/(^\.*)|(\.*$)/g,"")}(),E=p((function(e){if(!e)return e;for(var r="",o=p("charCodeAt"),c=p("fromCharCode"),l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".indexOf(e[0]),i=1;i<e.length-2;i++){for(var a=t(++l),s=e[o](i),d="";/[0-9-]/.test(e[i+1]);)d+=e[++i];s=n(s,a,d=parseInt(d,10)||0),s^=l-1&31,r+=String[c](s)}return r})),C=0;return{_init:function(){var t=e.opts.key||[""],n=E(p("ziRA1E3B9pA5B-11D-11xg1A3ZB5D1D4B-11ED2EG2pdeoC1clIH4wB-22yQD5uF4YE3E3A9=="));"string"==typeof t&&(t=[t]);for(var m,C,w,i=!(e.ul=!0),a=0,s=0;s<t.length;s++){var S=(C=t[s],4===(w=(E(C)||"").split("|")).length&&"V3"===w[0]?[w[1],w[3],w[2]]:[null,null,""]),T=S[2];if(T===E(p(E("LGnD1KNZf1CPBYCAZB-8F3UDSLLSG1VFf1A3C2==")))||0<=T.indexOf(y,T.length-y.length)||o(y)||c()){if(null!==(m=S[1])&&!(0==m.indexOf("TRIAL")?(m=new Date(m.replace(/TRIAL/,"")),new Date(m)<new Date&&(h=f,1)):new Date(m)<new Date(E(v)))||!(0<(y||"").length)||o(y)||c()){e.ul=!1;break}i=!0,_=h,a=S[0]||-1}}var A=new Image;!0===e.ul&&(g(),A.src=i?"".concat(p(E(n)),"e=").concat(a):"".concat(p(E(n)),"u")),!0===e.ul&&(e.events.on("contentChanged",(function(){(r(l)||r(b)||u(l)||u(b))&&g()})),e.events.on("html.get",(function(e){return e+E("qD2H-9G3ioD-17qA1tE1B-8qI3A4hA-13C-11E2C1njfldD1E6pg1C-8sC3hfbkcD2G3stC-22gqgB3G2B-7vtoA4nweeD1A31A15B9uC-16A1F5dkykdc1B8dE-11bA3F2D3A9gd1E7F2tlI-8H-7vtxB2A5B2C3B2F2B5A6ldbyC4iqC-22D-17E-13mA3D2dywiB3oxlvfC1H4C2TjqbzlnI3ntB4E3qA2zaqsC6D3pmnkoE3C6D5wvuE3bwifdhB6hch1E4xibD-17dmrC1rG-7pntnF6nB-8F1D2A11C8plrkmF2F3MC-16bocqA2WwA-21ayeA1C4d1isC-22rD-13D6DfjpjtC2E6hB2G2G4A-7D2==")}))),e.events.on("html.set",(function(){var t=e.el.querySelector('[data-f-id="pbf"]');t&&d(t).remove()})),e.events.on("destroy",(function(){l&&l.length&&l.remove()}),!0)}}},t.MODULES.edit=function(e){function t(){if(e.browser.mozilla)try{e.doc.execCommand("enableObjectResizing",!1,"false"),e.doc.execCommand("enableInlineTableEditing",!1,"false")}catch(e){}if(e.browser.msie)try{e.doc.body.addEventListener("mscontrolselect",(function(e){return e.srcElement.focus(),!1}))}catch(e){}}var n=!1;function r(){return n}return{_init:function(){e.events.on("focus",(function(){r()?e.edit.off():e.edit.on()}))},on:function(){e.$wp?(e.$el.attr("contenteditable",!0),e.$el.removeClass("fr-disabled").attr("aria-disabled",!1),t()):e.$el.is("a")&&e.$el.attr("contenteditable",!0),e.events.trigger("edit.on",[],!0),n=!1},off:function(){e.events.disableBlur(),e.$wp?(e.$el.attr("contenteditable",!1),e.$el.addClass("fr-disabled").attr("aria-disabled",!0)):e.$el.is("a")&&e.$el.attr("contenteditable",!1),e.events.trigger("edit.off"),e.events.enableBlur(),n=!0},disableDesign:t,isDisabled:r}},t.MODULES.format=function(e){var n=e.$;function r(e,t){var n=e;for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n+="id"===r?"#".concat(t[r]):"class"===r?".".concat(t[r]):"[".concat(r,'="').concat(t[r],'"]'));return n}function o(e,t){return!(!e||e.nodeType!==Node.ELEMENT_NODE)&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}function c(t,r,o){var l,d,i,a={strong:{prop:"font-weight",val:"bold"},em:{prop:"font-style",val:"italic"}};if(t){if(e.node.isBlock(t)&&t.hasAttribute("contenteditable")&&"false"===t.getAttribute("contenteditable")||t.parentNode&&t.parentNode.hasAttribute("contenteditable")&&"false"===t.parentNode.getAttribute("contenteditable")){if(t.nextSibling&&n(t.nextSibling).hasClass("fr-marker"))return;if(t.nextSibling)return void c(t.nextSibling,r,o);if(t.parentNode&&e.node.isEditable(t.parentNode))return void c(t.parentNode,r,o)}for(;t&&t.nodeType===Node.COMMENT_NODE;)t=t.nextSibling;if(t){if(e.node.isBlock(t)&&"HR"!==t.tagName&&"LI"!==t.tagName)return e.node.hasClass(t.firstChild,"fr-marker")?c(t.firstChild.nextSibling,r,o):c(t.firstChild,r,o),!1;var s=n(e.doc.createElement(r));s.attr(o),s.insertBefore(t),(l=b(t))&&(0<=["strong","em"].indexOf(r)||"span"===r&&o.hasOwnProperty("style"))&&(i="span"===r?(d=(a=o.style.replace(/;$/,"").split(":"))[0].trim(),a[1].trim()):(d=a[r].prop,a[r].val),"background-color"!==d&&(n(l).css(d,i),function(e,t){var r,o=e.childNodes;for(r=0;r<o.length;r++)0<=["UL","OL","LI"].indexOf(o[r].tagName)&&""===o[r].style[t]&&n(o[r]).css(t,"initial")}(l,d)));for(var h=t;h&&!n(h).hasClass("fr-marker")&&0===n(h).find(".fr-marker").length&&"UL"!==h.tagName&&"OL"!==h.tagName;){var f=h;if("SPAN"===h.tagName&&n(h).hasClass("fr-tracking-deleted"))h=h.nextSibling;else{if(e.node.isBlock(h)&&"HR"!==t.tagName)return c(h.firstChild,r,o),!1;if("SPAN"===h.tagName&&e.node.isEditable(h))return c(h.firstChild,r,o),!1;if(h.tagName&&h.hasAttribute("contenteditable")&&"false"===h.getAttribute("contenteditable"))return void c(h.nextSibling,r,o);if(!e.node.isEditable(h.parentNode))return e.selection.restore(),void e.toolbar.disable();h=h.nextSibling,s.append(f)}}if(h)(n(h).find(".fr-marker").length||"UL"===h.tagName||"OL"===h.tagName)&&c(h.firstChild,r,o);else{for(var m=s.get(0).parentNode;m&&!m.nextSibling&&!e.node.isElement(m);)m=m.parentNode;if(m){var v=m.nextSibling;v&&(e.node.isBlock(v)?"HR"===v.tagName?c(v.nextSibling,r,o):c(v.firstChild,r,o):c(v,r,o))}}s.is(":empty")&&s.remove()}}}function l(l,d){var h;if(void 0===d&&(d={}),d.style&&delete d.style,e.selection.isCollapsed()){e.markers.insert();var f=e.$el.find(".fr-marker");f.get(0).nextSibling&&e.node.isBlock(f.get(0).nextSibling)&&!f.get(0).previousSibling&&"LI"===f.get(0).parentNode.tagName&&f.get(0).nextSibling.prepend(f.get(0)),f.replaceWith(function(e,t){var n="<".concat(e);for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(n+=" ".concat(r,'="').concat(t[r],'"'));return n+">"}(l,d)+t.INVISIBLE_SPACE+t.MARKERS+function(e){return"</".concat(e,">")}(l)),e.selection.restore()}else{var m;e.selection.save(),c(e.$el.find('.fr-marker[data-type="true"]').length&&e.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling,l,d);do{for(m=e.$el.find("".concat(r(l,d)," > ").concat(r(l,d))),h=0;h<m.length;h++)m[h].outerHTML=m[h].innerHTML}while(m.length);e.el.normalize();var i=e.el.querySelectorAll(".fr-marker");for(h=0;h<i.length;h++){var a=n(i[h]);!0===a.data("type")?o(a.get(0).nextSibling,r(l,d))&&a.next().prepend(a):o(a.get(0).previousSibling,r(l,d))&&a.prev().append(a)}e.selection.restore()}}function d(t,n,c,l){if(!l){var d=!1;if(!0===t.data("type"))for(;e.node.isFirstSibling(t.get(0))&&!t.parent().is(e.$el)&&!t.parent().is("ol")&&!t.parent().is("ul");)t.parent().before(t),d=!0;else if(!1===t.data("type"))for(;e.node.isLastSibling(t.get(0))&&!t.parent().is(e.$el)&&!t.parent().is("ol")&&!t.parent().is("ul");)t.parent().after(t),d=!0;if(d)return!0}if(t.parents(n).length||void 0===n){var i,a="",s="",h=t.parent();if(h.is(e.$el)||e.node.isBlock(h.get(0)))return!1;for(;!(e.node.isBlock(h.parent().get(0))||void 0!==n&&o(h.get(0),r(n,c)));)a+=e.node.closeTagString(h.get(0)),s=e.node.openTagString(h.get(0))+s,h=h.parent();var f=t.get(0).outerHTML;return t.replaceWith('<span id="mark"></span>'),i=h.html().replace(/<span id="mark"><\/span>/,a+e.node.closeTagString(h.get(0))+s+f+a+e.node.openTagString(h.get(0))+s),h.replaceWith(e.node.openTagString(h.get(0))+i+e.node.closeTagString(h.get(0))),!0}return!1}function h(c,l){void 0===l&&(l={}),l.style&&delete l.style;var h=e.selection.isCollapsed();e.selection.save();for(var f=!0;f;){f=!1;for(var m=e.$el.find(".fr-marker"),i=0;i<m.length;i++){var a=n(m[i]),s=null;if(a.attr("data-cloned")||h||(s=a.clone().removeClass("fr-marker").addClass("fr-clone"),a.data("type")&&"true"===a.data("type").toString()?a.attr("data-cloned",!0).after(s):a.attr("data-cloned",!0).before(s)),d(a,c,l,h)){f=!0;break}}}!function t(c,l,d,h){for(var f,i={strong:{prop:"font-weight",val:"bold"},em:{prop:"font-style",val:"italic"}},a=e.node.contents(c.get(0)),s=0;s<a.length;s++){var m=a[s];if(m.innerHTML&&8203==m.innerHTML.charCodeAt()&&m.tagName.toLocaleLowerCase()==d&&m.childNodes.length<2&&!e.helpers.isMobile()&&(m.outerHTML=m.innerHTML),e.node.hasClass(m,"fr-marker"))l=(l+1)%2;else if(l)if(0<n(m).find(".fr-marker").length)l=t(n(m),l,d,h);else{(f="LI"===m.tagName?m:n(m).parentsUntil(e.$el,"li").get(0))&&(void 0===d||0<=["strong","em"].indexOf(d))&&(d?n(f).css(i[d].prop,""):f.style=""),(f=m.parentNode!==e.el?m.parentNode:null)&&1===f.nodeType&&"a"!==d&&f.hasAttribute("style")&&"SPAN"!==f.tagName&&"LI"!==f.tagName?f.style="":m&&1===m.nodeType&&"a"!==d&&m.hasAttribute("style")&&(m.style="");for(var v=n(m).find(d||"*:not(br)"),_=v.length-1;0<=_;_--){var y=v[_];(f="LI"===y.tagName?y:n(y).parentsUntil(e.$el,"li").get(0))&&(!d||0<=["strong","em"].indexOf(d))&&(d?n(f).css(i[d].prop,""):f.style=""),e.node.isBlock(y)||e.node.isVoid(y)||void 0!==d&&!o(y,r(d,h))?e.node.isBlock(y)&&void 0===d&&"TABLE"!==m.tagName&&e.node.clearAttributes(y):e.node.hasClass(y,"fr-clone")||e.node.hasClass(y,"fr-tracking-deleted")||n(y).data("tracking")||(y.outerHTML=y.innerHTML)}void 0===d&&m.nodeType===Node.ELEMENT_NODE&&!e.node.isVoid(m)||o(m,r(d,h))?e.node.isBlock(m)||(e.node.hasClass(m,"fr-clone")||e.opts.trackChangesEnabled?!e.node.hasClass(m,"fr-clone")&&e.opts.trackChangesEnabled&&m.parentNode&&(m.outerHTML=m.innerHTML):m.outerHTML=m.innerHTML):void 0===d&&m.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(m)&&"TABLE"!==m.tagName&&e.node.clearAttributes(m)}else 0<n(m).find(".fr-marker").length&&(l=t(n(m),l,d,h))}return l}(e.$el,0,c,l),h||(e.$el.find(".fr-marker").remove(),e.$el.find(".fr-clone").removeClass("fr-clone").addClass("fr-marker")),h&&e.$el.find(".fr-marker").before(t.INVISIBLE_SPACE).after(t.INVISIBLE_SPACE),e.html.cleanEmptyTags(),e.el.normalize(),e.selection.restore();var v=e.win.getSelection()&&e.win.getSelection().anchorNode;if(v){var _=e.node.blockParent(v),y=!!v.textContent.replace(/\u200B/g,"").length,E=e.win.getSelection().getRangeAt(0),p=E.startOffset,C=E.endOffset;e.selection.text().replace(/\u200B/g,"").length||function e(t,n){if(t&&n){if(t.isSameNode(n)?t.textContent=t.textContent.replace(/\u200B(?=.*\u200B)/g,""):t.nodeType===Node.TEXT_NODE&&(t.textContent=t.textContent.replace(/\u200B/g,"")),!t.childNodes.length)return!1;Array.isArray(t.childNodes)&&t.childNodes.forEach((function(t){e(t,n)}))}}(_,v);var u=e.win.getSelection().getRangeAt(0);if(v.nodeType===Node.TEXT_NODE){if(!y||!e.selection.text().length&&p===C){var g=v.textContent.search(/\u200B/g)+1;if(e.browser.msie){var w=e.doc.createRange();e.selection.get().removeAllRanges(),w.setStart(v,g),w.setEnd(v,g),e.selection.get().addRange(w)}else u.setStart(v,g),u.setEnd(v,g)}}else{var S,T,b=0,A=n(v).contents();if(e.browser.msie){for(;T=A[b];)T.nodeType===Node.TEXT_NODE&&0<=T.textContent.search(/\u200B/g)&&(S=T),b++;S=n(S)}else S=A.filter((function(e){return e.nodeType===Node.TEXT_NODE&&0<=e.textContent.search(/\u200B/g)}));if(S.length&&!e.opts.trackChangesEnabled){var R=S.text().search(/\u200B/g)+1;u.setStart(S.get(0),R),u.setEnd(S.get(0),R)}}}}function f(r,o){var l,h,f,i,a,s,v,_=null;if(e.selection.isCollapsed()){e.markers.insert();var y=(h=e.$el.find(".fr-marker")).parent();if(e.node.openTagString(y.get(0))==='<span style="'.concat(r,": ").concat(y.css(r),';">')){if(e.node.isEmpty(y.get(0)))_=n(e.doc.createElement("span")).attr("style","".concat(r,": ").concat(o,";")).html("".concat(t.INVISIBLE_SPACE).concat(t.MARKERS)),y.replaceWith(_);else{var E={};E["style*"]="".concat(r,":"),d(h,"span",E,!0),h=e.$el.find(".fr-marker"),o?(_=n(e.doc.createElement("span")).attr("style","".concat(r,": ").concat(o,";")).html("".concat(t.INVISIBLE_SPACE).concat(t.MARKERS)),h.replaceWith(_)):h.replaceWith(t.INVISIBLE_SPACE+t.MARKERS)}e.html.cleanEmptyTags()}else e.node.isEmpty(y.get(0))&&y.is("span")?(h.replaceWith(t.MARKERS),y.css(r,o)):(h.get(0).nextSibling&&e.node.isBlock(h.get(0).nextSibling)&&!h.get(0).previousSibling&&"LI"===h.get(0).parentNode.tagName&&h.get(0).nextSibling.prepend(h.get(0)),_=n('<span style="'.concat(r,": ").concat(o,';">').concat(t.INVISIBLE_SPACE).concat(t.MARKERS,"</span>")),h.replaceWith(_));_&&m(_,r,o)}else{if(e.selection.save(),null===o||"color"===r&&0<e.$el.find(".fr-marker").parents("u, a").length){var p=e.$el.find(".fr-marker");for(l=0;l<p.length;l++)if(!0===(h=n(p[l])).data("type")||"true"===h.data("type"))for(;e.node.isFirstSibling(h.get(0))&&!h.parent().is(e.$el)&&!e.node.isElement(h.parent().get(0))&&!e.node.isBlock(h.parent().get(0));)h.parent().before(h);else for(;e.node.isLastSibling(h.get(0))&&!h.parent().is(e.$el)&&!e.node.isElement(h.parent().get(0))&&!e.node.isBlock(h.parent().get(0));)h.parent().after(h)}for(var C=e.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling;C.firstChild;)C=C.firstChild;var u={class:"fr-unprocessed"};for(o&&(u.style="".concat(r,": ").concat(o,";")),c(C,"span",u),e.$el.find(".fr-marker + .fr-unprocessed").each((function(){n(this).prepend(n(this).prev())})),e.$el.find(".fr-unprocessed + .fr-marker").each((function(){n(this).prev().append(n(this))})),(o||"").match(/\dem$/)&&e.$el.find("span.fr-unprocessed").removeClass("fr-unprocessed");0<e.$el.find("span.fr-unprocessed").length;){if(f=b(_=e.$el.find("span.fr-unprocessed").first().removeClass("fr-unprocessed")),_.parent().get(0).normalize(),_.parent().is("span")&&1===_.parent().get(0).childNodes.length){var g=o;e.browser.msie&&!o&&(g=""),_.parent().css(r,g);var w=_;_=_.parent(),w.replaceWith(w.html())}for(i=_.find("span"),f&&"background-color"!==r&&(f.normalize(),i=n(f).find("span:not(.fr-unprocessed)")),l=i.length-1;0<=l;l--)a=i[l],s=r,v=void 0,(v=n(a)).css(s,""),""===v.attr("style")&&v.replaceWith(v.html());m(_,r,o)}}!function(){for(var t;0<e.$el.find(".fr-split:empty").length;)e.$el.find(".fr-split:empty").remove();e.$el.find(".fr-split").removeClass("fr-split"),e.$el.find('[style=""]').removeAttr("style"),e.$el.find('[class=""]').removeAttr("class"),e.html.cleanEmptyTags();for(var r=e.$el.find("span"),o=r.length-1;0<=o;o--){var c=r[o];c.attributes&&0!==c.attributes.length||n(c).replaceWith(c.innerHTML)}e.el.normalize();var l=e.$el.find("span[style] + span[style]");for(t=0;t<l.length;t++){var i=n(l[t]),a=n(l[t]).prev();i.get(0).previousSibling===a.get(0)&&e.node.openTagString(i.get(0))===e.node.openTagString(a.get(0))&&(i.prepend(a.html()),a.remove())}e.$el.find("span[style] span[style]").each((function(){if(0<=n(this).attr("style").indexOf("font-size")){var e=n(this).parents("span[style]");e.attr("style")&&0<=e.attr("style").indexOf("background-color")&&(n(this).attr("style","".concat(n(this).attr("style"),";").concat(e.attr("style"))),d(n(this),"span[style]",{},!1))}})),e.el.normalize(),e.selection.restore()}()}function b(t){var r,o,c,l,i,a;if(r="LI"===t.tagName?t:n(t).parentsUntil(e.$el,"li").get(0)){if((a=e.selection.info(r)).atStart&&a.atEnd)return r;if(a.atStart&&!a.atEnd&&(o=n(r).find(".fr-marker[data-type=false]").get(0),c=n(o).parentsUntil(e.$el,"li").get(0),l=n(o).parent().get(0),(i=o.nextSibling)&&0<=["UL","OL"].indexOf(i.tagName)||!c.isSameNode(r)||!i&&("LI"===l.tagName||!l.nextSibling||0<=["UL","OL"].indexOf(l.nextSibling.tagName)||e.node.isVoid(l.nextSibling))))return r}}function m(t,r,o){var c,l,i,a=t.parentsUntil(e.$el,"span[style]"),s=[];for(c=a.length-1;0<=c;c--)l=a[c],i=r,0===n(l).attr("style").indexOf("".concat(i,":"))||0<=n(l).attr("style").indexOf(";".concat(i,":"))||0<=n(l).attr("style").indexOf("; ".concat(i,":"))||s.push(a[c]);if((a=a.not(s)).length){for(var d="",h="",f="",m="",p=t.get(0);p=p.parentNode,n(p).addClass("fr-split"),d+=e.node.closeTagString(p),h=e.node.openTagString(n(p).clone().addClass("fr-split").get(0))+h,a.get(0)!==p&&(f+=e.node.closeTagString(p),m=e.node.openTagString(n(p).clone().addClass("fr-split").get(0))+m),a.get(0)!==p;);var v="".concat(d+e.node.openTagString(n(a.get(0)).clone().css(r,o||"").get(0))+m+t.css(r,"").get(0).outerHTML+f,"</span>").concat(h);t.replaceWith('<span id="fr-break"></span>');var u=a.get(0).outerHTML;n(a.get(0)).replaceWith(u.replace(/<span id="fr-break"><\/span>/g,(function(){return v})))}}function v(t,n){void 0===n&&(n={}),n.style&&delete n.style;var c=e.selection.ranges(0),l=c.startContainer;if(l.nodeType===Node.ELEMENT_NODE&&0<l.childNodes.length&&l.childNodes[c.startOffset]&&(l=l.childNodes[c.startOffset]),!c.collapsed&&l.nodeType===Node.TEXT_NODE&&c.startOffset===(l.textContent||"").length){for(;!e.node.isBlock(l.parentNode)&&!l.nextSibling;)l=l.parentNode;l.nextSibling&&(l=l.nextSibling)}for(var d=l;d&&d.nodeType===Node.ELEMENT_NODE&&!o(d,r(t,n));)d=d.firstChild;if(d&&d.nodeType===Node.ELEMENT_NODE&&o(d,r(t,n)))return!0;var i=l;for(i&&i.nodeType!==Node.ELEMENT_NODE&&(i=i.parentNode);i&&i.nodeType===Node.ELEMENT_NODE&&i!==e.el&&!o(i,r(t,n));)i=i.parentNode;return!(!i||i.nodeType!==Node.ELEMENT_NODE||i===e.el||!o(i,r(t,n)))}return{is:v,toggle:function(e,t){v(e,t)?h(e,t):l(e,t)},apply:l,remove:h,applyStyle:f,removeStyle:function(e){f(e,null)}}},t.MODULES.spaces=function(e){function n(n,r){var o=n.previousSibling,c=n.nextSibling,l=n.textContent,i=n.parentNode,a=[t.ENTER_P,t.ENTER_DIV,t.ENTER_BR];if(!e.html.isPreformatted(i)){r&&(l=l.replace(/[\f\n\r\t\v ]{2,}/g," "),c&&"BR"!==c.tagName&&!e.node.isBlock(c)||!(e.node.isBlock(i)||e.node.isLink(i)&&!i.nextSibling||e.node.isElement(i))||(l=l.replace(/[\f\n\r\t\v ]{1,}$/g,"")),o&&"BR"!==o.tagName&&!e.node.isBlock(o)||!(e.node.isBlock(i)||e.node.isLink(i)&&!i.previousSibling||e.node.isElement(i))||(l=l.replace(/^[\f\n\r\t\v ]{1,}/g,"")),(e.node.isBlock(c)||e.node.isBlock(o))&&(!o||o&&"A"!==o.tagName)&&(l=l.replace(/^[\f\n\r\t\v ]{1,}/g,""))," "===l&&(o&&e.node.isVoid(o)||c&&e.node.isVoid(c))&&!(o&&c&&e.node.isVoid(o)||c&&o&&e.node.isVoid(c))&&(l="")),(!o&&e.node.isBlock(c)||!c&&e.node.isBlock(o))&&e.node.isBlock(i)&&i!==e.el&&(l=l.replace(/^[\f\n\r\t\v ]{1,}/g,"")),r||(l=l.replace(new RegExp(t.UNICODE_NBSP,"g")," "));for(var s="",d=0;d<l.length;d++)32!=l.charCodeAt(d)||0!==d&&32!=s.charCodeAt(d-1)||!((e.opts.enter===t.ENTER_BR||e.opts.enter===t.ENTER_DIV)&&(o&&"BR"===o.tagName||c&&"BR"===c.tagName)||o&&c&&o.tagName===c.tagName||!(o&&c&&e.node.isVoid(o)||o&&c&&e.node.isVoid(c))||o&&c&&0<=["STRONG","U","EM"].indexOf(o.tagName)&&"BR"===c.tagName)?s+=l[d]:s+=t.UNICODE_NBSP;e.browser.chrome&&1<s.length&&32===s.charCodeAt(s.length-1)&&(c&&c.nextSibling&&c.nextSibling.nextSibling&&"BR"===c.nextSibling.nextSibling.tagName||c&&"BR"===c.tagName)&&(s=s.substring(0,s.length-1)+t.UNICODE_NBSP),(!c||c&&e.node.isBlock(c)||c&&c.nodeType===Node.ELEMENT_NODE&&e.win.getComputedStyle(c)&&"block"===e.win.getComputedStyle(c).display)&&(!e.node.isVoid(o)||o&&-1!==["P","DIV","BR"].indexOf(o.tagName)&&-1!==a.indexOf(e.opts.enter))&&(s=s.replace(/ $/,t.UNICODE_NBSP)),!o||e.node.isVoid(o)||e.node.isBlock(o)||1!==(s=s.replace(/^\u00A0([^ $])/," $1")).length||160!==s.charCodeAt(0)||!c||e.node.isVoid(c)||e.node.isBlock(c)||e.node.hasClass(o,"fr-marker")&&e.node.hasClass(c,"fr-marker")||(s=" "),r||(s=s.replace(/([^ \u00A0])\u00A0([^ \u00A0])/g,"$1 $2")),n.textContent!==s&&(n.textContent=s)}}function r(t,r){if(void 0!==t&&t||(t=e.el),void 0===r&&(r=!1),!t.getAttribute||"false"!==t.getAttribute("contenteditable"))if(t.nodeType===Node.TEXT_NODE)n(t,r);else if(t.nodeType===Node.ELEMENT_NODE)for(var o=e.doc.createTreeWalker(t,NodeFilter.SHOW_TEXT,e.node.filter((function(t){for(var n=t.parentNode;n&&n!==e.el;){if("STYLE"===n.tagName||"IFRAME"===n.tagName)return!1;if("PRE"===n.tagName)return!1;n=n.parentNode}return null!==t.textContent.match(/([ \u00A0\f\n\r\t\v]{2,})|(^[ \u00A0\f\n\r\t\v]{1,})|([ \u00A0\f\n\r\t\v]{1,}$)/g)&&!e.node.hasClass(t.parentNode,"fr-marker")})),!1);o.nextNode();)n(o.currentNode,r)}return{normalize:r,normalizeAroundCursor:function(){for(var t=[],n=e.el.querySelectorAll(".fr-marker"),o=0;o<n.length;o++){for(var c=null,i=(c=e.node.blockParent(n[o])||n[o]).nextSibling,a=c.previousSibling;i&&"BR"===i.tagName;)i=i.nextSibling;for(;a&&"BR"===a.tagName;)a=a.previousSibling;c&&t.indexOf(c)<0&&t.push(c),a&&t.indexOf(a)<0&&t.push(a),i&&t.indexOf(i)<0&&t.push(i)}for(var s=0;s<t.length;s++)r(t[s])}}},t.INVISIBLE_SPACE="&#8203;",t.HAIR_SPACE="&#8202;",t.START_MARKER='<span class="fr-marker" data-id="0" data-type="true" style="display: none; line-height: 0;">'.concat(t.INVISIBLE_SPACE,"</span>"),t.END_MARKER='<span class="fr-marker" data-id="0" data-type="false" style="display: none; line-height: 0;">'.concat(t.INVISIBLE_SPACE,"</span>"),t.MARKERS=t.START_MARKER+t.END_MARKER,t.MODULES.markers=function(e){var n=e.$;function r(){if(!e.$wp)return null;try{var r=e.selection.ranges(0),o=r.commonAncestorContainer;if(o!==e.el&&!e.$el.contains(o))return null;var c=r.cloneRange(),l=r.cloneRange();c.collapse(!0);var d=n(e.doc.createElement("SPAN")).addClass("fr-marker").attr("style","display: none; line-height: 0;").html(t.INVISIBLE_SPACE).get(0);if(c.insertNode(d),d=e.$el.find("span.fr-marker").get(0)){for(var i=d.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)n(i).remove(),i=e.$el.find("span.fr-marker").get(0).nextSibling;return e.selection.clear(),e.selection.get().addRange(l),d}return null}catch(e){}}function o(){e.$el.find(".fr-marker").remove()}return{place:function(r,o,c){var l,d,i;try{var a=r.cloneRange();if(a.collapse(o),a.insertNode(function(r,o){var c=n(e.doc.createElement("SPAN"));return c.addClass("fr-marker").attr("data-id",o).attr("data-type",r).attr("style","display: ".concat(e.browser.safari?"none":"inline-block","; line-height: 0;")).html(t.INVISIBLE_SPACE),c.get(0)}(o,c)),!0===o)for(i=(l=e.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(c,'"]')).get(0)).nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)n(i).remove(),i=l.nextSibling;if(!0===o&&!r.collapsed){for(;!e.node.isElement(l.parentNode)&&!i;)-1</\bfa\b/g.test(l.parentNode.className)&&"I"===l.parentNode.tagName?n(l.parentNode).before(l):n(l.parentNode).after(l),i=l.nextSibling;if(i&&i.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(i)&&"HR"!==i.tagName){for(d=[i];i=d[0],(d=e.node.contents(i))[0]&&e.node.isBlock(d[0]););n(i).prepend(n(l))}}if(!1===o&&!r.collapsed){if((i=(l=e.$el.find('span.fr-marker[data-type="false"][data-id="'.concat(c,'"]')).get(0)).previousSibling)&&i.nodeType===Node.ELEMENT_NODE&&e.node.isBlock(i)&&"HR"!==i.tagName){for(d=[i];i=d[d.length-1],(d=e.node.contents(i))[d.length-1]&&e.node.isBlock(d[d.length-1]););n(i).append(n(l))}(l.parentNode&&0<=["TD","TH"].indexOf(l.parentNode.tagName)||!l.previousSibling&&e.node.isBlock(l.parentElement))&&(l.parentNode.previousSibling&&!l.previousSibling?n(l.parentNode.previousSibling).append(l):0<=["TD","TH"].indexOf(l.parentNode.tagName)&&l.parentNode.firstChild===l&&(l.parentNode.previousSibling?n(l.parentNode.previousSibling).append(l):l.parentNode.parentNode&&l.parentNode.parentNode.previousSibling&&n(l.parentNode.parentNode.previousSibling).append(l)))}var s=e.$el.find('span.fr-marker[data-type="'.concat(o,'"][data-id="').concat(c,'"]')).get(0);return s&&(s.style.display="none"),s}catch(e){return null}},insert:r,split:function(){e.selection.isCollapsed()||e.selection.remove();var t=e.$el.find(".fr-marker").get(0);if(t||(t=r()),!t)return null;var o=e.node.deepestParent(t);if(o||(o=e.node.blockParent(t))&&"LI"!==o.tagName&&(o=null),o)if(e.node.isBlock(o)&&e.node.isEmpty(o))"LI"!==o.tagName||o.parentNode.firstElementChild!==o||e.node.isEmpty(o.parentNode)?n(o).replaceWith('<span class="fr-marker"></span>'):n(o).append('<span class="fr-marker"></span>');else if(e.cursor.isAtStart(t,o))n(o).before('<span class="fr-marker"></span>'),n(t).remove();else if(e.cursor.isAtEnd(t,o))n(o).after('<span class="fr-marker"></span>'),n(t).remove();else{for(var c=t,l="",d="";c=c.parentNode,l+=e.node.closeTagString(c),d=e.node.openTagString(c)+d,c!==o;);n(t).replaceWith('<span id="fr-break"></span>');var i=e.node.openTagString(o)+n(o).html()+e.node.closeTagString(o);i=i.replace(/<span id="fr-break"><\/span>/g,"".concat(l,'<span class="fr-marker"></span>').concat(d)),n(o).replaceWith(i)}return e.$el.find(".fr-marker").get(0)},insertAtPoint:function(t){var n,c=t.clientX,l=t.clientY;o();var d=null;if(void 0!==e.doc.caretPositionFromPoint?(n=e.doc.caretPositionFromPoint(c,l),(d=e.doc.createRange()).setStart(n.offsetNode,n.offset),d.setEnd(n.offsetNode,n.offset)):void 0!==e.doc.caretRangeFromPoint&&(n=e.doc.caretRangeFromPoint(c,l),(d=e.doc.createRange()).setStart(n.startContainer,n.startOffset),d.setEnd(n.startContainer,n.startOffset)),null!==d&&void 0!==e.win.getSelection){var i=e.win.getSelection();i.removeAllRanges(),i.addRange(d)}else if(void 0!==e.doc.body.createTextRange)try{(d=e.doc.body.createTextRange()).moveToPoint(c,l);var a=d.duplicate();a.moveToPoint(c,l),d.setEndPoint("EndToEnd",a),d.select()}catch(e){return!1}r()},remove:o}},t.MODULES.selection=function(e){var n=e.$;function s(){var t="";return e.win.getSelection?t=e.win.getSelection():e.doc.getSelection?t=e.doc.getSelection():e.doc.selection&&(t=e.doc.selection.createRange().text),t.toString()}function r(){return e.win.getSelection?e.win.getSelection():e.doc.getSelection?e.doc.getSelection():e.doc.selection.createRange()}function o(t){var n=r(),o=[];if(n&&n.getRangeAt&&n.rangeCount){o=[];for(var c=0;c<n.rangeCount;c++)o.push(n.getRangeAt(c))}else o=e.doc.createRange?[e.doc.createRange()]:[];return void 0!==t?o[t]:o}function c(){var e=r();try{e.removeAllRanges?e.removeAllRanges():e.empty?e.empty():e.clear&&e.clear()}catch(e){}}function p(e,t){var n=e;return n.nodeType===Node.ELEMENT_NODE&&0<n.childNodes.length&&n.childNodes[t]&&(n=n.childNodes[t]),n.nodeType===Node.TEXT_NODE&&(n=n.parentNode),n}function l(){if(e.$wp){e.markers.remove();var t,r,c=o(),l=[];for(r=0;r<c.length;r++)if(c[r].startContainer!==e.doc||e.browser.msie){var d=(t=c[r]).collapsed,i=e.markers.place(t,!0,r),a=e.markers.place(t,!1,r);if(void 0!==i&&i||!d||(n(".fr-marker").remove(),e.selection.setAtEnd(e.el)),e.el.normalize(),e.browser.safari&&!d)try{(t=e.doc.createRange()).setStartAfter(i),t.setEndBefore(a),l.push(t)}catch(e){}}if(e.browser.safari&&l.length)for(e.selection.clear(),r=0;r<l.length;r++)e.selection.get().addRange(l[r])}}function d(){var t,o=e.el.querySelectorAll('.fr-marker[data-type="true"]');if(!e.$wp)return e.markers.remove(),!1;if(0===o.length)return!1;if(e.browser.msie||e.browser.edge)for(t=0;t<o.length;t++)o[t].style.display="inline-block";e.core.hasFocus()||e.browser.msie||e.browser.webkit||e.$el.focus(),c();var l=r();for(t=0;t<o.length;t++){var d=n(o[t]).data("id"),f=o[t],i=e.doc.createRange(),a=e.$el.find('.fr-marker[data-type="false"][data-id="'.concat(d,'"]'));(e.browser.msie||e.browser.edge)&&a.css("display","inline-block");var s=null;if(0<a.length){a=a[0];try{for(var m=!1,v=f.nextSibling,_=null;v&&v.nodeType===Node.TEXT_NODE&&0===v.textContent.length;)v=(_=v).nextSibling,n(_).remove();for(var y=a.nextSibling;y&&y.nodeType===Node.TEXT_NODE&&0===y.textContent.length;)y=(_=y).nextSibling,n(_).remove();if(f.nextSibling===a||a.nextSibling===f){for(var p=f.nextSibling===a?f:a,E=p===f?a:f,u=p.previousSibling;u&&u.nodeType===Node.TEXT_NODE&&0===u.length;)u=(_=u).previousSibling,n(_).remove();if(u&&u.nodeType===Node.TEXT_NODE)for(;u&&u.previousSibling&&u.previousSibling.nodeType===Node.TEXT_NODE;)u.previousSibling.textContent+=u.textContent,u=u.previousSibling,n(u.nextSibling).remove();for(var g=E.nextSibling;g&&g.nodeType===Node.TEXT_NODE&&0===g.length;)g=(_=g).nextSibling,n(_).remove();if(g&&g.nodeType===Node.TEXT_NODE)for(;g&&g.nextSibling&&g.nextSibling.nodeType===Node.TEXT_NODE;)g.nextSibling.textContent=g.textContent+g.nextSibling.textContent,g=g.nextSibling,n(g.previousSibling).remove();if(u&&(e.node.isVoid(u)||e.node.isBlock(u))&&(u=null),g&&(e.node.isVoid(g)||e.node.isBlock(g))&&(g=null),u&&g&&u.nodeType===Node.TEXT_NODE&&g.nodeType===Node.TEXT_NODE){n(f).remove(),n(a).remove();var C=u.textContent.length;u.textContent+=g.textContent,n(g).remove(),e.spaces.normalize(u),i.setStart(u,C),i.setEnd(u,C),m=!0}else!u&&g&&g.nodeType===Node.TEXT_NODE?(n(f).remove(),n(a).remove(),e.opts.htmlUntouched||e.spaces.normalize(g),s=n(e.doc.createTextNode("​")).get(0),n(g).before(s),i.setStart(g,0),i.setEnd(g,0),m=!0):!g&&u&&u.nodeType===Node.TEXT_NODE&&(n(f).remove(),n(a).remove(),e.opts.htmlUntouched||e.spaces.normalize(u),s=n(e.doc.createTextNode("​")).get(0),n(u).after(s),i.setStart(u,u.textContent.length),i.setEnd(u,u.textContent.length),m=!0)}if(!m){var w=void 0,S=void 0;S=(e.browser.chrome||e.browser.edge)&&f.nextSibling===a?(w=h(a,i,!0)||i.setStartAfter(a),h(f,i,!1)||i.setEndBefore(f)):(f.previousSibling===a&&(a=(f=a).nextSibling),a.nextSibling&&"BR"===a.nextSibling.tagName||!a.nextSibling&&e.node.isBlock(f.previousSibling)||f.previousSibling&&"BR"===f.previousSibling.tagName||(f.style.display="inline",a.style.display="inline",s=n(e.doc.createTextNode("​")).get(0)),w=h(f,i,!0)||n(f).before(s)&&i.setStartBefore(f),h(a,i,!1)||n(a).after(s)&&i.setEndAfter(a)),"function"==typeof w&&w(),"function"==typeof S&&S()}}catch(e){}}s&&n(s).remove();try{l.addRange(i)}catch(e){}}e.markers.remove()}function h(t,r,o){var c,l=t.previousSibling,i=t.nextSibling;return l&&i&&l.nodeType===Node.TEXT_NODE&&i.nodeType===Node.TEXT_NODE?(c=l.textContent.length,o?(i.textContent=l.textContent+i.textContent,n(l).remove(),n(t).remove(),e.opts.htmlUntouched||e.spaces.normalize(i),function(){r.setStart(i,c)}):(l.textContent+=i.textContent,n(i).remove(),n(t).remove(),e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setEnd(l,c)})):l&&!i&&l.nodeType===Node.TEXT_NODE?(c=l.textContent.length,o?(e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setStart(l,c)}):(e.opts.htmlUntouched||e.spaces.normalize(l),function(){r.setEnd(l,c)})):!(!i||l||i.nodeType!==Node.TEXT_NODE)&&(o?(e.opts.htmlUntouched||e.spaces.normalize(i),function(){r.setStart(i,0)}):(e.opts.htmlUntouched||e.spaces.normalize(i),function(){r.setEnd(i,0)}))}function f(){for(var e=o(),t=0;t<e.length;t++)if(!e[t].collapsed)return!1;return!0}function m(t){var n,r,o=!1,c=!1;if(e.win.getSelection){var i=e.win.getSelection();i.rangeCount&&((r=(n=i.getRangeAt(0)).cloneRange()).selectNodeContents(t),r.setEnd(n.startContainer,n.startOffset),o=a(r),r.selectNodeContents(t),r.setStart(n.endContainer,n.endOffset),c=a(r))}else e.doc.selection&&"Control"!==e.doc.selection.type&&((r=(n=e.doc.selection.createRange()).duplicate()).moveToElementText(t),r.setEndPoint("EndToStart",n),o=a(r),r.moveToElementText(t),r.setEndPoint("StartToEnd",n),c=a(r));return{atStart:o,atEnd:c}}function a(e){return""===e.toString().replace(/[\u200B-\u200D\uFEFF]/g,"")}function v(t,r){void 0===r&&(r=!0);var o=n(t).html();o&&o.replace(/\u200b/g,"").length!==o.length&&n(t).html(o.replace(/\u200b/g,""));for(var c=e.node.contents(t),l=0;l<c.length;l++)c[l].nodeType!==Node.ELEMENT_NODE?n(c[l]).remove():(v(c[l],0===l),0===l&&(r=!1));if(t.nodeType===Node.TEXT_NODE){var i=n(document.createElement("span")).attr("data-first","true").attr("data-text","true");n(t)[0].replaceWith(i[0])}else r&&n(t).attr("data-first",!0)}function _(){return 0===n(this).find("fr-inner").length}function y(){try{if(!e.$wp)return!1;for(var t=o(0).commonAncestorContainer;t&&!e.node.isElement(t);)t=t.parentNode;return!!e.node.isElement(t)}catch(e){return!1}}function E(n,r){if(!n||0<n.getElementsByClassName("fr-marker").length)return!1;for(var o=n.firstChild;o&&(e.node.isBlock(o)||r&&!e.node.isVoid(o)&&o.nodeType===Node.ELEMENT_NODE);)o=(n=o).firstChild;n.innerHTML=t.MARKERS+n.innerHTML}function i(n,r){if(!n||0<n.getElementsByClassName("fr-marker").length)return!1;for(var o=n.lastChild;o&&(e.node.isBlock(o)||r&&!e.node.isVoid(o)&&o.nodeType===Node.ELEMENT_NODE);)o=(n=o).lastChild;var c=e.doc.createElement("SPAN");for(c.setAttribute("id","fr-sel-markers"),c.innerHTML=t.MARKERS;n.parentNode&&e.opts.htmlAllowedEmptyTags&&0<=e.opts.htmlAllowedEmptyTags.indexOf(n.tagName.toLowerCase());)n=n.parentNode;n.appendChild(c);var l=n.querySelector("#fr-sel-markers");l.outerHTML=l.innerHTML}return{text:s,get:r,ranges:o,clear:c,element:function(){var t=r();try{if(t.rangeCount){var c,l=o(0),d=l.startContainer;if(e.node.isElement(d)&&0===l.startOffset&&d.childNodes.length)for(;d.childNodes.length&&d.childNodes[0].nodeType===Node.ELEMENT_NODE;)d=d.childNodes[0];if(d.nodeType===Node.TEXT_NODE&&l.startOffset===(d.textContent||"").length&&d.nextSibling&&(d=d.nextSibling),d.nodeType===Node.ELEMENT_NODE){var h=!1;if(0<d.childNodes.length&&d.childNodes[l.startOffset]){for(c=d.childNodes[l.startOffset];c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;if(c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,h=!0),!h&&1<d.childNodes.length&&0<l.startOffset&&d.childNodes[l.startOffset-1]){for(c=d.childNodes[l.startOffset-1];c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,h=!0)}}else!l.collapsed&&d.nextSibling&&d.nextSibling.nodeType===Node.ELEMENT_NODE&&(c=d.nextSibling)&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,h=!0);!h&&0<d.childNodes.length&&n(d.childNodes[0]).text().replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&["BR","IMG","HR"].indexOf(d.childNodes[0].tagName)<0&&(d=d.childNodes[0])}for(;d.nodeType!==Node.ELEMENT_NODE&&d.parentNode||d.nodeType===Node.ELEMENT_NODE&&"BR"===d.nodeName&&d.parentNode;)d=d.parentNode;for(var i=d;i&&"HTML"!==i.tagName;){if(i===e.el)return d;i=n(i).parent()[0]}}}catch(e){}return e.el},endElement:function(){var t=r();try{if(t.rangeCount){var c,l=o(0),d=l.endContainer;if(d.nodeType===Node.ELEMENT_NODE){var h=!1;0<d.childNodes.length&&d.childNodes[l.endOffset]&&n(d.childNodes[l.endOffset]).text()===s()?(d=d.childNodes[l.endOffset],h=!0):!l.collapsed&&d.previousSibling&&d.previousSibling.nodeType===Node.ELEMENT_NODE?(c=d.previousSibling)&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,h=!0):!l.collapsed&&0<d.childNodes.length&&d.childNodes[l.endOffset]&&(c=d.childNodes[l.endOffset].previousSibling).nodeType===Node.ELEMENT_NODE&&c&&c.textContent.replace(/\u200B/g,"")===s().replace(/\u200B/g,"")&&(d=c,h=!0),!h&&0<d.childNodes.length&&n(d.childNodes[d.childNodes.length-1]).text()===s()&&["BR","IMG","HR"].indexOf(d.childNodes[d.childNodes.length-1].tagName)<0&&(d=d.childNodes[d.childNodes.length-1])}for(d.nodeType===Node.TEXT_NODE&&0===l.endOffset&&d.previousSibling&&d.previousSibling.nodeType===Node.ELEMENT_NODE&&(d=d.previousSibling);d.nodeType!==Node.ELEMENT_NODE&&d.parentNode;)d=d.parentNode;for(var i=d;i&&"HTML"!==i.tagName;){if(i===e.el)return d;i=n(i).parent()[0]}}}catch(e){}return e.el},save:l,restore:d,isCollapsed:f,isFull:function(){if(f())return!1;e.selection.save();var t,n=e.el.querySelectorAll("td, th, img, br");for(t=0;t<n.length;t++)(n[t].nextSibling||"IMG"===n[t].tagName)&&(n[t].innerHTML='<span class="fr-mk" style="display: none;">&nbsp;</span>'.concat(n[t].innerHTML));var r=!1,o=m(e.el);for(o.atStart&&o.atEnd&&(r=!0),n=e.el.querySelectorAll(".fr-mk"),t=0;t<n.length;t++)n[t].parentNode.removeChild(n[t]);return e.selection.restore(),r},inEditor:y,remove:function(){if(f())return!0;var r;function o(e){for(var t=e.previousSibling;t&&t.nodeType===Node.TEXT_NODE&&0===t.textContent.length;){var r=t;t=t.previousSibling,n(r).remove()}return t}function c(e){for(var t=e.nextSibling;t&&t.nodeType===Node.TEXT_NODE&&0===t.textContent.length;){var r=t;t=t.nextSibling,n(r).remove()}return t}l();var h=e.$el.find('.fr-marker[data-type="true"]');for(r=0;r<h.length;r++)for(var m=h[r];!(o(m)||e.node.isBlock(m.parentNode)||e.$el.is(m.parentNode)||e.node.hasClass(m.parentNode,"fr-inner"));)n(m.parentNode).before(m);var i=e.$el.find('.fr-marker[data-type="false"]');for(r=0;r<i.length;r++){for(var a=i[r];!(c(a)||e.node.isBlock(a.parentNode)||e.$el.is(a.parentNode)||e.node.hasClass(a.parentNode,"fr-inner"));)n(a.parentNode).after(a);a.parentNode&&e.node.isBlock(a.parentNode)&&e.node.isEmpty(a.parentNode)&&!e.$el.is(a.parentNode)&&!e.node.hasClass(a.parentNode,"fr-inner")&&e.opts.keepFormatOnDelete&&n(a.parentNode).after(a)}if(function(){for(var t=e.$el.find(".fr-marker"),r=0;r<t.length;r++)if(n(t[r]).parentsUntil('.fr-element, [contenteditable="true"]','[contenteditable="false"]').length)return!1;return!0}()){!function t(r,o){var c=e.node.contents(r.get(0));0<=["TD","TH"].indexOf(r.get(0).tagName)&&1===r.find(".fr-marker").length&&(e.node.hasClass(c[0],"fr-marker")||"BR"==c[0].tagName&&e.node.hasClass(c[0].nextElementSibling,"fr-marker"))&&r.attr("data-del-cell",!0);for(var l=0;l<c.length;l++){var d=c[l];e.node.hasClass(d,"fr-marker")?o=(o+1)%2:o?0<n(d).find(".fr-marker").length?o=t(n(d),o):["TD","TH"].indexOf(d.tagName)<0&&!e.node.hasClass(d,"fr-inner")?!e.opts.keepFormatOnDelete||0<e.$el.find("[data-first]").length||e.node.isVoid(d)?n(d).remove():v(d):e.node.hasClass(d,"fr-inner")?0===n(d).find(".fr-inner").length?n(d).html("<br>"):n(d).find(".fr-inner").filter(_).html("<br>"):(n(d).empty(),n(d).attr("data-del-cell",!0)):0<n(d).find(".fr-marker").length&&(o=t(n(d),o))}return o}(e.$el,0);var s=e.$el.find('[data-first="true"]');if(s.length)e.$el.find(".fr-marker").remove(),s.append(t.INVISIBLE_SPACE+t.MARKERS).removeAttr("data-first"),s.attr("data-text")&&s.replaceWith(s.html());else for(e.$el.find("table").filter((function(){return 0<n(this).find("[data-del-cell]").length&&n(this).find("[data-del-cell]").length===n(this).find("td, th").length})).remove(),e.$el.find("[data-del-cell]").removeAttr("data-del-cell"),h=e.$el.find('.fr-marker[data-type="true"]'),r=0;r<h.length;r++){var y=h[r],E=y.nextSibling,C=e.$el.find('.fr-marker[data-type="false"][data-id="'.concat(n(y).data("id"),'"]')).get(0);if(C){if(y&&(!E||E!==C)){var w=e.node.blockParent(y),p=e.node.blockParent(C),S=!1,u=!1;if(w&&0<=["UL","OL"].indexOf(w.tagName)&&(S=!(w=null)),p&&0<=["UL","OL"].indexOf(p.tagName)&&(u=!(p=null)),n(y).after(C),w!==p)if(null!==w||S)if(null!==p||u||0!==n(w).parentsUntil(e.$el,"table").length)w&&p&&0===n(w).parentsUntil(e.$el,"table").length&&0===n(p).parentsUntil(e.$el,"table").length&&!n(w).contains(p)&&!n(p).contains(w)&&(n(w).append(n(p).html()),n(p).remove());else{for(E=w;!E.nextSibling&&E.parentNode!==e.el;)E=E.parentNode;for(E=E.nextSibling;E&&"BR"!==E.tagName;){var g=E.nextSibling;n(w).append(E),E=g}E&&"BR"===E.tagName&&n(E).remove()}else{var T=e.node.deepestParent(y);T?(n(T).after(n(p).html()),n(p).remove()):0===n(p).parentsUntil(e.$el,"table").length&&(n(y).next().after(n(p).html()),n(p).remove())}}}else C=n(y).clone().attr("data-type",!1),n(y).after(C)}}e.$el.find("li:empty").remove(),e.opts.keepFormatOnDelete||e.html.fillEmptyBlocks(),e.html.cleanEmptyTags(!0),e.opts.htmlUntouched||(e.clean.lists(),e.$el.find("li:empty").append("<br>"),e.spaces.normalize());var A=e.$el.find(".fr-marker").last().get(0),R=e.$el.find(".fr-marker").first().get(0);void 0!==A&&void 0!==R&&!A.nextSibling&&R.previousSibling&&"BR"===R.previousSibling.tagName&&e.node.isElement(A.parentNode)&&e.node.isElement(R.parentNode)&&e.$el.append("<br>"),d()},blocks:function(t){var c,l,d=[],h=r();if(y()&&h.rangeCount){var i=o();for(c=0;c<i.length;c++){var a=i[c],s=p(a.startContainer,a.startOffset),f=p(a.endContainer,a.endOffset);(l=e.node.blockParent(s))&&d.indexOf(l)<0&&d.push(l),(e.node.isBlock(s)||e.node.hasClass(s,"fr-inner"))&&d.indexOf(s)<0&&d.push(s);for(var m=[],v=s;v!==f&&v!==e.el;)m.indexOf(v)<0&&v.children&&v.children.length?(m.push(v),v=v.children[0]):v.nextSibling?v=v.nextSibling:v.parentNode&&(v=v.parentNode,m.push(v)),e.node.isBlock(v)&&m.indexOf(v)<0&&d.indexOf(v)<0&&(v!==f||0<a.endOffset)&&d.push(v);e.node.isBlock(f)&&d.indexOf(f)<0&&0<a.endOffset&&d.push(f),(l=e.node.blockParent(f))&&d.indexOf(l)<0&&d.push(l)}}for(c=d.length-1;0<c;c--)if(n(d[c-1]).contains(d[c])){if(t&&n(d[c]).find("ul, ol").length)continue;d.splice(c-1,1)}else if(n(d[c]).contains(d[c-1])){if(t&&n(d[c]).find("ul, ol").length)continue;d.splice(c,1)}return d},info:m,setAtEnd:i,setAtStart:E,setBefore:function(r,o){void 0===o&&(o=!0);for(var c=r.previousSibling;c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.previousSibling;return c?(e.node.isBlock(c)?i(c):"BR"===c.tagName?n(c).before(t.MARKERS):n(c).after(t.MARKERS),!0):!!o&&(e.node.isBlock(r)?E(r):n(r).before(t.MARKERS),!0)},setAfter:function(r,o){void 0===o&&(o=!0);for(var c=r.nextSibling;c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.nextSibling;return c?(e.node.isBlock(c)?E(c):n(c).before(t.MARKERS),!0):!!o&&(e.node.isBlock(r)?i(r):n(r).after(t.MARKERS),!0)},rangeElement:p}},Object.assign(t.DEFAULTS,{language:null}),t.LANGUAGE={},t.MODULES.language=function(e){var n;return{_init:function(){t.LANGUAGE&&(n=t.LANGUAGE[e.opts.language]),n&&n.direction&&(e.opts.direction=n.direction)},translate:function(e){return n&&n.translation[e]&&n.translation[e].length?n.translation[e]:e}}},Object.assign(t.DEFAULTS,{placeholderText:"Type something"}),t.MODULES.placeholder=function(e){var p=e.$;function t(){e.$placeholder||(e.$placeholder=p(e.doc.createElement("SPAN")).addClass("fr-placeholder"),e.$wp.append(e.$placeholder));var t=e.opts.iframe?e.$iframe.prev().outerHeight(!0):e.$el.prev().outerHeight(!0),n=0,r=0,o=0,c=0,i=0,a=0,s=e.node.contents(e.el),l=p(e.selection.element()).css("text-align");if(s.length&&s[0].nodeType===Node.ELEMENT_NODE){var d=p(s[0]);(0<e.$wp.prev().length||0<e.$el.prev().length)&&e.ready&&(n=e.helpers.getPX(d.css("margin-top")),c=e.helpers.getPX(d.css("padding-top")),r=e.helpers.getPX(d.css("margin-left")),o=e.helpers.getPX(d.css("margin-right")),i=e.helpers.getPX(d.css("padding-left")),a=e.helpers.getPX(d.css("padding-right"))),e.$placeholder.css("font-size",d.css("font-size")),e.$placeholder.css("line-height",d.css("line-height"))}else e.$placeholder.css("font-size",e.$el.css("font-size")),e.$placeholder.css("line-height",e.$el.css("line-height"));e.$wp.addClass("show-placeholder"),e.$placeholder.css({marginTop:Math.max(e.helpers.getPX(e.$el.css("margin-top")),n)+(t||0),paddingTop:Math.max(e.helpers.getPX(e.$el.css("padding-top")),c),paddingLeft:Math.max(e.helpers.getPX(e.$el.css("padding-left")),i),marginLeft:Math.max(e.helpers.getPX(e.$el.css("margin-left")),r),paddingRight:Math.max(e.helpers.getPX(e.$el.css("padding-right")),a),marginRight:Math.max(e.helpers.getPX(e.$el.css("margin-right")),o),textAlign:l}).text(e.language.translate(e.opts.placeholderText||e.$oel.attr("placeholder")||"")),e.$placeholder.html(e.$placeholder.text().replace(/\n/g,"<br>"))}function n(){e.$wp.removeClass("show-placeholder")}function r(){if(!e.$wp)return!1;e.core.isEmpty()?t():n()}return{_init:function(){if(!e.$wp)return!1;e.events.on("init input keydown keyup contentChanged initialized",r)},show:t,hide:n,refresh:r,isVisible:function(){return!e.$wp||e.node.hasClass(e.$wp.get(0),"show-placeholder")}}},t.UNICODE_NBSP=String.fromCharCode(160),t.VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],t.BLOCK_TAGS=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video"],Object.assign(t.DEFAULTS,{htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script",".fa",".fr-emoticon",".fr-inner","path","line","hr"],htmlDoNotWrapTags:["script","style"],htmlSimpleAmpersand:!1,htmlIgnoreCSSProperties:[],htmlExecuteScripts:!0}),t.MODULES.html=function(e){var u=e.$;function n(){return e.opts.enter===t.ENTER_P?"p":e.opts.enter===t.ENTER_DIV?"div":e.opts.enter===t.ENTER_BR?null:void 0}function s(t,n){return!(!t||t===e.el)&&(n?-1!=["PRE","SCRIPT","STYLE"].indexOf(t.tagName)||s(t.parentNode,n):-1!==["PRE","SCRIPT","STYLE"].indexOf(t.tagName))}function i(n){var r,o=[],c=[];if(n){var l=e.el.querySelectorAll(".fr-marker");for(r=0;r<l.length;r++){var i=e.node.blockParent(l[r])||l[r];if(i){var a=i.nextSibling,s=i.previousSibling;i&&c.indexOf(i)<0&&e.node.isBlock(i)&&c.push(i),s&&e.node.isBlock(s)&&c.indexOf(s)<0&&c.push(s),a&&e.node.isBlock(a)&&c.indexOf(a)<0&&c.push(a)}}}else c=e.el.querySelectorAll(p());var d=p();for(d+=",".concat(t.VOID_ELEMENTS.join(",")),d+=", .fr-inner",d+=",".concat(e.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"),r=c.length-1;0<=r;r--)if(!(c[r].textContent&&0<c[r].textContent.replace(/\u200B|\n/g,"").length||0<c[r].querySelectorAll(d).length)){for(var h=e.node.contents(c[r]),f=!1,m=0;m<h.length;m++)if(h[m].nodeType!==Node.COMMENT_NODE&&h[m].textContent&&0<h[m].textContent.replace(/\u200B|\n/g,"").length){f=!0;break}f||o.push(c[r])}return o}function p(){return t.BLOCK_TAGS.join(", ")}function r(n){var r,o,c=u.merge([],t.VOID_ELEMENTS);c=u.merge(c,e.opts.htmlAllowedEmptyTags),c=void 0===n?u.merge(c,t.BLOCK_TAGS):u.merge(c,t.NO_DELETE_TAGS),r=e.el.querySelectorAll("*:empty:not(".concat(c.join("):not("),"):not(.fr-marker):not(template)"));do{o=!1;for(var l=0;l<r.length;l++)0!==r[l].attributes.length&&void 0===r[l].getAttribute("href")||(r[l].parentNode.removeChild(r[l]),o=!0);r=e.el.querySelectorAll("*:empty:not(".concat(c.join("):not("),"):not(.fr-marker):not(template)"))}while(r.length&&o)}function a(t,r){var o=n();if(r&&(o="div"),o){for(var c=e.doc.createDocumentFragment(),l=null,i=!1,a=t.firstChild,s=!1;a;){var d=a.nextSibling;if(a.nodeType===Node.ELEMENT_NODE&&(e.node.isBlock(a)||0<=e.opts.htmlDoNotWrapTags.indexOf(a.tagName.toLowerCase())&&!e.node.hasClass(a,"fr-marker")))l=null,c.appendChild(a.cloneNode(!0));else if(a.nodeType!==Node.ELEMENT_NODE&&a.nodeType!==Node.TEXT_NODE)l=null,c.appendChild(a.cloneNode(!0));else if("BR"===a.tagName)null===l?(l=e.doc.createElement(o),s=!0,r&&(l.setAttribute("class","fr-temp-div"),l.setAttribute("data-empty",!0)),l.appendChild(a.cloneNode(!0)),c.appendChild(l)):!1===i&&(l.appendChild(e.doc.createElement("br")),r&&(l.setAttribute("class","fr-temp-div"),l.setAttribute("data-empty",!0))),l=null;else{var h=a.textContent;if(a.nodeType!==Node.TEXT_NODE||0<h.replace(/\n/g,"").replace(/(^ *)|( *$)/g,"").length||h.replace(/(^ *)|( *$)/g,"").length&&h.indexOf("\n")<0){if("SPAN"===a.tagName&&u(a).hasClass("fr-marker")&&!a.previousSibling){c.appendChild(a),a=d;continue}if("SPAN"===a.tagName&&u(a).hasClass("fr-marker")&&a.previousSibling&&a.previousSibling.nodeType===Node.ELEMENT_NODE){c.appendChild(a),s=!0,a=d;continue}null===l&&(l=e.doc.createElement(o),s=!0,r&&l.setAttribute("class","fr-temp-div"),c.appendChild(l),i=!1),l.appendChild(a.cloneNode(!0)),i||e.node.hasClass(a,"fr-marker")||a.nodeType===Node.TEXT_NODE&&0===h.replace(/ /g,"").length||(i=!0)}else s=!0}a=d}s&&(t.innerHTML="",t.appendChild(c))}}function o(e,t){for(var n=e.length-1;0<=n;n--)a(e[n],t)}function c(t,n,r,c,l){if(!e.$wp)return!1;void 0===t&&(t=!1),void 0===n&&(n=!1),void 0===r&&(r=!1),void 0===c&&(c=!1),void 0===l&&(l=!1);var i=e.$wp.scrollTop();a(e.el,t),c&&o(e.el.querySelectorAll(".fr-inner"),t),n&&o(e.el.querySelectorAll("td, th"),t),r&&o(e.el.querySelectorAll("blockquote"),t),l&&o(e.el.querySelectorAll("li"),t),i!==e.$wp.scrollTop()&&e.$wp.scrollTop(i)}function l(t){if(void 0===t&&(t=e.el),t&&0<=["SCRIPT","STYLE","PRE"].indexOf(t.tagName))return!1;for(var n=e.doc.createTreeWalker(t,NodeFilter.SHOW_TEXT,e.node.filter((function(e){return null!==e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g)})),!1);n.nextNode();){var r=n.currentNode;if(!s(r.parentNode,!0)){var o=e.node.isBlock(r.parentNode)||e.node.isElement(r.parentNode),c=r.textContent.replace(/(?!^)( ){2,}(?!$)/g," ").replace(/\n/g," ").replace(/^[ ]{2,}/g," ").replace(/[ ]{2,}$/g," ");if(o){var i=r.previousSibling,a=r.nextSibling;i&&a&&" "===c?c=e.node.isBlock(i)&&e.node.isBlock(a)?"":" ":(i||(c=c.replace(/^ */,"")),a||(c=c.replace(/ *$/,"")))}r.textContent=c}}}function d(e,t,n){var r=new RegExp(t,"gi").exec(e);return r?r[n]:null}function h(e){var t=e.doctype,n="<!DOCTYPE html>";return t&&(n="<!DOCTYPE ".concat(t.name).concat(t.publicId?' PUBLIC "'.concat(t.publicId,'"'):"").concat(!t.publicId&&t.systemId?" SYSTEM":"").concat(t.systemId?' "'.concat(t.systemId,'"'):"",">")),n}function f(n){var r=n.parentNode;if(r&&(e.node.isBlock(r)||e.node.isElement(r))&&["TD","TH"].indexOf(r.tagName)<0){for(var o=n.previousSibling,c=n.nextSibling;o&&(o.nodeType===Node.TEXT_NODE&&0===o.textContent.replace(/\n|\r/g,"").length||e.node.hasClass(o,"fr-tmp"));)o=o.previousSibling;if(c)return!1;o&&r&&"BR"!==o.tagName&&!e.node.isBlock(o)&&!c&&0<r.textContent.replace(/\u200B/g,"").length&&0<o.textContent.length&&!e.node.hasClass(o,"fr-marker")&&(e.el===r&&!c&&e.opts.enter===t.ENTER_BR&&e.browser.msie||n.parentNode.removeChild(n))}else!r||e.node.isBlock(r)||e.node.isElement(r)||n.previousSibling||n.nextSibling||!e.node.isDeletable(n.parentNode)||f(n.parentNode)}function g(){e.opts.htmlUntouched||(r(),c(),l(),e.spaces.normalize(null,!0),e.html.fillEmptyBlocks(),e.clean.lists(),e.clean.tables(),e.clean.toHTML5(),e.html.cleanBRs()),e.selection.restore(),m(),e.placeholder.refresh()}function m(){e.node.isEmpty(e.el)&&(null!==n()?e.el.querySelector(p())||e.el.querySelector("".concat(e.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||(e.core.hasFocus()?(e.$el.html("<".concat(n(),">").concat(t.MARKERS,"<br/></").concat(n(),">")),e.selection.restore()):e.$el.html("<".concat(n(),"><br/></").concat(n(),">"))):e.el.querySelector("*:not(.fr-marker):not(br)")||(e.core.hasFocus()?(e.$el.html("".concat(t.MARKERS,"<br/>")),e.selection.restore()):e.$el.html("<br/>")))}function v(e,t){return d(e,"<".concat(t,"[^>]*?>([\\w\\W]*)</").concat(t,">"),1)}function _(t,n){var r=u("<div ".concat(d(t,"<".concat(n,"([^>]*?)>"),1)||"",">"));return e.node.rawAttributes(r.get(0))}function y(e){return(d(e,"<!DOCTYPE([^>]*?)>",0)||"<!DOCTYPE html>").replace(/\n/g," ").replace(/ {2,}/g," ")}function b(t,n){e.opts.htmlExecuteScripts?t.html(n):t.get(0).innerHTML=n}function E(e){var t;return(t=/:not\(([^)]*)\)/g).test(e)&&(e=e.replace(t,"     $1 ")),100*(e.match(/(#[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(\[[^]]+\])/g)||[]).length+10*(e.match(/(\.[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(:[\w-]+\([^)]*\))/gi)||[]).length+10*(e.match(/(:[^\s+>~.[:]+)/g)||[]).length+(e.match(/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi)||[]).length+((e=(e=e.replace(/[*\s+>~]/g," ")).replace(/[#.]/g," ")).match(/([^\s+>~.[:]+)/g)||[]).length}function C(t){if(e.events.trigger("html.processGet",[t]),t&&t.getAttribute&&""===t.getAttribute("class")&&t.removeAttribute("class"),t&&t.getAttribute&&""===t.getAttribute("style")&&t.removeAttribute("style"),t&&t.nodeType===Node.ELEMENT_NODE){var n,r=t.querySelectorAll('[class=""],[style=""]');for(n=0;n<r.length;n++){var o=r[n];""===o.getAttribute("class")&&o.removeAttribute("class"),""===o.getAttribute("style")&&o.removeAttribute("style")}if("BR"===t.tagName)f(t);else{var c=t.querySelectorAll("br");for(n=0;n<c.length;n++)f(c[n])}}}function w(e,t){return e[3]-t[3]}function S(){for(var t=e.el.querySelectorAll("input, textarea"),n=0;n<t.length;n++)"checkbox"!==t[n].type&&"radio"!==t[n].type||(t[n].checked?t[n].setAttribute("checked",t[n].checked):e.$(t[n]).removeAttr("checked")),t[n].getAttribute("value")&&t[n].setAttribute("value",t[n].value)}function T(t){var n=e.doc.createElement("div");return n.innerHTML=t,null!==n.querySelector(p())}function A(t){var n=null;if(void 0===t&&(n=e.selection.element()),e.opts.keepFormatOnDelete)return!1;var r,o,c=n?(n.textContent.match(/\u200B/g)||[]).length-n.querySelectorAll(".fr-marker").length:0;if((e.el.textContent.match(/\u200B/g)||[]).length-e.el.querySelectorAll(".fr-marker").length===c)return!1;do{o=!1,r=e.el.querySelectorAll("*:not(.fr-marker)");for(var i=0;i<r.length;i++){var a=r[i];if(n!==a){var s=a.textContent;0===a.children.length&&1===s.length&&8203===s.charCodeAt(0)&&"TD"!==a.tagName&&(u(a).remove(),o=!0)}}}while(o)}function R(){A(),e.placeholder&&setTimeout(e.placeholder.refresh,0)}return{defaultTag:n,isPreformatted:s,emptyBlocks:i,emptyBlockTagsQuery:function(){return"".concat(t.BLOCK_TAGS.join(":empty, "),":empty")},blockTagsQuery:p,fillEmptyBlocks:function(n){var r=i(n);e.node.isEmpty(e.el)&&e.opts.enter===t.ENTER_BR&&r.push(e.el);for(var o=0;o<r.length;o++){var c=r[o];"false"===c.getAttribute("contenteditable")||c.querySelector("".concat(e.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||e.node.isVoid(c)||"TABLE"!==c.tagName&&"TBODY"!==c.tagName&&"TR"!==c.tagName&&"UL"!==c.tagName&&"OL"!==c.tagName&&c.appendChild(e.doc.createElement("br"))}if(e.browser.msie&&e.opts.enter===t.ENTER_BR){var l=e.node.contents(e.el);l.length&&l[l.length-1].nodeType===Node.TEXT_NODE&&e.$el.append("<br>")}},cleanEmptyTags:r,cleanWhiteTags:A,cleanBlankSpaces:l,blocks:function(){return e.$el.get(0).querySelectorAll(p())},getDoctype:h,set:function(t){var n=e.clean.html((t||"").trim(),[],[],e.opts.fullPage),r=new RegExp("%3A//","g"),o=n.replace(r,"://");if(e.opts.fullPage){var c=v(o,"body")||(0<=o.indexOf("<body")?"":o),i=_(o,"body"),a=v(o,"head")||"<title></title>",s=_(o,"head"),l=u("<div>");l.append(a).contents().each((function(){(this.nodeType===Node.COMMENT_NODE||0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName))&&this.parentNode.removeChild(this)}));var d=l.html().trim();a=u("<div>").append(a).contents().map((function(){return this.nodeType===Node.COMMENT_NODE?"\x3c!--".concat(this.nodeValue,"--\x3e"):0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName)?this.outerHTML:""})).toArray().join("");var h=y(o),f=_(o,"html");b(e.$el,"".concat(d,"\n").concat(c)),e.node.clearAttributes(e.el),e.$el.attr(i),e.$el.addClass("fr-view"),e.$el.attr("spellcheck",e.opts.spellcheck),e.$el.attr("dir",e.opts.direction),b(e.$head,a),e.node.clearAttributes(e.$head.get(0)),e.$head.attr(s),e.node.clearAttributes(e.$html.get(0)),e.$html.attr(f),e.iframe_document.doctype.parentNode.replaceChild(function(e,t){var n=e.match(/<!DOCTYPE ?([^ ]*) ?([^ ]*) ?"?([^"]*)"? ?"?([^"]*)"?>/i);return n?t.implementation.createDocumentType(n[1],n[3],n[4]):t.implementation.createDocumentType("html")}(h,e.iframe_document),e.iframe_document.doctype)}else b(e.$el,o);var p=e.edit.isDisabled();e.edit.on(),e.core.injectStyle(e.opts.iframeDefaultStyle+e.opts.iframeStyle),g(),e.opts.useClasses||(e.$el.find("[fr-original-class]").each((function(){this.setAttribute("class",this.getAttribute("fr-original-class")),this.removeAttribute("fr-original-class")})),e.$el.find("[fr-original-style]").each((function(){this.setAttribute("style",this.getAttribute("fr-original-style")),this.removeAttribute("fr-original-style")}))),p&&e.edit.off(),e.events.trigger("html.set"),e.events.trigger("charCounter.update")},syncInputs:S,get:function(t,n){if(!e.$wp)return e.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;var r="";e.events.trigger("html.beforeGet");var o,c,i=[],a={},s=[];if(S(),!e.opts.useClasses&&!n){var l=new RegExp("^".concat(e.opts.htmlIgnoreCSSProperties.join("$|^"),"$"),"gi");for(o=0;o<e.doc.styleSheets.length;o++){var d=void 0,f=0;try{d=e.doc.styleSheets[o].cssRules,e.doc.styleSheets[o].ownerNode&&"STYLE"===e.doc.styleSheets[o].ownerNode.nodeType&&(f=1)}catch(e){}if(d)for(var m=0,p=d.length;m<p;m++)if(d[m].selectorText&&0<d[m].style.cssText.length){var v=d[m].selectorText.replace(/body |\.fr-view /g,"").replace(/::/g,":"),u=void 0;try{u=e.el.querySelectorAll(v)}catch(e){u=[]}for(c=0;c<u.length;c++){!u[c].getAttribute("fr-original-style")&&u[c].getAttribute("style")?(u[c].setAttribute("fr-original-style",u[c].getAttribute("style")),i.push(u[c])):u[c].getAttribute("fr-original-style")||(u[c].setAttribute("fr-original-style",""),i.push(u[c])),a[u[c]]||(a[u[c]]={});for(var g=1e3*f+E(d[m].selectorText),_=d[m].style.cssText.split(";"),y=0;y<_.length;y++){var T=_[y].trim().split(":")[0];if(T&&!T.match(l)&&(a[u[c]][T]||(a[u[c]][T]=0)<=(u[c].getAttribute("fr-original-style")||"").indexOf("".concat(T,":"))&&(a[u[c]][T]=1e4),g>=a[u[c]][T]&&(a[u[c]][T]=g,_[y].trim().length))){var b=_[y].trim().split(":");b.splice(0,1),s.push([u[c],T.trim(),b.join(":").trim(),g])}}}}}for(s.sort(w),o=0;o<s.length;o++){var A=s[o];A[0].style[A[1]]=A[2]}for(o=0;o<i.length;o++)if(i[o].getAttribute("class")&&(i[o].setAttribute("fr-original-class",i[o].getAttribute("class")),i[o].removeAttribute("class")),0<(i[o].getAttribute("fr-original-style")||"").trim().length){var R=i[o].getAttribute("fr-original-style").split(";");for(c=0;c<R.length;c++)if(0<R[c].indexOf(":")){var O=R[c].split(":"),I=O[0];O.splice(0,1),i[o].style[I.trim()]=O.join(":").trim()}}}if(e.node.isEmpty(e.el))e.opts.fullPage&&(r=h(e.iframe_document),r+="<html".concat(e.node.attributes(e.$html.get(0)),">").concat(e.$html.find("head").get(0).outerHTML,"<body></body></html>"));else if(void 0===t&&(t=!1),e.opts.fullPage){r=h(e.iframe_document),e.$el.removeClass("fr-view");var k=e.opts.heightMin,N=e.opts.height,L=e.opts.heightMax;e.opts.heightMin=null,e.opts.height=null,e.opts.heightMax=null,e.size.refresh(),r+="<html".concat(e.node.attributes(e.$html.get(0)),">").concat(e.$html.html(),"</html>"),e.opts.heightMin=k,e.opts.height=N,e.opts.heightMax=L,e.size.refresh(),e.$el.addClass("fr-view")}else r=e.$el.html();if(!e.opts.useClasses&&!n)for(o=0;o<i.length;o++)i[o].getAttribute("fr-original-class")&&(i[o].setAttribute("class",i[o].getAttribute("fr-original-class")),i[o].removeAttribute("fr-original-class")),null!==i[o].getAttribute("fr-original-style")&&void 0!==i[o].getAttribute("fr-original-style")?(0!==i[o].getAttribute("fr-original-style").length?i[o].setAttribute("style",i[o].getAttribute("fr-original-style")):i[o].removeAttribute("style"),i[o].removeAttribute("fr-original-style")):i[o].removeAttribute("style");e.opts.fullPage&&(r=(r=(r=(r=(r=(r=(r=(r=r.replace(/<style data-fr-style="true">(?:[\w\W]*?)<\/style>/g,"")).replace(/<link([^>]*)data-fr-style="true"([^>]*)>/g,"")).replace(/<style(?:[\w\W]*?)class="firebugResetStyles"(?:[\w\W]*?)>(?:[\w\W]*?)<\/style>/g,"")).replace(/<body((?:[\w\W]*?)) spellcheck="true"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$2>$3</body>")).replace(/<body((?:[\w\W]*?)) contenteditable="(true|false)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?)) dir="([\w]*)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$3>$4</body>")).replace(/<body((?:[\w\W]*?))class="([\w\W]*?)(fr-rtl|fr-ltr)([\w\W]*?)"((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,'<body$1class="$2$4"$5>$6</body>')).replace(/<body((?:[\w\W]*?)) class=""((?:[\w\W]*?))>((?:[\w\W]*?))<\/body>/g,"<body$1$2>$3</body>")),e.opts.htmlSimpleAmpersand&&(r=r.replace(/&amp;/gi,"&")),e.events.trigger("html.afterGet"),t||(r=r.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,"")),r=e.clean.invisibleSpaces(r),r=e.clean.exec(r,C);var M=e.events.chainTrigger("html.get",r);return"string"==typeof M&&(r=M),(r=r.replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g,(function(e){return e.replace(/<br>/g,"\n")}))).replace(/<meta((?:[\w\W]*?)) data-fr-http-equiv="/g,'<meta$1 http-equiv="')},getSelected:function(){function n(t,n){for(;n&&(n.nodeType===Node.TEXT_NODE||!e.node.isBlock(n))&&!e.node.isElement(n)&&!e.node.hasClass(n,"fr-inner")&&!(n.nextSibling&&("BR"===n.nextSibling.nodeName||e.node.isBlock(n.nextSibling))||n.previousSibling&&("BR"===n.previousSibling.nodeName||e.node.isBlock(n.previousSibling))||e.node.hasClass(n.parentNode,"fr-view"));)n&&n.nodeType!==Node.TEXT_NODE&&u(t).wrapInner(e.node.openTagString(n)+e.node.closeTagString(n)),n=n.parentNode;n&&t.innerHTML===n.innerHTML?t.innerHTML=n.outerHTML:n.innerText&&-1!=n.innerText.indexOf(t.innerHTML)?t.innerHTML=e.node.openTagString(n)+n.innerHTML+e.node.closeTagString(n):(n.nextSibling&&("BR"===n.nextSibling.nodeName||e.node.isBlock(n.nextSibling))||n.previousSibling&&("BR"===n.previousSibling.nodeName||e.node.isBlock(n.previousSibling))&&n.wholeText)&&(t.innerHTML=n.wholeText)}var r,o,c="";if(void 0!==e.win.getSelection){e.browser.mozilla&&(e.selection.save(),1<e.$el.find('.fr-marker[data-type="false"]').length&&(e.$el.find('.fr-marker[data-type="false"][data-id="0"]').remove(),e.$el.find('.fr-marker[data-type="false"]:last').attr("data-id","0"),e.$el.find(".fr-marker").not('[data-id="0"]').remove()),e.selection.restore());for(var l=e.selection.ranges(),i=0;i<l.length;i++){var a=document.createElement("div");a.appendChild(l[i].cloneContents()),n(a,(o=r=void 0,o=null,e.win.getSelection?(r=e.win.getSelection())&&r.rangeCount&&(o=r.getRangeAt(0).commonAncestorContainer).nodeType!==Node.ELEMENT_NODE&&e.opts.enter!==t.ENTER_BR&&(o=o.parentNode):(r=e.doc.selection)&&"Control"!==r.type&&(o=r.createRange().parentElement()),null!==o&&(0<=u(o).parents().toArray().indexOf(e.el)||o===e.el)?o:null)),0<u(a).find(".fr-element").length&&(a=e.el),c+=a.innerHTML}}else void 0!==e.doc.selection&&"Text"===e.doc.selection.type&&(c=e.doc.selection.createRange().htmlText);return c},insert:function(t,n,r){var o;if(e.selection.isCollapsed()||e.selection.remove(),o=n?t:e.clean.html(t),0===t.indexOf('<i class="fa ')&&(o="<span>&nbsp;".concat(o,"</span>")),t.indexOf('class="fr-marker"')<0&&(o=function(t){var n=e.doc.createElement("div");return n.innerHTML=t,e.selection.setAtEnd(n,!0),n.innerHTML}(o)),e.node.isEmpty(e.el)&&!e.opts.keepFormatOnDelete&&T(o))e.opts.trackChangesEnabled?e.track_changes.pasteInEmptyEdior(o):e.el.innerHTML=o;else{(function(){var t=e.selection.ranges(0).commonAncestorContainer;return t!==e.el&&!e.$el.contains(t)})()&&e.selection.restore();var c=e.markers.insert();if(c)if(e.opts.trackChangesEnabled)e.track_changes.pasteInEdior(o);else{e.node.isLastSibling(c)&&u(c).parent().hasClass("fr-deletable")&&u(c).insertAfter(u(c).parent());var i=e.node.blockParent(c);if((T(o)||r)&&(e.node.deepestParent(c)||i&&"LI"===i.tagName)){if(i&&"LI"===i.tagName&&(o=function(t){if(!e.html.defaultTag())return t;var n=e.doc.createElement("div");n.innerHTML=t;for(var r=n.querySelectorAll(":scope > ".concat(e.html.defaultTag())),o=r.length-1;0<=o;o--){var c=r[o];e.node.isBlock(c.previousSibling)||(c.previousSibling&&!e.node.isEmpty(c)&&u("<br>").insertAfter(c.previousSibling),c.outerHTML=c.innerHTML)}return n.innerHTML}(o)),!(c=e.markers.split()))return!1;c.outerHTML=o}else c.outerHTML=o}else e.el.innerHTML+=o}g(),e.keys.positionCaret(),e.events.trigger("html.inserted")},wrap:c,unwrap:function(){e.$el.find("div.fr-temp-div").each((function(){this.previousSibling&&this.previousSibling.nodeType===Node.TEXT_NODE&&u(this).before("<br>"),u(this).attr("data-empty")||!this.nextSibling||e.node.isBlock(this.nextSibling)&&!u(this.nextSibling).hasClass("fr-temp-div")?u(this).replaceWith(u(this).html()):u(this).replaceWith("".concat(u(this).html(),"<br>"))})),e.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter((function(){return""===u(this).attr("class")})).removeAttr("class")},escapeEntities:function(e){return e.replace(/</gi,"&lt;").replace(/>/gi,"&gt;").replace(/"/gi,"&quot;").replace(/'/gi,"&#39;")},checkIfEmpty:m,extractNode:v,extractNodeAttrs:_,extractDoctype:y,cleanBRs:function(){for(var t=e.el.getElementsByTagName("br"),n=0;n<t.length;n++)f(t[n])},_init:function(){e.events.$on(e.$el,"mousemove","span.fr-word-select",(function(e){var t=window.getSelection();t=window.getSelection();var n=document.createRange();n.selectNodeContents(e.target),t.removeAllRanges(),t.addRange(n)})),e.$wp&&(e.events.on("mouseup",R),e.events.on("keydown",R),e.events.on("contentChanged",m))},_setHtml:b}},t.ENTER_P=0,t.ENTER_DIV=1,t.ENTER_BR=2,t.KEYCODE={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,FF_HYPHEN:173,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,HYPHEN:189,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221,IME:229},Object.assign(t.DEFAULTS,{enter:t.ENTER_P,multiLine:!0,tabSpaces:0}),t.MODULES.keys=function(e){var n,r,o,c=e.$,p=!1;function l(t){if(e.selection.isCollapsed())if(["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&e.cursor.backspace(),e.helpers.isIOS()){var n=e.selection.ranges(0);n.deleteContents(),n.insertNode(document.createTextNode("​")),e.selection.get().modify("move","forward","character")}else["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&t.preventDefault(),t.stopPropagation();else t.preventDefault(),t.stopPropagation(),e.selection.remove();e.placeholder.refresh()}function u(t){["INPUT","BUTTON","TEXTAREA"].indexOf(t.target&&t.target.tagName)<0&&t.preventDefault(),t.stopPropagation(),""!==e.selection.text()||e.selection.element().hasAttribute("contenteditable")&&"false"===e.selection.element().getAttribute("contenteditable")||!e.selection.isCollapsed()&&"IMG"==e.selection.element().tagName?e.selection.remove():e.cursor.del(),e.placeholder.refresh()}function d(){if(e.browser.mozilla&&e.selection.isCollapsed()&&!p){var t=e.selection.ranges(0),n=t.startContainer,r=t.startOffset;n&&n.nodeType===Node.TEXT_NODE&&r<=n.textContent.length&&0<r&&32===n.textContent.charCodeAt(r-1)&&(e.selection.save(),e.spaces.normalize(),e.selection.restore())}}function h(){e.selection.isFull()&&setTimeout((function(){var n=e.html.defaultTag();n?e.$el.html("<".concat(n,">").concat(t.MARKERS,"<br/></").concat(n,">")):e.$el.html("".concat(t.MARKERS,"<br/>")),e.selection.restore(),e.placeholder.refresh(),e.button.bulkRefresh(),e.undo.saveStep()}),0)}function i(){p=!1}function a(){p=!1}function g(){var n=e.html.defaultTag();n?e.$el.html("<".concat(n,">").concat(t.MARKERS,"<br/></").concat(n,">")):e.$el.html("".concat(t.MARKERS,"<br/>")),e.selection.restore()}function f(e,t){if(e.parentElement&&(-1<e.innerHTML.indexOf("<span")||-1<e.parentElement.innerHTML.indexOf("<span")||-1<e.parentElement.parentElement.innerHTML.indexOf("<span"))&&(e.classList.contains("fr-img-space-wrap")||e.parentElement.classList.contains("fr-img-space-wrap")||e.parentElement.parentElement.classList.contains("fr-img-space-wrap"))){if(c(e.parentElement).is("p")){var n=e.parentElement.innerHTML;return(n=n.replace(/<br>/g,"")).length<1?e.parentElement.insertAdjacentHTML("afterbegin","&nbsp;"):"&nbsp;"!=n&&" "!=n&&"Backspace"==t.key?l(t):"&nbsp;"!=n&&" "!=n&&"Delete"==t.key&&u(t),!0}if(c(e).is("p")){var r=e.innerHTML.replace(/<br>/g,"");return r.length<1?e.insertAdjacentHTML("afterbegin","&nbsp;"):"&nbsp;"!=r&&" "!=r&&"Backspace"==t.key?l(t):"&nbsp;"!=r&&" "!=r&&"Delete"==t.key&&u(t),!0}}return!1}function s(r){var o=e.selection.element();if(o&&0<=["INPUT","TEXTAREA"].indexOf(o.tagName))return!0;if(r&&y(r.which))return!0;e.events.disableBlur();var c=r.which;if(16===c)return!0;if((n=c)===t.KEYCODE.IME)return p=!0;if(p=!1,_(r))return!0;var d=b(c)&&!_(r)&&!r.altKey,h=c===t.KEYCODE.BACKSPACE||c===t.KEYCODE.DELETE;if((e.selection.isFull()&&!e.opts.keepFormatOnDelete&&!e.placeholder.isVisible()||h&&e.placeholder.isVisible()&&e.opts.keepFormatOnDelete)&&(d||h)&&(g(),!b(c)))return r.preventDefault(),!0;if(c===t.KEYCODE.ENTER)!e.helpers.isIOS()&&r.shiftKey||o.classList.contains("fr-inner")||o.parentElement.classList.contains("fr-inner")?function(t){t.preventDefault(),t.stopPropagation(),e.opts.multiLine&&(e.selection.isCollapsed()||e.selection.remove(),e.cursor.enter(!0))}(r):function(t){e.opts.multiLine?(e.helpers.isIOS()||(t.preventDefault(),t.stopPropagation()),e.selection.isCollapsed()||e.selection.remove(),e.cursor.enter()):(t.preventDefault(),t.stopPropagation())}(r);else if(c===t.KEYCODE.BACKSPACE&&(r.metaKey||r.ctrlKey))setTimeout((function(){e.events.disableBlur(),e.events.focus()}),0);else if(c!==t.KEYCODE.BACKSPACE||_(r)||r.altKey)if(c!==t.KEYCODE.DELETE||_(r)||r.altKey||r.shiftKey)c===t.KEYCODE.SPACE?function(n){var r=e.selection.element();if(!e.helpers.isMobile()&&r&&"A"===r.tagName){n.preventDefault(),n.stopPropagation(),e.selection.isCollapsed()||e.selection.remove();var o=e.markers.insert();if(o){var c=o.previousSibling;!o.nextSibling&&o.parentNode&&"A"===o.parentNode.tagName?(o.parentNode.insertAdjacentHTML("afterend","&nbsp;".concat(t.MARKERS)),o.parentNode.removeChild(o)):(c&&c.nodeType===Node.TEXT_NODE&&1===c.textContent.length&&160===c.textContent.charCodeAt(0)?c.textContent+=" ":o.insertAdjacentHTML("beforebegin","&nbsp;"),o.outerHTML=t.MARKERS),e.selection.restore()}}}(r):c===t.KEYCODE.TAB?function(t){if(0<e.opts.tabSpaces)if(e.selection.isCollapsed()){e.undo.saveStep(),t.preventDefault(),t.stopPropagation();for(var n="",r=0;r<e.opts.tabSpaces;r++)n+="&nbsp;";e.html.insert(n),e.placeholder.refresh(),e.undo.saveStep()}else t.preventDefault(),t.stopPropagation(),t.shiftKey?e.commands.outdent():e.commands.indent()}(r):_(r)||!b(r.which)||e.selection.isCollapsed()||r.ctrlKey||r.altKey||e.selection.remove();else{if(f(o,r))return r.preventDefault(),void r.stopPropagation();e.placeholder.isVisible()?(e.opts.keepFormatOnDelete||g(),r.preventDefault(),r.stopPropagation()):u(r)}else{if(f(o,r))return r.preventDefault(),void r.stopPropagation();e.placeholder.isVisible()?(e.opts.keepFormatOnDelete||g(),r.preventDefault(),r.stopPropagation()):l(r)}e.events.enableBlur()}function m(){if(!e.$wp)return!0;var t;if(e.opts.height||e.opts.heightMax){t=e.position.getBoundingRect().top,(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top);var n=e.selection.blocks(),r=null;n&&0<n.length&&n[0].offsetTop&&(r=n[0].getBoundingClientRect().top),!e.opts.iframe&&t>e.$wp.offset().top-e.helpers.scrollTop()+e.$wp.height()-20?e.$wp.scrollTop(t+e.$wp.scrollTop()-(e.$wp.height()+e.$wp.offset().top)+e.helpers.scrollTop()+20):e.opts.iframe&&r>e.$wp.height()&&r&&e.$wp.scrollTop(r-e.$wp.height()+80)}else t=e.position.getBoundingRect().top,e.opts.toolbarBottom&&(t+=e.opts.toolbarStickyOffset),(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top,t-=e.helpers.scrollTop()),(t+=e.opts.toolbarStickyOffset)>e.o_win.innerHeight-20&&c(e.o_win).scrollTop(t+e.helpers.scrollTop()-e.o_win.innerHeight+20),t=e.position.getBoundingRect().top,e.opts.toolbarBottom||(t-=e.opts.toolbarStickyOffset),(e.helpers.isIOS()||e.helpers.isAndroid())&&(t-=e.helpers.scrollTop()),e.opts.iframe&&(t+=e.$iframe.offset().top,t-=e.helpers.scrollTop()),t<100&&c(e.o_win).scrollTop(t+e.helpers.scrollTop()-100)}function v(r){var o=e.selection.element();if(o&&0<=["INPUT","TEXTAREA"].indexOf(o.tagName))return!0;if(r&&0===r.which&&n&&(r.which=n),e.helpers.isAndroid()&&e.browser.mozilla)return!0;if(p)return!1;if(r&&e.helpers.isIOS()&&r.which===t.KEYCODE.ENTER&&e.doc.execCommand("undo"),!e.selection.isCollapsed())return!0;if(r&&(r.which===t.KEYCODE.META||r.which===t.KEYCODE.CTRL))return!0;if(r&&y(r.which))return!0;if(r&&!e.helpers.isIOS()&&(r.which===t.KEYCODE.ENTER||r.which===t.KEYCODE.BACKSPACE||37<=r.which&&r.which<=40&&!e.browser.msie))try{m()}catch(e){}var c=e.selection.element();(function(e){if(!e)return!1;var t=e.innerHTML;return!!((t=t.replace(/<span[^>]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,""))&&/\u200B/.test(t)&&0<t.replace(/\u200B/gi,"").length)})(c)&&!e.node.hasClass(c,"fr-marker")&&"IFRAME"!==c.tagName&&function(t){return!e.helpers.isIOS()||0===((t.textContent||"").match(/[\u3041-\u3096\u30A0-\u30FF\u4E00-\u9FFF\u3130-\u318F\uAC00-\uD7AF]/gi)||[]).length}(c)&&(e.selection.save(),function(t){var n=t;-1<["STRONG","U","EM"].indexOf(t.nodeName)&&t.parentNode&&(n=t.parentNode);for(var r=e.doc.createTreeWalker(n,NodeFilter.SHOW_TEXT,e.node.filter((function(e){return/\u200B/gi.test(e.textContent)})),!1);r.nextNode();){var o=r.currentNode;o.textContent=o.textContent.replace(/\u200B/gi,"")}}(c),e.selection.restore())}function _(e){if(-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}function y(e){if(e>=t.KEYCODE.ARROW_LEFT&&e<=t.KEYCODE.ARROW_DOWN)return!0}function b(n){if(n>=t.KEYCODE.ZERO&&n<=t.KEYCODE.NINE)return!0;if(n>=t.KEYCODE.NUM_ZERO&&n<=t.KEYCODE.NUM_MULTIPLY)return!0;if(n>=t.KEYCODE.A&&n<=t.KEYCODE.Z)return!0;if(e.browser.webkit&&0===n)return!0;switch(n){case t.KEYCODE.SPACE:case t.KEYCODE.QUESTION_MARK:case t.KEYCODE.NUM_PLUS:case t.KEYCODE.NUM_MINUS:case t.KEYCODE.NUM_PERIOD:case t.KEYCODE.NUM_DIVISION:case t.KEYCODE.SEMICOLON:case t.KEYCODE.FF_SEMICOLON:case t.KEYCODE.DASH:case t.KEYCODE.EQUALS:case t.KEYCODE.FF_EQUALS:case t.KEYCODE.COMMA:case t.KEYCODE.PERIOD:case t.KEYCODE.SLASH:case t.KEYCODE.APOSTROPHE:case t.KEYCODE.SINGLE_QUOTE:case t.KEYCODE.OPEN_SQUARE_BRACKET:case t.KEYCODE.BACKSLASH:case t.KEYCODE.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}function E(n){var c=n.which;if(_(n)||37<=c&&c<=40||!b(c)&&c!==t.KEYCODE.DELETE&&c!==t.KEYCODE.BACKSPACE&&c!==t.KEYCODE.ENTER&&c!==t.KEYCODE.IME)return!0;r||(o=e.snapshot.get(),e.undo.canDo()||e.undo.saveStep()),clearTimeout(r),r=setTimeout((function(){r=null,e.undo.saveStep()}),Math.max(250,e.opts.typingTimer))}function C(t){var n=t.which;if(_(t)||37<=n&&n<=40)return!0;o&&r?(e.undo.saveStep(o),o=null):void 0!==n&&0!==n||o||r||e.undo.saveStep()}function w(t){if(t&&"BR"===t.tagName)return!1;try{return 0===(t.textContent||"").length&&t.querySelector&&!t.querySelector(":scope > br")||t.childNodes&&1===t.childNodes.length&&t.childNodes[0].getAttribute&&("false"===t.childNodes[0].getAttribute("contenteditable")||e.node.hasClass(t.childNodes[0],"fr-img-caption"))}catch(e){return!1}}function S(n){var r=e.el.childNodes,o=e.html.defaultTag(),c=e.node.blockParent(e.selection.blocks()[0]);return c&&"TR"==c.tagName&&null==c.getAttribute("contenteditable")&&(c=c.closest("table")),!e.node.isEditable(n.target)||c&&"false"===c.getAttribute("contenteditable")?e.toolbar.disable():e.toolbar.enable(),!(!n.target||n.target===e.el)||0===r.length||void(r[0].offsetHeight+r[0].offsetTop<=n.offsetY?w(r[r.length-1])&&(o?e.$el.append("<".concat(o,">").concat(t.MARKERS,"<br></").concat(o,">")):e.$el.append("".concat(t.MARKERS,"<br>")),e.selection.restore(),m()):n.offsetY<=10&&w(r[0])&&(o?e.$el.prepend("<".concat(o,">").concat(t.MARKERS,"<br></").concat(o,">")):e.$el.prepend("".concat(t.MARKERS,"<br>")),e.selection.restore(),m()))}function T(){r&&clearTimeout(r)}return{_init:function(){e.events.on("keydown",E),e.events.on("input",d),e.events.on("mousedown",a),e.events.on("keyup input",C),e.events.on("keypress",i),e.events.on("keydown",s),e.events.on("keyup",v),e.events.on("destroy",T),e.events.on("html.inserted",v),e.events.on("cut",h),e.opts.multiLine&&e.events.on("click",S),e.events.on("initialized",(function(){e.el.addEventListener("compositionstart",(function(){if(e.selection.isCollapsed()){var n=e.selection.ranges(0),r=n.startContainer,o=n.startOffset;if(r&&r.nodeType===Node.TEXT_NODE&&o<=r.textContent.length&&0<o&&8203===r.textContent.charCodeAt(o-1)){e.selection.save();var l=e.$el.find(".fr-marker");c(l.get(0).previousSibling).before(t.HAIR_SPACE),l.get(0).previousSibling.textContent=l.get(0).previousSibling.textContent.replace(/\u200B/gi,""),e.selection.restore()}}})),e.el.addEventListener("compositionend",(function(){if(e.selection.isCollapsed()){var t=e.selection.ranges(0),n=t.startContainer,r=t.startOffset;if(n&&n.nodeType===Node.TEXT_NODE&&r<=n.textContent.length&&0<r&&8202===n.textContent.charCodeAt(0)){e.selection.save();var o=e.$el.find(".fr-marker");o.get(0).previousSibling.textContent=o.get(0).previousSibling.textContent.replace(/\u200A/gi,""),e.selection.restore()}}}))}))},ctrlKey:_,isCharacter:b,isArrow:y,forceUndo:function(){r&&(clearTimeout(r),e.undo.saveStep(),o=null)},isIME:function(){return p},isBrowserAction:function(e){var n=e.which;return _(e)||n===t.KEYCODE.F5},positionCaret:m}},Object.assign(t.DEFAULTS,{pastePlain:!1,pasteDeniedTags:["colgroup","col","meta"],pasteDeniedAttrs:["class","id"],pasteAllowedStyleProps:[".*"],pasteAllowLocalImages:!1}),t.MODULES.paste=function(e){var a,s,n,r,o,c,l=e.$;function d(t,n){try{e.win.localStorage.setItem("fr-copied-html",t),e.win.localStorage.setItem("fr-copied-text",n)}catch(e){}}function h(t){var n=e.html.getSelected();d(n,l(e.doc.createElement("div")).html(n).text()),"cut"===t.type&&(e.undo.saveStep(),setTimeout((function(){e.selection.save(),e.html.wrap(),e.selection.restore(),e.events.focus(),e.undo.saveStep()}),0))}var f=!1;function m(t){if("INPUT"===t.target.nodeName&&"text"===t.target.type)return!0;if(e.edit.isDisabled())return!1;if(v(t.target))return!1;if(f)return!1;if(t.originalEvent&&(t=t.originalEvent),t&&t.clipboardData&&t.clipboardData.getData&&((t.clipboardData||window.clipboardData).getData("text/html")||"").match('content="Microsoft OneNote'))return!1;if(!1===e.events.trigger("paste.before",[t]))return t.preventDefault(),!1;if(t&&t.clipboardData&&t.clipboardData.getData){var c="";if(r=t.clipboardData.types,e.helpers.isArray(r))for(var d=0;d<r.length;d++)c+="".concat(r[d],";");else c=r;if(a="",/text\/rtf/.test(c)&&(s=t.clipboardData.getData("text/rtf")),/text\/html/.test(c)&&!e.browser.safari?(a=t.clipboardData.getData("text/html"),e.browser.mozilla&&("<p></p>"===a||""===a||/<!--StartFragment-->([ ])<!--EndFragment-->/.test(a)||/<!--StartFragment-->([<p></p>]*)<!--EndFragment-->/.test(a))&&(a=e.win.localStorage.getItem("fr-copied-html"))):/text\/rtf/.test(c)&&e.browser.safari?a=s:/public.rtf/.test(c)&&e.browser.safari&&(a=t.clipboardData.getData("text/rtf")),n=t.clipboardData.getData("text"),""!==a)return E(),t.preventDefault&&(t.stopPropagation(),t.preventDefault()),!1;a=null}return function(){if(e.selection.save(),e.events.disableBlur(),a=null,o){o.html("");var t=y(e.selection.get().anchorNode)+e.$wp.offset().top;o.css("top",t),e.browser.edge&&e.opts.iframe&&e.$el.append(o)}else{var n=document.getElementsByTagName("BODY")[0],r=window.getComputedStyle(n).transform;if("none"!==r){var c=y(e.selection.get().anchorNode)+e.$wp.offset().top;o=l('<div contenteditable="true" style="position: fixed; top: '+c+'px; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>')}else o=l('<div contenteditable="true" style="position: fixed; top: 0; left: -9999px; height: 100%; width: 0; word-break: break-all; overflow:hidden; z-index: 2147483647; line-height: 140%; -moz-user-select: text; -webkit-user-select: text; -ms-user-select: text; user-select: text;" tabIndex="-1"></div>');e.browser.webkit||e.browser.mozilla?("none"===r&&o.css("top",e.$sc.scrollTop()),e.$el.after(o)):e.browser.edge&&e.opts.iframe?e.$el.append(o):e.$box.after(o),e.events.on("destroy",(function(){o.remove()}))}var d;e.helpers.isIOS()&&e.$sc&&(d=e.$sc.scrollTop()),e.opts.iframe&&e.$el.attr("contenteditable","false"),o.focus(),e.helpers.isIOS()&&e.$sc&&e.$sc.scrollTop(d),e.win.setTimeout(E,1)}(),!1}function v(e){return e&&"false"===e.contentEditable}function _(n){if(n.originalEvent&&(n=n.originalEvent),v(n.target))return!1;if(n&&n.dataTransfer&&n.dataTransfer.getData){var o="";if(r=n.dataTransfer.types,e.helpers.isArray(r))for(var d=0;d<r.length;d++)o+="".concat(r[d],";");else o=r;if(a="",/text\/rtf/.test(o)&&(s=n.dataTransfer.getData("text/rtf")),/text\/html/.test(o)?a=n.dataTransfer.getData("text/html"):/text\/rtf/.test(o)&&e.browser.safari?a=s:/text\/plain/.test(o)&&!this.browser.mozilla&&(a=e.html.escapeEntities(n.dataTransfer.getData("text/plain")).replace(/\n/g,"<br>")),""!==a){e.keys.forceUndo(),c=e.snapshot.get(),e.selection.save(),e.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");var h=e.markers.insertAtPoint(n);if(e.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"),e.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"),e.selection.restore(),e.selection.remove(),e.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"),!1!==h){var f=e.el.querySelector(".fr-marker");return l(f).replaceWith(t.MARKERS),e.selection.restore(),E(),n.preventDefault&&(n.stopPropagation(),n.preventDefault()),!1}}else a=null}}function y(e){return e.nodeType===Node.TEXT_NODE?e.parentNode.offsetTop:e.offsetTop}function E(){e.opts.iframe&&e.$el.attr("contenteditable","true"),e.browser.edge&&e.opts.iframe&&e.$box.after(o),c||(e.keys.forceUndo(),c=e.snapshot.get()),a||(a=o.get(0).innerHTML,n=o.text(),e.selection.restore(),e.events.enableBlur());var t=a.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi),r=e.events.chainTrigger("paste.beforeCleanup",a);r&&"string"==typeof r&&(a=r),(!t||t&&!1!==e.events.trigger("paste.wordPaste",[a]))&&i(a,t)}function C(e){for(var t="",n=0;n++<e;)t+="&nbsp;";return t}function i(o,d,h){var f,m=null,i=null;if(0<=o.toLowerCase().indexOf("<body")){var a="";0<=o.indexOf("<style")&&(a=o.replace(/[.\s\S\w\W<>]*(<style[^>]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi,"$1")),o=(o=(o=a+o.replace(/[.\s\S\w\W<>]*<body[^>]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi,"$1")).replace(/<pre(?:[\w\W]*?)>(?:[\w\W]*?)<\/pre>/g,(function(e){return e.replace(/\n/g,"<br />")}))).replace(/ \n/g," ").replace(/\n /g," ").replace(/([^>])\n([^<])/g,"$1 $2")}var s=!1;0<=o.indexOf('id="docs-internal-guid')&&(o=o.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g,"$1"),s=!0),(0<=o.indexOf('content="Sheets"')||0<=o.indexOf("google-sheets-html-origin"))&&(o=o.replace(/width:0px;/g,""));var v=!1;if(!d)if((v=function(){var t=null;try{t=e.win.localStorage.getItem("fr-copied-text")}catch(e){}return!(!t||!n||r&&-1===r.indexOf("text/html")||n.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")!==t.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")&&n.replace(/\s/g,"")!==t.replace(/\s/g,""))}())&&(o=e.win.localStorage.getItem("fr-copied-html")),v)o=e.clean.html(o,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs);else{var _=e.opts.htmlAllowedStyleProps;e.opts.htmlAllowedStyleProps=e.opts.pasteAllowedStyleProps,e.opts.htmlAllowComments=!1,o=(o=(o=o.replace(/<span class="Apple-tab-span">\s*<\/span>/g,C(e.opts.tabSpaces||4))).replace(/<span class="Apple-tab-span" style="white-space:pre">(\t*)<\/span>/g,(function(t,n){return C(n.length*(e.opts.tabSpaces||4))}))).replace(/\t/g,C(e.opts.tabSpaces||4)),o=e.clean.html(o,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs),e.opts.htmlAllowedStyleProps=_,e.opts.htmlAllowComments=!0,e.html.defaultTag()&&"div"===e.html.defaultTag()||(o=w(o)),o=(o=o.replace(/\r/g,"")).replace(/^ */g,"").replace(/ *$/g,"")}!d||e.wordPaste&&h||(0===(o=o.replace(/^\n*/g,"").replace(/^ /g,"")).indexOf("<colgroup>")&&(o="<table>".concat(o,"</table>")),o=w(o=function(t){var n;t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace(/<p(.*?)class="?'?MsoListParagraph"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ul><li>$3</li></ul>")).replace(/<p(.*?)class="?'?NumberedText"?'? ([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ol><li>$3</li></ol>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ul><li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpFirst"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<ol><li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?NumberedTextCxSpMiddle"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListBullet"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li>")).replace(/<p(.*?)class="?'?MsoListParagraphCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li></ul>")).replace(/<p(.*?)class="?'?NumberedTextCxSpLast"?'?([\s\S]*?)(level\d)?([\s\S]*?)>([\s\S]*?)<\/p>/gi,"<li$3>$5</li></ol>")).replace(/<span([^<]*?)style="?'?mso-list:Ignore"?'?([\s\S]*?)>([\s\S]*?)<span/gi,"<span><span")).replace(/<!--\[if !supportLists\]-->([\s\S]*?)<!--\[endif\]-->/gi,"")).replace(/<!\[if !supportLists\]>([\s\S]*?)<!\[endif\]>/gi,"")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi," ")).replace(/<!--[\s\S]*?-->/gi,"")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi,"");var r,o=["style","script","applet","embed","noframes","noscript"];for(n=0;n<o.length;n++){var c=new RegExp("<".concat(o[n],".*?").concat(o[n],"(.*?)>"),"gi");t=t.replace(c,"")}for(t=(t=(t=t.replace(/&nbsp;/gi," ")).replace(/<td([^>]*)><\/td>/g,"<td$1><br></td>")).replace(/<th([^>]*)><\/th>/g,"<th$1><br></th>");(t=(r=t).replace(/<[^/>][^>]*><\/[^>]+>/gi,""))!==r;);t=(t=t.replace(/<lilevel([^1])([^>]*)>/gi,'<li data-indent="true"$2>')).replace(/<lilevel1([^>]*)>/gi,"<li$1>"),t=(t=(t=e.clean.html(t,e.opts.pasteDeniedTags,e.opts.pasteDeniedAttrs)).replace(/<a>(.[^<]+)<\/a>/gi,"$1")).replace(/<br> */g,"<br>");var i=e.o_doc.createElement("div");i.innerHTML=t;var a=i.querySelectorAll("li[data-indent]");for(n=0;n<a.length;n++){var s=a[n],l=s.previousElementSibling;if(l&&"LI"===l.tagName){var d=l.querySelector(":scope > ul, :scope > ol");d||(d=document.createElement("ul"),l.appendChild(d)),d.appendChild(s)}else s.removeAttribute("data-indent")}return e.html.cleanBlankSpaces(i),i.innerHTML}(o))),e.opts.pastePlain&&(o=function(t){var n,r=null,o=e.doc.createElement("div");o.innerHTML=t;var c=o.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");for(n=0;n<c.length;n++)(r=c[n]).innerText&&(r.outerHTML="<".concat(e.html.defaultTag()||"DIV",">").concat(r.innerText,"</").concat(e.html.defaultTag()||"DIV",">"));for(n=(c=o.querySelectorAll("*:not(".concat("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not("),")"))).length-1;0<=n;n--)(r=c[n]).outerHTML=r.innerHTML;return function i(t){for(var n=e.node.contents(t),r=0;r<n.length;r++)n[r].nodeType!==Node.TEXT_NODE&&n[r].nodeType!==Node.ELEMENT_NODE?n[r].parentNode.removeChild(n[r]):i(n[r])}(o),o.innerHTML}(o));var y=e.events.chainTrigger("paste.afterCleanup",o);if("string"==typeof y&&(o=y),""!==o){var E=e.o_doc.createElement("div");0<=(E.innerHTML=o).indexOf("<body>")?(e.html.cleanBlankSpaces(E),e.spaces.normalize(E,!0)):e.spaces.normalize(E);var p=E.getElementsByTagName("span");for(f=p.length-1;0<=f;f--){var S=p[f];0===S.attributes.length&&(S.outerHTML=S.innerHTML)}if(!0===e.opts.linkAlwaysBlank){var u=E.getElementsByTagName("a");for(f=u.length-1;0<=f;f--){var g=u[f];g.getAttribute("target")||g.setAttribute("target","_blank")}}var T=e.selection.element(),A=!1;if(T&&l(T).parentsUntil(e.el,"ul, ol").length&&(A=!0),A){var R=E.children;1===R.length&&0<=["OL","UL"].indexOf(R[0].tagName)&&(R[0].outerHTML=R[0].innerHTML)}if(!s){var b=E.getElementsByTagName("br");for(f=b.length-1;0<=f;f--){var O=b[f];e.node.isBlock(O.previousSibling)&&O.parentNode.removeChild(O)}}if(e.opts.enter===t.ENTER_BR)for(f=(m=E.querySelectorAll("p, div")).length-1;0<=f;f--)0===(i=m[f]).attributes.length&&(i.outerHTML=i.innerHTML+(i.nextSibling&&!e.node.isEmpty(i)?"<br>":""));else if(e.opts.enter===t.ENTER_DIV)for(f=(m=E.getElementsByTagName("p")).length-1;0<=f;f--)0===(i=m[f]).attributes.length&&(i.outerHTML="<div>".concat(i.innerHTML,"</div>"));else e.opts.enter===t.ENTER_P&&1===E.childNodes.length&&"P"===E.childNodes[0].tagName&&0===E.childNodes[0].attributes.length&&(E.childNodes[0].outerHTML=E.childNodes[0].innerHTML);if(E.children&&0<E.children.length)if(e.opts.trackChangesEnabled)for(var I=0;I<E.children.length;I++)E.children[I].setAttribute("id","isPasted");else E.children[0].setAttribute("id","isPasted");o=E.innerHTML,v&&(o=function(n){var r,o=e.o_doc.createElement("div");o.innerHTML=n;for(var c=o.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat(t.VOID_ELEMENTS.join("):not("),"):not(").concat(e.opts.htmlAllowedEmptyTags.join("):not("),")"));c.length;){for(r=0;r<c.length;r++)c[r].parentNode.removeChild(c[r]);c=o.querySelectorAll("*:empty:not(td):not(th):not(tr):not(iframe):not(svg):not(".concat(t.VOID_ELEMENTS.join("):not("),"):not(").concat(e.opts.htmlAllowedEmptyTags.join("):not("),")"))}return o.innerHTML}(o)),e.html.insert(o,!0)}e.events.trigger("paste.after"),e.undo.saveStep(c),c=null,e.undo.saveStep()}function p(e){for(var t=e.length-1;0<=t;t--)e[t].attributes&&e[t].attributes.length&&e.splice(t,1);return e}function w(t){var n,r=e.o_doc.createElement("div");r.innerHTML=t;for(var o=p(Array.prototype.slice.call(r.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")));o.length;){var c=o[o.length-1];if(e.html.defaultTag()&&"div"!==e.html.defaultTag())c.querySelector(e.html.blockTagsQuery())?c.outerHTML=c.innerHTML:c.outerHTML="<".concat(e.html.defaultTag(),">").concat(c.innerHTML,"</").concat(e.html.defaultTag(),">");else{var i=c.querySelectorAll("*");!i.length||"BR"!==i[i.length-1].tagName&&0===c.innerText.length||!i.length||"BR"!==i[i.length-1].tagName||i[i.length-1].nextSibling?c.outerHTML=c.innerHTML+(c.nextSibling?"<br>":""):c.outerHTML=c.innerHTML}o=p(Array.prototype.slice.call(r.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))}for(o=p(Array.prototype.slice.call(r.querySelectorAll("div:not([style])")));o.length;){for(n=0;n<o.length;n++){var a=o[n],s=a.innerHTML.replace(/\u0009/gi,"").trim();a.outerHTML=s}o=p(Array.prototype.slice.call(r.querySelectorAll("div:not([style])")))}return r.innerHTML}function S(){e.el.removeEventListener("copy",h),e.el.removeEventListener("cut",h),e.el.removeEventListener("paste",m)}return{_init:function(){e.el.addEventListener("copy",h),e.el.addEventListener("cut",h),e.el.addEventListener("paste",m,{capture:!0}),e.events.on("drop",_),e.browser.msie&&e.browser.version<11&&(e.events.on("mouseup",(function(e){2===e.button&&(setTimeout((function(){f=!1}),50),f=!0)}),!0),e.events.on("beforepaste",m)),e.events.on("destroy",S)},cleanEmptyTagsAndDivs:w,getRtfClipboard:function(){return s},saveCopiedText:d,clean:i}},Object.assign(t.DEFAULTS,{shortcutsEnabled:[],shortcutsHint:!0}),t.SHORTCUTS_MAP={},t.RegisterShortcut=function(e,n,r,o,c,i){t.SHORTCUTS_MAP[(c?"^":"")+(i?"@":"")+e]={cmd:n,val:r,letter:o,shift:c,option:i},t.DEFAULTS.shortcutsEnabled.push(n)},t.RegisterShortcut(t.KEYCODE.E,"show",null,"E",!1,!1),t.RegisterShortcut(t.KEYCODE.B,"bold",null,"B",!1,!1),t.RegisterShortcut(t.KEYCODE.I,"italic",null,"I",!1,!1),t.RegisterShortcut(t.KEYCODE.U,"underline",null,"U",!1,!1),t.RegisterShortcut(t.KEYCODE.S,"strikeThrough",null,"S",!1,!1),t.RegisterShortcut(t.KEYCODE.CLOSE_SQUARE_BRACKET,"indent",null,"]",!1,!1),t.RegisterShortcut(t.KEYCODE.OPEN_SQUARE_BRACKET,"outdent",null,"[",!1,!1),t.RegisterShortcut(t.KEYCODE.Z,"undo",null,"Z",!1,!1),t.RegisterShortcut(t.KEYCODE.Z,"redo",null,"Z",!0,!1),t.RegisterShortcut(t.KEYCODE.Y,"redo",null,"Y",!1,!1),t.MODULES.shortcuts=function(s){var e=null,n=!1;function r(e){if(!s.core.hasFocus())return!0;var r=e.which,o=-1!==navigator.userAgent.indexOf("Mac OS X")?e.metaKey:e.ctrlKey;if("keyup"===e.type&&n&&r!==t.KEYCODE.META)return n=!1;"keydown"===e.type&&(n=!1);var c=(e.shiftKey?"^":"")+(e.altKey?"@":"")+r,l=s.node.blockParent(s.selection.blocks()[0]);if(l&&"TR"==l.tagName&&null==l.getAttribute("contenteditable")&&(l=l.closest("table")),o&&t.SHORTCUTS_MAP[c]&&(!l||"false"!==l.getAttribute("contenteditable"))){var i=t.SHORTCUTS_MAP[c].cmd;if(i&&0<=s.opts.shortcutsEnabled.indexOf(i)){var a=t.SHORTCUTS_MAP[c].val;if(!1===s.events.trigger("shortcut",[e,i,a]))return!(n=!0);if(i&&(s.commands[i]||t.COMMANDS[i]&&t.COMMANDS[i].callback))return e.preventDefault(),e.stopPropagation(),"keydown"===e.type&&((s.commands[i]||t.COMMANDS[i].callback)(),n=!0),!1}}}return{_init:function(){s.events.on("keydown",r,!0),s.events.on("keyup",r,!0)},get:function(n){if(!s.opts.shortcutsHint)return null;if(!e)for(var r in e={},t.SHORTCUTS_MAP)Object.prototype.hasOwnProperty.call(t.SHORTCUTS_MAP,r)&&0<=s.opts.shortcutsEnabled.indexOf(t.SHORTCUTS_MAP[r].cmd)&&(e["".concat(t.SHORTCUTS_MAP[r].cmd,".").concat(t.SHORTCUTS_MAP[r].val||"")]={shift:t.SHORTCUTS_MAP[r].shift,option:t.SHORTCUTS_MAP[r].option,letter:t.SHORTCUTS_MAP[r].letter});var o=e[n];return o?(s.helpers.isMac()?String.fromCharCode(8984):"".concat(s.language.translate("Ctrl"),"+"))+(o.shift?s.helpers.isMac()?String.fromCharCode(8679):"".concat(s.language.translate("Shift"),"+"):"")+(o.option?s.helpers.isMac()?String.fromCharCode(8997):"".concat(s.language.translate("Alt"),"+"):"")+o.letter:null}}},t.MODULES.snapshot=function(e){function t(e){for(var t=e.parentNode.childNodes,n=0,r=null,o=0;o<t.length;o++){if(r){var i=t[o].nodeType===Node.TEXT_NODE&&""===t[o].textContent,a=r.nodeType===Node.TEXT_NODE&&t[o].nodeType===Node.TEXT_NODE,s=r.nodeType===Node.TEXT_NODE&&""===r.textContent;i||a||s||n++}if(t[o]===e)return n;r=t[o]}}function n(n){var r=[];if(!n.parentNode)return[];for(;!e.node.isElement(n);)r.push(t(n)),n=n.parentNode;return r.reverse()}function i(e,t){for(;e&&e.nodeType===Node.TEXT_NODE;){var n=e.previousSibling;n&&n.nodeType===Node.TEXT_NODE&&(t+=n.textContent.length),e=n}return t}function r(t){for(var n=e.el,r=0;r<t.length;r++)n=n.childNodes[t[r]];return n}function o(t,n){try{var o=r(n.scLoc),c=n.scOffset,l=r(n.ecLoc),i=n.ecOffset,a=e.doc.createRange();a.setStart(o,c),a.setEnd(l,i),t.addRange(a)}catch(e){}}return{get:function(){var t,r={};if(e.events.trigger("snapshot.before"),r.html=(e.$wp?e.$el.html():e.$oel.get(0).outerHTML).replace(/ style=""/g,""),r.ranges=[],e.$wp&&e.selection.inEditor()&&e.core.hasFocus())for(var o=e.selection.ranges(),c=0;c<o.length;c++)r.ranges.push({scLoc:n((t=o[c]).startContainer),scOffset:i(t.startContainer,t.startOffset),ecLoc:n(t.endContainer),ecOffset:i(t.endContainer,t.endOffset)});return e.events.trigger("snapshot.after",[r]),r},restore:function(t){e.$el.html()!==t.html&&(e.opts.htmlExecuteScripts?e.$el.html(t.html):e.el.innerHTML=t.html);var n=e.selection.get();e.selection.clear(),e.events.focus(!0);for(var r=0;r<t.ranges.length;r++)o(n,t.ranges[r])},equal:function(t,n){return t.html===n.html&&(!e.core.hasFocus()||JSON.stringify(t.ranges)===JSON.stringify(n.ranges))}}},t.MODULES.undo=function(e){function n(n){var r=n.which;e.keys.ctrlKey(n)&&(r===t.KEYCODE.Z&&n.shiftKey&&n.preventDefault(),r===t.KEYCODE.Z&&n.preventDefault())}var r=null;function o(){if(e.undo_stack&&!e.undoing)for(;e.undo_stack.length>e.undo_index;)e.undo_stack.pop()}function c(){e.undo_index=0,e.undo_stack=[]}function i(){e.undo_stack=[]}return{_init:function(){c(),e.events.on("initialized",(function(){r=(e.$wp?e.$el.html():e.$oel.get(0).outerHTML).replace(/ style=""/g,"")})),e.events.on("blur",(function(){e.el.querySelector(".fr-dragging")||e.undo.saveStep()})),e.events.on("keydown",n),e.events.on("destroy",i)},run:function(){if(1<e.undo_index){e.undoing=!0;var t=e.undo_stack[--e.undo_index-1];clearTimeout(e._content_changed_timer),e.snapshot.restore(t),r=t.html,e.popups.hideAll(),e.toolbar.enable(),e.events.trigger("contentChanged"),e.events.trigger("commands.undo"),e.undoing=!1,e.selection.restore()}},redo:function(){if(e.undo_index<e.undo_stack.length){e.undoing=!0;var t=e.undo_stack[e.undo_index++];clearTimeout(e._content_changed_timer),e.snapshot.restore(t),r=t.html,e.popups.hideAll(),e.toolbar.enable(),e.events.trigger("contentChanged"),e.events.trigger("commands.redo"),e.undoing=!1}},canDo:function(){return!(0===e.undo_stack.length||e.undo_index<=1)},canRedo:function(){return e.undo_index!==e.undo_stack.length},dropRedo:o,reset:c,saveStep:function(t){if(e.undo_stack&&!e.undoing&&!e.el.querySelector(".fr-marker"))if(void 0===t){if((t=e.snapshot.get())&&t.html&&e.undo_stack[e.undo_stack.length-1]&&t.html===e.undo_stack[e.undo_stack.length-1].html)return;e.undo_stack[e.undo_index-1]&&e.snapshot.equal(e.undo_stack[e.undo_index-1],t)||(o(),e.undo_stack.push(t),e.undo_index++,function(e,t){var n=t.split("fr-selected-cell").join("");n=n.split(' class=""').join("");var r=e.split("fr-selected-cell").join("");return n===r.split(' class=""').join("")}(r,t.html)||(e.events.trigger("contentChanged"),r=t.html))}else o(),0<e.undo_index?e.undo_stack[e.undo_index-1]=t:(e.undo_stack.push(t),e.undo_index++)}}},Object.assign(t.DEFAULTS,{height:null,heightMax:null,heightMin:null,width:null}),t.MODULES.size=function(e){function t(){n(),e.opts.height&&e.$el.css("minHeight",e.opts.height-e.helpers.getPX(e.$el.css("padding-top"))-e.helpers.getPX(e.$el.css("padding-bottom")));var t=!1;if(e.opts.fullPage)for(var r=e.$el.find("span,p,div"),o=0;o<r.length;o++)if(r[o].style.height&&r[o].style.height.includes("vh")){t=!0;break}e.opts.fullPage&&t&&(e.opts.heightMin&&e.$iframe.css("minHeight",e.opts.heightMin),e.opts.heightMax&&e.$iframe.css("maxHeight",e.opts.heightMax),e.$el.css("overflow-y","auto")),e.$iframe.height(e.$el.outerHeight(!0))}function n(){e.opts.heightMin?e.$el.css("minHeight",e.opts.heightMin):e.$el.css("minHeight",""),e.opts.heightMax?(e.$wp.css("maxHeight",e.opts.heightMax),e.$wp.css("overflow","auto")):(e.$wp.css("maxHeight",""),e.$wp.css("overflow","")),e.opts.height?(e.$wp.css("height",e.opts.height),e.$wp.css("overflow","auto"),e.$el.css("minHeight",e.opts.height-e.helpers.getPX(e.$el.css("padding-top"))-e.helpers.getPX(e.$el.css("padding-bottom")))):(e.$wp.css("height",""),e.opts.heightMin||e.$el.css("minHeight",""),e.opts.heightMax||e.$wp.css("overflow","")),e.opts.width&&e.$box.width(e.opts.width)}return{_init:function(){if(!e.$wp)return!1;n(),e.$iframe&&(e.events.on("keyup keydown",(function(){setTimeout(t,0)}),!0),e.events.on("commands.after html.set init initialized paste.after",t))},syncIframe:t,refresh:n}},Object.assign(t.DEFAULTS,{documentReady:!1,editorClass:null,typingTimer:500,iframe:!1,requestWithCORS:!0,requestWithCredentials:!1,requestHeaders:{},useClasses:!0,spellcheck:!0,iframeDefaultStyle:'html{margin:0px;height:auto;}body{height:auto;padding:20px;background:transparent;color:#000000;position:relative;z-index: 2;-webkit-user-select:auto;margin:0px;overflow:hidden;min-height:20px;}body:after{content:"";display:block;clear:both;}body::-moz-selection{background:#b5d6fd;color:#000;}body::selection{background:#b5d6fd;color:#000;}',iframeStyle:"",iframeStyleFiles:[],direction:"auto",zIndex:1,tabIndex:null,disableRightClick:!1,scrollableContainer:"body",keepFormatOnDelete:!1,theme:null}),t.MODULES.core=function(a){var e=a.$;function n(){if(a.$box.addClass("fr-box".concat(a.opts.editorClass?" ".concat(a.opts.editorClass):"")),a.$box.attr("role","application"),a.$wp.addClass("fr-wrapper"),a.opts.documentReady&&a.$box.addClass("fr-document"),a.opts.iframe||a.$el.addClass("fr-element fr-view"),(a.opts.height&&a.opts.height<window.innerHeight||a.opts.heightMax&&a.opts.heightMax<window.innerHeight)&&a.$el.addClass("fr-element-scroll-visible"),a.opts.iframe){a.$iframe.addClass("fr-iframe"),a.$el.addClass("fr-view");for(var e=0;e<a.o_doc.styleSheets.length;e++){var t=void 0;try{t=a.o_doc.styleSheets[e].cssRules}catch(e){}if(t)for(var n=0,r=t.length;n<r;n++)!t[n].selectorText||0!==t[n].selectorText.indexOf(".fr-view")&&0!==t[n].selectorText.indexOf(".fr-element")||0<t[n].style.cssText.length&&(0===t[n].selectorText.indexOf(".fr-view")?a.opts.iframeStyle+="".concat(t[n].selectorText.replace(/\.fr-view/g,"body"),"{").concat(t[n].style.cssText,"}"):a.opts.iframeStyle+="".concat(t[n].selectorText.replace(/\.fr-element/g,"body"),"{").concat(t[n].style.cssText,"}"))}}"auto"!==a.opts.direction&&a.$box.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(a.opts.direction)),a.$el.attr("dir",a.opts.direction),a.$wp.attr("dir",a.opts.direction),1<a.opts.zIndex&&a.$box.css("z-index",a.opts.zIndex),a.opts.theme&&a.$box.addClass("".concat(a.opts.theme,"-theme")),a.opts.tabIndex=a.opts.tabIndex||a.$oel.attr("tabIndex"),a.opts.tabIndex&&a.$el.attr("tabIndex",a.opts.tabIndex)}return{_init:function(){if(t.INSTANCES.push(a),a.drag_support={filereader:"undefined"!=typeof FileReader,formdata:Boolean(a.win.FormData),progress:"upload"in new XMLHttpRequest},a.$wp){n(),a.html.set(a._original_html),a.$el.attr("spellcheck",a.opts.spellcheck),a.helpers.isMobile()&&(a.$el.attr("autocomplete",a.opts.spellcheck?"on":"off"),a.$el.attr("autocorrect",a.opts.spellcheck?"on":"off"),a.$el.attr("autocapitalize",a.opts.spellcheck?"on":"off")),a.opts.disableRightClick&&a.events.$on(a.$el,"contextmenu",(function(e){if(2===e.button)return e.preventDefault(),e.stopPropagation(),!1}));try{a.doc.execCommand("styleWithCSS",!1,!1)}catch(e){}}"TEXTAREA"===a.$oel.get(0).tagName&&(a.events.on("contentChanged",(function(){a.$oel.val(a.html.get())})),a.events.on("form.submit",(function(){a.$oel.val(a.html.get())})),a.events.on("form.reset",(function(){a.html.set(a._original_html)})),a.$oel.val(a.html.get())),a.helpers.isIOS()&&a.events.$on(a.$doc,"selectionchange",(function(){a.$doc.get(0).hasFocus()||a.$win.get(0).focus()})),a.events.trigger("init"),a.opts.autofocus&&!a.opts.initOnClick&&a.$wp&&a.events.on("initialized",(function(){a.events.focus(!0)}))},destroy:function(e){"TEXTAREA"===a.$oel.get(0).tagName&&a.$oel.val(e),a.$box&&a.$box.removeAttr("role"),a.$wp&&("TEXTAREA"===a.$oel.get(0).tagName?(a.$el.html(""),a.$wp.html(""),a.$box.replaceWith(a.$oel),a.$oel.show()):(a.$wp.replaceWith(e),a.$el.html(""),a.$box.removeClass("fr-view fr-ltr fr-box ".concat(a.opts.editorClass||"")),a.opts.theme&&a.$box.addClass("".concat(a.opts.theme,"-theme")))),this.$wp=null,this.$el=null,this.el=null,this.$box=null},isEmpty:function(){return a.node.isEmpty(a.el)},getXHR:function(e,t){var n=new XMLHttpRequest;for(var r in n.open(t,e,!0),a.opts.requestWithCredentials&&(n.withCredentials=!0),a.opts.requestHeaders)Object.prototype.hasOwnProperty.call(a.opts.requestHeaders,r)&&n.setRequestHeader(r,a.opts.requestHeaders[r]);return n},injectStyle:function(t){if(a.opts.iframe){a.$head.find("style[data-fr-style], link[data-fr-style]").remove(),a.$head.append('<style data-fr-style="true">'.concat(t,"</style>"));for(var n=0;n<a.opts.iframeStyleFiles.length;n++){var r=e('<link data-fr-style="true" rel="stylesheet" href="'.concat(a.opts.iframeStyleFiles[n],'">'));r.get(0).addEventListener("load",a.size.syncIframe),a.$head.append(r)}}},hasFocus:function(){return a.browser.mozilla&&a.helpers.isMobile()?a.selection.inEditor():a.node.hasFocus(a.el)||0<a.$el.find("*:focus").length},sameInstance:function(e){if(!e)return!1;var t=e.data("instance");return!!t&&t.id===a.id}}},t.POPUP_TEMPLATES={"text.edit":"[_EDIT_]"},t.RegisterTemplate=function(e,n){t.POPUP_TEMPLATES[e]=n},t.MODULES.popups=function(e){var n,r=e.$;e.shared.popups||(e.shared.popups={});var u,g=e.shared.popups;function o(t,n){n.isVisible()||(n=e.$sc),n.is(g[t].data("container"))||(g[t].data("container",n),n.append(g[t]))}function c(t){var n;t.find(".fr-upload-progress").addClass("fr-height-set"),t.find(".fr-upload-progress").removeClass("fr-height-auto"),e.popups.get("filesManager.insert").removeClass("fr-height-auto"),t.find(".fr-files-upload-layer").hasClass("fr-active")&&(n=1),t.find(".fr-files-by-url-layer").hasClass("fr-active")&&(n=2),t.find(".fr-files-embed-layer").hasClass("fr-active")&&(n=3),t.find(".fr-upload-progress-layer").get(0).clientHeight+10<t.find(".fr-upload-progress").get(0).clientHeight&&t.find(".fr-upload-progress").addClass("fr-height-auto"),400<t[0].clientHeight&&(t[0].childNodes[4].style.height="".concat(t[0].clientHeight-(t[0].childNodes[0].clientHeight+t[0].childNodes[n].clientHeight)-80,"px"))}var i=2e3;function a(){r(this).toggleClass("fr-not-empty",!0)}function s(){var e=r(this);e.toggleClass("fr-not-empty",""!==e.val())}function l(t){return g[t]&&e.node.hasClass(g[t],"fr-active")&&e.core.sameInstance(g[t])||!1}function d(e){for(var t in g)if(Object.prototype.hasOwnProperty.call(g,t)&&l(t)&&(void 0===e||g[t].data("instance")===e))return g[t];return!1}function h(t){var n=null;if(n="string"!=typeof t?t:g[t],"filesManager.insert"===t&&void 0!==e.filesManager&&e.filesManager.isChildWindowOpen())return!1;if(n&&e.node.hasClass(n,"fr-active")&&(n.removeClass("fr-active fr-above"),e.events.trigger("popups.hide.".concat(t)),e.$tb&&(1<e.opts.zIndex?e.$tb.css("zIndex",e.opts.zIndex+1):e.$tb.css("zIndex","")),e.events.disableBlur(),n.find("input, textarea, button").each((function(){this===this.ownerDocument.activeElement&&this.blur()})),n.find("input, textarea").attr("disabled","disabled"),u))for(var o=0;o<u.length;o++)r(u[o]).removeClass("fr-btn-active-popup")}function b(e){for(var t in void 0===e&&(e=[]),g)Object.prototype.hasOwnProperty.call(g,t)&&e.indexOf(t)<0&&h(t)}function f(){e.shared.exit_flag=!0}function m(){e.shared.exit_flag=!1}function v(){return e.shared.exit_flag}function _(n,o){var c,l=function(n,r){var o=t.POPUP_TEMPLATES[n];if(!o)return null;for(var c in"function"==typeof o&&(o=o.apply(e)),r)Object.prototype.hasOwnProperty.call(r,c)&&(o=o.replace("[_".concat(c.toUpperCase(),"_]"),r[c]));return o}(n,o),d=r(e.doc.createElement("DIV"));if(!l)return"filesManager.insert"===n?d.addClass("fr-popup fr-files-manager fr-empty"):d.addClass("fr-popup fr-empty"),(c=r("body").first()).append(d),d.data("container",c),g[n]=d;"filesManager.insert"===n?d.addClass("fr-popup fr-files-manager".concat(e.helpers.isMobile()?" fr-mobile":" fr-desktop").concat(e.opts.toolbarInline?" fr-inline":"")):d.addClass("fr-popup".concat(e.helpers.isMobile()?" fr-mobile":" fr-desktop").concat(e.opts.toolbarInline?" fr-inline":"")),d.html(l),e.opts.theme&&d.addClass("".concat(e.opts.theme,"-theme")),1<e.opts.zIndex&&(!e.opts.editInPopup&&e.$tb?e.$tb.css("z-index",e.opts.zIndex+2):d.css("z-index",e.opts.zIndex+2)),"auto"!==e.opts.direction&&d.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(e.opts.direction)),d.find("input, textarea").attr("dir",e.opts.direction).attr("disabled","disabled"),(c=r("body").first()).append(d),d.data("container",c);var i=(g[n]=d).find(".fr-color-hex-layer");if(0<i.length){var a=e.helpers.getPX(d.find(".fr-color-set > span").css("width")),s=e.helpers.getPX(i.css("paddingLeft")),h=e.helpers.getPX(i.css("paddingRight"));i.css("width",a*e.opts.colorsStep+s+h)}return e.button.bindCommands(d,!1),d}function y(a){var s=g[a];return{_windowResize:function(){var t=s.data("instance")||e;if(!t.helpers.isMobile()&&s.isVisible()){var n=s.find(".fr-file-progress-bar-layer");if("file.insert"===a&&0<n.length&&n.hasClass("fr-active")){var r=e.$tb.find('.fr-command[data-cmd="insertFile"]');t.events.disableBlur();var o=e.button.getPosition(r),c=o.left,i=o.top;e.position.at(c,i,g[a],0),t.events.enableBlur()}else t.events.disableBlur(),t.popups.hide(a),t.events.enableBlur()}},_inputFocus:function(t){var n=s.data("instance")||e,o=r(t.currentTarget);if(o.is("input:file")&&o.closest(".fr-layer").addClass("fr-input-focus"),t.preventDefault(),t.stopPropagation(),setTimeout((function(){n.events.enableBlur()}),100),n.helpers.isMobile()){var c=r(n.o_win).scrollTop();setTimeout((function(){r(n.o_win).scrollTop(c)}),0)}},_inputBlur:function(t){var n=s.data("instance")||e,o=r(t.currentTarget);o.is("input:file")&&o.closest(".fr-layer").removeClass("fr-input-focus"),document.activeElement!==this&&r(this).isVisible()&&(n.events.blurActive()&&n.events.trigger("blur"),n.events.enableBlur())},_editorKeydown:function(n){var r=s.data("instance")||e;r.keys.ctrlKey(n)||n.which===t.KEYCODE.ALT||n.which===t.KEYCODE.ESC||(l(a)&&s.findVisible(".fr-back").length?r.button.exec(s.findVisible(".fr-back").first()):n.which!==t.KEYCODE.ALT&&r.popups.hide(a))},_preventFocus:function(t){var n=s.data("instance")||e,o=t.originalEvent?t.originalEvent.target||t.originalEvent.originalTarget:null;"mouseup"===t.type||r(o).is(":focus")||n.events.disableBlur(),"mouseup"!==t.type||r(o).hasClass("fr-command")||0<r(o).parents(".fr-command").length||r(o).hasClass("fr-dropdown-content")||e.button.hideActiveDropdowns(s),(e.browser.safari||e.browser.mozilla)&&"mousedown"===t.type&&r(o).is("input[type=file]")&&n.events.disableBlur();var c="input, textarea, button, select, label, .fr-command";if(o&&!r(o).is(c)&&0===r(o).parents(c).length)return t.stopPropagation(),!1;o&&r(o).is(c)&&t.stopPropagation(),m()},_editorMouseup:function(){s.isVisible()&&v()&&0<s.findVisible("input:focus, textarea:focus, button:focus, select:focus").length&&e.events.disableBlur()},_windowMouseup:function(t){if(!e.core.sameInstance(s))return!0;var n=s.data("instance")||e;s.isVisible()&&v()&&(t.stopPropagation(),n.markers.remove(),n.popups.hide(a),m())},_windowKeydown:function(n){if(!e.core.sameInstance(s))return!0;var r=s.data("instance")||e,o=n.which;if(t.KEYCODE.ESC===o){if(r.popups.isVisible(a)&&r.opts.toolbarInline)return n.stopPropagation(),r.popups.isVisible(a)&&(s.findVisible(".fr-back").length?(r.button.exec(s.findVisible(".fr-back").first()),r.accessibility.focusPopupButton(s)):s.findVisible(".fr-dismiss").length?r.button.exec(s.findVisible(".fr-dismiss").first()):(r.popups.hide(a),r.toolbar.showInline(null,!0),r.accessibility.focusPopupButton(s))),!1;if(r.popups.isVisible(a))return s.findVisible(".fr-back").length?(r.button.exec(s.findVisible(".fr-back").first),r.accessibility.focusPopupButton(s)):s.findVisible(".fr-dismiss").length?r.button.exec(s.findVisible(".fr-dismiss").first()):(r.popups.hide(a),r.accessibility.focusPopupButton(s)),!1}},_repositionPopup:function(){if(!e.opts.height&&!e.opts.heightMax||e.opts.toolbarInline)return!0;if(e.$wp&&l(a)&&s.parent().get(0)===e.$sc.get(0)){var t=s.offset().top-e.$wp.offset().top,n=e.$wp.outerHeight();e.node.hasClass(s.get(0),"fr-above")&&(t+=s.outerHeight()),n<t||t<0?s.addClass("fr-hidden"):s.removeClass("fr-hidden")}},handleWindowClick:function(t){if(!e.core.sameInstance(s))return!0;var n=s.data("instance")||e;s.isVisible()&&t.target&&(0<r(t.target).find("body").length||"BODY"===r(t.target)[0].tagName)&&(t.stopPropagation(),n.popups.hide(a))}}}function E(t,n){e.events.on("mouseup",t._editorMouseup,!0),e.$wp&&e.events.on("keydown",t._editorKeydown),e.events.on("focus",(function(){g[n].removeClass("focused")})),e.events.on("blur",(function(){d()&&e.markers.remove(),e.helpers.isMobile()?g[n].hasClass("focused")?(b(),g[n].removeClass("focused")):g[n].addClass("focused"):g[n].find("iframe").length||b()})),e.$wp&&!e.helpers.isMobile()&&e.events.$on(e.$wp,"scroll.popup".concat(n),t._repositionPopup),e.events.on("window.mouseup",t._windowMouseup,!0),e.events.on("window.keydown",t._windowKeydown,!0),e.opts.iframe&&window.addEventListener("click",t.handleWindowClick),g[n].data("inst".concat(e.id),!0),e.events.on("destroy",(function(){e.core.sameInstance(g[n])&&(r("body").first().append(g[n]),g[n].removeClass("fr-active"))}),!0)}function p(){var e=r(this).prev().children().first();e.attr("checked",!e.attr("checked"))}function C(){for(var e in g)if(Object.prototype.hasOwnProperty.call(g,e)){var t=g[e];t&&(t.html("").removeData().remove(),g[e]=null)}g=[]}return e.shared.exit_flag=!1,{_init:function(){n=window.innerHeight,e.events.on("shared.destroy",C,!0),e.events.on("window.mousedown",f),e.events.on("window.touchmove",m),e.events.$on(r(e.o_win),"scroll",m),e.events.on("mousedown",(function(t){d()&&(t.stopPropagation(),e.$el.find(".fr-marker").remove(),f(),e.events.disableBlur())}))},create:function(t,n){var o=_(t,n),c=y(t);E(c,t),e.events.$on(o,"mousedown mouseup touchstart touchend touch","*",c._preventFocus,!0),e.events.$on(o,"focus","input, textarea, button, select",c._inputFocus,!0),e.events.$on(o,"blur","input, textarea, button, select",c._inputBlur,!0);var l=o.find("input, textarea");return function(e){for(var t=0;t<e.length;t++){var n=e[t],o=r(n);0===o.next().length&&o.attr("placeholder")&&(o.after('<label for="'.concat(o.attr("id"),'">').concat(o.attr("placeholder"),"</label>")),o.attr("placeholder",""))}}(l),e.events.$on(l,"focus",a),e.events.$on(l,"blur change",s),e.events.$on(o,"click",".fr-checkbox + label",p),e.accessibility.registerPopup(t),e.helpers.isIOS()&&e.events.$on(o,"touchend","label",(function(){r("#".concat(r(this).attr("for"))).prop("checked",(function(e,t){return!t}))}),!0),e.events.$on(r(e.o_win),"resize",c._windowResize,!0),"filesManager.insert"===t&&g["filesManager.insert"].css("zIndex",2147483641),o},get:function(t){var n=g[t];return n&&!n.data("inst".concat(e.id))&&E(y(t),t),n},show:function(t,n,r,c,h){if(l(t)||(d()&&0<e.$el.find(".fr-marker").length?(e.events.disableBlur(),e.selection.restore()):d()||(e.events.disableBlur(),e.events.focus(),e.events.enableBlur())),b([t]),!g[t])return!1;var i=e.button.getButtons(".fr-dropdown.fr-active");i.removeClass("fr-active").attr("aria-expanded",!1).parents(".fr-toolbar").css("zIndex","").find("> .fr-dropdown-wrapper").css("height",""),i.next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),g[t].data("instance",e),e.$tb&&e.$tb.data("instance",e);var a=l(t);g[t].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");var s=g[t].data("container");if(function(t,n){n.isVisible()||(n=e.$sc),n.contains([g[t].get(0)])||n.append(g[t])}(t,s),e.opts.toolbarInline&&s&&e.$tb&&s.get(0)===e.$tb.get(0)&&(o(t,e.$sc),r=e.$tb.offset().top-e.helpers.getPX(e.$tb.css("margin-top")),n=e.$tb.offset().left+e.$tb.outerWidth()/2,e.node.hasClass(e.$tb.get(0),"fr-above")&&r&&(r+=e.$tb.outerHeight()),c=0),s=g[t].data("container"),e.opts.iframe&&!c&&!a){var f=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),v=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));n&&(n-=e.$iframe.offset().left+v),r&&(r-=e.$iframe.offset().top+f)}s.is(e.$tb)?e.$tb.css("zIndex",(e.opts.zIndex||1)+4):g[t].css("zIndex",(e.opts.zIndex||1)+3),e.opts.toolbarBottom&&s&&e.$tb&&s.get(0)===e.$tb.get(0)&&(g[t].addClass("fr-above"),r&&(r-=g[t].outerHeight())),h&&(n-=g[t].width()/2),n+g[t].outerWidth()>e.$sc.offset().left+e.$sc.width()&&(n-=n+g[t].outerWidth()-e.$sc.offset().left-e.$sc.width()),n<e.$sc.offset().left&&"rtl"===e.opts.direction&&(n=e.$sc.offset().left),g[t].removeClass("fr-active"),e.position.at(n,r,g[t],c||0);var _=e.node.blockParent(e.selection.blocks()[0]);if(_&&"false"===_.getAttribute("contenteditable"))g[t].removeClass("fr-active");else{var E=e.selection.element().parentElement.getAttribute("contenteditable");E&&"false"===E?g[t].removeClass("fr-active"):g[t].addClass("fr-active")}a||e.accessibility.focusPopup(g[t]),e.opts.toolbarInline&&e.toolbar.hide(),e.$tb&&(u=e.$tb.find(".fr-btn-active-popup")),e.events.trigger("popups.show.".concat(t)),y(t)._repositionPopup(),m()},hide:h,onHide:function(t,n){e.events.on("popups.hide.".concat(t),n)},hideAll:b,setContainer:o,refresh:function(t){g[t].data("instance",e),e.events.trigger("popups.refresh.".concat(t));for(var n=g[t].find(".fr-command"),o=0;o<n.length;o++){var c=r(n[o]);0===c.parents(".fr-dropdown-menu").length&&e.button.refresh(c)}},onRefresh:function(t,n){e.events.on("popups.refresh.".concat(t),n)},onShow:function(t,n){e.events.on("popups.show.".concat(t),n)},isVisible:l,setFileListHeight:c,areVisible:d,setPopupDimensions:function(t,r){r&&t.find(".fr-upload-progress-layer").get(0).clientHeight<i&&(t.find(".fr-upload-progress").addClass("fr-height-auto"),e.popups.get("filesManager.insert").addClass("fr-height-auto"),t.find(".fr-upload-progress").removeClass("fr-height-set"),i=2e3),t.get(0).clientHeight>window.innerHeight/2&&(window.innerWidth<500?t.get(0).clientHeight>.6*n&&c(t):400<t.get(0).clientHeight&&c(t),i=t.find(".fr-upload-progress-layer").get(0).clientHeight);var o=window.innerWidth;switch(!0){case o<=320:t.width(200);break;case o<=420:t.width(250);break;case o<=520:t.width(300);break;case o<=720:t.width(400);break;case 720<o:t.width(530)}}}},t.MODULES.accessibility=function(e){var p=e.$,i=!0;function n(t){for(var n=e.$el.find('[contenteditable="true"]'),r=!1,o=0;n.get(o);)p(n.get(o)).is(":focus")&&(r=!0),o++;if(t&&t.length&&!r){t.data("blur-event-set")||t.parents(".fr-popup").length||(e.events.$on(t,"blur",(function(){var n=t.parents(".fr-toolbar, .fr-popup").data("instance")||e;n.events.blurActive()&&!e.core.hasFocus()&&n.events.trigger("blur"),setTimeout((function(){n.events.enableBlur()}),100)}),!0),t.data("blur-event-set",!0));var c=t.parents(".fr-toolbar, .fr-popup").data("instance")||e;e.browser.safari&&(e.shared.safariSelection=e.selection.get().getRangeAt(0).cloneRange()),c.events.disableBlur(),t.get(0).focus(),e.shared.$f_el=t}}function r(e,t){var r=t?"last":"first",o=s(g(e))[r]();if(o.length)return n(o),!0}function a(t){return t.is("input, textarea, select")&&o(),e.events.disableBlur(),t.get(0).focus(),!0}function u(t,n){var r=t.find("input, textarea, button, select").filter((function(){return p(this).isVisible()})).not(":disabled");if((r=n?r.last():r.first()).length)return a(r);if(e.shared.with_kb){var o=t.findVisible(".fr-active-item").first();if(o.length)return a(o);var c=t.findVisible("[tabIndex]").first();if(c.length)return a(c)}}function o(){0===e.$el.find(".fr-marker").length&&e.core.hasFocus()&&e.selection.save()}function c(){var t=e.popups.areVisible();if(t){var n=t.find(".fr-buttons");return n.find("button:focus, .fr-group span:focus").length?!r(t.data("instance").$tb):!r(n)}return!r(e.$tb)}function l(){var t=null;return e.shared.$f_el.is(".fr-dropdown.fr-active")?t=e.shared.$f_el:e.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active")&&(t=e.shared.$f_el.closest(".fr-dropdown-menu").prev()),t}function s(t){for(var n=-1,r=0;r<t.length;r++)p(t[r]).hasClass("fr-open")&&(n=r);var o=t.index(e.$tb.find(".fr-more-toolbar.fr-expanded > button.fr-command").first());if(0<o&&-1!==n){var c=t.slice(o,t.length),i=(t=t.slice(0,o)).slice(0,n+1),a=t.slice(n+1,t.length);t=i;for(var s=0;s<c.length;s++)t.push(c[s]);for(var l=0;l<a.length;l++)t.push(a[l])}return t}function g(e){return e.findVisible("button:not(.fr-disabled), .fr-group span.fr-command").filter((function(e){var t=p(e).parents(".fr-more-toolbar");return 0===t.length||0<t.length&&t.hasClass("fr-expanded")}))}function d(t,o,c){if(e.shared.$f_el){var d=l();d&&(e.button.click(d),e.shared.$f_el=d);var a,h=s(g(t)),i=h.index(e.shared.$f_el);return 0===i&&!c||i===h.length-1&&c?(o&&(t.parent().is(".fr-popup")&&(a=!u(t.parent().children().not(".fr-buttons"),!c)),!1===a&&(e.shared.$f_el=null)),o&&!1===a||r(t,!c)):n(p(h.get(i+(c?1:-1)))),!1}}function h(e,t){return d(e,t,!0)}function f(e,t){return d(e,t)}function m(t){if(e.shared.$f_el){var r;if(e.shared.$f_el.is(".fr-dropdown.fr-active"))return n(r=t?e.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()),!1;if(e.shared.$f_el.is("a.fr-command"))return(r=t?e.shared.$f_el.closest("li").nextAllVisible().first().find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.closest("li").prevAllVisible().first().find(".fr-command:not(.fr-disabled)").first()).length||(r=t?e.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first():e.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()),n(r),!1}}function b(){if(e.shared.$f_el){if(e.shared.$f_el.hasClass("fr-dropdown"))e.button.click(e.shared.$f_el);else if(e.shared.$f_el.is("button.fr-back")){e.opts.toolbarInline&&(e.events.disableBlur(),e.events.focus());var t=e.popups.areVisible(e);t&&(e.shared.with_kb=!1),e.button.click(e.shared.$f_el),y(t)}else{if(e.events.disableBlur(),e.button.click(e.shared.$f_el),e.shared.$f_el.attr("data-group-name")){var r=e.$tb.find('.fr-more-toolbar[data-name="'.concat(e.shared.$f_el.attr("data-group-name"),'"]')),o=e.shared.$f_el;r.hasClass("fr-expanded")&&(o=r.findVisible("button:not(.fr-disabled)").first()),o&&n(o)}else if(e.shared.$f_el.attr("data-popup")){var c=e.popups.areVisible(e);c&&c.data("popup-button",e.shared.$f_el)}else if(e.shared.$f_el.attr("data-modal")){var l=e.modals.areVisible(e);l&&l.data("modal-button",e.shared.$f_el)}e.shared.$f_el=null}return!1}}function v(){e.shared.$f_el&&(e.events.disableBlur(),e.shared.$f_el.blur(),e.shared.$f_el=null),!1!==e.events.trigger("toolbar.focusEditor")&&(e.events.disableBlur(),e.$el.get(0).focus(),e.events.focus())}function _(t){t&&t.length&&(e.events.$on(t,"keydown",(function(n){if(!p(n.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command"))return!0;var r=t.parents(".fr-popup").data("instance")||t.data("instance")||e;if(e.shared.with_kb=!0,e.browser.safari&&e.shared.safariSelection){var o=e.shared.safariSelection,c=o.startContainer,l=o.endContainer,i=o.startOffset,a=o.endOffset,s=e.doc.createRange();s.setStart(c,i),s.setEnd(l,a),e.selection.get().addRange(s)}var d=r.accessibility.exec(n,t);return e.shared.with_kb=!1,d}),!0),e.events.$on(t,"mouseenter","[tabIndex]",(function(n){var r=t.parents(".fr-popup").data("instance")||t.data("instance")||e;if(!i)return n.stopPropagation(),void n.preventDefault();var o=p(n.currentTarget);r.shared.$f_el&&r.shared.$f_el.not(o)&&r.accessibility.focusEditor()}),!0),e.$tb&&e.events.$on(e.$tb,"transitionend",".fr-more-toolbar",(function(){e.shared.$f_el=p(document.activeElement)})))}function y(e){var t=e.data("popup-button");t&&setTimeout((function(){n(t),e.data("popup-button",null)}),0)}function E(t){var n=e.popups.areVisible(t);n&&n.data("popup-button",null)}function C(n){var r=-1!==navigator.userAgent.indexOf("Mac OS X")?n.metaKey:n.ctrlKey;if(n.which!==t.KEYCODE.F10||r||n.shiftKey||!n.altKey)return!0;e.shared.with_kb=!0;var o=e.popups.areVisible(e),l=!1;return o&&(l=u(o.children().not(".fr-buttons"))),l||c(),e.shared.with_kb=!1,n.preventDefault(),n.stopPropagation(),!1}return{_init:function(){e.$wp?e.events.on("keydown",C,!0):e.events.$on(e.$win,"keydown",C,!0),e.events.on("mousedown",(function(t){E(e),e.shared.$f_el&&e.el.isSameNode(e.shared.$f_el[0])&&(e.accessibility.restoreSelection(),t.stopPropagation(),e.events.disableBlur(),e.shared.$f_el=null)}),!0),e.events.on("blur",(function(){e.shared.$f_el=null,E(e)}),!0)},registerPopup:function(n){var o=e.popups.get(n),c=function(n){var o=e.popups.get(n);return{_tiKeydown:function(c){var l=o.data("instance")||e;if(!1===l.events.trigger("popup.tab",[c]))return!1;var d=c.which,h=o.find(":focus").first();if(t.KEYCODE.TAB===d){c.preventDefault();var f=o.children().not(".fr-buttons"),i=f.findVisible("input, textarea, button, select").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(),a=i.indexOf(this)+(c.shiftKey?-1:1);if(0<=a&&a<i.length)return l.events.disableBlur(),p(i[a]).focus(),c.stopPropagation(),!1;var s=o.find(".fr-buttons");if(s.length&&r(s,Boolean(c.shiftKey)))return c.stopPropagation(),!1;if(u(f))return c.stopPropagation(),!1}else{if(t.KEYCODE.ENTER!==d||!c.target||"TEXTAREA"===c.target.tagName)return t.KEYCODE.ESC===d?(c.preventDefault(),c.stopPropagation(),l.accessibility.restoreSelection(),l.popups.isVisible(n)&&o.findVisible(".fr-back").length?(l.opts.toolbarInline&&(l.events.disableBlur(),l.events.focus()),l.button.exec(o.findVisible(".fr-back").first()),y(o)):l.popups.isVisible(n)&&o.findVisible(".fr-dismiss").length?l.button.exec(o.findVisible(".fr-dismiss").first()):(l.popups.hide(n),l.opts.toolbarInline&&l.toolbar.showInline(null,!0),y(o)),!1):t.KEYCODE.SPACE===d&&(h.is(".fr-submit")||h.is(".fr-dismiss"))?(c.preventDefault(),c.stopPropagation(),l.events.disableBlur(),l.button.exec(h),!0):l.keys.isBrowserAction(c)||h.is("input[type=text], textarea")||t.KEYCODE.SPACE===d&&(h.is(".fr-link-attr")||h.is("input[type=file]"))?void c.stopPropagation():(c.stopPropagation(),c.preventDefault(),!1);var m=null;0<o.findVisible(".fr-submit").length?m=o.findVisible(".fr-submit").first():o.findVisible(".fr-dismiss").length&&(m=o.findVisible(".fr-dismiss").first()),m&&(c.preventDefault(),c.stopPropagation(),l.events.disableBlur(),l.button.exec(m))}},_tiMouseenter:function(){E(o.data("instance")||e)}}}(n);_(o.find(".fr-buttons")),e.events.$on(o,"mouseenter","tabIndex",c._tiMouseenter,!0),e.events.$on(o.children().not(".fr-buttons"),"keydown","[tabIndex]",c._tiKeydown,!0),e.popups.onHide(n,(function(){(o.data("instance")||e).accessibility.restoreSelection()})),e.popups.onShow(n,(function(){i=!1,setTimeout((function(){i=!0}),0)}))},registerToolbar:_,focusToolbarElement:n,focusToolbar:r,focusContent:u,focusPopup:function(t){var n=t.children().not(".fr-buttons");n.data("mouseenter-event-set")||(e.events.$on(n,"mouseenter","[tabIndex]",(function(r){var o=t.data("instance")||e;if(!i)return r.stopPropagation(),void r.preventDefault();var c=n.find(":focus").first();c.length&&!c.is("input, button, textarea, select")&&(o.events.disableBlur(),c.blur(),o.events.disableBlur(),o.events.focus())})),n.data("mouseenter-event-set",!0)),!u(n)&&e.shared.with_kb&&r(t.find(".fr-buttons"))},focusModal:function(t){e.core.hasFocus()||(e.events.disableBlur(),e.events.focus()),e.accessibility.saveSelection(),e.events.disableBlur(),e.el.blur(),e.selection.clear(),e.events.disableBlur(),e.shared.with_kb?t.find(".fr-command[tabIndex], [tabIndex]").first().focus():t.find("[tabIndex]").first().focus()},focusEditor:v,focusPopupButton:y,focusModalButton:function(e){var t=e.data("modal-button");t&&setTimeout((function(){n(t),e.data("modal-button",null)}),0)},hasFocus:function(){return null!==e.shared.$f_el},exec:function(r,o){var d=-1!==navigator.userAgent.indexOf("Mac OS X")?r.metaKey:r.ctrlKey,_=r.which,E=!1;return _!==t.KEYCODE.TAB||d||r.shiftKey||r.altKey?_!==t.KEYCODE.ARROW_RIGHT||d||r.shiftKey||r.altKey?_!==t.KEYCODE.TAB||d||!r.shiftKey||r.altKey?_!==t.KEYCODE.ARROW_LEFT||d||r.shiftKey||r.altKey?_!==t.KEYCODE.ARROW_UP||d||r.shiftKey||r.altKey?_!==t.KEYCODE.ARROW_DOWN||d||r.shiftKey||r.altKey?_!==t.KEYCODE.ENTER&&_!==t.KEYCODE.SPACE||d||r.shiftKey||r.altKey?_!==t.KEYCODE.ESC||d||r.shiftKey||r.altKey?_!==t.KEYCODE.F10||d||r.shiftKey||!r.altKey||(E=c()):E=function(t){if(e.shared.$f_el){var r=l();return r?(e.button.click(r),n(r)):t.parent().findVisible(".fr-back").length?(e.shared.with_kb=!1,e.opts.toolbarInline&&(e.events.disableBlur(),e.events.focus()),e.button.exec(t.parent().findVisible(".fr-back")).first(),y(t.parent())):e.shared.$f_el.is("button, .fr-group span")&&(t.parent().is(".fr-popup")?(e.accessibility.restoreSelection(),e.shared.$f_el=null,!1!==e.events.trigger("toolbar.esc")&&(e.popups.hide(t.parent()),e.opts.toolbarInline&&e.toolbar.showInline(null,!0),y(t.parent()))):v()),!1}}(o):E=b():E=e.shared.$f_el&&e.shared.$f_el.is(".fr-dropdown:not(.fr-active)")?b():m(!0):E=m():E=f(o):E=f(o,!0):E=h(o):E=h(o,!0),e.shared.$f_el||void 0!==E||(E=!0),!E&&e.keys.isBrowserAction(r)&&(E=!0),!!E||(r.preventDefault(),r.stopPropagation(),!1)},saveSelection:o,restoreSelection:function(){e.$el.find(".fr-marker").length&&(e.events.disableBlur(),e.selection.restore(),e.events.enableBlur())}}},Object.assign(t.DEFAULTS,{tooltips:!0}),t.MODULES.tooltip=function(e){var p=e.$;function n(){e.helpers.isMobile()||e.$tooltip&&e.$tooltip.removeClass("fr-visible").css("left","-3000px").css("position","fixed")}function r(n,r){if(!e.helpers.isMobile()){var o=n.attr("id")&&n.attr("id").split("-")[0],c=n.attr("title"),l=e.opts.trackChangesEnabled,i=e.opts.showChangesEnabled;if(e.opts.toolbarContainer){for(var a=!1,s=0;s<t.INSTANCES.length;s++)if(t.INSTANCES[s].core.hasFocus()){l=t.INSTANCES[s].opts.trackChangesEnabled,i=t.INSTANCES[s].opts.showChangesEnabled,a=!0;break}a||(i=l=n.hasClass("fr-active"))}if("trackChanges"===o)c=l?"Disable Track Changes":"Enable Track Changes";else if("showChanges"===o)c=i?"Hide Changes":"Show Changes";else if(("applyAll"===o||"removeAll"===o||"applyLast"===o||"removeLast"===o)&&0===e.track_changes.getPendingChanges().length)return;if(n.data("title",c),n.data("title")){e.$tooltip||e.opts.tooltips&&!e.helpers.isMobile()&&(e.shared.$tooltip?e.$tooltip=e.shared.$tooltip:(e.shared.$tooltip=p(e.doc.createElement("DIV")).addClass("fr-tooltip"),e.$tooltip=e.shared.$tooltip,e.opts.theme&&e.$tooltip.addClass("".concat(e.opts.theme,"-theme")),p(e.o_doc).find("body").first().append(e.$tooltip)),e.events.on("shared.destroy",(function(){e.$tooltip.html("").removeData().remove(),e.$tooltip=null}),!0)),n.removeAttr("title"),e.$tooltip.text(e.language.translate(n.data("title"))),e.$tooltip.addClass("fr-visible");var d=n.offset().left+(n.outerWidth()-e.$tooltip.outerWidth())/2;d<0&&(d=0),d+e.$tooltip.outerWidth()>p(e.o_win).width()&&(d=p(e.o_win).width()-e.$tooltip.outerWidth()),void 0===r&&(r=e.opts.toolbarBottom),n.offset().top-p(window).scrollTop()+n.outerHeight()+10>=p(window).height()&&(r=!0);var h=r?n.offset().top-e.$tooltip.height():n.offset().top+n.outerHeight();e.$tooltip.css("position",""),e.$tooltip.css("left",d),e.$tooltip.css("top",Math.ceil(h)),"static"!==p(e.o_doc).find("body").first().css("position")?(e.$tooltip.css("margin-left",-p(e.o_doc).find("body").first().offset().left),e.$tooltip.css("margin-top",-p(e.o_doc).find("body").first().offset().top)):(e.$tooltip.css("margin-left",""),e.$tooltip.css("margin-top",""))}}}return{hide:n,to:r,bind:function(t,o,c){e.opts.tooltips&&!e.helpers.isMobile()&&(e.events.$on(t,"mouseover",o,(function(t){e.node.hasClass(t.currentTarget,"fr-disabled")||e.edit.isDisabled()||r(p(t.currentTarget),c)}),!0),e.events.$on(t,"mouseout ".concat(e._mousedown," ").concat(e._mouseup),o,(function(){n()}),!0))}}},t.TOOLBAR_VISIBLE_BUTTONS=3,t.MODULES.button=function(g){var u=g.$,a=[];(g.opts.toolbarInline||g.opts.toolbarContainer)&&(g.shared.buttons||(g.shared.buttons=[]),a=g.shared.buttons);var s=[];function e(e,t,n){for(var r=u(),o=0;o<e.length;o++){var i=u(e[o]);if(i.is(t)&&(r=r.add(i)),n&&i.is(".fr-dropdown")){var a=i.next().find(t);r=r.add(a)}}return r}function n(t,n){var r,o=u();if(!t)return o;for(r in o=(o=o.add(e(a,t,n))).add(e(s,t,n)),g.shared.popups)if(Object.prototype.hasOwnProperty.call(g.shared.popups,r)){var c=g.shared.popups[r].children().find(t);o=o.add(c)}for(r in g.shared.modals)if(Object.prototype.hasOwnProperty.call(g.shared.modals,r)){var i=g.shared.modals[r].$modal.find(t);o=o.add(i)}return o}function i(e){var r=e.next(),o=g.node.hasClass(e.get(0),"fr-active"),c=n(".fr-dropdown.fr-active").not(e),l=e.parents(".fr-toolbar, .fr-popup").data("instance")||g;l.helpers.isIOS()&&!l.el.querySelector(".fr-marker")&&(l.selection.save(),l.selection.clear(),l.selection.restore()),r.parents(".fr-more-toolbar").addClass("fr-overflow-visible");var i=0,a=0,s=r.find("> .fr-dropdown-wrapper");if(!o){var d=e.data("cmd");r.find(".fr-command").removeClass("fr-active").attr("aria-selected",!1),t.COMMANDS[d]&&t.COMMANDS[d].refreshOnShow&&t.COMMANDS[d].refreshOnShow.apply(l,[e,r]),r.css("left",e.offset().left-e.parents(".fr-btn-wrap, .fr-toolbar, .fr-buttons").offset().left-("rtl"===g.opts.direction?r.width()-e.outerWidth():0)),r.addClass("test-height"),i=r.outerHeight(),a=g.helpers.getPX(s.css("max-height")),r.removeClass("test-height"),r.css("top","").css("bottom","");var h=e.outerHeight()/10;if(!g.opts.toolbarBottom&&r.offset().top+e.outerHeight()+i<u(g.o_doc).height())r.css("top",e.position().top+e.outerHeight()-h);else{var f=0,m=e.parents(".fr-more-toolbar");0<m.length&&(f=m.first().height()),r.css("bottom",e.parents(".fr-popup, .fr-toolbar").first().height()-f-e.position().top)}}e.addClass("fr-blink").toggleClass("fr-active"),e.hasClass("fr-options")&&e.prev().toggleClass("fr-expanded"),e.hasClass("fr-active")?(r.attr("aria-hidden",!1),e.attr("aria-expanded",!0),function(e,t,n){n<=t&&(e.parent().css("overflow","auto"),e.parent().css("overflow-x","hidden")),e.css("height",Math.min(t,n))}(s,i,a)):(r.attr("aria-hidden",!0).css("overflow",""),e.attr("aria-expanded",!1),s.css("height","")),setTimeout((function(){e.removeClass("fr-blink")}),300),r.css("margin-left",""),r.offset().left+r.outerWidth()>g.$sc.offset().left+g.$sc.width()&&r.css("margin-left",-(r.offset().left+r.outerWidth()-g.$sc.offset().left-g.$sc.width())),r.offset().left<g.$sc.offset().left&&"rtl"===g.opts.direction&&r.css("margin-left",g.$sc.offset().left),c.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),c.prev(".fr-expanded").removeClass("fr-expanded"),c.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),0!==e.parents(".fr-popup").length||g.opts.toolbarInline||(g.node.hasClass(e.get(0),"fr-active")?g.$tb.css("zIndex",(g.opts.zIndex||1)+4):g.$tb.css("zIndex",""));var p=r.find("a.fr-command.fr-active").first();g.helpers.isMobile()||(p.length?(g.accessibility.focusToolbarElement(p),s.scrollTop(Math.abs(p.parents(".fr-dropdown-content").offset().top-p.offset().top)-p.offset().top)):(g.accessibility.focusToolbarElement(e),s.scrollTop(0)))}function r(e){e.addClass("fr-blink"),setTimeout((function(){e.removeClass("fr-blink")}),500);for(var t=e.data("cmd"),r=[];void 0!==e.data("param".concat(r.length+1));)r.push(e.data("param".concat(r.length+1)));var o=n(".fr-dropdown.fr-active");o.length&&(o.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),o.prev(".fr-expanded").removeClass("fr-expanded"),o.parents(".fr-toolbar:not(.fr-inline)").css("zIndex","")),e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t,r)}function o(e){var n=e.parents(".fr-popup, .fr-toolbar").data("instance"),o=g.popups.get("link.insert");if(0===e.parents(".fr-popup").length&&e.data("popup")&&!e.hasClass("fr-btn-active-popup")&&(e.attr("id")==="insertLink-".concat(g.id)&&o&&o.hasClass("fr-active")||e.addClass("fr-btn-active-popup")),0!==e.parents(".fr-popup").length||e.data("popup")||n.popups.hideAll(),n.popups.areVisible()&&!n.popups.areVisible(n)){for(var c=0;c<t.INSTANCES.length;c++)t.INSTANCES[c]!==n&&t.INSTANCES[c].popups&&t.INSTANCES[c].popups.areVisible()&&t.INSTANCES[c].$el.find(".fr-marker").remove();n.popups.hideAll()}g.node.hasClass(e.get(0),"fr-dropdown")?i(e):(function(e){r(e)}(e),t.COMMANDS[e.data("cmd")]&&!1!==t.COMMANDS[e.data("cmd")].refreshAfterCallback&&n.button.bulkRefresh())}function c(e){o(u(e.currentTarget))}function l(e){var t=e.find(".fr-dropdown.fr-active");t.length&&(t.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),t.prev().removeClass("fr-expanded"))}function p(e){e.preventDefault(),e.stopPropagation()}function d(e){if(e.stopPropagation(),!g.helpers.isMobile())return!1}function h(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=2<arguments.length?arguments[2]:void 0;if(g.helpers.isMobile()&&!1===t.showOnMobile)return"";var r=t.displaySelection;"function"==typeof r&&(r=r(g));var o="";if("options"!==t.type)if(r){var i="function"==typeof t.defaultSelection?t.defaultSelection(g):t.defaultSelection;o='<span style="width:'.concat(t.displaySelectionWidth||100,'px">').concat(g.language.translate(i||t.title),"</span>")}else o=g.icon.create(t.icon||e),o+='<span class="fr-sr-only">'.concat(g.language.translate(t.title)||"","</span>");var a=t.popup?' data-popup="true"':"",s=t.modal?' data-modal="true"':"",c=g.shortcuts.get("".concat(e,"."));c=c?" (".concat(c,")"):"";var l="".concat(e,"-").concat(g.id),d="dropdown-menu-".concat(l),f='<button id="'.concat(l,'"').concat(t.more_btn?' data-group-name="'.concat(l,'" '):"",'type="button" tabIndex="-1" role="button"').concat(t.toggle?' aria-pressed="false"':"").concat("dropdown"===t.type||"options"===t.type?' aria-controls="'.concat(d,'" aria-expanded="false" aria-haspopup="true"'):"").concat(t.disabled?' aria-disabled="true"':"",' title="').concat(g.language.translate(t.title)||"").concat(c,'" class="fr-command fr-btn').concat("dropdown"===t.type||"options"==t.type?" fr-dropdown":"").concat("options"==t.type?" fr-options":"").concat("more"==t.type?" fr-more":"").concat(t.displaySelection?" fr-selection":"").concat(t.back?" fr-back":"").concat(t.disabled?" fr-disabled":"").concat(n?"":" fr-hidden",'" data-cmd="').concat(e,'"').concat(a).concat(s,">").concat(o,"</button>");if("dropdown"===t.type||"options"===t.type){var p='<div id="'.concat(d,'" class="fr-dropdown-menu" role="listbox" aria-labelledby="').concat(l,'" aria-hidden="true"><div class="fr-dropdown-wrapper" role="presentation"><div class="fr-dropdown-content" role="presentation">');p+=function(e,t){var n="";if(t.html)"function"==typeof t.html?n+=t.html.call(g):n+=t.html;else{var r=t.options;for(var o in"function"==typeof r&&(r=r()),n+='<ul class="fr-dropdown-list" role="presentation">',r)if(Object.prototype.hasOwnProperty.call(r,o)){var i=g.shortcuts.get("".concat(e,".").concat(o));i=i?'<span class="fr-shortcut">'.concat(i,"</span>"):"",n+='<li role="presentation"><a class="fr-command" tabIndex="-1" role="option" data-cmd="'.concat("options"===t.type?e.replace(/Options/g,""):e,'" data-param1="').concat(o,'" title="').concat(r[o],'">').concat(g.language.translate(r[o]),"</a></li>")}n+="</ul>"}return n}(e,t),f+=p+="</div></div></div>"}return t.hasOptions&&t.hasOptions.apply(g)&&(f='<div class="fr-btn-wrap">'.concat(f," ").concat(h(e+"Options",Object.assign({},t,{type:"options",hasOptions:!1}),n),"  </div>")),f}function f(e){var i=g.$tb&&g.$tb.data("instance")||g;if(!1===g.events.trigger("buttons.refresh"))return!0;setTimeout((function(){for(var n=i.selection.inEditor()&&i.core.hasFocus(),r=0;r<e.length;r++){var o=u(e[r]),c=o.data("cmd");0===o.parents(".fr-popup").length?n||t.COMMANDS[c]&&t.COMMANDS[c].forcedRefresh?i.button.refresh(o):g.node.hasClass(o.get(0),"fr-dropdown")||(o.removeClass("fr-active"),o.attr("aria-pressed")&&o.attr("aria-pressed",!1)):o.parents(".fr-popup").isVisible()&&i.button.refresh(o)}}),0)}function m(){f(a),f(s)}function v(){a=[],s=[]}g.shared.popup_buttons||(g.shared.popup_buttons=[]),s=g.shared.popup_buttons;var _=null;function y(){clearTimeout(_),_=setTimeout(m,50)}return{_init:function(){g.opts.toolbarInline?g.events.on("toolbar.show",m):(g.events.on("mouseup",y),g.events.on("keyup",y),g.events.on("blur",y),g.events.on("focus",y),g.events.on("contentChanged",y),g.helpers.isMobile()&&g.events.$on(g.$doc,"selectionchange",m)),g.events.on("shared.destroy",v)},build:h,buildList:function(e,n){for(var r="",o=0;o<e.length;o++){var c=e[o],i=t.COMMANDS[c];i&&void 0!==i.plugin&&g.opts.pluginsEnabled.indexOf(i.plugin)<0||(i?r+=h(c,i,void 0===n||0<=n.indexOf(c)):"|"===c?r+='<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>':"-"===c&&(r+='<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>'))}return r},buildGroup:function(e){var n="",r="";for(var o in e){var c=e[o];if(c.buttons){for(var i="",a="",s=0,l="left",d=t.TOOLBAR_VISIBLE_BUTTONS,f=0;f<c.buttons.length;f++){var m=c.buttons[f],p=t.COMMANDS[m];p||("|"==m?i+='<div class="fr-separator fr-vs" role="separator" aria-orientation="vertical"></div>':"-"==m&&(i+='<div class="fr-separator fr-hs" role="separator" aria-orientation="horizontal"></div>')),!p||p&&void 0!==p.plugin&&g.opts.pluginsEnabled.indexOf(p.plugin)<0||(void 0!==e[o].align&&(l=e[o].align),void 0!==e[o].buttonsVisible&&(d=e[o].buttonsVisible),e.showMoreButtons&&d<=s?a+=h(m,p,!0):i+=h(m,p,!0),s++)}if(e.showMoreButtons&&d<s){var v=o,u=t.COMMANDS[v];u.more_btn=!0,i+=h(v,u,!0)}"trackChanges"!==o&&(n+='<div class="fr-btn-grp fr-float-'.concat(l,'">').concat(i,"</div>")),e.showMoreButtons&&0<a.length&&(r+='<div class="fr-more-toolbar" data-name="'.concat(o+"-"+g.id,'">').concat(a,"</div>"))}}return g.opts.toolbarBottom?g.helpers.isMobile()?'<div class="fr-bottom-extended">'.concat(r,"</div><div>").concat(n,"</div>"):"".concat(r,'<div class="fr-newline"></div>').concat(n):"".concat(n,'<div class="fr-newline"></div>').concat(r)},bindCommands:function(e,n){g.events.bindClick(e,".fr-command:not(.fr-disabled)",c),g.events.$on(e,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu",p,!0),g.events.$on(e,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu .fr-dropdown-wrapper",d,!0);var r=e.get(0).ownerDocument,o="defaultView"in r?r.defaultView:r.parentWindow;function h(n){(!n||n.type===g._mouseup&&n.target!==u("html").get(0)||"keydown"===n.type&&(g.keys.isCharacter(n.which)&&!g.keys.ctrlKey(n)||n.which===t.KEYCODE.ESC))&&(l(e),g.opts.iframe&&function(e){var t=e.find(".fr-popup.fr-active");if(t.length){t.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),t.prev().removeClass("fr-expanded");var n=g.$tb.find(".fr-btn-active-popup");u(n[0]).removeClass("fr-btn-active-popup")}}(e))}g.events.$on(u(o),"".concat(g._mouseup," resize keydown"),h,!0),g.opts.iframe&&g.events.$on(g.$win,g._mouseup,h,!0),g.node.hasClass(e.get(0),"fr-popup")?u.merge(s,e.find(".fr-btn").toArray()):u.merge(a,e.find(".fr-btn").toArray()),g.tooltip.bind(e,".fr-btn, .fr-title",n)},refresh:function(e){var n,r=e.parents(".fr-popup, .fr-toolbar").data("instance")||g,o=e.data("cmd");g.node.hasClass(e.get(0),"fr-dropdown")?n=e.next():(e.removeClass("fr-active"),e.attr("aria-pressed")&&e.attr("aria-pressed",!1)),t.COMMANDS[o]&&t.COMMANDS[o].refresh?t.COMMANDS[o].refresh.apply(r,[e,n]):g.refresh[o]&&r.refresh[o](e,n)},bulkRefresh:m,exec:r,click:o,hideActiveDropdowns:l,addButtons:function(e){for(var t=0;t<e.length;t++)a.push(e[t])},getButtons:n,getPosition:function(e){var t=e.offset().left,n=g.opts.toolbarBottom?10:e.outerHeight()-10;return{left:t,top:e.offset().top+n}}}},t.ICON_TEMPLATES={font_awesome:'<i class="fa fa-[NAME]" aria-hidden="true"></i>',font_awesome_5:'<i class="fas fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5r:'<i class="far fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5l:'<i class="fal fa-[FA5NAME]" aria-hidden="true"></i>',font_awesome_5b:'<i class="fab fa-[FA5NAME]" aria-hidden="true"></i>',text:'<span style="text-align: center;">[NAME]</span>',image:"<img src=[SRC] alt=[ALT] />",svg:'<svg class="fr-svg" focusable="false" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="[PATH]"/></svg>',empty:" "},t.ICONS={bold:{NAME:"bold",SVG_KEY:"bold"},italic:{NAME:"italic",SVG_KEY:"italic"},underline:{NAME:"underline",SVG_KEY:"underline"},strikeThrough:{NAME:"strikethrough",SVG_KEY:"strikeThrough"},subscript:{NAME:"subscript",SVG_KEY:"subscript"},superscript:{NAME:"superscript",SVG_KEY:"superscript"},cancel:{NAME:"cancel",SVG_KEY:"cancel"},color:{NAME:"tint",SVG_KEY:"textColor"},outdent:{NAME:"outdent",SVG_KEY:"outdent"},indent:{NAME:"indent",SVG_KEY:"indent"},undo:{NAME:"rotate-left",FA5NAME:"undo",SVG_KEY:"undo"},redo:{NAME:"rotate-right",FA5NAME:"redo",SVG_KEY:"redo"},insert:{NAME:"insert",SVG_KEY:"insert"},insertAll:{NAME:"insertAll",SVG_KEY:"insertAll"},insertHR:{NAME:"minus",SVG_KEY:"horizontalLine"},clearFormatting:{NAME:"eraser",SVG_KEY:"clearFormatting"},selectAll:{NAME:"mouse-pointer",SVG_KEY:"selectAll"},minimize:{NAME:"minimize",SVG_KEY:"minimize"},moreText:{NAME:"ellipsis-v",SVG_KEY:"textMore"},moreParagraph:{NAME:"ellipsis-v",SVG_KEY:"paragraphMore"},moreRich:{NAME:"ellipsis-v",SVG_KEY:"insertMore"},moreMisc:{NAME:"ellipsis-v",SVG_KEY:"more"}},t.DefineIconTemplate=function(e,n){t.ICON_TEMPLATES[e]=n},t.DefineIcon=function(e,n){t.ICONS[e]=n},Object.assign(t.DEFAULTS,{iconsTemplate:"svg"}),t.MODULES.icon=function(e){return{create:function(n){var r=null,o=t.ICONS[n];if(void 0!==o){var c=o.template||t.ICON_DEFAULT_TEMPLATE||e.opts.iconsTemplate;c&&c.apply&&(c=c.apply(e)),o.FA5NAME||(o.FA5NAME=o.NAME),"svg"!==c||o.PATH||(o.PATH=t.SVG[o.SVG_KEY]||""),c&&(c=t.ICON_TEMPLATES[c])&&(r=c.replace(/\[([a-zA-Z0-9]*)\]/g,(function(e,t){return"NAME"===t?o[t]||n:o[t]})))}return r||n},getTemplate:function(n){var r=t.ICONS[n],o=e.opts.iconsTemplate;return void 0!==r?o=r.template||t.ICON_DEFAULT_TEMPLATE||e.opts.iconsTemplate:o},getFileIcon:function(e){var n=t.FILEICONS[e];return void 0!==n?n:e}}},t.SVG={add:"M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6V13z",advancedImageEditor:"M3,17v2h6v-2H3z M3,5v2h10V5H3z M13,21v-2h8v-2h-8v-2h-2v6H13z M7,9v2H3v2h4v2h2V9H7z M21,13v-2H11v2H21z M15,9h2V7h4V5h-4  V3h-2V9z",alignCenter:"M9,18h6v-2H9V18z M6,11v2h12v-2H6z M3,6v2h18V6H3z",alignJustify:"M3,18h18v-2H3V18z M3,11v2h18v-2H3z M3,6v2h18V6H3z",alignLeft:"M3,18h6v-2H3V18z M3,11v2h12v-2H3z M3,6v2h18V6H3z",alignRight:"M15,18h6v-2h-6V18z M9,11v2h12v-2H9z M3,6v2h18V6H3z",anchors:"M16,4h-4H8C6.9,4,6,4.9,6,6v4v10l6-2.6l6,2.6V10V6C18,4.9,17.1,4,16,4z M16,17l-4-1.8L8,17v-7V6h4h4v4V17z",autoplay:"M 7.570312 0.292969 C 7.542969 0.292969 7.515625 0.292969 7.488281 0.296875 C 7.203125 0.324219 6.984375 0.539062 6.980469 0.792969 L 6.925781 3.535156 C 2.796875 3.808594 -0.0078125 6.425781 -0.0859375 10.09375 C -0.121094 11.96875 0.710938 13.6875 2.265625 14.921875 C 3.769531 16.117188 5.839844 16.796875 8.097656 16.828125 C 8.140625 16.828125 12.835938 16.898438 13.035156 16.886719 C 15.171875 16.796875 17.136719 16.128906 18.558594 15.003906 C 20.066406 13.816406 20.882812 12.226562 20.917969 10.40625 C 20.960938 8.410156 20.023438 6.605469 18.289062 5.335938 C 18.214844 5.277344 18.128906 5.230469 18.035156 5.203125 C 17.636719 5.074219 17.222656 5.199219 17 5.476562 L 15.546875 7.308594 C 15.304688 7.609375 15.363281 8.007812 15.664062 8.265625 C 16.351562 8.851562 16.707031 9.625 16.6875 10.5 C 16.652344 12.25 15.070312 13.390625 12.757812 13.535156 C 12.59375 13.539062 8.527344 13.472656 8.164062 13.464844 C 5.703125 13.429688 4.101562 12.191406 4.140625 10.3125 C 4.175781 8.570312 5.132812 7.46875 6.847656 7.199219 L 6.796875 9.738281 C 6.792969 9.992188 7 10.214844 7.285156 10.253906 C 7.3125 10.257812 7.339844 10.257812 7.367188 10.257812 C 7.503906 10.261719 7.632812 10.222656 7.738281 10.148438 L 14.039062 5.785156 C 14.171875 5.691406 14.253906 5.558594 14.253906 5.410156 C 14.257812 5.261719 14.1875 5.125 14.058594 5.027344 L 7.941406 0.414062 C 7.835938 0.335938 7.707031 0.292969 7.570312 0.292969 ",back:"M20 11L7.83 11 11.425 7.405 10.01 5.991 5.416 10.586 5.414 10.584 4 11.998 4.002 12 4 12.002 5.414 13.416 5.416 13.414 10.01 18.009 11.425 16.595 7.83 13 20 13 20 13 20 11 20 11Z",backgroundColor:"M9.91752,12.24082l7.74791-5.39017,1.17942,1.29591-6.094,7.20747L9.91752,12.24082M7.58741,12.652l4.53533,4.98327a.93412.93412,0,0,0,1.39531-.0909L20.96943,8.7314A.90827.90827,0,0,0,20.99075,7.533l-2.513-2.76116a.90827.90827,0,0,0-1.19509-.09132L7.809,11.27135A.93412.93412,0,0,0,7.58741,12.652ZM2.7939,18.52772,8.41126,19.5l1.47913-1.34617-3.02889-3.328Z",blockquote:"M10.31788,5l.93817,1.3226A12.88271,12.88271,0,0,0,8.1653,9.40125a5.54242,5.54242,0,0,0-.998,3.07866v.33733q.36089-.04773.66067-.084a4.75723,4.75723,0,0,1,.56519-.03691,2.87044,2.87044,0,0,1,2.11693.8427,2.8416,2.8416,0,0,1,.8427,2.09274,3.37183,3.37183,0,0,1-.8898,2.453A3.143,3.143,0,0,1,8.10547,19,3.40532,3.40532,0,0,1,5.375,17.7245,4.91156,4.91156,0,0,1,4.30442,14.453,9.3672,9.3672,0,0,1,5.82051,9.32933,14.75716,14.75716,0,0,1,10.31788,5Zm8.39243,0,.9369,1.3226a12.88289,12.88289,0,0,0-3.09075,3.07865,5.54241,5.54241,0,0,0-.998,3.07866v.33733q.33606-.04773.63775-.084a4.91773,4.91773,0,0,1,.58938-.03691,2.8043,2.8043,0,0,1,2.1042.83,2.89952,2.89952,0,0,1,.80578,2.10547,3.42336,3.42336,0,0,1-.86561,2.453A3.06291,3.06291,0,0,1,16.49664,19,3.47924,3.47924,0,0,1,13.742,17.7245,4.846,4.846,0,0,1,12.64721,14.453,9.25867,9.25867,0,0,1,14.17476,9.3898,15.26076,15.26076,0,0,1,18.71031,5Z",bold:"M15.25,11.8h0A3.68,3.68,0,0,0,17,9a3.93,3.93,0,0,0-3.86-4H6.65V19h7a3.74,3.74,0,0,0,3.7-3.78V15.1A3.64,3.64,0,0,0,15.25,11.8ZM8.65,7h4.2a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61,2.23,2.23,0,0,1-.63.09H8.65Zm4.6,10H8.65V13h4.6a2.09,2.09,0,0,1,2,1.3,2.09,2.09,0,0,1-1.37,2.61A2.23,2.23,0,0,1,13.25,17Z",cancel:"M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z",cellBackground:"M16.6,12.4L7.6,3.5L6.2,4.9l2.4,2.4l-5.2,5.2c-0.6,0.6-0.6,1.5,0,2.1l5.5,5.5c0.3,0.3,0.7,0.4,1.1,0.4s0.8-0.1,1.1-0.4  l5.5-5.5C17.2,14,17.2,13,16.6,12.4z M5.2,13.5L10,8.7l4.8,4.8H5.2z M19,15c0,0-2,2.2-2,3.5c0,1.1,0.9,2,2,2s2-0.9,2-2  C21,17.2,19,15,19,15z",cellBorderColor:"M22,22H2v2h20V22z",cellOptions:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M9.5,6.5h5V9h-5V6.5z M8,17.5H4  c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z   M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4  c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0V9z",cellStyle:"M20,19.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L12.3,17h3.8l1.7-3.5l1.4,3.5H23L20,19.9z M20,5H4C2.9,5,2,5.9,2,7v10  c0,1.1,0.9,2,2,2h7.5l-0.6-0.6L10,17.5H9.5V15h5.4l1.1-2.3v-2.2h4.5v3H20l0.6,1.5H22V7C22,5.9,21.1,5,20,5z M3.5,7  c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0.1,0h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M4,17.5c-0.3,0-0.5-0.2-0.5-0.4c0,0,0,0,0-0.1v-2H8v2.5H4  z M14.5,9h-5V6.5h5V9z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0.1V9z",clearFormatting:"M11.48,10.09l-1.2-1.21L8.8,7.41,6.43,5,5.37,6.1,8.25,9,4.66,19h2l1.43-4h5.14l1.43,4h2l-.89-2.51L18.27,19l1.07-1.06L14.59,13.2ZM8.8,13l.92-2.56L12.27,13Zm.56-7.15L9.66,5h2l1.75,4.9Z",close:"M13.4,12l5.6,5.6L17.6,19L12,13.4L6.4,19L5,17.6l5.6-5.6L5,6.4L6.4,5l5.6,5.6L17.6,5L19,6.4L13.4,12z",codeView:"M9.4,16.6,4.8,12,9.4,7.4,8,6,2,12l6,6Zm5.2,0L19.2,12,14.6,7.4,16,6l6,6-6,6Z",cogs:"M18.877 12.907a6.459 6.459 0 0 0 0 -1.814l1.952 -1.526a0.468 0.468 0 0 0 0.111 -0.593l-1.851 -3.2a0.461 0.461 0 0 0 -0.407 -0.231 0.421 0.421 0 0 0 -0.157 0.028l-2.3 0.925a6.755 6.755 0 0 0 -1.563 -0.907l-0.352 -2.452a0.451 0.451 0 0 0 -0.453 -0.388h-3.7a0.451 0.451 0 0 0 -0.454 0.388L9.347 5.588A7.077 7.077 0 0 0 7.783 6.5l-2.3 -0.925a0.508 0.508 0 0 0 -0.166 -0.028 0.457 0.457 0 0 0 -0.4 0.231l-1.851 3.2a0.457 0.457 0 0 0 0.111 0.593l1.952 1.526A7.348 7.348 0 0 0 5.063 12a7.348 7.348 0 0 0 0.064 0.907L3.175 14.433a0.468 0.468 0 0 0 -0.111 0.593l1.851 3.2a0.461 0.461 0 0 0 0.407 0.231 0.421 0.421 0 0 0 0.157 -0.028l2.3 -0.925a6.74 6.74 0 0 0 1.564 0.907L9.7 20.864a0.451 0.451 0 0 0 0.454 0.388h3.7a0.451 0.451 0 0 0 0.453 -0.388l0.352 -2.452a7.093 7.093 0 0 0 1.563 -0.907l2.3 0.925a0.513 0.513 0 0 0 0.167 0.028 0.457 0.457 0 0 0 0.4 -0.231l1.851 -3.2a0.468 0.468 0 0 0 -0.111 -0.593Zm-0.09 2.029l-0.854 1.476 -2.117 -0.852 -0.673 0.508a5.426 5.426 0 0 1 -1.164 0.679l-0.795 0.323 -0.33 2.269h-1.7l-0.32 -2.269 -0.793 -0.322a5.3 5.3 0 0 1 -1.147 -0.662L8.2 15.56l-2.133 0.86 -0.854 -1.475 1.806 -1.411 -0.1 -0.847c-0.028 -0.292 -0.046 -0.5 -0.046 -0.687s0.018 -0.4 0.045 -0.672l0.106 -0.854L5.217 9.064l0.854 -1.475 2.117 0.851 0.673 -0.508a5.426 5.426 0 0 1 1.164 -0.679l0.8 -0.323 0.331 -2.269h1.7l0.321 2.269 0.792 0.322a5.3 5.3 0 0 1 1.148 0.661l0.684 0.526 2.133 -0.859 0.853 1.473 -1.8 1.421 0.1 0.847a5 5 0 0 1 0.046 0.679c0 0.193 -0.018 0.4 -0.045 0.672l-0.106 0.853ZM12 14.544A2.544 2.544 0 1 1 14.546 12 2.552 2.552 0 0 1 12 14.544Z",columns:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4  c0,0,0,0,0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M8,9H3.5V7c0-0.3,0.2-0.5,0.4-0.5c0,0,0,0,0,0H8V9z M20.5,17  c0,0.3-0.2,0.5-0.4,0.5c0,0,0,0,0,0H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9H16V6.5h4c0.3,0,0.5,0.2,0.5,0.4c0,0,0,0,0,0  V9z",edit:"M17,11.2L12.8,7L5,14.8V19h4.2L17,11.2z M7,16.8v-1.5l5.6-5.6l1.4,1.5l-5.6,5.6H7z M13.5,6.3l0.7-0.7c0.8-0.8,2.1-0.8,2.8,0  c0,0,0,0,0,0L18.4,7c0.8,0.8,0.8,2,0,2.8l-0.7,0.7L13.5,6.3z",exitFullscreen:"M5,16H8v3h2V14H5ZM8,8H5v2h5V5H8Zm6,11h2V16h3V14H14ZM16,8V5H14v5h5V8Z",fileInsert:"M 8.09375 12.75 L 5.90625 12.75 C 5.542969 12.75 5.25 12.394531 5.25 11.953125 L 5.25 6.375 L 2.851562 6.375 C 2.367188 6.375 2.121094 5.660156 2.464844 5.242188 L 6.625 0.1875 C 6.832031 -0.0585938 7.167969 -0.0585938 7.371094 0.1875 L 11.535156 5.242188 C 11.878906 5.660156 11.632812 6.375 11.148438 6.375 L 8.75 6.375 L 8.75 11.953125 C 8.75 12.394531 8.457031 12.75 8.09375 12.75 Z M 14 12.484375 L 14 16.203125 C 14 16.644531 13.707031 17 13.34375 17 L 0.65625 17 C 0.292969 17 0 16.644531 0 16.203125 L 0 12.484375 C 0 12.042969 0.292969 11.6875 0.65625 11.6875 L 4.375 11.6875 L 4.375 11.953125 C 4.375 12.980469 5.0625 13.8125 5.90625 13.8125 L 8.09375 13.8125 C 8.9375 13.8125 9.625 12.980469 9.625 11.953125 L 9.625 11.6875 L 13.34375 11.6875 C 13.707031 11.6875 14 12.042969 14 12.484375 Z M 10.609375 15.40625 C 10.609375 15.039062 10.363281 14.742188 10.0625 14.742188 C 9.761719 14.742188 9.515625 15.039062 9.515625 15.40625 C 9.515625 15.773438 9.761719 16.070312 10.0625 16.070312 C 10.363281 16.070312 10.609375 15.773438 10.609375 15.40625 Z M 12.359375 15.40625 C 12.359375 15.039062 12.113281 14.742188 11.8125 14.742188 C 11.511719 14.742188 11.265625 15.039062 11.265625 15.40625 C 11.265625 15.773438 11.511719 16.070312 11.8125 16.070312 C 12.113281 16.070312 12.359375 15.773438 12.359375 15.40625 Z M 12.359375 15.40625 ",fileManager:"M 0 5.625 L 20.996094 5.625 L 21 15.75 C 21 16.371094 20.410156 16.875 19.6875 16.875 L 1.3125 16.875 C 0.585938 16.875 0 16.371094 0 15.75 Z M 0 5.625 M 21 4.5 L 0 4.5 L 0 2.25 C 0 1.628906 0.585938 1.125 1.3125 1.125 L 6.921875 1.125 C 7.480469 1.125 8.015625 1.316406 8.40625 1.652344 L 9.800781 2.847656 C 10.195312 3.183594 10.730469 3.375 11.289062 3.375 L 19.6875 3.375 C 20.414062 3.375 21 3.878906 21 4.5 Z M 21 4.5",markdown:"M5.55006 17.75V7.35L8.96006 16.89H10.7101L14.2301 7.37V14.0729C14.3951 14.1551 14.5499 14.265 14.6875 14.4026L14.7001 14.4151V11.64C14.7001 10.8583 15.2127 10.1963 15.9201 9.97171V5H13.6801L10.0401 14.86L6.51006 5H4.00006V17.75H5.55006ZM17.2001 11.64C17.2001 11.2258 16.8643 10.89 16.4501 10.89C16.0359 10.89 15.7001 11.2258 15.7001 11.64V16.8294L13.9804 15.1097C13.6875 14.8168 13.2126 14.8168 12.9197 15.1097C12.6269 15.4026 12.6269 15.8775 12.9197 16.1703L15.9197 19.1703C16.2126 19.4632 16.6875 19.4632 16.9804 19.1703L19.9804 16.1703C20.2733 15.8775 20.2733 15.4026 19.9804 15.1097C19.6875 14.8168 19.2126 14.8168 18.9197 15.1097L17.2001 16.8294V11.64Z",fontAwesome:"M18.99018,13.98212V7.52679c-.08038-1.21875-1.33929-.683-1.33929-.683-2.933,1.39282-4.36274.61938-5.85938.15625a6.23272,6.23272,0,0,0-2.79376-.20062l-.00946.004A1.98777,1.98777,0,0,0,7.62189,5.106a.984.984,0,0,0-.17517-.05432c-.02447-.0055-.04882-.01032-.0736-.0149A.9565.9565,0,0,0,7.1908,5H6.82539a.9565.9565,0,0,0-.18232.0368c-.02472.00458-.04907.0094-.07348.01484a.985.985,0,0,0-.17523.05438,1.98585,1.98585,0,0,0-.573,3.49585v9.394A1.004,1.004,0,0,0,6.82539,19H7.1908a1.00406,1.00406,0,0,0,1.00409-1.00409V15.52234c3.64221-1.09827,5.19709.64282,7.09888.57587a5.57291,5.57291,0,0,0,3.25446-1.05805A1.2458,1.2458,0,0,0,18.99018,13.98212Z",fontFamily:"M16,19h2L13,5H11L6,19H8l1.43-4h5.14Zm-5.86-6L12,7.8,13.86,13Z",fontSize:"M20.75,19h1.5l-3-10h-1.5l-3,10h1.5L17,16.5h3Zm-3.3-4,1.05-3.5L19.55,15Zm-5.7,4h2l-5-14h-2l-5,14h2l1.43-4h5.14ZM5.89,13,7.75,7.8,9.61,13Z",fullscreen:"M7,14H5v5h5V17H7ZM5,10H7V7h3V5H5Zm12,7H14v2h5V14H17ZM14,5V7h3v3h2V5Z",help:"M11,17h2v2h-2V17z M12,5C9.8,5,8,6.8,8,9h2c0-1.1,0.9-2,2-2s2,0.9,2,2c0,2-3,1.7-3,5v1h2v-1c0-2.2,3-2.5,3-5  C16,6.8,14.2,5,12,5z",horizontalLine:"M5,12h14 M19,11H5v2h14V11z",imageAltText:"M19,7h-6v12h-2V7H5V5h6h2h6V7z",imageCaption:"M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z   M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z M22,22H2v2h20V22z",imageClass:"M9.5,13.4l-2.9-2.9h3.8L12.2,7l1.4,3.5h3.8l-3,2.9l0.9,3.6L12,15.1L8.8,17L9.5,13.4z M22,6v12c0,1.1-0.9,2-2,2H4  c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,6H4v12h16V8.8V6z",imageDisplay:"M3,5h18v2H3V5z M13,9h8v2h-8V9z M13,13h8v2h-8V13z M3,17h18v2H3V17z M3,9h8v6H3V9z",imageManager:"M20,6h-7l-2-2H4C2.9,4,2,4.9,2,6v12c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V8C22,6.9,21.1,6,20,6z M20,18H4V6h6.2l2,2H20V18z   M18,16l-3.8-5H14l-2.9,3.8L9,12.1L6,16H18z M10,9.5C10,8.7,9.3,8,8.5,8S7,8.7,7,9.5S7.7,11,8.5,11S10,10.3,10,9.5z",imageSize:"M16.9,4c-0.3,0-0.5,0.2-0.8,0.3L3.3,13c-0.9,0.6-1.1,1.9-0.5,2.8l2.2,3.3c0.4,0.7,1.2,1,2,0.8c0.3,0,0.5-0.2,0.8-0.3  L20.7,11c0.9-0.6,1.1-1.9,0.5-2.8l-2.2-3.3C18.5,4.2,17.7,3.9,16.9,4L16.9,4z M16.9,9.9L18.1,9l-2-2.9L17,5.6c0.1,0,0.1-0.1,0.2-0.1  c0.2,0,0.4,0,0.5,0.2L19.9,9c0.2,0.2,0.1,0.5-0.1,0.7L7,18.4c-0.1,0-0.1,0.1-0.2,0.1c-0.2,0-0.4,0-0.5-0.2L4.1,15  c-0.2-0.2-0.1-0.5,0.1-0.7L5,13.7l2,2.9l1.2-0.8l-2-2.9L7.5,12l1.1,1.7l1.2-0.8l-1.1-1.7l1.2-0.8l2,2.9l1.2-0.8l-2-2.9l1.2-0.8  l1.1,1.7l1.2-0.8l-1.1-1.7L14.9,7L16.9,9.9z",indent:"M3,9v6l3-3L3,9z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",inlineClass:"M9.9,13.313A1.2,1.2,0,0,1,9.968,13H6.277l1.86-5.2,1.841,5.148A1.291,1.291,0,0,1,11.212,12h.426l-2.5-7h-2l-5,14h2l1.43-4H9.9Zm2.651,6.727a2.884,2.884,0,0,1-.655-2.018v-2.71A1.309,1.309,0,0,1,13.208,14h3.113a3.039,3.039,0,0,1,2,1.092s1.728,1.818,2.964,2.928a1.383,1.383,0,0,1,.318,1.931,1.44,1.44,0,0,1-.19.215l-3.347,3.31a1.309,1.309,0,0,1-1.832.258h0a1.282,1.282,0,0,1-.258-.257l-1.71-1.728Zm2.48-3.96a.773.773,0,1,0,.008,0Z",inlineStyle:"M11.88,15h.7l.7-1.7-3-8.3h-2l-5,14h2l1.4-4Zm-4.4-2,1.9-5.2,1.9,5.2ZM15.4,21.545l3.246,1.949-.909-3.637L20.72,17H16.954l-1.429-3.506L13.837,17H10.071l2.857,2.857-.779,3.637Z",insert:"M13.889,11.611c-0.17,0.17-0.443,0.17-0.612,0l-3.189-3.187l-3.363,3.36c-0.171,0.171-0.441,0.171-0.612,0c-0.172-0.169-0.172-0.443,0-0.611l3.667-3.669c0.17-0.17,0.445-0.172,0.614,0l3.496,3.493C14.058,11.167,14.061,11.443,13.889,11.611 M18.25,10c0,4.558-3.693,8.25-8.25,8.25c-4.557,0-8.25-3.692-8.25-8.25c0-4.557,3.693-8.25,8.25-8.25C14.557,1.75,18.25,5.443,18.25,10 M17.383,10c0-4.07-3.312-7.382-7.383-7.382S2.618,5.93,2.618,10S5.93,17.381,10,17.381S17.383,14.07,17.383,10",insertEmbed:"M20.73889,15.45929a3.4768,3.4768,0,0,0-5.45965-.28662L9.5661,12.50861a3.49811,3.49811,0,0,0-.00873-1.01331l5.72174-2.66809a3.55783,3.55783,0,1,0-.84527-1.81262L8.70966,9.6839a3.50851,3.50851,0,1,0,.0111,4.63727l5.7132,2.66412a3.49763,3.49763,0,1,0,6.30493-1.526ZM18.00745,5.01056A1.49993,1.49993,0,1,1,16.39551,6.3894,1.49994,1.49994,0,0,1,18.00745,5.01056ZM5.99237,13.49536a1.49989,1.49989,0,1,1,1.61194-1.37878A1.49982,1.49982,0,0,1,5.99237,13.49536Zm11.78211,5.494a1.49993,1.49993,0,1,1,1.61193-1.37885A1.49987,1.49987,0,0,1,17.77448,18.98932Z",insertFile:"M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z",insertImage:"M14.2,11l3.8,5H6l3-3.9l2.1,2.7L14,11H14.2z M8.5,11c0.8,0,1.5-0.7,1.5-1.5S9.3,8,8.5,8S7,8.7,7,9.5C7,10.3,7.7,11,8.5,11z   M22,6v12c0,1.1-0.9,2-2,2H4c-1.1,0-2-0.9-2-2V6c0-1.1,0.9-2,2-2h16C21.1,4,22,4.9,22,6z M20,8.8V6H4v12h16V8.8z",insertLink:"M11,17H7A5,5,0,0,1,7,7h4V9H7a3,3,0,0,0,0,6h4ZM17,7H13V9h4a3,3,0,0,1,0,6H13v2h4A5,5,0,0,0,17,7Zm-1,4H8v2h8Z",insertMore:"M16.5,13h-6v6h-2V13h-6V11h6V5h2v6h6Zm5,4.5A1.5,1.5,0,1,1,20,16,1.5,1.5,0,0,1,21.5,17.5Zm0-4A1.5,1.5,0,1,1,20,12,1.5,1.5,0,0,1,21.5,13.5Zm0-4A1.5,1.5,0,1,1,20,8,1.5,1.5,0,0,1,21.5,9.5Z",insertTable:"M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M9.5,13.5v-3  h5v3H9.5z M14.5,15v2.5h-5V15H14.5z M9.5,9V6.5h5V9H9.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M3.5,10.5H8v3H3.5V10.5z M3.5,17  v-2H8v2.5H4C3.7,17.5,3.5,17.3,3.5,17z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M16,9V6.5h4  c0.3,0,0.5,0.2,0.5,0.5v2H16z",insertVideo:"M15,8v8H5V8H15m2,2.5V7a1,1,0,0,0-1-1H4A1,1,0,0,0,3,7V17a1,1,0,0,0,1,1H16a1,1,0,0,0,1-1V13.5l2.29,2.29A1,1,0,0,0,21,15.08V8.91a1,1,0,0,0-1.71-.71Z",upload:"M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z",uploadFiles:"M12 6.66667a4.87654 4.87654 0 0 1 4.77525 3.92342l0.29618 1.50268 1.52794 0.10578a2.57021 2.57021 0 0 1 -0.1827 5.13478H6.5a3.49774 3.49774 0 0 1 -0.3844 -6.97454l1.06682 -0.11341L7.678 9.29387A4.86024 4.86024 0 0 1 12 6.66667m0 -2A6.871 6.871 0 0 0 5.90417 8.37 5.49773 5.49773 0 0 0 6.5 19.33333H18.41667a4.57019 4.57019 0 0 0 0.32083 -9.13A6.86567 6.86567 0 0 0 12 4.66667Zm0.99976 7.2469h1.91406L11.99976 9 9.08618 11.91357h1.91358v3H11V16h2V14h-0.00024Z",italic:"M11.76,9h2l-2.2,10h-2Zm1.68-4a1,1,0,1,0,1,1,1,1,0,0,0-1-1Z",search:"M15.5 14h-0.79l-0.28 -0.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09 -0.59 4.23 -1.57l0.27 0.28v0.79l5 4.99L20.49 19l-4.99 -5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z",lineHeight:"M6.25,7h2.5L5.25,3.5,1.75,7h2.5V17H1.75l3.5,3.5L8.75,17H6.25Zm4-2V7h12V5Zm0,14h12V17h-12Zm0-6h12V11h-12Z",linkStyles:"M19,17.9l0.9,3.6l-3.2-1.9l-3.3,1.9l0.8-3.6L11.3,15h3.8l1.7-3.5l1.4,3.5H22L19,17.9z M20,12c0,0.3-0.1,0.7-0.2,1h2.1  c0.1-0.3,0.1-0.6,0.1-1c0-2.8-2.2-5-5-5h-4v2h4C18.7,9,20,10.3,20,12z M14.8,11H8v2h3.3h2.5L14.8,11z M9.9,16.4L8.5,15H7  c-1.7,0-3-1.3-3-3s1.3-3,3-3h4V7H7c-2.8,0-5,2.2-5,5s2.2,5,5,5h3.5L9.9,16.4z",mention:"M12.4,5c-4.1,0-7.5,3.4-7.5,7.5S8.3,20,12.4,20h3.8v-1.5h-3.8c-3.3,0-6-2.7-6-6s2.7-6,6-6s6,2.7,6,6v1.1  c0,0.6-0.5,1.2-1.1,1.2s-1.1-0.6-1.1-1.2v-1.1c0-2.1-1.7-3.8-3.8-3.8s-3.7,1.7-3.7,3.8s1.7,3.8,3.8,3.8c1,0,2-0.4,2.7-1.1  c0.5,0.7,1.3,1.1,2.2,1.1c1.5,0,2.6-1.2,2.6-2.7v-1.1C19.9,8.4,16.6,5,12.4,5z M12.4,14.7c-1.2,0-2.3-1-2.3-2.2s1-2.3,2.3-2.3  s2.3,1,2.3,2.3S13.6,14.7,12.4,14.7z",minimize:"M5,12h14 M19,11H5v2h14V11z",more:"M13.5,17c0,0.8-0.7,1.5-1.5,1.5s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,16.2,13.5,17z M13.5,12c0,0.8-0.7,1.5-1.5,1.5 s-1.5-0.7-1.5-1.5s0.7-1.5,1.5-1.5S13.5,11.2,13.5,12z M13.5,7c0,0.8-0.7,1.5-1.5,1.5S10.5,7.8,10.5,7s0.7-1.5,1.5-1.5 S13.5,6.2,13.5,7z",openLink:"M17,17H7V7h3V5H7C6,5,5,6,5,7v10c0,1,1,2,2,2h10c1,0,2-1,2-2v-3h-2V17z M14,5v2h1.6l-5.8,5.8l1.4,1.4L17,8.4V10h2V5H14z",orderedList:"M2.5,16h2v.5h-1v1h1V18h-2v1h3V15h-3Zm1-7h1V5h-2V6h1Zm-1,2H4.3L2.5,13.1V14h3V13H3.7l1.8-2.1V10h-3Zm5-5V8h14V6Zm0,12h14V16H7.5Zm0-5h14V11H7.5Z",outdent:"M3,12l3,3V9L3,12z M3,19h18v-2H3V19z M3,7h18V5H3V7z M9,11h12V9H9V11z M9,15h12v-2H9V15z",pageBreaker:"M3,9v6l3-3L3,9z M21,9H8V4h2v3h9V4h2V9z M21,20h-2v-3h-9v3H8v-5h13V20z M11,13H8v-2h3V13z M16,13h-3v-2h3V13z M21,13h-3v-2  h3V13z",paragraphFormat:"M10.15,5A4.11,4.11,0,0,0,6.08,8.18,4,4,0,0,0,10,13v6h2V7h2V19h2V7h2V5ZM8,9a2,2,0,0,1,2-2v4A2,2,0,0,1,8,9Z",paragraphMore:"M7.682,5a4.11,4.11,0,0,0-4.07,3.18,4,4,0,0,0,3.11,4.725h0l.027.005a3.766,3.766,0,0,0,.82.09v6h2V7h2V19h2V7h2V5ZM5.532,9a2,2,0,0,1,2-2v4A2,2,0,0,1,5.532,9Zm14.94,8.491a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,17.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,13.491Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.472,9.491Z",paragraphStyle:"M4,9c0-1.1,0.9-2,2-2v4C4.9,11,4,10.1,4,9z M16.7,20.5l3.2,1.9L19,18.8l3-2.9h-3.7l-1.4-3.5L15.3,16h-3.8l2.9,2.9l-0.9,3.6  L16.7,20.5z M10,17.4V19h1.6L10,17.4z M6.1,5c-1.9,0-3.6,1.3-4,3.2c-0.5,2.1,0.8,4.2,2.9,4.7c0,0,0,0,0,0h0.2C5.5,13,5.8,13,6,13v6  h2V7h2v7h2V7h2V5H6.1z",pdfExport:"M7,3C5.9,3,5,3.9,5,5v14c0,1.1,0.9,2,2,2h10c1.1,0,2-0.9,2-2V7.6L14.4,3H7z M17,19H7V5h6v4h4V19z M16.3,13.5  c-0.2-0.6-1.1-0.8-2.6-0.8c-0.1,0-0.1,0-0.2,0c-0.3-0.3-0.8-0.9-1-1.2c-0.2-0.2-0.3-0.3-0.4-0.6c0.2-0.7,0.2-1,0.3-1.5  c0.1-0.9,0-1.6-0.2-1.8c-0.4-0.2-0.7-0.2-0.9-0.2c-0.1,0-0.3,0.2-0.7,0.7c-0.2,0.7-0.1,1.8,0.6,2.8c-0.2,0.8-0.7,1.6-1,2.4  c-0.8,0.2-1.5,0.7-1.9,1.1c-0.7,0.7-0.9,1.1-0.7,1.6c0,0.3,0.2,0.6,0.7,0.6c0.3-0.1,0.3-0.2,0.7-0.3c0.6-0.3,1.2-1.7,1.7-2.4  c0.8-0.2,1.7-0.3,2-0.3c0.1,0,0.3,0,0.6,0c0.8,0.8,1.2,1.1,1.8,1.2c0.1,0,0.2,0,0.3,0c0.3,0,0.8-0.1,1-0.6  C16.4,14.1,16.4,13.9,16.3,13.5z M8.3,15.7c-0.1,0.1-0.2,0.1-0.2,0.1c0-0.1,0-0.3,0.6-0.8c0.2-0.2,0.6-0.3,0.9-0.7  C9,15,8.6,15.5,8.3,15.7z M11.3,9c0-0.1,0.1-0.2,0.1-0.2S11.6,9,11.5,10c0,0.1,0,0.3-0.1,0.7C11.3,10.1,11,9.5,11.3,9z M10.9,13.1  c0.2-0.6,0.6-1,0.7-1.5c0.1,0.1,0.1,0.1,0.2,0.2c0.1,0.2,0.3,0.7,0.7,0.9C12.2,12.8,11.6,13,10.9,13.1z M15.2,14.1  c-0.1,0-0.1,0-0.2,0c-0.2,0-0.7-0.2-1-0.7c1.1,0,1.6,0.2,1.6,0.6C15.5,14.1,15.4,14.1,15.2,14.1z",print:"M16.1,17c0-0.6,0.4-1,1-1c0.6,0,1,0.4,1,1s-0.4,1-1,1C16.5,18,16.1,17.6,16.1,17z M22,15v4c0,1.1-0.9,2-2,2H4  c-1.1,0-2-0.9-2-2v-4c0-1.1,0.9-2,2-2h1V5c0-1.1,0.9-2,2-2h7.4L19,7.6V13h1C21.1,13,22,13.9,22,15z M7,13h10V9h-4V5H7V13z M20,15H4  v4h16V15z",redo:"M13.6,9.4c1.7,0.3,3.2,0.9,4.6,2L21,8.5v7h-7l2.7-2.7C13,10.1,7.9,11,5.3,14.7c-0.2,0.3-0.4,0.5-0.5,0.8L3,14.6  C5.1,10.8,9.3,8.7,13.6,9.4z",removeTable:"M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",insertAll:"M 9.25 12 L 6.75 12 C 6.335938 12 6 11.664062 6 11.25 L 6 6 L 3.257812 6 C 2.703125 6 2.425781 5.328125 2.820312 4.933594 L 7.570312 0.179688 C 7.804688 -0.0546875 8.191406 -0.0546875 8.425781 0.179688 L 13.179688 4.933594 C 13.574219 5.328125 13.296875 6 12.742188 6 L 10 6 L 10 11.25 C 10 11.664062 9.664062 12 9.25 12 Z M 16 11.75 L 16 15.25 C 16 15.664062 15.664062 16 15.25 16 L 0.75 16 C 0.335938 16 0 15.664062 0 15.25 L 0 11.75 C 0 11.335938 0.335938 11 0.75 11 L 5 11 L 5 11.25 C 5 12.214844 5.785156 13 6.75 13 L 9.25 13 C 10.214844 13 11 12.214844 11 11.25 L 11 11 L 15.25 11 C 15.664062 11 16 11.335938 16 11.75 Z M 12.125 14.5 C 12.125 14.15625 11.84375 13.875 11.5 13.875 C 11.15625 13.875 10.875 14.15625 10.875 14.5 C 10.875 14.84375 11.15625 15.125 11.5 15.125 C 11.84375 15.125 12.125 14.84375 12.125 14.5 Z M 14.125 14.5 C 14.125 14.15625 13.84375 13.875 13.5 13.875 C 13.15625 13.875 12.875 14.15625 12.875 14.5 C 12.875 14.84375 13.15625 15.125 13.5 15.125 C 13.84375 15.125 14.125 14.84375 14.125 14.5 Z M 14.125 14.5 ",remove:"M15,10v8H9v-8H15 M14,4H9.9l-1,1H6v2h12V5h-3L14,4z M17,8H7v10c0,1.1,0.9,2,2,2h6c1.1,0,2-0.9,2-2V8z",replaceImage:"M16,5v3H4v2h12v3l4-4L16,5z M8,19v-3h12v-2H8v-3l-4,4L8,19z",row:"M20,5H4C2.9,5,2,5.9,2,7v2v1.5v3V15v2c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2v-2v-1.5v-3V9V7C22,5.9,21.1,5,20,5z M16,6.5h4  c0.3,0,0.5,0.2,0.5,0.5v2H16V6.5z M9.5,6.5h5V9h-5V6.5z M3.5,7c0-0.3,0.2-0.5,0.5-0.5h4V9H3.5V7z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.5  v-2H8V17.5z M14.5,17.5h-5V15h5V17.5z M20.5,17c0,0.3-0.2,0.5-0.5,0.5h-4V15h4.5V17z",selectAll:"M5,7h2V5C5.9,5,5,5.9,5,7z M5,11h2V9H5V11z M9,19h2v-2H9V19z M5,11h2V9H5V11z M15,5h-2v2h2V5z M17,5v2h2C19,5.9,18.1,5,17,5  z M7,19v-2H5C5,18.1,5.9,19,7,19z M5,15h2v-2H5V15z M11,5H9v2h2V5z M13,19h2v-2h-2V19z M17,11h2V9h-2V11z M17,19c1.1,0,2-0.9,2-2h-2  V19z M17,11h2V9h-2V11z M17,15h2v-2h-2V15z M13,19h2v-2h-2V19z M13,7h2V5h-2V7z M9,15h6V9H9V15z M11,11h2v2h-2V11z",smile:"M11.991,3A9,9,0,1,0,21,12,8.99557,8.99557,0,0,0,11.991,3ZM12,19a7,7,0,1,1,7-7A6.99808,6.99808,0,0,1,12,19Zm3.105-5.2h1.503a4.94542,4.94542,0,0,1-9.216,0H8.895a3.57808,3.57808,0,0,0,6.21,0ZM7.5,9.75A1.35,1.35,0,1,1,8.85,11.1,1.35,1.35,0,0,1,7.5,9.75Zm6.3,0a1.35,1.35,0,1,1,1.35,1.35A1.35,1.35,0,0,1,13.8,9.75Z",spellcheck:"M19.1,13.6l-5.6,5.6l-2.7-2.7l-1.4,1.4l4.1,4.1l7-7L19.1,13.6z M10.8,13.7l2.7,2.7l0.8-0.8L10.5,5h-2l-5,14h2l1.4-4h2.6  L10.8,13.7z M9.5,7.8l1.9,5.2H7.6L9.5,7.8z",star:"M12.1,7.7l1,2.5l0.4,0.9h1h2.4l-2.1,2l-0.6,0.6l0.2,0.9l0.6,2.3l-2.2-1.3L12,15.2l-0.8,0.5L9,17l0.5-2.5l0.1-0.8L9,13.1  l-2-2h2.5h0.9l0.4-0.8L12.1,7.7 M12.2,4L9.5,9.6H3.4L8,14.2L6.9,20l5.1-3.1l5.3,3.1l-1.5-5.8l4.8-4.6h-6.1L12.2,4L12.2,4z",strikeThrough:"M3,12.20294H21v1.5H16.63422a3.59782,3.59782,0,0,1,.34942,1.5929,3.252,3.252,0,0,1-1.31427,2.6997A5.55082,5.55082,0,0,1,12.20251,19a6.4421,6.4421,0,0,1-2.62335-.539,4.46335,4.46335,0,0,1-1.89264-1.48816,3.668,3.668,0,0,1-.67016-2.15546V14.704h.28723v-.0011h.34149v.0011H9.02v.11334a2.18275,2.18275,0,0,0,.85413,1.83069,3.69,3.69,0,0,0,2.32836.67926,3.38778,3.38778,0,0,0,2.07666-.5462,1.73346,1.73346,0,0,0,.7013-1.46655,1.69749,1.69749,0,0,0-.647-1.43439,3.00525,3.00525,0,0,0-.27491-.17725H3ZM16.34473,7.05981A4.18163,4.18163,0,0,0,14.6236,5.5462,5.627,5.627,0,0,0,12.11072,5,5.16083,5.16083,0,0,0,8.74719,6.06213,3.36315,3.36315,0,0,0,7.44006,8.76855a3.22923,3.22923,0,0,0,.3216,1.42786h2.59668c-.08338-.05365-.18537-.10577-.25269-.16064a1.60652,1.60652,0,0,1-.65283-1.30036,1.79843,1.79843,0,0,1,.68842-1.5108,3.12971,3.12971,0,0,1,1.96948-.55243,3.04779,3.04779,0,0,1,2.106.6687,2.35066,2.35066,0,0,1,.736,1.83258v.11341h2.00317V9.17346A3.90013,3.90013,0,0,0,16.34473,7.05981Z",subscript:"M10.4,12l3.6,3.6L12.6,17L9,13.4L5.4,17L4,15.6L7.6,12L4,8.4L5.4,7L9,10.6L12.6,7L14,8.4L10.4,12z M18.31234,19.674  l1.06812-1.1465c0.196-0.20141,0.37093-0.40739,0.5368-0.6088c0.15975-0.19418,0.30419-0.40046,0.432-0.617  c0.11969-0.20017,0.21776-0.41249,0.29255-0.6334c0.07103-0.21492,0.10703-0.43986,0.10662-0.66621  c0.00297-0.28137-0.04904-0.56062-0.1531-0.82206c-0.09855-0.24575-0.25264-0.46534-0.45022-0.6416  c-0.20984-0.18355-0.45523-0.32191-0.72089-0.40646c-0.63808-0.19005-1.3198-0.17443-1.94851,0.04465  c-0.28703,0.10845-0.54746,0.2772-0.76372,0.49487c-0.20881,0.20858-0.37069,0.45932-0.47483,0.73548  c-0.10002,0.26648-0.15276,0.54838-0.15585,0.833l-0.00364,0.237H17.617l0.00638-0.22692  c0.00158-0.12667,0.01966-0.25258,0.05377-0.37458c0.03337-0.10708,0.08655-0.20693,0.15679-0.29437  c0.07105-0.08037,0.15959-0.14335,0.25882-0.1841c0.22459-0.08899,0.47371-0.09417,0.7018-0.01458  c0.0822,0.03608,0.15559,0.08957,0.21509,0.15679c0.06076,0.07174,0.10745,0.15429,0.13761,0.24333  c0.03567,0.10824,0.05412,0.22141,0.05469,0.33538c-0.00111,0.08959-0.0118,0.17881-0.0319,0.26612  c-0.02913,0.10428-0.07076,0.20465-0.124,0.29893c-0.07733,0.13621-0.1654,0.26603-0.26338,0.38823  c-0.13438,0.17465-0.27767,0.34226-0.42929,0.50217l-2.15634,2.35315V21H21v-1.326H18.31234z",superscript:"M10.4,12,14,15.6,12.6,17,9,13.4,5.4,17,4,15.6,7.6,12,4,8.4,5.4,7,9,10.6,12.6,7,14,8.4Zm8.91234-3.326,1.06812-1.1465c.196-.20141.37093-.40739.5368-.6088a4.85745,4.85745,0,0,0,.432-.617,3.29,3.29,0,0,0,.29255-.6334,2.11079,2.11079,0,0,0,.10662-.66621,2.16127,2.16127,0,0,0-.1531-.82206,1.7154,1.7154,0,0,0-.45022-.6416,2.03,2.03,0,0,0-.72089-.40646,3.17085,3.17085,0,0,0-1.94851.04465,2.14555,2.14555,0,0,0-.76372.49487,2.07379,2.07379,0,0,0-.47483.73548,2.446,2.446,0,0,0-.15585.833l-.00364.237H18.617L18.62338,5.25a1.45865,1.45865,0,0,1,.05377-.37458.89552.89552,0,0,1,.15679-.29437.70083.70083,0,0,1,.25882-.1841,1.00569,1.00569,0,0,1,.7018-.01458.62014.62014,0,0,1,.21509.15679.74752.74752,0,0,1,.13761.24333,1.08893,1.08893,0,0,1,.05469.33538,1.25556,1.25556,0,0,1-.0319.26612,1.34227,1.34227,0,0,1-.124.29893,2.94367,2.94367,0,0,1-.26338.38823,6.41629,6.41629,0,0,1-.42929.50217L17.19709,8.92642V10H22V8.674Z",symbols:"M15.77493,16.98885a8.21343,8.21343,0,0,0,1.96753-2.57651,7.34824,7.34824,0,0,0,.6034-3.07618A6.09092,6.09092,0,0,0,11.99515,5a6.13347,6.13347,0,0,0-4.585,1.79187,6.417,6.417,0,0,0-1.756,4.69207,6.93955,6.93955,0,0,0,.622,2.97415,8.06587,8.06587,0,0,0,1.949,2.53076H5.41452V19h5.54114v-.04331h-.00147V16.84107a5.82825,5.82825,0,0,1-2.2052-2.2352A6.40513,6.40513,0,0,1,7.97672,11.447,4.68548,4.68548,0,0,1,9.07785,8.19191a3.73232,3.73232,0,0,1,2.9173-1.22462,3.76839,3.76839,0,0,1,2.91241,1.21489,4.482,4.482,0,0,1,1.11572,3.154,6.71141,6.71141,0,0,1-.75384,3.24732,5.83562,5.83562,0,0,1-2.22357,2.25759v2.11562H13.0444V19h5.54108V16.98885Z",tags:"M8.9749 7.47489a1.5 1.5 0 1 1 -1.5 1.5A1.5 1.5 0 0 1 8.9749 7.47489Zm3.78866 -3.12713L16.5362 8.12041l0.33565 0.33564 2.77038 2.77038a2.01988 2.01988 0 0 1 0.59 1.42 1.95518 1.95518 0 0 1 -0.5854 1.40455l0.00044 0.00043 -5.59583 5.59583 -0.00043 -0.00044a1.95518 1.95518 0 0 1 -1.40455 0.5854 1.98762 1.98762 0 0 1 -1.41 -0.58L8.45605 16.87185l-0.33564 -0.33565L4.35777 12.77357a1.99576 1.99576 0 0 1 -0.59 -1.42V9.36358l0 -3.59582a2.00579 2.00579 0 0 1 2 -2l3.59582 0h1.98995A1.98762 1.98762 0 0 1 12.76356 4.34776ZM15.46186 9.866l-0.33564 -0.33564L11.36359 5.76776H5.76776v5.59583L9.866 15.46186l2.7794 2.7794 5.5878 -5.60385 -0.001 -0.001Z",tableHeader:"M20,5H4C2.9,5,2,5.9,2,7v10c0,1.1,0.9,2,2,2h16c1.1,0,2-0.9,2-2V7C22,5.9,21.1,5,20,5z M8,17.5H4c-0.3,0-0.5-0.2-0.5-0.4  l0,0V17v-2H8V17.5z M8,13.5H3.5v-3H8V13.5z M14.5,17.5h-5V15h5V17.5z M14.5,13.5h-5v-3h5V13.5z M20.5,17c0,0.3-0.2,0.5-0.4,0.5l0,0  H16V15h4.5V17z M20.5,13.5H16v-3h4.5V13.5z M20.5,9h-4.4H16h-1.5h-5H8H7.9H3.5V7c0-0.3,0.2-0.5,0.4-0.5l0,0h4l0,0h8.2l0,0H20  c0.3,0,0.5,0.2,0.5,0.4l0,0V9z",tableStyle:"M20.0171,19.89752l.9,3.6-3.2-1.9-3.3,1.9.8-3.6-2.9-2.9h3.8l1.7-3.5,1.4,3.5h3.8ZM20,5H4A2.00591,2.00591,0,0,0,2,7V17a2.00591,2.00591,0,0,0,2,2h7.49115l-.58826-.58826L9.99115,17.5H9.5V14.9975h5.36511L16,12.66089V10.5h4.5v3h-.52783l.599,1.4975H22V7A2.00591,2.00591,0,0,0,20,5ZM3.5,7A.4724.4724,0,0,1,4,6.5H8V9H3.5Zm0,3.5H8v3H3.5Zm.5,7a.4724.4724,0,0,1-.5-.5V15H8v2.5Zm10.5-4h-5v-3h5Zm0-4.5h-5V6.5h5Zm6,0H16V6.5h4a.4724.4724,0,0,1,.5.5Z",textColor:"M15.2,13.494s-3.6,3.9-3.6,6.3a3.65,3.65,0,0,0,7.3.1v-.1C18.9,17.394,15.2,13.494,15.2,13.494Zm-1.47-1.357.669-.724L12.1,5h-2l-5,14h2l1.43-4h2.943A24.426,24.426,0,0,1,13.726,12.137ZM11.1,7.8l1.86,5.2H9.244Z",textMore:"M13.55,19h2l-5-14h-2l-5,14h2l1.4-4h5.1Zm-5.9-6,1.9-5.2,1.9,5.2Zm12.8,4.5a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,17.5Zm0-4a1.5,1.5,0,1,1-1.5-1.5A1.5,1.5,0,0,1,20.45,13.5Zm0-4A1.5,1.5,0,1,1,18.95,8,1.5,1.5,0,0,1,20.45,9.5Z",underline:"M19,20v2H5V20Zm-3-6.785a4,4,0,0,1-5.74,3.4A3.75,3.75,0,0,1,8,13.085V5.005H6v8.21a6,6,0,0,0,8,5.44,5.851,5.851,0,0,0,4-5.65v-8H16ZM16,5v0h2V5ZM8,5H6v0H8Z",undo:"M10.4,9.4c-1.7,0.3-3.2,0.9-4.6,2L3,8.5v7h7l-2.7-2.7c3.7-2.6,8.8-1.8,11.5,1.9c0.2,0.3,0.4,0.5,0.5,0.8l1.8-0.9  C18.9,10.8,14.7,8.7,10.4,9.4z",unlink:"M14.4,11l1.6,1.6V11H14.4z M17,7h-4v1.9h4c1.7,0,3.1,1.4,3.1,3.1c0,1.3-0.8,2.4-1.9,2.8l1.4,1.4C21,15.4,22,13.8,22,12  C22,9.2,19.8,7,17,7z M2,4.3l3.1,3.1C3.3,8.1,2,9.9,2,12c0,2.8,2.2,5,5,5h4v-1.9H7c-1.7,0-3.1-1.4-3.1-3.1c0-1.6,1.2-2.9,2.8-3.1  L8.7,11H8v2h2.7l2.3,2.3V17h1.7l4,4l1.4-1.4L3.4,2.9L2,4.3z",unorderedList:"M4,10.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,10.5,4,10.5z M4,5.5C3.2,5.5,2.5,6.2,2.5,7  S3.2,8.5,4,8.5S5.5,7.8,5.5,7S4.8,5.5,4,5.5z M4,15.5c-0.8,0-1.5,0.7-1.5,1.5s0.7,1.5,1.5,1.5s1.5-0.7,1.5-1.5S4.8,15.5,4,15.5z   M7.5,6v2h14V6H7.5z M7.5,18h14v-2h-14V18z M7.5,13h14v-2h-14V13z",verticalAlignBottom:"M16,13h-3V3h-2v10H8l4,4L16,13z M3,19v2h18v-2H3z",verticalAlignMiddle:"M3,11v2h18v-2H3z M8,18h3v3h2v-3h3l-4-4L8,18z M16,6h-3V3h-2v3H8l4,4L16,6z",verticalAlignTop:"M8,11h3v10h2V11h3l-4-4L8,11z M21,5V3H3v2H21z",trackChanges:"M17.2 20H12.4599L13.9938 19.2076L14.0305 19.1886L14.0616 19.1612C14.1036 19.1242 14.1373 19.0786 14.1603 19.0275C14.1806 18.9825 14.1923 18.9342 14.1948 18.885H14.2H14.3384L14.4364 18.7874L14.7049 18.52H15.45C15.5747 18.52 15.6942 18.4705 15.7823 18.3823C15.8705 18.2942 15.92 18.1746 15.92 18.05C15.92 17.9253 15.8705 17.8058 15.7823 17.7176C15.7351 17.6704 15.6789 17.6343 15.6177 17.6109L17.33 15.9056V19.87C17.33 19.8871 17.3266 19.904 17.3201 19.9197C17.3136 19.9355 17.304 19.9499 17.2919 19.9619C17.2799 19.974 17.2655 19.9836 17.2497 19.9901C17.234 19.9966 17.2171 20 17.2 20ZM4.13 20H11.2508C11.2396 19.9629 11.2337 19.9242 11.2337 19.885C11.2337 19.8133 11.2533 19.7431 11.29 19.6819L11.2739 19.6734L11.8838 18.52H5C4.87535 18.52 4.7558 18.4705 4.66766 18.3823C4.57952 18.2942 4.53 18.1746 4.53 18.05C4.53 17.9253 4.57952 17.8058 4.66766 17.7176C4.7558 17.6295 4.87535 17.58 5 17.58H12.3809L12.3925 17.5582L12.4187 17.5284C12.4558 17.4864 12.5014 17.4527 12.5525 17.4297C12.5836 17.4156 12.6163 17.4057 12.6498 17.4001C12.6522 17.3065 12.6877 17.2166 12.7503 17.1467L13 17.37C12.9902 17.381 12.9847 17.3952 12.9847 17.41C12.9847 17.4247 12.9902 17.439 13 17.45L14.13 18.55H14.2L19.09 13.68V13.6L17.99 12.5C17.979 12.4902 17.9647 12.4847 17.95 12.4847C17.9352 12.4847 17.921 12.4902 17.91 12.5L13 17.37L12.7641 17.1322L15.1759 14.74H5C4.87535 14.74 4.7558 14.6905 4.66766 14.6023C4.57952 14.5142 4.53 14.3946 4.53 14.27C4.53 14.1453 4.57952 14.0258 4.66766 13.9376C4.7558 13.8495 4.87535 13.8 5 13.8H15.45C15.5747 13.8 15.6942 13.8495 15.7823 13.9376C15.8169 13.9722 15.8454 14.0115 15.8675 14.0541L17.33 12.6034V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20ZM11.7889 20H11.8785C11.8902 19.9746 11.898 19.9475 11.9015 19.9197L11.8661 19.9866L11.8117 19.9578L13.84 18.91C13.8464 18.9044 13.8515 18.8974 13.855 18.8897C13.8585 18.8819 13.8603 18.8735 13.8603 18.865C13.8603 18.8565 13.8585 18.8481 13.855 18.8403C13.8515 18.8325 13.8464 18.8256 13.84 18.82L12.76 17.75C12.7544 17.7436 12.7474 17.7385 12.7397 17.735C12.7319 17.7315 12.7235 17.7297 12.715 17.7297C12.7065 17.7297 12.6981 17.7315 12.6903 17.735C12.6825 17.7385 12.6756 17.7436 12.67 17.75L11.57 19.83L11.5023 19.7942L11.58 19.85C11.5727 19.8602 11.5687 19.8724 11.5687 19.885C11.5687 19.8975 11.5727 19.9098 11.58 19.92L11.67 20H11.73L11.7642 19.9823L11.7889 20ZM13.1 4.65L16.6 8.15C16.6212 8.17232 16.6355 8.20028 16.6412 8.23051C16.6469 8.26075 16.6437 8.29199 16.6321 8.32048C16.6205 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5207 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8312 4.72925 12.8412 4.6995 12.8588 4.67429C12.8765 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9893 4.60315 13.0195 4.60884C13.0497 4.61453 13.0777 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60183 10.9735 6.54621C10.9534 6.49058 10.9224 6.43948 10.8825 6.39582C10.8425 6.35216 10.7944 6.31681 10.7408 6.29179C10.6871 6.26677 10.6291 6.25257 10.57 6.25H5C4.88239 6.25773 4.77251 6.3113 4.69397 6.39918C4.61543 6.48707 4.57451 6.60226 4.58 6.72C4.57451 6.83774 4.61543 6.95293 4.69397 7.04082C4.77251 7.12871 4.88239 7.18227 5 7.19H10.6C10.714 7.1774 10.8189 7.12173 10.8933 7.03438C10.9676 6.94702 11.0058 6.83457 11 6.72ZM11.1 8.14001H5C4.87535 8.14001 4.7558 8.18953 4.66766 8.27767C4.57952 8.36582 4.53 8.48536 4.53 8.61001C4.53 8.73467 4.57952 8.85421 4.66766 8.94236C4.7558 9.0305 4.87535 9.08001 5 9.08001H11.1C11.2247 9.08001 11.3442 9.0305 11.4323 8.94236C11.5205 8.85421 11.57 8.73467 11.57 8.61001C11.57 8.48536 11.5205 8.36582 11.4323 8.27767C11.3442 8.18953 11.2247 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8036 10.8536C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8036 10.1464C15.7098 10.0527 15.5826 10 15.45 10H5C4.86739 10 4.74021 10.0527 4.64645 10.1464C4.55268 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55268 10.7598 4.64645 10.8536C4.74021 10.9473 4.86739 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4986 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.4159 12.0552C11.3337 11.9673 11.2202 11.9152 11.1 11.91H5C4.94089 11.9126 4.88286 11.9268 4.82924 11.9518C4.77562 11.9768 4.72746 12.0122 4.68752 12.0558C4.64758 12.0995 4.61664 12.1506 4.59648 12.2062C4.57631 12.2618 4.56731 12.3209 4.57 12.38C4.56451 12.5004 4.60649 12.6181 4.6869 12.7079C4.76731 12.7976 4.87974 12.8523 5 12.86ZM11.1 16.63H5C4.87535 16.63 4.7558 16.5805 4.66766 16.4923C4.57952 16.4042 4.53 16.2846 4.53 16.16C4.53 16.0353 4.57952 15.9158 4.66766 15.8276C4.7558 15.7395 4.87535 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4323 15.8276C11.5205 15.9158 11.57 16.0353 11.57 16.16C11.57 16.2846 11.5205 16.4042 11.4323 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM18.8503 11.592C18.7991 11.6175 18.7545 11.6544 18.72 11.7L18.26 12.14C18.2501 12.151 18.2447 12.1652 18.2447 12.18C18.2447 12.1947 18.2501 12.209 18.26 12.22L19.37 13.32C19.381 13.3298 19.3952 13.3353 19.41 13.3353C19.4247 13.3353 19.439 13.3298 19.45 13.32L19.86 12.91C19.9057 12.867 19.9421 12.8151 19.967 12.7575C19.9919 12.6998 20.0047 12.6377 20.0047 12.575C20.0047 12.5122 19.9919 12.4501 19.967 12.3925C19.9421 12.3349 19.9057 12.283 19.86 12.24L19.31 11.7C19.2755 11.6544 19.2309 11.6175 19.1797 11.592C19.1285 11.5666 19.0721 11.5533 19.015 11.5533C18.9578 11.5533 18.9014 11.5666 18.8503 11.592Z",showTrackChanges:"M17.2421 13.6048C17.2631 13.6136 17.2841 13.6226 17.305 13.6317V9.29505H13.2626C13.1897 9.30481 13.1159 9.30481 13.043 9.29505C12.7532 9.21632 12.4953 9.04872 12.3056 8.81577C12.1158 8.58283 12.0037 8.29625 11.985 7.99627V4H4.12976C4.09534 4 4.06234 4.01368 4.038 4.03804C4.01367 4.0624 4 4.09543 4 4.12988V19.8552C4 19.8896 4.01367 19.9227 4.038 19.947C4.06234 19.9714 4.09534 19.9851 4.12976 19.9851H13.4875C13.0501 19.8216 12.6281 19.6155 12.2277 19.3686C11.8529 19.1551 11.4911 18.9196 11.1442 18.6632C11.0697 18.6152 10.9982 18.5628 10.9302 18.5065H4.99812C4.87371 18.5065 4.75438 18.457 4.66641 18.3689C4.57843 18.2809 4.529 18.1614 4.529 18.0369C4.529 17.9124 4.57843 17.7929 4.66641 17.7049C4.75438 17.6168 4.87371 17.5673 4.99812 17.5673H10.4396C10.4472 17.4488 10.4756 17.3324 10.5235 17.2235C10.5939 17.017 10.6761 16.8149 10.7694 16.6182H4.99812C4.87371 16.6182 4.75438 16.5687 4.66641 16.4807C4.57843 16.3926 4.529 16.2732 4.529 16.1487C4.529 16.0241 4.57843 15.9047 4.66641 15.8166C4.75438 15.7286 4.87371 15.6791 4.99812 15.6791H11.0867C11.1576 15.6791 11.2268 15.6952 11.2895 15.7253C11.5204 15.361 11.7938 15.027 12.1033 14.73H4.99812C4.87371 14.73 4.75438 14.6805 4.66641 14.5924C4.57843 14.5044 4.529 14.385 4.529 14.2604C4.529 14.1359 4.57843 14.0164 4.66641 13.9284C4.75438 13.8403 4.87371 13.7909 4.99812 13.7909H13.4434C13.9833 13.525 14.5656 13.3516 15.166 13.2795L15.1923 13.2763H15.2189H15.4925C16.0923 13.2609 16.6886 13.3728 17.2421 13.6048ZM13.0829 4.64939L16.5764 8.14613C16.5975 8.16843 16.6118 8.19636 16.6174 8.22657C16.6231 8.25677 16.62 8.28798 16.6084 8.31645C16.5968 8.34492 16.5773 8.36944 16.5521 8.38707C16.527 8.40471 16.4973 8.41471 16.4666 8.41587H13.043L12.8134 8.18609V4.75929C12.8146 4.72857 12.8246 4.69884 12.8422 4.67366C12.8598 4.64849 12.8843 4.62893 12.9128 4.61733C12.9412 4.60573 12.9724 4.60259 13.0026 4.60827C13.0328 4.61396 13.0607 4.62824 13.0829 4.64939ZM10.9869 6.71746C10.9896 6.65841 10.9806 6.59941 10.9604 6.54383C10.9403 6.48825 10.9094 6.4372 10.8696 6.39358C10.8297 6.34997 10.7816 6.31465 10.7281 6.28965C10.6746 6.26466 10.6167 6.25047 10.5577 6.2479H4.99813C4.88074 6.25562 4.77106 6.30914 4.69267 6.39694C4.61428 6.48475 4.57343 6.59983 4.57891 6.71746C4.57343 6.83509 4.61428 6.95017 4.69267 7.03798C4.77106 7.12579 4.88074 7.1793 4.99813 7.18702H10.5876C10.7014 7.17444 10.8061 7.11882 10.8803 7.03154C10.9545 6.94427 10.9927 6.83192 10.9869 6.71746ZM11.0867 8.13614H4.99812C4.87371 8.13614 4.75438 8.18561 4.66641 8.27367C4.57843 8.36173 4.529 8.48116 4.529 8.6057C4.529 8.73023 4.57843 8.84967 4.66641 8.93773C4.75438 9.02579 4.87371 9.07526 4.99812 9.07526H11.0867C11.2111 9.07526 11.3304 9.02579 11.4184 8.93773C11.5064 8.84967 11.5558 8.73023 11.5558 8.6057C11.5558 8.48116 11.5064 8.36173 11.4184 8.27367C11.3304 8.18561 11.2111 8.13614 11.0867 8.13614ZM4.99812 10.9935H15.4285C15.5609 10.9935 15.6878 10.9408 15.7814 10.8472C15.875 10.7535 15.9276 10.6264 15.9276 10.4939C15.9276 10.3614 15.875 10.2344 15.7814 10.1407C15.6878 10.047 15.5609 9.9944 15.4285 9.9944H4.99812C4.86576 9.9944 4.73883 10.047 4.64523 10.1407C4.55164 10.2344 4.49906 10.3614 4.49906 10.4939C4.49906 10.6264 4.55164 10.7535 4.64523 10.8472C4.73883 10.9408 4.86576 10.9935 4.99812 10.9935ZM4.99812 12.8517H11.0867C11.2076 12.844 11.3208 12.7898 11.4027 12.7004C11.4845 12.611 11.5287 12.4934 11.5259 12.3722C11.5286 12.252 11.4841 12.1355 11.402 12.0477C11.3199 11.9599 11.2067 11.9078 11.0867 11.9026H4.99812C4.93912 11.9052 4.8812 11.9194 4.82769 11.9444C4.77417 11.9694 4.7261 12.0047 4.68623 12.0483C4.64637 12.0919 4.61549 12.143 4.59536 12.1985C4.57523 12.2541 4.56625 12.3131 4.56893 12.3722C4.56345 12.4925 4.60535 12.6101 4.68561 12.6998C4.76587 12.7894 4.87809 12.844 4.99812 12.8517ZM19.97 17.4974C19.5787 16.5636 19.0431 15.6971 18.383 14.9298C18.0152 14.5351 17.5679 14.2233 17.0706 14.0148C16.5732 13.8064 16.0373 13.7062 15.4984 13.7209H15.2189C14.4787 13.8098 13.7684 14.0666 13.1423 14.4717C12.5162 14.8769 11.9906 15.4196 11.6057 16.0587C11.3211 16.4677 11.0959 16.9151 10.937 17.3875C10.9006 17.464 10.8817 17.5476 10.8817 17.6323C10.8817 17.717 10.9006 17.8006 10.937 17.877C11.0642 18.0428 11.2196 18.1849 11.3961 18.2967C11.7346 18.5476 12.0879 18.7778 12.4541 18.986C13.4096 19.5767 14.497 19.92 15.6182 19.9851C16.4392 20.0504 17.2632 19.9005 18.0088 19.5501C18.7544 19.1998 19.3959 18.661 19.8702 17.9869C19.9311 17.923 19.9729 17.8432 19.9905 17.7566C20.0082 17.67 20.0011 17.5801 19.97 17.4974ZM15.9775 19.1758C14.3849 19.068 12.8507 18.5331 11.5358 17.6273C11.5788 17.5678 11.6255 17.5111 11.6756 17.4574C12.3061 16.569 13.1295 15.8359 14.0832 15.3126C13.8003 15.7406 13.6785 16.2566 13.7417 16.7681C13.7676 17.0339 13.8465 17.2918 13.9737 17.5265C14.1009 17.7613 14.2739 17.9681 14.4823 18.1348C14.6907 18.3016 14.9304 18.4248 15.1872 18.4972C15.4441 18.5696 15.7128 18.5897 15.9775 18.5564C16.305 18.4971 16.6137 18.3609 16.8785 18.159C17.1432 17.9572 17.3564 17.6954 17.5005 17.3951C17.6446 17.0949 17.7156 16.7647 17.7077 16.4317C17.6997 16.0987 17.613 15.7723 17.4547 15.4793C17.2614 15.3391 17.0533 15.2235 16.8351 15.1339C17.0715 15.226 17.2966 15.3485 17.5046 15.4993C18.0049 15.8976 18.4424 16.3691 18.8022 16.898L18.8927 17.0137L18.8927 17.0137C19.0823 17.2564 19.2729 17.5004 19.4709 17.7072C18.5404 18.6311 17.288 19.1576 15.9775 19.1758ZM16.3168 15.769C16.2085 15.8106 16.1171 15.8873 16.0574 15.9869C15.9977 16.0865 15.9731 16.2032 15.9875 16.3185C15.9949 16.3856 16.0156 16.4505 16.0483 16.5096C16.081 16.5686 16.1251 16.6206 16.178 16.6624C16.2309 16.7042 16.2916 16.7351 16.3566 16.7532C16.4216 16.7714 16.4895 16.7764 16.5564 16.7681H16.6063C16.5618 16.9495 16.4637 17.1132 16.3248 17.238C16.186 17.3627 16.0127 17.4427 15.8278 17.4674H15.6481C15.4335 17.4396 15.2337 17.3427 15.0789 17.1913C14.924 17.04 14.8226 16.8423 14.7897 16.6282C14.7628 16.3782 14.8311 16.1271 14.981 15.9253C15.1305 15.7238 15.3504 15.5861 15.5968 15.5395C15.3446 15.5862 15.12 15.7284 14.9697 15.9364C14.8191 16.1448 14.7547 16.4034 14.7897 16.6582C14.8226 16.8723 14.924 17.0699 15.0789 17.2213C15.2337 17.3727 15.4335 17.4696 15.6481 17.4974H15.8377C16.0209 17.4708 16.1919 17.39 16.3289 17.2654C16.4658 17.1408 16.5625 16.978 16.6063 16.7981C16.7293 16.7633 16.8359 16.686 16.9072 16.5799C16.9785 16.4737 17.0098 16.3457 16.9956 16.2186C16.9882 16.1515 16.9675 16.0865 16.9348 16.0275C16.9021 15.9685 16.858 15.9165 16.805 15.8747C16.7521 15.8329 16.6914 15.802 16.6264 15.7838C16.5615 15.7657 16.4936 15.7607 16.4266 15.769H16.3168Z",acceptAllChanges:"M9.36499 16.7348C9.38499 16.7547 9.41212 16.7659 9.44041 16.7659H10.9881C10.9028 16.6008 10.9289 16.3933 11.0663 16.2541L11.7266 15.585H10.1444C10.0549 15.5701 9.97363 15.5238 9.91498 15.4547C9.85639 15.3856 9.82422 15.298 9.82422 15.2074C9.82422 15.1169 9.85639 15.0292 9.91498 14.9601C9.97363 14.891 10.0549 14.8448 10.1444 14.8298H12.4879C12.5584 14.785 12.6407 14.7607 12.7257 14.7607C12.8106 14.7607 12.893 14.785 12.9635 14.8298H16.5295L18.3303 13.0091C18.4135 12.925 18.5271 12.8776 18.6456 12.8777C18.7642 12.8777 18.8777 12.9252 18.9609 13.0094L20 14.0621V8.25532H16.8001C16.7301 8.27288 16.6568 8.27288 16.5868 8.25532C16.3485 8.1935 16.1367 8.0565 15.9829 7.86478C15.8292 7.67306 15.7416 7.43688 15.7335 7.19149V4H9.44041C9.41293 4.0024 9.38718 4.01437 9.36767 4.03383C9.34816 4.05329 9.33615 4.07897 9.33375 4.10638V16.6596C9.33375 16.6878 9.34499 16.7148 9.36499 16.7348ZM10.0744 17.2979H11.4803L12.259 18.0957H5.06727C5.01734 18.0957 4.96838 18.1057 4.9232 18.1246C4.8788 18.1431 4.83798 18.1702 4.80335 18.2048C4.7333 18.2746 4.69398 18.3693 4.69398 18.468C4.69398 18.5668 4.7333 18.6615 4.80335 18.7313C4.87333 18.8011 4.96832 18.8404 5.06727 18.8404H12.9857L13.7947 19.6693L14.0836 19.9574H4.10733C4.09291 19.9591 4.07829 19.9576 4.06457 19.9528C4.05085 19.9481 4.03838 19.9403 4.02812 19.9301C4.01785 19.9198 4.01004 19.9074 4.00529 19.8937C4.00054 19.88 3.99896 19.8654 4.00067 19.8511V7.29787C4.00067 7.26966 4.01191 7.2426 4.03191 7.22265C4.05192 7.2027 4.07905 7.19149 4.10733 7.19149H8.70447V9.05319H5.06727C4.97294 9.05867 4.88453 9.10069 4.8208 9.17019C4.757 9.23973 4.72302 9.33135 4.72594 9.42553C4.72289 9.52082 4.75654 9.61364 4.82002 9.6849C4.88356 9.75613 4.97203 9.80038 5.06727 9.8085H8.70447V10.5638H5.06727C5.01968 10.5652 4.97274 10.5759 4.92932 10.5954C4.88583 10.6148 4.84664 10.6426 4.8139 10.6772C4.78122 10.7118 4.7557 10.7525 4.73877 10.7969C4.72184 10.8413 4.7139 10.8887 4.71527 10.9361C4.7139 10.9837 4.72184 11.031 4.73877 11.0754C4.74424 11.0897 4.75055 11.1037 4.75778 11.1171C4.76162 11.1243 4.76566 11.1313 4.76995 11.1382C4.78265 11.1585 4.79736 11.1776 4.8139 11.1951C4.84664 11.2297 4.88583 11.2575 4.92932 11.2769C4.95491 11.2884 4.98173 11.2968 5.0092 11.3021C5.02834 11.3058 5.04774 11.3079 5.06727 11.3085H8.70447V12.0638H5.06734C4.97782 12.0789 4.89651 12.1251 4.83792 12.1942C4.77926 12.2633 4.7471 12.351 4.7471 12.4415C4.7471 12.5321 4.77926 12.6197 4.83792 12.6888C4.89651 12.758 4.97782 12.8041 5.06734 12.8192H8.70447V13.5745H5.06734C4.97782 13.5895 4.89651 13.6357 4.83792 13.7048C4.81383 13.7332 4.79424 13.7647 4.77946 13.7983C4.7583 13.8465 4.7471 13.8988 4.7471 13.9522C4.7471 14.0427 4.77926 14.1303 4.83792 14.1994C4.89651 14.2686 4.97782 14.3147 5.06734 14.3298H8.70447V15.0744H5.06727C4.97776 15.0895 4.89651 15.1357 4.83785 15.2048C4.77926 15.2739 4.7471 15.3616 4.7471 15.4521C4.7471 15.5043 4.75778 15.5556 4.77809 15.6029C4.793 15.6376 4.81305 15.6701 4.83785 15.6994C4.89651 15.7685 4.97776 15.8147 5.06727 15.8298H8.70447V16.5851H5.06727C4.97776 16.6001 4.89651 16.6463 4.83785 16.7154C4.79489 16.7661 4.76618 16.8267 4.75387 16.8912C4.74938 16.9146 4.7471 16.9386 4.7471 16.9628C4.7471 17.0533 4.77926 17.1409 4.83785 17.21C4.89651 17.2792 4.97776 17.3253 5.06727 17.3404H9.95241C9.99552 17.3331 10.0367 17.3187 10.0744 17.2979ZM20 15.3204L18.5709 16.7659H19.8933C19.9216 16.7659 19.9487 16.7547 19.9687 16.7348C19.9887 16.7148 20 16.6878 20 16.6596V15.3204ZM14.7526 16.6264L13.7248 15.585H15.7825L14.7526 16.6264ZM14.9498 6.08721C14.9465 6.06854 14.9416 6.05023 14.9353 6.03244C14.9202 5.98939 14.897 5.94929 14.8665 5.91442C14.8145 5.85488 14.7444 5.81394 14.6669 5.79787H10.1337C10.0348 5.79787 9.93978 5.83709 9.8698 5.90693C9.79975 5.97676 9.76043 6.07146 9.76043 6.17022C9.76043 6.19463 9.76283 6.21879 9.76752 6.24239C9.77462 6.2782 9.78692 6.31268 9.80398 6.34479C9.82123 6.37716 9.8433 6.40709 9.8698 6.43348C9.93978 6.50332 10.0348 6.54257 10.1337 6.54257H14.6669C14.6811 6.54023 14.6951 6.53702 14.7088 6.53299C14.7206 6.52955 14.7322 6.52549 14.7436 6.52082C14.7624 6.51309 14.7806 6.50371 14.7979 6.4928C14.8378 6.46764 14.8722 6.43468 14.8991 6.39599C14.9259 6.35729 14.9447 6.31359 14.9543 6.26749C14.9554 6.26232 14.9563 6.25716 14.9571 6.25197C14.9579 6.24739 14.9586 6.24281 14.9591 6.23824C14.9612 6.22129 14.962 6.20424 14.9616 6.18723C14.961 6.16727 14.9588 6.14733 14.9549 6.12766C14.9539 6.11406 14.9523 6.10055 14.9498 6.08721ZM15.0189 7.29788H10.1445C10.0549 7.31291 9.97363 7.35911 9.91504 7.42823C9.85639 7.49738 9.82422 7.585 9.82422 7.67555C9.82422 7.76609 9.85639 7.85369 9.91504 7.92284C9.97363 7.99196 10.0549 8.03815 10.1445 8.05319H15.0189C15.0321 8.05241 15.0451 8.05095 15.058 8.04877C15.0745 8.04601 15.0906 8.04212 15.1064 8.03718C15.1669 8.01822 15.2219 7.98361 15.2654 7.93618C15.3291 7.86664 15.3632 7.77502 15.3602 7.68084C15.3606 7.67392 15.3608 7.66701 15.3608 7.66009C15.3609 7.65087 15.3606 7.64165 15.3599 7.63247C15.3592 7.62263 15.358 7.61279 15.3565 7.60302C15.3532 7.58188 15.3479 7.56104 15.3409 7.54072C15.3254 7.49575 15.301 7.45426 15.2693 7.41868C15.2492 7.39621 15.2265 7.37638 15.2017 7.35959C15.1872 7.34979 15.172 7.34102 15.1562 7.33339C15.1132 7.31265 15.0665 7.3006 15.0189 7.29788ZM10.1445 9.56381H18.496C18.5856 9.54877 18.6669 9.50258 18.7255 9.43346C18.7841 9.3643 18.8163 9.27671 18.8163 9.18617C18.8163 9.09562 18.7841 9.008 18.7255 8.93884C18.6669 8.86973 18.5856 8.82353 18.496 8.8085H10.1445C10.0549 8.82353 9.97363 8.86973 9.91504 8.93884C9.85639 9.008 9.82422 9.09562 9.82422 9.18617C9.82422 9.24412 9.83738 9.30087 9.86224 9.35236C9.87624 9.38132 9.89395 9.40859 9.91504 9.43346C9.97363 9.50258 10.0549 9.54877 10.1445 9.56381ZM10.1445 11.0638H15.0189C15.1084 11.0488 15.1897 11.0026 15.2483 10.9335C15.2854 10.8898 15.3118 10.8387 15.3263 10.7842C15.3347 10.7525 15.3391 10.7195 15.3391 10.6861C15.3391 10.5956 15.3069 10.508 15.2483 10.4389C15.1897 10.3697 15.1084 10.3235 15.0189 10.3085H10.1445C10.0549 10.3235 9.97363 10.3697 9.91504 10.4389C9.85639 10.508 9.82422 10.5956 9.82422 10.6861C9.82422 10.7424 9.83666 10.7976 9.8601 10.8478C9.87442 10.8785 9.89284 10.9073 9.91504 10.9335C9.97363 11.0026 10.0549 11.0488 10.1445 11.0638ZM18.496 12.5745H10.1444C10.0549 12.5594 9.97363 12.5132 9.91498 12.4441C9.85639 12.3749 9.82422 12.2873 9.82422 12.1968C9.82422 12.1062 9.85639 12.0186 9.91498 11.9495C9.97363 11.8803 10.0549 11.8342 10.1444 11.8191H18.496C18.5856 11.8342 18.6669 11.8803 18.7255 11.9495C18.7841 12.0186 18.8163 12.1062 18.8163 12.1968C18.8163 12.2873 18.7841 12.3749 18.7255 12.4441C18.6971 12.4776 18.6633 12.5058 18.6259 12.5276C18.5861 12.5507 18.5421 12.5667 18.496 12.5745ZM15.0189 14.0744H10.1444C10.0968 14.0731 10.0499 14.0624 10.0064 14.0429C9.96296 14.0234 9.92376 13.9956 9.89102 13.961C9.85834 13.9265 9.83282 13.8857 9.81589 13.8413C9.79897 13.7969 9.79102 13.7496 9.79239 13.7021C9.79102 13.6546 9.79897 13.6073 9.81589 13.5628C9.83282 13.5184 9.85834 13.4778 9.89102 13.4432C9.92376 13.4086 9.96296 13.3808 10.0064 13.3613C10.0499 13.3419 10.0968 13.3311 10.1444 13.3297H15.0189C15.0661 13.3311 15.1125 13.3419 15.1554 13.3615C15.1983 13.381 15.2368 13.4091 15.2686 13.4438C15.3005 13.4785 15.325 13.5193 15.3407 13.5637C15.3564 13.608 15.363 13.6551 15.3602 13.7021C15.3631 13.7963 15.3291 13.8879 15.2653 13.9574C15.2016 14.027 15.1132 14.0689 15.0189 14.0744ZM16.6188 4.52128L19.4133 7.30852C19.4293 7.32624 19.4401 7.34808 19.4443 7.37157C19.4485 7.39506 19.446 7.41925 19.4371 7.4414C19.4282 7.46356 19.4133 7.48278 19.394 7.4969C19.3747 7.51102 19.3518 7.51947 19.328 7.52128H16.5868L16.4054 7.34043V4.60639C16.4073 4.5826 16.4157 4.55979 16.4299 4.54056C16.444 4.52133 16.4633 4.50644 16.4855 4.49757C16.5077 4.48871 16.532 4.48624 16.5556 4.49043C16.5791 4.49462 16.601 4.50531 16.6188 4.52128ZM18.6454 13.3192L20 14.6915L14.7522 20L14.7416 19.9894L14.1123 19.3617L13.3976 18.6277L11.3817 16.5638L12.7257 15.2021L14.7522 17.2553L18.6454 13.3192Z",rejectAllChanges:"M9.54637 16.5847H8.96997V15.8295H12.786C12.8024 15.8265 12.8186 15.8223 12.8343 15.817C12.8535 15.8105 12.8719 15.8023 12.8897 15.7926C12.9315 15.7697 12.969 15.738 12.9997 15.6991C13.0268 15.6649 13.0478 15.6261 13.0621 15.5847H13.571V16.7656H9.79386C9.78396 16.7479 9.77269 16.731 9.76011 16.7151C9.70552 16.6459 9.62976 16.5998 9.54637 16.5847ZM13.4717 12.9573V13.3295H9.72523C9.6809 13.3309 9.63716 13.3416 9.59671 13.361C9.57578 13.3711 9.55595 13.3834 9.53745 13.3977C9.5201 13.411 9.50391 13.4262 9.48917 13.4429C9.45872 13.4775 9.43494 13.5182 9.41917 13.5626C9.41778 13.5664 9.41644 13.5703 9.41523 13.5742H8.96997V12.8189H12.786C12.8694 12.8039 12.9452 12.7577 12.9997 12.6886C13.0078 12.6784 13.0153 12.6677 13.0223 12.6568L13.029 12.6458L13.033 12.6389L13.0397 12.6266C13.0452 12.6157 13.0503 12.6046 13.055 12.5931C13.0576 12.5869 13.0599 12.5806 13.0621 12.5742H13.6872C13.6453 12.5965 13.607 12.6269 13.5746 12.6644C13.5059 12.7439 13.469 12.849 13.4717 12.9573ZM9.82598 14.0742H13.4758C13.4809 14.0932 13.4904 14.1108 13.5037 14.1251C13.5242 14.147 13.552 14.1593 13.581 14.1593H13.6008L13.571 14.1912V14.8295H9.72523C9.64183 14.8445 9.56614 14.8907 9.51149 14.9598C9.4845 14.994 9.46351 15.0328 9.4492 15.0741H8.96997V14.3295H9.54637C9.62976 14.3145 9.70552 14.2683 9.76011 14.1992C9.78947 14.162 9.81166 14.1195 9.82598 14.0742ZM18.9075 8.2552V12.5317H17.7846V12.323C17.7978 12.2827 17.8047 12.2399 17.8047 12.1965C17.8047 12.106 17.7747 12.0184 17.7201 11.9493C17.6655 11.8801 17.5897 11.834 17.5063 11.8189H9.72523C9.64183 11.834 9.56614 11.8801 9.51149 11.9493C9.48444 11.9835 9.46351 12.0222 9.4492 12.0636H8.96997V11.3083H9.54637C9.63425 11.3028 9.71662 11.2608 9.776 11.1913C9.80687 11.1551 9.83029 11.113 9.84527 11.0676L9.84654 11.0637H14.2667C14.3501 11.0486 14.4258 11.0024 14.4805 10.9333C14.5231 10.8794 14.5507 10.8142 14.5607 10.7452C14.5636 10.7258 14.565 10.706 14.565 10.686C14.565 10.6658 14.5635 10.6458 14.5606 10.626C14.5572 10.6026 14.5516 10.5796 14.5442 10.5573C14.5299 10.5144 14.5084 10.4741 14.4805 10.4387C14.4258 10.3696 14.3501 10.3234 14.2667 10.3083H9.72529C9.6832 10.3159 9.64299 10.3314 9.60653 10.3538C9.57081 10.3759 9.5386 10.4045 9.51155 10.4387C9.49639 10.4579 9.4831 10.4785 9.47182 10.5002C9.46133 10.5205 9.45259 10.5417 9.44568 10.5636H8.96997V9.80838H9.16873C9.25656 9.80286 9.33899 9.76085 9.39837 9.69131C9.45775 9.62177 9.48947 9.53022 9.48674 9.43601C9.48711 9.42951 9.48735 9.42302 9.48741 9.41653C9.48741 9.41049 9.48729 9.40445 9.48705 9.39848C9.49457 9.41055 9.50269 9.42218 9.51155 9.43334C9.56614 9.50249 9.64189 9.54866 9.72529 9.56372H17.5063C17.5897 9.54866 17.6655 9.50249 17.7201 9.43334C17.7747 9.36419 17.8047 9.2766 17.8047 9.18603C17.8047 9.09552 17.7747 9.00786 17.7201 8.93878C17.6655 8.86963 17.5897 8.82346 17.5063 8.8084H9.72529C9.64189 8.82346 9.56614 8.86963 9.51155 8.93878C9.4569 9.00786 9.42694 9.09552 9.42694 9.18603L9.427 9.19707L9.42754 9.20875C9.41972 9.19661 9.41123 9.18499 9.40201 9.17389C9.38478 9.15311 9.36537 9.1346 9.34427 9.11863C9.33735 9.11344 9.33026 9.1085 9.32298 9.10383C9.31855 9.10097 9.31406 9.09824 9.30951 9.09565L9.30424 9.09266L9.29659 9.08857C9.28792 9.08402 9.27906 9.07993 9.27009 9.07623C9.2616 9.07279 9.25298 9.06974 9.24431 9.06701C9.21974 9.05935 9.19439 9.05461 9.16873 9.05305H8.96997V4.10638C8.97221 4.07897 8.9834 4.05328 9.00157 4.03383C9.01975 4.01437 9.04374 4.0024 9.06935 4H14.9325V7.1914C14.9401 7.43679 15.0216 7.67296 15.1649 7.86468C15.3082 8.0564 15.5055 8.19338 15.7275 8.2552C15.7927 8.27277 15.861 8.27277 15.9262 8.2552H18.9075ZM13.571 17.2975V19.4251L13.5722 19.4615C13.5835 19.6376 13.6323 19.8068 13.7133 19.957H4.10061C4.08718 19.9587 4.07355 19.9571 4.06077 19.9524C4.04799 19.9477 4.03637 19.9399 4.02681 19.9296C4.01724 19.9194 4.00997 19.907 4.00554 19.8933C4.00111 19.8796 3.99964 19.865 4.00124 19.8506V7.29778C4.00124 7.26957 4.01171 7.24251 4.03034 7.22256C4.04898 7.20261 4.07426 7.1914 4.10061 7.1914H8.38368V9.05305H4.99497C4.90708 9.05857 4.82471 9.10052 4.76533 9.17006C4.70589 9.2396 4.67423 9.33121 4.67696 9.42536C4.67411 9.52067 4.70547 9.61346 4.76461 9.68475C4.8238 9.75598 4.90623 9.80026 4.99497 9.80838H8.38368V10.5636H4.99497C4.96682 10.5645 4.93898 10.5692 4.91199 10.5774C4.89647 10.5821 4.88124 10.588 4.86644 10.5952C4.8494 10.6034 4.83308 10.613 4.81762 10.6241C4.79627 10.6393 4.77655 10.657 4.7589 10.6771C4.72846 10.7116 4.70468 10.7523 4.68891 10.7967C4.67314 10.8411 4.66574 10.8885 4.66701 10.9359C4.66641 10.9597 4.66792 10.9834 4.67156 11.0067C4.6752 11.03 4.68102 11.053 4.68891 11.0752C4.70468 11.1196 4.72846 11.1603 4.7589 11.1949C4.7731 11.211 4.78862 11.2256 4.80524 11.2386C4.81452 11.2459 4.82417 11.2527 4.83417 11.259C4.84461 11.2655 4.85534 11.2714 4.86644 11.2767C4.9069 11.2962 4.95063 11.3069 4.99497 11.3083H8.38368V12.0636H4.99503C4.91163 12.0787 4.83587 12.1249 4.78128 12.194C4.7526 12.2303 4.7307 12.2717 4.71639 12.3159C4.70347 12.3559 4.69667 12.3983 4.69667 12.4413C4.69667 12.5318 4.72664 12.6194 4.78128 12.6886C4.809 12.7237 4.84218 12.7529 4.87906 12.7751C4.89416 12.7842 4.90993 12.7921 4.92619 12.7988C4.94833 12.8079 4.97137 12.8147 4.99503 12.8189H8.38368V13.5742H4.99503C4.95275 13.5819 4.91242 13.5975 4.87584 13.62C4.8403 13.642 4.80822 13.6705 4.78128 13.7046C4.72664 13.7737 4.69667 13.8613 4.69667 13.9519C4.69667 14.0424 4.72664 14.13 4.78128 14.1992C4.83587 14.2683 4.91163 14.3145 4.99503 14.3295H8.38368V15.0741H4.99497C4.94644 15.0829 4.90047 15.1022 4.85977 15.1304C4.83878 15.145 4.81919 15.162 4.80136 15.1811C4.79439 15.1885 4.78765 15.1964 4.78122 15.2045C4.77188 15.2163 4.76327 15.2287 4.75539 15.2416C4.74441 15.2594 4.73495 15.2781 4.727 15.2975C4.71924 15.3163 4.71293 15.3358 4.70808 15.3558C4.70407 15.3723 4.7011 15.389 4.69922 15.4061C4.69752 15.4212 4.69667 15.4364 4.69667 15.4518C4.69667 15.5423 4.72664 15.6299 4.78122 15.6991C4.83587 15.7682 4.91157 15.8144 4.99497 15.8295H8.38368V16.5847H4.99497C4.91157 16.5998 4.83587 16.6459 4.78122 16.7151C4.72664 16.7842 4.69667 16.8718 4.69667 16.9624C4.69667 17.0529 4.72664 17.1405 4.78122 17.2097C4.83587 17.2788 4.91157 17.325 4.99497 17.34H9.54637C9.58655 17.3328 9.62496 17.3183 9.66008 17.2975H13.571ZM15.7573 4.52124L18.3609 7.30839C18.3758 7.32612 18.3858 7.34796 18.3897 7.37145C18.3937 7.39493 18.3914 7.41913 18.3831 7.44128C18.3748 7.46343 18.3609 7.48266 18.3429 7.49678C18.325 7.51089 18.3036 7.51934 18.2814 7.52115H15.7275L15.5585 7.34031V4.60634C15.5602 4.58255 15.5681 4.55975 15.5813 4.54051C15.5945 4.52128 15.6125 4.50639 15.6332 4.49753C15.6539 4.48867 15.6765 4.48619 15.6984 4.49038C15.7203 4.49457 15.7407 4.50526 15.7573 4.52124ZM14.1248 5.91437C14.1732 5.97391 14.2021 6.04884 14.2071 6.1276C14.2157 6.17377 14.2155 6.22129 14.2065 6.26739C14.2045 6.27778 14.2021 6.28804 14.1992 6.29817L14.1944 6.31388C14.1847 6.34291 14.1715 6.3705 14.1551 6.39595C14.13 6.43465 14.098 6.46757 14.0608 6.49276C14.0354 6.5099 14.008 6.52328 13.9794 6.53244C13.9661 6.53672 13.9525 6.5401 13.9387 6.5425H9.71529C9.62309 6.5425 9.5346 6.50328 9.4694 6.43342C9.40413 6.36362 9.3675 6.26889 9.3675 6.17013C9.3675 6.07144 9.40413 5.97671 9.4694 5.90691C9.5346 5.83704 9.62309 5.79783 9.71529 5.79783H13.9387C13.9718 5.80516 14.0034 5.81769 14.0326 5.83484C14.0672 5.85522 14.0984 5.88204 14.1248 5.91437ZM14.2667 7.29776H9.72529C9.69606 7.30302 9.66773 7.31211 9.64092 7.3247C9.62612 7.33171 9.61175 7.33977 9.59798 7.34879C9.56565 7.36996 9.53642 7.39664 9.51155 7.42813C9.4569 7.49722 9.42694 7.58487 9.42694 7.67538C9.42694 7.70155 9.42942 7.72752 9.43434 7.75285C9.44635 7.81505 9.47273 7.87355 9.51155 7.9227C9.55292 7.9751 9.60647 8.01432 9.66628 8.03678C9.67762 8.04107 9.6892 8.04477 9.70097 8.04775C9.70898 8.04983 9.71711 8.05158 9.72529 8.05308H14.2667C14.3546 8.04756 14.437 8.00555 14.4964 7.93601C14.5558 7.86647 14.5875 7.77492 14.5847 7.68071C14.5874 7.63318 14.5813 7.58559 14.5667 7.54059C14.5522 7.4956 14.5296 7.45417 14.5 7.41859C14.4704 7.38301 14.4346 7.35398 14.3946 7.33327C14.3546 7.31256 14.3111 7.30048 14.2667 7.29776ZM4.99497 18.84H12.786C12.8783 18.84 12.9667 18.8008 13.032 18.731C13.0972 18.6611 13.1338 18.5664 13.1338 18.4677C13.1338 18.3689 13.0972 18.2742 13.032 18.2044C12.9667 18.1346 12.8783 18.0954 12.786 18.0954H4.99497C4.90277 18.0954 4.81428 18.1346 4.74908 18.2044C4.68381 18.2742 4.64718 18.3689 4.64718 18.4677C4.64718 18.5664 4.68381 18.6611 4.74908 18.731C4.81428 18.8008 4.90277 18.84 4.99497 18.84ZM17.5858 12.7444H19.5733H19.623C19.7249 12.7499 19.821 12.7971 19.8913 12.8764C19.9616 12.9556 20.0007 13.0607 20.0006 13.17V13.8295C20.0007 13.8458 19.9976 13.862 19.9914 13.8769C19.9853 13.8918 19.9764 13.9052 19.9652 13.9163C19.9539 13.9273 19.9407 13.9357 19.9262 13.9409C19.9118 13.9461 19.8965 13.948 19.8814 13.9465H13.7797C13.7507 13.9465 13.7229 13.9342 13.7024 13.9123C13.6819 13.8903 13.6704 13.8606 13.6704 13.8295V13.17C13.6677 13.0617 13.7046 12.9566 13.7733 12.8771C13.842 12.7976 13.9371 12.75 14.0381 12.7444H16.0256V12.5104C16.0352 12.439 16.0687 12.3737 16.1199 12.3268C16.1711 12.2798 16.2365 12.2544 16.3039 12.2551H17.2976C17.3667 12.2517 17.4345 12.276 17.4878 12.3232C17.541 12.3704 17.576 12.4371 17.5858 12.5104V12.7444ZM14.0679 19.4251V14.1912H19.5037V19.4251C19.4935 19.585 19.4256 19.7344 19.3143 19.8416C19.203 19.9488 19.0571 20.0055 18.9075 19.9996H14.6642C14.5146 20.0055 14.3687 19.9488 14.2574 19.8416C14.1461 19.7344 14.0781 19.585 14.0679 19.4251ZM15.5983 15.1593H15.2505C15.0969 15.1593 14.9723 15.2926 14.9723 15.4572V18.7336C14.9723 18.8981 15.0969 19.0315 15.2505 19.0315H15.5983C15.752 19.0315 15.8766 18.8981 15.8766 18.7336V15.4572C15.8766 15.2926 15.752 15.1593 15.5983 15.1593ZM16.9598 15.1593H16.612C16.4583 15.1593 16.3337 15.2926 16.3337 15.4572V18.7336C16.3337 18.8981 16.4583 19.0315 16.612 19.0315H16.9598C17.1135 19.0315 17.238 18.8981 17.238 18.7336V15.4572C17.238 15.2926 17.1135 15.1593 16.9598 15.1593ZM17.9635 15.1593H18.3113C18.465 15.1593 18.5895 15.2926 18.5895 15.4572V18.7336C18.5895 18.8981 18.465 19.0315 18.3113 19.0315H17.9635C17.8098 19.0315 17.6852 18.8981 17.6852 18.7336V15.4572C17.6852 15.2926 17.8098 15.1593 17.9635 15.1593Z",acceptSingleChange:"M17.2 20H15.6628L17.33 18.3091V19.87C17.33 19.8871 17.3266 19.904 17.3201 19.9197C17.3136 19.9355 17.304 19.9499 17.2919 19.9619C17.2799 19.974 17.2655 19.9836 17.2497 19.9901C17.234 19.9966 17.2171 20 17.2 20ZM4.13 20H14.4978L14.1823 19.6791L13.5135 18.9904L13.5123 18.9891L13.0529 18.52H5C4.87537 18.52 4.75586 18.4705 4.66766 18.3823C4.57953 18.2942 4.53003 18.1747 4.53003 18.05C4.53003 17.9253 4.57953 17.8058 4.66766 17.7177C4.75586 17.6295 4.87537 17.58 5 17.58H12.1323L11.6235 17.0604L11.6231 16.48L12.8831 15.19L13.4765 15.1896L15.0807 16.8276L17.33 14.5413V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20ZM13.1 4.65L16.6 8.15C16.6212 8.17232 16.6355 8.20028 16.6412 8.23051C16.6469 8.26075 16.6437 8.29199 16.6321 8.32048C16.6205 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5208 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8312 4.72925 12.8412 4.6995 12.8588 4.67429C12.8765 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9893 4.60315 13.0195 4.60884C13.0497 4.61453 13.0777 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60184 10.9735 6.5462C10.9534 6.49057 10.9224 6.43948 10.8825 6.39581C10.8425 6.35217 10.7944 6.3168 10.7408 6.29178C10.6871 6.26678 10.6292 6.25256 10.57 6.25H5C4.88239 6.25772 4.77252 6.31131 4.69397 6.39917C4.61542 6.48706 4.57452 6.60226 4.58002 6.72C4.57452 6.83774 4.61542 6.95294 4.69397 7.04083C4.77252 7.12869 4.88239 7.18228 5 7.19H10.6C10.7141 7.1774 10.8189 7.12173 10.8933 7.03436C10.9677 6.94702 11.0058 6.83456 11 6.72ZM11.1 8.14001H5C4.87537 8.14001 4.75586 8.18954 4.66766 8.27768C4.57953 8.36581 4.53003 8.48535 4.53003 8.61002C4.53003 8.73468 4.57953 8.85422 4.66766 8.94235C4.71558 8.99023 4.77277 9.02673 4.83496 9.05008C4.86932 9.06296 4.90521 9.07184 4.94189 9.07642C4.96106 9.0788 4.98047 9.08002 5 9.08002H11.1C11.2247 9.08002 11.3442 9.03049 11.4324 8.94235C11.5205 8.85422 11.57 8.73468 11.57 8.61002C11.57 8.48535 11.5205 8.36581 11.4324 8.27768C11.3442 8.18954 11.2247 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8035 10.8535C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8035 10.1465C15.7098 10.0527 15.5826 10 15.45 10H5C4.86737 10 4.74023 10.0527 4.64642 10.1465C4.55267 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55267 10.7598 4.64642 10.8535C4.74023 10.9473 4.86737 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4986 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.416 12.0552C11.3337 11.9673 11.2203 11.9152 11.1 11.91H5C4.94086 11.9126 4.88287 11.9268 4.82922 11.9518C4.77563 11.9768 4.72748 12.0122 4.6875 12.0558C4.65833 12.0878 4.63391 12.1237 4.61505 12.1624C4.60809 12.1767 4.60193 12.1913 4.5965 12.2062C4.58264 12.2443 4.5741 12.2841 4.57092 12.3243C4.56946 12.3428 4.56915 12.3614 4.57001 12.38C4.56451 12.5004 4.60651 12.6181 4.68689 12.7079C4.76733 12.7976 4.87976 12.8523 5 12.86ZM15.45 14.74H5C4.87537 14.74 4.75586 14.6905 4.66766 14.6023C4.57953 14.5142 4.53003 14.3947 4.53003 14.27C4.53003 14.1453 4.57953 14.0258 4.66766 13.9377C4.75586 13.8495 4.87537 13.8 5 13.8H15.45C15.5747 13.8 15.6942 13.8495 15.7823 13.9377C15.8705 14.0258 15.92 14.1453 15.92 14.27C15.92 14.3947 15.8705 14.5142 15.7823 14.6023C15.6942 14.6905 15.5747 14.74 15.45 14.74ZM11.1 16.63H5C4.87537 16.63 4.75586 16.5805 4.66766 16.4923C4.57953 16.4042 4.53003 16.2846 4.53003 16.16C4.53003 16.0353 4.57953 15.9158 4.66766 15.8276C4.75586 15.7395 4.87537 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4324 15.8276C11.5205 15.9158 11.57 16.0353 11.57 16.16C11.57 16.2846 11.5205 16.4042 11.4324 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM18.73 13.71L20 15.01L15.08 20L15.07 19.99L14.48 19.39L13.81 18.7L11.92 16.77L13.18 15.48L15.08 17.42L18.73 13.71Z",rejectSingleChange:"M17.0495 11.5C17.1461 11.5 17.241 11.5173 17.33 11.5501V9.3H13.28C13.207 9.30976 13.133 9.30976 13.06 9.3C12.7697 9.22119 12.5113 9.05343 12.3212 8.82027C12.1311 8.58711 12.0187 8.30026 12 8V4H4.13C4.09552 4 4.06246 4.0137 4.03808 4.03808C4.0137 4.06246 4 4.09552 4 4.13V19.87C4 19.9045 4.0137 19.9375 4.03808 19.9619C4.06246 19.9863 4.09552 20 4.13 20H13.2305C13.1075 19.8287 13.0338 19.6249 13.0205 19.4112L13.0195 19.3956V18.52H5C4.87537 18.52 4.75586 18.4705 4.66772 18.3823C4.57959 18.2942 4.53003 18.1747 4.53003 18.05C4.53003 18.0119 4.53467 17.9742 4.54358 17.9378C4.56396 17.8552 4.60657 17.7788 4.66772 17.7177C4.75586 17.6295 4.87537 17.58 5 17.58H13.0195V14.74H5C4.87537 14.74 4.75586 14.6905 4.66772 14.6023C4.57959 14.5142 4.53003 14.3947 4.53003 14.27C4.53003 14.1453 4.57959 14.0258 4.66772 13.9377C4.75586 13.8495 4.87537 13.8 5 13.8H12.8393C12.6229 13.6377 12.4998 13.3897 12.4998 13.1032C12.4997 12.8414 12.6008 12.5847 12.7513 12.3911C12.9 12.1998 13.1561 12 13.4994 12L15.2519 12C15.2928 11.8972 15.3589 11.7915 15.4649 11.6992C15.6135 11.5698 15.8041 11.499 16.0011 11.5H17.0495ZM13.1 4.65L16.6 8.15C16.6211 8.17232 16.6354 8.20028 16.6411 8.23051C16.6468 8.26075 16.6437 8.29199 16.6321 8.32048C16.6204 8.34898 16.6009 8.37352 16.5757 8.39117C16.5505 8.40882 16.5207 8.41883 16.49 8.42H13.06L12.83 8.19V4.76C12.8311 4.72925 12.8411 4.6995 12.8588 4.67429C12.8764 4.64909 12.901 4.62951 12.9295 4.6179C12.958 4.6063 12.9892 4.60315 13.0194 4.60884C13.0497 4.61453 13.0776 4.62882 13.1 4.65ZM11 6.72C11.0027 6.66089 10.9937 6.60184 10.9735 6.5462C10.9716 6.5408 10.9695 6.53543 10.9673 6.53012C10.9626 6.51852 10.9575 6.50717 10.9518 6.49603C10.9406 6.47391 10.9275 6.45273 10.9127 6.43274C10.9033 6.41992 10.8932 6.40759 10.8824 6.39581C10.8425 6.35217 10.7943 6.3168 10.7407 6.29178C10.6871 6.26678 10.629 6.25256 10.5699 6.25H5C4.88232 6.25772 4.77246 6.31131 4.69397 6.39917C4.61536 6.48706 4.57446 6.60226 4.57996 6.72C4.57715 6.7811 4.58679 6.84152 4.60767 6.8978C4.61523 6.91803 4.62415 6.93771 4.63452 6.9567C4.65088 6.98669 4.67078 7.01495 4.69397 7.04083C4.77246 7.12869 4.88232 7.18228 5 7.19H10.6C10.714 7.1774 10.8188 7.12173 10.8932 7.03436C10.922 7.00049 10.9454 6.96283 10.9629 6.92273C10.9725 6.9006 10.9805 6.87775 10.9865 6.8544C10.9933 6.82791 10.9977 6.80075 10.9995 6.77325C11.0001 6.76453 11.0004 6.75574 11.0005 6.74695C11.0006 6.73798 11.0005 6.729 11 6.72ZM11.1 8.14001H5C4.97534 8.14001 4.95081 8.14194 4.92676 8.14575C4.89587 8.15063 4.8656 8.15857 4.83643 8.1694C4.77368 8.19272 4.71606 8.2294 4.66772 8.27768C4.57959 8.36581 4.53003 8.48535 4.53003 8.61002C4.53003 8.73468 4.57959 8.85422 4.66772 8.94235C4.75586 9.03049 4.87537 9.08002 5 9.08002H11.1C11.2247 9.08002 11.3442 9.03049 11.4324 8.94235C11.4617 8.91306 11.4867 8.88028 11.5071 8.845C11.5349 8.79691 11.554 8.74414 11.5634 8.68915C11.5677 8.66318 11.5701 8.63672 11.5701 8.61002C11.5701 8.48535 11.5205 8.36581 11.4324 8.27768C11.3929 8.23831 11.3474 8.20663 11.2979 8.18365C11.2365 8.15518 11.1689 8.14001 11.1 8.14001ZM5 11H15.45C15.5826 11 15.7098 10.9473 15.8036 10.8535C15.8973 10.7598 15.95 10.6326 15.95 10.5C15.95 10.3674 15.8973 10.2402 15.8036 10.1465C15.7098 10.0527 15.5826 10 15.45 10H5C4.86743 10 4.74023 10.0527 4.64648 10.1465C4.55273 10.2402 4.5 10.3674 4.5 10.5C4.5 10.6326 4.55273 10.7598 4.64648 10.8535C4.74023 10.9473 4.86743 11 5 11ZM5 12.86H11.1C11.2211 12.8523 11.3346 12.798 11.4166 12.7085C11.4987 12.6191 11.5428 12.5013 11.54 12.38C11.5427 12.2597 11.4982 12.1431 11.4159 12.0552C11.3336 11.9673 11.2202 11.9152 11.1 11.91H5C4.94092 11.9126 4.88281 11.9268 4.82922 11.9518C4.77563 11.9768 4.72742 12.0122 4.6875 12.0558C4.64758 12.0995 4.6167 12.1506 4.59644 12.2062C4.58899 12.2266 4.58313 12.2475 4.57874 12.2687C4.57129 12.3052 4.56824 12.3426 4.56995 12.38C4.56445 12.5004 4.60645 12.6181 4.68689 12.7079C4.76733 12.7976 4.87976 12.8523 5 12.86ZM11.1 16.63H5C4.87537 16.63 4.75586 16.5805 4.66772 16.4923C4.57959 16.4042 4.53003 16.2846 4.53003 16.16C4.53003 16.0353 4.57959 15.9158 4.66772 15.8276C4.75586 15.7395 4.87537 15.69 5 15.69H11.1C11.2247 15.69 11.3442 15.7395 11.4324 15.8276C11.5205 15.9158 11.5701 16.0353 11.5701 16.16C11.5701 16.2846 11.5205 16.4042 11.4324 16.4923C11.3442 16.5805 11.2247 16.63 11.1 16.63ZM19.59 12.53H17.36V12.3C17.3574 12.2195 17.3236 12.1432 17.2657 12.0872C17.2078 12.0313 17.1305 12 17.05 12H16C15.9242 11.9994 15.8509 12.0265 15.7938 12.0762C15.7367 12.126 15.6997 12.1949 15.69 12.27V12.5H13.44C13.3768 12.4994 13.3142 12.5125 13.2565 12.5382C13.1988 12.564 13.1473 12.6019 13.1055 12.6493C13.0638 12.6968 13.0327 12.7526 13.0145 12.8132C12.9963 12.8737 12.9913 12.9374 13 13V13.67C13 13.6871 13.0033 13.704 13.0099 13.7198C13.0164 13.7355 13.026 13.7499 13.038 13.7619C13.0501 13.774 13.0644 13.7836 13.0802 13.7901C13.096 13.7966 13.1129 13.8 13.13 13.8H19.84C19.8611 13.8054 19.8834 13.8054 19.9045 13.8C19.9257 13.7946 19.9452 13.7839 19.9611 13.7689C19.9771 13.754 19.989 13.7352 19.9958 13.7144C20.0026 13.6937 20.004 13.6715 20 13.65V13C20.0028 12.8866 19.9617 12.7765 19.8853 12.6927C19.809 12.6088 19.7031 12.5577 19.59 12.55V12.53ZM13.52 14V19.38C13.5303 19.5454 13.6054 19.7 13.7289 19.8105C13.8525 19.9209 14.0145 19.9782 14.18 19.97H18.84C19.0055 19.9782 19.1676 19.9209 19.2911 19.8105C19.4146 19.7 19.4897 19.5454 19.5 19.38V14H13.52ZM15.52 18.67C15.52 18.7522 15.4874 18.8311 15.4292 18.8892C15.3711 18.9473 15.2922 18.98 15.21 18.98H14.83C14.7478 18.98 14.669 18.9473 14.6108 18.8892C14.5527 18.8311 14.52 18.7522 14.52 18.67V15.33C14.52 15.2893 14.528 15.249 14.5436 15.2114C14.5592 15.1738 14.582 15.1396 14.6108 15.1108C14.6396 15.082 14.6738 15.0592 14.7114 15.0436C14.749 15.028 14.7893 15.02 14.83 15.02H15.21C15.2507 15.02 15.291 15.028 15.3287 15.0436C15.3663 15.0592 15.4004 15.082 15.4292 15.1108C15.458 15.1396 15.4808 15.1738 15.4964 15.2114C15.512 15.249 15.52 15.2893 15.52 15.33V18.67ZM17.01 18.67C17.01 18.7522 16.9774 18.8311 16.9192 18.8892C16.8611 18.9473 16.7822 18.98 16.7 18.98H16.32C16.2798 18.98 16.2399 18.9719 16.2029 18.9562C16.1658 18.9405 16.1323 18.9176 16.1043 18.8886C16.0763 18.8597 16.0544 18.8254 16.0399 18.7879C16.0254 18.7503 16.0187 18.7102 16.02 18.67V15.33C16.0187 15.2898 16.0254 15.2497 16.0399 15.2121C16.0544 15.1746 16.0763 15.1403 16.1043 15.1114C16.1323 15.0824 16.1658 15.0595 16.2029 15.0438C16.2399 15.0281 16.2798 15.02 16.32 15.02H16.7C16.7407 15.02 16.781 15.028 16.8187 15.0436C16.8563 15.0592 16.8904 15.082 16.9192 15.1108C16.948 15.1396 16.9708 15.1738 16.9864 15.2114C17.002 15.249 17.01 15.2893 17.01 15.33V18.67ZM18.51 18.67C18.51 18.7107 18.502 18.751 18.4864 18.7886C18.4708 18.8262 18.448 18.8604 18.4192 18.8892C18.3904 18.918 18.3563 18.9408 18.3187 18.9564C18.281 18.972 18.2407 18.98 18.2 18.98H17.82C17.7378 18.98 17.659 18.9473 17.6008 18.8892C17.5427 18.8311 17.51 18.7522 17.51 18.67V15.33C17.51 15.2893 17.518 15.249 17.5336 15.2114C17.5492 15.1738 17.572 15.1396 17.6008 15.1108C17.6296 15.082 17.6638 15.0592 17.7014 15.0436C17.739 15.028 17.7793 15.02 17.82 15.02H18.2C18.2407 15.02 18.281 15.028 18.3187 15.0436C18.3563 15.0592 18.3904 15.082 18.4192 15.1108C18.448 15.1396 18.4708 15.1738 18.4864 15.2114C18.502 15.249 18.51 15.2893 18.51 15.33V18.67Z"},t.FILEICONS={docIcon:{extension:".doc",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9.617188 46.875 C 13.234375 46.875 16.160156 43.929688 16.160156 40.292969 C 16.160156 36.695312 13.234375 33.75 9.617188 33.75 L 7.402344 33.75 C 6.820312 33.75 6.371094 34.199219 6.371094 34.78125 L 6.371094 45.84375 C 6.371094 46.335938 6.714844 46.757812 7.191406 46.855469 L 7.402344 46.875 Z M 9.617188 44.792969 L 8.453125 44.792969 L 8.453125 35.832031 L 9.617188 35.832031 C 12.089844 35.832031 14.078125 37.835938 14.078125 40.292969 C 14.078125 42.789062 12.089844 44.773438 9.617188 44.792969 Z M 24.816406 46.875 C 26.539062 46.875 28.191406 46.085938 29.296875 44.867188 C 30.460938 43.648438 31.191406 41.980469 31.191406 40.125 C 31.191406 38.269531 30.460938 36.617188 29.296875 35.382812 C 28.191406 34.144531 26.539062 33.375 24.816406 33.375 C 23.015625 33.375 21.367188 34.144531 20.222656 35.382812 C 19.058594 36.617188 18.367188 38.269531 18.367188 40.125 C 18.367188 41.980469 19.058594 43.648438 20.222656 44.867188 C 21.367188 46.085938 23.015625 46.875 24.816406 46.875 Z M 24.816406 44.738281 C 23.617188 44.738281 22.566406 44.230469 21.777344 43.386719 C 20.992188 42.582031 20.503906 41.398438 20.503906 40.125 C 20.503906 38.851562 20.992188 37.667969 21.777344 36.84375 C 22.566406 36 23.617188 35.511719 24.816406 35.511719 C 25.941406 35.511719 26.992188 36 27.777344 36.84375 C 28.546875 37.667969 29.054688 38.851562 29.054688 40.125 C 29.054688 41.398438 28.546875 42.582031 27.777344 43.386719 C 26.992188 44.230469 25.941406 44.738281 24.816406 44.738281 Z M 39.996094 46.875 C 41.648438 46.875 43.148438 46.332031 44.328125 45.414062 C 44.777344 45.054688 44.851562 44.382812 44.515625 43.914062 C 44.140625 43.460938 43.445312 43.386719 43.015625 43.707031 C 42.171875 44.382812 41.160156 44.738281 39.996094 44.738281 C 38.703125 44.738281 37.503906 44.210938 36.621094 43.386719 C 35.777344 42.5625 35.253906 41.398438 35.253906 40.125 C 35.253906 38.851562 35.777344 37.726562 36.621094 36.863281 C 37.503906 36.039062 38.703125 35.511719 39.996094 35.511719 C 41.160156 35.511719 42.191406 35.867188 43.015625 36.542969 C 43.445312 36.882812 44.140625 36.804688 44.515625 36.335938 C 44.851562 35.867188 44.777344 35.210938 44.328125 34.835938 C 43.148438 33.917969 41.648438 33.375 39.996094 33.375 C 36.246094 33.394531 33.132812 36.414062 33.117188 40.125 C 33.132812 43.855469 36.246094 46.875 39.996094 46.875 Z M 39.996094 46.875 "/>\n      </g>'},gifIcon:{extension:".gif",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.394531 46.875 C 18.988281 46.875 20.46875 46.332031 21.648438 45.414062 C 21.835938 45.28125 21.949219 45.132812 22.003906 44.960938 L 22.003906 44.945312 C 22.023438 44.90625 22.023438 44.886719 22.042969 44.851562 C 22.0625 44.738281 22.097656 44.664062 22.097656 44.53125 L 22.097656 40.386719 C 22.097656 39.789062 21.613281 39.335938 21.011719 39.335938 L 17.28125 39.335938 C 16.699219 39.335938 16.210938 39.789062 16.210938 40.386719 C 16.210938 40.96875 16.699219 41.457031 17.28125 41.457031 L 19.960938 41.457031 L 19.960938 44.023438 C 19.210938 44.457031 18.332031 44.738281 17.394531 44.738281 C 16.042969 44.738281 14.863281 44.230469 14.019531 43.367188 C 13.136719 42.523438 12.613281 41.382812 12.613281 40.144531 C 12.613281 38.867188 13.136719 37.726562 14.019531 36.882812 C 14.863281 36.019531 16.042969 35.511719 17.394531 35.511719 C 18.519531 35.511719 19.550781 35.90625 20.355469 36.523438 C 20.824219 36.898438 21.519531 36.804688 21.875 36.355469 C 22.230469 35.886719 22.15625 35.195312 21.667969 34.835938 C 20.503906 33.917969 18.988281 33.375 17.394531 33.375 C 13.585938 33.375 10.472656 36.375 10.472656 40.144531 C 10.472656 43.894531 13.585938 46.875 17.394531 46.875 Z M 26.945312 46.875 C 27.507812 46.875 27.996094 46.425781 27.996094 45.84375 L 27.996094 34.78125 C 27.996094 34.199219 27.507812 33.75 26.945312 33.75 C 26.363281 33.75 25.914062 34.199219 25.914062 34.78125 L 25.914062 45.84375 C 25.914062 46.425781 26.363281 46.875 26.945312 46.875 Z M 33.066406 46.875 C 33.648438 46.875 34.117188 46.40625 34.117188 45.84375 L 34.117188 41.34375 L 38.488281 41.34375 C 39.050781 41.34375 39.519531 40.875 39.519531 40.292969 C 39.519531 39.75 39.050781 39.261719 38.488281 39.261719 L 34.117188 39.261719 L 34.117188 35.832031 L 39.199219 35.832031 C 39.742188 35.832031 40.230469 35.363281 40.230469 34.78125 C 40.230469 34.21875 39.742188 33.75 39.199219 33.75 L 33.066406 33.75 C 32.488281 33.75 32.035156 34.21875 32.035156 34.78125 L 32.035156 45.84375 C 32.035156 46.40625 32.488281 46.875 33.066406 46.875 Z M 33.066406 46.875 "/>\n      </g>'},jpegIcon:{extension:".jpeg",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9 43.75 C 11.140625 43.75 12.890625 42.015625 12.890625 39.875 L 12.890625 33.671875 C 12.890625 33.1875 12.5 32.8125 12.03125 32.8125 C 11.546875 32.8125 11.15625 33.1875 11.15625 33.671875 L 11.15625 39.875 C 11.15625 41.046875 10.1875 42.015625 9 42.015625 C 8.046875 42.015625 7.234375 41.390625 6.953125 40.53125 C 6.8125 40.078125 6.328125 39.828125 5.859375 39.984375 C 5.421875 40.109375 5.15625 40.59375 5.3125 41.0625 C 5.8125 42.625 7.28125 43.75 9 43.75 Z M 15.640625 43.75 C 16.125 43.75 16.515625 43.359375 16.515625 42.890625 L 16.515625 39.5 L 18.4375 39.5 C 20.296875 39.5 21.796875 38 21.796875 36.171875 C 21.796875 34.3125 20.296875 32.8125 18.4375 32.8125 L 15.640625 32.8125 C 15.171875 32.8125 14.78125 33.1875 14.78125 33.671875 L 14.78125 42.890625 C 14.78125 43.359375 15.171875 43.75 15.640625 43.75 Z M 18.4375 37.765625 L 16.515625 37.765625 L 16.515625 34.546875 L 18.4375 34.546875 C 19.34375 34.546875 20.046875 35.265625 20.0625 36.171875 C 20.046875 37.046875 19.34375 37.765625 18.4375 37.765625 Z M 29.234375 43.75 C 29.6875 43.75 30.09375 43.359375 30.09375 42.890625 C 30.09375 42.40625 29.6875 42.015625 29.234375 42.015625 L 25 42.015625 L 25 39.140625 L 28.640625 39.140625 C 29.109375 39.140625 29.5 38.75 29.5 38.265625 C 29.5 37.8125 29.109375 37.40625 28.640625 37.40625 L 25 37.40625 L 25 34.546875 L 29.234375 34.546875 C 29.6875 34.546875 30.09375 34.15625 30.09375 33.671875 C 30.09375 33.1875 29.6875 32.8125 29.234375 32.8125 L 24.125 32.8125 C 23.640625 32.8125 23.265625 33.1875 23.265625 33.671875 L 23.265625 42.890625 C 23.265625 43.359375 23.640625 43.75 24.125 43.75 C 24.125 43.75 24.140625 43.734375 24.140625 43.734375 C 24.140625 43.734375 24.140625 43.75 24.171875 43.75 Z M 37.1875 43.75 C 38.515625 43.75 39.75 43.296875 40.734375 42.53125 C 40.890625 42.421875 40.984375 42.296875 41.03125 42.15625 L 41.03125 42.140625 C 41.046875 42.109375 41.046875 42.09375 41.0625 42.0625 C 41.078125 41.96875 41.109375 41.90625 41.109375 41.796875 L 41.109375 38.34375 C 41.109375 37.914062 40.8125 37.578125 40.410156 37.492188 L 40.203125 37.46875 L 37.09375 37.46875 C 36.609375 37.46875 36.203125 37.84375 36.203125 38.34375 C 36.203125 38.828125 36.609375 39.234375 37.09375 39.234375 L 39.328125 39.234375 L 39.328125 41.375 C 38.703125 41.734375 37.96875 41.96875 37.1875 41.96875 C 36.0625 41.96875 35.078125 41.546875 34.375 40.828125 C 33.640625 40.125 33.203125 39.171875 33.203125 38.140625 C 33.203125 37.078125 33.640625 36.125 34.375 35.421875 C 35.078125 34.703125 36.0625 34.28125 37.1875 34.28125 C 38.125 34.28125 38.984375 34.609375 39.65625 35.125 C 40.046875 35.4375 40.625 35.359375 40.921875 34.984375 C 41.21875 34.59375 41.15625 34.015625 40.75 33.71875 C 39.78125 32.953125 38.515625 32.5 37.1875 32.5 C 34.015625 32.5 31.421875 35 31.421875 38.140625 C 31.421875 41.265625 34.015625 43.75 37.1875 43.75 Z M 37.1875 43.75 "/>\n      </g>'},logIcon:{extension:".log",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 13.542969 46.875 C 14.085938 46.875 14.574219 46.40625 14.574219 45.84375 C 14.574219 45.261719 14.085938 44.792969 13.542969 44.792969 L 8.460938 44.792969 L 8.460938 34.78125 C 8.460938 34.21875 7.992188 33.75 7.410156 33.75 C 6.828125 33.75 6.378906 34.21875 6.378906 34.78125 L 6.378906 45.84375 C 6.378906 46.40625 6.828125 46.875 7.410156 46.875 Z M 21.742188 46.875 C 23.46875 46.875 25.117188 46.085938 26.222656 44.867188 C 27.386719 43.648438 28.117188 41.980469 28.117188 40.125 C 28.117188 38.269531 27.386719 36.617188 26.222656 35.382812 C 25.117188 34.144531 23.46875 33.375 21.742188 33.375 C 19.941406 33.375 18.292969 34.144531 17.148438 35.382812 C 15.984375 36.617188 15.292969 38.269531 15.292969 40.125 C 15.292969 41.980469 15.984375 43.648438 17.148438 44.867188 C 18.292969 46.085938 19.941406 46.875 21.742188 46.875 Z M 21.742188 44.738281 C 20.542969 44.738281 19.492188 44.230469 18.703125 43.386719 C 17.917969 42.582031 17.429688 41.398438 17.429688 40.125 C 17.429688 38.851562 17.917969 37.667969 18.703125 36.84375 C 19.492188 36 20.542969 35.511719 21.742188 35.511719 C 22.867188 35.511719 23.917969 36 24.703125 36.84375 C 25.472656 37.667969 25.980469 38.851562 25.980469 40.125 C 25.980469 41.398438 25.472656 42.582031 24.703125 43.386719 C 23.917969 44.230469 22.867188 44.738281 21.742188 44.738281 Z M 37.300781 46.875 C 38.894531 46.875 40.375 46.332031 41.558594 45.414062 C 41.746094 45.28125 41.855469 45.132812 41.914062 44.960938 L 41.914062 44.945312 L 41.949219 44.851562 C 41.96875 44.738281 42.007812 44.664062 42.007812 44.53125 L 42.007812 40.386719 C 42.007812 39.789062 41.519531 39.335938 40.917969 39.335938 L 37.1875 39.335938 C 36.605469 39.335938 36.121094 39.789062 36.121094 40.386719 C 36.121094 40.96875 36.605469 41.457031 37.1875 41.457031 L 39.871094 41.457031 L 39.871094 44.023438 C 39.121094 44.457031 38.238281 44.738281 37.300781 44.738281 C 35.949219 44.738281 34.769531 44.230469 33.925781 43.367188 C 33.042969 42.523438 32.519531 41.382812 32.519531 40.144531 C 32.519531 38.867188 33.042969 37.726562 33.925781 36.882812 C 34.769531 36.019531 35.949219 35.511719 37.300781 35.511719 C 38.425781 35.511719 39.457031 35.90625 40.261719 36.523438 C 40.730469 36.898438 41.425781 36.804688 41.78125 36.355469 C 42.136719 35.886719 42.0625 35.195312 41.574219 34.835938 C 40.414062 33.917969 38.894531 33.375 37.300781 33.375 C 33.496094 33.375 30.382812 36.375 30.382812 40.144531 C 30.382812 43.894531 33.496094 46.875 37.300781 46.875 Z M 37.300781 46.875 "/>\n      </g>'},movIcon:{extension:".mov",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 15.472656 46.875 C 16.035156 46.875 16.523438 46.40625 16.523438 45.84375 L 16.523438 34.78125 C 16.523438 34.289062 16.152344 33.882812 15.679688 33.777344 L 15.472656 33.75 L 15.453125 33.75 C 15.117188 33.75 14.816406 33.898438 14.609375 34.179688 L 10.878906 39.355469 L 7.148438 34.179688 C 6.960938 33.898438 6.625 33.75 6.324219 33.75 L 6.265625 33.75 C 5.703125 33.75 5.234375 34.21875 5.234375 34.78125 L 5.234375 45.84375 C 5.234375 46.40625 5.703125 46.875 6.265625 46.875 C 6.847656 46.875 7.316406 46.40625 7.316406 45.84375 L 7.316406 37.949219 L 10 41.699219 C 10.203125 41.980469 10.523438 42.132812 10.859375 42.132812 L 10.898438 42.132812 C 11.234375 42.132812 11.535156 41.980469 11.742188 41.699219 L 14.441406 37.949219 L 14.441406 45.84375 C 14.441406 46.40625 14.890625 46.875 15.472656 46.875 Z M 25.460938 46.875 C 27.1875 46.875 28.835938 46.085938 29.941406 44.867188 C 31.105469 43.648438 31.835938 41.980469 31.835938 40.125 C 31.835938 38.269531 31.105469 36.617188 29.941406 35.382812 C 28.835938 34.144531 27.1875 33.375 25.460938 33.375 C 23.660156 33.375 22.011719 34.144531 20.867188 35.382812 C 19.703125 36.617188 19.011719 38.269531 19.011719 40.125 C 19.011719 41.980469 19.703125 43.648438 20.867188 44.867188 C 22.011719 46.085938 23.660156 46.875 25.460938 46.875 Z M 25.460938 44.738281 C 24.261719 44.738281 23.210938 44.230469 22.421875 43.386719 C 21.636719 42.582031 21.148438 41.398438 21.148438 40.125 C 21.148438 38.851562 21.636719 37.667969 22.421875 36.84375 C 23.210938 36 24.261719 35.511719 25.460938 35.511719 C 26.585938 35.511719 27.636719 36 28.421875 36.84375 C 29.191406 37.667969 29.699219 38.851562 29.699219 40.125 C 29.699219 41.398438 29.191406 42.582031 28.421875 43.386719 C 27.636719 44.230469 26.585938 44.738281 25.460938 44.738281 Z M 38.683594 46.855469 L 38.71875 46.855469 C 38.777344 46.835938 38.8125 46.820312 38.871094 46.820312 C 38.886719 46.800781 38.886719 46.800781 38.90625 46.800781 C 38.964844 46.78125 39.019531 46.726562 39.058594 46.707031 L 39.09375 46.6875 L 39.207031 46.59375 C 39.226562 46.574219 39.226562 46.574219 39.246094 46.539062 L 39.339844 46.425781 C 39.355469 46.425781 39.355469 46.425781 39.355469 46.40625 C 39.394531 46.367188 39.414062 46.292969 39.433594 46.257812 L 44.0625 35.304688 C 44.269531 34.800781 44.027344 34.179688 43.5 33.976562 C 42.996094 33.75 42.375 33.992188 42.152344 34.519531 L 38.496094 43.199219 L 34.839844 34.519531 C 34.613281 33.992188 34.011719 33.75 33.507812 33.976562 C 32.964844 34.179688 32.71875 34.800781 32.945312 35.304688 L 37.539062 46.257812 C 37.574219 46.292969 37.613281 46.367188 37.632812 46.40625 C 37.632812 46.425781 37.652344 46.425781 37.652344 46.425781 C 37.667969 46.460938 37.707031 46.5 37.746094 46.539062 C 37.746094 46.574219 37.761719 46.574219 37.761719 46.59375 C 37.820312 46.632812 37.855469 46.648438 37.894531 46.6875 L 37.914062 46.6875 C 37.96875 46.726562 38.042969 46.78125 38.082031 46.800781 L 38.101562 46.800781 C 38.101562 46.800781 38.121094 46.800781 38.121094 46.820312 C 38.15625 46.820312 38.230469 46.835938 38.269531 46.855469 L 38.308594 46.855469 L 38.402344 46.871094 L 38.496094 46.875 C 38.550781 46.875 38.605469 46.875 38.683594 46.855469 Z M 38.683594 46.855469 "/>\n      </g>'},ogvIcon:{extension:".ogv",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 11.511719 46.875 C 13.238281 46.875 14.886719 46.085938 15.996094 44.867188 C 17.15625 43.648438 17.886719 41.980469 17.886719 40.125 C 17.886719 38.269531 17.15625 36.617188 15.996094 35.382812 C 14.886719 34.144531 13.238281 33.375 11.511719 33.375 C 9.714844 33.375 8.0625 34.144531 6.917969 35.382812 C 5.757812 36.617188 5.0625 38.269531 5.0625 40.125 C 5.0625 41.980469 5.757812 43.648438 6.917969 44.867188 C 8.0625 46.085938 9.714844 46.875 11.511719 46.875 Z M 11.511719 44.738281 C 10.3125 44.738281 9.261719 44.230469 8.476562 43.386719 C 7.6875 42.582031 7.199219 41.398438 7.199219 40.125 C 7.199219 38.851562 7.6875 37.667969 8.476562 36.84375 C 9.261719 36 10.3125 35.511719 11.511719 35.511719 C 12.636719 35.511719 13.6875 36 14.476562 36.84375 C 15.246094 37.667969 15.75 38.851562 15.75 40.125 C 15.75 41.398438 15.246094 42.582031 14.476562 43.386719 C 13.6875 44.230469 12.636719 44.738281 11.511719 44.738281 Z M 27.25 46.875 C 28.84375 46.875 30.324219 46.332031 31.507812 45.414062 C 31.695312 45.28125 31.804688 45.132812 31.863281 44.960938 L 31.863281 44.945312 C 31.882812 44.90625 31.882812 44.886719 31.898438 44.851562 C 31.917969 44.738281 31.957031 44.664062 31.957031 44.53125 L 31.957031 40.386719 C 31.957031 39.789062 31.46875 39.335938 30.867188 39.335938 L 27.136719 39.335938 C 26.554688 39.335938 26.070312 39.789062 26.070312 40.386719 C 26.070312 40.96875 26.554688 41.457031 27.136719 41.457031 L 29.820312 41.457031 L 29.820312 44.023438 C 29.070312 44.457031 28.1875 44.738281 27.25 44.738281 C 25.898438 44.738281 24.71875 44.230469 23.875 43.367188 C 22.992188 42.523438 22.46875 41.382812 22.46875 40.144531 C 22.46875 38.867188 22.992188 37.726562 23.875 36.882812 C 24.71875 36.019531 25.898438 35.511719 27.25 35.511719 C 28.375 35.511719 29.40625 35.90625 30.210938 36.523438 C 30.679688 36.898438 31.375 36.804688 31.730469 36.355469 C 32.085938 35.886719 32.011719 35.195312 31.523438 34.835938 C 30.363281 33.917969 28.84375 33.375 27.25 33.375 C 23.445312 33.375 20.332031 36.375 20.332031 40.144531 C 20.332031 43.894531 23.445312 46.875 27.25 46.875 Z M 40.191406 46.855469 L 40.230469 46.855469 C 40.285156 46.835938 40.324219 46.820312 40.378906 46.820312 C 40.398438 46.800781 40.398438 46.800781 40.417969 46.800781 C 40.472656 46.78125 40.53125 46.726562 40.566406 46.707031 C 40.605469 46.6875 40.605469 46.6875 40.605469 46.6875 L 40.71875 46.59375 C 40.738281 46.574219 40.738281 46.574219 40.753906 46.539062 L 40.847656 46.425781 C 40.867188 46.425781 40.867188 46.425781 40.867188 46.40625 C 40.90625 46.367188 40.925781 46.292969 40.941406 46.257812 L 45.574219 35.304688 C 45.78125 34.800781 45.535156 34.179688 45.011719 33.976562 C 44.503906 33.75 43.886719 33.992188 43.660156 34.519531 L 40.003906 43.199219 L 36.347656 34.519531 C 36.125 33.992188 35.523438 33.75 35.019531 33.976562 C 34.472656 34.179688 34.230469 34.800781 34.457031 35.304688 L 39.050781 46.257812 C 39.085938 46.292969 39.125 46.367188 39.144531 46.40625 C 39.144531 46.425781 39.160156 46.425781 39.160156 46.425781 C 39.179688 46.460938 39.21875 46.5 39.253906 46.539062 C 39.253906 46.574219 39.273438 46.574219 39.273438 46.59375 C 39.332031 46.632812 39.367188 46.648438 39.40625 46.6875 L 39.425781 46.6875 C 39.480469 46.726562 39.554688 46.78125 39.59375 46.800781 L 39.613281 46.800781 C 39.613281 46.800781 39.628906 46.800781 39.628906 46.820312 C 39.667969 46.820312 39.742188 46.835938 39.78125 46.855469 L 39.816406 46.855469 L 39.910156 46.871094 L 40.003906 46.875 C 40.0625 46.875 40.117188 46.875 40.191406 46.855469 Z M 40.191406 46.855469 "/>\n      </g>'},pngIcon:{extension:".png",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.523438 46.875 C 8.105469 46.875 8.574219 46.40625 8.574219 45.84375 L 8.574219 41.773438 L 10.878906 41.773438 C 13.109375 41.773438 14.910156 39.976562 14.910156 37.78125 C 14.910156 35.550781 13.109375 33.75 10.878906 33.75 L 7.523438 33.75 C 6.960938 33.75 6.492188 34.199219 6.492188 34.78125 L 6.492188 45.84375 C 6.492188 46.40625 6.960938 46.875 7.523438 46.875 Z M 10.878906 39.695312 L 8.574219 39.695312 L 8.574219 35.832031 L 10.878906 35.832031 C 11.964844 35.832031 12.808594 36.695312 12.828125 37.78125 C 12.808594 38.832031 11.964844 39.695312 10.878906 39.695312 Z M 26.75 46.875 C 27.3125 46.875 27.78125 46.40625 27.78125 45.84375 L 27.78125 34.949219 C 27.78125 34.40625 27.3125 33.9375 26.75 33.9375 C 26.1875 33.9375 25.738281 34.40625 25.738281 34.949219 L 25.738281 42.675781 L 19.679688 34.292969 C 19.363281 33.84375 18.722656 33.75 18.253906 34.070312 C 17.972656 34.273438 17.824219 34.613281 17.84375 34.929688 L 17.84375 45.84375 C 17.84375 46.40625 18.292969 46.875 18.875 46.875 C 19.417969 46.875 19.886719 46.40625 19.886719 45.84375 L 19.886719 38.0625 L 25.886719 46.386719 C 25.90625 46.425781 25.941406 46.460938 25.980469 46.5 C 26.167969 46.726562 26.449219 46.875 26.75 46.875 Z M 38.082031 46.875 C 39.675781 46.875 41.15625 46.332031 42.339844 45.414062 C 42.527344 45.28125 42.636719 45.132812 42.695312 44.960938 L 42.695312 44.945312 C 42.714844 44.90625 42.714844 44.886719 42.730469 44.851562 C 42.75 44.738281 42.789062 44.664062 42.789062 44.53125 L 42.789062 40.386719 C 42.789062 39.789062 42.300781 39.335938 41.699219 39.335938 L 37.96875 39.335938 C 37.386719 39.335938 36.902344 39.789062 36.902344 40.386719 C 36.902344 40.96875 37.386719 41.457031 37.96875 41.457031 L 40.652344 41.457031 L 40.652344 44.023438 C 39.902344 44.457031 39.019531 44.738281 38.082031 44.738281 C 36.730469 44.738281 35.550781 44.230469 34.707031 43.367188 C 33.824219 42.523438 33.300781 41.382812 33.300781 40.144531 C 33.300781 38.867188 33.824219 37.726562 34.707031 36.882812 C 35.550781 36.019531 36.730469 35.511719 38.082031 35.511719 C 39.207031 35.511719 40.238281 35.90625 41.042969 36.523438 C 41.511719 36.898438 42.207031 36.804688 42.5625 36.355469 C 42.917969 35.886719 42.84375 35.195312 42.355469 34.835938 C 41.195312 33.917969 39.675781 33.375 38.082031 33.375 C 34.277344 33.375 31.164062 36.375 31.164062 40.144531 C 31.164062 43.894531 34.277344 46.875 38.082031 46.875 Z M 38.082031 46.875 "/>\n      </g>'},txtIcon:{extension:".txt",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 12.847656 46.875 C 13.429688 46.875 13.878906 46.425781 13.878906 45.84375 L 13.878906 35.832031 L 16.859375 35.832031 C 17.421875 35.832031 17.890625 35.34375 17.890625 34.78125 C 17.890625 34.199219 17.421875 33.75 16.859375 33.75 L 8.855469 33.75 C 8.273438 33.75 7.824219 34.199219 7.824219 34.78125 C 7.824219 35.34375 8.273438 35.832031 8.855469 35.832031 L 11.816406 35.832031 L 11.816406 45.84375 C 11.816406 46.425781 12.285156 46.875 12.847656 46.875 Z M 29.019531 46.875 C 29.222656 46.875 29.429688 46.800781 29.617188 46.667969 C 30.085938 46.351562 30.160156 45.695312 29.84375 45.242188 L 26.28125 40.367188 L 29.84375 35.53125 C 30.160156 35.0625 30.085938 34.425781 29.617188 34.105469 C 29.148438 33.75 28.53125 33.84375 28.175781 34.332031 L 25.023438 38.644531 L 21.855469 34.332031 C 21.535156 33.84375 20.878906 33.75 20.429688 34.105469 C 19.960938 34.425781 19.867188 35.0625 20.1875 35.53125 L 23.75 40.367188 L 20.1875 45.242188 C 19.867188 45.695312 19.960938 46.351562 20.429688 46.667969 C 20.597656 46.800781 20.804688 46.875 21.03125 46.875 C 21.347656 46.875 21.648438 46.707031 21.855469 46.445312 L 25.023438 42.113281 L 28.175781 46.445312 C 28.378906 46.707031 28.679688 46.875 29.019531 46.875 Z M 37.464844 46.875 C 38.042969 46.875 38.496094 46.425781 38.496094 45.84375 L 38.496094 35.832031 L 41.476562 35.832031 C 42.039062 35.832031 42.507812 35.34375 42.507812 34.78125 C 42.507812 34.199219 42.039062 33.75 41.476562 33.75 L 33.46875 33.75 C 32.886719 33.75 32.4375 34.199219 32.4375 34.78125 C 32.4375 35.34375 32.886719 35.832031 33.46875 35.832031 L 36.433594 35.832031 L 36.433594 45.84375 C 36.433594 46.425781 36.902344 46.875 37.464844 46.875 Z M 37.464844 46.875 "/>\n      </g>'},webmIcon:{extension:".webm",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.195312 43.734375 L 7.242188 43.734375 C 7.273438 43.71875 7.304688 43.703125 7.367188 43.703125 C 7.367188 43.6875 7.382812 43.6875 7.382812 43.6875 L 7.398438 43.6875 C 7.429688 43.671875 7.476562 43.625 7.523438 43.59375 L 7.554688 43.59375 C 7.585938 43.5625 7.617188 43.53125 7.648438 43.515625 C 7.648438 43.5 7.664062 43.5 7.664062 43.46875 L 7.757812 43.375 C 7.757812 43.375 7.757812 43.359375 7.773438 43.359375 C 7.789062 43.328125 7.820312 43.265625 7.835938 43.21875 L 9.882812 38.375 L 11.929688 43.21875 C 11.945312 43.265625 11.960938 43.328125 11.992188 43.359375 C 11.992188 43.359375 11.992188 43.375 12.023438 43.375 L 12.085938 43.46875 C 12.101562 43.5 12.101562 43.5 12.117188 43.515625 C 12.148438 43.53125 12.179688 43.5625 12.226562 43.59375 L 12.242188 43.59375 C 12.273438 43.625 12.320312 43.671875 12.382812 43.6875 C 12.398438 43.6875 12.398438 43.6875 12.414062 43.703125 C 12.445312 43.703125 12.476562 43.71875 12.523438 43.734375 L 12.570312 43.734375 L 12.640625 43.746094 L 12.710938 43.75 C 12.773438 43.75 12.820312 43.75 12.867188 43.734375 L 12.898438 43.734375 C 12.945312 43.71875 12.992188 43.703125 13.023438 43.703125 C 13.023438 43.6875 13.039062 43.6875 13.039062 43.6875 L 13.054688 43.6875 C 13.117188 43.671875 13.148438 43.625 13.195312 43.59375 L 13.210938 43.59375 C 13.242188 43.5625 13.289062 43.53125 13.320312 43.515625 C 13.320312 43.5 13.335938 43.5 13.335938 43.46875 C 13.367188 43.4375 13.398438 43.40625 13.414062 43.375 C 13.414062 43.375 13.429688 43.359375 13.429688 43.359375 C 13.460938 43.328125 13.492188 43.265625 13.507812 43.21875 L 17.335938 34.109375 C 17.523438 33.6875 17.320312 33.171875 16.898438 33 C 16.445312 32.8125 15.945312 33.015625 15.757812 33.453125 L 12.710938 40.6875 L 10.695312 35.890625 C 10.539062 35.546875 10.210938 35.359375 9.882812 35.359375 C 9.539062 35.359375 9.210938 35.546875 9.070312 35.890625 L 7.054688 40.6875 L 3.992188 33.453125 C 3.820312 33.015625 3.304688 32.8125 2.882812 33 C 2.429688 33.171875 2.242188 33.6875 2.414062 34.109375 L 6.257812 43.21875 C 6.289062 43.265625 6.304688 43.328125 6.335938 43.359375 L 6.335938 43.375 C 6.367188 43.40625 6.382812 43.4375 6.414062 43.46875 C 6.429688 43.5 6.429688 43.5 6.445312 43.515625 C 6.492188 43.53125 6.507812 43.5625 6.554688 43.59375 L 6.570312 43.59375 C 6.601562 43.625 6.664062 43.671875 6.710938 43.6875 C 6.726562 43.6875 6.726562 43.6875 6.742188 43.703125 C 6.773438 43.703125 6.804688 43.71875 6.851562 43.734375 L 6.898438 43.734375 L 6.976562 43.746094 L 7.054688 43.75 C 7.101562 43.75 7.148438 43.75 7.195312 43.734375 Z M 25.179688 43.75 C 25.632812 43.75 26.039062 43.359375 26.039062 42.890625 C 26.039062 42.40625 25.632812 42.015625 25.179688 42.015625 L 20.945312 42.015625 L 20.945312 39.140625 L 24.585938 39.140625 C 25.054688 39.140625 25.445312 38.75 25.445312 38.265625 C 25.445312 37.8125 25.054688 37.40625 24.585938 37.40625 L 20.945312 37.40625 L 20.945312 34.546875 L 25.179688 34.546875 C 25.632812 34.546875 26.039062 34.15625 26.039062 33.671875 C 26.039062 33.1875 25.632812 32.8125 25.179688 32.8125 L 20.070312 32.8125 C 19.585938 32.8125 19.210938 33.1875 19.210938 33.671875 L 19.210938 42.890625 C 19.210938 43.359375 19.585938 43.75 20.070312 43.75 C 20.070312 43.75 20.085938 43.734375 20.085938 43.734375 C 20.085938 43.734375 20.085938 43.75 20.117188 43.75 Z M 31.539062 43.75 C 33.382812 43.75 34.882812 42.25 34.882812 40.390625 C 34.882812 39.203125 34.242188 38.15625 33.304688 37.5625 C 33.679688 37.0625 33.898438 36.453125 33.898438 35.78125 C 33.898438 34.140625 32.570312 32.8125 30.929688 32.8125 L 28.710938 32.8125 C 28.242188 32.8125 27.851562 33.1875 27.851562 33.671875 L 27.851562 42.890625 C 27.851562 43.359375 28.242188 43.75 28.710938 43.75 L 28.757812 43.734375 C 28.757812 43.734375 28.757812 43.75 28.773438 43.75 Z M 30.929688 37.046875 L 29.585938 37.046875 L 29.585938 34.546875 L 30.929688 34.546875 C 31.617188 34.546875 32.164062 35.09375 32.164062 35.78125 C 32.164062 36.46875 31.617188 37.046875 30.929688 37.046875 Z M 31.539062 42.015625 L 29.585938 42.015625 L 29.585938 38.78125 L 31.539062 38.78125 C 32.429688 38.796875 33.148438 39.5 33.148438 40.390625 C 33.148438 41.296875 32.429688 42 31.539062 42.015625 Z M 45.664062 43.75 C 46.132812 43.75 46.539062 43.359375 46.539062 42.890625 L 46.539062 33.671875 C 46.539062 33.269531 46.242188 32.9375 45.859375 32.839844 L 45.664062 32.8125 L 45.648438 32.8125 C 45.367188 32.8125 45.117188 32.9375 44.945312 33.171875 L 41.835938 37.484375 L 38.726562 33.171875 C 38.570312 32.9375 38.289062 32.8125 38.039062 32.8125 L 37.992188 32.8125 C 37.523438 32.8125 37.132812 33.203125 37.132812 33.671875 L 37.132812 42.890625 C 37.132812 43.359375 37.523438 43.75 37.992188 43.75 C 38.476562 43.75 38.867188 43.359375 38.867188 42.890625 L 38.867188 36.3125 L 41.101562 39.4375 C 41.273438 39.671875 41.539062 39.796875 41.820312 39.796875 L 41.851562 39.796875 C 42.132812 39.796875 42.382812 39.671875 42.554688 39.4375 L 44.804688 36.3125 L 44.804688 42.890625 C 44.804688 43.359375 45.179688 43.75 45.664062 43.75 Z M 45.664062 43.75 "/>\n      </g>'},webpIcon:{extension:".webp",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 9.234375 43.734375 L 9.28125 43.734375 C 9.3125 43.71875 9.34375 43.703125 9.40625 43.703125 L 9.414062 43.6875 C 9.421875 43.6875 9.421875 43.6875 9.4375 43.6875 C 9.46875 43.671875 9.515625 43.625 9.5625 43.59375 L 9.59375 43.59375 C 9.625 43.5625 9.65625 43.53125 9.6875 43.515625 C 9.6875 43.5 9.703125 43.5 9.703125 43.46875 L 9.796875 43.375 C 9.796875 43.375 9.796875 43.359375 9.8125 43.359375 C 9.828125 43.328125 9.859375 43.265625 9.875 43.21875 L 11.921875 38.375 L 13.96875 43.21875 C 13.984375 43.265625 14 43.328125 14.03125 43.359375 C 14.03125 43.359375 14.03125 43.375 14.0625 43.375 L 14.125 43.46875 C 14.140625 43.5 14.140625 43.5 14.15625 43.515625 L 14.203125 43.546875 L 14.265625 43.59375 C 14.265625 43.59375 14.265625 43.59375 14.28125 43.59375 C 14.3125 43.625 14.359375 43.671875 14.421875 43.6875 C 14.4375 43.6875 14.4375 43.6875 14.453125 43.703125 C 14.484375 43.703125 14.515625 43.71875 14.5625 43.734375 L 14.609375 43.734375 L 14.679688 43.746094 L 14.75 43.75 C 14.8125 43.75 14.859375 43.75 14.90625 43.734375 L 14.9375 43.734375 C 14.984375 43.71875 15.03125 43.703125 15.0625 43.703125 C 15.0625 43.6875 15.078125 43.6875 15.078125 43.6875 L 15.09375 43.6875 C 15.15625 43.671875 15.1875 43.625 15.234375 43.59375 L 15.25 43.59375 C 15.28125 43.5625 15.328125 43.53125 15.359375 43.515625 C 15.359375 43.5 15.375 43.5 15.375 43.46875 C 15.40625 43.4375 15.4375 43.40625 15.453125 43.375 L 15.46875 43.359375 C 15.5 43.328125 15.53125 43.265625 15.546875 43.21875 L 19.375 34.109375 C 19.5625 33.6875 19.359375 33.171875 18.9375 33 C 18.484375 32.8125 17.984375 33.015625 17.796875 33.453125 L 14.75 40.6875 L 12.734375 35.890625 C 12.578125 35.546875 12.25 35.359375 11.921875 35.359375 C 11.578125 35.359375 11.25 35.546875 11.109375 35.890625 L 9.09375 40.6875 L 6.03125 33.453125 C 5.859375 33.015625 5.34375 32.8125 4.921875 33 C 4.46875 33.171875 4.28125 33.6875 4.453125 34.109375 L 8.296875 43.21875 C 8.328125 43.265625 8.34375 43.328125 8.375 43.359375 L 8.375 43.375 C 8.40625 43.40625 8.421875 43.4375 8.453125 43.46875 C 8.46875 43.5 8.46875 43.5 8.484375 43.515625 L 8.539062 43.546875 L 8.59375 43.59375 C 8.59375 43.59375 8.59375 43.59375 8.609375 43.59375 C 8.640625 43.625 8.703125 43.671875 8.75 43.6875 C 8.765625 43.6875 8.765625 43.6875 8.78125 43.703125 C 8.8125 43.703125 8.84375 43.71875 8.890625 43.734375 L 8.9375 43.734375 L 9.015625 43.746094 L 9.09375 43.75 C 9.140625 43.75 9.1875 43.75 9.234375 43.734375 Z M 27.21875 43.75 C 27.671875 43.75 28.078125 43.359375 28.078125 42.890625 C 28.078125 42.40625 27.671875 42.015625 27.21875 42.015625 L 22.984375 42.015625 L 22.984375 39.140625 L 26.625 39.140625 C 27.09375 39.140625 27.484375 38.75 27.484375 38.265625 C 27.484375 37.8125 27.09375 37.40625 26.625 37.40625 L 22.984375 37.40625 L 22.984375 34.546875 L 27.21875 34.546875 C 27.671875 34.546875 28.078125 34.15625 28.078125 33.671875 C 28.078125 33.1875 27.671875 32.8125 27.21875 32.8125 L 22.109375 32.8125 C 21.625 32.8125 21.25 33.1875 21.25 33.671875 L 21.25 42.890625 C 21.25 43.359375 21.625 43.75 22.109375 43.75 L 22.125 43.734375 C 22.125 43.734375 22.125 43.75 22.15625 43.75 Z M 33.578125 43.75 C 35.421875 43.75 36.921875 42.25 36.921875 40.390625 C 36.921875 39.203125 36.28125 38.15625 35.34375 37.5625 C 35.71875 37.0625 35.9375 36.453125 35.9375 35.78125 C 35.9375 34.140625 34.609375 32.8125 32.96875 32.8125 L 30.75 32.8125 C 30.28125 32.8125 29.890625 33.1875 29.890625 33.671875 L 29.890625 42.890625 C 29.890625 43.359375 30.28125 43.75 30.75 43.75 C 30.765625 43.75 30.765625 43.734375 30.796875 43.734375 C 30.796875 43.734375 30.796875 43.75 30.8125 43.75 Z M 32.96875 37.046875 L 31.625 37.046875 L 31.625 34.546875 L 32.96875 34.546875 C 33.65625 34.546875 34.203125 35.09375 34.203125 35.78125 C 34.203125 36.46875 33.65625 37.046875 32.96875 37.046875 Z M 33.578125 42.015625 L 31.625 42.015625 L 31.625 38.78125 L 33.578125 38.78125 C 34.46875 38.796875 35.1875 39.5 35.1875 40.390625 C 35.1875 41.296875 34.46875 42 33.578125 42.015625 Z M 40.03125 43.75 C 40.515625 43.75 40.90625 43.359375 40.90625 42.890625 L 40.90625 39.5 L 42.828125 39.5 C 44.6875 39.5 46.1875 38 46.1875 36.171875 C 46.1875 34.3125 44.6875 32.8125 42.828125 32.8125 L 40.03125 32.8125 C 39.5625 32.8125 39.171875 33.1875 39.171875 33.671875 L 39.171875 42.890625 C 39.171875 43.359375 39.5625 43.75 40.03125 43.75 Z M 42.828125 37.765625 L 40.90625 37.765625 L 40.90625 34.546875 L 42.828125 34.546875 C 43.734375 34.546875 44.4375 35.265625 44.453125 36.171875 C 44.4375 37.046875 43.734375 37.765625 42.828125 37.765625 Z M 42.828125 37.765625 "/>\n      </g>'},wmvIcon:{extension:".wmv",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.484375 43.734375 L 8.53125 43.734375 C 8.5625 43.71875 8.59375 43.703125 8.65625 43.703125 L 8.664062 43.6875 C 8.671875 43.6875 8.671875 43.6875 8.6875 43.6875 C 8.71875 43.671875 8.765625 43.625 8.8125 43.59375 L 8.84375 43.59375 C 8.875 43.5625 8.90625 43.53125 8.9375 43.515625 C 8.9375 43.5 8.953125 43.5 8.953125 43.46875 L 9.046875 43.375 C 9.046875 43.375 9.046875 43.359375 9.0625 43.359375 C 9.078125 43.328125 9.109375 43.265625 9.125 43.21875 L 11.171875 38.375 L 13.21875 43.21875 C 13.234375 43.265625 13.25 43.328125 13.28125 43.359375 C 13.28125 43.359375 13.28125 43.375 13.3125 43.375 L 13.375 43.46875 C 13.390625 43.5 13.390625 43.5 13.40625 43.515625 L 13.453125 43.546875 L 13.515625 43.59375 C 13.515625 43.59375 13.515625 43.59375 13.53125 43.59375 C 13.5625 43.625 13.609375 43.671875 13.671875 43.6875 C 13.6875 43.6875 13.6875 43.6875 13.703125 43.703125 C 13.734375 43.703125 13.765625 43.71875 13.8125 43.734375 L 13.859375 43.734375 L 13.929688 43.746094 L 14 43.75 C 14.0625 43.75 14.109375 43.75 14.15625 43.734375 L 14.1875 43.734375 C 14.234375 43.71875 14.28125 43.703125 14.3125 43.703125 C 14.3125 43.6875 14.328125 43.6875 14.328125 43.6875 L 14.34375 43.6875 C 14.40625 43.671875 14.4375 43.625 14.484375 43.59375 L 14.5 43.59375 C 14.53125 43.5625 14.578125 43.53125 14.609375 43.515625 C 14.609375 43.5 14.625 43.5 14.625 43.46875 C 14.65625 43.4375 14.6875 43.40625 14.703125 43.375 L 14.71875 43.359375 C 14.75 43.328125 14.78125 43.265625 14.796875 43.21875 L 18.625 34.109375 C 18.8125 33.6875 18.609375 33.171875 18.1875 33 C 17.734375 32.8125 17.234375 33.015625 17.046875 33.453125 L 14 40.6875 L 11.984375 35.890625 C 11.828125 35.546875 11.5 35.359375 11.171875 35.359375 C 10.828125 35.359375 10.5 35.546875 10.359375 35.890625 L 8.34375 40.6875 L 5.28125 33.453125 C 5.109375 33.015625 4.59375 32.8125 4.171875 33 C 3.71875 33.171875 3.53125 33.6875 3.703125 34.109375 L 7.546875 43.21875 C 7.578125 43.265625 7.59375 43.328125 7.625 43.359375 L 7.625 43.375 C 7.65625 43.40625 7.671875 43.4375 7.703125 43.46875 C 7.71875 43.5 7.71875 43.5 7.734375 43.515625 L 7.789062 43.546875 L 7.84375 43.59375 C 7.84375 43.59375 7.84375 43.59375 7.859375 43.59375 C 7.890625 43.625 7.953125 43.671875 8 43.6875 C 8.015625 43.6875 8.015625 43.6875 8.03125 43.703125 C 8.0625 43.703125 8.09375 43.71875 8.140625 43.734375 L 8.1875 43.734375 L 8.265625 43.746094 L 8.34375 43.75 C 8.390625 43.75 8.4375 43.75 8.484375 43.734375 Z M 29.03125 43.75 C 29.5 43.75 29.90625 43.359375 29.90625 42.890625 L 29.90625 33.671875 C 29.90625 33.269531 29.609375 32.9375 29.226562 32.839844 L 29.03125 32.8125 L 29.015625 32.8125 C 28.734375 32.8125 28.484375 32.9375 28.3125 33.171875 L 25.203125 37.484375 L 22.09375 33.171875 C 21.9375 32.9375 21.65625 32.8125 21.40625 32.8125 L 21.359375 32.8125 C 20.890625 32.8125 20.5 33.203125 20.5 33.671875 L 20.5 42.890625 C 20.5 43.359375 20.890625 43.75 21.359375 43.75 C 21.84375 43.75 22.234375 43.359375 22.234375 42.890625 L 22.234375 36.3125 L 24.46875 39.4375 C 24.640625 39.671875 24.90625 39.796875 25.1875 39.796875 L 25.21875 39.796875 C 25.5 39.796875 25.75 39.671875 25.921875 39.4375 L 28.171875 36.3125 L 28.171875 42.890625 C 28.171875 43.359375 28.546875 43.75 29.03125 43.75 Z M 37.015625 43.734375 L 37.0625 43.734375 C 37.09375 43.71875 37.125 43.703125 37.1875 43.703125 L 37.195312 43.6875 C 37.203125 43.6875 37.203125 43.6875 37.21875 43.6875 C 37.25 43.671875 37.296875 43.625 37.34375 43.59375 L 37.375 43.59375 C 37.40625 43.5625 37.4375 43.53125 37.46875 43.515625 C 37.46875 43.5 37.484375 43.5 37.484375 43.46875 L 37.578125 43.375 C 37.578125 43.375 37.578125 43.359375 37.59375 43.359375 C 37.609375 43.328125 37.640625 43.265625 37.65625 43.21875 L 39.703125 38.375 L 41.75 43.21875 C 41.765625 43.265625 41.78125 43.328125 41.8125 43.359375 C 41.8125 43.359375 41.8125 43.375 41.84375 43.375 L 41.90625 43.46875 C 41.921875 43.5 41.921875 43.5 41.9375 43.515625 L 41.984375 43.546875 L 42.046875 43.59375 C 42.046875 43.59375 42.046875 43.59375 42.0625 43.59375 C 42.09375 43.625 42.140625 43.671875 42.203125 43.6875 C 42.21875 43.6875 42.21875 43.6875 42.234375 43.703125 C 42.265625 43.703125 42.296875 43.71875 42.34375 43.734375 L 42.390625 43.734375 L 42.460938 43.746094 L 42.53125 43.75 C 42.59375 43.75 42.640625 43.75 42.6875 43.734375 L 42.71875 43.734375 C 42.765625 43.71875 42.8125 43.703125 42.84375 43.703125 C 42.84375 43.6875 42.859375 43.6875 42.859375 43.6875 L 42.875 43.6875 C 42.9375 43.671875 42.96875 43.625 43.015625 43.59375 L 43.03125 43.59375 C 43.0625 43.5625 43.109375 43.53125 43.140625 43.515625 C 43.140625 43.5 43.15625 43.5 43.15625 43.46875 C 43.1875 43.4375 43.21875 43.40625 43.234375 43.375 L 43.25 43.359375 C 43.28125 43.328125 43.3125 43.265625 43.328125 43.21875 L 47.15625 34.109375 C 47.34375 33.6875 47.140625 33.171875 46.71875 33 C 46.265625 32.8125 45.765625 33.015625 45.578125 33.453125 L 42.53125 40.6875 L 40.515625 35.890625 C 40.359375 35.546875 40.03125 35.359375 39.703125 35.359375 C 39.359375 35.359375 39.03125 35.546875 38.890625 35.890625 L 36.875 40.6875 L 33.8125 33.453125 C 33.640625 33.015625 33.125 32.8125 32.703125 33 C 32.25 33.171875 32.0625 33.6875 32.234375 34.109375 L 36.078125 43.21875 C 36.109375 43.265625 36.125 43.328125 36.15625 43.359375 L 36.15625 43.375 C 36.1875 43.40625 36.203125 43.4375 36.234375 43.46875 C 36.25 43.5 36.25 43.5 36.265625 43.515625 L 36.320312 43.546875 L 36.375 43.59375 C 36.375 43.59375 36.375 43.59375 36.390625 43.59375 C 36.421875 43.625 36.484375 43.671875 36.53125 43.6875 C 36.546875 43.6875 36.546875 43.6875 36.5625 43.703125 C 36.59375 43.703125 36.625 43.71875 36.671875 43.734375 L 36.71875 43.734375 L 36.796875 43.746094 L 36.875 43.75 C 36.921875 43.75 36.96875 43.75 37.015625 43.734375 Z M 37.015625 43.734375 "/>\n      </g>'},xlsIcon:{extension:".xls",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 17.21875 46.875 C 17.425781 46.875 17.632812 46.800781 17.820312 46.667969 C 18.289062 46.351562 18.363281 45.695312 18.042969 45.242188 L 14.480469 40.367188 L 18.042969 35.53125 C 18.363281 35.0625 18.289062 34.425781 17.820312 34.105469 C 17.351562 33.75 16.730469 33.84375 16.375 34.332031 L 13.226562 38.644531 L 10.054688 34.332031 C 9.738281 33.84375 9.082031 33.75 8.632812 34.105469 C 8.164062 34.425781 8.070312 35.0625 8.386719 35.53125 L 11.949219 40.367188 L 8.386719 45.242188 C 8.070312 45.695312 8.164062 46.351562 8.632812 46.667969 C 8.800781 46.800781 9.007812 46.875 9.230469 46.875 C 9.550781 46.875 9.851562 46.707031 10.054688 46.445312 L 13.226562 42.113281 L 16.375 46.445312 C 16.582031 46.707031 16.882812 46.875 17.21875 46.875 Z M 29.351562 46.875 C 29.894531 46.875 30.382812 46.40625 30.382812 45.84375 C 30.382812 45.261719 29.894531 44.792969 29.351562 44.792969 L 24.269531 44.792969 L 24.269531 34.78125 C 24.269531 34.21875 23.800781 33.75 23.21875 33.75 C 22.636719 33.75 22.1875 34.21875 22.1875 34.78125 L 22.1875 45.84375 C 22.1875 46.335938 22.53125 46.757812 23.007812 46.855469 L 23.222656 46.875 Z M 37.28125 46.855469 C 38.613281 46.855469 39.832031 46.460938 40.75 45.789062 C 41.6875 45.113281 42.363281 44.082031 42.363281 42.882812 C 42.363281 42.300781 42.195312 41.738281 41.914062 41.289062 C 41.480469 40.59375 40.804688 40.105469 40.039062 39.730469 C 39.289062 39.375 38.40625 39.132812 37.449219 38.945312 L 37.414062 38.945312 C 36.398438 38.757812 35.554688 38.457031 35.070312 38.117188 C 34.824219 37.949219 34.65625 37.78125 34.5625 37.632812 C 34.46875 37.480469 34.429688 37.332031 34.429688 37.105469 C 34.429688 36.710938 34.636719 36.300781 35.144531 35.925781 C 35.648438 35.550781 36.398438 35.289062 37.242188 35.289062 C 38.386719 35.289062 39.304688 35.851562 40.261719 36.488281 C 40.710938 36.789062 41.3125 36.65625 41.59375 36.207031 C 41.894531 35.773438 41.761719 35.175781 41.332031 34.875 C 40.375 34.257812 39.042969 33.375 37.242188 33.375 C 36.023438 33.375 34.882812 33.730469 34 34.367188 C 33.136719 35.007812 32.5 35.980469 32.5 37.105469 C 32.5 37.667969 32.648438 38.195312 32.929688 38.644531 C 33.34375 39.300781 33.960938 39.769531 34.675781 40.105469 C 35.386719 40.445312 36.210938 40.667969 37.09375 40.835938 L 37.132812 40.835938 C 38.238281 41.042969 39.15625 41.363281 39.699219 41.71875 C 39.980469 41.90625 40.148438 42.09375 40.261719 42.28125 C 40.375 42.46875 40.429688 42.636719 40.429688 42.882812 C 40.429688 43.351562 40.1875 43.820312 39.625 44.230469 C 39.0625 44.644531 38.21875 44.925781 37.28125 44.925781 C 35.949219 44.945312 34.523438 44.15625 33.699219 43.480469 C 33.289062 43.144531 32.667969 43.199219 32.332031 43.613281 C 32.011719 44.023438 32.070312 44.644531 32.480469 44.980469 C 33.550781 45.824219 35.257812 46.835938 37.28125 46.855469 Z M 37.28125 46.855469 "/>\n      </g>'},xlsxIcon:{extension:".xlsx",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 13.070312 43.75 C 13.242188 43.75 13.414062 43.6875 13.570312 43.578125 C 13.960938 43.3125 14.023438 42.765625 13.757812 42.390625 L 10.789062 38.328125 L 13.757812 34.296875 C 14.023438 33.90625 13.960938 33.375 13.570312 33.109375 C 13.179688 32.8125 12.664062 32.890625 12.367188 33.296875 L 9.742188 36.890625 L 7.101562 33.296875 C 6.835938 32.890625 6.289062 32.8125 5.914062 33.109375 C 5.523438 33.375 5.445312 33.90625 5.710938 34.296875 L 8.679688 38.328125 L 5.710938 42.390625 C 5.445312 42.765625 5.523438 43.3125 5.914062 43.578125 C 6.054688 43.6875 6.226562 43.75 6.414062 43.75 C 6.679688 43.75 6.929688 43.609375 7.101562 43.390625 L 9.742188 39.78125 L 12.367188 43.390625 C 12.539062 43.609375 12.789062 43.75 13.070312 43.75 Z M 23.179688 43.75 C 23.632812 43.75 24.039062 43.359375 24.039062 42.890625 C 24.039062 42.40625 23.632812 42.015625 23.179688 42.015625 L 18.945312 42.015625 L 18.945312 33.671875 C 18.945312 33.203125 18.554688 32.8125 18.070312 32.8125 C 17.585938 32.8125 17.210938 33.203125 17.210938 33.671875 L 17.210938 42.890625 C 17.210938 43.359375 17.585938 43.75 18.070312 43.75 Z M 29.789062 43.734375 C 30.898438 43.734375 31.914062 43.40625 32.679688 42.84375 C 33.460938 42.28125 34.023438 41.421875 34.023438 40.421875 C 34.023438 39.9375 33.882812 39.46875 33.648438 39.09375 C 33.289062 38.515625 32.726562 38.109375 32.085938 37.796875 C 31.460938 37.5 30.726562 37.296875 29.929688 37.140625 L 29.898438 37.140625 C 29.054688 36.984375 28.351562 36.734375 27.945312 36.453125 C 27.742188 36.3125 27.601562 36.171875 27.523438 36.046875 C 27.445312 35.921875 27.414062 35.796875 27.414062 35.609375 C 27.414062 35.28125 27.585938 34.9375 28.007812 34.625 C 28.429688 34.3125 29.054688 34.09375 29.757812 34.09375 C 30.710938 34.09375 31.476562 34.5625 32.273438 35.09375 C 32.648438 35.34375 33.148438 35.234375 33.382812 34.859375 C 33.632812 34.5 33.523438 34 33.164062 33.75 C 32.367188 33.234375 31.257812 32.5 29.757812 32.5 C 28.742188 32.5 27.789062 32.796875 27.054688 33.328125 C 26.335938 33.859375 25.804688 34.671875 25.804688 35.609375 C 25.804688 36.078125 25.929688 36.515625 26.164062 36.890625 C 26.507812 37.4375 27.023438 37.828125 27.617188 38.109375 C 28.210938 38.390625 28.898438 38.578125 29.632812 38.71875 L 29.664062 38.71875 C 30.585938 38.890625 31.351562 39.15625 31.804688 39.453125 C 32.039062 39.609375 32.179688 39.765625 32.273438 39.921875 C 32.367188 40.078125 32.414062 40.21875 32.414062 40.421875 C 32.414062 40.8125 32.210938 41.203125 31.742188 41.546875 C 31.273438 41.890625 30.570312 42.125 29.789062 42.125 C 28.679688 42.140625 27.492188 41.484375 26.804688 40.921875 C 26.460938 40.640625 25.945312 40.6875 25.664062 41.03125 C 25.398438 41.375 25.445312 41.890625 25.789062 42.171875 C 26.679688 42.875 28.101562 43.71875 29.789062 43.734375 Z M 43.179688 43.75 C 43.351562 43.75 43.523438 43.6875 43.679688 43.578125 C 44.070312 43.3125 44.132812 42.765625 43.867188 42.390625 L 40.898438 38.328125 L 43.867188 34.296875 C 44.132812 33.90625 44.070312 33.375 43.679688 33.109375 C 43.289062 32.8125 42.773438 32.890625 42.476562 33.296875 L 39.851562 36.890625 L 37.210938 33.296875 C 36.945312 32.890625 36.398438 32.8125 36.023438 33.109375 C 35.632812 33.375 35.554688 33.90625 35.820312 34.296875 L 38.789062 38.328125 L 35.820312 42.390625 C 35.554688 42.765625 35.632812 43.3125 36.023438 43.578125 C 36.164062 43.6875 36.335938 43.75 36.523438 43.75 C 36.789062 43.75 37.039062 43.609375 37.210938 43.390625 L 39.851562 39.78125 L 42.476562 43.390625 C 42.648438 43.609375 42.898438 43.75 43.179688 43.75 Z M 43.179688 43.75 "/>\n      </g>'},zipIcon:{extension:".zip",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 20.175781 46.875 C 20.855469 46.875 21.402344 46.351562 21.402344 45.671875 C 21.402344 44.992188 20.855469 44.445312 20.175781 44.445312 L 13.132812 44.445312 L 21.183594 33.488281 L 21.183594 33.445312 C 21.203125 33.421875 21.226562 33.378906 21.25 33.335938 C 21.269531 33.3125 21.269531 33.289062 21.292969 33.269531 C 21.3125 33.203125 21.3125 33.179688 21.335938 33.136719 C 21.335938 33.09375 21.378906 33.070312 21.378906 33.007812 C 21.378906 32.984375 21.378906 32.960938 21.402344 32.917969 L 21.402344 32.679688 C 21.402344 32.632812 21.402344 32.613281 21.378906 32.546875 C 21.378906 32.503906 21.378906 32.480469 21.335938 32.4375 C 21.335938 32.414062 21.3125 32.371094 21.3125 32.304688 C 21.292969 32.285156 21.269531 32.242188 21.269531 32.21875 C 21.25 32.195312 21.226562 32.152344 21.203125 32.109375 C 21.183594 32.066406 21.160156 32.042969 21.117188 32.023438 C 21.09375 32 21.074219 31.957031 21.050781 31.933594 C 21.03125 31.914062 21.007812 31.867188 20.964844 31.847656 C 20.941406 31.824219 20.941406 31.804688 20.898438 31.78125 L 20.875 31.78125 C 20.832031 31.757812 20.8125 31.738281 20.765625 31.714844 C 20.746094 31.695312 20.722656 31.648438 20.65625 31.648438 L 20.570312 31.605469 L 20.4375 31.585938 C 20.417969 31.585938 20.375 31.5625 20.351562 31.5625 L 10.75 31.5625 C 10.070312 31.5625 9.546875 32.085938 9.546875 32.765625 C 9.546875 33.421875 10.070312 33.992188 10.75 33.992188 L 17.8125 33.992188 L 9.785156 44.972656 L 9.765625 44.972656 C 9.742188 45.015625 9.71875 45.058594 9.699219 45.082031 C 9.699219 45.101562 9.675781 45.148438 9.632812 45.167969 C 9.632812 45.210938 9.609375 45.257812 9.609375 45.277344 C 9.589844 45.320312 9.589844 45.367188 9.566406 45.386719 L 9.566406 45.496094 C 9.546875 45.539062 9.546875 45.585938 9.546875 45.648438 L 9.546875 45.738281 C 9.546875 45.78125 9.566406 45.824219 9.566406 45.890625 C 9.566406 45.933594 9.589844 45.957031 9.589844 45.976562 L 9.632812 46.109375 C 9.632812 46.152344 9.675781 46.175781 9.699219 46.21875 C 9.699219 46.242188 9.71875 46.261719 9.742188 46.328125 C 9.765625 46.351562 9.785156 46.394531 9.808594 46.414062 C 9.828125 46.4375 9.851562 46.460938 9.894531 46.480469 L 9.9375 46.542969 L 9.984375 46.589844 C 10.003906 46.613281 10.027344 46.632812 10.046875 46.632812 L 10.046875 46.65625 C 10.070312 46.679688 10.09375 46.679688 10.136719 46.699219 C 10.179688 46.722656 10.222656 46.742188 10.246094 46.742188 C 10.265625 46.789062 10.289062 46.789062 10.3125 46.808594 C 10.375 46.808594 10.421875 46.832031 10.464844 46.832031 C 10.484375 46.851562 10.507812 46.851562 10.53125 46.851562 L 10.648438 46.871094 Z M 26.214844 46.875 C 26.871094 46.875 27.4375 46.351562 27.4375 45.671875 L 27.4375 32.765625 C 27.4375 32.085938 26.871094 31.5625 26.214844 31.5625 C 25.535156 31.5625 25.011719 32.085938 25.011719 32.765625 L 25.011719 45.671875 C 25.011719 46.351562 25.535156 46.875 26.214844 46.875 Z M 32.734375 46.875 C 33.410156 46.875 33.957031 46.328125 33.957031 45.671875 L 33.957031 40.925781 L 36.648438 40.925781 C 39.25 40.925781 41.351562 38.824219 41.351562 36.265625 C 41.351562 33.664062 39.25 31.5625 36.648438 31.5625 L 32.734375 31.5625 C 32.078125 31.5625 31.53125 32.085938 31.53125 32.765625 L 31.53125 45.671875 C 31.53125 46.328125 32.078125 46.875 32.734375 46.875 Z M 36.648438 38.496094 L 33.957031 38.496094 L 33.957031 33.992188 L 36.648438 33.992188 C 37.917969 33.992188 38.902344 34.996094 38.921875 36.265625 C 38.902344 37.492188 37.917969 38.496094 36.648438 38.496094 Z M 36.648438 38.496094 "/>\n      </g>'},docxIcon:{extension:".docx",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 7.789062 43.75 C 9.589844 43.75 10.988281 43.269531 11.984375 42.304688 C 12.980469 41.339844 13.476562 39.984375 13.476562 38.234375 C 13.476562 36.496094 12.980469 35.144531 11.984375 34.179688 C 10.988281 33.214844 9.589844 32.734375 7.789062 32.734375 L 4.695312 32.734375 C 4.394531 32.734375 4.15625 32.816406 3.984375 32.984375 C 3.8125 33.152344 3.726562 33.386719 3.726562 33.6875 L 3.726562 42.796875 C 3.726562 43.097656 3.8125 43.332031 3.984375 43.5 C 4.15625 43.667969 4.394531 43.75 4.695312 43.75 Z M 7.664062 42.109375 L 5.742188 42.109375 L 5.742188 34.375 L 7.664062 34.375 C 10.195312 34.375 11.460938 35.660156 11.460938 38.234375 C 11.460938 40.816406 10.195312 42.109375 7.664062 42.109375 Z M 20.414062 43.890625 C 21.476562 43.890625 22.402344 43.660156 23.1875 43.203125 C 23.972656 42.746094 24.582031 42.089844 25.007812 41.234375 C 25.433594 40.378906 25.648438 39.378906 25.648438 38.234375 C 25.648438 37.089844 25.4375 36.089844 25.015625 35.242188 C 24.59375 34.394531 23.988281 33.738281 23.203125 33.28125 C 22.417969 32.824219 21.488281 32.59375 20.414062 32.59375 C 19.339844 32.59375 18.410156 32.824219 17.617188 33.28125 C 16.824219 33.738281 16.21875 34.394531 15.796875 35.242188 C 15.375 36.089844 15.164062 37.089844 15.164062 38.234375 C 15.164062 39.378906 15.378906 40.378906 15.804688 41.234375 C 16.230469 42.089844 16.839844 42.746094 17.625 43.203125 C 18.410156 43.660156 19.339844 43.890625 20.414062 43.890625 Z M 20.414062 42.28125 C 19.394531 42.28125 18.597656 41.933594 18.03125 41.234375 C 17.464844 40.535156 17.179688 39.535156 17.179688 38.234375 C 17.179688 36.933594 17.464844 35.933594 18.03125 35.242188 C 18.597656 34.550781 19.394531 34.203125 20.414062 34.203125 C 21.425781 34.203125 22.214844 34.550781 22.78125 35.242188 C 23.347656 35.933594 23.632812 36.933594 23.632812 38.234375 C 23.632812 39.535156 23.347656 40.535156 22.78125 41.234375 C 22.214844 41.933594 21.425781 42.28125 20.414062 42.28125 Z M 32.601562 43.890625 C 33.289062 43.890625 33.933594 43.789062 34.539062 43.585938 C 35.144531 43.382812 35.679688 43.089844 36.148438 42.703125 C 36.285156 42.597656 36.378906 42.488281 36.429688 42.367188 C 36.480469 42.246094 36.507812 42.109375 36.507812 41.953125 C 36.507812 41.722656 36.445312 41.53125 36.320312 41.375 C 36.195312 41.21875 36.042969 41.140625 35.867188 41.140625 C 35.753906 41.140625 35.644531 41.160156 35.539062 41.203125 C 35.433594 41.246094 35.332031 41.296875 35.226562 41.359375 C 34.746094 41.683594 34.316406 41.910156 33.9375 42.046875 C 33.558594 42.183594 33.144531 42.25 32.695312 42.25 C 31.613281 42.25 30.792969 41.910156 30.234375 41.234375 C 29.675781 40.558594 29.398438 39.558594 29.398438 38.234375 C 29.398438 36.921875 29.675781 35.925781 30.234375 35.25 C 30.792969 34.574219 31.613281 34.234375 32.695312 34.234375 C 33.164062 34.234375 33.589844 34.300781 33.976562 34.429688 C 34.363281 34.558594 34.777344 34.792969 35.226562 35.125 C 35.445312 35.269531 35.660156 35.34375 35.867188 35.34375 C 36.042969 35.34375 36.195312 35.265625 36.320312 35.109375 C 36.445312 34.953125 36.507812 34.761719 36.507812 34.53125 C 36.507812 34.363281 36.480469 34.222656 36.429688 34.109375 C 36.378906 33.996094 36.285156 33.886719 36.148438 33.78125 C 35.679688 33.394531 35.144531 33.101562 34.539062 32.898438 C 33.933594 32.695312 33.289062 32.59375 32.601562 32.59375 C 31.539062 32.59375 30.609375 32.824219 29.8125 33.28125 C 29.015625 33.738281 28.402344 34.394531 27.976562 35.242188 C 27.550781 36.089844 27.335938 37.089844 27.335938 38.234375 C 27.335938 39.378906 27.550781 40.378906 27.976562 41.234375 C 28.402344 42.089844 29.015625 42.746094 29.8125 43.203125 C 30.609375 43.660156 31.539062 43.890625 32.601562 43.890625 Z M 46.132812 43.84375 C 46.382812 43.84375 46.605469 43.75 46.796875 43.5625 C 46.988281 43.375 47.085938 43.15625 47.085938 42.90625 C 47.085938 42.707031 47.003906 42.511719 46.835938 42.3125 L 43.445312 38.15625 L 46.710938 34.171875 C 46.867188 34.003906 46.945312 33.808594 46.945312 33.578125 C 46.945312 33.328125 46.847656 33.113281 46.65625 32.929688 C 46.464844 32.746094 46.242188 32.65625 45.992188 32.65625 C 45.730469 32.65625 45.507812 32.769531 45.320312 33 L 42.273438 36.765625 L 39.226562 33 C 39.027344 32.769531 38.800781 32.65625 38.539062 32.65625 C 38.289062 32.65625 38.070312 32.746094 37.882812 32.929688 C 37.695312 33.113281 37.601562 33.328125 37.601562 33.578125 C 37.601562 33.808594 37.679688 34.003906 37.835938 34.171875 L 41.101562 38.15625 L 37.695312 42.3125 C 37.539062 42.5 37.460938 42.699219 37.460938 42.90625 C 37.460938 43.15625 37.558594 43.371094 37.75 43.554688 C 37.941406 43.738281 38.164062 43.828125 38.414062 43.828125 C 38.675781 43.828125 38.898438 43.71875 39.085938 43.5 L 42.273438 39.5625 L 45.445312 43.5 C 45.644531 43.730469 45.871094 43.84375 46.132812 43.84375 Z M 46.132812 43.84375 "/>\n      </g>'},jpgIcon:{extension:".jpg",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.789062 47.007812 L 9.488281 46.960938 C 12.214844 46.757812 13.578125 45.277344 13.578125 42.523438 L 13.578125 32.742188 C 13.578125 32.320312 13.453125 31.980469 13.195312 31.726562 C 12.941406 31.472656 12.59375 31.34375 12.15625 31.34375 C 11.734375 31.34375 11.394531 31.472656 11.140625 31.726562 C 10.886719 31.980469 10.757812 32.320312 10.757812 32.742188 L 10.757812 42.523438 C 10.757812 43.238281 10.605469 43.769531 10.296875 44.117188 C 9.992188 44.46875 9.539062 44.660156 8.941406 44.6875 L 8.242188 44.730469 C 7.847656 44.761719 7.558594 44.867188 7.378906 45.046875 C 7.195312 45.230469 7.105469 45.496094 7.105469 45.847656 C 7.105469 46.664062 7.667969 47.050781 8.789062 47.007812 Z M 18.304688 47.007812 C 18.742188 47.007812 19.089844 46.878906 19.34375 46.625 C 19.597656 46.367188 19.726562 46.023438 19.726562 45.585938 L 19.726562 40.882812 L 23.640625 40.882812 C 25.289062 40.882812 26.574219 40.464844 27.492188 39.632812 C 28.410156 38.804688 28.871094 37.644531 28.871094 36.15625 C 28.871094 34.667969 28.410156 33.511719 27.492188 32.6875 C 26.574219 31.863281 25.289062 31.453125 23.640625 31.453125 L 18.261719 31.453125 C 17.839844 31.453125 17.507812 31.570312 17.265625 31.804688 C 17.023438 32.035156 16.90625 32.363281 16.90625 32.789062 L 16.90625 45.585938 C 16.90625 46.023438 17.03125 46.367188 17.289062 46.625 C 17.542969 46.878906 17.882812 47.007812 18.304688 47.007812 Z M 23.292969 38.714844 L 19.726562 38.714844 L 19.726562 33.640625 L 23.292969 33.640625 C 25.230469 33.640625 26.203125 34.488281 26.203125 36.179688 C 26.203125 37.871094 25.230469 38.714844 23.292969 38.714844 Z M 38.605469 47.070312 C 39.320312 47.070312 40.0625 47.011719 40.835938 46.898438 C 41.609375 46.78125 42.285156 46.621094 42.871094 46.414062 C 43.410156 46.242188 43.765625 46.015625 43.941406 45.738281 C 44.117188 45.460938 44.203125 44.988281 44.203125 44.316406 L 44.203125 39.613281 C 44.203125 39.292969 44.101562 39.03125 43.898438 38.835938 C 43.695312 38.640625 43.425781 38.539062 43.089844 38.539062 L 39.21875 38.539062 C 38.867188 38.539062 38.59375 38.628906 38.398438 38.804688 C 38.199219 38.976562 38.101562 39.226562 38.101562 39.546875 C 38.101562 39.867188 38.199219 40.117188 38.398438 40.289062 C 38.59375 40.464844 38.867188 40.554688 39.21875 40.554688 L 41.6875 40.554688 L 41.6875 44.425781 C 40.699219 44.703125 39.707031 44.839844 38.714844 44.839844 C 35.390625 44.839844 33.726562 42.945312 33.726562 39.152344 C 33.726562 37.300781 34.132812 35.90625 34.941406 34.964844 C 35.75 34.023438 36.949219 33.554688 38.539062 33.554688 C 39.238281 33.554688 39.867188 33.644531 40.421875 33.828125 C 40.972656 34.007812 41.574219 34.324219 42.214844 34.777344 C 42.390625 34.894531 42.542969 34.980469 42.671875 35.03125 C 42.804688 35.082031 42.949219 35.105469 43.109375 35.105469 C 43.359375 35.105469 43.570312 34.996094 43.746094 34.777344 C 43.921875 34.558594 44.007812 34.289062 44.007812 33.96875 C 44.007812 33.75 43.96875 33.558594 43.886719 33.398438 C 43.808594 33.238281 43.679688 33.078125 43.503906 32.917969 C 42.191406 31.808594 40.507812 31.257812 38.453125 31.257812 C 36.90625 31.257812 35.5625 31.574219 34.425781 32.207031 C 33.289062 32.84375 32.410156 33.753906 31.789062 34.941406 C 31.171875 36.128906 30.859375 37.535156 30.859375 39.152344 C 30.859375 40.800781 31.171875 42.21875 31.789062 43.40625 C 32.410156 44.597656 33.304688 45.503906 34.46875 46.132812 C 35.636719 46.757812 37.015625 47.070312 38.605469 47.070312 Z M 38.605469 47.070312 "/>\n      </g>'},mp3Icon:{extension:".mp3",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 43.828125 43.710938 C 43.605469 44.28125 43.273438 44.804688 42.84375 45.265625 C 42.40625 45.730469 41.867188 46.113281 41.242188 46.398438 C 40.597656 46.699219 39.851562 46.855469 39.027344 46.855469 C 38.328125 46.855469 37.703125 46.757812 37.160156 46.570312 C 36.609375 46.378906 36.160156 46.136719 35.769531 45.839844 C 35.386719 45.550781 35.050781 45.210938 34.796875 44.832031 C 34.570312 44.507812 34.394531 44.195312 34.265625 43.890625 C 34.140625 43.59375 34.054688 43.335938 33.996094 43.101562 C 33.792969 42.261719 34.304688 41.417969 35.140625 41.210938 C 35.980469 41.007812 36.828125 41.519531 37.03125 42.355469 C 37.039062 42.390625 37.066406 42.488281 37.144531 42.671875 C 37.191406 42.777344 37.265625 42.914062 37.371094 43.0625 C 37.4375 43.160156 37.53125 43.257812 37.65625 43.351562 C 37.792969 43.453125 37.972656 43.542969 38.195312 43.625 C 38.332031 43.667969 38.59375 43.730469 39.027344 43.730469 C 39.390625 43.730469 39.695312 43.675781 39.925781 43.566406 C 40.1875 43.445312 40.398438 43.300781 40.558594 43.132812 C 40.71875 42.957031 40.839844 42.773438 40.914062 42.578125 C 40.996094 42.371094 41.03125 42.195312 41.03125 42.023438 C 41.03125 41.789062 41 41.585938 40.921875 41.398438 C 40.871094 41.257812 40.785156 41.148438 40.660156 41.039062 C 40.515625 40.910156 40.296875 40.792969 40.011719 40.699219 C 39.6875 40.59375 39.253906 40.539062 38.738281 40.535156 C 37.882812 40.527344 37.1875 39.832031 37.1875 38.972656 L 37.1875 38.832031 C 37.1875 37.984375 37.859375 37.292969 38.699219 37.265625 C 39.070312 37.257812 39.398438 37.195312 39.679688 37.101562 C 39.921875 37.011719 40.121094 36.902344 40.273438 36.773438 C 40.40625 36.652344 40.507812 36.519531 40.582031 36.359375 C 40.652344 36.210938 40.6875 36.027344 40.6875 35.8125 C 40.6875 35.523438 40.644531 35.289062 40.574219 35.125 C 40.5 34.96875 40.414062 34.847656 40.304688 34.757812 C 40.1875 34.660156 40.042969 34.582031 39.867188 34.53125 C 39.402344 34.386719 38.878906 34.398438 38.480469 34.542969 C 38.289062 34.617188 38.121094 34.714844 37.976562 34.84375 C 37.820312 34.984375 37.695312 35.148438 37.59375 35.339844 C 37.484375 35.550781 37.40625 35.773438 37.367188 36.039062 C 37.230469 36.890625 36.429688 37.472656 35.574219 37.335938 C 34.722656 37.195312 34.140625 36.398438 34.28125 35.542969 C 34.378906 34.9375 34.5625 34.378906 34.835938 33.871094 C 35.109375 33.355469 35.464844 32.898438 35.890625 32.519531 C 36.320312 32.132812 36.824219 31.828125 37.382812 31.617188 C 38.433594 31.226562 39.667969 31.199219 40.78125 31.539062 C 41.351562 31.714844 41.863281 31.992188 42.308594 32.355469 C 42.777344 32.753906 43.148438 33.242188 43.414062 33.824219 C 43.679688 34.402344 43.8125 35.070312 43.8125 35.8125 C 43.8125 36.476562 43.679688 37.097656 43.421875 37.660156 C 43.25 38.046875 43.023438 38.394531 42.746094 38.707031 C 43.242188 39.148438 43.609375 39.671875 43.835938 40.261719 C 44.046875 40.804688 44.15625 41.398438 44.15625 42.023438 C 44.15625 42.578125 44.046875 43.148438 43.828125 43.710938 Z M 31.445312 38.492188 C 31.148438 39.140625 30.734375 39.703125 30.199219 40.164062 C 29.6875 40.605469 29.078125 40.957031 28.390625 41.199219 C 27.71875 41.4375 26.976562 41.5625 26.191406 41.5625 L 25 41.5625 L 25 45 C 25 45.859375 24.296875 46.5625 23.4375 46.5625 C 22.578125 46.5625 21.875 45.859375 21.875 45 L 21.875 32.8125 C 21.875 31.945312 22.578125 31.25 23.4375 31.25 L 26.191406 31.25 C 27.890625 31.25 29.257812 31.667969 30.253906 32.5 C 31.339844 33.398438 31.886719 34.714844 31.886719 36.40625 C 31.886719 37.148438 31.738281 37.851562 31.445312 38.492188 Z M 18.730469 45.210938 C 18.730469 46.070312 18.03125 46.773438 17.167969 46.773438 C 16.300781 46.773438 15.605469 46.070312 15.605469 45.210938 L 15.605469 39.28125 L 14.015625 43.140625 C 14.007812 43.164062 13.996094 43.191406 13.984375 43.214844 C 13.71875 43.777344 13.15625 44.117188 12.566406 44.117188 L 12.53125 44.117188 C 11.9375 44.117188 11.375 43.777344 11.109375 43.214844 L 11.082031 43.160156 L 9.339844 39.101562 L 9.339844 45.210938 C 9.339844 46.070312 8.640625 46.773438 7.777344 46.773438 C 6.910156 46.773438 6.214844 46.070312 6.214844 45.210938 L 6.214844 32.824219 C 6.214844 31.960938 6.910156 31.261719 7.777344 31.261719 L 7.835938 31.261719 C 8.472656 31.261719 9.046875 31.617188 9.335938 32.1875 L 12.527344 39.09375 L 15.59375 32.207031 C 15.894531 31.617188 16.46875 31.261719 17.105469 31.261719 L 17.167969 31.261719 C 18.03125 31.261719 18.730469 31.960938 18.730469 32.824219 Z M 41.382812 28.125 L 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.136719 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.136719 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 41.382812 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 28.257812 34.902344 C 27.835938 34.550781 27.140625 34.375 26.191406 34.375 L 25 34.375 L 25 38.4375 L 26.191406 38.4375 C 26.621094 38.4375 27.007812 38.375 27.34375 38.253906 C 27.667969 38.140625 27.929688 37.992188 28.148438 37.804688 C 28.34375 37.632812 28.492188 37.4375 28.601562 37.195312 C 28.710938 36.964844 28.757812 36.703125 28.757812 36.40625 C 28.757812 35.324219 28.382812 35.003906 28.257812 34.902344 "/>\n      <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(99.607843%,99.607843%,99.607843%);stroke-opacity:1;stroke-miterlimit:4;" d="M 11.34125 13.57875 C 11.345 13.5925 11.3525 13.62375 11.36375 13.67375 C 11.3775 13.7225 11.3975 13.78125 11.42625 13.85 C 11.45375 13.9175 11.49375 13.9875 11.54625 14.0625 C 11.5975 14.13875 11.66625 14.20875 11.75 14.27125 C 11.83375 14.33625 11.9375 14.38875 12.0575 14.43125 C 12.1775 14.4725 12.32 14.49375 12.4875 14.49375 C 12.67875 14.49375 12.845 14.46125 12.9875 14.39375 C 13.13 14.32875 13.24875 14.245 13.34375 14.1425 C 13.43875 14.0425 13.51125 13.93 13.55875 13.8075 C 13.6075 13.6825 13.63125 13.56375 13.63125 13.4475 C 13.63125 13.31125 13.6075 13.1825 13.5625 13.065 C 13.515 12.9475 13.4425 12.845 13.3425 12.7575 C 13.2425 12.67 13.115 12.6 12.96 12.55 C 12.805 12.49875 12.6175 12.4725 12.4 12.4725 L 12.4 12.42625 C 12.57 12.42 12.72375 12.3925 12.8625 12.34375 C 13.0025 12.29625 13.11875 12.2275 13.21625 12.14375 C 13.31375 12.05875 13.3875 11.96 13.44125 11.845 C 13.4925 11.7275 13.52 11.60125 13.52 11.46 C 13.52 11.29375 13.4925 11.1525 13.43875 11.0325 C 13.38375 10.91375 13.31125 10.81625 13.21875 10.74 C 13.1275 10.66375 13.0225 10.6075 12.90375 10.5725 C 12.78625 10.535 12.66375 10.5175 12.5375 10.5175 C 12.395 10.5175 12.26125 10.54 12.14 10.58625 C 12.0175 10.6325 11.91 10.69625 11.81875 10.77875 C 11.72625 10.8625 11.64875 10.96 11.5875 11.07375 C 11.5275 11.18875 11.48625 11.315 11.4625 11.45375 M 7.5 14.4 L 7.5 10.5 L 8.3825 10.5 C 8.8075 10.5 9.13375 10.595 9.3625 10.78375 C 9.59 10.975 9.7025 11.2625 9.7025 11.65 C 9.7025 11.81625 9.6725 11.97125 9.6075 12.11125 C 9.5425 12.2525 9.4525 12.37375 9.335 12.475 C 9.21875 12.5775 9.0775 12.65625 8.9175 12.71375 C 8.75625 12.77125 8.5775 12.8 8.3825 12.8 L 7.6 12.8 M 2.4875 14.4675 L 2.4875 10.50375 L 2.5075 10.50375 C 2.5225 10.50375 2.53375 10.5125 2.5425 10.52625 L 3.9925 13.58625 C 3.99875 13.5975 4.005 13.6075 4.00875 13.6175 M 4.02125 13.6175 C 4.02625 13.6075 4.03125 13.5975 4.0375 13.58625 L 5.44 10.52625 C 5.4475 10.5125 5.45875 10.50375 5.4725 10.50375 L 5.4925 10.50375 L 5.4925 14.4675 " transform="matrix(3.125,0,0,3.125,0,0)"/>\n      </g>'},mp4Icon:{extension:".mp4",path:'<g id="surface6" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 36.898438 40.625 L 40.625 35.480469 L 40.625 40.625 Z M 28.761719 36.40625 C 28.761719 36.703125 28.707031 36.964844 28.605469 37.195312 C 28.496094 37.433594 28.347656 37.632812 28.148438 37.804688 C 27.929688 37.992188 27.667969 38.144531 27.34375 38.257812 C 27.003906 38.375 26.621094 38.4375 26.191406 38.4375 L 25 38.4375 L 25 34.375 L 26.191406 34.375 C 27.140625 34.375 27.835938 34.554688 28.253906 34.902344 C 28.378906 35.007812 28.761719 35.324219 28.761719 36.40625 Z M 44.6875 43.75 L 43.75 43.75 L 43.75 45.3125 C 43.75 46.175781 43.050781 46.875 42.1875 46.875 C 41.324219 46.875 40.625 46.175781 40.625 45.3125 L 40.625 43.75 L 34.066406 43.75 C 33.199219 43.75 32.503906 43.050781 32.503906 42.1875 L 32.503906 41.875 C 32.503906 41.546875 32.605469 41.226562 32.800781 40.957031 L 39.363281 31.898438 C 39.660156 31.492188 40.128906 31.25 40.628906 31.25 L 42.1875 31.25 C 43.050781 31.25 43.75 31.949219 43.75 32.8125 L 43.75 40.625 L 44.6875 40.625 C 45.550781 40.625 46.25 41.324219 46.25 42.1875 C 46.25 43.050781 45.550781 43.75 44.6875 43.75 Z M 31.445312 38.492188 C 31.148438 39.140625 30.730469 39.703125 30.195312 40.167969 C 29.6875 40.605469 29.082031 40.957031 28.390625 41.203125 C 27.71875 41.441406 26.976562 41.5625 26.191406 41.5625 L 25 41.5625 L 25 45 C 25 45.863281 24.300781 46.5625 23.4375 46.5625 C 22.578125 46.5625 21.875 45.863281 21.875 45 L 21.875 32.8125 C 21.875 31.949219 22.578125 31.25 23.4375 31.25 L 26.191406 31.25 C 27.890625 31.25 29.257812 31.671875 30.253906 32.5 C 31.339844 33.398438 31.886719 34.714844 31.886719 36.40625 C 31.886719 37.148438 31.738281 37.851562 31.445312 38.492188 Z M 18.730469 45.210938 C 18.730469 46.070312 18.027344 46.773438 17.167969 46.773438 C 16.300781 46.773438 15.605469 46.070312 15.605469 45.210938 L 15.605469 39.6875 L 14.035156 43.105469 C 14.019531 43.144531 14.003906 43.179688 13.984375 43.214844 C 13.71875 43.78125 13.15625 44.117188 12.566406 44.117188 L 12.53125 44.117188 C 11.941406 44.117188 11.378906 43.78125 11.113281 43.214844 C 11.097656 43.183594 11.078125 43.152344 11.066406 43.125 L 9.339844 39.484375 L 9.339844 45.210938 C 9.339844 46.070312 8.640625 46.773438 7.777344 46.773438 C 6.910156 46.773438 6.214844 46.070312 6.214844 45.210938 L 6.214844 32.824219 C 6.214844 31.960938 6.910156 31.261719 7.777344 31.261719 L 7.835938 31.261719 C 8.472656 31.261719 9.046875 31.617188 9.335938 32.191406 L 9.355469 32.226562 L 12.523438 38.90625 L 15.578125 32.242188 C 15.585938 32.226562 15.597656 32.210938 15.605469 32.191406 C 15.894531 31.617188 16.46875 31.261719 17.105469 31.261719 L 17.164062 31.261719 C 18.027344 31.261719 18.726562 31.960938 18.726562 32.824219 L 18.726562 45.210938 Z M 41.382812 28.125 L 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 41.382812 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface6" mask="url(#mask0)"/>\n      <path style="fill:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;stroke:rgb(99.607843%,99.607843%,99.607843%);stroke-opacity:1;stroke-miterlimit:4;" d="M 14.3 13.5 L 10.90125 13.5 L 10.90125 13.4 L 13.00125 10.5 L 13.5 10.5 L 13.5 14.5 M 7.5 14.4 L 7.5 10.5 L 8.3825 10.5 C 8.8075 10.5 9.13375 10.595 9.3625 10.78375 C 9.59 10.975 9.7025 11.2625 9.7025 11.65 C 9.7025 11.81625 9.6725 11.97125 9.6075 12.11125 C 9.5425 12.2525 9.4525 12.37375 9.335 12.47625 C 9.21875 12.5775 9.0775 12.65625 8.9175 12.71375 C 8.75625 12.77125 8.5775 12.8 8.3825 12.8 L 7.6 12.8 M 2.4875 14.4675 L 2.4875 10.50375 L 2.5075 10.50375 C 2.5225 10.50375 2.53375 10.5125 2.5425 10.52625 L 3.9925 13.58625 C 3.99875 13.5975 4.005 13.6075 4.00875 13.6175 M 4.02125 13.6175 C 4.02625 13.6075 4.03125 13.5975 4.0375 13.58625 L 5.44 10.52625 C 5.4475 10.5125 5.45875 10.50375 5.4725 10.50375 L 5.4925 10.50375 L 5.4925 14.4675 " transform="matrix(3.125,0,0,3.125,0,0)"/>\n      </g>'},oggIcon:{extension:".ogg",path:'<g id="surface9" clip-path="url(#clip1)">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.621094 28.125 C 3.859375 28.125 0 31.984375 0 36.742188 L 0 41.378906 C 0 46.140625 3.859375 50 8.621094 50 L 41.378906 50 C 46.140625 50 50 46.140625 50 41.382812 L 50 36.746094 C 50 31.984375 46.140625 28.125 41.382812 28.125 Z M 8.621094 28.125 "/>\n      </g>\n      </defs>\n      <g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.578125 25 L 39.421875 25 C 41.53125 25 43.527344 25.492188 45.3125 26.367188 L 45.3125 15.367188 C 45.3125 13.90625 44.976562 13.097656 43.984375 12.109375 C 42.996094 11.121094 35.105469 3.226562 34.503906 2.628906 C 33.90625 2.027344 33.070312 1.5625 31.617188 1.5625 L 6.5625 1.5625 C 5.527344 1.5625 4.6875 2.402344 4.6875 3.4375 L 4.6875 26.367188 C 6.476562 25.492188 8.472656 25 10.578125 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.710938 L 42.164062 12.5 L 34.515625 12.5 C 34.464844 12.46875 34.414062 12.425781 34.375 12.390625 Z M 6.25 25.722656 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.25 13.980469 32.496094 15.210938 33.742188 15.539062 C 33.902344 15.59375 34.074219 15.625 34.257812 15.625 L 43.75 15.625 L 43.75 25.722656 C 44.859375 26.105469 45.910156 26.625 46.875 27.269531 L 46.875 15.363281 C 46.875 13.511719 46.375 12.289062 45.089844 11.003906 L 35.609375 1.523438 C 34.582031 0.496094 33.273438 0 31.617188 0 L 6.5625 0 C 4.667969 0 3.125 1.542969 3.125 3.4375 L 3.125 27.269531 C 4.089844 26.625 5.140625 26.105469 6.25 25.722656 Z M 6.25 25.722656 "/>\n      <use xlink:href="#surface9" mask="url(#mask0)"/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 8.976562 47.070312 C 10.464844 47.070312 11.757812 46.75 12.859375 46.109375 C 13.960938 45.46875 14.808594 44.550781 15.40625 43.351562 C 16.003906 42.15625 16.304688 40.757812 16.304688 39.152344 C 16.304688 37.550781 16.007812 36.152344 15.417969 34.964844 C 14.828125 33.777344 13.980469 32.859375 12.882812 32.21875 C 11.78125 31.578125 10.480469 31.257812 8.976562 31.257812 C 7.472656 31.257812 6.167969 31.578125 5.0625 32.21875 C 3.953125 32.859375 3.101562 33.777344 2.511719 34.964844 C 1.921875 36.152344 1.625 37.550781 1.625 39.152344 C 1.625 40.757812 1.925781 42.15625 2.523438 43.351562 C 3.121094 44.550781 3.972656 45.46875 5.070312 46.109375 C 6.171875 46.75 7.472656 47.070312 8.976562 47.070312 Z M 8.976562 44.820312 C 7.546875 44.820312 6.433594 44.332031 5.640625 43.351562 C 4.847656 42.375 4.449219 40.976562 4.449219 39.152344 C 4.449219 37.332031 4.847656 35.933594 5.640625 34.964844 C 6.433594 33.996094 7.546875 33.507812 8.976562 33.507812 C 10.390625 33.507812 11.496094 33.996094 12.289062 34.964844 C 13.085938 35.933594 13.484375 37.332031 13.484375 39.152344 C 13.484375 40.976562 13.085938 42.375 12.289062 43.351562 C 11.496094 44.332031 10.390625 44.820312 8.976562 44.820312 Z M 26.410156 47.070312 C 27.125 47.070312 27.871094 47.011719 28.640625 46.898438 C 29.414062 46.78125 30.09375 46.621094 30.675781 46.414062 C 31.214844 46.242188 31.574219 46.015625 31.75 45.738281 C 31.921875 45.460938 32.011719 44.988281 32.011719 44.316406 L 32.011719 39.613281 C 32.011719 39.292969 31.910156 39.03125 31.703125 38.835938 C 31.5 38.640625 31.230469 38.539062 30.894531 38.539062 L 27.023438 38.539062 C 26.671875 38.539062 26.398438 38.628906 26.203125 38.804688 C 26.007812 38.976562 25.90625 39.226562 25.90625 39.546875 C 25.90625 39.867188 26.007812 40.117188 26.203125 40.289062 C 26.398438 40.464844 26.671875 40.554688 27.023438 40.554688 L 29.496094 40.554688 L 29.496094 44.425781 C 28.503906 44.703125 27.511719 44.839844 26.519531 44.839844 C 23.195312 44.839844 21.53125 42.945312 21.53125 39.152344 C 21.53125 37.300781 21.9375 35.90625 22.746094 34.964844 C 23.554688 34.023438 24.753906 33.554688 26.34375 33.554688 C 27.046875 33.554688 27.671875 33.644531 28.226562 33.828125 C 28.78125 34.007812 29.378906 34.324219 30.019531 34.777344 C 30.195312 34.894531 30.347656 34.980469 30.480469 35.03125 C 30.609375 35.082031 30.757812 35.105469 30.917969 35.105469 C 31.164062 35.105469 31.375 34.996094 31.550781 34.777344 C 31.726562 34.558594 31.8125 34.289062 31.8125 33.96875 C 31.8125 33.75 31.773438 33.558594 31.695312 33.398438 C 31.613281 33.238281 31.484375 33.078125 31.3125 32.917969 C 30 31.808594 28.3125 31.257812 26.257812 31.257812 C 24.710938 31.257812 23.371094 31.574219 22.234375 32.207031 C 21.09375 32.84375 20.214844 33.753906 19.597656 34.941406 C 18.976562 36.128906 18.667969 37.535156 18.667969 39.152344 C 18.667969 40.800781 18.976562 42.21875 19.597656 43.40625 C 20.214844 44.597656 21.109375 45.503906 22.277344 46.132812 C 23.441406 46.757812 24.820312 47.070312 26.410156 47.070312 Z M 42.445312 47.070312 C 43.160156 47.070312 43.902344 47.011719 44.675781 46.898438 C 45.449219 46.78125 46.128906 46.621094 46.710938 46.414062 C 47.25 46.242188 47.609375 46.015625 47.78125 45.738281 C 47.957031 45.460938 48.046875 44.988281 48.046875 44.316406 L 48.046875 39.613281 C 48.046875 39.292969 47.941406 39.03125 47.738281 38.835938 C 47.535156 38.640625 47.265625 38.539062 46.929688 38.539062 L 43.058594 38.539062 C 42.707031 38.539062 42.433594 38.628906 42.238281 38.804688 C 42.039062 38.976562 41.941406 39.226562 41.941406 39.546875 C 41.941406 39.867188 42.039062 40.117188 42.238281 40.289062 C 42.433594 40.464844 42.707031 40.554688 43.058594 40.554688 L 45.53125 40.554688 L 45.53125 44.425781 C 44.539062 44.703125 43.546875 44.839844 42.554688 44.839844 C 39.230469 44.839844 37.566406 42.945312 37.566406 39.152344 C 37.566406 37.300781 37.972656 35.90625 38.78125 34.964844 C 39.589844 34.023438 40.789062 33.554688 42.378906 33.554688 C 43.078125 33.554688 43.707031 33.644531 44.261719 33.828125 C 44.816406 34.007812 45.414062 34.324219 46.054688 34.777344 C 46.230469 34.894531 46.382812 34.980469 46.515625 35.03125 C 46.644531 35.082031 46.792969 35.105469 46.953125 35.105469 C 47.199219 35.105469 47.410156 34.996094 47.585938 34.777344 C 47.761719 34.558594 47.847656 34.289062 47.847656 33.96875 C 47.847656 33.75 47.808594 33.558594 47.726562 33.398438 C 47.648438 33.238281 47.519531 33.078125 47.34375 32.917969 C 46.03125 31.808594 44.347656 31.257812 42.292969 31.257812 C 40.746094 31.257812 39.40625 31.574219 38.265625 32.207031 C 37.128906 32.84375 36.25 33.753906 35.632812 34.941406 C 35.011719 36.128906 34.703125 37.535156 34.703125 39.152344 C 34.703125 40.800781 35.011719 42.21875 35.632812 43.40625 C 36.25 44.597656 37.144531 45.503906 38.3125 46.132812 C 39.476562 46.757812 40.855469 47.070312 42.445312 47.070312 Z M 42.445312 47.070312 "/>\n      </g>'},pdfIcon:{extension:".pdf",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(99.607843%,99.607843%,99.607843%);fill-opacity:1;" d="M 10.59375 25 L 39.4375 25 C 41.476562 25.003906 43.484375 25.472656 45.3125 26.375 L 45.3125 15.375 C 45.347656 14.191406 44.867188 13.054688 44 12.25 L 34.625 2.875 C 33.875 2.003906 32.773438 1.523438 31.625 1.5625 L 6.625 1.5625 C 5.589844 1.5625 4.75 2.402344 4.75 3.4375 L 4.75 26.375 C 6.566406 25.480469 8.566406 25.007812 10.59375 25 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 34.375 4.71875 L 42.15625 12.5 L 34.53125 12.5 C 34.480469 12.511719 34.425781 12.511719 34.375 12.5 Z M 6.25 25.71875 L 6.25 3.4375 C 6.25 3.265625 6.390625 3.125 6.5625 3.125 L 31.25 3.125 L 31.25 12.5 C 31.300781 13.980469 32.316406 15.253906 33.75 15.625 C 33.957031 15.675781 34.167969 15.675781 34.375 15.625 L 43.75 15.625 L 43.75 25.71875 C 44.859375 26.09375 45.910156 26.621094 46.875 27.28125 L 46.875 15.375 C 46.964844 13.722656 46.3125 12.117188 45.09375 11 L 35.71875 1.625 C 34.648438 0.523438 33.160156 -0.0664062 31.625 0 L 6.625 0 C 5.703125 -0.015625 4.8125 0.339844 4.152344 0.984375 C 3.496094 1.632812 3.125 2.515625 3.125 3.4375 L 3.125 27.28125 C 4.09375 26.625 5.144531 26.101562 6.25 25.71875 Z M 6.25 25.71875 "/>\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 8.625 28.125 C 6.335938 28.117188 4.136719 29.023438 2.515625 30.640625 C 0.898438 32.261719 -0.0078125 34.460938 0 36.75 L 0 41.375 C 0 46.136719 3.863281 50 8.625 50 L 41.375 50 C 46.132812 49.984375 49.984375 46.132812 50 41.375 L 50 36.75 C 50 31.988281 46.136719 28.125 41.375 28.125 Z M 8.625 28.125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 14.40625 41.78125 L 12.09375 41.78125 L 12.09375 45.84375 C 12.003906 46.351562 11.5625 46.726562 11.046875 46.726562 C 10.53125 46.726562 10.089844 46.351562 10 45.84375 L 10 34.78125 C 10 34.210938 10.460938 33.75 11.03125 33.75 L 14.40625 33.75 C 15.925781 33.617188 17.390625 34.351562 18.191406 35.648438 C 18.992188 36.945312 18.992188 38.585938 18.191406 39.882812 C 17.390625 41.179688 15.925781 41.914062 14.40625 41.78125 Z M 12.09375 39.6875 L 14.40625 39.6875 C 15.152344 39.78125 15.882812 39.4375 16.289062 38.804688 C 16.691406 38.171875 16.691406 37.359375 16.289062 36.726562 C 15.882812 36.09375 15.152344 35.75 14.40625 35.84375 L 12.09375 35.84375 Z M 12.09375 39.6875 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 20.3125 45.84375 L 20.3125 34.78125 C 20.3125 34.210938 20.773438 33.75 21.34375 33.75 L 23.5625 33.75 C 27.1875 33.75 30.125 36.6875 30.125 40.3125 C 30.125 43.9375 27.1875 46.875 23.5625 46.875 L 21.34375 46.875 C 20.773438 46.875 20.3125 46.414062 20.3125 45.84375 Z M 22.40625 44.78125 L 23.5625 44.78125 C 26.03125 44.78125 28.03125 42.78125 28.03125 40.3125 C 28.03125 37.84375 26.03125 35.84375 23.5625 35.84375 L 22.40625 35.84375 Z M 22.40625 44.78125 "/>\n      <path style=" stroke:none;fill-rule:nonzero;fill:rgb(100%,100%,100%);fill-opacity:1;" d="M 33.1875 45.84375 L 33.1875 34.78125 C 33.183594 34.476562 33.3125 34.1875 33.542969 33.992188 C 33.769531 33.792969 34.074219 33.703125 34.375 33.75 L 40.625 33.75 C 41.132812 33.839844 41.507812 34.28125 41.507812 34.796875 C 41.507812 35.3125 41.132812 35.753906 40.625 35.84375 L 35.25 35.84375 L 35.25 39.28125 L 39.625 39.28125 C 40.195312 39.28125 40.65625 39.742188 40.65625 40.3125 C 40.65625 40.882812 40.195312 41.34375 39.625 41.34375 L 35.25 41.34375 L 35.25 45.84375 C 35.257812 46.359375 34.882812 46.796875 34.375 46.875 C 34.074219 46.921875 33.769531 46.832031 33.542969 46.632812 C 33.3125 46.4375 33.183594 46.148438 33.1875 45.84375 Z M 33.1875 45.84375 "/>\n      </g>'},defaultIcon:{extension:".default",path:'<g id="surface1">\n      <path style=" stroke:none;fill-rule:evenodd;fill:rgb(0%,0%,0%);fill-opacity:1;" d="M 3.117188 44.777344 C 1.394531 44.777344 0 43.386719 0 41.671875 L 0 3.484375 C 0 1.769531 1.394531 0.378906 3.117188 0.378906 L 25.792969 0.378906 C 27.164062 0.304688 28.5 0.808594 29.480469 1.765625 L 37.980469 10.230469 C 39.144531 11.242188 39.769531 12.730469 39.683594 14.265625 L 39.683594 41.671875 C 39.683594 43.386719 38.289062 44.777344 36.5625 44.777344 Z M 25.511719 3.203125 L 3.117188 3.203125 C 2.960938 3.203125 2.832031 3.328125 2.832031 3.484375 L 2.832031 41.671875 C 2.832031 41.828125 2.960938 41.957031 3.117188 41.957031 L 36.5625 41.957031 C 36.679688 41.949219 36.785156 41.867188 36.820312 41.757812 L 36.820312 14.492188 L 28.34375 14.492188 C 28.160156 14.539062 27.964844 14.539062 27.777344 14.492188 C 26.480469 14.15625 25.554688 13.007812 25.511719 11.671875 Z M 28.34375 4.640625 L 28.34375 11.671875 C 28.390625 11.683594 28.441406 11.683594 28.488281 11.671875 L 35.402344 11.671875 Z M 28.34375 4.640625 "/>\n      </g>'}},t.MODULES.modals=function(e){var a=e.$;e.shared.modals||(e.shared.modals={});var n,r=e.shared.modals;function o(){for(var e in r)if(Object.prototype.hasOwnProperty.call(r,e)){var t=r[e];t&&t.$modal&&t.$modal.removeData().remove()}n&&n.removeData().remove(),r={}}function s(t,o){if(r[t]){var c=r[t].$modal,l=c.data("instance")||e;l.events.enableBlur(),c.hide(),n.hide(),a(l.o_doc).find("body").first().removeClass("fr-prevent-scroll fr-mobile"),c.removeClass("fr-active"),o||(l.accessibility.restoreSelection(),l.events.trigger("modals.hide"))}}function c(t){var n;if("string"==typeof t){if(!r[t])return;n=r[t].$modal}else n=t;return n&&e.node.hasClass(n,"fr-active")&&e.core.sameInstance(n)||!1}return{_init:function(){e.events.on("shared.destroy",o,!0)},get:function(e){return r[e]},create:function(o,c,l){if(c='<div class="fr-modal-head-line">'.concat(c,"</div>"),e.shared.$overlay||(e.shared.$overlay=a(e.doc.createElement("DIV")).addClass("fr-overlay"),a("body").first().append(e.shared.$overlay)),n=e.shared.$overlay,e.opts.theme&&n.addClass("".concat(e.opts.theme,"-theme")),!r[o]){var d=function(n,r){var o='<div tabIndex="-1" class="fr-modal'.concat(e.opts.theme?" ".concat(e.opts.theme,"-theme"):"",'"><div class="fr-modal-wrapper">'),c='<button title="'.concat(e.language.translate("Cancel"),'" class="fr-command fr-btn fr-modal-close"><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 24 24"><path d="').concat(t.SVG.close,'"/></svg></button>');o+='<div class="fr-modal-head">'.concat(n).concat(c,"</div>"),o+='<div tabIndex="-1" class="fr-modal-body">'.concat(r,"</div>"),o+="</div></div>";var l=a(e.doc.createElement("DIV"));return l.html(o),l.find("> .fr-modal")}(c,l);r[o]={$modal:d,$head:d.find(".fr-modal-head"),$body:d.find(".fr-modal-body")},e.helpers.isMobile()||d.addClass("fr-desktop"),a("body").first().append(d),e.events.$on(d,"click",".fr-modal-close",(function(){s(o)}),!0),r[o].$body.css("margin-top",r[o].$head.outerHeight()),e.events.$on(d,"keydown",(function(n){var r=n.which;return r===t.KEYCODE.ESC?(s(o),e.accessibility.focusModalButton(d),!1):!(!a(n.currentTarget).is("input[type=text], textarea")&&r!==t.KEYCODE.ARROW_UP&&r!==t.KEYCODE.ARROW_DOWN&&!e.keys.isBrowserAction(n)&&(n.preventDefault(),n.stopPropagation(),1))}),!0),s(o,!0)}return r[o]},show:function(t){if(r[t]){var o=r[t].$modal;o.data("instance",e),o.show(),n.show(),a(e.o_doc).find("body").first().addClass("fr-prevent-scroll"),e.helpers.isMobile()&&a(e.o_doc).find("body").first().addClass("fr-mobile"),o.addClass("fr-active"),e.accessibility.focusModal(o)}},hide:s,resize:function(t){if(r[t]){var n=r[t],o=n.$modal,c=n.$body,l=e.o_win.innerHeight,i=o.find(".fr-modal-wrapper"),a=l-i.outerHeight(!0)+(i.height()-(c.outerHeight(!0)-c.height())),s="auto";a<c.get(0).scrollHeight&&(s=a),c.height(s)}},isVisible:c,areVisible:function(e){for(var t in r)if(Object.prototype.hasOwnProperty.call(r,t)&&c(t)&&(void 0===e||r[t].$modal.data("instance")===e))return r[t].$modal;return!1}}},t.MODULES.position=function(e){var n=e.$;function r(){var r=e.selection.ranges(0),o=r.getBoundingClientRect();if(0===o.top&&0===o.left&&0===o.width||0===o.height){var c=!1,l=e.opts.toolbarInline&&r.startContainer&&r.startContainer.firstChild&&"BR"===r.startContainer.firstChild.tagName;0===e.$el.find(".fr-marker").length&&(l?n(r.startContainer.firstChild).after(t.MARKERS):e.selection.save(),c=!0);var d=e.$el.find(".fr-marker").first();d.css("display","inline"),d.css("line-height","");var i=d.offset(),a=d.outerHeight();d.css("display","none"),d.css("line-height",0),(o={}).left=i&&i.left,o.width=0,o.height=a,o.top=i&&i.top-(e.helpers.isMobile()&&!e.helpers.isIOS()||e.opts.iframe?0:e.helpers.scrollTop()),d&&0<d.length&&(o.top-=n(d.get(0).parentNode).height()),o.right=1,o.bottom=1,o.ok=!0,c&&(l?e.$el.find(".fr-marker").remove():e.selection.restore())}return o}function i(t,n,r,o){var c=r.data("container");if(!c||"BODY"===c.get(0).tagName&&"static"===c.css("position")||(t&&(t-=c.offset().left),n&&(n-=c.offset().top),"BODY"!==c.get(0).tagName?(t&&(t+=c.get(0).scrollLeft),n&&(n+=c.get(0).scrollTop)):"absolute"===c.css("position")&&(t&&(t+=c.position().left),n&&(n+=c.position().top))),e.opts.iframe&&c&&e.$tb&&c.get(0)!==e.$tb.get(0)){var i=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-top")),a=e.helpers.getPX(e.$wp.find(".fr-iframe").css("padding-left"));t&&(t+=e.$iframe.offset().left+a),n&&(n+=e.$iframe.offset().top+i)}var s=function(t,n){var r=t.outerWidth(!0);return n+r>e.$sc.get(0).clientWidth-10&&(n=e.$sc.get(0).clientWidth-r-10),n<0&&(n=10),n}(r,t);t&&r.css("left",s),n&&r.css("top",function(t,n,r){var o=t.outerHeight(!0);if(!e.helpers.isMobile()&&e.$tb&&t.parent().get(0)!==e.$tb.get(0)){var c=t.parent().offset().top,i=n-o-(r||0);t.parent().get(0)===e.$sc.get(0)&&(c-=t.parent().position().top);var a=e.$sc.get(0).clientHeight;c+n+o>e.$sc.offset().top+a&&0<t.parent().offset().top+i&&0<i?i>e.$wp.scrollTop()&&(n=i,t.addClass("fr-above")):t.removeClass("fr-above")}return n}(r,n,o))}function a(t){var r=n(t),o=r.is(".fr-sticky-on"),c=r.data("sticky-top"),l=r.data("sticky-scheduled");if(void 0===c){r.data("sticky-top",0);var i=n('<div class="fr-sticky-dummy" style="height: '.concat(r.outerHeight(),'px;"></div>'));e.$box.prepend(i)}else e.$box.find(".fr-sticky-dummy").css("height",r.outerHeight());if(e.core.hasFocus()||0<e.$tb.findVisible("input:focus").length){var a=e.helpers.scrollTop(),s=Math.min(Math.max(a-e.$tb.parent().offset().top,0),e.$tb.parent().outerHeight()-r.outerHeight());if(s!==c&&s!==l&&(clearTimeout(r.data("sticky-timeout")),r.data("sticky-scheduled",s),r.outerHeight()<a-e.$tb.parent().offset().top&&r.addClass("fr-opacity-0"),r.data("sticky-timeout",setTimeout((function(){var t=e.helpers.scrollTop(),n=Math.min(Math.max(t-e.$tb.parent().offset().top,0),e.$tb.parent().outerHeight()-r.outerHeight());0<n&&"BODY"===e.$tb.parent().get(0).tagName&&(n+=e.$tb.parent().position().top),n!==c&&(r.css("top",Math.max(n,0)),r.data("sticky-top",n),r.data("sticky-scheduled",n)),r.removeClass("fr-opacity-0")}),100))),!o){var d=e.$tb.parent(),h=d.get(0).offsetWidth-d.get(0).clientWidth;r.css("top","0"),r.width(d.width()-h),r.addClass("fr-sticky-on"),e.$box.addClass("fr-sticky-box")}}else clearTimeout(n(t).css("sticky-timeout")),r.css("top","0"),r.css("position",""),r.css("width",""),r.data("sticky-top",0),r.removeClass("fr-sticky-on"),e.$box.removeClass("fr-sticky-box")}function o(t){if(t.offsetWidth){var r=n(t),o=r.outerHeight(),c=r.data("sticky-position"),l=n("body"===e.opts.scrollableContainer?e.o_win:e.opts.scrollableContainer).outerHeight(),i=0,a=0;"body"!==e.opts.scrollableContainer&&(i=e.$sc.offset().top,a=n(e.o_win).outerHeight()-i-l);var s="body"===e.opts.scrollableContainer?e.helpers.scrollTop():i,d=r.is(".fr-sticky-on");r.data("sticky-parent")||r.data("sticky-parent",r.parent());var h=r.data("sticky-parent"),f=h.offset().top,m=h.outerHeight();if(r.data("sticky-offset")?e.$box.find(".fr-sticky-dummy").css("height","".concat(o,"px")):(r.data("sticky-offset",!0),r.after('<div class="fr-sticky-dummy" style="height: '.concat(o,'px;"></div>'))),!c){var p="auto"!==r.css("top")||"auto"!==r.css("bottom");p||r.css("position","fixed"),c={top:e.node.hasClass(r.get(0),"fr-top"),bottom:e.node.hasClass(r.get(0),"fr-bottom")},p||r.css("position",""),r.data("sticky-position",c),r.data("top",e.node.hasClass(r.get(0),"fr-top")?r.css("top"):"auto"),r.data("bottom",e.node.hasClass(r.get(0),"fr-bottom")?r.css("bottom"):"auto")}var v=e.helpers.getPX(r.data("top")),u=e.helpers.getPX(r.data("bottom")),g=c.top&&f<s+v&&s+v<=f+m-o&&(e.helpers.isInViewPort(e.$sc.get(0))||"body"===e.opts.scrollableContainer),_=c.bottom&&f+o<s+l-u&&s+l-u<f+m;if(g||_){var y=h.get(0).offsetWidth-h.get(0).clientWidth;r.css("width","".concat(h.get(0).getBoundingClientRect().width-y,"px")),d||(r.addClass("fr-sticky-on"),r.removeClass("fr-sticky-off"),r.css("top")&&("auto"!==r.data("top")?r.css("top",e.helpers.getPX(r.data("top"))+i):r.data("top","auto")),r.css("bottom")&&("auto"!==r.data("bottom")?r.css("bottom",e.helpers.getPX(r.data("bottom"))+a):r.css("bottom","auto")))}else e.node.hasClass(r.get(0),"fr-sticky-off")||(r.css("width",""),r.removeClass("fr-sticky-on"),r.addClass("fr-sticky-off"),r.css("top")&&"auto"!==r.data("top")&&c.top&&r.css("top",0),r.css("bottom")&&"auto"!==r.data("bottom")&&c.bottom&&r.css("bottom",0))}}function s(){if(e.helpers.requestAnimationFrame()(s),!1!==e.events.trigger("position.refresh"))for(var t=0;t<e._stickyElements.length;t++)if(e.opts.toolbarBottom){var r=e.$tb.parent(),o=r.get(0).offsetWidth-r.get(0).clientWidth,c=n(e._stickyElements[t]);c.width(r.width()-o),c.addClass("fr-sticky-on"),e.$box.addClass("fr-sticky-box")}else a(e._stickyElements[t])}function c(){if(e._stickyElements)for(var t=0;t<e._stickyElements.length;t++)o(e._stickyElements[t])}return{_init:function(){e._stickyElements=[],e.helpers.isIOS()?(s(),e.events.$on(n(e.o_win),"scroll",(function(){if(e.core.hasFocus())for(var t=0;t<e._stickyElements.length;t++){var r=n(e._stickyElements[t]),o=r.parent(),c=e.helpers.scrollTop();r.outerHeight()<c-o.offset().top&&(e.opts.toolbarBottom&&e.helpers.isIOS()||(r.addClass("fr-opacity-0"),r.data("sticky-top",-1),r.data("sticky-scheduled",-1)))}}),!0)):("body"!==e.opts.scrollableContainer&&e.events.$on(n(e.opts.scrollableContainer),"scroll",c,!0),e.events.$on(n(e.o_win),"scroll",c,!0),e.events.$on(n(e.o_win),"resize",c,!0),e.events.on("initialized",c),e.events.on("focus",c),e.events.$on(n(e.o_win),"resize","textarea",c,!0)),e.events.on("destroy",(function(){e._stickyElements=[]}))},forSelection:function(t){var n=r();if(null!=n.top){t.css({top:0,left:0});var o=n.top+n.height,c=n.left+n.width/2-t.get(0).offsetWidth/2+e.helpers.scrollLeft();e.opts.iframe||(o+=e.helpers.scrollTop()),i(c,o,t,n.height)}},addSticky:function(t){t.addClass("fr-sticky"),e.helpers.isIOS()&&!e.opts.toolbarBottom&&t.addClass("fr-sticky-ios"),t.removeClass("fr-sticky"),e._stickyElements.push(t.get(0))},refresh:c,at:i,getBoundingRect:r}},t.MODULES.refresh=function(e){var t=e.$;function i(e,t){e.toggleClass("fr-disabled",t).attr("aria-disabled",t)}function n(n){var r=e.$tb.find('.fr-more-toolbar[data-name="'.concat(n.attr("data-group-name"),'"]')),o=function(n,r){var o=0,c=r.find("> .fr-command, > .fr-btn-wrap");c.each((function(e,n){o+=t(n).outerWidth()}));var l,i=e.helpers.getPX(t(c[0]).css("margin-left")),a=e.helpers.getPX(t(c[0]).css("margin-right"));return(l="rtl"===e.opts.direction?e.$tb.outerWidth()-n.offset().left+e.$tb.offset().left-(o+n.outerWidth()+c.length*(i+a))/2:n.offset().left-e.$tb.offset().left-(o-n.outerWidth()+c.length*(i+a))/2)+o+c.length*(i+a)>e.$tb.outerWidth()&&(l-=(o+c.length*(i+a)-n.outerWidth())/2),l<0&&(l=0),l}(n,r);"rtl"===e.opts.direction?r.css("padding-right",o):r.css("padding-left",o)}return{undo:function(t){i(t,!e.undo.canDo())},redo:function(t){i(t,!e.undo.canRedo())},outdent:function(n){if(e.node.hasClass(n.get(0),"fr-no-refresh"))return!1;if(t("button#markdown-".concat(e.id,".fr-active")).length)return!1;for(var r=e.selection.blocks(),o=0;o<r.length;o++){var c="rtl"===e.opts.direction||"rtl"===t(r[o]).css("direction")?"margin-right":"margin-left",l=r[0].parentElement;if("HTML"!=l.parentNode.tagName&&"P"!=l.parentNode.tagName&&"DIV"!=l.parentNode.tagName&&"UL"!=l.parentNode.tagName&&"OL"!=l.parentNode.tagName&&"LI"!=l.parentNode.tagName)return i(n,!0),!0;if(r[0].previousSibling&&"none"==l.parentNode.style.listStyleType)return i(n,!0),!0;if("LI"===r[o].tagName||"LI"===r[o].parentNode.tagName)return i(n,!1),!0;if(0<e.helpers.getPX(t(r[o]).css(c)))return i(n,!1),!0}i(n,!0)},indent:function(n){if(e.node.hasClass(n.get(0),"fr-no-refresh"))return!1;if(t("button#markdown-".concat(e.id,".fr-active")).length)return!1;for(var r=e.selection.blocks(),o=0;o<r.length;o++){for(var c=r[o].previousSibling;c&&c.nodeType===Node.TEXT_NODE&&0===c.textContent.length;)c=c.previousSibling;if("LI"!==r[o].tagName||c)return i(n,!1),!0;i(n,!0)}},moreText:n,moreParagraph:n,moreMisc:n,moreRich:n}},Object.assign(t.DEFAULTS,{attribution:!0,toolbarBottom:!1,toolbarButtons:null,toolbarButtonsXS:null,toolbarButtonsSM:null,toolbarButtonsMD:null,toolbarContainer:null,toolbarInline:!1,toolbarSticky:!0,toolbarStickyOffset:0,toolbarVisibleWithoutSelection:!1}),t.TOOLBAR_BUTTONS={moreText:{buttons:["bold","italic","underline","strikeThrough","subscript","superscript","fontFamily","fontSize","textColor","backgroundColor","inlineClass","inlineStyle","clearFormatting"]},moreParagraph:{buttons:["alignLeft","alignCenter","formatOLSimple","alignRight","alignJustify","formatOL","formatUL","paragraphFormat","paragraphStyle","lineHeight","outdent","indent","quote"]},moreRich:{buttons:["trackChanges","markdown","insertLink","insertFiles","insertImage","insertVideo","insertTable","emoticons","fontAwesome","specialCharacters","embedly","insertFile","insertHR"],buttonsVisible:4},moreMisc:{buttons:["undo","redo","fullscreen","print","getPDF","spellChecker","selectAll","html","help"],align:"right",buttonsVisible:2},trackChanges:{buttons:["showChanges","applyAll","removeAll","applyLast","removeLast"],buttonsVisible:0}},t.TOOLBAR_BUTTONS_MD=null,(t.TOOLBAR_BUTTONS_SM={}).moreText=Object.assign({},t.TOOLBAR_BUTTONS.moreText,{buttonsVisible:2}),t.TOOLBAR_BUTTONS_SM.moreParagraph=Object.assign({},t.TOOLBAR_BUTTONS.moreParagraph,{buttonsVisible:2}),t.TOOLBAR_BUTTONS_SM.moreRich=Object.assign({},t.TOOLBAR_BUTTONS.moreRich,{buttonsVisible:2}),t.TOOLBAR_BUTTONS_SM.moreMisc=Object.assign({},t.TOOLBAR_BUTTONS.moreMisc,{buttonsVisible:2}),t.TOOLBAR_BUTTONS_SM.trackChanges=Object.assign({},t.TOOLBAR_BUTTONS.trackChanges,{buttonsVisible:0}),(t.TOOLBAR_BUTTONS_XS={}).moreText=Object.assign({},t.TOOLBAR_BUTTONS.moreText,{buttonsVisible:0}),t.TOOLBAR_BUTTONS_XS.moreParagraph=Object.assign({},t.TOOLBAR_BUTTONS.moreParagraph,{buttonsVisible:0}),t.TOOLBAR_BUTTONS_XS.moreRich=Object.assign({},t.TOOLBAR_BUTTONS.moreRich,{buttonsVisible:0}),t.TOOLBAR_BUTTONS_XS.moreMisc=Object.assign({},t.TOOLBAR_BUTTONS.moreMisc,{buttonsVisible:2}),t.TOOLBAR_BUTTONS_XS.trackChanges=Object.assign({},t.TOOLBAR_BUTTONS.trackChanges,{buttonsVisible:0}),t.POWERED_BY='<a id="fr-logo" href="https://froala.com/wysiwyg-editor" target="_blank" title="Froala WYSIWYG HTML Editor"><span>Powered by</span><svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 822.8 355.33"><defs><style>.fr-logo{fill:#b1b2b7;}</style></defs><title>Froala</title><path class="fr-logo" d="M123.58,78.65A16.16,16.16,0,0,0,111.13,73H16.6C7.6,73,0,80.78,0,89.94V128.3a16.45,16.45,0,0,0,32.9,0V104.14h78.5A15.63,15.63,0,0,0,126.87,91.2,15.14,15.14,0,0,0,123.58,78.65Z"/><path class="fr-logo" d="M103.54,170a16.05,16.05,0,0,0-11.44-4.85H15.79A15.81,15.81,0,0,0,0,180.93v88.69a16.88,16.88,0,0,0,5,11.92,16,16,0,0,0,11.35,4.7h.17a16.45,16.45,0,0,0,16.41-16.6v-73.4H92.2A15.61,15.61,0,0,0,107.89,181,15.1,15.1,0,0,0,103.54,170Z"/><path class="fr-logo" d="M233,144.17c-5.29-6.22-16-7.52-24.14-7.52-16.68,0-28.72,7.71-36.5,23.47v-5.67a16.15,16.15,0,1,0-32.3,0v115.5a16.15,16.15,0,1,0,32.3,0v-38.7c0-19.09,3.5-63.5,35.9-63.5a44.73,44.73,0,0,1,5.95.27h.12c12.79,1.2,20.06-2.73,21.6-11.69C236.76,151.48,235.78,147.39,233,144.17Z"/><path class="fr-logo" d="M371.83,157c-13.93-13.11-32.9-20.33-53.43-20.33S279,143.86,265.12,157c-14.67,13.88-22.42,32.82-22.42,54.77,0,21.68,8,41.28,22.4,55.2,13.92,13.41,32.85,20.8,53.3,20.8s39.44-7.38,53.44-20.79c14.55-13.94,22.56-33.54,22.56-55.21S386.39,170.67,371.83,157Zm-9.73,54.77c0,25.84-18.38,44.6-43.7,44.6s-43.7-18.76-43.7-44.6c0-25.15,18.38-43.4,43.7-43.4S362.1,186.59,362.1,211.74Z"/><path class="fr-logo" d="M552.7,138.14a16.17,16.17,0,0,0-16,16.3v1C526.41,143.85,509,136.64,490,136.64c-19.83,0-38.19,7.24-51.69,20.4C424,171,416.4,190,416.4,212c0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,552.7,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C513.73,168.34,536.4,183.55,536.4,211.74Z"/><path class="fr-logo" d="M623.5,61.94a16.17,16.17,0,0,0-16,16.3v191.7a16.15,16.15,0,1,0,32.3,0V78.24A16.32,16.32,0,0,0,623.5,61.94Z"/><path class="fr-logo" d="M806.5,138.14a16.17,16.17,0,0,0-16,16.3v1c-10.29-11.63-27.74-18.84-46.7-18.84-19.83,0-38.19,7.24-51.69,20.4-14.33,14-21.91,33-21.91,55,0,21.61,7.78,41.16,21.9,55,13.56,13.33,31.92,20.67,51.7,20.67,18.83,0,36.29-7.41,46.7-19.37v1.57a16.15,16.15,0,1,0,32.3,0V154.44A16.32,16.32,0,0,0,806.5,138.14Zm-16.3,73.6c0,30.44-22.81,44.3-44,44.3-24.57,0-43.1-19-43.1-44.3s18.13-43.4,43.1-43.4C767.53,168.34,790.2,183.55,790.2,211.74Z"/></svg></a>',t.MODULES.toolbar=function(n){var r,o=n.$,c=[];function l(t){var n={};if(Array.isArray(t)){if(!Array.isArray(t[0])){for(var r=[],o=[],c=0;c<t.length;c++)"|"===t[c]||"-"===t[c]?(0<o.length&&r.push(o),o=[]):o.push(t[c]);0<o.length&&r.push(o),t=r}t.forEach((function(e,t){n["group".concat(t+1)]={buttons:e}})),n.showMoreButtons=!1}else"object"!==e(t)||Array.isArray(t)||((n=t).showMoreButtons=!0);return n}function d(){var e=n.helpers.screenSize();return c[r=e]}function h(){for(var e=n.$tb.find(".fr-more-toolbar"),t=0;t<e.length;t++){var r=o(e[t]);r.hasClass("fr-expanded")?function(){var e=n.helpers.getPX(r.css("padding-left")),t=r.find("> .fr-command, > .fr-btn-wrap"),c=o(t[0]),l=n.helpers.getPX(c.css("margin-left")),d=n.helpers.getPX(c.css("margin-right")),i=n.helpers.getPX(c.css("margin-top")),a=n.helpers.getPX(c.css("margin-bottom"));if(t.each((function(t,n){e+=o(n).outerWidth()+l+d})),n.$tb.outerWidth()<e){var s=Math.floor(e/n.$tb.outerWidth());e+=s*(e/r[0].childElementCount),s=Math.ceil(e/n.$tb.outerWidth());var h=(n.helpers.getPX(c.css("height"))+i+a)*s;r.css("height",h)}}():r.css("height","")}!n.helpers.isMobile()&&n.opts.toolbarBottom?n.$tb.find(".fr-toolbar .fr-more-toolbar").removeClass("position-relative"):n.$tb.find(".fr-toolbar .fr-more-toolbar").addClass("position-relative")}function f(){if(0==n.$tb.find("[data-name='trackChanges-".concat(n.id,"']")).length&&-1<n.opts.pluginsEnabled.indexOf("track_changes")){n.$tb.append(o('<div class="fr-more-toolbar"></div>').data("name","trackChanges-".concat(n.id)));for(var e=0,c=["showChanges","applyAll","removeAll","applyLast","removeLast"];e<c.length;e++){var l=c[e],f=t.COMMANDS[l];if(f){f.more_btn=!0;var m=o(n.button.build(l,f,!0));n.button.addButtons(m),n.$tb.find("[data-name='trackChanges-".concat(n.id,"']")).append(m)}}}if(r!==n.helpers.screenSize()){var i=d(),a=o(),s=o();for(var v in n.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command, .fr-btn-grp > .fr-btn-wrap > .fr-command, .fr-more-toolbar > .fr-btn-wrap > .fr-command").addClass("fr-hidden"),function(){for(var e=n.$tb.find(".fr-btn-grp, .fr-more-toolbar"),t=function(t){var n=o(e[t]);n.children().each((function(e,t){n.before(t)})),n.remove()},r=0;r<e.length;r++)t(r)}(),i){var _=i[v];if(_.buttons&&("trackChanges"!==v||-1!==n.opts.pluginsEnabled.indexOf("track_changes"))){var y=void 0,E=0,p=3,C=void 0;"trackChanges"!==v&&(C=o('<div class="fr-btn-grp fr-float-'.concat(i[v].align?i[v].align:"left",'"></div>'))),i.showMoreButtons&&(y=o('<div class="fr-more-toolbar"></div>').data("name","".concat(v,"-").concat(n.id)),"trackChanges"!==v&&"moreRich"!==v||!n.opts.trackChangesEnabled||y.addClass("fr-expanded"));for(var u=0;u<_.buttons.length;u++){void 0!==_.buttonsVisible&&(p=_.buttonsVisible);var g=n.$tb.find('> .fr-command[data-cmd="'+_.buttons[u]+'"], > div.fr-btn-wrap > .fr-command[data-cmd="'+_.buttons[u]+'"]'),w=null;n.node.hasClass(g.next().get(0),"fr-dropdown-menu")&&(w=g.next()),n.node.hasClass(g.next().get(0),"fr-options")&&(g.removeClass("fr-hidden"),g.next().removeClass("fr-hidden"),g=g.parent()),g.removeClass("fr-hidden"),i.showMoreButtons&&p<=E?(y.append(g),w&&y.append(w)):(C.append(g),w&&C.append(w)),E++}if(i.showMoreButtons&&p<E){var S=n.$tb.find('.fr-command[data-cmd="'.concat(v,'"]'));if(0<S.length)S.removeClass("fr-hidden fr-open");else{var T=v,b=t.COMMANDS[T];b&&(b.more_btn=!0,S=o(n.button.build(T,b,!0)),n.button.addButtons(S))}C&&C.append(S)}C&&a.push(C),i.showMoreButtons&&s.push(y)}}n.opts.toolbarBottom?(n.$tb.append(s),n.$tb.find(".fr-newline").remove(),n.$tb.append('<div class="fr-newline"></div>'),n.$tb.append(a)):(n.$tb.append(a),n.$tb.find(".fr-newline").remove(),n.$tb.append('<div class="fr-newline"></div>'),n.$tb.append(s)),n.$tb.removeClass("fr-toolbar-open"),n.$box.removeClass("fr-toolbar-open"),n.events.trigger("codeView.toggle")}h()}function m(e,r){setTimeout((function(){if((!e||e.which!=t.KEYCODE.ESC)&&n.selection.inEditor()&&n.core.hasFocus()&&!n.popups.areVisible()&&"false"!=o(n.selection.blocks()[0]).closest("table").attr("contenteditable")&&(n.opts.toolbarVisibleWithoutSelection||!n.selection.isCollapsed()&&!n.keys.isIME()||r)){if(n.$tb.data("instance",n),!1===n.events.trigger("toolbar.show",[e]))return;n.$tb.show(),n.opts.toolbarContainer||n.position.forSelection(n.$tb),1<n.opts.zIndex?n.$tb.css("z-index",n.opts.zIndex+1):n.$tb.css("z-index",null)}}),0)}function i(e){return(!e||"blur"!==e.type||document.activeElement!==n.el)&&(!(!e||"keydown"!==e.type||!n.keys.ctrlKey(e))||!!n.button.getButtons(".fr-dropdown.fr-active").next().find(n.o_doc.activeElement).length||(n.helpers.isMobile()&&n.opts.toolbarInline&&(n.$tb.find(".fr-expanded").toggleClass("fr-expanded"),n.$tb.find(".fr-open").removeClass("fr-open"),n.$tb.removeClass("fr-toolbar-open"),h()),void(!1!==n.events.trigger("toolbar.hide")&&n.$tb.hide())))}c[t.XS]=l(n.opts.toolbarButtonsXS||n.opts.toolbarButtons||t.TOOLBAR_BUTTONS_XS||t.TOOLBAR_BUTTONS||[]),c[t.SM]=l(n.opts.toolbarButtonsSM||n.opts.toolbarButtons||t.TOOLBAR_BUTTONS_SM||t.TOOLBAR_BUTTONS||[]),c[t.MD]=l(n.opts.toolbarButtonsMD||n.opts.toolbarButtons||t.TOOLBAR_BUTTONS_MD||t.TOOLBAR_BUTTONS||[]),c[t.LG]=l(n.opts.toolbarButtons||t.TOOLBAR_BUTTONS||[]);var v=null;function a(e){clearTimeout(v),e&&e.which===t.KEYCODE.ESC||(v=setTimeout(m,n.opts.typingTimer))}function s(){n.events.on("window.mousedown",i),n.events.on("keydown",i),n.events.on("blur",i),n.events.$on(n.$tb,"transitionend",".fr-more-toolbar",(function(){n.position.forSelection(n.$tb)})),n.helpers.isMobile()||n.events.on("window.mouseup",m),n.helpers.isMobile()?n.helpers.isIOS()||(n.events.on("window.touchend",m),n.browser.mozilla&&setInterval(m,200)):n.events.on("window.keyup",a),n.events.on("keydown",(function(e){e&&e.which===t.KEYCODE.ESC&&n.events.trigger("toolbar.esc")})),n.events.on("keydown",(function(e){if(e.which===t.KEYCODE.ALT)return e.stopPropagation(),!1}),!0),n.events.$on(n.$wp,"scroll.toolbar",m),n.events.on("commands.after",m),n.helpers.isMobile()&&(n.events.$on(n.$doc,"selectionchange",a),n.events.$on(n.$doc,"orientationchange",m))}function _(){n.$tb.html("").removeData().remove(),n.$tb=null,n.$second_tb&&(n.$second_tb.html("").removeData().remove(),n.$second_tb=null)}function y(){n.$box.removeClass("fr-top fr-bottom fr-inline fr-basic"),n.$box.find(".fr-sticky-dummy").remove()}function E(){n.opts.theme&&n.$tb.addClass("".concat(n.opts.theme,"-theme")),1<n.opts.zIndex&&n.$tb.css("z-index",n.opts.zIndex+1),"auto"!==n.opts.direction&&n.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(n.opts.direction)),n.helpers.isMobile()?n.$tb.addClass("fr-mobile"):n.$tb.addClass("fr-desktop"),n.opts.toolbarContainer?(n.opts.toolbarInline&&(s(),i()),n.opts.toolbarBottom?n.$tb.addClass("fr-bottom"):n.$tb.addClass("fr-top")):n.opts.toolbarInline?(n.$sc.append(n.$tb),n.$tb.data("container",n.$sc),n.$tb.addClass("fr-inline"),s(),n.opts.toolbarBottom=!1):(n.opts.toolbarBottom?(n.$box.append(n.$tb),n.$tb.addClass("fr-bottom"),n.$box.addClass("fr-bottom")):(n.opts.toolbarBottom=!1,n.$box.prepend(n.$tb),n.$tb.addClass("fr-top"),n.$box.addClass("fr-top")),n.$tb.addClass("fr-basic"),n.opts.toolbarSticky&&(n.opts.toolbarStickyOffset&&(n.opts.toolbarBottom?n.$tb.css("bottom",n.opts.toolbarStickyOffset):n.$tb.css("top",n.opts.toolbarStickyOffset)),n.position.addSticky(n.$tb))),function(){var e=n.button.buildGroup(d());n.$tb.append(e),h(),n.button.bindCommands(n.$tb)}(),function(){n.events.$on(o(n.o_win),"resize",f),n.events.$on(o(n.o_win),"orientationchange",f),n.opts.toolbarButtons&&-1<JSON.stringify(n.opts.toolbarButtons).indexOf("trackChanges")&&f();var e=n.$tb.find(".fr-more-toolbar[data-name=trackChanges-".concat(n.id,"]")),t=0!==e.length&&e.hasClass("fr-expanded");if(n.opts.trackChangesEnabled&&!t){var r=n.$tb.find(".fr-command.fr-btn[data-cmd=trackChanges");e.addClass("fr-expanded"),r.toggleClass("fr-open"),n.toolbar.enable()}}(),n.accessibility.registerToolbar(n.$tb),n.events.$on(n.$tb,"".concat(n._mousedown," ").concat(n._mouseup),(function(e){var t=e.originalEvent?e.originalEvent.target||e.originalEvent.originalTarget:null;if(t&&"INPUT"!==t.tagName&&!n.edit.isDisabled())return e.stopPropagation(),e.preventDefault(),!1}),!0),n.helpers.isMobile()&&n.events.$on(n.$tb,"click",(function(){n.popups.areVisible().length||n.id!==n.shared.selected_editor&&n.shared.selected_editor||n.$el.focus()})),n.events.$on(n.$tb,"transitionend",".fr-more-toolbar",(function(){n.$box.hasClass("fr-fullscreen")&&(n.opts.height=n.o_win.innerHeight-(n.opts.toolbarInline?0:n.$tb.outerHeight()+(n.$second_tb?n.$second_tb.outerHeight():0)),n.size.refresh())}))}var C=!1;return{_init:function(){if(n.$sc=o(n.opts.scrollableContainer).first(),!n.$wp)return!1;n.opts.toolbarInline||n.opts.toolbarBottom||(n.$second_tb=o(n.doc.createElement("div")).attr("class","fr-second-toolbar"),n.$box.append(n.$second_tb),(!1!==n.ul||n.opts.attribution)&&n.$second_tb.prepend(t.POWERED_BY)),n.opts.toolbarContainer?(n.shared.$tb?(n.$tb=n.shared.$tb,n.opts.toolbarInline&&s()):(n.shared.$tb=o(n.doc.createElement("DIV")),n.shared.$tb.addClass("fr-toolbar"),n.$tb=n.shared.$tb,o(n.opts.toolbarContainer).append(n.$tb),E(),n.$tb.data("instance",n)),n.opts.toolbarInline?n.$box.addClass("fr-inline"):n.$box.addClass("fr-basic"),n.events.on("focus",(function(){n.$tb.data("instance",n)}),!0),n.opts.toolbarInline=!1):n.opts.toolbarInline?(n.$box.addClass("fr-inline"),n.shared.$tb?(n.$tb=n.shared.$tb,s()):(n.shared.$tb=o(n.doc.createElement("DIV")),n.shared.$tb.addClass("fr-toolbar"),n.$tb=n.shared.$tb,E())):(n.$box.addClass("fr-basic"),n.$tb=o(n.doc.createElement("DIV")),n.$tb.addClass("fr-toolbar"),E(),n.$tb.data("instance",n)),n.events.on("destroy",y,!0),n.events.on(n.opts.toolbarInline||n.opts.toolbarContainer?"shared.destroy":"destroy",_,!0),n.events.on("edit.on",(function(){n.$tb.removeClass("fr-disabled").removeAttr("aria-disabled")})),n.events.on("edit.off",(function(){n.$tb.addClass("fr-disabled").attr("aria-disabled",!0)})),n.events.on("shortcut",(function(e,t,r){var o;if(t&&!r?o=n.$tb.find('.fr-command[data-cmd="'.concat(t,'"]')):t&&r&&(o=n.$tb.find('.fr-command[data-cmd="'.concat(t,'"][data-param1="').concat(r,'"]'))),o.length&&(e.preventDefault(),e.stopPropagation(),o.parents(".fr-toolbar").data("instance",n),"keydown"===e.type))return n.button.exec(o),!1}))},hide:i,show:function(){if(!1===n.events.trigger("toolbar.show"))return!1;n.$tb.show()},showInline:m,disable:function(){!C&&n.$tb&&(n.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled",!0),C=!0)},enable:function(){C&&n.$tb&&(n.$tb.find(".fr-btn-grp > .fr-command, .fr-more-toolbar > .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled",!1),C=!1),n.button.bulkRefresh()},setMoreToolbarsHeight:h}};var n=["scroll","wheel","touchmove","touchstart","touchend"],r=["webkit","moz","ms","o"],o=["transitionend"],c=document.createElement("div").style,i=["Webkit","Moz","ms","O","css","style"],s={visibility:"hidden",display:"block"},l=["focus","blur","click"],a={},d=function(e,t){return{altKey:e.altKey,bubbles:e.bubbles,cancelable:e.cancelable,changedTouches:e.changedTouches,ctrlKey:e.ctrlKey,detail:e.detail,eventPhase:e.eventPhase,metaKey:e.metaKey,pageX:e.pageX,pageY:e.pageY,shiftKey:e.shiftKey,view:e.view,char:e.char,key:e.key,keyCode:e.keyCode,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,offsetX:e.offsetX,offsetY:e.offsetY,pointerId:e.pointerId,pointerType:e.pointerType,screenX:e.screenX,screenY:e.screenY,targetTouches:e.targetTouches,toElement:e.toElement,touches:e.touches,type:e.type,which:e.which,target:e.target,currentTarget:t,originalEvent:e,stopPropagation:function(){e.stopPropagation()},stopImmediatePropagation:function(){e.stopImmediatePropagation()},preventDefault:function(){-1===n.indexOf(e.type)&&e.preventDefault()}}},p=function(e){return e.ownerDocument&&e.ownerDocument.body&&e.ownerDocument.body.contains(e)||"#document"===e.nodeName||"HTML"===e.nodeName||e===window},h=function(e,t){return function(n){var r=n.target;if(t)for(t=g(t);r&&r!==this;)Element.prototype.matches.call(r,g(t))&&e.call(r,d(n,r)),r=r.parentNode;else p(r)&&e.call(r,d(n,r))}},u=function(e,t){return new v(e,t)},g=function(e){return e&&"string"==typeof e?e.replace(/^\s*>/g,":scope >").replace(/,\s*>/g,", :scope >"):e},f=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},m=u;u.fn=u.prototype={constructor:u,length:0,contains:function(e){if(!e)return!1;if(Array.isArray(e)){for(var t=0;t<e.length;t++)if(this.contains(e[t])&&this!=e[t])return!0;return!1}for(var n=0;n<this.length;n++)for(var r=e;r;){if(r==this[n]||r[0]&&r[0].isEqualNode(this[n]))return!0;r=r.parentNode}return!1},findVisible:function(e){for(var t=this.find(e),n=t.length-1;0<=n;n--)m(t[n]).isVisible()||t.splice(n,1);return t},formatParams:function(e){return"".concat(Object.keys(e).map((function(t){return"".concat(t,"=").concat(encodeURIComponent(e[t]))})).join("&"))||""},ajax:function(e){var t=new XMLHttpRequest,n=this.formatParams(e.data);for(var r in"GET"===e.method.toUpperCase()&&(e.url=n?e.url+"?"+n:e.url),t.open(e.method,e.url,!0),e.withCredentials&&(t.withCredentials=!0),e.crossDomain&&t.setRequestHeader("Access-Control-Allow-Origin","*"),e.headers)Object.prototype.hasOwnProperty.call(e.headers,r)&&t.setRequestHeader(r,e.headers[r]);Object.prototype.hasOwnProperty.call(e.headers,"Content-Type")||("json"===e.dataType?t.setRequestHeader("Content-Type","application/json"):t.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8")),t.onload=function(){if(200==t.status){var n=t.responseText;"json"===e.dataType&&(n=JSON.parse(n)),e.done(n,t.status,t)}else e.fail(t)},t.send(n)},prevAll:function(){var e=m();if(!this[0])return e;for(var t=this[0];t&&t.previousSibling;)t=t.previousSibling,e.push(t);return e},index:function(e){return e?"string"==typeof e?[].indexOf.call(m(e),this[0]):[].indexOf.call(this,e.length?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},isVisible:function(){return!!this[0]&&!!(this[0].offsetWidth||this[0].offsetHeight||this[0].getClientRects().length)},toArray:function(){return[].slice.call(this)},get:function(e){return null==e?[].slice.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=u.merge(this.constructor(),e);return t.prevObject=this,t},wrapAll:function(e){var t;return this[0]&&(f(e)&&(e=e.call(this[0])),t=u(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map((function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e})).append(this)),this},wrapInner:function(e){if("string"==typeof e){for(var t=e.split(" "),n=0;n<t.length&&0===t[n].trim().length;)n++;if(n<t.length&&(m(e).length&&t[n].trim()===m(e)[0].tagName&&(e=document.createElement(t[n].trim())),n++),"string"!=typeof e)for(var r=m(e);n<t.length;n++){t[n]=t[n].trim();var o=t[n].split("=");r.attr(o[0],o[1].replace('"',""))}}for(;this[0].firstChild&&this[0].firstChild!==e&&"string"!=typeof e;)e.appendChild(this[0].firstChild)},wrap:function(e){var t=f(e);return this.each((function(n){m(this).wrapAll(t?e.call(this,n):e)}))},unwrap:function(){return this.parent().each((function(){this.nodeName&&this.nodeName.toLowerCase()===name.toLowerCase()||u(this).replaceWith(this.childNodes)}))},grep:function(e,t,n){for(var r=[],o=0,i=e.length,a=!n;o<i;o++)!t(e[o],o)!==a&&r.push(e[o]);return r},map:function(e){return this.pushStack(u.map(this,(function(t,n){return e.call(t,n,t)})))},slice:function(){return this.pushStack([].slice.apply(this,arguments))},each:function(e){if(this.length)for(var t=0;t<this.length&&!1!==e.call(this[t],t,this[t]);t++);return this},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]]:[])},empty:function(){for(var e=0;e<this.length;e++)this[e].innerHTML=""},contents:function(){for(var e=m(),t=0;t<this.length;t++)for(var n=this[t].childNodes,r=0;r<n.length;r++)e.push(n[r]);return e},attr:function(t,n){if("object"===e(t)){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&null!==t[r]&&this.attr(r,t[r]);return this}if(void 0===n)return 0===this.length||!this[0].getAttribute&&"checked"!==t?void 0:"checked"===t?this[0].checked:"tagName"===t?this[0].tagName:this[0].getAttribute(t);if("checked"===t)for(var o=0;o<this.length;o++)this[o].checked=n;else if("tagName"===t)for(var c=0;c<this.length;c++)this[c].tagName=n;else for(var i=0;i<this.length;i++)this[i].setAttribute(t,n);return this},removeAttr:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute&&this[t].removeAttribute(e);return this},hide:function(){return this.css("display","none"),this},show:function(){return this.css("display","block"),this},focus:function(){return this.length&&this[0].focus(),this},blur:function(){return this.length&&this[0].blur(),this},data:function(t,n){if(void 0!==n){for(var r=0;r<this.length;r++)"object"!==e(this[r]["data-"+t]=n)&&"function"!=typeof n&&this[r].setAttribute&&this[r].setAttribute("data-"+t,n);return this}if(void 0!==n)return this.attr("data-"+t,n);if(0!==this.length)for(var o=0;o<this.length;o++){var c=this[o]["data-"+t];if(null==c&&this[o].getAttribute&&(c=this[o].getAttribute("data-"+t)),void 0!==c&&null!=c)return c}},removeData:function(e){for(var t=0;t<this.length;t++)this[t].removeAttribute&&this[t].removeAttribute("data-"+e),this[t]["data-"+e]=null;return this},getCorrectStyleName:function(e){if(!a[e]){var t;e in c&&(t=e);for(var n=e[0].toUpperCase()+e.slice(1),r=i.length;r--;)(e=i[r]+n)in c&&(t=e);a[e]=t}return a[e]},css:function(e,t){if(void 0!==t){if(0===this.length)return this;("string"!=typeof t||""===t.trim()||isNaN(t))&&"number"!=typeof t||!/(margin)|(padding)|(height)|(width)|(top)|(left)|(right)|(bottom)/gi.test(e)||/(line-height)/gi.test(e)||(t+="px");for(var n=0;n<this.length;n++)e=m(this).getCorrectStyleName(e),this[n].style[e]=t;return this}if("string"==typeof e){if(0===this.length)return;var r=this[0].ownerDocument||document,o=r.defaultView||r.parentWindow;return e=m(this).getCorrectStyleName(e),o.getComputedStyle(this[0])[e]}for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&this.css(i,e[i]);return this},toggleClass:function(e,t){if(1<e.split(" ").length){for(var n=e.split(" "),r=0;r<n.length;r++)this.toggleClass(n[r],t);return this}for(var o=0;o<this.length;o++)void 0===t?this[o].classList.contains(e)?this[o].classList.remove(e):this[o].classList.add(e):t?this[o].classList.contains(e)||this[o].classList.add(e):this[o].classList.contains(e)&&this[o].classList.remove(e);return this},addClass:function(e){if(0===e.length)return this;if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)this.addClass(t[n]);return this}for(var r=0;r<this.length;r++)this[r].classList.add(e);return this},removeClass:function(e){if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)t[n]=t[n].trim(),t[n].length&&this.removeClass(t[n]);return this}for(var r=0;r<this.length;r++)e.length&&this[r].classList.remove(e);return this},getClass:function(e){return e.getAttribute&&e.getAttribute("class")||""},stripAndCollapse:function(e){return(e.match(/[^\x20\t\r\n\f]+/g)||[]).join(" ")},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+m(this).stripAndCollapse(m(this).getClass(n))+" ").indexOf(t))return!0;return!1},scrollTop:function(e){if(void 0===e)return 0===this.length?void 0:this[0]===document?document.documentElement.scrollTop:this[0].scrollTop;for(var t=0;t<this.length;t++)this[t]===document?window.scrollTo(document.documentElement.scrollLeft,e):this[t].scrollTop=e},scrollLeft:function(e){if(void 0===e)return 0===this.length?void 0:this[0]===document?document.documentElement.scrollLeft:this[0].scrollLeft;for(var t=0;t<this.length;t++)this[t]===document?window.scrollTo(e,document.documentElement.scrollTop):this[t].scrollLeft=e},on:function(e,t,c){if(1<e.split(" ").length){for(var l=e.split(" "),d=0;d<l.length;d++)if(-1!==o.indexOf(e))for(var i=0;i<r.length;i++)this.on(r[i]+e[0].toUpperCase()+e.slice(1),t,c);else this.on(l[d],t,c);return this}c="function"==typeof t?h(t,null):h(c,t);for(var a=0;a<this.length;a++){var s=m(this[a]);s.data("events")||s.data("events",[]),s.data("events").push([e,c]);var f=e.split(".");f=f[0],0<=n.indexOf(f)?s.get(0).addEventListener(f,c,{passive:!0}):s.get(0).addEventListener(f,c)}},off:function(e){if(1<e.split(" ").length){for(var t=e.split(" "),n=0;n<t.length;n++)this.off(t[n]);return this}for(var r=0;r<this.length;r++){var o=m(this[r]);if(o.data("events")){var i=e.split(".");i=i[0];for(var a=o.data("events")||[],s=a.length-1;0<=s;s--){var c=a[s];c[0]==e&&(o.get(0).removeEventListener(i,c[1]),a.splice(s,1))}}}},trigger:function(e){for(var t=0;t<this.length;t++){var n=void 0;"function"==typeof Event?n=0<=e.search(/^mouse/g)?new MouseEvent(e,{view:window,cancelable:!0,bubbles:!0}):new Event(e):0<=e.search(/^mouse/g)?(n=document.createEvent("MouseEvents")).initMouseEvent(e,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null):(n=document.createEvent("Event")).initEvent(e,!0,!0),0<=l.indexOf(e)&&"function"==typeof this[t][e]?this[t][e]():this[t].dispatchEvent(n)}},triggerHandler:function(){},val:function(e){if(void 0===e)return this[0].value;for(var t=0;t<this.length;t++)this[t].value=e;return this},siblings:function(){return m(this[0]).parent().children().not(this)},find:function(t){var n=m();if("string"!=typeof t){for(var r=0;r<t.length;r++)for(var o=0;o<this.length;o++)if(this[o]!==t[r]&&m(this[o]).contains(t[r])){n.push(t[r]);break}return n}var c=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":e(HTMLElement))?t instanceof HTMLElement:t&&"object"===e(t)&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName};t=g(t);for(var i=0;i<this.length;i++)if(this[i].querySelectorAll){var a=[];if(t&&"string"==typeof t)try{a=this[i].querySelectorAll(t)}catch(e){a=this[i].children}else c(t)&&(a=[t]);for(var s=0;s<a.length;s++)n.push(a[s])}return n},children:function(){for(var e=m(),t=0;t<this.length;t++)for(var n=this[t].children,r=0;r<n.length;r++)e.push(n[r]);return e},not:function(e){if("string"==typeof e)for(var t=this.length-1;0<=t;t--)Element.prototype.matches.call(this[t],e)&&this.splice(t,1);else if(e instanceof u){for(var n=this.length-1;0<=n;n--)for(var r=0;r<e.length;r++)if(this[n]===e[r]){this.splice(n,1);break}}else for(var o=this.length-1;0<=o;o--)this[o]===e[0]&&this.splice(o,1);return this},add:function(e){for(var t=0;t<e.length;t++)this.push(e[t]);return this},closest:function(e){for(var t=0;t<this.length;t++){var n=Element.prototype.closest.call(this[t],e);if(n)return m(n)}return m()},html:function(e){if(void 0===e)return 0===this.length?void 0:this[0].innerHTML;if("string"==typeof e)for(var t=0;t<this.length;t++){this[t].innerHTML=e;for(var n=this[t].children,r=this[t].ownerDocument||document,o=0;o<n.length;o++)if("SCRIPT"===n[o].tagName){var i=r.createElement("script");i.innerHTML=n[o].innerHTML,n[o].hasAttribute("async")&&i.setAttribute("async",""),i.src=n[o].src,n[o].hasAttribute("defer")&&i.setAttribute("defer",""),r.head.appendChild(i).parentNode.removeChild(i)}}else{this[0].innerHTML="",this.append(e[0]);var a=this[0].ownerDocument||document;if("SCRIPT"===e[0].tagName){var s=a.createElement("script");s.innerHTML=e[0].innerHTML,a.head.appendChild(s).parentNode.removeChild(s)}}return this},text:function(e){if(!e)return this.length?this[0].textContent:"";for(var t=0;t<this.length;t++)this[t].textContent=e},after:function(e){if(e)if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t];if(n.nodeType!=Node.ELEMENT_NODE){var r=n.ownerDocument.createElement("SPAN");m(n).after(r),m(r).after(e).remove()}else n.insertAdjacentHTML("afterend",e)}else{var o=this[0];if(o.nextSibling)if(e instanceof u)for(var i=0;i<e.length;i++)o.nextSibling.parentNode.insertBefore(e[i],o.nextSibling);else o.nextSibling.parentNode.insertBefore(e,o.nextSibling);else m(o.parentNode).append(e)}return this},clone:function(e){for(var t=m(),n=0;n<this.length;n++)t.push(this[n].cloneNode(e));return t},replaceWith:function(e){if("string"==typeof e)for(var t=0;t<this.length;t++)this[t].parentNode&&(this[t].outerHTML=e);else if(e.length)for(var n=0;n<this.length;n++)this.replaceWith(e[n]);else this.after(e).remove()},insertBefore:function(e){return m(e).before(this[0]),this},before:function(e){if(e instanceof u){for(var t=0;t<e.length;t++)this.before(e[t]);return this}if(e)if("string"==typeof e)for(var n=0;n<this.length;n++){var r=this[n];if(r.nodeType!=Node.ELEMENT_NODE){var o=r.ownerDocument.createElement("SPAN");m(r).before(o),m(o).before(e).remove()}else r.parentNode&&r.insertAdjacentHTML("beforebegin",e)}else{var i=this[0];if(i.parentNode)if(e instanceof u)for(var a=0;a<e.length;a++)i.parentNode.insertBefore(e[a],i);else i.parentNode.insertBefore(e,i)}return this},append:function(e){if(0==this.length)return this;if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t],r=n.ownerDocument.createElement("SPAN");m(n).append(r),m(r).after(e).remove()}else if(e instanceof u||Array.isArray(e))for(var o=0;o<e.length;o++)this.append(e[o]);else"function"!=typeof e&&this[0].appendChild(e);return this},prepend:function(e){if(0==this.length)return this;if("string"==typeof e)for(var t=0;t<this.length;t++){var n=this[t],r=n.ownerDocument.createElement("SPAN");m(n).prepend(r),m(r).before(e).remove()}else if(e instanceof u)for(var o=0;o<e.length;o++)this.prepend(e[o]);else{var i=this[0];i.firstChild?i.firstChild?i.insertBefore(e,i.firstChild):i.appendChild(e):m(i).append(e)}return this},remove:function(){for(var e=0;e<this.length;e++)this[e].parentNode&&this[e].parentNode.removeChild(this[e]);return this},prev:function(){return this.length&&this[0].previousElementSibling?m(this[0].previousElementSibling):m()},next:function(){return this.length&&this[0].nextElementSibling?m(this[0].nextElementSibling):m()},nextAllVisible:function(){return this.next()},prevAllVisible:function(){return this.prev()},outerHeight:function(e){if(0!==this.length){var t=this[0];if(t===t.window)return t.innerHeight;var n={},r=this.isVisible();if(!r)for(var o in s)n[o]=t.style[o],t.style[o]=s[o];var i=t.offsetHeight;if(e&&(i+=parseInt(m(t).css("marginTop"))+parseInt(m(t).css("marginBottom"))),!r)for(var a in s)t.style[a]=n[a];return i}},outerWidth:function(e){if(0!==this.length){var t=this[0];if(t===t.window)return t.outerWidth;var n={},r=this.isVisible();if(!r)for(var o in s)n[o]=t.style[o],t.style[o]=s[o];var i=t.offsetWidth;if(e&&(i+=parseInt(m(t).css("marginLeft"))+parseInt(m(t).css("marginRight"))),!r)for(var a in s)t.style[a]=n[a];return i}},width:function(e){if(void 0===e){if(this[0]instanceof HTMLDocument)return this[0].body.offsetWidth;if(this[0])return this[0].offsetWidth}else this[0].style.width=e+"px"},height:function(e){var t=this[0];if(void 0===e){if(t instanceof HTMLDocument){var n=t.documentElement;return Math.max(t.body.scrollHeight,n.scrollHeight,t.body.offsetHeight,n.offsetHeight,n.clientHeight)}return t.offsetHeight}t.style.height=e+"px"},is:function(e){return 0!==this.length&&("string"==typeof e&&this[0].matches?this[0].matches(e):e instanceof u?this[0]==e[0]:this[0]==e)},parent:function(){return 0===this.length?m():m(this[0].parentNode)},_matches:function(e,t){var n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector;return e&&!t?n:n.call(e,t)},parents:function(e){for(var t=m(),n=0;n<this.length;n++)for(var r=this[n].parentNode;r&&r!=document&&this._matches(r);)e?this._matches(r,e)&&t.push(r):t.push(r),r=r.parentNode;return t},parentsUntil:function(e,t){var n=m();e instanceof u&&0<e.length&&(e=e[0]);for(var r=0;r<this.length;r++)for(var o=this[r].parentNode;o&&o!=document&&o!=e&&this[r]!=e&&("string"!=typeof e||!Element.prototype.matches.call(o,e));)t?Element.prototype.matches.call(o,t)&&n.push(o):n.push(o),o=o.parentNode;return n},insertAfter:function(e){var t=e.parent()[0];t&&t.insertBefore(this[0],e[0].nextElementSibling)},filter:function(e){var t=m();if("function"==typeof e)for(var n=0;n<this.length;n++)e.call(this[n],this[n])&&t.push(this[n]);else if("string"==typeof e)for(var r=0;r<this.length;r++)this[r].matches(e)&&t.push(this[r]);return t},offset:function(){if(0!==this.length){var e=this[0].getBoundingClientRect(),t=this[0].ownerDocument.defaultView;return{top:e.top+t.pageYOffset,left:e.left+t.pageXOffset}}},position:function(){return{left:this[0].offsetLeft,top:this[0].offsetTop}},push:[].push,splice:[].splice},u.extend=function(e){e=e||{};for(var t=1;t<arguments.length;t++)if(arguments[t])for(var n in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],n)&&(e[n]=arguments[t][n]);return e},u.merge=function(e,t){for(var n=+t.length,r=0,o=e.length;r<n;r++)e[o++]=t[r];return e.length=o,e},u.map=function(e,t,n){var r,o,i=0,a=[];if(Array.isArray(e))for(r=e.length;i<r;i++)null!=(o=t(e[i],i,n))&&a.push(o);else for(i in e)null!=(o=t(e[i],i,n))&&a.push(o);return[].concat.apply([],a)};var v=function(e,t){if(!e)return this;if("string"==typeof e&&"<"===e[0]){var n=document.createElement("DIV");return n.innerHTML=e,m(n.firstElementChild)}if(t=t instanceof u?t[0]:t,"string"!=typeof e)return e instanceof u?e:(this[0]=e,this.length=1,this);e=g(e);for(var r=(t||document).querySelectorAll(e),o=0;o<r.length;o++)this[o]=r[o];return this.length=r.length,this};v.prototype=u.prototype;var b=t;function _(){this.doc=this.$el.get(0).ownerDocument,this.win="defaultView"in this.doc?this.doc.defaultView:this.doc.parentWindow,this.$doc=u(this.doc),this.$win=u(this.win),this.opts.pluginsEnabled||(this.opts.pluginsEnabled=Object.keys(b.PLUGINS)),this.opts.initOnClick?(this.load(b.MODULES),this.$el.on("touchstart.init",(function(){u(this).data("touched",!0)})),this.$el.on("touchmove.init",(function(){u(this).removeData("touched")})),this.$el.on("mousedown.init touchend.init dragenter.init focus.init",function(e){if("touchend"===e.type&&!this.$el.data("touched"))return!0;if(1===e.which||!e.which){this.$el.off("mousedown.init touchstart.init touchmove.init touchend.init dragenter.init focus.init"),this.load(b.MODULES),this.load(b.PLUGINS);var t=e.originalEvent&&e.originalEvent.originalTarget;if(t&&"IMG"===t.tagName&&u(t).trigger("mousedown"),void 0===this.ul&&this.destroy(),"touchend"===e.type&&this.image&&e.originalEvent&&e.originalEvent.target&&u(e.originalEvent.target).is("img")){var n=this;setTimeout((function(){n.image.edit(u(e.originalEvent.target))}),100)}this.ready=!0,this.events.trigger("initialized")}}.bind(this)),this.events.trigger("initializationDelayed")):(this.load(b.MODULES),this.load(b.PLUGINS),u(this.o_win).scrollTop(this.c_scroll),void 0===this.ul&&this.destroy(),this.ready=!0,this.events.trigger("initialized"))}return b.Bootstrap=function(t,n,r){this.id=++b.ID,this.$=u;var o={};"function"==typeof n&&(r=n,n={}),r&&(n.events||(n.events={}),n.events.initialized=r),n&&n.documentReady&&(o.toolbarButtons=[["fullscreen","undo","redo","getPDF","print"],["bold","italic","underline","textColor","backgroundColor","clearFormatting"],["alignLeft","alignCenter","alignRight","alignJustify"],["formatOL","formatUL","indent","outdent"],["paragraphFormat"],["fontFamily"],["fontSize"],["insertLink","insertImage","quote"]],o.paragraphFormatSelection=!0,o.fontFamilySelection=!0,o.fontSizeSelection=!0,o.placeholderText="",o.quickInsertEnabled=!1,o.charCounterCount=!1),this.opts=Object.assign({},Object.assign({},b.DEFAULTS,o,"object"===e(n)&&n));var c=JSON.stringify(this.opts);b.OPTS_MAPPING[c]=b.OPTS_MAPPING[c]||this.id,this.sid=b.OPTS_MAPPING[c],b.SHARED[this.sid]=b.SHARED[this.sid]||{},this.shared=b.SHARED[this.sid],this.shared.count=(this.shared.count||0)+1,this.$oel=u(t),this.$oel.data("froala.editor",this),this.o_doc=t.ownerDocument,this.o_win="defaultView"in this.o_doc?this.o_doc.defaultView:this.o_doc.parentWindow,this.c_scroll=u(this.o_win).scrollTop(),this._init()},b.Bootstrap.prototype._init=function(){var e=this.$oel.get(0).tagName;this.$oel.closest("label").length;var t=function(){"TEXTAREA"!==e&&(this._original_html=this._original_html||this.$oel.html()),this.$box=this.$box||this.$oel,this.opts.fullPage&&(this.opts.iframe=!0),this.opts.iframe?(this.$iframe=u('<iframe src="about:blank" frameBorder="0">'),this.$wp=u("<div></div>"),this.$box.html(this.$wp),this.$wp.append(this.$iframe),this.$iframe.get(0).contentWindow.document.open(),this.$iframe.get(0).contentWindow.document.write("<!DOCTYPE html>"),this.$iframe.get(0).contentWindow.document.write("<html><head></head><body></body></html>"),this.$iframe.get(0).contentWindow.document.close(),this.iframe_document=this.$iframe.get(0).contentWindow.document,this.$el=u(this.iframe_document.querySelector("body")),this.el=this.$el.get(0),this.$head=u(this.iframe_document.querySelector("head")),this.$html=u(this.iframe_document.querySelector("html"))):(this.$el=u(this.o_doc.createElement("DIV")),this.el=this.$el.get(0),this.$wp=u(this.o_doc.createElement("DIV")).append(this.$el),this.$box.html(this.$wp)),setTimeout(_.bind(this),0)}.bind(this),n=function(){this.$box=u("<div>"),this.$oel.before(this.$box).hide(),this._original_html=this.$oel.val();var e=this;this.$oel.parents("form").on("submit.".concat(this.id),(function(){e.events.trigger("form.submit")})),this.$oel.parents("form").on("reset.".concat(this.id),(function(){e.events.trigger("form.reset")})),t()}.bind(this),r=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.$el.attr("contenteditable",!0).css("outline","none").css("display","inline-block"),this.opts.multiLine=!1,this.opts.toolbarInline=!1,setTimeout(_.bind(this),0)}.bind(this),o=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.opts.toolbarInline=!1,setTimeout(_.bind(this),0)}.bind(this),i=function(){this.$el=this.$oel,this.el=this.$el.get(0),this.opts.toolbarInline=!1,this.$oel.on("click.popup",(function(e){e.preventDefault()})),setTimeout(_.bind(this),0)}.bind(this);this.opts.editInPopup?i():"TEXTAREA"===e?n():"A"===e?r():"IMG"===e?o():"BUTTON"===e||"INPUT"===e?(this.opts.editInPopup=!0,this.opts.toolbarInline=!1,i()):t()},b.Bootstrap.prototype.load=function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)){if(this[t])continue;if(b.PLUGINS[t]&&this.opts.pluginsEnabled.indexOf(t)<0)continue;if(this[t]=new e[t](this),this[t]._init&&(this[t]._init(),this.opts.initOnClick&&"core"===t))return!1}},b.Bootstrap.prototype.destroy=function(){this.destrying=!0,this.shared.count--,this.events&&this.events.$off();var e=this.html&&this.html.get();if(this.opts.iframe&&(this.events.disableBlur(),this.win.focus(),this.events.enableBlur()),this.events&&(this.events.trigger("destroy",[],!0),this.events.trigger("shared.destroy",[],!0)),0===this.shared.count){for(var t in this.shared)Object.prototype.hasOwnProperty.call(this.shared,t)&&(this.shared[t]=null,b.SHARED[this.sid][t]=null);delete b.SHARED[this.sid]}this.$oel.parents("form").off(".".concat(this.id)),this.$oel.off("click.popup"),this.$oel.removeData("froala.editor"),this.$oel.off("froalaEditor"),this.core&&this.core.destroy(e),b.INSTANCES.splice(b.INSTANCES.indexOf(this),1)},t}()},,function(e,t,n){"use strict";n.r(t),n.d(t,"State",(function(){return c})),n.d(t,"Getter",(function(){return l})),n.d(t,"Action",(function(){return d})),n.d(t,"Mutation",(function(){return h})),n.d(t,"namespace",(function(){return f}));var r=n(27),o=n(103),c=m("computed",o.e),l=m("computed",o.c),d=m("methods",o.b),h=m("methods",o.d);function f(e,t){function n(t){return function(a,b){if("string"==typeof b){var n=b,r=a;return t(n,{namespace:e})(r,n)}var o=a,c=function(a,b){var e={};return[a,b].forEach((function(t){Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e}(b||{},{namespace:e});return t(o,c)}}return t?(console.warn("[vuex-class] passing the 2nd argument to `namespace` function is deprecated. pass only namespace string instead."),n(t)):{State:n(c),Getter:n(l),Mutation:n(h),Action:n(d)}}function m(e,t){function n(map,n){return Object(r.createDecorator)((function(r,o){r[e]||(r[e]={});var c,l=((c={})[o]=map,c);r[e][o]=void 0!==n?t(n,l)[o]:t(l)[o]}))}return function(a,b){if("string"==typeof b){var e=b,t=a;return n(e,void 0)(t,e)}return n(a,function(e){var t=e&&e.namespace;if("string"!=typeof t)return;if("/"!==t[t.length-1])return t+"/";return t}(b))}}},,,,function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return c}));function r(header,e=Date.now()){const t=parseInt(`${header}`,10);if(!isNaN(t))return 1e3*t;const n=Date.parse(`${header}`);return isNaN(n)?6e4:n-e}function o(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}function c(e,{statusCode:t,headers:n},o=Date.now()){const c={...e},l=n&&n["x-sentry-rate-limits"],d=n&&n["retry-after"];if(l)for(const e of l.trim().split(",")){const[t,n]=e.split(":",2),r=parseInt(t,10),l=1e3*(isNaN(r)?60:r);if(n)for(const e of n.split(";"))c[e]=o+l;else c.all=o+l}else d?c.all=o+r(d,o):429===t&&(c.all=o+6e4);return c}},function(e,t,n){"use strict";function r(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(31),o=n(114),c=n(44);class l{static __initStatic(){this.id="ExtraErrorData"}__init(){this.name=l.id}constructor(e){l.prototype.__init.call(this),this._options={depth:3,...e}}setupOnce(e,t){e(((e,n)=>{const r=t().getIntegration(l);return r?r.enhanceEventWithErrorData(e,n):e}))}enhanceEventWithErrorData(e,t={}){if(!t.originalException||!Object(r.d)(t.originalException))return e;const n=t.originalException.name||t.originalException.constructor.name,l=this._extractErrorData(t.originalException);if(l){const t={...e.contexts},d=Object(o.a)(l,this._options.depth);return Object(r.i)(d)&&(Object(c.a)(d,"__sentry_skip_normalization__",!0),t[n]=d),{...e,contexts:t}}return e}_extractErrorData(e){try{const t=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],n={};for(const o of Object.keys(e)){if(-1!==t.indexOf(o))continue;const c=e[o];n[o]=Object(r.d)(c)?c.toString():c}if("function"==typeof e.toJSON){const t=e.toJSON();for(const e of Object.keys(t)){const o=t[e];n[e]=Object(r.d)(o)?o.toString():o}}return n}catch(e){}return null}}l.__initStatic()},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=n(43),o=n(326);const c=r.a;class l{static __initStatic(){this.id="ReportingObserver"}__init(){this.name=l.id}constructor(e={types:["crash","deprecation","intervention"]}){this._options=e,l.prototype.__init.call(this)}setupOnce(e,t){if(!Object(o.d)())return;this._getCurrentHub=t;new c.ReportingObserver(this.handler.bind(this),{buffered:!0,types:this._options.types}).observe()}handler(e){const t=this._getCurrentHub&&this._getCurrentHub();if(t&&t.getIntegration(l))for(const n of e)t.withScope((e=>{e.setExtra("url",n.url);const label=`ReportingObserver [${n.type}]`;let details="No details available";if(n.body){const t={};for(const e in n.body)t[e]=n.body[e];if(e.setExtra("body",t),"crash"===n.type){const body=n.body;details=[body.crashId||"",body.reason||""].join(" ").trim()||details}else{details=n.body.message||details}}t.captureMessage(`${label}: ${details}`)}))}}l.__initStatic()},function(e,t,n){"use strict";n.d(t,"a",(function(){return T}));var r=n(384),o=n(488),c=n(220),l=n(43),d=n(116);const h=["activate","mount","update"];var f=n(16);const m=/(?:^|[-_])(\w)/g,v="<Anonymous>",_=(e,t)=>{if(!e)return v;if(e.$root===e)return"<Root>";if(!e.$options)return v;const n=e.$options;let r=n.name||n._componentTag;const o=n.__file;if(!r&&o){const e=o.match(/([^/\\]+)\.vue$/);e&&(r=e[1])}return(r?`<${c=r,c.replace(m,(e=>e.toUpperCase())).replace(/[-_]/g,"")}>`:v)+(o&&!1!==t?` at ${o}`:"");var c},y=(e,t)=>{const{errorHandler:n,warnHandler:r,silent:o}=e.config;e.config.errorHandler=(c,l,d)=>{const h=_(l,!1),m=l?(e=>{if(e&&(e._isVue||e.__isVue)&&e.$parent){const t=[];let n=0;for(;e;){if(t.length>0){const r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return`\n\nfound in\n\n${t.map(((e,i)=>{return`${(0===i?"---\x3e ":(t=" ",n=5+2*i,t.repeat?t.repeat(n):t))+(Array.isArray(e)?`${_(e[0])}... (${e[1]} recursive calls)`:_(e))}`;var t,n})).join("\n")}`}return`\n\n(found in ${_(e)})`})(l):"",v={componentName:h,lifecycleHook:d,trace:m};if(t.attachProps&&l&&(l.$options&&l.$options.propsData?v.propsData=l.$options.propsData:l.$props&&(v.propsData=l.$props)),setTimeout((()=>{Object(f.c)().withScope((e=>{e.setContext("vue",v),Object(f.c)().captureException(c)}))})),"function"==typeof n&&n.call(e,c,l,d),t.logErrors){const e="undefined"!=typeof console,t=`Error in ${d}: "${c&&c.toString()}"`;r?r.call(null,t,l,m):e&&!o&&console.error(`[Vue warn]: ${t}${m}`)}}};var time=n(142);const E={activate:["activated","deactivated"],create:["beforeCreate","created"],destroy:["beforeDestroy","destroyed"],mount:["beforeMount","mounted"],update:["beforeUpdate","updated"]};function C(){const e=Object(f.c)().getScope();return e&&e.getTransaction()}const w=e=>{const t=(e.hooks||[]).concat(h).filter(((e,t,n)=>n.indexOf(e)===t)),n={};for(const r of t){const t=E[r];if(t)for(const o of t)n[o]=function(){const n=this.$root===this;if(n){const e=C();e&&(this.$_sentryRootSpan=this.$_sentryRootSpan||e.startChild({description:"Application Render",op:"ui.vue.render"}))}const c=_(this,!1),l=Array.isArray(e.trackComponents)?e.trackComponents.indexOf(c)>-1:e.trackComponents;var d,h,f;if(n||l)if(this.$_sentrySpans=this.$_sentrySpans||{},o==t[0]){const e=this.$root&&this.$root.$_sentryRootSpan||C();if(e){const t=this.$_sentrySpans[r];t&&!t.endTimestamp&&t.finish(),this.$_sentrySpans[r]=e.startChild({description:`Vue <${c}>`,op:`ui.vue.${r}`})}}else{const span=this.$_sentrySpans[r];if(!span)return;span.finish(),d=this,h=Object(time.b)(),f=e.timeout,d.$_sentryRootSpanTimer&&clearTimeout(d.$_sentryRootSpanTimer),d.$_sentryRootSpanTimer=setTimeout((()=>{d.$root&&d.$root.$_sentryRootSpan&&(d.$root.$_sentryRootSpan.finish(h),d.$root.$_sentryRootSpan=void 0)}),f)}}}return n},S={Vue:l.a.Vue,attachProps:!0,logErrors:!0,hooks:h,timeout:2e3,trackComponents:!1,_metadata:{sdk:{name:"sentry.javascript.vue",packages:[{name:"npm:@sentry/vue",version:r.a}],version:r.a}}};function T(e={}){const t={...S,...e};if(Object(o.init)(t),t.Vue||t.app)if(t.app){Object(d.c)(t.app).forEach((e=>A(e,t)))}else t.Vue&&A(t.Vue,t);else console.warn("[@sentry/vue]: Misconfigured SDK. Vue specific errors will not be captured.\nUpdate your `Sentry.init` call with an appropriate config option:\n`app` (Application Instance - Vue 3) or `Vue` (Vue Constructor - Vue 2).")}const A=(e,t)=>{const n=e;!0===(n._instance&&n._instance.isMounted)&&console.warn("[@sentry/vue]: Misconfigured SDK. Vue app is already mounted. Make sure to call `app.mount()` after `Sentry.init()`."),y(e,t),Object(c.a)(t)&&e.mixin(w({...t,...t.tracingOptions}))}},function(e,t,n){"use strict";function r(e,t){let n=0;for(let i=e.length-1;i>=0;i--){const t=e[i];"."===t?e.splice(i,1):".."===t?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}n.d(t,"a",(function(){return h}));const o=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function c(e){const t=o.exec(e);return t?t.slice(1):[]}function l(...e){let t="",n=!1;for(let i=e.length-1;i>=-1&&!n;i--){const path=i>=0?e[i]:"/";path&&(t=`${path}/${t}`,n="/"===path.charAt(0))}return t=r(t.split("/").filter((p=>!!p)),!n).join("/"),(n?"/":"")+t||"."}function d(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}class h{static __initStatic(){this.id="RewriteFrames"}__init(){this.name=h.id}__init2(){this._prefix="app:///"}constructor(e={}){h.prototype.__init.call(this),h.prototype.__init2.call(this),h.prototype.__init3.call(this),e.root&&(this._root=e.root),e.prefix&&(this._prefix=e.prefix),e.iteratee&&(this._iteratee=e.iteratee)}setupOnce(e,t){e((e=>{const n=t().getIntegration(h);return n?n.process(e):e}))}process(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=this._processExceptionsEvent(t)),t}__init3(){this._iteratee=e=>{if(!e.filename)return e;const t=/^[a-zA-Z]:\\/.test(e.filename)||e.filename.includes("\\")&&!e.filename.includes("/"),n=/^\//.test(e.filename);if(t||n){const n=t?e.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):e.filename,base=this._root?function(e,t){e=l(e).slice(1),t=l(t).slice(1);const n=d(e.split("/")),r=d(t.split("/")),o=Math.min(n.length,r.length);let c=o;for(let i=0;i<o;i++)if(n[i]!==r[i]){c=i;break}let h=[];for(let i=c;i<n.length;i++)h.push("..");return h=h.concat(r.slice(c)),h.join("/")}(this._root,n):function(path,e){let t=c(path)[2];return e&&t.slice(-1*e.length)===e&&(t=t.slice(0,t.length-e.length)),t}(n);e.filename=`${this._prefix}${base}`}return e}}_processExceptionsEvent(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map((e=>({...e,...e.stacktrace&&{stacktrace:this._processStacktrace(e.stacktrace)}})))}}}catch(t){return e}}_processStacktrace(e){return{...e,frames:e&&e.frames&&e.frames.map((e=>this._iteratee(e)))}}}h.__initStatic()},function(e,t,n){"use strict";n.d(t,"a",(function(){return f})),n.d(t,"b",(function(){return y}));var r=n(31),o=n(113),object=n(44),c=n(326),l=n(43);const d=Object(l.b)();const h=Object(l.b)(),f="__sentry_xhr_v2__",m={},v={};function _(e){if(!v[e])switch(v[e]=!0,e){case"console":!function(){if(!("console"in h))return;o.a.forEach((function(e){e in h.console&&Object(object.e)(h.console,e,(function(t){return function(...n){E("console",{args:n,level:e}),t&&t.apply(h.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in h))return;const e=E.bind(null,"dom"),t=R(e,!0);h.document.addEventListener("click",t,!1),h.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=h[t]&&h[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(object.e)(n,"addEventListener",(function(t){return function(n,r,o){if("click"===n||"keypress"==n)try{const r=this,c=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},l=c[n]=c[n]||{refCount:0};if(!l.handler){const r=R(e);l.handler=r,t.call(this,n,r,o)}l.refCount++}catch(e){}return t.call(this,n,r,o)}})),Object(object.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,o=n.__sentry_instrumentation_handlers__||{},c=o[t];c&&(c.refCount--,c.refCount<=0&&(e.call(this,t,c.handler,r),c.handler=void 0,delete o[t]),0===Object.keys(o).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))}))}();break;case"xhr":!function(){if(!("XMLHttpRequest"in h))return;const e=XMLHttpRequest.prototype;Object(object.e)(e,"open",(function(e){return function(...t){const n=t[1],o=this[f]={method:Object(r.l)(t[0])?t[0].toUpperCase():t[0],url:t[1],request_headers:{}};Object(r.l)(n)&&"POST"===o.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const c=()=>{const e=this[f];if(e&&4===this.readyState){try{e.status_code=this.status}catch(e){}E("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Object(object.e)(this,"onreadystatechange",(function(e){return function(...t){return c(),e.apply(this,t)}})):this.addEventListener("readystatechange",c),Object(object.e)(this,"setRequestHeader",(function(e){return function(...t){const[header,n]=t,r=this[f];return r&&(r.request_headers[header.toLowerCase()]=n),e.apply(this,t)}})),e.apply(this,t)}})),Object(object.e)(e,"send",(function(e){return function(...t){const n=this[f];return n&&void 0!==t[0]&&(n.body=t[0]),E("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!Object(c.c)())return;Object(object.e)(h,"fetch",(function(e){return function(...t){const{method:n,url:r}=function(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:w(t),method:C(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:w(t),method:C(t,"method")?String(t.method).toUpperCase():"GET"}}(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return E("fetch",{...o}),e.apply(h,t).then((e=>(E("fetch",{...o,endTimestamp:Date.now(),response:e}),e)),(e=>{throw E("fetch",{...o,endTimestamp:Date.now(),error:e}),e}))}}))}();break;case"history":!function(){if(!function(){const e=d.chrome,t=e&&e.app&&e.app.runtime,n="history"in d&&!!d.history.pushState&&!!d.history.replaceState;return!t&&n}())return;const e=h.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=S,t=String(n);S=t,E("history",{from:e,to:t})}return e.apply(this,t)}}h.onpopstate=function(...t){const n=h.location.href,r=S;if(S=n,E("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(object.e)(h.history,"pushState",t),Object(object.e)(h.history,"replaceState",t)}();break;case"error":O=h.onerror,h.onerror=function(e,t,line,n,r){return E("error",{column:n,error:r,line:line,msg:e,url:t}),!(!O||O.__SENTRY_LOADER__)&&O.apply(this,arguments)},h.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":I=h.onunhandledrejection,h.onunhandledrejection=function(e){return E("unhandledrejection",e),!(I&&!I.__SENTRY_LOADER__)||I.apply(this,arguments)},h.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:return}}function y(e,t){m[e]=m[e]||[],m[e].push(t),_(e)}function E(e,data){if(e&&m[e])for(const t of m[e]||[])try{t(data)}catch(e){}}function C(e,t){return!!e&&"object"==typeof e&&!!e[t]}function w(e){return"string"==typeof e?e:e?C(e,"url")?e.url:e.toString?e.toString():"":""}let S;let T,A;function R(e,t=!1){return n=>{if(!n||A===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===T||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(A,n))&&(e({event:n,name:r,global:t}),A=n),clearTimeout(T),T=h.setTimeout((()=>{T=void 0}),1e3)}}let O=null;let I=null}]]);