'+this.tplContextmenuList(e.contextmenu,i)+''}},{key:"tplDanmakumargin",value:function(e){var t="";if(e)for(var i in e)t+=i+":"+e[i]+";";return t}},{key:"tplContextmenuList",value:function(e,t){for(var i='
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
',this.option.showlrc){this.element.classList.add("aplayer-withlrc");var u="";for(this.lrcContents=this.element.getElementsByClassName("aplayer-lrc-contents")[0],o=0;o"+this.lrcLine[o]+"";this.lrcContents.innerHTML=u,this.lrcIndex=0,this.lrcContents.getElementsByTagName("p")[0].classList.add("aplayer-lrc-current")}this.option.narrow&&this.element.classList.add("aplayer-narrow"),this.audio=document.createElement("audio"),this.audio.src=this.music.url,this.audio.loop=!0,this.audio.preload="metadata";var m=this;this.audio.addEventListener("durationchange",function(){1!==m.audio.duration&&(m.element.getElementsByClassName("aplayer-dtime")[0].innerHTML=m.secondToTime(m.audio.duration))}),this.audio.addEventListener("loadedmetadata",function(){m.element.getElementsByClassName("aplayer-author")[0].innerHTML=" - "+m.music.author,m.loadedTime=setInterval(function(){var e=m.audio.buffered.end(m.audio.buffered.length-1)/m.audio.duration;m.updateBar.call(m,"loaded",e,"width"),1===e&&clearInterval(m.loadedTime)},500)}),this.audio.addEventListener("error",function(){m.element.getElementsByClassName("aplayer-author")[0].innerHTML=" - 加载失败 ╥﹏╥"}),this.playButton=this.element.getElementsByClassName("aplayer-play")[0],this.pauseButton=this.element.getElementsByClassName("aplayer-pause")[0],this.playButton.addEventListener("click",function(){m.play.call(m)}),this.pauseButton.addEventListener("click",function(){m.pause.call(m)}),this.playedBar=this.element.getElementsByClassName("aplayer-played")[0],this.loadedBar=this.element.getElementsByClassName("aplayer-loaded")[0],this.thumb=this.element.getElementsByClassName("aplayer-thumb")[0],this.bar=this.element.getElementsByClassName("aplayer-bar")[0];var p;this.bar.addEventListener("click",function(e){var a=e||window.event;p=m.bar.clientWidth;var i=(a.clientX-t(m.bar))/p;m.updateBar.call(m,"played",i,"width"),m.element.getElementsByClassName("aplayer-ptime")[0].innerHTML=m.secondToTime(i*m.audio.duration),m.audio.currentTime=parseFloat(m.playedBar.style.width)/100*m.audio.duration}),this.thumb.addEventListener("mousedown",function(){p=m.bar.clientWidth,clearInterval(m.playedTime),document.addEventListener("mousemove",e),document.addEventListener("mouseup",a)}),this.audio.volume=.8,this.volumeBar=this.element.getElementsByClassName("aplayer-volume")[0];var y=this.element.getElementsByClassName("aplayer-volume-bar")[0],h=m.element.getElementsByClassName("aplayer-time")[0].getElementsByTagName("i")[0],v=35;this.element.getElementsByClassName("aplayer-volume-bar-wrap")[0].addEventListener("click",function(e){var a=e||window.event,t=(v-a.clientY+i(y))/v;t=t>0?t:0,t=1>t?t:1,m.updateBar.call(m,"volume",t,"height"),m.audio.volume=t,m.audio.muted&&(m.audio.muted=!1),1===t?h.className="demo-icon aplayer-icon-volume-up":h.className="demo-icon aplayer-icon-volume-down"}),h.addEventListener("click",function(){m.audio.muted?(m.audio.muted=!1,h.className=1===m.audio.volume?"demo-icon aplayer-icon-volume-up":"demo-icon aplayer-icon-volume-down",m.updateBar.call(m,"volume",m.audio.volume,"height")):(m.audio.muted=!0,h.className="demo-icon aplayer-icon-volume-off",m.updateBar.call(m,"volume",0,"height"))}),this.option.autoplay&&this.play()},APlayer.prototype.play=function(){this.playButton.classList.add("aplayer-hide"),this.pauseButton.classList.remove("aplayer-hide"),this.audio.play();var e=this;this.playedTime=setInterval(function(){e.updateBar.call(e,"played",e.audio.currentTime/e.audio.duration,"width"),e.option.showlrc&&e.updateLrc.call(e),e.element.getElementsByClassName("aplayer-ptime")[0].innerHTML=e.secondToTime(e.audio.currentTime)},100)},APlayer.prototype.pause=function(){this.pauseButton.classList.add("aplayer-hide"),this.playButton.classList.remove("aplayer-hide"),this.audio.pause(),clearInterval(this.playedTime)},APlayer.prototype.updateBar=function(e,a,t){a=a>0?a:0,a=1>a?a:1,this[e+"Bar"].style[t]=100*a+"%"},APlayer.prototype.updateLrc=function(e){if(e||(e=this.audio.currentTime),e=this.lrcTime[this.lrcIndex+1])for(var a=0;a=this.lrcTime[a]&&(!this.lrcTime[a+1]||ee?"0"+e:""+e},t=parseInt(e/60),i=parseInt(e-60*t);return a(t)+":"+a(i)};
\ No newline at end of file
diff --git a/music player/aa.mp3 b/music player/aa.mp3
new file mode 100644
index 0000000..cdaa485
Binary files /dev/null and b/music player/aa.mp3 differ
diff --git a/music player/font/aplayer-fontello.eot b/music player/font/aplayer-fontello.eot
new file mode 100644
index 0000000..70af144
Binary files /dev/null and b/music player/font/aplayer-fontello.eot differ
diff --git a/music player/font/aplayer-fontello.svg b/music player/font/aplayer-fontello.svg
new file mode 100644
index 0000000..dee6aa3
--- /dev/null
+++ b/music player/font/aplayer-fontello.svg
@@ -0,0 +1,21 @@
+
+
+
+Copyright (C) 2015 by original authors @ fontello.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/music player/font/aplayer-fontello.ttf b/music player/font/aplayer-fontello.ttf
new file mode 100644
index 0000000..894f3f0
Binary files /dev/null and b/music player/font/aplayer-fontello.ttf differ
diff --git a/music player/font/aplayer-fontello.woff b/music player/font/aplayer-fontello.woff
new file mode 100644
index 0000000..72cb2d4
Binary files /dev/null and b/music player/font/aplayer-fontello.woff differ
diff --git a/music player/index.css b/music player/index.css
new file mode 100644
index 0000000..57474c2
--- /dev/null
+++ b/music player/index.css
@@ -0,0 +1,20 @@
+.demo {
+ width: 360px;
+ margin: 160px auto;
+ border-radius: 10px;
+}
+
+.demo p {
+ padding: 10px 0;
+ position: relative;
+ left: 16px;
+ opacity: 0.5;
+}
+
+body {
+ height: 595px;
+ width: 900px;
+ background-size: 1000px 968px;
+ margin: 0px auto;
+ background-color: #2D2D2D;
+}
diff --git a/music player/index.html b/music player/index.html
new file mode 100644
index 0000000..8323876
--- /dev/null
+++ b/music player/index.html
@@ -0,0 +1,52 @@
+
+
+
+
+
+html音乐播放器
+
+
+
+
+
+
+
+
+
+
+
MY MUSIC
+
+
+ [00:00.00]Jar Of Love
+[00:00.08]演唱:曲婉婷
+[00:00.22]
+[00:01.00]Another sunrise, another sunset
+[00:05.10]Soon it'll all be yesterday
+[00:08.33]Another good day, another bad day,
+[00:12.77]What did you do today?
+[00:15.95]Why do we choose to chase what we'll lose?
+[00:19.77]What you want isn't what you have.
+[00:23.34]What you have may not be yours, to keep.
+[00:31.29]If I could find love, at a stop, in a park with open arms,
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/music player/zz.jpg b/music player/zz.jpg
new file mode 100644
index 0000000..d87d076
Binary files /dev/null and b/music player/zz.jpg differ
diff --git a/一个不能死/images/gdyx.png b/一个不能死/images/gdyx.png
new file mode 100644
index 0000000..d5060cd
Binary files /dev/null and b/一个不能死/images/gdyx.png differ
diff --git a/一个不能死/images/wu.png b/一个不能死/images/wu.png
new file mode 100644
index 0000000..56e2d09
Binary files /dev/null and b/一个不能死/images/wu.png differ
diff --git a/一个不能死/images/xiaoren.png b/一个不能死/images/xiaoren.png
new file mode 100644
index 0000000..f5996be
Binary files /dev/null and b/一个不能死/images/xiaoren.png differ
diff --git a/一个不能死/images/ygdbns.jpg b/一个不能死/images/ygdbns.jpg
new file mode 100644
index 0000000..866b79e
Binary files /dev/null and b/一个不能死/images/ygdbns.jpg differ
diff --git a/一个不能死/index.html b/一个不能死/index.html
new file mode 100644
index 0000000..32a5506
--- /dev/null
+++ b/一个不能死/index.html
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+ 一个都不能死
+
+
+
+
+
+
+
+
+
diff --git a/一个不能死/js/main.js b/一个不能死/js/main.js
new file mode 100644
index 0000000..8620c0b
--- /dev/null
+++ b/一个不能死/js/main.js
@@ -0,0 +1,2863 @@
+var link, jsGame; (function() {
+ var e = window.eval,
+ t = function(e, t, n) {
+ var r = n || {};
+ if (t) {
+ var i = function() {};
+ i.prototype = t.prototype,
+ e.prototype = new i,
+ e.prototype.constructor = e,
+ e.prototype.superClass = t.prototype,
+ i = null
+ }
+ for (var s in r) e.prototype[s] = r[s];
+ return r = null, e};
+ window.requestAnimationFrame = function() {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame ||
+ window.mozRequestAnimationFrame || window.oRequestAnimationFrame ||
+ window.msRequestAnimationFrame || window.setTimeout} (),
+ window.cancelAnimationFrame = function() {
+ return window.cancelAnimationFrame || window.webkitCancelAnimationFrame ||
+ window.mozCancelAnimationFrame || window.oCancelAnimationFrame ||
+ window.msCancelAnimationFrame || window.clearTimeout} (),
+ String || (String = {}),
+ String.format || (String.format = function() {
+ if (arguments.length == 0) return null;
+ var e = arguments[0] || "", t;
+ for (var n = 1, r = arguments.length; n < r; n++) t = new RegExp("\\{" + (n - 1)+"\\}","gm"),
+ e = e.replace(t, arguments[n]);
+ return t = null, e
+ }),
+ String.getByteLength || (String.getByteLength = function(e) {
+ var t, n = 0, r = e || "", i = r.length;
+ for (t = 0; t < i; t++) r.charCodeAt(t) >= 0 & r.charCodeAt(t) <= 255 ? n += 1 : n += 2;
+ return t = r = i = null, n});
+ if (!Array || !Array.prototype) Array.prototype = {};
+ Array.prototype.indexOfAttr = function(e, t) {
+ var n = (typeof e).toLowerCase(), r = -1;
+ for (var i = 0, s = this.length; i < s; i++) if (n == "string" && this[i][e] == t || n =="number"
+ && this[i] == e) {
+ r = i;
+ break
+ }
+ return n = null, r};
+ var n = {
+ canvas: {
+ id: "linkScreen",
+ defaultId: "linkScreen",
+ defaultFont: "12px Arial",
+ defaultWidth: 240,
+ defaultHeight: 320,
+ defaultColor: "rgb(0, 0, 0)",
+ bgColor: "#000",
+ cavansDoms: [],
+ ctxs: [],
+ device: "",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ },
+ system: {
+ loadRes: null,
+ pageLoad: null,
+ menu: null,
+ run: null,
+ runFn: function() {},
+ rafRun: null,
+ stop: null,
+ over: null,
+ zone: null,
+ active: null,
+ lastDate: Date.now(),
+ timeout: 30,
+ isPause: !1,
+ gameFlow: -1,
+ loadedImageToGameFlow: -1,
+ zoneArgs: null,
+ activeArgs: null,
+ spendTime: 0,
+ loadResTimer: null,
+ playTimer: null
+ },
+ event: {
+ key: 0,
+ keys: {
+ up: !1,
+ down: !1,
+ left: !1,
+ right: !1,
+ a: !1,
+ b: !1,
+ c: !1,
+ menu: !1,
+ quit: !1
+ },
+ lastKey: {
+ up: !1,
+ down: !1,
+ left: !1,
+ right: !1,
+ a: !1,
+ b: !1,
+ c: !1,
+ menu: !1,
+ quit: !1
+ },
+ pressedKey: {
+ up: !1,
+ down: !1,
+ left: !1,
+ right: !1,
+ a: !1,
+ b: !1,
+ c: !1,
+ menu: !1,
+ quit: !1
+ },
+ keyPressCtrl: {
+ up: !0,
+ down: !0,
+ left: !0,
+ right: !0,
+ a: !0,
+ b: !0,
+ c: !0,
+ menu: !0,
+ quit: !0
+ },
+ keyDownGo: !1,
+ keyUpGo: !1,
+ keyPressedGo: !1,
+ keyDownCallBack: null,
+ keyUpCallBack: null,
+ orientationChange: null,
+ touchStart: null,
+ touchEnd: null,
+ touchMove: null,
+ touchCancel: null,
+ clickCallBack: null,
+ mouseDownCallBack: null,
+ mouseUpCallBack: null,
+ mouseMoveCallBack: null,
+ focused: !1,
+ pageFocusCallBack: null,
+ pageUnFocusCallBack: null,
+ swipeCallBack: null,
+ pageOffX: 0,
+ pageOffY: 0,
+ pageStarOffX: 0,
+ pageStarOffY: 0,
+ swipeDate: null,
+ swipeTimeout: 200,
+ swipeRange: 50
+ },
+ image: {
+ imgs: {},
+ imgObjs: [],
+ initImgs: {},
+ asyncImgObjs: {},
+ imgCount: 0,
+ countLoaded: 0,
+ version: "",
+ inited: !1
+ },
+ audio: {
+ audios: {}
+ },
+ ajax: {
+ xhrObj: null,
+ pool: [],
+ poolLength: 5,
+ date: null,
+ isTimeout: !1,
+ param: {
+ type: "get",
+ data: null,
+ dataType: "json",
+ url: "",
+ xhr: null,
+ timeout: 5e3,
+ before: function(e) {},
+ success: function(e, t) {},
+ error: function(e, t) {},
+ complete: function(e) {}
+ }
+ },
+ request: {
+ gets: []
+ },
+ buttonLayout: {
+ buttons: [],
+ Button: t(function(e) {
+ this.id = e.id,
+ this.value = e.value,
+ this.x = e.x,
+ this.y = e.y,
+ this.width = e.width,
+ this.height = e.height,
+ this.bgColor = e.bgColor,
+ this.bgStroke = e.bgStroke,
+ this.stroke = e.stroke,
+ this.font = e.font,
+ this.imageId = e.imageId,
+ this.sx = e.sx,
+ this.sy = e.sy,
+ this.color = e.color,
+ this.hx = e.hx,
+ this.hy = e.hy,
+ this.hColor = e.hColor,
+ this.dex = e.dex,
+ this.dey = e.dey,
+ this.deColor = e.deColor,
+ this.hided = e.hided,
+ this.disabled = e.disabled,
+ this.path = e.path,
+ this.hovered = !1,
+ this.repeated = !1,
+ this.pressed = !1,
+ this.released = !1,
+ this.goned = !1,
+ this.cacheId = "buttonLayoutCache_" + this.id,
+ this.setDelay(e.delay).refresh()
+ },
+ null, {
+ refresh: function() {
+ m.canvas.pass(this.cacheId, this.width * 3, this.height),
+ this.imageId == "" ? (this.bgColor != "" && m.canvas.fillStyle(this.bgColor).fillRect(0, 0, this.width, this.height).fillRect(this.width, 0, this.width, this.height).fillRect(this.width * 2, 0, this.width, this.height), this.bgStroke != "" && m.canvas.strokeStyle(this.bgStroke).strokeRect(1, 1, this.width - 2, this.height - 2).strokeRect(this.width + 1, 1, this.width - 2, this.height - 2).strokeRect(this.width * 2 + 1, 1, this.width - 2, this.height - 2)) : m.canvas.drawImage(this.imageId, this.sx, this.sy, this.width, this.height, 0, 0, this.width, this.height).drawImage(this.imageId, this.hx, this.hy, this.width, this.height, this.width, 0, this.width, this.height).drawImage(this.imageId, this.dex, this.dey, this.width * 2, this.height, this.width * 2, 0, this.width, this.height);
+ if (this.value != "") {
+ var e = m.canvas.font(this.font).measureText(this.value),
+ t = this.width - e.width >> 1,
+ n = (this.height - e.height >> 1) + parseInt(this.font) - 2;
+ this.stroke != "" && m.canvas.fillStyle(this.stroke).fillText(this.value, t - 1, n).fillText(this.value, t, n - 1).fillText(this.value, t + 1, n).fillText(this.value, t, n + 1).fillText(this.value, t + this.width - 1, n).fillText(this.value, t + this.width, n - 1).fillText(this.value, t + this.width + 1, n).fillText(this.value, t + this.width, n + 1).fillText(this.value, t + this.width * 2 - 1, n).fillText(this.value, t + this.width * 2, n - 1).fillText(this.value, t + this.width * 2 + 1, n).fillText(this.value, t + this.width * 2, n + 1),
+ m.canvas.fillStyle(this.color).fillText(this.value, t, n).fillStyle(this.hColor).fillText(this.value, t + this.width, n).fillStyle(this.deColor).fillText(this.value, t + this.width * 2, n),
+ e = t = n = null
+ }
+ return m.canvas.pass(),
+ this
+ },
+ show: function() {
+ return this.hided = !1,
+ this
+ },
+ hide: function() {
+ return this.hided = !0,
+ this
+ },
+ disable: function(e) {
+ return this.disabled = e,
+ this
+ },
+ setPath: function(e, t) {
+ return this.setDelay(t).path = e || [],
+ this
+ },
+ endPath: function() {
+ return this.path.length == 0
+ },
+ gone: function(e, t) {
+ return this.setPath(e, t).goned = !0,
+ this
+ },
+ setDelay: function(e) {
+ return this.delay = e || 0,
+ this.delayDate = null,
+ this.delay > 0 && (this.delayDate = Date.now()),
+ this
+ },
+ action: function() {
+ if (this.hided) return this;
+ this.delayDate && Date.now() - this.delayDate >= this.delay && (this.delayDate = null);
+ if (!this.delayDate && this.path.length > 0) {
+ var e = this.path.shift();
+ this.x += e[0],
+ this.y += e[1],
+ e = null
+ }
+ return this
+ },
+ render: function() {
+ return this.hided ? this: (m.canvas.drawCache(this.cacheId, this.hovered ? this.width: this.disabled ? this.width * 2 : 0, 0, this.width, this.height, this.x, this.y, this.width, this.height), this)
+ },
+ disposed: function() {
+ return this
+ }
+ })
+ }
+ },
+ r = {
+ canvas: {
+ context: {
+ base: 0
+ },
+ graphics: {
+ HCENTER: 1,
+ VCENTER: 2,
+ LEFT: 4,
+ RIGHT: 8,
+ TOP: 16,
+ BOTTOM: 32,
+ ANCHOR_LT: 20,
+ ANCHOR_LV: 6,
+ ANCHOR_LB: 36,
+ ANCHOR_HT: 17,
+ ANCHOR_HV: 3,
+ ANCHOR_HB: 33,
+ ANCHOR_RT: 24,
+ ANCHOR_RV: 10,
+ ANCHOR_RB: 40
+ },
+ trans: {
+ TRANS_MIRROR: 2,
+ TRANS_NONE: 0,
+ TRANS_ROT90: 5,
+ TRANS_ROT180: 3,
+ TRANS_ROT270: 6,
+ TRANS_MIRROR_ROT90: 7,
+ TRANS_MIRROR_ROT180: 1,
+ TRANS_MIRROR_ROT270: 4
+ }
+ },
+ event: {
+ key: {
+ up: 38,
+ down: 40,
+ left: 37,
+ right: 39,
+ a: 90,
+ b: 88,
+ c: 67,
+ menu: 49,
+ quit: 50
+ }
+ },
+ system: {
+ gameFlowType: {
+ menu: 0,
+ run: 1,
+ stop: 2,
+ over: 3,
+ zone: 4,
+ active: 5,
+ loadImage: 6,
+ loadedImage: 7
+ }
+ }
+ },
+ i = {
+ getCanvasDom: function() {
+ var e;
+ return function() {
+ return e || (e = m.getDom(n.canvas.defaultId)),
+ e
+ }
+ } (),
+ getOffsetX: function(e) {
+ return e.offsetX || (e.changedTouches && e.changedTouches[0] ? e.changedTouches[0].clientX - i.getCanvasDom().offsetLeft: e.clientX - i.getCanvasDom().offsetLeft) || 0
+ },
+ getOffsetY: function(e) {
+ return e.offsetY || (e.changedTouches && e.changedTouches[0] ? e.changedTouches[0].clientY - i.getCanvasDom().offsetTop: e.clientY - i.getCanvasDom().offsetTop) || 0
+ },
+ keydown: function(e) {
+ var t = i.checkKey(e.keyCode);
+ n.event.keyDownGo && n.event.keys[t] != undefined && (n.event.keys[t] = !0),
+ n.event.keyUpGo && n.event.lastKey[t] != undefined && (n.event.lastKey[t] = !1),
+ n.event.keyPressCtrl[t] && n.event.keyPressedGo && (n.event.pressedKey[t] != undefined && (n.event.pressedKey[t] = !0), n.event.keyPressCtrl[t] = !1),
+ n.event.keyDownCallBack != null && n.event.keyDownCallBack(e),
+ t = null
+ },
+ keyup: function(e) {
+ var t = i.checkKey(e.keyCode);
+ n.event.keyDownGo && n.event.keys[t] != undefined && (n.event.keys[t] = !1),
+ n.event.keyUpGo && n.event.lastKey[t] != undefined && (n.event.lastKey[t] = !0),
+ n.event.keyPressedGo && (n.event.pressedKey[t] != undefined && (n.event.pressedKey[t] = !1), n.event.keyPressCtrl[t] = !0),
+ n.event.keyUpCallBack != null && n.event.keyUpCallBack(e),
+ t = null
+ },
+ orientationchange: function(e) {
+ n.event.orientationChange != null && n.event.orientationChange(e)
+ },
+ swipeStart: function(e, t) {
+ n.event.swipeCallBack != null && (n.event.swipeDate = Date.now(), n.event.pageStarOffX = e, n.event.pageStarOffY = t)
+ },
+ swipeSuccess: function(e, t) {
+ if (n.event.swipeDate) {
+ if (Date.now() - n.event.swipeDate < n.event.swipeTimeout) if (Math.abs(e - n.event.pageStarOffX) >= n.event.swipeRange || Math.abs(t - n.event.pageStarOffY) >= n.event.swipeRange) return n.event.swipeCallBack(n.event.pageStarOffX, n.event.pageStarOffY, e, t),
+ !0;
+ n.event.swipeDate = null
+ }
+ return ! 1
+ },
+ touchstart: function(e) {
+ e.preventDefault(),
+ n.event.pageOffX = i.getOffsetX(e),
+ n.event.pageOffY = i.getOffsetY(e),
+ n.event.touchStart != null && n.event.touchStart(e, n.event.pageOffX, n.event.pageOffY);
+ if (i.buttonLayoutEventHandler(e.type, n.event.pageOffX, n.event.pageOffY)) return ! 1;
+ i.swipeStart(n.event.pageOffX, n.event.pageOffY)
+ },
+ touchend: function(e) {
+ e.preventDefault();
+ if (i.swipeSuccess(n.event.pageOffX, n.event.pageOffY)) return ! 1;
+ if (i.buttonLayoutEventHandler(e.type, n.event.pageOffX, n.event.pageOffY)) return ! 1;
+ n.event.touchEnd != null && n.event.touchEnd(e, n.event.pageOffX, n.event.pageOffY)
+ },
+ touchmove: function(e) {
+ e.preventDefault(),
+ n.event.pageOffX = i.getOffsetX(e),
+ n.event.pageOffY = i.getOffsetY(e),
+ n.event.touchMove != null && n.event.touchMove(e, n.event.pageOffX, n.event.pageOffY)
+ },
+ touchcancel: function(e) {
+ n.event.pageOffX = i.getOffsetX(e),
+ n.event.pageOffY = i.getOffsetY(e),
+ n.event.touchCancel != null && n.event.touchCancel(e, n.event.pageOffX, n.event.pageOffY)
+ },
+ click: function(e) {
+ n.event.clickCallBack != null && n.event.clickCallBack(e, i.getOffsetX(e), i.getOffsetY(e))
+ },
+ mouseDown: function(e) {
+ var t = i.getOffsetX(e),
+ r = i.getOffsetY(e);
+ if (i.buttonLayoutEventHandler(e.type, t, r)) return ! 1;
+ n.event.mouseDownCallBack != null && n.event.mouseDownCallBack(e, t, r),
+ i.swipeStart(t, r),
+ t = r = null
+ },
+ mouseUp: function(e) {
+ var t = i.getOffsetX(e),
+ r = i.getOffsetY(e);
+ if (i.buttonLayoutEventHandler(e.type, t, r)) return ! 1;
+ if (i.swipeSuccess(t, r)) return ! 1;
+ n.event.mouseUpCallBack != null && n.event.mouseUpCallBack(e, t, r),
+ t = r = null
+ },
+ mouseMove: function(e) {
+ n.event.mouseMoveCallBack != null && n.event.mouseMoveCallBack(e, i.getOffsetX(e), i.getOffsetY(e))
+ },
+ pageFocus: function(e) {
+ if (n.event.focused) return n.event.focused = !1,
+ !1;
+ n.event.pageFocusCallBack != null && n.event.pageFocusCallBack(e)
+ },
+ pageUnFocus: function(e) {
+ n.event.pageUnFocusCallBack != null && n.event.pageUnFocusCallBack(e)
+ },
+ checkKey: function(e) {
+ var t = "0";
+ for (var n in r.event.key) if (r.event.key[n] == e) {
+ t = n;
+ break
+ }
+ return t
+ },
+ getDeviceConfig: function() {
+ var e = navigator.userAgent.toLowerCase();
+ return e.indexOf("duopaosafari") != -1 ? {
+ device: "duopaoSafari",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("iphone") != -1 || e.indexOf("ipod") != -1 ? {
+ device: "iphone",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("ipad") != -1 ? {
+ device: "ipad",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("duopaoandroid") != -1 ? {
+ device: "duopaoAndroid",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("duopaowindowsphone") != -1 ? {
+ device: "duopaoWindowsPhone",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("opera mobi") != -1 ? {
+ device: "operamobile",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("flyflow") != -1 ? {
+ device: "flyflow",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("android") != -1 ? {
+ device: "android",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("iemobile") != -1 ? {
+ device: "iemobile",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("j2me") != -1 ? {
+ device: "j2me",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("symbian v5") != -1 ? {
+ device: "symbian5",
+ fps: 1,
+ touch: !0,
+ zoom: 1
+ }: e.indexOf("symbian v3") != -1 ? {
+ device: "symbian3",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("chrome") != -1 ? {
+ device: "chrome",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("firefox") != -1 ? {
+ device: "firefox",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("msie") != -1 ? {
+ device: "ie",
+ fps: .5,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("windows") != -1 ? {
+ device: "ie",
+ fps: .5,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("safari") != -1 ? {
+ device: "safari",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: e.indexOf("opera") != -1 ? {
+ device: "opera",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }: {
+ device: "",
+ fps: 1,
+ touch: !1,
+ zoom: 1
+ }
+ },
+ setImage: function(e, t, r, i, s) {
+ if (!e || !t) return ! 1;
+ n.image.imgs[e] || (n.image.imgs[e] = new Image, n.image.imgs[e].onload = function() {
+ n.image.countLoaded++,
+ this.loaded = !0,
+ this.cache && m.canvas.pass(this.id, this.width, this.height).drawImage(this.id, 0, 0).pass().base().delImage(this.id, !0)
+ },
+ n.image.imgs[e].src = t + (n.image.version != "" ? "?v=" + n.image.version: ""), n.image.imgs[e].id = e, n.image.imgs[e].url = t, n.image.imgs[e].benchId = r, n.image.imgs[e].bench = i, n.image.imgs[e].cache = s, n.image.imgs[e].refreshed = !1)
+ },
+ setAudio: function(e, t, r, i, s, o) {
+ if (!e || !t) return ! 1;
+ if (!n.audio.audios[e]) {
+ var u = new Audio(t + (n.image.version != "" ? "?v=" + n.image.version: ""));
+ u.id = e,
+ u.autoplay = i,
+ u.preload = s,
+ u.autobuffer = o,
+ u.loop = r,
+ n.audio.audios[u.id] = u,
+ u = null
+ }
+ },
+ loadingCallBack: function(e, t, r) {
+ var i = m.canvas.screen.getWidth(),
+ s = m.canvas.screen.getHeight(),
+ o = i,
+ u = 5,
+ a = parseInt(i - o >> 1),
+ f = s - u,
+ e = e > t ? t: e,
+ l = parseInt(e / t * 100) + "%";
+ m.canvas.fillStyle(n.canvas.bgColor).fillRect(0, 0, i, s).fillStyle("#00FFFF").fillRect(a, f, parseInt(e / t * o), u).fillStyle("#FFF").fillText("loading " + r, 5, s - 10).fillText(l, i - m.canvas.measureText(l).width - 5, s - 10),
+ i = s = o = u = a = f = l = null
+ },
+ loadingEndCallBack: null,
+ getAnchor: function(e, t, n, i, s) {
+ var o = e,
+ u = t;
+ switch (s) {
+ case r.canvas.graphics.ANCHOR_HV:
+ o -= parseInt(n / 2),
+ u -= parseInt(i / 2);
+ break;
+ case r.canvas.graphics.ANCHOR_LV:
+ u -= parseInt(i / 2);
+ break;
+ case r.canvas.graphics.ANCHOR_RV:
+ o -= n,
+ u -= parseInt(i / 2);
+ break;
+ case r.canvas.graphics.ANCHOR_HT:
+ o -= parseInt(n / 2);
+ break;
+ case 0:
+ case r.canvas.graphics.ANCHOR_LT:
+ default:
+ break;
+ case r.canvas.graphics.ANCHOR_RT:
+ o -= n;
+ break;
+ case r.canvas.graphics.ANCHOR_HB:
+ o -= parseInt(n / 2),
+ u -= i;
+ break;
+ case r.canvas.graphics.ANCHOR_LB:
+ u -= i;
+ break;
+ case r.canvas.graphics.ANCHOR_RB:
+ o -= n,
+ u -= i
+ }
+ return {
+ x: o,
+ y: u
+ }
+ },
+ initUrlParams: function(e) {
+ if (e.indexOf("?") >= 0) {
+ var t = e.split("?"),
+ r = [];
+ t[1].indexOf("&") >= 0 ? r = t[1].split("&") : r.push(t[1]);
+ var i = [];
+ for (var s = 0; s < r.length; s++) r[s].indexOf("=") >= 0 && (i = r[s].split("="), n.request.gets[i[0]] = i[1]);
+ i = null,
+ r = null,
+ t = null
+ }
+ },
+ audioEnded: function() {
+ m.audio.replay(this.id)
+ },
+ pageLoaded: function() {
+ n.image.inited = !0,
+ n.system.pageLoad(m)
+ },
+ buttonLayoutAction: function() {
+ var e = n.buttonLayout.buttons,
+ t;
+ for (var r = e.length - 1; r >= 0; r--) if (t = e[r]) t.action().render(),
+ t.goned && t.endPath() && e.splice(r, 1);
+ e = t = null
+ },
+ buttonLayoutEventHandler: function(e, t, r) {
+ var i = n.buttonLayout.buttons,
+ s, o = !1;
+ for (var u = i.length - 1; u >= 0; u--) if (s = i[u]) if (m.comm.collision(s.x, s.y, s.width, s.height, t - 5, r - 5, 10, 10)) {
+ switch (e) {
+ case "mousedown":
+ case "touchstart":
+ s.hovered = !0,
+ s.repeated = !0,
+ s.pressed = !0,
+ s.released = !1;
+ break;
+ case "mouseup":
+ case "touchend":
+ s.hovered && (s.released = !0, s.hovered = !1),
+ s.repeated = !1,
+ s.pressed = !1;
+ break;
+ default:
+ }
+ o = !0
+ } else if (e == "mouseup" || e == "touchend") s.hovered = !1,
+ s.repeated = !1;
+ return i = s = null,
+ o
+ }
+ },
+ s,
+ o,
+ u,
+ a,
+ f,
+ l,
+ c,
+ h,
+ p,
+ d,
+ v = {
+ arr: [],
+ len: 0,
+ v: 0
+ };
+ link = {
+ init: function(e, t) {
+ return ! e && !t ? (this.version = 1, this.request.init(), this.canvas.initDevice(),
+ this.localStorage.init(), this.sessionStorage.init()) :
+ (n.canvas.defaultWidth = e, n.canvas.defaultHeight = t), this},
+ extend: t,
+ setAjax: function(e) {
+ return n.ajax.param = this.objExtend(n.ajax.param, e || {}), this},
+ ajax: function(e) {
+ e && n.ajax.pool.length < n.ajax.poolLength && n.ajax.pool.push(e),
+ e && e.clear && (n.ajax.pool = []),
+ n.ajax.xhr || (n.ajax.xhr = new XMLHttpRequest, n.ajax.xhr.onreadystatechange = function() {
+ if (n.ajax.isTimeout) return ! 1;
+ var e = n.ajax.xhr,
+ t = n.ajax.xhrObj;
+ if (t && e.readyState == 4) {
+ n.ajax.date && (clearTimeout(n.ajax.date), n.ajax.date = null);
+ if (e.status == 200) {
+ var r;
+ switch (t.dataType) {
+ case "HTML":
+ case "SCRIPT":
+ case "XML":
+ r = e.responseText;
+ break;
+ case "TEXT":
+ default:
+ r = e.responseText.replace(/<[^>].*?>/g, "");
+ break;
+ case "JSON":
+ r = m.getJson(e.responseText)
+ }
+ t.success(r, t),
+ t.complete(t)
+ } else t.error(t, "error");
+ n.ajax.xhrObj = null,
+ m.ajax()
+ }
+ e = t = null
+ });
+ if (n.ajax.xhrObj == null && n.ajax.pool.length > 0) {
+ n.ajax.xhrObj = this.objExtend(n.ajax.param, n.ajax.pool.shift() || {});
+ var t = n.ajax.xhr,
+ r = n.ajax.xhrObj,
+ i = n.ajax.xhrObj.url,
+ s = null,
+ o = r.data;
+ r.type = r.type.toUpperCase(),
+ r.dataType = r.dataType.toUpperCase(),
+ n.ajax.isTimeout = !1;
+ if (typeof o == "string") s = o;
+ else if (typeof o == "object") {
+ s = [];
+ for (var u in o) s.push(u + "=" + o[u]);
+ s = s.join("&")
+ }
+ r.type == "GET" && (i += "?" + s),
+ t.open(r.type, i, !0),
+ r.before(n.ajax.xhrObj),
+ r.type == "POST" && t.setRequestHeader("Content-Type", "application/x-www-form-urlencoded;charset=UTF-8"),
+ t.send(s),
+ t = r = s = o = i = null,
+ n.ajax.date = setTimeout(function() {
+ m.ajax({
+ clear: !0
+ }),
+ n.ajax.isTimeout = !0,
+ n.ajax.xhrObj && (n.ajax.xhrObj.error(n.ajax.xhrObj, "timeout"), n.ajax.xhrObj = null)
+ },
+ n.ajax.xhrObj.timeout)
+ }
+ return this
+ },
+ getDom: function(e) {
+ try {
+ return document.getElementById(e)
+ } catch(t) {
+ return document.all[e]
+ }
+ },
+ objExtend: function() {
+ var e = this.clone(arguments[0]) || {},
+ t = 1,
+ n = arguments.length,
+ r = !1,
+ i;
+ typeof e == "boolean" && (r = e, e = arguments[1] || {},
+ t = 2),
+ typeof e != "object" && (e = {}),
+ n == t && (e = this, --t);
+ if (!arguments[1]) return e;
+ for (; t < n; t++) if ((i = arguments[t]) != null) for (var s in i) {
+ var o = e[s],
+ u = i[s];
+ if (e === u) continue;
+ r && u && typeof u == "object" && !u.nodeType ? e[s] = this.objExtend(r, o ||
+ (u.length != null ? [] : {}), u) : u !== undefined && (e[s] = u)
+ }
+ return e
+ },
+ getJson: function(t) {
+ var n = {};
+ try {
+ window.JSON ? n = JSON.parse(t) : n = e("(" + t + ")")
+ } catch(r) {}
+ return n
+ },
+ clone: function() {
+ var e = arguments[0],
+ t = e || [];
+ if (typeof t == "object") if (t.length != undefined) {
+ e = [];
+ for (var n = 0, r = t.length; n < r; n++) {
+ if (t[n] === undefined) continue;
+ t[n] != null && typeof t[n] == "object" ? t[n].length != undefined ?
+ e[n] = t[n].slice(0) : e[n] = t[n] : e[n] = t[n]
+ }
+ } else {
+ e = {};
+ for (var n in t) {
+ if (t[n] === undefined) continue;
+ t[n] != null && typeof t[n] == "object" ? t[n].length != undefined ?
+ e[n] = t[n].slice(0) : e[n] = t[n] : e[n] = t[n]
+ }
+ }
+ return t = null,
+ e
+ },
+ classes: {},
+ comm: {
+ registerNotify: function(e, t) {
+ e != null && e.register(t)
+ },
+ unRegisterNotify: function(e, t) {
+ e != null && e.unregister(t)
+ },
+ getRandom: function(e, t) {
+ if (!t) {
+ var n = e;
+ if (!n || n < 0) n = 0;
+ return Math.round(Math.random() * n)
+ }
+ return Math.round(Math.random() * (t - e) + e)
+ },
+ inArray: function(e, t) {
+ var n, r = t.length;
+ for (n = 0; n < r; n++) if (e == t[n]) return n;
+ return - 1
+ },
+ collision: function(e, t, n, r, i, s, o, u) {
+ return o && Math.abs(e + (n >> 1) - (i + (o >> 1))) < n + o >> 1 &&
+ Math.abs(t + (r >> 1) - (s + (u >> 1))) < r + u >> 1 ? !0 : !1
+ },
+ circleCollision: function(e, t, n, r, i, s) {
+ var o = Math.abs(e - r),
+ u = Math.abs(t - i);
+ return Math.sqrt(o * o + u * u) < n + s ? !0 : !1
+ },
+ rect2CircleCollision: function(e, t, n, r, i, s, o) {
+ var u = !1;
+ return (u = this.circleCollision(e, t, 1, i, s, o)) ||
+ (u = this.circleCollision(e + n, t, 1, i, s, o)) ||
+ (u = this.circleCollision(e + n, t + r, 1, i, s, o)) ||
+ (u = this.circleCollision(e, t + r, 1, i, s, o)) ||
+ (u = this.collision(e, t, n, r, i - (o >> 1), s - (o >> 1), o, o)),
+ u
+ },
+ polygonCollision: function(e, t, n, r, i, s, o, u) {
+ return this.polygonSAT(e, t, n, r, i, s, o, u) && this.polygonSAT(t, e, i, s, n, r, u, o)
+ },
+ setMatrixRotate: function(e, t) {
+ if (!e || !e[0]) return null;
+ var n = 50,
+ r = 50,
+ i, s, o = Math.PI / 180 * t,
+ u = Math.sin(o),
+ a = Math.cos(o);
+ for (var f = 0; f < e.length; f++) i = e[f][0],
+ s = e[f][1],
+ e[f][0] = a * i - u * s,
+ e[f][1] = u * i + a * s;
+ return this
+ },
+ createPath: function(e, t, n, r, i) {
+ var s = [],
+ o = e || 0,
+ u = t || 0,
+ a = n || 0,
+ f = r || 0,
+ l = a - o,
+ c = f - u,
+ h = Math.sqrt(Math.pow(l, 2) + Math.pow(c, 2)),
+ p = i || 5,
+ d = p,
+ v = 0,
+ m = 0,
+ g,
+ y,
+ b = Math.atan2(c, l) / Math.PI * 180;
+ b = b >= 0 ? b: b + 360,
+ d >= h && (d = h >> 1);
+ while (d < h + p) d = d > h ? h: d,
+ g = d * Math.cos(b / 180 * Math.PI),
+ y = d * Math.sin(b / 180 * Math.PI),
+ s.unshift([g - v, y - m]),
+ v = g,
+ m = y,
+ d += p;
+ return s.angle = b + 90,
+ o = u = a = f = l = c = h = p = d = b = null,
+ s
+ }
+ },
+ localStorage: function() {
+ var e, t, n = function() {
+ var e;
+ try {
+ e = window.localStorage,
+ e.getItem || (e.getItem = function() {
+ return null
+ }),
+ e.setItem || (e.setItem = function() {})
+ } catch(t) {
+ e = {
+ getItem: function() {
+ return null
+ },
+ setItem: function() {}
+ }
+ }
+ return e
+ };
+ return {
+ init: function() {
+ return e = this,
+ t || (t = n()),
+ e
+ },
+ setItem: function(n, r) {
+ try {
+ t.setItem(n, r)
+ } catch(i) {}
+ return e
+ },
+ getItem: function(e) {
+ return t.getItem(e)
+ },
+ removeItem: function(n) {
+ return t.removeItem(n),
+ e
+ },
+ clear: function() {
+ return t.clear(),
+ e
+ },
+ key: function(e) {
+ return t.key(e)
+ },
+ getLength: function() {
+ return t.length
+ },
+ base: function() {
+ return m
+ }
+ }
+ } (),
+ sessionStorage: function() {
+ var e, t, n = function() {
+ var e;
+ try {
+ e = window.sessionStorage,
+ e.getItem || (e.getItem = function() {
+ return null
+ }),
+ e.setItem || (e.setItem = function() {})
+ } catch(t) {
+ e = {
+ getItem: function() {
+ return null
+ },
+ setItem: function() {}
+ }
+ }
+ return e
+ };
+ return {
+ init: function() {
+ return e = this,
+ t || (t = n()),
+ e
+ },
+ setItem: function(n, r) {
+ return t.setItem(n, r),
+ e
+ },
+ getItem: function(e) {
+ return t.getItem(e)
+ },
+ removeItem: function(n) {
+ return t.removeItem(n),
+ e
+ },
+ clear: function() {
+ return t.clear(),
+ e
+ },
+ key: function(e) {
+ return t.key(e)
+ },
+ getLength: function() {
+ return t.length
+ },
+ base: function() {
+ return m
+ }
+ }
+ } (),
+ pageLoad: function(e) {
+ return n.system.pageLoad == null && (n.system.pageLoad = e, window.addEventListener("load",
+ function() {
+ m.main(n.system.pageLoad)
+ },
+ !1)),
+ m
+ },
+ main: function(e) {
+ n.system.pageLoad == null && (n.system.pageLoad = e),
+ this.canvas.init(),
+ this.graphics.ANCHOR_LT = r.canvas.graphics.ANCHOR_LT,
+ this.graphics.ANCHOR_LV = r.canvas.graphics.ANCHOR_LV,
+ this.graphics.ANCHOR_LB = r.canvas.graphics.ANCHOR_LB,
+ this.graphics.ANCHOR_HT = r.canvas.graphics.ANCHOR_HT,
+ this.graphics.ANCHOR_HV = r.canvas.graphics.ANCHOR_HV,
+ this.graphics.ANCHOR_HB = r.canvas.graphics.ANCHOR_HB,
+ this.graphics.ANCHOR_RT = r.canvas.graphics.ANCHOR_RT,
+ this.graphics.ANCHOR_RV = r.canvas.graphics.ANCHOR_RV,
+ this.graphics.ANCHOR_RB = r.canvas.graphics.ANCHOR_RB;
+ var t = this.getDom(n.canvas.defaultId);
+ t && (this.canvas.screen.getTouch() ?
+ (window.addEventListener("orientationchange", i.orientationchange, !1),
+ t.addEventListener("touchstart", i.touchstart, !1),
+ t.addEventListener("touchend", i.touchend, !1),
+ t.addEventListener("touchmove", i.touchmove, !1),
+ t.addEventListener("touchcancel", i.touchcancel, !1)) :
+ (document.onkeydown = i.keydown, document.onkeyup = i.keyup,
+ t.addEventListener("click", i.click, !1),
+ t.addEventListener("mousedown", i.mouseDown, !1),
+ t.addEventListener("mouseup", i.mouseUp, !1),
+ t.addEventListener("mousemove", i.mouseMove, !1))),
+ t = null;
+ var s = this.canvas.screen.getDevice();
+ return s == "ipad" || s == "iphone" ? (n.event.focused = !0,
+ window.addEventListener("pageshow", i.pageFocus, !1),
+ window.addEventListener("pagehide", i.pageUnFocus, !1)) :
+ (s == "firefox" && (n.event.focused = !0),
+ window.addEventListener("focus", i.pageFocus, !1),
+ window.addEventListener("blur", i.pageUnFocus, !1)),
+ this.canvas.fillStyle(n.canvas.bgColor).fillRect(0, 0, this.canvas.screen.getWidth(), this.canvas.screen.getHeight()),
+ n.image.inited = !1,
+ this.gameFlow.run().base().play(),
+ n.image.imgObjs.length > 0 ? this.loadImage(n.image.imgObjs) : i.pageLoaded(),
+ this
+ },
+ menu: function(e) {
+ return typeof e == "function" && (n.system.menu = e), this
+ },
+ run: function(e) {
+ return typeof e == "function" && (n.system.runFn = e), this
+ },
+ stop: function(e) {
+ return typeof e == "function" && (n.system.stop = e), this
+ },
+ over: function(e) {
+ return typeof e == "function" && (n.system.over = e), this
+ },
+ zone: function(e) {
+ return typeof e == "function" && (n.system.zone = e), this
+ },
+ active: function(e) {
+ return typeof e == "function" && (n.system.active = e), this
+ },
+ play: function() {
+ return n.system.run || (n.system.run = function() {
+ var e = Date.now();
+ switch (n.system.gameFlow) {
+ case r.system.gameFlowType.menu:
+ n.system.menu();
+ break;
+ case r.system.gameFlowType.run:
+ n.system.runFn();
+ break;
+ case r.system.gameFlowType.stop:
+ n.system.stop();
+ break;
+ case r.system.gameFlowType.over:
+ n.system.over();
+ break;
+ case r.system.gameFlowType.zone:
+ n.system.zone(n.system.zoneArgs);
+ break;
+ case r.system.gameFlowType.active:
+ n.system.active(n.system.activeArgs);
+ break;
+ case r.system.gameFlowType.loadImage:
+ if (i.loadingCallBack != null) {
+ var t = n.image.imgCount,
+ s = n.image.countLoaded > t ? t: n.image.countLoaded;
+ s == t && (n.system.gameFlow = r.system.gameFlowType.loadedImage),
+ t > 0 && i.loadingCallBack(s, t, "image"),
+ s == t && i.loadingEndCallBack
+ && (i.loadingEndCallBack(s, t, "image"), i.loadingEndCallBack = null),
+ s = t = null
+ }
+ break;
+ case r.system.gameFlowType.loadedImage:
+ n.system.gameFlow = n.system.loadedImageToGameFlow,
+ n.image.imgObjs = [],
+ n.image.countLoaded = 0,
+ n.image.inited || i.pageLoaded();
+ break;
+ default:
+ }
+ i.buttonLayoutAction(),
+ n.system.spendTime = Date.now() - e,
+ e = null
+ }),
+ n.system.playTimer || (n.system.isPause = !1,
+ (n.system.rafRun = function() {
+ var e = Date.now();
+ e - n.system.lastDate >= n.system.timeout - n.system.spendTime &&
+ (n.system.lastDate = e, n.system.isPause || n.system.run()),
+ e = null,
+ n.system.rafRun && (n.system.playTimer = requestAnimationFrame(n.system.rafRun))
+ })()), this
+ },
+ pause: function() {
+ return n.system.playTimer && (n.system.isPause = !0,
+ n.system.rafRun = null, cancelAnimationFrame(n.system.playTimer),
+ n.system.playTimer = null), this
+ },
+ gameFlow: {
+ menu: function() {
+ return n.system.menu != null &&
+ (n.system.gameFlow = r.system.gameFlowType.menu, m.resetKeys()), this
+ },
+ run: function() {
+ return n.system.runFn != null &&
+ (n.system.gameFlow = r.system.gameFlowType.run, m.resetKeys()), this
+ },
+ stop: function() {
+ return n.system.stop != null && (n.system.gameFlow = r.system.gameFlowType.stop,
+ m.resetKeys()), this
+ },
+ over: function() {
+ return n.system.over != null &&
+ (n.system.gameFlow = r.system.gameFlowType.over, m.resetKeys()), this
+ },
+ zone: function(e) {
+ return n.system.zone != null &&
+ (n.system.gameFlow = r.system.gameFlowType.zone, n.system.zoneArgs = e, m.resetKeys()), this
+ },
+ active: function(e) {
+ return n.system.active != null &&
+ (n.system.gameFlow = r.system.gameFlowType.active, n.system.activeArgs = e,
+ m.resetKeys()), this
+ },
+ isIn: function(e) {
+ return n.system.gameFlow == r.system.gameFlowType[e]
+ },
+ base: function() {
+ return m
+ }
+ },
+ resetKeys: function() {
+ for (var e in n.event.keys) n.event.keys[e] = !1;
+ for (var e in n.event.lastKey) n.event.lastKey[e] = !1;
+ for (var e in n.event.pressedKey) n.event.pressedKey[e] = !1;
+ for (var e in n.event.keyPressCtrl) n.event.keyPressCtrl[e] = !0;
+ return this
+ },
+ canvas: {
+ init: function() {
+ return o = {
+ x: 0,
+ y: 0
+ },
+ u = {
+ fillColor: "#000000",
+ strokeColor: "#000000"
+ },
+ a = {
+ x: 0,
+ y: 0
+ },
+ f = {
+ x: 0,
+ y: 0
+ },
+ l = {
+ x: 0,
+ y: 0,
+ fillStyle: "#FFFFFF",
+ strokeStyle: "#CCCCCC"
+ },
+ this.pass()
+ },
+ initDevice: function() {
+ return h = i.getDeviceConfig(),
+ n.canvas.device = h.device,
+ n.canvas.fps = h.fps,
+ n.canvas.touch = h.touch,
+ n.canvas.zoom = h.zoom,
+ this
+ },
+ pass: function(e, t, r) {
+ var i, o;
+ return ! e || e == "" ? i = n.canvas.defaultId: i = e,
+ n.canvas.ctxs[i] || (o = this.base().getDom(i) ||
+ document.createElement("canvas"), n.canvas.ctxs[i] = null,
+ delete n.canvas.ctxs[i], n.canvas.ctxs[i] = o.getContext("2d"),
+ o.width = t ? t: n.canvas.defaultWidth,
+ o.style.width = parseInt(o.width * n.canvas.zoom) + "px",
+ o.height = r ? r: n.canvas.defaultHeight,
+ o.style.height = parseInt(o.height * n.canvas.zoom) + "px",
+ n.canvas.cavansDoms[i] = null, delete n.canvas.cavansDoms[i],
+ n.canvas.cavansDoms[i] = o),
+ s = n.canvas.ctxs[i],
+ s.font = n.canvas.defaultFont,
+ c = n.canvas.cavansDoms[i],
+ p = parseInt(c.width),
+ d = parseInt(c.height),
+ this.screen.setId(i), this
+ },
+ font: function(e) {
+ return n.canvas.defaultFont = e,
+ s.font = n.canvas.defaultFont, this
+ },
+ del: function(e) {
+ return n.canvas.ctxs[e] && (n.canvas.ctxs[e] = null, delete n.canvas.ctxs[e],
+ n.canvas.cavansDoms[e] = null, delete n.canvas.cavansDoms[e]), this
+ },
+ setCurrent: function(e) {
+ return _canvas.pass(e)
+ },
+ screen: {
+ setId: function(e) {
+ return n.canvas.ctxs[e] && (n.canvas.id = e),
+ this
+ },
+ getId: function() {
+ return n.canvas.id
+ },
+ getWidth: function() {
+ return p
+ },
+ setWidth: function(e) {
+ return n.canvas.defaultWidth = e, c &&
+ (c.width = n.canvas.defaultWidth, c.style.width = c.width + "px",
+ p = parseInt(c.width)), this
+ },
+ getHeight: function() {
+ return d
+ },
+ setHeight: function(e) {
+ return n.canvas.defaultHeight = e, c &&
+ (c.height = n.canvas.defaultHeight,
+ c.style.height = c.height + "px", d = parseInt(c.height)), this
+ },
+ getDevice: function() {
+ return n.canvas.device
+ },
+ getFps: function() {
+ return n.canvas.fps
+ },
+ setFps: function(e) {
+ return e > 0 && (n.canvas.fps = e), this
+ },
+ getTouch: function() {
+ return n.canvas.touch
+ },
+ getZoom: function() {
+ return n.canvas.zoom
+ }
+ },
+ fillStyle: function(e) {
+ return s.fillStyle = e, this
+ },
+ fillRect: function(e, t, n, r, o) {
+ return n = n ? n: 0,
+ r = r ? r: 0,
+ o ? f = i.getAnchor(e, t, n, r, o) : (f.x = e, f.y = t),
+ s.fillRect(f.x, f.y, n, r), this
+ },
+ fillText: function(e, t, r, i) {
+ return s.font = i || n.canvas.defaultFont,
+ s.fillText(e, t, r), this
+ },
+ clearRect: function(e, t, n, r) {
+ return s.clearRect(e, t, n, r), this
+ },
+ clearScreen: function() {
+ return this.clearRect(0, 0, p, d)
+ },
+ fillScreen: function() {
+ return this.fillRect(0, 0, p, d)
+ },
+ strokeStyle: function(e) {
+ return s.strokeStyle = e, this
+ },
+ lineWidth: function(e) {
+ return s.lineWidth = e || 1, this
+ },
+ strokeRect: function(e, t, n, r, o) {
+ return o ? a = i.getAnchor(e, t, n, r, o) : (a.x = e, a.y = t),
+ s.strokeRect(a.x, a.y, n, r), this
+ },
+ strokeText: function(e, t, r, i) {
+ return s.font = i || n.canvas.defaultFont,
+ s.strokeText(e, t, r), this
+ },
+ setColor: function(e, t, n) {
+ return n == null ? (u.fillColor = e, u.strokeColor = t ? t: e) :
+ (u.fillColor = "rgb(" + e + ", " + t + ", " + n + ")",
+ u.strokeColor = u.fillColor),
+ this.fillStyle(u.fillColor).strokeStyle(u.strokeColor)
+ },
+ drawImage: function(e, t, r, u, a, f, l, c, h, p) {
+ var d = m.getImage(e);
+ if (d.refreshed) this.drawCache(e, t, r, u, a, f, l, c, h, p);
+ else if (d.src != null) c != null &&
+ (t = t < 0 ? 0 : t, c = c <= 0 ? .1 : c),
+ h != null && (r = r < 0 ? 0 : r, h = h <= 0 ? .1 : h),
+ u != null && c != null && (u = u <= 0 ? .1 : t + u <= d.width ? u: d.width - t),
+ a != null && h != null && (a = a <= 0 ? .1 : r + a <= d.height ? a: d.height - r),
+ d.loaded && (u ? a ? p ? (o = i.getAnchor(f, l, c, h, p),
+ s.drawImage(d, t, r, u, a, o.x, o.y, c, h)) : s.drawImage(d, t, r, u, a, f, l, c, h) :
+ (o = i.getAnchor(t, r, d.width, d.height, u), s.drawImage(d, o.x, o.y)) :
+ s.drawImage(d, t, r));
+ else {
+ var v = n.image.asyncImgObjs[e];
+ v && !v.inited && (i.setImage(v.id, v.src, v.benchId, v.bench, v.cache), v.inited = !0),
+ v = null
+ }
+ return d = null, this
+ },
+ drawRotate: function(e, t, r, i, o, u, a, f, l, c) {
+ var h = parseInt(f >> 1),
+ p = parseInt(l >> 1),
+ d = m.getImage(e),
+ v = d.src ? d: n.canvas.cavansDoms[e];
+ return u -= h,
+ a -= p,
+ s.save(),
+ s.translate(u + h, a + p),
+ s.rotate(c * Math.PI / 180),
+ s.translate( - (u + h), -(a + p)),
+ s.drawImage(v, t, r, i, o, u, a, f, l),
+ s.restore(),
+ v = null,
+ d = null,
+ p = null,
+ h = null,
+ this
+ },
+ drawCache: function(e, t, r, u, a, f, l, c, h, p) {
+ var d = n.canvas.cavansDoms[e];
+ return d && (c != null && (t = t < 0 ? 0 : t, c = c <= 0 ? .1 : c), h != null &&
+ (r = r < 0 ? 0 : r, h = h <= 0 ? .1 : h), u != null && c != null &&
+ (u = u <= 0 ? .1 : t + u <= d.width ? u: d.width - t), a != null && h != null &&
+ (a = a <= 0 ? .1 : r + a <= d.height ? a: d.height - r),
+ u ? a ? p ? (o = i.getAnchor(f, l, c, h, p),
+ s.drawImage(d, t, r, u, a, o.x, o.y, c, h)) :
+ s.drawImage(d, t, r, u, a, f, l, c, h) :
+ (o = i.getAnchor(t, r, d.width, d.height, u),
+ s.drawImage(d, o.x, o.y)) : s.drawImage(d, t, r)),
+ d = null, this
+ },
+ drawRegion: function(e, t, n, i, o, u, a, f, l) {
+ switch (u) {
+ case r.canvas.trans.TRANS_NONE:
+ default:
+ s.transform(1, 0, 0, 1, a, f);
+ break;
+ case r.canvas.trans.TRANS_ROT90:
+ s.transform(0, 1, -1, 0, o + a, f);
+ break;
+ case r.canvas.trans.TRANS_ROT180:
+ s.transform( - 1, 0, 0, -1, i + a, o + f);
+ break;
+ case r.canvas.trans.TRANS_ROT270:
+ s.transform(0, -1, 1, 0, a, i + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR:
+ s.transform( - 1, 0, 0, 1, i + a, f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT90:
+ s.transform(0, -1, -1, 0, o + a, i + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT180:
+ s.transform(1, 0, 0, -1, a, o + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT270:
+ s.transform(0, 1, 1, 0, a, f)
+ }
+ var c = m.getImage(e),
+ h = c.cache ? this.drawCache: this.drawImage;
+ return h(e, t, n, i, o, 0, 0, i, o),
+ s.setTransform(1, 0, 0, 1, 0, 0),
+ h = null,
+ c = null,
+ this
+ },
+ drawRegionAndZoom: function(e, t, n, i, o, u, a, f, l, c, h) {
+ switch (u) {
+ case r.canvas.trans.TRANS_NONE:
+ default:
+ s.transform(1, 0, 0, 1, a, f);
+ break;
+ case r.canvas.trans.TRANS_ROT90:
+ s.transform(0, 1, -1, 0, h + a, f);
+ break;
+ case r.canvas.trans.TRANS_ROT180:
+ s.transform( - 1, 0, 0, -1, c + a, h + f);
+ break;
+ case r.canvas.trans.TRANS_ROT270:
+ s.transform(0, -1, 1, 0, a, c + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR:
+ s.transform( - 1, 0, 0, 1, c + a, f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT90:
+ s.transform(0, -1, -1, 0, h + a, c + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT180:
+ s.transform(1, 0, 0, -1, a, h + f);
+ break;
+ case r.canvas.trans.TRANS_MIRROR_ROT270:
+ s.transform(0, 1, 1, 0, a, f)
+ }
+ var p = m.getImage(e),
+ d = p.cache ? this.drawCache: this.drawImage;
+ return d(e, t, n, i, o, 0, 0, c, h),
+ s.setTransform(1, 0, 0, 1, 0, 0),
+ d = null,
+ p = null,
+ this
+ },
+ drawNumber: function(e, t, n, r, i, s, o, u, a) {
+ var f = e.toString(),
+ l = f.length,
+ c = u ? u: n,
+ h = a ? a: r;
+ if (o == "center") {
+ var d = i + parseInt(p - c * l >> 1);
+ for (var v = 0; v < l; v++)
+ this.drawImage(t, parseInt(f.charAt(v)) * n, 0, n, r, d + v * c, s, c, h);
+ d = null
+ } else if (o == 1)
+ for (var v = 0; v < l; v++)
+ this.drawImage(t, parseInt(f.charAt(v)) * n, 0, n, r, i + v * c, s, c, h);
+ else if (o == 0) for (var v = l - 1; v >= 0; v--)
+ this.drawImage(t, parseInt(f.charAt(v)) * n, 0, n, r, i - (l - 1 - v) * c,
+ s, c, h, m.graphics.ANCHOR_RT);
+ return h = null,
+ c = null,
+ l = null,
+ f = null,
+ this
+ },
+ moveTo: function(e, t) {
+ return s.moveTo(e, t), this
+ },
+ lineTo: function(e, t) {
+ return s.lineTo(e, t), this
+ },
+ stroke: function() {
+ return s.stroke(), this
+ },
+ fill: function() {
+ return s.fill(), this
+ },
+ beginPath: function() {
+ return s.beginPath(), this
+ },
+ closePath: function() {
+ return s.closePath(), this
+ },
+ arc: function(e, t, n, r, i, o) {
+ return s.arc(e, t, n, r, i, o), this
+ },
+ quadraticCurveTo: function(e, t, n, r) {
+ return s.quadraticCurveTo(e, t, n, r), this
+ },
+ bezierCurveTo: function(e, t, n, r, i, o) {
+ return s.bezierCurveTo(e, t, n, r, i, o), this
+ },
+ measureText: function(e) {
+ var t = s.measureText(e),
+ n = t.width,
+ r = t.height ? t.height: parseInt(s.font);
+ return {
+ width: this.screen.getDevice() == "j2me" ? s.measureText(e) : n,
+ height: r
+ }
+ },
+ translate: function(e, t) {
+ return s.translate(e, t), this
+ },
+ drawLine: function(e, t, n, r) {
+ return this.beginPath().moveTo(e, t).lineTo(n, r).closePath().stroke()
+ },
+ drawRect: function(e, t, n, r, i) {
+ return this.strokeRect(e, t, n, r, i)
+ },
+ drawString: function(e, t, i, o, u, a, f, c) {
+ l.x = t,
+ l.y = i,
+ s.font = c || n.canvas.defaultFont;
+ if (o) switch (o) {
+ case r.canvas.graphics.LEFT:
+ l.x = 0;
+ break;
+ case r.canvas.graphics.VCENTER:
+ l.x = parseInt(this.screen.getWidth() - this.measureText(e).width >> 1);
+ break;
+ case r.canvas.graphics.RIGHT:
+ l.x = this.screen.getWidth() - this.measureText(e).width;
+ break;
+ default:
+ }
+ return u && (a ? l.fillStyle = a: l.fillStyle = "#000000", f ?
+ l.strokeStyle = f: l.strokeStyle = "#CCCCCC",
+ this.fillStyle(l.strokeStyle).fillText(e, l.x + 1, l.y + 1, c).fillStyle(l.fillStyle)),
+ this.fillText(e, l.x, l.y, c).fillStyle(n.canvas.defaultColor)
+ },
+ drawSubstring: function(e, t, n, r, i, s, o, u, a, f) {
+ return this.drawString(e.substring(t, t + n), r, i, s, o, u, a, f)
+ },
+ clip: function() {
+ return s.clip(), this
+ },
+ save: function() {
+ return s.save(), this
+ },
+ restore: function() {
+ return s.restore(), this
+ },
+ rect: function(e, t, n, r) {
+ return s.rect(e, t, n, r), this
+ },
+ rotate: function(e) {
+ return s.rotate(e), this
+ },
+ setTransform: function(e, t, n, r, i, o) {
+ return s.setTransform(e, t, n, r, i, o), this
+ },
+ scale: function(e, t) {
+ return s.scale(e, t), this
+ },
+ globalAlpha: function(e) {
+ return s.globalAlpha = e, this
+ },
+ getContext: function() {
+ return s
+ },
+ base: function() {
+ return m
+ }
+ },
+ pushImage: function(e, t) {
+ if (n.image.inited) return this;
+ var r;
+ for (var i = 0, s = e.length; i < s; i++) r = e[i], r &&
+ !n.image.initImgs[r.id] && (n.image.initImgs[r.id] = !0, n.image.imgObjs.push(e[i]));
+ return this.loadingEndCallBack(t),
+ r = null, this
+ },
+ loadImage: function(e, t) {
+ if (n.system.gameFlow != r.system.gameFlowType.loadImage && e.length > 0) {
+ n.system.loadedImageToGameFlow = n.system.gameFlow,
+ n.system.gameFlow = r.system.gameFlowType.loadImage,
+ n.image.imgObjs = e,
+ n.image.imgCount = n.image.imgObjs.length,
+ n.image.countLoaded = 0;
+ for (var s = 0, o; o = n.image.imgObjs[s]; s++)
+ n.image.imgs[o.id] ? n.image.countLoaded++:i.setImage(o.id, o.src, o.benchId);
+ this.loadingEndCallBack(t)
+ }
+ return this
+ },
+ asyncImage: function(e) {
+ var t;
+ for (var r = 0, i = e.length; r < i; r++) t = e[r] || {},
+ n.image.asyncImgObjs[t.id] || (n.image.asyncImgObjs[t.id] = t);
+ return t = null, this
+ },
+ loadingCallBack: function(e) {
+ return typeof e == "function" && (i.loadingCallBack = e), this
+ },
+ loadingEndCallBack: function(e) {
+ return typeof e == "function" && (i.loadingEndCallBack = e), this
+ },
+ getImage: function(e) {
+ return n.image.imgs[e] ? n.image.imgs[e] : {
+ src: null
+ }
+ },
+ delImage: function(e, t) {
+ return n.image.imgs[e] && (n.image.imgs[e] = null, delete n.image.imgs[e],
+ t && (n.image.imgs[e] = {
+ id: e,
+ loaded: !0,
+ cache: !0,
+ refreshed: !0
+ })), this
+ },
+ audio: {
+ play: function(e) {
+ var t = n.audio.audios[e];
+ if (t) try {
+ t.currentTime >= t.duration ? this.replay(e) : t.paused && t.play()
+ } catch(r) {}
+ return t = null, this
+ },
+ playRange: function(e, t, r) {
+ var i = n.audio.audios[e];
+ if (i) try {
+ i.__timeupdateCallBack__ ||
+ i.addEventListener("timeupdate", i.__timeupdateCallBack__ = function() {
+ this.currentTime >= this.__to__ && (this.loop ?
+ this.currentTime = this.__from__: this.pause())
+ },
+ !1),
+ i.__from__ = t == null ? 0 : t,
+ i.__to__ = r == null ? i.duration: r,
+ this.setCurrentTime(i.id, i.__from__).play(i.id)
+ } catch(s) {}
+ return i = null, this
+ },
+ pause: function(e) {
+ if (n.audio.audios[e]) try {
+ n.audio.audios[e].pause()
+ } catch(t) {}
+ return this
+ },
+ pauseAll: function() {
+ for (var e in n.audio.audios) this.pause(e);
+ return this
+ },
+ mute: function(e, t) {
+ if (n.audio.audios[e]) try {
+ n.audio.audios[e].muted = t
+ } catch(r) {}
+ },
+ vol: function(e, t) {
+ if (n.audio.audios[e]) try {
+ n.audio.audios[e].volume = t
+ } catch(r) {}
+ return this
+ },
+ loop: function(e, t) {
+ if (n.audio.audios[e]) try {
+ n.audio.audios[e].loop = t
+ } catch(r) {}
+ return this
+ },
+ replay: function(e) {
+ return this.setCurrentTime(e, 0).play(e),
+ this
+ },
+ setCurrentTime: function(e, t) {
+ var r = n.audio.audios[e];
+ if (r) try {
+ t < 0 ? t = 0 : t > r.duration && (t = r.duration),
+ r.currentTime = t || 0
+ } catch(i) {}
+ return r = null,
+ this
+ },
+ getAudio: function(e) {
+ return n.audio.audios[e]
+ },
+ del: function(e) {
+ var t = n.audio.audios[e];
+ return t && t.__timeupdateCallBack__ && (t.pause(), t.removeEventListener("timeupdate", t.__timeupdateCallBack__, !1), n.audio.audios[e] = null, delete n.audio.audios[e]),
+ t = null,
+ this
+ },
+ base: function() {
+ return m
+ }
+ },
+ initAudio: function(e) {
+ if (!window.Audio) return this;
+ if (e.length > 0) {
+ n.audio.audios = {};
+ var t, r, s, o, u;
+ for (var a = 0; a < e.length; a++) t = e[a],
+ t && i.setAudio(t.id, t.src, t.loop, t.autoplay, t.preload, t.autobuffer);
+ t = r = s = o = u = null
+ }
+ return this
+ },
+ events: {
+ keyDown: function(e) {
+ return n.event.keyDownGo || (n.event.keyDownGo = !0),
+ n.event.keyUpGo || (n.event.keyUpGo = !0),
+ n.event.keyPressedGo || (n.event.keyPressedGo = !0),
+ n.event.keyDownCallBack = e,
+ this
+ },
+ keyUp: function(e) {
+ return n.event.keyDownGo || (n.event.keyDownGo = !0),
+ n.event.keyUpGo || (n.event.keyUpGo = !0),
+ n.event.keyPressedGo || (n.event.keyPressedGo = !0),
+ n.event.keyUpCallBack = e,
+ this
+ },
+ orientationChange: function(e) {
+ return n.event.orientationChange = e,
+ this
+ },
+ touchStart: function(e) {
+ return n.event.touchStart = e,
+ this
+ },
+ touchEnd: function(e) {
+ return n.event.touchEnd = e,
+ this
+ },
+ touchMove: function(e) {
+ return n.event.touchMove = e,
+ this
+ },
+ touchCancel: function(e) {
+ return n.event.touchCancel = e,
+ this
+ },
+ click: function(e) {
+ return n.event.clickCallBack = e,
+ this
+ },
+ mouseDown: function(e) {
+ return n.event.mouseDownCallBack = e,
+ this
+ },
+ mouseUp: function(e) {
+ return n.event.mouseUpCallBack = e,
+ this
+ },
+ mouseMove: function(e) {
+ return n.event.mouseMoveCallBack = e,
+ this
+ },
+ createEvent: function(e, t) {
+ var n = document.getElementById(e);
+ if (n) {
+ var r = document.createEvent("HTMLEvents");
+ r.initEvent(t, !1, !0),
+ n.dispatchEvent(r),
+ r = null
+ }
+ n = null
+ },
+ pageFocus: function(e) {
+ return n.event.pageFocusCallBack = e,
+ this
+ },
+ pageUnFocus: function(e) {
+ return n.event.pageUnFocusCallBack = e,
+ this
+ },
+ swipe: function(e, t, r) {
+ n.event.swipeCallBack = e,
+ t != null && (n.event.swipeTimeout = t),
+ r != null && (n.event.swipeRange = r)
+ },
+ base: function() {
+ return m
+ }
+ },
+ ui: {},
+ graphics: {
+ HCENTER: r.canvas.graphics.HCENTER,
+ VCENTER: r.canvas.graphics.VCENTER,
+ LEFT: r.canvas.graphics.LEFT,
+ RIGHT: r.canvas.graphics.RIGHT,
+ TOP: r.canvas.graphics.TOP,
+ BOTTOM: r.canvas.graphics.BOTTOM
+ },
+ trans: {
+ TRANS_NONE: r.canvas.trans.TRANS_NONE,
+ TRANS_ROT90: r.canvas.trans.TRANS_ROT90,
+ TRANS_ROT180: r.canvas.trans.TRANS_ROT180,
+ TRANS_ROT270: r.canvas.trans.TRANS_ROT270,
+ TRANS_MIRROR: r.canvas.trans.TRANS_MIRROR,
+ TRANS_MIRROR_ROT90: r.canvas.trans.TRANS_MIRROR_ROT90,
+ TRANS_MIRROR_ROT180: r.canvas.trans.TRANS_MIRROR_ROT180,
+ TRANS_MIRROR_ROT270: r.canvas.trans.TRANS_MIRROR_ROT270
+ },
+ request: {
+ init: function() {
+ i.initUrlParams(location.href)
+ },
+ get: function(e) {
+ return n.request.gets[e] ? n.request.gets[e] : ""
+ }
+ },
+ buttonLayout: {
+ create: function(e) {
+ var t = this.base().objExtend({
+ id: "",
+ value: "",
+ x: 0,
+ y: 0,
+ width: 60,
+ height: 30,
+ bgColor: "#000",
+ bgStroke: "#FFF",
+ stroke: "#000",
+ font: "12px Arial",
+ imageId: "",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 0,
+ hy: 0,
+ hColor: "#0FF",
+ dex: 0,
+ dey: 0,
+ deColor: "#CCC",
+ hided: !1,
+ disabled: !1,
+ path: []
+ },
+ e || {});
+ return this.get(t.id) || n.buttonLayout.buttons.push(new n.buttonLayout.Button(t)),
+ t = null,
+ this
+ },
+ clear: function() {
+ var e = n.buttonLayout.buttons,
+ t;
+ for (var r = e.length - 1; r >= 0; r--) if (t = e[r]) t.disposed(),
+ e.splice(r, 1);
+ return e = t = null,
+ this
+ },
+ gone: function(e, t, n) {
+ var r = this.get(e);
+ if (r) {
+ var i = t || [];
+ r.gone(i, n),
+ i = null
+ }
+ return r = null,
+ this
+ },
+ get: function(e) {
+ var t = n.buttonLayout.buttons;
+ return t[t.indexOfAttr("id", e)]
+ },
+ show: function(e) {
+ var t = this.get(e);
+ return t && t.show(),
+ t = null,
+ this
+ },
+ hide: function(e) {
+ var t = this.get(e);
+ return t && t.hide(),
+ t = null,
+ this
+ },
+ disable: function(e, t) {
+ var n = this.get(e);
+ return n && n.disable(t),
+ n = null,
+ this
+ },
+ repeated: function(e) {
+ var t = this.get(e);
+ if (t) return t.repeated
+ },
+ pressed: function(e) {
+ var t = this.get(e);
+ if (t) {
+ var n = t.pressed;
+ return t.pressed = !1,
+ n
+ }
+ },
+ released: function(e) {
+ var t = this.get(e);
+ if (t) {
+ var n = t.released;
+ return t.released = !1,
+ n
+ }
+ },
+ base: function() {
+ return m
+ }
+ }
+ }.init();
+ var m = jsGame = link,
+ g = document.getElementsByTagName("head")[0],
+ y = null,
+ b = null,
+ w = null,
+ E = null,
+ S = function() {
+ b && (clearTimeout(b), b = null)
+ };
+ link.getScript = function(e) {
+ if (!g || y) return ! 1;
+ var t = m.objExtend({
+ url: "",
+ before: function() {},
+ success: function() {},
+ error: function(e) {},
+ timeout: 5e3,
+ contentType: "text/javascript",
+ destroyed: !0
+ },
+ e || {});
+ return t.url != "" && (t.before(), y = document.createElement("script"), y.type = t.contentType, y.async = !0, y.src = t.url, y.destroyed = t.destroyed, w = t.success, E = t.error, y.onload = function() {
+ S(),
+ w && (w(), w = null),
+ this.destroyed && g.removeChild(this),
+ y = null
+ },
+ g.appendChild(y), S(), b = setTimeout(function() {
+ S(),
+ E && (E("timeout"), E = null),
+ y && y.destroyed && g.removeChild(y),
+ y = null
+ },
+ t.timeout)),
+ t = null,
+ m
+ };
+ var x = function() {
+ return ((1 + Math.random()) * 65536 | 0).toString(16).substring(1)
+ };
+ link.getNewGuid = function() {
+ return x() + x() + "-" + x() + "-" + x() + "-" + x() + "-" + x() + x() + x()
+ },
+ link.classes.Observer = function() {
+ this.group = []
+ },
+ link.classes.Observer.prototype.register = function(e) {
+ if (e == null) return this;
+ var t = m.comm.inArray(e, this.group);
+ return t == -1 && this.group.push(e),
+ this
+ },
+ link.classes.Observer.prototype.unregister = function(e) {
+ if (e == null) return this;
+ var t = m.commandFuns.inArray(e, this.group);
+ return t > -1 && this.group.splice(t, 1),
+ this
+ },
+ link.classes.Observer.prototype.notify = function(e) {
+ for (var t = 0; t < this.group.length; t++) this.group[t] != null && this.group[t](e);
+ return this
+ },
+ link.classes.Observer.prototype.clear = function() {
+ return this.group.length > 0 && this.group.splice(0, this.group.length),
+ this
+ },
+ link.classes.Timer = function(e, t, n, r, i) {
+ this.id = e,
+ this._initTime = t,
+ this._dateTime = Date.now(),
+ this.time = this._initTime,
+ this.callBack = n,
+ this.millisec = r || 1e3,
+ this.data = i,
+ this.timeout = null
+ },
+ link.classes.Timer.prototype.stop = function() {
+ this.timeout && (clearTimeout(this.timeout), this.timeout = null)
+ },
+ link.classes.Timer.prototype.start = function(e) {
+ e && (this.time = this._initTime, this._dateTime = Date.now()),
+ this.stop(),
+ this.timeout = setTimeout(function(e) {
+ var t = Date.now(),
+ n = parseInt(Math.round((t - e._dateTime) / e.millisec));
+ e._dateTime = t,
+ e.time -= n,
+ e.callBack ? e.callBack(e) : e.stop(),
+ e.time >= 0 ? e.start() : (e.stop(), e.time = 0),
+ t = n = null
+ },
+ this.millisec, this)
+ },
+ link.classes.WebSocket = function(e, t, n, r, i) {
+ this.ipPort = e || "",
+ this.socket = new WebSocket(this.ipPort),
+ this.socket.onopen = t,
+ this.socket.onmessage = n,
+ this.socket.onclose = r,
+ this.socket.onerror = i
+ },
+ link.classes.WebSocket.prototype.send = function(e) {
+ this.socket.send(e)
+ },
+ link.classes.WebSocket.prototype.close = function() {
+ this.socket.close()
+ },
+ link.classes.observer = link.classes.Observer,
+ link.classes.timer = link.classes.Timer,
+ link.classes.webSocket = link.classes.websocket = link.classes.WebSocket,
+ link.commandFuns = link.comm,
+ link.commandFuns.collisionCheck = link.commandFuns.collision,
+ link.commandFuns.circleCollisionCheck = link.commandFuns.circleCollision,
+ link.initImage = link.pushImage,
+ typeof define == "function" && define("lib/link", [],
+ function() {
+ return link
+ })
+})(),
+ define("lib/action", ["lib/link"],
+ function(e) {
+ var t = function(e, t) {
+ return e == 0 && t == 0 ? 0 : e > 0 && t < 0 ? 1 : e > 0 && t == 0 ? 2 : e > 0 && t > 0 ? 3 : e == 0 && t > 0 ? 4 : e < 0 && t > 0 ? 5 : e < 0 && t == 0 ? 6 : e < 0 && t < 0 ? 7 : 0
+ },
+ n = function(t, n, r, i, s) {
+ var o = [];
+ if (s.length > 0) {
+ var i, u;
+ for (var a = 0; a < s.length; a++) {
+ i = [],
+ u = s[a].frames;
+ for (var f = 0; f < u.length; f++) i.push({
+ args: [u[f][0], u[f][1], u[f][2]],
+ step: u[f][3]
+ });
+ o.push(new e.action.sprite(i, s[a].loop, 0))
+ }
+ return i = u = null,
+ o
+ }
+ return t
+ };
+ e.action = {},
+ e.action.Role = function(e, t, r, i, s, o, u, a) {
+ this.imageNames = s || [],
+ this.rects = o || [],
+ this.frames = u || [],
+ this.actions = a || [],
+ this.sprites = n(e, this.imageNames, this.rects, this.frames, this.actions) || [],
+ this.x = t || 0,
+ this.y = r || 0,
+ this.dx = 0,
+ this.dy = 0,
+ this.step = 0,
+ this.id = "",
+ this.mapOffx = this.x,
+ this.mapOffy = this.y,
+ this.svx = null,
+ this.svy = null,
+ this.current = i || 0,
+ this._cr = this.current,
+ this.zoom = 1,
+ this.angle = 0,
+ this._zooms = [],
+ this._angles = [],
+ this._moveDs = [4, 7, 5, 5, 6, -5, -5, -7],
+ this._stopDs = [0, -3, 1, 1, 2, -1, -1, -3],
+ this.dsIndex = 4,
+ this._path = [];
+ var f = this.getSprite(),
+ l = f.getFrame(),
+ c = this.frames[l.args[0]];
+ this._fA = c.fA,
+ this.aR = c.aR,
+ this.bR = c.bR,
+ this._skipMoveDs = !1,
+ this._stopedAction = null,
+ c = l = f = null,
+ this.onend = null,
+ this.onstart = null,
+ this._locked = !1,
+ this.speed = 5,
+ this.links = [],
+ this.polyAR = [[0, 0], [0, 0], [0, 0], [0, 0]],
+ this.aabbAR = [[0, 0], [0, 0], [0, 0], [0, 0]],
+ this.polyBR = [[0, 0], [0, 0], [0, 0], [0, 0]],
+ this.aabbBR = [[0, 0], [0, 0], [0, 0], [0, 0]]
+ },
+ e.action.Role.prototype.setSprite = function(t, n, r) {
+ if (this._locked) return this;
+ var i = t != undefined ? t: 0,
+ s = i >= 0 ? e.trans.TRANS_NONE: e.trans.TRANS_MIRROR,
+ o,
+ u;
+ this._cr != i && (this._cr = i, i < 0 && (i = Math.abs(i)), this.current = i >= this.sprites.length ? this.sprites.length - 1 : i, this.sprites.length > 1 && this.setTrans(s), o = this.getSprite(), u = o.getFrame(), n || o.setFrame(0), r && (this._stopedAction = this._cr), this.updateFrameParam());
+ for (var a = 0,
+ f; f = this.links[a]; a++) f.setSprite(t, n, r);
+ return i = trans = o = u = null,
+ this
+ },
+ e.action.Role.prototype.addLinks = function(t) {
+ this.links = t || [];
+ for (var n = 0,
+ r; r = this.links[n]; n++) r.setSprite(this.getSprite().trans == e.trans.TRANS_NONE ? this.current: -this.current).setStep(this.step);
+ return this
+ },
+ e.action.Role.prototype.clearLinks = function() {
+ return this.links = [],
+ this
+ },
+ e.action.Role.prototype.lockSprite = function() {
+ return this._locked = !0,
+ this
+ },
+ e.action.Role.prototype.unlockSprite = function() {
+ return this._locked = !1,
+ this
+ },
+ e.action.Role.prototype.setTrans = function(e) {
+ return this.getSprite().trans = e,
+ this
+ },
+ e.action.Role.prototype.getSprite = function(e) {
+ return this.sprites[e == null ? this.current: e]
+ },
+ e.action.Role.prototype.getFrame = function(e) {
+ return this.frames[e == null ? this.getSprite().getFrame().args[0] : e]
+ },
+ e.action.Role.prototype.updateFrameParam = function(t) {
+ var n = this.getSprite();
+ if (!n) return n = null,
+ this;
+ var r = n.getFrame(),
+ i;
+ if (r && r.args) if (i = this.frames[r.args[0]]) {
+ this._fA = i.fA,
+ this.aR = i.aR,
+ this.bR = i.bR;
+ var s = this.getAttackRect(),
+ o = this.getBodyRect(),
+ u = 0,
+ a = 0,
+ f = 0,
+ l = 0;
+ this.polyAR[0][0] = s.x,
+ this.polyAR[0][1] = s.y,
+ this.polyAR[1][0] = s.x + s.width,
+ this.polyAR[1][1] = s.y,
+ this.polyAR[2][0] = s.x + s.width,
+ this.polyAR[2][1] = s.y + s.height,
+ this.polyAR[3][0] = s.x,
+ this.polyAR[3][1] = s.y + s.height,
+ this.polyBR[0][0] = o.x,
+ this.polyBR[0][1] = o.y,
+ this.polyBR[1][0] = o.x + o.width,
+ this.polyBR[1][1] = o.y,
+ this.polyBR[2][0] = o.x + o.width,
+ this.polyBR[2][1] = o.y + o.height,
+ this.polyBR[3][0] = o.x,
+ this.polyBR[3][1] = o.y + o.height,
+ this.angle != 0 && e.comm.setMatrixRotate(this.polyAR, this.angle).setMatrixRotate(this.polyBR, this.angle);
+ var c = 0,
+ h = this.polyAR,
+ p = this.aabbAR;
+ while (c++<2) {
+ for (var d = 0,
+ v; v = h[d]; d++) v[0] > a && (a = v[0]),
+ v[0] < u && (u = v[0]),
+ v[1] > l && (l = v[1]),
+ v[1] < f && (f = v[1]);
+ p[0][0] = u,
+ p[0][1] = f,
+ p[1][0] = a,
+ p[1][1] = f,
+ p[2][0] = a,
+ p[2][1] = l,
+ p[3][0] = u,
+ p[3][1] = l,
+ h = this.polyBR,
+ p = this.aabbBR
+ }
+ s = o = u = a = f = l = null
+ }
+ return n = r = i = null,
+ this
+ },
+ e.action.Role.prototype.action = function() {
+ var e = this.getSprite();
+ if (!e) return this;
+ var n = e.getFrame(),
+ r = 0,
+ i = 0;
+ if (n) {
+ this.updateFrameParam();
+ if (this._path.length > 0) {
+ var s = this._path.shift();
+ r = s[0] || 0,
+ i = s[1] || 0,
+ s = null,
+ this._skipMoveDs || this.setSprite(this._moveDs[this.dsIndex = t(r, i)], !0),
+ this.svx = r,
+ this.svy = i,
+ this.mapOffx += this.svx,
+ this.mapOffy += this.svy
+ } else this.svx != null && this.svy != null && (this._skipMoveDs || (this.setSprite(this._stopedAction || this._stopDs[this.dsIndex = t(this.svx, this.svy)]), this._stopedAction = null), this.onend && this.onend(this), this._skipMoveDs = !1, this.svx = null, this.svy = null);
+ if (this._zooms.length > 0) {
+ var o = this._zooms.shift();
+ typeof~~o == "number" && this.setZoom(o),
+ o = null
+ }
+ if (this._angles.length > 0) {
+ var u = this._angles.shift();
+ typeof~~u == "number" && this.setRotate(u),
+ o = null
+ }
+ this.x += n.args[1] + r,
+ this.y += n.args[2] + i;
+ var a;
+ for (var f = 0,
+ l; l = this.links[f]; f++) l.x = this.x + (l.dx || 0),
+ l.y = this.y + (l.dy || 0),
+ l.getSprite().setFrame(e.current),
+ l.updateFrameParam();
+ a = null
+ }
+ return e.nextFrame(),
+ e = r = i = n = null,
+ this
+ },
+ e.action.Role.prototype.render = function(t) {
+ var n = this.getSprite();
+ if (n && this._fA) {
+ var r = this._fA,
+ i = r.length,
+ s = e.canvas,
+ o = n.trans,
+ u, a, f;
+ if (this.angle > 0) {
+ var l = r[0],
+ c = this.x,
+ h = this.y;
+ e.canvas.save().translate(c, h).rotate(this.angle * Math.PI / 180).translate( - c, -h),
+ l = c = h = null
+ }
+ for (var p = 0; p < i; p++) u = this.rects[r[p][0]][r[p][1]],
+ a = this.imageNames[r[p][0]],
+ f = e.getImage(a),
+ o == e.trans.TRANS_NONE ? s.drawImage(a, u[0], u[1], u[2], u[3], this.zoom == 1 ? ~~ (this.x + this.dx + r[p][2] * this.zoom) : this.x + this.dx + r[p][2] * this.zoom, this.zoom == 1 ? ~~ (this.y + this.dy + r[p][3] * this.zoom) : this.y + this.dy + r[p][3] * this.zoom, u[2] * this.zoom, u[3] * this.zoom) : this.zoom == 1 ? s.drawRegion(a, u[0], u[1], u[2], u[3], o, ~~ (this.x + this.dx - (r[p][2] + u[2])), ~~ (this.y + this.dy + r[p][3])) : s.drawRegionAndZoom(a, u[0], u[1], u[2], u[3], o, this.x + this.dx - (r[p][2] + u[2]) * this.zoom, this.y + this.dy + r[p][3] * this.zoom, null, u[2] * this.zoom, u[3] * this.zoom),
+ !f.loaded && f.bench && s.drawImage(f.bench.id || f.benchId, f.bench.sx || 0, f.bench.sy || 0, f.bench.sw || f.bench.w, f.bench.sh || f.bench.h, ~~ (this.x + this.dx - (f.bench.w * this.zoom >> 1)), ~~ (this.y + this.dy - f.bench.h * this.zoom), f.bench.w * this.zoom, f.bench.h * this.zoom);
+ this.angle > 0 && e.canvas.restore();
+ for (var d = 0,
+ v; v = this.links[d]; d++) v.render();
+ s = i = r = o = u = a = f = null
+ }
+ return n = null,
+ this
+ },
+ e.action.Role.prototype.setZoom = function(e) {
+ return this.zoom = e,
+ this
+ },
+ e.action.Role.prototype.setZoomTransition = function(e) {
+ return e && e.length > 0 && (this._zooms = e),
+ this
+ },
+ e.action.Role.prototype.endZoomTransition = function() {
+ return this._zooms.length == 0
+ },
+ e.action.Role.prototype.getBodyRect = function(t, n) {
+ var r = this.getSprite(t != null ? Math.abs(t) : null);
+ if (!r) return null;
+ var i = r.getFrame(n);
+ if (!i) return null;
+ var s = this.frames[i.args[0]].bR;
+ return t == null && r.trans != e.trans.TRANS_NONE || t < 0 ? {
+ x: -(s[0] + s[2] * this.zoom),
+ y: s[1] * this.zoom,
+ width: s[2] * this.zoom,
+ height: s[3] * this.zoom
+ }: {
+ x: s[0] * this.zoom,
+ y: s[1] * this.zoom,
+ width: s[2] * this.zoom,
+ height: s[3] * this.zoom
+ }
+ },
+ e.action.Role.prototype.getAttackRect = function(t, n) {
+ var r = this.getSprite(t != null ? Math.abs(t) : null);
+ if (!r) return null;
+ var i = r.getFrame(n);
+ if (!i) return null;
+ var s = this.frames[i.args[0]].aR;
+ return t == null && r.trans != e.trans.TRANS_NONE || t < 0 ? {
+ id: this.id,
+ x: -(s[0] + s[2] * this.zoom),
+ y: s[1] * this.zoom,
+ width: s[2] * this.zoom,
+ height: s[3] * this.zoom
+ }: {
+ id: this.id,
+ x: s[0] * this.zoom,
+ y: s[1] * this.zoom,
+ width: s[2] * this.zoom,
+ height: s[3] * this.zoom
+ }
+ },
+ e.action.Role.prototype.getAABBBodyRect = function() {
+ return {
+ id: this.id,
+ x: this.aabbBR[0][0],
+ y: this.aabbBR[0][1],
+ width: Math.abs(this.aabbBR[1][0] - this.aabbBR[0][0]),
+ height: Math.abs(this.aabbBR[2][1] - this.aabbBR[1][1])
+ }
+ },
+ e.action.Role.prototype.getAABBAttackRect = function() {
+ return {
+ id: this.id,
+ x: this.aabbAR[0][0],
+ y: this.aabbAR[0][1],
+ width: Math.abs(this.aabbAR[1][0] - this.aabbAR[0][0]),
+ height: Math.abs(this.aabbAR[2][1] - this.aabbAR[1][1])
+ }
+ },
+ e.action.Role.prototype.setStep = function(e) {
+ this.step = e || 0;
+ for (var t = 0,
+ n = this.sprites.length; t < n; t++) this.sprites[t].setStep(e);
+ for (var r = 0,
+ i; i = this.links[r]; r++) i.setStep(this.step);
+ return this
+ },
+ e.action.Role.prototype.collision = function(t, n, r) {
+ if (!t) return ! 1;
+ var i = n || "aR",
+ s = r || "aR",
+ o, u;
+ return i == "aR" ? o = this.getAttackRect() : i == "bR" && (o = this.getBodyRect()),
+ s == "aR" ? u = t.getAttackRect() : s == "bR" && (u = t.getBodyRect()),
+ o && u ? e.comm.collision(~~ (this.x + this.dx + o.x), ~~ (this.y + this.dy + o.y), ~~o.width, ~~o.height, ~~ (t.x + t.dx + u.x), ~~ (t.y + t.dy + u.y), ~~u.width, ~~u.height) : !1
+ },
+ e.action.Role.prototype.collisionInput = function(t, n, r, i, s) {
+ var o = s || "aR",
+ u;
+ return o == "aR" ? u = this.getAttackRect() : o == "bR" && (u = this.getBodyRect()),
+ u ? e.comm.collision(~~ (this.x + this.dx + u.x), ~~ (this.y + this.dy + u.y), ~~u.width, ~~u.height, t, n, r, i) : !1
+ },
+ e.action.Role.prototype.circleCollisionInput = function(t, n, r, i) {
+ var s = i || "aR",
+ o;
+ return s == "aR" ? o = this.getAttackRect() : s == "bR" && (o = this.getBodyRect()),
+ o ? e.comm.rect2CircleCollision(~~ (this.x + this.dx + o.x), ~~ (this.y + this.dy + o.y), ~~o.width, ~~o.height, t, n, r) : !1
+ },
+ e.action.Role.prototype.polygonSATCollision = function(t, n, r) {
+ if (!t) return ! 1;
+ var i = n || "aR",
+ s = r || "aR",
+ o, u;
+ return i == "aR" ? o = this.polyAR: i == "bR" && (o = this.polyBR),
+ s == "aR" ? u = t.polyAR: s == "bR" && (u = t.polyBR),
+ o && u ? e.comm.polygonCollision(o, u, this.x + this.dx, this.y + this.dy, t.x + t.dx, t.y + t.dy) : !1
+ },
+ e.action.Role.prototype.setLoop = function(e) {
+ for (var t = 0,
+ n = this.sprites.length; t < n; t++) this.sprites[t].setLoop(e);
+ return this
+ },
+ e.action.Role.prototype.setPath = function(e, t) {
+ return this._path = e || [],
+ this._path.length > 0 && this.onstart && this.onstart(this),
+ t && (this._skipMoveDs = !0),
+ this
+ },
+ e.action.Role.prototype.concatPath = function(e) {
+ return this._path = this._path.concat(e || []),
+ this
+ },
+ e.action.Role.prototype.endPath = function() {
+ return this._path.length == 0
+ },
+ e.action.Role.prototype.clearPath = function() {
+ return this._path = [],
+ this
+ },
+ e.action.Role.prototype.getPathCount = function() {
+ return this._path.length
+ },
+ e.action.Role.prototype.getFirstPath = function() {
+ return this._path.length > 0 ? this._path[0] : [0, 0]
+ },
+ e.action.Role.prototype.moveTo = function(t, n, r) {
+ return r && (this.speed = Math.abs(r)),
+ this.setPath(e.comm.createPath(this.mapOffx, this.mapOffy, t, n, this.speed)),
+ this
+ },
+ e.action.Role.prototype.setMoveDs = function(e) {
+ return this._moveDs = e || [4, 7, 5, 5, 6, -5, -5, -7],
+ this
+ },
+ e.action.Role.prototype.setStopDs = function(e) {
+ return this._stopDs = e || [0, -3, 1, 1, 2, -1, -1, -3],
+ this
+ },
+ e.action.Role.prototype.doMoveDs = function(e) {
+ return e != null && e >= 0 && e < 8 && (this.dsIndex = e),
+ this.setSprite(this._moveDs[this.dsIndex]),
+ this
+ },
+ e.action.Role.prototype.doStopDs = function(e) {
+ return e != null && e >= 0 && e < 8 && (this.dsIndex = e),
+ this.setSprite(this._stopDs[this.dsIndex]),
+ this
+ },
+ e.action.Role.prototype.mark = function(e, t, n, r) {
+ return e != null && (this.x = e),
+ t != null && (this.y = t),
+ n != null && (this.mapOffx = n),
+ r != null && (this.mapOffy = r),
+ this
+ },
+ e.action.Role.prototype.setSpeed = function(e, t) {
+ return e && (this.speed = Math.abs(e)),
+ this.nodeXStep = e,
+ this.nodeYStep = t,
+ this
+ },
+ e.action.Role.prototype.setRotate = function(e) {
+ return e != this.angle && (Math.abs(e) > 360 && (e %= 360), this.angle = e < 0 ? 360 + e: e),
+ this
+ },
+ e.action.Role.prototype.setRotateTransition = function(e) {
+ return e && e.length > 0 && (this._angles = e),
+ this
+ },
+ e.action.Role.prototype.endRotateTransition = function() {
+ return this._angles.length == 0
+ },
+ e.action.Role.prototype.move = function(e, t) {
+ return e != null && (this.x += e),
+ t != null && (this.y += t),
+ this
+ },
+ e.action.Role.prototype.rotate = function(e) {
+ return e != null && this.setRotate(this.angle + e),
+ this
+ },
+ e.action.Role.prototype.stoped = function() {
+ return this.svx == null
+ },
+ e.action.Role.prototype.getCurrent = function() {
+ return this.current * (this.getSprite().trans == e.trans.TRANS_NONE ? 1 : -1)
+ },
+ e.action.Sprite = function(t, n, r, i) {
+ this.frames = t || [],
+ this.loop = n,
+ this.current = r || 0,
+ this.step = i || 0,
+ this.trans = e.trans.TRANS_NONE,
+ this.setFrame(r),
+ this.runStep = this.getFrame().step || this.step
+ },
+ e.action.Sprite.prototype.setFrame = function(e) {
+ return this.current = e >= this.frames.length ? this.frames.length - 1 : e > 0 ? e: 0,
+ this.getFrame().step && (this.runStep = this.getFrame().step),
+ this
+ },
+ e.action.Sprite.prototype.getFrame = function(e) {
+ return this.frames[e == null ? this.current: e]
+ },
+ e.action.Sprite.prototype.nextFrame = function() {
+ return ! this.loop && this.endFrame() ? this: (this.frames.length > 0 && (this.runStep <= 0 ? (this.loop ? (this.current++, this.current %= this.frames.length) : this.current < this.frames.length - 1 && this.current++, this.getFrame().step ? this.runStep = this.getFrame().step: this.runStep = this.step) : this.runStep--), this)
+ },
+ e.action.Sprite.prototype.preFrame = function() {
+ return this.frames.length > 0 && (this.runStep <= 0 ? (this.loop ? (this.current--, this.current < 0 && (this.current = this.frames.length - 1)) : this.current > 0 && this.current--, this.getFrame().step ? this.runStep = this.getFrame().step: this.runStep = this.step) : this.runStep--),
+ this
+ },
+ e.action.Sprite.prototype.endFrame = function(e) {
+ var t = this.frames.length - 1;
+ return e != null && e >= 0 && e <= this.frames.length - 1 && (t = e),
+ this.current >= t && this.runStep == 0
+ },
+ e.action.Sprite.prototype.firstFrame = function() {
+ return this.current == 0 && this.runStep == 0
+ },
+ e.action.Sprite.prototype.setStep = function(e) {
+ return this.step = e || 0,
+ this.runStep = this.getFrame().step || this.step,
+ this
+ },
+ e.action.Sprite.prototype.setLoop = function(e) {
+ return this.loop = e,
+ this
+ };
+ var r, i = function(e) {
+ return e.sprites.length > 0 ? e.sprites[0].frames.length > 0 && (e.sprites[0].runStep <= 0 ? (e.sprites[0].runStep = e.sprites[0].step, r = e.sprites[0].frames.shift(), e.sprites[0].frames.length == 0 && e.sprites.shift()) : (r = e.sprites[0].getFrame(), e.sprites[0].runStep--)) : r = null,
+ r
+ };
+ return e.action.Fragment = function(e) {
+ this.sprites = e || []
+ },
+ e.action.Fragment.prototype.queue = function() {
+ return i(this)
+ },
+ e.action.role = e.action.Role,
+ e.action.sprite = e.action.Sprite,
+ e.action.fragment = e.action.Fragment,
+ link.action
+ }),
+ define("host", ["lib/link"],
+ function(e) {
+ e.asyncImage([{
+ id: "host",
+ src: "images/xiaoren.png"
+ }]);
+ var t = ["host"],
+ n = [[[0, 0, 26, 37], [27, 0, 19, 36], [46, 0, 22, 38]]],
+ r = [{
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 0, -14, -37, 0]]
+ },
+ {
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 1, -9, -36, 0]]
+ },
+ {
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 2, -12, -37, 0]]
+ }],
+ i = [{
+ loop: !0,
+ frames: [[0, 0, 0, 0], [1, 0, 0, 0], [2, 0, 0, 0], [1, 0, 0, 0]]
+ }];
+ return {
+ get: function(s, o) {
+ var u = s >= 0 && i[s] ? [i[s]] : i;
+ return new e.action.role([], 0, 0, 0, o ? o: t, n, r, u || i)
+ }
+ }
+ }),
+ define("shine", ["lib/link"],
+ function(e) {
+ e.asyncImage([{
+ id: "shine",
+ src: "images/wu.png"
+ }]);
+ var t = ["shine"],
+ n = [[[0, 20, 101, 64], [119, 19, 112, 66], [238, 13, 140, 80], [391, 0, 103, 100]]],
+ r = [{
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 0, -51, -34, 0]]
+ },
+ {
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 1, -54, -34, 0]]
+ },
+ {
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 2, -58, -35, 0]]
+ },
+ {
+ aR: [ - 15, -30, 30, 30],
+ bR: [ - 10, -25, 20, 20],
+ fA: [[0, 3, -49, -45, 0]]
+ }],
+ i = [{
+ loop: !1,
+ frames: [[0, 0, 0, 0], [1, 0, 0, 0], [2, 0, 0, 0], [3, 0, 0, 0]]
+ }];
+ return {
+ get: function(s, o) {
+ var u = s >= 0 && i[s] ? [i[s]] : i;
+ return new e.action.role([], 0, 0, 0, o ? o: t, n, r, u || i)
+ }
+ }
+ }),
+ define("index", ["lib/link", "lib/action", "host", "shine"],
+ function(e, t, n, r) {
+ return {
+ init: function() {
+ var t = Date.now(),
+ i,
+ s,
+ o = 640,
+ u;
+ e.canvas.screen.getTouch() ? (i = window.innerWidth, s = window.innerHeight, e.canvas.screen.setWidth(i).setHeight(s), u = s - o >> 1) : (window.onresize = function() {
+ i = window.innerWidth,
+ s = window.innerHeight,
+ e.canvas.screen.setWidth(i).setHeight(s),
+ u = s - o >> 1
+ },
+ window.onresize());
+ var a = function(e, t) {
+ var n = ~~ (e / 1e3 % 1 * 1e3);
+ return n == 0 ? n = "000": n < 100 && (n += "0"),
+ ~~ (e / 1e3) + "." + n + (t || '"')
+ };
+ e.run(function() {
+ var t = Date.now();
+ e.canvas.fillStyle("#FFF").fillScreen();
+ var n = ~~ (o / l.scenes.length);
+ if (!l.died) {
+ l.time = t - l.date;
+ for (var s = 0,
+ f; f = l.scenes[s]; s++) {
+ f.action(0, u + (s + 1) * n, i, n, -8).render();
+ if (f.hostDied) {
+ l.died = !0,
+ l.dieDate = Date.now(),
+ l.shine = r.get(0).mark(f.host.x, f.host.y - 20).setStep(2);
+ break
+ }
+ }
+ } else {
+ for (var s = 0,
+ f; f = l.scenes[s]; s++) f.host.action(),
+ f.render();
+ l.shine && (l.shine.action().render(), l.shine.getSprite().endFrame() && (l.shine = null)),
+ t - l.dieDate >= l.dieTimeout && (l.dieDate = null, h())
+ }
+ var c = a(l.time);
+ e.canvas.fillStyle("#000").font("30px Arial").fillText(c, i - e.canvas.measureText(c).width - 20, 50),
+ t = null
+ }).menu(function() {
+ e.canvas.fillStyle("#FFF").fillScreen().drawImage("logo", i - 480 >> 1, u).drawImage("btns1", 0, 99, 480, 7, i - 480 >> 1, u + 140, 480, 7).drawImage("btns1", 0, 99, 480, 7, i - 480 >> 1, u + 555, 480, 7),
+ e.buttonLayout.released("difficulty1") ? (l.moduleName = "我的成绩", hideAd(), c(2)) : e.buttonLayout.released("difficulty2") ? (l.moduleName = "噩梦模式", c(3)) : e.buttonLayout.released("difficulty3") ? (l.moduleName = "地狱模式", c(4)) : e.buttonLayout.released("difficulty4") ? (l.moduleName = "炼狱模式", c(5)) : e.buttonLayout.released("rank") && dp_Ranking()
+ }).zone(function() {
+ e.canvas.fillStyle("#90EE90").fillScreen().fillStyle("#FFF").drawString(l.moduleName, 0, u + 110, e.graphics.VCENTER, !1, null, null, "50px 微软雅黑").drawImage("btns1", 0, 106, 480, 7, i - 480 >> 1, u + 140, 480, 7).drawImage("btns1", 0, 106, 480, 7, i - 480 >> 1, u + 555, 480, 7).fillStyle("#000").drawString(a(l.time, "秒"), 0, u + 340, e.graphics.VCENTER, !1, null, null, "60px 微软雅黑").fillStyle("#000").drawString("最佳:" + a(l.bestTime, "秒"), 0, u + 400, e.graphics.VCENTER, !1, null, null, "30px 微软雅黑"),
+ l.time > l.bestTime && e.canvas.fillStyle("#FF0").drawString("新纪录", 0, u + 240, e.graphics.VCENTER, !1, null, null, "50px 微软雅黑"),
+ e.buttonLayout.released("return") ? f() : e.buttonLayout.released("restart") && dp_share2(l.time)
+ }).events.mouseDown(function(e, t, n) {
+ if (l.died) return ! 1;
+ for (var r = 0,
+ i; i = l.scenes[r]; r++) i.touchStart(t, n)
+ }).touchStart(function(e, t, n) {
+ if (l.died) return ! 1;
+ for (var r = 0,
+ i; i = l.scenes[r]; r++) i.touchStart(t, n)
+ });
+ var f = function() {
+ showAd();
+ e.buttonLayout.clear().create({
+ id: "difficulty1",
+ value: "开始游戏",
+ x: i - 272 >> 1,
+ y: u + 180,
+ width: 272,
+ height: 80,
+ font: "36px 微软雅黑",
+ imageId: "btns1",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 272,
+ hy: 0,
+ hColor: "#FFF",
+ dex: 272,
+ dey: 0,
+ deColor: "#000"
+ }).create({
+ id: "difficulty2",
+ value: "噩梦模式",
+ x: i - 272 >> 1,
+ y: u + 160 + 120,
+ width: 272,
+ height: 80,
+ font: "36px 微软雅黑",
+ imageId: "btns1",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 272,
+ hy: 0,
+ hColor: "#FFF",
+ dex: 272,
+ dey: 0,
+ deColor: "#000"
+ }).create({
+ id: "difficulty3",
+ value: "地狱模式",
+ x: i - 272 >> 1,
+ y: u + 160 + 120+100,
+ width: 272,
+ height: 80,
+ font: "36px 微软雅黑",
+ imageId: "btns1",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 272,
+ hy: 0,
+ hColor: "#FFF",
+ dex: 272,
+ dey: 0,
+ deColor: "#000"
+ }).create({
+ id: "difficulty4",
+ value: "炼狱模式",
+ x: i - 272 >> 1,
+ y: u + 160 + 120+200,
+ width: 272,
+ height: 80,
+ font: "36px 微软雅黑",
+ imageId: "btns1",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 272,
+ hy: 0,
+ hColor: "#FFF",
+ dex: 272,
+ dey: 0,
+ deColor: "#000"
+ }).base().gameFlow.menu()
+ };
+ f();
+ var l = {
+ moduleName: "",
+ module: 0,
+ time: 0,
+ bestTime: 0,
+ date: null,
+ died: !1,
+ dieTimeout: 1e3,
+ dieDate: null,
+ scenes: [],
+ shine: null,
+ Scene: e.extend(function(t) {
+ this.id = t,
+ this.x = 0,
+ this.baseY = 0,
+ this.width = 0,
+ this.height = 0,
+ this.host = n.get().setStep(2),
+ this.hostDied = !1,
+ this.boxes = [],
+ this.displayDate = Date.now(),
+ this.displayTimeout = e.comm.getRandom(1e3, 2e3)
+ },
+ null, {
+ render: function() {
+ e.canvas.fillStyle("#000").fillRect(this.x, this.baseY - 5, this.width, 5);
+ for (var t = this.boxes.length - 1,
+ n; n = this.boxes[t]; t--) e.canvas.fillRect(n.x, n.y, n.width, n.height);
+ return this.host.render(),
+ this
+ },
+ action: function(t, n, r, i, s) {
+ this.x = t,
+ this.baseY = n,
+ this.width = r,
+ this.height = i;
+ if (!this.hostDied) {
+ this.host.endPath() && this.host.mark(this.x + 100, this.baseY - 5);
+ var o = Date.now();
+ if (o - this.displayDate >= this.displayTimeout) {
+ this.displayDate = o;
+ var u = e.comm.getRandom(5, 30),
+ a = e.comm.getRandom(10, 50);
+ this.boxes.unshift({
+ x: this.width,
+ y: 0,
+ width: u,
+ height: a
+ }),
+ this.displayTimeout = e.comm.getRandom(1e3, 3e3),
+ u = a = null
+ }
+ for (var f = this.boxes.length - 1,
+ l; l = this.boxes[f]; f--) l.x += s,
+ l.y = this.baseY - 5 - l.height,
+ this.host.collisionInput(l.x, l.y, l.width, l.height, "bR") && (this.hostDied = !0, this.host.clearPath()),
+ (l.x <= -l.width || l.x >= this.width) && this.boxes.splice(f, 1);
+ o = null
+ }
+ return this.host.action(),
+ this
+ },
+ touchStart: function(t, n) {
+ return this.host.endPath() ? (e.comm.collision(t, n, 1, 1, this.x, this.baseY - this.height, this.width, this.height) && this.host.setPath([[0, -20], [0, -20], [0, -20], [0, -10], [0, -10], [0, -10], [0, -5], [0, -5], [0, -5], [0, 5], [0, 5], [0, 5], [0, 10], [0, 10], [0, 10], [0, 20], [0, 20], [0, 20]]), this) : this
+ }
+ })
+ },
+ c = function(t) {
+ e.buttonLayout.clear().base().gameFlow.run(),
+ l.died = !1,
+ l.scenes = [],
+ l.time = 0,
+ l.date = Date.now(),
+ l.shine = null,
+ l.module = t;
+ for (var n = 0; n < t; n++) l.scenes.push(new l.Scene(n))
+ },
+ h = function() {
+ var t = i - 480 >> 1;
+ if (l.time > 10000) {
+ dp_share(l.time);
+ alert("强!你居然坚持了" + l.time / 1000 + "秒!")
+ };
+ e.buttonLayout.clear().create({
+ id: "return",
+ value: "返回游戏主界面",
+ bgColor: "",
+ bgStroke: "",
+ stroke: "",
+ x: t + 100,
+ y: u + 580,
+ width: 300,
+ height: 80,
+ font: "36px 微软雅黑",
+ imageId: "",
+ sx: 0,
+ sy: 0,
+ color: "#FFF",
+ hx: 272,
+ hy: 0,
+ hColor: "#AAA",
+ dex: 272,
+ dey: 0,
+ deColor: "#CCC"
+ }).base().gameFlow.zone();
+ var n = e.localStorage.getItem("NotDieAnyoneBestTime" + l.module);
+ n == null && (n = "0"),
+ l.bestTime = parseInt(n),
+ l.time > l.bestTime && e.localStorage.setItem("NotDieAnyoneBestTime" + l.module, l.time.toString()),
+ dp_submitScore(l.module, l.time * (l.module - 1))
+ }
+ }
+ }
+ }),
+ require.config({
+ baseUrl: "js"
+ }),
+ require(["lib/link", "index"],
+ function(e, t) {
+ e.init(window.innerWidth, window.innerHeight).pushImage([{
+ id: "logo",
+ src: "images/ygdbns.jpg"
+ },
+ {
+ id: "btns1",
+ src: "images/gdyx.png"
+ }],
+ function(e, t, n) {}).initAudio([{
+ id: "1",
+ src: "",
+ preload: !0
+ }]).loadingCallBack(function(e, t) {}).main(function() {
+ t.init()
+ })
+ }),
+ define("main", function() {});
+function dp_submitScore(m,t){}
+function dp_share(t){}
+function dp_share2(t){}
+function showAd(){}
+function hideAd(){}
+
diff --git a/一个不能死/js/require.js b/一个不能死/js/require.js
new file mode 100644
index 0000000..81a5486
--- /dev/null
+++ b/一个不能死/js/require.js
@@ -0,0 +1 @@
+var requirejs,require,define;(function(ca){function G(e){return"[object Function]"===M.call(e)}function H(e){return"[object Array]"===M.call(e)}function v(e,t){if(e){var n;for(n=0;nthis.depCount&&!this.defined){if(G(i)){if(this.events.error&&this.map.isDefine||h.onError!==da)try{r=x.execCb(n,i,t,r)}catch(s){e=s}else r=x.execCb(n,i,t,r);this.map.isDefine&&void 0===r&&((t=this.module)?r=t.exports:this.usingExports&&(r=this.exports));if(e)return e.requireMap=this.map,e.requireModules=this.map.isDefine?[this.map.id]:null,e.requireType=this.map.isDefine?"define":"require",l(this.error=e)}else r=i;this.exports=r,this.map.isDefine&&!this.ignore&&(D[n]=r,h.onResourceLoad)&&h.onResourceLoad(x,this.map,this.depMaps),p(n),this.defined=!0}this.defining=!1,this.defined&&!this.defineEmitted&&(this.defineEmitted=!0,this.emit("defined",this.exports),this.defineEmitComplete=!0)}}else this.fetch()}},callPlugin:function(){var e=this.map,r=e.id,i=u(e.prefix);this.depMaps.push(i),f(i,"defined",t(this,function(i){var o,c;c=j(I,this.map.id);var d=this.map.name,v=this.map.parentMap?this.map.parentMap.name:null,m=x.makeRequire(e.parentMap,{enableBuildCallback:!0});if(this.map.unnormalized){if(i.normalize&&(d=i.normalize(d,function(e){return n(e,v,!0)})||""),i=u(e.prefix+"!"+d,this.map.parentMap),f(i,"defined",t(this,function(e){this.init([],function(){return e},null,{enabled:!0,ignore:!0})})),c=j(L,i.id))this.depMaps.push(i),this.events.error&&c.on("error",t(this,function(e){this.emit("error",e)})),c.enable()}else c?(this.map.url=x.nameToUrl(c),this.load()):(o=t(this,function(e){this.init([],function(){return e},null,{enabled:!0})}),o.error=t(this,function(e){this.inited=!0,this.error=e,e.requireModules=[r],B(L,function(e){0===e.map.id.indexOf(r+"_unnormalized")&&p(e.map.id)}),l(e)}),o.fromText=t(this,function(t,n){var i=e.name,f=u(i),c=O;n&&(t=n),c&&(O=!1),a(f),s(k.config,r)&&(k.config[i]=k.config[r]);try{h.exec(t)}catch(p){return l(C("fromtexteval","fromText eval for "+r+" failed: "+p,p,[r]))}c&&(O=!0),this.depMaps.push(f),x.completeLoad(i),m([i],o)}),i.load(e.name,m,o,k))})),x.enable(i,this),this.pluginMaps[i.id]=i},enable:function(){A[this.map.id]=this,this.enabling=this.enabled=!0,v(this.depMaps,t(this,function(e,n){var r,i;if("string"==typeof e){e=u(e,this.map.isDefine?this.map:this.map.parentMap,!1,!this.skipMap),this.depMaps[n]=e;if(r=j(T,e.id)){this.depExports[n]=r(this);return}this.depCount+=1,f(e,"defined",t(this,function(e){this.defineDep(n,e),this.check()})),this.errback&&f(e,"error",t(this,this.errback))}r=e.id,i=L[r],!s(T,r)&&i&&!i.enabled&&x.enable(e,this)})),B(this.pluginMaps,t(this,function(e){var t=j(L,e.id);t&&!t.enabled&&x.enable(e,this)})),this.enabling=!1,this.check()},on:function(e,t){var n=this.events[e];n||(n=this.events[e]=[]),n.push(t)},emit:function(e,t){v(this.events[e],function(e){e(t)}),"error"===e&&delete this.events[e]}},x={config:k,contextName:e,registry:L,defined:D,urlFetched:F,defQueue:_,Module:E,makeModuleMap:u,nextTick:h.nextTick,onError:l,configure:function(e){e.baseUrl&&"/"!==e.baseUrl.charAt(e.baseUrl.length-1)&&(e.baseUrl+="/");var t=k.shim,n={paths:!0,bundles:!0,config:!0,map:!0};B(e,function(e,t){n[t]?(k[t]||(k[t]={}),V(k[t],e,!0,!0)):k[t]=e}),e.bundles&&B(e.bundles,function(e,t){v(e,function(e){e!==t&&(I[e]=t)})}),e.shim&&(B(e.shim,function(e,n){H(e)&&(e={deps:e}),(e.exports||e.init)&&!e.exportsFn&&(e.exportsFn=x.makeShimExports(e)),t[n]=e}),k.shim=t),e.packages&&v(e.packages,function(e){var t,e="string"==typeof e?{name:e}:e;t=e.name,e.location&&(k.paths[t]=e.location),k.pkgs[t]=e.name+"/"+(e.main||"main").replace(ja,"").replace(R,"")}),B(L,function(e,t){!e.inited&&!e.map.unnormalized&&(e.map=u(t))}),(e.deps||e.callback)&&x.require(e.deps||[],e.callback)},makeShimExports:function(e){return function(){var t;return e.init&&(t=e.init.apply(ca,arguments)),t||e.exports&&ea(e.exports)}},makeRequire:function(t,i){function o(n,r,f){var c,p;return i.enableBuildCallback&&r&&G(r)&&(r.__requireJsBuild=!0),"string"==typeof n?G(r)?l(C("requireargs","Invalid require call"),f):t&&s(T,n)?T[n](L[t.id]):h.get?h.get(x,n,t,o):(c=u(n,t,!1,!0),c=c.id,s(D,c)?D[c]:l(C("notloaded",'Module name "'+c+'" has not been loaded yet for context: '+e+(t?"":". Use require([])")))):(b(),x.nextTick(function(){b(),p=a(u(null,t)),p.skipMap=i.skipMap,p.init(n,r,f,{enabled:!0}),m()}),o)}return i=i||{},V(o,{isBrowser:z,toUrl:function(e){var r,i=e.lastIndexOf("."),s=e.split("/")[0];return-1!==i&&("."!==s&&".."!==s||1r.attachEvent.toString().indexOf("[native code"))&&!Z?(O=!0,r.attachEvent("onreadystatechange",e.onScriptLoad)):(r.addEventListener("load",e.onScriptLoad,!1),r.addEventListener("error",e.onScriptError,!1)),r.src=n,L=r,D?y.insertBefore(r,D):y.appendChild(r),L=null,r;if(fa)try{importScripts(n),e.completeLoad(t)}catch(i){e.onError(C("importscripts","importScripts failed for "+t+" at "+n,i,[t]))}},z&&!r.skipDataMain&&U(document.getElementsByTagName("script"),function(e){y||(y=e.parentNode);if(K=e.getAttribute("data-main"))return q=K,r.baseUrl||(E=q.split("/"),q=E.pop(),Q=E.length?E.join("/")+"/":"./",r.baseUrl=Q),q=q.replace(R,""),h.jsExtRegExp.test(q)&&(q=K),r.deps=r.deps?r.deps.concat(q):[q],!0}),define=function(e,t,n){var r,i;"string"!=typeof e&&(n=t,t=e,e=null),H(t)||(n=t,t=null),!t&&G(n)&&(t=[],n.length&&(n.toString().replace(la,"").replace(ma,function(e,n){t.push(n)}),t=(1===n.length?["require"]:["require","exports","module"]).concat(t))),O&&((r=L)||(P&&"interactive"===P.readyState||U(document.getElementsByTagName("script"),function(e){if("interactive"===e.readyState)return P=e}),r=P),r&&(e||(e=r.getAttribute("data-requiremodule")),i=F[r.getAttribute("data-requirecontext")])),(i?i.defQueue:S).push([e,t,n])},define.amd={jQuery:!0},h.exec=function(b){return eval(b)},h(r)}})(this);
\ No newline at end of file
diff --git a/世界城市/css/demo.css b/世界城市/css/demo.css
new file mode 100644
index 0000000..4755bd2
--- /dev/null
+++ b/世界城市/css/demo.css
@@ -0,0 +1,74 @@
+.g-flexview { padding-top: 3rem; background: #fff; }
+.demo-pagetitle { font-size: .68rem; color: #FF5E53; text-align: center; padding: .6rem 0 .4rem; }
+.demo-detail-title { color: #888; font-size: .28rem; margin-bottom: .5rem; font-weight: normal; line-height: 0.42rem; text-align: center; }
+.demo-loading { margin-bottom: 20px; }
+.demo-loading li a { -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; overflow: hidden; width: 100%; height: 100%; }
+.demo-loading li img { width: .6rem; height: .6rem; display: inline-block; }
+.demo-tip { color: #B1B1B1; font-size: .24rem; padding: .2rem .24rem .4rem; line-height: 18px; font-family: \5fae\8f6f\96c5\9ed1; position: relative; }
+.demo-tip:after { content: ''; position: absolute; bottom: .2rem; left: 0; width: 100%; border-bottom: 1px dashed #B2B2B2; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
+.demo-tip i { margin-right: 3px; }
+.demo-tip a { color: #5AA700; }
+.demo-upload { overflow: hidden; }
+.demo-upload li { width: 1rem; height: 1rem; float: left; margin-right: 0.2rem; }
+.demo-upload li:last-child { margin-right: 0; }
+.demo-upload-big { width: 2rem; height: 2rem; margin-top: 0.4rem; }
+.demo-upload-rectangle { width: 4rem; height: 2rem; margin-top: 0.4rem; }
+.demo-components { background-color: #FFF; padding: 10px; margin-bottom: 10px; }
+.demo-upload { overflow: hidden; }
+.demo-upload li { float: left; }
+.demo-upload li img { width: 1rem; height: 1rem; margin-right: .2rem; }
+.demo-pitch { margin-top: .5rem; }
+.demo-small-pitch { margin-top: .35rem; }
+.demo-progressbar { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-justify-content: space-around; -ms-flex-pack: distribute; justify-content: space-around; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; padding: 0 .24rem; }
+.demo-spinner { background-color: #FFF; padding: .24rem; font-size: 0; }
+.demo-spinner-title { font-size: .26rem; color: #888; display: block; margin-bottom: .1rem; }
+.demo-badege { padding: 0 .24rem .5rem .24rem; background-color: #FFF; }
+.demo-badege .demo-badege-title { font-size: .26rem; padding-top: .5rem; padding-bottom: .15rem; color: #777; position: relative; }
+.demo-badege .demo-badege-title:after { content: ''; position: absolute; z-index: 2; bottom: 0; left: 0; width: 100%; height: 1px; background-color: #D9D9D9; border-bottom: 1px solid #D9D9D9; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
+.demo-badege .badge { margin-right: .1rem; }
+.demo-icons [class^="icon-"]:before, .demo-icons [class*=" icon-"]:before { font-size: .6rem; color: #FF685D; }
+.demo-progress-line { height: .15rem; width: 100%; }
+.demo-progress-cricle { width: 2rem; height: 2rem; }
+.nav-center .nav-title { font-family: \5fae\8f6f\96c5\9ed1; }
+@font-face { font-family: 'demo-icons'; src: url('http://at.alicdn.com/t/font_1474965703_1820433.ttf') format('truetype'); }
+[class^="demo-icons-"]:before, [class*=" demo-icons-"]:before { font-family: 'demo-icons'; font-size: .5rem; }
+.demo-icons-weixin:before { content: '\e60b'; }
+.demo-icons-me:before { content: '\e610'; }
+.demo-icons-contact:before { content: '\e60c'; }
+.demo-icons-discover:before { content: '\e611'; }
+.demo-icons-phone:before { content: '\e60e'; }
+.demo-icons-tel:before { content: '\e616'; }
+.demo-icons-like:before { content: '\e60d'; }
+.demo-icons-order:before { content: '\e60f'; }
+.demo-icons-button:before { content: '\e602'; color: #FF685E; }
+.demo-icons-sendcode:before { content: '\e60a'; color: #8B78E2; }
+.demo-icons-dialog:before { content: '\e603'; color: #3CC51E; }
+.demo-icons-keyboard:before { content: '\e613'; color: #FC746C; }
+.demo-icons-cell:before { content: '\e600'; color: #FC746C; }
+.demo-icons-tabs:before { content: '\e607'; color: #FF8D20; }
+.demo-icons-list:before { content: '\e605'; color: #FF8D20; }
+.demo-icons-actionsheet:before { content: '\e601'; color: #3CCD1C; }
+.demo-icons-progressbar:before { content: '\e612'; color: #FF8D20; }
+.demo-icons-icons:before { content: '\e604'; color: #8B78E2; }
+.demo-icons-tabbar:before { content: '\e606'; color: #3CC51E; }
+.demo-icons-badge:before { content: '\e608'; color: #EF4F4F; }
+.demo-icons-grids:before { content: '\e609'; color: #8B78E2; }
+.demo-icons-slider:before { content: '\e614'; color: #8B78E2; }
+.demo-icons-spinner:before { content: '\e615'; color: #FF8D20; }
+.demo-icons-cityselect:before { content: '\e617'; color: #FF685E; }
+@font-face { font-family: 'demo-category-icons'; src: url('http://at.alicdn.com/t/font_1477296366_4593668.ttf') format('truetype'); }
+[class^="demo-icons-category"]:before, [class*=" demo-icons-category"]:before { font-family: 'demo-category-icons'; font-size: .48rem; color: #5B5D5C; }
+.demo-icons-category1:before { content: '\E604'; }
+.demo-icons-category2:before { content: '\E602'; }
+.demo-icons-category3:before { content: '\E605'; }
+.demo-icons-category4:before { content: '\E603'; }
+.demo-icons-category5:before { content: '\E607'; }
+.demo-icons-category6:before { content: '\E600'; }
+.demo-icons-category7:before { content: '\E606'; }
+.demo-icons-category8:before { content: '\E601'; }
+.cell-item { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; position: relative; padding-left: 0.24rem; overflow: hidden; }
+.cell-left { color: #333; font-size: 0.3rem; white-space: nowrap; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; }
+.cell-right { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; width: 100%; min-height: 1rem; color: #525252; text-align: right; font-size: 0.26rem; padding-right: 0.24rem; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; -webkit-box-pack: end; -webkit-justify-content: flex-end; -ms-flex-pack: end; justify-content: flex-end; }
+.cell-input { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; height: 1rem; border: none; font-size: 0.3rem; background: transparent; color: #555; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: start; -webkit-justify-content: flex-start; -ms-flex-pack: start; justify-content: flex-start; text-align: left; }
+.cell-arrow:after { margin-left: .05rem; margin-right: -0.08rem; display: block; font-family: 'YDUI-INLAY'; font-size: 0.34rem; color: #C9C9C9; content: '\e608'; }
+.m-celltitle { padding: 0 0.24rem 0.1rem; font-size: 0.3rem; text-align: left; color: #888; position: relative; z-index: 1; }
diff --git a/世界城市/css/ydui.css b/世界城市/css/ydui.css
new file mode 100644
index 0000000..145510d
--- /dev/null
+++ b/世界城市/css/ydui.css
@@ -0,0 +1,76 @@
+/*!
+ * YDUI v1.0.0 (http://www.ydui.com)
+ * Copyright 2011-2017 ydcss, Inc.
+ * Licensed under MIT (https://github.com/ydcss/ydui/blob/master/LICENSE)
+ */
+
+@font-face { font-family: 'YDUI-INLAY'; src: url(data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXSUPwQAAAD8AAAAHE9TLzJXb1y3AAABGAAAAGBjbWFwy6khrwAAAXgAAAFKY3Z0IA1l/vQAABJEAAAAJGZwZ20w956VAAASaAAACZZnYXNwAAAAEAAAEjwAAAAIZ2x5ZqWmNeQAAALEAAALuGhlYWQLb+AxAAAOfAAAADZoaGVhB7YDhgAADrQAAAAkaG10eA2lAzsAAA7YAAAALmxvY2EdJhj4AAAPCAAAACZtYXhwATQKKwAADzAAAAAgbmFtZfQpHZgAAA9QAAACMXBvc3S0CzjGAAARhAAAALZwcmVwpbm+ZgAAHAAAAACVAAAAAQAAAADMPaLPAAAAANQrThoAAAAA1CtOGgAEA/4B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYNA4D/gABcA4AAgAAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABEAAMAAQAAABwABAAoAAAABgAEAAEAAgB45g3//wAAAHjmAP///4saBAABAAAAAAAAAAABBgAAAQAAAAAAAAABAgAAAAIAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAIgAAATICqgADAAcAKUAmAAAAAwIAA1cAAgEBAksAAgIBTwQBAQIBQwAABwYFBAADAAMRBQ8rMxEhESczESMiARDuzMwCqv1WIgJmAAAABQAs/+EDvAMYABYAMAA6AFIAXgF3S7ATUFhASgIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICgYJXhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwF1BYQEsCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AYUFhATAIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMBGYACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbQE4CAQANDg0ADmYAAw4BDgMBZgABCA4BCGQQAQkICggJCmYRAQwGBAYMBGYACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkJZWVlAKFNTOzsyMRcXU15TXltYO1I7UktDNzUxOjI6FzAXMFERMRgRKBVAExYrAQYrASIOAh0BITU0JjU0LgIrARUhBRUUFhQOAiMGJisBJyEHKwEiJyIuAj0BFyIGFBYzMjY0JhcGBw4DHgE7BjI2Jy4BJyYnATU0PgI7ATIWHQEBGRsaUxIlHBIDkAEKGCcehf5KAqIBFR8jDg4fDiAt/kksHSIUGRkgEwh3DBISDA0SEowIBgULBAIEDw4lQ1FQQCQXFgkFCQUFBv6kBQ8aFbwfKQIfAQwZJxpMKRAcBA0gGxJhiDQXOjolFwkBAYCAARMbIA6nPxEaEREaEXwaFhMkDhANCBgaDSMRExQBd+QLGBMMHSbjAAACAEAAGgO/AuYABQAGAAi1BgYFAQImKwkCNxcBFwO//br+x3PGAe1ZAoz9jgGTYs8BploAAwBA/8ADwANAAA8AIgAjADRAMSMBAgMdAQECAkAAAwACAAMCZgACAQACAWQAAAMBAE0AAAABUQABAAFFIB8bGhcQBBArACIOAhQeAjI+AjQuAREBDgEnJi8BJjQ2Mh8BATYyFhQHAlu2pnhHR3imtqZ4R0d4/t4KGwwEBKcMGCILiwEFCyIYDANAR3imtqZ4R0d4prameP77/t8KBAcDBKYMIhcLigEEDBciDAAAAAABAED/wAPAA0AACwAlQCIAAQAEAUsCAQAFAQMEAANXAAEBBE8ABAEEQxEREREREAYUKwEhESMRIRUhETMRIQPA/n9+/n8BgX4BgQG/AYH+f37+fwGBAAAABQBA/8EDvgNAAA8AEAA0AEIAQwCiQA4zEhEQBAABAUBDAQYBP0uwFlBYQCAEAwICBwJoAAUGBWkAAQAABgEAWgAHBwpBCAEGBgsGQhtLsCBQWEAiBAMCAgcCaAgBBgAFAAYFZgAFBWcAAQAABgEAWgAHBwoHQhtAKQQDAgIHAmgABwEHaAgBBgAFAAYFZgAFBWcAAQAAAU0AAQEAUgAAAQBGWVlAEDY1PTw1QjZCLBERHhcUCRQrABQeAjI+AjQuAiIOAQ8BNTc2NzY3Njc2NzI3MxcWFxYXFhcWBwYHBgcGJyYnJicmJzQBMj4BNTQuASIOARQeATMBICI/UlpSPyIiP1JaUj8i4AEIARVESWtBRQEVGQc+OnxTWAwGDQ8mQG1xgUM6u0sZBQG+a7VoabTVtWlptWoBrVpSPyIiP1JaUj8iIj9/DxwGRANpVVosGwUCAQMTKGVrikA/SkFsOz0IBBdHuDxEAf6cabRra7RpabTWtGkAAAMAQP/BA74DQAAlADMANAA6QDckAQADBAUBQDQBBAE/AgECAAAFBAAFWQYBBAMDBE0GAQQEA1EAAwQDRScmLi0mMyczLBIRGwcSKxM1MDc2NzY3Njc2NzI3MzAXFhcWFxYXFgcGBwYHBicmJyYnJic0ATI+ATU0LgEiDgEUHgEzQAEIARVESWtBRQEVGQc+OnxTWAwGDQ8mQG1xgUM6ukwZBQG+a7VoabTVtWlptWoBcRwGRANpVVosGwUCAQMTKWRrikA/SkFsOz0IBBdHuDxEAf6cabRra7RpabTWtGkAAgBB/8EDvwM/AA8AIgA2QDMeAQIAFxYVFAQBAgJAAAIAAQACAWYDAQACAQBNAwEAAAFRAAEAAUUCACAfCgcADwIPBA4rASEiBhURFBYzITI2NRE0JgMOAhUDNxc+BD8BFyIOAQNA/YA0S0s0AoA0S0vuMGY2+kCaCB9eW3AhIRQBN10DP0s0/YA0S0s0AoA0S/5bR65jAgEaRpMOMX1hYxkaQD5yAAAAAwBB/8EDvwM/AA8AIAAhADFALiEBAj4EAQIFAQABAgBZAAEDAwFNAAEBA1EAAwEDRQEAIB8aFxIQCQYADwEOBg4rATIWFREUBiMhIiY1ETQ2MyUhIgYVERQWMyEyNjURNCYjMQNAHCMjHP2AHCMjHAKA/YA0S0s0AoA0S0s0Av8jHP2AHCMjHAKAHCNASzT9gDRLSzQCgDRLAAAAAgD9/8EDAwNAAAUABgAItQYGBQMCJislCQE3CQEnAvb+rAFUDf36AgYNWQEnASeZ/kD+QZgAAAACAP3/wQMDA0AABQAGAAi1BgYDAQImKyUHCQEXCQEBCg0CBv36DQFU/qxZmAG/AcCZ/tn+2QAAAAIAQABzA8ACjQAgAFgASEBFCwEGAFhVVFBNRkQ9PDQqKCEUEA8DBgJAAQEACAcCBgMABlkFBAIDAgIDTQUEAgMDAlIAAgMCRklIQkFAPyYRF08hFQkUKyURLgMjJyEiBg8CBg8BFRQWHwIeATsBIT4EJQ4BIwciJi8CBwYjIicmNTQ/AScuAT0BNDY/AT4BMzcyFh8CNzYzFhcWFRYPARceARUXFAYHA8ABFRwcCQr92QYJAwLdAwICBAIC2gQJAwMCKhwoEgoB/usECgQDBwwCAkhIBxAMCQoKR0gFBAUCAgQLAwMHDAIDSEgJDwsKCAMMR0cEBQEFA9QBVhspEgwBAwIC9AMFBwIGCgID8gQDARYZIQs7AwQBBQICSEgJCAoNEAhHSAULBAMGCwICBAUBBQMCSEgKAQkHDgwLSEcEDAQEBgsDAAACACj/gAPYA4AAGgAgABxAGSAfHh0cGxEHAD0CAQIAAF8AAAAaABobAw8rAQYuAycOBCMQFxYfAT4HJgEnNxcTFwPWOo51aTYDJn10eTcI7WZyClWNYEorHQoDAf35viaF+DkCzAYiNTwlAi9IIxYE/k36bS4ELXN2gXhxXkcn/faYOXIBHSYAAQBAAUEDwAG/AAUAH0AcAgEAAQEASwIBAAABTwABAAFDAQAEAgAFAQUDDisBIRUpATUCP/4BAf8BgQG/fn4AAAEAx/++AzkDQgAGABxAGQUBAT0AAAEAaAMCAgEBXwAAAAYABhERBBArJREjESMJAQJTmvIBMAFC9QJN/bP+yQE3AAAABACz/8YDTAM5ADEAMgBJAEoAdkAcREM6OSwlJB4YFw8LAAMOAQEAAkBKAQI+MgEBPUuwF1BYQBoFAQIDAmgAAAMBAwABZgQBAQEDUQADAwoBQhtAHwUBAgMCaAAAAwEDAAFmAAMAAQNNAAMDAU8EAQEDAUNZQBE0MwAAPz4zSTRJADEAMRgGDysFAzA1ND4DFhceAR8BEz4EHgEXEz4DFhc+AxYXNz4DHgEXERQOAQchEyIGFRQWFzUmNTQ2MhYVFAcVPgE1NCYjAY/cAQUMEiAUGScHBgICBA4PFRUXCwECCh4fLBUDCBweLBcDAg4OFhQZDAQZFP50AlyCPTI4YYlhNjM8gls6ARIGAxQQEQgCCQsoDg4BoQIGDwoHAxMS/vgDCxQFExoECxYGFBwGBBIMCAYbGP60AwodDQNzglw8Zh1FMklFYWFFSDJGHmU8XIIAAAEAAAABAACsCmTLXw889QALBAAAAAAA1CtOGgAAAADUK04aACL/gAPYA4AAAAAIAAIAAAAAAAAAAQAAA4D/gABcBAAAAAAAA9gAAQAAAAAAAAAAAAAAAAAAAAUBdgAiAAAAAAFVAAAD6QAsBAAAQABAAEAAQABAAEEAQQD9AP0AQAAoAEAAxwCzAAAAAAAoACgAKAFkAX4B1gICAr4DLgOCA9AD7AQIBKwE8AUQBTIF3AAAAAEAAAASAF8ABQAAAAAAAgAmADQAbAAAAIoJlgAAAAAAAAAMAJYAAQAAAAAAAQAIAAAAAQAAAAAAAgAGAAgAAQAAAAAAAwAlAA4AAQAAAAAABAAIADMAAQAAAAAABQBGADsAAQAAAAAABgAIAIEAAwABBAkAAQAQAIkAAwABBAkAAgAMAJkAAwABBAkAAwBKAKUAAwABBAkABAAQAO8AAwABBAkABQCMAP8AAwABBAkABgAQAYtpY29uZm9udE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBpY29uZm9udCA6IDE4LTEwLTIwMTZpY29uZm9udFZlcnNpb24gMS4wIDsgdHRmYXV0b2hpbnQgKHYwLjk0KSAtbCA4IC1yIDUwIC1HIDIwMCAteCAxNCAtdyAiRyIgLWYgLXNpY29uZm9udABpAGMAbwBuAGYAbwBuAHQATQBlAGQAaQB1AG0ARgBvAG4AdABGAG8AcgBnAGUAIAAyAC4AMAAgADoAIABpAGMAbwBuAGYAbwBuAHQAIAA6ACAAMQA4AC0AMQAwAC0AMgAwADEANgBpAGMAbwBuAGYAbwBuAHQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBpAGMAbwBuAGYAbwBuAHQAAAAAAgAAAAAAAP+DADIAAAAAAAAAAAAAAAAAAAAAAAAAAAASAAAAAQACAFsBAgEDAQQBBQEGAQcBCAEJAQoBCwEMAQ0BDgEPB3VuaUU2MDAHdW5pRTYwMQd1bmlFNjAyB3VuaUU2MDMHdW5pRTYwNAd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQd1bmlFNjBCB3VuaUU2MEMHdW5pRTYwRAAAAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP+AAxj/4QOA/4CwACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA) format('truetype'); }
+*, *:before, *:after { box-sizing: border-box; outline: none; }
+html, body { height: 100%; }
+body { background-color: #F5F5F5; font-size: 12px; -webkit-font-smoothing: antialiased; font-family: arial, sans-serif; }
+body, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, legend, button, input, textarea, th, td, iframe { margin: 0; padding: 0; }
+img, article, aside, details, figcaption, figure, footer, header, menu, nav, section, summary, time, mark, audio, video { display: block; margin: 0; padding: 0; }
+h1, h2, h3, h4, h5, h6 { font-size: 100%; }
+fieldset, img { border: 0; }
+address, caption, cite, dfn, em, th, var, i, em { font-style: normal; font-weight: normal; }
+ol, ul { list-style: none; }
+a { text-decoration: none; color: inherit; }
+a:hover { text-decoration: none; }
+a, label, button, input, select { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
+input, select, button { font: 100% tahoma, \5b8b\4f53, arial; vertical-align: baseline; border-radius: 0; background-color: transparent; -webkit-appearance: none; -moz-appearance: none; }
+button::-moz-focus-inner, input[type="reset"]::-moz-focus-inner, input[type="button"]::-moz-focus-inner, input[type="submit"]::-moz-focus-inner, input[type="file"] > input[type="button"]::-moz-focus-inner {
+ border: none;
+}
+input[type=checkbox], input[type=radio] { vertical-align: middle; }
+input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
+ -webkit-appearance: none !important;
+ -moz-appearance: none !important;
+ margin: 0;
+}
+input:-webkit-autofill {
+ -webkit-box-shadow: 0 0 0 1000px white inset;
+}
+textarea { outline: none; border-radius: 0; -webkit-appearance: none; -moz-appearance: none; overflow: auto; resize: none; font: 100% tahoma, \5b8b\4f53, arial; }
+table { border-collapse: collapse; border-spacing: 0; }
+.g-view { margin: 0 auto; max-width: 750px; min-width: 320px; }
+.g-view:before { content: ''; display: block; width: 100%; height: 0.9rem; }
+.g-view:after { content: ''; display: block; width: 100%; height: 1.5rem; }
+.g-flexview { height: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-orient: vertical; -webkit-box-direction: normal; -webkit-flex-direction: column; -ms-flex-direction: column; flex-direction: column; margin: 0 auto; max-width: 750px; min-width: 320px; }
+.g-scrollview { width: 100%; height: 100%; -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; position: relative; margin-bottom: -1px; }
+.g-scrollview:after { content: ''; display: block; width: 100%; height: 0.5rem; }
+.ios .g-scrollview { margin-top: 1px; }
+.hairline .g-scrollview { margin-top: 0.5px; }
+.g-fix-ios-overflow-scrolling-bug { -webkit-overflow-scrolling: auto; }
+.mask-black-dialog { background-color: rgba(0, 0, 0, 0.4); position: fixed; z-index: 1500; bottom: 0; right: 0; left: 0; top: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; }
+.mask-black { background-color: rgba(0, 0, 0, 0.4); position: fixed; z-index: 500; bottom: 0; right: 0; left: 0; top: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; }
+.mask-white-dialog { background-color: rgba(0, 0, 0, 0); position: fixed; z-index: 1500; bottom: 0; right: 0; left: 0; top: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; }
+.mask-white { background-color: rgba(0, 0, 0, 0); position: fixed; z-index: 500; bottom: 0; right: 0; left: 0; top: 0; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -webkit-justify-content: center; -ms-flex-pack: center; justify-content: center; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; }
+.m-cityselect { position: fixed; bottom: 0; left: 0; width: 100%; height: 75%; z-index: 1000; background-color: #fff; -webkit-transform: translate(0, 100%); transform: translate(0, 100%); -webkit-transition: -webkit-transform .3s; transition: -webkit-transform .3s; transition: transform .3s; transition: transform .3s, -webkit-transform .3s; }
+.m-cityselect.brouce-in { -webkit-transform: translate(0, 0); transform: translate(0, 0); }
+.cityselect-header { position: absolute; top: 0; left: 0; width: 100%; z-index: 1; }
+.cityselect-header:after { content: ''; position: absolute; z-index: 0; bottom: 0; left: 0; width: 100%; height: 1px; border-bottom: 1px solid #D9D9D9; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
+.cityselect-title { width: 100%; font-size: .3rem; text-align: center; height: 45px; line-height: 45px; position: relative; }
+.cityselect-title:after { content: ''; position: absolute; z-index: 0; bottom: 0; left: 0; width: 100%; height: 1px; border-bottom: 1px solid #B2B2B2; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
+.cityselect-nav { width: 100%; padding-left: .2rem; overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
+.cityselect-nav > a { font-size: .26rem; color: #222; display: block; height: 40px; line-height: 46px; padding: 0 .2rem; position: relative; margin-right: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40%; }
+.cityselect-nav > a.crt { color: #F23030; }
+.cityselect-nav > a.crt:after { content: ''; width: 100%; height: 2px; background-color: #F23030; position: absolute; bottom: 0; left: 0; z-index: 2; }
+.cityselect-content { height: 100%; padding-top: 85px; width: 100%; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; }
+.cityselect-content.cityselect-move-animate { -webkit-transition: -webkit-transform .3s; transition: -webkit-transform .3s; transition: transform .3s; transition: transform .3s, -webkit-transform .3s; }
+.cityselect-content.cityselect-next { -webkit-transform: translate(-50%, 0); transform: translate(-50%, 0); }
+.cityselect-content.cityselect-prev { -webkit-transform: translate(0, 0); transform: translate(0, 0); }
+.cityselect-content.cityselect-next-two { -webkit-transform: translate(-50%, 0); transform: translate(-100%, 0); }
+.cityselect-content > .cityselect-item { display: block; height: inherit; width: 50%; /* for old android */
+-webkit-box-flex: 0; -webkit-flex: 0 0 50%; -ms-flex: 0 0 50%; flex: 0 0 50%; overflow-y: auto; -webkit-overflow-scrolling: touch; background-color: #FFF; }
+.cityselect-content > .cityselect-item::-webkit-scrollbar {
+ width: 0;
+}
+.cityselect-content > .cityselect-item:nth-child(2n) { background-color: #F5F5F5; }
+.cityselect-item-box { width: 100%; height: inherit; display: block; padding: 0 .4rem; }
+.cityselect-item-box > a { color: #333; font-size: .26rem; height: 40px; line-height: 40px; overflow: hidden; display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; display: flex; -webkit-box-align: center; -webkit-align-items: center; -ms-flex-align: center; align-items: center; width: 100%; position: relative; z-index: 1; }
+.cityselect-item-box > a:before { content: ''; position: absolute; z-index: 0; bottom: 0; left: 0; width: 100%; height: 1px; border-bottom: 1px solid #D9D9D9; -webkit-transform: scaleY(0.5); transform: scaleY(0.5); -webkit-transform-origin: 0 100%; transform-origin: 0 100%; }
+.cityselect-item-box > a:active { background: none;/* for firefox */
+}
+.cityselect-item-box > a span { -webkit-box-flex: 1; -webkit-flex: 1; -ms-flex: 1; flex: 1; display: block; }
+.cityselect-item-box > a.crt { color: #F23030; }
+.cityselect-item-box > a.crt:after { display: block; content: '\E600'; font-family: 'YDUI-INLAY'; }
diff --git a/世界城市/index.html b/世界城市/index.html
new file mode 100644
index 0000000..919302f
--- /dev/null
+++ b/世界城市/index.html
@@ -0,0 +1,90 @@
+
+
+
+
+ CitySelect
+
+
+
+
+
+
+
+
+
+
+
+
+
a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis.
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim.
+
+
+
+
+
+
+
+
+
+
+
Web Design
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim.
+
+
+
+
+
+
+
+
+
+
+
Web Design
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim.
+
+
+
+
+
+
+
+
+
+
+
Web Design
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
WHAT I DID
+
MY EXPERIENCE
+
+
+
+
+
+
2016
+
2015
+
2014
+
2013
+
2012
+
+
+
+
+
+
+
+
+
COMPANY NAME
+
+
+
Lorem ipsum dolor sit amet.Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus
+
+
+
+
+
+
+
+
+
COMPANY NAME
+
+
+
Lorem ipsum dolor sit amet.Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus
+
+
+
+
+
+
+
+
+
+
+
COMPANY NAME
+
+
+
Lorem ipsum dolor sit amet.Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus
+
+
+
+
+
+
+
+
+
COMPANY NAME
+
+
+
Lorem ipsum dolor sit amet.Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus
+
+
+
+
+
+
+
+
COMPANY NAME
+
+
+
Lorem ipsum dolor sit amet.Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Neque porro quisquam est, qui dolorem ipsum quia dolor sit amet.
Lorem ipsum dolor sit amet Integer gravida,Lorem ipsum dolor sit amet Integer gravida velit,Ming sits in the corner the whole day. She's into crochet. quis dolor tristiqumsan.Mirum est notare quam littera gothica, quam nunc putamus parum claram, anteposuerit litterarum formas humanitatis per seacula quarta decima et quinta decima. velit quis dolor tristiqumsan.
+
Lorem ipsum dolor sit amet. Integer gravida velit quis dolor tristiqumsan.anteposuerit litterarum formas humanitatis per seacula amet Integer gravida velit.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Image-Title
+
+
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/个人主页/js/bootstrap.js b/个人主页/js/bootstrap.js
new file mode 100644
index 0000000..1c88b71
--- /dev/null
+++ b/个人主页/js/bootstrap.js
@@ -0,0 +1,2317 @@
+/*!
+ * Bootstrap v3.3.4 (http://getbootstrap.com)
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ */
+
+if (typeof jQuery === 'undefined') {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery')
+}
+
++function ($) {
+ 'use strict';
+ var version = $.fn.jquery.split(' ')[0].split('.')
+ if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1)) {
+ throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher')
+ }
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: transition.js v3.3.4
+ * http://getbootstrap.com/javascript/#transitions
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
+ // ============================================================
+
+ function transitionEnd() {
+ var el = document.createElement('bootstrap')
+
+ var transEndEventNames = {
+ WebkitTransition : 'webkitTransitionEnd',
+ MozTransition : 'transitionend',
+ OTransition : 'oTransitionEnd otransitionend',
+ transition : 'transitionend'
+ }
+
+ for (var name in transEndEventNames) {
+ if (el.style[name] !== undefined) {
+ return { end: transEndEventNames[name] }
+ }
+ }
+
+ return false // explicit for ie8 ( ._.)
+ }
+
+ // http://blog.alexmaccaw.com/css-transitions
+ $.fn.emulateTransitionEnd = function (duration) {
+ var called = false
+ var $el = this
+ $(this).one('bsTransitionEnd', function () { called = true })
+ var callback = function () { if (!called) $($el).trigger($.support.transition.end) }
+ setTimeout(callback, duration)
+ return this
+ }
+
+ $(function () {
+ $.support.transition = transitionEnd()
+
+ if (!$.support.transition) return
+
+ $.event.special.bsTransitionEnd = {
+ bindType: $.support.transition.end,
+ delegateType: $.support.transition.end,
+ handle: function (e) {
+ if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments)
+ }
+ }
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: alert.js v3.3.4
+ * http://getbootstrap.com/javascript/#alerts
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // ALERT CLASS DEFINITION
+ // ======================
+
+ var dismiss = '[data-dismiss="alert"]'
+ var Alert = function (el) {
+ $(el).on('click', dismiss, this.close)
+ }
+
+ Alert.VERSION = '3.3.4'
+
+ Alert.TRANSITION_DURATION = 150
+
+ Alert.prototype.close = function (e) {
+ var $this = $(this)
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = $(selector)
+
+ if (e) e.preventDefault()
+
+ if (!$parent.length) {
+ $parent = $this.closest('.alert')
+ }
+
+ $parent.trigger(e = $.Event('close.bs.alert'))
+
+ if (e.isDefaultPrevented()) return
+
+ $parent.removeClass('in')
+
+ function removeElement() {
+ // detach from parent, fire event then clean up data
+ $parent.detach().trigger('closed.bs.alert').remove()
+ }
+
+ $.support.transition && $parent.hasClass('fade') ?
+ $parent
+ .one('bsTransitionEnd', removeElement)
+ .emulateTransitionEnd(Alert.TRANSITION_DURATION) :
+ removeElement()
+ }
+
+
+ // ALERT PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.alert')
+
+ if (!data) $this.data('bs.alert', (data = new Alert(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.alert
+
+ $.fn.alert = Plugin
+ $.fn.alert.Constructor = Alert
+
+
+ // ALERT NO CONFLICT
+ // =================
+
+ $.fn.alert.noConflict = function () {
+ $.fn.alert = old
+ return this
+ }
+
+
+ // ALERT DATA-API
+ // ==============
+
+ $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: button.js v3.3.4
+ * http://getbootstrap.com/javascript/#buttons
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // BUTTON PUBLIC CLASS DEFINITION
+ // ==============================
+
+ var Button = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Button.DEFAULTS, options)
+ this.isLoading = false
+ }
+
+ Button.VERSION = '3.3.4'
+
+ Button.DEFAULTS = {
+ loadingText: 'loading...'
+ }
+
+ Button.prototype.setState = function (state) {
+ var d = 'disabled'
+ var $el = this.$element
+ var val = $el.is('input') ? 'val' : 'html'
+ var data = $el.data()
+
+ state = state + 'Text'
+
+ if (data.resetText == null) $el.data('resetText', $el[val]())
+
+ // push to event loop to allow forms to submit
+ setTimeout($.proxy(function () {
+ $el[val](data[state] == null ? this.options[state] : data[state])
+
+ if (state == 'loadingText') {
+ this.isLoading = true
+ $el.addClass(d).attr(d, d)
+ } else if (this.isLoading) {
+ this.isLoading = false
+ $el.removeClass(d).removeAttr(d)
+ }
+ }, this), 0)
+ }
+
+ Button.prototype.toggle = function () {
+ var changed = true
+ var $parent = this.$element.closest('[data-toggle="buttons"]')
+
+ if ($parent.length) {
+ var $input = this.$element.find('input')
+ if ($input.prop('type') == 'radio') {
+ if ($input.prop('checked') && this.$element.hasClass('active')) changed = false
+ else $parent.find('.active').removeClass('active')
+ }
+ if (changed) $input.prop('checked', !this.$element.hasClass('active')).trigger('change')
+ } else {
+ this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
+ }
+
+ if (changed) this.$element.toggleClass('active')
+ }
+
+
+ // BUTTON PLUGIN DEFINITION
+ // ========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.button')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.button', (data = new Button(this, options)))
+
+ if (option == 'toggle') data.toggle()
+ else if (option) data.setState(option)
+ })
+ }
+
+ var old = $.fn.button
+
+ $.fn.button = Plugin
+ $.fn.button.Constructor = Button
+
+
+ // BUTTON NO CONFLICT
+ // ==================
+
+ $.fn.button.noConflict = function () {
+ $.fn.button = old
+ return this
+ }
+
+
+ // BUTTON DATA-API
+ // ===============
+
+ $(document)
+ .on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ var $btn = $(e.target)
+ if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
+ Plugin.call($btn, 'toggle')
+ e.preventDefault()
+ })
+ .on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
+ $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: carousel.js v3.3.4
+ * http://getbootstrap.com/javascript/#carousel
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // CAROUSEL CLASS DEFINITION
+ // =========================
+
+ var Carousel = function (element, options) {
+ this.$element = $(element)
+ this.$indicators = this.$element.find('.carousel-indicators')
+ this.options = options
+ this.paused = null
+ this.sliding = null
+ this.interval = null
+ this.$active = null
+ this.$items = null
+
+ this.options.keyboard && this.$element.on('keydown.bs.carousel', $.proxy(this.keydown, this))
+
+ this.options.pause == 'hover' && !('ontouchstart' in document.documentElement) && this.$element
+ .on('mouseenter.bs.carousel', $.proxy(this.pause, this))
+ .on('mouseleave.bs.carousel', $.proxy(this.cycle, this))
+ }
+
+ Carousel.VERSION = '3.3.4'
+
+ Carousel.TRANSITION_DURATION = 600
+
+ Carousel.DEFAULTS = {
+ interval: 5000,
+ pause: 'hover',
+ wrap: true,
+ keyboard: true
+ }
+
+ Carousel.prototype.keydown = function (e) {
+ if (/input|textarea/i.test(e.target.tagName)) return
+ switch (e.which) {
+ case 37: this.prev(); break
+ case 39: this.next(); break
+ default: return
+ }
+
+ e.preventDefault()
+ }
+
+ Carousel.prototype.cycle = function (e) {
+ e || (this.paused = false)
+
+ this.interval && clearInterval(this.interval)
+
+ this.options.interval
+ && !this.paused
+ && (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
+
+ return this
+ }
+
+ Carousel.prototype.getItemIndex = function (item) {
+ this.$items = item.parent().children('.item')
+ return this.$items.index(item || this.$active)
+ }
+
+ Carousel.prototype.getItemForDirection = function (direction, active) {
+ var activeIndex = this.getItemIndex(active)
+ var willWrap = (direction == 'prev' && activeIndex === 0)
+ || (direction == 'next' && activeIndex == (this.$items.length - 1))
+ if (willWrap && !this.options.wrap) return active
+ var delta = direction == 'prev' ? -1 : 1
+ var itemIndex = (activeIndex + delta) % this.$items.length
+ return this.$items.eq(itemIndex)
+ }
+
+ Carousel.prototype.to = function (pos) {
+ var that = this
+ var activeIndex = this.getItemIndex(this.$active = this.$element.find('.item.active'))
+
+ if (pos > (this.$items.length - 1) || pos < 0) return
+
+ if (this.sliding) return this.$element.one('slid.bs.carousel', function () { that.to(pos) }) // yes, "slid"
+ if (activeIndex == pos) return this.pause().cycle()
+
+ return this.slide(pos > activeIndex ? 'next' : 'prev', this.$items.eq(pos))
+ }
+
+ Carousel.prototype.pause = function (e) {
+ e || (this.paused = true)
+
+ if (this.$element.find('.next, .prev').length && $.support.transition) {
+ this.$element.trigger($.support.transition.end)
+ this.cycle(true)
+ }
+
+ this.interval = clearInterval(this.interval)
+
+ return this
+ }
+
+ Carousel.prototype.next = function () {
+ if (this.sliding) return
+ return this.slide('next')
+ }
+
+ Carousel.prototype.prev = function () {
+ if (this.sliding) return
+ return this.slide('prev')
+ }
+
+ Carousel.prototype.slide = function (type, next) {
+ var $active = this.$element.find('.item.active')
+ var $next = next || this.getItemForDirection(type, $active)
+ var isCycling = this.interval
+ var direction = type == 'next' ? 'left' : 'right'
+ var that = this
+
+ if ($next.hasClass('active')) return (this.sliding = false)
+
+ var relatedTarget = $next[0]
+ var slideEvent = $.Event('slide.bs.carousel', {
+ relatedTarget: relatedTarget,
+ direction: direction
+ })
+ this.$element.trigger(slideEvent)
+ if (slideEvent.isDefaultPrevented()) return
+
+ this.sliding = true
+
+ isCycling && this.pause()
+
+ if (this.$indicators.length) {
+ this.$indicators.find('.active').removeClass('active')
+ var $nextIndicator = $(this.$indicators.children()[this.getItemIndex($next)])
+ $nextIndicator && $nextIndicator.addClass('active')
+ }
+
+ var slidEvent = $.Event('slid.bs.carousel', { relatedTarget: relatedTarget, direction: direction }) // yes, "slid"
+ if ($.support.transition && this.$element.hasClass('slide')) {
+ $next.addClass(type)
+ $next[0].offsetWidth // force reflow
+ $active.addClass(direction)
+ $next.addClass(direction)
+ $active
+ .one('bsTransitionEnd', function () {
+ $next.removeClass([type, direction].join(' ')).addClass('active')
+ $active.removeClass(['active', direction].join(' '))
+ that.sliding = false
+ setTimeout(function () {
+ that.$element.trigger(slidEvent)
+ }, 0)
+ })
+ .emulateTransitionEnd(Carousel.TRANSITION_DURATION)
+ } else {
+ $active.removeClass('active')
+ $next.addClass('active')
+ this.sliding = false
+ this.$element.trigger(slidEvent)
+ }
+
+ isCycling && this.cycle()
+
+ return this
+ }
+
+
+ // CAROUSEL PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.carousel')
+ var options = $.extend({}, Carousel.DEFAULTS, $this.data(), typeof option == 'object' && option)
+ var action = typeof option == 'string' ? option : options.slide
+
+ if (!data) $this.data('bs.carousel', (data = new Carousel(this, options)))
+ if (typeof option == 'number') data.to(option)
+ else if (action) data[action]()
+ else if (options.interval) data.pause().cycle()
+ })
+ }
+
+ var old = $.fn.carousel
+
+ $.fn.carousel = Plugin
+ $.fn.carousel.Constructor = Carousel
+
+
+ // CAROUSEL NO CONFLICT
+ // ====================
+
+ $.fn.carousel.noConflict = function () {
+ $.fn.carousel = old
+ return this
+ }
+
+
+ // CAROUSEL DATA-API
+ // =================
+
+ var clickHandler = function (e) {
+ var href
+ var $this = $(this)
+ var $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) // strip for ie7
+ if (!$target.hasClass('carousel')) return
+ var options = $.extend({}, $target.data(), $this.data())
+ var slideIndex = $this.attr('data-slide-to')
+ if (slideIndex) options.interval = false
+
+ Plugin.call($target, options)
+
+ if (slideIndex) {
+ $target.data('bs.carousel').to(slideIndex)
+ }
+
+ e.preventDefault()
+ }
+
+ $(document)
+ .on('click.bs.carousel.data-api', '[data-slide]', clickHandler)
+ .on('click.bs.carousel.data-api', '[data-slide-to]', clickHandler)
+
+ $(window).on('load', function () {
+ $('[data-ride="carousel"]').each(function () {
+ var $carousel = $(this)
+ Plugin.call($carousel, $carousel.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: collapse.js v3.3.4
+ * http://getbootstrap.com/javascript/#collapse
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // COLLAPSE PUBLIC CLASS DEFINITION
+ // ================================
+
+ var Collapse = function (element, options) {
+ this.$element = $(element)
+ this.options = $.extend({}, Collapse.DEFAULTS, options)
+ this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
+ '[data-toggle="collapse"][data-target="#' + element.id + '"]')
+ this.transitioning = null
+
+ if (this.options.parent) {
+ this.$parent = this.getParent()
+ } else {
+ this.addAriaAndCollapsedClass(this.$element, this.$trigger)
+ }
+
+ if (this.options.toggle) this.toggle()
+ }
+
+ Collapse.VERSION = '3.3.4'
+
+ Collapse.TRANSITION_DURATION = 350
+
+ Collapse.DEFAULTS = {
+ toggle: true
+ }
+
+ Collapse.prototype.dimension = function () {
+ var hasWidth = this.$element.hasClass('width')
+ return hasWidth ? 'width' : 'height'
+ }
+
+ Collapse.prototype.show = function () {
+ if (this.transitioning || this.$element.hasClass('in')) return
+
+ var activesData
+ var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
+
+ if (actives && actives.length) {
+ activesData = actives.data('bs.collapse')
+ if (activesData && activesData.transitioning) return
+ }
+
+ var startEvent = $.Event('show.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ if (actives && actives.length) {
+ Plugin.call(actives, 'hide')
+ activesData || actives.data('bs.collapse', null)
+ }
+
+ var dimension = this.dimension()
+
+ this.$element
+ .removeClass('collapse')
+ .addClass('collapsing')[dimension](0)
+ .attr('aria-expanded', true)
+
+ this.$trigger
+ .removeClass('collapsed')
+ .attr('aria-expanded', true)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse in')[dimension]('')
+ this.transitioning = 0
+ this.$element
+ .trigger('shown.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ var scrollSize = $.camelCase(['scroll', dimension].join('-'))
+
+ this.$element
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
+ }
+
+ Collapse.prototype.hide = function () {
+ if (this.transitioning || !this.$element.hasClass('in')) return
+
+ var startEvent = $.Event('hide.bs.collapse')
+ this.$element.trigger(startEvent)
+ if (startEvent.isDefaultPrevented()) return
+
+ var dimension = this.dimension()
+
+ this.$element[dimension](this.$element[dimension]())[0].offsetHeight
+
+ this.$element
+ .addClass('collapsing')
+ .removeClass('collapse in')
+ .attr('aria-expanded', false)
+
+ this.$trigger
+ .addClass('collapsed')
+ .attr('aria-expanded', false)
+
+ this.transitioning = 1
+
+ var complete = function () {
+ this.transitioning = 0
+ this.$element
+ .removeClass('collapsing')
+ .addClass('collapse')
+ .trigger('hidden.bs.collapse')
+ }
+
+ if (!$.support.transition) return complete.call(this)
+
+ this.$element
+ [dimension](0)
+ .one('bsTransitionEnd', $.proxy(complete, this))
+ .emulateTransitionEnd(Collapse.TRANSITION_DURATION)
+ }
+
+ Collapse.prototype.toggle = function () {
+ this[this.$element.hasClass('in') ? 'hide' : 'show']()
+ }
+
+ Collapse.prototype.getParent = function () {
+ return $(this.options.parent)
+ .find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
+ .each($.proxy(function (i, element) {
+ var $element = $(element)
+ this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
+ }, this))
+ .end()
+ }
+
+ Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
+ var isOpen = $element.hasClass('in')
+
+ $element.attr('aria-expanded', isOpen)
+ $trigger
+ .toggleClass('collapsed', !isOpen)
+ .attr('aria-expanded', isOpen)
+ }
+
+ function getTargetFromTrigger($trigger) {
+ var href
+ var target = $trigger.attr('data-target')
+ || (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
+
+ return $(target)
+ }
+
+
+ // COLLAPSE PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.collapse')
+ var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
+ if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.collapse
+
+ $.fn.collapse = Plugin
+ $.fn.collapse.Constructor = Collapse
+
+
+ // COLLAPSE NO CONFLICT
+ // ====================
+
+ $.fn.collapse.noConflict = function () {
+ $.fn.collapse = old
+ return this
+ }
+
+
+ // COLLAPSE DATA-API
+ // =================
+
+ $(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
+ var $this = $(this)
+
+ if (!$this.attr('data-target')) e.preventDefault()
+
+ var $target = getTargetFromTrigger($this)
+ var data = $target.data('bs.collapse')
+ var option = data ? 'toggle' : $this.data()
+
+ Plugin.call($target, option)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: dropdown.js v3.3.4
+ * http://getbootstrap.com/javascript/#dropdowns
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // DROPDOWN CLASS DEFINITION
+ // =========================
+
+ var backdrop = '.dropdown-backdrop'
+ var toggle = '[data-toggle="dropdown"]'
+ var Dropdown = function (element) {
+ $(element).on('click.bs.dropdown', this.toggle)
+ }
+
+ Dropdown.VERSION = '3.3.4'
+
+ Dropdown.prototype.toggle = function (e) {
+ var $this = $(this)
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ clearMenus()
+
+ if (!isActive) {
+ if ('ontouchstart' in document.documentElement && !$parent.closest('.navbar-nav').length) {
+ // if mobile we use a backdrop because click events don't delegate
+ $('').insertAfter($(this)).on('click', clearMenus)
+ }
+
+ var relatedTarget = { relatedTarget: this }
+ $parent.trigger(e = $.Event('show.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this
+ .trigger('focus')
+ .attr('aria-expanded', 'true')
+
+ $parent
+ .toggleClass('open')
+ .trigger('shown.bs.dropdown', relatedTarget)
+ }
+
+ return false
+ }
+
+ Dropdown.prototype.keydown = function (e) {
+ if (!/(38|40|27|32)/.test(e.which) || /input|textarea/i.test(e.target.tagName)) return
+
+ var $this = $(this)
+
+ e.preventDefault()
+ e.stopPropagation()
+
+ if ($this.is('.disabled, :disabled')) return
+
+ var $parent = getParent($this)
+ var isActive = $parent.hasClass('open')
+
+ if ((!isActive && e.which != 27) || (isActive && e.which == 27)) {
+ if (e.which == 27) $parent.find(toggle).trigger('focus')
+ return $this.trigger('click')
+ }
+
+ var desc = ' li:not(.disabled):visible a'
+ var $items = $parent.find('[role="menu"]' + desc + ', [role="listbox"]' + desc)
+
+ if (!$items.length) return
+
+ var index = $items.index(e.target)
+
+ if (e.which == 38 && index > 0) index-- // up
+ if (e.which == 40 && index < $items.length - 1) index++ // down
+ if (!~index) index = 0
+
+ $items.eq(index).trigger('focus')
+ }
+
+ function clearMenus(e) {
+ if (e && e.which === 3) return
+ $(backdrop).remove()
+ $(toggle).each(function () {
+ var $this = $(this)
+ var $parent = getParent($this)
+ var relatedTarget = { relatedTarget: this }
+
+ if (!$parent.hasClass('open')) return
+
+ $parent.trigger(e = $.Event('hide.bs.dropdown', relatedTarget))
+
+ if (e.isDefaultPrevented()) return
+
+ $this.attr('aria-expanded', 'false')
+ $parent.removeClass('open').trigger('hidden.bs.dropdown', relatedTarget)
+ })
+ }
+
+ function getParent($this) {
+ var selector = $this.attr('data-target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && /#[A-Za-z]/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ var $parent = selector && $(selector)
+
+ return $parent && $parent.length ? $parent : $this.parent()
+ }
+
+
+ // DROPDOWN PLUGIN DEFINITION
+ // ==========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.dropdown')
+
+ if (!data) $this.data('bs.dropdown', (data = new Dropdown(this)))
+ if (typeof option == 'string') data[option].call($this)
+ })
+ }
+
+ var old = $.fn.dropdown
+
+ $.fn.dropdown = Plugin
+ $.fn.dropdown.Constructor = Dropdown
+
+
+ // DROPDOWN NO CONFLICT
+ // ====================
+
+ $.fn.dropdown.noConflict = function () {
+ $.fn.dropdown = old
+ return this
+ }
+
+
+ // APPLY TO STANDARD DROPDOWN ELEMENTS
+ // ===================================
+
+ $(document)
+ .on('click.bs.dropdown.data-api', clearMenus)
+ .on('click.bs.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
+ .on('click.bs.dropdown.data-api', toggle, Dropdown.prototype.toggle)
+ .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '[role="menu"]', Dropdown.prototype.keydown)
+ .on('keydown.bs.dropdown.data-api', '[role="listbox"]', Dropdown.prototype.keydown)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: modal.js v3.3.4
+ * http://getbootstrap.com/javascript/#modals
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // MODAL CLASS DEFINITION
+ // ======================
+
+ var Modal = function (element, options) {
+ this.options = options
+ this.$body = $(document.body)
+ this.$element = $(element)
+ this.$dialog = this.$element.find('.modal-dialog')
+ this.$backdrop = null
+ this.isShown = null
+ this.originalBodyPad = null
+ this.scrollbarWidth = 0
+ this.ignoreBackdropClick = false
+
+ if (this.options.remote) {
+ this.$element
+ .find('.modal-content')
+ .load(this.options.remote, $.proxy(function () {
+ this.$element.trigger('loaded.bs.modal')
+ }, this))
+ }
+ }
+
+ Modal.VERSION = '3.3.4'
+
+ Modal.TRANSITION_DURATION = 300
+ Modal.BACKDROP_TRANSITION_DURATION = 150
+
+ Modal.DEFAULTS = {
+ backdrop: true,
+ keyboard: true,
+ show: true
+ }
+
+ Modal.prototype.toggle = function (_relatedTarget) {
+ return this.isShown ? this.hide() : this.show(_relatedTarget)
+ }
+
+ Modal.prototype.show = function (_relatedTarget) {
+ var that = this
+ var e = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
+
+ this.$element.trigger(e)
+
+ if (this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = true
+
+ this.checkScrollbar()
+ this.setScrollbar()
+ this.$body.addClass('modal-open')
+
+ this.escape()
+ this.resize()
+
+ this.$element.on('click.dismiss.bs.modal', '[data-dismiss="modal"]', $.proxy(this.hide, this))
+
+ this.$dialog.on('mousedown.dismiss.bs.modal', function () {
+ that.$element.one('mouseup.dismiss.bs.modal', function (e) {
+ if ($(e.target).is(that.$element)) that.ignoreBackdropClick = true
+ })
+ })
+
+ this.backdrop(function () {
+ var transition = $.support.transition && that.$element.hasClass('fade')
+
+ if (!that.$element.parent().length) {
+ that.$element.appendTo(that.$body) // don't move modals dom position
+ }
+
+ that.$element
+ .show()
+ .scrollTop(0)
+
+ that.adjustDialog()
+
+ if (transition) {
+ that.$element[0].offsetWidth // force reflow
+ }
+
+ that.$element
+ .addClass('in')
+ .attr('aria-hidden', false)
+
+ that.enforceFocus()
+
+ var e = $.Event('shown.bs.modal', { relatedTarget: _relatedTarget })
+
+ transition ?
+ that.$dialog // wait for modal to slide in
+ .one('bsTransitionEnd', function () {
+ that.$element.trigger('focus').trigger(e)
+ })
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ that.$element.trigger('focus').trigger(e)
+ })
+ }
+
+ Modal.prototype.hide = function (e) {
+ if (e) e.preventDefault()
+
+ e = $.Event('hide.bs.modal')
+
+ this.$element.trigger(e)
+
+ if (!this.isShown || e.isDefaultPrevented()) return
+
+ this.isShown = false
+
+ this.escape()
+ this.resize()
+
+ $(document).off('focusin.bs.modal')
+
+ this.$element
+ .removeClass('in')
+ .attr('aria-hidden', true)
+ .off('click.dismiss.bs.modal')
+ .off('mouseup.dismiss.bs.modal')
+
+ this.$dialog.off('mousedown.dismiss.bs.modal')
+
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$element
+ .one('bsTransitionEnd', $.proxy(this.hideModal, this))
+ .emulateTransitionEnd(Modal.TRANSITION_DURATION) :
+ this.hideModal()
+ }
+
+ Modal.prototype.enforceFocus = function () {
+ $(document)
+ .off('focusin.bs.modal') // guard against infinite focus loop
+ .on('focusin.bs.modal', $.proxy(function (e) {
+ if (this.$element[0] !== e.target && !this.$element.has(e.target).length) {
+ this.$element.trigger('focus')
+ }
+ }, this))
+ }
+
+ Modal.prototype.escape = function () {
+ if (this.isShown && this.options.keyboard) {
+ this.$element.on('keydown.dismiss.bs.modal', $.proxy(function (e) {
+ e.which == 27 && this.hide()
+ }, this))
+ } else if (!this.isShown) {
+ this.$element.off('keydown.dismiss.bs.modal')
+ }
+ }
+
+ Modal.prototype.resize = function () {
+ if (this.isShown) {
+ $(window).on('resize.bs.modal', $.proxy(this.handleUpdate, this))
+ } else {
+ $(window).off('resize.bs.modal')
+ }
+ }
+
+ Modal.prototype.hideModal = function () {
+ var that = this
+ this.$element.hide()
+ this.backdrop(function () {
+ that.$body.removeClass('modal-open')
+ that.resetAdjustments()
+ that.resetScrollbar()
+ that.$element.trigger('hidden.bs.modal')
+ })
+ }
+
+ Modal.prototype.removeBackdrop = function () {
+ this.$backdrop && this.$backdrop.remove()
+ this.$backdrop = null
+ }
+
+ Modal.prototype.backdrop = function (callback) {
+ var that = this
+ var animate = this.$element.hasClass('fade') ? 'fade' : ''
+
+ if (this.isShown && this.options.backdrop) {
+ var doAnimate = $.support.transition && animate
+
+ this.$backdrop = $('')
+ .appendTo(this.$body)
+
+ this.$element.on('click.dismiss.bs.modal', $.proxy(function (e) {
+ if (this.ignoreBackdropClick) {
+ this.ignoreBackdropClick = false
+ return
+ }
+ if (e.target !== e.currentTarget) return
+ this.options.backdrop == 'static'
+ ? this.$element[0].focus()
+ : this.hide()
+ }, this))
+
+ if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
+
+ this.$backdrop.addClass('in')
+
+ if (!callback) return
+
+ doAnimate ?
+ this.$backdrop
+ .one('bsTransitionEnd', callback)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callback()
+
+ } else if (!this.isShown && this.$backdrop) {
+ this.$backdrop.removeClass('in')
+
+ var callbackRemove = function () {
+ that.removeBackdrop()
+ callback && callback()
+ }
+ $.support.transition && this.$element.hasClass('fade') ?
+ this.$backdrop
+ .one('bsTransitionEnd', callbackRemove)
+ .emulateTransitionEnd(Modal.BACKDROP_TRANSITION_DURATION) :
+ callbackRemove()
+
+ } else if (callback) {
+ callback()
+ }
+ }
+
+ // these following methods are used to handle overflowing modals
+
+ Modal.prototype.handleUpdate = function () {
+ this.adjustDialog()
+ }
+
+ Modal.prototype.adjustDialog = function () {
+ var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
+
+ this.$element.css({
+ paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing ? this.scrollbarWidth : '',
+ paddingRight: this.bodyIsOverflowing && !modalIsOverflowing ? this.scrollbarWidth : ''
+ })
+ }
+
+ Modal.prototype.resetAdjustments = function () {
+ this.$element.css({
+ paddingLeft: '',
+ paddingRight: ''
+ })
+ }
+
+ Modal.prototype.checkScrollbar = function () {
+ var fullWindowWidth = window.innerWidth
+ if (!fullWindowWidth) { // workaround for missing window.innerWidth in IE8
+ var documentElementRect = document.documentElement.getBoundingClientRect()
+ fullWindowWidth = documentElementRect.right - Math.abs(documentElementRect.left)
+ }
+ this.bodyIsOverflowing = document.body.clientWidth < fullWindowWidth
+ this.scrollbarWidth = this.measureScrollbar()
+ }
+
+ Modal.prototype.setScrollbar = function () {
+ var bodyPad = parseInt((this.$body.css('padding-right') || 0), 10)
+ this.originalBodyPad = document.body.style.paddingRight || ''
+ if (this.bodyIsOverflowing) this.$body.css('padding-right', bodyPad + this.scrollbarWidth)
+ }
+
+ Modal.prototype.resetScrollbar = function () {
+ this.$body.css('padding-right', this.originalBodyPad)
+ }
+
+ Modal.prototype.measureScrollbar = function () { // thx walsh
+ var scrollDiv = document.createElement('div')
+ scrollDiv.className = 'modal-scrollbar-measure'
+ this.$body.append(scrollDiv)
+ var scrollbarWidth = scrollDiv.offsetWidth - scrollDiv.clientWidth
+ this.$body[0].removeChild(scrollDiv)
+ return scrollbarWidth
+ }
+
+
+ // MODAL PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option, _relatedTarget) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.modal')
+ var options = $.extend({}, Modal.DEFAULTS, $this.data(), typeof option == 'object' && option)
+
+ if (!data) $this.data('bs.modal', (data = new Modal(this, options)))
+ if (typeof option == 'string') data[option](_relatedTarget)
+ else if (options.show) data.show(_relatedTarget)
+ })
+ }
+
+ var old = $.fn.modal
+
+ $.fn.modal = Plugin
+ $.fn.modal.Constructor = Modal
+
+
+ // MODAL NO CONFLICT
+ // =================
+
+ $.fn.modal.noConflict = function () {
+ $.fn.modal = old
+ return this
+ }
+
+
+ // MODAL DATA-API
+ // ==============
+
+ $(document).on('click.bs.modal.data-api', '[data-toggle="modal"]', function (e) {
+ var $this = $(this)
+ var href = $this.attr('href')
+ var $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))) // strip for ie7
+ var option = $target.data('bs.modal') ? 'toggle' : $.extend({ remote: !/#/.test(href) && href }, $target.data(), $this.data())
+
+ if ($this.is('a')) e.preventDefault()
+
+ $target.one('show.bs.modal', function (showEvent) {
+ if (showEvent.isDefaultPrevented()) return // only register focus restorer if modal will actually get shown
+ $target.one('hidden.bs.modal', function () {
+ $this.is(':visible') && $this.trigger('focus')
+ })
+ })
+ Plugin.call($target, option, this)
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tooltip.js v3.3.4
+ * http://getbootstrap.com/javascript/#tooltip
+ * Inspired by the original jQuery.tipsy by Jason Frame
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TOOLTIP PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Tooltip = function (element, options) {
+ this.type = null
+ this.options = null
+ this.enabled = null
+ this.timeout = null
+ this.hoverState = null
+ this.$element = null
+
+ this.init('tooltip', element, options)
+ }
+
+ Tooltip.VERSION = '3.3.4'
+
+ Tooltip.TRANSITION_DURATION = 150
+
+ Tooltip.DEFAULTS = {
+ animation: true,
+ placement: 'top',
+ selector: false,
+ template: '
',
+ trigger: 'hover focus',
+ title: '',
+ delay: 0,
+ html: false,
+ container: false,
+ viewport: {
+ selector: 'body',
+ padding: 0
+ }
+ }
+
+ Tooltip.prototype.init = function (type, element, options) {
+ this.enabled = true
+ this.type = type
+ this.$element = $(element)
+ this.options = this.getOptions(options)
+ this.$viewport = this.options.viewport && $(this.options.viewport.selector || this.options.viewport)
+
+ if (this.$element[0] instanceof document.constructor && !this.options.selector) {
+ throw new Error('`selector` option must be specified when initializing ' + this.type + ' on the window.document object!')
+ }
+
+ var triggers = this.options.trigger.split(' ')
+
+ for (var i = triggers.length; i--;) {
+ var trigger = triggers[i]
+
+ if (trigger == 'click') {
+ this.$element.on('click.' + this.type, this.options.selector, $.proxy(this.toggle, this))
+ } else if (trigger != 'manual') {
+ var eventIn = trigger == 'hover' ? 'mouseenter' : 'focusin'
+ var eventOut = trigger == 'hover' ? 'mouseleave' : 'focusout'
+
+ this.$element.on(eventIn + '.' + this.type, this.options.selector, $.proxy(this.enter, this))
+ this.$element.on(eventOut + '.' + this.type, this.options.selector, $.proxy(this.leave, this))
+ }
+ }
+
+ this.options.selector ?
+ (this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
+ this.fixTitle()
+ }
+
+ Tooltip.prototype.getDefaults = function () {
+ return Tooltip.DEFAULTS
+ }
+
+ Tooltip.prototype.getOptions = function (options) {
+ options = $.extend({}, this.getDefaults(), this.$element.data(), options)
+
+ if (options.delay && typeof options.delay == 'number') {
+ options.delay = {
+ show: options.delay,
+ hide: options.delay
+ }
+ }
+
+ return options
+ }
+
+ Tooltip.prototype.getDelegateOptions = function () {
+ var options = {}
+ var defaults = this.getDefaults()
+
+ this._options && $.each(this._options, function (key, value) {
+ if (defaults[key] != value) options[key] = value
+ })
+
+ return options
+ }
+
+ Tooltip.prototype.enter = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (self && self.$tip && self.$tip.is(':visible')) {
+ self.hoverState = 'in'
+ return
+ }
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'in'
+
+ if (!self.options.delay || !self.options.delay.show) return self.show()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'in') self.show()
+ }, self.options.delay.show)
+ }
+
+ Tooltip.prototype.leave = function (obj) {
+ var self = obj instanceof this.constructor ?
+ obj : $(obj.currentTarget).data('bs.' + this.type)
+
+ if (!self) {
+ self = new this.constructor(obj.currentTarget, this.getDelegateOptions())
+ $(obj.currentTarget).data('bs.' + this.type, self)
+ }
+
+ clearTimeout(self.timeout)
+
+ self.hoverState = 'out'
+
+ if (!self.options.delay || !self.options.delay.hide) return self.hide()
+
+ self.timeout = setTimeout(function () {
+ if (self.hoverState == 'out') self.hide()
+ }, self.options.delay.hide)
+ }
+
+ Tooltip.prototype.show = function () {
+ var e = $.Event('show.bs.' + this.type)
+
+ if (this.hasContent() && this.enabled) {
+ this.$element.trigger(e)
+
+ var inDom = $.contains(this.$element[0].ownerDocument.documentElement, this.$element[0])
+ if (e.isDefaultPrevented() || !inDom) return
+ var that = this
+
+ var $tip = this.tip()
+
+ var tipId = this.getUID(this.type)
+
+ this.setContent()
+ $tip.attr('id', tipId)
+ this.$element.attr('aria-describedby', tipId)
+
+ if (this.options.animation) $tip.addClass('fade')
+
+ var placement = typeof this.options.placement == 'function' ?
+ this.options.placement.call(this, $tip[0], this.$element[0]) :
+ this.options.placement
+
+ var autoToken = /\s?auto?\s?/i
+ var autoPlace = autoToken.test(placement)
+ if (autoPlace) placement = placement.replace(autoToken, '') || 'top'
+
+ $tip
+ .detach()
+ .css({ top: 0, left: 0, display: 'block' })
+ .addClass(placement)
+ .data('bs.' + this.type, this)
+
+ this.options.container ? $tip.appendTo(this.options.container) : $tip.insertAfter(this.$element)
+
+ var pos = this.getPosition()
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (autoPlace) {
+ var orgPlacement = placement
+ var $container = this.options.container ? $(this.options.container) : this.$element.parent()
+ var containerDim = this.getPosition($container)
+
+ placement = placement == 'bottom' && pos.bottom + actualHeight > containerDim.bottom ? 'top' :
+ placement == 'top' && pos.top - actualHeight < containerDim.top ? 'bottom' :
+ placement == 'right' && pos.right + actualWidth > containerDim.width ? 'left' :
+ placement == 'left' && pos.left - actualWidth < containerDim.left ? 'right' :
+ placement
+
+ $tip
+ .removeClass(orgPlacement)
+ .addClass(placement)
+ }
+
+ var calculatedOffset = this.getCalculatedOffset(placement, pos, actualWidth, actualHeight)
+
+ this.applyPlacement(calculatedOffset, placement)
+
+ var complete = function () {
+ var prevHoverState = that.hoverState
+ that.$element.trigger('shown.bs.' + that.type)
+ that.hoverState = null
+
+ if (prevHoverState == 'out') that.leave(that)
+ }
+
+ $.support.transition && this.$tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+ }
+ }
+
+ Tooltip.prototype.applyPlacement = function (offset, placement) {
+ var $tip = this.tip()
+ var width = $tip[0].offsetWidth
+ var height = $tip[0].offsetHeight
+
+ // manually read margins because getBoundingClientRect includes difference
+ var marginTop = parseInt($tip.css('margin-top'), 10)
+ var marginLeft = parseInt($tip.css('margin-left'), 10)
+
+ // we must check for NaN for ie 8/9
+ if (isNaN(marginTop)) marginTop = 0
+ if (isNaN(marginLeft)) marginLeft = 0
+
+ offset.top = offset.top + marginTop
+ offset.left = offset.left + marginLeft
+
+ // $.fn.offset doesn't round pixel values
+ // so we use setOffset directly with our own function B-0
+ $.offset.setOffset($tip[0], $.extend({
+ using: function (props) {
+ $tip.css({
+ top: Math.round(props.top),
+ left: Math.round(props.left)
+ })
+ }
+ }, offset), 0)
+
+ $tip.addClass('in')
+
+ // check to see if placing tip in new offset caused the tip to resize itself
+ var actualWidth = $tip[0].offsetWidth
+ var actualHeight = $tip[0].offsetHeight
+
+ if (placement == 'top' && actualHeight != height) {
+ offset.top = offset.top + height - actualHeight
+ }
+
+ var delta = this.getViewportAdjustedDelta(placement, offset, actualWidth, actualHeight)
+
+ if (delta.left) offset.left += delta.left
+ else offset.top += delta.top
+
+ var isVertical = /top|bottom/.test(placement)
+ var arrowDelta = isVertical ? delta.left * 2 - width + actualWidth : delta.top * 2 - height + actualHeight
+ var arrowOffsetPosition = isVertical ? 'offsetWidth' : 'offsetHeight'
+
+ $tip.offset(offset)
+ this.replaceArrow(arrowDelta, $tip[0][arrowOffsetPosition], isVertical)
+ }
+
+ Tooltip.prototype.replaceArrow = function (delta, dimension, isVertical) {
+ this.arrow()
+ .css(isVertical ? 'left' : 'top', 50 * (1 - delta / dimension) + '%')
+ .css(isVertical ? 'top' : 'left', '')
+ }
+
+ Tooltip.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+
+ $tip.find('.tooltip-inner')[this.options.html ? 'html' : 'text'](title)
+ $tip.removeClass('fade in top bottom left right')
+ }
+
+ Tooltip.prototype.hide = function (callback) {
+ var that = this
+ var $tip = $(this.$tip)
+ var e = $.Event('hide.bs.' + this.type)
+
+ function complete() {
+ if (that.hoverState != 'in') $tip.detach()
+ that.$element
+ .removeAttr('aria-describedby')
+ .trigger('hidden.bs.' + that.type)
+ callback && callback()
+ }
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ $tip.removeClass('in')
+
+ $.support.transition && $tip.hasClass('fade') ?
+ $tip
+ .one('bsTransitionEnd', complete)
+ .emulateTransitionEnd(Tooltip.TRANSITION_DURATION) :
+ complete()
+
+ this.hoverState = null
+
+ return this
+ }
+
+ Tooltip.prototype.fixTitle = function () {
+ var $e = this.$element
+ if ($e.attr('title') || typeof ($e.attr('data-original-title')) != 'string') {
+ $e.attr('data-original-title', $e.attr('title') || '').attr('title', '')
+ }
+ }
+
+ Tooltip.prototype.hasContent = function () {
+ return this.getTitle()
+ }
+
+ Tooltip.prototype.getPosition = function ($element) {
+ $element = $element || this.$element
+
+ var el = $element[0]
+ var isBody = el.tagName == 'BODY'
+
+ var elRect = el.getBoundingClientRect()
+ if (elRect.width == null) {
+ // width and height are missing in IE8, so compute them manually; see https://github.com/twbs/bootstrap/issues/14093
+ elRect = $.extend({}, elRect, { width: elRect.right - elRect.left, height: elRect.bottom - elRect.top })
+ }
+ var elOffset = isBody ? { top: 0, left: 0 } : $element.offset()
+ var scroll = { scroll: isBody ? document.documentElement.scrollTop || document.body.scrollTop : $element.scrollTop() }
+ var outerDims = isBody ? { width: $(window).width(), height: $(window).height() } : null
+
+ return $.extend({}, elRect, scroll, outerDims, elOffset)
+ }
+
+ Tooltip.prototype.getCalculatedOffset = function (placement, pos, actualWidth, actualHeight) {
+ return placement == 'bottom' ? { top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'top' ? { top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2 } :
+ placement == 'left' ? { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth } :
+ /* placement == 'right' */ { top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width }
+
+ }
+
+ Tooltip.prototype.getViewportAdjustedDelta = function (placement, pos, actualWidth, actualHeight) {
+ var delta = { top: 0, left: 0 }
+ if (!this.$viewport) return delta
+
+ var viewportPadding = this.options.viewport && this.options.viewport.padding || 0
+ var viewportDimensions = this.getPosition(this.$viewport)
+
+ if (/right|left/.test(placement)) {
+ var topEdgeOffset = pos.top - viewportPadding - viewportDimensions.scroll
+ var bottomEdgeOffset = pos.top + viewportPadding - viewportDimensions.scroll + actualHeight
+ if (topEdgeOffset < viewportDimensions.top) { // top overflow
+ delta.top = viewportDimensions.top - topEdgeOffset
+ } else if (bottomEdgeOffset > viewportDimensions.top + viewportDimensions.height) { // bottom overflow
+ delta.top = viewportDimensions.top + viewportDimensions.height - bottomEdgeOffset
+ }
+ } else {
+ var leftEdgeOffset = pos.left - viewportPadding
+ var rightEdgeOffset = pos.left + viewportPadding + actualWidth
+ if (leftEdgeOffset < viewportDimensions.left) { // left overflow
+ delta.left = viewportDimensions.left - leftEdgeOffset
+ } else if (rightEdgeOffset > viewportDimensions.width) { // right overflow
+ delta.left = viewportDimensions.left + viewportDimensions.width - rightEdgeOffset
+ }
+ }
+
+ return delta
+ }
+
+ Tooltip.prototype.getTitle = function () {
+ var title
+ var $e = this.$element
+ var o = this.options
+
+ title = $e.attr('data-original-title')
+ || (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
+
+ return title
+ }
+
+ Tooltip.prototype.getUID = function (prefix) {
+ do prefix += ~~(Math.random() * 1000000)
+ while (document.getElementById(prefix))
+ return prefix
+ }
+
+ Tooltip.prototype.tip = function () {
+ return (this.$tip = this.$tip || $(this.options.template))
+ }
+
+ Tooltip.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.tooltip-arrow'))
+ }
+
+ Tooltip.prototype.enable = function () {
+ this.enabled = true
+ }
+
+ Tooltip.prototype.disable = function () {
+ this.enabled = false
+ }
+
+ Tooltip.prototype.toggleEnabled = function () {
+ this.enabled = !this.enabled
+ }
+
+ Tooltip.prototype.toggle = function (e) {
+ var self = this
+ if (e) {
+ self = $(e.currentTarget).data('bs.' + this.type)
+ if (!self) {
+ self = new this.constructor(e.currentTarget, this.getDelegateOptions())
+ $(e.currentTarget).data('bs.' + this.type, self)
+ }
+ }
+
+ self.tip().hasClass('in') ? self.leave(self) : self.enter(self)
+ }
+
+ Tooltip.prototype.destroy = function () {
+ var that = this
+ clearTimeout(this.timeout)
+ this.hide(function () {
+ that.$element.off('.' + that.type).removeData('bs.' + that.type)
+ })
+ }
+
+
+ // TOOLTIP PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tooltip')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.tooltip', (data = new Tooltip(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tooltip
+
+ $.fn.tooltip = Plugin
+ $.fn.tooltip.Constructor = Tooltip
+
+
+ // TOOLTIP NO CONFLICT
+ // ===================
+
+ $.fn.tooltip.noConflict = function () {
+ $.fn.tooltip = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: popover.js v3.3.4
+ * http://getbootstrap.com/javascript/#popovers
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // POPOVER PUBLIC CLASS DEFINITION
+ // ===============================
+
+ var Popover = function (element, options) {
+ this.init('popover', element, options)
+ }
+
+ if (!$.fn.tooltip) throw new Error('Popover requires tooltip.js')
+
+ Popover.VERSION = '3.3.4'
+
+ Popover.DEFAULTS = $.extend({}, $.fn.tooltip.Constructor.DEFAULTS, {
+ placement: 'right',
+ trigger: 'click',
+ content: '',
+ template: '
'
+ })
+
+
+ // NOTE: POPOVER EXTENDS tooltip.js
+ // ================================
+
+ Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype)
+
+ Popover.prototype.constructor = Popover
+
+ Popover.prototype.getDefaults = function () {
+ return Popover.DEFAULTS
+ }
+
+ Popover.prototype.setContent = function () {
+ var $tip = this.tip()
+ var title = this.getTitle()
+ var content = this.getContent()
+
+ $tip.find('.popover-title')[this.options.html ? 'html' : 'text'](title)
+ $tip.find('.popover-content').children().detach().end()[ // we use append for html objects to maintain js events
+ this.options.html ? (typeof content == 'string' ? 'html' : 'append') : 'text'
+ ](content)
+
+ $tip.removeClass('fade top bottom left right in')
+
+ // IE8 doesn't accept hiding via the `:empty` pseudo selector, we have to do
+ // this manually by checking the contents.
+ if (!$tip.find('.popover-title').html()) $tip.find('.popover-title').hide()
+ }
+
+ Popover.prototype.hasContent = function () {
+ return this.getTitle() || this.getContent()
+ }
+
+ Popover.prototype.getContent = function () {
+ var $e = this.$element
+ var o = this.options
+
+ return $e.attr('data-content')
+ || (typeof o.content == 'function' ?
+ o.content.call($e[0]) :
+ o.content)
+ }
+
+ Popover.prototype.arrow = function () {
+ return (this.$arrow = this.$arrow || this.tip().find('.arrow'))
+ }
+
+
+ // POPOVER PLUGIN DEFINITION
+ // =========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.popover')
+ var options = typeof option == 'object' && option
+
+ if (!data && /destroy|hide/.test(option)) return
+ if (!data) $this.data('bs.popover', (data = new Popover(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.popover
+
+ $.fn.popover = Plugin
+ $.fn.popover.Constructor = Popover
+
+
+ // POPOVER NO CONFLICT
+ // ===================
+
+ $.fn.popover.noConflict = function () {
+ $.fn.popover = old
+ return this
+ }
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: scrollspy.js v3.3.4
+ * http://getbootstrap.com/javascript/#scrollspy
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // SCROLLSPY CLASS DEFINITION
+ // ==========================
+
+ function ScrollSpy(element, options) {
+ this.$body = $(document.body)
+ this.$scrollElement = $(element).is(document.body) ? $(window) : $(element)
+ this.options = $.extend({}, ScrollSpy.DEFAULTS, options)
+ this.selector = (this.options.target || '') + ' .nav li > a'
+ this.offsets = []
+ this.targets = []
+ this.activeTarget = null
+ this.scrollHeight = 0
+
+ this.$scrollElement.on('scroll.bs.scrollspy', $.proxy(this.process, this))
+ this.refresh()
+ this.process()
+ }
+
+ ScrollSpy.VERSION = '3.3.4'
+
+ ScrollSpy.DEFAULTS = {
+ offset: 10
+ }
+
+ ScrollSpy.prototype.getScrollHeight = function () {
+ return this.$scrollElement[0].scrollHeight || Math.max(this.$body[0].scrollHeight, document.documentElement.scrollHeight)
+ }
+
+ ScrollSpy.prototype.refresh = function () {
+ var that = this
+ var offsetMethod = 'offset'
+ var offsetBase = 0
+
+ this.offsets = []
+ this.targets = []
+ this.scrollHeight = this.getScrollHeight()
+
+ if (!$.isWindow(this.$scrollElement[0])) {
+ offsetMethod = 'position'
+ offsetBase = this.$scrollElement.scrollTop()
+ }
+
+ this.$body
+ .find(this.selector)
+ .map(function () {
+ var $el = $(this)
+ var href = $el.data('target') || $el.attr('href')
+ var $href = /^#./.test(href) && $(href)
+
+ return ($href
+ && $href.length
+ && $href.is(':visible')
+ && [[$href[offsetMethod]().top + offsetBase, href]]) || null
+ })
+ .sort(function (a, b) { return a[0] - b[0] })
+ .each(function () {
+ that.offsets.push(this[0])
+ that.targets.push(this[1])
+ })
+ }
+
+ ScrollSpy.prototype.process = function () {
+ var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
+ var scrollHeight = this.getScrollHeight()
+ var maxScroll = this.options.offset + scrollHeight - this.$scrollElement.height()
+ var offsets = this.offsets
+ var targets = this.targets
+ var activeTarget = this.activeTarget
+ var i
+
+ if (this.scrollHeight != scrollHeight) {
+ this.refresh()
+ }
+
+ if (scrollTop >= maxScroll) {
+ return activeTarget != (i = targets[targets.length - 1]) && this.activate(i)
+ }
+
+ if (activeTarget && scrollTop < offsets[0]) {
+ this.activeTarget = null
+ return this.clear()
+ }
+
+ for (i = offsets.length; i--;) {
+ activeTarget != targets[i]
+ && scrollTop >= offsets[i]
+ && (offsets[i + 1] === undefined || scrollTop < offsets[i + 1])
+ && this.activate(targets[i])
+ }
+ }
+
+ ScrollSpy.prototype.activate = function (target) {
+ this.activeTarget = target
+
+ this.clear()
+
+ var selector = this.selector +
+ '[data-target="' + target + '"],' +
+ this.selector + '[href="' + target + '"]'
+
+ var active = $(selector)
+ .parents('li')
+ .addClass('active')
+
+ if (active.parent('.dropdown-menu').length) {
+ active = active
+ .closest('li.dropdown')
+ .addClass('active')
+ }
+
+ active.trigger('activate.bs.scrollspy')
+ }
+
+ ScrollSpy.prototype.clear = function () {
+ $(this.selector)
+ .parentsUntil(this.options.target, '.active')
+ .removeClass('active')
+ }
+
+
+ // SCROLLSPY PLUGIN DEFINITION
+ // ===========================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.scrollspy')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.scrollspy', (data = new ScrollSpy(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.scrollspy
+
+ $.fn.scrollspy = Plugin
+ $.fn.scrollspy.Constructor = ScrollSpy
+
+
+ // SCROLLSPY NO CONFLICT
+ // =====================
+
+ $.fn.scrollspy.noConflict = function () {
+ $.fn.scrollspy = old
+ return this
+ }
+
+
+ // SCROLLSPY DATA-API
+ // ==================
+
+ $(window).on('load.bs.scrollspy.data-api', function () {
+ $('[data-spy="scroll"]').each(function () {
+ var $spy = $(this)
+ Plugin.call($spy, $spy.data())
+ })
+ })
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: tab.js v3.3.4
+ * http://getbootstrap.com/javascript/#tabs
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // TAB CLASS DEFINITION
+ // ====================
+
+ var Tab = function (element) {
+ this.element = $(element)
+ }
+
+ Tab.VERSION = '3.3.4'
+
+ Tab.TRANSITION_DURATION = 150
+
+ Tab.prototype.show = function () {
+ var $this = this.element
+ var $ul = $this.closest('ul:not(.dropdown-menu)')
+ var selector = $this.data('target')
+
+ if (!selector) {
+ selector = $this.attr('href')
+ selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
+ }
+
+ if ($this.parent('li').hasClass('active')) return
+
+ var $previous = $ul.find('.active:last a')
+ var hideEvent = $.Event('hide.bs.tab', {
+ relatedTarget: $this[0]
+ })
+ var showEvent = $.Event('show.bs.tab', {
+ relatedTarget: $previous[0]
+ })
+
+ $previous.trigger(hideEvent)
+ $this.trigger(showEvent)
+
+ if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
+
+ var $target = $(selector)
+
+ this.activate($this.closest('li'), $ul)
+ this.activate($target, $target.parent(), function () {
+ $previous.trigger({
+ type: 'hidden.bs.tab',
+ relatedTarget: $this[0]
+ })
+ $this.trigger({
+ type: 'shown.bs.tab',
+ relatedTarget: $previous[0]
+ })
+ })
+ }
+
+ Tab.prototype.activate = function (element, container, callback) {
+ var $active = container.find('> .active')
+ var transition = callback
+ && $.support.transition
+ && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
+
+ function next() {
+ $active
+ .removeClass('active')
+ .find('> .dropdown-menu > .active')
+ .removeClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', false)
+
+ element
+ .addClass('active')
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+
+ if (transition) {
+ element[0].offsetWidth // reflow for transition
+ element.addClass('in')
+ } else {
+ element.removeClass('fade')
+ }
+
+ if (element.parent('.dropdown-menu').length) {
+ element
+ .closest('li.dropdown')
+ .addClass('active')
+ .end()
+ .find('[data-toggle="tab"]')
+ .attr('aria-expanded', true)
+ }
+
+ callback && callback()
+ }
+
+ $active.length && transition ?
+ $active
+ .one('bsTransitionEnd', next)
+ .emulateTransitionEnd(Tab.TRANSITION_DURATION) :
+ next()
+
+ $active.removeClass('in')
+ }
+
+
+ // TAB PLUGIN DEFINITION
+ // =====================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.tab')
+
+ if (!data) $this.data('bs.tab', (data = new Tab(this)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.tab
+
+ $.fn.tab = Plugin
+ $.fn.tab.Constructor = Tab
+
+
+ // TAB NO CONFLICT
+ // ===============
+
+ $.fn.tab.noConflict = function () {
+ $.fn.tab = old
+ return this
+ }
+
+
+ // TAB DATA-API
+ // ============
+
+ var clickHandler = function (e) {
+ e.preventDefault()
+ Plugin.call($(this), 'show')
+ }
+
+ $(document)
+ .on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
+ .on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
+
+}(jQuery);
+
+/* ========================================================================
+ * Bootstrap: affix.js v3.3.4
+ * http://getbootstrap.com/javascript/#affix
+ * ========================================================================
+ * Copyright 2011-2015 Twitter, Inc.
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
+ * ======================================================================== */
+
+
++function ($) {
+ 'use strict';
+
+ // AFFIX CLASS DEFINITION
+ // ======================
+
+ var Affix = function (element, options) {
+ this.options = $.extend({}, Affix.DEFAULTS, options)
+
+ this.$target = $(this.options.target)
+ .on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
+ .on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
+
+ this.$element = $(element)
+ this.affixed = null
+ this.unpin = null
+ this.pinnedOffset = null
+
+ this.checkPosition()
+ }
+
+ Affix.VERSION = '3.3.4'
+
+ Affix.RESET = 'affix affix-top affix-bottom'
+
+ Affix.DEFAULTS = {
+ offset: 0,
+ target: window
+ }
+
+ Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ var targetHeight = this.$target.height()
+
+ if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
+
+ if (this.affixed == 'bottom') {
+ if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
+ return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
+ }
+
+ var initializing = this.affixed == null
+ var colliderTop = initializing ? scrollTop : position.top
+ var colliderHeight = initializing ? targetHeight : height
+
+ if (offsetTop != null && scrollTop <= offsetTop) return 'top'
+ if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
+
+ return false
+ }
+
+ Affix.prototype.getPinnedOffset = function () {
+ if (this.pinnedOffset) return this.pinnedOffset
+ this.$element.removeClass(Affix.RESET).addClass('affix')
+ var scrollTop = this.$target.scrollTop()
+ var position = this.$element.offset()
+ return (this.pinnedOffset = position.top - scrollTop)
+ }
+
+ Affix.prototype.checkPositionWithEventLoop = function () {
+ setTimeout($.proxy(this.checkPosition, this), 1)
+ }
+
+ Affix.prototype.checkPosition = function () {
+ if (!this.$element.is(':visible')) return
+
+ var height = this.$element.height()
+ var offset = this.options.offset
+ var offsetTop = offset.top
+ var offsetBottom = offset.bottom
+ var scrollHeight = $(document.body).height()
+
+ if (typeof offset != 'object') offsetBottom = offsetTop = offset
+ if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
+ if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
+
+ var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
+
+ if (this.affixed != affix) {
+ if (this.unpin != null) this.$element.css('top', '')
+
+ var affixType = 'affix' + (affix ? '-' + affix : '')
+ var e = $.Event(affixType + '.bs.affix')
+
+ this.$element.trigger(e)
+
+ if (e.isDefaultPrevented()) return
+
+ this.affixed = affix
+ this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
+
+ this.$element
+ .removeClass(Affix.RESET)
+ .addClass(affixType)
+ .trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
+ }
+
+ if (affix == 'bottom') {
+ this.$element.offset({
+ top: scrollHeight - height - offsetBottom
+ })
+ }
+ }
+
+
+ // AFFIX PLUGIN DEFINITION
+ // =======================
+
+ function Plugin(option) {
+ return this.each(function () {
+ var $this = $(this)
+ var data = $this.data('bs.affix')
+ var options = typeof option == 'object' && option
+
+ if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
+ if (typeof option == 'string') data[option]()
+ })
+ }
+
+ var old = $.fn.affix
+
+ $.fn.affix = Plugin
+ $.fn.affix.Constructor = Affix
+
+
+ // AFFIX NO CONFLICT
+ // =================
+
+ $.fn.affix.noConflict = function () {
+ $.fn.affix = old
+ return this
+ }
+
+
+ // AFFIX DATA-API
+ // ==============
+
+ $(window).on('load', function () {
+ $('[data-spy="affix"]').each(function () {
+ var $spy = $(this)
+ var data = $spy.data()
+
+ data.offset = data.offset || {}
+
+ if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
+ if (data.offsetTop != null) data.offset.top = data.offsetTop
+
+ Plugin.call($spy, data)
+ })
+ })
+
+}(jQuery);
diff --git a/个人主页/js/easing.js b/个人主页/js/easing.js
new file mode 100644
index 0000000..d068c90
--- /dev/null
+++ b/个人主页/js/easing.js
@@ -0,0 +1,141 @@
+/*
+ * jQuery EasIng v1.1.2 - http://gsgd.co.uk/sandbox/jquery.easIng.php
+ *
+ * Uses the built In easIng capabilities added In jQuery 1.1
+ * to offer multiple easIng options
+ *
+ * Copyright (c) 2007 George Smith
+ * Licensed under the MIT License:
+ * http://www.opensource.org/licenses/mit-license.php
+ */
+
+// t: current time, b: begInnIng value, c: change In value, d: duration
+
+jQuery.extend( jQuery.easing,
+{
+ easeInQuad: function (x, t, b, c, d) {
+ return c*(t/=d)*t + b;
+ },
+ easeOutQuad: function (x, t, b, c, d) {
+ return -c *(t/=d)*(t-2) + b;
+ },
+ easeInOutQuad: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t + b;
+ return -c/2 * ((--t)*(t-2) - 1) + b;
+ },
+ easeInCubic: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t + b;
+ },
+ easeOutCubic: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t + 1) + b;
+ },
+ easeInOutCubic: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t + b;
+ return c/2*((t-=2)*t*t + 2) + b;
+ },
+ easeInQuart: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t + b;
+ },
+ easeOutQuart: function (x, t, b, c, d) {
+ return -c * ((t=t/d-1)*t*t*t - 1) + b;
+ },
+ easeInOutQuart: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t + b;
+ return -c/2 * ((t-=2)*t*t*t - 2) + b;
+ },
+ easeInQuint: function (x, t, b, c, d) {
+ return c*(t/=d)*t*t*t*t + b;
+ },
+ easeOutQuint: function (x, t, b, c, d) {
+ return c*((t=t/d-1)*t*t*t*t + 1) + b;
+ },
+ easeInOutQuint: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
+ return c/2*((t-=2)*t*t*t*t + 2) + b;
+ },
+ easeInSine: function (x, t, b, c, d) {
+ return -c * Math.cos(t/d * (Math.PI/2)) + c + b;
+ },
+ easeOutSine: function (x, t, b, c, d) {
+ return c * Math.sin(t/d * (Math.PI/2)) + b;
+ },
+ easeInOutSine: function (x, t, b, c, d) {
+ return -c/2 * (Math.cos(Math.PI*t/d) - 1) + b;
+ },
+ easeInExpo: function (x, t, b, c, d) {
+ return (t==0) ? b : c * Math.pow(2, 10 * (t/d - 1)) + b;
+ },
+ easeOutExpo: function (x, t, b, c, d) {
+ return (t==d) ? b+c : c * (-Math.pow(2, -10 * t/d) + 1) + b;
+ },
+ easeInOutExpo: function (x, t, b, c, d) {
+ if (t==0) return b;
+ if (t==d) return b+c;
+ if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
+ return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
+ },
+ easeInCirc: function (x, t, b, c, d) {
+ return -c * (Math.sqrt(1 - (t/=d)*t) - 1) + b;
+ },
+ easeOutCirc: function (x, t, b, c, d) {
+ return c * Math.sqrt(1 - (t=t/d-1)*t) + b;
+ },
+ easeInOutCirc: function (x, t, b, c, d) {
+ if ((t/=d/2) < 1) return -c/2 * (Math.sqrt(1 - t*t) - 1) + b;
+ return c/2 * (Math.sqrt(1 - (t-=2)*t) + 1) + b;
+ },
+ easeInElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ },
+ easeOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3;
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
+ },
+ easeInOutElastic: function (x, t, b, c, d) {
+ var s=1.70158;var p=0;var a=c;
+ if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5);
+ if (a < Math.abs(c)) { a=c; var s=p/4; }
+ else var s = p/(2*Math.PI) * Math.asin (c/a);
+ if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
+ return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;
+ },
+ easeInBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*(t/=d)*t*((s+1)*t - s) + b;
+ },
+ easeOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ return c*((t=t/d-1)*t*((s+1)*t + s) + 1) + b;
+ },
+ easeInOutBack: function (x, t, b, c, d, s) {
+ if (s == undefined) s = 1.70158;
+ if ((t/=d/2) < 1) return c/2*(t*t*(((s*=(1.525))+1)*t - s)) + b;
+ return c/2*((t-=2)*t*(((s*=(1.525))+1)*t + s) + 2) + b;
+ },
+ easeInBounce: function (x, t, b, c, d) {
+ return c - jQuery.easing.easeOutBounce (x, d-t, 0, c, d) + b;
+ },
+ easeOutBounce: function (x, t, b, c, d) {
+ if ((t/=d) < (1/2.75)) {
+ return c*(7.5625*t*t) + b;
+ } else if (t < (2/2.75)) {
+ return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b;
+ } else if (t < (2.5/2.75)) {
+ return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b;
+ } else {
+ return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b;
+ }
+ },
+ easeInOutBounce: function (x, t, b, c, d) {
+ if (t < d/2) return jQuery.easing.easeInBounce (x, t*2, 0, c, d) * .5 + b;
+ return jQuery.easing.easeOutBounce (x, t*2-d, 0, c, d) * .5 + c*.5 + b;
+ }
+});
+
diff --git a/个人主页/js/easyResponsiveTabs.js b/个人主页/js/easyResponsiveTabs.js
new file mode 100644
index 0000000..7387b7f
--- /dev/null
+++ b/个人主页/js/easyResponsiveTabs.js
@@ -0,0 +1,111 @@
+// Easy Responsive Tabs Plugin
+// Author: Samson.Onna
+(function ($) {
+ $.fn.extend({
+ easyResponsiveTabs: function (options) {
+ //Set the default values, use comma to separate the settings, example:
+ var defaults = {
+ type: 'default', //default, vertical, accordion;
+ width: 'auto',
+ fit: true
+ }
+ //Variables
+ var options = $.extend(defaults, options);
+ var opt = options, jtype = opt.type, jfit = opt.fit, jwidth = opt.width, vtabs = 'vertical', accord = 'accordion';
+
+ //Main function
+ this.each(function () {
+ var $respTabs = $(this);
+ $respTabs.find('ul.resp-tabs-list li').addClass('resp-tab-item');
+ $respTabs.css({
+ 'display': 'block',
+ 'width': jwidth
+ });
+
+ $respTabs.find('.resp-tabs-container > div').addClass('resp-tab-content');
+ jtab_options();
+ //Properties Function
+ function jtab_options() {
+ if (jtype == vtabs) {
+ $respTabs.addClass('resp-vtabs');
+ }
+ if (jfit == true) {
+ $respTabs.css({ width: '100%', margin: '0px' });
+ }
+ if (jtype == accord) {
+ $respTabs.addClass('resp-easy-accordion');
+ $respTabs.find('.resp-tabs-list').css('display', 'none');
+ }
+ }
+
+ //Assigning the h2 markup
+ var $tabItemh2;
+ $respTabs.find('.resp-tab-content').before("