UNPKG

25.7 kBJavaScriptView Raw
1!function i(a,s,c){function u(t,e){if(!s[t]){if(!a[t]){var n="function"==typeof require&&require;if(!e&&n)return n(t,!0);if(l)return l(t,!0);var r=new Error("Cannot find module '"+t+"'");throw r.code="MODULE_NOT_FOUND",r}var o=s[t]={exports:{}};a[t][0].call(o.exports,function(e){return u(a[t][1][e]||e)},o,o.exports,i,a,s,c)}return s[t].exports}for(var l="function"==typeof require&&require,e=0;e<c.length;e++)u(c[e]);return u}({1:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r,o=(r=e("./lib/index"))&&r.__esModule?r:{default:r};
2/*!
3 * <%= name %> version: <%= version %>
4 * Built on: <%= (new Date).toISOString() %>
5 * Released under the Apache License, Version 2.0
6 * @copyright Realeyes OU. All rights reserved.
7 */
8window.Realeyesit=window.Realeyesit||{},window.Realeyesit.EnvironmentDetector={detect:o.default};var i=window.Realeyesit.EnvironmentDetector;n.default=i},{"./lib/index":4}],2:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r,o=(r=e("./utils/getFirstMatch"))&&r.__esModule?r:{default:r};var i={OPERA:"Opera",SAMSUNG_BROWSER:"Samsung Internet for Android",YANDEX_BROWSER:"Yandex Browser",PUFFIN:"Puffin",K_MELEON:"K-Meleon",WINDOWS_PHONE:"Windows Phone",INTERNET_EXPLORER:"Internet Explorer",MICROSOFT_EDGE:"Microsoft Edge",FIREFOX:"Firefox",AMAZON_SILK:"Amazon Silk",PHANTOM_JS:"PhantomJS",CHROMIUM:"Chromium",CHROME:"Chrome",ANDROID:"Android",SAFARI:"Safari",VIVALDI:"Vivaldi",UC_BROWSER:"UC Browser",SEAMONKEY:"SeaMonkey",IOS_WEBVIEW:"iOS WebView",UNKNOWN:"Unknown"},a=[{browserName:i.VIVALDI,testRegex:/vivaldi/i,versionRegex:/(?:vivaldi)[\s/](\d+(\.\d+)?)/i},{browserName:i.UC_BROWSER,testRegex:/ucbrowser/i,versionRegex:/(?:ucbrowser)[\s/](\d+(\.\d+)?)/i},{browserName:i.SEAMONKEY,testRegex:/seamonkey/i,versionRegex:/(?:seamonkey)[\s/](\d+(\.\d+)?)/i},{browserName:i.OPERA,testRegex:/opera|opios|opr\//i,versionRegex:/(?:opera |opios\/|opr\/)(\d+(\.\d+)?)/i},{browserName:i.SAMSUNG_BROWSER,testRegex:/SamsungBrowser/i,versionRegex:/(?:SamsungBrowser)[\s/](\d+(\.\d+)?)/i},{browserName:i.YANDEX_BROWSER,testRegex:/yabrowser/i,versionRegex:/(?:yabrowser)[\s/](\d+(\.\d+)?)/i},{browserName:i.PUFFIN,testRegex:/puffin/i,versionRegex:/(?:puffin)[\s/](\d+(?:\.\d+)?)/i},{browserName:i.K_MELEON,testRegex:/k-meleon/i,versionRegex:/(?:k-meleon)[\s/](\d+(?:\.\d+)+)/i},{browserName:i.WINDOWS_PHONE,testRegex:/windows phone/i,versionRegex:/(?:iemobile|edge)\/(\d+(\.\d+)?)/i},{browserName:i.INTERNET_EXPLORER,testRegex:/msie|trident/i,versionRegex:/(?:msie |rv:)(\d+(\.\d+)?)/i},{browserName:i.MICROSOFT_EDGE,testRegex:/chrome.+? edge/i,versionRegex:/edge\/(\d+(\.\d+)?)/i},{browserName:i.FIREFOX,testRegex:/firefox|iceweasel|fxios/i,versionRegex:/(?:firefox|iceweasel|fxios)[ /](\d+(\.\d+)?)/i},{browserName:i.AMAZON_SILK,testRegex:/silk/i,versionRegex:/silk\/(\d+(\.\d+)?)/i},{browserName:i.PHANTOM_JS,testRegex:/phantom/i,versionRegex:/phantomjs\/(\d+(\.\d+)?)/i},{browserName:i.CHROMIUM,testRegex:/chromium/i,versionRegex:/(?:chromium)[\s/](\d+(?:\.\d+)?)/i},{browserName:i.CHROME,testRegex:/chrome|crios|crmo/i,versionRegex:/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i},{browserName:i.ANDROID,testRegex:/android/i,versionRegex:null},{browserName:i.SAFARI,testRegex:/safari/i,versionRegex:/version\/(\d+(\.\d+)?)/i},{browserName:i.IOS_WEBVIEW,testRegex:/(iPhone|iPad).*AppleWebKit(?!.*Safari)/i,versionRegex:null}],s={names:i,detect:function(e){for(var t=0;t<a.length;t++)if(a[t].testRegex.test(e))return{name:a[t].browserName,version:(0,o.default)(e,a[t].versionRegex)||(0,o.default)(e,/version\/(\d+(\.\d+)?)/i)||null};return{name:i.UNKNOWN,version:null}}};n.default=s},{"./utils/getFirstMatch":9}],3:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r={GET_USER_MEDIA:"navigator.getUserMedia",MEDIA_RECORDER:"MediaRecorder",WEBCAM:"webcam",DOCUMENT_ALL:"document.all",DOCUMENT_QUERY_SELECTOR:"document.querySelector",HTTP:"http",HTTPS:"https",LOCALHOST:"localhost"},o=[{capabilityName:r.GET_USER_MEDIA,test:function(){return!!(navigator.getUserMedia||navigator.webkitGetUserMedia||navigator.mozGetUserMedia||navigator.msGetUserMedia||navigator.mediaDevices&&navigator.mediaDevices.getUserMedia)}},{capabilityName:r.MEDIA_RECORDER,test:function(){return"function"==typeof window.MediaRecorder}},{capabilityName:r.DOCUMENT_ALL,test:function(){return void 0!==document.querySelector}},{capabilityName:r.DOCUMENT_QUERY_SELECTOR,test:function(){return"function"==typeof document.querySelector}},{capabilityName:r.HTTP,test:function(){return"http:"===document.location.protocol}},{capabilityName:r.HTTPS,test:function(){return"https:"===document.location.protocol}},{capabilityName:r.LOCALHOST,test:function(){return"localhost"===document.location.hostname||"127.0.0.1"===document.location.hostname}}],i={names:r,detect:function(){for(var e=[],t=0;t<o.length;t++)o[t].test()&&e.push(o[t].capabilityName);return e}};n.default=i},{}],4:[function(e,t,n){"use strict";n.__esModule=!0,n.default=function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=navigator.userAgent,r=new u.default(e.logger);return r.log("environment-detector started",e),c.default.detect().then(function(e){var t={browser:o.default.detect(n),platform:i.default.detect(n),os:a.default.detect(n),webcams:e,capabilities:s.default.detect()};return t.browser.name===o.default.names.SAFARI&&"11"<t.browser.version&&!t.capabilities.find(function(e){return e===s.default.names.GET_USER_MEDIA})&&(t.browser.name=o.default.names.IOS_WEBVIEW),r.log("environment-detector result",t),t}).catch(function(e){throw r.log("environment-detector failed",e),e})};var o=r(e("./browsers")),i=r(e("./platform")),a=r(e("./os")),s=r(e("./capabilities")),c=r(e("./webcam")),u=r(e("./utils/Logger"));function r(e){return e&&e.__esModule?e:{default:e}}},{"./browsers":2,"./capabilities":3,"./os":5,"./platform":6,"./utils/Logger":7,"./webcam":10}],5:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r,o=(r=e("./utils/getFirstMatch"))&&r.__esModule?r:{default:r};var i={WINDOWS_PHONE:"windowsphone",IOS:"ios",ANDROID:"android",MAC_OS:"macos",WINDOWS:"windows",LINUX:"linux",OPENBSD:"openbsd",UNKNOWN:"unknown"},a=[{osName:i.WINDOWS_PHONE,testRegex:/windows phone/i,getVersion:function(e){return(0,o.default)(e,/windows phone (?:os)?\s?(\d+(\.\d+)*)/i)}},{osName:i.IOS,testRegex:/(ipod|iphone|ipad)/i,getVersion:function(e){return(0,o.default)(e,/os (\d+([_\s]\d+)*) like mac os x/i).split("_").join(".")}},{osName:i.ANDROID,testRegex:/^((?!.*like android).*android)|silk/i,getVersion:function(e){return(0,o.default)(e,/android[ /-](\d+(\.\d+)*)/i)}},{osName:i.MAC_OS,testRegex:/macintosh/i,getVersion:function(e){return e.replace(/.*?OS X (.*?)(\)|;).*/,"$1").split("_").join(".")}},{osName:i.WINDOWS,testRegex:/windows/i,getVersion:function(e){return e.replace(/.*?Windows (.*?)(\)|;).*/,"$1")}},{osName:i.LINUX,testRegex:/linux/i,getVersion:function(){return null}},{osName:i.OPENBSD,testRegex:/OpenBSD/i,getVersion:function(){return null}}],s={names:i,detect:function(e){for(var t=0;t<a.length;t++)if(a[t].testRegex.test(e))return{name:a[t].osName,version:a[t].getVersion(e)||(0,o.default)(e,/version\/(\d+\.\d+)/i)||null};return{name:i.UNKNOWN,version:null}}};n.default=s},{"./utils/getFirstMatch":9}],6:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r,u=(r=e("./utils/getFirstMatch"))&&r.__esModule?r:{default:r};var l={MOBILE:"mobile",TABLET:"tablet",DESKTOP:"desktop"},o={types:l,detect:function(e){var t=/tablet/i.test(e),n=!t&&/[^-]mobi/i.test(e),r=(0,u.default)(e,/(ipod|iphone|ipad)/i).toLowerCase(),o=!/like android/i.test(e)&&/android/i.test(e),i=/nexus\s*[0-6]\s*/i.test(e),a=!i&&/nexus\s*[0-9]+/i.test(e),s=(0,u.default)(e,/android[ /-](\d+(\.\d+)*)/i).split(".")[0],c=/silk/i.test(e);return t||a||"ipad"===r||o&&(3==+s||4<=+s&&!n)||c?{type:l.TABLET}:n||i?{type:l.MOBILE}:{type:l.DESKTOP}}};n.default=o},{"./utils/getFirstMatch":9}],7:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var s=o(e("native-promise-only")),i=o(e("json3")),c=o(e("uuid/v4")),r=o(e("./currentScriptPath"));function o(e){return e&&e.__esModule?e:{default:e}}var u="".concat(r.default,"log.gif"),a=function(){function e(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.path,n=void 0===t?u:t,r=e.disable,o=void 0!==r&&r,i=e.sid,a=void 0===i?(0,c.default)():i;this.sid=a,this.pending=s.default.resolve(),this.path=n,this.disabled=o}return e.prototype.log=function(e){var r=this,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(!this.disabled){var o={ts:+new Date,sid:this.sid,name:e,data:t};this.pending=this.pending.then(new s.default(function(e){var t=document.createElement("img"),n=function(){t.parentNode.removeChild(t),e()};t.style.position="absolute",t.style.top="-10px",t.onload=n,t.onerror=n,t.src="".concat(r.path,"?msg=").concat(encodeURIComponent(i.default.stringify(o))),document.body.appendChild(t)}))}},e}();n.default=a},{"./currentScriptPath":8,json3:11,"native-promise-only":12,"uuid/v4":17}],8:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r=function(){if(null!=document.currentScript)return"".concat(document.currentScript.src.split("/").slice(0,-1).join("/"),"/");var e=document.getElementsByTagName("script"),t=e[e.length-1].src.split("?")[0];return"".concat(t.split("/").slice(0,-1).join("/"),"/")}();n.default=r},{}],9:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;n.default=function(e,t){var n=e.match(t);return n&&1<n.length?n[1]:""}},{}],10:[function(e,t,n){"use strict";n.__esModule=!0,n.default=void 0;var r={detect:function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices?navigator.mediaDevices.enumerateDevices().then(function(e){for(var t=[],n=0;n<e.length;n++)if("videoinput"===e[n].kind){var r=e[n].label?e[n].label:"unknown";t.push(r)}return t}):Promise.resolve([])}};n.default=r},{}],11:[function(e,c,u){(function(s){(function(){var e="function"==typeof define&&define.amd,W={function:!0,object:!0},t=W[typeof u]&&u&&!u.nodeType&&u,k=W[typeof window]&&window||this,n=t&&W[typeof c]&&c&&!c.nodeType&&"object"==typeof s&&s;function F(e,c){e||(e=k.Object()),c||(c=k.Object());var u=e.Number||k.Number,l=e.String||k.String,t=e.Object||k.Object,f=e.Date||k.Date,n=e.SyntaxError||k.SyntaxError,O=e.TypeError||k.TypeError,r=e.Math||k.Math,o=e.JSON||k.JSON;"object"==typeof o&&o&&(c.stringify=o.stringify,c.parse=o.parse);var R,T,E,i=t.prototype,S=i.toString,d=new f(-0xc782b5b800cec);try{d=-109252==d.getUTCFullYear()&&0===d.getUTCMonth()&&1===d.getUTCDate()&&10==d.getUTCHours()&&37==d.getUTCMinutes()&&6==d.getUTCSeconds()&&708==d.getUTCMilliseconds()}catch(e){}function p(e){if(p[e]!==E)return p[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=p("json-stringify")&&p("json-parse");else{var n,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var o=c.stringify,i="function"==typeof o&&d;if(i){(n=function(){return 1}).toJSON=n;try{i="0"===o(0)&&"0"===o(new u)&&'""'==o(new l)&&o(S)===E&&o(E)===E&&o()===E&&"1"===o(n)&&"[1]"==o([n])&&"[null]"==o([E])&&"null"==o(null)&&"[null,null,null]"==o([E,S,null])&&o({a:[n,!0,!1,null,"\0\b\n\f\r\t"]})==r&&"1"===o(null,n)&&"[\n 1,\n 2\n]"==o([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==o(new f(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==o(new f(864e13))&&'"-000001-01-01T00:00:00.000Z"'==o(new f(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==o(new f(-1))}catch(e){i=!1}}t=i}if("json-parse"==e){var a=c.parse;if("function"==typeof a)try{if(0===a("0")&&!a(!1)){var s=5==(n=a(r)).a.length&&1===n.a[0];if(s){try{s=!a('"\t"')}catch(e){}if(s)try{s=1!==a("01")}catch(e){}if(s)try{s=1!==a("1.")}catch(e){}}}}catch(e){s=!1}t=s}}return p[e]=!!t}if(!p("json")){var h="[object Function]",x="[object Number]",A="[object String]",M="[object Array]",s=p("bug-string-char-index");if(!d)var C=r.floor,a=[0,31,59,90,120,151,181,212,243,273,304,334],I=function(e,t){return a[t]+365*(e-1970)+C((e-1969+(t=+(1<t)))/4)-C((e-1901+t)/100)+C((e-1601+t)/400)};if((R=i.hasOwnProperty)||(R=function(e){var n,t={};return R=(t.__proto__=null,t.__proto__={toString:1},t).toString!=S?function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(n=t.constructor,function(e){var t=(this.constructor||n).prototype;return e in this&&!(e in t&&this[e]===t[e])}),t=null,R.call(this,e)}),T=function(e,t){var n,a,r,o=0;for(r in(n=function(){this.valueOf=0}).prototype.valueOf=0,a=new n)R.call(a,r)&&o++;return n=a=null,(T=o?2==o?function(e,t){var n,r={},o=S.call(e)==h;for(n in e)o&&"prototype"==n||R.call(r,n)||!(r[n]=1)||!R.call(e,n)||t(n)}:function(e,t){var n,r,o=S.call(e)==h;for(n in e)o&&"prototype"==n||!R.call(e,n)||(r="constructor"===n)||t(n);(r||R.call(e,n="constructor"))&&t(n)}:(a=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],function(e,t){var n,r,o=S.call(e)==h,i=!o&&"function"!=typeof e.constructor&&W[typeof e.hasOwnProperty]&&e.hasOwnProperty||R;for(n in e)o&&"prototype"==n||!i.call(e,n)||t(n);for(r=a.length;n=a[--r];i.call(e,n)&&t(n));}))(e,t)},!p("json-stringify")){var g={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},j=function(e,t){
9// Opera <= 7.54u2 where `0 == -0`, but `String(-0) !== "0"`.
10return("000000"+(t||0)).slice(-e)},D=function(e){for(var t='"',n=0,r=e.length,o=!s||10<r,i=o&&(s?e.split(""):e);n<r;n++){var a=e.charCodeAt(n);switch(a){case 8:case 9:case 10:case 12:case 13:case 34:case 92:t+=g[a];break;default:if(a<32){t+="\\u00"+j(2,a.toString(16));break}t+=o?i[n]:e.charAt(n)}}return t+'"'},U=function(e,t,n,r,o,i,a){var s,c,u,l,f,d,p,h,g,m,v,y,w,b,_,N;try{s=t[e]}catch(e){}if("object"==typeof s&&s)if("[object Date]"!=(c=S.call(s))||R.call(s,"toJSON"))"function"==typeof s.toJSON&&(c!=x&&c!=A&&c!=M||R.call(s,"toJSON"))&&(s=s.toJSON(e));else if(-1/0<s&&s<1/0){if(I){for(f=C(s/864e5),u=C(f/365.2425)+1970-1;I(u+1,0)<=f;u++);for(l=C((f-I(u,0))/30.42);I(u,l+1)<=f;l++);f=1+f-I(u,l),p=C((d=(s%864e5+864e5)%864e5)/36e5)%24,h=C(d/6e4)%60,g=C(d/1e3)%60,m=d%1e3}else u=s.getUTCFullYear(),l=s.getUTCMonth(),f=s.getUTCDate(),p=s.getUTCHours(),h=s.getUTCMinutes(),g=s.getUTCSeconds(),m=s.getUTCMilliseconds();s=(u<=0||1e4<=u?(u<0?"-":"+")+j(6,u<0?-u:u):j(4,u))+"-"+j(2,l+1)+"-"+j(2,f)+"T"+j(2,p)+":"+j(2,h)+":"+j(2,g)+"."+j(3,m)+"Z"}else s=null;if(n&&(s=n.call(t,e,s)),null===s)return"null";if("[object Boolean]"==(c=S.call(s)))return""+s;if(c==x)return-1/0<s&&s<1/0?""+s:"null";if(c==A)return D(""+s);if("object"==typeof s){for(b=a.length;b--;)if(a[b]===s)throw O();if(a.push(s),v=[],_=i,i+=o,c==M){for(w=0,b=s.length;w<b;w++)y=U(w,s,n,r,o,i,a),v.push(y===E?"null":y);N=v.length?o?"[\n"+i+v.join(",\n"+i)+"\n"+_+"]":"["+v.join(",")+"]":"[]"}else T(r||s,function(e){var t=U(e,s,n,r,o,i,a);t!==E&&v.push(D(e)+":"+(o?" ":"")+t)}),N=v.length?o?"{\n"+i+v.join(",\n"+i)+"\n"+_+"}":"{"+v.join(",")+"}":"{}";return a.pop(),N}};c.stringify=function(e,t,n){var r,o,i,a;if(W[typeof t]&&t)if((a=S.call(t))==h)o=t;else if(a==M){i={};for(var s,c=0,u=t.length;c<u;s=t[c++],((a=S.call(s))==A||a==x)&&(i[s]=1));}if(n)if((a=S.call(n))==x){if(0<(n-=n%1))for(r="",10<n&&(n=10);r.length<n;r+=" ");}else a==A&&(r=n.length<=10?n:n.slice(0,10));
11// (e.g., `!("" in { "": 1})`).
12return U("",((s={})[""]=e,s),o,i,r,"",[])}}if(!p("json-parse")){var m,v,y=l.fromCharCode,w={92:"\\",34:'"',47:"/",98:"\b",116:"\t",110:"\n",102:"\f",114:"\r"},b=function(){throw m=v=null,n()},_=function(){for(var e,t,n,r,o,i=v,a=i.length;m<a;)switch(o=i.charCodeAt(m)){case 9:case 10:case 13:case 32:m++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=s?i.charAt(m):i[m],m++,e;case 34:for(e="@",m++;m<a;)if((o=i.charCodeAt(m))<32)b();else if(92==o)switch(o=i.charCodeAt(++m)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=w[o],m++;break;case 117:for(t=++m,n=m+4;m<n;m++)48<=(o=i.charCodeAt(m))&&o<=57||97<=o&&o<=102||65<=o&&o<=70||b();e+=y("0x"+i.slice(t,m));break;default:b()}else{if(34==o)break;for(o=i.charCodeAt(m),t=m;32<=o&&92!=o&&34!=o;)o=i.charCodeAt(++m);e+=i.slice(t,m)}if(34==i.charCodeAt(m))return m++,e;b();default:if(t=m,45==o&&(r=!0,o=i.charCodeAt(++m)),48<=o&&o<=57){for(48==o&&(48<=(o=i.charCodeAt(m+1))&&o<=57)&&b(),r=!1;m<a&&(48<=(o=i.charCodeAt(m))&&o<=57);m++);if(46==i.charCodeAt(m)){for(n=++m;n<a&&(48<=(o=i.charCodeAt(n))&&o<=57);n++);n==m&&b(),m=n}if(101==(o=i.charCodeAt(m))||69==o){for(43!=(o=i.charCodeAt(++m))&&45!=o||m++,n=m;n<a&&(48<=(o=i.charCodeAt(n))&&o<=57);n++);n==m&&b(),m=n}return+i.slice(t,m)}if(r&&b(),"true"==i.slice(m,m+4))return m+=4,!0;if("false"==i.slice(m,m+5))return m+=5,!1;if("null"==i.slice(m,m+4))return m+=4,null;b()}return"$"},N=function(e){var t,n;if("$"==e&&b(),"string"==typeof e){if("@"==(s?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];"]"!=(e=_());n||(n=!0))n&&(","==e?"]"==(e=_())&&b():b()),","==e&&b(),t.push(N(e));return t}if("{"==e){for(t={};"}"!=(e=_());n||(n=!0))n&&(","==e?"}"==(e=_())&&b():b()),","!=e&&"string"==typeof e&&"@"==(s?e.charAt(0):e[0])&&":"==_()||b(),t[e.slice(1)]=N(_());return t}b()}return e},P=function(e,t,n){var r=L(e,t,n);r===E?delete e[t]:e[t]=r},L=function(e,t,n){var r,o=e[t];if("object"==typeof o&&o)
13// for array indices (e.g., `![1, 2, 3].hasOwnProperty("0")`).
14if(S.call(o)==M)for(r=o.length;r--;)P(o,r,n);else T(o,function(e){P(o,e,n)});return n.call(e,t,o)};c.parse=function(e,t){var n,r;return m=0,v=""+e,n=N(_()),"$"!=_()&&b(),m=v=null,t&&S.call(t)==h?L(((r={})[""]=n,r),"",t):n}}}return c.runInContext=F,c}if(!n||n.global!==n&&n.window!==n&&n.self!==n||(k=n),t&&!e)F(k,t);else{var r=k.JSON,o=k.JSON3,i=!1,a=F(k,k.JSON3={noConflict:function(){return i||(i=!0,k.JSON=r,k.JSON3=o,r=o=null),a}});k.JSON={parse:a.parse,stringify:a.stringify}}e&&define(function(){return a})}).call(this)}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],12:[function(e,o,t){(function(e,g){
15/*! Native Promise Only
16 v0.8.1 (c) Kyle Simpson
17 MIT License: http://getify.mit-license.org
18*/
19var t,n,r;r=function(){"use strict";var t,a,n,e=Object.prototype.toString,r=void 0!==g?function(e){return g(e)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(e,t,n,r){return Object.defineProperty(e,t,{value:n,writable:!0,configurable:!1!==r})}}catch(e){t=function(e,t,n){return e[t]=n,e}}function i(e,t){n.add(e,t),a||(a=r(n.drain))}function s(e){var t,n=typeof e;return null==e||"object"!=n&&"function"!=n||(t=e.then),"function"==typeof t&&t}function c(){for(var e=0;e<this.chain.length;e++)o(this,1===this.state?this.chain[e].success:this.chain[e].failure,this.chain[e]);this.chain.length=0}function o(e,t,n){var r,o;try{!1===t?n.reject(e.msg):(r=!0===t?e.msg:t.call(void 0,e.msg))===n.promise?n.reject(TypeError("Promise-chain cycle")):(o=s(r))?o.call(r,n.resolve,n.reject):n.resolve(r)}catch(e){n.reject(e)}}function u(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,0<t.chain.length&&i(c,t))}function l(e,n,r,o){for(var t=0;t<n.length;t++)!function(t){e.resolve(n[t]).then(function(e){r(t,e)},o)}(t)}function f(e){this.def=e,this.triggered=!1}function d(e){this.promise=e,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function p(e){if("function"!=typeof e)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var r=new d(this);this.then=function(e,t){var n={success:"function"!=typeof e||e,failure:"function"==typeof t&&t};return n.promise=new this.constructor(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");n.resolve=e,n.reject=t}),r.chain.push(n),0!==r.state&&i(c,r),n.promise},this.catch=function(e){return this.then(void 0,e)};try{e.call(void 0,function(e){(function e(n){var r,o=this;if(!o.triggered){o.triggered=!0,o.def&&(o=o.def);try{(r=s(n))?i(function(){var t=new f(o);try{r.call(n,function(){e.apply(t,arguments)},function(){u.apply(t,arguments)})}catch(e){u.call(t,e)}}):(o.msg=n,o.state=1,0<o.chain.length&&i(c,o))}catch(e){u.call(new f(o),e)}}}).call(r,e)},function(e){u.call(r,e)})}catch(e){u.call(r,e)}}n=function(){var n,r,o;function i(e,t){this.fn=e,this.self=t,this.next=void 0}return{add:function(e,t){o=new i(e,t),r?r.next=o:n=o,r=o,o=void 0},drain:function(){var e=n;for(n=r=a=void 0;e;)e.fn.call(e.self),e=e.next}}}();var h=t({},"constructor",p,!1);return t(p.prototype=h,"__NPO__",0,!1),t(p,"resolve",function(n){return n&&"object"==typeof n&&1===n.__NPO__?n:new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");e(n)})}),t(p,"reject",function(n){return new this(function(e,t){if("function"!=typeof e||"function"!=typeof t)throw TypeError("Not a function");t(n)})}),t(p,"all",function(t){var a=this;return"[object Array]"!=e.call(t)?a.reject(TypeError("Not an array")):0===t.length?a.resolve([]):new a(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");var r=t.length,o=Array(r),i=0;l(a,t,function(e,t){o[e]=t,++i===r&&n(o)},e)})}),t(p,"race",function(t){var r=this;return"[object Array]"!=e.call(t)?r.reject(TypeError("Not an array")):new r(function(n,e){if("function"!=typeof n||"function"!=typeof e)throw TypeError("Not a function");l(r,t,function(e,t){n(t)},e)})}),p},(n=void 0!==e?e:this)[t="Promise"]=n[t]||r(),void 0!==o&&o.exports?o.exports=n[t]:"function"==typeof define&&define.amd&&define(function(){return n[t]})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("timers").setImmediate)},{timers:14}],13:[function(e,t,n){var r,o,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===a||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:a}catch(e){r=a}try{o="function"==typeof clearTimeout?clearTimeout:s}catch(e){o=s}}();var u,l=[],f=!1,d=-1;function p(){f&&u&&(f=!1,u.length?l=u.concat(l):d=-1,l.length&&h())}function h(){if(!f){var e=c(p);f=!0;for(var t=l.length;t;){for(u=l,l=[];++d<t;)u&&u[d].run();d=-1,t=l.length}u=null,f=!1,function(t){if(o===clearTimeout)return clearTimeout(t);if((o===s||!o)&&clearTimeout)return o=clearTimeout,clearTimeout(t);try{o(t)}catch(e){try{return o.call(null,t)}catch(e){return o.call(this,t)}}}(e)}}function g(e,t){this.fun=e,this.array=t}function m(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new g(e,t)),1!==l.length||f||c(h)},g.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(e){return[]},i.binding=function(e){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(e){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},{}],14:[function(c,e,u){(function(e,t){var r=c("process/browser.js").nextTick,n=Function.prototype.apply,o=Array.prototype.slice,i={},a=0;function s(e,t){this._id=e,this._clearFn=t}u.setTimeout=function(){return new s(n.call(setTimeout,window,arguments),clearTimeout)},u.setInterval=function(){return new s(n.call(setInterval,window,arguments),clearInterval)},u.clearTimeout=u.clearInterval=function(e){e.close()},s.prototype.unref=s.prototype.ref=function(){},s.prototype.close=function(){this._clearFn.call(window,this._id)},u.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},u.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},u._unrefActive=u.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;0<=t&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},u.setImmediate="function"==typeof e?e:function(e){var t=a++,n=!(arguments.length<2)&&o.call(arguments,1);return i[t]=!0,r(function(){i[t]&&(n?e.apply(null,n):e.call(null),u.clearImmediate(t))}),t},u.clearImmediate="function"==typeof t?t:function(e){delete i[e]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":13,timers:14}],15:[function(e,t,n){for(var o=[],r=0;r<256;++r)o[r]=(r+256).toString(16).substr(1);t.exports=function(e,t){var n=t||0,r=o;return[r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],"-",r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]],r[e[n++]]].join("")}},{}],16:[function(e,t,n){var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(r){var o=new Uint8Array(16);t.exports=function(){return r(o),o}}else{var i=new Array(16);t.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),i[t]=e>>>((3&t)<<3)&255;return i}}},{}],17:[function(e,t,n){var a=e("./lib/rng"),s=e("./lib/bytesToUuid");t.exports=function(e,t,n){var r=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||a)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var i=0;i<16;++i)t[r+i]=o[i];return t||s(o)}},{"./lib/bytesToUuid":15,"./lib/rng":16}]},{},[1]);
20//# sourceMappingURL=dist/environment-detector.js.map
\No newline at end of file