UNPKG

libs-js

Version:

零散的工具函数,无依赖

2 lines (1 loc) 24.5 kB
"use strict";function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function _createClass(e,t,r){return t&&_defineProperties(e.prototype,t),r&&_defineProperties(e,r),e}function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}Object.defineProperty(exports,"__esModule",{value:!0});var _isObject=function(e){return"object"==typeof e?null!==e:"function"==typeof e},toString={}.toString,_cof=function(e){return toString.call(e).slice(8,-1)};function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}var _core=createCommonjsModule(function(e){var t=e.exports={version:"2.6.11"};"number"==typeof __e&&(__e=t)}),_core_1=_core.version,_global=createCommonjsModule(function(e){var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)}),_library=!1,_shared=createCommonjsModule(function(e){var t="__core-js_shared__",r=_global[t]||(_global[t]={});(e.exports=function(e,t){return r[e]||(r[e]=void 0!==t?t:{})})("versions",[]).push({version:_core.version,mode:"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})}),id=0,px=Math.random(),_uid=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++id+px).toString(36))},_wks=createCommonjsModule(function(e){var t=_shared("wks"),r=_global.Symbol,n="function"==typeof r;(e.exports=function(e){return t[e]||(t[e]=n&&r[e]||(n?r:_uid)("Symbol."+e))}).store=t}),MATCH=_wks("match"),_isRegexp=function(e){var t;return _isObject(e)&&(void 0!==(t=e[MATCH])?!!t:"RegExp"==_cof(e))},_anObject=function(e){if(!_isObject(e))throw TypeError(e+" is not an object!");return e},_aFunction=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e},SPECIES=_wks("species"),_speciesConstructor=function(e,t){var r,n=_anObject(e).constructor;return void 0===n||null==(r=_anObject(n)[SPECIES])?t:_aFunction(r)},ceil=Math.ceil,floor=Math.floor,_toInteger=function(e){return isNaN(e=+e)?0:(0<e?floor:ceil)(e)},_defined=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e},_stringAt=function(s){return function(e,t){var r,n,o=String(_defined(e)),i=_toInteger(t),c=o.length;return i<0||c<=i?s?"":void 0:(r=o.charCodeAt(i))<55296||56319<r||i+1===c||(n=o.charCodeAt(i+1))<56320||57343<n?s?o.charAt(i):r:s?o.slice(i,i+2):n-56320+(r-55296<<10)+65536}},at=_stringAt(!0),_advanceStringIndex=function(e,t,r){return t+(r?at(e,t).length:1)},min=Math.min,_toLength=function(e){return 0<e?min(_toInteger(e),9007199254740991):0},TAG=_wks("toStringTag"),ARG="Arguments"==_cof(function(){return arguments}()),tryGet=function(e,t){try{return e[t]}catch(e){}},_classof=function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=tryGet(t=Object(e),TAG))?r:ARG?_cof(t):"Object"==(n=_cof(t))&&"function"==typeof t.callee?"Arguments":n},builtinExec=RegExp.prototype.exec,_regexpExecAbstract=function(e,t){var r=e.exec;if("function"==typeof r){var n=r.call(e,t);if("object"!=typeof n)throw new TypeError("RegExp exec method returned something other than an Object or null");return n}if("RegExp"!==_classof(e))throw new TypeError("RegExp#exec called on incompatible receiver");return builtinExec.call(e,t)},_flags=function(){var e=_anObject(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t},nativeExec=RegExp.prototype.exec,nativeReplace=String.prototype.replace,patchedExec=nativeExec,LAST_INDEX="lastIndex",UPDATES_LAST_INDEX_WRONG=function(){var e=/a/,t=/b*/g;return nativeExec.call(e,"a"),nativeExec.call(t,"a"),0!==e[LAST_INDEX]||0!==t[LAST_INDEX]}(),NPCG_INCLUDED=void 0!==/()??/.exec("")[1],PATCH=UPDATES_LAST_INDEX_WRONG||NPCG_INCLUDED;PATCH&&(patchedExec=function(e){var t,r,n,o,i=this;return NPCG_INCLUDED&&(r=new RegExp("^"+i.source+"$(?!\\s)",_flags.call(i))),UPDATES_LAST_INDEX_WRONG&&(t=i[LAST_INDEX]),n=nativeExec.call(i,e),UPDATES_LAST_INDEX_WRONG&&n&&(i[LAST_INDEX]=i.global?n.index+n[0].length:t),NPCG_INCLUDED&&n&&1<n.length&&nativeReplace.call(n[0],r,function(){for(o=1;o<arguments.length-2;o++)void 0===arguments[o]&&(n[o]=void 0)}),n});var _regexpExec=patchedExec,_fails=function(e){try{return!!e()}catch(e){return!0}},_descriptors=!_fails(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),document=_global.document,is=_isObject(document)&&_isObject(document.createElement),_domCreate=function(e){return is?document.createElement(e):{}},_ie8DomDefine=!_descriptors&&!_fails(function(){return 7!=Object.defineProperty(_domCreate("div"),"a",{get:function(){return 7}}).a}),_toPrimitive=function(e,t){if(!_isObject(e))return e;var r,n;if(t&&"function"==typeof(r=e.toString)&&!_isObject(n=r.call(e)))return n;if("function"==typeof(r=e.valueOf)&&!_isObject(n=r.call(e)))return n;if(!t&&"function"==typeof(r=e.toString)&&!_isObject(n=r.call(e)))return n;throw TypeError("Can't convert object to primitive value")},dP=Object.defineProperty,f=_descriptors?Object.defineProperty:function(e,t,r){if(_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_ie8DomDefine)try{return dP(e,t,r)}catch(e){}if("get"in r||"set"in r)throw TypeError("Accessors not supported!");return"value"in r&&(e[t]=r.value),e},_objectDp={f:f},_propertyDesc=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},_hide=_descriptors?function(e,t,r){return _objectDp.f(e,t,_propertyDesc(1,r))}:function(e,t,r){return e[t]=r,e},hasOwnProperty={}.hasOwnProperty,_has=function(e,t){return hasOwnProperty.call(e,t)},_functionToString=_shared("native-function-to-string",Function.toString),_redefine=createCommonjsModule(function(e){var i=_uid("src"),t="toString",c=(""+_functionToString).split(t);_core.inspectSource=function(e){return _functionToString.call(e)},(e.exports=function(e,t,r,n){var o="function"==typeof r;o&&(_has(r,"name")||_hide(r,"name",t)),e[t]!==r&&(o&&(_has(r,i)||_hide(r,i,e[t]?""+e[t]:c.join(String(t)))),e===_global?e[t]=r:n?e[t]?e[t]=r:_hide(e,t,r):(delete e[t],_hide(e,t,r)))})(Function.prototype,t,function(){return"function"==typeof this&&this[i]||_functionToString.call(this)})}),_ctx=function(n,o,e){if(_aFunction(n),void 0===o)return n;switch(e){case 1:return function(e){return n.call(o,e)};case 2:return function(e,t){return n.call(o,e,t)};case 3:return function(e,t,r){return n.call(o,e,t,r)}}return function(){return n.apply(o,arguments)}},PROTOTYPE="prototype",$export=function(e,t,r){var n,o,i,c,s=e&$export.F,a=e&$export.G,u=e&$export.S,l=e&$export.P,_=e&$export.B,f=a?_global:u?_global[t]||(_global[t]={}):(_global[t]||{})[PROTOTYPE],p=a?_core:_core[t]||(_core[t]={}),b=p[PROTOTYPE]||(p[PROTOTYPE]={});for(n in a&&(r=t),r)i=((o=!s&&f&&void 0!==f[n])?f:r)[n],c=_&&o?_ctx(i,_global):l&&"function"==typeof i?_ctx(Function.call,i):i,f&&_redefine(f,n,i,e&$export.U),p[n]!=i&&_hide(p,n,c),l&&b[n]!=i&&(b[n]=i)};_global.core=_core,$export.F=1,$export.G=2,$export.S=4,$export.P=8,$export.B=16,$export.W=32,$export.U=64,$export.R=128;var _export=$export;_export({target:"RegExp",proto:!0,forced:_regexpExec!==/./.exec},{exec:_regexpExec});var SPECIES$1=_wks("species"),REPLACE_SUPPORTS_NAMED_GROUPS=!_fails(function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$<a>")}),SPLIT_WORKS_WITH_OVERWRITTEN_EXEC=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2===r.length&&"a"===r[0]&&"b"===r[1]}(),_fixReWks=function(r,e,t){var n=_wks(r),i=!_fails(function(){var e={};return e[n]=function(){return 7},7!=""[r](e)}),o=i?!_fails(function(){var e=!1,t=/a/;return t.exec=function(){return e=!0,null},"split"===r&&(t.constructor={},t.constructor[SPECIES$1]=function(){return t}),t[n](""),!e}):void 0;if(!i||!o||"replace"===r&&!REPLACE_SUPPORTS_NAMED_GROUPS||"split"===r&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC){var c=/./[n],s=t(_defined,n,""[r],function(e,t,r,n,o){return t.exec===_regexpExec?i&&!o?{done:!0,value:c.call(t,r,n)}:{done:!0,value:e.call(r,t,n)}:{done:!1}}),a=s[0],u=s[1];_redefine(String.prototype,r,a),_hide(RegExp.prototype,n,2==e?function(e,t){return u.call(e,this,t)}:function(e){return u.call(e,this)})}},$min=Math.min,$push=[].push,$SPLIT="split",LENGTH="length",LAST_INDEX$1="lastIndex",MAX_UINT32=4294967295,SUPPORTS_Y=!_fails(function(){RegExp(MAX_UINT32,"y")});_fixReWks("split",2,function(o,i,y,h){var g;return g="c"=="abbc"[$SPLIT](/(b)*/)[1]||4!="test"[$SPLIT](/(?:)/,-1)[LENGTH]||2!="ab"[$SPLIT](/(?:ab)*/)[LENGTH]||4!="."[$SPLIT](/(.?)(.?)/)[LENGTH]||1<"."[$SPLIT](/()()/)[LENGTH]||""[$SPLIT](/.?/)[LENGTH]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!_isRegexp(e))return y.call(r,e,t);for(var n,o,i,c=[],s=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),a=0,u=void 0===t?MAX_UINT32:t>>>0,l=new RegExp(e.source,s+"g");(n=_regexpExec.call(l,r))&&!(a<(o=l[LAST_INDEX$1])&&(c.push(r.slice(a,n.index)),1<n[LENGTH]&&n.index<r[LENGTH]&&$push.apply(c,n.slice(1)),i=n[0][LENGTH],a=o,c[LENGTH]>=u));)l[LAST_INDEX$1]===n.index&&l[LAST_INDEX$1]++;return a===r[LENGTH]?!i&&l.test("")||c.push(""):c.push(r.slice(a)),c[LENGTH]>u?c.slice(0,u):c}:"0"[$SPLIT](void 0,0)[LENGTH]?function(e,t){return void 0===e&&0===t?[]:y.call(this,e,t)}:y,[function(e,t){var r=o(this),n=null==e?void 0:e[i];return void 0!==n?n.call(e,r,t):g.call(String(r),e,t)},function(e,t){var r=h(g,e,this,t,g!==y);if(r.done)return r.value;var n=_anObject(e),o=String(this),i=_speciesConstructor(n,RegExp),c=n.unicode,s=(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.unicode?"u":"")+(SUPPORTS_Y?"y":"g"),a=new i(SUPPORTS_Y?n:"^(?:"+n.source+")",s),u=void 0===t?MAX_UINT32:t>>>0;if(0===u)return[];if(0===o.length)return null===_regexpExecAbstract(a,o)?[o]:[];for(var l=0,_=0,f=[];_<o.length;){a.lastIndex=SUPPORTS_Y?_:0;var p,b=_regexpExecAbstract(a,SUPPORTS_Y?o:o.slice(_));if(null===b||(p=$min(_toLength(a.lastIndex+(SUPPORTS_Y?0:_)),o.length))===l)_=_advanceStringIndex(o,_,c);else{if(f.push(o.slice(l,_)),f.length===u)return f;for(var d=1;d<=b.length-1;d++)if(f.push(b[d]),f.length===u)return f;_=l=p}}return f.push(o.slice(l)),f}]});var _iobject=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==_cof(e)?e.split(""):Object(e)},_toIobject=function(e){return _iobject(_defined(e))},max=Math.max,min$1=Math.min,_toAbsoluteIndex=function(e,t){return(e=_toInteger(e))<0?max(e+t,0):min$1(e,t)},_arrayIncludes=function(s){return function(e,t,r){var n,o=_toIobject(e),i=_toLength(o.length),c=_toAbsoluteIndex(r,i);if(s&&t!=t){for(;c<i;)if((n=o[c++])!=n)return!0}else for(;c<i;c++)if((s||c in o)&&o[c]===t)return s||c||0;return!s&&-1}},shared=_shared("keys"),_sharedKey=function(e){return shared[e]||(shared[e]=_uid(e))},arrayIndexOf=_arrayIncludes(!1),IE_PROTO=_sharedKey("IE_PROTO"),_objectKeysInternal=function(e,t){var r,n=_toIobject(e),o=0,i=[];for(r in n)r!=IE_PROTO&&_has(n,r)&&i.push(r);for(;t.length>o;)_has(n,r=t[o++])&&(~arrayIndexOf(i,r)||i.push(r));return i},_enumBugKeys="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),_objectKeys=Object.keys||function(e){return _objectKeysInternal(e,_enumBugKeys)},f$1=Object.getOwnPropertySymbols,_objectGops={f:f$1},f$2={}.propertyIsEnumerable,_objectPie={f:f$2},_toObject=function(e){return Object(_defined(e))},$assign=Object.assign,_objectAssign=!$assign||_fails(function(){var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach(function(e){t[e]=e}),7!=$assign({},e)[r]||Object.keys($assign({},t)).join("")!=n})?function(e,t){for(var r=_toObject(e),n=arguments.length,o=1,i=_objectGops.f,c=_objectPie.f;o<n;)for(var s,a=_iobject(arguments[o++]),u=i?_objectKeys(a).concat(i(a)):_objectKeys(a),l=u.length,_=0;_<l;)s=u[_++],_descriptors&&!c.call(a,s)||(r[s]=a[s]);return r}:$assign;_export(_export.S+_export.F,"Object",{assign:_objectAssign});var _strictMethod=function(e,t){return!!e&&_fails(function(){t?e.call(null,function(){},1):e.call(null)})},$indexOf=_arrayIncludes(!1),$native=[].indexOf,NEGATIVE_ZERO=!!$native&&1/[1].indexOf(1,-0)<0;_export(_export.P+_export.F*(NEGATIVE_ZERO||!_strictMethod($native)),"Array",{indexOf:function(e,t){return NEGATIVE_ZERO?$native.apply(this,arguments)||0:$indexOf(this,e,t)}});var max$1=Math.max,min$2=Math.min,floor$1=Math.floor,SUBSTITUTION_SYMBOLS=/\$([$&`']|\d\d?|<[^>]*>)/g,SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&`']|\d\d?)/g,maybeToString=function(e){return void 0===e?e:String(e)};_fixReWks("replace",2,function(o,i,O,S){return[function(e,t){var r=o(this),n=null==e?void 0:e[i];return void 0!==n?n.call(e,r,t):O.call(String(r),e,t)},function(e,t){var r=S(O,e,this,t);if(r.done)return r.value;var n=_anObject(e),o=String(this),i="function"==typeof t;i||(t=String(t));var c=n.global;if(c){var s=n.unicode;n.lastIndex=0}for(var a=[];;){var u=_regexpExecAbstract(n,o);if(null===u)break;if(a.push(u),!c)break;""===String(u[0])&&(n.lastIndex=_advanceStringIndex(o,_toLength(n.lastIndex),s))}for(var l="",_=0,f=0;f<a.length;f++){u=a[f];for(var p=String(u[0]),b=max$1(min$2(_toInteger(u.index),o.length),0),d=[],y=1;y<u.length;y++)d.push(maybeToString(u[y]));var h=u.groups;if(i){var g=[p].concat(d,b,o);void 0!==h&&g.push(h);var m=String(t.apply(void 0,g))}else m=E(p,o,b,d,h,t);_<=b&&(l+=o.slice(_,b)+m,_=b+p.length)}return l+o.slice(_)}];function E(i,c,s,a,u,e){var l=s+i.length,_=a.length,t=SUBSTITUTION_SYMBOLS_NO_NAMED;return void 0!==u&&(u=_toObject(u),t=SUBSTITUTION_SYMBOLS),O.call(e,t,function(e,t){var r;switch(t.charAt(0)){case"$":return"$";case"&":return i;case"`":return c.slice(0,s);case"'":return c.slice(l);case"<":r=u[t.slice(1,-1)];break;default:var n=+t;if(0==n)return e;if(_<n){var o=floor$1(n/10);return 0===o?e:o<=_?void 0===a[o-1]?t.charAt(1):a[o-1]+t.charAt(1):e}r=a[n-1]}return void 0===r?"":r})}});var f$3=_wks,_wksExt={f:f$3},defineProperty=_objectDp.f,_wksDefine=function(e){var t=_core.Symbol||(_core.Symbol=_global.Symbol||{});"_"==e.charAt(0)||e in t||defineProperty(t,e,{value:_wksExt.f(e)})};_wksDefine("asyncIterator");var _meta=createCommonjsModule(function(e){function r(e){t(e,n,{value:{i:"O"+ ++o,w:{}}})}var n=_uid("meta"),t=_objectDp.f,o=0,i=Object.isExtensible||function(){return!0},c=!_fails(function(){return i(Object.preventExtensions({}))}),s=e.exports={KEY:n,NEED:!1,fastKey:function(e,t){if(!_isObject(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!_has(e,n)){if(!i(e))return"F";if(!t)return"E";r(e)}return e[n].i},getWeak:function(e,t){if(!_has(e,n)){if(!i(e))return!0;if(!t)return!1;r(e)}return e[n].w},onFreeze:function(e){return c&&s.NEED&&i(e)&&!_has(e,n)&&r(e),e}}}),_meta_1=_meta.KEY,_meta_2=_meta.NEED,_meta_3=_meta.fastKey,_meta_4=_meta.getWeak,_meta_5=_meta.onFreeze,def=_objectDp.f,TAG$1=_wks("toStringTag"),_setToStringTag=function(e,t,r){e&&!_has(e=r?e:e.prototype,TAG$1)&&def(e,TAG$1,{configurable:!0,value:t})},_enumKeys=function(e){var t=_objectKeys(e),r=_objectGops.f;if(r)for(var n,o=r(e),i=_objectPie.f,c=0;o.length>c;)i.call(e,n=o[c++])&&t.push(n);return t},_isArray=Array.isArray||function(e){return"Array"==_cof(e)},_objectDps=_descriptors?Object.defineProperties:function(e,t){_anObject(e);for(var r,n=_objectKeys(t),o=n.length,i=0;i<o;)_objectDp.f(e,r=n[i++],t[r]);return e},document$1=_global.document,_html=document$1&&document$1.documentElement,IE_PROTO$1=_sharedKey("IE_PROTO"),Empty=function(){},PROTOTYPE$1="prototype",createDict=function(){var e,t=_domCreate("iframe"),r=_enumBugKeys.length;for(t.style.display="none",_html.appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),createDict=e.F;r--;)delete createDict[PROTOTYPE$1][_enumBugKeys[r]];return createDict()},_objectCreate=Object.create||function(e,t){var r;return null!==e?(Empty[PROTOTYPE$1]=_anObject(e),r=new Empty,Empty[PROTOTYPE$1]=null,r[IE_PROTO$1]=e):r=createDict(),void 0===t?r:_objectDps(r,t)},hiddenKeys=_enumBugKeys.concat("length","prototype"),f$4=Object.getOwnPropertyNames||function(e){return _objectKeysInternal(e,hiddenKeys)},_objectGopn={f:f$4},gOPN=_objectGopn.f,toString$1={}.toString,windowNames="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],getWindowNames=function(e){try{return gOPN(e)}catch(e){return windowNames.slice()}},f$5=function(e){return windowNames&&"[object Window]"==toString$1.call(e)?getWindowNames(e):gOPN(_toIobject(e))},_objectGopnExt={f:f$5},gOPD=Object.getOwnPropertyDescriptor,f$6=_descriptors?gOPD:function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),_ie8DomDefine)try{return gOPD(e,t)}catch(e){}if(_has(e,t))return _propertyDesc(!_objectPie.f.call(e,t),e[t])},_objectGopd={f:f$6},META=_meta.KEY,gOPD$1=_objectGopd.f,dP$1=_objectDp.f,gOPN$1=_objectGopnExt.f,$Symbol=_global.Symbol,$JSON=_global.JSON,_stringify=$JSON&&$JSON.stringify,PROTOTYPE$2="prototype",HIDDEN=_wks("_hidden"),TO_PRIMITIVE=_wks("toPrimitive"),isEnum={}.propertyIsEnumerable,SymbolRegistry=_shared("symbol-registry"),AllSymbols=_shared("symbols"),OPSymbols=_shared("op-symbols"),ObjectProto=Object[PROTOTYPE$2],USE_NATIVE="function"==typeof $Symbol&&!!_objectGops.f,QObject=_global.QObject,setter=!QObject||!QObject[PROTOTYPE$2]||!QObject[PROTOTYPE$2].findChild,setSymbolDesc=_descriptors&&_fails(function(){return 7!=_objectCreate(dP$1({},"a",{get:function(){return dP$1(this,"a",{value:7}).a}})).a})?function(e,t,r){var n=gOPD$1(ObjectProto,t);n&&delete ObjectProto[t],dP$1(e,t,r),n&&e!==ObjectProto&&dP$1(ObjectProto,t,n)}:dP$1,wrap=function(e){var t=AllSymbols[e]=_objectCreate($Symbol[PROTOTYPE$2]);return t._k=e,t},isSymbol=USE_NATIVE&&"symbol"==typeof $Symbol.iterator?function(e){return"symbol"==typeof e}:function(e){return e instanceof $Symbol},$defineProperty=function(e,t,r){return e===ObjectProto&&$defineProperty(OPSymbols,t,r),_anObject(e),t=_toPrimitive(t,!0),_anObject(r),_has(AllSymbols,t)?(r.enumerable?(_has(e,HIDDEN)&&e[HIDDEN][t]&&(e[HIDDEN][t]=!1),r=_objectCreate(r,{enumerable:_propertyDesc(0,!1)})):(_has(e,HIDDEN)||dP$1(e,HIDDEN,_propertyDesc(1,{})),e[HIDDEN][t]=!0),setSymbolDesc(e,t,r)):dP$1(e,t,r)},$defineProperties=function(e,t){_anObject(e);for(var r,n=_enumKeys(t=_toIobject(t)),o=0,i=n.length;o<i;)$defineProperty(e,r=n[o++],t[r]);return e},$create=function(e,t){return void 0===t?_objectCreate(e):$defineProperties(_objectCreate(e),t)},$propertyIsEnumerable=function(e){var t=isEnum.call(this,e=_toPrimitive(e,!0));return!(this===ObjectProto&&_has(AllSymbols,e)&&!_has(OPSymbols,e))&&(!(t||!_has(this,e)||!_has(AllSymbols,e)||_has(this,HIDDEN)&&this[HIDDEN][e])||t)},$getOwnPropertyDescriptor=function(e,t){if(e=_toIobject(e),t=_toPrimitive(t,!0),e!==ObjectProto||!_has(AllSymbols,t)||_has(OPSymbols,t)){var r=gOPD$1(e,t);return!r||!_has(AllSymbols,t)||_has(e,HIDDEN)&&e[HIDDEN][t]||(r.enumerable=!0),r}},$getOwnPropertyNames=function(e){for(var t,r=gOPN$1(_toIobject(e)),n=[],o=0;r.length>o;)_has(AllSymbols,t=r[o++])||t==HIDDEN||t==META||n.push(t);return n},$getOwnPropertySymbols=function(e){for(var t,r=e===ObjectProto,n=gOPN$1(r?OPSymbols:_toIobject(e)),o=[],i=0;n.length>i;)!_has(AllSymbols,t=n[i++])||r&&!_has(ObjectProto,t)||o.push(AllSymbols[t]);return o};USE_NATIVE||(_redefine(($Symbol=function(e){if(this instanceof $Symbol)throw TypeError("Symbol is not a constructor!");var t=_uid(0<arguments.length?e:void 0),r=function(e){this===ObjectProto&&r.call(OPSymbols,e),_has(this,HIDDEN)&&_has(this[HIDDEN],t)&&(this[HIDDEN][t]=!1),setSymbolDesc(this,t,_propertyDesc(1,e))};return _descriptors&&setter&&setSymbolDesc(ObjectProto,t,{configurable:!0,set:r}),wrap(t)})[PROTOTYPE$2],"toString",function(){return this._k}),_objectGopd.f=$getOwnPropertyDescriptor,_objectDp.f=$defineProperty,_objectGopn.f=_objectGopnExt.f=$getOwnPropertyNames,_objectPie.f=$propertyIsEnumerable,_objectGops.f=$getOwnPropertySymbols,_descriptors&&!_library&&_redefine(ObjectProto,"propertyIsEnumerable",$propertyIsEnumerable,!0),_wksExt.f=function(e){return wrap(_wks(e))}),_export(_export.G+_export.W+_export.F*!USE_NATIVE,{Symbol:$Symbol});for(var es6Symbols="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),j=0;es6Symbols.length>j;)_wks(es6Symbols[j++]);for(var wellKnownSymbols=_objectKeys(_wks.store),k=0;wellKnownSymbols.length>k;)_wksDefine(wellKnownSymbols[k++]);_export(_export.S+_export.F*!USE_NATIVE,"Symbol",{for:function(e){return _has(SymbolRegistry,e+="")?SymbolRegistry[e]:SymbolRegistry[e]=$Symbol(e)},keyFor:function(e){if(!isSymbol(e))throw TypeError(e+" is not a symbol!");for(var t in SymbolRegistry)if(SymbolRegistry[t]===e)return t},useSetter:function(){setter=!0},useSimple:function(){setter=!1}}),_export(_export.S+_export.F*!USE_NATIVE,"Object",{create:$create,defineProperty:$defineProperty,defineProperties:$defineProperties,getOwnPropertyDescriptor:$getOwnPropertyDescriptor,getOwnPropertyNames:$getOwnPropertyNames,getOwnPropertySymbols:$getOwnPropertySymbols});var FAILS_ON_PRIMITIVES=_fails(function(){_objectGops.f(1)});_export(_export.S+_export.F*FAILS_ON_PRIMITIVES,"Object",{getOwnPropertySymbols:function(e){return _objectGops.f(_toObject(e))}}),$JSON&&_export(_export.S+_export.F*(!USE_NATIVE||_fails(function(){var e=$Symbol();return"[null]"!=_stringify([e])||"{}"!=_stringify({a:e})||"{}"!=_stringify(Object(e))})),"JSON",{stringify:function(e){for(var t,r,n=[e],o=1;o<arguments.length;)n.push(arguments[o++]);if(r=t=n[1],(_isObject(t)||void 0!==e)&&!isSymbol(e))return _isArray(t)||(t=function(e,t){if("function"==typeof r&&(t=r.call(this,e,t)),!isSymbol(t))return t}),n[1]=t,_stringify.apply($JSON,n)}}),$Symbol[PROTOTYPE$2][TO_PRIMITIVE]||_hide($Symbol[PROTOTYPE$2],TO_PRIMITIVE,$Symbol[PROTOTYPE$2].valueOf),_setToStringTag($Symbol,"Symbol"),_setToStringTag(Math,"Math",!0),_setToStringTag(_global.JSON,"JSON",!0);var init=Symbol("init"),cursor=Symbol("cursor"),jsonObj=Symbol("jsonObj"),next=Symbol("next"),readNode=Symbol("readNode"),readTag=Symbol("readTag"),readText=Symbol("readText"),transEntities=function(e){return e.replace(/&amp;/g,"&").replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&quot;/g,'"').replace(/&apos;/g,"'")},addChildren=function(e,t){for(var r in t)e[r]?(e[r]instanceof Array||(e[r]=[e[r]]),e[r].push(t[r])):e[r]=t[r]},XML=function(){function t(e){_classCallCheck(this,t),this.xmlstr=e,this[cursor]=-1,this[jsonObj]={}}return _createClass(t,[{key:init,value:function(){this[cursor]=-1,this[jsonObj]={},this[cursor]=this.xmlstr.indexOf("?>"),-1<this.xmlstr.indexOf("<!DOCTYPE")&&(this[cursor]=this.xmlstr.indexOf("]>")+2),this[next](),Object.assign(this[jsonObj],this[readNode]())}},{key:next,value:function(){var e=this.xmlstr.indexOf("<",this[cursor]);this[cursor]=0===this.xmlstr.indexOf("<![CDATA[",e)?this[cursor]:e+1}},{key:readTag,value:function(e){for(var t=e.split(/\s+/)[0],r={},n=/([^\s]+)=(['"])([^"']+?)(\2)|([^\s]+)=([^\s"']+)/g,o=null;null!==(o=n.exec(e));)o[1]?r["@"+o[1]]=transEntities(o[3]):o[5]&&(r["@"+o[5]]=transEntities(o[6]));return{nodeName:t,nodeAttr:r}}},{key:readText,value:function(e){var t,r="",n=this[cursor],o=this.xmlstr.indexOf("</"+e+">",n),i=-1;if(o<0)return r;for(;-1<(i=this.xmlstr.indexOf("<![CDATA[",n))&&i<o;)r+=transEntities(this.xmlstr.substring(n,i)),t=this.xmlstr.indexOf("]]>",i),r+=this.xmlstr.substring(i+9,t),n=t+3,o=this.xmlstr.indexOf("</"+e+">",n);return r+=transEntities(this.xmlstr.substring(n,o)),this[cursor]=o+e.length+3,r}},{key:readNode,value:function(){var e={},t=/^[\s\n]*<(?!\/|!\[CDATA\[)/,r=this.xmlstr.indexOf(">",this[cursor]),n=this[readTag](this.xmlstr.substring(this[cursor],r)),o=n.nodeAttr,i=n.nodeName;Object.assign(e,o);var c=_defineProperty({},i,e);this[cursor]=r+1,t.test(this.xmlstr.substring(this[cursor],this[cursor]+1024))&&(this[next](),Object.assign(e,this[readNode]()));var s=this[readText](i);return s&&!/^\s+$/.test(s)&&(e.text=s),t.test(this.xmlstr.substring(this[cursor],this[cursor]+1024))&&(this[next](),addChildren(c,this[readNode]())),c}},{key:"jsonObj",get:function(){return this[init](),this[jsonObj]}}]),t}(),Create=function(e){return new XML(0<arguments.length&&void 0!==e?e:"")};exports.Create=Create;