12 lines
48 KiB
JavaScript
12 lines
48 KiB
JavaScript
/*!
|
|
* BlockRain.js 0.2.0
|
|
* jQuery plugin that lets you put a playable (and configurable) game of Tetris in your site or just leave it in auto in the background.
|
|
* http://aerolab.github.io/blockrain.js/
|
|
*
|
|
* Copyright (c) 2015 Aerolab <hey@aerolab.co>
|
|
*
|
|
* Released under the MIT license
|
|
* http://aerolab.github.io/blockrain.js/LICENSE.txt
|
|
*/
|
|
!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(t){var e=0,i=Array.prototype.slice;t.cleanData=function(e){return function(i){var o,n,s;for(s=0;null!=(n=i[s]);s++)try{o=t._data(n,"events"),o&&o.remove&&t(n).triggerHandler("remove")}catch(r){}e(i)}}(t.cleanData),t.widget=function(e,i,o){var n,s,r,a,h={},l=e.split(".")[0];return e=e.split(".")[1],n=l+"-"+e,o||(o=i,i=t.Widget),t.expr[":"][n.toLowerCase()]=function(e){return!!t.data(e,n)},t[l]=t[l]||{},s=t[l][e],r=t[l][e]=function(t,e){return this._createWidget?void(arguments.length&&this._createWidget(t,e)):new r(t,e)},t.extend(r,s,{version:o.version,_proto:t.extend({},o),_childConstructors:[]}),a=new i,a.options=t.widget.extend({},a.options),t.each(o,function(e,o){return t.isFunction(o)?void(h[e]=function(){var t=function(){return i.prototype[e].apply(this,arguments)},n=function(t){return i.prototype[e].apply(this,t)};return function(){var e,i=this._super,s=this._superApply;return this._super=t,this._superApply=n,e=o.apply(this,arguments),this._super=i,this._superApply=s,e}}()):void(h[e]=o)}),r.prototype=t.widget.extend(a,{widgetEventPrefix:s?a.widgetEventPrefix||e:e},h,{constructor:r,namespace:l,widgetName:e,widgetFullName:n}),s?(t.each(s._childConstructors,function(e,i){var o=i.prototype;t.widget(o.namespace+"."+o.widgetName,r,i._proto)}),delete s._childConstructors):i._childConstructors.push(r),t.widget.bridge(e,r),r},t.widget.extend=function(e){for(var o,n,s=i.call(arguments,1),r=0,a=s.length;a>r;r++)for(o in s[r])n=s[r][o],s[r].hasOwnProperty(o)&&void 0!==n&&(e[o]=t.isPlainObject(n)?t.isPlainObject(e[o])?t.widget.extend({},e[o],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,o){var n=o.prototype.widgetFullName||e;t.fn[e]=function(s){var r="string"==typeof s,a=i.call(arguments,1),h=this;return s=!r&&a.length?t.widget.extend.apply(null,[s].concat(a)):s,this.each(r?function(){var i,o=t.data(this,n);return"instance"===s?(h=o,!1):o?t.isFunction(o[s])&&"_"!==s.charAt(0)?(i=o[s].apply(o,a),i!==o&&void 0!==i?(h=i&&i.jquery?h.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+s+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; attempted to call method '"+s+"'")}:function(){var e=t.data(this,n);e?(e.option(s||{}),e._init&&e._init()):t.data(this,n,new o(s,this))}),h}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:!1,create:null},_createWidget:function(i,o){o=t(o||this.defaultElement||this)[0],this.element=t(o),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),o!==this&&(t.data(o,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===o&&this.destroy()}}),this.document=t(o.style?o.ownerDocument:o.document||o),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:t.noop,_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){this._destroy(),this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(t.camelCase(this.widgetFullName)),this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled"),this.bindings.unbind(this.eventNamespace),this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus")},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var o,n,s,r=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(r={},o=e.split("."),e=o.shift(),o.length){for(n=r[e]=t.widget.extend({},this.options[e]),s=0;o.length-1>s;s++)n[o[s]]=n[o[s]]||{},n=n[o[s]];if(e=o.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];r[e]=i}return this._setOptions(r),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return this.options[t]=e,"disabled"===t&&(this.widget().toggleClass(this.widgetFullName+"-disabled",!!e),e&&(this.hoverable.removeClass("ui-state-hover"),this.focusable.removeClass("ui-state-focus"))),this},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_on:function(e,i,o){var n,s=this;"boolean"!=typeof e&&(o=i,i=e,e=!1),o?(i=n=t(i),this.bindings=this.bindings.add(i)):(o=i,i=this.element,n=this.widget()),t.each(o,function(o,r){function a(){return e||s.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof r?s[r]:r).apply(s,arguments):void 0}"string"!=typeof r&&(a.guid=r.guid=r.guid||a.guid||t.guid++);var h=o.match(/^([\w:-]*)\s*(.*)$/),l=h[1]+s.eventNamespace,c=h[2];c?n.delegate(c,l,a):i.bind(l,a)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.unbind(i).undelegate(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?o[t]:t).apply(o,arguments)}var o=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){t(e.currentTarget).addClass("ui-state-hover")},mouseleave:function(e){t(e.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){t(e.currentTarget).addClass("ui-state-focus")},focusout:function(e){t(e.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(e,i,o){var n,s,r=this.options[e];if(o=o||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],s=i.originalEvent)for(n in s)n in i||(i[n]=s[n]);return this.element.trigger(i,o),!(t.isFunction(r)&&r.apply(this.element[0],[i].concat(o))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(o,n,s){"string"==typeof n&&(n={effect:n});var r,a=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),r=!t.isEmptyObject(n),n.complete=s,n.delay&&o.delay(n.delay),r&&t.effects&&t.effects.effect[a]?o[e](n):a!==e&&o[a]?o[a](n.duration,n.easing,s):o.queue(function(i){t(this)[e](),s&&s.call(o[0]),i()})}}),t.widget}),function(t){"use strict";t.widget("aerolab.blockrain",{options:{autoplay:!1,autoplayRestart:!0,showFieldOnStart:!0,theme:null,blockWidth:10,autoBlockWidth:!1,autoBlockSize:24,difficulty:"normal",speed:20,asdwKeys:!0,playText:"Let's play some Tetris",playButtonText:"Play",gameOverText:"Game Over",restartButtonText:"Play Again",scoreText:"Score",onStart:function(){},onRestart:function(){},onGameOver:function(t){},onPlaced:function(){},onLine:function(t,e,i){}},start:function(){this._doStart(),this.options.onStart.call(this.element)},restart:function(){this._doStart(),this.options.onRestart.call(this.element)},gameover:function(){this.showGameOverMessage(),this._board.gameover=!0,this.options.onGameOver.call(this.element,this._filled.score)},_doStart:function(){this._filled.clearAll(),this._filled._resetScore(),this._board.cur=this._board.nextShape(),this._board.started=!0,this._board.gameover=!1,this._board.dropDelay=5,this._board.render(!0),this._board.animate(),this._$start.fadeOut(150),this._$gameover.fadeOut(150),this._$score.fadeIn(150)},pause:function(){this._board.paused=!0},resume:function(){this._board.paused=!1},autoplay:function(t){"boolean"!=typeof t&&(t=!0),this.options.autoplay=t,t&&!this._board.started&&this._doStart(),this._setupControls(!t),this._setupTouchControls(!t)},controls:function(t){"boolean"!=typeof t&&(t=!0),this._setupControls(t)},touchControls:function(t){"boolean"!=typeof t&&(t=!0),this._setupTouchControls(t)},score:function(t){return"undefined"!=typeof t&&parseInt(t)>=0&&(this._filled.score=parseInt(t),this._$scoreText.text(this._filled_score)),this._filled.score},freesquares:function(){return this._filled.getFreeSpaces()},showStartMessage:function(){this._$start.show()},showGameOverMessage:function(){this._$gameover.show()},updateSizes:function(){this._PIXEL_WIDTH=this.element.innerWidth(),this._PIXEL_HEIGHT=this.element.innerHeight(),this._BLOCK_WIDTH=this.options.blockWidth,this._BLOCK_HEIGHT=Math.floor(this.element.innerHeight()/this.element.innerWidth()*this._BLOCK_WIDTH),this._block_size=Math.floor(this._PIXEL_WIDTH/this._BLOCK_WIDTH),this._border_width=2,this._PIXEL_WIDTH=this._block_size*this._BLOCK_WIDTH,this._PIXEL_HEIGHT=this._block_size*this._BLOCK_HEIGHT,this._$canvas.attr("width",this._PIXEL_WIDTH).attr("height",this._PIXEL_HEIGHT)},theme:function(e){return"undefined"==typeof e?this.options.theme||this._theme:("string"==typeof e?(this.options.theme=e,this._theme=t.extend(!0,{},BlockrainThemes[e])):(this.options.theme=null,this._theme=e),("undefined"==typeof this._theme||null===this._theme)&&(this._theme=t.extend(!0,{},BlockrainThemes.retro),this.options.theme="retro"),(isNaN(parseInt(this._theme.strokeWidth))||"number"!=typeof parseInt(this._theme.strokeWidth))&&(this._theme.strokeWidth=2),this._preloadThemeAssets(),void(null!==this._board&&("string"==typeof this._theme.background&&this._$canvas.css("background-color",this._theme.background),this._board.render())))},_theme:{},_$game:null,_$canvas:null,_$gameholder:null,_$start:null,_$gameover:null,_$score:null,_$scoreText:null,_canvas:null,_ctx:null,_create:function(){var e=this;this.theme(this.options.theme),this._createHolder(),this._createUI(),this._refreshBlockSizes(),this.updateSizes(),t(window).resize(function(){}),this._SetupShapeFactory(),this._SetupFilled(),this._SetupInfo(),this._SetupBoard(),this._info.init(),this._board.init();var i=function(){requestAnimationFrame(i),e._board.render()};i(),this.options.autoplay?(this.autoplay(!0),this._setupTouchControls(!1)):(this._setupControls(!0),this._setupTouchControls(!1))},_checkCollisions:function(t,e,i,o){for(var n,s,r=0,a=i.length;a>r;r+=2){if(n=t+i[r],s=e+i[r+1],s>=this._BLOCK_HEIGHT||this._filled.check(n,s))return!0;if(!o&&0>n||n>=this._BLOCK_WIDTH)return!0}return!1},_board:null,_info:null,_filled:null,_drawBackground:function(){if("string"==typeof this._theme.background){if(this._theme.backgroundGrid instanceof Image){if(0===this._theme.backgroundGrid.width||0===this._theme.backgroundGrid.height)return;this._ctx.globalAlpha=1;for(var t=0;t<this._BLOCK_WIDTH;t++)for(var e=0;e<this._BLOCK_HEIGHT;e++){var i=t*this._block_size,o=e*this._block_size;this._ctx.drawImage(this._theme.backgroundGrid,0,0,this._theme.backgroundGrid.width,this._theme.backgroundGrid.height,i,o,this._block_size,this._block_size)}}else if("string"==typeof this._theme.backgroundGrid){{var n=this._theme.strokeWidth;Math.round(.23*this._block_size),Math.round(.3*this._block_size)}this._ctx.globalAlpha=1,this._ctx.fillStyle=this._theme.backgroundGrid;for(var t=0;t<this._BLOCK_WIDTH;t++)for(var e=0;e<this._BLOCK_HEIGHT;e++){var i=t*this._block_size,o=e*this._block_size;this._ctx.fillRect(i+n,o+n,this._block_size-2*n,this._block_size-2*n)}}this._ctx.globalAlpha=1}},_shapeFactory:null,_shapes:{line:[[0,-1,0,-2,0,-3,0,-4],[2,-2,1,-2,0,-2,-1,-2],[0,-4,0,-3,0,-2,0,-1],[-1,-2,0,-2,1,-2,2,-2]],square:[[0,0,1,0,0,-1,1,-1],[1,0,1,-1,0,0,0,-1],[1,-1,0,-1,1,0,0,0],[0,-1,0,0,1,-1,1,0]],arrow:[[0,-1,1,-1,2,-1,1,-2],[1,0,1,-1,1,-2,0,-1],[2,-1,1,-1,0,-1,1,0],[1,-2,1,-1,1,0,2,-1]],rightHook:[[2,0,1,0,1,-1,1,-2],[2,-2,2,-1,1,-1,0,-1],[0,-2,1,-2,1,-1,1,0],[0,0,0,-1,1,-1,2,-1]],leftHook:[[0,0,1,0,1,-1,1,-2],[2,0,2,-1,1,-1,0,-1],[2,-2,1,-2,1,-1,1,0],[0,-2,0,-1,1,-1,2,-1]],leftZag:[[0,0,0,-1,1,-1,1,-2],[2,-1,1,-1,1,-2,0,-2],[1,-2,1,-1,0,-1,0,0],[0,-2,1,-2,1,-1,2,-1]],rightZag:[[1,0,1,-1,0,-1,0,-2],[2,-1,1,-1,1,0,0,0],[0,-2,0,-1,1,-1,1,0],[0,0,1,0,1,-1,2,-1]]},_SetupShapeFactory:function(){function e(e,i,o,n){return t.extend(this,{x:0,y:0,symmetrical:o,init:function(){return t.extend(this,{orientation:0,x:Math.floor(e._BLOCK_WIDTH/2)-1,y:-1}),this},blockType:n,blockVariation:null,blocksLen:i[0].length,orientations:i,orientation:0,rotate:function(t){var i=(this.orientation+("left"===t?1:-1)+4)%4;e._checkCollisions(this.x,this.y,this.getBlocks(i))||(this.orientation=i,e._board.renderChanged=!0)},moveRight:function(){e._checkCollisions(this.x+1,this.y,this.getBlocks())||(this.x++,e._board.renderChanged=!0)},moveLeft:function(){e._checkCollisions(this.x-1,this.y,this.getBlocks())||(this.x--,e._board.renderChanged=!0)},drop:function(){e._checkCollisions(this.x,this.y+1,this.getBlocks())||(this.y++,e._board.dropCount=-1,e._board.animate(),e._board.renderChanged=!0)},getBlocks:function(t){return this.orientations[void 0!==t?t:this.orientation]},draw:function(t,i,o){for(var n=this.getBlocks(o),s=void 0===t?this.x:t,r=void 0===i?this.y:i,a=0,h=0;a<this.blocksLen;a+=2)e._board.drawBlock(s+n[a],r+n[a+1],this.blockType,this.blockVariation,h,this.orientation,!0),h++},getBounds:function(e){for(var i=t.isArray(e)?e:this.getBlocks(e),o=0,n=i.length,s=999,r=-999,a=999,h=-999;n>o;o+=2)i[o]<s&&(s=i[o]),i[o]>r&&(r=i[o]),i[o+1]<a&&(a=i[o+1]),i[o+1]>h&&(h=i[o+1]);return{left:s,right:r,top:a,bottom:h,width:r-s,height:h-a}}}),this.init()}var i=this;null===this._shapeFactory&&(this._shapeFactory={line:function(){return new e(i,i._shapes.line,!1,"line")},square:function(){return new e(i,i._shapes.square,!1,"square")},arrow:function(){return new e(i,i._shapes.arrow,!1,"arrow")},leftHook:function(){return new e(i,i._shapes.leftHook,!1,"leftHook")},rightHook:function(){return new e(i,i._shapes.rightHook,!1,"rightHook")},leftZag:function(){return new e(i,i._shapes.leftZag,!1,"leftZag")},rightZag:function(){return new e(i,i._shapes.rightZag,!1,"rightZag")}})},_SetupFilled:function(){var t=this;null===this._filled&&(this._filled={data:new Array(t._BLOCK_WIDTH*t._BLOCK_HEIGHT),score:0,toClear:{},check:function(t,e){return this.data[this.asIndex(t,e)]},add:function(e,i,o,n,s,r){e>=0&&e<t._BLOCK_WIDTH&&i>=0&&i<t._BLOCK_HEIGHT&&(this.data[this.asIndex(e,i)]={blockType:o,blockVariation:n,blockIndex:s,blockOrientation:r})},getFreeSpaces:function(){for(var t=0,e=0;e<this.data.length;e++)t+=this.data[e]?1:0},asIndex:function(e,i){return e+i*t._BLOCK_WIDTH},asX:function(e){return e%t._BLOCK_WIDTH},asY:function(e){return Math.floor(e/t._BLOCK_WIDTH)},clearAll:function(){delete this.data,this.data=new Array(t._BLOCK_WIDTH*t._BLOCK_HEIGHT)},_popRow:function(e){for(var i=t._BLOCK_WIDTH*(e+1)-1;i>=0;i--)this.data[i]=i>=t._BLOCK_WIDTH?this.data[i-t._BLOCK_WIDTH]:void 0},checkForClears:function(){var e,i,o,n,s=t._board.lines,r=[];for(e=0,i=this.data.length;i>e;e++)n=this.asX(e),0==n&&(o=0),this.data[e]&&"undefined"!=typeof this.data[e]&&"string"==typeof this.data[e].blockType&&(o+=1),n==t._BLOCK_WIDTH-1&&o==t._BLOCK_WIDTH&&r.push(this.asY(e));for(e=0,i=r.length;i>e;e++)this._popRow(r[e]),t._board.lines++,t._board.lines%10==0&&t._board.dropDelay>1&&(t._board.dropDelay*=.9);var a=t._board.lines-s;this._updateScore(a)},_updateScore:function(e){if(!(0>=e)){var i=[0,400,1e3,3e3,12e3];e>=i.length&&(e=i.length-1),this.score+=i[e],t._$scoreText.text(this.score),t.options.onLine.call(t.element,e,i[e],this.score)}},_resetScore:function(){this.score=0,t._$scoreText.text(this.score)},draw:function(){for(var e,i=0,o=this.data.length;o>i;i++)if(void 0!==this.data[i]){e=this.asY(i);var n=this.data[i];t._board.drawBlock(this.asX(i),e,n.blockType,n.blockVariation,n.blockIndex,n.blockOrientation)}}})},_SetupInfo:function(){var t=this;this._info={mode:t.options.difficulty,modes:["normal","nice","evil"],modesY:170,autopilotY:null,init:function(){this.mode=t.options.difficulty},setMode:function(e){this.mode=e,t._board.nextShape(!0)}}},_SetupBoard:function(){var e=this,i=this._info;this._board={animateDelay:1e3/e.options.speed,animateTimeoutId:null,cur:null,lines:0,dropCount:0,dropDelay:5,holding:{left:null,right:null,drop:null},holdingThreshold:200,started:!1,gameover:!1,renderChanged:!0,init:function(){this.cur=this.nextShape(),e.options.showFieldOnStart&&(e._drawBackground(),e._board.createRandomBoard(),e._board.render()),this.showStartMessage()},showStartMessage:function(){e._$start.show()},showGameOverMessage:function(){e._$gameover.show()},nextShape:function(o){var n,s,r,a=this.next;if(n="nice"==i.mode||"evil"==i.mode?e._niceShapes:e._randomShapes(),e.options.no_preview){if(this.next=null,o)return null;if(s=n(e._filled,e._checkCollisions,e._BLOCK_WIDTH,e._BLOCK_HEIGHT,i.mode),!s)throw new Error("No shape returned from shape function!",n);s.init(),r=s}else{if(s=n(e._filled,e._checkCollisions,e._BLOCK_WIDTH,e._BLOCK_HEIGHT,i.mode),!s)throw new Error("No shape returned from shape function!",n);if(s.init(),this.next=s,o)return null;r=a||this.nextShape()}return e.options.autoplay&&(e._niceShapes(e._filled,e._checkCollisions,e._BLOCK_WIDTH,e._BLOCK_HEIGHT,"normal",r),r.orientation=r.best_orientation,r.x=r.best_x),"undefined"!=typeof e._theme.complexBlocks?r.blockVariation=t.isArray(e._theme.complexBlocks[r.blockType])?e._randInt(0,e._theme.complexBlocks[r.blockType].length-1):null:"undefined"!=typeof e._theme.blocks&&(r.blockVariation=t.isArray(e._theme.blocks[r.blockType])?e._randInt(0,e._theme.blocks[r.blockType].length-1):null),r},animate:function(){var t=!1,i=!1,o=!1,n=Date.now();if(this.animateTimeoutId&&clearTimeout(this.animateTimeoutId),!this.paused&&!this.gameover&&(this.dropCount++,(this.dropCount>=this.dropDelay||e.options.autoplay||this.holding.drop&&n-this.holding.drop>=this.holdingThreshold)&&(t=!0,i=!0,this.dropCount=0),this.holding.left&&n-this.holding.left>=this.holdingThreshold&&(i=!0,this.cur.moveLeft()),this.holding.right&&n-this.holding.right>=this.holdingThreshold&&(i=!0,this.cur.moveRight()),t)){var s=this.cur,r=s.x,a=s.y,h=s.getBlocks();if(e._checkCollisions(r,a+1,h,!0)){t=!1;for(var l=0,c=0;c<s.blocksLen;c+=2)e._filled.add(r+h[c],a+h[c+1],s.blockType,s.blockVariation,l,s.orientation),a+h[c]<0&&(o=!0),l++;e._filled.checkForClears(),this.cur=this.nextShape(),this.renderChanged=!0,this.holding.left=null,this.holding.right=null,this.holding.drop=null,e.options.onPlaced.call(e.element)}}t&&(i=!0,this.cur.y++),(t||i)&&(this.renderChanged=!0),o?(this.gameover=!0,e.gameover(),e.options.autoplay&&e.options.autoplayRestart&&e.restart(),this.renderChanged=!0):(this.animateDelay=1e3/e.options.speed,this.animateTimeoutId=window.setTimeout(function(){e._board.animate()},this.animateDelay))},createRandomBoard:function(){var t,i,o,n,s,r=[];for(r=Object.keys(e._shapeFactory),t=0,i=e._BLOCK_WIDTH;i>t;t++)for(o=0,n=e._randChoice([e._randInt(0,8),e._randInt(5,9)]);n>o;o++)s&&e._randInt(0,3)||(s=e._randChoice(r)),e._filled.add(t,e._BLOCK_HEIGHT-o,s,e._randInt(0,3),null,e._randInt(0,3));e._board.render(!0)},render:function(t){(this.renderChanged||t)&&(this.renderChanged=!1,e._ctx.clearRect(0,0,e._PIXEL_WIDTH,e._PIXEL_HEIGHT),e._drawBackground(),e._filled.draw(),this.cur.draw())},drawBlock:function(t,i,o,n,s,r,a){t*=e._block_size,i*=e._block_size,a="boolean"==typeof a?a:!1;var h=e._theme.strokeWidth,l=Math.round(.23*e._block_size),c=Math.round(.3*e._block_size),d=this.getBlockColor(o,n,s,a);if(e._ctx.globalAlpha=1,d instanceof Image){if(e._ctx.globalAlpha=1,0===d.width||0===d.height)return;if("undefined"!=typeof e._theme.blocks&&null!==e._theme.blocks)e._ctx.drawImage(d,0,0,d.width,d.height,t,i,e._block_size,e._block_size);else if("undefined"!=typeof e._theme.complexBlocks&&null!==e._theme.complexBlocks){("undefined"==typeof s||null===s)&&(s=0);var u=function(t,i,o){var n=e._shapes[i][0],s=Math.min(n[0],n[2],n[4],n[6]),r=Math.max(n[0],n[2],n[4],n[6]),a=Math.min(n[1],n[3],n[5],n[7]),h=Math.max(n[1],n[3],n[5],n[7]),l=r-s+1,c=h-a+1,d=t.width/l,u=t.height/c;return{x:d*(n[2*o]-s),y:u*Math.abs(a-n[2*o+1]),w:d,h:u}},g=u(d,o,s);e._ctx.save(),e._ctx.translate(t,i),e._ctx.translate(e._block_size/2,e._block_size/2),e._ctx.rotate(-Math.PI/2*r),e._ctx.drawImage(d,g.x,g.y,g.w,g.h,-e._block_size/2,-e._block_size/2,e._block_size,e._block_size),e._ctx.restore()}else e._ctx.fillStyle="#ff0000",e._ctx.fillRect(t,i,e._block_size,e._block_size)}else"string"==typeof d&&(e._ctx.fillStyle=d,e._ctx.fillRect(t,i,e._block_size,e._block_size),"string"==typeof e._theme.innerShadow&&(e._ctx.globalAlpha=1,e._ctx.strokeStyle=e._theme.innerShadow,e._ctx.lineWidth=1,e._ctx.strokeRect(t+1,i+1,e._block_size-2,e._block_size-2)),"string"==typeof e._theme.stroke&&(e._ctx.globalAlpha=1,e._ctx.fillStyle=e._theme.stroke,e._ctx.strokeStyle=e._theme.stroke,e._ctx.lineWidth=h,e._ctx.strokeRect(t,i,e._block_size,e._block_size)),"string"==typeof e._theme.innerStroke&&(e._ctx.fillStyle=e._theme.innerStroke,e._ctx.fillRect(t+l,i+l,e._block_size-2*l,h),e._ctx.fillRect(t+l,i+l+h,h,e._block_size-2*l-h)),"string"==typeof e._theme.innerSquare&&(e._ctx.fillStyle=e._theme.innerSquare,e._ctx.globalAlpha=.2,e._ctx.fillRect(t+c,i+c,e._block_size-2*c,e._block_size-2*c)));e._ctx.globalAlpha=1},getBlockColor:function(i,o,n,s){var r=function(e,i){return t.isArray(e)?null!==i&&"undefined"!=typeof e[i]?e[i]:e.length>0?e[0]:null:e};return"boolean"!=typeof s&&(s=!0),s?"string"==typeof e._theme.primary&&""!==e._theme.primary?e._theme.primary:"undefined"!=typeof e._theme.blocks&&null!==e._theme.blocks?r(e._theme.blocks[i],o):r(e._theme.complexBlocks[i],o):"string"==typeof e._theme.secondary&&""!==e._theme.secondary?e._theme.secondary:"undefined"!=typeof e._theme.blocks&&null!==e._theme.blocks?r(e._theme.blocks[i],o):r(e._theme.complexBlocks[i],o)}},e._niceShapes=e._getNiceShapes()},_randInt:function(t,e){return t+Math.floor(Math.random()*(1+e-t))},_randSign:function(){return 2*this._randInt(0,1)-1},_randChoice:function(t){return t[this._randInt(0,t.length-1)]},_preloadThemeAssets:function(){var e=this,i=new RegExp("^#[A-F0-9+]{3,6}","i"),o=(new RegExp("^data:image/(png|gif|jpg);base64,","i"),function(){e._board&&e._board.render(!0)}),n=function(t){var e=t;return i.test(e)?t=e:(t=new Image,t.src=e,t.onload=o),t},s=function(e){if(t.isArray(e)&&e.length>0)for(var i=0;i<e.length;i++)e[i]=n(e[i]);else"string"==typeof e&&(e=n(e));return e};if("undefined"!=typeof this._theme.complexBlocks)for(var r=Object.keys(this._theme.complexBlocks),a=0;a<r.length;a++)this._theme.complexBlocks[r[a]]=s(this._theme.complexBlocks[r[a]]);else if("undefined"!=typeof this._theme.blocks)for(var r=Object.keys(this._theme.blocks),a=0;a<r.length;a++)this._theme.blocks[r[a]]=s(this._theme.blocks[r[a]]);if("undefined"!=typeof this._theme.backgroundGrid&&"string"==typeof this._theme.backgroundGrid&&!i.test(this._theme.backgroundGrid)){var h=this._theme.backgroundGrid;this._theme.backgroundGrid=new Image,this._theme.backgroundGrid.src=h,this._theme.backgroundGrid.onload=o}},_createHolder:function(){this._$gameholder=t('<div class="blockrain-game-holder"></div>'),this._$gameholder.css("position","relative").css("width","100%").css("height","100%"),this.element.html("").append(this._$gameholder),this._$canvas=t('<canvas style="display:block; width:100%; height:100%; padding:0; margin:0; border:none;" />'),"string"==typeof this._theme.background&&this._$canvas.css("background-color",this._theme.background),this._$gameholder.append(this._$canvas),this._canvas=this._$canvas.get(0),this._ctx=this._canvas.getContext("2d")},_createUI:function(){var e=this;e._$score=t('<div class="blockrain-score-holder" style="position:absolute;"><div class="blockrain-score"><div class="blockrain-score-msg">'+this.options.scoreText+'</div><div class="blockrain-score-num">0</div></div></div>').hide(),e._$scoreText=e._$score.find(".blockrain-score-num"),e._$gameholder.append(e._$score),e._$start=t('<div class="blockrain-start-holder" style="position:absolute;"><div class="blockrain-start"><div class="blockrain-start-msg">'+this.options.playText+'</div><a class="blockrain-btn blockrain-start-btn">'+this.options.playButtonText+"</a></div></div>").hide(),e._$gameholder.append(e._$start),e._$start.find(".blockrain-start-btn").click(function(t){t.preventDefault(),e.start()}),e._$gameover=t('<div class="blockrain-game-over-holder" style="position:absolute;"><div class="blockrain-game-over"><div class="blockrain-game-over-msg">'+this.options.gameOverText+'</div><a class="blockrain-btn blockrain-game-over-btn">'+this.options.restartButtonText+"</a></div></div>").hide(),e._$gameover.find(".blockrain-game-over-btn").click(function(t){t.preventDefault(),e.restart()}),e._$gameholder.append(e._$gameover),this._createControls()},_createControls:function(){var e=this;e._$touchLeft=t('<a class="blockrain-touch blockrain-touch-left" />').appendTo(e._$gameholder),e._$touchRight=t('<a class="blockrain-touch blockrain-touch-right" />').appendTo(e._$gameholder),e._$touchRotateRight=t('<a class="blockrain-touch blockrain-touch-rotate-right" />').appendTo(e._$gameholder),e._$touchRotateLeft=t('<a class="blockrain-touch blockrain-touch-rotate-left" />').appendTo(e._$gameholder),e._$touchDrop=t('<a class="blockrain-touch blockrain-touch-drop" />').appendTo(e._$gameholder)},_refreshBlockSizes:function(){this.options.autoBlockWidth&&(this.options.blockWidth=Math.ceil(this.element.width()/this.options.autoBlockSize))},_getNiceShapes:function(){function t(t,e,i,n,s,r,a){var h,l,c,d,u=e.length,g=0,A={};for(h=0;u>h;h+=2)g+=t[o._filled.asIndex(i+e[h],n+e[h+1])]||0;for(h=0;u>h;h+=2)l=e[h],c=e[h+1],(void 0===A[l]||A[l]<c)&&(A[l]=c);d=0;for(l in A)for(l=parseInt(l),c=A[l]+1,h=0;a>n+c;c++,h++)if(!o._filled.check(i+l,n+c)){d+=0==h?2:1;break}return g-=d}function e(){for(var t in n)n[t].x=0,n[t].y=-1}var i,o=this,n={};for(var i in this._shapeFactory)n[i]=this._shapeFactory[i]();var s=function(i,s,r,a,h,l){l||e();var c,d,u,g,A,f,p,b,m,k,_,I,v,y,C,w=new Array(r*a),B="evil"==h,G=999*(B?1:-1);for(c=0;r>c;c++)for(d=0;a>=d;d++)if(d==a||i.check(c,d)){for(u=d-4;d>u;u++)w[i.asIndex(c,u)]=u;break}var D=void 0===l?n:{cur:l};for(g in D){for(A=D[g],v=-999,f=0;f<(A.symmetrical?2:4);f++)for(p=A.getBlocks(f),b=A.getBounds(p),c=-b.left;c<r-b.width;c++)for(d=-1;d<a-b.bottom;d++)if(o._checkCollisions(c,d+1,p,!0)){m=t(w,p,c,d,i,r,a),m>v&&(v=m,y=f,C=c);break}(B&&G>v||!B&&v>G)&&(k=A,G=v,_=y,I=C)}return k.best_orientation=_,k.best_x=I,k};return s.no_preview=!0,s},_randomShapes:function(){var e=[];return t.each(this._shapeFactory,function(t,i){e.push(i)}),this._randChoice(e)},_setupControls:function(e){function i(t){var e={stopKeys:{37:1,38:1,39:1,40:1}},i=e.stopKeys[t.keyCode]||e.moreStopKeys&&e.moreStopKeys[t.keyCode];return i&&t.preventDefault(),i}function o(t){return"safekeypress."+t.keyCode}function n(e){var i=o(e);return t.data(this,i,(t.data(this,i)||0)-1),c.call(this,e)}function s(e){return t.data(this,o(e),0),d.call(this,e),i(e)}var r=this,a=function(t){return t?void(r._board.holding.left||(r._board.cur.moveLeft(),r._board.holding.left=Date.now(),r._board.holding.right=null)):void(r._board.holding.left=null)},h=function(t){return t?void(r._board.holding.right||(r._board.cur.moveRight(),r._board.holding.right=Date.now(),r._board.holding.left=null)):void(r._board.holding.right=null)},l=function(t){return t?void(r._board.holding.drop||(r._board.cur.drop(),r._board.holding.drop=Date.now())):void(r._board.holding.drop=null)},c=function(t){if(!r._board.cur)return!0;var e=!1;if(e=!0,r.options.asdwKeys)switch(t.keyCode){case 65:a(!0);break;case 68:h(!0);break;case 83:l(!0);break;case 87:r._board.cur.rotate("right")}switch(t.keyCode){case 37:a(!0);break;case 39:h(!0);break;case 40:l(!0);break;case 38:r._board.cur.rotate("right");break;case 88:r._board.cur.rotate("right");break;case 90:r._board.cur.rotate("left");break;default:e=!1}return e&&t.preventDefault(),!e},d=function(t){if(!r._board.cur)return!0;var e=!1;if(e=!0,r.options.asdwKeys)switch(t.keyCode){case 65:a(!1);break;case 68:h(!1);break;case 83:l(!1)}switch(t.keyCode){case 37:a(!1);break;case 39:h(!1);break;case 40:l(!1);break;default:e=!1}return e&&t.preventDefault(),!e};t(document).unbind("keydown.blockrain").unbind("keyup.blockrain"),r.options.autoplay||e&&t(document).bind("keydown.blockrain",n).bind("keyup.blockrain",s)},_setupTouchControls:function(t){var e=this,i=function(t){t.preventDefault(),e._board.cur.moveLeft(),e._board.holding.left=Date.now(),e._board.holding.right=null,e._board.holding.drop=null},o=function(t){t.preventDefault(),e._board.cur.moveRight(),e._board.holding.right=Date.now(),e._board.holding.left=null,e._board.holding.drop=null},n=function(t){t.preventDefault(),e._board.cur.drop(),e._board.holding.drop=Date.now()},s=function(t){t.preventDefault(),e._board.holding.left=null},r=function(t){t.preventDefault(),e._board.holding.right=null},a=function(t){t.preventDefault(),e._board.holding.drop=null},h=function(t){t.preventDefault(),e._board.cur.rotate("left")},l=function(t){t.preventDefault(),e._board.cur.rotate("right")};e._$touchLeft.unbind("touchstart touchend click"),e._$touchRight.unbind("touchstart touchend click"),e._$touchRotateLeft.unbind("touchstart touchend click"),e._$touchRotateRight.unbind("touchstart touchend click"),e._$touchDrop.unbind("touchstart touchend click"),!e.options.autoplay&&t?(e._$touchLeft.show().bind("touchstart click",i).bind("touchend",s),e._$touchRight.show().bind("touchstart click",o).bind("touchend",r),e._$touchDrop.show().bind("touchstart click",n).bind("touchend",a),e._$touchRotateLeft.show().bind("touchstart click",h),e._$touchRotateRight.show().bind("touchstart click",l)):(e._$touchLeft.hide(),e._$touchRight.hide(),e._$touchRotateLeft.hide(),e._$touchRotateRight.hide(),e._$touchDrop.hide())}})}(jQuery),window.BlockrainThemes={custom:{background:"#040304",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAHHElEQVR4XsVZgZbkqgqkTO77//+dbuvtgQ7QcGwnO3PPZTPG1dhWASIxwP8OEcqTYhJ3ypsAuLqsB7KSNrQ14uMoXAXsnwNihoUDInKKbCdDf2YjPuL+KDRSyOpE1Q5k6JBJV7IJSfnvJUzf8RhyAOh9ADqN3vtz+am+zIXWHIK9l1D5ISuSTbv3aUAJZKfvmMYYBn3O6Y3W/lt2IFmmIHmbQDcCgOM4DCjJqeKsNgQAIe9ag13I4NNHoUWhomMn4BoiubXAqn27qAoNm9HLwhMAfQ10lgYxc5gqvgxcfuw8sdhMHKtD99IrGfCpkXZjBG9x9r8SizJ/JHF8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/line.png"],square:["assets/blocks/custom/square.png"],arrow:"assets/blocks/custom/arrow.png",rightHook:["assets/blocks/custom/rightHook.png"],leftHook:"assets/blocks/custom/leftHook.png",rightZag:["assets/blocks/custom/rightZag.png"],leftZag:"assets/blocks/custom/leftZag.png"}},candy:{background:"#040304",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAIAAAAlC+aJAAAHHElEQVR4XsVZgZbkqgqkTO77//+dbuvtgQ7QcGwnO3PPZTPG1dhWASIxwP8OEcqTYhJ3ypsAuLqsB7KSNrQ14uMoXAXsnwNihoUDInKKbCdDf2YjPuL+KDRSyOpE1Q5k6JBJV7IJSfnvJUzf8RhyAOh9ADqN3vtz+am+zIXWHIK9l1D5ISuSTbv3aUAJZKfvmMYYBn3O6Y3W/lt2IFmmIHmbQDcCgOM4DCjJqeKsNgQAIe9ag13I4NNHoUWhomMn4BoiubXAqn27qAoNm9HLwhMAfQ10lgYxc5gqvgxcfuw8sdhMHKtD99IrGfCpkXZjBG9x9r8SizJ/JHF8Yww3hYszNDnz5uawDH3WsTESIZBcs6O5r36SVn4gmcFYJVmgSYZOMqmEdjf8vxV8riA4tG0Zo51qeeDQtQxhuP6hUmgYY/U/yu8JKYBVmGdZGznWhqBZoAefTTi7GYOY/jKHEPL57loObBU8zhL4z/P8UxbdN02sUzOSqKmlymZnCLckt2tdq41AOI8KyU4AQGfCrNEOkr0DPjxD767VBUls3qHNEfjdhdpWxa7++zkzVmMB+0PXcndy9yMogcwsd5fJAFzotccfgKBfArmukPKQQ8dCOvrGAXkNxBPekvMahyNbMZbfFFcDLcVPfgV8MoJOcgo2QcWDQZiNNh3lJ9IdaNRskCk0FMUZFJJhgTnpspxF3l5S/3UhuXgpq1EopxxQyX7V3pdB8ndxXo4aukmapDQaJAlSGGZzAu8bIdIDr/Lb6BnXTtgk/wLJnoCUbLSPR+PNTbAMmt3HCDPonnN/c0BrMU7MawAAmAQggOIweu9oGEUmiHLQBPxS+v2WSg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ITOeE/GLRMihIOsnQZnKqOlWXRUWidyYkFpCxtCF1s8D+seBggYVYRhChkqqjmld3NKhhu1XKuKUf4g6egEitkvqc5ewo+3ZOVZJO4Q4OSEDGRRyAQkYH8QfMUCR07KS8DIsO8xhjcnUXnSv4GMRYShSUG2MFCeby/awOJFyvF3TU22ckk3E3FQjci+mJVggwz12rKVEvWOk3dwWpIr7ezrU4XZ+9ciBAxWCVlhDb2o5cZTgBR17R3w45hgg8/fu+Dj643adZVXzCmebsbp5T6fhr2L9W8z5xLNsyDpl2btrsXPynS9NvVVc28xzMLPDCUYbVUMy+TMgdinupCEapdvPv0lqGwjW9fHsXjF39eIzRpnFbLdiy918qCWmclnq3mcWhVnzw5v+83XYz0+LPP/8lL704NB3BBdbCDKlChAq8QgRvmGSFouyo3vz7Lr/8FMHqie3VCpNQAAAAASUVORK5CYII=",square:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAACfUlEQVR4Xh3LvY5cRRBA4VNV3ffe+fEaZARgWfBExEhEZEg8A69AgkC8AzEiICMgJCdAxggsGRuW3Z3dmenbXVWskT6d7MiXnz3qclu87esm1qW3NteRuqaCIAmQABwPvPU2NyeaUa6P159/9QV3l/HqlWqN41El0PaadEJAoZBKqS9+eybL/tvvvi8PrHA4ku33pz9v5rafKmc0I7QhbiGaJSikyeCh1T7OG6fMluOvP/5+8csb+/RxhUtlEXA5KUMpiEpWwZKU3D799Zl1CtpEjsoh++HRxUMBVhgry4yUXLvstnE8qWi/HZndTEwpppj5XLIg7fZ4+fJlb91jzSlGhjc2O7RMj995nApRIRW0BHRl9UXLona6PYiGGKpaa50qPtQ96/5BCgkpBKghpI7VJZK5bmYju5IxQkZONqtbu+txd5ZEQFI0KaRRJxEZY0wjh/dqKqbZ/z9tqmJIqpQSnaD8T9sYkGqWmuTIZHgoWYupKh4SqSQimqrJfeV1gTECF4NKmUHwDFRqNSuJjMTxFQANNKGUyTBxYqSX6J6USdc1BquYFhEMF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GytO0ekCduR/fg/hV+olVqSm3YAAAAASUVORK5CYII=",rightZag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAACt0lEQVR4Xg3LOW6eVRQG4PcM937DP9hYlkgUQ6RQsAiEWAC7YCWUtGyAFqhpEHRI0CCBIjpHJBSxEhzkxP6H+93pHPz0D3358IsbuyY/XlCs7/YU5zjFZgdGp07BEDq4KXwA0PvuqIfDGbT0u69/+hZvr/DrH1gc1WENwUAGM3RDcXQGRbA9/e3nJPX3F5dqdY/ja8ztx++/+YhX5S6P47REODW2Pra+qsbOR5VFWwjHVPKJJF1FevPn019++O7jeYo3h5VG8Ua5OLnCh25T7+RwYfZavVz993q5OehccfImnV3nqdLjD54gTiDAF3cnEJrBAbZNSS//vTKP1FcTk0ppsfYzkpEt58Pls8vb29vTabDWYZJzjsqnJ+vHjx9tVvf3qG3QVpXJ0Y5L2xWmYbPt7W5WeK7RKUqICic7poQY6q4Fw2AUDSykUGUlQ0cUy3XUqCxm8Obe4SypVoRwOC7kLE5szIoBHsmlO6NJO3Qv5GEozI3IiE25K2EeLAiYADiBOwi51NLdCRrGcQ5xTLVUcg1BVeFszXtaWinkIAcALigQDwISby0Vq3dpR8IA2r1cKNfZRTq9F2c1iLuYqQcHg2Dmvbam08QUG1V07zASqDCLouSSE0tojCbGablFoMgkpMxht9QukvICASIXtNLy7rDDakVDeGepzpIUup1mlIZs5Dbo9OknnwEELGgZJgBhHHDYIx/v8/r98+d/P2cVVSOkitRPN9uXfz0j2rRSh1CZDKRmFomgnns62Wyvrq+ncTy2JJ/rRXv76vx04ymr83pci9gYRYISS4N3cgRKvYb15EHOHzy8fPaPgtMe8zHG5y8uH6y3wa7LPbNOIIkQRpCOZt7KzatHFx+Ww0Ki9NX8ZHWy7Sltchtz2aj32nicjZkpLr1m760vp5tN2e8jtHX0Yf4f3da+1L4oEEQAAAAASUVORK5CYII=",leftZag:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAIAAADZrBkAAAACtElEQVR4Xg2Lu25cZRhF93f5L3OOPeOQmJuDhEIHDa/CC/B4SHSICqS0CERDE2MJAYKEmITEcewZz/nvH7O0taq16eTL++P66nhCDegOAEhghFYhDDM0hSgowQkKkDIwJi0pP/72G9j24vIi8S7nN34lYG1VyOKg0uVKFFIiY/XL+R8s977+6nvttBMkovTDz9/Np3G3fTlvYkoFJswzaxtya2haQ0nUdGa2PLY6GD/9+vjJ+Y+bD+K2vFxtrLS3cQq9t1rLwUZ7IpuOAmQQ8u9/PgFDWbG5708/jK/Ti9OzExErhYVU1TMrCZqV7fY2Or2+uQ5H7zgPMNQF5HL7+upZeFeHLU//etrraM2YedQBAXsnoPXHn8yrcHVzE0LICWoECTQf+SG19dRqK3tMUxSRZtkIZtqbsblW+vF8/Pzy1XoNvdthjDas7He7swdno+JkM21v997r6A1MIKNBwiCiXssqhNsbcAwQosPTeek1MzBa947NmnewYcGR8Oh1sZG8s5LvQoACaK0Yegi+965MNWXnxIAx0AdyWnqDMjuh1KoIkYGNUPqh0zHaYcpwoin1ZiBFjFBVEWLm1ppzTkQAsAQYQdwhTap+dBCRXzkW6g2lIpdqRkYE1v1+AZgEuiRo8G2YaCBo75ZylSCdiMnoYPVefO1k8AYm7rlAjUDi7/ZN18HIffbp5zFO22Vf0bzXfsBQUu4DIJ6P1/t/XowB9RGl4Xj94M62zy+vou2sDUySyhJjTDXpAeL9YFKXaxYnuoL2BRfnzxghj7YKm4liHkszGkOUjtxIYjKM9ncpTnPr4+HDj8j+U5/B5R5k/vfv344m6rfXHb3NSqKvdrs5xKUWeN95nUd69Oi9vpQI0PtfTAn7eE/eLF0Y92eUjrcDISBmrBjbgkrIDPFYCfoCLPgflXOjuIEFgMYAAAAASUVORK5CYII="}},modern:{background:"#000000",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFn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3VtZW50SUQ9InhtcC5kaWQ6MzMwNTNEOTk5MDM1MTFFNDlBMzlFNzY4RjBCNkNENzMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7Y01+zAAAAMklEQVR42mJgGAWjYBSMgkEJGIlUd+j/WjjbjjGYGC1MtHP10DR6FIyCUTAKBikACDAA0NoDCLGGjH8AAAAASUVORK5CYII=",primary:null,secondary:null,stroke:null,blocks:{line:"#fa1e1e",square:"#f1fa1e",arrow:"#d838cb",rightHook:"#f5821f",leftHook:"#42c6f0",rightZag:"#4bd838",leftZag:"#fa1e1e"}},retro:{background:"#000000",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpjZTg0NzU4MC00ODk3LTRkNjAtOWNhYi1mZTk1NzQ5NzhiNjkiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTEzOEQwMDc5MDQyMTFFNDlBMzlFNzY4RjBCNkNENzMiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTEzOEQwMDY5MDQyMTFFNDlBMzlFNzY4RjBCNkNENzMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTQgKE1hY2ludG9zaCkiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDplNDRjOWZiNC0yNzE5LTQ3NDYtYmRmMi0wMmY2ZTA4ZjAxMmUiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6MzMwNTNEOTk5MDM1MTFFNDlBMzlFNzY4RjBCNkNENzMiLz4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7Y01+zAAAAMklEQVR42mJgGAWjYBSMgkEJGIlUd+j/WjjbjjGYGC1MtHP10DR6FIyCUTAKBikACDAA0NoDCLGGjH8AAAAASUVORK5CYII=",primary:null,secondary:null,stroke:"#000000",innerStroke:"#000000",blocks:{line:"#fa1e1e",square:"#f1fa1e",arrow:"#d838cb",rightHook:"#f5821f",leftHook:"#42c6f0",rightZag:"#4bd838",leftZag:"#fa1e1e"}},monochrome:{background:"#000000",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZ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VzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz7Y01+zAAAAMklEQVR42mJgGAWjYBSMgkEJGIlUd+j/WjjbjjGYGC1MtHP10DR6FIyCUTAKBikACDAA0NoDCLGGjH8AAAAASUVORK5CYII=",primary:"#ffffff",secondary:"#ffffff",stroke:"#000000",innerStroke:"#000000"},aerolab:{background:"#ffffff",primary:"#ff7b00",secondary:"#000000"},gameboy:{background:"#C4CFA1",primary:null,secondary:null,stroke:"#414141",innerStroke:"#414141",innerSquare:"#000000",blocks:{line:"#88926A",square:"#585E44",arrow:"#A4AC8C",rightHook:"#6B7353",leftHook:"#6B7353",rightZag:"#595F45",leftZag:"#595F45"}},vim:{background:"#000000",backgroundGrid:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3RpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNS1jMDE0IDc5LjE1MTQ4MSwgMjAxMy8wMy8xMy0xMjowOToxNSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWx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