-
Notifications
You must be signed in to change notification settings - Fork 0
/
bundle.js
1 lines (1 loc) · 50.3 KB
/
bundle.js
1
!function(n){var o={};function e(t){if(o[t])return o[t].exports;var r=o[t]={i:t,l:!1,exports:{}};return n[t].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=n,e.c=o,e.d=function(n,o,t){e.o(n,o)||Object.defineProperty(n,o,{enumerable:!0,get:t})},e.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},e.t=function(n,o){if(1&o&&(n=e(n)),8&o)return n;if(4&o&&"object"==typeof n&&n&&n.__esModule)return n;var t=Object.create(null);if(e.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:n}),2&o&&"string"!=typeof n)for(var r in n)e.d(t,r,function(o){return n[o]}.bind(null,r));return t},e.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return e.d(o,"a",o),o},e.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},e.p="temp/",e(e.s=25)}([function(n,o){n.exports=function(n){var o="undefined"!=typeof window&&window.location;if(!o)throw new Error("fixUrls requires window.location");if(!n||"string"!=typeof n)return n;var e=o.protocol+"//"+o.host,t=e+o.pathname.replace(/\/[^\/]*$/,"/");return n.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(n,o){var r,l=o.trim().replace(/^"(.*)"$/,function(n,o){return o}).replace(/^'(.*)'$/,function(n,o){return o});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(l)?n:(r=0===l.indexOf("//")?l:0===l.indexOf("/")?e+l:t+l.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}},function(n,o,e){var t,r,l={},i=(t=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=t.apply(this,arguments)),r}),c=function(n){var o={};return function(n){if("function"==typeof n)return n();if(void 0===o[n]){var e=function(n){return document.querySelector(n)}.call(this,n);if(window.HTMLIFrameElement&&e instanceof window.HTMLIFrameElement)try{e=e.contentDocument.head}catch(n){e=null}o[n]=e}return o[n]}}(),a=null,s=0,u=[],f=e(0);function g(n,o){for(var e=0;e<n.length;e++){var t=n[e],r=l[t.id];if(r){r.refs++;for(var i=0;i<r.parts.length;i++)r.parts[i](t.parts[i]);for(;i<t.parts.length;i++)r.parts.push(y(t.parts[i],o))}else{var c=[];for(i=0;i<t.parts.length;i++)c.push(y(t.parts[i],o));l[t.id]={id:t.id,refs:1,parts:c}}}}function p(n,o){for(var e=[],t={},r=0;r<n.length;r++){var l=n[r],i=o.base?l[0]+o.base:l[0],c={css:l[1],media:l[2],sourceMap:l[3]};t[i]?t[i].parts.push(c):e.push(t[i]={id:i,parts:[c]})}return e}function d(n,o){var e=c(n.insertInto);if(!e)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var t=u[u.length-1];if("top"===n.insertAt)t?t.nextSibling?e.insertBefore(o,t.nextSibling):e.appendChild(o):e.insertBefore(o,e.firstChild),u.push(o);else if("bottom"===n.insertAt)e.appendChild(o);else{if("object"!=typeof n.insertAt||!n.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var r=c(n.insertInto+" "+n.insertAt.before);e.insertBefore(o,r)}}function h(n){if(null===n.parentNode)return!1;n.parentNode.removeChild(n);var o=u.indexOf(n);o>=0&&u.splice(o,1)}function v(n){var o=document.createElement("style");return n.attrs.type="text/css",m(o,n.attrs),d(n,o),o}function m(n,o){Object.keys(o).forEach(function(e){n.setAttribute(e,o[e])})}function y(n,o){var e,t,r,l;if(o.transform&&n.css){if(!(l=o.transform(n.css)))return function(){};n.css=l}if(o.singleton){var i=s++;e=a||(a=v(o)),t=x.bind(null,e,i,!1),r=x.bind(null,e,i,!0)}else n.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(e=function(n){var o=document.createElement("link");return n.attrs.type="text/css",n.attrs.rel="stylesheet",m(o,n.attrs),d(n,o),o}(o),t=function(n,o,e){var t=e.css,r=e.sourceMap,l=void 0===o.convertToAbsoluteUrls&&r;(o.convertToAbsoluteUrls||l)&&(t=f(t));r&&(t+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var i=new Blob([t],{type:"text/css"}),c=n.href;n.href=URL.createObjectURL(i),c&&URL.revokeObjectURL(c)}.bind(null,e,o),r=function(){h(e),e.href&&URL.revokeObjectURL(e.href)}):(e=v(o),t=function(n,o){var e=o.css,t=o.media;t&&n.setAttribute("media",t);if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}.bind(null,e),r=function(){h(e)});return t(n),function(o){if(o){if(o.css===n.css&&o.media===n.media&&o.sourceMap===n.sourceMap)return;t(n=o)}else r()}}n.exports=function(n,o){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(o=o||{}).attrs="object"==typeof o.attrs?o.attrs:{},o.singleton||"boolean"==typeof o.singleton||(o.singleton=i()),o.insertInto||(o.insertInto="head"),o.insertAt||(o.insertAt="bottom");var e=p(n,o);return g(e,o),function(n){for(var t=[],r=0;r<e.length;r++){var i=e[r];(c=l[i.id]).refs--,t.push(c)}n&&g(p(n,o),o);for(r=0;r<t.length;r++){var c;if(0===(c=t[r]).refs){for(var a=0;a<c.parts.length;a++)c.parts[a]();delete l[c.id]}}}};var b,w=(b=[],function(n,o){return b[n]=o,b.filter(Boolean).join("\n")});function x(n,o,e,t){var r=e?"":t.css;if(n.styleSheet)n.styleSheet.cssText=w(o,r);else{var l=document.createTextNode(r),i=n.childNodes;i[o]&&n.removeChild(i[o]),i.length?n.insertBefore(l,i[o]):n.appendChild(l)}}},function(n,o){n.exports=function(n){var o=[];return o.toString=function(){return this.map(function(o){var e=function(n,o){var e=n[1]||"",t=n[3];if(!t)return e;if(o&&"function"==typeof btoa){var r=(i=t,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),l=t.sources.map(function(n){return"/*# sourceURL="+t.sourceRoot+n+" */"});return[e].concat(l).concat([r]).join("\n")}var i;return[e].join("\n")}(o,n);return o[2]?"@media "+o[2]+"{"+e+"}":e}).join("")},o.i=function(n,e){"string"==typeof n&&(n=[[null,n,""]]);for(var t={},r=0;r<this.length;r++){var l=this[r][0];"number"==typeof l&&(t[l]=!0)}for(r=0;r<n.length;r++){var i=n[r];"number"==typeof i[0]&&t[i[0]]||(e&&!i[2]?i[2]=e:e&&(i[2]="("+i[2]+") and ("+e+")"),o.push(i))}},o}},function(n,o,e){(n.exports=e(2)(!1)).push([n.i,"/*\n * @Author: mark \n * @Date: 2018-04-03 10:43:00 \n * @Last Modified by: mark\n * @Last Modified time: 2018-04-03 14:21:19\n flex 布局 参考掘金:https://juejin.im/post/58e3a5a0a0bb9f0069fc16bb\n */\n/* \n 问题都开始于:怎么样通过css简单而优雅的实现水平垂直同时居中\n\n 在网页布局没有进入 CSS 的时代,排版几乎是通过 table 元素实现的,在 table 的单元格里可以方便的使用 align、valign 来实现水平和垂直方向的对齐,\n 随着 Web 语义化的流行,这些写法逐渐淡出了视野,\n CSS 标准为我们提供了 3 种布局方式:标准文档流、浮动布局和定位布局。这几种方式的搭配使用可以轻松搞定 PC 端页面的常见需求,\n 比如实现水平居中可以使用 margin: 0 auto,实现水平垂直同时居中可以如下设置:\n*/\n.dad-nowidth {\n position: relative;\n}\n.son-nowidth {\n position: absolute;\n margin: auto;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n}\n.dad-width {\n position: relative;\n}\n.son-width {\n position: absolute;\n width: 100px;\n height: 100px;\n top: 50%;\n left: 50%;\n margin-top: -50px;\n margin-left: -50px;\n}\n/*\n然而,这些写法都存在一些缺陷:缺少语义并且不够灵活。我们需要的是通过 1 个属性就能优雅的实现子元素居中或均匀分布,甚至可以随着窗口缩放自动适应。\n在这样的需求下,CSS 的第 4 种布局方式诞生了,这就是我们今天要重点介绍的 flex 布局。\n*/\n#flex {\n display: flex;\n justify-content: center;\n align-items: center;\n}\n/*\n flex的核心概念就是容器和轴\n 容器:包括外层父容器和内层的子容器\n 轴:主轴和交叉轴\n flex属性涉及到12个css属性 父容器子容器各6个,常用的只有4个\n*/\n/* \n 1.1父容器\n ⭐⭐⭐⭐⭐\n 设置子容器沿主轴排列 justify-content 该属性用于定义如何沿着主轴方向排列子容器。 \n 位置排列:flex-start 起始端对其 从左到右对其 / flex-end:末尾段对齐 从右到左 / center:居中对齐\n 分布排列:space-around 子容器沿主轴均匀分布,位于首尾两端的子容器到父容器的距离是子容器间距的一半。 \n space-between:子容器沿主轴均匀分布,位于首尾两端的子容器与父容器相切。\n*/\n#dad {\n display: flex;\n justify-content: space-between;\n}\n#dad .son {\n width: 100px;\n height: 80px;\n background-color: red;\n}\n/* \n 父容器中的子容器设置:主要是设置子容器如何沿交叉轴排列 交叉轴指的是垂直方向\n align-items 属性用于定义如何沿着交叉轴方向分配子容器的间距\n 位置排列:flex-start:起始端对齐 / flex-end:末尾段对齐 / center 居中对齐\n 基线排列:baseline:基线对齐,这里的 baseline 默认是指首行文字,即 first baseline,所有子容器向基线对齐,交叉轴起点到元素基线距离最大的子容器将会与交叉轴起始端相切以确定基线。\n 拉伸排列:stretch : 子容器沿交叉轴方向的尺寸拉伸至与父容器一致。 就是垂直方向上和父元素拉伸为一致 就相当于给了个百分之百的高度 但是样式会被子容器中的样式覆盖 这样设置了自然平齐就不要设置高度了\n*/\n.align-items .son1 {\n width: 100px;\n height: 100px;\n background-color: blue;\n}\n.align-items .son2 {\n width: 80px;\n height: 80px;\n background-color: red;\n}\n.align-items .son3 {\n width: 120px;\n height: 120px;\n background-color: yellow;\n}\n.dad-baseline {\n display: flex;\n align-items: baseline;\n}\n.dad-stretch {\n display: flex;\n height: 150px;\n align-items: stretch;\n margin-top: 10px;\n}\n/* \n 1.2子容器 \n 弹性:flex:在主轴上如何伸缩 子容器是有弹性的 它们会自动填充剩余空间 伸缩比例由flex属性确定\n flex 的值可以是无单位数字(如:1, 2, 3),也可以是有单位数字(如:15px,30px,60px),还可以是 none 关键字。\n 子容器会按照 flex 定义的尺寸比例自动伸缩,如果取值为 none 则不伸缩。\n\n flex有三个值可以设置:flex:flex-grow | flex-shink | flex-basis 一个值两个值三个值都可以 通常一个值就可以满足需求\n \n\n 单独设置子容器如何沿着交叉轴排列:align-self\n 这个属性是设置在子容器上的,和父容器中的align-items作用是一样的 取值也是一样的\n align-self:flex-start:起始端对齐 / flex-end:末尾段对齐 / center 居中对齐 / baselin 基线对齐 / stretch 拉伸排列\n 在子容器上设置的align-self将会覆盖父容器中的align-items\n*/\n/* \n 父容器\n 父容器中的换行方式\n flex-wrap:nowrap 不换行 | wrap 换行 | wrap-revers 逆序换行:沿着交叉轴的反方向换行 注意是沿着交叉轴\n\n 轴向和换行组合设置:\n flex-flow:flow即流向,也就是子容器沿着哪个方向流动,流动到终点是否允许换行flex-flow:row wrap \n flex-flow 是一个复合属性,相当于 flex-direction 与 flex-wrap 的组合,可选的取值如下:\n\n row、column 等,可单独设置主轴方向\n\n wrap、nowrap 等,可单独设置换行方式\n\n row nowrap、column wrap 等,也可两者同时设置\n\n\n 多行沿着交叉轴对其的方式\n 当子容器有多行的时候,设置行与行之间的对齐方式\n \n align-content:这个值和justify-content相同\n*/\n/* \n 子容器\n 设置基准大小 \n flex-basis 表示在不伸缩的情况下子容器的原始尺寸。主轴为横向时代表宽度,主轴为纵向时代表高度。\n\n 设置扩展比例\n lex-grow 子容器弹性伸展的比例。如图,剩余空间按 1:2 的比例分配给子容器。\n\n 设置收缩比例\n flex-shrink 子容器弹性收缩的比例\n\n 设置排序\n order 可以修改html中的默认排序 默认值为0 数值越小越靠前\n*/\nsection {\n display: flex;\n}\nsection .left,\nsection .right {\n width: 100px;\n height: 100px;\n}\nsection .left {\n background-color: pink;\n}\nsection .right {\n background-color: yellow;\n}\nsection .middle {\n flex-grow: 1;\n}\n/* \n ⭐⭐⭐⭐⭐\n flex-grow 属性决定了父元素在空间分配方向上还有剩余空间时,如何分配这些剩余空间。其值为一个权重(也称扩张因子),\n 默认为 0(纯数值,无单位),剩余空间将会按照这个权重来分配。\n\n 比如剩余空间为 x,三个元素的 flex-grow 分别为 a,b,c。设 sum 为 a + b + c。那么三个元素将得到剩余空间分别是\n x * a / sum, x * b / sum, x * c / sum,是为权重也。权重就是按照元素设置的flex-grow的值的和的一部分\n 举个例子:\n\n 父元素宽度 500px,三个子元素的 width 分别为 100px,150px,100px。\n\n 于是剩余空间为 150px\n\n 三个元素的 flex-grow 分别是 1,2,3,于是 sum 为 6\n 则三个元素所得到的多余空间分别是:\n\n 150 * 1 / 6 = 25px\n 150 * 2 / 6 = 50px\n 150 * 3 / 6 = 75px\n 三个元素最终的宽度分别为 125px,200px,175px。\n\n 100px + 25px = 125px\n 150px + 50px = 200px\n 100px + 75px = 175px\n\n 当所有元素的 flex-grow 之和小于 1 的时候(注意是 1,也就是说每个元素的 flex-grow 都是一个小数如 0.2 这样的),上面式子中的 sum 将会使用 1 来参与计算,而不论它们的和是多少。也就是说,当所有的元素的 flex-grow 之和小于 1 的时候,剩余空间不会全部分配给各个元素。\n\n 实际上用来分配的空间是 sum(flex-grow) / 1 * 剩余空间,这些用来分配的空间依然是按 flex-grow 的比例来分配。\n\n\n 另外,flex-grow 还会受到 max-width 的影响。如果最终 grow 后的结果大于 max-width 指定的值,max-width 的值将会优先使用。\n 同样会导致父元素有部分剩余空间没有分配。\n \n*/\n/* \nflex-shrink 的计算方式\n\n那么既然可以在空间有多余时把多余空间分配给各个子元素,当然也可以在空间不够时让各个子元素收缩以适应有限的空间了。\n这就是 flex-shrink 属性的作用。\n\nflex-shrink 属性定义空间不够时各个元素如何收缩。其值默认为 1。很多文章对此基本是一笔带过:“flex-shrink 属性定义了元素的收缩系数”,根本就不说它具体是怎么计算的。\nflex-shrink 定义的仅仅只是元素宽度变小的一个权重分量。\n每个元素具体收缩多少,还有另一个重要因素,即它本身的宽度。\n\n举个例子:\n\n父元素 500px。三个子元素分别设置为 150px,200px,300px。\n\n三个子元素的 flex-shrink 的值分别为 1,2,3。\n\n首先,计算子元素溢出多少:150 + 200 + 300 - 500 = -150px。\n\n那这 -150px 将由三个元素的分别收缩一定的量来弥补。\n\n具体的计算方式为:每个元素收缩的权重为其 flex-shrink 乘以其宽度。\n\n所以总权重为 1 * 150 + 2 * 200 + 3 * 300 = 1450\n\n三个元素分别收缩:\n\n150 * 1(flex-shrink) * 150(width) / 1450 = -15.5\n150 * 2(flex-shrink) * 200(width) / 1450 = -41.4\n150 * 3(flex-shrink) * 300(width) / 1450 = -93.1\n三个元素的最终宽度分别为:\n\n150 - 15.5 = 134.5\n200 - 41.4 = 158.6\n300 - 93.1 = 206.9\n\n\n\n同样,当所有元素的 flex-shrink 之和小于 1 时,计算方式也会有所不同:\n\n此时,并不会收缩所有的空间,而只会收缩 flex-shrink 之和相对于 1 的比例的空间。\n\n还是上面的例子,但是 flex-shrink 分别改为 0.1,0.2,0.3。\n\n于是总权重为 145(正好缩小 10 倍,略去计算公式)。\n\n三个元素收缩总和并不是 150px,而是只会收缩 150px 的 (0.1 + 0.2 + 0.3) / 1 即 60% 的空间:90px。\n\n每个元素收缩的空间为:\n\n90 * 0.1(flex-shrink) * 150(width) / 145 = 9.31\n90 * 0.2(flex-shrink) * 200(width) / 145 = 24.83\n90 * 0.3(flex-shrink) * 300(width) / 145 = 55.86\n三个元素的最终宽度分别为:\n\n150 - 9.31 = 140.69\n200 - 24.83 = 175.17\n300 - 55.86 = 244.14\n当然,类似 flex-grow,flex-shrink 也会受到 min-width 的影响。\n\n*/\n",""])},function(n,o,e){var t=e(3);"string"==typeof t&&(t=[[n.i,t,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};e(1)(t,r);t.locals&&(n.exports=t.locals)},function(n,o,e){"use strict";e(4)},function(n,o,e){"use strict";console.log("********************正则表达式begin***************************");new RegExp("a","i");console.log("asdho aoeu bsa7 bq321432gg54bb623".match(/\d+/g));console.log("这就是一个背景的测试".replace(/背景|测试/g,"***"));console.log("amn smn dmn ddm ddn ddi bmn cmn".match(/[abc]mn/g));console.log("<div>这是一个测试html标签过滤得正则<br></div>".replace(/<[^<>]+>/g,"")),console.log("********************正则表达式end***************************")},function(n,o,e){"use strict";var t={a:1},r=(Object.assign({},t),Object.assign(t,{b:2}));console.log(t),console.log("assign()返回得是目标对象 主要是修改了目标对象"),console.log(r);var l={a:0,b:{c:0}},i=JSON.parse(JSON.stringify(l));function c(){this.x=0,this.y=0}function a(){return c.call(this)}i.a="clone",console.log("原对象:"),console.log(l),console.log("克隆出来得对象"),console.log(i),c.prototype.move=function(n,o){this.x+=n,this.y+=o},a.prototype=Object.create(c.prototype),a.prototype.constructor=a;var s=new a;console.log("Is rect an instance of Rectangle?",s instanceof a);Object.create(Object.prototype),Object.create(Object.prototype,{foo:{writable:!0,configurable:!0,value:"hello"},bar:{configurable:!1,get:function(){return 10},set:function(n){console.log("Setting `o.bar` to",n)}}});Object.create(function(){}.prototype);Object.defineProperties({},{demo:{value:1,writable:!0}});var u=document.querySelector("#model"),f=document.querySelector("#view"),g={val:""};Object.defineProperty(g,"val",{get:function(){return val},set:function(n){var o=n;u.value=o,f.innerHTML=o}}),document.addEventListener("keyup",function(n){g.val=n.target.value||""});var p=Object.entries({a:1213,b:212,c:3423});console.log("数组的entires返回的是一个二维的数组"),console.log(p);var d=new Map(Object.entries({foo:"bar",baz:42}));console.log(d)},function(n,o,e){"use strict";function t(n){if(Array.isArray(n)){for(var o=0,e=Array(n.length);o<n.length;o++)e[o]=n[o];return e}return Array.from(n)}var r=Array.from("fooasd",function(n){return n+"a"});console.log("from 方法返回的值为一个新的数组实例"),console.log(r),console.log("鲜为人知的事实:其实 Array.prototype isArray:"+Array.isArray(Array.prototype));var l=[[2],5],i=l.concat(l,[2,[2]],9);console.log("concat 方法返回的是一个原数组浅拷贝生成的新数组:"),console.log(i),l[0].push(7),console.log("修改原数组之后新数组也会改变:"),console.log(i),console.log([1,2,3,4,5].copyWithin(-2)),console.log([1,2,3,4,5].copyWithin(0,3)),console.log([1,2,3,4,5].copyWithin(0,2,3));var c=["a","b","c"].entries();console.log(c);var a=!0,s=!1,u=void 0;try{for(var f,g=c[Symbol.iterator]();!(a=(f=g.next()).done);a=!0){var p=f.value;console.log(p)}}catch(n){s=!0,u=n}finally{try{!a&&g.return&&g.return()}finally{if(s)throw u}}for(var d=["a","b","c"],h=d.entries(),v=[],m=0;m<d.length+1;m++){var y=h.next();console.log(y.done),!0!==y.done&&(console.log(y.value),v.push(y.value))}console.log(v);function b(n,o,e){return n>10}console.log(function(n){for(var o=!0,e=n.entries();o;){var t=e.next();!0!==t.done?(t.value[1].sort(function(n,o){return n-o}),o=!0):o=!1}return n}([[1,34],[456,2,3,44,234],[4567,1,4,5,6],[34,78,23,1]]));var w=[12,5,8,130,44].every(b,void 0);console.log(w);var x=[1,5,8,2,3].some(b,void 0);console.log(x),console.log(["qw","qwe","wqe","wqe","wqe","wqe"].fill("fill",3,5));var O=[12,5,8,130,44].filter(b,void 0);console.log(O);var j=[{name:"apples",quantity:2},{name:"bananas",quantity:0},{name:"cherries",quantity:5}];function k(n){return"cherries"===n.name}console.log(j.find(k)),console.log(j.findIndex(k));var S=1;j.forEach(function(n,o,e){n.id=S++}),console.log("foreach"),console.log(j);console.log([1,2,3].includes(2)),console.log(v.includes(4)),function(){console.log([].includes.call(arguments,"a")),console.log([].includes.call(arguments,"m"))}("a","b","c");console.log([1,2,3].indexOf(2));for(var _=[],A=["a","b","a","c","a","d"],E=A.indexOf("a");-1!=E;)_.push(E),E=A.indexOf("a",E+1);console.log("用indexOf查找出现的位置"),console.log(_),console.log(A.join("分割")),function(){var n=Array.prototype.join.call(arguments);console.log(n)}("a","b","c");var M=[1,2,3].keys();console.log("key 方法的返回值是一个包括key的数组迭代器"),console.log(M.next());console.log("values 方法的返回值是一个包括value的数组迭代器");var T=[2,5,9,2].lastIndexOf(9);console.log(T);for(var N=A.lastIndexOf("a"),P=[];-1!=N;)P.push(N),N=N>0?A.lastIndexOf("a",N-1):-1;console.log("用lastIndexOf查找出现的位置"),console.log(P);var L=[{name:"apples",quantity:2},{name:"bananas",quantity:0},{name:"cherries",quantity:5}],I=L.map(function(n,o,e){return n.operate="map操作",n.index=o,n});console.log(I);var C=L.pop();console.log(C);var R=L.push({name:"cherries",quantity:5});console.log(R);var B=["parsnip","potato"];Array.prototype.push.call(B,["celery","beetroot"]),console.log(B);var U={length:0,addElem:function(n){[].push.call(this,n)}};U.addElem("add"),U.addElem("123"),console.log(U);var q=[0,1,2,3,4].reduce(function(n,o,e,t){return n+o});console.log(q);var z=[[0,1],[2,3],[4,5]].reduce(function(n,o){return n.concat(o)},[]);console.log(z);var W=["Alice","Bob","Tiff","Bruce","Alice"].reduce(function(n,o){return o in n?n[o]++:n[o]=1,n},{});console.log(W);var D=[{name:"Anna",books:["Bible","Harry Potter"],age:21},{name:"Bob",books:["War and peace","Romeo and Juliet"],age:26},{name:"Alice",books:["The Lord of the Rings","The Shining"],age:18}].reduce(function(n,o){return[].concat(t(n),t(o.books))},["begin"]);console.log(D);var H={},J=[1,2,1,2,3,5,4,5,3,4,4,4,4].reduce(function(n,o){return H[o]||(H[o]=o,n.push(o)),n},[]);console.log("reduce和对象组合数组去重"),console.log(J);var F=["one","two","three","four"];console.log(F.reverse()),console.log(F);var Y=[1,2,3].shift();console.log("shift 返回值为第一项元素的值"),console.log(Y);var $=[1,2,3],G=$.unshift(5,6);console.log($),console.log("unshift 返回值为调用之后该数组的长度"),console.log(G);var V=[1,2,3].slice(2,3);console.log("slice 返回值"),console.log(V),console.log(function(){return Array.prototype.slice.call(arguments)}(1,23,23,23,23));var K=Array.prototype.slice,Z=Function.prototype.call.bind(K);console.log(function(){return Z(arguments)}(23,213,33,3,4,4));var Q=[1,10,21,2];console.log(Q.sort());var X=(Q=[1,10,21,2]).sort(function(n,o){return n-o});console.log(X);var nn=["angel","clown","mandarin","surgeon"],on=nn.splice(2,1,"drum");console.log(nn),console.log("splice返回值:"),console.log(on);var en=["angel","clown","mandarin","surgeon"];console.log(en.toString()),console.log("toString的返回值"),console.log(en);var tn=[{id:1,name:"demo",num:1}];[{id:1,name:"demo",num:1},{id:2,name:"demo",num:1},{id:1,name:"demo",num:1},{id:4,name:"demo",num:1}].forEach(function(n,o){tn.some(function(o,e){return o.id===n.id})?tn.forEach(function(o){o.id==n.id&&(o.num+=1)}):tn.push(n)}),console.log("===================================="),console.log("数组中的总结"),console.log("====================================")},function(n,o,e){"use strict";var t,r,l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},i=(t=["Hi\n!"],r=["Hi\\n!"],Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(r)}})));var c="etfdemostring",a=c.charAt(1);console.log(a);var s="woshi ".concat(c);console.log(s);var u="To be, or not to be, that is the question";console.log(u.endsWith("question")),console.log(u.includes("question",0)),console.log(u.indexOf("yes")),console.log(u.lastIndexOf("1"));document.write("Click to return to "+"MDN".link("https://developer.mozilla.org/"));console.log("For more information, see Chapter 3.4.5.1".match(/see (chapter \d+(\.\d)*)/i)),console.log("abc".padEnd(10,"foo")),console.log("abc".padStart(10,"foo")),console.log("abc".repeat(10));var f="abc12345#$*%".replace(/([^\d]*)(\d*)([^\w]*)/,function(n,o,e,t,r,l){return[o,e,t].join(" - ")});console.log(f);var g=c.slice(0,7);console.log(g);var p="Hello World. How are you doing?",d=p.split(" ",3),h=p.split("are");console.log(d),console.log("这个是split传一个字符串的用法"),console.log(h),p.substr(2,3),console.log(p);console.log("asdasd asdhakh".substring(3,9));!function(n,o,e){for(var t=0;t<e.length;t++)e.substring(t,t+n.length)==n&&(e=e.substring(0,t)+o+e.substring(t+n.length,e.length))}("World","Web","Brave New World");var v=new String("woshi zi fuchuan duixaing");console.log(void 0===v?"undefined":l(v)),console.log(l(v.toString())+"是"+v.toString()),console.log(String.raw(i))},function(n,o,e){"use strict";e(9),e(8),e(7),e(6)},function(n,o){console.warn("-------------------------Ts迭代器和生成器部分begin-------------------------");for(var e=0,t=[0,"asd","cesium",!0];e<t.length;e++){var r=t[e];console.log(r)}for(var l=[4,5,6],i=0,c=l;i<c.length;i++){var a=c[i];console.log("for of 循环的值"+a)}for(var s in l)console.log("for in 循环的值"+s);console.warn("-------------------------Ts迭代器和生成器部分end----------------------------")},function(n,o){var e,t,r,l,i,c,a,s,u,f;function g(n,o){return console.log(o),n}console.warn("-------------------------Ts枚举部分begin-------------------------"),function(n){n[n.Top=1]="Top",n[n.Down=2]="Down",n[n.Left=3]="Left",n[n.Right=4]="Right"}(e||(e={})),console.log(e.Right),function(n){n[n.Up=0]="Up",n[n.Down=1]="Down",n[n.Left=2]="Left",n[n.Right=3]="Right"}(t||(t={})),console.log(t.Right),function(n){n[n.No=0]="No",n[n.Yes=1]="Yes"}(r||(r={})),g(1,r.Yes),function(n){n[n.A=g(1,r.Yes)]="A"}(l||(l={})),function(n){n.YES="yes",n.NO="no"}(i||(i={})),function(n){n[n.No=0]="No",n.Yes="YES"}(c||(c={})),function(n){n[n.A=0]="A"}(a||(a={})),function(n){n[n.A=1]="A",n[n.B=2]="B",n[n.C=3]="C"}(s||(s={})),console.log("未初始化时A得值"+a.A),console.log("有初始化时A得值"+s.A+" B的值"+s.B),function(n){n[n.None=0]="None",n[n.Read=2]="Read",n[n.Write=4]="Write",n[n.ReadWrite=6]="ReadWrite",n[n.G="123".length]="G"}(u||(u={})),console.log(u.ReadWrite),function(n){n[n.A=0]="A",n[n.B=1]="B"}(f||(f={}));f.A;console.log([0,1,2,3]),console.warn("-------------------------Ts枚举部分begin-------------------------")},function(n,o){function e(n){return n}console.warn("-------------------------Ts泛型部分begin-------------------------");e("限定类型"),e("类型推论");var t=function(){return function(){}}(),r=new t;r.zeroValue=1,console.log(r);var l=new t;l.zeroValue="我是字符串的泛型",console.log(l),e(123),e("qwe"),console.warn("-------------------------Ts泛型部分end-------------------------")},function(n,o){console.warn("-------------------------Ts函数部分begin-------------------------");function e(n){for(var o=[],e=1;e<arguments.length;e++)o[e-1]=arguments[e];return n+""+o.join(" ")}var t=e("Joseph","Samuel","Lucas","MacKinzie");console.log(t);({suits:["hearts","spades","clubs","diamonds"],cards:Array(52),createCardPicker:function(){var n=this;return function(){return console.log("this指向"+n),console.log(n.suits),n.suits}}}).createCardPicker()();var r={suits:["hearts","spades","clubs","diamonds"],cards:Array(52),create:function(){var n=this;return function(){var o=Math.floor(52*Math.random()),e=Math.floor(o/13);return{suit:n.suits[e],card:o%13}}}}.create()();console.log("使用接口重写this指向之后的: card: "+r.card+" of "+r.suit),console.warn("-------------------------Ts函数部分end-------------------------")},function(n,o){var e,t=this&&this.__extends||(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,o){n.__proto__=o}||function(n,o){for(var e in o)o.hasOwnProperty(e)&&(n[e]=o[e])},function(n,o){function t(){this.constructor=n}e(n,o),n.prototype=null===o?Object.create(o):(t.prototype=o.prototype,new t)});console.warn("-------------------------Ts类部分begin-------------------------");new(function(){function n(n){this.greeting=n}return n.prototype.greet=function(){return"Hello,"+this.greeting},n}())("world");var r=function(){function n(n){this.name=n}return n.prototype.move=function(n){void 0===n&&(n=0),console.log("Animal moved "+n+"m.")},n}();new(function(n){function o(){return null!==n&&n.apply(this,arguments)||this}return t(o,n),o.prototype.bark=function(){console.log("Woof! Woof!")},o}(r))("").move(10),new(function(n){function o(o){return n.call(this,o)||this}return t(o,n),o.prototype.move=function(o){void 0===o&&(o=5),console.log("在子类中调用父类的方法"),n.prototype.move.call(this,o)},o}(r))("Sammy the Python").move();new(function(n){function o(o,e){var t=n.call(this,o)||this;return t.department=e,t}return t(o,n),o.prototype.getElevatorPitch=function(){return"Hello, my name is "+this.name+" and I work in "+this.department+"."},o}(function(){return function(n){this.name=n}}()))("Howard","Sales");(new(function(){function n(){}return Object.defineProperty(n.prototype,"fullName",{get:function(){return this._fullName},set:function(n){this._fullName=n},enumerable:!0,configurable:!0}),n}())).fullName="Bob Smith",(new(function(n){function o(){return n.call(this,"抽象类的派生类中必须要调用super")||this}return t(o,n),o.prototype.printMeeting=function(){console.log("子类中实现抽象父类中的方法: "+this.name)},o}(function(){function n(n){this.name=n}return n.prototype.printName=function(){console.log("Department name:"+this.name)},n}()))).printMeeting();console.warn("-------------------------Ts类部分end-------------------------")},function(n,o){console.warn("-------------------------Ts接口部分begin-------------------------");var e;e={size:10,label:"label",x:1},console.log(e.label);console.log("Bob");!function(){function n(n,o){}n.prototype.setTime=function(n){this.currentTime=n}}();var t={};t.size="100",t.color="red",t.height=100,console.log({size:"100",color:"red",height:100,name:"shape"});var r,l=((r=function(n){}).interval=100,r.reset=function(){},r);console.log(l.interval),console.warn("-------------------------Ts接口部分end-------------------------")},function(n,o,e){"use strict";e(16),e(15),e(14),e(13),e(12),e(11)},function(n,o,e){"use strict";Function.prototype.aopBefore=function(n){console.log(this);var o=this;return function(){return n.apply(this,arguments),o.apply(this,arguments)}},Function.prototype.aopAfter=function(n){var o=this;return function(){var e=o.apply(this,arguments);return n.apply(this,arguments),e}};var t=function(){console.log("aop")};(t=t.aopBefore(function(){console.log("aop before")}).aopAfter(function(){console.log("aop after")}))();var r=0,l=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";console.log("第"+o+"月的花销是"+n),r+=n,console.log("当前总共消费:"+r)};l(1e3,1),l(2e3,2),l(3e3,12);var i,c=(i=[],function(){if(0===arguments.length){var n=0;return i.forEach(function(o){n+=o[0]}),console.log("共消费:"+n),n}var o=Array.from(arguments);i.push(o),console.log("暂存"+(arguments[1]?arguments[1]:"")+"月,金额"+arguments[0])});c(1e3,1),c(100,2),c();var a=function(){var n=0;return function(){for(var o=0;o<arguments.length;o++)n+=arguments[o];return console.log("共消费:"+n),n}}();(a=function(n){var o=[];return function(){if(0===arguments.length)return console.log("curring完毕进行计算总值"),n.apply(this,o);var e=Array.from(arguments)[0];console.log("暂存"+(arguments[1]?arguments[1]:"")+"月,金额"+arguments[0]),o.push(e)}}(a))(2e3,1),a(2e3,2),a(9e3,12),a();window.onresize=function(n){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:500,e=null,t=!0;return function(){var r=arguments,l=this;return t?(n.apply(l,r),t=!1):!e&&void(e=setTimeout(function(){console.log(e),window.clearTimeout(e),e=null,n.apply(l,r)},o))}}(function(){console.log("throttle")},600);for(var s=[],u=0;u<94;u++)s.push(u);(function(n,o){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,t=[],r=null})(s,function(n){var o=document.createElement("div");o.innerHTML=n+1,document.body.appendChild(o)},20),window.addEventListener||window.attachEvent;var f=function(n,o,e){window.addEventListener?f=function(n,o,e){n.addEventListener(o,e,!1)}:window.attachEvent&&(f=function(n,o,e){n.attachEvent("on"+o,e)}),f(n,o,e)};f(document.getElementById("eventLazy"),"click",function(){console.log("lazy ")})},function(n,o){console.warn("leet code String 专题开始");console.log("=================反转字符串算法==================="),console.log(function(n){var o=n.split(""),e=o.length-1;console.log(o);for(var t=0;t<Math.ceil(o.length/2);t++){var r;r=o[e-t],o[e-t]=o[t],o[t]=r}return o.join("")}("hello")),console.log("====================================");console.log("=================颠倒整数算法==================="),console.log(function(n){if(0===n)return n;for(var o=[],e=n.toString(),t=e.length-1;t>=0;t--)o.push(e[t]);return n<0&&o.unshift("-"),(n=parseInt(o.join("")))<Math.pow(-2,31)||n>Math.pow(2,31)-1||0===n?0:n}(901e3)),console.log("====================================");console.log("================字符串中的第一个唯一字符算法===================="),console.log(function(n){var o=-1;if(""===n)return-1;if(1===n.length)return 0;for(var e=0;e<n.length;e++){for(var t=[],r=0;r<n.length;r++)e!==r&&t.push(n[r]);if(-1===t.indexOf(n[e])){o=e;break}}return o}("")),console.log(function(n){var o=-1;if(""===n)return-1;if(1===n.length)return 0;for(var e={},t=0;t<n.length;t++)e[n[t]]?e[n[t]]++:e[n[t]]=1;for(var r in e)if(1===e[r])return n.indexOf(r);return o}("leetcode")),console.log("====================================");console.log("=================有效的字母异位词算法输出==================="),console.log(function(n,o){var e={},t={},r=!0;if(""===n&&""===o)return!0;if(n.length!==o.length)return!1;for(var l=0;l<n.length;l++)e[n[l]]?e[n[l]]++:e[n[l]]=1,t[o[l]]?t[o[l]]++:t[o[l]]=1;for(var i in e)if(e[i]!==t[i])return!1;return r}("anagram","nagaram")),console.log("====================================");var e,t,r;console.log("=================验证回文字符串算法==================="),console.log((t=[],r=/\d|[a-z]|[A-Z]/g,0===(e="A man, a plan, a canal: Panama").trim().length||1===e.trim().length||!e.match(r)||(t=(t=e.match(r)).map(function(n){return n.toUpperCase()})).join("")===t.reverse().join(""))),console.log("====================================");var l=function(n){var o,e="",t=!1;if("-"!==(n=n.trim())[0]&&"+"!==n[0]||(t="-"===n[0],n=n.slice(1)),0!==parseInt(n[0])&&!parseInt(n[0]))return 0;for(var r=0;r<n.length&&(0===parseInt(n[r])||parseInt(n[r]));r++)e+=n[r];return((o=t?-Number(e):Number(e))<Math.pow(-2,31)||o>Math.pow(2,31)-1)&&(o=t?Math.pow(-2,31):Math.pow(2,31)-1),o};console.log("=================字符串转整数 (atoi)算法==================="),console.log(l("+42")),console.log(l(" -42")),console.log(l(" -4193 with words")),console.log(l("with words -4193")),console.log(l("-91283472332")),console.log("====================================");console.log("===============实现strStr()算法====================="),console.log("aaaaaaaaa".indexOf("ba")),console.log("====================================");console.log("================实现报数算法===================="),console.log(function(n){var o="1";if(1===n)return"1";for(var e=2;e<=n;e++){for(var t="",r=o.split(""),l=0;l<r.length;l++){var i=0;r[l]===r[i]?++i===r.length&&(t+=""+i+r[i]):(t+=""+(i+1)+r[i],r.slice(l),i=0),console.log(t)}console.log(e+" =======> "+t),o=t}return o}(6)),console.log("===================================="),console.warn("leet code String 专题结束")},function(n,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),console.warn(" ------------------------------------算法专题begin----------------------------------");var t=function(n,o,e){var t=n[o];n[o]=n[e],n[e]=t};!function(n){console.time();for(var o=0;o<n.length;o++){for(var e=o,r=0;r<n.length;r++)n[e]>n[r]&&(e=r);t(n,e,o)}console.log(n),console.timeEnd()}([3,6,28,123,34]);!function(n){console.log("冒泡算法开始时间:"),console.time();for(var o=0;o<n.length;o++)for(var e=o+1;e>0;e--)n[o]<n[e-1]&&t(n,e,e-1);console.timeEnd(),console.log(n)}([3,123,6,28,34]);function r(n,o){for(var e=0,t=n.length-1;e<=t;){var r=(t+e)/2;if(o===n[r])return r;if(o>n[r])e=r+1;else{if(!(o<n[r]))return-1;t=r-1}}}!function(n){console.time();for(var o=0;o<n.length;o++){for(var e=o-1,t=n[o];e>=0&&n[e]>t;)n[e+1]=n[e],e--;n[e+1]=t}console.timeEnd(),console.log(n)}([3,2,1]);var l=r([1,2,3,4,5,6,7,8,9,10,11,23,44,86],23);console.log("二分查找不用循环找到的位置:"+l);var i=r([1,2,3,4,5,6,7,8,9,10,11,23,44,86],3);console.log("二分查找不用循环找到的位置:"+i),console.warn("leet code Array 专题开始");!function(n){for(var o=0,e=0;e<n.length;e++)n[e]!==n[o]&&(n[++o]=n[e]);n.splice(o+1),console.log(n),console.log(n.length)}([0,0,1,1,1,2,2,3,3,4]);console.log("=================股票最佳购买时机贪心算法==================="),console.log(function(n){if(n.length<2)return 0;for(var o=0,e=n[0],t=0;t<n.length;t++)o=Math.max(o,n[t]-e),e=Math.min(e,n[t]);return console.log(o),o}([7,1,5,3,6,4])),console.log("====================================");console.log("==================股票最佳购买时机非贪心算法=================="),console.log(function(n){if(n.length<2)return 0;for(var o=0,e=0;e<n.length;e++)n[e+1]>n[e]&&(o+=n[e+1]-n[e]);return o}([7,1,5,8,3,6,4])),console.log("=============================================");!function(n,o){for(var e=0;e<o;e++)n.unshift(n[n.length-1-e]);n.splice(n.length-o,o)}([1,2,3,4,5,6,7],3);console.log("================是否存在重复算法===================="),console.log(function(n){var o=!1;if(n.length<=1)return o;for(var e=[],t=0;t<n.length;t++){if(-1!==e.indexOf(n[t]))return!0;e.push(n[t])}return o}([3,1])),console.log("====================================");var c,a;console.log("=================查找单独数算法==================="),console.log((a=-1,(c=[2,2,1,3,3]).forEach(function(n,o){for(var e=0,t=0;t<c.length;t++)n===c[t]&&(e+=1),t===c.length-1&&1===e&&(a=o)}),c[a])),console.log("====================================");!function(n,o){for(var e=[],t=0;t<n.length;t++)-1!==o.indexOf(n[t])&&(o.splice(o.indexOf(n[t]),1),e.push(n[t]))}([1,2,2,1],[2,2]);console.log("================加1算法===================="),console.log(function(n){for(var o=n.length-1,e=n.length-1;e>=0&&e==o;e--)n[e]+1>=10?(n[e]=n[e]+1-10,o--,0===e&&n.unshift(1)):n[o]++;return console.log(n),n}([8,2,1,,1,2,2,2,3,5,5,5,5,5,2,3,4,2,3,4,5,5,5,5,2,9])),console.log("====================================");console.log("==================移动零算法=================="),function(n){var o=0;n.forEach(function(e,t,r){0===n[o]?(n.splice(o,1),n.push(0)):o++}),console.log(n)}([1,2,0,0,0,1]),console.log("====================================");var s,u,f,g=[{fid:0,cid:3,flag:"最外层3"},{fid:0,cid:4,flag:"最外层4"},{fid:4,cid:5,flag:"最外层-4"},{fid:5,cid:6,flag:"最外层-4-1"},{fid:0,cid:7,flag:"最外层7"},{fid:7,cid:8,flag:"最外层-7"},{fid:0,cid:9,flag:"最外层9"},{fid:9,cid:10,flag:"最外层9-1"},{fid:9,cid:11,flag:"最外层9-2"},{fid:11,cid:12,flag:"最外层9-2-1"}];console.log("===================================="),console.log("找父亲节点方式"),console.log(function(n){for(var o=[],e=0;e<n.length;e++){for(var t=n[e].cid,r=0;r<n.length;r++){var l=n[r];l.fid===t&&(n[e].children=[]).push(l)}0===n[e].fid&&o.push(n[e])}return o}(g)),console.log((u=[],f={},(s=g).forEach(function(n){f[n.cid]=n}),s.forEach(function(n){var o=f[n.fid];o?(o.children||(o.children=[])).push(n):u.push(n)}),u)),console.log("====================================");console.log("=================两数之和算法==================="),console.log(function(n,o){console.log("两数求和第一种解法");for(var e=[0,0],t=!1,r=0;r<n.length;r++)if(l(r),t){e=[r,l(r)];break}function l(e){for(var r=0;r<n.length;r++)if(r!==e&&n[e]+n[r]===o)return t=!0,r}return e}([3,2,4],6)),console.log(function(n,o){var e=[0,0];console.log("两数求和第二种解法");for(var t=0;t<n.length;t++)for(var r=0;r<n.length;r++)if(r!==t&&n[t]+n[r]===o)return[t,r];return e}([2,7,11,15],9)),console.log("====================================");console.log("=================有效数独算法结果==================="),console.log(function(n){for(var o=!0,e=0;e<9;e++)for(var t={},r={},l=0;l<9;l++){if("."!==n[e][l]){if(t[n[e][l]])return console.log(n[e][l]),!1;t[n[e][l]]=n[e][l]}if("."!==n[l][e]){if(r[n[l][e]])return console.log(n[l][e]),!1;r[n[l][e]]=n[l][e]}for(var i=Math.floor(e/3),c=Math.floor(l/3),a=3*i;a<3*i+3;a++)for(var s=3*c;s<3*c+3;s++)if((a!==e||s!==l)&&"."!=n[a][s]&&"."!==n[e][l]&&n[e][l]===n[a][s])return!1}return o}([["7",".",".",".","4",".",".",".","."],[".",".",".","8","6","5",".",".","."],[".","1",".","2",".",".",".",".","."],[".",".",".",".",".","9",".",".","."],[".",".",".",".","5",".","5",".","."],[".",".",".",".",".",".",".",".","."],[".",".",".",".",".",".","2",".","."],[".",".",".",".",".",".",".",".","."],[".",".",".",".",".",".",".",".","."]])),console.log("====================================");console.log("================旋转图像算法===================="),console.log(function(n){for(var o=n.length,e=o-1;e>=0;e--)for(var t=0;t<o;t++){var r=n[e][t];n[t].push(r),t===o-1&&n[e].splice(0,o)}console.log(n)}([[1,2,3],[4,5,6],[7,8,9]])),console.log("===================================="),console.warn("leet code Array 专题结束"),e(19),console.warn(" ------------------------------------算法专题end----------------------------------")},function(n,o,e){"use strict";var t,r,l,i=function(n){return document.getElementById(n)},c=i("outer");i("inner");t=c,r="click",l=function(n){alert("e.target.tagName : "+n.target.tagName+"\n e.currentTarget.tagName : "+n.currentTarget.tagName)},window.attachEvent?t.attachEvent("on"+r,l):window.addEventListener&&t.addEventListener(r,l,!1),i("box").onclick=function(n){var o=(n=n||window.event).target||n.srcElement;if("input"==o.nodeName.toLocaleLowerCase())switch(o.id){case"add":alert("添加");break;case"remove":alert("删除");break;case"move":alert("移动");break;case"select":alert("选择")}};var a=document.getElementById("btn"),s=document.getElementById("ul1"),u=(s.getElementsByTagName("li"),4);s.onmouseover=function(n){var o=(n=n||window.event).target||n.srcElement;"li"==o.nodeName.toLowerCase()&&(o.style.background="red")},s.onmouseout=function(n){var o=(n=n||window.event).target||n.srcElement;"li"==o.nodeName.toLowerCase()&&(o.style.background="#fff")},a.onclick=function(){u++;var n=document.createElement("li");n.innerHTML=111*u,s.appendChild(n)};var f,g,p=(f=0,function(){return f+=1}),d=p(),h=p(),v=p();console.log(p,d,h,v),(g=100,function(){console.log("我就是闭包部分输出的值"+g)})();!function(){for(var n=document.querySelectorAll("a"),o=0;o<4;o++)!function(o){n[o].onclick=function(){alert("单击第"+o+"个")}}(o)}();var m;m=['<div id="',"",'" style="position:absolute;top:',"","px;left:","","px;width:","","px;height:","",'px;overflow:hidden;"><img src="',"",'" width="',"",'" height="',"",'" alt="',"",'"></div>']},function(n,o,e){"use strict";console.warn("------------------------------------这个是JavaScript闯关记Demo Begin----------------------------------");var t=setTimeout(function(){console.log("set timeout调用")},100);clearTimeout(t);var r=0,l=null;l=setInterval(function(){r++,console.log(r),10==r&&(clearInterval(l),console.log("interval done"))},500);var i=document.getElementById("demo"),c=i.childNodes[0],a=i.childNodes.item(1),s=i.childNodes.length;console.log(c),console.log(a),console.log(s);var u=i.appendChild(a);console.log(u==a),console.warn("------------------------------------这个是JavaScript闯关记Demo end------------------------------------")},function(n,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0}),o.area=function(n){return Math.PI*n*n},o.circumference=function(n){return 2*Math.PI*n}},function(n,o,e){"use strict";Object.defineProperty(o,"__esModule",{value:!0});var t=function n(o,e,t,r){var l=Object.getOwnPropertyDescriptor(o,e);if(void 0===l){var i=Object.getPrototypeOf(o);null!==i&&n(i,e,t,r)}else if("value"in l&&l.writable)l.value=t;else{var c=l.set;void 0!==c&&c.call(r,t)}return t},r=function n(o,e,t){null===o&&(o=Function.prototype);var r=Object.getOwnPropertyDescriptor(o,e);if(void 0===r){var l=Object.getPrototypeOf(o);return null===l?void 0:n(l,e,t)}if("value"in r)return r.value;var i=r.get;return void 0!==i?i.call(t):void 0},l=function(){function n(n,o){for(var e=0;e<o.length;e++){var t=o[e];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(n,t.key,t)}}return function(o,e,t){return e&&n(o.prototype,e),t&&n(o,t),o}}(),i=function(){return function(n,o){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return function(n,o){var e=[],t=!0,r=!1,l=void 0;try{for(var i,c=n[Symbol.iterator]();!(t=(i=c.next()).done)&&(e.push(i.value),!o||e.length!==o);t=!0);}catch(n){r=!0,l=n}finally{try{!t&&c.return&&c.return()}finally{if(r)throw l}}return e}(n,o);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=function(n){if(n&&n.__esModule)return n;var o={};if(null!=n)for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(o[e]=n[e]);return o.default=n,o}(e(23));function a(n,o){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!o||"object"!=typeof o&&"function"!=typeof o?n:o}function s(n,o){if("function"!=typeof o&&null!==o)throw new TypeError("Super expression must either be null or a function, not "+typeof o);n.prototype=Object.create(o&&o.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o&&(Object.setPrototypeOf?Object.setPrototypeOf(n,o):n.__proto__=o)}function u(n,o){if(!(n instanceof o))throw new TypeError("Cannot call a class as a function")}console.warn("------------------------------------这个是demo输出的begin----------------------------------");var f=100,g=200,p=[g,f];f=p[0],g=p[1],console.log(f+" + "+g);var d=i([1,2,3,4],4),h=d[0],v=d[1],m=d[2],y=d[3];console.log(h+" + "+v+" + "+m+" + "+y);var b={id:"007",name:"etf",age:21},w=b.id,x=b.name,O=b.age;console.log(w+" + "+x+" + "+O);var j=1,k=21,S="mm",_={Chinese:98,English:98,Math:20};console.log(j),console.log(k),console.log(S),console.log(_);var A=new Map;A.set("user","007"),A.set("pass","123");var E=!0,M=!1,T=void 0;try{for(var N,P=A[Symbol.iterator]();!(E=(N=P.next()).done);E=!0){var L=i(N.value,2),I=L[0],C=L[1];console.log(I+"is"+C)}}catch(n){M=!0,T=n}finally{try{!E&&P.return&&P.return()}finally{if(M)throw T}}var R=!0,B=!1,U=void 0;try{for(var q,z=A[Symbol.iterator]();!(R=(q=z.next()).done);R=!0){I=i(q.value,1)[0];console.log(I)}}catch(n){B=!0,U=n}finally{try{!R&&z.return&&z.return()}finally{if(B)throw U}}var W=!0,D=!1,H=void 0;try{for(var J,F=A[Symbol.iterator]();!(W=(J=F.next()).done);W=!0){var Y=i(J.value,2)[1];console.log(Y)}}catch(n){D=!0,H=n}finally{try{!W&&F.return&&F.return()}finally{if(D)throw H}}var $=function(){function n(o,e){u(this,n),this.x=o,this.y=e}return l(n,[{key:"newToString",value:function(){return h+","+v}}]),n}();!function(){function n(o){u(this,n),this.name=o}l(n,[{key:"getClassName",value:function(){return console.log(n.name)}}])}();new(function(){function n(o){u(this,n),this.name=o}return l(n,[{key:"sayName",value:function(){console.log(this.name)}}]),n}())("张三").sayName();new $,function(){function n(){u(this,n)}l(n,[{key:"foo",value:function(n){this._baz(n)}},{key:"_baz",value:function(n){return this.snaf=n}}])}(),function(){function n(){u(this,n)}l(n,[{key:"foo",value:function(n){G.call(this,n)}}])}();function G(n){return this.snaf=n}Symbol("tBar"),Symbol("tSnaf");var V=function(){function n(){u(this,n)}return l(n,[{key:"foo",value:function(n){this[G](n)}},{key:G,value:function(n){return this[snaf]=n}}]),n}();o.default=V;(new(function(){function n(){u(this,n)}return l(n,[{key:"printName",value:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"there";this.print("hello "+n)}},{key:"print",value:function(n){console.log(n)}}]),n}())).printName;var K=function n(){u(this,n)},Z=(function(n){function o(n,e,t){u(this,o);var r=a(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,n,e));return r.color=t,r}s(o,K),l(o,[{key:"toString",value:function(){return this.color+""+r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"toString",this).call(this)}}])}(),function(){function n(){u(this,n)}return l(n,[{key:"m",value:function(){return 2}}]),n}()),Q=(new(function(n){function o(){u(this,o);var n=a(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return console.log(r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"m",n).call(n)),n}return s(o,Z),o}()),function(){function n(o){u(this,n),this.x=1}return l(n,[{key:"print",value:function(){console.log(this.x)}}]),n}());(new(function(n){function o(){u(this,o);var n=a(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.x=2,n}return s(o,Q),l(o,[{key:"m",value:function(){r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"print",this).call(this)}}]),o}())).m();!function(n){function o(){u(this,o);var n=a(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return n.x=2,t(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"x",3,n),console.log(r(o.prototype.__proto__||Object.getPrototypeOf(o.prototype),"x",n)),console.log(n.x),n}s(o,Q)}();console.log("{}类的修饰");console.log("圆面积:"+c.area(4)),console.log("圆周长:"+c.circumference(14));console.log("条件不达到不加载"),Promise.all([]).then(function(n){var o=i(n,3);o[0],o[1],o[2]}),console.info("=>箭头函数专题"),console.info("=> ES5 写法");console.info("=> ES6 写法");[1,2,3].map(function(n){return n*n}),[1,2,3].map(function(n){return n*n});for(var X=[3,3,3,3,3],nn=[1,1,1,1,1],on=[2,2,2,2,2],en=[],tn=0;tn<X.length;tn++){var rn={id:on[tn],lowerLimit:X[tn],score:nn[tn]};en.push(rn)}JSON.stringify(en),console.warn("------------------------------------这个是demo输出的end------------------------------------")},function(n,o,e){"use strict";e(24),e(22),e(21),e(20),e(18),e(17),e(10),e(5)}]);