elpy
Version:
2D JavaScript game engine.
1 lines • 20 kB
JavaScript
var Elpy;(()=>{var t={556:(t,e,s)=>{const i=s(967);t.exports=class{constructor(t,e,s,i,h,o={}){this._name=t,this._x=e,this._y=s,this._width=i,this._height=h,this._events={},this._collision={},this._isJumping=!1,this._isFalling=!1,this._isFlying=!1,this._isStopped=!1,this._state=null,this._ghost=!1,this._animate=!1,this._added=!1,this._exist=!0,this._track={x:null,y:null},this._dest={x:null,y:null},this._offset={x:0,y:0,object:null,rotate:{x:0,y:0}},this._positions={start:{x:null,y:null}},this._degrees=0,this._options={obstacle:"boolean"!=typeof o.obstacle||o.obstacle,pushing:"boolean"==typeof o.pushing&&o.pushing,disabledEvents:"boolean"==typeof o.disabledEvents&&o.disabledEvents,type:o.type||null,custom:o.custom||null,color:o.color||"black",image:{path:("object"==typeof o.image&&null!==o.image?o.image.path:o.image)||null,repeat:"object"==typeof o.image&&null!==o.image&&o.image.repeat||!1,rendering:!1,cached:null},images:{list:o.images||null,rendering:!1,cached:{}},fixedCamera:{x:!1,y:!1}},this._params={movement:{acceleration:0},jump:{multiplier:0},fall:{multiplier:0}},this._MAX_ACCELERATION=10,this._init()}run(t=1){const e=this._x+Math.cos((this._degrees+90)*Math.PI/180)*t,s=this._y+Math.sin((this._degrees+90)*Math.PI/180)*t;this.move(e,s)}move(t,e){this._dest.x=t,this._dest.y=e,this._track.x=this._x,this._track.y=this._y;for(const s in this._collision){const i=this._collision[s];if(this!==i&&this.isExist&&i.isExist&&!i.ghost&&t+this._width>i.x&&t<i.x+i.width&&e+this._height>i.y&&e<i.y+i.height){const s=this._getCollisionSide(t,e,i);if(this._dispatchEvent("collision",i,s),i.options.obstacle)return!1}}this._options.fixedCamera.x&&t>this._track.x&&(this._offset.x+=Math.abs(this._track.x-t)),this._options.fixedCamera.x&&t<this._track.x&&(this._offset.x-=Math.abs(this._track.x-t)),this._options.fixedCamera.y&&e>this._track.y&&(this._offset.y+=Math.abs(this._track.y-e)),this._options.fixedCamera.y&&e<this._track.y&&(this._offset.y-=Math.abs(this._track.y-e)),this._x=t,this._y=e,this._dispatchEvent("move")}fly(t=0,e=0,s=1){const i=this._getEventObject();this._positions.start.x=this._x,this._positions.start.y=this._y,this._nextTick((()=>{this._isStopped=!1,this._isFlying=!0,this._tick(this._onFly.bind(this,i,t,e,s))}))}jump(t=0,e=.1,s=!1){const i=this._getEventObject();if(s&&(this._isJumping=!1),this._isJumping)return!1;this._isFalling=!1,this._isJumping=!0,this._params.movement.acceleration=this._getMaxJumpAccelerationValue(t,e),this._params.jump.multiplier=e,this._nextTick((()=>{this._isStopped=!1,this._tick(this._onJump.bind(this,i))}))}fall(t=.1){const e=this._getEventObject();this._isFalling=!0,this._params.fall.multiplier=t,this._nextTick((()=>{this._isStopped=!1,this._tick(this._onFall.bind(this,e))}))}push(t){let e,s;switch(t.dest.y<t.y&&(e="up",s=Math.abs(t.dest.y-t.y)),t.dest.y>t.y&&(e="down",s=Math.abs(t.dest.y-t.y)),t.dest.x>t.x&&(e="right",s=Math.abs(t.dest.x-t.x)),t.dest.x<t.x&&(e="left",s=Math.abs(t.dest.x-t.x)),e){case"up":this.move(this.x,this.y-s),this.track.y!==this.y&&t.move(t.x,t.y-s);break;case"down":this.move(this.x,this.y+s),this.track.y!==this.y&&t.move(t.x,t.y+s);break;case"right":this.move(this.x+s,this.y),this.track.x!==this.x&&t.move(t.x+s,t.y);break;case"left":this.move(this.x-s,this.y),this.track.x!==this.x&&t.move(t.x-s,t.y)}}rotate(t=0,e=0,s=0){this._offset.rotate.x=e,this._offset.rotate.y=s,this._degrees=t,this._dispatchEvent("rotate")}stop(){this._isStopped=!0}destroy(){delete this._collision[this._name],this._exist=!1,this._dispatchEvent("destroy")}collision(t){Array.isArray(t)?t.forEach((t=>{t.isExist&&(this._collision[t.name]=t)})):t.isExist&&(this._collision[t.name]=t)}on(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)}setOffsetObject(t){this._offset.object=t}removeCollision(t){delete this._collision[t.name]}get name(){return this._name}get options(){return this._options}get obstacles(){return Object.values(this._collision)}get track(){return this._track}get dest(){return this._dest}get offset(){return this._offset}get isPushing(){return this._options.pushing}get isJumping(){return this._isJumping}get isFalling(){return this._isFalling}get isFlying(){return this._isFlying}get isExist(){return this._exist}get x(){return this._x}set x(t){this._x=t}get y(){return this._y}set y(t){this._y=t}get width(){return this._width}set width(t){return this._width=t}get height(){return this._height}set height(t){return this._height=t}get state(){return this._state}set state(t){this._state=t,this._dispatchEvent("state")}get animate(){return this._animate}set animate(t){t&&Array.isArray(this.options.images.list)&&this.options.images.list.length>0&&requestAnimationFrame(this._animation.bind(this)),this._animate=t}get ghost(){return this._ghost}set ghost(t){this._ghost=t}get degrees(){return this._degrees}get added(){return this._added}set added(t){return this._added=t}get _isAccelerationMovementStopped(){return this._params.movement.acceleration<=0}_dispatchEvent(t,...e){this._events[t]&&Array.isArray(this._events[t])&&this._events[t].length>0&&this._events[t].forEach((t=>{t(...e)}))}_animation(){this._animate&&(this._dispatchEvent("state"),requestAnimationFrame(this._animation.bind(this)))}_takeoff(){const t=Math.floor(10*this._params.movement.acceleration),e=10*this._params.jump.multiplier;this._params.movement.acceleration=(t-e)/10,this.move(this._x,Math.floor(this._y-this._params.movement.acceleration))}_landing(){if(this._params.movement.acceleration<=this._MAX_ACCELERATION){const t=Math.floor(10*this._params.movement.acceleration),e=10*this._params.fall.multiplier;this._params.movement.acceleration=(t+e)/10}if(!1===this.move(this._x,Math.floor(this._y+this._params.movement.acceleration)))return this._params.movement.acceleration=0,!0}_getCollisionSide(t,e,s){let i=null;return t+this._width>s.x&&t<s.x+s.width&&(this._y+this._height<=s.y||this._y>=s.y+s.height)&&(i=s.y-(e+this._height)>e-(s.y+s.height)?"top":"bottom"),e+this._height>s.y&&e<s.y+s.height&&(this._x+this._width<=s.x||this._x>=s.x+s.width)&&(i=s.x-(t+this._width)>t-(s.x+s.width)?"left":"right"),i}_getMaxJumpAccelerationValue(t,e){let s=0,i=0;for(;s<=t;)s+=i,i=(Math.floor(10*i)+10*e)/10;return i}_onCollisionSide(t,e){t.options.obstacle&&"bottom"===e&&(this._params.movement.acceleration=0)}_tick(t){!1!==t()&&requestAnimationFrame(this._tick.bind(this,t))}_nextTick(t){requestAnimationFrame(t)}_getEventObject(){return{_stopped:!1,_paused:!1,get stopped(){return this._stopped},get paused(){return this._paused},stop(){this._stopped=!0},pause(){this._paused=!0},resume(){this._paused=!1}}}_onJump(t){return!this._isStopped&&(t.paused?void this._dispatchEvent("jump",t):t.stopped||this._isAccelerationMovementStopped?(this._isFalling=!0,!1):(this._takeoff(),void this._dispatchEvent("jump",t)))}_onFall(t){if(this._isStopped)return!1;if(t.paused)this._dispatchEvent("fall",t);else{if(t.stopped)return this._isJumping=!1,!1;this._isFalling&&(!0===this._landing()&&(this._isJumping=!1),this._dispatchEvent("fall",t))}}_onFly(t,e,s,h){if(this._isStopped)return this._isFlying=!1,!1;if(t.paused)return void this._dispatchEvent("fly",t);if(t.stopped)return this._isFlying=!1,!1;if(s>0&&i.distance(this._positions.start.x,this._positions.start.y,this._x,this._y)>s)return this.destroy(),!1;let o=this._x+parseFloat(Math.cos(e*Math.PI/180).toFixed(10))*h,a=this._y+parseFloat(Math.sin(e*Math.PI/180).toFixed(10))*h;this.move(o,a),this._dispatchEvent("fly",t)}_init(){this.on("collision",this._onCollisionSide.bind(this))}}},967:t=>{t.exports=new class{distance(t,e,s,i){return Math.sqrt((s-t)**2+(i-e)**2)}}},138:(t,e,s)=>{const i=s(556);t.exports=class{constructor(t,e,s,i={}){this._link=t,this._width=e||window.innerWidth,this._height=s||window.innerHeight,this._preload="boolean"!=typeof i.preload||i.preload,this._favicon="boolean"!=typeof i.favicon||i.favicon,this._field=null,this._ctx=null,this._exist=!0,this._keys=[],this._events={},this._storage={images:[]},this._objects={},this._offset={object:null,x:0,y:0},this._init()}create(t,e,s,h,o,a={}){return this._objects[t]=new i(t,e,s,h,o,a),this._objects[t].options.disabledEvents||this._objects[t].on("destroy",this._onDestroyObject.bind(this,t)),this._objects[t]}add(t){Array.isArray(t)?t.forEach((t=>{t.added=!0,this._addObjectImages(t),this._render()})):(t.added=!0,this._addObjectImages(t),this._render())}key(t){document.addEventListener("keydown",this._onMultiKeydown.bind(this)),document.addEventListener("keyup",this._onMultiKeyup.bind(this)),requestAnimationFrame(this._streamKeys.bind(this,t))}keydown(t){document.addEventListener("keydown",(e=>{t(e.code)}))}keyup(t){document.addEventListener("keyup",(e=>{t(e.code)}))}mousemove(t){this._field.addEventListener("mousemove",(e=>{t(e.x-this._field.offsetLeft,e.y-this._field.offsetTop)}))}click(t){this._field.addEventListener("click",(e=>{t(e.x-this._field.offsetLeft,e.y-this._field.offsetTop)}))}tick(t){!1!==t()&&requestAnimationFrame(this.tick.bind(this,t))}nextTick(t){requestAnimationFrame(t)}checkObjectInViewport(t){return this._checkObjectInViewportX(t)&&this._checkObjectInViewportY(t)}fixingCamera(t,e={}){this._setOffsetObject(t),this._setOffsetObjectToObjects(),t.options.fixedCamera.x="object"==typeof e&&null!==e&&void 0!==e.x&&e.x,t.options.fixedCamera.y="object"==typeof e&&null!==e&&void 0!==e.y&&e.y,t.options.fixedCamera.x&&(t.offset.x=this._offset.x-(this._width/2-t.width/2),this._offset.x=this._width/2-t.width/2),t.options.fixedCamera.y&&(t.offset.y=this._offset.y-(this._height/2-t.height/2),this._offset.y=this._height/2-t.height/2)}unfixingCamera(){Object.values(this._objects).forEach((t=>{t!==this._offset.object&&(t.x=t.x-this._offset.object.offset.x,t.y=t.y-this._offset.object.offset.y)})),this._offset.object.options.fixedCamera.x=!1,this._offset.object.options.fixedCamera.y=!1,this._offset.object.x=this._offset.object.x-this._offset.object.offset.x,this._offset.object.y=this._offset.object.y-this._offset.object.offset.y,this._offset.x=0,this._offset.y=0}destroy(){Object.values(this._objects).forEach((t=>{t.destroy()})),this.nextTick((()=>{this._exist=!1}))}on(t,e){this._events[t]||(this._events[t]=[]),this._events[t].push(e)}async load(){this._imagesIsLoading?(await this._render(),requestAnimationFrame(this.load.bind(this))):(this._preload=!1,await this._render(),this._dispatchEvent("load"))}get width(){return this._width}get height(){return this._height}get offset(){return this._offset}get objects(){return this._objects}get _imagesIsLoaded(){return!this._preload||this._storage.images.filter((t=>t.loaded)).length===this._storage.images.length}get _imagesIsLoading(){return!!this._preload&&this._storage.images.filter((t=>t.loaded)).length!==this._storage.images.length}_setOffsetObject(t){this._offset.object=t,this._offset.x=t.x,this._offset.y=t.y}_setOffsetObjectToObjects(){for(const t in this._objects)this._objects[t].setOffsetObject(this._offset.object)}_onMultiKeydown(t){this._keys.includes(t.code)||this._keys.push(t.code)}_onMultiKeyup(t){const e=this._keys.indexOf(t.code);-1!==e&&this._keys.splice(e,1)}_addObjectImages(t){const e=t.options.images.list;t.options.image.path&&this._addObjectImageToStorage(t),e&&this._addObjectImagesToStorage(t)}_addObjectImageToStorage(t){const e=`${t.name}:${t.options.image.path}`;this._storage.images.find((t=>t.id===e))||this._storage.images.push({id:e,loaded:!1})}_addObjectImagesToStorage(t){t.options.images.list.forEach((e=>{e.paths.forEach((s=>{const i=`${t.name}:${e.state}:${s}`;this._storage.images.find((t=>t.id===i))||this._storage.images.push({id:i,loaded:!1})}))}))}_loadImage(t,e,s){return new Promise((i=>{const h=new Image;h.src=t,h.addEventListener("load",(()=>{if(s){const i=`${e.name}:${s}:${t}`;this._storage.images.find((t=>t.id===i)).loaded=!0}else{const s=`${e.name}:${t}`;this._storage.images.find((t=>t.id===s)).loaded=!0}i(h)}))}))}_loadImages(t,e){return new Promise((async s=>{const i={};for(let h=0;h<t.length;h++){const o=t[h];i[o.state]||(i[o.state]=this._getImageParams(o));for(let a=0;a<o.paths.length;a++){const n=o.paths[a];i[o.state].list[a]=await this._loadImage(n,e,o.state),h===t.length-1&&a===o.paths.length-1&&s(i)}}}))}_getImageParams(t){return{list:[],time:t.time||0,currentImage:null,lastRenderTime:0}}_checkObjectInViewportX(t){return this._offset.object&&t.x<this._offset.object.x+this._width&&t.x>this._offset.object.x-this._width}_checkObjectInViewportY(t){return this._offset.object&&t.y<this._offset.object.y+this._height&&t.y>this._offset.object.y-this._height}async _render(){this._preload||this._ctx.clearRect(0,0,this._width,this._height);for(const t in this._objects){const e=this._objects[t],s=e.options.images.list,i=e.options.image.path;if(!e.added)return;i&&await this._renderImage(e),s&&await this._renderImages(e),i||s||!this._imagesIsLoaded||this._renderShape(e)}if(this._preload){const t=this._storage.images.length,e=this._storage.images.filter((t=>t.loaded)).length;this._showLoadingScreen(t,e)}}async _renderImage(t){if(!t.isExist||t.options.image.rendering)return;await this._renderingImage(t);const e={x:0,y:0};if(this._offset.object?(e.x=this._offset.object.offset.x,e.y=this._offset.object.offset.y):(e.x=this._offset.x,e.y=this._offset.y),this._offset.object&&!this._offset.object.options.fixedCamera.x&&(e.x=0),this._offset.object&&!this._offset.object.options.fixedCamera.y&&(e.y=0),t.options.image.repeat)return void this._drawRepeatImage(t,e);const s=t.x-e.x+t.width/2,i=t.y-e.y+t.height/2,h=t.degrees*Math.PI/180;t.x>e.x+this._width||t.x+t.width<e.x||t.y>e.y+this._height||t.y+t.height<e.y||(this._ctx.save(),this._ctx.translate(s-t.offset.rotate.x,i-t.offset.rotate.y),this._ctx.rotate(h),this._ctx.translate(-s+t.offset.rotate.x,-i+t.offset.rotate.y),this._ctx.drawImage(t.options.image.cached,t.x-e.x,t.y-e.y,t.width,t.height),this._ctx.restore())}async _renderImages(t){if(!t.isExist||t.options.images.rendering)return;await this._renderingImages(t),t.state||(t.state=this._getFirstState(t.options.images.cached));const e=t.options.images.cached[t.state];if(t.animate?(this._calculateRenderTime(e),this._notifyAboutRenderedImage(t,e)):e.currentImage=e.list[0],this._imagesIsLoading)return;const s={x:0,y:0};this._offset.object?(s.x=this._offset.object.offset.x,s.y=this._offset.object.offset.y):(s.x=this._offset.x,s.y=this._offset.y),this._offset.object&&!this._offset.object.options.fixedCamera.x&&(s.x=0),this._offset.object&&!this._offset.object.options.fixedCamera.y&&(s.y=0);const i=t.x-s.x+t.width/2,h=t.y-s.y+t.height/2,o=t.degrees*Math.PI/180;if(!this._offset.object)return this._ctx.save(),this._ctx.translate(i-t.offset.rotate.x,h-t.offset.rotate.y),this._ctx.rotate(o),this._ctx.translate(-i+t.offset.rotate.x,-h+t.offset.rotate.y),this._ctx.drawImage(e.currentImage,t.x,t.y,t.width,t.height),void this._ctx.restore();if(this._ctx.save(),this._ctx.translate(i-t.offset.rotate.x,h-t.offset.rotate.y),this._ctx.rotate(o),this._ctx.translate(-i+t.offset.rotate.x,-h+t.offset.rotate.y),t===this._offset.object){let s,i;s=this._offset.object.options.fixedCamera.x?this._offset.x:t.x,i=this._offset.object.options.fixedCamera.y?this._offset.y:t.y,this._ctx.drawImage(e.currentImage,s,i,t.width,t.height)}else this._ctx.drawImage(e.currentImage,t.x-s.x,t.y-s.y,t.width,t.height);this._ctx.restore()}async _renderingImage(t){t.options.image.rendering=!0,t.options.image.cached||(t.options.image.cached=await this._loadImage(t.options.image.path,t)),t.options.image.rendering=!1}async _renderingImages(t){t.options.images.rendering=!0,this._isEmpty(t.options.images.cached)&&(t.options.images.cached=await this._loadImages(t.options.images.list,t)),t.options.images.rendering=!1}_renderShape(t){const e={x:0,y:0};this._offset.object?(e.x=this._offset.object.offset.x,e.y=this._offset.object.offset.y):(e.x=this._offset.x,e.y=this._offset.y),this._offset.object&&!this._offset.object.options.fixedCamera.x&&(e.x=0),this._offset.object&&!this._offset.object.options.fixedCamera.y&&(e.y=0);const s=t.x-e.x+t.width/2,i=t.y-e.y+t.height/2,h=t.degrees*Math.PI/180;this._ctx.save(),this._ctx.translate(s-t.offset.rotate.x,i-t.offset.rotate.y),this._ctx.rotate(h),this._ctx.translate(-s+t.offset.rotate.x,-i+t.offset.rotate.y),this._ctx.fillStyle=t.options.color,this._ctx.fillRect(t.x-e.x,t.y-e.y,t.width,t.height),this._ctx.restore()}_getFirstState(t){return Object.keys(t)[0]}_calculateRenderTime(t){if(performance.now()>t.lastRenderTime+t.time){let e=t.list.indexOf(t.currentImage);e+1>t.list.length-1||-1===e?e=0:e+=1,t.lastRenderTime=performance.now(),t.currentImage=t.list[e]}t.currentImage||(t.currentImage=t.list[0])}_notifyAboutRenderedImage(t,e){const s=e.currentImage.getAttribute("src"),i=t.options.images.list.find((e=>e.state===t.state)).paths;this._dispatchEvent("animation",t,s,i)}_streamKeys(t){this._keys.forEach((e=>{t(e)})),requestAnimationFrame(this._streamKeys.bind(this,t))}_onDestroyObject(t){delete this._objects[t]}_drawRepeatImage(t,e){const s=this._ctx.createPattern(t.options.image.cached,"repeat"),i=this._getRepeatImageDelta(t);this._ctx.fillStyle=s,this._ctx.save(),this._ctx.translate(-e.x+i.x,-e.y+i.y),this._ctx.fillRect(t.x-i.x,t.y-i.y,t.width,t.height),this._ctx.restore()}_getRepeatImageDelta(t){const e={x:0,y:0},s=t.width-Math.abs(t.x),i=t.height-Math.abs(t.y);return t.x<0?e.x=s%t.options.image.cached.width:e.x=-s%t.options.image.cached.width,t.y<0?e.y=i%t.options.image.cached.height:e.y=-i%t.options.image.cached.height,e}_showLoadingScreen(t,e){const s=this._width/2-this._width/2/2,i=this._height/2-this._height/100*10/2,h=this._width/2,o=this._height/100*10;this._ctx.fillStyle="black",this._ctx.fillRect(0,0,this._width,this._height),this._ctx.fillStyle="white",this._ctx.fillRect(s,i,h,o),this._ctx.fillStyle="black",this._ctx.fillRect(s+5,i+6,h-10,o-12),this._ctx.fillStyle="white",this._ctx.fillRect(s+4,i+5,(h-8)/t*e,o-10)}_isEmpty(t){return 0===Object.values(t).length}_setFavIcon(){const t=document.getElementsByTagName("head")[0],e=document.createElement("link");e.rel="shortcut icon",e.href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAk1JREFUOE9jZKAQMJKqv6c4UqSkd/kbmD64AY9XhXLeu/Yl8s7xR17MfxifsrOy9EfuuPAApDDGQNF1yYX7u/uyQlXef/nC27xo+3kMA0ACfaGWnIzPn5s//cO0SICFRVyTj3OxtJhY5/xL97vkuFmznojIlHx//7t6wYEDP7AaABOsidFx+Pj+5543z78zR0mJ/z337f89ht+/VzwXFHWasWmfDbK3cYZBTbRh249P3yq/fmFgkGXmYuD8+ffvw59/jk04dc2egYHhP14XgCRzcz3ZPz58Z/Xl298yM30Tj1fXbjA8fHif4R8Hm9b6c7ev4zWgsSTO/8fXb7P+/P0v9vcvI4OUiDjDh9c/GO69ecJw5e5dv0tX72zGaUB1dog/CwvL2h8/fjDzcPEyvP30leHPr38MzAwsDPdfvv5879lbpytXrpzBakBDQwPTx8dnbv7981eFk52T4d///wyvPn1jePzsPcPb958e/mP853H58q0bOAOxIjPYhYHh3+4nz94x/GX4x8DLxcPw+cd/hkfPXzG8+/i16/r1m+XoCQ8lFlKj/PL//P4x4dGzNwy8vFwMChJyDNcePGZ49/kLAxsLk/uxk2d34TUgLtBLjZuH+8b563dOMzH85VWQlhP6//+fOBcnG8PDZ2899hw+vBOvAVkp4ZpCbNzXrt178Pf20+chFrpa8oz/GSd8/f6d4frDh8fPnb9ijZwGQIahJyRGTzd7j3sPHzv8+PFjo5ayxstP3941vHzz4drPfz93P773/CwhA0jNnAwAsYwMINM2tAQAAAAASUVORK5CYII=",t.appendChild(e)}_setDefaultStyle(){document.body.style.margin=0}_setFieldStyle(){"string"==typeof this._link&&(this._field=document.querySelector(this._link)),this._link instanceof HTMLCanvasElement&&(this._field=this._link),this._field.width=this._width,this._field.height=this._height,this._field.style.display="block",this._ctx=this._field.getContext("2d")}_checkReadyStateChange(){document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&this.load()}))}_dispatchEvent(t,...e){this._events[t]&&Array.isArray(this._events[t])&&this._events[t].length>0&&this._events[t].forEach((t=>{t(...e)}))}_frameRender(){this.tick((()=>{if(!this._exist)return!1;this._render()}))}_init(){this._favicon&&this._setFavIcon(),this.on("load",this._frameRender.bind(this)),this._setDefaultStyle(),this._setFieldStyle(),this._checkReadyStateChange()}}}},e={},s=function s(i){var h=e[i];if(void 0!==h)return h.exports;var o=e[i]={exports:{}};return t[i](o,o.exports,s),o.exports}(138);Elpy=s})();