!function(a){function b(a,b,e){return 4===arguments.length?c.apply(this,arguments):void d(a,{declarative:!0,deps:b,declare:e})}function c(a,b,c,e){d(a,{declarative:!1,deps:b,executingRequire:c,execute:e})}function d(a,b){b.name=a,a in o||(o[a]=b),b.normalizedDeps=b.deps}function e(a,b){if(b[a.groupIndex]=b[a.groupIndex]||[],-1==p.call(b[a.groupIndex],a)){b[a.groupIndex].push(a);for(var c=0,d=a.normalizedDeps.length;d>c;c++){var f=a.normalizedDeps[c],g=o[f];if(g&&!g.evaluated){var h=a.groupIndex+(g.declarative!=a.declarative);if(void 0===g.groupIndex||g.groupIndex=0;f--){for(var g=c[f],i=0;if;f++){var h=c.importers[f];if(!h.locked)for(var i=0;if;f++){var j,k=b.normalizedDeps[f],l=o[k],m=s[k];m?j=m.exports:l&&!l.declarative?j=l.esModule:l?(h(l),m=l.module,j=m.exports):j=n(k),m&&m.importers?(m.importers.push(c),c.dependencies.push(m)):c.dependencies.push(null),c.setters[f]&&c.setters[f](j)}}}function i(a){var b,c=o[a];if(c)c.declarative?m(a,[]):c.evaluated||j(c),b=c.module.exports;else if(b=n(a),!b)throw new Error("Unable to load dependency "+a+".");return(!c||c.declarative)&&b&&b.__useDefault?b.default:b}function j(b){if(!b.module){var c={},d=b.module={exports:c,id:b.name};if(!b.executingRequire)for(var e=0,f=b.normalizedDeps.length;f>e;e++){var g=b.normalizedDeps[e],h=o[g];h&&j(h)}b.evaluated=!0;var l=b.execute.call(a,function(a){for(var c=0,d=b.deps.length;d>c;c++)if(b.deps[c]==a)return i(b.normalizedDeps[c]);throw new TypeError("Module "+a+" not declared as a dependency.")},c,d);void 0!==l&&(d.exports=l),c=d.exports,c&&c.__esModule?b.esModule=c:b.esModule=k(c)}}function k(b){var c={};if(("object"==typeof b||"function"==typeof b)&&b!==a)if(q)for(var d in b)"default"!==d&&l(c,b,d);else{var e=b&&b.hasOwnProperty;for(var d in b)"default"===d||e&&!b.hasOwnProperty(d)||(c[d]=b[d])}return c.default=b,r(c,"__useDefault",{value:!0}),c}function l(a,b,c){try{var d;(d=Object.getOwnPropertyDescriptor(b,c))&&r(a,c,d)}catch(d){return a[c]=b[c],!1}}function m(b,c){var d=o[b];if(d&&!d.evaluated&&d.declarative){c.push(b);for(var e=0,f=d.normalizedDeps.length;f>e;e++){var g=d.normalizedDeps[e];-1==p.call(c,g)&&(o[g]?m(g,c):n(g))}d.evaluated||(d.evaluated=!0,d.module.execute.call(a))}}function n(a){if(u[a])return u[a];if("@node/"==a.substr(0,6))return u[a]=k(t(a.substr(6)));var b=o[a];if(!b)throw"Module "+a+" not present.";return f(a),m(a,[]),o[a]=void 0,b.declarative&&r(b.module.exports,"__esModule",{value:!0}),u[a]=b.declarative?b.module.exports:b.esModule}var o={},p=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]===a)return b;return-1},q=!0;try{Object.getOwnPropertyDescriptor({a:0},"a")}catch(a){q=!1}var r;!function(){try{Object.defineProperty({},"a",{})&&(r=Object.defineProperty)}catch(a){r=function(a,b,c){try{a[b]=c.value||c.get.call(a)}catch(a){}}}}();var s={},t="undefined"!=typeof System&&System._nodeRequire||"undefined"!=typeof require&&"undefined"!=typeof require.resolve&&"undefined"!=typeof process&&process.platform&&require,u={"@empty":{}};return function(a,d,e,f){return function(g){g(function(g){for(var h={_nodeRequire:t,register:b,registerDynamic:c,get:n,set:function(a,b){u[a]=b},newModule:function(a){return a}},i=0;i1)for(var i=1;ib;b++)if(this[b]===a)return b;return-1},k=["_g","sessionStorage","localStorage","clipboardData","frames","frameElement","external","mozAnimationStartTime","webkitStorageInfo","webkitIndexedDB","mozInnerScreenY","mozInnerScreenX"];h.set("@@global-helpers",h.newModule({prepareGlobal:function(a,c,e){var h=b.define;b.define=void 0;var i;if(e){i={};for(var j in e)i[j]=b[j],b[j]=e[j]}return c||(g={},f(function(a,b){g[a]=b})),function(){var a;if(c)a=d(c);else{a={};var e,j;f(function(b,c){g[b]!==c&&"undefined"!=typeof c&&(a[b]=c,"undefined"!=typeof e?j||e===c||(j=!0):e=c)}),a=j?a:e}if(i)for(var k in i)b[k]=i[k];return b.define=h,a}}}))}("undefined"!=typeof self?self:global),a.registerDynamic("2",[],!1,function(b,c,d){var e=a.get("@@global-helpers").prepareGlobal(d.id,null,null);return function(a){}(this),e()}),a.registerDynamic("3",["2"],!0,function(a,b,c){this||self;c.exports=a("2")}),a.registerDynamic("4",[],!0,function(a,b,c){function d(a,b){b=b||{};var c=JSON.stringify([1],null,f(b,"indent",2)).slice(2,-3),d=""===c?1/0:f(b,"maxLength",80);return function a(b,f,g){b&&"function"==typeof b.toJSON&&(b=b.toJSON());var h=JSON.stringify(b);if(void 0===h)return h;var i=d-f.length-g;if(h.length<=i){var j=e(h);if(j.length<=i)return j}if("object"==typeof b&&null!==b){var k,l=f+c,m=[],n=function(a,b){return b===a.length-1?0:1};if(Array.isArray(b)){for(var o=0;o0)return[k[0],c+m.join(",\n"+l),k[1]].join("\n"+f)}return h}(a,"",0)}function e(a){return a.replace(g,function(a,b){return b?a:a+" "})}function f(a,b,c){return b in a?a[b]:c}var g=(this||self,/("(?:[^\\"]|\\.)*")|[:,]/g);c.exports=d}),a.registerDynamic("5",["4"],!0,function(a,b,c){this||self;c.exports=a("4")}),a.registerDynamic("6",[],!0,function(a,b,c){"format cjs";var d=(this||self,d||function(a){"use strict";if(!("undefined"==typeof a||"undefined"!=typeof navigator&&/MSIE [1-9]\./.test(navigator.userAgent))){var b=a.document,c=function(){return a.URL||a.webkitURL||a},d=b.createElementNS("http://www.w3.org/1999/xhtml","a"),e="download"in d,f=function(a){var b=new MouseEvent("click");a.dispatchEvent(b)},g=/constructor/i.test(a.HTMLElement)||a.safari,h=/CriOS\/[\d]+/.test(navigator.userAgent),i=function(b){(a.setImmediate||a.setTimeout)(function(){throw b},0)},j="application/octet-stream",k=4e4,l=function(a){var b=function(){"string"==typeof a?c().revokeObjectURL(a):a.remove()};setTimeout(b,k)},m=function(a,b,c){b=[].concat(b);for(var d=b.length;d--;){var e=a["on"+b[d]];if("function"==typeof e)try{e.call(a,c||a)}catch(a){i(a)}}},n=function(a){return/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(a.type)?new Blob([String.fromCharCode(65279),a],{type:a.type}):a},o=function(b,i,k){k||(b=n(b));var o,p=this,q=b.type,r=q===j,s=function(){m(p,"writestart progress write writeend".split(" "))},t=function(){if((h||r&&g)&&a.FileReader){var d=new FileReader;return d.onloadend=function(){var b=h?d.result:d.result.replace(/^data:[^;]*;/,"data:attachment/file;"),c=a.open(b,"_blank");c||(a.location.href=b),b=void 0,p.readyState=p.DONE,s()},d.readAsDataURL(b),void(p.readyState=p.INIT)}if(o||(o=c().createObjectURL(b)),r)a.location.href=o;else{var e=a.open(o,"_blank");e||(a.location.href=o)}p.readyState=p.DONE,s(),l(o)};return p.readyState=p.INIT,e?(o=c().createObjectURL(b),void setTimeout(function(){d.href=o,d.download=i,f(d),s(),l(o),p.readyState=p.DONE})):void t()},p=o.prototype,q=function(a,b,c){return new o(a,b||a.name||"download",c)};return"undefined"!=typeof navigator&&navigator.msSaveOrOpenBlob?function(a,b,c){return b=b||a.name||"download",c||(a=n(a)),navigator.msSaveOrOpenBlob(a,b)}:(p.abort=function(){},p.readyState=p.INIT=0,p.WRITING=1,p.DONE=2,p.error=p.onwritestart=p.onprogress=p.onwrite=p.onabort=p.onerror=p.onwriteend=null,q)}}("undefined"!=typeof self&&self||"undefined"!=typeof window&&window||this.content));"undefined"!=typeof c&&c.exports&&(c.exports.saveAs=d)}),a.registerDynamic("7",["6"],!0,function(a,b,c){this||self;c.exports=a("6")}),a.register("8",["9","e","f","a","b","c","d"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a},function(a){g=a.tileSize,h=a.tileBorder,i=a.stockHeight},function(a){j=a.bindDrag}],execute:function(){"use strict";k=function(){function a(b,c){d(this,a),this.svg=b,this.board=c}return c(a,[{key:"elementCount",value:function(a){var c=this;this.stock=a.initialStock,a.tileRecipes.forEach(function(a){a.frozen||b.has(c.stock,a.name)||(c.stock[a.name]=0)}),this.usedTileNames=b.keys(this.stock),this.level=a}},{key:"drawStock",value:function(){var a=this;this.svg.select(".stock").remove(),this.stockGroup=this.svg.append("g").attr("class","stock");var c=i,d=this.level.width+1,e=b.map(this.usedTileNames,function(a,b){return{name:a,i:Math.floor(b/c)+d,j:b%c}});this.stockSlots=this.stockGroup.selectAll(".stock-slot").data(e);var f=this.stockSlots.enter().append("g").attr("class","stock-slot").classed("stock-empty",function(b){return a.stock[b.name]<=0});f.append("rect").attr("class","background-tile").attr("width",g-2*h).attr("height",g-2*h).attr("transform",function(a){return"translate("+(a.i*g+h)+","+(a.j*g+h)+")"}),f.append("text").attr("class","stock-count unselectable").attr("transform",function(a){return"translate("+(a.i+.9)*g+","+(a.j+.9)*g+")"}).text(function(b){return"x "+a.stock[b.name]}),this.regenerateTile(f)}},{key:"regenerateTile",value:function(a){var b=a.append("g").datum(function(a){return new f.Tile(f[a.name],0,!1,a.i,a.j)}).attr("class","tile").attr("transform",function(a){return"translate("+(a.x+g/2)+","+(a.y+g/2)+")"}).each(function(a){a.g=e.select(this),a.node=this,a.fromStock=!0,a.draw()});b.append("rect").attr("class","hitbox").attr("x",-g/2).attr("y",-g/2).attr("width",g).attr("height",g).on("mouseover",this.board.callbacks.tileMouseover),j(b,this.board,this)}},{key:"updateCount",value:function(a,b){var c=this;this.stock[a]+=b,this.stockSlots.classed("stock-empty",function(a){return c.stock[a.name]<=0}),this.stockSlots.select("text").text(function(a){return"x "+c.stock[a.name]})}}]),a}(),a("Stock",k)}}}),a.register("10",["11","e","f","c"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.velocityI,c=a.velocityJ},function(a){d=a.default},function(a){e=a.default},function(a){f=a.tileSize}],execute:function(){"use strict";g=function(){function a(b,c,d,f,g,h,i){e(this,a),this.i=b,this.j=c,this.dir=d,this.hRe=f,this.hIm=g,this.vRe=h,this.vIm=i}return d(a,[{key:"startX",get:function(){return f*this.i+f/2}},{key:"endX",get:function(){return f*(this.i+b[this.dir])+f/2}},{key:"startY",get:function(){return f*this.j+f/2}},{key:"endY",get:function(){return f*(this.j+c[this.dir])+f/2}},{key:"prob",get:function(){return this.hRe*this.hRe+this.hIm*this.hIm+this.vRe*this.vRe+this.vIm*this.vIm}}]),a}(),a("Particle",g)}}}),a.register("12",["9","10","13","e","f","c"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a.Particle},function(a){d=a},function(a){e=a.default},function(a){f=a.default},function(a){g=a.tileSize,h=a.absorptionDuration,i=a.absorptionTextDuration}],execute:function(){"use strict";j=function(){function a(d,e,g,h,i,j,k,l){f(this,a),this.stateHistory=e,this.history=e.map(function(a){return b.chain(a).groupBy(function(a){return a.i+","+a.j+","+a.to[0]}).mapValues(function(a){var d=b.keyBy(a,function(a){return a.to[1]}),e=d["-"]?d["-"].re:0,f=d["-"]?d["-"].im:0,g=d["|"]?d["|"].re:0,h=d["|"]?d["|"].im:0;return new c(a[0].i,a[0].j,a[0].to[0],e,f,g,h)}).values().value()}),this.measurementHistory=g,this.absorptionProbabilities=h,this.animationStepDuration=d.animationStepDuration,this.interruptCallback=i,this.finishCallback=j,this.drawMode=k,this.board=d,this.displayMessage=l,this.stepNo=0,this.playing=!1,this.initialized=!1,this.board.animationExists=!0,this.previousStepNo=-1}return e(a,[{key:"initialize",value:function(){this.measurementTextGroup=this.board.svg.append("g").attr("class","measurement-texts"),this.absorptionTextGroup=this.board.svg.append("g").attr("class","absorption-texts"),this.initialized=!0,this.board.animationExists=!0}},{key:"play",value:function(){this.initialized||this.initialize(),this.playing||(this.playing=!0,this.forward())}},{key:"stop",value:function(){this.pause(),this.removeTexts(),this.initialized=!1,this.board.animationExists=!1}},{key:"pause",value:function(){this.playing=!1}},{key:"forward",value:function(){this.stepNo>this.previousStepNo&&(this.previousStepNo=this.stepNo,this.displayMessage(d.stateToStr(this.stateHistory[this.stepNo]))),this.nextFrame()}},{key:"nextFrame",value:function(){throw new Error("nextFrame() unimplemented")}},{key:"removeTexts",value:function(){this.measurementTextGroup.remove(),this.absorptionTextGroup.remove()}},{key:"finish",value:function(){var a=this;window.setTimeout(this.displayAbsorptionTexts.bind(this),h);var b=this.measurementHistory.length-1;window.setTimeout(this.displayMeasurementTexts.bind(this,b),this.animationStepDuration),window.setTimeout(this.finishCallback.bind(this),this.absorptionDuration),window.setTimeout(function(){a.board.animationExists=!1},this.absorptionDuration),window.setTimeout(this.removeTexts.bind(this),h+i)}},{key:"displayMeasurementTexts",value:function(a){var c=this;b.forEach(this.measurementHistory[a],function(a){c.measurementTextGroup.datum(a).append("text").attr("class","measurement-text unselectable").attr("x",function(a){return g*a.i+g/2}).attr("y",function(a){return g*a.j+g/2}).attr("dy","0.5em").style("font-size","20px").text(function(a){return a.measured?"click!":"not here..."}).transition().duration(2*c.animationStepDuration).style("font-size","60px").style("opacity",0).remove(),c.measurementTextGroup.datum(a).each(function(a){a.measured&&null!=a.tile&&(a.tile.absorbSound(),a.tile.absorbAnimation())})})}},{key:"displayAbsorptionTexts",value:function(){this.absorptionTextGroup.selectAll(".absorption-text").data(this.absorptionProbabilities).enter().append("text").attr("class","absorption-text unselectable").attr("x",function(a){return g*a.i+g}).attr("y",function(a){return g*a.j+g}).attr("dx","-0.1em").attr("dy","-0.1em").text(function(a){return(100*a.probability).toFixed(0)+"%"}).transition().duration(i).style("opacity",0).remove()}}]),a}(),a("ParticleAnimation",j)}}}),a.register("14",["9","11","12","15","16","e","f","a","c"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;return{setters:[function(a){b=a.default},function(a){c=a.TAU,d=a.perpendicularI,e=a.perpendicularJ},function(a){f=a.ParticleAnimation},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default},function(a){j=a.default},function(a){k=a.default},function(a){l=a.tileSize,m=a.oscillations,n=a.polarizationScaleH,o=a.polarizationScaleV,p=a.resizeThrottle,q=a.canvasDrawFrequency}],execute:function(){"use strict";r=function(a){function f(a,c,d,e,h,i,k,l){j(this,f),g(Object.getPrototypeOf(f.prototype),"constructor",this).call(this,a,c,d,e,h,i,k,l),this.canvas=null,this.helperCanvas=null,this.ctx=null,this.startTime=0,this.pauseTime=0,this.throttledResizeCanvas=b.throttle(this.resizeCanvas,p).bind(this)}return h(f,a),i(f,[{key:"updateStartTime",value:function(){if(!this.playing&&this.startTime<=this.pauseTime){var a=(new Date).getTime();this.startTime+=a-this.pauseTime}}},{key:"stop",value:function(){g(Object.getPrototypeOf(f.prototype),"stop",this).call(this),window.removeEventListener("resize",this.throttledResizeCanvas),this.canvas.classed("canvas--hidden",!0)}},{key:"play",value:function(){this.updateStartTime(),g(Object.getPrototypeOf(f.prototype),"play",this).call(this),this.canvas.classed("canvas--hidden",!1)}},{key:"forward",value:function(){this.updateStartTime(),g(Object.getPrototypeOf(f.prototype),"forward",this).call(this)}},{key:"initialize",value:function(){g(Object.getPrototypeOf(f.prototype),"initialize",this).call(this),this.canvas=k.select("#gameCanvas"),this.ctx=this.canvas[0][0].getContext("2d"),this.helperCanvas=k.select("#gameHelperCanvas"),this.helperCtx=this.helperCanvas[0][0].getContext("2d"),this.canvas[0][0].addEventListener("click",this.interrupt.bind(this)),this.resizeCanvas(),f.stopClearing(),window.addEventListener("resize",this.throttledResizeCanvas),this.startTime=(new Date).getTime(),this.lastStepFloat=0,this.canvas.classed("canvas--hidden",!1)}},{key:"interrupt",value:function(){this.stop(),this.interruptCallback()}},{key:"resizeCanvas",value:function(){var a=this,b=this.board.svg.select(".background").node().getBoundingClientRect(),c=function(c){c.style({width:Math.round(b.width)+"px",height:Math.round(b.height)+"px",top:Math.round(b.top)+"px",left:Math.round(b.left)+"px"}).attr({width:a.board.level.width*l,height:a.board.level.height*l})};c(this.canvas),c(this.helperCanvas)}},{key:"nextFrame",value:function(){var a=(new Date).getTime(),b=(a-this.startTime)/this.animationStepDuration,c=this.stepNo;this.stepNo=Math.floor(b);var d=this.stepNo>c;if(this.stepNo0&&(this.helperCtx.clearRect(0,0,this.board.level.width*l,this.board.level.height*l),this.helperCtx.globalAlpha=a,this.helperCtx.drawImage(this.canvas[0][0],0,0)),this.ctx.clearRect(0,0,this.board.level.width*l,this.board.level.height*l),a>0&&this.ctx.drawImage(this.helperCanvas[0][0],0,0)}}],[{key:"stopClearing",value:function(){f.clearingFramesLeft=0}}]),f}(f),a("CanvasParticleAnimation",r)}}}),a.register("13",[],function(a){"use strict";var b,c,d;return{setters:[],execute:function(){b=function(a){var b="";return 0!==a.re&&0!==a.im?b=a.im>0?"("+a.re.toFixed(3)+" + "+a.im.toFixed(3)+"i)":"("+a.re.toFixed(3)+" - "+Math.abs(a.im).toFixed(3)+"i)":0===a.re?b="("+a.im.toFixed(3)+"i)":0===a.im&&(b="("+a.re.toFixed(3)+")"),b+"*|"+a.i+","+a.j+","+a.to+")"},a("componentToStr",b),c=function(a){return a.map(b).join(" + ")},a("stateToStr",c),d=function(a){return a.map(function(a){return(a.measured?"!!!":"...")+" "+(100*a.probability).toFixed(0)+"% ("+a.i+","+a.j+") "+(null!=a.tile?a.tile.tileName:"out")}).join("\n")},a("absorbedToStr",d)}}}),a.register("17",["9","11","13","18","19","e","f","1a","c"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return{setters:[function(a){b=a.default},function(a){c=a.EPSILON,d=a.velocityI,e=a.velocityJ},function(a){f=a},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default},function(a){j=a.default},function(a){k=a.default},function(a){l=a.maxIterations}],execute:function(){"use strict";m=function(a){return a.re*a.re+a.im*a.im},n=function(a){return b(a).groupBy(function(a){return a.i+" "+a.j}).mapValues(function(a){return b.sumBy(a,m)}).value()},o=function(){function a(b,c){j(this,a),this.tileMatrix=b,this.levelHeight=Math.max.apply(Math,g(this.tileMatrix.map(function(a){return a.length||0}))),this.levelWidth=this.tileMatrix.length,this.history=[],this.measurementHistory=[],this.logging="logging"===c}return i(a,[{key:"initialize",value:function(){var a=this,c=b.reduce(b.range(this.levelWidth),function(c,d){return b.reduce(b.range(a.levelHeight),function(c,e){if(!a.tileMatrix[d][e].type.generation)return c;var f=a.tileMatrix[d][e].type.generation(a.tileMatrix[d][e].rotation);return b.forEach(f,function(a){c.push({i:d,j:e,to:a.to,re:a.re,im:a.im})}),c},c)},[]);this.logging&&(window.console.log("Simulation started:"),window.console.log(f.stateToStr(c))),this.history.push(c),this.measurementHistory.push([]),this.noClickYet=!0}},{key:"propagate",value:function(a){var c=arguments.length<=1||void 0===arguments[1]?-1:arguments[1],d=b.last(this.history),e=this.displace(d),g=this.interact(e),h=this.absorb(e,g,c);return a&&c<0&&(g=this.normalize(g)),this.history.push(g),this.measurementHistory.push(h),this.logging&&(window.console.log(f.stateToStr(e)),h.length>0&&window.console.log(f.absorbedToStr(h))),b.some(h,"measured")&&a?[]:g}},{key:"displace",value:function(a){return b.map(a,function(a){var b=a.to[0],c=a.i+d[b],f=a.j+e[b];return{i:c,j:f,to:a.to,re:a.re,im:a.im}})}},{key:"absorb",value:function(a,d){var e=this,f=arguments.length<=2||void 0===arguments[2]?-1:arguments[2],g=n(a),h=n(d),i=b(g).mapValues(function(a,b){return a-(h[b]||0)}).pickBy(function(a){return a>c}).map(function(a,b){return{probability:a,measured:!1,i:parseInt(b.split(" ")[0]),j:parseInt(b.split(" ")[1])}}).value();i.forEach(function(a){a.tile=e.tileMatrix[a.i]&&e.tileMatrix[a.i][a.j]});var j=Math.random(),k=0;if(this.noClickYet)if(f>0){for(var l=0;lj)){i[l].measured=!0,this.noClickYet=!1;break}}else for(var l=0;lj){i[l].measured=!0,this.noClickYet=!1;break}return i}},{key:"interact",value:function(a){var d=this,e=b.reduce(a,function(a,c){if(c.i<0||c.i>=d.levelWidth||c.j<0||c.j>=d.levelHeight)return a;var e=d.tileMatrix[c.i][c.j],f=e.transitionAmplitudes.map.get(c.to),g=!0,i=!1,j=void 0;try{for(var l,m=k(f);!(g=(l=m.next()).done);g=!0){var n=h(l.value,2),o=n[0],p=n[1],q=[c.i,c.j,o].join("_"),r=c.re*p.re-c.im*p.im,s=c.re*p.im+c.im*p.re;b.has(a,q)?(a[q].re+=r,a[q].im+=s):a[q]={i:c.i,j:c.j,to:o,re:r,im:s}}}catch(a){i=!0,j=a}finally{try{!g&&m.return&&m.return()}finally{if(i)throw j}}return a},{});return b.values(e).filter(function(a){return a.re*a.re+a.im*a.im>c})}},{key:"normalize",value:function(a){var c=b.chain(a).map(function(a){return a.re*a.re+a.im*a.im}).sum();return c=Math.sqrt(c),a.map(function(a){return b.assign(a,{re:a.re/c,im:a.im/c})})}},{key:"propagateToEnd",value:function(){var a=arguments.length<=0||void 0===arguments[0]||arguments[0],b=void 0,c=void 0;for(b=0;bc}).length,this.probsAtMines=b(this.absorptionProbabilities).filter(function(b){return a.tileMatrix[b.i]&&a.tileMatrix[b.i][b.j]&&"Mine"===a.tileMatrix[b.i][b.j].tileName}).sumBy("probability")}},{key:"compareToObjectives",value:function(a,b){this.enoughProbability=this.totalProbAtDets>a-c,this.enoughDetectors=this.noOfFedDets>=b,this.noExplosion=this.probsAtMines1?"s":"")+" feel"+(d>1?"":"s")+" sad and forgotten. Be fair! Give every detector a chance!":this.totalProbAtDets>c?this.message="Only "+(100*this.totalProbAtDets).toFixed(0)+"% (out of "+(100*a).toFixed(0)+"%) chance of detecting a photon at a detector. Try harder!":this.message="No chance to detect a photon at a detector.":this.message="Nothing else matters when you have "+(100*this.probsAtMines).toFixed(0)+"% chance of setting off a mine!",this.isWon}}]),a}(),a("WinningStatus",g)}}}),a.register("d",["a","c","1c","b"],function(a){"use strict";var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.tileSize,d=a.repositionSpeed},function(a){e=a.SoundService},function(a){f=a}],execute:function(){g=function(a,g,h){function i(a){var b=arguments.length<=1||void 0===arguments[1]||arguments[1];delete a.newI,delete a.newJ,a.g.transition().duration(d).attr("transform","translate("+(a.x+c/2)+","+(a.y+c/2)+")").delay(d).each(function(a){b||a.g.remove()})}var j=b.behavior.drag();j.on("dragstart",function(a){if(b.event.sourceEvent.stopPropagation(),a.top=!1,g.animationExists&&(g.stop(),g.callbacks.animationInterrupt()),a.fromStock){if(0===h.stock[a.tileName])return a.dontDrag=!0,void e.playThrottled("error");h.regenerateTile(b.select(a.node.parentNode)),h.updateCount(a.tileName,-1),a.g.classed("stock-dragged",!0)}a.frozen&&"Source"!==a.tileName&&e.playThrottled("error")}).on("drag",function(a){a.frozen||a.dontDrag||(a.top||(a.node.parentNode.appendChild(a.node),a.top=!0),b.select(this).attr("transform","translate("+b.event.x+","+b.event.y+")"),a.newI=Math.floor(b.event.x/c),a.newJ=Math.floor(b.event.y/c))}).on("dragend",function(a){if(a.dontDrag)return void delete a.dontDrag;if(null==a.newI||null==a.newJ)return void(a.fromStock&&(a.g.remove(),h.updateCount(a.tileName,1)));if(a.newI!=a.i||a.newJ!=a.j||a.fromStock||(a.rotate(),e.playThrottled("blip"),g.logger.logAction("rotate",{name:a.tileName,i:a.i,j:a.j,toRotation:a.rotation}),g.callbacks.tileRotated(a)),a.newI<0||a.newI>=g.level.width||a.newJ<0||a.newJ>=g.level.height)return h.updateCount(a.tileName,1),g.logger.logAction("drag",{name:a.tileName,fromStock:!!a.fromStock,fromI:a.i,fromJ:a.j,toStock:!0,success:!a.fromStock}),void(a.fromStock?i(a,!1):g.removeTile(a.i,a.j));var b=g.tileMatrix[a.newI][a.newJ];return"Vacuum"!==b.tileName?(g.logger.logAction("drag",{name:a.tileName,fromStock:!!a.fromStock,fromI:a.i,fromJ:a.j,toStock:!!a.fromStock,toI:b.i,toJ:b.i,success:!1}),void(a.fromStock?(i(a,!1),h.updateCount(a.tileName,1)):i(a,!0))):(a.fromStock||(g.tileMatrix[a.i][a.j]=new f.Tile(f.Vacuum,0,!1,a.i,a.j)),g.logger.logAction("drag",{name:a.tileName,fromStock:!!a.fromStock,fromI:a.i,fromJ:a.j,toStock:!1,toI:b.i,toJ:b.i,success:!0}),g.tileMatrix[b.i][b.j]=a,a.i=b.i,a.j=b.j,a.fromStock&&(a.fromStock=!1,g.boardGroup.node().appendChild(a.node),g.clickBehavior(a.g,g),a.g.insert("rect",":first-child").attr("class",function(a){return a.frozen?"frost frost-frozen":"frost frost-nonfrozen"}).attr("x",-c/2).attr("y",-c/2).attr("width",c).attr("height",c)),void i(a,!0))}),a.call(j)},a("bindDrag",g)}}}),a.register("1d",["9","e","f"],function(a){var b,c,d,e;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default}],execute:function(){"use strict";e=function(){function a(b){d(this,a),this.reset(),this.logAction("loggingStarted",{clientAbsTime:(new Date).toISOString()})}return c(a,[{key:"logAction",value:function(a){var b=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];this.log.push([a,+new Date-this.time0,b])}},{key:"reset",value:function(){this.log=[],this.time0=+new Date}},{key:"save",value:function(){}}]),a}(),a("Logger",e)}}}),a.register("1e",["9","14","17","e","f","a","c","b","1b","d","1d","1c"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p;return{setters:[function(a){b=a.default},function(a){c=a.CanvasParticleAnimation},function(a){d=a},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.tileSize,i=a.tileBorder,j=a.animationStepDuration},function(a){k=a},function(a){l=a.WinningStatus},function(a){m=a.bindDrag},function(a){n=a.Logger},function(a){o=a.SoundService}],execute:function(){"use strict";p=function(){function a(c,d){var e=arguments.length<=2||void 0===arguments[2]?"orthogonal":arguments[2],g=arguments.length<=3||void 0===arguments[3]?"measurement: Copenhagen":arguments[3],h=arguments.length<=4||void 0===arguments[4]?{}:arguments[4],i=arguments.length<=5||void 0===arguments[5]?{}:arguments[5];f(this,a),this.svg=c,this.gameBoard=d,this.drawMode=e,this.measurementMode=g,this.margin=h,this.tileMatrix=[],this.animationStepDuration=j,this.callbacks={tileRotated:i.tileRotated||b.noop,tileMouseover:i.tileMouseover||b.noop,animationStart:i.animationStart||b.noop,animationInterrupt:i.animationInterrupt||b.noop,animationEnd:i.animationEnd||b.noop,setPlayButtonState:i.setPlayButtonState||b.noop},this.logger=new n,this.logger.logAction("initialLevel"),this.animationExists=!1}return e(a,[{key:"redraw",value:function(){this.clearTileMatrix(),this.fillTileMatrix(this.level.tileRecipes),this.resizeSvg(),this.drawBackground(),this.drawBoardHints(),this.drawBoard()}},{key:"clearTileMatrix",value:function(){var a=this;this.tileMatrix=b.range(this.level.width).map(function(c){return b.range(a.level.height).map(function(a){return new k.Tile(k.Vacuum,0,!1,c,a)})})}},{key:"fillTileMatrix",value:function(a){var c=this;b.each(a,function(a){c.tileMatrix[a.i][a.j]=new k.Tile(k[a.name],a.rotation||0,!!a.frozen,a.i,a.j)})}},{key:"resizeSvg",value:function(){var a=this.margin.top||0,b=this.margin.left||0,c=this.margin.bottom||0,d=this.margin.right||0,e=this.level.width+b+d,f=this.level.height+a+c;this.svg.attr("viewBox",-h*b+" "+-h*a+" "+h*e+" "+h*f)}},{key:"drawBackground",value:function(){this.svg.select(".background").remove(),this.svg.append("g").attr("class","background").selectAll(".background-tile").data(b.chain(this.tileMatrix).flatten().map(function(a){return new k.Tile(a.type,a.rotation,a.frozen,a.i,a.j)}).value()).enter().append("rect").attr({class:"background-tile",x:function(a){return a.x+i},y:function(a){return a.y+i},width:h-2*i,height:h-2*i})}},{key:"drawBoardHints",value:function(){var a=h/4;this.svg.select(".board-hints").remove(),this.boardHints=this.svg.append("g").attr("class","board-hints").selectAll(".board-hint").data(this.level.boardHints).enter().append("g").attr("class","board-hint").attr("transform",function(b){return"translate("+(h*b.i+a)+","+(h*b.j+a)+")"}).on("click",function(){g.select(this).style("opacity",1).transition().duration(j).style("opacity",0)}),this.boardHints.append("rect").attr("x",0).attr("y",0).attr("width",function(b){return b.widthI*h-2*a}).attr("height",h-2*a),this.boardHints.append("text").attr("x",function(b){return b.widthI*h/2-a}).attr("y",h/2-a).text(function(a){return a.text});var b=h/4,c={bottom:0,left:90,top:180,right:270};this.boardHints.filter(function(a){return null!=a.triangleI}).append("path").attr("d","M"+-b/2+" 0 L0 "+b+" L"+b/2+" 0 Z").attr("transform",function(a){return"translate("+((a.triangleI-a.i)*h+b)+", "+b+") rotate("+c[a.triangleDir]+") translate(0, "+b+")"})}},{key:"drawBoard",value:function(){var a=this;this.svg.select(".board").remove(),this.boardGroup=this.svg.append("g").attr("class","board"),b.flatten(this.tileMatrix).filter(function(a){return a.type!==k.Vacuum}).forEach(function(b){return a.addTile(b)})}},{key:"addTile",value:function(a){this.removeTile(a.i,a.j),this.tileMatrix[a.i][a.j]=a;var b=this.boardGroup.datum(a).append("g").attr("class","tile").attr("transform",function(a){return"translate("+(a.x+h/2)+","+(a.y+h/2)+")"});a.g=b,a.node=b[0][0],b.append("rect").attr("class",function(a){return a.frozen?"frost frost-frozen":"frost frost-nonfrozen"}).attr("x",-h/2).attr("y",-h/2).attr("width",h).attr("height",h),a.draw(),b.append("rect").attr("class","hitbox").attr("x",-h/2).attr("y",-h/2).attr("width",h).attr("height",h),this.clickBehavior(b,this),m(b,this,this.stock)}},{key:"removeTile",value:function(a,b){this.tileMatrix[a][b].node&&this.tileMatrix[a][b].node.remove(),this.tileMatrix[a][b]=new k.Tile(k.Vacuum,0,!1,a,b)}},{key:"clickBehavior",value:function(a,b){var c=this;a.select(".hitbox").on("click",function(a){if(!g.event.defaultPrevented){if(a.frozen)return void("Source"===a.tileName?(c.logger.logAction("play",{clickingSource:!0}),b.play()):o.playThrottled("error"));b.animationExists&&(c.logger.logAction("simulationStop",{cause:"click on element"}),b.stop(),b.callbacks.animationInterrupt()),a.rotate(),o.playThrottled("blip"),c.logger.logAction("rotate",{name:a.tileName,i:a.i,j:a.j,toRotation:a.rotation}),b.callbacks.tileRotated(a)}}).on("mouseover",function(a){b.callbacks.tileMouseover(a),g.select(this).classed("hitbox-disabled",a.frozen)}),"A Dev"===this.level.group&&a.append("path").attr("class","triangular").attr("d","M 0 0 L -1 0 L 0 1 Z").attr("transform","translate("+h/2+","+-h/2+") scale("+h/4+")").on("click",function(a){a.frozen=!a.frozen,c.logger.logAction("changeFreeze",{name:a.tileName,i:a.i,j:a.j,toFrozen:a.frozen}),a.g.select(".frost").attr("class",a.frozen?"frost frost-frozen":"frost frost-nonfrozen")})}},{key:"generateHistory",value:function(){this.winningStatus=new l(this.tileMatrix),this.winningStatus.run(),"Game"===this.level.group?this.winningStatus.compareToObjectives(this.level.requiredDetectionProbability,this.level.detectorsToFeed):(this.winningStatus.isWon=!1,this.winningStatus.message="No goals, no judgement."),window.console.log(this.winningStatus);var a=this.winningStatus.isWon&&!this.alreadyWon;this.alreadyWon=this.alreadyWon||this.winningStatus.isWon,this.simulationQ=new d.Simulation(this.tileMatrix,"logging"),this.simulationQ.initialize(),"Copenhagen"==this.measurementMode?a&&this.winningStatus.totalProbAtDets>0?this.simulationQ.propagateToEndCheated(this.winningStatus.probsAtDetsByTime):this.simulationQ.propagateToEnd(!0):this.simulationQ.propagateToEnd(!1),this.logger.logAction("run",{isWon:this.winningStatus.isWon,enoughProbability:this.winningStatus.enoughProbability,totalProbAtDets:this.winningStatus.totalProbAtDets,enoughDetectors:this.winningStatus.enoughDetectors,noOfFedDets:this.winningStatus.noOfFedDets,noExplosion:this.winningStatus.noExplosion,probsAtMines:this.winningStatus.probsAtMines})}},{key:"generateAnimation",value:function(){var a=this;this.animationExists&&this.particleAnimation.stop(),this.generateHistory(),this.particleAnimation=new c(this,this.simulationQ.history,this.simulationQ.measurementHistory,this.winningStatus.absorptionProbabilities,this.callbacks.animationInterrupt,this.callbacks.animationEnd,this.drawMode,function(b){return a.gameBoard.titleManager.displayMessage(b,"progress",-1)})}},{key:"play",value:function(){this.logger.logAction("simulationPlay"),this.callbacks.animationStart(),this.animationExists||this.generateAnimation(),this.particleAnimation.playing?(this.particleAnimation.pause(),this.callbacks.setPlayButtonState("play")):(this.particleAnimation.play(),this.callbacks.setPlayButtonState("pause"))}},{key:"stop",value:function(){this.logger.logAction("simulationStop"),this.animationExists&&(this.particleAnimation.stop(),this.callbacks.setPlayButtonState("play"))}},{key:"forward",value:function(){this.animationExists||(this.generateAnimation(),this.particleAnimation.initialize()),this.particleAnimation.playing?(this.particleAnimation.pause(),this.callbacks.setPlayButtonState("play")):this.particleAnimation.forward()}},{key:"exportBoard",value:function(){return{name:this.level.name,group:this.level.group,id:this.level.id,i:this.level.i,next:this.level.next,width:this.level.width,height:this.level.height,tiles:b.chain(this.tileMatrix).flatten().filter(function(a){return"Vacuum"!==a.tileName}).map(function(a){return{i:a.i,j:a.j,name:a.tileName,rotation:a.rotation,frozen:a.frozen}}).value(),stock:this.stock?this.stock.stock:{},requiredDetectionProbability:this.level.requiredDetectionProbability,detectorsToFeed:this.level.detectorsToFeed,texts:this.level.texts,initialHint:this.level.initialHint,boardHints:this.level.boardHints}}}]),a}(),a("BareBoard",p)}}}),a.register("1f",["e","f","c"],function(a){var b,c,d,e,f,g,h;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.tileSize,e=a.pearlsPerRow}],execute:function(){"use strict";f=.2*d,g=.5*d,h=function(){function a(b,d,e){c(this,a),this.g=b.append("g").attr("class","progress-pearls"),this.levels=d,this.gameBoard=e}return b(a,[{key:"draw",value:function(){var a=this;this.pearls=this.g.selectAll(".pearl").data(this.levels);var b=this.pearls.enter().append("g").attr("class","pearl").attr("transform",function(a,b){return"translate("+g*(b%e+.5)+", "+g*(Math.floor(b/e)-.75)+")"}).on("click",function(b){a.gameBoard.loadLevel(b.id)});b.append("circle").attr("r",f),b.append("text").text(function(a){return a.i}),this.update()}},{key:"update",value:function(){var a=this,b=function(b){return a.gameBoard.storage.getLevelIsWon(b.id)};this.pearls.classed("pearl--passed",b).classed("pearl--current",function(b){return b.id===a.gameBoard.storage.getCurrentLevelId()}).on("mouseover",function(c){a.gameBoard.titleManager.displayMessage("GO TO: "+c.i+". "+c.name+" "+(b(c)?"[won]":""),"")})}}]),a}(),a("ProgressPearls",h)}}}),a.register("20",["e","f","a","c"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.tileSize,f=a.tileHelperWidth,g=a.tileHelperHeight}],execute:function(){"use strict";h=function(a,b){a.each(function(){for(var a=d.select(this),c=a.text().split(/\s+/).reverse(),e=void 0,f=[],g=0,h=1.1,i=a.attr("x")||0,j=a.attr("y")||0,k=parseFloat(a.attr("dy"))||0,l=a.text(null).append("tspan").attr("x",i).attr("y",j).attr("dy",k+"em");e=c.pop();)f.push(e),l.text(f.join(" ")),l.node().getComputedTextLength()>b&&(f.pop(),l.text(f.join(" ")),f=[e],l=a.append("tspan").attr("x",i).attr("y",j).attr("dy",++g*h+k+"em").text(e))})},i=function(){function a(b,d,h){c(this,a),this.svg=b,this.game=h,this.width=f*e,this.height=g*e,this.shiftX=(d.level.width+1)*e;var i=2.5;this.shiftY=(d.level.height-g-i)*e,this.initialDraw()}return b(a,[{key:"initialDraw",value:function(){this.svg.select(".helper").remove(),this.helperGroup=this.svg.append("g").attr("class","helper").attr("transform","translate("+this.shiftX+","+this.shiftY+")"),this.helperGroup.append("rect").attr("class","svg-interface-box-stroke").attr("width",""+this.width).attr("height",""+this.height),this.tileBackground=this.helperGroup.append("rect").attr("class","background-tile").attr("x","1").attr("y","1").attr("width","98").attr("height","98"),this.tileUse=this.helperGroup.append("use").attr("class","element helper-element").attr("x",e/2).attr("y",e/2),this.tileName=this.helperGroup.append("text").attr("class","helper-name unselectable").attr("x",2.25*e).attr("y",.4*e),this.tileSummmary=this.helperGroup.append("text").attr("class","helper-summary unselectable").attr("x",.25*e).attr("y",1.5*e),this.helperHitbox=this.helperGroup.append("rect").attr("class","helper-hitbox").attr("width",""+this.width).attr("height",""+this.height)}},{key:"show",value:function(a){var b=this;this.helperHitbox.on("click",function(){b.game.setEncyclopediaItem(a.tileName),b.game.setView("encyclopediaItem")}),this.tileUse.attr("xlink:href","#"+a.type.svgName),this.tileName.text(a.type.desc.name).call(h,(f-2)*e),this.tileSummmary.text(a.type.desc.summary).call(h,(f-.5)*e)}}]),a}(),a("TileHelper",i)}}}),a.register("21",["9","e","f","a","c"],function(a){var b,c,d,e,f,g,h,i,j,k,l;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.tileSize,g=a.absorptionDuration}],execute:function(){"use strict";h=f/3,i=2*f,j=10,k=function(a){return(100*a).toFixed(1)},l=function(){function a(b){d(this,a),this.g=b.append("g").attr("class","detection-bar"),this.draw()}return c(a,[{key:"draw",value:function(){this.percentG=this.g.append("g"),this.percentScale=e.scale.linear().domain([0,1]).range([0,i]),this.percentActual=this.percentG.append("rect").attr("x",0).attr("y",0).attr("width",0).attr("height",h).style("fill","#0a0").style("stroke","none"),this.percentRequired=this.percentG.append("rect").attr("class","detection-bar-box-stroke").attr("x",0).attr("y",0).attr("width",0).attr("height",h),this.percentG.append("rect").attr("class","detection-bar-box-stroke").attr("x",0).attr("y",0).attr("width",i).attr("height",h).style("fill","none"),this.percentText=this.percentG.append("text").attr("class","detection-bar-text").attr("x",i+j).attr("y",h/2),this.countG=this.g.append("g").attr("transform","translate("+7*f+",0)"),this.detectorsText=this.countG.append("text").attr("class","detection-bar-text").attr("y",h/2).text("detectors"),this.mineG=this.g.append("g").attr("transform","translate("+10.5*f+",0)"),this.mineBox=this.mineG.append("rect").attr("class","mine-box detection-bar-box-stroke").attr("x",0).attr("y",0).attr("width",h/2).attr("height",h).style("fill","#fff").style("fill-opacity",.2),this.mineText=this.mineG.append("text").attr("class","detection-bar-text").attr("x",h/2+j).attr("y",h/2)}},{key:"updateRequirements",value:function(a,c){this.requiredProbability=a,this.requiredCount=c,this.percentRequired.attr("width",this.percentScale(a)),this.counts=b.range(c),this.countBoxes=this.countG.selectAll(".count-box").data(this.counts),this.countBoxes.enter().append("rect").attr("class","count-box detection-bar-box-stroke").attr("x",function(a,b){return h*b}).attr("y",0).attr("width",h/2).attr("height",h).style("fill","#fff").style("fill-opacity",.2),this.countBoxes.exit().remove(),this.detectorsText.attr("x",h*c-h/2+j),this.updateActual(0,0,0)}},{key:"updateActual",value:function(a,b,c){this.percentActual.transition().duration(g).attr("width",this.percentScale(a)),this.percentText.text(k(a)+"% (out of "+k(this.requiredProbability)+"%) detection"),this.countBoxes.transition().duration(g).style("fill",function(a,c){return b>c?"#0a0":"#fff"}).style("fill-opacity",function(a,c){return b>c?1:.2}),this.mineBox.transition().duration(g).style("fill",c?"#f00":"#fff").style("fill-opacity",c?.5:.2),this.mineText.text(""+(c?(100*c).toFixed(1):"")+(c?"% risk":"it's safe")).classed("message-failure",c)}}]),a}(),a("DetectionBar",l)}}}),a.register("22",["e","f","c"],function(a){var b,c,d,e;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.displayMessageTimeout}],execute:function(){"use strict";e=function(){function a(b,d,e){c(this,a),this.titleBar=b,this.titleElem=b.select(".title-text"),this.levelNumberElem=b.select(".level-number"),this.blinkSvg=e,this.subtitleElem=d,this.messageElem=this.subtitleElem.select(".subtitle-message"),this.defaultMessage=""}return b(a,[{key:"setTitle",value:function(a){this.titleElem.html(a)}},{key:"setLevelNumber",value:function(a){this.levelNumberElem.html(a)}},{key:"setDefaultMessage",value:function(a,b){this.messageElem.interrupt(),this.defaultMessage=a,this.displayMessage(a,b,-1)}},{key:"displayMessage",value:function(a,b){var c=arguments.length<=2||void 0===arguments[2]?d:arguments[2];this.messageElem.interrupt().style("opacity",1),this.messageElem.text(a).classed("message-success","success"===b).classed("message-failure","failure"===b).classed("message-progress","progress"===b),c>0&&this.messageElem.transition().duration(d).style("opacity",0).delay(d).style("opacity",1).text(this.defaultMessage)}},{key:"activateNextLevelButton",value:function(a){var b=this.titleBar;b.select(".next-level").on("click",a)}},{key:"showNextLevelButton",value:function(a){this.titleBar.select(".next-level").classed("hidden",!a),this.blinkSvg.classed("hidden",!a)}}]),a}(),a("TitleManager",e)}}}),a.register("23",["9"],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n;return{setters:[function(a){b=a.default}],execute:function(){c=[["Vacuum","u"],["Source","s"],["CornerCube","x"],["ThinMirror","t"],["ThinSplitter","h"],["ThinSplitterCoated","c"],["PolarizingSplitter","b"],["PolarizerNS","p"],["PolarizerWE","l"],["QuarterWavePlateNS","q"],["QuarterWavePlateWE","w"],["SugarSolution","g"],["DoubleSugarSolution","i"],["Mine","m"],["Rock","k"],["Glass","a"],["VacuumJar","v"],["Absorber","o"],["Detector","d"],["DetectorFour","e"],["FaradayRotator","f"]],d=b.fromPairs(c),a("name2abbr",d),e=b(c).map(function(a){return[a[1],a[0]]}).fromPairs().value(),f=d.Vacuum+"0",g=function(a){var b=d[a.name];return a.frozen&&(b=b.toUpperCase()),""+b+a.rotation.toFixed(0)},a("encodeTile",g),h=function(a){return{name:e[a[0].toLowerCase()],frozen:a[0]===a[0].toUpperCase(),rotation:parseInt(a[1])}},a("decodeTile",h),i=function(a,b){return a+"="+window.encodeURIComponent(b)},j=function(a,c,d){var e=b.range(d).map(function(){return b.range(c).map(function(){return f})});return a.forEach(function(a){e[a.j][a.i]=g(a)}),b(e).flatten().join("")},k=function(a){return[["n",a.name],["w",a.width],["h",a.height],["t",j(a.tiles,a.width,a.height)]].map(function(a){return i(a[0],a[1])}).join("&")},a("levelRecipe2queryString",k),l=function(a){return b(a.split("&")).map(function(a){return[a[0],decodeURIComponent(a.slice(2))]}).fromPairs().value()},m=function(a,c){return b.range(a.length/2).map(function(b){return{i:b%c,j:Math.floor(b/c),t:a.slice(2*b,2*b+2)}}).filter(function(a){return a.t!==f}).map(function(a){var b=h(a.t);return b.i=a.i,b.j=a.j,b})},n=function(a){var b=l(a);return{name:b.n,group:"Shared",id:-1,i:-1,next:null,width:parseInt(b.w),height:parseInt(b.h),tiles:m(b.t,b.w)}},a("queryString2levelRecipe",n)}}}),a.register("24",["5","7","8","9","20","21","22","23","25","e","f","a","c","1e","1f"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w;return{setters:[function(a){b=a.default},function(a){c=a.saveAs},function(a){d=a.Stock},function(a){e=a.default},function(a){f=a.TileHelper},function(a){g=a.DetectionBar},function(a){h=a.TitleManager},function(a){i=a.levelRecipe2queryString,j=a.queryString2levelRecipe},function(a){k=a},function(a){l=a.default},function(a){m=a.default},function(a){n=a.default},function(a){o=a.absorptionDuration,p=a.animationStepDurationMin,q=a.animationStepDurationMax,r=a.playPauseTransitionDuration,s=a.stockColumns,t=a.tileSize},function(a){u=a.BareBoard},function(a){v=a.ProgressPearls}],execute:function(){"use strict";w=function(){function a(b,c,e,i,j,l){var n=this;m(this,a);var o={top:2,left:4,bottom:2,right:1+s};this.bareBoard=new u(b,this,"orthogonal","Copenhagen",o,{tileRotated:this.tileRotatedCallback.bind(this),tileMouseover:this.tileMouseoverCallback.bind(this),animationStart:this.animationStartCallback.bind(this),animationInterrupt:this.animationInterruptCallback.bind(this),animationEnd:this.animationEndCallback.bind(this),setPlayButtonState:this.setPlayButtonState.bind(this)}),this.game=e,this.svg=b,this.titleManager=new h(this.svg.select(".title-bar"),this.svg.select(".subtitle-bar"),c),this.titleManager.activateNextLevelButton(function(){return n.loadNextLevel()}),this.popupManager=i,this.storage=j,this.progressPearls=new v(b,k.levels.filter(function(a){return"Game"===a.group}),this),this.progressPearls.g.attr("transform","translate("+-1.8*t+","+t+")"),this.progressPearls.draw(),this.stock=new d(b,this.bareBoard),this.bareBoard.stock=this.stock,this.detectionBar=new g(this.svg.select(".subtitle-bar")),this.detectionBar.g.attr("transform","translate("+.5*t+","+t/4+")"),this.logger=this.bareBoard.logger,this.logger.logAction("initialLevel"),this.boardControls=b.selectAll(".board-controls"),this.activateBoardControls(),this.loadLevel(l),this.tileHelper=new f(b,this.bareBoard,this.game)}return l(a,[{key:"tileRotatedCallback",value:function(a){this.showTileHelper(a)}},{key:"tileMouseoverCallback",value:function(a){this.showTileHelper(a)}},{key:"animationStartCallback",value:function(){this.saveProgress(),this.titleManager.displayMessage("Experiment in progress...","progress",-1)}},{key:"animationInterruptCallback",value:function(){this.titleManager.displayMessage("Experiment disturbed! Quantum states are fragile...","failure"),this.setPlayButtonState("play")}},{key:"animationEndCallback",value:function(){var a=this,b=this.bareBoard.winningStatus,c=this.bareBoard.level;this.setPlayButtonState("play"),this.detectionBar.updateActual(b.totalProbAtDets,b.noOfFedDets,b.noExplosion?0:b.probsAtMines),this.titleManager.displayMessage(b.message,b.isWon?"success":"failure",-1),b.isWon&&(this.storage.getLevelIsWon(c.id)||(window.ga?(window.ga("send","event","Level","won",c.id),window.console.log("level winning logged")):window.console.log("no Google Analytics to track winning"),window.setTimeout(function(){return a.popupManager.popup("You won!",{close:!0,nextLevel:!0})},o)),this.titleManager.showNextLevelButton(!0),this.storage.setLevelIsWon(c.id,!0),this.saveProgress(),this.progressPearls.update())}},{key:"reset",value:function(){this.stop(),this.setHeaderTexts(),this.detectionBar.updateRequirements(this.bareBoard.level.requiredDetectionProbability,this.bareBoard.level.detectorsToFeed),this.setPlayButtonState("play"),this.bareBoard.redraw(),this.titleManager.blinkSvg.attr("viewBox",this.svg.attr("viewBox")),this.stock.elementCount(this.bareBoard.level),this.stock.drawStock()}},{key:"stop",value:function(){this.bareBoard.stop()}},{key:"setHeaderTexts",value:function(){this.titleManager.setTitle(this.title),this.titleManager.setDefaultMessage(this.goalMessage,""),this.titleManager.setLevelNumber(this.levelNumber)}},{key:"showTileHelper",value:function(a){this.tileHelper.show(a)}},{key:"setPlayButtonState",value:function(a){if("play"===a||"pause"===a){var b=this.boardControls.select(".play .actual-icon"),c=n.select("#"+a+"-icon");b.transition().duration(r).attr("d",c.attr("d"))}}},{key:"activateBoardControls",value:function(){var a=this,b=this.bareBoard,c=this.boardControls;c.select(".play").on("click",b.play.bind(b)).on("mouseover",function(){return a.titleManager.displayMessage("PLAY/PAUSE")}),c.select(".stop").on("click",b.stop.bind(b)).on("mouseover",function(){return a.titleManager.displayMessage("STOP")}),c.select(".forward").on("click",b.forward.bind(b)).on("mouseover",function(){return a.titleManager.displayMessage("NEXT STEP")});var d=n.scale.log().domain([q,p]).range([0,1]);c.select(".speed").on("click",function(){var c=100,e=n.mouse(this)[0];b.animationStepDuration=d.invert(e/c),a.titleManager.displayMessage("Speed of light: "+(1e3/b.animationStepDuration).toFixed(2)+" tiles/s",""),n.select(this).select("rect").attr("x",e-3)}).on("mouseover",function(){return a.titleManager.displayMessage("CHANGE SPEED")}),c.select(".reset").on("click",function(){a.reloadLevel(!1)}).on("mouseover",function(){return a.titleManager.displayMessage("RESET LEVEL")}),c.select(".download").on("click",function(){b.logger.logAction("download"),a.downloadCurrentLevel()}).on("mouseover",function(){return a.titleManager.displayMessage("DOWNLOAD LEVEL AS JSON")}),c.select(".view-mode").on("click",function(){var a=void 0;a="oscilloscope"===b.drawMode?"orthogonal":"oscilloscope",b.drawMode=a,n.select(this).select("text").html(a)}),c.select(".measurement-mode").on("click",function(){var a=void 0;a="Copenhagen"===b.measurementMode?"delayed meas.":"Copenhagen",b.measurementMode=a,n.select(this).select("text").html(a)})}},{key:"downloadCurrentLevel",value:function(){var a=b(this.bareBoard.exportBoard(),{maxLength:100,indent:2}),d=e.kebabCase(this.bareBoard.level.name+"_"+(new Date).toISOString())+".json",f=new Blob([a],{type:"text/plain;charset=utf-8"});c(f,d),window.console.log(a),window.console.log("levelRecipe2queryString(this.bareBoard.exportBoard())",i(this.bareBoard.exportBoard())),window.console.log("queryString2levelRecipe(levelRecipe2queryString(this.bareBoard.exportBoard()))",j(i(this.bareBoard.exportBoard())))}},{key:"loadLevel",value:function(a){var b=arguments.length<=1||void 0===arguments[1]||arguments[1],c=!(arguments.length<=2||void 0===arguments[2])&&arguments[2];this.saveProgress(),this.logger.save(),this.logger.reset();var d=null,e=!1;b&&this.storage.hasLevelProgress(a)&&(d=this.storage.getLevelProgress(a),this.logger.logAction("loadLevel",{fromStorage:!0}),e=!0),e||null==k.idToLevel[a]||(d=k.idToLevel[a],this.logger.logAction("loadLevel",{fromStorage:!1})),null==d&&(d=k.levels[1],window.console.log("XXX For levelId "+a+" there is no level; falling back to the first level."),this.logger.logAction("invalidLoadLevel",{})),this.storage.getLevelIsWon(d.id)||null==d.initialHint||this.popupManager.popup(d.initialHint,{close:!0,nextLevel:!1}),this.storage.setCurrentLevelId(a),this.bareBoard.level=new k.Level(d,c?"dev":"game"),this.bareBoard.alreadyWon=this.storage.getLevelIsWon(a),this.reset(),this.progressPearls.update(),this.titleManager.showNextLevelButton(this.bareBoard.alreadyWon)}},{key:"loadNextLevel",value:function(){this.bareBoard.level&&this.bareBoard.level.next&&this.loadLevel(this.bareBoard.level.next)}},{key:"reloadLevel",value:function(){var a=!(arguments.length<=0||void 0===arguments[0])&&arguments[0];this.loadLevel(this.bareBoard.level.id,!1,a)}},{key:"saveProgress",value:function(){null!=this.bareBoard.level&&this.storage.setLevelProgress(this.bareBoard.level.id,this.bareBoard.exportBoard())}},{key:"level",get:function(){return this.bareBoard.level}},{key:"title",get:function(){return this.bareBoard.level.name}},{key:"goalMessage",get:function(){return 0===this.bareBoard.level.requiredDetectionProbability?"GOAL: Avoid launching any mines!":0===this.bareBoard.level.detectorsToFeed?"GOAL: No goals! Freedom to do whatever you like. :)":1===this.bareBoard.level.detectorsToFeed?"GOAL: Make the photon fall into a detector, with "+(100*this.bareBoard.level.requiredDetectionProbability).toFixed(0)+"% chance.":"GOAL: Make the photon fall into "+this.bareBoard.level.detectorsToFeed+" detectors, some probability to each, total of "+(100*this.bareBoard.level.requiredDetectionProbability).toFixed(0)+"%."}},{key:"levelNumber",get:function(){return this.bareBoard.level.i}}]),a}(),a("GameBoard",w)}}}),a.register("26",["e","f"],function(a){var b,c,d;return{setters:[function(a){b=a.default},function(a){c=a.default}],execute:function(){"use strict";d=function(){function a(b,d){c(this,a),this.popupElem=b,this.nextLevel=d,this.bindEvents()}return b(a,[{key:"toggle",value:function(a,b){this.popupElem.classed("popup--shown",a)}},{key:"popup",value:function(a,b){this.popupElem.select(".popup-content").html(a),this.popupElem.select(".popup-buttons .popup-action--close").classed("hidden",!b.close),this.popupElem.select(".popup-buttons .popup-action--next-level").classed("hidden",!b.nextLevel),this.toggle(!0)}},{key:"bindEvents",value:function(){var a=this,b=this;this.popupElem.selectAll(".popup-action--close").on("click",function(){b.toggle(!1)}),this.popupElem.selectAll(".popup-action--next-level").on("click",function(){b.toggle(!1),a.nextLevel()})}}]),a}(),a("PopupManager",d)}}}),a.register("27",["e","f"],function(a){var b,c,d;return{setters:[function(a){b=a.default},function(a){c=a.default}],execute:function(){"use strict";d=function(){function a(){c(this,a),this.ls=window.localStorage}return b(a,[{key:"setLevelProgress",value:function(a,b){this.ls.setItem("LevelProgress "+a,JSON.stringify(b))}},{key:"hasLevelProgress",value:function(a){return this.ls.hasOwnProperty("LevelProgress "+a)}},{key:"getLevelProgress",value:function(a){var b=this.ls.getItem("LevelProgress "+a);if(null==b)throw new Error("No data for levelId: "+a);return JSON.parse(this.ls.getItem("LevelProgress "+a))}},{key:"setLevelIsWon",value:function(a){var b=arguments.length<=1||void 0===arguments[1]||arguments[1];this.ls.setItem("LevelIsWon "+a,String(b))}},{key:"getLevelIsWon",value:function(a){return"true"===this.ls.getItem("LevelIsWon "+a)}},{key:"setCurrentLevelId",value:function(a){this.ls.setItem("CurrentLevelId",a)}},{key:"getCurrentLevelId",value:function(){return this.ls.getItem("CurrentLevelId")}}]),a}(),a("Storage",d)}}}),a.register("28",["15","16","29","e","f"],function(a){var b,c,d,e,f,g;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.View},function(a){e=a.default},function(a){f=a.default}],execute:function(){"use strict";g=function(a){function d(){f(this,d),b(Object.getPrototypeOf(d.prototype),"constructor",this).apply(this,arguments)}return c(d,a),e(d,[{key:"initialize",value:function(){this.game.createGameBoard(),this.game.bindMenuEvents()}},{key:"title",get:function(){return this.game.gameBoard.title}},{key:"className",get:function(){return"view--game"}}]),d}(d),a("GameView",g)}}}),a.registerDynamic("2a",[],!0,function(a,b,c){this||self;c.exports=[{name:"Adventures of a curious character",group:"A Dev",width:13,height:10,tiles:[],stock:"all"},{name:"The first steps",group:"Game",width:13,height:10,tiles:[{i:2,j:3,name:"Source",frozen:!0},{i:4,j:3,name:"ThinMirror",rotation:3},{i:5,j:3,name:"Rock",frozen:!0},{i:4,j:6,name:"ThinMirror",frozen:!0,rotation:3},{i:8,j:6,name:"ThinMirror",rotation:1},{i:8,j:3,name:"Detector",frozen:!0,rotation:1}],boardHints:[{i:0,j:4,widthI:3,text:"click laser to start",triangleI:2,triangleDir:"top"},{i:1,j:2,widthI:4,text:"after dropping, click to rotate ",triangleI:4,triangleDir:"bottom"},{i:9,j:0,widthI:4,text:"drag & drop mirror from here",triangleI:12,triangleDir:"right"},{i:4,j:7,widthI:3,text:"some objects are fixed",triangleI:4,triangleDir:"top"},{i:9,j:3,widthI:4,text:"photon should reach there",triangleI:9,triangleDir:"left"}]},{name:"Divide and conquer!",group:"Game",width:13,height:10,tiles:[{i:3,j:6,name:"Detector",rotation:2,frozen:!0},{i:5,j:6,name:"ThinSplitter",rotation:1,frozen:!1},{i:5,j:8,name:"Detector",rotation:3,frozen:!0},{i:7,j:2,name:"Detector",rotation:1,frozen:!0},{i:7,j:4,name:"ThinSplitter",rotation:1,frozen:!1},{i:7,j:6,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:2,name:"Detector",rotation:1,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:1,frozen:!1},{i:9,j:5,name:"Rock",rotation:0,frozen:!0},{i:11,j:4,name:"Detector",rotation:0,frozen:!0},{i:11,j:6,name:"Source",rotation:2,frozen:!0}],boardHints:[{i:0,j:0,widthI:7,text:"give each detector some chance of catching a photon"},{i:9,j:0,widthI:4,text:"brand-new beam splitters",triangleI:12,triangleDir:"right"},{i:0,j:7,widthI:5,text:"each run only a single detector clicks"},{i:5,j:9,widthI:5,text:"but we display probabilities as well"}]},{name:"Not all but everywhere",group:"Game",requiredDetectionProbability:.875,width:13,height:10,tiles:[{i:4,j:4,name:"Source",rotation:0,frozen:!0},{i:6,j:2,name:"Detector",rotation:1,frozen:!0},{i:6,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:6,j:6,name:"Detector",rotation:3,frozen:!0},{i:7,j:4,name:"ThinSplitter",rotation:2,frozen:!1},{i:8,j:4,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:1,j:1,widthI:4,text:"sometimes things get tricky"},{i:7,j:6,widthI:5,text:"but we can afford losing 12.5% photons"}]},{name:"Introducing interference",group:"Game",width:13,height:10,tiles:[{i:1,j:3,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:5,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:3,name:"ThinMirror",rotation:1,frozen:!1},{i:7,j:5,name:"ThinSplitter",rotation:1,frozen:!1},{i:9,j:3,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:5,name:"ThinMirror",rotation:1,frozen:!1},{i:10,j:5,name:"Rock",rotation:0,frozen:!0},{i:11,j:3,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:1,j:1,widthI:4,text:"run it to see what happens",triangleI:1,triangleDir:"bottom"},{i:5,j:2,widthI:3,text:"crazy, isn't it?"},{i:8,j:7,widthI:4,text:"if you don't know what to do"},{i:9,j:8,widthI:3,text:"replicate what you saw"}]},{name:"Changing interference",group:"Game",width:13,height:10,tiles:[{i:1,j:7,name:"Source",frozen:!0},{i:4,j:7,name:"ThinSplitter",frozen:!0,rotation:1},{i:8,j:7,name:"ThinMirror",rotation:1},{i:4,j:4,name:"ThinMirror",frozen:!0,rotation:1},{i:4,j:5,name:"Glass",frozen:!0},{i:4,j:6,name:"Glass"},{i:8,j:4,name:"ThinSplitter",frozen:!0,rotation:1},{i:8,j:1,name:"Detector",frozen:!0,rotation:1},{i:10,j:4,name:"Mine",frozen:!0}],boardHints:[{i:2,j:1,widthI:5,text:"comebacks can turn out either way"},{i:0,j:5,widthI:4,text:"glass changes interference",triangleI:3,triangleDir:"right"}]},{name:"Guiding interference",group:"Game",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:1,j:7,name:"Detector",rotation:2,frozen:!0},{i:3,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:3,j:5,name:"ThinMirror",rotation:1,frozen:!0},{i:3,j:6,name:"Glass",rotation:0,frozen:!1},{i:3,j:7,name:"ThinSplitter",rotation:1,frozen:!0},{i:4,j:5,name:"Glass",rotation:0,frozen:!1},{i:5,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:2,name:"Glass",rotation:0,frozen:!1},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:5,name:"ThinSplitter",rotation:1,frozen:!0},{i:5,j:7,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:1,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:3,name:"ThinSplitter",rotation:1,frozen:!0},{i:7,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:7,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:1,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:3,name:"ThinMirror",rotation:1,frozen:!0},{i:9,j:5,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:7,name:"ThinSplitter",rotation:3,frozen:!0},{i:11,j:1,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:3,j:8,widthI:3,text:"interference is subtle"},{i:6,j:9,widthI:4,text:"use it to your own advantage"}]},{name:"Breaking interference with a rock ",group:"Game",requiredDetectionProbability:.5,width:13,height:10,tiles:[{i:1,j:6,name:"Detector",rotation:2,frozen:!0},{i:3,j:4,name:"ThinMirror",rotation:1,frozen:!0},{i:3,j:6,name:"ThinSplitter",rotation:1,frozen:!0},{i:3,j:8,name:"Detector",rotation:3,frozen:!0},{i:6,j:4,name:"Rock",rotation:0,frozen:!1},{i:9,j:2,name:"Source",rotation:3,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!0}],boardHints:[{i:7,j:0,widthI:6,text:"every rock has a life, has a spirit, has a name",triangleI:12,triangleDir:"right"},{i:5,j:8,widthI:4,text:"one beam always gets split"}]},{name:"Your own Michelson-Morley",group:"Game",width:13,height:10,tiles:[{i:3,j:5,name:"Source",rotation:0,frozen:!0},{i:6,j:1,name:"ThinMirror",rotation:0,frozen:!1},{i:6,j:5,name:"ThinSplitter",rotation:1,frozen:!0},{i:6,j:8,name:"Detector",rotation:3,frozen:!0},{i:10,j:5,name:"ThinMirror",rotation:2,frozen:!1}],boardHints:[{i:1,j:1,widthI:5,text:"it's an important historical experiment"},{i:1,j:2,widthI:2,text:"but hey..."},{i:2,j:3,widthI:2,text:"no pressure!"}]},{name:"Phase matters",group:"Game",width:13,height:10,tiles:[{i:2,j:3,name:"Glass",rotation:0,frozen:!0},{i:3,j:3,name:"ThinMirror",rotation:2,frozen:!1},{i:4,j:3,name:"Glass",rotation:0,frozen:!0},{i:6,j:3,name:"Glass",rotation:0,frozen:!0},{i:8,j:3,name:"Glass",rotation:0,frozen:!0},{i:9,j:1,name:"Source",rotation:3,frozen:!0},{i:9,j:3,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:6,name:"Glass",rotation:0,frozen:!0},{i:9,j:9,name:"ThinMirror",rotation:0,frozen:!1},{i:11,j:3,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:3,j:5,widthI:4,text:"so, can you do it?"}]},{name:"Balance input amplitudes",group:"Game",width:13,height:10,tiles:[{i:1,j:8,name:"Source",rotation:0,frozen:!0},{i:3,j:4,name:"ThinMirror",rotation:1,frozen:!0},{i:3,j:8,name:"ThinSplitter",rotation:1,frozen:!0},{i:5,j:2,name:"Detector",rotation:1,frozen:!0},{i:5,j:4,name:"ThinSplitter",rotation:1,frozen:!1},{i:5,j:6,name:"Rock",rotation:1,frozen:!0},{i:7,j:2,name:"Mine",rotation:0,frozen:!0},{i:7,j:4,name:"ThinSplitter",rotation:1,frozen:!1},{i:7,j:6,name:"ThinSplitter",rotation:1,frozen:!1},{i:7,j:8,name:"ThinMirror",rotation:1,frozen:!0},{i:9,j:4,name:"DetectorFour",rotation:0,frozen:!0},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!0}],boardHints:[{i:2,j:0,widthI:4,text:"interference works perfectly"},{i:5,j:1,widthI:6,text:"only when intensities are exactly the same"}]},{name:"Attenuate the beam",group:"Game",width:13,height:10,requiredDetectionProbability:0,tiles:[{i:1,j:3,name:"Source",rotation:0,frozen:!0},{i:2,j:3,name:"Absorber",rotation:0,frozen:!1},{i:3,j:3,name:"Absorber",rotation:0,frozen:!1},{i:4,j:3,name:"Absorber",rotation:0,frozen:!1},{i:5,j:3,name:"Absorber",rotation:0,frozen:!1},{i:6,j:3,name:"Absorber",rotation:0,frozen:!1},{i:7,j:3,name:"Absorber",rotation:0,frozen:!1},{i:8,j:3,name:"Absorber",rotation:0,frozen:!1},{i:9,j:3,name:"Absorber",rotation:0,frozen:!1},{i:10,j:3,name:"Absorber",rotation:0,frozen:!1},{i:11,j:3,name:"Mine",rotation:0,frozen:!0}],boardHints:[{i:9,j:4,widthI:3,text:"just don't blow it!",triangleI:11,triangleDir:"top"}]},{name:"Match intensities",group:"Game",width:13,height:10,requiredDetectionProbability:.75,tiles:[{i:5,j:5,name:"Detector",rotation:2,frozen:!0},{i:5,j:7,name:"Detector",rotation:2,frozen:!0},{i:9,j:3,name:"ThinMirror",rotation:1,frozen:!0},{i:9,j:5,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:7,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:9,name:"Mine",rotation:0,frozen:!0},{i:11,j:1,name:"Source",rotation:3,frozen:!0},{i:11,j:3,name:"ThinSplitter",rotation:1,frozen:!0},{i:11,j:4,name:"Glass",rotation:0,frozen:!0},{i:11,j:5,name:"Absorber",rotation:0,frozen:!1},{i:11,j:6,name:"Glass",rotation:0,frozen:!0},{i:11,j:7,name:"ThinMirror",rotation:1,frozen:!0}],boardHints:[{i:2,j:2,widthI:6,text:"losing some photons is a price worth paying"}]},{name:"Rotating polarization with sugar",group:"Game",width:13,height:10,tiles:[{i:1,j:8,name:"Detector",rotation:2,frozen:!0},{i:3,j:1,name:"Source",rotation:0,frozen:!0},{i:4,j:8,name:"SugarSolution",rotation:0,frozen:!0},{i:5,j:8,name:"SugarSolution",rotation:0,frozen:!0},{i:6,j:1,name:"SugarSolution",rotation:0,frozen:!0},{i:7,j:1,name:"SugarSolution",rotation:0,frozen:!0},{i:8,j:8,name:"SugarSolution",rotation:0,frozen:!0},{i:9,j:1,name:"ThinMirror",rotation:3,frozen:!1},{i:9,j:4,name:"SugarSolution",rotation:0,frozen:!0},{i:9,j:5,name:"SugarSolution",rotation:0,frozen:!0},{i:9,j:8,name:"ThinMirror",rotation:1,frozen:!1}],boardHints:[{i:1,j:2,widthI:4,text:"it can oscillate up and down",triangleI:4,triangleDir:"top"},{i:8,j:0,widthI:4,text:"or within the board plane",triangleI:8,triangleDir:"bottom"},{i:5,j:7,widthI:4,text:"or at some angle",triangleI:7,triangleDir:"bottom"}]},{name:"Make it all pass",group:"Game",width:13,height:10,tiles:[{i:0,j:3,name:"Source",rotation:0,frozen:!0},{i:0,j:4,name:"Detector",rotation:2,frozen:!0},{i:1,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:3,name:"PolarizerWE",rotation:1,frozen:!0},{i:3,j:4,name:"PolarizerWE",rotation:1,frozen:!0},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:3,name:"PolarizerWE",rotation:3,frozen:!0},{i:7,j:4,name:"PolarizerWE",rotation:0,frozen:!0},{i:8,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:10,j:3,name:"PolarizerWE",rotation:2,frozen:!0},{i:10,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:12,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:12,j:4,name:"ThinMirror",rotation:1,frozen:!0}],boardHints:[{i:1,j:2,widthI:7,text:"linear polarizers absorb one polarization",triangleI:3,triangleDir:"bottom"}]},{name:"Apples to apples",group:"Game",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:4,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:4,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:1,name:"PolarizerWE",rotation:2,frozen:!0},{i:5,j:4,name:"PolarizerWE",rotation:0,frozen:!0},{i:7,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:4,name:"ThinMirror",rotation:3,frozen:!1},{i:7,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"PolarizerWE",rotation:2,frozen:!0},{i:9,j:6,name:"PolarizerWE",rotation:0,frozen:!0},{i:11,j:4,name:"Detector",rotation:0,frozen:!0},{i:11,j:6,name:"Detector",rotation:0,frozen:!0}]},{name:"Three polarizers",group:"Game",requiredDetectionProbability:.25,width:13,height:10,tiles:[{i:2,j:3,name:"Source",rotation:0,frozen:!0},{i:4,j:3,name:"PolarizerWE",rotation:2,frozen:!0},{i:6,j:3,name:"PolarizerWE",rotation:3,frozen:!1},{i:8,j:3,name:"PolarizerWE",rotation:0,frozen:!0},{i:10,j:3,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:5,j:1,widthI:3,text:"seems unfixable :/"},{i:4,j:5,widthI:5,text:"...or block light so it can pass"}]},{name:"Sugar recycling",group:"Game",width:13,height:10,tiles:[{i:3,j:5,name:"Source",rotation:0,frozen:!0},{i:4,j:5,name:"PolarizerWE",rotation:2,frozen:!0},{i:5,j:1,name:"ThinMirror",rotation:1,frozen:!0},{i:5,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:7,name:"PolarizerNS",rotation:2,frozen:!0},{i:5,j:8,name:"Detector",rotation:3,frozen:!0},{i:6,j:1,name:"PolarizerWE",rotation:2,frozen:!0},{i:6,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:5,name:"PolarizerWE",rotation:0,frozen:!0},{i:9,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:5,name:"ThinMirror",rotation:1,frozen:!0}],boardHints:[{i:0,j:9,widthI:7,text:"and after all that, you still don't like us? so sad...",triangleI:0,triangleDir:"left"}]},{name:"Polarizing beam splitter",group:"Game",width:13,height:10,tiles:[{i:1,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:1,j:5,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:2,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:2,j:7,name:"Detector",rotation:2,frozen:!0},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:3,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:5,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:9,name:"Detector",rotation:3,frozen:!0},{i:5,j:3,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:5,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:5,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:6,j:7,name:"Detector",rotation:3,frozen:!0},{i:8,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:8,j:5,name:"Detector",rotation:0,frozen:!0},{i:9,j:1,name:"Source",rotation:0,frozen:!0},{i:9,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:11,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:11,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0}],boardHints:[{i:0,j:1,widthI:7,text:"PBS or the full name, but never say 'polarizing BS'!"},{i:9,j:0,widthI:4,text:"vertical polarization bounces...",triangleI:10,triangleDir:"bottom"},{i:6,j:2,widthI:4,text:"...and horizontal goes through",triangleI:7,triangleDir:"bottom"},{i:7,j:8,widthI:5,text:"how about diagonal polarization?"}]},{name:"Optical table tennis",group:"Game",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:1,j:4,name:"Detector",rotation:2,frozen:!0},{i:2,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:5,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:4,name:"PolarizerWE",rotation:0,frozen:!0},{i:7,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:7,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:7,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:7,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:10,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:10,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:10,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0}]},{name:"Perpendicular are different",group:"Game",width:13,height:10,tiles:[{i:1,j:5,name:"Mine",rotation:0,frozen:!0},{i:3,j:1,name:"ThinMirror",rotation:1,frozen:!0},{i:3,j:3,name:"Glass",rotation:0,frozen:!0},{i:3,j:5,name:"ThinSplitter",rotation:1,frozen:!0},{i:3,j:9,name:"Detector",rotation:3,frozen:!0},{i:5,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:5,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:9,name:"ThinMirror",rotation:3,frozen:!0},{i:6,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:5,name:"ThinMirror",rotation:1,frozen:!0},{i:6,j:9,name:"ThinMirror",rotation:1,frozen:!0},{i:8,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:5,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:10,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:12,j:5,name:"Source",rotation:2,frozen:!0}],boardHints:[{i:0,j:1,widthI:3,text:"perpendicular"},{i:0,j:2,widthI:3,text:"polarizations"},{i:0,j:3,widthI:3,text:"do not"},{i:0,j:4,widthI:3,text:"interfere"}]},{name:"The minefield of interference",group:"Game",width:13,height:10,tiles:[{i:2,j:2,name:"Source",rotation:0,frozen:!0},{i:3,j:2,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:3,j:6,name:"ThinMirror",rotation:3,frozen:!1},{i:3,j:8,name:"Mine",rotation:0,frozen:!0},{i:5,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:8,name:"Mine",rotation:0,frozen:!0},{i:7,j:2,name:"ThinMirror",rotation:3,frozen:!1},{i:7,j:6,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:8,name:"Mine",rotation:0,frozen:!0},{i:9,j:2,name:"Mine",rotation:0,frozen:!0},{i:9,j:4,name:"Detector",rotation:0,frozen:!0},{i:9,j:6,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:5,j:0,widthI:3,text:"it's a mini-boss level!"}]},{name:"It can wait",group:"Game",width:13,height:10,tiles:[{i:5,j:2,name:"ThinMirror",rotation:1,frozen:!1},{i:5,j:8,name:"ThinMirror",rotation:3,frozen:!1},{i:7,j:2,name:"Detector",rotation:0,frozen:!0},{i:7,j:4,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:3,name:"Source",rotation:3,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:3,frozen:!0},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!1},{i:10,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:10,j:8,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Sagnac-Michelson-Morley",group:"Game",width:13,height:10,tiles:[{i:3,j:6,name:"ThinMirror",rotation:2,frozen:!1},{i:7,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:4,name:"VacuumJar",rotation:0,frozen:!1},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:6,name:"ThinSplitter",rotation:3,frozen:!0},{i:9,j:8,name:"Source",rotation:1,frozen:!0},{i:11,j:6,name:"Detector",rotation:0,frozen:!0}],boardHints:[{i:1,j:8,widthI:5,text:"two interferometers for a price of one!"},{i:6,j:1,widthI:5,text:"there will be a Sagnac interferometer ",triangleI:8,triangleDir:"bottom"}]},{name:"Sweet madness",group:"Game",width:13,height:10,tiles:[{i:0,j:1,name:"Detector",rotation:2,frozen:!0},{i:2,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:2,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:2,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:2,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:2,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:2,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:2,j:7,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:3,j:1,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:3,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:3,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:4,name:"Mine",rotation:0,frozen:!0},{i:5,j:1,name:"SugarSolution",rotation:0,frozen:!0},{i:6,j:0,name:"Mine",rotation:0,frozen:!0},{i:6,j:1,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:6,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:9,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:9,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:7,name:"Source",rotation:1,frozen:!0},{i:11,j:4,name:"Mine",rotation:0,frozen:!0}]},{name:"Interfrenzy",group:"Game",width:13,height:10,tiles:[{i:0,j:1,name:"Source",rotation:0,frozen:!0},{i:2,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:2,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:2,j:7,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:1,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:7,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:9,name:"Mine",rotation:0,frozen:!0},{i:9,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:7,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:9,name:"Detector",rotation:3,frozen:!0},{i:11,j:7,name:"Mine",rotation:0,frozen:!0}]},{name:"Faraday and mirrors",group:"Game",width:13,height:10,tiles:[{i:2,j:3,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"DoubleSugarSolution",rotation:0,frozen:!0},{i:5,j:1,name:"Detector",rotation:1,frozen:!0},{i:5,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:5,j:5,name:"FaradayRotator",rotation:1,frozen:!1},{i:5,j:7,name:"ThinMirror",rotation:0,frozen:!1},{i:7,j:3,name:"FaradayRotator",rotation:0,frozen:!1},{i:9,j:3,name:"ThinMirror",rotation:2,frozen:!0}],boardHints:[{i:6,j:6,widthI:5,text:"Faraday rotators are like sugar"},{i:6,j:7,widthI:5,text:"but rotation depends on the direction"}]},{name:"You shouldn't look back",group:"Game",width:13,height:10,tiles:[{i:1,j:4,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"Mine",rotation:0,frozen:!0},{i:3,j:4,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:5,name:"Rock",rotation:0,frozen:!0},{i:5,j:4,name:"PolarizerWE",rotation:2,frozen:!1},{i:6,j:4,name:"FaradayRotator",rotation:0,frozen:!1},{i:9,j:4,name:"ThinSplitter",rotation:2,frozen:!0},{i:11,j:4,name:"Detector",rotation:0,frozen:!0}],requiredDetectionProbability:.25,boardHints:[{i:7,j:6,widthI:5,text:"it's called an optical diode"}]},{name:"Sagnac twist",group:"Game",width:13,height:10,tiles:[{i:2,j:3,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:1,name:"Mine",rotation:0,frozen:!0},{i:5,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:5,j:6,name:"Mine",rotation:0,frozen:!0},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:7,j:1,name:"Detector",rotation:1,frozen:!0},{i:7,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:10,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:10,j:4,name:"FaradayRotator",rotation:1,frozen:!1},{i:10,j:5,name:"FaradayRotator",rotation:1,frozen:!1},{i:10,j:6,name:"ThinMirror",rotation:1,frozen:!0}]},{name:"Nine polarizing beam splitters",group:"Game",width:13,height:10,tiles:[{i:2,j:2,name:"Source",rotation:0,frozen:!0},{i:2,j:4,name:"ThinMirror",rotation:2,frozen:!1},{i:3,j:4,name:"FaradayRotator",rotation:0,frozen:!1},{i:4,j:2,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:6,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:6,j:2,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:6,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:8,j:2,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:8,j:6,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:9,j:4,name:"FaradayRotator",rotation:0,frozen:!1},{i:10,j:4,name:"ThinMirror",rotation:2,frozen:!1},{i:10,j:6,name:"Detector",rotation:0,frozen:!0}]},{name:"One-way mirror",group:"Game",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:3,frozen:!0},{i:1,j:2,name:"SugarSolution",rotation:0,frozen:!0},{i:1,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:1,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:2,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:2,j:4,name:"ThinSplitter",rotation:1,frozen:!0},{i:3,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:3,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:6,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:5,j:8,name:"Detector",rotation:3,frozen:!0},{i:7,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:6,name:"FaradayRotator",rotation:2,frozen:!1},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:0,frozen:!0},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!0}]},{name:"Sweet Faraday",group:"Game",width:13,height:10,tiles:[{i:1,j:1,name:"Detector",rotation:2,frozen:!0},{i:1,j:3,name:"Source",rotation:0,frozen:!0},{i:1,j:5,name:"Mine",rotation:0,frozen:!0},{i:1,j:7,name:"ThinMirror",rotation:2,frozen:!0},{i:2,j:3,name:"FaradayRotator",rotation:0,frozen:!1},{i:2,j:7,name:"FaradayRotator",rotation:0,frozen:!1},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:1,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:3,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:5,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:7,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:7,j:1,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:7,j:3,name:"FaradayRotator",rotation:2,frozen:!1},{i:7,j:5,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:7,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:8,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:7,name:"FaradayRotator",rotation:0,frozen:!1},{i:9,j:1,name:"FaradayRotator",rotation:2,frozen:!1},{i:9,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:9,j:5,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:9,j:7,name:"SugarSolution",rotation:0,frozen:!1},{i:10,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:10,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:11,j:3,name:"ThinMirror",rotation:2,frozen:!0},{i:11,j:5,name:"ThinMirror",rotation:2,frozen:!0}]},{name:"Cascade switches",group:"Game",width:13,height:10,texts:{before:"Splitting and joining..."},tiles:[{i:3,j:5,name:"Mine",rotation:0,frozen:!0},{i:5,j:3,name:"ThinMirror",rotation:1,frozen:!0},{i:5,j:5,name:"ThinSplitter",rotation:1,frozen:!0},{i:5,j:7,name:"Detector",rotation:3,frozen:!0},{i:7,j:1,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:3,name:"ThinSplitter",rotation:1,frozen:!0},{i:7,j:4,name:"Glass",rotation:0,frozen:!1},{i:7,j:5,name:"ThinMirror",rotation:1,frozen:!0},{i:8,j:3,name:"Glass",rotation:0,frozen:!1},{i:9,j:1,name:"ThinSplitter",rotation:1,frozen:!0},{i:9,j:3,name:"ThinMirror",rotation:1,frozen:!0},{i:11,j:1,name:"Source",rotation:2,frozen:!0}]},{name:"Interfering polarization",group:"Game",width:13,height:10,texts:{before:"Adding and subtracting."},tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:3,j:1,name:"ThinSplitter",rotation:3,frozen:!1},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:6,name:"Mine",rotation:0,frozen:!0},{i:7,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:4,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:7,j:8,name:"Detector",rotation:3,frozen:!0},{i:9,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:9,j:6,name:"Detector",rotation:3,frozen:!0},{i:11,j:4,name:"Mine",rotation:0,frozen:!0}]},{name:"A bit of a lot",group:"Game",width:13,height:10,requiredDetectionProbability:.75,tiles:[{i:2,j:3,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:3,name:"PolarizerWE",rotation:1,frozen:!0},{i:4,j:7,name:"Detector",rotation:2,frozen:!0},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:5,j:6,name:"Rock",rotation:0,frozen:!0},{i:6,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:6,j:6,name:"FaradayRotator",rotation:3,frozen:!1},{i:6,j:7,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:6,j:8,name:"Mine",rotation:3,frozen:!0},{i:7,j:3,name:"Absorber",rotation:0,frozen:!1},{i:7,j:5,name:"Glass",rotation:0,frozen:!1},{i:8,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:8,j:4,name:"VacuumJar",rotation:0,frozen:!1},{i:8,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:8,j:8,name:"Detector",rotation:3,frozen:!0},{i:10,j:3,name:"Mine",rotation:0,frozen:!0},{i:10,j:5,name:"Mine",rotation:0,frozen:!0}]}]}),a.registerDynamic("2b",[],!0,function(a,b,c){this||self;c.exports=[{name:"Flowing with the current",group:"Candidate",width:13,height:10,tiles:[{i:1,j:4,name:"Source",rotation:0,frozen:!0},{i:2,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:2,name:"Detector",rotation:1,frozen:!0},{i:4,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:6,name:"Mine",rotation:0,frozen:!0},{i:6,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:4,name:"FaradayRotator",rotation:2,frozen:!1},{i:8,j:2,name:"Mine",rotation:0,frozen:!0},{i:8,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:6,name:"Mine",rotation:0,frozen:!0},{i:11,j:4,name:"ThinMirror",rotation:2,frozen:!0}],requiredDetectionProbability:1},{name:"Buzzing (herbatka z prądem)",group:"Candiate",width:13,height:10,tiles:[{i:2,j:3,name:"Source",rotation:0,frozen:!0},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:4,j:1,name:"Detector",rotation:1,frozen:!0},{i:4,j:3,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:6,j:3,name:"FaradayRotator",rotation:0,frozen:!1},{i:6,j:4,name:"FaradayRotator",rotation:2,frozen:!1},{i:7,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:9,j:6,name:"Mine",rotation:0,frozen:!0},{i:11,j:4,name:"Mine",rotation:0,frozen:!0}],requiredDetectionProbability:1},{name:"Polarizing beam joining",group:"Candidate",width:13,height:10,tiles:[{i:2,j:2,name:"Mine",rotation:0,frozen:!0},{i:2,j:6,name:"ThinMirror",rotation:2,frozen:!0},{i:4,j:0,name:"Detector",rotation:1,frozen:!0},{i:4,j:2,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:4,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:7,name:"Glass",rotation:0,frozen:!1},{i:4,j:8,name:"ThinMirror",rotation:0,frozen:!0},{i:5,j:4,name:"DoubleSugarSolution",rotation:0,frozen:!1},{i:5,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:6,j:3,name:"DoubleSugarSolution",rotation:0,frozen:!1},{i:6,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:6,j:5,name:"SugarSolution",rotation:0,frozen:!0},{i:6,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:8,name:"Mine",rotation:0,frozen:!0},{i:9,j:6,name:"DoubleSugarSolution",rotation:0,frozen:!1},{i:10,j:6,name:"Source",rotation:2,frozen:!0}],requiredDetectionProbability:1},{name:"Odd reflections",group:"Candidate",width:13,height:10,tiles:[{i:1,j:3,name:"Source",rotation:0,frozen:!0},{i:2,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:3,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:7,name:"Detector",rotation:3,frozen:!0},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:5,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:7,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:3,name:"Glass",rotation:0,frozen:!0},{i:9,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:7,name:"ThinSplitter",rotation:3,frozen:!0},{i:11,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:11,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:11,j:7,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Only a spiral can pass",group:"Candidate",width:13,height:10,tiles:[{i:2,j:1,name:"Source",rotation:0,frozen:!0},{i:4,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:1,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:6,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:1,name:"Glass",rotation:0,frozen:!1},{i:8,j:7,name:"Detector",rotation:2,frozen:!0},{i:9,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:3,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:9,j:5,name:"SugarSolution",rotation:0,frozen:!0},{i:9,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:9,j:8,name:"Detector",rotation:3,frozen:!0},{i:11,j:3,name:"Mine",rotation:0,frozen:!0}]},{name:"The sign thing",group:"Candidate",width:13,height:10,tiles:[{i:1,j:2,name:"Detector",rotation:2,frozen:!0},{i:3,j:0,name:"Mine",rotation:0,frozen:!0},{i:3,j:2,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:6,name:"ThinSplitter",rotation:3,frozen:!0},{i:9,j:9,name:"Source",rotation:1,frozen:!0}]},{name:"No leakage",group:"Candidate",width:13,height:10,tiles:[{i:3,j:4,name:"Source",rotation:0,frozen:!0},{i:4,j:4,name:"SugarSolution",rotation:0,frozen:!0},{i:5,j:4,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:5,j:7,name:"ThinMirror",rotation:3,frozen:!0},{i:6,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:7,name:"Glass",rotation:0,frozen:!1},{i:8,j:4,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:8,j:7,name:"ThinSplitter",rotation:3,frozen:!1},{i:10,j:4,name:"ThinMirror",rotation:1,frozen:!0},{i:10,j:7,name:"ThinMirror",rotation:1,frozen:!0},{i:12,j:4,name:"Detector",rotation:0,frozen:!0}]},{name:"Nine polarizing - hardcore mode",group:"Candidate",width:13,height:10,tiles:[{i:2,j:2,name:"Source",rotation:0,frozen:!0},{i:2,j:4,name:"ThinMirror",rotation:2,frozen:!1},{i:2,j:6,name:"ThinMirror",rotation:2,frozen:!1},{i:3,j:2,name:"SugarSolution",rotation:0,frozen:!0},{i:3,j:4,name:"FaradayRotator",rotation:0,frozen:!1},{i:3,j:6,name:"FaradayRotator",rotation:0,frozen:!1},{i:4,j:0,name:"ThinMirror",rotation:0,frozen:!1},{i:4,j:1,name:"FaradayRotator",rotation:1,frozen:!1},{i:4,j:2,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:4,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:6,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:4,j:8,name:"ThinMirror",rotation:3,frozen:!1},{i:6,j:0,name:"ThinMirror",rotation:0,frozen:!1},{i:6,j:1,name:"FaradayRotator",rotation:1,frozen:!1},{i:6,j:2,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:4,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:6,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:8,name:"ThinMirror",rotation:1,frozen:!1},{i:8,j:0,name:"ThinMirror",rotation:0,frozen:!1},{i:8,j:1,name:"FaradayRotator",rotation:1,frozen:!1},{i:8,j:2,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:4,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:8,j:6,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:7,name:"FaradayRotator",rotation:1,frozen:!1},{i:8,j:8,name:"ThinMirror",rotation:0,frozen:!1},{i:9,j:2,name:"FaradayRotator",rotation:0,frozen:!1},{i:9,j:4,name:"FaradayRotator",rotation:0,frozen:!1},{i:10,j:2,name:"ThinMirror",rotation:2,frozen:!1},{i:10,j:4,name:"ThinMirror",rotation:2,frozen:!1},{i:10,j:6,name:"Detector",rotation:0,frozen:!0}]},{name:"Sugar eigenbasis",group:"Candidate",width:13,height:10,texts:{before:"It has its sweet, circular basis."},tiles:[{i:1,j:2,name:"Source",rotation:0,frozen:!0},{i:2,j:2,name:"QuarterWavePlateWE",rotation:3,frozen:!1},{i:4,j:2,name:"ThinSplitter",rotation:3,frozen:!0},{i:4,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:6,j:2,name:"Glass",rotation:0,frozen:!1},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:9,j:5,name:"Mine",rotation:0,frozen:!0},{i:11,j:3,name:"Detector",rotation:0,frozen:!0}]},{name:"Polarization and interference cascade",group:"Candidate",width:13,height:10,texts:{before:"Sort polarization before it's too late!"},tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:3,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:4,j:1,name:"Glass",rotation:0,frozen:!1},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:5,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:7,name:"Detector",rotation:2,frozen:!0},{i:6,j:3,name:"Glass",rotation:0,frozen:!1},{i:7,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:7,j:9,name:"Mine",rotation:0,frozen:!0},{i:9,j:3,name:"Mine",rotation:0,frozen:!0},{i:9,j:5,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:11,j:5,name:"Detector",rotation:0,frozen:!0}]},{name:"Polarizing beam joiner",group:"Candidate",width:13,height:10,tiles:[{i:2,j:1,name:"Source",rotation:0,frozen:!0},{i:4,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:4,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:6,name:"Detector",rotation:2,frozen:!0},{i:7,j:1,name:"Glass",rotation:0,frozen:!1},{i:8,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:3,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:8,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:6,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:8,j:8,name:"Mine",rotation:0,frozen:!0},{i:10,j:3,name:"Mine",rotation:0,frozen:!0}]},{name:"Back to the future",group:"Candidate",width:13,height:10,tiles:[{i:5,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:5,j:6,name:"ThinMirror",rotation:3,frozen:!1},{i:6,j:1,name:"Source",rotation:3,frozen:!0},{i:6,j:2,name:"ThinSplitter",rotation:1,frozen:!0},{i:6,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:6,j:6,name:"ThinMirror",rotation:3,frozen:!1},{i:6,j:7,name:"ThinSplitter",rotation:1,frozen:!1},{i:6,j:8,name:"Detector",rotation:3,frozen:!0},{i:7,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:7,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Twisting and splitting",group:"Candidate",width:13,height:10,tiles:[{i:3,j:3,name:"Detector",rotation:2,frozen:!0},{i:5,j:3,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:5,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:5,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:5,j:7,name:"Detector",rotation:3,frozen:!0},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:1,name:"Detector",rotation:1,frozen:!0},{i:7,j:3,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:7,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:5,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:7,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:7,name:"Source",rotation:1,frozen:!0},{i:9,j:5,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:9,j:7,name:"Detector",rotation:3,frozen:!0},{i:11,j:5,name:"Detector",rotation:0,frozen:!0}]},{name:"Align",group:"Candidate",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:3,j:1,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:1,name:"PolarizingSplitter",rotation:1,frozen:!0},{i:5,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:7,j:4,name:"Glass",rotation:0,frozen:!1},{i:8,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:8,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:4,name:"ThinSplitter",rotation:3,frozen:!0},{i:8,j:6,name:"Mine",rotation:0,frozen:!0},{i:10,j:4,name:"Detector",rotation:0,frozen:!0}]},{name:"One-way back",group:"Candidate",width:13,height:10,requiredDetectionProbability:.875,tiles:[{i:2,j:4,name:"Detector",rotation:2,frozen:!0},{i:3,j:2,name:"Source",rotation:3,frozen:!0},{i:3,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:3,j:6,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:5,j:4,name:"ThinMirror",rotation:1,frozen:!0},{i:7,j:1,name:"Detector",rotation:1,frozen:!0},{i:7,j:2,name:"ThinSplitter",rotation:1,frozen:!1},{i:7,j:3,name:"Detector",rotation:3,frozen:!0},{i:7,j:5,name:"Detector",rotation:1,frozen:!0},{i:7,j:6,name:"ThinSplitter",rotation:1,frozen:!1},{i:7,j:7,name:"Mine",rotation:0,frozen:!0},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:9,j:4,name:"ThinSplitter",rotation:0,frozen:!1},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!0}]},{name:"Polarization equality",group:"Candidate",width:13,height:10,tiles:[{i:1,j:1,name:"Source",rotation:0,frozen:!0},{i:2,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:2,j:3,name:"ThinMirror",rotation:3,frozen:!0},{i:3,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:3,j:2,name:"ThinMirror",rotation:1,frozen:!0},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:4,j:3,name:"SugarSolution",rotation:0,frozen:!0},{i:5,j:1,name:"ThinMirror",rotation:3,frozen:!0},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:5,j:7,name:"Mine",rotation:0,frozen:!0},{i:6,j:5,name:"QuarterWavePlateWE",rotation:2,frozen:!1},{i:7,j:5,name:"QuarterWavePlateWE",rotation:2,frozen:!1},{i:8,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:8,j:5,name:"ThinSplitter",rotation:3,frozen:!1},{i:8,j:9,name:"Mine",rotation:0,frozen:!0},{i:10,j:3,name:"Mine",rotation:0,frozen:!0},{i:12,j:5,name:"Detector",rotation:0,frozen:!0}]},{name:"Reinterference",group:"Candidate",width:13,height:10,tiles:[{i:1,j:2,name:"Source",rotation:0,frozen:!0},{i:1,j:3,name:"Rock",rotation:0,frozen:!0},{i:2,j:2,name:"ThinSplitter",rotation:3,frozen:!0},{i:2,j:4,name:"ThinMirror",rotation:3,frozen:!0},{i:3,j:2,name:"SugarSolution",rotation:0,frozen:!0},{i:3,j:5,name:"Rock",rotation:0,frozen:!0},{i:4,j:2,name:"ThinMirror",rotation:3,frozen:!0},{i:4,j:4,name:"ThinSplitter",rotation:3,frozen:!0},{i:4,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:4,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:4,j:8,name:"Detector",rotation:3,frozen:!0},{i:5,j:3,name:"Rock",rotation:0,frozen:!0},{i:5,j:4,name:"ThinMirror",rotation:3,frozen:!1},{i:5,j:5,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:8,name:"ThinMirror",rotation:3,frozen:!1},{i:9,j:4,name:"ThinMirror",rotation:1,frozen:!1},{i:9,j:8,name:"ThinMirror",rotation:1,frozen:!1},{i:10,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:10,j:7,name:"ThinMirror",rotation:1,frozen:!1},{i:11,j:4,name:"Detector",rotation:0,frozen:!0}]},{name:"Cancel a component",group:"Candidate",width:13,height:10,tiles:[{i:3,j:3,name:"Source",rotation:0,frozen:!0},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:5,j:7,name:"Detector",rotation:2,frozen:!0},{i:6,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:6,j:7,name:"PolarizingSplitter",rotation:0,frozen:!0},{i:6,j:8,name:"Mine",rotation:0,frozen:!0},{i:7,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:7,j:5,name:"ThinSplitter",rotation:3,frozen:!0},{i:7,j:7,name:"ThinMirror",rotation:1,frozen:!0},{i:9,j:5,name:"Detector",rotation:0,frozen:!0}]}]}),a.registerDynamic("2c",[],!0,function(a,b,c){this||self;c.exports=[{name:"Sugar vs mirrors",group:"X Examples",width:13,height:10,stock:{},tiles:[{i:3,j:3,name:"Source",rotation:0,frozen:!1},{i:5,j:5,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:6,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:5,name:"SugarSolution",rotation:0,frozen:!1},{i:9,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:9,j:5,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"So close yet so far",group:"X Playing",width:13,height:10,tiles:[{i:0,j:2,name:"Source",rotation:0,frozen:!1},{i:1,j:1,name:"Detector",rotation:1,frozen:!1},{i:1,j:2,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:3,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:5,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:3,name:"Glass",rotation:0,frozen:!1},{i:5,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:6,name:"ThinMirror",rotation:3,frozen:!1},{i:7,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:6,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:2,name:"ThinMirror",rotation:3,frozen:!1},{i:9,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:9,j:6,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Mirrors and polarization - not sure",group:"X Test",texts:{before:"Try moving sugar solution - it will cancel (not sure if its OK)"},width:13,height:10,stock:{},tiles:[{i:1,j:2,name:"Source",rotation:0,frozen:!1},{i:3,j:2,name:"PolarizingSplitter",rotation:1,frozen:!1},{i:4,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:4,j:6,name:"ThinMirror",rotation:3,frozen:!1},{i:6,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:6,name:"SugarSolution",rotation:0,frozen:!1},{i:8,j:2,name:"ThinMirror",rotation:3,frozen:!1},{i:8,j:6,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Geometrical series - detection",group:"X Test",width:13,height:10,stock:{},tiles:[{i:3,j:3,name:"Source",rotation:0,frozen:!1},{i:6,j:1,name:"Detector",rotation:1,frozen:!1},{i:6,j:3,name:"ThinSplitter",rotation:1,frozen:!1},{i:6,j:5,name:"ThinMirror",rotation:3,frozen:!1},{i:8,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:8,j:5,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Geometrical series - train",group:"X Test",width:13,height:10,stock:{},tiles:[{i:0,j:0,name:"ThinMirror",rotation:1,frozen:!1},{i:0,j:9,name:"Detector",rotation:3,frozen:!1},{i:1,j:2,name:"Source",rotation:0,frozen:!1},{i:2,j:1,name:"ThinMirror",rotation:1,frozen:!1},{i:2,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:2,j:9,name:"ThinMirror",rotation:3,frozen:!1},{i:3,j:1,name:"ThinMirror",rotation:3,frozen:!1},{i:3,j:2,name:"ThinMirror",rotation:1,frozen:!1},{i:12,j:0,name:"ThinMirror",rotation:3,frozen:!1},{i:12,j:9,name:"ThinMirror",rotation:1,frozen:!1}]},{name:"Polarization fun",group:"X Various",width:13,height:10,stock:{},tiles:[{i:1,j:3,name:"Source",rotation:0,frozen:!1},{i:2,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:3,name:"SugarSolution",rotation:0,frozen:!1},{i:4,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:4,j:4,name:"ThinMirror",rotation:3,frozen:!1},{i:5,j:2,name:"ThinMirror",rotation:1,frozen:!1},{i:5,j:3,name:"ThinMirror",rotation:1,frozen:!1},{i:5,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:6,j:3,name:"ThinMirror",rotation:3,frozen:!1},{i:6,j:4,name:"SugarSolution",rotation:0,frozen:!1},{i:7,j:3,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:7,j:4,name:"ThinMirror",rotation:1,frozen:!1},{i:8,j:3,name:"QuarterWavePlate",rotation:1,frozen:!1},{i:9,j:1,name:"Mine",rotation:0,frozen:!1},{i:9,j:3,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:11,j:3,name:"Detector",rotation:0,frozen:!1}]},{name:"Lost in the BS woods (99% detection)",group:"X Test",width:13,height:10,tiles:[{i:0,j:2,name:"Source",rotation:0,frozen:!1},{i:1,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:2,j:2,name:"SugarSolution",rotation:0,frozen:!1},{i:3,j:2,name:"PolarizingSplitter",rotation:0,frozen:!1},{i:3,j:4,name:"Detector",rotation:3,frozen:!1},{i:4,j:2,name:"FaradayRotator",rotation:0,frozen:!1},{i:4,j:3,name:"ThinMirror",rotation:2,frozen:!1},{i:4,j:4,name:"ThinMirror",rotation:2,frozen:!1},{i:5,j:1,name:"ThinMirror",rotation:0,frozen:!1},{i:5,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:5,j:5,name:"ThinMirror",rotation:0,frozen:!1},{i:6,j:1,name:"ThinMirror",rotation:0,frozen:!1},{i:6,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:6,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:6,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:6,j:5,name:"ThinMirror",rotation:0,frozen:!1},{i:7,j:1,name:"ThinMirror",rotation:0,frozen:!1},{i:7,j:2,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:3,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:4,name:"ThinSplitter",rotation:3,frozen:!1},{i:7,j:5,name:"ThinMirror",rotation:0,frozen:!1},{i:8,j:2,name:"ThinMirror",rotation:2,frozen:!1},{i:8,j:3,name:"ThinMirror",rotation:2,frozen:!1},{i:8,j:4,name:"ThinMirror",rotation:2,frozen:!1}]},{name:"Testing first-win animation",group:"X Test",i:1,next:"Game Introducing mirrors",width:13,height:10,tiles:[{i:2,j:1,name:"Source",rotation:0,frozen:!0},{i:4,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:4,j:2,name:"Rock",rotation:0,frozen:!0},{i:5,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:5,j:4,name:"Rock",rotation:0,frozen:!0},{i:6,j:1,name:"Absorber",rotation:0,frozen:!0},{i:10,j:1,name:"ThinSplitter",rotation:3,frozen:!0},{i:10,j:3,name:"DetectorFour",rotation:0,frozen:!0},{i:11,j:1,name:"Detector",rotation:0,frozen:!0}],requiredDetectionProbability:.01,detectorsToFeed:0,texts:{before:"Adventures of a Curious Character"}}]}),a.registerDynamic("2d",[],!0,function(a,b,c){this||self;c.exports={name:"No more challenges",group:"Last",width:13,height:10,tiles:[{i:10,j:1,name:"Source",rotation:0,frozen:!0},{i:11,j:1,name:"Detector",rotation:0,frozen:!0}],stock:{},boardHints:[{i:4,j:0,widthI:5,text:"thank you for testing!"},{i:5,j:1,widthI:3,text:"(it's still beta)"},{i:4,j:2,widthI:5,text:"we really hope you enjoyed it a bit"},{i:9,j:5,widthI:1,text:"by:"},{i:9,j:6,widthI:3,text:"Piotr Migdał"},{i:9,j:7,widthI:3,text:"Patryk Hes"},{i:9,j:8,widthI:3,text:"Michał Krupiński"},{i:0,j:3,widthI:3,text:"all missions over...",triangleI:0,triangleDir:"left"},{i:0,j:4,widthI:4,text:"...but we can make more..,"},{i:0,j:5,widthI:4,text:"...and you can as well!"},{i:0,j:9,widthI:10,text:"stay with us... :) at tell us what you enjoyed, and what was annoying)",triangleI:0,triangleDir:"left"}]}}),a.register("25",["9","f","b","c","2a","2b","2c","2d"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.nonVacuumTiles},function(a){e=a.isProduction},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){"use strict";j=function a(e){var f=this,g=arguments.length<=1||void 0===arguments[1]?"game":arguments[1];c(this,a),this.next=e.next,this.name=e.name,"dev"===g?this.group="A Dev":this.group=e.group,this.i=e.i,this.id=e.id,this.next=e.next,this.width=e.width,this.height=e.height,this.initialHint=e.initialHint,this.boardHints=e.boardHints||[],this.texts=e.texts||{},this.tileRecipes=e.tiles,this.initialStock={},null==e.stock&&0===b.filter(e.tiles,"frozen").length&&(e.stock="all"),"object"==typeof e.stock||"as_it_is"===g?this.initialStock=e.stock||{}:"all"===e.stock||"dev"===g?d.forEach(function(a){f.initialStock[a]="Source"===a?1:99}):"non-frozen"!==e.stock&&"game"!==g||(this.tileRecipes=b.filter(e.tiles,"frozen"),this.initialStock=b(e.tiles).filter(function(a){return!a.frozen}).countBy("name").value()),this.requiredDetectionProbability=void 0===e.requiredDetectionProbability?1:e.requiredDetectionProbability,this.detectorsToFeed=e.detectorsToFeed||b.filter(e.tiles,function(a){return a.frozen&&("Detector"===a.name||"DetectorFour"===a.name)}).length},a("Level",j),k=function(a){return a.group+" "+a.name},e?g.forEach(function(a){return a.group="X Candidate"}):g.forEach(function(a){return a.group="Game"}),l=b(f).concat(g).concat(h).map(function(a,b){return a.i=b,a.id=k(a),a}).sortBy(function(a){return a.group+" "+(1e6+a.i)}).value(),a("levels",l),e&&(i.i=-1,i.group="Special",i.id="3413472342",l.push(i)),l.forEach(function(a,c){a.next=b.get(l[c+1],"id"),delete a.i}),b(l).groupBy("group").forEach(function(a){return a.forEach(function(a,b){return a.i=b+1})}),l[0].i="∞",m=b.keyBy(l,"id"),a("idToLevel",m)}}}),a.register("2e",["9","15","16","25","29","e","f","a"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a},function(a){f=a.View},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){"use strict";j=function(a){function f(){h(this,f),c(Object.getPrototypeOf(f.prototype),"constructor",this).apply(this,arguments)}return d(f,a),g(f,[{key:"initialize",value:function(){var a=this,c=i.select(".level-selector > ul").selectAll("li").data(e.levels).enter().append("li").attr("class","level-item unselectable").text(function(a){return"["+a.group+"] "+a.i+". "+a.name+" "}).on("click",function(b){a.game.gameBoard.loadLevel(b.id),a.game.setView("game")}),d={};e.levels.forEach(function(a){a.newTiles=[],a.tiles.forEach(function(c){b.has(d,c.name)||(d[c.name]=!0,a.newTiles.push(c.name))})}),c.append("span").style("font-size","1.5vh").text(function(a){return b(a.tiles).groupBy("name").keys().filter(function(a){return!b.includes(["Detector","Rock","Source"],a)}).value().join(" ")}),c.append("span").style("font-size","1.5vh").text(function(a){return a.newTiles.length?" (NEW: "+a.newTiles.join(" ")+")":""}),this.bindMenuEvents()}},{key:"bindMenuEvents",value:function(){var a=this;i.select(".view--level-selector .bottom-bar__back-to-game-button").on("click",function(){a.game.setView("game")})}},{key:"title",get:function(){return"Quantum game"}},{key:"className",get:function(){return"view--level-selector"}}]),f}(f),a("LevelSelectorView",j)}}}),a.register("2f",["15","16","29","e","f","a","b"],function(a){var b,c,d,e,f,g,h,i;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.View},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a}],execute:function(){"use strict";i=function(a){function d(){f(this,d),b(Object.getPrototypeOf(d.prototype),"constructor",this).apply(this,arguments)}return c(d,a),e(d,[{key:"initialize",value:function(){this.createSelectorEntries(),this.bindMenuEvents()}},{key:"createSelectorEntries",value:function(){var a=this,b=g.select(".encyclopedia-selector > ul").selectAll("li").data(h.nonVacuumTiles).enter().append("li").append("button").attr("class","unselectable").on("click",function(b){a.game.setEncyclopediaItem(b),a.game.setView("encyclopediaItem")});b.append("svg").attr("viewBox","0 0 100 100").append("use").attr("xlink:href",function(a){return"#"+h[a].svgName}).attr("transform","translate(50, 50)"),b.append("h4").text(function(a){return h[a].desc.name})}},{key:"bindMenuEvents",value:function(){var a=this;g.select(".view--encyclopedia-selector .bottom-bar__back-to-game-button").on("click",function(){a.game.setView("game")})}},{key:"title",get:function(){return"Encyclopedia"}},{key:"className",get:function(){return"view--encyclopedia-selector"}}]),d}(d),a("EncyclopediaSelectorView",i)}}}),a.registerDynamic("30",["31","32","33"],!0,function(a,b,c){var d=(this||self,a("31")),e=a("32"),f=a("33");c.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}}),a.registerDynamic("34",["35","30"],!0,function(a,b,c){var d=(this||self,a("35"));a("30")("getOwnPropertyDescriptor",function(a){return function(b,c){return a(d(b),c)}})}),a.registerDynamic("36",["37","34"],!0,function(a,b,c){var d=(this||self,a("37"));a("34"),c.exports=function(a,b){return d.getDesc(a,b)}}),a.registerDynamic("38",["36"],!0,function(a,b,c){this||self;c.exports={default:a("36"),__esModule:!0}}),a.registerDynamic("15",["38"],!0,function(a,b,c){"use strict";var d=(this||self,a("38").default);b.default=function(a,b,c){for(var e=!0;e;){var f=a,g=b,h=c;e=!1,null===f&&(f=Function.prototype);var i=d(f,g);if(void 0!==i){if("value"in i)return i.value;var j=i.get;if(void 0===j)return;return j.call(h)}var k=Object.getPrototypeOf(f);if(null===k)return;a=k,b=g,c=h,e=!0,i=k=void 0}},b.__esModule=!0}),a.registerDynamic("39",["37"],!0,function(a,b,c){var d=(this||self,a("37"));c.exports=function(a,b){return d.create(a,b)}}),a.registerDynamic("3a",["39"],!0,function(a,b,c){this||self;c.exports={default:a("39"),__esModule:!0}}),a.registerDynamic("3b",["37","3c","3d","3e"],!0,function(a,b,c){var d=(this||self,a("37").getDesc),e=a("3c"),f=a("3d"),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};c.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(b,c,e){try{e=a("3e")(Function.call,d(Object.prototype,"__proto__").set,2),e(b,[]),c=!(b instanceof Array)}catch(a){c=!0}return function(a,b){return g(a,b),c?a.__proto__=b:e(a,b),a}}({},!1):void 0),check:g}}),a.registerDynamic("3f",["31","3b"],!0,function(a,b,c){var d=(this||self,a("31"));d(d.S,"Object",{setPrototypeOf:a("3b").set})}),a.registerDynamic("40",["3f","32"],!0,function(a,b,c){this||self;a("3f"),c.exports=a("32").Object.setPrototypeOf}),a.registerDynamic("41",["40"],!0,function(a,b,c){this||self;c.exports={default:a("40"),__esModule:!0}}),a.registerDynamic("16",["3a","41"],!0,function(a,b,c){"use strict";var d=(this||self,a("3a").default),e=a("41").default;b.default=function(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=d(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(e?e(a,b):a.__proto__=b)},b.__esModule=!0}),a.register("42",["9","43"],function(a){"use strict";function b(a){return{">":0,"^":90,"<":180,v:270}[a]}function c(a){return{0:">",90:"^",180:"<",270:"v"}[""+a]}function d(a){var d=b(a),e=(d+180)%360;return c(e)}function e(a,d){var e=45*d,f=b(a),g=(2*e-f+360)%360;return c(g)}var f,g,h,i,j,k,l,m,n,o;return a("directionToAngle",b),a("angleToDirection",c),a("pointReflectionDirection",d),a("planeReflectionDirection",e),{setters:[function(a){f=a.default},function(a){g=a.Tensor}],execute:function(){h=[">","^","<","v"],a("directions",h),i=g.fill(h,{re:1,im:0}),a("identity",i),j=g.fill(h,{re:0,im:0}),a("zero",j),k=g.fromObject(f.reduce(h,function(a,b){var c=d(b);return a[b]={},a[b][c]={re:1,im:0},a},{})),a("cube",k),l=f.range(4).map(function(a){return g.fromObject(f.reduce(h,function(b,c){var d=e(c,a);return b[c]={},c!==d&&(b[c][d]={re:1,im:0}),b},{}))}),a("mirror",l),m=f.range(8).map(function(a){return g.fromObject(f.reduce(h,function(b,c,d){var f=e(c,a),g=(-a/2+d+8)%4<1.75?-1:1;return b[c]={},c!==f&&(b[c][f]={re:g,im:0}),b},{}))}),a("mirrorCoated",m),n=f.range(4).map(function(a){return g.fromObject(f.reduce(h,function(b,c){return b[c]={},c===h[a]&&(b[c][c]={re:1,im:0}),b},{}))}),a("diode",n),o=f.range(4).map(function(a){return g.fromObject(f.reduce(h,function(b,c,e){var f=d(c);return b[c]={},a!==e&&(b[c][f]={re:1,im:0}),b},{}))}),a("absorbOneDirReflectOther",o)}}}),a.registerDynamic("44",["45","46","47","32"],!0,function(a,b,c){var d=(this||self,a("45")),e=a("46")("iterator"),f=a("47");c.exports=a("32").isIterable=function(a){var b=Object(a);return void 0!==b[e]||"@@iterator"in b||f.hasOwnProperty(d(b))}}),a.registerDynamic("48",["49","4a","44"],!0,function(a,b,c){this||self;a("49"),a("4a"),c.exports=a("44")}),a.registerDynamic("4b",["48"],!0,function(a,b,c){this||self;c.exports={default:a("48"),__esModule:!0}}),a.registerDynamic("19",["1a","4b"],!0,function(a,b,c){"use strict";var d=(this||self,a("1a").default),e=a("4b").default;b.default=function(){function a(a,b){var c=[],e=!0,f=!1,g=void 0;try{for(var h,i=d(a);!(e=(h=i.next()).done)&&(c.push(h.value),!b||c.length!==b);e=!0);}catch(a){f=!0,g=a}finally{try{!e&&i.return&&i.return()}finally{if(f)throw g}}return c}return function(b,c){if(Array.isArray(b))return b;if(e(Object(b)))return a(b,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),b.__esModule=!0}),a.registerDynamic("4c",["4d"],!0,function(a,b,c){var d=(this||self,a("4d"));c.exports=function(a){return Object(d(a))}}),a.registerDynamic("4e",["46"],!0,function(a,b,c){var d=(this||self,a("46")("iterator")),e=!1;try{var f=[7][d]();f.return=function(){e=!0},Array.from(f,function(){throw 2})}catch(a){}c.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(a){}return c}}),a.registerDynamic("4f",["3e","31","4c","50","51","52","53","4e"],!0,function(a,b,c){"use strict";var d=(this||self,a("3e")),e=a("31"),f=a("4c"),g=a("50"),h=a("51"),i=a("52"),j=a("53");e(e.S+e.F*!a("4e")(function(a){Array.from(a)}),"Array",{from:function(a){var b,c,e,k,l=f(a),m="function"==typeof this?this:Array,n=arguments,o=n.length,p=o>1?n[1]:void 0,q=void 0!==p,r=0,s=j(l);if(q&&(p=d(p,o>2?n[2]:void 0,2)),void 0==s||m==Array&&h(s))for(b=i(l.length),c=new m(b);b>r;r++)c[r]=q?p(l[r],r):l[r];else for(k=s.call(l),c=new m;!(e=k.next()).done;r++)c[r]=q?g(k,p,[e.value,r],!0):e.value;return c.length=r,c}})}),a.registerDynamic("54",["4a","4f","32"],!0,function(a,b,c){this||self;a("4a"),a("4f"),c.exports=a("32").Array.from}),a.registerDynamic("55",["54"],!0,function(a,b,c){this||self;c.exports={default:a("54"),__esModule:!0}}),a.registerDynamic("18",["55"],!0,function(a,b,c){"use strict";var d=(this||self,a("55").default);b.default=function(a){if(Array.isArray(a)){for(var b=0,c=Array(a.length);b0?arguments[0]:void 0)}},{get:function(a){var b=d.getEntry(this,a);return b&&b.v},set:function(a,b){return d.def(this,0===a?0:a,b)}},d,!0)}),a.registerDynamic("59",["31","5a"],!0,function(a,b,c){var d=(this||self,a("31"));d(d.P,"Map",{toJSON:a("5a")("Map")})}),a.registerDynamic("5b",["5c","4a","49","56","59","32"],!0,function(a,b,c){this||self;a("5c"),a("4a"),a("49"),a("56"),a("59"),c.exports=a("32").Map}),a.registerDynamic("5d",["5b"],!0,function(a,b,c){this||self;c.exports={default:a("5b"),__esModule:!0}}),a.registerDynamic("5e",["3d","53","32"],!0,function(a,b,c){var d=(this||self,a("3d")),e=a("53");c.exports=a("32").getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}}),a.registerDynamic("5f",["49","4a","5e"],!0,function(a,b,c){this||self;a("49"),a("4a"),c.exports=a("5e")}),a.registerDynamic("1a",["5f"],!0,function(a,b,c){this||self;c.exports={default:a("5f"),__esModule:!0}}),a.registerDynamic("5c",[],!0,function(a,b,c){"format cjs";this||self}),a.registerDynamic("60",["61","4d"],!0,function(a,b,c){var d=(this||self,a("61")),e=a("4d");c.exports=function(a){return function(b,c){var f,g,h=String(e(b)),i=d(c),j=h.length;return i<0||i>=j?a?"":void 0:(f=h.charCodeAt(i),f<55296||f>56319||i+1===j||(g=h.charCodeAt(i+1))<56320||g>57343?a?h.charAt(i):f:a?h.slice(i,i+2):(f-55296<<10)+(g-56320)+65536)}}}),a.registerDynamic("4a",["60","62"],!0,function(a,b,c){"use strict";var d=(this||self,a("60")(!0));a("62")(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,c=this._i;return c>=b.length?{value:void 0,done:!0}:(a=d(b,c),this._i+=a.length,{value:a,done:!1})})}),a.registerDynamic("63",[],!0,function(a,b,c){this||self;c.exports=function(){}}),a.registerDynamic("64",["65"],!0,function(a,b,c){var d=(this||self,a("65"));c.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}}),a.registerDynamic("35",["64","4d"],!0,function(a,b,c){var d=(this||self,a("64")),e=a("4d");c.exports=function(a){return d(e(a))}}),a.registerDynamic("66",["63","67","47","35","62"],!0,function(a,b,c){"use strict";var d=(this||self,a("63")),e=a("67"),f=a("47"),g=a("35");c.exports=a("62")(Array,"Array",function(a,b){this._t=g(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,c=this._i++;return!a||c>=a.length?(this._t=void 0,e(1)):"keys"==b?e(0,c):"values"==b?e(0,a[c]):e(0,[c,a[c]])},"values"),f.Arguments=f.Array,d("keys"),d("values"),d("entries")}),a.registerDynamic("49",["66","47"],!0,function(a,b,c){this||self;a("66");var d=a("47");d.NodeList=d.HTMLCollection=d.Array}),a.registerDynamic("4d",[],!0,function(a,b,c){this||self;c.exports=function(a){if(void 0==a)throw TypeError("Can't call method on "+a);return a}}),a.registerDynamic("68",[],!0,function(a,b,c){this||self;c.exports=!0}),a.registerDynamic("69",["37","6a","6b","6c","46"],!0,function(a,b,c){"use strict";var d=(this||self,a("37")),e=a("6a"),f=a("6b"),g={};a("6c")(g,a("46")("iterator"),function(){return this}),c.exports=function(a,b,c){a.prototype=d.create(g,{next:e(1,c)}),f(a,b+" Iterator")}}),a.registerDynamic("62",["68","31","6d","6c","6e","47","69","6b","37","46"],!0,function(a,b,c){"use strict";var d=(this||self,a("68")),e=a("31"),f=a("6d"),g=a("6c"),h=a("6e"),i=a("47"),j=a("69"),k=a("6b"),l=a("37").getProto,m=a("46")("iterator"),n=!([].keys&&"next"in[].keys()),o="@@iterator",p="keys",q="values",r=function(){return this};c.exports=function(a,b,c,s,t,u,v){j(c,b,s);var w,x,y=function(a){if(!n&&a in C)return C[a];switch(a){case p:return function(){return new c(this,a)};case q:return function(){return new c(this,a)}}return function(){return new c(this,a)}},z=b+" Iterator",A=t==q,B=!1,C=a.prototype,D=C[m]||C[o]||t&&C[t],E=D||y(t);if(D){var F=l(E.call(new a));k(F,z,!0),!d&&h(C,o)&&g(F,m,r),A&&D.name!==q&&(B=!0,E=function(){return D.call(this)})}if(d&&!v||!n&&!B&&C[m]||g(C,m,E),i[b]=E,i[z]=r,t)if(w={values:A?E:y(q),keys:u?E:y(p),entries:A?y("entries"):E},v)for(x in w)x in C||f(C,x,w[x]);else e(e.P+e.F*(n||B),b,w);return w}}),a.registerDynamic("67",[],!0,function(a,b,c){this||self;c.exports=function(a,b){return{value:b,done:!!a}}}),a.registerDynamic("6f",["32","37","70","46"],!0,function(a,b,c){"use strict";var d=(this||self,a("32")),e=a("37"),f=a("70"),g=a("46")("species");c.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.setDesc(b,g,{configurable:!0,get:function(){return this}})}}),a.registerDynamic("57",["37","6c","71","3e","72","4d","73","62","67","74","6e","3c","6f","70"],!0,function(a,b,c){"use strict";var d=(this||self,a("37")),e=a("6c"),f=a("71"),g=a("3e"),h=a("72"),i=a("4d"),j=a("73"),k=a("62"),l=a("67"),m=a("74")("id"),n=a("6e"),o=a("3c"),p=a("6f"),q=a("70"),r=Object.isExtensible||o,s=q?"_s":"size",t=0,u=function(a,b){if(!o(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!n(a,m)){if(!r(a))return"F";if(!b)return"E";e(a,m,++t)}return"O"+a[m]},v=function(a,b){var c,d=u(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};c.exports={getConstructor:function(a,b,c,e){var k=a(function(a,f){h(a,k,b),a._i=d.create(null),a._f=void 0,a._l=void 0,a[s]=0,void 0!=f&&j(f,c,a[e],a)});return f(k.prototype,{clear:function(){for(var a=this,b=a._i,c=a._f;c;c=c.n)c.r=!0,c.p&&(c.p=c.p.n=void 0),delete b[c.i];a._f=a._l=void 0,a[s]=0},delete:function(a){var b=this,c=v(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[s]--}return!!c},forEach:function(a){for(var b,c=g(a,arguments.length>1?arguments[1]:void 0,3);b=b?b.n:this._f;)for(c(b.v,b.k,this);b&&b.r;)b=b.p},has:function(a){return!!v(this,a)}}),q&&d.setDesc(k.prototype,"size",{get:function(){return i(this[s])}}),k},def:function(a,b,c){var d,e,f=v(a,b);return f?f.v=c:(a._l=f={i:e=u(b,!0),k:b,v:c,p:d=a._l,n:void 0,r:!1},a._f||(a._f=f),d&&(d.n=f),a[s]++,"F"!==e&&(a._i[e]=f)),a},getEntry:v,setStrong:function(a,b,c){k(a,b,function(a,b){this._t=a,this._k=b,this._l=void 0},function(){for(var a=this,b=a._k,c=a._l;c&&c.r;)c=c.p;return a._t&&(a._l=c=c?c.n:a._t._f)?"keys"==b?l(0,c.k):"values"==b?l(0,c.v):l(0,[c.k,c.v]):(a._t=void 0,l(1))},c?"entries":"values",!c,!0),p(b)}}}),a.registerDynamic("6a",[],!0,function(a,b,c){this||self;c.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}}),a.registerDynamic("6c",["37","6a","70"],!0,function(a,b,c){var d=(this||self,a("37")),e=a("6a");c.exports=a("70")?function(a,b,c){return d.setDesc(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}}),a.registerDynamic("6d",["6c"],!0,function(a,b,c){this||self;c.exports=a("6c")}),a.registerDynamic("71",["6d"],!0,function(a,b,c){var d=(this||self,a("6d"));c.exports=function(a,b){for(var c in b)d(a,c,b[c]);return a}}),a.registerDynamic("72",[],!0,function(a,b,c){this||self;c.exports=function(a,b,c){if(!(a instanceof b))throw TypeError(c+": use the 'new' operator!");return a}}),a.registerDynamic("6e",[],!0,function(a,b,c){var d=(this||self,{}.hasOwnProperty);c.exports=function(a,b){return d.call(a,b)}}),a.registerDynamic("6b",["37","6e","46"],!0,function(a,b,c){var d=(this||self,a("37").setDesc),e=a("6e"),f=a("46")("toStringTag");c.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}}),a.registerDynamic("33",[],!0,function(a,b,c){this||self;c.exports=function(a){try{return!!a()}catch(a){return!0}}}),a.registerDynamic("70",["33"],!0,function(a,b,c){this||self;c.exports=!a("33")(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})}),a.registerDynamic("58",["37","75","31","33","6c","71","73","72","3c","6b","70"],!0,function(a,b,c){"use strict";var d=this||self,e=a("37"),d=a("75"),f=a("31"),g=a("33"),h=a("6c"),i=a("71"),j=a("73"),k=a("72"),l=a("3c"),m=a("6b"),n=a("70");c.exports=function(a,b,c,o,p,q){var r=d[a],s=r,t=p?"set":"add",u=s&&s.prototype,v={};return n&&"function"==typeof s&&(q||u.forEach&&!g(function(){(new s).entries().next()}))?(s=b(function(b,c){k(b,s,a),b._c=new r,void 0!=c&&j(c,p,b[t],b)}),e.each.call("add,clear,delete,forEach,get,has,set,keys,values,entries".split(","),function(a){var b="add"==a||"set"==a;a in u&&(!q||"clear"!=a)&&h(s.prototype,a,function(c,d){if(!b&&q&&!l(c))return"get"==a&&void 0;var e=this._c[a](0===c?0:c,d);return b?this:e})}),"size"in u&&e.setDesc(s.prototype,"size",{get:function(){return this._c.size}})):(s=o.getConstructor(b,a,p,t),i(s.prototype,c)),m(s,a),v[a]=s,f(f.G+f.W+f.F,v),q||o.setStrong(s,a,p),s}}),a.registerDynamic("76",["57","58"],!0,function(a,b,c){"use strict";var d=(this||self,a("57"));a("58")("Set",function(a){return function(){return a(this,arguments.length>0?arguments[0]:void 0)}},{add:function(a){return d.def(this,a=0===a?0:a,a)}},d)}),a.registerDynamic("31",["75","32","3e"],!0,function(a,b,c){var d=this||self,d=a("75"),e=a("32"),f=a("3e"),g="prototype",h=function(a,b,c){var i,j,k,l=a&h.F,m=a&h.G,n=a&h.S,o=a&h.P,p=a&h.B,q=a&h.W,r=m?e:e[b]||(e[b]={}),s=m?d:n?d[b]:(d[b]||{})[g];m&&(c=b);for(i in c)j=!l&&s&&i in s,j&&i in r||(k=j?s[i]:c[i],r[i]=m&&"function"!=typeof s[i]?c[i]:p&&j?f(k,d):q&&s[i]==k?function(a){var b=function(b){return this instanceof a?new a(b):a(b)};return b[g]=a[g],b}(k):o&&"function"==typeof k?f(Function.call,k):k,o&&((r[g]||(r[g]={}))[i]=k))};h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,c.exports=h}),a.registerDynamic("77",[],!0,function(a,b,c){this||self;c.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}}),a.registerDynamic("3e",["77"],!0,function(a,b,c){var d=(this||self,a("77"));c.exports=function(a,b,c){if(d(a),void 0===b)return a;switch(c){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}}),a.registerDynamic("50",["3d"],!0,function(a,b,c){var d=(this||self,a("3d"));c.exports=function(a,b,c,e){try{return e?b(d(c)[0],c[1]):b(c)}catch(b){var f=a.return;throw void 0!==f&&d(f.call(a)),b}}}),a.registerDynamic("51",["47","46"],!0,function(a,b,c){var d=(this||self,a("47")),e=a("46")("iterator"),f=Array.prototype;c.exports=function(a){return void 0!==a&&(d.Array===a||f[e]===a)}}),a.registerDynamic("3c",[],!0,function(a,b,c){this||self;c.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}}),a.registerDynamic("3d",["3c"],!0,function(a,b,c){var d=(this||self,a("3c"));c.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}}),a.registerDynamic("61",[],!0,function(a,b,c){var d=(this||self,Math.ceil),e=Math.floor;c.exports=function(a){return isNaN(a=+a)?0:(a>0?e:d)(a)}}),a.registerDynamic("52",["61"],!0,function(a,b,c){var d=(this||self,a("61")),e=Math.min;c.exports=function(a){return a>0?e(d(a),9007199254740991):0}}),a.registerDynamic("47",[],!0,function(a,b,c){this||self;c.exports={}}),a.registerDynamic("53",["45","46","47","32"],!0,function(a,b,c){var d=(this||self,a("45")),e=a("46")("iterator"),f=a("47");c.exports=a("32").getIteratorMethod=function(a){if(void 0!=a)return a[e]||a["@@iterator"]||f[d(a)]}}),a.registerDynamic("73",["3e","50","51","3d","52","53"],!0,function(a,b,c){var d=(this||self,a("3e")),e=a("50"),f=a("51"),g=a("3d"),h=a("52"),i=a("53");c.exports=function(a,b,c,j){var k,l,m,n=i(a),o=d(c,j,b?2:1),p=0;if("function"!=typeof n)throw TypeError(a+" is not iterable!");if(f(n))for(k=h(a.length);k>p;p++)b?o(g(l=a[p])[0],l[1]):o(a[p]);else for(m=n.call(a);!(l=m.next()).done;)e(m,o,l.value,b)}}),a.registerDynamic("65",[],!0,function(a,b,c){var d=(this||self,{}.toString);c.exports=function(a){return d.call(a).slice(8,-1)}}),a.registerDynamic("78",["75"],!0,function(a,b,c){var d=this||self,d=a("75"),e="__core-js_shared__",f=d[e]||(d[e]={});c.exports=function(a){return f[a]||(f[a]={})}}),a.registerDynamic("74",[],!0,function(a,b,c){var d=(this||self,0),e=Math.random();c.exports=function(a){return"Symbol(".concat(void 0===a?"":a,")_",(++d+e).toString(36))}}),a.registerDynamic("75",[],!0,function(a,b,c){var d=this||self,d=c.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=d)}),a.registerDynamic("46",["78","74","75"],!0,function(a,b,c){var d=(this||self,a("78")("wks")),e=a("74"),f=a("75").Symbol;c.exports=function(a){return d[a]||(d[a]=f&&f[a]||(f||e)("Symbol."+a))}}),a.registerDynamic("45",["65","46"],!0,function(a,b,c){var d=(this||self,a("65")),e=a("46")("toStringTag"),f="Arguments"==d(function(){return arguments}());c.exports=function(a){var b,c,g;return void 0===a?"Undefined":null===a?"Null":"string"==typeof(c=(b=Object(a))[e])?c:f?d(b):"Object"==(g=d(b))&&"function"==typeof b.callee?"Arguments":g}}),a.registerDynamic("5a",["73","45"],!0,function(a,b,c){var d=(this||self,a("73")),e=a("45");c.exports=function(a){return function(){if(e(this)!=a)throw TypeError(a+"#toJSON isn't generic");var b=[];return d(this,!1,b.push,b),b}}}),a.registerDynamic("79",["31","5a"],!0,function(a,b,c){var d=(this||self,a("31"));d(d.P,"Set",{toJSON:a("5a")("Set")})}),a.registerDynamic("32",[],!0,function(a,b,c){var d=(this||self,c.exports={version:"1.2.6"});"number"==typeof __e&&(__e=d)}),a.registerDynamic("7a",["5c","4a","49","76","79","32"],!0,function(a,b,c){this||self;a("5c"),a("4a"),a("49"),a("76"),a("79"),c.exports=a("32").Set}),a.registerDynamic("7b",["7a"],!0,function(a,b,c){this||self;c.exports={default:a("7a"),__esModule:!0}}),a.register("43",["9","18","19","e","f","5d","1a","7b"],function(a){var b,c,d,e,f,g,h,i,j;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.default},function(a){e=a.default},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a.default}],execute:function(){"use strict";j=function(){function a(b){f(this,a),this.map=b}return e(a,[{key:"product",value:function(b){return a.product(this,b)}},{key:"byConstant",value:function(b){return a.byConstant(this,b)}},{key:"sum",value:function(b){return a.sum(this,b)}}],[{key:"fromObject",value:function(c){var e=new g(null),f=!0,i=!1,j=void 0;try{for(var k,l=h(b.toPairs(c));!(f=(k=l.next()).done);f=!0){var m=d(k.value,2),n=m[0],o=m[1];e.set(n,new g(b.toPairs(o)))}}catch(a){i=!0,j=a}finally{try{!f&&l.return&&l.return()}finally{if(i)throw j}}return new a(e)}},{key:"product",value:function(b,c){var e=new g(null),f=!0,i=!1,j=void 0;try{for(var k,l=h(b.map);!(f=(k=l.next()).done);f=!0){var m=d(k.value,2),n=m[0],o=m[1],p=!0,q=!1,r=void 0;try{for(var s,t=h(c.map);!(p=(s=t.next()).done);p=!0){var u=d(s.value,2),v=u[0],w=u[1],x=new g(null),y=!0,z=!1,A=void 0;try{for(var B,C=h(o);!(y=(B=C.next()).done);y=!0){var D=d(B.value,2),E=D[0],F=D[1],G=!0,H=!1,I=void 0;try{for(var J,K=h(w);!(G=(J=K.next()).done);G=!0){var L=d(J.value,2),M=L[0],N=L[1];x.set(""+E+M,{re:F.re*N.re-F.im*N.im,im:F.re*N.im+F.im*N.re})}}catch(a){H=!0,I=a}finally{try{!G&&K.return&&K.return()}finally{if(H)throw I}}}}catch(a){z=!0,A=a}finally{try{!y&&C.return&&C.return()}finally{if(z)throw A}}e.set(""+n+v,x)}}catch(a){q=!0,r=a}finally{try{!p&&t.return&&t.return()}finally{if(q)throw r}}}}catch(a){i=!0,j=a}finally{try{!f&&l.return&&l.return()}finally{if(i)throw j}}return new a(e)}},{key:"byConstant",value:function(b,c){return a.product(b,a.fromObject({"":{"":{re:c.re,im:c.im}}}))}},{key:"sum",value:function(e,f){var j=new g(null),k=new i([].concat(c(e.map.keys()),c(f.map.keys()))),l=!0,m=!1,n=void 0;try{for(var o,p=h(k);!(l=(o=p.next()).done);l=!0){var q=o.value,r=new g(null),s=b.compact([e.map.get(q),f.map.get(q)]),t=!0,u=!1,v=void 0;try{for(var w,x=h(s);!(t=(w=x.next()).done);t=!0){var y=w.value,z=!0,A=!1,B=void 0;try{for(var C,D=h(y);!(z=(C=D.next()).done);z=!0){var E=d(C.value,2),F=E[0],G=E[1];if(r.has(F)){var H=r.get(F);G.re+=H.re,G.im+=H.im}r.set(F,G)}}catch(a){A=!0,B=a}finally{try{!z&&D.return&&D.return()}finally{if(A)throw B}}}}catch(a){u=!0,v=a}finally{try{!t&&x.return&&x.return()}finally{if(u)throw v}}j.set(q,r)}}catch(a){m=!0,n=a}finally{try{!l&&p.return&&p.return()}finally{if(m)throw n}}return new a(j)}},{key:"sumList",value:function(b){return b.reduce(function(b,c){return a.sum(b,c)})}},{key:"fill",value:function(b,c){var d=new g(null),e=!0,f=!1,i=void 0;try{for(var j,k=h(b);!(e=(j=k.next()).done);e=!0){var l=j.value,m=new g(null);m.set(l,c),d.set(l,m)}}catch(a){f=!0,i=a}finally{try{!e&&k.return&&k.return()}finally{if(f)throw i}}return new a(d)}}]),a}(),a("Tensor",j)}}}),a.register("7c",["11","43"],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n;return{setters:[function(a){b=a.TAU},function(a){c=a.Tensor}],execute:function(){d=["-","|"],a("polarizations",d),e=c.fill(d,{re:1,im:0}),a("identity",e),f=c.fill(d,{re:0,im:0}),a("zero",f),g=c.fromObject({"-":{"-":{re:1,im:0}}}),a("source",g),h=c.fromObject({"-":{"-":{re:-1,im:0}},"|":{"|":{re:1,im:0}}}),a("reflectPhaseFromLighter",h),i=c.fromObject({"-":{"-":{re:1,im:0}},"|":{"|":{re:-1,im:0}}}),a("reflectPhaseFromDenser",i),j=function(a){return c.fromObject({"-":{"-":{re:Math.cos(a),im:0},"|":{re:Math.sin(a),im:0}},"|":{"-":{re:-Math.sin(a),im:0},"|":{re:Math.cos(a),im:0}}})},a("rotation",j),k=function(a){return c.fromObject({"-":{"-":{re:Math.cos(a)*Math.cos(a),im:0},"|":{re:Math.cos(a)*Math.sin(a),im:0}},"|":{"-":{re:Math.cos(a)*Math.sin(a),im:0},"|":{re:Math.sin(a)*Math.sin(a),im:0}}})},a("projection",k),l=function(a,d){return c.sum(c.byConstant(k(a),{re:Math.cos(d),im:Math.sin(d)}),k(a+b/4))},a("phaseShift",l),m=function(a){return c.fill(d,{re:Math.cos(a),im:Math.sin(a)})},a("globalPhase",m),n=function(a){return c.fill(d,{re:Math.sqrt(a),im:0})},a("globalAbsorption",n)}}}),a.register("7d",["9","11","42","43","7c"],function(a){"use strict";var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F;return{setters:[function(a){b=a.default},function(a){c=a.TAU},function(a){d=a},function(a){e=a.Tensor},function(a){f=a}],execute:function(){g=e.product(d.identity,f.identity),a("identity",g),h=e.product(d.zero,f.zero),a("zero",h),i=e.product(e.sum(d.diode[0],d.diode[2]),f.identity),j=e.product(e.sum(d.diode[1],d.diode[3]),f.identity),k=[i,j],l=b.range(4).map(function(a){return[{to:d.directions[a]+"|",re:1,im:0}]}),a("source",l),m=b.range(4).map(function(a){return e.product(d.absorbOneDirReflectOther[a],f.reflectPhaseFromDenser)}),a("detector",m),n=e.product(d.cube,f.identity),a("cornerCube",n),o=b.range(4).map(function(a){return e.product(d.mirror[a],f.reflectPhaseFromDenser)}),a("thinMirror",o),p=b.range(8).map(function(a){return e.product(d.mirrorCoated[a],f.reflectPhaseFromDenser)}),a("thinMirrorCoated",p),q=b.range(4).map(function(a){return e.sum(e.byConstant(a%2===1?g:k[(a/2+1)%2],{re:Math.SQRT1_2,im:0}),e.byConstant(o[a],{re:0,im:-Math.SQRT1_2}))}),a("thinSplitter",q),r=b.range(8).map(function(a){return e.sum(e.byConstant(a%2===1?g:k[(a/2+1)%2],{re:Math.SQRT1_2,im:0}),e.byConstant(p[a],{re:Math.SQRT1_2,im:0}))}),a("thinSplitterCoated",r),s=b.range(2).map(function(a){var c=2*a+1;return e.fromObject(b.reduce(d.directions,function(a,b){var e=d.planeReflectionDirection(b,c);return a[b+"-"]={},a[b+"-"][b+"-"]={re:1,im:0},a[b+"|"]={},a[b+"|"][e+"|"]={re:1,im:0},a},{}))}),a("polarizingSplitter",s),t=e.product(d.identity,f.globalPhase(c/4)),a("glass",t),u=e.product(d.identity,f.globalPhase(-c/4)),a("vacuumJar",u),v=e.product(d.identity,f.globalAbsorption(.5)),a("absorber",v),w=e.product(d.identity,f.rotation(c/8)),a("sugarSolution",w),x=e.product(d.identity,f.rotation(c/4)),a("doubleSugarSolution",x),y=function(a,b){return(1-(2&b))*(1-2*(1&b))*(-a-2*b)*c/8},z=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,c){return e.product(b,f.projection(y(a,c)))}))}),a("polarizer",z),A=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,c){return 1===c||3===c?e.product(b,f.projection(y(a,c))):e.product(b,f.zero)}))}),a("polarizerNS",A),B=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,c){return 0===c||2===c?e.product(b,f.projection(y(a,c))):e.product(b,f.zero)}))}),a("polarizerWE",B),C=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,d){return e.product(b,f.phaseShift(y(a,d),c/4))}))}),a("quarterWavePlate",C),D=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,d){return 1===d||3===d?e.product(b,f.phaseShift(y(a,d),c/4)):e.product(b,f.zero)}))}),a("quarterWavePlateNS",D),E=b.range(4).map(function(a){return e.sumList(d.diode.map(function(b,d){return 0===d||2===d?e.product(b,f.phaseShift(y(a,d),c/4)):e.product(b,f.zero)}))}),a("quarterWavePlateWE",E),F=b.range(4).map(function(a){return e.sum(e.product(d.diode[a],f.rotation(c/8)),e.product(d.diode[(a+2)%4],f.rotation(-c/8)))}),a("faradayRotator",F)}}}),a.registerDynamic("7e",[],!1,function(b,c,d){var e=a.get("@@global-helpers").prepareGlobal(d.id,null,null);return function(a){this.createjs=this.createjs||{},function(){var a=createjs.SoundJS=createjs.SoundJS||{};a.version="0.6.2",a.buildDate="Thu, 26 Nov 2015 20:44:31 GMT"}(),this.createjs=this.createjs||{},createjs.extend=function(a,b){"use strict";function c(){this.constructor=a}return c.prototype=b.prototype,a.prototype=new c},this.createjs=this.createjs||{},createjs.promote=function(a,b){"use strict";var c=a.prototype,d=Object.getPrototypeOf&&Object.getPrototypeOf(c)||c.__proto__;if(d){c[(b+="_")+"constructor"]=d.constructor;for(var e in d)c.hasOwnProperty(e)&&"function"==typeof d[e]&&(c[b+e]=d[e])}return a},this.createjs=this.createjs||{},createjs.indexOf=function(a,b){"use strict";for(var c=0,d=a.length;c-1||b.indexOf("Windows Phone")>-1,a.isFirefox=b.indexOf("Firefox")>-1,a.isOpera=null!=window.opera,a.isChrome=b.indexOf("Chrome")>-1,a.isIOS=(b.indexOf("iPod")>-1||b.indexOf("iPhone")>-1||b.indexOf("iPad")>-1)&&!a.isWindowPhone,a.isAndroid=b.indexOf("Android")>-1&&!a.isWindowPhone,a.isBlackberry=b.indexOf("Blackberry")>-1,createjs.BrowserDetect=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this._listeners=null,this._captureListeners=null}var b=a.prototype;a.initialize=function(a){a.addEventListener=b.addEventListener,a.on=b.on,a.removeEventListener=a.off=b.removeEventListener,a.removeAllEventListeners=b.removeAllEventListeners,a.hasEventListener=b.hasEventListener,a.dispatchEvent=b.dispatchEvent,a._dispatchEvent=b._dispatchEvent,a.willTrigger=b.willTrigger},b.addEventListener=function(a,b,c){var d;d=c?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{};var e=d[a];return e&&this.removeEventListener(a,b,c),e=d[a],e?e.push(b):d[a]=[b],b},b.on=function(a,b,c,d,e,f){return b.handleEvent&&(c=c||b,b=b.handleEvent),c=c||this,this.addEventListener(a,function(a){b.call(c,a,e),d&&a.remove()},f)},b.removeEventListener=function(a,b,c){var d=c?this._captureListeners:this._listeners;if(d){var e=d[a];if(e)for(var f=0,g=e.length;f=0&&!a.propagationStopped;g--)f[g]._dispatchEvent(a,1+(0==g));for(g=1;g-1&&(b=b.substr(0,d));var e;return a.ABSOLUTE_PATT.test(b)?c.absolute=!0:a.RELATIVE_PATT.test(b)&&(c.relative=!0),(e=b.match(a.EXTENSION_PATT))&&(c.extension=e[1].toLowerCase()),c},a.formatQueryString=function(a,b){if(null==a)throw new Error("You must specify data.");var c=[];for(var d in a)c.push(d+"="+escape(a[d]));return b&&(c=c.concat(b)),c.join("&")},a.buildPath=function(a,b){if(null==b)return a;var c=[],d=a.indexOf("?");if(d!=-1){var e=a.slice(d+1);c=c.concat(e.split("&"))}return d!=-1?a.slice(0,d)+"?"+this.formatQueryString(b,c):a+"?"+this.formatQueryString(b,c)},a.isCrossDomain=function(a){var b=document.createElement("a");b.href=a.src;var c=document.createElement("a");c.href=location.href;var d=""!=b.hostname&&(b.port!=c.port||b.protocol!=c.protocol||b.hostname!=c.hostname);return d},a.isLocal=function(a){var b=document.createElement("a");return b.href=a.src,""==b.hostname&&"file:"==b.protocol},a.isBinary=function(a){switch(a){case createjs.AbstractLoader.IMAGE:case createjs.AbstractLoader.BINARY:return!0;default:return!1}},a.isImageTag=function(a){return a instanceof HTMLImageElement},a.isAudioTag=function(a){return!!window.HTMLAudioElement&&a instanceof HTMLAudioElement},a.isVideoTag=function(a){return!!window.HTMLVideoElement&&a instanceof HTMLVideoElement},a.isText=function(a){switch(a){case createjs.AbstractLoader.TEXT:case createjs.AbstractLoader.JSON:case createjs.AbstractLoader.MANIFEST:case createjs.AbstractLoader.XML:case createjs.AbstractLoader.CSS:case createjs.AbstractLoader.SVG:case createjs.AbstractLoader.JAVASCRIPT:case createjs.AbstractLoader.SPRITESHEET:return!0;default:return!1}},a.getTypeByExtension=function(a){if(null==a)return createjs.AbstractLoader.TEXT;switch(a.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.AbstractLoader.IMAGE;case"ogg":case"mp3":case"webm":return createjs.AbstractLoader.SOUND;case"mp4":case"webm":case"ts":return createjs.AbstractLoader.VIDEO;case"json":return createjs.AbstractLoader.JSON;case"xml":return createjs.AbstractLoader.XML;case"css":return createjs.AbstractLoader.CSS;case"js":return createjs.AbstractLoader.JAVASCRIPT;case"svg":return createjs.AbstractLoader.SVG;default:return createjs.AbstractLoader.TEXT}},createjs.RequestUtils=a}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=c,this.resultFormatter=null,a?this._item=createjs.LoadItem.create(a):this._item=null,this._preferXHR=b,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var b=createjs.extend(a,createjs.EventDispatcher),c=a;c.POST="POST",c.GET="GET",c.BINARY="binary",c.CSS="css",c.IMAGE="image",c.JAVASCRIPT="javascript",c.JSON="json",c.JSONP="jsonp",c.MANIFEST="manifest",c.SOUND="sound",c.VIDEO="video",c.SPRITESHEET="spritesheet",c.SVG="svg",c.TEXT="text",c.XML="xml",b.getItem=function(){return this._item},b.getResult=function(a){return a?this._rawResult:this._result},b.getTag=function(){return this._tag},b.setTag=function(a){this._tag=a},b.load=function(){this._createRequest(),this._request.on("complete",this,this),this._request.on("progress",this,this),this._request.on("loadStart",this,this),this._request.on("abort",this,this),this._request.on("timeout",this,this),this._request.on("error",this,this);var a=new createjs.Event("initialize");a.loader=this._request,this.dispatchEvent(a),this._request.load()},b.cancel=function(){this.canceled=!0,this.destroy()},b.destroy=function(){this._request&&(this._request.removeAllEventListeners(),this._request.destroy()),this._request=null,this._item=null,this._rawResult=null,this._result=null,this._loadItems=null,this.removeAllEventListeners()},b.getLoadedItems=function(){return this._loadedItems},b._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},b._createTag=function(a){return null},b._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},b._sendProgress=function(a){if(!this._isCanceled()){var b=null;"number"==typeof a?(this.progress=a,b=new createjs.ProgressEvent(this.progress)):(b=a,this.progress=a.loaded/a.total,b.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(b)}},b._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var a=new createjs.Event("complete");a.rawResult=this._rawResult,null!=this._result&&(a.result=this._result),this.dispatchEvent(a)}},b._sendError=function(a){!this._isCanceled()&&this.hasEventListener("error")&&(null==a&&(a=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(a))},b._isCanceled=function(){return!(null!=window.createjs&&!this.canceled)},b.resultFormatter=null,b.handleEvent=function(a){switch(a.type){case"complete":this._rawResult=a.target._response;var b=this.resultFormatter&&this.resultFormatter(this);b instanceof Function?b.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=b||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(a);break;case"error":this._sendError(a);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+a.type.toUpperCase()+"_ERROR"))}},b._resultFormatSuccess=function(a){this._result=a,this._sendComplete()},b._resultFormatFailed=function(a){this._sendError(a)},b.buildPath=function(a,b){return createjs.RequestUtils.buildPath(a,b)},b.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractLoader_constructor(a,b,c),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var b=createjs.extend(a,createjs.AbstractLoader);b.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},b._createTag=function(){},b._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},b._updateXHR=function(a){a.loader.setResponseType&&a.loader.setResponseType("blob")},b._formatResult=function(a){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var b=window.URL||window.webkitURL,c=a.getResult(!0);a.getTag().src=b.createObjectURL(c)}return a.getTag()},createjs.AbstractMediaLoader=createjs.promote(a,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(a){this._item=a},b=createjs.extend(a,createjs.EventDispatcher);b.load=function(){},b.destroy=function(){},b.cancel=function(){},createjs.AbstractRequest=createjs.promote(a,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1,this._startTagVisibility=null}var b=createjs.extend(a,createjs.AbstractRequest);b.load=function(){this._tag.onload=createjs.proxy(this._handleTagComplete,this),this._tag.onreadystatechange=createjs.proxy(this._handleReadyStateChange,this),this._tag.onerror=createjs.proxy(this._handleError,this);var a=new createjs.Event("initialize");a.loader=this._tag,this.dispatchEvent(a),this._hideTag(),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(window.document.body.appendChild(this._tag),this._addedToDOM=!0)},b.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},b._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;"loaded"!=a.readyState&&"complete"!=a.readyState||this._handleTagComplete()},b._handleError=function(){this._clean(),this.dispatchEvent("error")},b._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this._showTag(),this.dispatchEvent("complete")},b._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},b._clean=function(){this._tag.onload=null,this._tag.onreadystatechange=null,this._tag.onerror=null,this._addedToDOM&&null!=this._tag.parentNode&&this._tag.parentNode.removeChild(this._tag),clearTimeout(this._loadTimeout)},b._hideTag=function(){this._startTagVisibility=this._tag.style.visibility,this._tag.style.visibility="hidden"},b._showTag=function(){this._tag.style.visibility=this._startTagVisibility},b._handleStalled=function(){},createjs.TagRequest=createjs.promote(a,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a,b,c){this.AbstractRequest_constructor(a),this._tag=b,this._tagSrcAttribute=c,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var b=createjs.extend(a,createjs.TagRequest);b.load=function(){var a=createjs.proxy(this._handleStalled,this);this._stalledCallback=a;var b=createjs.proxy(this._handleProgress,this);this._handleProgress=b,this._tag.addEventListener("stalled",a),this._tag.addEventListener("progress",b),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},b._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var a=this._tag;"loaded"!=a.readyState&&"complete"!=a.readyState||this._handleTagComplete()},b._handleStalled=function(){},b._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},b._clean=function(){this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.removeEventListener("stalled",this._stalledCallback),this._tag.removeEventListener("progress",this._progressCallback),this.TagRequest__clean()},createjs.MediaTagRequest=createjs.promote(a,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function a(a){this.AbstractRequest_constructor(a),this._request=null,this._loadTimeout=null,this._xhrLevel=1,this._response=null,this._rawResponse=null,this._canceled=!1,this._handleLoadStartProxy=createjs.proxy(this._handleLoadStart,this),this._handleProgressProxy=createjs.proxy(this._handleProgress,this),this._handleAbortProxy=createjs.proxy(this._handleAbort,this),this._handleErrorProxy=createjs.proxy(this._handleError,this),this._handleTimeoutProxy=createjs.proxy(this._handleTimeout,this),this._handleLoadProxy=createjs.proxy(this._handleLoad,this),this._handleReadyStateChangeProxy=createjs.proxy(this._handleReadyStateChange,this),!this._createXHR(a)}var b=createjs.extend(a,createjs.AbstractRequest);a.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],b.getResult=function(a){return a&&this._rawResponse?this._rawResponse:this._response},b.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},b.load=function(){if(null==this._request)return void this._handleError();null!=this._request.addEventListener?(this._request.addEventListener("loadstart",this._handleLoadStartProxy,!1),this._request.addEventListener("progress",this._handleProgressProxy,!1),this._request.addEventListener("abort",this._handleAbortProxy,!1),this._request.addEventListener("error",this._handleErrorProxy,!1),this._request.addEventListener("timeout",this._handleTimeoutProxy,!1),this._request.addEventListener("load",this._handleLoadProxy,!1),this._request.addEventListener("readystatechange",this._handleReadyStateChangeProxy,!1)):(this._request.onloadstart=this._handleLoadStartProxy,this._request.onprogress=this._handleProgressProxy,this._request.onabort=this._handleAbortProxy,this._request.onerror=this._handleErrorProxy,this._request.ontimeout=this._handleTimeoutProxy,this._request.onload=this._handleLoadProxy,this._request.onreadystatechange=this._handleReadyStateChangeProxy),1==this._xhrLevel&&(this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout));try{this._item.values&&this._item.method!=createjs.AbstractLoader.GET?this._item.method==createjs.AbstractLoader.POST&&this._request.send(createjs.RequestUtils.formatQueryString(this._item.values)):this._request.send()}catch(a){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,a))}},b.setResponseType=function(a){"blob"===a&&(a=window.URL?"blob":"arraybuffer",this._responseType=a),this._request.responseType=a},b.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},b.getResponseHeader=function(a){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(a):null},b._handleProgress=function(a){if(a&&!(a.loaded>0&&0==a.total)){var b=new createjs.ProgressEvent(a.loaded,a.total);this.dispatchEvent(b)}},b._handleLoadStart=function(a){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},b._handleAbort=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,a))},b._handleError=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(a.message))},b._handleReadyStateChange=function(a){4==this._request.readyState&&this._handleLoad()},b._handleLoad=function(a){if(!this.loaded){this.loaded=!0;var b=this._checkError();if(b)return void this._handleError(b);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(a){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===a.name&&window.BlobBuilder){var c=new BlobBuilder;c.append(this._response),this._response=c.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},b._handleTimeout=function(a){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,a))},b._checkError=function(){var a=parseInt(this._request.status);switch(a){case 404:case 0:return new Error(a)}return null},b._getResponse=function(){if(null!=this._response)return this._response;if(null!=this._request.response)return this._request.response;try{if(null!=this._request.responseText)return this._request.responseText}catch(a){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(a){}return null},b._createXHR=function(a){var b=createjs.RequestUtils.isCrossDomain(a),c={},d=null;if(window.XMLHttpRequest)d=new XMLHttpRequest,b&&void 0===d.withCredentials&&window.XDomainRequest&&(d=new XDomainRequest);else{for(var e=0,f=s.ACTIVEX_VERSIONS.length;ec.alternateExtensions.length)return null;a=a.replace("."+b[5],"."+e);var h={name:d,src:a,extension:e};return h},c._parseSrc=function(a){var b={name:void 0,src:void 0,extension:void 0},d=c.capabilities;for(var e in a)if(a.hasOwnProperty(e)&&d[e]){b.src=a[e],b.extension=e;break}if(!b.src)return!1;var f=b.src.lastIndexOf("/");return f!=-1?b.name=b.src.slice(f+1):b.name=b.src,b},c.play=function(a,b,d,e,f,g,h,i,j){var k;k=b instanceof Object||b instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(b):createjs.PlayPropsConfig.create({interrupt:b,delay:d,offset:e,loop:f,volume:g,pan:h,startTime:i,duration:j});var l=c.createInstance(a,k.startTime,k.duration),m=c._playInstance(l,k);return m||l._playFailed(),l},c.createInstance=function(a,d,e){if(!c.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(a,d,e);var f=c._defaultPlayPropsHash[a];a=c._getSrcById(a);var g=c._parsePath(a.src),h=null;return null!=g&&null!=g.src?(b.create(g.src),null==d&&(d=a.startTime),h=c.activePlugin.create(g.src,d,e||a.duration),f=f||c._defaultPlayPropsHash[g.src],f&&h.applyPlayProps(f)):h=new createjs.DefaultSoundInstance(a,d,e),h.uniqueId=c._lastID++,h},c.stop=function(){for(var a=this._instances,b=a.length;b--;)a[b].stop()},c.setVolume=function(a){if(null==Number(a))return!1;if(a=Math.max(0,Math.min(1,a)),c._masterVolume=a,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(a))for(var b=this._instances,d=0,e=b.length;d-1&&this._instances.splice(e,1),!1}return!0},c._getSrcById=function(a){return c._idHash[a]||{src:a}},c._playFinished=function(a){b.remove(a);var c=createjs.indexOf(this._instances,a);c>-1&&this._instances.splice(c,1)},createjs.Sound=a,b.channels={},b.create=function(a,c){var d=b.get(a);return null==d&&(b.channels[a]=new b(a,c),!0)},b.removeSrc=function(a){var c=b.get(a);return null!=c&&(c._removeAll(),delete b.channels[a],!0)},b.removeAll=function(){for(var a in b.channels)b.channels[a]._removeAll();b.channels={}},b.add=function(a,c){var d=b.get(a.src);return null!=d&&d._add(a,c)},b.remove=function(a){var c=b.get(a.src);return null!=c&&(c._remove(a),!0)},b.maxPerChannel=function(){return d.maxDefault},b.get=function(a){return b.channels[a]};var d=b.prototype;d.constructor=b,d.src=null,d.max=null,d.maxDefault=100,d.length=0,d.init=function(a,b){this.src=a,this.max=b||this.maxDefault,this.max==-1&&(this.max=this.maxDefault),this._instances=[]},d._get=function(a){return this._instances[a]},d._add=function(a,b){return!!this._getSlot(b,a)&&(this._instances.push(a),this.length++,!0)},d._remove=function(a){var b=createjs.indexOf(this._instances,a);return b!=-1&&(this._instances.splice(b,1),this.length--,!0)},d._removeAll=function(){for(var a=this.length-1;a>=0;a--)this._instances[a].stop()},d._getSlot=function(b,c){var d,e;if(b!=a.INTERRUPT_NONE&&(e=this._get(0),null==e))return!0;for(var f=0,g=this.max;fe.getPosition())&&(e=d)}return null!=e&&(e._interrupt(),this._remove(e),!0)},d.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var a=function(a,b,c,d){this.EventDispatcher_constructor(),this.src=a,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this.getVolume,set:this.setVolume}),this._pan=0,Object.defineProperty(this,"pan",{get:this.getPan,set:this.setPan}),this._startTime=Math.max(0,b||0),Object.defineProperty(this,"startTime",{get:this.getStartTime,set:this.setStartTime}),this._duration=Math.max(0,c||0),Object.defineProperty(this,"duration",{get:this.getDuration,set:this.setDuration}),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this.getPlaybackResource,set:this.setPlaybackResource}),d!==!1&&d!==!0&&this.setPlaybackResource(d),this._position=0,Object.defineProperty(this,"position",{get:this.getPosition,set:this.setPosition}),this._loop=0,Object.defineProperty(this,"loop",{get:this.getLoop,set:this.setLoop}),this._muted=!1,Object.defineProperty(this,"muted",{get:this.getMuted,set:this.setMuted}),this._paused=!1,Object.defineProperty(this,"paused",{get:this.getPaused,set:this.setPaused})},b=createjs.extend(a,createjs.EventDispatcher);b.play=function(a,b,c,d,e,f){var g;return g=a instanceof Object||a instanceof createjs.PlayPropsConfig?createjs.PlayPropsConfig.create(a):createjs.PlayPropsConfig.create({interrupt:a,delay:b,offset:c,loop:d,volume:e,pan:f}),this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(g),void(this._paused&&this.setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,g),this)},b.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},b.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},b.applyPlayProps=function(a){return null!=a.offset&&this.setPosition(a.offset),null!=a.loop&&this.setLoop(a.loop),null!=a.volume&&this.setVolume(a.volume),null!=a.pan&&this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),this},b.toString=function(){return"[AbstractSoundInstance]"},b.getPaused=function(){return this._paused},b.setPaused=function(a){if(!(a!==!0&&a!==!1||this._paused==a||1==a&&this.playState!=createjs.Sound.PLAY_SUCCEEDED))return this._paused=a,a?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this},b.setVolume=function(a){return a==this._volume?this:(this._volume=Math.max(0,Math.min(1,a)),this._muted||this._updateVolume(),this)},b.getVolume=function(){return this._volume},b.setMuted=function(a){if(a===!0||a===!1)return this._muted=a,this._updateVolume(),this},b.getMuted=function(){return this._muted},b.setPan=function(a){return a==this._pan?this:(this._pan=Math.max(-1,Math.min(1,a)),this._updatePan(),this)},b.getPan=function(){return this._pan},b.getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},b.setPosition=function(a){return this._position=Math.max(0,a),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},b.getStartTime=function(){return this._startTime},b.setStartTime=function(a){return a==this._startTime?this:(this._startTime=Math.max(0,a||0),this._updateStartTime(),this)},b.getDuration=function(){return this._duration},b.setDuration=function(a){return a==this._duration?this:(this._duration=Math.max(0,a||0),this._updateDuration(),this)},b.setPlaybackResource=function(a){return this._playbackResource=a,0==this._duration&&this._setDurationFromSource(),this},b.getPlaybackResource=function(){return this._playbackResource},b.getLoop=function(){return this._loop},b.setLoop=function(a){null!=this._playbackResource&&(0!=this._loop&&0==a?this._removeLooping(a):0==this._loop&&0!=a&&this._addLooping(a)),this._loop=a},b._sendEvent=function(a){var b=new createjs.Event(a);this.dispatchEvent(b)},b._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},b._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},b._beginPlaying=function(a){return this.setPosition(a.offset),this.setLoop(a.loop),this.setVolume(a.volume),this.setPan(a.pan),null!=a.startTime&&(this.setStartTime(a.startTime),this.setDuration(a.duration)),null!=this._playbackResource&&this._positionb&&(d=b),this.sourceNode=this._createAndPlayAudioNode(c.context.currentTime-b,d),this._playbackStartTime=this.sourceNode.startTime-d,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(b-d)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},b._createAndPlayAudioNode=function(a,b){var d=c.context.createBufferSource();d.buffer=this.playbackResource,d.connect(this.panNode);var e=.001*this._duration;return d.startTime=a+e,d.start(d.startTime,b+.001*this._startTime,e-b),d},b._pause=function(){this._position=1e3*(c.context.currentTime-this._playbackStartTime),this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout)},b._resume=function(){this._handleSoundReady()},b._updateVolume=function(){var a=this._muted?0:this._volume;a!=this.gainNode.gain.value&&(this.gainNode.gain.value=a)},b._calculateCurrentPosition=function(){return 1e3*(c.context.currentTime-this._playbackStartTime)},b._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},b._handleLoop=function(){this._cleanUpAudioNode(this.sourceNode),this.sourceNode=this._sourceNodeNext,this._playbackStartTime=this.sourceNode.startTime,this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0),this._soundCompleteTimeout=setTimeout(this._endedHandler,this._duration)},b._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(a,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function a(){this.AbstractPlugin_constructor(),this._panningModel=c._panningModel,this.context=c.context,this.dynamicsCompressorNode=this.context.createDynamicsCompressor(),this.dynamicsCompressorNode.connect(this.context.destination),this.gainNode=this.context.createGain(),this.gainNode.connect(this.dynamicsCompressorNode),createjs.WebAudioSoundInstance.destinationNode=this.gainNode,this._capabilities=c._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var b=createjs.extend(a,createjs.AbstractPlugin),c=a;c._capabilities=null,c._panningModel="equalpower",c.context=null,c._scratchBuffer=null,c._unlocked=!1,c.isSupported=function(){var a=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return!("file:"==location.protocol&&!a&&!this._isFileXHRSupported())&&(c._generateCapabilities(),null!=c.context)},c.playEmptySound=function(){if(null!=c.context){var a=c.context.createBufferSource();a.buffer=c._scratchBuffer,a.connect(c.context.destination),a.start(0,0,0)}},c._isFileXHRSupported=function(){var a=!0,b=new XMLHttpRequest;try{b.open("GET","WebAudioPluginTest.fail",!1)}catch(b){return a=!1}b.onerror=function(){a=!1},b.onload=function(){a=404==this.status||200==this.status||0==this.status&&""!=this.response};try{b.send()}catch(b){a=!1}return a},c._generateCapabilities=function(){if(null==c._capabilities){var a=document.createElement("audio");if(null==a.canPlayType)return null;if(null==c.context)if(window.AudioContext)c.context=new AudioContext;else{if(!window.webkitAudioContext)return null;c.context=new webkitAudioContext}null==c._scratchBuffer&&(c._scratchBuffer=c.context.createBuffer(1,1,22050)),c._compatibilitySetUp(),"ontouchstart"in window&&"running"!=c.context.state&&(c._unlock(),document.addEventListener("mousedown",c._unlock,!0),document.addEventListener("touchend",c._unlock,!0)),c._capabilities={panning:!0,volume:!0,tracks:-1};for(var b=createjs.Sound.SUPPORTED_EXTENSIONS,d=createjs.Sound.EXTENSION_MAP,e=0,f=b.length;e-1}function m(a,b,c){for(var d=-1,e=null==a?0:a.length;++d-1;);return c}function L(a,b){for(var c=a.length;c--&&w(b,a[c],0)>-1;);return c}function M(a,b){for(var c=a.length,d=0;c--;)a[c]===b&&++d;return d}function N(a){return"\\"+_c[a]}function O(a,b){return null==a?ca:a[b]}function P(a){return Sc.test(a)}function Q(a){return Tc.test(a)}function R(a){for(var b,c=[];!(b=a.next()).done;)c.push(b.value);return c}function S(a){var b=-1,c=Array(a.size);return a.forEach(function(a,d){c[++b]=[d,a]}),c}function T(a,b){return function(c){return a(b(c))}}function U(a,b){for(var c=-1,d=a.length,e=0,f=[];++c>>1,Na=[["ary",wa],["bind",pa],["bindKey",qa],["curry",sa],["curryRight",ta],["flip",ya],["partial",ua],["partialRight",va],["rearg",xa]],Oa="[object Arguments]",Pa="[object Array]",Qa="[object AsyncFunction]",Ra="[object Boolean]",Sa="[object Date]",Ta="[object DOMException]",Ua="[object Error]",Va="[object Function]",Wa="[object GeneratorFunction]",Xa="[object Map]",Ya="[object Number]",Za="[object Null]",$a="[object Object]",_a="[object Promise]",ab="[object Proxy]",bb="[object RegExp]",cb="[object Set]",db="[object String]",eb="[object Symbol]",fb="[object Undefined]",gb="[object WeakMap]",hb="[object WeakSet]",ib="[object ArrayBuffer]",jb="[object DataView]",kb="[object Float32Array]",lb="[object Float64Array]",mb="[object Int8Array]",nb="[object Int16Array]",ob="[object Int32Array]",pb="[object Uint8Array]",qb="[object Uint8ClampedArray]",rb="[object Uint16Array]",sb="[object Uint32Array]",tb=/\b__p \+= '';/g,ub=/\b(__p \+=) '' \+/g,vb=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wb=/&(?:amp|lt|gt|quot|#39);/g,xb=/[&<>"']/g,yb=RegExp(wb.source),zb=RegExp(xb.source),Ab=/<%-([\s\S]+?)%>/g,Bb=/<%([\s\S]+?)%>/g,Cb=/<%=([\s\S]+?)%>/g,Db=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Eb=/^\w*$/,Fb=/^\./,Gb=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Hb=/[\\^$.*+?()[\]{}|]/g,Ib=RegExp(Hb.source),Jb=/^\s+|\s+$/g,Kb=/^\s+/,Lb=/\s+$/,Mb=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Nb=/\{\n\/\* \[wrapped with (.+)\] \*/,Ob=/,? & /,Pb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Qb=/\\(\\)?/g,Rb=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Sb=/\w*$/,Tb=/^[-+]0x[0-9a-f]+$/i,Ub=/^0b[01]+$/i,Vb=/^\[object .+?Constructor\]$/,Wb=/^0o[0-7]+$/i,Xb=/^(?:0|[1-9]\d*)$/,Yb=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Zb=/($^)/,$b=/['\n\r\u2028\u2029\\]/g,_b="\\ud800-\\udfff",ac="\\u0300-\\u036f",bc="\\ufe20-\\ufe2f",cc="\\u20d0-\\u20ff",dc=ac+bc+cc,ec="\\u2700-\\u27bf",fc="a-z\\xdf-\\xf6\\xf8-\\xff",gc="\\xac\\xb1\\xd7\\xf7",hc="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ic="\\u2000-\\u206f",jc=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",kc="A-Z\\xc0-\\xd6\\xd8-\\xde",lc="\\ufe0e\\ufe0f",mc=gc+hc+ic+jc,nc="['’]",oc="["+_b+"]",pc="["+mc+"]",qc="["+dc+"]",rc="\\d+",sc="["+ec+"]",tc="["+fc+"]",uc="[^"+_b+mc+rc+ec+fc+kc+"]",vc="\\ud83c[\\udffb-\\udfff]",wc="(?:"+qc+"|"+vc+")",xc="[^"+_b+"]",yc="(?:\\ud83c[\\udde6-\\uddff]){2}",zc="[\\ud800-\\udbff][\\udc00-\\udfff]",Ac="["+kc+"]",Bc="\\u200d",Cc="(?:"+tc+"|"+uc+")",Dc="(?:"+Ac+"|"+uc+")",Ec="(?:"+nc+"(?:d|ll|m|re|s|t|ve))?",Fc="(?:"+nc+"(?:D|LL|M|RE|S|T|VE))?",Gc=wc+"?",Hc="["+lc+"]?",Ic="(?:"+Bc+"(?:"+[xc,yc,zc].join("|")+")"+Hc+Gc+")*",Jc="\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)",Kc="\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)",Lc=Hc+Gc+Ic,Mc="(?:"+[sc,yc,zc].join("|")+")"+Lc,Nc="(?:"+[xc+qc+"?",qc,yc,zc,oc].join("|")+")",Oc=RegExp(nc,"g"),Pc=RegExp(qc,"g"),Qc=RegExp(vc+"(?="+vc+")|"+Nc+Lc,"g"),Rc=RegExp([Ac+"?"+tc+"+"+Ec+"(?="+[pc,Ac,"$"].join("|")+")",Dc+"+"+Fc+"(?="+[pc,Ac+Cc,"$"].join("|")+")",Ac+"?"+Cc+"+"+Ec,Ac+"+"+Fc,Kc,Jc,rc,Mc].join("|"),"g"),Sc=RegExp("["+Bc+_b+dc+lc+"]"),Tc=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Uc=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Vc=-1,Wc={};Wc[kb]=Wc[lb]=Wc[mb]=Wc[nb]=Wc[ob]=Wc[pb]=Wc[qb]=Wc[rb]=Wc[sb]=!0,Wc[Oa]=Wc[Pa]=Wc[ib]=Wc[Ra]=Wc[jb]=Wc[Sa]=Wc[Ua]=Wc[Va]=Wc[Xa]=Wc[Ya]=Wc[$a]=Wc[bb]=Wc[cb]=Wc[db]=Wc[gb]=!1;var Xc={};Xc[Oa]=Xc[Pa]=Xc[ib]=Xc[jb]=Xc[Ra]=Xc[Sa]=Xc[kb]=Xc[lb]=Xc[mb]=Xc[nb]=Xc[ob]=Xc[Xa]=Xc[Ya]=Xc[$a]=Xc[bb]=Xc[cb]=Xc[db]=Xc[eb]=Xc[pb]=Xc[qb]=Xc[rb]=Xc[sb]=!0,Xc[Ua]=Xc[Va]=Xc[gb]=!1;var Yc={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Zc={"&":"&","<":"<",">":">",'"':""","'":"'"},$c={"&":"&","<":"<",">":">",""":'"',"'":"'"},_c={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ad=parseFloat,bd=parseInt,cd="object"==typeof d&&d&&d.Object===Object&&d,dd="object"==typeof self&&self&&self.Object===Object&&self,ed=cd||dd||Function("return this")(),fd="object"==typeof b&&b&&!b.nodeType&&b,gd=fd&&"object"==typeof c&&c&&!c.nodeType&&c,hd=gd&&gd.exports===fd,id=hd&&cd.process,jd=function(){try{return id&&id.binding&&id.binding("util")}catch(a){}}(),kd=jd&&jd.isArrayBuffer,ld=jd&&jd.isDate,md=jd&&jd.isMap,nd=jd&&jd.isRegExp,od=jd&&jd.isSet,pd=jd&&jd.isTypedArray,qd=A("length"),rd=B(Yc),sd=B(Zc),td=B($c),ud=function b(c){function d(a){if(ii(a)&&!tm(a)&&!(a instanceof X)){if(a instanceof B)return a;if(tk.call(a,"__wrapped__"))return fg(a)}return new B(a)}function s(){}function B(a,b){this.__wrapped__=a,this.__actions__=[],this.__chain__=!!b,this.__index__=0,this.__values__=ca}function X(a){this.__wrapped__=a,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=Ka,this.__views__=[]}function _(){var a=new X(this.__wrapped__);return a.__actions__=Ne(this.__actions__),a.__dir__=this.__dir__,a.__filtered__=this.__filtered__,a.__iteratees__=Ne(this.__iteratees__),a.__takeCount__=this.__takeCount__,a.__views__=Ne(this.__views__),a}function aa(){if(this.__filtered__){var a=new X(this);a.__dir__=-1,a.__filtered__=!0}else a=this.clone(),a.__dir__*=-1;return a}function Pb(){var a=this.__wrapped__.value(),b=this.__dir__,c=tm(a),d=b<0,e=c?a.length:0,f=Df(0,e,this.__views__),g=f.start,h=f.end,i=h-g,j=d?h:g-1,k=this.__iteratees__,l=k.length,m=0,n=Xk(i,this.__takeCount__);if(!c||!d&&e==i&&n==i)return ue(a,this.__actions__);var o=[];a:for(;i--&&m-1}function kc(a,b){var c=this.__data__,d=Gc(c,a);return d<0?(++this.size,c.push([a,b])):c[d][1]=b,this}function lc(a){var b=-1,c=null==a?0:a.length;for(this.clear();++b=b?a:b)),a}function Nc(a,b,c,d,e,f){var g,i=b&ka,j=b&la,k=b&ma;if(c&&(g=e?c(a,d,e,f):c(a)),g!==ca)return g;if(!hi(a))return a;var l=tm(a);if(l){if(g=Gf(a),!i)return Ne(a,g)}else{var m=Dl(a),n=m==Va||m==Wa;if(vm(a))return Be(a,i);if(m==$a||m==Oa||n&&!e){if(g=j||n?{}:Hf(a),!i)return j?Qe(a,Jc(g,a)):Pe(a,Ic(g,a))}else{if(!Xc[m])return e?a:{};g=If(a,m,Nc,i)}}f||(f=new uc);var o=f.get(a);if(o)return o;f.set(a,g);var p=k?j?vf:uf:j?Si:Ri,q=l?ca:p(a);return h(q||a,function(d,e){q&&(e=d,d=a[e]),Fc(g,e,Nc(d,b,c,e,a,f))}),g}function Qc(a){var b=Ri(a);return function(c){return Rc(c,a,b)}}function Rc(a,b,c){var d=c.length;if(null==a)return!d;for(a=kk(a);d--;){var e=c[d],f=b[e],g=a[e];if(g===ca&&!(e in a)||!f(g))return!1}return!0}function Sc(a,b,c){if("function"!=typeof a)throw new nk(ga);return Gl(function(){a.apply(ca,c)},b)}function Tc(a,b,c,d){var e=-1,f=l,g=!0,h=a.length,i=[],j=b.length;if(!h)return i;c&&(b=n(b,H(c))),d?(f=m,g=!1):b.length>=ea&&(f=J,g=!1,b=new rc(b));a:for(;++ee?0:e+c),d=d===ca||d>e?e:zi(d),d<0&&(d+=e),d=c>d?0:Ai(d);c0&&c(h)?b>1?cd(h,b-1,c,d,e):o(e,h):d||(e[e.length]=h)}return e}function dd(a,b){return a&&tl(a,b,Ri)}function fd(a,b){return a&&ul(a,b,Ri)}function gd(a,b){return k(b,function(b){return ei(a[b])})}function id(a,b){b=ze(b,a);for(var c=0,d=b.length;null!=a&&cb}function wd(a,b){return null!=a&&tk.call(a,b)}function xd(a,b){return null!=a&&b in kk(a)}function yd(a,b,c){return a>=Xk(b,c)&&a=120&&k.length>=120)?new rc(g&&k):ca}k=a[0];var o=-1,p=h[0];a:for(;++o-1;)h!==a&&Hk.call(h,i,1),Hk.call(a,i,1);return a}function ae(a,b){for(var c=a?b.length:0,d=c-1;c--;){var e=b[c];if(c==d||e!==f){var f=e;Lf(e)?Hk.call(a,e,1):re(a,e)}}return a}function be(a,b){return a+Qk($k()*(b-a+1))}function ce(a,b,c,d){for(var e=-1,f=Wk(Pk((b-a)/(c||1)),0),g=fk(f);f--;)g[d?f:++e]=a,a+=c;return g}function de(a,b){var c="";if(!a||b<1||b>Ha)return c;do b%2&&(c+=a),b=Qk(b/2),b&&(a+=a);while(b);return c}function ee(a,b){return Hl(Yf(a,b,Hj),a+"")}function fe(a){return Bc(cj(a))}function ge(a,b){var c=cj(a);return bg(c,Mc(b,0,c.length))}function he(a,b,c,d){if(!hi(a))return a;b=ze(b,a);for(var e=-1,f=b.length,g=f-1,h=a;null!=h&&++ee?0:e+b),c=c>e?e:c,c<0&&(c+=e),e=b>c?0:c-b>>>0,b>>>=0;for(var f=fk(e);++d>>1,g=a[f];null!==g&&!ti(g)&&(c?g<=b:g=ea){var j=b?null:zl(a);if(j)return V(j);g=!1,e=J,i=new rc}else i=b?[]:h;a:for(;++d=d?a:je(a,b,c)}function Be(a,b){if(b)return a.slice();var c=a.length,d=Dk?Dk(c):new a.constructor(c);return a.copy(d),d}function Ce(a){var b=new a.constructor(a.byteLength);return new Ck(b).set(new Ck(a)),b}function De(a,b){var c=b?Ce(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.byteLength)}function Ee(b,c,d){var e=c?d(S(b),ka):S(b);return p(e,a,new b.constructor)}function Fe(a){var b=new a.constructor(a.source,Sb.exec(a));return b.lastIndex=a.lastIndex,b}function Ge(a,b,c){var d=b?c(V(a),ka):V(a);return p(d,e,new a.constructor)}function He(a){return ol?kk(ol.call(a)):{}}function Ie(a,b){var c=b?Ce(a.buffer):a.buffer;return new a.constructor(c,a.byteOffset,a.length)}function Je(a,b){if(a!==b){var c=a!==ca,d=null===a,e=a===a,f=ti(a),g=b!==ca,h=null===b,i=b===b,j=ti(b);if(!h&&!j&&!f&&a>b||f&&g&&i&&!h&&!j||d&&g&&i||!c&&i||!e)return 1;if(!d&&!f&&!j&&a=h)return i;var j=c[d];return i*("desc"==j?-1:1)}}return a.index-b.index}function Le(a,b,c,d){for(var e=-1,f=a.length,g=c.length,h=-1,i=b.length,j=Wk(f-g,0),k=fk(i+j),l=!d;++h1?c[e-1]:ca,g=e>2?c[2]:ca;for(f=a.length>3&&"function"==typeof f?(e--,f):ca,g&&Mf(c[0],c[1],g)&&(f=e<3?ca:f,e=1),b=kk(b);++d-1?e[f?b[g]:g]:ca}}function _e(a){return tf(function(b){var c=b.length,d=c,e=B.prototype.thru;for(a&&b.reverse();d--;){var f=b[d];if("function"!=typeof f)throw new nk(ga);if(e&&!g&&"wrapper"==wf(f))var g=new B([],!0)}for(d=g?d:c;++d1&&s.reverse(),l&&ih))return!1;var j=f.get(a);if(j&&f.get(b))return j==b;var k=-1,l=!0,m=c&oa?new rc:ca;for(f.set(a,b),f.set(b,a);++k1?"& ":"")+b[d],b=b.join(c>2?", ":" "),a.replace(Mb,"{\n/* [wrapped with "+b+"] */\n")}function Kf(a){return tm(a)||sm(a)||!!(Ik&&a&&a[Ik])}function Lf(a,b){return b=null==b?Ha:b,!!b&&("number"==typeof a||Xb.test(a))&&a>-1&&a%1==0&&a0){if(++b>=Ba)return arguments[0]}else b=0;return a.apply(ca,arguments)}}function bg(a,b){var c=-1,d=a.length,e=d-1;for(b=b===ca?d:b;++c=this.__values__.length,b=a?ca:this.__values__[this.__index__++];return{done:a,value:b}}function fh(){return this}function gh(a){for(var b,c=this;c instanceof s;){var d=fg(c);d.__index__=0,d.__values__=ca,b?e.__wrapped__=d:b=d;var e=d;c=c.__wrapped__}return e.__wrapped__=a,b}function hh(){var a=this.__wrapped__;if(a instanceof X){var b=a;return this.__actions__.length&&(b=new X(this)),b=b.reverse(),b.__actions__.push({func:bh,args:[Fg],thisArg:ca}),new B(b,this.__chain__)}return this.thru(Fg)}function ih(){return ue(this.__wrapped__,this.__actions__)}function jh(a,b,c){var d=tm(a)?j:Yc;return c&&Mf(a,b,c)&&(b=ca),d(a,yf(b,3))}function kh(a,b){var c=tm(a)?k:_c;return c(a,yf(b,3))}function lh(a,b){return cd(rh(a,b),1)}function mh(a,b){return cd(rh(a,b),Ga)}function nh(a,b,c){return c=c===ca?1:zi(c),cd(rh(a,b),c)}function oh(a,b){var c=tm(a)?h:rl;return c(a,yf(b,3))}function ph(a,b){var c=tm(a)?i:sl;return c(a,yf(b,3))}function qh(a,b,c,d){a=Xh(a)?a:cj(a),c=c&&!d?zi(c):0;var e=a.length;return c<0&&(c=Wk(e+c,0)),si(a)?c<=e&&a.indexOf(b,c)>-1:!!e&&w(a,b,c)>-1}function rh(a,b){var c=tm(a)?n:Rd;return c(a,yf(b,3))}function sh(a,b,c,d){return null==a?[]:(tm(b)||(b=null==b?[]:[b]),c=d?ca:c,tm(c)||(c=null==c?[]:[c]),Xd(a,b,c))}function th(a,b,c){var d=tm(a)?p:C,e=arguments.length<3;return d(a,yf(b,4),c,e,rl)}function uh(a,b,c){var d=tm(a)?q:C,e=arguments.length<3;return d(a,yf(b,4),c,e,sl)}function vh(a,b){var c=tm(a)?k:_c;return c(a,Jh(yf(b,3)))}function wh(a){var b=tm(a)?Bc:fe;return b(a)}function xh(a,b,c){b=(c?Mf(a,b,c):b===ca)?1:zi(b);var d=tm(a)?Cc:ge;return d(a,b)}function yh(a){var b=tm(a)?Dc:ie;return b(a)}function zh(a){if(null==a)return 0;if(Xh(a))return si(a)?Z(a):a.length;var b=Dl(a);return b==Xa||b==cb?a.size:Od(a).length}function Ah(a,b,c){var d=tm(a)?r:ke;return c&&Mf(a,b,c)&&(b=ca),d(a,yf(b,3))}function Bh(a,b){if("function"!=typeof b)throw new nk(ga);return a=zi(a),function(){if(--a<1)return b.apply(this,arguments)}}function Ch(a,b,c){return b=c?ca:b,b=a&&null==b?a.length:b,mf(a,wa,ca,ca,ca,ca,b)}function Dh(a,b){var c;if("function"!=typeof b)throw new nk(ga);return a=zi(a),function(){return--a>0&&(c=b.apply(this,arguments)),a<=1&&(b=ca),c}}function Eh(a,b,c){b=c?ca:b;var d=mf(a,sa,ca,ca,ca,ca,ca,b);return d.placeholder=Eh.placeholder,d}function Fh(a,b,c){b=c?ca:b;var d=mf(a,ta,ca,ca,ca,ca,ca,b);return d.placeholder=Fh.placeholder,d}function Gh(a,b,c){function d(b){var c=m,d=n;return m=n=ca,s=b,p=a.apply(d,c)}function e(a){return s=a,q=Gl(h,b),t?d(a):p}function f(a){var c=a-r,d=a-s,e=b-c;return u?Xk(e,o-d):e}function g(a){var c=a-r,d=a-s;return r===ca||c>=b||c<0||u&&d>=o}function h(){var a=hm();return g(a)?i(a):void(q=Gl(h,f(a)))}function i(a){return q=ca,v&&m?d(a):(m=n=ca,p)}function j(){q!==ca&&yl(q),s=0,m=r=n=q=ca}function k(){return q===ca?p:i(hm())}function l(){var a=hm(),c=g(a);if(m=arguments,n=this,r=a,c){if(q===ca)return e(r);if(u)return q=Gl(h,b),d(r)}return q===ca&&(q=Gl(h,b)),p}var m,n,o,p,q,r,s=0,t=!1,u=!1,v=!0;if("function"!=typeof a)throw new nk(ga);return b=Bi(b)||0,hi(c)&&(t=!!c.leading,u="maxWait"in c,o=u?Wk(Bi(c.maxWait)||0,b):o,v="trailing"in c?!!c.trailing:v),l.cancel=j,l.flush=k,l}function Hh(a){return mf(a,ya)}function Ih(a,b){if("function"!=typeof a||null!=b&&"function"!=typeof b)throw new nk(ga);var c=function(){var d=arguments,e=b?b.apply(this,d):d[0],f=c.cache;if(f.has(e))return f.get(e);var g=a.apply(this,d);return c.cache=f.set(e,g)||f,g};return c.cache=new(Ih.Cache||lc),c}function Jh(a){if("function"!=typeof a)throw new nk(ga);return function(){var b=arguments;switch(b.length){case 0:return!a.call(this);case 1:return!a.call(this,b[0]);case 2:return!a.call(this,b[0],b[1]);case 3:return!a.call(this,b[0],b[1],b[2])}return!a.apply(this,b)}}function Kh(a){return Dh(2,a)}function Lh(a,b){if("function"!=typeof a)throw new nk(ga);return b=b===ca?b:zi(b),ee(a,b)}function Mh(a,b){if("function"!=typeof a)throw new nk(ga);return b=null==b?0:Wk(zi(b),0),ee(function(c){var d=c[b],e=Ae(c,0,b);return d&&o(e,d),f(a,this,e)})}function Nh(a,b,c){var d=!0,e=!0;if("function"!=typeof a)throw new nk(ga);return hi(c)&&(d="leading"in c?!!c.leading:d,e="trailing"in c?!!c.trailing:e),Gh(a,b,{leading:d,maxWait:b,trailing:e})}function Oh(a){return Ch(a,1)}function Ph(a,b){return nm(ye(b),a)}function Qh(){if(!arguments.length)return[];var a=arguments[0];return tm(a)?a:[a]}function Rh(a){return Nc(a,ma)}function Sh(a,b){return b="function"==typeof b?b:ca,Nc(a,ma,b)}function Th(a){return Nc(a,ka|ma)}function Uh(a,b){return b="function"==typeof b?b:ca,Nc(a,ka|ma,b)}function Vh(a,b){return null==b||Rc(a,b,Ri(b))}function Wh(a,b){return a===b||a!==a&&b!==b}function Xh(a){return null!=a&&gi(a.length)&&!ei(a)}function Yh(a){return ii(a)&&Xh(a)}function Zh(a){return a===!0||a===!1||ii(a)&&qd(a)==Ra}function $h(a){return ii(a)&&1===a.nodeType&&!qi(a)}function _h(a){if(null==a)return!0;if(Xh(a)&&(tm(a)||"string"==typeof a||"function"==typeof a.splice||vm(a)||Am(a)||sm(a)))return!a.length;var b=Dl(a);if(b==Xa||b==cb)return!a.size;if(Rf(a))return!Od(a).length;for(var c in a)if(tk.call(a,c))return!1;return!0}function ai(a,b){return Fd(a,b)}function bi(a,b,c){c="function"==typeof c?c:ca;var d=c?c(a,b):ca;return d===ca?Fd(a,b,ca,c):!!d}function ci(a){if(!ii(a))return!1;var b=qd(a);return b==Ua||b==Ta||"string"==typeof a.message&&"string"==typeof a.name&&!qi(a)}function di(a){return"number"==typeof a&&Tk(a)}function ei(a){if(!hi(a))return!1;var b=qd(a);return b==Va||b==Wa||b==Qa||b==ab}function fi(a){return"number"==typeof a&&a==zi(a)}function gi(a){return"number"==typeof a&&a>-1&&a%1==0&&a<=Ha}function hi(a){var b=typeof a;return null!=a&&("object"==b||"function"==b)}function ii(a){return null!=a&&"object"==typeof a}function ji(a,b){return a===b||Id(a,b,Af(b))}function ki(a,b,c){return c="function"==typeof c?c:ca,Id(a,b,Af(b),c)}function li(a){return pi(a)&&a!=+a}function mi(a){if(El(a))throw new hk(fa);return Jd(a)}function ni(a){return null===a}function oi(a){return null==a}function pi(a){return"number"==typeof a||ii(a)&&qd(a)==Ya}function qi(a){if(!ii(a)||qd(a)!=$a)return!1;var b=Ek(a);if(null===b)return!0;var c=tk.call(b,"constructor")&&b.constructor;return"function"==typeof c&&c instanceof c&&sk.call(c)==xk}function ri(a){return fi(a)&&a>=-Ha&&a<=Ha}function si(a){return"string"==typeof a||!tm(a)&&ii(a)&&qd(a)==db}function ti(a){return"symbol"==typeof a||ii(a)&&qd(a)==eb}function ui(a){return a===ca}function vi(a){return ii(a)&&Dl(a)==gb}function wi(a){return ii(a)&&qd(a)==hb}function xi(a){if(!a)return[];if(Xh(a))return si(a)?$(a):Ne(a);if(Jk&&a[Jk])return R(a[Jk]());var b=Dl(a),c=b==Xa?S:b==cb?V:cj;return c(a)}function yi(a){if(!a)return 0===a?a:0;if(a=Bi(a),a===Ga||a===-Ga){var b=a<0?-1:1;return b*Ia}return a===a?a:0}function zi(a){var b=yi(a),c=b%1;return b===b?c?b-c:b:0}function Ai(a){return a?Mc(zi(a),0,Ka):0}function Bi(a){if("number"==typeof a)return a;if(ti(a))return Ja;if(hi(a)){var b="function"==typeof a.valueOf?a.valueOf():a;a=hi(b)?b+"":b}if("string"!=typeof a)return 0===a?a:+a;a=a.replace(Jb,"");var c=Ub.test(a);return c||Wb.test(a)?bd(a.slice(2),c?2:8):Tb.test(a)?Ja:+a}function Ci(a){return Oe(a,Si(a))}function Di(a){return a?Mc(zi(a),-Ha,Ha):0===a?a:0}function Ei(a){return null==a?"":pe(a)}function Fi(a,b){var c=ql(a);return null==b?c:Ic(c,b)}function Gi(a,b){return u(a,yf(b,3),dd)}function Hi(a,b){return u(a,yf(b,3),fd)}function Ii(a,b){return null==a?a:tl(a,yf(b,3),Si)}function Ji(a,b){return null==a?a:ul(a,yf(b,3),Si)}function Ki(a,b){return a&&dd(a,yf(b,3))}function Li(a,b){return a&&fd(a,yf(b,3))}function Mi(a){return null==a?[]:gd(a,Ri(a))}function Ni(a){return null==a?[]:gd(a,Si(a))}function Oi(a,b,c){var d=null==a?ca:id(a,b);return d===ca?c:d}function Pi(a,b){return null!=a&&Ff(a,b,wd)}function Qi(a,b){return null!=a&&Ff(a,b,xd)}function Ri(a){return Xh(a)?Ac(a):Od(a)}function Si(a){return Xh(a)?Ac(a,!0):Pd(a)}function Ti(a,b){var c={};return b=yf(b,3),dd(a,function(a,d,e){Kc(c,b(a,d,e),a)}),c}function Ui(a,b){var c={};return b=yf(b,3),dd(a,function(a,d,e){Kc(c,d,b(a,d,e))}),c}function Vi(a,b){return Wi(a,Jh(yf(b)))}function Wi(a,b){if(null==a)return{};var c=n(vf(a),function(a){return[a]});return b=yf(b),Zd(a,c,function(a,c){return b(a,c[0])})}function Xi(a,b,c){b=ze(b,a);var d=-1,e=b.length;for(e||(e=1,a=ca);++db){var d=a;a=b,b=d}if(c||a%1||b%1){var e=$k();return Xk(a+e*(b-a+ad("1e-"+((e+"").length-1))),b)}return be(a,b)}function hj(a){return $m(Ei(a).toLowerCase())}function ij(a){return a=Ei(a),a&&a.replace(Yb,rd).replace(Pc,"")}function jj(a,b,c){a=Ei(a),b=pe(b);var d=a.length;c=c===ca?d:Mc(zi(c),0,d);var e=c;return c-=b.length,c>=0&&a.slice(c,e)==b}function kj(a){return a=Ei(a),a&&zb.test(a)?a.replace(xb,sd):a}function lj(a){return a=Ei(a),a&&Ib.test(a)?a.replace(Hb,"\\$&"):a}function mj(a,b,c){a=Ei(a),b=zi(b);var d=b?Z(a):0;if(!b||d>=b)return a;var e=(b-d)/2;return ef(Qk(e),c)+a+ef(Pk(e),c)}function nj(a,b,c){a=Ei(a),b=zi(b);var d=b?Z(a):0;return b&&d>>0)?(a=Ei(a),a&&("string"==typeof b||null!=b&&!ym(b))&&(b=pe(b),!b&&P(a))?Ae($(a),0,c):a.split(b,c)):[]}function tj(a,b,c){return a=Ei(a),c=null==c?0:Mc(zi(c),0,a.length),b=pe(b),a.slice(c,c+b.length)==b}function uj(a,b,c){var e=d.templateSettings;c&&Mf(a,b,c)&&(b=ca),a=Ei(a),b=Fm({},b,e,nf);var f,g,h=Fm({},b.imports,e.imports,nf),i=Ri(h),j=I(h,i),k=0,l=b.interpolate||Zb,m="__p += '",n=lk((b.escape||Zb).source+"|"+l.source+"|"+(l===Cb?Rb:Zb).source+"|"+(b.evaluate||Zb).source+"|$","g"),o="//# sourceURL="+("sourceURL"in b?b.sourceURL:"lodash.templateSources["+ ++Vc+"]")+"\n";a.replace(n,function(b,c,d,e,h,i){return d||(d=e),m+=a.slice(k,i).replace($b,N),c&&(f=!0,m+="' +\n__e("+c+") +\n'"),h&&(g=!0,m+="';\n"+h+";\n__p += '"),d&&(m+="' +\n((__t = ("+d+")) == null ? '' : __t) +\n'"),k=i+b.length,b}),m+="';\n";var p=b.variable;p||(m="with (obj) {\n"+m+"\n}\n"),m=(g?m.replace(tb,""):m).replace(ub,"$1").replace(vb,"$1;"),m="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(f?", __e = _.escape":"")+(g?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+m+"return __p\n}";var q=_m(function(){return ik(i,o+"return "+m).apply(ca,j)});if(q.source=m,ci(q))throw q;return q}function vj(a){return Ei(a).toLowerCase()}function wj(a){return Ei(a).toUpperCase()}function xj(a,b,c){if(a=Ei(a),a&&(c||b===ca))return a.replace(Jb,"");if(!a||!(b=pe(b)))return a;var d=$(a),e=$(b),f=K(d,e),g=L(d,e)+1;return Ae(d,f,g).join("")}function yj(a,b,c){if(a=Ei(a),a&&(c||b===ca))return a.replace(Lb,"");if(!a||!(b=pe(b)))return a;var d=$(a),e=L(d,$(b))+1;return Ae(d,0,e).join("")}function zj(a,b,c){if(a=Ei(a),a&&(c||b===ca))return a.replace(Kb,"");if(!a||!(b=pe(b)))return a;var d=$(a),e=K(d,$(b));return Ae(d,e).join("")}function Aj(a,b){var c=za,d=Aa;if(hi(b)){var e="separator"in b?b.separator:e;c="length"in b?zi(b.length):c,d="omission"in b?pe(b.omission):d}a=Ei(a);var f=a.length;if(P(a)){var g=$(a);f=g.length}if(c>=f)return a;var h=c-Z(d);if(h<1)return d;var i=g?Ae(g,0,h).join(""):a.slice(0,h);if(e===ca)return i+d;if(g&&(h+=i.length-h),ym(e)){if(a.slice(h).search(e)){var j,k=i;for(e.global||(e=lk(e.source,Ei(Sb.exec(e))+"g")),e.lastIndex=0;j=e.exec(k);)var l=j.index;i=i.slice(0,l===ca?h:l)}}else if(a.indexOf(pe(e),h)!=h){var m=i.lastIndexOf(e);m>-1&&(i=i.slice(0,m))}return i+d}function Bj(a){return a=Ei(a),a&&yb.test(a)?a.replace(wb,td):a}function Cj(a,b,c){return a=Ei(a),b=c?ca:b,b===ca?Q(a)?ba(a):t(a):a.match(b)||[]}function Dj(a){var b=null==a?0:a.length,c=yf();return a=b?n(a,function(a){if("function"!=typeof a[1])throw new nk(ga);return[c(a[0]),a[1]]}):[],ee(function(c){for(var d=-1;++dHa)return[];var c=Ka,d=Xk(a,Ka);b=yf(b),a-=Ka;for(var e=F(d,b);++c1?a[b-1]:ca;return c="function"==typeof c?(a.pop(),c):ca,Yg(a,c)}),$l=tf(function(a){var b=a.length,c=b?a[0]:0,d=this.__wrapped__,e=function(b){return Lc(b,a)};return!(b>1||this.__actions__.length)&&d instanceof X&&Lf(c)?(d=d.slice(c,+c+(b?1:0)),d.__actions__.push({func:bh,args:[e],thisArg:ca}),new B(d,this.__chain__).thru(function(a){return b&&!a.length&&a.push(ca),a})):this.thru(e)}),_l=Re(function(a,b,c){tk.call(a,c)?++a[c]:Kc(a,c,1)}),am=$e(og),bm=$e(pg),cm=Re(function(a,b,c){tk.call(a,c)?a[c].push(b):Kc(a,c,[b])}),dm=ee(function(a,b,c){var d=-1,e="function"==typeof b,g=Xh(a)?fk(a.length):[];return rl(a,function(a){g[++d]=e?f(b,a,c):Bd(a,b,c)}),g}),em=Re(function(a,b,c){Kc(a,c,b)}),fm=Re(function(a,b,c){a[c?0:1].push(b)},function(){return[[],[]]}),gm=ee(function(a,b){if(null==a)return[];var c=b.length;return c>1&&Mf(a,b[0],b[1])?b=[]:c>2&&Mf(b[0],b[1],b[2])&&(b=[b[0]]),Xd(a,cd(b,1),[])}),hm=Nk||function(){return ed.Date.now()},im=ee(function(a,b,c){var d=pa;if(c.length){var e=U(c,xf(im));d|=ua}return mf(a,d,b,c,e)}),jm=ee(function(a,b,c){var d=pa|qa;if(c.length){var e=U(c,xf(jm));d|=ua}return mf(b,d,a,c,e)}),km=ee(function(a,b){return Sc(a,1,b)}),lm=ee(function(a,b,c){return Sc(a,Bi(b)||0,c)});Ih.Cache=lc;var mm=xl(function(a,b){b=1==b.length&&tm(b[0])?n(b[0],H(yf())):n(cd(b,1),H(yf()));var c=b.length;return ee(function(d){for(var e=-1,g=Xk(d.length,c);++e=b}),sm=Cd(function(){return arguments}())?Cd:function(a){return ii(a)&&tk.call(a,"callee")&&!Gk.call(a,"callee")},tm=fk.isArray,um=kd?H(kd):Dd,vm=Sk||Sj,wm=ld?H(ld):Ed,xm=md?H(md):Hd,ym=nd?H(nd):Kd,zm=od?H(od):Ld,Am=pd?H(pd):Md,Bm=hf(Qd),Cm=hf(function(a,b){return a<=b}),Dm=Se(function(a,b){if(Rf(b)||Xh(b))return void Oe(b,Ri(b),a);for(var c in b)tk.call(b,c)&&Fc(a,c,b[c])}),Em=Se(function(a,b){Oe(b,Si(b),a)}),Fm=Se(function(a,b,c,d){Oe(b,Si(b),a,d)}),Gm=Se(function(a,b,c,d){Oe(b,Ri(b),a,d)}),Hm=tf(Lc),Im=ee(function(a){return a.push(ca,nf),f(Fm,ca,a)}),Jm=ee(function(a){return a.push(ca,of),f(Om,ca,a)}),Km=bf(function(a,b,c){a[b]=c},Fj(Hj)),Lm=bf(function(a,b,c){tk.call(a,b)?a[b].push(c):a[b]=[c]},yf),Mm=ee(Bd),Nm=Se(function(a,b,c){Ud(a,b,c)}),Om=Se(function(a,b,c,d){Ud(a,b,c,d)}),Pm=tf(function(a,b){var c={};if(null==a)return c;var d=!1;b=n(b,function(b){return b=ze(b,a),d||(d=b.length>1),b}),Oe(a,vf(a),c),d&&(c=Nc(c,ka|la|ma,pf));for(var e=b.length;e--;)re(c,b[e]);return c}),Qm=tf(function(a,b){return null==a?{}:Yd(a,b)}),Rm=lf(Ri),Sm=lf(Si),Tm=Xe(function(a,b,c){return b=b.toLowerCase(),a+(c?hj(b):b)}),Um=Xe(function(a,b,c){return a+(c?"-":"")+b.toLowerCase()}),Vm=Xe(function(a,b,c){return a+(c?" ":"")+b.toLowerCase()}),Wm=We("toLowerCase"),Xm=Xe(function(a,b,c){return a+(c?"_":"")+b.toLowerCase()}),Ym=Xe(function(a,b,c){return a+(c?" ":"")+$m(b)}),Zm=Xe(function(a,b,c){return a+(c?" ":"")+b.toUpperCase()}),$m=We("toUpperCase"),_m=ee(function(a,b){try{return f(a,ca,b)}catch(a){return ci(a)?a:new hk(a)}}),an=tf(function(a,b){return h(b,function(b){b=cg(b),Kc(a,b,im(a[b],a))}),a}),bn=_e(),cn=_e(!0),dn=ee(function(a,b){return function(c){return Bd(c,a,b)}}),en=ee(function(a,b){return function(c){return Bd(a,c,b)}}),fn=df(n),gn=df(j),hn=df(r),jn=gf(),kn=gf(!0),ln=cf(function(a,b){return a+b},0),mn=kf("ceil"),nn=cf(function(a,b){return a/b},1),on=kf("floor"),pn=cf(function(a,b){return a*b},1),qn=kf("round"),rn=cf(function(a,b){return a-b},0);return d.after=Bh,d.ary=Ch,d.assign=Dm,d.assignIn=Em,d.assignInWith=Fm,d.assignWith=Gm,d.at=Hm,d.before=Dh,d.bind=im,d.bindAll=an,d.bindKey=jm,d.castArray=Qh,d.chain=_g,d.chunk=gg,d.compact=hg,d.concat=ig,d.cond=Dj,d.conforms=Ej,d.constant=Fj,d.countBy=_l,d.create=Fi,d.curry=Eh,d.curryRight=Fh,d.debounce=Gh,d.defaults=Im,d.defaultsDeep=Jm,d.defer=km,d.delay=lm,d.difference=Jl,d.differenceBy=Kl,d.differenceWith=Ll,d.drop=jg,d.dropRight=kg,d.dropRightWhile=lg,d.dropWhile=mg,d.fill=ng,d.filter=kh,d.flatMap=lh,d.flatMapDeep=mh,d.flatMapDepth=nh,d.flatten=qg,d.flattenDeep=rg,d.flattenDepth=sg,d.flip=Hh,d.flow=bn,d.flowRight=cn,d.fromPairs=tg,d.functions=Mi,d.functionsIn=Ni,d.groupBy=cm,d.initial=wg,d.intersection=Ml,d.intersectionBy=Nl,d.intersectionWith=Ol,d.invert=Km,d.invertBy=Lm,d.invokeMap=dm,d.iteratee=Ij,d.keyBy=em,d.keys=Ri,d.keysIn=Si,d.map=rh,d.mapKeys=Ti,d.mapValues=Ui,d.matches=Jj,d.matchesProperty=Kj,d.memoize=Ih,d.merge=Nm,d.mergeWith=Om,d.method=dn,d.methodOf=en,d.mixin=Lj,d.negate=Jh,d.nthArg=Oj,d.omit=Pm,d.omitBy=Vi,d.once=Kh,d.orderBy=sh,d.over=fn,d.overArgs=mm,d.overEvery=gn,d.overSome=hn,d.partial=nm,d.partialRight=om,d.partition=fm,d.pick=Qm,d.pickBy=Wi,d.property=Pj,d.propertyOf=Qj,d.pull=Pl,d.pullAll=Bg,d.pullAllBy=Cg,d.pullAllWith=Dg,d.pullAt=Ql,d.range=jn,d.rangeRight=kn,d.rearg=pm,d.reject=vh,d.remove=Eg,d.rest=Lh,d.reverse=Fg,d.sampleSize=xh,d.set=Yi,d.setWith=Zi,d.shuffle=yh,d.slice=Gg,d.sortBy=gm,d.sortedUniq=Ng,d.sortedUniqBy=Og,d.split=sj,d.spread=Mh,d.tail=Pg,d.take=Qg,d.takeRight=Rg,d.takeRightWhile=Sg,d.takeWhile=Tg,d.tap=ah,d.throttle=Nh,d.thru=bh,d.toArray=xi,d.toPairs=Rm,d.toPairsIn=Sm,d.toPath=Xj,d.toPlainObject=Ci,d.transform=$i,d.unary=Oh,d.union=Rl,d.unionBy=Sl,d.unionWith=Tl,d.uniq=Ug,d.uniqBy=Vg,d.uniqWith=Wg,d.unset=_i,d.unzip=Xg,d.unzipWith=Yg,d.update=aj,d.updateWith=bj,d.values=cj,d.valuesIn=dj,d.without=Ul,d.words=Cj,d.wrap=Ph,d.xor=Vl,d.xorBy=Wl,d.xorWith=Xl,d.zip=Yl,d.zipObject=Zg,d.zipObjectDeep=$g,d.zipWith=Zl,d.entries=Rm,d.entriesIn=Sm,d.extend=Em,d.extendWith=Fm,Lj(d,d),d.add=ln,d.attempt=_m,d.camelCase=Tm,d.capitalize=hj,d.ceil=mn,d.clamp=ej,d.clone=Rh,d.cloneDeep=Th,d.cloneDeepWith=Uh,d.cloneWith=Sh,d.conformsTo=Vh,d.deburr=ij,d.defaultTo=Gj,d.divide=nn,d.endsWith=jj,d.eq=Wh,d.escape=kj,d.escapeRegExp=lj,d.every=jh,d.find=am,d.findIndex=og,d.findKey=Gi,d.findLast=bm,d.findLastIndex=pg,d.findLastKey=Hi,d.floor=on,d.forEach=oh,d.forEachRight=ph,d.forIn=Ii,d.forInRight=Ji,d.forOwn=Ki,d.forOwnRight=Li,d.get=Oi,d.gt=qm,d.gte=rm,d.has=Pi,d.hasIn=Qi,d.head=ug,d.identity=Hj,d.includes=qh,d.indexOf=vg,d.inRange=fj,d.invoke=Mm,d.isArguments=sm,d.isArray=tm,d.isArrayBuffer=um,d.isArrayLike=Xh,d.isArrayLikeObject=Yh,d.isBoolean=Zh,d.isBuffer=vm,d.isDate=wm,d.isElement=$h,d.isEmpty=_h,d.isEqual=ai,d.isEqualWith=bi,d.isError=ci,d.isFinite=di,d.isFunction=ei,d.isInteger=fi,d.isLength=gi,d.isMap=xm,d.isMatch=ji,d.isMatchWith=ki,d.isNaN=li,d.isNative=mi,d.isNil=oi,d.isNull=ni,d.isNumber=pi,d.isObject=hi,d.isObjectLike=ii,d.isPlainObject=qi,d.isRegExp=ym,d.isSafeInteger=ri,d.isSet=zm,d.isString=si,d.isSymbol=ti,d.isTypedArray=Am,d.isUndefined=ui,d.isWeakMap=vi,d.isWeakSet=wi,d.join=xg,d.kebabCase=Um,d.last=yg,d.lastIndexOf=zg,d.lowerCase=Vm,d.lowerFirst=Wm,d.lt=Bm,d.lte=Cm,d.max=Zj,d.maxBy=$j,d.mean=_j,d.meanBy=ak,d.min=bk,d.minBy=ck,d.stubArray=Rj,d.stubFalse=Sj,d.stubObject=Tj,d.stubString=Uj,d.stubTrue=Vj,d.multiply=pn,d.nth=Ag,d.noConflict=Mj,d.noop=Nj,d.now=hm,d.pad=mj,d.padEnd=nj,d.padStart=oj,d.parseInt=pj,d.random=gj,d.reduce=th,d.reduceRight=uh,d.repeat=qj,d.replace=rj,d.result=Xi,d.round=qn,d.runInContext=b,d.sample=wh,d.size=zh,d.snakeCase=Xm,d.some=Ah,d.sortedIndex=Hg,d.sortedIndexBy=Ig,d.sortedIndexOf=Jg,d.sortedLastIndex=Kg,d.sortedLastIndexBy=Lg,d.sortedLastIndexOf=Mg,d.startCase=Ym,d.startsWith=tj,d.subtract=rn,d.sum=dk,d.sumBy=ek,d.template=uj,d.times=Wj,d.toFinite=yi,d.toInteger=zi,d.toLength=Ai,d.toLower=vj,d.toNumber=Bi,d.toSafeInteger=Di,d.toString=Ei,d.toUpper=wj,d.trim=xj,d.trimEnd=yj,d.trimStart=zj,d.truncate=Aj,d.unescape=Bj,d.uniqueId=Yj,d.upperCase=Zm,d.upperFirst=$m,d.each=oh,d.eachRight=ph,d.first=ug,Lj(d,function(){var a={};return dd(d,function(b,c){tk.call(d.prototype,c)||(a[c]=b)}),a}(),{chain:!1}),d.VERSION=da,h(["bind","bindKey","curry","curryRight","partial","partialRight"],function(a){d[a].placeholder=d}),h(["drop","take"],function(a,b){X.prototype[a]=function(c){c=c===ca?1:Wk(zi(c),0);var d=this.__filtered__&&!b?new X(this):this.clone();return d.__filtered__?d.__takeCount__=Xk(c,d.__takeCount__):d.__views__.push({size:Xk(c,Ka),type:a+(d.__dir__<0?"Right":"")}),d},X.prototype[a+"Right"]=function(b){return this.reverse()[a](b).reverse()}}),h(["filter","map","takeWhile"],function(a,b){var c=b+1,d=c==Da||c==Fa;X.prototype[a]=function(a){var b=this.clone();return b.__iteratees__.push({iteratee:yf(a,3),type:c}),b.__filtered__=b.__filtered__||d,b}}),h(["head","last"],function(a,b){var c="take"+(b?"Right":"");X.prototype[a]=function(){return this[c](1).value()[0]}}),h(["initial","tail"],function(a,b){var c="drop"+(b?"":"Right");X.prototype[a]=function(){return this.__filtered__?new X(this):this[c](1)}}),X.prototype.compact=function(){return this.filter(Hj)},X.prototype.find=function(a){return this.filter(a).head()},X.prototype.findLast=function(a){return this.reverse().find(a)},X.prototype.invokeMap=ee(function(a,b){return"function"==typeof a?new X(this):this.map(function(c){return Bd(c,a,b)})}),X.prototype.reject=function(a){return this.filter(Jh(yf(a)))},X.prototype.slice=function(a,b){a=zi(a);var c=this;return c.__filtered__&&(a>0||b<0)?new X(c):(a<0?c=c.takeRight(-a):a&&(c=c.drop(a)),b!==ca&&(b=zi(b),c=b<0?c.dropRight(-b):c.take(b-a)),c)},X.prototype.takeRightWhile=function(a){return this.reverse().takeWhile(a).reverse()},X.prototype.toArray=function(){return this.take(Ka)},dd(X.prototype,function(a,b){var c=/^(?:filter|find|map|reject)|While$/.test(b),e=/^(?:head|last)$/.test(b),f=d[e?"take"+("last"==b?"Right":""):b],g=e||/^find/.test(b);f&&(d.prototype[b]=function(){var b=this.__wrapped__,h=e?[1]:arguments,i=b instanceof X,j=h[0],k=i||tm(b),l=function(a){var b=f.apply(d,o([a],h));return e&&m?b[0]:b};k&&c&&"function"==typeof j&&1!=j.length&&(i=k=!1);var m=this.__chain__,n=!!this.__actions__.length,p=g&&!m,q=i&&!n;if(!g&&k){b=q?b:new X(this);var r=a.apply(b,h);return r.__actions__.push({func:bh,args:[l],thisArg:ca}),new B(r,m)}return p&&q?a.apply(this,h):(r=this.thru(l),p?e?r.value()[0]:r.value():r)})}),h(["pop","push","shift","sort","splice","unshift"],function(a){var b=ok[a],c=/^(?:push|sort|unshift)$/.test(a)?"tap":"thru",e=/^(?:pop|shift)$/.test(a);d.prototype[a]=function(){var a=arguments;if(e&&!this.__chain__){var d=this.value();return b.apply(tm(d)?d:[],a)}return this[c](function(c){return b.apply(tm(c)?c:[],a)})}}),dd(X.prototype,function(a,b){var c=d[b];if(c){var e=c.name+"",f=hl[e]||(hl[e]=[]);f.push({name:b,func:c})}}),hl[af(ca,qa).name]=[{name:"wrapper",func:ca}],X.prototype.clone=_,X.prototype.reverse=aa,X.prototype.value=Pb,d.prototype.at=$l,d.prototype.chain=ch,d.prototype.commit=dh,d.prototype.next=eh,d.prototype.plant=gh,d.prototype.reverse=hh,d.prototype.toJSON=d.prototype.valueOf=d.prototype.value=ih,d.prototype.first=d.prototype.head,Jk&&(d.prototype[Jk]=fh),d},vd=ud();"function"==typeof ca&&"object"==typeof define.amd&&define.amd?(ed._=vd,define(function(){return vd})):gd?((gd.exports=vd)._=vd,fd._=vd):ed._=vd}).call(this)}(a("@empty").Buffer,a("@empty"))}),a.registerDynamic("9",["80"],!0,function(a,b,c){this||self;c.exports=a("80")}),a.register("11",[],function(a){"use strict";var b,c,d,e,f,g,h;return{setters:[],execute:function(){b=2*Math.PI,a("TAU",b),c=1e-5,a("EPSILON",c),d=.01,a("EPSILON_DETECTION",d),e={">":1,"^":0,"<":-1,v:0},a("velocityI",e),f={">":0,"^":-1,"<":0,v:1},a("velocityJ",f),g={">":0,"^":-1,"<":0,v:1},a("perpendicularI",g),h={">":-1,"^":0,"<":1,v:0},a("perpendicularJ",h)}}}),a.registerDynamic("37",[],!0,function(a,b,c){var d=(this||self,Object);c.exports={create:d.create,getProto:d.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:d.getOwnPropertyDescriptor,setDesc:d.defineProperty,setDescs:d.defineProperties,getKeys:d.keys,getNames:d.getOwnPropertyNames,getSymbols:d.getOwnPropertySymbols,each:[].forEach}}),a.registerDynamic("81",["37"],!0,function(a,b,c){var d=(this||self,a("37"));c.exports=function(a,b,c){return d.setDesc(a,b,c)}}),a.registerDynamic("82",["81"],!0,function(a,b,c){this||self;c.exports={default:a("81"),__esModule:!0}}),a.registerDynamic("e",["82"],!0,function(a,b,c){"use strict";var d=(this||self,a("82").default);b.default=function(){function a(a,b){for(var c=0;cb?1:a>=b?0:NaN}function e(a){return null===a?NaN:+a}function f(a){return!isNaN(a)}function g(a){return{left:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d>>1;a(b[f],c)<0?d=f+1:e=f}return d},right:function(b,c,d,e){for(arguments.length<3&&(d=0),arguments.length<4&&(e=b.length);d>>1;a(b[f],c)>0?e=f:d=f+1}return d}}}function h(a){return a.length}function i(a){for(var b=1;a*b%1;)b*=10;return b}function j(a,b){for(var c in b)Object.defineProperty(a.prototype,c,{value:b[c],enumerable:!1})}function k(){this._=Object.create(null)}function l(a){return(a+="")===tg||a[0]===ug?ug+a:a}function m(a){return(a+="")[0]===ug?a.slice(1):a}function n(a){return l(a)in this._}function o(a){return(a=l(a))in this._&&delete this._[a]}function p(){var a=[];for(var b in this._)a.push(m(b));return a}function q(){var a=0;for(var b in this._)++a;return a}function r(){for(var a in this._)return!1;return!0}function s(){this._=Object.create(null)}function t(a){return a}function u(a,b,c){return function(){var d=c.apply(b,arguments);return d===b?a:d}}function v(a,b){if(b in a)return b;b=b.charAt(0).toUpperCase()+b.slice(1);for(var c=0,d=vg.length;c=b&&(b=e+1);!(g=h[b])&&++b0&&(a=a.slice(0,h));var j=Fg.get(a);return j&&(a=j,i=X),h?b?e:d:b?w:f}function W(a,b){return function(c){var d=ig.event;ig.event=c,b[0]=this.__data__;try{a.apply(this,b)}finally{ig.event=d}}}function X(a,b){var c=W(a,b);return function(a){var b=this,d=a.relatedTarget;d&&(d===b||8&d.compareDocumentPosition(b))||c.call(b,a)}}function Y(b){var d=".dragsuppress-"+ ++Hg,e="click"+d,f=ig.select(c(b)).on("touchmove"+d,z).on("dragstart"+d,z).on("selectstart"+d,z);if(null==Gg&&(Gg=!("onselectstart"in b)&&v(b.style,"userSelect")),Gg){var g=a(b).style,h=g[Gg];g[Gg]="none"}return function(a){if(f.on(d,null),Gg&&(g[Gg]=h),a){var b=function(){f.on(e,null)};f.on(e,function(){z(),b()},!0),setTimeout(b,0)}}}function Z(a,b){b.changedTouches&&(b=b.changedTouches[0]);var d=a.ownerSVGElement||a;if(d.createSVGPoint){var e=d.createSVGPoint();if(Ig<0){var f=c(a);if(f.scrollX||f.scrollY){d=ig.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var g=d[0][0].getScreenCTM();Ig=!(g.f||g.e),d.remove()}}return Ig?(e.x=b.pageX,e.y=b.pageY):(e.x=b.clientX,e.y=b.clientY),e=e.matrixTransform(a.getScreenCTM().inverse()),[e.x,e.y]}var h=a.getBoundingClientRect();return[b.clientX-h.left-a.clientLeft,b.clientY-h.top-a.clientTop]}function $(){return ig.event.changedTouches[0].identifier}function _(a){return a>0?1:a<0?-1:0}function aa(a,b,c){return(b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])}function ba(a){return a>1?0:a<-1?Lg:Math.acos(a)}function ca(a){return a>1?Og:a<-1?-Og:Math.asin(a)}function da(a){return((a=Math.exp(a))-1/a)/2}function ea(a){return((a=Math.exp(a))+1/a)/2}function fa(a){return((a=Math.exp(2*a))-1)/(a+1)}function ga(a){return(a=Math.sin(a/2))*a}function ha(){}function ia(a,b,c){return this instanceof ia?(this.h=+a,this.s=+b,void(this.l=+c)):arguments.length<2?a instanceof ia?new ia(a.h,a.s,a.l):wa(""+a,xa,ia):new ia(a,b,c)}function ja(a,b,c){function d(a){return a>360?a-=360:a<0&&(a+=360),a<60?f+(g-f)*a/60:a<180?g:a<240?f+(g-f)*(240-a)/60:f}function e(a){return Math.round(255*d(a))}var f,g;return a=isNaN(a)?0:(a%=360)<0?a+360:a,b=isNaN(b)?0:b<0?0:b>1?1:b,c=c<0?0:c>1?1:c,g=c<=.5?c*(1+b):c+b-c*b,f=2*c-g,new sa(e(a+120),e(a),e(a-120))}function ka(a,b,c){return this instanceof ka?(this.h=+a,this.c=+b,void(this.l=+c)):arguments.length<2?a instanceof ka?new ka(a.h,a.c,a.l):a instanceof ma?oa(a.l,a.a,a.b):oa((a=ya((a=ig.rgb(a)).r,a.g,a.b)).l,a.a,a.b):new ka(a,b,c)}function la(a,b,c){return isNaN(a)&&(a=0),isNaN(b)&&(b=0),new ma(c,Math.cos(a*=Pg)*b,Math.sin(a)*b)}function ma(a,b,c){return this instanceof ma?(this.l=+a,this.a=+b,void(this.b=+c)):arguments.length<2?a instanceof ma?new ma(a.l,a.a,a.b):a instanceof ka?la(a.h,a.c,a.l):ya((a=sa(a)).r,a.g,a.b):new ma(a,b,c)}function na(a,b,c){var d=(a+16)/116,e=d+b/500,f=d-c/200;return e=pa(e)*$g,d=pa(d)*_g,f=pa(f)*ah,new sa(ra(3.2404542*e-1.5371385*d-.4985314*f),ra(-.969266*e+1.8760108*d+.041556*f),ra(.0556434*e-.2040259*d+1.0572252*f))}function oa(a,b,c){return a>0?new ka(Math.atan2(c,b)*Qg,Math.sqrt(b*b+c*c),a):new ka(NaN,NaN,a)}function pa(a){return a>.206893034?a*a*a:(a-4/29)/7.787037}function qa(a){return a>.008856?Math.pow(a,1/3):7.787037*a+4/29}function ra(a){return Math.round(255*(a<=.00304?12.92*a:1.055*Math.pow(a,1/2.4)-.055))}function sa(a,b,c){return this instanceof sa?(this.r=~~a,this.g=~~b,void(this.b=~~c)):arguments.length<2?a instanceof sa?new sa(a.r,a.g,a.b):wa(""+a,sa,ja):new sa(a,b,c)}function ta(a){return new sa(a>>16,a>>8&255,255&a)}function ua(a){return ta(a)+""}function va(a){return a<16?"0"+Math.max(0,a).toString(16):Math.min(255,a).toString(16)}function wa(a,b,c){var d,e,f,g=0,h=0,i=0;if(d=/([a-z]+)\((.*)\)/.exec(a=a.toLowerCase()))switch(e=d[2].split(","),d[1]){case"hsl":return c(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100);case"rgb":return b(Aa(e[0]),Aa(e[1]),Aa(e[2]))}return(f=dh.get(a))?b(f.r,f.g,f.b):(null==a||"#"!==a.charAt(0)||isNaN(f=parseInt(a.slice(1),16))||(4===a.length?(g=(3840&f)>>4,g|=g>>4,h=240&f,h|=h>>4,i=15&f,i|=i<<4):7===a.length&&(g=(16711680&f)>>16,h=(65280&f)>>8,i=255&f)),b(g,h,i))}function xa(a,b,c){var d,e,f=Math.min(a/=255,b/=255,c/=255),g=Math.max(a,b,c),h=g-f,i=(g+f)/2;return h?(e=i<.5?h/(g+f):h/(2-g-f),d=a==g?(b-c)/h+(b0&&i<1?0:d),new ia(d,e,i)}function ya(a,b,c){a=za(a),b=za(b),c=za(c);var d=qa((.4124564*a+.3575761*b+.1804375*c)/$g),e=qa((.2126729*a+.7151522*b+.072175*c)/_g),f=qa((.0193339*a+.119192*b+.9503041*c)/ah);return ma(116*e-16,500*(d-e),200*(e-f))}function za(a){return(a/=255)<=.04045?a/12.92:Math.pow((a+.055)/1.055,2.4)}function Aa(a){var b=parseFloat(a);return"%"===a.charAt(a.length-1)?Math.round(2.55*b):b}function Ba(a){return"function"==typeof a?a:function(){return a}}function Ca(a){return function(b,c,d){return 2===arguments.length&&"function"==typeof c&&(d=c,c=null),Da(b,c,a,d)}}function Da(a,b,c,d){function e(){var a,b=i.status;if(!b&&Fa(i)||b>=200&&b<300||304===b){try{a=c.call(f,i)}catch(a){return void g.error.call(f,a)}g.load.call(f,a)}else g.error.call(f,i)}var f={},g=ig.dispatch("beforesend","progress","load","error"),h={},i=new XMLHttpRequest,j=null;return!this.XDomainRequest||"withCredentials"in i||!/^(http(s)?:)?\/\//.test(a)||(i=new XDomainRequest),"onload"in i?i.onload=i.onerror=e:i.onreadystatechange=function(){i.readyState>3&&e()},i.onprogress=function(a){var b=ig.event;ig.event=a;try{g.progress.call(f,i)}finally{ig.event=b}},f.header=function(a,b){return a=(a+"").toLowerCase(),arguments.length<2?h[a]:(null==b?delete h[a]:h[a]=b+"",f)},f.mimeType=function(a){return arguments.length?(b=null==a?null:a+"",f):b},f.responseType=function(a){return arguments.length?(j=a,f):j},f.response=function(a){return c=a,f},["get","post"].forEach(function(a){f[a]=function(){return f.send.apply(f,[a].concat(kg(arguments)))}}),f.send=function(c,d,e){if(2===arguments.length&&"function"==typeof d&&(e=d,d=null),i.open(c,a,!0),null==b||"accept"in h||(h.accept=b+",*/*"),i.setRequestHeader)for(var k in h)i.setRequestHeader(k,h[k]);return null!=b&&i.overrideMimeType&&i.overrideMimeType(b),null!=j&&(i.responseType=j),null!=e&&f.on("error",e).on("load",function(a){e(null,a)}),g.beforesend.call(f,i),i.send(null==d?null:d),f},f.abort=function(){return i.abort(),f},ig.rebind(f,g,"on"),null==d?f:f.get(Ea(d))}function Ea(a){return 1===a.length?function(b,c){a(null==b?c:null)}:a}function Fa(a){var b=a.responseType;return b&&"text"!==b?a.response:a.responseText}function Ga(a,b,c){var d=arguments.length;d<2&&(b=0),d<3&&(c=Date.now());var e=c+b,f={c:a,t:e,n:null};return fh?fh.n=f:eh=f,fh=f,gh||(hh=clearTimeout(hh),gh=1,ih(Ha)),f}function Ha(){var a=Ia(),b=Ja()-a;b>24?(isFinite(b)&&(clearTimeout(hh),hh=setTimeout(Ha,b)),gh=0):(gh=1,ih(Ha))}function Ia(){for(var a=Date.now(),b=eh;b;)a>=b.t&&b.c(a-b.t)&&(b.c=null),b=b.n;return a}function Ja(){for(var a,b=eh,c=1/0;b;)b.c?(b.t8?function(a){return a/c}:function(a){return a*c},symbol:a}}function Ma(a){var b=a.decimal,c=a.thousands,d=a.grouping,e=a.currency,f=d&&c?function(a,b){for(var e=a.length,f=[],g=0,h=d[0],i=0;e>0&&h>0&&(i+h+1>b&&(h=Math.max(1,b-i)),f.push(a.substring(e-=h,e+h)),!((i+=h+1)>b));)h=d[g=(g+1)%d.length];return f.reverse().join(c)}:t;return function(a){var c=kh.exec(a),d=c[1]||" ",g=c[2]||">",h=c[3]||"-",i=c[4]||"",j=c[5],k=+c[6],l=c[7],m=c[8],n=c[9],o=1,p="",q="",r=!1,s=!0;switch(m&&(m=+m.substring(1)),(j||"0"===d&&"="===g)&&(j=d="0",g="="),n){case"n":l=!0,n="g";break;case"%":o=100,q="%",n="f";break;case"p":o=100,q="%",n="r";break;case"b":case"o":case"x":case"X":"#"===i&&(p="0"+n.toLowerCase());case"c":s=!1;case"d":r=!0,m=0;break;case"s":o=-1,n="r"}"$"===i&&(p=e[0],q=e[1]),"r"!=n||m||(n="g"),null!=m&&("g"==n?m=Math.max(1,Math.min(21,m)):"e"!=n&&"f"!=n||(m=Math.max(0,Math.min(20,m)))),n=lh.get(n)||Na;var t=j&&l;return function(a){var c=q;if(r&&a%1)return"";var e=a<0||0===a&&1/a<0?(a=-a,"-"):"-"===h?"":h;if(o<0){var i=ig.formatPrefix(a,m);a=i.scale(a),c=i.symbol+q}else a*=o;a=n(a,m);var u,v,w=a.lastIndexOf(".");if(w<0){var x=s?a.lastIndexOf("e"):-1;x<0?(u=a,v=""):(u=a.substring(0,x),v=a.substring(x))}else u=a.substring(0,w),v=b+a.substring(w+1);!j&&l&&(u=f(u,1/0));var y=p.length+u.length+v.length+(t?0:e.length),z=y"===g?z+e+a:"^"===g?z.substring(0,y>>=1)+e+a+z.substring(y):e+(t?a:z+a))+c}}}function Na(a){return a+""}function Oa(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Pa(a,b,c){function d(b){var c=a(b),d=f(c,1);return b-c1)for(;g=j)return-1;if(e=b.charCodeAt(h++),37===e){if(g=b.charAt(h++),f=D[g in ph?b.charAt(h++):g],!f||(d=f(a,c,d))<0)return-1}else if(e!=c.charCodeAt(d++))return-1}return d}function d(a,b,c){w.lastIndex=0;var d=w.exec(b.slice(c));return d?(a.w=x.get(d[0].toLowerCase()),c+d[0].length):-1}function e(a,b,c){u.lastIndex=0;var d=u.exec(b.slice(c));return d?(a.w=v.get(d[0].toLowerCase()),c+d[0].length):-1}function f(a,b,c){A.lastIndex=0;var d=A.exec(b.slice(c));return d?(a.m=B.get(d[0].toLowerCase()),c+d[0].length):-1}function g(a,b,c){y.lastIndex=0;var d=y.exec(b.slice(c));return d?(a.m=z.get(d[0].toLowerCase()),c+d[0].length):-1}function h(a,b,d){return c(a,C.c.toString(),b,d)}function i(a,b,d){return c(a,C.x.toString(),b,d)}function j(a,b,d){return c(a,C.X.toString(),b,d)}function k(a,b,c){var d=t.get(b.slice(c,c+=2).toLowerCase());return null==d?-1:(a.p=d,c)}var l=a.dateTime,m=a.date,n=a.time,o=a.periods,p=a.days,q=a.shortDays,r=a.months,s=a.shortMonths;b.utc=function(a){function c(a){try{nh=Oa;var b=new nh;return b._=a,d(b)}finally{nh=Date}}var d=b(a);return c.parse=function(a){try{nh=Oa;var b=d.parse(a);return b&&b._}finally{nh=Date}},c.toString=d.toString,c},b.multi=b.utc.multi=jb;var t=ig.map(),u=Ta(p),v=Ua(p),w=Ta(q),x=Ua(q),y=Ta(r),z=Ua(r),A=Ta(s),B=Ua(s);o.forEach(function(a,b){t.set(a.toLowerCase(),b)});var C={a:function(a){return q[a.getDay()]},A:function(a){return p[a.getDay()]},b:function(a){return s[a.getMonth()]},B:function(a){return r[a.getMonth()]},c:b(l),d:function(a,b){return Sa(a.getDate(),b,2)},e:function(a,b){return Sa(a.getDate(),b,2)},H:function(a,b){return Sa(a.getHours(),b,2)},I:function(a,b){return Sa(a.getHours()%12||12,b,2)},j:function(a,b){return Sa(1+mh.dayOfYear(a),b,3)},L:function(a,b){return Sa(a.getMilliseconds(),b,3)},m:function(a,b){return Sa(a.getMonth()+1,b,2)},M:function(a,b){return Sa(a.getMinutes(),b,2)},p:function(a){return o[+(a.getHours()>=12)]},S:function(a,b){return Sa(a.getSeconds(),b,2)},U:function(a,b){return Sa(mh.sundayOfYear(a),b,2)},w:function(a){return a.getDay()},W:function(a,b){return Sa(mh.mondayOfYear(a),b,2)},x:b(m),X:b(n),y:function(a,b){return Sa(a.getFullYear()%100,b,2)},Y:function(a,b){return Sa(a.getFullYear()%1e4,b,4)},Z:hb,"%":function(){return"%"}},D={a:d,A:e,b:f,B:g,c:h,d:bb,e:bb,H:db,I:db,j:cb,L:gb,m:ab,M:eb,p:k,S:fb,U:Wa,w:Va,W:Xa,x:i,X:j,y:Za,Y:Ya,Z:$a,"%":ib};return b}function Sa(a,b,c){var d=a<0?"-":"",e=(d?-a:a)+"",f=e.length;return d+(f68?1900:2e3)}function ab(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+2));return d?(a.m=d[0]-1,c+d[0].length):-1}function bb(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+2));return d?(a.d=+d[0],c+d[0].length):-1}function cb(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+3));return d?(a.j=+d[0],c+d[0].length):-1}function db(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+2));return d?(a.H=+d[0],c+d[0].length):-1}function eb(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+2));return d?(a.M=+d[0],c+d[0].length):-1}function fb(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+2));return d?(a.S=+d[0],c+d[0].length):-1}function gb(a,b,c){qh.lastIndex=0;var d=qh.exec(b.slice(c,c+3));return d?(a.L=+d[0],c+d[0].length):-1}function hb(a){var b=a.getTimezoneOffset(),c=b>0?"-":"+",d=sg(b)/60|0,e=sg(b)%60;return c+Sa(d,"0",2)+Sa(e,"0",2)}function ib(a,b,c){rh.lastIndex=0;var d=rh.exec(b.slice(c,c+1));return d?c+d[0].length:-1}function jb(a){for(var b=a.length,c=-1;++c=0?1:-1,h=g*c,i=Math.cos(b),j=Math.sin(b),k=f*j,l=e*i+k*Math.cos(h),m=k*g*Math.sin(h);xh.add(Math.atan2(m,l)),d=a,e=i,f=j}var b,c,d,e,f;yh.point=function(g,h){yh.point=a,d=(b=g)*Pg,e=Math.cos(h=(c=h)*Pg/2+Lg/4),f=Math.sin(h)},yh.lineEnd=function(){a(b,c)}}function qb(a){var b=a[0],c=a[1],d=Math.cos(c);return[d*Math.cos(b),d*Math.sin(b),Math.sin(c)]}function rb(a,b){return a[0]*b[0]+a[1]*b[1]+a[2]*b[2]}function sb(a,b){return[a[1]*b[2]-a[2]*b[1],a[2]*b[0]-a[0]*b[2],a[0]*b[1]-a[1]*b[0]]}function tb(a,b){a[0]+=b[0],a[1]+=b[1],a[2]+=b[2]}function ub(a,b){return[a[0]*b,a[1]*b,a[2]*b]}function vb(a){var b=Math.sqrt(a[0]*a[0]+a[1]*a[1]+a[2]*a[2]);a[0]/=b,a[1]/=b,a[2]/=b}function wb(a){return[Math.atan2(a[1],a[0]),ca(a[2])]}function xb(a,b){return sg(a[0]-b[0])=0;--h)e.point((l=k[h])[0],l[1])}else d(n.x,n.p.x,-1,e);n=n.p}n=n.o,k=n.z,o=!o}while(!n.v);e.lineEnd()}}}function Gb(a){if(b=a.length){for(var b,c,d=0,e=a[0];++d0){for(v||(f.polygonStart(),v=!0),f.lineStart();++g1&&2&b&&c.push(c.pop().concat(c.shift())),n.push(c.filter(Jb))}var n,o,p,q=b(f),r=e.invert(d[0],d[1]),s={point:g,lineStart:i,lineEnd:j,polygonStart:function(){s.point=k,s.lineStart=l,s.lineEnd=m,n=[],o=[]},polygonEnd:function(){s.point=g,s.lineStart=i,s.lineEnd=j,n=ig.merge(n);var a=Pb(r,o);n.length?(v||(f.polygonStart(),v=!0),Fb(n,Lb,a,c,f)):a&&(v||(f.polygonStart(),v=!0),f.lineStart(),c(null,null,1,f),f.lineEnd()),v&&(f.polygonEnd(),v=!1),n=o=null},sphere:function(){f.polygonStart(),f.lineStart(),c(null,null,1,f),f.lineEnd(),f.polygonEnd()}},t=Kb(),u=b(t),v=!1;return s}}function Jb(a){return a.length>1}function Kb(){var a,b=[];return{lineStart:function(){b.push(a=[])},point:function(b,c){a.push([b,c])},lineEnd:w,buffer:function(){var c=b;return b=[],a=null,c},rejoin:function(){b.length>1&&b.push(b.pop().concat(b.shift()))}}}function Lb(a,b){return((a=a.x)[0]<0?a[1]-Og-Jg:Og-a[1])-((b=b.x)[0]<0?b[1]-Og-Jg:Og-b[1])}function Mb(a){var b,c=NaN,d=NaN,e=NaN;return{lineStart:function(){a.lineStart(),b=1},point:function(f,g){var h=f>0?Lg:-Lg,i=sg(f-c);sg(i-Lg)0?Og:-Og),a.point(e,d),a.lineEnd(),a.lineStart(),a.point(h,d),a.point(f,d),b=0):e!==h&&i>=Lg&&(sg(c-e)Jg?Math.atan((Math.sin(b)*(f=Math.cos(d))*Math.sin(c)-Math.sin(d)*(e=Math.cos(b))*Math.sin(a))/(e*f*g)):(b+d)/2}function Ob(a,b,c,d){var e;if(null==a)e=c*Og,d.point(-Lg,e),d.point(0,e),d.point(Lg,e),d.point(Lg,0),d.point(Lg,-e),d.point(0,-e),d.point(-Lg,-e),d.point(-Lg,0),d.point(-Lg,e);else if(sg(a[0]-b[0])>Jg){var f=a[0]=0?1:-1,x=w*v,y=x>Lg,z=o*t;if(xh.add(Math.atan2(z*w*Math.sin(x),p*u+z*Math.cos(x))),f+=y?v+w*Mg:v,y^m>=c^r>=c){var A=sb(qb(l),qb(a));vb(A);var B=sb(e,A);vb(B);var C=(y^v>=0?-1:1)*ca(B[2]);(d>C||d===C&&(A[0]||A[1]))&&(g+=y^v>=0?1:-1)}if(!q++)break;m=r,o=t,p=u,l=a}}return(f<-Jg||ff}function c(a){var c,f,i,j,k;return{lineStart:function(){j=i=!1,k=1},point:function(l,m){var n,o=[l,m],p=b(l,m),q=g?p?0:e(l,m):p?e(l+(l<0?Lg:-Lg),m):0;if(!c&&(j=i=p)&&a.lineStart(),p!==i&&(n=d(c,o),(xb(c,n)||xb(o,n))&&(o[0]+=Jg,o[1]+=Jg,p=b(o[0],o[1]))),p!==i)k=0,p?(a.lineStart(),n=d(o,c),a.point(n[0],n[1])):(n=d(c,o),a.point(n[0],n[1]),a.lineEnd()),c=n;else if(h&&c&&g^p){var r;q&f||!(r=d(o,c,!0))||(k=0,g?(a.lineStart(),a.point(r[0][0],r[0][1]),a.point(r[1][0],r[1][1]),a.lineEnd()):(a.point(r[1][0],r[1][1]),a.lineEnd(),a.lineStart(),a.point(r[0][0],r[0][1])))}!p||c&&xb(c,o)||a.point(o[0],o[1]),c=o,i=p,f=q},lineEnd:function(){i&&a.lineEnd(),c=null},clean:function(){return k|(j&&i)<<1}}}function d(a,b,c){var d=qb(a),e=qb(b),g=[1,0,0],h=sb(d,e),i=rb(h,h),j=h[0],k=i-j*j;if(!k)return!c&&a;var l=f*i/k,m=-f*j/k,n=sb(g,h),o=ub(g,l),p=ub(h,m);tb(o,p);var q=n,r=rb(o,q),s=rb(q,q),t=r*r-s*(rb(o,o)-1);if(!(t<0)){var u=Math.sqrt(t),v=ub(q,(-r-u)/s);if(tb(v,o),v=wb(v),!c)return v;var w,x=a[0],y=b[0],z=a[1],A=b[1];y0^v[1]<(sg(v[0]-x)Lg^(x<=v[0]&&v[0]<=y)){var E=ub(q,(-r+u)/s);return tb(E,o),[v,wb(E)]}}}function e(b,c){var d=g?a:Lg-a,e=0;return b<-d?e|=1:b>d&&(e|=2),c<-d?e|=4:c>d&&(e|=8),e}var f=Math.cos(a),g=f>0,h=sg(f)>Jg,i=pc(a,6*Pg);return Ib(b,c,i,g?[0,-a]:[-Lg,a-Lg])}function Rb(a,b,c,d){return function(e){var f,g=e.a,h=e.b,i=g.x,j=g.y,k=h.x,l=h.y,m=0,n=1,o=k-i,p=l-j;if(f=a-i,o||!(f>0)){if(f/=o,o<0){if(f0){if(f>n)return;f>m&&(m=f)}if(f=c-i,o||!(f<0)){if(f/=o,o<0){if(f>n)return;f>m&&(m=f)}else if(o>0){if(f0)){if(f/=p,p<0){if(f0){if(f>n)return;f>m&&(m=f)}if(f=d-j,p||!(f<0)){if(f/=p,p<0){if(f>n)return;f>m&&(m=f)}else if(p>0){if(f0&&(e.a={x:i+m*o,y:j+m*p}),n<1&&(e.b={x:i+n*o,y:j+n*p}),e}}}}}}function Sb(a,b,c,d){function e(d,e){return sg(d[0]-a)0?0:3:sg(d[0]-c)0?2:1:sg(d[1]-b)0?1:0:e>0?3:2}function f(a,b){return g(a.x,b.x)}function g(a,b){var c=e(a,1),d=e(b,1);return c!==d?c-d:0===c?b[1]-a[1]:1===c?a[0]-b[0]:2===c?a[1]-b[1]:b[0]-a[0]}return function(h){function i(a){for(var b=0,c=q.length,d=a[1],e=0;ed&&aa(j,f,a)>0&&++b:f[1]<=d&&aa(j,f,a)<0&&--b,j=f;return 0!==b}function j(f,h,i,j){var k=0,l=0;if(null==f||(k=e(f,i))!==(l=e(h,i))||g(f,h)<0^i>0){do j.point(0===k||3===k?a:c,k>1?d:b);while((k=(k+i+4)%4)!==l)}else j.point(h[0],h[1])}function k(e,f){return a<=e&&e<=c&&b<=f&&f<=d}function l(a,b){k(a,b)&&h.point(a,b)}function m(){D.point=o,q&&q.push(r=[]),y=!0,x=!1,v=w=NaN}function n(){p&&(o(s,t),u&&x&&B.rejoin(),p.push(B.buffer())),D.point=l,x&&h.lineEnd()}function o(a,b){a=Math.max(-Mh,Math.min(Mh,a)),b=Math.max(-Mh,Math.min(Mh,b));var c=k(a,b);if(q&&r.push([a,b]),y)s=a,t=b,u=c,y=!1,c&&(h.lineStart(),h.point(a,b));else if(c&&x)h.point(a,b);else{var d={a:{x:v,y:w},b:{x:a,y:b}};C(d)?(x||(h.lineStart(),h.point(d.a.x,d.a.y)),h.point(d.b.x,d.b.y),c||h.lineEnd(),z=!1):c&&(h.lineStart(),h.point(a,b),z=!1)}v=a,w=b,x=c}var p,q,r,s,t,u,v,w,x,y,z,A=h,B=Kb(),C=Rb(a,b,c,d),D={point:l,lineStart:m,lineEnd:n,polygonStart:function(){h=B,p=[],q=[],z=!0},polygonEnd:function(){h=A,p=ig.merge(p);var b=i([a,d]),c=z&&b,e=p.length;(c||e)&&(h.polygonStart(),c&&(h.lineStart(),j(null,null,1,h),h.lineEnd()),e&&Fb(p,f,b,j,h),h.polygonEnd()),p=q=r=null}};return D}}function Tb(a){var b=0,c=Lg/3,d=hc(a),e=d(b,c);return e.parallels=function(a){return arguments.length?d(b=a[0]*Lg/180,c=a[1]*Lg/180):[b/Lg*180,c/Lg*180]},e}function Ub(a,b){function c(a,b){var c=Math.sqrt(f-2*e*Math.sin(b))/e;return[c*Math.sin(a*=e),g-c*Math.cos(a)]}var d=Math.sin(a),e=(d+Math.sin(b))/2,f=1+d*(2*e-d),g=Math.sqrt(f)/e;return c.invert=function(a,b){var c=g-b;return[Math.atan2(a,c)/e,ca((f-(a*a+c*c)*e*e)/(2*e))]},c}function Vb(){function a(a,b){Oh+=e*a-d*b,d=a,e=b}var b,c,d,e;Th.point=function(f,g){Th.point=a,b=d=f,c=e=g},Th.lineEnd=function(){a(b,c)}}function Wb(a,b){aRh&&(Rh=a),bSh&&(Sh=b)}function Xb(){function a(a,b){g.push("M",a,",",b,f)}function b(a,b){g.push("M",a,",",b),h.point=c}function c(a,b){g.push("L",a,",",b)}function d(){h.point=a}function e(){g.push("Z")}var f=Yb(4.5),g=[],h={point:a,lineStart:function(){h.point=b},lineEnd:d,polygonStart:function(){h.lineEnd=e},polygonEnd:function(){h.lineEnd=d,h.point=a},pointRadius:function(a){return f=Yb(a),h},result:function(){if(g.length){var a=g.join("");return g=[],a}}};return h}function Yb(a){return"m0,"+a+"a"+a+","+a+" 0 1,1 0,"+-2*a+"a"+a+","+a+" 0 1,1 0,"+2*a+"z"}function Zb(a,b){Bh+=a,Ch+=b,++Dh}function $b(){function a(a,d){var e=a-b,f=d-c,g=Math.sqrt(e*e+f*f);Eh+=g*(b+a)/2,Fh+=g*(c+d)/2,Gh+=g,Zb(b=a,c=d)}var b,c;Vh.point=function(d,e){Vh.point=a,Zb(b=d,c=e)}}function _b(){Vh.point=Zb}function ac(){function a(a,b){var c=a-d,f=b-e,g=Math.sqrt(c*c+f*f);Eh+=g*(d+a)/2,Fh+=g*(e+b)/2,Gh+=g,g=e*a-d*b,Hh+=g*(d+a),Ih+=g*(e+b),Jh+=3*g,Zb(d=a,e=b)}var b,c,d,e;Vh.point=function(f,g){Vh.point=a,Zb(b=d=f,c=e=g)},Vh.lineEnd=function(){a(b,c)}}function bc(a){function b(b,c){a.moveTo(b+g,c),a.arc(b,c,g,0,Mg)}function c(b,c){a.moveTo(b,c),h.point=d}function d(b,c){a.lineTo(b,c)}function e(){h.point=b}function f(){a.closePath()}var g=4.5,h={point:b,lineStart:function(){h.point=c},lineEnd:e,polygonStart:function(){h.lineEnd=f},polygonEnd:function(){h.lineEnd=e,h.point=b},pointRadius:function(a){return g=a,h},result:w};return h}function cc(a){function b(a){return(h?d:c)(a)}function c(b){return fc(b,function(c,d){c=a(c,d),b.point(c[0],c[1])})}function d(b){function c(c,d){c=a(c,d),b.point(c[0],c[1])}function d(){t=NaN,y.point=f,b.lineStart()}function f(c,d){var f=qb([c,d]),g=a(c,d);e(t,u,s,v,w,x,t=g[0],u=g[1],s=c,v=f[0],w=f[1],x=f[2],h,b),b.point(t,u)}function g(){y.point=c,b.lineEnd()}function i(){d(),y.point=j,y.lineEnd=k}function j(a,b){f(l=a,m=b),n=t,o=u,p=v,q=w,r=x,y.point=f}function k(){e(t,u,s,v,w,x,n,o,l,p,q,r,h,b),y.lineEnd=g,g()}var l,m,n,o,p,q,r,s,t,u,v,w,x,y={point:c,lineStart:d,lineEnd:g,polygonStart:function(){b.polygonStart(),y.lineStart=i},polygonEnd:function(){b.polygonEnd(),y.lineStart=d}};return y}function e(b,c,d,h,i,j,k,l,m,n,o,p,q,r){var s=k-b,t=l-c,u=s*s+t*t;if(u>4*f&&q--){var v=h+n,w=i+o,x=j+p,y=Math.sqrt(v*v+w*w+x*x),z=Math.asin(x/=y),A=sg(sg(x)-1)f||sg((s*E+t*F)/u-.5)>.3||h*n+i*o+j*p0&&16,b):Math.sqrt(f)},b}function dc(a){var b=cc(function(b,c){return a([b*Qg,c*Qg])});return function(a){return ic(b(a))}}function ec(a){this.stream=a}function fc(a,b){return{point:b,sphere:function(){a.sphere()},lineStart:function(){a.lineStart()},lineEnd:function(){a.lineEnd()},polygonStart:function(){a.polygonStart()},polygonEnd:function(){a.polygonEnd()}}}function gc(a){return hc(function(){return a})()}function hc(a){function b(a){return a=h(a[0]*Pg,a[1]*Pg),[a[0]*m+i,j-a[1]*m]}function c(a){return a=h.invert((a[0]-i)/m,(j-a[1])/m),a&&[a[0]*Qg,a[1]*Qg]}function d(){h=Db(g=lc(r,s,u),f);var a=f(p,q);return i=n-a[0]*m,j=o+a[1]*m,e()}function e(){return k&&(k.valid=!1,k=null),b}var f,g,h,i,j,k,l=cc(function(a,b){return a=f(a,b),[a[0]*m+i,j-a[1]*m]}),m=150,n=480,o=250,p=0,q=0,r=0,s=0,u=0,v=Lh,w=t,x=null,y=null;return b.stream=function(a){return k&&(k.valid=!1),k=ic(v(g,l(w(a)))),k.valid=!0,k},b.clipAngle=function(a){return arguments.length?(v=null==a?(x=a,Lh):Qb((x=+a)*Pg),e()):x},b.clipExtent=function(a){return arguments.length?(y=a,w=a?Sb(a[0][0],a[0][1],a[1][0],a[1][1]):t,e()):y},b.scale=function(a){return arguments.length?(m=+a,d()):m},b.translate=function(a){return arguments.length?(n=+a[0],o=+a[1],d()):[n,o]},b.center=function(a){return arguments.length?(p=a[0]%360*Pg,q=a[1]%360*Pg,d()):[p*Qg,q*Qg]},b.rotate=function(a){return arguments.length?(r=a[0]%360*Pg,s=a[1]%360*Pg,u=a.length>2?a[2]%360*Pg:0,d()):[r*Qg,s*Qg,u*Qg]},ig.rebind(b,l,"precision"),function(){return f=a.apply(this,arguments),b.invert=f.invert&&c,d()}}function ic(a){return fc(a,function(b,c){a.point(b*Pg,c*Pg)})}function jc(a,b){return[a,b]}function kc(a,b){return[a>Lg?a-Mg:a<-Lg?a+Mg:a,b]}function lc(a,b,c){return a?b||c?Db(nc(a),oc(b,c)):nc(a):b||c?oc(b,c):kc}function mc(a){return function(b,c){return b+=a,[b>Lg?b-Mg:b<-Lg?b+Mg:b,c]}}function nc(a){var b=mc(a);return b.invert=mc(-a),b}function oc(a,b){function c(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*d+h*e;return[Math.atan2(i*f-k*g,h*d-j*e),ca(k*f+i*g)]}var d=Math.cos(a),e=Math.sin(a),f=Math.cos(b),g=Math.sin(b);return c.invert=function(a,b){var c=Math.cos(b),h=Math.cos(a)*c,i=Math.sin(a)*c,j=Math.sin(b),k=j*f-i*g;return[Math.atan2(i*f+j*g,h*d+k*e),ca(k*d-h*e)]},c}function pc(a,b){var c=Math.cos(a),d=Math.sin(a);return function(e,f,g,h){var i=g*b;null!=e?(e=qc(c,e),f=qc(c,f),(g>0?ef)&&(e+=g*Mg)):(e=a+g*Mg,f=a-.5*i);for(var j,k=e;g>0?k>f:k0?b<-Og+Jg&&(b=-Og+Jg):b>Og-Jg&&(b=Og-Jg);var c=g/Math.pow(e(b),f);return[c*Math.sin(f*a),g-c*Math.cos(f*a)]}var d=Math.cos(a),e=function(a){return Math.tan(Lg/4+a/2)},f=a===b?Math.sin(a):Math.log(d/Math.cos(b))/Math.log(e(b)/e(a)),g=d*Math.pow(e(a),f)/f;return f?(c.invert=function(a,b){var c=g-b,d=_(f)*Math.sqrt(a*a+c*c);return[Math.atan2(a,c)/f,2*Math.atan(Math.pow(g/d,1/f))-Og]},c):Ac}function zc(a,b){function c(a,b){var c=f-b;return[c*Math.sin(e*a),f-c*Math.cos(e*a)]}var d=Math.cos(a),e=a===b?Math.sin(a):(d-Math.cos(b))/(b-a),f=d/e+a;return sg(e)1&&aa(a[c[d-2]],a[c[d-1]],a[e])<=0;)--d;c[d++]=e}return c.slice(0,d)}function Gc(a,b){return a[0]-b[0]||a[1]-b[1]}function Hc(a,b,c){return(c[0]-b[0])*(a[1]-b[1])<(c[1]-b[1])*(a[0]-b[0])}function Ic(a,b,c,d){var e=a[0],f=c[0],g=b[0]-e,h=d[0]-f,i=a[1],j=c[1],k=b[1]-i,l=d[1]-j,m=(h*(i-j)-l*(e-f))/(l*g-h*k);return[e+m*g,i+m*k]}function Jc(a){var b=a[0],c=a[a.length-1];return!(b[0]-c[0]||b[1]-c[1])}function Kc(){dd(this),this.edge=this.site=this.circle=null}function Lc(a){var b=hi.pop()||new Kc;return b.site=a,b}function Mc(a){Wc(a),ei.remove(a),hi.push(a),dd(a)}function Nc(a){var b=a.circle,c=b.x,d=b.cy,e={x:c,y:d},f=a.P,g=a.N,h=[a];Mc(a);for(var i=f;i.circle&&sg(c-i.circle.x)Jg)h=h.L;else{if(e=f-Qc(h,g),!(e>Jg)){d>-Jg?(b=h.P,c=h):e>-Jg?(b=h,c=h.N):b=c=h;break}if(!h.R){b=h;break}h=h.R}var i=Lc(a);if(ei.insert(b,i),b||c){if(b===c)return Wc(b),c=Lc(b.site),ei.insert(i,c),i.edge=c.edge=$c(b.site,i.site),Vc(b),void Vc(c);if(!c)return void(i.edge=$c(b.site,i.site));Wc(b),Wc(c);var j=b.site,k=j.x,l=j.y,m=a.x-k,n=a.y-l,o=c.site,p=o.x-k,q=o.y-l,r=2*(m*q-n*p),s=m*m+n*n,t=p*p+q*q,u={x:(q*s-n*t)/r+k,y:(m*t-p*s)/r+l};ad(c.edge,j,o,u),i.edge=$c(j,a,null,u),c.edge=$c(a,o,null,u),Vc(b),Vc(c)}}function Pc(a,b){var c=a.site,d=c.x,e=c.y,f=e-b;if(!f)return d;var g=a.P;if(!g)return-(1/0);c=g.site;var h=c.x,i=c.y,j=i-b;if(!j)return h;var k=h-d,l=1/f-1/j,m=k/j;return l?(-m+Math.sqrt(m*m-2*l*(k*k/(-2*j)-i+j/2+e-f/2)))/l+d:(d+h)/2}function Qc(a,b){var c=a.N;if(c)return Pc(c,b);var d=a.site;return d.y===b?d.x:1/0}function Rc(a){this.site=a,this.edges=[]}function Sc(a){for(var b,c,d,e,f,g,h,i,j,k,l=a[0][0],m=a[1][0],n=a[0][1],o=a[1][1],p=di,q=p.length;q--;)if(f=p[q],f&&f.prepare())for(h=f.edges,i=h.length,g=0;gJg||sg(e-c)>Jg)&&(h.splice(g,0,new bd(_c(f.site,k,sg(d-l)Jg?{x:l,y:sg(b-l)Jg?{x:sg(c-o)Jg?{x:m,y:sg(b-m)Jg?{x:sg(c-n)=-Kg)){var n=i*i+j*j,o=k*k+l*l,p=(l*n-j*o)/m,q=(i*o-k*n)/m,l=q+h,r=ii.pop()||new Uc;r.arc=a,r.site=e,r.x=p+g,r.y=l+Math.sqrt(p*p+q*q),r.cy=l,a.circle=r;for(var s=null,t=gi._;t;)if(r.y=h)return;if(m>o){if(f){if(f.y>=j)return}else f={x:q,y:i};c={x:q,y:j}}else{if(f){if(f.y1)if(m>o){if(f){if(f.y>=j)return}else f={x:(i-e)/d,y:i};c={x:(j-e)/d,y:j}}else{if(f){if(f.y=h)return}else f={x:g,y:d*g+e};c={x:h,y:d*h+e}}else{if(f){if(f.xf||l>g||m=u,x=c>=v,y=x<<1|w,z=y+4;yf&&(e=b.slice(f,e),h[g]?h[g]+=e:h[++g]=e),(c=c[0])===(d=d[0])?h[g]?h[g]+=d:h[++g]=d:(h[++g]=null,i.push({i:g,x:rd(c,d)})),f=li.lastIndex;return f=0&&!(c=ig.interpolators[d](a,b)););return c}function ud(a,b){var c,d=[],e=[],f=a.length,g=b.length,h=Math.min(a.length,b.length);for(c=0;c=1?1:a(b)}}function wd(a){return function(b){return 1-a(1-b)}}function xd(a){return function(b){return.5*(b<.5?a(2*b):2-a(2-2*b))}}function yd(a){return a*a}function zd(a){return a*a*a}function Ad(a){if(a<=0)return 0;if(a>=1)return 1;var b=a*a,c=b*a;return 4*(a<.5?c:3*(a-b)+c-.75)}function Bd(a){return function(b){return Math.pow(b,a)}}function Cd(a){return 1-Math.cos(a*Og)}function Dd(a){return Math.pow(2,10*(a-1))}function Ed(a){return 1-Math.sqrt(1-a*a)}function Fd(a,b){var c;return arguments.length<2&&(b=.45),arguments.length?c=b/Mg*Math.asin(1/a):(a=1,c=b/4),function(d){return 1+a*Math.pow(2,-10*d)*Math.sin((d-c)*Mg/b)}}function Gd(a){return a||(a=1.70158),function(b){return b*b*((a+1)*b-a)}}function Hd(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+.9375:7.5625*(a-=2.625/2.75)*a+.984375}function Id(a,b){a=ig.hcl(a),b=ig.hcl(b);var c=a.h,d=a.c,e=a.l,f=b.h-c,g=b.c-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.c:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return la(c+f*a,d+g*a,e+h*a)+""}}function Jd(a,b){a=ig.hsl(a),b=ig.hsl(b);var c=a.h,d=a.s,e=a.l,f=b.h-c,g=b.s-d,h=b.l-e;return isNaN(g)&&(g=0,d=isNaN(d)?b.s:d),isNaN(f)?(f=0,c=isNaN(c)?b.h:c):f>180?f-=360:f<-180&&(f+=360),function(a){return ja(c+f*a,d+g*a,e+h*a)+""}}function Kd(a,b){a=ig.lab(a),b=ig.lab(b);var c=a.l,d=a.a,e=a.b,f=b.l-c,g=b.a-d,h=b.b-e;return function(a){return na(c+f*a,d+g*a,e+h*a)+""}}function Ld(a,b){return b-=a,function(c){return Math.round(a+b*c)}}function Md(a){var b=[a.a,a.b],c=[a.c,a.d],d=Od(b),e=Nd(b,c),f=Od(Pd(c,b,-e))||0;b[0]*c[1]180?b+=360:b-a>180&&(a+=360),d.push({i:c.push(Qd(c)+"rotate(",null,")")-2,x:rd(a,b)})):b&&c.push(Qd(c)+"rotate("+b+")")}function Td(a,b,c,d){a!==b?d.push({i:c.push(Qd(c)+"skewX(",null,")")-2,x:rd(a,b)}):b&&c.push(Qd(c)+"skewX("+b+")")}function Ud(a,b,c,d){if(a[0]!==b[0]||a[1]!==b[1]){var e=c.push(Qd(c)+"scale(",null,",",null,")");d.push({i:e-4,x:rd(a[0],b[0])},{i:e-2,x:rd(a[1],b[1])})}else 1===b[0]&&1===b[1]||c.push(Qd(c)+"scale("+b+")")}function Vd(a,b){var c=[],d=[];return a=ig.transform(a),b=ig.transform(b),Rd(a.translate,b.translate,c,d),Sd(a.rotate,b.rotate,c,d),Td(a.skew,b.skew,c,d),Ud(a.scale,b.scale,c,d),a=b=null,function(a){for(var b,e=-1,f=d.length;++e=0;)c.push(e[d])}function ge(a,b){for(var c=[a],d=[];null!=(a=c.pop());)if(d.push(a),(f=a.children)&&(e=f.length))for(var e,f,g=-1;++ge&&(d=c,e=b);return d}function re(a){return a.reduce(se,0)}function se(a,b){return a+b[1]}function te(a,b){return ue(a,Math.ceil(Math.log(b.length)/Math.LN2+1))}function ue(a,b){for(var c=-1,d=+a[0],e=(a[1]-d)/b,f=[];++c<=b;)f[c]=e*c+d;return f}function ve(a){return[ig.min(a),ig.max(a)]}function we(a,b){return a.value-b.value}function xe(a,b){var c=a._pack_next;a._pack_next=b,b._pack_prev=a,b._pack_next=c,c._pack_prev=b}function ye(a,b){a._pack_next=b,b._pack_prev=a}function ze(a,b){var c=b.x-a.x,d=b.y-a.y,e=a.r+b.r;return.999*e*e>c*c+d*d}function Ae(a){function b(a){k=Math.min(a.x-a.r,k),l=Math.max(a.x+a.r,l),m=Math.min(a.y-a.r,m),n=Math.max(a.y+a.r,n)}if((c=a.children)&&(j=c.length)){var c,d,e,f,g,h,i,j,k=1/0,l=-(1/0),m=1/0,n=-(1/0);if(c.forEach(Be),d=c[0],d.x=-d.r,d.y=0,b(d),j>1&&(e=c[1],e.x=e.r,e.y=0,b(e),j>2))for(f=c[2],Ee(d,e,f),b(f),xe(d,f),d._pack_prev=f,xe(f,e),e=d._pack_next,g=3;g=0;)b=e[f],b.z+=c,b.m+=c,c+=b.s+(d+=b.c)}function Ke(a,b,c){return a.a.parent===b.parent?a.a:c}function Le(a){return 1+ig.max(a,function(a){return a.y})}function Me(a){return a.reduce(function(a,b){return a+b.x},0)/a.length}function Ne(a){var b=a.children;return b&&b.length?Ne(b[0]):a}function Oe(a){var b,c=a.children;return c&&(b=c.length)?Oe(c[b-1]):a}function Pe(a){return{x:a.x,y:a.y,dx:a.dx,dy:a.dy}}function Qe(a,b){var c=a.x+b[3],d=a.y+b[0],e=a.dx-b[1]-b[3],f=a.dy-b[0]-b[2];return e<0&&(c+=e/2,e=0),f<0&&(d+=f/2,f=0),{x:c,y:d,dx:e,dy:f}}function Re(a){var b=a[0],c=a[a.length-1];return b2?We:Te,i=d?Xd:Wd;return g=e(a,b,i,c),h=e(b,a,i,td),f}function f(a){return g(a)}var g,h;return f.invert=function(a){return h(a)},f.domain=function(b){return arguments.length?(a=b.map(Number),e()):a},f.range=function(a){return arguments.length?(b=a,e()):b},f.rangeRound=function(a){return f.range(a).interpolate(Ld)},f.clamp=function(a){return arguments.length?(d=a,e()):d},f.interpolate=function(a){return arguments.length?(c=a,e()):c},f.ticks=function(b){return _e(a,b)},f.tickFormat=function(b,c){return af(a,b,c)},f.nice=function(b){return Ze(a,b),e()},f.copy=function(){return Xe(a,b,c,d)},e()}function Ye(a,b){return ig.rebind(a,b,"range","rangeRound","interpolate","clamp")}function Ze(a,b){return Ue(a,Ve($e(a,b)[2])),Ue(a,Ve($e(a,b)[2])),a}function $e(a,b){null==b&&(b=10);var c=Re(a),d=c[1]-c[0],e=Math.pow(10,Math.floor(Math.log(d/b)/Math.LN10)),f=b/d*e;return f<=.15?e*=10:f<=.35?e*=5:f<=.75&&(e*=2),c[0]=Math.ceil(c[0]/e)*e,c[1]=Math.floor(c[1]/e)*e+.5*e,c[2]=e,c}function _e(a,b){return ig.range.apply(ig,$e(a,b))}function af(a,b,c){var d=$e(a,b);if(c){var e=kh.exec(c);if(e.shift(),"s"===e[8]){var f=ig.formatPrefix(Math.max(sg(d[0]),sg(d[1])));return e[7]||(e[7]="."+bf(f.scale(d[2]))),e[8]="f",c=ig.format(e.join("")),function(a){return c(f.scale(a))+f.symbol}}e[7]||(e[7]="."+cf(e[8],d)),c=e.join("")}else c=",."+bf(d[2])+"f";return ig.format(c)}function bf(a){return-Math.floor(Math.log(a)/Math.LN10+.01)}function cf(a,b){var c=bf(b[2]);return a in xi?Math.abs(c-bf(Math.max(sg(b[0]),sg(b[1]))))+ +("e"!==a):c-2*("%"===a)}function df(a,b,c,d){function e(a){return(c?Math.log(a<0?0:a):-Math.log(a>0?0:-a))/Math.log(b)}function f(a){return c?Math.pow(b,a):-Math.pow(b,-a)}function g(b){return a(e(b))}return g.invert=function(b){return f(a.invert(b))},g.domain=function(b){return arguments.length?(c=b[0]>=0,a.domain((d=b.map(Number)).map(e)),g):d},g.base=function(c){return arguments.length?(b=+c,a.domain(d.map(e)),g):b},g.nice=function(){var b=Ue(d.map(e),c?Math:zi);return a.domain(b),d=b.map(f),g},g.ticks=function(){var a=Re(d),g=[],h=a[0],i=a[1],j=Math.floor(e(h)),k=Math.ceil(e(i)),l=b%1?2:b;if(isFinite(k-j)){if(c){for(;j0;m--)g.push(f(j)*m);for(j=0;g[j]i;k--);g=g.slice(j,k)}return g},g.tickFormat=function(a,c){if(!arguments.length)return yi;arguments.length<2?c=yi:"function"!=typeof c&&(c=ig.format(c));var d=Math.max(1,b*a/g.ticks().length);return function(a){var g=a/f(Math.round(e(a)));return g*b0?h[c-1]:a[0],c0?0:1}function tf(a,b,c,d,e){var f=a[0]-b[0],g=a[1]-b[1],h=(e?d:-d)/Math.sqrt(f*f+g*g),i=h*g,j=-h*f,k=a[0]+i,l=a[1]+j,m=b[0]+i,n=b[1]+j,o=(k+m)/2,p=(l+n)/2,q=m-k,r=n-l,s=q*q+r*r,t=c-d,u=k*n-m*l,v=(r<0?-1:1)*Math.sqrt(Math.max(0,t*t*s-u*u)),w=(u*r-q*v)/s,x=(-u*q-r*v)/s,y=(u*r+q*v)/s,z=(-u*q+r*v)/s,A=w-o,B=x-p,C=y-o,D=z-p;return A*A+B*B>C*C+D*D&&(w=y,x=z),[[w-i,x-j],[w*c/t,x*c/t]]}function uf(a){function b(b){function g(){j.push("M",f(a(k),h))}for(var i,j=[],k=[],l=-1,m=b.length,n=Ba(c),o=Ba(d);++l1?a.join("L"):a+"Z"}function wf(a){return a.join("L")+"Z"}function xf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b1&&e.push("H",d[0]),e.join("")}function yf(a){for(var b=0,c=a.length,d=a[0],e=[d[0],",",d[1]];++b1){h=b[1],f=a[i],i++,d+="C"+(e[0]+g[0])+","+(e[1]+g[1])+","+(f[0]-h[0])+","+(f[1]-h[1])+","+f[0]+","+f[1];for(var j=2;j9&&(e=3*b/Math.sqrt(e),g[h]=e*c,g[h+1]=e*d));for(h=-1;++h<=i;)e=(a[Math.min(i,h+1)][0]-a[Math.max(0,h-1)][0])/(6*(1+g[h]*g[h])),f.push([e||0,g[h]*e||0]);return f}function Of(a){return a.length<3?vf(a):a[0]+Df(a,Nf(a))}function Pf(a){for(var b,c,d,e=-1,f=a.length;++e0;)n[--h].call(a,g);if(f>=1)return p.event&&p.event.end.call(a,a.__data__,b),--o.count?delete o[d]:delete a[c],1}var i,j,l,m,n,o=a[c]||(a[c]={active:0,count:0}),p=o[d];p||(i=e.time,j=Ga(f,0,i),p=o[d]={tween:new k,time:i,timer:j,delay:e.delay,duration:e.duration,ease:e.ease,index:b},e=null,++o.count)}function bg(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate("+(isFinite(d)?d:c(a))+",0)"})}function cg(a,b,c){a.attr("transform",function(a){var d=b(a);return"translate(0,"+(isFinite(d)?d:c(a))+")"})}function dg(a){return a.toISOString()}function eg(a,b,c){function d(b){return a(b)}function e(a,c){var d=a[1]-a[0],e=d/c,f=ig.bisect(Yi,e);return f==Yi.length?[b.year,$e(a.map(function(a){return a/31536e6}),c)[2]]:f?b[e/Yi[f-1]1?{floor:function(b){for(;c(b=a.floor(b));)b=fg(b-1);return b},ceil:function(b){for(;c(b=a.ceil(b));)b=fg(+b+1);return b}}:a))},d.ticks=function(a,b){var c=Re(d.domain()),f=null==a?e(c,10):"number"==typeof a?e(c,a):!a.range&&[{range:a},b];return f&&(a=f[0],b=f[1]),a.range(c[0],fg(+c[1]+1),b<1?1:b)},d.tickFormat=function(){return c},d.copy=function(){return eg(a.copy(),b,c)},Ye(d,a)}function fg(a){return new Date(a)}function gg(a){return JSON.parse(a.responseText)}function hg(a){var b=lg.createRange();return b.selectNode(lg.body),b.createContextualFragment(a.responseText)}var ig={version:"3.5.17"},jg=[].slice,kg=function(a){return jg.call(a)},lg=this.document;if(lg)try{kg(lg.documentElement.childNodes)[0].nodeType}catch(a){kg=function(a){for(var b=a.length,c=new Array(b);b--;)c[b]=a[b];return c}}if(Date.now||(Date.now=function(){return+new Date}),lg)try{lg.createElement("DIV").style.setProperty("opacity",0,"")}catch(a){var mg=this.Element.prototype,ng=mg.setAttribute,og=mg.setAttributeNS,pg=this.CSSStyleDeclaration.prototype,qg=pg.setProperty;mg.setAttribute=function(a,b){ng.call(this,a,b+"")},mg.setAttributeNS=function(a,b,c){og.call(this,a,b,c+"")},pg.setProperty=function(a,b,c){qg.call(this,a,b+"",c)}}ig.ascending=d,ig.descending=function(a,b){return ba?1:b>=a?0:NaN},ig.min=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e=d){c=d;break}for(;++ed&&(c=d)}else{for(;++e=d){c=d;break}for(;++ed&&(c=d)}return c},ig.max=function(a,b){var c,d,e=-1,f=a.length;if(1===arguments.length){for(;++e=d){c=d;break}for(;++ec&&(c=d)}else{for(;++e=d){c=d;break}for(;++ec&&(c=d)}return c},ig.extent=function(a,b){var c,d,e,f=-1,g=a.length;if(1===arguments.length){for(;++f=d){c=e=d;break}for(;++fd&&(c=d),e=d){c=e=d;break}for(;++fd&&(c=d),e1)return i/(k-1)},ig.deviation=function(){var a=ig.variance.apply(this,arguments);return a?Math.sqrt(a):a};var rg=g(d);ig.bisectLeft=rg.left,ig.bisect=ig.bisectRight=rg.right,ig.bisector=function(a){return g(1===a.length?function(b,c){return d(a(b),c)}:a)},ig.shuffle=function(a,b,c){(f=arguments.length)<3&&(c=a.length,f<2&&(b=0));for(var d,e,f=c-b;f;)e=Math.random()*f--|0,d=a[f+b],a[f+b]=a[e+b],a[e+b]=d;return a},ig.permute=function(a,b){for(var c=b.length,d=new Array(c);c--;)d[c]=a[b[c]];return d},ig.pairs=function(a){for(var b,c=0,d=a.length-1,e=a[0],f=new Array(d<0?0:d);c=0;)for(d=a[e],b=d.length;--b>=0;)c[--g]=d[b];return c};var sg=Math.abs;ig.range=function(a,b,c){if(arguments.length<3&&(c=1,arguments.length<2&&(b=a,a=0)),(b-a)/c===1/0)throw new Error("infinite range");var d,e=[],f=i(sg(c)),g=-1;if(a*=f,b*=f,c*=f,c<0)for(;(d=a+c*++g)>b;)e.push(d/f);else for(;(d=a+c*++g)=f.length)return d?d.call(e,g):c?g.sort(c):g;for(var i,j,l,m,n=-1,o=g.length,p=f[h++],q=new k;++n=f.length)return a;var d=[],e=g[c++];return a.forEach(function(a,e){d.push({key:a,values:b(e,c)})}),e?d.sort(function(a,b){return e(a.key,b.key)}):d}var c,d,e={},f=[],g=[];return e.map=function(b,c){return a(c,b,0)},e.entries=function(c){return b(a(ig.map,c,0),0)},e.key=function(a){return f.push(a),e},e.sortKeys=function(a){return g[f.length-1]=a,e},e.sortValues=function(a){return c=a,e},e.rollup=function(a){return d=a,e},e},ig.set=function(a){var b=new s;if(a)for(var c=0,d=a.length;c=0&&(d=a.slice(c+1),a=a.slice(0,c)),a)return arguments.length<2?this[a].on(d):this[a].on(d,b);if(2===arguments.length){if(null==b)for(a in this)this.hasOwnProperty(a)&&this[a].on(d,null);return this}},ig.event=null,ig.requote=function(a){return a.replace(wg,"\\$&")};var wg=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,xg={}.__proto__?function(a,b){a.__proto__=b}:function(a,b){for(var c in b)a[c]=b[c]},yg=function(a,b){return b.querySelector(a)},zg=function(a,b){return b.querySelectorAll(a)},Ag=function(a,b){var c=a.matches||a[v(a,"matchesSelector")];return(Ag=function(a,b){return c.call(a,b)})(a,b)};"function"==typeof Sizzle&&(yg=function(a,b){return Sizzle(a,b)[0]||null},zg=Sizzle,Ag=Sizzle.matchesSelector),ig.selection=function(){return ig.select(lg.documentElement)};var Bg=ig.selection.prototype=[];Bg.select=function(a){var b,c,d,e,f=[];a=D(a);for(var g=-1,h=this.length;++g=0&&"xmlns"!==(c=a.slice(0,b))&&(a=a.slice(b+1)),Dg.hasOwnProperty(c)?{space:Dg[c],local:a}:a}},Bg.attr=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node();return a=ig.ns.qualify(a),a.local?c.getAttributeNS(a.space,a.local):c.getAttribute(a)}for(b in a)this.each(F(b,a[b]));return this}return this.each(F(a,b))},Bg.classed=function(a,b){if(arguments.length<2){if("string"==typeof a){var c=this.node(),d=(a=I(a)).length,e=-1;if(b=c.classList){for(;++e=0;)(c=d[e])&&(f&&f!==c.nextSibling&&f.parentNode.insertBefore(c,f),f=c);return this},Bg.sort=function(a){a=R.apply(this,arguments);for(var b=-1,c=this.length;++b0&&(b=b.transition().duration(D)),b.call(a.event)}function h(){v&&v.domain(u.range().map(function(a){return(a-y.x)/y.k}).map(u.invert)),x&&x.domain(w.range().map(function(a){return(a-y.y)/y.k}).map(w.invert))}function i(a){E++||a({type:"zoomstart"})}function j(a){h(),a({type:"zoom",scale:y.k,translate:[y.x,y.y]})}function k(a){--E||(a({type:"zoomend"}),q=null)}function l(){function a(){h=1,f(ig.mouse(e),m),j(g)}function d(){l.on(G,null).on(H,null),n(h),k(g)}var e=this,g=J.of(e,arguments),h=0,l=ig.select(c(e)).on(G,a).on(H,d),m=b(ig.mouse(e)),n=Y(e);Oi.call(e),i(g)}function m(){function a(){var a=ig.touches(o);return n=y.k,a.forEach(function(a){a.identifier in q&&(q[a.identifier]=b(a))}),a}function c(){var b=ig.event.target;ig.select(b).on(u,d).on(v,h),w.push(b);for(var c=ig.event.changedTouches,e=0,f=c.length;e1){var k=i[0],l=i[1],m=k[0]-l[0],n=k[1]-l[1];r=m*m+n*n}}function d(){var a,b,c,d,g=ig.touches(o);Oi.call(o);for(var h=0,i=g.length;h=j)return g;if(e)return e=!1,f;var b=k;if(34===a.charCodeAt(b)){for(var c=b;c++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,lh=ig.map({b:function(a){return a.toString(2)},c:function(a){return String.fromCharCode(a)},o:function(a){return a.toString(8)},x:function(a){return a.toString(16)},X:function(a){return a.toString(16).toUpperCase()},g:function(a,b){return a.toPrecision(b)},e:function(a,b){return a.toExponential(b)},f:function(a,b){return a.toFixed(b)},r:function(a,b){return(a=ig.round(a,Ka(a,b))).toFixed(Math.max(0,Math.min(20,Ka(a*(1+1e-15),b))))}}),mh=ig.time={},nh=Date;Oa.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){oh.setUTCDate.apply(this._,arguments)},setDay:function(){oh.setUTCDay.apply(this._,arguments)},setFullYear:function(){oh.setUTCFullYear.apply(this._,arguments)},setHours:function(){oh.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){oh.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){oh.setUTCMinutes.apply(this._,arguments)},setMonth:function(){oh.setUTCMonth.apply(this._,arguments)},setSeconds:function(){oh.setUTCSeconds.apply(this._,arguments)},setTime:function(){oh.setTime.apply(this._,arguments)}};var oh=Date.prototype;mh.year=Pa(function(a){return a=mh.day(a),a.setMonth(0,1),a},function(a,b){a.setFullYear(a.getFullYear()+b)},function(a){return a.getFullYear()}),mh.years=mh.year.range,mh.years.utc=mh.year.utc.range,mh.day=Pa(function(a){var b=new nh(2e3,0);return b.setFullYear(a.getFullYear(),a.getMonth(),a.getDate()),b},function(a,b){a.setDate(a.getDate()+b)},function(a){return a.getDate()-1}),mh.days=mh.day.range,mh.days.utc=mh.day.utc.range,mh.dayOfYear=function(a){var b=mh.year(a);return Math.floor((a-b-6e4*(a.getTimezoneOffset()-b.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(a,b){b=7-b;var c=mh[a]=Pa(function(a){return(a=mh.day(a)).setDate(a.getDate()-(a.getDay()+b)%7),a},function(a,b){a.setDate(a.getDate()+7*Math.floor(b))},function(a){var c=mh.year(a).getDay();return Math.floor((mh.dayOfYear(a)+(c+b)%7)/7)-(c!==b)});mh[a+"s"]=c.range,mh[a+"s"].utc=c.utc.range,mh[a+"OfYear"]=function(a){var c=mh.year(a).getDay();return Math.floor((mh.dayOfYear(a)+(c+b)%7)/7)}}),mh.week=mh.sunday,mh.weeks=mh.sunday.range,mh.weeks.utc=mh.sunday.utc.range,mh.weekOfYear=mh.sundayOfYear;var ph={"-":"",_:" ",0:"0"},qh=/^\s*\d+/,rh=/^%/;ig.locale=function(a){return{numberFormat:Ma(a),timeFormat:Ra(a)}};var sh=ig.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});ig.format=sh.numberFormat,ig.geo={},kb.prototype={s:0,t:0,add:function(a){lb(a,this.t,th),lb(th.s,this.s,this),this.s?this.t+=th.t:this.s=th.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var th=new kb;ig.geo.stream=function(a,b){a&&uh.hasOwnProperty(a.type)?uh[a.type](a,b):mb(a,b)};var uh={Feature:function(a,b){mb(a.geometry,b)},FeatureCollection:function(a,b){for(var c=a.features,d=-1,e=c.length;++dn&&(n=b)}function b(b,c){var d=qb([b*Pg,c*Pg]);if(r){var e=sb(r,d),f=[e[1],-e[0],0],g=sb(f,e);vb(g),g=wb(g);var i=b-o,j=i>0?1:-1,p=g[0]*Qg*j,q=sg(i)>180;if(q^(j*on&&(n=s)}else if(p=(p+360)%360-180,q^(j*on&&(n=c);q?bh(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b):m>=k?(bm&&(m=b)):b>o?h(k,b)>h(k,m)&&(m=b):h(b,m)>h(k,m)&&(k=b)}else a(b,c);r=d,o=b}function c(){v.point=b}function d(){u[0]=k,u[1]=m,v.point=a,r=null}function e(a,c){if(r){var d=a-o;s+=sg(d)>180?d+(d>0?360:-360):d}else p=a,q=c;yh.point(a,c),b(a,c)}function f(){yh.lineStart()}function g(){e(p,q),yh.lineEnd(),sg(s)>Jg&&(k=-(m=180)),u[0]=k,u[1]=m,r=null}function h(a,b){return(b-=a)<0?b+360:b}function i(a,b){return a[0]-b[0]}function j(a,b){return b[0]<=b[1]?b[0]<=a&&a<=b[1]:aJg?n=90:s<-Jg&&(l=-90),u[0]=k,u[1]=m}};return function(a){n=m=-(k=l=1/0),t=[],ig.geo.stream(a,v);var b=t.length;if(b){t.sort(i);for(var c,d=1,e=t[0],f=[e];dh(e[0],e[1])&&(e[1]=c[1]),h(c[0],e[1])>h(e[0],e[1])&&(e[0]=c[0])):f.push(e=c);for(var g,c,o=-(1/0),b=f.length-1,d=0,e=f[b];d<=b;e=c,++d)c=f[d],(g=h(e[1],c[0]))>o&&(o=g,k=c[0],m=e[1])}return t=u=null,k===1/0||l===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,l],[m,n]]}}(),ig.geo.centroid=function(a){zh=Ah=Bh=Ch=Dh=Eh=Fh=Gh=Hh=Ih=Jh=0,ig.geo.stream(a,Kh);var b=Hh,c=Ih,d=Jh,e=b*b+c*c+d*d;return e=.12&&e<.234&&d>=-.425&&d<-.214?g:e>=.166&&e<.234&&d>=-.214&&d<-.115?h:f).invert(a)},a.stream=function(a){var b=f.stream(a),c=g.stream(a),d=h.stream(a);return{point:function(a,e){b.point(a,e),c.point(a,e),d.point(a,e)},sphere:function(){b.sphere(),c.sphere(),d.sphere()},lineStart:function(){b.lineStart(),c.lineStart(),d.lineStart()},lineEnd:function(){b.lineEnd(),c.lineEnd(),d.lineEnd()},polygonStart:function(){b.polygonStart(),c.polygonStart(),d.polygonStart()},polygonEnd:function(){b.polygonEnd(),c.polygonEnd(),d.polygonEnd()}}},a.precision=function(b){return arguments.length?(f.precision(b),g.precision(b),h.precision(b),a):f.precision()},a.scale=function(b){return arguments.length?(f.scale(b),g.scale(.35*b),h.scale(b),a.translate(f.translate())):f.scale()},a.translate=function(b){if(!arguments.length)return f.translate();var j=f.scale(),k=+b[0],l=+b[1];return c=f.translate(b).clipExtent([[k-.455*j,l-.238*j],[k+.455*j,l+.238*j]]).stream(i).point,d=g.translate([k-.307*j,l+.201*j]).clipExtent([[k-.425*j+Jg,l+.12*j+Jg],[k-.214*j-Jg,l+.234*j-Jg]]).stream(i).point,e=h.translate([k-.205*j,l+.212*j]).clipExtent([[k-.214*j+Jg,l+.166*j+Jg],[k-.115*j-Jg,l+.234*j-Jg]]).stream(i).point,a},a.scale(1070)};var Nh,Oh,Ph,Qh,Rh,Sh,Th={point:w,lineStart:w,lineEnd:w,polygonStart:function(){Oh=0,Th.lineStart=Vb},polygonEnd:function(){Th.lineStart=Th.lineEnd=Th.point=w,Nh+=sg(Oh/2)}},Uh={point:Wb,lineStart:w,lineEnd:w,polygonStart:w,polygonEnd:w},Vh={point:Zb,lineStart:$b,lineEnd:_b,polygonStart:function(){Vh.lineStart=ac},polygonEnd:function(){Vh.point=Zb,Vh.lineStart=$b,Vh.lineEnd=_b}};ig.geo.path=function(){function a(a){return a&&("function"==typeof h&&f.pointRadius(+h.apply(this,arguments)),g&&g.valid||(g=e(f)),ig.geo.stream(a,g)),f.result()}function b(){return g=null,a}var c,d,e,f,g,h=4.5;return a.area=function(a){return Nh=0,ig.geo.stream(a,e(Th)),Nh},a.centroid=function(a){return Bh=Ch=Dh=Eh=Fh=Gh=Hh=Ih=Jh=0,ig.geo.stream(a,e(Vh)),Jh?[Hh/Jh,Ih/Jh]:Gh?[Eh/Gh,Fh/Gh]:Dh?[Bh/Dh,Ch/Dh]:[NaN,NaN]},a.bounds=function(a){return Rh=Sh=-(Ph=Qh=1/0),ig.geo.stream(a,e(Uh)),[[Ph,Qh],[Rh,Sh]]},a.projection=function(a){return arguments.length?(e=(c=a)?a.stream||dc(a):t,b()):c},a.context=function(a){return arguments.length?(f=null==(d=a)?new Xb:new bc(a),"function"!=typeof h&&f.pointRadius(h),b()):d},a.pointRadius=function(b){return arguments.length?(h="function"==typeof b?b:(f.pointRadius(+b),+b),a):h},a.projection(ig.geo.albersUsa()).context(null)},ig.geo.transform=function(a){return{stream:function(b){var c=new ec(b);for(var d in a)c[d]=a[d];return c}}},ec.prototype={point:function(a,b){this.stream.point(a,b)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ig.geo.projection=gc,ig.geo.projectionMutator=hc,(ig.geo.equirectangular=function(){return gc(jc)}).raw=jc.invert=jc,ig.geo.rotation=function(a){function b(b){return b=a(b[0]*Pg,b[1]*Pg),b[0]*=Qg,b[1]*=Qg,b}return a=lc(a[0]%360*Pg,a[1]*Pg,a.length>2?a[2]*Pg:0),b.invert=function(b){return b=a.invert(b[0]*Pg,b[1]*Pg),b[0]*=Qg,b[1]*=Qg,b},b},kc.invert=jc,ig.geo.circle=function(){function a(){var a="function"==typeof d?d.apply(this,arguments):d,b=lc(-a[0]*Pg,-a[1]*Pg,0).invert,e=[];return c(null,null,1,{point:function(a,c){e.push(a=b(a,c)),a[0]*=Qg,a[1]*=Qg}}),{type:"Polygon",coordinates:[e]}}var b,c,d=[0,0],e=6;return a.origin=function(b){return arguments.length?(d=b,a):d},a.angle=function(d){return arguments.length?(c=pc((b=+d)*Pg,e*Pg),a):b},a.precision=function(d){return arguments.length?(c=pc(b*Pg,(e=+d)*Pg),a):e},a.angle(90)},ig.geo.distance=function(a,b){var c,d=(b[0]-a[0])*Pg,e=a[1]*Pg,f=b[1]*Pg,g=Math.sin(d),h=Math.cos(d),i=Math.sin(e),j=Math.cos(e),k=Math.sin(f),l=Math.cos(f);return Math.atan2(Math.sqrt((c=l*g)*c+(c=j*k-i*l*h)*c),i*k+j*l*h)},ig.geo.graticule=function(){function a(){return{type:"MultiLineString",coordinates:b()}}function b(){return ig.range(Math.ceil(f/q)*q,e,q).map(m).concat(ig.range(Math.ceil(j/r)*r,i,r).map(n)).concat(ig.range(Math.ceil(d/o)*o,c,o).filter(function(a){return sg(a%q)>Jg}).map(k)).concat(ig.range(Math.ceil(h/p)*p,g,p).filter(function(a){return sg(a%r)>Jg}).map(l))}var c,d,e,f,g,h,i,j,k,l,m,n,o=10,p=o,q=90,r=360,s=2.5;return a.lines=function(){return b().map(function(a){return{type:"LineString",coordinates:a}})},a.outline=function(){return{type:"Polygon",coordinates:[m(f).concat(n(i).slice(1),m(e).reverse().slice(1),n(j).reverse().slice(1))]}},a.extent=function(b){return arguments.length?a.majorExtent(b).minorExtent(b):a.minorExtent()},a.majorExtent=function(b){return arguments.length?(f=+b[0][0],e=+b[1][0],j=+b[0][1],i=+b[1][1],f>e&&(b=f,f=e,e=b),j>i&&(b=j,j=i,i=b),a.precision(s)):[[f,j],[e,i]]},a.minorExtent=function(b){return arguments.length?(d=+b[0][0],c=+b[1][0],h=+b[0][1],g=+b[1][1],d>c&&(b=d,d=c,c=b),h>g&&(b=h,h=g,g=b),a.precision(s)):[[d,h],[c,g]]},a.step=function(b){return arguments.length?a.majorStep(b).minorStep(b):a.minorStep()},a.majorStep=function(b){return arguments.length?(q=+b[0],r=+b[1],a):[q,r]},a.minorStep=function(b){return arguments.length?(o=+b[0],p=+b[1],a):[o,p]},a.precision=function(b){return arguments.length?(s=+b,k=rc(h,g,90),l=sc(d,c,s),m=rc(j,i,90),n=sc(f,e,s),a):s},a.majorExtent([[-180,-90+Jg],[180,90-Jg]]).minorExtent([[-180,-80-Jg],[180,80+Jg]])},ig.geo.greatArc=function(){function a(){return{type:"LineString",coordinates:[b||d.apply(this,arguments),c||e.apply(this,arguments)]}}var b,c,d=tc,e=uc;return a.distance=function(){return ig.geo.distance(b||d.apply(this,arguments),c||e.apply(this,arguments))},a.source=function(c){return arguments.length?(d=c,b="function"==typeof c?null:c,a):d},a.target=function(b){return arguments.length?(e=b,c="function"==typeof b?null:b,a):e},a.precision=function(){return arguments.length?a:0},a},ig.geo.interpolate=function(a,b){return vc(a[0]*Pg,a[1]*Pg,b[0]*Pg,b[1]*Pg)},ig.geo.length=function(a){return Wh=0,ig.geo.stream(a,Xh),Wh};var Wh,Xh={sphere:w,point:w,lineStart:wc,lineEnd:w,polygonStart:w,polygonEnd:w},Yh=xc(function(a){return Math.sqrt(2/(1+a))},function(a){return 2*Math.asin(a/2)});(ig.geo.azimuthalEqualArea=function(){return gc(Yh)}).raw=Yh;var Zh=xc(function(a){var b=Math.acos(a);return b&&b/Math.sin(b)},t);(ig.geo.azimuthalEquidistant=function(){return gc(Zh)}).raw=Zh,(ig.geo.conicConformal=function(){return Tb(yc)}).raw=yc,(ig.geo.conicEquidistant=function(){return Tb(zc)}).raw=zc;var $h=xc(function(a){return 1/a},Math.atan);(ig.geo.gnomonic=function(){return gc($h)}).raw=$h,Ac.invert=function(a,b){return[a,2*Math.atan(Math.exp(b))-Og]},(ig.geo.mercator=function(){return Bc(Ac)}).raw=Ac;var _h=xc(function(){return 1},Math.asin);(ig.geo.orthographic=function(){return gc(_h)}).raw=_h;var ai=xc(function(a){return 1/(1+a)},function(a){return 2*Math.atan(a)});(ig.geo.stereographic=function(){return gc(ai)}).raw=ai,Cc.invert=function(a,b){return[-b,2*Math.atan(Math.exp(a))-Og]},(ig.geo.transverseMercator=function(){var a=Bc(Cc),b=a.center,c=a.rotate;return a.center=function(a){return a?b([-a[1],a[0]]):(a=b(),[a[1],-a[0]])},a.rotate=function(a){return a?c([a[0],a[1],a.length>2?a[2]+90:90]):(a=c(),[a[0],a[1],a[2]-90])},c([0,0,90])}).raw=Cc,ig.geom={},ig.geom.hull=function(a){function b(a){if(a.length<3)return[];var b,e=Ba(c),f=Ba(d),g=a.length,h=[],i=[];for(b=0;b=0;--b)n.push(a[h[j[b]][2]]);for(b=+l;b=d&&j.x<=f&&j.y>=e&&j.y<=g?[[d,g],[f,g],[f,e],[d,e]]:[];k.point=a[h]}),b}function c(a){return a.map(function(a,b){return{x:Math.round(f(a,b)/Jg)*Jg,y:Math.round(g(a,b)/Jg)*Jg,i:b}})}var d=Dc,e=Ec,f=d,g=e,h=ji;return a?b(a):(b.links=function(a){return hd(c(a)).edges.filter(function(a){return a.l&&a.r}).map(function(b){return{source:a[b.l.i],target:a[b.r.i]}})},b.triangles=function(a){var b=[];return hd(c(a)).cells.forEach(function(c,d){for(var e,f,g=c.site,h=c.edges.sort(Tc),i=-1,j=h.length,k=h[j-1].edge,l=k.l===g?k.r:k.l;++i=j,m=d>=k,n=m<<1|l;a.leaf=!1,a=a.nodes[n]||(a.nodes[n]=md()),l?e=j:h=j,m?g=k:i=k,f(a,b,c,d,e,g,h,i)}var k,l,m,n,o,p,q,r,s,t=Ba(h),u=Ba(i);if(null!=b)p=b,q=c,r=d,s=e;else if(r=s=-(p=q=1/0),l=[],m=[],o=a.length,g)for(n=0;nr&&(r=k.x),k.y>s&&(s=k.y),l.push(k.x),m.push(k.y);else for(n=0;nr&&(r=v),w>s&&(s=w),l.push(v),m.push(w)}var x=r-p,y=s-q;x>y?s=q+x:r=p+y;var z=md();if(z.add=function(a){f(z,a,+t(a,++n),+u(a,n),p,q,r,s)},z.visit=function(a){nd(a,z,p,q,r,s)},z.find=function(a){return od(z,a[0],a[1],p,q,r,s)},n=-1,null==b){for(;++n=0?a.slice(0,b):a,d=b>=0?a.slice(b+1):"in";return c=ni.get(c)||mi,d=oi.get(d)||t,vd(d(c.apply(null,jg.call(arguments,1))))},ig.interpolateHcl=Id,ig.interpolateHsl=Jd,ig.interpolateLab=Kd,ig.interpolateRound=Ld,ig.transform=function(a){var b=lg.createElementNS(ig.ns.prefix.svg,"g");return(ig.transform=function(a){if(null!=a){b.setAttribute("transform",a);var c=b.transform.baseVal.consolidate()}return new Md(c?c.matrix:pi)})(a)},Md.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var pi={a:1,b:0,c:0,d:1,e:0,f:0};ig.interpolateTransform=Vd,ig.layout={},ig.layout.bundle=function(){return function(a){for(var b=[],c=-1,d=a.length;++c0?e=a:(c.c=null,c.t=NaN,c=null,j.end({type:"end",alpha:e=0})):a>0&&(j.start({type:"start",alpha:e=a}),c=Ga(i.tick)),i):e},i.start=function(){function a(a,d){if(!c){for(c=new Array(e),i=0;i=0;)g.push(k=j[i]),k.parent=f,k.depth=f.depth+1;d&&(f.value=0),f.children=j}else d&&(f.value=+d.call(a,f,f.depth)||0),delete f.children;return ge(e,function(a){var c,e;b&&(c=a.children)&&c.sort(b),d&&(e=a.parent)&&(e.value+=a.value)}),h}var b=je,c=he,d=ie;return a.sort=function(c){return arguments.length?(b=c,a):b},a.children=function(b){return arguments.length?(c=b,a):c},a.value=function(b){return arguments.length?(d=b,a):d},a.revalue=function(b){return d&&(fe(b,function(a){a.children&&(a.value=0)}),ge(b,function(b){var c;b.children||(b.value=+d.call(a,b,b.depth)||0),(c=b.parent)&&(c.value+=b.value)})),b},a},ig.layout.partition=function(){function a(b,c,d,e){var f=b.children;if(b.x=c,b.y=b.depth*e,b.dx=d,b.dy=e,f&&(g=f.length)){var g,h,i,j=-1;for(d=b.value?d/b.value:0;++jh&&(h=d),g.push(d)}for(c=0;c0)for(f=-1;++f=k[0]&&h<=k[1]&&(g=i[ig.bisect(l,h,1,n)-1],g.y+=o,g.push(a[f]));return i}var b=!0,c=Number,d=ve,e=te;return a.value=function(b){return arguments.length?(c=b,a):c},a.range=function(b){return arguments.length?(d=Ba(b),a):d},a.bins=function(b){return arguments.length?(e="number"==typeof b?function(a){return ue(a,b)}:Ba(b),a):e},a.frequency=function(c){return arguments.length?(b=!!c,a):b},a},ig.layout.pack=function(){function a(a,f){var g=c.call(this,a,f),h=g[0],i=e[0],j=e[1],k=null==b?Math.sqrt:"function"==typeof b?b:function(){return b};if(h.x=h.y=0,ge(h,function(a){a.r=+k(a.value)}),ge(h,Ae),d){var l=d*(b?1:Math.max(2*h.r/i,2*h.r/j))/2;ge(h,function(a){a.r+=l}),ge(h,Ae),ge(h,function(a){a.r-=l})}return De(h,i/2,j/2,b?1:1/Math.max(2*h.r/i,2*h.r/j)),g}var b,c=ig.layout.hierarchy().sort(we),d=0,e=[1,1];return a.size=function(b){return arguments.length?(e=b,a):e},a.radius=function(c){return arguments.length?(b=null==c||"function"==typeof c?c:+c,a):b},a.padding=function(b){return arguments.length?(d=+b,a):d},ee(a,c)},ig.layout.tree=function(){function a(a,e){var k=g.call(this,a,e),l=k[0],m=b(l);if(ge(m,c),m.parent.m=-m.z,fe(m,d),j)fe(l,f);else{var n=l,o=l,p=l;fe(l,function(a){a.xo.x&&(o=a),a.depth>p.depth&&(p=a)});var q=h(n,o)/2-n.x,r=i[0]/(o.x+h(o,n)/2+q),s=i[1]/(p.depth||1);fe(l,function(a){a.x=(a.x+q)*r,a.y=a.depth*s})}return k}function b(a){for(var b,c={A:null,children:[a]},d=[c];null!=(b=d.pop());)for(var e,f=b.children,g=0,h=f.length;g0&&(Ie(Ke(g,a,c),a,d),j+=d,k+=d),l+=g.m,j+=e.m,m+=i.m,k+=f.m;g&&!He(f)&&(f.t=g,f.m+=l-k),e&&!Ge(i)&&(i.t=e,i.m+=j-m,c=a)}return c}function f(a){a.x*=i[0],a.y=a.depth*i[1]}var g=ig.layout.hierarchy().sort(null).value(null),h=Fe,i=[1,1],j=null;return a.separation=function(b){return arguments.length?(h=b,a):h},a.size=function(b){return arguments.length?(j=null==(i=b)?f:null,a):j?null:i},a.nodeSize=function(b){return arguments.length?(j=null==(i=b)?null:f,a):j?i:null},ee(a,g)},ig.layout.cluster=function(){function a(a,f){var g,h=b.call(this,a,f),i=h[0],j=0;ge(i,function(a){var b=a.children;b&&b.length?(a.x=Me(b),a.y=Le(b)):(a.x=g?j+=c(a,g):0,a.y=0,g=a)});var k=Ne(i),l=Oe(i),m=k.x-c(k,l)/2,n=l.x+c(l,k)/2;return ge(i,e?function(a){a.x=(a.x-i.x)*d[0],a.y=(i.y-a.y)*d[1]}:function(a){a.x=(a.x-m)/(n-m)*d[0],a.y=(1-(i.y?a.y/i.y:1))*d[1]}),h}var b=ig.layout.hierarchy().sort(null).value(null),c=Fe,d=[1,1],e=!1;return a.separation=function(b){return arguments.length?(c=b,a):c},a.size=function(b){return arguments.length?(e=null==(d=b),a):e?null:d},a.nodeSize=function(b){return arguments.length?(e=null!=(d=b),a):e?d:null},ee(a,b)},ig.layout.treemap=function(){function a(a,b){for(var c,d,e=-1,f=a.length;++e0;)k.push(g=m[i-1]),k.area+=g.area,"squarify"!==n||(h=d(k,p))<=o?(m.pop(),o=h):(k.area-=k.pop().area,e(k,p,j,!1),p=Math.min(j.dx,j.dy),k.length=k.area=0,o=1/0);k.length&&(e(k,p,j,!0),k.length=k.area=0),f.forEach(b)}}function c(b){var d=b.children;if(d&&d.length){var f,g=l(b),h=d.slice(),i=[];for(a(h,g.dx*g.dy/b.value),i.area=0;f=h.pop();)i.push(f),i.area+=f.area,null!=f.z&&(e(i,f.z?g.dx:g.dy,g,!h.length),i.length=i.area=0);d.forEach(c)}}function d(a,b){for(var c,d=a.area,e=0,f=1/0,g=-1,h=a.length;++ge&&(e=c));return d*=d,b*=b,d?Math.max(b*e*o/d,d/(b*f*o)):1/0}function e(a,b,c,d){var e,f=-1,g=a.length,h=c.x,j=c.y,k=b?i(a.area/b):0;if(b==c.dx){for((d||k>c.dy)&&(k=c.dy);++fc.dx)&&(k=c.dx);++f1);return a+b*c*Math.sqrt(-2*Math.log(e)/e)}},logNormal:function(){var a=ig.random.normal.apply(ig,arguments);return function(){return Math.exp(a())}},bates:function(a){var b=ig.random.irwinHall(a);return function(){return b()/a}},irwinHall:function(a){return function(){for(var b=0,c=0;cl?0:1;if(j=Ng)return b(j,n)+(a?b(a,1-n):"")+"Z";var o,p,q,r,s,t,u,v,w,x,y,z,A=0,B=0,C=[];if((r=(+i.apply(this,arguments)||0)/2)&&(q=f===Ei?Math.sqrt(a*a+j*j):+f.apply(this,arguments),n||(B*=-1),j&&(B=ca(q/j*Math.sin(r))),a&&(A=ca(q/a*Math.sin(r)))),j){s=j*Math.cos(k+B),t=j*Math.sin(k+B),u=j*Math.cos(l-B),v=j*Math.sin(l-B);var D=Math.abs(l-k-2*B)<=Lg?0:1;if(B&&sf(s,t,u,v)===n^D){var E=(k+l)/2;s=j*Math.cos(E),t=j*Math.sin(E),u=v=null}}else s=t=0;if(a){w=a*Math.cos(l-A),x=a*Math.sin(l-A),y=a*Math.cos(k+A),z=a*Math.sin(k+A);var F=Math.abs(k-l+2*A)<=Lg?0:1;if(A&&sf(w,x,y,z)===1-n^F){var G=(k+l)/2;w=a*Math.cos(G),x=a*Math.sin(G),y=z=null}}else w=x=0;if(m>Jg&&(o=Math.min(Math.abs(j-a)/2,+e.apply(this,arguments)))>.001){p=aLg)+",1 "+b}function e(a,b,c,d){return"Q 0,0 "+d}var f=tc,g=uc,h=Rf,i=pf,j=qf;return a.radius=function(b){return arguments.length?(h=Ba(b),a):h},a.source=function(b){return arguments.length?(f=Ba(b),a):f},a.target=function(b){return arguments.length?(g=Ba(b),a):g},a.startAngle=function(b){return arguments.length?(i=Ba(b),a):i},a.endAngle=function(b){return arguments.length?(j=Ba(b),a):j},a},ig.svg.diagonal=function(){function a(a,e){var f=b.call(this,a,e),g=c.call(this,a,e),h=(f.y+g.y)/2,i=[f,{x:f.x,y:h},{x:g.x,y:h},g];return i=i.map(d),"M"+i[0]+"C"+i[1]+" "+i[2]+" "+i[3]}var b=tc,c=uc,d=Sf;return a.source=function(c){return arguments.length?(b=Ba(c),a):b},a.target=function(b){return arguments.length?(c=Ba(b),a):c},a.projection=function(b){return arguments.length?(d=b,a):d},a},ig.svg.diagonal.radial=function(){var a=ig.svg.diagonal(),b=Sf,c=a.projection;return a.projection=function(a){return arguments.length?c(Tf(b=a)):b},a},ig.svg.symbol=function(){function a(a,d){return(Ji.get(b.call(this,a,d))||Wf)(c.call(this,a,d))}var b=Vf,c=Uf;return a.type=function(c){return arguments.length?(b=Ba(c),a):b},a.size=function(b){return arguments.length?(c=Ba(b),a):c},a};var Ji=ig.map({circle:Wf,cross:function(a){var b=Math.sqrt(a/5)/2;return"M"+-3*b+","+-b+"H"+-b+"V"+-3*b+"H"+b+"V"+-b+"H"+3*b+"V"+b+"H"+b+"V"+3*b+"H"+-b+"V"+b+"H"+-3*b+"Z"},diamond:function(a){var b=Math.sqrt(a/(2*Li)),c=b*Li;return"M0,"+-b+"L"+c+",0 0,"+b+" "+-c+",0Z"},square:function(a){var b=Math.sqrt(a)/2;return"M"+-b+","+-b+"L"+b+","+-b+" "+b+","+b+" "+-b+","+b+"Z"},"triangle-down":function(a){var b=Math.sqrt(a/Ki),c=b*Ki/2;return"M0,"+c+"L"+b+","+-c+" "+-b+","+-c+"Z"},"triangle-up":function(a){var b=Math.sqrt(a/Ki),c=b*Ki/2;return"M0,"+-c+"L"+b+","+c+" "+-b+","+c+"Z"}});ig.svg.symbolTypes=Ji.keys();var Ki=Math.sqrt(3),Li=Math.tan(30*Pg);Bg.transition=function(a){for(var b,c,d=Mi||++Qi,e=_f(a),f=[],g=Ni||{time:Date.now(),ease:Ad,delay:0,duration:250},h=-1,i=this.length;++hrect,.s>rect").attr("width",l[1]-l[0])}function e(a){a.select(".extent").attr("y",m[0]),a.selectAll(".extent,.e>rect,.w>rect").attr("height",m[1]-m[0])}function f(){function f(){32==ig.event.keyCode&&(D||(t=null,F[0]-=l[1],F[1]-=m[1],D=2),z())}function p(){32==ig.event.keyCode&&2==D&&(F[0]+=l[1],F[1]+=m[1],D=0,z())}function q(){var a=ig.mouse(v),c=!1;u&&(a[0]+=u[0],a[1]+=u[1]),D||(ig.event.altKey?(t||(t=[(l[0]+l[1])/2,(m[0]+m[1])/2]),F[0]=l[+(a[0]":"⇢","^":"⇡","<":"⇠",v:"⇣","-":"↔","|":"↕"},m=function(a){return""+l[a[0]]+l[a[1]]},n=[">-",">|","^-","^|","<-","<|","v-","v|"],o=[">-","^-","<-","v-",">|","^|","<|","v|"],p=function(){function a(b,c){var d=this,f=arguments.length<=2||void 0===arguments[2]?200:arguments[2];g(this,a),this.g=b.append("g").attr("class","transition-heatmap").on("click",function(){return d.toggleBasis()}),this.tooltip=new e(c),this.size=f,this.basis=n}return f(a,[{key:"updateFromTensor",value:function(a){var c=this,d=this.basis.map(function(b){return c.basis.map(function(c){var d=a.get(c).get(b)||{re:0,im:0};return{from:c,to:b,re:d.re,im:d.im}})});this.update(this.basis,b.flatten(d))}},{key:"toggleBasis",value:function(){this.basis===n?this.basis=o:this.basis=n,this.update(this.basis)}},{key:"update",value:function(a){var e=this,f=arguments.length<=1||void 0===arguments[1]?null:arguments[1],g=b.fromPairs(a.map(function(a,b){return[a,b]})),l=h.scale.linear().domain([-1,a.length]).range([0,this.size]),n=l(1)-l(0);this.labelIn=this.g.selectAll(".label-in").data(a,function(a){return a}),this.labelIn.enter().append("text").attr("class","label-in"),this.labelIn.attr("y",l(-.5)).style("text-anchor","middle").text(m).transition().duration(i).attr("x",function(a,b){return l(b+.5)}).attr("dy","0.5em"),this.labelIn.exit().remove(),this.labelOut=this.g.selectAll(".label-out").data(a,function(a){return a}),this.labelOut.enter().append("text").attr("class","label-out"),this.labelOut.attr("x",l(-.5)).style("text-anchor","middle").text(m).transition().duration(i).attr("y",function(a,b){return l(b+.5)}).attr("dy","0.5em"),this.labelOut.exit().remove(),null!=f&&(this.matrixElement=this.g.selectAll(".matrix-element").data(f,function(a){return a.from+" "+a.to}),this.matrixElement.enter().append("rect").attr("class","matrix-element").on("mouseover",function(a){var b=Math.sqrt(a.re*a.re+a.im*a.im),f=Math.atan2(a.im,a.re)/c,g=a.im>=0?"+":"-";b>d&&e.tooltip.show(a.re.toFixed(3)+" "+g+" "+Math.abs(a.im).toFixed(3)+" i
\n = "+b.toFixed(3)+" exp("+f.toFixed(3)+" i τ)")}).on("mouseout",function(){return e.tooltip.out()})),this.matrixElement.attr("width",n-1).attr("height",n-1).style("fill",j).style("fill-opacity",k).transition().duration(i).attr("y",function(a){return l(g[a.to])+.5}).attr("x",function(a){return l(g[a.from])+.5}),this.matrixElement.exit().remove()}}]),a}(),a("TransitionHeatmap",p)}}}),a.register("86",["15","16","29","85","e","f","a","b","c"],function(a){var b,c,d,e,f,g,h,i,j,k;return{setters:[function(a){b=a.default},function(a){c=a.default},function(a){d=a.View},function(a){e=a.TransitionHeatmap},function(a){f=a.default},function(a){g=a.default},function(a){h=a.default},function(a){i=a},function(a){j=a.tileSize}],execute:function(){"use strict";k=function(a){function d(){g(this,d),b(Object.getPrototypeOf(d.prototype),"constructor",this).apply(this,arguments)}return c(d,a),f(d,[{key:"initialize",value:function(){this.bindMenuEvents()}},{key:"resetContent",value:function(){if(this.game.currentEncyclopediaItem){var a=i[this.game.currentEncyclopediaItem],b=h.select(".encyclopedia-item__container > article");b.html(null),this.createBasicInfo(b,a),this.createTransitions(b,a),this.createHowItWorks(b,a),this.createUsage(b,a)}}},{key:"createBasicInfo",value:function(a,b){a.append("h1").attr("id","encyclopedia-item__basic-info").text("Basic info"),a.append("svg").attr("class","big-tile").attr("viewBox","0 0 100 100").append("use").attr("xlink:href","#"+b.svgName).attr("transform","translate(50, 50)"),a.append("h4").text(b.desc.name),a.append("div").classed("content",!0).text(b.desc.summary),b.desc.flavour&&a.append("div").classed("content",!0).append("i").text('"'+b.desc.flavour+'"')}},{key:"createTransitions",value:function(a,b){a.append("h1").attr("id","encyclopedia-item__transitions").text("Transitions"),a.append("p").classed("encyclopedia-item__hint",!0).text("Click on heatmap to change its ordering (direction, polarization).");var c=150,d=50,f=a.append("div").attr("class","content content--heatmap"),g=f.append("svg").attr("viewBox","0 0 "+(c+d)+" "+c).attr("preserveAspectRatio","xMidYMid meet").attr("class","content heatmap"),h=new i.Tile(b),k=new e(g,f,c);k.updateFromTensor(h.transitionAmplitudes.map),g.append("text").attr("class","hm-element-rotation-hint").attr("x",c+d/2).attr("y",c-d).style("font-size","8px").style("text-anchor","middle").text("click to rotate"),h.g=g.append("g").attr("transform","translate("+c+","+(c-d)+")scale("+d/j+")translate("+j/2+","+j/2+")"),h.draw(),g.append("rect").attr("class","helper-hitbox").attr("x",c).attr("y",c-1.5*d).attr("width",d).attr("height",1.5*d).attr("rx",10).attr("ry",10).on("click",function(){h.rotate(),k.updateFromTensor(h.transitionAmplitudes.map)})}},{key:"createHowItWorks",value:function(a,b){}},{key:"createUsage",value:function(a,b){}},{key:"bindMenuEvents",value:function(){var a=this;h.select(".bottom-bar__back-to-encyclopedia-selector-button").on("click",function(){a.game.setView("encyclopediaSelector")});var b=h.selectAll(".encyclopedia-item__menu li button");b.on("click",function(){var a=h.select(".encyclopedia-item__container > article"),b=this.getAttribute("encyclopedia-nav"),c="encyclopedia-item__"+b,d=window.document.getElementById(c);d&&(a[0][0].scrollTop=d.offsetTop)})}},{key:"title",get:function(){return i[this.game.currentEncyclopediaItem].desc.name}},{key:"className",get:function(){return"view--encyclopedia-item"}}]),d}(d),a("EncyclopediaItemView",k)}}}),a.register("87",["9","24","25","26","27","28","86","e","f","a","1c","2e","2f"],function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o;return{setters:[function(a){b=a.default},function(a){c=a.GameBoard},function(a){d=a},function(a){e=a.PopupManager},function(a){f=a.Storage},function(a){g=a.GameView},function(a){h=a.EncyclopediaItemView},function(a){i=a.default},function(a){j=a.default},function(a){k=a.default},function(a){l=a.SoundService},function(a){m=a.LevelSelectorView},function(a){n=a.EncyclopediaSelectorView}],execute:function(){"use strict";o=function(){function a(){var b=this;j(this,a),l.initialize(),this.storage=new f,this.popupManager=new e(k.select(".popup"),function(){return b.gameBoard.loadNextLevel()}),this.views=this.createViews(),this.gameBoard=null,this.currentEncyclopediaItem=null}return i(a,[{key:"createViews",value:function(){return{levelSelector:new m(this),game:new g(this),encyclopediaSelector:new n(this),encyclopediaItem:new h(this)}}},{key:"setView",value:function(a){return b.has(this.views,a)?(this.currentView=this.views[a],k.select(".top-bar__title").text(this.currentView.title),k.selectAll("."+this.currentView.className).classed("view--hidden",!1),void k.selectAll(".view:not(."+this.currentView.className+")").classed("view--hidden",!0)):void window.console.error("Invalid view: "+a)}},{key:"setEncyclopediaItem",value:function(a){this.currentEncyclopediaItem=a,this.views.encyclopediaItem.resetContent()}},{key:"htmlReady",value:function(){for(var a in this.views)this.views[a].initialize();this.setView("game"),window.gameBoard=this.gameBoard}},{key:"createGameBoard",value:function(){var a=this.storage.getCurrentLevelId()||d.levels[1].id;this.gameBoard=new c(k.select("#game svg.game-svg"),k.select("#game svg.blink-svg"),this,this.popupManager,this.storage,a)}},{key:"bindMenuEvents",value:function(){var a=this;this.gameBoard.svg.select(".navigation-controls .level-list").on("click",function(){a.gameBoard.stop(),a.setView("levelSelector")}).on("mouseover",function(){return a.gameBoard.titleManager.displayMessage("SELECT LEVEL")}),this.gameBoard.svg.select(".navigation-controls .encyclopedia").on("click",function(){a.gameBoard.stop(),a.setView("encyclopediaSelector")}).on("mouseover",function(){return a.gameBoard.titleManager.displayMessage("ENCYCLOPEDIA")});var b=this.gameBoard.svg.select(".interface-hint-overlay");this.gameBoard.svg.select(".navigation-controls .help").on("click",function(){return b.classed("hidden",!b.classed("hidden"))}).on("mouseover",function(){return b.classed("hidden",!1)}).on("mouseout",function(){return b.classed("hidden",!0)}),this.gameBoard.svg.select(".navigation-controls .sandbox").on("click",function(){a.gameBoard.loadLevel(d.levels[0].id)}).on("mouseover",function(){return a.gameBoard.titleManager.displayMessage("SANDBOX LEVEL")})}}]),a}(),a("Game",o)}}}),a.register("1",["3","87"],function(a){"use strict";var b,c;return{setters:[function(a){},function(a){b=a}],execute:function(){c=new b.Game,c.htmlReady()}}}),function(a){if("undefined"!=typeof document){var b=document,c="appendChild",d=b.createElement("style");d.type="text/css",b.getElementsByTagName("head")[0][c](d),d[c](b.createTextNode(a))}}("/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{box-sizing:content-box;height:0}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{color:inherit;font:inherit;margin:0}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-appearance:textfield;box-sizing:content-box}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{border:0;padding:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}\n/*# sourceMappingURL=__.css.map */")})(function(a){a()});