diff --git a/docs/.vitepress/config/navbar.ts b/docs/.vitepress/config/navbar.ts
index 19d7ca2..4631ab4 100644
--- a/docs/.vitepress/config/navbar.ts
+++ b/docs/.vitepress/config/navbar.ts
@@ -1,5 +1,6 @@
export default [
{ text: 'Guide', link: '/guide/' },
+ { text: 'Demo', link: '/guide/demo/' },
// { text: '接口', link: '/api/' },
// { text: '模块中心', link: '/modules/' },
{ text: 'Log', link: 'https://github.com/biyuehu/misakura/blob/master/CHANGELOG.md' }
diff --git a/docs/src/guide/demo.md b/docs/src/guide/demo.md
index 02f7fb3..96b3ad7 100644
--- a/docs/src/guide/demo.md
+++ b/docs/src/guide/demo.md
@@ -1,4 +1,4 @@
# Demo
-Demo
+Misakura ~ Demo
diff --git a/docs/src/public/.gitattributes b/docs/src/public/.gitattributes
new file mode 100644
index 0000000..05ff665
--- /dev/null
+++ b/docs/src/public/.gitattributes
@@ -0,0 +1 @@
+./**/* linguist-detectable=false
\ No newline at end of file
diff --git a/docs/src/public/assets/index-BMcJ6zOx.js b/docs/src/public/assets/index-BMcJ6zOx.js
new file mode 100644
index 0000000..7ec819c
--- /dev/null
+++ b/docs/src/public/assets/index-BMcJ6zOx.js
@@ -0,0 +1,1249 @@
+var fr=Object.defineProperty;var pr=(Z,_,Y)=>_ in Z?fr(Z,_,{enumerable:!0,configurable:!0,writable:!0,value:Y}):Z[_]=Y;var be=(Z,_,Y)=>pr(Z,typeof _!="symbol"?_+"":_,Y);(function(){const _=document.createElement("link").relList;if(_&&_.supports&&_.supports("modulepreload"))return;for(const te of document.querySelectorAll('link[rel="modulepreload"]'))ee(te);new MutationObserver(te=>{for(const re of te)if(re.type==="childList")for(const ne of re.addedNodes)ne.tagName==="LINK"&&ne.rel==="modulepreload"&&ee(ne)}).observe(document,{childList:!0,subtree:!0});function Y(te){const re={};return te.integrity&&(re.integrity=te.integrity),te.referrerPolicy&&(re.referrerPolicy=te.referrerPolicy),te.crossOrigin==="use-credentials"?re.credentials="include":te.crossOrigin==="anonymous"?re.credentials="omit":re.credentials="same-origin",re}function ee(te){if(te.ep)return;te.ep=!0;const re=Y(te);fetch(te.href,re)}})();var ENV=(Z=>(Z[Z.WEBGL_LEGACY=0]="WEBGL_LEGACY",Z[Z.WEBGL=1]="WEBGL",Z[Z.WEBGL2=2]="WEBGL2",Z))(ENV||{}),RENDERER_TYPE=(Z=>(Z[Z.UNKNOWN=0]="UNKNOWN",Z[Z.WEBGL=1]="WEBGL",Z[Z.CANVAS=2]="CANVAS",Z))(RENDERER_TYPE||{}),BUFFER_BITS=(Z=>(Z[Z.COLOR=16384]="COLOR",Z[Z.DEPTH=256]="DEPTH",Z[Z.STENCIL=1024]="STENCIL",Z))(BUFFER_BITS||{}),BLEND_MODES=(Z=>(Z[Z.NORMAL=0]="NORMAL",Z[Z.ADD=1]="ADD",Z[Z.MULTIPLY=2]="MULTIPLY",Z[Z.SCREEN=3]="SCREEN",Z[Z.OVERLAY=4]="OVERLAY",Z[Z.DARKEN=5]="DARKEN",Z[Z.LIGHTEN=6]="LIGHTEN",Z[Z.COLOR_DODGE=7]="COLOR_DODGE",Z[Z.COLOR_BURN=8]="COLOR_BURN",Z[Z.HARD_LIGHT=9]="HARD_LIGHT",Z[Z.SOFT_LIGHT=10]="SOFT_LIGHT",Z[Z.DIFFERENCE=11]="DIFFERENCE",Z[Z.EXCLUSION=12]="EXCLUSION",Z[Z.HUE=13]="HUE",Z[Z.SATURATION=14]="SATURATION",Z[Z.COLOR=15]="COLOR",Z[Z.LUMINOSITY=16]="LUMINOSITY",Z[Z.NORMAL_NPM=17]="NORMAL_NPM",Z[Z.ADD_NPM=18]="ADD_NPM",Z[Z.SCREEN_NPM=19]="SCREEN_NPM",Z[Z.NONE=20]="NONE",Z[Z.SRC_OVER=0]="SRC_OVER",Z[Z.SRC_IN=21]="SRC_IN",Z[Z.SRC_OUT=22]="SRC_OUT",Z[Z.SRC_ATOP=23]="SRC_ATOP",Z[Z.DST_OVER=24]="DST_OVER",Z[Z.DST_IN=25]="DST_IN",Z[Z.DST_OUT=26]="DST_OUT",Z[Z.DST_ATOP=27]="DST_ATOP",Z[Z.ERASE=26]="ERASE",Z[Z.SUBTRACT=28]="SUBTRACT",Z[Z.XOR=29]="XOR",Z))(BLEND_MODES||{}),DRAW_MODES=(Z=>(Z[Z.POINTS=0]="POINTS",Z[Z.LINES=1]="LINES",Z[Z.LINE_LOOP=2]="LINE_LOOP",Z[Z.LINE_STRIP=3]="LINE_STRIP",Z[Z.TRIANGLES=4]="TRIANGLES",Z[Z.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",Z[Z.TRIANGLE_FAN=6]="TRIANGLE_FAN",Z))(DRAW_MODES||{}),FORMATS=(Z=>(Z[Z.RGBA=6408]="RGBA",Z[Z.RGB=6407]="RGB",Z[Z.RG=33319]="RG",Z[Z.RED=6403]="RED",Z[Z.RGBA_INTEGER=36249]="RGBA_INTEGER",Z[Z.RGB_INTEGER=36248]="RGB_INTEGER",Z[Z.RG_INTEGER=33320]="RG_INTEGER",Z[Z.RED_INTEGER=36244]="RED_INTEGER",Z[Z.ALPHA=6406]="ALPHA",Z[Z.LUMINANCE=6409]="LUMINANCE",Z[Z.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",Z[Z.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",Z[Z.DEPTH_STENCIL=34041]="DEPTH_STENCIL",Z))(FORMATS||{}),TARGETS=(Z=>(Z[Z.TEXTURE_2D=3553]="TEXTURE_2D",Z[Z.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",Z[Z.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",Z[Z.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",Z[Z.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",Z[Z.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",Z[Z.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",Z[Z.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",Z[Z.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",Z))(TARGETS||{}),TYPES=(Z=>(Z[Z.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",Z[Z.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",Z[Z.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",Z[Z.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",Z[Z.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",Z[Z.UNSIGNED_INT=5125]="UNSIGNED_INT",Z[Z.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",Z[Z.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",Z[Z.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",Z[Z.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",Z[Z.BYTE=5120]="BYTE",Z[Z.SHORT=5122]="SHORT",Z[Z.INT=5124]="INT",Z[Z.FLOAT=5126]="FLOAT",Z[Z.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",Z[Z.HALF_FLOAT=36193]="HALF_FLOAT",Z))(TYPES||{}),SAMPLER_TYPES=(Z=>(Z[Z.FLOAT=0]="FLOAT",Z[Z.INT=1]="INT",Z[Z.UINT=2]="UINT",Z))(SAMPLER_TYPES||{}),SCALE_MODES=(Z=>(Z[Z.NEAREST=0]="NEAREST",Z[Z.LINEAR=1]="LINEAR",Z))(SCALE_MODES||{}),WRAP_MODES=(Z=>(Z[Z.CLAMP=33071]="CLAMP",Z[Z.REPEAT=10497]="REPEAT",Z[Z.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",Z))(WRAP_MODES||{}),MIPMAP_MODES=(Z=>(Z[Z.OFF=0]="OFF",Z[Z.POW2=1]="POW2",Z[Z.ON=2]="ON",Z[Z.ON_MANUAL=3]="ON_MANUAL",Z))(MIPMAP_MODES||{}),ALPHA_MODES=(Z=>(Z[Z.NPM=0]="NPM",Z[Z.UNPACK=1]="UNPACK",Z[Z.PMA=2]="PMA",Z[Z.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",Z[Z.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",Z[Z.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",Z))(ALPHA_MODES||{}),CLEAR_MODES=(Z=>(Z[Z.NO=0]="NO",Z[Z.YES=1]="YES",Z[Z.AUTO=2]="AUTO",Z[Z.BLEND=0]="BLEND",Z[Z.CLEAR=1]="CLEAR",Z[Z.BLIT=2]="BLIT",Z))(CLEAR_MODES||{}),GC_MODES=(Z=>(Z[Z.AUTO=0]="AUTO",Z[Z.MANUAL=1]="MANUAL",Z))(GC_MODES||{}),PRECISION=(Z=>(Z.LOW="lowp",Z.MEDIUM="mediump",Z.HIGH="highp",Z))(PRECISION||{}),MASK_TYPES=(Z=>(Z[Z.NONE=0]="NONE",Z[Z.SCISSOR=1]="SCISSOR",Z[Z.STENCIL=2]="STENCIL",Z[Z.SPRITE=3]="SPRITE",Z[Z.COLOR=4]="COLOR",Z))(MASK_TYPES||{}),MSAA_QUALITY=(Z=>(Z[Z.NONE=0]="NONE",Z[Z.LOW=2]="LOW",Z[Z.MEDIUM=4]="MEDIUM",Z[Z.HIGH=8]="HIGH",Z))(MSAA_QUALITY||{}),BUFFER_TYPE=(Z=>(Z[Z.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",Z[Z.ARRAY_BUFFER=34962]="ARRAY_BUFFER",Z[Z.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",Z))(BUFFER_TYPE||{});const BrowserAdapter$1={createCanvas:(Z,_)=>{const Y=document.createElement("canvas");return Y.width=Z,Y.height=_,Y},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(Z,_)=>fetch(Z,_),parseXML:Z=>new DOMParser().parseFromString(Z,"text/xml")},settings={ADAPTER:BrowserAdapter$1,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var appleIphone=/iPhone/i,appleIpod=/iPod/i,appleTablet=/iPad/i,appleUniversal=/\biOS-universal(?:.+)Mac\b/i,androidPhone=/\bAndroid(?:.+)Mobile\b/i,androidTablet=/Android/i,amazonPhone=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,amazonTablet=/Silk/i,windowsPhone=/Windows Phone/i,windowsTablet=/\bWindows(?:.+)ARM\b/i,otherBlackBerry=/BlackBerry/i,otherBlackBerry10=/BB10/i,otherOpera=/Opera Mini/i,otherChrome=/\b(CriOS|Chrome)(?:.+)Mobile/i,otherFirefox=/Mobile(?:.+)Firefox\b/i,isAppleTabletOnIos13=function(Z){return typeof Z<"u"&&Z.platform==="MacIntel"&&typeof Z.maxTouchPoints=="number"&&Z.maxTouchPoints>1&&typeof MSStream>"u"};function createMatch(Z){return function(_){return _.test(Z)}}function isMobile$1(Z){var _={userAgent:"",platform:"",maxTouchPoints:0};!Z&&typeof navigator<"u"?_={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof Z=="string"?_.userAgent=Z:Z&&Z.userAgent&&(_={userAgent:Z.userAgent,platform:Z.platform,maxTouchPoints:Z.maxTouchPoints||0});var Y=_.userAgent,ee=Y.split("[FBAN");typeof ee[1]<"u"&&(Y=ee[0]),ee=Y.split("Twitter"),typeof ee[1]<"u"&&(Y=ee[0]);var te=createMatch(Y),re={apple:{phone:te(appleIphone)&&!te(windowsPhone),ipod:te(appleIpod),tablet:!te(appleIphone)&&(te(appleTablet)||isAppleTabletOnIos13(_))&&!te(windowsPhone),universal:te(appleUniversal),device:(te(appleIphone)||te(appleIpod)||te(appleTablet)||te(appleUniversal)||isAppleTabletOnIos13(_))&&!te(windowsPhone)},amazon:{phone:te(amazonPhone),tablet:!te(amazonPhone)&&te(amazonTablet),device:te(amazonPhone)||te(amazonTablet)},android:{phone:!te(windowsPhone)&&te(amazonPhone)||!te(windowsPhone)&&te(androidPhone),tablet:!te(windowsPhone)&&!te(amazonPhone)&&!te(androidPhone)&&(te(amazonTablet)||te(androidTablet)),device:!te(windowsPhone)&&(te(amazonPhone)||te(amazonTablet)||te(androidPhone)||te(androidTablet))||te(/\bokhttp\b/i)},windows:{phone:te(windowsPhone),tablet:te(windowsTablet),device:te(windowsPhone)||te(windowsTablet)},other:{blackberry:te(otherBlackBerry),blackberry10:te(otherBlackBerry10),opera:te(otherOpera),firefox:te(otherFirefox),chrome:te(otherChrome),device:te(otherBlackBerry)||te(otherBlackBerry10)||te(otherOpera)||te(otherFirefox)||te(otherChrome)},any:!1,phone:!1,tablet:!1};return re.any=re.apple.device||re.android.device||re.windows.device||re.other.device,re.phone=re.apple.phone||re.android.phone||re.windows.phone,re.tablet=re.apple.tablet||re.android.tablet||re.windows.tablet,re}const isMobileCall=isMobile$1.default??isMobile$1,isMobile=isMobileCall(globalThis.navigator);settings.RETINA_PREFIX=/@([0-9\.]+)x/;settings.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(Z){return Z&&Z.__esModule&&Object.prototype.hasOwnProperty.call(Z,"default")?Z.default:Z}function getAugmentedNamespace(Z){if(Z.__esModule)return Z;var _=Z.default;if(typeof _=="function"){var Y=function ee(){return this instanceof ee?Reflect.construct(_,arguments,this.constructor):_.apply(this,arguments)};Y.prototype=_.prototype}else Y={};return Object.defineProperty(Y,"__esModule",{value:!0}),Object.keys(Z).forEach(function(ee){var te=Object.getOwnPropertyDescriptor(Z,ee);Object.defineProperty(Y,ee,te.get?te:{enumerable:!0,get:function(){return Z[ee]}})}),Y}var eventemitter3={exports:{}};(function(Z){var _=Object.prototype.hasOwnProperty,Y="~";function ee(){}Object.create&&(ee.prototype=Object.create(null),new ee().__proto__||(Y=!1));function te(se,ae,ue){this.fn=se,this.context=ae,this.once=ue||!1}function re(se,ae,ue,oe,le){if(typeof ue!="function")throw new TypeError("The listener must be a function");var ce=new te(ue,oe||se,le),he=Y?Y+ae:ae;return se._events[he]?se._events[he].fn?se._events[he]=[se._events[he],ce]:se._events[he].push(ce):(se._events[he]=ce,se._eventsCount++),se}function ne(se,ae){--se._eventsCount===0?se._events=new ee:delete se._events[ae]}function ie(){this._events=new ee,this._eventsCount=0}ie.prototype.eventNames=function(){var ae=[],ue,oe;if(this._eventsCount===0)return ae;for(oe in ue=this._events)_.call(ue,oe)&&ae.push(Y?oe.slice(1):oe);return Object.getOwnPropertySymbols?ae.concat(Object.getOwnPropertySymbols(ue)):ae},ie.prototype.listeners=function(ae){var ue=Y?Y+ae:ae,oe=this._events[ue];if(!oe)return[];if(oe.fn)return[oe.fn];for(var le=0,ce=oe.length,he=new Array(ce);le80*Y){ie=ae=Z[0],se=ue=Z[1];for(var he=Y;heae&&(ae=oe),le>ue&&(ue=le);ce=Math.max(ae-ie,ue-se),ce=ce!==0?32767/ce:0}return earcutLinked(re,ne,Y,ie,se,ce,0),ne}function linkedList(Z,_,Y,ee,te){var re,ne;if(te===signedArea(Z,_,Y,ee)>0)for(re=_;re=_;re-=ee)ne=insertNode(re,Z[re],Z[re+1],ne);return ne&&equals(ne,ne.next)&&(removeNode(ne),ne=ne.next),ne}function filterPoints(Z,_){if(!Z)return Z;_||(_=Z);var Y=Z,ee;do if(ee=!1,!Y.steiner&&(equals(Y,Y.next)||area(Y.prev,Y,Y.next)===0)){if(removeNode(Y),Y=_=Y.prev,Y===Y.next)break;ee=!0}else Y=Y.next;while(ee||Y!==_);return _}function earcutLinked(Z,_,Y,ee,te,re,ne){if(Z){!ne&&re&&indexCurve(Z,ee,te,re);for(var ie=Z,se,ae;Z.prev!==Z.next;){if(se=Z.prev,ae=Z.next,re?isEarHashed(Z,ee,te,re):isEar(Z)){_.push(se.i/Y|0),_.push(Z.i/Y|0),_.push(ae.i/Y|0),removeNode(Z),Z=ae.next,ie=ae.next;continue}if(Z=ae,Z===ie){ne?ne===1?(Z=cureLocalIntersections(filterPoints(Z),_,Y),earcutLinked(Z,_,Y,ee,te,re,2)):ne===2&&splitEarcut(Z,_,Y,ee,te,re):earcutLinked(filterPoints(Z),_,Y,ee,te,re,1);break}}}}function isEar(Z){var _=Z.prev,Y=Z,ee=Z.next;if(area(_,Y,ee)>=0)return!1;for(var te=_.x,re=Y.x,ne=ee.x,ie=_.y,se=Y.y,ae=ee.y,ue=tere?te>ne?te:ne:re>ne?re:ne,ce=ie>se?ie>ae?ie:ae:se>ae?se:ae,he=ee.next;he!==_;){if(he.x>=ue&&he.x<=le&&he.y>=oe&&he.y<=ce&&pointInTriangle(te,ie,re,se,ne,ae,he.x,he.y)&&area(he.prev,he,he.next)>=0)return!1;he=he.next}return!0}function isEarHashed(Z,_,Y,ee){var te=Z.prev,re=Z,ne=Z.next;if(area(te,re,ne)>=0)return!1;for(var ie=te.x,se=re.x,ae=ne.x,ue=te.y,oe=re.y,le=ne.y,ce=iese?ie>ae?ie:ae:se>ae?se:ae,de=ue>oe?ue>le?ue:le:oe>le?oe:le,pe=zOrder(ce,he,_,Y,ee),_e=zOrder(fe,de,_,Y,ee),me=Z.prevZ,ge=Z.nextZ;me&&me.z>=pe&&ge&&ge.z<=_e;){if(me.x>=ce&&me.x<=fe&&me.y>=he&&me.y<=de&&me!==te&&me!==ne&&pointInTriangle(ie,ue,se,oe,ae,le,me.x,me.y)&&area(me.prev,me,me.next)>=0||(me=me.prevZ,ge.x>=ce&&ge.x<=fe&&ge.y>=he&&ge.y<=de&&ge!==te&&ge!==ne&&pointInTriangle(ie,ue,se,oe,ae,le,ge.x,ge.y)&&area(ge.prev,ge,ge.next)>=0))return!1;ge=ge.nextZ}for(;me&&me.z>=pe;){if(me.x>=ce&&me.x<=fe&&me.y>=he&&me.y<=de&&me!==te&&me!==ne&&pointInTriangle(ie,ue,se,oe,ae,le,me.x,me.y)&&area(me.prev,me,me.next)>=0)return!1;me=me.prevZ}for(;ge&&ge.z<=_e;){if(ge.x>=ce&&ge.x<=fe&&ge.y>=he&&ge.y<=de&&ge!==te&&ge!==ne&&pointInTriangle(ie,ue,se,oe,ae,le,ge.x,ge.y)&&area(ge.prev,ge,ge.next)>=0)return!1;ge=ge.nextZ}return!0}function cureLocalIntersections(Z,_,Y){var ee=Z;do{var te=ee.prev,re=ee.next.next;!equals(te,re)&&intersects(te,ee,ee.next,re)&&locallyInside(te,re)&&locallyInside(re,te)&&(_.push(te.i/Y|0),_.push(ee.i/Y|0),_.push(re.i/Y|0),removeNode(ee),removeNode(ee.next),ee=Z=re),ee=ee.next}while(ee!==Z);return filterPoints(ee)}function splitEarcut(Z,_,Y,ee,te,re){var ne=Z;do{for(var ie=ne.next.next;ie!==ne.prev;){if(ne.i!==ie.i&&isValidDiagonal(ne,ie)){var se=splitPolygon(ne,ie);ne=filterPoints(ne,ne.next),se=filterPoints(se,se.next),earcutLinked(ne,_,Y,ee,te,re,0),earcutLinked(se,_,Y,ee,te,re,0);return}ie=ie.next}ne=ne.next}while(ne!==Z)}function eliminateHoles(Z,_,Y,ee){var te=[],re,ne,ie,se,ae;for(re=0,ne=_.length;re=Y.next.y&&Y.next.y!==Y.y){var ie=Y.x+(te-Y.y)*(Y.next.x-Y.x)/(Y.next.y-Y.y);if(ie<=ee&&ie>re&&(re=ie,ne=Y.x=Y.x&&Y.x>=ae&&ee!==Y.x&&pointInTriangle(tene.x||Y.x===ne.x&§orContainsSector(ne,Y)))&&(ne=Y,oe=le)),Y=Y.next;while(Y!==se);return ne}function sectorContainsSector(Z,_){return area(Z.prev,Z,_.prev)<0&&area(_.next,Z,Z.next)<0}function indexCurve(Z,_,Y,ee){var te=Z;do te.z===0&&(te.z=zOrder(te.x,te.y,_,Y,ee)),te.prevZ=te.prev,te.nextZ=te.next,te=te.next;while(te!==Z);te.prevZ.nextZ=null,te.prevZ=null,sortLinked(te)}function sortLinked(Z){var _,Y,ee,te,re,ne,ie,se,ae=1;do{for(Y=Z,Z=null,re=null,ne=0;Y;){for(ne++,ee=Y,ie=0,_=0;_0||se>0&ⅇ)ie!==0&&(se===0||!ee||Y.z<=ee.z)?(te=Y,Y=Y.nextZ,ie--):(te=ee,ee=ee.nextZ,se--),re?re.nextZ=te:Z=te,te.prevZ=re,re=te;Y=ee}re.nextZ=null,ae*=2}while(ne>1);return Z}function zOrder(Z,_,Y,ee,te){return Z=(Z-Y)*te|0,_=(_-ee)*te|0,Z=(Z|Z<<8)&16711935,Z=(Z|Z<<4)&252645135,Z=(Z|Z<<2)&858993459,Z=(Z|Z<<1)&1431655765,_=(_|_<<8)&16711935,_=(_|_<<4)&252645135,_=(_|_<<2)&858993459,_=(_|_<<1)&1431655765,Z|_<<1}function getLeftmost(Z){var _=Z,Y=Z;do(_.x=(Z-ne)*(re-ie)&&(Z-ne)*(ee-ie)>=(Y-ne)*(_-ie)&&(Y-ne)*(re-ie)>=(te-ne)*(ee-ie)}function isValidDiagonal(Z,_){return Z.next.i!==_.i&&Z.prev.i!==_.i&&!intersectsPolygon(Z,_)&&(locallyInside(Z,_)&&locallyInside(_,Z)&&middleInside(Z,_)&&(area(Z.prev,Z,_.prev)||area(Z,_.prev,_))||equals(Z,_)&&area(Z.prev,Z,Z.next)>0&&area(_.prev,_,_.next)>0)}function area(Z,_,Y){return(_.y-Z.y)*(Y.x-_.x)-(_.x-Z.x)*(Y.y-_.y)}function equals(Z,_){return Z.x===_.x&&Z.y===_.y}function intersects(Z,_,Y,ee){var te=sign$1(area(Z,_,Y)),re=sign$1(area(Z,_,ee)),ne=sign$1(area(Y,ee,Z)),ie=sign$1(area(Y,ee,_));return!!(te!==re&&ne!==ie||te===0&&onSegment(Z,Y,_)||re===0&&onSegment(Z,ee,_)||ne===0&&onSegment(Y,Z,ee)||ie===0&&onSegment(Y,_,ee))}function onSegment(Z,_,Y){return _.x<=Math.max(Z.x,Y.x)&&_.x>=Math.min(Z.x,Y.x)&&_.y<=Math.max(Z.y,Y.y)&&_.y>=Math.min(Z.y,Y.y)}function sign$1(Z){return Z>0?1:Z<0?-1:0}function intersectsPolygon(Z,_){var Y=Z;do{if(Y.i!==Z.i&&Y.next.i!==Z.i&&Y.i!==_.i&&Y.next.i!==_.i&&intersects(Y,Y.next,Z,_))return!0;Y=Y.next}while(Y!==Z);return!1}function locallyInside(Z,_){return area(Z.prev,Z,Z.next)<0?area(Z,_,Z.next)>=0&&area(Z,Z.prev,_)>=0:area(Z,_,Z.prev)<0||area(Z,Z.next,_)<0}function middleInside(Z,_){var Y=Z,ee=!1,te=(Z.x+_.x)/2,re=(Z.y+_.y)/2;do Y.y>re!=Y.next.y>re&&Y.next.y!==Y.y&&te<(Y.next.x-Y.x)*(re-Y.y)/(Y.next.y-Y.y)+Y.x&&(ee=!ee),Y=Y.next;while(Y!==Z);return ee}function splitPolygon(Z,_){var Y=new Node(Z.i,Z.x,Z.y),ee=new Node(_.i,_.x,_.y),te=Z.next,re=_.prev;return Z.next=_,_.prev=Z,Y.next=te,te.prev=Y,ee.next=Y,Y.prev=ee,re.next=ee,ee.prev=re,ee}function insertNode(Z,_,Y,ee){var te=new Node(Z,_,Y);return ee?(te.next=ee.next,te.prev=ee,ee.next.prev=te,ee.next=te):(te.prev=te,te.next=te),te}function removeNode(Z){Z.next.prev=Z.prev,Z.prev.next=Z.next,Z.prevZ&&(Z.prevZ.nextZ=Z.nextZ),Z.nextZ&&(Z.nextZ.prevZ=Z.prevZ)}function Node(Z,_,Y){this.i=Z,this.x=_,this.y=Y,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}earcut.deviation=function(Z,_,Y,ee){var te=_&&_.length,re=te?_[0]*Y:Z.length,ne=Math.abs(signedArea(Z,0,re,Y));if(te)for(var ie=0,se=_.length;ie0&&(ee+=Z[te-1].length,Y.holes.push(ee))}return Y};var earcutExports=earcut$2.exports;const earcut$1=getDefaultExportFromCjs(earcutExports);var punycode$1={exports:{}};/*! https://mths.be/punycode v1.4.1 by @mathias */punycode$1.exports;(function(Z,_){(function(Y){var ee=_&&!_.nodeType&&_,te=Z&&!Z.nodeType&&Z,re=typeof commonjsGlobal=="object"&&commonjsGlobal;(re.global===re||re.window===re||re.self===re)&&(Y=re);var ne,ie=2147483647,se=36,ae=1,ue=26,oe=38,le=700,ce=72,he=128,fe="-",de=/^xn--/,pe=/[^\x20-\x7E]/,_e=/[\x2E\u3002\uFF0E\uFF61]/g,me={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ge=se-ae,ye=Math.floor,Ie=String.fromCharCode,Se;function Pe(Me){throw new RangeError(me[Me])}function Ae(Me,Le){for(var Ne=Me.length,ze=[];Ne--;)ze[Ne]=Le(Me[Ne]);return ze}function De(Me,Le){var Ne=Me.split("@"),ze="";Ne.length>1&&(ze=Ne[0]+"@",Me=Ne[1]),Me=Me.replace(_e,".");var Xe=Me.split("."),Ye=Ae(Xe,Le).join(".");return ze+Ye}function ke(Me){for(var Le=[],Ne=0,ze=Me.length,Xe,Ye;Ne=55296&&Xe<=56319&&Ne65535&&(Le-=65536,Ne+=Ie(Le>>>10&1023|55296),Le=56320|Le&1023),Ne+=Ie(Le),Ne}).join("")}function xe(Me){return Me-48<10?Me-22:Me-65<26?Me-65:Me-97<26?Me-97:se}function ve(Me,Le){return Me+22+75*(Me<26)-((Le!=0)<<5)}function Te(Me,Le,Ne){var ze=0;for(Me=Ne?ye(Me/le):Me>>1,Me+=ye(Me/Le);Me>ge*ue>>1;ze+=se)Me=ye(Me/ge);return ye(ze+(ge+1)*Me/(Me+oe))}function we(Me){var Le=[],Ne=Me.length,ze,Xe=0,Ye=he,tt=ce,rt,it,ot,Ze,Ke,et,nt,dt,ct;for(rt=Me.lastIndexOf(fe),rt<0&&(rt=0),it=0;it