hexsha
string
size
int64
ext
string
lang
string
max_stars_repo_path
string
max_stars_repo_name
string
max_stars_repo_head_hexsha
string
max_stars_repo_licenses
list
max_stars_count
int64
max_stars_repo_stars_event_min_datetime
string
max_stars_repo_stars_event_max_datetime
string
max_issues_repo_path
string
max_issues_repo_name
string
max_issues_repo_head_hexsha
string
max_issues_repo_licenses
list
max_issues_count
int64
max_issues_repo_issues_event_min_datetime
string
max_issues_repo_issues_event_max_datetime
string
max_forks_repo_path
string
max_forks_repo_name
string
max_forks_repo_head_hexsha
string
max_forks_repo_licenses
list
max_forks_count
int64
max_forks_repo_forks_event_min_datetime
string
max_forks_repo_forks_event_max_datetime
string
content
string
avg_line_length
float64
max_line_length
int64
alphanum_fraction
float64
8c0f1c173f26d29a9b231ea15d5fbf253817c545
406
js
JavaScript
test/compare-screen.js
jshighbasic/jshighbasic-test-lab
05777a668916ab4f805b96f3d0120b275a841de2
[ "MIT" ]
2
2022-02-28T03:34:58.000Z
2022-03-03T03:40:26.000Z
test/compare-screen.js
jshighbasic/jshighbasic-test-lab
05777a668916ab4f805b96f3d0120b275a841de2
[ "MIT" ]
null
null
null
test/compare-screen.js
jshighbasic/jshighbasic-test-lab
05777a668916ab4f805b96f3d0120b275a841de2
[ "MIT" ]
null
null
null
function resized(){ var width = window.innerWidth; if(width<660){ $(".line").css("display","none"); $("#c1").css("position", "static"); $("#c2").css("position", "static"); $("#c1").css("transform", "translate(0,0)"); $("#c1").css("width", "100%"); $("#c2").css("transform", "translate(0,0)"); $("#c2").css("width", "100%"); } }
33.833333
53
0.445813
8c0f20702a2ec1e80d395430a3fc43de6fcd001e
251,456
js
JavaScript
assets/html5/flexjsstage3d/bin/js-release/TestEngine3D.js
matrix3d/matrix3d.github.io
67b03e7679adc169a1b1338c2468078766cb578b
[ "MIT" ]
1
2019-04-11T05:10:55.000Z
2019-04-11T05:10:55.000Z
assets/html5/flexjsstage3d/bin/js-release/TestEngine3D.js
matrix3d/matrix3d.github.io
67b03e7679adc169a1b1338c2468078766cb578b
[ "MIT" ]
34
2019-02-21T11:06:11.000Z
2022-01-26T07:07:52.000Z
assets/html5/flexjsstage3d/bin/js-release/TestEngine3D.js
matrix3d/matrix3d.github.io
67b03e7679adc169a1b1338c2468078766cb578b
[ "MIT" ]
1
2016-03-30T00:42:33.000Z
2016-03-30T00:42:33.000Z
'use strict';var aa='',ba='\t',ca='\t//',ea='\n',fa=' ',ga=' bias: ',ha=' bits: ',ia=' opt: ',ja=' emit argcode\x3d',la=' emit sampler',ma=' (',na=' \x3d ',oa=' offset\x3d',qa=' out of bounds [0, ..., 3]',ra=' out of bounds. [0..255]',ta='", emitCode\x3d',va='", flag\x3d"',wa='", longName\x3d"',xa='", mask\x3d',ya='", numRegister\x3d',za='(',Ba='(a\x3d',Ca='(redMultiplier\x3d',Fa='(x\x3d',Ga=')',Ia=') index exceeds limit of ',Ja=') only allowed in fragment programs.',Ka=') only allowed in vertex programs.', La=') relative adressing not allowed in fragment programs.',Ma=').',Na=');',Pa='*',Qa='+',Ra=',',Sa=', ',Ta=', alphaMultiplier\x3d',Ua=', alphaOffset\x3d',Va=', b\x3d',Wa=', blueMultiplier\x3d',Xa=', blueOffset\x3d',Ya=', c\x3d',Za=', d\x3d',$a=', emitCode\x3d',ab=', flags\x3d',bb=', greenMultiplier\x3d',cb=', greenOffset\x3d',db=', h\x3d',eb=', range\x3d',fb=', redOffset\x3d',gb=', tx\x3d',hb=', ty\x3d',ib=', w\x3d',jb=', y\x3d',lb=',0,1)',mb=',\x3c',nb='-',ob='.',pb='/',rb='//',sb='1/',tb='2d', ub='3d',vb=':',wb=': ',xb=';',yb=';\n',zb='\x3d\x3d idx\x3d',Ab='\x3d\x3d sel\x3d',Bb='\x3e',Cb='ATF',Db='Disposed',Eb='Error, Column ',Fb='EventDispatcher',Gb='IEventDispatcher',Hb='IS REL',Ib='JOINT',Jb='RELATIVE: type\x3d',Kb='SpriteFlexjs',Lb='TEXTURE',Mb='TestEngine3D',Nb='Type Coercion failed',Ob='Vector3D(',Pb='[',Qb='[OpCode name\x3d"',Rb='[Register name\x3d"',Sb='[Sampler name\x3d"',Ub='[object Array]',Vb='[object Function]',Wb='[object Window]',Xb=']',Yb='][',Zb='__enterFrame',$b='__mouseevent', ac='__update',bc='a',cc='abs',dc='absolute',ec='add',fc='addedToStage',gc='alpha',hc='always',ic='anisotropic16x',jc='anisotropic2x',kc='anisotropic4x',lc='anisotropic8x',mc='array',nc='as3Shader.AGALByteCreator',oc='as3Shader.AGALByteCreator.OpCode',pc='as3Shader.AGALByteCreator.Register',qc='as3Shader.AGALByteCreator.Sampler',rc='as3Shader.AGALCodeCreator',sc='as3Shader.AS3Shader',tc='as3Shader.Creator',uc='as3Shader.GLCodeCreator',vc='as3Shader.NativeOp',wc='attribute ',xc='attribute vec2 va0;attribute vec4 va1;attribute vec2 va2;varying vec4 vColor;varying vec2 vUV;uniform mat4 vc0;uniform mat4 vc4;void main(void) {vColor\x3dva1;vUV\x3d(vc4*vec4(va2,0.0,1.0)).xy;gl_Position \x3dvc0*vec4(va0, 0.0,1.0);}', yc='attribute vec2 va0;attribute vec4 va1;varying vec4 vColor;uniform mat4 vc0;void main(void) {vColor\x3dva1;gl_Position \x3dvc0*vec4(va0, 0.0,1.0);}',zc='axisAngle',Ac='back',Bc='baseline',Cc='baselineConstrained',Dc='baselineExtended',Ec='bat new index',Fc='bat new pos',Gc='bgra',Hc='bigEndian',Ic='bindAmbientUniform',Jc='bindCameraPosUniform',Kc='bindDiffSampler',Lc='bindJointsBuff',Mc='bindJointsMatrixUniform',Nc='bindJointsQuatUniform',Oc='bindLightColorUniform',Pc='bindLightColorVar',Qc='bindLightPosUniform', Rc='bindLightShadowCameraWorld',Sc='bindLightmapSampler',Tc='bindMaterialColorUniform',Uc='bindModelUniform',Vc='bindNormBuff',Wc='bindNormalmapSampler',Xc='bindPerspectiveUniform',Yc='bindPixelSizeUniform',Zc='bindPosBuff',$c='bindRandomBuff',ad='bindReflectSampler',bd='bindShadowmapsSampler',cd='bindSpecularUniform',dd='bindSphereRandomBuff',ed='bindTangentBuff',fd='bindTargetPositionBuff',gd='bindTerrainsSampler',hd='bindTextureSizeUniform',id='bindTimeUniform',jd='bindUV2Buff',kd='bindUVBuff', ld='bindUVMulAddUniform',md='bindViewUniform',nd='bindWeightsBuff',od='bindWireframeColorUniform',pd='bindWorld2localUniform',qd='bjoints',rd='bnorm',sd='boolean',td='bpos',ud='brandom',vd='bsrandom',wd='btangent',xd='btp',yd='buv',zd='buv2',Ad='bweights',Bd='bytes4',Cd='c',Dd='call',Ed='canvas',Fd='canvas_keyevent',Gd='canvas_mouseevent',Hd='canvas_touchevent',Id='centroid',Jd='clamp',Kd='clamp(',Ld='clamp_u_repeat_v',Md='click',Nd='com.adobe.utils.PerspectiveMatrix3D',Od='compressed',Pd='compressedAlpha', Qd='consts',Rd='consts index',Sd='context3DCreate',Td='contextMenu',Ud='contextmenu',Vd='cos',Wd='cross',Xd='crs',Yd='cube',Zd='dblclick',$d='ddx',ae='ddy',be='destinationAlpha',ce='destinationColor',de='div',ee='dot',fe='doubleClick',ge='dp3',he='dp4',ie='dxt1',je='dxt5',ke='eif',le='els',me='emit opcode\x3d',ne='enterFrame',oe='equal',pe='error',qe='error: bad index register',re='error: could not find register name for operand ',se='error: index offset ',te='error: opcode is only allowed in fragment programs.', ue='error: opcode is only allowed in vertex programs.',ve='error: opcode requires version 2.',we='error: register operand ',xe='error: relative can not be destination',ye='error: too many opcodes. maximum is 2048.',ze='eulerAngles',Ae='evenOdd',Be='event',Ce='exp',De='experimental-webgl',Ee='f',Fe='fc',Ge='flash.__native.BaseRenderer',He='flash.__native.BitmapTexture',Ie='flash.__native.GLCanvasPattern',Je='flash.__native.GLCanvasRenderingContext2D',Ke='flash.__native.GLDrawable',Le='flash.__native.GLGraphicsPath', Me='flash.__native.GLIndexBufferSet',Ne='flash.__native.GLPath2D',Oe='flash.__native.GLVertexBufferSet',Pe='flash.__native.IRenderer',Qe='flash.__native.MemArray',Re='flash.__native.WebGLRenderer',Se='flash.display.BitmapData',Te='flash.display.BlendMode',Ue='flash.display.DisplayObject',Ve='flash.display.DisplayObjectContainer',We='flash.display.GradientType',Xe='flash.display.Graphics',Ye='flash.display.GraphicsBitmapFill',Ze='flash.display.GraphicsEndFill',$e='flash.display.GraphicsGradientFill', af='flash.display.GraphicsPath',bf='flash.display.GraphicsPathCommand',cf='flash.display.GraphicsSolidFill',df='flash.display.GraphicsStroke',ef='flash.display.GraphicsTrianglePath',ff='flash.display.InteractiveObject',gf='flash.display.LoaderInfo',hf='flash.display.Sprite',jf='flash.display.Stage',kf='flash.display.Stage3D',lf='flash.display3D.Context3D',mf='flash.display3D.Context3DBlendFactor',nf='flash.display3D.Context3DCompareMode',of='flash.display3D.Context3DProfile',pf='flash.display3D.Context3DProgramType', qf='flash.display3D.Context3DRenderMode',rf='flash.display3D.Context3DTextureFormat',sf='flash.display3D.Context3DTriangleFace',tf='flash.display3D.Context3DVertexBufferFormat',uf='flash.display3D.IndexBuffer3D',vf='flash.display3D.Program3D',wf='flash.display3D.VertexBuffer3D',xf='flash.display3D.textures.CubeTexture',yf='flash.display3D.textures.RectangleTexture',zf='flash.display3D.textures.Texture',Af='flash.display3D.textures.TextureBase',Bf='flash.display3D.textures.VideoTexture',Cf='flash.events.ErrorEvent', Df='flash.events.Event',Ef='flash.events.EventDispatcher',Ff='flash.events.KeyboardEvent',Gf='flash.events.MouseEvent',Hf='flash.events.TextEvent',If='flash.events.TouchEvent',Jf='flash.geom.ColorTransform',Kf='flash.geom.Matrix',Lf='flash.geom.Matrix3D',Mf='flash.geom.Orientation3D',Nf='flash.geom.Point',Of='flash.geom.Rectangle',Pf='flash.geom.Transform',Qf='flash.geom.Vector3D',Rf='flash.media.Camera',Sf='flash.system.Capabilities',Tf='flash.utils.ByteArray',Uf='flash.utils.Dictionary',Vf='flash.utils.Endian', Wf='flash.utils.Proxy',Xf='float1',Yf='float2',Zf='float3',$f='float4',ag='fo',bg='fract',cg='fragment',dg='fragment constant',eg='fragment output',fg='fragment temporary',gg='frc',hg='front',ig='frontAndBack',jg='fs',kg='ft',lg='fullScreen',mg='function',ng='gl3d.core.Camera3D',og='gl3d.core.Drawable',pg='gl3d.core.IndexBufferSet',qg='gl3d.core.Light',rg='gl3d.core.Material',sg='gl3d.core.MaterialBase',tg='gl3d.core.Node3D',ug='gl3d.core.ProgramSet',vg='gl3d.core.TextureSet',wg='gl3d.core.VertexBufferSet', xg='gl3d.core.View3D',yg='gl3d.core.renders.GL',zg='gl3d.core.renders.Render',Ag='gl3d.core.renders.Stage3DRender',Bg='gl3d.core.shaders.GLAS3Shader',Cg='gl3d.core.shaders.GLBinder',Dg='gl3d.core.shaders.GLShader',Eg='gl3d.meshs.Meshs',Fg='gl3d.meshs.Teapot',Gg='gl3d.pick.AS3Picking',Hg='gl3d.pick.Picking',Ig='gl3d.shaders.PhongFragmentShader',Jg='gl3d.shaders.PhongGLShader',Kg='gl3d.shaders.PhongVertexShader',Lg='gl3d.util.MathUtil',Mg='gl3d.util.Matrix3DUtils',Ng='gl_FragColor',Og='gl_Position', Pg='greater',Qg='greaterEqual',Rg='i_add',Sg='i_div',Tg='i_max',Ug='i_min',Vg='i_mul',Wg='i_pow',Xg='i_sub',Yg='ife',Zg='ifg',$g='ifl',ah='ignoresampler',bh='ine',ch='init',dh='instance',eh='inversesqrt',fh='joint',gh='keyDown',hh='keyUp',ih='keydown',jh='keypress',kh='keyup',lh='kil',mh='layer',nh='less',oh='lessEqual',ph='light',qh='linear',rh='littleEndian',sh='log',th='m33',uh='m34',vh='m44',wh='mat',xh='max',yh='min',zh='miplinear',Ah='mipnearest',Bh='mipnone',Ch='mouseDown',Dh='mouseMove',Eh= 'mouseOut',Fh='mouseOver',Gh='mouseUp',Hh='mouseWheel',Ih='mousedown',Jh='mouseenter',Kh='mouseleave',Lh='mousemove',Mh='mouseout',Nh='mouseover',Oh='mouseup',Ph='mousewheel',Qh='mov',Rh='mul',Sh='multiply',Th='native code',Uh='nearest',Vh='neg',Wh='never',Xh='no imp',Yh='no-repeat',Zh='nomip',$h='none',ai='norm',bi='normal',ci='normalize',di='notEqual',ei='nrm',fi='null',gi='number',hi='object',ii='oc',ji='on',ki='one',li='oneMinusDestinationAlpha',mi='oneMinusDestinationColor',ni='oneMinusSourceAlpha', oi='oneMinusSourceColor',pi='op',qi='org.apache.flex.events.EventDispatcher',ri='org.apache.flex.utils.Language',si='org.apache.flex.utils.Proxy',ti='pad',ui='pos',vi='pow',wi='precision lowp float;varying vec4 vColor;varying vec2 vUV;uniform sampler2D fs0;void main(void) {gl_FragColor \x3d texture2D(fs0,vUV)*vColor;}',xi='precision lowp float;varying vec4 vColor;void main(void) {gl_FragColor \x3d vColor;}',yi='precision mediump float;\n',zi='px',Ai='quaternion',Bi='rcp',Ci='removedFromStage',Di= 'repeat',Ei='repeat_u_clamp_v',Fi='resize',Gi='rgb',Hi='rgba',Ii='rgba(',Ji='rgbaHalfFloat',Ki='rollOver',Li='round',Mi='rsq',Ni='s',Oi='sampler2D',Pi='sat',Qi='scene',Ri='sdiff',Si='seq',Ti='sge',Ui='sgn',Vi='shadowend',Wi='shadowstart',Xi='sin',Yi='single',Zi='slightmap',$i='slt',aj='sne',bj='snormlmap',cj='sourceAlpha',dj='sourceColor',ej='splice',fj='spriteflexjs',gj='sqrt',hj='sqt',ij='sreflect',jj='sshadowmap',kj='stage3Ds_error',lj='stage_context3dCreate',mj='stage_resize',nj='standard',oj= 'standardConstrained',pj='sterrain',qj='stopImmediatePropagation',rj='string',sj='sub',tj='t',uj='ted',vj='tex',wj='texture sampler',xj='textureReady',yj='top',zj='touchBegin',Aj='touchEnd',Bj='touchMove',Cj='touchcancel',Dj='touchend',Ej='touchmove',Fj='touchstart',Gj='tripath',Hj='uambient',Ij='ucamerapos',Jj='ujointsmatrix',Kj='ujointsquat',Lj='ulightCameraWorld',Mj='ulightcolor',Nj='ulightpos',Oj='ulightvar',Pj='umaterialcolor',Qj='umodel',Rj='uniform ',Sj='uperspective',Tj='upixelsize',Uj='uspecular', Vj='utexturesize',Wj='utf-8',Xj='utime',Yj='uv',Zj='uview',ak='uvmuladd',bk='uwireframecolor',ck='uworld2local',dk='v',ek='va',fk='var ',gk='varying',hk='varying ',ik='vc',jk='vec4',kk='vertex',lk='vertex attribute',mk='vertex constant',nk='vertex output',ok='vertex temporary',pk='vi',qk='video',rk='visible',sk='vo',tk='void main(){\n',uk='vt',vk='vt_textureReady',wk='w',xk='warning: bad line ',yk='webgl',zk='weight',Ak='window',Bk='window_resize',Ck='wrap',Dk='x',Ek='xyz',Fk='y',Gk='zero',Hk='}'; function h(){return function(){}}function k(a){return function(b){this[a]=b}}function m(a){return function(){return this[a]}}function p(a){return function(){return a}}var q,Ik=this; function Jk(a){var b=typeof a;if(b==hi)if(a){if(a instanceof Array)return mc;if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c==Wb)return hi;if(c==Ub||typeof a.length==gi&&'undefined'!=typeof a.splice&&'undefined'!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(ej))return mc;if(c==Vb||'undefined'!=typeof a.call&&'undefined'!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(Dd))return mg}else return fi;else if(b==mg&&'undefined'==typeof a.call)return hi;return b} var Kk='closure_uid_'+(1E9*Math.random()>>>0),Lk=0;function Mk(a,b,c){return a.call.apply(a.bind,arguments)}function Nk(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}} function Ok(a,b,c){Ok=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf(Th)?Mk:Nk;return Ok.apply(null,arguments)}function r(a,b){var c=a.split(ob),d=Ik;c[0]in d||!d.execScript||d.execScript(fk+c[0]);for(var e;c.length&&(e=c.shift());)c.length||void 0===b?d=d[e]?d[e]:d[e]={}:d[e]=b} function Pk(a,b){function c(){}c.prototype=b.prototype;a.Z=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.Lm=function(a,c,f){for(var g=Array(arguments.length-2),l=2;l<arguments.length;l++)g[l-2]=arguments[l];return b.prototype[c].apply(a,g)}};function Qk(){}var Rk,Sk,Tk=[],Uk=String.fromCharCode(0);function w(a,b,c){c='undefined'!==typeof c?c:null;b=x(a,b);if(!b&&void 0!==c&&c)throw a=TypeError?new TypeError(Nb):Error(Nb),a;return b?a:null}r('org.apache.flex.utils.Language.as',w);function Vk(a){return a>>0}r('org.apache.flex.utils.Language._int',Vk); function x(a,b){var c;if(null==a||null==b)return!1;if(a instanceof b||b===Object)return!0;if(typeof a===rj)return b===String;if(typeof a===gi)return b===Number;if(typeof a===sd)return b===Boolean;if(b===Array)return Array.isArray(a);if(void 0===a.g)return!1;if(a.g.ja&&Wk(a,b))return!0;c=a.constructor;if(c=c.Z)for(;c&&c.g;){if(c.g.ja&&Wk(c,b))return!0;c=c.constructor;c=c.Z}return!1}r('org.apache.flex.utils.Language.is',x); function Wk(a,b){var c,d;d=a.g.ja;for(c=d.length-1;-1<c;c--)if(d[c]===b||d[c].prototype.g.ja&&Wk(d[c].prototype,b))return!0;return!1}Qk.prototype.Vh=function(a){return typeof a===mg&&a.prototype&&a.prototype.constructor===a};Qk.prototype.isClass=Qk.prototype.Vh;Qk.prototype.Gj=function(a){return this.Vh(a)?a:null};Qk.prototype.asClass=Qk.prototype.Gj;r('org.apache.flex.utils.Language.postdecrement',function(a,b){var c=a[b];a[b]=c-1;return c}); r('org.apache.flex.utils.Language.postincrement',function(a,b){var c=a[b];a[b]=c+1;return c});r('org.apache.flex.utils.Language.predecrement',function(a,b){var c=a[b]-1;return a[b]=c});r('org.apache.flex.utils.Language.preincrement',function(a,b){var c=a[b]+1;return a[b]=c});function Xk(a,b,c){a=a.Z;for(var d=Object.getOwnPropertyDescriptor(a,c);null==d;)a=a.constructor,a=a.Z,d=Object.getOwnPropertyDescriptor(a,c);return d.get.call(b)}r('org.apache.flex.utils.Language.superGetter',Xk); function Yk(a,b,c,d){a=a.Z;for(var e=Object.getOwnPropertyDescriptor(a,c);null==e;)a=a.constructor,a=a.Z,e=Object.getOwnPropertyDescriptor(a,c);e.set.apply(b,[d])}r('org.apache.flex.utils.Language.superSetter',Yk);function Zk(a){a=Array.prototype.slice.call(arguments,0);var b;b=Ik.console;void 0===b&&('undefined'!==typeof window?b=window.console:'undefined'!==typeof console&&(b=console));try{b&&b.log&&b.log.apply(b,a)}catch(c){}}r('org.apache.flex.utils.Language.trace',Zk); r('org.apache.flex.utils.Language.uint',function(a){return a>>>0});function y(a,b,c){if(b.hasOwnProperty(c))return b[c];a=Ok(a,b);Object.defineProperty(b,c,{value:a});return a}r('org.apache.flex.utils.Language.closure',y);r('org.apache.flex.utils.Language.sortOn',function(a,b,c){c='undefined'!==typeof c?c:0;x(b,Array)?Rk=w(b,Array):(Tk[0]=b,Rk=Tk);if(x(c,Array)){b=0;for(var d in c)b|=c[d]}else b=w(c,Number);Sk=0<(2&b)?-1:1;b&16?a.sort($k):b&1?a.sort(al):a.sort(bl)}); function al(a,b){var c=Rk,d;for(d in c){var e=c[d],e=(a[e]||Uk).toString().toLowerCase().localeCompare((b[e]||Uk).toString().toLowerCase());if(0!=e)return e*Sk}return 0}function bl(a,b){var c=Rk,d;for(d in c){var e=c[d],e=(a[e]||Uk).toString().localeCompare((b[e]||Uk).toString());if(0!=e)return e*Sk}return 0}function $k(a,b){var c=Rk,d;for(d in c){var e=c[d];if(a[e]>b[e])return Sk;if(a[e]<b[e])return-Sk}return 0}Qk.prototype.g={names:[{name:'Language',h:ri}]};r(ri,Qk);function cl(){}cl.prototype.qb=p(null);cl.prototype.createPath=cl.prototype.qb;cl.prototype.Sa=p(null);cl.prototype.getCssColor=cl.prototype.Sa;cl.prototype.dc=h();cl.prototype.renderGraphics=cl.prototype.dc;cl.prototype.lb=h();cl.prototype.renderImage=cl.prototype.lb;cl.prototype.Oc=h();cl.prototype.renderText=cl.prototype.Oc;cl.prototype.finish=h();cl.prototype.finish=cl.prototype.finish;cl.prototype.start=h();cl.prototype.start=cl.prototype.start;cl.prototype.g={names:[{name:'IRenderer',h:Pe}]}; r(Pe,cl);function dl(){}dl.prototype.G=h();dl.prototype.aa=h();dl.prototype.g={names:[{name:'IGraphicsData',h:'flash.display.IGraphicsData'}]};function el(){}el.prototype.g={names:[{name:'IGraphicsFill',h:'flash.display.IGraphicsFill'}]};function fl(a,b,c,d){this.bitmapData='undefined'!==typeof a?a:null;this.matrix='undefined'!==typeof b?b:null;this.repeat='undefined'!==typeof c?c:!0;this.smooth='undefined'!==typeof d?d:!1}fl.prototype.G=function(a){null==this.pattern&&this.bitmapData&&(this.pattern=a.createPattern(this.bitmapData.image,this.repeat?Di:Yh));a.fillStyle=this.pattern};fl.prototype.draw=fl.prototype.G; fl.prototype.aa=function(a){null==this.pattern&&this.bitmapData&&(this.pattern=a.createPattern(this.bitmapData.image,this.repeat?Di:Yh));a.fillStyleIsImage=!0;a.fillStyle=this.pattern};fl.prototype.gldraw=fl.prototype.aa;fl.prototype.g={names:[{name:'GraphicsBitmapFill',h:Ye}],ja:[el,dl]};r(Ye,fl);function gl(a,b){this.x='undefined'!==typeof a?a:0;this.y='undefined'!==typeof b?b:0}r('flash.geom.Point.interpolate',function(a,b,c){return new gl(b.x+c*(a.x-b.x),b.y+c*(a.y-b.y))});r('flash.geom.Point.distance',function(a,b){return a.bb(b).length});r('flash.geom.Point.polar',function(a,b){return new gl(a*Math.cos(b),a*Math.sin(b))});gl.prototype.clone=function(){return new gl(this.x,this.y)};gl.prototype.clone=gl.prototype.clone;gl.prototype.offset=function(a,b){this.x+=a;this.y+=b}; gl.prototype.offset=gl.prototype.offset;gl.prototype.Bc=function(a){return a.x===this.x&&a.y===this.y};gl.prototype.equals=gl.prototype.Bc;gl.prototype.bb=function(a){return new gl(this.x-a.x,this.y-a.y)};gl.prototype.subtract=gl.prototype.bb;gl.prototype.add=function(a){return new gl(this.x+a.x,this.y+a.y)};gl.prototype.add=gl.prototype.add;gl.prototype.normalize=function(a){var b=this.length;0<b&&(b=a/b,this.x*=b,this.y*=b)};gl.prototype.normalize=gl.prototype.normalize; gl.prototype.toString=function(){return Fa+this.x+jb+this.y+Ga};gl.prototype.toString=gl.prototype.toString;gl.prototype.J=function(a){this.x=a.x;this.y=a.y};gl.prototype.copyFrom=gl.prototype.J;gl.prototype.qa=function(a,b){this.x=a;this.y=b};gl.prototype.setTo=gl.prototype.qa;Object.defineProperties(gl.prototype,{length:{get:function(){return Math.sqrt(this.x*this.x+this.y*this.y)}}});gl.prototype.g={names:[{name:'Point',h:Nf}]};r(Nf,gl);function z(a,b,c,d,e,f){this.a='undefined'!==typeof a?a:1;this.b='undefined'!==typeof b?b:0;this.c='undefined'!==typeof c?c:0;this.d='undefined'!==typeof d?d:1;this.tx='undefined'!==typeof e?e:0;this.ty='undefined'!==typeof f?f:0}z.prototype.clone=function(){return new z(this.a,this.b,this.c,this.d,this.tx,this.ty)};z.prototype.clone=z.prototype.clone; z.prototype.concat=function(a){this.xa=this.a;this.a=this.a*a.a+this.b*a.c;this.b=this.xa*a.b+this.b*a.d;this.xa=this.c;this.c=this.c*a.a+this.d*a.c;this.d=this.xa*a.b+this.d*a.d;this.xa=this.tx;this.tx=this.tx*a.a+this.ty*a.c+a.tx;this.ty=this.xa*a.b+this.ty*a.d+a.ty};z.prototype.concat=z.prototype.concat; z.prototype.Ta=function(){if(0===this.b&&0===this.c)this.a=1/this.a,this.d=1/this.d,this.tx*=-this.a,this.ty*=-this.d;else{var a=this.a*this.d-this.b*this.c;0===a?(this.a=this.d=1,this.tx=this.ty=this.b=this.c=0):(a=1/a,this.xa=this.a,this.zf=this.b,this.Af=this.c,this.wm=this.d,this.a=this.wm*a,this.b=-this.zf*a,this.c=-this.Af*a,this.d=this.xa*a,this.xa=-(this.b*this.tx+this.d*this.ty),this.tx=-(this.a*this.tx+this.c*this.ty),this.ty=this.xa)}};z.prototype.invert=z.prototype.Ta; z.prototype.Wb=function(){this.a=this.d=1;this.tx=this.ty=this.b=this.c=0};z.prototype.identity=z.prototype.Wb;z.prototype.vh=function(a,b,c){c='undefined'!==typeof c?c:0;var d=Math.cos(c);c=Math.sin(c);this.a=d*a;this.b=c*b;this.c=-c*a;this.d=d*b};z.prototype.createBox=z.prototype.vh;z.prototype.Wj=function(a,b,c){this.vh(a/1638.4,b/1638.4,'undefined'!==typeof c?c:0)};z.prototype.createGradientBox=z.prototype.Wj; z.prototype.rotate=function(a){var b=Math.cos(a);a=Math.sin(a);this.xa=this.a;this.zf=this.c;this.Af=this.tx;this.a=b*this.a-a*this.b;this.b=a*this.xa+b*this.b;this.c=b*this.c-a*this.d;this.d=a*this.zf+b*this.d;this.tx=b*this.tx-a*this.ty;this.ty=a*this.Af+b*this.ty};z.prototype.rotate=z.prototype.rotate;z.prototype.translate=function(a,b){this.tx+=a;this.ty+=b};z.prototype.translate=z.prototype.translate; z.prototype.scale=function(a,b){this.a*=a;this.b*=b;this.c*=a;this.d*=b;this.tx*=a;this.ty*=b};z.prototype.scale=z.prototype.scale;z.prototype.ak=function(a){return new gl(this.a*a.x+this.c*a.y,this.d*a.y+this.b*a.x)};z.prototype.deltaTransformPoint=z.prototype.ak;z.prototype.Uc=function(a){return new gl(this.a*a.x+this.c*a.y+this.tx,this.d*a.y+this.b*a.x+this.ty)};z.prototype.transformPoint=z.prototype.Uc; z.prototype.toString=function(){return Ba+this.a+Va+this.b+Ya+this.c+Za+this.d+gb+this.tx+hb+this.ty+Ga};z.prototype.toString=z.prototype.toString;z.prototype.J=function(a){this.a=a.a;this.b=a.b;this.c=a.c;this.d=a.d;this.tx=a.tx;this.ty=a.ty};z.prototype.copyFrom=z.prototype.J;z.prototype.qa=function(a,b,c,d,e,f){this.a=a;this.b=b;this.c=c;this.d=d;this.tx=e;this.ty=f};z.prototype.setTo=z.prototype.qa; z.prototype.ve=function(a,b){switch(a){case 0:break;case 1:b.x=this.b;b.y=this.d;b.z=this.ty;break;case 2:case 3:b.x=0;b.y=0;b.z=1;break;default:b.x=this.a,b.y=this.c,b.z=this.tx}};z.prototype.copyRowTo=z.prototype.ve;z.prototype.A=function(a,b){switch(a){case 0:break;case 1:b.x=this.c;b.y=this.d;b.z=0;break;case 2:case 3:b.x=this.tx;b.y=this.ty;b.z=1;break;default:b.x=this.a,b.y=this.b,b.z=0}};z.prototype.copyColumnTo=z.prototype.A; z.prototype.ua=function(a,b){switch(a){case 0:break;case 1:case 2:this.b=b.x;this.d=b.y;this.ty=b.z;break;default:this.a=b.x,this.c=b.y,this.tx=b.z}};z.prototype.copyRowFrom=z.prototype.ua;z.prototype.Y=function(a,b){switch(a){case 0:break;case 1:case 2:this.b=b.x;this.d=b.y;this.ty=b.z;break;default:this.a=b.x,this.c=b.y,this.tx=b.z}};z.prototype.copyColumnFrom=z.prototype.Y;z.prototype.g={names:[{name:'Matrix',h:Kf}]};r(Kf,z);function hl(){this._worldMatrix=new z}hl.prototype.G=function(a,b){if(this.fill){if(x(this.fill,fl)){var c=w(this.fill,fl);if(c.matrix)var d=c.matrix;a.globalAlpha=b.alphaMultiplier}else a.globalAlpha=1;d&&(a.save(),a.transform(d.a,d.b,d.c,d.d,d.tx,d.ty));a.fill();d&&a.restore()}};hl.prototype.draw=hl.prototype.G;hl.prototype.aa=function(a){if(this.fill){var b=this.fill.matrix;b?this._worldMatrix.J(b):this._worldMatrix.Wb();b=a.matr;a.Hi(this._worldMatrix);a.fill();a.matr=b}}; hl.prototype.gldraw=hl.prototype.aa;hl.prototype.g={names:[{name:'GraphicsEndFill',h:Ze}],ja:[el,dl]};r(Ze,hl);function il(){}r('flash.display.GraphicsPathCommand.NO_OP',0);r('flash.display.GraphicsPathCommand.MOVE_TO',1);r('flash.display.GraphicsPathCommand.LINE_TO',2);r('flash.display.GraphicsPathCommand.CURVE_TO',3);r('flash.display.GraphicsPathCommand.WIDE_MOVE_TO',4);r('flash.display.GraphicsPathCommand.WIDE_LINE_TO',5);r('flash.display.GraphicsPathCommand.CUBIC_CURVE_TO',6);r('flash.display.GraphicsPathCommand.ARC',7);r('flash.display.GraphicsPathCommand.CLOSE_PATH',8); r('flash.display.GraphicsPathCommand.DRAW_TRIANGLES',9);il.prototype.g={names:[{name:'GraphicsPathCommand',h:bf}]};r(bf,il);function jl(){}jl.prototype.g={names:[{name:'IGraphicsPath',h:'flash.display.IGraphicsPath'}]};function B(a,b,c){this.commands=[];this.data=[];this.tris=[];this.commands='undefined'!==typeof a?a:null;this.data='undefined'!==typeof b?b:null;null==this.commands&&(this.commands=[]);null==this.data&&(this.data=[]);this.qg='undefined'!==typeof c?c:Ae}B.prototype.xd=!0;B.prototype.gpuPath2DDirty=B.prototype.xd;B.prototype.clear=function(){this.commands.length=0;this.data.length=0;this.tris.length=0};B.prototype.clear=B.prototype.clear; B.prototype.moveTo=function(a,b){this.commands.push(1);this.data.push(a,b)};B.prototype.moveTo=B.prototype.moveTo;B.prototype.lineTo=function(a,b){this.commands.push(2);this.data.push(a,b)};B.prototype.lineTo=B.prototype.lineTo;B.prototype.ea=function(a,b,c,d){this.commands.push(3);this.data.push(a,b,c,d)};B.prototype.curveTo=B.prototype.ea;B.prototype.va=function(a,b,c,d,e,f){this.commands.push(6);this.data.push(a,b,c,d,e,f)};B.prototype.cubicCurveTo=B.prototype.va; B.prototype.Qf=function(a,b){this.commands.push(5);this.data.push(0,0,a,b)};B.prototype.wideLineTo=B.prototype.Qf;B.prototype.Rf=function(a,b){this.commands.push(4);this.data.push(0,0,a,b)};B.prototype.wideMoveTo=B.prototype.Rf;B.prototype.arc=function(a,b,c,d,e){this.commands.push(7);this.data.push(a,b,c,d,e)};B.prototype.arc=B.prototype.arc; B.prototype.G=function(a){if(this.commands.length){a.beginPath();for(var b=0,c=0,d=this.commands.length,e=0;e<d;e++)switch(this.commands[e]){case 1:a.moveTo(this.data[b++],this.data[b++]);break;case 2:a.lineTo(this.data[b++],this.data[b++]);break;case 3:a.quadraticCurveTo(this.data[b++],this.data[b++],this.data[b++],this.data[b++]);break;case 6:a.bezierCurveTo(this.data[b++],this.data[b++],this.data[b++],this.data[b++],this.data[b++],this.data[b++]);break;case 4:b+=2;a.moveTo(this.data[b++],this.data[b++]); break;case 5:b+=2;a.lineTo(this.data[b++],this.data[b++]);break;case 7:a.arc(this.data[b++],this.data[b++],this.data[b++],this.data[b++],this.data[b++]);break;case 9:for(var f=this.tris[c++],g=a,l=f[0],f=f[1],n=f.length,t=0;t<n;){var u=f[t++],v=f[t++],G=f[t++],E=l[2*u],u=l[2*u+1],A=l[2*v],v=l[2*v+1],K=l[2*G],G=l[2*G+1];g.moveTo(E,u);g.lineTo(A,v);g.lineTo(K,G);g.lineTo(E,u)}break;case 8:a.closePath()}}};B.prototype.draw=B.prototype.G;B.prototype.aa=function(a,b){a.Ac(this,b)};B.prototype.gldraw=B.prototype.aa; B.prototype.closePath=function(){this.commands.push(8)};B.prototype.closePath=B.prototype.closePath;B.prototype.na=function(a,b,c){this.tris.push([a,b,c]);this.commands.push(9)};B.prototype.drawTriangles=B.prototype.na;Object.defineProperties(B.prototype,{winding:{get:m('qg'),set:k('qg')}});B.prototype.g={names:[{name:'GraphicsPath',h:af}],ja:[jl,dl]};r(af,B);function kl(){this.Ub=new hl}Pk(kl,cl);kl.prototype.Sa=function(a,b,c){return Ii+((a>>16&255)*c.redMultiplier+c.redOffset>>0)+Ra+((a>>8&255)*c.greenMultiplier+c.greenOffset>>0)+Ra+((a&255)*c.greenMultiplier+c.greenOffset>>0)+Ra+(b*c.alphaMultiplier+c.alphaOffset)+Ga};kl.prototype.getCssColor=kl.prototype.Sa;kl.prototype.qb=function(){return new B};kl.prototype.createPath=kl.prototype.qb; kl.prototype.dc=function(a,b,c,d,e){a.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty);a.globalCompositeOperation=d;c=b.graphicsData.length;for(d=0;d<c;d++)b.graphicsData[d].G(a,e);b.lastFill&&(this.Ub.fill=b.lastFill,this.Ub.G(a,e));b.lastStroke&&a.stroke();a.fillStyle=null;a.strokeStyle=null};kl.prototype.renderGraphics=kl.prototype.dc;kl.prototype.lb=function(a,b,c,d,e){a.globalAlpha=e.alphaMultiplier;a.globalCompositeOperation=d;a.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty);a.drawImage(b.image,0,0)}; kl.prototype.renderImage=kl.prototype.lb;kl.prototype.Oc=function(a,b,c,d,e,f,g,l){a.globalAlpha=f.alphaMultiplier;a.globalCompositeOperation=e;a.setTransform(d.a,d.b,d.c,d.d,d.tx,d.ty);a.font=c.Xj;a.fillStyle=c.Yj;a.textBaseline=yj;a.fillText(b,g,l)};kl.prototype.renderText=kl.prototype.Oc;kl.prototype.g={names:[{name:'BaseRenderer',h:Ge}]};r(Ge,kl);function ll(){}var ml,nl,ol=0;r('SpriteFlexjs.startTime',ol);r('SpriteFlexjs.debug',!1);r('SpriteFlexjs.wmode','direct');var pl=new kl;r('SpriteFlexjs.renderer',pl);var ql=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(a){setTimeout(a,1E3/60)};r('SpriteFlexjs.requestAnimationFrame',ql);ll.prototype.g={names:[{name:Kb,h:Kb}]};r(Kb,ll);function rl(){}rl.prototype.g={names:[{name:'BitmapTexture',h:He}]};r(He,rl);function sl(a,b){this.repetition=b;this.image=a}sl.prototype.g={names:[{name:'GLCanvasPattern',h:Ie}]};r(Ie,sl);function tl(a,b){this.usage=b;this.data=a}tl.prototype.N=!0;tl.prototype.dirty=tl.prototype.N; tl.prototype.wb=function(a){null==this.buff&&(this.buff=a.Pb(this.data.length),this.buff.gl.bindBuffer(this.buff.gl.ELEMENT_ARRAY_BUFFER,this.buff.buff),this.buff.gl.bufferData(this.buff.gl.ELEMENT_ARRAY_BUFFER,this.data,this.usage),this.N=!1);this.N&&(this.buff.gl.bindBuffer(this.buff.gl.ELEMENT_ARRAY_BUFFER,this.buff.buff),this.buff.gl.bufferSubData(this.buff.gl.ELEMENT_ARRAY_BUFFER,0,this.data),this.N=!1);return this.buff};tl.prototype.getBuff=tl.prototype.wb; tl.prototype.g={names:[{name:'GLIndexBufferSet',h:Me}]};r(Me,tl);function ul(a,b,c){this.usage=c;this.data32PerVertex=b;this.data=a}ul.prototype.N=!0;ul.prototype.dirty=ul.prototype.N; ul.prototype.wb=function(a){null==this.buff&&(this.buff=a.Rb(this.data.length/this.data32PerVertex,this.data32PerVertex),this.buff.gl.bindBuffer(this.buff.gl.ARRAY_BUFFER,this.buff.buff),this.buff.gl.bufferData(this.buff.gl.ARRAY_BUFFER,this.data,this.usage),this.N=!1);this.N&&(this.buff.gl.bindBuffer(this.buff.gl.ARRAY_BUFFER,this.buff.buff),this.buff.gl.bufferSubData(this.buff.gl.ARRAY_BUFFER,0,this.data),this.N=!1);return this.buff};ul.prototype.getBuff=ul.prototype.wb; ul.prototype.g={names:[{name:'GLVertexBufferSet',h:Oe}]};r(Oe,ul);function vl(a,b,c,d){this.usage=d;this.pos=new ul(a,2,d);this.uv=new ul(b,2,d);this.index=new tl(c,d)}vl.prototype.ac=-1;vl.prototype.numTriangles=vl.prototype.ac;Object.defineProperties(vl.prototype,{color:{get:function(){if(null==this.cd||this.cd.data.length!=this.pos.data.length/2)this.cd=new ul(new Uint32Array(this.pos.data.length/2),4,this.usage);return this.cd},set:k('cd')}});vl.prototype.g={names:[{name:'GLDrawable',h:Ke}]};r(Ke,vl);function wl(){this.matr=new z} Object.defineProperties(wl.prototype,{drawable:{get:function(){if(this.path.xd){this.path.xd=!1;for(var a=this.path.polys,b=0,c=0,d=this.path.polys.length,e=0;e<d;e++){var f=this.path.polys.array[e].length,b=b+f;6<=f&&(c+=3*(f/2-2))}for(var g=this.path.tris.length,l=!1,e=0;e<g;e++)f=this.path.tris[e],b+=f[0].length,c+=f[1].length,f[2]&&(l=!0);if(null==this.pos||this.pos.length!=b)this.pos=new Float32Array(b);if(null==this.index||this.index.length!=c)this.index=new Uint16Array(c);!l||null!=this.uv&& this.uv.length==b||(this.uv=new Float32Array(b));for(var n=c=b=0,e=0;e<d;e++){for(var t=a.array[e],f=t.length,u=f/2,f=0;f<u;f++){var v=t.array[2*f],G=t.array[2*f+1];this.pos[c++]=v;this.pos[c++]=G;2<=f&&(this.index[n++]=b,this.index[n++]=b+f-1,this.index[n++]=b+f)}b+=f}for(e=0;e<g;e++){f=this.path.tris[e];a=f[0];d=f[1];t=f[2];u=a.length;for(f=0;f<u;f++)this.pos[c]=a[f],t&&(this.uv[c]=t[f]),c++;u=d.length;for(f=0;f<u;f++)this.index[n++]=b+d[f];b+=a.length/2}null==this._drawable?this._drawable=new vl(this.pos, this.pos,this.index,WebGLRenderingContext.STATIC_DRAW):(this._drawable.pos.data=this.pos,this._drawable.uv.data=l?this.uv:this.pos,this._drawable.index.data=this.index,this._drawable.pos.N=!0,this._drawable.uv.N=!0,this._drawable.index.N=!0)}return this._drawable}}});wl.prototype.g={names:[{name:'GLPath2D',h:Ne}]};r(Ne,wl);function C(a,b,c,d){this.x='undefined'!==typeof a?a:0;this.y='undefined'!==typeof b?b:0;this.width='undefined'!==typeof c?c:0;this.height='undefined'!==typeof d?d:0}C.prototype.clone=function(){return new C(this.x,this.y,this.width,this.height)};C.prototype.clone=C.prototype.clone;C.prototype.xb=function(){return 0>=this.width||0>=this.height};C.prototype.isEmpty=C.prototype.xb;C.prototype.sf=function(){this.height=this.width=this.y=this.x=0};C.prototype.setEmpty=C.prototype.sf; C.prototype.Se=function(a,b){this.x-=a;this.width+=2*a;this.y-=b;this.height+=2*b};C.prototype.inflate=C.prototype.Se;C.prototype.el=function(a){this.x-=a.x;this.width+=2*a.x;this.y-=a.y;this.height+=2*a.y};C.prototype.inflatePoint=C.prototype.el;C.prototype.offset=function(a,b){this.x+=a;this.y+=b};C.prototype.offset=C.prototype.offset;C.prototype.Bl=function(a){this.x+=a.x;this.y+=a.y};C.prototype.offsetPoint=C.prototype.Bl; C.prototype.contains=function(a,b){return a>=this.x&&a<this.x+this.width&&b>=this.y&&b<this.y+this.height};C.prototype.contains=C.prototype.contains;C.prototype.th=function(a){return a.x>=this.x&&a.x<this.x+this.width&&a.y>=this.y&&a.y<this.y+this.height};C.prototype.containsPoint=C.prototype.th;C.prototype.Qj=function(a){var b=a.x+a.width,c=a.y+a.height,d=this.x+this.width,e=this.y+this.height;return a.x>=this.x&&a.x<d&&a.y>=this.y&&a.y<e&&b>this.x&&b<=d&&c>this.y&&c<=e}; C.prototype.containsRect=C.prototype.Qj;C.prototype.fl=function(a){var b=new C;if(this.xb()||a.xb())return b.sf(),b;b.x=Math.max(this.x,a.x);b.y=Math.max(this.y,a.y);b.width=Math.min(this.x+this.width,a.x+a.width)-b.x;b.height=Math.min(this.y+this.height,a.y+a.height)-b.y;(0>=b.width||0>=b.height)&&b.sf();return b};C.prototype.intersection=C.prototype.fl; C.prototype.hl=function(a){if(this.xb()||a.xb())return!1;var b=Math.min(this.y+this.height,a.y+a.height)-Math.max(this.y,a.y);return 0>=Math.min(this.x+this.width,a.x+a.width)-Math.max(this.x,a.x)||0>=b?!1:!0};C.prototype.intersects=C.prototype.hl; C.prototype.Vi=function(a){var b=null;if(this.xb())return a.clone();if(a.xb())return this.clone();b=new C;b.x=Math.min(this.x,a.x);b.y=Math.min(this.y,a.y);b.width=Math.max(this.x+this.width,a.x+a.width)-b.x;b.height=Math.max(this.y+this.height,a.y+a.height)-b.y;return b};C.prototype.union=C.prototype.Vi;C.prototype.Bc=function(a){return a.x===this.x&&a.y===this.y&&a.width===this.width&&a.height===this.height};C.prototype.equals=C.prototype.Bc; C.prototype.toString=function(){return Fa+this.x+jb+this.y+ib+this.width+db+this.height+Ga};C.prototype.toString=C.prototype.toString;C.prototype.J=function(a){this.x=a.x;this.y=a.y;this.width=a.width;this.height=a.height};C.prototype.copyFrom=C.prototype.J;C.prototype.qa=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};C.prototype.setTo=C.prototype.qa; Object.defineProperties(C.prototype,{left:{get:m(Dk),set:function(a){this.width+=this.x-a;this.x=a}},right:{get:function(){return this.x+this.width},set:function(a){this.width=a-this.x}},top:{get:m(Fk),set:function(a){this.height+=this.y-a;this.y=a}},bottom:{get:function(){return this.y+this.height},set:function(a){this.height=a-this.y}},topLeft:{get:function(){return new gl(this.x,this.y)},set:function(a){this.width+=this.x-a.x;this.height+=this.y-a.y;this.x=a.x;this.y=a.y}},bottomRight:{get:function(){return new gl(this.right, this.bottom)},set:function(a){this.width=a.x-this.x;this.height=a.y-this.y}},size:{get:function(){return new gl(this.width,this.height)},set:function(a){this.width=a.x;this.height=a.y}}});C.prototype.g={names:[{name:'Rectangle',h:Of}]};r(Of,C);function xl(){}xl.prototype.g={names:[{name:'IBitmapDrawable',h:'flash.display.IBitmapDrawable'}]};function D(a,b,c,d){this.rb(a,b,'undefined'!==typeof c?c:!0,'undefined'!==typeof d?d:4294967295)}D.prototype.ed=!1;D.prototype.rb=function(a,b,c,d){d='undefined'!==typeof d?d:4294967295;this.Bj='undefined'!==typeof c?c:!0;this.image=w(document.createElement(Ed),HTMLCanvasElement);this.image.width=this.Cj=a;this.image.height=this.uj=b;this.ctx=w(this.image.getContext(tb),CanvasRenderingContext2D);this.Xb=this.ctx.getImageData(0,0,a,b);this.data=this.Xb.data;this.fillRect(this.rect,d)}; D.prototype.He=function(a,b,c){this.ctx.drawImage(a,'undefined'!==typeof b?b:0,'undefined'!==typeof c?c:0);this.Xb=this.ctx.getImageData(0,0,this.width,this.height);this.data=this.Xb.data};D.prototype.fromImage=D.prototype.He;D.prototype.clone=p(null);D.prototype.clone=D.prototype.clone;D.prototype.Le=function(a,b){var c=4*(b*this.width+a);return this.data[c]<<16|this.data[c+1]<<8|this.data[c+2]};D.prototype.getPixel=D.prototype.Le; D.prototype.Fh=function(a,b){var c=4*(b*this.width+a);return this.data[c+3]<<24|this.data[c]<<16|this.data[c+1]<<8|this.data[c+2]};D.prototype.getPixel32=D.prototype.Fh;D.prototype.hm=function(a,b,c){a=4*(b*this.width+a);this.data[a]=c>>16&255;this.data[a+1]=c>>8&255;this.data[a+2]=c&255;this.ed||this.ctx.putImageData(this.Xb,0,0)};D.prototype.setPixel=D.prototype.hm; D.prototype.Md=function(a,b,c){a=4*(b*this.width+a);this.data[a]=c>>16&255;this.data[a+1]=c>>8&255;this.data[a+2]=c&255;this.data[a+3]=c>>>24;this.ed||this.ctx.putImageData(this.Xb,0,0)};D.prototype.setPixel32=D.prototype.Md;D.prototype.colorTransform=h();D.prototype.colorTransform=D.prototype.colorTransform;D.prototype.compare=p(null);D.prototype.compare=D.prototype.compare;D.prototype.Rj=h();D.prototype.copyChannel=D.prototype.Rj; D.prototype.Sj=function(a,b,c){this.Gc();for(var d=0;d<b.width;d++)for(var e=0;e<b.height;e++)this.Md(d+c.x,e+c.y,a.Fh(d+b.x,e+b.y));this.Yc()};D.prototype.copyPixels=D.prototype.Sj;D.prototype.D=h();D.prototype.dispose=D.prototype.D;D.prototype.G=function(a){this.Ah(a)};D.prototype.draw=D.prototype.G;D.prototype.Ah=function(a){x(a,D)&&(a=w(a,D),this.He(a.ctx))};D.prototype.drawWithQuality=D.prototype.Ah; D.prototype.fillRect=function(a,b){this.Gc();for(var c=0;c<this.width;++c)for(var d=0;d<this.height;++d)this.Md(d,c,this.transparent?b:4278190080|b);this.Yc()};D.prototype.fillRect=D.prototype.fillRect;D.prototype.kk=h();D.prototype.floodFill=D.prototype.kk;D.prototype.pk=p(null);D.prototype.getColorBoundsRect=D.prototype.pk;D.prototype.rk=p(null);D.prototype.getPixels=D.prototype.rk;D.prototype.Tj=h();D.prototype.copyPixelsToByteArray=D.prototype.Tj;D.prototype.uk=p(null);D.prototype.getVector=D.prototype.uk; D.prototype.xk=p(!1);D.prototype.hitTest=D.prototype.xk;D.prototype.wl=h();D.prototype.merge=D.prototype.wl;D.prototype.ci=function(){this.Gc();for(var a=0;a<this.width;++a)for(var b=0;b<this.height;++b)this.Md(b,a,4278190080|16777215*Math.random());this.Yc()};D.prototype.noise=D.prototype.ci;D.prototype.Fl=h();D.prototype.paletteMap=D.prototype.Fl;D.prototype.hf=function(){this.ci()};D.prototype.perlinNoise=D.prototype.hf;D.prototype.Ll=p(0);D.prototype.pixelDissolve=D.prototype.Ll; D.prototype.scroll=h();D.prototype.scroll=D.prototype.scroll;D.prototype.im=h();D.prototype.setPixels=D.prototype.im;D.prototype.mm=h();D.prototype.setVector=D.prototype.mm;D.prototype.threshold=p(0);D.prototype.threshold=D.prototype.threshold;D.prototype.Gc=function(){this.ed=!0};D.prototype.lock=D.prototype.Gc;D.prototype.Yc=function(){this.ed=!1;this.ctx.putImageData(this.Xb,0,0)};D.prototype.unlock=D.prototype.Yc;D.prototype.wk=p(null);D.prototype.histogram=D.prototype.wk;D.prototype.encode=p(null); D.prototype.encode=D.prototype.encode;Object.defineProperties(D.prototype,{width:{get:m('Cj')},height:{get:m('uj')},transparent:{get:m('Bj')},rect:{get:function(){return new C(0,0,this.width,this.height)}}});D.prototype.g={names:[{name:'BitmapData',h:Se}],ja:[xl]};r(Se,D);function yl(){}r('flash.display3D.Context3DBlendFactor.ONE',ki);r('flash.display3D.Context3DBlendFactor.ZERO',Gk);r('flash.display3D.Context3DBlendFactor.SOURCE_ALPHA',cj);r('flash.display3D.Context3DBlendFactor.SOURCE_COLOR',dj);r('flash.display3D.Context3DBlendFactor.ONE_MINUS_SOURCE_ALPHA',ni);r('flash.display3D.Context3DBlendFactor.ONE_MINUS_SOURCE_COLOR',oi);r('flash.display3D.Context3DBlendFactor.DESTINATION_ALPHA',be);r('flash.display3D.Context3DBlendFactor.DESTINATION_COLOR',ce); r('flash.display3D.Context3DBlendFactor.ONE_MINUS_DESTINATION_ALPHA',li);r('flash.display3D.Context3DBlendFactor.ONE_MINUS_DESTINATION_COLOR',mi);function zl(a,b){switch(b){case ki:return a.ONE;case Gk:return a.ZERO;case cj:return a.SRC_ALPHA;case dj:return a.SRC_COLOR;case ni:return a.ONE_MINUS_SRC_ALPHA;case oi:return a.ONE_MINUS_SRC_COLOR;case be:return a.DST_ALPHA;case ce:return a.DST_COLOR;case li:return a.ONE_MINUS_DST_ALPHA;case mi:return a.ONE_MINUS_DST_COLOR}return 0} r('flash.display3D.Context3DBlendFactor.getGLVal',zl);yl.prototype.g={names:[{name:'Context3DBlendFactor',h:mf}]};r(mf,yl);function Al(){}r('flash.display3D.Context3DCompareMode.ALWAYS',hc);r('flash.display3D.Context3DCompareMode.NEVER',Wh);r('flash.display3D.Context3DCompareMode.LESS',nh);r('flash.display3D.Context3DCompareMode.LESS_EQUAL',oh);r('flash.display3D.Context3DCompareMode.EQUAL',oe);r('flash.display3D.Context3DCompareMode.GREATER_EQUAL',Qg);r('flash.display3D.Context3DCompareMode.GREATER',Pg);r('flash.display3D.Context3DCompareMode.NOT_EQUAL',di); function Bl(a,b){switch(b){case hc:return a.ALWAYS;case Wh:return a.NEAREST;case nh:return a.LESS;case oh:return a.LESS|a.EQUAL;case oe:return a.EQUAL;case Qg:return a.GREATER|a.EQUAL;case Pg:return a.GREATER;case di:return a.NOTEQUAL}return 0}r('flash.display3D.Context3DCompareMode.getGLVal',Bl);Al.prototype.g={names:[{name:'Context3DCompareMode',h:nf}]};r(nf,Al);function Cl(){}r('flash.display3D.Context3DProgramType.VERTEX',kk);r('flash.display3D.Context3DProgramType.FRAGMENT',cg);Cl.prototype.g={names:[{name:'Context3DProgramType',h:pf}]};r(pf,Cl);function Dl(){}r('flash.display3D.Context3DTriangleFace.NONE',$h);r('flash.display3D.Context3DTriangleFace.BACK',Ac);r('flash.display3D.Context3DTriangleFace.FRONT',hg);r('flash.display3D.Context3DTriangleFace.FRONT_AND_BACK',ig);function El(a,b){switch(b){case $h:return a.NONE;case Ac:return a.FRONT;case hg:return a.BACK;case ig:return a.FRONT_AND_BACK}return 0}r('flash.display3D.Context3DTriangleFace.getGLVal',El);Dl.prototype.g={names:[{name:'Context3DTriangleFace',h:sf}]};r(sf,Dl);function Fl(){}r('flash.display3D.Context3DVertexBufferFormat.FLOAT_1',Xf);r('flash.display3D.Context3DVertexBufferFormat.FLOAT_2',Yf);r('flash.display3D.Context3DVertexBufferFormat.FLOAT_3',Zf);r('flash.display3D.Context3DVertexBufferFormat.FLOAT_4',$f);r('flash.display3D.Context3DVertexBufferFormat.BYTES_4',Bd);Fl.prototype.g={names:[{name:'Context3DVertexBufferFormat',h:tf}]};r(tf,Fl);function Gl(){}Gl.prototype.ad=function(a){this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.buff);this.gl.bufferData(this.gl.ELEMENT_ARRAY_BUFFER,new Uint16Array(a),this.gl.STATIC_DRAW)};Gl.prototype.uploadFromVector=Gl.prototype.ad;Gl.prototype.ra=h();Gl.prototype.uploadFromByteArray=Gl.prototype.ra;Gl.prototype.D=h();Gl.prototype.dispose=Gl.prototype.D;Gl.prototype.g={names:[{name:'IndexBuffer3D',h:uf}]};r(uf,Gl);function Hl(){this.Mi={};this.ug={}} Hl.prototype.upload=function(a,b){this.fshader=this.gl.createShader(this.gl.FRAGMENT_SHADER);this.vshader=this.gl.createShader(this.gl.VERTEX_SHADER);a.position=b.position=0;this.gl.shaderSource(this.vshader,a.bc(a.length));this.gl.compileShader(this.vshader);if(!this.gl.getShaderParameter(this.vshader,this.gl.COMPILE_STATUS))throw this.vshader+ea+a+ea+this.gl.getShaderInfoLog(this.vshader);this.gl.shaderSource(this.fshader,b.bc(b.length));this.gl.compileShader(this.fshader);if(!this.gl.getShaderParameter(this.fshader, this.gl.COMPILE_STATUS))throw b+ea+this.gl.getShaderInfoLog(this.fshader);this.gl.attachShader(this.program,this.vshader);this.gl.attachShader(this.program,this.fshader);this.gl.linkProgram(this.program);if(!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw this.gl.getProgramInfoLog(this.program);};Hl.prototype.upload=Hl.prototype.upload;Hl.prototype.D=function(){this.gl.deleteShader(this.fshader);this.gl.deleteShader(this.vshader);this.gl.deleteProgram(this.program)}; Hl.prototype.dispose=Hl.prototype.D;Hl.prototype.getUniformLocation=function(a){var b=this.Mi[a];null==b&&(b=this.Mi[a]=this.gl.getUniformLocation(this.program,a));return b};Hl.prototype.getUniformLocation=Hl.prototype.getUniformLocation;Hl.prototype.getAttribLocation=function(a){var b=this.ug[a];null==b&&(b=this.ug[a]=this.gl.getAttribLocation(this.program,a));a=Number(b);this.gl.enableVertexAttribArray(a);return a};Hl.prototype.getAttribLocation=Hl.prototype.getAttribLocation; Hl.prototype.g={names:[{name:'Program3D',h:vf}]};r(vf,Hl);function Il(){}Il.prototype.ad=function(a){this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.buff);this.gl.bufferData(this.gl.ARRAY_BUFFER,new Float32Array(a),this.gl.STATIC_DRAW)};Il.prototype.uploadFromVector=Il.prototype.ad;Il.prototype.ra=h();Il.prototype.uploadFromByteArray=Il.prototype.ra;Il.prototype.D=h();Il.prototype.dispose=Il.prototype.D;Il.prototype.g={names:[{name:'VertexBuffer3D',h:wf}]};r(wf,Il);function Jl(){}q=Jl.prototype;q.addEventListener=h();q.dispatchEvent=h();q.Ea=h();q.removeEventListener=h();q.fj=h();q.g={names:[{name:Gb,h:'flash.events.IEventDispatcher'}]};function Kl(a){this.P={};this.rb('undefined'!==typeof a?a:null)}Kl.prototype.rb=h();Kl.prototype.addEventListener=function(a,b){var c=this.P[a]=this.P[a]||[],d=c.indexOf(b);-1!=d&&c.splice(d,1);c.push(b)};Kl.prototype.addEventListener=Kl.prototype.addEventListener;Kl.prototype.removeEventListener=function(a,b){var c=this.P[a];if(c){var d=c.indexOf(b);-1!=d&&c.splice(d,1);0===c.length&&(this.P[a]=null,delete this.P[a])}};Kl.prototype.removeEventListener=Kl.prototype.removeEventListener; Kl.prototype.dispatchEvent=function(a){return a.target?Ll(this,a.clone()):Ll(this,a)};Kl.prototype.dispatchEvent=Kl.prototype.dispatchEvent;Kl.prototype.Ea=function(a){return null!=this.P[a]};Kl.prototype.hasEventListener=Kl.prototype.Ea;Kl.prototype.fj=p(!1);Kl.prototype.willTrigger=Kl.prototype.fj;function Ll(a,b){b.target=a;b.currentTarget=a;var c=a.P[b.type];if(c)for(var d=c.length,e=0;e<d;e++)(0,c[e])(b);return!1}Kl.prototype.g={names:[{name:Fb,h:Ef}],ja:[Jl]};r(Ef,Kl);function Ml(){Kl.call(this)}Pk(Ml,Kl);Ml.prototype.D=h();Ml.prototype.dispose=Ml.prototype.D;Ml.prototype.g={names:[{name:'TextureBase',h:Af}]};r(Af,Ml);function Nl(){Kl.call(this)}Pk(Nl,Ml);Nl.prototype.Ia=h();Nl.prototype.uploadFromBitmapData=Nl.prototype.Ia;Nl.prototype.ra=h();Nl.prototype.uploadFromByteArray=Nl.prototype.ra;Nl.prototype.$c=h();Nl.prototype.uploadCompressedTextureFromByteArray=Nl.prototype.$c;Nl.prototype.g={names:[{name:'CubeTexture',h:xf}]};r(xf,Nl);function Ol(){Kl.call(this)}Pk(Ol,Ml);Ol.prototype.Ia=h();Ol.prototype.uploadFromBitmapData=Ol.prototype.Ia;Ol.prototype.ra=h();Ol.prototype.uploadFromByteArray=Ol.prototype.ra;Ol.prototype.g={names:[{name:'RectangleTexture',h:yf}]};r(yf,Ol);function Pl(){Kl.call(this)}Pk(Pl,Ml);Pl.prototype.repeat=!0;Pl.prototype.repeat=Pl.prototype.repeat;Pl.prototype.Ia=function(a,b){this.$i(a.image,'undefined'!==typeof b?b:0)};Pl.prototype.uploadFromBitmapData=Pl.prototype.Ia; Pl.prototype.$i=function(a,b){b='undefined'!==typeof b?b:0;this.gl.bindTexture(this.gl.TEXTURE_2D,this.texture);this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.RGBA,this.gl.RGBA,this.gl.UNSIGNED_BYTE,a);this.repeat?(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT)):(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE));0<b?(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR_MIPMAP_NEAREST),this.gl.generateMipmap(this.gl.TEXTURE_2D)):(this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST));this.gl.bindTexture(this.gl.TEXTURE_2D,null)}; Pl.prototype.uploadFromImg=Pl.prototype.$i;Pl.prototype.ra=h();Pl.prototype.uploadFromByteArray=Pl.prototype.ra;Pl.prototype.$c=h();Pl.prototype.uploadCompressedTextureFromByteArray=Pl.prototype.$c;Pl.prototype.g={names:[{name:'Texture',h:zf}]};r(zf,Pl);function Ql(){Kl.call(this)}Pk(Ql,Ml);Ql.prototype.Jj=h();Ql.prototype.attachCamera=Ql.prototype.Jj;Object.defineProperties(Ql.prototype,{videoWidth:{get:p(0)},videoHeight:{get:p(0)}});Ql.prototype.g={names:[{name:'VideoTexture',h:Bf}]};r(Bf,Ql);function F(){this.xc={};this.yc={};Kl.call(this)}Pk(F,Kl);F.prototype.D=h();F.prototype.dispose=F.prototype.D;F.prototype.Mb=function(a,b,c,d){d='undefined'!==typeof d?d:!0;this.canvas.width=a;this.canvas.height=b;this.canvas.style.width=a+zi;this.canvas.style.height=b+zi;this.gl.viewport(0,0,a,b);d?(this.gl.enable(this.gl.DEPTH_TEST),this.gl.enable(this.gl.STENCIL_TEST)):(this.gl.disable(this.gl.DEPTH_TEST),this.gl.disable(this.gl.STENCIL_TEST))};F.prototype.configureBackBuffer=F.prototype.Mb; F.prototype.clear=function(a,b,c,d,e,f){e='undefined'!==typeof e?e:1;f='undefined'!==typeof f?f:0;this.gl.clearColor('undefined'!==typeof a?a:0,'undefined'!==typeof b?b:0,'undefined'!==typeof c?c:0,'undefined'!==typeof d?d:1);this.gl.clearDepth(e);this.gl.clearStencil(f);this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)};F.prototype.clear=F.prototype.clear; F.prototype.na=function(a,b,c){b='undefined'!==typeof b?b:0;c='undefined'!==typeof c?c:-1;this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,a.buff);this.gl.drawElements(this.gl.TRIANGLES,0>c?a.count:3*c,this.gl.UNSIGNED_SHORT,2*b)};F.prototype.drawTriangles=F.prototype.na;F.prototype.Kc=h();F.prototype.present=F.prototype.Kc;F.prototype.Db=function(a){this.pd!=a&&(this.pd=a,this.gl.useProgram(a.program))};F.prototype.setProgram=F.prototype.Db; F.prototype.ab=function(a,b,c){this.zi(kk===a?ik+b:Fe+b,c)};F.prototype.setProgramConstantsFromVector=F.prototype.ab;F.prototype.pa=function(a,b,c,d){this.yi(kk===a?ik+b:Fe+b,c,'undefined'!==typeof d?d:!1)};F.prototype.setProgramConstantsFromMatrix=F.prototype.pa;F.prototype.Nd=h();F.prototype.setProgramConstantsFromByteArray=F.prototype.Nd;F.prototype.zi=function(a,b){this.gl.uniform4fv(this.getUniformLocation(a),b)};F.prototype.setProgramConstantsFromVectorGL=F.prototype.zi; F.prototype.yi=function(a,b,c){(c='undefined'!==typeof c?c:!1)&&b.Gb();this.gl.uniformMatrix4fv(this.getUniformLocation(a),!1,b.rawData);c&&b.Gb()};F.prototype.setProgramConstantsFromMatrixGL=F.prototype.yi;F.prototype.jm=h();F.prototype.setProgramConstantsFromByteArrayGL=F.prototype.jm;F.prototype.getUniformLocation=function(a){return this.pd.getUniformLocation(a)};F.prototype.mb=function(a,b,c,d){this.Bi(ek+a,b,'undefined'!==typeof c?c:0,'undefined'!==typeof d?d:$f)}; F.prototype.setVertexBufferAt=F.prototype.mb;F.prototype.Bi=function(a,b,c,d){c='undefined'!==typeof c?c:0;d='undefined'!==typeof d?d:$f;if(this.yc[a]!=b){this.yc[a]=b;a=this.pd.getAttribLocation(a);this.gl.bindBuffer(this.gl.ARRAY_BUFFER,b.buff);b=this.gl.FLOAT;var e=0,f=!1;switch(d){case Xf:e=1;break;case Yf:e=2;break;case Zf:e=3;break;case $f:e=4;break;case Bd:e=4,b=this.gl.UNSIGNED_BYTE,f=!0}this.gl.vertexAttribPointer(a,e,b,f,c,c)}};F.prototype.setVertexBufferAtGL=F.prototype.Bi; F.prototype.ec=function(a,b){this.gl.enable(this.gl.BLEND);this.gl.blendEquation(this.gl.FUNC_ADD);this.gl.blendFunc(zl(this.gl,a),zl(this.gl,b))};F.prototype.setBlendFactors=F.prototype.ec;F.prototype.Ld=function(a,b,c,d){this.gl.colorMask(a,b,c,d)};F.prototype.setColorMask=F.prototype.Ld;F.prototype.Qc=function(a,b){this.gl.depthFunc(Bl(this.gl,b));this.gl.depthMask(a)};F.prototype.setDepthTest=F.prototype.Qc; F.prototype.hc=function(a,b){null==b?this.Sc(a,null):x(b,Pl)?this.Sc(a,w(b,Pl)):x(b,Nl)?w(b,Nl):x(b,Ol)?w(b,Ol):x(b,Ql)&&w(b,Ql)};F.prototype.setTextureAt=F.prototype.hc;F.prototype.gc=function(a){if(!x(a,Pl)&&!x(a,Nl)&&!x(a,Ol)&&null!=a)throw'texture argument not derived from TextureBase (can be Texture, CubeTexture, or if supported, RectangleTexture)';};F.prototype.setRenderToTexture=F.prototype.gc;F.prototype.Rc=h();F.prototype.setRenderToBackBuffer=F.prototype.Rc; F.prototype.fc=function(a){a===$h?this.gl.disable(this.gl.CULL_FACE):(this.gl.enable(this.gl.CULL_FACE),this.gl.cullFace(El(this.gl,a)))};F.prototype.setCulling=F.prototype.fc;F.prototype.Pd=h();F.prototype.setStencilActions=F.prototype.Pd;F.prototype.Qd=h();F.prototype.setStencilReferenceValue=F.prototype.Qd;F.prototype.Od=function(a){null==a?this.gl.disable(this.gl.SCISSOR_TEST):(this.gl.enable(this.gl.SCISSOR_TEST),this.gl.scissor(a.x,a.y,a.width,a.height))};F.prototype.setScissorRectangle=F.prototype.Od; F.prototype.Rb=function(){var a=new Il;a.buff=this.gl.createBuffer();a.gl=this.gl;return a};F.prototype.createVertexBuffer=F.prototype.Rb;F.prototype.Pb=function(a){var b=new Gl;b.buff=this.gl.createBuffer();b.gl=this.gl;b.count=a;return b};F.prototype.createIndexBuffer=F.prototype.Pb;F.prototype.createTexture=function(){var a=new Pl;a.gl=this.gl;a.texture=this.gl.createTexture();return a};F.prototype.createTexture=F.prototype.createTexture;F.prototype.Ob=p(null);F.prototype.createCubeTexture=F.prototype.Ob; F.prototype.Qb=p(null);F.prototype.createRectangleTexture=F.prototype.Qb;F.prototype.createProgram=function(){var a=new Hl;a.gl=this.gl;a.program=this.gl.createProgram();return a};F.prototype.createProgram=F.prototype.createProgram;F.prototype.tb=h();F.prototype.drawToBitmapData=F.prototype.tb;F.prototype.tf=h();F.prototype.setSamplerStateAt=F.prototype.tf;F.prototype.Sc=function(a,b){this.Ai(jg+a,a,b)}; F.prototype.Ai=function(a,b,c){this.xc[a]!=c&&(this.xc[a]=c)&&(this.gl.activeTexture(WebGLRenderingContext[Lb+b]),this.gl.bindTexture(this.gl.TEXTURE_2D,c.texture),this.gl.uniform1i(this.pd.getUniformLocation(a),b))};F.prototype.setTextureAtGL=F.prototype.Ai;F.prototype.wc=p(null);F.prototype.createVideoTexture=F.prototype.wc; Object.defineProperties(F.prototype,{driverInfo:{get:p(null)},enableErrorChecking:{get:p(!1),set:h()},profile:{get:p(null)},backBufferWidth:{get:p(0)},backBufferHeight:{get:p(0)},maxBackBufferWidth:{get:p(0),set:h()},maxBackBufferHeight:{get:p(0),set:h()}});Object.defineProperties(F,{supportsVideoTexture:{get:p(!1)}});F.prototype.g={names:[{name:'Context3D',h:lf}]};r(lf,F);function Rl(){}r('flash.display3D.Context3DTextureFormat.BGRA',Gc);r('flash.display3D.Context3DTextureFormat.RGBA_HALF_FLOAT',Ji);r('flash.display3D.Context3DTextureFormat.COMPRESSED',Od);r('flash.display3D.Context3DTextureFormat.COMPRESSED_ALPHA',Pd);r('flash.display3D.Context3DTextureFormat.BGR_PACKED','bgrPacked565');r('flash.display3D.Context3DTextureFormat.BGRA_PACKED','bgraPacked4444');Rl.prototype.g={names:[{name:'Context3DTextureFormat',h:rf}]};r(rf,Rl);function Sl(a,b,c){this.rb(a,'undefined'!==typeof b?b:!1,'undefined'!==typeof c?c:!1)}r('flash.events.Event.ACTIVATE','activate');r('flash.events.Event.ADDED','added');r('flash.events.Event.ADDED_TO_STAGE',fc);r('flash.events.Event.BROWSER_ZOOM_CHANGE','browserZoomChange');r('flash.events.Event.CANCEL','cancel');r('flash.events.Event.CHANGE','change');r('flash.events.Event.CLEAR','clear');r('flash.events.Event.CLOSE','close');r('flash.events.Event.COMPLETE','complete'); r('flash.events.Event.CONNECT','connect');r('flash.events.Event.COPY','copy');r('flash.events.Event.CUT','cut');r('flash.events.Event.DEACTIVATE','deactivate');r('flash.events.Event.ENTER_FRAME',ne);r('flash.events.Event.FRAME_CONSTRUCTED','frameConstructed');r('flash.events.Event.EXIT_FRAME','exitFrame');r('flash.events.Event.FRAME_LABEL','frameLabel');r('flash.events.Event.ID3','id3');r('flash.events.Event.INIT',ch);r('flash.events.Event.MOUSE_LEAVE','mouseLeave');r('flash.events.Event.OPEN','open'); r('flash.events.Event.PASTE','paste');r('flash.events.Event.REMOVED','removed');r('flash.events.Event.REMOVED_FROM_STAGE',Ci);r('flash.events.Event.RENDER','render');r('flash.events.Event.RESIZE',Fi);r('flash.events.Event.SCROLL','scroll');r('flash.events.Event.TEXT_INTERACTION_MODE_CHANGE','textInteractionModeChange');r('flash.events.Event.SELECT','select');r('flash.events.Event.SELECT_ALL','selectAll');r('flash.events.Event.SOUND_COMPLETE','soundComplete'); r('flash.events.Event.TAB_CHILDREN_CHANGE','tabChildrenChange');r('flash.events.Event.TAB_ENABLED_CHANGE','tabEnabledChange');r('flash.events.Event.TAB_INDEX_CHANGE','tabIndexChange');r('flash.events.Event.UNLOAD','unload');r('flash.events.Event.FULLSCREEN',lg);r('flash.events.Event.CONTEXT3D_CREATE',Sd);r('flash.events.Event.TEXTURE_READY',xj);r('flash.events.Event.VIDEO_FRAME','videoFrame');r('flash.events.Event.SUSPEND','suspend');r('flash.events.Event.CHANNEL_MESSAGE','channelMessage'); r('flash.events.Event.CHANNEL_STATE','channelState');r('flash.events.Event.WORKER_STATE','workerState');Sl.prototype.vb=p(null);Sl.prototype.formatToString=Sl.prototype.vb;Sl.prototype.rb=function(a,b,c){this.hd=a;this.pj=b;this.qj=c};Sl.prototype.clone=function(){return new Sl(this.type,this.bubbles,this.cancelable)};Sl.prototype.clone=Sl.prototype.clone;Sl.prototype.toString=function(){return this.vb()};Sl.prototype.toString=Sl.prototype.toString;Sl.prototype.stopPropagation=h(); Sl.prototype.stopPropagation=Sl.prototype.stopPropagation;Sl.prototype.stopImmediatePropagation=h();Sl.prototype.stopImmediatePropagation=Sl.prototype.stopImmediatePropagation;Sl.prototype.preventDefault=h();Sl.prototype.preventDefault=Sl.prototype.preventDefault;Sl.prototype.kl=p(!1);Sl.prototype.isDefaultPrevented=Sl.prototype.kl; Object.defineProperties(Sl.prototype,{type:{get:m('hd')},bubbles:{get:m('pj')},cancelable:{get:m('qj')},target:{get:m('zj'),set:k('zj')},currentTarget:{get:m('sj'),set:k('sj')},eventPhase:{get:p(0)}});Sl.prototype.g={names:[{name:'Event',h:Df}]};r(Df,Sl);function Tl(){}r('flash.geom.Orientation3D.EULER_ANGLES',ze);r('flash.geom.Orientation3D.AXIS_ANGLE',zc);r('flash.geom.Orientation3D.QUATERNION',Ai);Tl.prototype.g={names:[{name:'Orientation3D',h:Mf}]};r(Mf,Tl);function H(a,b,c,d){this.x='undefined'!==typeof a?a:0;this.y='undefined'!==typeof b?b:0;this.z='undefined'!==typeof c?c:0;this.w='undefined'!==typeof d?d:0}var Ul=new H(1,0,0);r('flash.geom.Vector3D.X_AXIS',Ul);var Vl=new H(0,1,0);r('flash.geom.Vector3D.Y_AXIS',Vl);var Wl=new H(0,0,1);r('flash.geom.Vector3D.Z_AXIS',Wl);r('flash.geom.Vector3D.angleBetween',function(a,b){var c=a.x*b.x+a.y*b.y+a.z*b.z,c=c/(a.length*b.length);return Math.acos(c)});r('flash.geom.Vector3D.distance',function(a,b){return a.bb(b).length}); H.prototype.clone=function(){return new H(this.x,this.y,this.z,this.w)};H.prototype.clone=H.prototype.clone;H.prototype.Qa=function(a){return this.x*a.x+this.y*a.y+this.z*a.z};H.prototype.dotProduct=H.prototype.Qa;H.prototype.Sb=function(a){return new H(this.y*a.z-this.z*a.y,this.z*a.x-this.x*a.z,this.x*a.y-this.y*a.x,1)};H.prototype.crossProduct=H.prototype.Sb;H.prototype.normalize=function(){var a=this.length,b=0!=a?1/a:0;this.x*=b;this.y*=b;this.z*=b;return a};H.prototype.normalize=H.prototype.normalize; H.prototype.wa=function(a){this.x*=a;this.y*=a;this.z*=a};H.prototype.scaleBy=H.prototype.wa;H.prototype.dl=function(a){this.x+=a.x;this.y+=a.y;this.z+=a.z};H.prototype.incrementBy=H.prototype.dl;H.prototype.Zj=function(a){this.x-=a.x;this.y-=a.y;this.z-=a.z};H.prototype.decrementBy=H.prototype.Zj;H.prototype.add=function(a){return new H(this.x+a.x,this.y+a.y,this.z+a.z)};H.prototype.add=H.prototype.add;H.prototype.bb=function(a){return new H(this.x-a.x,this.y-a.y,this.z-a.z)}; H.prototype.subtract=H.prototype.bb;H.prototype.Ed=function(){this.x=-this.x;this.y=-this.y;this.z=-this.z};H.prototype.negate=H.prototype.Ed;H.prototype.Bc=function(a,b){return this.x===a.x&&this.y===a.y&&this.z===a.z&&('undefined'!==typeof b&&b?this.w===a.w:!0)};H.prototype.equals=H.prototype.Bc;H.prototype.zl=function(a,b,c){var d=this.x-a.x;if(d=(0>d?0-d:d)<b)if(d=this.y-a.y,d=0>d?0-d:d,d=d<b)d=this.z-a.z,d=0>d?0-d:d,(d=d<b)&&'undefined'!==typeof c&&c&&(d=this.w=a.w,d=0>d?0-d:d,d=d<b);return d}; H.prototype.nearEquals=H.prototype.zl;H.prototype.ki=function(){var a=1/this.w;this.x*=a;this.y*=a;this.z*=a};H.prototype.project=H.prototype.ki;H.prototype.toString=function(){var a=Ob+this.x+Sa+this.y+Sa+this.z;return a+Ga};H.prototype.toString=H.prototype.toString;H.prototype.J=function(a){this.x=a.x;this.y=a.y;this.z=a.z};H.prototype.copyFrom=H.prototype.J;H.prototype.qa=function(a,b,c){this.x=a;this.y=b;this.z=c};H.prototype.setTo=H.prototype.qa; Object.defineProperties(H.prototype,{length:{get:function(){var a=this.x*this.x+this.y*this.y+this.z*this.z;return 0>=a?0:Math.sqrt(a)}},lengthSquared:{get:function(){return this.x*this.x+this.y*this.y+this.z*this.z}}});H.prototype.g={names:[{name:'Vector3D',h:Qf}]};r(Qf,H);function I(a){a='undefined'!==typeof a?a:null;this.rawData=null!=a&&16===a.length?a:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1].slice()}var Xl=new I; I.prototype.append=function(a){var b=this.rawData[0],c=this.rawData[4],d=this.rawData[8],e=this.rawData[12],f=this.rawData[1],g=this.rawData[5],l=this.rawData[9],n=this.rawData[13],t=this.rawData[2],u=this.rawData[6],v=this.rawData[10],G=this.rawData[14],E=this.rawData[3],A=this.rawData[7],K=this.rawData[11],J=this.rawData[15],O=a.rawData[0],W=a.rawData[4],ka=a.rawData[8],pa=a.rawData[12],ua=a.rawData[1],Aa=a.rawData[5],sa=a.rawData[9],Da=a.rawData[13],Ea=a.rawData[2],kb=a.rawData[6],da=a.rawData[10], Ha=a.rawData[14],Oa=a.rawData[3],qb=a.rawData[7],Tb=a.rawData[11];a=a.rawData[15];this.rawData[0]=b*O+f*W+t*ka+E*pa;this.rawData[1]=b*ua+f*Aa+t*sa+E*Da;this.rawData[2]=b*Ea+f*kb+t*da+E*Ha;this.rawData[3]=b*Oa+f*qb+t*Tb+E*a;this.rawData[4]=c*O+g*W+u*ka+A*pa;this.rawData[5]=c*ua+g*Aa+u*sa+A*Da;this.rawData[6]=c*Ea+g*kb+u*da+A*Ha;this.rawData[7]=c*Oa+g*qb+u*Tb+A*a;this.rawData[8]=d*O+l*W+v*ka+K*pa;this.rawData[9]=d*ua+l*Aa+v*sa+K*Da;this.rawData[10]=d*Ea+l*kb+v*da+K*Ha;this.rawData[11]=d*Oa+l*qb+v*Tb+ K*a;this.rawData[12]=e*O+n*W+G*ka+J*pa;this.rawData[13]=e*ua+n*Aa+G*sa+J*Da;this.rawData[14]=e*Ea+n*kb+G*da+J*Ha;this.rawData[15]=e*Oa+n*qb+G*Tb+J*a};I.prototype.append=I.prototype.append;I.prototype.kd=function(a,b,c){c='undefined'!==typeof c?c:null;a=Yl(b.x,b.y,b.z,a);null!=c&&a.ld(c.x,c.y,c.z);this.append(a)};I.prototype.appendRotation=I.prototype.kd; I.prototype.Ej=function(a,b,c){this.rawData[0]*=a;this.rawData[1]*=a;this.rawData[2]*=a;this.rawData[3]*=a;this.rawData[4]*=b;this.rawData[5]*=b;this.rawData[6]*=b;this.rawData[7]*=b;this.rawData[8]*=c;this.rawData[9]*=c;this.rawData[10]*=c;this.rawData[11]*=c};I.prototype.appendScale=I.prototype.Ej;I.prototype.ld=function(a,b,c){this.rawData[12]+=a;this.rawData[13]+=b;this.rawData[14]+=c};I.prototype.appendTranslation=I.prototype.ld;I.prototype.clone=function(){return new I(this.rawData.concat())}; I.prototype.clone=I.prototype.clone;I.prototype.Y=function(a,b){switch(a){case 0:this.rawData[0]=b.x;this.rawData[1]=b.y;this.rawData[2]=b.z;this.rawData[3]=b.w;break;case 1:this.rawData[4]=b.x;this.rawData[5]=b.y;this.rawData[6]=b.z;this.rawData[7]=b.w;break;case 2:this.rawData[8]=b.x;this.rawData[9]=b.y;this.rawData[10]=b.z;this.rawData[11]=b.w;break;case 3:this.rawData[12]=b.x;this.rawData[13]=b.y;this.rawData[14]=b.z;this.rawData[15]=b.w;break;default:throw Error(Eb+a+qa);}}; I.prototype.copyColumnFrom=I.prototype.Y;I.prototype.A=function(a,b){switch(a){case 0:b.x=this.rawData[0];b.y=this.rawData[1];b.z=this.rawData[2];b.w=this.rawData[3];break;case 1:b.x=this.rawData[4];b.y=this.rawData[5];b.z=this.rawData[6];b.w=this.rawData[7];break;case 2:b.x=this.rawData[8];b.y=this.rawData[9];b.z=this.rawData[10];b.w=this.rawData[11];break;case 3:b.x=this.rawData[12];b.y=this.rawData[13];b.z=this.rawData[14];b.w=this.rawData[15];break;default:throw Error(Eb+a+qa);}}; I.prototype.copyColumnTo=I.prototype.A;I.prototype.J=function(a){this.rawData=a.rawData.concat()};I.prototype.copyFrom=I.prototype.J;I.prototype.ha=function(a,b,c){b='undefined'!==typeof b?b:0;(c='undefined'!==typeof c?c:!1)&&this.Gb();for(var d=a.length-b,e=0;e<d>>0;){var f=e++;this.rawData[f]=a[f+b]}c&&this.Gb()};I.prototype.copyRawDataFrom=I.prototype.ha; I.prototype.Nb=function(a,b,c){b='undefined'!==typeof b?b:0;(c='undefined'!==typeof c?c:!1)&&this.Gb();for(var d=this.rawData.length,e=0;e<d>>0;){var f=e++;a[f+b]=this.rawData[f]}c&&this.Gb()};I.prototype.copyRawDataTo=I.prototype.Nb; I.prototype.ua=function(a,b){switch(a){case 0:this.rawData[0]=b.x;this.rawData[4]=b.y;this.rawData[8]=b.z;this.rawData[12]=b.w;break;case 1:this.rawData[1]=b.x;this.rawData[5]=b.y;this.rawData[9]=b.z;this.rawData[13]=b.w;break;case 2:this.rawData[2]=b.x;this.rawData[6]=b.y;this.rawData[10]=b.z;this.rawData[14]=b.w;break;case 3:this.rawData[3]=b.x;this.rawData[7]=b.y;this.rawData[11]=b.z;this.rawData[15]=b.w;break;default:throw Error('Error, Row '+a+qa);}};I.prototype.copyRowFrom=I.prototype.ua; I.prototype.ve=function(a,b){switch(a){case 0:b.x=this.rawData[0];b.y=this.rawData[4];b.z=this.rawData[8];b.w=this.rawData[12];break;case 1:b.x=this.rawData[1];b.y=this.rawData[5];b.z=this.rawData[9];b.w=this.rawData[13];break;case 2:b.x=this.rawData[2];b.y=this.rawData[6];b.z=this.rawData[10];b.w=this.rawData[14];break;case 3:b.x=this.rawData[3];b.y=this.rawData[7];b.z=this.rawData[11];b.w=this.rawData[15];break;default:throw Error('Error, Row '+a+qa);}};I.prototype.copyRowTo=I.prototype.ve; I.prototype.uh=function(a){a.rawData=this.rawData.concat()};I.prototype.copyToMatrix3D=I.prototype.uh; I.prototype.we=function(a){a='undefined'!==typeof a?a:null;null==a&&(a=ze);var b=[],c=this.clone().rawData.concat(),d=new H(c[12],c[13],c[14]),e=new H;e.x=Math.sqrt(c[0]*c[0]+c[1]*c[1]+c[2]*c[2]);e.y=Math.sqrt(c[4]*c[4]+c[5]*c[5]+c[6]*c[6]);e.z=Math.sqrt(c[8]*c[8]+c[9]*c[9]+c[10]*c[10]);0>c[0]*(c[5]*c[10]-c[6]*c[9])-c[1]*(c[4]*c[10]-c[6]*c[8])+c[2]*(c[4]*c[9]-c[5]*c[8])&&(e.z=-e.z);c[0]/=e.x;c[1]/=e.x;c[2]/=e.x;c[4]/=e.y;c[5]/=e.y;c[6]/=e.y;c[8]/=e.z;c[9]/=e.z;c[10]/=e.z;var f=new H;switch(a){case zc:f.w= Math.acos((c[0]+c[5]+c[10]-1)/2);a=Math.sqrt((c[6]-c[9])*(c[6]-c[9])+(c[8]-c[2])*(c[8]-c[2])+(c[1]-c[4])*(c[1]-c[4]));0!=a?(f.x=(c[6]-c[9])/a,f.y=(c[8]-c[2])/a,f.z=(c[1]-c[4])/a):f.x=f.y=f.z=0;break;case Ai:a=c[0]+c[5]+c[10];0<a?(f.w=Math.sqrt(1+a)/2,f.x=(c[6]-c[9])/(4*f.w),f.y=(c[8]-c[2])/(4*f.w),f.z=(c[1]-c[4])/(4*f.w)):c[0]>c[5]&&c[0]>c[10]?(f.x=Math.sqrt(1+c[0]-c[5]-c[10])/2,f.w=(c[6]-c[9])/(4*f.x),f.y=(c[1]+c[4])/(4*f.x),f.z=(c[8]+c[2])/(4*f.x)):c[5]>c[10]?(f.y=Math.sqrt(1+c[5]-c[0]-c[10])/2, f.x=(c[1]+c[4])/(4*f.y),f.w=(c[8]-c[2])/(4*f.y),f.z=(c[6]+c[9])/(4*f.y)):(f.z=Math.sqrt(1+c[10]-c[0]-c[5])/2,f.x=(c[8]+c[2])/(4*f.z),f.y=(c[6]+c[9])/(4*f.z),f.w=(c[1]-c[4])/(4*f.z));break;case ze:f.y=Math.asin(-c[2]),1!=c[2]&&-1!=c[2]?(f.x=Math.atan2(c[6],c[10]),f.z=Math.atan2(c[1],c[0])):(f.z=0,f.x=Math.atan2(c[4],c[5]))}b.push(d);b.push(f);b.push(e);return b};I.prototype.decompose=I.prototype.we; I.prototype.yh=function(a){var b=a.x,c=a.y;a=a.z;return new H(b*this.rawData[0]+c*this.rawData[4]+a*this.rawData[8]+this.rawData[3],b*this.rawData[1]+c*this.rawData[5]+a*this.rawData[9]+this.rawData[7],b*this.rawData[2]+c*this.rawData[6]+a*this.rawData[10]+this.rawData[11],0)};I.prototype.deltaTransformVector=I.prototype.yh; I.prototype.Wb=function(){this.rawData[0]=1;this.rawData[1]=0;this.rawData[2]=0;this.rawData[3]=0;this.rawData[4]=0;this.rawData[5]=1;this.rawData[6]=0;this.rawData[7]=0;this.rawData[8]=0;this.rawData[9]=0;this.rawData[10]=1;this.rawData[11]=0;this.rawData[12]=0;this.rawData[13]=0;this.rawData[14]=0;this.rawData[15]=1};I.prototype.identity=I.prototype.Wb;I.prototype.Th=function(a,b){for(var c=0;16>c;){var d=c++;this.rawData[d]+=(a.rawData[d]-this.rawData[d])*b}};I.prototype.interpolateTo=I.prototype.Th; I.prototype.Ta=function(){var a=this.determinant,b=1E-11<Math.abs(a);if(b){var a=1/a,c=this.rawData[0],d=this.rawData[4],e=this.rawData[8],f=this.rawData[12],g=this.rawData[1],l=this.rawData[5],n=this.rawData[9],t=this.rawData[13],u=this.rawData[2],v=this.rawData[6],G=this.rawData[10],E=this.rawData[14],A=this.rawData[3],K=this.rawData[7],J=this.rawData[11],O=this.rawData[15];this.rawData[0]=a*(l*(G*O-E*J)-n*(v*O-E*K)+t*(v*J-G*K));this.rawData[1]=-a*(g*(G*O-E*J)-n*(u*O-E*A)+t*(u*J-G*A));this.rawData[2]= a*(g*(v*O-E*K)-l*(u*O-E*A)+t*(u*K-v*A));this.rawData[3]=-a*(g*(v*J-G*K)-l*(u*J-G*A)+n*(u*K-v*A));this.rawData[4]=-a*(d*(G*O-E*J)-e*(v*O-E*K)+f*(v*J-G*K));this.rawData[5]=a*(c*(G*O-E*J)-e*(u*O-E*A)+f*(u*J-G*A));this.rawData[6]=-a*(c*(v*O-E*K)-d*(u*O-E*A)+f*(u*K-v*A));this.rawData[7]=a*(c*(v*J-G*K)-d*(u*J-G*A)+e*(u*K-v*A));this.rawData[8]=a*(d*(n*O-t*J)-e*(l*O-t*K)+f*(l*J-n*K));this.rawData[9]=-a*(c*(n*O-t*J)-e*(g*O-t*A)+f*(g*J-n*A));this.rawData[10]=a*(c*(l*O-t*K)-d*(g*O-t*A)+f*(g*K-l*A));this.rawData[11]= -a*(c*(l*J-n*K)-d*(g*J-n*A)+e*(g*K-l*A));this.rawData[12]=-a*(d*(n*E-t*G)-e*(l*E-t*v)+f*(l*G-n*v));this.rawData[13]=a*(c*(n*E-t*G)-e*(g*E-t*u)+f*(g*G-n*u));this.rawData[14]=-a*(c*(l*E-t*v)-d*(g*E-t*u)+f*(g*v-l*u));this.rawData[15]=a*(c*(l*G-n*v)-d*(g*G-n*u)+e*(g*v-l*u))}return b};I.prototype.invert=I.prototype.Ta; I.prototype.hi=function(a,b,c){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;null==b&&(b=new H(0,0,-1));null==c&&(c=new H(0,-1,0));b=b.bb(a);c=c.clone();var d;b.normalize();c.normalize();d=b.clone();d.wa(c.Qa(b));c=c.bb(d);0<c.length?c.normalize():c=0!=b.x?new H(-b.y,b.x,0):new H(1,0,0);d=c.Sb(b);d.normalize();this.rawData[0]=d.x;this.rawData[4]=d.y;this.rawData[8]=d.z;this.rawData[12]=0;this.rawData[1]=c.x;this.rawData[5]=c.y;this.rawData[9]=c.z;this.rawData[13]=0;this.rawData[2]= b.x;this.rawData[6]=b.y;this.rawData[10]=b.z;this.rawData[14]=0;this.rawData[3]=a.x;this.rawData[7]=a.y;this.rawData[11]=a.z;this.rawData[15]=1};I.prototype.pointAt=I.prototype.hi; I.prototype.jf=function(a){var b=a.rawData[0],c=a.rawData[4],d=a.rawData[8],e=a.rawData[12],f=a.rawData[1],g=a.rawData[5],l=a.rawData[9],n=a.rawData[13],t=a.rawData[2],u=a.rawData[6],v=a.rawData[10],G=a.rawData[14],E=a.rawData[3],A=a.rawData[7],K=a.rawData[11];a=a.rawData[15];var J=this.rawData[0],O=this.rawData[4],W=this.rawData[8],ka=this.rawData[12],pa=this.rawData[1],ua=this.rawData[5],Aa=this.rawData[9],sa=this.rawData[13],Da=this.rawData[2],Ea=this.rawData[6],kb=this.rawData[10],da=this.rawData[14], Ha=this.rawData[3],Oa=this.rawData[7],qb=this.rawData[11],Tb=this.rawData[15];this.rawData[0]=b*J+f*O+t*W+E*ka;this.rawData[1]=b*pa+f*ua+t*Aa+E*sa;this.rawData[2]=b*Da+f*Ea+t*kb+E*da;this.rawData[3]=b*Ha+f*Oa+t*qb+E*Tb;this.rawData[4]=c*J+g*O+u*W+A*ka;this.rawData[5]=c*pa+g*ua+u*Aa+A*sa;this.rawData[6]=c*Da+g*Ea+u*kb+A*da;this.rawData[7]=c*Ha+g*Oa+u*qb+A*Tb;this.rawData[8]=d*J+l*O+v*W+K*ka;this.rawData[9]=d*pa+l*ua+v*Aa+K*sa;this.rawData[10]=d*Da+l*Ea+v*kb+K*da;this.rawData[11]=d*Ha+l*Oa+v*qb+K*Tb; this.rawData[12]=e*J+n*O+G*W+a*ka;this.rawData[13]=e*pa+n*ua+G*Aa+a*sa;this.rawData[14]=e*Da+n*Ea+G*kb+a*da;this.rawData[15]=e*Ha+n*Oa+G*qb+a*Tb};I.prototype.prepend=I.prototype.jf;I.prototype.Ml=function(a,b,c){c='undefined'!==typeof c?c:null;a=Yl(b.x,b.y,b.z,a);null!=c&&a.ld(c.x,c.y,c.z);this.jf(a)};I.prototype.prependRotation=I.prototype.Ml; I.prototype.kf=function(a,b,c){this.rawData[0]*=a;this.rawData[1]*=b;this.rawData[2]*=c;this.rawData[4]*=a;this.rawData[5]*=b;this.rawData[6]*=c;this.rawData[8]*=a;this.rawData[9]*=b;this.rawData[10]*=c;this.rawData[12]*=a;this.rawData[13]*=b;this.rawData[14]*=c};I.prototype.prependScale=I.prototype.kf;I.prototype.ji=function(a,b,c){Xl.Wb();Xl.position=new H(a,b,c);this.jf(Xl)};I.prototype.prependTranslation=I.prototype.ji; I.prototype.ri=function(a,b){b='undefined'!==typeof b?b:null;if(3>a.length||0==a[2].x||0==a[2].y||0==a[2].z)return!1;null==b&&(b=ze);this.Wb();var c=[];c[0]=c[1]=c[2]=a[2].x;c[4]=c[5]=c[6]=a[2].y;c[8]=c[9]=c[10]=a[2].z;switch(b){case ze:var d=Math.cos(a[1].x),e=Math.cos(a[1].y),f=Math.cos(a[1].z),g=Math.sin(a[1].x),l=Math.sin(a[1].y),n=Math.sin(a[1].z);this.rawData[0]=e*f*c[0];this.rawData[1]=e*n*c[1];this.rawData[2]=-l*c[2];this.rawData[3]=0;this.rawData[4]=(g*l*f-d*n)*c[4];this.rawData[5]=(g*l* n+d*f)*c[5];this.rawData[6]=g*e*c[6];this.rawData[7]=0;this.rawData[8]=(d*l*f+g*n)*c[8];this.rawData[9]=(d*l*n-g*f)*c[9];this.rawData[10]=d*e*c[10];this.rawData[11]=0;this.rawData[12]=a[0].x;this.rawData[13]=a[0].y;this.rawData[14]=a[0].z;this.rawData[15]=1;break;default:d=a[1].x,e=a[1].y,f=a[1].z,g=a[1].w,b==zc&&(d*=Math.sin(g/2),e*=Math.sin(g/2),f*=Math.sin(g/2),g=Math.cos(g/2)),this.rawData[0]=(1-2*e*e-2*f*f)*c[0],this.rawData[1]=(2*d*e+2*g*f)*c[1],this.rawData[2]=(2*d*f-2*g*e)*c[2],this.rawData[3]= 0,this.rawData[4]=(2*d*e-2*g*f)*c[4],this.rawData[5]=(1-2*d*d-2*f*f)*c[5],this.rawData[6]=(2*e*f+2*g*d)*c[6],this.rawData[7]=0,this.rawData[8]=(2*d*f+2*g*e)*c[8],this.rawData[9]=(2*e*f-2*g*d)*c[9],this.rawData[10]=(1-2*d*d-2*e*e)*c[10],this.rawData[11]=0,this.rawData[12]=a[0].x,this.rawData[13]=a[0].y,this.rawData[14]=a[0].z,this.rawData[15]=1}0===a[2].x&&(this.rawData[0]=1E-15);0===a[2].y&&(this.rawData[5]=1E-15);0===a[2].z&&(this.rawData[10]=1E-15);return!(0===a[2].x||0===a[2].y||0===a[2].y)}; I.prototype.recompose=I.prototype.ri;I.prototype.Ef=function(a){var b=a.x,c=a.y;a=a.z;return new H(b*this.rawData[0]+c*this.rawData[4]+a*this.rawData[8]+this.rawData[12],b*this.rawData[1]+c*this.rawData[5]+a*this.rawData[9]+this.rawData[13],b*this.rawData[2]+c*this.rawData[6]+a*this.rawData[10]+this.rawData[14],b*this.rawData[3]+c*this.rawData[7]+a*this.rawData[11]+this.rawData[15])};I.prototype.transformVector=I.prototype.Ef; I.prototype.xm=function(a,b){for(var c=0;c+3<=a.length;){var d=a[c],e=a[c+1],f=a[c+2];b[c]=d*this.rawData[0]+e*this.rawData[4]+f*this.rawData[8]+this.rawData[12];b[c+1]=d*this.rawData[1]+e*this.rawData[5]+f*this.rawData[9]+this.rawData[13];b[c+2]=d*this.rawData[2]+e*this.rawData[6]+f*this.rawData[10]+this.rawData[14];c+=3}};I.prototype.transformVectors=I.prototype.xm; I.prototype.Gb=function(){var a=this.rawData.concat();this.rawData[1]=a[4];this.rawData[2]=a[8];this.rawData[3]=a[12];this.rawData[4]=a[1];this.rawData[6]=a[9];this.rawData[7]=a[13];this.rawData[8]=a[2];this.rawData[9]=a[6];this.rawData[11]=a[14];this.rawData[12]=a[3];this.rawData[13]=a[7];this.rawData[14]=a[11]};I.prototype.transpose=I.prototype.Gb;r('flash.geom.Matrix3D.interpolate',function(a,b,c){for(var d=new I,e=0;16>e;){var f=e++;d.rawData[f]=a.rawData[f]+(b.rawData[f]-a.rawData[f])*c}return d}); function Yl(a,b,c,d){var e;e=('undefined'!==typeof e?e:null)||new I;d=Math.PI/180*-d;var f=Math.cos(d);d=Math.sin(d);var g=1-f;e.rawData[0]=f+a*a*g;e.rawData[5]=f+b*b*g;e.rawData[10]=f+c*c*g;var f=a*b*g,l=c*d;e.rawData[4]=f+l;e.rawData[1]=f-l;f=a*c*g;l=b*d;e.rawData[8]=f-l;e.rawData[2]=f+l;f=b*c*g;l=a*d;e.rawData[9]=f+l;e.rawData[6]=f-l;return e} Object.defineProperties(I.prototype,{determinant:{get:function(){return(this.rawData[0]*this.rawData[5]-this.rawData[4]*this.rawData[1])*(this.rawData[10]*this.rawData[15]-this.rawData[14]*this.rawData[11])-(this.rawData[0]*this.rawData[9]-this.rawData[8]*this.rawData[1])*(this.rawData[6]*this.rawData[15]-this.rawData[14]*this.rawData[7])+(this.rawData[0]*this.rawData[13]-this.rawData[12]*this.rawData[1])*(this.rawData[6]*this.rawData[11]-this.rawData[10]*this.rawData[7])+(this.rawData[4]*this.rawData[9]- this.rawData[8]*this.rawData[5])*(this.rawData[2]*this.rawData[15]-this.rawData[14]*this.rawData[3])-(this.rawData[4]*this.rawData[13]-this.rawData[12]*this.rawData[5])*(this.rawData[2]*this.rawData[11]-this.rawData[10]*this.rawData[3])+(this.rawData[8]*this.rawData[13]-this.rawData[12]*this.rawData[9])*(this.rawData[2]*this.rawData[7]-this.rawData[6]*this.rawData[3])}},position:{get:function(){return new H(this.rawData[12],this.rawData[13],this.rawData[14])},set:function(a){this.rawData[12]=a.x; this.rawData[13]=a.y;this.rawData[14]=a.z}}});I.prototype.g={names:[{name:'Matrix3D',h:Lf}]};r(Lf,I);function Zl(){}r('flash.utils.Endian.BIG_ENDIAN',Hc);r('flash.utils.Endian.LITTLE_ENDIAN',rh);Zl.prototype.g={names:[{name:'Endian',h:Vf}]};r(Vf,Zl);function L(){this.bg=Hc;this.dataView=new DataView(new ArrayBuffer(0))}L.prototype.oa=!1;L.prototype.l=0;L.prototype.fg=0;L.prototype.Pl=function(a,b,c){a.position='undefined'!==typeof b?b:0;a.hj(this,this.position,'undefined'!==typeof c?c:0)};L.prototype.readBytes=L.prototype.Pl;L.prototype.hj=function(a,b,c){b='undefined'!==typeof b?b:0;c='undefined'!==typeof c?c:0;0===c&&(c=a.length-b);$l(this,c);a.position=b;for(b=0;b<c;b++)this.fa(a.ni())};L.prototype.writeBytes=L.prototype.hj; L.prototype.Em=function(a){$l(this,1);this.dataView.setInt8(this.l,a?1:0);this.l++};L.prototype.writeBoolean=L.prototype.Em;L.prototype.fa=function(a){$l(this,1);this.dataView.setInt8(this.l,a);this.l++};L.prototype.writeByte=L.prototype.fa;L.prototype.kc=function(a){$l(this,2);this.dataView.setInt16(this.l,a,this.oa);this.l+=2};L.prototype.writeShort=L.prototype.kc;L.prototype.Hm=function(a){$l(this,4);this.dataView.setInt32(this.l,a,this.oa);this.l+=4};L.prototype.writeInt=L.prototype.Hm; L.prototype.bd=function(a){$l(this,4);this.dataView.setUint32(this.l,a,this.oa);this.l+=4};L.prototype.writeUnsignedInt=L.prototype.bd;L.prototype.Gm=function(a){$l(this,4);this.dataView.setFloat32(this.l,a,this.oa);this.l+=4};L.prototype.writeFloat=L.prototype.Gm;L.prototype.Fm=function(a){$l(this,8);this.dataView.setFloat64(this.l,a,this.oa);this.l+=8};L.prototype.writeDouble=L.prototype.Fm; L.prototype.ij=function(a,b){function c(a){return a.charCodeAt(0)}try{var d=(new TextEncoder(b)).encode(a)}catch(f){d=new Uint8Array(a.split(aa).map(c))}for(var e=0;e<d.length;e++)this.fa(d[e])};L.prototype.writeMultiByte=L.prototype.ij;L.prototype.Jm=function(a){var b=this.l+=2;this.pb(a);a=this.l;this.l=b-2;this.kc(b-a);this.l=a};L.prototype.writeUTF=L.prototype.Jm;L.prototype.pb=function(a){this.ij(a,Wj)};L.prototype.writeUTFBytes=L.prototype.pb; L.prototype.Ol=function(){var a=0!=this.dataView.getInt8(this.l);this.l++;return a};L.prototype.readBoolean=L.prototype.Ol;L.prototype.ni=function(){var a=this.dataView.getInt8(this.l);this.l++;return a};L.prototype.readByte=L.prototype.ni;L.prototype.Nc=function(){var a=this.dataView.getUint8(this.l);this.l++;return a};L.prototype.readUnsignedByte=L.prototype.Nc;L.prototype.Vl=function(){var a=this.dataView.getInt16(this.l,this.oa);this.l+=2;return a};L.prototype.readShort=L.prototype.Vl; L.prototype.pi=function(){var a=this.dataView.getUint16(this.l,this.oa);this.l+=2;return a};L.prototype.readUnsignedShort=L.prototype.pi;L.prototype.Tl=function(){var a=this.dataView.getInt32(this.l,this.oa);this.l+=4;return a};L.prototype.readInt=L.prototype.Tl;L.prototype.Xl=function(){var a=this.dataView.getUint32(this.l,this.oa);this.l+=4;return a};L.prototype.readUnsignedInt=L.prototype.Xl;L.prototype.Rl=function(){var a=this.dataView.getFloat32(this.l,this.oa);this.l+=4;return a}; L.prototype.readFloat=L.prototype.Rl;L.prototype.Ql=function(){var a=this.dataView.getFloat64(this.l,this.oa);this.l+=8;return a};L.prototype.readDouble=L.prototype.Ql;L.prototype.oi=function(a,b){var c=new Uint8Array(a);c.set(new Uint8Array(this.dataView.buffer.slice(this.l,this.l+a)));this.l+=a;try{var d=(new TextDecoder(b)).decode(c)}catch(e){d=String.fromCharCode.apply(null,c)}return d};L.prototype.readMultiByte=L.prototype.oi;L.prototype.Wl=function(){return this.bc(this.pi())}; L.prototype.readUTF=L.prototype.Wl;L.prototype.bc=function(a){return this.oi(a,Wj)};L.prototype.readUTFBytes=L.prototype.bc;function $l(a,b){a.l+b>a.length&&(a.length=a.l+b)}L.prototype.Im=h();L.prototype.writeObject=L.prototype.Im;L.prototype.Ul=p(null);L.prototype.readObject=L.prototype.Ul;L.prototype.$j=h();L.prototype.deflate=L.prototype.$j;L.prototype.Oj=h();L.prototype.compress=L.prototype.Oj;L.prototype.Se=h();L.prototype.inflate=L.prototype.Se;L.prototype.ym=h();L.prototype.uncompress=L.prototype.ym; L.prototype.toString=function(){this.position=0;return this.bc(this.length)};L.prototype.toString=L.prototype.toString;L.prototype.clear=function(){this.length=this.position=0};L.prototype.clear=L.prototype.clear;L.prototype.Hj=p(0);L.prototype.atomicCompareAndSwapIntAt=L.prototype.Hj;L.prototype.Ij=p(0);L.prototype.atomicCompareAndSwapLength=L.prototype.Ij; Object.defineProperties(L.prototype,{length:{get:m('fg'),set:function(a){this.fg=a;var b=new Uint8Array(a);b.set(new Uint8Array(this.dataView.buffer.byteLength>a?this.dataView.buffer.slice(0,a):this.dataView.buffer));this.dataView=new DataView(b.buffer)}},bytesAvailable:{get:function(){return this.length-this.position}},position:{get:m('l'),set:k('l')},objectEncoding:{get:p(0),set:h()},endian:{get:m('bg'),set:function(a){this.bg=a;this.oa=a===rh}},shareable:{get:p(!1),set:h()}}); Object.defineProperties(L,{defaultObjectEncoding:{get:p(0),set:h()}});L.prototype.g={names:[{name:'ByteArray',h:Tf}]};r(Tf,L);function M(a,b){this.Gi={};this.R=new I;this.O=new I;this.matr=new z;this.H=new z;this.oe=[];this.ii={};this.cj={};this.qh={};this.Sh={};this.Fa=new vl(null,null,null,WebGLRenderingContext.DYNAMIC_DRAW);this.jl='undefined'!==typeof b?b:!1;this.stage=a;this.canvas=a.canvas;this.ctx=new F;this.ctx.canvas=this.canvas;this.ctx.gl=w(this.canvas.getContext(yk,{alpha:!1,antialias:!1})||this.canvas.getContext(De,{alpha:!1,antialias:!1}),WebGLRenderingContext);this.Ei();this.ctx.ec(cj,ni);this.ctx.fc($h); var c=new Float32Array([0,0,1,0,0,1,1,1]),d=new Uint16Array([0,2,1,2,1,3]);this.bitmapDrawable=new vl(c,c,d,this.ctx.gl.STATIC_DRAW);var e=xc,c=wi;this.hh=this.ctx.createProgram();d=new L;d.pb(e);e=new L;e.pb(c);this.hh.upload(d,e);e=yc;c=xi;this.rh=this.ctx.createProgram();d=new L;d.pb(e);e=new L;e.pb(c);this.rh.upload(d,e);a.addEventListener(Fi,y(this.Ei,this,mj))}M.prototype.globalAlpha=1;M.prototype.globalAlpha=M.prototype.globalAlpha;q=M.prototype;q.Kb=0;q.$b=0;q.Zb=0;q.Wd=!0; q.Ei=function(){this.ctx.Mb(this.stage.stageWidth,this.stage.stageHeight,0,!1)};q.arc=function(a,b,c,d,e){this.currentPath.path.arc(a,b,c,d,e);return null};M.prototype.arc=M.prototype.arc;M.prototype.arcTo=p(null);M.prototype.arcTo=M.prototype.arcTo;M.prototype.beginPath=function(){this.currentPath=new wl;this.currentPath.path=pl.qb();this.currentPath.matr=this.matr;return null};M.prototype.beginPath=M.prototype.beginPath; M.prototype.bezierCurveTo=function(a,b,c,d,e,f){this.currentPath.path.va(a,b,c,d,e,f);return null};M.prototype.bezierCurveTo=M.prototype.bezierCurveTo;M.prototype.clearRect=function(){this.ctx.clear(1,1,1);this.Kb=0;return null};M.prototype.clearRect=M.prototype.clearRect;M.prototype.clip=p(null);M.prototype.clip=M.prototype.clip;M.prototype.closePath=p(null);M.prototype.closePath=M.prototype.closePath;M.prototype.createImageData=p(null);M.prototype.createImageData=M.prototype.createImageData; M.prototype.createLinearGradient=p(null);M.prototype.createLinearGradient=M.prototype.createLinearGradient;M.prototype.createPattern=function(a,b){return new sl(a,b)};M.prototype.createPattern=M.prototype.createPattern;M.prototype.createRadialGradient=p(null);M.prototype.createRadialGradient=M.prototype.createRadialGradient;M.prototype.drawImage=function(a){this.sb(a,this.bitmapDrawable,this.matr,null,!0,this.colorTransform.cb,!0,!0);return null};M.prototype.drawImage=M.prototype.drawImage; M.prototype.Ac=function(a){this.currentPath=a.glpath2d;null==a.glpath2d&&(this.currentPath=a.glpath2d=new wl);this.currentPath.path=a;this.currentPath.matr=this.matr;return null};M.prototype.drawPath=M.prototype.Ac; M.prototype.sb=function(a,b,c,d,e,f,g,l){if(this.jl){if(l||this.Ua)if(null==a||this.Cd!=a){if(0<this.$b){var n=am(this.$b),t=am(this.Zb),u=this.ii[n],v=this.cj[n],G=this.qh[n],E=this.Sh[t];null==u&&(u=this.ii[n]=new ul(new Float32Array(2*n),2,this.ctx.gl.DYNAMIC_DRAW),Zk(Fc,n,this.$b));null==v&&this.Ua&&(v=this.cj[n]=new ul(new Float32Array(2*n),2,this.ctx.gl.DYNAMIC_DRAW));null==G&&this.Wd&&(G=this.qh[n]=new ul(new Uint32Array(n),4,this.ctx.gl.DYNAMIC_DRAW));null==E&&(E=this.Sh[t]=new tl(new Uint16Array(3* t),this.ctx.gl.DYNAMIC_DRAW),Zk(Ec,t,this.Zb));n=u.data;if(this.Ua)var A=v.data;if(this.Wd)var K=G.data;t=E.data;this.Fa.index=E;this.Fa.pos=u;this.Fa.uv=v;this.Fa.color=G;this.Fa.ac=this.Zb;v=u=0;if(this.Ua)var J=this.Cd.width,O=this.Cd.height;G=this.Kb;for(E=0;E<G;E++){var W=this.oe[E],ka=W[1],pa=W[2],ua=W[4],Aa=W[6],sa=W[5];if(this.Ua){var Da=W[3];Da&&(this.H.J(pa),this.H.Ta(),this.H.concat(Da),this.H.b*=-1,this.H.c*=-1,this.H.tx*=-1,this.H.ty*=-1)}var Ea=ka.pos.data;if(this.Ua)var kb=ka.uv.data; for(var W=Ea.length/2,da=0;da<W;da++){var Ha=Ea[2*da],Oa=Ea[2*da+1];ua&&(Ha*=J,Oa*=O);var qb=pa.a*Ha+pa.c*Oa+pa.tx,Ha=pa.d*Oa+pa.b*Ha+pa.ty;n[2*(u+da)]=qb;n[2*(u+da)+1]=Ha;this.Ua&&(Ha=kb[2*da],Oa=kb[2*da+1],Aa&&(Ha*=J,Oa*=O),Da?(qb=this.H.a*Ha+this.H.c*Oa+this.H.tx,Ha=this.H.d*Oa+this.H.b*Ha+this.H.ty,A[2*(u+da)]=qb,A[2*(u+da)+1]=Ha):(A[2*(u+da)]=Ha,A[2*(u+da)+1]=Oa));this.Wd&&(K[u+da]=sa)}ka=ka.index.data;pa=ka.length;for(da=0;da<pa;da++)t[v+da]=ka[da]+u;u+=W;v+=pa}this.Fa.index.N=!0;this.Fa.pos.N= !0;this.Ua&&(this.Fa.uv.N=!0);this.Wd&&(this.Fa.color.N=!0);this.lb(this.Cd,this.Fa,null,null,!1,!1,this.Ua);this.Kb=0}this.Zb=this.$b=0;this.Cd=a;this.Ua=l}b&&(this.$b+=b.pos.data.length/2,this.Zb+=b.index.data.length/3);A=this.oe[this.Kb];null==A&&(A=this.oe[this.Kb]=[]);this.Kb++;A[0]=a;A[1]=b;A[2]=c;A[3]=d;A[4]=e;A[5]=f;A[6]=g;A[7]=l}else if(a){A=b.color;A.N=!0;A=A.data;K=A.length;for(J=0;J<K;J++)A[J]=f;this.lb(a,b,c,d,e,g,l)}};M.prototype.drawImageInternal=M.prototype.sb; M.prototype.lb=function(a,b,c,d,e,f,g){nl++;if(g){var l,n=a.Aj;if(null==n){l=am(a.width);var t=am(a.height),n=new D(l,t,!0,0);n.He(a);var u=this.ctx.createTexture(l,t,Gc,!1);u.Ia(n,1);n=new rl;n.img=a;n.texture=u;n.width=l;n.height=t;a.Aj=n}l=n;this.ctx.Db(this.hh);this.ctx.hc(0,l.texture);this.ctx.mb(2,b.uv.wb(this.ctx),0,Yf)}else this.ctx.Db(this.rh);this.ctx.mb(0,b.pos.wb(this.ctx),0,Yf);this.ctx.mb(1,b.color.wb(this.ctx),0,Bd);c?(this.R.rawData[0]=2*c.a/this.stage.stageWidth,this.R.rawData[1]= 2*-c.b/this.stage.stageHeight,this.R.rawData[4]=2*c.c/this.stage.stageWidth,this.R.rawData[5]=2*-c.d/this.stage.stageHeight,this.R.rawData[12]=2*c.tx/this.stage.stageWidth-1,this.R.rawData[13]=1-2*c.ty/this.stage.stageHeight):(this.R.rawData[0]=2/this.stage.stageWidth,this.R.rawData[1]=0,this.R.rawData[4]=0,this.R.rawData[5]=-2/this.stage.stageHeight,this.R.rawData[12]=-1,this.R.rawData[13]=1);e&&(this.R.rawData[0]*=a.width,this.R.rawData[1]*=a.width,this.R.rawData[4]*=a.height,this.R.rawData[5]*= a.height);this.ctx.pa(kk,0,this.R);g&&(d?(c?(this.H.J(c),this.H.Ta(),this.H.concat(d)):this.H.J(d),this.O.rawData[0]=this.H.a/l.width,this.O.rawData[1]=-this.H.b/l.width,this.O.rawData[4]=-this.H.c/l.height,this.O.rawData[5]=this.H.d/l.height,this.O.rawData[12]=-this.H.tx/l.width,this.O.rawData[13]=-this.H.ty/l.height,f&&(this.O.rawData[0]*=a.width,this.O.rawData[1]*=a.width,this.O.rawData[4]*=a.height,this.O.rawData[5]*=a.height)):(this.O.rawData[0]=1/l.width,this.O.rawData[1]=0,this.O.rawData[4]= 0,this.O.rawData[5]=1/l.height,this.O.rawData[12]=0,this.O.rawData[13]=0,f&&(this.O.rawData[0]*=a.width,this.O.rawData[5]*=a.height)),this.ctx.pa(kk,4,this.O));this.ctx.na(b.index.wb(this.ctx),0,b.ac)}; M.prototype.fill=function(){this.fillStyleIsImage?this.sb(this.fillStyle.image,this.currentPath.drawable,this.currentPath.matr,this.matr,!1,this.colorTransform.cb,0<this.currentPath.path.tris.length,!0):this.currentPath&&this.sb(this.fillStyle,this.currentPath.drawable,this.currentPath.matr,null,!1,this.fillStyle,!1,!1);return null};M.prototype.fill=M.prototype.fill;M.prototype.fillRect=p(null);M.prototype.fillRect=M.prototype.fillRect; M.prototype.fillText=function(a,b,c){var d=this.Gi[a];if(null==d){var d=this.Gi[a]=w(document.createElement(Ed),HTMLCanvasElement),e=w(d.getContext(tb),CanvasRenderingContext2D);e.font=this.font;var f=e.measureText(a);d.width=f.width;d.height=this.font.substr(0,this.font.indexOf(zi))>>0;e.font=this.font;e.textBaseline=yj;e.fillStyle=this.fillStyle;e.fillText(a,0,0)}this.H.J(this.matr);this.H.translate(b,c);this.sb(d,this.bitmapDrawable,this.H.clone(),null,!0,this.colorTransform.cb,!0,!0);return null}; M.prototype.fillText=M.prototype.fillText;M.prototype.getImageData=p(null);M.prototype.getImageData=M.prototype.getImageData;M.prototype.isPointInPath=p(!1);M.prototype.isPointInPath=M.prototype.isPointInPath;M.prototype.lineTo=function(a,b){this.currentPath.path.lineTo(a,b);return null};M.prototype.lineTo=M.prototype.lineTo;M.prototype.measureText=p(null);M.prototype.measureText=M.prototype.measureText;M.prototype.moveTo=function(a,b){this.currentPath.path.moveTo(a,b);return null}; M.prototype.moveTo=M.prototype.moveTo;M.prototype.putImageData=p(null);M.prototype.putImageData=M.prototype.putImageData;M.prototype.quadraticCurveTo=function(a,b,c,d){this.currentPath.path.ea(a,b,c,d);return null};M.prototype.quadraticCurveTo=M.prototype.quadraticCurveTo;M.prototype.rect=function(a,b,c,d){this.currentPath.path.moveTo(a,b);this.currentPath.path.lineTo(a+c,b);this.currentPath.path.lineTo(a+c,b+d);this.currentPath.path.lineTo(a,b+d);this.currentPath.path.closePath();return null}; M.prototype.rect=M.prototype.rect;M.prototype.setTransform=p(null);M.prototype.setTransform=M.prototype.setTransform;M.prototype.uf=function(a){this.matr=a;return null};M.prototype.setTransform2=M.prototype.uf;M.prototype.stroke=p(null);M.prototype.stroke=M.prototype.stroke;M.prototype.strokeRect=p(null);M.prototype.strokeRect=M.prototype.strokeRect;M.prototype.strokeText=p(null);M.prototype.strokeText=M.prototype.strokeText; M.prototype.Hi=function(a){var b=this.matr.a/a.a,c=0,d=0,e=this.matr.d/a.d,f=this.matr.tx/a.a+a.tx/a.a,g=this.matr.ty/a.d+a.ty/a.d;if(0!=this.matr.b||0!=this.matr.c||0!=a.b||0!=a.c)b+=this.matr.b*a.c,e+=this.matr.c*a.b,c+=this.matr.a*a.b+this.matr.b*a.d,d+=this.matr.c*a.a+this.matr.d*a.c,f+=this.matr.ty*a.c,g+=this.matr.tx*a.b;a.a=b;a.b=c;a.c=d;a.d=e;a.tx=f;a.ty=g;this.matr=a;return null};M.prototype.transform2=M.prototype.Hi;function am(a){for(var b=1;b<a;)b*=2;return b} M.prototype.g={names:[{name:'GLCanvasRenderingContext2D',h:Je}]};r(Je,M);function bm(){this.array=[]}bm.prototype.length=0;bm.prototype.length=bm.prototype.length;bm.prototype.push=function(a){this.array[this.length++]=a};bm.prototype.push=bm.prototype.push;bm.prototype.g={names:[{name:'MemArray',h:Qe}]};r(Qe,bm);function cm(){B.call(this);this.polys=new bm}Pk(cm,B);cm.prototype.clear=function(){for(var a=this.polys.array.length,b=0;b<a;b++)this.polys.array[b].length=0;this.polys.length=0;this.tris.length=0};cm.prototype.clear=cm.prototype.clear;cm.prototype.moveTo=function(a,b){dm(this);this.W.push(a);this.W.push(b)};cm.prototype.moveTo=cm.prototype.moveTo;cm.prototype.lineTo=function(a,b){null==this.W&&dm(this);this.W.push(a);this.W.push(b)};cm.prototype.lineTo=cm.prototype.lineTo; cm.prototype.ea=function(a,b,c,d){null==this.W&&dm(this);this.W.push(a);this.W.push(b);this.W.push(c);this.W.push(d)};cm.prototype.curveTo=cm.prototype.ea;cm.prototype.va=function(a,b,c,d,e,f){null==this.W&&dm(this);this.W.push(a);this.W.push(b);this.W.push(c);this.W.push(d);this.W.push(e);this.W.push(f)};cm.prototype.cubicCurveTo=cm.prototype.va;cm.prototype.Qf=function(a,b){this.lineTo(a,b)};cm.prototype.wideLineTo=cm.prototype.Qf;cm.prototype.Rf=function(a,b){this.moveTo(a,b)}; cm.prototype.wideMoveTo=cm.prototype.Rf;cm.prototype.arc=function(a,b,c,d,e){var f=Math.PI/4,g=0,l=Math.sin(f),n=Math.cos(f);for(this.moveTo(c+a,g+b);d<e;d+=f){var t=c;c=c*n-g*l;g=t*l+g*n;this.lineTo(c+a,g+b)}};cm.prototype.arc=cm.prototype.arc;cm.prototype.rect=function(a,b,c,d){this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d)};function dm(a){a.W=a.polys.array[a.polys.length];null==a.W&&(a.W=a.polys.array[a.polys.length]=new bm);a.polys.length++} cm.prototype.g={names:[{name:'GLGraphicsPath',h:Le}]};r(Le,cm);function em(){this.Ub=new hl}Pk(em,kl);em.prototype.qb=function(){return new cm};em.prototype.createPath=em.prototype.qb;em.prototype.Sa=function(a,b,c){return((a>>16&255)*c.redMultiplier+c.redOffset<<0|(a>>8&255)*c.greenMultiplier+c.greenOffset<<8|(a&255)*c.greenMultiplier+c.greenOffset<<16|255*(b*c.alphaMultiplier+c.alphaOffset)<<24)>>>0};em.prototype.getCssColor=em.prototype.Sa;em.prototype.lb=function(a,b,c,d,e){a.sb(b.image,a.bitmapDrawable,c,null,!0,e.cb,!0,!0)};em.prototype.renderImage=em.prototype.lb; em.prototype.dc=function(a,b,c,d,e){a.uf(c);a.globalCompositeOperation=d;a.colorTransform=e;c=b.graphicsData.length;for(d=0;d<c;d++)b.graphicsData[d].aa(a,e);b.lastFill&&(this.Ub.fill=b.lastFill,this.Ub._worldMatrix=b._worldMatrix,this.Ub.aa(a,e));b.lastStroke&&a.stroke();a.fillStyle=null;a.strokeStyle=null};em.prototype.renderGraphics=em.prototype.dc; em.prototype.Oc=function(a,b,c,d,e,f,g,l){a.colorTransform=f;a.globalCompositeOperation=e;a.uf(d);a.font=c.Xj;a.fillStyle=c.Yj;a.textBaseline=yj;a.fillText(b,g,l)};em.prototype.renderText=em.prototype.Oc;em.prototype.finish=function(a){a.sb(null,null,null,null,!0,null,!0,!0)};em.prototype.finish=em.prototype.finish;em.prototype.g={names:[{name:'WebGLRenderer',h:Re}]};r(Re,em);function fm(){Kl.call(this)}Pk(fm,Kl);r('flash.display.LoaderInfo.getLoaderInfoByDefinition',p(null)); Object.defineProperties(fm.prototype,{loaderURL:{get:p(null)},url:{get:p(null)},isURLInaccessible:{get:p(!1)},bytesLoaded:{get:p(0)},bytesTotal:{get:p(0)},swfVersion:{get:p(0)},actionScriptVersion:{get:p(0)},frameRate:{get:p(0)},parameters:{get:function(){var a=null,b={};for(a in null)b[a]=null[a];return b}},width:{get:p(0)},height:{get:p(0)},contentType:{get:p(null)},sharedEvents:{get:p(null)},parentSandboxBridge:{get:p(null),set:h()},childSandboxBridge:{get:p(null),set:h()},sameDomain:{get:p(!1)}, childAllowsParent:{get:p(!1)},parentAllowsChild:{get:p(!1)},loader:{get:p(null)},content:{get:m('rj'),set:k('rj')},bytes:{get:p(null)}});fm.prototype.g={names:[{name:'LoaderInfo',h:gf}]};r(gf,fm);function gm(){Kl.call(this)}Pk(gm,Kl);gm.prototype.of=function(){this.$d=new F;var a=w(document.createElement(Ed),HTMLCanvasElement);this.$d.canvas=a;a.style.position=dc;a.style.left=0;a.style.top=0;a.style.zIndex=0;document.body.appendChild(a);this.$d.gl=w(a.getContext(yk,{alpha:!1,antialias:!1})||a.getContext(De,{alpha:!1,antialias:!1}),WebGLRenderingContext);this.dispatchEvent(new Sl(Sd))};gm.prototype.requestContext3D=gm.prototype.of;gm.prototype.si=function(){this.of()}; gm.prototype.requestContext3DMatchingProfiles=gm.prototype.si;Object.defineProperties(gm.prototype,{context3D:{get:m('$d')},x:{get:p(0),set:h()},y:{get:p(0),set:h()},visible:{get:p(!1),set:h()}});gm.prototype.g={names:[{name:'Stage3D',h:kf}]};r(kf,gm);function hm(a,b,c,d,e,f,g,l,n){d='undefined'!==typeof d?d:0;e='undefined'!==typeof e?e:0;f='undefined'!==typeof f?f:0;g='undefined'!==typeof g?g:!1;l='undefined'!==typeof l?l:!1;n='undefined'!==typeof n?n:!1;Sl.call(this,a,'undefined'!==typeof b?b:!0,'undefined'!==typeof c?c:!1);this.charCode=d;this.keyCode=e;this.keyLocation=f;this.ctrlKey=g;this.altKey=l;this.shiftKey=n}Pk(hm,Sl);r('flash.events.KeyboardEvent.KEY_DOWN',gh);r('flash.events.KeyboardEvent.KEY_UP',hh); hm.prototype.clone=function(){return new hm(this.type,this.bubbles,this.cancelable,this.charCode,this.keyCode,this.keyLocation,this.ctrlKey,this.altKey,this.shiftKey)};hm.prototype.clone=hm.prototype.clone;hm.prototype.toString=function(){return this.vb()};hm.prototype.toString=hm.prototype.toString;hm.prototype.Zc=h();hm.prototype.updateAfterEvent=hm.prototype.Zc; Object.defineProperties(hm.prototype,{charCode:{get:p(0),set:h()},keyCode:{get:m('rl'),set:k('rl')},keyLocation:{get:m('sl'),set:k('sl')},ctrlKey:{get:m('Ya'),set:k('Ya')},altKey:{get:m('Xa'),set:k('Xa')},shiftKey:{get:m('Za'),set:k('Za')}});hm.prototype.g={names:[{name:'KeyboardEvent',h:Ff}]};r(Ff,hm);function im(a,b,c,d,e,f,g,l,n,t,u){d='undefined'!==typeof d?d:void 0;e='undefined'!==typeof e?e:void 0;f='undefined'!==typeof f?f:null;g='undefined'!==typeof g?g:!1;l='undefined'!==typeof l?l:!1;n='undefined'!==typeof n?n:!1;t='undefined'!==typeof t?t:!1;u='undefined'!==typeof u?u:0;Sl.call(this,a,'undefined'!==typeof b?b:!0,'undefined'!==typeof c?c:!1);this.ce=d;this.de=e;this.yb=f;this.Ya=g;this.Xa=l;this.Za=n;this.We=t;this.Xe=u}Pk(im,Sl);r('flash.events.MouseEvent.CLICK',Md); r('flash.events.MouseEvent.DOUBLE_CLICK',fe);r('flash.events.MouseEvent.MOUSE_DOWN',Ch);r('flash.events.MouseEvent.MOUSE_MOVE',Dh);r('flash.events.MouseEvent.MOUSE_OUT',Eh);r('flash.events.MouseEvent.MOUSE_OVER',Fh);r('flash.events.MouseEvent.MOUSE_UP',Gh);r('flash.events.MouseEvent.RELEASE_OUTSIDE','releaseOutside');r('flash.events.MouseEvent.MOUSE_WHEEL',Hh);r('flash.events.MouseEvent.ROLL_OUT','rollOut');r('flash.events.MouseEvent.ROLL_OVER',Ki);r('flash.events.MouseEvent.MIDDLE_CLICK','middleClick'); r('flash.events.MouseEvent.MIDDLE_MOUSE_DOWN','middleMouseDown');r('flash.events.MouseEvent.MIDDLE_MOUSE_UP','middleMouseUp');r('flash.events.MouseEvent.RIGHT_CLICK','rightClick');r('flash.events.MouseEvent.RIGHT_MOUSE_DOWN','rightMouseDown');r('flash.events.MouseEvent.RIGHT_MOUSE_UP','rightMouseUp');r('flash.events.MouseEvent.CONTEXT_MENU',Td);im.prototype.ce=0;im.prototype.de=0; im.prototype.clone=function(){return new im(this.type,this.bubbles,this.cancelable,this.localX,this.localY,this.yb,this.Ya,this.Xa,this.Za,this.We,this.Xe)};im.prototype.clone=im.prototype.clone;im.prototype.toString=function(){return this.vb()};im.prototype.toString=im.prototype.toString;im.prototype.Zc=h();im.prototype.updateAfterEvent=im.prototype.Zc; Object.defineProperties(im.prototype,{localX:{get:m('ce'),set:k('ce')},localY:{get:m('de'),set:k('de')},relatedObject:{get:m('yb'),set:k('yb')},ctrlKey:{get:m('Ya'),set:k('Ya')},altKey:{get:m('Xa'),set:k('Xa')},shiftKey:{get:m('Za'),set:k('Za')},buttonDown:{get:m('We'),set:k('We')},delta:{get:m('Xe'),set:k('Xe')},stageX:{get:function(){return isNaN(this.localX)||isNaN(this.localY)?Number.NaN:0}},stageY:{get:function(){return isNaN(this.localX)||isNaN(this.localY)?Number.NaN:0}},isRelatedObjectInaccessible:{get:m('Ze'), set:k('Ze')},movementX:{get:p(0),set:h()},movementY:{get:p(0),set:h()}});im.prototype.g={names:[{name:'MouseEvent',h:Gf}]};r(Gf,im);function jm(a,b,c,d,e,f,g,l,n,t,u,v,G,E){d='undefined'!==typeof d?d:0;e='undefined'!==typeof e?e:!1;f='undefined'!==typeof f?f:NaN;g='undefined'!==typeof g?g:NaN;l='undefined'!==typeof l?l:NaN;n='undefined'!==typeof n?n:NaN;t='undefined'!==typeof t?t:NaN;u='undefined'!==typeof u?u:null;v='undefined'!==typeof v?v:!1;G='undefined'!==typeof G?G:!1;E='undefined'!==typeof E?E:!1;Sl.call(this,a,'undefined'!==typeof b?b:!0,'undefined'!==typeof c?c:!1);this.df=d;this.Ye=e;this.localX=f;this.localY=g;this.af= l;this.bf=n;this.$e=t;this.yb=u;this.Ya=v;this.Xa=G;this.Za=E}Pk(jm,Sl);r('flash.events.TouchEvent.TOUCH_BEGIN',zj);r('flash.events.TouchEvent.TOUCH_END',Aj);r('flash.events.TouchEvent.TOUCH_MOVE',Bj);r('flash.events.TouchEvent.TOUCH_OVER','touchOver');r('flash.events.TouchEvent.TOUCH_OUT','touchOut');r('flash.events.TouchEvent.TOUCH_ROLL_OVER','touchRollOver');r('flash.events.TouchEvent.TOUCH_ROLL_OUT','touchRollOut');r('flash.events.TouchEvent.TOUCH_TAP','touchTap'); r('flash.events.TouchEvent.PROXIMITY_BEGIN','proximityBegin');r('flash.events.TouchEvent.PROXIMITY_END','proximityEnd');r('flash.events.TouchEvent.PROXIMITY_MOVE','proximityMove');r('flash.events.TouchEvent.PROXIMITY_OUT','proximityOut');r('flash.events.TouchEvent.PROXIMITY_OVER','proximityOver');r('flash.events.TouchEvent.PROXIMITY_ROLL_OUT','proximityRollOut');r('flash.events.TouchEvent.PROXIMITY_ROLL_OVER','proximityRollOver'); jm.prototype.clone=function(){return new jm(this.type,this.bubbles,this.cancelable,this.df,this.Ye,this.localX,this.localY,this.af,this.bf,this.$e,this.yb,this.Ya,this.Xa,this.Za)};jm.prototype.clone=jm.prototype.clone;jm.prototype.toString=function(){return this.vb()};jm.prototype.toString=jm.prototype.toString;jm.prototype.Zc=h();jm.prototype.updateAfterEvent=jm.prototype.Zc; Object.defineProperties(jm.prototype,{localX:{get:p(0),set:h()},localY:{get:p(0),set:h()},touchPointID:{get:m('df'),set:k('df')},isPrimaryTouchPoint:{get:m('Ye'),set:k('Ye')},sizeX:{get:m('af'),set:k('af')},sizeY:{get:m('bf'),set:k('bf')},pressure:{get:m('$e'),set:k('$e')},relatedObject:{get:m('yb'),set:k('yb')},ctrlKey:{get:m('Ya'),set:k('Ya')},altKey:{get:m('Xa'),set:k('Xa')},shiftKey:{get:m('Za'),set:k('Za')},stageX:{get:function(){return isNaN(this.localX)||isNaN(this.localY)?Number.NaN:0}},stageY:{get:function(){return isNaN(this.localX)|| isNaN(this.localY)?Number.NaN:0}},isRelatedObjectInaccessible:{get:m('Ze'),set:k('Ze')}});jm.prototype.g={names:[{name:'TouchEvent',h:If}]};r(If,jm);function km(){Kl.call(this);this.gj();this.vj=new fm;0===ol&&(ol=Date.now());this.frameRate=60;this.sa();this.yj=[new gm,new gm,new gm,new gm].slice();window.addEventListener(Fi,y(this.gj,this,Bk),!1)}Pk(km,Kl);q=km.prototype;q.La=0;q.Ma=0;q.Dd=!1;q.ff=!1;q.gj=function(){this.ie=window.innerWidth;this.he=window.innerHeight;this.canvas.width=this.ie;this.canvas.height=this.he;this.canvas.style.width=this.ie+zi;this.canvas.style.height=this.he+zi;this.dispatchEvent(new Sl(Fi))}; q.sa=function(){ql.call(window,y(this.sa,this,ac));this.Dd&&(this.dispatchEvent(new im(Dh,!0,!1,this.La,this.Ma)),this.Dd=!1);this.ff&&(this.dispatchEvent(new jm(Bj,!0,!1,0,!0,this.La,this.Ma)),this.ff=!1);this.dispatchEvent(new Sl(ne))};q.il=h();km.prototype.invalidate=km.prototype.il;km.prototype.ll=p(!1);km.prototype.isFocusInaccessible=km.prototype.ll; km.prototype.nd=function(a){var b,c;switch(a.type){case Cj:b=Aj;c=Gh;break;case Dj:b=Aj;c=Gh;break;case Ej:b=Bj;c=Dh;break;case Fj:b=zj,c=Ch,a.preventDefault()}b&&(a.targetTouches.length&&(this.La=a.targetTouches[0].pageX-this.canvas.offsetLeft,this.Ma=a.targetTouches[0].pageY-this.canvas.offsetTop),this.Ea(b)&&(b!=Bj?this.dispatchEvent(new jm(b,!0,!1,0,!0,this.La,this.Ma)):this.ff=!0),this.Ea(c)&&(c!=Dh?this.dispatchEvent(new im(c,!0,!1,this.La,this.Ma)):this.Dd=!0),b===Aj&&this.Ea(Md)&&this.dispatchEvent(new im(Md, !0,!1,this.La,this.Ma)))};km.prototype.oh=function(a){var b;switch(a.type){case ih:b=gh;break;case kh:b=hh}this.Ea(b)&&this.dispatchEvent(new hm(b,!0,!1,a.charCode,a.keyCode,a.location,a.ctrlKey,a.altKey,a.shiftKey))}; km.prototype.ta=function(a){var b;switch(a.type){case Md:b=Md;break;case Ud:b=Td;break;case Zd:b=fe;break;case Ih:b=Ch;break;case Jh:b=Ki;break;case Kh:b=Eh;break;case Lh:b=Dh;break;case Nh:b=Fh;break;case Mh:b=Eh;break;case Oh:b=Gh;break;case Ph:b=Hh}b&&(this.La=a.pageX-this.canvas.offsetLeft,this.Ma=a.pageY-this.canvas.offsetTop,this.Ea(b)&&(b!=Dh?this.dispatchEvent(new im(b,!0,!1,this.La,this.Ma,null,a.ctrlKey,a.altKey,a.shiftKey,0<a.button,a.wheelDelta)):this.Dd=!0))}; Object.defineProperties(km.prototype,{frameRate:{get:m('tj'),set:k('tj')},loaderInfo:{get:m('vj')},scaleMode:{get:p(null),set:h()},align:{get:p(null),set:h()},stageWidth:{get:m('ie'),set:h()},stageHeight:{get:m('he'),set:h()},showDefaultContextMenu:{get:p(!1),set:h()},colorCorrection:{get:p(null),set:h()},colorCorrectionSupport:{get:p(null)},stageFocusRect:{get:p(!1),set:h()},quality:{get:p(null),set:h()},displayState:{get:function(){return document.fullscreen||document.webkitIsFullScreen||document.mozFullScreen? lg:bi},set:function(a){-1!=a.indexOf(lg)?(this.K.requestFullscreen||this.K.webkitRequestFullScreen||this.K.mozRequestFullScreen||this.K.msRequestFullscreen).call(this.K):(document.exitFullscreen||document.webkitExitFullScreen||document.mozCancelFullScreen||document.msExitFullscreen).call(document)}},fullScreenSourceRect:{get:p(null),set:h()},mouseLock:{get:p(!1),set:h()},stage3Ds:{get:m('yj')},color:{get:p(0),set:h()},fullScreenWidth:{get:p(0)},fullScreenHeight:{get:p(0)},wmodeGPU:{get:p(!1)},softKeyboardRect:{get:p(null)}, allowsFullScreen:{get:p(!1)},allowsFullScreenInteractive:{get:p(!1)},contentsScaleFactor:{get:p(0)},browserZoomFactor:{get:p(0)},canvas:{get:function(){this.K||(this.K=w(document.createElement(Ed),HTMLCanvasElement),this.K.addEventListener(Md,y(this.ta,this,Gd),!1),this.K.addEventListener(Ud,y(this.ta,this,Gd),!1),this.K.addEventListener(Zd,y(this.ta,this,Gd),!1),this.K.addEventListener(Ih,y(this.ta,this,Gd),!1),this.K.addEventListener(Jh,y(this.ta,this,Gd),!1),this.K.addEventListener(Kh,y(this.ta, this,Gd),!1),this.K.addEventListener(Lh,y(this.ta,this,Gd),!1),this.K.addEventListener(Nh,y(this.ta,this,Gd),!1),this.K.addEventListener(Mh,y(this.ta,this,Gd),!1),this.K.addEventListener(Oh,y(this.ta,this,Gd),!1),this.K.addEventListener(Ph,y(this.ta,this,Gd),!1),this.K.addEventListener(Cj,y(this.nd,this,Hd),!1),this.K.addEventListener(Dj,y(this.nd,this,Hd),!1),this.K.addEventListener(Ej,y(this.nd,this,Hd),!1),this.K.addEventListener(Fj,y(this.nd,this,Hd),!1),document.addEventListener(ih,y(this.oh, this,Fd),!1),document.addEventListener(kh,y(this.oh,this,Fd),!1),this.K.style.position=dc,this.K.style.left=0,this.K.style.top=0,this.K.style.zIndex=1,document.body.appendChild(w(this.K,HTMLCanvasElement)));return this.K}},ctx:{get:function(){this.Yf||(this.Yf=this.canvas.getContext(tb));return this.Yf}},ctx2d:{get:function(){if(!this.Zf){var a=w(document.createElement(Ed),HTMLCanvasElement);this.Zf=w(a.getContext(tb),CanvasRenderingContext2D)}return this.Zf}},displayContextInfo:{get:p(null)},mouseX:{get:m('La')}, mouseY:{get:m('Ma')}});km.prototype.g={names:[{name:'Stage',h:jf}]};r(jf,km);function lm(a,b,c,d,e,f,g,l){this.redMultiplier='undefined'!==typeof a?a:1;this.greenMultiplier='undefined'!==typeof b?b:1;this.blueMultiplier='undefined'!==typeof c?c:1;this.alphaMultiplier='undefined'!==typeof d?d:1;this.redOffset='undefined'!==typeof e?e:0;this.greenOffset='undefined'!==typeof f?f:0;this.blueOffset='undefined'!==typeof g?g:0;this.alphaOffset='undefined'!==typeof l?l:0}lm.prototype.cb=4294967295;lm.prototype.tint=lm.prototype.cb; lm.prototype.concat=function(a){this.alphaOffset+=this.alphaMultiplier*a.alphaOffset;this.alphaMultiplier*=a.alphaMultiplier;this.redOffset+=this.redMultiplier*a.redOffset;this.redMultiplier*=a.redMultiplier;this.greenOffset+=this.greenMultiplier*a.greenOffset;this.greenMultiplier*=a.greenMultiplier;this.blueOffset+=this.blueMultiplier*a.blueOffset;this.blueMultiplier*=a.blueMultiplier};lm.prototype.concat=lm.prototype.concat; lm.prototype.toString=function(){return Ca+this.redMultiplier+bb+this.greenMultiplier+Wa+this.blueMultiplier+Ta+this.alphaMultiplier+fb+this.redOffset+cb+this.greenOffset+Xa+this.blueOffset+Ua+this.alphaOffset+Ga};lm.prototype.toString=lm.prototype.toString; Object.defineProperties(lm.prototype,{color:{get:function(){return this.redOffset<<16|this.greenOffset<<8|this.blueOffset},set:function(a){this.redMultiplier=this.greenMultiplier=this.blueMultiplier=0;this.redOffset=a>>16&255;this.greenOffset=a>>8&255;this.blueOffset=a&255}},redMultiplier:{get:m('tc'),set:function(a){this.tc=a;this.cb=255*this.tc<<0|255*this.rc<<8|255*this.nc<<16|255*this.mc<<24}},greenMultiplier:{get:m('rc'),set:function(a){this.rc=a;this.cb=255*this.tc<<0|255*this.rc<<8|255*this.nc<< 16|255*this.mc<<24}},blueMultiplier:{get:m('nc'),set:function(a){this.nc=a;this.cb=255*this.tc<<0|255*this.rc<<8|255*this.nc<<16|255*this.mc<<24}},alphaMultiplier:{get:m('mc'),set:function(a){this.mc=a;this.cb=255*this.tc<<0|255*this.rc<<8|255*this.nc<<16|255*this.mc<<24}}});lm.prototype.g={names:[{name:'ColorTransform',h:Jf}]};r(Jf,lm);function mm(a){this.L=new z;this.Aa=new lm;this.Ba=new lm;this.Zd=new z;this.be=new z;this.rb(a)}q=mm.prototype;q.ue=!0;q.N=!0;q.Te=!0;q.rb=k('rd');q.sk=p(null);mm.prototype.getRelativeMatrix3D=mm.prototype.sk;mm.prototype.I=function(){this.Te=this.N=!0};mm.prototype.updateTransforms=mm.prototype.I;mm.prototype.Mf=function(){this.ue=!0};mm.prototype.updateColorTransforms=mm.prototype.Mf; Object.defineProperties(mm.prototype,{matrix:{get:m('L'),set:function(a){this.L=a;this.I()}},colorTransform:{get:m('Aa'),set:function(a){this.Aa=a;this.Mf()}},concatenatedMatrix:{get:function(){this.N&&(this.Zd.J(this.matrix),this.rd.parent&&this.Zd.concat(this.rd.parent.transform.concatenatedMatrix),this.N=!1);return this.Zd}},concatenatedColorTransform:{get:function(){this.ue&&(this.Ba.alphaOffset=this.Aa.alphaOffset,this.Ba.alphaMultiplier=this.Aa.alphaMultiplier,this.Ba.redOffset=this.Aa.redOffset, this.Ba.redMultiplier=this.Aa.redMultiplier,this.Ba.greenOffset=this.Aa.greenOffset,this.Ba.greenMultiplier=this.Aa.greenMultiplier,this.Ba.blueOffset=this.Aa.blueOffset,this.Ba.blueMultiplier=this.Aa.blueMultiplier,this.rd.parent&&this.Ba.concat(this.rd.parent.transform.concatenatedColorTransform),this.ue=!1);return this.Ba}},pixelBounds:{get:p(null)},matrix3D:{get:p(null),set:h()},perspectiveProjection:{get:p(null),set:h()},invMatrix:{get:function(){this.Te&&(this.be.J(this.concatenatedMatrix), this.be.Ta(),this.Te=!1);return this.be}}});mm.prototype.g={names:[{name:'Transform',h:Pf}]};r(Pf,mm);r('flash.utils.getTimer',function(){return Date.now()-ol});function N(){Kl.call(this);this.transform=new mm(this);this.innerID=nm++;this.name=dh+this.innerID;0===this.innerID&&(this.ca=new km,this.ca.addEventListener(ne,y(this.nj,this,Zb)),this.ca.addEventListener(Md,y(this.Ib,this,$b)),this.ca.addEventListener(Td,y(this.Ib,this,$b)),this.ca.addEventListener(fe,y(this.Ib,this,$b)),this.ca.addEventListener(Ch,y(this.Ib,this,$b)),this.ca.addEventListener(Dh,y(this.Ib,this,$b)),this.ca.addEventListener(Gh,y(this.Ib,this,$b)))}Pk(N,Kl);var nm=0;q=N.prototype; q.lg=0;q.Pc=0;q.Lc=1;q.uc=!0;q.I=function(){this.transform.I()};N.prototype.updateTransforms=N.prototype.I;N.prototype.Ih=function(a){return this.transform.invMatrix.Uc(a)};N.prototype.globalToLocal=N.prototype.Ih;N.prototype.ol=function(a){return this.transform.concatenatedMatrix.Uc(a)};N.prototype.localToGlobal=N.prototype.ol;N.prototype.lk=function(a){return this.gb(a)};N.prototype.getBounds=N.prototype.lk;N.prototype.gb=function(a){var b=this.Hb();return!b||null!=a&&a!=this?this.Hb():b}; N.prototype.getRect=N.prototype.gb;N.prototype.Hb=p(null);N.prototype.__getRect=N.prototype.Hb;N.prototype.yk=p(!1);N.prototype.hitTestObject=N.prototype.yk;N.prototype.Kh=function(a,b){var c=this.Hb();return c?c.th(this.Ih(new gl(a,b))):!1};N.prototype.hitTestPoint=N.prototype.Kh;N.prototype.vk=p(null);N.prototype.globalToLocal3D=N.prototype.vk;N.prototype.nl=p(null);N.prototype.local3DToGlobal=N.prototype.nl;N.prototype.sa=h();N.prototype.__update=N.prototype.sa; N.prototype.nj=function(){var a=this.stage.ctx;a.setTransform(1,0,0,1,0,0);a.clearRect(0,0,this.stage.stageWidth,this.stage.stageHeight);ml=0;pl.start(a);this.sa(a);pl.finish(a)}; N.prototype.Ib=function(a){var b=this.lc(a);if(a.type===Dh){for(var c=this.ml;c&&c!=b;)c.dispatchEvent(new im(Eh,!1,!1,a.localX,a.localY)),c.dispatchEvent(new im(Ki,!1,!1,a.localX,a.localY)),c=c.parent;var d=new im(Fh,!0,!1,a.localX,a.localY),e=new im(Ki,!0,!1,a.localX,a.localY);b&&b!=c&&(b.dispatchEvent(d),b.dispatchEvent(e));this.ml=b}b&&b.dispatchEvent(a)};N.prototype.lc=p(null); N.prototype.dispatchEvent=function(a){var b=N.Z.dispatchEvent.call(this,a);a.bubbles&&this.parent&&this.parent.dispatchEvent(a);return b};N.prototype.dispatchEvent=N.prototype.dispatchEvent; Object.defineProperties(N.prototype,{stage:{get:m('ca'),set:function(a){this.ca!=a&&((this.ca=a)?this.dispatchEvent(new Sl(fc)):this.dispatchEvent(new Sl(Ci)))}},root:{get:p(null)},name:{get:m('Ca'),set:k('Ca')},parent:{get:m('_parent')},mask:{get:p(null),set:h()},visible:{get:m('uc'),set:k('uc')},x:{get:function(){return this.transform.matrix.tx},set:function(a){this.transform.matrix.tx=a;this.I()}},y:{get:function(){return this.transform.matrix.ty},set:function(a){this.transform.matrix.ty=a;this.I()}}, z:{get:p(0),set:h()},scaleX:{get:function(){var a=this.transform.matrix;return 0===a.b?a.a:Math.sqrt(a.a*a.a+a.b*a.b)},set:function(a){var b=this.transform.matrix;0===b.c?b.a=a:(b.a=this.Lc*a,b.b=this.Pc*a);this.I()}},scaleY:{get:function(){var a=this.transform.matrix;return 0===a.c?a.d:Math.sqrt(a.c*a.c+a.d*a.d)},set:function(a){var b=this.transform.matrix;0===b.c?b.d=a:(b.c=-this.Pc*a,b.d=this.Lc*a);this.I()}},scaleZ:{get:p(1),set:h()},mouseX:{get:function(){return this.stage?this.transform.invMatrix.Uc(new gl(this.stage.mouseX, this.stage.mouseY)).x:0}},mouseY:{get:function(){return this.stage?this.transform.invMatrix.Uc(new gl(this.stage.mouseX,this.stage.mouseY)).y:0}},rotation:{get:m('lg'),set:function(a){this.lg=a;var b=this.transform.matrix;a=a*Math.PI/180;this.Pc=Math.sin(a);this.Lc=Math.cos(a);a=0===b.b?b.a:Math.sqrt(b.a*b.a+b.b*b.b);var c=0===b.c?b.d:Math.sqrt(b.c*b.c+b.d*b.d);b.a=this.Lc*a;b.b=this.Pc*a;b.c=-this.Pc*c;b.d=this.Lc*c;this.I()}},rotationX:{get:p(0),set:h()},rotationY:{get:p(0),set:h()},rotationZ:{get:p(0), set:h()},alpha:{get:function(){return this.transform.colorTransform.alphaMultiplier},set:function(a){this.transform.colorTransform.alphaMultiplier=a;this.transform.Mf()}},width:{get:function(){var a=this.gb(this.parent);return a?a.width:0},set:h()},height:{get:function(){var a=this.gb(this.parent);return a?a.height:0},set:h()},cacheAsBitmap:{get:p(!1),set:h()},opaqueBackground:{get:p(null),set:h()},scrollRect:{get:p(null),set:h()},filters:{get:p(null),set:h()},blendMode:{get:m('oj'),set:k('oj')}, scale9Grid:{get:p(null),set:h()},metaData:{get:p(null),set:h()}});N.prototype.g={names:[{name:'DisplayObject',h:Ue}],ja:[xl]};r(Ue,N);function om(){N.call(this)}Pk(om,N);om.prototype.ig=!0;om.prototype.ag=!1;om.prototype.Zl=p(!1);om.prototype.requestSoftKeyboard=om.prototype.Zl;Object.defineProperties(om.prototype,{tabEnabled:{get:p(!0),set:h()},tabIndex:{get:p(0),set:h()},focusRect:{get:p(null),set:h()},mouseEnabled:{get:m('ig'),set:k('ig')},doubleClickEnabled:{get:m('ag'),set:k('ag')},softKeyboardInputAreaOfInterest:{get:p(null),set:h()},needsSoftKeyboard:{get:p(!1),set:h()}}); om.prototype.g={names:[{name:'InteractiveObject',h:ff}]};r(ff,om);function P(){this.children=[];N.call(this)}Pk(P,om);P.prototype.hg=!0;P.prototype.fb=function(a){return this.me(a,this.children.length)};P.prototype.addChild=P.prototype.fb;P.prototype.me=function(a,b){var c=this.children.indexOf(a);-1!=c&&this.children.splice(c,1);this.children.splice(b,0,a);a.stage=this.stage;a._parent=this;return a};P.prototype.addChildAt=P.prototype.me;P.prototype.removeChild=function(a){var b=this.children.indexOf(a);return-1!=b?this.nf(b):a};P.prototype.removeChild=P.prototype.removeChild; P.prototype.nf=function(a){var b=this.children[a];b&&(b._parent=null,b.stage=null);this.children.splice(a,1);return b};P.prototype.removeChildAt=P.prototype.nf;P.prototype.Je=function(a){return this.children.indexOf(a)};P.prototype.getChildIndex=P.prototype.Je;P.prototype.bm=function(a,b){this.removeChild(a);this.me(a,b)};P.prototype.setChildIndex=P.prototype.bm;P.prototype.mk=function(a){return this.children[a]};P.prototype.getChildAt=P.prototype.mk; P.prototype.nk=function(a){for(var b=this.children.length,c=0;c<b;c++){var d=this.children[c];if(d.name===a)return d}return null};P.prototype.getChildByName=P.prototype.nk;P.prototype.qk=p(null);P.prototype.getObjectsUnderPoint=P.prototype.qk;P.prototype.Fj=p(!1);P.prototype.areInaccessibleObjectsUnderPoint=P.prototype.Fj;P.prototype.contains=function(a){return-1!=this.children.indexOf(a)};P.prototype.contains=P.prototype.contains; P.prototype.Fi=function(a,b){var c=this.children[a];this.children[a]=this.children[b];this.children[b]=c};P.prototype.swapChildrenAt=P.prototype.Fi;P.prototype.vm=function(a,b){this.Fi(this.Je(a),this.Je(b))};P.prototype.swapChildren=P.prototype.vm;P.prototype.Yl=function(a,b){a='undefined'!==typeof a?a:0;for(var c=Math.min(this.numChildren-1,a+('undefined'!==typeof b?b:2147483647)-1);c>=a;c--)this.nf(c)};P.prototype.removeChildren=P.prototype.Yl;P.prototype.rm=h();P.prototype.stopAllMovieClips=P.prototype.rm; P.prototype.sa=function(a){if(this.visible)for(var b=this.children.length,c=0;c<b;c++)this.children[c].sa(a)};P.prototype.__update=P.prototype.sa;P.prototype.I=function(){P.Z.I.call(this);for(var a=this.children.length,b=0;b<a;b++)this.children[b].I()};P.prototype.updateTransforms=P.prototype.I;P.prototype.lc=function(a){if(this.mouseEnabled&&this.mouseChildren&&this.visible)for(var b=this.children.length-1;0<=b;b--){var c=this.children[b].lc(a);if(c)return c}return null}; P.prototype.gb=function(a){for(var b=P.Z.gb.call(this,a),c=this.children.length,d=0;d<c;d++){var e=this.children[d].gb(a);null==b?b=e:e&&b.Vi(e)}return b};P.prototype.getRect=P.prototype.gb; Object.defineProperties(P.prototype,{numChildren:{get:function(){return this.children.length}},stage:{get:m('ca'),set:function(a){this.ca!=a&&((this.ca=a)?this.dispatchEvent(new Sl(fc)):this.dispatchEvent(new Sl(Ci)));for(var b=this.children.length,c=0;c<b;c++)this.children[c].stage=a}},tabChildren:{get:p(!1),set:h()},mouseChildren:{get:m('hg'),set:k('hg')}});P.prototype.g={names:[{name:'DisplayObjectContainer',h:Ve}]};r(Ve,P);function pm(){}r('flash.display.GradientType.LINEAR',qh);r('flash.display.GradientType.RADIAL','radial');pm.prototype.g={names:[{name:'GradientType',h:We}]};r(We,pm);function qm(a,b,c,d,e,f,g,l){this.hd='undefined'!==typeof a?a:qh;this.colors='undefined'!==typeof b?b:null;this.alphas='undefined'!==typeof c?c:null;this.ratios='undefined'!==typeof d?d:null;this.matrix='undefined'!==typeof e?e:null;this.ng='undefined'!==typeof f?f:ti;this.dg='undefined'!==typeof g?g:Gi;this.focalPointRatio='undefined'!==typeof l?l:0}qm.prototype.G=function(a){null==this.Ec&&(this.Ec=this.type===qh?a.createLinearGradient(0,0,1,1):a.createRadialGradient(0,0,1,0,0,1));a.fillStyle=this.Ec}; qm.prototype.draw=qm.prototype.G;qm.prototype.aa=function(a){null==this.Ec&&(this.Ec=this.type==qh?a.createLinearGradient(0,0,1,1):a.createRadialGradient(0,0,1,0,0,1));a.fillStyle=w(this.Ec,String);a.fillStyleIsImage=!1};qm.prototype.gldraw=qm.prototype.aa;Object.defineProperties(qm.prototype,{type:{get:m('hd'),set:k('hd')},spreadMethod:{get:m('ng'),set:k('ng')},interpolationMethod:{get:m('dg'),set:k('dg')}});qm.prototype.g={names:[{name:'GraphicsGradientFill',h:$e}],ja:[el,dl]};r($e,qm);function rm(a,b){this._glcolor=[];this.color='undefined'!==typeof a?a:0;this.alpha='undefined'!==typeof b?b:1}rm.prototype.color=0;rm.prototype.color=rm.prototype.color;rm.prototype.alpha=1;rm.prototype.alpha=rm.prototype.alpha;rm.prototype.G=function(a,b){a.fillStyle=pl.Sa(this.color,this.alpha,b,null)};rm.prototype.draw=rm.prototype.G;rm.prototype.aa=function(a,b){a.fillStyle=pl.Sa(this.color,this.alpha,b,this._glcolor);a.fillStyleIsImage=!1};rm.prototype.gldraw=rm.prototype.aa; rm.prototype.g={names:[{name:'GraphicsSolidFill',h:cf}],ja:[el,dl]};r(cf,rm);function sm(){}sm.prototype.g={names:[{name:'IGraphicsStroke',h:'flash.display.IGraphicsStroke'}]};function tm(a,b,c,d,e,f,g){this.thickness=a='undefined'!==typeof a?a:NaN;this.pixelHinting='undefined'!==typeof b?b:!1;this.Xf='undefined'!==typeof d?d:$h;this.eg='undefined'!==typeof e?e:Li;this.miterLimit='undefined'!==typeof f?f:3;this.mg='undefined'!==typeof c?c:bi;this.fill='undefined'!==typeof g?g:null}tm.prototype.G=function(a,b){if(isNaN(this.thickness))a.stroke();else if(a.lineWidth=this.thickness,x(this.fill,rm)){var c=w(this.fill,rm);a.strokeStyle=pl.Sa(c.color,c.alpha,b,null)}}; tm.prototype.draw=tm.prototype.G;tm.prototype.aa=function(a,b){if(isNaN(this.thickness))a.stroke();else if(a.lineWidth=this.thickness,x(this.fill,rm)){var c=this.fill;pl.Sa(c.color,c.alpha,b,c._glcolor);a.strokeStyle=c._glcolor}};tm.prototype.gldraw=tm.prototype.aa;Object.defineProperties(tm.prototype,{caps:{get:m('Xf'),set:k('Xf')},joints:{get:m('eg'),set:k('eg')},scaleMode:{get:m('mg'),set:k('mg')}});tm.prototype.g={names:[{name:'GraphicsStroke',h:df}],ja:[sm,dl]};r(df,tm);function um(a,b,c,d){this.vertices='undefined'!==typeof a?a:null;this.indices='undefined'!==typeof b?b:null;this.uvtData='undefined'!==typeof c?c:null;this.$f='undefined'!==typeof d?d:$h}um.prototype.G=function(){Zk(Gj)};um.prototype.draw=um.prototype.G;um.prototype.aa=h();um.prototype.gldraw=um.prototype.aa;Object.defineProperties(um.prototype,{culling:{get:m('$f'),set:k('$f')}});um.prototype.g={names:[{name:'GraphicsTrianglePath',h:ef}],ja:[jl,dl]};r(ef,um);function Q(){this.graphicsData=[];this.fi=[];this._worldMatrix=new z}Q.prototype.Hd=0;Q.prototype.Wa=!1;r('flash.display.Graphics.debug',!1);Q.prototype.clear=function(){this.U=this.lastStroke=null;this.Hd=0;this.graphicsData=[];this.bound=null};Q.prototype.clear=Q.prototype.clear;Q.prototype.wg=function(a,b){b='undefined'!==typeof b?b:1;this.Vb();this.lastFill=new rm(a,b);this.graphicsData.push(this.lastFill)};Q.prototype.beginFill=Q.prototype.wg; Q.prototype.xg=function(a,b,c,d,e,f,g,l){e='undefined'!==typeof e?e:null;f='undefined'!==typeof f?f:ti;g='undefined'!==typeof g?g:Gi;l='undefined'!==typeof l?l:0;this.Vb();this.lastFill=new qm(a,b,c,d,e,f,g,l);this.graphicsData.push(this.lastFill)};Q.prototype.beginGradientFill=Q.prototype.xg;Q.prototype.vg=function(a,b,c,d){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:!0;d='undefined'!==typeof d?d:!1;this.Vb();this.lastFill=new fl(a,b,c,d);this.graphicsData.push(this.lastFill)}; Q.prototype.beginBitmapFill=Q.prototype.vg;Q.prototype.Vb=function(){if(this.U){if(this.lastFill){var a=new hl;a.fill=this.lastFill;this.graphicsData.push(a);this.lastFill=null}this.lastStroke&&!isNaN(this.lastStroke.thickness)&&(this.lastStroke=new tm(NaN),this.graphicsData.push(this.lastStroke));this.U=null}};Q.prototype.endStrokAndFill=Q.prototype.Vb; Q.prototype.$h=function(a,b,c,d,e,f,g,l){this.lastStroke&&(this.lastStroke.fill=new qm(a,b,c,d,'undefined'!==typeof e?e:null,'undefined'!==typeof f?f:ti,'undefined'!==typeof g?g:Gi,'undefined'!==typeof l?l:0))};Q.prototype.lineGradientStyle=Q.prototype.$h; Q.prototype.Fc=function(a,b,c,d,e,f,g,l){a='undefined'!==typeof a?a:NaN;b='undefined'!==typeof b?b:0;c='undefined'!==typeof c?c:1;d='undefined'!==typeof d?d:!1;e='undefined'!==typeof e?e:bi;f='undefined'!==typeof f?f:null;g='undefined'!==typeof g?g:null;l='undefined'!==typeof l?l:3;this.Vb();isNaN(a)||(this.lastStroke=new tm(0===a?1:a,d,e,f,g,l,new rm(b,c)),this.graphicsData.push(this.lastStroke))};Q.prototype.lineStyle=Q.prototype.Fc; Q.prototype.fk=function(a,b,c,d){this.Wa=!0;this.moveTo(a,b);this.lineTo(a+c,b);this.lineTo(a+c,b+d);this.lineTo(a,b+d);this.U.closePath();this.Wa=!1;vm(this,a,b);vm(this,a+c,b+d)};Q.prototype.drawRect=Q.prototype.fk; Q.prototype.gk=function(a,b,c,d,e,f){f='undefined'!==typeof f?f:NaN;this.Wa=!0;isNaN(f)&&(f=e);this.moveTo(a+e,b);this.lineTo(a+c-e,b);this.ea(a+c,b,a+c,b+f);this.lineTo(a+c,b+d-f);this.ea(a+c,b+d,a+c-e,b+d);this.lineTo(a+e,b+d);this.ea(a,b+d,a,b+d-f);this.lineTo(a,b+f);this.ea(a,b,a+e,b);this.Wa=!1;vm(this,a,b);vm(this,a+c,b+d)};Q.prototype.drawRoundRect=Q.prototype.gk; Q.prototype.hk=function(a,b,c,d,e,f,g,l){this.Wa=!0;this.moveTo(a+e,b);this.lineTo(a+c-f,b);this.ea(a+c,b,a+c,b+f);this.lineTo(a+c,b+d-l);this.ea(a+c,b+d,a+c-l,b+d);this.lineTo(a+g,b+d);this.ea(a,b+d,a,b+d-g);this.lineTo(a,b+e);this.ea(a,b,a+e,b);this.Wa=!1;vm(this,a,b);vm(this,a+c,b+d)};Q.prototype.drawRoundRectComplex=Q.prototype.hk;Q.prototype.ck=function(a,b,c){wm(this);this.U.moveTo(a+c,b);this.U.arc(a,b,c,0,2*Math.PI);vm(this,a-c,b-c);vm(this,a+c,b+c)};Q.prototype.drawCircle=Q.prototype.ck; Q.prototype.dk=function(a,b,c,d){this.Wa=!0;var e=c/2*.5522848,f=d/2*.5522848,g=a+c,l=b+d,n=a+c/2,t=b+d/2;this.moveTo(a,t);this.va(a,t-f,n-e,b,n,b);this.va(n+e,b,g,t-f,g,t);this.va(g,t+f,n+e,l,n,l);this.va(n-e,l,a,t+f,a,t);this.Wa=!1;vm(this,a,b);vm(this,a+c,b+d)};Q.prototype.drawEllipse=Q.prototype.dk;Q.prototype.moveTo=function(a,b){wm(this);this.U.moveTo(a,b);vm(this,a,b)};Q.prototype.moveTo=Q.prototype.moveTo;Q.prototype.lineTo=function(a,b){wm(this);this.U.lineTo(a,b);vm(this,a,b)}; Q.prototype.lineTo=Q.prototype.lineTo;Q.prototype.ea=function(a,b,c,d){wm(this);this.U.ea(a,b,c,d);vm(this,a,b);vm(this,c,d)};Q.prototype.curveTo=Q.prototype.ea;Q.prototype.va=function(a,b,c,d,e,f){wm(this);this.U.va(a,b,c,d,e,f);vm(this,a,b);vm(this,c,d);vm(this,e,f)};Q.prototype.cubicCurveTo=Q.prototype.va; function vm(a,b,c){a.Wa||(null==a.bound&&(a.bound=new C(Number.MAX_VALUE,Number.MAX_VALUE,-Number.MAX_VALUE,-Number.MAX_VALUE)),a.bound.left>b&&(a.bound.left=b),a.bound.right<b&&(a.bound.right=b),a.bound.top>c&&(a.bound.top=c),a.bound.bottom<c&&(a.bound.bottom=c))}function wm(a){null==a.U&&(a.U=a.fi[a.Hd],null==a.U&&(a.U=a.fi[a.Hd]=pl.qb()),a.U.clear(),a.U.xd=!0,a.Hd++,a.graphicsData.push(a.U))}Q.prototype.Ge=function(){this.Vb()};Q.prototype.endFill=Q.prototype.Ge; Q.prototype.J=function(a){this.graphicsData=a.graphicsData.slice()};Q.prototype.copyFrom=Q.prototype.J;Q.prototype.Zh=function(a,b,c,d){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:!0;d='undefined'!==typeof d?d:!1;this.lastStroke&&x(this.lastStroke,tm)&&(w(this.lastStroke,tm).fill=new fl(a,b,c,d))};Q.prototype.lineBitmapStyle=Q.prototype.Zh;Q.prototype.Ac=function(a,b){wm(this);this.U.commands.push.apply(null,a);this.U.data.push.apply(null,b)};Q.prototype.drawPath=Q.prototype.Ac; Q.prototype.na=function(a,b,c){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;wm(this);this.U.na(a,b,c)};Q.prototype.drawTriangles=Q.prototype.na; Q.prototype.ek=function(a){var b=null,b=b=b=null;if(null!=a)for(var c=0;c<a.length;c++)if(b=a[c],x(b,jl)){var b=w(b,jl,!0),d=null,d=null;x(b,B)?(d=w(b,B,!0),this.Ac(d.commands,d.data,d.winding)):x(b,um)&&(d=w(b,um,!0),this.na(d.vertices,d.indices,d.uvtData,d.culling))}else if(x(b,el))b=w(b,el,!0),d=d=d=null,null==b?this.Ge():x(b,hl)?this.Ge():x(b,rm)?(d=w(b,rm,!0),this.wg(d.color,d.alpha)):x(b,qm)?(d=w(b,qm,!0),this.xg(d.type,d.colors,d.alphas,d.ratios,d.matrix,d.spreadMethod,d.interpolationMethod, d.focalPointRatio)):x(b,fl)&&(d=w(b,fl,!0),this.vg(d.bitmapData,d.matrix,d.repeat,d.smooth));else if(x(b,sm)){var b=w(b,sm,!0),e=null,e=d=e=e=null;null!=b&&x(b,tm)&&(d=w(b,tm));d&&d.fill&&x(d.fill,el)&&(e=d.fill);null==d||null==e?this.Fc():x(e,rm)?(e=w(e,rm,!0),this.Fc(d.thickness,e.color,e.alpha,d.pixelHinting,d.scaleMode,d.caps,d.joints,d.miterLimit)):x(e,qm)?(e=w(e,qm,!0),this.Fc(d.thickness,0,1,d.pixelHinting,d.scaleMode,d.caps,d.joints,d.miterLimit),this.$h(e.type,e.colors,e.alphas,e.ratios, e.matrix,e.spreadMethod,e.interpolationMethod,e.focalPointRatio)):x(e,fl)&&(e=w(e,fl,!0),this.Fc(d.thickness,0,1,d.pixelHinting,d.scaleMode,d.caps,d.joints,d.miterLimit),this.Zh(e.bitmapData,e.matrix,e.repeat,e.smooth))}};Q.prototype.drawGraphicsData=Q.prototype.ek;Q.prototype.Sl=function(){return this.graphicsData.slice()};Q.prototype.readGraphicsData=Q.prototype.Sl;Q.prototype.G=function(a,b,c,d){this.graphicsData.length&&(pl.dc(a,this,b,c,d),ml++)};Q.prototype.draw=Q.prototype.G; Q.prototype.g={names:[{name:'Graphics',h:Xe}]};r(Xe,Q);function xm(){P.call(this);this.graphics=new Q}Pk(xm,P);xm.prototype.pm=h();xm.prototype.startDrag=xm.prototype.pm;xm.prototype.sm=h();xm.prototype.stopDrag=xm.prototype.sm;xm.prototype.qm=h();xm.prototype.startTouchDrag=xm.prototype.qm;xm.prototype.tm=h();xm.prototype.stopTouchDrag=xm.prototype.tm;xm.prototype.Hb=function(){return this.graphics.bound};xm.prototype.__getRect=xm.prototype.Hb; xm.prototype.sa=function(a){this.visible&&this.graphics.graphicsData.length&&this.graphics.G(a,this.transform.concatenatedMatrix,this.blendMode,this.transform.concatenatedColorTransform);this.Ea(ne)&&this.dispatchEvent(new Sl(ne));xm.Z.sa.call(this,a)};xm.prototype.__update=xm.prototype.sa;xm.prototype.lc=function(a){if(this.mouseEnabled&&this.visible){if(a=xm.Z.lc.call(this,a))return a;if(this.Kh(this.stage.mouseX,this.stage.mouseY))return this}return null}; Object.defineProperties(xm.prototype,{buttonMode:{get:p(!1),set:h()},dropTarget:{get:p(null)},hitArea:{get:p(null),set:h()},useHandCursor:{get:p(!1),set:h()}});xm.prototype.g={names:[{name:'Sprite',h:hf}]};r(hf,xm);function ym(){}r('flash.display.BlendMode.NORMAL',bi);r('flash.display.BlendMode.LAYER',mh);r('flash.display.BlendMode.MULTIPLY',Sh);r('flash.display.BlendMode.SCREEN','screen');r('flash.display.BlendMode.LIGHTEN','lighten');r('flash.display.BlendMode.DARKEN','darken');r('flash.display.BlendMode.ADD',ec);r('flash.display.BlendMode.SUBTRACT','subtract');r('flash.display.BlendMode.DIFFERENCE','difference');r('flash.display.BlendMode.INVERT','invert');r('flash.display.BlendMode.OVERLAY','overlay'); r('flash.display.BlendMode.HARDLIGHT','hard-light');r('flash.display.BlendMode.ALPHA',gc);r('flash.display.BlendMode.ERASE','erase');r('flash.display.BlendMode.SHADER','shader');ym.prototype.g={names:[{name:'BlendMode',h:Te}]};r(Te,ym);function R(){this.ambient=new H(.1,.1,.1,.1);this.terrainTextureSets=[];this.color=new H(1,1,1,1);this.wireframeColor=new H(.5,0,.5,0);this.sourceFactor=ki;this.destinationFactor=Gk;this.passCompareMode=nh;this.culling=hg;this.borderColor=new H(1,0,0,1)}R.prototype.ph=!0;R.prototype.castShadow=R.prototype.ph;R.prototype.yd=!1;R.prototype.gpuSkin=R.prototype.yd;R.prototype.Va=!0;R.prototype.lightAble=R.prototype.Va;R.prototype.ud=!0;R.prototype.fogAble=R.prototype.ud;R.prototype.sg=!1; R.prototype.Dj=!0;R.prototype.ambientAble=R.prototype.Dj;R.prototype.Vd=!0;R.prototype.specularAble=R.prototype.Vd;R.prototype.Di=50;R.prototype.specularPower=R.prototype.Di;R.prototype.og=!1;R.prototype.Df=2;R.prototype.toonStep=R.prototype.Df;R.prototype.mf=!0;R.prototype.receiveShadows=R.prototype.mf;R.prototype.ne=0;R.prototype.alphaThreshold=R.prototype.ne;R.prototype.Jh=!1;R.prototype.gray=R.prototype.Jh;R.prototype.rg=!1;R.prototype.Wh=!1;R.prototype.isDistanceField=R.prototype.Wh; R.prototype.m=!0;R.prototype.invalid=R.prototype.m;R.prototype.depthMask=!0;R.prototype.depthMask=R.prototype.depthMask;R.prototype.border=!1;R.prototype.border=R.prototype.border;R.prototype.G=h();R.prototype.draw=R.prototype.G; Object.defineProperties(R.prototype,{normalMapAble:{get:m('xj'),set:k('xj')},wireframeAble:{get:m('rg'),set:function(a){this.rg=a;this.m=!0}},blendModel:{set:function(a){switch(a){case bi:this.sourceFactor=ki;this.destinationFactor=Gk;break;case mh:this.sourceFactor=cj;this.destinationFactor=ni;break;case Sh:this.sourceFactor=Gk;this.destinationFactor=dj;break;case ec:this.sourceFactor=cj;this.destinationFactor=ki;break;case gc:this.sourceFactor=Gk,this.destinationFactor=cj}}},toonAble:{get:m('og'), set:function(a){this.og=a;this.m=!0}},alpha:{get:function(){return this.color.w},set:function(a){this.color.w=a}},writeDepth:{get:m('sg'),set:function(a){if(this.sg=a)this.ud=this.Va=!1}}});R.prototype.g={names:[{name:'MaterialBase',h:sg}]};r(sg,R);function zm(){}zm.prototype.Pa=h();zm.prototype.creat=zm.prototype.Pa;zm.prototype.g={names:[{name:'Creator',h:tc}]};r(tc,zm);function Am(){Kl.call(this);this.ya={}}Pk(Am,Kl);Am.prototype.Me=function(a){return this.ya[a]};Am.prototype.getProperty=Am.prototype.Me;Am.prototype.setProperty=function(a,b){this.ya[a]=b};Am.prototype.setProperty=Am.prototype.setProperty;Am.prototype.Ne=function(a){return this.ya.hasOwnProperty(a)};Am.prototype.hasProperty=Am.prototype.Ne;Am.prototype.xe=function(a){delete this.ya[a]};Am.prototype.deleteProperty=Am.prototype.xe;Am.prototype.Ee=function(){var a=[],b;for(b in this.ya)a.push(b);return a}; Am.prototype.elementNames=Am.prototype.Ee;Am.prototype.g={names:[{name:'Proxy',h:Wf}]};r(Wf,Am);function Bm(a,b){Am.call(this);this.type=a;this.index='undefined'!==typeof b?b:0}Pk(Bm,Am);r('as3Shader.Var.TYPE_C',1);r('as3Shader.Var.TYPE_T',2);r('as3Shader.Var.TYPE_VA',3);r('as3Shader.Var.TYPE_V',4);r('as3Shader.Var.TYPE_FS',5);r('as3Shader.Var.TYPE_OC',6);r('as3Shader.Var.TYPE_OP',7);Bm.prototype.Na=1;Bm.prototype.constLenght=Bm.prototype.Na;Bm.prototype.o=!1;Bm.prototype.used=Bm.prototype.o; Bm.prototype.c=function(a,b){b='undefined'!==typeof b?b:0;var c=new Bm(this.type,this.index);c.parent=this;if(this.component)if(x(this.component,String)&&x(a,String)){for(var d=w(a,String),e=w(this.component,String),f=aa,g=0;g<d.length;g++)var l=this.charCodeAt(d,g)-this.charCodeAt(Dk,0),f=l<e.length?f+e.charAt(l):f+d.charAt(g);a=f}else throw pe;c.component=a;c.componentOffset=b;c.Na=this.Na;return c};Bm.prototype.c=Bm.prototype.c;Bm.prototype.charCodeAt=function(a,b){return a.charAt(b)==wk?123:a.charCodeAt(b)}; Bm.prototype.toString=function(){return[this.type,this.index]+aa};Bm.prototype.toString=Bm.prototype.toString;Object.defineProperties(Bm.prototype,{root:{get:function(){return null==this.parent?this:this.parent.root}}});Bm.prototype.g={names:[{name:'Var',h:'as3Shader.Var'}]};r('as3Shader.Var',Bm);function Cm(){}Cm.prototype.addEventListener=h();Cm.prototype.removeEventListener=h();Cm.prototype.dispatchEvent=h();Cm.prototype.g={names:[{name:Gb,h:'org.apache.flex.events.IEventDispatcher'}]};function Dm(){}Pk(Dm,zm);Dm.prototype.Pa=function(a){var b=a.lines,c=a.logs;this.$a=a.programType==kk?dk:Ee;a=aa;for(var d=0;d<b.length;d++){var e=c[d];if(e){var f=e,g;for(g in f)e=f[g],a+=rb+e+ea}e=b[d];a+=e[0];for(f=1;f<e.length;f++)a+=fa+this.jc(e[f]);e.flag&&(a+=mb+e.flag+Bb);a+=ea}if(e=c[d]){var b=e,l;for(l in b)e=b[l],a+=rb+e+ea}this.data=a};Dm.prototype.creat=Dm.prototype.Pa; Dm.prototype.Nf=function(a){var b;switch(a.type){case 1:b=this.$a+Cd;break;case 5:b=this.$a+Ni;break;case 6:b=ii;break;case 7:b=pi;break;case 2:b=this.$a+tj;break;case 4:b=dk;break;case 3:b=this.$a+bc}return b};Dm.prototype.jc=function(a){var b=this.Nf(a);if(!a.component||!x(a.component,Bm))switch(a.type){case 1:case 5:case 2:case 4:case 3:b+=a.index}if(a.component)if(x(a.component,Bm))var c=w(a.component,Bm),b=b+(Pb+this.jc(c)+Qa+(a.index+a.componentOffset)+Xb);else b+=ob+a.component;return b}; Dm.prototype.g={names:[{name:'AGALCodeCreator',h:rc}]};r(rc,Dm);function Em(){this.Ad={};null==Fm&&(Fm={mul:Pa,m44:Pa,m33:Pa,m34:Pa,add:Qa,sub:nb,div:pb},Gm={mov:[aa,aa],neg:[nb,aa],rcp:[sb,aa],sat:[Kd,lb]},Hm={frc:bg,sqt:gj,rsq:eh,nrm:ci,crs:Wd,dp3:ee,dp4:ee})}var Fm,Gm,Hm;Pk(Em,zm); Em.prototype.Pa=function(a){var b=a.lines,c=a.logs;this.$a=a.programType==kk?dk:Ee;for(var d=aa,e=aa,f=aa,g=tk,l=0;l<b.length;l++){var n=c[l];if(n){var t=n,u;for(u in t)n=t[u],g+=ca+n+ea}var n=b[l],t=n[0],v=w(n[1],Bm),G=this.jc(v);null==this.Ad[G]&&(this.Ad[G]=!0,2==v.type?G=Im(v)+fa+G:4==v.type&&(e+=hk+Im(v)+fa+G+yb));for(var v=[],E=2;E<n.length;E++){var A=n[E],K=this.jc(A.root,!1),J=Im(A);v.push(K);null==this.Ad[K]&&(this.Ad[K]=!0,5==A.type||1==A.type?d+=Rj+J+fa+K+yb:4==A.type?e+=hk+J+fa+K+yb:3== A.type&&(f+=wc+J+fa+K+yb))}Fm[t]?(g+=ba+G+na+v.join(fa+Fm[t]+fa),n.flag&&(g+=mb+n.flag+Bb),g+=xb):Gm[t]?g+=ba+G+na+Gm[t][0]+v+Gm[t][1]+xb:(g+=ba+G+na+(Hm[t]||t)+za+v,n.flag&&(g+=mb+n.flag+Bb),g+=Na);g+=ea}if(n=c[l]){var b=n,O;for(O in b)n=b[O],g+=rb+n+ea}this.data=d+e+f+g+Hk;a.programType==cg&&(this.data=yi+this.data)};Em.prototype.creat=Em.prototype.Pa;function Im(a){return 5==a.type?Oi:1==a.Na?jk:wh+a.Na} Em.prototype.Nf=function(a){var b;switch(a.type){case 1:b=this.$a+Cd;break;case 5:b=this.$a+Ni;break;case 6:b=Ng;break;case 7:b=Og;break;case 2:b=this.$a+tj;break;case 4:b=dk;break;case 3:b=this.$a+bc}return b}; Em.prototype.jc=function(a,b){var c=this.Nf(a);if(!a.component||!x(a.component,Bm))switch(a.type){case 1:case 5:case 2:case 4:case 3:c+=a.index}if(('undefined'!==typeof b?b:1)&&a.component)if(x(a.component,Bm))var d=w(a.component,Bm),c=c+(Pb+this.jc(d)+Qa+(a.index+a.componentOffset)+Xb);else c+=ob+a.component;return c};Em.prototype.g={names:[{name:'GLCodeCreator',h:uc}]};r(uc,Em);function Jm(){}r('flash.system.Capabilities.hasMultiChannelAudio',p(!1)); Object.defineProperties(Jm,{isEmbeddedInAcrobat:{get:p(!1)},hasEmbeddedVideo:{get:p(!1)},hasAudio:{get:p(!1)},avHardwareDisable:{get:p(!1)},hasAccessibility:{get:p(!1)},hasAudioEncoder:{get:p(!1)},hasMP3:{get:p(!1)},hasPrinting:{get:p(!1)},hasScreenBroadcast:{get:p(!1)},hasScreenPlayback:{get:p(!1)},hasStreamingAudio:{get:p(!1)},hasStreamingVideo:{get:p(!1)},hasVideoEncoder:{get:p(!1)},isDebugger:{get:p(!1)},localFileReadDisable:{get:p(!1)},language:{get:p(null)},manufacturer:{get:p(null)},os:{get:p(null)}, cpuArchitecture:{get:p(null)},playerType:{get:p(fj)},serverString:{get:p(null)},version:{get:p(null)},screenColor:{get:p(null)},pixelAspectRatio:{get:p(0)},screenDPI:{get:p(0)},screenResolutionX:{get:p(0)},screenResolutionY:{get:p(0)},touchscreenType:{get:p(null)},hasIME:{get:p(!1)},hasTLS:{get:p(!1)},maxLevelIDC:{get:p(null)},supports32BitProcesses:{get:p(!1)},supports64BitProcesses:{get:p(!1)}});Jm.prototype.g={names:[{name:'Capabilities',h:Sf}]};r(Sf,Jm);function Km(a,b){this.fcode=b;this.vcode=a}Km.prototype.m=!0;Km.prototype.update=function(a){if(this.m||this.context!=a){this.program=a.createProgram();if(x(this.vcode,String)){var b=new L;b.pb(this.vcode);var c=new L;c.pb(this.fcode)}else b=this.vcode,c=this.fcode;this.program.upload(b,c);this.m=!1;this.context=a}};Km.prototype.update=Km.prototype.update;Km.prototype.g={names:[{name:'ProgramSet',h:ug}]};r(ug,Km);function Lm(){this.mode=0;this.fogColor=[1,1,1]}r('gl3d.core.Fog.FOG_NONE',0);r('gl3d.core.Fog.FOG_EXP',1);r('gl3d.core.Fog.FOG_EXP2',2);r('gl3d.core.Fog.FOG_LINEAR',3);Lm.prototype.ye=.03;Lm.prototype.density=Lm.prototype.ye;Lm.prototype.start=10;Lm.prototype.start=Lm.prototype.start;Lm.prototype.end=100;Lm.prototype.end=Lm.prototype.end;Lm.prototype.g={names:[{name:'Fog',h:'gl3d.core.Fog'}]};r('gl3d.core.Fog',Lm);function Mm(a){this.ga=new H;this.Da=new H;this.$=new H;this.da=new H;I.call(this,'undefined'!==typeof a?a:null)}Pk(Mm,I);Mm.prototype.pl=function(a,b,c){this.$.J(b);this.$.bb(a);this.$.normalize();this.$.w=0;this.ga.J(c);Nm(this,this.ga,this.$);this.ga.normalize();this.ga.w=0;this.Da.J(this.$);Nm(this,this.Da,this.ga);this.Da.w=0;this.da.x=this.ga.Qa(a);this.da.y=this.Da.Qa(a);this.da.z=this.$.Qa(a);this.da.w=1;this.ua(0,this.ga);this.ua(1,this.Da);this.ua(2,this.$);this.ua(3,this.da)}; Mm.prototype.lookAtLH=Mm.prototype.pl;Mm.prototype.ql=function(a,b,c){this.$.J(a);this.$.bb(b);this.$.normalize();this.$.w=0;this.ga.J(c);Nm(this,this.ga,this.$);this.ga.normalize();this.ga.w=0;this.Da.J(this.$);Nm(this,this.Da,this.ga);this.Da.w=0;this.da.x=this.ga.Qa(a);this.da.y=this.Da.Qa(a);this.da.z=this.$.Qa(a);this.da.w=1;this.ua(0,this.ga);this.ua(1,this.Da);this.ua(2,this.$);this.ua(3,this.da)};Mm.prototype.lookAtRH=Mm.prototype.ql; Mm.prototype.Hl=function(a,b,c,d){this.ha([2*c/a,0,0,0,0,2*c/b,0,0,0,0,d/(d-c),1,0,0,c*d/(c-d),0].slice())};Mm.prototype.perspectiveLH=Mm.prototype.Hl;Mm.prototype.Kl=function(a,b,c,d){this.ha([2*c/a,0,0,0,0,2*c/b,0,0,0,0,d/(c-d),-1,0,0,c*d/(c-d),0].slice())};Mm.prototype.perspectiveRH=Mm.prototype.Kl;Mm.prototype.gi=function(a,b,c,d){a=1/Math.tan(a/2);this.ha([a/b,0,0,0,0,a,0,0,0,0,d/(d-c),1,0,0,c*d/(c-d),0].slice())};Mm.prototype.perspectiveFieldOfViewLH=Mm.prototype.gi; Mm.prototype.Gl=function(a,b,c,d){a=1/Math.tan(a/2);this.ha([a/b,0,0,0,0,a,0,0,0,0,d/(c-d),-1,0,0,c*d/(c-d),0].slice())};Mm.prototype.perspectiveFieldOfViewRH=Mm.prototype.Gl;Mm.prototype.Il=function(a,b,c,d,e,f){this.ha([2*e/(b-a),0,0,0,0,-2*e/(c-d),0,0,-1-2*a/(b-a),1+2*d/(c-d),-f/(e-f),1,0,0,e*f/(e-f),0].slice())};Mm.prototype.perspectiveOffCenterLH=Mm.prototype.Il;Mm.prototype.Jl=function(a,b,c,d,e,f){this.ha([2*e/(b-a),0,0,0,0,-2*e/(c-d),0,0,1+2*a/(b-a),-1-2*d/(c-d),f/(e-f),-1,0,0,e*f/(e-f),0].slice())}; Mm.prototype.perspectiveOffCenterRH=Mm.prototype.Jl;Mm.prototype.ei=function(a,b,c,d){this.ha([2/a,0,0,0,0,2/b,0,0,0,0,1/(d-c),0,0,0,c/(c-d),1].slice())};Mm.prototype.orthoLH=Mm.prototype.ei;Mm.prototype.El=function(a,b,c,d){this.ha([2/a,0,0,0,0,2/b,0,0,0,0,1/(c-d),0,0,0,c/(c-d),1].slice())};Mm.prototype.orthoRH=Mm.prototype.El;Mm.prototype.Cl=function(a,b,c,d,e,f){this.ha([2/(b-a),0,0,0,0,2/(d-c),0,0,0,0,1/(f-e),0,(a+b)/(a-b),(d+c)/(c-d),e/(e-f),1].slice())};Mm.prototype.orthoOffCenterLH=Mm.prototype.Cl; Mm.prototype.Dl=function(a,b,c,d,e,f){this.ha([2/(b-a),0,0,0,0,2/(d-c),0,0,0,0,1/(e-f),0,(a+b)/(a-b),(d+c)/(c-d),e/(e-f),1].slice())};Mm.prototype.orthoOffCenterRH=Mm.prototype.Dl;function Nm(a,b,c){a.da.x=b.y*c.z-b.z*c.y;a.da.y=b.z*c.x-b.x*c.z;a.da.z=b.x*c.y-b.y*c.x;a.da.w=1;b.J(a.da)}Mm.prototype.g={names:[{name:'PerspectiveMatrix3D',h:Nd}]};r(Nd,Mm);function Om(){}Om.prototype.Id=p(!1);Om.prototype.pick=Om.prototype.Id;Om.prototype.g={names:[{name:'Picking',h:Hg}]};r(Hg,Om);function Pm(){}Pk(Pm,Om); Pm.prototype.Id=function(a,b,c,d){d='undefined'!==typeof d?d:null;if(a.drawable){this.Uh=a.world2local;var e=this.Uh.Ef(b),f=this.Uh.yh(c),g=e.x,l=e.y,e=e.z,n=f.x,t=f.y,f=f.z,u=a.drawable.index.data;for(a=a.drawable.pos.data;i<len;i+=3){var v=3*u[i],G=3*u[i+1],E=3*u[i+2],A=a[v],K=a[v+1],J=a[v+2],O=a[G]-A,W=a[G+1]-K,ka=a[G+2]-J,G=a[E]-A,v=a[E+1]-K,pa=a[E+2]-J,ua=t*pa-f*v,Aa=f*G-n*pa,sa=n*v-t*G,E=O*ua+W*Aa+ka*sa;0<E?(A=g-A,K=l-K,J=e-J):(A-=g,K-=l,J-=e,E=-E);if(!(1E-4>E||(ua=A*ua+K*Aa+J*sa,0>ua||ua> E||(Aa=K*ka-J*W,ka=J*O-A*ka,O=A*W-K*O,W=n*Aa+t*ka+f*O,0>W||ua+W>E))))return g=G*Aa+v*ka+pa*O,g*=1/E,d&&(d.x=b.x+g*c.x,d.y=b.y+g*c.y,d.z=b.z+g*c.z),!0}}return!1};Pm.prototype.pick=Pm.prototype.Id;Pm.prototype.g={names:[{name:'AS3Picking',h:Gg}]};r(Gg,Pm);function Qm(){}var Rm,Sm,Tm,S=[16,!0],Um=Math.PI/180,Vm=180/Math.PI,Wm=new H,Xm=new H,Ym=new H,Zm=new H,$m=new H,T=new H;function an(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(0,b);return b}r('gl3d.util.Matrix3DUtils.getRight',an);function bn(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(1,b);return b}r('gl3d.util.Matrix3DUtils.getUp',bn);function cn(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(2,b);return b}r('gl3d.util.Matrix3DUtils.getDir',cn); r('gl3d.util.Matrix3DUtils.getLeft',function(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(0,b);b.Ed();return b});r('gl3d.util.Matrix3DUtils.getDown',function(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(1,b);b.Ed();return b});r('gl3d.util.Matrix3DUtils.getBackward',function(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(2,b);b.Ed();return b});r('gl3d.util.Matrix3DUtils.getPosition',function(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(3,b);return b}); function dn(a,b){(b='undefined'!==typeof b?b:null)||(b=new H);a.A(0,Xm);a.A(1,Ym);a.A(2,Zm);b.x=Xm.length;b.y=Ym.length;b.z=Zm.length;return b}r('gl3d.util.Matrix3DUtils.getScale',dn);function en(a,b,c,d,e){e='undefined'!==typeof e?e:1;1==e?(Wm.qa(b,c,d),Wm.w=1,a.Y(3,Wm)):(a.A(3,T),T.x+=(b-T.x)*e,T.y+=(c-T.y)*e,T.z+=(d-T.z)*e,a.Y(3,T))}r('gl3d.util.Matrix3DUtils.setPosition',en); function fn(a,b,c,d){c='undefined'!==typeof c?c:null;d='undefined'!==typeof d?d:1;dn(a,$m);null==c&&(c=0==b.x&&1==Math.abs(b.y)&&0==b.z?Wl:Vl);1!=d&&(cn(a,Zm),Zm.x+=(b.x-Zm.x)*d,Zm.y+=(b.y-Zm.y)*d,Zm.z+=(b.z-Zm.z)*d,b=Zm,bn(a,Ym),Ym.x+=(c.x-Ym.x)*d,Ym.y+=(c.y-Ym.y)*d,Ym.z+=(c.z-Ym.z)*d,c=Ym);b.normalize();c=c.Sb(b);c.normalize();d=b.Sb(c);c.wa($m.x);d.wa($m.y);b.wa($m.z);gn(a,c,d,b)}r('gl3d.util.Matrix3DUtils.setOrientation',fn); r('gl3d.util.Matrix3DUtils.setNormalOrientation',function(a,b,c){c='undefined'!==typeof c?c:1;if(0!=b.x||0!=b.y||0!=b.z){dn(a,$m);cn(a,Zm);1!=c&&(bn(a,Ym),Ym.x+=(b.x-Ym.x)*c,Ym.y+=(b.y-Ym.y)*c,Ym.z+=(b.z-Ym.z)*c,b=Ym);b.normalize();c=1==Math.abs(Zm.Qa(b))?an(a,Xm):Zm;c=b.Sb(c);c.normalize();var d=c.Sb(b);c.wa($m.x);b.wa($m.y);d.wa($m.z);gn(a,c,b,d)}});function gn(a,b,c,d){b.w=0;c.w=0;d.w=0;a.Y(0,b);a.Y(1,c);a.Y(2,d)} r('gl3d.util.Matrix3DUtils.lookAt',function(a,b,c,d,e,f){e='undefined'!==typeof e?e:null;f='undefined'!==typeof f?f:1;a.A(3,T);Wm.x=b-T.x;Wm.y=c-T.y;Wm.z=d-T.z;fn(a,Wm,e,f)});r('gl3d.util.Matrix3DUtils.setTranslation',function(a,b,c,d,e){b='undefined'!==typeof b?b:0;c='undefined'!==typeof c?c:0;d='undefined'!==typeof d?d:0;('undefined'!==typeof e?e:1)?a.ji(b,c,d):a.ld(b,c,d)}); r('gl3d.util.Matrix3DUtils.translateX',function(a,b,c){c='undefined'!==typeof c?c:!0;a.A(3,T);a.A(0,Xm);c?(T.x+=b*Xm.x,T.y+=b*Xm.y,T.z+=b*Xm.z):T.x+=b;a.Y(3,T)});r('gl3d.util.Matrix3DUtils.translateY',function(a,b,c){c='undefined'!==typeof c?c:!0;a.A(3,T);a.A(1,Ym);c?(T.x+=b*Ym.x,T.y+=b*Ym.y,T.z+=b*Ym.z):T.y+=b;a.Y(3,T)});r('gl3d.util.Matrix3DUtils.translateZ',function(a,b,c){c='undefined'!==typeof c?c:!0;a.A(3,T);a.A(2,Zm);c?(T.x+=b*Zm.x,T.y+=b*Zm.y,T.z+=b*Zm.z):T.z+=b;a.Y(3,T)}); r('gl3d.util.Matrix3DUtils.translateAxis',function(a,b,c){a.A(3,T);T.x+=b*c.x;T.y+=b*c.y;T.z+=b*c.z;a.Y(3,T)});function hn(a,b,c,d,e){e='undefined'!==typeof e?e:1;dn(a,$m);Rm=$m.x;Sm=$m.y;Tm=$m.z;$m.x+=(b-$m.x)*e;$m.y+=(c-$m.y)*e;$m.z+=(d-$m.z)*e;Xm.wa($m.x/Rm);Ym.wa($m.y/Sm);Zm.wa($m.z/Tm);gn(a,Xm,Ym,Zm)}r('gl3d.util.Matrix3DUtils.setScale',hn);function jn(a,b){a.A(0,Xm);Xm.normalize();Xm.x*=b;Xm.y*=b;Xm.z*=b;a.Y(0,Xm)}r('gl3d.util.Matrix3DUtils.scaleX',jn); function kn(a,b){a.A(1,Ym);Ym.normalize();Ym.x*=b;Ym.y*=b;Ym.z*=b;a.Y(1,Ym)}r('gl3d.util.Matrix3DUtils.scaleY',kn);function ln(a,b){a.A(2,Zm);Zm.normalize();Zm.x*=b;Zm.y*=b;Zm.z*=b;a.Y(2,Zm)}r('gl3d.util.Matrix3DUtils.scaleZ',ln);function mn(a,b){b=('undefined'!==typeof b?b:null)||new H;Wm=a.we(ze)[1];b.x=Wm.x*Vm;b.y=Wm.y*Vm;b.z=Wm.z*Vm;return b}r('gl3d.util.Matrix3DUtils.getRotation',mn);function nn(a,b,c,d){var e=a.we(ze);e[1].x=b*Um;e[1].y=c*Um;e[1].z=d*Um;a.ri(e,ze)} r('gl3d.util.Matrix3DUtils.setRotation',nn);r('gl3d.util.Matrix3DUtils.rotateX',function(a,b,c,d){d='undefined'!==typeof d?d:null;on(a,b,('undefined'!==typeof c?c:1)?an(a,Wm):Ul,d)});r('gl3d.util.Matrix3DUtils.rotateY',function(a,b,c,d){d='undefined'!==typeof d?d:null;on(a,b,('undefined'!==typeof c?c:1)?bn(a,Wm):Vl,d)});r('gl3d.util.Matrix3DUtils.rotateZ',function(a,b,c,d){d='undefined'!==typeof d?d:null;on(a,b,('undefined'!==typeof c?c:1)?cn(a,Wm):Wl,d)}); function on(a,b,c,d){d='undefined'!==typeof d?d:null;Wm.x=c.x;Wm.y=c.y;Wm.z=c.z;Wm.normalize();a.A(3,T);a.kd(b,Wm,d||T)}r('gl3d.util.Matrix3DUtils.rotateAxis',on);r('gl3d.util.Matrix3DUtils.transformVector',function(a,b,c){(c='undefined'!==typeof c?c:null)||(c=new H);var d=b.x,e=b.y;b=b.z;a.Nb(S);c.x=d*S[0]+e*S[4]+b*S[8]+S[12];c.y=d*S[1]+e*S[5]+b*S[9]+S[13];c.z=d*S[2]+e*S[6]+b*S[10]+S[14];return c}); r('gl3d.util.Matrix3DUtils.deltaTransformVector',function(a,b,c){(c='undefined'!==typeof c?c:null)||(c=new H);var d=b.x,e=b.y;b=b.z;a.Nb(S);c.x=d*S[0]+e*S[4]+b*S[8];c.y=d*S[1]+e*S[5]+b*S[9];c.z=d*S[2]+e*S[6]+b*S[10];return c});r('gl3d.util.Matrix3DUtils.invert',function(a,b){(b='undefined'!==typeof b?b:null)||(b=new I);b.J(a);b.Ta();return b});r('gl3d.util.Matrix3DUtils.equal',function(a,b){for(var c=a.rawData,d=b.rawData,e=0;16>e;){if(c[e]!=d[e])return!1;e++}return!0});var pn=new H,qn=new H; r('gl3d.util.Matrix3DUtils.interpolateTo',function(a,b,c){a.Nb(S);Xm.x=S[0];Xm.y=S[1];Xm.z=S[2];Ym.x=S[4];Ym.y=S[5];Ym.z=S[6];Zm.x=S[8];Zm.y=S[9];Zm.z=S[10];pn.x=Xm.length;pn.y=Ym.length;pn.z=Zm.length;var d=1/pn.x,e=1/pn.y,f=1/pn.z;S[0]*=d;S[1]*=d;S[2]*=d;S[4]*=e;S[5]*=e;S[6]*=e;S[8]*=f;S[9]*=f;S[10]*=f;a.ha(S);b.Nb(S);Xm.x=S[0];Xm.y=S[1];Xm.z=S[2];Ym.x=S[4];Ym.y=S[5];Ym.z=S[6];Zm.x=S[8];Zm.y=S[9];Zm.z=S[10];qn.x=Xm.length;qn.y=Ym.length;qn.z=Zm.length;d=1/qn.x;e=1/qn.y;f=1/qn.z;S[0]*=d;S[1]*=d; S[2]*=d;S[4]*=e;S[5]*=e;S[6]*=e;S[8]*=f;S[9]*=f;S[10]*=f;b.ha(S);a.Th(b,c);pn.x+=(qn.x-pn.x)*c;pn.y+=(qn.y-pn.y)*c;pn.z+=(qn.z-pn.z)*c;a.kf(pn.x,pn.y,pn.z);b.kf(qn.x,qn.y,qn.z)});r('gl3d.util.Matrix3DUtils.resetPosition',function(a){en(a,0,0,0)});r('gl3d.util.Matrix3DUtils.resetRotation',function(a){nn(a,0,0,0)});r('gl3d.util.Matrix3DUtils.resetScale',function(a){hn(a,1,1,1)}); r('gl3d.util.Matrix3DUtils.buildOrthoProjection',function(a,b,c,d,e,f,g){g='undefined'!==typeof g?g:null;var l=NaN,n=NaN,t=NaN;null==g&&(g=new I);l=2/(b-a);n=2/(d-c);t=1/(f-e);S[0]=l;S[5]=n;S[10]=t;S[12]=-.5*(b+a)*l;S[13]=-.5*(d+c)*n;S[14]=-e*t;S[1]=S[2]=S[4]=S[6]=S[8]=S[9]=S[3]=S[7]=S[11]=0;S[15]=1;g.ha(S);return g}); r('gl3d.util.Matrix3DUtils.decompose',function(a,b,c){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;null==b&&(b=ze);null==c&&(c=[new H,new H,new H].slice());a.Nb(S);c[0].qa(S[12],S[13],S[14]);a=c[2];a.x=Math.sqrt(S[0]*S[0]+S[1]*S[1]+S[2]*S[2]);a.y=Math.sqrt(S[4]*S[4]+S[5]*S[5]+S[6]*S[6]);a.z=Math.sqrt(S[8]*S[8]+S[9]*S[9]+S[10]*S[10]);0>S[0]*(S[5]*S[10]-S[6]*S[9])-S[1]*(S[4]*S[10]-S[6]*S[8])+S[2]*(S[4]*S[9]-S[5]*S[8])&&(a.z=-a.z);S[0]/=a.x;S[1]/=a.x;S[2]/=a.x;S[4]/=a.y;S[5]/=a.y; S[6]/=a.y;S[8]/=a.z;S[9]/=a.z;S[10]/=a.z;a=c[1];switch(b){case zc:a.w=Math.acos((S[0]+S[5]+S[10]-1)/2);b=Math.sqrt((S[6]-S[9])*(S[6]-S[9])+(S[8]-S[2])*(S[8]-S[2])+(S[1]-S[4])*(S[1]-S[4]));0!=b?(a.x=(S[6]-S[9])/b,a.y=(S[8]-S[2])/b,a.z=(S[1]-S[4])/b):a.x=a.y=a.z=0;break;case Ai:b=S[0]+S[5]+S[10];0<b?(a.w=Math.sqrt(1+b)/2,a.x=(S[6]-S[9])/(4*a.w),a.y=(S[8]-S[2])/(4*a.w),a.z=(S[1]-S[4])/(4*a.w)):S[0]>S[5]&&S[0]>S[10]?(a.x=Math.sqrt(1+S[0]-S[5]-S[10])/2,a.w=(S[6]-S[9])/(4*a.x),a.y=(S[1]+S[4])/(4*a.x),a.z= (S[8]+S[2])/(4*a.x)):S[5]>S[10]?(a.y=Math.sqrt(1+S[5]-S[0]-S[10])/2,a.x=(S[1]+S[4])/(4*a.y),a.w=(S[8]-S[2])/(4*a.y),a.z=(S[6]+S[9])/(4*a.y)):(a.z=Math.sqrt(1+S[10]-S[0]-S[5])/2,a.x=(S[8]+S[2])/(4*a.z),a.y=(S[6]+S[9])/(4*a.z),a.w=(S[1]-S[4])/(4*a.z));break;case ze:a.y=Math.asin(-S[2]),1!=S[2]&&-1!=S[2]?(a.x=Math.atan2(S[6],S[10]),a.z=Math.atan2(S[1],S[0])):(a.z=0,a.x=Math.atan2(S[4],S[5]))}return c});Qm.prototype.g={names:[{name:'Matrix3DUtils',h:Mg}]};r(Mg,Qm);function rn(a){this._world=new I;this._world2local=new I;this.L=new I;this.children=[];this.renderChildren=[];this.picking=new Pm;this.name='undefined'!==typeof a?a:null}rn.prototype.N=!0;rn.prototype.ze=!0;rn.prototype.visible=!0;rn.prototype.visible=rn.prototype.visible;var sn=new H;rn.prototype.fb=function(a){a.parent&&a.parent.removeChild(a);this.children.push(a);a.parent=this;if(a==this)throw pe;a.I(!0)};rn.prototype.addChild=rn.prototype.fb; rn.prototype.removeChild=function(a){var b=this.children.indexOf(a);-1!=b&&this.children.splice(b,1);a.parent=null;a.I(!0)};rn.prototype.removeChild=rn.prototype.removeChild;rn.prototype.update=function(a,b){b='undefined'!==typeof b?b:null;if(this.controllers){var c=this.controllers,d;for(d in c){var e=c[d];e&&e.update(a.time)}}(b||this.material)&&(b||this.material).G(this,a);var c=this.renderChildren,f;for(f in c)c[f].update(a,b)};rn.prototype.update=rn.prototype.update; rn.prototype.lm=function(a,b,c){nn(this.L,a,b,c);this.I(!0)};rn.prototype.setRotation=rn.prototype.lm;rn.prototype.tk=function(a,b){b='undefined'!==typeof b?b:null;null==b&&(b=new H);return b=mn(('undefined'!==typeof a?a:1)?this.L:this.world,b)};rn.prototype.getRotation=rn.prototype.tk;rn.prototype.I=function(a){if('undefined'!==typeof a&&a){a=this.children;for(var b in a)a[b].I(!0)}this.N=!0};rn.prototype.updateTransforms=rn.prototype.I; rn.prototype.Nl=function(a,b,c){return this.picking?this.picking.Id(this,a,b,'undefined'!==typeof c?c:null):!1};rn.prototype.rayMeshTest=rn.prototype.Nl;rn.prototype.clone=function(a){a='undefined'!==typeof a?a:!1;var b=new rn;b.copyfrom=this;b.drawable=this.drawable;b.material=this.material;b.matrix=this.matrix.clone();b.skin=this.skin;var c=this.children,d;for(d in c){var e=c[d];e.type!=Ib&&b.fb(e.clone(a))}a&&this.drawable&&this.renderChildren.push(b);return b};rn.prototype.clone=rn.prototype.clone; rn.prototype.D=h();rn.prototype.dispose=rn.prototype.D; Object.defineProperties(rn.prototype,{x:{get:function(){this.L.A(3,sn);return sn.x},set:function(a){this.L.A(3,sn);sn.x=a;this.L.Y(3,sn);this.I(!0)}},y:{get:function(){this.L.A(3,sn);return sn.y},set:function(a){this.L.A(3,sn);sn.y=a;this.L.Y(3,sn);this.I(!0)}},z:{get:function(){this.L.A(3,sn);return sn.z},set:function(a){this.L.A(3,sn);sn.z=a;this.L.Y(3,sn);this.I(!0)}},scaleX:{get:function(){return an(this.L,sn).length},set:function(a){jn(this.L,a);this.I(!0)}},scaleY:{get:function(){return bn(this.L, sn).length},set:function(a){kn(this.L,a);this.I(!0)}},scaleZ:{get:function(){return cn(this.L,sn).length},set:function(a){ln(this.L,a);this.I(!0)}},world:{get:function(){this.N&&(this.L.uh(this._world),this.parent&&this.parent.parent&&this._world.append(this.parent.world),this.N=!1,this.ze=!0);return this._world},set:function(a){this.L.J(a);this.parent&&this.L.append(this.parent.world2local);this.matrix=this.L}},world2local:{get:function(){if(this.N||this.ze)this._world2local.J(this.world),this._world2local.Ta(), this.ze=!1;return this._world2local}},matrix:{get:m('L'),set:function(a){this.L=a;this.I(!0)}}});rn.prototype.g={names:[{name:'Node3D',h:tg}]};r(tg,rn);function tn(a){this.perspective=new Mm;rn.call(this,'undefined'!==typeof a?a:null)}Pk(tn,rn);tn.prototype.Pj=function(a,b,c,d,e,f,g){return this.sh((a-.5*c)/c*2,-(b-.5*d)/d*2,e,f,'undefined'!==typeof g?g:null)};tn.prototype.computePickRayDirectionMouse=tn.prototype.Pj; tn.prototype.sh=function(a,b,c,d,e){e='undefined'!==typeof e?e:null;a=new H(a,b,0);b=this.perspective.clone();b.Ta();b.append(this.world);a=b.Ef(a);a.ki();null!=e&&e.qa(a.x,a.y,a.z);c.qa(this.x,this.y,this.z);d.qa(a.x-this.x,a.y-this.y,a.z-this.z);d.normalize()};tn.prototype.computePickRayDirection=tn.prototype.sh;tn.prototype.g={names:[{name:'Camera3D',h:ng}]};r(ng,tn);function un(){Kl.call(this)}Pk(un,Kl);r('flash.media.Camera.getCamera',p(null));un.prototype.cm=h();un.prototype.setCursor=un.prototype.cm;un.prototype.dm=h();un.prototype.setKeyFrameInterval=un.prototype.dm;un.prototype.em=h();un.prototype.setLoopback=un.prototype.em;un.prototype.fm=h();un.prototype.setMode=un.prototype.fm;un.prototype.gm=h();un.prototype.setMotionLevel=un.prototype.gm;un.prototype.km=h();un.prototype.setQuality=un.prototype.km;un.prototype.tb=h();un.prototype.drawToBitmapData=un.prototype.tb; un.prototype.Uj=h();un.prototype.copyToByteArray=un.prototype.Uj;un.prototype.Vj=h();un.prototype.copyToVector=un.prototype.Vj;Object.defineProperties(un.prototype,{activityLevel:{get:p(0)},bandwidth:{get:p(0)},currentFPS:{get:p(0)},fps:{get:p(0)},height:{get:p(0)},index:{get:p(0)},keyFrameInterval:{get:p(0)},loopback:{get:p(!1)},motionLevel:{get:p(0)},motionTimeout:{get:p(0)},muted:{get:p(!1)},name:{get:p(null)},position:{get:p(null)},quality:{get:p(0)},width:{get:p(0)}}); Object.defineProperties(un,{names:{get:p(null)},isSupported:{get:p(!1)}});un.prototype.g={names:[{name:'Camera',h:Rf}]};r(Rf,un);function vn(){}function wn(a){for(var b=1;b<a;)b*=2;return b}r('gl3d.util.MathUtil.getNextPow2',wn);vn.prototype.g={names:[{name:'MathUtil',h:Lg}]};r(Lg,vn);function xn(a,b,c,d,e,f,g){a='undefined'!==typeof a?a:null;this.repeat='undefined'!==typeof c?c:!0;this.filter='undefined'!==typeof g?g:qh;this.async='undefined'!==typeof f?f:!0;this.mipmap='undefined'!==typeof e?e:!0;this.Ic='undefined'!==typeof d?d:!1;this.ib=x(a,Array);this.isRect='undefined'!==typeof b?b:!1;this.data=a;this.Kf(null,!1);x(a,String)&&(this.ready=!1);x(a,un)&&(this.Bd=!0,this.ready=!1)}xn.prototype.m=!0;xn.prototype.invalid=xn.prototype.m;xn.prototype.S=!0; xn.prototype.dataInvalid=xn.prototype.S;xn.prototype.ib=!1;xn.prototype.isCube=xn.prototype.ib;xn.prototype.Bd=!1;xn.prototype.isCamera=xn.prototype.Bd;xn.prototype.ready=!0;xn.prototype.ready=xn.prototype.ready;xn.prototype.Yi=function(a){var b=w(this.data,D);b&&(null==this.texture&&(this.texture=a.Qb(b.width,b.height,Gc,this.Ic)),this.S&&(this.Ia(this.texture,b,0),this.S=!1))};xn.prototype.updateRect=xn.prototype.Yi; xn.prototype.Lf=function(a,b,c,d,e){e='undefined'!==typeof e?e:0;this.width=a;this.height=b;var f,g=0;if(a!=c.width||b!=c.height)f=c,c=new D(a,b,f.transparent,0),c.G(f,new z(a/f.width,0,0,b/f.height),null,null,null,!0);for(;0<a||0<b;){if(0==g){if(this.Ia(d,c,e,g),!this.mipmap)break}else f=new D(Math.max(a,1),Math.max(b,1),c.transparent,0),f.G(c,new z(f.width/c.width,0,0,f.height/c.height)),this.Ia(d,f,e,g),f.D();g++;a/=2;b/=2}};xn.prototype.updateBMDTexture=xn.prototype.Lf; xn.prototype.Ia=function(a,b,c,d){d='undefined'!==typeof d?d:0;b=new L;b.endian=rh;x(a,Pl)?w(a,Pl).ra(b,0,d):x(a,Nl)?w(a,Nl).ra(b,0,c,d):x(a,Ol)&&w(a,Ol).ra(b,0)};xn.prototype.Wi=function(a){var b=w(this.data,D);if(this.data){if(null==this.texture){var c=wn(b.width),d=wn(b.height);this.texture=a.createTexture(c,d,Gc,this.Ic)}this.S&&(this.Lf(c,d,b,this.texture),this.S=!1)}};xn.prototype.updateBMD=xn.prototype.Wi; xn.prototype.Xi=function(a){var b=w(this.data,Array);if(b&&(w(this.texture,Nl),this.S)){for(var c=0;6>c;c++){var d=b[c],e=wn(Math.max(d.width,d.height));null==this.texture&&(this.texture=a.Ob(e,Gc,this.Ic));this.Lf(e,e,d,this.texture,c)}this.S=!1}};xn.prototype.updateBMDs=xn.prototype.Xi;xn.prototype.Zi=function(a){w(this.data,un)&&F.supportsVideoTexture&&null==this.texture&&(this.texture=w(a.wc(),Ml),this.texture.addEventListener(xj,y(this.Dm,this,vk)))};xn.prototype.updateVideo=xn.prototype.Zi; xn.prototype.Dm=function(){this.ready=!0}; xn.prototype.Kf=function(a,b){function c(){d.ready=!0}var d=this;b='undefined'!==typeof b?b:!0;var e=w(this.data,L);if(e){e.position=0;var f=e.bc(3);if(f!=Cb)throw'ATF parsing error, unknown format '+f;e.position=255==e[6]?12:6;var f=e.Nc(),g=null;switch(f&127){case 0:case 1:g=Gc;break;case 2:case 3:case 12:g=Od;this.isDXT1=!0;break;case 4:case 5:case 13:g=Pd;this.isDXT5=!0;break;default:throw'Invalid ATF format';}switch(f>>7){case 0:this.ib=!1;break;case 1:this.ib=!0}this.width=Vk(Math.pow(2,this.data.Nc())); this.height=Vk(Math.pow(2,this.data.Nc()));this.data.Nc();b&&(null==this.texture&&(this.texture=this.ib?a.Ob(this.width,g,this.Ic,0):a.createTexture(this.width,this.height,g,this.Ic,0)),this.S&&(this.ib?w(this.texture,Nl).$c(e,0,this.async):w(this.texture,Pl).$c(e,0,this.async),this.ready=!this.async,this.async&&w(this.texture,Pl).addEventListener(xj,c),this.S=!1))}};xn.prototype.updateATF=xn.prototype.Kf; xn.prototype.update=function(a){a=a.renderer.gl3d;if(this.m||this.context!=a)null!=this.texture&&this.texture.D(),this.texture=null,this.S=!0,this.m=!1,this.context=a;this.isRect?this.Yi(a):x(this.data,Array)?this.Xi(a):x(this.data,D)?this.Wi(a):x(this.data,L)?this.Kf(a):x(this.data,un)&&this.Zi(a)};xn.prototype.update=xn.prototype.update;xn.prototype.bind=function(a,b){a.hc(b,this.texture)};xn.prototype.bind=xn.prototype.bind; Object.defineProperties(xn.prototype,{flags:{get:function(){var a=[];this.mipmap&&!this.Bd&&a.push(zh);this.ib&&a.push(Yd);!this.repeat||this.ib||this.isRect||this.Bd||a.push(Di);this.isDXT1?a.push(ie):this.isDXT5&&a.push(je);this.filter&&a.push(this.filter);return a}}});xn.prototype.g={names:[{name:'TextureSet',h:vg}]};r(vg,xn);function yn(a,b){a='undefined'!==typeof a?a:DISTANT;b='undefined'!==typeof b?b:ph;this.color=new H(1,1,1,1);this.shadowMap=new xn;this.gd=new tn;this.innerConeAngle=Math.PI/6;this.outerConeAngle=Math.PI/3;this.lightType=a;rn.call(this,b)}Pk(yn,rn);r('gl3d.core.Light.AMBIENT',0);r('gl3d.core.Light.DISTANT',1);r('gl3d.core.Light.POINT',2);r('gl3d.core.Light.SPOT',3);yn.prototype.Rd=!1;yn.prototype.shadowMapEnabled=yn.prototype.Rd;yn.prototype.xf=512;yn.prototype.shadowMapSize=yn.prototype.xf; yn.prototype.zc=10;yn.prototype.distance=yn.prototype.zc;yn.prototype.D=function(){yn.Z.D.call(this);this.shadowMap&&this.shadowMap.texture&&this.shadowMap.texture.D()};yn.prototype.dispose=yn.prototype.D;Object.defineProperties(yn.prototype,{shadowCamera:{get:function(){this.gd.matrix.hi(new H(this.x,this.y,this.z),Wl,new H(0,-1,0));this.gd.I();this.gd.perspective.ei(10,10,-5,5);return this.gd}}});yn.prototype.g={names:[{name:'Light',h:qg}]};r(qg,yn);function U(a){this.shader=a}U.prototype.zh=function(a,b,c){a=w(this[a],Function);return null!=a?a(b,c):null};U.prototype.doop=U.prototype.zh;U.prototype.hb=function(a,b,c){for(var d=[],e=Math.max(a.data.length,b.data.length),f=0;f<e;f++)d[f]=c(a.data[f%a.data.length],b.data[f%b.data.length]);return this.shader.Fd(d)};U.prototype.i_doop1=U.prototype.hb;U.prototype.B=function(){throw Xh;};U.prototype.mov=U.prototype.B;U.prototype.add=function(a,b){return this.hb(a,b,y(this.Lh,this,Rg))}; U.prototype.add=U.prototype.add;U.prototype.sub=function(a,b){return this.hb(a,b,y(this.Rh,this,Xg))};U.prototype.sub=U.prototype.sub;U.prototype.v=function(a,b){return this.hb(a,b,y(this.Ph,this,Vg))};U.prototype.mul=U.prototype.v;U.prototype.ia=function(a,b){return this.hb(a,b,y(this.Mh,this,Sg))};U.prototype.div=U.prototype.ia;U.prototype.Mc=function(){throw Xh;};U.prototype.rcp=U.prototype.Mc;U.prototype.min=function(a,b){return this.hb(a,b,y(this.Oh,this,Ug))};U.prototype.min=U.prototype.min; U.prototype.max=function(a,b){return this.hb(a,b,y(this.Nh,this,Tg))};U.prototype.max=U.prototype.max;U.prototype.Dc=function(){throw Xh;};U.prototype.frc=U.prototype.Dc;U.prototype.Tc=function(){throw Xh;};U.prototype.sqt=U.prototype.Tc;U.prototype.pf=function(){throw Xh;};U.prototype.rsq=U.prototype.pf;U.prototype.pow=function(a,b){return this.hb(a,b,y(this.Qh,this,Wg))};U.prototype.pow=U.prototype.pow;U.prototype.log=function(){throw Xh;};U.prototype.log=U.prototype.log; U.prototype.exp=function(){throw Xh;};U.prototype.exp=U.prototype.exp;U.prototype.ba=function(){throw Xh;};U.prototype.nrm=U.prototype.ba;U.prototype.sin=function(){throw Xh;};U.prototype.sin=U.prototype.sin;U.prototype.cos=function(){throw Xh;};U.prototype.cos=U.prototype.cos;U.prototype.Tb=function(){throw Xh;};U.prototype.crs=U.prototype.Tb;U.prototype.ma=function(){throw Xh;};U.prototype.dp3=U.prototype.ma;U.prototype.Ce=function(){throw Xh;};U.prototype.dp4=U.prototype.Ce; U.prototype.abs=function(){throw Xh;};U.prototype.abs=U.prototype.abs;U.prototype.Hc=function(){throw Xh;};U.prototype.neg=U.prototype.Hc;U.prototype.Ga=function(){throw Xh;};U.prototype.sat=U.prototype.Ga;U.prototype.m33=function(){throw Xh;};U.prototype.m33=U.prototype.m33;U.prototype.m44=function(){throw Xh;};U.prototype.m44=U.prototype.m44;U.prototype.m34=function(){throw Xh;};U.prototype.m34=U.prototype.m34;U.prototype.Oe=function(){throw Xh;};U.prototype.ife=U.prototype.Oe; U.prototype.Re=function(){throw Xh;};U.prototype.ine=U.prototype.Re;U.prototype.Pe=function(){throw Xh;};U.prototype.ifg=U.prototype.Pe;U.prototype.Qe=function(){throw Xh;};U.prototype.ifl=U.prototype.Qe;U.prototype.Fe=function(){throw Xh;};U.prototype.els=U.prototype.Fe;U.prototype.De=function(){throw Xh;};U.prototype.eif=U.prototype.De;U.prototype.Bf=function(){throw Xh;};U.prototype.ted=U.prototype.Bf;U.prototype.vf=function(){throw Xh;};U.prototype.sge=U.prototype.vf; U.prototype.Sd=function(){throw Xh;};U.prototype.slt=U.prototype.Sd;U.prototype.wf=function(){throw Xh;};U.prototype.sgn=U.prototype.wf;U.prototype.Kd=function(){throw Xh;};U.prototype.seq=U.prototype.Kd;U.prototype.Ud=function(){throw Xh;};U.prototype.sne=U.prototype.Ud;U.prototype.Qk=p(0);U.prototype.i_mov=U.prototype.Qk;U.prototype.Lh=function(a,b){return a+b};U.prototype.i_add=U.prototype.Lh;U.prototype.Rh=function(a,b){return a-b};U.prototype.i_sub=U.prototype.Rh; U.prototype.Ph=function(a,b){return a*b};U.prototype.i_mul=U.prototype.Ph;U.prototype.Mh=function(a,b){return a/b};U.prototype.i_div=U.prototype.Mh;U.prototype.Tk=function(a){return 1/a};U.prototype.i_rcp=U.prototype.Tk;U.prototype.Oh=function(a,b){return Math.min(a,b)};U.prototype.i_min=U.prototype.Oh;U.prototype.Nh=function(a,b){return Math.max(a,b)};U.prototype.i_max=U.prototype.Nh;U.prototype.Hk=p(0);U.prototype.i_frc=U.prototype.Hk;U.prototype.bl=p(0);U.prototype.i_sqt=U.prototype.bl; U.prototype.Uk=p(0);U.prototype.i_rsq=U.prototype.Uk;U.prototype.Qh=function(a,b){return Math.pow(a,b)};U.prototype.i_pow=U.prototype.Qh;U.prototype.Mk=p(0);U.prototype.i_log=U.prototype.Mk;U.prototype.Gk=p(0);U.prototype.i_exp=U.prototype.Gk;U.prototype.Sk=p(0);U.prototype.i_nrm=U.prototype.Sk;U.prototype.Zk=p(0);U.prototype.i_sin=U.prototype.Zk;U.prototype.Ak=p(0);U.prototype.i_cos=U.prototype.Ak;U.prototype.Bk=p(0);U.prototype.i_crs=U.prototype.Bk;U.prototype.Ck=p(0);U.prototype.i_dp3=U.prototype.Ck; U.prototype.Dk=p(0);U.prototype.i_dp4=U.prototype.Dk;U.prototype.zk=p(0);U.prototype.i_abs=U.prototype.zk;U.prototype.Rk=p(0);U.prototype.i_neg=U.prototype.Rk;U.prototype.Vk=p(0);U.prototype.i_sat=U.prototype.Vk;U.prototype.Nk=p(0);U.prototype.i_m33=U.prototype.Nk;U.prototype.Pk=p(0);U.prototype.i_m44=U.prototype.Pk;U.prototype.Ok=p(0);U.prototype.i_m34=U.prototype.Ok;U.prototype.Ik=p(0);U.prototype.i_ife=U.prototype.Ik;U.prototype.Lk=p(0);U.prototype.i_ine=U.prototype.Lk;U.prototype.Jk=p(0); U.prototype.i_ifg=U.prototype.Jk;U.prototype.Kk=p(0);U.prototype.i_ifl=U.prototype.Kk;U.prototype.Fk=p(0);U.prototype.i_els=U.prototype.Fk;U.prototype.Ek=p(0);U.prototype.i_eif=U.prototype.Ek;U.prototype.cl=p(0);U.prototype.i_ted=U.prototype.cl;U.prototype.Xk=p(0);U.prototype.i_sge=U.prototype.Xk;U.prototype.$k=p(0);U.prototype.i_slt=U.prototype.$k;U.prototype.Yk=p(0);U.prototype.i_sgn=U.prototype.Yk;U.prototype.Wk=p(0);U.prototype.i_seq=U.prototype.Wk;U.prototype.al=p(0);U.prototype.i_sne=U.prototype.al; U.prototype.g={names:[{name:'NativeOp',h:vc}]};r(vc,U);function V(a,b){a='undefined'!==typeof a?a:Context3DProgramType.mj;this.lines=[];this.logs={};this.creator=('undefined'!==typeof b?b:null)||new Dm;this.programType=a;this.Al=new U(this)}q=V.prototype;q.Cf=0;q.Gf=0;q.qf=0;q.qe=0;q.Of=0;q.Oa=0;V.prototype.constMemLen=V.prototype.Oa;V.prototype.m=!0;V.prototype.invalid=V.prototype.m;V.prototype.clear=function(){this.lines=[];this.Oa=this.Of=this.qe=this.qf=this.Gf=this.Cf=0};V.prototype.clear=V.prototype.clear;V.prototype.Lb=h();V.prototype.build=V.prototype.Lb; V.prototype.di=function(){var a=[],b=[],c=[],d=[];this.uniforms=[];this.samplers=[];this.buffs=[];this.varyings=[];for(var e=0;e<this.lines.length;e++)for(var f=this.lines[e],g=f.length,l=1;l<g;l++){var n=f[l];zn(this,n,e,a,b,c);x(n.component,Bm)&&zn(this,w(n.component,Bm),e,a,b,c)}this.Gf&&(this.uniforms=this.Jc(this.uniforms,this.Jf));var e=this.uniforms,t;for(t in e)n=e[t],n=n.index+n.Na,n>this.Oa&&(this.Oa=n);this.programType==cg&&this.qf&&(this.samplers=this.Jc(this.samplers,this.rf));this.programType== kk&&this.qe&&(this.buffs=this.Jc(this.buffs,this.se));this.programType==kk&&this.Of&&(this.varyings=this.Jc(this.varyings,this.Pf));g=a.length;for(e=1;e<g;e++)if(t=a[e])for(n=t[0],l=0;l<e;l++)if((f=a[l])&&n>f[1]){var u=b[e],v;for(v in u)n=u[v],n.index=l;f[1]=t[1];t[0]=0;t[1]=0;break}for(var G in c){n=c[G];a=w(n.data,Array);v=b=a.length;g=!1;if(4>=b)for(e=0;e<d.length;e+=4){for(l=0;l<=4-b;l++){for(var g=!0,E=0;E<b;E++)if(a[E]!=d[e+l+E]){g=!1;break}if(g)break}if(g)break}if(g){if(n.index=(e/4>>0)+this.Oa, 0<e%4||4!=v)n.component='xyzw'.substr((e+l+E-b)%4,b)}else{4<v&&(v=4);for(g=d.length;;){t=g%4;if(4>=t+v)break;g++}for(E=0;E<b;E++)d[E+g]=a[E];n.index=(g/4>>0)+this.Oa;if(0<t||4!=v)n.component='xyzw'.substr(t,b)}}for(;0!=d.length%4;)d.push(0);this.constPoolVec=d.slice()};V.prototype.optimize=V.prototype.di; function zn(a,b,c,d,e,f){2==b.type?(a=d[b.index],null==a&&(a=d[b.index]=[c,c]),a[1]=c,c=e[b.index],null==c&&(c=e[b.index]=[]),c.push(b)):1==b.type?-1!=b.index?a.uniforms.push(b):f.push(b):5==b.type?a.samplers.push(b):3==b.type?a.buffs.push(b):4==b.type&&a.varyings.push(b)} V.prototype.Jc=function(a,b){var c={},d=[],e={},f=0,g;for(g in a){var l=a[g];null==c[l.index]&&(c[l.index]=[],d.push(l),e[l.index]=f,f+=l.Na);c[l.index].push(l)}for(var n in b)l=b[n],c[l.index]&&c[l.index].push(l);for(var t in c){f=e[t];g=c[t];for(var u in g)l=g[u],l.index=f,l.o=!0}return d};V.prototype.optimizeVar=V.prototype.Jc;V.prototype.od=function(){var a=new Bm(2,this.Cf);this.Cf++;return a};V.prototype.createTempVar=V.prototype.od; function An(a,b,c){c='undefined'!==typeof c?c:1;a=a.Yd(-1);a.data=b;a.Na=c;4>b.length&&(a.component='xyzw'.substr(0,b.length));return a}function Bn(a,b){var c=a.Yd(a.Gf++,'undefined'!==typeof b?b:1);a.Jf=a.Jf||[];a.Jf.push(c);return c}V.prototype.ka=function(){return Bn(this)};V.prototype.uniform=V.prototype.ka;V.prototype.matrix=function(){return Bn(this,4)};V.prototype.matrix=V.prototype.matrix;V.prototype.tl=function(){return Bn(this,3)};V.prototype.matrix34=V.prototype.tl; V.prototype.Bh=function(a){return Bn(this,a)};V.prototype.floatArray=V.prototype.Bh;V.prototype.bi=function(a){return Bn(this,4*a)};V.prototype.matrixArray=V.prototype.bi;V.prototype.ul=function(a){return Bn(this,3*a)};V.prototype.matrix34Array=V.prototype.ul;V.prototype.buff=function(){var a=this.Vf(this.qe++);this.se=this.se||[];this.se.push(a);return a};V.prototype.buff=V.prototype.buff;V.prototype.Cb=function(){var a=this.Tf(this.qf++);this.rf=this.rf||[];this.rf.push(a);return a}; V.prototype.sampler=V.prototype.Cb;V.prototype.za=function(){var a=this.Uf(this.Of++);this.Pf=this.Pf||[];this.Pf.push(a);return a};V.prototype.varying=V.prototype.za;V.prototype.debug=function(a){this.logs[this.lines.length]=this.logs[this.lines.length]||[];this.logs[this.lines.length].push(a)};V.prototype.debug=V.prototype.debug; V.prototype.f=function(a,b,c,d,e,f,g){b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;d='undefined'!==typeof d?d:null;e='undefined'!==typeof e?e:null;f='undefined'!==typeof f?f:3;g='undefined'!==typeof g?g:null;var l=[a];if(null!=b){var n=this.Fd(b);l.push(n)}if(null!=c){var t=this.Fd(c);l.push(t)}if(n&&t&&1==n.type&&1==t.type)return this.Al.zh(a,n,t);if(1<f)var u=d||this.od();g&&(u=u.c(g));u&&l.splice(1,0,u);l.flag=e;this.lines.push(l);return u};V.prototype.f=V.prototype.f; V.prototype.Fd=function(a){return x(a,Bm)?w(a,Bm):this.Sf(a)};V.prototype.object2Var=V.prototype.Fd;V.prototype.ub=function(a,b,c){c='undefined'!==typeof c?c:null;if(0==b.length)return c;if(1==b.length)return this.B(b[0],c);for(var d=b[0],e=1;e<b.length-1;e++)d=this.f(a,d,b[e]);return this.f(a,d,b[b.length-1],c)};V.prototype.f2=V.prototype.ub;V.prototype.zc=function(a,b,c,d){c='undefined'!==typeof c?c:2;d='undefined'!==typeof d?d:null;return this.length(this.sub(a,b),c,d)};V.prototype.distance=V.prototype.zc; V.prototype.length=function(a,b,c){b='undefined'!==typeof b?b:2;c='undefined'!==typeof c?c:null;a=this.v(a,a);var d=[a.x,a.y];2<b&&d.push(a.z);3<b&&d.push(a.w);return this.Tc(this.le(d),c)};V.prototype.length=V.prototype.length;V.prototype.atan=function(a,b){b='undefined'!==typeof b?b:null;return this.ia(this.v(Math.PI/2,a),this.add(1,this.abs(a)),b)};V.prototype.atan=V.prototype.atan; V.prototype.atan2=function(a,b,c){c='undefined'!==typeof c?c:null;return this.v(2,this.atan(this.ia(a,this.add(this.Tc(this.add(this.v(b,b),this.v(a,a))),b))),c)};V.prototype.atan2=V.prototype.atan2;V.prototype.yf=function(a,b,c,d){d='undefined'!==typeof d?d:null;a=this.Ga(this.ia(this.sub(c,a),this.sub(b,a)));return this.Yb([a,a,this.sub(3,this.v(2,a))],d)};V.prototype.smoothstep=V.prototype.yf; V.prototype.ef=function(a,b,c,d){d='undefined'!==typeof d?d:null;return this.add(a,this.v(c,this.sub(b,a)),d)};V.prototype.mix=V.prototype.ef;V.prototype.yl=function(a,b,c){c='undefined'!==typeof c?c:null;a=this.ia(a,b);return this.v(this.Dc(a),b,c)};V.prototype.mod=V.prototype.yl;V.prototype.Ie=function(a,b){b='undefined'!==typeof b?b:null;return this.add(this.abs(this.wh(a)),this.abs(this.xh(a)),b)};V.prototype.fwidth=V.prototype.Ie; V.prototype.dj=function(a,b,c){c=('undefined'!==typeof c?c:null)||this.od();this.B(a,c.x);this.B(b,c.y);return c};V.prototype.vec2=V.prototype.dj;V.prototype.ej=function(a,b,c,d){d=this.dj(a,b,'undefined'!==typeof d?d:null);this.B(c,d.z);return d};V.prototype.vec3=V.prototype.ej;V.prototype.Cm=function(a,b,c,d,e){e=this.ej(a,b,c,'undefined'!==typeof e?e:null);this.B(d,e.w);return e};V.prototype.vec4=V.prototype.Cm;V.prototype.Yb=function(a,b){return this.ub(Rh,a,'undefined'!==typeof b?b:null)}; V.prototype.mul2=V.prototype.Yb;V.prototype.le=function(a,b){return this.ub(ec,a,'undefined'!==typeof b?b:null)};V.prototype.add2=V.prototype.le;V.prototype.um=function(a,b){return this.ub(sj,a,'undefined'!==typeof b?b:null)};V.prototype.sub2=V.prototype.um;V.prototype.bk=function(a,b){return this.ub(de,a,'undefined'!==typeof b?b:null)};V.prototype.div2=V.prototype.bk;V.prototype.vl=function(a,b){return this.ub(xh,a,'undefined'!==typeof b?b:null)};V.prototype.max2=V.prototype.vl; V.prototype.xl=function(a,b){return this.ub(yh,a,'undefined'!==typeof b?b:null)};V.prototype.min2=V.prototype.xl;V.prototype.Nj=function(a,b,c,d){d='undefined'!==typeof d?d:null;return this.min(c,this.max(a,b),d)};V.prototype.clamp=V.prototype.Nj;V.prototype.floor=function(a,b){b='undefined'!==typeof b?b:null;return this.sub(a,this.Dc(a),b)};V.prototype.floor=V.prototype.floor; V.prototype.Sf=function(a,b){b='undefined'!==typeof b?b:1;return x(a,Number)||x(a,Number)||x(a,Number)?An(this,[a],b):x(a,Array)&&4<=a.length?An(this,[a[0],a[1],a[2],a[3]],b):An(this,a,b)};V.prototype.F=V.prototype.Sf;V.prototype.kj=function(a){return An(this,a,4)};V.prototype.M=V.prototype.kj;V.prototype.Yd=function(a,b){b='undefined'!==typeof b?b:1;var c=new Bm(1,'undefined'!==typeof a?a:0);c.Na=b;return c};V.prototype.C=V.prototype.Yd; V.prototype.lj=function(a){return new Bm(2,'undefined'!==typeof a?a:0)};V.prototype.T=V.prototype.lj;V.prototype.Vf=function(a){return new Bm(3,'undefined'!==typeof a?a:0)};V.prototype.VA=V.prototype.Vf;V.prototype.Uf=function(a){return new Bm(4,'undefined'!==typeof a?a:0)};V.prototype.V=V.prototype.Uf;V.prototype.Tf=function(a){return new Bm(5,'undefined'!==typeof a?a:0)};V.prototype.FS=V.prototype.Tf;V.prototype.B=function(a,b){return this.f(Qh,a,null,'undefined'!==typeof b?b:null)}; V.prototype.mov=V.prototype.B;V.prototype.add=function(a,b,c){return this.f(ec,a,b,'undefined'!==typeof c?c:null)};V.prototype.add=V.prototype.add;V.prototype.sub=function(a,b,c){return this.f(sj,a,b,'undefined'!==typeof c?c:null)};V.prototype.sub=V.prototype.sub;V.prototype.v=function(a,b,c){return this.f(Rh,a,b,'undefined'!==typeof c?c:null)};V.prototype.mul=V.prototype.v;V.prototype.ia=function(a,b,c){return this.f(de,a,b,'undefined'!==typeof c?c:null)};V.prototype.div=V.prototype.ia; V.prototype.Mc=function(a,b){return this.f(Bi,a,null,'undefined'!==typeof b?b:null)};V.prototype.rcp=V.prototype.Mc;V.prototype.min=function(a,b,c){return this.f(yh,a,b,'undefined'!==typeof c?c:null)};V.prototype.min=V.prototype.min;V.prototype.max=function(a,b,c){return this.f(xh,a,b,'undefined'!==typeof c?c:null)};V.prototype.max=V.prototype.max;V.prototype.Dc=function(a,b){return this.f(gg,a,null,'undefined'!==typeof b?b:null)};V.prototype.frc=V.prototype.Dc; V.prototype.Tc=function(a,b){return this.f(hj,a,null,'undefined'!==typeof b?b:null)};V.prototype.sqt=V.prototype.Tc;V.prototype.pf=function(a,b){return this.f(Mi,a,null,'undefined'!==typeof b?b:null)};V.prototype.rsq=V.prototype.pf;V.prototype.pow=function(a,b,c){return this.f(vi,a,b,'undefined'!==typeof c?c:null)};V.prototype.pow=V.prototype.pow;V.prototype.log=function(a,b){return this.f(sh,a,null,'undefined'!==typeof b?b:null)};V.prototype.log=V.prototype.log; V.prototype.exp=function(a,b){return this.f(Ce,a,null,'undefined'!==typeof b?b:null)};V.prototype.exp=V.prototype.exp;V.prototype.ba=function(a,b,c){return this.f(ei,a,null,'undefined'!==typeof b?b:null,null,3,('undefined'!==typeof c?c:null)||Ek)};V.prototype.nrm=V.prototype.ba;V.prototype.sin=function(a,b){return this.f(Xi,a,null,'undefined'!==typeof b?b:null)};V.prototype.sin=V.prototype.sin;V.prototype.cos=function(a,b){return this.f(Vd,a,null,'undefined'!==typeof b?b:null)};V.prototype.cos=V.prototype.cos; V.prototype.Tb=function(a,b,c,d){return this.f(Xd,a,b,'undefined'!==typeof c?c:null,null,3,('undefined'!==typeof d?d:null)||Ek)};V.prototype.crs=V.prototype.Tb;V.prototype.ma=function(a,b,c){return this.f(ge,a,b,'undefined'!==typeof c?c:null)};V.prototype.dp3=V.prototype.ma;V.prototype.Ce=function(a,b,c){return this.f(he,a,b,'undefined'!==typeof c?c:null)};V.prototype.dp4=V.prototype.Ce;V.prototype.abs=function(a,b){return this.f(cc,a,null,'undefined'!==typeof b?b:null)};V.prototype.abs=V.prototype.abs; V.prototype.Hc=function(a,b){return this.f(Vh,a,null,'undefined'!==typeof b?b:null)};V.prototype.neg=V.prototype.Hc;V.prototype.Ga=function(a,b){return this.f(Pi,a,null,'undefined'!==typeof b?b:null)};V.prototype.sat=V.prototype.Ga;V.prototype.m33=function(a,b,c,d){return this.f(th,a,b,'undefined'!==typeof c?c:null,null,3,('undefined'!==typeof d?d:null)||Ek)};V.prototype.m33=V.prototype.m33;V.prototype.m44=function(a,b,c){return this.f(vh,a,b,'undefined'!==typeof c?c:null)};V.prototype.m44=V.prototype.m44; V.prototype.m34=function(a,b,c,d){return this.f(uh,a,b,'undefined'!==typeof c?c:null,null,3,('undefined'!==typeof d?d:null)||Ek)};V.prototype.m34=V.prototype.m34;V.prototype.wh=function(a,b){return this.f($d,a,null,'undefined'!==typeof b?b:null)};V.prototype.ddx=V.prototype.wh;V.prototype.xh=function(a,b){return this.f(ae,a,null,'undefined'!==typeof b?b:null)};V.prototype.ddy=V.prototype.xh;V.prototype.Oe=function(a,b,c){return this.f(Yg,a,b,'undefined'!==typeof c?c:null)};V.prototype.ife=V.prototype.Oe; V.prototype.Re=function(a,b,c){return this.f(bh,a,b,'undefined'!==typeof c?c:null)};V.prototype.ine=V.prototype.Re;V.prototype.Pe=function(a,b,c){return this.f(Zg,a,b,'undefined'!==typeof c?c:null)};V.prototype.ifg=V.prototype.Pe;V.prototype.Qe=function(a,b,c){return this.f($g,a,b,'undefined'!==typeof c?c:null)};V.prototype.ifl=V.prototype.Qe;V.prototype.Fe=function(a,b,c){return this.f(le,a,b,'undefined'!==typeof c?c:null)};V.prototype.els=V.prototype.Fe; V.prototype.De=function(a,b,c){return this.f(ke,a,b,'undefined'!==typeof c?c:null)};V.prototype.eif=V.prototype.De;V.prototype.Bf=function(a,b,c){return this.f(uj,a,b,'undefined'!==typeof c?c:null)};V.prototype.ted=V.prototype.Bf;V.prototype.Xh=function(a){return this.f(lh,a,null,null,null,1)};V.prototype.kil=V.prototype.Xh;V.prototype.ob=function(a,b,c,d){return this.f(vj,'undefined'!==typeof a?a:null,'undefined'!==typeof b?b:null,'undefined'!==typeof c?c:null,'undefined'!==typeof d?d:null)}; V.prototype.tex=V.prototype.ob;V.prototype.vf=function(a,b,c){return this.f(Ti,a,b,'undefined'!==typeof c?c:null)};V.prototype.sge=V.prototype.vf;V.prototype.Sd=function(a,b,c){return this.f($i,a,b,'undefined'!==typeof c?c:null)};V.prototype.slt=V.prototype.Sd;V.prototype.wf=function(a,b,c){return this.f(Ui,a,b,'undefined'!==typeof c?c:null)};V.prototype.sgn=V.prototype.wf;V.prototype.Kd=function(a,b,c){return this.f(Si,a,b,'undefined'!==typeof c?c:null)};V.prototype.seq=V.prototype.Kd; V.prototype.Ud=function(a,b,c){return this.f(aj,a,b,'undefined'!==typeof c?c:null)};V.prototype.sne=V.prototype.Ud;Object.defineProperties(V.prototype,{code:{get:function(){this.m&&(this.m=!1,this.Lb(),this.di(),this.creator.Pa(this));null==this.creator.data&&this.creator.Pa(this);return this.creator.data}},op:{get:function(){return new Bm(7)},set:function(a){this.B(a,this.op)}},oc:{get:function(){return new Bm(6)},set:function(a){this.B(a,this.oc)}}});V.prototype.g={names:[{name:'AS3Shader',h:sc}]}; r(sc,V);function X(a,b,c){this.X=a;this.index='undefined'!==typeof c?c:0;this.j=b}X.prototype.Kg=function(a,b){this.j.o&&b.view.renderer.gl3d.pa(this.X.programType,this.j.index,b.node.world,!0)};X.prototype.bindModelUniform=X.prototype.Kg;X.prototype.dh=function(a,b){this.j.o&&b.view.renderer.gl3d.pa(this.X.programType,this.j.index,b.camera.world2local,!0)};X.prototype.bindViewUniform=X.prototype.dh; X.prototype.Ng=function(a,b){this.j.o&&b.view.renderer.gl3d.pa(this.X.programType,this.j.index,b.camera.perspective,!0)};X.prototype.bindPerspectiveUniform=X.prototype.Ng;X.prototype.gh=function(a,b){this.j.o&&b.view.renderer.gl3d.pa(this.X.programType,this.j.index,b.node.world2local,!0)};X.prototype.bindWorld2localUniform=X.prototype.gh;X.prototype.Gg=function(a,b){if(this.j.o){var c=b.view.lights[this.index].world.position;c.w=1;b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,c)}}; X.prototype.bindLightPosUniform=X.prototype.Gg;X.prototype.Hg=function(a,b){this.j.o&&b.view.renderer.gl3d.pa(this.X.programType,this.j.index,b.view.lights[this.index].shadowCamera.world,!0)};X.prototype.bindLightShadowCameraWorld=X.prototype.Hg;X.prototype.zg=function(a,b){this.j.o&&b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,b.camera.world.position)};X.prototype.bindCameraPosUniform=X.prototype.zg; X.prototype.Zg=function(a,b){this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,b.view.time,b.view.time,b.view.time,b.view.time)};X.prototype.bindTimeUniform=X.prototype.Zg;X.prototype.Og=function(a,b){this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,b.view.nb,b.view.nb,1/b.view.nb,1/b.view.ic)};X.prototype.bindPixelSizeUniform=X.prototype.Og;X.prototype.Yg=function(a,b){this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,b.diffTexture.width,b.diffTexture.height)}; X.prototype.bindTextureSizeUniform=X.prototype.Yg;X.prototype.bh=function(a,b){this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,b.uvMuler?b.uvMuler[0]:1,b.uvMuler?b.uvMuler[1]:1,b.uvAdder?b.uvAdder[0]:0,b.uvAdder?b.uvAdder[1]:0)};X.prototype.bindUVMulAddUniform=X.prototype.bh;X.prototype.Dg=function(a,b){this.j.o&&b.view.renderer.gl3d.ab(this.X.programType,this.j.index,b.node.skin.Ci.Om)};X.prototype.bindJointsQuatUniform=X.prototype.Dg; X.prototype.Cg=function(a,b){if(this.j.o)for(var c=b.node.skin.Ci.Mm,d=this.j.index,e=0;e<c.length;e++)b.view.renderer.gl3d.pa(kk,d+4*e,c[e],!0)};X.prototype.bindJointsMatrixUniform=X.prototype.Cg;X.prototype.Jg=function(a,b){this.j.o&&b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,b.color)};X.prototype.bindMaterialColorUniform=X.prototype.Jg;X.prototype.Eg=function(a,b){this.j.o&&b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,b.view.lights[this.index].color)}; X.prototype.bindLightColorUniform=X.prototype.Eg;X.prototype.Fg=function(a,b){var c=b.view.lights[this.index],d=1/(Math.cos(c.innerConeAngle/2)-Math.cos(c.outerConeAngle/2)),e=1-Math.cos(c.innerConeAngle/2)*d;this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,c.zc,d,e)};X.prototype.bindLightColorVar=X.prototype.Fg;X.prototype.yg=function(a,b){this.j.o&&b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,b.ambient)};X.prototype.bindAmbientUniform=X.prototype.yg; X.prototype.Tg=function(a,b){this.j.o&&b.view.renderer.gl3d.Fb(this.X.programType,this.j.index,b.Di)};X.prototype.bindSpecularUniform=X.prototype.Tg;X.prototype.fh=function(a,b){this.j.o&&b.view.renderer.gl3d.Eb(this.X.programType,this.j.index,b.wireframeColor)};X.prototype.bindWireframeColorUniform=X.prototype.fh;X.prototype.Ag=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.diffTexture)};X.prototype.bindDiffSampler=X.prototype.Ag; X.prototype.Mg=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.normalmapTexture)};X.prototype.bindNormalmapSampler=X.prototype.Mg;X.prototype.Ig=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.lightmapTexture)};X.prototype.bindLightmapSampler=X.prototype.Ig;X.prototype.Rg=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.reflectTexture)};X.prototype.bindReflectSampler=X.prototype.Rg;X.prototype.Xg=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.terrainTextureSets[this.index])}; X.prototype.bindTerrainsSampler=X.prototype.Xg;X.prototype.Sg=function(a,b){this.j.o&&(a.textureSets[this.j.index]=b.view.lights[this.index].shadowMap)};X.prototype.bindShadowmapsSampler=X.prototype.Sg;X.prototype.Pg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.skin&&b.node.skin.aj&&b.node.drawable.pos.cpuSkin?b.node.drawable.pos.cpuSkin:b.node.drawable.pos)};X.prototype.bindPosBuff=X.prototype.Pg; X.prototype.Lg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.skin&&b.node.skin.aj&&b.node.drawable.norm.cpuSkin?b.node.drawable.norm.cpuSkin:b.node.drawable.norm)};X.prototype.bindNormBuff=X.prototype.Lg;X.prototype.Vg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.tangent)};X.prototype.bindTangentBuff=X.prototype.Vg;X.prototype.ah=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.uv)};X.prototype.bindUVBuff=X.prototype.ah; X.prototype.Qg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.random)};X.prototype.bindRandomBuff=X.prototype.Qg;X.prototype.Ug=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.sphereRandom)};X.prototype.bindSphereRandomBuff=X.prototype.Ug;X.prototype.Wg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.targetPosition)};X.prototype.bindTargetPositionBuff=X.prototype.Wg;X.prototype.$g=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.uv2)}; X.prototype.bindUV2Buff=X.prototype.$g;X.prototype.Bg=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.joint)};X.prototype.bindJointsBuff=X.prototype.Bg;X.prototype.eh=function(a,b){this.j.o&&(a.buffSets[this.j.index]=b.node.drawable.weight)};X.prototype.bindWeightsBuff=X.prototype.eh;X.prototype.g={names:[{name:'GLBinder',h:Cg}]};r(Cg,X);function Y(a,b){a='undefined'!==typeof a?a:Context3DProgramType.mj;this.namedVars={};this.s=[];V.call(this,a,'undefined'!==typeof b?b:null)}Pk(Y,V);Y.prototype.bind=function(a,b){var c=this.s,d;for(d in c)(0,c[d])(a,b)};Y.prototype.bind=Y.prototype.bind;Y.prototype.Oi=function(){if(this.i(Qj))return this.i(Qj);var a=this.matrix();this.u(Qj,a);var b=new X(this,a);this.s.push(y(b.Kg,b,Uc));return a};Y.prototype.uniformModel=Y.prototype.Oi; Y.prototype.Si=function(){if(this.i(Zj))return this.i(Zj);var a=this.matrix();this.u(Zj,a);var b=new X(this,a);this.s.push(y(b.dh,b,md));return a};Y.prototype.uniformView=Y.prototype.Si;Y.prototype.Pi=function(){if(this.i(Sj))return this.i(Sj);var a=this.matrix();this.u(Sj,a);var b=new X(this,a);this.s.push(y(b.Ng,b,Xc));return a};Y.prototype.uniformPerspective=Y.prototype.Pi; Y.prototype.Ui=function(){if(this.i(ck))return this.i(ck);var a=this.matrix();this.u(ck,a);var b=new X(this,a);this.s.push(y(b.gh,b,pd));return a};Y.prototype.uniformWorld2Local=Y.prototype.Ui;Y.prototype.Wc=function(a){var b=Nj+a;if(this.i(b))return this.i(b);var c=this.ka();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Gg,a,Qc));return c};Y.prototype.uniformLightPos=Y.prototype.Wc; Y.prototype.Li=function(a){var b=Lj+a;if(this.i(b))return this.i(b);var c=this.ka();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Hg,a,Rc));return c};Y.prototype.uniformLightShadowCameraWorld=Y.prototype.Li;Y.prototype.Ff=function(){if(this.i(Ij))return this.i(Ij);var a=this.ka();this.u(Ij,a);var b=new X(this,a);this.s.push(y(b.zg,b,Jc));return a};Y.prototype.uniformCameraPos=Y.prototype.Ff; Y.prototype.Am=function(){if(this.i(Xj))return this.i(Xj);var a=this.ka();this.u(Xj,a);var b=new X(this,a);this.s.push(y(b.Zg,b,id));return a};Y.prototype.uniformTime=Y.prototype.Am;Y.prototype.zm=function(){if(this.i(Tj))return this.i(Tj);var a=this.ka();this.u(Tj,a);var b=new X(this,a);this.s.push(y(b.Og,b,Yc));return a};Y.prototype.uniformPixelSize=Y.prototype.zm; Y.prototype.Ri=function(){if(this.i(Vj))return this.i(Vj);var a=this.ka();this.u(Vj,a);var b=new X(this,a);this.s.push(y(b.Yg,b,hd));return a};Y.prototype.uniformTextureSize=Y.prototype.Ri;Y.prototype.If=function(){if(this.i(ak))return this.i(ak);var a=this.ka();this.u(ak,a);var b=new X(this,a);this.s.push(y(b.bh,b,ld));return a};Y.prototype.uniformUVMulAdder=Y.prototype.If; Y.prototype.Ki=function(a){if(this.i(Kj))return this.i(Kj);a=this.Bh(2*a);this.u(Kj,a);var b=new X(this,a);this.s.push(y(b.Dg,b,Nc));return a};Y.prototype.uniformJointsQuat=Y.prototype.Ki;Y.prototype.Ji=function(a){if(this.i(Jj))return this.i(Jj);a=this.bi(a);this.u(Jj,a);var b=new X(this,a);this.s.push(y(b.Cg,b,Mc));return a};Y.prototype.uniformJointsMatrix=Y.prototype.Ji; Y.prototype.Ni=function(){if(this.i(Pj))return this.i(Pj);var a=this.ka();this.u(Pj,a);var b=new X(this,a);this.s.push(y(b.Jg,b,Tc));return a};Y.prototype.uniformMaterialColor=Y.prototype.Ni;Y.prototype.Hf=function(a){var b=Mj+a;if(this.i(b))return this.i(b);var c=this.ka();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Eg,a,Oc));return c};Y.prototype.uniformLightColor=Y.prototype.Hf; Y.prototype.Xc=function(a){var b=Oj+a;if(this.i(b))return this.i(b);var c=this.ka();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Fg,a,Pc));return c};Y.prototype.uniformLightVar=Y.prototype.Xc;Y.prototype.Ii=function(){if(this.i(Hj))return this.i(Hj);var a=this.ka();this.u(Hj,a);var b=new X(this,a);this.s.push(y(b.yg,b,Ic));return a};Y.prototype.uniformAmbient=Y.prototype.Ii; Y.prototype.Qi=function(){if(this.i(Uj))return this.i(Uj);var a=this.ka();this.u(Uj,a);var b=new X(this,a);this.s.push(y(b.Tg,b,cd));return a};Y.prototype.uniformSpecular=Y.prototype.Qi;Y.prototype.Ti=function(){if(this.i(bk))return this.i(bk);var a=this.ka();this.u(bk,a);var b=new X(this,a);this.s.push(y(b.fh,b,od));return a};Y.prototype.uniformWireframeColor=Y.prototype.Ti; Y.prototype.ui=function(){if(this.i(Ri))return this.i(Ri);var a=this.Cb();this.u(Ri,a);var b=new X(this,a);this.s.push(y(b.Ag,b,Kc));return a};Y.prototype.samplerDiff=Y.prototype.ui;Y.prototype.vi=function(){if(this.i(bj))return this.i(bj);var a=this.Cb();this.u(bj,a);var b=new X(this,a);this.s.push(y(b.Mg,b,Wc));return a};Y.prototype.samplerNormalmap=Y.prototype.vi; Y.prototype.$l=function(){if(this.i(Zi))return this.i(Zi);var a=this.Cb();this.u(Zi,a);var b=new X(this,a);this.s.push(y(b.Ig,b,Sc));return a};Y.prototype.samplerLightmap=Y.prototype.$l;Y.prototype.wi=function(){if(this.i(ij))return this.i(ij);var a=this.Cb();this.u(ij,a);var b=new X(this,a);this.s.push(y(b.Rg,b,ad));return a};Y.prototype.samplerReflect=Y.prototype.wi; Y.prototype.am=function(a){var b=pj+a;if(this.i(b))return this.i(b);var c=this.Cb();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Xg,a,gd));return c};Y.prototype.samplerTerrains=Y.prototype.am;Y.prototype.xi=function(a){var b=jj+a;if(this.i(b))return this.i(b);var c=this.Cb();this.u(b,c);a=new X(this,c,a);this.s.push(y(a.Sg,a,bd));return c};Y.prototype.samplerShadowmaps=Y.prototype.xi; Y.prototype.jh=function(){var a=this.i(td);if(a)return a;a=this.buff();this.u(td,a);var b=new X(this,a);this.s.push(y(b.Pg,b,Zc));return a};Y.prototype.buffPos=Y.prototype.jh;Y.prototype.ih=function(){if(this.i(rd))return this.i(rd);var a=this.buff();this.u(rd,a);var b=new X(this,a);this.s.push(y(b.Lg,b,Vc));return a};Y.prototype.buffNorm=Y.prototype.ih;Y.prototype.kh=function(){if(this.i(wd))return this.i(wd);var a=this.buff();this.u(wd,a);var b=new X(this,a);this.s.push(y(b.Vg,b,ed));return a}; Y.prototype.buffTangent=Y.prototype.kh;Y.prototype.mh=function(){if(this.i(yd))return this.i(yd);var a=this.buff();this.u(yd,a);var b=new X(this,a);this.s.push(y(b.ah,b,kd));return a};Y.prototype.buffUV=Y.prototype.mh;Y.prototype.Kj=function(){if(this.i(ud))return this.i(ud);var a=this.buff();this.u(ud,a);var b=new X(this,a);this.s.push(y(b.Qg,b,$c));return a};Y.prototype.buffRandom=Y.prototype.Kj; Y.prototype.Lj=function(){if(this.i(vd))return this.i(vd);var a=this.buff();this.u(vd,a);var b=new X(this,a);this.s.push(y(b.Ug,b,dd));return a};Y.prototype.buffSphereRandom=Y.prototype.Lj;Y.prototype.lh=function(){if(this.i(xd))return this.i(xd);var a=this.buff();this.u(xd,a);var b=new X(this,a);this.s.push(y(b.Wg,b,fd));return a};Y.prototype.buffTargetPosition=Y.prototype.lh; Y.prototype.Mj=function(){if(this.i(zd))return this.i(zd);var a=this.buff();this.u(zd,a);var b=new X(this,a);this.s.push(y(b.$g,b,jd));return a};Y.prototype.buffUV2=Y.prototype.Mj;Y.prototype.re=function(){if(this.i(qd))return this.i(qd);var a=this.buff();this.u(qd,a);var b=new X(this,a);this.s.push(y(b.Bg,b,Lc));return a};Y.prototype.buffJoints=Y.prototype.re;Y.prototype.nh=function(){if(this.i(Ad))return this.i(Ad);var a=this.buff();this.u(Ad,a);var b=new X(this,a);this.s.push(y(b.eh,b,nd));return a}; Y.prototype.buffWeights=Y.prototype.nh;Y.prototype.i=function(a){return this.namedVars[a]};Y.prototype.getNamedVar=Y.prototype.i;Y.prototype.u=function(a,b){this.namedVars[a]=b};Y.prototype.setNamedVar=Y.prototype.u;Y.prototype.g={names:[{name:'GLAS3Shader',h:Bg}]};r(Bg,Y);function Cn(a,b){Y.call(this,cg);this.vs=b;this.material=a;this.diffSampler=this.ui();this.normalmapSampler=this.vi();this.reflectSampler=this.wi();this.wireframeColor=this.Ti();this.diffColor=this.Ni();this.specular=this.Qi();this.ambientColor=this.Ii()}Pk(Cn,Y); Cn.prototype.Lb=function(){if(this.material.writeDepth)this.oc=this.ia(this.vs.opVarying.z,this.vs.opVarying.w);else{if(this.material.wireframeAble)var a=this.B(this.vs.targetPositionVarying),a=this.yf(0,this.Ie(a),a),b=this.v(this.sub(1,this.min(this.min(a.x,a.y),a.z).Pm),this.wireframeColor);a=this.Ch();if(this.material.Va&&this.material.view.lights.length){for(var c=0;c<this.material.view.lights.length;c++){var d=this.material.view.lights[c],e;if(0==d.lightType)e=this.Hf(c);else{e=this.Eh(c);if(2== d.lightType||3==d.lightType)e=this.v(e,this.Dh(c));3==d.lightType&&(e=this.v(e,this.Hh(c)))}if(d.Rd&&this.material.mf){this.debug(Wi);var d=this.vs.shadowLightPoss[c],f=this.add(this.v(this.ia(d.Km,d.w),[.5,-.5]),.5),f=this.ob(f,this.xi(c)),d=this.ia(d.z,d.w);e=this.v(e,this.Sd(d,f));this.debug(Vi)}var g=null==g?e:this.add(g,e)}this.material.toonAble&&(g=this.ia(this.floor(this.add(.5,this.v(this.material.Df,g))),this.material.Df));this.B(a.w,g.w);b?this.add(b,this.v(g,a),a):this.v(g,a,a)}else b&& this.add(a,b,a);this.material.reflectTexture&&(g=this.ob(this.vs.reflected,this.reflectSampler,null,this.material.reflectTexture.flags),this.v(a.Xd,g.Xd,a.Xd));if(this.material.ud&&(g=this.material.view.fog,0!=g.mode)){b=this.zc(this.Ff(),this.vs.modelPosVarying,3);if(1==g.mode)var l=this.Mc(this.exp(this.v(b,g.ye)));else 2==g.mode?l=this.Mc(this.exp(this.pow(this.v(b,g.ye),2))):3==g.mode&&(l=this.Ga(this.ia(this.sub(g.end,b),this.sub(g.end,g.start))));this.ef(this.material.view.fog.fogColor,a.Xd, l,a.Xd)}if(this.material.border){var n,l=[[1,0],[-1,0],[0,1],[0,-1]],t;for(t in l)g=this.ob(this.add(this.ia(l[t],this.B(this.Ri())),this.vs.uvVarying),this.diffSampler,null,this.material.diffTexture.flags).w,n=null==n?g:this.add(n,g);this.ob(this.add([1/256,0],this.vs.uvVarying),this.diffSampler,null,this.material.diffTexture.flags);this.ef(a.jj,[1,0,0,.5],this.v(this.Kd(a.w,0),this.Ud(n,0)),a.jj)}this.oc=a}};Cn.prototype.build=Cn.prototype.Lb; Cn.prototype.Ch=function(){if(null==this.material.diffTexture)var a=this.B(this.diffColor);else if(this.material.Wh)var a=this.ob(this.vs.uvVarying,this.diffSampler,null,this.material.diffTexture.flags).w,b=this.Ie(a),a=this.Ga(this.yf(this.sub(.5,b),this.add(.5,b),a)),a=this.sub(1,a);else a=this.ob(this.vs.uvVarying,this.diffSampler,null,this.material.diffTexture.flags),0<this.material.ne&&this.Xh(this.sub(a.w,this.material.ne).x);return this.material.Jh?a.Qm:a};Cn.prototype.getDiffColor=Cn.prototype.Ch; function Dn(a,b,c,d,e){var f=a.od();a.ma(b,e,f.x);a.ma(c,e,f.y);a.ma(d,e,f.z);return a.ba(f)} Cn.prototype.Eh=function(a){var b=this.Hf(a),c=b.w,d=this.specular.x,e=this.vs.normVarying;if(this.material.normalMapAble)var f=this.vs.tangentVarying,g=this.Tb(e,f),l=this.sub(this.v(this.ob(this.vs.uvVarying,this.normalmapSampler,null,this.material.normalmapTexture.flags),2),1);a=this.vs.posLightVaryings[a];this.material.normalMapAble?(this.n=l,a=Dn(this,f,g,e,a)):this.n=e;l=this.Ga(this.ma(this.n,a));if(this.material.Vd||this.material.reflectTexture){this.e=this.vs.eyeDirectionVarying;this.material.normalMapAble&& (this.e=Dn(this,f,g,e,this.e));var e=this.ba(this.sub(this.Yb([2,this.ma(a,this.n),this.n]),a)),n=this.Ga(this.ma(this.e,e))}return this.material.Vd?this.add(this.ambientColor,this.Yb([b,this.add(l,this.pow(n,d)),c])):this.add(this.ambientColor,this.Yb([b,l,c]))};Cn.prototype.getPhongColor=Cn.prototype.Eh;Cn.prototype.Dh=function(a){var b=this.sub(this.Wc(a),this.vs.modelPosVarying);return this.Ga(this.sub(1,this.ia(this.ma(b,b),this.v(this.B(this.Xc(a).x),this.Xc(a).x))))}; Cn.prototype.getDistanceColor=Cn.prototype.Dh;Cn.prototype.Hh=function(a){var b=this.Xc(a).y,c=this.Xc(a).z,d=this.sub(this.vs.modelPosVarying,this.Wc(a));a=this.ma(this.ba(this.B(this.Wc(a))),this.ba(d));return this.Ga(this.add(this.v(b,a),c))};Cn.prototype.getSmoothColor=Cn.prototype.Hh;Cn.prototype.g={names:[{name:'PhongFragmentShader',h:Ig}]};r(Ig,Cn);function En(a){this.eyeDirectionVarying=this.za();this.posLightVaryings=[];this.shadowLightPoss=[];this.normVarying=this.za();this.tangentVarying=this.za();this.uvVarying=this.za();this.targetPositionVarying=this.za();this.reflected=this.za();this.modelPosVarying=this.za();this.opVarying=this.za();Y.call(this,kk);this.material=a;this.pos=this.jh();this.norm=this.ih();this.uv=this.mh();this.tangent=this.kh();this.targetPosition=this.lh();this.weight=this.nh();this.model=this.Oi();this.world2local= this.Ui();this.view=this.Si();this.perspective=this.Pi()}Pk(En,Y); En.prototype.Lb=function(){var a=this.norm,b=this.pos;if(this.material.yd){this.material.node.skin.bj?(this.joint=this.v(2,this.re()),this.joints=this.Ki(this.material.node.skin.joints.length)):(this.joint=this.v(4,this.re()),this.joints=this.Ji(this.material.node.skin.joints.length));for(var c=0;c<this.material.node.skin.Nm;c++){var d='xyzw'.charAt(c%4);if(this.material.node.skin.bj){this.joint=this.joint.c(d);var e=this.v(this.weight.c(d),this.li(b,this.joints.c(this.joint),this.joints.c(this.joint, 1)))}else this.joint=this.joint.c(d),e=this.v(this.weight.c(d),this.m44(b,this.joints.c(this.joint)));var f=0==c?e:this.add(f,e);if(this.material.Va)var d=this.v(this.weight.c(d),this.material.node.skin.bj?this.lf(a,this.B(this.joints.c(this.joint))):this.m33(a,this.joints.c(this.joint))),g=0==c?d:this.add(g,d)}b=f;this.material.Va&&(a=this.ba(g))}b=this.m44(b,this.model);g=this.m44(b,this.view);this.op=f=this.m44(g,this.perspective);if(this.material.Va||this.material.reflectTexture){a=this.ba(this.m33(a, this.model));if(this.material.Vd||this.material.reflectTexture)c=this.material.normalMapAble?this.ba(this.m33(this.Hc(g),this.world2local)):this.ba(this.Hc(g)),this.B(c,this.eyeDirectionVarying);this.shadowLightPoss.length=this.material.view.lights.length;for(c=0;c<this.material.view.lights.length;c++){var d=this.material.view.lights[c],e=this.Wc(c),e=this.material.normalMapAble?this.ba(this.m33(this.sub(this.m44(this.B(e),this.view),g),this.world2local)):this.ba(this.sub(this.m44(this.B(e),this.view), g)),l=this.za();this.posLightVaryings.push(l);this.B(e,l);d.Rd&&this.material.mf&&(d=this.za(),this.shadowLightPoss[c]=d,this.B(this.m44(b,this.Li(c)),d))}this.material.normalMapAble?this.B(this.ba(this.m33(this.m33(a,this.view),this.world2local)),this.normVarying):(c=this.ba(this.m33(a,this.view)),this.B(c,this.normVarying));this.material.normalMapAble&&this.B(this.tangent,this.tangentVarying);this.material.reflectTexture&&(c=this.ba(this.sub(b,this.Ff())),this.B(this.sub(c,this.Yb([2,a,this.ma(a, c)])),this.reflected))}if(this.material.diffTexture||this.material.normalMapAble)c=this.uv,this.material.uvMuler&&(c=this.v(this.If().Km,c)),this.material.uvAdder&&(c=this.add(this.If().Rm,c)),this.B(c,this.uvVarying);this.material.wireframeAble&&this.B(this.targetPosition,this.targetPositionVarying);c=!1;if(this.material.Va){var a=this.material.view.lights,n;for(n in a)if(d=a[n],2==d.lightType||3==d.lightType)c=!0}this.material.ud&&(0!=this.material.view.fog.mode||c)&&this.B(b,this.modelPosVarying); this.material.writeDepth&&this.B(f,this.opVarying)};En.prototype.build=En.prototype.Lb;En.prototype.li=function(a,b,c){a=this.add(this.lf(a,this.B(b)),c);this.B(1,a.w);return a.jj};En.prototype.q44=En.prototype.li;En.prototype.lf=function(a,b){var c=this.v(2,this.Tb(b,a));return this.le([a,this.v(b.w,c),this.Tb(b,c)])};En.prototype.q33=En.prototype.lf;En.prototype.g={names:[{name:'PhongVertexShader',h:Kg}]};r(Kg,En);function Fn(){}r('flash.display3D.Context3DProfile.BASELINE',Bc);r('flash.display3D.Context3DProfile.BASELINE_CONSTRAINED',Cc);r('flash.display3D.Context3DProfile.BASELINE_EXTENDED',Dc);r('flash.display3D.Context3DProfile.STANDARD',nj);r('flash.display3D.Context3DProfile.STANDARD_CONSTRAINED',oj);r('flash.display3D.Context3DProfile.STANDARD_EXTENDED','standardExtended');Fn.prototype.g={names:[{name:'Context3DProfile',h:of}]};r(of,Fn);function Gn(){}r('flash.display3D.Context3DRenderMode.AUTO','auto');r('flash.display3D.Context3DRenderMode.SOFTWARE','software');Gn.prototype.g={names:[{name:'Context3DRenderMode',h:qf}]};r(qf,Gn);function Hn(a,b,c,d){d='undefined'!==typeof d?d:aa;Sl.call(this,a,'undefined'!==typeof b?b:!1,'undefined'!==typeof c?c:!1);this.cf=d}Pk(Hn,Sl);r('flash.events.TextEvent.LINK','link');r('flash.events.TextEvent.TEXT_INPUT','textInput');Hn.prototype.clone=function(){return new Hn(this.type,this.bubbles,this.cancelable,this.cf)};Hn.prototype.clone=Hn.prototype.clone;Hn.prototype.toString=function(){return this.vb()};Hn.prototype.toString=Hn.prototype.toString; Object.defineProperties(Hn.prototype,{text:{get:m('cf'),set:k('cf')}});Hn.prototype.g={names:[{name:'TextEvent',h:Hf}]};r(Hf,Hn);function In(a,b,c,d,e){e='undefined'!==typeof e?e:0;Hn.call(this,a,'undefined'!==typeof b?b:!1,'undefined'!==typeof c?c:!1,'undefined'!==typeof d?d:aa);this.ai=e}Pk(In,Hn);r('flash.events.ErrorEvent.ERROR',pe);In.prototype.clone=function(){return new In(this.type,this.bubbles,this.cancelable,this.text,this.ai)};In.prototype.clone=In.prototype.clone;In.prototype.toString=function(){return this.vb()};In.prototype.toString=In.prototype.toString;Object.defineProperties(In.prototype,{errorID:{get:m('ai')}}); In.prototype.g={names:[{name:'ErrorEvent',h:Cf}]};r(Cf,In);function Z(a){this.Ha=Array(4);this.xc={};this.yc={};this.context=a}Z.prototype.Ue=0;Z.prototype.lastBuffMaxIndex=Z.prototype.Ue;Z.prototype.zb=0;Z.prototype.nowBuffMaxIndex=Z.prototype.zb;Z.prototype.Ve=0;Z.prototype.lastTexMaxIndex=Z.prototype.Ve;Z.prototype.Ab=0;Z.prototype.nowTexMaxIndex=Z.prototype.Ab;Z.prototype.td=0;Z.prototype.drawTriangleCounter=Z.prototype.td;Z.prototype.drawCounter=0;Z.prototype.drawCounter=Z.prototype.drawCounter; Z.prototype.clear=function(a,b,c,d,e,f,g){this.context.clear('undefined'!==typeof a?a:0,'undefined'!==typeof b?b:0,'undefined'!==typeof c?c:0,'undefined'!==typeof d?d:1,'undefined'!==typeof e?e:1,'undefined'!==typeof f?f:0,'undefined'!==typeof g?g:4294967295)};Z.prototype.clear=Z.prototype.clear;Z.prototype.Mb=function(a,b,c,d){this.context.Mb(a,b,c,'undefined'!==typeof d?d:!0)};Z.prototype.configureBackBuffer=Z.prototype.Mb;Z.prototype.Ob=function(a,b,c){return this.context.Ob(a,b,c)}; Z.prototype.createCubeTexture=Z.prototype.Ob;Z.prototype.Pb=function(a){return this.context.Pb(a)};Z.prototype.createIndexBuffer=Z.prototype.Pb;Z.prototype.createProgram=function(){return this.context.createProgram()};Z.prototype.createProgram=Z.prototype.createProgram;Z.prototype.Qb=function(a,b,c,d){return this.context.Qb(a,b,c,d)};Z.prototype.createRectangleTexture=Z.prototype.Qb;Z.prototype.createTexture=function(a,b,c,d){return this.context.createTexture(a,b,c,d)};Z.prototype.createTexture=Z.prototype.createTexture; Z.prototype.wc=function(){return this.context.wc()};Z.prototype.createVideoTexture=Z.prototype.wc;Z.prototype.Rb=function(a,b){return this.context.Rb(a,b)};Z.prototype.createVertexBuffer=Z.prototype.Rb;Z.prototype.D=function(a){this.context.D('undefined'!==typeof a?a:!0)};Z.prototype.dispose=Z.prototype.D;Z.prototype.tb=function(a){this.pe();this.context.tb(a)};Z.prototype.drawToBitmapData=Z.prototype.tb; Z.prototype.na=function(a,b,c,d){b='undefined'!==typeof b?b:0;c='undefined'!==typeof c?c:-1;('undefined'!==typeof d?d:1)&&this.pe();a.update(this);this.td+=a.data.length/3;this.drawCounter++;this.context.na(a.buff,b,c)};Z.prototype.drawTriangles=Z.prototype.na;Z.prototype.ik=function(a){this.context.tb(a)};Z.prototype.drawToBitmapDataInstance=Z.prototype.ik; Z.prototype.pe=function(){for(;this.zb<this.Ue;)Jn(this,++this.zb,null);for(;this.Ab<this.Ve;)this.Sc(++this.Ab,null);this.Ue=this.zb;this.Ve=this.Ab;this.zb=this.Ab=-1};Z.prototype.beginDraw=Z.prototype.pe;Z.prototype.Kc=function(){this.context.Kc()};Z.prototype.present=Z.prototype.Kc;Z.prototype.ec=function(a,b){this.context.ec(a,b)};Z.prototype.setBlendFactors=Z.prototype.ec;Z.prototype.Ld=function(a,b,c,d){this.context.Ld(a,b,c,d)};Z.prototype.setColorMask=Z.prototype.Ld;Z.prototype.fc=function(a){this.context.fc(a)}; Z.prototype.setCulling=Z.prototype.fc;Z.prototype.Qc=function(a,b){this.context.Qc(a,b)};Z.prototype.setDepthTest=Z.prototype.Qc;Z.prototype.Db=function(a){this.context.Db(a)};Z.prototype.setProgram=Z.prototype.Db;Z.prototype.Nd=function(a,b,c,d,e){this.context.Nd(a,b,c,d,e)};Z.prototype.setProgramConstantsFromByteArray=Z.prototype.Nd;Z.prototype.pa=function(a,b,c,d){this.context.pa(a,b,c,'undefined'!==typeof d?d:!1)};Z.prototype.setProgramConstantsFromMatrix=Z.prototype.pa; Z.prototype.ab=function(a,b,c,d){this.context.ab(a,b,c,'undefined'!==typeof d?d:-1)};Z.prototype.setProgramConstantsFromVector=Z.prototype.ab;Z.prototype.Eb=function(a,b,c){this.Ha[0]=c.x;this.Ha[1]=c.y;this.Ha[2]=c.z;this.Ha[3]=c.w;this.context.ab(a,b,this.Ha)};Z.prototype.setProgramConstantsFromVector3D=Z.prototype.Eb; Z.prototype.Fb=function(a,b,c,d,e,f){this.Ha[0]='undefined'!==typeof c?c:0;this.Ha[1]='undefined'!==typeof d?d:0;this.Ha[2]='undefined'!==typeof e?e:0;this.Ha[3]='undefined'!==typeof f?f:0;this.context.ab(a,b,this.Ha)};Z.prototype.setProgramConstantsFromXYZW=Z.prototype.Fb;Z.prototype.Rc=function(){this.context.Rc()};Z.prototype.setRenderToBackBuffer=Z.prototype.Rc;Z.prototype.gc=function(a,b,c,d){this.context.gc(a,'undefined'!==typeof b?b:!1,'undefined'!==typeof c?c:0,'undefined'!==typeof d?d:0)}; Z.prototype.setRenderToTexture=Z.prototype.gc;Z.prototype.tf=h();Z.prototype.setSamplerStateAt=Z.prototype.tf;Z.prototype.Od=function(a){this.context.Od(a)};Z.prototype.setScissorRectangle=Z.prototype.Od;Z.prototype.Pd=function(a,b,c,d,e){this.context.Pd(a,b,c,d,e)};Z.prototype.setStencilActions=Z.prototype.Pd;Z.prototype.Qd=function(a,b,c){this.context.Qd(a,'undefined'!==typeof b?b:255,'undefined'!==typeof c?c:255)};Z.prototype.setStencilReferenceValue=Z.prototype.Qd; Z.prototype.hc=function(a,b){this.Sc(a,b);this.Ab<a&&(this.Ab=a)};Z.prototype.setTextureAt=Z.prototype.hc;Z.prototype.Sc=function(a,b){this.xc[a]!=b&&(this.xc[a]=b,this.context.hc(a,b))};Z.prototype.mb=function(a,b,c,d){Jn(this,a,b,'undefined'!==typeof c?c:0,'undefined'!==typeof d?d:$f);this.zb<a&&(this.zb=a)};Z.prototype.setVertexBufferAt=Z.prototype.mb;function Jn(a,b,c,d,e){a.yc[b]!=c&&(a.yc[b]=c,a.context.mb(b,c,'undefined'!==typeof d?d:0,'undefined'!==typeof e?e:null))} Object.defineProperties(Z.prototype,{driverInfo:{get:function(){return this.context.driverInfo}},enableErrorChecking:{get:function(){return this.context.enableErrorChecking},set:function(a){this.context.enableErrorChecking=a}}});Z.prototype.g={names:[{name:'GL',h:yg}]};r(yg,Z);function Kn(a){this.collects=[];this.view=a}Kn.prototype.uc=!0;Kn.prototype.la=h();Kn.prototype.init=Kn.prototype.la;Kn.prototype.kb=h();Kn.prototype.render=Kn.prototype.kb;Kn.prototype.te=function(a){if(a.visible){this.collects.push(a);x(a,yn)&&this.view.lights.push(a);a=a.children;for(var b in a)this.te(a[b])}};Kn.prototype.collect=Kn.prototype.te;Kn.prototype.sort=h();Kn.prototype.sort=Kn.prototype.sort;Object.defineProperties(Kn.prototype,{visible:{get:m('uc'),set:k('uc')}}); Kn.prototype.g={names:[{name:'Render',h:zg}]};r(zg,Kn);function Ln(a){Kn.call(this,a)}Pk(Ln,Kn);Ln.prototype.la=function(){Ln.Z.la.call(this);this.stage3d=this.view.stage.stage3Ds[this.view.id];this.stage3d.visible=this.visible;this.stage3d.addEventListener(Sd,y(this.om,this,lj));this.stage3d.addEventListener(pe,y(this.nm,this,kj));for(var a=[nj,oj,Dc,Bc,Cc],b=a.length-1;0<=b;b--)null==a[b]&&a.splice(b,1);this.stage3d.si()};Ln.prototype.init=Ln.prototype.la;Ln.prototype.nm=function(){this.stage3d.of()}; Ln.prototype.om=function(){this.gl3d=new Z(this.stage3d.context3D);this.gl3d.enableErrorChecking=this.view.enableErrorChecking;this.view.profile=this.stage3d.context3D.profile;this.view.driverInfo=this.gl3d.driverInfo;this.agalVersion=this.view.profile==nj||this.view.profile==oj?2:1}; Ln.prototype.kb=function(a,b){if(this.visible&&(Ln.Z.kb.call(this,a,b),this.gl3d))if(this.gl3d.driverInfo==Db)this.view.m=!0;else{this.view.m&&(this.stage3d.x=this.view.x,this.stage3d.y=this.view.y,this.gl3d.Mb(this.view.nb,this.view.ic,this.view.antiAlias));this.view.m=!1;this.collects.length=0;this.view.lights.length=0;this.gl3d.td=0;this.gl3d.drawCounter=0;this.te(b);this.sort();var c=this.view.lights,d;for(d in c){var e=c[d];if(e.Rd){e.shadowMap.update(this.view);null==e.shadowMap.texture&&(e.shadowMap.texture= this.gl3d.createTexture(e.xf,e.xf,Ji,!0));this.gl3d.gc(e.shadowMap.texture,!0);this.gl3d.clear(1,1,1);null==this.qd&&(this.qd=new Mn,this.qd.writeDepth=!0);this.qd.materialCamera=e.shadowCamera;var f=this.collects,g;for(g in f)e=f[g],e.material&&e.material.ph&&e.update(this.view,this.qd)}}if(this.view.posts.length){for(var l=1<this.view.posts.length?2:1,c=0;c<l;c++)this.view.postRTTs[c].update(this.view),null==this.view.postRTTs[c].texture&&(this.view.postRTTs[c].texture=this.gl3d.Qb(this.view.nb, this.view.ic,Gc,!0));this.renderTarget=this.view.postRTTs[0]}else this.renderTarget=null;this.renderTarget?this.gl3d.gc(this.renderTarget.texture,!0,this.view.antiAlias):this.gl3d.Rc();this.gl3d.clear((this.view.background>>16&255)/255,(this.view.background>>8&255)/255,(this.view.background&255)/255);var c=this.collects,n;for(n in c)e=c[n],e.update(this.view);if(this.view.posts.length)for(c=0;c<this.view.posts.length;c++)this.view.posts[c].update(this.view,c==this.view.posts.length-1),2==l&&(n=this.view.postRTTs[0], this.view.postRTTs[0]=this.view.postRTTs[1],this.view.postRTTs[1]=n);this.gl3d.Kc()}};Ln.prototype.render=Ln.prototype.kb;Object.defineProperties(Ln.prototype,{visible:{get:function(){return Xk(Ln,this,rk)},set:function(a){Yk(Ln,this,rk,a);this.stage3d&&(this.stage3d.visible=a)}}});Ln.prototype.g={names:[{name:'Stage3DRender',h:Ag}]};r(Ag,Ln);function Nn(a){xm.call(this);a='undefined'!==typeof a?a:0;this.scene=new rn(Qi);this.camera=new tn;this.lights=[];this.fog=new Lm;this.ctrls=[];this.posts=[];this.postRTTs=[new xn(null,!0,!1,!1),new xn(null,!0,!1,!1)].slice();this.id=a;this.scene.fb(this.camera);this.renderer=new Ln(this);this.stage?this.la():this.addEventListener(fc,y(this.la,this,ch))}Pk(Nn,xm);Nn.prototype.ae=!1;Nn.prototype._enableErrorChecking=Nn.prototype.ae;Nn.prototype.Wf=2;Nn.prototype.nb=200;Nn.prototype.stage3dWidth=Nn.prototype.nb; Nn.prototype.ic=200;Nn.prototype.stage3dHeight=Nn.prototype.ic;Nn.prototype.time=0;Nn.prototype.time=Nn.prototype.time;Nn.prototype.background=0;Nn.prototype.background=Nn.prototype.background;Nn.prototype.m=!0;Nn.prototype.invalid=Nn.prototype.m;Nn.prototype.la=function(){this.removeEventListener(fc,y(this.la,this,ch));this.renderer.la()};Nn.prototype.Bm=function(){var a=this.ctrls,b;for(b in a)a[b].update(this.time)};Nn.prototype.updateCtrl=Nn.prototype.Bm; Nn.prototype.kb=function(a){this.time='undefined'!==typeof a?a:0;this.renderer.kb(this.camera,this.scene)};Nn.prototype.render=Nn.prototype.kb; Object.defineProperties(Nn.prototype,{antiAlias:{get:m('Wf'),set:function(a){this.Wf=a;this.m=!0}},x:{get:function(){return Xk(Nn,this,Dk)},set:function(a){Yk(Nn,this,Dk,a);this.m=!0}},y:{get:function(){return Xk(Nn,this,Fk)},set:function(a){Yk(Nn,this,Fk,a);this.m=!0}},enableErrorChecking:{get:m('ae'),set:function(a){this.ae=a;this.renderer.gl3d&&(this.renderer.gl3d.enableErrorChecking=a)}}});Nn.prototype.g={names:[{name:'View3D',h:xg}]};r(xg,Nn);function On(a){this.data=a}On.prototype.m=!0;On.prototype.S=!0;On.prototype.dataInvalid=On.prototype.S;On.prototype.ac=-1;On.prototype.numTriangles=On.prototype.ac;On.prototype.update=function(a){if(this.m||this.context!=a)this.buff=a.Pb(this.data.length),this.m=!1,this.S=!0,this.context=a;this.S&&(this.S=!1,this.buff.ad(this.data,0,this.data.length))};On.prototype.update=On.prototype.update;On.prototype.D=function(){this.buff&&this.buff.D()};On.prototype.dispose=On.prototype.D; On.prototype.g={names:[{name:'IndexBufferSet',h:pg}]};r(pg,On);function Pn(a,b){this.data=a;this.data32PerVertex=b;if(4<b)throw pe;}Pn.prototype.m=!0;Pn.prototype.invalid=Pn.prototype.m;Pn.prototype.S=!0;Pn.prototype.dataInvalid=Pn.prototype.S;var Qn=[null,Xf,Yf,Zf,$f];r('gl3d.core.VertexBufferSet.FORMATS',Qn); Pn.prototype.update=function(a){if(this.m||this.context!=a)this.data&&(this.buff=a.Rb(this.data.length/this.data32PerVertex,this.data32PerVertex),this.m=!1,this.context=a),this.S=!0;this.data&&this.S&&(this.S=!1,this.buff.ad(this.data,0,this.data.length/this.data32PerVertex))};Pn.prototype.update=Pn.prototype.update;Pn.prototype.bind=function(a,b,c,d){a.mb(b,this.buff,'undefined'!==typeof c?c:0,('undefined'!==typeof d?d:null)||Qn[this.data32PerVertex])};Pn.prototype.bind=Pn.prototype.bind; Pn.prototype.D=function(){this.buff&&this.buff.D()};Pn.prototype.dispose=Pn.prototype.D;Pn.prototype.g={names:[{name:'VertexBufferSet',h:wg}]};r(wg,Pn);function Rn(){}Rn.prototype.mi=4;Rn.prototype.randomStep=Rn.prototype.mi;Rn.prototype.Td=!0;Rn.prototype.smooting=Rn.prototype.Td;r('gl3d.core.Drawable.optimizeSource',function(a){Sn(a,!1);a.Ja&&Sn(a,!0)}); function Sn(a,b){var c=b?a.Ja:a.index,d={},e=[];if(b){if(a.uv){var f=a.uv,g=[];a.uv=g}if(a.uv2){var l=[];a.uv2=l}a.Ja=e}else{if(a.pos){var n=a.pos,t=[];a.pos=t}if(a.joint){var u=3*a.joint.length/n.length;0==u&&Zk(a.joint.length,n.length);var v=a.joint,G=[];a.joint=G}if(a.weight){var E=a.weight,A=[];a.weight=A}if(a.color){var K=a.color,J=[];a.color=J}if(a.alpha){var O=a.alpha,W=[];a.alpha=W}null==a.Ja&&(a.uv&&(f=a.uv,g=[],a.uv=g),a.uv2&&(l=[],a.uv2=l));a.index=e}var l=0,ka;for(ka in c){var pa=c[ka], ua=[];e.push(ua);for(var Aa in pa){var sa=pa[Aa],Da=d[sa];if(null==Da&&(Da=l++,d[sa]=Da,t&&t.push(n[3*sa],n[3*sa+1],n[3*sa+2]),f&&g.push(f[2*sa],f[2*sa+1]),J&&J.push(K[3*sa],K[3*sa+1],K[3*sa+2]),W&&W.push(O[sa]),G&&A))for(var Ea=0;Ea<u;Ea++)G.push(v[u*sa+Ea]),A.push(E[u*sa+Ea]);ua.push(Da)}}} Object.defineProperties(Rn.prototype,{pos:{get:function(){null==this.fd&&this.source&&this.source.pos&&(this.source.index&&this.source.Ja?this.index:this.fd=new Pn(this.source.pos.slice(),3));return this.fd},set:k('fd')},norm:{get:function(){null==this.ee&&(this.ee=Tn(this));return this.ee},set:k('ee')},tangent:{get:function(){null==this.je&&(this.je=Un(this));return this.je},set:k('je')},uv:{get:function(){null==this.Jb&&this.source&&this.source.uv&&(this.source.index&&this.source.Ja?this.index: this.Jb=new Pn(this.source.uv.slice(),2));null==this.Jb&&(this.Jb=Vn(this));return this.Jb},set:k('Jb')},random:{get:function(){null==this.fe&&(this.fe=Wn(this,this.mi));return this.fe},set:k('fe')},sphereRandom:{get:function(){null==this.ge&&(this.ge=Xn(this));return this.ge},set:k('ge')},targetPosition:{get:function(){null==this.ke&&(this.ke=Yn(this));return this.ke},set:k('ke')},index:{get:function(){if(null==this.sc&&this.source&&this.source.index){if(null!=this.source.Ja){var a=0;this.oldi2newis= {};var b={},c=[],d=null,e=[];if(this.source.joint)var f=[],g=3*this.source.joint.length/this.source.pos.length;if(this.source.weight)var l=[];for(var n=[],t=this.source.index.length,u=0;u<t;u++)for(d=null;j<len2;j++){null==d&&(d=[],c.push(d));var v=this.source.index[u][j],G=this.source.Ja[u][j];if(this.Td)var E=v+fa+G,A=b[E];else A=null;if(null==A){A=a++;e.push(this.source.pos[3*v],this.source.pos[3*v+1],this.source.pos[3*v+2]);if(f&&l)for(var K=0;K<g;K++)f.push(this.source.joint[v*g+K]),l.push(this.source.weight[v* g+K]);n.push(this.source.uv[2*G],this.source.uv[2*G+1]);this.Td&&(b[E]=A,G=this.oldi2newis[v],null==G&&(this.oldi2newis[v]=G=[]),G.push(A))}d.push(A)}this.fd=new Pn(e.slice(),3);f&&(this.dd=new Pn(f.slice(),g));l&&(this.jd=new Pn(l.slice(),g));this.Jb=new Pn(n.slice(),2)}var a=[],c=c||this.source.index,J;for(J in c)for(d=c[J],t=d.length,u=2;u<t;u++)a.push(d[0],d[u-1],d[u]);this.sc=new On(a.slice())}null==this.sc&&(this.sc=Zn(this));return this.sc},set:k('sc')},unpackedDrawable:{get:function(){null== this.pg&&(this.pg=$n(this));return this.pg}},joint:{get:function(){null==this.dd&&this.source&&this.source.joint&&(this.source.index&&this.source.Ja?this.index:this.dd=new Pn(this.source.joint.slice(),this.source.joint.length/(this.source.pos.length/3)));return this.dd},set:k('dd')},weight:{get:function(){null==this.jd&&this.source&&this.source.weight&&(this.source.index&&this.source.Ja?this.index:this.jd=new Pn(this.source.weight.slice(),this.source.weight.length/(this.source.pos.length/3)));return this.jd}, set:k('jd')}});Rn.prototype.g={names:[{name:'Drawable',h:og}]};r(og,Rn);function ao(){}r('gl3d.meshs.Meshs.billboard',function(){return bo([0,1,2,1,3,2].slice(),Array(12),[0,0,1,0,0,1,1,1].slice(),null)});r('gl3d.meshs.Meshs.plane',function(a){a='undefined'!==typeof a?a:1;return bo([0,1,2,1,3,2].slice(),[-a,-a,0,a,-a,0,-a,a,0,a,a,0].slice(),[0,1,1,1,0,0,1,0].slice(),null)}); r('gl3d.meshs.Meshs.sphere',function(a,b,c){a='undefined'!==typeof a?a:20;b='undefined'!==typeof b?b:20;c='undefined'!==typeof c?c:.5;for(var d=[],e=[],f=[],g=0;g<=b;g++)for(var l=Math.PI/b*g-Math.PI/2,n=0;n<=a;n++){var t=2*Math.PI/a*n;e.push(Math.cos(t)*Math.cos(l)*c,Math.sin(l)*c,Math.sin(t)*Math.cos(l)*c);f.push(n/a,g/b);t=e.length/3-1;0<g&&0<n&&d.push(t,t-1,t-a-1,t-1,t-a-2,t-a-1)}return bo(d,e,f,e)}); r('gl3d.meshs.Meshs.test',function(){return bo([1,0,2].slice(),[1,1,0,1,0,0,0,1,0].slice(),null,null)}); r('gl3d.meshs.Meshs.cube',function(a,b,c){a=('undefined'!==typeof a?a:1)/2;b=('undefined'!==typeof b?b:1)/2;c=('undefined'!==typeof c?c:1)/2;return bo([0,1,2,0,2,3,4,6,5,4,7,6,8,10,9,8,11,10,12,13,14,12,14,15,16,17,18,16,18,19,20,22,21,20,23,22].slice(),[a,b,c,a,-b,c,-a,-b,c,-a,b,c,a,b,-c,a,-b,-c,-a,-b,-c,-a,b,-c,a,b,c,a,b,-c,-a,b,-c,-a,b,c,a,-b,c,a,-b,-c,-a,-b,-c,-a,-b,c,a,b,c,a,b,-c,a,-b,-c,a,-b,c,-a,b,c,-a,b,-c,-a,-b,-c,-a,-b,c].slice(),[1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1, 0,1,0,0,1,0,1,1,0,1,0,0,1,0,1,1,0,1,0,0].slice(),[0,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,1,0,0,1,0,0,1,0,0,1,0,0,-1,0,0,-1,0,0,-1,0,0,-1,0,0].slice())}); r('gl3d.meshs.Meshs.terrainData',function(a,b,c,d){a='undefined'!==typeof a?a:64;b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;d='undefined'!==typeof d?d:null;var e=[],f=d||new D(a,a,!0,0);null==c?f.hf():f.G(c,new z(a/c.width,0,0,a/c.height),null,null,null,!0);f.Gc();for(c=0;c<a;c++)for(var g=0;g<a;g++){var l=g/(a-1)-.5,n=.1*((255&f.Le(g,c))/255-.5),t=c/(a-1)-.5;b&&(l*=b.x,n*=b.y,t*=b.z);e.push(l,n,t)}f.Yc();null==d&&f.D();return e}); r('gl3d.meshs.Meshs.terrain',function(a,b,c,d){a='undefined'!==typeof a?a:64;b='undefined'!==typeof b?b:null;c='undefined'!==typeof c?c:null;d='undefined'!==typeof d?d:null;var e=[],f=[],g=[],l=d||new D(a,a,!0,0);null==c?l.hf():l.G(c,new z(a/c.width,0,0,a/c.height),null,null,null,!0);for(c=0;c<a;c++)for(var n=0;n<a;n++){var t=n/(a-1)-.5,u=.1*((255&l.Le(n,c))/255-.5),v=c/(a-1)-.5;b&&(t*=b.x,u*=b.y,v*=b.z);f.push(t,u,v);g.push(n/(a-1),c/(a-1));n!=a-1&&c!=a-1&&(e.push(c*a+n,c*a+n+1,(c+1)*a+n),e.push(c* a+n+1,(c+1)*a+1+n,(c+1)*a+n))}a=bo(e,f,g,null);null==d&&l.D();return a});function bo(a,b,c,d,e){c='undefined'!==typeof c?c:null;d='undefined'!==typeof d?d:null;e='undefined'!==typeof e?e:null;var f=new Rn;a&&(f.index=new On(a));b&&(f.pos=new Pn(b,3));c&&(f.uv=new Pn(c,2));d&&(f.norm=new Pn(d,3));e&&(f.tangent=new Pn(e,3));return f}r('gl3d.meshs.Meshs.createDrawable',bo); function $n(a){var b=new Rn,c=a.index.data;b.index=new On([]);for(var d=[ui,Yj,ai,fh,zk],e=0;e<c.length;e+=3){b.index.data.push(e,e+1,e+2);var f=d,g;for(g in f){var l=f[g],n=a[l];if(n){var t=b[l];null==t&&(t=b[l]=new Pn(Array(c.length*n.data32PerVertex),n.data32PerVertex));for(var l=n.data32PerVertex,u=0;u<l;u++)t.data[e*l+u]=n.data[c[e]*l+u],t.data[(e+1)*l+u]=n.data[c[e+1]*l+u],t.data[(e+2)*l+u]=n.data[c[e+2]*l+u]}}}return b}r('gl3d.meshs.Meshs.unpack',$n); function co(a){for(var b=a.pos.data,c={},d=[],e=0,f=0,g=0;g<b.length/3;g++){var l=b[3*g]+Ra+b[3*g+1]+Ra+b[3*g+2],f=c[l];null==f?(f=e++,c[l]=f,f!=g&&(b[3*f]=b[3*g],b[3*f+1]=b[3*g+1],b[3*f+2]=b[3*g+2])):f>>>=0;d[g]=f}b.length=3*e;a=a.index.data;for(g=0;g<a.length;g++)a[g]=d[a[g]]}r('gl3d.meshs.Meshs.removeDuplicatedVertices',co); function Vn(a){a=a.pos.data;for(var b=[];i<len;i++){var c=a[3*i],d=a[3*i+1],e=a[3*i+2],f=Math.sqrt(c*c+d*d+e*e);0!=f&&(c/=f,d/=f,e/=f);b.push(Math.atan2(e,c)/Math.PI/2+.5,Math.asin(d)/Math.PI+.5)}return new Pn(b,2)}r('gl3d.meshs.Meshs.computeUV',Vn); function Tn(a){if(a.source&&a.source.Ja&&a.Td){var b=a.source.pos,c=Array(a.pos.data.length),d=a.oldi2newis;a=a.source.index;for(var e in a)for(var f=a[e],g=3*f[0],l=3*f[1],n=3*f[2],t=b[g],u=b[g+1],v=b[g+2],g=b[l],G=b[l+1],E=b[l+2],l=b[n],A=b[n+1],K=b[n+2],n=(u-A)*(v-E)-(v-K)*(u-G),v=(v-K)*(t-g)-(t-l)*(v-E),t=(t-l)*(u-G)-(u-A)*(t-g);i<len;i++){var u=d[f[i]],J;for(J in u)g=u[J],c[3*g]+=n,c[3*g+1]+=v,c[3*g+2]+=t}for(i=0;i<c.length;i+=3)n=c[i],v=c[i+1],t=c[i+2],b=Math.sqrt(n*n+v*v+t*t),c[i]/=b,c[i+1]/= b,c[i+2]/=b;return new Pn(c,3)}c=Array(a.pos.data.length);b=a.pos.data;e=a.index.data;for(d=0;d<e.length;d+=3)J=3*e[d],a=3*e[d+1],f=3*e[d+2],u=b[J],n=b[J+1],A=b[J+2],g=b[a],G=b[a+1],E=b[a+2],v=b[f],l=b[f+1],K=b[f+2],t=(n-l)*(A-E)-(A-K)*(n-G),A=(A-K)*(u-g)-(u-v)*(A-E),u=(u-v)*(n-G)-(n-l)*(u-g),c[J]+=t,c[a]+=t,c[f]+=t,c[J+1]+=A,c[a+1]+=A,c[f+1]+=A,c[J+2]+=u,c[a+2]+=u,c[f+2]+=u;for(d=0;d<c.length;d+=3)t=c[d],A=c[d+1],u=c[d+2],b=Math.sqrt(t*t+A*A+u*u),c[d]/=b,c[d+1]/=b,c[d+2]/=b;return new Pn(c,3)} r('gl3d.meshs.Meshs.computeNormal',Tn); function Un(a){var b=Array(a.pos.data.length),c=a.pos.data,d=a.uv.data,e=a.index.data;for(a=0;a<e.length;a+=3){var f=3*e[a],g=3*e[a+1],l=3*e[a+2],n=c[f],t=c[f+1],u=c[f+2],v=c[g],G=c[g+1],E=c[g+2],A=c[l],K=c[l+1],J=c[l+2],O=2*e[a],W=2*e[a+1],ka=2*e[a+2],pa=d[ka],ua=d[ka+1],ka=d[O+1]-ua,ua=d[W+1]-ua,O=(d[O]-pa)*ua-(d[W]-pa)*ka,O=0==O?1:1/O,n=O*(ua*(n-A)-ka*(v-A)),t=O*(ua*(t-K)-ka*(G-K)),u=O*(ua*(u-J)-ka*(E-J));b[f]+=n;b[g]+=n;b[l]+=n;b[f+1]+=t;b[g+1]+=t;b[l+1]+=t;b[f+2]+=u;b[g+2]+=u;b[l+2]+=u}for(a= 0;a<b.length;a+=3)n=b[a],t=b[a+1],u=b[a+2],c=Math.sqrt(n*n+t*t+u*u),0!=c&&(n/=c,t/=c,u/=c),b[a]=n,b[a+1]=t,b[a+2]=u;return new Pn(b,3)}r('gl3d.meshs.Meshs.computeTangent',Un);function Wn(a,b){b='undefined'!==typeof b?b:4;for(var c=Array(a.pos.data.length/3*4),d=0;d<c.length/4;)for(var e=Math.random(),f=Math.random(),g=Math.random(),l=Math.random(),n=0;n<b;n++,d++)c[4*d]=e,c[4*d+1]=f,c[4*d+2]=g,c[4*d+3]=l;return new Pn(c,4)}r('gl3d.meshs.Meshs.computeRandom',Wn); function Xn(a){return new Pn(Array(a.pos.data.length/3*4),4)}r('gl3d.meshs.Meshs.computeSphereRandom',Xn);function Yn(a){var b=Array(a.pos.data.length);a=a.index.data;for(var c=0;c<a.length;c+=3){var d=3*a[c];b[d++]=0;b[d++]=0;b[d]=1;d=3*a[c+1];b[d++]=0;b[d++]=1;b[d]=0;d=3*a[c+2];b[d++]=1;b[d++]=0;b[d]=0}return new Pn(b,3)}r('gl3d.meshs.Meshs.computeTargetPosition',Yn);function Zn(a){var b=[];a=a.pos.data.length/3/3;for(var c=0;c<a;c++)b.push(3*c,3*c+1,3*c+2);return new On(b)} r('gl3d.meshs.Meshs.computeIndex',Zn);r('gl3d.meshs.Meshs.mul',function(a,b){b='undefined'!==typeof b?b:1;for(var c=a.index.data,d=a.pos.data,e=a.uv.data,f=[],g=[],l=[],n=c.length,t=d.length/3,u=0;u<b;u++){for(var v=0;v<n;v++)f.push(c[v]+u*t);var G,v=0;for(G=d.length;v<G;v++)g.push(d[v]);v=0;for(G=e.length;v<G;v++)l.push(e[v])}return bo(f,g,l,null)});ao.prototype.g={names:[{name:'Meshs',h:Eg}]};r(Eg,ao);function eo(){} var fo=[[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16],[4,17,18,19,8,20,21,22,12,23,24,25,16,26,27,28],[19,29,30,31,22,32,33,34,25,35,36,37,28,38,39,40],[31,41,42,1,34,43,44,5,37,45,46,9,40,47,48,13],[13,14,15,16,49,50,51,52,53,54,55,56,57,58,59,60],[16,26,27,28,52,61,62,63,56,64,65,66,60,67,68,69],[28,38,39,40,63,70,71,72,66,73,74,75,69,76,77,78],[40,47,48,13,72,79,80,49,75,81,82,53,78,83,84,57],[57,58,59,60,85,86,87,88,89,90,91,92,93,94,95,96],[60,67,68,69,88,97,98,99,92,100,101,102,96,103,104,105],[69, 76,77,78,99,106,107,108,102,109,110,111,105,112,113,114],[78,83,84,57,108,115,116,85,111,117,118,89,114,119,120,93],[121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136],[124,137,138,121,128,139,140,125,132,141,142,129,136,143,144,133],[133,134,135,136,145,146,147,148,149,150,151,152,69,153,154,155],[136,143,144,133,148,156,157,145,152,158,159,149,155,160,161,69],[162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177],[165,178,179,162,169,180,181,166,173,182,183,170,177,184, 185,174],[174,175,176,177,186,187,188,189,190,191,192,193,194,195,196,197],[177,184,185,174,189,198,199,186,193,200,201,190,197,202,203,194],[204,204,204,204,207,208,209,210,211,211,211,211,212,213,214,215],[204,204,204,204,210,217,218,219,211,211,211,211,215,220,221,222],[204,204,204,204,219,224,225,226,211,211,211,211,222,227,228,229],[204,204,204,204,226,230,231,207,211,211,211,211,229,232,233,212],[212,213,214,215,234,235,236,237,238,239,240,241,242,243,244,245],[215,220,221,222,237,246,247,248, 241,249,250,251,245,252,253,254],[222,227,228,229,248,255,256,257,251,258,259,260,254,261,262,263],[229,232,233,212,257,264,265,234,260,266,267,238,263,268,269,242],[270,270,270,270,279,280,281,282,275,276,277,278,271,272,273,274],[270,270,270,270,282,289,290,291,278,286,287,288,274,283,284,285],[270,270,270,270,291,298,299,300,288,295,296,297,285,292,293,294],[270,270,270,270,300,305,306,279,297,303,304,275,294,301,302,271]],go=[new H(1.4,0,2.4),new H(1.4,-.784,2.4),new H(.784,-1.4,2.4),new H(0, -1.4,2.4),new H(1.3375,0,2.53125),new H(1.3375,-.749,2.53125),new H(.749,-1.3375,2.53125),new H(0,-1.3375,2.53125),new H(1.4375,0,2.53125),new H(1.4375,-.805,2.53125),new H(.805,-1.4375,2.53125),new H(0,-1.4375,2.53125),new H(1.5,0,2.4),new H(1.5,-.84,2.4),new H(.84,-1.5,2.4),new H(0,-1.5,2.4),new H(-.784,-1.4,2.4),new H(-1.4,-.784,2.4),new H(-1.4,0,2.4),new H(-.749,-1.3375,2.53125),new H(-1.3375,-.749,2.53125),new H(-1.3375,0,2.53125),new H(-.805,-1.4375,2.53125),new H(-1.4375,-.805,2.53125),new H(-1.4375, 0,2.53125),new H(-.84,-1.5,2.4),new H(-1.5,-.84,2.4),new H(-1.5,0,2.4),new H(-1.4,.784,2.4),new H(-.784,1.4,2.4),new H(0,1.4,2.4),new H(-1.3375,.749,2.53125),new H(-.749,1.3375,2.53125),new H(0,1.3375,2.53125),new H(-1.4375,.805,2.53125),new H(-.805,1.4375,2.53125),new H(0,1.4375,2.53125),new H(-1.5,.84,2.4),new H(-.84,1.5,2.4),new H(0,1.5,2.4),new H(.784,1.4,2.4),new H(1.4,.784,2.4),new H(.749,1.3375,2.53125),new H(1.3375,.749,2.53125),new H(.805,1.4375,2.53125),new H(1.4375,.805,2.53125),new H(.84, 1.5,2.4),new H(1.5,.84,2.4),new H(1.75,0,1.875),new H(1.75,-.98,1.875),new H(.98,-1.75,1.875),new H(0,-1.75,1.875),new H(2,0,1.35),new H(2,-1.12,1.35),new H(1.12,-2,1.35),new H(0,-2,1.35),new H(2,0,.9),new H(2,-1.12,.9),new H(1.12,-2,.9),new H(0,-2,.9),new H(-.98,-1.75,1.875),new H(-1.75,-.98,1.875),new H(-1.75,0,1.875),new H(-1.12,-2,1.35),new H(-2,-1.12,1.35),new H(-2,0,1.35),new H(-1.12,-2,.9),new H(-2,-1.12,.9),new H(-2,0,.9),new H(-1.75,.98,1.875),new H(-.98,1.75,1.875),new H(0,1.75,1.875),new H(-2, 1.12,1.35),new H(-1.12,2,1.35),new H(0,2,1.35),new H(-2,1.12,.9),new H(-1.12,2,.9),new H(0,2,.9),new H(.98,1.75,1.875),new H(1.75,.98,1.875),new H(1.12,2,1.35),new H(2,1.12,1.35),new H(1.12,2,.9),new H(2,1.12,.9),new H(2,0,.45),new H(2,-1.12,.45),new H(1.12,-2,.45),new H(0,-2,.45),new H(1.5,0,.225),new H(1.5,-.84,.225),new H(.84,-1.5,.225),new H(0,-1.5,.225),new H(1.5,0,.15),new H(1.5,-.84,.15),new H(.84,-1.5,.15),new H(0,-1.5,.15),new H(-1.12,-2,.45),new H(-2,-1.12,.45),new H(-2,0,.45),new H(-.84, -1.5,.225),new H(-1.5,-.84,.225),new H(-1.5,0,.225),new H(-.84,-1.5,.15),new H(-1.5,-.84,.15),new H(-1.5,0,.15),new H(-2,1.12,.45),new H(-1.12,2,.45),new H(0,2,.45),new H(-1.5,.84,.225),new H(-.84,1.5,.225),new H(0,1.5,.225),new H(-1.5,.84,.15),new H(-.84,1.5,.15),new H(0,1.5,.15),new H(1.12,2,.45),new H(2,1.12,.45),new H(.84,1.5,.225),new H(1.5,.84,.225),new H(.84,1.5,.15),new H(1.5,.84,.15),new H(-1.6,0,2.025),new H(-1.6,-.3,2.025),new H(-1.5,-.3,2.25),new H(-1.5,0,2.25),new H(-2.3,0,2.025),new H(-2.3, -.3,2.025),new H(-2.5,-.3,2.25),new H(-2.5,0,2.25),new H(-2.7,0,2.025),new H(-2.7,-.3,2.025),new H(-3,-.3,2.25),new H(-3,0,2.25),new H(-2.7,0,1.8),new H(-2.7,-.3,1.8),new H(-3,-.3,1.8),new H(-3,0,1.8),new H(-1.5,.3,2.25),new H(-1.6,.3,2.025),new H(-2.5,.3,2.25),new H(-2.3,.3,2.025),new H(-3,.3,2.25),new H(-2.7,.3,2.025),new H(-3,.3,1.8),new H(-2.7,.3,1.8),new H(-2.7,0,1.575),new H(-2.7,-.3,1.575),new H(-3,-.3,1.35),new H(-3,0,1.35),new H(-2.5,0,1.125),new H(-2.5,-.3,1.125),new H(-2.65,-.3,.9375), new H(-2.65,0,.9375),new H(-2,-.3,.9),new H(-1.9,-.3,.6),new H(-1.9,0,.6),new H(-3,.3,1.35),new H(-2.7,.3,1.575),new H(-2.65,.3,.9375),new H(-2.5,.3,1.125),new H(-1.9,.3,.6),new H(-2,.3,.9),new H(1.7,0,1.425),new H(1.7,-.66,1.425),new H(1.7,-.66,.6),new H(1.7,0,.6),new H(2.6,0,1.425),new H(2.6,-.66,1.425),new H(3.1,-.66,.825),new H(3.1,0,.825),new H(2.3,0,2.1),new H(2.3,-.25,2.1),new H(2.4,-.25,2.025),new H(2.4,0,2.025),new H(2.7,0,2.4),new H(2.7,-.25,2.4),new H(3.3,-.25,2.4),new H(3.3,0,2.4),new H(1.7, .66,.6),new H(1.7,.66,1.425),new H(3.1,.66,.825),new H(2.6,.66,1.425),new H(2.4,.25,2.025),new H(2.3,.25,2.1),new H(3.3,.25,2.4),new H(2.7,.25,2.4),new H(2.8,0,2.475),new H(2.8,-.25,2.475),new H(3.525,-.25,2.49375),new H(3.525,0,2.49375),new H(2.9,0,2.475),new H(2.9,-.15,2.475),new H(3.45,-.15,2.5125),new H(3.45,0,2.5125),new H(2.8,0,2.4),new H(2.8,-.15,2.4),new H(3.2,-.15,2.4),new H(3.2,0,2.4),new H(3.525,.25,2.49375),new H(2.8,.25,2.475),new H(3.45,.15,2.5125),new H(2.9,.15,2.475),new H(3.2,.15, 2.4),new H(2.8,.15,2.4),new H(0,0,3.15),new H(0,-.002,3.15),new H(.002,0,3.15),new H(.8,0,3.15),new H(.8,-.45,3.15),new H(.45,-.8,3.15),new H(0,-.8,3.15),new H(0,0,2.85),new H(.2,0,2.7),new H(.2,-.112,2.7),new H(.112,-.2,2.7),new H(0,-.2,2.7),new H(-.002,0,3.15),new H(-.45,-.8,3.15),new H(-.8,-.45,3.15),new H(-.8,0,3.15),new H(-.112,-.2,2.7),new H(-.2,-.112,2.7),new H(-.2,0,2.7),new H(0,.002,3.15),new H(-.8,.45,3.15),new H(-.45,.8,3.15),new H(0,.8,3.15),new H(-.2,.112,2.7),new H(-.112,.2,2.7),new H(0, .2,2.7),new H(.45,.8,3.15),new H(.8,.45,3.15),new H(.112,.2,2.7),new H(.2,.112,2.7),new H(.4,0,2.55),new H(.4,-.224,2.55),new H(.224,-.4,2.55),new H(0,-.4,2.55),new H(1.3,0,2.55),new H(1.3,-.728,2.55),new H(.728,-1.3,2.55),new H(0,-1.3,2.55),new H(1.3,0,2.4),new H(1.3,-.728,2.4),new H(.728,-1.3,2.4),new H(0,-1.3,2.4),new H(-.224,-.4,2.55),new H(-.4,-.224,2.55),new H(-.4,0,2.55),new H(-.728,-1.3,2.55),new H(-1.3,-.728,2.55),new H(-1.3,0,2.55),new H(-.728,-1.3,2.4),new H(-1.3,-.728,2.4),new H(-1.3, 0,2.4),new H(-.4,.224,2.55),new H(-.224,.4,2.55),new H(0,.4,2.55),new H(-1.3,.728,2.55),new H(-.728,1.3,2.55),new H(0,1.3,2.55),new H(-1.3,.728,2.4),new H(-.728,1.3,2.4),new H(0,1.3,2.4),new H(.224,.4,2.55),new H(.4,.224,2.55),new H(.728,1.3,2.55),new H(1.3,.728,2.55),new H(.728,1.3,2.4),new H(1.3,.728,2.4),new H(0,0,0),new H(1.5,0,.15),new H(1.5,.84,.15),new H(.84,1.5,.15),new H(0,1.5,.15),new H(1.5,0,.075),new H(1.5,.84,.075),new H(.84,1.5,.075),new H(0,1.5,.075),new H(1.425,0,0),new H(1.425,.798, 0),new H(.798,1.425,0),new H(0,1.425,0),new H(-.84,1.5,.15),new H(-1.5,.84,.15),new H(-1.5,0,.15),new H(-.84,1.5,.075),new H(-1.5,.84,.075),new H(-1.5,0,.075),new H(-.798,1.425,0),new H(-1.425,.798,0),new H(-1.425,0,0),new H(-1.5,-.84,.15),new H(-.84,-1.5,.15),new H(0,-1.5,.15),new H(-1.5,-.84,.075),new H(-.84,-1.5,.075),new H(0,-1.5,.075),new H(-1.425,-.798,0),new H(-.798,-1.425,0),new H(0,-1.425,0),new H(.84,-1.5,.15),new H(1.5,-.84,.15),new H(.84,-1.5,.075),new H(1.5,-.84,.075),new H(.798,-1.425, 0),new H(1.425,-.798,0)]; function ho(a){a='undefined'!==typeof a?a:10;var b=[],c=[],d=[16,!0],e=0,f;for(f in fo){for(var g=fo[f],l=0;16>l;++l)d[l]=go[g[l]-1];for(var g=d,l=a,n=c,t=[l+1,!0],u=[4,!0],v=0;v<=l;++v)t[v]=new H;for(v=0;4>v;++v)u[v]=new H;for(var G=0;G<=l;++G){v=G/l;io(v,g[0],g[1],g[2],g[3],u[0]);io(v,g[4],g[5],g[6],g[7],u[1]);io(v,g[8],g[9],g[10],g[11],u[2]);io(v,g[12],g[13],g[14],g[15],u[3]);for(var v=0;v<=l;++v)io(v/l,u[0],u[1],u[2],u[3],t[v]),n.push(t[v].x),n.push(t[v].z),n.push(t[v].y)}g=e;l=a;n=b;for(t=0;t< l;++t)for(u=0;u<l;++u)n.push(g+t*(l+1)+u),n.push(g+(t+1)*(l+1)+u),n.push(g+t*(l+1)+u+1),n.push(g+t*(l+1)+u+1),n.push(g+(t+1)*(l+1)+u),n.push(g+(t+1)*(l+1)+u+1);e+=(a+1)*(a+1)}a=bo(b,c,null,null);co(a);return a}r('gl3d.meshs.Teapot.teapot',ho);function io(a,b,c,d,e,f){f=('undefined'!==typeof f?f:null)||new H;var g=1-a,l=g*g,n=a*a,t=a*n,n=3*n*g;a=3*a*l;g*=l;f.x=t*b.x+n*c.x+a*d.x+g*e.x;f.y=t*b.y+n*c.y+a*d.y+g*e.y;f.z=t*b.z+n*c.z+a*d.z+g*e.z}eo.prototype.g={names:[{name:'Teapot',h:Fg}]};r(Fg,eo);function jo(){0!=ko&&(lo[this[Kk]||(this[Kk]=++Lk)]=this);this.sd=this.sd;this.Gd=this.Gd}var ko=0,lo={};jo.prototype.sd=!1;jo.prototype.D=function(){if(!this.sd&&(this.sd=!0,this.Ae(),0!=ko)){var a=this[Kk]||(this[Kk]=++Lk);delete lo[a]}};jo.prototype.Ae=function(){if(this.Gd)for(;this.Gd.length;)this.Gd.shift()()};function mo(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.Bb=!1;this.ti=!0}mo.prototype.stopPropagation=function(){this.Bb=!0};mo.prototype.preventDefault=function(){this.defaultPrevented=!0;this.ti=!1};var no='closure_listenable_'+(1E6*Math.random()|0),oo=0;function po(a,b,c,d,e){this.listener=a;this.Jd=null;this.src=b;this.type=c;this.vc=!!d;this.zd=e;this.key=++oo;this.cc=this.md=!1}function qo(a){a.cc=!0;a.listener=null;a.Jd=null;a.src=null;a.zd=null};function ro(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}var so='constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf'.split(' ');function to(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var f=0;f<so.length;f++)c=so[f],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}};function uo(a){uo[fa](a);return a}uo[fa]=h();var vo=String.prototype.trim?function(a){return a.trim()}:function(a){return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g,aa)};function wo(a,b){return a<b?-1:a>b?1:0};var xo=Array.prototype.indexOf?function(a,b,c){return Array.prototype.indexOf.call(a,b,c)}:function(a,b,c){c=null==c?0:0>c?Math.max(0,a.length+c):c;if(typeof a==rj)return typeof b==rj&&1==b.length?a.indexOf(b,c):-1;for(;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1};function yo(a){this.src=a;this.P={};this.Vc=0}yo.prototype.add=function(a,b,c,d,e){var f=a.toString();a=this.P[f];a||(a=this.P[f]=[],this.Vc++);var g=zo(a,b,d,e);-1<g?(b=a[g],c||(b.md=!1)):(b=new po(b,this.src,f,!!d,e),b.md=c,a.push(b));return b};yo.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.P))return!1;var e=this.P[a];b=zo(e,b,c,d);return-1<b?(qo(e[b]),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.P[a],this.Vc--),!0):!1}; function Ao(a,b){var c=b.type;if(c in a.P){var d=a.P[c],e=xo(d,b),f;(f=0<=e)&&Array.prototype.splice.call(d,e,1);f&&(qo(b),0==a.P[c].length&&(delete a.P[c],a.Vc--))}}yo.prototype.Ke=function(a,b,c,d){a=this.P[a.toString()];var e=-1;a&&(e=zo(a,b,c,d));return-1<e?a[e]:null};yo.prototype.hasListener=function(a,b){var c=void 0!==a,d=c?a.toString():aa,e=void 0!==b;return ro(this.P,function(a){for(var g=0;g<a.length;++g)if(!(c&&a[g].type!=d||e&&a[g].vc!=b))return!0;return!1})}; function zo(a,b,c,d){for(var e=0;e<a.length;++e){var f=a[e];if(!f.cc&&f.listener==b&&f.vc==!!c&&f.zd==d)return e}return-1};var Bo;a:{var Co=Ik.navigator;if(Co){var Do=Co.userAgent;if(Do){Bo=Do;break a}}Bo=aa};var Eo=-1!=Bo.indexOf('Opera'),Fo=-1!=Bo.indexOf('Trident')||-1!=Bo.indexOf('MSIE'),Go=-1!=Bo.indexOf('Edge'),Ho=-1!=Bo.indexOf('Gecko')&&!(-1!=Bo.toLowerCase().indexOf('webkit')&&-1==Bo.indexOf('Edge'))&&!(-1!=Bo.indexOf('Trident')||-1!=Bo.indexOf('MSIE'))&&-1==Bo.indexOf('Edge'),Io=-1!=Bo.toLowerCase().indexOf('webkit')&&-1==Bo.indexOf('Edge');function Jo(){var a=Ik.document;return a?a.documentMode:void 0}var Ko; a:{var Lo=aa,Mo=function(){var a=Bo;if(Ho)return/rv\:([^\);]+)(\)|;)/.exec(a);if(Go)return/Edge\/([\d\.]+)/.exec(a);if(Fo)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(Io)return/WebKit\/(\S+)/.exec(a);if(Eo)return/(?:Version)[ \/]?(\S+)/.exec(a)}();Mo&&(Lo=Mo?Mo[1]:aa);if(Fo){var No=Jo();if(null!=No&&No>parseFloat(Lo)){Ko=String(No);break a}}Ko=Lo}var Oo={}; function Po(a){var b;if(!(b=Oo[a])){b=0;for(var c=vo(String(Ko)).split(ob),d=vo(String(a)).split(ob),e=Math.max(c.length,d.length),f=0;0==b&&f<e;f++){var g=c[f]||aa,l=d[f]||aa,n=/(\d*)(\D*)/g,t=/(\d*)(\D*)/g;do{var u=n.exec(g)||[aa,aa,aa],v=t.exec(l)||[aa,aa,aa];if(0==u[0].length&&0==v[0].length)break;b=wo(0==u[1].length?0:parseInt(u[1],10),0==v[1].length?0:parseInt(v[1],10))||wo(0==u[2].length,0==v[2].length)||wo(u[2],v[2])}while(0==b)}b=Oo[a]=0<=b}return b} var Qo=Ik.document,Ro=Qo&&Fo?Jo()||('CSS1Compat'==Qo.compatMode?parseInt(Ko,10):5):void 0;var So;(So=!Fo)||(So=9<=Number(Ro));var To=So,Uo=Fo&&!Po('9');!Io||Po('528');Ho&&Po('1.9b')||Fo&&Po('8')||Eo&&Po('9.5')||Io&&Po('528');Ho&&!Po('8')||Fo&&Po('9');function Vo(a,b){mo.call(this,a?a.type:aa);this.relatedTarget=this.currentTarget=this.target=null;this.charCode=this.keyCode=this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.Cc=this.state=null;a&&this.la(a,b)}Pk(Vo,mo); Vo.prototype.la=function(a,b){var c=this.type=a.type,d=a.changedTouches?a.changedTouches[0]:null;this.target=a.target||a.srcElement;this.currentTarget=b;var e=a.relatedTarget;if(e){if(Ho){var f;a:{try{uo(e.nodeName);f=!0;break a}catch(g){}f=!1}f||(e=null)}}else c==Nh?e=a.fromElement:c==Mh&&(e=a.toElement);this.relatedTarget=e;null===d?(this.offsetX=Io||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=Io||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,this.clientY= void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0):(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.charCode=a.charCode||(c==jh?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.state=a.state;this.Cc=a;a.defaultPrevented&&this.preventDefault()}; Vo.prototype.stopPropagation=function(){Vo.Z.stopPropagation.call(this);this.Cc.stopPropagation?this.Cc.stopPropagation():this.Cc.cancelBubble=!0};Vo.prototype.preventDefault=function(){Vo.Z.preventDefault.call(this);var a=this.Cc;if(a.preventDefault)a.preventDefault();else if(a.returnValue=!1,Uo)try{if(a.ctrlKey||112<=a.keyCode&&123>=a.keyCode)a.keyCode=-1}catch(b){}};var Wo='closure_lm_'+(1E6*Math.random()|0),Xo={},Yo=0; function Zo(a,b,c,d,e){if(Jk(b)==mc)for(var f=0;f<b.length;f++)Zo(a,b[f],c,d,e);else if(c=$o(c),a&&a[no])a.Ra.add(String(b),c,!1,d,e);else{if(!b)throw Error('Invalid event type');var f=!!d,g=ap(a);g||(a[Wo]=g=new yo(a));c=g.add(b,c,!1,d,e);if(!c.Jd){d=bp();c.Jd=d;d.src=a;d.listener=c;if(a.addEventListener)a.addEventListener(b.toString(),d,f);else if(a.attachEvent)a.attachEvent(cp(b.toString()),d);else throw Error('addEventListener and attachEvent are unavailable.');Yo++}}} function bp(){var a=dp,b=To?function(c){return a.call(b.src,b.listener,c)}:function(c){c=a.call(b.src,b.listener,c);if(!c)return c};return b}function ep(a,b,c,d,e){if(Jk(b)==mc)for(var f=0;f<b.length;f++)ep(a,b[f],c,d,e);else c=$o(c),a&&a[no]?a.Ra.remove(String(b),c,d,e):a&&(a=ap(a))&&(b=a.Ke(b,c,!!d,e))&&fp(b)} function fp(a){if(typeof a!=gi&&a&&!a.cc){var b=a.src;if(b&&b[no])Ao(b.Ra,a);else{var c=a.type,d=a.Jd;b.removeEventListener?b.removeEventListener(c,d,a.vc):b.detachEvent&&b.detachEvent(cp(c),d);Yo--;(c=ap(b))?(Ao(c,a),0==c.Vc&&(c.src=null,b[Wo]=null)):qo(a)}}}function cp(a){return a in Xo?Xo[a]:Xo[a]=ji+a}function gp(a,b,c,d){var e=!0;if(a=ap(a))if(b=a.P[b.toString()])for(b=b.concat(),a=0;a<b.length;a++){var f=b[a];f&&f.vc==c&&!f.cc&&(f=hp(f,d),e=e&&!1!==f)}return e} function hp(a,b){var c=a.listener,d=a.zd||a.src;a.md&&fp(a);return c.call(d,b)} function dp(a,b){if(a.cc)return!0;if(!To){var c;if(!(c=b))a:{c=[Ak,Be];for(var d=Ik,e;e=c.shift();)if(null!=d[e])d=d[e];else{c=null;break a}c=d}e=c;c=new Vo(e,this);d=!0;if(!(0>e.keyCode||void 0!=e.returnValue)){a:{var f=!1;if(0==e.keyCode)try{e.keyCode=-1;break a}catch(n){f=!0}if(f||void 0==e.returnValue)e.returnValue=!0}e=[];for(f=c.currentTarget;f;f=f.parentNode)e.push(f);for(var f=a.type,g=e.length-1;!c.Bb&&0<=g;g--){c.currentTarget=e[g];var l=gp(e[g],f,!0,c),d=d&&l}for(g=0;!c.Bb&&g<e.length;g++)c.currentTarget= e[g],l=gp(e[g],f,!1,c),d=d&&l}return d}return hp(a,new Vo(b,this))}function ap(a){a=a[Wo];return a instanceof yo?a:null}var ip='__closure_events_fn_'+(1E9*Math.random()>>>0);function $o(a){if(Jk(a)==mg)return a;a[ip]||(a[ip]=function(b){return a.handleEvent(b)});return a[ip]};function jp(){jo.call(this);this.Ra=new yo(this);this.tg=this;this.gf=null}Pk(jp,jo);jp.prototype[no]=!0;q=jp.prototype;q.addEventListener=function(a,b,c,d){Zo(this,a,b,c,d)};q.removeEventListener=function(a,b,c,d){ep(this,a,b,c,d)}; q.dispatchEvent=function(a){var b,c=this.gf;if(c)for(b=[];c;c=c.gf)b.push(c);var c=this.tg,d=a.type||a;if(typeof a==rj)a=new mo(a,c);else if(a instanceof mo)a.target=a.target||c;else{var e=a;a=new mo(d,c);to(a,e)}var e=!0,f;if(b)for(var g=b.length-1;!a.Bb&&0<=g;g--)f=a.currentTarget=b[g],e=kp(f,d,!0,a)&&e;a.Bb||(f=a.currentTarget=c,e=kp(f,d,!0,a)&&e,a.Bb||(e=kp(f,d,!1,a)&&e));if(b)for(g=0;!a.Bb&&g<b.length;g++)f=a.currentTarget=b[g],e=kp(f,d,!1,a)&&e;return e}; q.Ae=function(){jp.Z.Ae.call(this);if(this.Ra){var a=this.Ra,b=0,c;for(c in a.P){for(var d=a.P[c],e=0;e<d.length;e++)++b,qo(d[e]);delete a.P[c];a.Vc--}}this.gf=null};function kp(a,b,c,d){b=a.Ra.P[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,f=0;f<b.length;++f){var g=b[f];if(g&&!g.cc&&g.vc==c){var l=g.listener,n=g.zd||g.src;g.md&&Ao(a.Ra,g);e=!1!==l.call(n,d)&&e}}return e&&0!=d.ti}q.Ke=function(a,b,c,d){return this.Ra.Ke(String(a),b,c,d)}; q.hasListener=function(a,b){return this.Ra.hasListener(void 0!==a?String(a):void 0,b)};function lp(a){jp.call(this);a='undefined'!==typeof a?a:null;null!=a&&(this.tg=a)}Pk(lp,jp);lp.prototype.Ea=function(a){if(this&&this[no])a=this.hasListener(a,void 0);else{var b=ap(this);a=!!b&&b.hasListener(a,void 0)}return a};lp.prototype.hasEventListener=lp.prototype.Ea;lp.prototype.dispatchEvent=function(a){try{return lp.Z.dispatchEvent.call(this,a)}catch(b){if(b.name!=qj)throw b;}return!1};lp.prototype.dispatchEvent=lp.prototype.dispatchEvent;lp.prototype.g={names:[{name:Fb,h:qi}],ja:[Cm]}; r(qi,lp);function mp(){lp.call(this);this.ya={}}Pk(mp,lp);mp.prototype.Me=function(a){return this.ya[a]};mp.prototype.getProperty=mp.prototype.Me;mp.prototype.setProperty=function(a,b){this.ya[a]=b};mp.prototype.setProperty=mp.prototype.setProperty;mp.prototype.Ne=function(a){return this.ya.hasOwnProperty(a)};mp.prototype.hasProperty=mp.prototype.Ne;mp.prototype.xe=function(a){delete this.ya[a]};mp.prototype.deleteProperty=mp.prototype.xe;mp.prototype.Ee=function(){var a=[],b;for(b in this.ya)a.push(b);return a}; mp.prototype.elementNames=mp.prototype.Ee;mp.prototype.g={names:[{name:'Proxy',h:si}]};r(si,mp);function np(a){a='undefined'!==typeof a?a:!1;mp.call(this);this.la(a)}Pk(np,mp);np.prototype.la=h();np.prototype.g={names:[{name:'Dictionary',h:Uf}]};r(Uf,np);function op(a){this.version='undefined'!==typeof a?a:1}Pk(op,zm);var pp=!1;op.prototype.eb=!1;op.prototype.verbose=op.prototype.eb; op.prototype.Pa=function(a){pp||(pp=!0,qp.mov=new rp(Qh,2,0,0),qp.add=new rp(ec,3,1,0),qp.sub=new rp(sj,3,2,0),qp.mul=new rp(Rh,3,3,0),qp.div=new rp(de,3,4,0),qp.rcp=new rp(Bi,2,5,0),qp.min=new rp(yh,3,6,0),qp.max=new rp(xh,3,7,0),qp.frc=new rp(gg,2,8,0),qp.sqt=new rp(hj,2,9,0),qp.rsq=new rp(Mi,2,10,0),qp.pow=new rp(vi,3,11,0),qp.log=new rp(sh,2,12,0),qp.exp=new rp(Ce,2,13,0),qp.nrm=new rp(ei,2,14,0),qp.sin=new rp(Xi,2,15,0),qp.cos=new rp(Vd,2,16,0),qp.crs=new rp(Xd,3,17,0),qp.dp3=new rp(ge,3,18, 0),qp.dp4=new rp(he,3,19,0),qp.abs=new rp(cc,2,20,0),qp.neg=new rp(Vh,2,21,0),qp.sat=new rp(Pi,2,22,0),qp.m33=new rp(th,3,23,16),qp.m44=new rp(vh,3,24,16),qp.m34=new rp(uh,3,25,16),qp.ddx=new rp($d,2,26,288),qp.ddy=new rp(ae,2,27,288),qp.ife=new rp(Yg,2,28,897),qp.ine=new rp(bh,2,29,897),qp.ifg=new rp(Zg,2,30,897),qp.ifl=new rp($g,2,31,897),qp.els=new rp(le,0,32,1921),qp.eif=new rp(ke,0,33,1409),qp.kil=new rp(lh,1,39,160),qp.tex=new rp(vj,3,40,40),qp.sge=new rp(Ti,3,41,0),qp.slt=new rp($i,3,42,0), qp.sgn=new rp(Ui,2,43,0),qp.seq=new rp(Si,3,44,0),qp.sne=new rp(aj,3,45,0),sp.rgba=new tp(Hi,8,0),sp.dxt1=new tp(ie,8,1),sp.dxt5=new tp(je,8,2),sp.video=new tp(qk,8,3),sp[tb]=new tp(tb,12,0),sp[ub]=new tp(ub,12,2),sp.cube=new tp(Yd,12,1),sp.mipnearest=new tp(Ah,24,1),sp.miplinear=new tp(zh,24,2),sp.mipnone=new tp(Bh,24,0),sp.nomip=new tp(Zh,24,0),sp.nearest=new tp(Uh,28,0),sp.linear=new tp(qh,28,1),sp.anisotropic2x=new tp(jc,28,2),sp.anisotropic4x=new tp(kc,28,3),sp.anisotropic8x=new tp(lc,28,4), sp.anisotropic16x=new tp(ic,28,5),sp.centroid=new tp(Id,16,1),sp.single=new tp(Yi,16,2),sp.ignoresampler=new tp(ah,16,4),sp.repeat=new tp(Di,20,1),sp.wrap=new tp(Ck,20,1),sp.clamp=new tp(Jd,20,0),sp.clamp_u_repeat_v=new tp(Ld,20,2),sp.repeat_u_clamp_v=new tp(Ei,20,3),up(1),up(2));var b=1==this.version?vp:wp,c=a.programType==cg,d;d=a.programType==kk?dk:Ee;var e=new L;this.data=e;e.endian=rh;e.fa(160);e.bd(this.version);e.fa(161);e.fa(c?1:0);a=a.lines;for(var f=0,g=0;g<a.length;g++){var l=a[g],n=l[0]; 1!=this.version||n!=$d&&n!=ae||(n=Qh);var n=qp[n],t=l.flag;if(null==n)3<=l.length&&Zk(xk+g+wb+a[g]);else{if(n.flags&256&&2>this.version){this._error=ve;break}if(n.flags&64&&c){this._error=ue;break}if(n.flags&32&&!c){this._error=te;break}this.eb&&Zk(me+n);e.bd(n.emitCode);f++;if(2048<f){this._error=ye;break}for(var u=!1,v=160,G=l.length-1,E=0;E<G;E++){var A=l[E+1],K=A.index,J=x(A.component,Bm);this.eb&&J&&Zk(Hb);var O=b[d+A.type];if(null==O){this._error=re+E+ma+A.type+Ma;u=!0;break}if(c){if(!(O.flags& 32)){this._error=we+E+ma+A.type+Ka;u=!0;break}if(J){this._error=we+E+ma+A.type+La;u=!0;break}}else if(!(O.flags&64)){this._error=we+E+ma+A.type+Ja;u=!0;break}if(O.range<K){this._error=we+E+ma+A.type+Ia+(O.range+1)+ob;u=!0;break}var W=0,ka=null;x(A.component,String)&&(ka=w(A.component,String));var pa=0==E&&!(n.flags&128),ua=2==E&&n.flags&8,Aa=0,sa=0,Da=0;if(pa&&J){this._error=xe;u=!0;break}if(ka){for(var W=0,Ea,kb=ka.length,da=1;da<=kb;da++)Ea=ka.charCodeAt(da-1)-120,2<Ea&&(Ea=3),W=pa?W|1<<Ea:W|Ea<< (da-1<<1);if(!pa)for(;4>=da;da++)W|=Ea<<(da-1<<1)}else W=pa?15:228;if(J){da=w(A.component,Bm);K=da.index;Aa=b[d+da.type];if(null==Aa){this._error=qe;u=!0;break}Aa=Aa.emitCode;sa=w(da.component,String).charCodeAt(0)-120;2<sa&&(sa=3);Da=A.index+A.componentOffset;if(0>Da||255<Da){this._error=se+Da+ra;u=!0;break}this.eb&&Zk(Jb+Aa+Ab+sa+zb+K+oa+Da)}this.eb&&Zk(ja+O+Pb+K+Yb+W+Xb);if(pa)e.kc(K),e.fa(W),e.fa(O.emitCode),v-=32;else{if(ua){this.eb&&Zk(la);A=5;J=null==t?0:t.length;for(da=O=0;da<J;da++)this.eb&& Zk(ia+t[da]),W=sp[t[da]],null==W?(O=Number(t[da]),this.eb&&Zk(ga+O)):(16!=W.flag&&(A&=~(15<<W.flag)),A|=W.mask>>>0<<(W.flag>>>0));e.kc(K);e.fa(8*O>>0);e.fa(0);e.bd(A);this.eb&&Zk(ha+(A-5))}else 0==E&&(e.bd(0),v-=32),e.kc(K),e.fa(Da),e.fa(W),e.fa(O.emitCode),e.fa(Aa),e.kc(J?sa|32768:0);v-=64}}for(E=0;E<v;E+=8)e.fa(0);if(u)break}}};op.prototype.creat=op.prototype.Pa; function up(a){var b=1==a?vp:wp;b.v3=new xp(ek,lk,0,7,66);b.v1=new xp(ik,mk,1,1==a?127:249,66);b.v2=new xp(uk,ok,2,1==a?7:25,67);b.v7=new xp(sk,nk,3,0,65);b.v4=b.f4=new xp(pk,gk,4,1==a?7:9,99);b.f1=new xp(Fe,dg,1,1==a?27:63,34);b.f2=new xp(kg,fg,2,1==a?7:25,35);b.f5=new xp(jg,wj,5,7,34);b.f6=new xp(ag,eg,3,1==a?0:3,33)}var qp=new np,vp=new np,wp=new np,sp=new np;op.prototype.g={names:[{name:'AGALByteCreator',h:nc}]};r(nc,op);function rp(a,b,c,d){this.Ca=a;this.jg=b;this.pc=c;this.qc=d} rp.prototype.toString=function(){return Qb+this.Ca+ya+this.jg+$a+this.pc+ab+this.qc+Xb};rp.prototype.toString=rp.prototype.toString;Object.defineProperties(rp.prototype,{emitCode:{get:m('pc')},flags:{get:m('qc')},name:{get:m('Ca')},numRegister:{get:m('jg')}});rp.prototype.g={names:[{name:'OpCode',h:oc}]};r(oc,rp);function xp(a,b,c,d,e){this.Ca=a;this.gg=b;this.pc=c;this.kg=d;this.qc=e}xp.prototype.toString=function(){return Rb+this.Ca+wa+this.gg+ta+this.pc+eb+this.kg+ab+this.qc+Xb}; xp.prototype.toString=xp.prototype.toString;Object.defineProperties(xp.prototype,{emitCode:{get:m('pc')},longName:{get:m('gg')},name:{get:m('Ca')},flags:{get:m('qc')},range:{get:m('kg')}});xp.prototype.g={names:[{name:'Register',h:pc}]};r(pc,xp);function tp(a,b,c){this.Ca=a;this.cg=b;this.wj=c}tp.prototype.toString=function(){return Sb+this.Ca+va+this.cg+xa+this.mask+Xb};tp.prototype.toString=tp.prototype.toString;Object.defineProperties(tp.prototype,{flag:{get:m('cg')},mask:{get:m('wj')},name:{get:m('Ca')}}); tp.prototype.g={names:[{name:'Sampler',h:qc}]};r(qc,tp);function yp(){this.textureSets=[];this.textureSets=[];this.buffSets=[]}yp.prototype.m=!0;yp.prototype.invalid=yp.prototype.m;yp.prototype.debug=!0;yp.prototype.debug=yp.prototype.debug;var zp={};r('gl3d.core.shaders.GLShader.PROGRAM_POOL',zp); yp.prototype.Gh=function(a){this.vs=this.wd(a);this.fs=this.vd(a);if(this.vs&&this.fs){Jm.playerType==fj?(this.vs.creator=new Em,this.fs.creator=new Em):(this.vs.creator=new op(a.view.renderer.agalVersion),this.fs.creator=new op(a.view.renderer.agalVersion));var b;a:{b=this.vs.code;var c=this.fs.code;a=this+vb+a.view.id;var d=zp[a];if(d)var e=w(d,Array);if(e){a=e;for(var f in a)if(d=a[f],x(d.vcode,String)){if(d.vcode==b&&d.fcode==c){b=d;break a}}else if(d.vcode.length==b.length&&d.fcode.length==c.length){for(var g= !1,l=d.vcode.length-1;0<=l;l--)if(d.vcode[l]!=b[l]){g=!0;break}if(!g){g=!1;for(l=d.fcode.length-1;0<=l;l--)if(d.fcode[l]!=c[l]){g=!0;break}if(!g){b=d;break a}}}}else e=zp[a]=[];e.push(new Km(b,c));this.debug&&this.vs&&this.fs&&(Zk(this),this.Be(this.vs),this.Be(this.fs),Zk());b=e[e.length-1]}this.programSet=b}return this.programSet};yp.prototype.getProgram=yp.prototype.Gh; yp.prototype.Be=function(a){a.creator=new Dm;var b=w(a.code,String);Zk(b);Zk(Rd,a.Oa);Zk(Qd,a.constPoolVec);for(var c in a.namedVars)b=a.namedVars[c],b.o&&Zk(b.index,c);a.creator=new Em;Zk(a.code);Zk()};yp.prototype.doDebug=yp.prototype.Be;yp.prototype.wd=p(null);yp.prototype.getVertexShader=yp.prototype.wd;yp.prototype.vd=p(null);yp.prototype.getFragmentShader=yp.prototype.vd; yp.prototype.update=function(a){this.m&&(this.programSet=this.Gh(a),this.m=!1);this.programSet&&(this.programSet.update(a.view.renderer.gl3d),a.view.renderer.gl3d.Db(this.programSet.program),a.view.renderer.gl3d.Qc(a.depthMask,a.passCompareMode),a.view.renderer.gl3d.ec(a.sourceFactor,a.destinationFactor),a.view.renderer.gl3d.fc(a.culling));this.vs&&this.fs&&(this.vs.bind(this,a),this.fs.bind(this,a),a.view.renderer.gl3d.ab(kk,this.vs.Oa,this.vs.constPoolVec),a.view.renderer.gl3d.ab(cg,this.fs.Oa, this.fs.constPoolVec));var b=!0;if(this.textureSets)for(var c=0;c<this.textureSets.length;c++){var d=this.textureSets[c];d&&(d.update(a.view),d.ready||(b=!1))}if(b){if(this.textureSets)for(c=0;c<this.textureSets.length;c++)(d=this.textureSets[c])&&d.bind(a.view.renderer.gl3d,c);if(this.buffSets)for(c=0;c<this.buffSets.length;c++)if(b=this.buffSets[c])b.update(a.view.renderer.gl3d),b.bind(a.view.renderer.gl3d,c);this.programSet&&a.view.renderer.gl3d.na(a.node.drawable.index,0,a.node.drawable.index.ac)}}; yp.prototype.update=yp.prototype.update;yp.prototype.g={names:[{name:'GLShader',h:Dg}]};r(Dg,yp);function Ap(){yp.call(this)}Pk(Ap,yp);Ap.prototype.wd=function(a){return new En(a)};Ap.prototype.getVertexShader=Ap.prototype.wd;Ap.prototype.vd=function(a){return new Cn(a,w(this.vs,En))};Ap.prototype.getFragmentShader=Ap.prototype.vd;Ap.prototype.g={names:[{name:'PhongGLShader',h:Jg}]};r(Jg,Ap);function Mn(a){R.call(this);this.shader=('undefined'!==typeof a?a:null)||new Ap}Pk(Mn,R);Mn.prototype.Yh=-1;Mn.prototype.G=function(a,b){this.view=b;this.camera=this.materialCamera||b.camera;this.node=a;if(a.drawable&&this.shader){var c=a.skin&&a.skin.Ci&&!a.skin.aj;this.yd!=c&&(this.m=!0,this.yd=c);this.Va&&this.Yh!=b.lights.length&&(this.m=!0,this.Yh=b.lights.length);this.m&&(this.shader.m=!0,this.m=!1);this.shader.update(this)}};Mn.prototype.draw=Mn.prototype.G; Mn.prototype.g={names:[{name:'Material',h:rg}]};r(rg,Mn);function Bp(){xm.call(this);this.Ka=new Nn(0);this.Ka.nb=this.Ka.ic=400;this.fb(this.Ka);this.addEventListener(ne,y(this.jk,this,ne));this.jb=new rn;this.jb.drawable=ho();this.jb.material=new Mn;this.jb.material.Va=!1;this.Ka.scene.fb(this.jb);this.Ka.camera.perspective.gi(Math.PI/4,this.Ka.nb/this.Ka.ic,.1,4E3);this.Ka.camera.z=-10;this.Ka.scene.fb(this.jb)}Pk(Bp,xm);Bp.prototype.jk=function(){this.jb.matrix.kd(1,Ul);this.jb.matrix.kd(2,Vl);this.jb.I();this.Ka.kb()}; Bp.prototype.g={names:[{name:Mb,h:Mb}]};r(Mb,Bp); //# sourceMappingURL=./TestEngine3D.js.map
497.932673
2,622
0.710152
8c11aeb8b41e734da74b7cc9c8fd9f549f54ce3f
1,674
js
JavaScript
src/components/Form/index.js
Rodrigoleon/CarlJohnPalmer
3be0621580bb5d0e90b14044a024cb442a5bb65b
[ "MIT" ]
null
null
null
src/components/Form/index.js
Rodrigoleon/CarlJohnPalmer
3be0621580bb5d0e90b14044a024cb442a5bb65b
[ "MIT" ]
null
null
null
src/components/Form/index.js
Rodrigoleon/CarlJohnPalmer
3be0621580bb5d0e90b14044a024cb442a5bb65b
[ "MIT" ]
null
null
null
import React from 'react'; // Styles import FormWrap from './styles'; const Form = () => ( <FormWrap className="text-center"> <div id="form-wrap" class="d-flex align-items-center justify-content-center text-center" > <form name="contact" method="POST" data-netlify="true" class="p-4"> <div class="form-groups"> <div class="form-group"> <input class="form-control" type="text" name="name" placeholder="Name:" required /> </div> <div class="form-group"> <input class="form-control" type="email" name="email" placeholder="Email:" required /> </div> <div class="form-group"> <textarea class="form-control" name="message" placeholder="Message:" required /> </div> <div class="form-group pt-4"> <small id="emailHelp" class="form-text text-muted"> Your email won't be shared with anyone. </small> </div> <div class="form-group"> <button class="btn btn-primary my-4 d-block mx-auto" type="submit"> Submit </button> <button id="close-form" class="btn btn-link btn-sm text-muted d-block mt-4 mx-auto" > <small>Close</small> </button> </div> </div> </form> </div> </FormWrap> ); export default Form;
24.985075
79
0.453405
8c1430e7cfc3c5e6810a794ead6a6cb86e61d18c
4,385
js
JavaScript
generalservices/DbService.js
dragonli-people/dragonli-node-with-java-service-core
818595b1d2ad1bf59201d954d2d4030e25245ab5
[ "Apache-2.0" ]
null
null
null
generalservices/DbService.js
dragonli-people/dragonli-node-with-java-service-core
818595b1d2ad1bf59201d954d2d4030e25245ab5
[ "Apache-2.0" ]
null
null
null
generalservices/DbService.js
dragonli-people/dragonli-node-with-java-service-core
818595b1d2ad1bf59201d954d2d4030e25245ab5
[ "Apache-2.0" ]
null
null
null
require('dragonli-node-tools'); module.exports = { defaultInterfaceName: 'org.dragonli.service.general.interfaces.general.DbService', get: ( dbName, table,pk)=>({parasType:['string','string','object'],resultType:'object'}), save: ( dbName, table,model)=>({parasType:['string','string','object'],resultType:'object'}), list: (dbName, table,query,paras)=>({parasType:['string','string','string','array(object)'],resultType:'array(object)'}), multiGet: (dbName,table,pkList)=>({parasType:['string','string','array(object)'],resultType:'array(object)'}), batchSave: (dbName,models,tempPkTag)=>({parasType:['string','array(object)','string'],resultType:'array(object)'}), batchSave: (dbName,models,tempPkTag,table)=>({parasType:['string','array(object)','string','table'],resultType:'array(object)'}), "delete": ( dbName, table,models)=>({parasType:['string','string','object'],resultType:'int'}), multiDelete: ( dbName, table,pk)=>({parasType:['string','string','array(object)'],resultType:'int'}), queryDelete: ( dbName, table,qeury,paras)=>({parasType:['string','string','string','array(object)'],resultType:'int'}), count: ( dbName, table,qeury,paras)=>({parasType:['string','string','string','array(object)'],resultType:'int'}), toOne: (dbName,model,mapping)=>({parasType:['string','object','object'],resultType:'object'}), toMany: (dbName,model,mapping)=>({parasType:['string','object','object'],resultType:'object'}), toMany: (dbName,modelList,mapping)=>({parasType:['string','array(object)','object'],resultType:'array(object)'}), toMany: (dbName,modelList,mapping,values)=>({parasType:['string','array(object)','object','object'],resultType:'array(object)'}), listIn: (dbName,table,field,para)=>({parasType:['string','string','string','object'],resultType:'array(object)'}), listIn: (dbName,table,field,para,order)=>({parasType:['string','string','string','object','string'],resultType:'array(object)'}), listIn: (dbName,table,field,para,order,pageSize,page)=> ({parasType:['string','string','string','object','string','int','int'],resultType:'array(object)'}), listIn: (dbName,table,fieldList,paraList)=> ({parasType:['string','string','array(string)','array(object)'],resultType:'array(object)'}), listIn: (dbName,table,fieldList,paraList,order)=> ({parasType:['string','string','array(string)','array(object)','string'],resultType:'array(object)'}), exec: (dbName,query,paras)=>({parasType:['string','string','array(object)'],resultType:'array(object)'}), batchUpdate: (dbName,sqls)=>({parasType:['string','array(string)'],resultType:'array(object)'}), join: ()=>(async function (list, leftKey, newField, dbName,table, rightKey, dir = 'left', autoCloneRight = true) { var leftKeyValues = list.map(v=>v[leftKey]).filter(v=>v); leftKeyValues = [...new Set(leftKeyValues)]; list.forEach(v=>v[newField]=null); if(leftKeyValues.length === 0)return list; var otherList = await this.multiGet(dbName,table,leftKeyValues); list.joinList(otherList,leftKey,rightKey,newField,dir,autoCloneRight); return list; }), leftJoin: ()=>(function (list, leftKey, newField,dbName, table, rightKey,autoCloneRight=true) { return this.join(list, leftKey, newField, dbName,table, rightKey,'left',autoCloneRight); }), rightJoin: ()=>(function (list, leftKey, newField,dbName, table, rightKey,autoCloneRight=true) { return this.join(list, leftKey, newField, dbName,table, rightKey,'right',autoCloneRight); }), page: ()=>(async function (size, page, dbName, table, where, order='', limitParas=[], ...paras) { (!page || page <= 0) && (page = 1); let count = await this.count( dbName, table, where, limitParas, ...paras) || 0; // console.log('count',count); let pages = Math.ceil(count / size); let sizeEnd = size; let sizeStart = size * (page - 1); let sql = where + ' ' + order + ' limit ?,? '; limitParas.push(sizeStart) && limitParas.push(sizeEnd); // paras.push(limitParas) let list = await this.list( dbName, table, sql, limitParas, ...paras) || []; let result = {pages, count, size, page}; result.arr = list; result.page_length = sizeEnd; return result; }), }
61.760563
133
0.645838
8c1523d80dad670c7818e2dd56bd4322c1daf59c
381
js
JavaScript
public/assets/js/plugins/filepond/filepond.active.js
tamaraluckywidodo/-PABW-6701190015-TamaraLuckyWidodo-Assessment-3
1e87d3be9eab92820bcc9fb663b0e7660700fcf9
[ "MIT" ]
null
null
null
public/assets/js/plugins/filepond/filepond.active.js
tamaraluckywidodo/-PABW-6701190015-TamaraLuckyWidodo-Assessment-3
1e87d3be9eab92820bcc9fb663b0e7660700fcf9
[ "MIT" ]
8
2019-11-24T14:56:27.000Z
2019-12-17T16:39:59.000Z
public/assets/js/plugins/filepond/filepond.active.js
tamaraluckywidodo/-PABW-6701190015-TamaraLuckyWidodo-Assessment-3
1e87d3be9eab92820bcc9fb663b0e7660700fcf9
[ "MIT" ]
null
null
null
(function ($) { "use strict"; /*File Pond*/ if( $('.file-pond').length ) { FilePond.registerPlugin(FilePondPluginImageExifOrientation, FilePondPluginImagePreview); const inputElement = document.querySelector('.file-pond'); const pond = FilePond.create( inputElement, { imagePreviewHeight: 140, }); } })(jQuery);
29.307692
96
0.606299
8c1559d507e247b36853f3f97316a177fc2345f0
3,322
js
JavaScript
public/js/mypage.js
Keigo-Watanabe/goalachivement
577c4b33f00fc195662b7c296700aecbfa3c9131
[ "MIT" ]
null
null
null
public/js/mypage.js
Keigo-Watanabe/goalachivement
577c4b33f00fc195662b7c296700aecbfa3c9131
[ "MIT" ]
null
null
null
public/js/mypage.js
Keigo-Watanabe/goalachivement
577c4b33f00fc195662b7c296700aecbfa3c9131
[ "MIT" ]
null
null
null
/* カテゴリー新規追加(開閉ボタン) */ const newCategory = document.getElementById('new-category'); if (newCategory) { newCategory.addEventListener('click', () => { const hideCategory = document.getElementById('hide-new-category'); hideCategory.classList.add('show-new-category'); }); } /* ヘッダー(レスポンシブ) */ const header = document.getElementById('my-page-header'); const hamburgerBtn = document.getElementById('hamburger-btn') if (hamburgerBtn) { hamburgerBtn.addEventListener('click', () => { header.classList.toggle('my-page-header-block'); }); } /* ヘッダーメニュー・タスク(開閉ボタン) */ const taskBtn = document.getElementById('task-btn'); if (taskBtn) { taskBtn.addEventListener('click', () => { const taskNavMenu = document.getElementById('task-nav-menu'); taskNavMenu.classList.toggle('task-nav-menu-show'); }); } /* ヘッダーメニュー・予定(開閉ボタン) */ const scheduleBtn = document.getElementById('schedule-btn'); if (scheduleBtn) { scheduleBtn.addEventListener('click', () => { const scheduleNavMenu = document.getElementById('schedule-nav-menu'); scheduleNavMenu.classList.toggle('schedule-nav-menu-show'); }); } /* タスク優先後(開閉ボタン) */ const priorityList = document.getElementById('priority-list'); if (priorityList) { priorityList.addEventListener('click', () => { const priorityListBox = document.getElementById('priority-list-box'); priorityListBox.classList.toggle('priority-list-box-show'); }); } /* タスクカテゴリー一覧 */ let taskCategoryBox = document.querySelectorAll('.task-category-box'); if (taskCategoryBox) { for (let i = 0; i < taskCategoryBox.length; i++) { let each_taskCategoryBox = taskCategoryBox[i]; let item = each_taskCategoryBox.lastElementChild; let itemList = item.childElementCount; // タスクリストの数が0の場合はカテゴリーを非表示 if (itemList == 0) { let parentBox = item.parentNode; parentBox.style.display = 'none'; } } } /* 重要度・緊急度の説明 */ const matrixDescription = document.getElementById('matrix-description'); if (matrixDescription) { const matrixDescriptionContent = document.getElementById('matrix-description-content'); matrixDescription.addEventListener('mouseover', () => { matrixDescriptionContent.classList.remove('matrix-hide'); }); matrixDescriptionContent.addEventListener('mouseleave', () => { matrixDescriptionContent.classList.add('matrix-hide'); }); } /* 予定グループ別一覧 */ let commonScheduleSammary = document.querySelectorAll('.common-schedule-sammary'); if (commonScheduleSammary) { for (let i = 0; i < commonScheduleSammary.length; i++) { let each_commonScheduleSammary = commonScheduleSammary[i]; let item = each_commonScheduleSammary.lastElementChild; let itemList = item.childElementCount; // 予定の数が0の場合はグループを非表示 if (itemList == 0) { let parentBox = item.parentNode; parentBox.style.display = 'none'; } } } /* タスクガントチャート(現在日までスクロール) */ const taskChart = document.getElementById('task-chart'); const tableRow = document.getElementById('table-row').getBoundingClientRect(); const today = document.getElementById('th-today').getBoundingClientRect(); // ガントチャートの左端を取得 const tableRowRight = tableRow.left; // 現在日の左端を取得 const todayLeft = today.left; // 現在日からガントチャート左端までの距離を取得 const scroll = todayLeft - tableRowRight; // 現在日までスクロール taskChart.scrollLeft = scroll;
22.598639
89
0.714931
8c15e1cf7bafe42f588a245181b7f79885d641e4
537
js
JavaScript
lib/hocs/withBootstrap.js
CarbonStack/carbon-stack
01a15c33701704c38e65096449e319ba402a8de6
[ "MIT" ]
null
null
null
lib/hocs/withBootstrap.js
CarbonStack/carbon-stack
01a15c33701704c38e65096449e319ba402a8de6
[ "MIT" ]
null
null
null
lib/hocs/withBootstrap.js
CarbonStack/carbon-stack
01a15c33701704c38e65096449e319ba402a8de6
[ "MIT" ]
null
null
null
import withRedux from './withRedux' import withHttpErrorHandler from './withHttpErrorHandler' import withPageBundle from './withPageBundle' function pipe (component, hocs) { return hocs.reduce((component, hoc) => hoc(component), component) } function withBootstrap (Component, withoutBundle = false) { if (withoutBundle) { return pipe(Component, [ withHttpErrorHandler, withRedux ]) } return pipe(Component, [ withPageBundle, withHttpErrorHandler, withRedux ]) } export default withBootstrap
22.375
67
0.724395
9693e2df9b9fd03614ba37d6153f31f126e20a4b
696
js
JavaScript
js/models/sides.class.js
esfraner/PTV-BurgerShopProyect
ee799ae6ef780c6e859c06306065b6dd26580ee4
[ "MIT" ]
null
null
null
js/models/sides.class.js
esfraner/PTV-BurgerShopProyect
ee799ae6ef780c6e859c06306065b6dd26580ee4
[ "MIT" ]
null
null
null
js/models/sides.class.js
esfraner/PTV-BurgerShopProyect
ee799ae6ef780c6e859c06306065b6dd26580ee4
[ "MIT" ]
null
null
null
function Sides({ units = 0, name, imageSrc, netPrice, tax, kcal, stock, }) { this.units = units; Item.call(this, { name: name, imageSrc: imageSrc, netPrice: netPrice, tax: tax, kcal: kcal, stock: stock }); } //ITEM Sides.prototype = Object.create(Item.prototype); Sides.prototype.constructor = Sides.constructor; //GETTER Sides.prototype.getUnits = function (units) { this.price = units; } //SETTER Sides.prototype.setUnits = function (_units) { this.units = _units; } //TOSTRING Sides.prototype.toString = function () { return `${Item.prototype.toString.call(this)}, price: ${this.price}`; }
18.315789
73
0.609195
96948108ad925fe1104b5f27bf1893a6bbf97e55
6,777
js
JavaScript
routes/pug.js
he110world/node-func
4b854bef09659fe7c1218fae535b7ad7be373c49
[ "MIT" ]
null
null
null
routes/pug.js
he110world/node-func
4b854bef09659fe7c1218fae535b7ad7be373c49
[ "MIT" ]
null
null
null
routes/pug.js
he110world/node-func
4b854bef09659fe7c1218fae535b7ad7be373c49
[ "MIT" ]
null
null
null
const router = require('koa-router')() const pug = require('pug'); const path = require('path'); const ip = require('ip'); const request = require('superagent') const bluebird = require('bluebird'); const redis = require('redis'); const redis_cli = bluebird.promisifyAll(redis.createClient('redis://redis')); const fs = bluebird.promisifyAll(require('fs')) const AsyncBusboy = require('koa-async-busboy') const TEMP_JS_NAME = 'pug_temp_js'; const ASSET_PATH = 'public/assets' const CWD = process.cwd() //TODO: fuck this const api_host = ip.address() + ':4000'; function pug_render (code, options, js_name) { // add script reference let code_patched = code; if (js_name) { code_patched += `\n\tscript(src="/pug/js/${js_name}",type="text/javascript")`; } return pug.render(code_patched, options); } function get_temp_js(ctx){ return `${TEMP_JS_NAME}${ctx.request.ip}` } router.get('/pug', async (ctx, next) => { console.log(ctx.request.ip) await redis_cli.delAsync(get_temp_js(ctx))//TEMP_JS_NAME); ctx.redirect('/pug/view/pug-editor'); // await ctx.render('pug'); }); router.get('/pug/list', async (ctx, next) => { // get an array of page names let keys = await redis_cli.keysAsync("pug:*"); // keys are in the form of 'page:name' // only keep the 'name' part let names = keys.map(name => name.split(':')[1]); ctx.body = {page_list:names}; }); router.get('/pug/edit/:name', async (ctx, next) => { let name = ctx.params.name; if (!name) { ctx.throw('Cannot find page', 404); return; } let key = 'pug:' + name; let pug_info = await redis_cli.hgetallAsync(key); await ctx.render('pug', pug_info); // ctx.body = pug_info; }); router.get('/api-proxy/:name', async (ctx, next) => { let name = ctx.params.name try { const url = `http://${api_host}/api/${name}` const result = await request.get(url) ctx.body = result.text } catch (err) { ctx.body = err } }) router.post('/api-proxy/:name', async (ctx, next) => { let data = ctx.request.body || {} let name = ctx.params.name try { const url = `http://${api_host}/api/${name}` const result = await request.post(url).send(data) ctx.body = result.text } catch (err) { ctx.body = err } }) router.post('/pug/save', async (ctx, next) => { let info = ctx.request.body; if (!info || !info.pug_source) { ctx.throw('Invalid pug', 500); return; } let key = 'pug:' + info.name; await redis_cli.hmsetAsync(key, info); ctx.body = 'ok'; }); router.post('/pug/compile', async (ctx, next) => { let code = ctx.request.body.code; if (!code) { ctx.body = {compiled:''}; return; } let options = { pretty:true, filename:path.join(__dirname, '../node_modules/pug-bootstrap-attr/_bootstrap.pug'), }; // test payload let payload = ctx.request.body.payload; if (typeof payload === 'object') { for(var k in payload) { options[k] = payload[k]; } } // save temp js let js_name = get_temp_js(ctx) await redis_cli.setAsync(js_name/*TEMP_JS_NAME*/, ctx.request.body.js); let html = pug_render(code, options, js_name/*TEMP_JS_NAME*/); ctx.body = {compiled:html}; }); // get rendered page router.get('/pug/view/:name', async (ctx, next) => { let name = ctx.params.name; if (!name) { ctx.throw('Cannot find page', 404); return; } let key = 'pug:' + name; let pug_source = await redis_cli.hgetAsync(key, 'pug_source'); if (!pug_source) { ctx.throw('Cannot find page', 404); return; } let options = { pretty:true, filename:path.join(__dirname, '../node_modules/pug-bootstrap-attr/_bootstrap.pug'), // name:name }; let html = pug_render(pug_source, options, name); ctx.body = html; }); // get editor page router.get('/pug/view/:name/:name2', async (ctx, next) => { let name = ctx.params.name; let name2 = ctx.params.name2; if (!name) { ctx.throw('Cannot find page', 404); return; } // get editor let key = 'pug:' + name; let pug_source = await redis_cli.hgetAsync(key, 'pug_source'); if (!pug_source) { ctx.throw('Cannot find page', 404); return; } let options = { pretty:true, filename:path.join(__dirname, '../node_modules/pug-bootstrap-attr/_bootstrap.pug'), name:name }; // get page to edit let key2 = 'pug:' + name2; // function editor? // TODO: better handling of function if (name.indexOf('func-editor') !== -1) { key2 = 'func:' + name2; options.api_host = api_host; } else if (name.indexOf('schema-editor') !== -1) { key2 = 'schema:' + name2; } let pug_info = await redis_cli.hgetallAsync(key2); if (!pug_info) { ctx.throw('Cannot find page to edit', 404); return; } for(let k in pug_info) { options[k] = pug_info[k]; } console.log(options); let html = pug_render(pug_source, options, name); ctx.body = html; }); // get pug source router.get('/pug/pug/:name', async (ctx, next) => { let name = ctx.params.name; if (!name) { ctx.throw('Cannot find page', 404); return; } let key = 'pug:' + name; let source = await redis_cli.hgetAsync(key, 'pug_source'); ctx.body = source; }); // get js source router.get('/pug/js/:name', async (ctx, next) => { let name = ctx.params.name; if (!name) { ctx.throw('File not found', 404); return; } let js_name = get_temp_js(ctx) if (name === js_name/*TEMP_JS_NAME*/) { ctx.body = await redis_cli.getAsync(js_name/*TEMP_JS_NAME*/); } else { let key = 'pug:' + name; let js_source = await redis_cli.hgetAsync(key, 'js_source'); ctx.body = js_source; } }); router.get('/pug/assets/:name', async (ctx, next) => { ctx.redirect(`/assets/${ctx.params.name}`); }) router.post('/pug/assets/delete', async (ctx, next) => { const file = ctx.request.body.file if (!file) { ctx.throw('File not found', 404) return } const path = `${CWD}/${ASSET_PATH}/${file}` try { await fs.unlinkAsync(path) ctx.body = 'ok' } catch (e) { ctx.throw(e, 500) } }) router.post('/pug/assets', async (ctx, next) => { const busboy = new AsyncBusboy({ headers: ctx.req.headers }); const resBody = {files: [], fields: []}; const writes = []; await busboy .onFile((fieldname, file, filename, encoding, mimetype) => { const tmpFilePath = `${CWD}/${ASSET_PATH}/${filename}` const write = fs.createWriteStream(tmpFilePath); const obj = {fieldname, filename, encoding, mimetype, tmpFilePath}; file.pipe(write); writes.push(new Promise(resolve => { write.on('finish', () => { resolve(obj); }); })); }) .onField((fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype) => { resBody.fields.push({fieldname, val, fieldnameTruncated, valTruncated, encoding, mimetype}); }) .pipe(ctx.req); resBody.files = await Promise.all(writes); ctx.body = resBody; }) module.exports = router
22.366337
98
0.639368
9694824740e6c977c93f38818ac453f37712a99c
4,424
js
JavaScript
app/assets/javascripts/activity_feed/activity_feed.js
BarkSoftware/specd
326dd661061fbcacfa59fc12101afa50d3bce05d
[ "Apache-2.0" ]
9
2015-11-22T23:17:17.000Z
2016-04-09T00:10:01.000Z
app/assets/javascripts/activity_feed/activity_feed.js
BarkSoftware/specd
326dd661061fbcacfa59fc12101afa50d3bce05d
[ "Apache-2.0" ]
1
2015-12-11T13:07:39.000Z
2015-12-11T13:10:56.000Z
app/assets/javascripts/activity_feed/activity_feed.js
BarkSoftware/specd
326dd661061fbcacfa59fc12101afa50d3bce05d
[ "Apache-2.0" ]
null
null
null
specd.app.controller('ActivityFeedFullController', [ '$scope', '$stateParams', 'specd.services', function($scope, $stateParams, services) { $scope.breadcrumbState = $stateParams; services.project.get($stateParams.project_id).then(function(project) { $scope.project = project; }); }]); specd.app.controller('ActivityFeedController', [ '$scope', 'specd.github', '$state', function($scope, github, $state) { $scope.allEvents = []; var getActivityPath = "/events?page=1"; function hasLabel(issue, label) { return _.any(issue.labels, function(l) { return l.name.toLowerCase() === label.toLowerCase(); }); } function issueNumber(e) { if (e.payload.issue) { return e.payload.issue.number; } return null; } function getActivityGithub(project, memo, next) { if (!memo) { memo = []; } var url = project.github.url + getActivityPath; if (next) { url = next; } return github.get(url).then(function(response) { memo = memo.concat(response.data); var links = github.parseLinkHeader(response.headers('Link')); if (links.next) { return getActivityGithub(project, memo, links.next); } else { return memo; } }); } function setFeedSettings(e) { e.feed_settings = { time: moment(e.created_at).format('h:mm a')}; if (e.type === 'IssuesEvent') { var issue = e.payload.issue; _.extend(e.feed_settings, { title: e.payload.action + " issue", body: e.payload.issue.title, }); if (hasLabel(issue, 'Spec')) { _.extend(e.feed_settings, { icon: 'fa fa-bullseye' }); } else if (hasLabel(issue, 'Bug')) { _.extend(e.feed_settings, { icon: 'fa fa-bug' }); } else if (hasLabel(issue, 'Question')) { _.extend(e.feed_settings, { icon: 'fa fa-question' }); } else { _.extend(e.feed_settings, { icon: 'fa fa-exclamation-circle' }); } } else if (e.type === "IssueCommentEvent") { _.extend(e.feed_settings, { icon: 'fa fa-comment', title: "new comment", body: e.payload.comment.body }); } } function filterAndPrepareEvents() { _.each($scope.allEvents, setFeedSettings); if ($scope.condensed) { $scope.events = $scope.allEvents.slice(0, 10); } else { $scope.events = $scope.allEvents; } } $scope.navigateTo = function(e) { $state.transitionTo('index.project_detail.issue_detail', { project_id: $scope.project.id, issue_number: e.payload.issue.number }); } $scope.filterComments = function() { $(".activity-filter button").removeClass("active"); $(".comment-filter-button").addClass("active"); $scope.events = _.filter($scope.allEvents, function(e) { return e.type === "IssueCommentEvent"; }); } $scope.filterSpecs = function() { $(".activity-filter button").removeClass("active"); $(".spec-filter-button").addClass("active"); $scope.events = _.filter($scope.allEvents, function(e) { return e.type === 'IssuesEvent' && hasLabel(e.payload.issue, 'Spec'); }); } $scope.filterQuestions = function() { $(".activity-filter button").removeClass("active"); $(".question-filter-button").addClass("active"); $scope.events = _.filter($scope.allEvents, function(e) { return e.type === 'IssuesEvent' && hasLabel(e.payload.issue, 'Question'); }); } $scope.filterBugs = function() { $(".activity-filter button").removeClass("active"); $(".bug-filter-button").addClass("active"); $scope.events = _.filter($scope.allEvents, function(e) { return e.type === 'IssuesEvent' && hasLabel(e.payload.issue, 'Bug'); }); } $scope.removeFilter = function() { $(".activity-filter button").removeClass("active"); $scope.events = $scope.allEvents; } $scope.$watch('project', function(project) { if (project) { if ($scope.allEvents.length === 0) { getActivityGithub(project).then(function(events) { $scope.allEvents = events; filterAndPrepareEvents(); }); } else { filterAndPrepareEvents(); } } }); }]); specd.app.directive('activityFeed', function() { return { scope: { project: "=", condensed: "=" }, templateUrl: "t-activity-feed.html", controller: 'ActivityFeedController' } });
28.358974
101
0.599458
9694cb289842479a943207fa169bac1eb723dff7
186
js
JavaScript
server/app.js
marissaconner/modernnights
7b079f5204d5c63e62392ff0d88b8ed4ee35687d
[ "MIT" ]
null
null
null
server/app.js
marissaconner/modernnights
7b079f5204d5c63e62392ff0d88b8ed4ee35687d
[ "MIT" ]
null
null
null
server/app.js
marissaconner/modernnights
7b079f5204d5c63e62392ff0d88b8ed4ee35687d
[ "MIT" ]
null
null
null
'use strict'; const express = require( 'express' ); const app = express(); require( './lib/middleware' )( app, express ); require( './routes' )( app, express ); module.exports = app;
18.6
46
0.639785
969610cd4c80487097c8f15f4495e01de9043cdd
9,013
js
JavaScript
src/control/container/SplitterContainer.js
skylark-integration/skylark-zebra
8455099bf05c2255328738f38c97445c59a945ae
[ "MIT" ]
null
null
null
src/control/container/SplitterContainer.js
skylark-integration/skylark-zebra
8455099bf05c2255328738f38c97445c59a945ae
[ "MIT" ]
null
null
null
src/control/container/SplitterContainer.js
skylark-integration/skylark-zebra
8455099bf05c2255328738f38c97445c59a945ae
[ "MIT" ]
null
null
null
define([ "qscript/lang/Class", "qscript/lang/Stateful", "qfacex/windows/controlss/_Layoutable" ],function(Class,Statefu,_Layoutable) { pkg.SplitPan = Class(pkg.Panel, [ function $clazz() { this.Bar = Class(pkg.StatePan, MouseListener, Cursorable, [ function $prototype() { this.mouseDragged = function(e){ var x = this.x + e.x, y = this.y + e.y; if (this.target.orientation == L.VERTICAL){ if (this.prevLoc != x){ x = this.target.normalizeBarLoc(x); if (x > 0){ this.prevLoc = x; this.target.setGripperLoc(x); } } } else { if (this.prevLoc != y){ y = this.target.normalizeBarLoc(y); if (y > 0){ this.prevLoc = y; this.target.setGripperLoc(y); } } } }; this.mouseDragStarted = function (e){ var x = this.x + e.x, y = this.y + e.y; if (e.isActionMask()) { if (this.target.orientation == L.VERTICAL){ x = this.target.normalizeBarLoc(x); if(x > 0) this.prevLoc = x; } else{ y = this.target.normalizeBarLoc(y); if(y > 0) this.prevLoc = y; } } }; this.mouseDragEnded = function(e){ var xy = this.target.normalizeBarLoc(this.target.orientation == L.VERTICAL ? this.x + e.x : this.y + e.y); if (xy > 0) this.target.setGripperLoc(xy); }; this.getCursorType = function(t,x,y){ return this.target.orientation == L.VERTICAL ? Cursor.W_RESIZE : Cursor.N_RESIZE; }; }, function(target) { this.prevLoc = 0; this.target = target; this.$overrided(); } ]); }, function $prototype() { this.leftMinSize = this.rightMaxSize = 50; this.isMoveable = true; this.gap = 1; this.normalizeBarLoc = function(xy){ if( xy < this.minXY) xy = this.minXY; else if (xy > this.maxXY) xy = this.maxXY; return (xy > this.maxXY || xy < this.minXY) ? -1 : xy; }; this.setGripperLoc = function(l){ if(l != this.barLocation){ this.barLocation = l; this.vrp(); } }; this.calcPreferredSize = function(c){ var fSize = pkg.getPreferredSize(this.leftComp), sSize = pkg.getPreferredSize(this.rightComp), bSize = pkg.getPreferredSize(this.gripper); if(this.orientation == L.HORIZONTAL){ bSize.width = Math.max(Math.max(fSize.width, sSize.width), bSize.width); bSize.height = fSize.height + sSize.height + bSize.height + 2 * this.gap; } else{ bSize.width = fSize.width + sSize.width + bSize.width + 2 * this.gap; bSize.height = Math.max(Math.max(fSize.height, sSize.height), bSize.height); } return bSize; }; this.doLayout = function(target){ var right = this.getRight(), top = this.getTop(), bottom = this.getBottom(), left = this.getLeft(), bSize = pkg.getPreferredSize(this.gripper); if (this.orientation == L.HORIZONTAL){ var w = this.width - left - right; if (this.barLocation < top) this.barLocation = top; else { if (this.barLocation > this.height - bottom - bSize.height) { this.barLocation = this.height - bottom - bSize.height; } } if(this.gripper != null){ if(this.isMoveable){ this.gripper.setLocation(left, this.barLocation); this.gripper.setSize(w, bSize.height); } else{ this.gripper.setSize(bSize.width, bSize.height); this.gripper.toPreferredSize(); this.gripper.setLocation(~~((w - bSize.width) / 2), this.barLocation); } } if(this.leftComp != null){ this.leftComp.setLocation(left, top); this.leftComp.setSize(w, this.barLocation - this.gap - top); } if(this.rightComp != null){ this.rightComp.setLocation(left, this.barLocation + bSize.height + this.gap); this.rightComp.setSize(w, this.height - this.rightComp.y - bottom); } } else { var h = this.height - top - bottom; if(this.barLocation < left) this.barLocation = left; else { if (this.barLocation > this.width - right - bSize.width) { this.barLocation = this.width - right - bSize.width; } } if (this.gripper != null){ if(this.isMoveable){ this.gripper.setLocation(this.barLocation, top); this.gripper.setSize(bSize.width, h); } else{ this.gripper.setSize(bSize.width, bSize.height); this.gripper.setLocation(this.barLocation, ~~((h - bSize.height) / 2)); } } if (this.leftComp != null){ this.leftComp.setLocation(left, top); this.leftComp.setSize(this.barLocation - left - this.gap, h); } if(this.rightComp != null){ this.rightComp.setLocation(this.barLocation + bSize.width + this.gap, top); this.rightComp.setSize(this.width - this.rightComp.x - right, h); } } }; this.setGap = function (g){ if(this.gap != g){ this.gap = g; this.vrp(); } }; this.setLeftMinSize = function (m){ if(this.leftMinSize != m){ this.leftMinSize = m; this.vrp(); } }; this.setRightMaxSize = function(m){ if(this.rightMaxSize != m){ this.rightMaxSize = m; this.vrp(); } }; this.setGripperMovable = function (b){ if(b != this.isMoveable){ this.isMoveable = b; this.vrp(); } }; }, function (){ this.$this(null, null, L.VERTICAL); }, function (f,s){ this.$this(f, s, L.VERTICAL); }, function (f,s,o){ this.minXY = this.maxXY = 0; this.barLocation = 70; this.leftComp = this.rightComp = this.gripper = null; this.orientation = o; this.$overrided(); if (f != null) this.add(L.LEFT, f); if (s != null) this.add(L.RIGHT, s); this.add(L.CENTER, new pkg.SplitPan.Bar(this)); }, function kidAdded(index,id,c){ this.$overrided(index, id, c); if (L.LEFT == id) this.leftComp = c; else { if (L.RIGHT == id) this.rightComp = c; else { if (L.CENTER == id) this.gripper = c; else throw new Error($invalidC); } } }, function kidRemoved(index,c){ this.$overrided(index, c); if (c == this.leftComp) this.leftComp = null; else { if (c == this.rightComp) this.rightComp = null; else { if (c == this.gripper) this.gripper = null; } } }, function resized(pw,ph) { var ps = this.gripper.getPreferredSize(); if (this.orientation == L.VERTICAL){ this.minXY = this.getLeft() + this.gap + this.leftMinSize; this.maxXY = this.width - this.gap - this.rightMaxSize - ps.width - this.getRight(); } else { this.minXY = this.getTop() + this.gap + this.leftMinSize; this.maxXY = this.height - this.gap - this.rightMaxSize - ps.height - this.getBottom(); } this.$overrided(pw, ph); } ]); });
36.489879
126
0.441695
9696a7effc1a5dd4aba121c7817b9d303b4e492f
215
js
JavaScript
packages/endpoint-media/locales/nl.js
paulrobertlloyd/indiekit
3a74fe72c78aa33c6a17a95c5b2d90782317f488
[ "MIT" ]
90
2019-02-19T15:24:03.000Z
2020-07-21T03:30:12.000Z
packages/endpoint-media/locales/nl.js
paulrobertlloyd/indiekit
3a74fe72c78aa33c6a17a95c5b2d90782317f488
[ "MIT" ]
236
2019-02-22T13:20:34.000Z
2020-07-27T23:04:10.000Z
packages/endpoint-media/locales/nl.js
paulrobertlloyd/indiekit
3a74fe72c78aa33c6a17a95c5b2d90782317f488
[ "MIT" ]
12
2019-02-25T10:17:46.000Z
2020-05-26T06:23:28.000Z
export default { media: { download: "Bestand downloaden", files: { none: "Geen bestanden", title: "Geüploade bestanden", }, properties: "Eigenschappen", title: "Bestanden", }, };
17.916667
35
0.581395
969760425e52ff6c9f3ef1e6173497fc0f93f8a9
1,587
js
JavaScript
index.js
lafaulx/golem
f070ea536a1e3d9106e3a7ead489ebfcde3744c1
[ "MIT" ]
null
null
null
index.js
lafaulx/golem
f070ea536a1e3d9106e3a7ead489ebfcde3744c1
[ "MIT" ]
null
null
null
index.js
lafaulx/golem
f070ea536a1e3d9106e3a7ead489ebfcde3744c1
[ "MIT" ]
null
null
null
const amqp = require('amqplib/callback_api'); const bunyan = require('bunyan'); const spawnPhantomRender = require('./lib/spawnPhantomRender'); const uploadImageToS3 = require('./lib/uploadImageToS3'); const config = require('./local_config'); const log = bunyan.createLogger({ name: 'photographer' }); function reply(ch, msg) { return function(data) { ch.sendToQueue(msg.properties.replyTo, new Buffer(JSON.stringify(data)), {correlationId: msg.properties.correlationId}); ch.ack(msg); } } amqp.connect(config.RABBITMQ_ADDR, function(err, conn) { conn.createChannel(function(err, ch) { const q = 'pht_queue'; ch.assertQueue(q, {durable: false}); ch.prefetch(1); log.info('Awaiting RPC requests'); ch.consume(q, function(msg) { const data = JSON.parse(msg.content.toString()); const curriedReply = reply(ch, msg); log.info(`Received data: ${msg.content.toString()}`); spawnPhantomRender(data.html, data.width, data.height, function(err, fileName) { if (err) { log.error(`Error occured while generating picture: ${err}`); curriedReply({ error: err }); return; } log.info(`Generated picture: ${fileName}`); uploadImageToS3(fileName, function(err, url) { if (err) { log.error(`Error occured while uploading picture: ${err}`); curriedReply({ error: err }) return; } log.info(`Uploaded picture: ${url}`); curriedReply({ url: url }); }); }); }); }); });
26.45
86
0.610586
969873a8630b642ab44a37f49292a4033e88bb39
1,699
js
JavaScript
src/components/board_prediction.js
jsdelivrbot/smigo
bd8f159024acc75ba0b29c239e0d8f4facef7853
[ "MIT" ]
null
null
null
src/components/board_prediction.js
jsdelivrbot/smigo
bd8f159024acc75ba0b29c239e0d8f4facef7853
[ "MIT" ]
null
null
null
src/components/board_prediction.js
jsdelivrbot/smigo
bd8f159024acc75ba0b29c239e0d8f4facef7853
[ "MIT" ]
null
null
null
import React, { Component } from 'react' import { connect } from 'react-redux' import { Button, Modal, Row, Col } from 'antd' import Board from './board/board' import { getBoardLayout } from '../selectors/board_selector' class BoardPrediction extends Component { constructor(props) { super(props) this.state = { prediction: this.props.board, } this.handlePrediction = this.handlePrediction.bind(this) } handlePrediction() { const url = `http://${window.location.hostname}:8081/api/predict` fetch(url, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Accept': 'application/json', }, body: JSON.stringify({ board: this.props.board }) }) .then(response => response.json()) .then(response => { const { prediction } = response this.setState({ prediction }) }) .catch((e) => { console.log('error in prediction', e) }) } render() { return ( <div style={{ textAlign: "center", marginTop: "40px" }}> <Row> <Col span={24}> <Button onClick={this.handlePrediction} style={{ marginLeft: "-25px" }}> Predict </Button> </Col> </Row> <Row> <Col span={24} offset={1}> <Board type={"prediction"} onClick={() => {}} onCheckTurn={() => {}} board={this.state.prediction} /> </Col> </Row> </div> ) } } function mapStateToProps(state) { return { board: getBoardLayout(state) } } export default connect(mapStateToProps)(BoardPrediction)
22.959459
84
0.539729
9698eea6b0eaa59e08174411281fdee85b002d75
96
js
JavaScript
src/main.js
thelgevold/svelte-samples
9489d63e8c01e2319df5dce278a5f2c12b261288
[ "MIT" ]
6
2016-12-02T08:23:41.000Z
2019-09-19T18:15:58.000Z
src/main.js
thelgevold/svelte-samples
9489d63e8c01e2319df5dce278a5f2c12b261288
[ "MIT" ]
1
2016-12-02T03:49:56.000Z
2016-12-02T05:50:22.000Z
src/main.js
thelgevold/svelte-samples
9489d63e8c01e2319df5dce278a5f2c12b261288
[ "MIT" ]
1
2019-09-19T18:15:59.000Z
2019-09-19T18:15:59.000Z
import App from './app'; var demoApp = new App({ target: document.querySelector( 'main' ) });
19.2
42
0.65625
969997ffb5f6b74d57bbc4089706063ad6e2b9cb
2,579
js
JavaScript
UI/EIP.Web/Scripts/app/system/menubutton/havefunctions.js
woshisunzewei/EIP
8b159cfb809af8e88ba5f654dc59f4ac91f4fd2d
[ "MIT" ]
9
2018-08-31T01:42:24.000Z
2021-03-19T00:45:24.000Z
UI/EIP.Web/Scripts/app/system/menubutton/havefunctions.js
woshisunzewei/EIP
8b159cfb809af8e88ba5f654dc59f4ac91f4fd2d
[ "MIT" ]
null
null
null
UI/EIP.Web/Scripts/app/system/menubutton/havefunctions.js
woshisunzewei/EIP
8b159cfb809af8e88ba5f654dc59f4ac91f4fd2d
[ "MIT" ]
8
2018-10-04T16:07:21.000Z
2021-04-13T04:30:58.000Z
define([ 'list', 'layout' ], function () { initLayout(); initGird(); }); var $grid; //初始化布局 function initLayout() { $("body").layout({ "north": { size: 29, closable: true, resizable: false, sliderTip: "显示/隐藏侧边栏", togglerTip_open: "关闭", togglerTip_closed: "打开", resizerTip: "上下拖动可调整大小", //鼠标移到边框时,提示语 slidable: true }, "center": { onresize_end: function () { //获取调整后高度 $grid.jqGrid("setGridHeight", $("#uiCenter").height() - 50).jqGrid("setGridWidth", $("#uiCenter").width() - 2); } } }); } //初始化表格 function initGird() { $grid = $("#list").jgridview( { shrinkToFit: true, multiselect: false, url: "/System/MenuButton/GetMenuButtonFunctions", colModel: [ { name: "FunctionId", hidden: true }, { label: "系统代码", name: "AppCode", width: 80, fixed: true }, { label: "区域", name: "Area", width: 80, fixed: true }, { label: "控制器", name: "Controller", width: 100, fixed: true }, { label: "名称", name: "Action", width: 150, fixed: true }, { label: "界面", name: "IsPage", width: 40, align: "center", fixed: true, formatter: "YesOrNo" }, { label: "备注", name: "Description", width: 250, fixed: true } ], postData: { id: UtilGetUrlParam("menubuttonId") }, height: $("#uiCenter").height() - 51 }); } //获取表格数据 function getGridData() { UtilAjaxPost("/System/MenuButton/GetMenuButtonFunctions", { id: UtilGetUrlParam("menubuttonId") }, function (data) { GridReloadLoadOnceData($grid, data); }); } //操作:新增 function add() { ArtDialogOpen("/System/MenuButton/ChosenFunctions?id=" + UtilGetUrlParam("menubuttonId"), "选择关联模块按钮-" + UtilGetUrlParam("title"), true, 450, 830); } //删除匹配项 function del() { //查看是否选中 GridIsSelect($grid, function () { ArtDialogConfirm(Language.common.deletemsg, function () { UtilAjaxPostWait( "/System/MenuButton/DeleteMenuButtonFunction", { functionId: GridGetSingSelectData($grid).FunctionId, menuButtonId: UtilGetUrlParam("menubuttonId") }, perateStatus ); }); }); } //请求完成 function perateStatus(data) { DialogAjaxResult(data); if (data.ResultSign === 0) { getGridData(); } }
28.032609
150
0.523071
9699a6abf255ba323b0831444ac0cd80dddc209c
6,255
js
JavaScript
modules/cms/media/js/viewModels/Content/edit.js
ellenbrook/morningpages
848aa445d65f53c2262a5c6866ada0ef34fa815d
[ "BSD-3-Clause" ]
23
2015-02-04T21:16:44.000Z
2021-08-20T15:20:37.000Z
modules/cms/media/js/viewModels/Content/edit.js
ellenbrook/morningpages
848aa445d65f53c2262a5c6866ada0ef34fa815d
[ "BSD-3-Clause" ]
14
2015-01-04T06:53:46.000Z
2018-04-06T16:59:57.000Z
modules/cms/media/js/viewModels/Content/edit.js
ellenbrook/morningpages
848aa445d65f53c2262a5c6866ada0ef34fa815d
[ "BSD-3-Clause" ]
9
2015-12-09T23:28:58.000Z
2018-10-30T12:45:39.000Z
define([ 'knockout', 'jquery', 'tinymce', 'site', 'models/Content/block', 'models/Content/blocktype', 'models/Tags/tag', 'models/Files/file', 'models/Content/splittest' ], function(ko, $, tinymce, site, block, blocktype, tag, file, splittest){ return function(data){ var self = this; self.id = self.id = $('#contentcontrols').data('id'); self.contenttypeid = $('#contentcontrols').data('contenttypeid'); self.blocks = ko.observableArray(); self.thumbnail = ko.observable(false); self.tags = ko.observableArray(); self.alltags = data.alltags; self.root = true; self.blocktypes = ko.observableArray(); self.loading = ko.observable(true); self.splittests = ko.observableArray(); self.availableBlocktypes = ko.observableArray(); $.post(site.ajaxurl+'content/info',{id:self.id},function(reply){ if(reply.success) { for(var i=0;i<reply.blocks.length;i++) { self.blocks.push(new block(reply.blocks[i])); } for(var i=0;i<reply.blocktypes.length;i++) { self.blocktypes.push(new blocktype(reply.blocktypes[i])); } for(var i=0;i<reply.tags.length;i++) { self.tags.push(new tag(reply.tags[i])); } for(var i=0;i<reply.splittests.length;i++) { self.splittests.push(reply.splittests[i]); } if(reply.thumbnail) { self.thumbnail(new file(reply.thumbnail)); } self.updateAvailableBlocktypes(); self.loading(false); } else { site.tellUser(reply); } }, 'json'); self.updateAvailableBlocktypes = function(){ self.availableBlocktypes.removeAll(); ko.utils.arrayForEach(self.blocktypes(),function(blocktype){ if(blocktype.max() == 0) { self.availableBlocktypes.push(blocktype); } var existing = []; ko.utils.arrayForEach(self.blocks(),function(block){ if(blocktype.id == block.blocktype.id) { existing.push(block); } }); if(existing.length<blocktype.max()) { self.availableBlocktypes.push(blocktype); } }); }; self.createSplittest = function(unk, ev){ $.post(site.ajaxurl+'splittest/create',{parent:self.id, title:$('#new-splittest-title').val()},function(reply){ if(reply.success) { self.splittests.push(reply.splittest); } site.tellUser(reply); },'json'); }; self.copyContent = function(unk,ev){ if(confirm('Are you sure you want to clone this content?')) { $(ev.target).attr('disabled','disabled'); $.post(site.ajaxurl+'content/copy',{id:self.id},function(reply){ if(reply.success) { window.location.hash = '/content/edit/'+reply.id; } else { $(ev.target).removeAttr('disabled'); } site.tellUser(reply); }, 'json'); } }; self.removeBlock = function(block, ev) { if(confirm('Are you sure you want to delete this block?')) { $.post(site.ajaxurl+'blocks/delete', { 'block_id' : block.id }, function(reply) { if (reply.success) { self.blocks.remove(block); self.updateAvailableBlocktypes(); } else { site.tellUser(reply); } }, 'json'); } return false; }; self.sortRootBlocks = function(e, iu){ var i = 0; var blocks = {}; $('#contentblocks').find('> .block').each(function(){ var block = ko.dataFor(this); block.order = i; blocks[block.id] = i; i++; }); $.post(site.ajaxurl + '/blocks/setorder', blocks); }; self.addTag = function(selected) { if(typeof selected == 'object') { tagtext = selected.title; } else { tagtext = selected; } $.post(site.ajaxurl+'content/addtag',{id:self.id,tag:tagtext},function(reply){ if(reply.success) { self.tags.push(new tag(reply.tag)); } else { site.tellUser(reply); } }, 'json'); }; self.removeTag = function(elem){ self.tags.remove(elem); $.post(site.ajaxurl+'content/removetag',{id:self.id,tag:elem.id},function(reply){ if(!reply.success) { site.tellUser(reply); self.tags.push(new tag(elem)); } },'json'); return false; }; self.selectthumbnail = function(files){ if(files.length > 0) { var file = files[0]; self.thumbnail(file); } }; self.clearthumbnail = function(){ self.thumbnail(false); }; self.trash = function(){ $.post(site.ajaxurl+'content/delete', {'delete':self.id}, function(reply){ site.tellUser(reply); if(reply.success) { site.redirect('/content/index/'+self.contenttypeid); } }, 'json'); }; self.addBlock = function(context, elem){ if ($(elem.target).prev('.blocktypes').val() != 0) { var $me = $(elem.target); var root = $me.parent().hasClass('complex'); $.post(site.ajaxurl + '/blocks/add', { 'blocktype_id' : $me.prev('.blocktypes').val(), 'content_id' : self.id, 'parent' : (context.root?0:context.id) }, function(reply) { if (reply.success) { context.blocks.push(new block(reply.block)); self.updateAvailableBlocktypes(); /*var $view = $(reply.block.view); $('#contentblocks').append($view).find('.empty').remove(); site.scrollToElement($view); //var block = new block($view); var newblock = new block(reply.block, $view, self); self.blocks.push(newblock); ko.applyBindings(newblock, $view[0]);*/ // Hide the option if it's at the max available number of blocks /*var $blocktypes = $me.prev('.blocktypes'); var maxblocks = parseInt($blocktypes.find('option:selected').data('max')); if (maxblocks > 0) { var blocktypeid = $blocktypes.val(); var existingblocks = $('.block[data-blocktypeid="' + blocktypeid + '"]').length; var newblocks = existingblocks + 1; if (newblocks >= maxblocks) { $blocktypes.find('option:selected').hide(); $blocktypes.val(0); } }*/ } else { site.tellUser(reply); } }, 'json'); } return false; }; $('#content').off('click', '#content-delete-btn').on('click', '#content-delete-btn', function(){ if(confirm('Sikker?')) { self.trash(); } return false; }); }; });
24.433594
114
0.591047
969a560ee237f67ce6628825efc5d0c945082853
1,151
js
JavaScript
lib/sqs.js
holyshared/sqs
ebd4da8e987b945e46176904da8f149853da6e0b
[ "MIT" ]
null
null
null
lib/sqs.js
holyshared/sqs
ebd4da8e987b945e46176904da8f149853da6e0b
[ "MIT" ]
null
null
null
lib/sqs.js
holyshared/sqs
ebd4da8e987b945e46176904da8f149853da6e0b
[ "MIT" ]
null
null
null
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _awsSdk = require('aws-sdk'); var _awsSdk2 = _interopRequireDefault(_awsSdk); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var sqs = new _awsSdk2.default.SQS({ accessKeyId: process.env.AWS_ACCESS_KEY, secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY, region: process.env.AWS_REGION }); exports.default = sqs; //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9zcXMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7O0FBRUEsSUFBTSxNQUFNLElBQUksaUJBQUksR0FBSixDQUFRO0FBQ3RCLGVBQWEsUUFBUSxHQUFSLENBQVksY0FBWjtBQUNiLG1CQUFpQixRQUFRLEdBQVIsQ0FBWSxxQkFBWjtBQUNqQixVQUFRLFFBQVEsR0FBUixDQUFZLFVBQVo7Q0FIRSxDQUFOOztrQkFNUyIsImZpbGUiOiJzcXMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgQVdTIGZyb20gJ2F3cy1zZGsnO1xuXG5jb25zdCBzcXMgPSBuZXcgQVdTLlNRUyh7XG4gIGFjY2Vzc0tleUlkOiBwcm9jZXNzLmVudi5BV1NfQUNDRVNTX0tFWSxcbiAgc2VjcmV0QWNjZXNzS2V5OiBwcm9jZXNzLmVudi5BV1NfU0VDUkVUX0FDQ0VTU19LRVksXG4gIHJlZ2lvbjogcHJvY2Vzcy5lbnYuQVdTX1JFR0lPTlxufSk7XG5cbmV4cG9ydCBkZWZhdWx0IHNxcztcbiJdfQ==
57.55
694
0.886186
969b5a8c1bb8335c2bb89b1b2f0237d187c458d2
4,113
js
JavaScript
src/kantanUpdate.js
tukiyo/KanTanMarkdown
9d8094c2dc50ca0980debc37f12fe591b6307836
[ "MIT" ]
124
2016-01-25T08:17:42.000Z
2022-02-06T13:23:05.000Z
src/kantanUpdate.js
tukiyo/KanTanMarkdown
9d8094c2dc50ca0980debc37f12fe591b6307836
[ "MIT" ]
88
2016-01-26T01:59:10.000Z
2016-07-08T19:44:31.000Z
src/kantanUpdate.js
tukiyo/KanTanMarkdown
9d8094c2dc50ca0980debc37f12fe591b6307836
[ "MIT" ]
31
2016-01-25T16:21:18.000Z
2021-05-16T09:05:42.000Z
kantanUpdate({ "newVersion": "<inline src="kantanVersion.txt" />", "ktmString": <inline src="ktmString.js" />, "doUpdate": function() { var kantanVersion = document.getElementById("kantanVersion").value; if (kantanVersion == this.newVersion) { var confirm = window.confirm("お使いのKantanMarkdownは最新です。それでも強制的にアップデートを実行しますか?"); if (confirm == false) { return; } } showImportDialog( "アップデートを適用できます。\n" + "\n" + "現在ご利用のバージョン:\t" + kantanVersion + "\n" + "新しいバージョン   :\t" + this.newVersion + "\n" + "\n" + "新バージョンに引き継ぐ項目を選んでください。", (function (parent) { return function(result) { if (result.result == true) { parent.rewirteHtml(result); } } })(this)); }, "rewirteHtml":function(dialogResult) { // アップデート前の値を記憶しておく var originalFileList = []; var attachFile = document.querySelectorAll("#fileList li"); for (var i = 0; i < attachFile.length; i++) { var base64Element = attachFile[i].querySelector("script"); var layerContentElement = attachFile[i].querySelector("script.layerContent"); var trimInfoElement = attachFile[i].querySelector("script.trimInfo"); var o var fileName = base64Element.title; var base64 = base64Element.innerHTML; var layerContent = (layerContentElement) ? layerContentElement.innerHTML : ""; var trimInfo = (trimInfoElement) ? trimInfoElement.innerHTML : ""; originalFileList.push({ fileName:fileName, base64:base64, layerContent:layerContent, trimInfo:trimInfo, }); } var originalMarkdown = document.querySelector("#editor").value; var originalCss = document.querySelector("#cssEditor").value; // エディションを読み込み var kantanEdition = document.querySelector("#kantanEdition").value; // メモリリーク対策のためにイベントをすべて消す。 removeAllEvents(); // liteエディションではhljsのcssを消す var newHtml = this.ktmString; if (kantanEdition == "lite") { newHtml = newHtml.replace(/\/\* START_HLJS_CSS \*\/[\s|\S]+\/\* END_HLJS_CSS \*\//, ""); } // 本体をアップデート var html = document.querySelector("html"); html.innerHTML = newHtml; // バージョン・エディション更新 updateKantanVersion(this.newVersion); updateKantanEdition(kantanEdition); // innerHTMLではscriptタグが実行されないのでいったん外して付け直す var scriptElements = document.querySelectorAll("script"); for (var i = 0; i < scriptElements.length; i++) { var scriptElement = scriptElements[i]; var parentNode = scriptElement.parentNode; parentNode.removeChild(scriptElement); } for (var i = 0; i < scriptElements.length; i++) { var scriptElement = scriptElements[i]; if (kantanEdition == "lite" && ( (scriptElement.id == "highlightJs") || (scriptElement.id == "raphaelJs") || (scriptElement.id == "underscoreJs") || (scriptElement.id == "jsSequenceDiagramsJs") || (scriptElement.id == "flowchartJs") )) { continue; } else if (kantanEdition == "std" && ( (scriptElement.id == "raphaelJs") || (scriptElement.id == "underscoreJs") || (scriptElement.id == "jsSequenceDiagramsJs") || (scriptElement.id == "flowchartJs") )) { continue; } var newScript = document.createElement("script"); newScript.id = scriptElement.id; newScript.innerHTML = scriptElement.innerHTML; document.querySelector("body").appendChild(newScript); } // 添付ファイル引継ぎ if (dialogResult.attach == true) { for (var i = 0; i < originalFileList.length; i++) { var originalFile = originalFileList[i]; addAttachFileElement( originalFile.fileName, originalFile.base64, originalFile.layerContent, originalFile.trimInfo, false); } saved = false; } // Markdown引継ぎ if (dialogResult.markdown == true) { var editor = document.querySelector("#editor"); editor.value = originalMarkdown; saved = false; } // CSS引継ぎ if ((dialogResult.css == true) && originalCss) { var cssEditor = document.querySelector("#cssEditor"); cssEditor.value = originalCss; saved = false; } // 念のため古いエレメントを削除しておく fileListElement = null; // プレビュー doPreview(); alert("アップデートが完了しました。"); }, });
29.589928
91
0.659859
969ca97cf992c0a792d7ba5a428e981176d27677
448
js
JavaScript
lib/nunjucks/default_settings.js
scautank/knc-render
8b5623bf9d5547fa2a9fb39f105f3330076a1431
[ "MIT" ]
null
null
null
lib/nunjucks/default_settings.js
scautank/knc-render
8b5623bf9d5547fa2a9fb39f105f3330076a1431
[ "MIT" ]
null
null
null
lib/nunjucks/default_settings.js
scautank/knc-render
8b5623bf9d5547fa2a9fb39f105f3330076a1431
[ "MIT" ]
null
null
null
'use strict'; module.exports = { // 模板后缀名 ext: 'html', // 模板路径 path: '', // 组件路径 componentPath: '', // 组件默认模板 componentDefaultTmpl: 'index', // 静态资源路径 staticURL: '/', // 静态资源是否开启combo staticCombo: false, // 静态资源表 staticMap: {}, // nunjucks模板过滤器 filter: {}, // 数据过滤 dataFilter: function(data) { return data; }, // nunjucks配置 nunjucksConfig: {} };
12.444444
34
0.506696
969dc2c3bcc425f565e91af306794c988c001ddf
1,354
js
JavaScript
src/routes/Dashboard/modules/api.js
ZeusTheTrueGod/WindsurfingNetwork-client
4fd380b9722078d462fd74eba75bb3d9724285ef
[ "MIT" ]
2
2019-11-06T08:39:22.000Z
2021-01-06T20:16:16.000Z
src/routes/Dashboard/modules/api.js
AndreyKozlov1984/WindsurfingNetwork-client
4fd380b9722078d462fd74eba75bb3d9724285ef
[ "MIT" ]
3
2017-05-11T07:12:44.000Z
2017-05-11T07:15:13.000Z
src/routes/Dashboard/modules/api.js
AndreyKozlov1984/WindsurfingNetwork-client
4fd380b9722078d462fd74eba75bb3d9724285ef
[ "MIT" ]
null
null
null
// @flow import fetch from 'isomorphic-fetch'; import validate from '~/utils/validator'; import { type Spot, type DashboardData, type LookupData, type Filters } from './dashboard'; export async function getDashboardContent (filters: Filters): Promise<DashboardData> { const response = await fetch('/api/dashboard', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify(filters), }); const result = await response.json(); (validate(__filename, __line, result): DashboardData); return result; } export async function getSpotsPage ({ filters, startIndex, stopIndex, }: { filters: Filters, startIndex: number, stopIndex: number, }): Promise<Spot[]> { const response = await fetch('/api/dashboard/spots/page', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ filters, offset: Math.max(startIndex, 0), limit: stopIndex - startIndex + 1, }), }); const result = await response.json(); (validate(__filename, __line, result): Spot[]); return result; } export async function getLookupData (): Promise<LookupData> { const response = await fetch('/api/dashboard/init', {}); const result = await response.json(); (validate(__filename, __line, result): LookupData); return result; }
27.08
91
0.669867
969de575803975a83bda8a89ce7241cce0fa1c31
726
js
JavaScript
packages/fether-electron/src/main/app/constants/index.js
openvapory/fether
32a836b4630ea07b8d33679170ade5880b0304e7
[ "BSD-3-Clause" ]
109
2018-07-04T14:40:42.000Z
2020-02-09T09:39:37.000Z
packages/fether-electron/src/main/app/constants/index.js
openvapory/fether
32a836b4630ea07b8d33679170ade5880b0304e7
[ "BSD-3-Clause" ]
360
2018-07-03T08:48:24.000Z
2020-02-20T22:08:41.000Z
packages/fether-electron/src/main/app/constants/index.js
parity-js/fether
7d82baa2f9ffa29521da5bad39e5a7d59e799c02
[ "BSD-3-Clause" ]
30
2018-07-04T14:40:46.000Z
2020-01-09T12:02:52.000Z
// Copyright 2015-2019 Parity Technologies (UK) Ltd. // This file is part of Parity. // // SPDX-License-Identifier: BSD-3-Clause import { IS_PACKAGED } from '../utils/paths'; const IS_PROD = process.env.NODE_ENV === 'production'; /** * Security. Additional network security is configured after `cli` is available: * in fether-electron/src/main/app/options/config/index.js * * Note: 127.0.0.1 is a trusted loopback and more trustworthy than localhost. * See https://letsencrypt.org/docs/certificates-for-localhost/ */ const DEFAULT_CHAIN = 'foundation'; const DEFAULT_WS_PORT = '8546'; const TRUSTED_LOOPBACK = '127.0.0.1'; export { DEFAULT_CHAIN, DEFAULT_WS_PORT, IS_PACKAGED, IS_PROD, TRUSTED_LOOPBACK };
25.928571
80
0.730028
969eff5f956c5f1b2678cdfc9bca1159be3e876f
6,135
js
JavaScript
levels/toys.js
Osthekake/LD33
ca41077b6243e4699314ebc199d991c9307b6788
[ "Apache-2.0" ]
null
null
null
levels/toys.js
Osthekake/LD33
ca41077b6243e4699314ebc199d991c9307b6788
[ "Apache-2.0" ]
null
null
null
levels/toys.js
Osthekake/LD33
ca41077b6243e4699314ebc199d991c9307b6788
[ "Apache-2.0" ]
null
null
null
sceneData["toys_1"] = [ { application: loadingFunctions.picture, path: "toys.jpg" },{ application: loadingFunctions.text, text: "I remember when I was very young I had an actual Tracy Island." },{ application: loadingFunctions.text, text: "I used to play with it for hours." },{ application: loadingFunctions.choices, choices: [ { text: "Lady Penelope was my favourite", goal: "toys_1_outro" }, { text: "Brains was my favourite", goal: "toys_1_outro" }, { text: "Alan Tracy was my favourite", goal: "toys_1_outro" } ] } ]; sceneData["toys_1_outro"] = [ { application: loadingFunctions.text, text: "Most of the games I made up with them had International Rescue save all my other toys from whatever disaster befell them." },{ application: loadingFunctions.text, text: "I didn’t like my toys being the bad guys so I stole toys from my brother to be the villains." },{ application: loadingFunctions.choices, choices: [ { text: "I used to love those games, why did I ever stop playing?", goal: "helmet_2" } ] } ]; sceneData["toys_2"] = [ { application: loadingFunctions.text, text: "I remember when I was very young I had an actual Tracy Island. I used to play with it for hours." },{ application: loadingFunctions.picture, path: "next.png" },{ application: loadingFunctions.choices, choices: [ { text: "Lady Penelope was my favourite", goal: "toys_2_1" }, { text: "Brains was my favourite", goal: "toys_2_1" }, { text: "Alan Tracy was my favourite", goal: "toys_2_1" } ] } ]; sceneData["toys_2_1"] = [ { application: loadingFunctions.text, text: "Most of the games I made up with them had the Thunderbirds rescue all my other toys from whatever disaster befell them." },{ application: loadingFunctions.text, text: "I didn’t like my toys being the bad guys so I stole toys from my brother to be the monsters." },{ application: loadingFunctions.text, text: "They would chase the Tracys around the island and my bedroom. Once they chased the toys out of the window." },{ application: loadingFunctions.choices, choices: [ { text: "I got in trouble for throwing my brother's toys out of the window", goal: "toys_2_2" },{ text: "I got in trouble for throwing my own toys out of the window", goal: "toys_2_3" },{ text: "I lost my favorite toys", goal: "toys_2_4" } ] } ]; sceneData["toys_2_2"] = [ { application: loadingFunctions.text, text: "My brother was too old for them, but he still complained when he couldn’t find them." },{ application: loadingFunctions.choices, choices: [ { text: "I can't remember playing a different game all summer.", goal: "toys_2" } ] } ]; sceneData["toys_2_3"] = [ { application: loadingFunctions.text, text: "Digging the toys out the dirt was best part of that game." },{ application: loadingFunctions.choices, choices: [ { text: "It felt like I played those games for ever.", goal: "toys_2" } ] } ]; sceneData["toys_2_4"] = [ { application: loadingFunctions.text, text: "Eventually I lost or broke most of my toys that way." },{ application: loadingFunctions.choices, choices: [ { text: "I learned the hard way that everything breaks.", goal: "lifesupport_2" } ] } ]; sceneData["toys_3"] = [ { application: loadingFunctions.text, text: "I remember when I was very young I had an actual Tracy Island. I used to play with it for hours." },{ application: loadingFunctions.picture, path: "next.png" },{ application: loadingFunctions.choices, choices: [ { text: "Lady Penelope was my favourite. She was the most independent", goal: "toys_3_1" }, { text: "Brains was my favourite. He was the cleverest", goal: "toys_3_1" }, { text: "Alan Tracy was my favourite. He was the most adventurous", goal: "toys_3_1" } ] } ]; sceneData["toys_3_1"] = [ { application: loadingFunctions.text, text: "Most of the games I made up with them had the Thunderbirds rescue all my other toys from whatever tragedy had befallen them." },{ application: loadingFunctions.text, text: "I didn’t like my toys being the bad guys so I stole toys from my brother to be the monsters." },{ application: loadingFunctions.text, text: "They would chase the Tracys around the island and my bedroom, and usually out of the window." },{ application: loadingFunctions.choices, choices: [ { text: "I got in trouble for throwing my brother's toys out of the window", goal: "toys_3_2" }, { text: "I got in trouble for throwing my own toys out of the window", goal: "toys_3_3" }, { text: "I lost my favorite toys", goal: "toys_3_4" } ] } ]; sceneData["toys_3_2"] = [ { application: loadingFunctions.text, text: "My brother was too old for them, but he still complained when he couldn’t find them." },{ application: loadingFunctions.choices, choices: [ { text: "I can't remember playing a different game all summer.", goal: "toys_3" } ] } ]; sceneData["toys_3_3"] = [ { application: loadingFunctions.text, text: "Digging the toys out the dirt was best part of that game." },{ application: loadingFunctions.choices, choices: [ { text: "It felt like I played those games for ever.", goal: "toys_3" } ] } ]; sceneData["toys_3_4"] = [ { application: loadingFunctions.text, text: "I remember one day coming home from school and seeing all the toys half covered in dirt, and thinking that they were just toys." },{ application: loadingFunctions.text, text: "They weren’t heroes or villains or people to be recused anymore. I must have grown I suppose." },{ application: loadingFunctions.choices, choices: [ { text: "I just left them there in the dirt, lifeless, and walked away, shaking the soil from my hands.", goal: "lifesupport_3" } ] } ];
24.54
137
0.652812
96a0c8923bd330db56ce04f1dfaa5a0ab46bbd7f
2,502
js
JavaScript
packages/design-system-react/utilities/warning/url-exists.js
baozhoutao/steedos-platform
545322749e4f13309f71cc141b16e61c34f8ee7c
[ "Apache-2.0" ]
null
null
null
packages/design-system-react/utilities/warning/url-exists.js
baozhoutao/steedos-platform
545322749e4f13309f71cc141b16e61c34f8ee7c
[ "Apache-2.0" ]
1
2021-10-20T01:26:43.000Z
2021-10-20T01:26:43.000Z
packages/design-system-react/utilities/warning/url-exists.js
baozhoutao/steedos-platform
545322749e4f13309f71cc141b16e61c34f8ee7c
[ "Apache-2.0" ]
null
null
null
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _warning = _interopRequireDefault(require("warning")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* Copyright (c) 2015-present, salesforce.com, inc. All rights reserved */ /* Licensed under BSD 3-Clause - see LICENSE.txt or git.io/sfdc-license */ /* eslint-disable import/no-mutable-exports */ /* global XMLHttpRequest, window */ // This function does an "AJAX" request to warn users on how to setup their icon path. var urlExists = function urlExistsFunction() {}; if (process.env.NODE_ENV !== 'production') { var hasWarned = {}; var hasExecuted; var warn = function warn(control, url, comment) { return function (res) { hasExecuted = true; if (res.status === 404) { var additionalComment = comment ? " ".concat(comment) : ''; /* eslint-disable max-len */ (0, _warning.default)(!url, "The icon asset was not found at ".concat(url, ". Make sure the path to the icon asset is correct. You can set the icon path by importing the IconSettings component, `<IconSettings iconPath=[/assets/icons]>` from `components/iconSettings`, and wrap that component around your entire app or around individual components using icons. If you are using the `<Icon>` component, you can also pass the url to `this.props.path`.").concat(additionalComment)); /* eslint-enable max-len */ hasWarned["".concat(control, "-path")] = !!url; } }; }; var shouldWarn = function shouldWarn(control) { return !hasExecuted && !hasWarned["".concat(control, "-path")] && typeof window !== 'undefined' && process.env.NODE_ENV !== 'test'; }; if (typeof fetch === 'function') { urlExists = function urlExistsFunction(control, url, comment) { if (shouldWarn(control)) { fetch(url).then(warn(control, url, comment)); } }; } else { // Using XMLHttpRequest can cause problems in non-browser environments. This should be completely removed in production environment and should not execute in a testing environment. urlExists = function urlExistsFunction(control, url, comment) { if (shouldWarn(control) && XMLHttpRequest) { var http = new XMLHttpRequest(); http.open('GET', url, false); http.send(); warn(control, url, comment)(http); } }; } } var _default = urlExists; exports.default = _default;
37.909091
486
0.669864
96a0dfc4587dbc2901044d13d6b4d89f2bf5fd89
4,828
js
JavaScript
app.js
DylanK46/TeamEnigma-ProjectEco-Webserver
642812710e8781a8b0fb742f901b02145eb30733
[ "MIT" ]
1
2021-04-25T10:21:33.000Z
2021-04-25T10:21:33.000Z
app.js
DylanK46/TeamEngima-EcoProject-Webserver
da7bf0bd88eedce3a82f68fda80b6353ccfcbb00
[ "MIT" ]
null
null
null
app.js
DylanK46/TeamEngima-EcoProject-Webserver
da7bf0bd88eedce3a82f68fda80b6353ccfcbb00
[ "MIT" ]
null
null
null
// App.js for Project Eco Webserver // Project Eco uses a MEVN stack, utilising : MongoDB, Express.js, Vue.js and Node.js (duh). // Project Eco Webserver also employs use of EJS, this allows for sever-side site compilation as opposed to Vue.js, which interfaces with the DOM client-side. // Yes, I know it's a lot to take in; This app.js should have plenty of comments to get you started. // SET PORT OF EXPRESS SERVER, DEFAULT 3095, but can be changed as system environment variable. var port = 3095 if (!((process.env['port'])==undefined)) { var port = process.env['port'] } // TRY DOTENV // Load environment variables from .env file, where API keys and passwords are configured. require('dotenv').config() // IMPORTS - firstly, we'll want to import these libraries. const express = require('express'); // Web Application Framework const http = require('http') // HTTP library for using the Web Application Framework const bodyParser = require("body-parser"); //body-parser for parsing form bodies into json const path = require('path'); // Standard good old node.js path library const fs = require('fs'); // Standard good old node.js filesystyem library const chalk = require('chalk'); // chalk lets our console.log()'s look beautiful in colour console.log(chalk.blue('SERVER > PACKAGES INSTALLED')) // EXPRESS APP //INITIALISATION const app = express(); //init express app const server = http.createServer(app); const { Server } = require("socket.io"); //init socket const io = new Server(server); // Socket.io for full-duplex client<->server side real time transmision console.log(chalk.blue('SERVER > SOCKET.IO INITIALISED')) // SHARE SOCKET function sortdata(value,location) { var inputboth = [] for (dataset in value) { inputboth.push({ "DATE":value[dataset].DATE, "LOCATION1":value[dataset][location] }) } // Sort array by date in ASCENDING order inputboth.sort(function (a, b) { if (Date.parse(a.x) < Date.parse(b.x)) { return -1; } if (Date.parse(a.x) > Date.parse(b.x)) { return 1; } return 0; }); return inputboth } const mongodbModel = require("./models/mongodb.js"); io.on('connection', function(socket) { setInterval(function() { var modelobject = mongodbModel.querysensordata(10,"LOCATION1") modelobject.exec(function(err, data) { if (err) return handleError(err); socket.emit('message', { data: sortdata(data,"LOCATION1")}) }) }, 3000); }); // EJS DECLARATION + USE BODYPARSER app.set('view engine', 'ejs'); app.use(bodyParser.urlencoded({extended:true})); // ROUTER POINTERS // for each file in views, initiate a router; Except for APIv1, Static, Index and 404. fs.readdir("./routes", (err, files) => { files.forEach(file => { file = file.substring(0, file.length - 3) if (!((file === 'apiv1') || (file === 'index'))) { app.use('/'+file, require('./routes/'+file+'.js')); console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+file+']')) } }); }); // Index, APIv1, Static and 404 have exceptions here app.use('/', require('./routes/index.js')); console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+'index'+']')) app.use('/api/v1', require('./routes/apiv1.js')); console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+'apiv1'+']')) app.use('/static', express.static(path.join(__dirname, 'views/static'))) console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+'static'+']')) app.use('/ai_static', express.static('./views/pages/ai/static')) console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+'ai_static'+']')) console.log(chalk.blue('SERVER > ROUTERS INITIALISED')) /* // ACCEPT 404 redirect app.use(function (req, res, next) { res.status(404) var HttpStatus = require('http-status-codes'); res.render('pages/error.ejs' ,{"pagename":"Error","errorcode":res.statusCode, "errorname": HttpStatus.getStatusText(res.statusCode)}); }) console.log(chalk.blue('SERVER > ROUTER INITIALISED '+'['+'404'+']')) */ module.exports = app;
39.57377
158
0.564209
96a2c04189c53c6054d80fedb1a22e11a01b62bd
1,044
js
JavaScript
user/drp.js
shivamrajput99/GIS
b8b6b1d385850aa16e949722cfd9b6b59f3d963b
[ "CC-BY-3.0" ]
null
null
null
user/drp.js
shivamrajput99/GIS
b8b6b1d385850aa16e949722cfd9b6b59f3d963b
[ "CC-BY-3.0" ]
null
null
null
user/drp.js
shivamrajput99/GIS
b8b6b1d385850aa16e949722cfd9b6b59f3d963b
[ "CC-BY-3.0" ]
null
null
null
// JavaScript Document function validateForm() { var listBoxSelection=document.forms["state"]["country"].value; if(listBoxSelection==0) { alert("Please select a country"); return false; } } function validateForm1() { var listBoxSelection=document.forms["city"]["country"].value; if(listBoxSelection==0) { alert("Please select a Country"); return false; } var listBoxSelection1=document.forms["city"]["state"].value; if(listBoxSelection1==0) { alert("Please select a state"); return false; } } function validateForm2() { var listBoxSelection=document.forms["area"]["country"].value; if(listBoxSelection==0) { alert("Please select a Country"); return false; } var listBoxSelection1=document.forms["area"]["state"].value; if(listBoxSelection1==0) { alert("Please select a state"); return false; } var listBoxSelection2=document.forms["area"]["city"].value; if(listBoxSelection2==0) { alert("Please select a city"); return false; } }
18.315789
63
0.661877
96a38b08625b23f4564914ef4f6f0e05d2181f96
93
js
JavaScript
TodoApp/helpers/data.js
wedeploy-examples/data-react-native-example
7fd5ac828ca7acae6f3f4c21ec45441ab4ce5bde
[ "BSD-3-Clause" ]
null
null
null
TodoApp/helpers/data.js
wedeploy-examples/data-react-native-example
7fd5ac828ca7acae6f3f4c21ec45441ab4ce5bde
[ "BSD-3-Clause" ]
1
2018-07-25T17:48:20.000Z
2018-07-25T17:48:20.000Z
TodoApp/helpers/data.js
wedeploy-examples/data-react-native-example
7fd5ac828ca7acae6f3f4c21ec45441ab4ce5bde
[ "BSD-3-Clause" ]
3
2018-03-29T14:23:51.000Z
2019-02-26T19:31:26.000Z
const DataHelper = { url: 'data-<project-name>.wedeploy.io' }; export default DataHelper;
15.5
40
0.709677
96a4351155602ed64674b8ec2e0528e1101236f0
1,116
js
JavaScript
src/components/profile.component.js
bmangeat/portfolio-backoffice
1d5f73a655497b9b4ee7e2ed5558068c4d38685c
[ "ISC", "Unlicense" ]
null
null
null
src/components/profile.component.js
bmangeat/portfolio-backoffice
1d5f73a655497b9b4ee7e2ed5558068c4d38685c
[ "ISC", "Unlicense" ]
2
2021-01-18T22:19:59.000Z
2021-01-19T09:39:17.000Z
src/components/profile.component.js
bmangeat/template-backoffice
1d5f73a655497b9b4ee7e2ed5558068c4d38685c
[ "ISC", "Unlicense" ]
null
null
null
import React, { useState } from "react" // Import services import AuthService from "../services/auth.service" const Profile = () => { const [ currentUser ] = useState( AuthService.getCurrentUser() ) return ( <div className="container"> <header className="jumbotron"> <h3> {currentUser.username} Profile </h3> </header> <p> <strong>Token : </strong> {currentUser.accessToken.substring( 0, 20 )} ... {" "} {currentUser.accessToken.substr( currentUser.accessToken.length - 20 )} </p> <p> <strong>ID : </strong> {currentUser.id} </p> <p> <strong>Email : </strong> {currentUser.email} </p> <strong>Authorities</strong> <ul> {currentUser.roles && currentUser.roles.map( ( role, index ) => <li key={index}>{role}</li> )} </ul> </div> ) } export default Profile
27.219512
88
0.46147
96a4a0c609748e261a339738309ceca35456fdba
1,173
js
JavaScript
src/tomagotchi.js
AndrewMMickel/tomagotchi
7aef6ee6dc4211b40640f35837a389b88f1b79f0
[ "Unlicense" ]
null
null
null
src/tomagotchi.js
AndrewMMickel/tomagotchi
7aef6ee6dc4211b40640f35837a389b88f1b79f0
[ "Unlicense" ]
null
null
null
src/tomagotchi.js
AndrewMMickel/tomagotchi
7aef6ee6dc4211b40640f35837a389b88f1b79f0
[ "Unlicense" ]
null
null
null
export class Tomagotchi { constructor(name) { this.name = name; this.foodLevel = 10; this.sleepLevel = 10; this.moodLevel = 0; } // Decrementing Methods for Stats // setHunger() { setInterval(() => { if (this.foodLevel > 0) { this.foodLevel--; this.isAngry(); } }, 1000); } gettingTired() { setInterval(() => { if (this.sleepLevel > 0) { this.sleepLevel--; this.isAngry(); } }, 10000); } isAngry() { if (this.sleepLevel <= 0 || this.foodLevel <= 0) { this.moodLevel++; if (this.moodLevel >= 20) { return "you die"; } } } feed() { return (this.foodLevel += 10); } sleep() { return (this.sleepLevel += 10); } mood() { return (this.moodLevel -= 10); } isAngry() { if (this.sleepLevel <= 0 || this.foodLevel <= 0) { this.moodLevel++; if (this.moodLevel >= 20) { return "you die"; } } } }
20.224138
58
0.418585
96a4c2c1c6a6331ea2e33ecbfb1777f5d4761ab7
4,946
js
JavaScript
public/js/scripts.js
Chung15/Archives
e9261163b44ee744169905b1ddf10a6e31a23fe8
[ "MIT" ]
null
null
null
public/js/scripts.js
Chung15/Archives
e9261163b44ee744169905b1ddf10a6e31a23fe8
[ "MIT" ]
null
null
null
public/js/scripts.js
Chung15/Archives
e9261163b44ee744169905b1ddf10a6e31a23fe8
[ "MIT" ]
null
null
null
$(document).ready(function() { /** * show different date formats */ $( ".date" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "dd/mm/yy" }); $( ".year" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "yy" }); $( "#month" ).datepicker({ changeMonth: true, changeYear: true, dateFormat: "mm/yy" }); /** * we can implement a function for this: otherField(). * * @param \Illuminate\Http\Request * @return */ $('select[name=leave_type]').change(function() { if($(this).val() === 'other') { $('.otherField').removeClass('hidden'); } else{ $('.otherField').addClass('hidden'); } }); //edit user password; $('#updatePassword').on('click', function () { $('#myModal').focus(); }); $('#passport_number').click(function() { $('#passport_number').notify('добавьте серия и номер паспорта', 'info', {position: 'top'}); }); // uploaad img by click on camera icon $("#uploadImg").click(function() { $("input[type='file']").click(); }); // Show form form upload image $("input[type='file']").click(function(){ $('#imgUploadBtn').removeClass('hidden'); var img = $("input[type='file']").val(); }); $('.fa-times').hover(function (){ $('.fa-times').removeClass('hidden'), function() {$('.fa-times').addClass('hover')}, function(){$('.fa-times').removeClass('hover')}; }); // Add other field when other option selected $('select[name=diploma_type]').change(function() { if($(this).val() === 'other') { $('.otherDiploma').removeClass('hidden'); } else{ $('.otherDiploma').addClass('hidden'); } }); var gender = $('input[name=gender]:checked').val(); isChecked = function(){ if($("#terms").is(':checked')){ $('input[name=terms]:checked').val(); $("#terms").val("1"); console.log("CHECKED"); }else{ $("#terms").val('0'); } } }); // Validation for email and password function validateFields(){ var isValid = true, email = $("#email").val(), password = $("#password").val(), password_confirm = $("#password-confirm").val(), status = ['single', 'married', 'divorced','widow'], selected_status = $('input[name=maritalStatus]:selected').val(), lastname = $('#lastname').val(), terms = $('#terms').val(); console.log('isValid before = ',isValid); if (lastname === '' || email === '' || password === '' || password_confirm === '') { isValid = false; } if (isValid) { $('#reg_submit[type="submit"]').prop('disabled', false); } else { $('#reg_submit[type="submit"]').prop('disabled', true); } console.log('isValid after= ',isValid); } isInArray = function (itemList, item){ var found = true; for (i=0; i<itemList.length; i++) { if(item === itemList[i]) { found = true; break; }else { found = false; } } return found; } /*-----------------------------------------Further implementation------------------------------------------------------------------------------*/ var counter = 0; /** * add a new input field on click on the button +. * */ function addInputField() { console.log('i am there'); var button_id ="removebtn"+counter; console.log('Button ID = ', button_id); var re = /(\d$)/g; var id = button_id.match(re); var input ='<br id="author_br"/> <div class="row author_data'+counter+'">'+ '<div class="col-md-10">'+ '<div class = "form-group control-panel">'+ '<input type="text" name = "authors[]" class = "form-control" id="author-name'+counter+'"/>'+ '</div>'+ '</div>'+ '<div class="col-md-2">'+ '<button type="button" class="btn btn-primary fa fa-minus-circle pull-right removebtn" id="'+button_id+'" onclick="removeInputField(this)"> </button>'+ '</div>'+ '</div>'; if(counter <= 0){ $(input).insertAfter('.author_data'); }else{ $(input).insertAfter('.author_data'+(counter - 1)); } counter++; } /** * remove field on click on btn - . * */ function removeInputField(element) { var button_id = $(element).attr("id"); var re = /(\d$)/g; var id = parseInt(button_id.match(re)); $('.author_data'+id).remove(); $('#author_br').remove(); counter--; } // hide and show edit view on click on editbtn.using the same view function editUserProfile() { var editBtn = $('#editProfile'), contentView = $('#userProfileInfo'), editView = $('#userProfileEdit'); editBtn.clik( function() { contentView.addClass('hidden'); editView.removeClass('hidden'); }); } /*----------------------------------------------------------------------------------------------------------------------------------------------*/
23.89372
181
0.520218
96a54769d586792bed26bfdc09462b542d8aa01b
3,255
js
JavaScript
utils/vs-restify.js
vishyan/vs-restify
0809892e2d7f797937d7fc08b2fd5008d9192edc
[ "MIT" ]
null
null
null
utils/vs-restify.js
vishyan/vs-restify
0809892e2d7f797937d7fc08b2fd5008d9192edc
[ "MIT" ]
null
null
null
utils/vs-restify.js
vishyan/vs-restify
0809892e2d7f797937d7fc08b2fd5008d9192edc
[ "MIT" ]
null
null
null
"use strict"; var restify = require('restify'), path = require('path'), util = require('util'), AquaJsRestClient = require('../clients/aquajs_client'); function createAquaJsRestClient(options) { if (typeof (options) === 'string') { options = { url: options }; } var assert = require('assert-plus'); var bunyan = require('./bunyan_helper'); assert.object(options, 'options'); var aquajsRestClient; var opts = shallowCopy(options); opts.agent = options.agent; opts.name = opts.name || 'aquajs-restify'; opts.type = opts.type || 'application/octet-stream'; opts.log = opts.log || bunyan.createLogger(opts.name); aquajsRestClient = new AquaJsRestClient(opts); return (aquajsRestClient); } /** * Return a shallow copy of the given object; */ function shallowCopy(obj) { if (!obj) { return (obj); } var copy = {}; Object.keys(obj).forEach(function (k) { copy[k] = obj[k]; }); return (copy); } exports.get = function (job, getCallBack) { /* Create the Restify JsonClient with the Microservice host url */ var AquaJsclient = createAquaJsRestClient({ url: job.ms_url }); /* Invoke the GET operation on the Microservice client object to fetch the details */ AquaJsclient.get(job.options, function (err, req, res, obj) { if (err) { getCallBack(err, null); } else { getCallBack(null, obj); } }); }; exports.del = function(job, getCallBack) { /* Create the Restify JsonClient with the Microservice host url */ var AquaJsclient = createAquaJsRestClient({ url: job.ms_url }); /* Invoke the DELETE operation on the Microservice client object to fetch the details */ AquaJsclient.del(job.options, job.bodyParams, function (err, req, res, obj) { if (err) { getCallBack(err, null); } else { getCallBack(null, obj); } }); }; exports.post = function(job, getCallBack) { /* Create the Restify JsonClient with the Microservice host url */ var AquaJsclient = createAquaJsRestClient({ url: job.ms_url }); /* Invoke the GET operation on the Microservice client object to fetch the details */ AquaJsclient.post(job.options, job.bodyParams, function (err, req, res, obj) { if (err) { getCallBack(err, null); } else { getCallBack(null, obj); } }); }; exports.put = function(job, getCallBack) { /* Create the Restify JsonClient with the Microservice host url */ var AquaJsclient = createAquaJsRestClient({ url: job.ms_url }); /* Invoke the GET operation on the Microservice client object to fetch the details */ AquaJsclient.put(job.options, job.bodyParams, function (err, req, res, obj) { if (err) { getCallBack(err, null); } else { getCallBack(null, obj); } }); }; exports.patch = function(job, patchCallBack) { /* Create the Restify JsonClient with the Microservice host url */ var AquaJsclient = createAquaJsRestClient({ url: job.ms_url }); /* Invoke the patch operation on the Microservice client object to fetch the details */ AquaJsclient.patch(job.options, job.bodyParams, function (err, req, res, obj) { if (err) { getCallBack(err, null); } else { getCallBack(null, obj); } }); };
25.429688
90
0.655914
96a759d652ec40e325fcad7247c22dbc1161dd43
144,139
js
JavaScript
dist/preview release/inspector/babylon.inspector.bundle.js
atulyar/Babylon.js
101670cae4010636b64bfb1d2affa0a03c4009df
[ "Apache-2.0" ]
null
null
null
dist/preview release/inspector/babylon.inspector.bundle.js
atulyar/Babylon.js
101670cae4010636b64bfb1d2affa0a03c4009df
[ "Apache-2.0" ]
null
null
null
dist/preview release/inspector/babylon.inspector.bundle.js
atulyar/Babylon.js
101670cae4010636b64bfb1d2affa0a03c4009df
[ "Apache-2.0" ]
null
null
null
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs"),require("babylonjs-gui"),require("babylonjs-serializers"),require("babylonjs-loaders")):"function"==typeof define&&define.amd?define("babylonjs-inspector",["babylonjs","babylonjs-gui","babylonjs-serializers","babylonjs-loaders"],t):"object"==typeof exports?exports["babylonjs-inspector"]=t(require("babylonjs"),require("babylonjs-gui"),require("babylonjs-serializers"),require("babylonjs-loaders")):e.INSPECTOR=t(e.BABYLON,e.BABYLON.GUI,e.BABYLON,e.BABYLON)}(window,function(e,t,n,r){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=76)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(13),o=n(16),a=n(2),s=n(15),p=function(){function e(){}return e.GET_TYPE=function(e){if("boolean"==typeof e)return"boolean";if(null!=e&&void 0!=e){var t=r.Tools.GetClassName(e);return t&&"object"!==t||(t=e.constructor.name)||(t=this._GetFnName(e.constructor)),this._CheckIfTypeExists(t)?t:this._GetTypeFor(e)}return"type_not_defined"},e._CheckIfTypeExists=function(e){return!!s.PROPERTIES[e]},e.IsBrowserEdge=function(){return/Edge/.test(navigator.userAgent)},e.IsBrowserIE=function(){return/Trident.*rv\:11\./.test(navigator.userAgent)},e._GetTypeFor=function(e){for(var t in s.PROPERTIES){var n=s.PROPERTIES[t];if(n.type&&e instanceof n.type)return t}return"type_not_defined"},e._GetFnName=function(e){var t="function"==typeof e,n=t&&(e.name&&["",e.name]||e.toString().match(/function ([^\(]+)/));return t?n&&n[1]||"anonymous":"not a function"},e.SEND_EVENT=function(e){var t;a.Inspector.DOCUMENT.createEvent?(t=a.Inspector.DOCUMENT.createEvent("HTMLEvents")).initEvent(e,!0,!0):t=new Event(e),window.dispatchEvent(t)},e.Trunc=function(e){return"number"!=typeof e?0:Math.round(e)!==e?e.toFixed(2):e},e.CreateDiv=function(t,n){return void 0===t&&(t=null),e.CreateElement("div",t,n)},e.CreateInput=function(t,n){return e.CreateElement("input",t,n)},e.CreateElement=function(e,t,n){void 0===t&&(t=null);var r=a.Inspector.DOCUMENT.createElement(e);return t&&(r.className=t),n&&n.appendChild(r),r},e.CleanDiv=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.Css=function(t,n){var r=t.cloneNode(!0),i=e.CreateDiv("",a.Inspector.DOCUMENT.body);i.style.display="none",i.appendChild(r);var o=a.Inspector.WINDOW.getComputedStyle(r)[n];return i.parentNode&&i.parentNode.removeChild(i),o},e.LoadScript=function(){r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/highlight.min.js",function(t){e.CreateElement("script","",a.Inspector.DOCUMENT.body).textContent=t,r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/languages/glsl.min.js",function(t){e.CreateElement("script","",a.Inspector.DOCUMENT.body).textContent=t,r.Tools.LoadFile("https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.7.0/styles/zenburn.min.css",function(t){e.CreateElement("style","",a.Inspector.DOCUMENT.body).textContent=t})},void 0,void 0,void 0,function(){console.log('Error : LoadFile "glsl.min.js"')})},void 0,void 0,void 0,function(){console.log('Error : LoadFile "highlight.min.js"')})},e.IsSystemName=function(e){return null!=e&&(0===e.indexOf("###")&&e.lastIndexOf("###")===e.length-3)},e.GetAllLinesProperties=function(t){for(var n=[],r=0,a=e.GetAllLinesPropertiesAsString(t);r<a.length;r++){var s=a[r],p=new i.Property(s,t);n.push(new o.PropertyLine(p))}return n},e.GetAllLinesPropertiesAsString=function(e,t){void 0===t&&(t=[]);var n=[];for(var r in e)-1===t.indexOf(r)&&"_"!==r.substring(0,1)&&"function"!=typeof e[r]&&n.push(r);return n},e.Capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)},e}();t.Helpers=p},function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(11);n(74);var o=n(0),a=n(54),s=n(12),p=n(53),l=function(){function e(t,n,s,p,l){void 0===s&&(s=0),void 0===p&&(p=null);var c=this;if(this._popupMode=!1,i?a.loadGUIProperties():r.Tools.LoadScript("https://preview.babylonjs.com/gui/gui.js",function(){a.loadGUIProperties()},function(){console.warn('Error : loading "gui.js". Please add script https://preview.babylonjs.com/gui/gui.js to the HTML file.')}),this._initialTab=s,this._parentElement=p,this._scene=t,e.DOCUMENT=window.document,e.WINDOW=window,n)this.openPopup(!0);else{var u=this._scene.getEngine().getRenderingCanvas(),d=u.parentElement,h=e.WINDOW.getComputedStyle(u);if(this._canvasStyle={width:o.Helpers.Css(u,"width"),height:o.Helpers.Css(u,"height"),position:h.position,top:h.top,bottom:h.bottom,left:h.left,right:h.right,padding:h.padding,paddingBottom:h.paddingBottom,paddingLeft:h.paddingLeft,paddingTop:h.paddingTop,paddingRight:h.paddingRight,margin:h.margin,marginBottom:h.marginBottom,marginLeft:h.marginLeft,marginTop:h.marginTop,marginRight:h.marginRight},this._parentElement){this._c2diwrapper=o.Helpers.CreateDiv("insp-wrapper",this._parentElement),this._c2diwrapper.style.width="100%",this._c2diwrapper.style.height="100%",this._c2diwrapper.style.paddingLeft="5px",(w=o.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper)).style.width="100%",w.style.height="100%",this._buildInspector(w)}else{for(var _ in this._c2diwrapper=o.Helpers.CreateDiv("insp-wrapper"),this._canvasStyle)this._c2diwrapper.style[_]=this._canvasStyle[_];if(!h.width||!h.height||!h.left)return;var f=parseFloat(h.width.substr(0,h.width.length-2))||0,v=parseFloat(h.height.substr(0,h.height.length-2))||0;if("absolute"===h.position||"relative"===h.position){var b=parseFloat(h.left.substr(0,h.left.length-2))||0;f+b>=e.WINDOW.innerWidth&&(this._c2diwrapper.style.maxWidth=f-b+"px")}var y=this._getRelativeParent(u),m=f/y.clientWidth*100,g=v/y.clientHeight*100;this._c2diwrapper.style.width=m+"%",this._c2diwrapper.style.height=g+"%",u.style.position="static",u.style.width="100%",u.style.height="100%",u.style.paddingBottom="0",u.style.paddingLeft="0",u.style.paddingTop="0",u.style.paddingRight="0",u.style.margin="0",u.style.marginBottom="0",u.style.marginLeft="0",u.style.marginTop="0",u.style.marginRight="0",d&&d.replaceChild(this._c2diwrapper,u),this._c2diwrapper.appendChild(u);var w=o.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);this._parentElement||Split([u,w],{direction:"horizontal",sizes:[75,25],onDrag:function(){o.Helpers.SEND_EVENT("resize"),c._tabbar&&c._tabbar.updateWidth()}}),this._buildInspector(w)}o.Helpers.SEND_EVENT("resize"),this._tabbar.updateWidth()}if(this.refresh(),l)for(var x=l.backgroundColor||"#242424",C=l.backgroundColorLighter||"#2c2c2c",P=l.backgroundColorLighter2||"#383838",T=l.backgroundColorLighter3||"#454545",O=l.color||"#ccc",E=l.colorTop||"#f29766",j=l.colorBot||"#5db0d7",L=e.DOCUMENT.querySelectorAll("style"),D=0;D<L.length;D++){-1!=L[D].innerHTML.indexOf("insp-wrapper")&&(L[D].innerHTML=L[D].innerHTML.replace(/#242424/g,x).replace(/#2c2c2c/g,C).replace(/#383838/g,P).replace(/#454545/g,T).replace(/#ccc/g,O).replace(/#f29766/g,E).replace(/#5db0d7/g,j))}}return e.prototype._getRelativeParent=function(t,n){if(!t.parentElement)return t;var r=e.WINDOW.getComputedStyle(t);return n?"relative"===r.position||"absolute"===r.position?t:this._getRelativeParent(t.parentElement,!0):"static"==r.position?t.parentElement:this._getRelativeParent(t.parentElement,!0)},e.prototype._buildInspector=function(e){this._tabbar=new p.TabBar(this,this._initialTab),this._topPanel=o.Helpers.CreateDiv("top-panel",e),this._topPanel.appendChild(this._tabbar.toHtml()),this._tabbar.updateWidth(),this._tabPanel=o.Helpers.CreateDiv("tab-panel-content",this._topPanel)},Object.defineProperty(e.prototype,"scene",{get:function(){return this._scene},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"popupMode",{get:function(){return this._popupMode},enumerable:!0,configurable:!0}),e.prototype.filterItem=function(e){var t=this._tabbar.getActiveTab();t&&t.filter(e)},e.prototype.displayObjectDetails=function(e){this._tabbar.switchMeshTab(e)},e.prototype.refresh=function(){o.Helpers.CleanDiv(this._tabPanel);var e=this._tabbar.getActiveTab();e&&(e.update(),this._tabPanel.appendChild(e.getPanel()),o.Helpers.SEND_EVENT("resize"))},e.prototype.dispose=function(){if(!this._popupMode){var e=this._tabbar.getActiveTab();e&&e.dispose();var t=this._scene.getEngine().getRenderingCanvas();for(var n in this._canvasStyle)t.style[n]=this._canvasStyle[n];if(t.parentElement){var r=t.parentElement.parentElement;r&&(r.insertBefore(t,this._c2diwrapper),o.Helpers.CleanDiv(this._c2diwrapper),this._c2diwrapper.remove(),o.Helpers.SEND_EVENT("resize"))}}s.Scheduler.getInstance().dispose()},e.prototype.openPopup=function(t){var n=this,r=window.open("","js INSPECTOR","toolbar=no,resizable=yes,menubar=no,width=750,height=1000");if(r){r.document.title="js INSPECTOR";for(var i=e.DOCUMENT.querySelectorAll("style"),a=0;a<i.length;a++)r.document.body.appendChild(i[a].cloneNode(!0));for(var s=document.querySelectorAll("link"),p=0;p<s.length;p++){var l=r.document.createElement("link");l.rel="stylesheet",l.href=s[p].href,r.document.head.appendChild(l)}t||this.dispose(),this._popupMode=!0,e.DOCUMENT=r.document,e.WINDOW=r,this._c2diwrapper=o.Helpers.CreateDiv("insp-wrapper",r.document.body);var c=o.Helpers.CreateDiv("insp-right-panel",this._c2diwrapper);c.classList.add("popupmode"),this._buildInspector(c),this.refresh(),r.addEventListener("resize",function(){n._tabbar&&n._tabbar.updateWidth()})}else alert("Please update your browser to open the js inspector in an external view.")},e.prototype.getActiveTabIndex=function(){return this._tabbar.getActiveTabIndex()},e}();t.Inspector=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){function e(){this._div=r.Helpers.CreateDiv()}return e.prototype.toHtml=function(){return this._div},e.prototype._build=function(){},e.prototype.dispose=function(){},e}();t.BasicElement=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(18),a=n(1),s=n(2),p=n(0),l=function(e){function t(t,n){var r=e.call(this)||this;return r.children=[],r._tab=t,r._adapter=n,r._tools=r._adapter.getTools(),r._build(),r}return r(t,e),Object.defineProperty(t.prototype,"id",{get:function(){return this._adapter.id()},enumerable:!0,configurable:!0}),t.prototype.add=function(e){this.children.push(e),this.update()},Object.defineProperty(t.prototype,"adapter",{get:function(){return this._adapter},enumerable:!0,configurable:!0}),t.prototype.compareTo=function(e){var t=this.id,n=e.id;return t.localeCompare(n,[],{numeric:!0})},t.prototype.correspondsTo=function(e){return this._adapter.correspondsTo(e)},t.prototype.fold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="none"}this._div.classList.add("folded"),this._div.classList.remove("unfolded")}},t.prototype.unfold=function(){if(this.children.length>0){for(var e=0,t=this.children;e<t.length;e++){t[e].toHtml().style.display="block"}this._div.classList.add("unfolded"),this._div.classList.remove("folded")}},t.prototype._build=function(){var e=this._adapter.id();if(this._div.className="xline"==e||"yline"==e||"zline"==e?"line_invisible":"line",this.adapter instanceof o.MeshAdapter){var t=this.adapter.object;t instanceof a.TransformNode&&!(t instanceof a.AbstractMesh)&&(this._div.className+=" transformNode")}for(var n=0,r=this._tools;n<r.length;n++){var i=r[n];this._div.appendChild(i.toHtml())}var l=s.Inspector.DOCUMENT.createElement("span");l.textContent=this._adapter.id(),this._div.appendChild(l);var c=s.Inspector.DOCUMENT.createElement("span");c.className="property-type","type_not_defined"!==this._adapter.type()&&(c.textContent=" - "+this._adapter.type()),this._div.appendChild(c),this._lineContent=p.Helpers.CreateDiv("line-content",this._div),this._addEvent()},t.prototype.getDetails=function(){return this._adapter.getProperties()},t.prototype.update=function(){p.Helpers.CleanDiv(this._lineContent);for(var e=0,t=this.children;e<t.length;e++){var n=t[e].toHtml();this._lineContent.appendChild(n)}this.children.length>0&&(this._div.classList.contains("folded")||this._div.classList.contains("unfolded")||this._div.classList.add("folded")),this.fold()},t.prototype._addEvent=function(){var e=this;this._div.addEventListener("click",function(t){e._tab.select(e),e._isFolded()?e.unfold():e.fold(),t.stopPropagation()})},t.prototype._isFolded=function(){return!this._div.classList.contains("unfolded")},t.prototype.active=function(e){this._div.classList.remove("active");for(var t=0,n=this.children;t<n.length;t++){n[t].active(!1)}e&&this._div.classList.add("active")},t.prototype.getDiv=function(){return this._div},t}(i.BasicElement);t.TreeItem=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=function(){function e(e){this._obj=e}return e.prototype.correspondsTo=function(e){return e===this._obj},Object.defineProperty(e.prototype,"name",{get:function(){return e._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"object",{get:function(){return this._obj},enumerable:!0,configurable:!0}),e._name=r.Geometry.RandomId(),e}();t.Adapter=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(2),a=function(e){function t(t,n){var r=e.call(this)||this;return r._isActive=!1,r._tabbar=t,r.name=n,r._build(),r}return r(t,e),t.prototype.isActive=function(){return this._isActive},t.prototype._build=function(){var e=this;this._div.className="tab",this._div.textContent=this.name,this._div.addEventListener("click",function(t){e._tabbar.switchTab(e)})},t.prototype.active=function(e){e?this._div.classList.add("active"):this._div.classList.remove("active"),this._isActive=e},t.prototype.update=function(){},t.prototype.getPanel=function(){return this._panel},t.prototype.filter=function(e){},t.prototype.select=function(e){},t.prototype.getPixelWidth=function(){var e=o.Inspector.WINDOW.getComputedStyle(this._div);if(!e.marginLeft||!e.marginRight)return 0;var t=parseFloat(e.marginLeft.substr(0,e.marginLeft.length-2))||0,n=parseFloat(e.marginRight.substr(0,e.marginRight.length-2))||0;return(this._div.clientWidth||0)+t+n},t}(i.BasicElement);t.Tab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(14),o=n(17),a=n(0),s=function(e){function t(t,n,r){var s=e.call(this,t,n)||this;return s._treeItems=[],s._inspector=r,s._panel=a.Helpers.CreateDiv("tab-panel"),s._panel.classList.add("searchable"),s._searchBar=new o.SearchBar(s),s._panel.appendChild(s._searchBar.toHtml()),s._treePanel=a.Helpers.CreateDiv("insp-tree",s._panel),s._detailsPanel=new i.DetailPanel,s._panel.appendChild(s._detailsPanel.toHtml()),Split([s._treePanel,s._detailsPanel.toHtml()],{blockDrag:s._inspector.popupMode,direction:"vertical"}),s.update(),s}return r(t,e),t.prototype.dispose=function(){this._detailsPanel.dispose()},t.prototype.update=function(e){var t;e?t=e:(this._treeItems=this._getTree(),t=this._treeItems),a.Helpers.CleanDiv(this._treePanel),this._detailsPanel.clean(),t.sort(function(e,t){return e.compareTo(t)});for(var n=0,r=t;n<r.length;n++){var i=r[n];this._treePanel.appendChild(i.toHtml())}},t.prototype.displayDetails=function(e){this.activateNode(e),this._detailsPanel.details=e.getDetails()},t.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},t.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){n[t].active(!1)}e.active(!0)},t.prototype.getItemFor=function(e){for(var t=e,n=function(e,r){if(r.correspondsTo(e))return r;if(!(r.children.length>0))return null;for(var i=0,o=r.children;i<o.length;i++){var a=o[i],s=n(t,a);if(s)return s}return null},r=0,i=this._treeItems;r<i.length;r++){var o=i[r],a=n(t,o);if(a)return a}return null},t.prototype.filter=function(e){for(var t=[],n=0,r=this._treeItems;n<r.length;n++){var i=r[n];-1!=i.id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i);for(var o=0,a=i.children;o<a.length;o++){-1!=a[o].id.toLowerCase().indexOf(e.toLowerCase())&&t.push(i)}}this.update(t)},t}(n(6).Tab);t.PropertyTab=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=n(19),o=function(){function e(e,t,n,o,a){var s=this;this._inspector=o,this._elem=r.Inspector.DOCUMENT.createElement("i"),this._elem.className="tool "+e+" "+t,n.appendChild(this._elem),this._elem.addEventListener("click",function(e){s.action()}),new i.Tooltip(this._elem,a)}return e.prototype.toHtml=function(){return this._elem},e.prototype.getPixelWidth=function(){var e=r.Inspector.WINDOW.getComputedStyle(this._elem);if(!e.marginLeft||!e.marginRight)return 0;var t=parseFloat(e.marginLeft.substr(0,e.marginLeft.length-2))||0,n=parseFloat(e.marginRight.substr(0,e.marginRight.length-2))||0;return(this._elem.clientWidth||0)+t+n},e.prototype._updateIcon=function(e){this._elem.className="tool fa "+e},e}();t.AbstractTool=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2),i=function(){function e(){this._on=!1,this._elem=r.Inspector.DOCUMENT.createElement("i"),this._elem.className="treeTool fa",this._addEvents()}return e.prototype.toHtml=function(){return this._elem},e.prototype._addEvents=function(){var e=this;this._elem.addEventListener("click",function(t){e.action(),t.stopPropagation()})},e.prototype.action=function(){this._on=!this._on},e}();t.AbstractTreeTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-eye"),n._on=n._obj.isVisible(),n._check(!0),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(e){this._on?(this._elem.classList.add("fa-eye"),this._elem.classList.add("active"),this._elem.classList.remove("fa-eye-slash")):(this._elem.classList.remove("fa-eye"),this._elem.classList.remove("active"),this._elem.classList.add("fa-eye-slash")),e||this._obj.setVisible(this._on)},t}(n(9).AbstractTreeTool);t.Checkbox=i},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(){this.pause=!1,this._updatableProperties=[],this.interval=setInterval(this._update.bind(this),e.REFRESH_TIME)}return e.getInstance=function(){return e._instance||(e._instance=new e),e._instance},e.prototype.add=function(e){this._updatableProperties.push(e)},e.prototype.remove=function(e){var t=this._updatableProperties.indexOf(e);-1!=t&&this._updatableProperties.splice(t,1)},e.prototype._update=function(){if(!this.pause)for(var e=0,t=this._updatableProperties;e<t.length;e++){t[e].update()}},e.prototype.dispose=function(){window.clearInterval(this.interval)},e.REFRESH_TIME=250,e}();t.Scheduler=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1),i=n(0),o=function(){function e(e,t,n){this._property=e,this._obj=t,this._parentObj=n||null}return Object.defineProperty(e.prototype,"name",{get:function(){return this._property},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this._obj[this._property]},set:function(e){void 0!=e&&void 0!=this._obj[this._property]&&(this._obj instanceof r.Scene?this._obj.debugLayer.onPropertyChangedObservable.notifyObservers({object:this._obj,property:this._property,value:e,initialValue:this._obj[this._property]}):null!=this._parentObj?this._parentObj instanceof r.Scene?this._parentObj.debugLayer.onPropertyChangedObservable.notifyObservers({object:this._parentObj,property:this._property,value:e,initialValue:this._obj[this._property]}):this._parentObj.getScene().debugLayer.onPropertyChangedObservable.notifyObservers({object:this._parentObj,property:this._property,value:e,initialValue:this._obj[this._property]}):this._obj.getScene().debugLayer.onPropertyChangedObservable.notifyObservers({object:this._obj,property:this._property,value:e,initialValue:this._obj[this._property]})),this._obj[this._property]=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return i.Helpers.GET_TYPE(this.value)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"obj",{get:function(){return this._obj},set:function(e){this._obj=e},enumerable:!0,configurable:!0}),e}();t.Property=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(17),a=n(0),s=n(2),p=function(e){function t(t){var n=e.call(this)||this;return n._detailRows=[],n._sortDirection={},n._build(),t&&(n._detailRows=t,n.update()),n}return r(t,e),Object.defineProperty(t.prototype,"details",{set:function(e){this.clean(),this._addSearchBarDetails(),this._details=a.Helpers.CreateDiv("details",this._div),this._detailRows=e,this.update()},enumerable:!0,configurable:!0}),t.prototype._build=function(){this._div.className="insp-details",this._div.id="insp-details",this._createHeaderRow(),this._div.appendChild(this._headerRow)},t.prototype.update=function(e){this._sortDetails("name",1),e?(this.cleanRow(),this._addSearchDetails(e)):this._addDetails()},t.prototype._addSearchBarDetails=function(){var e=a.Helpers.CreateDiv("searchbar-details",this._div);this._searchDetails=new o.SearchBarDetails(this),e.appendChild(this._searchDetails.toHtml()),this._div.appendChild(e)},t.prototype.searchByName=function(e){for(var t=[],n=0,r=this._detailRows;n<r.length;n++){var i=r[n];i.name.indexOf(e)>=0&&t.push(i)}this.update(t)},t.prototype._addDetails=function(){for(var e=0,t=this._detailRows;e<t.length;e++){var n=t[e];this._details.appendChild(n.toHtml())}},t.prototype._addSearchDetails=function(e){for(var t=0,n=e;t<n.length;t++){var r=n[t];this._details.appendChild(r.toHtml())}},t.prototype._sortDetails=function(e,t){for(var n=s.Inspector.DOCUMENT.querySelectorAll(".sort-direction"),r=0;r<n.length;r++)n[r].classList.remove("fa-chevron-up"),n[r].classList.remove("fa-chevron-down");t||!this._sortDirection[e]?this._sortDirection[e]=t||1:this._sortDirection[e]*=-1;var i=this._sortDirection[e],o=this._headerRow.querySelector("#sort-direction-"+e);o&&(1==i?(o.classList.remove("fa-chevron-down"),o.classList.add("fa-chevron-up")):(o.classList.remove("fa-chevron-up"),o.classList.add("fa-chevron-down")));var a=function(e){return"string"==typeof e||e instanceof String};this._detailRows.forEach(function(e){e.closeDetails()}),this._detailRows.sort(function(t,n){var r=String(t[e]),o=String(n[e]);return a(r)||(r=t[e].toString()),a(o)||(o=n[e].toString()),r.localeCompare(o,[],{numeric:!0})*i})},t.prototype.clean=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}a.Helpers.CleanDiv(this._div),this._div.appendChild(this._headerRow)},t.prototype.cleanRow=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}a.Helpers.CleanDiv(this._details)},t.prototype.dispose=function(){for(var e=0,t=this._detailRows;e<t.length;e++){t[e].dispose()}},t.prototype._createHeaderRow=function(){var e=this;this._headerRow=a.Helpers.CreateDiv("header-row");var t=function(t,n){var r=a.Helpers.CreateDiv(n+" header-col"),i=s.Inspector.DOCUMENT.createElement("span");i.textContent=t.charAt(0).toUpperCase()+t.slice(1);var o=s.Inspector.DOCUMENT.createElement("i");return o.className="sort-direction fa",o.id="sort-direction-"+t,r.appendChild(i),r.appendChild(o),r.addEventListener("click",function(n){e._sortDetails(t),e._addDetails()}),r};this._headerRow.appendChild(t("name","prop-name")),this._headerRow.appendChild(t("value","prop-value"))},t}(i.BasicElement);t.DetailPanel=p},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=n(1);t.PROPERTIES={format:function(e){var n=r.Helpers.GET_TYPE(e)||"type_not_defined";return t.PROPERTIES[n]&&t.PROPERTIES[n].format?t.PROPERTIES[n].format(e):r.Helpers.GET_TYPE(e)},type_not_defined:{properties:new Array,format:function(){return""}},Vector2:{type:i.Vector2,format:function(e){return"x:"+r.Helpers.Trunc(e.x)+", y:"+r.Helpers.Trunc(e.y)}},Vector3:{type:i.Vector3,format:function(e){return"x:"+r.Helpers.Trunc(e.x)+", y:"+r.Helpers.Trunc(e.y)+", z:"+r.Helpers.Trunc(e.z)}},Color3:{type:i.Color3,format:function(e){return"R:"+e.r.toPrecision(2)+", G:"+e.g.toPrecision(2)+", B:"+e.b.toPrecision(2)},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Color4:{type:i.Color4,format:function(e){return"R:"+e.r+", G:"+e.g+", B:"+e.b},slider:{r:{min:0,max:1,step:.01},g:{min:0,max:1,step:.01},b:{min:0,max:1,step:.01}}},Quaternion:{type:i.Quaternion},Size:{type:i.Size,format:function(e){return"Size - w:"+r.Helpers.Trunc(e.width)+", h:"+r.Helpers.Trunc(e.height)}},Texture:{type:i.Texture,format:function(e){return e.name}},RenderTargetTexture:{type:i.RenderTargetTexture},DynamicTexture:{type:i.DynamicTexture},BaseTexture:{type:i.BaseTexture},CubeTexture:{type:i.CubeTexture},HDRCubeTexture:{type:i.HDRCubeTexture},Sound:{type:i.Sound},ArcRotateCamera:{type:i.ArcRotateCamera,slider:{alpha:{min:0,max:2*Math.PI,step:.01},beta:{min:-Math.PI,max:Math.PI,step:.01},fov:{min:0,max:180,step:1}}},FreeCamera:{type:i.FreeCamera,slider:{fov:{min:0,max:180,step:1}}},Scene:{type:i.Scene},TransformNode:{type:i.TransformNode,format:function(e){return e.name}},AbstractMesh:{type:i.AbstractMesh,format:function(e){return e.name}},Mesh:{type:i.Mesh,format:function(e){return e.name},slider:{visibility:{min:0,max:1,step:.1}}},StandardMaterial:{type:i.StandardMaterial,format:function(e){return e.name},slider:{alpha:{min:0,max:1,step:.01}}},PBRMaterial:{type:i.PBRMaterial,slider:{alpha:{min:0,max:1,step:.01}}},PhysicsImpostor:{type:i.PhysicsImpostor},ImageProcessingConfiguration:{type:i.ImageProcessingConfiguration},ColorCurves:{type:i.ColorCurves}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(57),i=n(20),o=n(56),a=n(55),s=n(0),p=n(15),l=n(12),c=n(13),u=function(){function e(){}return e.format=function(e,t){return e[t]},e}();t.PropertyFormatter=u;var d=function(){function e(e,t,n){void 0===t&&(t=null),void 0===n&&(n=0),this._children=[],this._elements=[],this._property=e,this._level=n,this._parent=t,this._div=s.Helpers.CreateDiv("row"),this._div.style.marginLeft=this._level+"px",s.Helpers.CreateDiv("prop-name",this._div).textContent=""+this.name,this._valueDiv=s.Helpers.CreateDiv("prop-value",this._div),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent=this._displayValueContent()||"-"),this._createElements();for(var r=0,i=this._elements;r<i.length;r++){var o=i[r];this._valueDiv.appendChild(o.toHtml())}this._updateValue(),"boolean"==typeof this.value?this._checkboxInput():this._isSliderType()?this._rangeInput():this._isSimple()?(this._initInput(),this._valueDiv.addEventListener("click",this._displayInputHandler),this._input.addEventListener("focusout",this._focusOutInputHandler),this._input.addEventListener("keydown",this._validateInputHandler),this._input.addEventListener("keydown",this._escapeInputHandler)):(this._valueDiv.classList.add("clickable"),this._valueDiv.addEventListener("click",this._addDetails.bind(this))),l.Scheduler.getInstance().add(this)}return e.prototype._initInput=function(){this._input=document.createElement("input"),this._input.setAttribute("type","text"),this._displayInputHandler=this._displayInput.bind(this),this._validateInputHandler=this._validateInput.bind(this),this._escapeInputHandler=this._escapeInput.bind(this),this._focusOutInputHandler=this.update.bind(this),this._onMouseDownHandler=this._onMouseDown.bind(this),this._onMouseDragHandler=this._onMouseDrag.bind(this),this._onMouseUpHandler=this._onMouseUp.bind(this)},e.prototype._validateInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),13==e.keyCode?this.validateInput(this._input.value):9==e.keyCode?(e.preventDefault(),this.validateInput(this._input.value)):27==e.keyCode&&this.update()},e.prototype.validateInput=function(e,t){void 0===t&&(t=!0),this.updateObject(),"number"==typeof this._property.value?this._property.value=parseFloat(e):this._property.value=e,t&&(this.update(),l.Scheduler.getInstance().pause=!1)},e.prototype._escapeInput=function(e){this._input.removeEventListener("focusout",this._focusOutInputHandler),27==e.keyCode&&this.update()},e.prototype._removeInputWithoutValidating=function(){s.Helpers.CleanDiv(this._valueDiv),"boolean"==typeof this.value||this._isSliderType()||(this._valueDiv.textContent="-");for(var e=0,t=this._elements;e<t.length;e++){var n=t[e];this._valueDiv.appendChild(n.toHtml())}"boolean"==typeof this.value||this._isSliderType()||this._valueDiv.addEventListener("click",this._displayInputHandler)},e.prototype._displayInput=function(e){this._valueDiv.removeEventListener("click",this._displayInputHandler);var t=this._valueDiv.textContent;this._valueDiv.textContent="",this._input.value=t||"",this._valueDiv.appendChild(this._input),this._input.focus(),"boolean"==typeof this.value||this._isSliderType()?"number"==typeof this.value&&this._input.addEventListener("mousedown",this._onMouseDownHandler):this._input.addEventListener("focusout",this._focusOutInputHandler),l.Scheduler.getInstance().pause=!0},e.prototype.updateObject=function(){return this._parent&&(this._property.obj=this._parent.updateObject()),this._property.value},Object.defineProperty(e.prototype,"name",{get:function(){return this._property.name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return u.format(this._property.obj,this._property.name)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"type",{get:function(){return this._property.type},enumerable:!0,configurable:!0}),e.prototype._createElements=function(){"Color3"!=this.type&&"Color4"!=this.type||s.Helpers.IsBrowserIE()||this._elements.push(new r.ColorPickerElement(this.value,this)),"Texture"==this.type&&this._elements.push(new a.TextureElement(this.value)),"HDRCubeTexture"==this.type&&this._elements.push(new o.HDRCubeTextureElement(this.value)),"CubeTexture"==this.type&&this._elements.push(new i.CubeTextureElement(this.value))},e.prototype._displayValueContent=function(){var e=this.value;return"number"==typeof e?s.Helpers.Trunc(e):"string"==typeof e||"boolean"==typeof e?e:p.PROPERTIES.format(e)},e.prototype.dispose=function(){l.Scheduler.getInstance().remove(this);for(var e=0,t=this._children;e<t.length;e++){var n=t[e];l.Scheduler.getInstance().remove(n)}for(var r=0,i=this._elements;r<i.length;r++){i[r].dispose()}this._elements=[]},e.prototype._updateValue=function(){if(this.updateObject(),"boolean"==typeof this.value)this._checkboxInput();else if(this._isSliderType())this._rangeInput();else if(this._valueDiv.childNodes[0].nodeValue=this._displayValueContent(),"Color3"==this._property.type&&5==this._children.length&&1==this._children[1].value||"Color4"==this._property.type&&6==this._children.length&&1==this._children[1].value){if(void 0!=this._children[0]&&"hex"==this._children[0].name){var e=this._children[0].value,t=parseInt(e.slice(1,3),16)*(1/255),n=Math.round(100*t)/100;this.value.r=n;var r=parseInt(e.slice(3,5),16)*(1/255),i=Math.round(100*r)/100;this.value.g=i;var o=parseInt(e.slice(5,7),16)*(1/255),a=Math.round(100*o)/100;if(this.value.b=a,"a"==this._children[2].name){var s=parseInt(e.slice(7,9),16)*(1/255),p=Math.round(100*s)/100;this.value.a=p}}}else if(("Color3"==this._property.type||"Color4"==this._property.type)&&void 0!=this._property.value.hex&&null!=this._property.value.hex){var l=[],c=(255*this._property.value.r|0).toString(16);l.push(c),"0"==c&&l.push("0");var u=(255*this._property.value.g|0).toString(16);l.push(u),"0"==u&&l.push("0");var d=(255*this._property.value.b|0).toString(16);if(l.push(d),"0"==d&&l.push("0"),void 0!=this._property.value.a){var h=(255*this._property.value.a|0).toString(16);l.push(h),"0"==h&&l.push("0")}l.unshift("#");e=l.join("");this._property.value.hex=e,l.length=0}for(var _=0,f=this._elements;_<f.length;_++){f[_].update(this.value)}},e.prototype.update=function(){this._removeInputWithoutValidating(),this._updateValue()},e.prototype._isSimple=function(){return null==this.value||"type_not_defined"===this.type||-1!=e._SIMPLE_TYPE.indexOf(this.type)},e.prototype.toHtml=function(){return this._div},e.prototype.closeDetails=function(){if(this._div.classList.contains("unfolded")&&(this._div.classList.remove("unfolded"),this._div.parentNode))for(var e=0,t=this._children;e<t.length;e++){var n=t[e];this._div.parentNode.removeChild(n.toHtml())}},e.prototype._addDetails=function(){if(this._div.classList.contains("unfolded")){if(this._div.classList.remove("unfolded"),this._div.parentNode)for(var t=0,n=this._children;t<n.length;t++){var r=n[t];this._div.parentNode.removeChild(r.toHtml())}}else{if(this._div.classList.toggle("unfolded"),0==this._children.length){var i=this.value,o=s.Helpers.GetAllLinesPropertiesAsString(i);0==(o.indexOf("r")&&o.indexOf("g")&&o.indexOf("b"))?o.sort():o.sort().reverse();for(var a=0,p=o;a<p.length;a++){var l=p[a];r=new e(new c.Property(l,this._property.value,this._property.obj),this,this._level+e._MARGIN_LEFT);this._children.push(r)}if(0==(o.indexOf("r")&&o.indexOf("g")&&o.indexOf("b")&&o.indexOf("a"))){var u=[],d=new c.Property("hexEnable",this._property.value,this._property.obj);d.value=!1;var h=new e(d,this,this._level+e._MARGIN_LEFT);this._children.unshift(h);for(var _=0,f=o;_<f.length;_++){l=f[_];var v=(255*new c.Property(l,this._property.value,this._property.obj).value|0).toString(16);u.push(v),"0"==v&&u.push("0")}u.push("#"),u.reverse();var b=u.join(""),y=new c.Property("hex",this._property.value,this._property.obj);y.value=b;var m=new e(y,this,this._level+e._MARGIN_LEFT);this._children.unshift(m)}}if(this._div.parentNode)for(var g=0,w=this._children;g<w.length;g++){r=w[g];this._div.parentNode.insertBefore(r.toHtml(),this._div.nextSibling)}}},e.prototype._onMouseDrag=function(e){var t=this._prevY-e.clientY;this._input.value=(this._preValue+t).toString()},e.prototype._onMouseUp=function(e){window.removeEventListener("mousemove",this._onMouseDragHandler),window.removeEventListener("mouseup",this._onMouseUpHandler),this._prevY=e.clientY},e.prototype._onMouseDown=function(e){this._prevY=e.clientY,this._preValue=this.value,window.addEventListener("mousemove",this._onMouseDragHandler),window.addEventListener("mouseup",this._onMouseUpHandler)},e.prototype._checkboxInput=function(){var e=this;this._valueDiv.childElementCount<1&&(this._input=s.Helpers.CreateInput("checkbox-element",this._valueDiv),this._input.type="checkbox",this._input.checked=this.value,this._input.addEventListener("change",function(){l.Scheduler.getInstance().pause=!0,e.validateInput(!e.value)}))},e.prototype._rangeInput=function(){this._valueDiv.childElementCount<1&&(this._input=s.Helpers.CreateInput("slider-element",this._valueDiv),this._input.type="range",this._input.style.display="inline-block",this._input.min=this._getSliderProperty().min,this._input.max=this._getSliderProperty().max,this._input.step=this._getSliderProperty().step,this._input.value=this.value,this._validateInputHandler=this._rangeHandler.bind(this),this._input.addEventListener("input",this._validateInputHandler),this._input.addEventListener("change",function(){l.Scheduler.getInstance().pause=!1}),this._textValue=s.Helpers.CreateDiv("value-text",this._valueDiv),this._textValue.innerText=s.Helpers.Trunc(this.value).toString(),this._textValue.style.paddingLeft="10px",this._textValue.style.display="inline-block")},e.prototype._rangeHandler=function(){l.Scheduler.getInstance().pause=!0,this._textValue.innerText=this._input.value,this.validateInput(this._input.value,!1)},e.prototype._isSliderType=function(){return this._property&&p.PROPERTIES.hasOwnProperty(this._property.obj.constructor.name)&&p.PROPERTIES[this._property.obj.constructor.name].hasOwnProperty("slider")&&p.PROPERTIES[this._property.obj.constructor.name].slider.hasOwnProperty(this.name)},e.prototype._getSliderProperty=function(){return p.PROPERTIES[this._property.obj.constructor.name].slider[this.name]},e._SIMPLE_TYPE=["number","string","boolean"],e._MARGIN_LEFT=15,e}();t.PropertyLine=d},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(2),o=n(3),a=function(e){function t(t){var n=e.call(this)||this;n._propTab=t,n._div.classList.add("searchbar");var r=i.Inspector.DOCUMENT.createElement("i");return r.className="fa fa-search",n._div.appendChild(r),n._inputElement=i.Inspector.DOCUMENT.createElement("input"),n._inputElement.placeholder="Filter by name...",n._div.appendChild(n._inputElement),n._inputElement.addEventListener("keyup",function(e){var t=n._inputElement.value;n._propTab.filter(t)}),n}return r(t,e),t.prototype.reset=function(){this._inputElement.value=""},t.prototype.update=function(){},t}(o.BasicElement);t.SearchBar=a;var s=function(e){function t(t){var n=e.call(this)||this;n._detailTab=t,n._div.classList.add("searchbar");var r=i.Inspector.DOCUMENT.createElement("i");return r.className="fa fa-search",n._div.appendChild(r),n._inputElement=i.Inspector.DOCUMENT.createElement("input"),n._inputElement.placeholder="Filter by name...",n._div.appendChild(n._inputElement),n._inputElement.addEventListener("keyup",function(e){var t=n._inputElement.value;n._detailTab.searchByName(t)}),n}return r(t,e),t.prototype.reset=function(){this._inputElement.value=""},t.prototype.update=function(){},t}(o.BasicElement);t.SearchBarDetails=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(43),s=n(10),p=n(42),l=n(41),c=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return o.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return o.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new s.Checkbox(this)),e.push(new p.DebugArea(this)),this._obj instanceof i.AbstractMesh&&this._obj.getTotalVertices()>0&&e.push(new a.BoundingBox(this)),e.push(new l.Info(this)),e},t.prototype.setVisible=function(e){this._obj.setEnabled(e),this._obj.isVisible=e},t.prototype.isVisible=function(){return this._obj.isEnabled()&&(void 0===this._obj.isVisible||this._obj.isVisible)},t.prototype.isBoxVisible=function(){return this._obj.showBoundingBox},t.prototype.setBoxVisible=function(e){return this._obj.showBoundingBox=e},t.prototype.debug=function(e){(this._axesViewer||this._drawAxis(),!e&&this._axesViewer)&&(this._obj.getScene().onBeforeRenderObservable.remove(this.onBeforeRenderObserver),this._axesViewer.dispose(),this._axesViewer=null)},t.prototype.getInfo=function(){return this._obj instanceof i.AbstractMesh?this._obj.getTotalVertices()+" vertices":"0 vertices"},t.prototype._drawAxis=function(){var e=this;this._obj.computeWorldMatrix();var t=new i.Vector3(1,0,0),n=new i.Vector3(0,1,0),r=new i.Vector3(0,0,1);this._axesViewer=new i.Debug.AxesViewer(this._obj.getScene());var o=this._obj;this.onBeforeRenderObserver=o.getScene().onBeforeRenderObservable.add(function(){var a=o.getWorldMatrix(),s=new i.Vector3(1,1,1);o instanceof i.AbstractMesh&&(s=o.getBoundingInfo().boundingBox.extendSizeWorld),e._axesViewer.scaleLines=2*Math.max(s.x,s.y,s.z),e._axesViewer.update(e._obj.position,i.Vector3.TransformNormal(t,a),i.Vector3.TransformNormal(n,a),i.Vector3.TransformNormal(r,a))})},t}(n(5).Adapter);t.MeshAdapter=c},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(0),i=function(){return function(e,t,n){void 0===n&&(n=null);var i=this;this._elem=e,n||(n=this._elem.parentElement),this._infoDiv=r.Helpers.CreateDiv("tooltip",n),this._elem.addEventListener("mouseover",function(){i._infoDiv.textContent=t,i._infoDiv.style.display="block"}),this._elem.addEventListener("mouseout",function(){i._infoDiv.style.display="none"})}}();t.Tooltip=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=function(e){function t(t){var n=e.call(this)||this;return n._pause=!1,n._div.className="fa fa-search texture-element",n._textureDiv=o.Helpers.CreateDiv("texture-viewer",n._div),n._canvas=o.Helpers.CreateElement("canvas","texture-viewer-img",n._textureDiv),t&&(n._textureUrl=t.name),n._div.addEventListener("mouseover",n._showViewer.bind(n,"flex")),n._div.addEventListener("mouseout",n._showViewer.bind(n,"none")),n}return r(t,e),t.prototype.update=function(e){e&&e.url===this._textureUrl||(e&&(this._textureUrl=e.name),this._engine?(this._cube.material&&this._cube.material.dispose(!0,!0),this._cube.dispose()):this._initEngine(),this._populateScene())},t.prototype._populateScene=function(){var e=this,t=new i.CubeTexture(this._textureUrl,this._scene);t.coordinatesMode=i.Texture.SKYBOX_MODE,this._cube=i.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new i.StandardMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.reflectionTexture.coordinatesMode=i.Texture.SKYBOX_MODE,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender(function(){e._cube.rotation.y+=.01})},t.prototype._initEngine=function(){var e=this;this._engine=new i.Engine(this._canvas),this._scene=new i.Scene(this._engine),this._scene.clearColor=new i.Color4(0,0,0,0),this._engine.runRenderLoop(function(){e._pause||e._scene.render()}),this._canvas.setAttribute("width","110"),this._canvas.setAttribute("height","110")},t.prototype._showViewer=function(e){"none"!=e?(this._engine||(this._initEngine(),this._populateScene()),this._pause=!1):this._pause=!0,this._textureDiv.style.display=e},t.prototype.dispose=function(){this._engine&&(this._engine.dispose(),this._engine=null)},t}(n(3).BasicElement);t.CubeTextureElement=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=n(2),a=function(e){function t(t){var n=e.call(this)||this;return n.cameraPOV=t,n._elem.id=n.cameraPOV.id(),n._elem.id==n.cameraPOV.getCurrentActiveCamera()?n._elem.classList.add("fa-check-circle"):n._elem.classList.add("fa-circle"),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._gotoPOV()},t.prototype._gotoPOV=function(){for(var e=o.Inspector.DOCUMENT.querySelectorAll(".fa-check-circle"),t=0;t<e.length;t++)e[t].classList.remove("fa-check-circle"),e[t].classList.add("fa-circle");this.cameraPOV.setPOV(),this._elem.id==this.cameraPOV.getCurrentActiveCamera()&&(this._elem.classList.remove("fa-circle"),this._elem.classList.add("fa-check-circle"))},t}(i.AbstractTreeTool);t.CameraPOV=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(2),s=function(e){function t(t,n){var r=e.call(this,t,"Tools")||this;r._inspector=n,r._scene=r._inspector.scene,r._panel=o.Helpers.CreateDiv("tab-panel"),r._panel.classList.add("tools-panel");var s=o.Helpers.CreateDiv("tool-title1",r._panel),p=o.Helpers.CreateElement("span");p.textContent="js v"+i.Engine.Version+" - Tools",s.appendChild(p),(s=o.Helpers.CreateDiv("tool-title2",r._panel)).textContent="Environment Texture (.dds, .env)";var l=a.Inspector.DOCUMENT.createElement("div");l.className="tool-label-error",l.style.display="none";var c=o.Helpers.CreateDiv(null,r._panel);(u=a.Inspector.DOCUMENT.createElement("input")).className="tool-input",u.type="file",u.accept=".dds, .env",u.onchange=function(e){var t=e.target.files,n=null;if(t&&t.length&&(n=t[0]),!n)return l.style.display="block",void(l.textContent="Please, select a file first.");var o=n.name.toLowerCase().indexOf(".dds")>0,a=n.name.toLowerCase().indexOf(".env")>0;if(!o&&!a)return l.style.display="block",void(l.textContent="Please, select a dds or env file.");i.Tools.ReadFile(n,function(e){var t=new Blob([e],{type:"octet/stream"}),n=URL.createObjectURL(t);o?(r._scene.environmentTexture=i.CubeTexture.CreateFromPrefilteredData(n,r._scene,".dds"),l.style.display="none"):r._scene.environmentTexture=new i.CubeTexture(n,r._scene,void 0,void 0,void 0,function(){l.style.display="none"},function(e){e&&(l.style.display="block",l.textContent=e)},void 0,void 0,".env")},void 0,!0)},c.appendChild(u),r._scene.getEngine().premultipliedAlpha||(c=o.Helpers.CreateDiv(null,r._panel),(u=a.Inspector.DOCUMENT.createElement("input")).value="Compress current texture to .env",u.className="tool-input",u.type="button",u.onclick=function(){if(!r._scene.environmentTexture)return l.style.display="block",void(l.textContent="You must load an environment texture first.");r._scene.activeCamera?i.EnvironmentTextureTools.CreateEnvTextureAsync(r._scene.environmentTexture).then(function(e){var t=new Blob([e],{type:"octet/stream"});i.Tools.Download(t,"environment.env"),l.style.display="none"}).catch(function(e){l.style.display="block",l.textContent=e}):(l.style.display="block",l.textContent="An active camera is required.")},c.appendChild(u)),r._panel.appendChild(l),(s=o.Helpers.CreateDiv("tool-title2",r._panel)).textContent="Capture";var u;c=o.Helpers.CreateDiv(null,r._panel);return(u=a.Inspector.DOCUMENT.createElement("input")).value="Take Screenshot",u.type="button",u.className="tool-input",u.onclick=function(){r._scene.activeCamera&&i.Tools.CreateScreenshot(r._scene.getEngine(),r._scene.activeCamera,{precision:.5})},c.appendChild(u),r}return r(t,e),t.prototype.dispose=function(){},t}(n(6).Tab);t.ToolsTab=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(5),o=n(0),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return o.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return[]},t.prototype.getTools=function(){return new Array},t}(i.Adapter);t.TextureAdapter=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(23),a=n(0),s=n(4),p=function(e){function t(t,n){var r=e.call(this,t,"Textures")||this;return r._treeItems=[],r._inspector=n,r._panel=a.Helpers.CreateDiv("tab-panel"),r._treePanel=a.Helpers.CreateDiv("insp-tree",r._panel),r._imagePanel=a.Helpers.CreateDiv("insp-details",r._panel),Split([r._treePanel,r._imagePanel],{blockDrag:r._inspector.popupMode,direction:"vertical"}),r.update(),r}return r(t,e),t.prototype.dispose=function(){},t.prototype.update=function(e){var t;e?t=e:(this._treeItems=this._getTree(),t=this._treeItems),a.Helpers.CleanDiv(this._treePanel),a.Helpers.CleanDiv(this._imagePanel),t.sort(function(e,t){return e.compareTo(t)});for(var n=0,r=t;n<r.length;n++){var i=r[n];this._treePanel.appendChild(i.toHtml())}},t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.textures;t<n.length;t++){var r=n[t];e.push(new s.TreeItem(this,new o.TextureAdapter(r)))}return e},t.prototype.displayDetails=function(e){this.activateNode(e),a.Helpers.CleanDiv(this._imagePanel);var t=e.adapter.object,n=[],r=a.Helpers.CreateElement("img","texture-image",this._imagePanel);n.push(r);for(var o=0;o<5;o++)n.push(a.Helpers.CreateElement("img","texture-image",this._imagePanel));if(t instanceof i.RenderTargetTexture){var s=this._inspector.scene,p=s.getEngine(),l=t.getSize(),c=t.clone();c.activeCamera=t.activeCamera,c.onBeforeRender=t.onBeforeRender,c.onAfterRender=t.onAfterRender,c.onBeforeRenderObservable=t.onBeforeRenderObservable,c.onAfterRenderObservable.add(function(e){i.Tools.DumpFramebuffer(l.width,l.height,p,function(t){return n[e].src=t})}),s.incrementRenderId(),s.resetCachedMaterial(),c.render(),c.dispose()}else if(t instanceof i.CubeTexture){var u=t.readPixels();(b=document.createElement("canvas")).id="MyCanvas",r.parentElement&&r.parentElement.appendChild(b);var d=b.getContext("2d"),h=t.getSize(),_=u.buffer.slice(0,h.height*h.width*4),f=new Uint8ClampedArray(_);new ImageData(6*h.width,h.height).data.set(f),(y=d.createImageData(6*h.width,h.height)).data.set(f),d.putImageData(y,0,0)}else if(t._canvas){var v=t._canvas.toDataURL("image/png");r.src=v}else if(t.url){var b;u=t.readPixels();(b=document.createElement("canvas")).id="MyCanvas",r.parentElement&&r.parentElement.appendChild(b);var y;d=b.getContext("2d"),h=t.getSize();(y=d.createImageData(h.width,h.height)).data.set(u),d.putImageData(y,0,0)}},t.prototype.select=function(e){this.activateNode(e),this.displayDetails(e)},t.prototype.activateNode=function(e){if(this._treeItems)for(var t=0,n=this._treeItems;t<n.length;t++){n[t].active(!1)}e.active(!0)},t}(n(6).Tab);t.TextureTab=p},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(2),s=function(e){function t(t,n){var r=e.call(this,t,"Stats")||this;r._updatableProperties=[],r._inspector=n,r._scene=r._inspector.scene,r._engine=r._scene.getEngine(),r._glInfo=r._engine.getGlInfo(),r._connectToInstrumentation(),r._panel=o.Helpers.CreateDiv("tab-panel"),r._panel.classList.add("stats-panel");var s=o.Helpers.CreateDiv("stat-title1",r._panel),p=o.Helpers.CreateElement("span","stats-fps");r._updatableProperties.push({elem:p,updateFct:function(){return i.Tools.Format(r._inspector.scene.getEngine().getFps(),0)+" fps"}});var l=o.Helpers.CreateElement("span");l.textContent="js v"+i.Engine.Version+" - ",s.appendChild(l),s.appendChild(p),r._updateLoopHandler=r._update.bind(r),r._refreshRateCounter=0,r.refreshRate=4,(s=o.Helpers.CreateDiv("stat-title2",r._panel)).textContent="Count",r._createStatLabel("Total meshes",r._panel);var c=o.Helpers.CreateDiv("stat-value",r._panel);r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.meshes.length.toString()}}),r._createStatLabel("Draw calls",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._sceneInstrumentation.drawCallsCounter.current.toString()}}),r._createStatLabel("Texture collisions",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._sceneInstrumentation.textureCollisionsCounter.current.toString()}}),r._createStatLabel("Total lights",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.lights.length.toString()}}),r._createStatLabel("Total vertices",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.getTotalVertices().toString()}}),r._createStatLabel("Total materials",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.materials.length.toString()}}),r._createStatLabel("Total textures",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.textures.length.toString()}}),r._createStatLabel("Active meshes",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.getActiveMeshes().length.toString()}}),r._createStatLabel("Active indices",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.getActiveIndices().toString()}}),r._createStatLabel("Active bones",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.getActiveBones().toString()}}),r._createStatLabel("Active particles",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._scene.getActiveParticles().toString()}}),(s=o.Helpers.CreateDiv("stat-title2",r._panel)).textContent="Duration",r._createStatLabel("Properties refresh rate (per second)",r._panel);c=o.Helpers.CreateDiv("stat-value",r._panel);r._inputElement=a.Inspector.DOCUMENT.createElement("input"),r._inputElement.value=r.refreshRate,c.appendChild(r._inputElement),r._inputElement.addEventListener("keyup",function(e){r.refreshRate=r._inputElement.value}),r._createStatLabel("Meshes selection",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.activeMeshesEvaluationTimeCounter.current)}}),r._createStatLabel("Render targets",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.renderTargetsRenderTimeCounter.current)}}),r._createStatLabel("Particles",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.particlesRenderTimeCounter.current)}}),r._createStatLabel("Sprites",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.spritesRenderTimeCounter.current)}}),r._createStatLabel("Animations",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.animationsTimeCounter.current)}}),r._createStatLabel("Physics",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.physicsTimeCounter.current)}}),r._createStatLabel("Render",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.renderTimeCounter.current)}}),r._createStatLabel("Frame",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.frameTimeCounter.current)}}),r._createStatLabel("Inter-frame",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(r._sceneInstrumentation.interFrameTimeCounter.current)}}),r._createStatLabel("GPU Frame time",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(1e-6*r._engineInstrumentation.gpuFrameTimeCounter.current)}}),r._createStatLabel("GPU Frame time (average)",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(1e-6*r._engineInstrumentation.gpuFrameTimeCounter.average)}}),r._createStatLabel("Potential FPS",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return i.Tools.Format(1e3/r._sceneInstrumentation.frameTimeCounter.current,0)}}),r._createStatLabel("Resolution",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getRenderWidth()+"x"+r._engine.getRenderHeight()}}),(s=o.Helpers.CreateDiv("stat-title2",r._panel)).textContent="Extensions",r._createStatLabel("Std derivatives",r._panel);c=o.Helpers.CreateDiv("stat-value",r._panel);r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().standardDerivatives?"Yes":"No"}}),r._createStatLabel("Compressed textures",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().s3tc?"Yes":"No"}}),r._createStatLabel("Hardware instances",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().instancedArrays?"Yes":"No"}}),r._createStatLabel("Texture float",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().textureFloat?"Yes":"No"}}),r._createStatLabel("32bits indices",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().uintIndices?"Yes":"No"}}),r._createStatLabel("Fragment depth",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().fragmentDepthSupported?"Yes":"No"}}),r._createStatLabel("High precision shaders",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().highPrecisionShaderSupported?"Yes":"No"}}),r._createStatLabel("Draw buffers",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().drawBuffersExtension?"Yes":"No"}}),r._createStatLabel("Vertex array object",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().vertexArrayObject?"Yes":"No"}}),r._createStatLabel("Timer query",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().timerQuery?"Yes":"No"}}),(s=o.Helpers.CreateDiv("stat-title2",r._panel)).textContent="Caps.",r._createStatLabel("Stencil",r._panel);c=o.Helpers.CreateDiv("stat-value",r._panel);r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.isStencilEnable?"Enabled":"Disabled"}}),r._createStatLabel("Max textures units",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().maxTexturesImageUnits.toString()}}),r._createStatLabel("Max textures size",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().maxTextureSize.toString()}}),r._createStatLabel("Max anisotropy",r._panel),c=o.Helpers.CreateDiv("stat-value",r._panel),r._updatableProperties.push({elem:c,updateFct:function(){return r._engine.getCaps().maxAnisotropy.toString()}}),(s=o.Helpers.CreateDiv("stat-title2",r._panel)).textContent="Info";c=o.Helpers.CreateDiv("stat-infos",r._panel);return r._updatableProperties.push({elem:c,updateFct:function(){return"WebGL v"+r._engine.webGLVersion+" - "+r._glInfo.version+" - "+r._glInfo.renderer}}),r}return r(t,e),t.prototype._connectToInstrumentation=function(){this._sceneInstrumentation||(this._sceneInstrumentation=new i.SceneInstrumentation(this._scene),this._sceneInstrumentation.captureActiveMeshesEvaluationTime=!0,this._sceneInstrumentation.captureRenderTargetsRenderTime=!0,this._sceneInstrumentation.captureFrameTime=!0,this._sceneInstrumentation.captureRenderTime=!0,this._sceneInstrumentation.captureInterFrameTime=!0,this._sceneInstrumentation.captureParticlesRenderTime=!0,this._sceneInstrumentation.captureSpritesRenderTime=!0,this._sceneInstrumentation.capturePhysicsTime=!0,this._sceneInstrumentation.captureAnimationsTime=!0,this._engineInstrumentation=new i.EngineInstrumentation(this._engine),this._engineInstrumentation.captureGPUFrameTime=!0)},t.prototype._createStatLabel=function(e,t){var n=o.Helpers.CreateDiv("stat-label",t);return n.textContent=e,n},t.prototype._update=function(){if(this._refreshRateCounter>1)this._refreshRateCounter--;else{for(var e=0,t=this._updatableProperties;e<t.length;e++){var n=t[e];n.elem.textContent=n.updateFct()}this._inspector.scene.getEngine().getFps()/this.refreshRate==1/0?this._refreshRateCounter=1:this._refreshRateCounter=this._inspector.scene.getEngine().getFps()/this.refreshRate}},t.prototype.dispose=function(){this._scene.unregisterAfterRender(this._updateLoopHandler),this._sceneInstrumentation.dispose(),this._sceneInstrumentation=null,this._engineInstrumentation.dispose(),this._engineInstrumentation=null},t.prototype.active=function(t){e.prototype.active.call(this,t),t&&(this._connectToInstrumentation(),this._scene.registerAfterRender(this._updateLoopHandler))},t}(n(6).Tab);t.StatsTab=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n.playSound=t,n._elem.classList.add("fa-play"),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._playSound()},t.prototype._playSound=function(){var e=this;this._elem.classList.contains("fa-play")?(this._elem.classList.remove("fa-play"),this._elem.classList.add("fa-pause")):(this._elem.classList.remove("fa-pause"),this._elem.classList.add("fa-play")),this.playSound.setPlaying(function(){e._elem.classList.remove("fa-pause"),e._elem.classList.add("fa-play")})},t}(n(9).AbstractTreeTool);t.SoundInteractions=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(26),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new o.SoundInteractions(this)),e},t.prototype.setPlaying=function(e){this._obj.isPlaying?this._obj.pause():this._obj.play(),this._obj.onended=function(){e()}},t}(n(5).Adapter);t.SoundAdapter=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(27),o=n(4),a=function(e){function t(t,n){return e.call(this,t,"Audio",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=this,t=new Array,n=0,r=this._inspector.scene.soundTracks;n<r.length;n++){r[n].soundCollection.forEach(function(n){t.push(new o.TreeItem(e,new i.SoundAdapter(n)))})}return t},t}(n(7).PropertyTab);t.SoundTab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(14),a=n(13),s=n(16),p=n(0),l=function(e){function t(t,n){var r=e.call(this,t,"Scene")||this;r._skeletonViewers=[],r._inspector=n,r._panel=p.Helpers.CreateDiv("tab-panel"),r._actions=p.Helpers.CreateDiv("scene-actions",r._panel),r._detailsPanel=new o.DetailPanel,r._panel.appendChild(r._detailsPanel.toHtml());for(var l=[],c=0,u=p.Helpers.GetAllLinesPropertiesAsString(r._inspector.scene,["interFramePerfCounter","lastFramePerfCounter","evaluateActiveMeshesDurationPerfCounter","renderDurationPerfCounter","particlesDurationPerfCounter","spriteDuractionPerfCounter"]);c<u.length;c++){var d=u[c],h=new s.PropertyLine(new a.Property(d,r._inspector.scene));l.push(h)}r._detailsPanel.details=l,Split([r._actions,r._detailsPanel.toHtml()],{blockDrag:r._inspector.popupMode,sizes:[50,50],direction:"vertical"});var _=p.Helpers.CreateDiv("actions-title",r._actions);_.textContent="Rendering mode";var f=p.Helpers.CreateDiv("action-radio",r._actions),v=p.Helpers.CreateDiv("action-radio",r._actions),b=p.Helpers.CreateDiv("action-radio",r._actions);f.textContent="Point",v.textContent="Wireframe",b.textContent="Solid",r._inspector.scene.forcePointsCloud?f.classList.add("active"):r._inspector.scene.forceWireframe?v.classList.add("active"):b.classList.add("active"),r._generateRadioAction([f,v,b]),f.addEventListener("click",function(){r._inspector.scene.forcePointsCloud=!0,r._inspector.scene.forceWireframe=!1}),v.addEventListener("click",function(){r._inspector.scene.forcePointsCloud=!1,r._inspector.scene.forceWireframe=!0}),b.addEventListener("click",function(){r._inspector.scene.forcePointsCloud=!1,r._inspector.scene.forceWireframe=!1}),(_=p.Helpers.CreateDiv("actions-title",r._actions)).textContent="Textures channels",r._generateActionLine("Diffuse Texture",i.StandardMaterial.DiffuseTextureEnabled,function(e){i.StandardMaterial.DiffuseTextureEnabled=e}),r._generateActionLine("Ambient Texture",i.StandardMaterial.AmbientTextureEnabled,function(e){i.StandardMaterial.AmbientTextureEnabled=e}),r._generateActionLine("Specular Texture",i.StandardMaterial.SpecularTextureEnabled,function(e){i.StandardMaterial.SpecularTextureEnabled=e}),r._generateActionLine("Emissive Texture",i.StandardMaterial.EmissiveTextureEnabled,function(e){i.StandardMaterial.EmissiveTextureEnabled=e}),r._generateActionLine("Bump Texture",i.StandardMaterial.BumpTextureEnabled,function(e){i.StandardMaterial.BumpTextureEnabled=e}),r._generateActionLine("Opacity Texture",i.StandardMaterial.OpacityTextureEnabled,function(e){i.StandardMaterial.OpacityTextureEnabled=e}),r._generateActionLine("Reflection Texture",i.StandardMaterial.ReflectionTextureEnabled,function(e){i.StandardMaterial.ReflectionTextureEnabled=e}),r._generateActionLine("Refraction Texture",i.StandardMaterial.RefractionTextureEnabled,function(e){i.StandardMaterial.RefractionTextureEnabled=e}),r._generateActionLine("ColorGrading",i.StandardMaterial.ColorGradingTextureEnabled,function(e){i.StandardMaterial.ColorGradingTextureEnabled=e}),r._generateActionLine("Lightmap Texture",i.StandardMaterial.LightmapTextureEnabled,function(e){i.StandardMaterial.LightmapTextureEnabled=e}),r._generateActionLine("Fresnel",i.StandardMaterial.FresnelEnabled,function(e){i.StandardMaterial.FresnelEnabled=e}),(_=p.Helpers.CreateDiv("actions-title",r._actions)).textContent="Options",r._generateActionLine("Animations",r._inspector.scene.animationsEnabled,function(e){r._inspector.scene.animationsEnabled=e}),r._generateActionLine("Collisions",r._inspector.scene.collisionsEnabled,function(e){r._inspector.scene.collisionsEnabled=e}),r._generateActionLine("Fog",r._inspector.scene.fogEnabled,function(e){r._inspector.scene.fogEnabled=e}),r._generateActionLine("Lens flares",r._inspector.scene.lensFlaresEnabled,function(e){r._inspector.scene.lensFlaresEnabled=e}),r._generateActionLine("Lights",r._inspector.scene.lightsEnabled,function(e){r._inspector.scene.lightsEnabled=e}),r._generateActionLine("Particles",r._inspector.scene.particlesEnabled,function(e){r._inspector.scene.particlesEnabled=e}),r._generateActionLine("Post-processes",r._inspector.scene.postProcessesEnabled,function(e){r._inspector.scene.postProcessesEnabled=e}),r._generateActionLine("Probes",r._inspector.scene.probesEnabled,function(e){r._inspector.scene.probesEnabled=e}),r._generateActionLine("Procedural textures",r._inspector.scene.proceduralTexturesEnabled,function(e){r._inspector.scene.proceduralTexturesEnabled=e}),r._generateActionLine("Render targets",r._inspector.scene.renderTargetsEnabled,function(e){r._inspector.scene.renderTargetsEnabled=e}),r._generateActionLine("Shadows",r._inspector.scene.shadowsEnabled,function(e){r._inspector.scene.shadowsEnabled=e}),r._generateActionLine("Skeletons",r._inspector.scene.skeletonsEnabled,function(e){r._inspector.scene.skeletonsEnabled=e}),r._generateActionLine("Sprites",r._inspector.scene.spritesEnabled,function(e){r._inspector.scene.spritesEnabled=e}),r._generateActionLine("Textures",r._inspector.scene.texturesEnabled,function(e){r._inspector.scene.texturesEnabled=e}),(_=p.Helpers.CreateDiv("actions-title",r._actions)).textContent="Audio";var y=p.Helpers.CreateDiv("action-radio",r._actions),m=p.Helpers.CreateDiv("action-radio",r._actions);return r._generateActionLine("Disable audio",!r._inspector.scene.audioEnabled,function(e){r._inspector.scene.audioEnabled=!e}),y.textContent="Headphones",m.textContent="Normal speakers",r._generateRadioAction([y,m]),r._inspector.scene.headphone?y.classList.add("active"):m.classList.add("active"),y.addEventListener("click",function(){r._inspector.scene.headphone=!0}),m.addEventListener("click",function(){r._inspector.scene.headphone=!1}),(_=p.Helpers.CreateDiv("actions-title",r._actions)).textContent="Viewer",r._generateActionLine("Skeletons",!1,function(e){if(e)for(var t=0;t<r._inspector.scene.meshes.length;t++){var n=r._inspector.scene.meshes[t];if(n.skeleton){for(var o=!1,a=0;a<r._skeletonViewers.length;a++)if(r._skeletonViewers[a].skeleton===n.skeleton){o=!0;break}if(o)continue;var s=new i.Debug.SkeletonViewer(n.skeleton,n,r._inspector.scene);s.isEnabled=!0,r._skeletonViewers.push(s)}}else{for(t=0;t<r._skeletonViewers.length;t++)r._skeletonViewers[t].dispose();r._skeletonViewers=[]}}),r}return r(t,e),t.prototype.dispose=function(){this._detailsPanel.dispose()},t.prototype._generateActionLine=function(e,t,n){var r=p.Helpers.CreateDiv("scene-actions",this._actions);r.textContent=e,r.classList.add("action"),t&&r.classList.add("active"),r.addEventListener("click",function(e){r.classList.toggle("active");var t=r.classList.contains("active");n(t)})},t.prototype._generateRadioAction=function(e){for(var t=function(t,n){for(var r=0,i=e;r<i.length;r++){i[r].classList.remove("active")}t.classList.add("active")},n=0,r=e;n<r.length;n++){var i=r[n];i.addEventListener("click",t.bind(this,i))}},t}(n(6).Tab);t.SceneTab=l},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(10),a=function(e){function t(t,n){var r=e.call(this,t)||this;return r._isVisible=!1,r._viewer=n,r}return r(t,e),t.prototype.id=function(){var e="",t=this._obj;return t&&t.object&&(e=t.object.name||""),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new o.Checkbox(this)),e},t.prototype.setVisible=function(e){this._isVisible=e,e?this._viewer.showImpostor(this._obj):this._viewer.hideImpostor(this._obj)},t.prototype.isVisible=function(){return this._isVisible},t}(n(5).Adapter);t.PhysicsImpostorAdapter=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(30),a=n(4),s=function(e){function t(t,n){return e.call(this,t,"Physics",n)||this}return r(t,e),t.prototype._getTree=function(){var e=new Array,t=this._inspector.scene;if(!t.isPhysicsEnabled())return e;this.viewer||(this.viewer=new i.Debug.PhysicsViewer(t));for(var n=0,r=t.meshes;n<r.length;n++){var s=r[n];s.physicsImpostor&&e.push(new a.TreeItem(this,new o.PhysicsImpostorAdapter(s.physicsImpostor,this.viewer)))}return e},t}(n(7).PropertyTab);t.PhysicsTab=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(18),a=n(0),s=n(4),p=function(e){function t(t,n){return e.call(this,t,"Mesh",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=this,t=new Array,n=new Array,r=function(p){var l=p.getDescendants(!0),c=new s.TreeItem(e,new o.MeshAdapter(p));if(l.length>0){for(var u=0,d=l;u<d.length;u++){var h=d[u];if(h instanceof i.TransformNode&&!a.Helpers.IsSystemName(h.name)){var _=r(h);c.add(_)}}c.update()}if(null!=p.parent&&-1!=n.indexOf(p))for(var f=0,v=!0;f<t.length&&v;)p.name===t[f].id&&(t.splice(f,1),v=!1),f++;return n.push(p),c},p=this._inspector.scene,l=[],c=0,u=p.meshes;c<u.length;c++){var d=u[c];-1!=l.indexOf(d)||a.Helpers.IsSystemName(d.name)||d.parent||l.push(d)}for(var h=0,_=p.transformNodes;h<_.length;h++){var f=_[h];-1!=l.indexOf(f)||a.Helpers.IsSystemName(f.name)||f.parent||l.push(f)}for(var v=0,b=l;v<b.length;v++){d=b[v];if(-1==n.indexOf(d)&&!a.Helpers.IsSystemName(d.name)){var y=r(d);t.push(y)}}return t},t}(n(7).PropertyTab);t.MeshTab=p},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){return[]},t}(n(5).Adapter);t.MaterialAdapter=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(33),o=n(4),a=function(e){function t(t,n){return e.call(this,t,"Material",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.materials;t<n.length;t++){var r=n[t];e.push(new o.TreeItem(this,new i.MaterialAdapter(r)))}return e},t}(n(7).PropertyTab);t.MaterialTab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(10),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new o.Checkbox(this)),e},t.prototype.setVisible=function(e){this._obj.setEnabled(e)},t.prototype.isVisible=function(){return this._obj.isEnabled()},t}(n(5).Adapter);t.LightAdapter=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(35),o=n(4),a=function(e){function t(t,n){return e.call(this,t,"Light",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.lights;t<n.length;t++){var r=n[t];e.push(new o.TreeItem(this,new i.LightAdapter(r)))}return e},t}(n(7).PropertyTab);t.LightTab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(10),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new o.Checkbox(this)),e},t.prototype.setVisible=function(e){this._obj.isVisible=e},t.prototype.isVisible=function(){return this._obj.isVisible},t}(n(5).Adapter);t.GUIAdapter=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=n(37),a=n(4),s=function(e){function t(t,n){return e.call(this,t,"GUI",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=this,t=[],n=function(t){var r=t.children;if(r&&r.length>0){for(var i=new a.TreeItem(e,new o.GUIAdapter(t)),s=0,p=r;s<p.length;s++){var l=p[s],c=n(l);i.add(c)}return i.update(),i}return new a.TreeItem(e,new o.GUIAdapter(t))},r=0,s=this._inspector.scene.textures;r<s.length;r++){var p=s[r];if(p instanceof i.AdvancedDynamicTexture){var l=n(p._rootContainer);t.push(l)}}return t},t}(n(7).PropertyTab);t.GUITab=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(69),a=n(68),s=n(14),p=n(13),l=n(16),c=n(0),u=function(e){function t(t,n){var r=e.call(this,t,"GLTF")||this;return r._detailsPanel=null,r._inspector=n,r._panel=c.Helpers.CreateDiv("tab-panel"),r._actions=c.Helpers.CreateDiv("gltf-actions",r._panel),r._actions.addEventListener("click",function(e){r._closeDetailsPanel()}),i.SceneLoader&&o.GLTFFileLoader&&o.GLTF2.GLTFLoader&&r._addImport(),a.GLTF2Export&&r._addExport(),r}return r(t,e),Object.defineProperty(t,"IsSupported",{get:function(){return!!(i.SceneLoader&&o.GLTFFileLoader&&o.GLTF2.GLTFLoader)||!!a.GLTF2Export},enumerable:!0,configurable:!0}),t._Initialize=function(){i.SceneLoader.OnPluginActivatedObservable.add(function(e){if("gltf"===e.name&&t._LoaderDefaults){var n=t._LoaderDefaults;for(var r in n)"extensions"!==r&&(e[r]=t._LoaderDefaults[r]);e.onExtensionLoadedObservable.add(function(e){var t=n.extensions[e.name];for(var r in t)e[r]=t[r]})}})},t.prototype.dispose=function(){this._detailsPanel&&this._detailsPanel.dispose()},t.prototype._addImport=function(){var e=this,t=c.Helpers.CreateDiv("gltf-title",this._actions);t.textContent="Import";var n=c.Helpers.CreateDiv("gltf-actions",this._actions);this._getLoaderDefaultsAsync().then(function(r){t.addEventListener("click",function(t){e._showLoaderDefaults(r),t.stopPropagation()}),n.addEventListener("click",function(t){e._showLoaderDefaults(r),t.stopPropagation()}),c.Helpers.CreateDiv("gltf-title",n).textContent="Extensions";var i=function(t){var i=r.extensions[t],o=c.Helpers.CreateDiv("gltf-action",n);o.addEventListener("click",function(t){e._showLoaderExtensionDefaults(i)&&t.stopPropagation()});var a=c.Helpers.CreateElement("span","gltf-checkbox",o);i.enabled&&a.classList.add("action","active"),a.addEventListener("click",function(){a.classList.toggle("active"),i.enabled=a.classList.contains("active")}),c.Helpers.CreateElement("span",null,o).textContent=t};for(var o in r.extensions)i(o)})},t._EnumeratePublic=function(e,t){for(var n in e)if("name"!==n&&"_"!==n[0]){var r=e[n],i=typeof r;"object"!==i&&"function"!==i&&"undefined"!==i&&t(n,r)}},t.prototype._getLoaderDefaultsAsync=function(){if(t._LoaderDefaults)return Promise.resolve(t._LoaderDefaults);var e={extensions:{}},n=new i.NullEngine,r=new i.Scene(n),a=new o.GLTFFileLoader;t._EnumeratePublic(a,function(t,n){e[t]=n}),a.onExtensionLoadedObservable.add(function(n){var r={};t._EnumeratePublic(n,function(e,t){r[e]=t}),e.extensions[n.name]=r});return a.importMeshAsync([],r,'{ "asset": { "version": "2.0" } }',"").then(function(){return r.dispose(),n.dispose(),t._LoaderDefaults=e})},t.prototype._openDetailsPanel=function(){return this._detailsPanel||(this._detailsPanel=new s.DetailPanel,this._panel.appendChild(this._detailsPanel.toHtml()),this._split=Split([this._actions,this._detailsPanel.toHtml()],{blockDrag:this._inspector.popupMode,sizes:[50,50],direction:"vertical"})),this._detailsPanel.clean(),this._detailsPanel},t.prototype._closeDetailsPanel=function(){this._detailsPanel&&(this._detailsPanel.toHtml().remove(),this._detailsPanel.dispose(),this._detailsPanel=null),this._split&&(this._split.destroy(),delete this._split)},t.prototype._showLoaderDefaults=function(e){var t=this._openDetailsPanel(),n=new Array;for(var r in e)"extensions"!==r&&n.push(new l.PropertyLine(new p.Property(r,e,this._inspector.scene)));t.details=n},t.prototype._showLoaderExtensionDefaults=function(e){if(1===Object.keys(e).length)return!1;var t=this._openDetailsPanel(),n=new Array;for(var r in e)"enabled"!==r&&n.push(new l.PropertyLine(new p.Property(r,e,this._inspector.scene)));return t.details=n,!0},t.prototype._addExport=function(){var e=this;c.Helpers.CreateDiv("gltf-title",this._actions).textContent="Export";var n=c.Helpers.CreateDiv("gltf-actions",this._actions),r=c.Helpers.CreateInput("gltf-input",n);r.placeholder="File name...";var i=c.Helpers.CreateElement("button","gltf-button",n);i.innerText="Export GLB",i.addEventListener("click",function(){a.GLTF2Export.GLBAsync(e._inspector.scene,r.value||"scene",{shouldExportTransformNode:function(e){return!t._IsSkyBox(e)}}).then(function(e){e.downloadFiles()})})},t._IsSkyBox=function(e){if(e instanceof i.Mesh&&e.material){var t=e.material.reflectionTexture;if(t&&t.coordinatesMode===i.Texture.SKYBOX_MODE)return!0}return!1},t._LoaderDefaults=null,t}(n(6).Tab);t.GLTFTab=u,u._Initialize()},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=function(e){function t(t,n){var r=e.call(this,t,"Console")||this;r._inspector=n,r._panel=o.Helpers.CreateDiv("tab-panel");var a=o.Helpers.CreateDiv("console-panel"),s=o.Helpers.CreateDiv("console-panel");r._panel.appendChild(a),r._panel.appendChild(s),Split([a,s],{blockDrag:r._inspector.popupMode,sizes:[50,50],direction:"vertical"});var p=o.Helpers.CreateDiv("console-panel-title",a);return p.textContent="Console logs",(p=o.Helpers.CreateDiv("console-panel-title",s)).textContent="js logs",r._consolePanelContent=o.Helpers.CreateDiv("console-panel-content",a),r._bjsPanelContent=o.Helpers.CreateDiv("console-panel-content",s),r._bjsPanelContent.innerHTML=i.Tools.LogCache,i.Tools.OnNewCacheEntry=function(e){r._bjsPanelContent.innerHTML+=e,r._bjsPanelContent.scrollTop=r._bjsPanelContent.scrollHeight},r}return r(t,e),t.prototype.dispose=function(){console.log=this._oldConsoleLog,console.warn=this._oldConsoleWarn,console.error=this._oldConsoleError},t.prototype.active=function(t){e.prototype.active.call(this,t),t&&(this._oldConsoleLog=console.log,this._oldConsoleWarn=console.warn,this._oldConsoleError=console.error,console.log=this._addConsoleLog.bind(this),console.warn=this._addConsoleWarn.bind(this),console.error=this._addConsoleError.bind(this))},t.prototype._message=function(e,t,n){o.Helpers.CreateDiv("caller",this._consolePanelContent).textContent=n.replace(" "," "),o.Helpers.CreateDiv(e,this._consolePanelContent).textContent=t.replace(" "," "),this._consolePanelContent.scrollTop=this._consolePanelContent.scrollHeight},t.prototype._addConsoleLog=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":"Function "+n.name+": ",i=0;i<e.length;i++)this._message("log",e[i],r),o.Helpers.IsBrowserEdge()||this._oldConsoleLog(e[i])},t.prototype._addConsoleWarn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":n.name,i=0;i<e.length;i++)this._message("warn",e[i],r),o.Helpers.IsBrowserEdge()||this._oldConsoleWarn(e[i])},t.prototype._addConsoleError=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=this._addConsoleLog.caller,r=null==n?"Window":n.name,i=0;i<e.length;i++)this._message("error",e[i],r),o.Helpers.IsBrowserEdge()||this._oldConsoleError(e[i])},t}(n(6).Tab);t.ConsoleTab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(9),o=n(19),a=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-info-circle"),new o.Tooltip(n._elem,n._obj.getInfo(),n._elem),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this)},t}(i.AbstractTreeTool);t.Info=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-wrench"),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.debug(this._on)},t}(n(9).AbstractTreeTool);t.DebugArea=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t){var n=e.call(this)||this;return n._obj=t,n._elem.classList.add("fa-cube"),n._on=n._obj.isBoxVisible(),n._check(),n}return r(t,e),t.prototype.action=function(){e.prototype.action.call(this),this._check()},t.prototype._check=function(){this._on?this._elem.classList.add("active"):this._elem.classList.remove("active"),this._obj.setBoxVisible(this._on)},t}(n(9).AbstractTreeTool);t.BoundingBox=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(58),o=n(4),a=function(e){function t(t,n){return e.call(this,t,"Camera",n)||this}return r(t,e),t.prototype._getTree=function(){for(var e=[],t=0,n=this._inspector.scene.cameras;t<n.length;t++){var r=n[t];e.push(new o.TreeItem(this,new i.CameraAdapter(r)))}return e},t}(n(7).PropertyTab);t.CameraTab=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,"fa","fa-times",t,n,"Close the inspector panel")||this}return r(t,e),t.prototype.action=function(){this._inspector.dispose()},t}(n(8).AbstractTool);t.DisposeTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(12),o=function(e){function t(t,n){var r=e.call(this,"fa","fa-pause",t,n,"Pause the automatic update of properties")||this;return r._isPause=!1,r}return r(t,e),t.prototype.action=function(){this._isPause?(i.Scheduler.getInstance().pause=!1,this._updateIcon("fa-pause")):(i.Scheduler.getInstance().pause=!0,this._updateIcon("fa-play")),this._isPause=!this._isPause},t}(n(8).AbstractTool);t.PauseScheduleTool=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,"fa","fa-expand",t,n,"Open the scene in fullscreen, press Esc to exit")||this}return r(t,e),t.prototype.action=function(){!function(e){(e.requestFullscreen||e.webkitRequestFullScreen).call(e)}(document.body)},t}(n(8).AbstractTool);t.FullscreenTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,"fas","fa-external-link-alt",t,n,"Open the inspector in a popup")||this}return r(t,e),t.prototype.action=function(){this._inspector.openPopup()},t}(n(8).AbstractTool);t.PopupTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){var r=e.call(this,"fa","fa-mouse-pointer",t,n,"Select a mesh in the scene")||this;return r._isActive=!1,r._pickHandler=r._pickMesh.bind(r),r}return r(t,e),t.prototype.action=function(){this._isActive?this._deactivate():(this.toHtml().classList.add("active"),this._inspector.scene.getEngine().getRenderingCanvas().addEventListener("click",this._pickHandler),this._isActive=!0)},t.prototype._deactivate=function(){this.toHtml().classList.remove("active"),this._inspector.scene.getEngine().getRenderingCanvas().removeEventListener("click",this._pickHandler),this._isActive=!1},t.prototype._pickMesh=function(e){var t=this._updatePointerPosition(e),n=this._inspector.scene.pick(t.x,t.y,function(e){return!0});n&&n.pickedMesh&&this._inspector.displayObjectDetails(n.pickedMesh),this._deactivate()},t.prototype._updatePointerPosition=function(e){var t=this._inspector.scene.getEngine().getRenderingCanvasClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},t}(n(8).AbstractTool);t.PickTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=n(0),a=function(e){function t(t,n){var r=e.call(this,"fa","fa-tags",t,n,"Display mesh names on the canvas")||this;return r._isDisplayed=!1,r._advancedTexture=null,r._labelInitialized=!1,r._scene=null,r._guiLoaded=!1,r._scene=n.scene,r}return r(t,e),t.prototype.dispose=function(){this._advancedTexture&&this._advancedTexture.dispose()},t.prototype._checkGUILoaded=function(){return!0===this._guiLoaded||(i&&(this._guiLoaded=!0),this._guiLoaded)},t.prototype._initializeLabels=function(){var e=this;if(!this._labelInitialized&&this._scene&&this._checkGUILoaded()){this._advancedTexture=i.AdvancedDynamicTexture.CreateFullscreenUI("UI");for(var t=0,n=this._scene.meshes;t<n.length;t++){var r=n[t];this._createLabel(r)}this._scene.onNewMeshAddedObservable.add(function(t,n){e._createLabel(t)}),this._scene.onMeshRemovedObservable.add(function(t,n){e._removeLabel(t)}),this._labelInitialized=!0}},t.prototype._createLabel=function(e){var t=e.name;if(!o.Helpers.IsSystemName(t)&&e&&this._advancedTexture){var n=new i.Rectangle;n.width=4+10*t.length+"px",n.height="22px",n.background="rgba(0,0,0,0.6)",n.color="black",this._advancedTexture.addControl(n);var r=new i.TextBlock;r.text=t,r.fontSize=12,n.addControl(r),n.linkWithMesh(e)}},t.prototype._removeLabel=function(e){if(this._advancedTexture)for(var t=0,n=this._advancedTexture._rootContainer.children;t<n.length;t++){var r=n[t];if(r._linkedMesh===e){this._advancedTexture.removeControl(r);break}}},t.prototype.action=function(){this._checkGUILoaded()&&this._advancedTexture&&(this._isDisplayed=!this._isDisplayed,this._isDisplayed?(this._initializeLabels(),this._advancedTexture._rootContainer.isVisible=!0):this._advancedTexture._rootContainer.isVisible=!1)},t}(n(8).AbstractTool);t.LabelTool=a},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=function(e){function t(t,n){return e.call(this,"fa","fa-sync",t,n,"Refresh the current tab")||this}return r(t,e),t.prototype.action=function(){this._inspector.refresh()},t}(n(8).AbstractTool);t.RefreshTool=i},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(3),o=n(51),a=n(50),s=n(49),p=n(0),l=n(48),c=n(47),u=n(46),d=n(45),h=function(e){function t(t){var n=e.call(this)||this;return n._tools=[],n._inspector=t,n._build(),n._addTools(),n}return r(t,e),t.prototype.update=function(){},t.prototype._build=function(){this._div.className="toolbar"},t.prototype._addTools=function(){this._tools.push(new o.RefreshTool(this._div,this._inspector)),this._tools.push(new a.LabelTool(this._div,this._inspector)),this._tools.push(new s.PickTool(this._div,this._inspector)),this._inspector.popupMode||p.Helpers.IsBrowserEdge()||this._tools.push(new l.PopupTool(this._div,this._inspector)),this._tools.push(new c.FullscreenTool(this._div,this._inspector)),this._tools.push(new u.PauseScheduleTool(this._div,this._inspector)),this._tools.push(new d.DisposeTool(this._div,this._inspector))},t.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._tools;t<n.length;t++){e+=n[t].getPixelWidth()}return e},t}(i.BasicElement);t.Toolbar=h},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(11),o=n(3),a=n(0),s=n(52),p=n(44),l=n(40),c=n(39),u=n(38),d=n(36),h=n(34),_=n(32),f=n(31),v=n(29),b=n(28),y=n(25),m=n(24),g=n(22),w=function(e){function t(t,n){var r=e.call(this)||this;r._tabs=[],r._invisibleTabs=[],r._visibleTabs=[],r._inspector=t,r._tabs.push(new v.SceneTab(r,r._inspector)),r._tabs.push(new l.ConsoleTab(r,r._inspector)),r._tabs.push(new y.StatsTab(r,r._inspector)),r._meshTab=new _.MeshTab(r,r._inspector),r._tabs.push(new m.TextureTab(r,r._inspector)),r._tabs.push(r._meshTab),r._tabs.push(new d.LightTab(r,r._inspector)),r._tabs.push(new h.MaterialTab(r,r._inspector)),c.GLTFTab.IsSupported&&r._tabs.push(new c.GLTFTab(r,r._inspector)),i&&r._tabs.push(new u.GUITab(r,r._inspector)),r._tabs.push(new f.PhysicsTab(r,r._inspector)),r._tabs.push(new p.CameraTab(r,r._inspector)),r._tabs.push(new b.SoundTab(r,r._inspector)),r._tabs.push(new g.ToolsTab(r,r._inspector)),r._toolBar=new s.Toolbar(r._inspector),r._build(),(!n||n<0||n>=r._tabs.length)&&(n=0),r._tabs[n].active(!0);for(var o=0,a=r._tabs;o<a.length;o++){var w=a[o];r._visibleTabs.push(w)}return r}return r(t,e),t.prototype.update=function(){},t.prototype._build=function(){var e=this;this._div.className="tabbar",this._div.appendChild(this._toolBar.toHtml());for(var t=0,n=this._tabs;t<n.length;t++){var r=n[t];this._div.appendChild(r.toHtml())}this._moreTabsIcon=a.Helpers.CreateElement("i","fa fa-angle-double-right more-tabs"),this._moreTabsPanel=a.Helpers.CreateDiv("more-tabs-panel"),this._moreTabsIcon.addEventListener("click",function(){if("flex"==e._moreTabsPanel.style.display)e._moreTabsPanel.style.display="none";else{var t=e._div.parentNode;t.contains(e._moreTabsPanel)||t.appendChild(e._moreTabsPanel),a.Helpers.CleanDiv(e._moreTabsPanel);for(var n=0,r=e._invisibleTabs;n<r.length;n++){var i=r[n];e._addInvisibleTabToPanel(i)}e._moreTabsPanel.style.display="flex"}})},t.prototype._addInvisibleTabToPanel=function(e){var t=this,n=a.Helpers.CreateDiv("invisible-tab",this._moreTabsPanel);n.textContent=e.name,n.addEventListener("click",function(){t._moreTabsPanel.style.display="none",t.switchTab(e)})},t.prototype.switchTab=function(e){var t=this.getActiveTab();t&&t.dispose();for(var n=0,r=this._tabs;n<r.length;n++){r[n].active(!1)}e.active(!0),this._inspector.refresh()},t.prototype.switchMeshTab=function(e){if(this.switchTab(this._meshTab),e){var t=this._meshTab.getItemFor(e);t&&this._meshTab.select(t)}},t.prototype.getActiveTab=function(){for(var e=0,t=this._tabs;e<t.length;e++){var n=t[e];if(n.isActive())return n}return null},t.prototype.getActiveTabIndex=function(){for(var e=0;e<this._tabs.length;e++)if(this._tabs[e].isActive())return e;return 0},Object.defineProperty(t.prototype,"inspector",{get:function(){return this._inspector},enumerable:!0,configurable:!0}),t.prototype.getPixelWidth=function(){for(var e=0,t=0,n=this._visibleTabs;t<n.length;t++){e+=n[t].getPixelWidth()}return e+=this._toolBar.getPixelWidth(),this._div.contains(this._moreTabsIcon)&&(e+=30),e},t.prototype.updateWidth=function(){if(this._div.parentElement){for(var e=this._div.parentElement.clientWidth,t=this.getPixelWidth();this._visibleTabs.length>0&&t>e;){var n=this._visibleTabs.pop();if(!n)break;this._invisibleTabs.push(n),this._div.removeChild(n.toHtml()),t=this.getPixelWidth()+75}if(this._invisibleTabs.length>0&&t+75<e){var r=this._invisibleTabs.pop();r&&(this._div.appendChild(r.toHtml()),this._visibleTabs.push(r)),this._div.contains(this._moreTabsIcon)&&this._div.removeChild(this._moreTabsIcon)}this._invisibleTabs.length>0&&!this._div.contains(this._moreTabsIcon)&&this._div.appendChild(this._moreTabsIcon)}},t}(o.BasicElement);t.TabBar=w},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(11),i=n(15);t.loadGUIProperties=function(){var e={ValueAndUnit:{type:r.ValueAndUnit,properties:["_value","unit"],format:function(e){return e}},Control:{type:r.Control,properties:["_alpha","_fontFamily","_color","_scaleX","_scaleY","_rotation","_currentMeasure","_width","_height","_left","_top","_linkedMesh","isHitTestVisible","isPointerBlocker"],format:function(e){return e.name}},Button:{type:r.Button,properties:new Array,format:function(e){return e.name}},ColorPicker:{type:r.ColorPicker,properties:["_value"],format:function(e){return e.name}},Checkbox:{type:r.Checkbox,properties:["_isChecked","_background"],format:function(e){return e.name}},Ellipse:{type:r.Ellipse,properties:["_thickness"],format:function(e){return e.name}},Image:{type:r.Image,properties:["_imageWidth","_imageHeight","_loaded","_source"],format:function(e){return e.name}},Line:{type:r.Line,properties:["_lineWidth","_background","_x1","_y1","_x2","_y2"],format:function(e){return e.name}},RadioButton:{type:r.RadioButton,properties:["_isChecked","_background"],format:function(e){return e.name}},Rectangle:{type:r.Rectangle,properties:["_thickness","_cornerRadius"],format:function(e){return e.name}},Slider:{type:r.Slider,properties:["_minimum","_maximum","_value","_background","_borderColor"],format:function(e){return e.name}},StackPanel:{type:r.StackPanel,properties:["_isVertical"],format:function(e){return e.name}},TextBlock:{type:r.TextBlock,properties:["_text","_textWrapping"],format:function(e){return e.name}},Container:{type:r.Container,properties:["_background"],format:function(e){return e.name}}};for(var t in e)i.PROPERTIES[t]=e[t]}},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=function(e){function t(t){var n=e.call(this)||this;n._div.className="fa fa-search texture-element",n._textureDiv=i.Helpers.CreateDiv("texture-viewer",n._div);var r=i.Helpers.CreateDiv("texture-viewer-img",n._textureDiv),o=i.Helpers.CreateDiv(null,n._textureDiv);return t&&(o.textContent=t.getBaseSize().width+"px x "+t.getBaseSize().height+"px",r.style.backgroundImage="url('"+t.url+"')",r.style.width=t.getBaseSize().width+"px",r.style.height=t.getBaseSize().height+"px"),n._div.addEventListener("mouseover",n._showViewer.bind(n,"flex")),n._div.addEventListener("mouseout",n._showViewer.bind(n,"none")),n}return r(t,e),t.prototype.update=function(e){},t.prototype._showViewer=function(e){this._textureDiv.style.display=e},t}(n(3).BasicElement);t.TextureElement=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype._populateScene=function(){var e=this,t=new i.HDRCubeTexture(this._textureUrl,this._scene,512);t.coordinatesMode=i.Texture.SKYBOX_MODE,this._cube=i.Mesh.CreateBox("hdrSkyBox",10,this._scene);var n=new i.PBRMaterial("skyBox",this._scene);n.backFaceCulling=!1,n.reflectionTexture=t,n.microSurface=1,n.disableLighting=!0,this._cube.material=n,this._cube.registerBeforeRender(function(){e._cube.rotation.y+=.01})},t}(n(20).CubeTextureElement);t.HDRCubeTextureElement=o},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=n(0),a=n(12),s=function(e){function t(t,n){var r=e.call(this)||this,s=a.Scheduler.getInstance();return r._div.className="color-element",r._div.style.backgroundColor=r._toRgba(t),r.pline=n,r._input=o.Helpers.CreateInput(),r._input.type="color",r._input.style.opacity="0",r._input.style.width="10px",r._input.style.height="15px",r._input.value=t.toHexString(),r._input.addEventListener("input",function(e){var t=i.Color3.FromHexString(r._input.value);t.r=parseFloat(t.r.toPrecision(2)),t.g=parseFloat(t.g.toPrecision(2)),t.b=parseFloat(t.b.toPrecision(2)),r.pline.validateInput(t),s.pause=!1}),r._div.appendChild(r._input),r._input.addEventListener("click",function(e){s.pause=!0}),r}return r(t,e),t.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e),this._input.value=e.toHexString())},t.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,r=255*e.b|0,o=1;return e instanceof i.Color4&&(o=e.a),"rgba("+t+", "+n+", "+r+", "+o+")"}return""},t}(n(3).BasicElement);t.ColorPickerElement=s},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(0),o=n(21),a=function(e){function t(t){return e.call(this,t)||this}return r(t,e),t.prototype.id=function(){var e="";return this._obj.name&&(e=this._obj.name),e},t.prototype.type=function(){return i.Helpers.GET_TYPE(this._obj)},t.prototype.getProperties=function(){return i.Helpers.GetAllLinesProperties(this._obj)},t.prototype.getTools=function(){var e=[];return e.push(new o.CameraPOV(this)),e},t.prototype.setPOV=function(){this._obj.getScene().switchActiveCamera(this._obj)},t.prototype.getCurrentActiveCamera=function(){var e=this._obj.getScene().activeCamera;return null!=e?e.name:"0"},t}(n(5).Adapter);t.CameraAdapter=a},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(9)),r(n(43)),r(n(21)),r(n(10)),r(n(42)),r(n(41)),r(n(26))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(4))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(8)),r(n(45)),r(n(47)),r(n(50)),r(n(46)),r(n(49)),r(n(48)),r(n(51)),r(n(52))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(44)),r(n(40)),r(n(39)),r(n(38)),r(n(36)),r(n(34)),r(n(32)),r(n(31)),r(n(7)),r(n(29)),r(n(28)),r(n(25)),r(n(6)),r(n(53)),r(n(24)),r(n(22))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(12))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(0))},function(e,t,n){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),o=function(e){function t(t){var n=e.call(this)||this;return n._div.className="color-element",n._div.style.backgroundColor=n._toRgba(t),n}return r(t,e),t.prototype.update=function(e){e&&(this._div.style.backgroundColor=this._toRgba(e))},t.prototype._toRgba=function(e){if(e){var t=255*e.r|0,n=255*e.g|0,r=255*e.b|0,o=1;return e instanceof i.Color4&&(o=e.a),"rgba("+t+", "+n+", "+r+", "+o+")"}return""},t}(n(3).BasicElement);t.ColorElement=o},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(3)),r(n(65)),r(n(57)),r(n(20)),r(n(56)),r(n(17)),r(n(55)),r(n(19))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(14)),r(n(13)),r(n(16))},function(e,t){e.exports=n},function(e,t){e.exports=r},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(e,t,n){var r={},i=function(e){var t;return function(){return void 0===t&&(t=e.apply(this,arguments)),t}}(function(){return window&&document&&document.all&&!window.atob}),o=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),a=null,s=0,p=[],l=n(70);function c(e,t){for(var n=0;n<e.length;n++){var i=e[n],o=r[i.id];if(o){o.refs++;for(var a=0;a<o.parts.length;a++)o.parts[a](i.parts[a]);for(;a<i.parts.length;a++)o.parts.push(v(i.parts[a],t))}else{var s=[];for(a=0;a<i.parts.length;a++)s.push(v(i.parts[a],t));r[i.id]={id:i.id,refs:1,parts:s}}}}function u(e,t){for(var n=[],r={},i=0;i<e.length;i++){var o=e[i],a=t.base?o[0]+t.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function d(e,t){var n=o(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=p[p.length-1];if("top"===e.insertAt)r?r.nextSibling?n.insertBefore(t,r.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),p.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=o(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function h(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=p.indexOf(e);t>=0&&p.splice(t,1)}function _(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),f(t,e.attrs),d(e,t),t}function f(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var p=s++;n=a||(a=_(t)),r=y.bind(null,n,p,!1),i=y.bind(null,n,p,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",f(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=l(r));i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){h(n),n.href&&URL.revokeObjectURL(n.href)}):(n=_(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){h(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=u(e,t);return c(n,t),function(e){for(var i=[],o=0;o<n.length;o++){var a=n[o];(s=r[a.id]).refs--,i.push(s)}e&&c(u(e,t),t);for(o=0;o<i.length;o++){var s;if(0===(s=i[o]).refs){for(var p=0;p<s.parts.length;p++)s.parts[p]();delete r[s.id]}}}};var b=function(){var e=[];return function(t,n){return e[t]=n,e.filter(Boolean).join("\n")}}();function y(e,t,n,r){var i=n?"":r.css;if(e.styleSheet)e.styleSheet.cssText=b(t,i);else{var o=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(o,a[t]):e.appendChild(o)}}},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){(t=e.exports=n(72)(!1)).push([e.i,"@import url(https://use.fontawesome.com/releases/v5.0.13/css/all.css);",""]),t.push([e.i,"@import url(https://fonts.googleapis.com/css?family=Inconsolata);",""]),t.push([e.i,'.insp-wrapper {\n user-select: none;\n display: flex;\n font-size: 0.9em;\n font-family: "Inconsolata", sans-serif;\n background-color: #242424;\n /**\r\n * A tool contained in the tree panel (available for each item of the tree)\r\n */\n /**\r\n * The toolbar contains : \r\n * - a refresh tool - refresh the whole panel\r\n * - a popup tool - Open the inspector in a new panel\r\n * ...\r\n */\n /*\r\n* 1. Set to 0 height and width, and remove border for a slider without a thumb\r\n*/ }\n .insp-wrapper .gutter {\n background-color: #2c2c2c; }\n .insp-wrapper .gutter.gutter-vertical:not(.blocked) {\n cursor: ns-resize; }\n .insp-wrapper .gutter.gutter-horizontal:not(.blocked) {\n cursor: ew-resize; }\n .insp-wrapper .insp-right-panel {\n width: 750px;\n overflow-y: auto;\n display: flex;\n flex-direction: column;\n flex-shrink: 0; }\n .insp-wrapper .insp-right-panel.popupmode {\n width: 100% !important; }\n .insp-wrapper .insp-right-panel .top-panel {\n width: 100%;\n height: 100%;\n position: relative;\n background-color: #242424;\n color: #ccc;\n font-size: 1em; }\n .insp-wrapper .insp-right-panel .top-panel .tab-panel-content {\n width: 100%;\n height: calc(100% - 50px); }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel {\n position: absolute;\n z-index: 10;\n top: 50px;\n right: 0;\n width: 100px;\n display: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n border: 1px solid #454545;\n background-color: #242424; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab {\n height: 25px;\n width: 100%;\n line-height: 25px;\n text-align: center;\n background-color: #2c2c2c;\n cursor: pointer; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:hover {\n background-color: #383838; }\n .insp-wrapper .insp-right-panel .top-panel .more-tabs-panel .invisible-tab:active {\n background-color: #454545; }\n .insp-wrapper .tooltip {\n position: absolute;\n top: 50px;\n right: 0;\n color: #f29766;\n display: none;\n z-index: 4;\n font-family: "Inconsolata", sans-serif;\n padding: 2px;\n background-color: #242424;\n border: 1px solid #454545; }\n .insp-wrapper .treeTool {\n margin: 3px 8px 3px 3px;\n cursor: pointer;\n position: relative; }\n .insp-wrapper .treeTool:hover {\n color: #5db0d7; }\n .insp-wrapper .treeTool.active {\n color: #5db0d7; }\n .insp-wrapper .tab-panel {\n height: 100%; }\n .insp-wrapper .tab-panel.searchable {\n height: calc(100% - 30px - 10px); }\n .insp-wrapper .tab-panel .texture-image {\n max-height: 400px; }\n .insp-wrapper .tab-panel .scene-actions {\n overflow-y: auto;\n padding-left: 5px; }\n .insp-wrapper .tab-panel .scene-actions .actions-title {\n font-size: 1.1em;\n padding-bottom: 10px;\n border-bottom: 1px solid #5db0d7;\n margin: 10px 0 10px 0; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action, .insp-wrapper .tab-panel .scene-actions .action-radio, .insp-wrapper .tab-panel .scene-actions .action {\n height: 20px;\n line-height: 20px;\n width: 100%;\n cursor: pointer; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:hover, .insp-wrapper .tab-panel .scene-actions .action-radio:hover, .insp-wrapper .tab-panel .scene-actions .action:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .tab-panel .scene-actions .defaut-action:active, .insp-wrapper .tab-panel .scene-actions .action-radio:active, .insp-wrapper .tab-panel .scene-actions .action:active {\n background-color: #383838; }\n .insp-wrapper .tab-panel .scene-actions .action-radio:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F111";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action-radio.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F192";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F0C8";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .scene-actions .action.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F14A";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .shader-tree-panel {\n height: 30px; }\n .insp-wrapper .tab-panel .shader-tree-panel select {\n height: 30px;\n background-color: transparent;\n color: #ccc;\n height: 30px;\n width: 100%;\n max-width: 300px;\n padding-left: 15px;\n border: 1px solid #2c2c2c;\n outline: 1px solid #454545; }\n .insp-wrapper .tab-panel .shader-tree-panel select option {\n padding: 5px;\n color: gray; }\n .insp-wrapper .tab-panel .shader-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .shader-panel pre {\n margin: 0;\n white-space: pre-wrap; }\n .insp-wrapper .tab-panel .shader-panel pre code {\n background-color: #242424 !important;\n padding: 0;\n margin: 0; }\n .insp-wrapper .tab-panel .shader-panel .shader-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel {\n min-height: 100px;\n user-select: text;\n box-sizing: border-box;\n padding: 0 15px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-title {\n height: 25px;\n border-bottom: 1px solid #383838;\n text-transform: uppercase;\n line-height: 25px;\n margin-bottom: 10px; }\n .insp-wrapper .tab-panel .console-panel .console-panel-content {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 30px); }\n .insp-wrapper .tab-panel .console-panel .defaut-line, .insp-wrapper .tab-panel .console-panel .log, .insp-wrapper .tab-panel .console-panel .warn, .insp-wrapper .tab-panel .console-panel .error, .insp-wrapper .tab-panel .console-panel .object {\n word-wrap: break-word;\n padding: 3px 0 3px 5px; }\n .insp-wrapper .tab-panel .console-panel .caller {\n padding: 3px 0 3px 0;\n color: #349ccd; }\n .insp-wrapper .tab-panel .console-panel .log {\n color: white; }\n .insp-wrapper .tab-panel .console-panel .warn {\n color: orange; }\n .insp-wrapper .tab-panel .console-panel .error {\n color: orangered; }\n .insp-wrapper .tab-panel .console-panel .object {\n color: #5db0d7; }\n .insp-wrapper .tab-panel.stats-panel {\n overflow-y: auto; }\n .insp-wrapper .tab-panel .stats-fps {\n font-weight: 600;\n color: #f29766; }\n .insp-wrapper .tab-panel .stat-title1 {\n font-size: 1.1em;\n padding: 10px; }\n .insp-wrapper .tab-panel .stat-title2 {\n margin: 10px 0 10px 0;\n font-size: 1.05em;\n border-bottom: 1px solid #5db0d7;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-label {\n display: inline-block;\n width: 80%;\n padding: 2px;\n background-color: #2c2c2c;\n border-bottom: 1px solid #242424;\n border-top: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-value {\n display: inline-block;\n width: 20%;\n padding: 2px;\n background-color: #2c2c2c;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .stat-infos {\n width: 100%;\n padding: 4px; }\n .insp-wrapper .tab-panel .gltf-actions {\n overflow-y: auto;\n padding-left: 5px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-title {\n font-size: 1.1em;\n padding-bottom: 10px;\n border-bottom: 1px solid #5db0d7;\n margin: 10px 0 10px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-action, .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox {\n height: 20px;\n line-height: 20px;\n width: 100%;\n cursor: pointer;\n white-space: nowrap; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-action:hover, .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F0C8";\n margin-right: 10px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-checkbox.active:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F14A";\n color: #5db0d7;\n margin-right: 10px; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-input {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 5px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-input:hover {\n background-color: #383838; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #ccc;\n padding: 5px 10px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button:hover {\n background-color: #383838; }\n .insp-wrapper .tab-panel .gltf-actions .gltf-button:active {\n background-color: #454545; }\n .insp-wrapper .tab-panel.tools-panel {\n overflow-y: auto; }\n .insp-wrapper .tab-panel .tool-title1 {\n font-size: 1.1em;\n padding: 10px; }\n .insp-wrapper .tab-panel .tool-title2 {\n margin: 10px 0 10px 0;\n font-size: 1.05em;\n border-bottom: 1px solid #5db0d7;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .tool-label, .insp-wrapper .tab-panel .tool-label-line, .insp-wrapper .tab-panel .tool-label-error {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 5px;\n margin: 0px 6px 0px 0; }\n .insp-wrapper .tab-panel .tool-label-line {\n width: 100%; }\n .insp-wrapper .tab-panel .tool-label-error {\n color: #fa371d;\n width: 100%;\n background-color: none; }\n .insp-wrapper .tab-panel .tool-value {\n display: inline-block;\n width: 25%;\n padding: 2px;\n background-color: #2c2c2c;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n height: 30px;\n line-height: 30px;\n box-sizing: border-box; }\n .insp-wrapper .tab-panel .tool-infos {\n width: 100%;\n padding: 4px; }\n .insp-wrapper .tab-panel .tool-input {\n background-color: #2c2c2c;\n border: none;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #ccc;\n padding: 5px 10px;\n margin: 0px 6px 0px 0;\n width: 100%;\n border-top: 1px solid #242424;\n border-bottom: 1px solid #242424;\n text-align: left; }\n .insp-wrapper .tab-panel .tool-input:hover {\n background-color: #383838;\n cursor: pointer; }\n .insp-wrapper .tab-panel .tool-input:active {\n background-color: #454545; }\n .insp-wrapper .property-type {\n color: #5db0d7; }\n .insp-wrapper .property-name, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n color: #f29766; }\n .insp-wrapper .insp-tree {\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(50% - 50px - 30px); }\n .insp-wrapper .insp-tree .line {\n padding: 3px;\n cursor: pointer; }\n .insp-wrapper .insp-tree .line:hover {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-tree .line.active {\n background-color: #454545; }\n .insp-wrapper .insp-tree .line.active .line-content {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line.unfolded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F107";\n font-weight: 900; }\n .insp-wrapper .insp-tree .line.folded:before {\n width: 1em;\n height: 1em;\n line-height: 1em;\n display: inline-block;\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\F105";\n font-weight: 900; }\n .insp-wrapper .insp-tree .line.unfolded.transformNode > span:first-of-type {\n color: #f29766; }\n .insp-wrapper .insp-tree .line.folded.transformNode > span:first-of-type {\n color: #f29766; }\n .insp-wrapper .insp-tree .line .line-content {\n padding-left: 15px; }\n .insp-wrapper .insp-tree .line .line-content:hover {\n background-color: #242424; }\n .insp-wrapper .insp-tree .line .line-content .line:hover:first-child {\n background-color: #383838; }\n .insp-wrapper .insp-tree .line_invisible {\n display: none; }\n .insp-wrapper .insp-details {\n background-color: #242424;\n overflow-y: auto;\n overflow-x: auto;\n color: #ccc;\n font-family: "Inconsolata", sans-serif; }\n .insp-wrapper .insp-details .details {\n padding-left: 5px; }\n .insp-wrapper .insp-details .base-row, .insp-wrapper .insp-details .row, .insp-wrapper .insp-details .header-row {\n display: flex;\n width: 100%; }\n .insp-wrapper .insp-details .base-row .base-property, .insp-wrapper .insp-details .row .base-property, .insp-wrapper .insp-details .header-row .base-property, .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name, .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n padding: 2px 0 2px 0;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden; }\n .insp-wrapper .insp-details .base-row .prop-name, .insp-wrapper .insp-details .row .prop-name, .insp-wrapper .insp-details .header-row .prop-name {\n width: 35%; }\n .insp-wrapper .insp-details .base-row .prop-value, .insp-wrapper .insp-details .row .prop-value, .insp-wrapper .insp-details .header-row .prop-value {\n width: 59%;\n padding-left: 5px; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable, .insp-wrapper .insp-details .row .prop-value.clickable, .insp-wrapper .insp-details .header-row .prop-value.clickable {\n cursor: pointer; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:hover, .insp-wrapper .insp-details .row .prop-value.clickable:hover, .insp-wrapper .insp-details .header-row .prop-value.clickable:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .base-row .prop-value.clickable:after, .insp-wrapper .insp-details .row .prop-value.clickable:after, .insp-wrapper .insp-details .header-row .prop-value.clickable:after {\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\A0 \\A0 \\A0 \\F105";\n font-weight: 900; }\n .insp-wrapper .insp-details .row:nth-child(even) {\n background-color: #2c2c2c; }\n .insp-wrapper .insp-details .row.unfolded .prop-value.clickable:after {\n font-family: "Font Awesome 5 Free", sans-serif;\n content: "\\A0 \\A0 \\A0 \\F107";\n font-weight: 900; }\n .insp-wrapper .insp-details .header-row {\n background-color: #2c2c2c;\n color: #ccc;\n width: 100%;\n max-width: 100%; }\n .insp-wrapper .insp-details .header-row > * {\n color: #ccc !important;\n padding: 5px 0 5px 5px !important;\n cursor: pointer; }\n .insp-wrapper .insp-details .header-row > *:hover {\n background-color: #383838; }\n .insp-wrapper .insp-details .header-row .header-col {\n display: flex;\n justify-content: space-between;\n align-items: center; }\n .insp-wrapper .insp-details .header-row .header-col .sort-direction {\n margin-right: 5px; }\n .insp-wrapper .insp-details .element-viewer, .insp-wrapper .insp-details .color-element, .insp-wrapper .insp-details .texture-element {\n position: relative;\n width: 10px;\n height: 10px;\n display: inline-block;\n margin-left: 5px; }\n .insp-wrapper .insp-details .color-element {\n width: 20px;\n height: 15px; }\n .insp-wrapper .insp-details .texture-element {\n color: #f29766;\n margin-left: 10px; }\n .insp-wrapper .insp-details .texture-element .texture-viewer {\n color: #ccc;\n position: absolute;\n z-index: 10;\n bottom: 0;\n right: 0;\n display: block;\n width: 150px;\n height: 150px;\n border: 1px solid #454545;\n background-color: #242424;\n transform: translateX(100%) translateY(100%);\n display: none;\n flex-direction: column;\n justify-content: flex-start;\n align-items: center; }\n .insp-wrapper .insp-details .texture-element .texture-viewer .texture-viewer-img {\n margin: 10px 0 10px 0;\n max-width: 110px;\n max-height: 110px; }\n .insp-wrapper .tabbar {\n height: 50px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #383838;\n width: 100%;\n overflow-x: auto;\n overflow-y: hidden;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab {\n height: calc(50px - 2px);\n width: auto;\n padding: 0 10px 0 10px;\n color: #ccc;\n line-height: 50px;\n text-align: center;\n cursor: pointer;\n margin: 0 5px 0 5px;\n box-sizing: border-box; }\n .insp-wrapper .tabbar .tab:hover {\n border-bottom: 1px solid #f29766;\n background-color: #2c2c2c; }\n .insp-wrapper .tabbar .tab:active {\n background-color: #383838; }\n .insp-wrapper .tabbar .tab.active {\n border-bottom: 1px solid #f29766; }\n .insp-wrapper .tabbar .more-tabs {\n width: 50px;\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .tabbar .more-tabs:hover {\n background-color: #383838; }\n .insp-wrapper .tabbar .more-tabs:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .tabbar .more-tabs.active {\n color: #f29766; }\n .insp-wrapper .toolbar {\n display: flex; }\n .insp-wrapper .toolbar .tool {\n width: 50px;\n height: 50px;\n display: flex;\n justify-content: center;\n align-items: center;\n cursor: pointer;\n position: relative;\n border-right: 1px solid #383838; }\n .insp-wrapper .toolbar .tool:hover {\n background-color: #383838; }\n .insp-wrapper .toolbar .tool:active {\n color: #f29766;\n background-color: #454545; }\n .insp-wrapper .toolbar .tool.active {\n color: #f29766; }\n .insp-wrapper .searchbar {\n border: 1px solid #2c2c2c;\n margin-bottom: 5px;\n display: flex;\n align-items: center;\n color: #b3b3b3; }\n .insp-wrapper .searchbar input {\n background-color: #242424;\n border: none;\n width: 100%;\n outline: none;\n font-family: "Inconsolata", sans-serif;\n color: #b3b3b3;\n padding: 3px 0 3px 10px;\n margin: 6px 0 6px 0; }\n .insp-wrapper input[type="range"] {\n margin: auto;\n -webkit-appearance: none;\n position: relative;\n overflow: hidden;\n height: 15px;\n width: 50%;\n cursor: pointer;\n border-radius: 0;\n /* iOS */ }\n .insp-wrapper ::-webkit-slider-runnable-track {\n background: #ddd; }\n .insp-wrapper ::-webkit-slider-thumb {\n -webkit-appearance: none;\n width: 20px;\n /* 1 */\n height: 15px;\n /* 1 */\n background: #fff;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n border: 0px solid #999;\n /* 1 */ }\n .insp-wrapper ::-moz-range-track {\n height: 15px;\n background: #ddd; }\n .insp-wrapper ::-moz-range-thumb {\n background: #fff;\n height: 15px;\n width: 20px;\n border: 0px solid #999;\n border-radius: 0 !important;\n box-shadow: -100vw 0 0 100vw dodgerblue;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-fill-lower {\n background: dodgerblue; }\n .insp-wrapper ::-ms-thumb {\n background: #fff;\n border: 0px solid #999;\n height: 15px;\n width: 20px;\n box-sizing: border-box; }\n .insp-wrapper ::-ms-ticks-after {\n display: none; }\n .insp-wrapper ::-ms-ticks-before {\n display: none; }\n .insp-wrapper ::-ms-track {\n background: #ddd;\n color: transparent;\n height: 15px;\n border: none; }\n .insp-wrapper ::-ms-tooltip {\n display: none; }\n',""])},function(e,t,n){var r=n(73);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(71)(r,i);r.locals&&(e.exports=r.locals)},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(5)),r(n(58)),r(n(37)),r(n(35)),r(n(33)),r(n(18)),r(n(30)),r(n(27)),r(n(23))},function(e,t,n){"use strict";function r(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),r(n(75)),r(n(67)),r(n(66)),r(n(64)),r(n(63)),r(n(62)),r(n(61)),r(n(60)),r(n(59)),r(n(2)),r(n(15)),r(n(54))}])}); //# sourceMappingURL=babylon.inspector.bundle.js.map
72,069.5
144,086
0.729768
96a7d621d52c2d98ca77a6ef38c235d7286c8943
752
js
JavaScript
backend/src/app/controllers/StudentController.js
fcsouza/mentor-tech
587f1f0e66c631f50a36963107709bab6f6797e3
[ "MIT" ]
null
null
null
backend/src/app/controllers/StudentController.js
fcsouza/mentor-tech
587f1f0e66c631f50a36963107709bab6f6797e3
[ "MIT" ]
null
null
null
backend/src/app/controllers/StudentController.js
fcsouza/mentor-tech
587f1f0e66c631f50a36963107709bab6f6797e3
[ "MIT" ]
null
null
null
import Student from '../models/Student'; class StudentController { async index(req, res) { const students = await Student.findAll({ where: { school_id: req.params.school_id, active: true }, }); return res.json(students); } async store(req, res) { const studentExists = await Student.findOne({ where: { school_id: req.body.school_id, email: req.body.email, }, }); if (studentExists) { return res.status(400).json({ error: 'Student already exists' }); } const { id, name, email, tel, school_id } = await Student.create(req.body); return res.json({ id, name, email, tel, school_id, }); } } export default new StudentController();
20.324324
79
0.594415
96a7ffe72866b592d404b983322491560bbde045
3,701
js
JavaScript
source/node/export/renderMarkdown.js
dr-js/dr-dev
ef71eceebd8df866dde58c4232591d2266dc924a
[ "MIT" ]
null
null
null
source/node/export/renderMarkdown.js
dr-js/dr-dev
ef71eceebd8df866dde58c4232591d2266dc924a
[ "MIT" ]
1
2020-03-23T10:12:53.000Z
2020-03-23T10:12:53.000Z
source/node/export/renderMarkdown.js
dr-js/dr-dev
ef71eceebd8df866dde58c4232591d2266dc924a
[ "MIT" ]
1
2019-10-23T22:12:03.000Z
2019-10-23T22:12:03.000Z
import { relative } from 'path' import { padTable } from '@dr-js/core/module/common/format.js' import { indentLine, forEachRegExpExec } from '@dr-js/core/module/common/string.js' import { toPosixPath } from '@dr-js/core/module/node/fs/Path.js' import { HOIST_LIST_KEY, EXPORT_LIST_KEY, EXPORT_HOIST_LIST_KEY } from './generate.js' // check: https://gist.github.com/asabaylus/3071099 // [Export Path](#export-path) // [Bin Option Format](#bin-option-format) // [Strange Format](#strange---format) // [Strange , , Format ALT](#strange---format-alt) const getMarkdownHeaderLink = ( text, link = text.trim().toLowerCase() // borrow from marked: https://github.com/markedjs/marked/blob/v0.8.2/lib/marked.js#L1046 .replace(/<[!/a-z].*?>/ig, '') .replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g, '') .replace(/\s/g, '-') ) => `[${text}](#${link})` const REGEXP_MARKDOWN_HEADER = /^#{1,6}(.+?)#*$/gm // TODO: will mis-match comment in bash, use `marked`? const matchMarkdownHeader = (string) => { const headerTextList = [] forEachRegExpExec(REGEXP_MARKDOWN_HEADER, string, ([ , group1 ]) => { const headerText = group1.trim() headerText && headerTextList.push(headerText) }) return headerTextList } const renderMarkdownAutoAppendHeaderLink = (...markdownStringList) => { const headerTextList = matchMarkdownHeader(markdownStringList.join('\n')) return headerTextList.length ? [ ...headerTextList.map((text) => `* ${getMarkdownHeaderLink(text)}`), '', ...markdownStringList ] : [] } const escapeMarkdownLink = (name) => name.replace(/_/g, '\\_') const getMarkdownFileLink = (path) => `📄 [${escapeMarkdownLink(path)}](${path})` const getMarkdownDirectoryLink = (path) => `📁 [${escapeMarkdownLink(path).replace(/\/*$/, '/')}](${path})` const renderMarkdownBlockQuote = (text) => [ '> ```', indentLine(text, '> '), '> ```' ] const renderMarkdownTable = ({ headerRow = [], cellRowList = [], padFuncList = [], table = [ headerRow, headerRow.map((_, index) => { const pad = padFuncList[ index ] return pad === 'L' ? ':----' : pad === 'R' ? '----:' : ':---:' }), ...cellRowList ] }) => [ '', // add empty line '' for better parser support ...padTable({ table, padFuncList, cellPad: ' | ', rowPad: '\n' }).split('\n') .map((text) => `| ${text} |`) ] const renderMarkdownExportPath = ({ exportInfoMap, rootPath }) => Object.entries(exportInfoMap) .reduce((textList, [ path, value ]) => { value[ EXPORT_LIST_KEY ] && textList.push( `+ ${getMarkdownFileLink(`${toPosixPath(relative(rootPath, path))}.js`)}`, ` - ${value[ EXPORT_LIST_KEY ].map((text) => `\`${text}\``).join(', ')}` ) return textList }, []) const renderMarkdownExportTree = ({ exportInfo, routeList }) => Object.entries(exportInfo) .reduce((textList, [ key, value ]) => { if (key === HOIST_LIST_KEY) { // skip } else if (key === EXPORT_LIST_KEY || key === EXPORT_HOIST_LIST_KEY) { textList.push(`- ${value.map((text) => `\`${text}\``).join(', ')}`) } else { const childTextList = renderMarkdownExportTree({ exportInfo: value, routeList: [ ...routeList, key ] }) childTextList.length && textList.push(`- **${key}**`, ...childTextList.map((text) => ` ${text}`)) } return textList }, []) export { // TODO: NOTE: all func name like `renderMarkdown*` should return Array, others should return String getMarkdownHeaderLink, escapeMarkdownLink, getMarkdownFileLink, getMarkdownDirectoryLink, renderMarkdownAutoAppendHeaderLink, renderMarkdownBlockQuote, renderMarkdownTable, renderMarkdownExportPath, renderMarkdownExportTree }
37.01
109
0.632262
96a86319d5ad338aa96f42aac8c70fc270444996
5,571
js
JavaScript
SpectroWebApplication/Scripts/spectro.wysiwyg.js
qrelly/spectro-backend-asp.net
18562f316d227296d8415755690e46b9d2d7d076
[ "MIT" ]
null
null
null
SpectroWebApplication/Scripts/spectro.wysiwyg.js
qrelly/spectro-backend-asp.net
18562f316d227296d8415755690e46b9d2d7d076
[ "MIT" ]
null
null
null
SpectroWebApplication/Scripts/spectro.wysiwyg.js
qrelly/spectro-backend-asp.net
18562f316d227296d8415755690e46b9d2d7d076
[ "MIT" ]
null
null
null
(function() { $.fn.spectro.extensions.wysiwyg = { selector: 'p[spectro-editable="true"]', label: 'Format', $lastTouchedElement: null, prepare: function($target, activeElements) { var $scheme, extension, items; if (activeElements == null) { activeElements = []; } $scheme = $target.data('scheme'); extension = this; items = []; $scheme.children().each(function() { var $checkbox, $child, $item, tagName; tagName = this.tagName; $child = $(this); $item = $("<label class=\"spectro-popover__list__item\" title=\"" + ($child.attr('spectro-label')) + "\">\n <input type=\"checkbox\" hidden />\n <span class=\"spectro-icon\">" + ($child.attr('spectro-icon')) + "</span>\n</label>"); $checkbox = $item.find('input[type="checkbox"]'); if (activeElements.indexOf(tagName) > -1) { $checkbox.attr('checked', true); } $checkbox.on('change', function(event) { var $dummy, $element, $hookAfter, $hookBefore, $replacement, element, exception, range, replacement, selection; selection = $target.spectro('selection'); if (selection != null) { range = selection.getRangeAt(0); } else if (extension.$lastTouchedElement != null) { range = document.createRange(); range.selectNode(extension.$lastTouchedElement.get(0)); selection = window.getSelection(); selection.addRange(range); } else { return; } try { if (this.checked) { document.execCommand('fontName', false, 'spectro-dummy'); $dummy = $('font[face="spectro-dummy"]'); $replacement = $("<" + tagName + " />"); $replacement.html($dummy.html()); replacement = $replacement.get(0); $dummy.replaceWith(replacement); range.selectNode(replacement); selection.removeAllRanges(); selection.addRange(range); extension.$lastTouchedElement = $replacement; } else if (extension.$lastTouchedElement != null) { $element = extension.$lastTouchedElement; while (!$element.hasClass($.fn.spectro.classes.enabledElementClass)) { element = $element.get(0); if (element == null) { break; } if (element.tagName.toLowerCase() === tagName) { $hookBefore = $('<span />'); $hookAfter = $('<span />'); $element.before($hookBefore); $element.after($hookAfter); $element.contents().unwrap(); extension.$lastTouchedElement = $element.parent(); range.setStartAfter($hookBefore.get(0)); range.setEndBefore($hookAfter.get(0)); $hookBefore.remove(); $hookAfter.remove(); break; } $element = $element.parent(); } } } catch (_error) { exception = _error; $checkbox.attr('checked', false); } selection.removeAllRanges(); return selection.addRange(range); }); return items.push($item); }); return items; }, enable: function($target) { var child, children, extension, popover, _i, _len, _ref; popover = Spectro.Popover.get(); extension = this; children = []; _ref = $target.data('scheme').children(); for (_i = 0, _len = _ref.length; _i < _len; _i++) { child = _ref[_i]; children.push(child.tagName); } return $target.on('mousedown.spectro-wysiwyg', function(event) { return extension.$lastTouchedElement = null; }).on('click.spectro-wysiwyg', children.join(','), function(event) { var $container, $this, activeElements, offset, position; event.stopPropagation(); $this = $(this); extension.$lastTouchedElement = $this; activeElements = []; $container = $this; while (!$container.hasClass($.fn.spectro.classes.enabledElementClass)) { activeElements.push($container.prop('tagName').toLowerCase()); $container = $container.parent(); } popover.clean(); popover.addAll(extension.prepare($target, activeElements)); offset = $this.offset(); position = { x: offset.left + $this.outerWidth() / 2, y: offset.top }; return popover.show(position); }).on('mouseup.spectro-wysiwyg keyup.spectro-wysiwyg touchend.spectro-wysiwyg', function(event) { var box, position, range, selection; selection = $target.spectro('selection'); if ($target.is(':focus') && (selection != null) && !selection.isCollapsed) { event.stopPropagation(); position = { x: 0, y: 0 }; range = selection.getRangeAt(0); box = range.getBoundingClientRect(); position.x = box.left + box.width / 2; position.y = $(document).scrollTop() + box.top; popover.clean(); popover.addAll(extension.prepare($target)); return popover.show(position); } else { return popover.hide(); } }); }, disable: function($target) { return $target.off('.spectro-wysiwyg'); } }; }).call(this);
39.792857
239
0.533118
96a983729076672443d05c4be7bf7864c884435e
2,257
js
JavaScript
vendors/filemanager/js/vendor/jquery.cleditor.kcfinder.js
figa-Oz/bulma-scss
8618e7271b50979bc201a25b229346f90495c233
[ "MIT" ]
null
null
null
vendors/filemanager/js/vendor/jquery.cleditor.kcfinder.js
figa-Oz/bulma-scss
8618e7271b50979bc201a25b229346f90495c233
[ "MIT" ]
2
2020-07-16T15:31:17.000Z
2021-05-08T00:23:25.000Z
vendors/filemanager/js/vendor/jquery.cleditor.kcfinder.js
agifsofyan/HMVC-CI-BULMA-SCSS
8618e7271b50979bc201a25b229346f90495c233
[ "MIT" ]
null
null
null
/** @preserve CLEditor KCFINDER filemanager Image Plugin v1.0.0 http://kcfinder.sunhater.com/ from Pavel Tzonkov (sunhater@sunhater.com) http://premiumsoftware.net/cleditor - requires CLEditor v1.3.0 or later Copyright 2015, Zoran Cindori Select image from server or upload new image. Usage: - include this file after jquery.cleditor.min.js in your web site - call $.cleditor.set_kcfinder(path) function to set path to KCFINDER filemanager root directory where browse.php exists e.g. $.cleditor.set_kcfinder('libs/kcfinder'); - and that is all, click on "Insert Image" toolbar button, browse for image(KCFINDER), select image, Submit, and now you have image in you cleditor. */ (function($) { /* method to set path for kcfinder file manager and activate plugin */ $.cleditor.set_kcfinder= function(path) { /* id for input:text field */ var field_id = "cleditor-input-url"; /* remove possible trailing slash from path */ $.cleditor.kcfinder_url = path.substr(path.length - 1) == '/' ? path.substr(0, path.length - 1) : path; /* we are changing original toolbar button for image insertion */ $.cleditor.buttons.image.popupClass = 'cleditorPrompt'; /* new popup code, input field now has specified id=cleditor-input-url, we also add link to click on to display file manager window */ $.cleditor.buttons.image.popupContent = 'Enter URL or browse for image<br><input id="' + field_id + '" type="text" value="http://" style="width:300px;cursor:pointer"><br>' + '<hr /><a onclick="$.cleditor.kcfinder_function(\'' + field_id + '\')">Browse for image (KCFINDER)</a><hr /><input type=button value="Submit">'; } $.cleditor.kcfinder_function = function(field) { /* kcfinder callback function */ window.KCFinder = { callBack: function(url) { window.KCFinder = null; /* set url to input field */ $('#' + field).val(url).trigger('change'); } }; /* function to display kcfinder file manager window, type=image.*/ window.open($.cleditor.kcfinder_url + "/browse.php?type=image", "kcfinder_cleditor", "status=0, toolbar=0, location=0, menubar=0, directories=0, " + "resizable=0, scrollbars=0, width=800, height=600" ); } })(jQuery);
48.021277
176
0.683651
96abc9c236bc9c65306dc8bfdf9b2a6aabb100e6
521
js
JavaScript
app/containers/UsersPage/reducer.js
burcakulug/mytvguide
309da6bfaa183a8158069e89120e064fbd4b8693
[ "MIT" ]
null
null
null
app/containers/UsersPage/reducer.js
burcakulug/mytvguide
309da6bfaa183a8158069e89120e064fbd4b8693
[ "MIT" ]
null
null
null
app/containers/UsersPage/reducer.js
burcakulug/mytvguide
309da6bfaa183a8158069e89120e064fbd4b8693
[ "MIT" ]
null
null
null
/* * * UsersPage reducer * */ import { fromJS } from 'immutable'; import { CREATE_USER, SELECT_USER, } from './constants'; const initialState = fromJS({ selected: '', all: [], }); function usersPageReducer(state = initialState, action) { switch (action.type) { case CREATE_USER: return state.set('all', state.get('all').push({ name: action.name })); case SELECT_USER: return state.set('selected', action.name); default: return state; } } export default usersPageReducer;
17.366667
76
0.641075
96abf19522488ef21a7d5fcfd3852039f1a1903a
700
js
JavaScript
src/common/constants.js
uniquker/ReactNativeMobxDemo
f3c94fc50e0897c144879864dc63153615ebe41e
[ "MIT" ]
14
2019-09-29T04:08:03.000Z
2022-03-19T14:28:19.000Z
src/common/constants.js
uniquker/ReactNativeMobxDemo
f3c94fc50e0897c144879864dc63153615ebe41e
[ "MIT" ]
4
2019-12-30T03:45:39.000Z
2022-02-12T21:45:49.000Z
src/common/constants.js
uniquker/ReactNativeMobxDemo
f3c94fc50e0897c144879864dc63153615ebe41e
[ "MIT" ]
1
2019-10-27T06:20:04.000Z
2019-10-27T06:20:04.000Z
/** * 提供基础配置信息 * constants.js 提供如服务器地址、分页数量、设备类型、设备号、版本号等配置 */ import { Platform } from 'react-native' import DeviceInfo from 'react-native-device-info' function getUid(){ debugger; let result= DeviceInfo.getUniqueID() // .then(r=>{ // result = r; // }); // console.log(result); return result; } // export const deviceNo = DeviceInfo.getUniqueID(); // export const versionName = DeviceInfo.getVersion(); export default { serverUrl: 'http://127.0.0.1:3600/portal', pageSize: 10, deviceType: Platform.OS.toUpperCase(), deviceNo: DeviceInfo.getUniqueID(),//.replace('-').substr(0, 12) versionName: DeviceInfo.getVersion(), //也可写死如'1.0.0' LOADING_EMIT: 'LOADING_EMIT', }
25.925926
67
0.684286
96ac0675fee43b14411b0ee5d552adfe05c37f8a
431
js
JavaScript
icons/Cross/content.js
agriffis/welcome-ui
3f1deae2f8590c28d82a56d5d637fbb95d11d4f5
[ "MIT" ]
1
2021-09-23T22:00:39.000Z
2021-09-23T22:00:39.000Z
icons/Cross/content.js
agriffis/welcome-ui
3f1deae2f8590c28d82a56d5d637fbb95d11d4f5
[ "MIT" ]
null
null
null
icons/Cross/content.js
agriffis/welcome-ui
3f1deae2f8590c28d82a56d5d637fbb95d11d4f5
[ "MIT" ]
null
null
null
export default { width: 15, height: 15, block: '<path d="M49.42 39.78L82.87 2.42a7.22 7.22 0 0 1 10.22-.56 7.28 7.28 0 0 1 .56 10.26l-33.39 37.3 32.8 29.14c3 2.66 3.27 7.25.62 10.25a7.23 7.23 0 0 1-10.23.62l-32.87-29.2-33.45 37.36a7.22 7.22 0 0 1-5.39 2.41 7.18 7.18 0 0 1-4.83-1.86 7.28 7.28 0 0 1-.56-10.26l33.39-37.3-32.8-29.13a7.29 7.29 0 0 1-.62-10.26 7.23 7.23 0 0 1 10.23-.61l32.87 29.2z" fill="currentColor"/>' }
61.571429
375
0.61949
96ae8fac1082919793064999566fe48a2a0af084
4,092
js
JavaScript
src/item.js
michaelBenin/anima
8b199cf9216b83c7b01672a6d1264843379b06c7
[ "MIT" ]
1
2015-11-07T12:39:40.000Z
2015-11-07T12:39:40.000Z
src/item.js
michaelBenin/anima
8b199cf9216b83c7b01672a6d1264843379b06c7
[ "MIT" ]
null
null
null
src/item.js
michaelBenin/anima
8b199cf9216b83c7b01672a6d1264843379b06c7
[ "MIT" ]
null
null
null
/** * Creates new animated item * @param {HTMLElement} node * @constructor */ function Item(node) { EventEmitter.call(this) this.dom = node this.init() } Item.prototype = Object.create(EventEmitter.prototype) Item.prototype.constructor = Item /** * Initializes item */ Item.prototype.init = function () { this.animation = new Sequence(this) this.running = true this.state = { translate: Vector.zero(), rotate: Vector.zero(), scale: Vector.set(1), opacity: 1 } } /** * Updates item on frame * @param {number} tick */ Item.prototype.update = function (tick) { this.animation.run(tick) } /** * Updates item on timeline * @param {number} tick */ Item.prototype.timeline = function (tick) { this.clear() this.animation.seek(tick) } /** * Pauses item animation */ Item.prototype.pause = function () { if (!this.running) return this.animation.pause() this.running = false } /** * Resumes item animation */ Item.prototype.resume = function () { if (this.running) return this.animation.resume() this.running = true } /** * Sets style to the dom node * @param {string=} property * @param {string=} value */ Item.prototype.style = function (property, value) { if (property && value) { this.dom.style[property] = value } else { this.dom.style[_transformProperty] = this.transform() this.dom.style.opacity = this.opacity() } } /** * Returns transform CSS value * @return {string} */ Item.prototype.transform = function () { return Matrix.stringify(this.matrix()) } /** * Calculates transformation matrix for the state * @return {Object} */ Item.prototype.matrix = function () { var state = this.state return Matrix.compose( state.translate, state.rotate, state.scale ) } /** * Gets transformation needed to make Item in center * @return {Object} */ Item.prototype.center = function () { return Matrix.decompose(Matrix.inverse(this.matrix())) } /** * Rotates item to look at vector * @param {Array} vector */ Item.prototype.lookAt = function (vector) { var transform = Matrix.decompose(Matrix.lookAt( vector, this.state.translate, Vector.set(0, 1, 0) )) this.state.rotate = transform.rotate } /** * Returns item opacity * @return {string|number} */ Item.prototype.opacity = function () { return this.state.opacity } /** * Adds values to state params * @param {string} type * @param {Array} a */ Item.prototype.add = function (type, a) { this.state[type][0] += a[0] this.state[type][1] += a[1] this.state[type][2] += a[2] return this } /** * Sets values to state params * @param {string} type * @param {Array} a */ Item.prototype.set = function (type, a) { this.state[type] = a return this } /** * Translates item in XYZ axis * @param {Array} t Coordinates */ Item.prototype.translate = function (t) { return this.add('translate', t) } /** * Rotates item in XYZ * @param {Array} r Angles in radians */ Item.prototype.rotate = function (r) { return this.add('rotate', r) } /** * Scale item in XYZ * @param {Array} s Scale values */ Item.prototype.scale = function (s) { return this.add('scale', s) } /** * Clears item transform */ Item.prototype.clear = function () { this.state.translate = Vector.zero() this.state.rotate = Vector.zero() this.state.scale = Vector.set(1) this.state.opacity = 1 } /** * Adds animation * @param {Object|Array} transform * @param {number} duration * @param {string} ease * @param {number} delay * @return {Sequence} */ Item.prototype.animate = function (transform, duration, ease, delay) { return this.animation.add(transform, duration, ease, delay) } /** * Finishes all Item animations * @param {boolean} abort */ Item.prototype.finish = function (abort) { this.animation.end(abort) return this } /** * Stops all Item animations */ Item.prototype.stop = function () { return this.finish(true) } /** * Generates CSS animation or transition * @param {boolean=} idle * @return {CSS} */ Item.prototype.css = function (idle) { return new CSS(this, idle) }
18.515837
70
0.658113
96ae974030526ce9caeb96535ba279aff1c44dcf
239
js
JavaScript
src/selectors/basePage.js
oliverliutao/mochaWebdriverIOBDD
07381e345e788d93f00b4ceb4315f16307a3b493
[ "MIT" ]
null
null
null
src/selectors/basePage.js
oliverliutao/mochaWebdriverIOBDD
07381e345e788d93f00b4ceb4315f16307a3b493
[ "MIT" ]
null
null
null
src/selectors/basePage.js
oliverliutao/mochaWebdriverIOBDD
07381e345e788d93f00b4ceb4315f16307a3b493
[ "MIT" ]
null
null
null
module.exports = { pageSubHeaderLocator: '.subheader', footerTextLocator: '#page-footer', pageMessageLocator: '.flash', h2Selector: 'div.example h2', h3Selector: 'div.example h3', closeButton: '#flash > .close', };
26.555556
39
0.656904
96ae9a410d591defbbd4517a74be1cdf06364879
7,580
js
JavaScript
src/scenes/Game.js
Aanchi-glitch2744/Pong_Game-Phaser3
72ddacbb9b5eaa962492c6fc24f0a44e1af9fd3a
[ "MIT" ]
null
null
null
src/scenes/Game.js
Aanchi-glitch2744/Pong_Game-Phaser3
72ddacbb9b5eaa962492c6fc24f0a44e1af9fd3a
[ "MIT" ]
null
null
null
src/scenes/Game.js
Aanchi-glitch2744/Pong_Game-Phaser3
72ddacbb9b5eaa962492c6fc24f0a44e1af9fd3a
[ "MIT" ]
null
null
null
import Phaser from 'phaser' import { GameBackground, GameOver } from '../consts/SceneKeys' import * as Colors from '../consts/Colors' import { PressStart2P } from '../consts/Fonts' import * as AudioKeys from '../consts/AudioKeys' const GameState = { Running: 'running', PlayerWon: 'player-won', AIWon: 'ai-won' } class Game extends Phaser.Scene { init(){ this.gameState = GameState.Running this.paddleRightVelocity = new Phaser.Math.Vector2(0, 0) this.leftScore = 0 this.rightScore = 0 this.paused = false } //preload() create() { this.scene.run(GameBackground) this.scene.sendToBack(GameBackground) //make the background appear in the backside. this.physics.world.setBounds(-100, 0, 1000, 500) this.ball= this.add.circle(400, 250, 10, Colors.white, 1) //create a white ball in the centre of screen this.physics.add.existing(this.ball) //add physics to ball this.ball.body.setCircle(10) //to make the reacting physics be in circle of radius 10, i.e. same as ball. this.ball.body.setBounce(1, 1) this.ball.body.setMaxSpeed(400) //400px per second this.ball.body.setCollideWorldBounds(true, 1, 1) //Added ball bouncing capabilities off the border/bounds of screen this.ball.body.onWorldBounds = true // this.resetBall() //was here, moving to save from resetting without time when TitleScreen goes off. this.paddleLeft = this.add.rectangle(50, 250, 30, 100, Colors.white, 1) //add a player paddle in left side of screen. this.physics.add.existing(this.paddleLeft, true) //added physics to surroundings and ball. this.paddleRight = this.add.rectangle(750, 250, 30, 100, Colors.white, 1) this.physics.add.existing(this.paddleRight, true) this.physics.add.collider(this.paddleLeft, this.ball, this.handlePaddleBallCollision, undefined, this) //react on colliding the paddle(left) with the ball. this.physics.add.collider(this.paddleRight, this.ball, this.handlePaddleBallCollision, undefined, this) this.physics.world.on('worldbounds', this.handleBallWorldBoundsCollision, this) const scoreStyle = { fontSize: 48, fontFamily: PressStart2P //use both quites if there is a spacing in font name. } this.leftScoreLabel = this.add.text(300, 125, '0', scoreStyle) //Adding score .setOrigin(0.5, 0.5) this.rightScoreLabel = this.add.text(500, 375, '0', scoreStyle) .setOrigin(0.5, 0.5) this.cursors= this.input.keyboard.createCursorKeys() //Make Up and down keys. this.time.delayedCall(1500, ()=> { this.resetBall() //restes screen after 1500 seconds. }) } update(){ if(this.paused || this.gameState !== GameState.Running){ //don't do anyting if pause is returned return } //player key input logic was here this.processPlayerInput() // ai logic was here. Logic that computer's paddle right always hits the ball. this.updateAI() //scoring logic was here this.checkScore() } handleBallWorldBoundsCollision(body, up, down, left, right){ if(left || right){ return } this.sound.play(AudioKeys.PongPlop) } handlePaddleBallCollision(paddle, ball){ // console.dir(paddle) // console.dir(ball) this.sound.play(AudioKeys.PongBeep) /** @type {Phaser.Physics.Arcade.Body} */ const body = this.ball.body const vel = body.velocity vel.x *= 1.05 vel.y *= 1.05 body.setVelocity(vel.x, vel.y) } processPlayerInput() { /** @type {Phaser.Physics.Arcade.StaticBody} */ //To tell the js that body is type of Phaser.Arcade.Body const body = this.paddleLeft.body if (this.cursors.up.isDown){ this.paddleLeft.y -= 10 //go up body.updateFromGameObject() //To update the physics box. } else if (this.cursors.down.isDown){ this.paddleLeft.y += 10 //go down body.updateFromGameObject() } } updateAI() { const diff = this.ball.y - this.paddleRight.y if(Math.abs(diff) < 10){ //to make the right paddle move smoothly without jitter //don't return anything return } const aiSpeed = 3 if(diff< 0){ //ball is above the paddle this.paddleRightVelocity.y = -aiSpeed if (this.paddleRightVelocity.y < -10){ this.paddleRightVelocity.y = -10 } } else if(diff > 0){ //ball is below the paddle this.paddleRightVelocity.y = aiSpeed if (this.paddleRightVelocity.y > 10){ this.paddleRightVelocity.y = 10 } } this.paddleRight.y += this.paddleRightVelocity.y this.paddleRight.body.updateFromGameObject() } checkScore() { const x = this.ball.x const leftBounds = -30 const rightBounds = 830 if (x >= leftBounds && x <= rightBounds){ return } if(this.ball.x < leftBounds){ //scored on the left side // this.resetBall() this.incrementRightScore() } else if(this.ball.x > rightBounds){ //scored on the right side // this.resetBall() this.incrementLeftScore() } const maxScore = 7 if (this.leftScore >= maxScore) { //Player won. // this.paused = true this.gameState = GameState.PlayerWon } else if (this.rightScore >= maxScore) { //AI won. // this.paused = true this.gameState = GameState.AIWon } // if(!this.paused){ // this.resetBall() // } if(this.gameState === GameState.Running){ this.resetBall() } else { this.ball.active = false this.physics.world.remove(this.ball.body) this.scene.stop(GameBackground) //show the win/game over screen this.scene.start(GameOver, { leftScore: this.leftScore, rightScore: this.rightScore }) } } incrementLeftScore() { this.leftScore +=1 // this.leftScoreLabel.text = 'Score: ' + this.leftScore this.leftScoreLabel.text = this.leftScore } incrementRightScore() //This will actually never happen as the ball and right paddle are moving in same y-axis scale. { this.rightScore +=1 // this.rightScoreLabel.text = 'Score: ' + this.rightScore this.rightScoreLabel.text = this.rightScore } resetBall() //When paddle loses the baal, the ball rests on center to begin new game. { this.ball.setPosition(400, 250) const angle = Phaser.Math.Between(0,360) const vec = this.physics.velocityFromAngle(angle, 300) //200 is original speed. reset to 300 to make computer able to lose. this.ball.body.setVelocity(vec.x, vec.y) } } export default Game
32.813853
163
0.572164
96ae9d6ace3014fd9a19e39b0f661e37f3168fda
278
js
JavaScript
tests/nehan.section-header.js
tategakibunko/nehan.js
64eeeafba0a78a5a07e659838dc379715981f16f
[ "MIT-0", "MIT" ]
96
2015-01-12T22:34:16.000Z
2020-08-25T16:16:09.000Z
tests/nehan.section-header.js
tategakibunko/nehan.js
64eeeafba0a78a5a07e659838dc379715981f16f
[ "MIT-0", "MIT" ]
null
null
null
tests/nehan.section-header.js
tategakibunko/nehan.js
64eeeafba0a78a5a07e659838dc379715981f16f
[ "MIT-0", "MIT" ]
12
2015-01-18T09:06:34.000Z
2020-09-24T16:10:04.000Z
describe("SectionHeader", function(){ it("SectionHeader.getXXX", function(){ var header = new Nehan.SectionHeader({id:0, rank:1, title:"foo"}); expect(header.getId()).toBe(0); expect(header.getRank()).toBe(1); expect(header.getTitle()).toBe("foo"); }); });
27.8
70
0.636691
96aedc137a2acfeec8f2e0070d5ccfb4038a44ba
896
js
JavaScript
routes/categories.js
threepears/evernode
7149141bda1ff48eefa574398428ba3ffa4645b2
[ "MIT" ]
null
null
null
routes/categories.js
threepears/evernode
7149141bda1ff48eefa574398428ba3ffa4645b2
[ "MIT" ]
null
null
null
routes/categories.js
threepears/evernode
7149141bda1ff48eefa574398428ba3ffa4645b2
[ "MIT" ]
null
null
null
"use strict"; const express = require('express'); const router = express.Router(); const Category = require('../models/categories'); const Note = require('../models/note'); const ctrl = require('../controllers/categories'); //Passes ID as parameter and continues to next middleware router.param('id', (req, res, next, id) => { Category .findById(id, (err, category) => { if (err) throw err; req.category = category; Note.find({category: id}, (err, notes) => { if (err) throw err; req.category.notes = notes; next(); }); }); }); router .get('/categories', ctrl.index) .post('/categories', ctrl.create) .get('/categories/new', ctrl.new) .get('/categories/:id', ctrl.show); /*router.put('/notes/:id', note.update); router.get('/notes/:id/edit', note.edit); router.delete('/notes/:id', note.destroy);*/ module.exports = router;
23.578947
57
0.620536
96af1c8bd547024535ae048e13cfdfcf3dae7475
4,299
js
JavaScript
test/util.js
jinloser/concent
55e4911c7867787bd2830e1b0a2e0aec4e05c48f
[ "MIT" ]
2
2021-05-18T02:43:07.000Z
2021-05-24T06:29:08.000Z
test/util.js
jinloser/concent
55e4911c7867787bd2830e1b0a2e0aec4e05c48f
[ "MIT" ]
null
null
null
test/util.js
jinloser/concent
55e4911c7867787bd2830e1b0a2e0aec4e05c48f
[ "MIT" ]
null
null
null
/** @typedef {import('enzyme').ReactWrapper<any, Readonly<{}>} Wrap */ import React from 'react'; import { act } from 'react-dom/test-utils'; import { mount } from 'enzyme'; import { useConcent, register } from '../src/index'; import { okeys } from '../src/support/util'; export function getTestModels() { return { test: { state: { name: 'name', age: 18, books: [ { id: 1, name: 'concent', author: 'zzk', publishTime: '2019' }, { id: 2, name: 'concent-lite', author: 'fancy', publishTime: '2020' }, ], }, computed: { bookMap: ({ books }) => books.reduce((map, item) => { map[item.id] = item; return map }, {}), }, reducer: { setState: state => state, }, } }; } export function makeStoreConfig(moduleName, genNormalModule = true) { const conf = { [moduleName]: { state: () => ({ name: moduleName, age: 22, info: { addr: 'bj', email: 'x@concent.com', } }), reducer: { changeName(name, moduleState, ctx) { return { name }; } }, computed: { name({ name }) { return `name_${name}`; }, info({ info }) { return `cu_${info.addr}`; }, } }, }; if (genNormalModule) { conf.withNormalStateDeclaration = { state: { name: 'for testing cloneModule' }, }; } return conf; } export function toError(err) { if (typeof err === 'string') return new Error(err); else return err; } export function extractMessage(err) { if (typeof err === 'string') return err; else return err.message; } export function delay(ms = 1000) { return new Promise(r => setTimeout(r, ms)); } export function has(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } export function makeComp(module, setup) { const CompFn = () => { const { refComputed: rcu, state, settings } = useConcent({ module, setup }); return ( <div> {okeys(state).map(key => { const val = state[key]; if (typeof val === 'object') return ''; return <h1 key={key} className={key}>{state[key]}</h1>; })} {okeys(rcu).map(key => <h2 key={key} className={key}>{rcu[key]}</h2>)} <button onClick={settings.onBtnClick}>onBtnClick</button> </div> ); }; const CompCls = register({ module, setup })( class extends React.Component { render() { const { refComputed: rcu, state, settings } = this.ctx; return ( <div> {okeys(state).map(key => { const val = state[key]; if (typeof val === 'object') return ''; return <h1 key={key} className={key}>{state[key]}</h1>; })} {okeys(rcu).map(key => <h2 key={key} className={key}>{rcu[key]}</h2>)} <button onClick={settings.onBtnClick}>onBtnClick</button> </div> ); } } ); return { CompFn, CompCls }; } /** * * @param {*} Comp * @param {{key:string, compareValue:any, eq:boolean}} compareItems * @param {{nodeName:string, clickAction: (warp:Wrap)=>void}} options */ export function mountCompThenAssertValue(Comp, compareItems = [], options = {}) { let { nodeName = 'h1', clickAction } = options; const compWrap = mount(<Comp />); clickAction && clickAction(compWrap); // console.log(compWrap.debug()); compareItems.forEach(item => { const { key, compareValue, eq, valueType } = item; if (item.nodeName) nodeName = item.nodeName; const h1NameWrap = compWrap.find(`${nodeName}.${key}`); let uiValue = h1NameWrap.text(); if (valueType === 'number') uiValue = parseFloat(uiValue); // console.log(`uiValue ${uiValue} compareValue ${compareValue}`); if (eq) { expect(uiValue === compareValue).toBeTruthy(); } else { expect(uiValue !== compareValue).toBeTruthy(); } }); }; export function mountCompThenAssertH2Value(Comp, compareItems) { mountCompThenAssertValue(Comp, compareItems, { nodeName: 'h2' }) } export function toNum(str) { return parseInt(str, 10); } export function getWrapNum(/** @type Wrap */wrap, selector) { return toNum(wrap.find(selector).text()); };
26.701863
101
0.561759
96b05c44163f6efcdbd665b3ad49086f8c8d4b9a
666
js
JavaScript
NodeAuth/app/routes/index.js
ilich/nodejs-security-training
dd0923f34fe2b69a71b81a073b697a9351e74930
[ "MIT" ]
null
null
null
NodeAuth/app/routes/index.js
ilich/nodejs-security-training
dd0923f34fe2b69a71b81a073b697a9351e74930
[ "MIT" ]
null
null
null
NodeAuth/app/routes/index.js
ilich/nodejs-security-training
dd0923f34fe2b69a71b81a073b697a9351e74930
[ "MIT" ]
null
null
null
"use strict"; var HomeController = require("./home"); var routes = function (app, db, passport) { var homeController = new HomeController(db); app.get("/", homeController.index); app.post("/", passport.authenticate("local", { successRedirect: "/account", failureRedirect: "/", failureFlash: true })); app.get("/register", homeController.register); app.get("/account", isLoggedIn, homeController.account); app.get("/logout", homeController.logout); app.post("/register", homeController.createAccount); }; function isLoggedIn(req, res, next) { if (req.isAuthenticated()) { next(); } else { res.redirect("/"); } } module.exports = routes;
22.965517
57
0.68018
96b23d1ec15e76a0db35e87ee4954c0b18255c4a
6,450
js
JavaScript
frontend/js/config templates/asaFailover.js
raad-altaie/Cisco-Configuration-Tool
6e9ae63ab51e52086398c534c1d4e33c6ce5e6d5
[ "MIT" ]
2
2018-11-28T18:19:20.000Z
2019-02-27T19:12:47.000Z
frontend/js/config templates/asaFailover.js
raad-altaie/Cisco-Configuration-Tool
6e9ae63ab51e52086398c534c1d4e33c6ce5e6d5
[ "MIT" ]
null
null
null
frontend/js/config templates/asaFailover.js
raad-altaie/Cisco-Configuration-Tool
6e9ae63ab51e52086398c534c1d4e33c6ce5e6d5
[ "MIT" ]
null
null
null
btn2.addEventListener('click', function () { var selectEq = eqList.options[eqList.selectedIndex].value; if (selectEq == "ASA 5510 9.1 4G Failover") { clearAllInputs(); //form validation if (validateInputs(asaFailoverClasses) == false) { return false; // } else if (subnetValidator(ip.value, ip2.value, subnet.value) == false) { // ip.style.borderColor = "red"; // ip2.style.borderColor = "red"; // subnet.style.borderColor = "red"; } else { //go to config page form.classList.add('hide'); result.classList.remove('hide'); //writing to the textarea document.getElementById("textArea").value = (` ! hostname asa-${clientName.value}-4GFailover domain-name example.com enable password y8AT9RgfnMZfgK3lrM encrypted ! interface Ethernet0/0 description Primary Connection (NLI) speed 100 duplex full nameif primary-isp security-level 0 ip address ${ipAddress0.value} ${subnetMask0.value} ! interface Ethernet0/1 speed 100 duplex full nameif inside security-level 100 ip address 192.168.25.1 255.255.255.0 ! interface Ethernet0/2 description Secondary Connection to 4G Failover speed 100 duplex full nameif secondary-isp security-level 0 dhcp client route distance 250 ip address dhcp setroute ! interface Ethernet0/3 shutdown no nameif no security-level no ip address ! interface Management0/0 shutdown no nameif no security-level no ip address ! ftp mode passive dns domain-lookup primary-isp dns domain-lookup secondary-isp dns server-group DefaultDNS name-server 207.7.100.100 name-server 8.8.8.8 name-server 66.171.145.146 name-server 8.8.4.4 domain-name example.com object network voice-primary-isp subnet 192.168.25.0 255.255.255.0 object network voice-secondary-isp subnet 192.168.25.0 255.255.255.0 access-list OUTSIDE-INBOUND extended permit icmp any any echo-reply access-list OUTSIDE-INBOUND extended permit icmp any any time-exceeded access-list OUTSIDE-INBOUND extended permit icmp any any unreachable access-list OUTSIDE-INBOUND extended permit icmp any any echo pager lines 24 mtu primary-isp 1500 mtu inside 1500 mtu secondary-isp 1500 no failover icmp unreachable rate-limit 1 burst-size 1 no asdm history enable arp timeout 14400 no arp permit-nonconnected ! object network voice-primary-isp nat (inside,primary-isp) dynamic interface object network voice-secondary-isp nat (inside,secondary-isp) dynamic interface access-group OUTSIDE-INBOUND in interface primary-isp access-group OUTSIDE-INBOUND in interface secondary-isp route primary-isp 0.0.0.0 0.0.0.0 ${defaultGateway.value} 1 track 1 timeout xlate 3:00:00 timeout pat-xlate 0:00:30 timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02 timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00 timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00 timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute timeout tcp-proxy-reassembly 0:01:00 timeout floating-conn 0:00:30 dynamic-access-policy-record DfltAccessPolicy user-identity default-domain LOCAL aaa authentication ssh console LOCAL no snmp-server location no snmp-server contact sla monitor 100 type echo protocol ipIcmpEcho ${nextHop.value} interface primary-isp num-packets 3 frequency 10 sla monitor schedule 100 life forever start-time now crypto ipsec security-association pmtu-aging infinite crypto ca trustpool policy ! track 1 rtr 100 reachability telnet timeout 5 ssh stricthostkeycheck ssh timeout 5 ssh key-exchange group dh-group1-sha1 console timeout 0 dhcpd dns 207.7.100.100 66.171.145.146 dhcpd domain test.com ! dhcpd address 192.168.25.10-192.168.25.250 inside dhcpd auto_config secondary-isp interface inside dhcpd enable inside ! threat-detection basic-threat threat-detection statistics access-list no threat-detection statistics tcp-intercept username pix password .U6no61ercXarQ48 encrypted ! class-map inspection_default match default-inspection-traffic ! ! policy-map type inspect dns preset_dns_map parameters message-length maximum client auto message-length maximum 512 policy-map global_policy class inspection_default inspect dns preset_dns_map inspect ftp inspect h323 h225 inspect h323 ras inspect ip-options inspect netbios inspect rsh inspect rtsp inspect skinny inspect esmtp inspect sqlnet inspect sunrpc inspect tftp inspect sip inspect xdmcp ! service-policy global_policy global prompt hostname context no call-home reporting anonymous crypto key generate rsa modulus 2048 ! end `); } } else { console.log("Not ASA 5510 9.1 4G Failover") } });
38.16568
91
0.557364
96b32e4bdff9e02ebd04eaaa9134acc662406585
581
js
JavaScript
src/index.js
Artsiom-Zhuk/quadratic-equation
62ea706f8574292557220c9e74ee1e79463f83d0
[ "MIT" ]
null
null
null
src/index.js
Artsiom-Zhuk/quadratic-equation
62ea706f8574292557220c9e74ee1e79463f83d0
[ "MIT" ]
null
null
null
src/index.js
Artsiom-Zhuk/quadratic-equation
62ea706f8574292557220c9e74ee1e79463f83d0
[ "MIT" ]
null
null
null
module.exports = function solveEquation(equation) { // your implementation var str = equation.replace(/x/g, ""); str = str.replace(/ /g, ""); str = str.replace("+", ""); str = str.replace("^2", ""); var arr = str.split('*'); var D = arr[1] * arr[1] - 4 * arr[0] * arr[2]; var x1 = Math.round((-arr[1] + Math.sqrt(D)) / (2 * arr[0])); var x2 = Math.round((-arr[1] - Math.sqrt(D)) / (2 * arr[0])); var result = []; if (x1 < x2 ){ result[0] = x1; result[1] = x2; return result; } else { result[0] = x2; result[1] = x1; return result; } }
26.409091
63
0.519793
96b43dca0e45ddfd6309898ac1588b2d654cfd83
1,904
js
JavaScript
DFE_Personality_Dev/DFE_Personality_Dev/node_modules/botbuilder-dialogs-adaptive/lib/dynamicBeginDialogDeserializer.js
danfernau/PersonalityAdaptiveChatbot
1a1c9e6d6809f3fee62c4ccf63b0cba9c4245075
[ "MIT" ]
null
null
null
DFE_Personality_Dev/DFE_Personality_Dev/node_modules/botbuilder-dialogs-adaptive/lib/dynamicBeginDialogDeserializer.js
danfernau/PersonalityAdaptiveChatbot
1a1c9e6d6809f3fee62c4ccf63b0cba9c4245075
[ "MIT" ]
null
null
null
DFE_Personality_Dev/DFE_Personality_Dev/node_modules/botbuilder-dialogs-adaptive/lib/dynamicBeginDialogDeserializer.js
danfernau/PersonalityAdaptiveChatbot
1a1c9e6d6809f3fee62c4ccf63b0cba9c4245075
[ "MIT" ]
null
null
null
"use strict"; /** * @module botbuilder-dialogs-adaptive */ /** * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DynamicBeginDialogDeserializer = void 0; /** * Internal serializer for `DynamicBeginDialog` which bind the x.dialog resourceId to the DynamicBeginDialog.dialog property. */ class DynamicBeginDialogDeserializer { /** * Intializes an instance of `DynamicBeginDialogDeserializer`. * @param _resourceExplorer The `ResourceExplorer` used by the deserializer. * @param _resourceId The resource id of the dynamic dialog. */ constructor(_resourceExplorer, _resourceId) { this._resourceExplorer = _resourceExplorer; this._resourceId = _resourceId; } /** * The method that loads the configuration object to a `DynamicBeginDialog` object. * @param config The configuration object to deserialize. * @param type The object type that the configuration will be deserialized to. * @returns A `DynamicBeginDialog` object created from the configuration. */ load(config, type) { config.dialog = this._resourceExplorer.loadType(this._resourceId); return Object.entries(config).reduce((instance, [key, value]) => { let converter = instance.getConverter(key); if (converter) { if (typeof converter === 'function') { converter = new converter(this._resourceExplorer); } instance[`${key}`] = converter.convert(value); } else { instance[`${key}`] = value; } return instance; }, new type()); } } exports.DynamicBeginDialogDeserializer = DynamicBeginDialogDeserializer; //# sourceMappingURL=dynamicBeginDialogDeserializer.js.map
39.666667
125
0.661765
96b46db8edf64580995dbe11d955aec28160376d
319
js
JavaScript
db/migrations/20190622165932_create_items.js
subuta/play-with-jest
b7d91c1b4892a41488ee87e6b1b870e436366d24
[ "MIT" ]
null
null
null
db/migrations/20190622165932_create_items.js
subuta/play-with-jest
b7d91c1b4892a41488ee87e6b1b870e436366d24
[ "MIT" ]
7
2020-09-05T01:07:12.000Z
2022-03-08T22:48:12.000Z
db/migrations/20190622165932_create_items.js
subuta/play-with-jest
b7d91c1b4892a41488ee87e6b1b870e436366d24
[ "MIT" ]
null
null
null
exports.up = async function (knex) { await knex.schema.createTable('items', function (t) { t.increments() t.text('name').notNullable() t.integer('price').unsigned().notNullable() t.timestamps(true, true) }) } exports.down = async function (knex) { return knex.schema.dropTableIfExists('items') }
24.538462
55
0.670846
96b6b870abdd0aa26e807ce072f50bdc47440348
43,762
js
JavaScript
web/themes/default/libs/gallery/mocha/dist/mocha.js
lichnow/geekcoding
e14293643eb2a6d9e1a77b27e0c476109fbeda61
[ "MIT" ]
4
2015-01-01T10:39:33.000Z
2016-07-20T10:26:52.000Z
web/themes/default/libs/gallery/mocha/dist/mocha.js
lichnow/geekcoding
e14293643eb2a6d9e1a77b27e0c476109fbeda61
[ "MIT" ]
1
2017-09-23T18:44:08.000Z
2017-09-23T18:44:08.000Z
web/themes/default/libs/gallery/mocha/dist/mocha.js
lichnow/geekcoding
e14293643eb2a6d9e1a77b27e0c476109fbeda61
[ "MIT" ]
3
2015-04-30T02:35:19.000Z
2018-11-24T14:00:19.000Z
define("gallery/mocha/1.7.3/mocha",[],function(){(function(){function a(b){var c=a.resolve(b),d=a.modules[c];if(!d)throw Error('failed to require "'+b+'"');return d.exports||(d.exports={},d.call(d.exports,d,d.exports,a.relative(c))),d.exports}a.modules={},a.resolve=function(b){var c=b,d=b+".js",e=b+"/index.js";return a.modules[d]&&d||a.modules[e]&&e||c},a.register=function(b,c){a.modules[b]=c},a.relative=function(b){return function(c){if("."!=c.charAt(0))return a(c);var d=b.split("/"),e=c.split("/");d.pop();for(var f=0;e.length>f;f++){var g=e[f];".."==g?d.pop():"."!=g&&d.push(g)}return a(d.join("/"))}},a.register("browser/debug.js",function(a){a.exports=function(){return function(){}}}),a.register("browser/diff.js",function(){}),a.register("browser/events.js",function(a,b){function d(a){return"[object Array]"=={}.toString.call(a)}function e(){}b.EventEmitter=e,e.prototype.on=function(a,b){return this.$events||(this.$events={}),this.$events[a]?d(this.$events[a])?this.$events[a].push(b):this.$events[a]=[this.$events[a],b]:this.$events[a]=b,this},e.prototype.addListener=e.prototype.on,e.prototype.once=function(a,b){function d(){c.removeListener(a,d),b.apply(this,arguments)}var c=this;return d.listener=b,this.on(a,d),this},e.prototype.removeListener=function(a,b){if(this.$events&&this.$events[a]){var c=this.$events[a];if(d(c)){for(var e=-1,f=0,g=c.length;g>f;f++)if(c[f]===b||c[f].listener&&c[f].listener===b){e=f;break}if(0>e)return this;c.splice(e,1),c.length||delete this.$events[a]}else(c===b||c.listener&&c.listener===b)&&delete this.$events[a]}return this},e.prototype.removeAllListeners=function(a){return void 0===a?(this.$events={},this):(this.$events&&this.$events[a]&&(this.$events[a]=null),this)},e.prototype.listeners=function(a){return this.$events||(this.$events={}),this.$events[a]||(this.$events[a]=[]),d(this.$events[a])||(this.$events[a]=[this.$events[a]]),this.$events[a]},e.prototype.emit=function(a){if(!this.$events)return!1;var b=this.$events[a];if(!b)return!1;var c=[].slice.call(arguments,1);if("function"==typeof b)b.apply(this,c);else{if(!d(b))return!1;for(var e=b.slice(),f=0,g=e.length;g>f;f++)e[f].apply(this,c)}return!0}}),a.register("browser/fs.js",function(){}),a.register("browser/path.js",function(){}),a.register("browser/progress.js",function(a){function d(){this.percent=0,this.size(0),this.fontSize(11),this.font("helvetica, arial, sans-serif")}a.exports=d,d.prototype.size=function(a){return this._size=a,this},d.prototype.text=function(a){return this._text=a,this},d.prototype.fontSize=function(a){return this._fontSize=a,this},d.prototype.font=function(a){return this._font=a,this},d.prototype.update=function(a){return this.percent=a,this},d.prototype.draw=function(a){var b=Math.min(this.percent,100),c=this._size,d=c/2,e=d,f=d,g=d-1,h=this._fontSize;a.font=h+"px "+this._font;var i=2*Math.PI*(b/100);a.clearRect(0,0,c,c),a.strokeStyle="#9f9f9f",a.beginPath(),a.arc(e,f,g,0,i,!1),a.stroke(),a.strokeStyle="#eee",a.beginPath(),a.arc(e,f,g-1,0,i,!0),a.stroke();var j=this._text||(0|b)+"%",k=a.measureText(j).width;return a.fillText(j,e-k/2+1,f+h/2-1),this}}),a.register("browser/tty.js",function(a,b){b.isatty=function(){return!0},b.getWindowSize=function(){return[window.innerHeight,window.innerWidth]}}),a.register("context.js",function(a){function d(){}a.exports=d,d.prototype.runnable=function(a){return 0==arguments.length?this._runnable:(this.test=this._runnable=a,this)},d.prototype.timeout=function(a){return this.runnable().timeout(a),this},d.prototype.slow=function(a){return this.runnable().slow(a),this},d.prototype.inspect=function(){return JSON.stringify(this,function(a,b){return"_runnable"!=a&&"test"!=a?b:void 0},2)}}),a.register("hook.js",function(a,b,c){function e(a,b){d.call(this,a,b),this.type="hook"}var d=c("./runnable");a.exports=e,e.prototype=new d,e.prototype.constructor=e,e.prototype.error=function(a){if(0==arguments.length){var a=this._error;return this._error=null,a}this._error=a}}),a.register("interfaces/bdd.js",function(a,b,c){var d=c("../suite"),e=c("../test");a.exports=function(a){var b=[a];a.on("pre-require",function(a,c,f){a.before=function(a){b[0].beforeAll(a)},a.after=function(a){b[0].afterAll(a)},a.beforeEach=function(a){b[0].beforeEach(a)},a.afterEach=function(a){b[0].afterEach(a)},a.describe=a.context=function(a,c){var e=d.create(b[0],a);return b.unshift(e),c.call(e),b.shift(),e},a.xdescribe=a.xcontext=a.describe.skip=function(a,c){var e=d.create(b[0],a);e.pending=!0,b.unshift(e),c.call(e),b.shift()},a.describe.only=function(b,c){var d=a.describe(b,c);f.grep(d.fullTitle())},a.it=a.specify=function(a,c){var d=b[0];if(d.pending)var c=null;var f=new e(a,c);return d.addTest(f),f},a.it.only=function(b,c){var d=a.it(b,c);f.grep(d.fullTitle())},a.xit=a.xspecify=a.it.skip=function(b){a.it(b)}})}}),a.register("interfaces/exports.js",function(a,b,c){var d=c("../suite"),e=c("../test");a.exports=function(a){function c(a){var f;for(var g in a)if("function"==typeof a[g]){var h=a[g];switch(g){case"before":b[0].beforeAll(h);break;case"after":b[0].afterAll(h);break;case"beforeEach":b[0].beforeEach(h);break;case"afterEach":b[0].afterEach(h);break;default:b[0].addTest(new e(g,h))}}else{var f=d.create(b[0],g);b.unshift(f),c(a[g]),b.shift()}}var b=[a];a.on("require",c)}}),a.register("interfaces/index.js",function(a,b,c){b.bdd=c("./bdd"),b.tdd=c("./tdd"),b.qunit=c("./qunit"),b.exports=c("./exports")}),a.register("interfaces/qunit.js",function(a,b,c){var d=c("../suite"),e=c("../test");a.exports=function(a){var b=[a];a.on("pre-require",function(a){a.before=function(a){b[0].beforeAll(a)},a.after=function(a){b[0].afterAll(a)},a.beforeEach=function(a){b[0].beforeEach(a)},a.afterEach=function(a){b[0].afterEach(a)},a.suite=function(a){b.length>1&&b.shift();var c=d.create(b[0],a);b.unshift(c)},a.test=function(a,c){b[0].addTest(new e(a,c))}})}}),a.register("interfaces/tdd.js",function(a,b,c){var d=c("../suite"),e=c("../test");a.exports=function(a){var b=[a];a.on("pre-require",function(a,c,f){a.setup=function(a){b[0].beforeEach(a)},a.teardown=function(a){b[0].afterEach(a)},a.suiteSetup=function(a){b[0].beforeAll(a)},a.suiteTeardown=function(a){b[0].afterAll(a)},a.suite=function(a,c){var e=d.create(b[0],a);return b.unshift(e),c.call(e),b.shift(),e},a.suite.only=function(b,c){var d=a.suite(b,c);f.grep(d.fullTitle())},a.test=function(a,c){var d=new e(a,c);return b[0].addTest(d),d},a.test.only=function(b,c){var d=a.test(b,c);f.grep(d.fullTitle())},a.test.skip=function(b){a.test(b)}})}}),a.register("mocha.js",function(a,b,c){function f(a){return __dirname+"/../images/"+a+".png"}function g(a){a=a||{},this.files=[],this.options=a,this.grep(a.grep),this.suite=new b.Suite("",new b.Context),this.ui(a.ui),this.reporter(a.reporter),a.timeout&&this.timeout(a.timeout),a.slow&&this.slow(a.slow)}var d=c("browser/path"),e=c("./utils");b=a.exports=g,b.utils=e,b.interfaces=c("./interfaces"),b.reporters=c("./reporters"),b.Runnable=c("./runnable"),b.Context=c("./context"),b.Runner=c("./runner"),b.Suite=c("./suite"),b.Hook=c("./hook"),b.Test=c("./test"),g.prototype.addFile=function(a){return this.files.push(a),this},g.prototype.reporter=function(a){if("function"==typeof a)this._reporter=a;else{a=a||"dot";try{this._reporter=c("./reporters/"+a)}catch(b){this._reporter=c(a)}if(!this._reporter)throw Error('invalid reporter "'+a+'"')}return this},g.prototype.ui=function(a){if(a=a||"bdd",this._ui=b.interfaces[a],!this._ui)throw Error('invalid interface "'+a+'"');return this._ui=this._ui(this.suite),this},g.prototype.loadFiles=function(a){var b=this,e=this.suite,f=this.files.length;this.files.forEach(function(g){g=d.resolve(g),e.emit("pre-require",global,g,b),e.emit("require",c(g),g,b),e.emit("post-require",global,g,b),--f||a&&a()})},g.prototype._growl=function(a,b){var d=c("growl");a.on("end",function(){var c=b.stats;if(c.failures){var e=c.failures+" of "+a.total+" tests failed";d(e,{name:"mocha",title:"Failed",image:f("error")})}else d(c.passes+" tests passed in "+c.duration+"ms",{name:"mocha",title:"Passed",image:f("ok")})})},g.prototype.grep=function(a){return this.options.grep="string"==typeof a?RegExp(e.escapeRegexp(a)):a,this},g.prototype.invert=function(){return this.options.invert=!0,this},g.prototype.ignoreLeaks=function(){return this.options.ignoreLeaks=!0,this},g.prototype.checkLeaks=function(){return this.options.ignoreLeaks=!1,this},g.prototype.growl=function(){return this.options.growl=!0,this},g.prototype.globals=function(a){return this.options.globals=(this.options.globals||[]).concat(a),this},g.prototype.timeout=function(a){return this.suite.timeout(a),this},g.prototype.slow=function(a){return this.suite.slow(a),this},g.prototype.asyncOnly=function(){return this.options.asyncOnly=!0,this},g.prototype.run=function(a){this.files.length&&this.loadFiles();var c=this.suite,d=this.options,e=new b.Runner(c),f=new this._reporter(e);return e.ignoreLeaks=d.ignoreLeaks,e.asyncOnly=d.asyncOnly,d.grep&&e.grep(d.grep,d.invert),d.globals&&e.globals(d.globals),d.growl&&this._growl(e,f),e.run(a)}}),a.register("ms.js",function(a){function h(a){var b=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(a);if(b){var c=parseFloat(b[1]),d=(b[2]||"ms").toLowerCase();switch(d){case"years":case"year":case"y":return 315576e5*c;case"days":case"day":case"d":return 864e5*c;case"hours":case"hour":case"h":return 36e5*c;case"minutes":case"minute":case"m":return 6e4*c;case"seconds":case"second":case"s":return 1e3*c;case"ms":return c}}}function i(a){return a==g?Math.round(a/g)+" day":a>g?Math.round(a/g)+" days":a==f?Math.round(a/f)+" hour":a>f?Math.round(a/f)+" hours":a==e?Math.round(a/e)+" minute":a>e?Math.round(a/e)+" minutes":a==d?Math.round(a/d)+" second":a>d?Math.round(a/d)+" seconds":a+" ms"}var d=1e3,e=60*d,f=60*e,g=24*f;a.exports=function(a){return"string"==typeof a?h(a):i(a)}}),a.register("reporters/base.js",function(a,b,c){function n(a){var c=this.stats={suites:0,tests:0,passes:0,pending:0,failures:0},d=this.failures=[];a&&(this.runner=a,a.stats=c,a.on("start",function(){c.start=new g}),a.on("suite",function(a){c.suites=c.suites||0,a.root||c.suites++}),a.on("test end",function(){c.tests=c.tests||0,c.tests++}),a.on("pass",function(a){c.passes=c.passes||0;var b=a.slow()/2;a.speed=a.duration>a.slow()?"slow":a.duration>b?"medium":"fast",c.passes++}),a.on("fail",function(a,b){c.failures=c.failures||0,c.failures++,a.err=b,d.push(a)}),a.on("end",function(){c.end=new g,c.duration=new g-c.start}),a.on("pending",function(){c.pending++}))}function o(a,b){return a+="",Array(b-a.length+1).join(" ")+a}function p(a,b,c){return e["diff"+b](a.actual,a.expected).map(function(a){return c&&(a.value=a.value.replace(/\t/g,"<tab>").replace(/\r/g,"<CR>").replace(/\n/g,"<LF>\n")),a.added?q("diff added",a.value):a.removed?q("diff removed",a.value):a.value}).join("")}function q(a,b){return b.split("\n").map(function(b){return m(a,b)}).join("\n")}var d=c("browser/tty"),e=c("browser/diff"),f=c("../ms"),g=global.Date;global.setTimeout,global.setInterval,global.clearTimeout,global.clearInterval;var l=d.isatty(1)&&d.isatty(2);b=a.exports=n,b.useColors=l,b.colors={pass:90,fail:31,"bright pass":92,"bright fail":91,"bright yellow":93,pending:36,suite:0,"error title":0,"error message":31,"error stack":90,checkmark:32,fast:90,medium:33,slow:31,green:32,light:90,"diff gutter":90,"diff added":42,"diff removed":41},b.symbols={ok:"✓",err:"✖",dot:"․"},"win32"==process.platform&&(b.symbols.ok="√",b.symbols.err="×",b.symbols.dot=".");var m=b.color=function(a,c){return b.useColors?"["+b.colors[a]+"m"+c+"":c};b.window={width:l?process.stdout.getWindowSize?process.stdout.getWindowSize(1)[0]:d.getWindowSize()[1]:75},b.cursor={hide:function(){process.stdout.write("[?25l")},show:function(){process.stdout.write("[?25h")},deleteLine:function(){process.stdout.write("")},beginningOfLine:function(){process.stdout.write("")},CR:function(){b.cursor.deleteLine(),b.cursor.beginningOfLine()}},b.list=function(a){console.error(),a.forEach(function(a,b){var c=m("error title"," %s) %s:\n")+m("error message"," %s")+m("error stack","\n%s\n"),d=a.err,e=d.message||"",f=d.stack||e,g=f.indexOf(e)+e.length,h=f.slice(0,g),i=d.actual,j=d.expected,k=!0;if(d.showDiff&&(k=!1,d.actual=i=JSON.stringify(i,null,2),d.expected=j=JSON.stringify(j,null,2)),"string"==typeof i&&"string"==typeof j){var l=Math.max(i.length,j.length);h=20>l?p(d,"Chars",k):p(d,"Words",k);var n=h.split("\n");if(n.length>4){var q=(n.length+"").length;h=n.map(function(a,b){return o(++b,q)+" |"+" "+a}).join("\n")}h="\n"+m("diff removed","actual")+" "+m("diff added","expected")+"\n\n"+h+"\n",h=h.replace(/^/gm," "),c=m("error title"," %s) %s:\n%s")+m("error stack","\n%s\n")}f=f.slice(g?g+1:g).replace(/^/gm," "),console.error(c,b+1,a.fullTitle(),h,f)})},n.prototype.epilogue=function(){function e(a){return 1==a?"test":"tests"}var c,a=this.stats;return console.log(),a.failures?(c=m("bright fail"," "+b.symbols.err)+m("fail"," %d of %d %s failed")+m("light",":"),console.error(c,a.failures,this.runner.total,e(this.runner.total)),n.list(this.failures),console.error(),void 0):(c=m("bright pass"," ")+m("green"," %d %s complete")+m("light"," (%s)"),console.log(c,a.tests||0,e(a.tests),f(a.duration)),a.pending&&(c=m("pending"," ")+m("pending"," %d %s pending"),console.log(c,a.pending,e(a.pending))),console.log(),void 0)}}),a.register("reporters/doc.js",function(a,b,c){function f(a){function h(){return Array(g).join(" ")}d.call(this,a);var g=(this.stats,a.total,2);a.on("suite",function(a){a.root||(++g,console.log('%s<section class="suite">',h()),++g,console.log("%s<h1>%s</h1>",h(),e.escape(a.title)),console.log("%s<dl>",h()))}),a.on("suite end",function(a){a.root||(console.log("%s</dl>",h()),--g,console.log("%s</section>",h()),--g)}),a.on("pass",function(a){console.log("%s <dt>%s</dt>",h(),e.escape(a.title));var b=e.escape(e.clean(""+a.fn));console.log("%s <dd><pre><code>%s</code></pre></dd>",h(),b)})}var d=c("./base"),e=c("../utils");b=a.exports=f}),a.register("reporters/dot.js",function(a,b,c){function f(a){d.call(this,a);var b=this,f=(this.stats,0|.75*d.window.width),g=0;a.on("start",function(){process.stdout.write("\n ")}),a.on("pending",function(){process.stdout.write(e("pending",d.symbols.dot))}),a.on("pass",function(a){0==++g%f&&process.stdout.write("\n "),"slow"==a.speed?process.stdout.write(e("bright yellow",d.symbols.dot)):process.stdout.write(e(a.speed,d.symbols.dot))}),a.on("fail",function(){0==++g%f&&process.stdout.write("\n "),process.stdout.write(e("fail",d.symbols.dot))}),a.on("end",function(){console.log(),b.epilogue()})}var d=c("./base"),e=d.color;b=a.exports=f,f.prototype=new d,f.prototype.constructor=f}),a.register("reporters/html-cov.js",function(a,b,c){function f(a){var b=c("jade"),f=__dirname+"/templates/coverage.jade",h=e.readFileSync(f,"utf8"),i=b.compile(h,{filename:f}),j=this;d.call(this,a,!1),a.on("end",function(){process.stdout.write(i({cov:j.cov,coverageClass:g}))})}function g(a){return a>=75?"high":a>=50?"medium":a>=25?"low":"terrible"}var d=c("./json-cov"),e=c("browser/fs");b=a.exports=f}),a.register("reporters/html.js",function(a,b,c){function n(a,b){d.call(this,a);var B,C,i=this.stats,k=(a.total,p(m)),l=k.getElementsByTagName("li"),n=l[1].getElementsByTagName("em")[0],u=l[1].getElementsByTagName("a")[0],v=l[2].getElementsByTagName("em")[0],w=l[2].getElementsByTagName("a")[0],x=l[3].getElementsByTagName("em")[0],y=k.getElementsByTagName("canvas")[0],z=p('<ul id="mocha-report"></ul>'),A=[z];if(b=b||document.getElementById("mocha"),y.getContext){var D=window.devicePixelRatio||1;y.style.width=y.width,y.style.height=y.height,y.width*=D,y.height*=D,C=y.getContext("2d"),C.scale(D,D),B=new f}return b?(t(u,"click",function(){r();var a=/pass/.test(z.className)?"":" pass";z.className=z.className.replace(/fail|pass/g,"")+a,z.className.trim()&&q("test pass")}),t(w,"click",function(){r();var a=/fail/.test(z.className)?"":" fail";z.className=z.className.replace(/fail|pass/g,"")+a,z.className.trim()&&q("test fail")}),b.appendChild(k),b.appendChild(z),B&&B.size(40),a.on("suite",function(a){if(!a.root){var b="?grep="+encodeURIComponent(a.fullTitle()),c=p('<li class="suite"><h1><a href="%s">%s</a></h1></li>',b,g(a.title));A[0].appendChild(c),A.unshift(document.createElement("ul")),c.appendChild(A[0])}}),a.on("suite end",function(a){a.root||A.shift()}),a.on("fail",function(b){"hook"==b.type&&a.emit("test end",b)}),a.on("test end",function(a){window.scrollTo(0,document.body.scrollHeight);var b=0|100*(i.tests/this.total);B&&B.update(b).draw(C);var c=new h-i.start;if(s(n,i.passes),s(v,i.failures),s(x,(c/1e3).toFixed(2)),"passed"==a.state)var d=p('<li class="test pass %e"><h2>%e<span class="duration">%ems</span> <a href="?grep=%e" class="replay">‣</a></h2></li>',a.speed,a.title,a.duration,encodeURIComponent(a.fullTitle()));else if(a.pending)var d=p('<li class="test pass pending"><h2>%e</h2></li>',a.title);else{var d=p('<li class="test fail"><h2>%e <a href="?grep=%e" class="replay">‣</a></h2></li>',a.title,encodeURIComponent(a.fullTitle())),f=a.err.stack||""+a.err;~f.indexOf(a.err.message)||(f=a.err.message+"\n"+f),"[object Error]"==f&&(f=a.err.message),!a.err.stack&&a.err.sourceURL&&void 0!==a.err.line&&(f+="\n("+a.err.sourceURL+":"+a.err.line+")"),d.appendChild(p('<pre class="error">%e</pre>',f))}if(!a.pending){var g=d.getElementsByTagName("h2")[0];t(g,"click",function(){j.style.display="none"==j.style.display?"inline-block":"none"});var j=p("<pre><code>%e</code></pre>",e.clean(""+a.fn));d.appendChild(j),j.style.display="none"}A[0]&&A[0].appendChild(d)}),void 0):o("#mocha div missing, add it to your document")}function o(a){document.body.appendChild(p('<div id="mocha-error">%s</div>',a))}function p(a){var b=arguments,c=document.createElement("div"),d=1;return c.innerHTML=a.replace(/%([se])/g,function(a,c){switch(c){case"s":return b[d++]+"";case"e":return g(b[d++])}}),c.firstChild}function q(a){for(var b=document.getElementsByClassName("suite"),c=0;b.length>c;c++){var d=b[c].getElementsByClassName(a);0==d.length&&(b[c].className+=" hidden")}}function r(){for(var a=document.getElementsByClassName("suite hidden"),b=0;a.length>b;++b)a[b].className=a[b].className.replace("suite hidden","suite")}function s(a,b){a.textContent?a.textContent=b:a.innerText=b}function t(a,b,c){a.addEventListener?a.addEventListener(b,c,!1):a.attachEvent("on"+b,c)}var d=c("./base"),e=c("../utils"),f=c("../browser/progress"),g=e.escape,h=global.Date;global.setTimeout,global.setInterval,global.clearTimeout,global.clearInterval,b=a.exports=n;var m='<ul id="mocha-stats"><li class="progress"><canvas width="40" height="40"></canvas></li><li class="passes"><a href="#">passes:</a> <em>0</em></li><li class="failures"><a href="#">failures:</a> <em>0</em></li><li class="duration">duration: <em>0</em>s</li></ul>'}),a.register("reporters/index.js",function(a,b,c){b.Base=c("./base"),b.Dot=c("./dot"),b.Doc=c("./doc"),b.TAP=c("./tap"),b.JSON=c("./json"),b.HTML=c("./html"),b.List=c("./list"),b.Min=c("./min"),b.Spec=c("./spec"),b.Nyan=c("./nyan"),b.XUnit=c("./xunit"),b.Markdown=c("./markdown"),b.Progress=c("./progress"),b.Landing=c("./landing"),b.JSONCov=c("./json-cov"),b.HTMLCov=c("./html-cov"),b.JSONStream=c("./json-stream"),b.Teamcity=c("./teamcity")}),a.register("reporters/json-cov.js",function(a,b,c){function e(a,b){var c=this,b=1==arguments.length?!0:b;d.call(this,a);var e=[],g=[],i=[];a.on("test end",function(a){e.push(a)}),a.on("pass",function(a){i.push(a)}),a.on("fail",function(a){g.push(a)}),a.on("end",function(){var a=global._$jscoverage||{},d=c.cov=f(a);d.stats=c.stats,d.tests=e.map(h),d.failures=g.map(h),d.passes=i.map(h),b&&process.stdout.write(JSON.stringify(d,null,2))})}function f(a){var b={instrumentation:"node-jscoverage",sloc:0,hits:0,misses:0,coverage:0,files:[]};for(var c in a){var d=g(c,a[c]);b.files.push(d),b.hits+=d.hits,b.misses+=d.misses,b.sloc+=d.sloc}return b.files.sort(function(a,b){return a.filename.localeCompare(b.filename)}),b.sloc>0&&(b.coverage=100*(b.hits/b.sloc)),b}function g(a,b){var c={filename:a,coverage:0,hits:0,misses:0,sloc:0,source:{}};return b.source.forEach(function(a,d){d++,0===b[d]?(c.misses++,c.sloc++):void 0!==b[d]&&(c.hits++,c.sloc++),c.source[d]={source:a,coverage:void 0===b[d]?"":b[d]}}),c.coverage=100*(c.hits/c.sloc),c}function h(a){return{title:a.title,fullTitle:a.fullTitle(),duration:a.duration}}var d=c("./base");b=a.exports=e}),a.register("reporters/json-stream.js",function(a,b,c){function f(a){d.call(this,a);var b=this,e=(this.stats,a.total);a.on("start",function(){console.log(JSON.stringify(["start",{total:e}]))}),a.on("pass",function(a){console.log(JSON.stringify(["pass",g(a)]))}),a.on("fail",function(a){console.log(JSON.stringify(["fail",g(a)]))}),a.on("end",function(){process.stdout.write(JSON.stringify(["end",b.stats]))})}function g(a){return{title:a.title,fullTitle:a.fullTitle(),duration:a.duration}}var d=c("./base");d.color,b=a.exports=f}),a.register("reporters/json.js",function(a,b,c){function g(a){var b=this;d.call(this,a);var c=[],e=[],f=[];a.on("test end",function(a){c.push(a)}),a.on("pass",function(a){f.push(a)}),a.on("fail",function(a){e.push(a)}),a.on("end",function(){var a={stats:b.stats,tests:c.map(h),failures:e.map(h),passes:f.map(h)};process.stdout.write(JSON.stringify(a,null,2))})}function h(a){return{title:a.title,fullTitle:a.fullTitle(),duration:a.duration}}var d=c("./base");d.cursor,d.color,b=a.exports=g}),a.register("reporters/landing.js",function(a,b,c){function g(a){function m(){var a=Array(g).join("-");return" "+f("runway",a)}d.call(this,a);var b=this,g=(this.stats,0|.75*d.window.width),h=a.total,i=process.stdout,j=f("plane","✈"),k=-1,l=0;a.on("start",function(){i.write("\n "),e.hide()}),a.on("test end",function(a){var b=-1==k?0|g*++l/h:k;"failed"==a.state&&(j=f("plane crash","✈"),k=b),i.write("\n\n"),i.write(m()),i.write("\n "),i.write(f("runway",Array(b).join("⋅"))),i.write(j),i.write(f("runway",Array(g-b).join("⋅")+"\n")),i.write(m()),i.write("")}),a.on("end",function(){e.show(),console.log(),b.epilogue()})}var d=c("./base"),e=d.cursor,f=d.color;b=a.exports=g,d.colors.plane=0,d.colors["plane crash"]=31,d.colors.runway=90,g.prototype=new d,g.prototype.constructor=g}),a.register("reporters/list.js",function(a,b,c){function g(a){d.call(this,a);var b=this,g=(this.stats,0);a.on("start",function(){console.log()}),a.on("test",function(a){process.stdout.write(f("pass"," "+a.fullTitle()+": "))}),a.on("pending",function(a){var b=f("checkmark"," -")+f("pending"," %s");console.log(b,a.fullTitle())}),a.on("pass",function(a){var b=f("checkmark"," "+d.symbols.dot)+f("pass"," %s: ")+f(a.speed,"%dms");e.CR(),console.log(b,a.fullTitle(),a.duration)}),a.on("fail",function(a){e.CR(),console.log(f("fail"," %d) %s"),++g,a.fullTitle())}),a.on("end",b.epilogue.bind(b))}var d=c("./base"),e=d.cursor,f=d.color;b=a.exports=g,g.prototype=new d,g.prototype.constructor=g}),a.register("reporters/markdown.js",function(a,b,c){function f(a){function i(a){return Array(g).join("#")+" "+a}function k(a,b){var c=b;return b=b[a.title]=b[a.title]||{suite:a},a.suites.forEach(function(a){k(a,b)}),c}function l(a,b){++b;var d,c="";for(var f in a)"suite"!=f&&(f&&(d=" - ["+f+"](#"+e.slug(a[f].suite.fullTitle())+")\n"),f&&(c+=Array(b).join(" ")+d),c+=l(a[f],b));return--b,c}function m(a){var b=k(a,{});return l(b,0)}d.call(this,a);var g=(this.stats,a.total,0),h="";m(a.suite),a.on("suite",function(a){++g;var b=e.slug(a.fullTitle());h+='<a name="'+b+'"></a>'+"\n",h+=i(a.title)+"\n"}),a.on("suite end",function(){--g}),a.on("pass",function(a){var b=e.clean(""+a.fn);h+=a.title+".\n",h+="\n```js\n",h+=b+"\n",h+="```\n\n"}),a.on("end",function(){process.stdout.write("# TOC\n"),process.stdout.write(m(a.suite)),process.stdout.write(h)})}var d=c("./base"),e=c("../utils");b=a.exports=f}),a.register("reporters/min.js",function(a,b,c){function e(a){d.call(this,a),a.on("start",function(){process.stdout.write(""),process.stdout.write("")}),a.on("end",this.epilogue.bind(this))}var d=c("./base");b=a.exports=e,e.prototype=new d,e.prototype.constructor=e}),a.register("reporters/nyan.js",function(a,b,c){function f(a){d.call(this,a);var b=this,e=(this.stats,0|.75*d.window.width),k=(this.rainbowColors=b.generateColors(),this.colorIndex=0,this.numberOfLines=4,this.trajectories=[[],[],[],[]],this.nyanCatWidth=11);this.trajectoryWidthMax=e-k,this.scoreboardWidth=5,this.tick=0,a.on("start",function(){d.cursor.hide(),b.draw("start")}),a.on("pending",function(){b.draw("pending")}),a.on("pass",function(){b.draw("pass")}),a.on("fail",function(){b.draw("fail")}),a.on("end",function(){d.cursor.show();for(var a=0;b.numberOfLines>a;a++)g("\n");b.epilogue()})}function g(a){process.stdout.write(a)}var d=c("./base");d.color,b=a.exports=f,f.prototype.draw=function(a){this.appendRainbow(),this.drawScoreboard(),this.drawRainbow(),this.drawNyanCat(a),this.tick=!this.tick},f.prototype.drawScoreboard=function(){function c(a,b){g(" "),g("["+a+"m"+b+""),g("\n")}var a=this.stats,b=d.colors;c(b.green,a.passes),c(b.fail,a.failures),c(b.pending,a.pending),g("\n"),this.cursorUp(this.numberOfLines)},f.prototype.appendRainbow=function(){for(var a=this.tick?"_":"-",b=this.rainbowify(a),c=0;this.numberOfLines>c;c++){var d=this.trajectories[c];d.length>=this.trajectoryWidthMax&&d.shift(),d.push(b)}},f.prototype.drawRainbow=function(){var a=this;this.trajectories.forEach(function(b){g("["+a.scoreboardWidth+"C"),g(b.join("")),g("\n")}),this.cursorUp(this.numberOfLines)},f.prototype.drawNyanCat=function(a){var b=this,c=this.scoreboardWidth+this.trajectories[0].length;[0,1,2,3].forEach(function(d){switch(g("["+c+"C"),d){case 0:g("_,------,"),g("\n");break;case 1:var e=b.tick?" ":" ";g("_|"+e+"/\\_/\\ "),g("\n");break;case 2:var h,e=b.tick?"_":"__",f=b.tick?"~":"^";switch(a){case"pass":h="( ^ .^)";break;case"fail":h="( o .o)";break;default:h="( - .-)"}g(f+"|"+e+h+" "),g("\n");break;case 3:var e=b.tick?" ":" ";g(e+'"" "" '),g("\n")}}),this.cursorUp(this.numberOfLines)},f.prototype.cursorUp=function(a){g("["+a+"A")},f.prototype.cursorDown=function(a){g("["+a+"B")},f.prototype.generateColors=function(){for(var a=[],b=0;42>b;b++){var c=Math.floor(Math.PI/3),d=b*(1/6),e=Math.floor(3*Math.sin(d)+3),f=Math.floor(3*Math.sin(d+2*c)+3),g=Math.floor(3*Math.sin(d+4*c)+3);a.push(36*e+6*f+g+16)}return a},f.prototype.rainbowify=function(a){var b=this.rainbowColors[this.colorIndex%this.rainbowColors.length];return this.colorIndex+=1,"[38;5;"+b+"m"+a+""},f.prototype=new d,f.prototype.constructor=f}),a.register("reporters/progress.js",function(a,b,c){function g(a,b){d.call(this,a);var c=this,b=b||{},h=(this.stats,0|.5*d.window.width),i=a.total,j=0;Math.max,b.open=b.open||"[",b.complete=b.complete||"▬",b.incomplete=b.incomplete||d.symbols.dot,b.close=b.close||"]",b.verbose=!1,a.on("start",function(){console.log(),e.hide()}),a.on("test end",function(){j++;var c=j/i,d=0|h*c,g=h-d;e.CR(),process.stdout.write(""),process.stdout.write(f("progress"," "+b.open)),process.stdout.write(Array(d).join(b.complete)),process.stdout.write(Array(g).join(b.incomplete)),process.stdout.write(f("progress",b.close)),b.verbose&&process.stdout.write(f("progress"," "+j+" of "+i))}),a.on("end",function(){e.show(),console.log(),c.epilogue()})}var d=c("./base"),e=d.cursor,f=d.color;b=a.exports=g,d.colors.progress=90,g.prototype=new d,g.prototype.constructor=g}),a.register("reporters/spec.js",function(a,b,c){function g(a){function i(){return Array(g).join(" ")}d.call(this,a);var b=this,g=(this.stats,0),h=0;a.on("start",function(){console.log()}),a.on("suite",function(a){++g,console.log(f("suite","%s%s"),i(),a.title)}),a.on("suite end",function(){--g,1==g&&console.log()}),a.on("test",function(a){process.stdout.write(i()+f("pass"," ◦ "+a.title+": "))}),a.on("pending",function(a){var b=i()+f("pending"," - %s");console.log(b,a.title)}),a.on("pass",function(a){if("fast"==a.speed){var b=i()+f("checkmark"," "+d.symbols.ok)+f("pass"," %s ");e.CR(),console.log(b,a.title)}else{var b=i()+f("checkmark"," "+d.symbols.ok)+f("pass"," %s ")+f(a.speed,"(%dms)");e.CR(),console.log(b,a.title,a.duration)}}),a.on("fail",function(a){e.CR(),console.log(i()+f("fail"," %d) %s"),++h,a.title)}),a.on("end",b.epilogue.bind(b))}var d=c("./base"),e=d.cursor,f=d.color;b=a.exports=g,g.prototype=new d,g.prototype.constructor=g}),a.register("reporters/tap.js",function(a,b,c){function g(a){d.call(this,a);var e=(this.stats,1);a.on("start",function(){var b=a.grepTotal(a.suite);console.log("%d..%d",1,b)}),a.on("test end",function(){++e}),a.on("pending",function(a){console.log("ok %d %s # SKIP -",e,h(a))}),a.on("pass",function(a){console.log("ok %d %s",e,h(a))}),a.on("fail",function(a,b){console.log("not ok %d %s",e,h(a)),console.log(b.stack.replace(/^/gm," "))})}function h(a){return a.fullTitle().replace(/#/g,"")}var d=c("./base");d.cursor,d.color,b=a.exports=g}),a.register("reporters/teamcity.js",function(a,b,c){function e(a){d.call(this,a);var b=this.stats;a.on("start",function(){console.log("##teamcity[testSuiteStarted name='mocha.suite']")}),a.on("test",function(a){console.log("##teamcity[testStarted name='"+f(a.fullTitle())+"']")}),a.on("fail",function(a,b){console.log("##teamcity[testFailed name='"+f(a.fullTitle())+"' message='"+f(b.message)+"']")}),a.on("pending",function(a){console.log("##teamcity[testIgnored name='"+f(a.fullTitle())+"' message='pending']")}),a.on("test end",function(a){console.log("##teamcity[testFinished name='"+f(a.fullTitle())+"' duration='"+a.duration+"']")}),a.on("end",function(){console.log("##teamcity[testSuiteFinished name='mocha.suite' duration='"+b.duration+"']")})}function f(a){return a.replace(/\|/g,"||").replace(/\n/g,"|n").replace(/\r/g,"|r").replace(/\[/g,"|[").replace(/\]/g,"|]").replace(/\u0085/g,"|x").replace(/\u2028/g,"|l").replace(/\u2029/g,"|p").replace(/'/g,"|'")}var d=c("./base");b=a.exports=e}),a.register("reporters/xunit.js",function(a,b,c){function l(a){d.call(this,a);var b=this.stats,c=[];a.on("pass",function(a){c.push(a)}),a.on("fail",function(a){c.push(a)}),a.on("end",function(){console.log(n("testsuite",{name:"Mocha Tests",tests:b.tests,failures:b.failures,errors:b.failures,skip:b.tests-b.failures-b.passes,timestamp:(new g).toUTCString(),time:b.duration/1e3},!1)),c.forEach(m),console.log("</testsuite>")})}function m(a){var b={classname:a.parent.fullTitle(),name:a.title,time:a.duration/1e3};if("failed"==a.state){var c=a.err;b.message=f(c.message),console.log(n("testcase",b,!1,n("failure",b,!1,o(c.stack))))}else a.pending?console.log(n("testcase",b,!1,n("skipped",{},!0))):console.log(n("testcase",b,!0))}function n(a,b,c,d){var h,e=c?"/>":">",g=[];for(var i in b)g.push(i+'="'+f(b[i])+'"');return h="<"+a+(g.length?" "+g.join(" "):"")+e,d&&(h+=d+"</"+a+e),h}function o(a){return"<![CDATA["+f(a)+"]]>"}var d=c("./base"),e=c("../utils"),f=e.escape,g=global.Date;global.setTimeout,global.setInterval,global.clearTimeout,global.clearInterval,b=a.exports=l,l.prototype=new d,l.prototype.constructor=l}),a.register("runnable.js",function(a,b,c){function m(a,b){this.title=a,this.fn=b,this.async=b&&b.length,this.sync=!this.async,this._timeout=2e3,this._slow=75,this.timedOut=!1}var d=c("browser/events").EventEmitter,e=c("browser/debug")("mocha:runnable"),f=c("./ms"),g=global.Date,h=global.setTimeout,j=(global.setInterval,global.clearTimeout);global.clearInterval;var l=Object.prototype.toString;a.exports=m,m.prototype=new d,m.prototype.constructor=m,m.prototype.timeout=function(a){return 0==arguments.length?this._timeout:("string"==typeof a&&(a=f(a)),e("timeout %d",a),this._timeout=a,this.timer&&this.resetTimeout(),this)},m.prototype.slow=function(a){return 0===arguments.length?this._slow:("string"==typeof a&&(a=f(a)),e("timeout %d",a),this._slow=a,this)},m.prototype.fullTitle=function(){return this.parent.fullTitle()+" "+this.title},m.prototype.clearTimeout=function(){j(this.timer)},m.prototype.inspect=function(){return JSON.stringify(this,function(a,b){return"_"!=a[0]?"parent"==a?"#<Suite>":"ctx"==a?"#<Context>":b:void 0 },2)},m.prototype.resetTimeout=function(){var a=this,b=this.timeout();this.clearTimeout(),b&&(this.timer=h(function(){a.callback(Error("timeout of "+b+"ms exceeded")),a.timedOut=!0},b))},m.prototype.run=function(a){function j(a){i||(i=!0,b.emit("error",a||Error("done() called multiple times")))}function k(c){if(!b.timedOut){if(f)return j(c);b.clearTimeout(),b.duration=new g-d,f=!0,a(c)}}var f,i,b=this,c=this.timeout(),d=new g,e=this.ctx;if(e&&e.runnable(this),this.async&&c&&(this.timer=h(function(){k(Error("timeout of "+c+"ms exceeded")),b.timedOut=!0},c)),this.callback=k,this.async)try{this.fn.call(e,function(a){return"[object Error]"===l.call(a)?k(a):null!=a?k(Error("done() invoked with non-Error: "+a)):(k(),void 0)})}catch(m){k(m)}else{if(this.asyncOnly)return k(Error("--async-only option in use without declaring `done()`"));try{this.pending||this.fn.call(e),this.duration=new g-d,a()}catch(m){a(m)}}}}),a.register("runner.js",function(a,b,c){function l(a){var b=this;this._globals=[],this.suite=a,this.total=a.total(),this.failures=0,this.on("test end",function(a){b.checkGlobals(a)}),this.on("hook end",function(a){b.checkGlobals(a)}),this.grep(/.*/),this.globals(this.globalProps().concat(["errno"]))}function m(a,b){return h(b,function(b){var c=h(a,function(a){return~a.indexOf("*")?0==b.indexOf(a.split("*")[0]):/^mocha-/.test(b)?!0:b==a});return 0==c.length&&(!global.navigator||"onerror"!==b)})}var d=c("browser/events").EventEmitter,e=c("browser/debug")("mocha:runner"),g=(c("./test"),c("./utils")),h=g.filter;g.keys;var k=["setTimeout","clearTimeout","setInterval","clearInterval","XMLHttpRequest","Date"];a.exports=l,l.prototype=new d,l.prototype.constructor=l,l.prototype.grep=function(a,b){return e("grep %s",a),this._grep=a,this._invert=b,this.total=this.grepTotal(this.suite),this},l.prototype.grepTotal=function(a){var b=this,c=0;return a.eachTest(function(a){var d=b._grep.test(a.fullTitle());b._invert&&(d=!d),d&&c++}),c},l.prototype.globalProps=function(){for(var a=g.keys(global),b=0;k.length>b;++b)~a.indexOf(k[b])||a.push(k[b]);return a},l.prototype.globals=function(a){return 0==arguments.length?this._globals:(e("globals %j",a),g.forEach(a,function(a){this._globals.push(a)},this),this)},l.prototype.checkGlobals=function(a){if(!this.ignoreLeaks){var e,b=this._globals,c=this.globalProps(),d=process.kill;d&&1==b.length-c.length||2!=b.length-c.length&&(e=m(b,c),this._globals=this._globals.concat(e),e.length>1?this.fail(a,Error("global leaks detected: "+e.join(", "))):e.length&&this.fail(a,Error("global leak detected: "+e[0])))}},l.prototype.fail=function(a,b){++this.failures,a.state="failed","string"==typeof b&&(b=Error('the string "'+b+'" was thrown, throw an Error :)')),this.emit("fail",a,b)},l.prototype.failHook=function(a,b){this.fail(a,b),this.emit("end")},l.prototype.hook=function(a,b){function g(a){var c=d[a];return c?(e.currentRunnable=c,e.emit("hook",c),c.on("error",function(a){e.failHook(c,a)}),c.run(function(b){c.removeAllListeners("error");var d=c.error();return d&&e.fail(e.test,d),b?e.failHook(c,b):(e.emit("hook end",c),g(++a),void 0)}),void 0):b()}var c=this.suite,d=c["_"+a],e=this;process.nextTick(function(){g(0)})},l.prototype.hooks=function(a,b,c){function f(g){return d.suite=g,g?(d.hook(a,function(a){return a?(d.suite=e,c(a)):(f(b.pop()),void 0)}),void 0):(d.suite=e,c())}var d=this,e=this.suite;f(b.pop())},l.prototype.hookUp=function(a,b){var c=[this.suite].concat(this.parents()).reverse();this.hooks(a,c,b)},l.prototype.hookDown=function(a,b){var c=[this.suite].concat(this.parents());this.hooks(a,c,b)},l.prototype.parents=function(){for(var a=this.suite,b=[];a=a.parent;)b.push(a);return b},l.prototype.runTest=function(a){var b=this.test,c=this;this.asyncOnly&&(b.asyncOnly=!0);try{b.on("error",function(a){c.fail(b,a)}),b.run(a)}catch(d){a(d)}},l.prototype.runTests=function(a,b){function f(){if(c.failures&&a._bail)return b();if(e=d.shift(),!e)return b();var h=c._grep.test(e.fullTitle());return c._invert&&(h=!h),h?e.pending?(c.emit("pending",e),c.emit("test end",e),f()):(c.emit("test",c.test=e),c.hookDown("beforeEach",function(){c.currentRunnable=c.test,c.runTest(function(a){return e=c.test,a?(c.fail(e,a),c.emit("test end",e),c.hookUp("afterEach",f)):(e.state="passed",c.emit("pass",e),c.emit("test end",e),c.hookUp("afterEach",f),void 0)})}),void 0):f()}var e,c=this,d=a.tests.slice();this.next=f,f()},l.prototype.runSuite=function(a,b){function g(){var b=a.suites[f++];return b?(d.runSuite(b,g),void 0):h()}function h(){d.suite=a,d.hook("afterAll",function(){d.emit("suite end",a),b()})}var c=this.grepTotal(a),d=this,f=0;return e("run suite %s",a.fullTitle()),c?(this.emit("suite",this.suite=a),this.hook("beforeAll",function(){d.runTests(a,g)}),void 0):b()},l.prototype.uncaught=function(a){e("uncaught exception %s",a.message);var b=this.currentRunnable;if(b&&"failed"!=b.state)return b.clearTimeout(),a.uncaught=!0,this.fail(b,a),"test"==b.type?(this.emit("test end",b),this.hookUp("afterEach",this.next),void 0):(this.emit("end"),void 0)},l.prototype.run=function(a){var b=this,a=a||function(){};return e("start"),this.on("end",function(){e("end"),process.removeListener("uncaughtException",b.uncaught.bind(b)),a(b.failures)}),this.emit("start"),this.runSuite(this.suite,function(){e("finished running"),b.emit("end")}),process.on("uncaughtException",this.uncaught.bind(this)),this}}),a.register("suite.js",function(a,b,c){function i(a,b){this.title=a,this.ctx=b,this.suites=[],this.tests=[],this.pending=!1,this._beforeEach=[],this._beforeAll=[],this._afterEach=[],this._afterAll=[],this.root=!a,this._timeout=2e3,this._slow=75,this._bail=!1}var d=c("browser/events").EventEmitter,e=c("browser/debug")("mocha:suite"),f=c("./ms"),g=c("./utils"),h=c("./hook");b=a.exports=i,b.create=function(a,b){var c=new i(b,a.ctx);return c.parent=a,a.pending&&(c.pending=!0),b=c.fullTitle(),a.addSuite(c),c},i.prototype=new d,i.prototype.constructor=i,i.prototype.clone=function(){var a=new i(this.title);return e("clone"),a.ctx=this.ctx,a.timeout(this.timeout()),a.slow(this.slow()),a.bail(this.bail()),a},i.prototype.timeout=function(a){return 0==arguments.length?this._timeout:("string"==typeof a&&(a=f(a)),e("timeout %d",a),this._timeout=parseInt(a,10),this)},i.prototype.slow=function(a){return 0===arguments.length?this._slow:("string"==typeof a&&(a=f(a)),e("slow %d",a),this._slow=a,this)},i.prototype.bail=function(a){return 0==arguments.length?this._bail:(e("bail %s",a),this._bail=a,this)},i.prototype.beforeAll=function(a){if(this.pending)return this;var b=new h('"before all" hook',a);return b.parent=this,b.timeout(this.timeout()),b.slow(this.slow()),b.ctx=this.ctx,this._beforeAll.push(b),this.emit("beforeAll",b),this},i.prototype.afterAll=function(a){if(this.pending)return this;var b=new h('"after all" hook',a);return b.parent=this,b.timeout(this.timeout()),b.slow(this.slow()),b.ctx=this.ctx,this._afterAll.push(b),this.emit("afterAll",b),this},i.prototype.beforeEach=function(a){if(this.pending)return this;var b=new h('"before each" hook',a);return b.parent=this,b.timeout(this.timeout()),b.slow(this.slow()),b.ctx=this.ctx,this._beforeEach.push(b),this.emit("beforeEach",b),this},i.prototype.afterEach=function(a){if(this.pending)return this;var b=new h('"after each" hook',a);return b.parent=this,b.timeout(this.timeout()),b.slow(this.slow()),b.ctx=this.ctx,this._afterEach.push(b),this.emit("afterEach",b),this},i.prototype.addSuite=function(a){return a.parent=this,a.timeout(this.timeout()),a.slow(this.slow()),a.bail(this.bail()),this.suites.push(a),this.emit("suite",a),this},i.prototype.addTest=function(a){return a.parent=this,a.timeout(this.timeout()),a.slow(this.slow()),a.ctx=this.ctx,this.tests.push(a),this.emit("test",a),this},i.prototype.fullTitle=function(){if(this.parent){var a=this.parent.fullTitle();if(a)return a+" "+this.title}return this.title},i.prototype.total=function(){return g.reduce(this.suites,function(a,b){return a+b.total()},0)+this.tests.length},i.prototype.eachTest=function(a){return g.forEach(this.tests,a),g.forEach(this.suites,function(b){b.eachTest(a)}),this}}),a.register("test.js",function(a,b,c){function e(a,b){d.call(this,a,b),this.pending=!b,this.type="test"}var d=c("./runnable");a.exports=e,e.prototype=new d,e.prototype.constructor=e}),a.register("utils.js",function(a,b,c){function i(a){return!~h.indexOf(a)}function j(a){return a.replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\/\/(.*)/gm,'<span class="comment">//$1</span>').replace(/('.*?')/gm,'<span class="string">$1</span>').replace(/(\d+\.\d+)/gm,'<span class="number">$1</span>').replace(/(\d+)/gm,'<span class="number">$1</span>').replace(/\bnew *(\w+)/gm,'<span class="keyword">new</span> <span class="init">$1</span>').replace(/\b(function|new|throw|return|var|if|else)\b/gm,'<span class="keyword">$1</span>')}var d=c("browser/fs"),e=c("browser/path"),f=e.join,g=c("browser/debug")("mocha:watch"),h=["node_modules",".git"];b.escape=function(a){return(a+"").replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")},b.forEach=function(a,b,c){for(var d=0,e=a.length;e>d;d++)b.call(c,a[d],d)},b.indexOf=function(a,b,c){for(var d=c||0,e=a.length;e>d;d++)if(a[d]===b)return d;return-1},b.reduce=function(a,b,c){for(var d=c,e=0,f=a.length;f>e;e++)d=b(d,a[e],e,a);return d},b.filter=function(a,b){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d];b(f,d,a)&&c.push(f)}return c},b.keys=Object.keys||function(a){var b=[],c=Object.prototype.hasOwnProperty;for(var d in a)c.call(a,d)&&b.push(d);return b},b.watch=function(a,b){var c={interval:100};a.forEach(function(a){g("file %s",a),d.watchFile(a,c,function(c,d){d.mtime<c.mtime&&b(a)})})},b.files=function(a,c){return c=c||[],d.readdirSync(a).filter(i).forEach(function(e){e=f(a,e),d.statSync(e).isDirectory()?b.files(e,c):e.match(/\.(js|coffee)$/)&&c.push(e)}),c},b.slug=function(a){return a.toLowerCase().replace(/ +/g,"-").replace(/[^-\w]/g,"")},b.clean=function(a){a=a.replace(/^function *\(.*\) *{/,"").replace(/\s+\}$/,"");var c=a.match(/^\n?( *)/)[1].length,d=RegExp("^ {"+c+"}","gm");return a=a.replace(d,""),b.trim(a)},b.escapeRegexp=function(a){return a.replace(/[-\\^$*+?.()|[\]{}]/g,"\\$&")},b.trim=function(a){return a.replace(/^\s+|\s+$/g,"")},b.parseQuery=function(a){return b.reduce(a.replace("?","").split("&"),function(a,b){var c=b.indexOf("="),d=b.slice(0,c),e=b.slice(++c);return a[d]=decodeURIComponent(e),a},{})},b.highlightTags=function(a){for(var b=document.getElementsByTagName(a),c=0,d=b.length;d>c;++c)b[c].innerHTML=j(b[c].innerHTML)}}),process={},process.exit=function(){},process.stdout={},global=window,process.nextTick=function(){if(window.ActiveXObject||!window.postMessage)return function(a){a()};var a=[],b="mocha-zero-timeout";return window.addEventListener("message",function(c){c.source==window&&c.data==b&&(c.stopPropagation&&c.stopPropagation(),a.length&&a.shift()())},!0),function(c){a.push(c),window.postMessage(b,"*")}}(),process.removeListener=function(a){"uncaughtException"==a&&(window.onerror=null)},process.on=function(a,b){"uncaughtException"==a&&(window.onerror=function(a,c,d){b(Error(a+" ("+c+":"+d+")"))})},function(){var b=window.Mocha=a("mocha"),c=window.mocha=new b({reporter:"html"});c.ui=function(a){return b.prototype.ui.call(this,a),this.suite.emit("pre-require",window,null,this),this},c.setup=function(a){"string"==typeof a&&(a={ui:a});for(var b in a)this[b](a[b]);return this},c.run=function(a){c.options,c.globals("location");var e=b.utils.parseQuery(window.location.search||"");return e.grep&&c.grep(e.grep),e.invert&&c.invert(),b.prototype.run.call(c,function(){b.utils.highlightTags("code"),a&&a()})}}()})()});
21,881
32,096
0.674215
96b6eb2a89bca1eb2040168b6d76f3ab7fa39a00
428
js
JavaScript
components/atoms/Container.js
megatroom/nardini-academy
9b30d077b6e789e9e50c78e4d22e898796162162
[ "MIT" ]
null
null
null
components/atoms/Container.js
megatroom/nardini-academy
9b30d077b6e789e9e50c78e4d22e898796162162
[ "MIT" ]
9
2020-10-16T12:04:28.000Z
2021-11-03T21:24:13.000Z
components/atoms/Container.js
megatroom/nardini-academy
9b30d077b6e789e9e50c78e4d22e898796162162
[ "MIT" ]
null
null
null
import React from "react"; const Container = ({ children }) => ( <> <div className="container">{children}</div> <style jsx>{` .container { margin-right: auto; margin-left: auto; padding-left: 21px; padding-right: 21px; } @media (min-width: 1212px) { .container { width: 1212px; } } `}</style> </> ); export default Container;
17.12
47
0.507009
96b73471b81637cb85e3df7d149fe6dd0ea7df24
1,766
js
JavaScript
src/components/BackgroundBlobs/Blob1.js
anaispoirier/spacetango_portal
fff5fe31695be3a6ddfffb910f148a13cc45bdbe
[ "MIT" ]
null
null
null
src/components/BackgroundBlobs/Blob1.js
anaispoirier/spacetango_portal
fff5fe31695be3a6ddfffb910f148a13cc45bdbe
[ "MIT" ]
null
null
null
src/components/BackgroundBlobs/Blob1.js
anaispoirier/spacetango_portal
fff5fe31695be3a6ddfffb910f148a13cc45bdbe
[ "MIT" ]
null
null
null
import React, { useState, useEffect } from "react"; import { useSpring, animated } from "react-spring"; import "./styles.scss"; import blobs from "blobs"; require('react-dom'); window.React2 = require('react'); console.log(window.React1 === window.React2); const options = { complexity: 0.3, contrast: 0.6, guides: true, size: 1000, color: "hsl(6.13, 73.23%, 49.8%)", stroke: 0 }; const Background = ({ svg, fill }) => ( <div> <svg viewBox="0 0 10 600" className="wheel blob-svg"> <defs> <radialGradient id="radial-gradient" cx="10%" fx="10%" fr="0%" r="80%" style={{ filter: "blur(1.5)" }}> <stop offset="20%" stop-color="#cfc4ff33" /> {/* <stop offset="50%" stop-color="#ffffffaa" /> */} <stop offset="95%" stop-color="#27336F55" /> </radialGradient> </defs> { // <Lines /> } <g transform="translate(0,0)"> <animated.path class="blob-gradient" d={svg} style={{ filter: "blur(30px)" }} /> </g> </svg> </div> ); function Blob() { const [blob, change] = useState(blobs.editable(options)); console.log(blob.children[0].children[0].attributes.d); // const props3 = useSpring({ // svg: blob.children[0].children[0].attributes.d, // fill: blob.children[0].children[0].attributes.fill, // config: { duration: 10000 } // }); useEffect(() => { change(blobs.editable(options)); const interval = setInterval(() => { change(blobs.editable(options)); }, 10000); return () => clearInterval(interval); }, []); return ( <div className="App"> bleh {/* <Background svg={props3.svg} fill={props3.fill} /> */} </div> ); } export default Blob;
23.864865
111
0.560589
96b74b1410f30d459b735b8542a554924db3866b
7,006
js
JavaScript
index.js
hangxingliu/node-assert
c0aab69235c855543aca171b36fbcbbdddfc779f
[ "MIT" ]
null
null
null
index.js
hangxingliu/node-assert
c0aab69235c855543aca171b36fbcbbdddfc779f
[ "MIT" ]
null
null
null
index.js
hangxingliu/node-assert
c0aab69235c855543aca171b36fbcbbdddfc779f
[ "MIT" ]
null
null
null
//@ts-check let assert = require('assert'), { AssertionError } = assert; module.exports = { Assert, Invoke }; /** @param {any} value */ function Assert(value) { let throwAssertionError = (message, expected, actual) => { throw new AssertionError({ message, expected, actual }) }; let chains = { get and() { return chains }, print, isTrue, isFalse, isUndefined, equals, equalsInJSON, fieldsEqual, differentFrom, greaterThan, lessThan, isString, isNumber, isObject, isTypeof, isArray, isEmpty, length, lengthIn, containsKeys, containsValue, containsSubString, doesNotContainSubString, trim, allKeys, allKeyValueTuples, child, sort, parseJSON, each, convertBy, // aliases: field: child }; return chains; function print() { console.log(value); return chains; } function isTrue() { return equals(true); } function isFalse() { return equals(false); } function isUndefined() { return equals(undefined); } function isString() { return isTypeof('string'); } function isNumber() { return isTypeof('number'); } function isObject() { return isTypeof('object'); } /** @param {string} type */ function isTypeof(type) { assert.deepStrictEqual(typeof value, type); return chains; } function equals(expected) { assert.deepStrictEqual(value, expected); return chains; } function differentFrom(expected) { assert.notDeepStrictEqual(value, expected); return chains; } /** @type {any} */ function equalsInJSON(expected) { assert.deepStrictEqual(JSON.stringify(value), JSON.stringify(expected)); return chains; } function greaterThan(expected) { if(value > expected) return chains; throwAssertionError(`value is not greater than ${expected}`, `greater than ${expected}`, value); } function lessThan(expected) { if(value < expected) return chains; throwAssertionError(`value is not less than ${expected}`, `less than ${expected}`, value); } /** @param {{[fieldName: string]: any}} equalMap */ function fieldsEqual(equalMap) { for (let fieldName in equalMap) assert.deepStrictEqual(value[fieldName], equalMap[fieldName]); return chains; } function isArray() { if (!Array.isArray(value)) throwAssertionError('Value is not an array', 'An Array', value); return chains; } function isEmpty() { let type = typeof value; if (Array.isArray(value) || type == 'string') return length(0); if (type == 'number') return equals(0); if (type == 'object' && !value) // null return chains; return isUndefined(); } /** @param {number} len */ function length(len) { let actual = value.length; if (typeof actual != 'number') throwAssertionError('value.length is not a number', 'value.length is a number', value); if (actual !== len) throwAssertionError(`value.length != ${len}`, len, actual); return chains; } /** * length of value in range: [min, max) * @param {number} min * @param {number} [max] */ function lengthIn(min, max = Infinity) { if (typeof value.length != 'number') throwAssertionError('value.length is not a number', 'value.length is a number', value); let range = `[${min}, ${max})`; if (value.length < min) throwAssertionError(`value.length < ${min}`, range, value.length); if (value.length >= max) throwAssertionError(`value.length < ${min}`, range, value.length); return chains; } /** @param {string[]} keys */ function containsKeys(...keys) { for (let k of keys) if (!(k in value)) throwAssertionError(`\`${k}\` is missing in value`, `{ "${k}": any, ... }`, value); return chains; } /** @param {any} v */ function containsValue(v) { for (let key in value) if (value[key] == v) return chains; throwAssertionError(`${JSON.stringify(v)} is missing in value`, `contains ${JSON.stringify(v)}`, value); } /** @param {string} subString */ function containsSubString(subString) { isString(); if (value.indexOf(subString) < 0) { let name = JSON.stringify(subString); if (name.length > 100) name = name.slice(0, 95) + " ... \""; throwAssertionError(`value doesn't contain substring`, `string contains ${name}`, value); } return chains; } /** @param {string} subString */ function doesNotContainSubString(subString) { isString(); if (value.indexOf(subString) >= 0) { let name = JSON.stringify(subString); if (name.length > 100) name = name.slice(0, 95) + " ... \""; throwAssertionError(`value contains substring`, `string doesn't contains ${name}`, value); } return chains; } function trim() { isString(); return Assert(value.trim()); } function allKeys() { return Assert(Object.keys(value)); } function allKeyValueTuples() { return Assert(Object.keys(value).map(k => ({ k, v: value[k] }))); } function sort() { isArray(); return Assert(Object.assign([], value).sort()); } /** @param {string} fieldName */ function child(fieldName) { containsKeys(fieldName); return Assert(value[fieldName]); } /** @param {(value: any, key: string) => any} handler */ function each(handler) { for (let k in value) handler(value[k], k); return chains; } function parseJSON() { let object = void 0; try { object = JSON.parse(value); } catch (ex) { throwAssertionError('Could not parse JSON', `A valid JSON`, `Invalid JSON: ${ex.message}`); } return Assert(object); } /** @param {(any) => any} handler */ function convertBy(handler) { return Assert(handler(value)); } } /** * @param {Function} func * @param {any} [context] * @param {any[]} [parameters] */ function Invoke(func, context, ...parameters) { let invokeExpression = `${func.name}(${parameters.map(p=>JSON.stringify(p)).join(', ')})`; let value = undefined, exception = undefined; try { value = func.call(context, ...parameters); } catch (e) { exception = e; } let chains = Object.assign({ hasException }, Assert(value)); if (typeof exception != 'undefined') { let throwAgain = (originalCheckerName) => { throw new AssertionError({ message: `${invokeExpression} thrown an exception`, expected: originalCheckerName, actual: 'message' in exception ? exception.message : exception }); }; for (let funcName in chains) if (funcName != hasException.name) chains[funcName] = throwAgain.bind(this, funcName); } return chains; function hasException(keyword = '') { let expected = keyword ? `An exception has keyword "${keyword}"` : `An exception`; if (typeof exception == 'undefined') { throw new AssertionError({ message: `${invokeExpression} didn't thrown an exception`, expected, actual: 'No exception' }); } if (keyword) { let message = String('message' in exception ? exception.message : exception); if (message.toLowerCase().indexOf(keyword.toLowerCase()) < 0) throw new AssertionError({ message: `${invokeExpression} thrown an exception without keyword`, expected, actual: `An exception with message: ${JSON.stringify(message)}` }) } // OK } }
25.292419
106
0.65815
96b76fe80ce6a20254242eac532031bbd08c7aa0
5,701
js
JavaScript
lib/static/hexo-admin.js
teambition/hexo-admin
d2ce3ed3f25ae5eb96b3c5dc6d9cf54a9ebc63f5
[ "MIT" ]
1
2015-09-14T10:44:19.000Z
2015-09-14T10:44:19.000Z
lib/static/hexo-admin.js
teambition/hexo-admin
d2ce3ed3f25ae5eb96b3c5dc6d9cf54a9ebc63f5
[ "MIT" ]
null
null
null
lib/static/hexo-admin.js
teambition/hexo-admin
d2ce3ed3f25ae5eb96b3c5dc6d9cf54a9ebc63f5
[ "MIT" ]
null
null
null
angular.module('hexo-admin',[]). filter('markdown',function(){ var convert=new Showdown.converter(); return function(value){ return convert.makeHtml(value||''); } }); function post($scope,$http){ $scope.deployState="部署"; $scope.clearState='清理图片'; $scope.generateState="generate"; $scope.change=function(post){ post.modifyed=true; }; $scope.clearImage=function(){ $scope.clearState='清理中...'; $http.get('/cleanimage'). success(function(data){ console.log(data); $scope.clearState='清理图片'; }); }; $scope.generate=function(){ $scope.generateState="generating..."; $http.get('/generate'). success(function(data){ console.log(data); $scope.generateState="generate"; }); }; $scope.deploy=function(){ $scope.deployState='部署中...'; $http.get('/deploy'). success(function(data){ console.log(data); $scope.deployState="部署"; }); }; $scope.create=function(){ if($scope.newTitle){ $http.post('/post',{title:$scope.newTitle}). success(function(data){ console.log(data); var newPost={ id:data.id, title:$scope.newTitle, date:data.date, content:'', header:'default.jpg', tags:[] }; $scope.posts.unshift(newPost); $scope.newTitle=""; $scope.$apply(); $('#'+data.id+' textarea').scroll(function(){ var out=$('#'+data.id+' .output')[0]; setH(out,getH(this)); }); $scope.show(newPost); }); } }; $scope.del=function(post){ var index=$scope.posts.indexOf(post); if(index>-1){ $scope.posts.splice(index,1); $http.delete('/post/'+post.id). success(function(date){ dates(); console.log(date); }); } } $scope.modify=function(post){ if(post.modifyed){ console.log(post); $http.post('/post/'+post.id,post). success(function(data){ console.log(data) post.modifyed=false; }); } } $scope.slideup=function(){ $('.content').slideUp(); $scope.posts.map(function(post){ if(post.show)post.show=false; }); $scope.$apply(); }; var editor; function open(post){ var id=post.id; post.show=true; var height=$(window).height(); $('#'+id+' .input').height(height-100); $('#'+id+' .output').height(height-64); $('#'+id+' .markItUp').length==0&& $('#'+id+' textarea').markItUp(mySettings); $('#'+id+'>div').slideDown(function(){ $.scrollTo('#'+id+'>h4','#'+id+'>h4'); }); } function getH(fn){ return fn.scrollTop/(fn.scrollHeight-fn.offsetHeight+2); } function setH(fn,h){ fn.scrollTop=h*(fn.scrollHeight-fn.offsetHeight+2); } $scope.addTag=function(post){ if($scope.tags.indexOf(post.addtag)==-1){ $http.post('/tag/'+post.addtag).success(function(){ $scope.tags.push(post.addtag); post.addtag=''; }); } }; $scope.rmTag=function(tag){ $http.delete('/tag/'+tag).success(function(){ $scope.tags.splice($scope.tags.indexOf(tag),1); }); }; $scope.aTag=function(post,tag){ if(post.tags.indexOf(tag)==-1){ post.modifyed=true; post.tags.push(tag); } }; $scope.rTag=function(post,tag){ post.modifyed=true; post.tags.splice(post.tags.indexOf(tag),1); }; $scope.aImage=function(post){ var file=$('#'+post.id+' .imgFile')[0].files[0]; if(file){ form=new FormData(); form.append('image',file); var xhr=new XMLHttpRequest(); xhr.open('POST','/image',true); xhr.onload=function(data){ var msg=data.currentTarget.response; post.imageAlert='![](/image/'+JSON.parse(msg).name+')'; $scope.$apply(); }; xhr.send(form); } }; $scope.aHeader=function(post){ var file=$('#'+post.id+' .headerImg')[0].files[0]; if(file){ form=new FormData(); form.append('header',file); var xhr=new XMLHttpRequest(); xhr.open('POST','/header',true); xhr.onload=function(data){ post.modifyed=true; var msg=data.currentTarget.response; post.header=JSON.parse(msg).name; $scope.$apply(); }; xhr.send(form); } }; $scope.show=function(post){ if($('#'+post.id+'>div').css('display')!='none'){ post.show=false; $('#'+post.id+'>div').slideUp(); } else{ if(post.content!=""&&!post.content){ $http.get('/post/'+post.id).success(function(data){ post.content=data.content; post.tags=data.tags||[]; post.header=data.header||'default.jpg'; console.log(data); $scope.$apply(); $('#'+post.id+' textarea').scroll(function(){ var out=$('#'+post.id+' .output')[0]; setH(out,getH(this)); }); open(post); }); } else open(post); } dates(); }; var edit=''; var dates = function() { var j = $(".title"); var o = $(window).scrollTop(); var top=-1; for(var i=0;top==-1&&i<j.length;i++){ var a=j[i+1]?$(j[i+1]).offset().top:65535; if(a>o){ top=1; var p=$scope.title=$scope.posts[i-1]; if(p&&edit!=p.id){ if(edit!=''){ $('#'+edit+' textarea').attr('id',''); } edit=p.id; $('#'+p.id+' textarea').attr('id','wmd-input'); } } } $scope.$apply(); }; $scope.tags=[]; $(window).scroll(dates); $http.get('/post').success(function(data){ console.log(data); $scope.posts=data.posts.reverse(); $scope.tags=data.tags; }); }
26.151376
63
0.532012
96b7e232a3cd7607f901d95a60f8798c2cb47a5e
3,124
js
JavaScript
resources/assets/application/user-group/form/controller.js
officiallans/laveralangular
0037300f15ceb4048dc7b9ab1c63d9bd7cb8f066
[ "MIT" ]
null
null
null
resources/assets/application/user-group/form/controller.js
officiallans/laveralangular
0037300f15ceb4048dc7b9ab1c63d9bd7cb8f066
[ "MIT" ]
null
null
null
resources/assets/application/user-group/form/controller.js
officiallans/laveralangular
0037300f15ceb4048dc7b9ab1c63d9bd7cb8f066
[ "MIT" ]
null
null
null
module.exports = function ($app) { return $app.controller('CreateUserGroupController', ['$scope', '$state', '$http', '$uibModal', '$timeout', function ($scope, $state, $http, $uibModal, $timeout) { $scope.users = []; $scope.userFilter = ''; $scope.usersCheckedLength = function () { return _.filter($scope.users, function (elem) { return elem.checked; }).length; }; if ($state.params.id) { $scope.formUrl = baseUrl + 'api/user/group/' + $state.params.id; $scope.method = 'PUT'; $scope.edit = true; $http({url: $scope.formUrl + '/edit'}) .then( function (response) { $scope.title = response.data.name; response.data.users.map(function (elem) { $scope.users.push(elem); }); $scope.title = response.data.name; }, function (response) { if (response.status === 403) { $state.go('^.index'); var error = $uibModal.open({ template: '<div class="alert alert-danger" role="alert" style="margin-bottom: 0;">Доступ заборонено!</div>' }); $timeout(function () { error.close(); }, 5000); } } ); } else { $scope.formUrl = baseUrl + 'api/user/group'; $scope.method = 'POST'; $scope.edit = false; $http({ url: baseUrl + 'api/user/group/create' }).then(function (repsonse) { repsonse.data.map(function (elem) { $scope.users.push(elem); }); }, function (response) { if (response.status === 403) { var error = $uibModal.open({ template: '<div class="alert alert-danger" role="alert" style="margin-bottom: 0;">Доступ заборонено!</div>' }); $state.go('^.index'); $timeout(function () { error.close(); }, 5000); } }); } $scope.submitting = false; $scope.save = function () { if ($scope.submitting) return; $scope.submitting = true; $http({ url: $scope.formUrl, method: $scope.method, data: { title: $scope.title, users: $scope.users } }).then(function (repsonse) { $scope.submitting = false; $state.go('site.user-group.edit', {'id': repsonse.data.id}, {reload: true}); }); } }]); };
41.105263
166
0.392766
96b8b29570726a4ed2ca884d3edd278e6434f296
3,568
js
JavaScript
src/js/closure.js
stormwings/knowledge
57fd6da6c29d3d1a25c002521c8bcfd2a65e9c2d
[ "MIT" ]
null
null
null
src/js/closure.js
stormwings/knowledge
57fd6da6c29d3d1a25c002521c8bcfd2a65e9c2d
[ "MIT" ]
21
2021-03-09T13:17:06.000Z
2021-08-21T19:39:34.000Z
src/js/closure.js
stormwings/knowledge
57fd6da6c29d3d1a25c002521c8bcfd2a65e9c2d
[ "MIT" ]
null
null
null
// Los closures son funciones que retornan otra funcion // ademas permiten conservar el scope de las variables al momento que son declaradas // simple example function buildSum(base) { return function(value) { return base + value } } const addFive = buildSum(0) console.log(addFive(10)) // using ECS5 example const buildRest = base => value => base - value const restFive = buildRest(10) console.log(restFive(3)) // closure currying // without currying function sumThreeNumber(a, b, c) { return a + b + c } console.log(sumThreeNumber(1, 2, 3)) // with currying function sumThreeNumber(a) { return function(b) { return function(c) { return a + b + c } } } console.log(sumThreeNumber(1)(2)(3)) // 6 // Not a closure (only console.log) // const moneyBox = coins => { // var saveCoins = 0; // saveCoins += coins; // console.log(`Moneybox = $${saveCoins}`); // }; // moneyBox(5); // show 5 because is'nt a closure // moneyBox(10); // show 10 because is'nt a closure // Un Closure // Es la combinación de una función y el ámbito léxico en el que se declaró dicha función. // Es decir los closures o clausuras son funciones que manejan variables independientes. // En otras palabras, la función definida en el closure "recuerda" el ámbito en el que se ha creado. const alcancia = () => { var saveCoins = 0; // closure value (setted in global scope) const countCoins = coins => { saveCoins += coins; console.log(`Moneybox: $${saveCoins}`); } return countCoins; } let myMoneyBox = alcancia(); myMoneyBox(4); // 4 xq recuerda la asignación del valor anterior myMoneyBox(6); // 10 xq recuerda la asignación del valor anterior myMoneyBox(10); // 20 xq recuerda la asignación del valor anterior // Lexical scope in closures const buildCount = i => { let count = i; // closure value (setted in function scope) const displayCount = () => { console.log(count++); }; return displayCount; }; const myCount = buildCount(1); myCount(); // 1 myCount(); // 2 myCount(); // 3 const myOtherCount = buildCount(10); myOtherCount(); // 10 myOtherCount(); // 11 // Object const person = () => { let saveName = "Name"; return { getName: () => saveName, setName: (name) => { saveName = name; }, }; }; const newPerson = person(); console.log(newPerson.getName()); newPerson.setName('Mariano'); console.log(newPerson.getName()); // Object 2 const person = () => { // Convertir a una variable "privada" // hacer que solo mediante la funcion se pueda cambiar el estado y no desde afuera sin funciones osea practicamente directamente cambiarle su valor let guardarNombre = "Name"; // asegurar los cambios de la variable privada la cual soo se puede modificar por metodos y jamas por valor directo const estadoNombre = () => { return guardarNombre; }; // Creacion de un pseudo-objeto para manipular estados return { getName: () => { return guardarNombre; }, setName: (nombre) => { guardarNombre = nombre; }, estadoNombre }; }; nuevaPersona = person(); console.log(nuevaPersona.getName()); nuevaPersona.setName('Mariano'); console.log(nuevaPersona.getName()); console.log(nuevaPersona.estadoNombre()); // With loop const iterateScope = () => { for (let i = 0; i < 10; i++) { setTimeout(() => { console.log(i); }, 1000); }; }; // counter const createCount = (count = 0) => { inc: () => count += 1 des: () => count -= 1 get: () => count } const counterOne = createCount(10); const counterTwo = createCount(500);
23.019355
149
0.660874
96ba129bc4b8d4393517bbe6fe670eb20014c008
1,197
js
JavaScript
property-model.js
Nvt2106/ss-models
2fe4874bc8e7c223006531ce0e132c4affd7b6cb
[ "MIT" ]
null
null
null
property-model.js
Nvt2106/ss-models
2fe4874bc8e7c223006531ce0e132c4affd7b6cb
[ "MIT" ]
null
null
null
property-model.js
Nvt2106/ss-models
2fe4874bc8e7c223006531ce0e132c4affd7b6cb
[ "MIT" ]
null
null
null
'use strict'; var Validator = Validator || {}; if (typeof require !== 'undefined') { Validator = require('tc-validator'); } var PropertyModel = PropertyModel || {}; PropertyModel.validationRules = PropertyModel.validationRules || {}; var rules = []; rules.push(new Validator.NumberRule('organization_id', 'Organization', true)); rules.push(new Validator.StringRule('property_name', 'Property Name', true, 1, 256)); rules.push(new Validator.NumberRule('property_type_id', 'Property Type', true)); rules.push(new Validator.NumberRule('room_type_id', 'Room Type', true)); rules.push(new Validator.NumberRule('accommodates', 'Accommodates', false, 1, 1000)); rules.push(new Validator.NumberRule('bedrooms', 'Bedrooms', false, 1, 1000)); rules.push(new Validator.NumberRule('bathrooms', 'Bathrooms', false, 1, 1000)); rules.push(new Validator.NumberRule('beds', 'Beds', false, 1, 1000)); PropertyModel.validationRules.creatingObject = rules; PropertyModel.validationRules.updatingObject = PropertyModel.validationRules.creatingObject; if (typeof module !== 'undefined' && typeof module.exports !== 'undefined') module.exports = PropertyModel; else window.PropertyModel = PropertyModel;
39.9
92
0.745196
96ba8bac1f240c15f848facab73c2553f94cb5be
1,426
js
JavaScript
src/463_island_perimeter/island-perimeter.js
DawChihLiou/leetcode-challenge
ca841dc54d1c89640bb9cbeb428c39e421eada21
[ "MIT" ]
null
null
null
src/463_island_perimeter/island-perimeter.js
DawChihLiou/leetcode-challenge
ca841dc54d1c89640bb9cbeb428c39e421eada21
[ "MIT" ]
null
null
null
src/463_island_perimeter/island-perimeter.js
DawChihLiou/leetcode-challenge
ca841dc54d1c89640bb9cbeb428c39e421eada21
[ "MIT" ]
null
null
null
/** * You are given a map in form of a two-dimensional integer grid where 1 * represents land and 0 represents water. Grid cells are connected * horizontally/vertically (not diagonally). The grid is completely surrounded * by water, and there is exactly one island (i.e., one or more connected land * cells). The island doesn't have "lakes" (water inside that isn't connected * to the water around the island). One cell is a square with side length 1. * The grid is rectangular, width and height don't exceed 100. Determine the * perimeter of the island. * * --------------------------- * Example: * [[0,1,0,0], * [1,1,1,0], * [0,1,0,0], * [1,1,0,0]] * * Answer: 16 * -------------------------- * * @param {number[][]} grid * @return {number} */ var islandPerimeter = function(grid) { const rows = grid.length; const cols = grid[0].length; var perimeter = 0; for (var row = 0; row < rows; row++) { for (var col = 0; col < cols; col++) { if (!grid[row][col]) continue; perimeter += 4; // abstract the number of adjacent islands if (row > 0 && grid[row - 1][col]) perimeter--; if (col > 0 && grid[row][col - 1]) perimeter--; if (row < rows - 1 && grid[row + 1][col]) perimeter--; if (col < cols - 1 && grid[row][col + 1]) perimeter--; } } return perimeter; };
31
79
0.556101
96bac03dcc5258053b408604e4009bbd9d763509
934
js
JavaScript
dist/index.min.js
afeiship/next-baidu-fanyi
20ffb4b998477baf99f694a7e6d6deda92377025
[ "MIT" ]
null
null
null
dist/index.min.js
afeiship/next-baidu-fanyi
20ffb4b998477baf99f694a7e6d6deda92377025
[ "MIT" ]
null
null
null
dist/index.min.js
afeiship/next-baidu-fanyi
20ffb4b998477baf99f694a7e6d6deda92377025
[ "MIT" ]
null
null
null
/*! * name: @jswork/next-baidu-fanyi * description: Baidu fangyi api wrapper. * homepage: https://github.com/afeiship/next-baidu-fanyi * version: 1.0.1 * date: 2021-03-09 09:15:21 * license: MIT */ !function(){var o=("undefined"!=typeof window?window:this||Function("return this")()).nx||require("@jswork/next"),a=require("node-fetch"),u=require("@jswork/next-delay"),s=o.fangyiApiSign||require("@jswork/next-fanyi-api-sign"),d=o.param||require("@jswork/next-param"),f={from:"zh",to:"en",delay:1e3},n=o.declare("nx.BaiduFanyi",{statics:{translate:function(n){var e=o.mix(null,f,s(n)),n="http://api.fanyi.baidu.com/api/trans/vip/translate?"+d(e),r=e.from,t=e.to,i=e.q;return r===t?new Promise(function(n){var e=i.split("\n");n({from:r,to:t,trans_result:o.map(e,function(n,e){return{src:e,dst:e}})})}):a(n).then(u(e.delay)).then(function(n){return n.json()})}}});"undefined"!=typeof module&&module.exports&&(module.exports=n)}();
103.777778
729
0.685225
96bd2a644e2ad50c09e9a21fc7c62aa378e5d15a
1,974
js
JavaScript
index.js
heytanay/registrationANDlogin
9687b5bc67c69b33bfab005b74c8c21949fece91
[ "MIT" ]
null
null
null
index.js
heytanay/registrationANDlogin
9687b5bc67c69b33bfab005b74c8c21949fece91
[ "MIT" ]
null
null
null
index.js
heytanay/registrationANDlogin
9687b5bc67c69b33bfab005b74c8c21949fece91
[ "MIT" ]
null
null
null
// Dependencies const http = require("http"); const fs = require("fs"); const StringDecoder = require("string_decoder").StringDecoder; const url = require("url"); // Libs const handlers = require("lib/handlers"); const server = http.createServer(function(req,res){ // Get all the informations provided by the reuqester var method = req.method.toLowerCase(); var parsedUrl = url.parse(req.url, true); var path = parsedUrl.pathname; // Trim the Path var trimmedPath = path.replace(/^\/+|\/+$/g,''); // Get the Query String var queryString = parsedUrl.query; var headers = req.headers; var buffer = ''; var decoder = new StringDecoder('utf-8'); req.on('data',function(data){ buffer += decoder.write(data); }); req.on('end',function(){ buffer += decoder.end(); // Get the Handler from Trimmed Path and check if it is one of the routes present in the 'router' object var handler = typeof(router[trimmedPath]) !== 'undefined' ? router[trimmedPath] : handlers.notFound; // Construct a Data object to send through var data = { 'path': trimmedPath, 'method': method, 'headers': headers, 'query': queryString, 'payload': helpers.parseJSONToObject(buffer) }; // Call the Specific Handler handler(data,function(statusCode,payload){ // Check the Intergrity of the statusCode and payload being sent through var status = typeof(statusCode) == 'number' ? statusCode : 200; var payload = typeof(payload) == 'object' ? payload : {}; var payloadString = JSON.stringify(payload); res.setHeader('Content-Type','application/json'); res.writeHead(status); res.end(payloadString); console.log('Got this Response: ',status,payloadString); }); }); }); server.listen(3000,function(){ console.log("Server Active"); }); var router = { "home": handler.home, "ping": handler.ping, "users": handler.users, "auth": handler.auth, };
26.675676
108
0.655522
96bdcda1a191001685c0a2b17d7c4a820f348045
1,251
js
JavaScript
src/event.js
robinfhu/swrm-events
124acb0dc3f824dfa25b26add9a8b2c9f0ee83c7
[ "MIT" ]
null
null
null
src/event.js
robinfhu/swrm-events
124acb0dc3f824dfa25b26add9a8b2c9f0ee83c7
[ "MIT" ]
null
null
null
src/event.js
robinfhu/swrm-events
124acb0dc3f824dfa25b26add9a8b2c9f0ee83c7
[ "MIT" ]
null
null
null
import React from 'react' import {formatDate} from './utils'; import { NavLink } from 'react-router-dom'; export default class EventItem extends React.Component { constructor(props) { super(props); } render() { let {SessionID,DateKey, StartTime,EndTime, EventType, Location,SessionDescription,SessionTitle} = this.props.data; let room = (this.props.data["Room"]) ? `, ${this.props.data["Room"]}` : ''; let socialBadge = (EventType) ? <span className='badge badge-primary ml-3'>{EventType}</span> : ''; return <div className="event-item shadow-sm mb-3 border p-1"> <strong> <NavLink to={`/event/${SessionID}`}>{SessionTitle}</NavLink> {socialBadge} </strong><br/> <strong className="small-text">{formatDate(DateKey)}</strong> <strong className="text-muted small-text ml-3">{StartTime} - {EndTime} ({this.props.timezone})</strong> <br/> <div className="small-text border-bottom text-muted">{Location} {room}</div> <span className="small-text">{SessionDescription}</span> </div> } }
36.794118
115
0.561151
96bebdd3d6c1e6c6e72af5bad2a8d8bd8bb55be6
607
js
JavaScript
src/components/Firebase.js
MinyeGit/RealtimeMeetingManagementApp
169b504363b0410c6fd2626e40771559c508ff57
[ "MIT" ]
1
2019-04-28T04:29:10.000Z
2019-04-28T04:29:10.000Z
src/components/Firebase.js
MinyeGit/RealtimeMeetingManagementApp
169b504363b0410c6fd2626e40771559c508ff57
[ "MIT" ]
null
null
null
src/components/Firebase.js
MinyeGit/RealtimeMeetingManagementApp
169b504363b0410c6fd2626e40771559c508ff57
[ "MIT" ]
null
null
null
import firebase from 'firebase/app'; import 'firebase/database'; import 'firebase/auth'; // Initialize Firebase const config = { apiKey: "AIzaSyAotHTKse4FoQ0_q0_c_V4hc61YlOXeFIk", authDomain: "onlinemeetingmaster.firebaseapp.com", databaseURL: "https://onlinemeetingmaster.firebaseio.com", projectId: "onlinemeetingmaster", storageBucket: "onlinemeetingmaster.appspot.com", messagingSenderId: "987945468791" }; firebase.initializeApp(config); export const provider = new firebase.auth.GoogleAuthProvider(); export const auth = firebase.auth(); export default firebase;
28.904762
65
0.757825
96bec1aa3b1eb0adb19bce99b71e262147dc4818
858
js
JavaScript
src/Components/utilidades/Input.js
geraldani/greyshirt-test
3d0118ee9239fc5e26a596fa5def78086bf57d1b
[ "MIT" ]
null
null
null
src/Components/utilidades/Input.js
geraldani/greyshirt-test
3d0118ee9239fc5e26a596fa5def78086bf57d1b
[ "MIT" ]
null
null
null
src/Components/utilidades/Input.js
geraldani/greyshirt-test
3d0118ee9239fc5e26a596fa5def78086bf57d1b
[ "MIT" ]
null
null
null
import React, {Fragment} from 'react' import Label from "./Label"; const Input = (props) => { let showLabel; props.showLabel === undefined ? showLabel = true : showLabel = props.showLabel; return ( <Fragment> { showLabel && <Label name={props.name} style={props.style} nombre={props.nombre} req={props.req}/> } <input type={props.type} className={`form-control mb-4 ${props.clas}`} id={`${props.name}Id`} value={props.value} name={props.name} onChange={props.onChange} required={props.req} maxLength={props.length}/> </Fragment>) } export default Input;
30.642857
83
0.456876
96bef32d0100159686aab1cc7c9849b39f9cdb95
3,333
js
JavaScript
src/connectors/index.js
avenbreaks/acy-dex-interface
c534ca10b3c60b0bdbccc49a4ce22654c256f29c
[ "MIT" ]
2
2021-10-09T13:59:27.000Z
2021-11-10T06:35:49.000Z
src/connectors/index.js
avenbreaks/acy-dex-interface
c534ca10b3c60b0bdbccc49a4ce22654c256f29c
[ "MIT" ]
null
null
null
src/connectors/index.js
avenbreaks/acy-dex-interface
c534ca10b3c60b0bdbccc49a4ce22654c256f29c
[ "MIT" ]
1
2022-03-11T15:33:16.000Z
2022-03-11T15:33:16.000Z
import { InjectedConnector } from '@web3-react/injected-connector'; import { WalletConnectConnector } from '@web3-react/walletconnect-connector'; import { WalletLinkConnector } from '@web3-react/walletlink-connector'; import { FortmaticConnector } from '@web3-react/fortmatic-connector'; import { PortisConnector } from '@web3-react/portis-connector'; import { TorusConnector } from '@web3-react/torus-connector'; import { LedgerConnector } from '@web3-react/ledger-connector'; import { TrezorConnector } from '@web3-react/trezor-connector'; import { BscConnector } from '@binance-chain/bsc-connector'; import { FortmaticConnector_test} from './fortmaticToBinance' import { PortisConnector_test} from './portisToBinance' import {NaboxConnector} from './naboxWallet' const RPC_URLS = { 1: 'https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161', 4: 'https://rinkeby.infura.io/v3/1e70bbd1ae254ca4a7d583bc92a067a2', 56: 'https://bsc-dataseed1.binance.org/', 97: 'https://data-seed-prebsc-1-s1.binance.org:8545', 137: 'https://polygon-rpc.com' }; const POLLING_INTERVAL = 12000; // 连接钱包时支持的货币id const injected = new InjectedConnector({ supportedChainIds: [1, 3, 4, 5, 42, 56, 97, 137, 80001], //supportedChainIds: [56, 97, 137, 80001], // supportedChainIds: [56, 97], }); const nabox = new NaboxConnector({ supportedChainIds: [1, 3, 4, 5, 42, 10, 137, 69, 420, 80001, 56, 97], }) const walletconnect = new WalletConnectConnector({ rpc: { 1: RPC_URLS['1'],4: RPC_URLS['4'], 56: RPC_URLS['56'], 97: RPC_URLS['97'], 137:RPC_URLS['137'] }, //rpc: { 1: RPC_URLS['1']}, bridge: "https://pancakeswap.bridge.walletconnect.org/", qrcode: true, }); const walletlink = new WalletLinkConnector({ url: RPC_URLS['56'], appName: 'ACY swap', supportedChainIds: [1, 3, 4, 5, 42, 10, 137, 69, 420, 80001, 56, 97], }); /*const fortmatic = new FortmaticConnector({ apiKey: 'pk_test_1897AD5B792BA339', //rpcUrl: 'https://data-seed-prebsc-1-s1.binance.org:8545/', chainId: 4, });*/ const fortmatic = new FortmaticConnector_test({ apiKey: 'pk_test_1897AD5B792BA339', //rpcUrl: 'https://data-seed-prebsc-1-s1.binance.org:8545/', chainId: 56, }); const portisToBinanceTest = { //useless nodeUrl: 'https://data-seed-prebsc-1-s1.binance.org:8545', chainId: 56, }; /*const portis = new PortisConnector({ dAppId: 'c474625b-8239-4ce8-ab42-bd16489873c3', networks: [4], // uses mainet by default });*/ const portis = new PortisConnector_test({ dAppId: 'c474625b-8239-4ce8-ab42-bd16489873c3', networks: [56], // uses mainet by default }); // const torus = new TorusConnector({ chainId: 4, initOptions: { network: { host: 'rinkeby' } } }); const torus = new TorusConnector({ chainId: 56, initOptions: { network: { host: 'https://bsc-dataseed.binance.org/', chainId: 56, networkName: 'Binance Smart Chain' } } }); //const torus = new TorusConnector({ chainId: 56 , initOptions: { network: { host: 'rinkeby' } } }) const binance = new BscConnector({ supportedChainIds: [56, 97], }); // 硬件钱包 const ledger = new LedgerConnector({ chainId: 4, url: RPC_URLS[4], pollingInterval: POLLING_INTERVAL, }); const trezor = new TrezorConnector({ chainId: 4, url: RPC_URLS[4], }); export { injected, walletconnect, walletlink, fortmatic, portis, torus, ledger, trezor, binance, nabox };
34.71875
172
0.70177
96bf90298e2be991dd538cfecc8b4a1d52726209
466
js
JavaScript
src/components/icons/solid/Cloud.js
MythicalFish/mythical.fish
c99209b42183a7e65d5c7384706838b925a8db0d
[ "MIT" ]
2
2019-04-10T01:46:31.000Z
2020-05-02T14:29:56.000Z
src/components/icons/solid/Cloud.js
MythicalFish/mythical.fish
c99209b42183a7e65d5c7384706838b925a8db0d
[ "MIT" ]
null
null
null
src/components/icons/solid/Cloud.js
MythicalFish/mythical.fish
c99209b42183a7e65d5c7384706838b925a8db0d
[ "MIT" ]
null
null
null
import React from 'react' const Cloud = props => ( <svg fill='currentColor' viewBox='0 0 640 512' width='1em' height='1em' {...props} > <path d='M537.6 226.6c4.1-10.7 6.4-22.4 6.4-34.6 0-53-43-96-96-96-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32c-88.4 0-160 71.6-160 160 0 2.7.1 5.4.2 8.1C40.2 219.8 0 273.2 0 336c0 79.5 64.5 144 144 144h368c70.7 0 128-57.3 128-128 0-61.9-44-113.6-102.4-125.4z' /> </svg> ) export default Cloud
29.125
271
0.611588
96c09f74206ebe77d505fa6f242cab2cdd789da9
7,289
js
JavaScript
src/components/scenes/SeedScene.js
jchang19/cos426-final-proj
793008d591d241e7aff2b8ef4f56dd55345d1a5f
[ "MIT" ]
null
null
null
src/components/scenes/SeedScene.js
jchang19/cos426-final-proj
793008d591d241e7aff2b8ef4f56dd55345d1a5f
[ "MIT" ]
null
null
null
src/components/scenes/SeedScene.js
jchang19/cos426-final-proj
793008d591d241e7aff2b8ef4f56dd55345d1a5f
[ "MIT" ]
null
null
null
import { Scene, Color, Vector3, Box3, Box3Helper, Clock } from 'three'; import { Sheep1, Desert, Bordered_Mountains, S_Mountains, Gun, Cowboy, Ball, Wolf1, Phoenix, Birds, Barn, Cactus, Windmill, Pointer} from 'objects'; import * as THREE from 'three'; import { BasicLights } from 'lights'; import { globals } from '../../global'; import { HurtWolf } from '../../audio'; const BULLETSPEED = 1; const BULLETLIFESPAN = 5; var wolfhurt = new Audio(HurtWolf); class SeedScene extends Scene { constructor() { // Call parent Scene() constructor super(); // Init state this.state = { rotationSpeed: 0, updateList: [], }; // Set background to a nice color this.background = new Color(0xA9DEF9); // Add meshes to scene const lights = new BasicLights(); // add striking moutains to the scene as a default const s_mountains = new S_Mountains(this); s_mountains.position.set(0,0,0); s_mountains.scale.multiplyScalar(10); s_mountains.scale.y *= 0.5; this.add(s_mountains, lights); // Add Phoenix const phoenix = new Phoenix(this); phoenix.scale.multiplyScalar(0.1); //phoenix.rotation.y = Math.PI/2; phoenix.position.set(30, 0,500); //this.add(phoenix, lights); globals.phoenix = phoenix; globals.phoenix_flag = true; // Add Birds const birds = new Birds(this); birds.scale.multiplyScalar(25); //birds.rotation.y = -1 * Math.PI/2; birds.position.set(300, 0,500); this.add(birds, lights); globals.birds = birds; // Add Barn const barn = new Barn(this); barn.scale.multiplyScalar(0.05); barn.position.set(300, -45,0); barn.rotation.y = Math.PI; this.add(barn, lights); // add Multiple Cacti this.addCacti(this, lights); // add windmill const windmill = new Windmill(this); windmill.scale.multiplyScalar(0.1); windmill.position.set(-300, -45,10); windmill.rotation.y = -1 * Math.PI/2; this.add(windmill, lights); // Add sheep and wolves to scene const sheep = new Sheep1(this); const wolf = new Wolf1(this); wolf.scale.multiplyScalar(5); this.add(sheep, wolf); // add pointer const pointer = new Pointer(this); pointer.scale.multiplyScalar(1); pointer.rotation.y = Math.PI/2; globals.pointer = pointer; // initialize sheep and wolf global arrays globals.wolves = []; globals.wolves.push(wolf); globals.sheep = sheep; // Hitbox visualizer // const sheephelper = new Box3Helper( sheep.hitbox, 0xffff00 ); // this.add( sheephelper ); // const wolfhelper = new Box3Helper( wolf.hitbox, 0xffff00 ); // this.add( wolfhelper ); // initialize sheep and wolf global arrays globals.wolves.push(wolf); globals.sheep = sheep; // initialize bullets array globals.bullets = []; //this.state.prevMapObject = s_mountains; //this.state.prevLightsObject = lights; // add box to scene var min = new Vector3(70,-45,30); var max = new Vector3(200, -7, 200); const box = new Box3(min, max); globals.arena = box; //const helper = new Box3Helper( box, 0xFF0000 ); this.add(box, lights); } shootBullet(controls) { var camera = controls.getObject(); const bullet = new THREE.Mesh(new THREE.ConeGeometry(0.05, 0.2, 32, 32), new THREE.MeshBasicMaterial({ color: 'black' })); // camera.add(bullet); bullet.position.copy(camera.getWorldPosition(new Vector3())); bullet.quaternion.copy(camera.quaternion); bullet.translateZ(-5); bullet.translateY(-0.2); bullet.rotateX(Math.PI / 2); bullet.direction = controls.getDirection(new Vector3()).normalize(); bullet.direction.y -= 0.05; bullet.timer = new Clock(); bullet.timer.start(); globals.bullets.push(bullet); this.add(bullet); } addToUpdateList(object) { this.state.updateList.push(object); } update(timeStamp) { const {rotationSpeed, updateList} = this.state; this.rotation.y = (rotationSpeed * timeStamp) / 10000; // update bullets & wolf damage globals.bullets.forEach(b => { b.position.addScaledVector(b.direction, BULLETSPEED); globals.wolves.forEach(wolf => { if (wolf.hitbox.containsPoint(b.position)){ wolf.takeDamage(); this.remove(b); globals.bullets.splice(globals.bullets.indexOf(b), 1); if (wolf.health <= 0){ this.remove(wolf); const index = globals.wolves.indexOf(wolf); globals.wolves.splice(index, 1); wolfhurt.play() globals.score += 100 } } }) // remove bullets from scene after set amount of time (defined at top) if (b.timer.getElapsedTime() >= BULLETLIFESPAN) { this.remove(b); } }); // Call update for each object in the updateList for (const obj of updateList) { obj.update(timeStamp); } } addCacti(scene, lights) { var n = 10; // randomly add cacti around four sides of the box // side 1 for(let i=0; i<n; i++) { let x = this.randomNumber( 30, 300); let z = this.randomNumber(205, 500); const cactus = new Cactus(this); cactus.scale.multiplyScalar(this.randomNumber(0.3,1)); cactus.position.set(x, -55,z); scene.add(cactus, lights); } // side 2 for(let i=0; i<n; i++) { let x = this.randomNumber( 205, 500); let z = this.randomNumber(100, 205); const cactus = new Cactus(this); cactus.scale.multiplyScalar(this.randomNumber(0.3,1)); cactus.position.set(x, -55,z); scene.add(cactus, lights); } // side 3 for(let i=0; i<n; i++) { let x = this.randomNumber(-300, 0); let z = this.randomNumber(-10, 290); const cactus = new Cactus(this); cactus.scale.multiplyScalar(this.randomNumber(0.3,1)); cactus.position.set(x, -40,z); scene.add(cactus, lights); } // side 4 for(let i=0; i<n; i++) { let x = this.randomNumber(30, 200); let z = this.randomNumber(-270, 30); const cactus = new Cactus(this); cactus.scale.multiplyScalar(this.randomNumber(0.3,1)); cactus.position.set(x, -40,z); scene.add(cactus, lights); } } randomNumber(min, max) { return (Math.random() * (max - min) + min); } } export default SeedScene;
31.554113
148
0.545754
96c10bb06663435cd972001cea337aa48361d720
500
js
JavaScript
components/FilterBar/components/Content/components/FilterButton/connector.js
Guetrick/theme-gmd
be507802cddb688522cd66b01459f795d21b67a2
[ "Apache-2.0" ]
null
null
null
components/FilterBar/components/Content/components/FilterButton/connector.js
Guetrick/theme-gmd
be507802cddb688522cd66b01459f795d21b67a2
[ "Apache-2.0" ]
null
null
null
components/FilterBar/components/Content/components/FilterButton/connector.js
Guetrick/theme-gmd
be507802cddb688522cd66b01459f795d21b67a2
[ "Apache-2.0" ]
null
null
null
import { connect } from 'react-redux'; import openFilterView from '../../actions/openFilterView'; /** * Connects the dispatch function to a callable function in the props. * @param {Function} dispatch The redux dispatch function. * @param {Object} props The components props. * @return {Object} The extended component props. */ const mapDispatchToProps = (dispatch, props) => ({ handleOpenFilters: () => dispatch(openFilterView(props)), }); export default connect(null, mapDispatchToProps);
33.333333
70
0.732
96c27b007d9e316358f4bb10c37068d1358e73b0
4,644
js
JavaScript
gulpfile.js
dedaluz/albertpi.org
64811bc9afb0ee171566582d41514f05958db31a
[ "Apache-1.1" ]
null
null
null
gulpfile.js
dedaluz/albertpi.org
64811bc9afb0ee171566582d41514f05958db31a
[ "Apache-1.1" ]
null
null
null
gulpfile.js
dedaluz/albertpi.org
64811bc9afb0ee171566582d41514f05958db31a
[ "Apache-1.1" ]
null
null
null
'use strict'; /* --------------------------------------- User settings --------------------------------------- List all your JavaScript file in `userScripts` to define their order of concatenation. List all the JavaScript plugin file you are using in `pluginScripts` to define their order of concatenation. Managing more than one LESS/CSS is made with @imports in LESS. To enable automatic reloading on .js and .less files compilation, as well as other niceties from [browser sync](https://www.browsersync.io/) write your local dev url in the localDevUrl variable. */ var pluginsScripts = [ 'bower_components/jquery/dist/jquery.js', //'bower_components/bootstrap/dist/js/bootstrap.js' ]; var userScripts = [ 'assets/js/main.js' ]; var localDevUrl = 'http://localhost:8888/'; /* --------------------------------------- Gulp definition --------------------------------------- By default you don’t have to configure anything to make Gulp work. gulp `default` task are “lint”, “css”, “script-plugins”, “scripts”. gulp `dev-watch` task execute “lint” and “script-plugins” from `userScripts` and “less” from `assets/less/*`. */ // Include gulp var gulp = require('gulp'); // Include Our Plugins var autoprefixer = require('gulp-autoprefixer'); var postcss = require('gulp-postcss'); var $ = require('gulp-load-plugins')(); var lost = require('lost'); //var connect = require('gulp-connect-php'); var browserSync = require('browser-sync').create(); var concat = require('gulp-concat'); var jshint = require('gulp-jshint'); var sass = require('gulp-sass'); var sourcemaps = require('gulp-sourcemaps'); var nano = require('gulp-cssnano'); var plumber = require('gulp-plumber'); var rename = require('gulp-rename'); var uglify = require('gulp-uglify'); var paths = { cssSource: 'assets/css/', cssDestination: 'assets/production/' }; // Compile our SASS gulp.task('sass', function() { return gulp.src('assets/scss/**/*.{scss,sass}') .pipe(plumber({ errorHandler: function (err) { console.log(err); this.emit('end'); } })) // Initializes sourcemaps .pipe(sourcemaps.init()) .pipe(sass({ //includePaths: ['app/bower_components', 'app/bower_components/foundation/scss'], includePaths: [ 'bower_components', 'node_modules' ], errLogToConsole: true })) .pipe(postcss([ lost() ])) // Writes sourcemaps into the CSS file .pipe(autoprefixer({ browsers: ['last 2 versions'], cascade: false })) .pipe(sourcemaps.write()) .pipe($.size({ title: 'styles' })) .pipe(gulp.dest('assets/css')) .pipe(browserSync.stream()); }); // Prefix & Minify CSS gulp.task('css', ['sass'], function (done) { return gulp.src([ 'assets/css/*.css', ]) .pipe(nano({discardComments: {removeAll: true}})) .pipe(rename({suffix: '.min'})) .pipe(gulp.dest('assets/production/css')); }); // Copy Web Fonts To Dist gulp.task('fonts', function() { return gulp.src('assets/fonts/*') .pipe($.size({ title: 'fonts' })) .pipe(gulp.dest('assets/production/css/fonts')); }); // Lint Task gulp.task('lint', function() { return gulp.src( userScripts) .pipe(jshint()) .pipe(jshint.reporter('jshint-stylish')); }); // Concatenate JS plugin gulp.task('script-plugins', function() { return gulp.src(pluginsScripts) .pipe(concat('plugins.js')) .pipe(gulp.dest('assets/js')) .pipe(browserSync.stream()); }); // Concatenate JS plugin with user scripts and minify them. gulp.task('scripts', ['script-plugins'], function (done) { return gulp.src(['assets/js/plugins.js'].concat(userScripts)) .pipe(concat('all.js')) .pipe(gulp.dest('assets/production/js')) .pipe(rename('all.min.js')) .pipe(uglify()) .pipe(gulp.dest('assets/production/js')); }); // Live reload sync on every screen connect to localhost gulp.task('init-live-reload', function() { browserSync.init({ proxy: localDevUrl, files: ['!site/accounts/', 'site/**/*.php', 'content/**/*.txt'], }); }); // Watch Files For Changes gulp.task('dev-watch', function() { gulp.watch( userScripts, ['lint', 'script-plugins']); gulp.watch('assets/scss/**/*.{scss,sass}', ['sass']) }); // Watch Files For Changes with live reload sync on every screen connect to localhost. gulp.task('dev-watch-sync', ['init-live-reload', 'dev-watch']); // Production Task gulp.task('prod', ['lint', 'sass', 'css', 'script-plugins', 'scripts', 'fonts']); // Default Task gulp.task('default', ['prod']);
24.062176
87
0.619509
96c3e7e9a3382b6894479e8cc4c1af2f36300d35
67
js
JavaScript
docs/embedded_graphics/transform/sidebar-items.js
ComansServices/pinetime-rust-mynewt
6f905f261836dd4fe066c9fee8f86bb35772292a
[ "Apache-2.0" ]
196
2020-01-02T06:52:29.000Z
2022-03-28T01:17:30.000Z
docs/embedded_graphics/transform/sidebar-items.js
ComansServices/pinetime-rust-mynewt
6f905f261836dd4fe066c9fee8f86bb35772292a
[ "Apache-2.0" ]
25
2020-02-03T08:55:47.000Z
2022-01-08T11:28:10.000Z
docs/embedded_graphics/transform/sidebar-items.js
ComansServices/pinetime-rust-mynewt
6f905f261836dd4fe066c9fee8f86bb35772292a
[ "Apache-2.0" ]
71
2020-01-12T03:23:02.000Z
2022-01-25T02:00:40.000Z
initSidebarItems({"trait":[["Transform","Transform operations"]]});
67
67
0.731343
96c436725a8cb7ffaeea43b9fa0d6ece1f262e14
40,503
js
JavaScript
public/sqaline.js
ProgerXP/Habravel
519e676c50c537b0da0231b8b7ff2448c3a154ae
[ "Unlicense" ]
22
2015-01-15T21:49:49.000Z
2020-03-11T17:20:53.000Z
public/sqaline.js
ProgerXP/Habravel
519e676c50c537b0da0231b8b7ff2448c3a154ae
[ "Unlicense" ]
1
2015-08-27T07:50:08.000Z
2015-08-27T10:27:22.000Z
public/sqaline.js
ProgerXP/Habravel
519e676c50c537b0da0231b8b7ff2448c3a154ae
[ "Unlicense" ]
4
2016-07-11T12:01:19.000Z
2019-01-11T08:15:37.000Z
/*! Sqaline.js - from Squizzle.me Toolkit Dynamic, fast and flexible element alignment In public domain | by Proger_XP | http://proger.me */ /* Sqaline is an expression-based library that lets you set arbitrary CSS or HTML attribute of specific elements based on those elements' environment. Sqaline expressions are regular JavaScript with certain convenient shortcuts. You can also create resize callbacks by listening to Sqaline events. Sqaline requires jQuery or Zepto included before it. Here's how: <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script> // Only if you need to set any custom options before Sqaline initializes. var Sqaline = {verbose: true} </script> <script src="sqaline.js"></script> The easiest way to align ("sqaline") an element is via data-sqa attribute or another attribute name specified in Sqaline.attribute: <body data-sqa="wrapper"> <header>...</header> <nav style="right: 0; ...">...</nav> <article data-sqa="wrapper height: win{h} - ^$header{ho} - ^$footer{ho} | width: win{w} - ^$nav{wo} - mr"> <footer>...</footer> </body> This example will make <article> occupy all horizontal window space not taken by <header> and <footer> and will set its width to window's width without <nav> outerWidth(true) and css('marginRight'). This example will adjust number of cols to the maximum fitting in the container (cols is first reset to determine the width of 1 column): <textarea data-sqa="wrapper cols: 1 | cols: Math.floor(^{w} / wi)"> Sqaline attribute begins with comma-separated (no spaces) names of ANCHORS relative to which the expression is evaluated; first anchor becomes anchor name of this element in turn. Anchors are searched upwards in the DOM tree. Here <article> has an anchor name of "wrapper" and its parent anchor element is <body> because it also has the same name. Nested anchors always shade their parents so all calculations will be done in the new context. ANCHORS can also begin with "!" to enable verbose console output for this particular element (see also Sqaline.opt.verbose): data-sqa="!wr,wr2 ...". After anchors follow zero or more pipe-separated RULES (must have spaces around "|"). Each rule modifies a particular CSS property or an HTML attribute. They can duplicate for one target (property or attribute) and are evaluated in order of definition. A rule begins with property/attribute name followed by a colon. The target is detected as CSS property if the name is listed in $(el).css('name'), otherwise $(el).attr('name') is used to set the calculated value. This detection can be overriden by prefixing the target with '{' for CSS and '[' for tag attribute, e.g. '[height' and '{height' - see opt.appliers. The target can also be a shortcut CSS defined in Sqaline.exprShortcuts - for example, 'fns' equals to 'fontSize' and 'mr' to 'marginRight'. The first RULE can omit target name and the colon - in this case it's assumed to be Sqaline.defaultProperty: data-sqa="wrapper win{h}". After the colon actual EXPRESSION is specified. This is regular JavaScript code with several optimizations: Certain CSS properties have shortcuts like 'mr' expanding to marginRight or wo expanding to $(el).outerWidth(true). The list is specified in Sqaline.exprShortcuts and can be changed even on runtime given that cache is not used or clearCache() is called after customization. Left- and right-side shortcuts can be used to refer to common calculations. For example, just "height: -" will return amount of vertical space that is available in the parent's anchor element after this (evaluating) element topmost border. See Sqaline.opt.leftCut and rightCut for details. By default the code is ran in this element's context so 'w' will return this element's width. However, it is possible to refer to other elements in the vicinity by using {SUBEXPRESSION}. SUBEXPRESSION is a way to change the calculation context. The syntax is: [^|ANCHOR] [$ [(] jQuery-SELECTOR [)]] { Sqaline-CODE } Square [brackets] indicate optional components. Spaces are not allowed. ANCHOR references base element by its data-sqa ANCHOR described in the beginning. '^' refers to the same anchor name as of this element. If omitted the element being sqalined is used as a base element. If no parent element is found $(window) is used - this can be both useful (to read its dimensions) and dangerous (attempts to read its CSS will result in errors). Referenced anchors are resized before calculating the SUBEXPRESSION thus providing actual state. Later resizing references of the same anchor element are ignored. SELECTOR is a jQuery expression for selecting nodes relative to the located ANCHOR or relative to entire document if $(window) is used. This is exactly the same as writing $('SELECTOR', $(ANCHOR)). SELECTOR can be wrapped in brackets if it contains spaces (without them SUBEXPRESSION will break on the last space): ^$([class="first second"]){...} - is valid but without brackets will read as: second"]){...} - which is a wrong syntax. SELECTOR can also contain other "complex" but valid JS code such as \escape sequences, more brackets and various kinds of/nested strings. CODE is the same EXPRESSION code contained within a rule. It can in turn contain more SUBEXPRESSIONs and regular brackets, for example: wrapper top: Math.max(0, (win{h - $footer{ho}} - {h}) / 2) + 'px' SUBEXPRESSIONs don't inherit context elements so that ^{...} or similar will always locate parent anchor relative to the initial element (the one being sqalined). The above compiles to this code (el = initial element): $(el).css('top', Math.max(0, ( $(window).height - $('footer', el).outerHeight(true) - $(el).height() ) / 2) + 'px') Examples of SUBEXPRESSIONs (spaces inside { } are put for better readability): ^{ ... } - execute in context of parent anchor or $(window) if not found ^$footer{ ... } - find parent anchor or $(window) and then find all <footer> elements as both direct and indirect children (the behaviour of $(..., cx)) $footer{ ... } - find all <footer> children of the current element someAnchor$footer{ ... } - find <footer> under someAnchor parent; if this element's anchor is someAnchor then it's identical to ^$footer{ ... }, i.e. finding all <footer>s under this element's parent element someAnchor{ ... } - similar to ^{ ... } but finds specific parent with anchor 'someAnchor' $[target="blank"]{ ... } - finds all children with target="blank" HTML attribute of this element $([target="_blank"]){ ... } - identical to the above - since the selector has no spaces brackets here are redundant (they are simply removed) win$(a[class="foo bar"]:not(:visited)){ ... } - locates all <a> elements in this document that have class attribute set to exactly "foo bar" and that are not :visited; equivalent to this jQuery call: $('a[class="foo bar"]:not(:visited)'). win$a.foo.bar:not(:visited){ ... } - unlike the above will find <a> that have both 'foo' and 'bar' classes, in any order, and possibly others $#someID.class{ ... } - locates an element with id="someID" and having CSS class 'class' that belongs to the sqalined element, directly or not win#someID.class{ ... } - same as above but looks document-wise (provided that 'win' anchor parent is not found) $>p.foo{ ... } - locates all <p> elements with 'foo' CSS class that directly belong to the sqalined element: $('> p.foo', el) or $(el).find('> p.foo'). It is recommended not to use Sqaline-specific contaxt code inside as it might change but if you must - the 'cx' variable is an object with these keys: - el - current $(element) according to the SUB/EXPRESSION context; all CSS property reads, etc. are performed on this instance - self - always refers to window.Sqaline - opt - parsed data-sqa value; this is an internal object with lots of useful values - see parse() for details - opt.node - the initial $(element) that is being sqalined; same as cx.el for the outmost EXPRESSION or bare {...} SUBEXPRESSION - opt.name - anchor name of the initial element (first in the anchor list) - opt.anchors - array of all anchors of the element including opt.name - sub - a function used to enter a new SUBEXPRESSION context If a SUBEXPRESSION has matched multiple elements they are all evaluated and their results are: (1) summed up together if typeof new result == 'number', or (2) if result isn't a number it overrides previously calculated value. win$p{ ho } - finds all <p> in the document and calculates their total outerHeight(true) $>a{ cx.el.css('color') } - returns the color of last direct <a> child ^$~*{ wo } - locates parent element with the same anchor name as this element's, finds all elements that follow the parent (forward siblings) and sums up their outerWidth(true) $~*{ wo } - similar to above but calculates total width of next siblings of the element being sqalined */ window.Sqaline = new (function ($, opt) { var self = this var Sqaline = this var testEl = $('<div>') var $win = $(window) /*** Sqaline options. Some can be changed on runtime, some not, some require clearCache(). See details below. ***/ self.opt = $.extend({ // Controls how often resizeTimed() will initiate resizing of all // Sqalinable elements on this page. Generally it means the delay // for onresize window event refresh. resizeDelay: 200, // If set Sqaline will store parsed data-sqa for each element and // reuse that value without checking that attribute again. This // boosts performance a lot because it also implies parsing of rules // like ^{wo - {h}} into JavaScript code. When this is set you can // still use clearCache() to reset all previously parsed data and // cache resizing nodes again. cache: true, // If set will log a lot of info about each element being sqalined. // Overrides individual elements' verbose flag (set with '!'). verbose: false, // If first property listed in data-sqa has no 'prefix:' this value // is used. Note that it only works for the first property on the list; // others must be named: data-sqa="wr def" but not "wr prop: w | def". // If changed on runtime clearCache() must be called. defaultProperty: 'height', // Name of jQuery function used to fire events on each node being // sqalined. Makes sense to use 'trigger' or 'triggerHandler'. // 'trigger' will cause events bubbling throughout the entire DOM which // is useful but might cause lags. Can also be set to false to disable // event triggering completely. See other options below. // // An easy way to set up a 100% custom resizing process is setting // data-sqa to an anchor-only string (no props, e.g. data-sqa="wr,wr2") // - Sqaline will still fire events for such an element and you can // listen to them with $(el).on('sqalined'). trigger: 'triggerHandler', // Only used if trigger is set. Arbitrary name of event being fired. // Empty value disables that particular event from firing. beforeEvent: 'sqalining', // The same but fired after the element has finished resizing. afterEvent: 'sqalined', // If set referenced anchors will be resized before resizing the element // which expression relied on them: // // <form data-sqa="wr $textarea{h}"> // <textarea data-sqa="wr win{h} - win$body{pt + pb}"> // // The <form> above will receive the same height as its <textarea> which // height will be calculated as window's height without <body>'s vertical // padding. Without this option set <form> will receive current <textarea> // height, which will be different once resizing cycle reaches the latter. // // For indirect relation where you don't reference a child but do rely on // its calculation you can simply use "+ $.child{0}" or similar stub. // Here <article> is vertically centered after resizing its <div> child // (removing $>div{0} will use current, old <article>'s height): // // <article data-sqa="wr top: - $>div{0}"> // <div data-sqa="wr win{h / 2}"> resizeReferenced: true, // HTML attribute scanned for Sqaline rules. Recommended to start with // 'data-' to be W3C-compliant. // If changed on runtime clearCache() must be called. attribute: 'data-sqa', // Prefixes before property names to explicitly specify jQuery function // used to set the calculated value. appliers: { '[': 'attr', '{': 'css', }, // "Cuts" are shortcuts for common rules on certain properties that are // activated by starting (leftCut) or ending (rightCut) an expression // with either '+' or '-' signs. If expression is just '+' or '-' then // leftCut is used. If you need to start with a negative number put // '0 - ...' to avoid leftCut being used. // If changed on runtime clearCache() must be called. // // min/maxHeight/Width are mapped to height/width if undefined. // If no leftCut or rightCut is found for an expression where such a // shortcut was used an error will be thrown and element will be skipped. // // Examples: // data-sqa="wr height: -" // - will use leftCut.height in place of the entire expression // data-sqa="wr top: - -" // - equivalent to "leftCut - rightCut" for the 'top' property // data-sqa="wr - ^{wo / 2} -" // - first defaultProperty is determined (usually 'height'), then // the rule is prepended with leftCut, then "- ^... -" is put and // finally rightCut wraps up the expression // data-sqa="wr ^{wo / 2} -" // - just like above but doesn't use leftCut, starting with "^... -" leftCut: { height: '^{hi - pb - lt}', width: '^{wi - pr - ll}', top: '^{hi / 2} - {ho / 2}', left: '^{wi / 2} - {wo / 2}', }, rightCut: { height: '$~*{ho}', width: '$~*{wo}', top: '$~*{ho / 2}', left: '$~*{wo / 2}', }, }, opt) /*** Definition of shortcuts available in rule expressions. They are expanded and inlined into the resulting JS code. Current context is available as 'cx' variable (see _context() for details). If changed on runtime clearCache() must be called. Keys should not contain any RegExp-special chars. Values without '(' are treated as numeric CSS property reads and set to parseFloat($().css('VALUE')) - thus not suitable for non-numeric properties (use cx.el.css('PROP') for these). Values without '(' can also be used before colon in RULES to be expanded: data-sqa="wr fns: ^{w * .1} + 'em'" turns 'fns' into 'fontSize' given that it's listed in this object. ***/ self.exprShortcuts = { 'pt': 'paddingTop', 'pb': 'paddingBottom', 'pl': 'paddingLeft', 'pr': 'paddingRight', 'mt': 'marginTop', 'mb': 'marginBottom', 'ml': 'marginLeft', 'mr': 'marginRight', 'bt': 'borderTopWidth', 'bb': 'borderBottomWidth', 'bl': 'borderLeftWidth', 'br': 'borderRightWidth', 'oo': 'outlineOffset', 'ow': 'outlineWidth', // 'o' is the largest value, 'b' omits margin, 'w' also omits border, // 'i' also omits paddig thus being the smallest value. 'wo': 'cx.el.outerWidth(true)', // 'b' = with 'b'order but without margin ('wo'). 'wb': 'cx.el.outerWidth()', 'w': 'cx.el.width()', 'wi': 'cx.el.innerWidth()', 'ho': 'cx.el.outerHeight(true)', 'hb': 'cx.el.outerHeight()', 'hi': 'cx.el.innerHeight()', 'h': 'cx.el.height()', // Offset of the element relative to context element, for example, to skip // all preceding elements. For example, in: // <article data-sqa="wr"><p data-sqa="wr ..."> // 'lt' will return Y distance from left-top corner of <p> to left-top // corner of <article>. 'll' will do the same for X. 'lt': 'cx.self._nodeDistance(cx.el, cx.opt.node).top', 'll': 'cx.self._nodeDistance(cx.el, cx.opt.node).left', // Absolute offset relative to document body. 'ot': 'cx.el.offset().top', 'ol': 'cx.el.offset().left', 'btm': 'bottom', 'top': 'top', 'lft': 'left', 'rht': 'right', // Naming scheme for the following shortcuts is simple: // first letter + first consonant + first capitalized letter 'mxw': 'maxWidth', 'mxh': 'maxHeight', 'mnw': 'minWidth', 'mnh': 'minHeight', 'lts': 'letterSpacing', 'wrs': 'wordSpacing', 'lnh': 'lineHeight', 'txi': 'textIndent', 'fns': 'fontSize', 'fnw': 'fontWeight', 'clc': 'columnCount', 'clg': 'columnGap', 'clr': 'columnRuleWidth', 'cls': 'columnSpan', 'clw': 'columnWidth', } /*** Internal State ***/ // Used to generate document-wise unique sequences. self._keySeq = 0 // Used to discard old data-sqa cache after clearCache() was called. self._cacheSeq = 1 // Used to trigger delayed resizing in resizeTimed(). self._resizeTimer = null self._resizePending = false // If set means that Sqaline currently resizes the entire DOM in resizeAll(). self._resizing = false // Used to keep track of already resized elements in resizeAll() to avoid // recursion when elements refer to each other as anchors{...}. self._resized = {} // Compiled expressions. Keys are source JS code (expanded, ready for eval()), // values are Function instances that expect 'cx' as the only argument. self._funcs = {} // {'cx.code ...': Function}. // Used to replace exprShortcuts with their code equivalents. '%%' is replaced // by all shortcuts glued with '|'. Is set in init(). self._exprShortcutRE = '\\b(%%)\\b' /*** Methods ***/ // Something went critically wrong. self.fail = function (msg) { // Outputs stack trace in Firebug. console && console.error(msg) throw msg } // Re-evaluates all data-sqa attributes on next resize. Usually used after // changing some option on runtime (see opt and exprShortcuts above). // Not useful if opt.cache is set to false. self.clearCache = function () { self._cacheSeq++ return self } // Initiates resizing of entire DOM now or, if it has been already called // in the previous opt.resizeDelay msec, - after this period has elapsed. // Somewhat equivalent to _.debounce(). self.resizeTimed = function () { if (self._resizeTimer) { self._resizePending = true } else { self._resizePending = false self._resizeTimer = setTimeout(function () { self._resizeTimer = null self._resizePending && self.resizeTimed() }, self.opt.resizeDelay) self.resizeDelayed() } } // If delay is not given or 0 - launches DOM resize in another thread which // is useful to let the browser finish remaining updates and start anew. // Equivalent to _.defer(). // // If delay is given waits the specified amount of msec before doing so. // Note that it doesn't prevent other resizeDelayed() threads from being // scheduled if it has been called several times - use resizeTimed() for this. // //? resizeDelayed(0) //? resizeDelayed() // identical //? resizeDelayed(300) // 0.3 sec delay until resizeAll() self.resizeDelayed = function (delay) { setTimeout(function () { var time = Date.now() var nodes = self.resizeAll() if (self.opt.verbose && 'now' in Date) { if (!nodes.length) { console.info('Nothing to Sqaline - no nodes with ' + self.opt.attribute + ' attribute.') } else { s = nodes.length == 1 ? '' : 's' console.info('Sqalined ' + nodes.length + ' node' + s + ' in ' + (Date.now() - time) + ' msec.') } } }, typeof delay == 'number' ? delay : 0) } // Without arguments calls resizeAll(). With one argument resizes that // specific element taking current cache into account. With two arguments // resizes the element parsing given options every time. If called multiple // times on the same element during one resize cycle (controlled by resizeAll()) // such calls are ignored. // // If node matches multiple elements takes the first one. node can be also // a selector, a DOM node or a jQuery object. // Returns jQuery collection of the resized element(s). // //? resize() //=> $( [data-sqa], [data-sqa], ... ) // //? resize($('a[data-sqa]')) // // resizes first <a> with data-sqa attribute found in this document; // // caches parsed data-sqa value and reuses on subsequent calls; // // returns $(<a>) // //? resize('a', {expr: '!wr top: ^{h} - ...'}) // // takes first <a> in the document and resizes it according to given // // options (see parse() for the object format); returns $(<a>) self.resize = function (node, opt) { if (!arguments.length) { return self.resizeAll() } else { node = $(node).eq(0) node.length || self.fail('No node given to Sqaline.resize()') if (opt) { opt = self.parse(node, opt) } else if (self.opt.cache) { opt = self._cachingParse(node) } else { opt = node.attr(self.opt.attribute) == '#' ? node.data('sqao') : {} opt = self.parse(node, opt) } if (opt.anchors) { var event = opt.trigger && self.opt.beforeEvent event && opt.node[opt.trigger](event, [opt]) if (opt.props.length) { var key = node.data('sqak') key || node.data('sqak', key = ++self._keySeq) if (!(key in self._resized)) { self._resized[key] = true self._resize($.extend({}, opt)) } } var event = opt.trigger && self.opt.afterEvent event && opt.node[opt.trigger](event, [opt]) } return node } } // More flexible setup of a node to be sqalined on next resize. Lets you // set resize rules as an object instead of data-sqa string - see parse() // for the exact format. Once called on node (a DOM node, a jQuery object // or a selector) will discard its data-sqa value, if any, and remember // given opt so that it is used on next resize pass on this element. // // If node matches multiple elements takes the first one. // If opt has {now: true} item calls resize(node) before returning. // Returns $(node). // //= resizex('a', {trigger: 'trigger', cacheSeq: null, expr: '!wr top: ^{h} - ...'}) // //=> $(<a>), makes the node fire opt.beforeEvent and opt.afterEvent // // on each resize with $().trigger() and also makes it immune to // // opt.cache value, never clearing this particular cache. self.resizex = function (node, opt) { node = $(node).eq(0) node.length || self.fail('No node given to Sqaline.resizex()') node.attr(self.opt.attribute, '#').data('sqao', self.parse(node, opt)) opt.now && self.resize(node) return node } // Resizes all nodes in the document. Can be called multiple times - if // a resize is in progress such calls are ignored (this happens regardless // of root). root is a selector, a DOM node or a jQuery object under which // elements with data-sqa attribute are searched and resized. If root itself // has data-sqa it's resized as well. // // If an error occurs while resizing an element it's skipped and the // error is written to the console, if present. // // Returns $() of all nodes that were resized (or would-be resized if a // resize was currently active). // //? resizeAll() // //=> $('[data-sqa]'), resize all elements in the DOM // //? resizeAll($('<header>')) // //=> $('header [data-sqa]'), resize all elements under all <header>s self.resizeAll = function (root) { var nodes = $('[' + self.opt.attribute + ']', root) $(root).attr(self.opt.attribute) == null || (nodes = nodes.add(root)) if (!self._resizing) { self._resizing = true self._resized = {} nodes.each(function () { try { self.resize(this) } catch (e) { console && console.error(e) } }) self._resizing = false } return nodes } // Checks if node has assigned cache of previously parsed opt and if that // cache is actual according to _cacheSeq - if so returns the cache, if // not - parses and returns opt, also caching it for future calls. self._cachingParse = function (node, opt) { var data = node.data('sqao') if (data && (data.cacheSeq == null || data.cacheSeq >= self._cacheSeq) && (data.expr == null || data.expr == node.attr(self.opt.attribute))) { return data } else { opt = $.extend({cacheSeq: self._cacheSeq}, opt) node.data('sqao', opt = self.parse(node, opt)) return opt } } // Parses given opt into final Sqaline format with rules mapped to compiled // JS expressions, etc. opt format is considered internal so use at your own // risk - it's not future-proof. Usually you don't need to call this function. // // opt can be given members of various "raw" levels to achieve more // flexibility. If opt.expr is not given it's read from data-sqa and broken // down into some flags and rules (see parseAttribute()). Rules are then // parsed into more flags and their code is compiled. // // For a non-Sqalinable node (e.g. without data-sqa) rules and props will be [] // (which is also true for data-sqa="anchors,only") but anchors will be absent. // // Returns entirely parsed opt which has this format: // opt = { // node: $, trigger: 'trigger' | 'triggerHandler' | false, // cacheSeq: this._cacheSeq, // expr: 'na,me ^{eval} ... | ...', // verbose: false, resizeReferenced: true, // name: 'na', anchors: ['na', 'me'], rules: ['^{eval} ...', '...'], // props: [{ - props may duplicate (evaluated sequentially) // prop: 'width', // source: '^{eval} ...', // code: 'cx("^", "eval") ...', // func: Function ('cx', <code>), // applier: 'css' | 'attr' | Function (Sqaline, opt, prop, value), // }, ...], // } self.parse = function (node, opt) { node = $(node).eq(0) opt = $.extend({ trigger: self.opt.trigger, resizeReferenced: self.opt.resizeReferenced, }, opt, {node: node}) if (!opt.props && !opt.expr) { opt.expr = $.trim(opt.node.attr(self.opt.attribute)) self.opt.verbose && console.log('Sqaline parsing ' + opt.expr) } else if (self.opt.verbose) { console.log('Sqaline parsing:') console.dir([opt]) } $.extend(opt, opt.expr ? self.parseAttribute(opt.expr) : {rules: [], props: []}) if (opt.rules) { opt.props = [] $.each(opt.rules, function (i, rule) { rule = $.trim(rule) // [ ['['|{] prop:] [-] [...] [-] var parsed = rule.match(/^(?:([[{]?)([\w-]+):)?\s*(([-+]?\s*)(.*?)(\s*[-+]?))$/) parsed || self.fail('Bad Sqaline rule: ' + rule) var applier = parsed[1], prop = parsed[2], expr = parsed[3], leftCut = parsed[4], innerExpr = parsed[5], rightCut = parsed[6] if (prop) { prop = self.exprShortcuts[prop] || prop } else if (i) { self.fail('Only first Sqaline |rule| can have omitted property: ' + rule) } else { prop = self.opt.defaultProperty } innerExpr || (expr = leftCut + '0' + rightCut) var cut = leftCut && self._normalizeCut('left', self.opt.leftCut, prop) cut && (expr = (cut[1] || '') + ' ' + expr) var cut = rightCut && self._normalizeCut('right', self.opt.rightCut, prop) cut && (expr += ' ' + (cut[1] || '')) var func = (new self.Parser(expr)).parse() opt.props.push({ prop: prop, source: rule, code: func._sqaCode, func: func, applier: self.opt.appliers[applier] || (testEl.css(prop) === undefined ? 'attr' : 'css'), }) }) } return opt } // Extracts common fields from the given data-sqa value string. // //? parseAttribute('!wr,wr2 top: lt | left: 0') self.parseAttribute = function (str) { var parsed = str.match(/^(!?)(\w+(?:,\w+)*)(\s+(.+))?$/) parsed || self.fail('Bad Sqaline attribute format: ' + str) var anchors = parsed[2].split(',') return { verbose: parsed[1], name: anchors[0], anchors: anchors, rules: parsed[4] ? parsed[4].split(' | ') : [], } } // Used to map leftCut or rightCut shortcuts into full expressions. // //? _normalizeCut('left', {height: 'foo'}, 'maxHeight') // //=> ['height', 'foo'] self._normalizeCut = function (sideName, shortcuts, prop) { var match = prop.match(/^(min|max)([A-Z])(.*)$/) if (match && !(prop in shortcuts)) { prop = match[2].toLowerCase() + match[3] } if (!(prop in shortcuts)) { self.fail('Sqaline has no ' + sideName + '-hand shortcut for ' + prop + ': ' + rule) } return [prop, shortcuts[prop]] } // Internal function used to resize a parsed element. Recursion-unsafe. self._resize = function (opt) { opt.verbose = opt.verbose || self.opt.verbose if (opt.verbose) { console.info('Sqaline running on ' + opt.node[0].tagName + ': ' + opt.expr) } $.each(opt.props, function (i, item) { try { var prop = item.prop var value = self._context(opt)('', '', item.func) opt.verbose && console.log(prop + ' = ' + value) if (isNaN(value) && typeof value == 'number') { // isNaN('1.1em') => true if (console) { console.warn('Sqaline of ' + prop + ' evaluated to NaN: ' + opt.expr) console.dir && console.dir([$.extend({}, opt, item)]) } } else if (typeof item.applier == 'string') { opt.node[item.applier](prop, value) } else { item.applier.call(self, opt, prop, value) } } catch (e) { if (console) { console.dir && console.dir([$.extend({}, opt, item)]) console.warn('Error follows - see if you are not trying to read window\'s' + ' CSS properties due to a referenced anchor{...} not' + ' found above this ' + opt.node[0].tagName + '.') } self.fail('Error "' + e + '" evaluating Sqaline of ' + prop + ': ' + opt.expr) } }) } // Returns a function that evaluates Sqaline JS code as a SUB/EXPRESSION. // // target = anchor ('', '^' or 'anchorName'). // selector = CSS selector to find descendants of target. // code = Function object or a string to be eval()'ed. It will have cx // variable visible in scope and should return the calculated value (number // or something else). self._context = function (opt) { return function (target, selector, code) { if (target == '') { var all = opt.node } else { // '^' or 'name'. target == '^' && (target = opt.name) var len = target.length var all = $win opt.node.parents('[' + self.opt.attribute + ']').each(function () { var attr = $(this).attr(self.opt.attribute) if (self.parseAttribute(attr).anchors.indexOf(target) != -1) { all = $(this) return false } }) } selector && (all = $(selector, all !== $win && all)) var cx = {self: self, opt: opt, sub: arguments.callee} var sum = 0 all.each(function () { cx.el = $(this) opt.resizeReferenced && self.resize(cx.el) var value = (code instanceof Function) ? code(cx) : eval(code) sum = typeof value == 'number' ? sum + value : value opt.verbose && console.dir([ {code: code._sqaCode || code, el: cx.el, res: value} ]) }) opt.verbose && all.length > 1 && console.log(' total = ' + sum) return sum } }, // Calculates offset of el relative to parent offset. $().offset() returns // offset absolute to document body. // //? _nodeDistance($(el), $(el).find('p').eq(1)) // //=> {left: 15, top: 22} self._nodeDistance = function (parent, el) { parent = parent.offset() el = el.offset() return {left: el.left - parent.left, top: el.top - parent.top} } // Registers global Sqaline event handlers. Called by $.ready(). Makes // Sqaline automatically resize document elements on window size change. self.run = function () { $win.on('resize.sqaline', self.resizeTimed) $win.on('load', self.resizeTimed) self.resizeTimed() } // Unregisters global Sqaline handlers. If you want to resume Sqaline // automatically resizing document elements call run(). self.stop = function () { $win.off('.sqaline') } /*** Expression Parser Given a raw rule expression like (^{h - {h}} / 2) turns it into a compiled Function object. Handles recursive {subexpressions} and other stuff. ***/ self.Parser = function (rule) { var self = this var pos = 0 var len = rule.length // Parse error near specific offset in rule (or unspecific, if errorPos is // not given or is out of bounds). self.fail = function (msg, errorPos) { arguments.length > 1 || (errorPos = pos) if (errorPos >= 0 && errorPos < len) { errorPos > 0 || (errorPos = 0) rule = rule.substr(0, errorPos - 1) + '*HERE*' + rule.substr(errorPos - 1) } msg = 'Bad Sqaline rule "' + rule + '": ' + msg Sqaline.fail(msg) }, // Parses the rule string given to the constructor. Returns Function. // Stores intermediate subexpressions in global Sqaline._funcs. self.parse = function () { var code = '' var openPos = pos while (pos < len && rule[pos] != '}') { if (rule[pos] == '{') { var start = self._findStart(pos - 1) var end = pos++ code += self._genCode(openPos, start) + self._genSub(start, end, self.parse()) rule[pos] == '}' || self.fail('unterminated "{"', start) openPos = ++pos } else { pos++ } } code += self._genCode(openPos, pos) // Since generated closures don't rely on scope in this place but only // on their arguments we safely reuse these objects if subexpressions // turn out to be identical to those compiled before. if (!(code in Sqaline._funcs)) { var func = new Function('cx', 'return ' + code) Sqaline._funcs[func._sqaCode = code] = func } return Sqaline._funcs[code] } // Tracks pos back to the beginning of SUBEXPRESSION. It's not that simple // given that it may have $(...) with spaces, strings (with \escapers) and // nested brackets. Returns offset of the exact first symbol of SUBEXPRESSION // - either '^', anchor name, '$' or '{' or none of these were found. self._findStart = function (pos) { // ... [name|^] [$[(]...[)]] { expr } // ^ return ^ pos var braceLevel = 0 var string = false for (; pos >= 0; pos--) { if (string) { if (rule[pos] == string) { for (var i = pos - 1; i >= 0 && rule[i] == '\\'; i--) { } (pos - i) % 2 && (string = false) pos = i + 1 } } else if (rule[pos] == '"' || rule[pos] == "'") { string = rule[pos] } else if (rule[pos] == ')') { braceLevel++ } else if (rule[pos] == '(') { if (--braceLevel < 0) { // E.g. '1 + ({ ... } / 2)' where '(' isn't part of selector but of // the parent expression. return pos + 1 } else if (braceLevel) { // continue } else if (rule[pos - 1] != '$') { // Bracket was opened and closed so it must be of '...$(foo){ ... }'. self.fail('el reference must start with "$"', pos) } else { pos-- } } else if (braceLevel) { // continue } else if (/\s/.test(rule[pos])) { return pos + 1 } } if (string) { self.fail('unterminated string') } else if (braceLevel) { self.fail('too many ")"') } else { return 0 // e.g. rule == 'wrapper{...}'. } } // Turns an isolated piece of Sqaline expression code into valid JavaScript // by expanding exprShortcuts. Note that the startPos..endPos part can have // uncloser brackets, etc. so it won't run by its own and this should not // make changes that will break original expression syntax when it's merged. self._genCode = function (startPos, endPos) { return rule .substr(startPos, endPos - startPos) .replace(Sqaline._exprShortcutRE, function (match, prop) { var code = Sqaline.exprShortcuts[prop] code.indexOf('(') == -1 && (code = 'parseFloat(cx.el.css(\'' + code + '\'))') return code }) } // Turns a part of valid JS code func that should be evaluated inside a // specific context into a proper JS call to cx.sub (see _context()). self._genSub = function (startPos, endPos, func) { // name$(data-foo="with spaces") var prefix = rule.substr(startPos, endPos - startPos) var match = prefix.match(/^((?:\w+|\^)?)\$(?:\((.*)\)|(.*))$/) || ['', prefix, ''] var target = match[1] var selector = match[2] || match[3] return "cx.sub('" + self.slashes(target) + "'," + " '" + self.slashes(selector) + "'," + " cx.self._funcs['" + self.slashes(func._sqaCode) + "'])" } // Escapes string so that it can be evaluated as 'str' without \ and ' // breaking the syntax. Doesn't wrap str into quotes. // //? slashes('f\\o\'o') //=> 'fo\\\\o\\\'o' //? eval('return ' + slashes('f\\o\'o')) //=> f\o'o self.slashes = function (str) { return (str || '').replace(/([\\'])/g, '\\$1') } } /*** Entry Point ***/ // Called immediately after loading this library. self.init = function () { $ || self.fail('Sqaline requires jQuery') var re = '' for (var prop in self.exprShortcuts) { re += '|' + prop } self._exprShortcutRE = new RegExp(self._exprShortcutRE.replace('%%', re.substr(1)), 'g') } self.init() $(self.run) })(jQuery, window.Sqaline);
40.181548
93
0.589216
96c50103be0a4c31687f79dc2aed83bb571a441d
326
js
JavaScript
packages/operators/src/toOutputOperator.js
objectel/objectel
6de1d8a980195deed10ccf906d12d59f2c4276e1
[ "MIT" ]
4
2019-01-17T04:41:11.000Z
2019-01-19T05:09:04.000Z
packages/operators/src/toOutputOperator.js
objectel/objectel
6de1d8a980195deed10ccf906d12d59f2c4276e1
[ "MIT" ]
11
2019-01-17T15:05:38.000Z
2019-01-29T02:56:45.000Z
packages/operators/src/toOutputOperator.js
objectel/objectel
6de1d8a980195deed10ccf906d12d59f2c4276e1
[ "MIT" ]
null
null
null
import merge from 'callbag-merge'; export default function toOutputOperator(component) { return props => childrenInput$ => { const children = Array.isArray(props.children) ? props.children : []; const input$ = merge(...children.map(element => element(childrenInput$))); return component(props)(input$); }; };
32.6
78
0.693252
96c5fd9b89b9b90a7807aeec5fa372c732c5ff35
619
js
JavaScript
src/App.js
phatchanas/Qoute
95435a55829031fac0b47a3065d473d37cf505e0
[ "MIT" ]
null
null
null
src/App.js
phatchanas/Qoute
95435a55829031fac0b47a3065d473d37cf505e0
[ "MIT" ]
3
2021-03-10T21:04:44.000Z
2022-02-27T06:00:02.000Z
src/App.js
phatchanas/Quote
95435a55829031fac0b47a3065d473d37cf505e0
[ "MIT" ]
null
null
null
import React, { useState } from 'react'; import './App.css'; import QuotesApi from './compontens/quotesApi'; import Quote from './compontens/quote' import Granim from 'react-granim' import { WiredCard} from 'react-wired-elements'; function App() { const [quote, setQuote] = useState('') return ( <> <Granim id="granim"> </Granim> <div className="App"> <WiredCard fill="#F5F5F5" elevation={3}> <h1>Need a Deep Instagram Quote?</h1> </WiredCard> <Quote quote={quote}/> <QuotesApi setQuote={setQuote}/> </div> </> ) } export default App;
19.34375
52
0.6042
96c6ab78fd546e2d83e375fa9fd87233f4eb3126
1,524
js
JavaScript
tictactoe.js
ezeYaniv/tictactoe
094f053cba8a27ed7d2876739051191181663628
[ "MIT" ]
null
null
null
tictactoe.js
ezeYaniv/tictactoe
094f053cba8a27ed7d2876739051191181663628
[ "MIT" ]
1
2021-03-23T18:31:59.000Z
2021-03-23T18:31:59.000Z
tictactoe.js
ezeYaniv/tictactoe
094f053cba8a27ed7d2876739051191181663628
[ "MIT" ]
null
null
null
const winCombos = [ [0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6], ]; let gameTracker = [], turn; const turnX = 'X', turnO = 'O'; function playGame() { $(document).ready(function () { initializeGame(); $('.square').click(function () { makeMove($(this)); endTurn(); }); }); } function initializeGame() { $('.start').css('display', 'none'); $('.square').children('p').text(''); gameTracker = []; turn = turnX; $('h1').text('Player ' + turn + ' Turn'); } function makeMove(square) { if (square.text() == '') { square.children('p').text(turn); let squareNum = square.attr('id').slice(-1); gameTracker[squareNum - 1] = turn; } else { alert('That square is taken, please choose another.'); } } function endTurn() { if (!checkWinDraw()) { turn = turn == turnX ? turnO : turnX; $('h1').text('Player ' + turn + ' Turn'); } else if(checkWinDraw() == 'tie') { $('h1').text('Draw!'); endGame(); } else { $('h1').text('Player '+turn+" wins!"); endGame(); } } function checkWinDraw() { for ([first, second, third] of winCombos) { if (gameTracker[first] !== undefined && gameTracker[first] === gameTracker[second] && gameTracker[first] === gameTracker[third]) { return turn; } } if (gameTracker.filter((element, index) => element != null).length == 9) { return 'tie'; } } function endGame() { $('.start').css('display', ''); $('.square').off(); }
21.166667
134
0.53084
96c777663b16f2658e15544d332284f8473596aa
390
js
JavaScript
server/config/index.js
IPOjzt/myBlog-
60d666901db775242ed6884a4b6685a3b4a10ce0
[ "MIT" ]
1
2018-07-21T02:16:11.000Z
2018-07-21T02:16:11.000Z
server/config/index.js
IPOjzt/myBlog-
60d666901db775242ed6884a4b6685a3b4a10ce0
[ "MIT" ]
1
2018-07-17T12:29:24.000Z
2018-07-18T01:53:40.000Z
server/config/index.js
IPOjzt/myBlog-
60d666901db775242ed6884a4b6685a3b4a10ce0
[ "MIT" ]
null
null
null
const utils = require('../utils') utils.creatSecret() utils.creatMpApp() const secret = require('./secret.js') const mpApp = require('./mpapp.js') // MD5 加密前缀, 如用户的密码是 123456, 存到数据库将会变成 md5('!@#$%(*&^)' + '123456') exports.md5Pre = '!@#$%(*&^)' exports.secretServer = secret.secretServer exports.secretClient = secret.secretServer exports.apiId = mpApp.apiId exports.secret = mpApp.secret
30
67
0.702564
96c8208d2b3b46b6967b413ece1f929cc14b73ce
112
js
JavaScript
core/module/lib/config.js
jovercao/j3
6b54adbc1b5c1e714e0d5434348f2f3a14a43482
[ "MIT" ]
null
null
null
core/module/lib/config.js
jovercao/j3
6b54adbc1b5c1e714e0d5434348f2f3a14a43482
[ "MIT" ]
null
null
null
core/module/lib/config.js
jovercao/j3
6b54adbc1b5c1e714e0d5434348f2f3a14a43482
[ "MIT" ]
null
null
null
let node_default_path = './node/node'; let npm_default_path = './node/npm'; //# sourceMappingURL=config.js.map
22.4
38
0.723214
96ca5a7e17c73251d6440689ffad03b8789f5fb5
4,880
js
JavaScript
src/components/Skills.js
longnghiem/react-form-validation
fa41f2c51b7aa9411d26761a07f38c7f49049e98
[ "MIT" ]
null
null
null
src/components/Skills.js
longnghiem/react-form-validation
fa41f2c51b7aa9411d26761a07f38c7f49049e98
[ "MIT" ]
null
null
null
src/components/Skills.js
longnghiem/react-form-validation
fa41f2c51b7aa9411d26761a07f38c7f49049e98
[ "MIT" ]
null
null
null
import React, {Component} from 'react'; import CheckboxComp from './CheckboxComp' import RadioComp from './RadioComp' export default class Skills extends Component{ constructor(props){ super(props) this.state = { otherDisciplines: [], location: [], primaryDisciplines: 'design-research' } } validate = (otherDisciplines, location) => { const errors = { otherDisciplines: otherDisciplines.length ? "" : "Please pick at least one option", location: location.length ? "" : "Please pick at least one option" } return errors } handleCheck = (e, category) => { const value = e.target.value; const index = this.state[category].indexOf(value); index === -1 ? this.setState(prevState => ({[category]: [...prevState[category], value]})) : this.setState(prevState =>{ return { [category]: [ ...prevState[category].slice(0,index), ...prevState[category].slice(index+1) ] } }) } handleRadio = (e, type) => { this.setState({ [type]: e.target.value }) } submitHandler = e => { e.preventDefault(); this.props.submit(this.state,'skills'); this.props.history.push('/portfolio') this.setState({ otherDisciplines: [], location: [], primaryDisciplines: 'design-research' }) } isSubmitDisabled = errors => { return Object.values(errors).some(errMsg => { console.log(errMsg); return errMsg; }) } render(){ const {otherDisciplines, location, primaryDisciplines} = this.state const errors = this.validate(otherDisciplines, location); const otherDisciplinesList = [{name: 'other-visual-design', text:'Visual Design'}, {name: 'other-ux-design', text: 'UX Design'}, {name: 'other-frontend-dev', text: 'Front-end Development'} ] const locationList = ['Austin, Texas','New York, New York','Toronto, Canada','Shanghai, China','Somewhere else'] const primaryDisciplinesList=[ {id:"design-research", name:"primaryDisciplines", label:"Design Research"}, {id:"visual-design", name:"primaryDisciplines", label:"Visual Design"}, {id:"ux-design", name:"primaryDisciplines", label:"UX Design"}, {id:"frontend-dev", name:"primaryDisciplines", label:"Front-end Dev"}, ] return( <section> <h3>2. Skills and location</h3> <form onSubmit={this.submitHandler}> <div className="skill-location"> <div className="skill-location-1"> <p>Which is your primary design discipline?*</p> <ul> {primaryDisciplinesList.map((item,i)=> <RadioComp key={i} id={item.id} name={item.name} label={item.label} checked={primaryDisciplines===item.id} changed={e=>this.handleRadio(e, item.name)} /> )} </ul> </div> <div className="skill-location-2"> <p>Do you have experience with any other disciplines?</p> <ul> {otherDisciplinesList.map((item,i) => <CheckboxComp key={i} name={item.name} text={item.text} change={e=>this.handleCheck(e, 'otherDisciplines')} checked={otherDisciplines.includes(item.name)} category='otherDisciplines'/> )} </ul> <div className="err-msg">{errors.otherDisciplines}</div> </div> <div className="skill-location-3"> <p>Where are you interested in working?*</p> <p className="subtext">malis veniam sunt sunt irure quid amet labore nisi magna quis noster nisi sunt aute dolor elit elit sunt enim</p> <ul> {locationList.map((item,i)=> <CheckboxComp key={i} name={item} text={item} change={e=>this.handleCheck(e, 'location')} checked={location.includes(item)} category='location'/> )} </ul> <div className="err-msg">{errors.location}</div> </div> </div> <button disabled={this.isSubmitDisabled(errors)}>Next</button> </form> </section> ) } }
35.620438
116
0.501025
96cbec9a6025fa8962cd6294d0edbfc3f2a4218b
3,121
js
JavaScript
src/components/TaskModalInfos/styles.js
MarcusRosaa/app-taugor
f1de86f6ae51821951cf6c0c70a1d389b6b9f83c
[ "MIT" ]
1
2022-02-25T00:32:33.000Z
2022-02-25T00:32:33.000Z
src/components/TaskModalInfos/styles.js
MarcusRosaa/app-taugor
f1de86f6ae51821951cf6c0c70a1d389b6b9f83c
[ "MIT" ]
null
null
null
src/components/TaskModalInfos/styles.js
MarcusRosaa/app-taugor
f1de86f6ae51821951cf6c0c70a1d389b6b9f83c
[ "MIT" ]
null
null
null
import styled, { keyframes } from 'styled-components'; const ModalEffect = keyframes` 0% {opacity: 0} 100% {opacity: 1} `; export const Layer = styled.div` position: fixed; float: left; left: 0; top: 0; width: 100vw; background: rgba(0,0,0,0.2); overflow: hidden; animation: ${ModalEffect} 0.3s ease-in; `; export const Container = styled.div` width: 100%; max-width: 900px; height: inherit; max-height: 450px; padding: 16px; top: 50%; left:50%; position: fixed; overflow-y: auto; overflow-x: hidden; transform: translate(-50%, -50%); display: flex; border-radius: 8px; padding: 30px; margin-bottom: 16px; background: #fff; box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1); &::-webkit-scrollbar { width: 7px; } /* Track */ &::-webkit-scrollbar-track { box-shadow: inset 0 0 5px #fafafa; border-radius: 6px; } /* Handle */ &::-webkit-scrollbar-thumb { background: #0006; border-radius: 10px; } @media (max-width: 1024px) { max-width: 800px; } @media (max-width: 880px) { max-width: 750px; } @media (max-width: 768px) { flex-direction: column; max-width: 600px; } @media (max-width: 660px) { flex-direction: column; max-width: 450px; } @media (max-width: 545px) { max-width: 350px; overflow-y: auto; } @media (max-width: 375px) { max-width: 300px; overflow-y: auto; } `; export const Content = styled.div` width: 65%; padding-right: 20px; h5 { font-size: 16px; font-weight: 600; margin-bottom: 5px; } p { font-size: 16px; font-weight: 300; } @media (max-width: 768px) { width: 100%; } `; export const Title = styled.h2` font-size: 22px; font-weight: 500; margin-bottom: 30px; `; export const Description = styled.div` margin-bottom: 20px; `; export const ProblemDescription = styled.div` `; export const Sidebar = styled.aside` width: 40%; height: fit-content; border: 1px solid rgb(180, 180, 180); border-radius: 8px; padding: 20px; @media (max-width: 768px) { width: 100%; } `; export const SidebarItem = styled.div` display: flex; align-items: center; padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid rgb(180, 180, 180); &:last-of-type { margin-bottom: 0; padding-bottom: 0; border-bottom: none; } div { height: fit-content; p { font-size: 14px; font-weight: 300; text-overflow: ellipsis; overflow: hidden; } } div:nth-of-type(1) { width: 35%; /* border: 1px solid blue; */ p { font-size: 14px; font-weight: 600; } } div:nth-of-type(2) { width: 60%; padding-left: 15px; a { text-decoration: underline; display: flex; width: fit-content; text-align: center; font-size: 14px; font-weight: 300; padding: 8px 12px; border-radius: 8px; transition: .2s; color: black; background: rgb(230, 230, 230); &:hover { background: rgb(220, 220, 220); } } } `;
16.426316
54
0.587312
96cc168494c160d455016bcaaeae6bfd296d4db7
5,414
js
JavaScript
docs/js/chunk-59291143.89ef9b5e.js
openbiox/openbiox
c3b7ec248f85671c05f06b90564f68e5d507630d
[ "CC-BY-3.0" ]
16
2019-03-11T00:59:36.000Z
2021-08-02T16:07:03.000Z
docs/js/chunk-59291143.89ef9b5e.js
openbiox/openbiox
c3b7ec248f85671c05f06b90564f68e5d507630d
[ "CC-BY-3.0" ]
1
2019-04-29T07:45:16.000Z
2019-04-29T07:45:16.000Z
docs/js/chunk-59291143.89ef9b5e.js
openbiox/openbiox
c3b7ec248f85671c05f06b90564f68e5d507630d
[ "CC-BY-3.0" ]
5
2019-03-31T11:30:46.000Z
2021-09-30T16:23:00.000Z
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-59291143"],{"261e":function(t,e,n){"use strict";n("6762"),n("2fdb"),n("5df3"),n("1c4c");var i=n("8bbf"),a=n.n(i),r=n("80d2");e.a=a.a.extend().extend({name:"stackable",data:function(){return{stackClass:"unpecified",stackElement:null,stackExclude:null,stackMinZIndex:0,isActive:!1}},computed:{activeZIndex:function(){if("undefined"==typeof window)return 0;var t=this.stackElement||this.$refs.content,e=this.isActive?this.getMaxZIndex(this.stackExclude||[t])+2:Object(r.n)(t);return null==e?e:parseInt(e)}},methods:{getMaxZIndex:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=this.$el,n=[this.stackMinZIndex,Object(r.n)(e)],i=[].concat(function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}(document.getElementsByClassName(this.stackClass))),a=0;a<i.length;a++)t.includes(i[a])||n.push(Object(r.n)(i[a]));return Math.max.apply(Math,n)}}})},"30d4":function(t,e,n){"use strict";n("ac6a");var i=n("7618"),a=(n("ac4d"),n("8a81"),n("3e79e")),r=n("d9bd"),s="function"==typeof Symbol&&"symbol"===Object(i.a)(Symbol.iterator)?function(t){return Object(i.a)(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Object(i.a)(t)};e.a={name:"detachable",mixins:[a.a],props:{attach:{type:null,default:!1,validator:function(t){var e=void 0===t?"undefined":s(t);return"boolean"===e||"string"===e||t.nodeType===Node.ELEMENT_NODE}},contentClass:{default:""}},data:function(){return{hasDetached:!1}},watch:{attach:function(){this.hasDetached=!1,this.initDetach()},hasContent:"initDetach"},beforeMount:function(){var t=this;this.$nextTick(function(){t.activatorNode&&(Array.isArray(t.activatorNode)?t.activatorNode:[t.activatorNode]).forEach(function(e){e.elm&&t.$el.parentNode.insertBefore(e.elm,t.$el)})})},mounted:function(){!this.lazy&&this.initDetach()},deactivated:function(){this.isActive=!1},beforeDestroy:function(){try{if(this.$refs.content&&this.$refs.content.parentNode.removeChild(this.$refs.content),this.activatorNode)(Array.isArray(this.activatorNode)?this.activatorNode:[this.activatorNode]).forEach(function(t){t.elm&&t.elm.parentNode.removeChild(t.elm)})}catch(t){}},methods:{getScopeIdAttrs:function(){var t,e,n,i=this.$vnode&&this.$vnode.context.$options._scopeId;return i&&(n="",(e=i)in(t={})?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t)},initDetach:function(){if(!this._isDestroyed&&this.$refs.content&&!this.hasDetached&&""!==this.attach&&!0!==this.attach&&"attach"!==this.attach){var t=void 0;(t=!1===this.attach?document.querySelector("[data-app]"):"string"==typeof this.attach?document.querySelector(this.attach):this.attach)?(t.insertBefore(this.$refs.content,t.firstChild),this.hasDetached=!0):Object(r.c)("Unable to locate target "+(this.attach||"[data-app]"),this)}}}}},bfc5:function(t,e,n){"use strict";n("7514");var i=n("6a18"),a=n("58df");e.a=Object(a.a)(i.a).extend({name:"theme-provider",props:{root:Boolean},computed:{isDark:function(){return this.root?this.rootIsDark:i.a.options.computed.isDark.call(this)}},render:function(){return this.$slots.default&&this.$slots.default.find(function(t){return!t.isComment&&" "!==t.text})}})},c584:function(t,e,n){"use strict";function i(){return!1}e.a={inserted:function(t,e){var n=function(n){return function(t,e,n){n.args=n.args||{};var a=n.args.closeConditional||i;if(t&&!1!==a(t)&&!("isTrusted"in t&&!t.isTrusted||"pointerType"in t&&!t.pointerType)){var r=(n.args.include||function(){return[]})();r.push(e),!r.some(function(e){return e.contains(t.target)})&&setTimeout(function(){a(t)&&n.value&&n.value(t)},0)}}(n,t,e)};(document.querySelector("[data-app]")||document.body).addEventListener("click",n,!0),t._clickOutside=n},unbind:function(t){if(t._clickOutside){var e=document.querySelector("[data-app]")||document.body;e&&e.removeEventListener("click",t._clickOutside,!0),delete t._clickOutside}}}},c69d:function(t,e,n){"use strict";n("5df3"),n("1c4c");var i=n("58df");function a(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}e.a=Object(i.a)().extend({name:"dependent",data:function(){return{closeDependents:!0,isActive:!1,isDependent:!0}},watch:{isActive:function(t){if(!t)for(var e=this.getOpenDependents(),n=0;n<e.length;n++)e[n].isActive=!1}},methods:{getOpenDependents:function(){return this.closeDependents?function t(e){for(var n=[],i=0;i<e.length;i++){var r=e[i];r.isActive&&r.isDependent?n.push(r):n.push.apply(n,a(t(r.$children)))}return n}(this.$children):[]},getOpenDependentElements:function(){for(var t=[],e=this.getOpenDependents(),n=0;n<e.length;n++)t.push.apply(t,a(e[n].getClickableDependentElements()));return t},getClickableDependentElements:function(){var t=[this.$el];return this.$refs.content&&t.push(this.$refs.content),this.overlay&&t.push(this.overlay),t.push.apply(t,a(this.getOpenDependentElements())),t}}})},e949:function(t,e,n){"use strict";var i=n("8bbf"),a=n.n(i);e.a=a.a.extend({name:"returnable",props:{returnValue:null},data:function(){return{isActive:!1,originalValue:null}},watch:{isActive:function(t){t?this.originalValue=this.returnValue:this.$emit("update:returnValue",this.originalValue)}},methods:{save:function(t){var e=this;this.originalValue=t,setTimeout(function(){e.isActive=!1})}}})}}]);
5,414
5,414
0.720909
96ccfe5e49701fda468dc466e23a14e2077b11e2
677
js
JavaScript
src/ProofHub/Entities/BaseEntity.js
Norbz/proofhub-cli
a1de3e08b8169d27cc207ace1be2a311302bdb40
[ "MIT" ]
null
null
null
src/ProofHub/Entities/BaseEntity.js
Norbz/proofhub-cli
a1de3e08b8169d27cc207ace1be2a311302bdb40
[ "MIT" ]
null
null
null
src/ProofHub/Entities/BaseEntity.js
Norbz/proofhub-cli
a1de3e08b8169d27cc207ace1be2a311302bdb40
[ "MIT" ]
null
null
null
class BaseEntity { constructor(parent, id){ this.parent = parent; this.id = id; } get endpoint() { return '/api/v3'; } get root() { if(this.parent){ return this.parent.root; } return null; } get project() { if(this.parent){ return this.parent.project; } return null } get folder() { if(this.parent){ return this.parent.folder; } return null } get notebook() { if(this.parent){ return this.parent.notebook; } return null } } module.exports = BaseEntity;
15.744186
40
0.468242
96cd019194e999304d268c03cd1bff4152e3a120
8,704
js
JavaScript
js/Matricula.js
martinez-isaac/jardinFundacionEDS
a007b5e3e08252a88f2fac3eaf6f3e158cfa33bc
[ "Apache-2.0" ]
null
null
null
js/Matricula.js
martinez-isaac/jardinFundacionEDS
a007b5e3e08252a88f2fac3eaf6f3e158cfa33bc
[ "Apache-2.0" ]
null
null
null
js/Matricula.js
martinez-isaac/jardinFundacionEDS
a007b5e3e08252a88f2fac3eaf6f3e158cfa33bc
[ "Apache-2.0" ]
null
null
null
var _slicedToArray = function () { function sliceIterator(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } }; }(); var ModalUno = function ModalUno(props) { return React.createElement( React.Fragment, null, React.createElement( "div", { id: "myModal", className: "modal" }, React.createElement( "div", { className: "modal-content azul-back-shape" }, React.createElement( "div", { className: "modal-header azul-back" }, React.createElement( "span", { className: "close", id: "closemodalbtn", type: "button", onClick: props.close }, "x" ), React.createElement( "h2", null, props.title ) ), React.createElement( "div", { className: "modal-body" }, props.body ), React.createElement( "div", { className: "modal-footer" }, React.createElement( "a", null, props.footer ) ) ) ) ); }; var MatriculaBody = function MatriculaBody() { var _React$useState = React.useState(null), _React$useState2 = _slicedToArray(_React$useState, 2), tipo = _React$useState2[0], setTipo = _React$useState2[1]; return React.createElement( React.Fragment, null, React.createElement( "div", { className: "row" }, tipo && React.createElement( "div", { className: "col-12" }, React.createElement( "span", { className: "close rojo", type: "button", onClick: function onClick() { return setTipo(null); } }, "\u2190 Volver " ) ), !tipo ? React.createElement( React.Fragment, null, React.createElement( "div", { className: "col-12 align-center" }, React.createElement( "div", { className: "col-12" }, React.createElement( "h2", { className: "cero" }, "Selecci\xF3n de Nivel" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "p", { className: "cero" }, "Selecciona el nivel del ni\xF1o o ni\xF1a postulante." ) ) ), React.createElement( "div", { className: "col-6" }, React.createElement( "button", { className: "rojo-back-noshape col-12", onClick: function onClick() { return setTipo('school'); } }, "Escuela" ) ), React.createElement( "div", { className: "col-6" }, React.createElement( "button", { className: "rojo-back-noshape col-12", onClick: function onClick() { return setTipo('garden'); } }, "Jardin" ) ) ) : React.createElement( React.Fragment, null, tipo === 'school' && React.createElement( React.Fragment, null, React.createElement( "div", { className: "text-left col-12" }, React.createElement( "div", { className: "col-12 cero" }, React.createElement( "h3", { className: "cero" }, "ADMISI\xD3N ONLINE" ) ), React.createElement( "div", { className: "col-12 cero" }, React.createElement( "h6", { className: "cero" }, "WWW.SISTEMADEADMISIONESCOLAR.CL" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "p", { className: "cero" }, "El principal objetivo del Sistema de Admisi\xF3n Escolar es garantizar que las familias puedan elegir el proyecto educativo que mejor coincida con la educaci\xF3n que desean para sus hijos, a trav\xE9s de un sistema centralizado, confiable y transparente que les ayude a optimizar de mejor manera su tiempo." ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "h5", { className: "cero" }, "\xBFQui\xE9nes deben postular?" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "p", null, "Todas aquellas familias que deseen que sus hijos o hijas:" ), React.createElement( "ul", { className: "lista rojo" }, React.createElement( "li", null, React.createElement( "a", null, "Asistan por primera vez a un establecimiento educacional Municipal o Particular Subvencionado." ) ), React.createElement( "li", null, React.createElement( "a", null, "Ingresen a PreK\xEDnder en un colegio Municipal o Particular Subvencionado." ) ), React.createElement( "li", null, React.createElement( "a", null, "Deseas cambiarlo a otro establecimiento subvencionado por el Estado. " ) ) ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "a", { className: "cero rojo" }, "No deben participar" ), React.createElement( "a", { className: "cero" }, " del Sistema de Admisi\xF3n si:" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "ul", { className: "lista rojo" }, React.createElement( "li", null, React.createElement( "a", null, "Deseas que tu hijo o hija contin\xFAe en el mismo establecimiento en el que se encuentra matriculado. " ) ), React.createElement( "li", null, React.createElement( "a", null, "Deseas cambiar a tu hijo o hija a un colegio Particular Pagado. " ) ) ) ) ) ), tipo === 'garden' && React.createElement( React.Fragment, null, React.createElement( "div", { className: "text-left col-12" }, React.createElement( "div", { className: "col-12 cero" }, React.createElement( "h3", { className: "cero" }, "ADMISI\xD3N JARDIN" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "h5", null, "Requisitos:" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "ul", { className: "lista rojo" }, React.createElement( "li", null, React.createElement( "a", null, "Registro Social de Hogares." ) ), React.createElement( "li", null, React.createElement( "a", null, "Certificado de Nacimiento de la ni\xF1a o ni\xF1o." ) ), React.createElement( "li", null, React.createElement( "a", null, "Carnet de control (vacunas al d\xEDa)." ) ) ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "h5", null, "Horarios de Atenci\xF3n" ) ), React.createElement( "div", { className: "col-12" }, React.createElement( "p", null, "De Lunes a Viernes de 9 a 16 horas." ) ) ) ) ) ) ); }; function Matricula() { var toggleModal = function toggleModal() { document.getElementById('matricula-modal').style.display = "none"; }; return React.createElement( "div", { className: "modal" }, React.createElement(ModalUno, { title: "Matricula 2021", body: React.createElement(MatriculaBody, null), footer: "Fundaci\xF3n para la Educaci\xF3n - Ej\xE9rcito de Salvaci\xF3n", close: toggleModal }) ); } var domContainer = document.getElementById('matricula-modal'); ReactDOM.render(React.createElement(Matricula, null), domContainer);
25.302326
664
0.52562
96cd1d071ade14fd4a9f436efa3300d3b9ea93a5
547
js
JavaScript
index.js
charles-owen/review-cl
05ce14266d5d8292300a4252ecdb7ad63eca1eec
[ "MIT" ]
null
null
null
index.js
charles-owen/review-cl
05ce14266d5d8292300a4252ecdb7ad63eca1eec
[ "MIT" ]
null
null
null
index.js
charles-owen/review-cl
05ce14266d5d8292300a4252ecdb7ad63eca1eec
[ "MIT" ]
null
null
null
/* * The main Review system entry point */ import './_review.scss'; import {ReviewConsole} from './js/Console/ReviewConsole'; import ReviewVue from './js/ReviewVue.vue'; import ReviewsVue from './js/ReviewsVue.vue'; // // Install the console components // if(Site.Site.console !== undefined) { ReviewConsole.setup(Site.Site.console); } // // Create the inline and page components // Site.Site.ready(() => { Site.Site.PageVue.create('div.cl-review', 'Review Vue', ReviewVue); Site.Site.InlineVue.create('div.cl-reviews', ReviewsVue); });
23.782609
71
0.703839
96cd3d8b3392c164afd8158c6473a0cbaa786a21
736
js
JavaScript
common/get_process_name.js
FreaxW/frida-repos
3490c18307c9c0f9a7476de66aa8f3ec69ee321f
[ "MIT" ]
4
2021-08-17T02:35:33.000Z
2021-10-22T03:41:38.000Z
common/get_process_name.js
FreaxW/frida-repos
3490c18307c9c0f9a7476de66aa8f3ec69ee321f
[ "MIT" ]
null
null
null
common/get_process_name.js
FreaxW/frida-repos
3490c18307c9c0f9a7476de66aa8f3ec69ee321f
[ "MIT" ]
1
2021-07-05T09:37:48.000Z
2021-07-05T09:37:48.000Z
function get_process_name(){ var openPtr = Module.getExportByName('libc.so', 'open'); var readPtr = Module.getExportByName('libc.so', 'read'); var closePtr = Module.getExportByName('libc.so', 'close'); var open = new NativeFunction(openPtr, 'int', ['pointer', 'int']); var read = new NativeFunction(readPtr, 'int', ['int', 'pointer', 'int']); var close = new NativeFunction(closePtr, 'int', ['int']); var cmdline = Memory.allocUtf8String('/proc/self/cmdline'); var fd = open(cmdline, 0); if (fd != -1){ var buffer = Memory.alloc(0x1000); read(fd, buffer, 0x1000); var result = ptr(buffer).readCString(); return result; }
40.888889
77
0.586957
96cd8db438762f2c0bbea5734f4466d8bae482dc
552
js
JavaScript
backend/Models/Display.js
GadW6/portfolio-vue3
96955f109897a07893d6331d9dcc5a174dbb9c9e
[ "MIT" ]
null
null
null
backend/Models/Display.js
GadW6/portfolio-vue3
96955f109897a07893d6331d9dcc5a174dbb9c9e
[ "MIT" ]
null
null
null
backend/Models/Display.js
GadW6/portfolio-vue3
96955f109897a07893d6331d9dcc5a174dbb9c9e
[ "MIT" ]
null
null
null
const knex = require('../Models/config') class Display { getCategories(){ return knex .select().from('DisplayCats') } getSkills(){ return knex .select().from('DisplaySkills') } async getCatNestedSkills(){ const categories = await this.getCategories() const skills = await this.getSkills() return categories.map(category => { return { ...category, skills: skills.filter(skill => { return skill.catId === category.id }) } }) } } module.exports = Display
18.4
49
0.588768
96ce49297cb56316288ccbe61508109a30976415
292
js
JavaScript
src/reducers/genericReducer.js
papodaca/ReactPlayground
305d9a60789597bfaf020fd473dc951bd9118533
[ "MIT" ]
null
null
null
src/reducers/genericReducer.js
papodaca/ReactPlayground
305d9a60789597bfaf020fd473dc951bd9118533
[ "MIT" ]
null
null
null
src/reducers/genericReducer.js
papodaca/ReactPlayground
305d9a60789597bfaf020fd473dc951bd9118533
[ "MIT" ]
null
null
null
const genericReducer = (handlers, defaultState) => { return (state, action) => { const handler = handlers[action.type]; if(handler) { return handler.call(undefined, state, action); } else { return state || defaultState; } }; }; export default genericReducer;
22.461538
52
0.636986
96ceb66ddbb59e87562fc1c31cff52b42f4c253d
10,560
js
JavaScript
public/common-es5.65f15088a99dd57608a4.js
M-Saleh-Hassan/pharmastore
99aee625165eb2afaac8cc1ea2617e1a546d6b16
[ "MIT" ]
1
2021-11-10T23:04:53.000Z
2021-11-10T23:04:53.000Z
public/common-es5.65f15088a99dd57608a4.js
M-Saleh-Hassan/pharmastore
99aee625165eb2afaac8cc1ea2617e1a546d6b16
[ "MIT" ]
3
2021-02-02T18:47:27.000Z
2021-10-06T17:07:27.000Z
public/common-es5.65f15088a99dd57608a4.js
M-Saleh-Hassan/pharmastore
99aee625165eb2afaac8cc1ea2617e1a546d6b16
[ "MIT" ]
null
null
null
function _classCallCheck(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(n,e){for(var t=0;t<e.length;t++){var i=e[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function _createClass(n,e,t){return e&&_defineProperties(n.prototype,e),t&&_defineProperties(n,t),n}(window.webpackJsonp=window.webpackJsonp||[]).push([[0],{"4Xmu":function(n,e,t){"use strict";t.d(e,"a",(function(){return a}));var i=t("ToIr"),l=t("8Y7J"),a=function(){var n=function(){function n(e){_classCallCheck(this,n),this.connectionService=e}return _createClass(n,[{key:"updateUser",value:function(n){return this.connectionService.put("profile/update",n)}}]),n}();return n.ngInjectableDef=l.jc({factory:function(){return new n(l.kc(i.a))},token:n,providedIn:"root"}),n}()},"KP+3":function(n,e,t){"use strict";t.d(e,"a",(function(){return a}));var i=t("ToIr"),l=t("8Y7J"),a=function(){var n=function(){function n(e){_classCallCheck(this,n),this.connectionService=e}return _createClass(n,[{key:"getCities",value:function(n,e){return this.connectionService.get("admin/cities?page=".concat(n,"&limit=").concat(e))}},{key:"createCity",value:function(n){return this.connectionService.post("admin/cities",n)}},{key:"updateCity",value:function(n,e){return this.connectionService.put("admin/cities/".concat(n),e)}},{key:"deleteCity",value:function(n){return this.connectionService.delete("admin/cities/".concat(n))}},{key:"getAreas",value:function(n,e){return this.connectionService.get("admin/areas?page=".concat(n,"&limit=").concat(e))}},{key:"createArea",value:function(n){return this.connectionService.post("admin/areas",n)}},{key:"updateArea",value:function(n,e){return this.connectionService.put("admin/areas/".concat(n),e)}},{key:"deleteArea",value:function(n){return this.connectionService.delete("admin/areas/".concat(n))}},{key:"getCityAreas",value:function(n,e,t){return this.connectionService.get("store/cities/".concat(n,"/areas?page=").concat(e,"&limit=").concat(t))}}]),n}();return n.ngInjectableDef=l.jc({factory:function(){return new n(l.kc(i.a))},token:n,providedIn:"root"}),n}()},Kka8:function(n,e,t){"use strict";t.r(e);var i=t("8Y7J"),l=function n(){_classCallCheck(this,n)},a=t("pMnS"),r=t("iInd"),c=function(){function n(){_classCallCheck(this,n)}return _createClass(n,[{key:"ngOnInit",value:function(){}}]),n}(),s=i.Hb({encapsulation:2,styles:[],data:{}});function u(n){return i.fc(0,[(n()(),i.Jb(0,16777216,null,null,1,"router-outlet",[],null,null,null,null,null)),i.Ib(1,212992,null,0,r.q,[r.b,i.fb,i.m,[8,null],i.j],null,null)],(function(n,e){n(e,1,0)}),null)}var o,b=i.Fb("ngx-stats",c,(function(n){return i.fc(0,[(n()(),i.Jb(0,0,null,null,1,"ngx-stats",[],null,null,null,u,s)),i.Ib(1,114688,null,0,c,[],null,null)],(function(n,e){n(e,1,0)}),null)}),{},{},[]),d=t("jXVt"),f=t("tKwJ"),h=t("CcMi"),m=t("DjsD"),p=t("u50V"),g=t("vCDP"),v=t("4Esg"),T=t("ToIr"),y=((o=function(){function n(e,t){_classCallCheck(this,n),this.connectionService=e,this.userService=t}return _createClass(n,[{key:"getTopItems",value:function(n){return this.connectionService.get("".concat(this.userService.currentUser.role,"/items/top100?order_by=").concat(n))}}]),n}()).ngInjectableDef=i.jc({factory:function(){return new o(i.kc(T.a),i.kc(p.a))},token:o,providedIn:"root"}),o),S=function(){function n(e,t,i,l,a){_classCallCheck(this,n),this.statsService=e,this.router=t,this.helperService=i,this.pharmacyService=l,this.userService=a,this.source=new m.a,this.itemsList=[]}return _createClass(n,[{key:"ngOnInit",value:function(){this.getpageType(),this.getTopItems(),this.setTable()}},{key:"getpageType",value:function(){this.orderType=this.router.url.includes("searchs")?"search":"discount"}},{key:"getTopItems",value:function(){var n=this;this.isLoading=!0,this.statsService.getTopItems(this.orderType).subscribe((function(e){e.data&&(n.itemsList=e.data,n.itemsList.forEach((function(e){e.branchName=e.branch.name,e.storeName=e.store.name,e.storeId=e.store.id,e.name_ar="en"===n.lang?e.name_en:e.name_ar,e.cityName="en"===n.lang?e.city.name_en:e.city.name_ar,e.area_name_ar="en"===n.lang?e.city.area_name_en:e.city.area_name_ar})),n.isLoading=!1,n.source.load(n.itemsList))}))}},{key:"setTable",value:function(){this.lang=localStorage.getItem("lang"),this.tableSettings={pager:{perPage:20},edit:{editButtonContent:'<i class="nb-e-commerce"></i>',saveButtonContent:'<i class="nb-checkmark"></i>',cancelButtonContent:'<i class="nb-close"></i>',confirmSave:!0},actions:{columnTitle:"ar"===this.lang?"\u0645\u0641\u0627\u062a\u064a\u062d":"Actions",add:!1,delete:!1,position:"right"},noDataMessage:"ar"===this.lang?"\u0644\u0645 \u0646\u062c\u062f \u0628\u064a\u0627\u0646\u0627\u062a":"No data found",columns:{name_ar:{title:"ar"===this.lang?"\u0627\u0644\u0627\u0633\u0645":"Name",sort:!1,filter:!1,editable:!1},basic_price:{title:"ar"===this.lang?"\u0627\u0644\u0633\u0639\u0631":"Price",sort:!1,filter:!1,editable:!1},discount:{title:"ar"===this.lang?"\u0627\u0644\u062e\u0635\u0645":"Discount",sort:!1,filter:!1,editable:!1},storeName:{title:"ar"===this.lang?"\u0627\u0644\u0645\u0648\u0632\u0639":"Store",sort:!1,filter:!1,editable:!1,type:"html",valuePrepareFunction:function(n,e){return'<a target="_blank" href="'+window.location.origin+"/pharmacy/stores/"+e.storeId+'">'+n+"</a>"}},branchName:{title:"ar"===this.lang?"\u0627\u0644\u0641\u0631\u0639":"Branch",sort:!1,filter:!1,editable:!1},area_name_ar:{title:"ar"===this.lang?"\u0627\u0644\u0645\u0646\u0637\u0642\u0629":"Area",sort:!1,filter:!1,editable:!1},cityName:{title:"ar"===this.lang?"\u0627\u0644\u0645\u062f\u064a\u0646\u0629":"City",sort:!1,filter:!1,editable:!1}}};var n=this.userService.currentUser.role;"admin"===n?this.tableSettings.actions.edit=!1:"pharmacy"===n&&(this.tableSettings.columns.selectedQuantity={title:"ar"===this.lang?"\u0627\u0644\u0643\u0645\u064a\u0629":"Quantity",sort:!1,filter:!1,editor:{type:"text"}})}},{key:"buy",value:function(n){var e=this,t=n.newData;isNaN(t.selectedQuantity)?this.helperService.showTranslatedToast("warning","","Numbers Only"):this.pharmacyService.addToCart({quantity:t.selectedQuantity,item_id:t.id}).subscribe((function(t){n.confirm.resolve(n.data),e.helperService.showTranslatedToast("success","","Item added to cart")}))}}]),n}(),k=i.Hb({encapsulation:0,styles:[[""]],data:{}});function C(n){return i.fc(0,[(n()(),i.Jb(0,0,null,null,11,"nb-card",[],[[2,"size-tiny",null],[2,"size-small",null],[2,"size-medium",null],[2,"size-large",null],[2,"size-giant",null],[2,"status-primary",null],[2,"status-info",null],[2,"status-success",null],[2,"status-warning",null],[2,"status-danger",null],[2,"accent",null],[2,"accent-primary",null],[2,"accent-info",null],[2,"accent-success",null],[2,"accent-warning",null],[2,"accent-danger",null]],null,null,d.J,d.s)),i.Ib(1,49152,null,0,f.jb,[],null,null),(n()(),i.Jb(2,0,null,2,9,"div",[["class","p-lg-5 p-3"]],null,null,null,null,null)),(n()(),i.Jb(3,16777216,null,null,8,"div",[["nbSpinnerSize","giant"],["nbSpinnerStatus","primary"]],[[2,"nb-spinner-container",null]],null,null,null,null)),i.Ib(4,81920,null,0,f.qd,[i.fb,i.m,i.Q,i.q],{spinnerStatus:[0,"spinnerStatus"],spinnerSize:[1,"spinnerSize"],nbSpinner:[2,"nbSpinner"]},null),(n()(),i.Jb(5,0,null,null,6,"nb-card-body",[],null,null,null,d.I,d.r)),i.Ib(6,49152,null,0,f.ib,[],null,null),(n()(),i.Jb(7,0,null,0,4,"div",[["class","container-fluid"]],null,null,null,null,null)),(n()(),i.Jb(8,0,null,null,3,"div",[["class","row"]],null,null,null,null,null)),(n()(),i.Jb(9,0,null,null,2,"div",[["class","col-12 overflow-auto"]],null,null,null,null,null)),(n()(),i.Jb(10,0,null,null,1,"ng2-smart-table",[],null,[[null,"editConfirm"]],(function(n,e,t){var i=!0;return"editConfirm"===e&&(i=!1!==n.component.buy(t)&&i),i}),h.b,h.a)),i.Ib(11,573440,null,0,m.s,[],{source:[0,"source"],settings:[1,"settings"]},{editConfirm:"editConfirm"})],(function(n,e){var t=e.component;n(e,4,0,"primary","giant",t.isLoading),n(e,11,0,t.source,t.tableSettings)}),(function(n,e){n(e,0,1,[i.Vb(e,1).tiny,i.Vb(e,1).small,i.Vb(e,1).medium,i.Vb(e,1).large,i.Vb(e,1).giant,i.Vb(e,1).primary,i.Vb(e,1).info,i.Vb(e,1).success,i.Vb(e,1).warning,i.Vb(e,1).danger,i.Vb(e,1).hasAccent,i.Vb(e,1).primaryAccent,i.Vb(e,1).infoAccent,i.Vb(e,1).successAccent,i.Vb(e,1).warningAccent,i.Vb(e,1).dangerAccent]),n(e,3,0,i.Vb(e,4).isSpinnerExist)}))}var _=i.Fb("ngx-top-items",S,(function(n){return i.fc(0,[(n()(),i.Jb(0,0,null,null,1,"ngx-top-items",[],null,null,null,C,k)),i.Ib(1,114688,null,0,S,[y,r.l,v.a,g.a,p.a],null,null)],(function(n,e){n(e,1,0)}),null)}),{},{},[]),I=t("SVse"),w=t("s7LF"),V=t("TYxm"),J=t("IheW"),j=t("TSSN"),N=t("YlHY"),A=t("QQfA"),D=t("IP0z"),z=function n(){_classCallCheck(this,n)},L=t("zMNK"),P=t("/HVE"),x=t("hOhj");t.d(e,"StatsModuleNgFactory",(function(){return M}));var M=i.Gb(l,[],(function(n){return i.Sb([i.Tb(512,i.m,i.rb,[[8,[a.a,b,_,d.k]],[3,i.m],i.H]),i.Tb(4608,I.n,I.m,[i.D,[2,I.G]]),i.Tb(4608,w.y,w.y,[]),i.Tb(4608,w.f,w.f,[]),i.Tb(4608,V.i,V.i,[]),i.Tb(4608,V.k,V.k,[J.c]),i.Tb(4608,V.c,V.c,[V.i,V.k]),i.Tb(5120,j.g,N.a,[J.c]),i.Tb(4608,j.d,j.f,[]),i.Tb(4608,j.i,j.e,[]),i.Tb(4608,j.c,j.b,[]),i.Tb(4608,j.k,j.k,[j.l,j.g,j.d,j.i,j.c,j.m,j.o,j.n,j.a]),i.Tb(4608,A.d,A.d,[A.i,A.e,i.m,A.h,A.f,i.z,i.J,I.c,D.b,[2,I.h]]),i.Tb(5120,A.j,A.k,[A.d]),i.Tb(1073742336,I.b,I.b,[]),i.Tb(1073742336,r.p,r.p,[[2,r.u],[2,r.l]]),i.Tb(1073742336,z,z,[]),i.Tb(1073742336,w.x,w.x,[]),i.Tb(1073742336,w.i,w.i,[]),i.Tb(1073742336,f.ke,f.ke,[]),i.Tb(1073742336,f.bc,f.bc,[f.ac]),i.Tb(1073742336,f.nb,f.nb,[]),i.Tb(1073742336,w.t,w.t,[]),i.Tb(1073742336,V.j,V.j,[]),i.Tb(1073742336,m.c,m.c,[]),i.Tb(1073742336,m.D,m.D,[]),i.Tb(1073742336,m.L,m.L,[]),i.Tb(1073742336,m.N,m.N,[]),i.Tb(1073742336,m.h,m.h,[]),i.Tb(1073742336,m.b,m.b,[]),i.Tb(1073742336,j.h,j.h,[]),i.Tb(1073742336,N.b,N.b,[]),i.Tb(1073742336,f.dc,f.dc,[]),i.Tb(1073742336,D.a,D.a,[]),i.Tb(1073742336,L.f,L.f,[]),i.Tb(1073742336,P.b,P.b,[]),i.Tb(1073742336,x.b,x.b,[]),i.Tb(1073742336,A.g,A.g,[]),i.Tb(1073742336,f.pb,f.pb,[]),i.Tb(1073742336,f.ob,f.ob,[]),i.Tb(1073742336,f.Cc,f.Cc,[]),i.Tb(1073742336,f.M,f.M,[]),i.Tb(1073742336,f.Bb,f.Bb,[]),i.Tb(1073742336,f.gd,f.gd,[]),i.Tb(1073742336,f.rd,f.rd,[]),i.Tb(1073742336,l,l,[]),i.Tb(1024,r.j,(function(){return[[{path:"",component:c,children:[{path:"",pathMatch:"full",redirectTo:"top-searchs"},{path:"top-searchs",component:S},{path:"top-discount",component:S}]}]]}),[]),i.Tb(256,j.o,!1,[]),i.Tb(256,j.m,void 0,[]),i.Tb(256,j.n,void 0,[]),i.Tb(256,j.a,void 0,[])])}))}}]);
10,560
10,560
0.677462
96d0194e0a39b9220c53752e3b020a1705c665a8
385
js
JavaScript
src/store/modules/topics/replies/index.js
Cintia-Teixeira/PlataformaCultural
998c345bf7e0f067b06831cf175346493b7120b3
[ "MIT" ]
3
2021-03-07T00:09:53.000Z
2021-06-10T19:40:12.000Z
src/store/modules/topics/replies/index.js
Cintia-Teixeira/PlataformaCultural
998c345bf7e0f067b06831cf175346493b7120b3
[ "MIT" ]
21
2021-05-25T23:52:50.000Z
2022-02-28T02:18:38.000Z
src/store/modules/topics/replies/index.js
Cintia-Teixeira/PlataformaCultural
998c345bf7e0f067b06831cf175346493b7120b3
[ "MIT" ]
2
2021-06-08T22:46:23.000Z
2021-08-18T09:56:44.000Z
import STATE from './state'; import ACTIONS from './actions'; import MUTATIONS from './mutations'; import GETTERS from './getters'; import LIKES from './likes'; import REJOINDERS from './rejoinders'; export default { namespaced: true, state: STATE, actions: ACTIONS, mutations: MUTATIONS, getters: GETTERS, modules: { rejoinders: REJOINDERS, likes: LIKES, }, };
20.263158
38
0.690909
96d0b0cf277630c894fbc7d023464eca36686fcb
2,918
js
JavaScript
public/js/script.js
hexie2108/video-thumbnail-grabber
be834a5d002429eb7185465397b52b72f9daf188
[ "MIT" ]
null
null
null
public/js/script.js
hexie2108/video-thumbnail-grabber
be834a5d002429eb7185465397b52b72f9daf188
[ "MIT" ]
null
null
null
public/js/script.js
hexie2108/video-thumbnail-grabber
be834a5d002429eb7185465397b52b72f9daf188
[ "MIT" ]
null
null
null
//实时物流查询api地址 const API_URL = "/thumbnail-grabber"; //页面切换动画时间 (毫秒) const ANIMATION_SPEED = 500; const VIDEO_TYPE = { bilibili: 'bilibili', youtube: 'youtube', } $(function () { $("form#grabber").on('submit', function (event) { event.preventDefault(); let $inputElement = $("input#video"); let videoType = $('input[name="video_type"]:checked').val(); let videoId = $inputElement.val().trim(); // case bilibili link if (videoType == VIDEO_TYPE.bilibili) { videoId = videoId.split("/").pop(); } //case youtube else{ if(videoId.includes('watch?v=')){ videoId = videoId.split('watch?v=').pop(); } else if(videoId.includes('/?v=')){ videoId = videoId.split('/?v=').pop(); } else{ videoId = videoId.split("/").pop(); } } //remove character after id videoId = videoId.split("?")[0]; videoId = videoId.split("#")[0]; videoId = videoId.split("&")[0]; //remove end "/" videoId = videoId.replace(/\/$/, ''); //update value $inputElement.val(videoId); //remove invalid class $inputElement.removeClass('is-invalid'); if (!videoId) { $('form #video').addClass('is-invalid'); $('form .invalid-feedback').html('错误: video id is null'); return; } videoId = videoId.split("/").pop(); sendRequest(videoId, videoType); }); }) function sendRequest(video_id, video_type) { //show loading icon $('.loading').fadeIn(ANIMATION_SPEED); let successCallback = function (response) { setElement(response); }; let failCallback = function (jqXHR) { let errorResponse = {}; try { errorResponse = JSON.parse(jqXHR.responseText); } catch (exception) { errorResponse.error = 'unknown'; } console.log(errorResponse.error); $('form #video').addClass('is-invalid'); $('form .invalid-feedback').html('错误:' + errorResponse.error); } //hide loading ico let alwaysCallback = function () { $('.loading').fadeOut(ANIMATION_SPEED); } queryData = { video_id, video_type } $.getJSON(API_URL, queryData).done(successCallback).fail(failCallback).always(alwaysCallback); } /** * * @param response {object} 单个物流信息查询结果 */ function setElement(response) { let $listElement = $('.result'); //empty current content $listElement.empty(); let $element = $('.clone.img-item').clone().removeClass('.clone'); $element.find("img").attr('src', response.images.shift()); $listElement.append($element); $element.fadeIn(ANIMATION_SPEED); }
19.583893
98
0.53804
96d357e73430dcfc0a599d11acc1251f5595a0b2
276
js
JavaScript
extensions/shoutem.places/app/const.js
mrbrackins/testt
d581857000c0b6c77e1a1618a6800a7c05d3ed5a
[ "BSD-3-Clause" ]
243
2017-01-20T13:54:49.000Z
2022-01-02T16:41:34.000Z
extensions/shoutem.places/app/const.js
mrbrackins/testt
d581857000c0b6c77e1a1618a6800a7c05d3ed5a
[ "BSD-3-Clause" ]
28
2017-01-30T20:08:28.000Z
2022-03-02T09:07:38.000Z
extensions/shoutem.places/app/const.js
mrbrackins/testt
d581857000c0b6c77e1a1618a6800a7c05d3ed5a
[ "BSD-3-Clause" ]
93
2017-01-31T13:53:50.000Z
2021-08-18T10:28:06.000Z
// This file is auto-generated. import pack from './package.json'; export function ext(resourceName) { return resourceName ? `${pack.name}.${resourceName}` : pack.name; } export const PLACES_SCHEMA = ext('places'); export const PLACE_DETAILS_SCREEN = ext('PlaceDetails');
27.6
67
0.731884
96d47f450d0730237b45d9b31ce75630675531e5
630
js
JavaScript
src/components/Sidebar.js
jsdevelopment-tech/JSmusic-gatsby
f17422934baeaf84fecd6b4f6dc6e21527abb099
[ "MIT" ]
1
2020-09-10T21:48:40.000Z
2020-09-10T21:48:40.000Z
src/components/Sidebar.js
jsdevelopment-tech/JSmusic-gatsby
f17422934baeaf84fecd6b4f6dc6e21527abb099
[ "MIT" ]
4
2021-09-02T09:14:53.000Z
2022-02-27T07:34:25.000Z
src/components/Sidebar.js
JimSadler/JSmusic-gatsby
f17422934baeaf84fecd6b4f6dc6e21527abb099
[ "MIT" ]
null
null
null
import React from "react"; import { slide as Menu } from "react-burger-menu"; import { Link } from "gatsby" import DarkModeToggle from './UseDarkMode.js'; export default props => { return ( // Pass on our props <Menu {...props}> <Link className="menu-item" to="/jimbio">Bio</Link> <Link className="menu-item" to="/sounds">Sounds</Link> <Link className="menu-item" to="/lessons">Lessons</Link> <Link className="menu-item" to="/testimonials">Testimonials</Link> <Link className="menu-item" to="/contact-us">Contact</Link> <DarkModeToggle className="menu-item" /> </Menu> ); };
30
72
0.642857
96d50c3c219d79851fb75b6075d200fa88959b5f
541
js
JavaScript
vidly/startup/db.js
Mtsmachado8/nodeJsProjects
08fe69f497c584e01f47935e9ec9015b7410ab75
[ "MIT" ]
null
null
null
vidly/startup/db.js
Mtsmachado8/nodeJsProjects
08fe69f497c584e01f47935e9ec9015b7410ab75
[ "MIT" ]
9
2020-09-04T14:51:41.000Z
2021-05-08T00:24:01.000Z
vidly/startup/db.js
mtsmachado8/nodeJsProjects
08fe69f497c584e01f47935e9ec9015b7410ab75
[ "MIT" ]
null
null
null
const log = require('winston'); const mongoose = require('mongoose'); const config = require('config'); module.exports = function(){ mongoose.set('useCreateIndex', true); // To avoid a deprecated warning: collection.ensureIndex mongoose.set('useNewUrlParser', true); // To avoid a deprecated warning: URL string parser mongoose.set('useFindAndModify', false); // To avoid a deprecated warning: collection.findAndModify const path = config.get('db'); mongoose.connect(path) .then(() => log.info(`Connected to MongoDB on ${path}`)) };
41.615385
100
0.728281
96d53d02a2d2d36dfa6a89fd573ab37f474676e8
1,157
js
JavaScript
webpack.config.js
RobinDev/bootstrap-cookie-consent
e13427789b3f8faf50ef783b6910bcf288ef08e7
[ "MIT" ]
null
null
null
webpack.config.js
RobinDev/bootstrap-cookie-consent
e13427789b3f8faf50ef783b6910bcf288ef08e7
[ "MIT" ]
null
null
null
webpack.config.js
RobinDev/bootstrap-cookie-consent
e13427789b3f8faf50ef783b6910bcf288ef08e7
[ "MIT" ]
null
null
null
require('webpack'); var path = require('path'); var MinifyPlugin = require("babel-minify-webpack-plugin"); var config = { entry: './src/BootstrapCookieConsent.js', // entry: { // index: './src/BootstrapCookieConsent.js', // cookieconsentapi: './node_modules/cookie-consent-api/src/index.js' // }, output: { library: 'BootstrapCookieConsent', libraryTarget: 'umd', libraryExport: 'default', path: path.resolve(__dirname, 'dist'), filename: 'bootstrap-cookie-consent.js' }, module: { rules: [ { test: /\.js$/, exclude: /node_modules\/(?![js\-cookie])/, use: ['babel-loader'] } ] }, }; var devConfig = Object.assign({}, config, { mode: 'development', output: Object.assign({}, config.output, { filename: 'bootstrap-cookie-consent.dev.js' }), devServer: { contentBase: path.join(__dirname, 'dist'), open: true, openPage: 'demo.html', port: 3000 }, }); // Return Array of Configurations module.exports = [ devConfig ];
23.612245
77
0.545376
96d57af80c6c1f80386f7e9f47435aaaa157b7ed
4,036
js
JavaScript
tests/price-feeds/PriceFeedsLocal.js
jamescheuk91/Sovryn-smart-contracts
4fe65cf7c54e8b0ead792ff11aad6f3439edabe2
[ "Apache-2.0" ]
null
null
null
tests/price-feeds/PriceFeedsLocal.js
jamescheuk91/Sovryn-smart-contracts
4fe65cf7c54e8b0ead792ff11aad6f3439edabe2
[ "Apache-2.0" ]
null
null
null
tests/price-feeds/PriceFeedsLocal.js
jamescheuk91/Sovryn-smart-contracts
4fe65cf7c54e8b0ead792ff11aad6f3439edabe2
[ "Apache-2.0" ]
null
null
null
/** Created on branch improveTestCoverage, 2021-10-19 * to test the contract feeds/testnet/PriceFeedsLocal.sol */ const { BN, constants, expectEvent, expectRevert } = require("@openzeppelin/test-helpers"); const { expect, waffle } = require("hardhat"); const { loadFixture } = waffle; const TestToken = artifacts.require("TestToken"); const PriceFeedsLocal = artifacts.require("PriceFeedsLocal"); const { getSUSD, getRBTC, getWRBTC, getBZRX, getLoanTokenLogic, getLoanToken, getLoanTokenLogicWrbtc, getLoanTokenWRBTC, loan_pool_setup, set_demand_curve, getPriceFeeds, getSovryn, decodeLogs, getSOV, } = require("../Utils/initializer.js"); contract("Affiliates", (accounts) => { let WRBTC; let doc; let SUSD; let sovryn; let feeds; let wei = web3.utils.toWei; async function deploymentAndInitFixture(_wallets, _provider) { // Deploying sovrynProtocol w/ generic function from initializer.js SUSD = await getSUSD(); RBTC = await getRBTC(); WRBTC = await getWRBTC(); BZRX = await getBZRX(); priceFeeds = await getPriceFeeds(WRBTC, SUSD, RBTC, BZRX); sovryn = await getSovryn(WRBTC, SUSD, RBTC, priceFeeds); // Protocol token SOV = await getSOV(sovryn, priceFeeds, SUSD, accounts); // Another token doc = await TestToken.new("dollar on chain", "DOC", 18, wei("20000", "ether")); // New PriceFeeds feeds = await PriceFeedsLocal.new(WRBTC.address, SOV.address); await feeds.setRates(doc.address, WRBTC.address, wei("0.01", "ether")); } before(async () => { [owner, trader, referrer, account1, account2, ...accounts] = accounts; }); beforeEach(async () => { await loadFixture(deploymentAndInitFixture); }); /// @dev Test coverage of PriceFeedsLocal describe("PriceFeedsLocal", () => { let testToken1, testToken2; before(async () => { testToken1 = await TestToken.new("test token 1", "TEST1", 18, wei("20000", "ether")); testToken2 = await TestToken.new("test token 2", "TEST2", 16, wei("20000", "ether")); }); it("PriceFeedsLocal::setGlobalPricingPaused test", async () => { await feeds.setGlobalPricingPaused(true); await expect( await feeds.queryReturn(testToken1.address, testToken2.address, new BN(wei("100", "ether"))) ).to.be.bignumber.equal(new BN(wei("0", "ether"))); }); it("PriceFeedsLocal::queryRate should fail when paused", async () => { await feeds.setGlobalPricingPaused(true); await expectRevert(feeds.queryRate(doc.address, doc.address), "pricing is paused"); }); it("PriceFeedsLocal::setRates when sourceToken==destToken", async () => { // Check rate before setting let doc2doc = await feeds.queryRate(doc.address, doc.address); expect(doc2doc[0]).to.be.bignumber.equal(new BN(wei("1", "ether"))); // Trying to set a new rate for doc/doc change; it doesn't revert, just ignores it. await feeds.setRates(doc.address, doc.address, wei("0.01", "ether")); // Check rate after setting, it shouldn't have changed even though we tried to doc2doc = await feeds.queryRate(doc.address, doc.address); expect(doc2doc[0]).to.be.bignumber.equal(new BN(wei("1", "ether"))); }); it("PriceFeedsLocal::queryRate when sourceToken or destToken == protocolTokenAddress", async () => { // Set protocol token price await feeds.setProtocolTokenEthPrice(wei("1234", "ether")); expect(await feeds.protocolTokenEthPrice()).to.be.bignumber.equal(new BN(wei("1234", "ether"))); // Check rate when sourceToken == protocolTokenAddress // Rate should be exactly the one previously defined w/ setProtocolTokenEthPrice() method let rate = await feeds.queryRate(SOV.address, doc.address); expect(rate[0]).to.be.bignumber.equal(new BN(wei("1234", "ether"))); // Check rate when destToken == protocolTokenAddress // Rate should be the inverse of the previously defined w/ setProtocolTokenEthPrice() method rate = await feeds.queryRate(doc.address, SOV.address); expect(rate[0]).to.be.bignumber.equal(new BN(10).pow(new BN(36)).div(new BN(wei("1234", "ether")))); }); }); });
34.793103
103
0.701933
96d594adec3a5345ffa43817aaf093bf05ce6cdb
131
js
JavaScript
stories/index.stories.js
f-jauregui/sencil-storybook
8f20d1e9b8af789bddeb4a601fc9ee85c3a25671
[ "MIT" ]
null
null
null
stories/index.stories.js
f-jauregui/sencil-storybook
8f20d1e9b8af789bddeb4a601fc9ee85c3a25671
[ "MIT" ]
null
null
null
stories/index.stories.js
f-jauregui/sencil-storybook
8f20d1e9b8af789bddeb4a601fc9ee85c3a25671
[ "MIT" ]
null
null
null
export default { title: 'Components', }; export const MyButton = () => { return `<my-button type="primary" ></my-button>`; };
16.375
51
0.610687
96d6b28d21c11e8949655705b3c61f0a6d45b11d
158
js
JavaScript
source/elements/card.js
javascribble/quantum-card
422ec9a01f6f9230ee09ec59272c6038e1e47a40
[ "MIT" ]
null
null
null
source/elements/card.js
javascribble/quantum-card
422ec9a01f6f9230ee09ec59272c6038e1e47a40
[ "MIT" ]
null
null
null
source/elements/card.js
javascribble/quantum-card
422ec9a01f6f9230ee09ec59272c6038e1e47a40
[ "MIT" ]
null
null
null
import card from '../templates/card.js'; export class Card extends Quantum { constructor() { super(); } } Card.define('quantum-card', card);
17.555556
40
0.626582
96d6b5d67e66fda5e01cbb71d0798cfc2c7fb946
340
js
JavaScript
server/portal/auth/login-page.js
gruberjl/gitbit
17315c23266f2bcc907ead54e7fb85e6a9d6f664
[ "Apache-2.0" ]
null
null
null
server/portal/auth/login-page.js
gruberjl/gitbit
17315c23266f2bcc907ead54e7fb85e6a9d6f664
[ "Apache-2.0" ]
25
2019-03-22T19:36:51.000Z
2019-05-19T16:40:05.000Z
server/portal/auth/login-page.js
gruberjl/gitbit
17315c23266f2bcc907ead54e7fb85e6a9d6f664
[ "Apache-2.0" ]
null
null
null
const fs = require('fs') const {join} = require('path') const {compile} = require('../../www/lib/hbs') const source = fs.readFileSync(join(__dirname, 'login.hbs'), 'utf8') const template = compile(source) const loginPage = async (req, res) => { const html = await template({}) res.send(html) } module.exports = {loginPage, template}
24.285714
68
0.670588
96d763b0500c1f0efe543e939c43c9689096d05d
7,893
js
JavaScript
sigrie/sigrie/static/js/global.js
jleclanche/pywow
d0bebff446510d1b241c775807f5164d084e53f9
[ "CC0-1.0" ]
6
2015-05-17T18:12:59.000Z
2018-11-02T12:55:39.000Z
sigrie/sigrie/static/js/global.js
jleclanche/pywow
d0bebff446510d1b241c775807f5164d084e53f9
[ "CC0-1.0" ]
null
null
null
sigrie/sigrie/static/js/global.js
jleclanche/pywow
d0bebff446510d1b241c775807f5164d084e53f9
[ "CC0-1.0" ]
1
2018-06-26T08:54:03.000Z
2018-06-26T08:54:03.000Z
var onloads = [] var tabQueue = [] function toggle(a, b) { if(a) document.getElementById(a).style.display = document.getElementById(a).style.display == "none" ? "block" : "none" if(b) document.getElementById(b).style.display = document.getElementById(b).style.display == "none" ? "block" : "none" } function trim(str) { var str = str.replace(/^\s\s*/, '') var i = str.length while (/\s/.test(str.charAt(--i))); return str.slice(0, i + 1) } function addLoadEvent(func) { onloads.push(func) } function triggerLoadEvents() { for (var i = 0; i < onloads.length; i++) { onloads[i]() } var search = document.getElementById('searchbar') if ((typeof(search) != 'undefined') && (search != null)) { search.onfocus = search.onblur = function() { if (this.value.length == 0) { addClass(this, 'emptytext') } else { removeClass(this, 'emptytext') } } search.onblur() } } function hasClass(object, cls) { var classes = object.className.split(" ") for (var i = 0; i < classes.length; i++) { if (cls == classes[i]) return true; } return false } function addClass(object, cls) { var classes = object.className.split(" ") for (var i = 0; i < classes.length; i++) { if (cls == classes[i]) return; } classes.push(cls) var className = "" for (i = 0; i < classes.length; i++) { className = className + " " + classes[i] } object.className = className.replace(/^\s\s*/, '').replace(/\s\s*$/, '') } function removeClass(object, cls) { var classes = object.className.split(" ") var className = "" for (i = 0; i < classes.length; i++) { if (cls == classes[i]) continue; className = className + " " + classes[i] } object.className = className.replace(/^\s\s*/, '').replace(/\s\s*$/, '') } function addTab(id, name) { tabQueue.push({'id': id, 'name': name}) } function initTabs() { var tabTarget = document.getElementById("dview-content") var tabBar = document.createElement("div") var tabView = document.createElement("div") tabView.appendChild(tabBar) tabTarget.appendChild(tabView) addClass(tabView, "tabview") tabView.style.clear = "right" while(tabQueue.length > 0) { var cur = tabQueue.pop() var tab = document.createElement("div") var content = document.createElement("div") var table = document.createElement("table") var pageTop = document.createElement("div") var pageBottom = document.createElement("div") addClass(tab, "tabbutton") tab.id = "tab_" + cur.id tab.textContent = tab.innerText = cur.name addClass(content, "tabcontent") addClass(content, "tableview-container") content.id = "tab_" + cur.id + "_content" content.style.display = "none" addClass(table, "sorttable") table.setAttribute("name", cur.id) table.setAttribute("template", "template_"+cur.id) // XXX shouldn't need prefix addClass(pageTop, "tableview-pagewidget") addClass(pageBottom, "tableview-pagewidget") if (tabBar.childNodes.length > 0) { tabBar.insertBefore(tab, tabBar.firstChild) } else { tabBar.appendChild(tab) } tabView.appendChild(content) content.appendChild(table) } } function showLinkString(color, linkString, content) { var s = "/script print('Shift click to link:', '\\124c" + color + "\\124H" + linkString + "\\124h[" + content + "]\\124h\\124r')" prompt("Copy the following in game.", s) // \nOr try the addon! http://sigrie.com/about/findit } function showLinkRaw(text) { var s = "/script _=" + text + ";print('Shift click to link:', _)" prompt("Copy the following in game.", s) // \nOr try the addon! http://sigrie.com/about/findit } function getOffsetTop(element, stopElement) { var top = element.offsetTop while ((typeof(element.offsetParent) == "object") && (element.offsetParent != null) && (element.offsetParent != stopElement)) { element = element.offsetParent if (typeof(element.offsetTop) == "number") top += element.offsetTop } return top } function getOffsetLeft(element, stopElement) { var left = element.offsetLeft while ((typeof(element.offsetParent) == "object") && (element.offsetParent != null) && (element.offsetParent != stopElement)) { element = element.offsetParent if (typeof(element.offsetTop) == "number") left += element.offsetLeft } return left } function setImageSrc(img, url) { if (img.src == url) return false; img.src = url } function URL(inputURL) { var DEFAULT_HTTP_PORT = 80 this.query = {} this.hash = {} this.url = {} this.validateType = function(type, name) { if ((type != "query") && (type != "hash") && (type != "url")) throw new Error("Unknown type '" + type + "' in call to URL." + name + "()"); } this.setKey = function(type, key, value) { this.validateType(type, "setKey") this[type][key] = value } this.getKey = function(type, key, def) { this.validateType(type, "getKey") if (typeof(this[type][key]) != "undefined") return this[type][key]; if (typeof(def) != "undefined") return def; return false } this.merge = function(type, values) { this.validateType(type, "merge") for (var key in values) { this.setKey(type, key, values[key]) } } this.remove = function(type, key) { this.validateType(type, "remove") delete this[type][key] } this.clear = function(type) { this.validateType(type, "clear") this[type] = {} } this.set = function(type, values) { this.validateType(type, "set") this.clear(type) this.merge(type, values) } this.serialize = function(query) { var result = "" for (var key in query) { if (result.length > 0) result += "&"; result += encodeURIComponent(key) var value = encodeURIComponent(query[key]) if (value.length > 0) result += "=" + value; } return result } this.unserialize = function(input) { var result = {} var match while (match = input.match(/(?:^|&|;)([^&=;]+)(?:=([^&=;]*))?/)) { input = input.substr(match[0].length) var value = match[2] if (typeof(value) == "undefined") value = ""; result[decodeURIComponent(match[1])] = decodeURIComponent(value).replace(/\+/g, ' ') } return result } this.parseURL = function(url) { // 1-SCHEME 2-HOST 3-PORT 4-PATH 5-QUERY 6-HASH // ----- ------------- ----- ----- ----- ---- var match = url.match(/^(?:(\w+):\/*([\w\.\-\d]+)(?::(\d+)|)(?=(?:\/|$))|)(?:$|\/?(.*?)(?:\?(.*?)?|)(?:#(.*)|)$)/) if (!match) return; if ((typeof(match[1]) == "string") && (match[1].length > 0)) { this.setKey("url", "scheme", match[1]) this.setKey("url", "host", match[2]) if (isNaN(parseInt(match[3]))) { this.setKey("url", "port", DEFAULT_HTTP_PORT) } else { this.setKey("url", "port", parseInt(match[3])) } } else { this.setKey("url", "scheme", currentURL.url.scheme) this.setKey("url", "host", currentURL.url.host) this.setKey("url", "port", currentURL.url.port) } this.setKey("url", "path", match[4]) if (typeof(match[5]) == "string") this.set("query", this.unserialize(match[5])); if (typeof(match[6]) == "string") this.set("hash", this.unserialize(match[6])); } this.toString = function() { if ((typeof(this.url.scheme) != "string") || (this.url.scheme.length < 1)) this.url.scheme = "http"; if ((typeof(this.url.host) != "string") || (this.url.host.length < 1)) return ""; if (typeof(this.url.path) != "string") this.url.path = ""; var port = (this.url.port == DEFAULT_HTTP_PORT) ? ("") : (":" + this.url.port) var query = this.serialize(this.query) var hash = this.serialize(this.hash) var result = this.url.scheme + "://" + this.url.host + port + "/" + this.url.path if (query.length > 0) result += "?" + query; if (hash.length > 0) result += "#" + hash; return result; } if (inputURL.length > 0) this.parseURL(inputURL); } currentURL = new URL(document.location.href)
28.701818
141
0.617889
96d88859e590c98c849101cd5d279a78922cdf3f
949
js
JavaScript
www/app/directives/bouncer.js
cdanewschool/patient-tracker
481ed837e62a769fbbd3cb0b8c4654210a5f3a2a
[ "Apache-2.0" ]
3
2019-02-26T17:26:45.000Z
2019-11-11T06:28:02.000Z
www/app/directives/bouncer.js
cdanewschool/patient-tracker
481ed837e62a769fbbd3cb0b8c4654210a5f3a2a
[ "Apache-2.0" ]
null
null
null
www/app/directives/bouncer.js
cdanewschool/patient-tracker
481ed837e62a769fbbd3cb0b8c4654210a5f3a2a
[ "Apache-2.0" ]
null
null
null
app.directive ( 'bouncer', function(model,navigation,constants) { return { restrict : 'A', link : function(scope, element, attrs) { /** * listen for page change so we can send user * back to login if not authenticated */ angular.element(element).on ( "pagebeforechange", function(e,data) { if( typeof data.toPage !== "string" ) return; var id = data.options.hash ? data.options.hash : data.toPage.substr( data.toPage.lastIndexOf("#") ); if( !id.match(/login|signup/) && !model.loggedIn ) { e.preventDefault(); data.options.changeHash = true; data.options.toPage = "#login"; if( constants.DEBUG ) console.log( "Access denied, changing page to " + id ); $.mobile.changePage("#login"); } } ); } }; } );
22.069767
106
0.507903
96d8b67ed2d015b41ebf22f9de4f976f7ad6d3f3
458
js
JavaScript
lib/atoms/panel.js
kajyr/logbook-fipsas
051e4a1aa3153434761c7f599b79b2c7f85273c6
[ "MIT" ]
null
null
null
lib/atoms/panel.js
kajyr/logbook-fipsas
051e4a1aa3153434761c7f599b79b2c7f85273c6
[ "MIT" ]
14
2019-10-08T07:29:57.000Z
2022-01-18T07:57:39.000Z
lib/atoms/panel.js
kajyr/logbook-templates
82d49c43c5053714bda53abbe94b9c34c133204d
[ "MIT" ]
null
null
null
const COLOR_PANEL_BG = '#ccc'; function panel(doc, startX, startY, width, height, padding, panelChildrenFn) { doc.rect(startX, startY, width, height) .fillAndStroke(COLOR_PANEL_BG, 'black') .fillColor('black'); panelChildrenFn( doc, startX + padding, startY + padding, width - 2 * padding, height - 2 * padding ); return [startX + width, startY + height]; } module.exports = panel;
22.9
78
0.604803