jssip-emicnet
Version:
jssip wrapper, use for emicnet callcenter
1 lines • 788 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("index",[],t):"object"==typeof exports?exports.index=t():e.index=t()}(window,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var u=t[r]={i:r,l:!1,exports:{}};return e[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var u in e)n.d(r,u,function(t){return e[t]}.bind(null,u));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=392)}([function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(82),u=Function.prototype,o=u.call,i=r&&u.bind.bind(o,o);e.exports=r?i:function(e){return function(){return o.apply(e,arguments)}}},function(e,t,n){var r=n(3),u=n(44).f,o=n(25),i=n(17),a=n(134),s=n(139),l=n(88);e.exports=function(e,t){var n,c,f,h,d,p=e.target,g=e.global,v=e.stat;if(n=g?r:v?r[p]||a(p,{}):(r[p]||{}).prototype)for(c in t){if(h=t[c],f=e.dontCallGetSet?(d=u(n,c))&&d.value:n[c],!l(g?c:p+(v?".":"#")+c,e.forced)&&void 0!==f){if(typeof h==typeof f)continue;s(h,f)}(e.sham||f&&f.sham)&&o(h,"sham",!0),i(n,c,h,e)}}},function(e,t,n){(function(t){var n=function(e){return e&&e.Math==Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof t&&t)||function(){return this}()||Function("return this")()}).call(this,n(132))},function(e,t,n){"use strict";var r,u,o,i=n(218),a=n(5),s=n(3),l=n(8),c=n(10),f=n(7),h=n(45),d=n(56),p=n(25),g=n(17),v=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,S=s.Int8Array,D=S&&S.prototype,T=s.Uint8ClampedArray,x=T&&T.prototype,O=S&&m(S),R=D&&m(D),k=Object.prototype,I=s.TypeError,F=b("toStringTag"),N=A("TYPED_ARRAY_TAG"),P=i&&!!_&&"Opera"!==h(s.opera),B=!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(e){var t=m(e);if(c(t)){var n=w(t);return n&&f(n,"TypedArrayConstructor")?n.TypedArrayConstructor:U(t)}},j=function(e){if(!c(e))return!1;var t=h(e);return f(M,t)||f(L,t)};for(r in M)(o=(u=s[r])&&u.prototype)?E(o).TypedArrayConstructor=u:P=!1;for(r in L)(o=(u=s[r])&&u.prototype)&&(E(o).TypedArrayConstructor=u);if((!P||!l(O)||O===Function.prototype)&&(O=function(){throw I("Incorrect invocation")},P))for(r in M)s[r]&&_(s[r],O);if((!P||!R||R===k)&&(R=O.prototype,P))for(r in M)s[r]&&_(s[r].prototype,R);if(P&&m(x)!==R&&_(x,R),a&&!f(R,F))for(r in B=!0,v(R,F,{configurable:!0,get:function(){return c(this)?this[N]:void 0}}),M)s[r]&&p(s[r],N,r);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:P,TYPED_ARRAY_TAG:B&&N,aTypedArray:function(e){if(j(e))return e;throw I("Target is not a typed array")},aTypedArrayConstructor:function(e){if(l(e)&&(!_||y(O,e)))return e;throw I(d(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,n,r){if(a){if(n)for(var u in M){var o=s[u];if(o&&f(o.prototype,e))try{delete o.prototype[e]}catch(n){try{o.prototype[e]=t}catch(e){}}}R[e]&&!n||g(R,e,n?t:P&&D[e]||t,r)}},exportTypedArrayStaticMethod:function(e,t,n){var r,u;if(a){if(_){if(n)for(r in M)if((u=s[r])&&f(u,e))try{delete u[e]}catch(e){}if(O[e]&&!n)return;try{return g(O,e,n?t:P&&O[e]||t)}catch(e){}}for(r in M)!(u=s[r])||u[e]&&!n||g(u,e,t)}},getTypedArrayConstructor:U,isView:function(e){if(!c(e))return!1;var t=h(e);return"DataView"===t||f(M,t)||f(L,t)},isTypedArray:j,TypedArray:O,TypedArrayPrototype:R}},function(e,t,n){var r=n(0);e.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(e,t,n){var r=n(3),u=n(62),o=n(7),i=n(83),a=n(63),s=n(173),l=r.Symbol,c=u("wks"),f=s?l.for||l:l&&l.withoutSetter||i;e.exports=function(e){return o(c,e)||(c[e]=a&&o(l,e)?l[e]:f("Symbol."+e)),c[e]}},function(e,t,n){var r=n(1),u=n(15),o=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return o(u(e),t)}},function(e,t,n){var r=n(175),u=r.all;e.exports=r.IS_HTMLDDA?function(e){return"function"==typeof e||e===u}:function(e){return"function"==typeof e}},function(e,t,n){var r=n(82),u=Function.prototype.call;e.exports=r?u.bind(u):function(){return u.apply(u,arguments)}},function(e,t,n){var r=n(8),u=n(175),o=u.all;e.exports=u.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:r(e)||e===o}:function(e){return"object"==typeof e?null!==e:r(e)}},function(e,t,n){var r=n(10),u=String,o=TypeError;e.exports=function(e){if(r(e))return e;throw o(u(e)+" is not an object")}},function(e,t,n){var r=n(45),u=String;e.exports=function(e){if("Symbol"===r(e))throw TypeError("Cannot convert a Symbol value to a string");return u(e)}},function(e,t,n){"use strict";var r=n(160);e.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(e,t,n){var r=n(38);e.exports=function(e){return r(e.length)}},function(e,t,n){var r=n(35),u=Object;e.exports=function(e){return u(r(e))}},function(e,t,n){var r=n(3),u=n(8),o=function(e){return u(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?o(r[e]):r[e]&&r[e][t]}},function(e,t,n){var r=n(8),u=n(19),o=n(183),i=n(134);e.exports=function(e,t,n,a){a||(a={});var s=a.enumerable,l=void 0!==a.name?a.name:t;if(r(n)&&o(n,l,a),a.global)s?e[t]=n:i(t,n);else{try{a.unsafe?e[t]&&(s=!0):delete e[t]}catch(e){}s?e[t]=n:u.f(e,t,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return e}},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var u=n(125);e.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t?(this._debug=u.default("".concat("JsSIP",":").concat(t)),this._warn=u.default("".concat("JsSIP",":WARN:").concat(t)),this._error=u.default("".concat("JsSIP",":ERROR:").concat(t))):(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 t,n,o;return t=e,(n=[{key:"debug",get:function(){return this._debug}},{key:"warn",get:function(){return this._warn}},{key:"error",get:function(){return this._error}}])&&r(t.prototype,n),o&&r(t,o),e}()},function(e,t,n){var r=n(5),u=n(174),o=n(176),i=n(11),a=n(85),s=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor;t.f=r?o?function(e,t,n){if(i(e),t=a(t),i(n),"function"==typeof e&&"prototype"===t&&"value"in n&&"writable"in n&&!n.writable){var r=c(e,t);r&&r.writable&&(e[t]=n.value,n={configurable:"configurable"in n?n.configurable:r.configurable,enumerable:"enumerable"in n?n.enumerable:r.enumerable,writable:!1})}return l(e,t,n)}:l:function(e,t,n){if(i(e),t=a(t),i(n),u)try{return l(e,t,n)}catch(e){}if("get"in n||"set"in n)throw s("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var r,u,o,i=n(181),a=n(3),s=n(10),l=n(25),c=n(7),f=n(133),h=n(115),d=n(86),p=a.TypeError,g=a.WeakMap;if(i||f.state){var v=f.state||(f.state=new g);v.get=v.get,v.has=v.has,v.set=v.set,r=function(e,t){if(v.has(e))throw p("Object already initialized");return t.facade=e,v.set(e,t),t},u=function(e){return v.get(e)||{}},o=function(e){return v.has(e)}}else{var y=h("state");d[y]=!0,r=function(e,t){if(c(e,y))throw p("Object already initialized");return t.facade=e,l(e,y,t),t},u=function(e){return c(e,y)?e[y]:{}},o=function(e){return c(e,y)}}e.exports={set:r,get:u,has:o,enforce:function(e){return o(e)?u(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!s(t)||(n=u(t)).type!==e)throw p("Incompatible receiver, "+e+" required");return n}}}},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 u(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){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 r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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,a=!0,s=!1;return{s:function(){n=e[Symbol.iterator]()},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var i=n(13),a=n(55),s=n(40);t.str_utf8_length=function(e){return unescape(encodeURIComponent(e)).length};var l=t.isFunction=function(e){return void 0!==e&&"[object Function]"===Object.prototype.toString.call(e)};t.isString=function(e){return void 0!==e&&"[object String]"===Object.prototype.toString.call(e)},t.isDecimal=function(e){return!isNaN(e)&&parseFloat(e)===parseInt(e,10)},t.isEmpty=function(e){return null===e||""===e||void 0===e||Array.isArray(e)&&0===e.length||"number"==typeof e&&isNaN(e)},t.hasMethods=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var u=0,o=n;u<o.length;u++){var i=o[u];if(l(e[i]))return!1}return!0};var c=t.createRandomToken=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:32,r="";for(t=0;t<e;t++)r+=(Math.random()*n|0).toString(n);return r};t.newTag=function(){return c(10)},t.newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},t.hostType=function(e){if(e)return-1!==(e=s.parse(e,"host"))?e.host_type:void 0};var f=t.escapeUser=function(e){return encodeURIComponent(decodeURIComponent(e)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")};t.normalizeTarget=function(e,t){if(e){if(e instanceof a)return e;if("string"==typeof e){var n,r,u,o=e.split("@");switch(o.length){case 1:if(!t)return;n=e,r=t;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,"")),e="".concat(i.SIP,":").concat(f(n),"@").concat(r),(u=a.parse(e))?u:void 0}}else;},t.headerize=function(e){var t,n={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},r=e.toLowerCase().replace(/_/g,"-").split("-"),u="",o=r.length;for(t=0;t<o;t++)0!==t&&(u+="-"),u+=r[t].charAt(0).toUpperCase()+r[t].substring(1);return n[u]&&(u=n[u]),u},t.sipErrorCause=function(e){for(var t in i.SIP_ERROR_CAUSES)if(-1!==i.SIP_ERROR_CAUSES[t].indexOf(e))return i.causes[t];return i.causes.SIP_FAILURE_CODE},t.getRandomTestNetIP=function(){return"192.0.2.".concat((e=1,t=254,Math.floor(Math.random()*(t-e+1)+e)));var e,t},t.calculateMD5=function(e){function t(e,t){return e<<t|e>>>32-t}function n(e,t){var n=2147483648&e,r=2147483648&t,u=1073741824&e,o=1073741824&t,i=(1073741823&e)+(1073741823&t);return u&o?2147483648^i^n^r:u|o?1073741824&i?3221225472^i^n^r:1073741824^i^n^r:i^n^r}function r(e,r,u,o,i,a,s){return e=n(e,n(n(function(e,t,n){return e&t|~e&n}(r,u,o),i),s)),n(t(e,a),r)}function u(e,r,u,o,i,a,s){return e=n(e,n(n(function(e,t,n){return e&n|t&~n}(r,u,o),i),s)),n(t(e,a),r)}function o(e,r,u,o,i,a,s){return e=n(e,n(n(function(e,t,n){return e^t^n}(r,u,o),i),s)),n(t(e,a),r)}function i(e,r,u,o,i,a,s){return e=n(e,n(n(function(e,t,n){return t^(e|~n)}(r,u,o),i),s)),n(t(e,a),r)}function a(e){var t,n="",r="";for(t=0;t<=3;t++)n+=(r="0".concat((e>>>8*t&255).toString(16))).substr(r.length-2,2);return n}var s,l,c,f,h,d,p,g,v,y;for(s=function(e){for(var t,n=e.length,r=n+8,u=16*((r-r%64)/64+1),o=new Array(u-1),i=0,a=0;a<n;)i=a%4*8,o[t=(a-a%4)/4]=o[t]|e.charCodeAt(a)<<i,a++;return i=a%4*8,o[t=(a-a%4)/4]=o[t]|128<<i,o[u-2]=n<<3,o[u-1]=n>>>29,o}(e=function(e){for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(63&r|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(63&r|128))}return t}(e)),p=1732584193,g=4023233417,v=2562383102,y=271733878,l=0;l<s.length;l+=16)c=p,f=g,h=v,d=y,p=r(p,g,v,y,s[l+0],7,3614090360),y=r(y,p,g,v,s[l+1],12,3905402710),v=r(v,y,p,g,s[l+2],17,606105819),g=r(g,v,y,p,s[l+3],22,3250441966),p=r(p,g,v,y,s[l+4],7,4118548399),y=r(y,p,g,v,s[l+5],12,1200080426),v=r(v,y,p,g,s[l+6],17,2821735955),g=r(g,v,y,p,s[l+7],22,4249261313),p=r(p,g,v,y,s[l+8],7,1770035416),y=r(y,p,g,v,s[l+9],12,2336552879),v=r(v,y,p,g,s[l+10],17,4294925233),g=r(g,v,y,p,s[l+11],22,2304563134),p=r(p,g,v,y,s[l+12],7,1804603682),y=r(y,p,g,v,s[l+13],12,4254626195),v=r(v,y,p,g,s[l+14],17,2792965006),p=u(p,g=r(g,v,y,p,s[l+15],22,1236535329),v,y,s[l+1],5,4129170786),y=u(y,p,g,v,s[l+6],9,3225465664),v=u(v,y,p,g,s[l+11],14,643717713),g=u(g,v,y,p,s[l+0],20,3921069994),p=u(p,g,v,y,s[l+5],5,3593408605),y=u(y,p,g,v,s[l+10],9,38016083),v=u(v,y,p,g,s[l+15],14,3634488961),g=u(g,v,y,p,s[l+4],20,3889429448),p=u(p,g,v,y,s[l+9],5,568446438),y=u(y,p,g,v,s[l+14],9,3275163606),v=u(v,y,p,g,s[l+3],14,4107603335),g=u(g,v,y,p,s[l+8],20,1163531501),p=u(p,g,v,y,s[l+13],5,2850285829),y=u(y,p,g,v,s[l+2],9,4243563512),v=u(v,y,p,g,s[l+7],14,1735328473),p=o(p,g=u(g,v,y,p,s[l+12],20,2368359562),v,y,s[l+5],4,4294588738),y=o(y,p,g,v,s[l+8],11,2272392833),v=o(v,y,p,g,s[l+11],16,1839030562),g=o(g,v,y,p,s[l+14],23,4259657740),p=o(p,g,v,y,s[l+1],4,2763975236),y=o(y,p,g,v,s[l+4],11,1272893353),v=o(v,y,p,g,s[l+7],16,4139469664),g=o(g,v,y,p,s[l+10],23,3200236656),p=o(p,g,v,y,s[l+13],4,681279174),y=o(y,p,g,v,s[l+0],11,3936430074),v=o(v,y,p,g,s[l+3],16,3572445317),g=o(g,v,y,p,s[l+6],23,76029189),p=o(p,g,v,y,s[l+9],4,3654602809),y=o(y,p,g,v,s[l+12],11,3873151461),v=o(v,y,p,g,s[l+15],16,530742520),p=i(p,g=o(g,v,y,p,s[l+2],23,3299628645),v,y,s[l+0],6,4096336452),y=i(y,p,g,v,s[l+7],10,1126891415),v=i(v,y,p,g,s[l+14],15,2878612391),g=i(g,v,y,p,s[l+5],21,4237533241),p=i(p,g,v,y,s[l+12],6,1700485571),y=i(y,p,g,v,s[l+3],10,2399980690),v=i(v,y,p,g,s[l+10],15,4293915773),g=i(g,v,y,p,s[l+1],21,2240044497),p=i(p,g,v,y,s[l+8],6,1873313359),y=i(y,p,g,v,s[l+15],10,4264355552),v=i(v,y,p,g,s[l+6],15,2734768916),g=i(g,v,y,p,s[l+13],21,1309151649),p=i(p,g,v,y,s[l+4],6,4149444226),y=i(y,p,g,v,s[l+11],10,3174756917),v=i(v,y,p,g,s[l+2],15,718787259),g=i(g,v,y,p,s[l+9],21,3951481745),p=n(p,c),g=n(g,f),v=n(v,h),y=n(y,d);return(a(p)+a(g)+a(v)+a(y)).toLowerCase()},t.closeMediaStream=function(e){if(e)try{if(e.getTracks){var t,n=u(e.getTracks());try{for(n.s();!(t=n.n()).done;){t.value.stop()}}catch(e){n.e(e)}finally{n.f()}}else{var o,i=u(e.getAudioTracks());try{for(i.s();!(o=i.n()).done;){o.value.stop()}}catch(e){i.e(e)}finally{i.f()}var a,s=u(e.getVideoTracks());try{for(s.s();!(a=s.n()).done;){a.value.stop()}}catch(e){s.e(e)}finally{s.f()}}}catch(t){"function"!=typeof e.stop&&"object"!==r(e.stop)||e.stop()}},t.cloneArray=function(e){return e&&e.slice()||[]},t.cloneObject=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&Object.assign({},e)||t}},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));const r="undefined"!=typeof self?self:"undefined"!=typeof window?window:Function("return this")()},function(e,t){e.exports=!1},function(e,t,n){var r=n(47),u=n(1),o=n(66),i=n(15),a=n(14),s=n(198),l=u([].push),c=function(e){var t=1==e,n=2==e,u=3==e,c=4==e,f=6==e,h=7==e,d=5==e||f;return function(p,g,v,y){for(var m,_,b=i(p),A=o(b),C=r(g,v),E=a(A),w=0,S=y||s,D=t?S(p,E):n||h?S(p,0):void 0;E>w;w++)if((d||w in A)&&(_=C(m=A[w],w,b),e))if(t)D[w]=_;else if(_)switch(e){case 3:return!0;case 5:return m;case 6:return w;case 2:l(D,m)}else switch(e){case 4:return!1;case 7:l(D,m)}return f?-1:u||c?c:D}};e.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(e,t,n){var r=n(5),u=n(19),o=n(39);e.exports=r?function(e,t,n){return u.f(e,t,o(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var r=n(19).f,u=n(7),o=n(6)("toStringTag");e.exports=function(e,t,n){e&&!n&&(e=e.prototype),e&&!u(e,o)&&r(e,o,{configurable:!0,value:t})}},function(e,t,n){var r=n(183),u=n(19);e.exports=function(e,t,n){return n.get&&r(n.get,t,{getter:!0}),n.set&&r(n.set,t,{setter:!0}),u.f(e,t,n)}},function(e,t,n){var r=n(8),u=n(56),o=TypeError;e.exports=function(e){if(r(e))return e;throw o(u(e)+" is not a function")}},function(e,t,n){var r=n(66),u=n(35);e.exports=function(e){return r(u(e))}},function(e,t,n){var r=n(1),u=r({}.toString),o=r("".slice);e.exports=function(e){return o(u(e),8,-1)}},function(e,t,n){var r=n(276);e.exports=function(e){var t=+e;return t!=t||0===t?0:r(t)}},function(e,t,n){"use strict";function r(e){if(e)return function(e){for(var t in r.prototype)e[t]=r.prototype[t];return e}(e)}n.d(t,"a",(function(){return r})),r.prototype.on=r.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},r.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},r.prototype.off=r.prototype.removeListener=r.prototype.removeAllListeners=r.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(1==arguments.length)return delete this._callbacks["$"+e],this;for(var u=0;u<r.length;u++)if((n=r[u])===t||n.fn===t){r.splice(u,1);break}return 0===r.length&&delete this._callbacks["$"+e],this},r.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var u=(n=n.slice(0)).length;r<u;++r)n[r].apply(this,t)}return this},r.prototype.emitReserved=r.prototype.emit,r.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},r.prototype.hasListeners=function(e){return!!this.listeners(e).length}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"b",(function(){return a})),n.d(t,"a",(function(){return s}));var r=n(22);function u(e,...t){return t.reduce((t,n)=>(e.hasOwnProperty(n)&&(t[n]=e[n]),t),{})}const o=r.a.setTimeout,i=r.a.clearTimeout;function a(e,t){t.useNativeTimers?(e.setTimeoutFn=o.bind(r.a),e.clearTimeoutFn=i.bind(r.a)):(e.setTimeoutFn=r.a.setTimeout.bind(r.a),e.clearTimeoutFn=r.a.clearTimeout.bind(r.a))}function s(e){return"string"==typeof e?function(e){let t=0,n=0;for(let r=0,u=e.length;r<u;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}(e):Math.ceil(1.33*(e.byteLength||e.size))}},function(e,t,n){"use strict";n.d(t,"c",(function(){return u})),n.d(t,"a",(function(){return o})),n.d(t,"d",(function(){return i})),n.d(t,"b",(function(){return a}));var r=n(22);const u="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),o=r.a.WebSocket||r.a.MozWebSocket,i=!0,a="arraybuffer"},function(e,t,n){var r=n(43),u=TypeError;e.exports=function(e){if(r(e))throw u("Can't call method on "+e);return e}},function(e,t,n){var r=n(1);e.exports=r({}.isPrototypeOf)},function(e,t,n){var r,u=n(11),o=n(178),i=n(136),a=n(86),s=n(180),l=n(113),c=n(115),f=c("IE_PROTO"),h=function(){},d=function(e){return"<script>"+e+"<\/script>"},p=function(e){e.write(d("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t;g="undefined"!=typeof document?document.domain&&r?p(r):((t=l("iframe")).style.display="none",s.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(d("document.F=Object")),e.close(),e.F):p(r);for(var n=i.length;n--;)delete g.prototype[i[n]];return g()};a[f]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h.prototype=u(e),n=new h,h.prototype=null,n[f]=e):n=g(),void 0===t?n:o.f(n,t)}},function(e,t,n){var r=n(31),u=Math.min;e.exports=function(e){return e>0?u(r(e),9007199254740991):0}},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";e.exports=function(){function e(e){return'"'+e.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 t={parse:function(t,r){var u={CRLF:l,DIGIT:c,ALPHA:f,HEXDIG:h,WSP:d,OCTET:p,DQUOTE:g,SP:v,HTAB:y,alphanum:m,reserved:_,unreserved:b,mark:A,escaped:C,LWS:E,SWS:w,HCOLON:S,TEXT_UTF8_TRIM:D,TEXT_UTF8char:T,UTF8_NONASCII:x,UTF8_CONT:O,LHEX:function(){var e;null===(e=c())&&(/^[a-f]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[a-f]")));return e},token:R,token_nodot:k,separators:function(){var e;40===t.charCodeAt(o)?(e="(",o++):(e=null,s('"("'));null===e&&(41===t.charCodeAt(o)?(e=")",o++):(e=null,s('")"')),null===e&&(60===t.charCodeAt(o)?(e="<",o++):(e=null,s('"<"')),null===e&&(62===t.charCodeAt(o)?(e=">",o++):(e=null,s('">"')),null===e&&(64===t.charCodeAt(o)?(e="@",o++):(e=null,s('"@"')),null===e&&(44===t.charCodeAt(o)?(e=",",o++):(e=null,s('","')),null===e&&(59===t.charCodeAt(o)?(e=";",o++):(e=null,s('";"')),null===e&&(58===t.charCodeAt(o)?(e=":",o++):(e=null,s('":"')),null===e&&(92===t.charCodeAt(o)?(e="\\",o++):(e=null,s('"\\\\"')),null===e&&null===(e=g())&&(47===t.charCodeAt(o)?(e="/",o++):(e=null,s('"/"')),null===e&&(91===t.charCodeAt(o)?(e="[",o++):(e=null,s('"["')),null===e&&(93===t.charCodeAt(o)?(e="]",o++):(e=null,s('"]"')),null===e&&(63===t.charCodeAt(o)?(e="?",o++):(e=null,s('"?"')),null===e&&(61===t.charCodeAt(o)?(e="=",o++):(e=null,s('"="')),null===e&&(123===t.charCodeAt(o)?(e="{",o++):(e=null,s('"{"')),null===e&&(125===t.charCodeAt(o)?(e="}",o++):(e=null,s('"}"')),null===e&&null===(e=v())&&(e=y()))))))))))))))));return e},word:I,STAR:F,SLASH:N,EQUAL:P,LPAREN:B,RPAREN:M,RAQUOT:L,LAQUOT:U,COMMA:j,SEMI:q,COLON:H,LDQUOT:G,RDQUOT:Y,comment:function e(){var t,n,r,u;if(u=o,null!==(t=B())){for(n=[],null===(r=W())&&null===(r=X())&&(r=e());null!==r;)n.push(r),null===(r=W())&&null===(r=X())&&(r=e());null!==n&&null!==(r=M())?t=[t,n,r]:(t=null,o=u)}else t=null,o=u;return t},ctext:W,quoted_string:V,quoted_string_clean:K,qdtext:J,quoted_pair:X,SIP_URI_noparams:z,SIP_URI:Q,uri_scheme:Z,uri_scheme_sips:$,uri_scheme_sip:ee,userinfo:te,user:ne,user_unreserved:re,password:ue,hostport:oe,host:ie,hostname:ae,domainlabel:se,toplabel:le,IPv6reference:ce,IPv6address:fe,h16:he,ls32:de,IPv4address:pe,dec_octet:ge,port:ve,uri_parameters:ye,uri_parameter:me,transport_param:_e,user_param:be,method_param:Ae,ttl_param:Ce,maddr_param:Ee,lr_param:we,other_param:Se,pname:De,pvalue:Te,paramchar:xe,param_unreserved:Oe,headers:Re,header:ke,hname:Ie,hvalue:Fe,hnv_unreserved:Ne,Request_Response:function(){var e;null===(e=ct())&&(e=Pe());return e},Request_Line:Pe,Request_URI:Be,absoluteURI:Me,hier_part:Le,net_path:Ue,abs_path:je,opaque_part:qe,uric:He,uric_no_slash:Ge,path_segments:Ye,segment:We,param:Ve,pchar:Ke,scheme:Je,authority:Xe,srvr:ze,reg_name:Qe,query:Ze,SIP_Version:$e,INVITEm:et,ACKm:tt,OPTIONSm:nt,BYEm:rt,CANCELm:ut,REGISTERm:ot,SUBSCRIBEm:it,NOTIFYm:at,REFERm:st,Method:lt,Status_Line:ct,Status_Code:ft,extension_code:ht,Reason_Phrase:dt,Allow_Events:function(){var e,t,n,r,u,i;if(u=o,null!==(e=Mt())){for(t=[],i=o,null!==(n=j())&&null!==(r=Mt())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=Mt())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},Call_ID:function(){var e,n,r,u,i,a;u=o,i=o,null!==(e=I())?(a=o,64===t.charCodeAt(o)?(n="@",o++):(n=null,s('"@"')),null!==n&&null!==(r=I())?n=[n,r]:(n=null,o=a),null!==(n=null!==n?n:"")?e=[e,n]:(e=null,o=i)):(e=null,o=i);null!==e&&(e=function(e){jn=t.substring(o,e)}(u));null===e&&(o=u);return e},Contact:function(){var e,t,n,r,u,i,a;if(u=o,null===(e=F()))if(i=o,null!==(e=pt())){for(t=[],a=o,null!==(n=j())&&null!==(r=pt())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=j())&&null!==(r=pt())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(e=function(e){var t,n;for(n=jn.multi_header.length,t=0;t<n;t++)if(null===jn.multi_header[t].parsed){jn=null;break}jn=null!==jn?jn.multi_header:-1}());null===e&&(o=u);return e},contact_param:pt,name_addr:gt,display_name:vt,contact_params:yt,c_p_q:mt,c_p_expires:_t,delta_seconds:bt,qvalue:At,generic_param:Ct,gen_value:Et,Content_Disposition:function(){var e,t,n,r,u,i;if(u=o,null!==(e=wt())){for(t=[],i=o,null!==(n=q())&&null!==(r=St())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=q())&&null!==(r=St())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},disp_type:wt,disp_param:St,handling_param:Dt,Content_Encoding:function(){var e,t,n,r,u,i;if(u=o,null!==(e=R())){for(t=[],i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},Content_Length:function(){var e,t,n;if(n=o,null!==(t=c()))for(e=[];null!==t;)e.push(t),t=c();else e=null;null!==e&&(e=void(jn=parseInt(e.join(""))));null===e&&(o=n);return e},Content_Type:function(){var e,n;n=o,null!==(e=Tt())&&(e=function(e){jn=t.substring(o,e)}(n));null===e&&(o=n);return e},media_type:Tt,m_type:xt,discrete_type:Ot,composite_type:Rt,extension_token:kt,x_token:It,m_subtype:Ft,m_parameter:Nt,m_value:Pt,CSeq:function(){var e,t,n,r;r=o,null!==(e=Bt())&&null!==(t=E())&&null!==(n=lt())?e=[e,t,n]:(e=null,o=r);return e},CSeq_value:Bt,Expires:function(){var e,t;t=o,null!==(e=bt())&&(e=void(jn=e));null===e&&(o=t);return e},Event:function(){var e,t,n,r,u,i,a;if(u=o,i=o,null!==(e=Mt())){for(t=[],a=o,null!==(n=q())&&null!==(r=Ct())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=q())&&null!==(r=Ct())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(s=e[0],e=void(jn.event=s.join("").toLowerCase()));var s;null===e&&(o=u);return e},event_type:Mt,From:function(){var e,t,n,r,u,i,a;u=o,i=o,null===(e=z())&&(e=gt());if(null!==e){for(t=[],a=o,null!==(n=q())&&null!==(r=Lt())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=q())&&null!==(r=Lt())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(e=function(e){var t=jn.tag;try{jn=new Un(jn.uri,jn.display_name,jn.params),t&&jn.setParam("tag",t)}catch(e){jn=-1}}());null===e&&(o=u);return e},from_param:Lt,tag_param:Ut,Max_Forwards:function(){var e,t,n;if(n=o,null!==(t=c()))for(e=[];null!==t;)e.push(t),t=c();else e=null;null!==e&&(e=void(jn=parseInt(e.join(""))));null===e&&(o=n);return e},Min_Expires:function(){var e,t;t=o,null!==(e=bt())&&(e=void(jn=e));null===e&&(o=t);return e},Name_Addr_Header:function(){var e,t,n,r,u,i,a,s,l,c;s=o,l=o,e=[],t=vt();for(;null!==t;)e.push(t),t=vt();if(null!==e)if(null!==(t=U()))if(null!==(n=Q()))if(null!==(r=L())){for(u=[],c=o,null!==(i=q())&&null!==(a=Ct())?i=[i,a]:(i=null,o=c);null!==i;)u.push(i),c=o,null!==(i=q())&&null!==(a=Ct())?i=[i,a]:(i=null,o=c);null!==u?e=[e,t,n,r,u]:(e=null,o=l)}else e=null,o=l;else e=null,o=l;else e=null,o=l;else e=null,o=l;null!==e&&(e=function(e){try{jn=new Un(jn.uri,jn.display_name,jn.params)}catch(e){jn=-1}}());null===e&&(o=s);return e},Proxy_Authenticate:function(){return jt()},challenge:jt,other_challenge:qt,auth_param:Ht,digest_cln:Gt,realm:Yt,realm_value:Wt,domain:Vt,URI:Kt,nonce:Jt,nonce_value:Xt,opaque:zt,stale:Qt,algorithm:Zt,qop_options:$t,qop_value:en,Proxy_Require:function(){var e,t,n,r,u,i;if(u=o,null!==(e=R())){for(t=[],i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},Record_Route:function(){var e,t,n,r,u,i,a;if(u=o,i=o,null!==(e=tn())){for(t=[],a=o,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(e=function(e){var t,n;for(n=jn.multi_header.length,t=0;t<n;t++)if(null===jn.multi_header[t].parsed){jn=null;break}jn=null!==jn?jn.multi_header:-1}());null===e&&(o=u);return e},rec_route:tn,Reason:function(){var e,n,r,u,i,a,l;i=o,a=o,"sip"===t.substr(o,3).toLowerCase()?(e=t.substr(o,3),o+=3):(e=null,s('"SIP"'));null===e&&(e=R());if(null!==e){for(n=[],l=o,null!==(r=q())&&null!==(u=nn())?r=[r,u]:(r=null,o=l);null!==r;)n.push(r),l=o,null!==(r=q())&&null!==(u=nn())?r=[r,u]:(r=null,o=l);null!==n?e=[e,n]:(e=null,o=a)}else e=null,o=a;null!==e&&(e=function(e,t){if(jn.protocol=t.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,e[0]));null===e&&(o=i);return e},reason_param:nn,reason_cause:rn,Require:function(){var e,t,n,r,u,i;if(u=o,null!==(e=R())){for(t=[],i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},Route:function(){var e,t,n,r,u,i;if(u=o,null!==(e=un())){for(t=[],i=o,null!==(n=j())&&null!==(r=un())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=un())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},route_param:un,Subscription_State:function(){var e,t,n,r,u,i;if(u=o,null!==(e=on())){for(t=[],i=o,null!==(n=q())&&null!==(r=an())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=q())&&null!==(r=an())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},substate_value:on,subexp_params:an,event_reason_value:sn,Subject:function(){var e;return e=null!==(e=D())?e:""},Supported:function(){var e,t,n,r,u,i;if(u=o,null!==(e=R())){for(t=[],i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=R())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e=null!==e?e:""},To:function(){var e,t,n,r,u,i,a;u=o,i=o,null===(e=z())&&(e=gt());if(null!==e){for(t=[],a=o,null!==(n=q())&&null!==(r=ln())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=q())&&null!==(r=ln())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(e=function(e){var t=jn.tag;try{jn=new Un(jn.uri,jn.display_name,jn.params),t&&jn.setParam("tag",t)}catch(e){jn=-1}}());null===e&&(o=u);return e},to_param:ln,Via:function(){var e,t,n,r,u,i;if(u=o,null!==(e=cn())){for(t=[],i=o,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},via_param:cn,via_params:fn,via_ttl:hn,via_maddr:dn,via_received:pn,via_branch:gn,response_port:vn,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 jt()},Session_Expires:function(){var e,t,n,r,u,i;if(u=o,null!==(e=Sn())){for(t=[],i=o,null!==(n=q())&&null!==(r=Dn())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=q())&&null!==(r=Dn())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},s_e_expires:Sn,s_e_params:Dn,s_e_refresher:Tn,extension_header:function(){var e,t,n,r;r=o,null!==(e=R())&&null!==(t=S())&&null!==(n=xn())?e=[e,t,n]:(e=null,o=r);return e},header_value:xn,message_body:function(){var e,t;e=[],t=p();for(;null!==t;)e.push(t),t=p();return e},uuid_URI:function(){var e,n,r;r=o,"uuid:"===t.substr(o,5)?(e="uuid:",o+=5):(e=null,s('"uuid:"'));null!==e&&null!==(n=On())?e=[e,n]:(e=null,o=r);return e},uuid:On,hex4:Rn,hex8:kn,hex12:In,Refer_To:function(){var e,t,n,r,u,i,a;u=o,i=o,null===(e=z())&&(e=gt());if(null!==e){for(t=[],a=o,null!==(n=q())&&null!==(r=Ct())?n=[n,r]:(n=null,o=a);null!==n;)t.push(n),a=o,null!==(n=q())&&null!==(r=Ct())?n=[n,r]:(n=null,o=a);null!==t?e=[e,t]:(e=null,o=i)}else e=null,o=i;null!==e&&(e=function(e){try{jn=new Un(jn.uri,jn.display_name,jn.params)}catch(e){jn=-1}}());null===e&&(o=u);return e},Replaces:function(){var e,t,n,r,u,i;if(u=o,null!==(e=Fn())){for(t=[],i=o,null!==(n=q())&&null!==(r=Nn())?n=[n,r]:(n=null,o=i);null!==n;)t.push(n),i=o,null!==(n=q())&&null!==(r=Nn())?n=[n,r]:(n=null,o=i);null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return e},call_id:Fn,replaces_param:Nn,to_tag:Pn,from_tag:Bn,early_flag:Mn};if(void 0!==r){if(void 0===u[r])throw new Error("Invalid rule name: "+e(r)+".")}else r="CRLF";var o=0,i=0,a=[];function s(e){o<i||(o>i&&(i=o,a=[]),a.push(e))}function l(){var e;return"\r\n"===t.substr(o,2)?(e="\r\n",o+=2):(e=null,s('"\\r\\n"')),e}function c(){var e;return/^[0-9]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[0-9]")),e}function f(){var e;return/^[a-zA-Z]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[a-zA-Z]")),e}function h(){var e;return/^[0-9a-fA-F]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[0-9a-fA-F]")),e}function d(){var e;return null===(e=v())&&(e=y()),e}function p(){var e;return/^[\0-\xFF]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[\\0-\\xFF]")),e}function g(){var e;return/^["]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s('["]')),e}function v(){var e;return 32===t.charCodeAt(o)?(e=" ",o++):(e=null,s('" "')),e}function y(){var e;return 9===t.charCodeAt(o)?(e="\t",o++):(e=null,s('"\\t"')),e}function m(){var e;return/^[a-zA-Z0-9]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[a-zA-Z0-9]")),e}function _(){var e;return 59===t.charCodeAt(o)?(e=";",o++):(e=null,s('";"')),null===e&&(47===t.charCodeAt(o)?(e="/",o++):(e=null,s('"/"')),null===e&&(63===t.charCodeAt(o)?(e="?",o++):(e=null,s('"?"')),null===e&&(58===t.charCodeAt(o)?(e=":",o++):(e=null,s('":"')),null===e&&(64===t.charCodeAt(o)?(e="@",o++):(e=null,s('"@"')),null===e&&(38===t.charCodeAt(o)?(e="&",o++):(e=null,s('"&"')),null===e&&(61===t.charCodeAt(o)?(e="=",o++):(e=null,s('"="')),null===e&&(43===t.charCodeAt(o)?(e="+",o++):(e=null,s('"+"')),null===e&&(36===t.charCodeAt(o)?(e="$",o++):(e=null,s('"$"')),null===e&&(44===t.charCodeAt(o)?(e=",",o++):(e=null,s('","'))))))))))),e}function b(){var e;return null===(e=m())&&(e=A()),e}function A(){var e;return 45===t.charCodeAt(o)?(e="-",o++):(e=null,s('"-"')),null===e&&(95===t.charCodeAt(o)?(e="_",o++):(e=null,s('"_"')),null===e&&(46===t.charCodeAt(o)?(e=".",o++):(e=null,s('"."')),null===e&&(33===t.charCodeAt(o)?(e="!",o++):(e=null,s('"!"')),null===e&&(126===t.charCodeAt(o)?(e="~",o++):(e=null,s('"~"')),null===e&&(42===t.charCodeAt(o)?(e="*",o++):(e=null,s('"*"')),null===e&&(39===t.charCodeAt(o)?(e="'",o++):(e=null,s('"\'"')),null===e&&(40===t.charCodeAt(o)?(e="(",o++):(e=null,s('"("')),null===e&&(41===t.charCodeAt(o)?(e=")",o++):(e=null,s('")"')))))))))),e}function C(){var e,n,r,u,i;return u=o,i=o,37===t.charCodeAt(o)?(e="%",o++):(e=null,s('"%"')),null!==e&&null!==(n=h())&&null!==(r=h())?e=[e,n,r]:(e=null,o=i),null!==e&&(e=e.join("")),null===e&&(o=u),e}function E(){var e,t,n,r,u,i;for(r=o,u=o,i=o,e=[],t=d();null!==t;)e.push(t),t=d();if(null!==e&&null!==(t=l())?e=[e,t]:(e=null,o=i),null!==(e=null!==e?e:"")){if(null!==(n=d()))for(t=[];null!==n;)t.push(n),n=d();else t=null;null!==t?e=[e,t]:(e=null,o=u)}else e=null,o=u;return null!==e&&(e=" "),null===e&&(o=r),e}function w(){var e;return e=null!==(e=E())?e:""}function S(){var e,n,r,u,i;for(u=o,i=o,e=[],null===(n=v())&&(n=y());null!==n;)e.push(n),null===(n=v())&&(n=y());return null!==e?(58===t.charCodeAt(o)?(n=":",o++):(n=null,s('":"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e=":"),null===e&&(o=u),e}function D(){var e,n,r,u,i,a,s;if(i=o,a=o,null!==(n=T()))for(e=[];null!==n;)e.push(n),n=T();else e=null;if(null!==e){for(n=[],s=o,r=[],u=E();null!==u;)r.push(u),u=E();for(null!==r&&null!==(u=T())?r=[r,u]:(r=null,o=s);null!==r;){for(n.push(r),s=o,r=[],u=E();null!==u;)r.push(u),u=E();null!==r&&null!==(u=T())?r=[r,u]:(r=null,o=s)}null!==n?e=[e,n]:(e=null,o=a)}else e=null,o=a;return null!==e&&(e=function(e){return t.substring(o,e)}(i)),null===e&&(o=i),e}function T(){var e;return/^[!-~]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[!-~]")),null===e&&(e=x()),e}function x(){var e;return/^[\x80-\uFFFF]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[\\x80-\\uFFFF]")),e}function O(){var e;return/^[\x80-\xBF]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[\\x80-\\xBF]")),e}function R(){var e,n,r;if(r=o,null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(46===t.charCodeAt(o)?(n=".",o++):(n=null,s('"."')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"')))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(46===t.charCodeAt(o)?(n=".",o++):(n=null,s('"."')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"'))))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(o,e)}(r)),null===e&&(o=r),e}function k(){var e,n,r;if(r=o,null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"'))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"')))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(o,e)}(r)),null===e&&(o=r),e}function I(){var e,n,r;if(r=o,null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(46===t.charCodeAt(o)?(n=".",o++):(n=null,s('"."')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"')),null===n&&(40===t.charCodeAt(o)?(n="(",o++):(n=null,s('"("')),null===n&&(41===t.charCodeAt(o)?(n=")",o++):(n=null,s('")"')),null===n&&(60===t.charCodeAt(o)?(n="<",o++):(n=null,s('"<"')),null===n&&(62===t.charCodeAt(o)?(n=">",o++):(n=null,s('">"')),null===n&&(58===t.charCodeAt(o)?(n=":",o++):(n=null,s('":"')),null===n&&(92===t.charCodeAt(o)?(n="\\",o++):(n=null,s('"\\\\"')),null===n&&null===(n=g())&&(47===t.charCodeAt(o)?(n="/",o++):(n=null,s('"/"')),null===n&&(91===t.charCodeAt(o)?(n="[",o++):(n=null,s('"["')),null===n&&(93===t.charCodeAt(o)?(n="]",o++):(n=null,s('"]"')),null===n&&(63===t.charCodeAt(o)?(n="?",o++):(n=null,s('"?"')),null===n&&(123===t.charCodeAt(o)?(n="{",o++):(n=null,s('"{"')),null===n&&(125===t.charCodeAt(o)?(n="}",o++):(n=null,s('"}"')))))))))))))))))))))))),null!==n)for(e=[];null!==n;)e.push(n),null===(n=m())&&(45===t.charCodeAt(o)?(n="-",o++):(n=null,s('"-"')),null===n&&(46===t.charCodeAt(o)?(n=".",o++):(n=null,s('"."')),null===n&&(33===t.charCodeAt(o)?(n="!",o++):(n=null,s('"!"')),null===n&&(37===t.charCodeAt(o)?(n="%",o++):(n=null,s('"%"')),null===n&&(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null===n&&(95===t.charCodeAt(o)?(n="_",o++):(n=null,s('"_"')),null===n&&(43===t.charCodeAt(o)?(n="+",o++):(n=null,s('"+"')),null===n&&(96===t.charCodeAt(o)?(n="`",o++):(n=null,s('"`"')),null===n&&(39===t.charCodeAt(o)?(n="'",o++):(n=null,s('"\'"')),null===n&&(126===t.charCodeAt(o)?(n="~",o++):(n=null,s('"~"')),null===n&&(40===t.charCodeAt(o)?(n="(",o++):(n=null,s('"("')),null===n&&(41===t.charCodeAt(o)?(n=")",o++):(n=null,s('")"')),null===n&&(60===t.charCodeAt(o)?(n="<",o++):(n=null,s('"<"')),null===n&&(62===t.charCodeAt(o)?(n=">",o++):(n=null,s('">"')),null===n&&(58===t.charCodeAt(o)?(n=":",o++):(n=null,s('":"')),null===n&&(92===t.charCodeAt(o)?(n="\\",o++):(n=null,s('"\\\\"')),null===n&&null===(n=g())&&(47===t.charCodeAt(o)?(n="/",o++):(n=null,s('"/"')),null===n&&(91===t.charCodeAt(o)?(n="[",o++):(n=null,s('"["')),null===n&&(93===t.charCodeAt(o)?(n="]",o++):(n=null,s('"]"')),null===n&&(63===t.charCodeAt(o)?(n="?",o++):(n=null,s('"?"')),null===n&&(123===t.charCodeAt(o)?(n="{",o++):(n=null,s('"{"')),null===n&&(125===t.charCodeAt(o)?(n="}",o++):(n=null,s('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(e=function(e){return t.substring(o,e)}(r)),null===e&&(o=r),e}function F(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(42===t.charCodeAt(o)?(n="*",o++):(n=null,s('"*"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e="*"),null===e&&(o=u),e}function N(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(47===t.charCodeAt(o)?(n="/",o++):(n=null,s('"/"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e="/"),null===e&&(o=u),e}function P(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(61===t.charCodeAt(o)?(n="=",o++):(n=null,s('"="')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e="="),null===e&&(o=u),e}function B(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(40===t.charCodeAt(o)?(n="(",o++):(n=null,s('"("')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e="("),null===e&&(o=u),e}function M(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(41===t.charCodeAt(o)?(n=")",o++):(n=null,s('")"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e=")"),null===e&&(o=u),e}function L(){var e,n,r,u;return r=o,u=o,62===t.charCodeAt(o)?(e=">",o++):(e=null,s('">"')),null!==e&&null!==(n=w())?e=[e,n]:(e=null,o=u),null!==e&&(e=">"),null===e&&(o=r),e}function U(){var e,n,r,u;return r=o,u=o,null!==(e=w())?(60===t.charCodeAt(o)?(n="<",o++):(n=null,s('"<"')),null!==n?e=[e,n]:(e=null,o=u)):(e=null,o=u),null!==e&&(e="<"),null===e&&(o=r),e}function j(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(44===t.charCodeAt(o)?(n=",",o++):(n=null,s('","')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e=","),null===e&&(o=u),e}function q(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(59===t.charCodeAt(o)?(n=";",o++):(n=null,s('";"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e=";"),null===e&&(o=u),e}function H(){var e,n,r,u,i;return u=o,i=o,null!==(e=w())?(58===t.charCodeAt(o)?(n=":",o++):(n=null,s('":"')),null!==n&&null!==(r=w())?e=[e,n,r]:(e=null,o=i)):(e=null,o=i),null!==e&&(e=":"),null===e&&(o=u),e}function G(){var e,t,n,r;return n=o,r=o,null!==(e=w())&&null!==(t=g())?e=[e,t]:(e=null,o=r),null!==e&&(e='"'),null===e&&(o=n),e}function Y(){var e,t,n,r;return n=o,r=o,null!==(e=g())&&null!==(t=w())?e=[e,t]:(e=null,o=r),null!==e&&(e='"'),null===e&&(o=n),e}function W(){var e;return/^[!-']/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[!-']")),null===e&&(/^[*-[]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[*-[]")),null===e&&(/^[\]-~]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[\\]-~]")),null===e&&null===(e=x())&&(e=E()))),e}function V(){var e,n,r,u,i,a;if(i=o,a=o,null!==(e=w()))if(null!==(n=g())){for(r=[],null===(u=J())&&(u=X());null!==u;)r.push(u),null===(u=J())&&(u=X());null!==r&&null!==(u=g())?e=[e,n,r,u]:(e=null,o=a)}else e=null,o=a;else e=null,o=a;return null!==e&&(e=function(e){return t.substring(o,e)}(i)),null===e&&(o=i),e}function K(){var e,n,r,u,i,a;if(i=o,a=o,null!==(e=w()))if(null!==(n=g())){for(r=[],null===(u=J())&&(u=X());null!==u;)r.push(u),null===(u=J())&&(u=X());null!==r&&null!==(u=g())?e=[e,n,r,u]:(e=null,o=a)}else e=null,o=a;else e=null,o=a;return null!==e&&(e=function(e){var n=t.substring(o,e).trim();return n.substring(1,n.length-1).replace(/\\([\x00-\x09\x0b-\x0c\x0e-\x7f])/g,"$1")}(i)),null===e&&(o=i),e}function J(){var e;return null===(e=E())&&(33===t.charCodeAt(o)?(e="!",o++):(e=null,s('"!"')),null===e&&(/^[#-[]/.test(t.charAt(o))?(e=t.charAt(o),o++):(e=null,s("[#-[]")),null===e&&(/^[\]-~]/.test(t.charAt(o))?(e=t.char