var canvas,stage,canvas_container,drawing_container,none_tile_areas_container,none_tile_poligons,selected_type,selected_tile,current_stage,previous_stage,square,scale,width,height,tile,tile_images,color_images,room_size,colors,report,drag_measures,matriz,matriz_data,pattern,resize_cont,unit_system,edges_and_corners,edges_type,edges_colors,layer_matrix,layer_borders_ands_edges,real_points_reset,pluginUrl=fd_data.pluginUrl,watermarkUrl=fd_data.wm_image,adminUrl=fd_data.adminUrl,nonce=fd_data.nonce,selected_items={};selected_items.cart={},selected_items.edges=[],selected_items.edges.color=[],selected_items.edges.count=[],selected_items.corners=[],selected_items.corners.color=[],selected_items.corners.count=[];var data={redir_url:"",factor:60,inflate_factor:5,margin:36,scale:36,convertion_factor:.3048,defaul_dimentions:{imperial:{measure:16,min:4,max:125,step:4},metric:{measure:4.8768,min:1.22,max:40.48,step:1.22}},patterns:{solid:{text:"Solid",img:pluginUrl+"img/patterns/solid.png"},checkered:{text:"Checkered",img:pluginUrl+"img/patterns/checkered.png"},square:{text:"Square",img:pluginUrl+"img/patterns/square.png"},square_checkered:{text:"Square Checkered",img:pluginUrl+"img/patterns/square_checkered.png"},swedish:{text:"Swedish",img:pluginUrl+"img/patterns/swedish.png"},big_checkers:{text:"Big Checkers",img:pluginUrl+"img/patterns/big_checkers.png"},double_square:{text:"Double Square",img:pluginUrl+"img/patterns/double_square.png"}},colors:{drawing_area:"#000000",general_fill:"#cccccc",tile_stroke:"#000000",measure:"#1F1F14",none_tile_border:"#cccccc",none_tile_fill:"#ffffff"},img:{right_arrow:pluginUrl+"img/arrows/horizontal.svg",down_arrow:pluginUrl+"img/arrows/vertical.svg",diagonal_arrow:pluginUrl+"img/arrows/diagonal.svg",back_square:pluginUrl+"img/controls/back_square.png"},text:{all_types:{font:"16px Arial",color:"#000000"},measures:{font:"14px Arial",color:"#000000"},drag:{font:"14px Arial",color:"#000000"}},none_tile_area:{points:{0:{x:1,y:0},1:{x:1,y:1},2:{x:0,y:1},3:{x:0,y:0}},drags:{type:"xy",location:{position:"center",points:[1]},points:{0:["x"],1:["x","y"],2:["y"]},limits:[{point:3,axis:"x",not:"under"},{point:3,axis:"y",not:"under"}]}},types:{rectangle:{label:{text:"Square / Rectangular shape",x:1,y:4.5},type:"rectangle",start_point:{x:150,y:50},points:{0:{x:4,y:0,angle:3},1:{x:4,y:0},2:{x:4,y:4,angle:0},3:{x:4,y:4},4:{x:0,y:4,angle:1},5:{x:0,y:4},6:{x:0,y:0,angle:2},7:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:6,axis:"y",not:"under"},{point:7,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2},{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_270-360",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{4:{axis:"x",distance:2},5:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{6:{axis:"y",distance:2},7:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},limits:[{point:1,axis:"x",not:"over"},{point:7,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},limits:[{point:0,axis:"y",not:"under"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"left",points:[3]},points:{3:["x"]},limits:[{point:2,axis:"x",not:"over"},{point:4,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"right",points:[4]},points:{4:["x"]},limits:[{point:3,axis:"x",not:"over"},{point:5,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"over",points:[5]},points:{5:["y"]},limits:[{point:4,axis:"y",not:"over"},{point:6,axis:"y",not:"under"}]},{type:"y",location:{position:"under",points:[6]},points:{6:["y"]},limits:[{point:5,axis:"y",not:"over"},{point:7,axis:"y",not:"under"}]},{type:"x",location:{position:"right",points:[7]},points:{7:["x"]},limits:[{point:0,axis:"x",not:"over"},{point:6,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:7,finish:0,side:"A",readonly:!1,index:0}],1:[{axis:"y",start:1,finish:2,side:"B",readonly:!1,index:1}],2:[{axis:"x",start:3,finish:4,side:"C",readonly:!1,index:2}],3:[{axis:"y",start:5,finish:6,side:"D",readonly:!1,index:3}]}},tl_l_shape:{label:{text:"TL - L Shape",x:1,y:4.5},type:"tl_l_shape",start_point:{x:400,y:50},points:{0:{x:4,y:0,angle:3},1:{x:4,y:0},2:{x:4,y:2,angle:0},3:{x:4,y:2},4:{x:2,y:2},5:{x:2,y:2},6:{x:2,y:4,angle:0},7:{x:2,y:4},8:{x:0,y:4,angle:1},9:{x:0,y:4},10:{x:0,y:0,angle:2},11:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:6,axis:"x",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2},{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["x"],5:["x"],6:["x","y"],7:["x","y"],8:["y"],9:["y"]},limits:[{point:3,axis:"x",not:"over"},{point:3,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_270-360",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{4:{axis:"x",distance:2},5:{axis:"y",distance:2}}},{type:"inner_270-360",points:{6:{axis:"y",distance:-2},7:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{8:{axis:"x",distance:2},9:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{10:{axis:"y",distance:2},11:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"over"},{point:11,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:-1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"left",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"over"},{point:4,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"right",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"over"},{point:5,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:1}}},limits:[{point:4,axis:"y",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"under"},{point:7,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"over"},{point:8,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:-1}}},limits:[{point:7,axis:"x",not:"over"},{point:9,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"over",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"over"},{point:10,axis:"y",not:"under"}]},{type:"y",location:{position:"uner",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:1}}},limits:[{point:9,axis:"y",not:"over"},{point:11,axis:"y",not:"uner"}]},{type:"x",location:{position:"right",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"over"},{point:10,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:11,finish:0,side:"A",readonly:!1,calculate_with:"",index:0}],1:[{axis:"y",start:1,finish:2,side:"B",readonly:!1,calculate_with:"C",index:1},{axis:"y",start:5,finish:6,side:"C",readonly:!1,calculate_with:"B",index:1}],2:[{axis:"x",start:3,finish:4,side:"D",readonly:!1,calculate_with:"E",index:2},{axis:"x",start:7,finish:8,side:"E",readonly:!1,calculate_with:"D",index:2}],3:[{axis:"y",start:9,finish:10,side:"F",readonly:!1,calculate_with:"",index:3}]}},tr_l_shape:{label:{text:"TR - L Shape",x:1,y:4.5},type:"tr_l_shape",start_point:{x:650,y:50},points:{0:{x:4,y:0,angle:3},1:{x:4,y:0},2:{x:4,y:4,angle:0},3:{x:4,y:4},4:{x:2,y:4,angle:1},5:{x:2,y:4,outer:!0},6:{x:2,y:2},7:{x:2,y:2},8:{x:0,y:2,angle:1},9:{x:0,y:2},10:{x:0,y:0,angle:2},11:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:7,axis:"x",not:"under"},{point:7,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2},{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["x"],5:["x"],6:["x","y"],7:["x","y"],8:["y"],9:["y"]},limits:[{point:3,axis:"x",not:"over"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_270-360",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{4:{axis:"x",distance:2},5:{axis:"y",distance:-2}}},{type:"inner_180-270",points:{6:{axis:"y",distance:2},7:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{8:{axis:"y",distance:2},9:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{8:{axis:"x",distance:2},9:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{10:{axis:"y",distance:2},11:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"over"},{point:11,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:-1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"left",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"over"},{point:4,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"right",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"over"},{point:5,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:1}}},limits:[{point:4,axis:"y",not:"over"},{point:6,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"over"},{point:7,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"over"},{point:8,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:-1}}},limits:[{point:7,axis:"x",not:"over"},{point:9,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"over",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"over"},{point:10,axis:"y",not:"under"}]},{type:"y",location:{position:"uner",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:1}}},limits:[{point:9,axis:"y",not:"over"},{point:11,axis:"y",not:"uner"}]},{type:"x",location:{position:"right",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"over"},{point:10,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:11,finish:0,side:"A",readonly:!1,calculate_with:"",index:0}],1:[{axis:"y",start:1,finish:2,side:"B",readonly:!1,calculate_with:"",index:1}],2:[{axis:"x",start:3,finish:4,side:"C",readonly:!1,calculate_with:"D",index:2},{axis:"x",start:7,finish:8,side:"D",readonly:!1,calculate_with:"C",index:2},],3:[{axis:"y",start:5,finish:6,side:"E",readonly:!1,calculate_with:"F",index:3},{axis:"y",start:9,finish:10,side:"F",readonly:!1,calculate_with:"E",index:3}]}},bl_l_shape:{label:{text:"BL - L Shape",x:1,y:4.5},type:"bl_l_shape",start_point:{x:400,y:50},points:{0:{x:2,y:0,angle:3},1:{x:2,y:0},2:{x:2,y:2},3:{x:2,y:2,outer:!0},4:{x:4,y:2,angle:3},5:{x:4,y:2},6:{x:4,y:4,angle:0},7:{x:4,y:4},8:{x:0,y:4,angle:1},9:{x:0,y:4},10:{x:0,y:0,angle:2},11:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:6,axis:"x",not:"over"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2},{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["x"],5:["x"],6:["x","y"],7:["x","y"],8:["y"],9:["y"]},limits:[{point:3,axis:"x",not:"under"},{point:3,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_0-90",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:2}}},{type:"inner_180-270",points:{4:{axis:"x",distance:-2},5:{axis:"y",distance:2}}},{type:"inner_270-360",points:{6:{axis:"y",distance:-2},7:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{8:{axis:"x",distance:2},9:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{10:{axis:"y",distance:2},11:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"over"},{point:11,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:-1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"left",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"under"},{point:4,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"right",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"under"},{point:5,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:1}}},limits:[{point:4,axis:"y",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"under"},{point:7,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"over"},{point:8,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:-1}}},limits:[{point:7,axis:"x",not:"over"},{point:9,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"over",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"over"},{point:10,axis:"y",not:"under"}]},{type:"y",location:{position:"uner",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:1}}},limits:[{point:9,axis:"y",not:"over"},{point:11,axis:"y",not:"uner"}]},{type:"x",location:{position:"right",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"over"},{point:10,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:11,finish:0,side:"A",readonly:!1,calculate_with:"B",index:0},{axis:"x",start:3,finish:4,side:"B",readonly:!1,calculate_with:"A",index:0}],1:[{axis:"y",start:1,finish:2,side:"C",readonly:!1,calculate_with:"D",index:1},{axis:"y",start:5,finish:6,side:"D",readonly:!1,calculate_with:"C",index:1}],2:[{axis:"x",start:7,finish:8,side:"E",readonly:!1,calculate_with:"",index:2}],3:[{axis:"y",start:9,finish:10,side:"F",readonly:!1,calculate_with:"",index:3}]}},br_l_shape:{label:{text:"BR - L Shape",x:1,y:4.5},type:"br_l_shape",start_point:{x:400,y:50},points:{0:{x:2,y:0,angle:2},1:{x:2,y:0,outer:!0},2:{x:2,y:2},3:{x:2,y:2,outer:!0},4:{x:0,y:2,angle:2},5:{x:0,y:2},6:{x:0,y:4,angle:1},7:{x:0,y:4},8:{x:4,y:4,angle:0},9:{x:4,y:4},10:{x:4,y:0,angle:3},11:{x:4,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:8,axis:"x",not:"over"},{point:8,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:2},axis:"y",start:1,finish:2},{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[8]},points:{6:["y"],7:["y"],8:["x","y"],9:["x","y"],10:["x"],11:["x"]},limits:[{point:2,axis:"x",not:"under"},{point:2,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:8},axis:"y",start:7,finish:8},{location:{position:"left_under",point:9},axis:"x",start:9,finish:10}]}]},step3:{buttons:[{type:"inner_90-180",points:{0:{axis:"x",distance:2},1:{axis:"y",distance:2}}},{type:"inner_270-360",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{4:{axis:"x",distance:2},5:{axis:"y",distance:2}}},{type:"inner_0-90",points:{6:{axis:"y",distance:-2},7:{axis:"x",distance:2}}},{type:"inner_270-360",points:{8:{axis:"x",distance:-2},9:{axis:"y",distance:-2}}},{type:"inner_180-270",points:{10:{axis:"y",distance:2},11:{axis:"x",distance:-2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"under"},{point:11,axis:"x",not:"over"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:-1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"left",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"over"},{point:4,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"right",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"over"},{point:5,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:1}}},limits:[{point:4,axis:"y",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"under"},{point:7,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"under"},{point:8,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:-1}}},limits:[{point:7,axis:"x",not:"under"},{point:9,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"over",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"over"},{point:10,axis:"y",not:"under"}]},{type:"y",location:{position:"uner",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:1}}},limits:[{point:9,axis:"y",not:"over"},{point:11,axis:"y",not:"uner"}]},{type:"x",location:{position:"right",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"under"},{point:10,axis:"x",not:"over"}]}]}},measures:{0:[{axis:"x",start:0,finish:11,side:"B",readonly:!1},{axis:"x",start:4,finish:3,side:"A",readonly:!1}],1:[{axis:"y",start:10,finish:9,side:"C",readonly:!1}],2:[{axis:"x",start:8,finish:7,side:"D",readonly:!1}],3:[{axis:"y",start:2,finish:1,side:"F",readonly:!1},{axis:"y",start:6,finish:5,side:"E",readonly:!1}]}},l_t_shape:{label:{text:"Left - T Shape",x:1,y:4.5},type:"l_t_shape",start_point:{x:650,y:50},points:{0:{x:2,y:0,angle:3},1:{x:2,y:0},2:{x:2,y:1},3:{x:2,y:1,outer:!0},4:{x:4,y:1,angle:3},5:{x:4,y:1},6:{x:4,y:3,angle:0},7:{x:4,y:3},8:{x:2,y:3},9:{x:2,y:3},10:{x:2,y:4,angle:0},11:{x:2,y:4},12:{x:0,y:4,angle:1},13:{x:0,y:4},14:{x:0,y:0,angle:2},15:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:6,axis:"y",not:"over"},{point:7,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2},{location:{position:"right_over",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["x"],5:["x"],6:["x","y"],7:["x","y"],8:["y"],9:["y"]},limits:[{point:2,axis:"y",not:"under"},{point:10,axis:"y",not:"over"},{point:10,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]},{type:"xy",location:{position:"center",points:[10]},points:{8:["x"],9:["x"],10:["x","y"],11:["x","y"],12:["y"],13:["y"]},limits:[{point:6,axis:"x",not:"over"},{point:6,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:10},axis:"y",start:9,finish:10},{location:{position:"left_under",point:11},axis:"x",start:11,finish:12}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_0-90",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:2}}},{type:"inner_180-270",points:{4:{axis:"x",distance:-2},5:{axis:"y",distance:2}}},{type:"inner_270-360",points:{6:{axis:"y",distance:-2},7:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{8:{axis:"x",distance:2},9:{axis:"y",distance:2}}},{type:"inner_270-360",points:{10:{axis:"y",distance:-2},11:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{12:{axis:"x",distance:2},13:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{14:{axis:"y",distance:2},15:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"over"},{point:15,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"right",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"under"},{point:4,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"left",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"under"},{point:5,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:-1}}},limits:[{point:4,axis:"y",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"under"},{point:7,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"over"},{point:8,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:1}}},limits:[{point:7,axis:"x",not:"over"},{point:9,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"under",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"under"},{point:10,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:9},axis:"y",start:9,finish:10}]},{type:"y",location:{position:"over",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:-1}}},limits:[{point:9,axis:"y",not:"under"},{point:11,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:10},axis:"y",start:9,finish:10}]},{type:"x",location:{position:"left",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:-1}}},limits:[{point:10,axis:"x",not:"over"},{point:12,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:11},axis:"x",start:11,finish:12}]},{type:"x",location:{position:"right",points:[12]},points:{12:["x"]},shoots:{12:{13:{axis:"y",distance:-1}}},limits:[{point:11,axis:"x",not:"over"},{point:13,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:12},axis:"x",start:11,finish:12}]},{type:"y",location:{position:"over",points:[13]},points:{13:["y"]},shoots:{13:{12:{axis:"x",distance:1}}},limits:[{point:12,axis:"y",not:"over"},{point:14,axis:"y",not:"uner"}]},{type:"y",location:{position:"under",points:[14]},points:{14:["y"]},shoots:{14:{15:{axis:"x",distance:1}}},limits:[{point:13,axis:"y",not:"over"},{point:15,axis:"y",not:"under"}]},{type:"x",location:{position:"right",points:[15]},points:{15:["x"]},shoots:{15:{14:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"over"},{point:14,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:15,finish:0,side:"A",readonly:!1,calculate_with:"B",index:0},{axis:"x",start:3,finish:4,side:"B",readonly:!1,calculate_with:"A",index:0}],1:[{axis:"y",start:1,finish:2,side:"C",readonly:!1,calculate_with:"D",index:1},{axis:"y",start:5,finish:6,side:"D",readonly:!1,calculate_with:"C",index:1},{axis:"y",start:9,finish:10,side:"E",readonly:!1,calculate_with:"D",index:1}],2:[{axis:"x",start:7,finish:8,side:"F",readonly:!1,calculate_with:"G",index:2},{axis:"x",start:11,finish:12,side:"G",readonly:!1,calculate_with:"F",index:2}],3:[{axis:"y",start:13,finish:14,side:"H",readonly:!1,calculate_with:"",index:3}]}},t_t_shape:{label:{text:"Top - T Shape",x:1,y:4.5},type:"t_t_shape",start_point:{x:650,y:50},points:{0:{x:4,y:0,angle:3},1:{x:4,y:0},2:{x:4,y:2,angle:0},3:{x:4,y:2},4:{x:3,y:2},5:{x:3,y:2},6:{x:3,y:4,angle:0},7:{x:3,y:4},8:{x:1,y:4,angle:1},9:{x:1,y:4,outer:!0},10:{x:1,y:2},11:{x:1,y:2},12:{x:0,y:2,angle:1},13:{x:0,y:2},14:{x:0,y:0,angle:2},15:{x:0,y:0}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["x"],1:["x"],2:["x","y"],3:["x","y"],4:["y"],5:["y"]},limits:[{point:6,axis:"y",not:"over"},{point:7,axis:"x",not:"under"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2},{location:{position:"right_over",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["x"],5:["x"],6:["x","y"],7:["x","y"],8:["y"],9:["y"]},limits:[{point:2,axis:"y",not:"under"},{point:10,axis:"y",not:"under"},{point:2,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]},{type:"xy",location:{position:"center",points:[10]},points:{8:["x"],9:["x"],10:["x","y"],11:["x","y"],12:["y"],13:["y"]},limits:[{point:6,axis:"x",not:"over"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:10},axis:"y",start:9,finish:10},{location:{position:"left_under",point:11},axis:"x",start:11,finish:12}]}]},step3:{buttons:[{type:"inner_180-270",points:{0:{axis:"x",distance:-2},1:{axis:"y",distance:2}}},{type:"inner_270-360",points:{2:{axis:"y",distance:-2},3:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{4:{axis:"x",distance:2},5:{axis:"y",distance:2}}},{type:"inner_270-360",points:{6:{axis:"y",distance:-2},7:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{8:{axis:"x",distance:2},9:{axis:"y",distance:-2}}},{type:"inner_180-270",points:{10:{axis:"y",distance:2},11:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{12:{axis:"x",distance:2},13:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{14:{axis:"y",distance:2},15:{axis:"x",distance:2}}}],points:[{type:"x",location:{position:"left",points:[0]},points:{0:["x"]},shoots:{0:{1:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"over"},{point:15,axis:"x",not:"under"}]},{type:"y",location:{position:"under",points:[1]},points:{1:["y"]},shoots:{1:{0:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"y",start:1,finish:2}]},{type:"y",location:{position:"over",points:[2]},points:{2:["y"]},shoots:{2:{3:{axis:"x",distance:1}}},limits:[{point:1,axis:"y",not:"under"},{point:3,axis:"y",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2}]},{type:"x",location:{position:"right",points:[3]},points:{3:["x"]},shoots:{3:{2:{axis:"y",distance:-1}}},limits:[{point:2,axis:"x",not:"over"},{point:4,axis:"x",not:"under"}],measures:[{location:{position:"left_under",point:3},axis:"x",start:3,finish:4}]},{type:"x",location:{position:"left",points:[4]},points:{4:["x"]},shoots:{4:{5:{axis:"y",distance:1}}},limits:[{point:3,axis:"x",not:"over"},{point:5,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:4},axis:"x",start:3,finish:4}]},{type:"y",location:{position:"under",points:[5]},points:{5:["y"]},shoots:{5:{4:{axis:"x",distance:-1}}},limits:[{point:4,axis:"y",not:"under"},{point:6,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:5},axis:"y",start:5,finish:6}]},{type:"y",location:{position:"over",points:[6]},points:{6:["y"]},shoots:{6:{7:{axis:"x",distance:-1}}},limits:[{point:5,axis:"y",not:"under"},{point:7,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"y",start:5,finish:6}]},{type:"x",location:{position:"left",points:[7]},points:{7:["x"]},shoots:{7:{6:{axis:"y",distance:-1}}},limits:[{point:6,axis:"x",not:"over"},{point:8,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"x",start:7,finish:8}]},{type:"x",location:{position:"right",points:[8]},points:{8:["x"]},shoots:{8:{9:{axis:"y",distance:1}}},limits:[{point:7,axis:"x",not:"over"},{point:9,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:8},axis:"x",start:7,finish:8}]},{type:"y",location:{position:"under",points:[9]},points:{9:["y"]},shoots:{9:{8:{axis:"x",distance:1}}},limits:[{point:8,axis:"y",not:"over"},{point:10,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:9},axis:"y",start:9,finish:10}]},{type:"y",location:{position:"over",points:[10]},points:{10:["y"]},shoots:{10:{11:{axis:"x",distance:-1}}},limits:[{point:9,axis:"y",not:"over"},{point:11,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:10},axis:"y",start:9,finish:10}]},{type:"x",location:{position:"left",points:[11]},points:{11:["x"]},shoots:{11:{10:{axis:"y",distance:-1}}},limits:[{point:10,axis:"x",not:"over"},{point:12,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:11},axis:"x",start:11,finish:12}]},{type:"x",location:{position:"right",points:[12]},points:{12:["x"]},shoots:{12:{13:{axis:"y",distance:-1}}},limits:[{point:11,axis:"x",not:"over"},{point:13,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:12},axis:"x",start:11,finish:12}]},{type:"y",location:{position:"over",points:[13]},points:{13:["y"]},shoots:{13:{12:{axis:"x",distance:1}}},limits:[{point:12,axis:"y",not:"over"},{point:14,axis:"y",not:"uner"}]},{type:"y",location:{position:"under",points:[14]},points:{14:["y"]},shoots:{14:{15:{axis:"x",distance:1}}},limits:[{point:13,axis:"y",not:"over"},{point:15,axis:"y",not:"under"}]},{type:"x",location:{position:"right",points:[15]},points:{15:["x"]},shoots:{15:{14:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"over"},{point:14,axis:"x",not:"under"}]}]}},measures:{0:[{axis:"x",start:15,finish:0,side:"A",readonly:!1,calculate_with:"",index:0}],1:[{axis:"y",start:1,finish:2,side:"B",readonly:!1,calculate_with:"C",index:1},{axis:"y",start:5,finish:6,side:"C",readonly:!1,calculate_with:"B",index:1}],2:[{axis:"x",start:3,finish:4,side:"D",readonly:!1,calculate_with:"E",index:2},{axis:"x",start:7,finish:8,side:"E",readonly:!1,calculate_with:"D",index:2},{axis:"x",start:11,finish:12,side:"F",readonly:!1,calculate_with:"E",index:2}],3:[{axis:"y",start:13,finish:14,side:"H",readonly:!1,calculate_with:"G",index:3},{axis:"y",start:9,finish:10,side:"G",readonly:!1,calculate_with:"H",index:3}]}},r_t_shape:{label:{text:"Right - T Shape",x:1,y:4.5},type:"r_t_shape",start_point:{x:650,y:50},start_point:{x:650,y:50},points:{0:{x:0,y:3,angle:1},1:{x:0,y:3},2:{x:2,y:3},3:{x:2,y:3,outer:!0},4:{x:2,y:4,angle:1},5:{x:2,y:4},6:{x:4,y:4,angle:0},7:{x:4,y:4},8:{x:4,y:0,angle:3},9:{x:4,y:0},10:{x:2,y:0,angle:2},11:{x:2,y:0,outer:!0},12:{x:2,y:1},13:{x:2,y:1,outer:!0},14:{x:0,y:1,angle:2},15:{x:0,y:1}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["y"],1:["y"],2:["x","y"],3:["x","y"],4:["x"],5:["x"]},limits:[{point:12,axis:"y",not:"under"},{point:6,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2},{location:{position:"right_over",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[6]},points:{4:["y"],5:["y"],6:["x","y"],7:["x","y"],8:["x"],9:["x"]},limits:[{point:2,axis:"y",not:"under"},{point:2,axis:"y",not:"under"},{point:12,axis:"x",not:"under"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]},{type:"xy",location:{position:"center",points:[12]},points:{10:["x"],11:["x"],12:["x","y"],13:["x","y"],14:["y"],15:["y"]},limits:[{point:6,axis:"x",not:"over"},{point:2,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:10},axis:"y",start:9,finish:10},{location:{position:"left_under",point:11},axis:"x",start:11,finish:12}]}]},step3:{buttons:[{type:"inner_0-90",points:{0:{axis:"y",distance:-2},1:{axis:"x",distance:2}}},{type:"inner_180-270",points:{2:{axis:"x",distance:-2},3:{axis:"y",distance:2}}},{type:"inner_0-90",points:{4:{axis:"y",distance:-2},5:{axis:"x",distance:2}}},{type:"inner_270-360",points:{6:{axis:"x",distance:-2},7:{axis:"y",distance:-2}}},{type:"inner_180-270",points:{8:{axis:"y",distance:2},9:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{10:{axis:"x",distance:2},11:{axis:"y",distance:2}}},{type:"inner_270-360",points:{12:{axis:"y",distance:-2},13:{axis:"x",distance:-2}}},{type:"inner_90-180",points:{14:{axis:"x",distance:2},15:{axis:"y",distance:2}}}],points:[{type:"y",location:{position:"left",points:[0]},points:{0:["y"]},shoots:{0:{1:{axis:"x",distance:-1}}},limits:[{point:1,axis:"y",not:"over"},{point:15,axis:"y",not:"under"}]},{type:"x",location:{position:"under",points:[1]},points:{1:["x"]},shoots:{1:{0:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"under"},{point:3,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"x",start:1,finish:2}]},{type:"x",location:{position:"over",points:[2]},points:{2:["x"]},shoots:{2:{3:{axis:"y",distance:1}}},limits:[{point:1,axis:"x",not:"under"},{point:3,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"x",start:1,finish:2}]},{type:"y",location:{position:"right",points:[3]},points:{3:["y"]},shoots:{3:{2:{axis:"x",distance:1}}},limits:[{point:2,axis:"y",not:"under"},{point:4,axis:"y",not:"over"}],measures:[{location:{position:"left_under",point:3},axis:"y",start:3,finish:4}]},{type:"y",location:{position:"left",points:[4]},points:{4:["y"]},shoots:{4:{5:{axis:"x",distance:1}}},limits:[{point:3,axis:"y",not:"under"},{point:5,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:4},axis:"y",start:3,finish:4}]},{type:"x",location:{position:"under",points:[5]},points:{5:["x"]},shoots:{5:{4:{axis:"y",distance:1}}},limits:[{point:4,axis:"x",not:"under"},{point:6,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:5},axis:"x",start:5,finish:6}]},{type:"x",location:{position:"over",points:[6]},points:{6:["x"]},shoots:{6:{7:{axis:"y",distance:-1}}},limits:[{point:5,axis:"x",not:"under"},{point:7,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"x",start:5,finish:6}]},{type:"y",location:{position:"left",points:[7]},points:{7:["y"]},shoots:{7:{6:{axis:"x",distance:-1}}},limits:[{point:6,axis:"y",not:"over"},{point:8,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:7},axis:"y",start:7,finish:8}]},{type:"y",location:{position:"right",points:[8]},points:{8:["y"]},shoots:{8:{9:{axis:"x",distance:1}}},limits:[{point:7,axis:"y",not:"over"},{point:9,axis:"y",not:"under"}],measures:[{location:{position:"left_over",point:8},axis:"y",start:7,finish:8}]},{type:"x",location:{position:"under",points:[9]},points:{9:["x"]},shoots:{9:{8:{axis:"y",distance:1}}},limits:[{point:8,axis:"x",not:"over"},{point:10,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:9},axis:"x",start:9,finish:10}]},{type:"x",location:{position:"over",points:[10]},points:{10:["x"]},shoots:{10:{11:{axis:"y",distance:1}}},limits:[{point:9,axis:"x",not:"over"},{point:11,axis:"x",not:"under"}],measures:[{location:{position:"left_over",point:10},axis:"x",start:9,finish:10}]},{type:"y",location:{position:"left",points:[11]},points:{11:["y"]},shoots:{11:{10:{axis:"x",distance:1}}},limits:[{point:10,axis:"y",not:"under"},{point:12,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:11},axis:"y",start:11,finish:12}]},{type:"y",location:{position:"right",points:[12]},points:{12:["y"]},shoots:{12:{13:{axis:"x",distance:-1}}},limits:[{point:11,axis:"y",not:"under"},{point:13,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:12},axis:"y",start:11,finish:12}]},{type:"x",location:{position:"over",points:[13]},points:{13:["x"]},shoots:{13:{12:{axis:"y",distance:-1}}},limits:[{point:12,axis:"x",not:"over"},{point:14,axis:"x",not:"uner"}]},{type:"x",location:{position:"under",points:[14]},points:{14:["x"]},shoots:{14:{15:{axis:"y",distance:1}}},limits:[{point:13,axis:"x",not:"over"},{point:15,axis:"x",not:"under"}]},{type:"y",location:{position:"right",points:[15]},points:{15:["y"]},shoots:{15:{14:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"over"},{point:14,axis:"y",not:"under"}]}]}},measures:{0:[{axis:"x",start:14,finish:13,side:"A",readonly:!1,calculate_with:"B",index:0},{axis:"x",start:10,finish:9,side:"B",readonly:!1,calculate_with:"A",index:0}],1:[{axis:"y",start:8,finish:7,side:"C",readonly:!1,calculate_with:"",index:1}],2:[{axis:"x",start:2,finish:1,side:"D",readonly:!1,calculate_with:"E",index:2},{axis:"x",start:6,finish:5,side:"E",readonly:!1,calculate_with:"D",index:2}],3:[{axis:"y",start:12,finish:11,side:"F",readonly:!1,calculate_with:"G",index:3},{axis:"y",start:0,finish:15,side:"G",readonly:!1,calculate_with:"F",index:3},{axis:"y",start:4,finish:3,side:"H",readonly:!1,calculate_with:"G",index:3},]}},b_t_shape:{label:{text:"Bottom - T Shape",x:1,y:4.5},type:"b_t_shape",start_point:{x:650,y:50},points:{0:{x:0,y:2,angle:2},1:{x:0,y:2,outer:!0},2:{x:1,y:2},3:{x:1,y:2,outer:!0},4:{x:1,y:0,angle:2},5:{x:1,y:0},6:{x:3,y:0,angle:3},7:{x:3,y:0},8:{x:3,y:2},9:{x:3,y:2,outer:!0},10:{x:4,y:2,angle:3},11:{x:4,y:2},12:{x:4,y:4,angle:0},13:{x:4,y:4},14:{x:0,y:4,angle:1},15:{x:0,y:4}},drags:{step2:{buttons:[],points:[{type:"xy",location:{position:"center",points:[2]},points:{0:["y"],1:["y"],2:["x","y"],3:["x","y"],4:["x"],5:["x"]},limits:[{point:12,axis:"y",not:"over"},{point:8,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"y",start:1,finish:2},{location:{position:"right_over",point:3},axis:"x",start:3,finish:4}]},{type:"xy",location:{position:"center",points:[8]},points:{6:["x"],7:["x"],8:["x","y"],9:["x","y"],10:["y"],11:["y"]},limits:[{point:12,axis:"x",not:"over"},{point:2,axis:"x",not:"under"},{point:12,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:6},axis:"y",start:5,finish:6},{location:{position:"left_under",point:7},axis:"x",start:7,finish:8}]},{type:"xy",location:{position:"center",points:[12]},points:{10:["x"],11:["x"],12:["x","y"],13:["x","y"],14:["y"],15:["y"]},limits:[{point:8,axis:"x",not:"under"},{point:8,axis:"y",not:"under"},{point:2,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:10},axis:"y",start:9,finish:10},{location:{position:"left_under",point:11},axis:"x",start:11,finish:12}]}]},step3:{buttons:[{type:"inner_90-180",points:{0:{axis:"y",distance:2},1:{axis:"x",distance:2}}},{type:"inner_270-360",points:{2:{axis:"x",distance:-2},3:{axis:"y",distance:-2}}},{type:"inner_90-180",points:{4:{axis:"y",distance:2},5:{axis:"x",distance:2}}},{type:"inner_180-270",points:{6:{axis:"x",distance:-2},7:{axis:"y",distance:2}}},{type:"inner_0-90",points:{8:{axis:"y",distance:-2},9:{axis:"x",distance:2}}},{type:"inner_180-270",points:{10:{axis:"x",distance:-2},11:{axis:"y",distance:2}}},{type:"inner_270-360",points:{12:{axis:"y",distance:-2},13:{axis:"x",distance:-2}}},{type:"inner_0-90",points:{14:{axis:"x",distance:2},15:{axis:"y",distance:-2}}}],points:[{type:"y",location:{position:"left",points:[0]},points:{0:["y"]},shoots:{0:{1:{axis:"x",distance:1}}},limits:[{point:1,axis:"y",not:"under"},{point:15,axis:"y",not:"over"}]},{type:"x",location:{position:"under",points:[1]},points:{1:["x"]},shoots:{1:{0:{axis:"y",distance:1}}},limits:[{point:0,axis:"x",not:"under"},{point:3,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:1},axis:"x",start:1,finish:2}]},{type:"x",location:{position:"over",points:[2]},points:{2:["x"]},shoots:{2:{3:{axis:"y",distance:-1}}},limits:[{point:1,axis:"x",not:"under"},{point:3,axis:"x",not:"over"}],measures:[{location:{position:"left_under",point:2},axis:"x",start:1,finish:2}]},{type:"y",location:{position:"right",points:[3]},points:{3:["y"]},shoots:{3:{2:{axis:"x",distance:-1}}},limits:[{point:2,axis:"y",not:"over"},{point:4,axis:"y",not:"under"}],measures:[{location:{position:"left_under",point:3},axis:"y",start:3,finish:4}]},{type:"y",location:{position:"left",points:[4]},points:{4:["y"]},shoots:{4:{5:{axis:"x",distance:1}}},limits:[{point:3,axis:"y",not:"over"},{point:5,axis:"y",not:"under"}],measures:[{location:{position:"right_over",point:4},axis:"y",start:3,finish:4}]},{type:"x",location:{position:"under",points:[5]},points:{5:["x"]},shoots:{5:{4:{axis:"y",distance:1}}},limits:[{point:4,axis:"x",not:"under"},{point:6,axis:"x",not:"over"}],measures:[{location:{position:"right_over",point:5},axis:"x",start:5,finish:6}]},{type:"x",location:{position:"over",points:[6]},points:{6:["x"]},shoots:{6:{7:{axis:"y",distance:-1}}},limits:[{point:5,axis:"x",not:"under"},{point:7,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:6},axis:"x",start:5,finish:6}]},{type:"y",location:{position:"left",points:[7]},points:{7:["y"]},shoots:{7:{6:{axis:"x",distance:-1}}},limits:[{point:6,axis:"y",not:"under"},{point:8,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:7},axis:"y",start:7,finish:8}]},{type:"y",location:{position:"right",points:[8]},points:{8:["y"]},shoots:{8:{9:{axis:"x",distance:-1}}},limits:[{point:7,axis:"y",not:"under"},{point:9,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:8},axis:"y",start:7,finish:8}]},{type:"x",location:{position:"under",points:[9]},points:{9:["x"]},shoots:{9:{8:{axis:"y",distance:1}}},limits:[{point:8,axis:"x",not:"under"},{point:10,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:9},axis:"x",start:9,finish:10}]},{type:"x",location:{position:"over",points:[10]},points:{10:["x"]},shoots:{10:{11:{axis:"y",distance:-1}}},limits:[{point:9,axis:"x",not:"under"},{point:11,axis:"x",not:"over"}],measures:[{location:{position:"left_over",point:10},axis:"x",start:9,finish:10}]},{type:"y",location:{position:"left",points:[11]},points:{11:["y"]},shoots:{11:{10:{axis:"x",distance:1}}},limits:[{point:10,axis:"y",not:"under"},{point:12,axis:"y",not:"over"}],measures:[{location:{position:"left_over",point:11},axis:"y",start:11,finish:12}]},{type:"y",location:{position:"right",points:[12]},points:{12:["y"]},shoots:{12:{13:{axis:"x",distance:-1}}},limits:[{point:11,axis:"y",not:"under"},{point:13,axis:"y",not:"over"}],measures:[{location:{position:"right_over",point:12},axis:"y",start:11,finish:12}]},{type:"x",location:{position:"over",points:[13]},points:{13:["x"]},shoots:{13:{12:{axis:"y",distance:-1}}},limits:[{point:12,axis:"x",not:"over"},{point:14,axis:"x",not:"uner"}]},{type:"x",location:{position:"under",points:[14]},points:{14:["x"]},shoots:{14:{15:{axis:"y",distance:-1}}},limits:[{point:13,axis:"x",not:"over"},{point:15,axis:"x",not:"under"}]},{type:"y",location:{position:"right",points:[15]},points:{15:["y"]},shoots:{15:{14:{axis:"x",distance:-1}}},limits:[{point:0,axis:"y",not:"under"},{point:14,axis:"y",not:"over"}]}]}},measures:{0:[{axis:"x",start:1,finish:2,side:"A",readonly:!1,calculate_with:"B",index:3},{axis:"x",start:5,finish:6,side:"B",readonly:!1,calculate_with:"A",index:3},{axis:"x",start:9,finish:10,side:"C",readonly:!1,calculate_with:"B",index:3}],1:[{axis:"y",start:7,finish:8,side:"D",readonly:!1,calculate_with:"E",index:3},{axis:"y",start:11,finish:12,side:"E",readonly:!1,calculate_with:"D",index:3}],2:[{axis:"x",start:13,finish:14,side:"F",readonly:!1,calculate_with:"",index:3}],3:[{axis:"y",start:15,finish:0,side:"G",readonly:!1,calculate_with:"H",index:3},{axis:"y",start:3,finish:4,side:"H",readonly:!1,calculate_with:"G",index:3}]}}},tiles:{ids:{tiles:{},edges:{},corners:{}},colors:{tiles:{},edges:{},corners:{}},conf:{corners_diameter:3},colors_default:{"color-primary":"1","color-secondary":"1","color-custom":"1","edges-color":"1","corners-color":"1"},edges:{15.75:{no_available_color:["Ash Pine","Techno Green","Carnival Pink","Island Blue","Turf Green","Teal","Cosmic Purple","Ivory","Terra Cotta","Walnut Brown","Island Blue","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete"]},13:{no_available_color:["Pearl Grey","Island Blue","Techno Green","Teal","Royal Blue","Cosmic Purple","Carnival Pink","Ash Pine","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete"]}},corners:{15.75:{no_available_color:["Island Blue","Techno Green","Carnival Pink","Island Blue","Turf Green","Teal","Cosmic Purple","Ivory","Terra Cotta","Walnut Brown","Royal Blue","Ash Pine","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete"]},13:{no_available_color:["Pearl Grey","Island Blue","Techno Green","Teal","Royal Blue","Cosmic Purple","Carnival Pink","Ash Pine","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete"]}},types:{Vinyltrax:{display:pluginUrl+"img/tiles/vinyltrax_display.png",size:15.75,desc:'15.75"',pattern:pluginUrl+"img/tiles/vinyltrax-Pattern.png",no_available_types:["Floortrax","Sportrax"],no_available_color:["Black Marble","Dark Oak","Canyon Slate","Diamond Plate","Pearl Grey","Pearl Silver","Slate Grey","Jet Black","Racing Red","Citrus Yellow","Terra Cotta","Tropical Orange","Chocolate Brown","Ivory","Mocha Java","Techno Green","Turf Green","Teal","Island Blue","Royal Blue","Cosmic Purple","Carnival Pink","Artic White","Royal Blue","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Medium Maple","Natural Pine"],no_available_edges:[],no_available_corners:[]},Ribtrax:{display:pluginUrl+"img/tiles/ribtrax_display.png",size:15.75,desc:'15.75"',pattern:pluginUrl+"img/tiles/ph-365-pattern.png",price:4,no_available_types:["Floortrax","Sportrax"],no_available_color:["Ash Pine","Ivory","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete"],no_available_edges:[],no_available_corners:[]},"PH-365":{display:pluginUrl+"img/tiles/ribtrax_display.png",size:15.75,desc:'15.75"',pattern:pluginUrl+"img/tiles/ph-365-pattern.png",price:4,no_available_types:["Floortrax","Sportrax"],no_available_color:["Ash Pine","Island Blue","Pearl Grey","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Image Graphictrax","Canyon Slate","Black Marble","Polished Concrete","Turf Green","Terra Cotta","Techno Green","Teal","Ivory","Cosmic Purple","Carnival Pink"],no_available_edges:[],no_available_corners:[]},Graphictrax:{display:pluginUrl+"img/tiles/graphictrax_display.png",size:15.75,desc:'15.75"',pattern:pluginUrl+"img/tiles/graphictrax-pattern.png",no_available_types:["Floortrax","Sportrax"],no_available_color:["Artic White","Pearl Grey","Pearl Silver","Slate Grey","Jet Black","Racing Red","Citrus Yellow","Terra Cotta","Tropical Orange","Chocolate Brown","Ivory","Mocha Java","Techno Green","Turf Green","Teal","Island Blue","Cosmic Purple","Carnival Pink","Ash Pine","Black Oak","Carbon Fiber","Dark Oak","Diamond Plate","Light Maple","Medium Maple","Natural Pine","Reclaimed Pine","Turftrax","Glossy Black","Glossy White","Black Carpet","Grey Carpet","Red Carpet","Canyon Slate","Black Marble","Polished Concrete"],no_available_edges:[],no_available_corners:[]}}}};data.tiles.ids=JSON.parse(fd_data.tiles_ids),data.tiles.colors=JSON.parse(fd_data.tiles_colors),function(t,e){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=t.document?e(t,!0):function(t){if(!t.document)throw Error("jQuery requires a window with a document");return e(t)}:e(t)}("undefined"!=typeof window?window:this,function(t,e){"use strict";var i=[],n=Object.getPrototypeOf,r=i.slice,a=i.flat?function(t){return i.flat.call(t)}:function(t){return i.concat.apply([],t)},o=i.push,l=i.indexOf,c={},u=c.toString,h=c.hasOwnProperty,d=h.toString,p=d.call(Object),f={},g=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType},m=function(t){return null!=t&&t===t.window},v=t.document,x={type:!0,src:!0,nonce:!0,noModule:!0};function y(t,e,i){var n,r,a=(i=i||v).createElement("script");if(a.text=t,e)for(n in x)(r=e[n]||e.getAttribute&&e.getAttribute(n))&&a.setAttribute(n,r);i.head.appendChild(a).parentNode.removeChild(a)}function $(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?c[u.call(t)]||"object":typeof t}var _="3.5.1",b=function(t,e){return new b.fn.init(t,e)};function T(t){var e=!!t&&"length"in t&&t.length,i=$(t);return!g(t)&&!m(t)&&("array"===i||0===e||"number"==typeof e&&0+~]|"+F+")"+F+"*"),Y=RegExp(F+"|>"),V=RegExp(U),W=RegExp("^"+B+"$"),z={ID:RegExp("^#("+B+")"),CLASS:RegExp("^\\.("+B+")"),TAG:RegExp("^("+B+"|[*])"),ATTR:RegExp("^"+j),PSEUDO:RegExp("^"+U),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+F+"*(even|odd|(([+-]|)(\\d*)n|)"+F+"*(?:([+-]|)"+F+"*(\\d+)|))"+F+"*\\)|)","i"),bool:RegExp("^(?:"+N+")$","i"),needsContext:RegExp("^"+F+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+F+"*((?:-\\d)?\\d*)"+F+"*\\)|)(?=[^-]|$)","i")},J=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,tt=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,te=/[+~]/,ti=RegExp("\\\\[\\da-fA-F]{1,6}"+F+"?|\\\\([^\\r\\n\\f])","g"),tn=function(t,e){var i="0x"+t.slice(1)-65536;return e||(i<0?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320))},ts=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,tr=function(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t},ta=function(){p()},to=t_(function(t){return!0===t.disabled&&"fieldset"===t.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{k.apply(R=O.call(b.childNodes),b.childNodes),R[b.childNodes.length].nodeType}catch(tl){k={apply:R.length?function(t,e){I.apply(t,O.call(e))}:function(t,e){for(var i=t.length,n=0;t[i++]=e[n++];);t.length=i-1}}}function tc(t,e,n,r){var a,l,u,h,d,g,x,y=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!r&&(p(e),e=e||f,m)){if(11!==b&&(d=tt.exec(t))){if(a=d[1]){if(9===b){if(!(u=e.getElementById(a)))return n;if(u.id===a)return n.push(u),n}else if(y&&(u=y.getElementById(a))&&$(e,u)&&u.id===a)return n.push(u),n}else{if(d[2])return k.apply(n,e.getElementsByTagName(t)),n;if((a=d[3])&&i.getElementsByClassName&&e.getElementsByClassName)return k.apply(n,e.getElementsByClassName(a)),n}}if(i.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==b||"object"!==e.nodeName.toLowerCase())){if(x=t,y=e,1===b&&(Y.test(t)||q.test(t))){for((y=te.test(t)&&tx(e.parentNode)||e)===e&&i.scope||((h=e.getAttribute("id"))?h=h.replace(ts,tr):e.setAttribute("id",h=_)),l=(g=o(t)).length;l--;)g[l]=(h?"#"+h:":scope")+" "+t$(g[l]);x=g.join(",")}try{return k.apply(n,y.querySelectorAll(x)),n}catch(T){A(t,!0)}finally{h===_&&e.removeAttribute("id")}}}return c(t.replace(G,"$1"),e,n,r)}function tu(){var t=[];return function e(i,r){return t.push(i+" ")>n.cacheLength&&delete e[t.shift()],e[i+" "]=r}}function th(t){return t[_]=!0,t}function td(t){var e=f.createElement("fieldset");try{return!!t(e)}catch(i){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function tp(t,e){for(var i=t.split("|"),r=i.length;r--;)n.attrHandle[i[r]]=e}function tf(t,e){var i=e&&t,n=i&&1===t.nodeType&&1===e.nodeType&&t.sourceIndex-e.sourceIndex;if(n)return n;if(i){for(;i=i.nextSibling;)if(i===e)return -1}return t?1:-1}function t8(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function tg(t){return function(e){var i=e.nodeName.toLowerCase();return("input"===i||"button"===i)&&e.type===t}}function tm(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||!t!==e.isDisabled&&to(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function tv(t){return th(function(e){return e=+e,th(function(i,n){for(var r,a=t([],i.length,e),o=a.length;o--;)i[r=a[o]]&&(i[r]=!(n[r]=i[r]))})})}function tx(t){return t&&void 0!==t.getElementsByTagName&&t}for(e in i=tc.support={},a=tc.isXML=function(t){var e=t.namespaceURI,i=(t.ownerDocument||t).documentElement;return!J.test(e||i&&i.nodeName||"HTML")},p=tc.setDocument=function(t){var e,r,o=t?t.ownerDocument||t:b;return o!=f&&9===o.nodeType&&o.documentElement&&(g=(f=o).documentElement,m=!a(f),b!=f&&(r=f.defaultView)&&r.top!==r&&(r.addEventListener?r.addEventListener("unload",ta,!1):r.attachEvent&&r.attachEvent("onunload",ta)),i.scope=td(function(t){return g.appendChild(t).appendChild(f.createElement("div")),void 0!==t.querySelectorAll&&!t.querySelectorAll(":scope fieldset div").length}),i.attributes=td(function(t){return t.className="i",!t.getAttribute("className")}),i.getElementsByTagName=td(function(t){return t.appendChild(f.createComment("")),!t.getElementsByTagName("*").length}),i.getElementsByClassName=Z.test(f.getElementsByClassName),i.getById=td(function(t){return g.appendChild(t).id=_,!f.getElementsByName||!f.getElementsByName(_).length}),i.getById?(n.filter.ID=function(t){var e=t.replace(ti,tn);return function(t){return t.getAttribute("id")===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i=e.getElementById(t);return i?[i]:[]}}):(n.filter.ID=function(t){var e=t.replace(ti,tn);return function(t){var i=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return i&&i.value===e}},n.find.ID=function(t,e){if(void 0!==e.getElementById&&m){var i,n,r,a=e.getElementById(t);if(a){if((i=a.getAttributeNode("id"))&&i.value===t)return[a];for(r=e.getElementsByName(t),n=0;a=r[n++];)if((i=a.getAttributeNode("id"))&&i.value===t)return[a]}return[]}}),n.find.TAG=i.getElementsByTagName?function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):i.qsa?e.querySelectorAll(t):void 0}:function(t,e){var i,n=[],r=0,a=e.getElementsByTagName(t);if("*"===t){for(;i=a[r++];)1===i.nodeType&&n.push(i);return n}return a},n.find.CLASS=i.getElementsByClassName&&function(t,e){if(void 0!==e.getElementsByClassName&&m)return e.getElementsByClassName(t)},x=[],v=[],(i.qsa=Z.test(f.querySelectorAll))&&(td(function(t){var e;g.appendChild(t).innerHTML="",t.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+F+"*(?:''|\"\")"),t.querySelectorAll("[selected]").length||v.push("\\["+F+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+_+"-]").length||v.push("~="),(e=f.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||v.push("\\["+F+"*name"+F+"*="+F+"*(?:''|\"\")"),t.querySelectorAll(":checked").length||v.push(":checked"),t.querySelectorAll("a#"+_+"+*").length||v.push(".#.+[+~]"),t.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),td(function(t){t.innerHTML="";var e=f.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),t.querySelectorAll("[name=d]").length&&v.push("name"+F+"*[*^$|!~]?="),2!==t.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),g.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),v.push(",.*:")})),(i.matchesSelector=Z.test(y=g.matches||g.webkitMatchesSelector||g.mozMatchesSelector||g.oMatchesSelector||g.msMatchesSelector))&&td(function(t){i.disconnectedMatch=y.call(t,"*"),y.call(t,"[s!='']:x"),x.push("!=",U)}),v=v.length&&RegExp(v.join("|")),x=x.length&&RegExp(x.join("|")),$=(e=Z.test(g.compareDocumentPosition))||Z.test(g.contains)?function(t,e){var i=9===t.nodeType?t.documentElement:t,n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(i.contains?i.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))}:function(t,e){if(e){for(;e=e.parentNode;)if(e===t)return!0}return!1},P=e?function(t,e){if(t===e)return d=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!i.sortDetached&&e.compareDocumentPosition(t)===n?t==f||t.ownerDocument==b&&$(b,t)?-1:e==f||e.ownerDocument==b&&$(b,e)?1:h?M(h,t)-M(h,e):0:4&n?-1:1)}:function(t,e){if(t===e)return d=!0,0;var i,n=0,r=t.parentNode,a=e.parentNode,o=[t],l=[e];if(!r||!a)return t==f?-1:e==f?1:r?-1:a?1:h?M(h,t)-M(h,e):0;if(r===a)return tf(t,e);for(i=t;i=i.parentNode;)o.unshift(i);for(i=e;i=i.parentNode;)l.unshift(i);for(;o[n]===l[n];)n++;return n?tf(o[n],l[n]):o[n]==b?-1:l[n]==b?1:0}),f},tc.matches=function(t,e){return tc(t,null,null,e)},tc.matchesSelector=function(t,e){if(p(t),i.matchesSelector&&m&&!A[e+" "]&&(!x||!x.test(e))&&(!v||!v.test(e)))try{var n=y.call(t,e);if(n||i.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(r){A(e,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(ti,tn),t[3]=(t[3]||t[4]||t[5]||"").replace(ti,tn),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||tc.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&tc.error(t[0]),t},PSEUDO:function(t){var e,i=!t[6]&&t[2];return z.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":i&&V.test(i)&&(e=o(i,!0))&&(e=i.indexOf(")",i.length-e)-i.length)&&(t[0]=t[0].slice(0,e),t[2]=i.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(ti,tn).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=E[t+" "];return e||(e=RegExp("(^|"+F+")"+t+"("+F+"|$)"),E(t,function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,i){return function(n){var r=tc.attr(n,t);return null==r?"!="===e:!e||(r+="","="===e?r===i:"!="===e?r!==i:"^="===e?i&&0===r.indexOf(i):"*="===e?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function L(t,e,i){return g(e)?b.grep(t,function(t,n){return!!e.call(t,n,t)!==i}):e.nodeType?b.grep(t,function(t){return t===e!==i}):"string"!=typeof e?b.grep(t,function(t){return -1)[^>]*|#([\w-]+))$/;(b.fn.init=function(t,e,i){var n,r;if(!t)return this;if(i=i||R,"string"==typeof t){if(!(n="<"===t[0]&&">"===t[t.length-1]&&3<=t.length?[null,t,null]:D.exec(t))||!n[1]&&e)return!e||e.jquery?(e||i).find(t):this.constructor(e).find(t);if(n[1]){if(e=e instanceof b?e[0]:e,b.merge(this,b.parseHTML(n[1],e&&e.nodeType?e.ownerDocument||e:v,!0)),P.test(n[1])&&b.isPlainObject(e))for(n in e)g(this[n])?this[n](e[n]):this.attr(n,e[n]);return this}return(r=v.getElementById(n[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):g(t)?void 0!==i.ready?i.ready(t):t(b):b.makeArray(t,this)}).prototype=b.fn,R=b(v);var I=/^(?:parents|prev(?:Until|All))/,k={children:!0,contents:!0,next:!0,prev:!0};function O(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}b.fn.extend({has:function(t){var e=b(t,this),i=e.length;return this.filter(function(){for(var t=0;t\x20\t\r\n\f]*)/i,t8=/^$|^module$|\/(?:java|ecma)script/i;th=v.createDocumentFragment().appendChild(v.createElement("div")),(td=v.createElement("input")).setAttribute("type","radio"),td.setAttribute("checked","checked"),td.setAttribute("name","t"),th.appendChild(td),f.checkClone=th.cloneNode(!0).cloneNode(!0).lastChild.checked,th.innerHTML="",f.noCloneChecked=!!th.cloneNode(!0).lastChild.defaultValue,th.innerHTML="",f.option=!!th.lastChild;var tg={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function tm(t,e){var i;return i=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?b.merge([t],i):i}function tv(t,e){for(var i=0,n=t.length;i",""]);var tx=/<|&#?\w+;/;function ty(t,e,i,n,r){for(var a,o,l,c,u,h,d=e.createDocumentFragment(),p=[],f=0,g=t.length;f\s*$/g;function tL(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&b(t).children("tbody")[0]||t}function tR(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function tD(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function tI(t,e){var i,n,r,a,o,l;if(1===e.nodeType){if(J.hasData(t)&&(l=J.get(t).events))for(r in J.remove(e,"handle events"),l)for(i=0,n=l[r].length;ib.inArray(this,t)&&(b.cleanData(tm(this)),i&&i.replaceChild(e,this))},t)}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){b.fn[t]=function(t){for(var i,n=[],r=b(t),a=r.length-1,l=0;l<=a;l++)i=l===a?this:this.clone(!0),b(r[l])[e](i),o.apply(n,i.get());return this.pushStack(n)}});var t1=RegExp("^("+te+")(?!px)[a-z%]+$","i"),tM=function(e){var i=e.ownerDocument.defaultView;return i&&i.opener||(i=t),i.getComputedStyle(e)},t3=function(t,e,i){var n,r,a={};for(r in e)a[r]=t.style[r],t.style[r]=e[r];for(r in n=i.call(t),e)t.style[r]=a[r];return n},t2=RegExp(tn.join("|"),"i");function tN(t,e,i){var n,r,a,o,l=t.style;return(i=i||tM(t))&&(""!==(o=i.getPropertyValue(e)||i[e])||tr(t)||(o=b.style(t,e)),!f.pixelBoxStyles()&&t1.test(o)&&t2.test(e)&&(n=l.width,r=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=o,o=i.width,l.width=n,l.minWidth=r,l.maxWidth=a)),void 0!==o?o+"":o}function tF(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function e(){if(h){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ts.appendChild(u).appendChild(h);var e=t.getComputedStyle(h);n="1%"!==e.top,c=12===i(e.marginLeft),h.style.right="60%",o=36===i(e.right),r=36===i(e.width),h.style.position="absolute",a=12===i(h.offsetWidth/3),ts.removeChild(u),h=null}}function i(t){return Math.round(parseFloat(t))}var n,r,a,o,l,c,u=v.createElement("div"),h=v.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",f.clearCloneStyle="content-box"===h.style.backgroundClip,b.extend(f,{boxSizingReliable:function(){return e(),r},pixelBoxStyles:function(){return e(),o},pixelPosition:function(){return e(),n},reliableMarginLeft:function(){return e(),c},scrollboxSize:function(){return e(),a},reliableTrDimensions:function(){var e,i,n,r;return null==l&&(e=v.createElement("table"),i=v.createElement("tr"),n=v.createElement("div"),e.style.cssText="position:absolute;left:-11111px",i.style.height="1px",n.style.height="9px",ts.appendChild(e).appendChild(i).appendChild(n),l=3n.indexOf(" "+a+" ")&&(n+=a+" ");r!==(l=ea(n))&&i.setAttribute("class",l)}}return this},removeClass:function(t){var e,i,n,r,a,o,l,c=0;if(g(t))return this.each(function(e){b(this).removeClass(t.call(this,e,eo(this)))});if(!arguments.length)return this.attr("class","");if((e=el(t)).length){for(;i=this[c++];)if(r=eo(i),n=1===i.nodeType&&" "+ea(r)+" "){for(o=0;a=e[o++];)for(;-1y.indexOf(":")&&"on"+y,(e=e[b.expando]?e:new b.Event(y,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=$.join("."),e.rnamespace=e.namespace?RegExp("(^|\\.)"+$.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),i=null==i?[e]:b.makeArray(i,[e]),p=b.event.special[y]||{},r||!p.trigger||!1!==p.trigger.apply(n,i))){if(!r&&!p.noBubble&&!m(n)){for(c=p.delegateType||y,eu.test(c+y)||(o=o.parentNode);o;o=o.parentNode)x.push(o),l=o;l===(n.ownerDocument||v)&&x.push(l.defaultView||l.parentWindow||t)}for(a=0;(o=x[a++])&&!e.isPropagationStopped();)f=o,e.type=1").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",i=function(t){e.remove(),i=null,t&&r("error"===t.type?404:200,t.type)}),v.head.appendChild(e[0])},abort:function(){i&&i()}}});var eI,ek=[],eO=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=ek.pop()||b.expando+"_"+ep.guid++;return this[t]=!0,t}}),b.ajaxPrefilter("json jsonp",function(e,i,n){var r,a,o,l=!1!==e.jsonp&&(eO.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&eO.test(e.data)&&"data");if(l||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=g(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,l?e[l]=e[l].replace(eO,"$1"+r):!1!==e.jsonp&&(e.url+=(ef.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||b.error(r+" was not called"),o[0]},e.dataTypes[0]="json",a=t[r],t[r]=function(){o=arguments},n.always(function(){void 0===a?b(t).removeProp(r):t[r]=a,e[r]&&(e.jsonpCallback=i.jsonpCallback,ek.push(r)),o&&g(a)&&a(o[0]),o=a=void 0}),"script"}),f.createHTMLDocument=((eI=v.implementation.createHTMLDocument("").body).innerHTML="
",2===eI.childNodes.length),b.parseHTML=function(t,e,i){var n,r,a;return"string"!=typeof t?[]:("boolean"==typeof e&&(i=e,e=!1),e||(f.createHTMLDocument?((n=(e=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,e.head.appendChild(n)):e=v),a=!i&&[],(r=P.exec(t))?[e.createElement(r[1])]:(r=ty([t],e,a),a&&a.length&&b(a).remove(),b.merge([],r.childNodes)))},b.fn.load=function(t,e,i){var n,r,a,o=this,l=t.indexOf(" ");return -1").append(b.parseHTML(t)).find(n):t)}).always(i&&function(t,e){o.each(function(){i.apply(this,a||[t.responseText,e,t])})}),this},b.expr.pseudos.animated=function(t){return b.grep(b.timers,function(e){return t===e.elem}).length},b.offset={setOffset:function(t,e,i){var n,r,a,o,l,c,u=b.css(t,"position"),h=b(t),d={};"static"===u&&(t.style.position="relative"),l=h.offset(),a=b.css(t,"top"),c=b.css(t,"left"),("absolute"===u||"fixed"===u)&&-1<(a+c).indexOf("auto")?(o=(n=h.position()).top,r=n.left):(o=parseFloat(a)||0,r=parseFloat(c)||0),g(e)&&(e=e.call(t,i,b.extend({},l))),null!=e.top&&(d.top=e.top-l.top+o),null!=e.left&&(d.left=e.left-l.left+r),"using"in e?e.using.call(t,d):("number"==typeof d.top&&(d.top+="px"),"number"==typeof d.left&&(d.left+="px"),h.css(d))}},b.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){b.offset.setOffset(this,t,e)});var e,i,n=this[0];return n?n.getClientRects().length?(e=n.getBoundingClientRect(),i=n.ownerDocument.defaultView,{top:e.top+i.pageYOffset,left:e.left+i.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,i,n=this[0],r={top:0,left:0};if("fixed"===b.css(n,"position"))e=n.getBoundingClientRect();else{for(e=this.offset(),i=n.ownerDocument,t=n.offsetParent||i.documentElement;t&&(t===i.body||t===i.documentElement)&&"static"===b.css(t,"position");)t=t.parentNode;t&&t!==n&&1===t.nodeType&&((r=b(t).offset()).top+=b.css(t,"borderTopWidth",!0),r.left+=b.css(t,"borderLeftWidth",!0))}return{top:e.top-r.top-b.css(n,"marginTop",!0),left:e.left-r.left-b.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent;t&&"static"===b.css(t,"position");)t=t.offsetParent;return t||ts})}}),b.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,e){var i="pageYOffset"===e;b.fn[t]=function(n){return G(this,function(t,n,r){var a;if(m(t)?a=t:9===t.nodeType&&(a=t.defaultView),void 0===r)return a?a[e]:t[n];a?a.scrollTo(i?a.pageXOffset:r,i?r:a.pageYOffset):t[n]=r},t,n,arguments.length)}}),b.each(["top","left"],function(t,e){b.cssHooks[e]=tF(f.pixelPosition,function(t,i){if(i)return i=tN(t,e),t1.test(i)?b(t).position()[e]+"px":i})}),b.each({Height:"height",Width:"width"},function(t,e){b.each({padding:"inner"+t,content:e,"":"outer"+t},function(i,n){b.fn[n]=function(r,a){var o=arguments.length&&(i||"boolean"!=typeof r),l=i||(!0===r||!0===a?"margin":"border");return G(this,function(e,i,r){var a;return m(e)?0===n.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(a=e.documentElement,Math.max(e.body["scroll"+t],a["scroll"+t],e.body["offset"+t],a["offset"+t],a["client"+t])):void 0===r?b.css(e,i,l):b.style(e,i,r,l)},e,o?r:void 0,o)}})}),b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){b.fn[e]=function(t){return this.on(e,t)}}),b.fn.extend({bind:function(t,e,i){return this.on(t,null,e,i)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,i,n){return this.on(e,t,i,n)},undelegate:function(t,e,i){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",i)},hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)}}),b.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(t,e){b.fn[e]=function(t,i){return 0i;i++)if(e===t[i])return i;return -1},this.createjs=this.createjs||{},function(){"use strict";function t(){throw"UID cannot be instantiated"}t._nextID=0,t.get=function(){return t._nextID++},createjs.UID=t}(),this.createjs=this.createjs||{},createjs.deprecate=function(t,e){return function(){var i="Deprecated property or method '"+e+"'. See docs for info.";return console&&(console.warn?console.warn(i):console.log(i)),t&&t.apply(this,arguments)}},this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.type=t,this.target=null,this.currentTarget=null,this.eventPhase=0,this.bubbles=!!e,this.cancelable=!!i,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.immediatePropagationStopped=!1,this.removed=!1}var e=t.prototype;e.preventDefault=function(){this.defaultPrevented=this.cancelable&&!0},e.stopPropagation=function(){this.propagationStopped=!0},e.stopImmediatePropagation=function(){this.immediatePropagationStopped=this.propagationStopped=!0},e.remove=function(){this.removed=!0},e.clone=function(){return new t(this.type,this.bubbles,this.cancelable)},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[Event (type="+this.type+")]"},createjs.Event=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this._listeners=null,this._captureListeners=null}var e=t.prototype;t.initialize=function(t){t.addEventListener=e.addEventListener,t.on=e.on,t.removeEventListener=t.off=e.removeEventListener,t.removeAllEventListeners=e.removeAllEventListeners,t.hasEventListener=e.hasEventListener,t.dispatchEvent=e.dispatchEvent,t._dispatchEvent=e._dispatchEvent,t.willTrigger=e.willTrigger},e.addEventListener=function(t,e,i){var n,r=(n=i?this._captureListeners=this._captureListeners||{}:this._listeners=this._listeners||{})[t];return r&&this.removeEventListener(t,e,i),(r=n[t])?r.push(e):n[t]=[e],e},e.on=function(t,e,i,n,r,a){return e.handleEvent&&(i=i||e,e=e.handleEvent),i=i||this,this.addEventListener(t,function(t){e.call(i,t,r),n&&t.remove()},a)},e.removeEventListener=function(t,e,i){var n=i?this._captureListeners:this._listeners;if(n){var r=n[t];if(r){for(var a=0,o=r.length;o>a;a++)if(r[a]==e){1==o?delete n[t]:r.splice(a,1);break}}}},e.off=e.removeEventListener,e.removeAllEventListeners=function(t){t?(this._listeners&&delete this._listeners[t],this._captureListeners&&delete this._captureListeners[t]):this._listeners=this._captureListeners=null},e.dispatchEvent=function(t,e,i){if("string"==typeof t){var n=this._listeners;if(!(e||n&&n[t]))return!0;t=new createjs.Event(t,e,i)}else t.target&&t.clone&&(t=t.clone());try{t.target=this}catch(r){}if(t.bubbles&&this.parent){for(var a=this,o=[a];a.parent;)o.push(a=a.parent);var l,c=o.length;for(l=c-1;l>=0&&!t.propagationStopped;l--)o[l]._dispatchEvent(t,1+(0==l));for(l=1;c>l&&!t.propagationStopped;l++)o[l]._dispatchEvent(t,3)}else this._dispatchEvent(t,2);return!t.defaultPrevented},e.hasEventListener=function(t){var e=this._listeners,i=this._captureListeners;return!!(e&&e[t]||i&&i[t])},e.willTrigger=function(t){for(var e=this;e;){if(e.hasEventListener(t))return!0;e=e.parent}return!1},e.toString=function(){return"[EventDispatcher]"},e._dispatchEvent=function(t,e){var i,n,r=2>=e?this._captureListeners:this._listeners;if(t&&r&&(n=r[t.type])&&(i=n.length)){try{t.currentTarget=this}catch(a){}try{t.eventPhase=0|e}catch(o){}t.removed=!1,n=n.slice();for(var l=0;i>l&&!t.immediatePropagationStopped;l++){var c=n[l];c.handleEvent?c.handleEvent(t):c(t),t.removed&&(this.off(t.type,c,1==e),t.removed=!1)}}2===e&&this._dispatchEvent(t,2.1)},createjs.EventDispatcher=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Ticker cannot be instantiated."}t.RAF_SYNCHED="synched",t.RAF="raf",t.TIMEOUT="timeout",t.timingMode=null,t.maxDelta=0,t.paused=!1,t.removeEventListener=null,t.removeAllEventListeners=null,t.dispatchEvent=null,t.hasEventListener=null,t._listeners=null,createjs.EventDispatcher.initialize(t),t._addEventListener=t.addEventListener,t.addEventListener=function(){return t._inited||t.init(),t._addEventListener.apply(t,arguments)},t._inited=!1,t._startTime=0,t._pausedTime=0,t._ticks=0,t._pausedTicks=0,t._interval=50,t._lastTime=0,t._times=null,t._tickTimes=null,t._timerId=null,t._raf=!0,t._setInterval=function(e){t._interval=e,t._inited&&t._setupTick()},t.setInterval=createjs.deprecate(t._setInterval,"Ticker.setInterval"),t._getInterval=function(){return t._interval},t.getInterval=createjs.deprecate(t._getInterval,"Ticker.getInterval"),t._setFPS=function(e){t._setInterval(1e3/e)},t.setFPS=createjs.deprecate(t._setFPS,"Ticker.setFPS"),t._getFPS=function(){return 1e3/t._interval},t.getFPS=createjs.deprecate(t._getFPS,"Ticker.getFPS");try{Object.defineProperties(t,{interval:{get:t._getInterval,set:t._setInterval},framerate:{get:t._getFPS,set:t._setFPS}})}catch(e){console.log(e)}t.init=function(){t._inited||(t._inited=!0,t._times=[],t._tickTimes=[],t._startTime=t._getTime(),t._times.push(t._lastTime=0),t.interval=t._interval)},t.reset=function(){if(t._raf){var e=window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||window.oCancelAnimationFrame||window.msCancelAnimationFrame;e&&e(t._timerId)}else clearTimeout(t._timerId);t.removeAllEventListeners("tick"),t._timerId=t._times=t._tickTimes=null,t._startTime=t._lastTime=t._ticks=t._pausedTime=0,t._inited=!1},t.getMeasuredTickTime=function(e){var i=0,n=t._tickTimes;if(!n||n.length<1)return -1;e=Math.min(n.length,e||0|t._getFPS());for(var r=0;e>r;r++)i+=n[r];return i/e},t.getMeasuredFPS=function(e){var i=t._times;return!i||i.length<2?-1:(e=Math.min(i.length-1,e||0|t._getFPS()),1e3/((i[0]-i[e])/e))},t.getTime=function(e){return t._startTime?t._getTime()-(e?t._pausedTime:0):-1},t.getEventTime=function(e){return t._startTime?(t._lastTime||t._startTime)-(e?t._pausedTime:0):-1},t.getTicks=function(e){return t._ticks-(e?t._pausedTicks:0)},t._handleSynch=function(){t._timerId=null,t._setupTick(),t._getTime()-t._lastTime>=.97*(t._interval-1)&&t._tick()},t._handleRAF=function(){t._timerId=null,t._setupTick(),t._tick()},t._handleTimeout=function(){t._timerId=null,t._setupTick(),t._tick()},t._setupTick=function(){if(null==t._timerId){var e=t.timingMode;if(e==t.RAF_SYNCHED||e==t.RAF){var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;if(i)return t._timerId=i(e==t.RAF?t._handleRAF:t._handleSynch),void(t._raf=!0)}t._raf=!1,t._timerId=setTimeout(t._handleTimeout,t._interval)}},t._tick=function(){var e=t.paused,i=t._getTime(),n=i-t._lastTime;if(t._lastTime=i,t._ticks++,e&&(t._pausedTicks++,t._pausedTime+=n),t.hasEventListener("tick")){var r=new createjs.Event("tick"),a=t.maxDelta;r.delta=a&&n>a?a:n,r.paused=e,r.time=i,r.runTime=i-t._pausedTime,t.dispatchEvent(r)}for(t._tickTimes.unshift(t._getTime()-i);t._tickTimes.length>100;)t._tickTimes.pop();for(t._times.unshift(i);t._times.length>100;)t._times.pop()};var i=window,n=i.performance.now||i.performance.mozNow||i.performance.msNow||i.performance.oNow||i.performance.webkitNow;t._getTime=function(){return(n&&n.call(i.performance)||(new Date).getTime())-t._startTime},createjs.Ticker=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.readyState=t.readyState,this._video=t,this._canvas=null,this._lastTime=-1,this.readyState<2&&t.addEventListener("canplaythrough",this._videoReady.bind(this))}var e=t.prototype;e.getImage=function(){if(!(this.readyState<2)){var t=this._canvas,e=this._video;if(t||((t=this._canvas=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")).width=e.videoWidth,t.height=e.videoHeight),e.readyState>=2&&e.currentTime!==this._lastTime){var i=t.getContext("2d");i.clearRect(0,0,t.width,t.height),i.drawImage(e,0,0,t.width,t.height),this._lastTime=e.currentTime}return t}},e._videoReady=function(){this.readyState=2},createjs.VideoBuffer=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n,r,a,o,l,c,u,h){this.Event_constructor(t,e,i),this.stageX=n,this.stageY=r,this.rawX=null==c?n:c,this.rawY=null==u?r:u,this.nativeEvent=a,this.pointerID=o,this.primary=!!l,this.relatedTarget=h}var e=createjs.extend(t,createjs.Event);e._get_localX=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).x},e._get_localY=function(){return this.currentTarget.globalToLocal(this.rawX,this.rawY).y},e._get_isTouch=function(){return -1!==this.pointerID};try{Object.defineProperties(e,{localX:{get:e._get_localX},localY:{get:e._get_localY},isTouch:{get:e._get_isTouch}})}catch(i){}e.clone=function(){return new t(this.type,this.bubbles,this.cancelable,this.stageX,this.stageY,this.nativeEvent,this.pointerID,this.primary,this.rawX,this.rawY)},e.toString=function(){return"[MouseEvent (type="+this.type+" stageX="+this.stageX+" stageY="+this.stageY+")]"},createjs.MouseEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n,r,a){this.setValues(t,e,i,n,r,a)}var e=t.prototype;t.DEG_TO_RAD=Math.PI/180,t.identity=null,e.setValues=function(t,e,i,n,r,a){return this.a=null==t?1:t,this.b=e||0,this.c=i||0,this.d=null==n?1:n,this.tx=r||0,this.ty=a||0,this},e.append=function(t,e,i,n,r,a){var o=this.a,l=this.b,c=this.c,u=this.d;return(1!=t||0!=e||0!=i||1!=n)&&(this.a=o*t+c*e,this.b=l*t+u*e,this.c=o*i+c*n,this.d=l*i+u*n),this.tx=o*r+c*a+this.tx,this.ty=l*r+u*a+this.ty,this},e.prepend=function(t,e,i,n,r,a){var o=this.a,l=this.c,c=this.tx;return this.a=t*o+i*this.b,this.b=e*o+n*this.b,this.c=t*l+i*this.d,this.d=e*l+n*this.d,this.tx=t*c+i*this.ty+r,this.ty=e*c+n*this.ty+a,this},e.appendMatrix=function(t){return this.append(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.prependMatrix=function(t){return this.prepend(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.appendTransform=function(e,i,n,r,a,o,l,c,u){if(a%360)var h=a*t.DEG_TO_RAD,d=Math.cos(h),p=Math.sin(h);else d=1,p=0;return o||l?(o*=t.DEG_TO_RAD,l*=t.DEG_TO_RAD,this.append(Math.cos(l),Math.sin(l),-Math.sin(o),Math.cos(o),e,i),this.append(d*n,p*n,-p*r,d*r,0,0)):this.append(d*n,p*n,-p*r,d*r,e,i),(c||u)&&(this.tx-=c*this.a+u*this.c,this.ty-=c*this.b+u*this.d),this},e.prependTransform=function(e,i,n,r,a,o,l,c,u){if(a%360)var h=a*t.DEG_TO_RAD,d=Math.cos(h),p=Math.sin(h);else d=1,p=0;return(c||u)&&(this.tx-=c,this.ty-=u),o||l?(o*=t.DEG_TO_RAD,l*=t.DEG_TO_RAD,this.prepend(d*n,p*n,-p*r,d*r,0,0),this.prepend(Math.cos(l),Math.sin(l),-Math.sin(o),Math.cos(o),e,i)):this.prepend(d*n,p*n,-p*r,d*r,e,i),this},e.rotate=function(e){var i=Math.cos(e*=t.DEG_TO_RAD),n=Math.sin(e),r=this.a,a=this.b;return this.a=r*i+this.c*n,this.b=a*i+this.d*n,this.c=-r*n+this.c*i,this.d=-a*n+this.d*i,this},e.skew=function(e,i){return e*=t.DEG_TO_RAD,i*=t.DEG_TO_RAD,this.append(Math.cos(i),Math.sin(i),-Math.sin(e),Math.cos(e),0,0),this},e.scale=function(t,e){return this.a*=t,this.b*=t,this.c*=e,this.d*=e,this},e.translate=function(t,e){return this.tx+=this.a*t+this.c*e,this.ty+=this.b*t+this.d*e,this},e.identity=function(){return this.a=this.d=1,this.b=this.c=this.tx=this.ty=0,this},e.invert=function(){var t=this.a,e=this.b,i=this.c,n=this.d,r=this.tx,a=t*n-e*i;return this.a=n/a,this.b=-e/a,this.c=-i/a,this.d=t/a,this.tx=(i*this.ty-n*r)/a,this.ty=-(t*this.ty-e*r)/a,this},e.isIdentity=function(){return 0===this.tx&&0===this.ty&&1===this.a&&0===this.b&&0===this.c&&1===this.d},e.equals=function(t){return this.tx===t.tx&&this.ty===t.ty&&this.a===t.a&&this.b===t.b&&this.c===t.c&&this.d===t.d},e.transformPoint=function(t,e,i){return(i=i||{}).x=t*this.a+e*this.c+this.tx,i.y=t*this.b+e*this.d+this.ty,i},e.decompose=function(e){null==e&&(e={}),e.x=this.tx,e.y=this.ty,e.scaleX=Math.sqrt(this.a*this.a+this.b*this.b),e.scaleY=Math.sqrt(this.c*this.c+this.d*this.d);var i=Math.atan2(-this.c,this.d),n=Math.atan2(this.b,this.a);return 1e-5>Math.abs(1-i/n)?(e.rotation=n/t.DEG_TO_RAD,this.a<0&&this.d>=0&&(e.rotation+=e.rotation<=0?180:-180),e.skewX=e.skewY=0):(e.skewX=i/t.DEG_TO_RAD,e.skewY=n/t.DEG_TO_RAD),e},e.copy=function(t){return this.setValues(t.a,t.b,t.c,t.d,t.tx,t.ty)},e.clone=function(){return new t(this.a,this.b,this.c,this.d,this.tx,this.ty)},e.toString=function(){return"[Matrix2D (a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+")]"},t.identity=new t,createjs.Matrix2D=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n,r){this.setValues(t,e,i,n,r)}var e=t.prototype;e.setValues=function(t,e,i,n,r){return this.visible=null==t||!!t,this.alpha=null==e?1:e,this.shadow=i,this.compositeOperation=n,this.matrix=r||this.matrix&&this.matrix.identity()||new createjs.Matrix2D,this},e.append=function(t,e,i,n,r){return this.alpha*=e,this.shadow=i||this.shadow,this.compositeOperation=n||this.compositeOperation,this.visible=this.visible&&t,r&&this.matrix.appendMatrix(r),this},e.prepend=function(t,e,i,n,r){return this.alpha*=e,this.shadow=this.shadow||i,this.compositeOperation=this.compositeOperation||n,this.visible=this.visible&&t,r&&this.matrix.prependMatrix(r),this},e.identity=function(){return this.visible=!0,this.alpha=1,this.shadow=this.compositeOperation=null,this.matrix.identity(),this},e.clone=function(){return new t(this.alpha,this.shadow,this.compositeOperation,this.visible,this.matrix.clone())},createjs.DisplayProps=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.setValues(t,e)}var e=t.prototype;e.setValues=function(t,e){return this.x=t||0,this.y=e||0,this},e.copy=function(t){return this.x=t.x,this.y=t.y,this},e.clone=function(){return new t(this.x,this.y)},e.toString=function(){return"[Point (x="+this.x+" y="+this.y+")]"},createjs.Point=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n){this.setValues(t,e,i,n)}var e=t.prototype;e.setValues=function(t,e,i,n){return this.x=t||0,this.y=e||0,this.width=i||0,this.height=n||0,this},e.extend=function(t,e,i,n){return n=n||0,t+(i=i||0)>this.x+this.width&&(this.width=t+i-this.x),e+n>this.y+this.height&&(this.height=e+n-this.y),t=this.x&&t+i<=this.x+this.width&&e>=this.y&&e+n<=this.y+this.height},e.union=function(t){return this.clone().extend(t.x,t.y,t.width,t.height)},e.intersection=function(e){var i=e.x,n=e.y,r=i+e.width,a=n+e.height;return this.x>i&&(i=this.x),this.y>n&&(n=this.y),this.x+this.width=r||n>=a?null:new t(i,n,r-i,a-n)},e.intersects=function(t){return t.x<=this.x+this.width&&this.x<=t.x+t.width&&t.y<=this.y+this.height&&this.y<=t.y+t.height},e.isEmpty=function(){return this.width<=0||this.height<=0},e.clone=function(){return new t(this.x,this.y,this.width,this.height)},e.toString=function(){return"[Rectangle (x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+")]"},createjs.Rectangle=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n,r,a,o){t.addEventListener&&(this.target=t,this.overLabel=null==i?"over":i,this.outLabel=null==e?"out":e,this.downLabel=null==n?"down":n,this.play=r,this._isPressed=!1,this._isOver=!1,this._enabled=!1,t.mouseChildren=!1,this.enabled=!0,this.handleEvent({}),a&&(o&&(a.actionsEnabled=!1,a.gotoAndStop&&a.gotoAndStop(o)),t.hitArea=a))}var e=t.prototype;e._setEnabled=function(t){if(t!=this._enabled){var e=this.target;this._enabled=t,t?(e.cursor="pointer",e.addEventListener("rollover",this),e.addEventListener("rollout",this),e.addEventListener("mousedown",this),e.addEventListener("pressup",this),e._reset&&(e.__reset=e._reset,e._reset=this._reset)):(e.cursor=null,e.removeEventListener("rollover",this),e.removeEventListener("rollout",this),e.removeEventListener("mousedown",this),e.removeEventListener("pressup",this),e.__reset&&(e._reset=e.__reset,delete e.__reset))}},e.setEnabled=createjs.deprecate(e._setEnabled,"ButtonHelper.setEnabled"),e._getEnabled=function(){return this._enabled},e.getEnabled=createjs.deprecate(e._getEnabled,"ButtonHelper.getEnabled");try{Object.defineProperties(e,{enabled:{get:e._getEnabled,set:e._setEnabled}})}catch(i){}e.toString=function(){return"[ButtonHelper]"},e.handleEvent=function(t){var e,i=this.target,n=t.type;"mousedown"==n?(this._isPressed=!0,e=this.downLabel):"pressup"==n?(this._isPressed=!1,e=this._isOver?this.overLabel:this.outLabel):"rollover"==n?(this._isOver=!0,e=this._isPressed?this.downLabel:this.overLabel):(this._isOver=!1,e=this._isPressed?this.overLabel:this.outLabel),this.play?i.gotoAndPlay&&i.gotoAndPlay(e):i.gotoAndStop&&i.gotoAndStop(e)},e._reset=function(){var t=this.paused;this.__reset(),this.paused=t},createjs.ButtonHelper=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n){this.color=t||"black",this.offsetX=e||0,this.offsetY=i||0,this.blur=n||0}var e=t.prototype;t.identity=new t("transparent",0,0,0),e.toString=function(){return"[Shadow]"},e.clone=function(){return new t(this.color,this.offsetX,this.offsetY,this.blur)},createjs.Shadow=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.EventDispatcher_constructor(),this.complete=!0,this.framerate=0,this._animations=null,this._frames=null,this._images=null,this._data=null,this._loadCount=0,this._frameHeight=0,this._frameWidth=0,this._numFrames=0,this._regX=0,this._regY=0,this._spacing=0,this._margin=0,this._parseData(t)}var e=createjs.extend(t,createjs.EventDispatcher);e._getAnimations=function(){return this._animations.slice()},e.getAnimations=createjs.deprecate(e._getAnimations,"SpriteSheet.getAnimations");try{Object.defineProperties(e,{animations:{get:e._getAnimations}})}catch(i){}e.getNumFrames=function(t){if(null==t)return this._frames?this._frames.length:this._numFrames||0;var e=this._data[t];return null==e?0:e.frames.length},e.getAnimation=function(t){return this._data[t]},e.getFrame=function(t){var e;return this._frames&&(e=this._frames[t])?e:null},e.getFrameBounds=function(t,e){var i=this.getFrame(t);return i?(e||new createjs.Rectangle).setValues(-i.regX,-i.regY,i.rect.width,i.rect.height):null},e.toString=function(){return"[SpriteSheet]"},e.clone=function(){throw"SpriteSheet cannot be cloned."},e._parseData=function(t){var e,i,n,r;if(null!=t){if(this.framerate=t.framerate||0,t.images&&(i=t.images.length)>0)for(r=this._images=[],e=0;i>e;e++){var a=t.images[e];if("string"==typeof a){var o=a;(a=document.createElement("img")).src=o}r.push(a),a.getContext||a.naturalWidth||(this._loadCount++,this.complete=!1,function(t,e){a.onload=function(){t._handleImageLoad(e)}}(this,o),function(t,e){a.onerror=function(){t._handleImageError(e)}}(this,o))}if(null==t.frames);else if(Array.isArray(t.frames))for(this._frames=[],r=t.frames,e=0,i=r.length;i>e;e++){var l=r[e];this._frames.push({image:this._images[l[4]?l[4]:0],rect:new createjs.Rectangle(l[0],l[1],l[2],l[3]),regX:l[5]||0,regY:l[6]||0})}else n=t.frames,this._frameWidth=n.width,this._frameHeight=n.height,this._regX=n.regX||0,this._regY=n.regY||0,this._spacing=n.spacing||0,this._margin=n.margin||0,this._numFrames=n.count,0==this._loadCount&&this._calculateFrames();if(this._animations=[],null!=(n=t.animations))for(c in this._data={},n){var c,u={name:c},h=n[c];if("number"==typeof h)r=u.frames=[h];else if(Array.isArray(h)){if(1==h.length)u.frames=[h[0]];else for(u.speed=h[3],u.next=h[2],r=u.frames=[],e=h[0];e<=h[1];e++)r.push(e)}else{u.speed=h.speed,u.next=h.next;var d=h.frames;r=u.frames="number"==typeof d?[d]:d.slice(0)}(!0===u.next||void 0===u.next)&&(u.next=c),(!1===u.next||r.length<2&&u.next==c)&&(u.next=null),u.speed||(u.speed=1),this._animations.push(c),this._data[c]=u}}},e._handleImageLoad=function(t){0==--this._loadCount&&(this._calculateFrames(),this.complete=!0,this.dispatchEvent("complete"))},e._handleImageError=function(t){var e=new createjs.Event("error");e.src=t,this.dispatchEvent(e),0==--this._loadCount&&this.dispatchEvent("complete")},e._calculateFrames=function(){if(!this._frames&&0!=this._frameWidth){this._frames=[];var t=this._numFrames||1e5,e=0,i=this._frameWidth,n=this._frameHeight,r=this._spacing,a=this._margin;a:for(var o=0,l=this._images;o=d;){for(var p=a;u-a-i>=p;){if(e>=t)break a;e++,this._frames.push({image:c,rect:new createjs.Rectangle(p,d,i,n),regX:this._regX,regY:this._regY}),p+=i+r}d+=n+r}this._numFrames=e}},createjs.SpriteSheet=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.command=null,this._stroke=null,this._strokeStyle=null,this._oldStrokeStyle=null,this._strokeDash=null,this._oldStrokeDash=null,this._strokeIgnoreScale=!1,this._fill=null,this._instructions=[],this._commitIndex=0,this._activeInstructions=[],this._dirty=!1,this._storeIndex=0,this.clear()}var e=t.prototype,i=t;t.getRGB=function(t,e,i,n){return null!=t&&null==i&&(n=e,i=255&t,e=t>>8&255,t=t>>16&255),null==n?"rgb("+t+","+e+","+i+")":"rgba("+t+","+e+","+i+","+n+")"},t.getHSL=function(t,e,i,n){return null==n?"hsl("+t%360+","+e+"%,"+i+"%)":"hsla("+t%360+","+e+"%,"+i+"%,"+n+")"},t.BASE_64={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,a:26,b:27,c:28,d:29,e:30,f:31,g:32,h:33,i:34,j:35,k:36,l:37,m:38,n:39,o:40,p:41,q:42,r:43,s:44,t:45,u:46,v:47,w:48,x:49,y:50,z:51,0:52,1:53,2:54,3:55,4:56,5:57,6:58,7:59,8:60,9:61,"+":62,"/":63},t.STROKE_CAPS_MAP=["butt","round","square"],t.STROKE_JOINTS_MAP=["miter","round","bevel"];var n=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");n.getContext&&(t._ctx=n.getContext("2d"),n.width=n.height=1),e._getInstructions=function(){return this._updateInstructions(),this._instructions},e.getInstructions=createjs.deprecate(e._getInstructions,"Graphics.getInstructions");try{Object.defineProperties(e,{instructions:{get:e._getInstructions}})}catch(r){}e.isEmpty=function(){return!(this._instructions.length||this._activeInstructions.length)},e.draw=function(t,e){this._updateInstructions();for(var i=this._instructions,n=this._storeIndex,r=i.length;r>n;n++)i[n].exec(t,e)},e.drawAsPath=function(t){this._updateInstructions();for(var e,i=this._instructions,n=this._storeIndex,r=i.length;r>n;n++)!1!==(e=i[n]).path&&e.exec(t)},e.moveTo=function(t,e){return this.append(new i.MoveTo(t,e),!0)},e.lineTo=function(t,e){return this.append(new i.LineTo(t,e))},e.arcTo=function(t,e,n,r,a){return this.append(new i.ArcTo(t,e,n,r,a))},e.arc=function(t,e,n,r,a,o){return this.append(new i.Arc(t,e,n,r,a,o))},e.quadraticCurveTo=function(t,e,n,r){return this.append(new i.QuadraticCurveTo(t,e,n,r))},e.bezierCurveTo=function(t,e,n,r,a,o){return this.append(new i.BezierCurveTo(t,e,n,r,a,o))},e.rect=function(t,e,n,r){return this.append(new i.Rect(t,e,n,r))},e.closePath=function(){return this._activeInstructions.length?this.append(new i.ClosePath):this},e.clear=function(){return this._instructions.length=this._activeInstructions.length=this._commitIndex=0,this._strokeStyle=this._oldStrokeStyle=this._stroke=this._fill=this._strokeDash=this._oldStrokeDash=null,this._dirty=this._strokeIgnoreScale=!1,this},e.beginFill=function(t){return this._setFill(t?new i.Fill(t):null)},e.beginLinearGradientFill=function(t,e,n,r,a,o){return this._setFill((new i.Fill).linearGradient(t,e,n,r,a,o))},e.beginRadialGradientFill=function(t,e,n,r,a,o,l,c){return this._setFill((new i.Fill).radialGradient(t,e,n,r,a,o,l,c))},e.beginBitmapFill=function(t,e,n){return this._setFill(new i.Fill(null,n).bitmap(t,e))},e.endFill=function(){return this.beginFill()},e.setStrokeStyle=function(t,e,n,r,a){return this._updateInstructions(!0),this._strokeStyle=this.command=new i.StrokeStyle(t,e,n,r,a),this._stroke&&(this._stroke.ignoreScale=a),this._strokeIgnoreScale=a,this},e.setStrokeDash=function(t,e){return this._updateInstructions(!0),this._strokeDash=this.command=new i.StrokeDash(t,e),this},e.beginStroke=function(t){return this._setStroke(t?new i.Stroke(t):null)},e.beginLinearGradientStroke=function(t,e,n,r,a,o){return this._setStroke((new i.Stroke).linearGradient(t,e,n,r,a,o))},e.beginRadialGradientStroke=function(t,e,n,r,a,o,l,c){return this._setStroke((new i.Stroke).radialGradient(t,e,n,r,a,o,l,c))},e.beginBitmapStroke=function(t,e){return this._setStroke((new i.Stroke).bitmap(t,e))},e.endStroke=function(){return this.beginStroke()},e.curveTo=e.quadraticCurveTo,e.drawRect=e.rect,e.drawRoundRect=function(t,e,i,n,r){return this.drawRoundRectComplex(t,e,i,n,r,r,r,r)},e.drawRoundRectComplex=function(t,e,n,r,a,o,l,c){return this.append(new i.RoundRect(t,e,n,r,a,o,l,c))},e.drawCircle=function(t,e,n){return this.append(new i.Circle(t,e,n))},e.drawEllipse=function(t,e,n,r){return this.append(new i.Ellipse(t,e,n,r))},e.drawPolyStar=function(t,e,n,r,a,o){return this.append(new i.PolyStar(t,e,n,r,a,o))},e.append=function(t,e){return this._activeInstructions.push(t),this.command=t,e||(this._dirty=!0),this},e.decodePath=function(e){for(var i=[this.moveTo,this.lineTo,this.quadraticCurveTo,this.bezierCurveTo,this.closePath],n=[2,2,4,6,0],r=0,a=e.length,o=[],l=0,c=0,u=t.BASE_64;a>r;){var h=e.charAt(r),d=u[h],p=d>>3,f=i[p];if(!f||3&d)throw"bad path data (@"+r+"): "+h;var g=n[p];p||(l=c=0),o.length=0,r++;for(var m=(d>>2&1)+2,v=0;g>v;v++){var x=u[e.charAt(r)],y=x>>5?-1:1;x=(31&x)<<6|u[e.charAt(r+1)],3==m&&(x=x<<6|u[e.charAt(r+2)]),x=y*x/10,v%2?l=x+=l:c=x+=c,o[v]=x,r+=m}f.apply(this,o)}return this},e.store=function(){return this._updateInstructions(!0),this._storeIndex=this._instructions.length,this},e.unstore=function(){return this._storeIndex=0,this},e.clone=function(){var e=new t;return e.command=this.command,e._stroke=this._stroke,e._strokeStyle=this._strokeStyle,e._strokeDash=this._strokeDash,e._strokeIgnoreScale=this._strokeIgnoreScale,e._fill=this._fill,e._instructions=this._instructions.slice(),e._commitIndex=this._commitIndex,e._activeInstructions=this._activeInstructions.slice(),e._dirty=this._dirty,e._storeIndex=this._storeIndex,e},e.toString=function(){return"[Graphics]"},e.mt=e.moveTo,e.lt=e.lineTo,e.at=e.arcTo,e.bt=e.bezierCurveTo,e.qt=e.quadraticCurveTo,e.a=e.arc,e.r=e.rect,e.cp=e.closePath,e.c=e.clear,e.f=e.beginFill,e.lf=e.beginLinearGradientFill,e.rf=e.beginRadialGradientFill,e.bf=e.beginBitmapFill,e.ef=e.endFill,e.ss=e.setStrokeStyle,e.sd=e.setStrokeDash,e.s=e.beginStroke,e.ls=e.beginLinearGradientStroke,e.rs=e.beginRadialGradientStroke,e.bs=e.beginBitmapStroke,e.es=e.endStroke,e.dr=e.drawRect,e.rr=e.drawRoundRect,e.rc=e.drawRoundRectComplex,e.dc=e.drawCircle,e.de=e.drawEllipse,e.dp=e.drawPolyStar,e.p=e.decodePath,e._updateInstructions=function(e){var i=this._instructions,n=this._activeInstructions,r=this._commitIndex;if(this._dirty&&n.length){i.length=r,i.push(t.beginCmd);var a=n.length,o=i.length;i.length=o+a;for(var l=0;a>l;l++)i[l+o]=n[l];this._fill&&i.push(this._fill),this._stroke&&(this._strokeDash!==this._oldStrokeDash&&i.push(this._strokeDash),this._strokeStyle!==this._oldStrokeStyle&&i.push(this._strokeStyle),e&&(this._oldStrokeStyle=this._strokeStyle,this._oldStrokeDash=this._strokeDash),i.push(this._stroke)),this._dirty=!1}e&&(n.length=0,this._commitIndex=i.length)},e._setFill=function(t){return this._updateInstructions(!0),this.command=this._fill=t,this},e._setStroke=function(t){return this._updateInstructions(!0),(this.command=this._stroke=t)&&(t.ignoreScale=this._strokeIgnoreScale),this},(i.LineTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.lineTo(this.x,this.y)},(i.MoveTo=function(t,e){this.x=t,this.y=e}).prototype.exec=function(t){t.moveTo(this.x,this.y)},(i.ArcTo=function(t,e,i,n,r){this.x1=t,this.y1=e,this.x2=i,this.y2=n,this.radius=r}).prototype.exec=function(t){t.arcTo(this.x1,this.y1,this.x2,this.y2,this.radius)},(i.Arc=function(t,e,i,n,r,a){this.x=t,this.y=e,this.radius=i,this.startAngle=n,this.endAngle=r,this.anticlockwise=!!a}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,this.startAngle,this.endAngle,this.anticlockwise)},(i.QuadraticCurveTo=function(t,e,i,n){this.cpx=t,this.cpy=e,this.x=i,this.y=n}).prototype.exec=function(t){t.quadraticCurveTo(this.cpx,this.cpy,this.x,this.y)},(i.BezierCurveTo=function(t,e,i,n,r,a){this.cp1x=t,this.cp1y=e,this.cp2x=i,this.cp2y=n,this.x=r,this.y=a}).prototype.exec=function(t){t.bezierCurveTo(this.cp1x,this.cp1y,this.cp2x,this.cp2y,this.x,this.y)},(i.Rect=function(t,e,i,n){this.x=t,this.y=e,this.w=i,this.h=n}).prototype.exec=function(t){t.rect(this.x,this.y,this.w,this.h)},(i.ClosePath=function(){}).prototype.exec=function(t){t.closePath()},(i.BeginPath=function(){}).prototype.exec=function(t){t.beginPath()},(e=(i.Fill=function(t,e){this.style=t,this.matrix=e}).prototype).exec=function(t){if(this.style){t.fillStyle=this.style;var e=this.matrix;e&&(t.save(),t.transform(e.a,e.b,e.c,e.d,e.tx,e.ty)),t.fill(),e&&t.restore()}},e.linearGradient=function(e,i,n,r,a,o){for(var l=this.style=t._ctx.createLinearGradient(n,r,a,o),c=0,u=e.length;u>c;c++)l.addColorStop(i[c],e[c]);return l.props={colors:e,ratios:i,x0:n,y0:r,x1:a,y1:o,type:"linear"},this},e.radialGradient=function(e,i,n,r,a,o,l,c){for(var u=this.style=t._ctx.createRadialGradient(n,r,a,o,l,c),h=0,d=e.length;d>h;h++)u.addColorStop(i[h],e[h]);return u.props={colors:e,ratios:i,x0:n,y0:r,r0:a,x1:o,y1:l,r1:c,type:"radial"},this},e.bitmap=function(e,i){return(e.naturalWidth||e.getContext||e.readyState>=2)&&((this.style=t._ctx.createPattern(e,i||"")).props={image:e,repetition:i,type:"bitmap"}),this},e.path=!1,(e=(i.Stroke=function(t,e){this.style=t,this.ignoreScale=e}).prototype).exec=function(t){this.style&&(t.strokeStyle=this.style,this.ignoreScale&&(t.save(),t.setTransform(1,0,0,1,0,0)),t.stroke(),this.ignoreScale&&t.restore())},e.linearGradient=i.Fill.prototype.linearGradient,e.radialGradient=i.Fill.prototype.radialGradient,e.bitmap=i.Fill.prototype.bitmap,e.path=!1,(e=(i.StrokeStyle=function(t,e,i,n,r){this.width=t,this.caps=e,this.joints=i,this.miterLimit=n,this.ignoreScale=r}).prototype).exec=function(e){e.lineWidth=null==this.width?"1":this.width,e.lineCap=null==this.caps?"butt":isNaN(this.caps)?this.caps:t.STROKE_CAPS_MAP[this.caps],e.lineJoin=null==this.joints?"miter":isNaN(this.joints)?this.joints:t.STROKE_JOINTS_MAP[this.joints],e.miterLimit=null==this.miterLimit?"10":this.miterLimit,e.ignoreScale=null!=this.ignoreScale&&this.ignoreScale},e.path=!1,(i.StrokeDash=function(t,e){this.segments=t,this.offset=e||0}).prototype.exec=function(t){t.setLineDash&&(t.setLineDash(this.segments||i.StrokeDash.EMPTY_SEGMENTS),t.lineDashOffset=this.offset||0)},i.StrokeDash.EMPTY_SEGMENTS=[],(i.RoundRect=function(t,e,i,n,r,a,o,l){this.x=t,this.y=e,this.w=i,this.h=n,this.radiusTL=r,this.radiusTR=a,this.radiusBR=o,this.radiusBL=l}).prototype.exec=function(t){var e=(u>c?c:u)/2,i=0,n=0,r=0,a=0,o=this.x,l=this.y,c=this.w,u=this.h,h=this.radiusTL,d=this.radiusTR,p=this.radiusBR,f=this.radiusBL;0>h&&(h*=i=-1),h>e&&(h=e),0>d&&(d*=n=-1),d>e&&(d=e),0>p&&(p*=r=-1),p>e&&(p=e),0>f&&(f*=a=-1),f>e&&(f=e),t.moveTo(o+c-d,l),t.arcTo(o+c+d*n,l-d*n,o+c,l+d,d),t.lineTo(o+c,l+u-p),t.arcTo(o+c+p*r,l+u+p*r,o+c-p,l+u,p),t.lineTo(o+f,l+u),t.arcTo(o-f*a,l+u+f*a,o,l+u-f,f),t.lineTo(o,l+h),t.arcTo(o-h*i,l-h*i,o+h,l,h),t.closePath()},(i.Circle=function(t,e,i){this.x=t,this.y=e,this.radius=i}).prototype.exec=function(t){t.arc(this.x,this.y,this.radius,0,2*Math.PI)},(i.Ellipse=function(t,e,i,n){this.x=t,this.y=e,this.w=i,this.h=n}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.w,r=this.h,a=n/2*.5522848,o=r/2*.5522848,l=e+n,c=i+r,u=e+n/2,h=i+r/2;t.moveTo(e,h),t.bezierCurveTo(e,h-o,u-a,i,u,i),t.bezierCurveTo(u+a,i,l,h-o,l,h),t.bezierCurveTo(l,h+o,u+a,c,u,c),t.bezierCurveTo(u-a,c,e,h+o,e,h)},(i.PolyStar=function(t,e,i,n,r,a){this.x=t,this.y=e,this.radius=i,this.sides=n,this.pointSize=r,this.angle=a}).prototype.exec=function(t){var e=this.x,i=this.y,n=this.radius,r=(this.angle||0)/180*Math.PI,a=this.sides,o=1-(this.pointSize||0),l=Math.PI/a;t.moveTo(e+Math.cos(r)*n,i+Math.sin(r)*n);for(var c=0;a>c;c++)r+=l,1!=o&&t.lineTo(e+Math.cos(r)*n*o,i+Math.sin(r)*n*o),r+=l,t.lineTo(e+Math.cos(r)*n,i+Math.sin(r)*n);t.closePath()},t.beginCmd=new i.BeginPath,createjs.Graphics=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.EventDispatcher_constructor(),this.alpha=1,this.cacheCanvas=null,this.bitmapCache=null,this.id=createjs.UID.get(),this.mouseEnabled=!0,this.tickEnabled=!0,this.name=null,this.parent=null,this.regX=0,this.regY=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.skewX=0,this.skewY=0,this.shadow=null,this.visible=!0,this.x=0,this.y=0,this.transformMatrix=null,this.compositeOperation=null,this.snapToPixel=!0,this.filters=null,this.mask=null,this.hitArea=null,this.cursor=null,this._props=new createjs.DisplayProps,this._rectangle=new createjs.Rectangle,this._bounds=null,this._webGLRenderStyle=t._StageGL_NONE}var e=createjs.extend(t,createjs.EventDispatcher);t._MOUSE_EVENTS=["click","dblclick","mousedown","mouseout","mouseover","pressmove","pressup","rollout","rollover"],t.suppressCrossDomainErrors=!1,t._snapToPixelEnabled=!1,t._StageGL_NONE=0,t._StageGL_SPRITE=1,t._StageGL_BITMAP=2;var i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");i.getContext&&(t._hitTestCanvas=i,t._hitTestContext=i.getContext("2d"),i.width=i.height=1),e._getStage=function(){for(var t=this,e=createjs.Stage;t.parent;)t=t.parent;return t instanceof e?t:null},e.getStage=createjs.deprecate(e._getStage,"DisplayObject.getStage");try{Object.defineProperties(e,{stage:{get:e._getStage},cacheID:{get:function(){return this.bitmapCache&&this.bitmapCache.cacheID},set:function(t){this.bitmapCache&&(this.bitmapCache.cacheID=t)}},scale:{get:function(){return this.scaleX},set:function(t){this.scaleX=this.scaleY=t}}})}catch(n){}e.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},e.draw=function(t,e){var i=this.bitmapCache;return!!i&&!e&&i.draw(t)},e.updateContext=function(e){var i=this.mask,n=this._props.matrix;i&&i.graphics&&!i.graphics.isEmpty()&&(i.getMatrix(n),e.transform(n.a,n.b,n.c,n.d,n.tx,n.ty),i.graphics.drawAsPath(e),e.clip(),n.invert(),e.transform(n.a,n.b,n.c,n.d,n.tx,n.ty)),this.getMatrix(n);var r=n.tx,a=n.ty;t._snapToPixelEnabled&&this.snapToPixel&&(r=r+(0>r?-.5:.5)|0,a=a+(0>a?-.5:.5)|0),e.transform(n.a,n.b,n.c,n.d,r,a),e.globalAlpha*=this.alpha,this.compositeOperation&&(e.globalCompositeOperation=this.compositeOperation),this.shadow&&this._applyShadow(e,this.shadow)},e.cache=function(t,e,i,n,r,a){this.bitmapCache||(this.bitmapCache=new createjs.BitmapCache),this.bitmapCache.define(this,t,e,i,n,r,a)},e.updateCache=function(t){if(!this.bitmapCache)throw"cache() must be called before updateCache()";this.bitmapCache.update(t)},e.uncache=function(){this.bitmapCache&&(this.bitmapCache.release(),this.bitmapCache=void 0)},e.getCacheDataURL=function(){return this.bitmapCache?this.bitmapCache.getDataURL():null},e.localToGlobal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).transformPoint(t,e,i||new createjs.Point)},e.globalToLocal=function(t,e,i){return this.getConcatenatedMatrix(this._props.matrix).invert().transformPoint(t,e,i||new createjs.Point)},e.localToLocal=function(t,e,i,n){return n=this.localToGlobal(t,e,n),i.globalToLocal(n.x,n.y,n)},e.setTransform=function(t,e,i,n,r,a,o,l,c){return this.x=t||0,this.y=e||0,this.scaleX=null==i?1:i,this.scaleY=null==n?1:n,this.rotation=r||0,this.skewX=a||0,this.skewY=o||0,this.regX=l||0,this.regY=c||0,this},e.getMatrix=function(t){var e=t&&t.identity()||new createjs.Matrix2D;return this.transformMatrix?e.copy(this.transformMatrix):e.appendTransform(this.x,this.y,this.scaleX,this.scaleY,this.rotation,this.skewX,this.skewY,this.regX,this.regY)},e.getConcatenatedMatrix=function(t){for(var e=this,i=this.getMatrix(t);e=e.parent;)i.prependMatrix(e.getMatrix(e._props.matrix));return i},e.getConcatenatedDisplayProps=function(t){t=t?t.identity():new createjs.DisplayProps;var e=this,i=e.getMatrix(t.matrix);do t.prepend(e.visible,e.alpha,e.shadow,e.compositeOperation),e!=this&&i.prependMatrix(e.getMatrix(e._props.matrix));while(e=e.parent);return t},e.hitTest=function(e,i){var n=t._hitTestContext;n.setTransform(1,0,0,1,-e,-i),this.draw(n);var r=this._testHit(n);return n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,2,2),r},e.set=function(t){for(var e in t)this[e]=t[e];return this},e.getBounds=function(){if(this._bounds)return this._rectangle.copy(this._bounds);var t=this.cacheCanvas;if(t){var e=this._cacheScale;return this._rectangle.setValues(this._cacheOffsetX,this._cacheOffsetY,t.width/e,t.height/e)}return null},e.getTransformedBounds=function(){return this._getBounds()},e.setBounds=function(t,e,i,n){return null==t?void(this._bounds=t):void(this._bounds=(this._bounds||new createjs.Rectangle).setValues(t,e,i,n))},e.clone=function(){return this._cloneProps(new t)},e.toString=function(){return"[DisplayObject (name="+this.name+")]"},e._updateState=null,e._cloneProps=function(t){return t.alpha=this.alpha,t.mouseEnabled=this.mouseEnabled,t.tickEnabled=this.tickEnabled,t.name=this.name,t.regX=this.regX,t.regY=this.regY,t.rotation=this.rotation,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.shadow=this.shadow,t.skewX=this.skewX,t.skewY=this.skewY,t.visible=this.visible,t.x=this.x,t.y=this.y,t.compositeOperation=this.compositeOperation,t.snapToPixel=this.snapToPixel,t.filters=null==this.filters?null:this.filters.slice(0),t.mask=this.mask,t.hitArea=this.hitArea,t.cursor=this.cursor,t._bounds=this._bounds,t},e._applyShadow=function(t,e){e=e||Shadow.identity,t.shadowColor=e.color,t.shadowOffsetX=e.offsetX,t.shadowOffsetY=e.offsetY,t.shadowBlur=e.blur},e._tick=function(t){var e=this._listeners;e&&e.tick&&(t.target=null,t.propagationStopped=t.immediatePropagationStopped=!1,this.dispatchEvent(t))},e._testHit=function(e){try{var i=e.getImageData(0,0,1,1).data[3]>1}catch(n){if(!t.suppressCrossDomainErrors)throw"An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images."}return i},e._getBounds=function(t,e){return this._transformBounds(this.getBounds(),t,e)},e._transformBounds=function(t,e,i){if(!t)return t;var n=t.x,r=t.y,a=t.width,o=t.height,l=this._props.matrix;l=i?l.identity():this.getMatrix(l),(n||r)&&l.appendTransform(0,0,1,1,0,0,0,-n,-r),e&&l.prependMatrix(e);var c=a*l.a,u=a*l.b,h=o*l.c,d=o*l.d,p=l.tx,f=l.ty,g=p,m=p,v=f,x=f;return(n=c+p)m&&(m=n),(n=c+h+p)m&&(m=n),(n=h+p)m&&(m=n),(r=u+f)x&&(x=r),(r=u+d+f)x&&(x=r),(r=d+f)x&&(x=r),t.setValues(g,v,m-g,x-v)},e._hasMouseEventListener=function(){for(var e=t._MOUSE_EVENTS,i=0,n=e.length;n>i;i++)if(this.hasEventListener(e[i]))return!0;return!!this.cursor},createjs.DisplayObject=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.DisplayObject_constructor(),this.children=[],this.mouseChildren=!0,this.tickChildren=!0}var e=createjs.extend(t,createjs.DisplayObject);e._getNumChildren=function(){return this.children.length},e.getNumChildren=createjs.deprecate(e._getNumChildren,"Container.getNumChildren");try{Object.defineProperties(e,{numChildren:{get:e._getNumChildren}})}catch(i){}e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.children.length;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;for(var i=this.children.slice(),n=0,r=i.length;r>n;n++){var a=i[n];a.isVisible()&&(t.save(),a.updateContext(t),a.draw(t),t.restore())}return!0},e.addChild=function(t){if(null==t)return t;var e=arguments.length;if(e>1){for(var i=0;e>i;i++)this.addChild(arguments[i]);return arguments[e-1]}var n=t.parent,r=n===this;return n&&n._removeChildAt(createjs.indexOf(n.children,t),r),t.parent=this,this.children.push(t),r||t.dispatchEvent("added"),t},e.addChildAt=function(t,e){var i=arguments.length,n=arguments[i-1];if(0>n||n>this.children.length)return arguments[i-2];if(i>2){for(var r=0;i-1>r;r++)this.addChildAt(arguments[r],n+r);return arguments[i-2]}var a=t.parent,o=a===this;return a&&a._removeChildAt(createjs.indexOf(a.children,t),o),t.parent=this,this.children.splice(e,0,t),o||t.dispatchEvent("added"),t},e.removeChild=function(t){var e=arguments.length;if(e>1){for(var i=!0,n=0;e>n;n++)i=i&&this.removeChild(arguments[n]);return i}return this._removeChildAt(createjs.indexOf(this.children,t))},e.removeChildAt=function(t){var e=arguments.length;if(e>1){for(var i=[],n=0;e>n;n++)i[n]=arguments[n];i.sort(function(t,e){return e-t});for(var r=!0,n=0;e>n;n++)r=r&&this._removeChildAt(i[n]);return r}return this._removeChildAt(t)},e.removeAllChildren=function(){for(var t=this.children;t.length;)this._removeChildAt(0)},e.getChildAt=function(t){return this.children[t]},e.getChildByName=function(t){for(var e=this.children,i=0,n=e.length;n>i;i++)if(e[i].name==t)return e[i];return null},e.sortChildren=function(t){this.children.sort(t)},e.getChildIndex=function(t){return createjs.indexOf(this.children,t)},e.swapChildrenAt=function(t,e){var i=this.children,n=i[t],r=i[e];n&&r&&(i[t]=r,i[e]=n)},e.swapChildren=function(t,e){for(var i,n,r=this.children,a=0,o=r.length;o>a&&(r[a]==t&&(i=a),r[a]==e&&(n=a),null==i||null==n);a++);a!=o&&(r[i]=e,r[n]=t)},e.setChildIndex=function(t,e){var i=this.children,n=i.length;if(!(t.parent!=this||0>e||e>=n)){for(var r=0;n>r&&i[r]!=t;r++);r!=n&&r!=e&&(i.splice(r,1),i.splice(e,0,t))}},e.contains=function(t){for(;t;){if(t==this)return!0;t=t.parent}return!1},e.hitTest=function(t,e){return null!=this.getObjectUnderPoint(t,e)},e.getObjectsUnderPoint=function(t,e,i){var n=[],r=this.localToGlobal(t,e);return this._getObjectsUnderPoint(r.x,r.y,n,i>0,1==i),n},e.getObjectUnderPoint=function(t,e,i){var n=this.localToGlobal(t,e);return this._getObjectsUnderPoint(n.x,n.y,null,i>0,1==i)},e.getBounds=function(){return this._getBounds(null,!0)},e.getTransformedBounds=function(){return this._getBounds()},e.clone=function(e){var i=this._cloneProps(new t);return e&&this._cloneChildren(i),i},e.toString=function(){return"[Container (name="+this.name+")]"},e._tick=function(t){if(this.tickChildren)for(var e=this.children.length-1;e>=0;e--){var i=this.children[e];i.tickEnabled&&i._tick&&i._tick(t)}this.DisplayObject__tick(t)},e._cloneChildren=function(t){t.children.length&&t.removeAllChildren();for(var e=t.children,i=0,n=this.children.length;n>i;i++){var r=this.children[i].clone(!0);r.parent=t,e.push(r)}},e._removeChildAt=function(t,e){if(0>t||t>this.children.length-1)return!1;var i=this.children[t];return i&&(i.parent=null),this.children.splice(t,1),e||i.dispatchEvent("removed"),!0},e._getObjectsUnderPoint=function(e,i,n,r,a,o){if(!(o=o||0)&&!this._testMask(this,e,i))return null;var l,c=createjs.DisplayObject._hitTestContext;a=a||r&&this._hasMouseEventListener();for(var u=this.children,h=u.length,d=h-1;d>=0;d--){var p=u[d],f=p.hitArea;if(p.visible&&(f||p.isVisible())&&(!r||p.mouseEnabled)&&(f||this._testMask(p,e,i))){if(!f&&p instanceof t){var g=p._getObjectsUnderPoint(e,i,n,r,a,o+1);if(!n&&g)return r&&!this.mouseChildren?this:g}else{if(r&&!a&&!p._hasMouseEventListener())continue;var m=p.getConcatenatedDisplayProps(p._props);if(l=m.matrix,f&&(l.appendMatrix(f.getMatrix(f._props.matrix)),m.alpha=f.alpha),c.globalAlpha=m.alpha,c.setTransform(l.a,l.b,l.c,l.d,l.tx-e,l.ty-i),(f||p).draw(c),!this._testHit(c))continue;if(c.setTransform(1,0,0,1,0,0),c.clearRect(0,0,2,2),!n)return r&&!this.mouseChildren?this:p;n.push(p)}}}return null},e._testMask=function(t,e,i){var n=t.mask;if(!n||!n.graphics||n.graphics.isEmpty())return!0;var r=this._props.matrix,a=t.parent;r=a?a.getConcatenatedMatrix(r):r.identity(),r=n.getMatrix(n._props.matrix).prependMatrix(r);var o=createjs.DisplayObject._hitTestContext;return o.setTransform(r.a,r.b,r.c,r.d,r.tx-e,r.ty-i),n.graphics.drawAsPath(o),o.fillStyle="#000",o.fill(),!!this._testHit(o)&&(o.setTransform(1,0,0,1,0,0),o.clearRect(0,0,2,2),!0)},e._getBounds=function(t,e){var i=this.DisplayObject_getBounds();if(i)return this._transformBounds(i,t,e);var n=this._props.matrix;n=e?n.identity():this.getMatrix(n),t&&n.prependMatrix(t);for(var r=this.children.length,a=null,o=0;r>o;o++){var l=this.children[o];l.visible&&(i=l._getBounds(n))&&(a?a.extend(i.x,i.y,i.width,i.height):a=i.clone())}return a},createjs.Container=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.Container_constructor(),this.autoClear=!0,this.canvas="string"==typeof t?document.getElementById(t):t,this.mouseX=0,this.mouseY=0,this.drawRect=null,this.snapToPixelEnabled=!1,this.mouseInBounds=!1,this.tickOnUpdate=!0,this.mouseMoveOutside=!1,this.preventSelection=!0,this._pointerData={},this._pointerCount=0,this._primaryPointerID=null,this._mouseOverIntervalID=null,this._nextStage=null,this._prevStage=null,this.enableDOMEvents(!0)}var e=createjs.extend(t,createjs.Container);e._get_nextStage=function(){return this._nextStage},e._set_nextStage=function(t){this._nextStage&&(this._nextStage._prevStage=null),t&&(t._prevStage=this),this._nextStage=t};try{Object.defineProperties(e,{nextStage:{get:e._get_nextStage,set:e._set_nextStage}})}catch(i){}e.update=function(t){if(this.canvas&&(this.tickOnUpdate&&this.tick(t),!1!==this.dispatchEvent("drawstart",!1,!0))){createjs.DisplayObject._snapToPixelEnabled=this.snapToPixelEnabled;var e=this.drawRect,i=this.canvas.getContext("2d");i.setTransform(1,0,0,1,0,0),this.autoClear&&(e?i.clearRect(e.x,e.y,e.width,e.height):i.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)),i.save(),this.drawRect&&(i.beginPath(),i.rect(e.x,e.y,e.width,e.height),i.clip()),this.updateContext(i),this.draw(i,!1),i.restore(),this.dispatchEvent("drawend")}},e.tick=function(t){if(this.tickEnabled&&!1!==this.dispatchEvent("tickstart",!1,!0)){var e=new createjs.Event("tick");if(t)for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i]);this._tick(e),this.dispatchEvent("tickend")}},e.handleEvent=function(t){"tick"==t.type&&this.update(t)},e.clear=function(){if(this.canvas){var t=this.canvas.getContext("2d");t.setTransform(1,0,0,1,0,0),t.clearRect(0,0,this.canvas.width+1,this.canvas.height+1)}},e.toDataURL=function(t,e){var i,n=this.canvas.getContext("2d"),r=this.canvas.width,a=this.canvas.height;if(t){i=n.getImageData(0,0,r,a);var o=n.globalCompositeOperation;n.globalCompositeOperation="destination-over",n.fillStyle=t,n.fillRect(0,0,r,a)}var l=this.canvas.toDataURL(e||"image/png");return t&&(n.putImageData(i,0,0),n.globalCompositeOperation=o),l},e.enableMouseOver=function(t){if(this._mouseOverIntervalID&&(clearInterval(this._mouseOverIntervalID),this._mouseOverIntervalID=null,0==t&&this._testMouseOver(!0)),null==t)t=20;else if(0>=t)return;var e=this;this._mouseOverIntervalID=setInterval(function(){e._testMouseOver()},1e3/Math.min(50,t))},e.enableDOMEvents=function(t){null==t&&(t=!0);var e,i,n=this._eventListeners;if(!t&&n){for(e in n)(i=n[e]).t.removeEventListener(e,i.f,!1);this._eventListeners=null}else if(t&&!n&&this.canvas){var r=window.addEventListener?window:document,a=this;for(e in(n=this._eventListeners={}).mouseup={t:r,f:function(t){a._handleMouseUp(t)}},n.mousemove={t:r,f:function(t){a._handleMouseMove(t)}},n.dblclick={t:this.canvas,f:function(t){a._handleDoubleClick(t)}},n.mousedown={t:this.canvas,f:function(t){a._handleMouseDown(t)}},n)(i=n[e]).t.addEventListener(e,i.f,!1)}},e.clone=function(){throw"Stage cannot be cloned."},e.toString=function(){return"[Stage (name="+this.name+")]"},e._getElementRect=function(t){try{i=t.getBoundingClientRect()}catch(e){i={top:t.offsetTop,left:t.offsetLeft,width:t.offsetWidth,height:t.offsetHeight}}var i,n=(window.pageXOffset||document.scrollLeft||0)-(document.clientLeft||document.body.clientLeft||0),r=(window.pageYOffset||document.scrollTop||0)-(document.clientTop||document.body.clientTop||0),a=window.getComputedStyle?getComputedStyle(t,null):t.currentStyle,o=parseInt(a.paddingLeft)+parseInt(a.borderLeftWidth),l=parseInt(a.paddingTop)+parseInt(a.borderTopWidth),c=parseInt(a.paddingRight)+parseInt(a.borderRightWidth),u=parseInt(a.paddingBottom)+parseInt(a.borderBottomWidth);return{left:i.left+n+o,right:i.right+n-c,top:i.top+r+l,bottom:i.bottom+r-u}},e._getPointerData=function(t){var e=this._pointerData[t];return e||(e=this._pointerData[t]={x:0,y:0}),e},e._handleMouseMove=function(t){t||(t=window.event),this._handlePointerMove(-1,t,t.pageX,t.pageY)},e._handlePointerMove=function(t,e,i,n,r){if((!this._prevStage||void 0!==r)&&this.canvas){var a=this._nextStage,o=this._getPointerData(t),l=o.inBounds;this._updatePointerPosition(t,e,i,n),(l||o.inBounds||this.mouseMoveOutside)&&(-1===t&&!l==o.inBounds&&this._dispatchMouseEvent(this,l?"mouseleave":"mouseenter",!1,t,o,e),this._dispatchMouseEvent(this,"stagemousemove",!1,t,o,e),this._dispatchMouseEvent(o.target,"pressmove",!0,t,o,e)),a&&a._handlePointerMove(t,e,i,n,null)}},e._updatePointerPosition=function(t,e,i,n){var r=this._getElementRect(this.canvas);i-=r.left,n-=r.top;var a=this.canvas.width,o=this.canvas.height;i/=(r.right-r.left)/a,n/=(r.bottom-r.top)/o;var l=this._getPointerData(t);(l.inBounds=i>=0&&n>=0&&a-1>=i&&o-1>=n)?(l.x=i,l.y=n):this.mouseMoveOutside&&(l.x=0>i?0:i>a-1?a-1:i,l.y=0>n?0:n>o-1?o-1:n),l.posEvtObj=e,l.rawX=i,l.rawY=n,(t===this._primaryPointerID||-1===t)&&(this.mouseX=l.x,this.mouseY=l.y,this.mouseInBounds=l.inBounds)},e._handleMouseUp=function(t){this._handlePointerUp(-1,t,!1)},e._handlePointerUp=function(t,e,i,n){var r=this._nextStage,a=this._getPointerData(t);if(!this._prevStage||void 0!==n){var o=null,l=a.target;!n&&(l||r)&&(o=this._getObjectsUnderPoint(a.x,a.y,null,!0)),a.down&&(this._dispatchMouseEvent(this,"stagemouseup",!1,t,a,e,o),a.down=!1),o==l&&this._dispatchMouseEvent(l,"click",!0,t,a,e),this._dispatchMouseEvent(l,"pressup",!0,t,a,e),i?(t==this._primaryPointerID&&(this._primaryPointerID=null),delete this._pointerData[t]):a.target=null,r&&r._handlePointerUp(t,e,i,n||o&&this)}},e._handleMouseDown=function(t){this._handlePointerDown(-1,t,t.pageX,t.pageY)},e._handlePointerDown=function(t,e,i,n,r){this.preventSelection&&e.preventDefault(),(null==this._primaryPointerID||-1===t)&&(this._primaryPointerID=t),null!=n&&this._updatePointerPosition(t,e,i,n);var a=null,o=this._nextStage,l=this._getPointerData(t);r||(a=l.target=this._getObjectsUnderPoint(l.x,l.y,null,!0)),l.inBounds&&(this._dispatchMouseEvent(this,"stagemousedown",!1,t,l,e,a),l.down=!0),this._dispatchMouseEvent(a,"mousedown",!0,t,l,e),o&&o._handlePointerDown(t,e,i,n,r||a&&this)},e._testMouseOver=function(t,e,i){if(!this._prevStage||void 0!==e){var n=this._nextStage;if(!this._mouseOverIntervalID)return void(n&&n._testMouseOver(t,e,i));var r=this._getPointerData(-1);if(r&&(t||this.mouseX!=this._mouseOverX||this.mouseY!=this._mouseOverY||!this.mouseInBounds)){var a,o,l,c=r.posEvtObj,u=i||c&&c.target==this.canvas,h=null,d=-1,p="";!e&&(t||this.mouseInBounds&&u)&&(h=this._getObjectsUnderPoint(this.mouseX,this.mouseY,null,!0),this._mouseOverX=this.mouseX,this._mouseOverY=this.mouseY);var f=this._mouseOverTarget||[],g=f[f.length-1],m=this._mouseOverTarget=[];for(a=h;a;)m.unshift(a),p||(p=a.cursor),a=a.parent;for(this.canvas.style.cursor=p,!e&&i&&(i.canvas.style.cursor=p),o=0,l=m.length;l>o&&m[o]==f[o];o++)d=o;for(g!=h&&this._dispatchMouseEvent(g,"mouseout",!0,-1,r,c,h),o=f.length-1;o>d;o--)this._dispatchMouseEvent(f[o],"rollout",!1,-1,r,c,h);for(o=m.length-1;o>d;o--)this._dispatchMouseEvent(m[o],"rollover",!1,-1,r,c,g);g!=h&&this._dispatchMouseEvent(h,"mouseover",!0,-1,r,c,g),n&&n._testMouseOver(t,e||h&&this,i||u&&this)}}},e._handleDoubleClick=function(t,e){var i=null,n=this._nextStage,r=this._getPointerData(-1);e||(i=this._getObjectsUnderPoint(r.x,r.y,null,!0),this._dispatchMouseEvent(i,"dblclick",!0,-1,r,t)),n&&n._handleDoubleClick(t,e||i&&this)},e._dispatchMouseEvent=function(t,e,i,n,r,a,o){if(t&&(i||t.hasEventListener(e))){var l=new createjs.MouseEvent(e,i,!1,r.x,r.y,a,n,n===this._primaryPointerID||-1===n,r.rawX,r.rawY,o);t.dispatchEvent(l)}},createjs.Stage=createjs.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){"use strict";function t(e,i){if(this.Stage_constructor(e),void 0!==i){if("object"!=typeof i)throw"Invalid options object";var n=i.premultiply,r=i.transparent,a=i.antialias,o=i.preserveBuffer,l=i.autoPurge}this.vocalDebug=!1,this._preserveBuffer=o||!1,this._antialias=a||!1,this._transparent=r||!1,this._premultiply=n||!1,this._autoPurge=void 0,this.autoPurge=l,this._viewportWidth=0,this._viewportHeight=0,this._projectionMatrix=null,this._webGLContext=null,this._clearColor={r:.5,g:.5,b:.5,a:0},this._maxCardsPerBatch=t.DEFAULT_MAX_BATCH_SIZE,this._activeShader=null,this._vertices=null,this._vertexPositionBuffer=null,this._uvs=null,this._uvPositionBuffer=null,this._indices=null,this._textureIndexBuffer=null,this._alphas=null,this._alphaBuffer=null,this._textureDictionary=[],this._textureIDs={},this._batchTextures=[],this._baseTextures=[],this._batchTextureCount=8,this._lastTextureInsert=-1,this._batchID=0,this._drawID=0,this._slotBlacklist=[],this._isDrawing=0,this._lastTrackedCanvas=0,this.isCacheControlled=!1,this._cacheContainer=new createjs.Container,this._initializeWebGL()}var e=createjs.extend(t,createjs.Stage);t.buildUVRects=function(t,e,i){if(!t||!t._frames)return null;void 0===e&&(e=-1),void 0===i&&(i=!1);for(var n=-1!=e&&i?e:0,r=-1!=e&&i?e+1:t._frames.length,a=n;r>a;a++){var o=t._frames[a];if(!(o.uvRect||o.image.width<=0||o.image.height<=0)){var l=o.rect;o.uvRect={t:l.y/o.image.height,l:l.x/o.image.width,b:(l.y+l.height)/o.image.height,r:(l.x+l.width)/o.image.width}}}return t._frames[-1!=e?e:0].uvRect||{t:0,l:0,b:1,r:1}},t.isWebGLActive=function(t){return t&&t instanceof WebGLRenderingContext&&"undefined"!=typeof WebGLRenderingContext},t.VERTEX_PROPERTY_COUNT=6,t.INDICIES_PER_CARD=6,t.DEFAULT_MAX_BATCH_SIZE=1e4,t.WEBGL_MAX_INDEX_NUM=65536,t.UV_RECT={t:0,l:0,b:1,r:1};try{t.COVER_VERT=new Float32Array([-1,1,1,1,-1,-1,1,1,1,-1,-1,-1]),t.COVER_UV=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]),t.COVER_UV_FLIP=new Float32Array([0,1,1,1,0,0,1,1,1,0,0,0])}catch(i){}t.REGULAR_VARYING_HEADER="precision mediump float;varying vec2 vTextureCoord;varying lowp float indexPicker;varying lowp float alphaValue;",t.REGULAR_VERTEX_HEADER=t.REGULAR_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;attribute lowp float textureIndex;attribute lowp float objectAlpha;uniform mat4 pMatrix;",t.REGULAR_FRAGMENT_HEADER=t.REGULAR_VARYING_HEADER+"uniform sampler2D uSampler[{{count}}];",t.REGULAR_VERTEX_BODY="void main(void) {gl_Position = vec4((vertexPosition.x * pMatrix[0][0]) + pMatrix[3][0],(vertexPosition.y * pMatrix[1][1]) + pMatrix[3][1],pMatrix[3][2],1.0);alphaValue = objectAlpha;indexPicker = textureIndex;vTextureCoord = uvPosition;}",t.REGULAR_FRAGMENT_BODY="void main(void) {vec4 color = vec4(1.0, 0.0, 0.0, 1.0);if (indexPicker <= 0.5) {color = texture2D(uSampler[0], vTextureCoord);{{alternates}}}{{fragColor}}}",t.REGULAR_FRAG_COLOR_NORMAL="gl_FragColor = vec4(color.rgb, color.a * alphaValue);",t.REGULAR_FRAG_COLOR_PREMULTIPLY="if(color.a > 0.0035) {gl_FragColor = vec4(color.rgb/color.a, color.a * alphaValue);} else {gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);}",t.PARTICLE_VERTEX_BODY=t.REGULAR_VERTEX_BODY,t.PARTICLE_FRAGMENT_BODY=t.REGULAR_FRAGMENT_BODY,t.COVER_VARYING_HEADER="precision mediump float;varying highp vec2 vRenderCoord;varying highp vec2 vTextureCoord;",t.COVER_VERTEX_HEADER=t.COVER_VARYING_HEADER+"attribute vec2 vertexPosition;attribute vec2 uvPosition;uniform float uUpright;",t.COVER_FRAGMENT_HEADER=t.COVER_VARYING_HEADER+"uniform sampler2D uSampler;",t.COVER_VERTEX_BODY="void main(void) {gl_Position = vec4(vertexPosition.x, vertexPosition.y, 0.0, 1.0);vRenderCoord = uvPosition;vTextureCoord = vec2(uvPosition.x, abs(uUpright - uvPosition.y));}",t.COVER_FRAGMENT_BODY="void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = color;}",e._get_isWebGL=function(){return!!this._webGLContext},e._set_autoPurge=function(t){-1!=(t=isNaN(t)?1200:t)&&(t=10>t?10:t),this._autoPurge=t},e._get_autoPurge=function(){return Number(this._autoPurge)};try{Object.defineProperties(e,{isWebGL:{get:e._get_isWebGL},autoPurge:{get:e._get_autoPurge,set:e._set_autoPurge}})}catch(n){}e._initializeWebGL=function(){if(this.canvas){if(!this._webGLContext||this._webGLContext.canvas!==this.canvas){var t={depth:!1,alpha:this._transparent,stencil:!0,antialias:this._antialias,premultipliedAlpha:this._premultiply,preserveDrawingBuffer:this._preserveBuffer},e=this._webGLContext=this._fetchWebGLContext(this.canvas,t);if(!e)return null;this.updateSimultaneousTextureCount(e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS)),this._maxTextureSlots=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this._createBuffers(e),this._initTextures(e),e.disable(e.DEPTH_TEST),e.enable(e.BLEND),e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,this._premultiply),this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a),this.updateViewport(this._viewportWidth||this.canvas.width,this._viewportHeight||this.canvas.height)}}else this._webGLContext=null;return this._webGLContext},e.update=function(t){if(this.canvas){if(this.tickOnUpdate&&this.tick(t),this.dispatchEvent("drawstart"),this.autoClear&&this.clear(),this._webGLContext)this._batchDraw(this,this._webGLContext),-1==this._autoPurge||this._drawID%(this._autoPurge/2|0)||this.purgeTextures(this._autoPurge);else{var e=this.canvas.getContext("2d");e.save(),this.updateContext(e),this.draw(e,!1),e.restore()}this.dispatchEvent("drawend")}},e.clear=function(){if(this.canvas){if(t.isWebGLActive(this._webGLContext)){var e=this._webGLContext,i=this._clearColor,n=this._transparent?i.a:1;this._webGLContext.clearColor(i.r*n,i.g*n,i.b*n,n),e.clear(e.COLOR_BUFFER_BIT),this._webGLContext.clearColor(i.r,i.g,i.b,i.a)}else this.Stage_clear()}},e.draw=function(e,i){if(e===this._webGLContext&&t.isWebGLActive(this._webGLContext)){var n=this._webGLContext;return this._batchDraw(this,n,i),!0}return this.Stage_draw(e,i)},e.cacheDraw=function(e,i,n){if(t.isWebGLActive(this._webGLContext)){var r=this._webGLContext;return this._cacheDraw(r,e,i,n),!0}return!1},e.protectTextureSlot=function(t,e){if(t>this._maxTextureSlots||0>t)throw"Slot outside of acceptable range";this._slotBlacklist[t]=!!e},e.getTargetRenderTexture=function(t,e,i){var n,r=!1,a=this._webGLContext;if(void 0!==t.__lastRT&&t.__lastRT===t.__rtA&&(r=!0),r?(void 0===t.__rtB?t.__rtB=this.getRenderBufferTexture(e,i):((e!=t.__rtB._width||i!=t.__rtB._height)&&this.resizeTexture(t.__rtB,e,i),this.setTextureParams(a)),n=t.__rtB):(void 0===t.__rtA?t.__rtA=this.getRenderBufferTexture(e,i):((e!=t.__rtA._width||i!=t.__rtA._height)&&this.resizeTexture(t.__rtA,e,i),this.setTextureParams(a)),n=t.__rtA),!n)throw"Problems creating render textures, known causes include using too much VRAM by not releasing WebGL texture instances";return t.__lastRT=n,n},e.releaseTexture=function(t){var e,i;if(t){if(t.children)for(e=0,i=t.children.length;i>e;e++)this.releaseTexture(t.children[e]);t.cacheCanvas&&t.uncache();var n=void 0;if(void 0!==t._storeID){if(t===this._textureDictionary[t._storeID])return this._killTextureObject(t),void(t._storeID=void 0);n=t}else if(2===t._webGLRenderStyle)n=t.image;else if(1===t._webGLRenderStyle){for(e=0,i=t.spriteSheet._images.length;i>e;e++)this.releaseTexture(t.spriteSheet._images[e]);return}if(void 0===n)return void(this.vocalDebug&&console.log("No associated texture found on release"));this._killTextureObject(this._textureDictionary[n._storeID]),n._storeID=void 0}},e.purgeTextures=function(t){void 0==t&&(t=100);for(var e=this._textureDictionary,i=e.length,n=0;i>n;n++){var r=e[n];r&&r._drawID+t<=this._drawID&&this._killTextureObject(r)}},e.updateSimultaneousTextureCount=function(t){var e=this._webGLContext,i=!1;for((1>t||isNaN(t))&&(t=1),this._batchTextureCount=t;!i;)try{this._activeShader=this._fetchShaderProgram(e),i=!0}catch(n){if(1==this._batchTextureCount)throw"Cannot compile shader "+n;this._batchTextureCount-=4,this._batchTextureCount<1&&(this._batchTextureCount=1),this.vocalDebug&&console.log("Reducing desired texture count due to errors: "+this._batchTextureCount)}},e.updateViewport=function(t,e){this._viewportWidth=0|t,this._viewportHeight=0|e;var i=this._webGLContext;i&&(i.viewport(0,0,this._viewportWidth,this._viewportHeight),this._projectionMatrix=new Float32Array([2/this._viewportWidth,0,0,0,0,-2/this._viewportHeight,1,0,0,0,1,0,-1,1,.1,0]),this._projectionMatrixFlip=new Float32Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),this._projectionMatrixFlip.set(this._projectionMatrix),this._projectionMatrixFlip[5]*=-1,this._projectionMatrixFlip[13]*=-1)},e.getFilterShader=function(t){t||(t=this);var e=this._webGLContext,i=this._activeShader;if(t._builtShader)i=t._builtShader,t.shaderParamSetup&&(e.useProgram(i),t.shaderParamSetup(e,this,i));else try{i=this._fetchShaderProgram(e,"filter",t.VTX_SHADER_BODY,t.FRAG_SHADER_BODY,t.shaderParamSetup&&t.shaderParamSetup.bind(t)),t._builtShader=i,i._name=t.toString()}catch(n){console&&console.log("SHADER SWITCH FAILURE",n)}return i},e.getBaseTexture=function(t,e){var i=this._webGLContext,n=i.createTexture();return this.resizeTexture(n,Math.ceil(t>0?t:1)||1,Math.ceil(e>0?e:1)||1),this.setTextureParams(i,!1),n},e.resizeTexture=function(t,e,i){var n=this._webGLContext;n.bindTexture(n.TEXTURE_2D,t),n.texImage2D(n.TEXTURE_2D,0,n.RGBA,e,i,0,n.RGBA,n.UNSIGNED_BYTE,null),t.width=e,t.height=i},e.getRenderBufferTexture=function(t,e){var i=this._webGLContext,n=this.getBaseTexture(t,e);if(!n)return null;var r=i.createFramebuffer();return r?(n.width=t,n.height=e,i.bindFramebuffer(i.FRAMEBUFFER,r),i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.TEXTURE_2D,n,0),r._renderTexture=n,n._frameBuffer=r,n._storeID=this._textureDictionary.length,this._textureDictionary[n._storeID]=n,i.bindFramebuffer(i.FRAMEBUFFER,null),n):null},e.setTextureParams=function(t,e){e&&this._antialias?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR)):(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.NEAREST)),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE)},e.setClearColor=function(t){var e,i,n,r,a;"string"==typeof t?0==t.indexOf("#")?(4==t.length&&(t="#"+t.charAt(1)+t.charAt(1)+t.charAt(2)+t.charAt(2)+t.charAt(3)+t.charAt(3)),e=Number("0x"+t.slice(1,3))/255,i=Number("0x"+t.slice(3,5))/255,n=Number("0x"+t.slice(5,7))/255,r=Number("0x"+t.slice(7,9))/255):0==t.indexOf("rgba(")&&(e=Number((a=t.slice(5,-1).split(","))[0])/255,i=Number(a[1])/255,n=Number(a[2])/255,r=Number(a[3])):(e=((4278190080&t)>>>24)/255,i=((16711680&t)>>>16)/255,n=((65280&t)>>>8)/255,r=(255&t)/255),this._clearColor.r=e||0,this._clearColor.g=i||0,this._clearColor.b=n||0,this._clearColor.a=r||0,this._webGLContext&&this._webGLContext.clearColor(this._clearColor.r,this._clearColor.g,this._clearColor.b,this._clearColor.a)},e.toString=function(){return"[StageGL (name="+this.name+")]"},e._fetchWebGLContext=function(t,e){var i;try{i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)}catch(n){}if(i)i.viewportWidth=t.width,i.viewportHeight=t.height;else{var r="Could not initialize WebGL";console.error?console.error(r):console.log(r)}return i},e._fetchShaderProgram=function(e,i,n,r,a){switch(e.useProgram(null),i){case"filter":l=t.COVER_VERTEX_HEADER+(n||t.COVER_VERTEX_BODY),o=t.COVER_FRAGMENT_HEADER+(r||t.COVER_FRAGMENT_BODY);break;case"particle":l=t.REGULAR_VERTEX_HEADER+t.PARTICLE_VERTEX_BODY,o=t.REGULAR_FRAGMENT_HEADER+t.PARTICLE_FRAGMENT_BODY;break;case"override":l=t.REGULAR_VERTEX_HEADER+(n||t.REGULAR_VERTEX_BODY),o=t.REGULAR_FRAGMENT_HEADER+(r||t.REGULAR_FRAGMENT_BODY);break;default:l=t.REGULAR_VERTEX_HEADER+t.REGULAR_VERTEX_BODY,o=t.REGULAR_FRAGMENT_HEADER+t.REGULAR_FRAGMENT_BODY}var o,l,c=this._createShader(e,e.VERTEX_SHADER,l),u=this._createShader(e,e.FRAGMENT_SHADER,o),h=e.createProgram();if(e.attachShader(h,c),e.attachShader(h,u),e.linkProgram(h),h._type=i,!e.getProgramParameter(h,e.LINK_STATUS))throw e.useProgram(this._activeShader),e.getProgramInfoLog(h);if(e.useProgram(h),"filter"===i)h.vertexPositionAttribute=e.getAttribLocation(h,"vertexPosition"),e.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=e.getAttribLocation(h,"uvPosition"),e.enableVertexAttribArray(h.uvPositionAttribute),h.samplerUniform=e.getUniformLocation(h,"uSampler"),e.uniform1i(h.samplerUniform,0),h.uprightUniform=e.getUniformLocation(h,"uUpright"),e.uniform1f(h.uprightUniform,0),a&&a(e,this,h);else{h.vertexPositionAttribute=e.getAttribLocation(h,"vertexPosition"),e.enableVertexAttribArray(h.vertexPositionAttribute),h.uvPositionAttribute=e.getAttribLocation(h,"uvPosition"),e.enableVertexAttribArray(h.uvPositionAttribute),h.textureIndexAttribute=e.getAttribLocation(h,"textureIndex"),e.enableVertexAttribArray(h.textureIndexAttribute),h.alphaAttribute=e.getAttribLocation(h,"objectAlpha"),e.enableVertexAttribArray(h.alphaAttribute);for(var d=[],p=0;pn;n+=i)l[n]=l[n+1]=0;e.bufferData(e.ARRAY_BUFFER,l,e.DYNAMIC_DRAW),o.itemSize=i,o.numItems=a;var c=this._uvPositionBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,c),i=2;var u=this._uvs=new Float32Array(a*i);for(n=0,r=u.length;r>n;n+=i)u[n]=u[n+1]=0;e.bufferData(e.ARRAY_BUFFER,u,e.DYNAMIC_DRAW),c.itemSize=i,c.numItems=a;var h=this._textureIndexBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,h),i=1;var d=this._indices=new Float32Array(a*i);for(n=0,r=d.length;r>n;n++)d[n]=0;e.bufferData(e.ARRAY_BUFFER,d,e.DYNAMIC_DRAW),h.itemSize=i,h.numItems=a;var p=this._alphaBuffer=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,p),i=1;var f=this._alphas=new Float32Array(a*i);for(n=0,r=f.length;r>n;n++)f[n]=1;e.bufferData(e.ARRAY_BUFFER,f,e.DYNAMIC_DRAW),p.itemSize=i,p.numItems=a},e._initTextures=function(){this._lastTextureInsert=-1,this._textureDictionary=[],this._textureIDs={},this._baseTextures=[],this._batchTextures=[];for(var t=0;tt.MAX_TEXTURE_SIZE||e.height>t.MAX_TEXTURE_SIZE)&&console&&console.error("Oversized Texture: "+e.width+"x"+e.height+" vs "+t.MAX_TEXTURE_SIZE+"max"))},e._insertTextureInBatch=function(t,e){if(this._batchTextures[e._activeIndex]!==e){var i=-1,n=(this._lastTextureInsert+1)%this._batchTextureCount,r=n;do{if(this._batchTextures[r]._batchID!=this._batchID&&!this._slotBlacklist[r]){i=r;break}r=(r+1)%this._batchTextureCount}while(r!==n);-1===i&&(this.batchReason="textureOverflow",this._drawBuffers(t),this.batchCardCount=0,i=n),this._batchTextures[i]=e,e._activeIndex=i;var a=e._imageData;a&&a._invalid&&void 0!==e._drawID?this._updateTextureImageData(t,a):(t.activeTexture(t.TEXTURE0+i),t.bindTexture(t.TEXTURE_2D,e),this.setTextureParams(t)),this._lastTextureInsert=i}else{var a=e._imageData;void 0!=e._storeID&&a&&a._invalid&&this._updateTextureImageData(t,a)}e._drawID=this._drawID,e._batchID=this._batchID},e._killTextureObject=function(t){if(t){var e=this._webGLContext;if(void 0!==t._storeID&&t._storeID>=0){for(var i in this._textureDictionary[t._storeID]=void 0,this._textureIDs)this._textureIDs[i]==t._storeID&&delete this._textureIDs[i];t._imageData&&(t._imageData._storeID=void 0),t._imageData=t._storeID=void 0}void 0!==t._activeIndex&&this._batchTextures[t._activeIndex]===t&&(this._batchTextures[t._activeIndex]=this._baseTextures[t._activeIndex]);try{t._frameBuffer&&e.deleteFramebuffer(t._frameBuffer),t._frameBuffer=void 0}catch(n){this.vocalDebug&&console.log(n)}try{e.deleteTexture(t)}catch(r){this.vocalDebug&&console.log(r)}}},e._backupBatchTextures=function(t,e){var i=this._webGLContext;this._backupTextures||(this._backupTextures=[]),void 0===e&&(e=this._backupTextures);for(var n=0;n0&&this._drawBuffers(e),this._isDrawing++,this._drawID++,this.batchCardCount=0,this.depth=0,this._appendToBatchGroup(t,e,new createjs.Matrix2D,this.alpha,i),this.batchReason="drawFinish",this._drawBuffers(e),this._isDrawing--},e._cacheDraw=function(t,e,i,n){var r,a=this._activeShader,o=this._slotBlacklist,l=this._maxTextureSlots-1,c=this._viewportWidth,u=this._viewportHeight;this.protectTextureSlot(l,!0);var h=e.getMatrix();(h=h.clone()).scale(1/n.scale,1/n.scale),(h=h.invert()).translate(-n.offX/n.scale*e.scaleX,-n.offY/n.scale*e.scaleY);var d=this._cacheContainer;d.children=[e],d.transformMatrix=h,this._backupBatchTextures(!1),i&&i.length?this._drawFilters(e,i,n):this.isCacheControlled?(t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(d,t,!0)):(t.activeTexture(t.TEXTURE0+l),e.cacheCanvas=this.getTargetRenderTexture(e,n._drawWidth,n._drawHeight),r=e.cacheCanvas,t.bindFramebuffer(t.FRAMEBUFFER,r._frameBuffer),this.updateViewport(n._drawWidth,n._drawHeight),this._projectionMatrix=this._projectionMatrixFlip,t.clear(t.COLOR_BUFFER_BIT),this._batchDraw(d,t,!0),t.bindFramebuffer(t.FRAMEBUFFER,null),this.updateViewport(c,u)),this._backupBatchTextures(!0),this.protectTextureSlot(l,!1),this._activeShader=a,this._slotBlacklist=o},e._drawFilters=function(t,e,i){var n,r=this._webGLContext,a=this._maxTextureSlots-1,o=this._viewportWidth,l=this._viewportHeight,c=this._cacheContainer,u=e.length;r.activeTexture(r.TEXTURE0+a),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this.updateViewport(i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._batchDraw(c,r,!0),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r);var h=!1,d=0,p=e[d];do this._activeShader=this.getFilterShader(p),this._activeShader&&(r.activeTexture(r.TEXTURE0+a),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h),r.activeTexture(r.TEXTURE0),r.bindTexture(r.TEXTURE_2D,n),this.setTextureParams(r),(u>1||e[0]._multiPass)&&(h=!h),p=null!==p._multiPass?p._multiPass:e[++d]);while(p);this.isCacheControlled?(r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(o,l),this._activeShader=this.getFilterShader(this),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,h)):(h&&(r.activeTexture(r.TEXTURE0+a),n=this.getTargetRenderTexture(t,i._drawWidth,i._drawHeight),r.bindFramebuffer(r.FRAMEBUFFER,n._frameBuffer),this._activeShader=this.getFilterShader(this),r.viewport(0,0,i._drawWidth,i._drawHeight),r.clear(r.COLOR_BUFFER_BIT),this._drawCover(r,!h)),r.bindFramebuffer(r.FRAMEBUFFER,null),this.updateViewport(o,l),t.cacheCanvas=n)},e._appendToBatchGroup=function(e,i,n,r,a){e._glMtx||(e._glMtx=new createjs.Matrix2D);var o=e._glMtx;o.copy(n),e.transformMatrix?o.appendMatrix(e.transformMatrix):o.appendTransform(e.x,e.y,e.scaleX,e.scaleY,e.rotation,e.skewX,e.skewY,e.regX,e.regY);for(var l,c,u,h,d=e.children.length,p=0;d>p;p++){var f=e.children[p];if(f.visible&&r){if((!f.cacheCanvas||a)&&(f._updateState&&f._updateState(),f.children))this._appendToBatchGroup(f,i,o,f.alpha*r);else{this.batchCardCount+1>this._maxCardsPerBatch&&(this.batchReason="vertexOverflow",this._drawBuffers(i),this.batchCardCount=0),f._glMtx||(f._glMtx=new createjs.Matrix2D);var g=f._glMtx;g.copy(o),f.transformMatrix?g.appendMatrix(f.transformMatrix):g.appendTransform(f.x,f.y,f.scaleX,f.scaleY,f.rotation,f.skewX,f.skewY,f.regX,f.regY);var m,v,x,y,$,_,b=f.cacheCanvas&&!a;if(2===f._webGLRenderStyle||b)x=!a&&f.cacheCanvas||f.image;else{if(1!==f._webGLRenderStyle||null===(y=f.spriteSheet.getFrame(f.currentFrame)))continue;x=y.image}var T=this._uvs,w=this._vertices,E=this._indices,S=this._alphas;if(x){if(void 0===x._storeID)$=this._loadTextureImage(i,x),this._insertTextureInBatch(i,$);else{if(!($=this._textureDictionary[x._storeID])){this.vocalDebug&&console.log("Texture should not be looked up while not being stored.");continue}$._batchID!==this._batchID&&this._insertTextureInBatch(i,$)}if(v=$._activeIndex,2===f._webGLRenderStyle||b)!b&&f.sourceRect?(f._uvRect||(f._uvRect={}),_=f.sourceRect,(m=f._uvRect).t=_.y/x.height,m.l=_.x/x.width,m.b=(_.y+_.height)/x.height,m.r=(_.x+_.width)/x.width,l=0,c=0,u=_.width+l,h=_.height+c):(m=t.UV_RECT,b?(l=(_=f.bitmapCache).x+_._filterOffX/_.scale,c=_.y+_._filterOffY/_.scale,u=_._drawWidth/_.scale+l,h=_._drawHeight/_.scale+c):(l=0,c=0,u=x.width+l,h=x.height+c));else if(1===f._webGLRenderStyle){var C=y.rect;(m=y.uvRect)||(m=t.buildUVRects(f.spriteSheet,f.currentFrame,!1)),l=-y.regX,c=-y.regY,u=C.width-y.regX,h=C.height-y.regY}var A=this.batchCardCount*t.INDICIES_PER_CARD,P=2*A;w[P]=l*g.a+c*g.c+g.tx,w[P+1]=l*g.b+c*g.d+g.ty,w[P+2]=l*g.a+h*g.c+g.tx,w[P+3]=l*g.b+h*g.d+g.ty,w[P+4]=u*g.a+c*g.c+g.tx,w[P+5]=u*g.b+c*g.d+g.ty,w[P+6]=w[P+2],w[P+7]=w[P+3],w[P+8]=w[P+4],w[P+9]=w[P+5],w[P+10]=u*g.a+h*g.c+g.tx,w[P+11]=u*g.b+h*g.d+g.ty,T[P]=m.l,T[P+1]=m.t,T[P+2]=m.l,T[P+3]=m.b,T[P+4]=m.r,T[P+5]=m.t,T[P+6]=m.l,T[P+7]=m.b,T[P+8]=m.r,T[P+9]=m.t,T[P+10]=m.r,T[P+11]=m.b,E[A]=E[A+1]=E[A+2]=E[A+3]=E[A+4]=E[A+5]=v,S[A]=S[A+1]=S[A+2]=S[A+3]=S[A+4]=S[A+5]=f.alpha*r,this.batchCardCount++}}}}},e._drawBuffers=function(e){if(!(this.batchCardCount<=0)){this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : "+this.batchReason);var i=this._activeShader,n=this._vertexPositionBuffer,r=this._textureIndexBuffer,a=this._uvPositionBuffer,o=this._alphaBuffer;e.useProgram(i),e.bindBuffer(e.ARRAY_BUFFER,n),e.vertexAttribPointer(i.vertexPositionAttribute,n.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._vertices),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(i.textureIndexAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._indices),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(i.uvPositionAttribute,a.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._uvs),e.bindBuffer(e.ARRAY_BUFFER,o),e.vertexAttribPointer(i.alphaAttribute,o.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,this._alphas),e.uniformMatrix4fv(i.pMatrixUniform,e.FALSE,this._projectionMatrix);for(var l=0;l0&&this._drawBuffers(e),this.vocalDebug&&console.log("Draw["+this._drawID+":"+this._batchID+"] : Cover");var n=this._activeShader,r=this._vertexPositionBuffer,a=this._uvPositionBuffer;e.clear(e.COLOR_BUFFER_BIT),e.useProgram(n),e.bindBuffer(e.ARRAY_BUFFER,r),e.vertexAttribPointer(n.vertexPositionAttribute,r.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,t.COVER_VERT),e.bindBuffer(e.ARRAY_BUFFER,a),e.vertexAttribPointer(n.uvPositionAttribute,a.itemSize,e.FLOAT,!1,0,0),e.bufferSubData(e.ARRAY_BUFFER,0,i?t.COVER_UV_FLIP:t.COVER_UV),e.uniform1i(n.samplerUniform,0),e.uniform1f(n.uprightUniform,i?0:1),e.drawArrays(e.TRIANGLES,0,t.INDICIES_PER_CARD)},createjs.StageGL=createjs.promote(t,"Stage")}(),this.createjs=this.createjs||{},function(){function t(t){this.DisplayObject_constructor(),"string"==typeof t?(this.image=document.createElement("img"),this.image.src=t):this.image=t,this.sourceRect=null,this._webGLRenderStyle=createjs.DisplayObject._StageGL_BITMAP}var e=createjs.extend(t,createjs.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.image,e=this.cacheCanvas||t&&(t.naturalWidth||t.getContext||t.readyState>=2);return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&e)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;var i=this.image,n=this.sourceRect;if(i.getImage&&(i=i.getImage()),!i)return!0;if(n){var r=n.x,a=n.y,o=r+n.width,l=a+n.height,c=0,u=0,h=i.width,d=i.height;0>r&&(c-=r,r=0),o>h&&(o=h),0>a&&(u-=a,a=0),l>d&&(l=d),t.drawImage(i,r,a,o-r,l-a,c,u,o-r,l-a)}else t.drawImage(i,0,0);return!0},e.getBounds=function(){var t=this.DisplayObject_getBounds();if(t)return t;var e=this.image,i=this.sourceRect||e;return e&&(e.naturalWidth||e.getContext||e.readyState>=2)?this._rectangle.setValues(0,0,i.width,i.height):null},e.clone=function(e){var i=this.image;i&&e&&(i=i.cloneNode());var n=new t(i);return this.sourceRect&&(n.sourceRect=this.sourceRect.clone()),this._cloneProps(n),n},e.toString=function(){return"[Bitmap (name="+this.name+")]"},createjs.Bitmap=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.DisplayObject_constructor(),this.currentFrame=0,this.currentAnimation=null,this.paused=!0,this.spriteSheet=t,this.currentAnimationFrame=0,this.framerate=0,this._animation=null,this._currentFrame=null,this._skipAdvance=!1,this._webGLRenderStyle=createjs.DisplayObject._StageGL_SPRITE,null!=e&&this.gotoAndPlay(e)}var e=createjs.extend(t,createjs.DisplayObject);e.initialize=t,e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet.complete;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;this._normalizeFrame();var i=this.spriteSheet.getFrame(0|this._currentFrame);if(!i)return!1;var n=i.rect;return n.width&&n.height&&t.drawImage(i.image,n.x,n.y,n.width,n.height,-i.regX,-i.regY,n.width,n.height),!0},e.play=function(){this.paused=!1},e.stop=function(){this.paused=!0},e.gotoAndPlay=function(t){this.paused=!1,this._skipAdvance=!0,this._goto(t)},e.gotoAndStop=function(t){this.paused=!0,this._goto(t)},e.advance=function(t){var e=this.framerate||this.spriteSheet.framerate;this._normalizeFrame(e&&null!=t?t/(1e3/e):1)},e.getBounds=function(){return this.DisplayObject_getBounds()||this.spriteSheet.getFrameBounds(this.currentFrame,this._rectangle)},e.clone=function(){return this._cloneProps(new t(this.spriteSheet))},e.toString=function(){return"[Sprite (name="+this.name+")]"},e._cloneProps=function(t){return this.DisplayObject__cloneProps(t),t.currentFrame=this.currentFrame,t.currentAnimation=this.currentAnimation,t.paused=this.paused,t.currentAnimationFrame=this.currentAnimationFrame,t.framerate=this.framerate,t._animation=this._animation,t._currentFrame=this._currentFrame,t._skipAdvance=this._skipAdvance,t},e._tick=function(t){this.paused||(this._skipAdvance||this.advance(t&&t.delta),this._skipAdvance=!1),this.DisplayObject__tick(t)},e._normalizeFrame=function(t){t=t||0;var e,i=this._animation,n=this.paused,r=this._currentFrame;if(i){var a=i.speed||1,o=this.currentAnimationFrame;if(o+t*a>=(e=i.frames.length)){var l=i.next;if(this._dispatchAnimationEnd(i,r,n,l,e-1))return;if(l)return this._goto(l,t-(e-o)/a);this.paused=!0,o=i.frames.length-1}else o+=t*a;this.currentAnimationFrame=o,this._currentFrame=i.frames[0|o]}else if((r=this._currentFrame+=t)>=(e=this.spriteSheet.getNumFrames())&&e>0&&!this._dispatchAnimationEnd(i,r,n,e-1)&&(this._currentFrame-=e)>=e)return this._normalizeFrame();r=0|this._currentFrame,this.currentFrame!=r&&(this.currentFrame=r,this.dispatchEvent("change"))},e._dispatchAnimationEnd=function(t,e,i,n,r){var a=t?t.name:null;if(this.hasEventListener("animationend")){var o=new createjs.Event("animationend");o.name=a,o.next=n,this.dispatchEvent(o)}var l=this._animation!=t||this._currentFrame!=e;return l||i||!this.paused||(this.currentAnimationFrame=r,l=!0),l},e._goto=function(t,e){if(this.currentAnimationFrame=0,isNaN(t)){var i=this.spriteSheet.getAnimation(t);i&&(this._animation=i,this.currentAnimation=t,this._normalizeFrame(e))}else this.currentAnimation=this._animation=null,this._currentFrame=t,this._normalizeFrame()},createjs.Sprite=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.DisplayObject_constructor(),this.graphics=t||new createjs.Graphics}var e=createjs.extend(t,createjs.DisplayObject);e.isVisible=function(){var t=this.cacheCanvas||this.graphics&&!this.graphics.isEmpty();return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){return!!this.DisplayObject_draw(t,e)||(this.graphics.draw(t,this),!0)},e.clone=function(e){var i=e&&this.graphics?this.graphics.clone():this.graphics;return this._cloneProps(new t(i))},e.toString=function(){return"[Shape (name="+this.name+")]"},createjs.Shape=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.DisplayObject_constructor(),this.text=t,this.font=e,this.color=i,this.textAlign="left",this.textBaseline="top",this.maxWidth=null,this.outline=0,this.lineHeight=0,this.lineWidth=null}var e=createjs.extend(t,createjs.DisplayObject),i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");i.getContext&&(t._workingContext=i.getContext("2d"),i.width=i.height=1),t.H_OFFSETS={start:0,left:0,center:-.5,end:-1,right:-1},t.V_OFFSETS={top:0,hanging:-.01,middle:-.4,alphabetic:-.8,ideographic:-.85,bottom:-1},e.isVisible=function(){var t=this.cacheCanvas||null!=this.text&&""!==this.text;return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY&&t)},e.draw=function(t,e){if(this.DisplayObject_draw(t,e))return!0;var i=this.color||"#000";return this.outline?(t.strokeStyle=i,t.lineWidth=1*this.outline):t.fillStyle=i,this._drawText(this._prepContext(t)),!0},e.getMeasuredWidth=function(){return this._getMeasuredWidth(this.text)},e.getMeasuredLineHeight=function(){return 1.2*this._getMeasuredWidth("M")},e.getMeasuredHeight=function(){return this._drawText(null,{}).height},e.getBounds=function(){var e=this.DisplayObject_getBounds();if(e)return e;if(null==this.text||""===this.text)return null;var i=this._drawText(null,{}),n=this.maxWidth&&this.maxWidthu;u++){var d=c[u],p=null;if(null!=this.lineWidth&&(p=e.measureText(d).width)>this.lineWidth){var f=d.split(/(\s)/);d=f[0],p=e.measureText(d).width;for(var g=1,m=f.length;m>g;g+=2){var v=e.measureText(f[g]+f[g+1]).width;p+v>this.lineWidth?(r&&this._drawTextLine(e,d,l*a),n&&n.push(d),p>o&&(o=p),d=f[g+1],p=e.measureText(d).width,l++):(d+=f[g]+f[g+1],p+=v)}}r&&this._drawTextLine(e,d,l*a),n&&n.push(d),i&&null==p&&(p=e.measureText(d).width),p>o&&(o=p),l++}return i&&(i.width=o,i.height=l*a),r||e.restore(),i},e._drawTextLine=function(t,e,i){this.outline?t.strokeText(e,0,i,this.maxWidth||65535):t.fillText(e,0,i,this.maxWidth||65535)},e._getMeasuredWidth=function(e){var i=t._workingContext;i.save();var n=this._prepContext(i).measureText(e).width;return i.restore(),n},createjs.Text=createjs.promote(t,"DisplayObject")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.Container_constructor(),this.text=t||"",this.spriteSheet=e,this.lineHeight=0,this.letterSpacing=0,this.spaceWidth=0,this._oldProps={text:0,spriteSheet:0,lineHeight:0,letterSpacing:0,spaceWidth:0},this._oldStage=null,this._drawAction=null}var e=createjs.extend(t,createjs.Container);t.maxPoolSize=100,t._spritePool=[],e.draw=function(t,e){this.DisplayObject_draw(t,e)||(this._updateState(),this.Container_draw(t,e))},e.getBounds=function(){return this._updateText(),this.Container_getBounds()},e.isVisible=function(){var t=this.cacheCanvas||this.spriteSheet&&this.spriteSheet.complete&&this.text;return!!(this.visible&&this.alpha>0&&0!==this.scaleX&&0!==this.scaleY&&t)},e.clone=function(){return this._cloneProps(new t(this.text,this.spriteSheet))},e.addChild=e.addChildAt=e.removeChild=e.removeChildAt=e.removeAllChildren=function(){},e._updateState=function(){this._updateText()},e._cloneProps=function(t){return this.Container__cloneProps(t),t.lineHeight=this.lineHeight,t.letterSpacing=this.letterSpacing,t.spaceWidth=this.spaceWidth,t},e._getFrameIndex=function(t,e){var i,n=e.getAnimation(t);return n||(t!=(i=t.toUpperCase())||t!=(i=t.toLowerCase())||(i=null),i&&(n=e.getAnimation(i))),n&&n.frames[0]},e._getFrame=function(t,e){var i=this._getFrameIndex(t,e);return null==i?i:e.getFrame(i)},e._getLineHeight=function(t){var e=this._getFrame("1",t)||this._getFrame("T",t)||this._getFrame("L",t)||t.getFrame(0);return e?e.rect.height:1},e._getSpaceWidth=function(t){var e=this._getFrame("1",t)||this._getFrame("l",t)||this._getFrame("e",t)||this._getFrame("a",t)||t.getFrame(0);return e?e.rect.width:1},e._updateText=function(){var e,i=0,n=0,r=this._oldProps,a=!1,o=this.spaceWidth,l=this.lineHeight,c=this.spriteSheet,u=t._spritePool,h=this.children,d=0,p=h.length;for(var f in r)r[f]!=this[f]&&(r[f]=this[f],a=!0);if(a){var g=!!this._getFrame(" ",c);g||o||(o=this._getSpaceWidth(c)),l||(l=this._getLineHeight(c));for(var m=0,v=this.text.length;v>m;m++){var x=this.text.charAt(m);if(" "!=x||g){if("\n"!=x&&"\r"!=x){var y=this._getFrameIndex(x,c);null!=y&&(p>d?e=h[d]:(h.push(e=u.length?u.pop():new createjs.Sprite),e.parent=this,p++),e.spriteSheet=c,e.gotoAndStop(y),e.x=i,e.y=n,d++,i+=e.getBounds().width+this.letterSpacing)}else"\r"==x&&"\n"==this.text.charAt(m+1)&&m++,i=0,n+=l}else i+=o}for(;p>d;)u.push(e=h.pop()),e.parent=null,p--;u.length>t.maxPoolSize&&(u.length=t.maxPoolSize)}},createjs.BitmapText=createjs.promote(t,"Container")}(),this.createjs=this.createjs||{},function(){"use strict";function t(e){var i,n,r,a;this.Container_constructor(),t.inited||t.init(),e instanceof String||arguments.length>1?(i=e,n=arguments[1],r=arguments[2],a=arguments[3],null==r&&(r=-1),e=null):e&&(i=e.mode,n=e.startPosition,r=e.loop,a=e.labels),e||(e={labels:a}),this.mode=i||t.INDEPENDENT,this.startPosition=n||0,this.loop=!0===r?-1:r||0,this.currentFrame=0,this.paused=e.paused||!1,this.actionsEnabled=!0,this.autoReset=!0,this.frameBounds=this.frameBounds||e.frameBounds,this.framerate=null,e.useTicks=e.paused=!0,this.timeline=new createjs.Timeline(e),this._synchOffset=0,this._rawPosition=-1,this._bound_resolveState=this._resolveState.bind(this),this._t=0,this._managed={}}function e(){throw"MovieClipPlugin cannot be instantiated."}var i=createjs.extend(t,createjs.Container);t.INDEPENDENT="independent",t.SINGLE_FRAME="single",t.SYNCHED="synched",t.inited=!1,t.init=function(){t.inited||(e.install(),t.inited=!0)},i._getLabels=function(){return this.timeline.getLabels()},i.getLabels=createjs.deprecate(i._getLabels,"MovieClip.getLabels"),i._getCurrentLabel=function(){return this.timeline.currentLabel},i.getCurrentLabel=createjs.deprecate(i._getCurrentLabel,"MovieClip.getCurrentLabel"),i._getDuration=function(){return this.timeline.duration},i.getDuration=createjs.deprecate(i._getDuration,"MovieClip.getDuration");try{Object.defineProperties(i,{labels:{get:i._getLabels},currentLabel:{get:i._getCurrentLabel},totalFrames:{get:i._getDuration},duration:{get:i._getDuration}})}catch(n){}i.initialize=t,i.isVisible=function(){return!!(this.visible&&this.alpha>0&&0!=this.scaleX&&0!=this.scaleY)},i.draw=function(t,e){return!!this.DisplayObject_draw(t,e)||(this._updateState(),this.Container_draw(t,e),!0)},i.play=function(){this.paused=!1},i.stop=function(){this.paused=!0},i.gotoAndPlay=function(t){this.paused=!1,this._goto(t)},i.gotoAndStop=function(t){this.paused=!0,this._goto(t)},i.advance=function(e){var i=t.INDEPENDENT;if(this.mode===i){for(var n=this,r=n.framerate;(n=n.parent)&&null===r;)n.mode===i&&(r=n._framerate);if(this._framerate=r,!this.paused){var a=null!==r&&-1!==r&&null!==e?e/(1e3/r)+this._t:1,o=0|a;for(this._t=a-o;o--;)this._updateTimeline(this._rawPosition+1,!1)}}},i.clone=function(){throw"MovieClip cannot be cloned."},i.toString=function(){return"[MovieClip (name="+this.name+")]"},i._updateState=function(){(-1===this._rawPosition||this.mode!==t.INDEPENDENT)&&this._updateTimeline(-1)},i._tick=function(t){this.advance(t&&t.delta),this.Container__tick(t)},i._goto=function(t){var e=this.timeline.resolve(t);null!=e&&(this._t=0,this._updateTimeline(e,!0))},i._reset=function(){this._rawPosition=-1,this._t=this.currentFrame=0,this.paused=!1},i._updateTimeline=function(e,i){var n=this.mode!==t.INDEPENDENT,r=this.timeline;n&&(e=this.startPosition+(this.mode===t.SINGLE_FRAME?0:this._synchOffset)),0>e&&(e=0),(this._rawPosition!==e||n)&&(this._rawPosition=e,r.loop=this.loop,r.setPosition(e,n||!this.actionsEnabled,i,this._bound_resolveState))},i._renderFirstFrame=function(){var t=this.timeline,e=t.rawPosition;t.setPosition(0,!0,!0,this._bound_resolveState),t.rawPosition=e},i._resolveState=function(){var t=this.timeline;for(var e in this.currentFrame=t.position,this._managed)this._managed[e]=1;for(var i=t.tweens,n=0,r=i.length;r>n;n++){var a=i[n],o=a.target;if(o!==this&&!a.passive){var l=a._stepPosition;o instanceof createjs.DisplayObject?this._addManagedChild(o,l):this._setState(o.state,l)}}var c=this.children;for(n=c.length-1;n>=0;n--){var u=c[n].id;1===this._managed[u]&&(this.removeChildAt(n),delete this._managed[u])}},i._setState=function(t,e){if(t)for(var i=t.length-1;i>=0;i--){var n=t[i],r=n.t,a=n.p;for(var o in a)r[o]=a[o];this._addManagedChild(r,e)}},i._addManagedChild=function(e,i){e._off||(this.addChildAt(e,0),e instanceof t&&(e._synchOffset=i,e.mode===t.INDEPENDENT&&e.autoReset&&!this._managed[e.id]&&e._reset()),this._managed[e.id]=2)},i._getBounds=function(t,e){var i=this.DisplayObject_getBounds();return i||this.frameBounds&&(i=this._rectangle.copy(this.frameBounds[this.currentFrame])),i?this._transformBounds(i,t,e):this.Container__getBounds(t,e)},createjs.MovieClip=createjs.promote(t,"Container"),e.priority=100,e.ID="MovieClip",e.install=function(){createjs.Tween._installPlugin(e)},e.init=function(i,n,r){"startPosition"===n&&i.target instanceof t&&i._addPlugin(e)},e.step=function(t,e,i){},e.change=function(t,e,i,n,r,a){return"startPosition"===i?1===r?e.props[i]:e.prev.props[i]:void 0}}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"SpriteSheetUtils cannot be instantiated"}var e=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");e.getContext&&(t._workingCanvas=e,t._workingContext=e.getContext("2d"),e.width=e.height=1),t.extractFrame=function(e,i){isNaN(i)&&(i=e.getAnimation(i).frames[0]);var n=e.getFrame(i);if(!n)return null;var r=n.rect,a=t._workingCanvas;a.width=r.width,a.height=r.height,t._workingContext.drawImage(n.image,r.x,r.y,r.width,r.height,0,0,r.width,r.height);var o=document.createElement("img");return o.src=a.toDataURL("image/png"),o},t.addFlippedFrames=createjs.deprecate(null,"SpriteSheetUtils.addFlippedFrames"),t.mergeAlpha=createjs.deprecate(null,"SpriteSheetUtils.mergeAlpha"),t._flip=function(e,i,n,r){for(var a=e._images,o=t._workingCanvas,l=t._workingContext,c=a.length/i,u=0;c>u;u++){var h=a[u];h.__tmp=u,l.setTransform(1,0,0,1,0,0),l.clearRect(0,0,o.width+1,o.height+1),o.width=h.width,o.height=h.height,l.setTransform(n?-1:1,0,0,r?-1:1,n?h.width:0,r?h.height:0),l.drawImage(h,0,0);var d=document.createElement("img");d.src=o.toDataURL("image/png"),d.width=h.width||h.naturalWidth,d.height=h.height||h.naturalHeight,a.push(d)}var p=e._frames,f=p.length/i;for(u=0;f>u;u++){var g=(h=p[u]).rect.clone(),m={image:d=a[h.image.__tmp+c*i],rect:g,regX:h.regX,regY:h.regY};n&&(g.x=(d.width||d.naturalWidth)-g.x-g.width,m.regX=g.width-h.regX),r&&(g.y=(d.height||d.naturalHeight)-g.y-g.height,m.regY=g.height-h.regY),p.push(m)}var v="_"+(n?"h":"")+(r?"v":""),x=e._animations,y=e._data,$=x.length/i;for(u=0;$>u;u++){var _=x[u];h=y[_];var b={name:_+v,speed:h.speed,next:h.next,frames:[]};h.next&&(b.next+=v),p=h.frames;for(var T=0,w=p.length;w>T;T++)b.frames.push(p[T]+f*i);y[b.name]=b,x.push(b.name)}},createjs.SpriteSheetUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.EventDispatcher_constructor(),this.maxWidth=2048,this.maxHeight=2048,this.spriteSheet=null,this.scale=1,this.padding=1,this.timeSlice=.3,this.progress=-1,this.framerate=t||0,this._frames=[],this._animations={},this._data=null,this._nextFrameIndex=0,this._index=0,this._timerID=null,this._scale=1}var e=createjs.extend(t,createjs.EventDispatcher);t.ERR_DIMENSIONS="frame dimensions exceed max spritesheet dimensions",t.ERR_RUNNING="a build is already running",e.addFrame=function(e,i,n,r,a){if(this._data)throw t.ERR_RUNNING;var o=i||e.bounds||e.nominalBounds;return!o&&e.getBounds&&(o=e.getBounds()),o?(n=n||1,this._frames.push({source:e,sourceRect:o,scale:n,funct:r,data:a,index:this._frames.length,height:o.height*n})-1):null},e.addAnimation=function(e,i,n,r){if(this._data)throw t.ERR_RUNNING;this._animations[e]={frames:i,next:n,speed:r}},e.addMovieClip=function(e,i,n,r,a,o){if(this._data)throw t.ERR_RUNNING;var l=e.frameBounds,c=i||e.bounds||e.nominalBounds;if(!c&&e.getBounds&&(c=e.getBounds()),c||l){var u,h,d=this._frames.length,p=e.timeline.duration;for(u=0;p>u;u++){var f=l&&l[u]?l[u]:c;this.addFrame(e,f,n,this._setupMovieClipFrame,{i:u,f:r,d:a})}var g=e.timeline._labels,m=[];for(var v in g)m.push({index:g[v],label:v});if(m.length)for(m.sort(function(t,e){return t.index-e.index}),u=0,h=m.length;h>u;u++){for(var x=m[u].label,y=d+m[u].index,$=d+(u==h-1?p:m[u+1].index),_=[],b=y;$>b;b++)_.push(b);(!o||(x=o(x,e,y,$)))&&this.addAnimation(x,_,!0)}}},e.build=function(){if(this._data)throw t.ERR_RUNNING;for(this._startBuild();this._drawNext(););return this._endBuild(),this.spriteSheet},e.buildAsync=function(e){if(this._data)throw t.ERR_RUNNING;this.timeSlice=e,this._startBuild();var i=this;this._timerID=setTimeout(function(){i._run()},50-50*Math.max(.01,Math.min(.99,this.timeSlice||.3)))},e.stopAsync=function(){clearTimeout(this._timerID),this._data=null},e.clone=function(){throw"SpriteSheetBuilder cannot be cloned."},e.toString=function(){return"[SpriteSheetBuilder]"},e._startBuild=function(){var e=this.padding||0;this.progress=0,this.spriteSheet=null,this._index=0,this._scale=this.scale;var i=[];this._data={images:[],frames:i,framerate:this.framerate,animations:this._animations};var n=this._frames.slice();if(n.sort(function(t,e){return t.height<=e.height?-1:1}),n[n.length-1].height+2*e>this.maxHeight)throw t.ERR_DIMENSIONS;for(var r=0,a=0,o=0;n.length;){var l=this._fillRow(n,r,o,i,e);if(l.w>a&&(a=l.w),r+=l.h,!l.h||!n.length){var c=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas");c.width=this._getSize(a,this.maxWidth),c.height=this._getSize(r,this.maxHeight),this._data.images[o]=c,l.h||(a=r=0,o++)}}},e._setupMovieClipFrame=function(t,e){var i=t.actionsEnabled;t.actionsEnabled=!1,t.gotoAndStop(e.i),t.actionsEnabled=i,e.f&&e.f(t,e.d,e.i)},e._getSize=function(t,e){for(var i=4;Math.pow(2,++i)=0;d--){var p=e[d],f=this._scale*p.scale,g=p.sourceRect,m=p.source,v=Math.floor(f*g.x-a),x=Math.floor(f*g.y-a),y=Math.ceil(f*g.height+2*a),$=Math.ceil(f*g.width+2*a);if($>o)throw t.ERR_DIMENSIONS;y>c||u+$>o||(p.img=n,p.rect=new createjs.Rectangle(u,i,$,y),h=h||y,e.splice(d,1),r[p.index]=[u,i,$,y,n,Math.round(-v+f*m.regX-a),Math.round(-x+f*m.regY-a)],u+=$)}return{w:u,h:h}},e._endBuild=function(){this.spriteSheet=new createjs.SpriteSheet(this._data),this._data=null,this.progress=1,this.dispatchEvent("complete")},e._run=function(){for(var t=50*Math.max(.01,Math.min(.99,this.timeSlice||.3)),e=(new Date).getTime()+t,i=!1;e>(new Date).getTime();)if(!this._drawNext()){i=!0;break}if(i)this._endBuild();else{var n=this;this._timerID=setTimeout(function(){n._run()},50-t)}var r=this.progress=this._index/this._frames.length;if(this.hasEventListener("progress")){var a=new createjs.Event("progress");a.progress=r,this.dispatchEvent(a)}},e._drawNext=function(){var t=this._frames[this._index],e=t.scale*this._scale,i=t.rect,n=t.sourceRect,r=this._data.images[t.img].getContext("2d");return t.funct&&t.funct(t.source,t.data),r.save(),r.beginPath(),r.rect(i.x,i.y,i.width,i.height),r.clip(),r.translate(Math.ceil(i.x-n.x*e),Math.ceil(i.y-n.y*e)),r.scale(e,e),t.source.draw(r),r.restore(),++this._index=!!n)return e;for(var r=0;n>r;r++){var a=i[r];if(a&&a.getBounds){var o=a.getBounds();o&&(0==r?e.setValues(o.x,o.y,o.width,o.height):e.extend(o.x,o.y,o.width,o.height))}}return e},e.toString=function(){return"[BitmapCache]"},e.define=function(t,e,i,n,r,a,o){if(!t)throw"No symbol to cache";this._options=o,this.target=t,this.width=n>=1?n:1,this.height=r>=1?r:1,this.x=e||0,this.y=i||0,this.scale=a||1,this.update()},e.update=function(e){if(!this.target)throw"define() must be called before update()";var i=t.getFilterBounds(this.target),n=this.target.cacheCanvas;this._drawWidth=Math.ceil(this.width*this.scale)+i.width,this._drawHeight=Math.ceil(this.height*this.scale)+i.height,n&&this._drawWidth==n.width&&this._drawHeight==n.height||this._updateSurface(),this._filterOffX=i.x,this._filterOffY=i.y,this.offX=this.x*this.scale+this._filterOffX,this.offY=this.y*this.scale+this._filterOffY,this._drawToCache(e),this.cacheID=this.cacheID?this.cacheID+1:1},e.release=function(){if(this._webGLCache)this._webGLCache.isCacheControlled||(this.__lastRT&&(this.__lastRT=void 0),this.__rtA&&this._webGLCache._killTextureObject(this.__rtA),this.__rtB&&this._webGLCache._killTextureObject(this.__rtB),this.target&&this.target.cacheCanvas&&this._webGLCache._killTextureObject(this.target.cacheCanvas)),this._webGLCache=!1;else{var t=this.target.stage;t instanceof createjs.StageGL&&t.releaseTexture(this.target.cacheCanvas)}this.target=this.target.cacheCanvas=null,this.cacheID=this._cacheDataURLID=this._cacheDataURL=void 0,this.width=this.height=this.x=this.y=this.offX=this.offY=0,this.scale=1},e.getCacheDataURL=function(){var t=this.target&&this.target.cacheCanvas;return t?(this.cacheID!=this._cacheDataURLID&&(this._cacheDataURLID=this.cacheID,this._cacheDataURL=t.toDataURL?t.toDataURL():null),this._cacheDataURL):null},e.draw=function(t){return!!this.target&&(t.drawImage(this.target.cacheCanvas,this.x+this._filterOffX/this.scale,this.y+this._filterOffY/this.scale,this._drawWidth/this.scale,this._drawHeight/this.scale),!0)},e._updateSurface=function(){if(!this._options||!this._options.useGL){var t=this.target.cacheCanvas;return t||(t=this.target.cacheCanvas=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")),t.width=this._drawWidth,void(t.height=this._drawHeight)}if(!this._webGLCache){if("stage"===this._options.useGL){if(!this.target.stage||!this.target.stage.isWebGL)throw"Cannot use 'stage' for cache because the object's parent stage is "+(this.target.stage?"non WebGL.":"not set, please addChild to the correct stage.");this.target.cacheCanvas=!0,this._webGLCache=this.target.stage}else if("new"===this._options.useGL)this.target.cacheCanvas=document.createElement("canvas"),this._webGLCache=new createjs.StageGL(this.target.cacheCanvas,{antialias:!0,transparent:!0,autoPurge:-1}),this._webGLCache.isCacheControlled=!0;else{if(!(this._options.useGL instanceof createjs.StageGL))throw"Invalid option provided to useGL, expected ['stage', 'new', StageGL, undefined], got "+this._options.useGL;this.target.cacheCanvas=!0,this._webGLCache=this._options.useGL,this._webGLCache.isCacheControlled=!0}}var t=this.target.cacheCanvas,e=this._webGLCache;e.isCacheControlled&&(t.width=this._drawWidth,t.height=this._drawHeight,e.updateViewport(this._drawWidth,this._drawHeight)),this.target.filters?(e.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight),e.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)):e.isCacheControlled||e.getTargetRenderTexture(this.target,this._drawWidth,this._drawHeight)},e._drawToCache=function(t){var e=this.target.cacheCanvas,i=this.target,n=this._webGLCache;if(n)n.cacheDraw(i,i.filters,this),(e=this.target.cacheCanvas).width=this._drawWidth,e.height=this._drawHeight;else{var r=e.getContext("2d");t||r.clearRect(0,0,this._drawWidth+1,this._drawHeight+1),r.save(),r.globalCompositeOperation=t,r.setTransform(this.scale,0,0,this.scale,-this._filterOffX,-this._filterOffY),r.translate(-this.x,-this.y),i.draw(r,!0),r.restore(),i.filters&&i.filters.length&&this._applyFilters(r)}e._invalid=!0},e._applyFilters=function(t){var e,i=this.target.filters,n=this._drawWidth,r=this._drawHeight,a=0,o=i[a];do o.usesContext?(e&&(t.putImageData(e,0,0),e=null),o.applyFilter(t,0,0,n,r)):(e||(e=t.getImageData(0,0,n,r)),o._applyFilter(e)),o=null!==o._multiPass?o._multiPass:i[++a];while(o);e&&t.putImageData(e,0,0)},createjs.BitmapCache=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.Filter_constructor(),this._blurX=t,this._blurXTable=[],this._lastBlurX=null,this._blurY=e,this._blurYTable=[],this._lastBlurY=null,this._quality,this._lastQuality=null,this.FRAG_SHADER_TEMPLATE="uniform float xWeight[{{blurX}}];uniform float yWeight[{{blurY}}];uniform vec2 textureOffset;void main(void) {vec4 color = vec4(0.0);float xAdj = ({{blurX}}.0-1.0)/2.0;float yAdj = ({{blurY}}.0-1.0)/2.0;vec2 sampleOffset;for(int i=0; i<{{blurX}}; i++) {for(int j=0; j<{{blurY}}; j++) {sampleOffset = vRenderCoord + (textureOffset * vec2(float(i)-xAdj, float(j)-yAdj));color += texture2D(uSampler, sampleOffset) * (xWeight[i] * yWeight[j]);}}gl_FragColor = color.rgba;}",(isNaN(i)||1>i)&&(i=1),this.setQuality(0|i)}var e=createjs.extend(t,createjs.Filter);e.getBlurX=function(){return this._blurX},e.getBlurY=function(){return this._blurY},e.setBlurX=function(t){(isNaN(t)||0>t)&&(t=0),this._blurX=t},e.setBlurY=function(t){(isNaN(t)||0>t)&&(t=0),this._blurY=t},e.getQuality=function(){return this._quality},e.setQuality=function(t){(isNaN(t)||0>t)&&(t=0),this._quality=0|t},e._getShader=function(){var t=this._lastBlurX!==this._blurX,e=this._lastBlurY!==this._blurY,i=this._lastQuality!==this._quality;return t||e||i?((t||i)&&(this._blurXTable=this._getTable(this._blurX*this._quality)),(e||i)&&(this._blurYTable=this._getTable(this._blurY*this._quality)),this._updateShader(),this._lastBlurX=this._blurX,this._lastBlurY=this._blurY,void(this._lastQuality=this._quality)):this._compiledShader},e._setShader=function(){this._compiledShader};try{Object.defineProperties(e,{blurX:{get:e.getBlurX,set:e.setBlurX},blurY:{get:e.getBlurY,set:e.setBlurY},quality:{get:e.getQuality,set:e.setQuality},_builtShader:{get:e._getShader,set:e._setShader}})}catch(i){console.log(i)}e._getTable=function(t){if(1>=t)return[1];var e=[],i=Math.ceil(2*t);i+=i%2?0:1;for(var n=i/2|0,r=-n;n>=r;r++){var a=r/n*4.2;e.push(1/Math.sqrt(2*Math.PI)*Math.pow(Math.E,-(Math.pow(a,2)/4)))}var o=e.reduce(function(t,e){return t+e});return e.map(function(t,e,i){return t/o})},e._updateShader=function(){if(void 0!==this._blurX&&void 0!==this._blurY){var t=this.FRAG_SHADER_TEMPLATE;t=(t=t.replace(/\{\{blurX\}\}/g,this._blurXTable.length.toFixed(0))).replace(/\{\{blurY\}\}/g,this._blurYTable.length.toFixed(0)),this.FRAG_SHADER_BODY=t}},e.shaderParamSetup=function(t,e,i){t.uniform1fv(t.getUniformLocation(i,"xWeight"),this._blurXTable),t.uniform1fv(t.getUniformLocation(i,"yWeight"),this._blurYTable),t.uniform2f(t.getUniformLocation(i,"textureOffset"),2/(e._viewportWidth*this._quality),2/(e._viewportHeight*this._quality))},t.MUL_TABLE=[1,171,205,293,57,373,79,137,241,27,391,357,41,19,283,265,497,469,443,421,25,191,365,349,335,161,155,149,9,278,269,261,505,245,475,231,449,437,213,415,405,395,193,377,369,361,353,345,169,331,325,319,313,307,301,37,145,285,281,69,271,267,263,259,509,501,493,243,479,118,465,459,113,446,55,435,429,423,209,413,51,403,199,393,97,3,379,375,371,367,363,359,355,351,347,43,85,337,333,165,327,323,5,317,157,311,77,305,303,75,297,294,73,289,287,71,141,279,277,275,68,135,67,133,33,262,260,129,511,507,503,499,495,491,61,121,481,477,237,235,467,232,115,457,227,451,7,445,221,439,218,433,215,427,425,211,419,417,207,411,409,203,202,401,399,396,197,49,389,387,385,383,95,189,47,187,93,185,23,183,91,181,45,179,89,177,11,175,87,173,345,343,341,339,337,21,167,83,331,329,327,163,81,323,321,319,159,79,315,313,39,155,309,307,153,305,303,151,75,299,149,37,295,147,73,291,145,289,287,143,285,71,141,281,35,279,139,69,275,137,273,17,271,135,269,267,133,265,33,263,131,261,130,259,129,257,1],t.SHG_TABLE=[0,9,10,11,9,12,10,11,12,9,13,13,10,9,13,13,14,14,14,14,10,13,14,14,14,13,13,13,9,14,14,14,15,14,15,14,15,15,14,15,15,15,14,15,15,15,15,15,14,15,15,15,15,15,15,12,14,15,15,13,15,15,15,15,16,16,16,15,16,14,16,16,14,16,13,16,16,16,15,16,13,16,15,16,14,9,16,16,16,16,16,16,16,16,16,13,14,16,16,15,16,16,10,16,15,16,14,16,16,14,16,16,14,16,16,14,15,16,16,16,14,15,14,15,13,16,16,15,17,17,17,17,17,17,14,15,17,17,16,16,17,16,15,17,16,17,11,17,16,17,16,17,16,17,17,16,17,17,16,17,17,16,16,17,17,17,16,14,17,17,17,17,15,16,14,16,15,16,13,16,15,16,14,16,15,16,12,16,15,16,17,17,17,17,17,13,16,15,17,17,17,16,15,17,17,17,16,15,17,17,14,16,17,17,16,17,17,16,15,17,16,14,17,16,15,17,16,17,17,16,17,15,16,17,14,17,16,15,17,16,17,13,17,16,17,17,16,17,14,17,16,17,16,17,16,17,9],e.getBounds=function(t){var e=0|this.blurX,i=0|this.blurY;if(0>=e&&0>=i)return t;var n=Math.pow(this.quality,.2);return(t||new createjs.Rectangle).pad(i*n+1,e*n+1,i*n+1,e*n+1)},e.clone=function(){return new t(this.blurX,this.blurY,this.quality)},e.toString=function(){return"[BlurFilter]"},e._applyFilter=function(e){var i=this._blurX>>1;if(isNaN(i)||0>i)return!1;var n=this._blurY>>1;if(isNaN(n)||0>n||0==i&&0==n)return!1;var r=this.quality;(isNaN(r)||1>r)&&(r=1),(r|=0)>3&&(r=3),1>r&&(r=1);var a=e.data,o=0,l=0,c=0,u=0,h=0,d=0,p=0,f=0,g=0,m=0,v=0,x=0,y=0,$=0,_=0,b=i+i+1|0,T=n+n+1|0,w=0|e.width,E=0|e.height,S=w-1|0,C=E-1|0,A=i+1|0,P=n+1|0,L={r:0,b:0,g:0,a:0},R=L;for(c=1;b>c;c++)R=R.n={r:0,b:0,g:0,a:0};R.n=L;var D={r:0,b:0,g:0,a:0},I=D;for(c=1;T>c;c++)I=I.n={r:0,b:0,g:0,a:0};I.n=D;for(var k=null,O=0|t.MUL_TABLE[i],M=0|t.SHG_TABLE[i],N=0|t.MUL_TABLE[n],F=0|t.SHG_TABLE[n];r-- >0;){p=d=0;var B=O,j=M;for(l=E;--l>-1;){for(f=A*(x=a[0|d]),g=A*(y=a[d+1|0]),m=A*($=a[d+2|0]),v=A*(_=a[d+3|0]),R=L,c=A;--c>-1;)R.r=x,R.g=y,R.b=$,R.a=_,R=R.n;for(c=1;A>c;c++)u=d+((c>S?S:c)<<2)|0,f+=R.r=a[u],g+=R.g=a[u+1],m+=R.b=a[u+2],v+=R.a=a[u+3],R=R.n;for(k=L,o=0;w>o;o++)a[d++]=f*B>>>j,a[d++]=g*B>>>j,a[d++]=m*B>>>j,a[d++]=v*B>>>j,u=p+((u=o+i+1)o;o++){for(f=P*(x=a[d=o<<2|0])|0,g=P*(y=a[d+1|0])|0,m=P*($=a[d+2|0])|0,v=P*(_=a[d+3|0])|0,I=D,c=0;P>c;c++)I.r=x,I.g=y,I.b=$,I.a=_,I=I.n;for(h=w,c=1;n>=c;c++)d=h+o<<2,f+=I.r=a[d],g+=I.g=a[d+1],m+=I.b=a[d+2],v+=I.a=a[d+3],I=I.n,C>c&&(h+=w);if(d=o,k=D,r>0)for(l=0;E>l;l++)a[(u=d<<2)+3]=_=v*B>>>j,_>0?(a[u]=f*B>>>j,a[u+1]=g*B>>>j,a[u+2]=m*B>>>j):a[u]=a[u+1]=a[u+2]=0,u=o+((u=l+P)l;l++)a[(u=d<<2)+3]=_=v*B>>>j,_>0?(_=255/_,a[u]=(f*B>>>j)*_,a[u+1]=(g*B>>>j)*_,a[u+2]=(m*B>>>j)*_):a[u]=a[u+1]=a[u+2]=0,u=o+((u=l+P)n;n+=4)e[n+3]=i[n]||0;return!0},e._prepAlphaMap=function(){if(!this.alphaMap)return!1;if(this.alphaMap==this._alphaMap&&this._mapData)return!0;this._mapData=null;var t,e=this._alphaMap=this.alphaMap,i=e;e instanceof HTMLCanvasElement?t=i.getContext("2d"):((i=createjs.createCanvas?createjs.createCanvas():document.createElement("canvas")).width=e.width,i.height=e.height,(t=i.getContext("2d")).drawImage(e,0,0));try{var n=t.getImageData(0,0,e.width,e.height)}catch(r){return!1}return this._mapData=n.data,!0},createjs.AlphaMapFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.Filter_constructor(),this.mask=t,this.usesContext=!0,this.FRAG_SHADER_BODY="uniform sampler2D uAlphaSampler;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);vec4 alphaMap = texture2D(uAlphaSampler, vTextureCoord);gl_FragColor = vec4(color.rgb, color.a * alphaMap.a);}"}var e=createjs.extend(t,createjs.Filter);e.shaderParamSetup=function(t,e,i){this._mapTexture||(this._mapTexture=t.createTexture()),t.activeTexture(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._mapTexture),e.setTextureParams(t),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,this.mask),t.uniform1i(t.getUniformLocation(i,"uAlphaSampler"),1)},e.applyFilter=function(t,e,i,n,r,a,o,l){return!this.mask||(a=a||t,null==o&&(o=e),null==l&&(l=i),a.save(),t==a&&(a.globalCompositeOperation="destination-in",a.drawImage(this.mask,o,l),a.restore(),!0))},e.clone=function(){return new t(this.mask)},e.toString=function(){return"[AlphaMaskFilter]"},createjs.AlphaMaskFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n,r,a,o,l){this.Filter_constructor(),this.redMultiplier=null!=t?t:1,this.greenMultiplier=null!=e?e:1,this.blueMultiplier=null!=i?i:1,this.alphaMultiplier=null!=n?n:1,this.redOffset=r||0,this.greenOffset=a||0,this.blueOffset=o||0,this.alphaOffset=l||0,this.FRAG_SHADER_BODY="uniform vec4 uColorMultiplier;uniform vec4 uColorOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);gl_FragColor = (color * uColorMultiplier) + uColorOffset;}"}var e=createjs.extend(t,createjs.Filter);e.shaderParamSetup=function(t,e,i){t.uniform4f(t.getUniformLocation(i,"uColorMultiplier"),this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier),t.uniform4f(t.getUniformLocation(i,"uColorOffset"),this.redOffset/255,this.greenOffset/255,this.blueOffset/255,this.alphaOffset/255)},e.toString=function(){return"[ColorFilter]"},e.clone=function(){return new t(this.redMultiplier,this.greenMultiplier,this.blueMultiplier,this.alphaMultiplier,this.redOffset,this.greenOffset,this.blueOffset,this.alphaOffset)},e._applyFilter=function(t){for(var e=t.data,i=e.length,n=0;i>n;n+=4)e[n]=e[n]*this.redMultiplier+this.redOffset,e[n+1]=e[n+1]*this.greenMultiplier+this.greenOffset,e[n+2]=e[n+2]*this.blueMultiplier+this.blueOffset,e[n+3]=e[n+3]*this.alphaMultiplier+this.alphaOffset;return!0},createjs.ColorFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n){this.setColor(t,e,i,n)}var e=t.prototype;t.DELTA_INDEX=[0,.01,.02,.04,.05,.06,.07,.08,.1,.11,.12,.14,.15,.16,.17,.18,.2,.21,.22,.24,.25,.27,.28,.3,.32,.34,.36,.38,.4,.42,.44,.46,.48,.5,.53,.56,.59,.62,.65,.68,.71,.74,.77,.8,.83,.86,.89,.92,.95,.98,1,1.06,1.12,1.18,1.24,1.3,1.36,1.42,1.48,1.54,1.6,1.66,1.72,1.78,1.84,1.9,1.96,2,2.12,2.25,2.37,2.5,2.62,2.75,2.87,3,3.2,3.4,3.6,3.8,4,4.3,4.7,4.9,5,5.5,6,6.5,6.8,7,7.3,7.5,7.8,8,8.4,8.7,9,9.4,9.6,9.8,10],t.IDENTITY_MATRIX=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1],t.LENGTH=t.IDENTITY_MATRIX.length,e.setColor=function(t,e,i,n){return this.reset().adjustColor(t,e,i,n)},e.reset=function(){return this.copy(t.IDENTITY_MATRIX)},e.adjustColor=function(t,e,i,n){return this.adjustHue(n),this.adjustContrast(e),this.adjustBrightness(t),this.adjustSaturation(i)},e.adjustBrightness=function(t){return 0==t||isNaN(t)||(t=this._cleanValue(t,255),this._multiplyMatrix([1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0,0,0,0,0,1])),this},e.adjustContrast=function(e){var i;return 0==e||isNaN(e)||(i=0>(e=this._cleanValue(e,100))?127+e/100*127:127*(i=0==(i=e%1)?t.DELTA_INDEX[e]:t.DELTA_INDEX[e<<0]*(1-i)+t.DELTA_INDEX[(e<<0)+1]*i)+127,this._multiplyMatrix([i/127,0,0,0,.5*(127-i),0,i/127,0,0,.5*(127-i),0,0,i/127,0,.5*(127-i),0,0,0,1,0,0,0,0,0,1])),this},e.adjustSaturation=function(t){if(0==t||isNaN(t))return this;var e=1+((t=this._cleanValue(t,100))>0?3*t/100:t/100);return this._multiplyMatrix([.3086*(1-e)+e,.6094*(1-e),.082*(1-e),0,0,.3086*(1-e),.6094*(1-e)+e,.082*(1-e),0,0,.3086*(1-e),.6094*(1-e),.082*(1-e)+e,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.adjustHue=function(t){if(0==t||isNaN(t))return this;var e=Math.cos(t=this._cleanValue(t,180)/180*Math.PI),i=Math.sin(t);return this._multiplyMatrix([.213+.787*e+-(.213*i),.715+-(.715*e)+-(.715*i),.072+-(.072*e)+.928*i,0,0,.213+-(.213*e)+.143*i,.715+.28500000000000003*e+.14*i,.072+-(.072*e)+-.283*i,0,0,.213+-(.213*e)+-(.787*i),.715+-(.715*e)+.715*i,.072+.928*e+.072*i,0,0,0,0,0,1,0,0,0,0,0,1]),this},e.concat=function(e){return(e=this._fixMatrix(e)).length!=t.LENGTH||this._multiplyMatrix(e),this},e.clone=function(){return(new t).copy(this)},e.toArray=function(){for(var e=[],i=0,n=t.LENGTH;n>i;i++)e[i]=this[i];return e},e.copy=function(e){for(var i=t.LENGTH,n=0;i>n;n++)this[n]=e[n];return this},e.toString=function(){return"[ColorMatrix]"},e._multiplyMatrix=function(t){var e,i,n,r=[];for(e=0;5>e;e++){for(i=0;5>i;i++)r[i]=this[i+5*e];for(i=0;5>i;i++){var a=0;for(n=0;5>n;n++)a+=t[i+5*n]*r[n];this[i+5*e]=a}}},e._cleanValue=function(t,e){return Math.min(e,Math.max(-e,t))},e._fixMatrix=function(e){return e instanceof t&&(e=e.toArray()),e.lengtht.LENGTH&&(e=e.slice(0,t.LENGTH)),e},createjs.ColorMatrix=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.Filter_constructor(),this.matrix=t,this.FRAG_SHADER_BODY="uniform mat4 uColorMatrix;uniform vec4 uColorMatrixOffset;void main(void) {vec4 color = texture2D(uSampler, vRenderCoord);mat4 m = uColorMatrix;vec4 newColor = vec4(0,0,0,0);newColor.r = color.r*m[0][0] + color.g*m[0][1] + color.b*m[0][2] + color.a*m[0][3];newColor.g = color.r*m[1][0] + color.g*m[1][1] + color.b*m[1][2] + color.a*m[1][3];newColor.b = color.r*m[2][0] + color.g*m[2][1] + color.b*m[2][2] + color.a*m[2][3];newColor.a = color.r*m[3][0] + color.g*m[3][1] + color.b*m[3][2] + color.a*m[3][3];gl_FragColor = newColor + uColorMatrixOffset;}"}var e=createjs.extend(t,createjs.Filter);e.shaderParamSetup=function(t,e,i){var n=this.matrix,r=new Float32Array([n[0],n[1],n[2],n[3],n[5],n[6],n[7],n[8],n[10],n[11],n[12],n[13],n[15],n[16],n[17],n[18]]);t.uniformMatrix4fv(t.getUniformLocation(i,"uColorMatrix"),!1,r),t.uniform4f(t.getUniformLocation(i,"uColorMatrixOffset"),n[4]/255,n[9]/255,n[14]/255,n[19]/255)},e.toString=function(){return"[ColorMatrixFilter]"},e.clone=function(){return new t(this.matrix)},e._applyFilter=function(t){for(var e,i,n,r,a=t.data,o=a.length,l=this.matrix,c=l[0],u=l[1],h=l[2],d=l[3],p=l[4],f=l[5],g=l[6],m=l[7],v=l[8],x=l[9],y=l[10],$=l[11],_=l[12],b=l[13],T=l[14],w=l[15],E=l[16],S=l[17],C=l[18],A=l[19],P=0;o>P;P+=4)e=a[P],i=a[P+1],n=a[P+2],r=a[P+3],a[P]=e*c+i*u+n*h+r*d+p,a[P+1]=e*f+i*g+n*m+r*v+x,a[P+2]=e*y+i*$+n*_+r*b+T,a[P+3]=e*w+i*E+n*S+r*C+A;return!0},createjs.ColorMatrixFilter=createjs.promote(t,"Filter")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Touch cannot be instantiated"}t.isSupported=function(){return!!("ontouchstart"in window||window.navigator.msPointerEnabled&&window.navigator.msMaxTouchPoints>0||window.navigator.pointerEnabled&&window.navigator.maxTouchPoints>0)},t.enable=function(e,i,n){return!!(e&&e.canvas&&t.isSupported())&&(!!e.__touch||(e.__touch={pointers:{},multitouch:!i,preventDefault:!n,count:0},"ontouchstart"in window?t._IOS_enable(e):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&t._IE_enable(e),!0))},t.disable=function(e){e&&("ontouchstart"in window?t._IOS_disable(e):(window.navigator.msPointerEnabled||window.navigator.pointerEnabled)&&t._IE_disable(e),delete e.__touch)},t._IOS_enable=function(e){var i=e.canvas,n=e.__touch.f=function(i){t._IOS_handleEvent(e,i)};i.addEventListener("touchstart",n,!1),i.addEventListener("touchmove",n,!1),i.addEventListener("touchend",n,!1),i.addEventListener("touchcancel",n,!1)},t._IOS_disable=function(t){var e=t.canvas;if(e){var i=t.__touch.f;e.removeEventListener("touchstart",i,!1),e.removeEventListener("touchmove",i,!1),e.removeEventListener("touchend",i,!1),e.removeEventListener("touchcancel",i,!1)}},t._IOS_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();for(var i=e.changedTouches,n=e.type,r=0,a=i.length;a>r;r++){var o=i[r],l=o.identifier;o.target==t.canvas&&("touchstart"==n?this._handleStart(t,l,e,o.pageX,o.pageY):"touchmove"==n?this._handleMove(t,l,e,o.pageX,o.pageY):("touchend"==n||"touchcancel"==n)&&this._handleEnd(t,l,e))}}},t._IE_enable=function(e){var i=e.canvas,n=e.__touch.f=function(i){t._IE_handleEvent(e,i)};void 0===window.navigator.pointerEnabled?(i.addEventListener("MSPointerDown",n,!1),window.addEventListener("MSPointerMove",n,!1),window.addEventListener("MSPointerUp",n,!1),window.addEventListener("MSPointerCancel",n,!1),e.__touch.preventDefault&&(i.style.msTouchAction="none")):(i.addEventListener("pointerdown",n,!1),window.addEventListener("pointermove",n,!1),window.addEventListener("pointerup",n,!1),window.addEventListener("pointercancel",n,!1),e.__touch.preventDefault&&(i.style.touchAction="none")),e.__touch.activeIDs={}},t._IE_disable=function(t){var e=t.__touch.f;void 0===window.navigator.pointerEnabled?(window.removeEventListener("MSPointerMove",e,!1),window.removeEventListener("MSPointerUp",e,!1),window.removeEventListener("MSPointerCancel",e,!1),t.canvas&&t.canvas.removeEventListener("MSPointerDown",e,!1)):(window.removeEventListener("pointermove",e,!1),window.removeEventListener("pointerup",e,!1),window.removeEventListener("pointercancel",e,!1),t.canvas&&t.canvas.removeEventListener("pointerdown",e,!1))},t._IE_handleEvent=function(t,e){if(t){t.__touch.preventDefault&&e.preventDefault&&e.preventDefault();var i=e.type,n=e.pointerId,r=t.__touch.activeIDs;if("MSPointerDown"==i||"pointerdown"==i){if(e.srcElement!=t.canvas)return;r[n]=!0,this._handleStart(t,n,e,e.pageX,e.pageY)}else r[n]&&("MSPointerMove"==i||"pointermove"==i?this._handleMove(t,n,e,e.pageX,e.pageY):("MSPointerUp"==i||"MSPointerCancel"==i||"pointerup"==i||"pointercancel"==i)&&(delete r[n],this._handleEnd(t,n,e)))}},t._handleStart=function(t,e,i,n,r){var a=t.__touch;if(a.multitouch||!a.count){var o=a.pointers;o[e]||(o[e]=!0,a.count++,t._handlePointerDown(e,i,n,r))}},t._handleMove=function(t,e,i,n,r){t.__touch.pointers[e]&&t._handlePointerMove(e,i,n,r)},t._handleEnd=function(t,e,i){var n=t.__touch,r=n.pointers;r[e]&&(n.count--,t._handlePointerUp(e,i,!0),delete r[e])},createjs.Touch=t}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.EaselJS=createjs.EaselJS||{};t.version="1.0.0",t.buildDate="Thu, 12 Oct 2017 16:34:10 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.PreloadJS=createjs.PreloadJS||{};t.version="1.0.0",t.buildDate="Thu, 12 Oct 2017 16:34:05 GMT"}(),this.createjs=this.createjs||{},createjs.proxy=function(t,e){var i=Array.prototype.slice.call(arguments,2);return function(){return t.apply(e,Array.prototype.slice.call(arguments,0).concat(i))}},this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.Event_constructor("error"),this.title=t,this.message=e,this.data=i}createjs.extend(t,createjs.Event).clone=function(){return new createjs.ErrorEvent(this.title,this.message,this.data)},createjs.ErrorEvent=createjs.promote(t,"Event")}(),this.createjs=this.createjs||{},function(t){"use strict";function e(t,e){this.Event_constructor("progress"),this.loaded=t,this.total=null==e?1:e,this.progress=0==e?0:this.loaded/this.total}createjs.extend(e,createjs.Event).clone=function(){return new createjs.ProgressEvent(this.loaded,this.total)},createjs.ProgressEvent=createjs.promote(e,"Event")}(window),(function(){function t(e,n){function a(t){if(a[t]!==v)return a[t];if("bug-string-char-index"==t)e=!1;else if("json"==t)e=a("json-stringify")&&a("json-parse");else{var e,i,r='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==t){var c=n.stringify,h="function"==typeof c&&$;if(h){(i=function(){return 1}).toJSON=i;try{h="0"===c(0)&&"0"===c(new o)&&'""'==c(new l)&&c(y)===v&&c(v)===v&&c()===v&&"1"===c(i)&&"[1]"==c([i])&&"[null]"==c([v])&&"null"==c(null)&&"[null,null,null]"==c([v,y,null])&&c({a:[i,!0,!1,null,"\0\b\n\f\r "]})==r&&"1"===c(null,i)&&"[\n 1,\n 2\n]"==c([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==c(new u(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==c(new u(864e13))&&'"-000001-01-01T00:00:00.000Z"'==c(new u(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==c(new u(-1))}catch(d){h=!1}}e=h}if("json-parse"==t){var p=n.parse;if("function"==typeof p)try{if(0===p("0")&&!p(!1)){i=p(r);var f=5==i.a.length&&1===i.a[0];if(f){try{f=!p('" "')}catch(g){}if(f)try{f=1!==p("01")}catch(m){}if(f)try{f=1!==p("1.")}catch(x){}}}}catch(_){f=!1}e=f}}return a[t]=!!e}e||(e=r.Object()),n||(n=r.Object());var o=e.Number||r.Number,l=e.String||r.String,c=e.Object||r.Object,u=e.Date||r.Date,h=e.SyntaxError||r.SyntaxError,d=e.TypeError||r.TypeError,p=e.Math||r.Math,f=e.JSON||r.JSON;"object"==typeof f&&f&&(n.stringify=f.stringify,n.parse=f.parse);var g,m,v,x=c.prototype,y=x.toString,$=new u(-3509827334573292);try{$=-109252==$.getUTCFullYear()&&0===$.getUTCMonth()&&1===$.getUTCDate()&&10==$.getUTCHours()&&37==$.getUTCMinutes()&&6==$.getUTCSeconds()&&708==$.getUTCMilliseconds()}catch(_){}if(!a("json")){var b="[object Function]",T="[object Number]",w="[object String]",E="[object Array]",S=a("bug-string-char-index");if(!$)var C=p.floor,A=[0,31,59,90,120,151,181,212,243,273,304,334],P=function(t,e){return A[e]+365*(t-1970)+C((t-1969+(e=+(e>1)))/4)-C((t-1901+e)/100)+C((t-1601+e)/400)};if((g=x.hasOwnProperty)||(g=function(t){var e,i={};return(i.__proto__=null,i.__proto__={toString:1},i).toString!=y?g=function(t){var e=this.__proto__,i=t in(this.__proto__=null,this);return this.__proto__=e,i}:(e=i.constructor,g=function(t){var i=(this.constructor||e).prototype;return t in this&&!(t in i&&this[t]===i[t])}),i=null,g.call(this,t)}),m=function(t,e){var n,r,a,o=0;for(a in(n=function(){this.valueOf=0}).prototype.valueOf=0,r=new n)g.call(r,a)&&o++;return n=r=null,o?m=2==o?function(t,e){var i,n={},r=y.call(t)==b;for(i in t)r&&"prototype"==i||g.call(n,i)||(n[i]=1,0)||!g.call(t,i)||e(i)}:function(t,e){var i,n,r=y.call(t)==b;for(i in t)r&&"prototype"==i||!g.call(t,i)||(n="constructor"===i)||e(i);(n||g.call(t,i="constructor"))&&e(i)}:(r=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],m=function(t,e){var n,a,o=y.call(t)==b,l=!o&&"function"!=typeof t.constructor&&i[typeof t.hasOwnProperty]&&t.hasOwnProperty||g;for(n in t)o&&"prototype"==n||!l.call(t,n)||e(n);for(a=r.length;n=r[--a];l.call(t,n)&&e(n));}),m(t,e)},!a("json-stringify")){var L={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},R=function(t,e){return("000000"+(e||0)).slice(-t)},D=function(t){for(var e='"',i=0,n=t.length,r=!S||n>10,a=r&&(S?t.split(""):t);n>i;i++){var o=t.charCodeAt(i);switch(o){case 8:case 9:case 10:case 12:case 13:case 34:case 92:e+=L[o];break;default:if(32>o){e+="\\u00"+R(2,o.toString(16));break}e+=r?a[i]:t.charAt(i)}}return e+'"'},I=function(t,e,i,n,r,a,o){var l,c,u,h,p,f,x,$,_,b,S,A,L,k,O,M;try{l=e[t]}catch(N){}if("object"==typeof l&&l){if("[object Date]"!=(c=y.call(l))||g.call(l,"toJSON"))"function"==typeof l.toJSON&&(c!=T&&c!=w&&c!=E||g.call(l,"toJSON"))&&(l=l.toJSON(t));else if(l>-1/0&&1/0>l){if(P){for(p=C(l/864e5),u=C(p/365.2425)+1970-1;P(u+1,0)<=p;u++);for(h=C((p-P(u,0))/30.42);P(u,h+1)<=p;h++);p=1+p-P(u,h),x=C((f=(l%864e5+864e5)%864e5)/36e5)%24,$=C(f/6e4)%60,_=C(f/1e3)%60,b=f%1e3}else u=l.getUTCFullYear(),h=l.getUTCMonth(),p=l.getUTCDate(),x=l.getUTCHours(),$=l.getUTCMinutes(),_=l.getUTCSeconds(),b=l.getUTCMilliseconds();l=(0>=u||u>=1e4?(0>u?"-":"+")+R(6,0>u?-u:u):R(4,u))+"-"+R(2,h+1)+"-"+R(2,p)+"T"+R(2,x)+":"+R(2,$)+":"+R(2,_)+"."+R(3,b)+"Z"}else l=null}if(i&&(l=i.call(e,t,l)),null===l)return"null";if("[object Boolean]"==(c=y.call(l)))return""+l;if(c==T)return l>-1/0&&1/0>l?""+l:"null";if(c==w)return D(""+l);if("object"==typeof l){for(k=o.length;k--;)if(o[k]===l)throw d();if(o.push(l),S=[],O=a,a+=r,c==E){for(L=0,k=l.length;k>L;L++)A=I(L,l,i,n,r,a,o),S.push(A===v?"null":A);M=S.length?r?"[\n"+a+S.join(",\n"+a)+"\n"+O+"]":"["+S.join(",")+"]":"[]"}else m(n||l,function(t){var e=I(t,l,i,n,r,a,o);e!==v&&S.push(D(t)+":"+(r?" ":"")+e)}),M=S.length?r?"{\n"+a+S.join(",\n"+a)+"\n"+O+"}":"{"+S.join(",")+"}":"{}";return o.pop(),M}};n.stringify=function(t,e,n){var r,a,o,l;if(i[typeof e]&&e){if((l=y.call(e))==b)a=e;else if(l==E){o={};for(var c,u=0,h=e.length;h>u;c=e[u++],((l=y.call(c))==w||l==T)&&(o[c]=1));}}if(n){if((l=y.call(n))==T){if((n-=n%1)>0)for(r="",n>10&&(n=10);r.lengthk;)switch(r=a.charCodeAt(k)){case 9:case 10:case 13:case 32:k++;break;case 123:case 125:case 91:case 93:case 58:case 44:return t=S?a.charAt(k):a[k],k++,t;case 34:for(t="@",k++;o>k;)if(32>(r=a.charCodeAt(k)))F();else if(92==r)switch(r=a.charCodeAt(++k)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:t+=N[r],k++;break;case 117:for(e=++k,i=k+4;i>k;k++)(r=a.charCodeAt(k))>=48&&57>=r||r>=97&&102>=r||r>=65&&70>=r||F();t+=M("0x"+a.slice(e,k));break;default:F()}else{if(34==r)break;for(r=a.charCodeAt(k),e=k;r>=32&&92!=r&&34!=r;)r=a.charCodeAt(++k);t+=a.slice(e,k)}if(34==a.charCodeAt(k))return k++,t;F();default:if(e=k,45==r&&(n=!0,r=a.charCodeAt(++k)),r>=48&&57>=r){for(48==r&&(r=a.charCodeAt(k+1))>=48&&57>=r&&F(),n=!1;o>k&&(r=a.charCodeAt(k))>=48&&57>=r;k++);if(46==a.charCodeAt(k)){for(i=++k;o>i&&(r=a.charCodeAt(i))>=48&&57>=r;i++);i==k&&F(),k=i}if(101==(r=a.charCodeAt(k))||69==r){for((43==(r=a.charCodeAt(++k))||45==r)&&k++,i=k;o>i&&(r=a.charCodeAt(i))>=48&&57>=r;i++);i==k&&F(),k=i}return+a.slice(e,k)}if(n&&F(),"true"==a.slice(k,k+4))return k+=4,!0;if("false"==a.slice(k,k+5))return k+=5,!1;if("null"==a.slice(k,k+4))return k+=4,null;F()}return"$"},j=function(t){var e,i;if("$"==t&&F(),"string"==typeof t){if("@"==(S?t.charAt(0):t[0]))return t.slice(1);if("["==t){for(e=[];"]"!=(t=B());i||(i=!0))i&&(","==t?"]"==(t=B())&&F():F()),","==t&&F(),e.push(j(t));return e}if("{"==t){for(e={};"}"!=(t=B());i||(i=!0))i&&(","==t?"}"==(t=B())&&F():F()),(","==t||"string"!=typeof t||"@"!=(S?t.charAt(0):t[0])||":"!=B())&&F(),e[t.slice(1)]=j(B());return e}F()}return t},U=function(t,e,i){var n=H(t,e,i);n===v?delete t[e]:t[e]=n},H=function(t,e,i){var n,r=t[e];if("object"==typeof r&&r){if(y.call(r)==E)for(n=r.length;n--;)U(r,n,i);else m(r,function(t){U(r,t,i)})}return i.call(t,e,r)};n.parse=function(t,e){var i,n;return k=0,O=""+t,i=j(B()),"$"!=B()&&F(),k=O=null,e&&y.call(e)==b?H(((n={})[""]=i,n),"",e):i}}}return n.runInContext=t,n}var e="function"==typeof define&&define.amd,i={function:!0,object:!0},n=i[typeof exports]&&exports&&!exports.nodeType&&exports,r=i[typeof window]&&window||this,a=n&&i[typeof module]&&module&&!module.nodeType&&"object"==typeof global&&global;if(a&&(a.global===a||a.window===a||a.self===a)&&(r=a),n&&!e)t(r,n);else{var o=r.JSON,l=r.JSON3,c=!1,u=t(r,r.JSON3={noConflict:function(){return c||(c=!0,r.JSON=o,r.JSON3=l,o=l=null),u}});r.JSON={parse:u.parse,stringify:u.stringify}}e&&define(function(){return u})}).call(this),function(){var t={};t.a=function(){return t.el("a")},t.svg=function(){return t.el("svg")},t.object=function(){return t.el("object")},t.image=function(){return t.el("image")},t.img=function(){return t.el("img")},t.style=function(){return t.el("style")},t.link=function(){return t.el("link")},t.script=function(){return t.el("script")},t.audio=function(){return t.el("audio")},t.video=function(){return t.el("video")},t.text=function(t){return document.createTextNode(t)},t.el=function(t){return document.createElement(t)},createjs.Elements=t}(),function(){var t={};t.ABSOLUTE_PATT=/^(?:\w+:)?\/{2}/i,t.RELATIVE_PATT=/^[.\/]*?\//i,t.EXTENSION_PATT=/\/?[^\/]+\.(\w{1,5})$/i,t.parseURI=function(e){var i,n={absolute:!1,relative:!1,protocol:null,hostname:null,port:null,pathname:null,search:null,hash:null,host:null};if(null==e)return n;var r=createjs.Elements.a();for(var a in r.href=e,n)a in r&&(n[a]=r[a]);var o=e.indexOf("?");return o>-1&&(e=e.substr(0,o)),t.ABSOLUTE_PATT.test(e)?n.absolute=!0:t.RELATIVE_PATT.test(e)&&(n.relative=!0),(i=e.match(t.EXTENSION_PATT))&&(n.extension=i[1].toLowerCase()),n},t.formatQueryString=function(t,e){if(null==t)throw Error("You must specify data.");var i=[];for(var n in t)i.push(n+"="+escape(t[n]));return e&&(i=i.concat(e)),i.join("&")},t.buildURI=function(t,e){if(null==e)return t;var i=[],n=t.indexOf("?");if(-1!=n){var r=t.slice(n+1);i=i.concat(r.split("&"))}return -1!=n?t.slice(0,n)+"?"+this.formatQueryString(e,i):t+"?"+this.formatQueryString(e,i)},t.isCrossDomain=function(t){var e=createjs.Elements.a();e.href=t.src;var i=createjs.Elements.a();return i.href=location.href,""!=e.hostname&&(e.port!=i.port||e.protocol!=i.protocol||e.hostname!=i.hostname)},t.isLocal=function(t){var e=createjs.Elements.a();return e.href=t.src,""==e.hostname&&"file:"==e.protocol},createjs.URLUtils=t}(),function(){var t={container:null};t.appendToHead=function(e){t.getHead().appendChild(e)},t.appendToBody=function(e){if(null==t.container){t.container=document.createElement("div"),t.container.id="preloadjs-container";var i=t.container.style;i.visibility="hidden",i.position="absolute",i.width=t.container.style.height="10px",i.overflow="hidden",i.transform=i.msTransform=i.webkitTransform=i.oTransform="translate(-10px, -10px)",t.getBody().appendChild(t.container)}t.container.appendChild(e)},t.getHead=function(){return document.head||document.getElementsByTagName("head")[0]},t.getBody=function(){return document.body||document.getElementsByTagName("body")[0]},t.removeChild=function(t){t.parent&&t.parent.removeChild(t)},t.isImageTag=function(t){return t instanceof HTMLImageElement},t.isAudioTag=function(t){return!!window.HTMLAudioElement&&t instanceof HTMLAudioElement},t.isVideoTag=function(t){return!!window.HTMLVideoElement&&t instanceof HTMLVideoElement},createjs.DomUtils=t}(),function(){var t={};t.parseXML=function(t){var e=null;try{window.DOMParser&&(e=(new DOMParser).parseFromString(t,"text/xml"))}catch(i){}if(!e)try{(e=new ActiveXObject("Microsoft.XMLDOM")).async=!1,e.loadXML(t)}catch(n){e=null}return e},t.parseJSON=function(t){if(null==t)return null;try{return JSON.parse(t)}catch(e){throw e}},createjs.DataUtils=t}(),this.createjs=this.createjs||{},function(){var t={};t.BINARY="binary",t.CSS="css",t.FONT="font",t.FONTCSS="fontcss",t.IMAGE="image",t.JAVASCRIPT="javascript",t.JSON="json",t.JSONP="jsonp",t.MANIFEST="manifest",t.SOUND="sound",t.VIDEO="video",t.SPRITESHEET="spritesheet",t.SVG="svg",t.TEXT="text",t.XML="xml",createjs.Types=t}(),this.createjs=this.createjs||{},function(){var t={};t.POST="POST",t.GET="GET",createjs.Methods=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.src=null,this.type=null,this.id=null,this.maintainOrder=!1,this.callback=null,this.data=null,this.method=createjs.Methods.GET,this.values=null,this.headers=null,this.withCredentials=!1,this.mimeType=null,this.crossOrigin=null,this.loadTimeout=i.LOAD_TIMEOUT_DEFAULT}var e=t.prototype={},i=t;i.LOAD_TIMEOUT_DEFAULT=8e3,i.create=function(e){if("string"==typeof e){var n=new t;return n.src=e,n}if(e instanceof i)return e;if(e instanceof Object&&e.src)return null==e.loadTimeout&&(e.loadTimeout=i.LOAD_TIMEOUT_DEFAULT),e;throw Error("Type not recognized.")},e.set=function(t){for(var e in t)this[e]=t[e];return this},createjs.LoadItem=i}(),function(){var t={};t.isBinary=function(t){switch(t){case createjs.Types.IMAGE:case createjs.Types.BINARY:return!0;default:return!1}},t.isText=function(t){switch(t){case createjs.Types.TEXT:case createjs.Types.JSON:case createjs.Types.MANIFEST:case createjs.Types.XML:case createjs.Types.CSS:case createjs.Types.SVG:case createjs.Types.JAVASCRIPT:case createjs.Types.SPRITESHEET:return!0;default:return!1}},t.getTypeByExtension=function(t){if(null==t)return createjs.Types.TEXT;switch(t.toLowerCase()){case"jpeg":case"jpg":case"gif":case"png":case"webp":case"bmp":return createjs.Types.IMAGE;case"ogg":case"mp3":case"webm":return createjs.Types.SOUND;case"mp4":case"webm":case"ts":return createjs.Types.VIDEO;case"json":return createjs.Types.JSON;case"xml":return createjs.Types.XML;case"css":return createjs.Types.CSS;case"js":return createjs.Types.JAVASCRIPT;case"svg":return createjs.Types.SVG;default:return createjs.Types.TEXT}},createjs.RequestUtils=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.EventDispatcher_constructor(),this.loaded=!1,this.canceled=!1,this.progress=0,this.type=i,this.resultFormatter=null,t?this._item=createjs.LoadItem.create(t):this._item=null,this._preferXHR=e,this._result=null,this._rawResult=null,this._loadedItems=null,this._tagSrcAttribute=null,this._tag=null}var e=createjs.extend(t,createjs.EventDispatcher);try{Object.defineProperties(t,{POST:{get:createjs.deprecate(function(){return createjs.Methods.POST},"AbstractLoader.POST")},GET:{get:createjs.deprecate(function(){return createjs.Methods.GET},"AbstractLoader.GET")},BINARY:{get:createjs.deprecate(function(){return createjs.Types.BINARY},"AbstractLoader.BINARY")},CSS:{get:createjs.deprecate(function(){return createjs.Types.CSS},"AbstractLoader.CSS")},FONT:{get:createjs.deprecate(function(){return createjs.Types.FONT},"AbstractLoader.FONT")},FONTCSS:{get:createjs.deprecate(function(){return createjs.Types.FONTCSS},"AbstractLoader.FONTCSS")},IMAGE:{get:createjs.deprecate(function(){return createjs.Types.IMAGE},"AbstractLoader.IMAGE")},JAVASCRIPT:{get:createjs.deprecate(function(){return createjs.Types.JAVASCRIPT},"AbstractLoader.JAVASCRIPT")},JSON:{get:createjs.deprecate(function(){return createjs.Types.JSON},"AbstractLoader.JSON")},JSONP:{get:createjs.deprecate(function(){return createjs.Types.JSONP},"AbstractLoader.JSONP")},MANIFEST:{get:createjs.deprecate(function(){return createjs.Types.MANIFEST},"AbstractLoader.MANIFEST")},SOUND:{get:createjs.deprecate(function(){return createjs.Types.SOUND},"AbstractLoader.SOUND")},VIDEO:{get:createjs.deprecate(function(){return createjs.Types.VIDEO},"AbstractLoader.VIDEO")},SPRITESHEET:{get:createjs.deprecate(function(){return createjs.Types.SPRITESHEET},"AbstractLoader.SPRITESHEET")},SVG:{get:createjs.deprecate(function(){return createjs.Types.SVG},"AbstractLoader.SVG")},TEXT:{get:createjs.deprecate(function(){return createjs.Types.TEXT},"AbstractLoader.TEXT")},XML:{get:createjs.deprecate(function(){return createjs.Types.XML},"AbstractLoader.XML")}})}catch(i){}e.getItem=function(){return this._item},e.getResult=function(t){return t?this._rawResult:this._result},e.getTag=function(){return this._tag},e.setTag=function(t){this._tag=t},e.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 t=new createjs.Event("initialize");t.loader=this._request,this.dispatchEvent(t),this._request.load()},e.cancel=function(){this.canceled=!0,this.destroy()},e.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()},e.getLoadedItems=function(){return this._loadedItems},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.TagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._createTag=function(t){return null},e._sendLoadStart=function(){this._isCanceled()||this.dispatchEvent("loadstart")},e._sendProgress=function(t){if(!this._isCanceled()){var e=null;"number"==typeof t?(this.progress=t,e=new createjs.ProgressEvent(this.progress)):(e=t,this.progress=t.loaded/t.total,e.progress=this.progress,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0)),this.hasEventListener("progress")&&this.dispatchEvent(e)}},e._sendComplete=function(){if(!this._isCanceled()){this.loaded=!0;var t=new createjs.Event("complete");t.rawResult=this._rawResult,null!=this._result&&(t.result=this._result),this.dispatchEvent(t)}},e._sendError=function(t){!this._isCanceled()&&this.hasEventListener("error")&&(null==t&&(t=new createjs.ErrorEvent("PRELOAD_ERROR_EMPTY")),this.dispatchEvent(t))},e._isCanceled=function(){return null==window.createjs||!!this.canceled},e.resultFormatter=null,e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response;var e=this.resultFormatter&&this.resultFormatter(this);e instanceof Function?e.call(this,createjs.proxy(this._resultFormatSuccess,this),createjs.proxy(this._resultFormatFailed,this)):(this._result=e||this._rawResult,this._sendComplete());break;case"progress":this._sendProgress(t);break;case"error":this._sendError(t);break;case"loadstart":this._sendLoadStart();break;case"abort":case"timeout":this._isCanceled()||this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_"+t.type.toUpperCase()+"_ERROR"))}},e._resultFormatSuccess=function(t){this._result=t,this._sendComplete()},e._resultFormatFailed=function(t){this._sendError(t)},e.toString=function(){return"[PreloadJS AbstractLoader]"},createjs.AbstractLoader=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractLoader_constructor(t,e,i),this.resultFormatter=this._formatResult,this._tagSrcAttribute="src",this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);e.load=function(){this._tag||(this._tag=this._createTag(this._item.src)),this._tag.preload="auto",this._tag.load(),this.AbstractLoader_load()},e._createTag=function(){},e._createRequest=function(){this._preferXHR?this._request=new createjs.XHRRequest(this._item):this._request=new createjs.MediaTagRequest(this._item,this._tag||this._createTag(),this._tagSrcAttribute)},e._updateXHR=function(t){t.loader.setResponseType&&t.loader.setResponseType("blob")},e._formatResult=function(t){if(this._tag.removeEventListener&&this._tag.removeEventListener("canplaythrough",this._loadedHandler),this._tag.onstalled=null,this._preferXHR){var e=window.URL||window.webkitURL,i=t.getResult(!0);t.getTag().src=e.createObjectURL(i)}return t.getTag()},createjs.AbstractMediaLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t){this._item=t},e=createjs.extend(t,createjs.EventDispatcher);e.load=function(){},e.destroy=function(){},e.cancel=function(){},createjs.AbstractRequest=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this),this._addedToDOM=!1}var e=createjs.extend(t,createjs.AbstractRequest);e.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 t=new createjs.Event("initialize");t.loader=this._tag,this.dispatchEvent(t),this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this._tag[this._tagSrcAttribute]=this._item.src,null==this._tag.parentNode&&(createjs.DomUtils.appendToBody(this._tag),this._addedToDOM=!0)},e.destroy=function(){this._clean(),this._tag=null,this.AbstractRequest_destroy()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;("loaded"==t.readyState||"complete"==t.readyState)&&this._handleTagComplete()},e._handleError=function(){this._clean(),this.dispatchEvent("error")},e._handleTagComplete=function(){this._rawResult=this._tag,this._result=this.resultFormatter&&this.resultFormatter(this)||this._rawResult,this._clean(),this.dispatchEvent("complete")},e._handleTimeout=function(){this._clean(),this.dispatchEvent(new createjs.Event("timeout"))},e._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)},e._handleStalled=function(){},createjs.TagRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractRequest_constructor(t),this._tag=e,this._tagSrcAttribute=i,this._loadedHandler=createjs.proxy(this._handleTagComplete,this)}var e=createjs.extend(t,createjs.TagRequest);e.load=function(){var t=createjs.proxy(this._handleStalled,this);this._stalledCallback=t;var e=createjs.proxy(this._handleProgress,this);this._handleProgress=e,this._tag.addEventListener("stalled",t),this._tag.addEventListener("progress",e),this._tag.addEventListener&&this._tag.addEventListener("canplaythrough",this._loadedHandler,!1),this.TagRequest_load()},e._handleReadyStateChange=function(){clearTimeout(this._loadTimeout);var t=this._tag;("loaded"==t.readyState||"complete"==t.readyState)&&this._handleTagComplete()},e._handleStalled=function(){},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._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(t,"TagRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractRequest_constructor(t),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(t)}var e=createjs.extend(t,createjs.AbstractRequest);t.ACTIVEX_VERSIONS=["Msxml2.XMLHTTP.6.0","Msxml2.XMLHTTP.5.0","Msxml2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],e.getResult=function(t){return t&&this._rawResponse?this._rawResponse:this._response},e.cancel=function(){this.canceled=!0,this._clean(),this._request.abort()},e.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._request.send(createjs.URLUtils.formatQueryString(this._item.values)):this._request.send()}catch(t){this.dispatchEvent(new createjs.ErrorEvent("XHR_SEND",null,t))}},e.setResponseType=function(t){"blob"===t&&(t=window.URL?"blob":"arraybuffer",this._responseType=t),this._request.responseType=t},e.getAllResponseHeaders=function(){return this._request.getAllResponseHeaders instanceof Function?this._request.getAllResponseHeaders():null},e.getResponseHeader=function(t){return this._request.getResponseHeader instanceof Function?this._request.getResponseHeader(t):null},e._handleProgress=function(t){if(t&&!(t.loaded>0&&0==t.total)){var e=new createjs.ProgressEvent(t.loaded,t.total);this.dispatchEvent(e)}},e._handleLoadStart=function(t){clearTimeout(this._loadTimeout),this.dispatchEvent("loadstart")},e._handleAbort=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("XHR_ABORTED",null,t))},e._handleError=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent(t.message))},e._handleReadyStateChange=function(t){4==this._request.readyState&&this._handleLoad()},e._handleLoad=function(t){if(!this.loaded){this.loaded=!0;var e=this._checkError();if(e)return void this._handleError(e);if(this._response=this._getResponse(),"arraybuffer"===this._responseType)try{this._response=new Blob([this._response])}catch(i){if(window.BlobBuilder=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder||window.MSBlobBuilder,"TypeError"===i.name&&window.BlobBuilder){var n=new BlobBuilder;n.append(this._response),this._response=n.getBlob()}}this._clean(),this.dispatchEvent(new createjs.Event("complete"))}},e._handleTimeout=function(t){this._clean(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT",null,t))},e._checkError=function(){var t=parseInt(this._request.status);return t>=400&&599>=t?Error(t):0==t&&/^https?:/.test(location.protocol)?Error(0):null},e._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(t){}try{if(null!=this._request.responseXML)return this._request.responseXML}catch(e){}return null},e._createXHR=function(t){var e=createjs.URLUtils.isCrossDomain(t),i={},n=null;if(window.XMLHttpRequest)n=new XMLHttpRequest,e&&void 0===n.withCredentials&&window.XDomainRequest&&(n=new XDomainRequest);else{for(var r=0,a=s.ACTIVEX_VERSIONS.length;a>r;r++){var o=s.ACTIVEX_VERSIONS[r];try{n=new ActiveXObject(o);break}catch(l){}}if(null==n)return!1}null==t.mimeType&&createjs.RequestUtils.isText(t.type)&&(t.mimeType="text/plain; charset=utf-8"),t.mimeType&&n.overrideMimeType&&n.overrideMimeType(t.mimeType),this._xhrLevel="string"==typeof n.responseType?2:1;var c=null;if(c=t.method==createjs.Methods.GET?createjs.URLUtils.buildURI(t.src,t.values):t.src,n.open(t.method||createjs.Methods.GET,c,!0),e&&n instanceof XMLHttpRequest&&1==this._xhrLevel&&(i.Origin=location.origin),t.values&&t.method==createjs.Methods.POST&&(i["Content-Type"]="application/x-www-form-urlencoded"),e||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),t.headers)for(var u in t.headers)i[u]=t.headers[u];for(u in i)n.setRequestHeader(u,i[u]);return n instanceof XMLHttpRequest&&void 0!==t.withCredentials&&(n.withCredentials=t.withCredentials),this._request=n,!0},e._clean=function(){clearTimeout(this._loadTimeout),null!=this._request.removeEventListener?(this._request.removeEventListener("loadstart",this._handleLoadStartProxy),this._request.removeEventListener("progress",this._handleProgressProxy),this._request.removeEventListener("abort",this._handleAbortProxy),this._request.removeEventListener("error",this._handleErrorProxy),this._request.removeEventListener("timeout",this._handleTimeoutProxy),this._request.removeEventListener("load",this._handleLoadProxy),this._request.removeEventListener("readystatechange",this._handleReadyStateChangeProxy)):(this._request.onloadstart=null,this._request.onprogress=null,this._request.onabort=null,this._request.onerror=null,this._request.ontimeout=null,this._request.onload=null,this._request.onreadystatechange=null)},e.toString=function(){return"[PreloadJS XHRRequest]"},createjs.XHRRequest=createjs.promote(t,"AbstractRequest")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i){this.AbstractLoader_constructor(),this._plugins=[],this._typeCallbacks={},this._extensionCallbacks={},this.next=null,this.maintainScriptOrder=!0,this.stopOnError=!1,this._maxConnections=1,this._availableLoaders=[createjs.FontLoader,createjs.ImageLoader,createjs.JavaScriptLoader,createjs.CSSLoader,createjs.JSONLoader,createjs.JSONPLoader,createjs.SoundLoader,createjs.ManifestLoader,createjs.SpriteSheetLoader,createjs.XMLLoader,createjs.SVGLoader,createjs.BinaryLoader,createjs.VideoLoader,createjs.TextLoader],this._defaultLoaderLength=this._availableLoaders.length,this.init(t,e,i)}var e=createjs.extend(t,createjs.AbstractLoader),i=t;try{Object.defineProperties(i,{POST:{get:createjs.deprecate(function(){return createjs.Methods.POST},"AbstractLoader.POST")},GET:{get:createjs.deprecate(function(){return createjs.Methods.GET},"AbstractLoader.GET")},BINARY:{get:createjs.deprecate(function(){return createjs.Types.BINARY},"AbstractLoader.BINARY")},CSS:{get:createjs.deprecate(function(){return createjs.Types.CSS},"AbstractLoader.CSS")},FONT:{get:createjs.deprecate(function(){return createjs.Types.FONT},"AbstractLoader.FONT")},FONTCSS:{get:createjs.deprecate(function(){return createjs.Types.FONTCSS},"AbstractLoader.FONTCSS")},IMAGE:{get:createjs.deprecate(function(){return createjs.Types.IMAGE},"AbstractLoader.IMAGE")},JAVASCRIPT:{get:createjs.deprecate(function(){return createjs.Types.JAVASCRIPT},"AbstractLoader.JAVASCRIPT")},JSON:{get:createjs.deprecate(function(){return createjs.Types.JSON},"AbstractLoader.JSON")},JSONP:{get:createjs.deprecate(function(){return createjs.Types.JSONP},"AbstractLoader.JSONP")},MANIFEST:{get:createjs.deprecate(function(){return createjs.Types.MANIFEST},"AbstractLoader.MANIFEST")},SOUND:{get:createjs.deprecate(function(){return createjs.Types.SOUND},"AbstractLoader.SOUND")},VIDEO:{get:createjs.deprecate(function(){return createjs.Types.VIDEO},"AbstractLoader.VIDEO")},SPRITESHEET:{get:createjs.deprecate(function(){return createjs.Types.SPRITESHEET},"AbstractLoader.SPRITESHEET")},SVG:{get:createjs.deprecate(function(){return createjs.Types.SVG},"AbstractLoader.SVG")},TEXT:{get:createjs.deprecate(function(){return createjs.Types.TEXT},"AbstractLoader.TEXT")},XML:{get:createjs.deprecate(function(){return createjs.Types.XML},"AbstractLoader.XML")}})}catch(n){}e.init=function(t,e,i){this.preferXHR=!0,this._preferXHR=!0,this.setPreferXHR(t),this._paused=!1,this._basePath=e,this._crossOrigin=i,this._loadStartWasDispatched=!1,this._currentlyLoadingScript=null,this._currentLoads=[],this._loadQueue=[],this._loadQueueBackup=[],this._loadItemsById={},this._loadItemsBySrc={},this._loadedResults={},this._loadedRawResults={},this._numItems=0,this._numItemsLoaded=0,this._scriptOrder=[],this._loadedScripts=[],this._lastProgress=NaN},e.registerLoader=function(t){if(!t||!t.canLoadItem)throw Error("loader is of an incorrect type.");if(-1!=this._availableLoaders.indexOf(t))throw Error("loader already exists.");this._availableLoaders.unshift(t)},e.unregisterLoader=function(t){var e=this._availableLoaders.indexOf(t);-1!=e&&e0)return;var i=!1;if(e){for(;e.length;){var n=e.pop(),r=this.getResult(n);for(a=this._loadQueue.length-1;a>=0;a--)if((o=this._loadQueue[a].getItem()).id==n||o.src==n){this._loadQueue.splice(a,1)[0].cancel();break}for(a=this._loadQueueBackup.length-1;a>=0;a--)if((o=this._loadQueueBackup[a].getItem()).id==n||o.src==n){this._loadQueueBackup.splice(a,1)[0].cancel();break}if(r)this._disposeItem(this.getItem(n));else for(var a=this._currentLoads.length-1;a>=0;a--){var o=this._currentLoads[a].getItem();if(o.id==n||o.src==n){this._currentLoads.splice(a,1)[0].cancel(),i=!0;break}}}i&&this._loadNext()}else{for(var l in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[l]);this.init(this.preferXHR,this._basePath)}},e.reset=function(){for(var t in this.close(),this._loadItemsById)this._disposeItem(this._loadItemsById[t]);for(var e=[],i=0,n=this._loadQueueBackup.length;n>i;i++)e.push(this._loadQueueBackup[i].getItem());this.loadManifest(e,!1)},e.installPlugin=function(t){if(null!=t&&null!=t.getPreloadHandlers){this._plugins.push(t);var e=t.getPreloadHandlers();if(e.scope=t,null!=e.types)for(var i=0,n=e.types.length;n>i;i++)this._typeCallbacks[e.types[i]]=e;if(null!=e.extensions)for(i=0,n=e.extensions.length;n>i;i++)this._extensionCallbacks[e.extensions[i]]=e}},e.setMaxConnections=function(t){this._maxConnections=t,!this._paused&&this._loadQueue.length>0&&this._loadNext()},e.loadFile=function(t,e,i){if(null==t){var n=new createjs.ErrorEvent("PRELOAD_NO_FILE");return void this._sendError(n)}this._addItem(t,null,i),!1!==e?this.setPaused(!1):this.setPaused(!0)},e.loadManifest=function(t,e,n){var r=null,a=null;if(Array.isArray(t)){if(0==t.length){var o=new createjs.ErrorEvent("PRELOAD_MANIFEST_EMPTY");return void this._sendError(o)}r=t}else if("string"==typeof t)r=[{src:t,type:i.MANIFEST}];else{if("object"!=typeof t){var o=new createjs.ErrorEvent("PRELOAD_MANIFEST_NULL");return void this._sendError(o)}if(void 0!==t.src){if(null==t.type)t.type=i.MANIFEST;else if(t.type!=i.MANIFEST){var o=new createjs.ErrorEvent("PRELOAD_MANIFEST_TYPE");this._sendError(o)}r=[t]}else void 0!==t.manifest&&(r=t.manifest,a=t.path)}for(var l=0,c=r.length;c>l;l++)this._addItem(r[l],a,n);!1!==e?this.setPaused(!1):this.setPaused(!0)},e.load=function(){this.setPaused(!1)},e.getItem=function(t){return this._loadItemsById[t]||this._loadItemsBySrc[t]},e.getResult=function(t,e){var i=this._loadItemsById[t]||this._loadItemsBySrc[t];if(null==i)return null;var n=i.id;return e&&this._loadedRawResults[n]?this._loadedRawResults[n]:this._loadedResults[n]},e.getItems=function(t){var e=[];for(var i in this._loadItemsById){var n=this._loadItemsById[i],r=this.getResult(i);(!0!==t||null!=r)&&e.push({item:n,result:r,rawResult:this.getResult(i,!0)})}return e},e.setPaused=function(t){this._paused=t,this._paused||this._loadNext()},e.close=function(){for(;this._currentLoads.length;)this._currentLoads.pop().cancel();this._scriptOrder.length=0,this._loadedScripts.length=0,this.loadStartWasDispatched=!1,this._itemCount=0,this._lastProgress=NaN},e._addItem=function(t,e,i){var n=this._createLoadItem(t,e,i);if(null!=n){var r=this._createLoader(n);null!=r&&("plugins"in r&&(r.plugins=this._plugins),n._loader=r,this._loadQueue.push(r),this._loadQueueBackup.push(r),this._numItems++,this._updateProgress(),(this.maintainScriptOrder&&n.type==createjs.Types.JAVASCRIPT||!0===n.maintainOrder)&&(this._scriptOrder.push(n),this._loadedScripts.push(null)))}},e._createLoadItem=function(t,e,i){var n=createjs.LoadItem.create(t);if(null==n)return null;var r="",a=i||this._basePath;if(n.src instanceof Object){if(!n.type)return null;if(e){r=e;var o=createjs.URLUtils.parseURI(e);null==a||o.absolute||o.relative||(r=a+r)}else null!=a&&(r=a)}else{var l=createjs.URLUtils.parseURI(n.src);l.extension&&(n.ext=l.extension),null==n.type&&(n.type=createjs.RequestUtils.getTypeByExtension(n.ext));var c=n.src;if(!l.absolute&&!l.relative){if(e){r=e;var o=createjs.URLUtils.parseURI(e);c=e+c,null==a||o.absolute||o.relative||(r=a+r)}else null!=a&&(r=a)}n.src=r+n.src}n.path=r,(void 0===n.id||null===n.id||""===n.id)&&(n.id=c);var u=this._typeCallbacks[n.type]||this._extensionCallbacks[n.ext];if(u){var h=u.callback.call(u.scope,n,this);if(!1===h)return null;!0===h||null!=h&&(n._loader=h),null!=(l=createjs.URLUtils.parseURI(n.src)).extension&&(n.ext=l.extension)}return this._loadItemsById[n.id]=n,this._loadItemsBySrc[n.src]=n,null==n.crossOrigin&&(n.crossOrigin=this._crossOrigin),n},e._createLoader=function(t){if(null!=t._loader)return t._loader;for(var e=this.preferXHR,i=0;i=this._maxConnections);t++){var e=this._loadQueue[t];this._canStartLoad(e)&&(this._loadQueue.splice(t,1),t--,this._loadItem(e))}}},e._loadItem=function(t){t.on("fileload",this._handleFileLoad,this),t.on("progress",this._handleProgress,this),t.on("complete",this._handleFileComplete,this),t.on("error",this._handleError,this),t.on("fileerror",this._handleFileError,this),this._currentLoads.push(t),this._sendFileStart(t.getItem()),t.load()},e._handleFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleFileError=function(t){var e=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,t.item);this._sendError(e)},e._handleError=function(t){var e=t.target;this._numItemsLoaded++,this._finishOrderedItem(e,!0),this._updateProgress();var i=new createjs.ErrorEvent("FILE_LOAD_ERROR",null,e.getItem());this._sendError(i),this.stopOnError?this.setPaused(!0):(this._removeLoadItem(e),this._cleanLoadItem(e),this._loadNext())},e._handleFileComplete=function(t){var e=t.target,i=e.getItem(),n=e.getResult();this._loadedResults[i.id]=n;var r=e.getResult(!0);null!=r&&r!==n&&(this._loadedRawResults[i.id]=r),this._saveLoadedItems(e),this._removeLoadItem(e),this._finishOrderedItem(e)||this._processFinishedLoad(i,e),this._cleanLoadItem(e)},e._saveLoadedItems=function(t){var e=t.getLoadedItems();if(null!==e)for(var i=0;ie;e++){var i=this._loadedScripts[e];if(null===i)break;if(!0!==i){var n=this._loadedResults[i.id];i.type==createjs.Types.JAVASCRIPT&&createjs.DomUtils.appendToHead(n);var r=i._loader;this._processFinishedLoad(i,r),this._loadedScripts[e]=!0}}},e._processFinishedLoad=function(t,e){if(this._numItemsLoaded++,!this.maintainScriptOrder&&t.type==createjs.Types.JAVASCRIPT){var i=e.getTag();createjs.DomUtils.appendToHead(i)}this._updateProgress(),this._sendFileComplete(t,e),this._loadNext()},e._canStartLoad=function(t){if(!this.maintainScriptOrder||t.preferXHR)return!0;var e=t.getItem();if(e.type!=createjs.Types.JAVASCRIPT)return!0;if(this._currentlyLoadingScript)return!1;for(var i=this._scriptOrder.indexOf(e),n=0;i>n;){if(null==this._loadedScripts[n])return!1;n++}return this._currentlyLoadingScript=!0,!0},e._removeLoadItem=function(t){for(var e=this._currentLoads.length,i=0;e>i;i++)if(this._currentLoads[i]==t){this._currentLoads.splice(i,1);break}},e._cleanLoadItem=function(t){var e=t.getItem();e&&delete e._loader},e._handleProgress=function(t){var e=t.target;this._sendFileProgress(e.getItem(),e.progress),this._updateProgress()},e._updateProgress=function(){var t=this._numItemsLoaded/this._numItems,e=this._numItems-this._numItemsLoaded;if(e>0){for(var i=0,n=0,r=this._currentLoads.length;r>n;n++)i+=this._currentLoads[n].progress;t+=i/e*(e/this._numItems)}this._lastProgress!=t&&(this._sendProgress(t),this._lastProgress=t)},e._disposeItem=function(t){delete this._loadedResults[t.id],delete this._loadedRawResults[t.id],delete this._loadItemsById[t.id],delete this._loadItemsBySrc[t.src]},e._sendFileProgress=function(t,e){if(!this._isCanceled()&&!this._paused&&this.hasEventListener("fileprogress")){var i=new createjs.Event("fileprogress");i.progress=e,i.loaded=e,i.total=1,i.item=t,this.dispatchEvent(i)}},e._sendFileComplete=function(t,e){if(!this._isCanceled()&&!this._paused){var i=new createjs.Event("fileload");i.loader=e,i.item=t,i.result=this._loadedResults[t.id],i.rawResult=this._loadedRawResults[t.id],t.completeHandler&&t.completeHandler(i),this.hasEventListener("fileload")&&this.dispatchEvent(i)}},e._sendFileStart=function(t){var e=new createjs.Event("filestart");e.item=t,this.hasEventListener("filestart")&&this.dispatchEvent(e)},e.toString=function(){return"[PreloadJS LoadQueue]"},createjs.LoadQueue=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.Types.TEXT)}(createjs.extend(t,createjs.AbstractLoader),t).canLoadItem=function(t){return t.type==createjs.Types.TEXT},createjs.TextLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.Types.BINARY),this.on("initialize",this._updateXHR,this)}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.Types.BINARY},e._updateXHR=function(t){t.loader.setResponseType("arraybuffer")},createjs.BinaryLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.Types.CSS),this.resultFormatter=this._formatResult,this._tagSrcAttribute="href",e?this._tag=createjs.Elements.style():this._tag=createjs.Elements.link(),this._tag.rel="stylesheet",this._tag.type="text/css"}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.Types.CSS},e._formatResult=function(t){if(this._preferXHR){var e=t.getTag();if(e.styleSheet)e.styleSheet.cssText=t.getResult(!0);else{var i=createjs.Elements.text(t.getResult(!0));e.appendChild(i)}}else e=this._tag;return createjs.DomUtils.appendToHead(e),e},createjs.CSSLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,t.type),this._faces={},this._watched=[],this._count=0,this._watchInterval=null,this._loadTimeout=null,this._injectCSS=void 0===t.injectCSS||t.injectCSS,this.dispatchEvent("initialize")}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.Types.FONT||t.type==createjs.Types.FONTCSS},t.sampleText="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ",t._ctx=document.createElement("canvas").getContext("2d"),t._referenceFonts=["serif","monospace"],t.WEIGHT_REGEX=/[- ._]*(thin|normal|book|regular|medium|black|heavy|[1-9]00|(?:extra|ultra|semi|demi)?[- ._]*(?:light|bold))[- ._]*/gi,t.STYLE_REGEX=/[- ._]*(italic|oblique)[- ._]*/gi,t.FONT_FORMAT={woff2:"woff2",woff:"woff",ttf:"truetype",otf:"truetype"},t.FONT_WEIGHT={thin:100,extralight:200,ultralight:200,light:300,semilight:300,demilight:300,book:"normal",regular:"normal",semibold:600,demibold:600,extrabold:800,ultrabold:800,black:900,heavy:900},t.WATCH_DURATION=10,e.load=function(){if(this.type==createjs.Types.FONTCSS){if(!this._watchCSS())return void this.AbstractLoader_load()}else if(this._item.src instanceof Array)this._watchFontArray();else{var t=this._defFromSrc(this._item.src);this._watchFont(t),this._injectStyleTag(this._cssFromDef(t))}this._loadTimeout=setTimeout(createjs.proxy(this._handleTimeout,this),this._item.loadTimeout),this.dispatchEvent("loadstart")},e._handleTimeout=function(){this._stopWatching(),this.dispatchEvent(new createjs.ErrorEvent("PRELOAD_TIMEOUT"))},e._createRequest=function(){return this._request},e.handleEvent=function(t){switch(t.type){case"complete":this._rawResult=t.target._response,this._result=!0,this._parseCSS(this._rawResult);break;case"error":this._stopWatching(),this.AbstractLoader_handleEvent(t)}},e._watchCSS=function(){var t=this._item.src;return t instanceof HTMLStyleElement&&(this._injectCSS&&!t.parentNode&&(document.head||document.getElementsByTagName("head")[0]).appendChild(t),this._injectCSS=!1,t="\n"+t.textContent),-1!==t.search(/\n|\r|@font-face/i)?(this._parseCSS(t),!0):(this._request=new createjs.XHRRequest(this._item),!1)},e._parseCSS=function(t){for(var e=/@font-face\s*\{([^}]+)}/g;;){var i=e.exec(t);if(!i)break;this._watchFont(this._parseFontFace(i[1]))}this._injectStyleTag(t)},e._watchFontArray=function(){for(var t,e=this._item.src,i="",n=e.length-1;n>=0;n--){var r=e[n];t="string"==typeof r?this._defFromSrc(r):this._defFromObj(r),this._watchFont(t),i+=this._cssFromDef(t)+"\n"}this._injectStyleTag(i)},e._injectStyleTag=function(t){if(this._injectCSS){var e=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css",i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t)),e.appendChild(i)}},e._parseFontFace=function(t){var e=this._getCSSValue(t,"font-family"),i=this._getCSSValue(t,"src");return e&&i?this._defFromObj({family:e,src:i,style:this._getCSSValue(t,"font-style"),weight:this._getCSSValue(t,"font-weight")}):null},e._watchFont=function(t){t&&!this._faces[t.id]&&(this._faces[t.id]=t,this._watched.push(t),this._count++,this._calculateReferenceSizes(t),this._startWatching())},e._startWatching=function(){null==this._watchInterval&&(this._watchInterval=setInterval(createjs.proxy(this._watch,this),t.WATCH_DURATION))},e._stopWatching=function(){clearInterval(this._watchInterval),clearTimeout(this._loadTimeout),this._watchInterval=null},e._watch=function(){for(var e=this._watched,i=t._referenceFonts,n=e.length,r=n-1;r>=0;r--)for(var a=e[r],o=a.refs,l=o.length-1;l>=0;l--)if(this._getTextWidth(a.family+","+i[l],a.weight,a.style)!=o[l]){var c=new createjs.Event("fileload");a.type="font-family",c.item=a,this.dispatchEvent(c),e.splice(r,1);break}if(n!==e.length){var c=new createjs.ProgressEvent(this._count-e.length,this._count);this.dispatchEvent(c)}0===n&&(this._stopWatching(),this._sendComplete())},e._calculateReferenceSizes=function(e){for(var i=t._referenceFonts,n=e.refs=[],r=0;ri;i++)e.installPlugin(this.plugins[i]);e.loadManifest(t)}else this._sendComplete()},e._handleManifestFileLoad=function(t){t.target=null,this.dispatchEvent(t)},e._handleManifestComplete=function(t){this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.MANIFEST_PROGRESS)+i.MANIFEST_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.ManifestLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.Types.SOUND),createjs.DomUtils.isAudioTag(t)?this._tag=t:createjs.DomUtils.isAudioTag(t.src)?this._tag=t:createjs.DomUtils.isAudioTag(t.tag)&&(this._tag=createjs.DomUtils.isAudioTag(t)?t:t.src),null!=this._tag&&(this._preferXHR=!1)}var e=createjs.extend(t,createjs.AbstractMediaLoader);t.canLoadItem=function(t){return t.type==createjs.Types.SOUND},e._createTag=function(t){var e=createjs.Elements.audio();return e.autoplay=!1,e.preload="none",e.src=t,e},createjs.SoundLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractMediaLoader_constructor(t,e,createjs.Types.VIDEO),createjs.DomUtils.isVideoTag(t)||createjs.DomUtils.isVideoTag(t.src)?(this.setTag(createjs.DomUtils.isVideoTag(t)?t:t.src),this._preferXHR=!1):this.setTag(this._createTag())}var e=createjs.extend(t,createjs.AbstractMediaLoader),i=t;e._createTag=function(){return createjs.Elements.video()},i.canLoadItem=function(t){return t.type==createjs.Types.VIDEO},createjs.VideoLoader=createjs.promote(t,"AbstractMediaLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.Types.SPRITESHEET),this._manifestQueue=null}var e=createjs.extend(t,createjs.AbstractLoader),i=t;i.SPRITESHEET_PROGRESS=.25,i.canLoadItem=function(t){return t.type==createjs.Types.SPRITESHEET},e.destroy=function(){this.AbstractLoader_destroy(),this._manifestQueue.close()},e._createRequest=function(){null!=this._item.callback?this._request=new createjs.JSONPLoader(this._item):this._request=new createjs.JSONLoader(this._item)},e.handleEvent=function(t){switch(t.type){case"complete":return this._rawResult=t.target.getResult(!0),this._result=t.target.getResult(),this._sendProgress(i.SPRITESHEET_PROGRESS),void this._loadManifest(this._result);case"progress":return t.loaded*=i.SPRITESHEET_PROGRESS,this.progress=t.loaded/t.total,(isNaN(this.progress)||this.progress==1/0)&&(this.progress=0),void this._sendProgress(t)}this.AbstractLoader_handleEvent(t)},e._loadManifest=function(t){if(t&&t.images){var e=this._manifestQueue=new createjs.LoadQueue(this._preferXHR,this._item.path,this._item.crossOrigin);e.on("complete",this._handleManifestComplete,this,!0),e.on("fileload",this._handleManifestFileLoad,this),e.on("progress",this._handleManifestProgress,this),e.on("error",this._handleManifestError,this,!0),e.loadManifest(t.images)}},e._handleManifestFileLoad=function(t){var e=t.result;if(null!=e){var i=this.getResult().images;i[i.indexOf(t.item.src)]=e}},e._handleManifestComplete=function(t){this._result=new createjs.SpriteSheet(this._result),this._loadedItems=this._manifestQueue.getItems(!0),this._sendComplete()},e._handleManifestProgress=function(t){this.progress=t.progress*(1-i.SPRITESHEET_PROGRESS)+i.SPRITESHEET_PROGRESS,this._sendProgress(this.progress)},e._handleManifestError=function(t){var e=new createjs.Event("fileerror");e.item=t.data,this.dispatchEvent(e)},createjs.SpriteSheetLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e){this.AbstractLoader_constructor(t,e,createjs.Types.SVG),this.resultFormatter=this._formatResult,this._tagSrcAttribute="data",e?this.setTag(createjs.Elements.svg()):(this.setTag(createjs.Elements.object()),this.getTag().type="image/svg+xml")}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.Types.SVG},e._formatResult=function(t){var e=createjs.DataUtils.parseXML(t.getResult(!0)),i=t.getTag();if(!this._preferXHR&&document.body.contains(i)&&document.body.removeChild(i),null!=e.documentElement){var n=e.documentElement;return document.importNode&&(n=document.importNode(n,!0)),i.appendChild(n),i}return e},createjs.SVGLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.Types.XML),this.resultFormatter=this._formatResult}var e=createjs.extend(t,createjs.AbstractLoader);t.canLoadItem=function(t){return t.type==createjs.Types.XML},e._formatResult=function(t){return createjs.DataUtils.parseXML(t.getResult(!0))},createjs.XMLLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){var t=createjs.SoundJS=createjs.SoundJS||{};t.version="1.0.0",t.buildDate="Thu, 12 Oct 2017 16:34:05 GMT"}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"BrowserDetect cannot be instantiated"}var e=t.agent=window.navigator.userAgent;t.isWindowPhone=e.indexOf("IEMobile")>-1||e.indexOf("Windows Phone")>-1,t.isFirefox=e.indexOf("Firefox")>-1,t.isOpera=null!=window.opera,t.isChrome=e.indexOf("Chrome")>-1,t.isIOS=(e.indexOf("iPod")>-1||e.indexOf("iPhone")>-1||e.indexOf("iPad")>-1)&&!t.isWindowPhone,t.isAndroid=e.indexOf("Android")>-1&&!t.isWindowPhone,t.isBlackberry=e.indexOf("Blackberry")>-1,createjs.BrowserDetect=t}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(){this.interrupt=null,this.delay=null,this.offset=null,this.loop=null,this.volume=null,this.pan=null,this.startTime=null,this.duration=null},e=t.prototype={},i=t;i.create=function(t){if("string"==typeof t)return console&&(console.warn||console.log)("Deprecated behaviour. Sound.play takes a configuration object instead of individual arguments. See docs for info."),(new createjs.PlayPropsConfig).set({interrupt:t});if(null==t||t instanceof i||t instanceof Object)return(new createjs.PlayPropsConfig).set(t);if(null==t)throw Error("PlayProps configuration not recognized.")},e.set=function(t){if(null!=t)for(var e in t)this[e]=t[e];return this},e.toString=function(){return"[PlayPropsConfig]"},createjs.PlayPropsConfig=i}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Sound cannot be instantiated"}function e(t,e){this.init(t,e)}var i=t;i.INTERRUPT_ANY="any",i.INTERRUPT_EARLY="early",i.INTERRUPT_LATE="late",i.INTERRUPT_NONE="none",i.PLAY_INITED="playInited",i.PLAY_SUCCEEDED="playSucceeded",i.PLAY_INTERRUPTED="playInterrupted",i.PLAY_FINISHED="playFinished",i.PLAY_FAILED="playFailed",i.SUPPORTED_EXTENSIONS=["mp3","ogg","opus","mpeg","wav","m4a","mp4","aiff","wma","mid"],i.EXTENSION_MAP={m4a:"mp4"},i.FILE_PATTERN=/^(?:(\w+:)\/{2}(\w+(?:\.\w+)*\/?))?([\/.]*?(?:[^?]+)?\/)?((?:[^\/?]+)\.(\w+))(?:\?(\S+)?)?$/,i.defaultInterruptBehavior=i.INTERRUPT_NONE,i.alternateExtensions=[],i.activePlugin=null,i._masterVolume=1,i._getMasterVolume=function(){return this._masterVolume},i.getVolume=createjs.deprecate(i._getMasterVolume,"Sound.getVolume"),i._setMasterVolume=function(t){if(null!=Number(t)&&(t=Math.max(0,Math.min(1,t)),i._masterVolume=t,!this.activePlugin||!this.activePlugin.setVolume||!this.activePlugin.setVolume(t)))for(var e=this._instances,n=0,r=e.length;r>n;n++)e[n].setMasterVolume(t)},i.setVolume=createjs.deprecate(i._setMasterVolume,"Sound.setVolume"),i._masterMute=!1,i._getMute=function(){return this._masterMute},i.getMute=createjs.deprecate(i._getMute,"Sound.getMute"),i._setMute=function(t){if(null!=t&&(this._masterMute=t,!this.activePlugin||!this.activePlugin.setMute||!this.activePlugin.setMute(t)))for(var e=this._instances,i=0,n=e.length;n>i;i++)e[i].setMasterMute(t)},i.setMute=createjs.deprecate(i._setMute,"Sound.setMute"),i._getCapabilities=function(){return null==i.activePlugin?null:i.activePlugin._capabilities},i.getCapabilities=createjs.deprecate(i._getCapabilities,"Sound.getCapabilities"),Object.defineProperties(i,{volume:{get:i._getMasterVolume,set:i._setMasterVolume},muted:{get:i._getMute,set:i._setMute},capabilities:{get:i._getCapabilities}}),i._pluginsRegistered=!1,i._lastID=0,i._instances=[],i._idHash={},i._preloadHash={},i._defaultPlayPropsHash={},i.addEventListener=null,i.removeEventListener=null,i.removeAllEventListeners=null,i.dispatchEvent=null,i.hasEventListener=null,i._listeners=null,createjs.EventDispatcher.initialize(i),i.getPreloadHandlers=function(){return{callback:createjs.proxy(i.initLoad,i),types:["sound"],extensions:i.SUPPORTED_EXTENSIONS}},i._handleLoadComplete=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var n=0,r=i._preloadHash[e].length;r>n;n++){var a=i._preloadHash[e][n];if(i._preloadHash[e][n]=!0,i.hasEventListener("fileload")){var t=new createjs.Event("fileload");t.src=a.src,t.id=a.id,t.data=a.data,t.sprite=a.sprite,i.dispatchEvent(t)}}},i._handleLoadError=function(t){var e=t.target.getItem().src;if(i._preloadHash[e])for(var n=0,r=i._preloadHash[e].length;r>n;n++){var a=i._preloadHash[e][n];if(i._preloadHash[e][n]=!1,i.hasEventListener("fileerror")){var t=new createjs.Event("fileerror");t.src=a.src,t.id=a.id,t.data=a.data,t.sprite=a.sprite,i.dispatchEvent(t)}}},i._registerPlugin=function(t){return!!t.isSupported()&&(i.activePlugin=new t,!0)},i.registerPlugins=function(t){i._pluginsRegistered=!0;for(var e=0,n=t.length;n>e;e++)if(i._registerPlugin(t[e]))return!0;return!1},i.initializeDefaultPlugins=function(){return null!=i.activePlugin||!i._pluginsRegistered&&!!i.registerPlugins([createjs.WebAudioPlugin,createjs.HTMLAudioPlugin])},i.isReady=function(){return null!=i.activePlugin},i.initLoad=function(t){return"video"==t.type||i._registerSound(t)},i._registerSound=function(t){if(!i.initializeDefaultPlugins()||(t.src instanceof Object?(a=i._parseSrc(t.src)).src=t.path+a.src:a=i._parsePath(t.src),null==a))return!1;t.src=a.src,t.type="sound";var n=t.data,r=null;if(null!=n&&(isNaN(n.channels)?isNaN(n)||(r=parseInt(n)):r=parseInt(n.channels),n.audioSprite))for(var a,o,l=n.audioSprite.length;l--;)o=n.audioSprite[l],i._idHash[o.id]={src:t.src,startTime:parseInt(o.startTime),duration:parseInt(o.duration)},o.defaultPlayProps&&(i._defaultPlayPropsHash[o.id]=createjs.PlayPropsConfig.create(o.defaultPlayProps));null!=t.id&&(i._idHash[t.id]={src:t.src});var c=i.activePlugin.register(t);return e.create(t.src,r),null!=n&&isNaN(n)?t.data.channels=r||e.maxPerChannel():t.data=r||e.maxPerChannel(),c.type&&(t.type=c.type),t.defaultPlayProps&&(i._defaultPlayPropsHash[t.src]=createjs.PlayPropsConfig.create(t.defaultPlayProps)),c},i.registerSound=function(t,e,n,r,a){var o={src:t,id:e,data:n,defaultPlayProps:a};t instanceof Object&&t.src&&(r=e,o=t),(o=createjs.LoadItem.create(o)).path=r,null==r||o.src instanceof Object||(o.src=r+o.src);var l=i._registerSound(o);if(!l)return!1;if(i._preloadHash[o.src]||(i._preloadHash[o.src]=[]),i._preloadHash[o.src].push(o),1==i._preloadHash[o.src].length)l.on("complete",this._handleLoadComplete,this),l.on("error",this._handleLoadError,this),i.activePlugin.preload(l);else if(1==i._preloadHash[o.src][0])return!0;return o},i.registerSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var n=0,r=t.length;r>n;n++)i[n]=createjs.Sound.registerSound(t[n].src,t[n].id,t[n].data,e,t[n].defaultPlayProps);return i},i.removeSound=function(t,n){var r;if(null==i.activePlugin||(t instanceof Object&&t.src&&(t=t.src),t instanceof Object?r=i._parseSrc(t):(t=i._getSrcById(t).src,r=i._parsePath(t)),null==r))return!1;for(var a in t=r.src,null!=n&&(t=n+t),i._idHash)i._idHash[a].src==t&&delete i._idHash[a];return e.removeSrc(t),delete i._preloadHash[t],i.activePlugin.removeSound(t),!0},i.removeSounds=function(t,e){var i=[];t.path&&(e?e+=t.path:e=t.path,t=t.manifest);for(var n=0,r=t.length;r>n;n++)i[n]=createjs.Sound.removeSound(t[n].src,e);return i},i.removeAllSounds=function(){i._idHash={},i._preloadHash={},e.removeAll(),i.activePlugin&&i.activePlugin.removeAllSounds()},i.loadComplete=function(t){if(!i.isReady())return!1;var e=i._parsePath(t);return t=e?i._getSrcById(e.src).src:i._getSrcById(t).src,void 0!=i._preloadHash[t]&&1==i._preloadHash[t][0]},i._parsePath=function(t){"string"!=typeof t&&(t=t.toString());var e=t.match(i.FILE_PATTERN);if(null==e)return!1;for(var n=e[4],r=e[5],a=i.capabilities,o=0;!a[r];)if(r=i.alternateExtensions[o++],o>i.alternateExtensions.length)return null;return{name:n,src:t=t.replace("."+e[5],"."+r),extension:r}},i._parseSrc=function(t){var e={name:void 0,src:void 0,extension:void 0},n=i.capabilities;for(var r in t)if(t.hasOwnProperty(r)&&n[r]){e.src=t[r],e.extension=r;break}if(!e.src)return!1;var a=e.src.lastIndexOf("/");return -1!=a?e.name=e.src.slice(a+1):e.name=e.src,e},i.play=function(t,e){var n=createjs.PlayPropsConfig.create(e),r=i.createInstance(t,n.startTime,n.duration);return i._playInstance(r,n)||r._playFailed(),r},i.createInstance=function(t,n,r){if(!i.initializeDefaultPlugins())return new createjs.DefaultSoundInstance(t,n,r);var a=i._defaultPlayPropsHash[t];t=i._getSrcById(t);var o=i._parsePath(t.src),l=null;return null!=o&&null!=o.src?(e.create(o.src),null==n&&(n=t.startTime),l=i.activePlugin.create(o.src,n,r||t.duration),(a=a||i._defaultPlayPropsHash[o.src])&&l.applyPlayProps(a)):l=new createjs.DefaultSoundInstance(t,n,r),l.uniqueId=i._lastID++,l},i.stop=function(){for(var t=this._instances,e=t.length;e--;)t[e].stop()},i.setDefaultPlayProps=function(t,e){t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]=createjs.PlayPropsConfig.create(e)},i.getDefaultPlayProps=function(t){return t=i._getSrcById(t),i._defaultPlayPropsHash[i._parsePath(t.src).src]},i._playInstance=function(t,e){var n=i._defaultPlayPropsHash[t.src]||{};if(null==e.interrupt&&(e.interrupt=n.interrupt||i.defaultInterruptBehavior),null==e.delay&&(e.delay=n.delay||0),null==e.offset&&(e.offset=t.position),null==e.loop&&(e.loop=t.loop),null==e.volume&&(e.volume=t.volume),null==e.pan&&(e.pan=t.pan),0==e.delay){if(!i._beginPlaying(t,e))return!1}else{var r=setTimeout(function(){i._beginPlaying(t,e)},e.delay);t.delayTimeoutId=r}return this._instances.push(t),!0},i._beginPlaying=function(t,i){if(!e.add(t,i.interrupt))return!1;if(!t._beginPlaying(i)){var n=createjs.indexOf(this._instances,t);return n>-1&&this._instances.splice(n,1),!1}return!0},i._getSrcById=function(t){return i._idHash[t]||{src:t}},i._playFinished=function(t){e.remove(t);var i=createjs.indexOf(this._instances,t);i>-1&&this._instances.splice(i,1)},createjs.Sound=t,e.channels={},e.create=function(t,i){return null==e.get(t)&&(e.channels[t]=new e(t,i),!0)},e.removeSrc=function(t){var i=e.get(t);return null!=i&&(i._removeAll(),delete e.channels[t],!0)},e.removeAll=function(){for(var t in e.channels)e.channels[t]._removeAll();e.channels={}},e.add=function(t,i){var n=e.get(t.src);return null!=n&&n._add(t,i)},e.remove=function(t){var i=e.get(t.src);return null!=i&&(i._remove(t),!0)},e.maxPerChannel=function(){return n.maxDefault},e.get=function(t){return e.channels[t]};var n=e.prototype;n.constructor=e,n.src=null,n.max=null,n.maxDefault=100,n.length=0,n.init=function(t,e){this.src=t,this.max=e||this.maxDefault,-1==this.max&&(this.max=this.maxDefault),this._instances=[]},n._get=function(t){return this._instances[t]},n._add=function(t,e){return!!this._getSlot(e,t)&&(this._instances.push(t),this.length++,!0)},n._remove=function(t){var e=createjs.indexOf(this._instances,t);return -1!=e&&(this._instances.splice(e,1),this.length--,!0)},n._removeAll=function(){for(var t=this.length-1;t>=0;t--)this._instances[t].stop()},n._getSlot=function(e,i){var n,r;if(e!=t.INTERRUPT_NONE&&null==(r=this._get(0)))return!0;for(var a=0,o=this.max;o>a;a++){if(null==(n=this._get(a)))return!0;if(n.playState==t.PLAY_FINISHED||n.playState==t.PLAY_INTERRUPTED||n.playState==t.PLAY_FAILED){r=n;break}e!=t.INTERRUPT_NONE&&(e==t.INTERRUPT_EARLY&&n.positionr.position)&&(r=n)}return null!=r&&(r._interrupt(),this._remove(r),!0)},n.toString=function(){return"[Sound SoundChannel]"}}(),this.createjs=this.createjs||{},function(){"use strict";var t=function(t,e,i,n){this.EventDispatcher_constructor(),this.src=t,this.uniqueId=-1,this.playState=null,this.delayTimeoutId=null,this._volume=1,Object.defineProperty(this,"volume",{get:this._getVolume,set:this._setVolume}),this.getVolume=createjs.deprecate(this._getVolume,"AbstractSoundInstance.getVolume"),this.setVolume=createjs.deprecate(this._setVolume,"AbstractSoundInstance.setVolume"),this._pan=0,Object.defineProperty(this,"pan",{get:this._getPan,set:this._setPan}),this.getPan=createjs.deprecate(this._getPan,"AbstractSoundInstance.getPan"),this.setPan=createjs.deprecate(this._setPan,"AbstractSoundInstance.setPan"),this._startTime=Math.max(0,e||0),Object.defineProperty(this,"startTime",{get:this._getStartTime,set:this._setStartTime}),this.getStartTime=createjs.deprecate(this._getStartTime,"AbstractSoundInstance.getStartTime"),this.setStartTime=createjs.deprecate(this._setStartTime,"AbstractSoundInstance.setStartTime"),this._duration=Math.max(0,i||0),Object.defineProperty(this,"duration",{get:this._getDuration,set:this._setDuration}),this.getDuration=createjs.deprecate(this._getDuration,"AbstractSoundInstance.getDuration"),this.setDuration=createjs.deprecate(this._setDuration,"AbstractSoundInstance.setDuration"),this._playbackResource=null,Object.defineProperty(this,"playbackResource",{get:this._getPlaybackResource,set:this._setPlaybackResource}),!1!==n&&!0!==n&&this._setPlaybackResource(n),this.getPlaybackResource=createjs.deprecate(this._getPlaybackResource,"AbstractSoundInstance.getPlaybackResource"),this.setPlaybackResource=createjs.deprecate(this._setPlaybackResource,"AbstractSoundInstance.setPlaybackResource"),this._position=0,Object.defineProperty(this,"position",{get:this._getPosition,set:this._setPosition}),this.getPosition=createjs.deprecate(this._getPosition,"AbstractSoundInstance.getPosition"),this.setPosition=createjs.deprecate(this._setPosition,"AbstractSoundInstance.setPosition"),this._loop=0,Object.defineProperty(this,"loop",{get:this._getLoop,set:this._setLoop}),this.getLoop=createjs.deprecate(this._getLoop,"AbstractSoundInstance.getLoop"),this.setLoop=createjs.deprecate(this._setLoop,"AbstractSoundInstance.setLoop"),this._muted=!1,Object.defineProperty(this,"muted",{get:this._getMuted,set:this._setMuted}),this.getMuted=createjs.deprecate(this._getMuted,"AbstractSoundInstance.getMuted"),this.setMuted=createjs.deprecate(this._setMuted,"AbstractSoundInstance.setMuted"),this._paused=!1,Object.defineProperty(this,"paused",{get:this._getPaused,set:this._setPaused}),this.getPaused=createjs.deprecate(this._getPaused,"AbstractSoundInstance.getPaused"),this.setPaused=createjs.deprecate(this._setPaused,"AbstractSoundInstance.setPaused")},e=createjs.extend(t,createjs.EventDispatcher);e.play=function(t){var e=createjs.PlayPropsConfig.create(t);return this.playState==createjs.Sound.PLAY_SUCCEEDED?(this.applyPlayProps(e),void(this._paused&&this._setPaused(!1))):(this._cleanUp(),createjs.Sound._playInstance(this,e),this)},e.stop=function(){return this._position=0,this._paused=!1,this._handleStop(),this._cleanUp(),this.playState=createjs.Sound.PLAY_FINISHED,this},e.destroy=function(){this._cleanUp(),this.src=null,this.playbackResource=null,this.removeAllEventListeners()},e.applyPlayProps=function(t){return null!=t.offset&&this._setPosition(t.offset),null!=t.loop&&this._setLoop(t.loop),null!=t.volume&&this._setVolume(t.volume),null!=t.pan&&this._setPan(t.pan),null!=t.startTime&&(this._setStartTime(t.startTime),this._setDuration(t.duration)),this},e.toString=function(){return"[AbstractSoundInstance]"},e._getPaused=function(){return this._paused},e._setPaused=function(t){return!0!==t&&!1!==t||this._paused==t||1==t&&this.playState!=createjs.Sound.PLAY_SUCCEEDED?void 0:(this._paused=t,t?this._pause():this._resume(),clearTimeout(this.delayTimeoutId),this)},e._setVolume=function(t){return t==this._volume||(this._volume=Math.max(0,Math.min(1,t)),this._muted||this._updateVolume()),this},e._getVolume=function(){return this._volume},e._setMuted=function(t){return!0===t||!1===t?(this._muted=t,this._updateVolume(),this):void 0},e._getMuted=function(){return this._muted},e._setPan=function(t){return t==this._pan||(this._pan=Math.max(-1,Math.min(1,t)),this._updatePan()),this},e._getPan=function(){return this._pan},e._getPosition=function(){return this._paused||this.playState!=createjs.Sound.PLAY_SUCCEEDED||(this._position=this._calculateCurrentPosition()),this._position},e._setPosition=function(t){return this._position=Math.max(0,t),this.playState==createjs.Sound.PLAY_SUCCEEDED&&this._updatePosition(),this},e._getStartTime=function(){return this._startTime},e._setStartTime=function(t){return t==this._startTime||(this._startTime=Math.max(0,t||0),this._updateStartTime()),this},e._getDuration=function(){return this._duration},e._setDuration=function(t){return t==this._duration||(this._duration=Math.max(0,t||0),this._updateDuration()),this},e._setPlaybackResource=function(t){return this._playbackResource=t,0==this._duration&&this._playbackResource&&this._setDurationFromSource(),this},e._getPlaybackResource=function(){return this._playbackResource},e._getLoop=function(){return this._loop},e._setLoop=function(t){null!=this._playbackResource&&(0!=this._loop&&0==t?this._removeLooping(t):0==this._loop&&0!=t&&this._addLooping(t)),this._loop=t},e._sendEvent=function(t){var e=new createjs.Event(t);this.dispatchEvent(e)},e._cleanUp=function(){clearTimeout(this.delayTimeoutId),this._handleCleanUp(),this._paused=!1,createjs.Sound._playFinished(this)},e._interrupt=function(){this._cleanUp(),this.playState=createjs.Sound.PLAY_INTERRUPTED,this._sendEvent("interrupted")},e._beginPlaying=function(t){return this._setPosition(t.offset),this._setLoop(t.loop),this._setVolume(t.volume),this._setPan(t.pan),null!=t.startTime&&(this._setStartTime(t.startTime),this._setDuration(t.duration)),null!=this._playbackResource&&this._positioni;i++)this._soundInstances[e][i].playbackResource=this._audioSources[e],this._soundInstances[e]=null},e._handlePreloadError=function(t){},e._updateVolume=function(){},createjs.AbstractPlugin=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.AbstractLoader_constructor(t,!0,createjs.Types.SOUND)}var e=createjs.extend(t,createjs.AbstractLoader);t.context=null,e.toString=function(){return"[WebAudioLoader]"},e._createRequest=function(){this._request=new createjs.XHRRequest(this._item,!1),this._request.setResponseType("arraybuffer")},e._sendComplete=function(e){t.context.decodeAudioData(this._rawResult,createjs.proxy(this._handleAudioDecoded,this),createjs.proxy(this._sendError,this))},e._handleAudioDecoded=function(t){this._result=t,this.AbstractLoader__sendComplete()},createjs.WebAudioLoader=createjs.promote(t,"AbstractLoader")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,n,r){this.AbstractSoundInstance_constructor(t,e,n,r),this.gainNode=i.context.createGain(),this.panNode=i.context.createPanner(),this.panNode.panningModel=i._panningModel,this.panNode.connect(this.gainNode),this._updatePan(),this.sourceNode=null,this._soundCompleteTimeout=null,this._sourceNodeNext=null,this._playbackStartTime=0,this._endedHandler=createjs.proxy(this._handleSoundComplete,this)}var e=createjs.extend(t,createjs.AbstractSoundInstance),i=t;i.context=null,i._scratchBuffer=null,i.destinationNode=null,i._panningModel="equalpower",e.destroy=function(){this.AbstractSoundInstance_destroy(),this.panNode.disconnect(0),this.panNode=null,this.gainNode.disconnect(0),this.gainNode=null},e.toString=function(){return"[WebAudioSoundInstance]"},e._updatePan=function(){this.panNode.setPosition(this._pan,0,-.5)},e._removeLooping=function(t){this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)},e._addLooping=function(t){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._setDurationFromSource=function(){this._duration=1e3*this.playbackResource.duration},e._handleCleanUp=function(){this.sourceNode&&this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext)),0!=this.gainNode.numberOfOutputs&&this.gainNode.disconnect(0),clearTimeout(this._soundCompleteTimeout),this._playbackStartTime=0},e._cleanUpAudioNode=function(t){if(t){if(t.stop(0),t.disconnect(0),createjs.BrowserDetect.isIOS)try{t.buffer=i._scratchBuffer}catch(e){}t=null}return t},e._handleSoundReady=function(t){this.gainNode.connect(i.destinationNode);var e=.001*this._duration,n=Math.min(.001*Math.max(0,this._position),e);this.sourceNode=this._createAndPlayAudioNode(i.context.currentTime-e,n),this._playbackStartTime=this.sourceNode.startTime-n,this._soundCompleteTimeout=setTimeout(this._endedHandler,1e3*(e-n)),0!=this._loop&&(this._sourceNodeNext=this._createAndPlayAudioNode(this._playbackStartTime,0))},e._createAndPlayAudioNode=function(t,e){var n=i.context.createBufferSource();n.buffer=this.playbackResource,n.connect(this.panNode);var r=.001*this._duration;return n.startTime=t+r,n.start(n.startTime,e+.001*this._startTime,r-e),n},e._pause=function(){this._position=1e3*(i.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)},e._resume=function(){this._handleSoundReady()},e._updateVolume=function(){var t=this._muted?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},e._calculateCurrentPosition=function(){return 1e3*(i.context.currentTime-this._playbackStartTime)},e._updatePosition=function(){this.sourceNode=this._cleanUpAudioNode(this.sourceNode),this._sourceNodeNext=this._cleanUpAudioNode(this._sourceNodeNext),clearTimeout(this._soundCompleteTimeout),this._paused||this._handleSoundReady()},e._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)},e._updateDuration=function(){this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._pause(),this._resume())},createjs.WebAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.AbstractPlugin_constructor(),this._panningModel=i._panningModel,this.context=i.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=i._capabilities,this._loaderClass=createjs.WebAudioLoader,this._soundInstanceClass=createjs.WebAudioSoundInstance,this._addPropsToClasses()}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i._capabilities=null,i._panningModel="equalpower",i.context=null,i._scratchBuffer=null,i._unlocked=!1,i.DEFAULT_SAMPLE_RATE=44100,i.isSupported=function(){var t=createjs.BrowserDetect.isIOS||createjs.BrowserDetect.isAndroid||createjs.BrowserDetect.isBlackberry;return!!("file:"!=location.protocol||t||this._isFileXHRSupported())&&(i._generateCapabilities(),null!=i.context)},i.playEmptySound=function(){if(null!=i.context){var t=i.context.createBufferSource();t.buffer=i._scratchBuffer,t.connect(i.context.destination),t.start(0,0,0)}},i._isFileXHRSupported=function(){var t=!0,e=new XMLHttpRequest;try{e.open("GET","WebAudioPluginTest.fail",!1)}catch(i){return t=!1}e.onerror=function(){t=!1},e.onload=function(){t=404==this.status||200==this.status||0==this.status&&""!=this.response};try{e.send()}catch(n){t=!1}return t},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType||null==i.context&&(i.context=i._createAudioContext(),null==i.context))return null;null==i._scratchBuffer&&(i._scratchBuffer=i.context.createBuffer(1,1,22050)),i._compatibilitySetUp(),"ontouchstart"in window&&"running"!=i.context.state&&(i._unlock(),document.addEventListener("mousedown",i._unlock,!0),document.addEventListener("touchstart",i._unlock,!0),document.addEventListener("touchend",i._unlock,!0)),i._capabilities={panning:!0,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,n=createjs.Sound.EXTENSION_MAP,r=0,a=e.length;a>r;r++){var o=e[r],l=n[o]||o;i._capabilities[o]="no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)||"no"!=t.canPlayType("audio/"+l)&&""!=t.canPlayType("audio/"+l)}i.context.destination.numberOfChannels<2&&(i._capabilities.panning=!1)}},i._createAudioContext=function(){var t=window.AudioContext||window.webkitAudioContext;if(null==t)return null;var e=new t;if(/(iPhone|iPad)/i.test(navigator.userAgent)&&e.sampleRate!==i.DEFAULT_SAMPLE_RATE){var n=e.createBuffer(1,1,i.DEFAULT_SAMPLE_RATE),r=e.createBufferSource();r.buffer=n,r.connect(e.destination),r.start(0),r.disconnect(),e.close(),e=new t}return e},i._compatibilitySetUp=function(){if(i._panningModel="equalpower",!i.context.createGain){i.context.createGain=i.context.createGainNode;var t=i.context.createBufferSource();t.__proto__.start=t.__proto__.noteGrainOn,t.__proto__.stop=t.__proto__.noteOff,i._panningModel=0}},i._unlock=function(){i._unlocked||(i.playEmptySound(),"running"==i.context.state&&(document.removeEventListener("mousedown",i._unlock,!0),document.removeEventListener("touchend",i._unlock,!0),document.removeEventListener("touchstart",i._unlock,!0),i._unlocked=!0))},e.toString=function(){return"[WebAudioPlugin]"},e._addPropsToClasses=function(){var t=this._soundInstanceClass;t.context=this.context,t._scratchBuffer=i._scratchBuffer,t.destinationNode=this.gainNode,t._panningModel=this._panningModel,this._loaderClass.context=this.context},e._updateVolume=function(){var t=createjs.Sound._masterMute?0:this._volume;t!=this.gainNode.gain.value&&(this.gainNode.gain.value=t)},createjs.WebAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"HTMLAudioTagPool cannot be instantiated"}function e(t){this._tags=[]}var i=t;i._tags={},i._tagPool=new e,i._tagUsed={},i.get=function(t){var e=i._tags[t];return null==e?(e=i._tags[t]=i._tagPool.get()).src=t:i._tagUsed[t]?(e=i._tagPool.get()).src=t:i._tagUsed[t]=!0,e},i.set=function(t,e){e==i._tags[t]?i._tagUsed[t]=!1:i._tagPool.set(e)},i.remove=function(t){var e=i._tags[t];return null!=e&&(i._tagPool.set(e),delete i._tags[t],delete i._tagUsed[t],!0)},i.getDuration=function(t){var e=i._tags[t];return null!=e&&e.duration?1e3*e.duration:0},createjs.HTMLAudioTagPool=t;var n=e.prototype;n.constructor=e,n.get=function(){var t;return null==(t=0==this._tags.length?this._createTag():this._tags.pop()).parentNode&&document.body.appendChild(t),t},n.set=function(t){-1==createjs.indexOf(this._tags,t)&&(this._tags.src=null,this._tags.push(t))},n.toString=function(){return"[TagPool]"},n._createTag=function(){var t=document.createElement("audio");return t.autoplay=!1,t.preload="none",t}}(),this.createjs=this.createjs||{},function(){"use strict";function t(t,e,i,n){this.AbstractSoundInstance_constructor(t,e,i,n),this._audioSpriteStopTime=null,this._delayTimeoutId=null,this._endedHandler=createjs.proxy(this._handleSoundComplete,this),this._readyHandler=createjs.proxy(this._handleTagReady,this),this._stalledHandler=createjs.proxy(this._playFailed,this),this._audioSpriteEndHandler=createjs.proxy(this._handleAudioSpriteLoop,this),this._loopHandler=createjs.proxy(this._handleSoundComplete,this),i?this._audioSpriteStopTime=.001*(e+i):this._duration=createjs.HTMLAudioTagPool.getDuration(this.src)}var e=createjs.extend(t,createjs.AbstractSoundInstance);e.setMasterVolume=function(t){this._updateVolume()},e.setMasterMute=function(t){this._updateVolume()},e.toString=function(){return"[HTMLAudioSoundInstance]"},e._removeLooping=function(){null!=this._playbackResource&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._addLooping=function(){null==this._playbackResource||this._audioSpriteStopTime||(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)},e._handleCleanUp=function(){var t=this._playbackResource;if(null!=t){t.pause(),t.loop=!1,t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),t.removeEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1);try{t.currentTime=this._startTime}catch(e){}createjs.HTMLAudioTagPool.set(this.src,t),this._playbackResource=null}},e._beginPlaying=function(t){return this._playbackResource=createjs.HTMLAudioTagPool.get(this.src),this.AbstractSoundInstance__beginPlaying(t)},e._handleSoundReady=function(t){if(4!==this._playbackResource.readyState){var e=this._playbackResource;return e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),e.addEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),e.preload="auto",void e.load()}this._updateVolume(),this._playbackResource.currentTime=.001*(this._startTime+this._position),this._audioSpriteStopTime?this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1):(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),0!=this._loop&&(this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.loop=!0)),this._playbackResource.play()},e._handleTagReady=function(t){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_READY,this._readyHandler,!1),this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_STALLED,this._stalledHandler,!1),this._handleSoundReady()},e._pause=function(){this._playbackResource.pause()},e._resume=function(){this._playbackResource.play()},e._updateVolume=function(){if(null!=this._playbackResource){var t=this._muted||createjs.Sound._masterMute?0:this._volume*createjs.Sound._masterVolume;t!=this._playbackResource.volume&&(this._playbackResource.volume=t)}},e._calculateCurrentPosition=function(){return 1e3*this._playbackResource.currentTime-this._startTime},e._updatePosition=function(){this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1);try{this._playbackResource.currentTime=.001*(this._position+this._startTime)}catch(t){this._handleSetPositionSeek(null)}},e._handleSetPositionSeek=function(t){null!=this._playbackResource&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._handleSetPositionSeek,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._handleAudioSpriteLoop=function(t){this._playbackResource.currentTime<=this._audioSpriteStopTime||(this._playbackResource.pause(),0==this._loop?this._handleSoundComplete(null):(this._position=0,this._loop--,this._playbackResource.currentTime=.001*this._startTime,this._paused||this._playbackResource.play(),this._sendEvent("loop")))},e._handleLoop=function(t){0==this._loop&&(this._playbackResource.loop=!1,this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_SEEKED,this._loopHandler,!1))},e._updateStartTime=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._updateDuration=function(){this._audioSpriteStopTime=.001*(this._startTime+this._duration),this.playState==createjs.Sound.PLAY_SUCCEEDED&&(this._playbackResource.removeEventListener(createjs.HTMLAudioPlugin._AUDIO_ENDED,this._endedHandler,!1),this._playbackResource.addEventListener(createjs.HTMLAudioPlugin._TIME_UPDATE,this._audioSpriteEndHandler,!1))},e._setDurationFromSource=function(){this._duration=createjs.HTMLAudioTagPool.getDuration(this.src),this._playbackResource=null},createjs.HTMLAudioSoundInstance=createjs.promote(t,"AbstractSoundInstance")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){this.AbstractPlugin_constructor(),this._capabilities=i._capabilities,this._loaderClass=createjs.SoundLoader,this._soundInstanceClass=createjs.HTMLAudioSoundInstance}var e=createjs.extend(t,createjs.AbstractPlugin),i=t;i.MAX_INSTANCES=30,i._AUDIO_READY="canplaythrough",i._AUDIO_ENDED="ended",i._AUDIO_SEEKED="seeked",i._AUDIO_STALLED="stalled",i._TIME_UPDATE="timeupdate",i._capabilities=null,i.isSupported=function(){return i._generateCapabilities(),null!=i._capabilities},i._generateCapabilities=function(){if(null==i._capabilities){var t=document.createElement("audio");if(null==t.canPlayType)return null;i._capabilities={panning:!1,volume:!0,tracks:-1};for(var e=createjs.Sound.SUPPORTED_EXTENSIONS,n=createjs.Sound.EXTENSION_MAP,r=0,a=e.length;a>r;r++){var o=e[r],l=n[o]||o;i._capabilities[o]="no"!=t.canPlayType("audio/"+o)&&""!=t.canPlayType("audio/"+o)||"no"!=t.canPlayType("audio/"+l)&&""!=t.canPlayType("audio/"+l)}}},e.register=function(t){var e=createjs.HTMLAudioTagPool.get(t.src),i=this.AbstractPlugin_register(t);return i.setTag(e),i},e.removeSound=function(t){this.AbstractPlugin_removeSound(t),createjs.HTMLAudioTagPool.remove(t)},e.create=function(t,e,i){var n=this.AbstractPlugin_create(t,e,i);return n.playbackResource=null,n},e.toString=function(){return"[HTMLAudioPlugin]"},e.setVolume=e.getVolume=e.setMute=null,createjs.HTMLAudioPlugin=createjs.promote(t,"AbstractPlugin")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){this.EventDispatcher_constructor(),this.ignoreGlobalPause=!1,this.loop=0,this.useTicks=!1,this.reversed=!1,this.bounce=!1,this.timeScale=1,this.duration=0,this.position=0,this.rawPosition=-1,this._paused=!0,this._next=null,this._prev=null,this._parent=null,this._labels=null,this._labelList=null,t&&(this.useTicks=!!t.useTicks,this.ignoreGlobalPause=!!t.ignoreGlobalPause,this.loop=!0===t.loop?-1:t.loop||0,this.reversed=!!t.reversed,this.bounce=!!t.bounce,this.timeScale=t.timeScale||1,t.onChange&&this.addEventListener("change",t.onChange),t.onComplete&&this.addEventListener("complete",t.onComplete))}var e=createjs.extend(t,createjs.EventDispatcher);e._setPaused=function(t){return createjs.Tween._register(this,t),this},e.setPaused=createjs.deprecate(e._setPaused,"AbstractTween.setPaused"),e._getPaused=function(){return this._paused},e.getPaused=createjs.deprecate(e._getPaused,"AbstactTween.getPaused"),e._getCurrentLabel=function(t){var e=this.getLabels();null==t&&(t=this.position);for(var i=0,n=e.length;n>i&&!(tt&&(t=0),0===r){if(u=!0,-1!==o)return u}else{if(l=t/r|0,c=t-l*r,(u=-1!==a&&t>=a*r+r)&&(t=(c=r)*(l=a)+r),t===o)return u;!this.reversed!=!(this.bounce&&l%2)&&(c=r-c)}this.position=c,this.rawPosition=t,this._updatePosition(i,u),u&&(this.paused=!0),n&&n(this),e||this._runActions(o,t,i,!i&&-1===o),this.dispatchEvent("change"),u&&this.dispatchEvent("complete")},e.calculatePosition=function(t){var e=this.duration,i=this.loop,n=0,r=0;return 0===e?0:(-1!==i&&t>=i*e+e?(r=e,n=i):0>t?r=0:(n=t/e|0,r=t-n*e),!this.reversed!=!(this.bounce&&n%2)?e-r:r)},e.getLabels=function(){var t=this._labelList;if(!t){t=this._labelList=[];var e=this._labels;for(var i in e)t.push({label:i,position:e[i]});t.sort(function(t,e){return t.position-e.position})}return t},e.setLabels=function(t){this._labels=t,this._labelList=null},e.addLabel=function(t,e){this._labels||(this._labels={}),this._labels[t]=e;var i=this._labelList;if(i){for(var n=0,r=i.length;r>n&&!(ed&&(l=c,a=d),r>d&&(o=c,r=d)),i)return this._runActionsRange(l,l,i,n);if(r!==a||o!==l||i||n){-1===r&&(r=o=0);var p=e>=t,f=r;do{var g=!u!=!(h&&f%2),m=f===r?o:p?0:c,v=f===a?l:p?c:0;if(g&&(m=c-m,v=c-v),h&&f!==r&&m===v);else if(this._runActionsRange(m,v,i,n||f!==r&&!h))return!0;n=!1}while(p&&++f<=a||!p&&--f>=a)}}},e._runActionsRange=function(t,e,i,n){},createjs.AbstractTween=createjs.promote(t,"EventDispatcher")}(),this.createjs=this.createjs||{},function(){"use strict";function t(i,n){this.AbstractTween_constructor(n),this.pluginData=null,this.target=i,this.passive=!1,this._stepHead=new e(null,0,0,{},null,!0),this._stepTail=this._stepHead,this._stepPosition=0,this._actionHead=null,this._actionTail=null,this._plugins=null,this._pluginIds=null,this._injected=null,n&&(this.pluginData=n.pluginData,n.override&&t.removeTweens(i)),this.pluginData||(this.pluginData={}),this._init(n)}function e(t,e,i,n,r,a){this.next=null,this.prev=t,this.t=e,this.d=i,this.props=n,this.ease=r,this.passive=a,this.index=t?t.index+1:0}function i(t,e,i,n,r){this.next=null,this.prev=t,this.t=e,this.d=0,this.scope=i,this.funct=n,this.params=r}var n=createjs.extend(t,createjs.AbstractTween);t.IGNORE={},t._tweens=[],t._plugins=null,t._tweenHead=null,t._tweenTail=null,t.get=function(e,i){return new t(e,i)},t.tick=function(e,i){for(var n=t._tweenHead;n;){var r=n._next;i&&!n.ignoreGlobalPause||n._paused||n.advance(n.useTicks?1:e),n=r}},t.handleEvent=function(t){"tick"===t.type&&this.tick(t.delta,t.paused)},t.removeTweens=function(e){if(e.tweenjs_count){for(var i=t._tweenHead;i;){var n=i._next;i.target===e&&t._register(i,!0),i=n}e.tweenjs_count=0}},t.removeAllTweens=function(){for(var e=t._tweenHead;e;){var i=e._next;e._paused=!0,e.target&&(e.target.tweenjs_count=0),e._next=e._prev=null,e=i}t._tweenHead=t._tweenTail=null},t.hasActiveTweens=function(e){return e?!!e.tweenjs_count:!!t._tweenHead},t._installPlugin=function(e){for(var i=e.priority=e.priority||0,n=t._plugins=t._plugins||[],r=0,a=n.length;a>r&&!(i0&&this._addStep(+t,this._stepTail.props,null,e),this},n.to=function(t,e,i){(null==e||0>e)&&(e=0);var n=this._addStep(+e,null,i);return this._appendProps(t,n),this},n.label=function(t){return this.addLabel(t,this.duration),this},n.call=function(t,e,i){return this._addAction(i||this.target,t,e||[this])},n.set=function(t,e){return this._addAction(e||this.target,this._set,[t])},n.play=function(t){return this._addAction(t||this,this._set,[{paused:!1}])},n.pause=function(t){return this._addAction(t||this,this._set,[{paused:!0}])},n.w=n.wait,n.t=n.to,n.c=n.call,n.s=n.set,n.toString=function(){return"[Tween]"},n.clone=function(){throw"Tween can not be cloned."},n._addPlugin=function(t){var e=this._pluginIds||(this._pluginIds={}),i=t.ID;if(i&&!e[i]){e[i]=!0;for(var n=this._plugins||(this._plugins=[]),r=t.priority||0,a=0,o=n.length;o>a;a++)if(r=1?o:a,h)for(var p=0,f=h.length;f>p;p++){var g=h[p].change(this,e,d,r,i,n);if(g===t.IGNORE)continue a;void 0!==g&&(r=g)}this.target[d]=r}}},n._runActionsRange=function(t,e,i,n){var r=t>e,a=r?this._actionTail:this._actionHead,o=e,l=t;r&&(o=t,l=e);for(var c=this.position;a;){var u=a.t;if((u===e||u>l&&o>u||n&&u===t)&&(a.funct.apply(a.scope,a.params),c!==this.position))return!0;a=r?a.prev:a.next}},n._appendProps=function(e,i,n){var r,a,o,l,c,u=this._stepHead.props,h=this.target,d=t._plugins,p=i.prev,f=p.props,g=i.props||(i.props=this._cloneProps(f)),m={};for(r in e)if(e.hasOwnProperty(r)&&(m[r]=g[r]=e[r],void 0===u[r])){if(l=void 0,d){for(a=d.length-1;a>=0;a--)if(void 0!==(o=d[a].init(this,r,l))&&(l=o),l===t.IGNORE){delete g[r],delete m[r];break}}l!==t.IGNORE&&(void 0===l&&(l=h[r]),f[r]=void 0===l?null:l)}for(r in m){o=e[r];for(var v,x=p;(v=x)&&(x=v.prev);)if(x.props!==v.props){if(void 0!==x.props[r])break;x.props[r]=f[r]}}if(!1!==n&&(d=this._plugins))for(a=d.length-1;a>=0;a--)d[a].step(this,i,m);(c=this._injected)&&(this._injected=null,this._appendProps(c,i,!1))},n._injectProp=function(t,e){(this._injected||(this._injected={}))[t]=e},n._addStep=function(t,i,n,r){var a=new e(this._stepTail,this.duration,t,i,n,r||!1);return this.duration+=t,this._stepTail=this._stepTail.next=a},n._addAction=function(t,e,n){var r=new i(this._actionTail,this.duration,t,e,n);return this._actionTail?this._actionTail.next=r:this._actionHead=r,this._actionTail=r,this},n._set=function(t){for(var e in t)this[e]=t[e]},n._cloneProps=function(t){var e={};for(var i in t)e[i]=t[i];return e},createjs.Tween=createjs.promote(t,"AbstractTween")}(),this.createjs=this.createjs||{},function(){"use strict";function t(t){var e,i;t instanceof Array||null==t&&arguments.length>1?(e=t,i=arguments[1],t=arguments[2]):t&&(e=t.tweens,i=t.labels),this.AbstractTween_constructor(t),this.tweens=[],e&&this.addTween.apply(this,e),this.setLabels(i),this._init(t)}var e=createjs.extend(t,createjs.AbstractTween);e.addTween=function(t){t._parent&&t._parent.removeTween(t);var e=arguments.length;if(e>1){for(var i=0;e>i;i++)this.addTween(arguments[i]);return arguments[e-1]}if(0===e)return null;this.tweens.push(t),t._parent=this,t.paused=!0;var n=t.duration;return t.loop>0&&(n*=t.loop+1),n>this.duration&&(this.duration=n),this.rawPosition>=0&&t.setPosition(this.rawPosition),t},e.removeTween=function(t){var e=arguments.length;if(e>1){for(var i=!0,n=0;e>n;n++)i=i&&this.removeTween(arguments[n]);return i}if(0===e)return!0;for(var r=this.tweens,n=r.length;n--;)if(r[n]===t)return r.splice(n,1),t._parent=null,t.duration>=this.duration&&this.updateDuration(),!0;return!1},e.updateDuration=function(){this.duration=0;for(var t=0,e=this.tweens.length;e>t;t++){var i=this.tweens[t],n=i.duration;i.loop>0&&(n*=i.loop+1),n>this.duration&&(this.duration=n)}},e.toString=function(){return"[Timeline]"},e.clone=function(){throw"Timeline can not be cloned."},e._updatePosition=function(t,e){for(var i=this.position,n=0,r=this.tweens.length;r>n;n++)this.tweens[n].setPosition(i,!0,t)},e._runActionsRange=function(t,e,i,n){for(var r=this.position,a=0,o=this.tweens.length;o>a;a++)if(this.tweens[a]._runActions(t,e,i,n),r!==this.position)return!0},createjs.Timeline=createjs.promote(t,"AbstractTween")}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"Ease cannot be instantiated."}t.linear=function(t){return t},t.none=t.linear,t.get=function(t){return -1>t?t=-1:t>1&&(t=1),function(e){return 0==t?e:0>t?e*(-(e*t)+1+t):e*((2-e)*t+(1-t))}},t.getPowIn=function(t){return function(e){return Math.pow(e,t)}},t.getPowOut=function(t){return function(e){return 1-Math.pow(1-e,t)}},t.getPowInOut=function(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}},t.quadIn=t.getPowIn(2),t.quadOut=t.getPowOut(2),t.quadInOut=t.getPowInOut(2),t.cubicIn=t.getPowIn(3),t.cubicOut=t.getPowOut(3),t.cubicInOut=t.getPowInOut(3),t.quartIn=t.getPowIn(4),t.quartOut=t.getPowOut(4),t.quartInOut=t.getPowInOut(4),t.quintIn=t.getPowIn(5),t.quintOut=t.getPowOut(5),t.quintInOut=t.getPowInOut(5),t.sineIn=function(t){return 1-Math.cos(t*Math.PI/2)},t.sineOut=function(t){return Math.sin(t*Math.PI/2)},t.sineInOut=function(t){return -.5*(Math.cos(Math.PI*t)-1)},t.getBackIn=function(t){return function(e){return e*e*((t+1)*e-t)}},t.backIn=t.getBackIn(1.7),t.getBackOut=function(t){return function(e){return--e*e*((t+1)*e+t)+1}},t.backOut=t.getBackOut(1.7),t.getBackInOut=function(t){return t*=1.525,function(e){return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},t.backInOut=t.getBackInOut(1.7),t.circIn=function(t){return-(Math.sqrt(1-t*t)-1)},t.circOut=function(t){return Math.sqrt(1- --t*t)},t.circInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},t.bounceIn=function(e){return 1-t.bounceOut(1-e)},t.bounceOut=function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},t.bounceInOut=function(e){return .5>e?.5*t.bounceIn(2*e):.5*t.bounceOut(2*e-1)+.5},t.getElasticIn=function(t,e){var i=2*Math.PI;return function(n){return 0==n||1==n?n:-(t*Math.pow(2,10*(n-=1))*Math.sin((n-e/i*Math.asin(1/t))*i/e))}},t.elasticIn=t.getElasticIn(1,.3),t.getElasticOut=function(t,e){var i=2*Math.PI;return function(n){return 0==n||1==n?n:t*Math.pow(2,-10*n)*Math.sin((n-e/i*Math.asin(1/t))*i/e)+1}},t.elasticOut=t.getElasticOut(1,.3),t.getElasticInOut=function(t,e){var i=2*Math.PI;return function(n){var r=e/i*Math.asin(1/t);return(n*=2)<1?-.5*(t*Math.pow(2,10*(n-=1))*Math.sin((n-r)*i/e)):t*Math.pow(2,-10*(n-=1))*Math.sin((n-r)*i/e)*.5+1}},t.elasticInOut=t.getElasticInOut(1,.3*1.5),createjs.Ease=t}(),this.createjs=this.createjs||{},function(){"use strict";function t(){throw"MotionGuidePlugin cannot be instantiated."}var e=t;e.priority=0,e.ID="MotionGuide",e.install=function(){return createjs.Tween._installPlugin(t),createjs.Tween.IGNORE},e.init=function(t,i,n){"guide"==i&&t._addPlugin(e)},e.step=function(t,i,n){for(var r in n)if("guide"===r){var a=i.props.guide,o=e._solveGuideData(n.guide,a);a.valid=!o;var l=a.endData;if(t._injectProp("x",l.x),t._injectProp("y",l.y),o||!a.orient)break;var c=void 0===i.prev.props.rotation?t.target.rotation||0:i.prev.props.rotation;if(a.startOffsetRot=c-a.startData.rotation,"fixed"==a.orient)a.endAbsRot=l.rotation+a.startOffsetRot,a.deltaRotation=0;else{var u=void 0===n.rotation?t.target.rotation||0:n.rotation,h=u-a.endData.rotation-a.startOffsetRot,d=h%360;switch(a.endAbsRot=u,a.orient){case"auto":a.deltaRotation=h;break;case"cw":a.deltaRotation=(d+360)%360+360*Math.abs(h/360|0);break;case"ccw":a.deltaRotation=(d-360)%360+-360*Math.abs(h/360|0)}}t._injectProp("rotation",a.endAbsRot)}},e.change=function(t,i,n,r,a,o){var l=i.props.guide;if(l&&i.props!==i.prev.props&&l!==i.prev.props.guide)return"guide"===n&&!l.valid||"x"==n||"y"==n||"rotation"===n&&l.orient?createjs.Tween.IGNORE:void e._ratioToPositionData(a,l,t.target)},e.debug=function(t,i,n){t=t.guide||t;var r=e._findPathProblems(t);if(r&&console.error("MotionGuidePlugin Error found: \n"+r),!i)return r;var a,o=t.path,l=o.length;for(i.save(),i.lineCap="round",i.lineJoin="miter",i.beginPath(),i.moveTo(o[0],o[1]),a=2;l>a;a+=4)i.quadraticCurveTo(o[a],o[a+1],o[a+2],o[a+3]);i.strokeStyle="black",i.lineWidth=4.5,i.stroke(),i.strokeStyle="white",i.lineWidth=3,i.stroke(),i.closePath();var c=n.length;if(n&&c){var u={},h={};e._solveGuideData(t,u);for(var a=0;c>a;a++)u.orient="fixed",e._ratioToPositionData(n[a],u,h),i.beginPath(),i.moveTo(h.x,h.y),i.lineTo(h.x+9*Math.cos(.0174533*h.rotation),h.y+9*Math.sin(.0174533*h.rotation)),i.strokeStyle="black",i.lineWidth=4.5,i.stroke(),i.strokeStyle="red",i.lineWidth=3,i.stroke(),i.closePath()}return i.restore(),r},e._solveGuideData=function(t,i){var n=void 0;if(n=e.debug(t))return n;var r=i.path=t.path;i.orient=t.orient,i.subLines=[],i.totalLength=0,i.startOffsetRot=0,i.deltaRotation=0,i.startData={ratio:0},i.endData={ratio:1},i.animSpan=1;var a,o,l,c,u,h,d,p,f,g=r.length,m={};for(a=r[0],o=r[1],d=2;g>d;d+=4){l=r[d],c=r[d+1],u=r[d+2],h=r[d+3];var v={weightings:[],estLength:0,portion:0},x=a,y=o;for(p=1;10>=p;p++){e._getParamsForCurve(a,o,l,c,u,h,p/10,!1,m);var $=m.x-x,_=m.y-y;f=Math.sqrt($*$+_*_),v.weightings.push(f),v.estLength+=f,x=m.x,y=m.y}for(i.totalLength+=v.estLength,p=0;10>p;p++)f=v.estLength,v.weightings[p]=v.weightings[p]/f;i.subLines.push(v),a=u,o=h}f=i.totalLength;var b=i.subLines.length;for(d=0;b>d;d++)i.subLines[d].portion=i.subLines[d].estLength/f;var T=isNaN(t.start)?0:t.start,w=isNaN(t.end)?1:t.end;e._ratioToPositionData(T,i,i.startData),e._ratioToPositionData(w,i,i.endData),i.startData.ratio=T,i.endData.ratio=w,i.animSpan=i.endData.ratio-i.startData.ratio},e._ratioToPositionData=function(t,i,n){var r,a,o,l,c,u=i.subLines,h=0,d=t*i.animSpan+i.startData.ratio;for(a=u.length,r=0;a>r;r++){if(h+(l=u[r].portion)>=d){c=r;break}h+=l}void 0===c&&(c=a-1,h-=l);var p=u[c].weightings,f=l;for(a=p.length,r=0;a>r&&!(h+(l=p[r]*f)>=d);r++)h+=l;c=4*c+2,o=r/10+(d-h)/l*.1;var g=i.path;return e._getParamsForCurve(g[c-2],g[c-1],g[c],g[c+1],g[c+2],g[c+3],o,i.orient,n),i.orient&&(t>=.99999&&1.00001>=t&&void 0!==i.endAbsRot?n.rotation=i.endAbsRot:n.rotation+=i.startOffsetRot+t*i.deltaRotation),n},e._getParamsForCurve=function(t,e,i,n,r,a,o,l,c){var u=1-o;c.x=u*u*t+2*u*o*i+o*o*r,c.y=u*u*e+2*u*o*n+o*o*a,l&&(c.rotation=57.2957795*Math.atan2((n-e)*u+(a-n)*o,(i-t)*u+(r-i)*o))},e._findPathProblems=function(t){var e=t.path,i=e&&e.length||0;if(6>i||(i-2)%4){var n=" Cannot parse 'path' array due to invalid number of entries in path. ";return n+="There should be an odd number of points, at least 3 points, and 2 entries per point (x & y). ",n+="See 'CanvasRenderingContext2D.quadraticCurveTo' for details as 'path' models a quadratic bezier.\n\n",n+="Only [ "+i+" ] values found. Expected: "+Math.max(4*Math.ceil((i-2)/4)+2,6)}for(var r=0;i>r;r++)if(isNaN(e[r]))return"All data in path array must be numeric";var a=t.start;if(isNaN(a)&&void 0!==a)return"'start' out of bounds. Expected 0 to 1, got: "+a;var o=t.end;if(isNaN(o)&&void 0!==o)return"'end' out of bounds. Expected 0 to 1, got: "+o;var l=t.orient;return l&&"fixed"!=l&&"auto"!=l&&"cw"!=l&&"ccw"!=l?'Invalid orientation value. Expected ["fixed", "auto", "cw", "ccw", undefined], got: '+l:void 0},createjs.MotionGuidePlugin=t}(),this.createjs=this.createjs||{},function(){"use strict";var t=createjs.TweenJS=createjs.TweenJS||{};t.version="1.0.0",t.buildDate="Thu, 12 Oct 2017 16:34:05 GMT"}(),jQuery(document).ready(function(){let t=0;jQuery("#non-tile-area-list li").length>0&&(t=jQuery("#non-tile-area-list li").length),jQuery(document).on("click",".fd-steps-list .fd-step-item.visited .fd-step-link",function(){e(jQuery(this).parent().index())}),jQuery(document).on("click",".remove-non-tile-area-btn",function(){let t=jQuery(this).data("index");jQuery("#non-tile-area-item-"+t).remove()});var e=function(t){t>=0&&jQuery(".fd-steps-list .fd-step-item").length>t&&(jQuery(".fd-steps-list").find(".fd-step-item.active").addClass("visited").removeClass("active"),jQuery(".fd-steps-list .fd-step-item").eq(t).addClass("active"),jQuery(".fd-canvas-steps-list").find(".fd-step-item.active").addClass("visited").removeClass("active"),jQuery(".fd-canvas-steps-list li.fd-step-item").eq(t).addClass("active"))}});var matriz_changed=!1,scale_changed=!1,stage_click=!1,media_limit=1024,unset_color="*Erase",design_name="",custom_tile_container=[],custom_tile_data=[],container_visibility=[],custom_design_imported=!1,fd_cd_id=0,fd_cd_name=0;function validate_browser(){return!(navigator.userAgent.indexOf("MSIE")>-1||navigator.userAgent.indexOf("Trident/")>-1||navigator.userAgent.indexOf("Edge/")>-1)||(jQuery(".msg").html("This tool doesn't support Internet Explorer. Please use a different browser"),jQuery(".alert, .blocker").show(10),jQuery("#application").hide(),!1)}function init_stage(){if(drawing_container=new createjs.Container,null!==stage){stage.autoClear=!0;var t=jQuery(window).width();stage.canvas.width=t>=media_limit?.65*t:t;var e=jQuery(window).height();stage.canvas.height=t>=media_limit?.9*e:400,stage.enableMouseOver(100),(square=new Image).src=data.img.back_square}}function zoom_level_fix(){var t=selected_type.real_points,e=calc_scale(),i=parseFloat(scale.attr("data-previous")),n=parseFloat(scale.attr("step")),r=calc_center(o);if(stage.canvas.height>400&&(n*=-1),!custom_design_imported){for(;i>1&&i<3;){var a=calc_scale_number(i),o=scale_points(t,a,e);if(r=calc_center(o),scale_off_limits(r))break;i+=n}scale.val(i)}scale.change()}function init_actions(){stage.on("stagemousedown",function(t){stage_click=!0}),stage.on("stagemouseup",function(t){stage_click=!1}),jQuery(".fd-room-shape-label").click(function(){if(1==current_stage){jQuery("#fd-loaded-custom-design").attr("loaded","0"),custom_design_imported=!1;var t=jQuery(this).parent().find("input").val();room_type_fields(t),selected_type=data.types[t],init_dimentions(),init_process_vars(),load_step(2),zoom_level_fix(),real_points_reset=JSON.parse(JSON.stringify(selected_type.real_points)),jQuery("#unit_system_metric").click()}}),jQuery(document).on("blur",".non-tile-field",function(){let t=jQuery(this).attr("none_tile_area");"metric"===unit_system||jQuery(this).val(imperial_numbert_to_format(jQuery(this).val())),render_non_tile_area(t,this)}),unit_system_actions(),menu_li_actions(),scale_action(),colors_pattern(),color_selection(),tile_action(),resize_canvas(),none_tile_areas_action(),custom_color_action(),step_skip()}function room_type_fields(t){switch(jQuery(".fd-room-dimension").hide(),t){case"rectangle":jQuery(".fd-rect").show();break;case"tl_l_shape":case"tr_l_shape":case"bl_l_shape":case"br_l_shape":jQuery(".fd-l-shape").show();break;case"l_t_shape":case"t_t_shape":case"b_t_shape":case"r_t_shape":jQuery(".fd-t-shape").show()}}function getTileTypeIndex(t){var e=data.tiles.types,i=0;for(var n in e){if(n==t)return i;i++}}function init_global_vars(){stage=new createjs.Stage("fd-designed-canvas"),canvas_container=new createjs.Container,createjs.Touch.enable(stage),canvas=jQuery("#fd-designed-canvas"),scale=jQuery("#scale"),unit_system=jQuery("#unit_system"),room_size=jQuery(".room_area"),colors=jQuery(".colors"),report=jQuery("#fd-report"),none_tile_areas_container=jQuery("#non-tile-area-list"),edges_type=jQuery(".edges"),edges_colors=jQuery(".edges_colors"),width=jQuery("#width"),height=jQuery("#height")}function init_process_vars(){none_tile_poligons=new createjs.Container,matriz={},edges_and_corners={},selected_type.none_tiles_areas=[],design_name=""}function resizecanvas_action(t){if(t==resize_cont){resize_cont=0;var e=jQuery(window),i=e.width();e.height(),i>=media_limit?jQuery("#unit_system").removeClass("btn-group").addClass("btn-group-vertical"):jQuery("#unit_system").removeClass("btn-group-vertical").addClass("btn-group"),load_step(current_stage),stage.update()}}function step_skip(){jQuery(".step_skip").click(function(){var t=jQuery(this).attr("data-step");load_step(t)})}function custom_color_action(){jQuery("#custom_design").click(function(){jQuery("#pattern_container").ddslick("select",{index:"0"}),jQuery("#color-primary").ddslick("select",{index:"0"}),jQuery("#color-custom").ddslick("select",{index:"5"}),load_step(5)})}function layers_reload(t){create_matrix(t),fill_edges_and_corners(t)}function resize_canvas(){resize_cont=0,jQuery(window).resize(function(){setTimeout(resizecanvas_action,500,++resize_cont)}),resizecanvas_action(0)}function getDesignData(){return JSON.stringify({selected_type:selected_type,primary_tile:jQuery("#tile-primary input[type='radio']:checked").attr("id"),primary_color:jQuery("#color-primary input[type='radio']:checked").attr("id"),matriz:matriz_data,edges_and_corners:edges_and_corners,current_stage:current_stage,previous_stage:previous_stage,scale:scale.val(),scale_previous:scale.attr("data-previous"),custom_tile_data:custom_tile_data,unit_system:jQuery("#unit_system input[type='radio']:checked").val()})}function getDesignImage(){return document.getElementById("fd-designed-canvas").toDataURL()}function unit_system_actions(){var t=jQuery("#unit_system input[type='radio']");t.click(function(){unit_system=jQuery(this).val(),void 0!=selected_type&&init_dimentions()}),t[0].click()}function init_dimentions(){var t=data.defaul_dimentions,e=[width,height];for(var i in e){var n=e[i];n.value=t[unit_system].measure,n.min=t[unit_system].min,n.max=t[unit_system].max,n.step=t[unit_system].step}layers_reload(!0),draw_with_drag_layer()}function colors_pattern(){var t=data.patterns;for(var e in t)t[e]}function color_selection(){var t=data.tiles.colors.tiles,e=Object.keys(t).sort();for(var i in color_images={},e){var n=t[e[i]];if(void 0!==n&&!n.startsWith("#")){var r=new Image;r.src=n,color_images[n]=r}}jQuery("#color-primary, #color-secondary, #color-custom, #edges-color, #corners-color").each(function(){var t=jQuery(this);t.attr("id"),t.find(".dd-option").each(function(){var t=jQuery(this),e=t.children(".dd-option-value").val(),i=t.find(".dd-option-image").css("border","2px solid").css("border-radius","8px");e.startsWith("#")?i.css("background-color",e):i.css("background-image","url('img/colors/"+e+"')")})});var a=data.tiles.edges;for(var o in a)a[o]}function hide_not_available_colors(t,e){var i=e.find("option");for(var n in t){var r=t[n];i.filter("[color='"+r+"']").hide().addClass("not_available")}e.each(function(){var t=jQuery(this),e=t.val();if(void 0!=e&&t.find(".color_container[value='"+e+"']").hasClass("not_available")){var i=colors.children().not(".not_available").first().val();t.val(i).change()}})}function normal_load_action(){clear_stage(),draw_layer_cero(),stage.update()}function tile_action(){var t=data.tiles.types;for(var e in jQuery(".tile"),tile_images={},t){var i=t[e],n=new Image;n.src=i.pattern,tile_images[e]=n}jQuery(document).on("click",".fd-primary-tile-color input[type='radio']",function(){"tile-custom"!=jQuery(this).parent().parent().parent().attr("id").replace("color","tile")&&layers_reload(!1),normal_load_action()}),jQuery(document).on("click","#tile-primary input[type='radio']",function(){let t=jQuery(this).attr("data-groupproductid");t&&toggle_products_display(t),tile_update()}),jQuery(document).on("click","#tile-custom input[type='radio']",function(){let t=jQuery(this).attr("data-groupproductid");t&&toggle_products_display(t),tile_update()})}function toggle_products_display(t){t&&(jQuery(".fd-ptc-item, .fd-ctc-item").hide(),jQuery(`.fd-ptc-item-${t}, .fd-ctc-item-${t}`).show(),jQuery(`.fd-ptc-item-${t} input[type='radio']:first`).prop("checked",!0),jQuery(`.fd-ctc-item-${t} input[type='radio']:first`).prop("checked",!0))}function tile_update(){var t=jQuery(this).parent().parent().parent().attr("id");void 0==t&&(t="tile-primary"),"tile-custom"!=t&&layers_reload(!0),normal_load_action()}function get_not_available_color_values(t){var e=[],i=data.tiles.colors;for(var n in t){var r=t[n];e.push(i[r])}return e}function format_number_measure(t,e){if("metric"===unit_system)return e?parseInt(100*t)+" cm":parseFloat(t).toFixed(3)+" m";var i=parseInt(t),n=parseInt(12*(t-i));return e?12*i+n+'"':i+"'"+n+'"'}function none_tile_areas_action(){jQuery("#none_tile_area_add").click(function(){selected_type.none_tiles_areas.push(none_tile_areas_create()),normal_load_action()})}function clear_stage(){canvas_container.removeAllChildren()}function scale_change(t,e){scale.attr("data-previous",e),scale.val(t),scale_action_change()}function scale_action(){jQuery(".zoom-step").click(function(){custom_design_imported=!1;var t=jQuery(this).attr("step");t=parseFloat(t);var e=scale.val();e=parseFloat(e),scale_change(e+t,e)}),jQuery(".workspace_measure").on("change blur",function(){if(void 0!=selected_type){jQuery(this).attr("length")&&"1"==jQuery(this).attr("length")&&("x"==jQuery(this).attr("axis")?width.val(jQuery(this).val()):"y"==jQuery(this).attr("axis")&&height.val(jQuery(this).val()));var t=get_units(),e=data.defaul_dimentions.imperial.max,i=calc_scale();if(t.width&&t.height&&t.width<=e&&t.height<=e){var n=jQuery(this).attr("start"),r=jQuery(this).attr("finish"),a=jQuery(this).val(),o=0,l=0,c=selected_type.real_points,u=calc_center(c),h={};if(jQuery(this).attr("length")&&"1"!=jQuery(this).attr("length")){a="metric"===unit_system?calc_meters("to",a):get_unit_imperial(a);var d=parseFloat(a)*i,p=0;for(var f in parseFloat(r)>parseFloat(n)?(o=d-(parseFloat(r)-parseFloat(n)),l=d-(parseFloat(r)-parseFloat(n)),p=parseFloat(n)):(o=d-(parseFloat(n)-parseFloat(r)),l=d-(parseFloat(n)-parseFloat(r)),p=parseFloat(r)),c){var g=c[f],m={x:"x"==jQuery(this).attr("axis")&&pstage.canvas.height-e||t.width>stage.canvas.width-e}function scale_points(t,e,i){var n={};for(var r in t){var a=t[r],o={x:a.x/i*e,y:a.y/i*e};n[r]=o}return n}function get_units(){var t=width.val(),e=height.val();return"metric"===unit_system?(t=calc_meters("to",t),e=calc_meters("to",e)):(t=get_unit_imperial(t),e=get_unit_imperial(e)),{width:parseFloat(t),height:parseFloat(e)}}function get_unit_imperial(t){return isNumber(t)||(t=imperial_format_to_decimal(t)),t}function load_step(t){previous_stage=current_stage,(current_stage=t)!=previous_stage&&(1==current_stage?(jQuery(".fd-canvas .fd-designed-home").show(),jQuery(".fd-canvas .fd-wrapper").hide(),jQuery(".fd-steps-buttons").css("display","none")):(jQuery(".fd-canvas .fd-wrapper").show(),jQuery(".fd-canvas .fd-designed-home").hide(),jQuery(".fd-steps-buttons").css("display","flex")),current_stage||(current_stage=1),window["load_stage_"+current_stage](),select_menu())}function select_menu(){jQuery("li.fd-step-item").removeClass("active"),jQuery("[step='"+current_stage+"']").addClass("active")}function menu_li_actions(){jQuery("li .fd-step-link, .fd-step-info").click(function(){let t=jQuery(this).parent().attr("step");return step_validation(t)}),jQuery(".move_step").click(function(){let t=jQuery(this).attr("step-move"),e=parseInt(current_stage)+parseInt(t);saveDesignToLocalStorage(),load_step(e)})}function saveDesignToLocalStorage(){localStorage.setItem("selected_type",JSON.stringify(selected_type)),localStorage.setItem("primary_tile",jQuery("#tile-primary input[type='radio']:checked").attr("id")),localStorage.setItem("primary_color",jQuery("#color-primary input[type='radio']:checked").attr("id")),localStorage.setItem("matriz",JSON.stringify(matriz_data)),localStorage.setItem("edges_and_corners",JSON.stringify(edges_and_corners)),localStorage.setItem("current_stage",current_stage),localStorage.setItem("previous_stage",previous_stage),localStorage.setItem("scale",scale.val()),localStorage.setItem("scale_previous",scale.attr("data-previous")),localStorage.setItem("custom_tile_data",JSON.stringify(custom_tile_data)),localStorage.setItem("unit_system",jQuery("#unit_system input[type='radio']:checked").val())}function loadDesignFromoLocalStorage(){selected_type=JSON.parse(localStorage.getItem("selected_type")),edges_and_corners=JSON.parse(localStorage.getItem("edges_and_corners")),scale.val(localStorage.getItem("scale")),scale.attr("data-previous",localStorage.getItem("scale_previous")),matriz_data=JSON.parse(localStorage.getItem("matriz")),custom_tile_data=JSON.parse(localStorage.getItem("custom_tile_data")),scale_changed=!0,custom_design_imported=!0,jQuery("#"+localStorage.getItem("primary_tile")).attr("checked",!0),jQuery("#"+localStorage.getItem("primary_color")).attr("checked",!0),matriz_changed=!0,none_tile_poligons=new createjs.Container,current_stage=parseInt(localStorage.getItem("current_stage")),previous_stage=parseInt(localStorage.getItem("previous_stage")),room_type_fields(selected_type.type),current_stage!=previous_stage&&(1==current_stage?(jQuery(".fd-canvas .fd-designed-home").show(),jQuery(".fd-canvas .fd-wrapper").hide(),jQuery(".fd-steps-buttons").css("display","none")):(jQuery(".fd-canvas .fd-wrapper").show(),jQuery(".fd-canvas .fd-designed-home").hide(),jQuery(".fd-steps-buttons").css("display","flex")),load_step(current_stage),zoom_level_fix(),select_menu()),jQuery("#unit_system_"+localStorage.getItem("unit_system")).click(),scale_action_change()}function step_validation(t){return 1!=current_stage?(load_step(t),saveDesignToLocalStorage(),!0):(jQuery(".msg").html("Warning!
Please select a room shape to begin"),jQuery(".alert, .blocker").show(10),!1)}function draw_layer_drag(){var t,e=selected_type.drags["step"+current_stage],i=new createjs.Container;if(void 0!=e){var n=selected_type.real_points,r=data.margin,a=e.buttons,o=[];for(var l in a){var c=a[l],u=c.points,h=null,d=!0,p=[],f=[];for(var g in u){var m=n[g];if(null==h)h=m,p.push(g),f.push(n[g]);else if(h.x>=m.x-20&&h.x<=m.x+20&&h.y>=m.y-20&&h.y<=m.y+20)p.push(g),f.push(n[g]);else{d=!1;break}}if(d){var v={x:"max_x",y:"max_y"};switch(c.type){case"inner_0-90":case"outter_0-90":v.x="min_x";break;case"inner_90-180":case"outter_90-180":v.y="min_y",v.x="min_x";break;case"inner_180-270":case"outter_180-270":v.y="min_y"}var x=calc_center(f);for(var y in v.x=x[v.x],v.y=x[v.y],p)n[p[y]]=jQuery.extend({},v);o=o.concat(p);var $=pluginUrl+"img/drag_buttons/"+c.type+".png",_={x:0,y:0};switch(c.type){case"outter_0-90":case"inner_0-90":_.y-=26;break;case"inner_180-270":_.x-=26;break;case"inner_270-360":_.x-=26,_.y-=26}(t=new Image).points=u,t.base=h,t.desface=_,t.src=$,t.onload=function(t){var e=t.target,n=new createjs.Bitmap(e);n.x=e.base.x+r+e.desface.x,n.y=e.base.y+r+e.desface.y,n.on("pressup",function(t){drag_points_shoot(e.points,selected_type.real_points),layers_reload(!1),draw_with_drag_layer()}),n.addEventListener("mouseover",function(t){canvas.addClass("clickable")}),n.addEventListener("mouseout",function(t){canvas.removeClass("clickable")}),i.addChild(n),stage.update()}}}var b=e.points;for(var T in drag_measures=new createjs.Container,data.factor,b)if(-1==o.indexOf(T)){var w=b[T];w.measures;var E=get_type_img(w.type);(t=new Image).drag=w,t.src=E,t.onload=function(t){var e=t.target,a=e.drag,o=new createjs.Bitmap(e),l=n[a.location.points[0]],c=get_gap(e.height);o.x=l.x+r+c.x,o.y=l.y+r+c.y,o.desface=c,o.scaleX=.06,o.scaleY=.06,o.addEventListener("mouseover",function(t){createjs.Touch.enable(stage);var e=t.currentTarget;e.scaleX=.065,e.scaleY=.065,stage.update()}),o.addEventListener("mouseout",function(t){var e=t.currentTarget;e.scaleX=.06,e.scaleY=.06,stage.update()}),o.on("pressup",function(t){createjs.Touch.disable(stage),drag_measures.removeAllChildren(),draw_with_drag_layer()}),o.on("pressmove",function(t){var e=t.target,i=e.desface,n=a.type,o={x:t.stageX,y:t.stageY};if(drag_in_limits(a.limits,o)){switch(n){case"x":e.x=o.x+i.x;break;case"y":e.y=o.y+i.y;break;case"xy":e.x=o.x+i.x,e.y=o.y+i.y}var l=a.points,c=selected_type.real_points;for(var u in l){var h=l[u];for(var d in h){var p=h[d];c[u][p]=o[p]-r}}drag_measure(a,c),layers_reload(!1),draw_with_drag_layer()}}),i.addChild(o),stage.update()}}}return i}jQuery(document).ready(function(){validate_browser()&&(init_global_vars(),init_stage(),init_actions(),load_step(1),null!==localStorage.getItem("selected_type")&&jQuery("#fd-designed-canvas").length>0&&jQuery(".fd-floor-shape-item .fd-designed-home").append("
"))});var wm=new createjs.Shape;function draw_watermark(){var t=new Image;t.src=watermarkUrl,t.onload=function(){stage.removeChild(wm),wm.graphics.clear().beginBitmapFill(t),wm.graphics.drawRect(0,0,stage.canvas.width,stage.canvas.height),stage.addChild(wm),stage.update()}}function drag_points_shoot(t,e){var i=calc_scale();for(var n in t){var r=t[n],a=e[n];a[r.axis]+=i*r.distance}}function drag_measure(t,e){drag_measures.removeAllChildren();var i=calc_scale(),n=t.measures,r=data.margin;for(var a in n)if(n.hasOwnProperty(a)){var o=n[a],l=o.axis,c=e[o.start][l],u=Math.abs(e[o.finish][l]-c),h=new createjs.Text(format_measure(u/i),data.text.drag.font,data.text.drag.color),d=e[o.location.point];h.x=d.x+r,h.y=d.y+r,drag_measure_gap(h,o.location.position),drag_measures.addChild(h)}}function drag_measure_gap(t,e){var i=t.getBounds();switch(e){case"left_over":t.x-=i.width+5,t.y-=i.height+5;break;case"left_under":t.x-=i.width+5,t.y+=5;break;case"right_over":t.x+=5,t.y-=i.height+5;break;default:t.x+=5,t.y+=5}}function get_gap(t){var e={x:0,y:0};switch(location.position){case"center":e.x-=t/2,e.y-=t/2;break;case"over":e.x-=t/4,e.y-=t;break;case"right":e.y-=t/4;break;case"under":e.x-=t/4;break;case"left":e.x-=t,e.y-=t/4}return e}function get_type_img(t){var e="";switch(t){case"x":e+=data.img.right_arrow;break;case"y":e+=data.img.down_arrow;break;case"xy":e+=data.img.diagonal_arrow}return e}function drag_in_limits(t,e){var i=!0,n=data.margin,r=selected_type.real_points;if(e.x>=n&&e.y>=n&&e.x<=stage.canvas.width-n&&e.y<=stage.canvas.height-n){for(var a in t)if(t.hasOwnProperty(a)){var o=t[a],l=r[o.point][o.axis];switch(o.not){case"under":i=!(e[o.axis]-n<=l);break;case"over":i=!(e[o.axis]-n>=l);break;case"both":i=!0}if(!i)break}}else i=!1;return i}function none_tile_areas_create(){var t=2*calc_scale(),e=data.none_tile_area.points,i={points:[],measures:!1};for(var n in e){var r=e[n],a={x:r.x*t,y:r.y*t};i.points.push(a)}return i}function draw_none_tile_areas(){none_tile_poligons.removeAllChildren();var t=selected_type.none_tiles_areas,e=data.margin;for(var i in none_tile_poligons.x=e,none_tile_poligons.y=e,none_tile_areas_container.empty(),t){var n=t[i];if(n&&n.points&&void 0!==n.points[0]){var r=draw_none_tile_poligon(n);if(r.figure=n,4==current_stage){if(n.measures){var a=calc_center(n.points),o=calc_scale(),l=new createjs.Text(format_measure(a.width/o),data.text.measures.font,data.text.measures.color);width_bounds=l.getBounds(),l.x=a.max_x-width_bounds.width,l.y=a.max_y+5,none_tile_poligons.addChild(l);var c=new createjs.Text(format_measure(a.height/o),data.text.measures.font,data.text.measures.color);height_bounds=c.getBounds(),c.x=a.max_x+5,c.y=a.max_y-height_bounds.height,none_tile_poligons.addChild(c)}var u=data.none_tile_area.drags,h=get_type_img("xy"),d=new Image;d.drag=u,d.figure=n,d.src=h,d.onload=function(t){var i=t.target,n=i.drag,r=i.figure,a=new createjs.Bitmap(i),o=n.location,l=r.points[o.points[0]],c=get_gap(i.height);a.x=l.x+c.x,a.y=l.y+c.y,a.desface=c,a.scaleX=.06,a.scaleY=.06,a.addEventListener("mouseover",function(t){createjs.Touch.enable(stage);var e=t.currentTarget;e.scaleX=.065,e.scaleY=.065,stage.update()}),a.addEventListener("mouseout",function(t){var e=t.currentTarget;e.scaleX=.06,e.scaleY=.06,stage.update()}),a.on("pressup",function(t){createjs.Touch.disable(stage),r.measures=!1,drag_measures.removeAllChildren(),normal_load_action()});var u=draw_selectd_type_real_points("rgba(255,255,255,1)");a.on("pressmove",function(t){var i=t.target,a=i.desface;n.type;var o={x:t.stageX,y:t.stageY},l=n.points,c=r.points,h=calc_center(c);h.min_x+=e,h.max_x+=e,h.min_y+=e,h.max_y+=e;var d={};for(var p in l){var f=l[p];for(var g in f){var m=f[g];void 0==d[p]&&(d[p]={}),d[p][m]=o[m]}}var v=calc_center(d);if(u.hitTest(v.max_x,v.min_y)&&u.hitTest(v.max_x,v.max_y)&&u.hitTest(v.min_x,v.max_y)){for(var p in i.x=o.x+a.x,i.y=o.y+a.y,l){var f=l[p];for(var g in f){var m=f[g];c[p][m]=o[m]-e}}r.measures=!0,draw_none_tile_areas(),stage.update()}}),none_tile_poligons.addChild(a),stage.update()}}r.on("mouseover",function(t){createjs.Touch.enable(stage)}),r.on("pressup",function(t){createjs.Touch.disable(stage)}),r.on("pressmove",function(t){if(4==current_stage){var i=t.currentTarget,n={x:t.stageX-e,y:t.stageY-e},r=draw_selectd_type_real_points("rgba(255,255,255,1)"),a=i.figure;t.stageX,t.stageY;var o=calc_center(a.points),l={0:{x:n.x+o.width,y:n.y},1:{x:n.x+o.width,y:n.y+o.height},2:{x:n.x,y:n.y+o.height},3:{x:n.x,y:n.y}},c=!0;for(var u in l){var h=l[u];if(!r.hitTest(h.x+e,h.y+e)){c=!1;break}}c&&(a.points=l,draw_none_tile_areas(),stage.update())}}),none_tile_poligons.addChild(r),none_tile_areas_container.append(create_none_tile_div(i))}}none_tile_area_remove()}function draw_none_tile_poligon(t){var e=new createjs.Shape,i=e.graphics,n=t.points,r=n[0],a={};for(var o in i.beginStroke(data.colors.none_tile_border),i.beginFill(data.colors.none_tile_fill),n){var l=n[o],c=l.x,u=l.y;a[o]={x:c,y:u},i.lineTo(c+0,u+0)}return i.lineTo(r.x+0,r.y+0),t.points=a,e}function none_tile_area_remove(){none_tile_areas_container.find(".btn-remove").click(function(){var t=jQuery(this).parent().attr("none_tile_area");selected_type.none_tiles_areas.splice(t,1),normal_load_action()})}function render_non_tile_area(t){var e=calc_scale();let i,n,r,a;"metric"===unit_system?(i=parseFloat(calc_meters("to",jQuery("#non_tile_top_"+t).val()))*e,n=parseFloat(calc_meters("to",jQuery("#non_tile_left_"+t).val()))*e,r=parseFloat(calc_meters("to",jQuery("#non_tile_width_"+t).val()))*e,a=parseFloat(calc_meters("to",jQuery("#non_tile_height_"+t).val()))*e):(i=parseFloat(get_unit_imperial(imperial_format_to_decimal(jQuery("#non_tile_top_"+t).val())))*e,n=parseFloat(get_unit_imperial(imperial_format_to_decimal(jQuery("#non_tile_left_"+t).val())))*e,r=parseFloat(get_unit_imperial(imperial_format_to_decimal(jQuery("#non_tile_width_"+t).val())))*e,a=parseFloat(get_unit_imperial(imperial_format_to_decimal(jQuery("#non_tile_height_"+t).val())))*e),selected_type.none_tiles_areas[t].points=[{x:n+r,y:i},{x:n+r,y:i+a},{x:n,y:i+a},{x:n,y:i}],normal_load_action()}function create_none_tile_div(t){var e=calc_scale(),i=jQuery("
  • ").addClass("none_tile_area_element lineal fd-list").attr("id","none_tile_area_"+t).attr("none_tile_area",t),n=jQuery("
    ").addClass("fd-field-group fd-col-6"),r=jQuery("
    ").addClass("fd-field-group fd-col-6"),a=jQuery("
    ").addClass("fd-field-group fd-col-6"),o=jQuery("
    ").addClass("fd-field-group fd-col-6"),l=selected_type.none_tiles_areas[t].points,c=calc_center(l),u={};for(point_position in l){var h=l[point_position];u[point_position]={x:h.x-c.min_x,y:h.y-c.min_y}}a.append(jQuery("