UNPKG

jssip-emicnet

Version:

jssip wrapper, use for emicnet callcenter

1 lines 709 kB
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define("phonebar",[],e):"object"==typeof exports?exports.phonebar=e():t.phonebar=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var u=e[r]={i:r,l:!1,exports:{}};return t[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var u in t)n.d(r,u,function(e){return t[e]}.bind(null,u));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=312)}([function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(82),u=Function.prototype,o=u.call,i=r&&u.bind.bind(o,o);t.exports=r?i:function(t){return function(){return o.apply(t,arguments)}}},function(t,e,n){var r=n(3),u=n(44).f,o=n(25),i=n(17),s=n(134),l=n(139),a=n(88);t.exports=function(t,e){var n,c,f,h,d,p=t.target,v=t.global,g=t.stat;if(n=v?r:g?r[p]||s(p,{}):(r[p]||{}).prototype)for(c in e){if(h=e[c],f=t.dontCallGetSet?(d=u(n,c))&&d.value:n[c],!a(v?c:p+(g?".":"#")+c,t.forced)&&void 0!==f){if(typeof h==typeof f)continue;l(h,f)}(t.sham||f&&f.sham)&&o(h,"sham",!0),i(n,c,h,t)}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,n(132))},function(t,e,n){"use strict";var r,u,o,i=n(218),s=n(5),l=n(3),a=n(8),c=n(10),f=n(7),h=n(45),d=n(56),p=n(25),v=n(17),g=n(27),y=n(36),m=n(89),_=n(52),b=n(6),A=n(83),C=n(20),E=C.enforce,w=C.get,D=l.Int8Array,S=D&&D.prototype,T=l.Uint8ClampedArray,R=T&&T.prototype,x=D&&m(D),O=S&&m(S),I=Object.prototype,F=l.TypeError,k=b("toStringTag"),N=A("TYPED_ARRAY_TAG"),B=i&&!!_&&"Opera"!==h(l.opera),P=!1,M={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},L={BigInt64Array:8,BigUint64Array:8},U=function(t){var e=m(t);if(c(e)){var n=w(e);return n&&f(n,"TypedArrayConstructor")?n.TypedArrayConstructor:U(e)}},j=function(t){if(!c(t))return!1;var e=h(t);return f(M,e)||f(L,e)};for(r in M)(o=(u=l[r])&&u.prototype)?E(o).TypedArrayConstructor=u:B=!1;for(r in L)(o=(u=l[r])&&u.prototype)&&(E(o).TypedArrayConstructor=u);if((!B||!a(x)||x===Function.prototype)&&(x=function(){throw F("Incorrect invocation")},B))for(r in M)l[r]&&_(l[r],x);if((!B||!O||O===I)&&(O=x.prototype,B))for(r in M)l[r]&&_(l[r].prototype,O);if(B&&m(R)!==O&&_(R,O),s&&!f(O,k))for(r in P=!0,g(O,k,{configurable:!0,get:function(){return c(this)?this[N]:void 0}}),M)l[r]&&p(l[r],N,r);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:P&&N,aTypedArray:function(t){if(j(t))return t;throw F("Target is not a typed array")},aTypedArrayConstructor:function(t){if(a(t)&&(!_||y(x,t)))return t;throw F(d(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,e,n,r){if(s){if(n)for(var u in M){var o=l[u];if(o&&f(o.prototype,t))try{delete o.prototype[t]}catch(n){try{o.prototype[t]=e}catch(t){}}}O[t]&&!n||v(O,t,n?e:B&&S[t]||e,r)}},exportTypedArrayStaticMethod:function(t,e,n){var r,u;if(s){if(_){if(n)for(r in M)if((u=l[r])&&f(u,t))try{delete u[t]}catch(t){}if(x[t]&&!n)return;try{return v(x,t,n?e:B&&x[t]||e)}catch(t){}}for(r in M)!(u=l[r])||u[t]&&!n||v(u,t,e)}},getTypedArrayConstructor:U,isView:function(t){if(!c(t))return!1;var e=h(t);return"DataView"===e||f(M,e)||f(L,e)},isTypedArray:j,TypedArray:x,TypedArrayPrototype:O}},function(t,e,n){var r=n(0);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(3),u=n(62),o=n(7),i=n(83),s=n(63),l=n(173),a=r.Symbol,c=u("wks"),f=l?a.for||a:a&&a.withoutSetter||i;t.exports=function(t){return o(c,t)||(c[t]=s&&o(a,t)?a[t]:f("Symbol."+t)),c[t]}},function(t,e,n){var r=n(1),u=n(15),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(u(t),e)}},function(t,e,n){var r=n(175),u=r.all;t.exports=r.IS_HTMLDDA?function(t){return"function"==typeof t||t===u}:function(t){return"function"==typeof t}},function(t,e,n){var r=n(82),u=Function.prototype.call;t.exports=r?u.bind(u):function(){return u.apply(u,arguments)}},function(t,e,n){var r=n(8),u=n(175),o=u.all;t.exports=u.IS_HTMLDDA?function(t){return"object"==typeof t?null!==t:r(t)||t===o}:function(t){return"object"==typeof t?null!==t:r(t)}},function(t,e,n){var r=n(10),u=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw o(u(t)+" is not an object")}},function(t,e,n){var r=n(45),u=String;t.exports=function(t){if("Symbol"===r(t))throw TypeError("Cannot convert a Symbol value to a string");return u(t)}},function(t,e,n){"use strict";var r=n(160);t.exports={USER_AGENT:"".concat(r.title," ").concat(r.version),SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",DTMF_TRANSPORT:{INFO:"INFO",RFC2833:"RFC2833"},REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO,NOTIFY",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60,CONNECTION_RECOVERY_MAX_INTERVAL:30,CONNECTION_RECOVERY_MIN_INTERVAL:2}},function(t,e,n){var r=n(38);t.exports=function(t){return r(t.length)}},function(t,e,n){var r=n(35),u=Object;t.exports=function(t){return u(r(t))}},function(t,e,n){var r=n(3),u=n(8),o=function(t){return u(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?o(r[t]):r[t]&&r[t][e]}},function(t,e,n){var r=n(8),u=n(19),o=n(183),i=n(134);t.exports=function(t,e,n,s){s||(s={});var l=s.enumerable,a=void 0!==s.name?s.name:e;if(r(n)&&o(n,a,s),s.global)l?t[e]=n:i(e,n);else{try{s.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:u.f(t,e,{value:n,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return t}},function(t,e,n){"use strict";function r(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var u=n(125);t.exports=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e?(this._debug=u.default("".concat("JsSIP",":").concat(e)),this._warn=u.default("".concat("JsSIP",":WARN:").concat(e)),this._error=u.default("".concat("JsSIP",":ERROR:").concat(e))):(this._debug=u.default("JsSIP"),this._warn=u.default("".concat("JsSIP",":WARN")),this._error=u.default("".concat("JsSIP",":ERROR"))),this._debug.log=console.info.bind(console),this._warn.log=console.warn.bind(console),this._error.log=console.error.bind(console)}var e,n,o;return e=t,(n=[{key:"debug",get:function(){return this._debug}},{key:"warn",get:function(){return this._warn}},{key:"error",get:function(){return this._error}}])&&r(e.prototype,n),o&&r(e,o),t}()},function(t,e,n){var r=n(5),u=n(174),o=n(176),i=n(11),s=n(85),l=TypeError,a=Object.defineProperty,c=Object.getOwnPropertyDescriptor;e.f=r?o?function(t,e,n){if(i(t),e=s(e),i(n),"function"==typeof t&&"prototype"===e&&"value"in n&&"writable"in n&&!n.writable){var r=c(t,e);r&&r.writable&&(t[e]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return a(t,e,n)}:a:function(t,e,n){if(i(t),e=s(e),i(n),u)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r,u,o,i=n(181),s=n(3),l=n(10),a=n(25),c=n(7),f=n(133),h=n(115),d=n(86),p=s.TypeError,v=s.WeakMap;if(i||f.state){var g=f.state||(f.state=new v);g.get=g.get,g.has=g.has,g.set=g.set,r=function(t,e){if(g.has(t))throw p("Object already initialized");return e.facade=t,g.set(t,e),e},u=function(t){return g.get(t)||{}},o=function(t){return g.has(t)}}else{var y=h("state");d[y]=!0,r=function(t,e){if(c(t,y))throw p("Object already initialized");return e.facade=t,a(t,y,e),e},u=function(t){return c(t,y)?t[y]:{}},o=function(t){return c(t,y)}}t.exports={set:r,get:u,has:o,enforce:function(t){return o(t)?u(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=u(e)).type!==t)throw p("Incompatible receiver, "+t+" required");return n}}}},function(t,e,n){"use strict";function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function u(t,e){var n;if("undefined"==typeof Symbol||null==t[Symbol.iterator]){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return o(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,u=function(){};return{s:u,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:u}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,l=!1;return{s:function(){n=t[Symbol.iterator]()},n:function(){var t=n.next();return s=t.done,t},e:function(t){l=!0,i=t},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw i}}}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}var i=n(13),s=n(55),l=n(40);e.str_utf8_length=function(t){return unescape(encodeURIComponent(t)).length};var a=e.isFunction=function(t){return void 0!==t&&"[object Function]"===Object.prototype.toString.call(t)};e.isString=function(t){return void 0!==t&&"[object String]"===Object.prototype.toString.call(t)},e.isDecimal=function(t){return!isNaN(t)&&parseFloat(t)===parseInt(t,10)},e.isEmpty=function(t){return null===t||""===t||void 0===t||Array.isArray(t)&&0===t.length||"number"==typeof t&&isNaN(t)},e.hasMethods=function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];for(var u=0,o=n;u<o.length;u++){var i=o[u];if(a(t[i]))return!1}return!0};var c=e.createRandomToken=function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,r="";for(e=0;e<t;e++)r+=(Math.random()*n|0).toString(n);return r};e.newTag=function(){return c(10)},e.newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"===t?e:3&e|8).toString(16)}))},e.hostType=function(t){if(t)return-1!==(t=l.parse(t,"host"))?t.host_type:void 0};var f=e.escapeUser=function(t){return encodeURIComponent(decodeURIComponent(t)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")};e.normalizeTarget=function(t,e){if(t){if(t instanceof s)return t;if("string"==typeof t){var n,r,u,o=t.split("@");switch(o.length){case 1:if(!e)return;n=t,r=e;break;case 2:n=o[0],r=o[1];break;default:n=o.slice(0,o.length-1).join("@"),r=o[o.length-1]}return n=n.replace(/^(sips?|tel):/i,""),/^[-.()]*\+?[0-9\-.()]+$/.test(n)&&(n=n.replace(/[-.()]/g,"")),t="".concat(i.SIP,":").concat(f(n),"@").concat(r),(u=s.parse(t))?u:void 0}}else;},e.headerize=function(t){var e,n={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},r=t.toLowerCase().replace(/_/g,"-").split("-"),u="",o=r.length;for(e=0;e<o;e++)0!==e&&(u+="-"),u+=r[e].charAt(0).toUpperCase()+r[e].substring(1);return n[u]&&(u=n[u]),u},e.sipErrorCause=function(t){for(var e in i.SIP_ERROR_CAUSES)if(-1!==i.SIP_ERROR_CAUSES[e].indexOf(t))return i.causes[e];return i.causes.SIP_FAILURE_CODE},e.getRandomTestNetIP=function(){return"192.0.2.".concat((t=1,e=254,Math.floor(Math.random()*(e-t+1)+t)));var t,e},e.calculateMD5=function(t){function e(t,e){return t<<e|t>>>32-e}function n(t,e){var n=2147483648&t,r=2147483648&e,u=1073741824&t,o=1073741824&e,i=(1073741823&t)+(1073741823&e);return u&o?2147483648^i^n^r:u|o?1073741824&i?3221225472^i^n^r:1073741824^i^n^r:i^n^r}function r(t,r,u,o,i,s,l){return t=n(t,n(n(function(t,e,n){return t&e|~t&n}(r,u,o),i),l)),n(e(t,s),r)}function u(t,r,u,o,i,s,l){return t=n(t,n(n(function(t,e,n){return t&n|e&~n}(r,u,o),i),l)),n(e(t,s),r)}function o(t,r,u,o,i,s,l){return t=n(t,n(n(function(t,e,n){return t^e^n}(r,u,o),i),l)),n(e(t,s),r)}function i(t,r,u,o,i,s,l){return t=n(t,n(n(function(t,e,n){return e^(t|~n)}(r,u,o),i),l)),n(e(t,s),r)}function s(t){var e,n="",r="";for(e=0;e<=3;e++)n+=(r="0".concat((t>>>8*e&255).toString(16))).substr(r.length-2,2);return n}var l,a,c,f,h,d,p,v,g,y;for(l=function(t){for(var e,n=t.length,r=n+8,u=16*((r-r%64)/64+1),o=new Array(u-1),i=0,s=0;s<n;)i=s%4*8,o[e=(s-s%4)/4]=o[e]|t.charCodeAt(s)<<i,s++;return i=s%4*8,o[e=(s-s%4)/4]=o[e]|128<<i,o[u-2]=n<<3,o[u-1]=n>>>29,o}(t=function(t){for(var e="",n=0;n<t.length;n++){var r=t.charCodeAt(n);r<128?e+=String.fromCharCode(r):r>127&&r<2048?(e+=String.fromCharCode(r>>6|192),e+=String.fromCharCode(63&r|128)):(e+=String.fromCharCode(r>>12|224),e+=String.fromCharCode(r>>6&63|128),e+=String.fromCharCode(63&r|128))}return e}(t)),p=1732584193,v=4023233417,g=2562383102,y=271733878,a=0;a<l.length;a+=16)c=p,f=v,h=g,d=y,p=r(p,v,g,y,l[a+0],7,3614090360),y=r(y,p,v,g,l[a+1],12,3905402710),g=r(g,y,p,v,l[a+2],17,606105819),v=r(v,g,y,p,l[a+3],22,3250441966),p=r(p,v,g,y,l[a+4],7,4118548399),y=r(y,p,v,g,l[a+5],12,1200080426),g=r(g,y,p,v,l[a+6],17,2821735955),v=r(v,g,y,p,l[a+7],22,4249261313),p=r(p,v,g,y,l[a+8],7,1770035416),y=r(y,p,v,g,l[a+9],12,2336552879),g=r(g,y,p,v,l[a+10],17,4294925233),v=r(v,g,y,p,l[a+11],22,2304563134),p=r(p,v,g,y,l[a+12],7,1804603682),y=r(y,p,v,g,l[a+13],12,4254626195),g=r(g,y,p,v,l[a+14],17,2792965006),p=u(p,v=r(v,g,y,p,l[a+15],22,1236535329),g,y,l[a+1],5,4129170786),y=u(y,p,v,g,l[a+6],9,3225465664),g=u(g,y,p,v,l[a+11],14,643717713),v=u(v,g,y,p,l[a+0],20,3921069994),p=u(p,v,g,y,l[a+5],5,3593408605),y=u(y,p,v,g,l[a+10],9,38016083),g=u(g,y,p,v,l[a+15],14,3634488961),v=u(v,g,y,p,l[a+4],20,3889429448),p=u(p,v,g,y,l[a+9],5,568446438),y=u(y,p,v,g,l[a+14],9,3275163606),g=u(g,y,p,v,l[a+3],14,4107603335),v=u(v,g,y,p,l[a+8],20,1163531501),p=u(p,v,g,y,l[a+13],5,2850285829),y=u(y,p,v,g,l[a+2],9,4243563512),g=u(g,y,p,v,l[a+7],14,1735328473),p=o(p,v=u(v,g,y,p,l[a+12],20,2368359562),g,y,l[a+5],4,4294588738),y=o(y,p,v,g,l[a+8],11,2272392833),g=o(g,y,p,v,l[a+11],16,1839030562),v=o(v,g,y,p,l[a+14],23,4259657740),p=o(p,v,g,y,l[a+1],4,2763975236),y=o(y,p,v,g,l[a+4],11,1272893353),g=o(g,y,p,v,l[a+7],16,4139469664),v=o(v,g,y,p,l[a+10],23,3200236656),p=o(p,v,g,y,l[a+13],4,681279174),y=o(y,p,v,g,l[a+0],11,3936430074),g=o(g,y,p,v,l[a+3],16,3572445317),v=o(v,g,y,p,l[a+6],23,76029189),p=o(p,v,g,y,l[a+9],4,3654602809),y=o(y,p,v,g,l[a+12],11,3873151461),g=o(g,y,p,v,l[a+15],16,530742520),p=i(p,v=o(v,g,y,p,l[a+2],23,3299628645),g,y,l[a+0],6,4096336452),y=i(y,p,v,g,l[a+7],10,1126891415),g=i(g,y,p,v,l[a+14],15,2878612391),v=i(v,g,y,p,l[a+5],21,4237533241),p=i(p,v,g,y,l[a+12],6,1700485571),y=i(y,p,v,g,l[a+3],10,2399980690),g=i(g,y,p,v,l[a+10],15,4293915773),v=i(v,g,y,p,l[a+1],21,2240044497),p=i(p,v,g,y,l[a+8],6,1873313359),y=i(y,p,v,g,l[a+15],10,4264355552),g=i(g,y,p,v,l[a+6],15,2734768916),v=i(v,g,y,p,l[a+13],21,1309151649),p=i(p,v,g,y,l[a+4],6,4149444226),y=i(y,p,v,g,l[a+11],10,3174756917),g=i(g,y,p,v,l[a+2],15,718787259),v=i(v,g,y,p,l[a+9],21,3951481745),p=n(p,c),v=n(v,f),g=n(g,h),y=n(y,d);return(s(p)+s(v)+s(g)+s(y)).toLowerCase()},e.closeMediaStream=function(t){if(t)try{if(t.getTracks){var e,n=u(t.getTracks());try{for(n.s();!(e=n.n()).done;){e.value.stop()}}catch(t){n.e(t)}finally{n.f()}}else{var o,i=u(t.getAudioTracks());try{for(i.s();!(o=i.n()).done;){o.value.stop()}}catch(t){i.e(t)}finally{i.f()}var s,l=u(t.getVideoTracks());try{for(l.s();!(s=l.n()).done;){s.value.stop()}}catch(t){l.e(t)}finally{l.f()}}}catch(e){"function"!=typeof t.stop&&"object"!==r(t.stop)||t.stop()}},e.cloneArray=function(t){return t&&t.slice()||[]},e.cloneObject=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return t&&Object.assign({},t)||e}},function(t,e,n){"use strict";n.d(e,"a",(function(){return r}));const r="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(t,e){t.exports=!1},function(t,e,n){var r=n(47),u=n(1),o=n(66),i=n(15),s=n(14),l=n(198),a=u([].push),c=function(t){var e=1==t,n=2==t,u=3==t,c=4==t,f=6==t,h=7==t,d=5==t||f;return function(p,v,g,y){for(var m,_,b=i(p),A=o(b),C=r(v,g),E=s(A),w=0,D=y||l,S=e?D(p,E):n||h?D(p,0):void 0;E>w;w++)if((d||w in A)&&(_=C(m=A[w],w,b),t))if(e)S[w]=_;else if(_)switch(t){case 3:return!0;case 5:return m;case 6:return w;case 2:a(S,m)}else switch(t){case 4:return!1;case 7:a(S,m)}return f?-1:u||c?c:S}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6),filterReject:c(7)}},function(t,e,n){var r=n(5),u=n(19),o=n(39);t.exports=r?function(t,e,n){return u.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(19).f,u=n(7),o=n(6)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!u(t,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(183),u=n(19);t.exports=function(t,e,n){return n.get&&r(n.get,e,{getter:!0}),n.set&&r(n.set,e,{setter:!0}),u.f(t,e,n)}},function(t,e,n){var r=n(8),u=n(56),o=TypeError;t.exports=function(t){if(r(t))return t;throw o(u(t)+" is not a function")}},function(t,e,n){var r=n(66),u=n(35);t.exports=function(t){return r(u(t))}},function(t,e,n){var r=n(1),u=r({}.toString),o=r("".slice);t.exports=function(t){return o(u(t),8,-1)}},function(t,e,n){var r=n(276);t.exports=function(t){var e=+t;return e!=e||0===e?0:r(e)}},function(t,e,n){"use strict";function r(t){if(t)return function(t){for(var e in r.prototype)t[e]=r.prototype[e];return t}(t)}n.d(e,"a",(function(){return r})),r.prototype.on=r.prototype.addEventListener=function(t,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(e),this},r.prototype.once=function(t,e){function n(){this.off(t,n),e.apply(this,arguments)}return n.fn=e,this.on(t,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(t,e){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+t];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+t],this;for(var u=0;u<r.length;u++)if((n=r[u])===e||n.fn===e){r.splice(u,1);break}return 0===r.length&&delete this._callbacks["$"+t],this},r.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),n=this._callbacks["$"+t],r=1;r<arguments.length;r++)e[r-1]=arguments[r];if(n){r=0;for(var u=(n=n.slice(0)).length;r<u;++r)n[r].apply(this,e)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]},r.prototype.hasListeners=function(t){return!!this.listeners(t).length}},function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return l}));var r=n(22);function u(t,...e){return e.reduce((e,n)=>(t.hasOwnProperty(n)&&(e[n]=t[n]),e),{})}const o=r.a.setTimeout,i=r.a.clearTimeout;function s(t,e){e.useNativeTimers?(t.setTimeoutFn=o.bind(r.a),t.clearTimeoutFn=i.bind(r.a)):(t.setTimeoutFn=r.a.setTimeout.bind(r.a),t.clearTimeoutFn=r.a.clearTimeout.bind(r.a))}function l(t){return"string"==typeof t?function(t){let e=0,n=0;for(let r=0,u=t.length;r<u;r++)e=t.charCodeAt(r),e<128?n+=1:e<2048?n+=2:e<55296||e>=57344?n+=3:(r++,n+=4);return n}(t):Math.ceil(1.33*(t.byteLength||t.size))}},function(t,e,n){"use strict";n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return o})),n.d(e,"d",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n(22);const u="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),o=r.a.WebSocket||r.a.MozWebSocket,i=!0,s="arraybuffer"},function(t,e,n){var r=n(43),u=TypeError;t.exports=function(t){if(r(t))throw u("Can't call method on "+t);return t}},function(t,e,n){var r=n(1);t.exports=r({}.isPrototypeOf)},function(t,e,n){var r,u=n(11),o=n(178),i=n(136),s=n(86),l=n(180),a=n(113),c=n(115),f=c("IE_PROTO"),h=function(){},d=function(t){return"<script>"+t+"<\/script>"},p=function(t){t.write(d("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{r=new ActiveXObject("htmlfile")}catch(t){}var t,e;v="undefined"!=typeof document?document.domain&&r?p(r):((e=a("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(d("document.F=Object")),t.close(),t.F):p(r);for(var n=i.length;n--;)delete v.prototype[i[n]];return v()};s[f]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(h.prototype=u(t),n=new h,h.prototype=null,n[f]=t):n=v(),void 0===e?n:o.f(n,e)}},function(t,e,n){var r=n(31),u=Math.min;t.exports=function(t){return t>0?u(r(t),9007199254740991):0}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){"use strict";t.exports=function(){function t(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var e={parse:function(e,r){var u={CRLF:a,DIGIT:c,ALPHA:f,HEXDIG:h,WSP:d,OCTET:p,DQUOTE:v,SP:g,HTAB:y,alphanum:m,reserved:_,unreserved:b,mark:A,escaped:C,LWS:E,SWS:w,HCOLON:D,TEXT_UTF8_TRIM:S,TEXT_UTF8char:T,UTF8_NONASCII:R,UTF8_CONT:x,LHEX:function(){var t;null===(t=c())&&(/^[a-f]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[a-f]")));return t},token:O,token_nodot:I,separators:function(){var t;40===e.charCodeAt(o)?(t="(",o++):(t=null,l('"("'));null===t&&(41===e.charCodeAt(o)?(t=")",o++):(t=null,l('")"')),null===t&&(60===e.charCodeAt(o)?(t="<",o++):(t=null,l('"<"')),null===t&&(62===e.charCodeAt(o)?(t=">",o++):(t=null,l('">"')),null===t&&(64===e.charCodeAt(o)?(t="@",o++):(t=null,l('"@"')),null===t&&(44===e.charCodeAt(o)?(t=",",o++):(t=null,l('","')),null===t&&(59===e.charCodeAt(o)?(t=";",o++):(t=null,l('";"')),null===t&&(58===e.charCodeAt(o)?(t=":",o++):(t=null,l('":"')),null===t&&(92===e.charCodeAt(o)?(t="\\",o++):(t=null,l('"\\\\"')),null===t&&null===(t=v())&&(47===e.charCodeAt(o)?(t="/",o++):(t=null,l('"/"')),null===t&&(91===e.charCodeAt(o)?(t="[",o++):(t=null,l('"["')),null===t&&(93===e.charCodeAt(o)?(t="]",o++):(t=null,l('"]"')),null===t&&(63===e.charCodeAt(o)?(t="?",o++):(t=null,l('"?"')),null===t&&(61===e.charCodeAt(o)?(t="=",o++):(t=null,l('"="')),null===t&&(123===e.charCodeAt(o)?(t="{",o++):(t=null,l('"{"')),null===t&&(125===e.charCodeAt(o)?(t="}",o++):(t=null,l('"}"')),null===t&&null===(t=g())&&(t=y()))))))))))))))));return t},word:F,STAR:k,SLASH:N,EQUAL:B,LPAREN:P,RPAREN:M,RAQUOT:L,LAQUOT:U,COMMA:j,SEMI:q,COLON:H,LDQUOT:Y,RDQUOT:G,comment:function t(){var e,n,r,u;if(u=o,null!==(e=P())){for(n=[],null===(r=W())&&null===(r=z())&&(r=t());null!==r;)n.push(r),null===(r=W())&&null===(r=z())&&(r=t());null!==n&&null!==(r=M())?e=[e,n,r]:(e=null,o=u)}else e=null,o=u;return e},ctext:W,quoted_string:V,quoted_string_clean:K,qdtext:J,quoted_pair:z,SIP_URI_noparams:Q,SIP_URI:X,uri_scheme:Z,uri_scheme_sips:$,uri_scheme_sip:tt,userinfo:et,user:nt,user_unreserved:rt,password:ut,hostport:ot,host:it,hostname:st,domainlabel:lt,toplabel:at,IPv6reference:ct,IPv6address:ft,h16:ht,ls32:dt,IPv4address:pt,dec_octet:vt,port:gt,uri_parameters:yt,uri_parameter:mt,transport_param:_t,user_param:bt,method_param:At,ttl_param:Ct,maddr_param:Et,lr_param:wt,other_param:Dt,pname:St,pvalue:Tt,paramchar:Rt,param_unreserved:xt,headers:Ot,header:It,hname:Ft,hvalue:kt,hnv_unreserved:Nt,Request_Response:function(){var t;null===(t=ce())&&(t=Bt());return t},Request_Line:Bt,Request_URI:Pt,absoluteURI:Mt,hier_part:Lt,net_path:Ut,abs_path:jt,opaque_part:qt,uric:Ht,uric_no_slash:Yt,path_segments:Gt,segment:Wt,param:Vt,pchar:Kt,scheme:Jt,authority:zt,srvr:Qt,reg_name:Xt,query:Zt,SIP_Version:$t,INVITEm:te,ACKm:ee,OPTIONSm:ne,BYEm:re,CANCELm:ue,REGISTERm:oe,SUBSCRIBEm:ie,NOTIFYm:se,REFERm:le,Method:ae,Status_Line:ce,Status_Code:fe,extension_code:he,Reason_Phrase:de,Allow_Events:function(){var t,e,n,r,u,i;if(u=o,null!==(t=Me())){for(e=[],i=o,null!==(n=j())&&null!==(r=Me())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=Me())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},Call_ID:function(){var t,n,r,u,i,s;u=o,i=o,null!==(t=F())?(s=o,64===e.charCodeAt(o)?(n="@",o++):(n=null,l('"@"')),null!==n&&null!==(r=F())?n=[n,r]:(n=null,o=s),null!==(n=null!==n?n:"")?t=[t,n]:(t=null,o=i)):(t=null,o=i);null!==t&&(t=function(t){jn=e.substring(o,t)}(u));null===t&&(o=u);return t},Contact:function(){var t,e,n,r,u,i,s;if(u=o,null===(t=k()))if(i=o,null!==(t=pe())){for(e=[],s=o,null!==(n=j())&&null!==(r=pe())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=j())&&null!==(r=pe())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(t=function(t){var e,n;for(n=jn.multi_header.length,e=0;e<n;e++)if(null===jn.multi_header[e].parsed){jn=null;break}jn=null!==jn?jn.multi_header:-1}());null===t&&(o=u);return t},contact_param:pe,name_addr:ve,display_name:ge,contact_params:ye,c_p_q:me,c_p_expires:_e,delta_seconds:be,qvalue:Ae,generic_param:Ce,gen_value:Ee,Content_Disposition:function(){var t,e,n,r,u,i;if(u=o,null!==(t=we())){for(e=[],i=o,null!==(n=q())&&null!==(r=De())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=q())&&null!==(r=De())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},disp_type:we,disp_param:De,handling_param:Se,Content_Encoding:function(){var t,e,n,r,u,i;if(u=o,null!==(t=O())){for(e=[],i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},Content_Length:function(){var t,e,n;if(n=o,null!==(e=c()))for(t=[];null!==e;)t.push(e),e=c();else t=null;null!==t&&(t=void(jn=parseInt(t.join(""))));null===t&&(o=n);return t},Content_Type:function(){var t,n;n=o,null!==(t=Te())&&(t=function(t){jn=e.substring(o,t)}(n));null===t&&(o=n);return t},media_type:Te,m_type:Re,discrete_type:xe,composite_type:Oe,extension_token:Ie,x_token:Fe,m_subtype:ke,m_parameter:Ne,m_value:Be,CSeq:function(){var t,e,n,r;r=o,null!==(t=Pe())&&null!==(e=E())&&null!==(n=ae())?t=[t,e,n]:(t=null,o=r);return t},CSeq_value:Pe,Expires:function(){var t,e;e=o,null!==(t=be())&&(t=void(jn=t));null===t&&(o=e);return t},Event:function(){var t,e,n,r,u,i,s;if(u=o,i=o,null!==(t=Me())){for(e=[],s=o,null!==(n=q())&&null!==(r=Ce())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=q())&&null!==(r=Ce())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(l=t[0],t=void(jn.event=l.join("").toLowerCase()));var l;null===t&&(o=u);return t},event_type:Me,From:function(){var t,e,n,r,u,i,s;u=o,i=o,null===(t=Q())&&(t=ve());if(null!==t){for(e=[],s=o,null!==(n=q())&&null!==(r=Le())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=q())&&null!==(r=Le())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(t=function(t){var e=jn.tag;try{jn=new Un(jn.uri,jn.display_name,jn.params),e&&jn.setParam("tag",e)}catch(t){jn=-1}}());null===t&&(o=u);return t},from_param:Le,tag_param:Ue,Max_Forwards:function(){var t,e,n;if(n=o,null!==(e=c()))for(t=[];null!==e;)t.push(e),e=c();else t=null;null!==t&&(t=void(jn=parseInt(t.join(""))));null===t&&(o=n);return t},Min_Expires:function(){var t,e;e=o,null!==(t=be())&&(t=void(jn=t));null===t&&(o=e);return t},Name_Addr_Header:function(){var t,e,n,r,u,i,s,l,a,c;l=o,a=o,t=[],e=ge();for(;null!==e;)t.push(e),e=ge();if(null!==t)if(null!==(e=U()))if(null!==(n=X()))if(null!==(r=L())){for(u=[],c=o,null!==(i=q())&&null!==(s=Ce())?i=[i,s]:(i=null,o=c);null!==i;)u.push(i),c=o,null!==(i=q())&&null!==(s=Ce())?i=[i,s]:(i=null,o=c);null!==u?t=[t,e,n,r,u]:(t=null,o=a)}else t=null,o=a;else t=null,o=a;else t=null,o=a;else t=null,o=a;null!==t&&(t=function(t){try{jn=new Un(jn.uri,jn.display_name,jn.params)}catch(t){jn=-1}}());null===t&&(o=l);return t},Proxy_Authenticate:function(){return je()},challenge:je,other_challenge:qe,auth_param:He,digest_cln:Ye,realm:Ge,realm_value:We,domain:Ve,URI:Ke,nonce:Je,nonce_value:ze,opaque:Qe,stale:Xe,algorithm:Ze,qop_options:$e,qop_value:tn,Proxy_Require:function(){var t,e,n,r,u,i;if(u=o,null!==(t=O())){for(e=[],i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},Record_Route:function(){var t,e,n,r,u,i,s;if(u=o,i=o,null!==(t=en())){for(e=[],s=o,null!==(n=j())&&null!==(r=en())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=j())&&null!==(r=en())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(t=function(t){var e,n;for(n=jn.multi_header.length,e=0;e<n;e++)if(null===jn.multi_header[e].parsed){jn=null;break}jn=null!==jn?jn.multi_header:-1}());null===t&&(o=u);return t},rec_route:en,Reason:function(){var t,n,r,u,i,s,a;i=o,s=o,"sip"===e.substr(o,3).toLowerCase()?(t=e.substr(o,3),o+=3):(t=null,l('"SIP"'));null===t&&(t=O());if(null!==t){for(n=[],a=o,null!==(r=q())&&null!==(u=nn())?r=[r,u]:(r=null,o=a);null!==r;)n.push(r),a=o,null!==(r=q())&&null!==(u=nn())?r=[r,u]:(r=null,o=a);null!==n?t=[t,n]:(t=null,o=s)}else t=null,o=s;null!==t&&(t=function(t,e){if(jn.protocol=e.toLowerCase(),jn.params||(jn.params={}),jn.params.text&&'"'===jn.params.text[0]){var n=jn.params.text;jn.text=n.substring(1,n.length-1),delete jn.params.text}}(0,t[0]));null===t&&(o=i);return t},reason_param:nn,reason_cause:rn,Require:function(){var t,e,n,r,u,i;if(u=o,null!==(t=O())){for(e=[],i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},Route:function(){var t,e,n,r,u,i;if(u=o,null!==(t=un())){for(e=[],i=o,null!==(n=j())&&null!==(r=un())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=un())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},route_param:un,Subscription_State:function(){var t,e,n,r,u,i;if(u=o,null!==(t=on())){for(e=[],i=o,null!==(n=q())&&null!==(r=sn())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=q())&&null!==(r=sn())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},substate_value:on,subexp_params:sn,event_reason_value:ln,Subject:function(){var t;return t=null!==(t=S())?t:""},Supported:function(){var t,e,n,r,u,i;if(u=o,null!==(t=O())){for(e=[],i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=O())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t=null!==t?t:""},To:function(){var t,e,n,r,u,i,s;u=o,i=o,null===(t=Q())&&(t=ve());if(null!==t){for(e=[],s=o,null!==(n=q())&&null!==(r=an())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=q())&&null!==(r=an())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(t=function(t){var e=jn.tag;try{jn=new Un(jn.uri,jn.display_name,jn.params),e&&jn.setParam("tag",e)}catch(t){jn=-1}}());null===t&&(o=u);return t},to_param:an,Via:function(){var t,e,n,r,u,i;if(u=o,null!==(t=cn())){for(e=[],i=o,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},via_param:cn,via_params:fn,via_ttl:hn,via_maddr:dn,via_received:pn,via_branch:vn,response_port:gn,rport:yn,sent_protocol:mn,protocol_name:_n,transport:bn,sent_by:An,via_host:Cn,via_port:En,ttl:wn,WWW_Authenticate:function(){return je()},Session_Expires:function(){var t,e,n,r,u,i;if(u=o,null!==(t=Dn())){for(e=[],i=o,null!==(n=q())&&null!==(r=Sn())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=q())&&null!==(r=Sn())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},s_e_expires:Dn,s_e_params:Sn,s_e_refresher:Tn,extension_header:function(){var t,e,n,r;r=o,null!==(t=O())&&null!==(e=D())&&null!==(n=Rn())?t=[t,e,n]:(t=null,o=r);return t},header_value:Rn,message_body:function(){var t,e;t=[],e=p();for(;null!==e;)t.push(e),e=p();return t},uuid_URI:function(){var t,n,r;r=o,"uuid:"===e.substr(o,5)?(t="uuid:",o+=5):(t=null,l('"uuid:"'));null!==t&&null!==(n=xn())?t=[t,n]:(t=null,o=r);return t},uuid:xn,hex4:On,hex8:In,hex12:Fn,Refer_To:function(){var t,e,n,r,u,i,s;u=o,i=o,null===(t=Q())&&(t=ve());if(null!==t){for(e=[],s=o,null!==(n=q())&&null!==(r=Ce())?n=[n,r]:(n=null,o=s);null!==n;)e.push(n),s=o,null!==(n=q())&&null!==(r=Ce())?n=[n,r]:(n=null,o=s);null!==e?t=[t,e]:(t=null,o=i)}else t=null,o=i;null!==t&&(t=function(t){try{jn=new Un(jn.uri,jn.display_name,jn.params)}catch(t){jn=-1}}());null===t&&(o=u);return t},Replaces:function(){var t,e,n,r,u,i;if(u=o,null!==(t=kn())){for(e=[],i=o,null!==(n=q())&&null!==(r=Nn())?n=[n,r]:(n=null,o=i);null!==n;)e.push(n),i=o,null!==(n=q())&&null!==(r=Nn())?n=[n,r]:(n=null,o=i);null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return t},call_id:kn,replaces_param:Nn,to_tag:Bn,from_tag:Pn,early_flag:Mn};if(void 0!==r){if(void 0===u[r])throw new Error("Invalid rule name: "+t(r)+".")}else r="CRLF";var o=0,i=0,s=[];function l(t){o<i||(o>i&&(i=o,s=[]),s.push(t))}function a(){var t;return"\r\n"===e.substr(o,2)?(t="\r\n",o+=2):(t=null,l('"\\r\\n"')),t}function c(){var t;return/^[0-9]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[0-9]")),t}function f(){var t;return/^[a-zA-Z]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[a-zA-Z]")),t}function h(){var t;return/^[0-9a-fA-F]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[0-9a-fA-F]")),t}function d(){var t;return null===(t=g())&&(t=y()),t}function p(){var t;return/^[\0-\xFF]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[\\0-\\xFF]")),t}function v(){var t;return/^["]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l('["]')),t}function g(){var t;return 32===e.charCodeAt(o)?(t=" ",o++):(t=null,l('" "')),t}function y(){var t;return 9===e.charCodeAt(o)?(t="\t",o++):(t=null,l('"\\t"')),t}function m(){var t;return/^[a-zA-Z0-9]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[a-zA-Z0-9]")),t}function _(){var t;return 59===e.charCodeAt(o)?(t=";",o++):(t=null,l('";"')),null===t&&(47===e.charCodeAt(o)?(t="/",o++):(t=null,l('"/"')),null===t&&(63===e.charCodeAt(o)?(t="?",o++):(t=null,l('"?"')),null===t&&(58===e.charCodeAt(o)?(t=":",o++):(t=null,l('":"')),null===t&&(64===e.charCodeAt(o)?(t="@",o++):(t=null,l('"@"')),null===t&&(38===e.charCodeAt(o)?(t="&",o++):(t=null,l('"&"')),null===t&&(61===e.charCodeAt(o)?(t="=",o++):(t=null,l('"="')),null===t&&(43===e.charCodeAt(o)?(t="+",o++):(t=null,l('"+"')),null===t&&(36===e.charCodeAt(o)?(t="$",o++):(t=null,l('"$"')),null===t&&(44===e.charCodeAt(o)?(t=",",o++):(t=null,l('","'))))))))))),t}function b(){var t;return null===(t=m())&&(t=A()),t}function A(){var t;return 45===e.charCodeAt(o)?(t="-",o++):(t=null,l('"-"')),null===t&&(95===e.charCodeAt(o)?(t="_",o++):(t=null,l('"_"')),null===t&&(46===e.charCodeAt(o)?(t=".",o++):(t=null,l('"."')),null===t&&(33===e.charCodeAt(o)?(t="!",o++):(t=null,l('"!"')),null===t&&(126===e.charCodeAt(o)?(t="~",o++):(t=null,l('"~"')),null===t&&(42===e.charCodeAt(o)?(t="*",o++):(t=null,l('"*"')),null===t&&(39===e.charCodeAt(o)?(t="'",o++):(t=null,l('"\'"')),null===t&&(40===e.charCodeAt(o)?(t="(",o++):(t=null,l('"("')),null===t&&(41===e.charCodeAt(o)?(t=")",o++):(t=null,l('")"')))))))))),t}function C(){var t,n,r,u,i;return u=o,i=o,37===e.charCodeAt(o)?(t="%",o++):(t=null,l('"%"')),null!==t&&null!==(n=h())&&null!==(r=h())?t=[t,n,r]:(t=null,o=i),null!==t&&(t=t.join("")),null===t&&(o=u),t}function E(){var t,e,n,r,u,i;for(r=o,u=o,i=o,t=[],e=d();null!==e;)t.push(e),e=d();if(null!==t&&null!==(e=a())?t=[t,e]:(t=null,o=i),null!==(t=null!==t?t:"")){if(null!==(n=d()))for(e=[];null!==n;)e.push(n),n=d();else e=null;null!==e?t=[t,e]:(t=null,o=u)}else t=null,o=u;return null!==t&&(t=" "),null===t&&(o=r),t}function w(){var t;return t=null!==(t=E())?t:""}function D(){var t,n,r,u,i;for(u=o,i=o,t=[],null===(n=g())&&(n=y());null!==n;)t.push(n),null===(n=g())&&(n=y());return null!==t?(58===e.charCodeAt(o)?(n=":",o++):(n=null,l('":"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t=":"),null===t&&(o=u),t}function S(){var t,n,r,u,i,s,l;if(i=o,s=o,null!==(n=T()))for(t=[];null!==n;)t.push(n),n=T();else t=null;if(null!==t){for(n=[],l=o,r=[],u=E();null!==u;)r.push(u),u=E();for(null!==r&&null!==(u=T())?r=[r,u]:(r=null,o=l);null!==r;){for(n.push(r),l=o,r=[],u=E();null!==u;)r.push(u),u=E();null!==r&&null!==(u=T())?r=[r,u]:(r=null,o=l)}null!==n?t=[t,n]:(t=null,o=s)}else t=null,o=s;return null!==t&&(t=function(t){return e.substring(o,t)}(i)),null===t&&(o=i),t}function T(){var t;return/^[!-~]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[!-~]")),null===t&&(t=R()),t}function R(){var t;return/^[\x80-\uFFFF]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[\\x80-\\uFFFF]")),t}function x(){var t;return/^[\x80-\xBF]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[\\x80-\\xBF]")),t}function O(){var t,n,r;if(r=o,null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(46===e.charCodeAt(o)?(n=".",o++):(n=null,l('"."')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"')))))))))))),null!==n)for(t=[];null!==n;)t.push(n),null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(46===e.charCodeAt(o)?(n=".",o++):(n=null,l('"."')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"'))))))))))));else t=null;return null!==t&&(t=function(t){return e.substring(o,t)}(r)),null===t&&(o=r),t}function I(){var t,n,r;if(r=o,null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"'))))))))))),null!==n)for(t=[];null!==n;)t.push(n),null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"')))))))))));else t=null;return null!==t&&(t=function(t){return e.substring(o,t)}(r)),null===t&&(o=r),t}function F(){var t,n,r;if(r=o,null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(46===e.charCodeAt(o)?(n=".",o++):(n=null,l('"."')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"')),null===n&&(40===e.charCodeAt(o)?(n="(",o++):(n=null,l('"("')),null===n&&(41===e.charCodeAt(o)?(n=")",o++):(n=null,l('")"')),null===n&&(60===e.charCodeAt(o)?(n="<",o++):(n=null,l('"<"')),null===n&&(62===e.charCodeAt(o)?(n=">",o++):(n=null,l('">"')),null===n&&(58===e.charCodeAt(o)?(n=":",o++):(n=null,l('":"')),null===n&&(92===e.charCodeAt(o)?(n="\\",o++):(n=null,l('"\\\\"')),null===n&&null===(n=v())&&(47===e.charCodeAt(o)?(n="/",o++):(n=null,l('"/"')),null===n&&(91===e.charCodeAt(o)?(n="[",o++):(n=null,l('"["')),null===n&&(93===e.charCodeAt(o)?(n="]",o++):(n=null,l('"]"')),null===n&&(63===e.charCodeAt(o)?(n="?",o++):(n=null,l('"?"')),null===n&&(123===e.charCodeAt(o)?(n="{",o++):(n=null,l('"{"')),null===n&&(125===e.charCodeAt(o)?(n="}",o++):(n=null,l('"}"')))))))))))))))))))))))),null!==n)for(t=[];null!==n;)t.push(n),null===(n=m())&&(45===e.charCodeAt(o)?(n="-",o++):(n=null,l('"-"')),null===n&&(46===e.charCodeAt(o)?(n=".",o++):(n=null,l('"."')),null===n&&(33===e.charCodeAt(o)?(n="!",o++):(n=null,l('"!"')),null===n&&(37===e.charCodeAt(o)?(n="%",o++):(n=null,l('"%"')),null===n&&(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null===n&&(95===e.charCodeAt(o)?(n="_",o++):(n=null,l('"_"')),null===n&&(43===e.charCodeAt(o)?(n="+",o++):(n=null,l('"+"')),null===n&&(96===e.charCodeAt(o)?(n="`",o++):(n=null,l('"`"')),null===n&&(39===e.charCodeAt(o)?(n="'",o++):(n=null,l('"\'"')),null===n&&(126===e.charCodeAt(o)?(n="~",o++):(n=null,l('"~"')),null===n&&(40===e.charCodeAt(o)?(n="(",o++):(n=null,l('"("')),null===n&&(41===e.charCodeAt(o)?(n=")",o++):(n=null,l('")"')),null===n&&(60===e.charCodeAt(o)?(n="<",o++):(n=null,l('"<"')),null===n&&(62===e.charCodeAt(o)?(n=">",o++):(n=null,l('">"')),null===n&&(58===e.charCodeAt(o)?(n=":",o++):(n=null,l('":"')),null===n&&(92===e.charCodeAt(o)?(n="\\",o++):(n=null,l('"\\\\"')),null===n&&null===(n=v())&&(47===e.charCodeAt(o)?(n="/",o++):(n=null,l('"/"')),null===n&&(91===e.charCodeAt(o)?(n="[",o++):(n=null,l('"["')),null===n&&(93===e.charCodeAt(o)?(n="]",o++):(n=null,l('"]"')),null===n&&(63===e.charCodeAt(o)?(n="?",o++):(n=null,l('"?"')),null===n&&(123===e.charCodeAt(o)?(n="{",o++):(n=null,l('"{"')),null===n&&(125===e.charCodeAt(o)?(n="}",o++):(n=null,l('"}"'))))))))))))))))))))))));else t=null;return null!==t&&(t=function(t){return e.substring(o,t)}(r)),null===t&&(o=r),t}function k(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(42===e.charCodeAt(o)?(n="*",o++):(n=null,l('"*"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t="*"),null===t&&(o=u),t}function N(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(47===e.charCodeAt(o)?(n="/",o++):(n=null,l('"/"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t="/"),null===t&&(o=u),t}function B(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(61===e.charCodeAt(o)?(n="=",o++):(n=null,l('"="')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t="="),null===t&&(o=u),t}function P(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(40===e.charCodeAt(o)?(n="(",o++):(n=null,l('"("')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t="("),null===t&&(o=u),t}function M(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(41===e.charCodeAt(o)?(n=")",o++):(n=null,l('")"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t=")"),null===t&&(o=u),t}function L(){var t,n,r,u;return r=o,u=o,62===e.charCodeAt(o)?(t=">",o++):(t=null,l('">"')),null!==t&&null!==(n=w())?t=[t,n]:(t=null,o=u),null!==t&&(t=">"),null===t&&(o=r),t}function U(){var t,n,r,u;return r=o,u=o,null!==(t=w())?(60===e.charCodeAt(o)?(n="<",o++):(n=null,l('"<"')),null!==n?t=[t,n]:(t=null,o=u)):(t=null,o=u),null!==t&&(t="<"),null===t&&(o=r),t}function j(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(44===e.charCodeAt(o)?(n=",",o++):(n=null,l('","')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t=","),null===t&&(o=u),t}function q(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(59===e.charCodeAt(o)?(n=";",o++):(n=null,l('";"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t=";"),null===t&&(o=u),t}function H(){var t,n,r,u,i;return u=o,i=o,null!==(t=w())?(58===e.charCodeAt(o)?(n=":",o++):(n=null,l('":"')),null!==n&&null!==(r=w())?t=[t,n,r]:(t=null,o=i)):(t=null,o=i),null!==t&&(t=":"),null===t&&(o=u),t}function Y(){var t,e,n,r;return n=o,r=o,null!==(t=w())&&null!==(e=v())?t=[t,e]:(t=null,o=r),null!==t&&(t='"'),null===t&&(o=n),t}function G(){var t,e,n,r;return n=o,r=o,null!==(t=v())&&null!==(e=w())?t=[t,e]:(t=null,o=r),null!==t&&(t='"'),null===t&&(o=n),t}function W(){var t;return/^[!-']/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[!-']")),null===t&&(/^[*-[]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[*-[]")),null===t&&(/^[\]-~]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[\\]-~]")),null===t&&null===(t=R())&&(t=E()))),t}function V(){var t,n,r,u,i,s;if(i=o,s=o,null!==(t=w()))if(null!==(n=v())){for(r=[],null===(u=J())&&(u=z());null!==u;)r.push(u),null===(u=J())&&(u=z());null!==r&&null!==(u=v())?t=[t,n,r,u]:(t=null,o=s)}else t=null,o=s;else t=null,o=s;return null!==t&&(t=function(t){return e.substring(o,t)}(i)),null===t&&(o=i),t}function K(){var t,n,r,u,i,s;if(i=o,s=o,null!==(t=w()))if(null!==(n=v())){for(r=[],null===(u=J())&&(u=z());null!==u;)r.push(u),null===(u=J())&&(u=z());null!==r&&null!==(u=v())?t=[t,n,r,u]:(t=null,o=s)}else t=null,o=s;else t=null,o=s;return null!==t&&(t=function(t){var n=e.substring(o,t).trim();return n.substring(1,n.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")}(i)),null===t&&(o=i),t}function J(){var t;return null===(t=E())&&(33===e.charCodeAt(o)?(t="!",o++):(t=null,l('"!"')),null===t&&(/^[#-[]/.test(e.charAt(o))?(t=e.charAt(o),o++):(t=null,l("[#-[]")),null===t&&(/^[\]-~]/.test(e.charAt(o))?