/*! Copyright 2015, KISSY v6.2.4 MIT Licensed */ !function e(t,n,r){function i(a,u){if(!n[a]){if(!t[a]){var s="function"==typeof require&&require;if(!u&&s)return s(a,!0);if(o)return o(a,!0);throw new Error("Cannot find module '"+a+"'")}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return i(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var o="function"==typeof require&&require,a=0;ai;i++){var a=c[i];t=a+r,t in o&&(g[e]={propertyName:t,propertyNamePrefix:a})}g[e]=g[e]||null}return g[e]}var i,o,a,u,s=window,c=["Webkit","Moz","O","ms"],l=c.length,f=s.document||{},d=f&&f.documentElement,m=!0,p=!1,h="ontouchstart"in f&&!window.callPhantom,g={},v=f.documentMode;d&&(d.querySelector&&8!==v&&(p=!0),o=d.style,m="classList"in d,i="msPointerEnabled"in navigator,a="pointerEnabled"in navigator);var y=/-([a-z])/gi;t.exports={isMsPointerSupported:function(){return i},isPointerSupported:function(){return a},isTouchEventSupported:function(){return h},isTouchGestureSupported:function(){return h||a||i},isDeviceMotionSupported:function(){return!!s.DeviceMotionEvent},isHashChangeSupported:function(){return"onhashchange"in s&&(!v||v>7)},isInputEventSupported:function(){return"oninput"in s&&(!v||v>9)},isTransform3dSupported:function(){if(void 0!==u)return u;if(d&&r("transform"))try{var e=f.createElement("p"),t=r("transform").propertyName;d.insertBefore(e,d.firstChild),e.style[t]="translate3d(1px,1px,1px)";var n=s.getComputedStyle(e),i=n.getPropertyValue(t)||n[t];d.removeChild(e),u=void 0!==i&&i.length>0&&"none"!==i}catch(o){u=!0}else u=!1;return u},isClassListSupported:function(){return m},isQuerySelectorSupported:function(){return p},getCssVendorInfo:function(e){return r(e)}}},{}],4:[function(e,t){var n=e("runtime"),r=e("io-script"),i=e("./lib/fns"),o=e("./lib/setup"),a=e("./lib/config"),u=e("./lib/utils"),s=(e("./lib/data-structure"),e("./lib/configs"),e("./lib/combo-loader")),c=e("./lib/loader");e("./lib/init"),e("./lib/i18n"),o.config=a,o.Utils=u,o.getScript=r,o.ComboLoader=s,o.WaitingModules=c.WaitingModules,n.addMember("config",a),n.addMember("getScript",r),n.addMember("add",c.add),n.addMember("use",c.use),n.addMember("require",c.require),n.addMember("setImmediate",i.setImmediate),t.exports=o},{"./lib/combo-loader":5,"./lib/config":6,"./lib/configs":7,"./lib/data-structure":8,"./lib/fns":9,"./lib/i18n":10,"./lib/init":11,"./lib/loader":12,"./lib/setup":13,"./lib/utils":15,"io-script":16,runtime:28}],5:[function(e,t){function n(e,t,n,r,i){function o(){--a||n(f,u)}var a=t&&t.length,u=[],f=[];c.each(t,function(t){var n,a={timeout:i,success:function(){f.push(t),n&&b&&(l.registerModule(e,n.name,b.factory,b.config),b=void 0),o()},error:function(){u.push(t),o()},charset:r};t.combine||(n=t.mods[0],"css"===n.getType()?n=void 0:d&&(x=n.name,w=(new Date).valueOf(),a.attrs={"data-mod-name":n.name})),s.Config.loadModsFn(t,a)})}function r(e,t){c.mix(this,{runtime:e,waitingModules:t})}function i(e,t){if(!e&&"function"==typeof t&&(t.length>1||t.define)){var n=l.getRequiresFromFn(t);n.length&&(e=e||{},e.requires=n)}else e&&e.requires&&!e.cjs&&(e.cjs=0);return e}function o(){var e,t,n,r,i=s.Env.host.document.getElementsByTagName("script");for(t=i.length-1;t>=0;t--)if(r=i[t],"interactive"===r.readyState){e=r;break}return n=e?e.getAttribute("data-mod-name"):x}function a(e){c.each(e,function(e){var t=[];c.each(e.mods,function(e){e.status===h&&t.push(e.name)})})}function u(e,t){e=e.split(/\//),t=t.split(/\//);for(var n=Math.min(e.length,t.length),r=0;n>r&&e[r]===t[r];r++);return e.slice(0,r).join("/")+"/"}var s=e("runtime/index"),c=e("./fns"),l=e("./utils"),f=e("./setup").Status,d=c.ieMode<10,m=l.getHash,p=f.LOADING,h=f.LOADED,g=f.READY_TO_ATTACH,v=f.ERROR,y=(new Date).valueOf();r.groupTag=y;var b,x,w;r.add=function(e,t,n,r,a){if(3===a&&c.isArray(t)){var u=t;t=n,n={requires:u,cjs:1}}"function"==typeof e||1===a?(n=t,t=e,n=i(n,t),d?(e=o(),l.registerModule(r,e,t,n),x=null,w=0):b={factory:t,config:n}):(d?(x=null,w=0):b=void 0,n=i(n,t),l.registerModule(r,e,t,n))},c.mix(r.prototype,{use:function(e){var t,r,i=this,o=s.Config.timeout,u=i.runtime;t=c.keys(i.calculate(e)),l.createModulesInfo(u,t),r=i.getComboUrls(t),c.each(r.css,function(e){n(u,e,function(e,t){a(e),c.each(e,function(e){c.each(e.mods,function(e){l.registerModule(u,e.name,s.noop),e.notifyAll()})}),c.each(t,function(e){c.each(e.mods,function(t){var n=t.name+" is not loaded! can not find module in path : "+e.fullpath;console&&console.error(n),t.status=v,t.notifyAll()})})},e.charset,o)}),c.each(r.js,function(e){n(u,e,function(t){a(t),c.each(e,function(e){c.each(e.mods,function(t){if(!t.factory){var n=t.name+" is not loaded! can not find module in path : "+e.fullpath;console&&console.error(n),t.status=v}t.notifyAll()})})},e.charset,o)})},calculate:function(e,t,n){var r,i,o,a,u=this,s=u.waitingModules,c=u.runtime;for(n=n||{},t=t||{},r=0;r=g||(a!==h&&(s.contains(i)||(a!==p&&(o.status=p,n[i]=1),o.wait(function(e){s.remove(e.name),s.notifyAll()}),s.add(i))),u.calculate(o.getNormalizedRequires(),t,n)));return n},getComboMods:function(e,t){for(var n,r,i,o,a,s,f,d,m,p,h,g,v,b={},x=this.runtime,w=0,M=e.length;M>w;++w){r=e[w],i=l.createModuleInfo(x,r),a=i.getType(),v=i.getFullPath(),o=i.getPackage(),h=o.name,m=o.getCharset(),d=o.getTag(),g=o.getGroup(),p=o.getPrefixUriForCombo(),n=o.getPackageUri();var A=h;if((i.canBeCombined=o.isCombine()&&c.startsWith(v,p))&&g){A=g+"_"+m+"_"+y;var E;(E=t[A])?E.isSameOriginAs(n)?E.setPath(u(E.getPath(),n.getPath())):(A=h,t[h]=n):t[A]=n.clone()}else t[h]=n;s=b[a]=b[a]||{},(f=s[A])?(1!==f.tags.length||f.tags[0]!==d)&&f.tags.push(d):(f=s[A]=[],f.charset=m,f.tags=[d]),f.push(i)}return b},getComboUrls:function(e){var t=this.runtime,n=t.Config,r=n.comboPrefix,i=n.comboSep,o=n.comboMaxFileNum,a=n.comboMaxUrlLength,u={},s=this.getComboMods(e,u),c={};for(var l in s){c[l]={};for(var f in s[l]){var d=[],p=[],h=s[l][f],g=h.tags,v=g.length>1?m(g.join("")):g[0],y=v?"?t="+encodeURIComponent(v)+"."+l:"",b=y.length,x=u[f].toString(),w=x.length,M=x+r,A=c[l][f]=[],E=M.length;A.charset=h.charset,A.mods=[];for(var q=function(){A.push({combine:1,fullpath:M+d.join(i)+y,mods:p})},C=0;Co||E+d.join(i).length+b>a)&&(d.pop(),p.pop(),q(),d=[],p=[],C--)}else A.push({combine:0,fullpath:O,mods:[S]})}d.length&&q()}}return c}}),t.exports=r},{"./fns":9,"./setup":13,"./utils":15,"runtime/index":28}],6:[function(e,t){var n=e("runtime/index"),r=e("./fns"),i=function(e,t){var i,o,a,u=n,s=n.Config,c=s.fns;return r.isObject(e)?r.each(e,function(e,t){a=c[t],a?a.call(u,e):s[t]=e}):(i=c[e],void 0===t?o=i?i.call(u):s[e]:i?o=i.call(u,t):s[e]=t),o};t.exports=i},{"./fns":9,"runtime/index":28}],7:[function(e){function t(e){var t;return e=e.replace(/\\/g,"/"),"/"!==e.charAt(e.length-1)&&(e+="/"),n?t=n.resolve(e):(l.startsWith(e,"file:")||(e="file:"+e),t=new a(e)),t}var n,r,i=e("runtime"),o=e("io-script"),a=e("./uri"),u=e("./utils"),s=e("./setup").Status,c=e("./data-structure"),l=e("./fns"),f=i.Env.host,d=f.location,m=i.Config.fns;!l.nodejs&&d&&(r=d.href)&&(n=new a(r)),i.Config.loadModsFn=function(e,t){o(e.fullpath,t)},m.packages=function(e){var n,r=this.Config,o=r.packages=r.packages||{};return e?void l.each(e,function(e,r){n=e.name||r;var a=t(e.base||e.path);e.name=n,e.base=a.toString(),e.baseUri=a,e.runtime=i,delete e.path,o[n]?o[n].reset(e):o[n]=new c.Package(e)}):e===!1?void(r.packages={}):o},m.modules=function(e){var t=this;e&&l.each(e,function(e,n){var r=u.createModuleInfo(t,n,e);r.status===s.INIT&&l.mix(r,e)})},m.base=function(e){var n,r=this,i=r.Config;return e?(n=t(e),i.base=n.toString(),void(i.baseUri=n)):i.base}},{"./data-structure":8,"./fns":9,"./setup":13,"./uri":14,"./utils":15,"io-script":16,runtime:28}],8:[function(e,t){function n(e,t){return t in e?e[t]:e.runtime.Config[t]}function r(e){d.mix(this,e)}function i(e){var t=this;t.exports={},t.status=p.INIT,t.name=void 0,t.factory=void 0,t.cjs=1,d.mix(t,e),t.waitedCallbacks=[]}function o(e){for(var t=[],n=0;no.length&&(o=n);return r[o]||y}var c=e("runtime/index"),l=e("path/index"),f=e("./uri"),d=e("./fns"),m=e("./setup"),p=m.Status,h=e("./utils"),g={},v="ignorePackageNameInUri";r.prototype={constructor:r,reset:function(e){d.mix(this,e)},getTag:function(){return n(this,"tag")},getName:function(){return this.name},getBase:function(){return n(this,"base")},getPrefixUriForCombo:function(){var e=this,t=e.name;return e.getBase()+(t&&!e.isIgnorePackageNameInUri()?t+"/":"")},getPackageUri:function(){var e=this;return e.packageUri=new f(this.getPrefixUriForCombo()),e.packageUri},getBaseUri:function(){return n(this,"baseUri")},isDebug:function(){return n(this,"debug")},isIgnorePackageNameInUri:function(){return n(this,v)},getCharset:function(){return n(this,"charset")},isCombine:function(){return n(this,"combine")},getGroup:function(){return n(this,"group")}},g.Package=r,i.prototype={kissy:1,constructor:i,use:function(e,t){return e=h.getModNamesAsArray(e),c.use(h.normalDepModuleName(this.name,e),t)},resolve:function(e){return this.getFullPathUri().resolve(e)},resolveByName:function(e){return h.normalDepModuleName(this.name,e)},require:function(e){var t=this;if("string"==typeof e)return c.require(e,this.name);for(var n=e,r=0;rn;n++)(e=this.waitedCallbacks[n])(this);this.waitedCallbacks=[]},getType:function(){var e=this,t=e.type;return t||(t=".css"===l.extname(e.name).toLowerCase()?"css":"js",e.type=t),t},getFullPathUri:function(){var e,t,n,r,i,o,a=this;return a.fullPathUri||(a.fullpath?t=new f(a.fullpath):(r=a.getPackage(),n=r.getBaseUri(),o=a.getPath(),r.isIgnorePackageNameInUri()&&(i=r.name)&&(o=l.relative(i,o)),t=n.resolve(o),(e=a.getTag())&&(e+="."+a.getType(),t.query.set("t",e))),a.fullPathUri=t),a.fullPathUri},getFullPath:function(){var e,t=this;return t.fullpath||(e=t.getFullPathUri(),t.fullpath=e.toString()),t.fullpath},getPath:function(){var e=this;return e.path||(e.path=u(e))},getName:function(){return this.name},getPackage:function(){var e=this;return e.packageInfo||(e.packageInfo=s(e.runtime,e.name))},getTag:function(){var e=this;return e.tag||e.getPackage().getTag()},getCharset:function(){var e=this;return e.charset||e.getPackage().getCharset()},getRequiresWithAlias:function(){var e=this,t=e.requiresWithAlias,n=e.requires;return n&&0!==n.length?(t||(e.requiresWithAlias=t=h.normalizeModNamesWithAlias(e.runtime,n,e.name)),t):n||[]},getRequiredMods:function(){var e=this,t=e.runtime;return d.map(e.getNormalizedRequires(),function(e){return h.createModuleInfo(t,e)})},getNormalizedRequires:function(){var e,t=this,n=t.normalizedRequiresStatus,r=t.status,i=t.requires;return i&&0!==i.length?(e=t.normalizedRequires)&&n===r?e:(t.normalizedRequiresStatus=r,t.normalizedRequires=h.normalizeModNames(t.runtime,i,t.name),t.normalizedRequires):i||[]}},g.Module=i;var y=new r({name:"",runtime:c});m.Package=g.Package,m.Module=g.Module,t.exports=g},{"./fns":9,"./setup":13,"./uri":14,"./utils":15,"path/index":24,"runtime/index":28}],9:[function(e,t,n){function r(e){var t=[];for(var n in e)t.push(n);return t}function i(e){var t=0;return parseFloat(e.replace(/\./g,function(){return 0===t++?".":""}))}function o(e,t,n){function r(){}var i=[].slice,o=i.call(arguments,3),a=function(){var a=i.call(arguments);return t.apply(this instanceof r?this:n||this,e?a.concat(o):o.concat(a))};return r.prototype=t.prototype,a.prototype=new r,a}function a(e){return encodeURIComponent(String(e))}function u(e){return decodeURIComponent(e.replace(/\+/g," "))}var s,c=e("runtime/index"),l=e("querystring"),f=c.Env.host,d=(f.navigator||{}).userAgent||"",m=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};(s=d.match(/Trident\/([\d.]*)/))&&(n.trident=i(s[1])),(s=d.match(/Gecko/))&&(n.gecko=.1,(s=d.match(/rv:([\d.]*)/))&&s[1]&&(n.gecko=i(s[1]))),(s=d.match(/MSIE ([^;]*)|Trident.*; rv(?:\s|:)?([0-9.]+)/))&&(v=s[1]||s[2])&&(n.ie=i(v),n.ieMode=f.document.documentMode||n.ie,n.trident=n.trident||1),function(){function e(){for(var e,n=0;e=t[n++];)e();n>1&&(t=[]),r=0}var t=[],r=0;n.setImmediate=function(e){t.push(e),r||(r=1,i())};var i;if("function"==typeof setImmediate)i=function(){setImmediate(e)};else if("undefined"!=typeof MessageChannel){var o=new MessageChannel;o.port1.onmessage=function(){i=a,o.port1.onmessage=e,e()};var a=function(){o.port2.postMessage(0)};i=function(){setTimeout(e,0),a()}}else i=function(){setTimeout(e,0)}}(),n.isArray=m,n.keys=r,n.bind=o(0,o,null,0),n.indexOfArray=Array.prototype.indexOf?function(e,t){return Array.prototype.indexOf.call(t,e)}:function(e,t){for(var n=0,r=t.length;r>n;++n)if(t[n]===e)return n;return-1},n.map=Array.prototype.map?function(e,t,n){return Array.prototype.map.call(e,t,n||this)}:function(e,t,n){for(var r=e.length,i=new Array(r),o=0;r>o;o++){var a="string"==typeof e?e.charAt(o):e[o];(a||o in e)&&(i[o]=t.call(n||this,a,o,e))}return i},n.reduce=function(e,t,n){var r=e.length;if("function"!=typeof t)throw new TypeError("callback is not function!");if(0===r&&2===arguments.length)throw new TypeError("arguments invalid");var i,o=0;if(arguments.length>=3)i=n;else for(;;){if(o in e){i=e[o++];break}if(o+=1,o>=r)throw new TypeError}for(;r>o;)o in e&&(i=t.call(void 0,i,e[o],o,e)),o++;return i},n.isObject=function(e){return"[object Object]"==Object.prototype.toString.call(e)},n.isEmptyObject=function(e){for(var t in e)if(void 0!==t)return!1;return!0},n.mix=function(e,t){for(var n in t)e[n]=t[n];return e},n.endsWith=function(e,t){var n=e.length-t.length;return n>=0&&e.indexOf(t,n)==n},n.startsWith=function(e,t){return 0===e.lastIndexOf(t,0)},n.each=function(e,t){var n,i,o=0;if(m(e))for(i=e.length;i>o&&t(e[o],o,e)!==!1;o++);else for(n=r(e),i=n.length;i>o&&t(e[n[o]],n[o],e)!==!1;o++);};{var p="",h=/^[\s\xa0]+|[\s\xa0]+$/g;String.prototype.trim?function(e){return null==e?p:String.prototype.trim.call(e)}:function(e){return null==e?p:(e+"").replace(h,p)}}n.param=l.stringify,n.unparam=l.parse,n.urlDecode=u,n.urlEncode=a},{querystring:26,"runtime/index":28}],10:[function(e){var t=e("runtime/index"),n=e("./loader");n.add("i18n",{alias:function(e,n){return n+"/i18n/"+t.Config.lang}})},{"./loader":12,"runtime/index":28}],11:[function(e){function t(e){return new Function("return "+e)()}function n(e){var n=e.src||"";if(!n.match(h))return 0;var r=e.getAttribute("data-config");r=r?t(r):{};var i,u,s=r.comboPrefix||d,c=r.comboSep||m,l=n.indexOf(s);if(-1===l?u=n.replace(p,"$1"):(u=n.substring(0,l),"/"!==u.charAt(u.length-1)&&(u+="/"),i=n.substring(l+s.length).split(c),o.each(i,function(e){return e.match(h)?(u+=e.replace(p,"$1"),!1):void 0})),!("tag"in r)){var g=n.lastIndexOf("?t=");if(-1!==g){var v=n.substring(g+1);r.tag=a.getHash(f+v)}}return r.base=r.base||u,r}function r(){var e,t,r=l.getElementsByTagName("script");for(e=r.length-1;e>=0;e--)if(t=n(r[e]))return t;return console&&console.error("must load kissy by file name in browser environment: seed.js or seed-min.js"),null}var i=e("runtime/index"),o=e("./fns"),a=e("./utils"),u=e("./config"),s=e("./loader"),c=i.Env.host,l=c&&c.document,f="1450252392754",d="??",m=",",p=/^(.*)(seed|kissy|loader)(?:-min)?\.js[^\/]*/i,h=/(seed|kissy|loader)(?:-min)?\.js/i;u({comboPrefix:d,comboSep:m,charset:"utf-8",lang:"zh-cn"}),l&&l.getElementsByTagName&&u(o.mix({comboMaxUrlLength:2e3,comboMaxFileNum:40},r())),c.define=function(e,t,n){t&&o.isArray(t)?n.define=1:"function"==typeof e&&(e.define=1),s.add(e,t,n)}},{"./config":6,"./fns":9,"./loader":12,"./utils":15,"runtime/index":28}],12:[function(e,t){function n(e){i.mix(this,{fn:e,waitMods:{}})}var r=e("runtime/index"),i=e("./fns"),o=e("./utils"),a=e("./combo-loader"),u=r.Env,s=i.setImmediate;n.prototype={constructor:n,notifyAll:function(){var e=this,t=e.fn;t&&i.isEmptyObject(e.waitMods)&&(e.fn=null,t())},add:function(e){this.waitMods[e]=1},remove:function(e){delete this.waitMods[e]},contains:function(e){return this.waitMods[e]}};var c={};c.WaitingModules=n,i.mix(c,{add:function(e,t,n){a.add(e,t,n,r,arguments.length)},use:function(e,t,i){function u(){++p;{var e,n=[];(new Date).valueOf()}e=o.checkModsLoadRecursively(l,r,void 0,n),e?(o.attachModsRecursively(l,r),t&&(d?m():s(m))):n.length?i&&(d?i.apply(r,n):s(function(){i.apply(r,n)})):(h.fn=u,f.use(l))}var l,f,d,m,p=0,h=new n(u);return"object"==typeof t&&(d=t.sync,i=t.error,t=t.success),m=function(){t.apply(r,o.getModules(r,e))},e=o.getModNamesAsArray(e),e=o.normalizeModNamesWithAlias(r,e),l=o.unalias(r,e),f=new a(r,h),d?h.notifyAll():s(function(){h.notifyAll()}),r||c},require:function(e,t){if(e){var n=o.unalias(r,o.normalizeModNamesWithAlias(r,[e],t));return o.attachModsRecursively(n,r),o.getModules(r,n)[1]}}}),u.mods={},t.exports=c},{"./combo-loader":5,"./fns":9,"./utils":15,"runtime/index":28}],13:[function(e,t){var n=e("runtime/index"),r={};n.addMember("Loader",r),r.Status={ERROR:-1,INIT:0,LOADING:1,LOADED:2,READY_TO_ATTACH:3,ATTACHING:4,ATTACHED:5},t.exports=r},{"runtime/index":28}],14:[function(e,t){function n(e){e._queryMap||(e._queryMap=u.unparam(e._query))}function r(e){this._query=e||""}function i(e,t){return e.toLowerCase()===t.toLowerCase()}function o(e){if(e instanceof o)return e.clone();var t,n=this;return u.mix(n,{scheme:"",userInfo:"",hostname:"",port:"",path:"",query:"",fragment:""}),t=a.parse(e),u.each(t,function(e,t){if(e=e||"","query"===t)n.query=new r(e);else{try{e=u.urlDecode(e)}catch(i){new Error(i+"urlDecode error : "+e)}n[t]=e}}),n}var a=(e("path"),e("url")),u=e("./fns"),s={scheme:1,userInfo:2,hostname:3,port:4,path:5,query:6,fragment:7};r.prototype={constructor:r,clone:function(){return new r(this.toString())},get:function(e){var t,r=this;return n(r),t=r._queryMap,e?t[e]:t},set:function(e,t){var i,o=this;return n(o),i=o._queryMap,"string"==typeof e?o._queryMap[e]=t:(e instanceof r&&(e=e.get()),u.each(e,function(e,t){i[t]=e})),o},toString:function(e){var t=this;return n(t),u.param(t._queryMap,void 0,void 0,e)}},o.prototype={constructor:o,clone:function(){var e=new o,t=this;return u.each(s,function(n,r){e[r]=t[r]}),e.query=e.query.clone(),e},resolve:function(e){"string"!=typeof e&&(e=a.format(e));var t=new o(a.resolve(this.toString(),e));return t.query=new r(t.query),t},setPath:function(e){return this.path=e,this},getPath:function(){return this.path},isSameOriginAs:function(e){var t=this;return i(t.hostname,e.hostname)&&i(t.scheme,e.scheme)&&i(t.port,e.port)},toString:function(e){return a.format(this,e)}},o.Query=r,t.exports=o},{"./fns":9,path:24,url:31}],15:[function(e,t){function n(e){if("string"==typeof e)return r(e);for(var t=[],n=0,i=e.length;i>n;n++)t[n]=r(e[n]);return t}function r(e){return"/"===e.charAt(e.length-1)&&(e+="index"),s.endsWith(e,".js")&&(e=e.slice(0,-3)),e}function i(e,t){var n=t.indexOf("!");if(-1!==n){var r=t.substring(0,n);t=t.substring(n+1),a.use(r,{sync:!0,success:function(n,i){i.alias&&(t=i.alias(e,t,r))}})}return t}function o(e){var t;return(t=e.match(/^\s*["']([^'"\s]+)["']\s*$/))||console&&console.error("can not find required mod in require call: "+e),t[1]}var a=e("runtime/index"),u=e("path/index"),s=e("./fns"),c=e("./setup").Status,l=c.ATTACHED,f=c.READY_TO_ATTACH,d=c.LOADED,m=c.ATTACHING,p=c.ERROR,h=!0,g=!1,v=a.Env.host,y=(v.document,{}),b=/(\/\*([\s\S]*?)\*\/|([^:]|^)\/\/(.*)$)/gm,x=/[^.'"]\s*require\s*\(([^)]+)\)/g;y.normalDepModuleName=function(e,t){var n,r=0;if(!t)return t;if("string"==typeof t)return s.startsWith(t,"../")||s.startsWith(t,"./")?u.resolve(u.dirname(e),t):u.normalize(t);for(n=t.length;n>r;r++)t[r]=y.normalDepModuleName(e,t[r]);return t},y.createModulesInfo=function(e,t){for(var n=0;n=m},!0),a.push(i?u[r[0]].exports:null))}),a},y.attachModsRecursively=function(e,t){var n,r=e.length;for(n=0;r>n;n++)y.attachModRecursively(e[n],t)},y.checkModsLoadRecursively=function(e,t,n,r,i){n=n||[],i=i||{};var o,a=1,u=e.length,s=n.length;for(o=0;u>o;o++)a=a&&y.checkModLoadRecursively(e[o],t,n,r,i),n.length=s;return!!a},y.checkModLoadRecursively=function(e,t,n,r,i){var o,a=t.Env.mods,u=a[e];return e in i?i[e]:u?(o=u.status,o===p?(r.push(u),i[e]=g,g):o>=f?(i[e]=h,h):o!==d?(i[e]=g,g):s.indexOfArray(e,n)>-1?(console&&console.warn("find cyclic dependency between mods: "+n),i[e]=h,h):(n.push(e),y.checkModsLoadRecursively(u.getNormalizedRequires(),t,n,r,i)?(u.status=f,i[e]=h,h):(i[e]=g,g))):(i[e]=g,g)},y.attachModRecursively=function(e,t){var n,r=t.Env.mods,i=r[e];n=i.status,n>=m||(i.status=m,i.cjs?y.attachMod(t,i):(y.attachModsRecursively(i.getNormalizedRequires(),t),y.attachMod(t,i)))},y.attachMod=function(e,t){var n,r=t.factory;if("function"==typeof r){var i;t.cjs&&(r.length>1||r.define)&&(i=s.bind(t.require,t)),n=r.apply(t,t.cjs?t.factory.define?[i,t.exports,t]:[e,i,t.exports,t]:y.getModules(e,t.getRequiresWithAlias())),void 0!==n&&(t.exports=n)}else t.exports=r;t.status=l},y.getModNamesAsArray=function(e){return"string"==typeof e&&(e=e.replace(/\s+/g,"").split(",")),e},y.normalizeModNames=function(e,t,n){return y.unalias(e,y.normalizeModNamesWithAlias(e,t,n))},y.unalias=function(e,t){for(var r,i,o,a,u=[].concat(t),s=0,c=e.Env.mods;!s;)for(s=1,r=u.length-1;r>=0;r--)if((i=c[u[r]])&&"alias"in i){for(s=0,o=i.alias,"string"==typeof o&&(o=[o]),a=o.length-1;a>=0;a--)o[a]||o.splice(a,1);u.splice.apply(u,[r,1].concat(n(o)))}return u},y.normalizeModNamesWithAlias=function(e,t,r){var o,a,u=[];if(t)for(o=0,a=t.length;a>o;o++)t[o]&&u.push(i(e,n(t[o])));return r&&(u=y.normalDepModuleName(r,u)),u},y.registerModule=function(e,t,n,i){t=r(t);var o=e.Env.mods,a=o[t];return a&&void 0!==a.factory?void(console&&console.warn(t+" is defined more than once")):(y.createModuleInfo(e,t),a=o[t],s.mix(a,{name:t,status:d,factory:n}),void s.mix(a,i))},y.getHash=function(e){var t,n=5381;for(t=e.length;--t>-1;)n=(n<<5)+n+e.charCodeAt(t);return n+""},y.getRequiresFromFn=function(e){var t=[];return e.toString().replace(b,"").replace(x,function(e,n){t.push(o(n))}),t},t.exports=y},{"./fns":9,"./setup":13,"path/index":24,"runtime/index":28}],16:[function(e,t){t.exports=e("./lib/get-script")},{"./lib/get-script":19}],17:[function(e,t,n){function r(){c||(i("start css poll timer"),a())}function i(e){console&&console.debug&&console.debug(e)}function o(e,t){var n=0;if(u.webkit)e.sheet&&(i("webkit css poll loaded: "+t),n=1);else if(e.sheet)try{var r=e.sheet.cssRules;r&&(i("same domain css poll loaded: "+t),n=1)}catch(o){var a=o.name;i("css poll exception: "+a+" "+o.code+" "+t),"NS_ERROR_DOM_SECURITY_ERR"===a&&(i("css poll exception: "+a+"loaded : "+t),n=1)}return n}function a(){for(var e in l){var t=l[e],n=t.node;o(n,e)&&(t.callback&&t.callback.call(n),delete l[e])}u.isEmptyObject(l)?(i("clear css poll timer"),c=0):c=setTimeout(a,s)}var u=e("./fns"),s=30,c=0,l={};n.pollCss=function(e,t){var n,i=e.href;n=l[i]={},n.node=e,n.callback=t,r()},n.isCssLoaded=o},{"./fns":18}],18:[function(e,t,n){function r(e){var t=[];for(var n in e)t.push(n);return t}function i(e){var t=0;return parseFloat(e.replace(/\./g,function(){return 0===t++?".":""}))}var o,a=(window.navigator||{}).userAgent||"",u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};((o=a.match(/AppleWebKit\/*\s*([\d.]*)/i))||(o=a.match(/Safari[\/]{0,1}([\d.]*)/)))&&o[1]&&(n.webkit=i(o[1])),n.isEmptyObject=function(e){for(var t in e)if(void 0!==t)return!1;return!0},n.startsWith=function(e,t){return 0===e.lastIndexOf(t,0)},n.each=function(e,t){var n,i,o=0;if(u(e))for(i=e.length;i>o&&t(e[o],o,e)!==!1;o++);else for(n=r(e),i=n.length;i>o&&t(e[n[o]],n[o],e)!==!1;o++);}},{}],19:[function(e,t){var n,r,i=e("path"),o=e("./fns"),a=e("./utils"),u=1e3,s=window.document,c={},l="undefined"!=typeof KISSY?KISSY.Config:{};t.exports=r=function(e,t,r){function f(){var e=b.readyState;e&&"loaded"!==e&&"complete"!==e||(b.onreadystatechange=b.onload=null,w(0))}var d,m,p,h,g,v=t,y=0;if(o.startsWith(i.extname(e).toLowerCase(),".css")&&(y=1),"object"==typeof v&&(t=v.success,d=v.error,m=v.timeout,r=v.charset,p=v.attrs),h=c[e]=c[e]||[],h.push([t,d]),h.length>1)return h.node;var b=s.createElement(y?"link":"script"),x=function(){g&&(clearTimeout(g),g=void 0)};p&&o.each(p,function(e,t){b.setAttribute(t,e)}),r&&(b.charset=r),y?(b.href=e,b.rel="stylesheet"):(b.src=e,b.async=!0),h.node=b;var w=function(t){var n,r=t;x(),o.each(c[e],function(e){(n=e[r])&&n.call(b)}),delete c[e]},M="onload"in b,A=l.forceCssPoll||o.webkit&&o.webkit<536;return y&&A&&M&&(M=!1),M?(b.onload=f,b.onerror=function(){b.onerror=null,w(1)}):y?a.pollCss(b,function(){w(0)}):b.onreadystatechange=f,m&&(g=setTimeout(function(){w(1)},m*u)),n||(n=a.docHead()),y?n.appendChild(b):n.insertBefore(b,n.firstChild),b}},{"./fns":18,"./utils":20,path:24}],20:[function(e,t){var n=e("./css-onload"),r=window.document,i={};i.docHead=function(){return r.getElementsByTagName("head")[0]||r.documentElement},i.pollCss=n.pollCss,t.exports=i},{"./css-onload":17}],21:[function(e,t){var n=e("./lib/logger-manager");t.exports=n},{"./lib/logger-manager":22}],22:[function(e,t){function n(e){var t={};for(var n in o)!function(t,n){t[n]=function(t){return r.log(t,n,e)}}(t,n);return t}var r,i={},o={debug:10,info:20,warn:30,error:40};r=t.exports={config:function(e){return e&&(i=e),i},log:function(e,t,n){var r=1;if(n){r=0;var a,u,s,c,l,f,d;if(t=t||"debug",c=o[t]||o.debug,a=i.includes){for(r=0,u=0;u=l&&f>=c&&n.match(d)){r=1;break}}else if(a=i.excludes)for(r=1,u=0;u=l&&f>=c&&n.match(d)){r=0;break}r&&(e=n+": "+e)}return r?("undefined"!=typeof console&&console.log&&console[t&&console[t]?t:"log"](e),e):void 0},getLogger:function(e){return n(e)},error:function(e){throw e instanceof Error?e:new Error(e)}}},{}],23:[function(e){var t=e("runtime/index"),n=e("ua/index"),r=e("feature/index");t.config({modules:{"anim-base":{requires:["dom","promise","util"]},"anim-timer":{requires:["dom","util","anim-base","feature"]},"anim-transition":{requires:["util","dom","anim-base","feature"]},attribute:{requires:["util","event-custom"]},base:{requires:["util","attribute"]},"dom-base":{requires:["util","io-script","feature","query-selector"]},"dom-extra":{requires:["util","dom-base","feature"]},"dom-ie":{requires:["util","dom-base","ua"]},event:{requires:["event-dom","event-custom"]},"event-base":{requires:["util"]},"event-custom":{requires:["util","event-base"]},"event-dom-base":{requires:["util","event-base","dom"]},"event-dom-extra":{requires:["event-dom-base","dom","util","feature","ua"]},"event-dom-ie":{requires:["event-dom-base","dom"]},"event-gesture":{requires:["event-touch","event-dom","util","feature"]},"event-touch":{requires:["event-dom","dom","util","feature"]},io:{requires:["util","io-extra","io-form"]},"io-base":{requires:["util","io-script","url","promise","querystring"]},"io-extra":{requires:["io-base","util","dom","querystring"]},"io-form":{requires:["io-base","util","dom","querystring"]},node:{requires:["node-base","node-event","node-anim"]},"node-anim":{requires:["util","node-base","anim"]},"node-base":{requires:["dom","util"]},"node-event":{requires:["util","node-base","event-dom"]}}}),t.config({modules:{anim:{alias:r.getCssVendorInfo("transition")?"anim-transition":"anim-timer"},dom:{alias:["dom-base","dom-extra",n.ieMode<10?"dom-ie":""]},"event-dom":{alias:["event-dom-base","event-dom-extra",r.isTouchEventSupported?"event-gesture":"",n.ieMode<9?"event-dom-ie":""]},json:{alias:[n.ieMode<8?"json-ie":"json-base"]},"query-selector":{alias:r.isQuerySelectorSupported()?"query-selector-base":"query-selector-ie"},core:{alias:["dom","event","io","anim","base","node","json","ua","cookie"]},ajax:{alias:"io"},"rich-base":{alias:"base"}},packages:{kg:{base:"//g.alicdn.com/"}}})},{"feature/index":2,"runtime/index":28,"ua/index":29}],24:[function(e,t){var n=e("./lib/path");t.exports=n},{"./lib/path":25}],25:[function(e,t){function n(e){var t=e.split(/\/+/);return t[t.length-1]||(t=t.slice(0,-1)),t[0]||(t=t.slice(1)),t}function r(e,t){for(var n,r=0,i=e.length-1,o=[];i>=0;i--)n=e[i],"."!==n&&(".."===n?r++:r?r--:o[o.length]=n);if(t)for(;r--;r)o[o.length]="..";return o=o.reverse()}var i=/^(\/?)([\s\S]+\/(?!$)|\/)?((?:\.{1,2}$|[\s\S]+?)?(\.[^.\/]*)?)$/,o={resolve:function(){var e,t,i,o="",a=arguments,u=0;for(t=a.length-1;t>=0&&!u;t--)i=a[t],"string"==typeof i&&i&&(o=i+"/"+o,u="/"===i.charAt(0));return e=r(n(o),!u).join("/"),(u?"/":"")+e||"."},normalize:function(e){var t="/"===e.charAt(0),i="/"===e.slice(-1);return e=r(n(e),!t).join("/"),e||t||(e="."),e&&i&&(e+="/"),(t?"/":"")+e},join:function(){var e=Array.prototype.slice.call(arguments);return o.normalize(e.join("/"))},relative:function(e,t){e=o.normalize(e),t=o.normalize(t);var r,i,a=n(e),u=[],s=n(t),c=Math.min(a.length,s.length);for(r=0;c>r&&a[r]===s[r];r++);for(i=r;rd;++d)m=h[d],n(m)&&(g.push(f,c&&"[]"!==v.slice(-2)?s("[]"):u),m!==o&&g.push(i,s(m+u)),g.push(t))}return g.pop(),g.join(u)},parse:function(e,t,n){if("string"!=typeof e||!(e=e.replace(/^[\s\xa0]+|[\s\xa0]+$/g,"")))return{};t=t||a,n=n||l;for(var u,s,c,f={},d=e.split(t),m=0,p=d.length;p>m;++m){if(u=d[m].indexOf(n),-1===u)s=i(d[m]),c=o;else{s=i(d[m].substring(0,u)),c=d[m].substring(u+1);try{c=i(c)}catch(h){throw new Error("decodeURIComponent error : "+c)}"[]"===s.slice(-2)&&(s=s.slice(0,-2))}s in f?r(f[s])?f[s].push(c):f[s]=[f[s],c]:f[s]=c}return f}}},{}],28:[function(e,t){(function(e){var n;"undefined"!=typeof window?n=window:"undefined"!=typeof e?n=e:"undefined"!=typeof self&&(n=self);var r=n.KISSY;r||(r={},r.__BUILD_TIME="1450252392754",r.Env={host:n},r.Config={debug:"",fns:{}},r.version="6.2.4",r.addMember=function(e,t,n){if(e in r&&!n)throw new Error("The member that you want to add to KISSY already exists!");r[e]=t}),t.exports=n.KISSY=r}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],29:[function(e,t){t.exports=e("./lib/ua")},{"./lib/ua":30}],30:[function(e,t){function n(e){var t=0;return parseFloat(e.replace(/\./g,function(){return 0===t++?".":""}))}function r(e,t){var r,i;t[r="trident"]=.1,(i=e.match(/Trident\/([\d.]*)/))&&i[1]&&(t[r]=n(i[1])),t.core=r}function i(e){var t,r;return(t=e.match(/MSIE ([^;]*)|Trident.*; rv(?:\s|:)?([0-9.]+)/))&&(r=t[1]||t[2])?n(r):0}function o(e){var t,o,u,s,l,f="",d=f,m=f,p=[6,9],h="{{version}}",g="",v=c&&c.createElement("div"),y=[],b={webkit:a,edge:a,trident:a,gecko:a,presto:a,chrome:a,safari:a,firefox:a,ie:a,ieMode:a,opera:a,mobile:a,core:a,shell:a,phantomjs:a,os:a,ipad:a,iphone:a,ipod:a,ios:a,android:a,nodejs:a};if(v&&v.getElementsByTagName&&(v.innerHTML=g.replace(h,""),y=v.getElementsByTagName("s")),y.length>0){for(r(e,b),s=p[0],l=p[1];l>=s;s++)if(v.innerHTML=g.replace(h,s),y.length>0){b[m="ie"]=s;break}!b.ie&&(u=i(e))&&(b[m="ie"]=u)}else((o=e.match(/AppleWebKit\/*\s*([\d.]*)/i))||(o=e.match(/Safari\/([\d.]*)/)))&&o[1]?(b[d="webkit"]=n(o[1]),(o=e.match(/OPR\/(\d+\.\d+)/))&&o[1]?b[m="opera"]=n(o[1]):(o=e.match(/Chrome\/([\d.]*)/))&&o[1]?b[m="chrome"]=n(o[1]):(o=e.match(/\/([\d.]*) Safari/))&&o[1]?b[m="safari"]=n(o[1]):b.safari=b.webkit,(o=e.match(/Edge\/([\d.]*)/))&&o[1]&&(d=m="edge",b[d]=n(o[1])),/ Mobile\//.test(e)&&e.match(/iPad|iPod|iPhone/)?(b.mobile="apple",o=e.match(/OS ([^\s]*)/),o&&o[1]&&(b.ios=n(o[1].replace("_","."))),t="ios",o=e.match(/iPad|iPod|iPhone/),o&&o[0]&&(b[o[0].toLowerCase()]=b.ios)):/ Android/i.test(e)?(/Mobile/.test(e)&&(t=b.mobile="android"),o=e.match(/Android ([^\s]*);/),o&&o[1]&&(b.android=n(o[1]))):(o=e.match(/NokiaN[^\/]*|Android \d\.\d|webOS\/\d\.\d/))&&(b.mobile=o[0].toLowerCase()),(o=e.match(/PhantomJS\/([^\s]*)/))&&o[1]&&(b.phantomjs=n(o[1]))):(o=e.match(/Presto\/([\d.]*)/))&&o[1]?(b[d="presto"]=n(o[1]),(o=e.match(/Opera\/([\d.]*)/))&&o[1]&&(b[m="opera"]=n(o[1]),(o=e.match(/Opera\/.* Version\/([\d.]*)/))&&o[1]&&(b[m]=n(o[1])),(o=e.match(/Opera Mini[^;]*/))&&o?b.mobile=o[0].toLowerCase():(o=e.match(/Opera Mobi[^;]*/))&&o&&(b.mobile=o[0]))):(u=i(e))?(b[m="ie"]=u,r(e,b)):(o=e.match(/Gecko/))&&(b[d="gecko"]=.1,(o=e.match(/rv:([\d.]*)/))&&o[1]&&(b[d]=n(o[1]),/Mobile|Tablet/.test(e)&&(b.mobile="firefox")),(o=e.match(/Firefox\/([\d.]*)/))&&o[1]&&(b[m="firefox"]=n(o[1])));return t||(/windows|win32/i.test(e)?t="windows":/macintosh|mac_powerpc/i.test(e)?t="macintosh":/linux/i.test(e)?t="linux":/rhino/i.test(e)&&(t="rhino")),b.os=t,b.core=b.core||d,b.shell=m,b.ieMode=b.ie&&c.documentMode||b.ie,b}var a,u,s="undefined"!=typeof window?window:{},c=s.document,l=s.navigator&&s.navigator.userAgent||"";u=o(l),u.getDescriptorFromUserAgent=o;var f=["webkit","trident","gecko","presto","chrome","safari","firefox","ie","opera"],d=c&&c.documentElement,m="";if(d){for(var p=0;p-1},filter:function(e,t,n){return i.call(e,t,n||this)},map:function(e,t,n){return u.call(e,t,n||this)},reduce:function(e,t,n){return o.call(e,t,n)},makeArray:function(e){if(null==e)return[];if(a.isArray(e))return e;var t=typeof e.length,n=typeof e;if("number"!==t||"string"==typeof e.nodeName||null!=e&&e==e.window||"string"===n||"function"===n&&!("item"in e&&"number"===t))return[e];for(var r=[],i=0,o=e.length;o>i;i++)r[i]=e[i];return r}})},{"./base":37}],37:[function(e,t){var n=0,r="";t.exports={_debug:"",mix:function(e,t){for(var n in t)e[n]=t[n];return e},guid:function(e){return(e||r)+n++}}},{}],38:[function(e){function t(e,t,n){function r(){}var i=[].slice,o=i.call(arguments,3),a=function(){var a=i.call(arguments);return t.apply(this instanceof r?this:n||this,e?a.concat(o):o.concat(a))};return r.prototype=t.prototype,a.prototype=new r,a}var n=e("./base");n.mix(n,{noop:function(){},now:Date.now||function(){return+new Date},later:function(e,t,r,i,o){t=t||0;var a,u,s=e,c=n.makeArray(o);return"string"==typeof e&&(s=i[e]),a=function(){s.apply(i,c)},u=r?setInterval(a,t):setTimeout(a,t),{id:u,interval:r,cancel:function(){this.interval?clearInterval(u):clearTimeout(u)}}},buffer:function(e,t,r){function i(){i.stop(),o=n.later(e,t,0,r||this,arguments)}if(t=t||150,-1===t)return function(){e.apply(r||this,arguments)};var o=null;return i.stop=function(){o&&(o.cancel(),o=0)},i},bind:t(0,t,null,0),rbind:t(0,t,null,1)})},{"./base":37}],39:[function(e){var t=e("./base"),n="undefined"!=typeof JSON?JSON:{};t.parseJson=n.parse},{"./base":37}],40:[function(e){function t(e,t){return"constructor"===e?s:t}function n(){}function r(e,t){var r;return p?r=p(e):(n.prototype=e,r=new n),r.constructor=t,r}function i(e,t){for(var n in t)e[n]=t[n]}function o(e,t,n,r,i,o,u){if(!t||!e)return e;var s;t[l]=e,o.push(t);for(var c in t)s=c,s!==l&&a(s,e,t,n,r,i,o,u);return e}function a(e,t,n,r,i,a,u,f){if(r||!(e in t)||a){var d=t[e],m=n[e];if(d===m)return void(d===s&&(t[e]=d));if(i&&(m=i.call(n,e,m)),a&&m&&(c.isArray(m)||c.isPlainObject(m)))if(f&&m[l])t[e]=m[l];else{var p=d&&(c.isArray(d)||c.isPlainObject(d))?d:c.isArray(m)?[]:{};t[e]=p,o(p,m,r,i,!0,u,f)}else m===s||!r&&e in t||(t[e]=m)}}function u(e,t,n,r){var i,o,a,s,l=e;if(!e)return l;if(r&&e[f])return n[e[f]].destination;if("object"==typeof e){var d=e.constructor;c.inArray(d,[Boolean,String,Number,Date,RegExp])?l=new d(e.valueOf()):(i=c.isArray(e))?l=t?c.filter(e,t):e.concat():(o=c.isPlainObject(e))&&(l={}),r&&(e[f]=s=c.guid("c"),n[s]={destination:l,input:e})}if(i)for(var m=0;ma&&t.call(n,o,a,e)!==!1;o=e[++a]);}return e},isEmptyObject:function(e){for(var t in e)if(t!==s)return!1;return!0},keys:Object.keys,stamp:function(e,t,n){n=n||d;var r=e[n];if(r)return r;if(!t)try{r=e[n]=c.guid(n)}catch(i){r=s}return r},mix:function(e,t,n,r,i){var a;if("object"==typeof n&&(r=n.whitelist,i=n.deep,a=n.structured,n=n.overwrite),r&&"function"!=typeof r){var u=r;r=function(e,t){return c.inArray(e,u)?t:s}}n===s&&(n=!0),a===s&&(a=!0);var f,d=[],m=0;for(o(e,t,n,r,i,d,a);f=d[m++];)delete f[l];return e},augment:function(e,n){var r,i,o=c.makeArray(arguments),a=o.length-2,u=1,l=o[a],f=o[a+1];for(o[1]=n,c.isArray(f)||(l=f,f=s,a++),"boolean"!=typeof l&&(l=s,a++);a>u;u++)i=o[u],(r=i.prototype)&&(i=c.mix({},r,!0,t)),c.mix(e.prototype,i,l,f);return e},merge:function(e){e=c.makeArray(arguments);var t,n={},r=e.length;for(t=0;r>t;t++)c.mix(n,e[t]);return n},extend:function(e,t,n,i){var o,a=t.prototype;return a.constructor=t,o=r(a,e),e.prototype=c.mix(o,e.prototype),e.superclass=a,n&&c.mix(o,n),i&&c.mix(e,i),e},clone:function(e,t){var n;"object"==typeof t&&(n=t.structured,t=t.filter),n===s&&(n=!0);var r;n&&(r={});var i=u(e,t,r,n);return n&&c.each(r,function(e){if(e=e.input,e[f])try{delete e[f]}catch(t){e[f]=s}}),r=null,i}})},{"./base":37}],41:[function(e){var t=e("./base"),n=e("querystring");t.mix(t,{param:n.stringify,unparam:n.parse})},{"./base":37,querystring:26}],42:[function(e){function t(){return arguments[1].toUpperCase()}var n,r=e("./base"),i=/\\?\{([^{}]+)\}/g,o="",a=String.prototype.trim,u=/-([a-z])/gi;r.mix(r,{trim:function(e){return null==e?o:a.call(e)},startsWith:function(e,t){return 0===e.lastIndexOf(t,0)},endsWith:function(e,t){var n=e.length-t.length;return n>=0&&e.indexOf(t,n)===n},camelCase:function(e){return-1===e.indexOf("-")?e:e.replace(u,t)},urlEncode:function(e){return encodeURIComponent(String(e))},urlDecode:function(e){return decodeURIComponent(e.replace(/\+/g," "))},ucfirst:function(e){return e+="",e.charAt(0).toUpperCase()+e.substring(1)},substitute:function(e,t,r){return"string"==typeof e&&t?e.replace(r||i,function(e,r){return"\\"===e.charAt(0)?e.slice(1):t[r]===n?o:t[r]}):e}})},{"./base":37}],43:[function(e){function t(e,t){return u.hasOwnProperty.call(e,t)}var n,r=e("./base"),i={},o=!1,a=r.noop,u=Object.prototype,s=u.toString;r.mix(r,{type:function(e){return null==e?String(e):i[s.call(e)]||"object"},isPlainObject:function(e){if(!e||"object"!==r.type(e)||e.nodeType||e.window==e)return o;var i,a;try{if((a=e.constructor)&&!t(e,"constructor")&&!t(a.prototype,"isPrototypeOf"))return o}catch(u){return o}for(i in e);return i===n||t(e,i)}}),r.mix(r,{isBoolean:a,isNumber:a,isString:a,isFunction:a,isArray:a,isDate:a,isRegExp:a,isObject:a,isNull:a,isUndefined:a});for(var c="Boolean Number String Function Date RegExp Object Array Null Undefined".split(" "),l=0;l","<":"<","`":"`","/":"/",""":'"',"'":"'"},c={},l=/[&<>"'`]/,f=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;!function(){for(var e in s)c[s[e]]=e}(),r=t(),i=n(),o.mix(o,{escapeHtml:function(e){return e||0===e?(e=""+e,l.test(e)?(e+"").replace(r,function(e){return c[e]}):e):""},escapeRegExp:function(e){return e.replace(f,"\\$&")},unEscapeHtml:function(e){return e.replace(i,function(e,t){return s[e]||String.fromCharCode(+t)})},fromUnicode:function(e){return e.replace(/\\u([a-f\d]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,a))})}}),o.escapeHTML=o.escapeHtml,o.unEscapeHTML=o.unEscapeHtml},{"util-base":34}],49:[function(e){var t=e("util-base");t.mix(t,{throttle:function(e,n,r){if(n=n||150,-1===n)return function(){e.apply(r||this,arguments)};var i=t.now();return function(){var o=t.now();o-i>n&&(i=o,e.apply(r||this,arguments))}}})},{"util-base":34}],50:[function(e){(function(t){function n(e,t){return null!==e&&e!==a&&e[t]!==a}function r(e,t,n){return delete e[c],delete t[c],n}function i(e,t){if(e[c]===t&&t[c]===e)return!0;e[c]=t,t[c]=e;for(var i in t)if(!n(e,i)&&n(t,i))return r(e,t,!1);for(i in e)if(!n(t,i)&&n(e,i))return r(e,t,!1);for(i in t)if(i!==c&&!u.equals(e[i],t[i]))return r(e,t,!1);return u.isArray(e)&&u.isArray(t)&&e.length!==t.length?r(e,t,!1):r(e,t,!0)}function o(e,t){for(var n in t)e[n]=t[n]}var a,u=e("util-base"),s="undefined"==typeof window?t:window,c="__~ks_compared";o(u,{equals:function(e,t){return e===t?!0:e===a||null===e||t===a||null===t?null==e&&null==t:e instanceof Date&&t instanceof Date?e.getTime()===t.getTime():"string"==typeof e&&"string"==typeof t?e===t:"number"==typeof e&&"number"==typeof t?e===t:"object"==typeof e&&"object"==typeof t?i(e,t):e===t},namespace:function(e,t){var n,r,i;for(i=e.split("."),n=t||s,r=0;ro)return void c.cancel();var t=r.getElementById(e);t&&(n(t),c.cancel())},a,!0)}}),t.parseXML=t.parseXml},{"util-base":34}],52:[function(e,t,n){arguments[4][45][0].apply(n,arguments)},{"./lib/extra":53}],53:[function(e,t){var n=e("./extra/base");e("./extra/object"),t.exports=n},{"./extra/base":54,"./extra/object":55}],54:[function(e,t){var n=e("../main");t.exports=n},{"../main":56}],55:[function(e){var t=e("./base"),n=!{toString:1}.propertyIsEnumerable("toString"),r=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","toLocaleString","valueOf"];t.keys=Object.keys||function(e){var t,i,o=[];for(t in e)e.hasOwnProperty(t)&&o.push(t);if(n)for(i=r.length-1;i>=0;i--)t=r[i],e.hasOwnProperty(t)&&o.push(t);return o}},{"./base":54}],56:[function(e,t){var n=e("util-base");e("./main/array"),e("./main/escape"),e("./main/json"),e("./main/string"),e("./main/web"),t.exports=n},{"./main/array":57,"./main/escape":58,"./main/json":59,"./main/string":60,"./main/web":61,"util-base":34}],57:[function(e){var t,n=!0,r=Array.prototype,i=r.indexOf,o=r.lastIndexOf,a=r.filter,u=r.every,s=r.some,c=e("util-base"),l=r.map,f=r.reduce,d=!1;c.mix(c,{indexOf:i?c.indexOf:function(e,t,n){for(var r=n||0,i=t.length;i>r;++r)if(t[r]===e)return r;return-1},lastIndexOf:o?c.lastIndexOf:function(e,n,r){r===t&&(r=n.length-1);for(var i=r;i>=0&&n[i]!==e;i--);return i},filter:a?c.filter:function(e,t,n){var r=[];return c.each(e,function(e,i,o){t.call(n||this,e,i,o)&&r.push(e)}),r},map:l?c.map:function(e,t,n){for(var r=e.length,i=new Array(r),o=0;r>o;o++){var a="string"==typeof e?e.charAt(o):e[o];(a||o in e)&&(i[o]=t.call(n||this,a,o,e))}return i},reduce:f?c.reduce:function(e,r,i){var o=e.length;if("function"!=typeof r)throw new TypeError("callback is not function!");if(0===o&&2===arguments.length)throw new TypeError("arguments invalid");var a,u=0;if(arguments.length>=3)a=i;else do{if(u in e){a=e[u++];break}if(u+=1,u>=o)throw new TypeError}while(n);for(;o>u;)u in e&&(a=r.call(t,a,e[u],u,e)),u++;return a},every:u?c.every:function(e,t,r){for(var i=e&&e.length||0,o=0;i>o;o++)if(o in e&&!t.call(r||this,e[o],o,e))return d;return n},some:s?c.some:function(e,t,r){for(var i=e&&e.length||0,o=0;i>o;o++)if(o in e&&t.call(r||this,e[o],o,e))return n;return d}})},{"util-base":34}],58:[function(e){function t(e){var t=typeof e;return null===e||"object"!==t&&"function"!==t}function n(){var e=f;for(var t in d){var n=d[t];e+=n+"|"}return e=e.slice(0,-1),i=new RegExp(e,"g")}function r(){var e=f;for(var t in m){var n=m[t];e+=n+"|"}return e+="&#(\\d{1,5});",o=new RegExp(e,"g")}var i,o,a=e("util-base"),u="&",s="=",c=!0,l=16,f="",d={"&":"&",">":">","<":"<","`":"`","/":"/",""":'"',"'":"'"},m={},p=/[&<>"'`]/,h=/[\-#$\^*()+\[\]{}|\\,.?\s]/g;!function(){for(var e in d)m[d[e]]=e}(),i=n(),o=r(),a.mix(a,{escapeHtml:function(e){return e||0===e?(e=""+e,p.test(e)?(e+"").replace(i,function(e){return m[e]}):e):""},escapeRegExp:function(e){return e.replace(h,"\\$&")},unEscapeHtml:function(e){return e.replace(o,function(e,t){return d[e]||String.fromCharCode(+t)})},param:function(e,n,r,i){n=n||u,r=r||s,void 0===i&&(i=c);var o,l,d,m,p,h=[],g=a.urlEncode;for(o in e)if(p=e[o],o=g(o),t(p))h.push(o),void 0!==p&&h.push(r,g(p+f)),h.push(n);else if(a.isArray(p)&&p.length)for(l=0,m=p.length;m>l;++l)d=p[l],t(d)&&(h.push(o,i?g("[]"):f),void 0!==d&&h.push(r,g(d+f)),h.push(n));return h.pop(),h.join(f)},unparam:function(e,t,n){if("string"!=typeof e||!(e=a.trim(e)))return{};t=t||u,n=n||s;for(var r,i,o,c={},l=a.urlDecode,f=e.split(t),d=0,m=f.length;m>d;++d){if(r=f[d].indexOf(n),-1===r)i=l(f[d]),o=void 0;else{i=l(f[d].substring(0,r)),o=f[d].substring(r+1);try{o=l(o)}catch(p){}a.endsWith(i,"[]")&&(i=i.substring(0,i.length-2))}i in c?a.isArray(c[i])?c[i].push(o):c[i]=[c[i],o]:c[i]=o}return c},fromUnicode:function(e){return e.replace(/\\u([a-f\d]{4})/gi,function(e,t){return String.fromCharCode(parseInt(t,l))})}}),a.escapeHTML=a.escapeHtml,a.unEscapeHTML=a.unEscapeHtml},{"util-base":34}],59:[function(e){var t=e("util-base"),n=/^[\],:{}\s]*$/,r=/(?:^|:|,)(?:\s*\[)+/g,i=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,o=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g;t.parseJson=window.JSON&&window.JSON.parse?window.JSON.parse:function(e){if(null===e)return e;if("string"==typeof e&&(e=t.trim(e),e&&n.test(e.replace(i,"@").replace(o,"]").replace(r,""))))return new Function("return "+e)();throw new Error("Invalid Json: "+e)}},{"util-base":34}],60:[function(e){var t=e("util-base"),n="",r=/^[\s\xa0]+|[\s\xa0]+$/g,i=String.prototype.trim;t.mix(t,{trim:i?t.trim:function(e){return null===e?n:(e+"").replace(r,n)}})},{"util-base":34}],61:[function(e){function t(){if(!u){i&&i.setTimeout&&v(i,p,t),u=1;for(var e=0;e0)){var d=c.shift();d()}},!0),function(a){c.push(a),window.postMessage("process-tick","*")}}return function(a){setTimeout(a,0)}}(),d.title="browser",d.browser=!0,d.env={},d.argv=[],d.on=c,d.addListener=c,d.once=c,d.off=c,d.removeListener=c,d.removeAllListeners=c,d.emit=c,d.binding=function(){throw new Error("process.binding is not supported")},d.cwd=function(){return"/"},d.chdir=function(){throw new Error("process.chdir is not supported")}},{}],2:[function(a,b){"use strict";function c(a){function b(a){return null===i?void k.push(a):void f(function(){var b=i?a.onFulfilled:a.onRejected;if(null===b)return void(i?a.resolve:a.reject)(j);var c;try{c=b(j)}catch(d){return void a.reject(d)}a.resolve(c)})}function c(a){try{if(a===l)throw new TypeError("A promise cannot be resolved with itself.");if(a&&("object"==typeof a||"function"==typeof a)){var b=a.then;if("function"==typeof b)return void e(b.bind(a),c,g)}i=!0,j=a,h()}catch(d){g(d)}}function g(a){i=!1,j=a,h()}function h(){for(var a=0,c=k.length;c>a;a++)b(k[a]);k=null}if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");var i=null,j=null,k=[],l=this;this.then=function(a,c){return new l.constructor(function(e,f){b(new d(a,c,e,f))})},e(a,c,g)}function d(a,b,c,d){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof b?b:null,this.resolve=c,this.reject=d}function e(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var f=a("asap");b.exports=c},{asap:4}],3:[function(a,b){"use strict";function c(a){this.then=function(b){return"function"!=typeof b?this:new d(function(c,d){e(function(){try{c(b(a))}catch(e){d(e)}})})}}var d=a("./core.js"),e=a("asap");b.exports=d,c.prototype=d.prototype;var f=new c(!0),g=new c(!1),h=new c(null),i=new c(void 0),j=new c(0),k=new c("");d.resolve=function(a){if(a instanceof d)return a;if(null===a)return h;if(void 0===a)return i;if(a===!0)return f;if(a===!1)return g;if(0===a)return j;if(""===a)return k;if("object"==typeof a||"function"==typeof a)try{var b=a.then;if("function"==typeof b)return new d(b.bind(a))}catch(e){return new d(function(a,b){b(e)})}return new c(a)},d.all=function(a){var b=Array.prototype.slice.call(a);return new d(function(a,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,a)},c)}b[f]=g,0===--e&&a(b)}catch(i){c(i)}}if(0===b.length)return a([]);for(var e=b.length,f=0;f>>32-b}function c(a,b){var c,d,e,f,g;return e=2147483648&a,f=2147483648&b,c=1073741824&a,d=1073741824&b,g=(1073741823&a)+(1073741823&b),c&d?2147483648^g^e^f:c|d?1073741824&g?3221225472^g^e^f:1073741824^g^e^f:g^e^f}function d(a,b,c){return a&b|~a&c}function e(a,b,c){return a&c|b&~c}function f(a,b,c){return a^b^c}function g(a,b,c){return b^(a|~c)}function h(a,e,f,g,h,i,j){return a=c(a,c(c(d(e,f,g),h),j)),c(b(a,i),e)}function i(a,d,f,g,h,i,j){return a=c(a,c(c(e(d,f,g),h),j)),c(b(a,i),d)}function j(a,d,e,g,h,i,j){return a=c(a,c(c(f(d,e,g),h),j)),c(b(a,i),d)}function k(a,d,e,f,h,i,j){return a=c(a,c(c(g(d,e,f),h),j)),c(b(a,i),d)}function l(a){for(var b,c=a.length,d=c+8,e=(d-d%64)/64,f=16*(e+1),g=new Array(f-1),h=0,i=0;c>i;)b=(i-i%4)/4,h=i%4*8,g[b]=g[b]|a.charCodeAt(i)<>>29,g}function m(a){var b,c,d="",e="";for(c=0;3>=c;c++)b=a>>>8*c&255,e="0"+b.toString(16),d+=e.substr(e.length-2,2);return d}function n(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;cd?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(d>>6|192),b+=String.fromCharCode(63&d|128)):(b+=String.fromCharCode(d>>12|224),b+=String.fromCharCode(d>>6&63|128),b+=String.fromCharCode(63&d|128))}return b}var o,p,q,r,s,t,u,v,w,x=[],y=7,z=12,A=17,B=22,C=5,D=9,E=14,F=20,G=4,H=11,I=16,J=23,K=6,L=10,M=15,N=21;for(a=n(a),x=l(a),t=1732584193,u=4023233417,v=2562383102,w=271733878,o=0;o=5.4?e.WindVaneRequest=!0:e.H5Request=!0);var f=a.navigator.userAgent.toLowerCase();return f.indexOf("youku")>-1&&e.mainDomain.indexOf("youku.com")<0&&(e.WindVaneRequest=!1,e.H5Request=!0),e.mainDomain.indexOf("youku.com")>-1&&f.indexOf("youku")<0&&(e.WindVaneRequest=!1,e.H5Request=!0),c?c().then(function(){var a=e.retJson.ret;return a instanceof Array&&(a=a.join(",")),e.WindVaneRequest===!0&&(!a||a.indexOf("PARAM_PARSE_ERROR")>-1||a.indexOf("HY_FAILED")>-1||a.indexOf("HY_NO_HANDLER")>-1||a.indexOf("HY_CLOSED")>-1||a.indexOf("HY_EXCEPTION")>-1||a.indexOf("HY_NO_PERMISSION")>-1)?(t.H5Request=!0,d.__sequence([d.__processRequestType,d.__processToken,d.__processRequestUrl,d.middlewares,d.__processRequest])):void 0}):void 0};var y="_m_h5_c",z="_m_h5_tk",A="_m_h5_tk_enc";n.prototype.__getTokenFromAlipay=function(){var b=c(),d=this.options,e=(a.navigator.userAgent,!!location.protocol.match(/^https?\:$/)),f="AP"===d.AliAppName&&parseFloat(d.AliAppVersion)>=8.2;return d.useAlipayJSBridge===!0&&!e&&f&&a.AlipayJSBridge&&a.AlipayJSBridge.call?a.AlipayJSBridge.call("getMtopToken",function(a){a&&a.token&&(d.token=a.token),b.resolve()},function(){b.resolve()}):b.resolve(),b.promise},n.prototype.__getTokenFromCookie=function(){var a=this.options;return a.CDR&&j(y)?a.token=j(y).split(";")[0]:a.token=a.token||j(z),a.token&&(a.token=a.token.split("_")[0]),o.resolve()},n.prototype.__processToken=function(a){var b=this,c=this.options;this.params;return c.token&&delete c.token,c.WindVaneRequest!==!0?r.then(function(){return b.__getTokenFromAlipay()}).then(function(){return b.__getTokenFromCookie()}).then(a).then(function(){var a=c.retJson,d=a.ret;if(d instanceof Array&&(d=d.join(",")),d.indexOf("TOKEN_EMPTY")>-1||c.CDR===!0&&d.indexOf("ILLEGAL_ACCESS")>-1||d.indexOf("TOKEN_EXOIRED")>-1){if(c.maxRetryTimes=c.maxRetryTimes||5,c.failTimes=c.failTimes||0,c.H5Request&&++c.failTimes0&&(k(y,c.pageDomain,"*"),k(z,c.mainDomain,c.subDomain),k(A,c.mainDomain,c.subDomain)),a.retType=v.TOKEN_EXPIRED}}):void a()},n.prototype.__processRequestUrl=function(b){var c=this.params,d=this.options;if(d.hostSetting&&d.hostSetting[a.location.hostname]){var e=d.hostSetting[a.location.hostname];e.prefix&&(d.prefix=e.prefix),e.subDomain&&(d.subDomain=e.subDomain),e.mainDomain&&(d.mainDomain=e.mainDomain)}if(d.H5Request===!0){var f="//"+(d.prefix?d.prefix+".":"")+(d.subDomain?d.subDomain+".":"")+d.mainDomain+"/h5/"+c.api.toLowerCase()+"/"+c.v.toLowerCase()+"/",g=c.appKey||("waptest"===d.subDomain?"4272":"12574478"),i=(new Date).getTime(),j=h(d.token+"&"+i+"&"+g+"&"+c.data),k={jsv:x,appKey:g,t:i,sign:j},l={data:c.data,ua:c.ua};Object.keys(c).forEach(function(a){"undefined"==typeof k[a]&&"undefined"==typeof l[a]&&(k[a]=c[a])}),d.getJSONP?k.type="jsonp":d.getOriginalJSONP?k.type="originaljsonp":(d.getJSON||d.postJSON)&&(k.type="originaljson"),d.useJsonpResultType===!0&&"originaljson"===k.type&&delete k.type,d.querystring=k,d.postdata=l,d.path=f}b()},n.prototype.__processUnitPrefix=function(a){a()};var B=0;n.prototype.__requestJSONP=function(a){function b(a){if(k&&clearTimeout(k),l.parentNode&&l.parentNode.removeChild(l),"TIMEOUT"===a)window[j]=function(){window[j]=void 0;try{delete window[j]}catch(a){}};else{window[j]=void 0;try{delete window[j]}catch(b){}}}var d=c(),g=this.params,h=this.options,i=g.timeout||2e4,j="mtopjsonp"+(g.jsonpIncPrefix||"")+ ++B,k=setTimeout(function(){a("TIMEOUT::接口超时"),b("TIMEOUT")},i);h.querystring.callback=j;var l=document.createElement("script");return l.src=h.path+"?"+f(h.querystring)+"&"+f(h.postdata),l.async=!0,l.onerror=function(){b("ABORT"),a("ABORT::接口异常退出")},window[j]=function(){h.results=Array.prototype.slice.call(arguments),b(),d.resolve()},e(l),d.promise},n.prototype.__requestJSON=function(b){function d(a){l&&clearTimeout(l),"TIMEOUT"===a&&i.abort()}var e=c(),g=this.params,h=this.options,i=new a.XMLHttpRequest,k=g.timeout||2e4,l=setTimeout(function(){b("TIMEOUT::接口超时"),d("TIMEOUT")},k);h.CDR&&j(y)&&(h.querystring.c=decodeURIComponent(j(y))),i.onreadystatechange=function(){if(4==i.readyState){var a,c,f=i.status;if(f>=200&&300>f||304==f){d(),a=i.responseText,c=i.getAllResponseHeaders()||"";try{a=/^\s*$/.test(a)?{}:JSON.parse(a),a.responseHeaders=c,h.results=[a],e.resolve()}catch(g){b("PARSE_JSON_ERROR::解析JSON失败")}}else d("ABORT"),b("ABORT::接口异常退出")}};var m,n,o=h.path+"?"+f(h.querystring);if(h.getJSON?(m="GET",o+="&"+f(h.postdata)):h.postJSON&&(m="POST",n=f(h.postdata)),i.open(m,o,!0),i.withCredentials=!0,i.setRequestHeader("Accept","application/json"),i.setRequestHeader("Content-type","application/x-www-form-urlencoded"),g.headers)for(var p in g.headers)i.setRequestHeader(p,g.headers[p]);return i.send(n),e.promise},n.prototype.__requestWindVane=function(a){function d(a){g.results=[a],e.resolve()}var e=c(),f=this.params,g=this.options,h=f.data,i=f.api,j=f.v,k=g.postJSON?1:0,l=g.getJSON||g.postJSON?"originaljson":"";g.useJsonpResultType===!0&&(l="");var m,n,o="https"===location.protocol?1:0,p=f.isSec||0,q=f.sessionOption||"AutoLoginOnly",r=f.ecode||0;return n="undefined"!=typeof f.timer?parseInt(f.timer):"undefined"!=typeof f.timeout?parseInt(f.timeout):2e4,m=2*n,f.needLogin===!0&&"undefined"==typeof f.sessionOption&&(q="AutoLoginAndManualLogin"),"undefined"!=typeof f.secType&&"undefined"==typeof f.isSec&&(p=f.secType),b.windvane.call("MtopWVPlugin","send",{api:i,v:j,post:String(k),type:l,isHttps:String(o),ecode:String(r),isSec:String(p),param:JSON.parse(h),timer:n,sessionOption:q,ext_headers:{referer:location.href}},d,d,m),e.promise},n.prototype.__processRequest=function(a,b){var c=this;return r.then(function(){var a=c.options;if(a.H5Request&&(a.getJSONP||a.getOriginalJSONP))return c.__requestJSONP(b);if(a.H5Request&&(a.getJSON||a.postJSON))return c.__requestJSON(b);if(a.WindVaneRequest)return c.__requestWindVane(b);throw new Error("UNEXCEPT_REQUEST::错误的请求类型")}).then(a).then(function(){var a=c.options,b=(c.params,a.results[0]),d=b&&b.ret||[];b.ret=d,d instanceof Array&&(d=d.join(","));var e=b.c;a.CDR&&e&&i(y,e,{domain:a.pageDomain,path:"/"}),d.indexOf("SUCCESS")>-1?b.retType=v.SUCCESS:b.retType=v.ERROR,a.retJson=b})},n.prototype.__sequence=function(a){function b(a){if(a instanceof Array)a.forEach(b);else{var g,h=c(),i=c();e.push(function(){return h=c(),g=a.call(d,function(a){return h.resolve(a),i.promise},function(a){return h.reject(a),i.promise}),g&&(g=g["catch"](function(a){h.reject(a)})),h.promise}),f.push(function(a){return i.resolve(a),g})}}var d=this,e=[],f=[];a.forEach(b);for(var g,h=r;g=e.shift();)h=h.then(g);for(;g=f.pop();)h=h.then(g);return h};var C=function(a){a()},D=function(a){a()};n.prototype.request=function(b){var c=this;this.options=d(b||{},t);var e=o.resolve([C,D]).then(function(a){var b=a[0],d=a[1];return c.__sequence([b,c.__processRequestMethod,c.__processRequestType,c.__processToken,c.__processRequestUrl,c.middlewares,c.__processRequest,d])}).then(function(){var a=c.options.retJson;return a.retType!==v.SUCCESS?o.reject(a):c.options.successCallback?void c.options.successCallback(a):o.resolve(a)})["catch"](function(a){var b;return a instanceof Error?(console.error(a.stack),b={ret:[a.message],stack:[a.stack],retJson:v.ERROR}):b="string"==typeof a?{ret:[a],retJson:v.ERROR}:void 0!==a?a:c.options.retJson,c.options.failureCallback?void c.options.failureCallback(b):o.reject(b)});return this.__processRequestType(),c.options.H5Request&&(c.constructor.__firstProcessor||(c.constructor.__firstProcessor=e),C=function(a){c.constructor.__firstProcessor.then(a)["catch"](a)}),("get"===this.params.type&&"json"===this.params.dataType||"post"===this.params.type)&&(b.pageDomain=b.pageDomain||g(a.location.hostname),b.mainDomain!==b.pageDomain&&(b.maxRetryTimes=4,b.CDR=!0)),e},b.mtop=function(a){return new n(a)},b.mtop.request=function(a,b,c){var d={H5Request:a.H5Request,WindVaneRequest:a.WindVaneRequest,LoginRequest:a.LoginRequest,AntiCreep:a.AntiCreep,AntiFlood:a.AntiFlood,successCallback:b,failureCallback:c||b};return new n(a).request(d)},b.mtop.H5Request=function(a,b,c){var d={H5Request:!0,successCallback:b,failureCallback:c||b};return new n(a).request(d)},b.mtop.middlewares=u,b.mtop.config=t,b.mtop.RESPONSE_TYPE=v,b.mtop.CLASS=n}(window,window.lib||(window.lib={})),function(a,b){function c(a){return a.preventDefault(),!1}function d(a){var b=new RegExp("(?:^|;\\s*)"+a+"\\=([^;]+)(?:;\\s*|$)").exec(document.cookie);return b?b[1]:void 0}function e(b,d){var e=this,f=a.dpr||1,g=document.createElement("div"),h=document.documentElement.getBoundingClientRect(),i=Math.max(h.width,window.innerWidth)/f,j=Math.max(h.height,window.innerHeight)/f;g.style.cssText=["-webkit-transform:scale("+f+") translateZ(0)","-ms-transform:scale("+f+") translateZ(0)","transform:scale("+f+") translateZ(0)","-webkit-transform-origin:0 0","-ms-transform-origin:0 0","transform-origin:0 0","width:"+i+"px","height:"+j+"px","z-index:999999","position:"+(i>800?"fixed":"absolute"),"left:0","top:0px","background:"+(i>800?"rgba(0,0,0,.5)":"#FFF"),"display:none"].join(";");var k=document.createElement("div");k.style.cssText=["width:100%","height:52px","background:#EEE","line-height:52px","text-align:left","box-sizing:border-box","padding-left:20px","position:absolute","left:0","top:0","font-size:16px","font-weight:bold","color:#333"].join(";"),k.innerText=b;var l=document.createElement("a");l.style.cssText=["display:block","position:absolute","right:0","top:0","height:52px","line-height:52px","padding:0 20px","color:#999"].join(";"),l.innerText="关闭";var m=document.createElement("iframe");m.style.cssText=["width:100%","height:100%","border:0","overflow:hidden"].join(";"),i>800&&(k.style.cssText=["width:370px","height:52px","background:#EEE","line-height:52px","text-align:left","box-sizing:border-box","padding-left:20px","position:absolute","left:"+(i/2-185)+"px","top:40px","font-size:16px","font-weight:bold","color:#333"].join(";"),m.style.cssText=["position:absolute","top:92px","left:"+(i/2-185)+"px","width:370px","height:480px","border:0","background:#FFF","overflow:hidden"].join(";")),k.appendChild(l),g.appendChild(k),g.appendChild(m),g.className="J_MIDDLEWARE_FRAME_WIDGET",document.body.appendChild(g),m.src=d,l.addEventListener("click",function(){e.hide();var a=document.createEvent("HTMLEvents");a.initEvent("close",!1,!1),g.dispatchEvent(a)},!1),this.addEventListener=function(){g.addEventListener.apply(g,arguments)},this.removeEventListener=function(){g.removeEventListener.apply(g,arguments)},this.show=function(){document.addEventListener("touchmove",c,!1),g.style.display="block",window.scrollTo(0,0)},this.hide=function(){document.removeEventListener("touchmove",c),window.scrollTo(0,-h.top),g.parentNode&&g.parentNode.removeChild(g)}}function f(a){var c=this,d=this.options,e=this.params;return a().then(function(){var a=d.retJson,f=a.ret,g=navigator.userAgent.toLowerCase(),h=g.indexOf("safari")>-1&&g.indexOf("chrome")<0&&g.indexOf("qqbrowser")<0;if(f instanceof Array&&(f=f.join(",")),(f.indexOf("SESSION_EXPIRED")>-1||f.indexOf("SID_INVALID")>-1||f.indexOf("AUTH_REJECT")>-1||f.indexOf("NEED_LOGIN")>-1)&&(a.retType=l.SESSION_EXPIRED,!d.WindVaneRequest&&(k.LoginRequest===!0||d.LoginRequest===!0||e.needLogin===!0))){if(!b.login)throw new Error("LOGIN_NOT_FOUND::缺少lib.login");if(d.safariGoLogin!==!0||!h||"taobao.com"===d.pageDomain)return b.login.goLoginAsync().then(function(a){return c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest])})["catch"](function(a){throw"CANCEL"===a?new Error("LOGIN_CANCEL::用户取消登录"):new Error("LOGIN_FAILURE::用户登录失败")});b.login.goLogin()}})}function g(a){var b=this.options;this.params;return b.H5Request!==!0||k.AntiFlood!==!0&&b.AntiFlood!==!0?void a():a().then(function(){var a=b.retJson,c=a.ret;c instanceof Array&&(c=c.join(",")),c.indexOf("FAIL_SYS_USER_VALIDATE")>-1&&a.data.url&&(b.AntiFloodReferer?location.href=a.data.url.replace(/(http_referer=).+/,"$1"+b.AntiFloodReferer):location.href=a.data.url)})}function h(b){var c=this,f=this.options,g=this.params;return g.forceAntiCreep!==!0&&f.H5Request!==!0||k.AntiCreep!==!0&&f.AntiCreep!==!0?void b():b().then(function(){var b=f.retJson,h=b.ret;if(h instanceof Array&&(h=h.join(",")),h.indexOf("RGV587_ERROR::SM")>-1&&b.data.url){var j="_m_h5_smt",k=d(j),l=!1;if(f.saveAntiCreepToken===!0&&k){k=JSON.parse(k);for(var m in k)g[m]&&(l=!0)}if(f.saveAntiCreepToken===!0&&k&&!l){for(var m in k)g[m]=k[m];return c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest])}return new i(function(d,h){function i(){m.removeEventListener("close",i),a.removeEventListener("message",k),h("USER_INPUT_CANCEL::用户取消输入")}function k(b){var e;try{e=JSON.parse(b.data)||{}}catch(l){}if(e&&"child"===e.type){m.removeEventListener("close",i),a.removeEventListener("message",k),m.hide();var n;try{n=JSON.parse(decodeURIComponent(e.content)),"string"==typeof n&&(n=JSON.parse(n));for(var o in n)g[o]=n[o];f.saveAntiCreepToken===!0?(document.cookie=j+"="+JSON.stringify(n)+";",a.location.reload()):c.__sequence([c.__processToken,c.__processRequestUrl,c.__processUnitPrefix,c.middlewares,c.__processRequest]).then(d)}catch(l){h("USER_INPUT_FAILURE::用户输入失败")}}}var l=b.data.url,m=new e("",l);m.addEventListener("close",i,!1),a.addEventListener("message",k,!1),m.show()})}})}if(!b||!b.mtop||b.mtop.ERROR)throw new Error("Mtop 初始化失败!请参考Mtop文档http://gitlab.alibaba-inc.com/mtb/lib-mtop");var i=a.Promise,j=b.mtop.CLASS,k=b.mtop.config,l=b.mtop.RESPONSE_TYPE;b.mtop.middlewares.push(f),b.mtop.loginRequest=function(a,b,c){var d={LoginRequest:!0,H5Request:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.antiFloodRequest=function(a,b,c){var d={AntiFlood:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.middlewares.push(g),b.mtop.antiCreepRequest=function(a,b,c){var d={AntiCreep:!0,successCallback:b,failureCallback:c||b};return new j(a).request(d)},b.mtop.middlewares.push(h)}(window,window.lib||(window.lib={})); define('mtb/lib-mtop/2.4.2/mtop.cmd', [], function(require, exports, module){module.exports = window.lib.mtop;}); define('mtb/lib-mtop/mtop.cmd', [], function(require, exports, module){module.exports = window.lib.mtop;});