diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..140f0f9d67208b160ebd26307120c52cc654adb9 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,19 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +URDF/assets/base_motor_holder_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/base_so101_v2.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/motor_holder_so101_base_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/motor_holder_so101_wrist_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/moving_jaw_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/rotation_pitch_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/sts3215_03a_no_horn_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/sts3215_03a_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/under_arm_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/upper_arm_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/wrist_roll_follower_so101_v1.stl filter=lfs diff=lfs merge=lfs -text +URDF/assets/wrist_roll_pitch_so101_v2.stl filter=lfs diff=lfs merge=lfs -text +bambot_v0.jpg filter=lfs diff=lfs merge=lfs -text +bambot_v0_base.png filter=lfs diff=lfs merge=lfs -text +so-arm100.jpg filter=lfs diff=lfs merge=lfs -text +sts3215.png filter=lfs diff=lfs merge=lfs -text diff --git a/404.html b/404.html new file mode 100644 index 0000000000000000000000000000000000000000..9ec91e0369686fe78ace970a0411594c2588a754 --- /dev/null +++ b/404.html @@ -0,0 +1 @@ +404: This page could not be found.BamBot
Dora-BamBot
This browser is not supported! Please use Chrome.
Buy assembled SO101 with 5% Discount on WowRobo with the code: 1ms.ai
Star

404

This page could not be found.

\ No newline at end of file diff --git a/URDF/assets/base_motor_holder_so101_v1.stl b/URDF/assets/base_motor_holder_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..ac9c38076fe1036517faf0bccadea5de9dce0097 --- /dev/null +++ b/URDF/assets/base_motor_holder_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8cd2f241037ea377af1191fffe0dd9d9006beea6dcc48543660ed41647072424 +size 1877084 diff --git a/URDF/assets/base_so101_v2.stl b/URDF/assets/base_so101_v2.stl new file mode 100644 index 0000000000000000000000000000000000000000..503d30be06a91e401ba8d46ebb7e650866229550 --- /dev/null +++ b/URDF/assets/base_so101_v2.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bb12b7026575e1f70ccc7240051f9d943553bf34e5128537de6cd86fae33924d +size 471584 diff --git a/URDF/assets/motor_holder_so101_base_v1.stl b/URDF/assets/motor_holder_so101_base_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..f8e3d75c027f28bb672f830ec6e0795567c1b7c9 --- /dev/null +++ b/URDF/assets/motor_holder_so101_base_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31242ae6fb59d8b15c66617b88ad8e9bded62d57c35d11c0c43a70d2f4caa95b +size 1129384 diff --git a/URDF/assets/motor_holder_so101_wrist_v1.stl b/URDF/assets/motor_holder_so101_wrist_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..e55b7194683c6ac301504c6f59137362f0ebd13e --- /dev/null +++ b/URDF/assets/motor_holder_so101_wrist_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:887f92e6013cb64ea3a1ab8675e92da1e0beacfd5e001f972523540545e08011 +size 1052184 diff --git a/URDF/assets/moving_jaw_so101_v1.stl b/URDF/assets/moving_jaw_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..eb17d253df8a84a88472ecc7f859d3b8b4d78884 --- /dev/null +++ b/URDF/assets/moving_jaw_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:785a9dded2f474bc1d869e0d3dae398a3dcd9c0c345640040472210d2861fa9d +size 1413584 diff --git a/URDF/assets/rotation_pitch_so101_v1.stl b/URDF/assets/rotation_pitch_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..b536cb4100c1f204f8a9d9b182acdc4a3afbc66c --- /dev/null +++ b/URDF/assets/rotation_pitch_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9be900cc2a2bf718102841ef82ef8d2873842427648092c8ed2ca1e2ef4ffa34 +size 883684 diff --git a/URDF/assets/sts3215_03a_no_horn_v1.stl b/URDF/assets/sts3215_03a_no_horn_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..18e9335673f6d46ea8fd0a03a791516203eb6f4c --- /dev/null +++ b/URDF/assets/sts3215_03a_no_horn_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:75ef3781b752e4065891aea855e34dc161a38a549549cd0970cedd07eae6f887 +size 865884 diff --git a/URDF/assets/sts3215_03a_v1.stl b/URDF/assets/sts3215_03a_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..a14c57b9033b82f1daa38f45e7e3c91343702df4 --- /dev/null +++ b/URDF/assets/sts3215_03a_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a37c871fb502483ab96c256baf457d36f2e97afc9205313d9c5ab275ef941cd0 +size 954084 diff --git a/URDF/assets/under_arm_so101_v1.stl b/URDF/assets/under_arm_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..47b611ef939e452f791ae749756f717317922cfd --- /dev/null +++ b/URDF/assets/under_arm_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d01d1f2de365651dcad9d6669e94ff87ff7652b5bb2d10752a66a456a86dbc71 +size 1975884 diff --git a/URDF/assets/upper_arm_so101_v1.stl b/URDF/assets/upper_arm_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..8832740f9540065e6006907a9a826b01f96cd122 --- /dev/null +++ b/URDF/assets/upper_arm_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:475056e03a17e71919b82fd88ab9a0b898ab50164f2a7943652a6b2941bb2d4f +size 1303484 diff --git a/URDF/assets/waveshare_mounting_plate_so101_v2.stl b/URDF/assets/waveshare_mounting_plate_so101_v2.stl new file mode 100644 index 0000000000000000000000000000000000000000..4dba1f22b01ab9afef2466872fcb3e1efca89e38 Binary files /dev/null and b/URDF/assets/waveshare_mounting_plate_so101_v2.stl differ diff --git a/URDF/assets/wrist_roll_follower_so101_v1.stl b/URDF/assets/wrist_roll_follower_so101_v1.stl new file mode 100644 index 0000000000000000000000000000000000000000..9a5fa8fe2d7d8e59cd4a30d4dba0ca337513ab4a --- /dev/null +++ b/URDF/assets/wrist_roll_follower_so101_v1.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b17b410a12d64ec39554abc3e8054d8a97384b2dc4a8d95a5ecb2a93670f5f4 +size 1439884 diff --git a/URDF/assets/wrist_roll_pitch_so101_v2.stl b/URDF/assets/wrist_roll_pitch_so101_v2.stl new file mode 100644 index 0000000000000000000000000000000000000000..2f531712f88ec01d09824ee8e27c791a4616516f --- /dev/null +++ b/URDF/assets/wrist_roll_pitch_so101_v2.stl @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c7ec5525b4d8b9e397a30ab4bb0037156a5d5f38a4adf2c7d943d6c56eda5ae +size 2699784 diff --git a/URDF/so101.urdf b/URDF/so101.urdf new file mode 100644 index 0000000000000000000000000000000000000000..04b94752842675826966cba2d1fa8e31ca1d3858 --- /dev/null +++ b/URDF/so101.urdf @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_next/static/DtkUoStcjKiY0p76MJl9o/_buildManifest.js b/_next/static/DtkUoStcjKiY0p76MJl9o/_buildManifest.js new file mode 100644 index 0000000000000000000000000000000000000000..bd491fb5a086c322a174544a54f88a3ee5c6e726 --- /dev/null +++ b/_next/static/DtkUoStcjKiY0p76MJl9o/_buildManifest.js @@ -0,0 +1 @@ +self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:2,errorRate:1e-4,numBits:39,numHashes:14,bitArray:[0,1,1,0,r,e,e,r,r,e,e,r,e,e,e,r,r,e,e,e,e,r,e,r,r,r,r,e,e,e,r,e,r,e,r,e,e,e,r]},__routerFilterDynamic:{numItems:r,errorRate:1e-4,numBits:r,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-cc3f077a18ea1793.js"],sortedPages:["/_app","/_error"]}}(1,0,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB(); \ No newline at end of file diff --git a/_next/static/DtkUoStcjKiY0p76MJl9o/_ssgManifest.js b/_next/static/DtkUoStcjKiY0p76MJl9o/_ssgManifest.js new file mode 100644 index 0000000000000000000000000000000000000000..5b3ff592fd46c8736892a12864fdf3fed8775202 --- /dev/null +++ b/_next/static/DtkUoStcjKiY0p76MJl9o/_ssgManifest.js @@ -0,0 +1 @@ +self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/_next/static/chunks/1329d575-baf00f741997f8c1.js b/_next/static/chunks/1329d575-baf00f741997f8c1.js new file mode 100644 index 0000000000000000000000000000000000000000..637245b97e3417a67dcaa0a683200ba11a84e25c --- /dev/null +++ b/_next/static/chunks/1329d575-baf00f741997f8c1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[413],{1724:(e,n,t)=>{var l=t(9509);e.exports=function(e){function n(e,n,t,l){return new lT(e,n,t,l)}function r(){}function a(e){var n="https://react.dev/errors/"+e;if(1)":-1r||s[l]!==c[r]){var f="\n"+s[l].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=l&&0<=r);break}}}finally{ro=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?o(t):""}function c(e){try{var n="";do n+=function(e){switch(e.tag){case 26:case 27:case 5:return o(e.type);case 16:return o("Lazy");case 13:return o("Suspense");case 19:return o("SuspenseList");case 0:case 15:return e=s(e.type,!1);case 11:return e=s(e.type.render,!1);case 1:return e=s(e.type,!0);default:return""}}(e),e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function f(e){var n=e,t=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do 0!=(4098&(n=e).flags)&&(t=n.return),e=n.return;while(e)}return 3===n.tag?t:null}function d(e){if(f(e)!==e)throw Error(a(188))}function p(e){var n=e.alternate;if(!n){if(null===(n=f(e)))throw Error(a(188));return n!==e?null:e}for(var t=e,l=n;;){var r=t.return;if(null===r)break;var u=r.alternate;if(null===u){if(null!==(l=r.return)){t=l;continue}break}if(r.child===u.child){for(u=r.child;u;){if(u===t)return d(r),e;if(u===l)return d(r),n;u=u.sibling}throw Error(a(188))}if(t.return!==l.return)t=r,l=u;else{for(var i=!1,o=r.child;o;){if(o===t){i=!0,t=r,l=u;break}if(o===l){i=!0,l=r,t=u;break}o=o.sibling}if(!i){for(o=u.child;o;){if(o===t){i=!0,t=u,l=r;break}if(o===l){i=!0,l=u,t=r;break}o=o.sibling}if(!i)throw Error(a(189))}}if(t.alternate!==l)throw Error(a(190))}if(3!==t.tag)throw Error(a(188));return t.stateNode.current===t?e:n}function m(e){return{current:e}}function h(e){0>a3||(e.current=a4[a3],a4[a3]=null,a3--)}function g(e,n){a4[++a3]=e.current,e.current=n}function b(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194176&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function v(e,n){var t=e.pendingLanes;if(0===t)return 0;var l=0,r=e.suspendedLanes,a=e.pingedLanes,u=e.warmLanes;e=0!==e.finishedLanes;var i=0x7ffffff&t;return 0!==i?0!=(t=i&~r)?l=b(t):0!=(a&=i)?l=b(a):e||0!=(u=i&~u)&&(l=b(u)):0!=(i=t&~r)?l=b(i):0!==a?l=b(a):e||0!=(u=t&~u)&&(l=b(u)),0===l?0:0!==n&&n!==l&&0==(n&r)&&((r=l&-l)>=(u=n&-n)||32===r&&0!=(4194176&u))?n:l}function y(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function S(){var e=a9;return 0==(4194176&(a9<<=1))&&(a9=128),e}function k(){var e=ue;return 0==(0x3c00000&(ue<<=1))&&(ue=4194304),e}function z(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function x(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function w(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var l=31-a5(n);e.entangledLanes|=n,e.entanglements[l]=0x40000000|e.entanglements[l]|4194218&t}function N(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var l=31-a5(t),r=1<>=u,r-=u,ux=1<<32-a5(n)+r|t<d?(p=f,f=null):p=f.sibling;var b=h(n,f,u[d],i);if(null===b){null===f&&(f=p);break}e&&f&&null===b.alternate&&t(n,f),a=o(b,a,d),null===c?s=b:c.sibling=b,c=b,f=p}if(d===u.length)return l(n,f),uT&&_(n,d),s;if(null===f){for(;dp?(b=d,d=null):b=d.sibling;var y=h(n,d,v.value,s);if(null===y){null===d&&(d=b);break}e&&d&&null===y.alternate&&t(n,d),u=o(y,u,p),null===f?c=y:f.sibling=y,f=y,d=b}if(v.done)return l(n,d),uT&&_(n,p),c;if(null===d){for(;!v.done;p++,v=i.next())null!==(v=m(n,v.value,s))&&(u=o(v,u,p),null===f?c=v:f.sibling=v,f=v);return uT&&_(n,p),c}for(d=r(d);!v.done;p++,v=i.next())null!==(v=g(d,n,p,v.value,s))&&(e&&null!==v.alternate&&d.delete(null===v.key?p:v.key),u=o(v,u,p),null===f?c=v:f.sibling=v,f=v);return e&&d.forEach(function(e){return t(n,e)}),uT&&_(n,p),c}(c,f,d=b.call(d),p)}if("function"==typeof d.then)return n(c,f,ev(d),p);if(d.$$typeof===l6)return n(c,f,ts(c,d),p);eS(c,d)}return"string"==typeof d&&""!==d||"number"==typeof d||"bigint"==typeof d?(d=""+d,null!==f&&6===f.tag?(l(c,f.sibling),(p=i(f,d)).return=c):(l(c,f),(p=lH(d,c.mode,p)).return=c),s(c=p)):l(c,f)}(c,f,d,p);return u1=null,b}catch(e){if(e===uJ)throw e;var v=n(29,e,null,c.mode);return v.lanes=p,v.return=c,v}finally{}}}function ex(e,n){g(u5,e=i6),g(u6,n),i6=e|n.baseLanes}function ew(){g(u5,i6),g(u6,u6.current)}function eN(){i6=u5.current,h(u6),h(u5)}function eP(e){var n=e.alternate;g(u9,1&u9.current),g(u8,e),null===u7&&(null===n||null!==u6.current?u7=e:null!==n.memoizedState&&(u7=e))}function eC(e){if(22===e.tag){if(g(u9,u9.current),g(u8,e),null===u7){var n=e.alternate;null!==n&&null!==n.memoizedState&&(u7=e)}}else eE(e)}function eE(){g(u9,u9.current),g(u8,u8.current)}function e_(e){h(u8),u7===e&&(u7=null),h(u9)}function eL(e){for(var n=e;null!==n;){if(13===n.tag){var t=n.memoizedState;if(null!==t&&(null===(t=t.dehydrated)||ap(t)||am(t)))return n}else if(19===n.tag&&void 0!==n.memoizedProps.revealOrder){if(0!=(128&n.flags))return n}else if(null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}function eT(){throw Error(a(321))}function eR(e,n){if(null===n)return!1;for(var t=0;ta?a:8);var u=ri.T,i={};ri.T=i,n_(e,!1,n,t);try{var o=r(),s=ri.S;if(null!==s&&s(i,o),null!==o&&"object"==typeof o&&"function"==typeof o.then){var c,f,d=(c=[],f={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},o.then(function(){f.status="fulfilled",f.value=l;for(var e=0;e";case iB:return":has("+(t8(e)||"")+")";case iV:return'[role="'+e.value+'"]';case iq:return'"'+e.value+'"';case iO:return'[data-testname="'+e.value+'"]';default:throw Error(a(365))}}function t7(e,n){var t=[];e=[e,0];for(var l=0;lou&&(n.flags|=128,l=!0,tw(r,!1),n.lanes=4194304)}else{if(!l)if(null!==(e=eL(u))){if(n.flags|=128,l=!0,e=e.updateQueue,n.updateQueue=e,tx(n,e),tw(r,!0),null===r.tail&&"hidden"===r.tailMode&&!u.alternate&&!uT)return tN(n),null}else 2*ua()-r.renderingStartTime>ou&&0x20000000!==t&&(n.flags|=128,l=!0,tw(r,!1),n.lanes=4194304);r.isBackwards?(u.sibling=n.child,n.child=u):(null!==(e=r.last)?e.sibling=u:n.child=u,r.last=u)}if(null!==r.tail)return n=r.tail,r.rendering=n,r.tail=n.sibling,r.renderingStartTime=ua(),n.sibling=null,e=u9.current,g(u9,l?1&e|2:1&e),n;return tN(n),null;case 22:case 23:return e_(n),eN(),l=null!==n.memoizedState,null!==e?null!==e.memoizedState!==l&&(n.flags|=8192):l&&(n.flags|=8192),l?0!=(0x20000000&t)&&0==(128&n.flags)&&(tN(n),6&n.subtreeFlags&&(n.flags|=8192)):tN(n),null!==(t=n.updateQueue)&&tx(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),l=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(l=n.memoizedState.cachePool.pool),l!==t&&(n.flags|=2048),null!==e&&h(iT),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),tt(i_),tN(n),null;case 25:return null}throw Error(a(156,n.tag))}(n.alternate,n,i6);if(null!==t){iX=t;return}if(null!==(n=n.sibling)){iX=n;return}iX=n=e}while(null!==n);0===i5&&(i5=5)}function lS(e,n){do{var t=function(e,n){switch(R(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return tt(i_),F(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return Q(n),null;case 13:if(e_(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(a(340));W()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return h(u9),null;case 4:return F(),null;case 10:return tt(n.type),null;case 22:case 23:return e_(n),eN(),null!==e&&h(iT),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return tt(i_),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,iX=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){iX=e;return}iX=e=t}while(null!==e);i5=6,iX=null}function lk(e,n,t,l,r,u,i,o,s,c){var f=ri.T,d=rI();try{rR(2),ri.T=null,function(e,n,t,l,r,u,i,o){do lx();while(null!==oc);if(0!=(6&iK))throw Error(a(327));var s,c,f=e.finishedWork;if(l=e.finishedLanes,null!==f){if(e.finishedWork=null,e.finishedLanes=0,f===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0,e.cancelPendingCommit=null;var d=f.lanes|f.childLanes;!function(e,n,t,l,r,a){var u=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var i=e.entanglements,o=e.expirationTimes,s=e.hiddenUpdates;for(t=u&~t;0t?32:t;t=ri.T;var r=rI();try{if(rR(l),ri.T=null,null===oc)var u=!1;else{l=op,op=null;var i=oc,o=of;if(oc=null,of=0,0!=(6&iK))throw Error(a(331));var s=iK;if(iK|=4,t4(i.current),tJ(i,i.current,o,l),iK=s,K(0,!1),up&&"function"==typeof up.onPostCommitFiberRoot)try{up.onPostCommitFiberRoot(ud,i)}catch(e){}u=!0}return u}finally{rR(r),ri.T=t,lz(e,n)}}return!1}function lw(e,n,t){n=E(t,n),n=nj(e.stateNode,n,2),null!==(e=eu(e,n,2))&&(x(e,2),Y(e))}function lN(e,n,t){if(3===e.tag)lw(e,e,t);else for(;null!==n;){if(3===n.tag){lw(n,e,t);break}if(1===n.tag){var l=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof l.componentDidCatch&&(null===oo||!oo.has(l))){e=E(t,e),null!==(l=eu(n,t=nM(2),2))&&(nW(t,l,n,e),x(l,2),Y(l));break}}n=n.return}}function lP(e,n,t){var l=e.pingCache;if(null===l){l=e.pingCache=new iY;var r=new Set;l.set(n,r)}else void 0===(r=l.get(n))&&(r=new Set,l.set(n,r));r.has(t)||(i3=!0,r.add(t),e=lC.bind(null,e,n,t),n.then(e,e))}function lC(e,n,t){var l=e.pingCache;null!==l&&l.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,iJ===e&&(iZ&t)===t&&(4===i5||3===i5&&(0x3c00000&iZ)===iZ&&300>ua()-oa?0==(2&iK)&&ls(e,0):i9|=t,on===iZ&&(on=0)),Y(e)}function lE(e,n){0===n&&(n=k()),null!==(e=O(e,n))&&(x(e,n),Y(e))}function l_(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),lE(e,t)}function lL(e,n){var t=0;switch(e.tag){case 13:var l=e.stateNode,r=e.memoizedState;null!==r&&(t=r.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(a(314))}null!==l&&l.delete(n),lE(e,t)}function lT(e,n,t,l){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function lR(e){return!(!(e=e.prototype)||!e.isReactComponent)}function lI(e,t){var l=e.alternate;return null===l?((l=n(e.tag,t,e.key,e.mode)).elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=0x1e00000&e.flags,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function lF(e,n){e.flags&=0x1e00002;var t=e.alternate;return null===t?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=t.childLanes,e.lanes=t.lanes,e.child=t.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=t.memoizedProps,e.memoizedState=t.memoizedState,e.updateQueue=t.updateQueue,e.type=t.type,e.dependencies=null===(n=t.dependencies)?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function lU(e,t,l,r,u,i){var o=0;if(r=e,"function"==typeof e)lR(e)&&(o=1);else if("string"==typeof e)o=aD&&aJ?aH(e,l,uN.current)?26:a2(e)?27:5:aD?aH(e,l,uN.current)?26:5:aJ&&a2(e)?27:5;else e:switch(e){case l0:return lQ(l.children,u,i,t);case l1:o=8,u|=24;break;case l2:return(e=n(12,l,t,2|u)).elementType=l2,e.lanes=i,e;case l8:return(e=n(13,l,t,u)).elementType=l8,e.lanes=i,e;case l7:return(e=n(19,l,t,u)).elementType=l7,e.lanes=i,e;case rn:return lD(l,u,i,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case l4:case l6:o=10;break e;case l3:o=9;break e;case l5:o=11;break e;case l9:o=14;break e;case re:o=16,r=null;break e}o=29,l=Error(a(130,null===e?"null":typeof e,"")),r=null}return(t=n(o,l,t,u)).elementType=e,t.type=r,t.lanes=i,t}function lQ(e,t,l,r){return(e=n(7,e,r,t)).lanes=l,e}function lD(e,t,l,r){(e=n(22,e,r,t)).elementType=rn,e.lanes=l;var u={_visibility:1,_pendingVisibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null,_current:null,detach:function(){var e=u._current;if(null===e)throw Error(a(456));if(0==(2&u._pendingVisibility)){var n=O(e,2);null!==n&&(u._pendingVisibility|=2,lt(n,e,2))}},attach:function(){var e=u._current;if(null===e)throw Error(a(456));if(0!=(2&u._pendingVisibility)){var n=O(e,2);null!==n&&(u._pendingVisibility&=-3,lt(n,e,2))}}};return e.stateNode=u,e}function lH(e,t,l){return(e=n(6,e,null,t)).lanes=l,e}function lj(e,t,l){return(t=n(4,null!==e.children?e.children:[],e.key,t)).lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function lM(e,n,t,l,r,a,u,i){this.tag=1,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=rN,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=z(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.finishedLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=z(0),this.hiddenUpdates=z(null),this.identifierPrefix=l,this.onUncaughtError=r,this.onCaughtError=a,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=i,this.incompleteTransitions=new Map}function lW(e,t,l,r,a,u,i,o,s,c,f,d){return e=new lM(e,t,l,i,o,s,c,d),t=1,!0===u&&(t|=24),u=n(3,null,null,t),e.current=u,u.stateNode=e,t=tf(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:r,isDehydrated:l,cache:t},el(u),e}function l$(e){return e?e=a6:a6}function lA(e){var n=e._reactInternals;if(void 0===n){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,e=Object.keys(e).join(",")))}return null===(e=null!==(e=p(n))?function e(n){var t=n.tag;if(5===t||26===t||27===t||6===t)return n;for(n=n.child;null!==n;){if(null!==(t=e(n)))return t;n=n.sibling}return null}(e):null)?null:rp(e.stateNode)}function lB(e,n,t,l,r,a){var u;r=(u=r)?u=a6:a6,null===l.context?l.context=r:l.pendingContext=r,(l=ea(n)).payload={element:t},null!==(a=void 0===a?null:a)&&(l.callback=a),null!==(t=eu(e,l,n))&&(lt(t,e,n),ei(t,e,n))}function lV(e,n){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var t=e.retryLane;e.retryLane=0!==t&&t>>=0)?32:31-(a8(e)/a7|0)|0},a8=Math.log,a7=Math.LN2,a9=128,ue=4194304,un=lY.unstable_scheduleCallback,ut=lY.unstable_cancelCallback,ul=lY.unstable_shouldYield,ur=lY.unstable_requestPaint,ua=lY.unstable_now,uu=lY.unstable_ImmediatePriority,ui=lY.unstable_UserBlockingPriority,uo=lY.unstable_NormalPriority,us=lY.unstable_IdlePriority,uc=lY.log,uf=lY.unstable_setDisableYieldValue,ud=null,up=null,um="function"==typeof Object.is?Object.is:function(e,n){return e===n&&(0!==e||1/e==1/n)||e!=e&&n!=n},uh=new WeakMap,ug=[],ub=0,uv=null,uy=0,uS=[],uk=0,uz=null,ux=1,uw="",uN=m(null),uP=m(null),uC=m(null),uE=m(null),u_=null,uL=null,uT=!1,uR=null,uI=!1,uF=Error(a(519)),uU=[],uQ=0,uD=0,uH=null,uj=null,uM=!1,uW=!1,u$=!1,uA=0,uB=null,uV=0,uO=0,uq=null,uG=!1,uY=!1,uK=Object.prototype.hasOwnProperty,uJ=Error(a(460)),uX=Error(a(474)),uZ={then:function(){}},u0=null,u1=null,u2=0,u4=ez(!0),u3=ez(!1),u6=m(null),u5=m(0),u8=m(null),u7=null,u9=m(0),ie=0,it=null,il=null,ir=null,ia=!1,iu=!1,ii=!1,io=0,is=0,ic=null,id=0,ip=function(){return{lastEffect:null,events:null,stores:null,memoCache:null}},im={readContext:to,use:eA,useCallback:eT,useContext:eT,useEffect:eT,useImperativeHandle:eT,useLayoutEffect:eT,useInsertionEffect:eT,useMemo:eT,useReducer:eT,useRef:eT,useState:eT,useDebugValue:eT,useDeferredValue:eT,useTransition:eT,useSyncExternalStore:eT,useId:eT};im.useCacheRefresh=eT,im.useMemoCache=eT,im.useHostTransitionStatus=eT,im.useFormState=eT,im.useActionState=eT,im.useOptimistic=eT;var ih={readContext:to,use:eA,useCallback:function(e,n){return eM().memoizedState=[e,void 0===n?null:n],e},useContext:to,useEffect:ns,useImperativeHandle:function(e,n,t){t=null!=t?t.concat([e]):null,ni(4194308,4,np.bind(null,n,e),t)},useLayoutEffect:function(e,n){return ni(4194308,4,e,n)},useInsertionEffect:function(e,n){ni(4,2,e,n)},useMemo:function(e,n){var t=eM();n=void 0===n?null:n;var l=e();if(ii){C(!0);try{e()}finally{C(!1)}}return t.memoizedState=[l,n],l},useReducer:function(e,n,t){var l=eM();if(void 0!==t){var r=t(n);if(ii){C(!0);try{t(n)}finally{C(!1)}}}else r=n;return l.memoizedState=l.baseState=r,l.queue=e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},e=e.dispatch=nP.bind(null,it,e),[l.memoizedState,e]},useRef:function(e){return eM().memoizedState=e={current:e}},useState:function(e){var n=(e=e1(e)).queue,t=nC.bind(null,it,n);return n.dispatch=t,[e.memoizedState,t]},useDebugValue:nh,useDeferredValue:function(e,n){return nv(eM(),e,n)},useTransition:function(){var e=e1(!1);return e=nS.bind(null,it,e.queue,!0,!1),eM().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,t){var l=it,r=eM();if(uT){if(void 0===t)throw Error(a(407));t=t()}else{if(t=n(),null===iJ)throw Error(a(349));0!=(60&iZ)||eK(l,n,t)}r.memoizedState=t;var u={value:t,getSnapshot:n};return r.queue=u,ns(eX.bind(null,l,u,e),[e]),l.flags|=2048,na(9,eJ.bind(null,l,u,t,n),{destroy:void 0},null),t},useId:function(){var e=eM(),n=iJ.identifierPrefix;if(uT){var t=uw,l=ux;n=":"+n+"R"+(t=(l&~(1<<32-a5(l)-1)).toString(32)+t),0<(t=io++)&&(n+="H"+t.toString(32)),n+=":"}else n=":"+n+"r"+(t=id++).toString(32)+":";return e.memoizedState=n},useCacheRefresh:function(){return eM().memoizedState=nN.bind(null,it)}};ih.useMemoCache=eB,ih.useHostTransitionStatus=nz,ih.useFormState=ne,ih.useActionState=ne,ih.useOptimistic=function(e){var n=eM();n.memoizedState=n.baseState=e;var t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=t,n=n_.bind(null,it,!0,t),t.dispatch=n,[e,n]};var ig={readContext:to,use:eA,useCallback:ng,useContext:to,useEffect:nc,useImperativeHandle:nm,useInsertionEffect:nf,useLayoutEffect:nd,useMemo:nb,useReducer:eO,useRef:nu,useState:function(){return eO(eV)},useDebugValue:nh,useDeferredValue:function(e,n){return ny(eW(),il.memoizedState,e,n)},useTransition:function(){var e=eO(eV)[0],n=eW().memoizedState;return["boolean"==typeof e?e:e$(e),n]},useSyncExternalStore:eY,useId:nx};ig.useCacheRefresh=nw,ig.useMemoCache=eB,ig.useHostTransitionStatus=nz,ig.useFormState=nn,ig.useActionState=nn,ig.useOptimistic=function(e,n){return e2(eW(),il,e,n)};var ib={readContext:to,use:eA,useCallback:ng,useContext:to,useEffect:nc,useImperativeHandle:nm,useInsertionEffect:nf,useLayoutEffect:nd,useMemo:nb,useReducer:eG,useRef:nu,useState:function(){return eG(eV)},useDebugValue:nh,useDeferredValue:function(e,n){var t=eW();return null===il?nv(t,e,n):ny(t,il.memoizedState,e,n)},useTransition:function(){var e=eG(eV)[0],n=eW().memoizedState;return["boolean"==typeof e?e:e$(e),n]},useSyncExternalStore:eY,useId:nx};ib.useCacheRefresh=nw,ib.useMemoCache=eB,ib.useHostTransitionStatus=nz,ib.useFormState=nr,ib.useActionState=nr,ib.useOptimistic=function(e,n){var t=eW();return null!==il?e2(t,il,e,n):(t.baseState=e,[e,t.queue.dispatch])};var iv={isMounted:function(e){return!!(e=e._reactInternals)&&f(e)===e},enqueueSetState:function(e,n,t){e=e._reactInternals;var l=le(),r=ea(l);r.payload=n,null!=t&&(r.callback=t),null!==(n=eu(e,r,l))&&(lt(n,e,l),ei(n,e,l))},enqueueReplaceState:function(e,n,t){e=e._reactInternals;var l=le(),r=ea(l);r.tag=1,r.payload=n,null!=t&&(r.callback=t),null!==(n=eu(e,r,l))&&(lt(n,e,l),ei(n,e,l))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var t=le(),l=ea(t);l.tag=2,null!=n&&(l.callback=n),null!==(n=eu(e,l,t))&&(lt(n,e,t),ei(n,e,t))}},iy="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if("object"==typeof l&&"function"==typeof l.emit)return void l.emit("uncaughtException",e);console.error(e)},iS=Error(a(461)),ik=!1,iz={dehydrated:null,treeContext:null,retryLane:0},ix=m(null),iw=null,iN=null,iP="undefined"!=typeof AbortController?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(n,t){e.push(t)}};this.abort=function(){n.aborted=!0,e.forEach(function(e){return e()})}},iC=lY.unstable_scheduleCallback,iE=lY.unstable_NormalPriority,i_={$$typeof:l6,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0},iL=ri.S;ri.S=function(e,n){"object"==typeof n&&null!==n&&"function"==typeof n.then&&function(e,n){if(null===uB){var t=uB=[];uV=0,uO=en(),uq={status:"pending",value:void 0,then:function(e){t.push(e)}}}uV++,n.then(et,et)}(0,n),null!==iL&&iL(e,n)};var iT=m(null),iR=!1,iI=!1,iF=!1,iU="function"==typeof WeakSet?WeakSet:Set,iQ=null,iD=!1,iH=null,ij=!1,iM=null,iW=8192,i$={getCacheForType:function(e){var n=to(i_),t=n.data.get(e);return void 0===t&&(t=e(),n.data.set(e,t)),t}},iA=0,iB=1,iV=2,iO=3,iq=4;if("function"==typeof Symbol&&Symbol.for){var iG=Symbol.for;iA=iG("selector.component"),iB=iG("selector.has_pseudo_class"),iV=iG("selector.role"),iO=iG("selector.test_id"),iq=iG("selector.text")}var iY="function"==typeof WeakMap?WeakMap:Map,iK=0,iJ=null,iX=null,iZ=0,i0=0,i1=null,i2=!1,i4=!1,i3=!1,i6=0,i5=0,i8=0,i7=0,i9=0,oe=0,on=0,ot=null,ol=null,or=!1,oa=0,ou=1/0,oi=null,oo=null,os=!1,oc=null,of=0,od=0,op=null,om=0,oh=null;return lq.attemptContinuousHydration=function(e){if(13===e.tag){var n=O(e,0x4000000);null!==n&<(n,e,0x4000000),lO(e,0x4000000)}},lq.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var n=le(),t=O(e,n);null!==t&<(t,e,n),lO(e,n)}},lq.attemptSynchronousHydration=function(e){switch(e.tag){case 3:if((e=e.stateNode).current.memoizedState.isDehydrated){var n=b(e.pendingLanes);if(0!==n){for(e.pendingLanes|=2,e.entangledLanes|=2;n;){var t=1<<31-a5(n);e.entanglements[1]|=t,n&=~t}Y(e),0==(6&iK)&&(ou=ua()+500,K(0,!1))}}break;case 13:null!==(n=O(e,2))&<(n,e,2),li(),lO(e,2)}},lq.batchedUpdates=function(e,n){return e(n)},lq.createComponentSelector=function(e){return{$$typeof:iA,value:e}},lq.createContainer=function(e,n,t,l,r,a,u,i,o,s){return lW(e,n,!1,null,t,l,a,u,i,o,s,null)},lq.createHasPseudoClassSelector=function(e){return{$$typeof:iB,value:e}},lq.createHydrationContainer=function(e,n,t,l,r,a,u,i,o,s,c,f,d){var p;return(e=lW(t,l,!0,e,r,a,i,o,s,c,f,d)).context=(p=null,a6),t=e.current,(r=ea(l=le())).callback=null!=n?n:null,eu(t,r,l),e.current.lanes=l,x(e,l),Y(e),e},lq.createPortal=function(e,n,t){var l=3=c&&u>=d&&r<=f&&i<=p){e.splice(n,1);break}if(l!==c||t.width!==s.width||pi){if(!(u!==d||t.height!==s.height||fr)){c>l&&(s.width+=c-l,s.x=l),fu&&(s.height+=d-u,s.y=u),pt&&(t=o)),o ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},lq.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 27:case 5:return rp(e.child.stateNode);default:return e.child.stateNode}},lq.injectIntoDevTools=function(){var e={bundleType:0,version:rc,rendererPackageName:rf,currentDispatcherRef:ri,findFiberByHostInstance:rL,reconcilerVersion:"19.0.0"};if(null!==rd&&(e.rendererConfig=rd),"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var n=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(n.isDisabled||!n.supportsFiber)e=!0;else{try{ud=n.inject(e),up=n}catch(e){}e=!!n.checkDCE}}return e},lq.isAlreadyRendering=function(){return!1},lq.observeVisibleRects=function(e,n,t,l){if(!rq)throw Error(a(363));var r=r0(e=t9(e,n),t,l).disconnect;return{disconnect:function(){r()}}},lq.shouldError=function(){return null},lq.shouldSuspend=function(){return!1},lq.startHostTransition=function(e,n,t,l){if(5!==e.tag)throw Error(a(476));var u=nk(e).queue;nS(e,u,n,r$,null===t?r:function(){var n=nk(e).next.queue;return nE(e,n,{},le()),t(l)})},lq.updateContainer=function(e,n,t,l){var r=n.current,a=le();return lB(r,a,e,n,t,l),a},lq.updateContainerSync=function(e,n,t,l){return 0===n.tag&&lx(),lB(n.current,2,e,n,t,l),2},lq},e.exports.default=e.exports,Object.defineProperty(e.exports,"__esModule",{value:!0})}}]); \ No newline at end of file diff --git a/_next/static/chunks/4bd1b696-7e8243be45abfec2.js b/_next/static/chunks/4bd1b696-7e8243be45abfec2.js new file mode 100644 index 0000000000000000000000000000000000000000..1e657c9ef7fad338ad3cf397dd67d67fef013572 --- /dev/null +++ b/_next/static/chunks/4bd1b696-7e8243be45abfec2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[441],{9248:(e,n,t)=>{var r,l=t(9509),a=t(6206),o=t(2115),u=t(7650);function i(e){var n="https://react.dev/errors/"+e;if(1I||(e.current=R[I],R[I]=null,I--)}function H(e,n){R[++I]=e.current,e.current=n}var V=U(null),Q=U(null),$=U(null),B=U(null);function W(e,n){switch(H($,n),H(Q,e),H(V,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?si(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)e=ss(n=si(n),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j(V),H(V,e)}function q(){j(V),j(Q),j($)}function K(e){null!==e.memoizedState&&H(B,e);var n=V.current,t=ss(n,e.type);n!==t&&(H(Q,e),H(V,t))}function Y(e){Q.current===e&&(j(V),j(Q)),B.current===e&&(j(B),sZ._currentValue=A)}function X(e){if(void 0===nO)try{throw Error()}catch(e){var n=e.stack.trim().match(/\n( *(at )?)/);nO=n&&n[1]||"",nA=-1)":-1l||i[r]!==s[l]){var c="\n"+i[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{G=!1,Error.prepareStackTrace=t}return(t=e?e.displayName||e.name:"")?X(t):""}function J(e){try{var n="";do n+=function(e){switch(e.tag){case 26:case 27:case 5:return X(e.type);case 16:return X("Lazy");case 13:return X("Suspense");case 19:return X("SuspenseList");case 0:case 15:return Z(e.type,!1);case 11:return Z(e.type.render,!1);case 1:return Z(e.type,!0);case 31:return X("Activity");default:return""}}(e),e=e.return;while(e);return n}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}var ee=Object.prototype.hasOwnProperty,en=a.unstable_scheduleCallback,et=a.unstable_cancelCallback,er=a.unstable_shouldYield,el=a.unstable_requestPaint,ea=a.unstable_now,eo=a.unstable_getCurrentPriorityLevel,eu=a.unstable_ImmediatePriority,ei=a.unstable_UserBlockingPriority,es=a.unstable_NormalPriority,ec=a.unstable_LowPriority,ef=a.unstable_IdlePriority,ed=a.log,ep=a.unstable_setDisableYieldValue,em=null,eh=null;function eg(e){if("function"==typeof ed&&ep(e),eh&&"function"==typeof eh.setStrictMode)try{eh.setStrictMode(em,e)}catch(e){}}var ey=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(ev(e)/eb|0)|0},ev=Math.log,eb=Math.LN2,ek=256,ew=4194304;function eS(e){var n=42&e;if(0!==n)return n;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194048&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function ex(e,n,t){var r=e.pendingLanes;if(0===r)return 0;var l=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var u=0x7ffffff&r;return 0!==u?0!=(r=u&~a)?l=eS(r):0!=(o&=u)?l=eS(o):t||0!=(t=u&~e)&&(l=eS(t)):0!=(u=r&~a)?l=eS(u):0!==o?l=eS(o):t||0!=(t=r&~e)&&(l=eS(t)),0===l?0:0!==n&&n!==l&&0==(n&a)&&((a=l&-l)>=(t=n&-n)||32===a&&0!=(4194048&t))?n:l}function eE(e,n){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)}function eC(){var e=ek;return 0==(4194048&(ek<<=1))&&(ek=256),e}function ez(){var e=ew;return 0==(0x3c00000&(ew<<=1))&&(ew=4194304),e}function eP(e){for(var n=[],t=0;31>t;t++)n.push(e);return n}function eN(e,n){e.pendingLanes|=n,0x10000000!==n&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eL(e,n,t){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-ey(n);e.entangledLanes|=n,e.entanglements[r]=0x40000000|e.entanglements[r]|4194090&t}function eT(e,n){var t=e.entangledLanes|=n;for(e=e.entanglements;t;){var r=31-ey(t),l=1<=te),tr=!1;function tl(e,n){switch(e){case"keyup":return -1!==n9.indexOf(n.keyCode);case"keydown":return 229!==n.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ta(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var to=!1,tu={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ti(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===n?!!tu[e.type]:"textarea"===n}function ts(e,n,t,r){nv?nb?nb.push(r):nb=[r]:nv=r,0<(n=i4(n,"onChange")).length&&(t=new nH("onChange","change",null,t,r),e.push({event:t,listeners:n}))}var tc=null,tf=null;function td(e){iX(e,0)}function tp(e){if(e9(eW(e)))return e}function tm(e,n){if("change"===e)return n}var th=!1;if(nE){if(nE){var tg="oninput"in document;if(!tg){var ty=document.createElement("div");ty.setAttribute("oninput","return;"),tg="function"==typeof ty.oninput}r=tg}else r=!1;th=r&&(!document.documentMode||9=n)return{node:r,offset:n-e};e=t}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=tz(r)}}function tN(e){e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var n=e7(e.document);n instanceof e.HTMLIFrameElement;){try{var t="string"==typeof n.contentWindow.location.href}catch(e){t=!1}if(t)e=n.contentWindow;else break;n=e7(e.document)}return n}function tL(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&("input"===n&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===n||"true"===e.contentEditable)}var tT=nE&&"documentMode"in document&&11>=document.documentMode,t_=null,tF=null,tD=null,tM=!1;function tO(e,n,t){var r=t.window===t?t.document:9===t.nodeType?t:t.ownerDocument;tM||null==t_||t_!==e7(r)||(r="selectionStart"in(r=t_)&&tL(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},tD&&tC(tD,r)||(tD=r,0<(r=i4(tF,"onSelect")).length&&(n=new nH("onSelect","select",null,n,t),e.push({event:n,listeners:r}),n.target=t_)))}function tA(e,n){var t={};return t[e.toLowerCase()]=n.toLowerCase(),t["Webkit"+e]="webkit"+n,t["Moz"+e]="moz"+n,t}var tR={animationend:tA("Animation","AnimationEnd"),animationiteration:tA("Animation","AnimationIteration"),animationstart:tA("Animation","AnimationStart"),transitionrun:tA("Transition","TransitionRun"),transitionstart:tA("Transition","TransitionStart"),transitioncancel:tA("Transition","TransitionCancel"),transitionend:tA("Transition","TransitionEnd")},tI={},tU={};function tj(e){if(tI[e])return tI[e];if(!tR[e])return e;var n,t=tR[e];for(n in t)if(t.hasOwnProperty(n)&&n in tU)return tI[e]=t[n];return e}nE&&(tU=document.createElement("div").style,"AnimationEvent"in window||(delete tR.animationend.animation,delete tR.animationiteration.animation,delete tR.animationstart.animation),"TransitionEvent"in window||delete tR.transitionend.transition);var tH=tj("animationend"),tV=tj("animationiteration"),tQ=tj("animationstart"),t$=tj("transitionrun"),tB=tj("transitionstart"),tW=tj("transitioncancel"),tq=tj("transitionend"),tK=new Map,tY="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function tX(e,n){tK.set(e,n),eG(n,[e])}tY.push("scrollEnd");var tG=new WeakMap;function tZ(e,n){if("object"==typeof e&&null!==e){var t=tG.get(e);return void 0!==t?t:(n={value:e,source:n,stack:J(n)},tG.set(e,n),n)}return{value:e,source:n,stack:J(n)}}var tJ=[],t0=0,t1=0;function t2(){for(var e=t0,n=t1=t0=0;n>=o,l-=o,rh=1<<32-ey(n)+l|t<h?(g=f,f=null):g=f.sibling;var y=p(l,f,u[h],i);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&n(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===u.length)return t(l,f),rx&&ry(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&n(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return t(l,h),rx&&ry(l,g),c;if(null===h){for(;!v.done;g++,v=u.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return rx&&ry(l,g),c}for(h=r(h);!v.done;g++,v=u.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return n(l,e)}),rx&&ry(l,g),c}(s,c,f=b.call(f),v)}if("function"==typeof f.then)return u(s,c,lf(f),v);if(f.$$typeof===S)return u(s,c,rB(s,f),v);lp(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"==typeof f?(f=""+f,null!==c&&6===c.tag?(t(s,c.sibling),(v=l(c,f)).return=s):(t(s,c),(v=ro(f,s.mode,v)).return=s),o(s=v)):t(s,c)}(u,s,c,f);return ls=null,v}catch(e){if(e===r7||e===ln)throw e;var b=re(29,e,null,u.mode);return b.lanes=f,b.return=u,b}finally{}}}var lg=lh(!0),ly=lh(!1),lv=!1;function lb(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lk(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function lw(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function lS(e,n,t){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&uz)){var l=r.pending;return null===l?n.next=n:(n.next=l.next,l.next=n),r.pending=n,n=t5(e),t6(e,null,t),n}return t3(e,r,n,t),t5(e)}function lx(e,n,t){if(null!==(n=n.updateQueue)&&(n=n.shared,0!=(4194048&t))){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,eT(e,t)}}function lE(e,n){var t=e.updateQueue,r=e.alternate;if(null!==r&&t===(r=r.updateQueue)){var l=null,a=null;if(null!==(t=t.firstBaseUpdate)){do{var o={lane:t.lane,tag:t.tag,payload:t.payload,callback:null,next:null};null===a?l=a=o:a=a.next=o,t=t.next}while(null!==t);null===a?l=a=n:a=a.next=n}else l=a=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=t;return}null===(e=t.lastBaseUpdate)?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}var lC=!1;function lz(){if(lC){var e=r2;if(null!==e)throw e}}function lP(e,n,t,r){lC=!1;var l=e.updateQueue;lv=!1;var a=l.firstBaseUpdate,o=l.lastBaseUpdate,u=l.shared.pending;if(null!==u){l.shared.pending=null;var i=u,s=i.next;i.next=null,null===o?a=s:o.next=s,o=i;var c=e.alternate;null!==c&&(u=(c=c.updateQueue).lastBaseUpdate)!==o&&(null===u?c.firstBaseUpdate=s:u.next=s,c.lastBaseUpdate=i)}if(null!==a){var f=l.baseState;for(o=0,c=s=i=null,u=a;;){var d=-0x20000001&u.lane,m=d!==u.lane;if(m?(uL&d)===d:(r&d)===d){0!==d&&d===r1&&(lC=!0),null!==c&&(c=c.next={lane:0,tag:u.tag,payload:u.payload,callback:null,next:null});e:{var h=e,g=u;switch(d=n,g.tag){case 1:if("function"==typeof(h=g.payload)){f=h.call(t,f,d);break e}f=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null==(d="function"==typeof(h=g.payload)?h.call(t,f,d):h))break e;f=p({},f,d);break e;case 2:lv=!0}}null!==(d=u.callback)&&(e.flags|=64,m&&(e.flags|=8192),null===(m=l.callbacks)?l.callbacks=[d]:m.push(d))}else m={lane:d,tag:u.tag,payload:u.payload,callback:u.callback,next:null},null===c?(s=c=m,i=f):c=c.next=m,o|=d;if(null===(u=u.next))if(null===(u=l.shared.pending))break;else u=(m=u).next,m.next=null,l.lastBaseUpdate=m,l.shared.pending=null}null===c&&(i=f),l.baseState=i,l.firstBaseUpdate=s,l.lastBaseUpdate=c,null===a&&(l.shared.lanes=0),uR|=o,e.lanes=o,e.memoizedState=f}}function lN(e,n){if("function"!=typeof e)throw Error(i(191,e));e.call(n)}function lL(e,n){var t=e.callbacks;if(null!==t)for(e.callbacks=null,e=0;ea?a:8;var o=M.T,u={};M.T=u,a2(e,!1,n,t);try{var i=l(),s=M.S;if(null!==s&&s(u,i),null!==i&&"object"==typeof i&&"function"==typeof i.then){var c,f,d=(c=[],f={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},i.then(function(){f.status="fulfilled",f.value=r;for(var e=0;e title"))),sl(a,r,t),a[eO]=e,eK(a),r=a;break e;case"link":var o=sQ("link","href",l).get(r+(t.href||""));if(o){for(var u=0;u<\/script>",a=a.removeChild(a.firstChild);break;case"select":a="string"==typeof r.is?o.createElement("select",{is:r.is}):o.createElement("select"),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a="string"==typeof r.is?o.createElement(l,{is:r.is}):o.createElement(l)}}a[eO]=n,a[eA]=r;e:for(o=n.child;null!==o;){if(5===o.tag||6===o.tag)a.appendChild(o.stateNode);else if(4!==o.tag&&27!==o.tag&&null!==o.child){o.child.return=o,o=o.child;continue}if(o===n)break;for(;null===o.sibling;){if(null===o.return||o.return===n)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}switch(n.stateNode=a,sl(a,l,r),l){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break;case"img":r=!0;break;default:r=!1}r&&oj(n)}}return oB(n),oH(n,n.type,null===e?null:e.memoizedProps,n.pendingProps,t),null;case 6:if(e&&null!=n.stateNode)e.memoizedProps!==r&&oj(n);else{if("string"!=typeof r&&null===n.stateNode)throw Error(i(166));if(e=$.current,rT(n)){if(e=n.stateNode,t=n.memoizedProps,r=null,null!==(l=rw))switch(l.tag){case 27:case 5:r=l.memoizedProps}e[eO]=n,(e=!!(e.nodeValue===t||null!==r&&!0===r.suppressHydrationWarning||se(e.nodeValue,t)))||rP(n,!0)}else(e=su(e).createTextNode(r))[eO]=n,n.stateNode=e}return oB(n),null;case 13:if(r=n.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(l=rT(n),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(i(318));if(!(l=null!==(l=n.memoizedState)?l.dehydrated:null))throw Error(i(317));l[eO]=n}else r_(),0==(128&n.flags)&&(n.memoizedState=null),n.flags|=4;oB(n),l=!1}else l=rF(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l){if(256&n.flags)return lj(n),n;return lj(n),null}}if(lj(n),0!=(128&n.flags))return n.lanes=t,n;return t=null!==r,e=null!==e&&null!==e.memoizedState,t&&(r=n.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool),a=null,null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)),t!==e&&t&&(n.child.flags|=8192),oQ(n,n.updateQueue),oB(n),null;case 4:return q(),null===e&&i0(n.stateNode.containerInfo),oB(n),null;case 10:return rI(n.type),oB(n),null;case 19:if(j(lH),null===(l=n.memoizedState))return oB(n),null;if(r=0!=(128&n.flags),null===(a=l.rendering))if(r)o$(l,!1);else{if(0!==uA||null!==e&&0!=(128&e.flags))for(e=n.child;null!==e;){if(null!==(a=lV(e))){for(n.flags|=128,o$(l,!1),e=a.updateQueue,n.updateQueue=e,oQ(n,e),n.subtreeFlags=0,e=t,t=n.child;null!==t;)rr(t,e),t=t.sibling;return H(lH,1&lH.current|2),n.child}e=e.sibling}null!==l.tail&&ea()>uW&&(n.flags|=128,r=!0,o$(l,!1),n.lanes=4194304)}else{if(!r)if(null!==(e=lV(a))){if(n.flags|=128,r=!0,e=e.updateQueue,n.updateQueue=e,oQ(n,e),o$(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!rx)return oB(n),null}else 2*ea()-l.renderingStartTime>uW&&0x20000000!==t&&(n.flags|=128,r=!0,o$(l,!1),n.lanes=4194304);l.isBackwards?(a.sibling=n.child,n.child=a):(null!==(e=l.last)?e.sibling=a:n.child=a,l.last=a)}if(null!==l.tail)return n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=ea(),n.sibling=null,e=lH.current,H(lH,r?1&e|2:1&e),n;return oB(n),null;case 22:case 23:return lj(n),lM(),r=null!==n.memoizedState,null!==e?null!==e.memoizedState!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?0!=(0x20000000&t)&&0==(128&n.flags)&&(oB(n),6&n.subtreeFlags&&(n.flags|=8192)):oB(n),null!==(t=n.updateQueue)&&oQ(n,t.retryQueue),t=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(t=e.memoizedState.cachePool.pool),r=null,null!==n.memoizedState&&null!==n.memoizedState.cachePool&&(r=n.memoizedState.cachePool.pool),r!==t&&(n.flags|=2048),null!==e&&j(r8),null;case 24:return t=null,null!==e&&(t=e.memoizedState.cache),n.memoizedState.cache!==t&&(n.flags|=2048),rI(rX),oB(n),null;case 25:case 30:return null}throw Error(i(156,n.tag))}(n.alternate,n,uO);if(null!==t){uN=t;return}if(null!==(n=n.sibling)){uN=n;return}uN=n=e}while(null!==n);0===uA&&(uA=5)}function ih(e,n){do{var t=function(e,n){switch(rk(n),n.tag){case 1:return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 3:return rI(rX),q(),0!=(65536&(e=n.flags))&&0==(128&e)?(n.flags=-65537&e|128,n):null;case 26:case 27:case 5:return Y(n),null;case 13:if(lj(n),null!==(e=n.memoizedState)&&null!==e.dehydrated){if(null===n.alternate)throw Error(i(340));r_()}return 65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 19:return j(lH),null;case 4:return q(),null;case 10:return rI(n.type),null;case 22:case 23:return lj(n),lM(),null!==e&&j(r8),65536&(e=n.flags)?(n.flags=-65537&e|128,n):null;case 24:return rI(rX),null;default:return null}}(e.alternate,e);if(null!==t){t.flags&=32767,uN=t;return}if(null!==(t=e.return)&&(t.flags|=32768,t.subtreeFlags=0,t.deletions=null),!n&&null!==(e=e.sibling)){uN=e;return}uN=e=t}while(null!==e);uA=6,uN=null}function ig(e,n,t,r,l,a,o,u,s){e.cancelPendingCommit=null;do iw();while(0!==uY);if(0!=(6&uz))throw Error(i(327));if(null!==n){if(n===e.current)throw Error(i(177));if(!function(e,n,t,r,l,a){var o=e.pendingLanes;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=t,e.entangledLanes&=t,e.errorRecoveryDisabledLanes&=t,e.shellSuspendCounter=0;var u=e.entanglements,i=e.expirationTimes,s=e.hiddenUpdates;for(t=o&~t;0g&&(o=g,g=h,h=o);var y=tP(u,h),v=tP(u,g);if(y&&v&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=f.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),h>g?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(f=[],p=u;p=p.parentNode;)1===p.nodeType&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof u.focus&&u.focus(),u=0;ut?32:t,M.T=null,t=u0,u0=null;var a=uX,o=uZ;if(uY=0,uG=uX=null,uZ=0,0!=(6&uz))throw Error(i(331));var u=uz;if(uz|=4,uS(a.current),uh(a,a.current,o,t),uz=u,iR(0,!1),eh&&"function"==typeof eh.onPostCommitFiberRoot)try{eh.onPostCommitFiberRoot(em,a)}catch(e){}return!0}finally{O.p=l,M.T=r,ik(e,n)}}function ix(e,n,t){n=tZ(t,n),n=of(e.stateNode,n,2),null!==(e=lS(e,n,2))&&(eN(e,2),iA(e))}function iE(e,n,t){if(3===e.tag)ix(e,e,t);else for(;null!==n;){if(3===n.tag){ix(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===uK||!uK.has(r))){e=tZ(t,e),null!==(r=lS(n,t=od(2),2))&&(op(t,r,n,e),eN(r,2),iA(r));break}}n=n.return}}function iC(e,n,t){var r=e.pingCache;if(null===r){r=e.pingCache=new uC;var l=new Set;r.set(n,l)}else void 0===(l=r.get(n))&&(l=new Set,r.set(n,l));l.has(t)||(uM=!0,l.add(t),e=iz.bind(null,e,n,t),n.then(e,e))}function iz(e,n,t){var r=e.pingCache;null!==r&&r.delete(n),e.pingedLanes|=e.suspendedLanes&t,e.warmLanes&=~t,uP===e&&(uL&t)===t&&(4===uA||3===uA&&(0x3c00000&uL)===uL&&300>ea()-uB?0==(2&uz)&&ir(e,0):uU|=t,uH===uL&&(uH=0)),iA(e)}function iP(e,n){0===n&&(n=ez()),null!==(e=t8(e,n))&&(eN(e,n),iA(e))}function iN(e){var n=e.memoizedState,t=0;null!==n&&(t=n.retryLane),iP(e,t)}function iL(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(t=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}null!==r&&r.delete(n),iP(e,t)}var iT=null,i_=null,iF=!1,iD=!1,iM=!1,iO=0;function iA(e){e!==i_&&null===e.next&&(null===i_?iT=i_=e:i_=i_.next=e),iD=!0,iF||(iF=!0,sh(function(){0!=(6&uz)?en(eu,iI):iU()}))}function iR(e,n){if(!iM&&iD){iM=!0;do for(var t=!1,r=iT;null!==r;){if(!n)if(0!==e){var l=r.pendingLanes;if(0===l)var a=0;else{var o=r.suspendedLanes,u=r.pingedLanes;a=0xc000095&(a=(1<<31-ey(42|e)+1)-1&(l&~(o&~u)))?0xc000095&a|1:a?2|a:0}0!==a&&(t=!0,iV(r,a))}else a=uL,0==(3&(a=ex(r,r===uP?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||eE(r,a)||(t=!0,iV(r,a));r=r.next}while(t);iM=!1}}function iI(){iU()}function iU(){iD=iF=!1;var e,n=0;0!==iO&&(((e=window.event)&&"popstate"===e.type?e===sf||(sf=e,0):(sf=null,1))||(n=iO),iO=0);for(var t=ea(),r=null,l=iT;null!==l;){var a=l.next,o=ij(l,t);0===o?(l.next=null,null===r?iT=a:r.next=a,null===a&&(i_=r)):(r=l,(0!==n||0!=(3&o))&&(iD=!0)),l=a}0!==uY&&5!==uY||iR(n,!1)}function ij(e,n){for(var t=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=-0x3c00001&e.pendingLanes;0r){t=r;var o=e.ownerDocument;if(1&t&&sC(o.documentElement),2&t&&sC(o.body),4&t)for(sC(t=o.head),o=t.firstChild;o;){var u=o.nextSibling,i=o.nodeName;o[eV]||"SCRIPT"===i||"STYLE"===i||"LINK"===i&&"stylesheet"===o.rel.toLowerCase()||t.removeChild(o),o=u}}if(0===l){e.removeChild(a),cw(n);return}l--}else"$"===t||"$?"===t||"$!"===t?l++:r=t.charCodeAt(0)-48;else r=0;t=a}while(t);cw(n)}function sb(e){var n=e.firstChild;for(n&&10===n.nodeType&&(n=n.nextSibling);n;){var t=n;switch(n=n.nextSibling,t.nodeName){case"HTML":case"HEAD":case"BODY":sb(t),eQ(t);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===t.rel.toLowerCase())continue}e.removeChild(t)}}function sk(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function sw(e){for(;null!=e;e=e.nextSibling){var n=e.nodeType;if(1===n||3===n)break;if(8===n){if("$"===(n=e.data)||"$!"===n||"$?"===n||"F!"===n||"F"===n)break;if("/$"===n)return null}}return e}var sS=null;function sx(e){e=e.previousSibling;for(var n=0;e;){if(8===e.nodeType){var t=e.data;if("$"===t||"$!"===t||"$?"===t){if(0===n)return e;n--}else"/$"===t&&n++}e=e.previousSibling}return null}function sE(e,n,t){switch(n=su(t),e){case"html":if(!(e=n.documentElement))throw Error(i(452));return e;case"head":if(!(e=n.head))throw Error(i(453));return e;case"body":if(!(e=n.body))throw Error(i(454));return e;default:throw Error(i(451))}}function sC(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);eQ(e)}var sz=new Map,sP=new Set;function sN(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var sL=O.d;O.d={f:function(){var e=sL.f(),n=ie();return e||n},r:function(e){var n=eB(e);null!==n&&5===n.tag&&"form"===n.type?aK(n):sL.r(e)},D:function(e){sL.D(e),s_("dns-prefetch",e,null)},C:function(e,n){sL.C(e,n),s_("preconnect",e,n)},L:function(e,n,t){if(sL.L(e,n,t),sT&&e&&n){var r='link[rel="preload"][as="'+nn(n)+'"]';"image"===n&&t&&t.imageSrcSet?(r+='[imagesrcset="'+nn(t.imageSrcSet)+'"]',"string"==typeof t.imageSizes&&(r+='[imagesizes="'+nn(t.imageSizes)+'"]')):r+='[href="'+nn(e)+'"]';var l=r;switch(n){case"style":l=sD(e);break;case"script":l=sA(e)}sz.has(l)||(e=p({rel:"preload",href:"image"===n&&t&&t.imageSrcSet?void 0:e,as:n},t),sz.set(l,e),null!==sT.querySelector(r)||"style"===n&&sT.querySelector(sM(l))||"script"===n&&sT.querySelector(sR(l))||(sl(n=sT.createElement("link"),"link",e),eK(n),sT.head.appendChild(n)))}},m:function(e,n){if(sL.m(e,n),sT&&e){var t=n&&"string"==typeof n.as?n.as:"script",r='link[rel="modulepreload"][as="'+nn(t)+'"][href="'+nn(e)+'"]',l=r;switch(t){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=sA(e)}if(!sz.has(l)&&(e=p({rel:"modulepreload",href:e},n),sz.set(l,e),null===sT.querySelector(r))){switch(t){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(sT.querySelector(sR(l)))return}sl(t=sT.createElement("link"),"link",e),eK(t),sT.head.appendChild(t)}}},X:function(e,n){if(sL.X(e,n),sT&&e){var t=eq(sT).hoistableScripts,r=sA(e),l=t.get(r);l||((l=sT.querySelector(sR(r)))||(e=p({src:e,async:!0},n),(n=sz.get(r))&&sH(e,n),eK(l=sT.createElement("script")),sl(l,"link",e),sT.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},t.set(r,l))}},S:function(e,n,t){if(sL.S(e,n,t),sT&&e){var r=eq(sT).hoistableStyles,l=sD(e);n=n||"default";var a=r.get(l);if(!a){var o={loading:0,preload:null};if(a=sT.querySelector(sM(l)))o.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":n},t),(t=sz.get(l))&&sj(e,t);var u=a=sT.createElement("link");eK(u),sl(u,"link",e),u._p=new Promise(function(e,n){u.onload=e,u.onerror=n}),u.addEventListener("load",function(){o.loading|=1}),u.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sU(a,n,sT)}a={type:"stylesheet",instance:a,count:1,state:o},r.set(l,a)}}},M:function(e,n){if(sL.M(e,n),sT&&e){var t=eq(sT).hoistableScripts,r=sA(e),l=t.get(r);l||((l=sT.querySelector(sR(r)))||(e=p({src:e,async:!0,type:"module"},n),(n=sz.get(r))&&sH(e,n),eK(l=sT.createElement("script")),sl(l,"link",e),sT.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},t.set(r,l))}}};var sT="undefined"==typeof document?null:document;function s_(e,n,t){if(sT&&"string"==typeof n&&n){var r=nn(n);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof t&&(r+='[crossorigin="'+t+'"]'),sP.has(r)||(sP.add(r),e={rel:e,crossOrigin:t,href:n},null===sT.querySelector(r)&&(sl(n=sT.createElement("link"),"link",e),eK(n),sT.head.appendChild(n)))}}function sF(e,n,t,r){var l=(l=$.current)?sN(l):null;if(!l)throw Error(i(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof t.precedence&&"string"==typeof t.href?(n=sD(t.href),(r=(t=eq(l).hoistableStyles).get(n))||(r={type:"style",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===t.rel&&"string"==typeof t.href&&"string"==typeof t.precedence){e=sD(t.href);var a,o,u,s,c=eq(l).hoistableStyles,f=c.get(e);if(f||(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=l.querySelector(sM(e)))&&!c._p&&(f.instance=c,f.state.loading=5),sz.has(e)||(t={rel:"preload",as:"style",href:t.href,crossOrigin:t.crossOrigin,integrity:t.integrity,media:t.media,hrefLang:t.hrefLang,referrerPolicy:t.referrerPolicy},sz.set(e,t),c||(a=l,o=e,u=t,s=f.state,a.querySelector('link[rel="preload"][as="style"]['+o+"]")?s.loading=1:(s.preload=o=a.createElement("link"),o.addEventListener("load",function(){return s.loading|=1}),o.addEventListener("error",function(){return s.loading|=2}),sl(o,"link",u),eK(o),a.head.appendChild(o))))),n&&null===r)throw Error(i(528,""));return f}if(n&&null!==r)throw Error(i(529,""));return null;case"script":return n=t.async,"string"==typeof(t=t.src)&&n&&"function"!=typeof n&&"symbol"!=typeof n?(n=sA(t),(r=(t=eq(l).hoistableScripts).get(n))||(r={type:"script",instance:null,count:0,state:null},t.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,e))}}function sD(e){return'href="'+nn(e)+'"'}function sM(e){return'link[rel="stylesheet"]['+e+"]"}function sO(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function sA(e){return'[src="'+nn(e)+'"]'}function sR(e){return"script[async]"+e}function sI(e,n,t){if(n.count++,null===n.instance)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+nn(t.href)+'"]');if(r)return n.instance=r,eK(r),r;var l=p({},t,{"data-href":t.href,"data-precedence":t.precedence,href:null,precedence:null});return eK(r=(e.ownerDocument||e).createElement("style")),sl(r,"style",l),sU(r,t.precedence,e),n.instance=r;case"stylesheet":l=sD(t.href);var a=e.querySelector(sM(l));if(a)return n.state.loading|=4,n.instance=a,eK(a),a;r=sO(t),(l=sz.get(l))&&sj(r,l),eK(a=(e.ownerDocument||e).createElement("link"));var o=a;return o._p=new Promise(function(e,n){o.onload=e,o.onerror=n}),sl(a,"link",r),n.state.loading|=4,sU(a,t.precedence,e),n.instance=a;case"script":if(a=sA(t.src),l=e.querySelector(sR(a)))return n.instance=l,eK(l),l;return r=t,(l=sz.get(a))&&sH(r=p({},t),l),eK(l=(e=e.ownerDocument||e).createElement("script")),sl(l,"link",r),e.head.appendChild(l),n.instance=l;case"void":return null;default:throw Error(i(443,n.type))}return"stylesheet"===n.type&&0==(4&n.state.loading)&&(r=n.instance,n.state.loading|=4,sU(r,t.precedence,e)),n.instance}function sU(e,n,t){for(var r=t.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,a=l,o=0;o title"):null)}function sB(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var sW=null;function sq(){}function sK(){if(this.count--,0===this.count){if(this.stylesheets)sX(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sY=null;function sX(e,n){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sY=new Map,n.forEach(sG,e),sY=null,sK.call(e))}function sG(e,n){if(!(4&n.state.loading)){var t=sY.get(e);if(t)var r=t.get(null);else{t=new Map,sY.set(e,t);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return u}});let n=r(6361),o=r(427),u=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:u}=(0,o.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+u};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},427:(e,t)=>{"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},589:(e,t)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return r}})},666:e=>{!function(){var t={229:function(e){var t,r,n,o=e.exports={};function u(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:u}catch(e){t=u}try{r="function"==typeof clearTimeout?clearTimeout:l}catch(e){r=l}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===u||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var i=[],c=!1,s=-1;function f(){c&&n&&(c=!1,n.length?i=n.concat(i):s=-1,i.length&&d())}function d(){if(!c){var e=a(f);c=!0;for(var t=i.length;t;){for(n=i,i=[];++s1)for(var r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectBoundary:function(){return f},RedirectErrorBoundary:function(){return s}});let n=r(6966),o=r(5155),u=n._(r(2115)),l=r(8999),a=r(6825),i=r(2210);function c(e){let{redirect:t,reset:r,redirectType:n}=e,o=(0,l.useRouter)();return(0,u.useEffect)(()=>{u.default.startTransition(()=>{n===i.RedirectType.push?o.push(t,{}):o.replace(t,{}),r()})},[t,n,r,o]),null}class s extends u.default.Component{static getDerivedStateFromError(e){if((0,i.isRedirectError)(e))return{redirect:(0,a.getURLFromRedirectError)(e),redirectType:(0,a.getRedirectTypeFromError)(e)};throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?(0,o.jsx)(c,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}}function f(e){let{children:t}=e,r=(0,l.useRouter)();return(0,o.jsx)(s,{router:r,children:t})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},708:(e,t)=>{"use strict";function r(e){return Array.isArray(e)?e[1]:e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentValue",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HTML_LIMITED_BOT_UA_RE:function(){return n.HTML_LIMITED_BOT_UA_RE},HTML_LIMITED_BOT_UA_RE_STRING:function(){return u},getBotType:function(){return i},isBot:function(){return a}});let n=r(5072),o=/Googlebot|Google-PageRenderer|AdsBot-Google|googleweblight|Storebot-Google/i,u=n.HTML_LIMITED_BOT_UA_RE.source;function l(e){return n.HTML_LIMITED_BOT_UA_RE.test(e)}function a(e){return o.test(e)||l(e)}function i(e){return o.test(e)?"dom":l(e)?"html":void 0}},878:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return u}});let n=r(4758),o=r(3118);function u(e,t,r,u,l){let{tree:a,seedData:i,head:c,isRootRender:s}=u;if(null===i)return!1;if(s){let o=i[1];r.loading=i[3],r.rsc=o,r.prefetchRsc=null,(0,n.fillLazyItemsTillLeafWithHead)(e,r,t,a,i,c,l)}else r.rsc=t.rsc,r.prefetchRsc=t.prefetchRsc,r.parallelRoutes=new Map(t.parallelRoutes),r.loading=t.loading,(0,o.fillCacheWithNewSubTreeData)(e,r,t,u,l);return!0}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},886:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathParamsContext:function(){return l},PathnameContext:function(){return u},SearchParamsContext:function(){return o}});let n=r(2115),o=(0,n.createContext)(null),u=(0,n.createContext)(null),l=(0,n.createContext)(null)},894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientPageRoot",{enumerable:!0,get:function(){return o}});let n=r(5155);function o(e){let{Component:t,searchParams:o,params:u,promises:l}=e;{let{createRenderSearchParamsFromClient:e}=r(7205),l=e(o),{createRenderParamsFromClient:a}=r(3558),i=a(u);return(0,n.jsx)(t,{params:i,searchParams:l})}}r(9837),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{dispatchAppRouterAction:function(){return l},useActionQueue:function(){return a}});let n=r(6966)._(r(2115)),o=r(5122),u=null;function l(e){if(null===u)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});u(e)}function a(e){let[t,r]=n.default.useState(e.state);return u=t=>e.dispatch(t,r),(0,o.isThenable)(t)?(0,n.use)(t):t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1127:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"matchSegment",{enumerable:!0,get:function(){return r}});let r=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1139:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}});let n=r(6966),o=r(5155),u=n._(r(2115)),l=r(5227);function a(){let e=(0,u.useContext)(l.TemplateContext);return(0,o.jsx)(o.Fragment,{children:e})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1315:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"assignLocation",{enumerable:!0,get:function(){return o}});let n=r(5929);function o(e,t){if(e.startsWith(".")){let r=t.origin+t.pathname;return new URL((r.endsWith("/")?r:r+"/")+e)}return new URL((0,n.addBasePath)(e),t.href)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1408:(e,t,r)=>{"use strict";e.exports=r(9393)},1426:(e,t,r)=>{"use strict";var n=r(9509),o=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),s=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),y=Symbol.iterator,_={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,g={};function v(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||_}function m(){}function E(e,t,r){this.props=e,this.context=t,this.refs=g,this.updater=r||_}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var O=E.prototype=new m;O.constructor=E,b(O,v.prototype),O.isPureReactComponent=!0;var R=Array.isArray,P={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function T(e,t,r,n,u,l){return{$$typeof:o,type:e,key:t,ref:void 0!==(r=l.ref)?r:null,props:l}}function S(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var M=/\/+/g;function w(e,t){var r,n;return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36)}function C(){}function x(e,t,r){if(null==e)return e;var n=[],l=0;return!function e(t,r,n,l,a){var i,c,s,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case o:case u:d=!0;break;case h:return e((d=t._init)(t._payload),r,n,l,a)}}if(d)return a=a(t),d=""===l?"."+w(t,0):l,R(a)?(n="",null!=d&&(n=d.replace(M,"$&/")+"/"),e(a,r,n,"",function(e){return e})):null!=a&&(S(a)&&(i=a,c=n+(null==a.key||t&&t.key===a.key?"":(""+a.key).replace(M,"$&/")+"/")+d,a=T(i.type,c,void 0,void 0,void 0,i.props)),r.push(a)),1;d=0;var p=""===l?".":l+":";if(R(t))for(var _=0;_{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DYNAMIC_STALETIME_MS:function(){return d},STATIC_STALETIME_MS:function(){return p},createSeededPrefetchCacheEntry:function(){return c},getOrCreatePrefetchCacheEntry:function(){return i},prunePrefetchCache:function(){return f}});let n=r(8586),o=r(9818),u=r(9154);function l(e,t,r){let n=e.pathname;return(t&&(n+=e.search),r)?""+r+"%"+n:n}function a(e,t,r){return l(e,t===o.PrefetchKind.FULL,r)}function i(e){let{url:t,nextUrl:r,tree:n,prefetchCache:u,kind:a,allowAliasing:i=!0}=e,c=function(e,t,r,n,u){for(let a of(void 0===t&&(t=o.PrefetchKind.TEMPORARY),[r,null])){let r=l(e,!0,a),i=l(e,!1,a),c=e.search?r:i,s=n.get(c);if(s&&u){if(s.url.pathname===e.pathname&&s.url.search!==e.search)return{...s,aliased:!0};return s}let f=n.get(i);if(u&&e.search&&t!==o.PrefetchKind.FULL&&f&&!f.key.includes("%"))return{...f,aliased:!0}}if(t!==o.PrefetchKind.FULL&&u){for(let t of n.values())if(t.url.pathname===e.pathname&&!t.key.includes("%"))return{...t,aliased:!0}}}(t,a,r,u,i);return c?(c.status=h(c),c.kind!==o.PrefetchKind.FULL&&a===o.PrefetchKind.FULL&&c.data.then(e=>{if(!(Array.isArray(e.flightData)&&e.flightData.some(e=>e.isRootRender&&null!==e.seedData)))return s({tree:n,url:t,nextUrl:r,prefetchCache:u,kind:null!=a?a:o.PrefetchKind.TEMPORARY})}),a&&c.kind===o.PrefetchKind.TEMPORARY&&(c.kind=a),c):s({tree:n,url:t,nextUrl:r,prefetchCache:u,kind:a||o.PrefetchKind.TEMPORARY})}function c(e){let{nextUrl:t,tree:r,prefetchCache:n,url:u,data:l,kind:i}=e,c=l.couldBeIntercepted?a(u,i,t):a(u,i),s={treeAtTimeOfPrefetch:r,data:Promise.resolve(l),kind:i,prefetchTime:Date.now(),lastUsedTime:Date.now(),staleTime:-1,key:c,status:o.PrefetchCacheEntryStatus.fresh,url:u};return n.set(c,s),s}function s(e){let{url:t,kind:r,tree:l,nextUrl:i,prefetchCache:c}=e,s=a(t,r),f=u.prefetchQueue.enqueue(()=>(0,n.fetchServerResponse)(t,{flightRouterState:l,nextUrl:i,prefetchKind:r}).then(e=>{let r;if(e.couldBeIntercepted&&(r=function(e){let{url:t,nextUrl:r,prefetchCache:n,existingCacheKey:o}=e,u=n.get(o);if(!u)return;let l=a(t,u.kind,r);return n.set(l,{...u,key:l}),n.delete(o),l}({url:t,existingCacheKey:s,nextUrl:i,prefetchCache:c})),e.prerendered){let t=c.get(null!=r?r:s);t&&(t.kind=o.PrefetchKind.FULL,-1!==e.staleTime&&(t.staleTime=e.staleTime))}return e})),d={treeAtTimeOfPrefetch:l,data:f,kind:r,prefetchTime:Date.now(),lastUsedTime:null,staleTime:-1,key:s,status:o.PrefetchCacheEntryStatus.fresh,url:t};return c.set(s,d),d}function f(e){for(let[t,r]of e)h(r)===o.PrefetchCacheEntryStatus.expired&&e.delete(t)}let d=1e3*Number("0"),p=1e3*Number("300");function h(e){let{kind:t,prefetchTime:r,lastUsedTime:n,staleTime:u}=e;return -1!==u?Date.now(){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BrowserResolvedMetadata",{enumerable:!0,get:function(){return o}});let n=r(2115);function o(e){let{promise:t}=e,{metadata:r,error:o}=(0,n.use)(t);return o?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1646:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reportGlobalError",{enumerable:!0,get:function(){return r}});let r="function"==typeof reportError?reportError:e=>{globalThis.console.error(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1747:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(427);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},1818:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findSourceMapURL",{enumerable:!0,get:function(){return r}});let r=void 0;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1822:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unresolvedThenable",{enumerable:!0,get:function(){return r}});let r={then:()=>{}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2004:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheByRouterState",{enumerable:!0,get:function(){return o}});let n=r(5637);function o(e,t,r){for(let o in r[1]){let u=r[1][o][0],l=(0,n.createRouterCacheKey)(u),a=t.parallelRoutes.get(o);if(a){let t=new Map(a);t.delete(l),e.parallelRoutes.set(o,t)}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2115:(e,t,r)=>{"use strict";e.exports=r(1426)},2210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{REDIRECT_ERROR_CODE:function(){return o},RedirectType:function(){return u},isRedirectError:function(){return l}});let n=r(4420),o="NEXT_REDIRECT";var u=function(e){return e.push="push",e.replace="replace",e}({});function l(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,u]=t,l=t.slice(2,-2).join(";"),a=Number(t.at(-2));return r===o&&("replace"===u||"push"===u)&&"string"==typeof l&&!isNaN(a)&&a in n.RedirectStatusCode}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2223:(e,t)=>{"use strict";function r(e,t){var r=e.length;for(e.push(t);0>>1,o=e[n];if(0>>1;nu(i,r))cu(s,i)?(e[n]=s,e[c]=r,n=c):(e[n]=i,e[a]=r,n=a);else if(cu(s,r))e[n]=s,e[c]=r,n=c;else break}}return t}function u(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var l,a=performance;t.unstable_now=function(){return a.now()}}else{var i=Date,c=i.now();t.unstable_now=function(){return i.now()-c}}var s=[],f=[],d=1,p=null,h=3,y=!1,_=!1,b=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,m="function"==typeof clearTimeout?clearTimeout:null,E="undefined"!=typeof setImmediate?setImmediate:null;function O(e){for(var t=n(f);null!==t;){if(null===t.callback)o(f);else if(t.startTime<=e)o(f),t.sortIndex=t.expirationTime,r(s,t);else break;t=n(f)}}function R(e){if(b=!1,O(e),!_)if(null!==n(s))_=!0,P||(P=!0,l());else{var t=n(f);null!==t&&A(R,t.startTime-e)}}var P=!1,j=-1,T=5,S=-1;function M(){return!!g||!(t.unstable_now()-Se&&M());){var a=p.callback;if("function"==typeof a){p.callback=null,h=p.priorityLevel;var i=a(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){p.callback=i,O(e),r=!0;break t}p===n(s)&&o(s),O(e)}else o(s);p=n(s)}if(null!==p)r=!0;else{var c=n(f);null!==c&&A(R,c.startTime-e),r=!1}}break e}finally{p=null,h=u,y=!1}}}finally{r?l():P=!1}}}if("function"==typeof E)l=function(){E(w)};else if("undefined"!=typeof MessageChannel){var C=new MessageChannel,x=C.port2;C.port1.onmessage=w,l=function(){x.postMessage(null)}}else l=function(){v(w,0)};function A(e,r){j=v(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=u,r(f,e),null===n(s)&&e===n(f)&&(b?(m(j),j=-1):b=!0,A(R,u-a))):(e.sortIndex=i,r(s,e),_||y||(_=!0,P||(P=!0,l()))),e},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},2312:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return c}});let n=r(5952),o=r(6420);var u=o._("_maxConcurrency"),l=o._("_runningCount"),a=o._("_queue"),i=o._("_processNext");class c{enqueue(e){let t,r,o=new Promise((e,n)=>{t=e,r=n}),u=async()=>{try{n._(this,l)[l]++;let r=await e();t(r)}catch(e){r(e)}finally{n._(this,l)[l]--,n._(this,i)[i]()}};return n._(this,a)[a].push({promiseFn:o,task:u}),n._(this,i)[i](),o}bump(e){let t=n._(this,a)[a].findIndex(t=>t.promiseFn===e);if(t>-1){let e=n._(this,a)[a].splice(t,1)[0];n._(this,a)[a].unshift(e),n._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:s}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),Object.defineProperty(this,a,{writable:!0,value:void 0}),n._(this,u)[u]=e,n._(this,l)[l]=0,n._(this,a)[a]=[]}}function s(e){if(void 0===e&&(e=!1),(n._(this,l)[l]0){var t;null==(t=n._(this,a)[a].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2561:(e,t)=>{"use strict";function r(e){var t;let[r,n,o,u]=e.slice(-4),l=e.slice(0,-4);return{pathToSegment:l.slice(0,-1),segmentPath:l,segment:null!=(t=l[l.length-1])?t:"",tree:r,seedData:n,head:o,isHeadPartial:u,isRootRender:4===e.length}}function n(e){return e.slice(2)}function o(e){return"string"==typeof e?e:e.map(r)}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getFlightDataPartsFromPath:function(){return r},getNextFlightSegmentPath:function(){return n},normalizeFlightData:function(){return o}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2669:(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(9248)},2691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"findHeadInCache",{enumerable:!0,get:function(){return o}});let n=r(5637);function o(e,t){return function e(t,r,o){if(0===Object.keys(r).length)return[t,o];if(r.children){let[u,l]=r.children,a=t.parallelRoutes.get("children");if(a){let t=(0,n.createRouterCacheKey)(u),r=a.get(t);if(r){let n=e(r,l,o+"/"+t);if(n)return n}}}for(let u in r){if("children"===u)continue;let[l,a]=r[u],i=t.parallelRoutes.get(u);if(!i)continue;let c=(0,n.createRouterCacheKey)(l),s=i.get(c);if(!s)continue;let f=e(s,a,o+"/"+c);if(f)return f}return null}(e,t,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2816:(e,t)=>{"use strict";function r(e){let t=parseInt(e.slice(0,2),16),r=t>>1&63,n=Array(6);for(let e=0;e<6;e++){let t=r>>5-e&1;n[e]=1===t}return{type:1==(t>>7&1)?"use-cache":"server-action",usedArgs:n,hasRestArgs:1==(1&t)}}function n(e,t){let r=Array(e.length);for(let n=0;n=6&&t.hasRestArgs)&&(r[n]=e[n]);return r}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{extractInfoFromServerReferenceId:function(){return r},omitUnusedArgs:function(){return n}})},2830:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(8229)._(r(2115)).default.createContext({})},2858:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return u}});let n=r(6494),o=r(2210);function u(e){return(0,o.isRedirectError)(e)||(0,n.isHTTPAccessFallbackError)(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3118:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{fillCacheWithNewSubTreeData:function(){return i},fillCacheWithNewSubTreeDataButOnlyLoading:function(){return c}});let n=r(2004),o=r(4758),u=r(5637),l=r(8291);function a(e,t,r,a,i,c){let{segmentPath:s,seedData:f,tree:d,head:p}=a,h=t,y=r;for(let t=0;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},3269:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_HEADER:function(){return n},FLIGHT_HEADERS:function(){return f},NEXT_DID_POSTPONE_HEADER:function(){return h},NEXT_HMR_REFRESH_HASH_COOKIE:function(){return i},NEXT_HMR_REFRESH_HEADER:function(){return a},NEXT_IS_PRERENDER_HEADER:function(){return b},NEXT_REWRITTEN_PATH_HEADER:function(){return y},NEXT_REWRITTEN_QUERY_HEADER:function(){return _},NEXT_ROUTER_PREFETCH_HEADER:function(){return u},NEXT_ROUTER_SEGMENT_PREFETCH_HEADER:function(){return l},NEXT_ROUTER_STALE_TIME_HEADER:function(){return p},NEXT_ROUTER_STATE_TREE_HEADER:function(){return o},NEXT_RSC_UNION_QUERY:function(){return d},NEXT_URL:function(){return c},RSC_CONTENT_TYPE_HEADER:function(){return s},RSC_HEADER:function(){return r}});let r="RSC",n="Next-Action",o="Next-Router-State-Tree",u="Next-Router-Prefetch",l="Next-Router-Segment-Prefetch",a="Next-HMR-Refresh",i="__next_hmr_refresh_hash__",c="Next-Url",s="text/x-component",f=[r,o,u,a,l],d="_rsc",p="x-nextjs-stale-time",h="x-nextjs-postponed",y="x-nextjs-rewritten-path",_="x-nextjs-rewritten-query",b="x-nextjs-prerender";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"attachHydrationErrorState",{enumerable:!0,get:function(){return u}});let n=r(6465),o=r(9771);function u(e){let t={},r=(0,n.testReactHydrationWarning)(e.message),u=(0,n.isHydrationError)(e);if(!(u||r))return;let l=(0,o.getReactHydrationDiffSegments)(e.message);if(l){let a=l[1];t={...e.details,...o.hydrationErrorState,warning:(a&&!r?null:o.hydrationErrorState.warning)||[(0,n.getDefaultHydrationErrorMessage)(),"",""],notes:r?"":l[0],reactOutputComponentDiff:a},!o.hydrationErrorState.reactOutputComponentDiff&&a&&(o.hydrationErrorState.reactOutputComponentDiff=a),!a&&u&&o.hydrationErrorState.reactOutputComponentDiff&&(t.reactOutputComponentDiff=o.hydrationErrorState.reactOutputComponentDiff)}else o.hydrationErrorState.warning&&(t={...e.details,...o.hydrationErrorState}),o.hydrationErrorState.reactOutputComponentDiff&&(t.reactOutputComponentDiff=o.hydrationErrorState.reactOutputComponentDiff);e.details=t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleMutable",{enumerable:!0,get:function(){return u}});let n=r(8946);function o(e){return void 0!==e}function u(e,t){var r,u;let l=null==(r=t.shouldScroll)||r,a=e.nextUrl;if(o(t.patchedTree)){let r=(0,n.computeChangedPath)(e.tree,t.patchedTree);r?a=r:a||(a=e.canonicalUrl)}return{canonicalUrl:o(t.canonicalUrl)?t.canonicalUrl===e.canonicalUrl?e.canonicalUrl:t.canonicalUrl:e.canonicalUrl,pushRef:{pendingPush:o(t.pendingPush)?t.pendingPush:e.pushRef.pendingPush,mpaNavigation:o(t.mpaNavigation)?t.mpaNavigation:e.pushRef.mpaNavigation,preserveCustomHistoryState:o(t.preserveCustomHistoryState)?t.preserveCustomHistoryState:e.pushRef.preserveCustomHistoryState},focusAndScrollRef:{apply:!!l&&(!!o(null==t?void 0:t.scrollableSegments)||e.focusAndScrollRef.apply),onlyHashChange:t.onlyHashChange||!1,hashFragment:l?t.hashFragment&&""!==t.hashFragment?decodeURIComponent(t.hashFragment.slice(1)):e.focusAndScrollRef.hashFragment:null,segmentPaths:l?null!=(u=null==t?void 0:t.scrollableSegments)?u:e.focusAndScrollRef.segmentPaths:[]},cache:t.cache?t.cache:e.cache,prefetchCache:t.prefetchCache?t.prefetchCache:e.prefetchCache,tree:o(t.patchedTree)?t.patchedTree:e.tree,nextUrl:a}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3558:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRenderParamsFromClient",{enumerable:!0,get:function(){return n}});let n=r(7829).makeUntrackedExoticParams;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return s}});let n=r(1139),o=r(4758),u=r(8946),l=r(1518),a=r(9818),i=r(4908),c=r(2561);function s(e){var t,r;let{navigatedAt:s,initialFlightData:f,initialCanonicalUrlParts:d,initialParallelRoutes:p,location:h,couldBeIntercepted:y,postponed:_,prerendered:b}=e,g=d.join("/"),v=(0,c.getFlightDataPartsFromPath)(f[0]),{tree:m,seedData:E,head:O}=v,R={lazyData:null,rsc:null==E?void 0:E[1],prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:p,loading:null!=(t=null==E?void 0:E[3])?t:null,navigatedAt:s},P=h?(0,n.createHrefFromUrl)(h):g;(0,i.addRefreshMarkerToActiveParallelSegments)(m,P);let j=new Map;(null===p||0===p.size)&&(0,o.fillLazyItemsTillLeafWithHead)(s,R,void 0,m,E,O,void 0);let T={tree:m,cache:R,prefetchCache:j,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:P,nextUrl:null!=(r=(0,u.extractPathFromFlightRouterState)(m)||(null==h?void 0:h.pathname))?r:null};if(h){let e=new URL(""+h.pathname+h.search,h.origin);(0,l.createSeededPrefetchCacheEntry)({url:e,data:{flightData:[v],canonicalUrl:void 0,couldBeIntercepted:!!y,prerendered:b,postponed:_,staleTime:-1},tree:T.tree,prefetchCache:T.prefetchCache,nextUrl:T.nextUrl,kind:b?a.PrefetchKind.FULL:a.PrefetchKind.AUTO})}return T}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3612:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hmrRefreshReducer",{enumerable:!0,get:function(){return n}}),r(8586),r(1139),r(7442),r(9234),r(3894),r(3507),r(878),r(6158),r(6375),r(4108);let n=function(e,t){return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3668:(e,t)=>{"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},3678:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`forbidden()` is experimental and only allowed to be enabled when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E488",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"forbidden",{enumerable:!0,get:function(){return n}}),r(6494).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return l}});let n=r(2115),o=r(9818),u=r(1027);async function l(e,t){return new Promise((r,l)=>{(0,n.startTransition)(()=>{(0,u.dispatchAppRouterAction)({type:o.ACTION_SERVER_ACTION,actionId:e,actionArgs:t,resolve:r,reject:l})})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3894:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{handleExternalUrl:function(){return v},navigateReducer:function(){return function e(t,r){let{url:E,isExternalUrl:O,navigateType:R,shouldScroll:P,allowAliasing:j}=r,T={},{hash:S}=E,M=(0,o.createHrefFromUrl)(E),w="push"===R;if((0,_.prunePrefetchCache)(t.prefetchCache),T.preserveCustomHistoryState=!1,T.pendingPush=w,O)return v(t,T,E.toString(),w);if(document.getElementById("__next-page-redirect"))return v(t,T,M,w);let C=(0,_.getOrCreatePrefetchCacheEntry)({url:E,nextUrl:t.nextUrl,tree:t.tree,prefetchCache:t.prefetchCache,allowAliasing:j}),{treeAtTimeOfPrefetch:x,data:A}=C;return d.prefetchQueue.bump(A),A.then(d=>{let{flightData:_,canonicalUrl:O,postponed:R}=d,j=Date.now(),A=!1;if(C.lastUsedTime||(C.lastUsedTime=j,A=!0),C.aliased){let n=(0,g.handleAliasedPrefetchEntry)(j,t,_,E,T);return!1===n?e(t,{...r,allowAliasing:!1}):n}if("string"==typeof _)return v(t,T,_,w);let N=O?(0,o.createHrefFromUrl)(O):M;if(S&&t.canonicalUrl.split("#",1)[0]===N.split("#",1)[0])return T.onlyHashChange=!0,T.canonicalUrl=N,T.shouldScroll=P,T.hashFragment=S,T.scrollableSegments=[],(0,s.handleMutable)(t,T);let D=t.tree,U=t.cache,L=[];for(let e of _){let{pathToSegment:r,seedData:o,head:s,isHeadPartial:d,isRootRender:_}=e,g=e.tree,O=["",...r],P=(0,l.applyRouterStatePatchToTree)(O,D,g,M);if(null===P&&(P=(0,l.applyRouterStatePatchToTree)(O,x,g,M)),null!==P){if(o&&_&&R){let e=(0,y.startPPRNavigation)(j,U,D,g,o,s,d,!1,L);if(null!==e){if(null===e.route)return v(t,T,M,w);P=e.route;let r=e.node;null!==r&&(T.cache=r);let o=e.dynamicRequestTree;if(null!==o){let r=(0,n.fetchServerResponse)(E,{flightRouterState:o,nextUrl:t.nextUrl});(0,y.listenForDynamicRequest)(e,r)}}else P=g}else{if((0,i.isNavigatingToNewRootLayout)(D,P))return v(t,T,M,w);let n=(0,p.createEmptyCacheNode)(),o=!1;for(let t of(C.status!==c.PrefetchCacheEntryStatus.stale||A?o=(0,f.applyFlightData)(j,U,n,e,C):(o=function(e,t,r,n){let o=!1;for(let u of(e.rsc=t.rsc,e.prefetchRsc=t.prefetchRsc,e.loading=t.loading,e.parallelRoutes=new Map(t.parallelRoutes),m(n).map(e=>[...r,...e])))(0,b.clearCacheNodeDataForSegmentPath)(e,t,u),o=!0;return o}(n,U,r,g),C.lastUsedTime=j),(0,a.shouldHardNavigate)(O,D)?(n.rsc=U.rsc,n.prefetchRsc=U.prefetchRsc,(0,u.invalidateCacheBelowFlightSegmentPath)(n,U,r),T.cache=n):o&&(T.cache=n,U=n),m(g))){let e=[...r,...t];e[e.length-1]!==h.DEFAULT_SEGMENT_KEY&&L.push(e)}}D=P}}return T.patchedTree=D,T.canonicalUrl=N,T.scrollableSegments=L,T.hashFragment=S,T.shouldScroll=P,(0,s.handleMutable)(t,T)},()=>t)}}});let n=r(8586),o=r(1139),u=r(4466),l=r(7442),a=r(5567),i=r(9234),c=r(9818),s=r(3507),f=r(878),d=r(9154),p=r(6158),h=r(8291),y=r(4150),_=r(1518),b=r(9880),g=r(5563);function v(e,t,r,n){return t.mpaNavigation=!0,t.canonicalUrl=r,t.pendingPush=n,t.scrollableSegments=void 0,(0,s.handleMutable)(e,t)}function m(e){let t=[],[r,n]=e;if(0===Object.keys(n).length)return[[r]];for(let[e,o]of Object.entries(n))for(let n of m(o))""===r?t.push([e,...n]):t.push([r,e,...n]);return t}r(6005),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3942:(e,t)=>{"use strict";function r(e){let t=5381;for(let r=0;r>>0}function n(e){return r(e).toString(36).slice(0,5)}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{djb2Hash:function(){return r},hexHash:function(){return n}})},3950:(e,t)=>{"use strict";function r(e,t){let r=e[e.length-1];r&&r.stack===t.stack||e.push(t)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"enqueueConsecutiveDedupedError",{enumerable:!0,get:function(){return r}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(5444).handleGlobalErrors)(),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4074:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(427);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:u}=(0,n.parsePath)(e);return""+t+r+o+u}},4108:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasInterceptionRouteInCurrentTree",{enumerable:!0,get:function(){return function e(t){let[r,o]=t;if(Array.isArray(r)&&("di"===r[2]||"ci"===r[2])||"string"==typeof r&&(0,n.isInterceptionRouteAppPath)(r))return!0;if(o){for(let t in o)if(e(o[t]))return!0}return!1}}});let n=r(7755);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4150:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{abortTask:function(){return h},listenForDynamicRequest:function(){return p},startPPRNavigation:function(){return c},updateCacheNodeOnPopstateRestoration:function(){return function e(t,r){let n=r[1],o=t.parallelRoutes,l=new Map(o);for(let t in n){let r=n[t],a=r[0],i=(0,u.createRouterCacheKey)(a),c=o.get(t);if(void 0!==c){let n=c.get(i);if(void 0!==n){let o=e(n,r),u=new Map(c);u.set(i,o),l.set(t,u)}}}let a=t.rsc,i=b(a)&&"pending"===a.status;return{lazyData:null,rsc:a,head:t.head,prefetchHead:i?t.prefetchHead:[null,null],prefetchRsc:i?t.prefetchRsc:null,loading:t.loading,parallelRoutes:l,navigatedAt:t.navigatedAt}}}});let n=r(8291),o=r(1127),u=r(5637),l=r(9234),a=r(1518),i={route:null,node:null,dynamicRequestTree:null,children:null};function c(e,t,r,l,a,c,d,p,h){return function e(t,r,l,a,c,d,p,h,y,_,b){let g=l[1],v=a[1],m=null!==d?d[2]:null;c||!0===a[4]&&(c=!0);let E=r.parallelRoutes,O=new Map(E),R={},P=null,j=!1,T={};for(let r in v){let l,a=v[r],f=g[r],d=E.get(r),S=null!==m?m[r]:null,M=a[0],w=_.concat([r,M]),C=(0,u.createRouterCacheKey)(M),x=void 0!==f?f[0]:void 0,A=void 0!==d?d.get(C):void 0;if(null!==(l=M===n.DEFAULT_SEGMENT_KEY?void 0!==f?{route:f,node:null,dynamicRequestTree:null,children:null}:s(t,f,a,A,c,void 0!==S?S:null,p,h,w,b):y&&0===Object.keys(a[1]).length?s(t,f,a,A,c,void 0!==S?S:null,p,h,w,b):void 0!==f&&void 0!==x&&(0,o.matchSegment)(M,x)&&void 0!==A&&void 0!==f?e(t,A,f,a,c,S,p,h,y,w,b):s(t,f,a,A,c,void 0!==S?S:null,p,h,w,b))){if(null===l.route)return i;null===P&&(P=new Map),P.set(r,l);let e=l.node;if(null!==e){let t=new Map(d);t.set(C,e),O.set(r,t)}let t=l.route;R[r]=t;let n=l.dynamicRequestTree;null!==n?(j=!0,T[r]=n):T[r]=t}else R[r]=a,T[r]=a}if(null===P)return null;let S={lazyData:null,rsc:r.rsc,prefetchRsc:r.prefetchRsc,head:r.head,prefetchHead:r.prefetchHead,loading:r.loading,parallelRoutes:O,navigatedAt:t};return{route:f(a,R),node:S,dynamicRequestTree:j?f(a,T):null,children:P}}(e,t,r,l,!1,a,c,d,p,[],h)}function s(e,t,r,n,o,c,s,p,h,y){return!o&&(void 0===t||(0,l.isNavigatingToNewRootLayout)(t,r))?i:function e(t,r,n,o,l,i,c,s){let p,h,y,_,b=r[1],g=0===Object.keys(b).length;if(void 0!==n&&n.navigatedAt+a.DYNAMIC_STALETIME_MS>t)p=n.rsc,h=n.loading,y=n.head,_=n.navigatedAt;else if(null===o)return d(t,r,null,l,i,c,s);else if(p=o[1],h=o[3],y=g?l:null,_=t,o[4]||i&&g)return d(t,r,o,l,i,c,s);let v=null!==o?o[2]:null,m=new Map,E=void 0!==n?n.parallelRoutes:null,O=new Map(E),R={},P=!1;if(g)s.push(c);else for(let r in b){let n=b[r],o=null!==v?v[r]:null,a=null!==E?E.get(r):void 0,f=n[0],d=c.concat([r,f]),p=(0,u.createRouterCacheKey)(f),h=e(t,n,void 0!==a?a.get(p):void 0,o,l,i,d,s);m.set(r,h);let y=h.dynamicRequestTree;null!==y?(P=!0,R[r]=y):R[r]=n;let _=h.node;if(null!==_){let e=new Map;e.set(p,_),O.set(r,e)}}return{route:r,node:{lazyData:null,rsc:p,prefetchRsc:null,head:y,prefetchHead:null,loading:h,parallelRoutes:O,navigatedAt:_},dynamicRequestTree:P?f(r,R):null,children:m}}(e,r,n,c,s,p,h,y)}function f(e,t){let r=[e[0],t];return 2 in e&&(r[2]=e[2]),3 in e&&(r[3]=e[3]),4 in e&&(r[4]=e[4]),r}function d(e,t,r,n,o,l,a){let i=f(t,t[1]);return i[3]="refetch",{route:t,node:function e(t,r,n,o,l,a,i){let c=r[1],s=null!==n?n[2]:null,f=new Map;for(let r in c){let n=c[r],d=null!==s?s[r]:null,p=n[0],h=a.concat([r,p]),y=(0,u.createRouterCacheKey)(p),_=e(t,n,void 0===d?null:d,o,l,h,i),b=new Map;b.set(y,_),f.set(r,b)}let d=0===f.size;d&&i.push(a);let p=null!==n?n[1]:null,h=null!==n?n[3]:null;return{lazyData:null,parallelRoutes:f,prefetchRsc:void 0!==p?p:null,prefetchHead:d?o:[null,null],loading:void 0!==h?h:null,rsc:g(),head:d?g():null,navigatedAt:t}}(e,t,r,n,o,l,a),dynamicRequestTree:i,children:null}}function p(e,t){t.then(t=>{let{flightData:r}=t;if("string"!=typeof r){for(let t of r){let{segmentPath:r,tree:n,seedData:l,head:a}=t;l&&function(e,t,r,n,l){let a=e;for(let e=0;e{h(e,t)})}function h(e,t){let r=e.node;if(null===r)return;let n=e.children;if(null===n)y(e.route,r,t);else for(let e of n.values())h(e,t);e.dynamicRequestTree=null}function y(e,t,r){let n=e[1],o=t.parallelRoutes;for(let e in n){let t=n[e],l=o.get(e);if(void 0===l)continue;let a=t[0],i=(0,u.createRouterCacheKey)(a),c=l.get(i);void 0!==c&&y(t,c,r)}let l=t.rsc;b(l)&&(null===r?l.resolve(null):l.reject(r));let a=t.head;b(a)&&a.resolve(null)}let _=Symbol();function b(e){return e&&e.tag===_}function g(){let e,t,r=new Promise((r,n)=>{e=r,t=n});return r.status="pending",r.resolve=t=>{"pending"===r.status&&(r.status="fulfilled",r.value=t,e(t))},r.reject=e=>{"pending"===r.status&&(r.status="rejected",r.reason=e,t(e))},r.tag=_,r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4189:(e,t)=>{"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange)return void e();let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},4420:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r=function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4466:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"invalidateCacheBelowFlightSegmentPath",{enumerable:!0,get:function(){return function e(t,r,u){let l=u.length<=2,[a,i]=u,c=(0,n.createRouterCacheKey)(i),s=r.parallelRoutes.get(a);if(!s)return;let f=t.parallelRoutes.get(a);if(f&&f!==s||(f=new Map(s),t.parallelRoutes.set(a,f)),l)return void f.delete(c);let d=s.get(c),p=f.get(c);p&&d&&(p===d&&(p={lazyData:p.lazyData,rsc:p.rsc,prefetchRsc:p.prefetchRsc,head:p.head,prefetchHead:p.prefetchHead,parallelRoutes:new Map(p.parallelRoutes)},f.set(c,p)),e(p,d,(0,o.getNextFlightSegmentPath)(u)))}}});let n=r(5637),o=r(2561);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4486:(e,t,r)=>{"use strict";let n,o;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return D}});let u=r(8229),l=r(6966),a=r(5155);r(6446),r(6002),r(3954);let i=u._(r(2669)),c=l._(r(2115)),s=r(4979),f=r(2830),d=r(6698),p=r(9155),h=r(3806),y=r(1818),_=r(6634),b=u._(r(6158)),g=r(3567);r(5227);let v=r(5624),m=document,E=new TextEncoder,O=!1,R=!1,P=null;function j(e){if(0===e[0])n=[];else if(1===e[0]){if(!n)throw Object.defineProperty(Error("Unexpected server data: missing bootstrap script."),"__NEXT_ERROR_CODE",{value:"E18",enumerable:!1,configurable:!0});o?o.enqueue(E.encode(e[1])):n.push(e[1])}else if(2===e[0])P=e[1];else if(3===e[0]){if(!n)throw Object.defineProperty(Error("Unexpected server data: missing bootstrap script."),"__NEXT_ERROR_CODE",{value:"E18",enumerable:!1,configurable:!0});let r=atob(e[1]),u=new Uint8Array(r.length);for(var t=0;t{e.enqueue("string"==typeof t?E.encode(t):t)}),O&&!R)&&(null===e.desiredSize||e.desiredSize<0?e.error(Object.defineProperty(Error("The connection to the page was unexpectedly closed, possibly due to the stop button being clicked, loss of Wi-Fi, or an unstable internet connection."),"__NEXT_ERROR_CODE",{value:"E117",enumerable:!1,configurable:!0})):e.close(),R=!0,n=void 0),o=e}}),w=(0,s.createFromReadableStream)(M,{callServer:h.callServer,findSourceMapURL:y.findSourceMapURL});function C(e){let{pendingActionQueue:t}=e,r=(0,c.use)(w),n=(0,c.use)(t);return(0,a.jsx)(b.default,{actionQueue:n,globalErrorComponentAndStyles:r.G,assetPrefix:r.p})}let x=c.default.StrictMode;function A(e){let{children:t}=e;return t}let N={onRecoverableError:d.onRecoverableError,onCaughtError:p.onCaughtError,onUncaughtError:p.onUncaughtError};function D(e){let t=new Promise((t,r)=>{w.then(r=>{(0,v.setAppBuildId)(r.b);let n=Date.now();t((0,_.createMutableActionQueue)((0,g.createInitialRouterState)({navigatedAt:n,initialFlightData:r.f,initialCanonicalUrlParts:r.c,initialParallelRoutes:new Map,location:window.location,couldBeIntercepted:r.i,postponed:r.s,prerendered:r.S}),e))},e=>r(e))}),r=(0,a.jsx)(x,{children:(0,a.jsx)(f.HeadManagerContext.Provider,{value:{appDir:!0},children:(0,a.jsx)(A,{children:(0,a.jsx)(C,{pendingActionQueue:t})})})});"__next_error__"===document.documentElement.id?i.default.createRoot(m,N).render(r):c.default.startTransition(()=>{i.default.hydrateRoot(m,r,{...N,formState:P})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4758:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function e(t,r,u,l,a,i,c){if(0===Object.keys(l[1]).length){r.head=i;return}for(let s in l[1]){let f,d=l[1][s],p=d[0],h=(0,n.createRouterCacheKey)(p),y=null!==a&&void 0!==a[2][s]?a[2][s]:null;if(u){let n=u.parallelRoutes.get(s);if(n){let u,l=(null==c?void 0:c.kind)==="auto"&&c.status===o.PrefetchCacheEntryStatus.reusable,a=new Map(n),f=a.get(h);u=null!==y?{lazyData:null,rsc:y[1],prefetchRsc:null,head:null,prefetchHead:null,loading:y[3],parallelRoutes:new Map(null==f?void 0:f.parallelRoutes),navigatedAt:t}:l&&f?{lazyData:f.lazyData,rsc:f.rsc,prefetchRsc:f.prefetchRsc,head:f.head,prefetchHead:f.prefetchHead,parallelRoutes:new Map(f.parallelRoutes),loading:f.loading}:{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map(null==f?void 0:f.parallelRoutes),loading:null,navigatedAt:t},a.set(h,u),e(t,u,f,d,y||null,i,c),r.parallelRoutes.set(s,a);continue}}if(null!==y){let e=y[1],r=y[3];f={lazyData:null,rsc:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:r,navigatedAt:t}}else f={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:t};let _=r.parallelRoutes.get(s);_?_.set(h,f):r.parallelRoutes.set(s,new Map([[h,f]])),e(t,f,void 0,d,y,i,c)}}}});let n=r(5637),o=r(9818);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4819:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return u}});let n=r(1139),o=r(8946);function u(e,t){var r;let{url:u,tree:l}=t,a=(0,n.createHrefFromUrl)(u),i=l||e.tree,c=e.cache;return{canonicalUrl:a,pushRef:{pendingPush:!1,mpaNavigation:!1,preserveCustomHistoryState:!0},focusAndScrollRef:e.focusAndScrollRef,cache:c,prefetchCache:e.prefetchCache,tree:i,nextUrl:null!=(r=(0,o.extractPathFromFlightRouterState)(i))?r:u.pathname}}r(4150),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4882:(e,t,r)=>{"use strict";function n(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(7102),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4908:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{addRefreshMarkerToActiveParallelSegments:function(){return function e(t,r){let[n,o,,l]=t;for(let a in n.includes(u.PAGE_SEGMENT_KEY)&&"refresh"!==l&&(t[2]=r,t[3]="refresh"),o)e(o[a],r)}},refreshInactiveParallelSegments:function(){return l}});let n=r(878),o=r(8586),u=r(8291);async function l(e){let t=new Set;await a({...e,rootTree:e.updatedTree,fetchedSegments:t})}async function a(e){let{navigatedAt:t,state:r,updatedTree:u,updatedCache:l,includeNextUrl:i,fetchedSegments:c,rootTree:s=u,canonicalUrl:f}=e,[,d,p,h]=u,y=[];if(p&&p!==f&&"refresh"===h&&!c.has(p)){c.add(p);let e=(0,o.fetchServerResponse)(new URL(p,location.origin),{flightRouterState:[s[0],s[1],s[2],"refetch"],nextUrl:i?r.nextUrl:null}).then(e=>{let{flightData:r}=e;if("string"!=typeof r)for(let e of r)(0,n.applyFlightData)(t,l,l,e)});y.push(e)}for(let e in d){let n=a({navigatedAt:t,state:r,updatedTree:d[e],updatedCache:l,includeNextUrl:i,fetchedSegments:c,rootTree:s,canonicalUrl:f});y.push(n)}await Promise.all(y)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4911:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AsyncMetadata:function(){return u},AsyncMetadataOutlet:function(){return a}});let n=r(5155),o=r(2115),u=r(1536).BrowserResolvedMetadata;function l(e){let{promise:t}=e,{error:r,digest:n}=(0,o.use)(t);if(r)throw n&&(r.digest=n),r;return null}function a(e){let{promise:t}=e;return(0,n.jsx)(o.Suspense,{fallback:null,children:(0,n.jsx)(l,{promise:t})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{IDLE_LINK_STATUS:function(){return c},PENDING_LINK_STATUS:function(){return i},mountFormInstance:function(){return g},mountLinkInstance:function(){return b},onLinkVisibilityChanged:function(){return m},onNavigationIntent:function(){return E},pingVisibleLinks:function(){return R},setLinkForCurrentNavigation:function(){return s},unmountLinkForCurrentNavigation:function(){return f},unmountPrefetchableInstance:function(){return v}}),r(6634);let n=r(6158),o=r(9818),u=r(6005),l=r(2115),a=null,i={pending:!0},c={pending:!1};function s(e){(0,l.startTransition)(()=>{null==a||a.setOptimisticLinkStatus(c),null==e||e.setOptimisticLinkStatus(i),a=e})}function f(e){a===e&&(a=null)}let d="function"==typeof WeakMap?new WeakMap:new Map,p=new Set,h="function"==typeof IntersectionObserver?new IntersectionObserver(function(e){for(let t of e){let e=t.intersectionRatio>0;m(t.target,e)}},{rootMargin:"200px"}):null;function y(e,t){void 0!==d.get(e)&&v(e),d.set(e,t),null!==h&&h.observe(e)}function _(e){try{return(0,n.createPrefetchURL)(e)}catch(t){return("function"==typeof reportError?reportError:console.error)("Cannot prefetch '"+e+"' because it cannot be converted to a URL."),null}}function b(e,t,r,n,o,u){if(o){let o=_(t);if(null!==o){let t={router:r,kind:n,isVisible:!1,wasHoveredOrTouched:!1,prefetchTask:null,cacheVersion:-1,prefetchHref:o.href,setOptimisticLinkStatus:u};return y(e,t),t}}return{router:r,kind:n,isVisible:!1,wasHoveredOrTouched:!1,prefetchTask:null,cacheVersion:-1,prefetchHref:null,setOptimisticLinkStatus:u}}function g(e,t,r,n){let o=_(t);null!==o&&y(e,{router:r,kind:n,isVisible:!1,wasHoveredOrTouched:!1,prefetchTask:null,cacheVersion:-1,prefetchHref:o.href,setOptimisticLinkStatus:null})}function v(e){let t=d.get(e);if(void 0!==t){d.delete(e),p.delete(t);let r=t.prefetchTask;null!==r&&(0,u.cancelPrefetchTask)(r)}null!==h&&h.unobserve(e)}function m(e,t){let r=d.get(e);void 0!==r&&(r.isVisible=t,t?p.add(r):p.delete(r),O(r))}function E(e,t){let r=d.get(e);void 0!==r&&void 0!==r&&(r.wasHoveredOrTouched=!0,O(r))}function O(e){var t;let r=e.prefetchTask;if(!e.isVisible){null!==r&&(0,u.cancelPrefetchTask)(r);return}t=e,(async()=>t.router.prefetch(t.prefetchHref,{kind:t.kind}))().catch(e=>{})}function R(e,t){let r=(0,u.getCurrentCacheVersion)();for(let n of p){let l=n.prefetchTask;if(null!==l&&n.cacheVersion===r&&l.key.nextUrl===e&&l.treeAtTimeOfPrefetch===t)continue;null!==l&&(0,u.cancelPrefetchTask)(l);let a=(0,u.createCacheKey)(n.prefetchHref,e),i=n.wasHoveredOrTouched?u.PrefetchPriority.Intent:u.PrefetchPriority.Default;n.prefetchTask=(0,u.schedulePrefetchTask)(a,t,n.kind===o.PrefetchKind.FULL,i),n.cacheVersion=(0,u.getCurrentCacheVersion)()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4970:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ClientSegmentRoot",{enumerable:!0,get:function(){return o}});let n=r(5155);function o(e){let{Component:t,slots:o,params:u,promise:l}=e;{let{createRenderParamsFromClient:e}=r(3558),l=e(u);return(0,n.jsx)(t,{...o,params:l})}}r(9837),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4979:(e,t,r)=>{"use strict";e.exports=r(7197)},5072:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTML_LIMITED_BOT_UA_RE",{enumerable:!0,get:function(){return r}});let r=/Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti/i},5122:(e,t)=>{"use strict";function r(e){return null!==e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isThenable",{enumerable:!0,get:function(){return r}})},5128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getReactStitchedError",{enumerable:!0,get:function(){return c}});let n=r(8229),o=n._(r(2115)),u=n._(r(5807)),l=r(9148),a="react-stack-bottom-frame",i=RegExp("(at "+a+" )|("+a+"\\@)");function c(e){let t=(0,u.default)(e),r=t&&e.stack||"",n=t?e.message:"",a=r.split("\n"),c=a.findIndex(e=>i.test(e)),s=c>=0?a.slice(0,c).join("\n"):r,f=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return Object.assign(f,e),(0,l.copyNextErrorCode)(e,f),f.stack=s,function(e){if(!o.default.captureOwnerStack)return;let t=e.stack||"",r=o.default.captureOwnerStack();r&&!1===t.endsWith(r)&&(e.stack=t+=r)}(f),f}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5155:(e,t,r)=>{"use strict";e.exports=r(6897)},5169:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatConsoleArgs:function(){return u},parseConsoleArgs:function(){return l}});let n=r(8229)._(r(5807));function o(e,t){switch(typeof e){case"object":if(null===e)return"null";if(Array.isArray(e)){let r="[";if(t<1)for(let n=0;n0?"...":"";return r+"]"}{if(e instanceof Error)return e+"";let r=Object.keys(e),n="{";if(t<1)for(let u=0;u0?"...":"";return n+"}"}case"string":return JSON.stringify(e);default:return String(e)}}function u(e){let t,r;"string"==typeof e[0]?(t=e[0],r=1):(t="",r=0);let n="",u=!1;for(let l=0;l=e.length){n+=a;continue}let i=t[++l];switch(i){case"c":n=u?""+n+"]":"["+n,u=!u,r++;break;case"O":case"o":n+=o(e[r++],0);break;case"d":case"i":n+=parseInt(e[r++],10);break;case"f":n+=parseFloat(e[r++]);break;case"s":n+=String(e[r++]);break;default:n+="%"+i}}for(;r0?" ":"")+o(e[r],0);return n}function l(e){if(e.length>3&&"string"==typeof e[0]&&e[0].startsWith("%c%s%c ")&&"string"==typeof e[1]&&"string"==typeof e[2]&&"string"==typeof e[3]){let t=e[2],r=e[4];return{environmentName:t.trim(),error:(0,n.default)(r)?r:null}}return{environmentName:null,error:null}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5209:(e,t)=>{"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},5227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return l},LayoutRouterContext:function(){return u},MissingSlotContext:function(){return i},TemplateContext:function(){return a}});let n=r(8229)._(r(2115)),o=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(new Set)},5262:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},5415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(5449);let n=r(6188),o=r(1408);(0,n.appBootstrap)(()=>{let{hydrate:e}=r(4486);r(6158),r(7555),e(o)}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5444:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{handleClientError:function(){return v},handleConsoleError:function(){return g},handleGlobalErrors:function(){return R},useErrorHandler:function(){return m}});let n=r(8229),o=r(2115),u=r(3506),l=r(2858),a=r(9771),i=r(5169),c=n._(r(5807)),s=r(6043),f=r(3950),d=r(5128),p=globalThis.queueMicrotask||(e=>Promise.resolve().then(e)),h=[],y=[],_=[],b=[];function g(e,t){let r,{environmentName:n}=(0,i.parseConsoleArgs)(t);for(let o of(r=(0,c.default)(e)?(0,s.createConsoleError)(e,n):(0,s.createConsoleError)((0,i.formatConsoleArgs)(t),n),r=(0,d.getReactStitchedError)(r),(0,a.storeHydrationErrorStateFromConsoleArgs)(...t),(0,u.attachHydrationErrorState)(r),(0,f.enqueueConsecutiveDedupedError)(h,r),y))p(()=>{o(r)})}function v(e){let t;for(let r of(t=(0,c.default)(e)?e:Object.defineProperty(Error(e+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),t=(0,d.getReactStitchedError)(t),(0,u.attachHydrationErrorState)(t),(0,f.enqueueConsecutiveDedupedError)(h,t),y))p(()=>{r(t)})}function m(e,t){(0,o.useEffect)(()=>(h.forEach(e),_.forEach(t),y.push(e),b.push(t),()=>{y.splice(y.indexOf(e),1),b.splice(b.indexOf(t),1),h.splice(0,h.length),_.splice(0,_.length)}),[e,t])}function E(e){if((0,l.isNextRouterError)(e.error))return e.preventDefault(),!1;e.error&&v(e.error)}function O(e){let t=null==e?void 0:e.reason;if((0,l.isNextRouterError)(t))return void e.preventDefault();let r=t;for(let e of(r&&!(0,c.default)(r)&&(r=Object.defineProperty(Error(r+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})),_.push(r),b))e(r)}function R(){try{Error.stackTraceLimit=50}catch(e){}window.addEventListener("error",E),window.addEventListener("unhandledrejection",O)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5449:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(3668);let n=r(589);{let e=r.u;r.u=function(){for(var t=arguments.length,r=Array(t),o=0;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return h}});let n=r(8586),o=r(1139),u=r(7442),l=r(9234),a=r(3894),i=r(3507),c=r(4758),s=r(6158),f=r(6375),d=r(4108),p=r(4908);function h(e,t){let{origin:r}=t,h={},y=e.canonicalUrl,_=e.tree;h.preserveCustomHistoryState=!1;let b=(0,s.createEmptyCacheNode)(),g=(0,d.hasInterceptionRouteInCurrentTree)(e.tree);b.lazyData=(0,n.fetchServerResponse)(new URL(y,r),{flightRouterState:[_[0],_[1],_[2],"refetch"],nextUrl:g?e.nextUrl:null});let v=Date.now();return b.lazyData.then(async r=>{let{flightData:n,canonicalUrl:s}=r;if("string"==typeof n)return(0,a.handleExternalUrl)(e,h,n,e.pushRef.pendingPush);for(let r of(b.lazyData=null,n)){let{tree:n,seedData:i,head:d,isRootRender:m}=r;if(!m)return console.log("REFRESH FAILED"),e;let E=(0,u.applyRouterStatePatchToTree)([""],_,n,e.canonicalUrl);if(null===E)return(0,f.handleSegmentMismatch)(e,t,n);if((0,l.isNavigatingToNewRootLayout)(_,E))return(0,a.handleExternalUrl)(e,h,y,e.pushRef.pendingPush);let O=s?(0,o.createHrefFromUrl)(s):void 0;if(s&&(h.canonicalUrl=O),null!==i){let e=i[1],t=i[3];b.rsc=e,b.prefetchRsc=null,b.loading=t,(0,c.fillLazyItemsTillLeafWithHead)(v,b,void 0,n,i,d,void 0),h.prefetchCache=new Map}await (0,p.refreshInactiveParallelSegments)({navigatedAt:v,state:e,updatedTree:E,updatedCache:b,includeNextUrl:g,canonicalUrl:h.canonicalUrl||e.canonicalUrl}),h.cache=b,h.patchedTree=E,_=E}return(0,i.handleMutable)(e,h)},()=>e)}r(6005),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5563:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{addSearchParamsToPageSegments:function(){return f},handleAliasedPrefetchEntry:function(){return s}});let n=r(8291),o=r(6158),u=r(7442),l=r(1139),a=r(5637),i=r(3118),c=r(3507);function s(e,t,r,s,d){let p,h=t.tree,y=t.cache,_=(0,l.createHrefFromUrl)(s);if("string"==typeof r)return!1;for(let t of r){if(!function e(t){if(!t)return!1;let r=t[2];if(t[3])return!0;for(let t in r)if(e(r[t]))return!0;return!1}(t.seedData))continue;let r=t.tree;r=f(r,Object.fromEntries(s.searchParams));let{seedData:l,isRootRender:c,pathToSegment:d}=t,b=["",...d];r=f(r,Object.fromEntries(s.searchParams));let g=(0,u.applyRouterStatePatchToTree)(b,h,r,_),v=(0,o.createEmptyCacheNode)();if(c&&l){let t=l[1];v.loading=l[3],v.rsc=t,function e(t,r,o,u,l){if(0!==Object.keys(u[1]).length)for(let i in u[1]){let c,s=u[1][i],f=s[0],d=(0,a.createRouterCacheKey)(f),p=null!==l&&void 0!==l[2][i]?l[2][i]:null;if(null!==p){let e=p[1],r=p[3];c={lazyData:null,rsc:f.includes(n.PAGE_SEGMENT_KEY)?null:e,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:r,navigatedAt:t}}else c={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:-1};let h=r.parallelRoutes.get(i);h?h.set(d,c):r.parallelRoutes.set(i,new Map([[d,c]])),e(t,c,o,s,p)}}(e,v,y,r,l)}else v.rsc=y.rsc,v.prefetchRsc=y.prefetchRsc,v.loading=y.loading,v.parallelRoutes=new Map(y.parallelRoutes),(0,i.fillCacheWithNewSubTreeDataButOnlyLoading)(e,v,y,t);g&&(h=g,y=v,p=!0)}return!!p&&(d.patchedTree=h,d.cache=y,d.canonicalUrl=_,d.hashFragment=s.hash,(0,c.handleMutable)(t,d))}function f(e,t){let[r,o,...u]=e;if(r.includes(n.PAGE_SEGMENT_KEY))return[(0,n.addSearchParamsIfPageSegment)(r,t),o,...u];let l={};for(let[e,r]of Object.entries(o))l[e]=f(r,t);return[r,l,...u]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function e(t,r){let[u,l]=r,[a,i]=t;return(0,o.matchSegment)(a,u)?!(t.length<=2)&&e((0,n.getNextFlightSegmentPath)(t),l[i]):!!Array.isArray(a)}}});let n=r(2561),o=r(1127);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5618:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return s},RedirectType:function(){return o.RedirectType},forbidden:function(){return l.forbidden},notFound:function(){return u.notFound},permanentRedirect:function(){return n.permanentRedirect},redirect:function(){return n.redirect},unauthorized:function(){return a.unauthorized},unstable_rethrow:function(){return i.unstable_rethrow}});let n=r(6825),o=r(2210),u=r(8527),l=r(3678),a=r(9187),i=r(7599);class c extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class s extends URLSearchParams{append(){throw new c}delete(){throw new c}set(){throw new c}sort(){throw new c}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5624:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getAppBuildId:function(){return o},setAppBuildId:function(){return n}});let r="";function n(e){r=e}function o(){return r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5637:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return o}});let n=r(8291);function o(e,t){return(void 0===t&&(t=!1),Array.isArray(e))?e[0]+"|"+e[1]+"|"+e[2]:t&&e.startsWith(n.PAGE_SEGMENT_KEY)?n.PAGE_SEGMENT_KEY:e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return u}});let n=r(5209);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function u(e){return o(e)?e:Object.defineProperty(Error((0,n.isPlainObject)(e)?function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e):e+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},5929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return u}});let n=r(4074),o=r(214);function u(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5952:(e,t,r)=>{"use strict";function n(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}r.r(t),r.d(t,{_:()=>n})},6002:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(0,r(6905).patchConsoleError)(),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6005:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{NavigationResultTag:function(){return f},PrefetchPriority:function(){return d},cancelPrefetchTask:function(){return i},createCacheKey:function(){return s},getCurrentCacheVersion:function(){return l},navigate:function(){return o},prefetch:function(){return n},reschedulePrefetchTask:function(){return c},revalidateEntireCache:function(){return u},schedulePrefetchTask:function(){return a}});let r=()=>{throw Object.defineProperty(Error("Segment Cache experiment is not enabled. This is a bug in Next.js."),"__NEXT_ERROR_CODE",{value:"E654",enumerable:!1,configurable:!0})},n=r,o=r,u=r,l=r,a=r,i=r,c=r,s=r;var f=function(e){return e[e.MPA=0]="MPA",e[e.Success=1]="Success",e[e.NoOp=2]="NoOp",e[e.Async=3]="Async",e}({}),d=function(e){return e[e.Intent=2]="Intent",e[e.Default=1]="Default",e[e.Background=0]="Background",e}({});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6043:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createConsoleError:function(){return o},getConsoleErrorType:function(){return l},isConsoleError:function(){return u}});let r=Symbol.for("next.console.error.digest"),n=Symbol.for("next.console.error.type");function o(e,t){let o="string"==typeof e?Object.defineProperty(Error(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}):e;return o[r]="NEXT_CONSOLE_ERROR",o[n]="string"==typeof e?"string":"error",t&&!o.environmentName&&(o.environmentName=t),o}let u=e=>e&&"NEXT_CONSOLE_ERROR"===e[r],l=e=>e[n];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6158:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createEmptyCacheNode:function(){return w},createPrefetchURL:function(){return S},default:function(){return N},isExternalURL:function(){return T}});let n=r(6966),o=r(5155),u=n._(r(2115)),l=r(5227),a=r(9818),i=r(1139),c=r(886),s=r(1027),f=n._(r(6614)),d=r(774),p=r(5929),h=r(7760),y=r(686),_=r(2691),b=r(1822),g=r(4882),v=r(7102),m=r(8946),E=r(8836),O=r(6634),R=r(6825),P=r(2210);r(4930);let j={};function T(e){return e.origin!==window.location.origin}function S(e){let t;if((0,d.isBot)(window.navigator.userAgent))return null;try{t=new URL((0,p.addBasePath)(e),window.location.href)}catch(t){throw Object.defineProperty(Error("Cannot prefetch '"+e+"' because it cannot be converted to a URL."),"__NEXT_ERROR_CODE",{value:"E234",enumerable:!1,configurable:!0})}return T(t)?null:t}function M(e){let{appRouterState:t}=e;return(0,u.useInsertionEffect)(()=>{let{tree:e,pushRef:r,canonicalUrl:n}=t,o={...r.preserveCustomHistoryState?window.history.state:{},__NA:!0,__PRIVATE_NEXTJS_INTERNALS_TREE:e};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==n?(r.pendingPush=!1,window.history.pushState(o,"",n)):window.history.replaceState(o,"",n)},[t]),(0,u.useEffect)(()=>{},[t.nextUrl,t.tree]),null}function w(){return{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:-1}}function C(e){null==e&&(e={});let t=window.history.state,r=null==t?void 0:t.__NA;r&&(e.__NA=r);let n=null==t?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;return n&&(e.__PRIVATE_NEXTJS_INTERNALS_TREE=n),e}function x(e){let{headCacheNode:t}=e,r=null!==t?t.head:null,n=null!==t?t.prefetchHead:null,o=null!==n?n:r;return(0,u.useDeferredValue)(r,o)}function A(e){let t,{actionQueue:r,assetPrefix:n,globalError:i}=e,d=(0,s.useActionQueue)(r),{canonicalUrl:p}=d,{searchParams:E,pathname:T}=(0,u.useMemo)(()=>{let e=new URL(p,window.location.href);return{searchParams:e.searchParams,pathname:(0,v.hasBasePath)(e.pathname)?(0,g.removeBasePath)(e.pathname):e.pathname}},[p]);(0,u.useEffect)(()=>{function e(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE)&&(j.pendingMpaPath=void 0,(0,s.dispatchAppRouterAction)({type:a.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.__PRIVATE_NEXTJS_INTERNALS_TREE}))}return window.addEventListener("pageshow",e),()=>{window.removeEventListener("pageshow",e)}},[]),(0,u.useEffect)(()=>{function e(e){let t="reason"in e?e.reason:e.error;if((0,P.isRedirectError)(t)){e.preventDefault();let r=(0,R.getURLFromRedirectError)(t);(0,R.getRedirectTypeFromError)(t)===P.RedirectType.push?O.publicAppRouterInstance.push(r,{}):O.publicAppRouterInstance.replace(r,{})}}return window.addEventListener("error",e),window.addEventListener("unhandledrejection",e),()=>{window.removeEventListener("error",e),window.removeEventListener("unhandledrejection",e)}},[]);let{pushRef:S}=d;if(S.mpaNavigation){if(j.pendingMpaPath!==p){let e=window.location;S.pendingPush?e.assign(p):e.replace(p),j.pendingMpaPath=p}(0,u.use)(b.unresolvedThenable)}(0,u.useEffect)(()=>{let e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history),r=e=>{var t;let r=window.location.href,n=null==(t=window.history.state)?void 0:t.__PRIVATE_NEXTJS_INTERNALS_TREE;(0,u.startTransition)(()=>{(0,s.dispatchAppRouterAction)({type:a.ACTION_RESTORE,url:new URL(null!=e?e:r,r),tree:n})})};window.history.pushState=function(t,n,o){return(null==t?void 0:t.__NA)||(null==t?void 0:t._N)||(t=C(t),o&&r(o)),e(t,n,o)},window.history.replaceState=function(e,n,o){return(null==e?void 0:e.__NA)||(null==e?void 0:e._N)||(e=C(e),o&&r(o)),t(e,n,o)};let n=e=>{if(e.state){if(!e.state.__NA)return void window.location.reload();(0,u.startTransition)(()=>{(0,O.dispatchTraverseAction)(window.location.href,e.state.__PRIVATE_NEXTJS_INTERNALS_TREE)})}};return window.addEventListener("popstate",n),()=>{window.history.pushState=e,window.history.replaceState=t,window.removeEventListener("popstate",n)}},[]);let{cache:w,tree:A,nextUrl:N,focusAndScrollRef:D}=d,U=(0,u.useMemo)(()=>(0,_.findHeadInCache)(w,A[1]),[w,A]),k=(0,u.useMemo)(()=>(0,m.getSelectedParams)(A),[A]),I=(0,u.useMemo)(()=>({parentTree:A,parentCacheNode:w,parentSegmentPath:null,url:p}),[A,w,p]),H=(0,u.useMemo)(()=>({tree:A,focusAndScrollRef:D,nextUrl:N}),[A,D,N]);if(null!==U){let[e,r]=U;t=(0,o.jsx)(x,{headCacheNode:e},r)}else t=null;let F=(0,o.jsxs)(y.RedirectBoundary,{children:[t,w.rsc,(0,o.jsx)(h.AppRouterAnnouncer,{tree:A})]});return F=(0,o.jsx)(f.ErrorBoundary,{errorComponent:i[0],errorStyles:i[1],children:F}),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(M,{appRouterState:d}),(0,o.jsx)(L,{}),(0,o.jsx)(c.PathParamsContext.Provider,{value:k,children:(0,o.jsx)(c.PathnameContext.Provider,{value:T,children:(0,o.jsx)(c.SearchParamsContext.Provider,{value:E,children:(0,o.jsx)(l.GlobalLayoutRouterContext.Provider,{value:H,children:(0,o.jsx)(l.AppRouterContext.Provider,{value:O.publicAppRouterInstance,children:(0,o.jsx)(l.LayoutRouterContext.Provider,{value:I,children:F})})})})})})]})}function N(e){let{actionQueue:t,globalErrorComponentAndStyles:[r,n],assetPrefix:u}=e;return(0,E.useNavFailureHandler)(),(0,o.jsx)(f.ErrorBoundary,{errorComponent:f.default,children:(0,o.jsx)(A,{actionQueue:t,assetPrefix:u,globalError:[r,n]})})}let D=new Set,U=new Set;function L(){let[,e]=u.default.useState(0),t=D.size;return(0,u.useEffect)(()=>{let r=()=>e(e=>e+1);return U.add(r),t!==D.size&&r(),()=>{U.delete(r)}},[t,e]),[...D].map((e,t)=>(0,o.jsx)("link",{rel:"stylesheet",href:""+e,precedence:"next"},t))}globalThis._N_E_STYLE_LOAD=function(e){let t=D.size;return D.add(e),D.size!==t&&U.forEach(e=>e()),Promise.resolve()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6188:(e,t)=>{"use strict";function r(e){var t,r;t=self.__next_s,r=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[r,n]=t;return e.then(()=>new Promise((e,t)=>{let o=document.createElement("script");if(n)for(let e in n)"children"!==e&&o.setAttribute(e,n[e]);r?(o.src=r,o.onload=()=>e(),o.onerror=t):n&&(o.innerHTML=n.children,setTimeout(e)),document.head.appendChild(o)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return r}}),window.next={version:"15.3.2",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6206:(e,t,r)=>{"use strict";e.exports=r(2223)},6361:(e,t)=>{"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},6375:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSegmentMismatch",{enumerable:!0,get:function(){return o}});let n=r(3894);function o(e,t,r){return(0,n.handleExternalUrl)(e,{},e.canonicalUrl,!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{_:()=>o});var n=0;function o(e){return"__private_"+n+++"_"+e}},6446:()=>{"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},6465:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{NEXTJS_HYDRATION_ERROR_LINK:function(){return i},REACT_HYDRATION_ERROR_LINK:function(){return a},getDefaultHydrationErrorMessage:function(){return c},getHydrationErrorStackInfo:function(){return h},isHydrationError:function(){return s},isReactHydrationErrorMessage:function(){return f},testReactHydrationWarning:function(){return p}});let n=r(8229)._(r(5807)),o=/hydration failed|while hydrating|content does not match|did not match|HTML didn't match|text didn't match/i,u="Hydration failed because the server rendered HTML didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:",l=[u,"Hydration failed because the server rendered text didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:","A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:"],a="https://react.dev/link/hydration-mismatch",i="https://nextjs.org/docs/messages/react-hydration-error",c=()=>u;function s(e){return(0,n.default)(e)&&o.test(e.message)}function f(e){return l.some(t=>e.startsWith(t))}let d=[/^In HTML, (.+?) cannot be a child of <(.+?)>\.(.*)\nThis will cause a hydration error\.(.*)/,/^In HTML, (.+?) cannot be a descendant of <(.+?)>\.\nThis will cause a hydration error\.(.*)/,/^In HTML, text nodes cannot be a child of <(.+?)>\.\nThis will cause a hydration error\./,/^In HTML, whitespace text nodes cannot be a child of <(.+?)>\. Make sure you don't have any extra whitespace between tags on each line of your source code\.\nThis will cause a hydration error\./,/^Expected server HTML to contain a matching <(.+?)> in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain a <(.+?)> in <(.+?)>\.(.*)/,/^Expected server HTML to contain a matching text node for "(.+?)" in <(.+?)>\.(.*)/,/^Did not expect server HTML to contain the text node "(.+?)" in <(.+?)>\.(.*)/,/^Text content did not match\. Server: "(.+?)" Client: "(.+?)"(.*)/];function p(e){return"string"==typeof e&&!!e&&(e.startsWith("Warning: ")&&(e=e.slice(9)),d.some(t=>t.test(e)))}function h(e){let t=p(e=(e=e.replace(/^Error: /,"")).replace("Warning: ",""));if(!f(e)&&!t)return{message:null,stack:e,diff:""};if(t){let[t,r]=e.split("\n\n");return{message:t.trim(),stack:"",diff:(r||"").trim()}}let r=e.indexOf("\n"),[n,o]=(e=e.slice(r+1).trim()).split(""+a),u=n.trim();if(!o||!(o.length>1))return{message:u,stack:o};{let e=[],t=[];return o.split("\n").forEach(r=>{""!==r.trim()&&(r.trim().startsWith("at ")?e.push(r):t.push(r))}),{message:u,diff:t.join("\n"),stack:e.join("\n")}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6494:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HTTPAccessErrorStatus:function(){return r},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return o},getAccessFallbackErrorTypeByStatus:function(){return a},getAccessFallbackHTTPStatus:function(){return l},isHTTPAccessFallbackError:function(){return u}});let r={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},n=new Set(Object.values(r)),o="NEXT_HTTP_ERROR_FALLBACK";function u(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r]=e.digest.split(";");return t===o&&n.has(Number(r))}function l(e){return Number(e.digest.split(";")[1])}function a(e){switch(e){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6614:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ErrorBoundary:function(){return h},ErrorBoundaryHandler:function(){return f},GlobalError:function(){return d},default:function(){return p}});let n=r(8229),o=r(5155),u=n._(r(2115)),l=r(9921),a=r(2858);r(8836);let i=void 0,c={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};function s(e){let{error:t}=e;if(i){let e=i.getStore();if((null==e?void 0:e.isRevalidate)||(null==e?void 0:e.isStaticGeneration))throw console.error(t),t}return null}class f extends u.default.Component{static getDerivedStateFromError(e){if((0,a.isNextRouterError)(e))throw e;return{error:e}}static getDerivedStateFromProps(e,t){let{error:r}=t;return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(s,{error:this.state.error}),this.props.errorStyles,this.props.errorScripts,(0,o.jsx)(this.props.errorComponent,{error:this.state.error,reset:this.reset})]}):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}}function d(e){let{error:t}=e,r=null==t?void 0:t.digest;return(0,o.jsxs)("html",{id:"__next_error__",children:[(0,o.jsx)("head",{}),(0,o.jsxs)("body",{children:[(0,o.jsx)(s,{error:t}),(0,o.jsx)("div",{style:c.error,children:(0,o.jsxs)("div",{children:[(0,o.jsxs)("h2",{style:c.text,children:["Application error: a ",r?"server":"client","-side exception has occurred while loading ",window.location.hostname," (see the"," ",r?"server logs":"browser console"," for more information)."]}),r?(0,o.jsx)("p",{style:c.text,children:"Digest: "+r}):null]})})]})]})}let p=d;function h(e){let{errorComponent:t,errorStyles:r,errorScripts:n,children:u}=e,a=(0,l.useUntrackedPathname)();return t?(0,o.jsx)(f,{pathname:a,errorComponent:t,errorStyles:r,errorScripts:n,children:u}):(0,o.jsx)(o.Fragment,{children:u})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createMutableActionQueue:function(){return y},dispatchNavigateAction:function(){return g},dispatchTraverseAction:function(){return v},getCurrentAppRouterState:function(){return _},publicAppRouterInstance:function(){return m}});let n=r(9818),o=r(9726),u=r(2115),l=r(5122);r(6005);let a=r(1027),i=r(5929),c=r(6158),s=r(9154),f=r(4930);function d(e,t){null!==e.pending&&(e.pending=e.pending.next,null!==e.pending?p({actionQueue:e,action:e.pending,setState:t}):e.needsRefresh&&(e.needsRefresh=!1,e.dispatch({type:n.ACTION_REFRESH,origin:window.location.origin},t)))}async function p(e){let{actionQueue:t,action:r,setState:n}=e,o=t.state;t.pending=r;let u=r.payload,a=t.action(o,u);function i(e){r.discarded||(t.state=e,d(t,n),r.resolve(e))}(0,l.isThenable)(a)?a.then(i,e=>{d(t,n),r.reject(e)}):i(a)}let h=null;function y(e,t){let r={state:e,dispatch:(e,t)=>(function(e,t,r){let o={resolve:r,reject:()=>{}};if(t.type!==n.ACTION_RESTORE){let e=new Promise((e,t)=>{o={resolve:e,reject:t}});(0,u.startTransition)(()=>{r(e)})}let l={payload:t,next:null,resolve:o.resolve,reject:o.reject};null===e.pending?(e.last=l,p({actionQueue:e,action:l,setState:r})):t.type===n.ACTION_NAVIGATE||t.type===n.ACTION_RESTORE?(e.pending.discarded=!0,l.next=e.pending.next,e.pending.payload.type===n.ACTION_SERVER_ACTION&&(e.needsRefresh=!0),p({actionQueue:e,action:l,setState:r})):(null!==e.last&&(e.last.next=l),e.last=l)})(r,e,t),action:async(e,t)=>(0,o.reducer)(e,t),pending:null,last:null,onRouterTransitionStart:null!==t&&"function"==typeof t.onRouterTransitionStart?t.onRouterTransitionStart:null};if(null!==h)throw Object.defineProperty(Error("Internal Next.js Error: createMutableActionQueue was called more than once"),"__NEXT_ERROR_CODE",{value:"E624",enumerable:!1,configurable:!0});return h=r,r}function _(){return null!==h?h.state:null}function b(){return null!==h?h.onRouterTransitionStart:null}function g(e,t,r,o){let u=new URL((0,i.addBasePath)(e),location.href);(0,f.setLinkForCurrentNavigation)(o);let l=b();null!==l&&l(e,t),(0,a.dispatchAppRouterAction)({type:n.ACTION_NAVIGATE,url:u,isExternalUrl:(0,c.isExternalURL)(u),locationSearch:location.search,shouldScroll:r,navigateType:t,allowAliasing:!0})}function v(e,t){let r=b();null!==r&&r(e,"traverse"),(0,a.dispatchAppRouterAction)({type:n.ACTION_RESTORE,url:new URL(e),tree:t})}let m={back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{let r=function(){if(null===h)throw Object.defineProperty(Error("Internal Next.js error: Router action dispatched before initialization."),"__NEXT_ERROR_CODE",{value:"E668",enumerable:!1,configurable:!0});return h}(),o=(0,c.createPrefetchURL)(e);if(null!==o){var u;(0,s.prefetchReducer)(r.state,{type:n.ACTION_PREFETCH,url:o,kind:null!=(u=null==t?void 0:t.kind)?u:n.PrefetchKind.FULL})}},replace:(e,t)=>{(0,u.startTransition)(()=>{var r;g(e,"replace",null==(r=null==t?void 0:t.scroll)||r,null)})},push:(e,t)=>{(0,u.startTransition)(()=>{var r;g(e,"push",null==(r=null==t?void 0:t.scroll)||r,null)})},refresh:()=>{(0,u.startTransition)(()=>{(0,a.dispatchAppRouterAction)({type:n.ACTION_REFRESH,origin:window.location.origin})})},hmrRefresh:()=>{throw Object.defineProperty(Error("hmrRefresh can only be used in development mode. Please use refresh instead."),"__NEXT_ERROR_CODE",{value:"E485",enumerable:!1,configurable:!0})}};window.next&&(window.next.router=m),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"onRecoverableError",{enumerable:!0,get:function(){return i}});let n=r(8229),o=r(5262),u=r(1646),l=r(5128),a=n._(r(5807)),i=(e,t)=>{let r=(0,a.default)(e)&&"cause"in e?e.cause:e,n=(0,l.getReactStitchedError)(r);(0,o.isBailoutToCSRError)(r)||(0,u.reportGlobalError)(n)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return f},getRedirectTypeFromError:function(){return s},getURLFromRedirectError:function(){return c},permanentRedirect:function(){return i},redirect:function(){return a}});let n=r(4420),o=r(2210),u=void 0;function l(e,t,r){void 0===r&&(r=n.RedirectStatusCode.TemporaryRedirect);let u=Object.defineProperty(Error(o.REDIRECT_ERROR_CODE),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return u.digest=o.REDIRECT_ERROR_CODE+";"+t+";"+e+";"+r+";",u}function a(e,t){var r;throw null!=t||(t=(null==u||null==(r=u.getStore())?void 0:r.isAction)?o.RedirectType.push:o.RedirectType.replace),l(e,t,n.RedirectStatusCode.TemporaryRedirect)}function i(e,t){throw void 0===t&&(t=o.RedirectType.replace),l(e,t,n.RedirectStatusCode.PermanentRedirect)}function c(e){return(0,o.isRedirectError)(e)?e.digest.split(";").slice(2,-2).join(";"):null}function s(e){if(!(0,o.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return e.digest.split(";",2)[1]}function f(e){if(!(0,o.isRedirectError)(e))throw Object.defineProperty(Error("Not a redirect error"),"__NEXT_ERROR_CODE",{value:"E260",enumerable:!1,configurable:!0});return Number(e.digest.split(";").at(-2))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6897:(e,t)=>{"use strict";var r=Symbol.for("react.transitional.element");function n(e,t,n){var o=null;if(void 0!==n&&(o=""+n),void 0!==t.key&&(o=""+t.key),"key"in t)for(var u in n={},t)"key"!==u&&(n[u]=t[u]);else n=t;return{$$typeof:r,type:e,key:o,ref:void 0!==(t=n.ref)?t:null,props:n}}t.Fragment=Symbol.for("react.fragment"),t.jsx=n,t.jsxs=n},6905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{originConsoleError:function(){return o},patchConsoleError:function(){return u}}),r(8229),r(5807);let n=r(2858);r(5444),r(5169);let o=globalThis.console.error;function u(){window.console.error=function(){let e;for(var t=arguments.length,r=Array(t),u=0;u{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var a=u?Object.getOwnPropertyDescriptor(e,l):null;a&&(a.get||a.set)?Object.defineProperty(o,l,a):o[l]=e[l]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:()=>o})},6975:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessFallbackBoundary",{enumerable:!0,get:function(){return s}});let n=r(6966),o=r(5155),u=n._(r(2115)),l=r(9921),a=r(6494);r(3230);let i=r(5227);class c extends u.default.Component{componentDidCatch(){}static getDerivedStateFromError(e){if((0,a.isHTTPAccessFallbackError)(e))return{triggeredStatus:(0,a.getAccessFallbackHTTPStatus)(e)};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.triggeredStatus?{triggeredStatus:void 0,previousPathname:e.pathname}:{triggeredStatus:t.triggeredStatus,previousPathname:e.pathname}}render(){let{notFound:e,forbidden:t,unauthorized:r,children:n}=this.props,{triggeredStatus:u}=this.state,l={[a.HTTPAccessErrorStatus.NOT_FOUND]:e,[a.HTTPAccessErrorStatus.FORBIDDEN]:t,[a.HTTPAccessErrorStatus.UNAUTHORIZED]:r};if(u){let i=u===a.HTTPAccessErrorStatus.NOT_FOUND&&e,c=u===a.HTTPAccessErrorStatus.FORBIDDEN&&t,s=u===a.HTTPAccessErrorStatus.UNAUTHORIZED&&r;return i||c||s?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)("meta",{name:"robots",content:"noindex"}),!1,l[u]]}):n}return n}constructor(e){super(e),this.state={triggeredStatus:void 0,previousPathname:e.pathname}}}function s(e){let{notFound:t,forbidden:r,unauthorized:n,children:a}=e,s=(0,l.useUntrackedPathname)(),f=(0,u.useContext)(i.MissingSlotContext);return t||r||n?(0,o.jsx)(c,{pathname:s,notFound:t,forbidden:r,unauthorized:n,missingSlots:f,children:a}):(0,o.jsx)(o.Fragment,{children:a})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7102:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let n=r(1747);function o(e){return(0,n.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7197:(e,t,r)=>{"use strict";e.exports=r(9062)},7205:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRenderSearchParamsFromClient",{enumerable:!0,get:function(){return n}});let n=r(8324).makeUntrackedExoticSearchParams;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return u},normalizeRscURL:function(){return l}});let n=r(9133),o=r(8291);function u(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function l(e){return e.replace(/\.rsc($|\?)/,"$1")}},7442:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function e(t,r,n,i){let c,[s,f,d,p,h]=r;if(1===t.length){let e=a(r,n);return(0,l.addRefreshMarkerToActiveParallelSegments)(e,i),e}let[y,_]=t;if(!(0,u.matchSegment)(y,s))return null;if(2===t.length)c=a(f[_],n);else if(null===(c=e((0,o.getNextFlightSegmentPath)(t),f[_],n,i)))return null;let b=[t[0],{...f,[_]:c},d,p];return h&&(b[4]=!0),(0,l.addRefreshMarkerToActiveParallelSegments)(b,i),b}}});let n=r(8291),o=r(2561),u=r(1127),l=r(4908);function a(e,t){let[r,o]=e,[l,i]=t;if(l===n.DEFAULT_SEGMENT_KEY&&r!==n.DEFAULT_SEGMENT_KEY)return e;if((0,u.matchSegment)(r,l)){let t={};for(let e in o)void 0!==i[e]?t[e]=a(o[e],i[e]):t[e]=o[e];for(let e in i)t[e]||(t[e]=i[e]);let n=[r,t];return e[2]&&(n[2]=e[2]),e[3]&&(n[3]=e[3]),e[4]&&(n[4]=e[4]),n}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7541:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{describeHasCheckingStringProperty:function(){return o},describeStringPropertyAccess:function(){return n},wellKnownProperties:function(){return u}});let r=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function n(e,t){return r.test(t)?"`"+e+"."+t+"`":"`"+e+"["+JSON.stringify(t)+"]`"}function o(e,t){let r=JSON.stringify(t);return"`Reflect.has("+e+", "+r+")`, `"+r+" in "+e+"`, or similar"}let u=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","toJSON","$$typeof","__esModule"])},7555:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return S}});let n=r(8229),o=r(6966),u=r(5155),l=r(9818),a=o._(r(2115)),i=n._(r(7650)),c=r(5227),s=r(8586),f=r(1822),d=r(6614),p=r(1127),h=r(4189),y=r(686),_=r(6975),b=r(5637),g=r(4108),v=r(1027),m=i.default.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,E=["bottom","height","left","right","top","width","x","y"];function O(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}class R extends a.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,r)=>(0,p.matchSegment)(t,e[r]))))return;let r=null,n=e.hashFragment;if(n&&(r=function(e){var t;return"top"===e?document.body:null!=(t=document.getElementById(e))?t:document.getElementsByName(e)[0]}(n)),r||(r=(0,m.findDOMNode)(this)),!(r instanceof Element))return;for(;!(r instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return E.every(e=>0===t[e])}(r);){if(null===r.nextElementSibling)return;r=r.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,h.handleSmoothScroll)(()=>{if(n)return void r.scrollIntoView();let e=document.documentElement,t=e.clientHeight;!O(r,t)&&(e.scrollTop=0,O(r,t)||r.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,r.focus()}}}}function P(e){let{segmentPath:t,children:r}=e,n=(0,a.useContext)(c.GlobalLayoutRouterContext);if(!n)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});return(0,u.jsx)(R,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef,children:r})}function j(e){let{tree:t,segmentPath:r,cacheNode:n,url:o}=e,i=(0,a.useContext)(c.GlobalLayoutRouterContext);if(!i)throw Object.defineProperty(Error("invariant global layout router not mounted"),"__NEXT_ERROR_CODE",{value:"E473",enumerable:!1,configurable:!0});let{tree:d}=i,h=null!==n.prefetchRsc?n.prefetchRsc:n.rsc,y=(0,a.useDeferredValue)(n.rsc,h),_="object"==typeof y&&null!==y&&"function"==typeof y.then?(0,a.use)(y):y;if(!_){let e=n.lazyData;if(null===e){let t=function e(t,r){if(t){let[n,o]=t,u=2===t.length;if((0,p.matchSegment)(r[0],n)&&r[1].hasOwnProperty(o)){if(u){let t=e(void 0,r[1][o]);return[r[0],{...r[1],[o]:[t[0],t[1],t[2],"refetch"]}]}return[r[0],{...r[1],[o]:e(t.slice(2),r[1][o])}]}}return r}(["",...r],d),u=(0,g.hasInterceptionRouteInCurrentTree)(d),c=Date.now();n.lazyData=e=(0,s.fetchServerResponse)(new URL(o,location.origin),{flightRouterState:t,nextUrl:u?i.nextUrl:null}).then(e=>((0,a.startTransition)(()=>{(0,v.dispatchAppRouterAction)({type:l.ACTION_SERVER_PATCH,previousTree:d,serverResponse:e,navigatedAt:c})}),e)),(0,a.use)(e)}(0,a.use)(f.unresolvedThenable)}return(0,u.jsx)(c.LayoutRouterContext.Provider,{value:{parentTree:t,parentCacheNode:n,parentSegmentPath:r,url:o},children:_})}function T(e){let t,{loading:r,children:n}=e;if(t="object"==typeof r&&null!==r&&"function"==typeof r.then?(0,a.use)(r):r){let e=t[0],r=t[1],o=t[2];return(0,u.jsx)(a.Suspense,{fallback:(0,u.jsxs)(u.Fragment,{children:[r,o,e]}),children:n})}return(0,u.jsx)(u.Fragment,{children:n})}function S(e){let{parallelRouterKey:t,error:r,errorStyles:n,errorScripts:o,templateStyles:l,templateScripts:i,template:s,notFound:f,forbidden:p,unauthorized:h}=e,g=(0,a.useContext)(c.LayoutRouterContext);if(!g)throw Object.defineProperty(Error("invariant expected layout router to be mounted"),"__NEXT_ERROR_CODE",{value:"E56",enumerable:!1,configurable:!0});let{parentTree:v,parentCacheNode:m,parentSegmentPath:E,url:O}=g,R=m.parallelRoutes,S=R.get(t);S||(S=new Map,R.set(t,S));let M=v[0],w=v[1][t],C=w[0],x=null===E?[t]:E.concat([M,t]),A=(0,b.createRouterCacheKey)(C),N=(0,b.createRouterCacheKey)(C,!0),D=S.get(A);if(void 0===D){let e={lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:-1};D=e,S.set(A,e)}let U=m.loading;return(0,u.jsxs)(c.TemplateContext.Provider,{value:(0,u.jsx)(P,{segmentPath:x,children:(0,u.jsx)(d.ErrorBoundary,{errorComponent:r,errorStyles:n,errorScripts:o,children:(0,u.jsx)(T,{loading:U,children:(0,u.jsx)(_.HTTPAccessFallbackBoundary,{notFound:f,forbidden:p,unauthorized:h,children:(0,u.jsx)(y.RedirectBoundary,{children:(0,u.jsx)(j,{url:O,tree:w,cacheNode:D,segmentPath:x})})})})})}),children:[l,i,s]},N)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return u}});let n=r(6966)._(r(2115)),o=n.default.createContext(null);function u(e){let t=(0,n.useContext)(o);t&&t(e)}},7599:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return n}});let n=r(7865).unstable_rethrow;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7650:(e,t,r)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=r(8730)},7755:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return l},isInterceptionRouteAppPath:function(){return u}});let n=r(7276),o=["(..)(..)","(.)","(..)","(...)"];function u(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function l(e){let t,r,u;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,u]=e.split(r,2);break}if(!t||!r||!u)throw Object.defineProperty(Error("Invalid interception route: "+e+". Must be in the format //(..|...|..)(..)/"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":u="/"===t?"/"+u:t+"/"+u;break;case"(..)":if("/"===t)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});u=t.split("/").slice(0,-1).concat(u).join("/");break;case"(...)":u="/"+u;break;case"(..)(..)":let l=t.split("/");if(l.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});u=l.slice(0,-2).concat(u).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:u}}},7760:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AppRouterAnnouncer",{enumerable:!0,get:function(){return l}});let n=r(2115),o=r(7650),u="next-route-announcer";function l(e){let{tree:t}=e,[r,l]=(0,n.useState)(null);(0,n.useEffect)(()=>(l(function(){var e;let t=document.getElementsByName(u)[0];if(null==t||null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(u);e.style.cssText="position:absolute";let t=document.createElement("div");return t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal",e.attachShadow({mode:"open"}).appendChild(t),document.body.appendChild(e),t}}()),()=>{let e=document.getElementsByTagName(u)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}),[]);let[a,i]=(0,n.useState)(""),c=(0,n.useRef)(void 0);return(0,n.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==c.current&&c.current!==e&&i(e),c.current=e},[t]),r?(0,o.createPortal)(a,r):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7801:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return s}});let n=r(1139),o=r(7442),u=r(9234),l=r(3894),a=r(878),i=r(3507),c=r(6158);function s(e,t){let{serverResponse:{flightData:r,canonicalUrl:s},navigatedAt:f}=t,d={};if(d.preserveCustomHistoryState=!1,"string"==typeof r)return(0,l.handleExternalUrl)(e,d,r,e.pushRef.pendingPush);let p=e.tree,h=e.cache;for(let t of r){let{segmentPath:r,tree:i}=t,y=(0,o.applyRouterStatePatchToTree)(["",...r],p,i,e.canonicalUrl);if(null===y)return e;if((0,u.isNavigatingToNewRootLayout)(p,y))return(0,l.handleExternalUrl)(e,d,e.canonicalUrl,e.pushRef.pendingPush);let _=s?(0,n.createHrefFromUrl)(s):void 0;_&&(d.canonicalUrl=_);let b=(0,c.createEmptyCacheNode)();(0,a.applyFlightData)(f,h,b,t),d.patchedTree=y,d.cache=b,h=b,p=y}return(0,i.handleMutable)(e,d)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7829:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"makeUntrackedExoticParams",{enumerable:!0,get:function(){return u}});let n=r(7541),o=new WeakMap;function u(e){let t=o.get(e);if(t)return t;let r=Promise.resolve(e);return o.set(e,r),Object.keys(e).forEach(t=>{n.wellKnownProperties.has(t)||(r[t]=e[t])}),r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7865:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unstable_rethrow",{enumerable:!0,get:function(){return function e(t){if((0,o.isNextRouterError)(t)||(0,n.isBailoutToCSRError)(t))throw t;t instanceof Error&&"cause"in t&&e(t.cause)}}});let n=r(5262),o=r(2858);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8229:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:()=>n})},8287:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{METADATA_BOUNDARY_NAME:function(){return r},OUTLET_BOUNDARY_NAME:function(){return o},VIEWPORT_BOUNDARY_NAME:function(){return n}});let r="__next_metadata_boundary__",n="__next_viewport_boundary__",o="__next_outlet_boundary__"},8291:(e,t)=>{"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}function n(e){return e.startsWith("@")&&"@children"!==e}function o(e,t){if(e.includes(u)){let e=JSON.stringify(t);return"{}"!==e?u+"?"+e:u}return e}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return l},PAGE_SEGMENT_KEY:function(){return u},addSearchParamsIfPageSegment:function(){return o},isGroupSegment:function(){return r},isParallelRouteSegment:function(){return n}});let u="__PAGE__",l="__DEFAULT__"},8324:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"makeUntrackedExoticSearchParams",{enumerable:!0,get:function(){return u}});let n=r(7541),o=new WeakMap;function u(e){let t=o.get(e);if(t)return t;let r=Promise.resolve(e);return o.set(e,r),Object.keys(e).forEach(t=>{n.wellKnownProperties.has(t)||(r[t]=e[t])}),r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"notFound",{enumerable:!0,get:function(){return o}});let n=""+r(6494).HTTP_ERROR_FALLBACK_ERROR_CODE+";404";function o(){let e=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});throw e.digest=n,e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createFetch:function(){return y},createFromNextReadableStream:function(){return _},fetchServerResponse:function(){return h},urlToUrlWithoutFlightMarker:function(){return f}});let n=r(3269),o=r(3806),u=r(1818),l=r(9818),a=r(2561),i=r(5624),c=r(8969),{createFromReadableStream:s}=r(4979);function f(e){let t=new URL(e,location.origin);if(t.searchParams.delete(n.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,r=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-r)}return t}function d(e){return{flightData:f(e).toString(),canonicalUrl:void 0,couldBeIntercepted:!1,prerendered:!1,postponed:!1,staleTime:-1}}let p=new AbortController;async function h(e,t){let{flightRouterState:r,nextUrl:o,prefetchKind:u}=t,c={[n.RSC_HEADER]:"1",[n.NEXT_ROUTER_STATE_TREE_HEADER]:encodeURIComponent(JSON.stringify(r))};u===l.PrefetchKind.AUTO&&(c[n.NEXT_ROUTER_PREFETCH_HEADER]="1"),o&&(c[n.NEXT_URL]=o);try{var s;let t=u?u===l.PrefetchKind.TEMPORARY?"high":"low":"auto";(e=new URL(e)).pathname.endsWith("/")?e.pathname+="index.txt":e.pathname+=".txt";let r=await y(e,c,t,p.signal),o=f(r.url),h=r.redirected?o:void 0,b=r.headers.get("content-type")||"",g=!!(null==(s=r.headers.get("vary"))?void 0:s.includes(n.NEXT_URL)),v=!!r.headers.get(n.NEXT_DID_POSTPONE_HEADER),m=r.headers.get(n.NEXT_ROUTER_STALE_TIME_HEADER),E=null!==m?parseInt(m,10):-1,O=b.startsWith(n.RSC_CONTENT_TYPE_HEADER);if(O||(O=b.startsWith("text/plain")),!O||!r.ok||!r.body)return e.hash&&(o.hash=e.hash),d(o.toString());let R=v?function(e){let t=e.getReader();return new ReadableStream({async pull(e){for(;;){let{done:r,value:n}=await t.read();if(!r){e.enqueue(n);continue}return}}})}(r.body):r.body,P=await _(R);if((0,i.getAppBuildId)()!==P.b)return d(r.url);return{flightData:(0,a.normalizeFlightData)(P.f),canonicalUrl:h,couldBeIntercepted:g,prerendered:P.S,postponed:v,staleTime:E}}catch(t){return p.signal.aborted||console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),{flightData:e.toString(),canonicalUrl:void 0,couldBeIntercepted:!1,prerendered:!1,postponed:!1,staleTime:-1}}}function y(e,t,r,n){let o=new URL(e);return(0,c.setCacheBustingSearchParam)(o,t),fetch(o,{credentials:"same-origin",headers:t,priority:r||void 0,signal:n})}function _(e){return s(e,{callServer:o.callServer,findSourceMapURL:u.findSourceMapURL})}window.addEventListener("pagehide",()=>{p.abort()}),window.addEventListener("pageshow",()=>{p=new AbortController}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8709:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return w}});let n=r(3806),o=r(1818),u=r(3269),l=r(9818),a=r(1315),i=r(1139),c=r(3894),s=r(7442),f=r(9234),d=r(3507),p=r(4758),h=r(6158),y=r(4108),_=r(6375),b=r(4908),g=r(2561),v=r(6825),m=r(2210),E=r(1518),O=r(4882),R=r(7102),P=r(2816);r(6005);let{createFromFetch:j,createTemporaryReferenceSet:T,encodeReply:S}=r(4979);async function M(e,t,r){let l,i,{actionId:c,actionArgs:s}=r,f=T(),d=(0,P.extractInfoFromServerReferenceId)(c),p="use-cache"===d.type?(0,P.omitUnusedArgs)(s,d):s,h=await S(p,{temporaryReferences:f}),y=await fetch("",{method:"POST",headers:{Accept:u.RSC_CONTENT_TYPE_HEADER,[u.ACTION_HEADER]:c,[u.NEXT_ROUTER_STATE_TREE_HEADER]:encodeURIComponent(JSON.stringify(e.tree)),...{},...t?{[u.NEXT_URL]:t}:{}},body:h}),_=y.headers.get("x-action-redirect"),[b,v]=(null==_?void 0:_.split(";"))||[];switch(v){case"push":l=m.RedirectType.push;break;case"replace":l=m.RedirectType.replace;break;default:l=void 0}let E=!!y.headers.get(u.NEXT_IS_PRERENDER_HEADER);try{let e=JSON.parse(y.headers.get("x-action-revalidated")||"[[],0,0]");i={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){i={paths:[],tag:!1,cookie:!1}}let O=b?(0,a.assignLocation)(b,new URL(e.canonicalUrl,window.location.href)):void 0,R=y.headers.get("content-type");if(null==R?void 0:R.startsWith(u.RSC_CONTENT_TYPE_HEADER)){let e=await j(Promise.resolve(y),{callServer:n.callServer,findSourceMapURL:o.findSourceMapURL,temporaryReferences:f});return b?{actionFlightData:(0,g.normalizeFlightData)(e.f),redirectLocation:O,redirectType:l,revalidatedParts:i,isPrerender:E}:{actionResult:e.a,actionFlightData:(0,g.normalizeFlightData)(e.f),redirectLocation:O,redirectType:l,revalidatedParts:i,isPrerender:E}}if(y.status>=400)throw Object.defineProperty(Error("text/plain"===R?await y.text():"An unexpected response was received from the server."),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return{redirectLocation:O,redirectType:l,revalidatedParts:i,isPrerender:E}}function w(e,t){let{resolve:r,reject:n}=t,o={},u=e.tree;o.preserveCustomHistoryState=!1;let a=e.nextUrl&&(0,y.hasInterceptionRouteInCurrentTree)(e.tree)?e.nextUrl:null,g=Date.now();return M(e,a,t).then(async y=>{let P,{actionResult:j,actionFlightData:T,redirectLocation:S,redirectType:M,isPrerender:w,revalidatedParts:C}=y;if(S&&(M===m.RedirectType.replace?(e.pushRef.pendingPush=!1,o.pendingPush=!1):(e.pushRef.pendingPush=!0,o.pendingPush=!0),o.canonicalUrl=P=(0,i.createHrefFromUrl)(S,!1)),!T)return(r(j),S)?(0,c.handleExternalUrl)(e,o,S.href,e.pushRef.pendingPush):e;if("string"==typeof T)return r(j),(0,c.handleExternalUrl)(e,o,T,e.pushRef.pendingPush);let x=C.paths.length>0||C.tag||C.cookie;for(let n of T){let{tree:l,seedData:i,head:d,isRootRender:y}=n;if(!y)return console.log("SERVER ACTION APPLY FAILED"),r(j),e;let v=(0,s.applyRouterStatePatchToTree)([""],u,l,P||e.canonicalUrl);if(null===v)return r(j),(0,_.handleSegmentMismatch)(e,t,l);if((0,f.isNavigatingToNewRootLayout)(u,v))return r(j),(0,c.handleExternalUrl)(e,o,P||e.canonicalUrl,e.pushRef.pendingPush);if(null!==i){let t=i[1],r=(0,h.createEmptyCacheNode)();r.rsc=t,r.prefetchRsc=null,r.loading=i[3],(0,p.fillLazyItemsTillLeafWithHead)(g,r,void 0,l,i,d,void 0),o.cache=r,o.prefetchCache=new Map,x&&await (0,b.refreshInactiveParallelSegments)({navigatedAt:g,state:e,updatedTree:v,updatedCache:r,includeNextUrl:!!a,canonicalUrl:o.canonicalUrl||e.canonicalUrl})}o.patchedTree=v,u=v}return S&&P?(x||((0,E.createSeededPrefetchCacheEntry)({url:S,data:{flightData:T,canonicalUrl:void 0,couldBeIntercepted:!1,prerendered:!1,postponed:!1,staleTime:-1},tree:e.tree,prefetchCache:e.prefetchCache,nextUrl:e.nextUrl,kind:w?l.PrefetchKind.FULL:l.PrefetchKind.AUTO}),o.prefetchCache=e.prefetchCache),n((0,v.getRedirectError)((0,R.hasBasePath)(P)?(0,O.removeBasePath)(P):P,M||m.RedirectType.push))):r(j),(0,d.handleMutable)(e,o)},t=>(n(t),e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8730:(e,t,r)=>{"use strict";var n=r(2115);function o(e){var t="https://react.dev/errors/"+e;if(1{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{handleHardNavError:function(){return o},useNavFailureHandler:function(){return u}}),r(2115);let n=r(1139);function o(e){return!!e&&!!window.next.__pendingUrl&&(0,n.createHrefFromUrl)(new URL(window.location.href))!==(0,n.createHrefFromUrl)(window.next.__pendingUrl)&&(console.error("Error occurred during navigation, falling back to hard navigation",e),window.location.href=window.next.__pendingUrl.toString(),!0)}function u(){}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{computeChangedPath:function(){return s},extractPathFromFlightRouterState:function(){return c},getSelectedParams:function(){return function e(t,r){for(let n of(void 0===r&&(r={}),Object.values(t[1]))){let t=n[0],u=Array.isArray(t),l=u?t[1]:t;!l||l.startsWith(o.PAGE_SEGMENT_KEY)||(u&&("c"===t[2]||"oc"===t[2])?r[t[0]]=t[1].split("/"):u&&(r[t[0]]=t[1]),r=e(n,r))}return r}}});let n=r(7755),o=r(8291),u=r(1127),l=e=>"/"===e[0]?e.slice(1):e,a=e=>"string"==typeof e?"children"===e?"":e:e[1];function i(e){return e.reduce((e,t)=>""===(t=l(t))||(0,o.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function c(e){var t;let r=Array.isArray(e[0])?e[0][1]:e[0];if(r===o.DEFAULT_SEGMENT_KEY||n.INTERCEPTION_ROUTE_MARKERS.some(e=>r.startsWith(e)))return;if(r.startsWith(o.PAGE_SEGMENT_KEY))return"";let u=[a(r)],l=null!=(t=e[1])?t:{},s=l.children?c(l.children):void 0;if(void 0!==s)u.push(s);else for(let[e,t]of Object.entries(l)){if("children"===e)continue;let r=c(t);void 0!==r&&u.push(r)}return i(u)}function s(e,t){let r=function e(t,r){let[o,l]=t,[i,s]=r,f=a(o),d=a(i);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>f.startsWith(e)||d.startsWith(e)))return"";if(!(0,u.matchSegment)(o,i)){var p;return null!=(p=c(r))?p:""}for(let t in l)if(s[t]){let r=e(l[t],s[t]);if(null!==r)return a(i)+"/"+r}return null}(e,t);return null==r||"/"===r?r:i(r.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8969:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"setCacheBustingSearchParam",{enumerable:!0,get:function(){return u}});let n=r(3942),o=r(3269),u=(e,t)=>{let r=(0,n.hexHash)([t[o.NEXT_ROUTER_PREFETCH_HEADER]||"0",t[o.NEXT_ROUTER_SEGMENT_PREFETCH_HEADER]||"0",t[o.NEXT_ROUTER_STATE_TREE_HEADER],t[o.NEXT_URL]].join(",")),u=e.search,l=(u.startsWith("?")?u.slice(1):u).split("&").filter(Boolean);l.push(o.NEXT_RSC_UNION_QUERY+"="+r),e.search=l.length?"?"+l.join("&"):""};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return i.ReadonlyURLSearchParams},RedirectType:function(){return i.RedirectType},ServerInsertedHTMLContext:function(){return c.ServerInsertedHTMLContext},forbidden:function(){return i.forbidden},notFound:function(){return i.notFound},permanentRedirect:function(){return i.permanentRedirect},redirect:function(){return i.redirect},unauthorized:function(){return i.unauthorized},unstable_rethrow:function(){return i.unstable_rethrow},useParams:function(){return h},usePathname:function(){return d},useRouter:function(){return p},useSearchParams:function(){return f},useSelectedLayoutSegment:function(){return _},useSelectedLayoutSegments:function(){return y},useServerInsertedHTML:function(){return c.useServerInsertedHTML}});let n=r(2115),o=r(5227),u=r(886),l=r(708),a=r(8291),i=r(5618),c=r(7568),s=void 0;function f(){let e=(0,n.useContext)(u.SearchParamsContext);return(0,n.useMemo)(()=>e?new i.ReadonlyURLSearchParams(e):null,[e])}function d(){return null==s||s("usePathname()"),(0,n.useContext)(u.PathnameContext)}function p(){let e=(0,n.useContext)(o.AppRouterContext);if(null===e)throw Object.defineProperty(Error("invariant expected app router to be mounted"),"__NEXT_ERROR_CODE",{value:"E238",enumerable:!1,configurable:!0});return e}function h(){return null==s||s("useParams()"),(0,n.useContext)(u.PathParamsContext)}function y(e){void 0===e&&(e="children"),null==s||s("useSelectedLayoutSegments()");let t=(0,n.useContext)(o.LayoutRouterContext);return t?function e(t,r,n,o){let u;if(void 0===n&&(n=!0),void 0===o&&(o=[]),n)u=t[1][r];else{var i;let e=t[1];u=null!=(i=e.children)?i:Object.values(e)[0]}if(!u)return o;let c=u[0],s=(0,l.getSegmentValue)(c);return!s||s.startsWith(a.PAGE_SEGMENT_KEY)?o:(o.push(s),e(u,r,!1,o))}(t.parentTree,e):null}function _(e){void 0===e&&(e="children"),null==s||s("useSelectedLayoutSegment()");let t=y(e);if(!t||0===t.length)return null;let r="children"===e?t[0]:t[t.length-1];return r===a.DEFAULT_SEGMENT_KEY?null:r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9062:(e,t,r)=>{"use strict";var n=r(7650),o={stream:!0},u=new Map;function l(e){var t=r(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function a(){}function i(e){for(var t=e[1],n=[],o=0;oc||35===c||114===c||120===c?(s=c,c=3,a++):(s=0,c=3);continue;case 2:44===(y=l[a++])?c=4:f=f<<4|(96l.length&&(y=-1)}var _=l.byteOffset+a;if(-1{"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},9148:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{copyNextErrorCode:function(){return n},createDigestWithErrorCode:function(){return r},extractNextErrorCode:function(){return o}});let r=(e,t)=>"object"==typeof e&&null!==e&&"__NEXT_ERROR_CODE"in e?`${t}@${e.__NEXT_ERROR_CODE}`:t,n=(e,t)=>{let r=o(e);r&&"object"==typeof t&&null!==t&&Object.defineProperty(t,"__NEXT_ERROR_CODE",{value:r,enumerable:!1,configurable:!0})},o=e=>"object"==typeof e&&null!==e&&"__NEXT_ERROR_CODE"in e&&"string"==typeof e.__NEXT_ERROR_CODE?e.__NEXT_ERROR_CODE:"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest?e.digest.split("@").find(e=>e.startsWith("E")):void 0},9154:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{prefetchQueue:function(){return u},prefetchReducer:function(){return l}});let n=r(2312),o=r(1518),u=new n.PromiseQueue(5),l=function(e,t){(0,o.prunePrefetchCache)(e.prefetchCache);let{url:r}=t;return(0,o.getOrCreatePrefetchCacheEntry)({url:r,nextUrl:e.nextUrl,prefetchCache:e.prefetchCache,kind:t.kind,tree:e.tree,allowAliasing:!0}),e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{onCaughtError:function(){return i},onUncaughtError:function(){return c}}),r(5128),r(5444);let n=r(2858),o=r(5262),u=r(1646),l=r(6905),a=r(6614);function i(e,t){var r;let u,i=null==(r=t.errorBoundary)?void 0:r.constructor;if(u=u||i===a.ErrorBoundaryHandler&&t.errorBoundary.props.errorComponent===a.GlobalError)return c(e,t);(0,o.isBailoutToCSRError)(e)||(0,n.isNextRouterError)(e)||(0,l.originConsoleError)(e)}function c(e,t){(0,o.isBailoutToCSRError)(e)||(0,n.isNextRouterError)(e)||(0,u.reportGlobalError)(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9187:(e,t,r)=>{"use strict";function n(){throw Object.defineProperty(Error("`unauthorized()` is experimental and only allowed to be used when `experimental.authInterrupts` is enabled."),"__NEXT_ERROR_CODE",{value:"E411",enumerable:!1,configurable:!0})}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"unauthorized",{enumerable:!0,get:function(){return n}}),r(6494).HTTP_ERROR_FALLBACK_ERROR_CODE,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9234:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNavigatingToNewRootLayout",{enumerable:!0,get:function(){return function e(t,r){let n=t[0],o=r[0];if(Array.isArray(n)&&Array.isArray(o)){if(n[0]!==o[0]||n[2]!==o[2])return!0}else if(n!==o)return!0;if(t[4])return!r[4];if(r[4])return!0;let u=Object.values(t[1])[0],l=Object.values(r[1])[0];return!u||!l||e(u,l)}}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9509:(e,t,r)=>{"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(666)},9665:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{MetadataBoundary:function(){return u},OutletBoundary:function(){return a},ViewportBoundary:function(){return l}});let n=r(8287),o={[n.METADATA_BOUNDARY_NAME]:function(e){let{children:t}=e;return t},[n.VIEWPORT_BOUNDARY_NAME]:function(e){let{children:t}=e;return t},[n.OUTLET_BOUNDARY_NAME]:function(e){let{children:t}=e;return t}},u=o[n.METADATA_BOUNDARY_NAME.slice(0)],l=o[n.VIEWPORT_BOUNDARY_NAME.slice(0)],a=o[n.OUTLET_BOUNDARY_NAME.slice(0)];("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9726:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return f}});let n=r(9818),o=r(3894),u=r(7801),l=r(4819),a=r(5542),i=r(9154),c=r(3612),s=r(8709),f=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,o.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,u.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,l.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,a.refreshReducer)(e,t);case n.ACTION_HMR_REFRESH:return(0,c.hmrRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,s.serverActionReducer)(e,t);default:throw Object.defineProperty(Error("Unknown action"),"__NEXT_ERROR_CODE",{value:"E295",enumerable:!1,configurable:!0})}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9771:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getHydrationWarningType:function(){return a},getReactHydrationDiffSegments:function(){return s},hydrationErrorState:function(){return o},storeHydrationErrorStateFromConsoleArgs:function(){return f}});let n=r(6465),o={},u=new Set(["Warning: In HTML, %s cannot be a child of <%s>.%s\nThis will cause a hydration error.%s","Warning: In HTML, %s cannot be a descendant of <%s>.\nThis will cause a hydration error.%s","Warning: In HTML, text nodes cannot be a child of <%s>.\nThis will cause a hydration error.","Warning: In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.\nThis will cause a hydration error.","Warning: Expected server HTML to contain a matching <%s> in <%s>.%s","Warning: Did not expect server HTML to contain a <%s> in <%s>.%s"]),l=new Set(['Warning: Expected server HTML to contain a matching text node for "%s" in <%s>.%s','Warning: Did not expect server HTML to contain the text node "%s" in <%s>.%s']),a=e=>{if("string"!=typeof e)return"text";let t=e.startsWith("Warning: ")?e:"Warning: "+e;return i(t)?"tag":c(t)?"text-in-tag":"text"},i=e=>u.has(e),c=e=>l.has(e),s=e=>{if(e){let{message:t,diff:r}=(0,n.getHydrationErrorStackInfo)(e);if(t)return[t,r]}};function f(){for(var e=arguments.length,t=Array(e),r=0;r{e=e.trim();let[,l,a]=/at (\w+)( \((.*)\))?/.exec(e)||[];return a||(l===t&&-1===o?o=n:l===r&&-1===u&&(u=n)),a?"":l}).filter(Boolean).reverse(),c="";for(let e=0;e "+" ".repeat(Math.max(2*e-2,0)+2)+"<"+t+">\n":c+=" ".repeat(2*e+2)+"<"+t+">\n"}if("text"===l){let e=" ".repeat(2*i.length);c+="+ "+e+'"'+t+'"\n'+("- "+e+'"'+r)+'"\n'}else if("text-in-tag"===l){let e=" ".repeat(2*i.length);c+="> "+e+"<"+r+">\n"+("> "+e+'"'+t)+'"\n'}return c}(u,l,i,n):o.reactOutputComponentDiff=n,o.warning=r,o.serverContent=l,o.clientContent=i}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9818:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_HMR_REFRESH:function(){return a},ACTION_NAVIGATE:function(){return n},ACTION_PREFETCH:function(){return l},ACTION_REFRESH:function(){return r},ACTION_RESTORE:function(){return o},ACTION_SERVER_ACTION:function(){return i},ACTION_SERVER_PATCH:function(){return u},PrefetchCacheEntryStatus:function(){return s},PrefetchKind:function(){return c}});let r="refresh",n="navigate",o="restore",u="server-patch",l="prefetch",a="hmr-refresh",i="server-action";var c=function(e){return e.AUTO="auto",e.FULL="full",e.TEMPORARY="temporary",e}({}),s=function(e){return e.fresh="fresh",e.reusable="reusable",e.expired="expired",e.stale="stale",e}({});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9837:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"InvariantError",{enumerable:!0,get:function(){return r}});class r extends Error{constructor(e,t){super("Invariant: "+(e.endsWith(".")?e:e+".")+" This is a bug in Next.js.",t),this.name="InvariantError"}}},9880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clearCacheNodeDataForSegmentPath",{enumerable:!0,get:function(){return function e(t,r,u){let l=u.length<=2,[a,i]=u,c=(0,o.createRouterCacheKey)(i),s=r.parallelRoutes.get(a),f=t.parallelRoutes.get(a);f&&f!==s||(f=new Map(s),t.parallelRoutes.set(a,f));let d=null==s?void 0:s.get(c),p=f.get(c);if(l){p&&p.lazyData&&p!==d||f.set(c,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:-1});return}if(!p||!d){p||f.set(c,{lazyData:null,rsc:null,prefetchRsc:null,head:null,prefetchHead:null,parallelRoutes:new Map,loading:null,navigatedAt:-1});return}return p===d&&(p={lazyData:p.lazyData,rsc:p.rsc,prefetchRsc:p.prefetchRsc,head:p.head,prefetchHead:p.prefetchHead,parallelRoutes:new Map(p.parallelRoutes),loading:p.loading},f.set(c,p)),e(p,d,(0,n.getNextFlightSegmentPath)(u))}}});let n=r(2561),o=r(5637);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useUntrackedPathname",{enumerable:!0,get:function(){return u}});let n=r(2115),o=r(886);function u(){return(0,n.useContext)(o.PathnameContext)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}}]); \ No newline at end of file diff --git a/_next/static/chunks/874-d5b9b203af7637c3.js b/_next/static/chunks/874-d5b9b203af7637c3.js new file mode 100644 index 0000000000000000000000000000000000000000..52852bb206a472535eb37a5ef0dd4d6843219122 --- /dev/null +++ b/_next/static/chunks/874-d5b9b203af7637c3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[874],{2664:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return u}});let n=r(9991),o=r(7102);function u(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},2757:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return u},formatWithValidation:function(){return a},urlObjectKeys:function(){return i}});let n=r(6966)._(r(8859)),o=/https?|ftp|gopher|file/;function u(e){let{auth:t,hostname:r}=e,u=e.protocol||"",i=e.pathname||"",a=e.hash||"",l=e.query||"",f=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?f=t+e.host:r&&(f=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(f+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return u&&!u.endsWith(":")&&(u+=":"),e.slashes||(!u||o.test(u))&&!1!==f?(f="//"+(f||""),i&&"/"!==i[0]&&(i="/"+i)):f||(f=""),a&&"#"!==a[0]&&(a="#"+a),c&&"?"!==c[0]&&(c="?"+c),""+u+f+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+a}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function a(e){return u(e)}},3180:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"errorOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},6654:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMergedRef",{enumerable:!0,get:function(){return o}});let n=r(2115);function o(e,t){let r=(0,n.useRef)(null),o=(0,n.useRef)(null);return(0,n.useCallback)(n=>{if(null===n){let e=r.current;e&&(r.current=null,e());let t=o.current;t&&(o.current=null,t())}else e&&(r.current=u(e,n)),t&&(o.current=u(t,n))},[e,t])}function u(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let r=e(t);return"function"==typeof r?r:()=>e(null)}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6874:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return g},useLinkStatus:function(){return b}});let n=r(6966),o=r(5155),u=n._(r(2115)),i=r(2757),a=r(5227),l=r(9818),f=r(6654),c=r(9991),s=r(5929);r(3230);let p=r(4930),d=r(2664),h=r(6634);function y(e){return"string"==typeof e?e:(0,i.formatUrl)(e)}function g(e){let t,r,n,[i,g]=(0,u.useOptimistic)(p.IDLE_LINK_STATUS),b=(0,u.useRef)(null),{href:P,as:_,children:v,prefetch:E=null,passHref:O,replace:j,shallow:T,scroll:C,onClick:N,onMouseEnter:S,onTouchStart:A,legacyBehavior:L=!1,onNavigate:x,ref:M,unstable_dynamicOnHover:U,...R}=e;t=v,L&&("string"==typeof t||"number"==typeof t)&&(t=(0,o.jsx)("a",{children:t}));let k=u.default.useContext(a.AppRouterContext),I=!1!==E,w=null===E?l.PrefetchKind.AUTO:l.PrefetchKind.FULL,{href:D,as:F}=u.default.useMemo(()=>{let e=y(P);return{href:e,as:_?y(_):e}},[P,_]);L&&(r=u.default.Children.only(t));let K=L?r&&"object"==typeof r&&r.ref:M,B=u.default.useCallback(e=>(null!==k&&(b.current=(0,p.mountLinkInstance)(e,D,k,w,I,g)),()=>{b.current&&((0,p.unmountLinkForCurrentNavigation)(b.current),b.current=null),(0,p.unmountPrefetchableInstance)(e)}),[I,D,k,w,g]),z={ref:(0,f.useMergedRef)(B,K),onClick(e){L||"function"!=typeof N||N(e),L&&r.props&&"function"==typeof r.props.onClick&&r.props.onClick(e),k&&(e.defaultPrevented||function(e,t,r,n,o,i,a){let{nodeName:l}=e.currentTarget;if(!("A"===l.toUpperCase()&&function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||e.currentTarget.hasAttribute("download"))){if(!(0,d.isLocalURL)(t)){o&&(e.preventDefault(),location.replace(t));return}e.preventDefault(),u.default.startTransition(()=>{if(a){let e=!1;if(a({preventDefault:()=>{e=!0}}),e)return}(0,h.dispatchNavigateAction)(r||t,o?"replace":"push",null==i||i,n.current)})}}(e,D,F,b,j,C,x))},onMouseEnter(e){L||"function"!=typeof S||S(e),L&&r.props&&"function"==typeof r.props.onMouseEnter&&r.props.onMouseEnter(e),k&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===U)},onTouchStart:function(e){L||"function"!=typeof A||A(e),L&&r.props&&"function"==typeof r.props.onTouchStart&&r.props.onTouchStart(e),k&&I&&(0,p.onNavigationIntent)(e.currentTarget,!0===U)}};return(0,c.isAbsoluteUrl)(F)?z.href=F:L&&!O&&("a"!==r.type||"href"in r.props)||(z.href=(0,s.addBasePath)(F)),n=L?u.default.cloneElement(r,z):(0,o.jsx)("a",{...R,...z,children:t}),(0,o.jsx)(m.Provider,{value:i,children:n})}r(3180);let m=(0,u.createContext)(p.IDLE_LINK_STATUS),b=()=>(0,u.useContext)(m);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8859:(e,t)=>{function r(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,n(e));else t.set(r,n(o));return t}function u(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return m},NormalizeError:function(){return y},PageNotFoundError:function(){return g},SP:function(){return p},ST:function(){return d},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return a},isAbsoluteUrl:function(){return u},isResSent:function(){return f},loadGetInitialProps:function(){return s},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return P}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),u=0;uo.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function a(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function f(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function s(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await s(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&f(r))return n;if(!n)throw Object.defineProperty(Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let p="undefined"!=typeof performance,d=p&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class y extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function P(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]); \ No newline at end of file diff --git a/_next/static/chunks/881-47c588f365fe1541.js b/_next/static/chunks/881-47c588f365fe1541.js new file mode 100644 index 0000000000000000000000000000000000000000..c4c313a53ad8bfb0135ba7624c66726dee3cb08a --- /dev/null +++ b/_next/static/chunks/881-47c588f365fe1541.js @@ -0,0 +1,56 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[881],{1053:(e,t,r)=>{"use strict";var n;r.d(t,{s:()=>n}),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(n||(n={}))},1153:(e,t,r)=>{"use strict";let n;r.d(t,{kY:()=>s,Ii:()=>eS,z:()=>l});var i,a,o,s,l={};r.r(l),r.d(l,{BRAND:()=>eP,DIRTY:()=>k,EMPTY_PATH:()=>b,INVALID:()=>x,NEVER:()=>th,OK:()=>E,ParseStatus:()=>w,Schema:()=>P,ZodAny:()=>ea,ZodArray:()=>eu,ZodBigInt:()=>Q,ZodBoolean:()=>ee,ZodBranded:()=>eC,ZodCatch:()=>eR,ZodDate:()=>et,ZodDefault:()=>eI,ZodDiscriminatedUnion:()=>ef,ZodEffects:()=>eA,ZodEnum:()=>ek,ZodError:()=>f,ZodFirstPartyTypeKind:()=>s,ZodFunction:()=>eb,ZodIntersection:()=>eh,ZodIssueCode:()=>d,ZodLazy:()=>e_,ZodLiteral:()=>ew,ZodMap:()=>ey,ZodNaN:()=>eN,ZodNativeEnum:()=>eE,ZodNever:()=>es,ZodNull:()=>ei,ZodNullable:()=>ej,ZodNumber:()=>X,ZodObject:()=>ec,ZodOptional:()=>eS,ZodParsedType:()=>u,ZodPipeline:()=>eO,ZodPromise:()=>eT,ZodReadonly:()=>ez,ZodRecord:()=>eg,ZodSchema:()=>P,ZodSet:()=>ev,ZodString:()=>K,ZodSymbol:()=>er,ZodTransformer:()=>eA,ZodTuple:()=>em,ZodType:()=>P,ZodUndefined:()=>en,ZodUnion:()=>ed,ZodUnknown:()=>eo,ZodVoid:()=>el,addIssueToContext:()=>_,any:()=>eJ,array:()=>eQ,bigint:()=>eZ,boolean:()=>eq,coerce:()=>tf,custom:()=>e$,date:()=>eV,datetimeRegex:()=>G,defaultErrorMap:()=>h,discriminatedUnion:()=>e5,effect:()=>ta,enum:()=>tr,function:()=>e7,getErrorMap:()=>y,getParsedType:()=>c,instanceof:()=>eF,intersection:()=>e3,isAborted:()=>T,isAsync:()=>j,isDirty:()=>A,isValid:()=>S,late:()=>eL,lazy:()=>te,literal:()=>tt,makeIssue:()=>v,map:()=>e9,nan:()=>eB,nativeEnum:()=>tn,never:()=>eK,null:()=>eW,nullable:()=>ts,number:()=>eU,object:()=>e0,objectUtil:()=>a,oboolean:()=>tp,onumber:()=>td,optional:()=>to,ostring:()=>tc,pipeline:()=>tu,preprocess:()=>tl,promise:()=>ti,quotelessJson:()=>p,record:()=>e6,set:()=>e8,setErrorMap:()=>g,strictObject:()=>e1,string:()=>eD,symbol:()=>eH,transformer:()=>ta,tuple:()=>e4,undefined:()=>eY,union:()=>e2,unknown:()=>eG,util:()=>i,void:()=>eX}),function(e){e.assertEqual=e=>{},e.assertIs=function(e){},e.assertNever=function(e){throw Error()},e.arrayToEnum=e=>{let t={};for(let r of e)t[r]=r;return t},e.getValidEnumValues=t=>{let r=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(let e of r)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{let t=[];for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.push(r);return t},e.find=(e,t)=>{for(let r of e)if(t(r))return r},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(i||(i={})),(a||(a={})).mergeShapes=(e,t)=>({...e,...t});let u=i.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),c=e=>{switch(typeof e){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(e)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":if(Array.isArray(e))return u.array;if(null===e)return u.null;if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return u.promise;if("undefined"!=typeof Map&&e instanceof Map)return u.map;if("undefined"!=typeof Set&&e instanceof Set)return u.set;if("undefined"!=typeof Date&&e instanceof Date)return u.date;return u.object;default:return u.unknown}},d=i.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),p=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class f extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){let t=e||function(e){return e.message},r={_errors:[]},n=e=>{for(let i of e.issues)if("invalid_union"===i.code)i.unionErrors.map(n);else if("invalid_return_type"===i.code)n(i.returnTypeError);else if("invalid_arguments"===i.code)n(i.argumentsError);else if(0===i.path.length)r._errors.push(t(i));else{let e=r,n=0;for(;ne.message){let t={},r=[];for(let n of this.issues)n.path.length>0?(t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(e(n))):r.push(e(n));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}f.create=e=>new f(e);let h=(e,t)=>{let r;switch(e.code){case d.invalid_type:r=e.received===u.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case d.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(e.expected,i.jsonStringifyReplacer)}`;break;case d.unrecognized_keys:r=`Unrecognized key(s) in object: ${i.joinValues(e.keys,", ")}`;break;case d.invalid_union:r="Invalid input";break;case d.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${i.joinValues(e.options)}`;break;case d.invalid_enum_value:r=`Invalid enum value. Expected ${i.joinValues(e.options)}, received '${e.received}'`;break;case d.invalid_arguments:r="Invalid function arguments";break;case d.invalid_return_type:r="Invalid function return type";break;case d.invalid_date:r="Invalid date";break;case d.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(r=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(r=`${r} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?r=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?r=`Invalid input: must end with "${e.validation.endsWith}"`:i.assertNever(e.validation):r="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case d.too_small:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case d.too_big:r="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case d.custom:r="Invalid input";break;case d.invalid_intersection_types:r="Intersection results could not be merged";break;case d.not_multiple_of:r=`Number must be a multiple of ${e.multipleOf}`;break;case d.not_finite:r="Number must be finite";break;default:r=t.defaultError,i.assertNever(e)}return{message:r}},m=h;function g(e){m=e}function y(){return m}let v=e=>{let{data:t,path:r,errorMaps:n,issueData:i}=e,a=[...r,...i.path||[]],o={...i,path:a};if(void 0!==i.message)return{...i,path:a,message:i.message};let s="";for(let e of n.filter(e=>!!e).slice().reverse())s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}},b=[];function _(e,t){let r=m,n=v({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,r,r===h?void 0:h].filter(e=>!!e)});e.common.issues.push(n)}class w{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){let r=[];for(let n of t){if("aborted"===n.status)return x;"dirty"===n.status&&e.dirty(),r.push(n.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){let r=[];for(let e of t){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return w.mergeObjectSync(e,r)}static mergeObjectSync(e,t){let r={};for(let n of t){let{key:t,value:i}=n;if("aborted"===t.status||"aborted"===i.status)return x;"dirty"===t.status&&e.dirty(),"dirty"===i.status&&e.dirty(),"__proto__"!==t.value&&(void 0!==i.value||n.alwaysSet)&&(r[t.value]=i.value)}return{status:e.value,value:r}}}let x=Object.freeze({status:"aborted"}),k=e=>({status:"dirty",value:e}),E=e=>({status:"valid",value:e}),T=e=>"aborted"===e.status,A=e=>"dirty"===e.status,S=e=>"valid"===e.status,j=e=>"undefined"!=typeof Promise&&e instanceof Promise;!function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(o||(o={}));class I{constructor(e,t,r,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}let R=(e,t)=>{if(S(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let t=new f(e.common.issues);return this._error=t,this._error}}};function N(e){if(!e)return{};let{errorMap:t,invalid_type_error:r,required_error:n,description:i}=e;if(t&&(r||n))throw Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return"invalid_enum_value"===t.code?{message:a??i.defaultError}:void 0===i.data?{message:a??n??i.defaultError}:"invalid_type"!==t.code?{message:i.defaultError}:{message:a??r??i.defaultError}},description:i}}class P{get description(){return this._def.description}_getType(e){return c(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:c(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new w,ctx:{common:e.parent.common,data:e.data,parsedType:c(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(j(t))throw Error("Synchronous parse encountered promise.");return t}_parseAsync(e){return Promise.resolve(this._parse(e))}parse(e,t){let r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){let r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)},n=this._parseSync({data:e,path:r.path,parent:r});return R(r,n)}"~validate"(e){let t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)};if(!this["~standard"].async)try{let r=this._parseSync({data:e,path:[],parent:t});return S(r)?{value:r.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>S(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){let r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:c(e)},n=this._parse({data:e,path:r.path,parent:r});return R(r,await (j(n)?n:Promise.resolve(n)))}refine(e,t){let r=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,n)=>{let i=e(t),a=()=>n.addIssue({code:d.custom,...r(t)});return"undefined"!=typeof Promise&&i instanceof Promise?i.then(e=>!!e||(a(),!1)):!!i||(a(),!1)})}refinement(e,t){return this._refinement((r,n)=>!!e(r)||(n.addIssue("function"==typeof t?t(r,n):t),!1))}_refinement(e){return new eA({schema:this,typeName:s.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return eS.create(this,this._def)}nullable(){return ej.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return eu.create(this)}promise(){return eT.create(this,this._def)}or(e){return ed.create([this,e],this._def)}and(e){return eh.create(this,e,this._def)}transform(e){return new eA({...N(this._def),schema:this,typeName:s.ZodEffects,effect:{type:"transform",transform:e}})}default(e){return new eI({...N(this._def),innerType:this,defaultValue:"function"==typeof e?e:()=>e,typeName:s.ZodDefault})}brand(){return new eC({typeName:s.ZodBranded,type:this,...N(this._def)})}catch(e){return new eR({...N(this._def),innerType:this,catchValue:"function"==typeof e?e:()=>e,typeName:s.ZodCatch})}describe(e){return new this.constructor({...this._def,description:e})}pipe(e){return eO.create(this,e)}readonly(){return ez.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}let C=/^c[^\s-]{8,}$/i,O=/^[0-9a-z]+$/,z=/^[0-9A-HJKMNP-TV-Z]{26}$/i,M=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,$=/^[a-z0-9_-]{21}$/i,L=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,F=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,D=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,U=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,B=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,Z=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,q=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,V=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,H=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Y="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",W=RegExp(`^${Y}$`);function J(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);let r=e.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${r}`}function G(e){let t=`${Y}T${J(e)}`,r=[];return r.push(e.local?"Z?":"Z"),e.offset&&r.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${r.join("|")})`,RegExp(`^${t}$`)}class K extends P{_parse(e){var t,r,a,o;let s;if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.string,received:t.parsedType}),x}let l=new w;for(let u of this._def.checks)if("min"===u.kind)e.data.lengthu.value&&(_(s=this._getOrReturnCtx(e,s),{code:d.too_big,maximum:u.value,type:"string",inclusive:!0,exact:!1,message:u.message}),l.dirty());else if("length"===u.kind){let t=e.data.length>u.value,r=e.data.lengthe.test(t),{validation:t,code:d.invalid_string,...o.errToObj(r)})}_addCheck(e){return new K({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...o.errToObj(e)})}url(e){return this._addCheck({kind:"url",...o.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...o.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...o.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...o.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...o.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...o.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...o.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...o.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...o.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...o.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...o.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...o.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...o.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...o.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...o.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...o.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...o.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...o.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...o.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...o.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...o.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...o.errToObj(t)})}nonempty(e){return this.min(1,o.errToObj(e))}trim(){return new K({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new K({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew K({checks:[],typeName:s.ZodString,coerce:e?.coerce??!1,...N(e)});class X extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){let t;if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.number,received:t.parsedType}),x}let r=new w;for(let n of this._def.checks)"int"===n.kind?i.isInteger(e.data)||(_(t=this._getOrReturnCtx(e,t),{code:d.invalid_type,expected:"integer",received:"float",message:n.message}),r.dirty()):"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(_(t=this._getOrReturnCtx(e,t),{code:d.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),r.dirty()):"multipleOf"===n.kind?0!==function(e,t){let r=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,i=r>n?r:n;return Number.parseInt(e.toFixed(i).replace(".",""))%Number.parseInt(t.toFixed(i).replace(".",""))/10**i}(e.data,n.value)&&(_(t=this._getOrReturnCtx(e,t),{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):"finite"===n.kind?Number.isFinite(e.data)||(_(t=this._getOrReturnCtx(e,t),{code:d.not_finite,message:n.message}),r.dirty()):i.assertNever(n);return{status:r.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}setLimit(e,t,r,n){return new X({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new X({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:o.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:o.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:o.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:o.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.value"int"===e.kind||"multipleOf"===e.kind&&i.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let r of this._def.checks)if("finite"===r.kind||"int"===r.kind||"multipleOf"===r.kind)return!0;else"min"===r.kind?(null===t||r.value>t)&&(t=r.value):"max"===r.kind&&(null===e||r.valuenew X({checks:[],typeName:s.ZodNumber,coerce:e?.coerce||!1,...N(e)});class Q extends P{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){let t;if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r=new w;for(let n of this._def.checks)"min"===n.kind?(n.inclusive?e.datan.value:e.data>=n.value)&&(_(t=this._getOrReturnCtx(e,t),{code:d.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),r.dirty()):"multipleOf"===n.kind?e.data%n.value!==BigInt(0)&&(_(t=this._getOrReturnCtx(e,t),{code:d.not_multiple_of,multipleOf:n.value,message:n.message}),r.dirty()):i.assertNever(n);return{status:r.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.bigint,received:t.parsedType}),x}gte(e,t){return this.setLimit("min",e,!0,o.toString(t))}gt(e,t){return this.setLimit("min",e,!1,o.toString(t))}lte(e,t){return this.setLimit("max",e,!0,o.toString(t))}lt(e,t){return this.setLimit("max",e,!1,o.toString(t))}setLimit(e,t,r,n){return new Q({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:o.toString(n)}]})}_addCheck(e){return new Q({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:o.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:o.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:o.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:o.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:o.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew Q({checks:[],typeName:s.ZodBigInt,coerce:e?.coerce??!1,...N(e)});class ee extends P{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.boolean,received:t.parsedType}),x}return E(e.data)}}ee.create=e=>new ee({typeName:s.ZodBoolean,coerce:e?.coerce||!1,...N(e)});class et extends P{_parse(e){let t;if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.date,received:t.parsedType}),x}if(Number.isNaN(e.data.getTime()))return _(this._getOrReturnCtx(e),{code:d.invalid_date}),x;let r=new w;for(let n of this._def.checks)"min"===n.kind?e.data.getTime()n.value&&(_(t=this._getOrReturnCtx(e,t),{code:d.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):i.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new et({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:o.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:o.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(let t of this._def.checks)"max"===t.kind&&(null===e||t.valuenew et({checks:[],coerce:e?.coerce||!1,typeName:s.ZodDate,...N(e)});class er extends P{_parse(e){if(this._getType(e)!==u.symbol){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.symbol,received:t.parsedType}),x}return E(e.data)}}er.create=e=>new er({typeName:s.ZodSymbol,...N(e)});class en extends P{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.undefined,received:t.parsedType}),x}return E(e.data)}}en.create=e=>new en({typeName:s.ZodUndefined,...N(e)});class ei extends P{_parse(e){if(this._getType(e)!==u.null){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.null,received:t.parsedType}),x}return E(e.data)}}ei.create=e=>new ei({typeName:s.ZodNull,...N(e)});class ea extends P{constructor(){super(...arguments),this._any=!0}_parse(e){return E(e.data)}}ea.create=e=>new ea({typeName:s.ZodAny,...N(e)});class eo extends P{constructor(){super(...arguments),this._unknown=!0}_parse(e){return E(e.data)}}eo.create=e=>new eo({typeName:s.ZodUnknown,...N(e)});class es extends P{_parse(e){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.never,received:t.parsedType}),x}}es.create=e=>new es({typeName:s.ZodNever,...N(e)});class el extends P{_parse(e){if(this._getType(e)!==u.undefined){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.void,received:t.parsedType}),x}return E(e.data)}}el.create=e=>new el({typeName:s.ZodVoid,...N(e)});class eu extends P{_parse(e){let{ctx:t,status:r}=this._processInputParams(e),n=this._def;if(t.parsedType!==u.array)return _(t,{code:d.invalid_type,expected:u.array,received:t.parsedType}),x;if(null!==n.exactLength){let e=t.data.length>n.exactLength.value,i=t.data.lengthn.maxLength.value&&(_(t,{code:d.too_big,maximum:n.maxLength.value,type:"array",inclusive:!0,exact:!1,message:n.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((e,r)=>n.type._parseAsync(new I(t,e,t.path,r)))).then(e=>w.mergeArray(r,e));let i=[...t.data].map((e,r)=>n.type._parseSync(new I(t,e,t.path,r)));return w.mergeArray(r,i)}get element(){return this._def.type}min(e,t){return new eu({...this._def,minLength:{value:e,message:o.toString(t)}})}max(e,t){return new eu({...this._def,maxLength:{value:e,message:o.toString(t)}})}length(e,t){return new eu({...this._def,exactLength:{value:e,message:o.toString(t)}})}nonempty(e){return this.min(1,e)}}eu.create=(e,t)=>new eu({type:e,minLength:null,maxLength:null,exactLength:null,typeName:s.ZodArray,...N(t)});class ec extends P{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;let e=this._def.shape(),t=i.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),x}let{status:t,ctx:r}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof es&&"strip"===this._def.unknownKeys))for(let e in r.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=n[e],i=r.data[e];o.push({key:{status:"valid",value:e},value:t._parse(new I(r,i,r.path,e)),alwaysSet:e in r.data})}if(this._def.catchall instanceof es){let e=this._def.unknownKeys;if("passthrough"===e)for(let e of a)o.push({key:{status:"valid",value:e},value:{status:"valid",value:r.data[e]}});else if("strict"===e)a.length>0&&(_(r,{code:d.unrecognized_keys,keys:a}),t.dirty());else if("strip"===e);else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let e=this._def.catchall;for(let t of a){let n=r.data[t];o.push({key:{status:"valid",value:t},value:e._parse(new I(r,n,r.path,t)),alwaysSet:t in r.data})}}return r.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let r=await t.key,n=await t.value;e.push({key:r,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>w.mergeObjectSync(t,e)):w.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(e){return o.errToObj,new ec({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,r)=>{let n=this._def.errorMap?.(t,r).message??r.defaultError;return"unrecognized_keys"===t.code?{message:o.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new ec({...this._def,unknownKeys:"strip"})}passthrough(){return new ec({...this._def,unknownKeys:"passthrough"})}extend(e){return new ec({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ec({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:s.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ec({...this._def,catchall:e})}pick(e){let t={};for(let r of i.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new ec({...this._def,shape:()=>t})}omit(e){let t={};for(let r of i.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new ec({...this._def,shape:()=>t})}deepPartial(){return function e(t){if(t instanceof ec){let r={};for(let n in t.shape){let i=t.shape[n];r[n]=eS.create(e(i))}return new ec({...t._def,shape:()=>r})}if(t instanceof eu)return new eu({...t._def,type:e(t.element)});if(t instanceof eS)return eS.create(e(t.unwrap()));if(t instanceof ej)return ej.create(e(t.unwrap()));if(t instanceof em)return em.create(t.items.map(t=>e(t)));else return t}(this)}partial(e){let t={};for(let r of i.objectKeys(this.shape)){let n=this.shape[r];e&&!e[r]?t[r]=n:t[r]=n.optional()}return new ec({...this._def,shape:()=>t})}required(e){let t={};for(let r of i.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let e=this.shape[r];for(;e instanceof eS;)e=e._def.innerType;t[r]=e}return new ec({...this._def,shape:()=>t})}keyof(){return ex(i.objectKeys(this.shape))}}ec.create=(e,t)=>new ec({shape:()=>e,unknownKeys:"strip",catchall:es.create(),typeName:s.ZodObject,...N(t)}),ec.strictCreate=(e,t)=>new ec({shape:()=>e,unknownKeys:"strict",catchall:es.create(),typeName:s.ZodObject,...N(t)}),ec.lazycreate=(e,t)=>new ec({shape:e,unknownKeys:"strip",catchall:es.create(),typeName:s.ZodObject,...N(t)});class ed extends P{_parse(e){let{ctx:t}=this._processInputParams(e),r=this._def.options;if(t.common.async)return Promise.all(r.map(async e=>{let r={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:r}),ctx:r}})).then(function(e){for(let t of e)if("valid"===t.result.status)return t.result;for(let r of e)if("dirty"===r.result.status)return t.common.issues.push(...r.ctx.common.issues),r.result;let r=e.map(e=>new f(e.ctx.common.issues));return _(t,{code:d.invalid_union,unionErrors:r}),x});{let e,n=[];for(let i of r){let r={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:r});if("valid"===a.status)return a;"dirty"!==a.status||e||(e={result:a,ctx:r}),r.common.issues.length&&n.push(r.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=n.map(e=>new f(e));return _(t,{code:d.invalid_union,unionErrors:i}),x}}get options(){return this._def.options}}ed.create=(e,t)=>new ed({options:e,typeName:s.ZodUnion,...N(t)});let ep=e=>{if(e instanceof e_)return ep(e.schema);if(e instanceof eA)return ep(e.innerType());if(e instanceof ew)return[e.value];if(e instanceof ek)return e.options;if(e instanceof eE)return i.objectValues(e.enum);else if(e instanceof eI)return ep(e._def.innerType);else if(e instanceof en)return[void 0];else if(e instanceof ei)return[null];else if(e instanceof eS)return[void 0,...ep(e.unwrap())];else if(e instanceof ej)return[null,...ep(e.unwrap())];else if(e instanceof eC)return ep(e.unwrap());else if(e instanceof ez)return ep(e.unwrap());else if(e instanceof eR)return ep(e._def.innerType);else return[]};class ef extends P{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.object)return _(t,{code:d.invalid_type,expected:u.object,received:t.parsedType}),x;let r=this.discriminator,n=t.data[r],i=this.optionsMap.get(n);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(_(t,{code:d.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),x)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,r){let n=new Map;for(let r of t){let t=ep(r.shape[e]);if(!t.length)throw Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let i of t){if(n.has(i))throw Error(`Discriminator property ${String(e)} has duplicate value ${String(i)}`);n.set(i,r)}}return new ef({typeName:s.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...N(r)})}}class eh extends P{_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=(e,n)=>{if(T(e)||T(n))return x;let a=function e(t,r){let n=c(t),a=c(r);if(t===r)return{valid:!0,data:t};if(n===u.object&&a===u.object){let n=i.objectKeys(r),a=i.objectKeys(t).filter(e=>-1!==n.indexOf(e)),o={...t,...r};for(let n of a){let i=e(t[n],r[n]);if(!i.valid)return{valid:!1};o[n]=i.data}return{valid:!0,data:o}}if(n===u.array&&a===u.array){if(t.length!==r.length)return{valid:!1};let n=[];for(let i=0;in(e,t)):n(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}eh.create=(e,t,r)=>new eh({left:e,right:t,typeName:s.ZodIntersection,...N(r)});class em extends P{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return _(r,{code:d.invalid_type,expected:u.array,received:r.parsedType}),x;if(r.data.lengththis._def.items.length&&(_(r,{code:d.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());let n=[...r.data].map((e,t)=>{let n=this._def.items[t]||this._def.rest;return n?n._parse(new I(r,e,r.path,t)):null}).filter(e=>!!e);return r.common.async?Promise.all(n).then(e=>w.mergeArray(t,e)):w.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new em({...this._def,rest:e})}}em.create=(e,t)=>{if(!Array.isArray(e))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new em({items:e,typeName:s.ZodTuple,rest:null,...N(t)})};class eg extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.object)return _(r,{code:d.invalid_type,expected:u.object,received:r.parsedType}),x;let n=[],i=this._def.keyType,a=this._def.valueType;for(let e in r.data)n.push({key:i._parse(new I(r,e,r.path,e)),value:a._parse(new I(r,r.data[e],r.path,e)),alwaysSet:e in r.data});return r.common.async?w.mergeObjectAsync(t,n):w.mergeObjectSync(t,n)}get element(){return this._def.valueType}static create(e,t,r){return new eg(t instanceof P?{keyType:e,valueType:t,typeName:s.ZodRecord,...N(r)}:{keyType:K.create(),valueType:e,typeName:s.ZodRecord,...N(t)})}}class ey extends P{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return _(r,{code:d.invalid_type,expected:u.map,received:r.parsedType}),x;let n=this._def.keyType,i=this._def.valueType,a=[...r.data.entries()].map(([e,t],a)=>({key:n._parse(new I(r,e,r.path,[a,"key"])),value:i._parse(new I(r,t,r.path,[a,"value"]))}));if(r.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let r of a){let n=await r.key,i=await r.value;if("aborted"===n.status||"aborted"===i.status)return x;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let r of a){let n=r.key,i=r.value;if("aborted"===n.status||"aborted"===i.status)return x;("dirty"===n.status||"dirty"===i.status)&&t.dirty(),e.set(n.value,i.value)}return{status:t.value,value:e}}}}ey.create=(e,t,r)=>new ey({valueType:t,keyType:e,typeName:s.ZodMap,...N(r)});class ev extends P{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return _(r,{code:d.invalid_type,expected:u.set,received:r.parsedType}),x;let n=this._def;null!==n.minSize&&r.data.sizen.maxSize.value&&(_(r,{code:d.too_big,maximum:n.maxSize.value,type:"set",inclusive:!0,exact:!1,message:n.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let r=new Set;for(let n of e){if("aborted"===n.status)return x;"dirty"===n.status&&t.dirty(),r.add(n.value)}return{status:t.value,value:r}}let o=[...r.data.values()].map((e,t)=>i._parse(new I(r,e,r.path,t)));return r.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(e,t){return new ev({...this._def,minSize:{value:e,message:o.toString(t)}})}max(e,t){return new ev({...this._def,maxSize:{value:e,message:o.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ev.create=(e,t)=>new ev({valueType:e,minSize:null,maxSize:null,typeName:s.ZodSet,...N(t)});class eb extends P{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.function)return _(t,{code:d.invalid_type,expected:u.function,received:t.parsedType}),x;function r(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m,h].filter(e=>!!e),issueData:{code:d.invalid_arguments,argumentsError:r}})}function n(e,r){return v({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,m,h].filter(e=>!!e),issueData:{code:d.invalid_return_type,returnTypeError:r}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof eT){let e=this;return E(async function(...t){let o=new f([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(r(t,e)),o}),l=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(l,i).catch(e=>{throw o.addIssue(n(l,e)),o})})}{let e=this;return E(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new f([r(t,o.error)]);let s=Reflect.apply(a,this,o.data),l=e._def.returns.safeParse(s,i);if(!l.success)throw new f([n(s,l.error)]);return l.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new eb({...this._def,args:em.create(e).rest(eo.create())})}returns(e){return new eb({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,r){return new eb({args:e||em.create([]).rest(eo.create()),returns:t||eo.create(),typeName:s.ZodFunction,...N(r)})}}class e_ extends P{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}e_.create=(e,t)=>new e_({getter:e,typeName:s.ZodLazy,...N(t)});class ew extends P{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return _(t,{received:t.data,code:d.invalid_literal,expected:this._def.value}),x}return{status:"valid",value:e.data}}get value(){return this._def.value}}function ex(e,t){return new ek({values:e,typeName:s.ZodEnum,...N(t)})}ew.create=(e,t)=>new ew({value:e,typeName:s.ZodLiteral,...N(t)});class ek extends P{_parse(e){if("string"!=typeof e.data){let t=this._getOrReturnCtx(e),r=this._def.values;return _(t,{expected:i.joinValues(r),received:t.parsedType,code:d.invalid_type}),x}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),r=this._def.values;return _(t,{received:t.data,code:d.invalid_enum_value,options:r}),x}return E(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ek.create(e,{...this._def,...t})}exclude(e,t=this._def){return ek.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ek.create=ex;class eE extends P{_parse(e){let t=i.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){let e=i.objectValues(t);return _(r,{expected:i.joinValues(e),received:r.parsedType,code:d.invalid_type}),x}if(this._cache||(this._cache=new Set(i.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){let e=i.objectValues(t);return _(r,{received:r.data,code:d.invalid_enum_value,options:e}),x}return E(e.data)}get enum(){return this._def.values}}eE.create=(e,t)=>new eE({values:e,typeName:s.ZodNativeEnum,...N(t)});class eT extends P{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==u.promise&&!1===t.common.async?(_(t,{code:d.invalid_type,expected:u.promise,received:t.parsedType}),x):E((t.parsedType===u.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}eT.create=(e,t)=>new eT({type:e,typeName:s.ZodPromise,...N(t)});class eA extends P{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===s.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:r}=this._processInputParams(e),n=this._def.effect||null,a={addIssue:e=>{_(r,e),e.fatal?t.abort():t.dirty()},get path(){return r.path}};if(a.addIssue=a.addIssue.bind(a),"preprocess"===n.type){let e=n.transform(r.data,a);if(r.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return x;let n=await this._def.schema._parseAsync({data:e,path:r.path,parent:r});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n});{if("aborted"===t.value)return x;let n=this._def.schema._parseSync({data:e,path:r.path,parent:r});return"aborted"===n.status?x:"dirty"===n.status||"dirty"===t.value?k(n.value):n}}if("refinement"===n.type){let e=e=>{let t=n.refinement(e,a);if(r.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(r=>"aborted"===r.status?x:("dirty"===r.status&&t.dirty(),e(r.value).then(()=>({status:t.value,value:r.value}))));{let n=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===n.status?x:("dirty"===n.status&&t.dirty(),e(n.value),{status:t.value,value:n.value})}}if("transform"===n.type)if(!1!==r.common.async)return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(e=>S(e)?Promise.resolve(n.transform(e.value,a)).then(e=>({status:t.value,value:e})):x);else{let e=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!S(e))return x;let i=n.transform(e.value,a);if(i instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:i}}i.assertNever(n)}}eA.create=(e,t,r)=>new eA({schema:e,typeName:s.ZodEffects,effect:t,...N(r)}),eA.createWithPreprocess=(e,t,r)=>new eA({schema:t,effect:{type:"preprocess",transform:e},typeName:s.ZodEffects,...N(r)});class eS extends P{_parse(e){return this._getType(e)===u.undefined?E(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}eS.create=(e,t)=>new eS({innerType:e,typeName:s.ZodOptional,...N(t)});class ej extends P{_parse(e){return this._getType(e)===u.null?E(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ej.create=(e,t)=>new ej({innerType:e,typeName:s.ZodNullable,...N(t)});class eI extends P{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}eI.create=(e,t)=>new eI({innerType:e,typeName:s.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...N(t)});class eR extends P{_parse(e){let{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},n=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return j(n)?n.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new f(r.common.issues)},input:r.data})})):{status:"valid",value:"valid"===n.status?n.value:this._def.catchValue({get error(){return new f(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}eR.create=(e,t)=>new eR({innerType:e,typeName:s.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...N(t)});class eN extends P{_parse(e){if(this._getType(e)!==u.nan){let t=this._getOrReturnCtx(e);return _(t,{code:d.invalid_type,expected:u.nan,received:t.parsedType}),x}return{status:"valid",value:e.data}}}eN.create=e=>new eN({typeName:s.ZodNaN,...N(e)});let eP=Symbol("zod_brand");class eC extends P{_parse(e){let{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class eO extends P{_parse(e){let{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),k(e.value)):this._def.out._parseAsync({data:e.value,path:r.path,parent:r})})();{let e=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return"aborted"===e.status?x:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:r.path,parent:r})}}static create(e,t){return new eO({in:e,out:t,typeName:s.ZodPipeline})}}class ez extends P{_parse(e){let t=this._def.innerType._parse(e),r=e=>(S(e)&&(e.value=Object.freeze(e.value)),e);return j(t)?t.then(e=>r(e)):r(t)}unwrap(){return this._def.innerType}}function eM(e,t){let r="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof r?{message:r}:r}function e$(e,t={},r){return e?ea.create().superRefine((n,i)=>{let a=e(n);if(a instanceof Promise)return a.then(e=>{if(!e){let e=eM(t,n),a=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:a})}});if(!a){let e=eM(t,n),a=e.fatal??r??!0;i.addIssue({code:"custom",...e,fatal:a})}}):ea.create()}ez.create=(e,t)=>new ez({innerType:e,typeName:s.ZodReadonly,...N(t)});let eL={object:ec.lazycreate};!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(s||(s={}));let eF=(e,t={message:`Input not instance of ${e.name}`})=>e$(t=>t instanceof e,t),eD=K.create,eU=X.create,eB=eN.create,eZ=Q.create,eq=ee.create,eV=et.create,eH=er.create,eY=en.create,eW=ei.create,eJ=ea.create,eG=eo.create,eK=es.create,eX=el.create,eQ=eu.create,e0=ec.create,e1=ec.strictCreate,e2=ed.create,e5=ef.create,e3=eh.create,e4=em.create,e6=eg.create,e9=ey.create,e8=ev.create,e7=eb.create,te=e_.create,tt=ew.create,tr=ek.create,tn=eE.create,ti=eT.create,ta=eA.create,to=eS.create,ts=ej.create,tl=eA.createWithPreprocess,tu=eO.create,tc=()=>eD().optional(),td=()=>eU().optional(),tp=()=>eq().optional(),tf={string:e=>K.create({...e,coerce:!0}),number:e=>X.create({...e,coerce:!0}),boolean:e=>ee.create({...e,coerce:!0}),bigint:e=>Q.create({...e,coerce:!0}),date:e=>et.create({...e,coerce:!0})},th=x},1933:(e,t,r)=>{"use strict";e.exports=r(6500)},2232:(e,t,r)=>{"use strict";r.d(t,{m2:()=>s,NR:()=>l,Z9:()=>N,n_:()=>P,HD:()=>j,Ds:()=>A,hK:()=>d,sl:()=>T,cV:()=>S,cb:()=>u,$C:()=>p,u1:()=>f,zf:()=>h,v0:()=>b,WL:()=>m,xI:()=>_,S:()=>k,GU:()=>x,N8:()=>v,ZZ:()=>y,eu:()=>g,ae:()=>C});var n=r(9143);let i=(e,t=21)=>(r=t)=>{let n="",i=0|r;for(;i--;)n+=e[Math.random()*e.length|0];return n};var a=r(3082),o=r(9509);function s(...e){return e.reduce((e,t)=>({...e,...null!=t?t:{}}),{})}function l(e){return new ReadableStream({async pull(t){try{let{value:r,done:n}=await e.next();n?t.close():t.enqueue(r)}catch(e){t.error(e)}},cancel(){}})}async function u(e){return null==e?Promise.resolve():new Promise(t=>setTimeout(t,e))}function c(e){let t={};return e.headers.forEach((e,r)=>{t[r]=e}),t}var d=({prefix:e,size:t=16,alphabet:r="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",separator:a="-"}={})=>{let o=i(r,t);if(null==e)return o;if(r.includes(a))throw new n.Di({argument:"separator",message:`The separator "${a}" must not be part of the alphabet "${r}".`});return t=>`${e}${a}${o(t)}`},p=d();function f(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}function h(e){return e instanceof Error&&("AbortError"===e.name||"TimeoutError"===e.name)}function m({apiKey:e,environmentVariableName:t,apiKeyParameterName:r="apiKey",description:i}){if("string"==typeof e)return e;if(null!=e)throw new n.Kq({message:`${i} API key must be a string.`});if(void 0===o)throw new n.Kq({message:`${i} API key is missing. Pass it using the '${r}' parameter. Environment variables is not supported in this environment.`});if(null==(e=o.env[t]))throw new n.Kq({message:`${i} API key is missing. Pass it using the '${r}' parameter or the ${t} environment variable.`});if("string"!=typeof e)throw new n.Kq({message:`${i} API key must be a string. The value of the ${t} environment variable is not a string.`});return e}var g=Symbol.for("vercel.ai.validator");function y({value:e,schema:t}){var r;let i="object"==typeof t&&null!==t&&g in t&&!0===t[g]&&"validate"in t?t:(r=t,{[g]:!0,validate:e=>{let t=r.safeParse(e);return t.success?{success:!0,value:t.data}:{success:!1,error:t.error}}});try{if(null==i.validate)return{success:!0,value:e};let t=i.validate(e);if(t.success)return t;return{success:!1,error:n.iM.wrap({value:e,cause:t.error})}}catch(t){return{success:!1,error:n.iM.wrap({value:e,cause:t})}}}function v({text:e,schema:t}){try{let r=a.parse(e);if(null==t)return{success:!0,value:r,rawValue:r};let n=y({value:r,schema:t});return n.success?{...n,rawValue:r}:n}catch(t){return{success:!1,error:n.u6.isInstance(t)?t:new n.u6({text:e,cause:t})}}}function b(e){try{return a.parse(e),!0}catch(e){return!1}}function _({provider:e,providerOptions:t,schema:r}){if((null==t?void 0:t[e])==null)return;let i=y({value:t[e],schema:r});if(!i.success)throw new n.Di({argument:"providerOptions",message:`invalid ${e} provider options`,cause:i.error});return i.value}var w=()=>globalThis.fetch,x=async({url:e,headers:t,body:r,failedResponseHandler:n,successfulResponseHandler:i,abortSignal:a,fetch:o})=>E({url:e,headers:{"Content-Type":"application/json",...t},body:{content:JSON.stringify(r),values:r},failedResponseHandler:n,successfulResponseHandler:i,abortSignal:a,fetch:o}),k=async({url:e,headers:t,formData:r,failedResponseHandler:n,successfulResponseHandler:i,abortSignal:a,fetch:o})=>E({url:e,headers:t,body:{content:r,values:Object.fromEntries(r.entries())},failedResponseHandler:n,successfulResponseHandler:i,abortSignal:a,fetch:o}),E=async({url:e,headers:t={},body:r,successfulResponseHandler:i,failedResponseHandler:a,abortSignal:o,fetch:s=w()})=>{try{var l;let u=await s(e,{method:"POST",headers:(l=t,Object.fromEntries(Object.entries(l).filter(([e,t])=>null!=t))),body:r.content,signal:o}),d=c(u);if(!u.ok){let t;try{t=await a({response:u,url:e,requestBodyValues:r.values})}catch(t){if(h(t)||n.hL.isInstance(t))throw t;throw new n.hL({message:"Failed to process error response",cause:t,statusCode:u.status,url:e,responseHeaders:d,requestBodyValues:r.values})}throw t.value}try{return await i({response:u,url:e,requestBodyValues:r.values})}catch(t){if(t instanceof Error&&(h(t)||n.hL.isInstance(t)))throw t;throw new n.hL({message:"Failed to process successful response",cause:t,statusCode:u.status,url:e,responseHeaders:d,requestBodyValues:r.values})}}catch(t){if(h(t))throw t;if(t instanceof TypeError&&"fetch failed"===t.message){let i=t.cause;if(null!=i)throw new n.hL({message:`Cannot connect to API: ${i.message}`,cause:i,url:e,requestBodyValues:r.values,isRetryable:!0})}throw t}},T=({errorSchema:e,errorToMessage:t,isRetryable:r})=>async({response:i,url:o,requestBodyValues:s})=>{let l=await i.text(),u=c(i);if(""===l.trim())return{responseHeaders:u,value:new n.hL({message:i.statusText,url:o,requestBodyValues:s,statusCode:i.status,responseHeaders:u,responseBody:l,isRetryable:null==r?void 0:r(i)})};try{let c=function({text:e,schema:t}){try{let r=a.parse(e);if(null==t)return r;return function({value:e,schema:t}){let r=y({value:e,schema:t});if(!r.success)throw n.iM.wrap({value:e,cause:r.error});return r.value}({value:r,schema:t})}catch(t){if(n.u6.isInstance(t)||n.iM.isInstance(t))throw t;throw new n.u6({text:e,cause:t})}}({text:l,schema:e});return{responseHeaders:u,value:new n.hL({message:t(c),url:o,requestBodyValues:s,statusCode:i.status,responseHeaders:u,responseBody:l,data:c,isRetryable:null==r?void 0:r(i,c)})}}catch(e){return{responseHeaders:u,value:new n.hL({message:i.statusText,url:o,requestBodyValues:s,statusCode:i.status,responseHeaders:u,responseBody:l,isRetryable:null==r?void 0:r(i)})}}},A=e=>async({response:t})=>{let r=c(t);if(null==t.body)throw new n.Tt({});return{responseHeaders:r,value:t.body.pipeThrough(new TextDecoderStream).pipeThrough(function(){let e,t,r,n="",i=[];function a(e,t){if(""===e)return void o(t);if(e.startsWith(":"))return;let r=e.indexOf(":");if(-1===r)return void s(e,"");let n=e.slice(0,r),i=r+1;s(n,i0&&(n.enqueue({event:e,data:i.join("\n"),id:t,retry:r}),i=[],e=void 0,r=void 0)}function s(n,a){switch(n){case"event":e=a;break;case"data":i.push(a);break;case"id":t=a;break;case"retry":let o=parseInt(a,10);isNaN(o)||(r=o)}}return new TransformStream({transform(e,t){let{lines:r,incompleteLine:i}=function(e,t){let r=[],n=e;for(let e=0;easync({response:t,url:r,requestBodyValues:i})=>{let a=await t.text(),o=v({text:a,schema:e}),s=c(t);if(!o.success)throw new n.hL({message:"Invalid JSON response",cause:o.error,statusCode:t.status,responseHeaders:s,responseBody:a,url:r,requestBodyValues:i});return{responseHeaders:s,value:o.value,rawValue:o.rawValue}},j=()=>async({response:e,url:t,requestBodyValues:r})=>{let i=c(e);if(!e.body)throw new n.hL({message:"Response body is empty",url:t,requestBodyValues:r,statusCode:e.status,responseHeaders:i,responseBody:void 0});try{let t=await e.arrayBuffer();return{responseHeaders:i,value:new Uint8Array(t)}}catch(a){throw new n.hL({message:"Failed to read response as array buffer",url:t,requestBodyValues:r,statusCode:e.status,responseHeaders:i,responseBody:void 0,cause:a})}},{btoa:I,atob:R}=globalThis;function N(e){let t=R(e.replace(/-/g,"+").replace(/_/g,"/"));return Uint8Array.from(t,e=>e.codePointAt(0))}function P(e){let t="";for(let r=0;r{"use strict";var n=r(9509);r(8375);var i=r(2115),a=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(i),o=void 0!==n&&n.env&&!0,s=function(e){return"[object String]"===Object.prototype.toString.call(e)},l=function(){function e(e){var t=void 0===e?{}:e,r=t.name,n=void 0===r?"stylesheet":r,i=t.optimizeForSpeed,a=void 0===i?o:i;u(s(n),"`name` must be a string"),this._name=n,this._deletedRulePlaceholder="#"+n+"-deleted-rule____{}",u("boolean"==typeof a,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=a,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var t,r=e.prototype;return r.setOptimizeForSpeed=function(e){u("boolean"==typeof e,"`setOptimizeForSpeed` accepts a boolean"),u(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=e,this.inject()},r.isOptimizeForSpeed=function(){return this._optimizeForSpeed},r.inject=function(){var e=this;if(u(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(t,r){return"number"==typeof r?e._serverSheet.cssRules[r]={cssText:t}:e._serverSheet.cssRules.push({cssText:t}),r},deleteRule:function(t){e._serverSheet.cssRules[t]=null}}},r.getSheetForTag=function(e){if(e.sheet)return e.sheet;for(var t=0;t>>0},d={};function p(e,t){if(!t)return"jsx-"+e;var r=String(t),n=e+r;return d[n]||(d[n]="jsx-"+c(e+"-"+r)),d[n]}function f(e,t){"undefined"==typeof window&&(t=t.replace(/\/style/gi,"\\/style"));var r=e+t;return d[r]||(d[r]=t.replace(/__jsx-style-dynamic-selector/g,e)),d[r]}var h=function(){function e(e){var t=void 0===e?{}:e,r=t.styleSheet,n=void 0===r?null:r,i=t.optimizeForSpeed,a=void 0!==i&&i;this._sheet=n||new l({name:"styled-jsx",optimizeForSpeed:a}),this._sheet.inject(),n&&"boolean"==typeof a&&(this._sheet.setOptimizeForSpeed(a),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var t=e.prototype;return t.add=function(e){var t=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(e.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(e,t){return e[t]=0,e},{}));var r=this.getIdAndRules(e),n=r.styleId,i=r.rules;if(n in this._instancesCounts){this._instancesCounts[n]+=1;return}var a=i.map(function(e){return t._sheet.insertRule(e)}).filter(function(e){return -1!==e});this._indices[n]=a,this._instancesCounts[n]=1},t.remove=function(e){var t=this,r=this.getIdAndRules(e).styleId;if(function(e,t){if(!e)throw Error("StyleSheetRegistry: "+t+".")}(r in this._instancesCounts,"styleId: `"+r+"` not found"),this._instancesCounts[r]-=1,this._instancesCounts[r]<1){var n=this._fromServer&&this._fromServer[r];n?(n.parentNode.removeChild(n),delete this._fromServer[r]):(this._indices[r].forEach(function(e){return t._sheet.deleteRule(e)}),delete this._indices[r]),delete this._instancesCounts[r]}},t.update=function(e,t){this.add(t),this.remove(e)},t.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},t.cssRules=function(){var e=this,t=this._fromServer?Object.keys(this._fromServer).map(function(t){return[t,e._fromServer[t]]}):[],r=this._sheet.cssRules();return t.concat(Object.keys(this._indices).map(function(t){return[t,e._indices[t].map(function(e){return r[e].cssText}).join(e._optimizeForSpeed?"":"\n")]}).filter(function(e){return!!e[1]}))},t.styles=function(e){var t,r;return t=this.cssRules(),void 0===(r=e)&&(r={}),t.map(function(e){var t=e[0],n=e[1];return a.default.createElement("style",{id:"__"+t,key:"__"+t,nonce:r.nonce?r.nonce:void 0,dangerouslySetInnerHTML:{__html:n}})})},t.getIdAndRules=function(e){var t=e.children,r=e.dynamic,n=e.id;if(r){var i=p(n,r);return{styleId:i,rules:Array.isArray(t)?t.map(function(e){return f(i,e)}):[f(i,t)]}}return{styleId:p(n),rules:Array.isArray(t)?t:[t]}},t.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(e,t){return e[t.id.slice(2)]=t,e},{})},e}(),m=i.createContext(null);m.displayName="StyleSheetContext";var g=a.default.useInsertionEffect||a.default.useLayoutEffect,y="undefined"!=typeof window?new h:void 0;function v(e){var t=y||i.useContext(m);return t&&("undefined"==typeof window?t.add(e):g(function(){return t.add(e),function(){t.remove(e)}},[e.id,String(e.dynamic)])),null}v.dynamic=function(e){return e.map(function(e){return p(e[0],e[1])}).join(" ")},t.style=v},2407:(e,t,r)=>{"use strict";e.exports=r(6892)},2421:(e,t,r)=>{"use strict";r.d(t,{y:()=>i});let n=e=>{let t,r=new Set,n=(e,n)=>{let i="function"==typeof e?e(t):e;if(!Object.is(i,t)){let e=t;t=(null!=n?n:"object"!=typeof i||null===i)?i:Object.assign({},t,i),r.forEach(r=>r(t,e))}},i=()=>t,a={setState:n,getState:i,getInitialState:()=>o,subscribe:e=>(r.add(e),()=>r.delete(e))},o=t=e(n,i,a);return a},i=e=>e?n(e):n},2436:(e,t,r)=>{"use strict";var n=r(2115),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=n.useState,o=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s(function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})},[e,r,t]),o(function(){return u(i)&&c({inst:i}),e(function(){u(i)&&c({inst:i})})},[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},2480:(e,t,r)=>{"use strict";r.d(t,{r:()=>W});var n=r(2232),i=r(9143),a=r(1153);function o(e){var t,r;return null!=(r=null==(t=null==e?void 0:e.content)?void 0:t.map(({token:e,logprob:t,top_logprobs:r})=>({token:e,logprob:t,topLogprobs:r?r.map(({token:e,logprob:t})=>({token:e,logprob:t})):[]})))?r:void 0}function s(e){switch(e){case"stop":return"stop";case"length":return"length";case"content_filter":return"content-filter";case"function_call":case"tool_calls":return"tool-calls";default:return"unknown"}}var l=a.z.object({error:a.z.object({message:a.z.string(),type:a.z.string().nullish(),param:a.z.any().nullish(),code:a.z.union([a.z.string(),a.z.number()]).nullish()})}),u=(0,n.sl)({errorSchema:l,errorToMessage:e=>e.error.message});function c({id:e,model:t,created:r}){return{id:null!=e?e:void 0,modelId:null!=t?t:void 0,timestamp:null!=r?new Date(1e3*r):void 0}}var d=class{constructor(e,t,r){this.specificationVersion="v1",this.modelId=e,this.settings=t,this.config=r}get supportsStructuredOutputs(){var e;return null!=(e=this.settings.structuredOutputs)?e:m(this.modelId)}get defaultObjectGenerationMode(){return this.modelId.startsWith("gpt-4o-audio-preview")?"tool":this.supportsStructuredOutputs?"json":"tool"}get provider(){return this.config.provider}get supportsImageUrls(){return!this.settings.downloadImages}getArgs({mode:e,prompt:t,maxTokens:r,temperature:a,topP:o,topK:s,frequencyPenalty:l,presencePenalty:u,stopSequences:c,responseFormat:d,seed:p,providerMetadata:f}){var h,y,v,b,_,w,x,k,E,T,A;let S=e.type,j=[];null!=s&&j.push({type:"unsupported-setting",setting:"topK"}),(null==d?void 0:d.type)!=="json"||null==d.schema||this.supportsStructuredOutputs||j.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format schema is only supported with structuredOutputs"});let I=this.settings.useLegacyFunctionCalling;if(I&&!0===this.settings.parallelToolCalls)throw new i.b8({functionality:"useLegacyFunctionCalling with parallelToolCalls"});if(I&&this.supportsStructuredOutputs)throw new i.b8({functionality:"structuredOutputs with useLegacyFunctionCalling"});let{messages:R,warnings:N}=function({prompt:e,useLegacyFunctionCalling:t=!1,systemMessageMode:r="system"}){let a=[],o=[];for(let{role:s,content:l}of e)switch(s){case"system":switch(r){case"system":a.push({role:"system",content:l});break;case"developer":a.push({role:"developer",content:l});break;case"remove":o.push({type:"other",message:"system messages are removed for this model"});break;default:throw Error(`Unsupported system message mode: ${r}`)}break;case"user":if(1===l.length&&"text"===l[0].type){a.push({role:"user",content:l[0].text});break}a.push({role:"user",content:l.map((e,t)=>{var r,a,o,s;switch(e.type){case"text":return{type:"text",text:e.text};case"image":return{type:"image_url",image_url:{url:e.image instanceof URL?e.image.toString():`data:${null!=(r=e.mimeType)?r:"image/jpeg"};base64,${(0,n.n_)(e.image)}`,detail:null==(o=null==(a=e.providerMetadata)?void 0:a.openai)?void 0:o.imageDetail}};case"file":if(e.data instanceof URL)throw new i.b8({functionality:"'File content parts with URL data' functionality not supported."});switch(e.mimeType){case"audio/wav":return{type:"input_audio",input_audio:{data:e.data,format:"wav"}};case"audio/mp3":case"audio/mpeg":return{type:"input_audio",input_audio:{data:e.data,format:"mp3"}};case"application/pdf":return{type:"file",file:{filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${e.data}`}};default:throw new i.b8({functionality:`File content part type ${e.mimeType} in user messages`})}}})});break;case"assistant":{let e="",r=[];for(let t of l)switch(t.type){case"text":e+=t.text;break;case"tool-call":r.push({id:t.toolCallId,type:"function",function:{name:t.toolName,arguments:JSON.stringify(t.args)}})}if(t){if(r.length>1)throw new i.b8({functionality:"useLegacyFunctionCalling with multiple tool calls in one message"});a.push({role:"assistant",content:e,function_call:r.length>0?r[0].function:void 0})}else a.push({role:"assistant",content:e,tool_calls:r.length>0?r:void 0});break}case"tool":for(let e of l)t?a.push({role:"function",name:e.toolName,content:JSON.stringify(e.result)}):a.push({role:"tool",tool_call_id:e.toolCallId,content:JSON.stringify(e.result)});break;default:throw Error(`Unsupported role: ${s}`)}return{messages:a,warnings:o}}({prompt:t,useLegacyFunctionCalling:I,systemMessageMode:m(E=this.modelId)?null!=(A=null==(T=g[E])?void 0:T.systemMessageMode)?A:"developer":"system"});j.push(...N);let P={model:this.modelId,logit_bias:this.settings.logitBias,logprobs:!0===this.settings.logprobs||"number"==typeof this.settings.logprobs||void 0,top_logprobs:"number"==typeof this.settings.logprobs?this.settings.logprobs:"boolean"==typeof this.settings.logprobs&&this.settings.logprobs?0:void 0,user:this.settings.user,parallel_tool_calls:this.settings.parallelToolCalls,max_tokens:r,temperature:a,top_p:o,frequency_penalty:l,presence_penalty:u,response_format:(null==d?void 0:d.type)==="json"?this.supportsStructuredOutputs&&null!=d.schema?{type:"json_schema",json_schema:{schema:d.schema,strict:!0,name:null!=(h=d.name)?h:"response",description:d.description}}:{type:"json_object"}:void 0,stop:c,seed:p,max_completion_tokens:null==(y=null==f?void 0:f.openai)?void 0:y.maxCompletionTokens,store:null==(v=null==f?void 0:f.openai)?void 0:v.store,metadata:null==(b=null==f?void 0:f.openai)?void 0:b.metadata,prediction:null==(_=null==f?void 0:f.openai)?void 0:_.prediction,reasoning_effort:null!=(x=null==(w=null==f?void 0:f.openai)?void 0:w.reasoningEffort)?x:this.settings.reasoningEffort,messages:R};switch(m(this.modelId)?(null!=P.temperature&&(P.temperature=void 0,j.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"})),null!=P.top_p&&(P.top_p=void 0,j.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"})),null!=P.frequency_penalty&&(P.frequency_penalty=void 0,j.push({type:"unsupported-setting",setting:"frequencyPenalty",details:"frequencyPenalty is not supported for reasoning models"})),null!=P.presence_penalty&&(P.presence_penalty=void 0,j.push({type:"unsupported-setting",setting:"presencePenalty",details:"presencePenalty is not supported for reasoning models"})),null!=P.logit_bias&&(P.logit_bias=void 0,j.push({type:"other",message:"logitBias is not supported for reasoning models"})),null!=P.logprobs&&(P.logprobs=void 0,j.push({type:"other",message:"logprobs is not supported for reasoning models"})),null!=P.top_logprobs&&(P.top_logprobs=void 0,j.push({type:"other",message:"topLogprobs is not supported for reasoning models"})),null!=P.max_tokens&&(null==P.max_completion_tokens&&(P.max_completion_tokens=P.max_tokens),P.max_tokens=void 0)):(this.modelId.startsWith("gpt-4o-search-preview")||this.modelId.startsWith("gpt-4o-mini-search-preview"))&&null!=P.temperature&&(P.temperature=void 0,j.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for the search preview models and has been removed."})),S){case"regular":{let{tools:t,tool_choice:r,functions:n,function_call:a,toolWarnings:o}=function({mode:e,useLegacyFunctionCalling:t=!1,structuredOutputs:r}){var n;let a=(null==(n=e.tools)?void 0:n.length)?e.tools:void 0,o=[];if(null==a)return{tools:void 0,tool_choice:void 0,toolWarnings:o};let s=e.toolChoice;if(t){let e=[];for(let t of a)"provider-defined"===t.type?o.push({type:"unsupported-tool",tool:t}):e.push({name:t.name,description:t.description,parameters:t.parameters});if(null==s)return{functions:e,function_call:void 0,toolWarnings:o};switch(s.type){case"auto":case"none":case void 0:return{functions:e,function_call:void 0,toolWarnings:o};case"required":throw new i.b8({functionality:"useLegacyFunctionCalling and toolChoice: required"});default:return{functions:e,function_call:{name:s.toolName},toolWarnings:o}}}let l=[];for(let e of a)"provider-defined"===e.type?o.push({type:"unsupported-tool",tool:e}):l.push({type:"function",function:{name:e.name,description:e.description,parameters:e.parameters,strict:!!r||void 0}});if(null==s)return{tools:l,tool_choice:void 0,toolWarnings:o};let u=s.type;switch(u){case"auto":case"none":case"required":return{tools:l,tool_choice:u,toolWarnings:o};case"tool":return{tools:l,tool_choice:{type:"function",function:{name:s.toolName}},toolWarnings:o};default:throw new i.b8({functionality:`Unsupported tool choice type: ${u}`})}}({mode:e,useLegacyFunctionCalling:I,structuredOutputs:this.supportsStructuredOutputs});return{args:{...P,tools:t,tool_choice:r,functions:n,function_call:a},warnings:[...j,...o]}}case"object-json":return{args:{...P,response_format:this.supportsStructuredOutputs&&null!=e.schema?{type:"json_schema",json_schema:{schema:e.schema,strict:!0,name:null!=(k=e.name)?k:"response",description:e.description}}:{type:"json_object"}},warnings:j};case"object-tool":return{args:I?{...P,function_call:{name:e.tool.name},functions:[{name:e.tool.name,description:e.tool.description,parameters:e.tool.parameters}]}:{...P,tool_choice:{type:"function",function:{name:e.tool.name}},tools:[{type:"function",function:{name:e.tool.name,description:e.tool.description,parameters:e.tool.parameters,strict:!!this.supportsStructuredOutputs||void 0}}]},warnings:j};default:throw Error(`Unsupported type: ${S}`)}}async doGenerate(e){var t,r,i,a,l,d,p,h;let{args:m,warnings:g}=this.getArgs(e),{responseHeaders:y,value:v,rawValue:b}=await (0,n.GU)({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:m,failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(f),abortSignal:e.abortSignal,fetch:this.config.fetch}),{messages:_,...w}=m,x=v.choices[0],k=null==(t=v.usage)?void 0:t.completion_tokens_details,E=null==(r=v.usage)?void 0:r.prompt_tokens_details,T={openai:{}};return(null==k?void 0:k.reasoning_tokens)!=null&&(T.openai.reasoningTokens=null==k?void 0:k.reasoning_tokens),(null==k?void 0:k.accepted_prediction_tokens)!=null&&(T.openai.acceptedPredictionTokens=null==k?void 0:k.accepted_prediction_tokens),(null==k?void 0:k.rejected_prediction_tokens)!=null&&(T.openai.rejectedPredictionTokens=null==k?void 0:k.rejected_prediction_tokens),(null==E?void 0:E.cached_tokens)!=null&&(T.openai.cachedPromptTokens=null==E?void 0:E.cached_tokens),{text:null!=(i=x.message.content)?i:void 0,toolCalls:this.settings.useLegacyFunctionCalling&&x.message.function_call?[{toolCallType:"function",toolCallId:(0,n.$C)(),toolName:x.message.function_call.name,args:x.message.function_call.arguments}]:null==(a=x.message.tool_calls)?void 0:a.map(e=>{var t;return{toolCallType:"function",toolCallId:null!=(t=e.id)?t:(0,n.$C)(),toolName:e.function.name,args:e.function.arguments}}),finishReason:s(x.finish_reason),usage:{promptTokens:null!=(d=null==(l=v.usage)?void 0:l.prompt_tokens)?d:NaN,completionTokens:null!=(h=null==(p=v.usage)?void 0:p.completion_tokens)?h:NaN},rawCall:{rawPrompt:_,rawSettings:w},rawResponse:{headers:y,body:b},request:{body:JSON.stringify(m)},response:c(v),warnings:g,logprobs:o(x.logprobs),providerMetadata:T}}async doStream(e){let t;if(this.settings.simulateStreaming){let t=await this.doGenerate(e);return{stream:new ReadableStream({start(e){if(e.enqueue({type:"response-metadata",...t.response}),t.text&&e.enqueue({type:"text-delta",textDelta:t.text}),t.toolCalls)for(let r of t.toolCalls)e.enqueue({type:"tool-call-delta",toolCallType:"function",toolCallId:r.toolCallId,toolName:r.toolName,argsTextDelta:r.args}),e.enqueue({type:"tool-call",...r});e.enqueue({type:"finish",finishReason:t.finishReason,usage:t.usage,logprobs:t.logprobs,providerMetadata:t.providerMetadata}),e.close()}}),rawCall:t.rawCall,rawResponse:t.rawResponse,warnings:t.warnings}}let{args:r,warnings:a}=this.getArgs(e),l={...r,stream:!0,stream_options:"strict"===this.config.compatibility?{include_usage:!0}:void 0},{responseHeaders:d,value:p}=await (0,n.GU)({url:this.config.url({path:"/chat/completions",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:l,failedResponseHandler:u,successfulResponseHandler:(0,n.Ds)(h),abortSignal:e.abortSignal,fetch:this.config.fetch}),{messages:f,...m}=r,g=[],y="unknown",v={promptTokens:void 0,completionTokens:void 0},b=!0,{useLegacyFunctionCalling:_}=this.settings,w={openai:{}};return{stream:p.pipeThrough(new TransformStream({transform(e,r){var a,l,u,d,p,f,h,m,x,k,E,T;if(!e.success){y="error",r.enqueue({type:"error",error:e.error});return}let A=e.value;if("error"in A){y="error",r.enqueue({type:"error",error:A.error});return}if(b&&(b=!1,r.enqueue({type:"response-metadata",...c(A)})),null!=A.usage){let{prompt_tokens:e,completion_tokens:t,prompt_tokens_details:r,completion_tokens_details:n}=A.usage;v={promptTokens:null!=e?e:void 0,completionTokens:null!=t?t:void 0},(null==n?void 0:n.reasoning_tokens)!=null&&(w.openai.reasoningTokens=null==n?void 0:n.reasoning_tokens),(null==n?void 0:n.accepted_prediction_tokens)!=null&&(w.openai.acceptedPredictionTokens=null==n?void 0:n.accepted_prediction_tokens),(null==n?void 0:n.rejected_prediction_tokens)!=null&&(w.openai.rejectedPredictionTokens=null==n?void 0:n.rejected_prediction_tokens),(null==r?void 0:r.cached_tokens)!=null&&(w.openai.cachedPromptTokens=null==r?void 0:r.cached_tokens)}let S=A.choices[0];if((null==S?void 0:S.finish_reason)!=null&&(y=s(S.finish_reason)),(null==S?void 0:S.delta)==null)return;let j=S.delta;null!=j.content&&r.enqueue({type:"text-delta",textDelta:j.content});let I=o(null==S?void 0:S.logprobs);(null==I?void 0:I.length)&&(void 0===t&&(t=[]),t.push(...I));let R=_&&null!=j.function_call?[{type:"function",id:(0,n.$C)(),function:j.function_call,index:0}]:j.tool_calls;if(null!=R)for(let e of R){let t=e.index;if(null==g[t]){if("function"!==e.type)throw new i.xn({data:e,message:"Expected 'function' type."});if(null==e.id)throw new i.xn({data:e,message:"Expected 'id' to be a string."});if((null==(a=e.function)?void 0:a.name)==null)throw new i.xn({data:e,message:"Expected 'function.name' to be a string."});g[t]={id:e.id,type:"function",function:{name:e.function.name,arguments:null!=(l=e.function.arguments)?l:""},hasFinished:!1};let o=g[t];(null==(u=o.function)?void 0:u.name)!=null&&(null==(d=o.function)?void 0:d.arguments)!=null&&(o.function.arguments.length>0&&r.enqueue({type:"tool-call-delta",toolCallType:"function",toolCallId:o.id,toolName:o.function.name,argsTextDelta:o.function.arguments}),(0,n.v0)(o.function.arguments)&&(r.enqueue({type:"tool-call",toolCallType:"function",toolCallId:null!=(p=o.id)?p:(0,n.$C)(),toolName:o.function.name,args:o.function.arguments}),o.hasFinished=!0));continue}let o=g[t];!o.hasFinished&&((null==(f=e.function)?void 0:f.arguments)!=null&&(o.function.arguments+=null!=(m=null==(h=e.function)?void 0:h.arguments)?m:""),r.enqueue({type:"tool-call-delta",toolCallType:"function",toolCallId:o.id,toolName:o.function.name,argsTextDelta:null!=(x=e.function.arguments)?x:""}),(null==(k=o.function)?void 0:k.name)!=null&&(null==(E=o.function)?void 0:E.arguments)!=null&&(0,n.v0)(o.function.arguments)&&(r.enqueue({type:"tool-call",toolCallType:"function",toolCallId:null!=(T=o.id)?T:(0,n.$C)(),toolName:o.function.name,args:o.function.arguments}),o.hasFinished=!0))}},flush(e){var r,n;e.enqueue({type:"finish",finishReason:y,logprobs:t,usage:{promptTokens:null!=(r=v.promptTokens)?r:NaN,completionTokens:null!=(n=v.completionTokens)?n:NaN},...null!=w?{providerMetadata:w}:{}})}})),rawCall:{rawPrompt:f,rawSettings:m},rawResponse:{headers:d},request:{body:JSON.stringify(l)},warnings:a}}},p=a.z.object({prompt_tokens:a.z.number().nullish(),completion_tokens:a.z.number().nullish(),prompt_tokens_details:a.z.object({cached_tokens:a.z.number().nullish()}).nullish(),completion_tokens_details:a.z.object({reasoning_tokens:a.z.number().nullish(),accepted_prediction_tokens:a.z.number().nullish(),rejected_prediction_tokens:a.z.number().nullish()}).nullish()}).nullish(),f=a.z.object({id:a.z.string().nullish(),created:a.z.number().nullish(),model:a.z.string().nullish(),choices:a.z.array(a.z.object({message:a.z.object({role:a.z.literal("assistant").nullish(),content:a.z.string().nullish(),function_call:a.z.object({arguments:a.z.string(),name:a.z.string()}).nullish(),tool_calls:a.z.array(a.z.object({id:a.z.string().nullish(),type:a.z.literal("function"),function:a.z.object({name:a.z.string(),arguments:a.z.string()})})).nullish()}),index:a.z.number(),logprobs:a.z.object({content:a.z.array(a.z.object({token:a.z.string(),logprob:a.z.number(),top_logprobs:a.z.array(a.z.object({token:a.z.string(),logprob:a.z.number()}))})).nullable()}).nullish(),finish_reason:a.z.string().nullish()})),usage:p}),h=a.z.union([a.z.object({id:a.z.string().nullish(),created:a.z.number().nullish(),model:a.z.string().nullish(),choices:a.z.array(a.z.object({delta:a.z.object({role:a.z.enum(["assistant"]).nullish(),content:a.z.string().nullish(),function_call:a.z.object({name:a.z.string().optional(),arguments:a.z.string().optional()}).nullish(),tool_calls:a.z.array(a.z.object({index:a.z.number(),id:a.z.string().nullish(),type:a.z.literal("function").nullish(),function:a.z.object({name:a.z.string().nullish(),arguments:a.z.string().nullish()})})).nullish()}).nullish(),logprobs:a.z.object({content:a.z.array(a.z.object({token:a.z.string(),logprob:a.z.number(),top_logprobs:a.z.array(a.z.object({token:a.z.string(),logprob:a.z.number()}))})).nullable()}).nullish(),finish_reason:a.z.string().nullish(),index:a.z.number()})),usage:p}),l]);function m(e){return e.startsWith("o")}var g={"o1-mini":{systemMessageMode:"remove"},"o1-mini-2024-09-12":{systemMessageMode:"remove"},"o1-preview":{systemMessageMode:"remove"},"o1-preview-2024-09-12":{systemMessageMode:"remove"},o3:{systemMessageMode:"developer"},"o3-2025-04-16":{systemMessageMode:"developer"},"o3-mini":{systemMessageMode:"developer"},"o3-mini-2025-01-31":{systemMessageMode:"developer"},"o4-mini":{systemMessageMode:"developer"},"o4-mini-2025-04-16":{systemMessageMode:"developer"}};function y(e){return null==e?void 0:e.tokens.map((t,r)=>({token:t,logprob:e.token_logprobs[r],topLogprobs:e.top_logprobs?Object.entries(e.top_logprobs[r]).map(([e,t])=>({token:e,logprob:t})):[]}))}var v=class{constructor(e,t,r){this.specificationVersion="v1",this.defaultObjectGenerationMode=void 0,this.modelId=e,this.settings=t,this.config=r}get provider(){return this.config.provider}getArgs({mode:e,inputFormat:t,prompt:r,maxTokens:n,temperature:a,topP:o,topK:s,frequencyPenalty:l,presencePenalty:u,stopSequences:c,responseFormat:d,seed:p}){var f;let h=e.type,m=[];null!=s&&m.push({type:"unsupported-setting",setting:"topK"}),null!=d&&"text"!==d.type&&m.push({type:"unsupported-setting",setting:"responseFormat",details:"JSON response format is not supported."});let{prompt:g,stopSequences:y}=function({prompt:e,inputFormat:t,user:r="user",assistant:n="assistant"}){if("prompt"===t&&1===e.length&&"user"===e[0].role&&1===e[0].content.length&&"text"===e[0].content[0].type)return{prompt:e[0].content[0].text};let a="";for(let{role:t,content:o}of("system"===e[0].role&&(a+=`${e[0].content} + +`,e=e.slice(1)),e))switch(t){case"system":throw new i.M3({message:"Unexpected system message in prompt: ${content}",prompt:e});case"user":{let e=o.map(e=>{switch(e.type){case"text":return e.text;case"image":throw new i.b8({functionality:"images"})}}).join("");a+=`${r}: +${e} + +`;break}case"assistant":{let e=o.map(e=>{switch(e.type){case"text":return e.text;case"tool-call":throw new i.b8({functionality:"tool-call messages"})}}).join("");a+=`${n}: +${e} + +`;break}case"tool":throw new i.b8({functionality:"tool messages"});default:throw Error(`Unsupported role: ${t}`)}return{prompt:a+=`${n}: +`,stopSequences:[` +${r}:`]}}({prompt:r,inputFormat:t}),v=[...null!=y?y:[],...null!=c?c:[]],b={model:this.modelId,echo:this.settings.echo,logit_bias:this.settings.logitBias,logprobs:"number"==typeof this.settings.logprobs?this.settings.logprobs:"boolean"==typeof this.settings.logprobs&&this.settings.logprobs?0:void 0,suffix:this.settings.suffix,user:this.settings.user,max_tokens:n,temperature:a,top_p:o,frequency_penalty:l,presence_penalty:u,seed:p,prompt:g,stop:v.length>0?v:void 0};switch(h){case"regular":if(null==(f=e.tools)?void 0:f.length)throw new i.b8({functionality:"tools"});if(e.toolChoice)throw new i.b8({functionality:"toolChoice"});return{args:b,warnings:m};case"object-json":throw new i.b8({functionality:"object-json mode"});case"object-tool":throw new i.b8({functionality:"object-tool mode"});default:throw Error(`Unsupported type: ${h}`)}}async doGenerate(e){let{args:t,warnings:r}=this.getArgs(e),{responseHeaders:i,value:a,rawValue:o}=await (0,n.GU)({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:t,failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(b),abortSignal:e.abortSignal,fetch:this.config.fetch}),{prompt:l,...d}=t,p=a.choices[0];return{text:p.text,usage:{promptTokens:a.usage.prompt_tokens,completionTokens:a.usage.completion_tokens},finishReason:s(p.finish_reason),logprobs:y(p.logprobs),rawCall:{rawPrompt:l,rawSettings:d},rawResponse:{headers:i,body:o},response:c(a),warnings:r,request:{body:JSON.stringify(t)}}}async doStream(e){let t,{args:r,warnings:i}=this.getArgs(e),a={...r,stream:!0,stream_options:"strict"===this.config.compatibility?{include_usage:!0}:void 0},{responseHeaders:o,value:l}=await (0,n.GU)({url:this.config.url({path:"/completions",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:a,failedResponseHandler:u,successfulResponseHandler:(0,n.Ds)(_),abortSignal:e.abortSignal,fetch:this.config.fetch}),{prompt:d,...p}=r,f="unknown",h={promptTokens:Number.NaN,completionTokens:Number.NaN},m=!0;return{stream:l.pipeThrough(new TransformStream({transform(e,r){if(!e.success){f="error",r.enqueue({type:"error",error:e.error});return}let n=e.value;if("error"in n){f="error",r.enqueue({type:"error",error:n.error});return}m&&(m=!1,r.enqueue({type:"response-metadata",...c(n)})),null!=n.usage&&(h={promptTokens:n.usage.prompt_tokens,completionTokens:n.usage.completion_tokens});let i=n.choices[0];(null==i?void 0:i.finish_reason)!=null&&(f=s(i.finish_reason)),(null==i?void 0:i.text)!=null&&r.enqueue({type:"text-delta",textDelta:i.text});let a=y(null==i?void 0:i.logprobs);(null==a?void 0:a.length)&&(void 0===t&&(t=[]),t.push(...a))},flush(e){e.enqueue({type:"finish",finishReason:f,logprobs:t,usage:h})}})),rawCall:{rawPrompt:d,rawSettings:p},rawResponse:{headers:o},warnings:i,request:{body:JSON.stringify(a)}}}},b=a.z.object({id:a.z.string().nullish(),created:a.z.number().nullish(),model:a.z.string().nullish(),choices:a.z.array(a.z.object({text:a.z.string(),finish_reason:a.z.string(),logprobs:a.z.object({tokens:a.z.array(a.z.string()),token_logprobs:a.z.array(a.z.number()),top_logprobs:a.z.array(a.z.record(a.z.string(),a.z.number())).nullable()}).nullish()})),usage:a.z.object({prompt_tokens:a.z.number(),completion_tokens:a.z.number()})}),_=a.z.union([a.z.object({id:a.z.string().nullish(),created:a.z.number().nullish(),model:a.z.string().nullish(),choices:a.z.array(a.z.object({text:a.z.string(),finish_reason:a.z.string().nullish(),index:a.z.number(),logprobs:a.z.object({tokens:a.z.array(a.z.string()),token_logprobs:a.z.array(a.z.number()),top_logprobs:a.z.array(a.z.record(a.z.string(),a.z.number())).nullable()}).nullish()})),usage:a.z.object({prompt_tokens:a.z.number(),completion_tokens:a.z.number()}).nullish()}),l]),w=class{constructor(e,t,r){this.specificationVersion="v1",this.modelId=e,this.settings=t,this.config=r}get provider(){return this.config.provider}get maxEmbeddingsPerCall(){var e;return null!=(e=this.settings.maxEmbeddingsPerCall)?e:2048}get supportsParallelCalls(){var e;return null==(e=this.settings.supportsParallelCalls)||e}async doEmbed({values:e,headers:t,abortSignal:r}){if(e.length>this.maxEmbeddingsPerCall)throw new i.Ch({provider:this.provider,modelId:this.modelId,maxEmbeddingsPerCall:this.maxEmbeddingsPerCall,values:e});let{responseHeaders:a,value:o}=await (0,n.GU)({url:this.config.url({path:"/embeddings",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),t),body:{model:this.modelId,input:e,encoding_format:"float",dimensions:this.settings.dimensions,user:this.settings.user},failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(x),abortSignal:r,fetch:this.config.fetch});return{embeddings:o.data.map(e=>e.embedding),usage:o.usage?{tokens:o.usage.prompt_tokens}:void 0,rawResponse:{headers:a}}}},x=a.z.object({data:a.z.array(a.z.object({embedding:a.z.array(a.z.number())})),usage:a.z.object({prompt_tokens:a.z.number()}).nullish()}),k={"dall-e-3":1,"dall-e-2":10,"gpt-image-1":10},E=new Set(["gpt-image-1"]),T=class{constructor(e,t,r){this.modelId=e,this.settings=t,this.config=r,this.specificationVersion="v1"}get maxImagesPerCall(){var e,t;return null!=(t=null!=(e=this.settings.maxImagesPerCall)?e:k[this.modelId])?t:1}get provider(){return this.config.provider}async doGenerate({prompt:e,n:t,size:r,aspectRatio:i,seed:a,providerOptions:o,headers:s,abortSignal:l}){var c,d,p,f;let h=[];null!=i&&h.push({type:"unsupported-setting",setting:"aspectRatio",details:"This model does not support aspect ratio. Use `size` instead."}),null!=a&&h.push({type:"unsupported-setting",setting:"seed"});let m=null!=(p=null==(d=null==(c=this.config._internal)?void 0:c.currentDate)?void 0:d.call(c))?p:new Date,{value:g,responseHeaders:y}=await (0,n.GU)({url:this.config.url({path:"/images/generations",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),s),body:{model:this.modelId,prompt:e,n:t,size:r,...null!=(f=o.openai)?f:{},...!E.has(this.modelId)?{response_format:"b64_json"}:{}},failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(A),abortSignal:l,fetch:this.config.fetch});return{images:g.data.map(e=>e.b64_json),warnings:h,response:{timestamp:m,modelId:this.modelId,headers:y}}}},A=a.z.object({data:a.z.array(a.z.object({b64_json:a.z.string()}))}),S=a.z.object({include:a.z.array(a.z.string()).nullish(),language:a.z.string().nullish(),prompt:a.z.string().nullish(),temperature:a.z.number().min(0).max(1).nullish().default(0),timestampGranularities:a.z.array(a.z.enum(["word","segment"])).nullish().default(["segment"])}),j={afrikaans:"af",arabic:"ar",armenian:"hy",azerbaijani:"az",belarusian:"be",bosnian:"bs",bulgarian:"bg",catalan:"ca",chinese:"zh",croatian:"hr",czech:"cs",danish:"da",dutch:"nl",english:"en",estonian:"et",finnish:"fi",french:"fr",galician:"gl",german:"de",greek:"el",hebrew:"he",hindi:"hi",hungarian:"hu",icelandic:"is",indonesian:"id",italian:"it",japanese:"ja",kannada:"kn",kazakh:"kk",korean:"ko",latvian:"lv",lithuanian:"lt",macedonian:"mk",malay:"ms",marathi:"mr",maori:"mi",nepali:"ne",norwegian:"no",persian:"fa",polish:"pl",portuguese:"pt",romanian:"ro",russian:"ru",serbian:"sr",slovak:"sk",slovenian:"sl",spanish:"es",swahili:"sw",swedish:"sv",tagalog:"tl",tamil:"ta",thai:"th",turkish:"tr",ukrainian:"uk",urdu:"ur",vietnamese:"vi",welsh:"cy"},I=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v1"}get provider(){return this.config.provider}getArgs({audio:e,mediaType:t,providerOptions:r}){var i,a,o,s,l;let u=(0,n.xI)({provider:"openai",providerOptions:r,schema:S}),c=new FormData,d=e instanceof Uint8Array?new Blob([e]):new Blob([(0,n.Z9)(e)]);if(c.append("model",this.modelId),c.append("file",new File([d],"audio",{type:t})),u){let e={include:null!=(i=u.include)?i:void 0,language:null!=(a=u.language)?a:void 0,prompt:null!=(o=u.prompt)?o:void 0,temperature:null!=(s=u.temperature)?s:void 0,timestamp_granularities:null!=(l=u.timestampGranularities)?l:void 0};for(let t in e){let r=e[t];void 0!==r&&c.append(t,String(r))}}return{formData:c,warnings:[]}}async doGenerate(e){var t,r,i,a,o,s;let l=null!=(i=null==(r=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:r.call(t))?i:new Date,{formData:c,warnings:d}=this.getArgs(e),{value:p,responseHeaders:f,rawValue:h}=await (0,n.S)({url:this.config.url({path:"/audio/transcriptions",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),formData:c,failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(R),abortSignal:e.abortSignal,fetch:this.config.fetch}),m=null!=p.language&&p.language in j?j[p.language]:void 0;return{text:p.text,segments:null!=(o=null==(a=p.words)?void 0:a.map(e=>({text:e.word,startSecond:e.start,endSecond:e.end})))?o:[],language:m,durationInSeconds:null!=(s=p.duration)?s:void 0,warnings:d,response:{timestamp:l,modelId:this.modelId,headers:f,body:h}}}},R=a.z.object({text:a.z.string(),language:a.z.string().nullish(),duration:a.z.number().nullish(),words:a.z.array(a.z.object({word:a.z.string(),start:a.z.number(),end:a.z.number()})).nullish()});function N({finishReason:e,hasToolCalls:t}){switch(e){case void 0:case null:return t?"tool-calls":"stop";case"max_output_tokens":return"length";case"content_filter":return"content-filter";default:return t?"tool-calls":"unknown"}}var P=class{constructor(e,t){this.specificationVersion="v1",this.defaultObjectGenerationMode="json",this.supportsStructuredOutputs=!0,this.modelId=e,this.config=t}get provider(){return this.config.provider}getArgs({mode:e,maxTokens:t,temperature:r,stopSequences:a,topP:o,topK:s,presencePenalty:l,frequencyPenalty:u,seed:c,prompt:d,providerMetadata:p,responseFormat:f}){var h,m,g,y;let v=[],b=(y=this.modelId).startsWith("o")?y.startsWith("o1-mini")||y.startsWith("o1-preview")?{isReasoningModel:!0,systemMessageMode:"remove",requiredAutoTruncation:!1}:{isReasoningModel:!0,systemMessageMode:"developer",requiredAutoTruncation:!1}:{isReasoningModel:!1,systemMessageMode:"system",requiredAutoTruncation:!1},_=e.type;null!=s&&v.push({type:"unsupported-setting",setting:"topK"}),null!=c&&v.push({type:"unsupported-setting",setting:"seed"}),null!=l&&v.push({type:"unsupported-setting",setting:"presencePenalty"}),null!=u&&v.push({type:"unsupported-setting",setting:"frequencyPenalty"}),null!=a&&v.push({type:"unsupported-setting",setting:"stopSequences"});let{messages:w,warnings:x}=function({prompt:e,systemMessageMode:t}){let r=[],a=[];for(let{role:o,content:s}of e)switch(o){case"system":switch(t){case"system":r.push({role:"system",content:s});break;case"developer":r.push({role:"developer",content:s});break;case"remove":a.push({type:"other",message:"system messages are removed for this model"});break;default:throw Error(`Unsupported system message mode: ${t}`)}break;case"user":r.push({role:"user",content:s.map((e,t)=>{var r,a,o,s;switch(e.type){case"text":return{type:"input_text",text:e.text};case"image":return{type:"input_image",image_url:e.image instanceof URL?e.image.toString():`data:${null!=(r=e.mimeType)?r:"image/jpeg"};base64,${(0,n.n_)(e.image)}`,detail:null==(o=null==(a=e.providerMetadata)?void 0:a.openai)?void 0:o.imageDetail};case"file":if(e.data instanceof URL)throw new i.b8({functionality:"File URLs in user messages"});if("application/pdf"===e.mimeType)return{type:"input_file",filename:null!=(s=e.filename)?s:`part-${t}.pdf`,file_data:`data:application/pdf;base64,${e.data}`};throw new i.b8({functionality:"Only PDF files are supported in user messages"})}})});break;case"assistant":for(let e of s)switch(e.type){case"text":r.push({role:"assistant",content:[{type:"output_text",text:e.text}]});break;case"tool-call":r.push({type:"function_call",call_id:e.toolCallId,name:e.toolName,arguments:JSON.stringify(e.args)})}break;case"tool":for(let e of s)r.push({type:"function_call_output",call_id:e.toolCallId,output:JSON.stringify(e.result)});break;default:throw Error(`Unsupported role: ${o}`)}return{messages:r,warnings:a}}({prompt:d,systemMessageMode:b.systemMessageMode});v.push(...x);let k=(0,n.xI)({provider:"openai",providerOptions:p,schema:Z}),E=null==(h=null==k?void 0:k.strictSchemas)||h,T={model:this.modelId,input:w,temperature:r,top_p:o,max_output_tokens:t,...(null==f?void 0:f.type)==="json"&&{text:{format:null!=f.schema?{type:"json_schema",strict:E,name:null!=(m=f.name)?m:"response",description:f.description,schema:f.schema}:{type:"json_object"}}},metadata:null==k?void 0:k.metadata,parallel_tool_calls:null==k?void 0:k.parallelToolCalls,previous_response_id:null==k?void 0:k.previousResponseId,store:null==k?void 0:k.store,user:null==k?void 0:k.user,instructions:null==k?void 0:k.instructions,...b.isReasoningModel&&((null==k?void 0:k.reasoningEffort)!=null||(null==k?void 0:k.reasoningSummary)!=null)&&{reasoning:{...(null==k?void 0:k.reasoningEffort)!=null&&{effort:k.reasoningEffort},...(null==k?void 0:k.reasoningSummary)!=null&&{summary:k.reasoningSummary}}},...b.requiredAutoTruncation&&{truncation:"auto"}};switch(b.isReasoningModel&&(null!=T.temperature&&(T.temperature=void 0,v.push({type:"unsupported-setting",setting:"temperature",details:"temperature is not supported for reasoning models"})),null!=T.top_p&&(T.top_p=void 0,v.push({type:"unsupported-setting",setting:"topP",details:"topP is not supported for reasoning models"}))),_){case"regular":{let{tools:t,tool_choice:r,toolWarnings:n}=function({mode:e,strict:t}){var r;let n=(null==(r=e.tools)?void 0:r.length)?e.tools:void 0,a=[];if(null==n)return{tools:void 0,tool_choice:void 0,toolWarnings:a};let o=e.toolChoice,s=[];for(let e of n)switch(e.type){case"function":s.push({type:"function",name:e.name,description:e.description,parameters:e.parameters,strict:!!t||void 0});break;case"provider-defined":"openai.web_search_preview"===e.id?s.push({type:"web_search_preview",search_context_size:e.args.searchContextSize,user_location:e.args.userLocation}):a.push({type:"unsupported-tool",tool:e});break;default:a.push({type:"unsupported-tool",tool:e})}if(null==o)return{tools:s,tool_choice:void 0,toolWarnings:a};let l=o.type;switch(l){case"auto":case"none":case"required":return{tools:s,tool_choice:l,toolWarnings:a};case"tool":if("web_search_preview"===o.toolName)return{tools:s,tool_choice:{type:"web_search_preview"},toolWarnings:a};return{tools:s,tool_choice:{type:"function",name:o.toolName},toolWarnings:a};default:throw new i.b8({functionality:`Unsupported tool choice type: ${l}`})}}({mode:e,strict:E});return{args:{...T,tools:t,tool_choice:r},warnings:[...v,...n]}}case"object-json":return{args:{...T,text:{format:null!=e.schema?{type:"json_schema",strict:E,name:null!=(g=e.name)?g:"response",description:e.description,schema:e.schema}:{type:"json_object"}}},warnings:v};case"object-tool":return{args:{...T,tool_choice:{type:"function",name:e.tool.name},tools:[{type:"function",name:e.tool.name,description:e.tool.description,parameters:e.tool.parameters,strict:E}]},warnings:v};default:throw Error(`Unsupported type: ${_}`)}}async doGenerate(e){var t,r,i,o,s,l,c;let{args:d,warnings:p}=this.getArgs(e),{responseHeaders:f,value:h,rawValue:m}=await (0,n.GU)({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:d,failedResponseHandler:u,successfulResponseHandler:(0,n.cV)(a.z.object({id:a.z.string(),created_at:a.z.number(),model:a.z.string(),output:a.z.array(a.z.discriminatedUnion("type",[a.z.object({type:a.z.literal("message"),role:a.z.literal("assistant"),content:a.z.array(a.z.object({type:a.z.literal("output_text"),text:a.z.string(),annotations:a.z.array(a.z.object({type:a.z.literal("url_citation"),start_index:a.z.number(),end_index:a.z.number(),url:a.z.string(),title:a.z.string()}))}))}),a.z.object({type:a.z.literal("function_call"),call_id:a.z.string(),name:a.z.string(),arguments:a.z.string()}),a.z.object({type:a.z.literal("web_search_call")}),a.z.object({type:a.z.literal("computer_call")}),a.z.object({type:a.z.literal("reasoning"),summary:a.z.array(a.z.object({type:a.z.literal("summary_text"),text:a.z.string()}))})])),incomplete_details:a.z.object({reason:a.z.string()}).nullable(),usage:C})),abortSignal:e.abortSignal,fetch:this.config.fetch}),g=h.output.filter(e=>"message"===e.type).flatMap(e=>e.content).filter(e=>"output_text"===e.type),y=h.output.filter(e=>"function_call"===e.type).map(e=>({toolCallType:"function",toolCallId:e.call_id,toolName:e.name,args:e.arguments})),v=null!=(r=null==(t=h.output.find(e=>"reasoning"===e.type))?void 0:t.summary)?r:null;return{text:g.map(e=>e.text).join("\n"),sources:g.flatMap(e=>e.annotations.map(e=>{var t,r,i;return{sourceType:"url",id:null!=(i=null==(r=(t=this.config).generateId)?void 0:r.call(t))?i:(0,n.$C)(),url:e.url,title:e.title}})),finishReason:N({finishReason:null==(i=h.incomplete_details)?void 0:i.reason,hasToolCalls:y.length>0}),toolCalls:y.length>0?y:void 0,reasoning:v?v.map(e=>({type:"text",text:e.text})):void 0,usage:{promptTokens:h.usage.input_tokens,completionTokens:h.usage.output_tokens},rawCall:{rawPrompt:void 0,rawSettings:{}},rawResponse:{headers:f,body:m},request:{body:JSON.stringify(d)},response:{id:h.id,timestamp:new Date(1e3*h.created_at),modelId:h.model},providerMetadata:{openai:{responseId:h.id,cachedPromptTokens:null!=(s=null==(o=h.usage.input_tokens_details)?void 0:o.cached_tokens)?s:null,reasoningTokens:null!=(c=null==(l=h.usage.output_tokens_details)?void 0:l.reasoning_tokens)?c:null}},warnings:p}}async doStream(e){let{args:t,warnings:r}=this.getArgs(e),{responseHeaders:i,value:a}=await (0,n.GU)({url:this.config.url({path:"/responses",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:{...t,stream:!0},failedResponseHandler:u,successfulResponseHandler:(0,n.Ds)(B),abortSignal:e.abortSignal,fetch:this.config.fetch}),o=this,s="unknown",l=NaN,c=NaN,d=null,p=null,f=null,h={},m=!1;return{stream:a.pipeThrough(new TransformStream({transform(e,t){var r,i,a,u,g,y,v,b,_;if(!e.success){s="error",t.enqueue({type:"error",error:e.error});return}let w=e.value;if("response.output_item.added"===w.type)"function_call"===w.item.type&&(h[w.output_index]={toolName:w.item.name,toolCallId:w.item.call_id},t.enqueue({type:"tool-call-delta",toolCallType:"function",toolCallId:w.item.call_id,toolName:w.item.name,argsTextDelta:w.item.arguments}));else if("response.function_call_arguments.delta"===w.type){let e=h[w.output_index];null!=e&&t.enqueue({type:"tool-call-delta",toolCallType:"function",toolCallId:e.toolCallId,toolName:e.toolName,argsTextDelta:w.delta})}else{"response.created"===w.type?(f=w.response.id,t.enqueue({type:"response-metadata",id:w.response.id,timestamp:new Date(1e3*w.response.created_at),modelId:w.response.model})):"response.output_text.delta"===w.type?t.enqueue({type:"text-delta",textDelta:w.delta}):"response.reasoning_summary_text.delta"===w.type?t.enqueue({type:"reasoning",textDelta:w.delta}):"response.output_item.done"===w.type&&"function_call"===w.item.type?(h[w.output_index]=void 0,m=!0,t.enqueue({type:"tool-call",toolCallType:"function",toolCallId:w.item.call_id,toolName:w.item.name,args:w.item.arguments})):"response.completed"===(_=w).type||"response.incomplete"===_.type?(s=N({finishReason:null==(r=w.response.incomplete_details)?void 0:r.reason,hasToolCalls:m}),l=w.response.usage.input_tokens,c=w.response.usage.output_tokens,d=null!=(a=null==(i=w.response.usage.input_tokens_details)?void 0:i.cached_tokens)?a:d,p=null!=(g=null==(u=w.response.usage.output_tokens_details)?void 0:u.reasoning_tokens)?g:p):"response.output_text.annotation.added"===w.type&&t.enqueue({type:"source",source:{sourceType:"url",id:null!=(b=null==(v=(y=o.config).generateId)?void 0:v.call(y))?b:(0,n.$C)(),url:w.annotation.url,title:w.annotation.title}})}},flush(e){e.enqueue({type:"finish",finishReason:s,usage:{promptTokens:l,completionTokens:c},...(null!=d||null!=p)&&{providerMetadata:{openai:{responseId:f,cachedPromptTokens:d,reasoningTokens:p}}}})}})),rawCall:{rawPrompt:void 0,rawSettings:{}},rawResponse:{headers:i},request:{body:JSON.stringify(t)},warnings:r}}},C=a.z.object({input_tokens:a.z.number(),input_tokens_details:a.z.object({cached_tokens:a.z.number().nullish()}).nullish(),output_tokens:a.z.number(),output_tokens_details:a.z.object({reasoning_tokens:a.z.number().nullish()}).nullish()}),O=a.z.object({type:a.z.literal("response.output_text.delta"),delta:a.z.string()}),z=a.z.object({type:a.z.enum(["response.completed","response.incomplete"]),response:a.z.object({incomplete_details:a.z.object({reason:a.z.string()}).nullish(),usage:C})}),M=a.z.object({type:a.z.literal("response.created"),response:a.z.object({id:a.z.string(),created_at:a.z.number(),model:a.z.string()})}),$=a.z.object({type:a.z.literal("response.output_item.done"),output_index:a.z.number(),item:a.z.discriminatedUnion("type",[a.z.object({type:a.z.literal("message")}),a.z.object({type:a.z.literal("function_call"),id:a.z.string(),call_id:a.z.string(),name:a.z.string(),arguments:a.z.string(),status:a.z.literal("completed")})])}),L=a.z.object({type:a.z.literal("response.function_call_arguments.delta"),item_id:a.z.string(),output_index:a.z.number(),delta:a.z.string()}),F=a.z.object({type:a.z.literal("response.output_item.added"),output_index:a.z.number(),item:a.z.discriminatedUnion("type",[a.z.object({type:a.z.literal("message")}),a.z.object({type:a.z.literal("function_call"),id:a.z.string(),call_id:a.z.string(),name:a.z.string(),arguments:a.z.string()})])}),D=a.z.object({type:a.z.literal("response.output_text.annotation.added"),annotation:a.z.object({type:a.z.literal("url_citation"),url:a.z.string(),title:a.z.string()})}),U=a.z.object({type:a.z.literal("response.reasoning_summary_text.delta"),item_id:a.z.string(),output_index:a.z.number(),summary_index:a.z.number(),delta:a.z.string()}),B=a.z.union([O,z,M,$,L,F,D,U,a.z.object({type:a.z.string()}).passthrough()]),Z=a.z.object({metadata:a.z.any().nullish(),parallelToolCalls:a.z.boolean().nullish(),previousResponseId:a.z.string().nullish(),store:a.z.boolean().nullish(),user:a.z.string().nullish(),reasoningEffort:a.z.string().nullish(),strictSchemas:a.z.boolean().nullish(),instructions:a.z.string().nullish(),reasoningSummary:a.z.string().nullish()}),q=a.z.object({}),V={webSearchPreview:function({searchContextSize:e,userLocation:t}={}){return{type:"provider-defined",id:"openai.web_search_preview",args:{searchContextSize:e,userLocation:t},parameters:q}}},H=a.z.object({instructions:a.z.string().nullish(),speed:a.z.number().min(.25).max(4).default(1).nullish()}),Y=class{constructor(e,t){this.modelId=e,this.config=t,this.specificationVersion="v1"}get provider(){return this.config.provider}getArgs({text:e,voice:t="alloy",outputFormat:r="mp3",speed:i,instructions:a,providerOptions:o}){let s=[],l=(0,n.xI)({provider:"openai",providerOptions:o,schema:H}),u={model:this.modelId,input:e,voice:t,response_format:"mp3",speed:i,instructions:a};if(r&&(["mp3","opus","aac","flac","wav","pcm"].includes(r)?u.response_format=r:s.push({type:"unsupported-setting",setting:"outputFormat",details:`Unsupported output format: ${r}. Using mp3 instead.`})),l){let e={};for(let t in e){let r=e[t];void 0!==r&&(u[t]=r)}}return{requestBody:u,warnings:s}}async doGenerate(e){var t,r,i;let a=null!=(i=null==(r=null==(t=this.config._internal)?void 0:t.currentDate)?void 0:r.call(t))?i:new Date,{requestBody:o,warnings:s}=this.getArgs(e),{value:l,responseHeaders:c,rawValue:d}=await (0,n.GU)({url:this.config.url({path:"/audio/speech",modelId:this.modelId}),headers:(0,n.m2)(this.config.headers(),e.headers),body:o,failedResponseHandler:u,successfulResponseHandler:(0,n.HD)(),abortSignal:e.abortSignal,fetch:this.config.fetch});return{audio:l,warnings:s,request:{body:JSON.stringify(o)},response:{timestamp:a,modelId:this.modelId,headers:c,body:d}}}};function W(e={}){var t,r,i;let a=null!=(t=(0,n.ae)(e.baseURL))?t:"https://api.openai.com/v1",o=null!=(r=e.compatibility)?r:"compatible",s=null!=(i=e.name)?i:"openai",l=()=>({Authorization:`Bearer ${(0,n.WL)({apiKey:e.apiKey,environmentVariableName:"OPENAI_API_KEY",description:"OpenAI"})}`,"OpenAI-Organization":e.organization,"OpenAI-Project":e.project,...e.headers}),u=(t,r={})=>new d(t,r,{provider:`${s}.chat`,url:({path:e})=>`${a}${e}`,headers:l,compatibility:o,fetch:e.fetch}),c=(t,r={})=>new v(t,r,{provider:`${s}.completion`,url:({path:e})=>`${a}${e}`,headers:l,compatibility:o,fetch:e.fetch}),p=(t,r={})=>new w(t,r,{provider:`${s}.embedding`,url:({path:e})=>`${a}${e}`,headers:l,fetch:e.fetch}),f=(t,r={})=>new T(t,r,{provider:`${s}.image`,url:({path:e})=>`${a}${e}`,headers:l,fetch:e.fetch}),h=t=>new I(t,{provider:`${s}.transcription`,url:({path:e})=>`${a}${e}`,headers:l,fetch:e.fetch}),m=t=>new Y(t,{provider:`${s}.speech`,url:({path:e})=>`${a}${e}`,headers:l,fetch:e.fetch}),g=(e,t)=>{if(new.target)throw Error("The OpenAI model function cannot be called with the new keyword.");return"gpt-3.5-turbo-instruct"===e?c(e,t):u(e,t)},y=function(e,t){return g(e,t)};return y.languageModel=g,y.chat=u,y.completion=c,y.responses=t=>new P(t,{provider:`${s}.responses`,url:({path:e})=>`${a}${e}`,headers:l,fetch:e.fetch}),y.embedding=p,y.textEmbedding=p,y.textEmbeddingModel=p,y.image=f,y.imageModel=f,y.transcription=h,y.transcriptionModel=h,y.speech=m,y.speechModel=m,y.tools=V,y}W({compatibility:"strict"})},3082:(e,t,r)=>{"use strict";var n=r(4134).hp;let i=void 0!==n,a=/"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/,o=/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/;function s(e,t,r){null==r&&null!==t&&"object"==typeof t&&(r=t,t=void 0),i&&n.isBuffer(e)&&(e=e.toString()),e&&65279===e.charCodeAt(0)&&(e=e.slice(1));let s=JSON.parse(e,t);if(null===s||"object"!=typeof s)return s;let u=r&&r.protoAction||"error",c=r&&r.constructorAction||"error";if("ignore"===u&&"ignore"===c)return s;if("ignore"!==u&&"ignore"!==c){if(!1===a.test(e)&&!1===o.test(e))return s}else if("ignore"!==u&&"ignore"===c){if(!1===a.test(e))return s}else if(!1===o.test(e))return s;return l(s,{protoAction:u,constructorAction:c,safe:r&&r.safe})}function l(e,{protoAction:t="error",constructorAction:r="error",safe:n}={}){let i=[e];for(;i.length;){let e=i;for(let a of(i=[],e)){if("ignore"!==t&&Object.prototype.hasOwnProperty.call(a,"__proto__")){if(!0===n)return null;if("error"===t)throw SyntaxError("Object contains forbidden prototype property");delete a.__proto__}if("ignore"!==r&&Object.prototype.hasOwnProperty.call(a,"constructor")&&Object.prototype.hasOwnProperty.call(a.constructor,"prototype")){if(!0===n)return null;if("error"===r)throw SyntaxError("Object contains forbidden prototype property");delete a.constructor}for(let e in a){let t=a[e];t&&"object"==typeof t&&i.push(t)}}}return e}function u(e,t,r){let n=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return s(e,t,r)}finally{Error.stackTraceLimit=n}}e.exports=u,e.exports.default=u,e.exports.parse=u,e.exports.safeParse=function(e,t){let r=Error.stackTraceLimit;Error.stackTraceLimit=0;try{return s(e,t,{safe:!0})}catch(e){return null}finally{Error.stackTraceLimit=r}},e.exports.scan=l},3967:(e,t,r)=>{"use strict";let n,i,a,o,s;r.d(t,{A:()=>eu,B:()=>L,C:()=>ec,E:()=>F,a:()=>M,b:()=>z,c:()=>ez,d:()=>e$,e:()=>e_,f:()=>eG,i:()=>C,u:()=>$});var l=r(3264),u=r(7431),c=r(2115),d=r.t(c,2),p=r(1933),f=r(5643),h=r(2421);let{useSyncExternalStoreWithSelector:m}=f,g=e=>e,y=(e,t)=>{let r=(0,h.y)(e),n=(e,n=t)=>(function(e,t=g,r){let n=m(e.subscribe,e.getState,e.getInitialState,t,r);return c.useDebugValue(n),n})(r,e,n);return Object.assign(n,r),n},v=(e,t)=>e?y(e,t):y;var b=r(5220),_=r.n(b),w=r(2407);let x=e=>"object"==typeof e&&"function"==typeof e.then,k=[];function E(e,t,r=(e,t)=>e===t){if(e===t)return!0;if(!e||!t)return!1;let n=e.length;if(t.length!==n)return!1;for(let i=0;i0&&(i.timeout&&clearTimeout(i.timeout),i.timeout=setTimeout(i.remove,n.lifespan)),i.response;if(!r)throw i.promise}let i={keys:t,equal:n.equal,remove:()=>{let e=k.indexOf(i);-1!==e&&k.splice(e,1)},promise:(x(e)?e:e(...t)).then(e=>{i.response=e,n.lifespan&&n.lifespan>0&&(i.timeout=setTimeout(i.remove,n.lifespan))}).catch(e=>i.error=e)};if(k.push(i),!r)throw i.promise}let A=(e,t,r)=>T(e,t,!1,r),S=(e,t,r)=>void T(e,t,!0,r),j=e=>{if(void 0===e||0===e.length)k.splice(0,k.length);else{let t=k.find(t=>E(e,t.keys,t.equal));t&&t.remove()}};var I=r(5155),R=r(6354);function N(e){let t=e.root;for(;t.getState().previousRoot;)t=t.getState().previousRoot;return t}r(9509),d.act;let P=e=>e&&e.isOrthographicCamera,C=e=>e&&e.hasOwnProperty("current"),O=e=>null!=e&&("string"==typeof e||"number"==typeof e||e.isColor),z=((e,t)=>"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative"))()?c.useLayoutEffect:c.useEffect;function M(e){let t=c.useRef(e);return z(()=>void(t.current=e),[e]),t}function $(){let e=(0,R.u5)(),t=(0,R.y3)();return c.useMemo(()=>({children:r})=>{let n=(0,R.Nz)(e,!0,e=>e.type===c.StrictMode)?c.StrictMode:c.Fragment;return(0,I.jsx)(n,{children:(0,I.jsx)(t,{children:r})})},[e,t])}function L({set:e}){return z(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}let F=(e=>((e=class extends c.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}).getDerivedStateFromError=()=>({error:!0}),e))();function D(e){var t;let r="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],r),e[1]):e}function U(e){var t;return null==(t=e.__r3f)?void 0:t.root.getState()}let B={obj:e=>e===Object(e)&&!B.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,nul:e=>null===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:r="shallow",objects:n="reference",strict:i=!0}={}){let a;if(typeof e!=typeof t||!!e!=!!t)return!1;if(B.str(e)||B.num(e)||B.boo(e))return e===t;let o=B.obj(e);if(o&&"reference"===n)return e===t;let s=B.arr(e);if(s&&"reference"===r)return e===t;if((s||o)&&e===t)return!0;for(a in e)if(!(a in t))return!1;if(o&&"shallow"===r&&"shallow"===n){for(a in i?t:e)if(!B.equ(e[a],t[a],{strict:i,objects:"reference"}))return!1}else for(a in i?t:e)if(e[a]!==t[a])return!1;if(B.und(a)){if(s&&0===e.length&&0===t.length||o&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}},Z=["children","key","ref"];function q(e,t,r,n){let i=null==e?void 0:e.__r3f;return!i&&(i={root:t,type:r,parent:null,children:[],props:function(e){let t={};for(let r in e)Z.includes(r)||(t[r]=e[r]);return t}(n),object:e,eventCount:0,handlers:{},isHidden:!1},e&&(e.__r3f=i)),i}function V(e,t){let r=e[t];if(!t.includes("-"))return{root:e,key:t,target:r};for(let i of(r=e,t.split("-"))){var n;t=i,e=r,r=null==(n=r)?void 0:n[t]}return{root:e,key:t,target:r}}let H=/-\d+$/;function Y(e,t){if(B.str(t.props.attach)){if(H.test(t.props.attach)){let r=t.props.attach.replace(H,""),{root:n,key:i}=V(e.object,r);Array.isArray(n[i])||(n[i]=[])}let{root:r,key:n}=V(e.object,t.props.attach);t.previousAttach=r[n],r[n]=t.object}else B.fun(t.props.attach)&&(t.previousAttach=t.props.attach(e.object,t.object))}function W(e,t){if(B.str(t.props.attach)){let{root:r,key:n}=V(e.object,t.props.attach),i=t.previousAttach;void 0===i?delete r[n]:r[n]=i}else null==t.previousAttach||t.previousAttach(e.object,t.object);delete t.previousAttach}let J=[...Z,"args","dispose","attach","object","onUpdate","dispose"],G=new Map,K=["map","emissiveMap","sheenColorMap","specularColorMap","envMap"],X=/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/;function Q(e,t){var r,n;let i=e.__r3f,a=i&&N(i).getState(),o=null==i?void 0:i.eventCount;for(let r in t){let o=t[r];if(J.includes(r))continue;if(i&&X.test(r)){"function"==typeof o?i.handlers[r]=o:delete i.handlers[r],i.eventCount=Object.keys(i.handlers).length;continue}if(void 0===o)continue;let{root:s,key:u,target:c}=V(e,r);c instanceof l.zgK&&o instanceof l.zgK?c.mask=o.mask:c instanceof l.Q1f&&O(o)?c.set(o):null!==c&&"object"==typeof c&&"function"==typeof c.set&&"function"==typeof c.copy&&null!=o&&o.constructor&&c.constructor===o.constructor?c.copy(o):null!==c&&"object"==typeof c&&"function"==typeof c.set&&Array.isArray(o)?"function"==typeof c.fromArray?c.fromArray(o):c.set(...o):null!==c&&"object"==typeof c&&"function"==typeof c.set&&"number"==typeof o?"function"==typeof c.setScalar?c.setScalar(o):c.set(o):(s[u]=o,a&&!a.linear&&K.includes(u)&&null!=(n=s[u])&&n.isTexture&&s[u].format===l.GWd&&s[u].type===l.OUM&&(s[u].colorSpace=l.er$))}if(null!=i&&i.parent&&null!=a&&a.internal&&null!=(r=i.object)&&r.isObject3D&&o!==i.eventCount){let e=i.object,t=a.internal.interaction.indexOf(e);t>-1&&a.internal.interaction.splice(t,1),i.eventCount&&null!==e.raycast&&a.internal.interaction.push(e)}return i&&void 0===i.props.attach&&(i.object.isBufferGeometry?i.props.attach="geometry":i.object.isMaterial&&(i.props.attach="material")),i&&ee(i),e}function ee(e){var t;if(!e.parent)return;null==e.props.onUpdate||e.props.onUpdate(e.object);let r=null==(t=e.root)||null==t.getState?void 0:t.getState();r&&0===r.internal.frames&&r.invalidate()}function et(e,t){e.manual||(P(e)?(e.left=-(t.width/2),e.right=t.width/2,e.top=t.height/2,e.bottom=-(t.height/2)):e.aspect=t.width/t.height,e.updateProjectionMatrix())}let er=e=>null==e?void 0:e.isObject3D;function en(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function ei(e,t,r,n){let i=r.get(t);i&&(r.delete(t),0===r.size&&(e.delete(n),i.target.releasePointerCapture(n)))}let ea=e=>!!(null!=e&&e.render),eo=c.createContext(null),es=(e,t)=>{let r=v((r,n)=>{let i,a=new l.Pq0,o=new l.Pq0,s=new l.Pq0;function u(e=n().camera,t=o,r=n().size){let{width:i,height:l,top:c,left:d}=r,p=i/l;t.isVector3?s.copy(t):s.set(...t);let f=e.getWorldPosition(a).distanceTo(s);if(P(e))return{width:i/e.zoom,height:l/e.zoom,top:c,left:d,factor:1,distance:f,aspect:p};{let t=2*Math.tan(e.fov*Math.PI/180/2)*f,r=i/l*t;return{width:r,height:t,top:c,left:d,factor:i/r,distance:f,aspect:p}}}let d=e=>r(t=>({performance:{...t.performance,current:e}})),p=new l.I9Y;return{set:r,get:n,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},scene:null,xr:null,invalidate:(t=1)=>e(n(),t),advance:(e,r)=>t(e,r,n()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new l.zD7,pointer:p,mouse:p,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{let e=n();i&&clearTimeout(i),e.performance.current!==e.performance.min&&d(e.performance.min),i=setTimeout(()=>d(n().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:u},setEvents:e=>r(t=>({...t,events:{...t.events,...e}})),setSize:(e,t,i=0,a=0)=>{let s=n().camera,l={width:e,height:t,top:i,left:a};r(e=>({size:l,viewport:{...e.viewport,...u(s,o,l)}}))},setDpr:e=>r(t=>{let r=D(e);return{viewport:{...t.viewport,dpr:r,initialDpr:t.viewport.initialDpr||r}}}),setFrameloop:(e="always")=>{let t=n().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),r(()=>({frameloop:e}))},previousRoot:void 0,internal:{interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,lastEvent:c.createRef(),active:!1,frames:0,priority:0,subscribe:(e,t,r)=>{let i=n().internal;return i.priority=i.priority+ +(t>0),i.subscribers.push({ref:e,priority:t,store:r}),i.subscribers=i.subscribers.sort((e,t)=>e.priority-t.priority),()=>{let r=n().internal;null!=r&&r.subscribers&&(r.priority=r.priority-(t>0),r.subscribers=r.subscribers.filter(t=>t.ref!==e))}}}}}),n=r.getState(),i=n.size,a=n.viewport.dpr,o=n.camera;return r.subscribe(()=>{let{camera:e,size:t,viewport:n,gl:s,set:l}=r.getState();if(t.width!==i.width||t.height!==i.height||n.dpr!==a){i=t,a=n.dpr,et(e,t),n.dpr>0&&s.setPixelRatio(n.dpr);let r="undefined"!=typeof HTMLCanvasElement&&s.domElement instanceof HTMLCanvasElement;s.setSize(t.width,t.height,r)}e!==o&&(o=e,l(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),r.subscribe(t=>e(t)),r};function el(){let e=c.useContext(eo);if(!e)throw Error("R3F: Hooks can only be used within the Canvas component!");return e}function eu(e=e=>e,t){return el()(e,t)}function ec(e,t=0){let r=el(),n=r.getState().internal.subscribe,i=M(e);return z(()=>n(i,t,r),[t,n,r]),null}let ed=new WeakMap,ep=e=>{var t;return"function"==typeof e&&(null==e||null==(t=e.prototype)?void 0:t.constructor)===e};function ef(e,t){return function(r,...n){let i;return ep(r)?(i=ed.get(r))||(i=new r,ed.set(r,i)):i=r,e&&e(i),Promise.all(n.map(e=>new Promise((r,n)=>i.load(e,e=>{er(null==e?void 0:e.scene)&&Object.assign(e,function(e){let t={nodes:{},materials:{},meshes:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material),e.isMesh&&!t.meshes[e.name]&&(t.meshes[e.name]=e)}),t}(e.scene)),r(e)},t,t=>n(Error(`Could not load ${e}: ${null==t?void 0:t.message}`))))))}}function eh(e,t,r,n){let i=Array.isArray(t)?t:[t],a=A(ef(r,n),[e,...i],{equal:B.equ});return Array.isArray(t)?a:a[0]}eh.preload=function(e,t,r){let n=Array.isArray(t)?t:[t];return S(ef(r),[e,...n])},eh.clear=function(e,t){return j([e,...Array.isArray(t)?t:[t]])};let em={},eg=/^three(?=[A-Z])/,ey=e=>`${e[0].toUpperCase()}${e.slice(1)}`,ev=0,eb=e=>"function"==typeof e;function e_(e){if(eb(e)){let t=`${ev++}`;return em[t]=e,t}Object.assign(em,e)}function ew(e,t){let r=ey(e),n=em[r];if("primitive"!==e&&!n)throw Error(`R3F: ${r} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if("primitive"===e&&!t.object)throw Error("R3F: Primitives without 'object' are invalid!");if(void 0!==t.args&&!Array.isArray(t.args))throw Error("R3F: The args prop must be an array!")}function ex(e){if(e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?Y(e.parent,e):er(e.object)&&!1!==e.props.visible&&(e.object.visible=!0),e.isHidden=!1,ee(e)}}function ek(e,t,r){let n=t.root.getState();if(e.parent||e.object===n.scene){if(!t.object){var i,a;let e=em[ey(t.type)];t.object=null!=(i=t.props.object)?i:new e(...null!=(a=t.props.args)?a:[]),t.object.__r3f=t}if(Q(t.object,t.props),t.props.attach)Y(e,t);else if(er(t.object)&&er(e.object)){let n=e.object.children.indexOf(null==r?void 0:r.object);if(r&&-1!==n){let r=e.object.children.indexOf(t.object);-1!==r?(e.object.children.splice(r,1),e.object.children.splice(r{try{e.dispose()}catch{}};"undefined"!=typeof IS_REACT_ACT_ENVIRONMENT?t():(0,w.unstable_scheduleCallback)(w.unstable_IdlePriority,t)}}function eS(e,t,r){if(!t)return;t.parent=null;let n=e.children.indexOf(t);-1!==n&&e.children.splice(n,1),t.props.attach?W(e,t):er(t.object)&&er(e.object)&&(e.object.remove(t.object),function(e,t){let{internal:r}=e.getState();r.interaction=r.interaction.filter(e=>e!==t),r.initialHits=r.initialHits.filter(e=>e!==t),r.hovered.forEach((e,n)=>{(e.eventObject===t||e.object===t)&&r.hovered.delete(n)}),r.capturedMap.forEach((e,n)=>{ei(r.capturedMap,t,e,n)})}(N(t),t.object));let i=null!==t.props.dispose&&!1!==r;for(let e=t.children.length-1;e>=0;e--){let r=t.children[e];eS(t,r,i)}t.children.length=0,delete t.object.__r3f,i&&"primitive"!==t.type&&"Scene"!==t.object.type&&eA(t.object),void 0===r&&ee(t)}let ej=[],eI=()=>{},eR={},eN=0,eP=function(e){let t=_()(e);return t.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:c.version}),t}({isPrimaryRenderer:!1,warnsIfNotActing:!1,supportsMutation:!0,supportsPersistence:!1,supportsHydration:!1,createInstance:function(e,t,r){var n;return ew(e=ey(e)in em?e:e.replace(eg,""),t),"primitive"===e&&null!=(n=t.object)&&n.__r3f&&delete t.object.__r3f,q(t.object,r,e,t)},removeChild:eS,appendChild:eE,appendInitialChild:eE,insertBefore:eT,appendChildToContainer(e,t){let r=e.getState().scene.__r3f;t&&r&&eE(r,t)},removeChildFromContainer(e,t){let r=e.getState().scene.__r3f;t&&r&&eS(r,t)},insertInContainerBefore(e,t,r){let n=e.getState().scene.__r3f;t&&r&&n&&eT(n,t,r)},getRootHostContext:()=>eR,getChildHostContext:()=>eR,commitUpdate(e,t,r,n,i){var a,o,s;ew(t,n);let l=!1;if("primitive"===e.type&&r.object!==n.object||(null==(a=n.args)?void 0:a.length)!==(null==(o=r.args)?void 0:o.length)?l=!0:null!=(s=n.args)&&s.some((e,t)=>{var n;return e!==(null==(n=r.args)?void 0:n[t])})&&(l=!0),l)ej.push([e,{...n},i]);else{let t=function(e,t){let r={};for(let n in t)if(!J.includes(n)&&!B.equ(t[n],e.props[n]))for(let e in r[n]=t[n],t)e.startsWith(`${n}-`)&&(r[e]=t[e]);for(let n in e.props){if(J.includes(n)||t.hasOwnProperty(n))continue;let{root:i,key:a}=V(e.object,n);if(i.constructor&&0===i.constructor.length){let e=function(e){let t=G.get(e.constructor);try{t||(t=new e.constructor,G.set(e.constructor,t))}catch(e){}return t}(i);B.und(e)||(r[a]=e[a])}else r[a]=0}return r}(e,n);Object.keys(t).length&&(Object.assign(e.props,t),Q(e.object,t))}(null===i.sibling||(4&i.flags)==0)&&function(){for(let[e]of ej){let t=e.parent;if(t)for(let r of(e.props.attach?W(t,e):er(e.object)&&er(t.object)&&t.object.remove(e.object),e.children))r.props.attach?W(e,r):er(r.object)&&er(e.object)&&e.object.remove(r.object);e.isHidden&&ex(e),e.object.__r3f&&delete e.object.__r3f,"primitive"!==e.type&&eA(e.object)}for(let[n,i,a]of ej){n.props=i;let o=n.parent;if(o){let i=em[ey(n.type)];n.object=null!=(e=n.props.object)?e:new i(...null!=(t=n.props.args)?t:[]),n.object.__r3f=n;var e,t,r=n.object;for(let e of[a,a.alternate])if(null!==e)if("function"==typeof e.ref){null==e.refCleanup||e.refCleanup();let t=e.ref(r);"function"==typeof t&&(e.refCleanup=t)}else e.ref&&(e.ref.current=r);for(let e of(Q(n.object,n.props),n.props.attach?Y(o,n):er(n.object)&&er(o.object)&&o.object.add(n.object),n.children))e.props.attach?Y(n,e):er(e.object)&&er(n.object)&&n.object.add(e.object);ee(n)}}ej.length=0}()},finalizeInitialChildren:()=>!1,commitMount(){},getPublicInstance:e=>null==e?void 0:e.object,prepareForCommit:()=>null,preparePortalMount:e=>q(e.getState().scene,e,"",{}),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance:function(e){if(!e.isHidden){var t;e.props.attach&&null!=(t=e.parent)&&t.object?W(e.parent,e):er(e.object)&&(e.object.visible=!1),e.isHidden=!0,ee(e)}},unhideInstance:ex,createTextInstance:eI,hideTextInstance:eI,unhideTextInstance:eI,scheduleTimeout:"function"==typeof setTimeout?setTimeout:void 0,cancelTimeout:"function"==typeof clearTimeout?clearTimeout:void 0,noTimeout:-1,getInstanceFromNode:()=>null,beforeActiveInstanceBlur(){},afterActiveInstanceBlur(){},detachDeletedInstance(){},prepareScopeUpdate(){},getInstanceFromScope:()=>null,shouldAttemptEagerTransition:()=>!1,trackSchedulerEvent:()=>{},resolveEventType:()=>null,resolveEventTimeStamp:()=>-1.1,requestPostPaintCallback(){},maySuspendCommit:()=>!1,preloadInstance:()=>!0,startSuspendingCommit(){},suspendInstance(){},waitForCommitToBeReady:()=>null,NotPendingTransition:null,HostTransitionContext:c.createContext(null),setCurrentUpdatePriority(e){eN=e},getCurrentUpdatePriority:()=>eN,resolveUpdatePriority(){var e;if(0!==eN)return eN;switch("undefined"!=typeof window&&(null==(e=window.event)?void 0:e.type)){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return p.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return p.ContinuousEventPriority;default:return p.DefaultEventPriority}},resetFormInstance(){}}),eC=new Map,eO={objects:"shallow",strict:!1};function ez(e){let t,r,n=eC.get(e),i=null==n?void 0:n.fiber,a=null==n?void 0:n.store;n&&console.warn("R3F.createRoot should only be called once!");let o="function"==typeof reportError?reportError:console.error,s=a||es(eY,eW),c=i||eP.createContainer(s,p.ConcurrentRoot,null,!1,null,"",o,o,o,null);n||eC.set(e,{fiber:c,store:s});let d=!1,f=null;return{async configure(n={}){var i,a;let o;f=new Promise(e=>o=e);let{gl:c,size:p,scene:h,events:m,onCreated:g,shadows:y=!1,linear:v=!1,flat:b=!1,legacy:_=!1,orthographic:w=!1,frameloop:x="always",dpr:k=[1,2],performance:E,raycaster:T,camera:A,onPointerMissed:S}=n,j=s.getState(),I=j.gl;if(!j.gl){let t={canvas:e,powerPreference:"high-performance",antialias:!0,alpha:!0},r="function"==typeof c?await c(t):c;I=ea(r)?r:new u.WebGLRenderer({...t,...c}),j.set({gl:I})}let R=j.raycaster;R||j.set({raycaster:R=new l.tBo});let{params:N,...P}=T||{};if(B.equ(P,R,eO)||Q(R,{...P}),B.equ(N,R.params,eO)||Q(R,{params:{...R.params,...N}}),!j.camera||j.camera===r&&!B.equ(r,A,eO)){r=A;let e=null==A?void 0:A.isCamera,t=e?A:w?new l.qUd(0,0,0,0,.1,1e3):new l.ubm(75,0,.1,1e3);!e&&(t.position.z=5,A&&(Q(t,A),!t.manual&&("aspect"in A||"left"in A||"right"in A||"bottom"in A||"top"in A)&&(t.manual=!0,t.updateProjectionMatrix())),j.camera||null!=A&&A.rotation||t.lookAt(0,0,0)),j.set({camera:t}),R.camera=t}if(!j.scene){let e;null!=h&&h.isScene?q(e=h,s,"",{}):(q(e=new l.Z58,s,"",{}),h&&Q(e,h)),j.set({scene:e})}m&&!j.events.handlers&&j.set({events:m(s)});let C=function(e,t){if(!t&&"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){let{width:t,height:r,top:n,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:r,top:n,left:i}}return!t&&"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0,...t}}(e,p);if(B.equ(C,j.size,eO)||j.setSize(C.width,C.height,C.top,C.left),k&&j.viewport.dpr!==D(k)&&j.setDpr(k),j.frameloop!==x&&j.setFrameloop(x),j.onPointerMissed||j.set({onPointerMissed:S}),E&&!B.equ(E,j.performance,eO)&&j.set(e=>({performance:{...e.performance,...E}})),!j.xr){let e=(e,t)=>{let r=s.getState();"never"!==r.frameloop&&eW(e,!0,r,t)},t=()=>{let t=s.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||eY(t)},r={connect(){let e=s.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){let e=s.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};"function"==typeof(null==(i=I.xr)?void 0:i.addEventListener)&&r.connect(),j.set({xr:r})}if(I.shadowMap){let e=I.shadowMap.enabled,t=I.shadowMap.type;if(I.shadowMap.enabled=!!y,B.boo(y))I.shadowMap.type=l.Wk7;else if(B.str(y)){let e={basic:l.bTm,percentage:l.QP0,soft:l.Wk7,variance:l.RyA};I.shadowMap.type=null!=(a=e[y])?a:l.Wk7}else B.obj(y)&&Object.assign(I.shadowMap,y);(e!==I.shadowMap.enabled||t!==I.shadowMap.type)&&(I.shadowMap.needsUpdate=!0)}return l.ppV.enabled=!_,d||(I.outputColorSpace=v?l.Zr2:l.er$,I.toneMapping=b?l.y_p:l.FV),j.legacy!==_&&j.set(()=>({legacy:_})),j.linear!==v&&j.set(()=>({linear:v})),j.flat!==b&&j.set(()=>({flat:b})),!c||B.fun(c)||ea(c)||B.equ(c,I,eO)||Q(I,c),t=g,d=!0,o(),this},render(r){return d||f||this.configure(),f.then(()=>{eP.updateContainer((0,I.jsx)(eM,{store:s,children:r,onCreated:t,rootElement:e}),c,null,()=>void 0)}),s},unmount(){e$(e)}}}function eM({store:e,children:t,onCreated:r,rootElement:n}){return z(()=>{let t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),r&&r(t),e.getState().events.connected||null==t.events.connect||t.events.connect(n)},[]),(0,I.jsx)(eo.Provider,{value:e,children:t})}function e$(e,t){let r=eC.get(e),n=null==r?void 0:r.fiber;if(n){let i=null==r?void 0:r.store.getState();i&&(i.internal.active=!1),eP.updateContainer(null,n,null,()=>{i&&setTimeout(()=>{try{null==i.events.disconnect||i.events.disconnect(),null==(r=i.gl)||null==(n=r.renderLists)||null==n.dispose||n.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(o=i.gl)&&o.xr&&i.xr.disconnect();var r,n,a,o,s=i.scene;for(let e in"Scene"!==s.type&&(null==s.dispose||s.dispose()),s){let t=s[e];(null==t?void 0:t.type)!=="Scene"&&(null==t||null==t.dispose||t.dispose())}eC.delete(e),t&&t(e)}catch(e){}},500)})}}let eL=new Set,eF=new Set,eD=new Set;function eU(e,t){if(e.size)for(let{callback:r}of e.values())r(t)}function eB(e,t){switch(e){case"before":return eU(eL,t);case"after":return eU(eF,t);case"tail":return eU(eD,t)}}function eZ(e,t,r){let a=t.clock.getDelta();"never"===t.frameloop&&"number"==typeof e&&(a=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),n=t.internal.subscribers;for(let e=0;e0)&&!(null!=(t=s.gl.xr)&&t.isPresenting)&&(a+=eZ(e,s))}if(eV=!1,eB("after",e),0===a)return eB("tail",e),eq=!1,cancelAnimationFrame(o)}function eY(e,t=1){var r;if(!e)return eC.forEach(e=>eY(e.store.getState(),t));(null==(r=e.gl.xr)||!r.isPresenting)&&e.internal.active&&"never"!==e.frameloop&&(t>1?e.internal.frames=Math.min(60,e.internal.frames+t):eV?e.internal.frames=2:e.internal.frames=1,eq||(eq=!0,requestAnimationFrame(eH)))}function eW(e,t=!0,r,n){if(t&&eB("before",e),r)eZ(e,r,n);else for(let t of eC.values())eZ(e,t.store.getState());t&&eB("after",e)}let eJ={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function eG(e){let{handlePointer:t}=function(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var r;return null==(r=e.__r3f)?void 0:r.handlers["onPointer"+t]}))}function r(t){let{internal:r}=e.getState();for(let e of r.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){let n=e.eventObject.__r3f;if(r.hovered.delete(en(e)),null!=n&&n.eventCount){let r=n.handlers,i={...e,intersections:t};null==r.onPointerOut||r.onPointerOut(i),null==r.onPointerLeave||r.onPointerLeave(i)}}}function n(e,t){for(let r=0;rr([]);case"onLostPointerCapture":return t=>{let{internal:n}=e.getState();"pointerId"in t&&n.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{n.capturedMap.has(t.pointerId)&&(n.capturedMap.delete(t.pointerId),r([]))})}}return function(a){let{onPointerMissed:o,internal:s}=e.getState();s.lastEvent.current=a;let u="onPointerMove"===i,c="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,d=function(t,r){let n=e.getState(),i=new Set,a=[],o=r?r(n.internal.interaction):n.internal.interaction;for(let e=0;e{let r=U(e.object),n=U(t.object);return r&&n&&n.events.priority-r.events.priority||e.distance-t.distance}).filter(e=>{let t=en(e);return!i.has(t)&&(i.add(t),!0)});for(let e of(n.events.filter&&(s=n.events.filter(s,n)),s)){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&n.internal.capturedMap.has(t.pointerId))for(let e of n.internal.capturedMap.get(t.pointerId).values())i.has(en(e.intersection))||a.push(e.intersection);return a}(a,u?t:void 0),p=c?function(t){let{internal:r}=e.getState(),n=t.offsetX-r.initialClick[0],i=t.offsetY-r.initialClick[1];return Math.round(Math.sqrt(n*n+i*i))}(a):0;"onPointerDown"===i&&(s.initialClick=[a.offsetX,a.offsetY],s.initialHits=d.map(e=>e.eventObject)),c&&!d.length&&p<=2&&(n(a,s.interaction),o&&o(a)),u&&r(d),!function(e,t,n,i){if(e.length){let a={stopped:!1};for(let o of e){let s=U(o.object);if(s||o.object.traverseAncestors(e=>{let t=U(e);if(t)return s=t,!1}),s){let{raycaster:u,pointer:c,camera:d,internal:p}=s,f=new l.Pq0(c.x,c.y,0).unproject(d),h=e=>{var t,r;return null!=(t=null==(r=p.capturedMap.get(e))?void 0:r.has(o.eventObject))&&t},m=e=>{let r={intersection:o,target:t.target};p.capturedMap.has(e)?p.capturedMap.get(e).set(o.eventObject,r):p.capturedMap.set(e,new Map([[o.eventObject,r]])),t.target.setPointerCapture(e)},g=e=>{let t=p.capturedMap.get(e);t&&ei(p.capturedMap,o.eventObject,t,e)},y={};for(let e in t){let r=t[e];"function"!=typeof r&&(y[e]=r)}let v={...o,...y,pointer:c,intersections:e,stopped:a.stopped,delta:n,unprojectedPoint:f,ray:u.ray,camera:d,stopPropagation(){let n="pointerId"in t&&p.capturedMap.get(t.pointerId);(!n||n.has(o.eventObject))&&(v.stopped=a.stopped=!0,p.hovered.size&&Array.from(p.hovered.values()).find(e=>e.eventObject===o.eventObject)&&r([...e.slice(0,e.indexOf(o)),o]))},target:{hasPointerCapture:h,setPointerCapture:m,releasePointerCapture:g},currentTarget:{hasPointerCapture:h,setPointerCapture:m,releasePointerCapture:g},nativeEvent:t};if(i(v),!0===a.stopped)break}}}}(d,a,p,function(e){let t=e.eventObject,r=t.__r3f;if(!(null!=r&&r.eventCount))return;let o=r.handlers;if(u){if(o.onPointerOver||o.onPointerEnter||o.onPointerOut||o.onPointerLeave){let t=en(e),r=s.hovered.get(t);r?r.stopped&&e.stopPropagation():(s.hovered.set(t,e),null==o.onPointerOver||o.onPointerOver(e),null==o.onPointerEnter||o.onPointerEnter(e))}null==o.onPointerMove||o.onPointerMove(e)}else{let r=o[i];r?(!c||s.initialHits.includes(t))&&(n(a,s.interaction.filter(e=>!s.initialHits.includes(e))),r(e)):c&&s.initialHits.includes(t)&&n(a,s.interaction.filter(e=>!s.initialHits.includes(e)))}})}}}}(e);return{priority:1,enabled:!0,compute(e,t,r){t.pointer.set(e.offsetX/t.size.width*2-1,-(2*(e.offsetY/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(eJ).reduce((e,r)=>({...e,[r]:t(r)}),{}),update:()=>{var t;let{events:r,internal:n}=e.getState();null!=(t=n.lastEvent)&&t.current&&r.handlers&&r.handlers.onPointerMove(n.lastEvent.current)},connect:t=>{let{set:r,events:n}=e.getState();if(null==n.disconnect||n.disconnect(),r(e=>({events:{...e.events,connected:t}})),n.handlers)for(let e in n.handlers){let r=n.handlers[e],[i,a]=eJ[e];t.addEventListener(i,r,{passive:a})}},disconnect:()=>{let{set:t,events:r}=e.getState();if(r.connected){if(r.handlers)for(let e in r.handlers){let t=r.handlers[e],[n]=eJ[e];r.connected.removeEventListener(n,t)}t(e=>({events:{...e.events,connected:void 0}}))}}}}},4031:(e,t,r)=>{"use strict";r.d(t,{A:()=>T});var n=r(3264);class i extends n.aHM{constructor(e){super(e)}load(e,t,r,i){let a=this,o=new n.Y9S(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(r){try{t(a.parse(r))}catch(t){i?i(t):console.error(t),a.manager.itemError(e)}},r,i)}parse(e){let t=function(e){if("string"!=typeof e)return e;{let t=new Uint8Array(e.length);for(let r=0;r>5&31)/31,c=(e>>10&31)/31):(l=t,u=r,c=i)}for(let t=1;t<=3;t++){let r=a+12*t,i=3*e*3+(t-1)*3;h[i]=o.getFloat32(r,!0),h[i+1]=o.getFloat32(r+4,!0),h[i+2]=o.getFloat32(r+8,!0),m[i]=s,m[i+1]=f,m[i+2]=y,d&&(g.setRGB(l,u,c,n.er$),p[i]=g.r,p[i+1]=g.g,p[i+2]=g.b)}}return f.setAttribute("position",new n.THS(h,3)),f.setAttribute("normal",new n.THS(m,3)),d&&(f.setAttribute("color",new n.THS(p,3)),f.hasColors=!0,f.alpha=a),f}(t)}}class a extends n.BRH{constructor(e){super(e)}parse(e){if(e.length<19)throw Error("THREE.TGALoader: Not enough data to contain header.");let t=0,r=new Uint8Array(e),i={id_length:r[t++],colormap_type:r[t++],image_type:r[t++],colormap_index:r[t++]|r[t++]<<8,colormap_length:r[t++]|r[t++]<<8,colormap_size:r[t++],origin:[r[t++]|r[t++]<<8,r[t++]|r[t++]<<8],width:r[t++]|r[t++]<<8,height:r[t++]|r[t++]<<8,pixel_size:r[t++],flags:r[t++]};switch(i.image_type){case 1:case 9:if(i.colormap_length>256||24!==i.colormap_size||1!==i.colormap_type)throw Error("THREE.TGALoader: Invalid type colormap data for indexed type.");break;case 2:case 3:case 10:case 11:if(i.colormap_type)throw Error("THREE.TGALoader: Invalid type colormap data for colormap type.");break;case 0:throw Error("THREE.TGALoader: No data.");default:throw Error("THREE.TGALoader: Invalid type "+i.image_type)}if(i.width<=0||i.height<=0)throw Error("THREE.TGALoader: Invalid image size.");if(8!==i.pixel_size&&16!==i.pixel_size&&24!==i.pixel_size&&32!==i.pixel_size)throw Error("THREE.TGALoader: Invalid pixel size "+i.pixel_size);if(i.id_length+t>e.length)throw Error("THREE.TGALoader: No data.");t+=i.id_length;let a=!1,o=!1,s=!1;switch(i.image_type){case 9:a=!0,o=!0;break;case 1:o=!0;break;case 10:a=!0;break;case 2:break;case 11:a=!0,s=!0;break;case 3:s=!0}let l=new Uint8Array(i.width*i.height*4),u=function(e,t,r,n,i){let a,o,s=r.pixel_size>>3,l=r.width*r.height*s;if(t&&(o=i.subarray(n,n+=r.colormap_length*(r.colormap_size>>3))),e){let e,t,r;a=new Uint8Array(l);let o=0,u=new Uint8Array(s);for(;o>4){default:case 2:o=0,u=1,d=t,l=0,c=1,p=r;break;case 0:o=0,u=1,d=t,l=r-1,c=-1,p=-1;break;case 3:o=t-1,u=-1,d=-1,l=0,c=1,p=r;break;case 1:o=t-1,u=-1,d=-1,l=r-1,c=-1,p=-1}if(s)switch(i.pixel_size){case 8:!function(e,t,r,n,a,o,s,l){let u,c=0,d,p,f=i.width;for(p=t;p!==n;p+=r)for(d=a;d!==s;d+=o,c++)u=l[c],e[(d+f*p)*4+0]=u,e[(d+f*p)*4+1]=u,e[(d+f*p)*4+2]=u,e[(d+f*p)*4+3]=255}(e,l,c,p,o,u,d,n);break;case 16:var f=e,h=l,m=c,g=p,y=o,v=u,b=d,_=n;let w=0,x,k,E=i.width;for(k=h;k!==g;k+=m)for(x=y;x!==b;x+=v,w+=2)f[(x+E*k)*4+0]=_[w+0],f[(x+E*k)*4+1]=_[w+0],f[(x+E*k)*4+2]=_[w+0],f[(x+E*k)*4+3]=_[w+1];break;default:throw Error("THREE.TGALoader: Format not supported.")}else switch(i.pixel_size){case 8:!function(e,t,r,n,a,o,s,l,u){let c,d=0,p,f,h=i.width;for(f=t;f!==n;f+=r)for(p=a;p!==s;p+=o,d++)c=l[d],e[(p+h*f)*4+3]=255,e[(p+h*f)*4+2]=u[3*c+0],e[(p+h*f)*4+1]=u[3*c+1],e[(p+h*f)*4+0]=u[3*c+2]}(e,l,c,p,o,u,d,n,a);break;case 16:!function(e,t,r,n,a,o,s,l){let u,c=0,d,p,f=i.width;for(p=t;p!==n;p+=r)for(d=a;d!==s;d+=o,c+=2)u=l[c+0]+(l[c+1]<<8),e[(d+f*p)*4+0]=(31744&u)>>7,e[(d+f*p)*4+1]=(992&u)>>2,e[(d+f*p)*4+2]=(31&u)<<3,e[(d+f*p)*4+3]=32768&u?0:255}(e,l,c,p,o,u,d,n);break;case 24:var T=e,A=l,S=c,j=p,I=o,R=u,N=d,P=n;let C=0,O,z,M=i.width;for(z=A;z!==j;z+=S)for(O=I;O!==N;O+=R,C+=3)T[(O+M*z)*4+3]=255,T[(O+M*z)*4+2]=P[C+0],T[(O+M*z)*4+1]=P[C+1],T[(O+M*z)*4+0]=P[C+2];break;case 32:var $=e,L=l,F=c,D=p,U=o,B=u,Z=d,q=n;let V=0,H,Y,W=i.width;for(Y=L;Y!==D;Y+=F)for(H=U;H!==Z;H+=B,V+=4)$[(H+W*Y)*4+2]=q[V+0],$[(H+W*Y)*4+1]=q[V+1],$[(H+W*Y)*4+0]=q[V+2],$[(H+W*Y)*4+3]=q[V+3];break;default:throw Error("THREE.TGALoader: Format not supported.")}}(l,i.width,i.height,u.pixel_data,u.palettes),{data:l,width:i.width,height:i.height,flipY:!0,generateMipmaps:!0,minFilter:n.$_I}}}class o extends n.aHM{load(e,t,r,i){let a=this,o=""===a.path?n.r6x.extractUrlBase(e):a.path,s=new n.Y9S(a.manager);s.setPath(a.path),s.setRequestHeader(a.requestHeader),s.setWithCredentials(a.withCredentials),s.load(e,function(r){try{t(a.parse(r,o))}catch(t){i?i(t):console.error(t),a.manager.itemError(e)}},r,i)}parse(e,t){var r,i,o,s;let l;function u(e,t){let r=[],n=e.childNodes;for(let e=0,i=n.length;e0&&t.push(new n.RiT(i+".position",a,o)),s.length>0&&t.push(new n.MBL(i+".quaternion",a,s)),l.length>0&&t.push(new n.RiT(i+".scale",a,l))}(function(e,t,r){let n,i,a,o,s,l,u=el.nodes[e.id],c=G(u.id),d=u.transforms[e.sid],p=u.matrix.clone().transpose(),f={};switch(d){case"matrix":for(a=0,o=t.array.length;a=0;){let n=e[t];if(null!==n.value[r])return n;t--}return null}(e,i,t),n=function(e,t,r){for(;t>>0)+2).toLowerCase()?l:en;if(void 0===o)return console.warn("THREE.ColladaLoader: Loader for texture %s not found.",a),null;{let r=o.load(a),i=e.extra;if(void 0!==i&&void 0!==i.technique&&!1===f(i.technique)){let e=i.technique;r.wrapS=e.wrapU?n.GJx:n.ghU,r.wrapT=e.wrapV?n.GJx:n.ghU,r.offset.set(e.offsetU||0,e.offsetV||0),r.repeat.set(e.repeatU||1,e.repeatV||1)}else r.wrapS=n.GJx,r.wrapT=n.GJx;return null!==t&&(r.colorSpace=t),r}}}r.name=e.name||"";let s=a.parameters;for(let e in s){let t=s[e];switch(e){case"diffuse":t.color&&r.color.fromArray(t.color),t.texture&&(r.map=o(t.texture,n.er$));break;case"specular":t.color&&r.specular&&r.specular.fromArray(t.color),t.texture&&(r.specularMap=o(t.texture));break;case"bump":t.texture&&(r.normalMap=o(t.texture));break;case"ambient":t.texture&&(r.lightMap=o(t.texture,n.er$));break;case"shininess":t.float&&r.shininess&&(r.shininess=t.float);break;case"emission":t.color&&r.emissive&&r.emissive.fromArray(t.color),t.texture&&(r.emissiveMap=o(t.texture,n.er$))}}n.ppV.toWorkingColorSpace(r.color,n.er$),r.specular&&n.ppV.toWorkingColorSpace(r.specular,n.er$),r.emissive&&n.ppV.toWorkingColorSpace(r.emissive,n.er$);let u=s.transparent,c=s.transparency;if(void 0===c&&u&&(c={float:1}),void 0===u&&c&&(u={opaque:"A_ONE",data:{color:[1,1,1,1]}}),u&&c)if(u.data.texture)r.transparent=!0;else{let e=u.data.color;switch(u.opaque){case"A_ONE":r.opacity=e[3]*c.float;break;case"RGB_ZERO":r.opacity=1-e[0]*c.float;break;case"A_ZERO":r.opacity=1-e[3]*c.float;break;case"RGB_ONE":r.opacity=e[0]*c.float;break;default:console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',u.opaque)}r.opacity<1&&(r.transparent=!0)}if(void 0!==a.extra&&void 0!==a.extra.technique){let e=a.extra.technique;for(let t in e){let i=e[t];switch(t){case"double_sided":r.side=1===i?n.$EB:n.hB5;break;case"bump":r.normalMap=o(i.texture),r.normalScale=new n.I9Y(1,1)}}}return r}function P(e){let t;switch(e.optics.technique){case"perspective":t=new n.ubm(e.optics.parameters.yfov,e.optics.parameters.aspect_ratio,e.optics.parameters.znear,e.optics.parameters.zfar);break;case"orthographic":let r=e.optics.parameters.ymag,i=e.optics.parameters.xmag,a=e.optics.parameters.aspect_ratio;i=void 0===i?r*a:i,r=void 0===r?i/a:r,i*=.5,r*=.5,t=new n.qUd(-i,i,r,-r,e.optics.parameters.znear,e.optics.parameters.zfar);break;default:t=new n.ubm}return t.name=e.name||"",t}function C(e){let t;switch(e.technique){case"directional":t=new n.ZyN;break;case"point":t=new n.HiM;break;case"spot":t=new n.nCl;break;case"ambient":t=new n.$p8}return e.parameters.color&&t.color.copy(e.parameters.color),e.parameters.distance&&(t.distance=e.parameters.distance),t}function O(e){let t={array:[],stride:3};for(let r=0;r0&&t0&&p.setAttribute("position",new n.qtW(a.array,a.stride)),o.array.length>0&&p.setAttribute("normal",new n.qtW(o.array,o.stride)),u.array.length>0&&p.setAttribute("color",new n.qtW(u.array,u.stride)),s.array.length>0&&p.setAttribute("uv",new n.qtW(s.array,s.stride)),l.array.length>0&&p.setAttribute("uv1",new n.qtW(l.array,l.stride)),c.array.length>0&&p.setAttribute("skinIndex",new n.qtW(c.array,c.stride)),d.array.length>0&&p.setAttribute("skinWeight",new n.qtW(d.array,d.stride)),i.data=p,i.type=e[0].type,i.materialKeys=f,i}(a,r,i)}return t}function M(e,t,r,i,a=!1){let o=e.p,s=e.stride,l=e.vcount;function u(e){let t=o[e+r]*d,s=t+d;for(;t4)for(let t=1,n=r-2;t<=n;t++){let r=e+0*s,n=e+s*t,i=e+s*(t+1);u(r),u(n),u(i)}e+=s*r}}else for(let e=0,t=o.length;e0?a+s:a;t.inputs[l]={id:i,offset:o},t.stride=Math.max(t.stride,o+1),"TEXCOORD"===a&&(t.hasUV=!0);break;case"vcount":t.vcount=d(n.textContent);break;case"p":t.p=d(n.textContent)}}return t}(n));break;default:console.log(n)}}el.geometries[e.getAttribute("id")]=t}}),h(ee,"library_nodes","node",Z),h(ee,"library_visual_scenes","visual_scene",function(e){let t={name:e.getAttribute("name"),children:[]},r=e.getElementsByTagName("node");for(let e=0;e=t.limits.max&&(t.static=!0),t.middlePosition=(t.limits.min+t.limits.max)/2,t}(i)}}return t}(i);break;case"link":t.links.push(function e(t){let r={sid:t.getAttribute("sid"),name:t.getAttribute("name")||"",attachments:[],transforms:[]};for(let n=0;ni.limits.max||tnull===e?null:parseFloat(e)),this.origPosition&&this.origQuaternion||(this.origPosition=this.position.clone(),this.origQuaternion=this.quaternion.clone());let t=!1;switch(this.mimicJoints.forEach(r=>{t=r.updateFromMimickedJoint(...e)||t}),this.jointType){case"fixed":break;case"continuous":case"revolute":{let r=e[0];if(null==r||r===this.jointValue[0])return t;if(this.ignoreLimits||"revolute"!==this.jointType||(r=Math.min(this.limit.upper,r),r=Math.max(this.limit.lower,r)),this.quaternion.setFromAxisAngle(this.axis,r).premultiply(this.origQuaternion),this.jointValue[0]!==r)return this.jointValue[0]=r,this.matrixWorldNeedsUpdate=!0,!0;break}case"prismatic":{let r=e[0];if(null==r||r===this.jointValue[0])return t;if(this.ignoreLimits||(r=Math.min(this.limit.upper,r),r=Math.max(this.limit.lower,r)),this.position.copy(this.origPosition),s.copy(this.axis).applyEuler(this.rotation),this.position.addScaledVector(s,r),this.jointValue[0]!==r)return this.jointValue[0]=r,this.matrixWorldNeedsUpdate=!0,!0;break}case"floating":if(this.jointValue.every((t,r)=>e[r]===t||null===e[r]))break;return this.jointValue[0]=null!==e[0]?e[0]:this.jointValue[0],this.jointValue[1]=null!==e[1]?e[1]:this.jointValue[1],this.jointValue[2]=null!==e[2]?e[2]:this.jointValue[2],this.jointValue[3]=null!==e[3]?e[3]:this.jointValue[3],this.jointValue[4]=null!==e[4]?e[4]:this.jointValue[4],this.jointValue[5]=null!==e[5]?e[5]:this.jointValue[5],c.compose(this.origPosition,this.origQuaternion,p),d.setFromEuler(l.set(this.jointValue[3],this.jointValue[4],this.jointValue[5],"XYZ")),f.set(this.jointValue[0],this.jointValue[1],this.jointValue[2]),u.compose(f,d,p),c.premultiply(u),this.position.setFromMatrixPosition(c),this.rotation.setFromRotationMatrix(c),this.matrixWorldNeedsUpdate=!0,!0;case"planar":if(this.jointValue.every((t,r)=>e[r]===t||null===e[r]))break;return this.jointValue[0]=null!==e[0]?e[0]:this.jointValue[0],this.jointValue[1]=null!==e[1]?e[1]:this.jointValue[1],this.jointValue[2]=null!==e[2]?e[2]:this.jointValue[2],c.compose(this.origPosition,this.origQuaternion,p),d.setFromAxisAngle(this.axis,this.jointValue[2]),f.set(this.jointValue[0],this.jointValue[1],0),u.compose(f,d,p),c.premultiply(u),this.position.setFromMatrixPosition(c),this.rotation.setFromRotationMatrix(c),this.matrixWorldNeedsUpdate=!0,!0}return t}}class b extends v{constructor(...e){super(...e),this.type="URDFMimicJoint",this.mimicJoint=null,this.offset=0,this.multiplier=1}updateFromMimickedJoint(...e){let t=e.map(e=>e*this.multiplier+this.offset);return super.setJointValue(...t)}copy(e,t){return super.copy(e,t),this.mimicJoint=e.mimicJoint,this.offset=e.offset,this.multiplier=e.multiplier,this}}class _ extends y{constructor(...e){super(...e),this.isURDFRobot=!0,this.urdfNode=null,this.urdfRobotNode=null,this.robotName=null,this.links=null,this.joints=null,this.colliders=null,this.visual=null,this.frames=null}copy(e,t){for(let r in super.copy(e,t),this.urdfRobotNode=e.urdfRobotNode,this.robotName=e.robotName,this.links={},this.joints={},this.colliders={},this.visual={},this.traverse(t=>{t.isURDFJoint&&t.urdfName in e.joints&&(this.joints[t.urdfName]=t),t.isURDFLink&&t.urdfName in e.links&&(this.links[t.urdfName]=t),t.isURDFCollider&&t.urdfName in e.colliders&&(this.colliders[t.urdfName]=t),t.isURDFVisual&&t.urdfName in e.visual&&(this.visual[t.urdfName]=t)}),this.joints)this.joints[r].mimicJoints=this.joints[r].mimicJoints.map(e=>this.joints[e.name]);return this.frames={...this.colliders,...this.visual,...this.links,...this.joints},this}getFrame(e){return this.frames[e]}setJointValue(e,...t){let r=this.joints[e];return!!r&&r.setJointValue(...t)}setJointValues(e){let t=!1;for(let r in e){let n=e[r];t=Array.isArray(n)?this.setJointValue(r,...n)||t:this.setJointValue(r,n)||t}return t}}let w=new n.PTz,x=new n.O9p;function k(e){return e?e.trim().split(/\s+/g).map(e=>parseFloat(e)):[0,0,0]}function E(e,t,r=!1){r||e.rotation.set(0,0,0),x.set(t[0],t[1],t[2],"ZYX"),w.setFromEuler(x),w.multiply(e.quaternion),e.quaternion.copy(w)}class T{constructor(e){this.manager=e||n.h_9,this.loadMeshCb=this.defaultMeshLoader.bind(this),this.parseVisual=!0,this.parseCollision=!1,this.packages="",this.workingPath="",this.fetchOptions={}}loadAsync(e){return new Promise((t,r)=>{this.load(e,t,null,r)})}load(e,t,r,i){let a=this.manager,o=n.r6x.extractUrlBase(e),s=this.manager.resolveURL(e);a.itemStart(s),fetch(s,this.fetchOptions).then(e=>{if(e.ok)return r&&r(null),e.text();throw Error(`URDFLoader: Failed to load url '${s}' with error code ${e.status} : ${e.statusText}.`)}).then(e=>{t(this.parse(e,this.workingPath||o)),a.itemEnd(s)}).catch(e=>{i?i(e):console.error("URDFLoader: Error loading file.",e),a.itemError(s),a.itemEnd(s)})}parse(e,t=this.workingPath){let r,i=this.packages,a=this.loadMeshCb,o=this.parseVisual,s=this.parseCollision,l=this.manager,u={},c={},d={};function p(e){if(!/^package:\/\//.test(e))return t?t+e:e;let[r,n]=e.replace(/^package:\/\//,"").split(/\/(.+)/);if("string"==typeof i)if(i.endsWith(r))return i+"/"+n;else return i+"/"+r+"/"+n;if(i instanceof Function)return i(r)+"/"+n;if("object"==typeof i)if(r in i)return i[r]+"/"+n;else return console.error(`URDFLoader : ${r} not found in provided package list.`),null}function f(e){let t=[...e.children],r=new n.tXL;return r.name=e.getAttribute("name")||"",t.forEach(e=>{let t=e.nodeName.toLowerCase();if("color"===t){let t=e.getAttribute("rgba").split(/\s/g).map(e=>parseFloat(e));r.color.setRGB(t[0],t[1],t[2]),r.opacity=t[3],r.transparent=t[3]<1,r.depthWrite=!r.transparent}else if("texture"===t){let t=e.getAttribute("filename");if(t){let e=new n.Tap(l),i=p(t);r.map=e.load(i),r.map.colorSpace=n.er$}}}),r}function h(e,t={}){let r="collision"===e.nodeName.toLowerCase(),i=[...e.children],o=null,s=i.filter(e=>"material"===e.nodeName.toLowerCase())[0];if(s){let e=s.getAttribute("name");o=e&&e in t?t[e]:f(s)}else o=new n.tXL;let u=r?new m:new g;return u.urdfNode=e,i.forEach(e=>{let t=e.nodeName.toLowerCase();if("geometry"===t){let t=e.children[0].nodeName.toLowerCase();if("mesh"===t){let t=p(e.children[0].getAttribute("filename"));if(null!==t){let r=e.children[0].getAttribute("scale");if(r){let e=k(r);u.scale.set(e[0],e[1],e[2])}a(t,l,(e,t)=>{t?console.error("URDFLoader: Error loading mesh.",t):e&&(e instanceof n.eaF&&(e.material=o),e.position.set(0,0,0),e.quaternion.identity(),u.add(e))})}}else if("box"===t){let t=new n.eaF;t.geometry=new n.iNn(1,1,1),t.material=o;let r=k(e.children[0].getAttribute("size"));t.scale.set(r[0],r[1],r[2]),u.add(t)}else if("sphere"===t){let t=new n.eaF;t.geometry=new n.Gu$(1,30,30),t.material=o;let r=parseFloat(e.children[0].getAttribute("radius"))||0;t.scale.set(r,r,r),u.add(t)}else if("cylinder"===t){let t=new n.eaF;t.geometry=new n.Ho_(1,1,1,30),t.material=o;let r=parseFloat(e.children[0].getAttribute("radius"))||0,i=parseFloat(e.children[0].getAttribute("length"))||0;t.scale.set(r,i,r),t.rotation.set(Math.PI/2,0,0),u.add(t)}}else if("origin"===t){let t=k(e.getAttribute("xyz")),r=k(e.getAttribute("rpy"));u.position.set(t[0],t[1],t[2]),u.rotation.set(0,0,0),E(u,r)}}),u}return function(e){let t=[...e.children],r=t.filter(e=>"link"===e.nodeName.toLowerCase()),i=t.filter(e=>"joint"===e.nodeName.toLowerCase()),a=t.filter(e=>"material"===e.nodeName.toLowerCase()),l=new _;l.robotName=e.getAttribute("name"),l.urdfRobotNode=e,a.forEach(e=>{d[e.getAttribute("name")]=f(e)});let p={},m={};r.forEach(t=>{let r=t.getAttribute("name"),n=null===e.querySelector(`child[link="${r}"]`);u[r]=function(e,t,r,n=null){null===n&&(n=new y);let i=[...e.children];return n.name=e.getAttribute("name"),n.urdfName=n.name,n.urdfNode=e,o&&i.filter(e=>"visual"===e.nodeName.toLowerCase()).forEach(e=>{let r=h(e,d);if(n.add(r),e.hasAttribute("name")){let n=e.getAttribute("name");r.name=n,r.urdfName=n,t[n]=r}}),s&&i.filter(e=>"collision"===e.nodeName.toLowerCase()).forEach(e=>{let t=h(e);if(n.add(t),e.hasAttribute("name")){let n=e.getAttribute("name");t.name=n,t.urdfName=n,r[n]=t}}),n}(t,p,m,n?l:null)}),i.forEach(e=>{c[e.getAttribute("name")]=function(e){let t,r=[...e.children],i=e.getAttribute("type"),a=r.find(e=>"mimic"===e.nodeName.toLowerCase());a?((t=new b).mimicJoint=a.getAttribute("joint"),t.multiplier=parseFloat(a.getAttribute("multiplier")||1),t.offset=parseFloat(a.getAttribute("offset")||0)):t=new v,t.urdfNode=e,t.name=e.getAttribute("name"),t.urdfName=t.name,t.jointType=i;let o=null,s=null,l=[0,0,0],c=[0,0,0];r.forEach(e=>{let r=e.nodeName.toLowerCase();"origin"===r?(l=k(e.getAttribute("xyz")),c=k(e.getAttribute("rpy"))):"child"===r?s=u[e.getAttribute("link")]:"parent"===r?o=u[e.getAttribute("link")]:"limit"===r&&(t.limit.lower=parseFloat(e.getAttribute("lower")||t.limit.lower),t.limit.upper=parseFloat(e.getAttribute("upper")||t.limit.upper))}),o.add(t),t.add(s),E(t,c),t.position.set(l[0],l[1],l[2]);let d=r.filter(e=>"axis"===e.nodeName.toLowerCase())[0];if(d){let e=d.getAttribute("xyz").split(/\s+/g).map(e=>parseFloat(e));t.axis=new n.Pq0(e[0],e[1],e[2]),t.axis.normalize()}return t}(e)}),l.joints=c,l.links=u,l.colliders=m,l.visual=p;let g=Object.values(c);return g.forEach(e=>{e instanceof b&&c[e.mimicJoint].mimicJoints.push(e)}),g.forEach(e=>{let t=new Set,r=e=>{if(t.has(e))throw Error("URDFLoader: Detected an infinite loop of mimic joints.");t.add(e),e.mimicJoints.forEach(e=>{r(e)})};r(e)}),l.frames={...m,...p,...u,...c},l}((e instanceof Document?[...e.children]:e instanceof Element?[e]:[...new DOMParser().parseFromString(e,"text/xml").children]).filter(e=>"robot"===e.nodeName).pop())}defaultMeshLoader(e,t,r){/\.stl$/i.test(e)?new i(t).load(e,e=>{r(new n.eaF(e,new n.tXL))}):/\.dae$/i.test(e)?new o(t).load(e,e=>r(e.scene)):console.warn(`URDFLoader: Could not load model at ${e}. +No loader available`)}}},4134:(e,t,r)=>{"use strict";let n=r(7719),i=r(7610),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);let r=0|h(n,i),a=o(r),l=a.write(n,i);return l!==r&&(a=a.slice(0,l)),a}if(ArrayBuffer.isView(e)){var a=e;if($(a,Uint8Array)){let e=new Uint8Array(a);return p(e.buffer,e.byteOffset,e.byteLength)}return d(a)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($(e,ArrayBuffer)||e&&$(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&($(e,SharedArrayBuffer)||e&&$(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return s.from(l,t,r);let u=function(e){if(s.isBuffer(e)){let t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(u)return u;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),r=o(t);for(let n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function h(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return O(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:O(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){let i=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length)if(i)return -1;else r=e.length-1;else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(i)return Uint8Array.prototype.indexOf.call(e,t,r);else return Uint8Array.prototype.lastIndexOf.call(e,t,r);return v(e,[t],r,n,i)}throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;n239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}var a=n;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;lr)throw RangeError("Trying to access beyond buffer length")}function w(e,t,r,n,i,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function x(e,t,r,n,i){R(t,n,i,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function k(e,t,r,n,i){R(t,n,i,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function E(e,t,r,n,i,a){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,n,a){return t*=1,r>>>=0,a||E(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function A(e,t,r,n,a){return t*=1,r>>>=0,a||E(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),s.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return c(e)},s.allocUnsafeSlow=function(e){return c(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if($(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),$(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,a=Math.min(r,n);in.length?(s.isBuffer(t)||(t=s.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(s.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},s.byteLength=h,s.prototype._isBuffer=!0,s.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if($(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let a=i-n,o=r-t,l=Math.min(a,o),u=this.slice(n,i),c=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let p=this.length-t;if((void 0===r||r>p)&&(r=p),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;let o=t.length;for(n>o/2&&(n=o/2),i=0;i>8,i.push(r%256),i.push(n);return i}(e,this.length-c),this,c,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||_(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||_(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readBigUInt64LE=F(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&P(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||_(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||_(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return(e>>>=0,t||_(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||_(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||_(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readBigInt64LE=F(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&P(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||_(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||_(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||_(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;w(this,e,t,r,n,0)}let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;w(this,e,t,r,n,0)}let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigUInt64LE=F(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeBigUInt64BE=F(function(e,t=0){return k(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);w(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){let n=Math.pow(2,8*r-1);w(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||w(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeBigInt64LE=F(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeBigInt64BE=F(function(e,t=0){return k(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return A(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return A(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function R(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new S.ERR_OUT_OF_RANGE("value",n,e)}N(i,"offset"),(void 0===n[i]||void 0===n[i+a])&&P(i,n.length-(a+1))}function N(e,t){if("number"!=typeof e)throw new S.ERR_INVALID_ARG_TYPE(t,"number",e)}function P(e,t,r){if(Math.floor(e)!==e)throw N(e,r),new S.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new S.ERR_BUFFER_OUT_OF_BOUNDS;throw new S.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}j("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),j("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),j("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=I(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=I(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);let C=/[^+/0-9A-Za-z-_]/g;function O(e,t){let r;t=t||1/0;let n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function z(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(C,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function M(e,t,r,n){let i;for(i=0;i=t.length)&&!(i>=e.length);++i)t[i+r]=e[i];return i}function $(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let L=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function F(e){return"undefined"==typeof BigInt?D:e}function D(){throw Error("BigInt not supported")}},4688:(e,t,r)=>{"use strict";r.d(t,{N:()=>b});var n=r(9630),i=r(3967),a=r(2115),o=r(3264),s=Object.defineProperty,l=(e,t,r)=>t in e?s(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t,r)=>(l(e,"symbol"!=typeof t?t+"":t,r),r);class c{constructor(){u(this,"_listeners")}addEventListener(e,t){void 0===this._listeners&&(this._listeners={});let r=this._listeners;void 0===r[e]&&(r[e]=[]),-1===r[e].indexOf(t)&&r[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;let r=this._listeners;return void 0!==r[e]&&-1!==r[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;let r=this._listeners[e];if(void 0!==r){let e=r.indexOf(t);-1!==e&&r.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;let t=this._listeners[e.type];if(void 0!==t){e.target=this;let r=t.slice(0);for(let t=0,n=r.length;tt in e?d(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,f=(e,t,r)=>(p(e,"symbol"!=typeof t?t+"":t,r),r);let h=new o.RlV,m=new o.Zcv,g=Math.cos(Math.PI/180*70),y=(e,t)=>(e%t+t)%t;class v extends c{constructor(e,t){super(),f(this,"object"),f(this,"domElement"),f(this,"enabled",!0),f(this,"target",new o.Pq0),f(this,"minDistance",0),f(this,"maxDistance",1/0),f(this,"minZoom",0),f(this,"maxZoom",1/0),f(this,"minPolarAngle",0),f(this,"maxPolarAngle",Math.PI),f(this,"minAzimuthAngle",-1/0),f(this,"maxAzimuthAngle",1/0),f(this,"enableDamping",!1),f(this,"dampingFactor",.05),f(this,"enableZoom",!0),f(this,"zoomSpeed",1),f(this,"enableRotate",!0),f(this,"rotateSpeed",1),f(this,"enablePan",!0),f(this,"panSpeed",1),f(this,"screenSpacePanning",!0),f(this,"keyPanSpeed",7),f(this,"zoomToCursor",!1),f(this,"autoRotate",!1),f(this,"autoRotateSpeed",2),f(this,"reverseOrbit",!1),f(this,"reverseHorizontalOrbit",!1),f(this,"reverseVerticalOrbit",!1),f(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),f(this,"mouseButtons",{LEFT:o.kBv.ROTATE,MIDDLE:o.kBv.DOLLY,RIGHT:o.kBv.PAN}),f(this,"touches",{ONE:o.wtR.ROTATE,TWO:o.wtR.DOLLY_PAN}),f(this,"target0"),f(this,"position0"),f(this,"zoom0"),f(this,"_domElementKeyEvents",null),f(this,"getPolarAngle"),f(this,"getAzimuthalAngle"),f(this,"setPolarAngle"),f(this,"setAzimuthalAngle"),f(this,"getDistance"),f(this,"getZoomScale"),f(this,"listenToKeyEvents"),f(this,"stopListenToKeyEvents"),f(this,"saveState"),f(this,"reset"),f(this,"update"),f(this,"connect"),f(this,"dispose"),f(this,"dollyIn"),f(this,"dollyOut"),f(this,"getScale"),f(this,"setScale"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=e=>{let t=y(e,2*Math.PI),n=c.phi;n<0&&(n+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-n);2*Math.PI-i{let t=y(e,2*Math.PI),n=c.theta;n<0&&(n+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-n);2*Math.PI-ir.object.position.distanceTo(r.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",ee),this._domElementKeyEvents=e},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",ee),this._domElementKeyEvents=null},this.saveState=()=>{r.target0.copy(r.target),r.position0.copy(r.object.position),r.zoom0=r.object.zoom},this.reset=()=>{r.target.copy(r.target0),r.object.position.copy(r.position0),r.object.zoom=r.zoom0,r.object.updateProjectionMatrix(),r.dispatchEvent(n),r.update(),l=s.NONE},this.update=(()=>{let t=new o.Pq0,i=new o.Pq0(0,1,0),a=new o.PTz().setFromUnitVectors(e.up,i),f=a.clone().invert(),y=new o.Pq0,b=new o.PTz,_=2*Math.PI;return function(){let w=r.object.position;a.setFromUnitVectors(e.up,i),f.copy(a).invert(),t.copy(w).sub(r.target),t.applyQuaternion(a),c.setFromVector3(t),r.autoRotate&&l===s.NONE&&O(2*Math.PI/60/60*r.autoRotateSpeed),r.enableDamping?(c.theta+=d.theta*r.dampingFactor,c.phi+=d.phi*r.dampingFactor):(c.theta+=d.theta,c.phi+=d.phi);let x=r.minAzimuthAngle,k=r.maxAzimuthAngle;isFinite(x)&&isFinite(k)&&(x<-Math.PI?x+=_:x>Math.PI&&(x-=_),k<-Math.PI?k+=_:k>Math.PI&&(k-=_),x<=k?c.theta=Math.max(x,Math.min(k,c.theta)):c.theta=c.theta>(x+k)/2?Math.max(x,c.theta):Math.min(k,c.theta)),c.phi=Math.max(r.minPolarAngle,Math.min(r.maxPolarAngle,c.phi)),c.makeSafe(),!0===r.enableDamping?r.target.addScaledVector(v,r.dampingFactor):r.target.add(v),r.zoomToCursor&&R||r.object.isOrthographicCamera?c.radius=U(c.radius):c.radius=U(c.radius*p),t.setFromSpherical(c),t.applyQuaternion(f),w.copy(r.target).add(t),r.object.matrixAutoUpdate||r.object.updateMatrix(),r.object.lookAt(r.target),!0===r.enableDamping?(d.theta*=1-r.dampingFactor,d.phi*=1-r.dampingFactor,v.multiplyScalar(1-r.dampingFactor)):(d.set(0,0,0),v.set(0,0,0));let E=!1;if(r.zoomToCursor&&R){let n=null;if(r.object instanceof o.ubm&&r.object.isPerspectiveCamera){let e=t.length();n=U(e*p);let i=e-n;r.object.position.addScaledVector(j,i),r.object.updateMatrixWorld()}else if(r.object.isOrthographicCamera){let e=new o.Pq0(I.x,I.y,0);e.unproject(r.object),r.object.zoom=Math.max(r.minZoom,Math.min(r.maxZoom,r.object.zoom/p)),r.object.updateProjectionMatrix(),E=!0;let i=new o.Pq0(I.x,I.y,0);i.unproject(r.object),r.object.position.sub(i).add(e),r.object.updateMatrixWorld(),n=t.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),r.zoomToCursor=!1;null!==n&&(r.screenSpacePanning?r.target.set(0,0,-1).transformDirection(r.object.matrix).multiplyScalar(n).add(r.object.position):(h.origin.copy(r.object.position),h.direction.set(0,0,-1).transformDirection(r.object.matrix),Math.abs(r.object.up.dot(h.direction))u||8*(1-b.dot(r.object.quaternion))>u)&&(r.dispatchEvent(n),y.copy(r.object.position),b.copy(r.object.quaternion),E=!1,!0)}})(),this.connect=e=>{r.domElement=e,r.domElement.style.touchAction="none",r.domElement.addEventListener("contextmenu",et),r.domElement.addEventListener("pointerdown",G),r.domElement.addEventListener("pointercancel",X),r.domElement.addEventListener("wheel",Q)},this.dispose=()=>{var e,t,n,i,a,o;r.domElement&&(r.domElement.style.touchAction="auto"),null==(e=r.domElement)||e.removeEventListener("contextmenu",et),null==(t=r.domElement)||t.removeEventListener("pointerdown",G),null==(n=r.domElement)||n.removeEventListener("pointercancel",X),null==(i=r.domElement)||i.removeEventListener("wheel",Q),null==(a=r.domElement)||a.ownerDocument.removeEventListener("pointermove",K),null==(o=r.domElement)||o.ownerDocument.removeEventListener("pointerup",X),null!==r._domElementKeyEvents&&r._domElementKeyEvents.removeEventListener("keydown",ee)};let r=this,n={type:"change"},i={type:"start"},a={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},l=s.NONE,u=1e-6,c=new o.YHV,d=new o.YHV,p=1,v=new o.Pq0,b=new o.I9Y,_=new o.I9Y,w=new o.I9Y,x=new o.I9Y,k=new o.I9Y,E=new o.I9Y,T=new o.I9Y,A=new o.I9Y,S=new o.I9Y,j=new o.Pq0,I=new o.I9Y,R=!1,N=[],P={};function C(){return Math.pow(.95,r.zoomSpeed)}function O(e){r.reverseOrbit||r.reverseHorizontalOrbit?d.theta+=e:d.theta-=e}function z(e){r.reverseOrbit||r.reverseVerticalOrbit?d.phi+=e:d.phi-=e}let M=(()=>{let e=new o.Pq0;return function(t,r){e.setFromMatrixColumn(r,0),e.multiplyScalar(-t),v.add(e)}})(),$=(()=>{let e=new o.Pq0;return function(t,n){!0===r.screenSpacePanning?e.setFromMatrixColumn(n,1):(e.setFromMatrixColumn(n,0),e.crossVectors(r.object.up,e)),e.multiplyScalar(t),v.add(e)}})(),L=(()=>{let e=new o.Pq0;return function(t,n){let i=r.domElement;if(i&&r.object instanceof o.ubm&&r.object.isPerspectiveCamera){let a=r.object.position;e.copy(a).sub(r.target);let o=e.length();M(2*t*(o*=Math.tan(r.object.fov/2*Math.PI/180))/i.clientHeight,r.object.matrix),$(2*n*o/i.clientHeight,r.object.matrix)}else i&&r.object instanceof o.qUd&&r.object.isOrthographicCamera?(M(t*(r.object.right-r.object.left)/r.object.zoom/i.clientWidth,r.object.matrix),$(n*(r.object.top-r.object.bottom)/r.object.zoom/i.clientHeight,r.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),r.enablePan=!1)}})();function F(e){r.object instanceof o.ubm&&r.object.isPerspectiveCamera||r.object instanceof o.qUd&&r.object.isOrthographicCamera?p=e:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),r.enableZoom=!1)}function D(e){if(!r.zoomToCursor||!r.domElement)return;R=!0;let t=r.domElement.getBoundingClientRect(),n=e.clientX-t.left,i=e.clientY-t.top,a=t.width,o=t.height;I.x=n/a*2-1,I.y=-(i/o*2)+1,j.set(I.x,I.y,1).unproject(r.object).sub(r.object.position).normalize()}function U(e){return Math.max(r.minDistance,Math.min(r.maxDistance,e))}function B(e){b.set(e.clientX,e.clientY)}function Z(e){x.set(e.clientX,e.clientY)}function q(){if(1==N.length)b.set(N[0].pageX,N[0].pageY);else{let e=.5*(N[0].pageX+N[1].pageX),t=.5*(N[0].pageY+N[1].pageY);b.set(e,t)}}function V(){if(1==N.length)x.set(N[0].pageX,N[0].pageY);else{let e=.5*(N[0].pageX+N[1].pageX),t=.5*(N[0].pageY+N[1].pageY);x.set(e,t)}}function H(){let e=N[0].pageX-N[1].pageX,t=N[0].pageY-N[1].pageY,r=Math.sqrt(e*e+t*t);T.set(0,r)}function Y(e){if(1==N.length)_.set(e.pageX,e.pageY);else{let t=en(e),r=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);_.set(r,n)}w.subVectors(_,b).multiplyScalar(r.rotateSpeed);let t=r.domElement;t&&(O(2*Math.PI*w.x/t.clientHeight),z(2*Math.PI*w.y/t.clientHeight)),b.copy(_)}function W(e){if(1==N.length)k.set(e.pageX,e.pageY);else{let t=en(e),r=.5*(e.pageX+t.x),n=.5*(e.pageY+t.y);k.set(r,n)}E.subVectors(k,x).multiplyScalar(r.panSpeed),L(E.x,E.y),x.copy(k)}function J(e){var t;let n=en(e),i=e.pageX-n.x,a=e.pageY-n.y,o=Math.sqrt(i*i+a*a);A.set(0,o),S.set(0,Math.pow(A.y/T.y,r.zoomSpeed)),t=S.y,F(p/t),T.copy(A)}function G(e){var t,n,a;!1!==r.enabled&&(0===N.length&&(null==(t=r.domElement)||t.ownerDocument.addEventListener("pointermove",K),null==(n=r.domElement)||n.ownerDocument.addEventListener("pointerup",X)),a=e,N.push(a),"touch"===e.pointerType?function(e){switch(er(e),N.length){case 1:switch(r.touches.ONE){case o.wtR.ROTATE:if(!1===r.enableRotate)return;q(),l=s.TOUCH_ROTATE;break;case o.wtR.PAN:if(!1===r.enablePan)return;V(),l=s.TOUCH_PAN;break;default:l=s.NONE}break;case 2:switch(r.touches.TWO){case o.wtR.DOLLY_PAN:if(!1===r.enableZoom&&!1===r.enablePan)return;r.enableZoom&&H(),r.enablePan&&V(),l=s.TOUCH_DOLLY_PAN;break;case o.wtR.DOLLY_ROTATE:if(!1===r.enableZoom&&!1===r.enableRotate)return;r.enableZoom&&H(),r.enableRotate&&q(),l=s.TOUCH_DOLLY_ROTATE;break;default:l=s.NONE}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=r.mouseButtons.LEFT;break;case 1:t=r.mouseButtons.MIDDLE;break;case 2:t=r.mouseButtons.RIGHT;break;default:t=-1}switch(t){case o.kBv.DOLLY:if(!1===r.enableZoom)return;D(e),T.set(e.clientX,e.clientY),l=s.DOLLY;break;case o.kBv.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===r.enablePan)return;Z(e),l=s.PAN}else{if(!1===r.enableRotate)return;B(e),l=s.ROTATE}break;case o.kBv.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===r.enableRotate)return;B(e),l=s.ROTATE}else{if(!1===r.enablePan)return;Z(e),l=s.PAN}break;default:l=s.NONE}l!==s.NONE&&r.dispatchEvent(i)}(e))}function K(e){!1!==r.enabled&&("touch"===e.pointerType?function(e){switch(er(e),l){case s.TOUCH_ROTATE:if(!1===r.enableRotate)return;Y(e),r.update();break;case s.TOUCH_PAN:if(!1===r.enablePan)return;W(e),r.update();break;case s.TOUCH_DOLLY_PAN:if(!1===r.enableZoom&&!1===r.enablePan)return;r.enableZoom&&J(e),r.enablePan&&W(e),r.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===r.enableZoom&&!1===r.enableRotate)return;r.enableZoom&&J(e),r.enableRotate&&Y(e),r.update();break;default:l=s.NONE}}(e):function(e){if(!1!==r.enabled)switch(l){case s.ROTATE:if(!1===r.enableRotate)return;_.set(e.clientX,e.clientY),w.subVectors(_,b).multiplyScalar(r.rotateSpeed);let t=r.domElement;t&&(O(2*Math.PI*w.x/t.clientHeight),z(2*Math.PI*w.y/t.clientHeight)),b.copy(_),r.update();break;case s.DOLLY:var n,i;if(!1===r.enableZoom)return;(A.set(e.clientX,e.clientY),S.subVectors(A,T),S.y>0)?(n=C(),F(p/n)):S.y<0&&(i=C(),F(p*i)),T.copy(A),r.update();break;case s.PAN:if(!1===r.enablePan)return;k.set(e.clientX,e.clientY),E.subVectors(k,x).multiplyScalar(r.panSpeed),L(E.x,E.y),x.copy(k),r.update()}}(e))}function X(e){var t,n,i;(function(e){delete P[e.pointerId];for(let t=0;t0&&(n=C(),F(p/n)),r.update(),r.dispatchEvent(a)}}function ee(e){if(!1!==r.enabled&&!1!==r.enablePan){let t=!1;switch(e.code){case r.keys.UP:L(0,r.keyPanSpeed),t=!0;break;case r.keys.BOTTOM:L(0,-r.keyPanSpeed),t=!0;break;case r.keys.LEFT:L(r.keyPanSpeed,0),t=!0;break;case r.keys.RIGHT:L(-r.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),r.update())}}function et(e){!1!==r.enabled&&e.preventDefault()}function er(e){let t=P[e.pointerId];void 0===t&&(t=new o.I9Y,P[e.pointerId]=t),t.set(e.pageX,e.pageY)}function en(e){return P[(e.pointerId===N[0].pointerId?N[1]:N[0]).pointerId]}this.dollyIn=(e=C())=>{F(p*e),r.update()},this.dollyOut=(e=C())=>{F(p/e),r.update()},this.getScale=()=>p,this.setScale=e=>{F(e),r.update()},this.getZoomScale=()=>C(),void 0!==t&&this.connect(t),this.update()}}let b=a.forwardRef(({makeDefault:e,camera:t,regress:r,domElement:o,enableDamping:s=!0,keyEvents:l=!1,onChange:u,onStart:c,onEnd:d,...p},f)=>{let h=(0,i.A)(e=>e.invalidate),m=(0,i.A)(e=>e.camera),g=(0,i.A)(e=>e.gl),y=(0,i.A)(e=>e.events),b=(0,i.A)(e=>e.setEvents),_=(0,i.A)(e=>e.set),w=(0,i.A)(e=>e.get),x=(0,i.A)(e=>e.performance),k=t||m,E=o||y.connected||g.domElement,T=a.useMemo(()=>new v(k),[k]);return(0,i.C)(()=>{T.enabled&&T.update()},-1),a.useEffect(()=>(l&&T.connect(!0===l?E:l),T.connect(E),()=>void T.dispose()),[l,E,r,T,h]),a.useEffect(()=>{let e=e=>{h(),r&&x.regress(),u&&u(e)},t=e=>{c&&c(e)},n=e=>{d&&d(e)};return T.addEventListener("change",e),T.addEventListener("start",t),T.addEventListener("end",n),()=>{T.removeEventListener("start",t),T.removeEventListener("end",n),T.removeEventListener("change",e)}},[u,c,d,T,h,b]),a.useEffect(()=>{if(e){let e=w().controls;return _({controls:T}),()=>_({controls:e})}},[e,T]),a.createElement("primitive",(0,n.A)({ref:f,object:T,enableDamping:s},p))})},5220:(e,t,r)=>{"use strict";e.exports=r(1724)},5643:(e,t,r)=>{"use strict";e.exports=r(6115)},6115:(e,t,r)=>{"use strict";var n=r(2115),i=r(9033),a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=i.useSyncExternalStore,s=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var d=s(null);if(null===d.current){var p={hasValue:!1,value:null};d.current=p}else p=d.current;var f=o(e,(d=u(function(){function e(e){if(!l){if(l=!0,o=e,e=n(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,a(o,e))return t;var r=n(e);return void 0!==i&&i(t,r)?(o=e,t):(o=e,s=r)}var o,s,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]},[t,r,n,i]))[0],d[1]);return l(function(){p.hasValue=!0,p.value=f},[f]),c(f),f}},6166:(e,t,r)=>{"use strict";r.d(t,{p:()=>u});var n=r(2115),i=r(3264),a=r(2421);let o=e=>e,s=e=>{let t=(0,a.y)(e),r=e=>(function(e,t=o){let r=n.useSyncExternalStore(e.subscribe,()=>t(e.getState()),()=>t(e.getInitialState()));return n.useDebugValue(r),r})(t,e);return Object.assign(r,t),r},l=0,u=(e=>e?s(e):s)(e=>(i.h_9.onStart=(t,r,n)=>{e({active:!0,item:t,loaded:r,total:n,progress:(r-l)/(n-l)*100})},i.h_9.onLoad=()=>{e({active:!1})},i.h_9.onError=t=>e(e=>({errors:[...e.errors,t]})),i.h_9.onProgress=(t,r,n)=>{r===n&&(l=n),e({active:!0,item:t,loaded:r,total:n,progress:(r-l)/(n-l)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}))},6354:(e,t,r)=>{"use strict";r.d(t,{Af:()=>s,Nz:()=>i,u5:()=>l,y3:()=>d});var n=r(2115);function i(e,t,r){if(!e)return;if(!0===r(e))return e;let n=t?e.return:e.child;for(;n;){let e=i(n,t,r);if(e)return e;n=t?null:n.sibling}}function a(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}(()=>{var e,t;return"undefined"!=typeof window&&((null==(e=window.document)?void 0:e.createElement)||(null==(t=window.navigator)?void 0:t.product)==="ReactNative")})()?n.useLayoutEffect:n.useEffect;let o=a(n.createContext(null));class s extends n.Component{render(){return n.createElement(o.Provider,{value:this._reactInternals},this.props.children)}}function l(){let e=n.useContext(o);if(null===e)throw Error("its-fine: useFiber must be called within a !");let t=n.useId();return n.useMemo(()=>{for(let r of[e,null==e?void 0:e.alternate]){if(!r)continue;let e=i(r,!1,e=>{let r=e.memoizedState;for(;r;){if(r.memoizedState===t)return!0;r=r.next}});if(e)return e}},[e,t])}let u=Symbol.for("react.context"),c=e=>null!==e&&"object"==typeof e&&"$$typeof"in e&&e.$$typeof===u;function d(){let e=function(){let e=l(),[t]=n.useState(()=>new Map);t.clear();let r=e;for(;r;){let e=r.type;c(e)&&e!==o&&!t.has(e)&&t.set(e,n.use(a(e))),r=r.return}return t}();return n.useMemo(()=>Array.from(e.keys()).reduce((t,r)=>i=>n.createElement(t,null,n.createElement(r.Provider,{...i,value:e.get(r)})),e=>n.createElement(s,{...e})),[e])}},6500:(e,t)=>{"use strict";t.ConcurrentRoot=1,t.ContinuousEventPriority=8,t.DefaultEventPriority=32,t.DiscreteEventPriority=2},6629:(e,t,r)=>{"use strict";r.d(t,{D:()=>y});let n=0;function i(e){return e>>16&65535}function a(e){return 0===n?255&e:e>>8&255}function o(e){return 0===n?e>>8&255:255&e}function s(e,t){return 0===n?255&e|(255&t)<<8:255&t|(255&e)<<8}function l(e,t){return 65535&e|(65535&t)<<16}class u{constructor(){this.port=null,this.reader=null,this.writer=null,this.isOpen=!1,this.isUsing=!1,this.baudrate=1e6,this.packetStartTime=0,this.packetTimeout=0,this.txTimePerByte=0}async requestPort(){try{return this.port=await navigator.serial.requestPort(),!0}catch(e){return console.error("Error requesting serial port:",e),!1}}async openPort(){if(!this.port)return!1;try{return await this.port.open({baudRate:this.baudrate}),this.reader=this.port.readable.getReader(),this.writer=this.port.writable.getWriter(),this.isOpen=!0,this.txTimePerByte=1e3/this.baudrate*10,!0}catch(e){return console.error("Error opening port:",e),!1}}async closePort(){this.reader&&(await this.reader.releaseLock(),this.reader=null),this.writer&&(await this.writer.releaseLock(),this.writer=null),this.port&&this.isOpen&&(await this.port.close(),this.isOpen=!1)}async clearPort(){this.reader&&(await this.reader.releaseLock(),this.reader=this.port.readable.getReader())}setBaudRate(e){return this.baudrate=e,this.txTimePerByte=1e3/this.baudrate*10,!0}getBaudRate(){return this.baudrate}async writePort(e){if(!this.isOpen||!this.writer)return 0;try{return await this.writer.write(new Uint8Array(e)),e.length}catch(e){return console.error("Error writing to port:",e),0}}async readPort(e){if(!this.isOpen||!this.reader)return[];try{let t=[],r=performance.now();for(;t.length{setTimeout(()=>e({value:new Uint8Array,done:!1,timeout:!0}),100)}),i=await Promise.race([this.reader.read(),n]);if(i.timeout){if(performance.now()-r>500){console.log("readPort total timeout after 500ms");break}continue}if(i.done){console.log("Reader done, stream closed");break}if(0===i.value.length){if(await new Promise(e=>setTimeout(e,10)),performance.now()-r>500){console.log("readPort total timeout after 500ms");break}continue}let a=Array.from(i.value);if(t.push(...a),console.log(`Read ${a.length} bytes:`,a.map(e=>e.toString(16).padStart(2,"0")).join(" ")),t.length>=e)break}return t}catch(e){return console.error("Error reading from port:",e),[]}}setPacketTimeout(e){this.packetStartTime=this.getCurrentTime(),this.packetTimeout=this.txTimePerByte*e+32+2}setPacketTimeoutMillis(e){this.packetStartTime=this.getCurrentTime(),this.packetTimeout=e}isPacketTimeout(){return this.getTimeSinceStart()>this.packetTimeout&&(this.packetTimeout=0,!0)}getCurrentTime(){return performance.now()}getTimeSinceStart(){let e=this.getCurrentTime()-this.packetStartTime;return e<0&&(this.packetStartTime=this.getCurrentTime()),e}}class c{constructor(e=0){n=e,console.log(`PacketHandler initialized with protocol_end=${e} (STS/SMS=0, SCS=1)`)}getProtocolVersion(){return 1}getProtocolEnd(){return n}getTxRxResult(e){if(0===e)return"[TxRxResult] Communication success!";if(-1===e)return"[TxRxResult] Port is in use!";if(-2===e)return"[TxRxResult] Failed transmit instruction packet!";if(-3===e)return"[TxRxResult] Failed get status packet from device!";if(-4===e)return"[TxRxResult] Incorrect instruction packet!";else if(-5===e)return"[TxRxResult] Now receiving status packet!";else if(-6===e)return"[TxRxResult] There is no status packet!";else if(-7===e)return"[TxRxResult] Incorrect status packet!";else if(-9===e)return"[TxRxResult] Protocol does not support this function!";else return""}getRxPacketError(e){return 1&e?"[RxPacketError] Input voltage error!":2&e?"[RxPacketError] Angle sen error!":4&e?"[RxPacketError] Overheat error!":8&e?"[RxPacketError] OverEle error!":32&e?"[RxPacketError] Overload error!":""}async txPacket(e,t){let r=0,n=t[3]+4;if(e.isUsing)return -1;if(e.isUsing=!0,n>250)return e.isUsing=!1,-4;t[0]=255,t[1]=255;for(let e=2;e=n){let i=-1;for(let e=0;e253||t[3]>250){t.shift();continue}if(n!==t[3]+3+1){n=t[3]+3+1;continue}if(t.length0){t=t.slice(i);continue}}if(e.isPacketTimeout()){r=0===t.length?-6:-7;break}}return 0!==r?console.log(`rxPacket result: ${r}, packet: ${t.map(e=>"0x"+e.toString(16).padStart(2,"0")).join(" ")}`):console.debug(`rxPacket successful: ${t.map(e=>"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),[t,r]}async txRxPacket(e,t){let r=null,n=0,i=-2;try{if(e.isUsing)return console.log("Port is busy, cannot start new transaction"),[r,-1,n];if(console.log("Sending packet:",t.map(e=>"0x"+e.toString(16).padStart(2,"0")).join(" ")),i=await this.txPacket(e,t),console.log(`TX result: ${i}`),0!==i)return console.log(`TX failed with result: ${i}`),e.isUsing=!1,[r,i,n];if(254===t[2])return e.isUsing=!1,[r,i,n];if(2===t[4]){let r=t[6];e.setPacketTimeout(r+10),console.log(`Set READ packet timeout for ${r+10} bytes`)}else e.setPacketTimeout(10),console.log("Set standard packet timeout for 10 bytes");console.log("Receiving packet"),await e.clearPort();let[a,o]=await this.rxPacket(e);if(r=a,0!==o)return console.log(`Rx failed with result: ${o}`),e.isUsing=!1,[r,o,n];if(r.length<6)return console.log(`Received packet too short (${r.length} bytes)`),e.isUsing=!1,[r,-7,n];if(r[2]!==t[2])return console.log(`Received packet ID (${r[2]}) doesn't match sent ID (${t[2]})`),e.isUsing=!1,[r,-7,n];return n=r[4],e.isUsing=!1,[r,o,n]}catch(t){return console.error("Exception in txRxPacket:",t),e.isUsing=!1,[r,-3,n]}}async ping(e,t){let r=0,n=0;try{if(t>=254)return console.log(`Cannot ping broadcast ID ${t}`),[r,-9,n];let i=Array(6).fill(0);i[2]=t,i[3]=2,i[4]=1,console.log(`Pinging servo ID ${t}...`);let[a,o,l]=await this.txRxPacket(e,i);if(n=l,0===o){console.log(`Ping to servo ID ${t} succeeded, reading model number from address 3`);let[n,i,a]=await this.readTxRx(e,t,3,2);0===i&&n&&n.length>=2?(r=s(n[0],n[1]),console.log(`Model number read: ${r}`)):console.log(`Could not read model number: ${this.getTxRxResult(i)}`)}else console.log(`Ping failed with result: ${o}, error: ${n}`);return[r,o,n]}catch(e){return console.error("Exception in ping():",e),[0,-3,0]}}async readTxRx(e,t,r,n){if(t>=254)return console.log("Cannot read from broadcast ID"),[[],-9,0];let i=Array(8).fill(0);i[2]=t,i[3]=4,i[4]=2,i[5]=r,i[6]=n,console.log(`Reading ${n} bytes from address ${r} for servo ID ${t}`);let[a,o,s]=await this.txRxPacket(e,i);if(0!==o)return console.log(`Read failed with result: ${o}, error: ${s}`),[[],o,s];if(!a||a.length<5+n)return console.log(`Invalid response packet: expected at least ${5+n} bytes, got ${a?a.length:0}`),[[],-7,s];let l=[];console.log(`Response packet length: ${a.length}, extracting ${n} bytes from offset 5`),console.log(`Response data bytes: ${a.slice(5,5+n).map(e=>"0x"+e.toString(16).padStart(2,"0")).join(" ")}`);for(let e=0;e"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),[l,o,s]}async read1ByteTxRx(e,t,r){let[n,i,a]=await this.readTxRx(e,t,r,1);return[n.length>0?n[0]:0,i,a]}async read2ByteTxRx(e,t,r){let[n,i,a]=await this.readTxRx(e,t,r,2),o=0;return n.length>=2&&(o=s(n[0],n[1])),[o,i,a]}async read4ByteTxRx(e,t,r){let[n,i,a]=await this.readTxRx(e,t,r,4),o=0;if(n.length>=4){let e=s(n[0],n[1]),t=s(n[2],n[3]);o=l(e,t),console.log(`read4ByteTxRx: data=${n.map(e=>"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),console.log(` loword=${e} (0x${e.toString(16)}), hiword=${t} (0x${t.toString(16)})`),console.log(` value=${o} (0x${o.toString(16)})`)}return[o,i,a]}async writeTxRx(e,t,r,n,i){if(t>=254)return[-9,0];let a=Array(n+7).fill(0);a[2]=t,a[3]=n+3,a[4]=3,a[5]=r;for(let e=0;e"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),await e.clearPort(),await e.writePort(a)!==o)?-2:(e.setPacketTimeout((6+r)*i),0)}async syncWriteTxOnly(e,t,r,n,i){let a=Array(i+8).fill(0);a[2]=254,a[3]=i+4,a[4]=131,a[5]=t,a[6]=r;for(let e=0;e"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),await e.clearPort(),await e.writePort(a)!==o)?-2:0}formatPacketStructure(e){if(!e||e.length<4)return"Invalid packet (too short)";try{let t="";if(t+=`HEADER: ${e[0].toString(16).padStart(2,"0")} ${e[1].toString(16).padStart(2,"0")} | ID: ${e[2]} | LENGTH: ${e[3]} | `,e.length>=5&&(t+=`ERROR/INST: ${e[4].toString(16).padStart(2,"0")} | `),e.length>=6){t+="PARAMS: ";for(let r=5;r253||e.length!=e[3]+4)return -7;let t=0;for(let r=2;r"0x"+e.toString(16).padStart(2,"0")).join(" ")}`),this.isAvailableServiceID.size>1?await this.rxPacket():0}async txRxPacket(){try{if(this.port.isUsing)return console.log("Port is busy, cannot start sync read operation"),-1;console.log("Starting sync read TX/RX operation...");let e=await this.txPacket();if(0!==e)return console.log(`Sync read TX failed with result: ${e}`),e;return console.log("Attempting to receive a response..."),e=await this.rxPacket(),this.port.isUsing=!1,e}catch(e){return console.error("Exception in GroupSyncRead txRxPacket:",e),this.port.isUsing=!1,-3}}isAvailable(e,t,r){if(!this.isAvailableServiceID.has(e))return!1;let n=this.startAddress,i=n+this.dataLength-1;if(ti)return!1;let a=this.dataDict.get(e);return!!a&&0!==a.length}getData(e,t,r){if(!this.isAvailable(e,t,r))return 0;let n=this.startAddress,i=this.dataDict.get(e),a=t-n;switch(r){case 1:return i[a];case 2:return s(i[a],i[a+1]);case 4:return l(s(i[a],i[a+1]),s(i[a+2],i[a+3]));default:return 0}}}class p{constructor(e,t,r,n){this.port=e,this.ph=t,this.startAddress=r,this.dataLength=n,this.isAvailableServiceID=new Set,this.dataDict=new Map,this.param=[],this.clearParam()}makeParam(){for(let e of(this.param=[],this.isAvailableServiceID)){this.param.push(e);let t=this.dataDict.get(e);for(let e=0;e4095)throw Error(`Invalid position value ${t} for servo ${e}. Must be between 0 and 4095.`);let r=Math.round(t),[n,i]=await h.write2ByteTxRx(f,e,42,r);if(0!==n)throw Error(`Error writing position to servo ${e}: ${h.getTxRxResult(n)}, Error code: ${i}`);return"success"}catch(t){throw console.error(`Exception writing position to servo ${e}:`,t),Error(`Failed to write position to servo ${e}: ${t.message}`)}},writeTorqueEnable:async function(e,t){m();try{let[r,n]=await h.write1ByteTxRx(f,e,40,+!!t);if(0!==r)throw Error(`Error setting torque for servo ${e}: ${h.getTxRxResult(r)}, Error code: ${n}`);return"success"}catch(t){throw console.error(`Exception setting torque for servo ${e}:`,t),Error(`Exception setting torque for servo ${e}: ${t.message}`)}},writeAcceleration:async function(e,t){m();try{let r=Math.max(0,Math.min(254,Math.round(t))),[n,i]=await h.write1ByteTxRx(f,e,41,r);if(0!==n)throw Error(`Error writing acceleration to servo ${e}: ${h.getTxRxResult(n)}, Error code: ${i}`);return"success"}catch(t){throw console.error(`Exception writing acceleration to servo ${e}:`,t),Error(`Exception writing acceleration to servo ${e}: ${t.message}`)}},setWheelMode:async function(e){m();let t=!1;try{console.log(`Setting servo ${e} to wheel mode...`);let[r,n]=await h.write1ByteTxRx(f,e,55,0);if(0!==r)throw Error(`Failed to unlock servo ${e}: ${h.getTxRxResult(r)}, Error: ${n}`);t=!0;let[i,a]=await h.write1ByteTxRx(f,e,33,1);if(0!==i)throw Error(`Failed to set wheel mode for servo ${e}: ${h.getTxRxResult(i)}, Error: ${a}`);let[o,s]=await h.write1ByteTxRx(f,e,55,1);if(0!==o)throw Error(`Failed to lock servo ${e} after setting mode: ${h.getTxRxResult(o)}, Error: ${s}`);return t=!1,console.log(`Successfully set servo ${e} to wheel mode.`),"success"}catch(r){throw console.error(`Exception setting wheel mode for servo ${e}:`,r),t&&await g(e),Error(`Failed to set wheel mode for servo ${e}: ${r.message}`)}},setPositionMode:async function(e){m();let t=!1;try{console.log(`Setting servo ${e} back to position mode...`);let[r,n]=await h.write1ByteTxRx(f,e,55,0);if(0!==r)throw Error(`Failed to unlock servo ${e}: ${h.getTxRxResult(r)}, Error: ${n}`);t=!0;let[i,a]=await h.write1ByteTxRx(f,e,33,0);if(0!==i)throw Error(`Failed to set position mode for servo ${e}: ${h.getTxRxResult(i)}, Error: ${a}`);let[o,s]=await h.write1ByteTxRx(f,e,55,1);if(0!==o)throw Error(`Failed to lock servo ${e} after setting mode: ${h.getTxRxResult(o)}, Error: ${s}`);return t=!1,console.log(`Successfully set servo ${e} back to position mode.`),"success"}catch(r){throw console.error(`Exception setting position mode for servo ${e}:`,r),t&&await g(e),Error(`Failed to set position mode for servo ${e}: ${r.message}`)}},writeWheelSpeed:async function(e,t){m();try{let r=Math.max(-1e4,Math.min(1e4,Math.round(t))),n=32767&Math.abs(r);r<0&&(n|=32768);let[i,a]=await h.write2ByteTxRx(f,e,46,n);if(0!==i)throw Error(`Error writing wheel speed to servo ${e}: ${h.getTxRxResult(i)}, Error: ${a}`);return"success"}catch(t){throw console.error(`Exception writing wheel speed to servo ${e}:`,t),Error(`Exception writing wheel speed to servo ${e}: ${t.message}`)}},syncReadPositions:async function(e){if(m(),!Array.isArray(e)||0===e.length)return console.log("Sync Read: No servo IDs provided."),new Map;let t=new d(f,h,56,2),r=new Map,n=[];if(e.forEach(e=>{e>=1&&e<=252?t.addParam(e)?n.push(e):console.warn(`Sync Read: Failed to add param for servo ID ${e} (maybe duplicate or invalid).`):console.warn(`Sync Read: Invalid servo ID ${e} skipped.`)}),0===n.length)return console.log("Sync Read: No valid servo IDs to read."),new Map;try{let e=await t.txPacket();if(0!==e)throw Error(`Sync Read txPacket failed: ${h.getTxRxResult(e)}`);let i=await t.rxPacket();0!==i&&console.warn(`Sync Read rxPacket overall result: ${h.getTxRxResult(i)}. Checking individual servos.`);let a=[];if(n.forEach(e=>{if(t.isAvailable(e,56,2)){let n=t.getData(e,56,2);r.set(e,65535&n)}else a.push(e)}),a.length>0)throw Error(`Sync Read failed: Data not available for servo IDs: ${a.join(", ")}. Overall RX result: ${h.getTxRxResult(i)}`);return r}catch(e){throw console.error("Exception or failure during syncReadPositions:",e),Error(`Sync Read failed: ${e.message}`)}},syncWritePositions:async function(e){m();let t=new p(f,h,42,2),r=!1;for(let[n,i]of e instanceof Map?e.entries():Object.entries(e)){let e=parseInt(n,10);if(isNaN(e)||e<1||e>252)throw Error(`Invalid servo ID "${n}" in syncWritePositions.`);if(i<0||i>4095)throw Error(`Invalid position value ${i} for servo ${e} in syncWritePositions. Must be between 0 and 4095.`);let s=Math.round(i),l=[a(s),o(s)];t.addParam(e,l)?r=!0:console.warn(`Failed to add servo ${e} to sync write group (possibly duplicate).`)}if(!r)return console.log("Sync Write: No valid servo positions provided or added."),"success";try{let e=await t.txPacket();if(0!==e)throw Error(`Sync Write txPacket failed: ${h.getTxRxResult(e)}`);return"success"}catch(e){throw console.error("Exception during syncWritePositions:",e),Error(`Sync Write failed: ${e.message}`)}},syncWriteWheelSpeed:async function(e){m();let t=new p(f,h,46,2),r=!1;for(let[n,i]of e instanceof Map?e.entries():Object.entries(e)){let e=parseInt(n,10);if(isNaN(e)||e<1||e>252)throw Error(`Invalid servo ID "${n}" in syncWriteWheelSpeed.`);if(i<-1e4||i>1e4)throw Error(`Invalid speed value ${i} for servo ${e} in syncWriteWheelSpeed. Must be between -10000 and 10000.`);let s=Math.max(-1e4,Math.min(1e4,Math.round(i))),l=32767&Math.abs(s);s<0&&(l|=32768);let u=[a(l),o(l)];t.addParam(e,u)?r=!0:console.warn(`Failed to add servo ${e} to sync write speed group (possibly duplicate).`)}if(!r)return console.log("Sync Write Speed: No valid servo speeds provided or added."),"success";try{let e=await t.txPacket();if(console.log("hi"),0!==e)throw Error(`Sync Write Speed txPacket failed: ${h.getTxRxResult(e)}`);return"success"}catch(e){throw console.error("Exception during syncWriteWheelSpeed:",e),Error(`Sync Write Speed failed: ${e.message}`)}},setBaudRate:async function(e,t){if(m(),e<1||e>252)throw Error(`Invalid servo ID provided: ${e}. Must be between 1 and 252.`);if(t<0||t>7)throw Error(`Invalid baudRateIndex: ${t}. Must be between 0 and 7.`);let r=!1;try{console.log(`Setting baud rate for servo ${e}: Index=${t}`);let[n,i]=await h.write1ByteTxRx(f,e,55,0);if(0!==n)throw Error(`Failed to unlock servo ${e}: ${h.getTxRxResult(n)}, Error: ${i}`);r=!0;let[a,o]=await h.write1ByteTxRx(f,e,6,t);if(0!==a)throw Error(`Failed to write baud rate index ${t} to servo ${e}: ${h.getTxRxResult(a)}, Error: ${o}`);let[s,l]=await h.write1ByteTxRx(f,e,55,1);if(0!==s)throw Error(`Failed to lock servo ${e} after setting baud rate: ${h.getTxRxResult(s)}, Error: ${l}.`);return r=!1,console.log(`Successfully set baud rate for servo ${e}. Index: ${t}. Remember to potentially reconnect with the new baud rate.`),"success"}catch(t){throw console.error(`Exception during setBaudRate for servo ID ${e}:`,t),r&&await g(e),Error(`Failed to set baud rate for servo ${e}: ${t.message}`)}},setServoId:async function(e,t){if(m(),e<1||e>252||t<1||t>252)throw Error(`Invalid servo ID provided. Current: ${e}, New: ${t}. Must be between 1 and 252.`);if(e===t)return console.log(`Servo ID is already ${t}. No change needed.`),"success";let r=!1,n=!1;try{console.log(`Setting servo ID: From ${e} to ${t}`);let[i,a]=await h.write1ByteTxRx(f,e,55,0);if(0!==i)throw Error(`Failed to unlock servo ${e}: ${h.getTxRxResult(i)}, Error: ${a}`);r=!0;let[o,s]=await h.write1ByteTxRx(f,e,5,t);if(0!==o)throw Error(`Failed to write new ID ${t} to servo ${e}: ${h.getTxRxResult(o)}, Error: ${s}`);n=!0;let[l,u]=await h.write1ByteTxRx(f,t,55,1);if(0!==l)throw Error(`Failed to lock servo with new ID ${t}: ${h.getTxRxResult(l)}, Error: ${u}. Configuration might be incomplete.`);return r=!1,console.log(`Successfully set servo ID from ${e} to ${t}. Remember to use the new ID for future commands.`),"success"}catch(i){if(console.error(`Exception during setServoId for current ID ${e}:`,i),r){let r=n?t:e;console.warn(`Attempting to re-lock servo using ID ${r}...`),await g(r)}throw Error(`Failed to set servo ID from ${e} to ${t}: ${i.message}`)}}}},6892:(e,t)=>{"use strict";function r(e,t){var r=e.length;for(e.push(t);0>>1,i=e[n];if(0>>1;na(l,r))ua(c,l)?(e[n]=c,e[u]=r,n=u):(e[n]=l,e[s]=r,n=s);else if(ua(c,r))e[n]=c,e[u]=r,n=u;else break}}return t}function a(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,u=l.now();t.unstable_now=function(){return l.now()-u}}var c=[],d=[],p=1,f=null,h=3,m=!1,g=!1,y=!1,v="function"==typeof setTimeout?setTimeout:null,b="function"==typeof clearTimeout?clearTimeout:null,_="undefined"!=typeof setImmediate?setImmediate:null;function w(e){for(var t=n(d);null!==t;){if(null===t.callback)i(d);else if(t.startTime<=e)i(d),t.sortIndex=t.expirationTime,r(c,t);else break;t=n(d)}}function x(e){if(y=!1,w(e),!g)if(null!==n(c))g=!0,N();else{var t=n(d);null!==t&&P(x,t.startTime-e)}}var k=!1,E=-1,T=5,A=-1;function S(){return!(t.unstable_now()-Ae&&S());){var s=f.callback;if("function"==typeof s){f.callback=null,h=f.priorityLevel;var l=s(f.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof l){f.callback=l,w(e),r=!0;break t}f===n(c)&&i(c),w(e)}else i(c);f=n(c)}if(null!==f)r=!0;else{var u=n(d);null!==u&&P(x,u.startTime-e),r=!1}}break e}finally{f=null,h=a,m=!1}}}finally{r?o():k=!1}}}if("function"==typeof _)o=function(){_(j)};else if("undefined"!=typeof MessageChannel){var I=new MessageChannel,R=I.port2;I.port1.onmessage=j,o=function(){R.postMessage(null)}}else o=function(){v(j,0)};function N(){k||(k=!0,o())}function P(e,r){E=v(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||m||(g=!0,N())},t.unstable_forceFrameRate=function(e){0>e||125o?(e.sortIndex=a,r(d,e),null===n(c)&&e===n(d)&&(y?(b(E),E=-1):y=!0,P(x,a-o))):(e.sortIndex=s,r(c,e),g||m||(g=!0,N())),e},t.unstable_shouldYield=S,t.unstable_wrapCallback=function(e){var t=h;return function(){var r=h;h=t;try{return e.apply(this,arguments)}finally{h=r}}}},7558:(e,t,r)=>{"use strict";r.d(t,{Hl:()=>p});var n=r(3967),i=r(2115),a=r(7431);function o(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}let s=["x","y","top","bottom","left","right","width","height"],l=(e,t)=>s.every(r=>e[r]===t[r]);var u=r(6354),c=r(5155);function d({ref:e,children:t,fallback:r,resize:s,style:u,gl:d,events:p=n.f,eventSource:f,eventPrefix:h,shadows:m,linear:g,flat:y,legacy:v,orthographic:b,frameloop:_,dpr:w,performance:x,raycaster:k,camera:E,scene:T,onPointerMissed:A,onCreated:S,...j}){i.useMemo(()=>(0,n.e)(a),[]);let I=(0,n.u)(),[R,N]=function({debounce:e,scroll:t,polyfill:r,offsetSize:n}={debounce:0,scroll:!1,offsetSize:!1}){var a,s,u;let c=r||("undefined"==typeof window?class{}:window.ResizeObserver);if(!c)throw Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");let[d,p]=(0,i.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),f=(0,i.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:d,orientationHandler:null}),h=e?"number"==typeof e?e:e.scroll:null,m=e?"number"==typeof e?e:e.resize:null,g=(0,i.useRef)(!1);(0,i.useEffect)(()=>(g.current=!0,()=>void(g.current=!1)));let[y,v,b]=(0,i.useMemo)(()=>{let e=()=>{if(!f.current.element)return;let{left:e,top:t,width:r,height:i,bottom:a,right:o,x:s,y:u}=f.current.element.getBoundingClientRect(),c={left:e,top:t,width:r,height:i,bottom:a,right:o,x:s,y:u};f.current.element instanceof HTMLElement&&n&&(c.height=f.current.element.offsetHeight,c.width=f.current.element.offsetWidth),Object.freeze(c),g.current&&!l(f.current.lastBounds,c)&&p(f.current.lastBounds=c)};return[e,m?o(e,m):e,h?o(e,h):e]},[p,n,h,m]);function _(){f.current.scrollContainers&&(f.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",b,!0)),f.current.scrollContainers=null),f.current.resizeObserver&&(f.current.resizeObserver.disconnect(),f.current.resizeObserver=null),f.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",f.current.orientationHandler))}function w(){f.current.element&&(f.current.resizeObserver=new c(b),f.current.resizeObserver.observe(f.current.element),t&&f.current.scrollContainers&&f.current.scrollContainers.forEach(e=>e.addEventListener("scroll",b,{capture:!0,passive:!0})),f.current.orientationHandler=()=>{b()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",f.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",f.current.orientationHandler))}return a=b,s=!!t,(0,i.useEffect)(()=>{if(s)return window.addEventListener("scroll",a,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",a,!0)},[a,s]),u=v,(0,i.useEffect)(()=>(window.addEventListener("resize",u),()=>void window.removeEventListener("resize",u)),[u]),(0,i.useEffect)(()=>{_(),w()},[t,b,v]),(0,i.useEffect)(()=>_,[]),[e=>{e&&e!==f.current.element&&(_(),f.current.element=e,f.current.scrollContainers=function e(t){let r=[];if(!t||t===document.body)return r;let{overflow:n,overflowX:i,overflowY:a}=window.getComputedStyle(t);return[n,i,a].some(e=>"auto"===e||"scroll"===e)&&r.push(t),[...r,...e(t.parentElement)]}(e),w())},d,y]}({scroll:!0,debounce:{scroll:50,resize:0},...s}),P=i.useRef(null),C=i.useRef(null);i.useImperativeHandle(e,()=>P.current);let O=(0,n.a)(A),[z,M]=i.useState(!1),[$,L]=i.useState(!1);if(z)throw z;if($)throw $;let F=i.useRef(null);(0,n.b)(()=>{let e=P.current;N.width>0&&N.height>0&&e&&(F.current||(F.current=(0,n.c)(e)),async function(){await F.current.configure({gl:d,scene:T,events:p,shadows:m,linear:g,flat:y,legacy:v,orthographic:b,frameloop:_,dpr:w,performance:x,raycaster:k,camera:E,size:N,onPointerMissed:(...e)=>null==O.current?void 0:O.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(f?(0,n.i)(f)?f.current:f:C.current),h&&e.setEvents({compute:(e,t)=>{let r=e[h+"X"],n=e[h+"Y"];t.pointer.set(r/t.size.width*2-1,-(2*(n/t.size.height))+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==S||S(e)}}),F.current.render((0,c.jsx)(I,{children:(0,c.jsx)(n.E,{set:L,children:(0,c.jsx)(i.Suspense,{fallback:(0,c.jsx)(n.B,{set:M}),children:null!=t?t:null})})}))}())}),i.useEffect(()=>{let e=P.current;if(e)return()=>(0,n.d)(e)},[]);let D=f?"none":"auto";return(0,c.jsx)("div",{ref:C,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:D,...u},...j,children:(0,c.jsx)("div",{ref:R,style:{width:"100%",height:"100%"},children:(0,c.jsx)("canvas",{ref:P,style:{display:"block"},children:r})})})}function p(e){return(0,c.jsx)(u.Af,{children:(0,c.jsx)(d,{...e})})}r(1933),r(5220),r(2407)},7610:(e,t)=>{t.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,c=-7,d=r?i-1:0,p=r?-1:1,f=e[t+d];for(d+=p,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+d],d+=p,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+d],d+=p,c-=8);if(0===a)a=1-u;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=u}return(f?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,u=8*a-i-1,c=(1<>1,p=5960464477539062e-23*(23===i),f=n?0:a-1,h=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+d>=1?t+=p/l:t+=p*Math.pow(2,1-d),t*l>=2&&(o++,l/=2),o+d>=c?(s=0,o=c):o+d>=1?(s=(t*l-1)*Math.pow(2,i),o+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&s,f+=h,s/=256,i-=8);for(o=o<0;e[r+f]=255&o,f+=h,o/=256,u-=8);e[r+f-h]|=128*m}},7719:(e,t)=>{"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,a=l(e),o=a[0],s=a[1],u=new i((o+s)*3/4-s),c=0,d=s>0?o-4:o;for(r=0;r>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,u[c++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},8375:()=>{},8764:(e,t,r)=>{"use strict";let n;r.d(t,{mD:()=>X,H4:()=>W,d1:()=>Z});var i=r(2232);let a=Symbol("Let zodToJsonSchema decide on which parser to use"),o={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref"},s=e=>"string"==typeof e?{...o,name:e}:{...o,...e},l=e=>{let t=s(e),r=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,r])=>[r._def,{def:r._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}};var u=r(1153);function c(e,t,r,n){n?.errorMessages&&r&&(e.errorMessage={...e.errorMessage,[t]:r})}function d(e,t,r,n,i){e[t]=r,c(e,t,n,i)}function p(e,t){return R(e.type._def,t)}let f=(e,t)=>R(e.innerType._def,t),h=(e,t)=>{let r={type:"integer",format:"unix-time"};if("openApi3"===t.target)return r;for(let n of e.checks)switch(n.kind){case"min":d(r,"minimum",n.value,n.message,t);break;case"max":d(r,"maximum",n.value,n.message,t)}return r},m=e=>(!("type"in e)||"string"!==e.type)&&"allOf"in e,g={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===n&&(n=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),n),ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function y(e,t){let r={type:"string"};if(e.checks)for(let n of e.checks)switch(n.kind){case"min":d(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t);break;case"max":d(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"email":switch(t.emailStrategy){case"format:email":_(r,"email",n.message,t);break;case"format:idn-email":_(r,"idn-email",n.message,t);break;case"pattern:zod":w(r,g.email,n.message,t)}break;case"url":_(r,"uri",n.message,t);break;case"uuid":_(r,"uuid",n.message,t);break;case"regex":w(r,n.regex,n.message,t);break;case"cuid":w(r,g.cuid,n.message,t);break;case"cuid2":w(r,g.cuid2,n.message,t);break;case"startsWith":w(r,RegExp(`^${v(n.value,t)}`),n.message,t);break;case"endsWith":w(r,RegExp(`${v(n.value,t)}$`),n.message,t);break;case"datetime":_(r,"date-time",n.message,t);break;case"date":_(r,"date",n.message,t);break;case"time":_(r,"time",n.message,t);break;case"duration":_(r,"duration",n.message,t);break;case"length":d(r,"minLength","number"==typeof r.minLength?Math.max(r.minLength,n.value):n.value,n.message,t),d(r,"maxLength","number"==typeof r.maxLength?Math.min(r.maxLength,n.value):n.value,n.message,t);break;case"includes":w(r,RegExp(v(n.value,t)),n.message,t);break;case"ip":"v6"!==n.version&&_(r,"ipv4",n.message,t),"v4"!==n.version&&_(r,"ipv6",n.message,t);break;case"base64url":w(r,g.base64url,n.message,t);break;case"jwt":w(r,g.jwt,n.message,t);break;case"cidr":"v6"!==n.version&&w(r,g.ipv4Cidr,n.message,t),"v4"!==n.version&&w(r,g.ipv6Cidr,n.message,t);break;case"emoji":w(r,g.emoji(),n.message,t);break;case"ulid":w(r,g.ulid,n.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":_(r,"binary",n.message,t);break;case"contentEncoding:base64":d(r,"contentEncoding","base64",n.message,t);break;case"pattern:zod":w(r,g.base64,n.message,t)}break;case"nanoid":w(r,g.nanoid,n.message,t)}return r}function v(e,t){return"escape"===t.patternStrategy?function(e){let t="";for(let r=0;re.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&n.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...r&&n.errorMessages&&{errorMessage:{format:r}}})):d(e,"format",t,r,n)}function w(e,t,r,n){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&n.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:x(t,n),...r&&n.errorMessages&&{errorMessage:{pattern:r}}})):d(e,"pattern",x(t,n),r,n)}function x(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;let r={i:e.flags.includes("i"),m:e.flags.includes("m"),s:e.flags.includes("s")},n=r.i?e.source.toLowerCase():e.source,i="",a=!1,o=!1,s=!1;for(let e=0;e({...r,[n]:R(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??{}}),{}),additionalProperties:t.rejectedAdditionalProperties};let r={type:"object",additionalProperties:R(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return r;if(e.keyType?._def.typeName===u.kY.ZodString&&e.keyType._def.checks?.length){let{type:n,...i}=y(e.keyType._def,t);return{...r,propertyNames:i}}if(e.keyType?._def.typeName===u.kY.ZodEnum)return{...r,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===u.kY.ZodBranded&&e.keyType._def.type._def.typeName===u.kY.ZodString&&e.keyType._def.type._def.checks?.length){let{type:n,...i}=p(e.keyType._def,t);return{...r,propertyNames:i}}return r}let E={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"},T=(e,t)=>{let r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,r)=>R(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${r}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return r.length?{anyOf:r}:void 0},A=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return R(e.innerType._def,t);let r=R(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return r?{anyOf:[{not:{}},r]}:{}},S=(e,t)=>{if("input"===t.pipeStrategy)return R(e.in._def,t);if("output"===t.pipeStrategy)return R(e.out._def,t);let r=R(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=R(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(e=>void 0!==e)}},j=(e,t)=>R(e.innerType._def,t),I=(e,t,r)=>{switch(t){case u.kY.ZodString:return y(e,r);case u.kY.ZodNumber:return function(e,t){let r={type:"number"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"int":r.type="integer",c(r,"type",n.message,t);break;case"min":"jsonSchema7"===t.target?n.inclusive?d(r,"minimum",n.value,n.message,t):d(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),d(r,"minimum",n.value,n.message,t));break;case"max":"jsonSchema7"===t.target?n.inclusive?d(r,"maximum",n.value,n.message,t):d(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),d(r,"maximum",n.value,n.message,t));break;case"multipleOf":d(r,"multipleOf",n.value,n.message,t)}return r}(e,r);case u.kY.ZodObject:return function(e,t){let r="openAi"===t.target,n={type:"object",properties:{}},i=[],a=e.shape();for(let e in a){let o=a[e];if(void 0===o||void 0===o._def)continue;let s=function(e){try{return e.isOptional()}catch{return!0}}(o);s&&r&&(o instanceof u.Ii&&(o=o._def.innerType),o.isNullable()||(o=o.nullable()),s=!1);let l=R(o._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==l&&(n.properties[e]=l,s||i.push(e))}i.length&&(n.required=i);let o=function(e,t){if("ZodNever"!==e.catchall._def.typeName)return R(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==o&&(n.additionalProperties=o),n}(e,r);case u.kY.ZodBigInt:return function(e,t){let r={type:"integer",format:"int64"};if(!e.checks)return r;for(let n of e.checks)switch(n.kind){case"min":"jsonSchema7"===t.target?n.inclusive?d(r,"minimum",n.value,n.message,t):d(r,"exclusiveMinimum",n.value,n.message,t):(n.inclusive||(r.exclusiveMinimum=!0),d(r,"minimum",n.value,n.message,t));break;case"max":"jsonSchema7"===t.target?n.inclusive?d(r,"maximum",n.value,n.message,t):d(r,"exclusiveMaximum",n.value,n.message,t):(n.inclusive||(r.exclusiveMaximum=!0),d(r,"maximum",n.value,n.message,t));break;case"multipleOf":d(r,"multipleOf",n.value,n.message,t)}return r}(e,r);case u.kY.ZodBoolean:return{type:"boolean"};case u.kY.ZodDate:return function e(t,r,n){let i=n??r.dateStrategy;if(Array.isArray(i))return{anyOf:i.map((n,i)=>e(t,r,n))};switch(i){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return h(t,r)}}(e,r);case u.kY.ZodUndefined:return{not:{}};case u.kY.ZodNull:return"openApi3"===r.target?{enum:["null"],nullable:!0}:{type:"null"};case u.kY.ZodArray:return function(e,t){let r={type:"array"};return e.type?._def&&e.type?._def?.typeName!==u.kY.ZodAny&&(r.items=R(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&d(r,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&d(r,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&(d(r,"minItems",e.exactLength.value,e.exactLength.message,t),d(r,"maxItems",e.exactLength.value,e.exactLength.message,t)),r}(e,r);case u.kY.ZodUnion:case u.kY.ZodDiscriminatedUnion:return function(e,t){if("openApi3"===t.target)return T(e,t);let r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(e=>e._def.typeName in E&&(!e._def.checks||!e._def.checks.length))){let e=r.reduce((e,t)=>{let r=E[t._def.typeName];return r&&!e.includes(r)?[...e,r]:e},[]);return{type:e.length>1?e:e[0]}}if(r.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){let e=r.reduce((e,t)=>{let r=typeof t._def.value;switch(r){case"string":case"number":case"boolean":return[...e,r];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===r.length){let t=e.filter((e,t,r)=>r.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:r.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(r.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:r.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return T(e,t)}(e,r);case u.kY.ZodIntersection:return function(e,t){let r=[R(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),R(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(e=>!!e),n="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0,i=[];return r.forEach(e=>{if(m(e))i.push(...e.allOf),void 0===e.unevaluatedProperties&&(n=void 0);else{let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){let{additionalProperties:r,...n}=e;t=n}else n=void 0;i.push(t)}}),i.length?{allOf:i,...n}:void 0}(e,r);case u.kY.ZodTuple:return function(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,r)=>R(e._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:R(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,r)=>R(e._def,{...t,currentPath:[...t.currentPath,"items",`${r}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])}}(e,r);case u.kY.ZodRecord:return k(e,r);case u.kY.ZodLiteral:return function(e,t){let r=typeof e.value;return"bigint"!==r&&"number"!==r&&"boolean"!==r&&"string"!==r?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===r?"integer":r,enum:[e.value]}:{type:"bigint"===r?"integer":r,const:e.value}}(e,r);case u.kY.ZodEnum:return{type:"string",enum:Array.from(e.values)};case u.kY.ZodNativeEnum:return function(e){let t=e.values,r=Object.keys(e.values).filter(e=>"number"!=typeof t[t[e]]).map(e=>t[e]),n=Array.from(new Set(r.map(e=>typeof e)));return{type:1===n.length?"string"===n[0]?"string":"number":["string","number"],enum:r}}(e);case u.kY.ZodNullable:return function(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:E[e.innerType._def.typeName],nullable:!0}:{type:[E[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){let r=R(e.innerType._def,{...t,currentPath:[...t.currentPath]});return r&&"$ref"in r?{allOf:[r],nullable:!0}:r&&{...r,nullable:!0}}let r=R(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}(e,r);case u.kY.ZodOptional:return A(e,r);case u.kY.ZodMap:return function(e,t){return"record"===t.mapStrategy?k(e,t):{type:"array",maxItems:125,items:{type:"array",items:[R(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||{},R(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||{}],minItems:2,maxItems:2}}}(e,r);case u.kY.ZodSet:return function(e,t){let r={type:"array",uniqueItems:!0,items:R(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&d(r,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&d(r,"maxItems",e.maxSize.value,e.maxSize.message,t),r}(e,r);case u.kY.ZodLazy:return()=>e.getter()._def;case u.kY.ZodPromise:return R(e.type._def,r);case u.kY.ZodNaN:case u.kY.ZodNever:return{not:{}};case u.kY.ZodEffects:return function(e,t){return"input"===t.effectStrategy?R(e.schema._def,t):{}}(e,r);case u.kY.ZodAny:case u.kY.ZodUnknown:return{};case u.kY.ZodDefault:return function(e,t){return{...R(e.innerType._def,t),default:e.defaultValue()}}(e,r);case u.kY.ZodBranded:return p(e,r);case u.kY.ZodReadonly:return j(e,r);case u.kY.ZodCatch:return f(e,r);case u.kY.ZodPipeline:return S(e,r);case u.kY.ZodFunction:case u.kY.ZodVoid:case u.kY.ZodSymbol:default:return}};function R(e,t,r=!1){let n=t.seen.get(e);if(t.override){let i=t.override?.(e,t,n,r);if(i!==a)return i}if(n&&!r){let e=N(n,t);if(void 0!==e)return e}let i={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,i);let o=I(e,e.typeName,t),s="function"==typeof o?R(o(),t):o;if(s&&C(e,t,s),t.postProcess){let r=t.postProcess(s,e,t);return i.jsonSchema=s,r}return i.jsonSchema=s,s}let N=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:P(t.currentPath,e.path)};case"none":case"seen":if(e.path.lengtht.currentPath[r]===e))return console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),{};return"seen"===t.$refStrategy?{}:void 0}},P=(e,t)=>{let r=0;for(;r(e.description&&(r.description=e.description,t.markdownDescription&&(r.markdownDescription=e.description)),r),O=(e,t)=>{let r=l(t),n="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,n])=>({...e,[t]:R(n._def,{...r,currentPath:[...r.basePath,r.definitionPath,t]},!0)??{}}),{}):void 0,i="string"==typeof t?t:t?.nameStrategy==="title"?void 0:t?.name,a=R(e._def,void 0===i?r:{...r,currentPath:[...r.basePath,r.definitionPath,i]},!1)??{},o="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==o&&(a.title=o);let s=void 0===i?n?{...a,[r.definitionPath]:n}:a:{$ref:[..."relative"===r.$refStrategy?[]:r.basePath,r.definitionPath,i].join("/"),[r.definitionPath]:{...n,[i]:a}};return"jsonSchema7"===r.target?s.$schema="http://json-schema.org/draft-07/schema#":("jsonSchema2019-09"===r.target||"openAi"===r.target)&&(s.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===r.target&&("anyOf"in s||"oneOf"in s||"allOf"in s||"type"in s&&Array.isArray(s.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),s};var z={code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},M={code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},$={code:"4",name:"assistant_message",parse:e=>{if(null==e||"object"!=typeof e||!("id"in e)||!("role"in e)||!("content"in e)||"string"!=typeof e.id||"string"!=typeof e.role||"assistant"!==e.role||!Array.isArray(e.content)||!e.content.every(e=>null!=e&&"object"==typeof e&&"type"in e&&"text"===e.type&&"text"in e&&null!=e.text&&"object"==typeof e.text&&"value"in e.text&&"string"==typeof e.text.value))throw Error('"assistant_message" parts expect an object with an "id", "role", and "content" property.');return{type:"assistant_message",value:e}}},L={code:"5",name:"assistant_control_data",parse:e=>{if(null==e||"object"!=typeof e||!("threadId"in e)||!("messageId"in e)||"string"!=typeof e.threadId||"string"!=typeof e.messageId)throw Error('"assistant_control_data" parts expect an object with a "threadId" and "messageId" property.');return{type:"assistant_control_data",value:{threadId:e.threadId,messageId:e.messageId}}}},F={code:"6",name:"data_message",parse:e=>{if(null==e||"object"!=typeof e||!("role"in e)||!("data"in e)||"string"!=typeof e.role||"data"!==e.role)throw Error('"data_message" parts expect an object with a "role" and "data" property.');return{type:"data_message",value:e}}},D=[z,M,$,L,F],U={[z.code]:z,[M.code]:M,[$.code]:$,[L.code]:L,[F.code]:F};z.name,z.code,M.name,M.code,$.name,$.code,L.name,L.code,F.name,F.code;var B=D.map(e=>e.code);function Z(e){if(void 0===e)return{value:void 0,state:"undefined-input"};let t=(0,i.N8)({text:e});return t.success?{value:t.value,state:"successful-parse"}:(t=(0,i.N8)({text:function(e){let t=["ROOT"],r=-1,n=null;function i(e,i,a){switch(e){case'"':r=i,t.pop(),t.push(a),t.push("INSIDE_STRING");break;case"f":case"t":case"n":r=i,n=i,t.pop(),t.push(a),t.push("INSIDE_LITERAL");break;case"-":t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":r=i,t.pop(),t.push(a),t.push("INSIDE_NUMBER");break;case"{":r=i,t.pop(),t.push(a),t.push("INSIDE_OBJECT_START");break;case"[":r=i,t.pop(),t.push(a),t.push("INSIDE_ARRAY_START")}}function a(e,n){switch(e){case",":t.pop(),t.push("INSIDE_OBJECT_AFTER_COMMA");break;case"}":r=n,t.pop()}}function o(e,n){switch(e){case",":t.pop(),t.push("INSIDE_ARRAY_AFTER_COMMA");break;case"]":r=n,t.pop()}}for(let s=0;s=0;r--)switch(t[r]){case"INSIDE_STRING":s+='"';break;case"INSIDE_OBJECT_KEY":case"INSIDE_OBJECT_AFTER_KEY":case"INSIDE_OBJECT_AFTER_COMMA":case"INSIDE_OBJECT_START":case"INSIDE_OBJECT_BEFORE_VALUE":case"INSIDE_OBJECT_AFTER_VALUE":s+="}";break;case"INSIDE_ARRAY_START":case"INSIDE_ARRAY_AFTER_COMMA":case"INSIDE_ARRAY_AFTER_VALUE":s+="]";break;case"INSIDE_LITERAL":{let t=e.substring(n,e.length);"true".startsWith(t)?s+="true".slice(t.length):"false".startsWith(t)?s+="false".slice(t.length):"null".startsWith(t)&&(s+="null".slice(t.length))}}return s}(e)})).success?{value:t.value,state:"repaired-parse"}:{value:void 0,state:"failed-parse"}}var q=[{code:"0",name:"text",parse:e=>{if("string"!=typeof e)throw Error('"text" parts expect a string value.');return{type:"text",value:e}}},{code:"2",name:"data",parse:e=>{if(!Array.isArray(e))throw Error('"data" parts expect an array value.');return{type:"data",value:e}}},{code:"3",name:"error",parse:e=>{if("string"!=typeof e)throw Error('"error" parts expect a string value.');return{type:"error",value:e}}},{code:"8",name:"message_annotations",parse:e=>{if(!Array.isArray(e))throw Error('"message_annotations" parts expect an array value.');return{type:"message_annotations",value:e}}},{code:"9",name:"tool_call",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName||!("args"in e)||"object"!=typeof e.args)throw Error('"tool_call" parts expect an object with a "toolCallId", "toolName", and "args" property.');return{type:"tool_call",value:e}}},{code:"a",name:"tool_result",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("result"in e))throw Error('"tool_result" parts expect an object with a "toolCallId" and a "result" property.');return{type:"tool_result",value:e}}},{code:"b",name:"tool_call_streaming_start",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("toolName"in e)||"string"!=typeof e.toolName)throw Error('"tool_call_streaming_start" parts expect an object with a "toolCallId" and "toolName" property.');return{type:"tool_call_streaming_start",value:e}}},{code:"c",name:"tool_call_delta",parse:e=>{if(null==e||"object"!=typeof e||!("toolCallId"in e)||"string"!=typeof e.toolCallId||!("argsTextDelta"in e)||"string"!=typeof e.argsTextDelta)throw Error('"tool_call_delta" parts expect an object with a "toolCallId" and "argsTextDelta" property.');return{type:"tool_call_delta",value:e}}},{code:"d",name:"finish_message",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_message" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:Number.NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:Number.NaN}),{type:"finish_message",value:t}}},{code:"e",name:"finish_step",parse:e=>{if(null==e||"object"!=typeof e||!("finishReason"in e)||"string"!=typeof e.finishReason)throw Error('"finish_step" parts expect an object with a "finishReason" property.');let t={finishReason:e.finishReason,isContinued:!1};return"usage"in e&&null!=e.usage&&"object"==typeof e.usage&&"promptTokens"in e.usage&&"completionTokens"in e.usage&&(t.usage={promptTokens:"number"==typeof e.usage.promptTokens?e.usage.promptTokens:Number.NaN,completionTokens:"number"==typeof e.usage.completionTokens?e.usage.completionTokens:Number.NaN}),"isContinued"in e&&"boolean"==typeof e.isContinued&&(t.isContinued=e.isContinued),{type:"finish_step",value:t}}},{code:"f",name:"start_step",parse:e=>{if(null==e||"object"!=typeof e||!("messageId"in e)||"string"!=typeof e.messageId)throw Error('"start_step" parts expect an object with an "id" property.');return{type:"start_step",value:{messageId:e.messageId}}}},{code:"g",name:"reasoning",parse:e=>{if("string"!=typeof e)throw Error('"reasoning" parts expect a string value.');return{type:"reasoning",value:e}}},{code:"h",name:"source",parse:e=>{if(null==e||"object"!=typeof e)throw Error('"source" parts expect a Source object.');return{type:"source",value:e}}},{code:"i",name:"redacted_reasoning",parse:e=>{if(null==e||"object"!=typeof e||!("data"in e)||"string"!=typeof e.data)throw Error('"redacted_reasoning" parts expect an object with a "data" property.');return{type:"redacted_reasoning",value:{data:e.data}}}},{code:"j",name:"reasoning_signature",parse:e=>{if(null==e||"object"!=typeof e||!("signature"in e)||"string"!=typeof e.signature)throw Error('"reasoning_signature" parts expect an object with a "signature" property.');return{type:"reasoning_signature",value:{signature:e.signature}}}},{code:"k",name:"file",parse:e=>{if(null==e||"object"!=typeof e||!("data"in e)||"string"!=typeof e.data||!("mimeType"in e)||"string"!=typeof e.mimeType)throw Error('"file" parts expect an object with a "data" and "mimeType" property.');return{type:"file",value:e}}}],V=Object.fromEntries(q.map(e=>[e.code,e]));Object.fromEntries(q.map(e=>[e.name,e.code]));var H=q.map(e=>e.code),Y=e=>{let t=e.indexOf(":");if(-1===t)throw Error("Failed to parse stream string. No separator found.");let r=e.slice(0,t);if(!H.includes(r))throw Error(`Failed to parse stream string. Invalid code ${r}.`);let n=JSON.parse(e.slice(t+1));return V[r].parse(n)};function W(e,t){let r=q.find(t=>t.name===e);if(!r)throw Error(`Invalid stream part type: ${e}`);return`${r.code}:${JSON.stringify(t)} +`}async function J({stream:e,onTextPart:t,onReasoningPart:r,onReasoningSignaturePart:n,onRedactedReasoningPart:i,onSourcePart:a,onFilePart:o,onDataPart:s,onErrorPart:l,onToolCallStreamingStartPart:u,onToolCallDeltaPart:c,onToolCallPart:d,onToolResultPart:p,onMessageAnnotationsPart:f,onFinishMessagePart:h,onFinishStepPart:m,onStartStepPart:g}){let y=e.getReader(),v=new TextDecoder,b=[],_=0;for(;;){let{value:e}=await y.read();if(e&&(b.push(e),_+=e.length,10!==e[e.length-1]))continue;if(0===b.length)break;let w=function(e,t){let r=new Uint8Array(t),n=0;for(let t of e)r.set(t,n),n+=t.length;return e.length=0,r}(b,_);for(let{type:e,value:y}of(_=0,v.decode(w,{stream:!0}).split("\n").filter(e=>""!==e).map(Y)))switch(e){case"text":await (null==t?void 0:t(y));break;case"reasoning":await (null==r?void 0:r(y));break;case"reasoning_signature":await (null==n?void 0:n(y));break;case"redacted_reasoning":await (null==i?void 0:i(y));break;case"file":await (null==o?void 0:o(y));break;case"source":await (null==a?void 0:a(y));break;case"data":await (null==s?void 0:s(y));break;case"error":await (null==l?void 0:l(y));break;case"message_annotations":await (null==f?void 0:f(y));break;case"tool_call_streaming_start":await (null==u?void 0:u(y));break;case"tool_call_delta":await (null==c?void 0:c(y));break;case"tool_call":await (null==d?void 0:d(y));break;case"tool_result":await (null==p?void 0:p(y));break;case"finish_message":await (null==h?void 0:h(y));break;case"finish_step":await (null==m?void 0:m(y));break;case"start_step":await (null==g?void 0:g(y));break;default:throw Error(`Unknown stream part type: ${e}`)}}}async function G({stream:e,onTextPart:t}){let r=e.pipeThrough(new TextDecoderStream).getReader();for(;;){let{done:e,value:n}=await r.read();if(e)break;await t(n)}}var K=Symbol.for("vercel.ai.schema");function X(e){return"object"==typeof e&&null!==e&&K in e&&!0===e[K]&&"jsonSchema"in e&&"validate"in e?e:function(e,{validate:t}={}){return{[K]:!0,_type:void 0,[i.eu]:!0,jsonSchema:e,validate:t}}(O(e,{$refStrategy:"none",target:"jsonSchema7"}),{validate:t=>{let r=e.safeParse(t);return r.success?{success:!0,value:r.data}:{success:!1,error:r.error}}})}},9033:(e,t,r)=>{"use strict";e.exports=r(2436)},9137:(e,t,r)=>{"use strict";e.exports=r(2269).style},9143:(e,t,r)=>{"use strict";r.d(t,{Ch:()=>en,Di:()=>N,Kq:()=>Y,M3:()=>z,Tt:()=>A,b8:()=>ep,bD:()=>v,eM:()=>Q,hL:()=>x,iM:()=>el,u1:()=>S,u6:()=>Z,xn:()=>F});var n,i,a,o,s,l,u,c,d,p,f,h,m="vercel.ai.error",g=Symbol.for(m),y=class e extends Error{constructor({name:e,message:t,cause:r}){super(t),this[n]=!0,this.name=e,this.cause=r}static isInstance(t){return e.hasMarker(t,m)}static hasMarker(e,t){let r=Symbol.for(t);return null!=e&&"object"==typeof e&&r in e&&"boolean"==typeof e[r]&&!0===e[r]}};n=g;var v=y,b="AI_APICallError",_=`vercel.ai.error.${b}`,w=Symbol.for(_),x=class extends v{constructor({message:e,url:t,requestBodyValues:r,statusCode:n,responseHeaders:a,responseBody:o,cause:s,isRetryable:l=null!=n&&(408===n||409===n||429===n||n>=500),data:u}){super({name:b,message:e,cause:s}),this[i]=!0,this.url=t,this.requestBodyValues=r,this.statusCode=n,this.responseHeaders=a,this.responseBody=o,this.isRetryable=l,this.data=u}static isInstance(e){return v.hasMarker(e,_)}};i=w;var k="AI_EmptyResponseBodyError",E=`vercel.ai.error.${k}`,T=Symbol.for(E),A=class extends v{constructor({message:e="Empty response body"}={}){super({name:k,message:e}),this[a]=!0}static isInstance(e){return v.hasMarker(e,E)}};function S(e){return null==e?"unknown error":"string"==typeof e?e:e instanceof Error?e.message:JSON.stringify(e)}a=T;var j="AI_InvalidArgumentError",I=`vercel.ai.error.${j}`,R=Symbol.for(I),N=class extends v{constructor({message:e,cause:t,argument:r}){super({name:j,message:e,cause:t}),this[o]=!0,this.argument=r}static isInstance(e){return v.hasMarker(e,I)}};o=R;var P="AI_InvalidPromptError",C=`vercel.ai.error.${P}`,O=Symbol.for(C),z=class extends v{constructor({prompt:e,message:t,cause:r}){super({name:P,message:`Invalid prompt: ${t}`,cause:r}),this[s]=!0,this.prompt=e}static isInstance(e){return v.hasMarker(e,C)}};s=O;var M="AI_InvalidResponseDataError",$=`vercel.ai.error.${M}`,L=Symbol.for($),F=class extends v{constructor({data:e,message:t=`Invalid response data: ${JSON.stringify(e)}.`}){super({name:M,message:t}),this[l]=!0,this.data=e}static isInstance(e){return v.hasMarker(e,$)}};l=L;var D="AI_JSONParseError",U=`vercel.ai.error.${D}`,B=Symbol.for(U),Z=class extends v{constructor({text:e,cause:t}){super({name:D,message:`JSON parsing failed: Text: ${e}. +Error message: ${S(t)}`,cause:t}),this[u]=!0,this.text=e}static isInstance(e){return v.hasMarker(e,U)}};u=B;var q="AI_LoadAPIKeyError",V=`vercel.ai.error.${q}`,H=Symbol.for(V),Y=class extends v{constructor({message:e}){super({name:q,message:e}),this[c]=!0}static isInstance(e){return v.hasMarker(e,V)}};c=H;var W=Symbol.for("vercel.ai.error.AI_LoadSettingError"),J=Symbol.for("vercel.ai.error.AI_NoContentGeneratedError"),G="AI_NoSuchModelError",K=`vercel.ai.error.${G}`,X=Symbol.for(K),Q=class extends v{constructor({errorName:e=G,modelId:t,modelType:r,message:n=`No such ${r}: ${t}`}){super({name:e,message:n}),this[d]=!0,this.modelId=t,this.modelType=r}static isInstance(e){return v.hasMarker(e,K)}};d=X;var ee="AI_TooManyEmbeddingValuesForCallError",et=`vercel.ai.error.${ee}`,er=Symbol.for(et),en=class extends v{constructor(e){super({name:ee,message:`Too many values for a single embedding call. The ${e.provider} model "${e.modelId}" can only embed up to ${e.maxEmbeddingsPerCall} values per call, but ${e.values.length} values were provided.`}),this[p]=!0,this.provider=e.provider,this.modelId=e.modelId,this.maxEmbeddingsPerCall=e.maxEmbeddingsPerCall,this.values=e.values}static isInstance(e){return v.hasMarker(e,et)}};p=er;var ei="AI_TypeValidationError",ea=`vercel.ai.error.${ei}`,eo=Symbol.for(ea),es=class e extends v{constructor({value:e,cause:t}){super({name:ei,message:`Type validation failed: Value: ${JSON.stringify(e)}. +Error message: ${S(t)}`,cause:t}),this[f]=!0,this.value=e}static isInstance(e){return v.hasMarker(e,ea)}static wrap({value:t,cause:r}){return e.isInstance(r)&&r.value===t?r:new e({value:t,cause:r})}};f=eo;var el=es,eu="AI_UnsupportedFunctionalityError",ec=`vercel.ai.error.${eu}`,ed=Symbol.for(ec),ep=class extends v{constructor({functionality:e,message:t=`'${e}' functionality not supported.`}){super({name:eu,message:t}),this[h]=!0,this.functionality=e}static isInstance(e){return v.hasMarker(e,ec)}};function ef(e){return null===e||"string"==typeof e||"number"==typeof e||"boolean"==typeof e||(Array.isArray(e)?e.every(ef):"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&ef(t)))}h=ed},9630:(e,t,r)=>{"use strict";function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;tn})},9889:(e,t,r)=>{"use strict";r.d(t,{u:()=>K});var n,i,a="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof r.g?r.g:{},o="1.9.0",s=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,l=function(e){var t=new Set([e]),r=new Set,n=e.match(s);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=i.prerelease)return function(t){return t===e};function a(e){return r.add(e),!1}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(s);if(!n)return a(e);var o={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(null!=o.prerelease||i.major!==o.major)return a(e);if(0===i.major)return i.minor===o.minor&&i.patch<=o.patch?(t.add(e),!0):a(e);return i.minor<=o.minor?(t.add(e),!0):a(e)}}(o),u=Symbol.for("opentelemetry.js.api."+o.split(".")[0]);function c(e,t,r,n){void 0===n&&(n=!1);var i,s=a[u]=null!=(i=a[u])?i:{version:o};if(!n&&s[e]){var l=Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(l.stack||l.message),!1}if(s.version!==o){var l=Error("@opentelemetry/api: Registration of version v"+s.version+" for "+e+" does not match previously registered API v"+o);return r.error(l.stack||l.message),!1}return s[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+o+"."),!0}function d(e){var t,r,n=null==(t=a[u])?void 0:t.version;if(n&&l(n))return null==(r=a[u])?void 0:r[e]}function p(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+o+".");var r=a[u];r&&delete r[e]}var f=new function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var i=new e(r._currentContext);return i._currentContext.set(t,n),i},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}},h=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},m=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},v=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},x=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i=n?i.bind(t):function(){}}return en.ALL&&(e=n.ALL),t=t||{},{error:r("error",n.ERROR),warn:r("warn",n.WARN),info:r("info",n.INFO),debug:r("debug",n.DEBUG),verbose:r("verbose",n.VERBOSE)}}(null!=(a=r.logLevel)?a:n.INFO,e);if(l&&!r.suppressOverrideMessage){var p=null!=(o=Error().stack)?o:"";l.warn("Current logger will be overwritten from "+p),u.warn("Current logger will overwrite one already registered from "+p)}return c("diag",u,t,!0)},t.disable=function(){p("diag",t)},t.createComponentLogger=function(e){return new b(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}(),E=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,a=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},T=function(e,t,r){if(r||2==arguments.length)for(var n,i=0,a=t.length;i{"use strict";let n,i;r.d(t,{E:()=>b});var a=r(9630),o=r(2115),s=r(2669),l=r(3264),u=r(3967);let c=new l.Pq0,d=new l.Pq0,p=new l.Pq0,f=new l.I9Y;function h(e,t,r){let n=c.setFromMatrixPosition(e.matrixWorld);n.project(t);let i=r.width/2,a=r.height/2;return[n.x*i+i,-(n.y*a)+a]}let m=e=>1e-10>Math.abs(e)?0:e;function g(e,t,r=""){let n="matrix3d(";for(let r=0;16!==r;r++)n+=m(t[r]*e.elements[r])+(15!==r?",":")");return r+n}let y=(n=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>g(e,n)),v=(i=e=>[1/e,1/e,1/e,1,-1/e,-1/e,-1/e,-1,1/e,1/e,1/e,1,1,1,1,1],(e,t)=>g(e,i(t),"translate(-50%,-50%)")),b=o.forwardRef(({children:e,eps:t=.001,style:r,className:n,prepend:i,center:g,fullscreen:b,portal:_,distanceFactor:w,sprite:x=!1,transform:k=!1,occlude:E,onOcclude:T,castShadow:A,receiveShadow:S,material:j,geometry:I,zIndexRange:R=[0x1000037,0],calculatePosition:N=h,as:P="div",wrapperClass:C,pointerEvents:O="auto",...z},M)=>{let{gl:$,camera:L,scene:F,size:D,raycaster:U,events:B,viewport:Z}=(0,u.A)(),[q]=o.useState(()=>document.createElement(P)),V=o.useRef(null),H=o.useRef(null),Y=o.useRef(0),W=o.useRef([0,0]),J=o.useRef(null),G=o.useRef(null),K=(null==_?void 0:_.current)||B.connected||$.domElement.parentNode,X=o.useRef(null),Q=o.useRef(!1),ee=o.useMemo(()=>E&&"blending"!==E||Array.isArray(E)&&E.length&&function(e){return e&&"object"==typeof e&&"current"in e}(E[0]),[E]);o.useLayoutEffect(()=>{let e=$.domElement;E&&"blending"===E?(e.style.zIndex=`${Math.floor(R[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)},[E]),o.useLayoutEffect(()=>{if(H.current){let e=V.current=s.createRoot(q);if(F.updateMatrixWorld(),k)q.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{let e=N(H.current,L,D);q.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return K&&(i?K.prepend(q):K.appendChild(q)),()=>{K&&K.removeChild(q),e.unmount()}}},[K,k]),o.useLayoutEffect(()=>{C&&(q.className=C)},[C]);let et=o.useMemo(()=>k?{position:"absolute",top:0,left:0,width:D.width,height:D.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:g?"translate3d(-50%,-50%,0)":"none",...b&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...r},[r,g,b,D,k]),er=o.useMemo(()=>({position:"absolute",pointerEvents:O}),[O]);o.useLayoutEffect(()=>{var t,i;Q.current=!1,k?null==(t=V.current)||t.render(o.createElement("div",{ref:J,style:et},o.createElement("div",{ref:G,style:er},o.createElement("div",{ref:M,className:n,style:r,children:e})))):null==(i=V.current)||i.render(o.createElement("div",{ref:M,style:et,className:n,children:e}))});let en=o.useRef(!0);(0,u.C)(e=>{if(H.current){L.updateMatrixWorld(),H.current.updateWorldMatrix(!0,!1);let e=k?W.current:N(H.current,L,D);if(k||Math.abs(Y.current-L.zoom)>t||Math.abs(W.current[0]-e[0])>t||Math.abs(W.current[1]-e[1])>t){let t=function(e,t){let r=c.setFromMatrixPosition(e.matrixWorld),n=d.setFromMatrixPosition(t.matrixWorld),i=r.sub(n),a=t.getWorldDirection(p);return i.angleTo(a)>Math.PI/2}(H.current,L),r=!1;ee&&(Array.isArray(E)?r=E.map(e=>e.current):"blending"!==E&&(r=[F]));let n=en.current;r?en.current=function(e,t,r,n){let i=c.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),f.set(a.x,a.y),r.setFromCamera(f,t);let o=r.intersectObjects(n,!0);if(o.length){let e=o[0].distance;return i.distanceTo(r.ray.origin)({vertexShader:k?void 0:` + /* + This shader is from the THREE's SpriteMaterial. + We need to turn the backing plane into a Sprite + (make it always face the camera) if "transfrom" + is false. + */ + #include + + void main() { + vec2 center = vec2(0., 1.); + float rotation = 0.0; + + // This is somewhat arbitrary, but it seems to work well + // Need to figure out how to derive this dynamically if it even matters + float size = 0.03; + + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + + gl_Position = projectionMatrix * mvPosition; + } + `,fragmentShader:` + void main() { + gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); + } + `}),[k]);return o.createElement("group",(0,a.A)({},z,{ref:H}),E&&!ee&&o.createElement("mesh",{castShadow:A,receiveShadow:S,ref:X},I||o.createElement("planeGeometry",null),j||o.createElement("shaderMaterial",{side:l.$EB,vertexShader:ei.vertexShader,fragmentShader:ei.fragmentShader})))})}}]); \ No newline at end of file diff --git a/_next/static/chunks/app/_not-found/page-8a72a3278bab3d87.js b/_next/static/chunks/app/_not-found/page-8a72a3278bab3d87.js new file mode 100644 index 0000000000000000000000000000000000000000..8bf5f40747adfa7233af581ca9ce8acad6f5e226 --- /dev/null +++ b/_next/static/chunks/app/_not-found/page-8a72a3278bab3d87.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[492],{3632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let l=r(5155),n=r(6395);function o(){return(0,l.jsx)(n.HTTPAccessErrorFallback,{status:404,message:"This page could not be found."})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3868:(e,t,r)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_not-found/page",function(){return r(3632)}])},6395:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTTPAccessErrorFallback",{enumerable:!0,get:function(){return o}}),r(8229);let l=r(5155);r(2115);let n={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{display:"inline-block"},h1:{display:"inline-block",margin:"0 20px 0 0",padding:"0 23px 0 0",fontSize:24,fontWeight:500,verticalAlign:"top",lineHeight:"49px"},h2:{fontSize:14,fontWeight:400,lineHeight:"49px",margin:0}};function o(e){let{status:t,message:r}=e;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("title",{children:t+": "+r}),(0,l.jsx)("div",{style:n.error,children:(0,l.jsxs)("div",{children:[(0,l.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}),(0,l.jsx)("h1",{className:"next-error-h1",style:n.h1,children:t}),(0,l.jsx)("div",{style:n.desc,children:(0,l.jsx)("h2",{style:n.h2,children:r})})]})})]})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)}},e=>{var t=t=>e(e.s=t);e.O(0,[441,684,358],()=>t(3868)),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/layout-557283093bad1bf7.js b/_next/static/chunks/app/layout-557283093bad1bf7.js new file mode 100644 index 0000000000000000000000000000000000000000..3af4afc3793cf7b9da87085030573256fbc2b0b9 --- /dev/null +++ b/_next/static/chunks/app/layout-557283093bad1bf7.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[177],{2374:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2714:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"setAttributesFromProps",{enumerable:!0,get:function(){return o}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},n=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function a(e){return["async","defer","noModule"].includes(e)}function o(e,t){for(let[o,s]of Object.entries(t)){if(!t.hasOwnProperty(o)||n.includes(o)||void 0===s)continue;let i=r[o]||o.toLowerCase();"SCRIPT"===e.tagName&&a(i)?e[i]=!!s:e.setAttribute(i,String(s)),(!1===s||"SCRIPT"===e.tagName&&a(i)&&(!s||"false"===s))&&(e.setAttribute(i,""),e.removeAttribute(i))}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5299:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_e8ce0c"}},7514:(e,t,r)=>{"use strict";r.d(t,{default:()=>d});var n=r(5155),a=r(9243),o=r.n(a),s=r(6874),i=r.n(s);let l=window.navigator.userAgent,c=l.includes("Chrome")&&!l.includes("Chromium");function d(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("header",{className:"text-white w-full p-5 sm:px-10 flex justify-between items-center fixed top-0 left-0 right-0 z-50",children:[(0,n.jsxs)(i(),{href:"/",children:[(0,n.jsx)("div",{className:"text-2xl font-bold e",children:"Dora-BamBot"}),(0,n.jsx)("div",{className:"text-xl e text-red-500",children:c?"":"This browser is not supported! Please use Chrome."})]}),(0,n.jsx)("div",{className:"text-2xl e",children:(0,n.jsx)("a",{href:"https://shop.wowrobo.com/products/so-arm101-diy-kit-assembled-version-1?sca_ref=8999006.W1G76EYstQkFoP",children:(0,n.jsxs)(i(),{href:"https://shop.wowrobo.com/products/so-arm101-diy-kit-assembled-version-1?sca_ref=8999006.W1G76EYstQkFoP",children:["Buy assembled SO101 with 5% Discount on WowRobo with the code:"," ",(0,n.jsx)("span",{className:"text-red-500",children:" 1ms.ai"})]})})}),(0,n.jsx)("a",{className:"github-button",href:"https://github.com/dora-bambot/dora-bambot.github.io","data-size":"large","data-show-count":"true","aria-label":"Star timqian/bambot on GitHub",children:"Star"})]}),(0,n.jsx)(o(),{async:!0,defer:!0,src:"https://buttons.github.io/buttons.js"})]})}},9243:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return y},handleClientScriptLoad:function(){return h},initScriptLoader:function(){return m}});let n=r(8229),a=r(6966),o=r(5155),s=n._(r(7650)),i=a._(r(2115)),l=r(2830),c=r(2714),d=r(2374),u=new Map,f=new Set,p=e=>{if(s.default.preinit)return void e.forEach(e=>{s.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},b=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:a=null,dangerouslySetInnerHTML:o,children:s="",strategy:i="afterInteractive",onError:l,stylesheets:d}=e,b=r||t;if(b&&f.has(b))return;if(u.has(t)){f.add(b),u.get(t).then(n,l);return}let h=()=>{a&&a(),f.add(b)},m=document.createElement("script"),v=new Promise((e,t)=>{m.addEventListener("load",function(t){e(),n&&n.call(this,t),h()}),m.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});o?(m.innerHTML=o.__html||"",h()):s?(m.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):"",h()):t&&(m.src=t,u.set(t,v)),(0,c.setAttributesFromProps)(m,e),"worker"===i&&m.setAttribute("type","text/partytown"),m.setAttribute("data-nscript",i),d&&p(d),document.body.appendChild(m)};function h(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>b(e))}):b(e)}function m(e){e.forEach(h),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");f.add(t)})}function v(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:a=null,strategy:c="afterInteractive",onError:u,stylesheets:p,...h}=e,{updateScripts:m,scripts:v,getIsSsr:y,appDir:w,nonce:g}=(0,i.useContext)(l.HeadManagerContext),_=(0,i.useRef)(!1);(0,i.useEffect)(()=>{let e=t||r;_.current||(a&&e&&f.has(e)&&a(),_.current=!0)},[a,t,r]);let x=(0,i.useRef)(!1);if((0,i.useEffect)(()=>{if(!x.current){if("afterInteractive"===c)b(e);else"lazyOnload"===c&&("complete"===document.readyState?(0,d.requestIdleCallback)(()=>b(e)):window.addEventListener("load",()=>{(0,d.requestIdleCallback)(()=>b(e))}));x.current=!0}},[e,c]),("beforeInteractive"===c||"worker"===c)&&(m?(v[c]=(v[c]||[]).concat([{id:t,src:r,onLoad:n,onReady:a,onError:u,...h}]),m(v)):y&&y()?f.add(t||r):y&&!y()&&b(e)),w){if(p&&p.forEach(e=>{s.default.preinit(e,{as:"style"})}),"beforeInteractive"===c)if(!r)return h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:g,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...h,id:t}])+")"}});else return s.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:g,crossOrigin:h.crossOrigin}:{as:"script",nonce:g,crossOrigin:h.crossOrigin}),(0,o.jsx)("script",{nonce:g,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...h,id:t}])+")"}});"afterInteractive"===c&&r&&s.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:g,crossOrigin:h.crossOrigin}:{as:"script",nonce:g,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(v,"__nextScript",{value:!0});let y=v;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9324:()=>{},9742:(e,t,r)=>{"use strict";r.d(t,{Analytics:()=>b});var n=r(2115),a=r(8999),o=r(9509),s=()=>{window.va||(window.va=function(){for(var e=arguments.length,t=Array(e),r=0;r{var t;e.beforeSend&&(null==(t=window.va)||t.call(window,"beforeSend",e.beforeSend))},[e.beforeSend]),(0,n.useEffect)(()=>{var t;!function(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{debug:!0};if(!i())return;!function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"auto";if("auto"===e){window.vam=l();return}window.vam=e}(t.mode),s(),t.beforeSend&&(null==(e=window.va)||e.call(window,"beforeSend",t.beforeSend));let r=t.scriptSrc?t.scriptSrc:c()?"https://va.vercel-scripts.com/v1/script.debug.js":t.basePath?"".concat(t.basePath,"/insights/script.js"):"/_vercel/insights/script.js";if(document.head.querySelector('script[src*="'.concat(r,'"]')))return;let n=document.createElement("script");n.src=r,n.defer=!0,n.dataset.sdkn="@vercel/analytics"+(t.framework?"/".concat(t.framework):""),n.dataset.sdkv="1.5.0",t.disableAutoTrack&&(n.dataset.disableAutoTrack="1"),t.endpoint?n.dataset.endpoint=t.endpoint:t.basePath&&(n.dataset.endpoint="".concat(t.basePath,"/insights")),t.dsn&&(n.dataset.dsn=t.dsn),n.onerror=()=>{let e=c()?"Please check if any ad blockers are enabled and try again.":"Be sure to enable Web Analytics for your project and deploy again. See https://vercel.com/docs/analytics/quickstart for more information.";console.log("[Vercel Web Analytics] Failed to load script from ".concat(r,". ").concat(e))},c()&&!1===t.debug&&(n.dataset.debug="false"),document.head.appendChild(n)}({framework:e.framework||"react",basePath:null!=(t=e.basePath)?t:function(){if(void 0!==o&&void 0!==o.env)return o.env.REACT_APP_VERCEL_OBSERVABILITY_BASEPATH}(),...void 0!==e.route&&{disableAutoTrack:!0},...e})},[]),(0,n.useEffect)(()=>{e.route&&e.path&&function(e){var t;let{route:r,path:n}=e;null==(t=window.va)||t.call(window,"pageview",{route:r,path:n})}({route:e.route,path:e.path})},[e.route,e.path]),null}var f=()=>{let e=(0,a.useParams)(),t=(0,a.useSearchParams)(),r=(0,a.usePathname)();return e?{route:function(e,t){if(!e||!t)return e;let r=e;try{let e=Object.entries(t);for(let[t,n]of e)if(!Array.isArray(n)){let e=d(n);e.test(r)&&(r=r.replace(e,"/[".concat(t,"]")))}for(let[t,n]of e)if(Array.isArray(n)){let e=d(n.join("/"));e.test(r)&&(r=r.replace(e,"/[...".concat(t,"]")))}return r}catch(t){return e}}(r,Object.keys(e).length?e:Object.fromEntries(t.entries())),path:r}:{route:null,path:r}};function p(e){let{route:t,path:r}=f();return n.createElement(u,{path:r,route:t,...e,basePath:function(){if(void 0!==o&&void 0!==o.env)return o.env.NEXT_PUBLIC_VERCEL_OBSERVABILITY_BASEPATH}(),framework:"next"})}function b(e){return n.createElement(n.Suspense,{fallback:null},n.createElement(p,{...e}))}},9831:(e,t,r)=>{Promise.resolve().then(r.bind(r,7514)),Promise.resolve().then(r.bind(r,9742)),Promise.resolve().then(r.t.bind(r,5299,23)),Promise.resolve().then(r.t.bind(r,9324,23))}},e=>{var t=t=>e(e.s=t);e.O(0,[618,874,441,684,358],()=>t(9831)),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/app/page-d26a24c6810d0a4b.js b/_next/static/chunks/app/page-d26a24c6810d0a4b.js new file mode 100644 index 0000000000000000000000000000000000000000..d4881cef84ee268f5b4a9e5c46c8979eab858499 --- /dev/null +++ b/_next/static/chunks/app/page-d26a24c6810d0a4b.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{2609:(e,t,o)=>{Promise.resolve().then(o.bind(o,9806))},9806:(e,t,o)=>{"use strict";o.r(t),o.d(t,{default:()=>G});var r=o(5155),n=o(2115);let a={"so-arm101":{urdfUrl:"/URDF/so101.urdf",camera:{position:[-20,10,-15],fov:20},orbitTarget:[0,1,0],keyboardControlMap:{1:["1","q"],2:["2","w"],3:["3","e"],4:["4","r"],5:["5","t"],6:["6","y"]},jointNameIdMap:{1:1,2:2,3:3,4:4,5:5,6:6},compoundMovements:[{name:"Jaw down & up",keys:["8","i"],primaryJoint:2,primaryFormula:"primary < 0 ? 1 : -1",dependents:[{joint:3,formula:"primary < 0 ? -1.9 * deltaPrimary : 0.4 * deltaPrimary"},{joint:4,formula:"primary < 0 ? (primary < 10 ? 0 : 0.51 * deltaPrimary) : -0.4 * deltaPrimary"}]},{name:"Jaw backward & forward",keys:["o","u"],primaryJoint:2,primaryFormula:"1",dependents:[{joint:3,formula:"-0.9* deltaPrimary"}]}],systemPrompt:'You can help control the so-arm100 robot by pressing keyboard keys. Use the keyPress tool to simulate key presses. Each key will be held down for 1 second by default. If the user describes roughly wanting to make it longer or shorter, adjust the duration accordingly.\n The robot can be controlled with the following keys:\n - "q" and "1" for rotate the bot to left and right\n - "i" and "8" for moving the bot/jaw down("i") and up("8")\n - "u" and "o" for moving the bot/jaw backward("u") and forward("o")\n - "6" to open the jaw and "y" to close the jaw\n - "t" and "5" for rotating jaw\n '},"so-arm100":{urdfUrl:"/URDF/so_arm100.urdf",camera:{position:[-20,10,-15],fov:20},orbitTarget:[0,1,0],keyboardControlMap:{1:["1","q"],2:["2","w"],3:["3","e"],4:["4","r"],5:["5","t"],6:["6","y"]},jointNameIdMap:{Rotation:1,Pitch:2,Elbow:3,Wrist_Pitch:4,Wrist_Roll:5,Jaw:6},compoundMovements:[{name:"Jaw down & up",keys:["8","i"],primaryJoint:2,primaryFormula:"primary < 100 ? 1 : -1",dependents:[{joint:3,formula:"primary < 100 ? -1.9 * deltaPrimary : 0.4 * deltaPrimary"},{joint:4,formula:"primary < 100 ? (primary < 10 ? 0 : 0.51 * deltaPrimary) : -0.4 * deltaPrimary"}]},{name:"Jaw backward & forward",keys:["o","u"],primaryJoint:2,primaryFormula:"1",dependents:[{joint:3,formula:"-0.9* deltaPrimary"}]}],systemPrompt:'You can help control the so-arm100 robot by pressing keyboard keys. Use the keyPress tool to simulate key presses. Each key will be held down for 1 second by default. If the user describes roughly wanting to make it longer or shorter, adjust the duration accordingly.\n The robot can be controlled with the following keys:\n - "q" and "1" for rotate the bot to left and right\n - "i" and "8" for moving the bot/jaw down("i") and up("8")\n - "u" and "o" for moving the bot/jaw backward("u") and forward("o")\n - "6" to open the jaw and "y" to close the jaw\n - "t" and "5" for rotating jaw\n '},"bambot-v0":{urdfUrl:"/URDF/bambot_v0.urdf",camera:{position:[-30,25,28],fov:25},orbitTarget:[0,2,0],keyboardControlMap:{1:["1","q"],2:["2","w"],3:["3","e"],4:["4","r"],5:["5","t"],6:["6","y"],7:["a","z"],8:["s","x"],9:["d","c"],10:["f","v"],11:["g","b"],12:["h","n"]},jointNameIdMap:{R_Rotation:1,R_Pitch:2,R_Elbow:3,R_Wrist_Pitch:4,R_Wrist_Roll:5,R_Jaw:6,L_Rotation:7,L_Pitch:8,L_Elbow:9,L_Wrist_Pitch:10,L_Wrist_Roll:11,L_Jaw:12,left_wheel:13,back_wheel:14,right_wheel:15},systemPrompt:"You can help control the bambot-v0 robot by pressing keyboard keys. Use the keyPress tool to simulate key presses. Each key will be held down for 1 second by default. If the user describes roughly wanting to make it longer or shorter, adjust the duration accordingly.\n "},"bambot-v0-base":{urdfUrl:"/URDF/bambot_v0_base.urdf",camera:{position:[-30,25,28],fov:25},orbitTarget:[0,2,0],jointNameIdMap:{left_wheel:13,back_wheel:14,right_wheel:15},systemPrompt:'You can help control the bambot-v0-base robot by pressing keyboard keys. Use the keyPress tool to simulate key presses. Each key will be held down for 1 second by default. The robot can be controlled with the following keys: "left_wheel", "back_wheel", "right_wheel" for base movement.'},sts3215:{urdfUrl:"/URDF/sts3215.urdf",camera:{position:[10,10,10],fov:12},orbitTarget:[.5,1,0],keyboardControlMap:{1:["1","q"]},jointNameIdMap:{Rotation:1},systemPrompt:'You can help control the sts3215 robot by pressing keyboard keys. Use the keyPress tool to simulate key presses. Each key will be held down for 1 second by default. The robot can be controlled with the following keys: "1" and "q" for rotation.'}};var s=o(3264),l=o(3967),i=o(4031),d=o(4688),c=o(6166),u=o(9957);function m(){let e=document.createElement("canvas");e.width=e.height=200;let t=e.getContext("2d");t&&(t.fillStyle="#aaa",t.fillRect(0,0,200,200),t.strokeStyle="#707070",t.lineWidth=8,t.beginPath(),t.moveTo(0,0),t.lineTo(0,200),t.lineTo(200,200),t.lineTo(200,0),t.closePath(),t.stroke());let o=new s.GOR(e);return o.wrapS=o.wrapT=s.GJx,o.repeat.set(100,100),o}function h(){let e=(0,n.useMemo)(m,[]);return(0,r.jsxs)("mesh",{rotation:[-Math.PI/2,0,0],receiveShadow:!0,children:[(0,r.jsx)("planeGeometry",{args:[30,30]}),(0,r.jsx)("meshPhysicalMaterial",{color:8421504,metalness:.7,roughness:.3,reflectivity:.1,clearcoat:.3,side:s.$EB,transparent:!0,opacity:.7,map:e})]})}var p=o(9137),f=o.n(p);function x(e){return 180*e/Math.PI}function b(e){return Math.min(Math.max(Math.round(4096*e/360+2048),0),4095)}let g=e=>void 0!==e?"".concat(e>0?"+":"").concat(e.toFixed(1),"\xb0"):"/",y=e=>"error"===e?(0,r.jsx)("span",{className:"text-red-500",children:"Error"}):"N/A"===e?"/":"".concat(null==e?void 0:e.toFixed(1),"\xb0");function v(e){let{joints:t,updateJointDegrees:o,updateJointsDegrees:a,keyboardControlMap:s,compoundMovements:l}=e,[i,d]=(0,n.useState)(new Set),c=(0,n.useRef)(t),u=(0,n.useRef)(a),m=(0,n.useRef)(s);(0,n.useEffect)(()=>{c.current=t},[t]),(0,n.useEffect)(()=>{u.current=a},[a]),(0,n.useEffect)(()=>{m.current=s},[s]),(0,n.useEffect)(()=>{let e=e=>{Object.values(m.current||{}).flat().includes(e.key),d(t=>new Set(t).add(e.key))},t=e=>{d(t=>{let o=new Set(t);return o.delete(e.key),o})};return window.addEventListener("keydown",e),window.addEventListener("keyup",t),()=>{window.removeEventListener("keydown",e),window.removeEventListener("keyup",t)}},[]),(0,n.useEffect)(()=>{let e=null;return i.size>0&&(e=setInterval(()=>{let e=c.current,t=m.current||{},o=l||[],r=e.map(e=>{var o,r,n,a,s,l;let d=null==(o=t[e.servoId])?void 0:o[1],c=null==(r=t[e.servoId])?void 0:r[0],u=e.virtualDegrees||0,m=u;return d&&i.has(d)&&(m-=.15),c&&i.has(c)&&(m+=.15),(m=Math.max(Math.round(x(null!=(s=null==(n=e.limit)?void 0:n.lower)?s:-1/0)),Math.min(Math.round(x(null!=(l=null==(a=e.limit)?void 0:a.upper)?l:1/0)),m)))!==u?{servoId:e.servoId,value:m}:null}).filter(e=>null!==e);o.forEach(t=>{var o,n,a,s,l;let d=t.keys.findIndex(e=>i.has(e));if(-1===d)return;let c=e.find(e=>e.servoId===t.primaryJoint);if(!c)return;let u=c.virtualDegrees||0,m=null==(o=t.dependents[0])?void 0:o.joint,h=e.find(e=>e.servoId===m),p=(null==h?void 0:h.virtualDegrees)||0,f=1;if(t.primaryFormula)try{f=Math.sign(Function("primary","dependent","delta","return ".concat(t.primaryFormula))(u,p,.15))||1}catch(e){f=1}else f=0===d?1:-1;let b=.15*f*(0===d?1:-1),g=u+b;g=Math.max(Math.round(x(null!=(s=null==(n=c.limit)?void 0:n.lower)?s:-1/0)),Math.min(Math.round(x(null!=(l=null==(a=c.limit)?void 0:a.upper)?l:1/0)),g));let y=new Map;r.forEach(e=>y.set(e.servoId,e.value)),y.set(c.servoId,g),t.dependents.forEach(t=>{var o,r,n,a;let s=e.find(e=>e.servoId===t.joint);if(!s)return;let l=s.virtualDegrees||0,i=0;try{i=Function("primary","dependent","deltaPrimary","return ".concat(t.formula))(u,l,b)}catch(e){i=0}Number.isFinite(i)||(i=0);let d=l+i;d=Math.max(Math.round(x(null!=(n=null==(o=s.limit)?void 0:o.lower)?n:-1/0)),Math.min(Math.round(x(null!=(a=null==(r=s.limit)?void 0:r.upper)?a:1/0)),d)),y.set(s.servoId,d)}),r=Array.from(y.entries()).map(e=>{let[t,o]=e;return{servoId:t,value:o}})}),r.length>0&&u.current(r)},3)),()=>{e&&clearInterval(e)}},[i]);let h=e=>{e&&d(t=>new Set(t).add(e))},p=e=>{e&&d(t=>{let o=new Set(t);return o.delete(e),o})};return(0,r.jsxs)("div",{className:"jsx-f06e54ddce90f5cd mt-4",children:[(0,r.jsxs)("table",{className:"jsx-f06e54ddce90f5cd table-auto w-full text-left text-sm",children:[(0,r.jsx)("thead",{className:"jsx-f06e54ddce90f5cd",children:(0,r.jsxs)("tr",{className:"jsx-f06e54ddce90f5cd",children:[(0,r.jsx)("th",{className:"jsx-f06e54ddce90f5cd border-b border-gray-600 pb-1 pr-2",children:"Joint"}),(0,r.jsx)("th",{className:"jsx-f06e54ddce90f5cd border-b border-gray-600 pb-1 text-center pl-2",children:"Angle"}),(0,r.jsx)("th",{className:"jsx-f06e54ddce90f5cd border-b border-gray-600 pb-1 text-center pl-2",children:"Real Angle"}),(0,r.jsx)("th",{className:"jsx-f06e54ddce90f5cd border-b border-gray-600 pb-1 text-center px-2",children:"Control"})]})}),(0,r.jsx)("tbody",{className:"jsx-f06e54ddce90f5cd",children:t.map(e=>{var t,n,a,l,d,c;let u=null==(t=s[e.servoId])?void 0:t[1],m=null==(n=s[e.servoId])?void 0:n[0],f=u&&i.has(u),b=m&&i.has(m);return(0,r.jsxs)("tr",{className:"jsx-f06e54ddce90f5cd",children:[(0,r.jsx)("td",{className:"jsx-f06e54ddce90f5cd ",children:e.name}),(0,r.jsx)("td",{className:"jsx-f06e54ddce90f5cd pr-2 text-center w-16",children:g(e.virtualDegrees)}),(0,r.jsx)("td",{className:"jsx-f06e54ddce90f5cd pl-2 text-center w-16",children:y(e.realDegrees)}),(0,r.jsxs)("td",{className:"jsx-f06e54ddce90f5cd py-1 px-4 flex items-center",children:[(0,r.jsx)("button",{onMouseDown:()=>h(u),onMouseUp:()=>p(u),onMouseLeave:()=>p(u),onTouchStart:()=>h(u),onTouchEnd:()=>p(u),style:{clipPath:"polygon(0 50%, 30% 0, 100% 0, 100% 100%, 30% 100%)"},className:"jsx-f06e54ddce90f5cd "+"".concat(f?"bg-blue-600":"bg-gray-700 hover:bg-gray-600"," text-white text-xs font-bold w-5 h-5 text-right pr-1 uppercase select-none"),children:u||"-"}),(0,r.jsx)("input",{type:"range",min:Math.round(x(null!=(d=null==(a=e.limit)?void 0:a.lower)?d:-Math.PI)),max:Math.round(x(null!=(c=null==(l=e.limit)?void 0:l.upper)?c:Math.PI)),step:"0.1",value:e.virtualDegrees||0,onChange:t=>{let r=parseFloat(t.target.value);o(e.servoId,r)},className:"jsx-f06e54ddce90f5cd h-2 bg-gray-700 appearance-none cursor-pointer w-14 custom-range-thumb"}),(0,r.jsx)("button",{onMouseDown:()=>h(m),onMouseUp:()=>p(m),onMouseLeave:()=>p(m),onTouchStart:()=>h(m),onTouchEnd:()=>p(m),style:{clipPath:"polygon(100% 50%, 70% 0, 0 0, 0 100%, 70% 100%)"},className:"jsx-f06e54ddce90f5cd "+"".concat(b?"bg-blue-600":"bg-gray-700 hover:bg-gray-600"," text-white text-xs font-semibold w-5 h-5 text-left pl-1 uppercase select-none"),children:m||"+"})]})]},e.servoId)})})]}),l&&l.length>0&&(0,r.jsxs)("div",{className:"jsx-f06e54ddce90f5cd mt-4",children:[(0,r.jsx)("div",{className:"jsx-f06e54ddce90f5cd font-bold mb-2",children:"Compound Movements"}),(0,r.jsx)("table",{className:"jsx-f06e54ddce90f5cd table-auto w-full text-left text-sm",children:(0,r.jsx)("tbody",{className:"jsx-f06e54ddce90f5cd",children:l.map((e,t)=>{let o=e.keys[1],n=e.keys[0],a=o&&i.has(o),s=n&&i.has(n);return(0,r.jsxs)("tr",{className:"jsx-f06e54ddce90f5cd",children:[(0,r.jsx)("td",{className:"jsx-f06e54ddce90f5cd font-semibold pr-2 align-top",children:e.name}),(0,r.jsx)("td",{className:"jsx-f06e54ddce90f5cd",children:e.keys&&e.keys.length>0&&(0,r.jsxs)("span",{className:"jsx-f06e54ddce90f5cd space-x-1 flex flex-row",children:[(0,r.jsx)("button",{onMouseDown:()=>h(o),onMouseUp:()=>p(o),onMouseLeave:()=>p(o),onTouchStart:()=>h(o),onTouchEnd:()=>p(o),style:{clipPath:"polygon(0 50%, 30% 0, 100% 0, 100% 100%, 30% 100%)",minWidth:"1.8em",minHeight:"1.8em",fontWeight:600,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.04)"},tabIndex:-1,className:"jsx-f06e54ddce90f5cd "+"".concat(a?"bg-blue-600":"bg-gray-700 hover:bg-gray-600"," text-white text-xs font-bold w-5 h-5 text-right pr-1 uppercase select-none"),children:o||"-"}),(0,r.jsx)("button",{onMouseDown:()=>h(n),onMouseUp:()=>p(n),onMouseLeave:()=>p(n),onTouchStart:()=>h(n),onTouchEnd:()=>p(n),style:{clipPath:"polygon(100% 50%, 70% 0, 0 0, 0 100%, 70% 100%)",minWidth:"1.8em",minHeight:"1.8em",fontWeight:600,boxShadow:"0 1px 2px 0 rgba(0,0,0,0.04)"},tabIndex:-1,className:"jsx-f06e54ddce90f5cd "+"".concat(s?"bg-blue-600":"bg-gray-700 hover:bg-gray-600"," text-white text-xs font-semibold w-5 h-5 text-left pl-1 uppercase select-none"),children:n||"+"})]})})]},t)})})})]}),(0,r.jsx)(f(),{id:"f06e54ddce90f5cd",children:'.custom-range-thumb::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;-ms-appearance:none;appearance:none;width:8px;height:8px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:#fff;cursor:pointer}.custom-range-thumb::-moz-range-thumb{width:8px;height:8px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:#fff;cursor:pointer}.custom-range-thumb::-ms-thumb{width:8px;height:8px;-webkit-border-radius:50%;-moz-border-radius:50%;border-radius:50%;background:#fff;cursor:pointer}.custom-range-thumb{overflow:hidden}input[type="range"].custom-range-thumb{outline:none}'})]})}let w={up:"↑",down:"↓",left:"←",right:"→"},j=e=>{let{direction:t,onMouseDown:o,onMouseUp:n,isActive:a}=e;return(0,r.jsx)("button",{className:"text-gray-200 px-2 py-1 rounded font-bold select-none ".concat(a?"bg-blue-500":"bg-gray-700 hover:bg-gray-500"),onMouseDown:o,onMouseUp:n,onTouchStart:e=>{e.preventDefault(),o()},onTouchEnd:e=>{e.preventDefault(),n()},style:{WebkitUserSelect:"none",userSelect:"none"},children:w[t]})},k=e=>void 0!==e?e.toFixed(0):"/",N=e=>"error"===e?(0,r.jsx)("span",{className:"text-red-500",children:"Error"}):"N/A"===e?"/":"".concat(null==e?void 0:e.toFixed(0));function I(e){let{joints:t,updateJointSpeed:o,updateJointsSpeed:a}=e,[s,l]=(0,n.useState)(null),i=e=>{switch(e.key){case"ArrowUp":l("forward"),a([{servoId:t[0].servoId,speed:-1e3},{servoId:t[2].servoId,speed:1e3}]);break;case"ArrowDown":l("backward"),a([{servoId:t[0].servoId,speed:1e3},{servoId:t[2].servoId,speed:-1e3}]);break;case"ArrowLeft":l("left"),a(t.map(e=>({servoId:e.servoId,speed:1e3})));break;case"ArrowRight":l("right"),a(t.map(e=>({servoId:e.servoId,speed:-1e3})))}},d=()=>{l(null),a(t.map(e=>({servoId:e.servoId,speed:0})))};return(0,n.useEffect)(()=>(window.addEventListener("keydown",i),window.addEventListener("keyup",d),()=>{window.removeEventListener("keydown",i),window.removeEventListener("keyup",d)}),[t,1e3]),(0,r.jsxs)("div",{className:"mt-4 flex relative",children:[(0,r.jsx)("div",{className:"flex-1",children:(0,r.jsxs)("table",{className:"table-auto w-full text-left text-sm",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{className:"border-b border-gray-600 pb-1 pr-2",children:"Wheel"}),(0,r.jsx)("th",{className:"border-b border-gray-600 pb-1 text-center px-2",children:"Speed"}),(0,r.jsx)("th",{className:"border-b border-gray-600 pb-1 text-center px-2",children:"Real Speed"}),(0,r.jsx)("th",{className:"px-8 border-b border-gray-600",children:"Control"})]})}),(0,r.jsx)("tbody",{children:t.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"py-1",children:e.name}),(0,r.jsx)("td",{className:"py-1 pr-2 text-center",children:k(e.virtualSpeed)}),(0,r.jsx)("td",{className:"py-1 pl-2 text-center",children:N(e.realSpeed)})]},e.servoId))})]})}),(0,r.jsx)("div",{className:"absolute right-3 top-10",children:(0,r.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[(0,r.jsx)(j,{direction:"up",onMouseDown:()=>i({key:"ArrowUp"}),onMouseUp:d,isActive:"forward"===s}),(0,r.jsxs)("div",{className:"flex gap-1",children:[(0,r.jsx)(j,{direction:"left",onMouseDown:()=>i({key:"ArrowLeft"}),onMouseUp:d,isActive:"left"===s}),(0,r.jsx)(j,{direction:"down",onMouseDown:()=>i({key:"ArrowDown"}),onMouseUp:d,isActive:"backward"===s}),(0,r.jsx)(j,{direction:"right",onMouseDown:()=>i({key:"ArrowRight"}),onMouseUp:d,isActive:"right"===s})]})]})})]})}var S=o(6874),M=o.n(S);function C(e){let{jointStates:t,updateJointDegrees:o,updateJointsDegrees:a,updateJointSpeed:s,updateJointsSpeed:l,isConnected:i,connectRobot:d,disconnectRobot:c,keyboardControlMap:u,compoundMovements:m}=e,[h,p]=(0,n.useState)(!1),[f,x]=(0,n.useState)("idle"),b=async()=>{x("connecting");try{await d(),x("idle")}catch(e){x("failed")}},g=async()=>{x("disconnecting");try{await c()}finally{x("idle")}},y=t.filter(e=>"revolute"===e.jointType),w=t.filter(e=>"continuous"===e.jointType);return h?(0,r.jsx)("div",{className:"absolute bottom-5 left-5 z-50",children:(0,r.jsx)("button",{onClick:()=>p(!1),className:"bg-gray-700 hover:bg-gray-600 text-white text-sm px-3 py-1.5 rounded",children:"Show Controls"})}):(0,r.jsxs)("div",{className:"absolute bottom-5 left-5 bg-zinc-900 bg-opacity-80 text-white p-4 rounded-lg max-h-[90vh] overflow-y-auto z-50 text-sm",children:[(0,r.jsxs)("h3",{className:"mt-0 mb-4 border-b border-zinc-600 pb-1 font-bold text-base flex justify-between items-center",children:[(0,r.jsx)("span",{children:"Joint Controls"}),(0,r.jsx)("button",{onClick:()=>p(!0),className:"ml-2 text-xl hover:bg-zinc-800 px-2 rounded-full",title:"Collapse",children:"\xd7"})]}),y.length>0&&(0,r.jsx)(v,{joints:y,updateJointDegrees:o,updateJointsDegrees:a,keyboardControlMap:u,compoundMovements:m}),w.length>0&&(0,r.jsx)(I,{joints:w,updateJointSpeed:s,updateJointsSpeed:l}),(0,r.jsx)("div",{className:"mt-4 flex justify-between items-center",children:(0,r.jsx)("button",{onClick:i?g:b,disabled:"idle"!==f&&"failed"!==f,className:"text-sm px-3 py-1.5 rounded w-full ".concat("failed"===f?"bg-orange-600 hover:bg-orange-500":i?"bg-red-600 hover:bg-red-500":"bg-blue-600 hover:bg-blue-500",' "text-white" ').concat("idle"!==f&&"failed"!==f?"opacity-50 cursor-not-allowed":""),children:"failed"===f?"Failed. Check serial port permissions. On linux, fix it with: sudo chmod 776 /dev/ttyACM0":"connecting"===f?"Connecting...":"disconnecting"===f?"Disconnecting...":i?"Disconnect Robot":"Connect Real Robot"})}),(0,r.jsx)("br",{}),(0,r.jsx)(M(),{className:"text-blue",href:"https://github.com/dora-bambot/dora-bambot.github.io/tree/main/website/public/URDF",children:"Click me to get the URDF"})]})}var D=o(6629),E=o(7558),P=o(3736),T=o(2480);let A="api_key",R="base_url",_="model";function U(){return window.localStorage.getItem(A)||""}function z(){return window.localStorage.getItem(R)||""}function F(e){return e?"system_prompt_".concat(e):"system_prompt"}function L(e){return window.localStorage.getItem(F(e))||""}function O(e,t){window.localStorage.setItem(F(t),e)}function J(){return localStorage.getItem(_)||""}function W(e){let{show:t,onClose:o,robotName:a,systemPrompt:s}=e,l=(0,n.useRef)(null),[i,d]=(0,n.useState)(""),[c,u]=(0,n.useState)(""),[m,h]=(0,n.useState)(""),[p,f]=(0,n.useState)(""),[x,b]=(0,n.useState)("OpenAI"),[g,y]=(0,n.useState)(!1);(0,n.useEffect)(()=>{if(t){let e=z();d(U()),"https://api.openai.com/v1/"===e||""===e||null==e?(b("OpenAI"),u("https://api.openai.com/v1/"),f(J()||"gpt-4.1-nano")):"http://localhost:11434/v1"===e?(b("Ollama"),u("http://localhost:11434/v1"),f(J()||"mistral-small3.1")):(b("Custom"),u(e),f(J())),h(L(a)||s||"");let t=L(a)||"",o=s||"";y(""!==t&&t!==o&&!!o)}},[t,a,s]);let v=e=>{b(e),"OpenAI"===e?u("https://api.openai.com/v1/"):"Ollama"===e?u("http://localhost:11434/v1"):u(z()||"")};return((0,n.useEffect)(()=>{if(t)return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e);function e(e){l.current&&!l.current.contains(e.target)&&o()}},[t,o]),t)?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-40",children:(0,r.jsxs)("div",{ref:l,className:"bg-zinc-800 p-6 rounded-lg shadow-xl w-96 max-w-full lg:w-[500px] xl:w-[600px] mx-4",children:[(0,r.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,r.jsx)("span",{className:"text-xl font-bold text-white",children:"LLM:"}),(0,r.jsxs)("select",{value:x,onChange:e=>v(e.target.value),className:"p-1 rounded bg-zinc-700 text-white outline-none text-base font-semibold ml-4",children:[(0,r.jsx)("option",{value:"OpenAI",children:"OpenAI"}),(0,r.jsx)("option",{value:"Ollama",children:"Ollama"}),(0,r.jsx)("option",{value:"Custom",children:"Custom"})]})]}),(0,r.jsxs)("div",{className:"mb-2 text-xs text-zinc-300 text-right",children:["OpenAI"===x&&(0,r.jsxs)(r.Fragment,{children:["Get your OpenAI API key at",(0,r.jsx)("a",{href:"https://platform.openai.com/api-keys",target:"_blank",rel:"noopener noreferrer",className:"underline text-blue-300 ml-1",children:"https://platform.openai.com/api-keys"}),".",(0,r.jsx)("br",{}),"The API Key is stored only in your browser."]}),"Ollama"===x&&(0,r.jsxs)(r.Fragment,{children:["Local Ollama does not require an API Key.",(0,r.jsx)("br",{}),"Make sure Ollama service is running locally.",(0,r.jsx)("br",{}),"Download Ollama at https://ollama.com/download"]}),"Custom"===x&&(0,r.jsx)(r.Fragment,{children:"Any OpenAI compatible LLM can be used here."})]}),(0,r.jsxs)("div",{className:"flex items-center mb-4 ml-4",children:[(0,r.jsx)("label",{className:"text-white font-medium flex items-center mr-2 whitespace-nowrap",children:"API Key:"}),(0,r.jsx)("input",{type:"text",value:i,onChange:e=>d(e.target.value),placeholder:"Ollama"===x?"":"sk-...",className:"flex-1 p-2 rounded bg-zinc-700 text-white outline-none"})]}),(0,r.jsxs)("div",{className:"flex items-center mb-4 ml-4",children:[(0,r.jsx)("label",{className:"text-white font-medium mr-2 whitespace-nowrap",children:"Base URL:"}),(0,r.jsx)("input",{type:"text",value:c,onChange:e=>u(e.target.value),placeholder:"OpenAI"===x?"Not required":"Ollama"===x?"http://localhost:11434/v1":"http://your-custom-endpoint/v1",className:"flex-1 p-2 rounded bg-zinc-700 text-white outline-none"})]}),(0,r.jsxs)("div",{className:"flex items-center mb-4 ml-4",children:[(0,r.jsx)("label",{className:"text-white font-medium mr-2 whitespace-nowrap",children:"Model:"}),(0,r.jsx)("input",{type:"text",value:p,onChange:e=>f(e.target.value),placeholder:"Ollama"===x?"mistral-small3.1":"OpenAI"===x?"gpt-4.1-nano":"",className:"flex-1 p-2 rounded bg-zinc-700 text-white outline-none"})]}),(0,r.jsx)("hr",{className:"my-4 border-zinc-600"}),(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"mb-2 flex items-center",children:[(0,r.jsx)("span",{className:"block text-xl font-bold text-white",children:"System Prompt:"}),g&&(0,r.jsx)("button",{className:"ml-3 px-2 py-1 bg-red-600 text-white text-xs rounded hover:bg-red-700",onClick:()=>{window.confirm("Your prompt will be replaced with the default prompt. Please copy your current prompt if you want to save it.")&&(h(s||""),O(s||"",a),y(!1))},title:"Use default prompt",children:"Use default prompt"})]}),(0,r.jsx)("textarea",{value:m,onChange:e=>h(e.target.value),placeholder:"System prompt for the AI model",rows:6,className:"w-full p-2 rounded bg-zinc-700 text-white mb-4 outline-none min-h-[80px] text-base"})]}),(0,r.jsxs)("div",{className:"flex justify-end space-x-2",children:[(0,r.jsx)("button",{onClick:o,className:"bg-zinc-600 hover:bg-zinc-500 text-white px-4 py-2 rounded",children:"Close"}),(0,r.jsx)("button",{onClick:()=>{window.localStorage.setItem(A,i),window.localStorage.setItem(R,c),m!==(s||"")&&O(m,a),localStorage.setItem(_,p),o()},className:"bg-blue-600 hover:bg-blue-500 text-white px-4 py-2 rounded",children:"Save"})]})]})}):null}async function q(){return new Promise(async(e,t)=>{try{let o=await navigator.mediaDevices.getUserMedia({video:!0}),r=document.createElement("video");r.srcObject=o,r.play(),r.onloadedmetadata=()=>{let n=document.createElement("canvas");n.width=r.videoWidth,n.height=r.videoHeight;let a=n.getContext("2d");if(!a)return t("Could not get canvas context");a.drawImage(r,0,0,n.width,n.height),o.getTracks().forEach(e=>e.stop());let s=n.toDataURL("image/jpeg",.9);e(s)}}catch(e){t(e)}})}function V(e){let{robotName:t,systemPrompt:o,updateJointsDegrees:a}=e,[s,l]=(0,n.useState)(""),[i,d]=(0,n.useState)([]),[c,u]=(0,n.useState)(!1),m=U()||"",h=z()||"https://api.openai.com/v1/",p=J()||"gpt-4.1-nano";L(t);let f=(0,T.r)({apiKey:m,baseURL:h}),x=async e=>{d(t=>[...t,{sender:"User",text:e}]);try{var t,o;let r=await q(),n=await (0,P.Df)({model:f(p),messages:[{role:"user",content:[{type:"text",text:e},{type:"image",image:r}]}]}),s=n.text.trim(),l=null==(o=n.response)||null==(t=o.messages[1])?void 0:t.content;for(let e of null!=l?l:[])s+="\n\n".concat(e);d(e=>[...e,{sender:"AI",text:s}]);let i=function(e){let t=e.match(/```json\s*([\s\S]*?)\s*```/);if(!t)return console.error("No JSON block found"),null;try{let e=t[1].trim(),o=JSON.parse(e);if(Array.isArray(o)&&o.every(Array.isArray))return o;return console.error("Parsed JSON is not an array of arrays"),null}catch(e){return console.error("Failed to parse JSON:",e),null}}(s);if(i)for(let e of i){let t=e.map((e,t)=>({servoId:t,value:e}));a(t),await new Promise(e=>setTimeout(e,100))}}catch(e){console.error("Error generating text:",e),d(e=>[...e,{sender:"AI",text:"Error: Unable to process your request."}])}},b=()=>{if(s.trim()){if(!m)return void u(!0);x(s.trim()),l("")}};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"fixed bottom-5 right-5 bg-zinc-900 bg-opacity-80 text-white p-4 rounded-lg shadow-lg w-80 z-50",children:[(0,r.jsxs)("h4",{className:"border-b border-zinc-600 pb-2 font-bold mb-2 flex items-center justify-between",children:[(0,r.jsx)("span",{children:"AI Control Robot"}),(0,r.jsx)("button",{onClick:()=>u(!0),className:"ml-2 bg-zinc-700 hover:bg-zinc-600 text-white py-1 px-2 rounded text-sm",children:"Settings"})]}),(0,r.jsx)("div",{className:"mb-2 max-h-[60vh] overflow-y-auto",children:i.map((e,t)=>(0,r.jsxs)("div",{className:"mb-2 ".concat("AI"===e.sender?"text-green-400":"text-blue-400"),children:[(0,r.jsxs)("strong",{children:[e.sender,":"]})," ",e.text]},t))}),i.length>0&&(0,r.jsx)("div",{className:"mb-2 flex justify-end",children:(0,r.jsx)("button",{onClick:()=>d([]),className:"text-xs bg-zinc-700 hover:bg-zinc-600 text-white px-2 py-1 rounded",children:"Clear"})}),(0,r.jsx)("div",{className:"flex items-center space-x-2",children:(0,r.jsxs)("div",{className:"relative flex items-center w-full",children:[(0,r.jsx)("button",{onClick:()=>alert("Camera support coming soon"),className:"absolute left-0 bg-zinc-700 hover:bg-zinc-600 text-zinc-400 p-2 rounded",children:(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",className:"w-5 h-5","aria-hidden":"true",children:[(0,r.jsx)("path",{d:"M16 4C16.5523 4 17 4.44772 17 5V9.2L22.2133 5.55071C22.4395 5.39235 22.7513 5.44737 22.9096 5.6736C22.9684 5.75764 23 5.85774 23 5.96033V18.0397C23 18.3158 22.7761 18.5397 22.5 18.5397C22.3974 18.5397 22.2973 18.5081 22.2133 18.4493L17 14.8V19C17 19.5523 16.5523 20 16 20H2C1.44772 20 1 19.5523 1 19V5C1 4.44772 1.44772 4 2 4H16ZM15 6H3V18H15V6ZM7.4 8.82867C7.47607 8.82867 7.55057 8.85036 7.61475 8.8912L11.9697 11.6625C12.1561 11.7811 12.211 12.0284 12.0924 12.2148C12.061 12.2641 12.0191 12.306 11.9697 12.3375L7.61475 15.1088C7.42837 15.2274 7.18114 15.1725 7.06254 14.9861C7.02169 14.9219 7 14.8474 7 14.7713V9.22867C7 9.00776 7.17909 8.82867 7.4 8.82867ZM21 8.84131L17 11.641V12.359L21 15.1587V8.84131Z"})," "]})}),(0,r.jsx)("input",{type:"text",value:s,onChange:e=>l(e.target.value),onKeyPress:e=>{"Enter"===e.key&&b()},onKeyDown:e=>e.stopPropagation(),onKeyUp:e=>e.stopPropagation(),placeholder:"Type a command...",className:"flex-1 pl-10 p-2 rounded bg-zinc-700 text-white outline-none"})]})})]}),(0,r.jsx)(W,{show:c,onClose:()=>u(!1),robotName:t,systemPrompt:o})]})}function H(e){let{robotName:t,urdfUrl:o,orbitTarget:c,jointDetails:u,setJointDetails:m,jointStates:p}=e,{scene:f}=(0,l.A)(),x=(0,n.useRef)(null);return(0,n.useEffect)(()=>{let e=new s.KPJ;new i.A(e).load(o,e=>{x.current=e,m(e.joints?Object.values(e.joints).filter(e=>"revolute"===e.jointType||"continuous"===e.jointType).map(e=>({name:e.name,servoId:a[t].jointNameIdMap[e.name],limit:{lower:void 0===e.limit.lower?void 0:Number(e.limit.lower),upper:void 0===e.limit.upper?void 0:Number(e.limit.upper)},jointType:e.jointType})):[]),e.rotateOnAxis(new s.Pq0(1,0,0),-(Math.PI/2)),e.traverse(e=>e.castShadow=!0),e.updateMatrixWorld(!0),e.scale.set(15,15,15),f.add(e)},void 0,e=>console.error("Error loading URDF:",e))},[t,o,m]),(0,l.C)((e,t)=>{x.current&&x.current.joints&&p.forEach(e=>{let o=x.current.joints[e.name];if(o){if(void 0!==e.virtualDegrees&&"continuous"!==o.jointType)o.setJointValue(e.virtualDegrees*Math.PI/180);else if(void 0!==e.virtualSpeed&&"continuous"===o.jointType){let r=Number(o.angle)||0;o.setJointValue(r+e.virtualSpeed*t/500)}}})}),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(d.N,{target:c||[0,.1,.1]}),(0,r.jsx)(h,{}),(0,r.jsx)("directionalLight",{castShadow:!0,intensity:1,position:[2,20,5],"shadow-mapSize-width":1024,"shadow-mapSize-height":1024}),(0,r.jsx)("directionalLight",{intensity:1,position:[-2,20,-5],"shadow-mapSize-width":1024,"shadow-mapSize-height":1024}),(0,r.jsx)("ambientLight",{intensity:.4})]})}function K(){let{progress:e}=(0,c.p)();return(0,r.jsxs)(u.E,{center:!0,className:"text-4xl text-white",children:[e," % loaded"]})}function Y(e){let{robotName:t}=e,[o,l]=(0,n.useState)([]),i=a[t];if(!i)throw Error('Robot configuration for "'.concat(t,'" not found.'));let{urdfUrl:d,orbitTarget:c,camera:u,keyboardControlMap:m,jointNameIdMap:h,compoundMovements:p,systemPrompt:f}=i,{isConnected:x,connectRobot:g,disconnectRobot:y,jointStates:v,updateJointSpeed:w,setJointDetails:j,updateJointDegrees:k,updateJointsDegrees:N,updateJointsSpeed:I}=function(e){let[t,o]=(0,n.useState)(!1),[r,a]=(0,n.useState)(e),[s,l]=(0,n.useState)(r.map((e,t)=>({jointType:e.jointType,virtualDegrees:"revolute"===e.jointType?0:void 0,realDegrees:"revolute"===e.jointType?"N/A":void 0,virtualSpeed:"continuous"===e.jointType?0:void 0,realSpeed:"continuous"===e.jointType?"N/A":void 0,servoId:e.servoId,name:e.name,limit:e.limit}))),[i,d]=(0,n.useState)([]);(0,n.useEffect)(()=>{l(r.map((e,t)=>({jointType:e.jointType,virtualDegrees:"revolute"===e.jointType?0:void 0,realDegrees:"revolute"===e.jointType?"N/A":void 0,virtualSpeed:"continuous"===e.jointType?0:void 0,realSpeed:"continuous"===e.jointType?"N/A":void 0,servoId:e.servoId,name:e.name,limit:e.limit})))},[r]);let c=(0,n.useCallback)(async()=>{try{await D.D.connect(),o(!0),console.log("Robot connected successfully.");let t=[...s],n=[];for(let o=0;o{try{for(let e=0;ee.map(e=>"revolute"===e.jointType?{...e,realDegrees:"N/A"}:{...e,realSpeed:"N/A"}))}catch(e){console.error("Failed to disconnect from the robot:",e)}},[r]),m=(0,n.useCallback)(async(e,o)=>{let r=[...s],n=r.findIndex(t=>t.servoId===e);if(-1!==n){if(r[n].virtualDegrees=o,t)try{let t=b(o);console.log("Updating servoId ".concat(e," to position:"),t,"degrees:",o),await D.D.writePosition(e,Math.round(t))}catch(t){console.error("Failed to update servo degrees for joint with servoId ".concat(e,":"),t)}l(r)}},[s,t,i]),h=(0,n.useCallback)(async(e,o)=>{let r=[...s],n=r.findIndex(t=>t.servoId===e);if(-1!==n){if(r[n].virtualSpeed=o,t)try{await D.D.writeWheelSpeed(e,o),r[n].realSpeed=o}catch(t){console.error("Failed to update speed for joint with servoId ".concat(e,":"),t),r[n].realSpeed="error"}l(r)}},[s,t]),p=(0,n.useCallback)(async e=>{let o=[...s],r={},n=[];if(e.forEach(e=>{let{servoId:a,value:s}=e,l=o.findIndex(e=>e.servoId===a);if(-1!==l&&(o[l].virtualDegrees=s,t)){let e=b(s);console.log("Updating servoId ".concat(a," to position:"),e,"degrees:",s),r[a]=Math.round(e),n.push({servoId:a,value:s,relativeValue:s})}}),t&&Object.keys(r).length>0)try{await D.D.syncWritePositions(r),n.forEach(e=>{let{servoId:t,relativeValue:r}=e,n=o.findIndex(e=>e.servoId===t);-1!==n&&(o[n].realDegrees=r,o[n].virtualDegrees=r)})}catch(e){console.error("Failed to update multiple servo degrees:",e),n.forEach(e=>{let{servoId:t}=e;o.findIndex(e=>e.servoId===t)})}l(o)},[s,t,i]),f=(0,n.useCallback)(async e=>{let o=[...s],r={},n=[];if(e.forEach(e=>{let{servoId:a,speed:s}=e,l=o.findIndex(e=>e.servoId===a);-1!==l&&(o[l].virtualSpeed=s,t&&(r[a]=s,n.push({servoId:a,speed:s})))}),t&&Object.keys(r).length>0)try{await D.D.syncWriteWheelSpeed(r),n.forEach(e=>{let{servoId:t,speed:r}=e,n=o.findIndex(e=>e.servoId===t);-1!==n&&(o[n].realSpeed=r)})}catch(e){console.error("Failed to update multiple servo speeds:",e),n.forEach(e=>{let{servoId:t}=e,r=o.findIndex(e=>e.servoId===t);-1!==r&&(o[r].realSpeed="error")})}l(o)},[s,t]);return{isConnected:t,connectRobot:c,disconnectRobot:u,jointStates:s,updateJointDegrees:m,updateJointsDegrees:p,updateJointSpeed:h,updateJointsSpeed:f,setJointDetails:a}}(o);return(0,n.useEffect)(()=>{j(o)},[o,j]),window.bambotCompoundMovements=i.compoundMovements,(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E.Hl,{shadows:!0,camera:{position:u.position,fov:u.fov},onCreated:e=>{let{scene:t}=e;t.background=new s.Q1f(2503224)},children:(0,r.jsx)(n.Suspense,{fallback:(0,r.jsx)(K,{}),children:(0,r.jsx)(H,{robotName:t,urdfUrl:d,orbitTarget:c,jointDetails:o,setJointDetails:l,jointStates:v})})}),(0,r.jsx)(C,{updateJointsSpeed:I,jointStates:v,updateJointDegrees:k,updateJointsDegrees:N,updateJointSpeed:w,isConnected:x,connectRobot:g,disconnectRobot:y,keyboardControlMap:m,compoundMovements:p}),(0,r.jsx)(V,{robotName:t,systemPrompt:f,updateJointsDegrees:N})]})}function G(){return(0,r.jsx)(Y,{robotName:"so-arm101"})}}},e=>{var t=t=>e(e.s=t);e.O(0,[367,831,803,413,874,881,441,684,358],()=>t(2609)),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/b536a0f1-8e928607e65d05e8.js b/_next/static/chunks/b536a0f1-8e928607e65d05e8.js new file mode 100644 index 0000000000000000000000000000000000000000..ca0c22b5521b1fa4ed5f2f9af21c49b93b50a6c4 --- /dev/null +++ b/_next/static/chunks/b536a0f1-8e928607e65d05e8.js @@ -0,0 +1,197 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[367],{7431:(e,n,t)=>{t.r(n),t.d(n,{ACESFilmicToneMapping:()=>r.FV,AddEquation:()=>r.gO9,AddOperation:()=>r.XrR,AdditiveAnimationBlendMode:()=>r.DAe,AdditiveBlending:()=>r.EZo,AgXToneMapping:()=>r.LAk,AlphaFormat:()=>r.wrO,AlwaysCompare:()=>r.FFZ,AlwaysDepth:()=>r.lGu,AlwaysStencilFunc:()=>r.sKt,AmbientLight:()=>r.$p8,AnimationAction:()=>r.pPE,AnimationClip:()=>r.tz3,AnimationLoader:()=>r.kEx,AnimationMixer:()=>r.Iw4,AnimationObjectGroup:()=>r.P5j,AnimationUtils:()=>r.AKb,ArcCurve:()=>r.ibB,ArrayCamera:()=>r.nZQ,ArrowHelper:()=>r.E0M,AttachedBindMode:()=>r.BER,Audio:()=>r.fP5,AudioAnalyser:()=>r.CwR,AudioContext:()=>r.UtX,AudioListener:()=>r.Pf$,AudioLoader:()=>r.Am1,AxesHelper:()=>r.IzY,BackSide:()=>r.hsX,BasicDepthPacking:()=>r.Rkk,BasicShadowMap:()=>r.bTm,BatchedMesh:()=>r.$Ed,Bone:()=>r.$Kf,BooleanKeyframeTrack:()=>r.YOZ,Box2:()=>r.UtB,Box3:()=>r.NRn,Box3Helper:()=>r.BND,BoxGeometry:()=>r.iNn,BoxHelper:()=>r.IWo,BufferAttribute:()=>r.THS,BufferGeometry:()=>r.LoY,BufferGeometryLoader:()=>r.SUR,ByteType:()=>r.tJf,Cache:()=>r.l2R,Camera:()=>r.i7d,CameraHelper:()=>r.WTh,CanvasTexture:()=>r.GOR,CapsuleGeometry:()=>r.qU7,CatmullRomCurve3:()=>r.B6O,CineonToneMapping:()=>r.nNL,CircleGeometry:()=>r.tcD,ClampToEdgeWrapping:()=>r.ghU,Clock:()=>r.zD7,Color:()=>r.Q1f,ColorKeyframeTrack:()=>r.T6I,ColorManagement:()=>r.ppV,CompressedArrayTexture:()=>r.iOZ,CompressedCubeTexture:()=>r.c5h,CompressedTexture:()=>r.FvD,CompressedTextureLoader:()=>r.YRT,ConeGeometry:()=>r.qFE,ConstantAlphaFactor:()=>r.e0p,ConstantColorFactor:()=>r.RrE,Controls:()=>r.H2z,CubeCamera:()=>r.F1T,CubeReflectionMapping:()=>r.hy7,CubeRefractionMapping:()=>r.xFO,CubeTexture:()=>r.b4q,CubeTextureLoader:()=>r.ScU,CubeUVReflectionMapping:()=>r.Om,CubicBezierCurve:()=>r.Z0B,CubicBezierCurve3:()=>r.s0K,CubicInterpolant:()=>r.Pdi,CullFaceBack:()=>r.Vb5,CullFaceFront:()=>r.Jnc,CullFaceFrontBack:()=>r.ywQ,CullFaceNone:()=>r.WNZ,Curve:()=>r.Ipv,CurvePath:()=>r.jGm,CustomBlending:()=>r.bCz,CustomToneMapping:()=>r.g7M,CylinderGeometry:()=>r.Ho_,Cylindrical:()=>r.hjs,Data3DTexture:()=>r.dYF,DataArrayTexture:()=>r.rFo,DataTexture:()=>r.GYF,DataTextureLoader:()=>r.BRH,DataUtils:()=>r.GxU,DecrementStencilOp:()=>r.ROr,DecrementWrapStencilOp:()=>r.fJr,DefaultLoadingManager:()=>r.h_9,DepthFormat:()=>r.zdS,DepthStencilFormat:()=>r.dcC,DepthTexture:()=>r.VCu,DetachedBindMode:()=>r.Fvi,DirectionalLight:()=>r.ZyN,DirectionalLightHelper:()=>r.PFK,DiscreteInterpolant:()=>r.Yhb,DodecahedronGeometry:()=>r.nEu,DoubleSide:()=>r.$EB,DstAlphaFactor:()=>r.hdd,DstColorFactor:()=>r.wn6,DynamicCopyUsage:()=>r.MOq,DynamicDrawUsage:()=>r.Vnu,DynamicReadUsage:()=>r.hIf,EdgesGeometry:()=>r.TDQ,EllipseCurve:()=>r.S20,EqualCompare:()=>r.kO0,EqualDepth:()=>r.U3G,EqualStencilFunc:()=>r.jsO,EquirectangularReflectionMapping:()=>r.wfO,EquirectangularRefractionMapping:()=>r.uV5,Euler:()=>r.O9p,EventDispatcher:()=>r.Qev,ExtrudeGeometry:()=>r.QCA,FileLoader:()=>r.Y9S,Float16BufferAttribute:()=>r.Oax,Float32BufferAttribute:()=>r.qtW,FloatType:()=>r.RQf,Fog:()=>r.jUj,FogExp2:()=>r.cRK,FramebufferTexture:()=>r.Pem,FrontSide:()=>r.hB5,Frustum:()=>r.PPD,GLBufferAttribute:()=>r.oh6,GLSL1:()=>r.Wyr,GLSL3:()=>r.Wdf,GreaterCompare:()=>r.eoi,GreaterDepth:()=>r.K52,GreaterEqualCompare:()=>r.gWB,GreaterEqualDepth:()=>r.Gwm,GreaterEqualStencilFunc:()=>r.TMh,GreaterStencilFunc:()=>r.RcT,GridHelper:()=>r.fTw,Group:()=>r.YJl,HalfFloatType:()=>r.ix0,HemisphereLight:()=>r.dth,HemisphereLightHelper:()=>r.R1W,IcosahedronGeometry:()=>r.WBB,ImageBitmapLoader:()=>r.Kzg,ImageLoader:()=>r.$NF,ImageUtils:()=>r.HgN,IncrementStencilOp:()=>r.HLH,IncrementWrapStencilOp:()=>r.Ru$,InstancedBufferAttribute:()=>r.uWO,InstancedBufferGeometry:()=>r.CmU,InstancedInterleavedBuffer:()=>r.LuO,InstancedMesh:()=>r.ZLX,Int16BufferAttribute:()=>r.Hrb,Int32BufferAttribute:()=>r.vmz,Int8BufferAttribute:()=>r.wvS,IntType:()=>r.Yuy,InterleavedBuffer:()=>r.eB$,InterleavedBufferAttribute:()=>r.eHs,Interpolant:()=>r.lGw,InterpolateDiscrete:()=>r.ljd,InterpolateLinear:()=>r.PJ3,InterpolateSmooth:()=>r.EQC,InvertStencilOp:()=>r.oVO,KeepStencilOp:()=>r.VVr,KeyframeTrack:()=>r.UJ6,LOD:()=>r.UpK,LatheGeometry:()=>r.nzx,Layers:()=>r.zgK,LessCompare:()=>r.vim,LessDepth:()=>r.brA,LessEqualCompare:()=>r.TiK,LessEqualDepth:()=>r.xSv,LessEqualStencilFunc:()=>r.CR7,LessStencilFunc:()=>r.kYr,Light:()=>r.veJ,LightProbe:()=>r.FZo,Line:()=>r.N1A,Line3:()=>r.cZY,LineBasicMaterial:()=>r.mrM,LineCurve:()=>r.GZZ,LineCurve3:()=>r.VnP,LineDashedMaterial:()=>r.Fvt,LineLoop:()=>r.FCc,LineSegments:()=>r.DXC,LinearFilter:()=>r.k6q,LinearInterpolant:()=>r.ezk,LinearMipMapLinearFilter:()=>r.NZq,LinearMipMapNearestFilter:()=>r.iUH,LinearMipmapLinearFilter:()=>r.$_I,LinearMipmapNearestFilter:()=>r.kRr,LinearSRGBColorSpace:()=>r.Zr2,LinearToneMapping:()=>r.kyO,LinearTransfer:()=>r.VxR,Loader:()=>r.aHM,LoaderUtils:()=>r.r6x,LoadingManager:()=>r.KPJ,LoopOnce:()=>r.G3T,LoopPingPong:()=>r.lc7,LoopRepeat:()=>r.aMy,LuminanceAlphaFormat:()=>r.CMB,LuminanceFormat:()=>r.Kzv,MOUSE:()=>r.kBv,Material:()=>r.imn,MaterialLoader:()=>r.jut,MathUtils:()=>r.cj9,Matrix2:()=>r.k_V,Matrix3:()=>r.dwI,Matrix4:()=>r.kn4,MaxEquation:()=>r.$ei,Mesh:()=>r.eaF,MeshBasicMaterial:()=>r.V9B,MeshDepthMaterial:()=>r.CSG,MeshDistanceMaterial:()=>r.aVO,MeshLambertMaterial:()=>r.G_z,MeshMatcapMaterial:()=>r.FNr,MeshNormalMaterial:()=>r.qBx,MeshPhongMaterial:()=>r.tXL,MeshPhysicalMaterial:()=>r.uSd,MeshStandardMaterial:()=>r._4j,MeshToonMaterial:()=>r.Df,MinEquation:()=>r.znC,MirroredRepeatWrapping:()=>r.kTW,MixOperation:()=>r.KRh,MultiplyBlending:()=>r.EdD,MultiplyOperation:()=>r.caT,NearestFilter:()=>r.hxR,NearestMipMapLinearFilter:()=>r.a$r,NearestMipMapNearestFilter:()=>r.$O9,NearestMipmapLinearFilter:()=>r.Cfg,NearestMipmapNearestFilter:()=>r.pHI,NeutralToneMapping:()=>r.aJ8,NeverCompare:()=>r.amv,NeverDepth:()=>r.eHc,NeverStencilFunc:()=>r.HPb,NoBlending:()=>r.XIg,NoColorSpace:()=>r.jf0,NoToneMapping:()=>r.y_p,NormalAnimationBlendMode:()=>r.Ke9,NormalBlending:()=>r.NTi,NotEqualCompare:()=>r.jzd,NotEqualDepth:()=>r.bw0,NotEqualStencilFunc:()=>r.klZ,NumberKeyframeTrack:()=>r.Hit,Object3D:()=>r.B69,ObjectLoader:()=>r.XTe,ObjectSpaceNormalMap:()=>r.vyJ,OctahedronGeometry:()=>r.Ufg,OneFactor:()=>r.qad,OneMinusConstantAlphaFactor:()=>r.ov9,OneMinusConstantColorFactor:()=>r.$Yl,OneMinusDstAlphaFactor:()=>r.Nt7,OneMinusDstColorFactor:()=>r.aEY,OneMinusSrcAlphaFactor:()=>r.OuU,OneMinusSrcColorFactor:()=>r.LiQ,OrthographicCamera:()=>r.qUd,PCFShadowMap:()=>r.QP0,PCFSoftShadowMap:()=>r.Wk7,PMREMGenerator:()=>P,Path:()=>r.wAk,PerspectiveCamera:()=>r.ubm,Plane:()=>r.Zcv,PlaneGeometry:()=>r.bdM,PlaneHelper:()=>r.ZM4,PointLight:()=>r.HiM,PointLightHelper:()=>r.F1l,Points:()=>r.ONl,PointsMaterial:()=>r.BH$,PolarGridHelper:()=>r.hzE,PolyhedronGeometry:()=>r.pFK,PositionalAudio:()=>r.xZx,PropertyBinding:()=>r.Nwf,PropertyMixer:()=>r.N2s,QuadraticBezierCurve:()=>r.dAo,QuadraticBezierCurve3:()=>r.CV9,Quaternion:()=>r.PTz,QuaternionKeyframeTrack:()=>r.MBL,QuaternionLinearInterpolant:()=>r.GBG,RED_GREEN_RGTC2_Format:()=>r.HO_,RED_RGTC1_Format:()=>r.Kef,REVISION:()=>r.sPf,RGBADepthPacking:()=>r.N5j,RGBAFormat:()=>r.GWd,RGBAIntegerFormat:()=>r.c90,RGBA_ASTC_10x10_Format:()=>r.y3Z,RGBA_ASTC_10x5_Format:()=>r.uB5,RGBA_ASTC_10x6_Format:()=>r.lyL,RGBA_ASTC_10x8_Format:()=>r.bC7,RGBA_ASTC_12x10_Format:()=>r.ojs,RGBA_ASTC_12x12_Format:()=>r.S$4,RGBA_ASTC_4x4_Format:()=>r.qa3,RGBA_ASTC_5x4_Format:()=>r.B_h,RGBA_ASTC_5x5_Format:()=>r.czI,RGBA_ASTC_6x5_Format:()=>r.rSH,RGBA_ASTC_6x6_Format:()=>r.Qrf,RGBA_ASTC_8x5_Format:()=>r.psI,RGBA_ASTC_8x6_Format:()=>r.a5J,RGBA_ASTC_8x8_Format:()=>r._QJ,RGBA_BPTC_Format:()=>r.Fn,RGBA_ETC2_EAC_Format:()=>r.KDk,RGBA_PVRTC_2BPPV1_Format:()=>r.pBf,RGBA_PVRTC_4BPPV1_Format:()=>r.HXV,RGBA_S3TC_DXT1_Format:()=>r.Nz6,RGBA_S3TC_DXT3_Format:()=>r.jR7,RGBA_S3TC_DXT5_Format:()=>r.BXX,RGBDepthPacking:()=>r.wTz,RGBFormat:()=>r.HIg,RGBIntegerFormat:()=>r.VGF,RGB_BPTC_SIGNED_Format:()=>r.H23,RGB_BPTC_UNSIGNED_Format:()=>r.W9U,RGB_ETC1_Format:()=>r.CVz,RGB_ETC2_Format:()=>r.Riy,RGB_PVRTC_2BPPV1_Format:()=>r.kTp,RGB_PVRTC_4BPPV1_Format:()=>r.k6Q,RGB_S3TC_DXT1_Format:()=>r.IE4,RGDepthPacking:()=>r.k8v,RGFormat:()=>r.paN,RGIntegerFormat:()=>r.TkQ,RawShaderMaterial:()=>r.D$Q,Ray:()=>r.RlV,Raycaster:()=>r.tBo,RectAreaLight:()=>r.ure,RedFormat:()=>r.VT0,RedIntegerFormat:()=>r.ZQM,ReinhardToneMapping:()=>r.Mjd,RenderTarget:()=>r.O0B,RenderTarget3D:()=>r.XMJ,RenderTargetArray:()=>r.rrX,RepeatWrapping:()=>r.GJx,ReplaceStencilOp:()=>r.kG0,ReverseSubtractEquation:()=>r.nST,RingGeometry:()=>r.rKP,SIGNED_RED_GREEN_RGTC2_Format:()=>r.CWW,SIGNED_RED_RGTC1_Format:()=>r.XG_,SRGBColorSpace:()=>r.er$,SRGBTransfer:()=>r.KLL,Scene:()=>r.Z58,ShaderChunk:()=>o,ShaderLib:()=>s,ShaderMaterial:()=>r.BKk,ShadowMaterial:()=>r.q2,Shape:()=>r.ypk,ShapeGeometry:()=>r.MSw,ShapePath:()=>r.Ld9,ShapeUtils:()=>r.xJ6,ShortType:()=>r.fBL,Skeleton:()=>r.EAD,SkeletonHelper:()=>r._xc,SkinnedMesh:()=>r.I46,Source:()=>r.kLi,Sphere:()=>r.iyt,SphereGeometry:()=>r.Gu$,Spherical:()=>r.YHV,SphericalHarmonics3:()=>r.xOk,SplineCurve:()=>r.xfg,SpotLight:()=>r.nCl,SpotLightHelper:()=>r.Fpm,Sprite:()=>r.kxk,SpriteMaterial:()=>r.RoJ,SrcAlphaFactor:()=>r.ie2,SrcAlphaSaturateFactor:()=>r.hgQ,SrcColorFactor:()=>r.f4X,StaticCopyUsage:()=>r.Hrq,StaticDrawUsage:()=>r.agE,StaticReadUsage:()=>r.uXQ,StereoCamera:()=>r.keZ,StreamCopyUsage:()=>r.rOG,StreamDrawUsage:()=>r.Ktl,StreamReadUsage:()=>r.uov,StringKeyframeTrack:()=>r.hZF,SubtractEquation:()=>r.FXf,SubtractiveBlending:()=>r.Kwu,TOUCH:()=>r.wtR,TangentSpaceNormalMap:()=>r.bI3,TetrahedronGeometry:()=>r.Zpd,Texture:()=>r.gPd,TextureLoader:()=>r.Tap,TextureUtils:()=>r.Vwu,TimestampQuery:()=>r.v9J,TorusGeometry:()=>r.O3Y,TorusKnotGeometry:()=>r.UPV,Triangle:()=>r.lMl,TriangleFanDrawMode:()=>r.rYR,TriangleStripDrawMode:()=>r.O49,TrianglesDrawMode:()=>r.RJ4,TubeGeometry:()=>r.j6,UVMapping:()=>r.UTZ,Uint16BufferAttribute:()=>r.A$4,Uint32BufferAttribute:()=>r.MW4,Uint8BufferAttribute:()=>r.baL,Uint8ClampedBufferAttribute:()=>r.fc6,Uniform:()=>r.nc$,UniformsGroup:()=>r.dzP,UniformsLib:()=>l,UniformsUtils:()=>r.LlO,UnsignedByteType:()=>r.OUM,UnsignedInt248Type:()=>r.V3x,UnsignedInt5999Type:()=>r.Dmk,UnsignedIntType:()=>r.bkx,UnsignedShort4444Type:()=>r.Wew,UnsignedShort5551Type:()=>r.gJ2,UnsignedShortType:()=>r.cHt,VSMShadowMap:()=>r.RyA,Vector2:()=>r.I9Y,Vector3:()=>r.Pq0,Vector4:()=>r.IUQ,VectorKeyframeTrack:()=>r.RiT,VideoFrameTexture:()=>r.SYV,VideoTexture:()=>r.Nv2,WebGL3DRenderTarget:()=>r.ALV,WebGLArrayRenderTarget:()=>r.y9J,WebGLCoordinateSystem:()=>r.TdN,WebGLCubeRenderTarget:()=>r.o6l,WebGLRenderTarget:()=>r.nWS,WebGLRenderer:()=>nb,WebGLUtils:()=>nv,WebGPUCoordinateSystem:()=>r.i7u,WebXRController:()=>r.R3r,WireframeGeometry:()=>r.XJ7,WrapAroundEnding:()=>r.dhZ,ZeroCurvatureEnding:()=>r.rQf,ZeroFactor:()=>r.ojh,ZeroSlopeEnding:()=>r.h2z,ZeroStencilOp:()=>r.kqe,createCanvasElement:()=>r.lPF});var r=t(3264);function i(){let e=null,n=!1,t=null,r=null;function i(n,a){t(n,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==n&&null!==t&&(r=e.requestAnimationFrame(i),n=!0)},stop:function(){e.cancelAnimationFrame(r),n=!1},setAnimationLoop:function(e){t=e},setContext:function(n){e=n}}}function a(e){let n=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),n.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);let r=n.get(t);r&&(e.deleteBuffer(r.buffer),n.delete(t))},update:function(t,r){if(t.isInterleavedBufferAttribute&&(t=t.data),t.isGLBufferAttribute){let e=n.get(t);(!e||e.versione.start-n.start);let n=0;for(let e=1;e 0\n vec4 plane;\n #ifdef ALPHA_TO_COVERAGE\n float distanceToPlane, distanceGradient;\n float clipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n if ( clipOpacity == 0.0 ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n float unionClipOpacity = 1.0;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n distanceGradient = fwidth( distanceToPlane ) / 2.0;\n unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n }\n #pragma unroll_loop_end\n clipOpacity *= 1.0 - unionClipOpacity;\n #endif\n diffuseColor.a *= clipOpacity;\n if ( diffuseColor.a == 0.0 ) discard;\n #else\n #pragma unroll_loop_start\n for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n }\n #pragma unroll_loop_end\n #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n bool clipped = true;\n #pragma unroll_loop_start\n for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n plane = clippingPlanes[ i ];\n clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n }\n #pragma unroll_loop_end\n if ( clipped ) discard;\n #endif\n #endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n varying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n vClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n diffuseColor *= vColor;\n#elif defined( USE_COLOR )\n diffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR )\n varying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n varying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n varying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n vColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n vColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n vColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n vColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n vColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n const highp float a = 12.9898, b = 78.233, c = 43758.5453;\n highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n return fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n float precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n float precisionSafeLength( vec3 v ) {\n float maxComponent = max3( abs( v ) );\n return length( v / maxComponent ) * maxComponent;\n }\n#endif\nstruct IncidentLight {\n vec3 color;\n vec3 direction;\n bool visible;\n};\nstruct ReflectedLight {\n vec3 directDiffuse;\n vec3 directSpecular;\n vec3 indirectDiffuse;\n vec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n varying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n mat3 tmp;\n tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n return tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n return m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n return vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n return RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n #define cubeUV_minMipLevel 4.0\n #define cubeUV_minTileSize 16.0\n float getFace( vec3 direction ) {\n vec3 absDirection = abs( direction );\n float face = - 1.0;\n if ( absDirection.x > absDirection.z ) {\n if ( absDirection.x > absDirection.y )\n face = direction.x > 0.0 ? 0.0 : 3.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n } else {\n if ( absDirection.z > absDirection.y )\n face = direction.z > 0.0 ? 2.0 : 5.0;\n else\n face = direction.y > 0.0 ? 1.0 : 4.0;\n }\n return face;\n }\n vec2 getUV( vec3 direction, float face ) {\n vec2 uv;\n if ( face == 0.0 ) {\n uv = vec2( direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 1.0 ) {\n uv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n } else if ( face == 2.0 ) {\n uv = vec2( - direction.x, direction.y ) / abs( direction.z );\n } else if ( face == 3.0 ) {\n uv = vec2( - direction.z, direction.y ) / abs( direction.x );\n } else if ( face == 4.0 ) {\n uv = vec2( - direction.x, direction.z ) / abs( direction.y );\n } else {\n uv = vec2( direction.x, direction.y ) / abs( direction.z );\n }\n return 0.5 * ( uv + 1.0 );\n }\n vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n float face = getFace( direction );\n float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n mipInt = max( mipInt, cubeUV_minMipLevel );\n float faceSize = exp2( mipInt );\n highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n if ( face > 2.0 ) {\n uv.y += faceSize;\n face -= 3.0;\n }\n uv.x += face * faceSize;\n uv.x += filterInt * 3.0 * cubeUV_minTileSize;\n uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n uv.x *= CUBEUV_TEXEL_WIDTH;\n uv.y *= CUBEUV_TEXEL_HEIGHT;\n #ifdef texture2DGradEXT\n return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n #else\n return texture2D( envMap, uv ).rgb;\n #endif\n }\n #define cubeUV_r0 1.0\n #define cubeUV_m0 - 2.0\n #define cubeUV_r1 0.8\n #define cubeUV_m1 - 1.0\n #define cubeUV_r4 0.4\n #define cubeUV_m4 2.0\n #define cubeUV_r5 0.305\n #define cubeUV_m5 3.0\n #define cubeUV_r6 0.21\n #define cubeUV_m6 4.0\n float roughnessToMip( float roughness ) {\n float mip = 0.0;\n if ( roughness >= cubeUV_r1 ) {\n mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n } else if ( roughness >= cubeUV_r4 ) {\n mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n } else if ( roughness >= cubeUV_r5 ) {\n mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n } else if ( roughness >= cubeUV_r6 ) {\n mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n } else {\n mip = - 2.0 * log2( 1.16 * roughness ); }\n return mip;\n }\n vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n float mipF = fract( mip );\n float mipInt = floor( mip );\n vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n if ( mipF == 0.0 ) {\n return vec4( color0, 1.0 );\n } else {\n vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n return vec4( mix( color0, color1, mipF ), 1.0 );\n }\n }\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n vec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n mat3 bm = mat3( batchingMatrix );\n transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n transformedNormal = bm * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = bm * transformedTangent;\n #endif\n#endif\n#ifdef USE_INSTANCING\n mat3 im = mat3( instanceMatrix );\n transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n transformedNormal = im * transformedNormal;\n #ifdef USE_TANGENT\n transformedTangent = im * transformedTangent;\n #endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n transformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n #ifdef FLIP_SIDED\n transformedTangent = - transformedTangent;\n #endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n uniform sampler2D displacementMap;\n uniform float displacementScale;\n uniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n #ifdef DECODE_VIDEO_TEXTURE_EMISSIVE\n emissiveColor = sRGBTransferEOTF( emissiveColor );\n #endif\n totalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n uniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"vec4 LinearTransferOETF( in vec4 value ) {\n return value;\n}\nvec4 sRGBTransferEOTF( in vec4 value ) {\n return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a );\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vec3 cameraToFrag;\n if ( isOrthographic ) {\n cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToFrag = normalize( vWorldPosition - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vec3 reflectVec = reflect( cameraToFrag, worldNormal );\n #else\n vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n #endif\n #else\n vec3 reflectVec = vReflect;\n #endif\n #ifdef ENVMAP_TYPE_CUBE\n vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n #else\n vec4 envColor = vec4( 0.0 );\n #endif\n #ifdef ENVMAP_BLENDING_MULTIPLY\n outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_MIX )\n outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n #elif defined( ENVMAP_BLENDING_ADD )\n outgoingLight += envColor.xyz * specularStrength * reflectivity;\n #endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n uniform float envMapIntensity;\n uniform float flipEnvMap;\n uniform mat3 envMapRotation;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n #else\n uniform sampler2D envMap;\n #endif\n \n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n uniform float reflectivity;\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n varying vec3 vWorldPosition;\n uniform float refractionRatio;\n #else\n varying vec3 vReflect;\n #endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n #define ENV_WORLDPOS\n #endif\n #ifdef ENV_WORLDPOS\n \n varying vec3 vWorldPosition;\n #else\n varying vec3 vReflect;\n uniform float refractionRatio;\n #endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n vec3 getIBLIrradiance( const in vec3 normal ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n return PI * envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 reflectVec = reflect( - viewDir, normal );\n reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n return envMapColor.rgb * envMapIntensity;\n #else\n return vec3( 0.0 );\n #endif\n }\n #ifdef USE_ANISOTROPY\n vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n #ifdef ENVMAP_TYPE_CUBE_UV\n vec3 bentNormal = cross( bitangent, viewDir );\n bentNormal = normalize( cross( bentNormal, bitangent ) );\n bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n return getIBLRadiance( viewDir, bentNormal, roughness );\n #else\n return vec3( 0.0 );\n #endif\n }\n #endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n #ifdef ENV_WORLDPOS\n vWorldPosition = worldPosition.xyz;\n #else\n vec3 cameraToVertex;\n if ( isOrthographic ) {\n cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n } else {\n cameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n }\n vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n #ifdef ENVMAP_MODE_REFLECTION\n vReflect = reflect( cameraToVertex, worldNormal );\n #else\n vReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n #endif\n #endif\n#endif",fog_vertex:"#ifdef USE_FOG\n vFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n varying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n #ifdef FOG_EXP2\n float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n #else\n float fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n #endif\n gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n uniform vec3 fogColor;\n varying float vFogDepth;\n #ifdef FOG_EXP2\n uniform float fogDensity;\n #else\n uniform float fogNear;\n uniform float fogFar;\n #endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n uniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n float dotNL = dot( normal, lightDirection );\n vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n #ifdef USE_GRADIENTMAP\n return vec3( texture2D( gradientMap, coord ).r );\n #else\n vec2 fw = fwidth( coord ) * 0.5;\n return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n #endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n uniform sampler2D lightMap;\n uniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n vec3 diffuseColor;\n float specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Lambert\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n uniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n float x = normal.x, y = normal.y, z = normal.z;\n vec3 result = shCoefficients[ 0 ] * 0.886227;\n result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n return result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n return irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n vec3 irradiance = ambientLightColor;\n return irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n if ( cutoffDistance > 0.0 ) {\n distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n }\n return distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n return smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n struct DirectionalLight {\n vec3 direction;\n vec3 color;\n };\n uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n light.color = directionalLight.color;\n light.direction = directionalLight.direction;\n light.visible = true;\n }\n#endif\n#if NUM_POINT_LIGHTS > 0\n struct PointLight {\n vec3 position;\n vec3 color;\n float distance;\n float decay;\n };\n uniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = pointLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float lightDistance = length( lVector );\n light.color = pointLight.color;\n light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n }\n#endif\n#if NUM_SPOT_LIGHTS > 0\n struct SpotLight {\n vec3 position;\n vec3 direction;\n vec3 color;\n float distance;\n float decay;\n float coneCos;\n float penumbraCos;\n };\n uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n vec3 lVector = spotLight.position - geometryPosition;\n light.direction = normalize( lVector );\n float angleCos = dot( light.direction, spotLight.direction );\n float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n if ( spotAttenuation > 0.0 ) {\n float lightDistance = length( lVector );\n light.color = spotLight.color * spotAttenuation;\n light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n light.visible = ( light.color != vec3( 0.0 ) );\n } else {\n light.color = vec3( 0.0 );\n light.visible = false;\n }\n }\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n struct RectAreaLight {\n vec3 color;\n vec3 position;\n vec3 halfWidth;\n vec3 halfHeight;\n };\n uniform sampler2D ltc_1; uniform sampler2D ltc_2;\n uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n struct HemisphereLight {\n vec3 direction;\n vec3 skyColor;\n vec3 groundColor;\n };\n uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n float dotNL = dot( normal, hemiLight.direction );\n float hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n return irradiance;\n }\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n vec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_Toon\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n vec3 diffuseColor;\n vec3 specularColor;\n float specularShininess;\n float specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct RE_Direct_BlinnPhong\n#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n material.ior = ior;\n #ifdef USE_SPECULAR\n float specularIntensityFactor = specularIntensity;\n vec3 specularColorFactor = specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n #endif\n material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n #else\n float specularIntensityFactor = 1.0;\n vec3 specularColorFactor = vec3( 1.0 );\n material.specularF90 = 1.0;\n #endif\n material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n material.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n material.clearcoat = clearcoat;\n material.clearcoatRoughness = clearcoatRoughness;\n material.clearcoatF0 = vec3( 0.04 );\n material.clearcoatF90 = 1.0;\n #ifdef USE_CLEARCOATMAP\n material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n #endif\n #ifdef USE_CLEARCOAT_ROUGHNESSMAP\n material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n #endif\n material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n material.clearcoatRoughness += geometryRoughness;\n material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n material.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n material.iridescence = iridescence;\n material.iridescenceIOR = iridescenceIOR;\n #ifdef USE_IRIDESCENCEMAP\n material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n #endif\n #ifdef USE_IRIDESCENCE_THICKNESSMAP\n material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n #else\n material.iridescenceThickness = iridescenceThicknessMaximum;\n #endif\n#endif\n#ifdef USE_SHEEN\n material.sheenColor = sheenColor;\n #ifdef USE_SHEEN_COLORMAP\n material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n #endif\n material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n #ifdef USE_SHEEN_ROUGHNESSMAP\n material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n #ifdef USE_ANISOTROPYMAP\n mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n #else\n vec2 anisotropyV = anisotropyVector;\n #endif\n material.anisotropy = length( anisotropyV );\n if( material.anisotropy == 0.0 ) {\n anisotropyV = vec2( 1.0, 0.0 );\n } else {\n anisotropyV /= material.anisotropy;\n material.anisotropy = saturate( material.anisotropy );\n }\n material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n vec3 diffuseColor;\n float roughness;\n vec3 specularColor;\n float specularF90;\n float dispersion;\n #ifdef USE_CLEARCOAT\n float clearcoat;\n float clearcoatRoughness;\n vec3 clearcoatF0;\n float clearcoatF90;\n #endif\n #ifdef USE_IRIDESCENCE\n float iridescence;\n float iridescenceIOR;\n float iridescenceThickness;\n vec3 iridescenceFresnel;\n vec3 iridescenceF0;\n #endif\n #ifdef USE_SHEEN\n vec3 sheenColor;\n float sheenRoughness;\n #endif\n #ifdef IOR\n float ior;\n #endif\n #ifdef USE_TRANSMISSION\n float transmission;\n float transmissionAlpha;\n float thickness;\n float attenuationDistance;\n vec3 attenuationColor;\n #endif\n #ifdef USE_ANISOTROPY\n float anisotropy;\n float alphaT;\n vec3 anisotropyT;\n vec3 anisotropyB;\n #endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n float a2 = pow2( alpha );\n float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n return 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n float a2 = pow2( alpha );\n float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n return RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n float v = 0.5 / ( gv + gl );\n return saturate(v);\n }\n float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n float a2 = alphaT * alphaB;\n highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n highp float v2 = dot( v, v );\n float w2 = a2 / v2;\n return RECIPROCAL_PI * a2 * pow2 ( w2 );\n }\n#endif\n#ifdef USE_CLEARCOAT\n vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n vec3 f0 = material.clearcoatF0;\n float f90 = material.clearcoatF90;\n float roughness = material.clearcoatRoughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n return F * ( V * D );\n }\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n vec3 f0 = material.specularColor;\n float f90 = material.specularF90;\n float roughness = material.roughness;\n float alpha = pow2( roughness );\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float dotVH = saturate( dot( viewDir, halfDir ) );\n vec3 F = F_Schlick( f0, f90, dotVH );\n #ifdef USE_IRIDESCENCE\n F = mix( F, material.iridescenceFresnel, material.iridescence );\n #endif\n #ifdef USE_ANISOTROPY\n float dotTL = dot( material.anisotropyT, lightDir );\n float dotTV = dot( material.anisotropyT, viewDir );\n float dotTH = dot( material.anisotropyT, halfDir );\n float dotBL = dot( material.anisotropyB, lightDir );\n float dotBV = dot( material.anisotropyB, viewDir );\n float dotBH = dot( material.anisotropyB, halfDir );\n float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n #else\n float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n float D = D_GGX( alpha, dotNH );\n #endif\n return F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n const float LUT_SIZE = 64.0;\n const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n const float LUT_BIAS = 0.5 / LUT_SIZE;\n float dotNV = saturate( dot( N, V ) );\n vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n uv = uv * LUT_SCALE + LUT_BIAS;\n return uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n float l = length( f );\n return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n float x = dot( v1, v2 );\n float y = abs( x );\n float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n float b = 3.4175940 + ( 4.1616724 + y ) * y;\n float v = a / b;\n float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n return cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n vec3 lightNormal = cross( v1, v2 );\n if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n vec3 T1, T2;\n T1 = normalize( V - N * dot( V, N ) );\n T2 = - cross( N, T1 );\n mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n vec3 coords[ 4 ];\n coords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n coords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n coords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n coords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n coords[ 0 ] = normalize( coords[ 0 ] );\n coords[ 1 ] = normalize( coords[ 1 ] );\n coords[ 2 ] = normalize( coords[ 2 ] );\n coords[ 3 ] = normalize( coords[ 3 ] );\n vec3 vectorFormFactor = vec3( 0.0 );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n float result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n return vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n float alpha = pow2( roughness );\n float invAlpha = 1.0 / alpha;\n float cos2h = dotNH * dotNH;\n float sin2h = max( 1.0 - cos2h, 0.0078125 );\n return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n vec3 halfDir = normalize( lightDir + viewDir );\n float dotNL = saturate( dot( normal, lightDir ) );\n float dotNV = saturate( dot( normal, viewDir ) );\n float dotNH = saturate( dot( normal, halfDir ) );\n float D = D_Charlie( sheenRoughness, dotNH );\n float V = V_Neubelt( dotNV, dotNL );\n return sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n float r2 = roughness * roughness;\n float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n return saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n float dotNV = saturate( dot( normal, viewDir ) );\n const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n vec4 r = roughness * c0 + c1;\n float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n return fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n return specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n vec2 fab = DFGApprox( normal, viewDir, roughness );\n #ifdef USE_IRIDESCENCE\n vec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n #else\n vec3 Fr = specularColor;\n #endif\n vec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n float Ess = fab.x + fab.y;\n float Ems = 1.0 - Ess;\n vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n singleScatter += FssEss;\n multiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n vec3 normal = geometryNormal;\n vec3 viewDir = geometryViewDir;\n vec3 position = geometryPosition;\n vec3 lightPos = rectAreaLight.position;\n vec3 halfWidth = rectAreaLight.halfWidth;\n vec3 halfHeight = rectAreaLight.halfHeight;\n vec3 lightColor = rectAreaLight.color;\n float roughness = material.roughness;\n vec3 rectCoords[ 4 ];\n rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n rectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n rectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n vec2 uv = LTC_Uv( normal, viewDir, roughness );\n vec4 t1 = texture2D( ltc_1, uv );\n vec4 t2 = texture2D( ltc_2, uv );\n mat3 mInv = mat3(\n vec3( t1.x, 0, t1.y ),\n vec3( 0, 1, 0 ),\n vec3( t1.z, 0, t1.w )\n );\n vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n }\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n float dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n vec3 irradiance = dotNL * directLight.color;\n #ifdef USE_CLEARCOAT\n float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n vec3 ccIrradiance = dotNLcc * directLight.color;\n clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n #endif\n reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n #ifdef USE_CLEARCOAT\n clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n #endif\n #ifdef USE_SHEEN\n sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n #endif\n vec3 singleScattering = vec3( 0.0 );\n vec3 multiScattering = vec3( 0.0 );\n vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n #ifdef USE_IRIDESCENCE\n computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n #else\n computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n #endif\n vec3 totalScattering = singleScattering + multiScattering;\n vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n reflectedLight.indirectSpecular += radiance * singleScattering;\n reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct RE_Direct_Physical\n#define RE_Direct_RectArea RE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular RE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n geometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n float dotNVi = saturate( dot( normal, geometryViewDir ) );\n if ( material.iridescenceThickness == 0.0 ) {\n material.iridescence = 0.0;\n } else {\n material.iridescence = saturate( material.iridescence );\n }\n if ( material.iridescence > 0.0 ) {\n material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n }\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n PointLight pointLight;\n #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n pointLight = pointLights[ i ];\n getPointLightInfo( pointLight, geometryPosition, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n pointLightShadow = pointLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n SpotLight spotLight;\n vec4 spotColor;\n vec3 spotLightCoord;\n bool inSpotLightMap;\n #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n spotLight = spotLights[ i ];\n getSpotLightInfo( spotLight, geometryPosition, directLight );\n #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n #else\n #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n #endif\n #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n #endif\n #undef SPOT_LIGHT_MAP_INDEX\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n spotLightShadow = spotLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n DirectionalLight directionalLight;\n #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLightShadow;\n #endif\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n directionalLight = directionalLights[ i ];\n getDirectionalLightInfo( directionalLight, directLight );\n #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n directionalLightShadow = directionalLightShadows[ i ];\n directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n #endif\n RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n RectAreaLight rectAreaLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n rectAreaLight = rectAreaLights[ i ];\n RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n }\n #pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n vec3 iblIrradiance = vec3( 0.0 );\n vec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n #if defined( USE_LIGHT_PROBES )\n irradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n #endif\n #if ( NUM_HEMI_LIGHTS > 0 )\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if defined( RE_IndirectSpecular )\n vec3 radiance = vec3( 0.0 );\n vec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n irradiance += lightMapIrradiance;\n #endif\n #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n iblIrradiance += getIBLIrradiance( geometryNormal );\n #endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n #ifdef USE_ANISOTROPY\n radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n #else\n radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n #endif\n #ifdef USE_CLEARCOAT\n clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n #endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n uniform float logDepthBufFC;\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n varying float vFragDepth;\n varying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n vFragDepth = 1.0 + gl_Position.w;\n vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n vec4 sampledDiffuseColor = texture2D( map, vMapUv );\n #ifdef DECODE_VIDEO_TEXTURE\n sampledDiffuseColor = sRGBTransferEOTF( sampledDiffuseColor );\n #endif\n diffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n uniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n #if defined( USE_POINTS_UV )\n vec2 uv = vUv;\n #else\n vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n #endif\n#endif\n#ifdef USE_MAP\n diffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n diffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n varying vec2 vUv;\n#else\n #if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n uniform mat3 uvTransform;\n #endif\n#endif\n#ifdef USE_MAP\n uniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n uniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n metalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n uniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n }\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n vColor *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n #if defined( USE_COLOR_ALPHA )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n #elif defined( USE_COLOR )\n if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n #endif\n }\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n objectNormal *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n #ifndef USE_INSTANCING_MORPH\n uniform float morphTargetBaseInfluence;\n uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n #endif\n uniform sampler2DArray morphTargetsTexture;\n uniform ivec2 morphTargetsTextureSize;\n vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n int y = texelIndex / morphTargetsTextureSize.x;\n int x = texelIndex - y * morphTargetsTextureSize.x;\n ivec3 morphUV = ivec3( x, y, morphTargetIndex );\n return texelFetch( morphTargetsTexture, morphUV, 0 );\n }\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n transformed *= morphTargetBaseInfluence;\n for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n }\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n vec3 fdx = dFdx( vViewPosition );\n vec3 fdy = dFdy( vViewPosition );\n vec3 normal = normalize( cross( fdx, fdy ) );\n#else\n vec3 normal = normalize( vNormal );\n #ifdef DOUBLE_SIDED\n normal *= faceDirection;\n #endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n #ifdef USE_TANGENT\n mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn = getTangentFrame( - vViewPosition, normal,\n #if defined( USE_NORMALMAP )\n vNormalMapUv\n #elif defined( USE_CLEARCOAT_NORMALMAP )\n vClearcoatNormalMapUv\n #else\n vUv\n #endif\n );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn[0] *= faceDirection;\n tbn[1] *= faceDirection;\n #endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n #ifdef USE_TANGENT\n mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n #else\n mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n #endif\n #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n tbn2[0] *= faceDirection;\n tbn2[1] *= faceDirection;\n #endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n #ifdef FLIP_SIDED\n normal = - normal;\n #endif\n #ifdef DOUBLE_SIDED\n normal = normal * faceDirection;\n #endif\n normal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n mapN.xy *= normalScale;\n normal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n varying vec3 vNormal;\n #ifdef USE_TANGENT\n varying vec3 vTangent;\n varying vec3 vBitangent;\n #endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n vNormal = normalize( transformedNormal );\n #ifdef USE_TANGENT\n vTangent = normalize( transformedTangent );\n vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n #endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n uniform sampler2D normalMap;\n uniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n uniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n vec3 q0 = dFdx( eye_pos.xyz );\n vec3 q1 = dFdy( eye_pos.xyz );\n vec2 st0 = dFdx( uv.st );\n vec2 st1 = dFdy( uv.st );\n vec3 N = surf_norm;\n vec3 q1perp = cross( q1, N );\n vec3 q0perp = cross( N, q0 );\n vec3 T = q1perp * st0.x + q0perp * st1.x;\n vec3 B = q1perp * st0.y + q0perp * st1.y;\n float det = max( dot( T, T ), dot( B, B ) );\n float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n return mat3( T * scale, B * scale, N );\n }\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n vec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n clearcoatMapN.xy *= clearcoatNormalScale;\n clearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n uniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform sampler2D clearcoatNormalMap;\n uniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n uniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n return normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n return 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n if( v <= 0.0 )\n return vec4( 0., 0., 0., 0. );\n if( v >= 1.0 )\n return vec4( 1., 1., 1., 1. );\n float vuf;\n float af = modf( v * PackFactors.a, vuf );\n float bf = modf( vuf * ShiftRight8, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n if( v <= 0.0 )\n return vec3( 0., 0., 0. );\n if( v >= 1.0 )\n return vec3( 1., 1., 1. );\n float vuf;\n float bf = modf( v * PackFactors.b, vuf );\n float gf = modf( vuf * ShiftRight8, vuf );\n return vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n if( v <= 0.0 )\n return vec2( 0., 0. );\n if( v >= 1.0 )\n return vec2( 1., 1. );\n float vuf;\n float gf = modf( v * 256., vuf );\n return vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n return dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n return dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n return ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n return ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n gl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n mvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n mvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n gl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n vec3 dithering( vec3 color ) {\n float grid_position = rand( gl_FragCoord.xy );\n vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n return color + dither_shift_RGB;\n }\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n roughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n uniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n float texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n }\n vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n return unpackRGBATo2Half( texture2D( shadow, uv ) );\n }\n float VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n float occlusion = 1.0;\n vec2 distribution = texture2DDistribution( shadow, uv );\n float hard_shadow = step( compare , distribution.x );\n if (hard_shadow != 1.0 ) {\n float distance = compare - distribution.x ;\n float variance = max( 0.00000, distribution.y * distribution.y );\n float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n }\n return occlusion;\n }\n float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n float shadow = 1.0;\n shadowCoord.xyz /= shadowCoord.w;\n shadowCoord.z += shadowBias;\n bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n bool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n if ( frustumTest ) {\n #if defined( SHADOWMAP_TYPE_PCF )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx0 = - texelSize.x * shadowRadius;\n float dy0 = - texelSize.y * shadowRadius;\n float dx1 = + texelSize.x * shadowRadius;\n float dy1 = + texelSize.y * shadowRadius;\n float dx2 = dx0 / 2.0;\n float dy2 = dy0 / 2.0;\n float dx3 = dx1 / 2.0;\n float dy3 = dy1 / 2.0;\n shadow = (\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n ) * ( 1.0 / 17.0 );\n #elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n vec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n float dx = texelSize.x;\n float dy = texelSize.y;\n vec2 uv = shadowCoord.xy;\n vec2 f = fract( uv * shadowMapSize + 0.5 );\n uv -= f * texelSize;\n shadow = (\n texture2DCompare( shadowMap, uv, shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n f.x ) +\n mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n f.y ) +\n mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n f.x ),\n mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n f.x ),\n f.y )\n ) * ( 1.0 / 9.0 );\n #elif defined( SHADOWMAP_TYPE_VSM )\n shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n #else\n shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n vec2 cubeToUV( vec3 v, float texelSizeY ) {\n vec3 absV = abs( v );\n float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n absV *= scaleToCube;\n v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n vec2 planar = v.xy;\n float almostATexel = 1.5 * texelSizeY;\n float almostOne = 1.0 - almostATexel;\n if ( absV.z >= almostOne ) {\n if ( v.z > 0.0 )\n planar.x = 4.0 - v.x;\n } else if ( absV.x >= almostOne ) {\n float signX = sign( v.x );\n planar.x = v.z * signX + 2.0 * signX;\n } else if ( absV.y >= almostOne ) {\n float signY = sign( v.y );\n planar.x = v.x + 2.0 * signY + 2.0;\n planar.y = v.z * signY - 2.0;\n }\n return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n }\n float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n float shadow = 1.0;\n vec3 lightToPosition = shadowCoord.xyz;\n \n float lightToPositionLength = length( lightToPosition );\n if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias;\n vec3 bd3D = normalize( lightToPosition );\n vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n shadow = (\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n ) * ( 1.0 / 9.0 );\n #else\n shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n #endif\n }\n return mix( 1.0, shadow, shadowIntensity );\n }\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n struct DirectionalLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n struct SpotLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n };\n uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n struct PointLightShadow {\n float shadowIntensity;\n float shadowBias;\n float shadowNormalBias;\n float shadowRadius;\n vec2 shadowMapSize;\n float shadowCameraNear;\n float shadowCameraFar;\n };\n uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n #endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n vec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n #if NUM_DIR_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n #endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n shadowWorldPosition = worldPosition;\n #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n #endif\n vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n }\n #pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n float shadow = 1.0;\n #ifdef USE_SHADOWMAP\n #if NUM_DIR_LIGHT_SHADOWS > 0\n DirectionalLightShadow directionalLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n directionalLight = directionalLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_SPOT_LIGHT_SHADOWS > 0\n SpotLightShadow spotLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n spotLight = spotLightShadows[ i ];\n shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #if NUM_POINT_LIGHT_SHADOWS > 0\n PointLightShadow pointLight;\n #pragma unroll_loop_start\n for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n pointLight = pointLightShadows[ i ];\n shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n }\n #pragma unroll_loop_end\n #endif\n #endif\n return shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n mat4 boneMatX = getBoneMatrix( skinIndex.x );\n mat4 boneMatY = getBoneMatrix( skinIndex.y );\n mat4 boneMatZ = getBoneMatrix( skinIndex.z );\n mat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n uniform mat4 bindMatrix;\n uniform mat4 bindMatrixInverse;\n uniform highp sampler2D boneTexture;\n mat4 getBoneMatrix( const in float i ) {\n int size = textureSize( boneTexture, 0 ).x;\n int j = int( i ) * 4;\n int x = j % size;\n int y = j / size;\n vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n return mat4( v1, v2, v3, v4 );\n }\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n vec4 skinned = vec4( 0.0 );\n skinned += boneMatX * skinVertex * skinWeight.x;\n skinned += boneMatY * skinVertex * skinWeight.y;\n skinned += boneMatZ * skinVertex * skinWeight.z;\n skinned += boneMatW * skinVertex * skinWeight.w;\n transformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n mat4 skinMatrix = mat4( 0.0 );\n skinMatrix += skinWeight.x * boneMatX;\n skinMatrix += skinWeight.y * boneMatY;\n skinMatrix += skinWeight.z * boneMatZ;\n skinMatrix += skinWeight.w * boneMatW;\n skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n #ifdef USE_TANGENT\n objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n #endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n specularStrength = texelSpecular.r;\n#else\n specularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n uniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n gl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n return saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n return saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n color *= toneMappingExposure;\n color = max( vec3( 0.0 ), color - 0.004 );\n return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n vec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n return a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n const mat3 ACESInputMat = mat3(\n vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ),\n vec3( 0.04823, 0.01566, 0.83777 )\n );\n const mat3 ACESOutputMat = mat3(\n vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ),\n vec3( -0.07367, -0.00605, 1.07602 )\n );\n color *= toneMappingExposure / 0.6;\n color = ACESInputMat * color;\n color = RRTAndODTFit( color );\n color = ACESOutputMat * color;\n return saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n vec3( 1.6605, - 0.1246, - 0.0182 ),\n vec3( - 0.5876, 1.1329, - 0.1006 ),\n vec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n vec3( 0.6274, 0.0691, 0.0164 ),\n vec3( 0.3293, 0.9195, 0.0880 ),\n vec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n vec3 x2 = x * x;\n vec3 x4 = x2 * x2;\n return + 15.5 * x4 * x2\n - 40.14 * x4 * x\n + 31.96 * x4\n - 6.868 * x2 * x\n + 0.4298 * x2\n + 0.1191 * x\n - 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n const mat3 AgXInsetMatrix = mat3(\n vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n );\n const mat3 AgXOutsetMatrix = mat3(\n vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n );\n const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069;\n color *= toneMappingExposure;\n color = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n color = AgXInsetMatrix * color;\n color = max( color, 1e-10 ); color = log2( color );\n color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n color = clamp( color, 0.0, 1.0 );\n color = agxDefaultContrastApprox( color );\n color = AgXOutsetMatrix * color;\n color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n color = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n color = clamp( color, 0.0, 1.0 );\n return color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n const float StartCompression = 0.8 - 0.04;\n const float Desaturation = 0.15;\n color *= toneMappingExposure;\n float x = min( color.r, min( color.g, color.b ) );\n float offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n color -= offset;\n float peak = max( color.r, max( color.g, color.b ) );\n if ( peak < StartCompression ) return color;\n float d = 1. - StartCompression;\n float newPeak = 1. - d * d / ( peak + d - StartCompression );\n color *= newPeak / peak;\n float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n return mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n material.transmission = transmission;\n material.transmissionAlpha = 1.0;\n material.thickness = thickness;\n material.attenuationDistance = attenuationDistance;\n material.attenuationColor = attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n #endif\n #ifdef USE_THICKNESSMAP\n material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n #endif\n vec3 pos = vWorldPosition;\n vec3 v = normalize( cameraPosition - pos );\n vec3 n = inverseTransformDirection( normal, viewMatrix );\n vec4 transmitted = getIBLVolumeRefraction(\n n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n material.attenuationColor, material.attenuationDistance );\n material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n uniform float transmission;\n uniform float thickness;\n uniform float attenuationDistance;\n uniform vec3 attenuationColor;\n #ifdef USE_TRANSMISSIONMAP\n uniform sampler2D transmissionMap;\n #endif\n #ifdef USE_THICKNESSMAP\n uniform sampler2D thicknessMap;\n #endif\n uniform vec2 transmissionSamplerSize;\n uniform sampler2D transmissionSamplerMap;\n uniform mat4 modelMatrix;\n uniform mat4 projectionMatrix;\n varying vec3 vWorldPosition;\n float w0( float a ) {\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n }\n float w1( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n }\n float w2( float a ){\n return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n }\n float w3( float a ) {\n return ( 1.0 / 6.0 ) * ( a * a * a );\n }\n float g0( float a ) {\n return w0( a ) + w1( a );\n }\n float g1( float a ) {\n return w2( a ) + w3( a );\n }\n float h0( float a ) {\n return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n }\n float h1( float a ) {\n return 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n }\n vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n uv = uv * texelSize.zw + 0.5;\n vec2 iuv = floor( uv );\n vec2 fuv = fract( uv );\n float g0x = g0( fuv.x );\n float g1x = g1( fuv.x );\n float h0x = h0( fuv.x );\n float h1x = h1( fuv.x );\n float h0y = h0( fuv.y );\n float h1y = h1( fuv.y );\n vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n }\n vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n vec2 fLodSizeInv = 1.0 / fLodSize;\n vec2 cLodSizeInv = 1.0 / cLodSize;\n vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n return mix( fSample, cSample, fract( lod ) );\n }\n vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n vec3 modelScale;\n modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n return normalize( refractionVector ) * thickness * modelScale;\n }\n float applyIorToRoughness( const in float roughness, const in float ior ) {\n return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n }\n vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n }\n vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n if ( isinf( attenuationDistance ) ) {\n return vec3( 1.0 );\n } else {\n vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance;\n }\n }\n vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n const in vec3 attenuationColor, const in float attenuationDistance ) {\n vec4 transmittedLight;\n vec3 transmittance;\n #ifdef USE_DISPERSION\n float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n for ( int i = 0; i < 3; i ++ ) {\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n transmittedLight[ i ] = transmissionSample[ i ];\n transmittedLight.a += transmissionSample.a;\n transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n }\n transmittedLight.a /= 3.0;\n #else\n vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n vec3 refractedRayExit = position + transmissionRay;\n vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n vec2 refractionCoords = ndcPos.xy / ndcPos.w;\n refractionCoords += 1.0;\n refractionCoords /= 2.0;\n transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n #endif\n vec3 attenuatedColor = transmittance * transmittedLight.rgb;\n vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n }\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n varying vec2 vUv;\n#endif\n#ifdef USE_MAP\n uniform mat3 mapTransform;\n varying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n uniform mat3 alphaMapTransform;\n varying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n uniform mat3 lightMapTransform;\n varying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n uniform mat3 aoMapTransform;\n varying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n uniform mat3 bumpMapTransform;\n varying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n uniform mat3 normalMapTransform;\n varying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n uniform mat3 displacementMapTransform;\n varying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n uniform mat3 emissiveMapTransform;\n varying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n uniform mat3 metalnessMapTransform;\n varying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n uniform mat3 roughnessMapTransform;\n varying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n uniform mat3 anisotropyMapTransform;\n varying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n uniform mat3 clearcoatMapTransform;\n varying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n uniform mat3 clearcoatNormalMapTransform;\n varying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n uniform mat3 clearcoatRoughnessMapTransform;\n varying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n uniform mat3 sheenColorMapTransform;\n varying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n uniform mat3 sheenRoughnessMapTransform;\n varying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n uniform mat3 iridescenceMapTransform;\n varying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n uniform mat3 iridescenceThicknessMapTransform;\n varying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n uniform mat3 specularMapTransform;\n varying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n uniform mat3 specularColorMapTransform;\n varying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n uniform mat3 specularIntensityMapTransform;\n varying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n uniform mat3 transmissionMapTransform;\n varying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n uniform mat3 thicknessMapTransform;\n varying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n vUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n vec4 worldPosition = vec4( transformed, 1.0 );\n #ifdef USE_BATCHING\n worldPosition = batchingMatrix * worldPosition;\n #endif\n #ifdef USE_INSTANCING\n worldPosition = instanceMatrix * worldPosition;\n #endif\n worldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n gl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n vec4 texColor = texture2D( t2D, vUv );\n #ifdef DECODE_VIDEO_TEXTURE\n texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n uniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n #ifdef ENVMAP_TYPE_CUBE\n vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n #elif defined( ENVMAP_TYPE_CUBE_UV )\n vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n #else\n vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n #endif\n texColor.rgb *= backgroundIntensity;\n gl_FragColor = texColor;\n #include \n #include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n gl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n gl_FragColor = texColor;\n gl_FragColor.a *= opacity;\n #include \n #include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n uniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #if DEPTH_PACKING == 3200\n diffuseColor.a = opacity;\n #endif\n #include \n #include \n #include \n #include \n #include \n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n #if DEPTH_PACKING == 3200\n gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n #elif DEPTH_PACKING == 3201\n gl_FragColor = packDepthToRGBA( fragCoordZ );\n #elif DEPTH_PACKING == 3202\n gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n #elif DEPTH_PACKING == 3203\n gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n #endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #ifdef USE_DISPLACEMENTMAP\n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n vec4 diffuseColor = vec4( 1.0 );\n #include \n #include \n #include \n #include \n #include \n float dist = length( vWorldPosition - referencePosition );\n dist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n dist = saturate( dist );\n gl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n vWorldDirection = transformDirection( position, modelMatrix );\n #include \n #include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n vec3 direction = normalize( vWorldDirection );\n vec2 sampleUV = equirectUv( direction );\n gl_FragColor = texture2D( tEquirect, sampleUV );\n #include \n #include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vLineDistance = scale * lineDistance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n if ( mod( vLineDistance, totalSize ) > dashSize ) {\n discard;\n }\n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n #include \n #include \n #include \n #include \n #include \n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n varying vec3 vNormal;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n #ifdef USE_LIGHTMAP\n vec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n #else\n reflectedLight.indirectDiffuse += vec3( 1.0 );\n #endif\n #include \n reflectedLight.indirectDiffuse *= diffuseColor.rgb;\n vec3 outgoingLight = reflectedLight.indirectDiffuse;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 viewDir = normalize( vViewPosition );\n vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n vec3 y = cross( viewDir, x );\n vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n #ifdef USE_MATCAP\n vec4 matcapColor = texture2D( matcap, uv );\n #else\n vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n #endif\n vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n vViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n varying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n #include \n #include \n #include \n #include \n gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n #ifdef OPAQUE\n gl_FragColor.a = 1.0;\n #endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n #include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n varying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n#ifdef USE_TRANSMISSION\n vWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n #define IOR\n #define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n uniform float ior;\n#endif\n#ifdef USE_SPECULAR\n uniform float specularIntensity;\n uniform vec3 specularColor;\n #ifdef USE_SPECULAR_COLORMAP\n uniform sampler2D specularColorMap;\n #endif\n #ifdef USE_SPECULAR_INTENSITYMAP\n uniform sampler2D specularIntensityMap;\n #endif\n#endif\n#ifdef USE_CLEARCOAT\n uniform float clearcoat;\n uniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n uniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n uniform float iridescence;\n uniform float iridescenceIOR;\n uniform float iridescenceThicknessMinimum;\n uniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n uniform vec3 sheenColor;\n uniform float sheenRoughness;\n #ifdef USE_SHEEN_COLORMAP\n uniform sampler2D sheenColorMap;\n #endif\n #ifdef USE_SHEEN_ROUGHNESSMAP\n uniform sampler2D sheenRoughnessMap;\n #endif\n#endif\n#ifdef USE_ANISOTROPY\n uniform vec2 anisotropyVector;\n #ifdef USE_ANISOTROPYMAP\n uniform sampler2D anisotropyMap;\n #endif\n#endif\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n #include \n vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n #ifdef USE_SHEEN\n float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n #endif\n #ifdef USE_CLEARCOAT\n float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vViewPosition = - mvPosition.xyz;\n #include \n #include \n #include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n vec3 totalEmissiveRadiance = emissive;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n #include \n #include \n #include \n #include \n #include \n #include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \n#ifdef USE_POINTS_UV\n varying vec2 vUv;\n uniform mat3 uvTransform;\n#endif\nvoid main() {\n #ifdef USE_POINTS_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n #include \n #include \n #include \n #include \n #include \n #include \n gl_PointSize = size;\n #ifdef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n #endif\n #include \n #include \n #include \n #include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n #include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n #include \n #include \n #include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n #include \n vec4 mvPosition = modelViewMatrix[ 3 ];\n vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n #ifndef USE_SIZEATTENUATION\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n #endif\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n gl_Position = projectionMatrix * mvPosition;\n #include \n #include \n #include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n vec4 diffuseColor = vec4( diffuse, opacity );\n #include \n vec3 outgoingLight = vec3( 0.0 );\n #include \n #include \n #include \n #include \n #include \n outgoingLight = diffuseColor.rgb;\n #include \n #include \n #include \n #include \n}"},l={common:{diffuse:{value:new r.Q1f(0xffffff)},opacity:{value:1},map:{value:null},mapTransform:{value:new r.dwI},alphaMap:{value:null},alphaMapTransform:{value:new r.dwI},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new r.dwI}},envmap:{envMap:{value:null},envMapRotation:{value:new r.dwI},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new r.dwI}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new r.dwI}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new r.dwI},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new r.dwI},normalScale:{value:new r.I9Y(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new r.dwI},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new r.dwI}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new r.dwI}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new r.dwI}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new r.Q1f(0xffffff)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new r.Q1f(0xffffff)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new r.dwI},alphaTest:{value:0},uvTransform:{value:new r.dwI}},sprite:{diffuse:{value:new r.Q1f(0xffffff)},opacity:{value:1},center:{value:new r.I9Y(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new r.dwI},alphaMap:{value:null},alphaMapTransform:{value:new r.dwI},alphaTest:{value:0}}},s={basic:{uniforms:(0,r.Iit)([l.common,l.specularmap,l.envmap,l.aomap,l.lightmap,l.fog]),vertexShader:o.meshbasic_vert,fragmentShader:o.meshbasic_frag},lambert:{uniforms:(0,r.Iit)([l.common,l.specularmap,l.envmap,l.aomap,l.lightmap,l.emissivemap,l.bumpmap,l.normalmap,l.displacementmap,l.fog,l.lights,{emissive:{value:new r.Q1f(0)}}]),vertexShader:o.meshlambert_vert,fragmentShader:o.meshlambert_frag},phong:{uniforms:(0,r.Iit)([l.common,l.specularmap,l.envmap,l.aomap,l.lightmap,l.emissivemap,l.bumpmap,l.normalmap,l.displacementmap,l.fog,l.lights,{emissive:{value:new r.Q1f(0)},specular:{value:new r.Q1f(1118481)},shininess:{value:30}}]),vertexShader:o.meshphong_vert,fragmentShader:o.meshphong_frag},standard:{uniforms:(0,r.Iit)([l.common,l.envmap,l.aomap,l.lightmap,l.emissivemap,l.bumpmap,l.normalmap,l.displacementmap,l.roughnessmap,l.metalnessmap,l.fog,l.lights,{emissive:{value:new r.Q1f(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:o.meshphysical_vert,fragmentShader:o.meshphysical_frag},toon:{uniforms:(0,r.Iit)([l.common,l.aomap,l.lightmap,l.emissivemap,l.bumpmap,l.normalmap,l.displacementmap,l.gradientmap,l.fog,l.lights,{emissive:{value:new r.Q1f(0)}}]),vertexShader:o.meshtoon_vert,fragmentShader:o.meshtoon_frag},matcap:{uniforms:(0,r.Iit)([l.common,l.bumpmap,l.normalmap,l.displacementmap,l.fog,{matcap:{value:null}}]),vertexShader:o.meshmatcap_vert,fragmentShader:o.meshmatcap_frag},points:{uniforms:(0,r.Iit)([l.points,l.fog]),vertexShader:o.points_vert,fragmentShader:o.points_frag},dashed:{uniforms:(0,r.Iit)([l.common,l.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:o.linedashed_vert,fragmentShader:o.linedashed_frag},depth:{uniforms:(0,r.Iit)([l.common,l.displacementmap]),vertexShader:o.depth_vert,fragmentShader:o.depth_frag},normal:{uniforms:(0,r.Iit)([l.common,l.bumpmap,l.normalmap,l.displacementmap,{opacity:{value:1}}]),vertexShader:o.meshnormal_vert,fragmentShader:o.meshnormal_frag},sprite:{uniforms:(0,r.Iit)([l.sprite,l.fog]),vertexShader:o.sprite_vert,fragmentShader:o.sprite_frag},background:{uniforms:{uvTransform:{value:new r.dwI},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:o.background_vert,fragmentShader:o.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new r.dwI}},vertexShader:o.backgroundCube_vert,fragmentShader:o.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:o.cube_vert,fragmentShader:o.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:o.equirect_vert,fragmentShader:o.equirect_frag},distanceRGBA:{uniforms:(0,r.Iit)([l.common,l.displacementmap,{referencePosition:{value:new r.Pq0},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:o.distanceRGBA_vert,fragmentShader:o.distanceRGBA_frag},shadow:{uniforms:(0,r.Iit)([l.lights,l.fog,{color:{value:new r.Q1f(0)},opacity:{value:1}}]),vertexShader:o.shadow_vert,fragmentShader:o.shadow_frag}};s.physical={uniforms:(0,r.Iit)([s.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new r.dwI},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new r.dwI},clearcoatNormalScale:{value:new r.I9Y(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new r.dwI},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new r.dwI},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new r.dwI},sheen:{value:0},sheenColor:{value:new r.Q1f(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new r.dwI},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new r.dwI},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new r.dwI},transmissionSamplerSize:{value:new r.I9Y},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new r.dwI},attenuationDistance:{value:0},attenuationColor:{value:new r.Q1f(0)},specularColor:{value:new r.Q1f(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new r.dwI},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new r.dwI},anisotropyVector:{value:new r.I9Y},anisotropyMap:{value:null},anisotropyMapTransform:{value:new r.dwI}}]),vertexShader:o.meshphysical_vert,fragmentShader:o.meshphysical_frag};let c={r:0,b:0,g:0},d=new r.O9p,u=new r.kn4;function f(e,n,t,i,a,o,l){let f,p,m=new r.Q1f(0),h=+(!0!==o),_=null,g=0,v=null;function E(e){let r=!0===e.isScene?e.background:null;return r&&r.isTexture&&(r=(e.backgroundBlurriness>0?t:n).get(r)),r}function S(n,t){n.getRGB(c,(0,r._Ut)(e)),i.buffers.color.setClear(c.r,c.g,c.b,t,l)}return{getClearColor:function(){return m},setClearColor:function(e,n=1){m.set(e),S(m,h=n)},getClearAlpha:function(){return h},setClearAlpha:function(e){S(m,h=e)},render:function(n){let t=!1,r=E(n);null===r?S(m,h):r&&r.isColor&&(S(r,1),t=!0);let a=e.xr.getEnvironmentBlendMode();"additive"===a?i.buffers.color.setClear(0,0,0,1,l):"alpha-blend"===a&&i.buffers.color.setClear(0,0,0,0,l),(e.autoClear||t)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil))},addToRenderList:function(n,t){let i=E(t);i&&(i.isCubeTexture||i.mapping===r.Om)?(void 0===p&&((p=new r.eaF(new r.iNn(1,1,1),new r.BKk({name:"BackgroundCubeMaterial",uniforms:(0,r.lxW)(s.backgroundCube.uniforms),vertexShader:s.backgroundCube.vertexShader,fragmentShader:s.backgroundCube.fragmentShader,side:r.hsX,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),p.geometry.deleteAttribute("uv"),p.onBeforeRender=function(e,n,t){this.matrixWorld.copyPosition(t.matrixWorld)},Object.defineProperty(p.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),a.update(p)),d.copy(t.backgroundRotation),d.x*=-1,d.y*=-1,d.z*=-1,i.isCubeTexture&&!1===i.isRenderTargetTexture&&(d.y*=-1,d.z*=-1),p.material.uniforms.envMap.value=i,p.material.uniforms.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,p.material.uniforms.backgroundBlurriness.value=t.backgroundBlurriness,p.material.uniforms.backgroundIntensity.value=t.backgroundIntensity,p.material.uniforms.backgroundRotation.value.setFromMatrix4(u.makeRotationFromEuler(d)),p.material.toneMapped=r.ppV.getTransfer(i.colorSpace)!==r.KLL,(_!==i||g!==i.version||v!==e.toneMapping)&&(p.material.needsUpdate=!0,_=i,g=i.version,v=e.toneMapping),p.layers.enableAll(),n.unshift(p,p.geometry,p.material,0,0,null)):i&&i.isTexture&&(void 0===f&&((f=new r.eaF(new r.bdM(2,2),new r.BKk({name:"BackgroundMaterial",uniforms:(0,r.lxW)(s.background.uniforms),vertexShader:s.background.vertexShader,fragmentShader:s.background.fragmentShader,side:r.hB5,depthTest:!1,depthWrite:!1,fog:!1,allowOverride:!1}))).geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),a.update(f)),f.material.uniforms.t2D.value=i,f.material.uniforms.backgroundIntensity.value=t.backgroundIntensity,f.material.toneMapped=r.ppV.getTransfer(i.colorSpace)!==r.KLL,!0===i.matrixAutoUpdate&&i.updateMatrix(),f.material.uniforms.uvTransform.value.copy(i.matrix),(_!==i||g!==i.version||v!==e.toneMapping)&&(f.material.needsUpdate=!0,_=i,g=i.version,v=e.toneMapping),f.layers.enableAll(),n.unshift(f,f.geometry,f.material,0,0,null))},dispose:function(){void 0!==p&&(p.geometry.dispose(),p.material.dispose(),p=void 0),void 0!==f&&(f.geometry.dispose(),f.material.dispose(),f=void 0)}}}function p(e,n){let t=e.getParameter(e.MAX_VERTEX_ATTRIBS),i={},a=d(null),o=a,l=!1;function s(n){return e.bindVertexArray(n)}function c(n){return e.deleteVertexArray(n)}function d(e){let n=[],r=[],i=[];for(let e=0;e=0){let t=i[n],r=a[n];if(void 0===r&&("instanceMatrix"===n&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===n&&e.instanceColor&&(r=e.instanceColor)),void 0===t||t.attribute!==r||r&&t.data!==r.data)return!0;l++}return o.attributesNum!==l||o.index!==r}(t,_,c,g))&&function(e,n,t,r){let i={},a=n.attributes,l=0,s=t.getAttributes();for(let n in s)if(s[n].location>=0){let t=a[n];void 0===t&&("instanceMatrix"===n&&e.instanceMatrix&&(t=e.instanceMatrix),"instanceColor"===n&&e.instanceColor&&(t=e.instanceColor));let r={};r.attribute=t,t&&t.data&&(r.data=t.data),i[n]=r,l++}o.attributes=i,o.attributesNum=l,o.index=r}(t,_,c,g),null!==g&&n.update(g,e.ELEMENT_ARRAY_BUFFER),(v||l)&&(l=!1,function(t,i,a,o){u();let l=o.attributes,s=a.getAttributes(),c=i.defaultAttributeValues;for(let i in s){let a=s[i];if(a.location>=0){let s=l[i];if(void 0===s&&("instanceMatrix"===i&&t.instanceMatrix&&(s=t.instanceMatrix),"instanceColor"===i&&t.instanceColor&&(s=t.instanceColor)),void 0!==s){let i=s.normalized,l=s.itemSize,c=n.get(s);if(void 0===c)continue;let d=c.buffer,u=c.type,m=c.bytesPerElement,_=u===e.INT||u===e.UNSIGNED_INT||s.gpuType===r.Yuy;if(s.isInterleavedBufferAttribute){let n=s.data,r=n.stride,c=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";n="mediump"}return"mediump"===n&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let l=void 0!==t.precision?t.precision:"highp",s=o(l);s!==l&&(console.warn("THREE.WebGLRenderer:",l,"not supported, using",s,"instead."),l=s);let c=!0===t.logarithmicDepthBuffer,d=!0===t.reverseDepthBuffer&&n.has("EXT_clip_control"),u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),f=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),p=e.getParameter(e.MAX_TEXTURE_SIZE),m=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),h=e.getParameter(e.MAX_VERTEX_ATTRIBS),_=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==a)return a;if(!0===n.has("EXT_texture_filter_anisotropic")){let t=n.get("EXT_texture_filter_anisotropic");a=e.getParameter(t.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else a=0;return a},getMaxPrecision:o,textureFormatReadable:function(n){return n===r.GWd||i.convert(n)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(t){let a=t===r.ix0&&(n.has("EXT_color_buffer_half_float")||n.has("EXT_color_buffer_float"));return t===r.OUM||i.convert(t)===e.getParameter(e.IMPLEMENTATION_COLOR_READ_TYPE)||t===r.RQf||!!a},precision:l,logarithmicDepthBuffer:c,reverseDepthBuffer:d,maxTextures:u,maxVertexTextures:f,maxTextureSize:p,maxCubemapSize:m,maxAttributes:h,maxVertexUniforms:_,maxVaryings:g,maxFragmentUniforms:e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:f>0,maxSamples:e.getParameter(e.MAX_SAMPLES)}}function _(e){let n=this,t=null,i=0,a=!1,o=!1,l=new r.Zcv,s=new r.dwI,c={value:null,needsUpdate:!1};function d(e,t,r,i){let a=null!==e?e.length:0,o=null;if(0!==a){if(o=c.value,!0!==i||null===o){let n=r+4*a,i=t.matrixWorldInverse;s.getNormalMatrix(i),(null===o||o.length0),n.numPlanes=i,n.numIntersection=0)}}function g(e){let n=new WeakMap;function t(e,n){return n===r.wfO?e.mapping=r.hy7:n===r.uV5&&(e.mapping=r.xFO),e}function i(e){let t=e.target;t.removeEventListener("dispose",i);let r=n.get(t);void 0!==r&&(n.delete(t),r.dispose())}return{get:function(a){if(a&&a.isTexture){let o=a.mapping;if(o===r.wfO||o===r.uV5)if(n.has(a))return t(n.get(a).texture,a.mapping);else{let o=a.image;if(!o||!(o.height>0))return null;{let l=new r.o6l(o.height);return l.fromEquirectangularTexture(e,a),n.set(a,l),a.addEventListener("dispose",i),t(l.texture,a.mapping)}}}return a},dispose:function(){n=new WeakMap}}}let v=[.125,.215,.35,.446,.526,.582],E=new r.qUd,S=new r.Q1f,T=null,M=0,x=0,R=!1,A=(1+Math.sqrt(5))/2,C=1/A,b=[new r.Pq0(-A,C,0),new r.Pq0(A,C,0),new r.Pq0(-C,0,A),new r.Pq0(C,0,A),new r.Pq0(0,A,-C),new r.Pq0(0,A,C),new r.Pq0(-1,1,-1),new r.Pq0(1,1,-1),new r.Pq0(-1,1,1),new r.Pq0(1,1,1)],L=new r.Pq0;class P{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,n=0,t=.1,r=100,i={}){let{size:a=256,position:o=L}=i;T=this._renderer.getRenderTarget(),M=this._renderer.getActiveCubeFace(),x=this._renderer.getActiveMipmapLevel(),R=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(a);let l=this._allocateTargets();return l.depthBuffer=!0,this._sceneToCubeUV(e,t,r,l,o),n>0&&this._blur(l,0,0,n),this._applyPMREM(l),this._cleanup(l),l}fromEquirectangular(e,n=null){return this._fromTexture(e,n)}fromCubemap(e,n=null){return this._fromTexture(e,n)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=I(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=w(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?s=v[l-e+4-1]:0===l&&(s=0),i.push(s);let c=1/(o-2),d=-c,u=1+c,f=[d,d,u,d,u,u,d,d,u,u,d,u],p=new Float32Array(108),m=new Float32Array(72),h=new Float32Array(36);for(let e=0;e<6;e++){let n=e%3*2/3-1,t=e>2?0:-1,r=[n,t,0,n+2/3,t,0,n+2/3,t+1,0,n,t,0,n+2/3,t+1,0,n,t+1,0];p.set(r,18*e),m.set(f,12*e);let i=[e,e,e,e,e,e];h.set(i,6*e)}let _=new r.LoY;_.setAttribute("position",new r.THS(p,3)),_.setAttribute("uv",new r.THS(m,2)),_.setAttribute("faceIndex",new r.THS(h,1)),n.push(_),a>4&&a--}return{lodPlanes:n,sizeLods:t,sigmas:i}}(i)),this._blurMaterial=function(e,n,t){let i=new Float32Array(20),a=new r.Pq0(0,1,0);return new r.BKk({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/n,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:a}},vertexShader:y(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + } + `,blending:r.XIg,depthTest:!1,depthWrite:!1})}(i,e,n)}return i}_compileMaterial(e){let n=new r.eaF(this._lodPlanes[0],e);this._renderer.compile(n,E)}_sceneToCubeUV(e,n,t,i,a){let o=new r.ubm(90,1,n,t),l=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],c=this._renderer,d=c.autoClear,u=c.toneMapping;c.getClearColor(S),c.toneMapping=r.y_p,c.autoClear=!1;let f=new r.V9B({name:"PMREM.Background",side:r.hsX,depthWrite:!1,depthTest:!1}),p=new r.eaF(new r.iNn,f),m=!1,h=e.background;h?h.isColor&&(f.color.copy(h),e.background=null,m=!0):(f.color.copy(S),m=!0);for(let n=0;n<6;n++){let t=n%3;0===t?(o.up.set(0,l[n],0),o.position.set(a.x,a.y,a.z),o.lookAt(a.x+s[n],a.y,a.z)):1===t?(o.up.set(0,0,l[n]),o.position.set(a.x,a.y,a.z),o.lookAt(a.x,a.y+s[n],a.z)):(o.up.set(0,l[n],0),o.position.set(a.x,a.y,a.z),o.lookAt(a.x,a.y,a.z+s[n]));let r=this._cubeSize;D(i,t*r,n>2?r:0,r,r),c.setRenderTarget(i),m&&c.render(p,o),c.render(e,o)}p.geometry.dispose(),p.material.dispose(),c.toneMapping=u,c.autoClear=d,e.background=h}_textureToCubeUV(e,n){let t=this._renderer,i=e.mapping===r.hy7||e.mapping===r.xFO;i?(null===this._cubemapMaterial&&(this._cubemapMaterial=I()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=w());let a=i?this._cubemapMaterial:this._equirectMaterial,o=new r.eaF(this._lodPlanes[0],a);a.uniforms.envMap.value=e;let l=this._cubeSize;D(n,0,0,3*l,2*l),t.setRenderTarget(n),t.render(o,E)}_applyPMREM(e){let n=this._renderer,t=n.autoClear;n.autoClear=!1;let r=this._lodPlanes.length;for(let n=1;n20&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${h} samples when the maximum is set to 20`);let _=[],g=0;for(let e=0;e<20;++e){let n=e/m,t=Math.exp(-n*n/2);_.push(t),0===e?g+=t:ev-4?i-v+4:0),T,3*S,2*S),s.setRenderTarget(n),s.render(d,E)}}function U(e,n,t){let i=new r.nWS(e,n,t);return i.texture.mapping=r.Om,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function D(e,n,t,r,i){e.viewport.set(n,t,r,i),e.scissor.set(n,t,r,i)}function w(){return new r.BKk({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:y(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + + #include + + void main() { + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); + + } + `,blending:r.XIg,depthTest:!1,depthWrite:!1})}function I(){return new r.BKk({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:y(),fragmentShader:` + + precision mediump float; + precision mediump int; + + uniform float flipEnvMap; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + void main() { + + gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); + + } + `,blending:r.XIg,depthTest:!1,depthWrite:!1})}function y(){return` + + precision mediump float; + precision mediump int; + + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function N(e){let n=new WeakMap,t=null;function i(e){let t=e.target;t.removeEventListener("dispose",i);let r=n.get(t);void 0!==r&&(n.delete(t),r.dispose())}return{get:function(a){if(a&&a.isTexture){let o=a.mapping,l=o===r.wfO||o===r.uV5,s=o===r.hy7||o===r.xFO;if(l||s){let r=n.get(a),o=void 0!==r?r.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==o)return null===t&&(t=new P(e)),(r=l?t.fromEquirectangular(a,r):t.fromCubemap(a,r)).texture.pmremVersion=a.pmremVersion,n.set(a,r),r.texture;{if(void 0!==r)return r.texture;let o=a.image;return l&&o&&o.height>0||s&&o&&function(e){let n=0;for(let t=0;t<6;t++)void 0!==e[t]&&n++;return 6===n}(o)?(null===t&&(t=new P(e)),(r=l?t.fromEquirectangular(a):t.fromCubemap(a)).texture.pmremVersion=a.pmremVersion,n.set(a,r),a.addEventListener("dispose",i),r.texture):null}}}return a},dispose:function(){n=new WeakMap,null!==t&&(t.dispose(),t=null)}}}function O(e){let n={};function t(t){let r;if(void 0!==n[t])return n[t];switch(t){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(t)}return n[t]=r,r}return{has:function(e){return null!==t(e)},init:function(){t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance"),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture"),t("WEBGL_render_shared_exponent")},get:function(e){let n=t(e);return null===n&&(0,r.mcG)("THREE.WebGLRenderer: "+e+" extension not supported."),n}}}function F(e,n,t,i){let a={},o=new WeakMap;function l(e){let r=e.target;for(let e in null!==r.index&&n.remove(r.index),r.attributes)n.remove(r.attributes[e]);r.removeEventListener("dispose",l),delete a[r.id];let s=o.get(r);s&&(n.remove(s),o.delete(r)),i.releaseStatesOfGeometry(r),!0===r.isInstancedBufferGeometry&&delete r._maxInstanceCount,t.memory.geometries--}function s(e){let t=[],i=e.index,a=e.attributes.position,l=0;if(null!==i){let e=i.array;l=i.version;for(let n=0,r=e.length;nn.maxTextureSize&&(h=Math.ceil(m/n.maxTextureSize),m=n.maxTextureSize);let _=new Float32Array(m*h*4*u),g=new r.rFo(_,m,h,u);g.type=r.RQf,g.needsUpdate=!0;let v=4*p;for(let n=0;n0)return e;let i=n*t,a=q[i];if(void 0===a&&(a=new Float32Array(i),q[i]=a),0!==n){r.toArray(a,0);for(let r=1,i=0;r!==n;++r)i+=t,e[r].toArray(a,i)}return a}function J(e,n){if(e.length!==n.length)return!1;for(let t=0,r=e.length;t":" "} ${i}: ${t[e]}`)}return r.join("\n")}(e.getShaderSource(n),r)}}let eQ=new r.Pq0;function eZ(e){return""!==e}function e$(e,n){let t=n.numSpotLightShadows+n.numSpotLightMaps-n.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,n.numDirLights).replace(/NUM_SPOT_LIGHTS/g,n.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,n.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,n.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,n.numPointLights).replace(/NUM_HEMI_LIGHTS/g,n.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,n.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,n.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,n.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,n.numPointLightShadows)}function eJ(e,n){return e.replace(/NUM_CLIPPING_PLANES/g,n.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,n.numClippingPlanes-n.numClipIntersection)}let e0=/^[ \t]*#include +<([\w\d./]+)>/gm;function e3(e){return e.replace(e0,e2)}let e1=new Map;function e2(e,n){let t=o[n];if(void 0===t){let e=e1.get(n);if(void 0!==e)t=o[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',n,e);else throw Error("Can not resolve #include <"+n+">")}return e3(t)}let e4=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function e5(e){return e.replace(e4,e6)}function e6(e,n,t,r){let i="";for(let e=parseInt(n);e0&&(a+="\n"),(l=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M].filter(eZ).join("\n")).length>0&&(l+="\n")):(a=[e9(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+v:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&!1===t.flatShading?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+_:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif","\n"].filter(eZ).join("\n"),l=[e9(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,M,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+g:"",t.envMap?"#define "+v:"",t.envMap?"#define "+E:"",S?"#define CUBEUV_TEXEL_WIDTH "+S.texelWidth:"",S?"#define CUBEUV_TEXEL_HEIGHT "+S.texelHeight:"",S?"#define CUBEUV_MAX_MIP "+S.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&!1===t.flatShading?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+_:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.decodeVideoTextureEmissive?"#define DECODE_VIDEO_TEXTURE_EMISSIVE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==r.y_p?"#define TONE_MAPPING":"",t.toneMapping!==r.y_p?o.tonemapping_pars_fragment:"",t.toneMapping!==r.y_p?function(e,n){let t;switch(n){case r.kyO:t="Linear";break;case r.Mjd:t="Reinhard";break;case r.nNL:t="Cineon";break;case r.FV:t="ACESFilmic";break;case r.LAk:t="AgX";break;case r.aJ8:t="Neutral";break;case r.g7M:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",n),t="Linear"}return"vec3 "+e+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",o.colorspace_pars_fragment,function(e,n){let t=function(e){r.ppV._getMatrix(eY,r.ppV.workingColorSpace,e);let n=`mat3( ${eY.elements.map(e=>e.toFixed(4))} )`;switch(r.ppV.getTransfer(e)){case r.VxR:return[n,"LinearTransferOETF"];case r.KLL:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space: ",e),[n,"LinearTransferOETF"]}}(n);return`vec4 ${e}( vec4 value ) { + return ${t[1]}( vec4( value.rgb * ${t[0]}, value.a ) ); +}`}("linearToOutputTexel",t.outputColorSpace),function(){r.ppV.getLuminanceCoefficients(eQ);let e=eQ.x.toFixed(4),n=eQ.y.toFixed(4),t=eQ.z.toFixed(4);return`float luminance( const in vec3 rgb ) { + const vec3 weights = vec3( ${e}, ${n}, ${t} ); + return dot( weights, rgb ); +}`}(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"","\n"].filter(eZ).join("\n")),m=eJ(m=e$(m=e3(m),t),t),h=eJ(h=e$(h=e3(h),t),t),m=e5(m),h=e5(h),!0!==t.isRawShaderMaterial&&(R="#version 300 es\n",a=[T,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+a,l=["#define varying in",t.glslVersion===r.Wdf?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===r.Wdf?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+l);let A=R+a+m,C=R+l+h,b=eK(f,f.VERTEX_SHADER,A),L=eK(f,f.FRAGMENT_SHADER,C);function P(n){if(e.debug.checkShaderErrors){let t=f.getProgramInfoLog(x).trim(),r=f.getShaderInfoLog(b).trim(),i=f.getShaderInfoLog(L).trim(),o=!0,s=!0;if(!1===f.getProgramParameter(x,f.LINK_STATUS))if(o=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(f,x,b,L);else{let e=ej(f,b,"vertex"),r=ej(f,L,"fragment");console.error("THREE.WebGLProgram: Shader Error "+f.getError()+" - VALIDATE_STATUS "+f.getProgramParameter(x,f.VALIDATE_STATUS)+"\n\nMaterial Name: "+n.name+"\nMaterial Type: "+n.type+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+r)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):(""===r||""===i)&&(s=!1);s&&(n.diagnostics={runnable:o,programLog:t,vertexShader:{log:r,prefix:a},fragmentShader:{log:i,prefix:l}})}f.deleteShader(b),f.deleteShader(L),s=new eX(f,x),c=function(e,n){let t={},r=e.getProgramParameter(n,e.ACTIVE_ATTRIBUTES);for(let i=0;i0,j=o.clearcoat>0,Q=o.dispersion>0,Z=o.iridescence>0,$=o.sheen>0,J=o.transmission>0,ee=Y&&!!o.anisotropyMap,en=j&&!!o.clearcoatMap,et=j&&!!o.clearcoatNormalMap,er=j&&!!o.clearcoatRoughnessMap,ei=Z&&!!o.iridescenceMap,ea=Z&&!!o.iridescenceThicknessMap,eo=$&&!!o.sheenColorMap,el=$&&!!o.sheenRoughnessMap,es=!!o.specularMap,ec=!!o.specularColorMap,ed=!!o.specularIntensityMap,eu=J&&!!o.transmissionMap,ef=J&&!!o.thicknessMap,ep=!!o.gradientMap,em=!!o.alphaMap,eh=o.alphaTest>0,e_=!!o.alphaHash,eg=!!o.extensions,ev=r.y_p;o.toneMapped&&(null===I||!0===I.isXRRenderTarget)&&(ev=e.toneMapping);let eE={shaderID:P,shaderType:o.type,shaderName:o.name,vertexShader:S,fragmentShader:T,defines:o.defines,customVertexShaderID:M,customFragmentShaderID:x,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:h,batching:O,batchingColor:O&&null!==E._colorsTexture,instancing:N,instancingColor:N&&null!==E.instanceColor,instancingMorph:N&&null!==E.morphTexture,supportsVertexTextures:m,outputColorSpace:null===I?e.outputColorSpace:!0===I.isXRRenderTarget?I.texture.colorSpace:r.Zr2,alphaToCoverage:!!o.alphaToCoverage,map:F,matcap:B,envMap:G,envMapMode:G&&b.mapping,envMapCubeUVHeight:L,aoMap:H,lightMap:V,bumpMap:k,normalMap:z,displacementMap:m&&W,emissiveMap:X,normalMapObjectSpace:z&&o.normalMapType===r.vyJ,normalMapTangentSpace:z&&o.normalMapType===r.bI3,metalnessMap:K,roughnessMap:q,anisotropy:Y,anisotropyMap:ee,clearcoat:j,clearcoatMap:en,clearcoatNormalMap:et,clearcoatRoughnessMap:er,dispersion:Q,iridescence:Z,iridescenceMap:ei,iridescenceThicknessMap:ea,sheen:$,sheenColorMap:eo,sheenRoughnessMap:el,specularMap:es,specularColorMap:ec,specularIntensityMap:ed,transmission:J,transmissionMap:eu,thicknessMap:ef,gradientMap:ep,opaque:!1===o.transparent&&o.blending===r.NTi&&!1===o.alphaToCoverage,alphaMap:em,alphaTest:eh,alphaHash:e_,combine:o.combine,mapUv:F&&g(o.map.channel),aoMapUv:H&&g(o.aoMap.channel),lightMapUv:V&&g(o.lightMap.channel),bumpMapUv:k&&g(o.bumpMap.channel),normalMapUv:z&&g(o.normalMap.channel),displacementMapUv:W&&g(o.displacementMap.channel),emissiveMapUv:X&&g(o.emissiveMap.channel),metalnessMapUv:K&&g(o.metalnessMap.channel),roughnessMapUv:q&&g(o.roughnessMap.channel),anisotropyMapUv:ee&&g(o.anisotropyMap.channel),clearcoatMapUv:en&&g(o.clearcoatMap.channel),clearcoatNormalMapUv:et&&g(o.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:er&&g(o.clearcoatRoughnessMap.channel),iridescenceMapUv:ei&&g(o.iridescenceMap.channel),iridescenceThicknessMapUv:ea&&g(o.iridescenceThicknessMap.channel),sheenColorMapUv:eo&&g(o.sheenColorMap.channel),sheenRoughnessMapUv:el&&g(o.sheenRoughnessMap.channel),specularMapUv:es&&g(o.specularMap.channel),specularColorMapUv:ec&&g(o.specularColorMap.channel),specularIntensityMapUv:ed&&g(o.specularIntensityMap.channel),transmissionMapUv:eu&&g(o.transmissionMap.channel),thicknessMapUv:ef&&g(o.thicknessMap.channel),alphaMapUv:em&&g(o.alphaMap.channel),vertexTangents:!!A.attributes.tangent&&(z||Y),vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!A.attributes.color&&4===A.attributes.color.itemSize,pointsUvs:!0===E.isPoints&&!!A.attributes.uv&&(F||em),fog:!!R,useFog:!0===o.fog,fogExp2:!!R&&R.isFogExp2,flatShading:!0===o.flatShading,sizeAttenuation:!0===o.sizeAttenuation,logarithmicDepthBuffer:p,reverseDepthBuffer:y,skinning:!0===E.isSkinnedMesh,morphTargets:void 0!==A.morphAttributes.position,morphNormals:void 0!==A.morphAttributes.normal,morphColors:void 0!==A.morphAttributes.color,morphTargetsCount:D,morphTextureStride:w,numDirLights:c.directional.length,numPointLights:c.point.length,numSpotLights:c.spot.length,numSpotLightMaps:c.spotLightMap.length,numRectAreaLights:c.rectArea.length,numHemiLights:c.hemi.length,numDirLightShadows:c.directionalShadowMap.length,numPointLightShadows:c.pointShadowMap.length,numSpotLightShadows:c.spotShadowMap.length,numSpotLightShadowsWithMaps:c.numSpotLightShadowsWithMaps,numLightProbes:c.numLightProbes,numClippingPlanes:l.numPlanes,numClipIntersection:l.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&f.length>0,shadowMapType:e.shadowMap.type,toneMapping:ev,decodeVideoTexture:F&&!0===o.map.isVideoTexture&&r.ppV.getTransfer(o.map.colorSpace)===r.KLL,decodeVideoTextureEmissive:X&&!0===o.emissiveMap.isVideoTexture&&r.ppV.getTransfer(o.emissiveMap.colorSpace)===r.KLL,premultipliedAlpha:o.premultipliedAlpha,doubleSided:o.side===r.$EB,flipSided:o.side===r.hsX,useDepthPacking:o.depthPacking>=0,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionClipCullDistance:eg&&!0===o.extensions.clipCullDistance&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(eg&&!0===o.extensions.multiDraw||O)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:o.customProgramCacheKey()};return eE.vertexUv1s=u.has(1),eE.vertexUv2s=u.has(2),eE.vertexUv3s=u.has(3),u.clear(),eE},getProgramCacheKey:function(n){var t,r,i,a;let o=[];if(n.shaderID?o.push(n.shaderID):(o.push(n.customVertexShaderID),o.push(n.customFragmentShaderID)),void 0!==n.defines)for(let e in n.defines)o.push(e),o.push(n.defines[e]);return!1===n.isRawShaderMaterial&&(t=o,r=n,t.push(r.precision),t.push(r.outputColorSpace),t.push(r.envMapMode),t.push(r.envMapCubeUVHeight),t.push(r.mapUv),t.push(r.alphaMapUv),t.push(r.lightMapUv),t.push(r.aoMapUv),t.push(r.bumpMapUv),t.push(r.normalMapUv),t.push(r.displacementMapUv),t.push(r.emissiveMapUv),t.push(r.metalnessMapUv),t.push(r.roughnessMapUv),t.push(r.anisotropyMapUv),t.push(r.clearcoatMapUv),t.push(r.clearcoatNormalMapUv),t.push(r.clearcoatRoughnessMapUv),t.push(r.iridescenceMapUv),t.push(r.iridescenceThicknessMapUv),t.push(r.sheenColorMapUv),t.push(r.sheenRoughnessMapUv),t.push(r.specularMapUv),t.push(r.specularColorMapUv),t.push(r.specularIntensityMapUv),t.push(r.transmissionMapUv),t.push(r.thicknessMapUv),t.push(r.combine),t.push(r.fogExp2),t.push(r.sizeAttenuation),t.push(r.morphTargetsCount),t.push(r.morphAttributeCount),t.push(r.numDirLights),t.push(r.numPointLights),t.push(r.numSpotLights),t.push(r.numSpotLightMaps),t.push(r.numHemiLights),t.push(r.numRectAreaLights),t.push(r.numDirLightShadows),t.push(r.numPointLightShadows),t.push(r.numSpotLightShadows),t.push(r.numSpotLightShadowsWithMaps),t.push(r.numLightProbes),t.push(r.shadowMapType),t.push(r.toneMapping),t.push(r.numClippingPlanes),t.push(r.numClipIntersection),t.push(r.depthPacking),i=o,a=n,c.disableAll(),a.supportsVertexTextures&&c.enable(0),a.instancing&&c.enable(1),a.instancingColor&&c.enable(2),a.instancingMorph&&c.enable(3),a.matcap&&c.enable(4),a.envMap&&c.enable(5),a.normalMapObjectSpace&&c.enable(6),a.normalMapTangentSpace&&c.enable(7),a.clearcoat&&c.enable(8),a.iridescence&&c.enable(9),a.alphaTest&&c.enable(10),a.vertexColors&&c.enable(11),a.vertexAlphas&&c.enable(12),a.vertexUv1s&&c.enable(13),a.vertexUv2s&&c.enable(14),a.vertexUv3s&&c.enable(15),a.vertexTangents&&c.enable(16),a.anisotropy&&c.enable(17),a.alphaHash&&c.enable(18),a.batching&&c.enable(19),a.dispersion&&c.enable(20),a.batchingColor&&c.enable(21),i.push(c.mask),c.disableAll(),a.fog&&c.enable(0),a.useFog&&c.enable(1),a.flatShading&&c.enable(2),a.logarithmicDepthBuffer&&c.enable(3),a.reverseDepthBuffer&&c.enable(4),a.skinning&&c.enable(5),a.morphTargets&&c.enable(6),a.morphNormals&&c.enable(7),a.morphColors&&c.enable(8),a.premultipliedAlpha&&c.enable(9),a.shadowMapEnabled&&c.enable(10),a.doubleSided&&c.enable(11),a.flipSided&&c.enable(12),a.useDepthPacking&&c.enable(13),a.dithering&&c.enable(14),a.transmission&&c.enable(15),a.sheen&&c.enable(16),a.opaque&&c.enable(17),a.pointsUvs&&c.enable(18),a.decodeVideoTexture&&c.enable(19),a.decodeVideoTextureEmissive&&c.enable(20),a.alphaToCoverage&&c.enable(21),i.push(c.mask),o.push(e.outputColorSpace)),o.push(n.customProgramCacheKey),o.join()},getUniforms:function(e){let n,t=_[e.type];if(t){let e=s[t];n=r.LlO.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(n,t){let r;for(let e=0,n=f.length;e0?r.push(d):!0===o.transparent?i.push(d):t.push(d)},unshift:function(e,n,o,l,s,c){let d=a(e,n,o,l,s,c);o.transmission>0?r.unshift(d):!0===o.transparent?i.unshift(d):t.unshift(d)},finish:function(){for(let t=n,r=e.length;t1&&t.sort(e||ni),r.length>1&&r.sort(n||na),i.length>1&&i.sort(n||na)}}}function nl(){let e=new WeakMap;return{get:function(n,t){let r,i=e.get(n);return void 0===i?(r=new no,e.set(n,[r])):t>=i.length?(r=new no,i.push(r)):r=i[t],r},dispose:function(){e=new WeakMap}}}function ns(){let e={};return{get:function(n){let t;if(void 0!==e[n.id])return e[n.id];switch(n.type){case"DirectionalLight":t={direction:new r.Pq0,color:new r.Q1f};break;case"SpotLight":t={position:new r.Pq0,direction:new r.Pq0,color:new r.Q1f,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new r.Pq0,color:new r.Q1f,distance:0,decay:0};break;case"HemisphereLight":t={direction:new r.Pq0,skyColor:new r.Q1f,groundColor:new r.Q1f};break;case"RectAreaLight":t={color:new r.Q1f,position:new r.Pq0,halfWidth:new r.Pq0,halfHeight:new r.Pq0}}return e[n.id]=t,t}}}let nc=0;function nd(e,n){return 2*!!n.castShadow-2*!!e.castShadow+ +!!n.map-!!e.map}function nu(e){let n=new ns,t=function(){let e={};return{get:function(n){let t;if(void 0!==e[n.id])return e[n.id];switch(n.type){case"DirectionalLight":case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new r.I9Y};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new r.I9Y,shadowCameraNear:1,shadowCameraFar:1e3}}return e[n.id]=t,t}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let e=0;e<9;e++)i.probe.push(new r.Pq0);let a=new r.Pq0,o=new r.kn4,s=new r.kn4;return{setup:function(r){let a=0,o=0,s=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,d=0,u=0,f=0,p=0,m=0,h=0,_=0,g=0,v=0,E=0;r.sort(nd);for(let e=0,l=r.length;e0&&(!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=l.LTC_FLOAT_1,i.rectAreaLTC2=l.LTC_FLOAT_2):(i.rectAreaLTC1=l.LTC_HALF_1,i.rectAreaLTC2=l.LTC_HALF_2)),i.ambient[0]=a,i.ambient[1]=o,i.ambient[2]=s;let S=i.hash;(S.directionalLength!==c||S.pointLength!==d||S.spotLength!==u||S.rectAreaLength!==f||S.hemiLength!==p||S.numDirectionalShadows!==m||S.numPointShadows!==h||S.numSpotShadows!==_||S.numSpotMaps!==g||S.numLightProbes!==E)&&(i.directional.length=c,i.spot.length=u,i.rectArea.length=f,i.point.length=d,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=h,i.pointShadowMap.length=h,i.spotShadow.length=_,i.spotShadowMap.length=_,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=h,i.spotLightMatrix.length=_+g-v,i.spotLightMap.length=g,i.numSpotLightShadowsWithMaps=v,i.numLightProbes=E,S.directionalLength=c,S.pointLength=d,S.spotLength=u,S.rectAreaLength=f,S.hemiLength=p,S.numDirectionalShadows=m,S.numPointShadows=h,S.numSpotShadows=_,S.numSpotMaps=g,S.numLightProbes=E,i.version=nc++)},setupView:function(e,n){let t=0,r=0,l=0,c=0,d=0,u=n.matrixWorldInverse;for(let n=0,f=e.length;n=a.length?(i=new nf(e),a.push(i)):i=a[r],i},dispose:function(){n=new WeakMap}}}function nm(e,n,t){let i=new r.PPD,a=new r.I9Y,o=new r.I9Y,l=new r.IUQ,s=new r.CSG({depthPacking:r.N5j}),c=new r.aVO,d={},u=t.maxTextureSize,f={[r.hB5]:r.hsX,[r.hsX]:r.hB5,[r.$EB]:r.$EB},p=new r.BKk({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new r.I9Y},radius:{value:4}},vertexShader:"void main() {\n gl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n const float samples = float( VSM_SAMPLES );\n float mean = 0.0;\n float squared_mean = 0.0;\n float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n float uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n for ( float i = 0.0; i < samples; i ++ ) {\n float uvOffset = uvStart + i * uvStride;\n #ifdef HORIZONTAL_PASS\n vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n mean += distribution.x;\n squared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n #else\n float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n mean += depth;\n squared_mean += depth * depth;\n #endif\n }\n mean = mean / samples;\n squared_mean = squared_mean / samples;\n float std_dev = sqrt( squared_mean - mean * mean );\n gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),m=p.clone();m.defines.HORIZONTAL_PASS=1;let h=new r.LoY;h.setAttribute("position",new r.THS(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let _=new r.eaF(h,p),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=r.QP0;let v=this.type;function E(n,t,i,a){let o=null,l=!0===i.isPointLight?n.customDistanceMaterial:n.customDepthMaterial;if(void 0!==l)o=l;else if(o=!0===i.isPointLight?c:s,e.localClippingEnabled&&!0===t.clipShadows&&Array.isArray(t.clippingPlanes)&&0!==t.clippingPlanes.length||t.displacementMap&&0!==t.displacementScale||t.alphaMap&&t.alphaTest>0||t.map&&t.alphaTest>0){let e=o.uuid,n=t.uuid,r=d[e];void 0===r&&(r={},d[e]=r);let i=r[n];void 0===i&&(i=o.clone(),r[n]=i,t.addEventListener("dispose",S)),o=i}return o.visible=t.visible,o.wireframe=t.wireframe,a===r.RyA?o.side=null!==t.shadowSide?t.shadowSide:t.side:o.side=null!==t.shadowSide?t.shadowSide:f[t.side],o.alphaMap=t.alphaMap,o.alphaTest=t.alphaTest,o.map=t.map,o.clipShadows=t.clipShadows,o.clippingPlanes=t.clippingPlanes,o.clipIntersection=t.clipIntersection,o.displacementMap=t.displacementMap,o.displacementScale=t.displacementScale,o.displacementBias=t.displacementBias,o.wireframeLinewidth=t.wireframeLinewidth,o.linewidth=t.linewidth,!0===i.isPointLight&&!0===o.isMeshDistanceMaterial&&(e.properties.get(o).light=i),o}function S(e){for(let n in e.target.removeEventListener("dispose",S),d){let t=d[n],r=e.target.uuid;r in t&&(t[r].dispose(),delete t[r])}}this.render=function(t,s,c){if(!1===g.enabled||!1===g.autoUpdate&&!1===g.needsUpdate||0===t.length)return;let d=e.getRenderTarget(),f=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),S=e.state;S.setBlending(r.XIg),S.buffers.color.setClear(1,1,1,1),S.buffers.depth.setTest(!0),S.setScissorTest(!1);let T=v!==r.RyA&&this.type===r.RyA,M=v===r.RyA&&this.type!==r.RyA;for(let d=0,f=t.length;du||a.y>u)&&(a.x>u&&(o.x=Math.floor(u/g.x),a.x=o.x*g.x,h.mapSize.x=o.x),a.y>u&&(o.y=Math.floor(u/g.y),a.y=o.y*g.y,h.mapSize.y=o.y)),null===h.map||!0===T||!0===M){let e=this.type!==r.RyA?{minFilter:r.hxR,magFilter:r.hxR}:{};null!==h.map&&h.map.dispose(),h.map=new r.nWS(a.x,a.y,e),h.map.texture.name=f.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();let v=h.getViewportCount();for(let t=0;t=1:-1!==w.indexOf("OpenGL ES")&&(U=parseFloat(/^OpenGL ES (\d)/.exec(w)[1])>=2);let I=null,y={},N=e.getParameter(e.SCISSOR_BOX),O=e.getParameter(e.VIEWPORT),F=new r.IUQ().fromArray(N),B=new r.IUQ().fromArray(O);function G(n,t,r,i){let a=new Uint8Array(4),o=e.createTexture();e.bindTexture(n,o),e.texParameteri(n,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(n,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;ot||i.height>t)&&(r=t/Math.max(i.width,i.height)),r<1)if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&e instanceof VideoFrame){let t=Math.floor(r*i.width),a=Math.floor(r*i.height);void 0===s&&(s=h(t,a));let o=n?h(t,a):s;return o.width=t,o.height=a,o.getContext("2d").drawImage(e,0,0,t,a),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+t+"x"+a+")."),o}else"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+").");return e}function g(e){return e.generateMipmaps}function v(n){e.generateMipmap(n)}function E(t,i,a,o,l=!1){if(null!==t){if(void 0!==e[t])return e[t];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+t+"'")}let s=i;if(i===e.RED&&(a===e.FLOAT&&(s=e.R32F),a===e.HALF_FLOAT&&(s=e.R16F),a===e.UNSIGNED_BYTE&&(s=e.R8)),i===e.RED_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.R8UI),a===e.UNSIGNED_SHORT&&(s=e.R16UI),a===e.UNSIGNED_INT&&(s=e.R32UI),a===e.BYTE&&(s=e.R8I),a===e.SHORT&&(s=e.R16I),a===e.INT&&(s=e.R32I)),i===e.RG&&(a===e.FLOAT&&(s=e.RG32F),a===e.HALF_FLOAT&&(s=e.RG16F),a===e.UNSIGNED_BYTE&&(s=e.RG8)),i===e.RG_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.RG8UI),a===e.UNSIGNED_SHORT&&(s=e.RG16UI),a===e.UNSIGNED_INT&&(s=e.RG32UI),a===e.BYTE&&(s=e.RG8I),a===e.SHORT&&(s=e.RG16I),a===e.INT&&(s=e.RG32I)),i===e.RGB_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.RGB8UI),a===e.UNSIGNED_SHORT&&(s=e.RGB16UI),a===e.UNSIGNED_INT&&(s=e.RGB32UI),a===e.BYTE&&(s=e.RGB8I),a===e.SHORT&&(s=e.RGB16I),a===e.INT&&(s=e.RGB32I)),i===e.RGBA_INTEGER&&(a===e.UNSIGNED_BYTE&&(s=e.RGBA8UI),a===e.UNSIGNED_SHORT&&(s=e.RGBA16UI),a===e.UNSIGNED_INT&&(s=e.RGBA32UI),a===e.BYTE&&(s=e.RGBA8I),a===e.SHORT&&(s=e.RGBA16I),a===e.INT&&(s=e.RGBA32I)),i===e.RGB&&a===e.UNSIGNED_INT_5_9_9_9_REV&&(s=e.RGB9_E5),i===e.RGBA){let n=l?r.VxR:r.ppV.getTransfer(o);a===e.FLOAT&&(s=e.RGBA32F),a===e.HALF_FLOAT&&(s=e.RGBA16F),a===e.UNSIGNED_BYTE&&(s=n===r.KLL?e.SRGB8_ALPHA8:e.RGBA8),a===e.UNSIGNED_SHORT_4_4_4_4&&(s=e.RGBA4),a===e.UNSIGNED_SHORT_5_5_5_1&&(s=e.RGB5_A1)}return(s===e.R16F||s===e.R32F||s===e.RG16F||s===e.RG32F||s===e.RGBA16F||s===e.RGBA32F)&&n.get("EXT_color_buffer_float"),s}function S(n,t){let i;return n?null===t||t===r.bkx||t===r.V3x?i=e.DEPTH24_STENCIL8:t===r.RQf?i=e.DEPTH32F_STENCIL8:t===r.cHt&&(i=e.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===t||t===r.bkx||t===r.V3x?i=e.DEPTH_COMPONENT24:t===r.RQf?i=e.DEPTH_COMPONENT32F:t===r.cHt&&(i=e.DEPTH_COMPONENT16),i}function T(e,n){return!0===g(e)||e.isFramebufferTexture&&e.minFilter!==r.hxR&&e.minFilter!==r.k6q?Math.log2(Math.max(n.width,n.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?n.mipmaps.length:1}function M(e){let n=e.target;n.removeEventListener("dispose",M),function(e){let n=i.get(e);if(void 0===n.__webglInit)return;let t=e.source,r=p.get(t);if(r){let i=r[n.__cacheKey];i.usedTimes--,0===i.usedTimes&&R(e),0===Object.keys(r).length&&p.delete(t)}i.remove(e)}(n),n.isVideoTexture&&f.delete(n)}function x(n){let t=n.target;t.removeEventListener("dispose",x),function(n){let t=i.get(n);if(n.depthTexture&&(n.depthTexture.dispose(),i.remove(n.depthTexture)),n.isWebGLCubeRenderTarget)for(let n=0;n<6;n++){if(Array.isArray(t.__webglFramebuffer[n]))for(let r=0;r0&&a.__version!==n.version){let e=n.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void w(a,n,r);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}t.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+r)}let b={[r.GJx]:e.REPEAT,[r.ghU]:e.CLAMP_TO_EDGE,[r.kTW]:e.MIRRORED_REPEAT},L={[r.hxR]:e.NEAREST,[r.pHI]:e.NEAREST_MIPMAP_NEAREST,[r.Cfg]:e.NEAREST_MIPMAP_LINEAR,[r.k6q]:e.LINEAR,[r.kRr]:e.LINEAR_MIPMAP_NEAREST,[r.$_I]:e.LINEAR_MIPMAP_LINEAR},P={[r.amv]:e.NEVER,[r.FFZ]:e.ALWAYS,[r.vim]:e.LESS,[r.TiK]:e.LEQUAL,[r.kO0]:e.EQUAL,[r.gWB]:e.GEQUAL,[r.eoi]:e.GREATER,[r.jzd]:e.NOTEQUAL};function U(t,o){if((o.type===r.RQf&&!1===n.has("OES_texture_float_linear")&&(o.magFilter===r.k6q||o.magFilter===r.kRr||o.magFilter===r.Cfg||o.magFilter===r.$_I||o.minFilter===r.k6q||o.minFilter===r.kRr||o.minFilter===r.Cfg||o.minFilter===r.$_I)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),e.texParameteri(t,e.TEXTURE_WRAP_S,b[o.wrapS]),e.texParameteri(t,e.TEXTURE_WRAP_T,b[o.wrapT]),(t===e.TEXTURE_3D||t===e.TEXTURE_2D_ARRAY)&&e.texParameteri(t,e.TEXTURE_WRAP_R,b[o.wrapR]),e.texParameteri(t,e.TEXTURE_MAG_FILTER,L[o.magFilter]),e.texParameteri(t,e.TEXTURE_MIN_FILTER,L[o.minFilter]),o.compareFunction&&(e.texParameteri(t,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(t,e.TEXTURE_COMPARE_FUNC,P[o.compareFunction])),!0===n.has("EXT_texture_filter_anisotropic"))&&o.magFilter!==r.hxR&&(o.minFilter===r.Cfg||o.minFilter===r.$_I)&&(o.type!==r.RQf||!1!==n.has("OES_texture_float_linear"))&&(o.anisotropy>1||i.get(o).__currentAnisotropy)){let r=n.get("EXT_texture_filter_anisotropic");e.texParameterf(t,r.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,a.getMaxAnisotropy())),i.get(o).__currentAnisotropy=o.anisotropy}}function D(n,t){let r=!1;void 0===n.__webglInit&&(n.__webglInit=!0,t.addEventListener("dispose",M));let i=t.source,a=p.get(i);void 0===a&&(a={},p.set(i,a));let o=function(e){let n=[];return n.push(e.wrapS),n.push(e.wrapT),n.push(e.wrapR||0),n.push(e.magFilter),n.push(e.minFilter),n.push(e.anisotropy),n.push(e.internalFormat),n.push(e.format),n.push(e.type),n.push(e.generateMipmaps),n.push(e.premultiplyAlpha),n.push(e.flipY),n.push(e.unpackAlignment),n.push(e.colorSpace),n.join()}(t);if(o!==n.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},l.memory.textures++,r=!0),a[o].usedTimes++;let i=a[n.__cacheKey];void 0!==i&&(a[n.__cacheKey].usedTimes--,0===i.usedTimes&&R(t)),n.__cacheKey=o,n.__webglTexture=a[o].texture}return r}function w(n,l,s){let c=e.TEXTURE_2D;(l.isDataArrayTexture||l.isCompressedArrayTexture)&&(c=e.TEXTURE_2D_ARRAY),l.isData3DTexture&&(c=e.TEXTURE_3D);let d=D(n,l),u=l.source;t.bindTexture(c,n.__webglTexture,e.TEXTURE0+s);let f=i.get(u);if(u.version!==f.__version||!0===d){let n;t.activeTexture(e.TEXTURE0+s);let i=r.ppV.getPrimaries(r.ppV.workingColorSpace),p=l.colorSpace===r.jf0?null:r.ppV.getPrimaries(l.colorSpace),m=l.colorSpace===r.jf0||i===p?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,l.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,l.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,m);let h=_(l.image,!1,a.maxTextureSize);h=H(l,h);let M=o.convert(l.format,l.colorSpace),x=o.convert(l.type),R=E(l.internalFormat,M,x,l.colorSpace,l.isVideoTexture);U(c,l);let A=l.mipmaps,C=!0!==l.isVideoTexture,b=void 0===f.__version||!0===d,L=u.dataReady,P=T(l,h);if(l.isDepthTexture)R=S(l.format===r.dcC,l.type),b&&(C?t.texStorage2D(e.TEXTURE_2D,1,R,h.width,h.height):t.texImage2D(e.TEXTURE_2D,0,R,h.width,h.height,0,M,x,null));else if(l.isDataTexture)if(A.length>0){C&&b&&t.texStorage2D(e.TEXTURE_2D,P,R,A[0].width,A[0].height);for(let r=0,i=A.length;r0){let a=(0,r.Nex)(n.width,n.height,l.format,l.type);for(let r of l.layerUpdates){let o=n.data.subarray(r*a/n.data.BYTES_PER_ELEMENT,(r+1)*a/n.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,r,n.width,n.height,1,M,o)}l.clearLayerUpdates()}else t.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,n.width,n.height,h.depth,M,n.data)}else t.compressedTexImage3D(e.TEXTURE_2D_ARRAY,i,R,n.width,n.height,h.depth,0,n.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else C?L&&t.texSubImage3D(e.TEXTURE_2D_ARRAY,i,0,0,0,n.width,n.height,h.depth,M,x,n.data):t.texImage3D(e.TEXTURE_2D_ARRAY,i,R,n.width,n.height,h.depth,0,M,x,n.data)}else{C&&b&&t.texStorage2D(e.TEXTURE_2D,P,R,A[0].width,A[0].height);for(let i=0,a=A.length;i0){let n=(0,r.Nex)(h.width,h.height,l.format,l.type);for(let r of l.layerUpdates){let i=h.data.subarray(r*n/h.data.BYTES_PER_ELEMENT,(r+1)*n/h.data.BYTES_PER_ELEMENT);t.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,r,h.width,h.height,1,M,x,i)}l.clearLayerUpdates()}else t.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,h.width,h.height,h.depth,M,x,h.data)}else t.texImage3D(e.TEXTURE_2D_ARRAY,0,R,h.width,h.height,h.depth,0,M,x,h.data);else if(l.isData3DTexture)C?(b&&t.texStorage3D(e.TEXTURE_3D,P,R,h.width,h.height,h.depth),L&&t.texSubImage3D(e.TEXTURE_3D,0,0,0,0,h.width,h.height,h.depth,M,x,h.data)):t.texImage3D(e.TEXTURE_3D,0,R,h.width,h.height,h.depth,0,M,x,h.data);else if(l.isFramebufferTexture){if(b)if(C)t.texStorage2D(e.TEXTURE_2D,P,R,h.width,h.height);else{let n=h.width,r=h.height;for(let i=0;i>=1,r>>=1}}else if(A.length>0){if(C&&b){let n=V(A[0]);t.texStorage2D(e.TEXTURE_2D,P,R,n.width,n.height)}for(let r=0,i=A.length;r>d),i=Math.max(1,r.height>>d);s===e.TEXTURE_3D||s===e.TEXTURE_2D_ARRAY?t.texImage3D(s,d,p,n,i,r.depth,0,u,f,null):t.texImage2D(s,d,p,n,i,0,u,f,null)}t.bindFramebuffer(e.FRAMEBUFFER,n),G(r)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,l,s,h.__webglTexture,0,B(r)):(s===e.TEXTURE_2D||s>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&s<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,l,s,h.__webglTexture,d),t.bindFramebuffer(e.FRAMEBUFFER,null)}function y(n,t,r){if(e.bindRenderbuffer(e.RENDERBUFFER,n),t.depthBuffer){let i=t.depthTexture,a=i&&i.isDepthTexture?i.type:null,o=S(t.stencilBuffer,a),l=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,s=B(t);G(t)?c.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,s,o,t.width,t.height):r?e.renderbufferStorageMultisample(e.RENDERBUFFER,s,o,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,o,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,l,e.RENDERBUFFER,n)}else{let n=t.textures;for(let i=0;i{delete a.__boundDepthTexture,delete a.__depthDisposeCallback,e.removeEventListener("dispose",n)};e.addEventListener("dispose",n),a.__depthDisposeCallback=n}a.__boundDepthTexture=e}if(n.depthTexture&&!a.__autoAllocateDepthBuffer){if(o)throw Error("target.depthTexture not supported in Cube render targets");!function(n,a){if(a&&a.isWebGLCubeRenderTarget)throw Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(e.FRAMEBUFFER,n),!(a.depthTexture&&a.depthTexture.isDepthTexture))throw Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");let o=i.get(a.depthTexture);o.__renderTarget=a,o.__webglTexture&&a.depthTexture.image.width===a.width&&a.depthTexture.image.height===a.height||(a.depthTexture.image.width=a.width,a.depthTexture.image.height=a.height,a.depthTexture.needsUpdate=!0),C(a.depthTexture,0);let l=o.__webglTexture,s=B(a);if(a.depthTexture.format===r.zdS)G(a)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,l,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,l,0);else if(a.depthTexture.format===r.dcC)G(a)?c.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,l,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,l,0);else throw Error("Unknown depthTexture format")}(a.__webglFramebuffer,n)}else if(o){a.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(t.bindFramebuffer(e.FRAMEBUFFER,a.__webglFramebuffer[r]),void 0===a.__webglDepthbuffer[r])a.__webglDepthbuffer[r]=e.createRenderbuffer(),y(a.__webglDepthbuffer[r],n,!1);else{let t=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,i=a.__webglDepthbuffer[r];e.bindRenderbuffer(e.RENDERBUFFER,i),e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,i)}}else if(t.bindFramebuffer(e.FRAMEBUFFER,a.__webglFramebuffer),void 0===a.__webglDepthbuffer)a.__webglDepthbuffer=e.createRenderbuffer(),y(a.__webglDepthbuffer,n,!1);else{let t=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,r=a.__webglDepthbuffer;e.bindRenderbuffer(e.RENDERBUFFER,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,t,e.RENDERBUFFER,r)}t.bindFramebuffer(e.FRAMEBUFFER,null)}let O=[],F=[];function B(e){return Math.min(a.maxSamples,e.samples)}function G(e){let t=i.get(e);return e.samples>0&&!0===n.has("WEBGL_multisampled_render_to_texture")&&!1!==t.__useRenderToTexture}function H(e,n){let t=e.colorSpace,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||t!==r.Zr2&&t!==r.jf0&&(r.ppV.getTransfer(t)===r.KLL?(i!==r.GWd||a!==r.OUM)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",t)),n}function V(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement?(u.width=e.naturalWidth||e.width,u.height=e.naturalHeight||e.height):"undefined"!=typeof VideoFrame&&e instanceof VideoFrame?(u.width=e.displayWidth,u.height=e.displayHeight):(u.width=e.width,u.height=e.height),u}this.allocateTextureUnit=function(){let e=A;return e>=a.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+a.maxTextures),A+=1,e},this.resetTextureUnits=function(){A=0},this.setTexture2D=C,this.setTexture2DArray=function(n,r){let a=i.get(n);if(n.version>0&&a.__version!==n.version)return void w(a,n,r);t.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+r)},this.setTexture3D=function(n,r){let a=i.get(n);if(n.version>0&&a.__version!==n.version)return void w(a,n,r);t.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+r)},this.setTextureCube=function(n,l){let s=i.get(n);if(n.version>0&&s.__version!==n.version)return void function(n,l,s){if(6!==l.image.length)return;let c=D(n,l),d=l.source;t.bindTexture(e.TEXTURE_CUBE_MAP,n.__webglTexture,e.TEXTURE0+s);let u=i.get(d);if(d.version!==u.__version||!0===c){let n;t.activeTexture(e.TEXTURE0+s);let i=r.ppV.getPrimaries(r.ppV.workingColorSpace),f=l.colorSpace===r.jf0?null:r.ppV.getPrimaries(l.colorSpace),p=l.colorSpace===r.jf0||i===f?e.NONE:e.BROWSER_DEFAULT_WEBGL;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,l.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,l.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,l.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,p);let m=l.isCompressedTexture||l.image[0].isCompressedTexture,h=l.image[0]&&l.image[0].isDataTexture,S=[];for(let e=0;e<6;e++)m||h?S[e]=h?l.image[e].image:l.image[e]:S[e]=_(l.image[e],!0,a.maxCubemapSize),S[e]=H(l,S[e]);let M=S[0],x=o.convert(l.format,l.colorSpace),R=o.convert(l.type),A=E(l.internalFormat,x,R,l.colorSpace),C=!0!==l.isVideoTexture,b=void 0===u.__version||!0===c,L=d.dataReady,P=T(l,M);if(U(e.TEXTURE_CUBE_MAP,l),m){C&&b&&t.texStorage2D(e.TEXTURE_CUBE_MAP,P,A,M.width,M.height);for(let i=0;i<6;i++){n=S[i].mipmaps;for(let a=0;a0&&P++;let r=V(S[0]);t.texStorage2D(e.TEXTURE_CUBE_MAP,P,A,r.width,r.height)}for(let r=0;r<6;r++)if(h){C?L&&t.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,0,0,S[r].width,S[r].height,x,R,S[r].data):t.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,A,S[r].width,S[r].height,0,x,R,S[r].data);for(let i=0;i1;if(!u&&(void 0===s.__webglTexture&&(s.__webglTexture=e.createTexture()),s.__version=r.version,l.memory.textures++),d){a.__webglFramebuffer=[];for(let n=0;n<6;n++)if(r.mipmaps&&r.mipmaps.length>0){a.__webglFramebuffer[n]=[];for(let t=0;t0){a.__webglFramebuffer=[];for(let n=0;n0&&!1===G(n)){a.__webglMultisampledFramebuffer=e.createFramebuffer(),a.__webglColorRenderbuffer=[],t.bindFramebuffer(e.FRAMEBUFFER,a.__webglMultisampledFramebuffer);for(let t=0;t0)for(let i=0;i0)for(let t=0;t0){if(!1===G(n)){let r=n.textures,a=n.width,o=n.height,l=e.COLOR_BUFFER_BIT,s=n.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,c=i.get(n),u=r.length>1;if(u)for(let n=0;n= 1.0 ) { + + gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; + + } else { + + gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; + + } + +}`;class nT{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,n,t){if(null===this.texture){let i=new r.gPd;e.properties.get(i).__webglTexture=n.texture,(n.depthNear!==t.depthNear||n.depthFar!==t.depthFar)&&(this.depthNear=n.depthNear,this.depthFar=n.depthFar),this.texture=i}}getMesh(e){if(null!==this.texture&&null===this.mesh){let n=e.cameras[0].viewport,t=new r.BKk({vertexShader:nE,fragmentShader:nS,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new r.eaF(new r.bdM(20,20),t)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class nM extends r.Qev{constructor(e,n){super();let t=this,a=null,o=1,l=null,s="local-floor",c=1,d=null,u=null,f=null,p=null,m=null,h=null,_=new nT,g=n.getContextAttributes(),v=null,E=null,S=[],T=[],M=new r.I9Y,x=null,R=new r.ubm;R.viewport=new r.IUQ;let A=new r.ubm;A.viewport=new r.IUQ;let C=[R,A],b=new r.nZQ,L=null,P=null;function U(e){let n=T.indexOf(e.inputSource);if(-1===n)return;let t=S[n];void 0!==t&&(t.update(e.inputSource,e.frame,d||l),t.dispatchEvent({type:e.type,data:e.inputSource}))}function D(){a.removeEventListener("select",U),a.removeEventListener("selectstart",U),a.removeEventListener("selectend",U),a.removeEventListener("squeeze",U),a.removeEventListener("squeezestart",U),a.removeEventListener("squeezeend",U),a.removeEventListener("end",D),a.removeEventListener("inputsourceschange",w);for(let e=0;e=0&&(T[r]=null,S[r].disconnect(t))}for(let n=0;n=T.length){T.push(t),r=e;break}else if(null===T[e]){T[e]=t,r=e;break}if(-1===r)break}let i=S[r];i&&i.connect(t)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let n=S[e];return void 0===n&&(n=new r.R3r,S[e]=n),n.getTargetRaySpace()},this.getControllerGrip=function(e){let n=S[e];return void 0===n&&(n=new r.R3r,S[e]=n),n.getGripSpace()},this.getHand=function(e){let n=S[e];return void 0===n&&(n=new r.R3r,S[e]=n),n.getHandSpace()},this.setFramebufferScaleFactor=function(e){o=e,!0===t.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===t.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return d||l},this.setReferenceSpace=function(e){d=e},this.getBaseLayer=function(){return null!==p?p:m},this.getBinding=function(){return f},this.getFrame=function(){return h},this.getSession=function(){return a},this.setSession=async function(i){if(null!==(a=i)){if(v=e.getRenderTarget(),a.addEventListener("select",U),a.addEventListener("selectstart",U),a.addEventListener("selectend",U),a.addEventListener("squeeze",U),a.addEventListener("squeezestart",U),a.addEventListener("squeezeend",U),a.addEventListener("end",D),a.addEventListener("inputsourceschange",w),!0!==g.xrCompatible&&await n.makeXRCompatible(),x=e.getPixelRatio(),e.getSize(M),"undefined"!=typeof XRWebGLBinding&&"createProjectionLayer"in XRWebGLBinding.prototype){let t=null,i=null,l=null;g.depth&&(l=g.stencil?n.DEPTH24_STENCIL8:n.DEPTH_COMPONENT24,t=g.stencil?r.dcC:r.zdS,i=g.stencil?r.V3x:r.bkx);let s={colorFormat:n.RGBA8,depthFormat:l,scaleFactor:o};p=(f=new XRWebGLBinding(a,n)).createProjectionLayer(s),a.updateRenderState({layers:[p]}),e.setPixelRatio(1),e.setSize(p.textureWidth,p.textureHeight,!1),E=new r.nWS(p.textureWidth,p.textureHeight,{format:r.GWd,type:r.OUM,depthTexture:new r.VCu(p.textureWidth,p.textureHeight,i,void 0,void 0,void 0,void 0,void 0,void 0,t),stencilBuffer:g.stencil,colorSpace:e.outputColorSpace,samples:4*!!g.antialias,resolveDepthBuffer:!1===p.ignoreDepthValues,resolveStencilBuffer:!1===p.ignoreDepthValues})}else{let t={antialias:g.antialias,alpha:!0,depth:g.depth,stencil:g.stencil,framebufferScaleFactor:o};m=new XRWebGLLayer(a,n,t),a.updateRenderState({baseLayer:m}),e.setPixelRatio(1),e.setSize(m.framebufferWidth,m.framebufferHeight,!1),E=new r.nWS(m.framebufferWidth,m.framebufferHeight,{format:r.GWd,type:r.OUM,colorSpace:e.outputColorSpace,stencilBuffer:g.stencil,resolveDepthBuffer:!1===m.ignoreDepthValues,resolveStencilBuffer:!1===m.ignoreDepthValues})}E.isXRRenderTarget=!0,this.setFoveation(c),d=null,l=await a.requestReferenceSpace(s),F.setContext(a),F.start(),t.isPresenting=!0,t.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==a)return a.environmentBlendMode},this.getDepthTexture=function(){return _.getDepthTexture()};let I=new r.Pq0,y=new r.Pq0;function N(e,n){null===n?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(n.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){var n,t,i;if(null===a)return;let o=e.near,l=e.far;null!==_.texture&&(_.depthNear>0&&(o=_.depthNear),_.depthFar>0&&(l=_.depthFar)),b.near=A.near=R.near=o,b.far=A.far=R.far=l,(L!==b.near||P!==b.far)&&(a.updateRenderState({depthNear:b.near,depthFar:b.far}),L=b.near,P=b.far),R.layers.mask=2|e.layers.mask,A.layers.mask=4|e.layers.mask,b.layers.mask=R.layers.mask|A.layers.mask;let s=e.parent,c=b.cameras;N(b,s);for(let e=0;e0&&(e.alphaTest.value=i.alphaTest);let a=n.get(i),o=a.envMap,l=a.envMapRotation;o&&(e.envMap.value=o,nx.copy(l),nx.x*=-1,nx.y*=-1,nx.z*=-1,o.isCubeTexture&&!1===o.isRenderTargetTexture&&(nx.y*=-1,nx.z*=-1),e.envMapRotation.value.setFromMatrix4(nR.makeRotationFromEuler(nx)),e.flipEnvMap.value=o.isCubeTexture&&!1===o.isRenderTargetTexture?-1:1,e.reflectivity.value=i.reflectivity,e.ior.value=i.ior,e.refractionRatio.value=i.refractionRatio),i.lightMap&&(e.lightMap.value=i.lightMap,e.lightMapIntensity.value=i.lightMapIntensity,t(i.lightMap,e.lightMapTransform)),i.aoMap&&(e.aoMap.value=i.aoMap,e.aoMapIntensity.value=i.aoMapIntensity,t(i.aoMap,e.aoMapTransform))}return{refreshFogUniforms:function(n,t){t.color.getRGB(n.fogColor.value,(0,r._Ut)(e)),t.isFog?(n.fogNear.value=t.near,n.fogFar.value=t.far):t.isFogExp2&&(n.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,a,o,l,s){var c,d,u,f,p,m,h,_,g,v,E,S,T,M,x,R,A,C,b,L,P;a.isMeshBasicMaterial||a.isMeshLambertMaterial?i(e,a):a.isMeshToonMaterial?(i(e,a),c=e,(d=a).gradientMap&&(c.gradientMap.value=d.gradientMap)):a.isMeshPhongMaterial?(i(e,a),u=e,f=a,u.specular.value.copy(f.specular),u.shininess.value=Math.max(f.shininess,1e-4)):a.isMeshStandardMaterial?(i(e,a),p=e,m=a,p.metalness.value=m.metalness,m.metalnessMap&&(p.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,p.metalnessMapTransform)),p.roughness.value=m.roughness,m.roughnessMap&&(p.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,p.roughnessMapTransform)),m.envMap&&(p.envMapIntensity.value=m.envMapIntensity),a.isMeshPhysicalMaterial&&(h=e,_=a,g=s,h.ior.value=_.ior,_.sheen>0&&(h.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),h.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(h.sheenColorMap.value=_.sheenColorMap,t(_.sheenColorMap,h.sheenColorMapTransform)),_.sheenRoughnessMap&&(h.sheenRoughnessMap.value=_.sheenRoughnessMap,t(_.sheenRoughnessMap,h.sheenRoughnessMapTransform))),_.clearcoat>0&&(h.clearcoat.value=_.clearcoat,h.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(h.clearcoatMap.value=_.clearcoatMap,t(_.clearcoatMap,h.clearcoatMapTransform)),_.clearcoatRoughnessMap&&(h.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap,t(_.clearcoatRoughnessMap,h.clearcoatRoughnessMapTransform)),_.clearcoatNormalMap&&(h.clearcoatNormalMap.value=_.clearcoatNormalMap,t(_.clearcoatNormalMap,h.clearcoatNormalMapTransform),h.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),_.side===r.hsX&&h.clearcoatNormalScale.value.negate())),_.dispersion>0&&(h.dispersion.value=_.dispersion),_.iridescence>0&&(h.iridescence.value=_.iridescence,h.iridescenceIOR.value=_.iridescenceIOR,h.iridescenceThicknessMinimum.value=_.iridescenceThicknessRange[0],h.iridescenceThicknessMaximum.value=_.iridescenceThicknessRange[1],_.iridescenceMap&&(h.iridescenceMap.value=_.iridescenceMap,t(_.iridescenceMap,h.iridescenceMapTransform)),_.iridescenceThicknessMap&&(h.iridescenceThicknessMap.value=_.iridescenceThicknessMap,t(_.iridescenceThicknessMap,h.iridescenceThicknessMapTransform))),_.transmission>0&&(h.transmission.value=_.transmission,h.transmissionSamplerMap.value=g.texture,h.transmissionSamplerSize.value.set(g.width,g.height),_.transmissionMap&&(h.transmissionMap.value=_.transmissionMap,t(_.transmissionMap,h.transmissionMapTransform)),h.thickness.value=_.thickness,_.thicknessMap&&(h.thicknessMap.value=_.thicknessMap,t(_.thicknessMap,h.thicknessMapTransform)),h.attenuationDistance.value=_.attenuationDistance,h.attenuationColor.value.copy(_.attenuationColor)),_.anisotropy>0&&(h.anisotropyVector.value.set(_.anisotropy*Math.cos(_.anisotropyRotation),_.anisotropy*Math.sin(_.anisotropyRotation)),_.anisotropyMap&&(h.anisotropyMap.value=_.anisotropyMap,t(_.anisotropyMap,h.anisotropyMapTransform))),h.specularIntensity.value=_.specularIntensity,h.specularColor.value.copy(_.specularColor),_.specularColorMap&&(h.specularColorMap.value=_.specularColorMap,t(_.specularColorMap,h.specularColorMapTransform)),_.specularIntensityMap&&(h.specularIntensityMap.value=_.specularIntensityMap,t(_.specularIntensityMap,h.specularIntensityMapTransform)))):a.isMeshMatcapMaterial?(i(e,a),v=e,(E=a).matcap&&(v.matcap.value=E.matcap)):a.isMeshDepthMaterial?i(e,a):a.isMeshDistanceMaterial?(i(e,a),function(e,t){let r=n.get(t).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,a)):a.isMeshNormalMaterial?i(e,a):a.isLineBasicMaterial?(S=e,T=a,S.diffuse.value.copy(T.color),S.opacity.value=T.opacity,T.map&&(S.map.value=T.map,t(T.map,S.mapTransform)),a.isLineDashedMaterial&&(M=e,x=a,M.dashSize.value=x.dashSize,M.totalSize.value=x.dashSize+x.gapSize,M.scale.value=x.scale)):a.isPointsMaterial?(R=e,A=a,C=o,b=l,R.diffuse.value.copy(A.color),R.opacity.value=A.opacity,R.size.value=A.size*C,R.scale.value=.5*b,A.map&&(R.map.value=A.map,t(A.map,R.uvTransform)),A.alphaMap&&(R.alphaMap.value=A.alphaMap,t(A.alphaMap,R.alphaMapTransform)),A.alphaTest>0&&(R.alphaTest.value=A.alphaTest)):a.isSpriteMaterial?(L=e,P=a,L.diffuse.value.copy(P.color),L.opacity.value=P.opacity,L.rotation.value=P.rotation,P.map&&(L.map.value=P.map,t(P.map,L.mapTransform)),P.alphaMap&&(L.alphaMap.value=P.alphaMap,t(P.alphaMap,L.alphaMapTransform)),P.alphaTest>0&&(L.alphaTest.value=P.alphaTest)):a.isShadowMaterial?(e.color.value.copy(a.color),e.opacity.value=a.opacity):a.isShaderMaterial&&(a.uniformsNeedUpdate=!1)}}}function nC(e,n,t,r){let i={},a={},o=[],l=e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS);function s(e){let n={boundary:0,storage:0};return"number"==typeof e||"boolean"==typeof e?(n.boundary=4,n.storage=4):e.isVector2?(n.boundary=8,n.storage=8):e.isVector3||e.isColor?(n.boundary=16,n.storage=12):e.isVector4?(n.boundary=16,n.storage=16):e.isMatrix3?(n.boundary=48,n.storage=48):e.isMatrix4?(n.boundary=64,n.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),n}function c(n){let t=n.target;t.removeEventListener("dispose",c);let r=o.indexOf(t.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[t.id]),delete i[t.id],delete a[t.id]}return{bind:function(e,n){let t=n.program;r.uniformBlockBinding(e,t)},update:function(t,d){let u=i[t.id];void 0===u&&(function(e){let n=e.uniforms,t=0;for(let e=0,r=n.length;e0&&(t+=16-r),e.__size=t,e.__cache={}}(t),u=function(n){let t=function(){for(let e=0;es.matrixWorld.determinant(),h=function(e,n,t,i,a){var s,f;!0!==n.isScene&&(n=ew),d.resetTextureUnits();let p=n.fog,m=i.isMeshStandardMaterial?n.environment:null,h=null===ec?ea.outputColorSpace:!0===ec.isXRRenderTarget?ec.texture.colorSpace:r.Zr2,_=(i.isMeshStandardMaterial?v:u).get(i.envMap||m),g=!0===i.vertexColors&&!!t.attributes.color&&4===t.attributes.color.itemSize,E=!!t.attributes.tangent&&(!!i.normalMap||i.anisotropy>0),S=!!t.morphAttributes.position,T=!!t.morphAttributes.normal,M=!!t.morphAttributes.color,R=r.y_p;i.toneMapped&&(null===ec||!0===ec.isXRRenderTarget)&&(R=ea.toneMapping);let A=t.morphAttributes.position||t.morphAttributes.normal||t.morphAttributes.color,b=void 0!==A?A.length:0,L=c.get(i),U=et.state.lights;if(!0===eC&&(!0===eb||e!==eu)){let n=e===eu&&i.id===ed;C.setState(i,e,n)}let D=!1;i.version===L.__version?L.needsLights&&L.lightsStateVersion!==U.state.version||L.outputColorSpace!==h||a.isBatchedMesh&&!1===L.batching?D=!0:a.isBatchedMesh||!0!==L.batching?a.isBatchedMesh&&!0===L.batchingColor&&null===a.colorTexture||a.isBatchedMesh&&!1===L.batchingColor&&null!==a.colorTexture||a.isInstancedMesh&&!1===L.instancing?D=!0:a.isInstancedMesh||!0!==L.instancing?a.isSkinnedMesh&&!1===L.skinning?D=!0:a.isSkinnedMesh||!0!==L.skinning?a.isInstancedMesh&&!0===L.instancingColor&&null===a.instanceColor||a.isInstancedMesh&&!1===L.instancingColor&&null!==a.instanceColor||a.isInstancedMesh&&!0===L.instancingMorph&&null===a.morphTexture||a.isInstancedMesh&&!1===L.instancingMorph&&null!==a.morphTexture||L.envMap!==_||!0===i.fog&&L.fog!==p||void 0!==L.numClippingPlanes&&(L.numClippingPlanes!==C.numPlanes||L.numIntersection!==C.numIntersection)||L.vertexAlphas!==g||L.vertexTangents!==E||L.morphTargets!==S||L.morphNormals!==T||L.morphColors!==M||L.toneMapping!==R?D=!0:L.morphTargetsCount!==b&&(D=!0):D=!0:D=!0:D=!0:(D=!0,L.__version=i.version);let w=L.currentProgram;!0===D&&(w=e0(i,n,a));let I=!1,N=!1,O=!1,F=w.getUniforms(),B=L.uniforms;if(l.useProgram(w.program)&&(I=!0,N=!0,O=!0),i.id!==ed&&(ed=i.id,N=!0),I||eu!==e){l.buffers.depth.getReversed()?(eL.copy(e.projectionMatrix),(0,r.xiE)(eL),(0,r.Mmk)(eL),F.setValue(eN,"projectionMatrix",eL)):F.setValue(eN,"projectionMatrix",e.projectionMatrix),F.setValue(eN,"viewMatrix",e.matrixWorldInverse);let n=F.map.cameraPosition;void 0!==n&&n.setValue(eN,eU.setFromMatrixPosition(e.matrixWorld)),o.logarithmicDepthBuffer&&F.setValue(eN,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),(i.isMeshPhongMaterial||i.isMeshToonMaterial||i.isMeshLambertMaterial||i.isMeshBasicMaterial||i.isMeshStandardMaterial||i.isShaderMaterial)&&F.setValue(eN,"isOrthographic",!0===e.isOrthographicCamera),eu!==e&&(eu=e,N=!0,O=!0)}if(a.isSkinnedMesh){F.setOptional(eN,a,"bindMatrix"),F.setOptional(eN,a,"bindMatrixInverse");let e=a.skeleton;e&&(null===e.boneTexture&&e.computeBoneTexture(),F.setValue(eN,"boneTexture",e.boneTexture,d))}a.isBatchedMesh&&(F.setOptional(eN,a,"batchingTexture"),F.setValue(eN,"batchingTexture",a._matricesTexture,d),F.setOptional(eN,a,"batchingIdTexture"),F.setValue(eN,"batchingIdTexture",a._indirectTexture,d),F.setOptional(eN,a,"batchingColorTexture"),null!==a._colorsTexture&&F.setValue(eN,"batchingColorTexture",a._colorsTexture,d));let G=t.morphAttributes;if((void 0!==G.position||void 0!==G.normal||void 0!==G.color)&&P.update(a,t,w),(N||L.receiveShadow!==a.receiveShadow)&&(L.receiveShadow=a.receiveShadow,F.setValue(eN,"receiveShadow",a.receiveShadow)),i.isMeshGouraudMaterial&&null!==i.envMap&&(B.envMap.value=_,B.flipEnvMap.value=_.isCubeTexture&&!1===_.isRenderTargetTexture?-1:1),i.isMeshStandardMaterial&&null===i.envMap&&null!==n.environment&&(B.envMapIntensity.value=n.environmentIntensity),N&&(F.setValue(eN,"toneMappingExposure",ea.toneMappingExposure),L.needsLights&&(s=B,f=O,s.ambientLightColor.needsUpdate=f,s.lightProbe.needsUpdate=f,s.directionalLights.needsUpdate=f,s.directionalLightShadows.needsUpdate=f,s.pointLights.needsUpdate=f,s.pointLightShadows.needsUpdate=f,s.spotLights.needsUpdate=f,s.spotLightShadows.needsUpdate=f,s.rectAreaLights.needsUpdate=f,s.hemisphereLights.needsUpdate=f),p&&!0===i.fog&&x.refreshFogUniforms(B,p),x.refreshMaterialUniforms(B,i,eE,ev,et.state.transmissionRenderTarget[e.id]),eX.upload(eN,e3(L),B,d)),i.isShaderMaterial&&!0===i.uniformsNeedUpdate&&(eX.upload(eN,e3(L),B,d),i.uniformsNeedUpdate=!1),i.isSpriteMaterial&&F.setValue(eN,"center",a.center),F.setValue(eN,"modelViewMatrix",a.modelViewMatrix),F.setValue(eN,"normalMatrix",a.normalMatrix),F.setValue(eN,"modelMatrix",a.matrixWorld),i.isShaderMaterial||i.isRawShaderMaterial){let e=i.uniformsGroups;for(let n=0,t=e.length;n{function r(){if(i.forEach(function(e){c.get(e).currentProgram.isReady()&&i.delete(e)}),0===i.size)return void n(e);setTimeout(r,10)}null!==t.get("KHR_parallel_shader_compile")?r():setTimeout(r,10)})};let eW=null;function eK(){eY.stop()}function eq(){eY.start()}let eY=new i;function ej(e,n,t,r){if(!1===e.visible)return;if(e.layers.test(n.layers)){if(e.isGroup)t=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(n);else if(e.isLight)et.pushLight(e),e.castShadow&&et.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||eA.intersectsSprite(e)){r&&eD.setFromMatrixPosition(e.matrixWorld).applyMatrix4(eP);let n=T.update(e),i=e.material;i.visible&&en.push(e,n,i,t,eD.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||eA.intersectsObject(e))){let n=T.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),eD.copy(e.boundingSphere.center)):(null===n.boundingSphere&&n.computeBoundingSphere(),eD.copy(n.boundingSphere.center)),eD.applyMatrix4(e.matrixWorld).applyMatrix4(eP)),Array.isArray(i)){let r=n.groups;for(let a=0,o=r.length;a0&&e$(i,n,t),a.length>0&&e$(a,n,t),o.length>0&&e$(o,n,t),l.buffers.depth.setTest(!0),l.buffers.depth.setMask(!0),l.buffers.color.setMask(!0),l.setPolygonOffset(!1)}function eZ(e,n,i,a){if(null!==(!0===i.isScene?i.overrideMaterial:null))return;void 0===et.state.transmissionRenderTarget[a.id]&&(et.state.transmissionRenderTarget[a.id]=new r.nWS(1,1,{generateMipmaps:!0,type:t.has("EXT_color_buffer_half_float")||t.has("EXT_color_buffer_float")?r.ix0:r.OUM,minFilter:r.$_I,samples:4,stencilBuffer:X,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:r.ppV.workingColorSpace}));let o=et.state.transmissionRenderTarget[a.id],l=a.viewport||ef;o.setSize(l.z*ea.transmissionResolutionScale,l.w*ea.transmissionResolutionScale);let s=ea.getRenderTarget();ea.setRenderTarget(o),ea.getClearColor(eh),(e_=ea.getClearAlpha())<1&&ea.setClearColor(0xffffff,.5),ea.clear(),eI&&L.render(i);let c=ea.toneMapping;ea.toneMapping=r.y_p;let u=a.viewport;if(void 0!==a.viewport&&(a.viewport=void 0),et.setupLightsView(a),!0===eC&&C.setGlobalState(ea.clippingPlanes,a),e$(e,i,a),d.updateMultisampleRenderTarget(o),d.updateRenderTargetMipmap(o),!1===t.has("WEBGL_multisampled_render_to_texture")){let e=!1;for(let t=0,o=n.length;t0)for(let n=0,a=t.length;n0&&eZ(r,i,e,n),eI&&L.render(e),eQ(en,e,n);null!==ec&&0===es&&(d.updateMultisampleRenderTarget(ec),d.updateRenderTargetMipmap(ec)),!0===e.isScene&&e.onAfterRender(ea,e,n),I.resetDefaultState(),ed=-1,eu=null,ei.pop(),ei.length>0?(et=ei[ei.length-1],!0===eC&&C.setGlobalState(ea.clippingPlanes,et.state.camera)):et=null,er.pop(),en=er.length>0?er[er.length-1]:null},this.getActiveCubeFace=function(){return el},this.getActiveMipmapLevel=function(){return es},this.getRenderTarget=function(){return ec},this.setRenderTargetTextures=function(e,n,t){let r=c.get(e);r.__autoAllocateDepthBuffer=!1===e.resolveDepthBuffer,!1===r.__autoAllocateDepthBuffer&&(r.__useRenderToTexture=!1),c.get(e.texture).__webglTexture=n,c.get(e.depthTexture).__webglTexture=r.__autoAllocateDepthBuffer?void 0:t,r.__hasExternalTextures=!0},this.setRenderTargetFramebuffer=function(e,n){let t=c.get(e);t.__webglFramebuffer=n,t.__useDefaultFramebuffer=void 0===n};let e2=eN.createFramebuffer();this.setRenderTarget=function(e,n=0,t=0){ec=e,el=n,es=t;let r=!0,i=null,a=!1,o=!1;if(e){let s=c.get(e);if(void 0!==s.__useDefaultFramebuffer)l.bindFramebuffer(eN.FRAMEBUFFER,null),r=!1;else if(void 0===s.__webglFramebuffer)d.setupRenderTarget(e);else if(s.__hasExternalTextures)d.rebindTextures(e,c.get(e.texture).__webglTexture,c.get(e.depthTexture).__webglTexture);else if(e.depthBuffer){let n=e.depthTexture;if(s.__boundDepthTexture!==n){if(null!==n&&c.has(n)&&(e.width!==n.image.width||e.height!==n.image.height))throw Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");d.setupDepthRenderbuffer(e)}}let u=e.texture;(u.isData3DTexture||u.isDataArrayTexture||u.isCompressedArrayTexture)&&(o=!0);let f=c.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=Array.isArray(f[n])?f[n][t]:f[n],a=!0):i=e.samples>0&&!1===d.useMultisampledRTT(e)?c.get(e).__webglMultisampledFramebuffer:Array.isArray(f)?f[t]:f,ef.copy(e.viewport),ep.copy(e.scissor),em=e.scissorTest}else ef.copy(eM).multiplyScalar(eE).floor(),ep.copy(ex).multiplyScalar(eE).floor(),em=eR;if(0!==t&&(i=e2),l.bindFramebuffer(eN.FRAMEBUFFER,i)&&r&&l.drawBuffers(e,i),l.viewport(ef),l.scissor(ep),l.setScissorTest(em),a){let r=c.get(e.texture);eN.framebufferTexture2D(eN.FRAMEBUFFER,eN.COLOR_ATTACHMENT0,eN.TEXTURE_CUBE_MAP_POSITIVE_X+n,r.__webglTexture,t)}else if(o){let r=c.get(e.texture);eN.framebufferTextureLayer(eN.FRAMEBUFFER,eN.COLOR_ATTACHMENT0,r.__webglTexture,t,n)}else if(null!==e&&0!==t){let n=c.get(e.texture);eN.framebufferTexture2D(eN.FRAMEBUFFER,eN.COLOR_ATTACHMENT0,eN.TEXTURE_2D,n.__webglTexture,t)}ed=-1},this.readRenderTargetPixels=function(e,n,t,r,i,a,s){if(!(e&&e.isWebGLRenderTarget))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let d=c.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(d=d[s]),d){l.bindFramebuffer(eN.FRAMEBUFFER,d);try{let l=e.texture,s=l.format,c=l.type;if(!o.textureFormatReadable(s))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!o.textureTypeReadable(c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");n>=0&&n<=e.width-r&&t>=0&&t<=e.height-i&&eN.readPixels(n,t,r,i,w.convert(s),w.convert(c),a)}finally{let e=null!==ec?c.get(ec).__webglFramebuffer:null;l.bindFramebuffer(eN.FRAMEBUFFER,e)}}},this.readRenderTargetPixelsAsync=async function(e,n,t,i,a,s,d){if(!(e&&e.isWebGLRenderTarget))throw Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let u=c.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==d&&(u=u[d]),u)if(n>=0&&n<=e.width-i&&t>=0&&t<=e.height-a){l.bindFramebuffer(eN.FRAMEBUFFER,u);let d=e.texture,f=d.format,p=d.type;if(!o.textureFormatReadable(f))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!o.textureTypeReadable(p))throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");let m=eN.createBuffer();eN.bindBuffer(eN.PIXEL_PACK_BUFFER,m),eN.bufferData(eN.PIXEL_PACK_BUFFER,s.byteLength,eN.STREAM_READ),eN.readPixels(n,t,i,a,w.convert(f),w.convert(p),0);let h=null!==ec?c.get(ec).__webglFramebuffer:null;l.bindFramebuffer(eN.FRAMEBUFFER,h);let _=eN.fenceSync(eN.SYNC_GPU_COMMANDS_COMPLETE,0);return eN.flush(),await (0,r.jej)(eN,_,4),eN.bindBuffer(eN.PIXEL_PACK_BUFFER,m),eN.getBufferSubData(eN.PIXEL_PACK_BUFFER,0,s),eN.deleteBuffer(m),eN.deleteSync(_),s}else throw Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")},this.copyFramebufferToTexture=function(e,n=null,t=0){let r=Math.pow(2,-t),i=Math.floor(e.image.width*r),a=Math.floor(e.image.height*r),o=null!==n?n.x:0,s=null!==n?n.y:0;d.setTexture2D(e,0),eN.copyTexSubImage2D(eN.TEXTURE_2D,t,0,0,o,s,i,a),l.unbindTexture()};let e4=eN.createFramebuffer(),e5=eN.createFramebuffer();this.copyTextureToTexture=function(e,n,t=null,i=null,a=0,o=null){let s,u,f,p,m,h,_,g,v,E;null===o&&(0!==a?((0,r.mcG)("WebGLRenderer: copyTextureToTexture function signature has changed to support src and dst mipmap levels."),o=a,a=0):o=0);let S=e.isCompressedTexture?e.mipmaps[o]:e.image;if(null!==t)s=t.max.x-t.min.x,u=t.max.y-t.min.y,f=t.isBox3?t.max.z-t.min.z:1,p=t.min.x,m=t.min.y,h=t.isBox3?t.min.z:0;else{let n=Math.pow(2,-a);s=Math.floor(S.width*n),u=Math.floor(S.height*n),f=e.isDataArrayTexture?S.depth:e.isData3DTexture?Math.floor(S.depth*n):1,p=0,m=0,h=0}null!==i?(_=i.x,g=i.y,v=i.z):(_=0,g=0,v=0);let T=w.convert(n.format),M=w.convert(n.type);n.isData3DTexture?(d.setTexture3D(n,0),E=eN.TEXTURE_3D):n.isDataArrayTexture||n.isCompressedArrayTexture?(d.setTexture2DArray(n,0),E=eN.TEXTURE_2D_ARRAY):(d.setTexture2D(n,0),E=eN.TEXTURE_2D),eN.pixelStorei(eN.UNPACK_FLIP_Y_WEBGL,n.flipY),eN.pixelStorei(eN.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),eN.pixelStorei(eN.UNPACK_ALIGNMENT,n.unpackAlignment);let x=eN.getParameter(eN.UNPACK_ROW_LENGTH),R=eN.getParameter(eN.UNPACK_IMAGE_HEIGHT),A=eN.getParameter(eN.UNPACK_SKIP_PIXELS),C=eN.getParameter(eN.UNPACK_SKIP_ROWS),b=eN.getParameter(eN.UNPACK_SKIP_IMAGES);eN.pixelStorei(eN.UNPACK_ROW_LENGTH,S.width),eN.pixelStorei(eN.UNPACK_IMAGE_HEIGHT,S.height),eN.pixelStorei(eN.UNPACK_SKIP_PIXELS,p),eN.pixelStorei(eN.UNPACK_SKIP_ROWS,m),eN.pixelStorei(eN.UNPACK_SKIP_IMAGES,h);let L=e.isDataArrayTexture||e.isData3DTexture,P=n.isDataArrayTexture||n.isData3DTexture;if(e.isDepthTexture){let t=c.get(e),r=c.get(n),i=c.get(t.__renderTarget),d=c.get(r.__renderTarget);l.bindFramebuffer(eN.READ_FRAMEBUFFER,i.__webglFramebuffer),l.bindFramebuffer(eN.DRAW_FRAMEBUFFER,d.__webglFramebuffer);for(let t=0;t{r.d(t,{Df:()=>tI});var a,n,o,s,i,l,u,p,c,m,d,h,f,g,y,v,b=r(9143),x=r(2232),w=r(9889),z=r(1053),T=r(1153),S=r(8764),I=Object.defineProperty,j=(e,t)=>{for(var r in t)I(e,r,{get:t[r],enumerable:!0})};function R(e,{contentType:t,dataStreamVersion:r}){let a=new Headers(null!=e?e:{});return a.has("Content-Type")||a.set("Content-Type",t),void 0!==r&&a.set("X-Vercel-AI-Data-Stream",r),a}function _(e,{contentType:t,dataStreamVersion:r}){let a={};if(null!=e)for(let[t,r]of Object.entries(e))a[t]=r;return null==a["Content-Type"]&&(a["Content-Type"]=t),void 0!==r&&(a["X-Vercel-AI-Data-Stream"]=r),a}function M({response:e,status:t,statusText:r,headers:a,stream:n}){e.writeHead(null!=t?t:200,r,a);let o=n.getReader();(async()=>{try{for(;;){let{done:t,value:r}=await o.read();if(t)break;e.write(r)}}catch(e){throw e}finally{e.end()}})()}var k="AI_InvalidArgumentError",C=`vercel.ai.error.${k}`,E=Symbol.for(C),A=class extends b.bD{constructor({parameter:e,value:t,message:r}){super({name:k,message:`Invalid argument for parameter ${e}: ${r}`}),this[a]=!0,this.parameter=e,this.value=t}static isInstance(e){return b.bD.hasMarker(e,C)}};a=E;var O="AI_RetryError",N=`vercel.ai.error.${O}`,$=Symbol.for(N),D=class extends b.bD{constructor({message:e,reason:t,errors:r}){super({name:O,message:e}),this[n]=!0,this.reason=t,this.errors=r,this.lastError=r[r.length-1]}static isInstance(e){return b.bD.hasMarker(e,N)}};n=$;var P=({maxRetries:e=2,initialDelayInMs:t=2e3,backoffFactor:r=2}={})=>async a=>U(a,{maxRetries:e,delayInMs:t,backoffFactor:r});async function U(e,{maxRetries:t,delayInMs:r,backoffFactor:a},n=[]){try{return await e()}catch(l){if((0,x.zf)(l)||0===t)throw l;let o=(0,x.u1)(l),s=[...n,l],i=s.length;if(i>t)throw new D({message:`Failed after ${i} attempts. Last error: ${o}`,reason:"maxRetriesExceeded",errors:s});if(l instanceof Error&&b.hL.isInstance(l)&&!0===l.isRetryable&&i<=t)return await (0,x.cb)(r),U(e,{maxRetries:t,delayInMs:a*r,backoffFactor:a},s);if(1===i)throw l;throw new D({message:`Failed after ${i} attempts with non-retryable error: '${o}'`,reason:"errorNotRetryable",errors:s})}}function q({maxRetries:e}){if(null!=e){if(!Number.isInteger(e))throw new A({parameter:"maxRetries",value:e,message:"maxRetries must be an integer"});if(e<0)throw new A({parameter:"maxRetries",value:e,message:"maxRetries must be >= 0"})}let t=null!=e?e:2;return{maxRetries:t,retry:P({maxRetries:t})}}function J({operationId:e,telemetry:t}){return{"operation.name":`${e}${(null==t?void 0:t.functionId)!=null?` ${t.functionId}`:""}`,"resource.name":null==t?void 0:t.functionId,"ai.operationId":e,"ai.telemetry.functionId":null==t?void 0:t.functionId}}function F({model:e,settings:t,telemetry:r,headers:a}){var n;return{"ai.model.provider":e.provider,"ai.model.id":e.modelId,...Object.entries(t).reduce((e,[t,r])=>(e[`ai.settings.${t}`]=r,e),{}),...Object.entries(null!=(n=null==r?void 0:r.metadata)?n:{}).reduce((e,[t,r])=>(e[`ai.telemetry.metadata.${t}`]=r,e),{}),...Object.entries(null!=a?a:{}).reduce((e,[t,r])=>(void 0!==r&&(e[`ai.request.headers.${t}`]=r),e),{})}}var L={startSpan:()=>V,startActiveSpan:(e,t,r,a)=>"function"==typeof t?t(V):"function"==typeof r?r(V):"function"==typeof a?a(V):void 0},V={spanContext:()=>B,setAttribute(){return this},setAttributes(){return this},addEvent(){return this},addLink(){return this},addLinks(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording:()=>!1,recordException(){return this}},B={traceId:"",spanId:"",traceFlags:0};function Z({isEnabled:e=!1,tracer:t}={}){return e?t||w.u.getTracer("ai"):L}function K({name:e,tracer:t,attributes:r,fn:a,endWhenDone:n=!0}){return t.startActiveSpan(e,{attributes:r},async e=>{try{let t=await a(e);return n&&e.end(),t}catch(t){try{t instanceof Error?(e.recordException({name:t.name,message:t.message,stack:t.stack}),e.setStatus({code:z.s.ERROR,message:t.message})):e.setStatus({code:z.s.ERROR})}finally{e.end()}throw t}})}function G({telemetry:e,attributes:t}){return(null==e?void 0:e.isEnabled)!==!0?{}:Object.entries(t).reduce((t,[r,a])=>{if(void 0===a)return t;if("object"==typeof a&&"input"in a&&"function"==typeof a.input){if((null==e?void 0:e.recordInputs)===!1)return t;let n=a.input();return void 0===n?t:{...t,[r]:n}}if("object"==typeof a&&"output"in a&&"function"==typeof a.output){if((null==e?void 0:e.recordOutputs)===!1)return t;let n=a.output();return void 0===n?t:{...t,[r]:n}}return{...t,[r]:a}},{})}var W="AI_NoImageGeneratedError",H=`vercel.ai.error.${W}`,X=Symbol.for(H);b.bD,o=X;var Q=class{constructor({data:e,mimeType:t}){let r=e instanceof Uint8Array;this.base64Data=r?void 0:e,this.uint8ArrayData=r?e:void 0,this.mimeType=t}get base64(){return null==this.base64Data&&(this.base64Data=(0,x.n_)(this.uint8ArrayData)),this.base64Data}get uint8Array(){return null==this.uint8ArrayData&&(this.uint8ArrayData=(0,x.Z9)(this.base64Data)),this.uint8ArrayData}},Y=class extends Q{constructor(e){super(e),this.type="file"}},ee=[{mimeType:"image/gif",bytesPrefix:[71,73,70],base64Prefix:"R0lG"},{mimeType:"image/png",bytesPrefix:[137,80,78,71],base64Prefix:"iVBORw"},{mimeType:"image/jpeg",bytesPrefix:[255,216],base64Prefix:"/9j/"},{mimeType:"image/webp",bytesPrefix:[82,73,70,70],base64Prefix:"UklGRg"},{mimeType:"image/bmp",bytesPrefix:[66,77],base64Prefix:"Qk"},{mimeType:"image/tiff",bytesPrefix:[73,73,42,0],base64Prefix:"SUkqAA"},{mimeType:"image/tiff",bytesPrefix:[77,77,0,42],base64Prefix:"TU0AKg"},{mimeType:"image/avif",bytesPrefix:[0,0,0,32,102,116,121,112,97,118,105,102],base64Prefix:"AAAAIGZ0eXBhdmlm"},{mimeType:"image/heic",bytesPrefix:[0,0,0,32,102,116,121,112,104,101,105,99],base64Prefix:"AAAAIGZ0eXBoZWlj"}],et=e=>{let t="string"==typeof e?(0,x.Z9)(e):e,r=(127&t[6])<<21|(127&t[7])<<14|(127&t[8])<<7|127&t[9];return t.slice(r+10)},er="AI_NoObjectGeneratedError",ea=`vercel.ai.error.${er}`,en=Symbol.for(ea),eo=class extends b.bD{constructor({message:e="No object generated.",cause:t,text:r,response:a,usage:n,finishReason:o}){super({name:er,message:e,cause:t}),this[s]=!0,this.text=r,this.response=a,this.usage=n,this.finishReason=o}static isInstance(e){return b.bD.hasMarker(e,ea)}};s=en;var es="AI_DownloadError",ei=`vercel.ai.error.${es}`,el=Symbol.for(ei),eu=class extends b.bD{constructor({url:e,statusCode:t,statusText:r,cause:a,message:n=null==a?`Failed to download ${e}: ${t} ${r}`:`Failed to download ${e}: ${a}`}){super({name:es,message:n,cause:a}),this[i]=!0,this.url=e,this.statusCode=t,this.statusText=r}static isInstance(e){return b.bD.hasMarker(e,ei)}};async function ep({url:e}){var t;let r=e.toString();try{let e=await fetch(r);if(!e.ok)throw new eu({url:r,statusCode:e.status,statusText:e.statusText});return{data:new Uint8Array(await e.arrayBuffer()),mimeType:null!=(t=e.headers.get("content-type"))?t:void 0}}catch(e){if(eu.isInstance(e))throw e;throw new eu({url:r,cause:e})}}i=el;var ec="AI_InvalidDataContentError",em=`vercel.ai.error.${ec}`,ed=Symbol.for(em),eh=class extends b.bD{constructor({content:e,cause:t,message:r=`Invalid data content. Expected a base64 string, Uint8Array, ArrayBuffer, or Buffer, but got ${typeof e}.`}){super({name:ec,message:r,cause:t}),this[l]=!0,this.content=e}static isInstance(e){return b.bD.hasMarker(e,em)}};l=ed;var ef=T.z.union([T.z.string(),T.z.instanceof(Uint8Array),T.z.instanceof(ArrayBuffer),T.z.custom(e=>{var t,r;return null!=(r=null==(t=globalThis.Buffer)?void 0:t.isBuffer(e))&&r},{message:"Must be a Buffer"})]);function eg(e){return"string"==typeof e?e:e instanceof ArrayBuffer?(0,x.n_)(new Uint8Array(e)):(0,x.n_)(e)}function ey(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)try{return(0,x.Z9)(e)}catch(t){throw new eh({message:"Invalid data content. Content string is not a base64-encoded media.",content:e,cause:t})}if(e instanceof ArrayBuffer)return new Uint8Array(e);throw new eh({content:e})}var ev="AI_InvalidMessageRoleError",eb=`vercel.ai.error.${ev}`,ex=Symbol.for(eb),ew=class extends b.bD{constructor({role:e,message:t=`Invalid message role: '${e}'. Must be one of: "system", "user", "assistant", "tool".`}){super({name:ev,message:t}),this[u]=!0,this.role=e}static isInstance(e){return b.bD.hasMarker(e,eb)}};async function ez({prompt:e,modelSupportsImageUrls:t=!0,modelSupportsUrl:r=()=>!1,downloadImplementation:a=ep}){let n=await eT(e.messages,a,t,r);return[...null!=e.system?[{role:"system",content:e.system}]:[],...e.messages.map(e=>(function(e,t){var r,a,n,o,s,i;let l=e.role;switch(l){case"system":return{role:"system",content:e.content,providerMetadata:null!=(r=e.providerOptions)?r:e.experimental_providerMetadata};case"user":if("string"==typeof e.content)return{role:"user",content:[{type:"text",text:e.content}],providerMetadata:null!=(a=e.providerOptions)?a:e.experimental_providerMetadata};return{role:"user",content:e.content.map(e=>(function(e,t){var r,a,n,o;let s,i,l;if("text"===e.type)return{type:"text",text:e.text,providerMetadata:null!=(r=e.providerOptions)?r:e.experimental_providerMetadata};let u=e.mimeType,p=e.type;switch(p){case"image":s=e.image;break;case"file":s=e.data;break;default:throw Error(`Unsupported part type: ${p}`)}try{i="string"==typeof s?new URL(s):s}catch(e){i=s}if(i instanceof URL)if("data:"===i.protocol){let{mimeType:e,base64Content:t}=function(e){try{let[t,r]=e.split(",");return{mimeType:t.split(";")[0].split(":")[1],base64Content:r}}catch(e){return{mimeType:void 0,base64Content:void 0}}}(i.toString());if(null==e||null==t)throw Error(`Invalid data URL format in part ${p}`);u=e,l=ey(t)}else{let e=t[i.toString()];e?(l=e.data,null!=u||(u=e.mimeType)):l=i}else l=ey(i);switch(p){case"image":return l instanceof Uint8Array&&(u=null!=(a=function({data:e,signatures:t}){let r="string"==typeof e&&e.startsWith("SUQz")||"string"!=typeof e&&e.length>10&&73===e[0]&&68===e[1]&&51===e[2]?et(e):e;for(let e of t)if("string"==typeof r?r.startsWith(e.base64Prefix):r.length>=e.bytesPrefix.length&&e.bytesPrefix.every((e,t)=>r[t]===e))return e.mimeType}({data:l,signatures:ee}))?a:u),{type:"image",image:l,mimeType:u,providerMetadata:null!=(n=e.providerOptions)?n:e.experimental_providerMetadata};case"file":if(null==u)throw Error("Mime type is missing for file part");return{type:"file",data:l instanceof Uint8Array?eg(l):l,filename:e.filename,mimeType:u,providerMetadata:null!=(o=e.providerOptions)?o:e.experimental_providerMetadata}}})(e,t)).filter(e=>"text"!==e.type||""!==e.text),providerMetadata:null!=(n=e.providerOptions)?n:e.experimental_providerMetadata};case"assistant":if("string"==typeof e.content)return{role:"assistant",content:[{type:"text",text:e.content}],providerMetadata:null!=(o=e.providerOptions)?o:e.experimental_providerMetadata};return{role:"assistant",content:e.content.filter(e=>"text"!==e.type||""!==e.text).map(e=>{var t;let r=null!=(t=e.providerOptions)?t:e.experimental_providerMetadata;switch(e.type){case"file":return{type:"file",data:e.data instanceof URL?e.data:eg(e.data),filename:e.filename,mimeType:e.mimeType,providerMetadata:r};case"reasoning":return{type:"reasoning",text:e.text,signature:e.signature,providerMetadata:r};case"redacted-reasoning":return{type:"redacted-reasoning",data:e.data,providerMetadata:r};case"text":return{type:"text",text:e.text,providerMetadata:r};case"tool-call":return{type:"tool-call",toolCallId:e.toolCallId,toolName:e.toolName,args:e.args,providerMetadata:r}}}),providerMetadata:null!=(s=e.providerOptions)?s:e.experimental_providerMetadata};case"tool":return{role:"tool",content:e.content.map(e=>{var t;return{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,result:e.result,content:e.experimental_content,isError:e.isError,providerMetadata:null!=(t=e.providerOptions)?t:e.experimental_providerMetadata}}),providerMetadata:null!=(i=e.providerOptions)?i:e.experimental_providerMetadata};default:throw new ew({role:l})}})(e,n))]}async function eT(e,t,r,a){let n=e.filter(e=>"user"===e.role).map(e=>e.content).filter(e=>Array.isArray(e)).flat().filter(e=>"image"===e.type||"file"===e.type).filter(e=>"image"!==e.type||!0!==r).map(e=>"image"===e.type?e.image:e.data).map(e=>"string"==typeof e&&(e.startsWith("http:")||e.startsWith("https:"))?new URL(e):e).filter(e=>e instanceof URL).filter(e=>!a(e));return Object.fromEntries((await Promise.all(n.map(async e=>({url:e,data:await t({url:e})})))).map(({url:e,data:t})=>[e.toString(),t]))}function eS({maxTokens:e,temperature:t,topP:r,topK:a,presencePenalty:n,frequencyPenalty:o,stopSequences:s,seed:i}){if(null!=e){if(!Number.isInteger(e))throw new A({parameter:"maxTokens",value:e,message:"maxTokens must be an integer"});if(e<1)throw new A({parameter:"maxTokens",value:e,message:"maxTokens must be >= 1"})}if(null!=t&&"number"!=typeof t)throw new A({parameter:"temperature",value:t,message:"temperature must be a number"});if(null!=r&&"number"!=typeof r)throw new A({parameter:"topP",value:r,message:"topP must be a number"});if(null!=a&&"number"!=typeof a)throw new A({parameter:"topK",value:a,message:"topK must be a number"});if(null!=n&&"number"!=typeof n)throw new A({parameter:"presencePenalty",value:n,message:"presencePenalty must be a number"});if(null!=o&&"number"!=typeof o)throw new A({parameter:"frequencyPenalty",value:o,message:"frequencyPenalty must be a number"});if(null!=i&&!Number.isInteger(i))throw new A({parameter:"seed",value:i,message:"seed must be an integer"});return{maxTokens:e,temperature:null!=t?t:0,topP:r,topK:a,presencePenalty:n,frequencyPenalty:o,stopSequences:null!=s&&s.length>0?s:void 0,seed:i}}function eI(e){var t,r,a;let n=[];for(let o of e){let e;try{e=new URL(o.url)}catch(e){throw Error(`Invalid URL: ${o.url}`)}switch(e.protocol){case"http:":case"https:":if(null==(t=o.contentType)?void 0:t.startsWith("image/"))n.push({type:"image",image:e});else{if(!o.contentType)throw Error("If the attachment is not an image, it must specify a content type");n.push({type:"file",data:e,mimeType:o.contentType})}break;case"data:":{let e,t,s;try{[e,t]=o.url.split(","),s=e.split(";")[0].split(":")[1]}catch(e){throw Error(`Error processing data URL: ${o.url}`)}if(null==s||null==t)throw Error(`Invalid data URL format: ${o.url}`);if(null==(r=o.contentType)?void 0:r.startsWith("image/"))n.push({type:"image",image:ey(t)});else if(null==(a=o.contentType)?void 0:a.startsWith("text/"))n.push({type:"text",text:function(e){try{return new TextDecoder().decode(e)}catch(e){throw Error("Error decoding Uint8Array to text")}}(ey(t))});else{if(!o.contentType)throw Error("If the attachment is not an image or text, it must specify a content type");n.push({type:"file",data:t,mimeType:o.contentType})}break}default:throw Error(`Unsupported URL protocol: ${e.protocol}`)}}return n}u=ex;var ej="AI_MessageConversionError",eR=`vercel.ai.error.${ej}`,e_=Symbol.for(eR),eM=class extends b.bD{constructor({originalMessage:e,message:t}){super({name:ej,message:t}),this[p]=!0,this.originalMessage=e}static isInstance(e){return b.bD.hasMarker(e,eR)}};p=e_;var ek=T.z.lazy(()=>T.z.union([T.z.null(),T.z.string(),T.z.number(),T.z.boolean(),T.z.record(T.z.string(),ek),T.z.array(ek)])),eC=T.z.record(T.z.string(),T.z.record(T.z.string(),ek)),eE=T.z.array(T.z.union([T.z.object({type:T.z.literal("text"),text:T.z.string()}),T.z.object({type:T.z.literal("image"),data:T.z.string(),mimeType:T.z.string().optional()})])),eA=T.z.object({type:T.z.literal("text"),text:T.z.string(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eO=T.z.object({type:T.z.literal("image"),image:T.z.union([ef,T.z.instanceof(URL)]),mimeType:T.z.string().optional(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eN=T.z.object({type:T.z.literal("file"),data:T.z.union([ef,T.z.instanceof(URL)]),filename:T.z.string().optional(),mimeType:T.z.string(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),e$=T.z.object({type:T.z.literal("reasoning"),text:T.z.string(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eD=T.z.object({type:T.z.literal("redacted-reasoning"),data:T.z.string(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eP=T.z.object({type:T.z.literal("tool-call"),toolCallId:T.z.string(),toolName:T.z.string(),args:T.z.unknown(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eU=T.z.object({type:T.z.literal("tool-result"),toolCallId:T.z.string(),toolName:T.z.string(),result:T.z.unknown(),content:eE.optional(),isError:T.z.boolean().optional(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eq=T.z.object({role:T.z.literal("system"),content:T.z.string(),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eJ=T.z.object({role:T.z.literal("user"),content:T.z.union([T.z.string(),T.z.array(T.z.union([eA,eO,eN]))]),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eF=T.z.object({role:T.z.literal("assistant"),content:T.z.union([T.z.string(),T.z.array(T.z.union([eA,eN,e$,eD,eP]))]),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eL=T.z.object({role:T.z.literal("tool"),content:T.z.array(eU),providerOptions:eC.optional(),experimental_providerMetadata:eC.optional()}),eV=T.z.union([eq,eJ,eF,eL]);function eB({prompt:e,tools:t}){if(null==e.prompt&&null==e.messages)throw new b.M3({prompt:e,message:"prompt or messages must be defined"});if(null!=e.prompt&&null!=e.messages)throw new b.M3({prompt:e,message:"prompt and messages cannot be defined at the same time"});if(null!=e.system&&"string"!=typeof e.system)throw new b.M3({prompt:e,message:"system must be a string"});if(null!=e.prompt){if("string"!=typeof e.prompt)throw new b.M3({prompt:e,message:"prompt must be a string"});return{type:"prompt",system:e.system,messages:[{role:"user",content:e.prompt}]}}if(null!=e.messages){let r="ui-messages"===function(e){if(!Array.isArray(e))throw new b.M3({prompt:e,message:`messages must be an array of CoreMessage or UIMessage +Received non-array value: ${JSON.stringify(e)}`,cause:e});if(0===e.length)return"messages";let t=e.map(eZ);if(t.some(e=>"has-ui-specific-parts"===e))return"ui-messages";let r=t.findIndex(e=>"has-core-specific-parts"!==e&&"message"!==e);if(-1===r)return"messages";throw new b.M3({prompt:e,message:`messages must be an array of CoreMessage or UIMessage +Received message of type: "${t[r]}" at index ${r} +messages[${r}]: ${JSON.stringify(e[r])}`,cause:e})}(e.messages)?function(e,t){var r,a;let n=null!=(r=null==t?void 0:t.tools)?r:{},o=[];for(let t=0;t"text"===e.type).map(e=>({type:"text",text:e.text}));o.push({role:"user",content:u?[...e,...eI(u)]:e})}break;case"assistant":{if(null!=r.parts){let e=function(){let e=[];for(let t of i)switch(t.type){case"file":case"text":e.push(t);break;case"reasoning":for(let r of t.details)switch(r.type){case"text":e.push({type:"reasoning",text:r.text,signature:r.signature});break;case"redacted":e.push({type:"redacted-reasoning",data:r.data})}break;case"tool-invocation":e.push({type:"tool-call",toolCallId:t.toolInvocation.toolCallId,toolName:t.toolInvocation.toolName,args:t.toolInvocation.args});break;default:throw Error(`Unsupported part: ${t}`)}o.push({role:"assistant",content:e});let a=i.filter(e=>"tool-invocation"===e.type).map(e=>e.toolInvocation);a.length>0&&o.push({role:"tool",content:a.map(e=>{if(!("result"in e))throw new eM({originalMessage:r,message:"ToolInvocation must have a result: "+JSON.stringify(e)});let{toolCallId:t,toolName:a,result:o}=e,s=n[a];return(null==s?void 0:s.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:t,toolName:a,result:s.experimental_toToolResultContent(o),experimental_content:s.experimental_toToolResultContent(o)}:{type:"tool-result",toolCallId:t,toolName:a,result:o}})}),i=[],s=!1,t++},t=0,s=!1,i=[];for(let n of r.parts)switch(n.type){case"text":s&&e(),i.push(n);break;case"file":case"reasoning":i.push(n);break;case"tool-invocation":(null!=(a=n.toolInvocation.step)?a:0)!==t&&e(),i.push(n),s=!0}e();break}let e=r.toolInvocations;if(null==e||0===e.length){o.push({role:"assistant",content:l});break}let t=e.reduce((e,t)=>{var r;return Math.max(e,null!=(r=t.step)?r:0)},0);for(let a=0;a<=t;a++){let t=e.filter(e=>{var t;return(null!=(t=e.step)?t:0)===a});0!==t.length&&(o.push({role:"assistant",content:[...s&&l&&0===a?[{type:"text",text:l}]:[],...t.map(({toolCallId:e,toolName:t,args:r})=>({type:"tool-call",toolCallId:e,toolName:t,args:r}))]}),o.push({role:"tool",content:t.map(e=>{if(!("result"in e))throw new eM({originalMessage:r,message:"ToolInvocation must have a result: "+JSON.stringify(e)});let{toolCallId:t,toolName:a,result:o}=e,s=n[a];return(null==s?void 0:s.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:t,toolName:a,result:s.experimental_toToolResultContent(o),experimental_content:s.experimental_toToolResultContent(o)}:{type:"tool-result",toolCallId:t,toolName:a,result:o}})}))}l&&!s&&o.push({role:"assistant",content:l});break}case"data":break;default:throw new eM({originalMessage:r,message:`Unsupported role: ${i}`})}}return o}(e.messages,{tools:t}):e.messages;if(0===r.length)throw new b.M3({prompt:e,message:"messages must not be empty"});let a=(0,x.ZZ)({value:r,schema:T.z.array(eV)});if(!a.success)throw new b.M3({prompt:e,message:`message must be a CoreMessage or a UI message +Validation error: ${a.error.message}`,cause:a.error});return{type:"messages",messages:r,system:e.system}}throw Error("unreachable")}function eZ(e){return"object"==typeof e&&null!==e&&("function"===e.role||"data"===e.role||"toolInvocations"in e||"parts"in e||"experimental_attachments"in e)?"has-ui-specific-parts":"object"==typeof e&&null!==e&&"content"in e&&(Array.isArray(e.content)||"experimental_providerMetadata"in e||"providerOptions"in e)?"has-core-specific-parts":"object"==typeof e&&null!==e&&"role"in e&&"content"in e&&"string"==typeof e.content&&["system","user","assistant","tool"].includes(e.role)?"message":"other"}function eK({promptTokens:e,completionTokens:t}){return{promptTokens:e,completionTokens:t,totalTokens:e+t}}function eG(e,t){return{promptTokens:e.promptTokens+t.promptTokens,completionTokens:e.completionTokens+t.completionTokens,totalTokens:e.totalTokens+t.totalTokens}}function eW({prompt:e,schema:t,schemaPrefix:r=null!=t?"JSON schema:":void 0,schemaSuffix:a=null!=t?"You MUST answer with a JSON object that matches the JSON schema above.":"You MUST answer with JSON."}){return[null!=e&&e.length>0?e:void 0,null!=e&&e.length>0?"":void 0,r,null!=t?JSON.stringify(t):void 0,a].filter(e=>null!=e).join("\n")}function eH(e){let t=e.pipeThrough(new TransformStream);return t[Symbol.asyncIterator]=()=>{let e=t.getReader();return{async next(){let{done:t,value:r}=await e.read();return t?{done:!0,value:void 0}:{done:!1,value:r}}}},t}var eX={type:"no-schema",jsonSchema:void 0,validatePartialResult:({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:(e,t)=>void 0===e?{success:!1,error:new eo({message:"No object generated: response did not match schema.",text:t.text,response:t.response,usage:t.usage,finishReason:t.finishReason})}:{success:!0,value:e},createElementStream(){throw new b.b8({functionality:"element streams in no-schema mode"})}},eQ=e=>({type:"object",jsonSchema:e.jsonSchema,validatePartialResult:({value:e,textDelta:t})=>({success:!0,value:{partial:e,textDelta:t}}),validateFinalResult:t=>safeValidateTypes2({value:t,schema:e}),createElementStream(){throw new UnsupportedFunctionalityError({functionality:"element streams in object mode"})}}),eY=e=>{let{$schema:t,...r}=e.jsonSchema;return{type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{elements:{type:"array",items:r}},required:["elements"],additionalProperties:!1},validatePartialResult({value:t,latestObject:r,isFirstDelta:a,isFinalDelta:n}){var o;if(!isJSONObject(t)||!isJSONArray(t.elements))return{success:!1,error:new TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};let s=t.elements,i=[];for(let t=0;t0&&(u+=","),u+=i.slice(l).map(e=>JSON.stringify(e)).join(","),n&&(u+="]"),{success:!0,value:{partial:i,textDelta:u}}},validateFinalResult(t){if(!isJSONObject(t)||!isJSONArray(t.elements))return{success:!1,error:new TypeValidationError({value:t,cause:"value must be an object that contains an array of elements"})};let r=t.elements;for(let t of r){let r=safeValidateTypes2({value:t,schema:e});if(!r.success)return r}return{success:!0,value:r}},createElementStream(e){let t=0;return eH(e.pipeThrough(new TransformStream({transform(e,r){switch(e.type){case"object":{let a=e.object;for(;t({type:"enum",jsonSchema:{$schema:"http://json-schema.org/draft-07/schema#",type:"object",properties:{result:{type:"string",enum:e}},required:["result"],additionalProperties:!1},validateFinalResult(t){if(!isJSONObject(t)||"string"!=typeof t.result)return{success:!1,error:new TypeValidationError({value:t,cause:'value must be an object that contains a string in the "result" property.'})};let r=t.result;return e.includes(r)?{success:!0,value:r}:{success:!1,error:new TypeValidationError({value:t,cause:"value must be a string in the enum"})}},validatePartialResult(){throw new UnsupportedFunctionalityError({functionality:"partial results in enum mode"})},createElementStream(){throw new UnsupportedFunctionalityError({functionality:"element streams in enum mode"})}});function e1(e){return JSON.stringify(e.map(e=>({...e,content:"string"==typeof e.content?e.content:e.content.map(e2)})))}function e2(e){return"image"===e.type?{...e,image:e.image instanceof Uint8Array?eg(e.image):e.image}:e}(0,x.hK)({prefix:"aiobj",size:24});var e4=class{constructor(){this.status={type:"pending"},this._resolve=void 0,this._reject=void 0}get value(){return this.promise||(this.promise=new Promise((e,t)=>{"resolved"===this.status.type?e(this.status.value):"rejected"===this.status.type&&t(this.status.error),this._resolve=e,this._reject=t})),this.promise}resolve(e){var t;this.status={type:"resolved",value:e},this.promise&&(null==(t=this._resolve)||t.call(this,e))}reject(e){var t;this.status={type:"rejected",error:e},this.promise&&(null==(t=this._reject)||t.call(this,e))}};function e8(){let e,t;return{promise:new Promise((r,a)=>{e=r,t=a}),resolve:e,reject:t}}function e6(){let e=[],t=null,r=!1,a=e8(),n=async()=>{if(r&&0===e.length){null==t||t.close();return}if(0===e.length)return a=e8(),await a.promise,n();try{let{value:a,done:o}=await e[0].read();o?(e.shift(),e.length>0?await n():r&&(null==t||t.close())):null==t||t.enqueue(a)}catch(a){null==t||t.error(a),e.shift(),r&&0===e.length&&(null==t||t.close())}};return{stream:new ReadableStream({start(e){t=e},pull:n,async cancel(){for(let t of e)await t.cancel();e=[],r=!0}}),addStream:t=>{if(r)throw Error("Cannot add inner stream: outer stream is closed");e.push(t.getReader()),a.resolve()},close:()=>{r=!0,a.resolve(),0===e.length&&(null==t||t.close())},terminate:()=>{r=!0,a.resolve(),e.forEach(e=>e.cancel()),e=[],null==t||t.close()}}}(0,x.hK)({prefix:"aiobj",size:24});var e7="AI_NoOutputSpecifiedError",e3=`vercel.ai.error.${e7}`,e9=Symbol.for(e3),e5=class extends b.bD{constructor({message:e="No output specified."}={}){super({name:e7,message:e}),this[c]=!0}static isInstance(e){return b.bD.hasMarker(e,e3)}};c=e9;var te="AI_ToolExecutionError",tt=`vercel.ai.error.${te}`,tr=Symbol.for(tt),ta=class extends b.bD{constructor({toolArgs:e,toolName:t,toolCallId:r,cause:a,message:n=`Error executing tool ${t}: ${(0,b.u1)(a)}`}){super({name:te,message:n,cause:a}),this[m]=!0,this.toolArgs=e,this.toolName=t,this.toolCallId=r}static isInstance(e){return b.bD.hasMarker(e,tt)}};function tn({tools:e,toolChoice:t,activeTools:r}){return null!=e&&Object.keys(e).length>0?{tools:(null!=r?Object.entries(e).filter(([e])=>r.includes(e)):Object.entries(e)).map(([e,t])=>{let r=t.type;switch(r){case void 0:case"function":return{type:"function",name:e,description:t.description,parameters:(0,S.mD)(t.parameters).jsonSchema};case"provider-defined":return{type:"provider-defined",name:e,id:t.id,args:t.args};default:throw Error(`Unsupported tool type: ${r}`)}}),toolChoice:null==t?{type:"auto"}:"string"==typeof t?{type:t}:{type:"tool",toolName:t.toolName}}:{tools:void 0,toolChoice:void 0}}m=tr;var to=/^([\s\S]*?)(\s+)(\S*)$/;function ts(e){let t=e.match(to);return t?{prefix:t[1],whitespace:t[2],suffix:t[3]}:void 0}var ti="AI_InvalidToolArgumentsError",tl=`vercel.ai.error.${ti}`,tu=Symbol.for(tl),tp=class extends b.bD{constructor({toolArgs:e,toolName:t,cause:r,message:a=`Invalid arguments for tool ${t}: ${(0,b.u1)(r)}`}){super({name:ti,message:a,cause:r}),this[d]=!0,this.toolArgs=e,this.toolName=t}static isInstance(e){return b.bD.hasMarker(e,tl)}};d=tu;var tc="AI_NoSuchToolError",tm=`vercel.ai.error.${tc}`,td=Symbol.for(tm),th=class extends b.bD{constructor({toolName:e,availableTools:t,message:r=`Model tried to call unavailable tool '${e}'. ${void 0===t?"No tools are available.":`Available tools: ${t.join(", ")}.`}`}){super({name:tc,message:r}),this[h]=!0,this.toolName=e,this.availableTools=t}static isInstance(e){return b.bD.hasMarker(e,tm)}};h=td;var tf="AI_ToolCallRepairError",tg=`vercel.ai.error.${tf}`,ty=Symbol.for(tg),tv=class extends b.bD{constructor({cause:e,originalError:t,message:r=`Error repairing tool call: ${(0,b.u1)(e)}`}){super({name:tf,message:r,cause:e}),this[f]=!0,this.originalError=t}static isInstance(e){return b.bD.hasMarker(e,tg)}};async function tb({toolCall:e,tools:t,repairToolCall:r,system:a,messages:n}){if(null==t)throw new th({toolName:e.toolName});try{return await tx({toolCall:e,tools:t})}catch(s){if(null==r||!(th.isInstance(s)||tp.isInstance(s)))throw s;let o=null;try{o=await r({toolCall:e,tools:t,parameterSchema:({toolName:e})=>(0,S.mD)(t[e].parameters).jsonSchema,system:a,messages:n,error:s})}catch(e){throw new tv({cause:e,originalError:s})}if(null==o)throw s;return await tx({toolCall:o,tools:t})}}async function tx({toolCall:e,tools:t}){let r=e.toolName,a=t[r];if(null==a)throw new th({toolName:e.toolName,availableTools:Object.keys(t)});let n=(0,S.mD)(a.parameters),o=""===e.args.trim()?(0,x.ZZ)({value:{},schema:n}):(0,x.N8)({text:e.args,schema:n});if(!1===o.success)throw new tp({toolName:r,toolArgs:e.args,cause:o.error});return{type:"tool-call",toolCallId:e.toolCallId,toolName:r,args:o.value}}function tw(e){let t=e.filter(e=>"text"===e.type).map(e=>e.text).join("");return t.length>0?t:void 0}function tz({text:e="",files:t,reasoning:r,tools:a,toolCalls:n,toolResults:o,messageId:s,generateMessageId:i}){let l=[],u=[];return r.length>0&&u.push(...r.map(e=>"text"===e.type?{...e,type:"reasoning"}:{...e,type:"redacted-reasoning"})),t.length>0&&u.push(...t.map(e=>({type:"file",data:e.base64,mimeType:e.mimeType}))),e.length>0&&u.push({type:"text",text:e}),n.length>0&&u.push(...n),u.length>0&&l.push({role:"assistant",content:u,id:s}),o.length>0&&l.push({role:"tool",id:i(),content:o.map(e=>{let t=a[e.toolName];return(null==t?void 0:t.experimental_toToolResultContent)!=null?{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,result:t.experimental_toToolResultContent(e.result),experimental_content:t.experimental_toToolResultContent(e.result)}:{type:"tool-result",toolCallId:e.toolCallId,toolName:e.toolName,result:e.result}})}),l}f=ty;var tT=(0,x.hK)({prefix:"aitxt",size:24}),tS=(0,x.hK)({prefix:"msg",size:24});async function tI({model:e,tools:t,toolChoice:r,system:a,prompt:n,messages:o,maxRetries:s,abortSignal:i,headers:l,maxSteps:u=1,experimental_generateMessageId:p=tS,experimental_output:c,experimental_continueSteps:m=!1,experimental_telemetry:d,experimental_providerMetadata:h,providerOptions:f=h,experimental_activeTools:g,experimental_prepareStep:y,experimental_repairToolCall:v,_internal:{generateId:b=tT,currentDate:x=()=>new Date}={},onStepFinish:w,...z}){var T;if(u<1)throw new A({parameter:"maxSteps",value:u,message:"maxSteps must be at least 1"});let{maxRetries:S,retry:I}=q({maxRetries:s}),j=F({model:e,telemetry:d,headers:l,settings:{...z,maxRetries:S}}),R=eB({prompt:{system:null!=(T=null==c?void 0:c.injectIntoSystemPrompt({system:a,model:e}))?T:a,prompt:n,messages:o},tools:t}),_=Z(d);return K({name:"ai.generateText",attributes:G({telemetry:d,attributes:{...J({operationId:"ai.generateText",telemetry:d}),...j,"ai.model.provider":e.provider,"ai.model.id":e.modelId,"ai.prompt":{input:()=>JSON.stringify({system:a,prompt:n,messages:o})},"ai.settings.maxSteps":u}}),tracer:_,fn:async n=>{var o,s,h,T,S,M,k,C,E,A,O,N,$,D;let P,U=eS(z),q=[],F=[],L=[],V=0,B=[],Z="",W=[],H=[],X={completionTokens:0,promptTokens:0,totalTokens:0},Q="initial";do{let n=0===V?R.type:"messages",N=[...R.messages,...B],$=await (null==y?void 0:y({model:e,steps:H,maxSteps:u,stepNumber:V})),D=null!=(o=null==$?void 0:$.toolChoice)?o:r,Y=null!=(s=null==$?void 0:$.experimental_activeTools)?s:g,ee=null!=(h=null==$?void 0:$.model)?h:e,et=await ez({prompt:{type:n,system:R.system,messages:N},modelSupportsImageUrls:ee.supportsImageUrls,modelSupportsUrl:null==(T=ee.supportsUrl)?void 0:T.bind(ee)}),er={type:"regular",...tn({tools:t,toolChoice:D,activeTools:Y})};P=await I(()=>K({name:"ai.generateText.doGenerate",attributes:G({telemetry:d,attributes:{...J({operationId:"ai.generateText.doGenerate",telemetry:d}),...j,"ai.model.provider":ee.provider,"ai.model.id":ee.modelId,"ai.prompt.format":{input:()=>n},"ai.prompt.messages":{input:()=>e1(et)},"ai.prompt.tools":{input:()=>{var e;return null==(e=er.tools)?void 0:e.map(e=>JSON.stringify(e))}},"ai.prompt.toolChoice":{input:()=>null!=er.toolChoice?JSON.stringify(er.toolChoice):void 0},"gen_ai.system":ee.provider,"gen_ai.request.model":ee.modelId,"gen_ai.request.frequency_penalty":z.frequencyPenalty,"gen_ai.request.max_tokens":z.maxTokens,"gen_ai.request.presence_penalty":z.presencePenalty,"gen_ai.request.stop_sequences":z.stopSequences,"gen_ai.request.temperature":z.temperature,"gen_ai.request.top_k":z.topK,"gen_ai.request.top_p":z.topP}}),tracer:_,fn:async t=>{var r,a,o,s,u,p;let m=await ee.doGenerate({mode:er,...U,inputFormat:n,responseFormat:null==c?void 0:c.responseFormat({model:e}),prompt:et,providerMetadata:f,abortSignal:i,headers:l}),h={id:null!=(a=null==(r=m.response)?void 0:r.id)?a:b(),timestamp:null!=(s=null==(o=m.response)?void 0:o.timestamp)?s:x(),modelId:null!=(p=null==(u=m.response)?void 0:u.modelId)?p:ee.modelId};return t.setAttributes(G({telemetry:d,attributes:{"ai.response.finishReason":m.finishReason,"ai.response.text":{output:()=>m.text},"ai.response.toolCalls":{output:()=>JSON.stringify(m.toolCalls)},"ai.response.id":h.id,"ai.response.model":h.modelId,"ai.response.timestamp":h.timestamp.toISOString(),"ai.usage.promptTokens":m.usage.promptTokens,"ai.usage.completionTokens":m.usage.completionTokens,"gen_ai.response.finish_reasons":[m.finishReason],"gen_ai.response.id":h.id,"gen_ai.response.model":h.modelId,"gen_ai.usage.input_tokens":m.usage.promptTokens,"gen_ai.usage.output_tokens":m.usage.completionTokens}})),{...m,response:h}}})),q=await Promise.all((null!=(S=P.toolCalls)?S:[]).map(e=>tb({toolCall:e,tools:t,repairToolCall:v,system:a,messages:N}))),F=null==t?[]:await tj({toolCalls:q,tools:t,tracer:_,telemetry:d,messages:N,abortSignal:i});let ea=eK(P.usage);X=eG(X,ea);let en="done";++V0&&F.length===q.length&&(en="tool-result"));let eo=null!=(M=P.text)?M:"",es="continue"===Q&&Z.trimEnd()!==Z?eo.trimStart():eo,ei="continue"===en?function(e){let t=ts(e);return t?t.prefix+t.whitespace:e}(es):es;if(Z="continue"===en||"continue"===Q?Z+ei:ei,L=t_(P.reasoning),W.push(...null!=(k=P.sources)?k:[]),"continue"===Q){let e=B[B.length-1];"string"==typeof e.content?e.content+=ei:e.content.push({text:ei,type:"text"})}else B.push(...tz({text:Z,files:tM(P.files),reasoning:t_(P.reasoning),tools:null!=t?t:{},toolCalls:q,toolResults:F,messageId:p(),generateMessageId:p}));let el={stepType:Q,text:ei,reasoning:tw(L),reasoningDetails:L,files:tM(P.files),sources:null!=(C=P.sources)?C:[],toolCalls:q,toolResults:F,finishReason:P.finishReason,usage:ea,warnings:P.warnings,logprobs:P.logprobs,request:null!=(E=P.request)?E:{},response:{...P.response,headers:null==(A=P.rawResponse)?void 0:A.headers,body:null==(O=P.rawResponse)?void 0:O.body,messages:structuredClone(B)},providerMetadata:P.providerMetadata,experimental_providerMetadata:P.providerMetadata,isContinued:"continue"===en};H.push(el),await (null==w?void 0:w(el)),Q=en}while("done"!==Q);return n.setAttributes(G({telemetry:d,attributes:{"ai.response.finishReason":P.finishReason,"ai.response.text":{output:()=>P.text},"ai.response.toolCalls":{output:()=>JSON.stringify(P.toolCalls)},"ai.usage.promptTokens":P.usage.promptTokens,"ai.usage.completionTokens":P.usage.completionTokens}})),new tR({text:Z,files:tM(P.files),reasoning:tw(L),reasoningDetails:L,sources:W,outputResolver:()=>{if(null==c)throw new e5;return c.parseOutput({text:Z},{response:P.response,usage:X,finishReason:P.finishReason})},toolCalls:q,toolResults:F,finishReason:P.finishReason,usage:X,warnings:P.warnings,request:null!=(N=P.request)?N:{},response:{...P.response,headers:null==($=P.rawResponse)?void 0:$.headers,body:null==(D=P.rawResponse)?void 0:D.body,messages:B},logprobs:P.logprobs,steps:H,providerMetadata:P.providerMetadata})}})}async function tj({toolCalls:e,tools:t,tracer:r,telemetry:a,messages:n,abortSignal:o}){return(await Promise.all(e.map(async({toolCallId:e,toolName:s,args:i})=>{let l=t[s];if((null==l?void 0:l.execute)==null)return;let u=await K({name:"ai.toolCall",attributes:G({telemetry:a,attributes:{...J({operationId:"ai.toolCall",telemetry:a}),"ai.toolCall.name":s,"ai.toolCall.id":e,"ai.toolCall.args":{output:()=>JSON.stringify(i)}}}),tracer:r,fn:async t=>{try{let r=await l.execute(i,{toolCallId:e,messages:n,abortSignal:o});try{t.setAttributes(G({telemetry:a,attributes:{"ai.toolCall.result":{output:()=>JSON.stringify(r)}}}))}catch(e){}return r}catch(t){throw new ta({toolCallId:e,toolName:s,toolArgs:i,cause:t})}}});return{type:"tool-result",toolCallId:e,toolName:s,args:i,result:u}}))).filter(e=>null!=e)}var tR=class{constructor(e){this.text=e.text,this.files=e.files,this.reasoning=e.reasoning,this.reasoningDetails=e.reasoningDetails,this.toolCalls=e.toolCalls,this.toolResults=e.toolResults,this.finishReason=e.finishReason,this.usage=e.usage,this.warnings=e.warnings,this.request=e.request,this.response=e.response,this.steps=e.steps,this.experimental_providerMetadata=e.providerMetadata,this.providerMetadata=e.providerMetadata,this.logprobs=e.logprobs,this.outputResolver=e.outputResolver,this.sources=e.sources}get experimental_output(){return this.outputResolver()}};function t_(e){return null==e?[]:"string"==typeof e?[{type:"text",text:e}]:e}function tM(e){var t;return null!=(t=null==e?void 0:e.map(e=>new Q(e)))?t:[]}j({},{object:()=>tP,text:()=>tD});var tk="AI_InvalidStreamPartError",tC=`vercel.ai.error.${tk}`,tE=Symbol.for(tC),tA=class extends b.bD{constructor({chunk:e,message:t}){super({name:tk,message:t}),this[g]=!0,this.chunk=e}static isInstance(e){return b.bD.hasMarker(e,tC)}};g=tE;var tO="vercel.ai.error.AI_MCPClientError",tN=Symbol.for(tO),t$=class extends b.bD{constructor({name:e="MCPClientError",message:t,cause:r}){super({name:e,message:t,cause:r}),this[y]=!0}static isInstance(e){return b.bD.hasMarker(e,tO)}};y=tN;var tD=()=>({type:"text",responseFormat:()=>({type:"text"}),injectIntoSystemPrompt:({system:e})=>e,parsePartial:({text:e})=>({partial:e}),parseOutput:({text:e})=>e}),tP=({schema:e})=>{let t=(0,S.mD)(e);return{type:"object",responseFormat:({model:e})=>({type:"json",schema:e.supportsStructuredOutputs?t.jsonSchema:void 0}),injectIntoSystemPrompt:({system:e,model:r})=>r.supportsStructuredOutputs?e:eW({prompt:e,schema:t.jsonSchema}),parsePartial({text:e}){let t=(0,S.d1)(e);switch(t.state){case"failed-parse":case"undefined-input":return;case"repaired-parse":case"successful-parse":return{partial:t.value};default:{let e=t.state;throw Error(`Unsupported parse state: ${e}`)}}},parseOutput({text:e},r){let a=(0,x.N8)({text:e});if(!a.success)throw new eo({message:"No object generated: could not parse the response.",cause:a.error,text:e,response:r.response,usage:r.usage,finishReason:r.finishReason});let n=(0,x.ZZ)({value:a.value,schema:t});if(!n.success)throw new eo({message:"No object generated: response did not match schema.",cause:n.error,text:e,response:r.response,usage:r.usage,finishReason:r.finishReason});return n.value}}};async function tU({stream:e,onError:t}){let r=e.getReader();try{for(;;){let{done:e}=await r.read();if(e)break}}catch(e){null==t||t(e)}finally{r.releaseLock()}}function tq(e,t){let r,a,n=e.getReader(),o=t.getReader(),s=!1,i=!1;async function l(e){try{null==r&&(r=n.read());let t=await r;r=void 0,t.done?e.close():e.enqueue(t.value)}catch(t){e.error(t)}}async function u(e){try{null==a&&(a=o.read());let t=await a;a=void 0,t.done?e.close():e.enqueue(t.value)}catch(t){e.error(t)}}return new ReadableStream({async pull(e){try{if(s)return void await u(e);if(i)return void await l(e);null==r&&(r=n.read()),null==a&&(a=o.read());let{result:t,reader:p}=await Promise.race([r.then(e=>({result:e,reader:n})),a.then(e=>({result:e,reader:o}))]);t.done||e.enqueue(t.value),p===n?(r=void 0,t.done&&(await u(e),s=!0)):(a=void 0,t.done&&(i=!0,await l(e)))}catch(t){e.error(t)}},cancel(){n.cancel(),o.cancel()}})}(0,x.hK)({prefix:"aitxt",size:24}),(0,x.hK)({prefix:"msg",size:24}),b.bD,b.bD;var tJ="AI_NoSuchProviderError",tF=`vercel.ai.error.${tJ}`,tL=Symbol.for(tF),tV=class extends b.eM{constructor({modelId:e,modelType:t,providerId:r,availableProviders:a,message:n=`No such provider: ${r} (available providers: ${a.join()})`}){super({errorName:tJ,modelId:e,modelType:t,message:n}),this[v]=!0,this.providerId=r,this.availableProviders=a}static isInstance(e){return b.bD.hasMarker(e,tF)}};v=tL;var tB="2024-11-05",tZ=[tB,"2024-10-07"],tK=T.z.object({name:T.z.string(),version:T.z.string()}).passthrough(),tG=T.z.object({_meta:T.z.optional(T.z.object({}).passthrough())}).passthrough(),tW=T.z.object({method:T.z.string(),params:T.z.optional(tG)}),tH=T.z.object({experimental:T.z.optional(T.z.object({}).passthrough()),logging:T.z.optional(T.z.object({}).passthrough()),prompts:T.z.optional(T.z.object({listChanged:T.z.optional(T.z.boolean())}).passthrough()),resources:T.z.optional(T.z.object({subscribe:T.z.optional(T.z.boolean()),listChanged:T.z.optional(T.z.boolean())}).passthrough()),tools:T.z.optional(T.z.object({listChanged:T.z.optional(T.z.boolean())}).passthrough())}).passthrough(),tX=tG.extend({protocolVersion:T.z.string(),capabilities:tH,serverInfo:tK,instructions:T.z.optional(T.z.string())}),tQ=tG.extend({nextCursor:T.z.optional(T.z.string())}),tY=T.z.object({name:T.z.string(),description:T.z.optional(T.z.string()),inputSchema:T.z.object({type:T.z.literal("object"),properties:T.z.optional(T.z.object({}).passthrough())}).passthrough()}).passthrough(),t0=tQ.extend({tools:T.z.array(tY)}),t1=T.z.object({type:T.z.literal("text"),text:T.z.string()}).passthrough(),t2=T.z.object({type:T.z.literal("image"),data:T.z.string().base64(),mimeType:T.z.string()}).passthrough(),t4=T.z.object({uri:T.z.string(),mimeType:T.z.optional(T.z.string())}).passthrough(),t8=t4.extend({text:T.z.string()}),t6=t4.extend({blob:T.z.string().base64()}),t7=T.z.object({type:T.z.literal("resource"),resource:T.z.union([t8,t6])}).passthrough(),t3=tG.extend({content:T.z.array(T.z.union([t1,t2,t7])),isError:T.z.boolean().default(!1).optional()}).or(tG.extend({toolResult:T.z.unknown()})),t9=T.z.object({jsonrpc:T.z.literal("2.0"),id:T.z.union([T.z.string(),T.z.number().int()])}).merge(tW).strict(),t5=T.z.object({jsonrpc:T.z.literal("2.0"),id:T.z.union([T.z.string(),T.z.number().int()]),result:tG}).strict(),re=T.z.object({jsonrpc:T.z.literal("2.0"),id:T.z.union([T.z.string(),T.z.number().int()]),error:T.z.object({code:T.z.number().int(),message:T.z.string(),data:T.z.optional(T.z.unknown())})}).strict(),rt=T.z.object({jsonrpc:T.z.literal("2.0")}).merge(T.z.object({method:T.z.string(),params:T.z.optional(tG)})).strict(),rr=T.z.union([t9,rt,t5,re]),ra=class{constructor({url:e,headers:t}){this.connected=!1,this.url=new URL(e),this.headers=t}async start(){return new Promise((e,t)=>{if(this.connected)return e();this.abortController=new AbortController,(async()=>{var r,a,n;try{let n=new Headers(this.headers);n.set("Accept","text/event-stream");let o=await fetch(this.url.href,{headers:n,signal:null==(r=this.abortController)?void 0:r.signal});if(!o.ok||!o.body){let e=new t$({message:`MCP SSE Transport Error: ${o.status} ${o.statusText}`});return null==(a=this.onerror)||a.call(this,e),t(e)}let s=o.body.pipeThrough(new TextDecoderStream).pipeThrough(createEventSourceParserStream()).getReader(),i=async()=>{var r,a,n;try{for(;;){let{done:t,value:n}=await s.read();if(t){if(this.connected)throw this.connected=!1,new t$({message:"MCP SSE Transport Error: Connection closed unexpectedly"});return}let{event:o,data:i}=n;if("endpoint"===o){if(this.endpoint=new URL(i,this.url),this.endpoint.origin!==this.url.origin)throw new t$({message:`MCP SSE Transport Error: Endpoint origin does not match connection origin: ${this.endpoint.origin}`});this.connected=!0,e()}else if("message"===o)try{let e=rr.parse(JSON.parse(i));null==(r=this.onmessage)||r.call(this,e)}catch(t){let e=new t$({message:"MCP SSE Transport Error: Failed to parse message",cause:t});null==(a=this.onerror)||a.call(this,e)}}}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;null==(n=this.onerror)||n.call(this,e),t(e)}};this.sseConnection={close:()=>s.cancel()},i()}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;null==(n=this.onerror)||n.call(this,e),t(e)}})()})}async close(){var e,t,r;this.connected=!1,null==(e=this.sseConnection)||e.close(),null==(t=this.abortController)||t.abort(),null==(r=this.onclose)||r.call(this)}async send(e){var t,r,a;if(!this.endpoint||!this.connected)throw new t$({message:"MCP SSE Transport Error: Not connected"});try{let a=new Headers(this.headers);a.set("Content-Type","application/json");let n={method:"POST",headers:a,body:JSON.stringify(e),signal:null==(t=this.abortController)?void 0:t.signal},o=await fetch(this.endpoint,n);if(!o.ok){let e=await o.text().catch(()=>null),t=new t$({message:`MCP SSE Transport Error: POSTing to endpoint (HTTP ${o.status}): ${e}`});null==(r=this.onerror)||r.call(this,t);return}}catch(e){null==(a=this.onerror)||a.call(this,e);return}}};function rn(e={}){let t=new TextEncoder,r="";return new TransformStream({async start(){e.onStart&&await e.onStart()},async transform(a,n){n.enqueue(t.encode(a)),r+=a,e.onToken&&await e.onToken(a),e.onText&&"string"==typeof a&&await e.onText(a)},async flush(){e.onCompletion&&await e.onCompletion(r),e.onFinal&&await e.onFinal(r)}})}function ro(e,t){return e.pipeThrough(new TransformStream({transform:async(e,t)=>{var r;if("string"==typeof e)return void t.enqueue(e);if("event"in e){"on_chat_model_stream"===e.event&&ru(null==(r=e.data)?void 0:r.chunk,t);return}ru(e,t)}})).pipeThrough(rn(t)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(e,t)=>{t.enqueue((0,S.H4)("text",e))}}))}function rs(e,t){return ro(e,t).pipeThrough(new TextEncoderStream)}function ri(e,t){var r;let a=ro(e,null==t?void 0:t.callbacks).pipeThrough(new TextEncoderStream),n=null==t?void 0:t.data,o=null==t?void 0:t.init;return new Response(n?tq(n.stream,a):a,{status:null!=(r=null==o?void 0:o.status)?r:200,statusText:null==o?void 0:o.statusText,headers:R(null==o?void 0:o.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function rl(e,t){t.dataStream.merge(ro(e,t.callbacks))}function ru(e,t){if("string"==typeof e.content)t.enqueue(e.content);else for(let r of e.content)"text"===r.type&&t.enqueue(r.text)}function rp(e,t){let r,a=(r=!0,e=>(r&&(e=e.trimStart())&&(r=!1),e));return(0,x.NR)(e[Symbol.asyncIterator]()).pipeThrough(new TransformStream({async transform(e,t){t.enqueue(a(e.delta))}})).pipeThrough(rn(t)).pipeThrough(new TextDecoderStream).pipeThrough(new TransformStream({transform:async(e,t)=>{t.enqueue((0,S.H4)("text",e))}}))}function rc(e,t){return rp(e,t).pipeThrough(new TextEncoderStream)}function rm(e,t={}){var r;let{init:a,data:n,callbacks:o}=t,s=rp(e,o).pipeThrough(new TextEncoderStream);return new Response(n?tq(n.stream,s):s,{status:null!=(r=null==a?void 0:a.status)?r:200,statusText:null==a?void 0:a.statusText,headers:R(null==a?void 0:a.headers,{contentType:"text/plain; charset=utf-8",dataStreamVersion:"v1"})})}function rd(e,t){t.dataStream.merge(rp(e,t.callbacks))}j({},{mergeIntoDataStream:()=>rl,toDataStream:()=>rs,toDataStreamResponse:()=>ri}),j({},{mergeIntoDataStream:()=>rd,toDataStream:()=>rc,toDataStreamResponse:()=>rm})}}]); \ No newline at end of file diff --git a/_next/static/chunks/bd904a5c-a365b175d1933289.js b/_next/static/chunks/bd904a5c-a365b175d1933289.js new file mode 100644 index 0000000000000000000000000000000000000000..3fe9f4bc69fe3d32cd2b25788d65dc82b17971e7 --- /dev/null +++ b/_next/static/chunks/bd904a5c-a365b175d1933289.js @@ -0,0 +1,36 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[831],{3264:(t,e,i)=>{let s,r,n,a,o;i.d(e,{$EB:()=>w,$Ed:()=>aS,$Kf:()=>nG,$NF:()=>hO,$O9:()=>tT,$Yl:()=>q,$_I:()=>tR,$ei:()=>R,$p8:()=>h1,A$4:()=>rF,AKb:()=>hd,ALV:()=>sa,AQS:()=>iD,Am1:()=>ln,B69:()=>re,B6O:()=>a8,BER:()=>tp,BH$:()=>aV,BKk:()=>nr,BND:()=>ux,BRH:()=>hF,BXX:()=>t9,B_h:()=>eo,CMB:()=>tG,CR7:()=>e7,CSG:()=>hs,CV9:()=>oa,CVz:()=>es,CWW:()=>eT,Cfg:()=>tz,CmU:()=>h8,CwR:()=>l_,D$Q:()=>o6,DAe:()=>eF,DXC:()=>aN,Df:()=>ht,Dmk:()=>tq,E0M:()=>uw,EAD:()=>n0,EQC:()=>eR,EZo:()=>_,EdD:()=>T,F1T:()=>nu,F1l:()=>ue,FCc:()=>aF,FFZ:()=>id,FNr:()=>hn,FV:()=>tl,FXf:()=>C,FZo:()=>h5,Fn:()=>ev,Fpm:()=>l6,FvD:()=>aZ,Fvi:()=>tm,Fvt:()=>ha,G3T:()=>ez,GBG:()=>hw,GJx:()=>tw,GOR:()=>a$,GWd:()=>tZ,GYF:()=>n$,GZZ:()=>os,G_z:()=>hi,Gu$:()=>o$,Gwm:()=>K,GxU:()=>rI,H23:()=>ew,H2z:()=>u_,HIg:()=>tX,HLH:()=>e1,HO_:()=>eA,HPb:()=>e6,HXV:()=>ee,HgN:()=>i5,HiM:()=>h$,Hit:()=>hv,Ho_:()=>om,Hrb:()=>rN,Hrq:()=>iv,I46:()=>nY,I9Y:()=>ij,IE4:()=>t4,IUQ:()=>st,IWo:()=>ug,Iit:()=>ne,Ipv:()=>aK,Iw4:()=>lL,IzY:()=>uM,Jnc:()=>p,K52:()=>tt,KDk:()=>en,KLL:()=>e$,KPJ:()=>hz,KRh:()=>ts,Ke9:()=>eN,Kef:()=>eS,Ktl:()=>iy,Kwu:()=>A,Kzg:()=>ls,Kzv:()=>tY,LAk:()=>tc,Ld9:()=>uS,LiQ:()=>N,LlO:()=>ns,LoY:()=>rY,LuO:()=>lq,MBL:()=>hM,MOq:()=>iw,MSw:()=>oG,MW4:()=>rL,Mjd:()=>to,Mmk:()=>iQ,N1A:()=>aR,N2s:()=>lA,N5j:()=>eW,NRn:()=>sc,NTi:()=>S,NZq:()=>tE,Nex:()=>uA,Nt7:()=>j,Nv2:()=>aq,Nwf:()=>lO,Nz6:()=>t6,O0B:()=>se,O3Y:()=>oK,O49:()=>eL,O9p:()=>sZ,ONl:()=>aD,OUM:()=>tP,Oax:()=>rj,Om:()=>tv,OuU:()=>V,P5j:()=>lN,PFK:()=>uc,PJ3:()=>eB,PPD:()=>aa,PTz:()=>so,Pdi:()=>hm,Pem:()=>aX,Pf$:()=>lg,Pq0:()=>sh,Q1f:()=>rv,QCA:()=>oH,QP0:()=>f,Qev:()=>iI,Qrf:()=>eu,R1W:()=>un,R3r:()=>ny,RJ4:()=>eV,ROr:()=>e2,RQf:()=>tj,RcT:()=>it,RiT:()=>h_,Riy:()=>er,Rkk:()=>eU,RlV:()=>sF,RoJ:()=>nM,RrE:()=>H,Ru$:()=>e3,RyA:()=>x,S$4:()=>eb,S20:()=>a0,SUR:()=>h9,SYV:()=>aJ,ScU:()=>hN,T6I:()=>hb,TDQ:()=>oM,THS:()=>rR,TMh:()=>ii,Tap:()=>hV,TdN:()=>iA,TiK:()=>ih,TkQ:()=>t2,U3G:()=>Q,UJ6:()=>hg,UPV:()=>o0,UTZ:()=>ty,Ufg:()=>oX,UpK:()=>nL,UtB:()=>l1,UtX:()=>lr,V3x:()=>tH,V9B:()=>r_,VCu:()=>aQ,VGF:()=>t3,VT0:()=>tK,VVr:()=>eK,Vb5:()=>d,VnP:()=>or,Vnu:()=>im,Vwu:()=>uT,VxR:()=>eG,W9U:()=>eM,WBB:()=>oJ,WNZ:()=>c,WTh:()=>um,Wdf:()=>i_,Wew:()=>tW,Wk7:()=>g,Wyr:()=>iS,XG_:()=>e_,XIg:()=>M,XJ7:()=>o2,XMJ:()=>lj,XTe:()=>h7,XrR:()=>tr,Y9S:()=>hR,YHV:()=>l$,YJl:()=>np,YOZ:()=>hx,YRT:()=>hP,Yhb:()=>hf,Yuy:()=>tV,Z0B:()=>oe,Z58:()=>nx,ZLX:()=>n7,ZM4:()=>ub,ZQM:()=>t0,Zcv:()=>as,Zpd:()=>oQ,Zr2:()=>eY,ZyN:()=>h0,_4j:()=>o8,_QJ:()=>ep,_Ut:()=>ni,_xc:()=>ut,a$r:()=>tI,a55:()=>iR,a5J:()=>ed,aEY:()=>W,aHM:()=>hC,aJ8:()=>td,aMy:()=>eI,aVO:()=>hr,agE:()=>ip,amv:()=>ir,b4q:()=>nc,bC7:()=>ef,bCz:()=>z,bI3:()=>eq,bTm:()=>y,baL:()=>rP,bdM:()=>oZ,bkx:()=>tL,brA:()=>G,bw0:()=>te,c5h:()=>aG,c90:()=>t5,cHt:()=>tF,cRK:()=>nf,cZY:()=>l5,caT:()=>ti,cj9:()=>iL,czI:()=>eh,dAo:()=>on,dYF:()=>sn,dcC:()=>tQ,dhZ:()=>eO,dth:()=>hj,dwI:()=>iU,dzP:()=>lH,e0p:()=>J,eB$:()=>nb,eHc:()=>Z,eHs:()=>nw,eaF:()=>r8,eoi:()=>il,er$:()=>eZ,ezk:()=>hy,f4X:()=>O,fBL:()=>tN,fJr:()=>e5,fP5:()=>lx,fTw:()=>ua,fc6:()=>rO,g7M:()=>tu,gJ2:()=>tD,gO9:()=>I,gPd:()=>i7,gWB:()=>ic,ghU:()=>tM,h2z:()=>eP,hB5:()=>b,hIf:()=>ix,hZF:()=>hS,h_9:()=>hI,hdd:()=>L,hgQ:()=>D,hjs:()=>lQ,hsX:()=>v,hxR:()=>t_,hy7:()=>tf,hzE:()=>uo,i7d:()=>nn,i7u:()=>iT,iNn:()=>r7,iOZ:()=>aY,iUH:()=>tB,ibB:()=>a1,ie2:()=>F,imn:()=>rS,ix0:()=>tU,iyt:()=>sC,j6:()=>o1,jGm:()=>ol,jR7:()=>t8,jUj:()=>ng,jej:()=>iG,jf0:()=>eX,jsO:()=>e9,jut:()=>h4,jzd:()=>iu,k6Q:()=>t7,k6q:()=>tC,k8v:()=>eH,kBv:()=>l,kEx:()=>hE,kG0:()=>e0,kLi:()=>i6,kO0:()=>io,kRr:()=>tk,kTW:()=>tS,kTp:()=>et,kYr:()=>e8,k_V:()=>lK,keZ:()=>ll,klZ:()=>ie,kn4:()=>sV,kqe:()=>eQ,kxk:()=>nO,kyO:()=>ta,l2R:()=>hT,lGu:()=>Y,lGw:()=>hp,lMl:()=>ry,lPF:()=>iX,lc7:()=>eC,ljd:()=>ek,lxW:()=>nt,lyL:()=>ey,mcG:()=>iY,mrM:()=>a_,nCl:()=>hJ,nEu:()=>og,nNL:()=>th,nST:()=>k,nWS:()=>si,nZQ:()=>lu,nc$:()=>lW,nzx:()=>oc,o6l:()=>nd,oVO:()=>e4,oh6:()=>lJ,ojh:()=>E,ojs:()=>ex,ov9:()=>X,pBf:()=>ei,pFK:()=>of,pHI:()=>tA,pPE:()=>lF,paN:()=>t1,ppV:()=>i1,psI:()=>ec,q2:()=>o4,qBx:()=>he,qFE:()=>oy,qU7:()=>od,qUd:()=>hQ,qa3:()=>ea,qad:()=>P,qq$:()=>iJ,qtW:()=>rU,r6x:()=>h6,rFo:()=>ss,rKP:()=>oY,rOG:()=>iM,rQf:()=>eE,rSH:()=>el,rYR:()=>ej,rrX:()=>lU,s0K:()=>oi,sKt:()=>is,sPf:()=>h,tBo:()=>lZ,tJf:()=>tO,tXL:()=>o7,tcD:()=>op,tz3:()=>hA,uB5:()=>em,uSd:()=>o9,uV5:()=>tb,uWO:()=>n1,uXQ:()=>ig,ubm:()=>nl,uov:()=>ib,ure:()=>h2,v9J:()=>iz,veJ:()=>hL,vim:()=>ia,vmz:()=>rV,vyJ:()=>eJ,wAk:()=>ou,wTz:()=>eD,wfO:()=>tx,wn6:()=>U,wrO:()=>tJ,wtR:()=>u,wvS:()=>rE,xFO:()=>tg,xJ6:()=>oU,xOk:()=>h3,xSv:()=>$,xZx:()=>lS,xfg:()=>oo,xiE:()=>i$,y3Z:()=>eg,y9J:()=>sr,y_p:()=>tn,ypk:()=>oS,ywQ:()=>m,zD7:()=>lc,zdS:()=>t$,zgK:()=>sY,znC:()=>B});let h="175",l={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},u={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},c=0,d=1,p=2,m=3,y=0,f=1,g=2,x=3,b=0,v=1,w=2,M=0,S=1,_=2,A=3,T=4,z=5,I=100,C=101,k=102,B=103,R=104,E=200,P=201,O=202,N=203,F=204,V=205,L=206,j=207,U=208,W=209,D=210,H=211,q=212,J=213,X=214,Z=0,Y=1,G=2,$=3,Q=4,K=5,tt=6,te=7,ti=0,ts=1,tr=2,tn=0,ta=1,to=2,th=3,tl=4,tu=5,tc=6,td=7,tp="attached",tm="detached",ty=300,tf=301,tg=302,tx=303,tb=304,tv=306,tw=1e3,tM=1001,tS=1002,t_=1003,tA=1004,tT=1004,tz=1005,tI=1005,tC=1006,tk=1007,tB=1007,tR=1008,tE=1008,tP=1009,tO=1010,tN=1011,tF=1012,tV=1013,tL=1014,tj=1015,tU=1016,tW=1017,tD=1018,tH=1020,tq=35902,tJ=1021,tX=1022,tZ=1023,tY=1024,tG=1025,t$=1026,tQ=1027,tK=1028,t0=1029,t1=1030,t2=1031,t3=1032,t5=1033,t4=33776,t6=33777,t8=33778,t9=33779,t7=35840,et=35841,ee=35842,ei=35843,es=36196,er=37492,en=37496,ea=37808,eo=37809,eh=37810,el=37811,eu=37812,ec=37813,ed=37814,ep=37815,em=37816,ey=37817,ef=37818,eg=37819,ex=37820,eb=37821,ev=36492,ew=36494,eM=36495,eS=36283,e_=36284,eA=36285,eT=36286,ez=2200,eI=2201,eC=2202,ek=2300,eB=2301,eR=2302,eE=2400,eP=2401,eO=2402,eN=2500,eF=2501,eV=0,eL=1,ej=2,eU=3200,eW=3201,eD=3202,eH=3203,eq=0,eJ=1,eX="",eZ="srgb",eY="srgb-linear",eG="linear",e$="srgb",eQ=0,eK=7680,e0=7681,e1=7682,e2=7683,e3=34055,e5=34056,e4=5386,e6=512,e8=513,e9=514,e7=515,it=516,ie=517,ii=518,is=519,ir=512,ia=513,io=514,ih=515,il=516,iu=517,ic=518,id=519,ip=35044,im=35048,iy=35040,ig=35045,ix=35049,ib=35041,iv=35046,iw=35050,iM=35042,iS="100",i_="300 es",iA=2e3,iT=2001,iz={COMPUTE:"compute",RENDER:"render"};class iI{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});let i=this._listeners;void 0===i[t]&&(i[t]=[]),-1===i[t].indexOf(e)&&i[t].push(e)}hasEventListener(t,e){let i=this._listeners;return void 0!==i&&void 0!==i[t]&&-1!==i[t].indexOf(e)}removeEventListener(t,e){let i=this._listeners;if(void 0===i)return;let s=i[t];if(void 0!==s){let t=s.indexOf(e);-1!==t&&s.splice(t,1)}}dispatchEvent(t){let e=this._listeners;if(void 0===e)return;let i=e[t.type];if(void 0!==i){t.target=this;let e=i.slice(0);for(let i=0,s=e.length;i>8&255]+iC[t>>16&255]+iC[t>>24&255]+"-"+iC[255&e]+iC[e>>8&255]+"-"+iC[e>>16&15|64]+iC[e>>24&255]+"-"+iC[63&i|128]+iC[i>>8&255]+"-"+iC[i>>16&255]+iC[i>>24&255]+iC[255&s]+iC[s>>8&255]+iC[s>>16&255]+iC[s>>24&255]).toLowerCase()}function iP(t,e,i){return Math.max(e,Math.min(i,t))}function iO(t,e){return(t%e+e)%e}function iN(t,e,i){return(1-i)*t+i*e}function iF(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/0xffffffff;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/0x7fffffff,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw Error("Invalid component type.")}}function iV(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(0xffffffff*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(0x7fffffff*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw Error("Invalid component type.")}}let iL={DEG2RAD:iB,RAD2DEG:iR,generateUUID:iE,clamp:iP,euclideanModulo:iO,mapLinear:function(t,e,i,s,r){return s+(t-e)*(r-s)/(i-e)},inverseLerp:function(t,e,i){return t!==e?(i-t)/(e-t):0},lerp:iN,damp:function(t,e,i,s){return iN(t,e,1-Math.exp(-i*s))},pingpong:function(t,e=1){return e-Math.abs(iO(t,2*e)-e)},smoothstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)},smootherstep:function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*t*(t*(6*t-15)+10)},randInt:function(t,e){return t+Math.floor(Math.random()*(e-t+1))},randFloat:function(t,e){return t+Math.random()*(e-t)},randFloatSpread:function(t){return t*(.5-Math.random())},seededRandom:function(t){void 0!==t&&(ik=t);let e=ik+=0x6d2b79f5;return e=Math.imul(e^e>>>15,1|e),(((e^=e+Math.imul(e^e>>>7,61|e))^e>>>14)>>>0)/0x100000000},degToRad:function(t){return t*iB},radToDeg:function(t){return t*iR},isPowerOfTwo:function(t){return(t&t-1)==0&&0!==t},ceilPowerOfTwo:function(t){return Math.pow(2,Math.ceil(Math.log(t)/Math.LN2))},floorPowerOfTwo:function(t){return Math.pow(2,Math.floor(Math.log(t)/Math.LN2))},setQuaternionFromProperEuler:function(t,e,i,s,r){let n=Math.cos,a=Math.sin,o=n(i/2),h=a(i/2),l=n((e+s)/2),u=a((e+s)/2),c=n((e-s)/2),d=a((e-s)/2),p=n((s-e)/2),m=a((s-e)/2);switch(r){case"XYX":t.set(o*u,h*c,h*d,o*l);break;case"YZY":t.set(h*d,o*u,h*c,o*l);break;case"ZXZ":t.set(h*c,h*d,o*u,o*l);break;case"XZX":t.set(o*u,h*m,h*p,o*l);break;case"YXY":t.set(h*p,o*u,h*m,o*l);break;case"ZYZ":t.set(h*m,h*p,o*u,o*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}},normalize:iV,denormalize:iF};class ij{constructor(t=0,e=0){ij.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,i=this.y,s=t.elements;return this.x=s[0]*e+s[3]*i+s[6],this.y=s[1]*e+s[4]*i+s[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=iP(this.x,t.x,e.x),this.y=iP(this.y,t.y,e.y),this}clampScalar(t,e){return this.x=iP(this.x,t,e),this.y=iP(this.y,t,e),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(iP(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());return 0===e?Math.PI/2:Math.acos(iP(this.dot(t)/e,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y;return e*e+i*i}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let i=Math.cos(e),s=Math.sin(e),r=this.x-t.x,n=this.y-t.y;return this.x=r*i-n*s+t.x,this.y=r*s+n*i+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class iU{constructor(t,e,i,s,r,n,a,o,h){iU.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,i,s,r,n,a,o,h)}set(t,e,i,s,r,n,a,o,h){let l=this.elements;return l[0]=t,l[1]=s,l[2]=a,l[3]=e,l[4]=r,l[5]=o,l[6]=i,l[7]=n,l[8]=h,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this}extractBasis(t,e,i){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),i.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,s=e.elements,r=this.elements,n=i[0],a=i[3],o=i[6],h=i[1],l=i[4],u=i[7],c=i[2],d=i[5],p=i[8],m=s[0],y=s[3],f=s[6],g=s[1],x=s[4],b=s[7],v=s[2],w=s[5],M=s[8];return r[0]=n*m+a*g+o*v,r[3]=n*y+a*x+o*w,r[6]=n*f+a*b+o*M,r[1]=h*m+l*g+u*v,r[4]=h*y+l*x+u*w,r[7]=h*f+l*b+u*M,r[2]=c*m+d*g+p*v,r[5]=c*y+d*x+p*w,r[8]=c*f+d*b+p*M,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*n*l-e*a*h-i*r*l+i*a*o+s*r*h-s*n*o}invert(){let t=this.elements,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*n-a*h,c=a*o-l*r,d=h*r-n*o,p=e*u+i*c+s*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);let m=1/p;return t[0]=u*m,t[1]=(s*h-l*i)*m,t[2]=(a*i-s*n)*m,t[3]=c*m,t[4]=(l*e-s*o)*m,t[5]=(s*r-a*e)*m,t[6]=d*m,t[7]=(i*o-h*e)*m,t[8]=(n*e-i*r)*m,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,i,s,r,n,a){let o=Math.cos(r),h=Math.sin(r);return this.set(i*o,i*h,-i*(o*n+h*a)+n+t,-s*h,s*o,-s*(-h*n+o*a)+a+e,0,0,1),this}scale(t,e){return this.premultiply(iW.makeScale(t,e)),this}rotate(t){return this.premultiply(iW.makeRotation(-t)),this}translate(t,e){return this.premultiply(iW.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,i,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){let e=this.elements,i=t.elements;for(let t=0;t<9;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<9;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t}clone(){return new this.constructor().fromArray(this.elements)}}let iW=new iU;function iD(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}let iH={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function iq(t,e){return new iH[t](e)}function iJ(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function iX(){let t=iJ("canvas");return t.style.display="block",t}let iZ={};function iY(t){t in iZ||(iZ[t]=!0,console.warn(t))}function iG(t,e,i){return new Promise(function(s,r){setTimeout(function n(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:r();break;case t.TIMEOUT_EXPIRED:setTimeout(n,i);break;default:s()}},i)})}function i$(t){let e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function iQ(t){let e=t.elements;-1===e[11]?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}let iK=new iU().set(.4123908,.3575843,.1804808,.212639,.7151687,.0721923,.0193308,.1191948,.9505322),i0=new iU().set(3.2409699,-1.5373832,-.4986108,-.9692436,1.8759675,.0415551,.0556301,-.203977,1.0569715),i1=function(){let t={enabled:!0,workingColorSpace:eY,spaces:{},convert:function(t,e,i){return!1!==this.enabled&&e!==i&&e&&i&&(this.spaces[e].transfer===e$&&(t.r=i2(t.r),t.g=i2(t.g),t.b=i2(t.b)),this.spaces[e].primaries!==this.spaces[i].primaries&&(t.applyMatrix3(this.spaces[e].toXYZ),t.applyMatrix3(this.spaces[i].fromXYZ)),this.spaces[i].transfer===e$&&(t.r=i3(t.r),t.g=i3(t.g),t.b=i3(t.b))),t},fromWorkingColorSpace:function(t,e){return this.convert(t,this.workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this.workingColorSpace)},getPrimaries:function(t){return this.spaces[t].primaries},getTransfer:function(t){return t===eX?eG:this.spaces[t].transfer},getLuminanceCoefficients:function(t,e=this.workingColorSpace){return t.fromArray(this.spaces[e].luminanceCoefficients)},define:function(t){Object.assign(this.spaces,t)},_getMatrix:function(t,e,i){return t.copy(this.spaces[e].toXYZ).multiply(this.spaces[i].fromXYZ)},_getDrawingBufferColorSpace:function(t){return this.spaces[t].outputColorSpaceConfig.drawingBufferColorSpace},_getUnpackColorSpace:function(t=this.workingColorSpace){return this.spaces[t].workingColorSpaceConfig.unpackColorSpace}},e=[.64,.33,.3,.6,.15,.06],i=[.2126,.7152,.0722],s=[.3127,.329];return t.define({[eY]:{primaries:e,whitePoint:s,transfer:eG,toXYZ:iK,fromXYZ:i0,luminanceCoefficients:i,workingColorSpaceConfig:{unpackColorSpace:eZ},outputColorSpaceConfig:{drawingBufferColorSpace:eZ}},[eZ]:{primaries:e,whitePoint:s,transfer:e$,toXYZ:iK,fromXYZ:i0,luminanceCoefficients:i,outputColorSpaceConfig:{drawingBufferColorSpace:eZ}}}),t}();function i2(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function i3(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}class i5{static getDataURL(t,e="image/png"){let i;if(/^data:/i.test(t.src)||"undefined"==typeof HTMLCanvasElement)return t.src;if(t instanceof HTMLCanvasElement)i=t;else{void 0===s&&(s=iJ("canvas")),s.width=t.width,s.height=t.height;let e=s.getContext("2d");t instanceof ImageData?e.putImageData(t,0,0):e.drawImage(t,0,0,t.width,t.height),i=s}return i.toDataURL(e)}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){let e=iJ("canvas");e.width=t.width,e.height=t.height;let i=e.getContext("2d");i.drawImage(t,0,0,t.width,t.height);let s=i.getImageData(0,0,t.width,t.height),r=s.data;for(let t=0;t0&&(i.userData=this.userData),e||(t.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(this.mapping!==ty)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case tw:t.x=t.x-Math.floor(t.x);break;case tM:t.x=t.x<0?0:1;break;case tS:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case tw:t.y=t.y-Math.floor(t.y);break;case tM:t.y=t.y<0?0:1;break;case tS:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}i7.DEFAULT_IMAGE=null,i7.DEFAULT_MAPPING=ty,i7.DEFAULT_ANISOTROPY=1;class st{constructor(t=0,e=0,i=0,s=1){st.prototype.isVector4=!0,this.x=t,this.y=e,this.z=i,this.w=s}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,i,s){return this.x=t,this.y=e,this.z=i,this.w=s,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,i=this.y,s=this.z,r=this.w,n=t.elements;return this.x=n[0]*e+n[4]*i+n[8]*s+n[12]*r,this.y=n[1]*e+n[5]*i+n[9]*s+n[13]*r,this.z=n[2]*e+n[6]*i+n[10]*s+n[14]*r,this.w=n[3]*e+n[7]*i+n[11]*s+n[15]*r,this}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this.w/=t.w,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,i,s,r,n=t.elements,a=n[0],o=n[4],h=n[8],l=n[1],u=n[5],c=n[9],d=n[2],p=n[6],m=n[10];if(.01>Math.abs(o-l)&&.01>Math.abs(h-d)&&.01>Math.abs(c-p)){if(.1>Math.abs(o+l)&&.1>Math.abs(h+d)&&.1>Math.abs(c+p)&&.1>Math.abs(a+u+m-3))return this.set(1,0,0,0),this;e=Math.PI;let t=(a+1)/2,n=(u+1)/2,y=(m+1)/2,f=(o+l)/4,g=(h+d)/4,x=(c+p)/4;return t>n&&t>y?t<.01?(i=0,s=.707106781,r=.707106781):(s=f/(i=Math.sqrt(t)),r=g/i):n>y?n<.01?(i=.707106781,s=0,r=.707106781):(i=f/(s=Math.sqrt(n)),r=x/s):y<.01?(i=.707106781,s=.707106781,r=0):(i=g/(r=Math.sqrt(y)),s=x/r),this.set(i,s,r,e),this}let y=Math.sqrt((p-c)*(p-c)+(h-d)*(h-d)+(l-o)*(l-o));return .001>Math.abs(y)&&(y=1),this.x=(p-c)/y,this.y=(h-d)/y,this.z=(l-o)/y,this.w=Math.acos((a+u+m-1)/2),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=iP(this.x,t.x,e.x),this.y=iP(this.y,t.y,e.y),this.z=iP(this.z,t.z,e.z),this.w=iP(this.w,t.w,e.w),this}clampScalar(t,e){return this.x=iP(this.x,t,e),this.y=iP(this.y,t,e),this.z=iP(this.z,t,e),this.w=iP(this.w,t,e),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(iP(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this.w=t.w+(e.w-t.w)*i,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class se extends iI{constructor(t=1,e=1,i={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new st(0,0,t,e),this.scissorTest=!1,this.viewport=new st(0,0,t,e);let s=new i7({width:t,height:e,depth:1},(i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:tC,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i)).mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];let r=i.count;for(let t=0;t=0?1:-1,s=1-e*e;if(s>Number.EPSILON){let r=Math.sqrt(s),n=Math.atan2(r,e*i);t=Math.sin(t*n)/r,a=Math.sin(a*n)/r}let r=a*i;if(o=o*t+c*r,h=h*t+d*r,l=l*t+p*r,u=u*t+m*r,t===1-a){let t=1/Math.sqrt(o*o+h*h+l*l+u*u);o*=t,h*=t,l*=t,u*=t}}t[e]=o,t[e+1]=h,t[e+2]=l,t[e+3]=u}static multiplyQuaternionsFlat(t,e,i,s,r,n){let a=i[s],o=i[s+1],h=i[s+2],l=i[s+3],u=r[n],c=r[n+1],d=r[n+2],p=r[n+3];return t[e]=a*p+l*u+o*d-h*c,t[e+1]=o*p+l*c+h*u-a*d,t[e+2]=h*p+l*d+a*c-o*u,t[e+3]=l*p-a*u-o*c-h*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,i,s){return this._x=t,this._y=e,this._z=i,this._w=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){let i=t._x,s=t._y,r=t._z,n=t._order,a=Math.cos,o=Math.sin,h=a(i/2),l=a(s/2),u=a(r/2),c=o(i/2),d=o(s/2),p=o(r/2);switch(n){case"XYZ":this._x=c*l*u+h*d*p,this._y=h*d*u-c*l*p,this._z=h*l*p+c*d*u,this._w=h*l*u-c*d*p;break;case"YXZ":this._x=c*l*u+h*d*p,this._y=h*d*u-c*l*p,this._z=h*l*p-c*d*u,this._w=h*l*u+c*d*p;break;case"ZXY":this._x=c*l*u-h*d*p,this._y=h*d*u+c*l*p,this._z=h*l*p+c*d*u,this._w=h*l*u-c*d*p;break;case"ZYX":this._x=c*l*u-h*d*p,this._y=h*d*u+c*l*p,this._z=h*l*p-c*d*u,this._w=h*l*u+c*d*p;break;case"YZX":this._x=c*l*u+h*d*p,this._y=h*d*u+c*l*p,this._z=h*l*p-c*d*u,this._w=h*l*u-c*d*p;break;case"XZY":this._x=c*l*u-h*d*p,this._y=h*d*u-c*l*p,this._z=h*l*p+c*d*u,this._w=h*l*u+c*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+n)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let i=e/2,s=Math.sin(i);return this._x=t.x*s,this._y=t.y*s,this._z=t.z*s,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,i=e[0],s=e[4],r=e[8],n=e[1],a=e[5],o=e[9],h=e[2],l=e[6],u=e[10],c=i+a+u;if(c>0){let t=.5/Math.sqrt(c+1);this._w=.25/t,this._x=(l-o)*t,this._y=(r-h)*t,this._z=(n-s)*t}else if(i>a&&i>u){let t=2*Math.sqrt(1+i-a-u);this._w=(l-o)/t,this._x=.25*t,this._y=(s+n)/t,this._z=(r+h)/t}else if(a>u){let t=2*Math.sqrt(1+a-i-u);this._w=(r-h)/t,this._x=(s+n)/t,this._y=.25*t,this._z=(o+l)/t}else{let t=2*Math.sqrt(1+u-i-a);this._w=(n-s)/t,this._x=(r+h)/t,this._y=(o+l)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let i=t.dot(e)+1;return iMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0):(this._x=0,this._y=-t.z,this._z=t.y)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x),this._w=i,this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(iP(this.dot(t),-1,1)))}rotateTowards(t,e){let i=this.angleTo(t);if(0===i)return this;let s=Math.min(1,e/i);return this.slerp(t,s),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let i=t._x,s=t._y,r=t._z,n=t._w,a=e._x,o=e._y,h=e._z,l=e._w;return this._x=i*l+n*a+s*h-r*o,this._y=s*l+n*o+r*a-i*h,this._z=r*l+n*h+i*o-s*a,this._w=n*l-i*a-s*o-r*h,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);let i=this._x,s=this._y,r=this._z,n=this._w,a=n*t._w+i*t._x+s*t._y+r*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=n,this._x=i,this._y=s,this._z=r,this;let o=1-a*a;if(o<=Number.EPSILON){let t=1-e;return this._w=t*n+e*this._w,this._x=t*i+e*this._x,this._y=t*s+e*this._y,this._z=t*r+e*this._z,this.normalize(),this}let h=Math.sqrt(o),l=Math.atan2(h,a),u=Math.sin((1-e)*l)/h,c=Math.sin(e*l)/h;return this._w=n*u+this._w*c,this._x=i*u+this._x*c,this._y=s*u+this._y*c,this._z=r*u+this._z*c,this._onChangeCallback(),this}slerpQuaternions(t,e,i){return this.copy(t).slerp(e,i)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),i=Math.random(),s=Math.sqrt(1-i),r=Math.sqrt(i);return this.set(s*Math.sin(t),s*Math.cos(t),r*Math.sin(e),r*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class sh{constructor(t=0,e=0,i=0){sh.prototype.isVector3=!0,this.x=t,this.y=e,this.z=i}set(t,e,i){return void 0===i&&(i=this.z),this.x=t,this.y=e,this.z=i,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(su.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(su.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,i=this.y,s=this.z,r=t.elements;return this.x=r[0]*e+r[3]*i+r[6]*s,this.y=r[1]*e+r[4]*i+r[7]*s,this.z=r[2]*e+r[5]*i+r[8]*s,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,i=this.y,s=this.z,r=t.elements,n=1/(r[3]*e+r[7]*i+r[11]*s+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*s+r[12])*n,this.y=(r[1]*e+r[5]*i+r[9]*s+r[13])*n,this.z=(r[2]*e+r[6]*i+r[10]*s+r[14])*n,this}applyQuaternion(t){let e=this.x,i=this.y,s=this.z,r=t.x,n=t.y,a=t.z,o=t.w,h=2*(n*s-a*i),l=2*(a*e-r*s),u=2*(r*i-n*e);return this.x=e+o*h+n*u-a*l,this.y=i+o*l+a*h-r*u,this.z=s+o*u+r*l-n*h,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,i=this.y,s=this.z,r=t.elements;return this.x=r[0]*e+r[4]*i+r[8]*s,this.y=r[1]*e+r[5]*i+r[9]*s,this.z=r[2]*e+r[6]*i+r[10]*s,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=iP(this.x,t.x,e.x),this.y=iP(this.y,t.y,e.y),this.z=iP(this.z,t.z,e.z),this}clampScalar(t,e){return this.x=iP(this.x,t,e),this.y=iP(this.y,t,e),this.z=iP(this.z,t,e),this}clampLength(t,e){let i=this.length();return this.divideScalar(i||1).multiplyScalar(iP(i,t,e))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,i){return this.x=t.x+(e.x-t.x)*i,this.y=t.y+(e.y-t.y)*i,this.z=t.z+(e.z-t.z)*i,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){let i=t.x,s=t.y,r=t.z,n=e.x,a=e.y,o=e.z;return this.x=s*o-r*a,this.y=r*n-i*o,this.z=i*a-s*n,this}projectOnVector(t){let e=t.lengthSq();if(0===e)return this.set(0,0,0);let i=t.dot(this)/e;return this.copy(t).multiplyScalar(i)}projectOnPlane(t){return sl.copy(this).projectOnVector(t),this.sub(sl)}reflect(t){return this.sub(sl.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());return 0===e?Math.PI/2:Math.acos(iP(this.dot(t)/e,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,i=this.y-t.y,s=this.z-t.z;return e*e+i*i+s*s}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,i){let s=Math.sin(e)*t;return this.x=s*Math.sin(i),this.y=Math.cos(e)*t,this.z=s*Math.cos(i),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,i){return this.x=t*Math.sin(e),this.y=i,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),i=this.setFromMatrixColumn(t,1).length(),s=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=i,this.z=s,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=Math.random()*Math.PI*2,e=2*Math.random()-1,i=Math.sqrt(1-e*e);return this.x=i*Math.cos(t),this.y=e,this.z=i*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}let sl=new sh,su=new so;class sc{constructor(t=new sh(Infinity,Infinity,Infinity),e=new sh(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,i=t.length;e=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,sp),sp.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,i;return t.normal.x>0?(e=t.normal.x*this.min.x,i=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,i=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,i+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,i+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,i+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,i+=t.normal.z*this.min.z),e<=-t.constant&&i>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(sw),sM.subVectors(this.max,sw),sy.subVectors(t.a,sw),sf.subVectors(t.b,sw),sg.subVectors(t.c,sw),sx.subVectors(sf,sy),sb.subVectors(sg,sf),sv.subVectors(sy,sg);let e=[0,-sx.z,sx.y,0,-sb.z,sb.y,0,-sv.z,sv.y,sx.z,0,-sx.x,sb.z,0,-sb.x,sv.z,0,-sv.x,-sx.y,sx.x,0,-sb.y,sb.x,0,-sv.y,sv.x,0];return!!sA(e,sy,sf,sg,sM)&&!!sA(e=[1,0,0,0,1,0,0,0,1],sy,sf,sg,sM)&&(sS.crossVectors(sx,sb),sA(e=[sS.x,sS.y,sS.z],sy,sf,sg,sM))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,sp).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(sp).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(sd[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),sd[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),sd[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),sd[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),sd[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),sd[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),sd[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),sd[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(sd)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}let sd=[new sh,new sh,new sh,new sh,new sh,new sh,new sh,new sh],sp=new sh,sm=new sc,sy=new sh,sf=new sh,sg=new sh,sx=new sh,sb=new sh,sv=new sh,sw=new sh,sM=new sh,sS=new sh,s_=new sh;function sA(t,e,i,s,r){for(let n=0,a=t.length-3;n<=a;n+=3){s_.fromArray(t,n);let a=r.x*Math.abs(s_.x)+r.y*Math.abs(s_.y)+r.z*Math.abs(s_.z),o=e.dot(s_),h=i.dot(s_),l=s.dot(s_);if(Math.max(-Math.max(o,h,l),Math.min(o,h,l))>a)return!1}return!0}let sT=new sc,sz=new sh,sI=new sh;class sC{constructor(t=new sh,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let i=this.center;void 0!==e?i.copy(e):sT.setFromPoints(t).getCenter(i);let s=0;for(let e=0,r=t.length;ethis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?t.makeEmpty():(t.set(this.center,this.center),t.expandByScalar(this.radius)),t}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;sz.subVectors(t,this.center);let e=sz.lengthSq();if(e>this.radius*this.radius){let t=Math.sqrt(e),i=(t-this.radius)*.5;this.center.addScaledVector(sz,i/t),this.radius+=i}return this}union(t){return t.isEmpty()||(this.isEmpty()?this.copy(t):!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(sI.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(sz.copy(t.center).add(sI)),this.expandByPoint(sz.copy(t.center).sub(sI)))),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}}let sk=new sh,sB=new sh,sR=new sh,sE=new sh,sP=new sh,sO=new sh,sN=new sh;class sF{constructor(t=new sh,e=new sh(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,sk)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let i=e.dot(this.direction);return i<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=sk.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(sk.copy(this.origin).addScaledVector(this.direction,e),sk.distanceToSquared(t))}distanceSqToSegment(t,e,i,s){let r,n,a,o;sB.copy(t).add(e).multiplyScalar(.5),sR.copy(e).sub(t).normalize(),sE.copy(this.origin).sub(sB);let h=.5*t.distanceTo(e),l=-this.direction.dot(sR),u=sE.dot(this.direction),c=-sE.dot(sR),d=sE.lengthSq(),p=Math.abs(1-l*l);if(p>0)if(r=l*c-u,n=l*u-c,o=h*p,r>=0)if(n>=-o)if(n<=o){let t=1/p;r*=t,n*=t,a=r*(r+l*n+2*u)+n*(l*r+n+2*c)+d}else a=-(r=Math.max(0,-(l*(n=h)+u)))*r+n*(n+2*c)+d;else a=-(r=Math.max(0,-(l*(n=-h)+u)))*r+n*(n+2*c)+d;else n<=-o?(n=(r=Math.max(0,-(-l*h+u)))>0?-h:Math.min(Math.max(-h,-c),h),a=-r*r+n*(n+2*c)+d):n<=o?(r=0,a=(n=Math.min(Math.max(-h,-c),h))*(n+2*c)+d):(n=(r=Math.max(0,-(l*h+u)))>0?h:Math.min(Math.max(-h,-c),h),a=-r*r+n*(n+2*c)+d);else n=l>0?-h:h,a=-(r=Math.max(0,-(l*n+u)))*r+n*(n+2*c)+d;return i&&i.copy(this.origin).addScaledVector(this.direction,r),s&&s.copy(sB).addScaledVector(sR,n),a}intersectSphere(t,e){sk.subVectors(t.center,this.origin);let i=sk.dot(this.direction),s=sk.dot(sk)-i*i,r=t.radius*t.radius;if(s>r)return null;let n=Math.sqrt(r-s),a=i-n,o=i+n;return o<0?null:a<0?this.at(o,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;let i=-(this.origin.dot(t.normal)+t.constant)/e;return i>=0?i:null}intersectPlane(t,e){let i=this.distanceToPlane(t);return null===i?null:this.at(i,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return!!(0===e||t.normal.dot(this.direction)*e<0)}intersectBox(t,e){let i,s,r,n,a,o,h=1/this.direction.x,l=1/this.direction.y,u=1/this.direction.z,c=this.origin;return(h>=0?(i=(t.min.x-c.x)*h,s=(t.max.x-c.x)*h):(i=(t.max.x-c.x)*h,s=(t.min.x-c.x)*h),l>=0?(r=(t.min.y-c.y)*l,n=(t.max.y-c.y)*l):(r=(t.max.y-c.y)*l,n=(t.min.y-c.y)*l),i>n||r>s||((r>i||isNaN(i))&&(i=r),(n=0?(a=(t.min.z-c.z)*u,o=(t.max.z-c.z)*u):(a=(t.max.z-c.z)*u,o=(t.min.z-c.z)*u),i>o||a>s||((a>i||i!=i)&&(i=a),(o=0?i:s,e)}intersectsBox(t){return null!==this.intersectBox(t,sk)}intersectTriangle(t,e,i,s,r){let n;sP.subVectors(e,t),sO.subVectors(i,t),sN.crossVectors(sP,sO);let a=this.direction.dot(sN);if(a>0){if(s)return null;n=1}else{if(!(a<0))return null;n=-1,a=-a}sE.subVectors(this.origin,t);let o=n*this.direction.dot(sO.crossVectors(sE,sO));if(o<0)return null;let h=n*this.direction.dot(sP.cross(sE));if(h<0||o+h>a)return null;let l=-n*sE.dot(sN);return l<0?null:this.at(l/a,r)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class sV{constructor(t,e,i,s,r,n,a,o,h,l,u,c,d,p,m,y){sV.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,i,s,r,n,a,o,h,l,u,c,d,p,m,y)}set(t,e,i,s,r,n,a,o,h,l,u,c,d,p,m,y){let f=this.elements;return f[0]=t,f[4]=e,f[8]=i,f[12]=s,f[1]=r,f[5]=n,f[9]=a,f[13]=o,f[2]=h,f[6]=l,f[10]=u,f[14]=c,f[3]=d,f[7]=p,f[11]=m,f[15]=y,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new sV().fromArray(this.elements)}copy(t){let e=this.elements,i=t.elements;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],this}copyPosition(t){let e=this.elements,i=t.elements;return e[12]=i[12],e[13]=i[13],e[14]=i[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,i){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(t,e,i){return this.set(t.x,e.x,i.x,0,t.y,e.y,i.y,0,t.z,e.z,i.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,i=t.elements,s=1/sL.setFromMatrixColumn(t,0).length(),r=1/sL.setFromMatrixColumn(t,1).length(),n=1/sL.setFromMatrixColumn(t,2).length();return e[0]=i[0]*s,e[1]=i[1]*s,e[2]=i[2]*s,e[3]=0,e[4]=i[4]*r,e[5]=i[5]*r,e[6]=i[6]*r,e[7]=0,e[8]=i[8]*n,e[9]=i[9]*n,e[10]=i[10]*n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,i=t.x,s=t.y,r=t.z,n=Math.cos(i),a=Math.sin(i),o=Math.cos(s),h=Math.sin(s),l=Math.cos(r),u=Math.sin(r);if("XYZ"===t.order){let t=n*l,i=n*u,s=a*l,r=a*u;e[0]=o*l,e[4]=-o*u,e[8]=h,e[1]=i+s*h,e[5]=t-r*h,e[9]=-a*o,e[2]=r-t*h,e[6]=s+i*h,e[10]=n*o}else if("YXZ"===t.order){let t=o*l,i=o*u,s=h*l,r=h*u;e[0]=t+r*a,e[4]=s*a-i,e[8]=n*h,e[1]=n*u,e[5]=n*l,e[9]=-a,e[2]=i*a-s,e[6]=r+t*a,e[10]=n*o}else if("ZXY"===t.order){let t=o*l,i=o*u,s=h*l,r=h*u;e[0]=t-r*a,e[4]=-n*u,e[8]=s+i*a,e[1]=i+s*a,e[5]=n*l,e[9]=r-t*a,e[2]=-n*h,e[6]=a,e[10]=n*o}else if("ZYX"===t.order){let t=n*l,i=n*u,s=a*l,r=a*u;e[0]=o*l,e[4]=s*h-i,e[8]=t*h+r,e[1]=o*u,e[5]=r*h+t,e[9]=i*h-s,e[2]=-h,e[6]=a*o,e[10]=n*o}else if("YZX"===t.order){let t=n*o,i=n*h,s=a*o,r=a*h;e[0]=o*l,e[4]=r-t*u,e[8]=s*u+i,e[1]=u,e[5]=n*l,e[9]=-a*l,e[2]=-h*l,e[6]=i*u+s,e[10]=t-r*u}else if("XZY"===t.order){let t=n*o,i=n*h,s=a*o,r=a*h;e[0]=o*l,e[4]=-u,e[8]=h*l,e[1]=t*u+r,e[5]=n*l,e[9]=i*u-s,e[2]=s*u-i,e[6]=a*l,e[10]=r*u+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(sU,t,sW)}lookAt(t,e,i){let s=this.elements;return sq.subVectors(t,e),0===sq.lengthSq()&&(sq.z=1),sq.normalize(),sD.crossVectors(i,sq),0===sD.lengthSq()&&(1===Math.abs(i.z)?sq.x+=1e-4:sq.z+=1e-4,sq.normalize(),sD.crossVectors(i,sq)),sD.normalize(),sH.crossVectors(sq,sD),s[0]=sD.x,s[4]=sH.x,s[8]=sq.x,s[1]=sD.y,s[5]=sH.y,s[9]=sq.y,s[2]=sD.z,s[6]=sH.z,s[10]=sq.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let i=t.elements,s=e.elements,r=this.elements,n=i[0],a=i[4],o=i[8],h=i[12],l=i[1],u=i[5],c=i[9],d=i[13],p=i[2],m=i[6],y=i[10],f=i[14],g=i[3],x=i[7],b=i[11],v=i[15],w=s[0],M=s[4],S=s[8],_=s[12],A=s[1],T=s[5],z=s[9],I=s[13],C=s[2],k=s[6],B=s[10],R=s[14],E=s[3],P=s[7],O=s[11],N=s[15];return r[0]=n*w+a*A+o*C+h*E,r[4]=n*M+a*T+o*k+h*P,r[8]=n*S+a*z+o*B+h*O,r[12]=n*_+a*I+o*R+h*N,r[1]=l*w+u*A+c*C+d*E,r[5]=l*M+u*T+c*k+d*P,r[9]=l*S+u*z+c*B+d*O,r[13]=l*_+u*I+c*R+d*N,r[2]=p*w+m*A+y*C+f*E,r[6]=p*M+m*T+y*k+f*P,r[10]=p*S+m*z+y*B+f*O,r[14]=p*_+m*I+y*R+f*N,r[3]=g*w+x*A+b*C+v*E,r[7]=g*M+x*T+b*k+v*P,r[11]=g*S+x*z+b*B+v*O,r[15]=g*_+x*I+b*R+v*N,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],i=t[4],s=t[8],r=t[12],n=t[1],a=t[5],o=t[9],h=t[13],l=t[2],u=t[6],c=t[10],d=t[14],p=t[3],m=t[7];return p*(r*o*u-s*h*u-r*a*c+i*h*c+s*a*d-i*o*d)+m*(e*o*d-e*h*c+r*n*c-s*n*d+s*h*l-r*o*l)+t[11]*(e*h*u-e*a*d-r*n*u+i*n*d+r*a*l-i*h*l)+t[15]*(-s*a*l-e*o*u+e*a*c+s*n*u-i*n*c+i*o*l)}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(t,e,i){let s=this.elements;return t.isVector3?(s[12]=t.x,s[13]=t.y,s[14]=t.z):(s[12]=t,s[13]=e,s[14]=i),this}invert(){let t=this.elements,e=t[0],i=t[1],s=t[2],r=t[3],n=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],d=t[11],p=t[12],m=t[13],y=t[14],f=t[15],g=u*y*h-m*c*h+m*o*d-a*y*d-u*o*f+a*c*f,x=p*c*h-l*y*h-p*o*d+n*y*d+l*o*f-n*c*f,b=l*m*h-p*u*h+p*a*d-n*m*d-l*a*f+n*u*f,v=p*u*o-l*m*o-p*a*c+n*m*c+l*a*y-n*u*y,w=e*g+i*x+s*b+r*v;if(0===w)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let M=1/w;return t[0]=g*M,t[1]=(m*c*r-u*y*r-m*s*d+i*y*d+u*s*f-i*c*f)*M,t[2]=(a*y*r-m*o*r+m*s*h-i*y*h-a*s*f+i*o*f)*M,t[3]=(u*o*r-a*c*r-u*s*h+i*c*h+a*s*d-i*o*d)*M,t[4]=x*M,t[5]=(l*y*r-p*c*r+p*s*d-e*y*d-l*s*f+e*c*f)*M,t[6]=(p*o*r-n*y*r-p*s*h+e*y*h+n*s*f-e*o*f)*M,t[7]=(n*c*r-l*o*r+l*s*h-e*c*h-n*s*d+e*o*d)*M,t[8]=b*M,t[9]=(p*u*r-l*m*r-p*i*d+e*m*d+l*i*f-e*u*f)*M,t[10]=(n*m*r-p*a*r+p*i*h-e*m*h-n*i*f+e*a*f)*M,t[11]=(l*a*r-n*u*r-l*i*h+e*u*h+n*i*d-e*a*d)*M,t[12]=v*M,t[13]=(l*m*s-p*u*s+p*i*c-e*m*c-l*i*y+e*u*y)*M,t[14]=(p*a*s-n*m*s-p*i*o+e*m*o+n*i*y-e*a*y)*M,t[15]=(n*u*s-l*a*s+l*i*o-e*u*o-n*i*c+e*a*c)*M,this}scale(t){let e=this.elements,i=t.x,s=t.y,r=t.z;return e[0]*=i,e[4]*=s,e[8]*=r,e[1]*=i,e[5]*=s,e[9]*=r,e[2]*=i,e[6]*=s,e[10]*=r,e[3]*=i,e[7]*=s,e[11]*=r,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2];return Math.sqrt(Math.max(e,t[4]*t[4]+t[5]*t[5]+t[6]*t[6],t[8]*t[8]+t[9]*t[9]+t[10]*t[10]))}makeTranslation(t,e,i){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,i,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),i=Math.sin(t);return this.set(1,0,0,0,0,e,-i,0,0,i,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,0,i,0,0,1,0,0,-i,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),i=Math.sin(t);return this.set(e,-i,0,0,i,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let i=Math.cos(e),s=Math.sin(e),r=1-i,n=t.x,a=t.y,o=t.z,h=r*n,l=r*a;return this.set(h*n+i,h*a-s*o,h*o+s*a,0,h*a+s*o,l*a+i,l*o-s*n,0,h*o-s*a,l*o+s*n,r*o*o+i,0,0,0,0,1),this}makeScale(t,e,i){return this.set(t,0,0,0,0,e,0,0,0,0,i,0,0,0,0,1),this}makeShear(t,e,i,s,r,n){return this.set(1,i,r,0,t,1,n,0,e,s,1,0,0,0,0,1),this}compose(t,e,i){let s=this.elements,r=e._x,n=e._y,a=e._z,o=e._w,h=r+r,l=n+n,u=a+a,c=r*h,d=r*l,p=r*u,m=n*l,y=n*u,f=a*u,g=o*h,x=o*l,b=o*u,v=i.x,w=i.y,M=i.z;return s[0]=(1-(m+f))*v,s[1]=(d+b)*v,s[2]=(p-x)*v,s[3]=0,s[4]=(d-b)*w,s[5]=(1-(c+f))*w,s[6]=(y+g)*w,s[7]=0,s[8]=(p+x)*M,s[9]=(y-g)*M,s[10]=(1-(c+m))*M,s[11]=0,s[12]=t.x,s[13]=t.y,s[14]=t.z,s[15]=1,this}decompose(t,e,i){let s=this.elements,r=sL.set(s[0],s[1],s[2]).length(),n=sL.set(s[4],s[5],s[6]).length(),a=sL.set(s[8],s[9],s[10]).length();0>this.determinant()&&(r=-r),t.x=s[12],t.y=s[13],t.z=s[14],sj.copy(this);let o=1/r,h=1/n,l=1/a;return sj.elements[0]*=o,sj.elements[1]*=o,sj.elements[2]*=o,sj.elements[4]*=h,sj.elements[5]*=h,sj.elements[6]*=h,sj.elements[8]*=l,sj.elements[9]*=l,sj.elements[10]*=l,e.setFromRotationMatrix(sj),i.x=r,i.y=n,i.z=a,this}makePerspective(t,e,i,s,r,n,a=iA){let o,h,l=this.elements;if(a===iA)o=-(n+r)/(n-r),h=-2*n*r/(n-r);else if(a===iT)o=-n/(n-r),h=-n*r/(n-r);else throw Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=2*r/(e-t),l[4]=0,l[8]=(e+t)/(e-t),l[12]=0,l[1]=0,l[5]=2*r/(i-s),l[9]=(i+s)/(i-s),l[13]=0,l[2]=0,l[6]=0,l[10]=o,l[14]=h,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,i,s,r,n,a=iA){let o,h,l=this.elements,u=1/(e-t),c=1/(i-s),d=1/(n-r);if(a===iA)o=(n+r)*d,h=-2*d;else if(a===iT)o=r*d,h=-1*d;else throw Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-((e+t)*u),l[1]=0,l[5]=2*c,l[9]=0,l[13]=-((i+s)*c),l[2]=0,l[6]=0,l[10]=h,l[14]=-o,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(t){let e=this.elements,i=t.elements;for(let t=0;t<16;t++)if(e[t]!==i[t])return!1;return!0}fromArray(t,e=0){for(let i=0;i<16;i++)this.elements[i]=t[i+e];return this}toArray(t=[],e=0){let i=this.elements;return t[e]=i[0],t[e+1]=i[1],t[e+2]=i[2],t[e+3]=i[3],t[e+4]=i[4],t[e+5]=i[5],t[e+6]=i[6],t[e+7]=i[7],t[e+8]=i[8],t[e+9]=i[9],t[e+10]=i[10],t[e+11]=i[11],t[e+12]=i[12],t[e+13]=i[13],t[e+14]=i[14],t[e+15]=i[15],t}}let sL=new sh,sj=new sV,sU=new sh(0,0,0),sW=new sh(1,1,1),sD=new sh,sH=new sh,sq=new sh,sJ=new sV,sX=new so;class sZ{constructor(t=0,e=0,i=0,s=sZ.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=i,this._order=s}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,i,s=this._order){return this._x=t,this._y=e,this._z=i,this._order=s,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,i=!0){let s=t.elements,r=s[0],n=s[4],a=s[8],o=s[1],h=s[5],l=s[9],u=s[2],c=s[6],d=s[10];switch(e){case"XYZ":this._y=Math.asin(iP(a,-1,1)),.9999999>Math.abs(a)?(this._x=Math.atan2(-l,d),this._z=Math.atan2(-n,r)):(this._x=Math.atan2(c,h),this._z=0);break;case"YXZ":this._x=Math.asin(-iP(l,-1,1)),.9999999>Math.abs(l)?(this._y=Math.atan2(a,d),this._z=Math.atan2(o,h)):(this._y=Math.atan2(-u,r),this._z=0);break;case"ZXY":this._x=Math.asin(iP(c,-1,1)),.9999999>Math.abs(c)?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-n,h)):(this._y=0,this._z=Math.atan2(o,r));break;case"ZYX":this._y=Math.asin(-iP(u,-1,1)),.9999999>Math.abs(u)?(this._x=Math.atan2(c,d),this._z=Math.atan2(o,r)):(this._x=0,this._z=Math.atan2(-n,h));break;case"YZX":this._z=Math.asin(iP(o,-1,1)),.9999999>Math.abs(o)?(this._x=Math.atan2(-l,h),this._y=Math.atan2(-u,r)):(this._x=0,this._y=Math.atan2(a,d));break;case"XZY":this._z=Math.asin(-iP(n,-1,1)),.9999999>Math.abs(n)?(this._x=Math.atan2(c,h),this._y=Math.atan2(a,r)):(this._x=Math.atan2(-l,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===i&&this._onChangeCallback(),this}setFromQuaternion(t,e,i){return sJ.makeRotationFromQuaternion(t),this.setFromRotationMatrix(sJ,e,i)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return sX.setFromEuler(this),this.setFromQuaternion(sX,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}sZ.DEFAULT_ORDER="XYZ";class sY{constructor(){this.mask=1}set(t){this.mask=1<>>0}enable(t){this.mask|=1<1){for(let t=0;t1){for(let t=0;t0&&(s.userData=this.userData),s.layers=this.layers.mask,s.matrix=this.matrix.toArray(),s.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(s.matrixAutoUpdate=!1),this.isInstancedMesh&&(s.type="InstancedMesh",s.count=this.count,s.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(s.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(s.type="BatchedMesh",s.perObjectFrustumCulled=this.perObjectFrustumCulled,s.sortObjects=this.sortObjects,s.drawRanges=this._drawRanges,s.reservedRanges=this._reservedRanges,s.visibility=this._visibility,s.active=this._active,s.bounds=this._bounds.map(t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()})),s.maxInstanceCount=this._maxInstanceCount,s.maxVertexCount=this._maxVertexCount,s.maxIndexCount=this._maxIndexCount,s.geometryInitialized=this._geometryInitialized,s.geometryCount=this._geometryCount,s.matricesTexture=this._matricesTexture.toJSON(t),null!==this._colorsTexture&&(s.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(s.boundingSphere={center:s.boundingSphere.center.toArray(),radius:s.boundingSphere.radius}),null!==this.boundingBox&&(s.boundingBox={min:s.boundingBox.min.toArray(),max:s.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?s.background=this.background.toJSON():this.background.isTexture&&(s.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(s.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){s.geometry=r(t.geometries,this.geometry);let e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){let i=e.shapes;if(Array.isArray(i))for(let e=0,s=i.length;e0){s.children=[];for(let e=0;e0){s.animations=[];for(let e=0;e0&&(i.geometries=e),s.length>0&&(i.materials=s),r.length>0&&(i.textures=r),a.length>0&&(i.images=a),o.length>0&&(i.shapes=o),h.length>0&&(i.skeletons=h),l.length>0&&(i.animations=l),u.length>0&&(i.nodes=u)}return i.object=s,i;function n(t){let e=[];for(let i in t){let s=t[i];delete s.metadata,e.push(s)}return e}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e0?s.multiplyScalar(1/Math.sqrt(r)):s.set(0,0,0)}static getBarycoord(t,e,i,s,r){ri.subVectors(s,e),rs.subVectors(i,e),rr.subVectors(t,e);let n=ri.dot(ri),a=ri.dot(rs),o=ri.dot(rr),h=rs.dot(rs),l=rs.dot(rr),u=n*h-a*a;if(0===u)return r.set(0,0,0),null;let c=1/u,d=(h*o-a*l)*c,p=(n*l-a*o)*c;return r.set(1-d-p,p,d)}static containsPoint(t,e,i,s){return null!==this.getBarycoord(t,e,i,s,rn)&&rn.x>=0&&rn.y>=0&&rn.x+rn.y<=1}static getInterpolation(t,e,i,s,r,n,a,o){return null===this.getBarycoord(t,e,i,s,rn)?(o.x=0,o.y=0,"z"in o&&(o.z=0),"w"in o&&(o.w=0),null):(o.setScalar(0),o.addScaledVector(r,rn.x),o.addScaledVector(n,rn.y),o.addScaledVector(a,rn.z),o)}static getInterpolatedAttribute(t,e,i,s,r,n){return rd.setScalar(0),rp.setScalar(0),rm.setScalar(0),rd.fromBufferAttribute(t,e),rp.fromBufferAttribute(t,i),rm.fromBufferAttribute(t,s),n.setScalar(0),n.addScaledVector(rd,r.x),n.addScaledVector(rp,r.y),n.addScaledVector(rm,r.z),n}static isFrontFacing(t,e,i,s){return ri.subVectors(i,e),rs.subVectors(t,e),0>ri.cross(rs).dot(s)}set(t,e,i){return this.a.copy(t),this.b.copy(e),this.c.copy(i),this}setFromPointsAndIndices(t,e,i,s){return this.a.copy(t[e]),this.b.copy(t[i]),this.c.copy(t[s]),this}setFromAttributeAndIndices(t,e,i,s){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,i),this.c.fromBufferAttribute(t,s),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ri.subVectors(this.c,this.b),rs.subVectors(this.a,this.b),.5*ri.cross(rs).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return ry.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return ry.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,i,s,r){return ry.getInterpolation(t,this.a,this.b,this.c,e,i,s,r)}containsPoint(t){return ry.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return ry.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let i,s,r=this.a,n=this.b,a=this.c;ra.subVectors(n,r),ro.subVectors(a,r),rl.subVectors(t,r);let o=ra.dot(rl),h=ro.dot(rl);if(o<=0&&h<=0)return e.copy(r);ru.subVectors(t,n);let l=ra.dot(ru),u=ro.dot(ru);if(l>=0&&u<=l)return e.copy(n);let c=o*u-l*h;if(c<=0&&o>=0&&l<=0)return i=o/(o-l),e.copy(r).addScaledVector(ra,i);rc.subVectors(t,a);let d=ra.dot(rc),p=ro.dot(rc);if(p>=0&&d<=p)return e.copy(a);let m=d*h-o*p;if(m<=0&&h>=0&&p<=0)return s=h/(h-p),e.copy(r).addScaledVector(ro,s);let y=l*p-d*u;if(y<=0&&u-l>=0&&d-p>=0)return rh.subVectors(a,n),s=(u-l)/(u-l+(d-p)),e.copy(n).addScaledVector(rh,s);let f=1/(y+m+c);return i=m*f,s=c*f,e.copy(r).addScaledVector(ra,i).addScaledVector(ro,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}let rf={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},rg={h:0,s:0,l:0},rx={h:0,s:0,l:0};function rb(t,e,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?t+(e-t)*6*i:i<.5?e:i<2/3?t+(e-t)*6*(2/3-i):t}class rv{constructor(t,e,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,i)}set(t,e,i){return void 0===e&&void 0===i?t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t):this.setRGB(t,e,i),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=eZ){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,i1.toWorkingColorSpace(this,e),this}setRGB(t,e,i,s=i1.workingColorSpace){return this.r=t,this.g=e,this.b=i,i1.toWorkingColorSpace(this,s),this}setHSL(t,e,i,s=i1.workingColorSpace){if(t=iO(t,1),e=iP(e,0,1),i=iP(i,0,1),0===e)this.r=this.g=this.b=i;else{let s=i<=.5?i*(1+e):i+e-i*e,r=2*i-s;this.r=rb(r,s,t+1/3),this.g=rb(r,s,t),this.b=rb(r,s,t-1/3)}return i1.toWorkingColorSpace(this,s),this}setStyle(t,e=eZ){let i;function s(e){void 0!==e&&1>parseFloat(e)&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}if(i=/^(\w+)\(([^\)]*)\)/.exec(t)){let r,n=i[1],a=i[2];switch(n){case"rgb":case"rgba":if(r=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(255,parseInt(r[1],10))/255,Math.min(255,parseInt(r[2],10))/255,Math.min(255,parseInt(r[3],10))/255,e);if(r=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setRGB(Math.min(100,parseInt(r[1],10))/100,Math.min(100,parseInt(r[2],10))/100,Math.min(100,parseInt(r[3],10))/100,e);break;case"hsl":case"hsla":if(r=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return s(r[4]),this.setHSL(parseFloat(r[1])/360,parseFloat(r[2])/100,parseFloat(r[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(t)){let s=i[1],r=s.length;if(3===r)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,e);if(6===r)return this.setHex(parseInt(s,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=eZ){let i=rf[t.toLowerCase()];return void 0!==i?this.setHex(i,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=i2(t.r),this.g=i2(t.g),this.b=i2(t.b),this}copyLinearToSRGB(t){return this.r=i3(t.r),this.g=i3(t.g),this.b=i3(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=eZ){return i1.fromWorkingColorSpace(rw.copy(this),t),65536*Math.round(iP(255*rw.r,0,255))+256*Math.round(iP(255*rw.g,0,255))+Math.round(iP(255*rw.b,0,255))}getHexString(t=eZ){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=i1.workingColorSpace){let i,s;i1.fromWorkingColorSpace(rw.copy(this),e);let r=rw.r,n=rw.g,a=rw.b,o=Math.max(r,n,a),h=Math.min(r,n,a),l=(h+o)/2;if(h===o)i=0,s=0;else{let t=o-h;switch(s=l<=.5?t/(o+h):t/(2-o-h),o){case r:i=(n-a)/t+6*(n0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(let e in t){let i=t[e];if(void 0===i){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}let s=this[e];if(void 0===s){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);continue}s&&s.isColor?s.set(i):s&&s.isVector3&&i&&i.isVector3?s.copy(i):this[e]=i}}toJSON(t){let e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});let i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function s(t){let e=[];for(let i in t){let s=t[i];delete s.metadata,e.push(s)}return e}if(i.uuid=this.uuid,i.type=this.type,""!==this.name&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),void 0!==this.roughness&&(i.roughness=this.roughness),void 0!==this.metalness&&(i.metalness=this.metalness),void 0!==this.sheen&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(i.shininess=this.shininess),void 0!==this.clearcoat&&(i.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(i.dispersion=this.dispersion),void 0!==this.iridescence&&(i.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(i.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(i.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(t).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(t).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(t).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(t).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(t).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(i.combine=this.combine)),void 0!==this.envMapRotation&&(i.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(i.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(i.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(i.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(i.size=this.size),null!==this.shadowSide&&(i.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==S&&(i.blending=this.blending),this.side!==b&&(i.side=this.side),!0===this.vertexColors&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),!0===this.transparent&&(i.transparent=!0),this.blendSrc!==F&&(i.blendSrc=this.blendSrc),this.blendDst!==V&&(i.blendDst=this.blendDst),this.blendEquation!==I&&(i.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(i.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(i.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==$&&(i.depthFunc=this.depthFunc),!1===this.depthTest&&(i.depthTest=this.depthTest),!1===this.depthWrite&&(i.depthWrite=this.depthWrite),!1===this.colorWrite&&(i.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==is&&(i.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(i.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==eK&&(i.stencilFail=this.stencilFail),this.stencilZFail!==eK&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==eK&&(i.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(i.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(i.rotation=this.rotation),!0===this.polygonOffset&&(i.polygonOffset=!0),0!==this.polygonOffsetFactor&&(i.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(i.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(i.linewidth=this.linewidth),void 0!==this.dashSize&&(i.dashSize=this.dashSize),void 0!==this.gapSize&&(i.gapSize=this.gapSize),void 0!==this.scale&&(i.scale=this.scale),!0===this.dithering&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),!0===this.alphaHash&&(i.alphaHash=!0),!0===this.alphaToCoverage&&(i.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(i.premultipliedAlpha=!0),!0===this.forceSinglePass&&(i.forceSinglePass=!0),!0===this.wireframe&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(i.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(i.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(i.flatShading=!0),!1===this.visible&&(i.visible=!1),!1===this.toneMapped&&(i.toneMapped=!1),!1===this.fog&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData),e){let e=s(t.textures),r=s(t.images);e.length>0&&(i.textures=e),r.length>0&&(i.images=r)}return i}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,i=null;if(null!==e){let t=e.length;i=Array(t);for(let s=0;s!==t;++s)i[s]=e[s].clone()}return this.clippingPlanes=i,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class r_ extends rS{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new rv(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sZ,this.combine=ti,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}let rA=function(){let t=new ArrayBuffer(4),e=new Float32Array(t),i=new Uint32Array(t),s=new Uint32Array(512),r=new Uint32Array(512);for(let t=0;t<256;++t){let e=t-127;e<-27?(s[t]=0,s[256|t]=32768,r[t]=24,r[256|t]=24):e<-14?(s[t]=1024>>-e-14,s[256|t]=1024>>-e-14|32768,r[t]=-e-1,r[256|t]=-e-1):e<=15?(s[t]=e+15<<10,s[256|t]=e+15<<10|32768,r[t]=13,r[256|t]=13):e<128?(s[t]=31744,s[256|t]=64512,r[t]=24,r[256|t]=24):(s[t]=31744,s[256|t]=64512,r[t]=13,r[256|t]=13)}let n=new Uint32Array(2048),a=new Uint32Array(64),o=new Uint32Array(64);for(let t=1;t<1024;++t){let e=t<<13,i=0;for(;(8388608&e)==0;)e<<=1,i-=8388608;e&=-8388609,i+=0x38800000,n[t]=e|i}for(let t=1024;t<2048;++t)n[t]=0x38000000+(t-1024<<13);for(let t=1;t<31;++t)a[t]=t<<23;a[31]=0x47800000,a[32]=0x80000000;for(let t=33;t<63;++t)a[t]=0x80000000+(t-32<<23);a[63]=0xc7800000;for(let t=1;t<64;++t)32!==t&&(o[t]=1024);return{floatView:e,uint32View:i,baseTable:s,shiftTable:r,mantissaTable:n,exponentTable:a,offsetTable:o}}();function rT(t){Math.abs(t)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),t=iP(t,-65504,65504),rA.floatView[0]=t;let e=rA.uint32View[0],i=e>>23&511;return rA.baseTable[i]+((8388607&e)>>rA.shiftTable[i])}function rz(t){let e=t>>10;return rA.uint32View[0]=rA.mantissaTable[rA.offsetTable[e]+(1023&t)]+rA.exponentTable[e],rA.floatView[0]}class rI{static toHalfFloat(t){return rT(t)}static fromHalfFloat(t){return rz(t)}}let rC=new sh,rk=new ij,rB=0;class rR{constructor(t,e,i=!1){if(Array.isArray(t))throw TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,Object.defineProperty(this,"id",{value:rB++}),this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=i,this.usage=ip,this.updateRanges=[],this.gpuType=tj,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,i){t*=this.itemSize,i*=e.itemSize;for(let s=0,r=this.itemSize;se.count&&console.warn("THREE.BufferGeometry: Buffer size too small for points data. Use .dispose() and create a new geometry."),e.needsUpdate=!0}return this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new sc);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new sh(-1/0,-1/0,-1/0),new sh(Infinity,Infinity,Infinity));return}if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,i=e.length;t0&&(t.userData=this.userData),void 0!==this.parameters){let e=this.parameters;for(let i in e)void 0!==e[i]&&(t[i]=e[i]);return t}t.data={attributes:{}};let e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let i=this.attributes;for(let e in i){let s=i[e];t.data.attributes[e]=s.toJSON(t.data)}let s={},r=!1;for(let e in this.morphAttributes){let i=this.morphAttributes[e],n=[];for(let e=0,s=i.length;e0&&(s[e]=n,r=!0)}r&&(t.data.morphAttributes=s,t.data.morphTargetsRelative=this.morphTargetsRelative);let n=this.groups;n.length>0&&(t.data.groups=JSON.parse(JSON.stringify(n)));let a=this.boundingSphere;return null!==a&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let i=t.index;null!==i&&this.setIndex(i.clone());let s=t.attributes;for(let t in s){let i=s[t];this.setAttribute(t,i.clone(e))}let r=t.morphAttributes;for(let t in r){let i=[],s=r[t];for(let t=0,r=s.length;t0){let i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;t(t.far-t.near)**2)||(rG.copy(r).invert(),r$.copy(t.ray).applyMatrix4(rG),(null===i.boundingBox||!1!==r$.intersectsBox(i.boundingBox))&&this._computeIntersections(t,e,r$))}_computeIntersections(t,e,i){let s,r=this.geometry,n=this.material,a=r.index,o=r.attributes.position,h=r.attributes.uv,l=r.attributes.uv1,u=r.attributes.normal,c=r.groups,d=r.drawRange;if(null!==a)if(Array.isArray(n))for(let r=0,o=c.length;ri.far?null:{distance:l,point:r6.clone(),object:t}}(t,e,i,s,r0,r1,r2,r4);if(u){let t=new sh;ry.getBarycoord(r4,r0,r1,r2,t),r&&(u.uv=ry.getInterpolatedAttribute(r,o,h,l,t,new ij)),n&&(u.uv1=ry.getInterpolatedAttribute(n,o,h,l,t,new ij)),a&&(u.normal=ry.getInterpolatedAttribute(a,o,h,l,t,new sh),u.normal.dot(s.direction)>0&&u.normal.multiplyScalar(-1));let e={a:o,b:h,c:l,normal:new sh,materialIndex:0};ry.getNormal(r0,r1,r2,e.normal),u.face=e,u.barycoord=t}return u}class r7 extends rY{constructor(t=1,e=1,i=1,s=1,r=1,n=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:i,widthSegments:s,heightSegments:r,depthSegments:n};let a=this;s=Math.floor(s),r=Math.floor(r);let o=[],h=[],l=[],u=[],c=0,d=0;function p(t,e,i,s,r,n,p,m,y,f,g){let x=n/y,b=p/f,v=n/2,w=p/2,M=m/2,S=y+1,_=f+1,A=0,T=0,z=new sh;for(let n=0;n<_;n++){let a=n*b-w;for(let o=0;o0?1:-1,l.push(z.x,z.y,z.z),u.push(o/y),u.push(1-n/f),A+=1}}for(let t=0;t0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;let i={};for(let t in this.extensions)!0===this.extensions[t]&&(i[t]=!0);return Object.keys(i).length>0&&(e.extensions=i),e}}class nn extends re{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new sV,this.projectionMatrix=new sV,this.projectionMatrixInverse=new sV,this.coordinateSystem=iA}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}let na=new sh,no=new ij,nh=new ij;class nl extends nn{constructor(t=50,e=1,i=.1,s=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=i,this.far=s,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=2*iR*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(.5*iB*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*iR*Math.atan(Math.tan(.5*iB*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,i){na.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(na.x,na.y).multiplyScalar(-t/na.z),na.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(na.x,na.y).multiplyScalar(-t/na.z)}getViewSize(t,e){return this.getViewBounds(t,no,nh),e.subVectors(nh,no)}setViewOffset(t,e,i,s,r,n){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=i,this.view.offsetY=s,this.view.width=r,this.view.height=n,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(.5*iB*this.fov)/this.zoom,i=2*e,s=this.aspect*i,r=-.5*s,n=this.view;if(null!==this.view&&this.view.enabled){let t=n.fullWidth,a=n.fullHeight;r+=n.offsetX*s/t,e-=n.offsetY*i/a,s*=n.width/t,i*=n.height/a}let a=this.filmOffset;0!==a&&(r+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(r,r+s,e,e-i,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class nu extends re{constructor(t,e,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;let s=new nl(-90,1,t,e);s.layers=this.layers,this.add(s);let r=new nl(-90,1,t,e);r.layers=this.layers,this.add(r);let n=new nl(-90,1,t,e);n.layers=this.layers,this.add(n);let a=new nl(-90,1,t,e);a.layers=this.layers,this.add(a);let o=new nl(-90,1,t,e);o.layers=this.layers,this.add(o);let h=new nl(-90,1,t,e);h.layers=this.layers,this.add(h)}updateCoordinateSystem(){let t=this.coordinateSystem,e=this.children.concat(),[i,s,r,n,a,o]=e;for(let t of e)this.remove(t);if(t===iA)i.up.set(0,1,0),i.lookAt(1,0,0),s.up.set(0,1,0),s.lookAt(-1,0,0),r.up.set(0,0,-1),r.lookAt(0,1,0),n.up.set(0,0,1),n.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else if(t===iT)i.up.set(0,-1,0),i.lookAt(-1,0,0),s.up.set(0,-1,0),s.lookAt(1,0,0),r.up.set(0,0,1),r.lookAt(0,1,0),n.up.set(0,0,-1),n.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1);else throw Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);for(let t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();let{renderTarget:i,activeMipmapLevel:s}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());let[r,n,a,o,h,l]=this.children,u=t.getRenderTarget(),c=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.xr.enabled;t.xr.enabled=!1;let m=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,t.setRenderTarget(i,0,s),t.render(e,r),t.setRenderTarget(i,1,s),t.render(e,n),t.setRenderTarget(i,2,s),t.render(e,a),t.setRenderTarget(i,3,s),t.render(e,o),t.setRenderTarget(i,4,s),t.render(e,h),i.texture.generateMipmaps=m,t.setRenderTarget(i,5,s),t.render(e,l),t.setRenderTarget(u,c,d),t.xr.enabled=p,i.texture.needsPMREMUpdate=!0}}class nc extends i7{constructor(t=[],e=tf,i,s,r,n,a,o,h,l){super(t,e,i,s,r,n,a,o,h,l),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class nd extends si{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;let i={width:t,height:t,depth:1};this.texture=new nc([i,i,i,i,i,i],e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:tC}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let i={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},s=new r7(5,5,5),r=new nr({name:"CubemapFromEquirect",uniforms:nt(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:v,blending:M});r.uniforms.tEquirect.value=e;let n=new r8(s,r),a=e.minFilter;return e.minFilter===tR&&(e.minFilter=tC),new nu(1,10,this).update(t,n),e.minFilter=a,n.geometry.dispose(),n.material.dispose(),this}clear(t,e=!0,i=!0,s=!0){let r=t.getRenderTarget();for(let r=0;r<6;r++)t.setRenderTarget(this,r),t.clear(e,i,s);t.setRenderTarget(r)}}class np extends re{constructor(){super(),this.isGroup=!0,this.type="Group"}}let nm={type:"move"};class ny{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new np,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new np,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new sh,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new sh),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new np,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new sh,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new sh),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){let e=this._hand;if(e)for(let i of t.hand.values())this._getHandJoint(e,i)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,i){let s=null,r=null,n=null,a=this._targetRay,o=this._grip,h=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState){if(h&&t.hand){for(let s of(n=!0,t.hand.values())){let t=e.getJointPose(s,i),r=this._getHandJoint(h,s);null!==t&&(r.matrix.fromArray(t.transform.matrix),r.matrix.decompose(r.position,r.rotation,r.scale),r.matrixWorldNeedsUpdate=!0,r.jointRadius=t.radius),r.visible=null!==t}let s=h.joints["index-finger-tip"],r=h.joints["thumb-tip"],a=s.position.distanceTo(r.position);h.inputState.pinching&&a>.025?(h.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!h.inputState.pinching&&a<=.015&&(h.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==o&&t.gripSpace&&null!==(r=e.getPose(t.gripSpace,i))&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),o.matrixWorldNeedsUpdate=!0,r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1);null!==a&&(null===(s=e.getPose(t.targetRaySpace,i))&&null!==r&&(s=r),null!==s&&(a.matrix.fromArray(s.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,s.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(s.linearVelocity)):a.hasLinearVelocity=!1,s.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(s.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(nm)))}return null!==a&&(a.visible=null!==s),null!==o&&(o.visible=null!==r),null!==h&&(h.visible=null!==n),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){let i=new np;i.matrixAutoUpdate=!1,i.visible=!1,t.joints[e.jointName]=i,t.add(i)}return t.joints[e.jointName]}}class nf{constructor(t,e=25e-5){this.isFogExp2=!0,this.name="",this.color=new rv(t),this.density=e}clone(){return new nf(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class ng{constructor(t,e=1,i=1e3){this.isFog=!0,this.name="",this.color=new rv(t),this.near=e,this.far=i}clone(){return new ng(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class nx extends re{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new sZ,this.environmentIntensity=1,this.environmentRotation=new sZ,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class nb{constructor(t,e){this.isInterleavedBuffer=!0,this.array=t,this.stride=e,this.count=void 0!==t?t.length/e:0,this.usage=ip,this.updateRanges=[],this.version=0,this.uuid=iE()}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,i){t*=this.stride,i*=e.stride;for(let s=0,r=this.stride;st.far||e.push({distance:o,point:nS.clone(),uv:ry.getInterpolation(nS,nC,nk,nB,nR,nE,nP,new ij),face:null,object:this})}copy(t,e){return super.copy(t,e),void 0!==t.center&&this.center.copy(t.center),this.material=t.material,this}}function nN(t,e,i,s,r,n){nT.subVectors(t,i).addScalar(.5).multiply(s),void 0!==r?(nz.x=n*nT.x-r*nT.y,nz.y=r*nT.x+n*nT.y):nz.copy(nT),t.copy(e),t.x+=nz.x,t.y+=nz.y,t.applyMatrix4(nI)}let nF=new sh,nV=new sh;class nL extends re{constructor(){super(),this.isLOD=!0,this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);let e=t.levels;for(let t=0,i=e.length;t0){let i,s;for(i=1,s=e.length;i0){nF.setFromMatrixPosition(this.matrixWorld);let i=t.ray.origin.distanceTo(nF);this.getObjectForDistance(i).raycast(t,e)}}update(t){let e=this.levels;if(e.length>1){let i,s;nF.setFromMatrixPosition(t.matrixWorld),nV.setFromMatrixPosition(this.matrixWorld);let r=nF.distanceTo(nV)/t.zoom;for(i=1,e[0].object.visible=!0,s=e.length;i=t)e[i-1].object.visible=!1,e[i].object.visible=!0;else break}for(this._currentLevel=i-1;i1?null:e.copy(t.start).addScaledVector(i,r)}intersectsLine(t){let e=this.distanceToPoint(t.start),i=this.distanceToPoint(t.end);return e<0&&i>0||i<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let i=e||ai.getNormalMatrix(t),s=this.coplanarPoint(at).applyMatrix4(t),r=this.normal.applyMatrix3(i).normalize();return this.constant=-s.dot(r),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}}let ar=new sC,an=new sh;class aa{constructor(t=new as,e=new as,i=new as,s=new as,r=new as,n=new as){this.planes=[t,e,i,s,r,n]}set(t,e,i,s,r,n){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(i),a[3].copy(s),a[4].copy(r),a[5].copy(n),this}copy(t){let e=this.planes;for(let i=0;i<6;i++)e[i].copy(t.planes[i]);return this}setFromProjectionMatrix(t,e=iA){let i=this.planes,s=t.elements,r=s[0],n=s[1],a=s[2],o=s[3],h=s[4],l=s[5],u=s[6],c=s[7],d=s[8],p=s[9],m=s[10],y=s[11],f=s[12],g=s[13],x=s[14],b=s[15];if(i[0].setComponents(o-r,c-h,y-d,b-f).normalize(),i[1].setComponents(o+r,c+h,y+d,b+f).normalize(),i[2].setComponents(o+n,c+l,y+p,b+g).normalize(),i[3].setComponents(o-n,c-l,y-p,b-g).normalize(),i[4].setComponents(o-a,c-u,y-m,b-x).normalize(),e===iA)i[5].setComponents(o+a,c+u,y+m,b+x).normalize();else if(e===iT)i[5].setComponents(a,u,m,x).normalize();else throw Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),ar.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{let e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),ar.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(ar)}intersectsSprite(t){return ar.center.set(0,0,0),ar.radius=.7071067811865476,ar.applyMatrix4(t.matrixWorld),this.intersectsSphere(ar)}intersectsSphere(t){let e=this.planes,i=t.center,s=-t.radius;for(let t=0;t<6;t++)if(e[t].distanceToPoint(i)0?t.max.x:t.min.x,an.y=s.normal.y>0?t.max.y:t.min.y,an.z=s.normal.z>0?t.max.z:t.min.z,0>s.distanceToPoint(an))return!1}return!0}containsPoint(t){let e=this.planes;for(let i=0;i<6;i++)if(0>e[i].distanceToPoint(t))return!1;return!0}clone(){return new this.constructor().copy(this)}}function ao(t,e){return t-e}function ah(t,e){return t.z-e.z}function al(t,e){return e.z-t.z}class au{constructor(){this.index=0,this.pool=[],this.list=[]}push(t,e,i,s){let r=this.pool,n=this.list;this.index>=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});let a=r[this.index];n.push(a),this.index++,a.start=t,a.count=e,a.z=i,a.index=s}reset(){this.list.length=0,this.index=0}}let ac=new sV,ad=new rv(1,1,1),ap=new aa,am=new sc,ay=new sC,af=new sh,ag=new sh,ax=new sh,ab=new au,av=new r8,aw=[];function aM(t,e){if(t.constructor!==e.constructor){let i=Math.min(t.length,e.length);for(let s=0;s65535?new Uint32Array(s):new Uint16Array(s);e.setIndex(new rR(t,1))}this._geometryInitialized=!0}}_validateGeometry(t){let e=this.geometry;if(!!t.getIndex()!=!!e.getIndex())throw Error('THREE.BatchedMesh: All geometries must consistently have "index".');for(let i in e.attributes){if(!t.hasAttribute(i))throw Error(`THREE.BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);let s=t.getAttribute(i),r=e.getAttribute(i);if(s.itemSize!==r.itemSize||s.normalized!==r.normalized)throw Error("THREE.BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}validateInstanceId(t){let e=this._instanceInfo;if(t<0||t>=e.length||!1===e[t].active)throw Error(`THREE.BatchedMesh: Invalid instanceId ${t}. Instance is either out of range or has been deleted.`)}validateGeometryId(t){let e=this._geometryInfo;if(t<0||t>=e.length||!1===e[t].active)throw Error(`THREE.BatchedMesh: Invalid geometryId ${t}. Geometry is either out of range or has been deleted.`)}setCustomSort(t){return this.customSort=t,this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new sc);let t=this.boundingBox,e=this._instanceInfo;t.makeEmpty();for(let i=0,s=e.length;i=this.maxInstanceCount&&0===this._availableInstanceIds.length)throw Error("THREE.BatchedMesh: Maximum item count reached.");let e={visible:!0,active:!0,geometryIndex:t},i=null;this._availableInstanceIds.length>0?(this._availableInstanceIds.sort(ao),i=this._availableInstanceIds.shift(),this._instanceInfo[i]=e):(i=this._instanceInfo.length,this._instanceInfo.push(e));let s=this._matricesTexture;ac.identity().toArray(s.image.data,16*i),s.needsUpdate=!0;let r=this._colorsTexture;return r&&(ad.toArray(r.image.data,4*i),r.needsUpdate=!0),this._visibilityChanged=!0,i}addGeometry(t,e=-1,i=-1){let s;this._initializeGeometry(t),this._validateGeometry(t);let r={vertexStart:-1,vertexCount:-1,reservedVertexCount:-1,indexStart:-1,indexCount:-1,reservedIndexCount:-1,start:-1,count:-1,boundingBox:null,boundingSphere:null,active:!0},n=this._geometryInfo;r.vertexStart=this._nextVertexStart,r.reservedVertexCount=-1===e?t.getAttribute("position").count:e;let a=t.getIndex();if(null!==a&&(r.indexStart=this._nextIndexStart,r.reservedIndexCount=-1===i?a.count:i),-1!==r.indexStart&&r.indexStart+r.reservedIndexCount>this._maxIndexCount||r.vertexStart+r.reservedVertexCount>this._maxVertexCount)throw Error("THREE.BatchedMesh: Reserved space request exceeds the maximum buffer size.");return this._availableGeometryIds.length>0?(this._availableGeometryIds.sort(ao),n[s=this._availableGeometryIds.shift()]=r):(s=this._geometryCount,this._geometryCount++,n.push(r)),this.setGeometryAt(s,t),this._nextIndexStart=r.indexStart+r.reservedIndexCount,this._nextVertexStart=r.vertexStart+r.reservedVertexCount,s}setGeometryAt(t,e){if(t>=this._geometryCount)throw Error("THREE.BatchedMesh: Maximum geometry count reached.");this._validateGeometry(e);let i=this.geometry,s=null!==i.getIndex(),r=i.getIndex(),n=e.getIndex(),a=this._geometryInfo[t];if(s&&n.count>a.reservedIndexCount||e.attributes.position.count>a.reservedVertexCount)throw Error("THREE.BatchedMesh: Reserved space not large enough for provided geometry.");let o=a.vertexStart,h=a.reservedVertexCount;for(let t in a.vertexCount=e.getAttribute("position").count,i.attributes){let s=e.getAttribute(t),r=i.getAttribute(t);!function(t,e,i=0){let s=e.itemSize;if(t.isInterleavedBufferAttribute||t.array.constructor!==e.array.constructor){let r=t.count;for(let n=0;n=e.length||!1===e[t].active)return this;let i=this._instanceInfo;for(let e=0,s=i.length;ee).sort((t,e)=>i[t].vertexStart-i[e].vertexStart),r=this.geometry;for(let n=0,a=i.length;n=this._geometryCount)return null;let i=this.geometry,s=this._geometryInfo[t];if(null===s.boundingBox){let t=new sc,e=i.index,r=i.attributes.position;for(let i=s.start,n=s.start+s.count;i=this._geometryCount)return null;let i=this.geometry,s=this._geometryInfo[t];if(null===s.boundingSphere){let e=new sC;this.getBoundingBoxAt(t,am),am.getCenter(e.center);let r=i.index,n=i.attributes.position,a=0;for(let t=s.start,i=s.start+s.count;tt.active);if(Math.max(...i.map(t=>t.vertexStart+t.reservedVertexCount))>t)throw Error(`BatchedMesh: Geometry vertex values are being used outside the range ${e}. Cannot shrink further.`);if(this.geometry.index&&Math.max(...i.map(t=>t.indexStart+t.reservedIndexCount))>e)throw Error(`BatchedMesh: Geometry index values are being used outside the range ${e}. Cannot shrink further.`);let s=this.geometry;s.dispose(),this._maxVertexCount=t,this._maxIndexCount=e,this._geometryInitialized&&(this._geometryInitialized=!1,this.geometry=new rY,this._initializeGeometry(s));let r=this.geometry;for(let t in s.index&&aM(s.index.array,r.index.array),s.attributes)aM(s.attributes[t].array,r.attributes[t].array)}raycast(t,e){let i=this._instanceInfo,s=this._geometryInfo,r=this.matrixWorld,n=this.geometry;av.material=this.material,av.geometry.index=n.index,av.geometry.attributes=n.attributes,null===av.geometry.boundingBox&&(av.geometry.boundingBox=new sc),null===av.geometry.boundingSphere&&(av.geometry.boundingSphere=new sC);for(let n=0,a=i.length;n({...t,boundingBox:null!==t.boundingBox?t.boundingBox.clone():null,boundingSphere:null!==t.boundingSphere?t.boundingSphere.clone():null})),this._instanceInfo=t._instanceInfo.map(t=>({...t})),this._maxInstanceCount=t._maxInstanceCount,this._maxVertexCount=t._maxVertexCount,this._maxIndexCount=t._maxIndexCount,this._geometryInitialized=t._geometryInitialized,this._geometryCount=t._geometryCount,this._multiDrawCounts=t._multiDrawCounts.slice(),this._multiDrawStarts=t._multiDrawStarts.slice(),this._matricesTexture=t._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),null!==this._colorsTexture&&(this._colorsTexture=t._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,null!==this._colorsTexture&&(this._colorsTexture.dispose(),this._colorsTexture=null)}onBeforeRender(t,e,i,s,r){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;let n=s.getIndex(),a=null===n?1:n.array.BYTES_PER_ELEMENT,o=this._instanceInfo,h=this._multiDrawStarts,l=this._multiDrawCounts,u=this._geometryInfo,c=this.perObjectFrustumCulled,d=this._indirectTexture,p=d.image.data;c&&(ac.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),ap.setFromProjectionMatrix(ac,t.coordinateSystem));let m=0;if(this.sortObjects){ac.copy(this.matrixWorld).invert(),af.setFromMatrixPosition(i.matrixWorld).applyMatrix4(ac),ag.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(ac);for(let t=0,e=o.length;t0){let i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;ts)return;ak.applyMatrix4(t.matrixWorld);let h=e.ray.origin.distanceTo(ak);if(!(he.far))return{distance:h,point:aB.clone().applyMatrix4(t.matrixWorld),index:a,face:null,faceIndex:null,barycoord:null,object:t}}let aP=new sh,aO=new sh;class aN extends aR{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(null===t.index){let e=t.attributes.position,i=[];for(let t=0,s=e.count;t0){let i=t[e[0]];if(void 0!==i){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=i.length;tr.far)return;n.push({distance:h,distanceToRay:Math.sqrt(o),point:i,index:e,face:null,faceIndex:null,barycoord:null,object:a})}}class aq extends i7{constructor(t,e,i,s,r=tC,n=tC,a,o,h){super(t,e,i,s,r,n,a,o,h),this.isVideoTexture=!0,this.generateMipmaps=!1;let l=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(function e(){l.needsUpdate=!0,t.requestVideoFrameCallback(e)})}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;!1=="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class aJ extends aq{constructor(t,e,i,s,r,n,a,o){super({},t,e,i,s,r,n,a,o),this.isVideoFrameTexture=!0}update(){}clone(){return new this.constructor().copy(this)}setFrame(t){this.image=t,this.needsUpdate=!0}}class aX extends i7{constructor(t,e){super({width:t,height:e}),this.isFramebufferTexture=!0,this.magFilter=t_,this.minFilter=t_,this.generateMipmaps=!1,this.needsUpdate=!0}}class aZ extends i7{constructor(t,e,i,s,r,n,a,o,h,l,u,c){super(null,n,a,o,h,l,s,r,u,c),this.isCompressedTexture=!0,this.image={width:e,height:i},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}}class aY extends aZ{constructor(t,e,i,s,r,n){super(t,e,i,r,n),this.isCompressedArrayTexture=!0,this.image.depth=s,this.wrapR=tM,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class aG extends aZ{constructor(t,e,i){super(void 0,t[0].width,t[0].height,e,i,tf),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=t}}class a$ extends i7{constructor(t,e,i,s,r,n,a,o,h){super(t,e,i,s,r,n,a,o,h),this.isCanvasTexture=!0,this.needsUpdate=!0}}class aQ extends i7{constructor(t,e,i=tL,s,r,n,a=t_,o=t_,h,l=t$){if(l!==t$&&l!==tQ)throw Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");super(null,s,r,n,a,o,l,i,h),this.isDepthTexture=!0,this.image={width:t,height:e},this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.source=new i6(Object.assign({},t.image)),this.compareFunction=t.compareFunction,this}toJSON(t){let e=super.toJSON(t);return null!==this.compareFunction&&(e.compareFunction=this.compareFunction),e}}class aK{constructor(){this.type="Curve",this.arcLengthDivisions=200,this.needsUpdate=!1,this.cacheArcLengths=null}getPoint(){console.warn("THREE.Curve: .getPoint() not implemented.")}getPointAt(t,e){let i=this.getUtoTmapping(t);return this.getPoint(i,e)}getPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPoint(i/t));return e}getSpacedPoints(t=5){let e=[];for(let i=0;i<=t;i++)e.push(this.getPointAt(i/t));return e}getLength(){let t=this.getLengths();return t[t.length-1]}getLengths(t=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===t+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;let e=[],i,s=this.getPoint(0),r=0;e.push(0);for(let n=1;n<=t;n++)e.push(r+=(i=this.getPoint(n/t)).distanceTo(s)),s=i;return this.cacheArcLengths=e,e}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(t,e=null){let i,s=this.getLengths(),r=0,n=s.length;i=e||t*s[n-1];let a=0,o=n-1,h;for(;a<=o;)if((h=s[r=Math.floor(a+(o-a)/2)]-i)<0)a=r+1;else if(h>0)o=r-1;else{o=r;break}if(s[r=o]===i)return r/(n-1);let l=s[r],u=s[r+1];return(r+(i-l)/(u-l))/(n-1)}getTangent(t,e){let i=t-1e-4,s=t+1e-4;i<0&&(i=0),s>1&&(s=1);let r=this.getPoint(i),n=this.getPoint(s),a=e||(r.isVector2?new ij:new sh);return a.copy(n).sub(r).normalize(),a}getTangentAt(t,e){let i=this.getUtoTmapping(t);return this.getTangent(i,e)}computeFrenetFrames(t,e=!1){let i=new sh,s=[],r=[],n=[],a=new sh,o=new sV;for(let e=0;e<=t;e++){let i=e/t;s[e]=this.getTangentAt(i,new sh)}r[0]=new sh,n[0]=new sh;let h=Number.MAX_VALUE,l=Math.abs(s[0].x),u=Math.abs(s[0].y),c=Math.abs(s[0].z);l<=h&&(h=l,i.set(1,0,0)),u<=h&&(h=u,i.set(0,1,0)),c<=h&&i.set(0,0,1),a.crossVectors(s[0],i).normalize(),r[0].crossVectors(s[0],a),n[0].crossVectors(s[0],r[0]);for(let e=1;e<=t;e++){if(r[e]=r[e-1].clone(),n[e]=n[e-1].clone(),a.crossVectors(s[e-1],s[e]),a.length()>Number.EPSILON){a.normalize();let t=Math.acos(iP(s[e-1].dot(s[e]),-1,1));r[e].applyMatrix4(o.makeRotationAxis(a,t))}n[e].crossVectors(s[e],r[e])}if(!0===e){let e=Math.acos(iP(r[0].dot(r[t]),-1,1));e/=t,s[0].dot(a.crossVectors(r[0],r[t]))>0&&(e=-e);for(let i=1;i<=t;i++)r[i].applyMatrix4(o.makeRotationAxis(s[i],e*i)),n[i].crossVectors(s[i],r[i])}return{tangents:s,normals:r,binormals:n}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}}class a0 extends aK{constructor(t=0,e=0,i=1,s=1,r=0,n=2*Math.PI,a=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=i,this.yRadius=s,this.aStartAngle=r,this.aEndAngle=n,this.aClockwise=a,this.aRotation=o}getPoint(t,e=new ij){let i=2*Math.PI,s=this.aEndAngle-this.aStartAngle,r=Math.abs(s)i;)s-=i;s0?0:(Math.floor(Math.abs(o)/n)+1)*n:0===h&&o===n-1&&(o=n-2,h=1),this.closed||o>0?i=r[(o-1)%n]:(a3.subVectors(r[0],r[1]).add(r[0]),i=a3);let l=r[o%n],u=r[(o+1)%n];if(this.closed||o+2i.length-2?i.length-1:r+1],l=i[r>i.length-3?i.length-1:r+2];return e.set(a9(n,a.x,o.x,h.x,l.x),a9(n,a.y,o.y,h.y,l.y)),e}copy(t){super.copy(t),this.points=[];for(let e=0,i=t.points.length;e=i){let t=s[r]-i,n=this.curves[r],a=n.getLength(),o=0===a?0:1-t/a;return n.getPointAt(o,e)}r++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],e=0;for(let i=0,s=this.curves.length;i1&&!i[i.length-1].equals(i[0])&&i.push(i[0]),i}copy(t){super.copy(t),this.curves=[];for(let e=0,i=t.curves.length;e0){let t=h.getPoint(0);t.equals(this.currentPoint)||this.lineTo(t.x,t.y)}this.curves.push(h);let l=h.getPoint(1);return this.currentPoint.copy(l),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}}class oc extends rY{constructor(t=[new ij(0,-.5),new ij(.5,0),new ij(0,.5)],e=12,i=0,s=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:t,segments:e,phiStart:i,phiLength:s},e=Math.floor(e),s=iP(s,0,2*Math.PI);let r=[],n=[],a=[],o=[],h=[],l=1/e,u=new sh,c=new ij,d=new sh,p=new sh,m=new sh,y=0,f=0;for(let e=0;e<=t.length-1;e++)switch(e){case 0:y=t[e+1].x-t[e].x,d.x=+(f=t[e+1].y-t[e].y),d.y=-y,d.z=0*f,m.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case t.length-1:o.push(m.x,m.y,m.z);break;default:y=t[e+1].x-t[e].x,d.x=+(f=t[e+1].y-t[e].y),d.y=-y,d.z=0*f,p.copy(d),d.x+=m.x,d.y+=m.y,d.z+=m.z,d.normalize(),o.push(d.x,d.y,d.z),m.copy(p)}for(let r=0;r<=e;r++){let d=i+r*l*s,p=Math.sin(d),m=Math.cos(d);for(let i=0;i<=t.length-1;i++){u.x=t[i].x*p,u.y=t[i].y,u.z=t[i].x*m,n.push(u.x,u.y,u.z),c.x=r/e,c.y=i/(t.length-1),a.push(c.x,c.y);let s=o[3*i+0]*p,l=o[3*i+1],d=o[3*i+0]*m;h.push(s,l,d)}}for(let i=0;i0||0!==s)&&(l.push(n,a,h),x+=3),(e>0||s!==r-1)&&(l.push(a,o,h),x+=3)}h.addGroup(f,x,0),f+=x})(),!1===n&&(t>0&&g(!0),e>0&&g(!1)),this.setIndex(l),this.setAttribute("position",new rU(u,3)),this.setAttribute("normal",new rU(c,3)),this.setAttribute("uv",new rU(d,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new om(t.radiusTop,t.radiusBottom,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class oy extends om{constructor(t=1,e=1,i=32,s=1,r=!1,n=0,a=2*Math.PI){super(0,t,e,i,s,r,n,a),this.type="ConeGeometry",this.parameters={radius:t,height:e,radialSegments:i,heightSegments:s,openEnded:r,thetaStart:n,thetaLength:a}}static fromJSON(t){return new oy(t.radius,t.height,t.radialSegments,t.heightSegments,t.openEnded,t.thetaStart,t.thetaLength)}}class of extends rY{constructor(t=[],e=[],i=1,s=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:t,indices:e,radius:i,detail:s};let r=[],n=[];function a(t){r.push(t.x,t.y,t.z)}function o(e,i){let s=3*e;i.x=t[s+0],i.y=t[s+1],i.z=t[s+2]}function h(t,e,i,s){s<0&&1===t.x&&(n[e]=t.x-1),0===i.x&&0===i.z&&(n[e]=s/2/Math.PI+.5)}function l(t){return Math.atan2(t.z,-t.x)}(function(t){let i=new sh,s=new sh,r=new sh;for(let n=0;n.9&&a<.1&&(e<.2&&(n[t+0]+=1),i<.2&&(n[t+2]+=1),s<.2&&(n[t+4]+=1))}}()}(),this.setAttribute("position",new rU(r,3)),this.setAttribute("normal",new rU(r.slice(),3)),this.setAttribute("uv",new rU(n,2)),0===s?this.computeVertexNormals():this.normalizeNormals()}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new of(t.vertices,t.indices,t.radius,t.details)}}class og extends of{constructor(t=1,e=0){let i=(1+Math.sqrt(5))/2,s=1/i;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-s,-i,0,-s,i,0,s,-i,0,s,i,-s,-i,0,-s,i,0,s,-i,0,s,i,0,-i,0,-s,i,0,-s,-i,0,s,i,0,s],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],t,e),this.type="DodecahedronGeometry",this.parameters={radius:t,detail:e}}static fromJSON(t){return new og(t.radius,t.detail)}}let ox=new sh,ob=new sh,ov=new sh,ow=new ry;class oM extends rY{constructor(t=null,e=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:t,thresholdAngle:e},null!==t){let i=Math.cos(iB*e),s=t.getIndex(),r=t.getAttribute("position"),n=s?s.count:r.count,a=[0,0,0],o=["a","b","c"],h=[,,,],l={},u=[];for(let t=0;t0)for(let r=e;r=e;r-=s)n=oF(r/s|0,t[r],t[r+1],n);return n&&oB(n,n.next)&&(oV(n),n=n.next),n}function oA(t,e){if(!t)return t;e||(e=t);let i=t,s;do if(s=!1,!i.steiner&&(oB(i,i.next)||0===ok(i.prev,i,i.next))){if(oV(i),(i=e=i.prev)===i.next)break;s=!0}else i=i.next;while(s||i!==e);return e}function oT(t,e){let i=t.x-e.x;return 0===i&&0==(i=t.y-e.y)&&(i=(t.next.y-t.y)/(t.next.x-t.x)-(e.next.y-e.y)/(e.next.x-e.x)),i}function oz(t,e,i,s,r){return(t=((t=((t=((t=((t=(t-i)*r|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)|(e=((e=((e=((e=((e=(e-s)*r|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)<<1}function oI(t,e,i,s,r,n,a,o){return(r-a)*(e-o)>=(t-a)*(n-o)&&(t-a)*(s-o)>=(i-a)*(e-o)&&(i-a)*(n-o)>=(r-a)*(s-o)}function oC(t,e,i,s,r,n,a,o){return(t!==a||e!==o)&&oI(t,e,i,s,r,n,a,o)}function ok(t,e,i){return(e.y-t.y)*(i.x-e.x)-(e.x-t.x)*(i.y-e.y)}function oB(t,e){return t.x===e.x&&t.y===e.y}function oR(t,e,i,s){let r=oP(ok(t,e,i)),n=oP(ok(t,e,s)),a=oP(ok(i,s,t)),o=oP(ok(i,s,e));return!!(r!==n&&a!==o||0===r&&oE(t,i,e)||0===n&&oE(t,s,e)||0===a&&oE(i,t,s)||0===o&&oE(i,e,s))}function oE(t,e,i){return e.x<=Math.max(t.x,i.x)&&e.x>=Math.min(t.x,i.x)&&e.y<=Math.max(t.y,i.y)&&e.y>=Math.min(t.y,i.y)}function oP(t){return t>0?1:t<0?-1:0}function oO(t,e){return 0>ok(t.prev,t,t.next)?ok(t,e,t.next)>=0&&ok(t,t.prev,e)>=0:0>ok(t,e,t.prev)||0>ok(t,t.next,e)}function oN(t,e){let i=oL(t.i,t.x,t.y),s=oL(e.i,e.x,e.y),r=t.next,n=e.prev;return t.next=e,e.prev=t,i.next=r,r.prev=i,s.next=i,i.prev=s,n.next=s,s.prev=n,s}function oF(t,e,i,s){let r=oL(t,e,i);return s?(r.next=s.next,r.prev=s,s.next.prev=r,s.next=r):(r.prev=r,r.next=r),r}function oV(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function oL(t,e,i){return{i:t,x:e,y:i,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class oj{static triangulate(t,e,i=2){return function(t,e,i=2){let s,r,n,a=e&&e.length,o=a?e[0]*i:t.length,h=o_(t,0,o,i,!0),l=[];if(!h||h.next===h.prev)return l;if(a&&(h=function(t,e,i,s){let r=[];for(let i=0,n=e.length;i=s.next.y&&s.next.y!==s.y){let t=s.x+(n-s.y)*(s.next.x-s.x)/(s.next.y-s.y);if(t<=r&&t>a&&(a=t,i=s.x=s.x&&s.x>=h&&r!==s.x&&oI(ni.x||s.x===i.x&&(c=i,d=s,0>ok(c.prev,c,d.prev)&&0>ok(d.next,c,c.next))))&&(i=s,u=e)}s=s.next}while(s!==o);return i}(t,e);if(!i)return e;let s=oN(i,t);return oA(s,s.next),oA(i,i.next)}(r[t],i);return i}(t,e,h,i)),t.length>80*i){s=1/0,r=1/0;let e=-1/0,a=-1/0;for(let n=i;ne&&(e=i),o>a&&(a=o)}n=0!==(n=Math.max(e-s,a-r))?32767/n:0}return function t(e,i,s,r,n,a,o){if(!e)return;!o&&a&&function(t,e,i,s){let r=t;do 0===r.z&&(r.z=oz(r.x,r.y,e,i,s)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){let e,i=1;do{let s,r=t;t=null;let n=null;for(e=0;r;){e++;let a=r,o=0;for(let t=0;t0||h>0&&a;)0!==o&&(0===h||!a||r.z<=a.z)?(s=r,r=r.nextZ,o--):(s=a,a=a.nextZ,h--),n?n.nextZ=s:t=s,s.prevZ=n,n=s;r=a}n.nextZ=null,i*=2}while(e>1)}(r)}(e,r,n,a);let h=e;for(;e.prev!==e.next;){let l=e.prev,u=e.next;if(a?function(t,e,i,s){let r=t.prev,n=t.next;if(ok(r,t,n)>=0)return!1;let a=r.x,o=t.x,h=n.x,l=r.y,u=t.y,c=n.y,d=Math.min(a,o,h),p=Math.min(l,u,c),m=Math.max(a,o,h),y=Math.max(l,u,c),f=oz(d,p,e,i,s),g=oz(m,y,e,i,s),x=t.prevZ,b=t.nextZ;for(;x&&x.z>=f&&b&&b.z<=g;){if(x.x>=d&&x.x<=m&&x.y>=p&&x.y<=y&&x!==r&&x!==n&&oC(a,l,o,u,h,c,x.x,x.y)&&ok(x.prev,x,x.next)>=0||(x=x.prevZ,b.x>=d&&b.x<=m&&b.y>=p&&b.y<=y&&b!==r&&b!==n&&oC(a,l,o,u,h,c,b.x,b.y)&&ok(b.prev,b,b.next)>=0))return!1;b=b.nextZ}for(;x&&x.z>=f;){if(x.x>=d&&x.x<=m&&x.y>=p&&x.y<=y&&x!==r&&x!==n&&oC(a,l,o,u,h,c,x.x,x.y)&&ok(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;b&&b.z<=g;){if(b.x>=d&&b.x<=m&&b.y>=p&&b.y<=y&&b!==r&&b!==n&&oC(a,l,o,u,h,c,b.x,b.y)&&ok(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}(e,r,n,a):function(t){let e=t.prev,i=t.next;if(ok(e,t,i)>=0)return!1;let s=e.x,r=t.x,n=i.x,a=e.y,o=t.y,h=i.y,l=Math.min(s,r,n),u=Math.min(a,o,h),c=Math.max(s,r,n),d=Math.max(a,o,h),p=i.next;for(;p!==e;){if(p.x>=l&&p.x<=c&&p.y>=u&&p.y<=d&&oC(s,a,r,o,n,h,p.x,p.y)&&ok(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}(e)){i.push(l.i,e.i,u.i),oV(e),e=u.next,h=u.next;continue}if((e=u)===h){o?1===o?t(e=function(t,e){let i=t;do{let s=i.prev,r=i.next.next;!oB(s,r)&&oR(s,i,i.next,r)&&oO(s,r)&&oO(r,s)&&(e.push(s.i,i.i,r.i),oV(i),oV(i.next),i=t=r),i=i.next}while(i!==t);return oA(i)}(oA(e),i),i,s,r,n,a,2):2===o&&function(e,i,s,r,n,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){var h,l;if(o.i!==e.i&&(h=o,l=e,h.next.i!==l.i&&h.prev.i!==l.i&&!function(t,e){let i=t;do{if(i.i!==t.i&&i.next.i!==t.i&&i.i!==e.i&&i.next.i!==e.i&&oR(i,i.next,t,e))return!0;i=i.next}while(i!==t);return!1}(h,l)&&(oO(h,l)&&oO(l,h)&&function(t,e){let i=t,s=!1,r=(t.x+e.x)/2,n=(t.y+e.y)/2;do i.y>n!=i.next.y>n&&i.next.y!==i.y&&r<(i.next.x-i.x)*(n-i.y)/(i.next.y-i.y)+i.x&&(s=!s),i=i.next;while(i!==t);return s}(h,l)&&(ok(h.prev,h,l.prev)||ok(h,l.prev,l))||oB(h,l)&&ok(h.prev,h,h.next)>0&&ok(l.prev,l,l.next)>0))){let h=oN(o,e);o=oA(o,o.next),h=oA(h,h.next),t(o,i,s,r,n,a,0),t(h,i,s,r,n,a,0);return}e=e.next}o=o.next}while(o!==e)}(e,i,s,r,n,a):t(oA(e),i,s,r,n,a,1);break}}}(h,l,i,s,r,n,0),l}(t,e,i)}}class oU{static area(t){let e=t.length,i=0;for(let s=e-1,r=0;roU.area(t)}static triangulateShape(t,e){let i=[],s=[],r=[];oW(t),oD(i,t);let n=t.length;e.forEach(oW);for(let t=0;t2&&t[e-1].equals(t[0])&&t.pop()}function oD(t,e){for(let i=0;iNumber.EPSILON){let c=Math.sqrt(u),d=Math.sqrt(h*h+l*l),p=e.x-o/c,m=e.y+a/c,y=((i.x-l/d-p)*l-(i.y+h/d-m)*h)/(a*l-o*h),f=(s=p+a*y-t.x)*s+(r=m+o*y-t.y)*r;if(f<=2)return new ij(s,r);n=Math.sqrt(f/2)}else{let t=!1;a>Number.EPSILON?h>Number.EPSILON&&(t=!0):a<-Number.EPSILON?h<-Number.EPSILON&&(t=!0):Math.sign(o)===Math.sign(l)&&(t=!0),t?(s=-o,r=a,n=Math.sqrt(u)):(s=a,r=o,n=Math.sqrt(u/2))}return new ij(s/n,r/n)}let B=[];for(let t=0,e=z.length,i=e-1,s=t+1;t=0;t--){let e=t/g,i=m*Math.cos(e*Math.PI/2),s=y*Math.sin(e*Math.PI/2)+f;for(let t=0,e=z.length;t=0;){let n=r,a=r-1;a<0&&(a=t.length-1);for(let t=0,r=c+2*g;t0)&&d.push(e,r,h),(t!==i-1||o0!=t>0&&this.version++,this._anisotropy=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get iridescence(){return this._iridescence}set iridescence(t){this._iridescence>0!=t>0&&this.version++,this._iridescence=t}get dispersion(){return this._dispersion}set dispersion(t){this._dispersion>0!=t>0&&this.version++,this._dispersion=t}get sheen(){return this._sheen}set sheen(t){this._sheen>0!=t>0&&this.version++,this._sheen=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=t.anisotropy,this.anisotropyRotation=t.anisotropyRotation,this.anisotropyMap=t.anisotropyMap,this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.dispersion=t.dispersion,this.ior=t.ior,this.iridescence=t.iridescence,this.iridescenceMap=t.iridescenceMap,this.iridescenceIOR=t.iridescenceIOR,this.iridescenceThicknessRange=[...t.iridescenceThicknessRange],this.iridescenceThicknessMap=t.iridescenceThicknessMap,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}}class o7 extends rS{constructor(t){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new rv(0xffffff),this.specular=new rv(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=eq,this.normalScale=new ij(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sZ,this.combine=ti,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ht extends rS{constructor(t){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new rv(0xffffff),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=eq,this.normalScale=new ij(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}class he extends rS{constructor(t){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=eq,this.normalScale=new ij(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}}class hi extends rS{constructor(t){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new rv(0xffffff),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new rv(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=eq,this.normalScale=new ij(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new sZ,this.combine=ti,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this.fog=t.fog,this}}class hs extends rS{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=eU,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class hr extends rS{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}class hn extends rS{constructor(t){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new rv(0xffffff),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=eq,this.normalScale=new ij(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this.fog=t.fog,this}}class ha extends a_{constructor(t){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}}function ho(t,e){return t&&t.constructor!==e?"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t):t}function hh(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function hl(t){let e=t.length,i=Array(e);for(let t=0;t!==e;++t)i[t]=t;return i.sort(function(e,i){return t[e]-t[i]}),i}function hu(t,e,i){let s=t.length,r=new t.constructor(s);for(let n=0,a=0;a!==s;++n){let s=i[n]*e;for(let i=0;i!==e;++i)r[a++]=t[s+i]}return r}function hc(t,e,i,s){let r=1,n=t[0];for(;void 0!==n&&void 0===n[s];)n=t[r++];if(void 0===n)return;let a=n[s];if(void 0!==a)if(Array.isArray(a))do void 0!==(a=n[s])&&(e.push(n.time),i.push(...a)),n=t[r++];while(void 0!==n);else if(void 0!==a.toArray)do void 0!==(a=n[s])&&(e.push(n.time),a.toArray(i,i.length)),n=t[r++];while(void 0!==n);else do void 0!==(a=n[s])&&(e.push(n.time),i.push(a)),n=t[r++];while(void 0!==n)}class hd{static convertArray(t,e){return ho(t,e)}static isTypedArray(t){return hh(t)}static getKeyframeOrder(t){return hl(t)}static sortedArray(t,e,i){return hu(t,e,i)}static flattenJSON(t,e,i,s){hc(t,e,i,s)}static subclip(t,e,i,s,r=30){return function(t,e,i,s,r=30){let n=t.clone();n.name=e;let a=[];for(let t=0;t=s)){h.push(e.times[t]);for(let i=0;in.tracks[t].times[0]&&(o=n.tracks[t].times[0]);for(let t=0;t=r.times[d]){let t=d*l+h,e=t+l-h;s=r.values.slice(t,e)}else{let t=r.createInterpolant(),e=h,i=l-h;t.evaluate(n),s=t.resultBuffer.slice(e,i)}"quaternion"===a&&new so().fromArray(s).normalize().conjugate().toArray(s);let p=o.times.length;for(let t=0;t=r)){let a=e[1];t=(r=e[--i-1]))break e}n=i,i=0;break i}break t}for(;i>>1;te;)--n;if(++n,0!==r||n!==s){r>=n&&(r=(n=Math.max(n,1))-1);let t=this.getValueSize();this.times=i.slice(r,n),this.values=this.values.slice(r*t,n*t)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let i=this.times,s=this.values,r=i.length;0===r&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let n=null;for(let e=0;e!==r;e++){let s=i[e];if("number"==typeof s&&isNaN(s)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,s),t=!1;break}if(null!==n&&n>s){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,s,n),t=!1;break}n=s}if(void 0!==s&&hh(s))for(let e=0,i=s.length;e!==i;++e){let i=s[e];if(isNaN(i)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,i),t=!1;break}}return t}optimize(){let t=this.times.slice(),e=this.values.slice(),i=this.getValueSize(),s=this.getInterpolation()===eR,r=t.length-1,n=1;for(let a=1;a0){t[n]=t[r];for(let t=r*i,s=n*i,a=0;a!==i;++a)e[s+a]=e[t+a];++n}return n!==t.length?(this.times=t.slice(0,n),this.values=e.slice(0,n*i)):(this.times=t,this.values=e),this}clone(){let t=this.times.slice(),e=this.values.slice(),i=new this.constructor(this.name,t,e);return i.createInterpolant=this.createInterpolant,i}}hg.prototype.ValueTypeName="",hg.prototype.TimeBufferType=Float32Array,hg.prototype.ValueBufferType=Float32Array,hg.prototype.DefaultInterpolation=eB;class hx extends hg{constructor(t,e,i){super(t,e,i)}}hx.prototype.ValueTypeName="bool",hx.prototype.ValueBufferType=Array,hx.prototype.DefaultInterpolation=ek,hx.prototype.InterpolantFactoryMethodLinear=void 0,hx.prototype.InterpolantFactoryMethodSmooth=void 0;class hb extends hg{constructor(t,e,i,s){super(t,e,i,s)}}hb.prototype.ValueTypeName="color";class hv extends hg{constructor(t,e,i,s){super(t,e,i,s)}}hv.prototype.ValueTypeName="number";class hw extends hp{constructor(t,e,i,s){super(t,e,i,s)}interpolate_(t,e,i,s){let r=this.resultBuffer,n=this.sampleValues,a=this.valueSize,o=(i-e)/(s-e),h=t*a;for(let t=h+a;h!==t;h+=4)so.slerpFlat(r,0,n,h-a,n,h,o);return r}}class hM extends hg{constructor(t,e,i,s){super(t,e,i,s)}InterpolantFactoryMethodLinear(t){return new hw(this.times,this.values,this.getValueSize(),t)}}hM.prototype.ValueTypeName="quaternion",hM.prototype.InterpolantFactoryMethodSmooth=void 0;class hS extends hg{constructor(t,e,i){super(t,e,i)}}hS.prototype.ValueTypeName="string",hS.prototype.ValueBufferType=Array,hS.prototype.DefaultInterpolation=ek,hS.prototype.InterpolantFactoryMethodLinear=void 0,hS.prototype.InterpolantFactoryMethodSmooth=void 0;class h_ extends hg{constructor(t,e,i,s){super(t,e,i,s)}}h_.prototype.ValueTypeName="vector";class hA{constructor(t="",e=-1,i=[],s=eN){this.name=t,this.tracks=i,this.duration=e,this.blendMode=s,this.uuid=iE(),this.duration<0&&this.resetDuration()}static parse(t){let e=[],i=t.tracks,s=1/(t.fps||1);for(let t=0,r=i.length;t!==r;++t)e.push((function(t){if(void 0===t.type)throw Error("THREE.KeyframeTrack: track type undefined, can not parse");let e=function(t){switch(t.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return hv;case"vector":case"vector2":case"vector3":case"vector4":return h_;case"color":return hb;case"quaternion":return hM;case"bool":case"boolean":return hx;case"string":return hS}throw Error("THREE.KeyframeTrack: Unsupported typeName: "+t)}(t.type);if(void 0===t.times){let e=[],i=[];hc(t.keys,e,i,"value"),t.times=e,t.values=i}return void 0!==e.parse?e.parse(t):new e(t.name,t.times,t.values,t.interpolation)})(i[t]).scale(s));let r=new this(t.name,t.duration,e,t.blendMode);return r.uuid=t.uuid,r}static toJSON(t){let e=[],i=t.tracks,s={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let t=0,s=i.length;t!==s;++t)e.push(hg.toJSON(i[t]));return s}static CreateFromMorphTargetSequence(t,e,i,s){let r=e.length,n=[];for(let t=0;t1){let t=n[1],e=s[t];e||(s[t]=e=[]),e.push(i)}}let n=[];for(let t in s)n.push(this.CreateFromMorphTargetSequence(t,s[t],e,i));return n}static parseAnimation(t,e){if(console.warn("THREE.AnimationClip: parseAnimation() is deprecated and will be removed with r185"),!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let i=function(t,e,i,s,r){if(0!==i.length){let n=[],a=[];hc(i,n,a,s),0!==n.length&&r.push(new t(e,n,a))}},s=[],r=t.name||"default",n=t.fps||30,a=t.blendMode,o=t.length||-1,h=t.hierarchy||[];for(let t=0;t{e&&e(r),this.manager.itemEnd(t)},0),r;if(void 0!==hk[t])return void hk[t].push({onLoad:e,onProgress:i,onError:s});hk[t]=[],hk[t].push({onLoad:e,onProgress:i,onError:s});let n=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,o=this.responseType;fetch(n).then(e=>{if(200===e.status||0===e.status){if(0===e.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===e.body||void 0===e.body.getReader)return e;let i=hk[t],s=e.body.getReader(),r=e.headers.get("X-File-Size")||e.headers.get("Content-Length"),n=r?parseInt(r):0,a=0!==n,o=0;return new Response(new ReadableStream({start(t){!function e(){s.read().then(({done:s,value:r})=>{if(s)t.close();else{let s=new ProgressEvent("progress",{lengthComputable:a,loaded:o+=r.byteLength,total:n});for(let t=0,e=i.length;t{t.error(e)})}()}}))}throw new hB(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`,e)}).then(t=>{switch(o){case"arraybuffer":return t.arrayBuffer();case"blob":return t.blob();case"document":return t.text().then(t=>new DOMParser().parseFromString(t,a));case"json":return t.json();default:if(""===a)return t.text();{let e=/charset="?([^;"\s]*)"?/i.exec(a),i=new TextDecoder(e&&e[1]?e[1].toLowerCase():void 0);return t.arrayBuffer().then(t=>i.decode(t))}}}).then(e=>{hT.add(t,e);let i=hk[t];delete hk[t];for(let t=0,s=i.length;t{let i=hk[t];if(void 0===i)throw this.manager.itemError(t),e;delete hk[t];for(let t=0,s=i.length;t{this.manager.itemEnd(t)}),this.manager.itemStart(t)}setResponseType(t){return this.responseType=t,this}setMimeType(t){return this.mimeType=t,this}}class hE extends hC{constructor(t){super(t)}load(t,e,i,s){let r=this,n=new hR(this.manager);n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(t,function(i){try{e(r.parse(JSON.parse(i)))}catch(e){s?s(e):console.error(e),r.manager.itemError(t)}},i,s)}parse(t){let e=[];for(let i=0;i0:s.vertexColors=t.vertexColors),void 0!==t.uniforms)for(let e in t.uniforms){let r=t.uniforms[e];switch(s.uniforms[e]={},r.type){case"t":s.uniforms[e].value=i(r.value);break;case"c":s.uniforms[e].value=new rv().setHex(r.value);break;case"v2":s.uniforms[e].value=new ij().fromArray(r.value);break;case"v3":s.uniforms[e].value=new sh().fromArray(r.value);break;case"v4":s.uniforms[e].value=new st().fromArray(r.value);break;case"m3":s.uniforms[e].value=new iU().fromArray(r.value);break;case"m4":s.uniforms[e].value=new sV().fromArray(r.value);break;default:s.uniforms[e].value=r.value}}if(void 0!==t.defines&&(s.defines=t.defines),void 0!==t.vertexShader&&(s.vertexShader=t.vertexShader),void 0!==t.fragmentShader&&(s.fragmentShader=t.fragmentShader),void 0!==t.glslVersion&&(s.glslVersion=t.glslVersion),void 0!==t.extensions)for(let e in t.extensions)s.extensions[e]=t.extensions[e];if(void 0!==t.lights&&(s.lights=t.lights),void 0!==t.clipping&&(s.clipping=t.clipping),void 0!==t.size&&(s.size=t.size),void 0!==t.sizeAttenuation&&(s.sizeAttenuation=t.sizeAttenuation),void 0!==t.map&&(s.map=i(t.map)),void 0!==t.matcap&&(s.matcap=i(t.matcap)),void 0!==t.alphaMap&&(s.alphaMap=i(t.alphaMap)),void 0!==t.bumpMap&&(s.bumpMap=i(t.bumpMap)),void 0!==t.bumpScale&&(s.bumpScale=t.bumpScale),void 0!==t.normalMap&&(s.normalMap=i(t.normalMap)),void 0!==t.normalMapType&&(s.normalMapType=t.normalMapType),void 0!==t.normalScale){let e=t.normalScale;!1===Array.isArray(e)&&(e=[e,e]),s.normalScale=new ij().fromArray(e)}return void 0!==t.displacementMap&&(s.displacementMap=i(t.displacementMap)),void 0!==t.displacementScale&&(s.displacementScale=t.displacementScale),void 0!==t.displacementBias&&(s.displacementBias=t.displacementBias),void 0!==t.roughnessMap&&(s.roughnessMap=i(t.roughnessMap)),void 0!==t.metalnessMap&&(s.metalnessMap=i(t.metalnessMap)),void 0!==t.emissiveMap&&(s.emissiveMap=i(t.emissiveMap)),void 0!==t.emissiveIntensity&&(s.emissiveIntensity=t.emissiveIntensity),void 0!==t.specularMap&&(s.specularMap=i(t.specularMap)),void 0!==t.specularIntensityMap&&(s.specularIntensityMap=i(t.specularIntensityMap)),void 0!==t.specularColorMap&&(s.specularColorMap=i(t.specularColorMap)),void 0!==t.envMap&&(s.envMap=i(t.envMap)),void 0!==t.envMapRotation&&s.envMapRotation.fromArray(t.envMapRotation),void 0!==t.envMapIntensity&&(s.envMapIntensity=t.envMapIntensity),void 0!==t.reflectivity&&(s.reflectivity=t.reflectivity),void 0!==t.refractionRatio&&(s.refractionRatio=t.refractionRatio),void 0!==t.lightMap&&(s.lightMap=i(t.lightMap)),void 0!==t.lightMapIntensity&&(s.lightMapIntensity=t.lightMapIntensity),void 0!==t.aoMap&&(s.aoMap=i(t.aoMap)),void 0!==t.aoMapIntensity&&(s.aoMapIntensity=t.aoMapIntensity),void 0!==t.gradientMap&&(s.gradientMap=i(t.gradientMap)),void 0!==t.clearcoatMap&&(s.clearcoatMap=i(t.clearcoatMap)),void 0!==t.clearcoatRoughnessMap&&(s.clearcoatRoughnessMap=i(t.clearcoatRoughnessMap)),void 0!==t.clearcoatNormalMap&&(s.clearcoatNormalMap=i(t.clearcoatNormalMap)),void 0!==t.clearcoatNormalScale&&(s.clearcoatNormalScale=new ij().fromArray(t.clearcoatNormalScale)),void 0!==t.iridescenceMap&&(s.iridescenceMap=i(t.iridescenceMap)),void 0!==t.iridescenceThicknessMap&&(s.iridescenceThicknessMap=i(t.iridescenceThicknessMap)),void 0!==t.transmissionMap&&(s.transmissionMap=i(t.transmissionMap)),void 0!==t.thicknessMap&&(s.thicknessMap=i(t.thicknessMap)),void 0!==t.anisotropyMap&&(s.anisotropyMap=i(t.anisotropyMap)),void 0!==t.sheenColorMap&&(s.sheenColorMap=i(t.sheenColorMap)),void 0!==t.sheenRoughnessMap&&(s.sheenRoughnessMap=i(t.sheenRoughnessMap)),s}setTextures(t){return this.textures=t,this}createMaterialFromType(t){return h4.createMaterialFromType(t)}static createMaterialFromType(t){return new({ShadowMaterial:o4,SpriteMaterial:nM,RawShaderMaterial:o6,ShaderMaterial:nr,PointsMaterial:aV,MeshPhysicalMaterial:o9,MeshStandardMaterial:o8,MeshPhongMaterial:o7,MeshToonMaterial:ht,MeshNormalMaterial:he,MeshLambertMaterial:hi,MeshDepthMaterial:hs,MeshDistanceMaterial:hr,MeshBasicMaterial:r_,MeshMatcapMaterial:hn,LineDashedMaterial:ha,LineBasicMaterial:a_,Material:rS})[t]}}class h6{static extractUrlBase(t){let e=t.lastIndexOf("/");return -1===e?"./":t.slice(0,e+1)}static resolveURL(t,e){return"string"!=typeof t||""===t?"":(/^https?:\/\//i.test(e)&&/^\//.test(t)&&(e=e.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(t)||/^data:.*,.*$/i.test(t)||/^blob:.*$/i.test(t))?t:e+t}}class h8 extends rY{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(t){return super.copy(t),this.instanceCount=t.instanceCount,this}toJSON(){let t=super.toJSON();return t.instanceCount=this.instanceCount,t.isInstancedBufferGeometry=!0,t}}class h9 extends hC{constructor(t){super(t)}load(t,e,i,s){let r=this,n=new hR(r.manager);n.setPath(r.path),n.setRequestHeader(r.requestHeader),n.setWithCredentials(r.withCredentials),n.load(t,function(i){try{e(r.parse(JSON.parse(i)))}catch(e){s?s(e):console.error(e),r.manager.itemError(t)}},i,s)}parse(t){let e={},i={};function s(t,s){if(void 0!==e[s])return e[s];let r=t.interleavedBuffers[s],n=function(t,e){if(void 0!==i[e])return i[e];let s=new Uint32Array(t.arrayBuffers[e]).buffer;return i[e]=s,s}(t,r.buffer),a=new nb(iq(r.type,n),r.stride);return a.uuid=r.uuid,e[s]=a,a}let r=t.isInstancedBufferGeometry?new h8:new rY,n=t.data.index;if(void 0!==n){let t=iq(n.type,n.array);r.setIndex(new rR(t,1))}let a=t.data.attributes;for(let e in a){let i,n=a[e];if(n.isInterleavedBufferAttribute)i=new nw(s(t.data,n.data),n.itemSize,n.offset,n.normalized);else{let t=iq(n.type,n.array);i=new(n.isInstancedBufferAttribute?n1:rR)(t,n.itemSize,n.normalized)}void 0!==n.name&&(i.name=n.name),void 0!==n.usage&&i.setUsage(n.usage),r.setAttribute(e,i)}let o=t.data.morphAttributes;if(o)for(let e in o){let i=o[e],n=[];for(let e=0,r=i.length;e0){(i=new hO(new hz(e))).setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e0){(e=new hO(this.manager)).setCrossOrigin(this.crossOrigin);for(let e=0,i=t.length;e{let e=new sc;e.min.fromArray(t.boxMin),e.max.fromArray(t.boxMax);let i=new sC;return i.radius=t.sphereRadius,i.center.fromArray(t.sphereCenter),{boxInitialized:t.boxInitialized,box:e,sphereInitialized:t.sphereInitialized,sphere:i}}),n._maxInstanceCount=t.maxInstanceCount,n._maxVertexCount=t.maxVertexCount,n._maxIndexCount=t.maxIndexCount,n._geometryInitialized=t.geometryInitialized,n._geometryCount=t.geometryCount,n._matricesTexture=u(t.matricesTexture.uuid),void 0!==t.colorsTexture&&(n._colorsTexture=u(t.colorsTexture.uuid));break;case"LOD":n=new nL;break;case"Line":n=new aR(h(t.geometry),l(t.material));break;case"LineLoop":n=new aF(h(t.geometry),l(t.material));break;case"LineSegments":n=new aN(h(t.geometry),l(t.material));break;case"PointCloud":case"Points":n=new aD(h(t.geometry),l(t.material));break;case"Sprite":n=new nO(l(t.material));break;case"Group":n=new np;break;case"Bone":n=new nG;break;default:n=new re}if(n.uuid=t.uuid,void 0!==t.name&&(n.name=t.name),void 0!==t.matrix?(n.matrix.fromArray(t.matrix),void 0!==t.matrixAutoUpdate&&(n.matrixAutoUpdate=t.matrixAutoUpdate),n.matrixAutoUpdate&&n.matrix.decompose(n.position,n.quaternion,n.scale)):(void 0!==t.position&&n.position.fromArray(t.position),void 0!==t.rotation&&n.rotation.fromArray(t.rotation),void 0!==t.quaternion&&n.quaternion.fromArray(t.quaternion),void 0!==t.scale&&n.scale.fromArray(t.scale)),void 0!==t.up&&n.up.fromArray(t.up),void 0!==t.castShadow&&(n.castShadow=t.castShadow),void 0!==t.receiveShadow&&(n.receiveShadow=t.receiveShadow),t.shadow&&(void 0!==t.shadow.intensity&&(n.shadow.intensity=t.shadow.intensity),void 0!==t.shadow.bias&&(n.shadow.bias=t.shadow.bias),void 0!==t.shadow.normalBias&&(n.shadow.normalBias=t.shadow.normalBias),void 0!==t.shadow.radius&&(n.shadow.radius=t.shadow.radius),void 0!==t.shadow.mapSize&&n.shadow.mapSize.fromArray(t.shadow.mapSize),void 0!==t.shadow.camera&&(n.shadow.camera=this.parseObject(t.shadow.camera))),void 0!==t.visible&&(n.visible=t.visible),void 0!==t.frustumCulled&&(n.frustumCulled=t.frustumCulled),void 0!==t.renderOrder&&(n.renderOrder=t.renderOrder),void 0!==t.userData&&(n.userData=t.userData),void 0!==t.layers&&(n.layers.mask=t.layers),void 0!==t.children){let a=t.children;for(let t=0;t{e&&e(i),r.manager.itemEnd(t)}).catch(t=>{s&&s(t)}):(setTimeout(function(){e&&e(n),r.manager.itemEnd(t)},0),n);let a={};a.credentials="anonymous"===this.crossOrigin?"same-origin":"include",a.headers=this.requestHeader;let o=fetch(t,a).then(function(t){return t.blob()}).then(function(t){return createImageBitmap(t,Object.assign(r.options,{colorSpaceConversion:"none"}))}).then(function(i){return hT.add(t,i),e&&e(i),r.manager.itemEnd(t),i}).catch(function(e){s&&s(e),hT.remove(t),r.manager.itemError(t),r.manager.itemEnd(t)});hT.add(t,o),r.manager.itemStart(t)}}class lr{static getContext(){return void 0===n&&(n=new(window.AudioContext||window.webkitAudioContext)),n}static setContext(t){n=t}}class ln extends hC{constructor(t){super(t)}load(t,e,i,s){let r=this,n=new hR(this.manager);function a(e){s?s(e):console.error(e),r.manager.itemError(t)}n.setResponseType("arraybuffer"),n.setPath(this.path),n.setRequestHeader(this.requestHeader),n.setWithCredentials(this.withCredentials),n.load(t,function(t){try{let i=t.slice(0);lr.getContext().decodeAudioData(i,function(t){e(t)}).catch(a)}catch(t){a(t)}},i,s)}}let la=new sV,lo=new sV,lh=new sV;class ll{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new nl,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new nl,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){let e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){let i,s;e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep,lh.copy(t.projectionMatrix);let r=e.eyeSep/2,n=r*e.near/e.focus,a=e.near*Math.tan(iB*e.fov*.5)/e.zoom;lo.elements[12]=-r,la.elements[12]=r,i=-a*e.aspect+n,s=a*e.aspect+n,lh.elements[0]=2*e.near/(s-i),lh.elements[8]=(s+i)/(s-i),this.cameraL.projectionMatrix.copy(lh),i=-a*e.aspect-n,s=a*e.aspect-n,lh.elements[0]=2*e.near/(s-i),lh.elements[8]=(s+i)/(s-i),this.cameraR.projectionMatrix.copy(lh)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(lo),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(la)}}class lu extends nl{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t,this.index=0}}class lc{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=ld(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let e=ld();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}}function ld(){return performance.now()}let lp=new sh,lm=new so,ly=new sh,lf=new sh;class lg extends re{constructor(){super(),this.type="AudioListener",this.context=lr.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new lc}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);let e=this.context.listener,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(lp,lm,ly),lf.set(0,0,-1).applyQuaternion(lm),e.positionX){let t=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(lp.x,t),e.positionY.linearRampToValueAtTime(lp.y,t),e.positionZ.linearRampToValueAtTime(lp.z,t),e.forwardX.linearRampToValueAtTime(lf.x,t),e.forwardY.linearRampToValueAtTime(lf.y,t),e.forwardZ.linearRampToValueAtTime(lf.z,t),e.upX.linearRampToValueAtTime(i.x,t),e.upY.linearRampToValueAtTime(i.y,t),e.upZ.linearRampToValueAtTime(i.z,t)}else e.setPosition(lp.x,lp.y,lp.z),e.setOrientation(lf.x,lf.y,lf.z,i.x,i.y,i.z)}}class lx extends re{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+t;let e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this)}stop(t=0){return!1===this.hasPlaybackControl?void console.warn("THREE.Audio: this Audio has no playback control."):(this._progress=0,null!==this.source&&(this.source.stop(this.context.currentTime+t),this.source.onended=null),this.isPlaying=!1,this)}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(i,s,this._addIndex*e,1,e);for(let t=e,r=e+e;t!==r;++t)if(i[t]!==i[t+e]){a.setValue(i,s);break}}saveOriginalState(){let t=this.binding,e=this.buffer,i=this.valueSize,s=i*this._origIndex;t.getValue(e,s);for(let t=i;t!==s;++t)e[t]=e[s+t%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let t=3*this.valueSize;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let i=t;i=.5)for(let s=0;s!==r;++s)t[e+s]=t[i+s]}_slerp(t,e,i,s){so.slerpFlat(t,e,t,e,t,i,s)}_slerpAdditive(t,e,i,s,r){let n=this._workIndex*r;so.multiplyQuaternionsFlat(t,n,t,e,t,i),so.slerpFlat(t,e,t,e,t,n,s)}_lerp(t,e,i,s,r){let n=1-s;for(let a=0;a!==r;++a){let r=e+a;t[r]=t[r]*n+t[i+a]*s}}_lerpAdditive(t,e,i,s,r){for(let n=0;n!==r;++n){let r=e+n;t[r]=t[r]+t[i+n]*s}}}let lT="\\[\\]\\.:\\/",lz=RegExp("["+lT+"]","g"),lI="[^"+lT+"]",lC="[^"+lT.replace("\\.","")+"]",lk=/((?:WC+[\/:])*)/.source.replace("WC",lI),lB=/(WCOD+)?/.source.replace("WCOD",lC),lR=RegExp("^"+lk+lB+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",lI)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",lI)+"$"),lE=["material","materials","bones","map"];class lP{constructor(t,e,i){let s=i||lO.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,s)}getValue(t,e){this.bind();let i=this._targetGroup.nCachedObjects_,s=this._bindings[i];void 0!==s&&s.getValue(t,e)}setValue(t,e){let i=this._bindings;for(let s=this._targetGroup.nCachedObjects_,r=i.length;s!==r;++s)i[s].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,i=t.length;e!==i;++e)t[e].unbind()}}class lO{constructor(t,e,i){this.path=e,this.parsedPath=i||lO.parseTrackName(e),this.node=lO.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,i){return t&&t.isAnimationObjectGroup?new lO.Composite(t,e,i):new lO(t,e,i)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(lz,"")}static parseTrackName(t){let e=lR.exec(t);if(null===e)throw Error("PropertyBinding: Cannot parse trackName: "+t);let i={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},s=i.nodeName&&i.nodeName.lastIndexOf(".");if(void 0!==s&&-1!==s){let t=i.nodeName.substring(s+1);-1!==lE.indexOf(t)&&(i.nodeName=i.nodeName.substring(0,s),i.objectName=t)}if(null===i.propertyName||0===i.propertyName.length)throw Error("PropertyBinding: can not parse propertyName from trackName: "+t);return i}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){let i=t.skeleton.getBoneByName(e);if(void 0!==i)return i}if(t.children){let i=function(t){for(let s=0;s=r){let n=r++,l=t[n];e[l.uuid]=h,t[h]=l,e[o]=n,t[n]=a;for(let t=0;t!==s;++t){let e=i[t],s=e[n],r=e[h];e[h]=s,e[n]=r}}}this.nCachedObjects_=r}uncache(){let t=this._objects,e=this._indicesByUUID,i=this._bindings,s=i.length,r=this.nCachedObjects_,n=t.length;for(let a=0,o=arguments.length;a!==o;++a){let o=arguments[a],h=o.uuid,l=e[h];if(void 0!==l)if(delete e[h],l0&&(e[a.uuid]=l),t[l]=a,t.pop();for(let t=0;t!==s;++t){let e=i[t];e[l]=e[r],e.pop()}}}this.nCachedObjects_=r}subscribe_(t,e){let i=this._bindingsIndicesByPath,s=i[t],r=this._bindings;if(void 0!==s)return r[s];let n=this._paths,a=this._parsedPaths,o=this._objects,h=o.length,l=this.nCachedObjects_,u=Array(h);s=r.length,i[t]=s,n.push(t),a.push(e),r.push(u);for(let i=l,s=o.length;i!==s;++i){let s=o[i];u[i]=new lO(s,t,e)}return u}unsubscribe_(t){let e=this._bindingsIndicesByPath,i=e[t];if(void 0!==i){let s=this._paths,r=this._parsedPaths,n=this._bindings,a=n.length-1,o=n[a];e[t[a]]=i,n[i]=o,n.pop(),r[i]=r[a],r.pop(),s[i]=s[a],s.pop()}}}class lF{constructor(t,e,i=null,s=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=i,this.blendMode=s;let r=e.tracks,n=r.length,a=Array(n),o={endingStart:eE,endingEnd:eE};for(let t=0;t!==n;++t){let e=r[t].createInterpolant(null);a[t]=e,e.settings=o}this._interpolantSettings=o,this._interpolants=a,this._propertyBindings=Array(n),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=eI,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,i=!1){if(t.fadeOut(e),this.fadeIn(e),!0===i){let i=this._clip.duration,s=t._clip.duration;t.warp(1,s/i,e),this.warp(i/s,1,e)}return this}crossFadeTo(t,e,i=!1){return t.crossFadeFrom(this,e,i)}stopFading(){let t=this._weightInterpolant;return null!==t&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,i){let s=this._mixer,r=s.time,n=this.timeScale,a=this._timeScaleInterpolant;null===a&&(a=s._lendControlInterpolant(),this._timeScaleInterpolant=a);let o=a.parameterPositions,h=a.sampleValues;return o[0]=r,o[1]=r+i,h[0]=t/n,h[1]=e/n,this}stopWarping(){let t=this._timeScaleInterpolant;return null!==t&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,i,s){if(!this.enabled)return void this._updateWeight(t);let r=this._startTime;if(null!==r){let s=(t-r)*i;s<0||0===i?e=0:(this._startTime=null,e=i*s)}e*=this._updateTimeScale(t);let n=this._updateTime(e),a=this._updateWeight(t);if(a>0){let t=this._interpolants,e=this._propertyBindings;if(this.blendMode===eF)for(let i=0,s=t.length;i!==s;++i)t[i].evaluate(n),e[i].accumulateAdditive(a);else for(let i=0,r=t.length;i!==r;++i)t[i].evaluate(n),e[i].accumulate(s,a)}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;let i=this._weightInterpolant;if(null!==i){let s=i.evaluate(t)[0];e*=s,t>i.parameterPositions[1]&&(this.stopFading(),0===s&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;let i=this._timeScaleInterpolant;null!==i&&(e*=i.evaluate(t)[0],t>i.parameterPositions[1]&&(this.stopWarping(),0===e?this.paused=!0:this.timeScale=e))}return this._effectiveTimeScale=e,e}_updateTime(t){let e=this._clip.duration,i=this.loop,s=this.time+t,r=this._loopCount,n=i===eC;if(0===t)return -1===r?s:n&&(1&r)==1?e-s:s;if(i===ez){-1===r&&(this._loopCount=0,this._setEndings(!0,!0,!1));r:{if(s>=e)s=e;else if(s<0)s=0;else{this.time=s;break r}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(-1===r&&(t>=0?(r=0,this._setEndings(!0,0===this.repetitions,n)):this._setEndings(0===this.repetitions,!0,n)),s>=e||s<0){let i=Math.floor(s/e);s-=e*i,r+=Math.abs(i);let a=this.repetitions-r;if(a<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,s=t>0?e:0,this.time=s,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(1===a){let e=t<0;this._setEndings(e,!e,n)}else this._setEndings(!1,!1,n);this._loopCount=r,this.time=s,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:i})}}else this.time=s;if(n&&(1&r)==1)return e-s}return s}_setEndings(t,e,i){let s=this._interpolantSettings;i?(s.endingStart=eP,s.endingEnd=eP):(t?s.endingStart=this.zeroSlopeAtStart?eP:eE:s.endingStart=eO,e?s.endingEnd=this.zeroSlopeAtEnd?eP:eE:s.endingEnd=eO)}_scheduleFading(t,e,i){let s=this._mixer,r=s.time,n=this._weightInterpolant;null===n&&(n=s._lendControlInterpolant(),this._weightInterpolant=n);let a=n.parameterPositions,o=n.sampleValues;return a[0]=r,o[0]=e,a[1]=r+t,o[1]=i,this}}let lV=new Float32Array(1);class lL extends iI{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){let i=t._localRoot||this._root,s=t._clip.tracks,r=s.length,n=t._propertyBindings,a=t._interpolants,o=i.uuid,h=this._bindingsByRootAndName,l=h[o];void 0===l&&(l={},h[o]=l);for(let t=0;t!==r;++t){let r=s[t],h=r.name,u=l[h];if(void 0!==u)++u.referenceCount,n[t]=u;else{if(void 0!==(u=n[t])){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,o,h));continue}let s=e&&e._propertyBindings[t].binding.parsedPath;u=new lA(lO.create(i,h,s),r.ValueTypeName,r.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,o,h),n[t]=u}a[t].resultBuffer=u.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(null===t._cacheIndex){let e=(t._localRoot||this._root).uuid,i=t._clip.uuid,s=this._actionsByClip[i];this._bindAction(t,s&&s.knownActions[0]),this._addInactiveAction(t,i,e)}let e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){let i=e[t];0==i.useCount++&&(this._lendBinding(i),i.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let e=t._propertyBindings;for(let t=0,i=e.length;t!==i;++t){let i=e[t];0==--i.useCount&&(i.restoreOriginalState(),this._takeBackBinding(i))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){let e=t._cacheIndex;return null!==e&&e=0;--i)t[i].stop();return this}update(t){t*=this.timeScale;let e=this._actions,i=this._nActiveActions,s=this.time+=t,r=Math.sign(t),n=this._accuIndex^=1;for(let a=0;a!==i;++a)e[a]._update(s,t,r,n);let a=this._bindings,o=this._nActiveBindings;for(let t=0;t!==o;++t)a[t].apply(n);return this}setTime(t){this.time=0;for(let t=0;t=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,l0).distanceTo(t)}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}let l2=new sh,l3=new sh;class l5{constructor(t=new sh,e=new sh){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){l2.subVectors(t,this.start),l3.subVectors(this.end,this.start);let i=l3.dot(l3),s=l3.dot(l2)/i;return e&&(s=iP(s,0,1)),s}closestPointToPoint(t,e,i){let s=this.closestPointToPointParameter(t,e);return this.delta(i).multiplyScalar(s).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}let l4=new sh;class l6 extends re{constructor(t,e){super(),this.light=t,this.matrixAutoUpdate=!1,this.color=e,this.type="SpotLightHelper";let i=new rY,s=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let t=0,e=1;t<32;t++,e++){let i=t/32*Math.PI*2,r=e/32*Math.PI*2;s.push(Math.cos(i),Math.sin(i),1,Math.cos(r),Math.sin(r),1)}i.setAttribute("position",new rU(s,3));let r=new a_({fog:!1,toneMapped:!1});this.cone=new aN(i,r),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),this.parent?(this.parent.updateWorldMatrix(!0),this.matrix.copy(this.parent.matrixWorld).invert().multiply(this.light.matrixWorld)):this.matrix.copy(this.light.matrixWorld),this.matrixWorld.copy(this.light.matrixWorld);let t=this.light.distance?this.light.distance:1e3,e=t*Math.tan(this.light.angle);this.cone.scale.set(e,e,t),l4.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(l4),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}let l8=new sh,l9=new sV,l7=new sV;class ut extends aN{constructor(t){let e=function t(e){let i=[];!0===e.isBone&&i.push(e);for(let s=0;s1)for(let i=0;i.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{uv.set(t.z,0,-t.x).normalize();let e=Math.acos(t.y);this.quaternion.setFromAxisAngle(uv,e)}}setLength(t,e=.2*t,i=.2*e){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(i,e,i),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class uM extends aN{constructor(t=1){let e=new rY;e.setAttribute("position",new rU([0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],3)),e.setAttribute("color",new rU([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(e,new a_({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(t,e,i){let s=new rv,r=this.geometry.attributes.color.array;return s.set(t),s.toArray(r,0),s.toArray(r,3),s.set(e),s.toArray(r,6),s.toArray(r,9),s.set(i),s.toArray(r,12),s.toArray(r,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class uS{constructor(){this.type="ShapePath",this.color=new rv,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new ou,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,i,s){return this.currentPath.quadraticCurveTo(t,e,i,s),this}bezierCurveTo(t,e,i,s,r,n){return this.currentPath.bezierCurveTo(t,e,i,s,r,n),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t){let e,i,s,r,n,a=oU.isClockWise,o=this.subPaths;if(0===o.length)return[];let h=[];if(1===o.length)return i=o[0],(s=new oS).curves=i.curves,h.push(s),h;let l=!a(o[0].getPoints());l=t?!l:l;let u=[],c=[],d=[],p=0;c[0]=void 0,d[p]=[];for(let s=0,n=o.length;s1){let t=!1,e=0;for(let t=0,e=c.length;tNumber.EPSILON){if(h<0&&(i=e[n],o=-o,a=e[r],h=-h),t.ya.y)continue;if(t.y===i.y){if(t.x===i.x)return!0}else{let e=h*(t.x-i.x)-o*(t.y-i.y);if(0===e)return!0;if(e<0)continue;s=!s}}else{if(t.y!==i.y)continue;if(a.x<=t.x&&t.x<=i.x||i.x<=t.x&&t.x<=a.x)return!0}}return s})(n.p,c[s].p)&&(i!==s&&e++,a?(a=!1,u[s].push(n)):t=!0);a&&u[i].push(n)}}e>0&&!1===t&&(d=u)}for(let t=0,e=c.length;te?(t.repeat.x=1,t.repeat.y=i/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2):(t.repeat.x=e/i,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0),t}static cover(t,e){let i=t.image&&t.image.width?t.image.width/t.image.height:1;return i>e?(t.repeat.x=e/i,t.repeat.y=1,t.offset.x=(1-t.repeat.x)/2,t.offset.y=0):(t.repeat.x=1,t.repeat.y=i/e,t.offset.x=0,t.offset.y=(1-t.repeat.y)/2),t}static fill(t){return t.repeat.x=1,t.repeat.y=1,t.offset.x=0,t.offset.y=0,t}static getByteLength(t,e,i,s){return uA(t,e,i,s)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:h}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=h)}}]); \ No newline at end of file diff --git a/_next/static/chunks/framework-17e4362dfeb1e631.js b/_next/static/chunks/framework-17e4362dfeb1e631.js new file mode 100644 index 0000000000000000000000000000000000000000..340b3eaafaeda7fc08c74dde7df04ca7a5dcc790 --- /dev/null +++ b/_next/static/chunks/framework-17e4362dfeb1e631.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[593],{2167:(e,t,n)=>{var r=n(5364),l=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),h=Symbol.iterator,g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y=Object.assign,v={};function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}function k(){}function w(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},k.prototype=b.prototype;var S=w.prototype=new k;S.constructor=w,y(S,b.prototype),S.isPureReactComponent=!0;var x=Array.isArray,E={H:null,A:null,T:null,S:null,V:null},C=Object.prototype.hasOwnProperty;function _(e,t,n,r,a,o){return{$$typeof:l,type:e,key:t,ref:void 0!==(n=o.ref)?n:null,props:o}}function P(e){return"object"==typeof e&&null!==e&&e.$$typeof===l}var z=/\/+/g;function N(e,t){var n,r;return"object"==typeof e&&null!==e&&null!=e.key?(n=""+e.key,r={"=":"=0",":":"=2"},"$"+n.replace(/[=:]/g,function(e){return r[e]})):t.toString(36)}function T(){}function L(e,t,n){if(null==e)return e;var r=[],o=0;return!function e(t,n,r,o,i){var u,s,c,f=typeof t;("undefined"===f||"boolean"===f)&&(t=null);var d=!1;if(null===t)d=!0;else switch(f){case"bigint":case"string":case"number":d=!0;break;case"object":switch(t.$$typeof){case l:case a:d=!0;break;case m:return e((d=t._init)(t._payload),n,r,o,i)}}if(d)return i=i(t),d=""===o?"."+N(t,0):o,x(i)?(r="",null!=d&&(r=d.replace(z,"$&/")+"/"),e(i,n,r,"",function(e){return e})):null!=i&&(P(i)&&(u=i,s=r+(null==i.key||t&&t.key===i.key?"":(""+i.key).replace(z,"$&/")+"/")+d,i=_(u.type,s,void 0,void 0,void 0,u.props)),n.push(i)),1;d=0;var p=""===o?".":o+":";if(x(t))for(var g=0;g{function n(e,t){var n=e.length;for(e.push(t);0>>1,l=e[r];if(0>>1;ra(u,n))sa(c,u)?(e[r]=c,e[s]=n,r=s):(e[r]=u,e[i]=n,r=i);else if(sa(c,n))e[r]=c,e[s]=n,r=s;else break}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var o,i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,s=u.now();t.unstable_now=function(){return u.now()-s}}var c=[],f=[],d=1,p=null,m=3,h=!1,g=!1,y=!1,v=!1,b="function"==typeof setTimeout?setTimeout:null,k="function"==typeof clearTimeout?clearTimeout:null,w="undefined"!=typeof setImmediate?setImmediate:null;function S(e){for(var t=r(f);null!==t;){if(null===t.callback)l(f);else if(t.startTime<=e)l(f),t.sortIndex=t.expirationTime,n(c,t);else break;t=r(f)}}function x(e){if(y=!1,S(e),!g)if(null!==r(c))g=!0,E||(E=!0,o());else{var t=r(f);null!==t&&O(x,t.startTime-e)}}var E=!1,C=-1,_=5,P=-1;function z(){return!!v||!(t.unstable_now()-P<_)}function N(){if(v=!1,E){var e=t.unstable_now();P=e;var n=!0;try{e:{g=!1,y&&(y=!1,k(C),C=-1),h=!0;var a=m;try{t:{for(S(e),p=r(c);null!==p&&!(p.expirationTime>e&&z());){var i=p.callback;if("function"==typeof i){p.callback=null,m=p.priorityLevel;var u=i(p.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof u){p.callback=u,S(e),n=!0;break t}p===r(c)&&l(c),S(e)}else l(c);p=r(c)}if(null!==p)n=!0;else{var s=r(f);null!==s&&O(x,s.startTime-e),n=!1}}break e}finally{p=null,m=a,h=!1}}}finally{n?o():E=!1}}}if("function"==typeof w)o=function(){w(N)};else if("undefined"!=typeof MessageChannel){var T=new MessageChannel,L=T.port2;T.port1.onmessage=N,o=function(){L.postMessage(null)}}else o=function(){b(N,0)};function O(e,n){C=b(function(){e(t.unstable_now())},n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_forceFrameRate=function(e){0>e||125i?(e.sortIndex=a,n(f,e),null===r(c)&&e===r(f)&&(y?(k(C),C=-1):y=!0,O(x,a-i))):(e.sortIndex=u,n(c,e),g||h||(g=!0,E||(E=!0,o()))),e},t.unstable_shouldYield=z,t.unstable_wrapCallback=function(e){var t=m;return function(){var n=m;m=t;try{return e.apply(this,arguments)}finally{m=n}}}},4232:(e,t,n)=>{e.exports=n(2167)},4279:(e,t,n)=>{var r,l=n(5364),a=n(9752),o=n(4232),i=n(8477);function u(e){var t="https://react.dev/errors/"+e;if(1I||(e.current=M[I],M[I]=null,I--)}function H(e,t){M[++I]=e.current,e.current=t}var $=U(null),V=U(null),B=U(null),Q=U(null);function W(e,t){switch(H(B,t),H(V,e),H($,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?si(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)e=su(t=si(t),e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}j($),H($,e)}function q(){j($),j(V),j(B)}function K(e){null!==e.memoizedState&&H(Q,e);var t=$.current,n=su(t,e.type);t!==n&&(H(V,e),H($,n))}function Y(e){V.current===e&&(j($),j(V)),Q.current===e&&(j(Q),sX._currentValue=F)}var G=Object.prototype.hasOwnProperty,X=a.unstable_scheduleCallback,Z=a.unstable_cancelCallback,J=a.unstable_shouldYield,ee=a.unstable_requestPaint,et=a.unstable_now,en=a.unstable_getCurrentPriorityLevel,er=a.unstable_ImmediatePriority,el=a.unstable_UserBlockingPriority,ea=a.unstable_NormalPriority,eo=a.unstable_LowPriority,ei=a.unstable_IdlePriority,eu=a.log,es=a.unstable_setDisableYieldValue,ec=null,ef=null;function ed(e){if("function"==typeof eu&&es(e),ef&&"function"==typeof ef.setStrictMode)try{ef.setStrictMode(ec,e)}catch(e){}}var ep=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(em(e)/eh|0)|0},em=Math.log,eh=Math.LN2,eg=256,ey=4194304;function ev(e){var t=42&e;if(0!==t)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194048&e;case 4194304:case 8388608:case 0x1000000:case 0x2000000:return 0x3c00000&e;case 0x4000000:return 0x4000000;case 0x8000000:return 0x8000000;case 0x10000000:return 0x10000000;case 0x20000000:return 0x20000000;case 0x40000000:return 0;default:return e}}function eb(e,t,n){var r=e.pendingLanes;if(0===r)return 0;var l=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var i=0x7ffffff&r;return 0!==i?0!=(r=i&~a)?l=ev(r):0!=(o&=i)?l=ev(o):n||0!=(n=i&~e)&&(l=ev(n)):0!=(i=r&~a)?l=ev(i):0!==o?l=ev(o):n||0!=(n=r&~e)&&(l=ev(n)),0===l?0:0!==t&&t!==l&&0==(t&a)&&((a=l&-l)>=(n=t&-t)||32===a&&0!=(4194048&n))?t:l}function ek(e,t){return 0==(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)}function ew(){var e=eg;return 0==(4194048&(eg<<=1))&&(eg=256),e}function eS(){var e=ey;return 0==(0x3c00000&(ey<<=1))&&(ey=4194304),e}function ex(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function eE(e,t){e.pendingLanes|=t,0x10000000!==t&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function eC(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-ep(t);e.entangledLanes|=t,e.entanglements[r]=0x40000000|e.entanglements[r]|4194090&n}function e_(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ep(n),l=1<)":-1l||u[r]!==s[l]){var c="\n"+u[r].replace(" at new "," at ");return e.displayName&&c.includes("")&&(c=c.replace("",e.displayName)),c}while(1<=r&&0<=l);break}}}finally{e2=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?e1(n):""}function e4(e){try{var t="";do t+=function(e){switch(e.tag){case 26:case 27:case 5:return e1(e.type);case 16:return e1("Lazy");case 13:return e1("Suspense");case 19:return e1("SuspenseList");case 0:case 15:return e3(e.type,!1);case 11:return e3(e.type.render,!1);case 1:return e3(e.type,!0);case 31:return e1("Activity");default:return""}}(e),e=e.return;while(e);return t}catch(e){return"\nError generating stack: "+e.message+"\n"+e.stack}}function e8(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function e6(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function e5(e){e._valueTracker||(e._valueTracker=function(e){var t=e6(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var l=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function e9(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=e6(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function e7(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}var te=/[\n"\\]/g;function tt(e){return e.replace(te,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function tn(e,t,n,r,l,a,o,i){e.name="",null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o?e.type=o:e.removeAttribute("type"),null!=t?"number"===o?(0===t&&""===e.value||e.value!=t)&&(e.value=""+e8(t)):e.value!==""+e8(t)&&(e.value=""+e8(t)):"submit"!==o&&"reset"!==o||e.removeAttribute("value"),null!=t?tl(e,o,e8(t)):null!=n?tl(e,o,e8(n)):null!=r&&e.removeAttribute("value"),null==l&&null!=a&&(e.defaultChecked=!!a),null!=l&&(e.checked=l&&"function"!=typeof l&&"symbol"!=typeof l),null!=i&&"function"!=typeof i&&"symbol"!=typeof i&&"boolean"!=typeof i?e.name=""+e8(i):e.removeAttribute("name")}function tr(e,t,n,r,l,a,o,i){if(null!=a&&"function"!=typeof a&&"symbol"!=typeof a&&"boolean"!=typeof a&&(e.type=a),null!=t||null!=n){if(("submit"===a||"reset"===a)&&null==t)return;n=null!=n?""+e8(n):"",t=null!=t?""+e8(t):n,i||t===e.value||(e.value=t),e.defaultValue=t}r="function"!=typeof(r=null!=r?r:l)&&"symbol"!=typeof r&&!!r,e.checked=i?e.checked:!!r,e.defaultChecked=!!r,null!=o&&"function"!=typeof o&&"symbol"!=typeof o&&"boolean"!=typeof o&&(e.name=o)}function tl(e,t,n){"number"===t&&e7(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ta(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l=ne),nr=!1;function nl(e,t){switch(e){case"keyup":return -1!==t9.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function na(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var no=!1,ni={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function nu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!ni[e.type]:"textarea"===t}function ns(e,t,n,r){tv?tb?tb.push(r):tb=[r]:tv=r,0<(t=u3(t,"onChange")).length&&(n=new tH("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var nc=null,nf=null;function nd(e){uY(e,0)}function np(e){if(e9(e$(e)))return e}function nm(e,t){if("change"===e)return t}var nh=!1;if(tE){if(tE){var ng="oninput"in document;if(!ng){var ny=document.createElement("div");ny.setAttribute("oninput","return;"),ng="function"==typeof ny.oninput}r=ng}else r=!1;nh=r&&(!document.documentMode||9=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=n_(r)}}function nz(e){e=null!=e&&null!=e.ownerDocument&&null!=e.ownerDocument.defaultView?e.ownerDocument.defaultView:window;for(var t=e7(e.document);t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(n)e=t.contentWindow;else break;t=e7(e.document)}return t}function nN(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var nT=tE&&"documentMode"in document&&11>=document.documentMode,nL=null,nO=null,nR=null,nD=!1;function nA(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;nD||null==nL||nL!==e7(r)||(r="selectionStart"in(r=nL)&&nN(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},nR&&nC(nR,r)||(nR=r,0<(r=u3(nO,"onSelect")).length&&(t=new tH("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nL)))}function nF(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nM={animationend:nF("Animation","AnimationEnd"),animationiteration:nF("Animation","AnimationIteration"),animationstart:nF("Animation","AnimationStart"),transitionrun:nF("Transition","TransitionRun"),transitionstart:nF("Transition","TransitionStart"),transitioncancel:nF("Transition","TransitionCancel"),transitionend:nF("Transition","TransitionEnd")},nI={},nU={};function nj(e){if(nI[e])return nI[e];if(!nM[e])return e;var t,n=nM[e];for(t in n)if(n.hasOwnProperty(t)&&t in nU)return nI[e]=n[t];return e}tE&&(nU=document.createElement("div").style,"AnimationEvent"in window||(delete nM.animationend.animation,delete nM.animationiteration.animation,delete nM.animationstart.animation),"TransitionEvent"in window||delete nM.transitionend.transition);var nH=nj("animationend"),n$=nj("animationiteration"),nV=nj("animationstart"),nB=nj("transitionrun"),nQ=nj("transitionstart"),nW=nj("transitioncancel"),nq=nj("transitionend"),nK=new Map,nY="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function nG(e,t){nK.set(e,t),eq(t,[e])}nY.push("scrollEnd");var nX=new WeakMap;function nZ(e,t){if("object"==typeof e&&null!==e){var n=nX.get(e);return void 0!==n?n:(t={value:e,source:t,stack:e4(t)},nX.set(e,t),t)}return{value:e,source:t,stack:e4(t)}}var nJ=[],n0=0,n1=0;function n2(){for(var e=n0,t=n1=n0=0;t>=o,l-=o,rh=1<<32-ep(t)+l|n<a?a:8;var o=D.T,i={};D.T=i,aj(e,!1,t,n);try{var u=l(),s=D.S;if(null!==s&&s(i,u),null!==u&&"object"==typeof u&&"function"==typeof u.then){var c,f,d=(c=[],f={status:"pending",value:null,reason:null,then:function(e){c.push(e)}},u.then(function(){f.status="fulfilled",f.value=r;for(var e=0;eh?(g=f,f=null):g=f.sibling;var y=p(l,f,i[h],u);if(null===y){null===f&&(f=g);break}e&&f&&null===y.alternate&&t(l,f),o=a(y,o,h),null===c?s=y:c.sibling=y,c=y,f=g}if(h===i.length)return n(l,f),rx&&ry(l,h),s;if(null===f){for(;hg?(y=h,h=null):y=h.sibling;var b=p(l,h,v.value,s);if(null===b){null===h&&(h=y);break}e&&h&&null===b.alternate&&t(l,h),o=a(b,o,g),null===f?c=b:f.sibling=b,f=b,h=y}if(v.done)return n(l,h),rx&&ry(l,g),c;if(null===h){for(;!v.done;g++,v=i.next())null!==(v=d(l,v.value,s))&&(o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return rx&&ry(l,g),c}for(h=r(h);!v.done;g++,v=i.next())null!==(v=m(h,l,g,v.value,s))&&(e&&null!==v.alternate&&h.delete(null===v.key?g:v.key),o=a(v,o,g),null===f?c=v:f.sibling=v,f=v);return e&&h.forEach(function(e){return t(l,e)}),rx&&ry(l,g),c}(s,c,f=b.call(f),v)}if("function"==typeof f.then)return i(s,c,aG(f),v);if(f.$$typeof===S)return i(s,c,rQ(s,f),v);aZ(s,f)}return"string"==typeof f&&""!==f||"number"==typeof f||"bigint"==typeof f?(f=""+f,null!==c&&6===c.tag?(n(s,c.sibling),(v=l(c,f)).return=s):(n(s,c),(v=ro(f,s.mode,v)).return=s),o(s=v)):n(s,c)}(i,s,c,f);return aK=null,v}catch(e){if(e===r7||e===lt)throw e;var b=re(29,e,null,i.mode);return b.lanes=f,b.return=i,b}finally{}}}var a1=a0(!0),a2=a0(!1),a3=U(null),a4=null;function a8(e){var t=e.alternate;H(a7,1&a7.current),H(a3,e),null===a4&&(null===t||null!==lw.current?a4=e:null!==t.memoizedState&&(a4=e))}function a6(e){if(22===e.tag){if(H(a7,a7.current),H(a3,e),null===a4){var t=e.alternate;null!==t&&null!==t.memoizedState&&(a4=e)}}else a5(e)}function a5(){H(a7,a7.current),H(a3,a3.current)}function a9(e){j(a3),a4===e&&(a4=null),j(a7)}var a7=U(0);function oe(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||sb(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ot(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:p({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var on={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=i6(),l=ld(r);l.payload=t,null!=n&&(l.callback=n),null!==(t=lp(e,l,r))&&(i9(t,e,r),lm(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=i6(),l=ld(r);l.tag=1,l.payload=t,null!=n&&(l.callback=n),null!==(t=lp(e,l,r))&&(i9(t,e,r),lm(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=i6(),r=ld(n);r.tag=2,null!=t&&(r.callback=t),null!==(t=lp(e,r,n))&&(i9(t,e,n),lm(t,e,n))}};function or(e,t,n,r,l,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!t.prototype||!t.prototype.isPureReactComponent||!nC(n,r)||!nC(l,a)}function ol(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&on.enqueueReplaceState(t,t.state,null)}function oa(e,t){var n=t;if("ref"in t)for(var r in n={},t)"ref"!==r&&(n[r]=t[r]);if(e=e.defaultProps)for(var l in n===t&&(n=p({},n)),e)void 0===n[l]&&(n[l]=e[l]);return n}var oo="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof l&&"function"==typeof l.emit)return void l.emit("uncaughtException",e);console.error(e)};function oi(e){oo(e)}function ou(e){console.error(e)}function os(e){oo(e)}function oc(e,t){try{(0,e.onUncaughtError)(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function of(e,t,n){try{(0,e.onCaughtError)(n.value,{componentStack:n.stack,errorBoundary:1===t.tag?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function od(e,t,n){return(n=ld(n)).tag=3,n.payload={element:null},n.callback=function(){oc(e,t)},n}function op(e){return(e=ld(e)).tag=3,e}function om(e,t,n,r){var l=n.type.getDerivedStateFromError;if("function"==typeof l){var a=r.value;e.payload=function(){return l(a)},e.callback=function(){of(t,n,r)}}var o=n.stateNode;null!==o&&"function"==typeof o.componentDidCatch&&(e.callback=function(){of(t,n,r),"function"!=typeof l&&(null===iG?iG=new Set([this]):iG.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:null!==e?e:""})})}var oh=Error(u(461)),og=!1;function oy(e,t,n,r){t.child=null===e?a2(t,null,n,r):a1(t,e.child,n,r)}function ov(e,t,n,r,l){n=n.render;var a=t.ref;if("ref"in r){var o={};for(var i in r)"ref"!==i&&(o[i]=r[i])}else o=r;return(rV(t),r=lU(e,t,n,o,a,l),i=lV(),null===e||og)?(rx&&i&&rb(t),t.flags|=1,oy(e,t,r,l),t.child):(lB(e,t,l),oI(e,t,l))}function ob(e,t,n,r,l){if(null===e){var a=n.type;return"function"!=typeof a||rt(a)||void 0!==a.defaultProps||null!==n.compare?((e=rl(n.type,null,r,t,t.mode,l)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,ok(e,t,a,r,l))}if(a=e.child,!oU(e,l)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:nC)(o,r)&&e.ref===t.ref)return oI(e,t,l)}return t.flags|=1,(e=rn(a,r)).ref=t.ref,e.return=t,t.child=e}function ok(e,t,n,r,l){if(null!==e){var a=e.memoizedProps;if(nC(a,r)&&e.ref===t.ref)if(og=!1,t.pendingProps=r=a,!oU(e,l))return t.lanes=e.lanes,oI(e,t,l);else 0!=(131072&e.flags)&&(og=!0)}return oE(e,t,n,r,l)}function ow(e,t,n){var r=t.pendingProps,l=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode){if(0!=(128&t.flags)){if(r=null!==a?a.baseLanes|n:n,null!==e){for(a=0,l=t.child=e.child;null!==l;)a=a|l.lanes|l.childLanes,l=l.sibling;t.childLanes=a&~r}else t.childLanes=0,t.child=null;return oS(e,t,r,n)}if(0==(0x20000000&n))return t.lanes=t.childLanes=0x20000000,oS(e,t,null!==a?a.baseLanes|n:n,n);t.memoizedState={baseLanes:0,cachePool:null},null!==e&&r5(t,null!==a?a.cachePool:null),null!==a?lx(t,a):lE(),a6(t)}else null!==a?(r5(t,a.cachePool),lx(t,a),a5(t),t.memoizedState=null):(null!==e&&r5(t,null),lE(),a5(t));return oy(e,t,l,n),t.child}function oS(e,t,n,r){var l=r6();return t.memoizedState={baseLanes:n,cachePool:l=null===l?null:{parent:rG._currentValue,pool:l}},null!==e&&r5(t,null),lE(),a6(t),null!==e&&rH(e,t,r,!0),null}function ox(e,t){var n=t.ref;if(null===n)null!==e&&null!==e.ref&&(t.flags|=4194816);else{if("function"!=typeof n&&"object"!=typeof n)throw Error(u(284));(null===e||e.ref!==n)&&(t.flags|=4194816)}}function oE(e,t,n,r,l){return(rV(t),n=lU(e,t,n,r,void 0,l),r=lV(),null===e||og)?(rx&&r&&rb(t),t.flags|=1,oy(e,t,n,l),t.child):(lB(e,t,l),oI(e,t,l))}function oC(e,t,n,r,l,a){return(rV(t),t.updateQueue=null,n=lH(t,r,n,l),lj(e),r=lV(),null===e||og)?(rx&&r&&rb(t),t.flags|=1,oy(e,t,n,a),t.child):(lB(e,t,a),oI(e,t,a))}function o_(e,t,n,r,l){if(rV(t),null===t.stateNode){var a=n9,o=n.contextType;"object"==typeof o&&null!==o&&(a=rB(o)),t.memoizedState=null!==(a=new n(r,a)).state&&void 0!==a.state?a.state:null,a.updater=on,t.stateNode=a,a._reactInternals=t,(a=t.stateNode).props=r,a.state=t.memoizedState,a.refs={},lc(t),o=n.contextType,a.context="object"==typeof o&&null!==o?rB(o):n9,a.state=t.memoizedState,"function"==typeof(o=n.getDerivedStateFromProps)&&(ot(t,n,o,r),a.state=t.memoizedState),"function"==typeof n.getDerivedStateFromProps||"function"==typeof a.getSnapshotBeforeUpdate||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||(o=a.state,"function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount(),o!==a.state&&on.enqueueReplaceState(a,a.state,null),lv(t,r,a,l),ly(),a.state=t.memoizedState),"function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!0}else if(null===e){a=t.stateNode;var i=t.memoizedProps,u=oa(n,i);a.props=u;var s=a.context,c=n.contextType;o=n9,"object"==typeof c&&null!==c&&(o=rB(c));var f=n.getDerivedStateFromProps;c="function"==typeof f||"function"==typeof a.getSnapshotBeforeUpdate,i=t.pendingProps!==i,c||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(i||s!==o)&&ol(t,a,r,o),ls=!1;var d=t.memoizedState;a.state=d,lv(t,r,a,l),ly(),s=t.memoizedState,i||d!==s||ls?("function"==typeof f&&(ot(t,n,f,r),s=t.memoizedState),(u=ls||or(t,n,u,r,d,s,o))?(c||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=s),a.props=r,a.state=s,a.context=o,r=u):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,lf(e,t),c=oa(n,o=t.memoizedProps),a.props=c,f=t.pendingProps,d=a.context,s=n.contextType,u=n9,"object"==typeof s&&null!==s&&(u=rB(s)),(s="function"==typeof(i=n.getDerivedStateFromProps)||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(o!==f||d!==u)&&ol(t,a,r,u),ls=!1,d=t.memoizedState,a.state=d,lv(t,r,a,l),ly();var p=t.memoizedState;o!==f||d!==p||ls||null!==e&&null!==e.dependencies&&r$(e.dependencies)?("function"==typeof i&&(ot(t,n,i,r),p=t.memoizedState),(c=ls||or(t,n,c,r,d,p,u)||null!==e&&null!==e.dependencies&&r$(e.dependencies))?(s||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,u),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,u)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=u,r=c):("function"!=typeof a.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ox(e,t),r=0!=(128&t.flags),a||r?(a=t.stateNode,n=r&&"function"!=typeof n.getDerivedStateFromError?null:a.render(),t.flags|=1,null!==e&&r?(t.child=a1(t,e.child,null,l),t.child=a1(t,null,n,l)):oy(e,t,n,l),t.memoizedState=a.state,e=t.child):e=oI(e,t,l),e}function oP(e,t,n,r){return rL(),t.flags|=256,oy(e,t,n,r),t.child}var oz={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function oN(e){return{baseLanes:e,cachePool:r9()}}function oT(e,t,n){return e=null!==e?e.childLanes&~n:0,t&&(e|=i$),e}function oL(e,t,n){var r,l=t.pendingProps,a=!1,o=0!=(128&t.flags);if((r=o)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a7.current)),r&&(a=!0,t.flags&=-129),r=0!=(32&t.flags),t.flags&=-33,null===e){if(rx){if(a?a8(t):a5(t),rx){var i,s=rS;if(i=s){n:{for(i=s,s=rC;8!==i.nodeType;)if(!s||null===(i=sk(i.nextSibling))){s=null;break n}s=i}null!==s?(t.memoizedState={dehydrated:s,treeContext:null!==rm?{id:rh,overflow:rg}:null,retryLane:0x20000000,hydrationErrors:null},(i=re(18,null,null,0)).stateNode=s,i.return=t,t.child=i,rw=t,rS=null,i=!0):i=!1}i||rP(t)}if(null!==(s=t.memoizedState)&&null!==(s=s.dehydrated))return sb(s)?t.lanes=32:t.lanes=0x20000000,null;a9(t)}return(s=l.children,l=l.fallback,a)?(a5(t),s=oR({mode:"hidden",children:s},a=t.mode),l=ra(l,a,n,null),s.return=t,l.return=t,s.sibling=l,t.child=s,(a=t.child).memoizedState=oN(n),a.childLanes=oT(e,r,n),t.memoizedState=oz,l):(a8(t),oO(t,s))}if(null!==(i=e.memoizedState)&&null!==(s=i.dehydrated)){if(o)256&t.flags?(a8(t),t.flags&=-257,t=oD(e,t,n)):null!==t.memoizedState?(a5(t),t.child=e.child,t.flags|=128,t=null):(a5(t),a=l.fallback,s=t.mode,l=oR({mode:"visible",children:l.children},s),a=ra(a,s,n,null),a.flags|=2,l.return=t,a.return=t,l.sibling=a,t.child=l,a1(t,e.child,null,n),(l=t.child).memoizedState=oN(n),l.childLanes=oT(e,r,n),t.memoizedState=oz,t=a);else if(a8(t),sb(s)){if(r=s.nextSibling&&s.nextSibling.dataset)var c=r.dgst;r=c,(l=Error(u(419))).stack="",l.digest=r,rR({value:l,source:null,stack:null}),t=oD(e,t,n)}else if(og||rH(e,t,n,!1),r=0!=(n&e.childLanes),og||r){if(null!==(r=iN)&&0!==(l=0!=((l=0!=(42&(l=n&-n))?1:eP(l))&(r.suspendedLanes|n))?0:l)&&l!==i.retryLane)throw i.retryLane=l,n8(e,l),i9(r,e,l),oh;"$?"===s.data||uu(),t=oD(e,t,n)}else"$?"===s.data?(t.flags|=192,t.child=e.child,t=null):(e=i.treeContext,rS=sk(s.nextSibling),rw=t,rx=!0,rE=null,rC=!1,null!==e&&(rd[rp++]=rh,rd[rp++]=rg,rd[rp++]=rm,rh=e.id,rg=e.overflow,rm=t),t=oO(t,l.children),t.flags|=4096);return t}return a?(a5(t),a=l.fallback,s=t.mode,c=(i=e.child).sibling,(l=rn(i,{mode:"hidden",children:l.children})).subtreeFlags=0x3e00000&i.subtreeFlags,null!==c?a=rn(c,a):(a=ra(a,s,n,null),a.flags|=2),a.return=t,l.return=t,l.sibling=a,t.child=l,l=a,a=t.child,null===(s=e.child.memoizedState)?s=oN(n):(null!==(i=s.cachePool)?(c=rG._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=r9(),s={baseLanes:s.baseLanes|n,cachePool:i}),a.memoizedState=s,a.childLanes=oT(e,r,n),t.memoizedState=oz,l):(a8(t),e=(n=e.child).sibling,(n=rn(n,{mode:"visible",children:l.children})).return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function oO(e,t){return(t=oR({mode:"visible",children:t},e.mode)).return=e,e.child=t}function oR(e,t){return(e=re(22,e,null,t)).lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function oD(e,t,n){return a1(t,e.child,null,n),e=oO(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function oA(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),rU(e.return,t,n)}function oF(e,t,n,r,l){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=l)}function oM(e,t,n){var r=t.pendingProps,l=r.revealOrder,a=r.tail;if(oy(e,t,r.children,n),0!=(2&(r=a7.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&oA(e,n,t);else if(19===e.tag)oA(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}switch(H(a7,r),l){case"forwards":for(l=null,n=t.child;null!==n;)null!==(e=n.alternate)&&null===oe(e)&&(l=n),n=n.sibling;null===(n=l)?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),oF(t,!1,l,n,a);break;case"backwards":for(n=null,l=t.child,t.child=null;null!==l;){if(null!==(e=l.alternate)&&null===oe(e)){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}oF(t,!0,n,null,a);break;case"together":oF(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function oI(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),iU|=t.lanes,0==(n&t.childLanes)){if(null===e)return null;else if(rH(e,t,n,!1),0==(n&t.childLanes))return null}if(null!==e&&t.child!==e.child)throw Error(u(153));if(null!==t.child){for(n=rn(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=rn(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function oU(e,t){return 0!=(e.lanes&t)||!!(null!==(e=e.dependencies)&&r$(e))}function oj(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps)og=!0;else{if(!oU(e,n)&&0==(128&t.flags))return og=!1,function(e,t,n){switch(t.tag){case 3:W(t,t.stateNode.containerInfo),rM(t,rG,e.memoizedState.cache),rL();break;case 27:case 5:K(t);break;case 4:W(t,t.stateNode.containerInfo);break;case 10:rM(t,t.type,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r){if(null!==r.dehydrated)return a8(t),t.flags|=128,null;if(0!=(n&t.child.childLanes))return oL(e,t,n);return a8(t),null!==(e=oI(e,t,n))?e.sibling:null}a8(t);break;case 19:var l=0!=(128&e.flags);if((r=0!=(n&t.childLanes))||(rH(e,t,n,!1),r=0!=(n&t.childLanes)),l){if(r)return oM(e,t,n);t.flags|=128}if(null!==(l=t.memoizedState)&&(l.rendering=null,l.tail=null,l.lastEffect=null),H(a7,a7.current),!r)return null;break;case 22:case 23:return t.lanes=0,ow(e,t,n);case 24:rM(t,rG,e.memoizedState.cache)}return oI(e,t,n)}(e,t,n);og=0!=(131072&e.flags)}else og=!1,rx&&0!=(1048576&t.flags)&&rv(t,rf,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var r=t.elementType,l=r._init;if(r=l(r._payload),t.type=r,"function"==typeof r)rt(r)?(e=oa(r,e),t.tag=1,t=o_(null,t,r,e,n)):(t.tag=0,t=oE(null,t,r,e,n));else{if(null!=r){if((l=r.$$typeof)===x){t.tag=11,t=ov(null,t,r,e,n);break e}else if(l===_){t.tag=14,t=ob(null,t,r,e,n);break e}}throw Error(u(306,t=function e(t){if(null==t)return null;if("function"==typeof t)return t.$$typeof===O?null:t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case y:return"Fragment";case b:return"Profiler";case v:return"StrictMode";case E:return"Suspense";case C:return"SuspenseList";case z:return"Activity"}if("object"==typeof t)switch(t.$$typeof){case g:return"Portal";case S:return(t.displayName||"Context")+".Provider";case w:return(t._context.displayName||"Context")+".Consumer";case x:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case _:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case P:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}(r)||r,""))}}return t;case 0:return oE(e,t,t.type,t.pendingProps,n);case 1:return l=oa(r=t.type,t.pendingProps),o_(e,t,r,l,n);case 3:e:{if(W(t,t.stateNode.containerInfo),null===e)throw Error(u(387));r=t.pendingProps;var a=t.memoizedState;l=a.element,lf(e,t),lv(t,r,null,n);var o=t.memoizedState;if(rM(t,rG,r=o.cache),r!==a.cache&&rj(t,[rG],n,!0),ly(),r=o.element,a.isDehydrated)if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=oP(e,t,r,n);break e}else if(r!==l){rR(l=nZ(Error(u(424)),t)),t=oP(e,t,r,n);break e}else for(rS=sk((e=9===(e=t.stateNode.containerInfo).nodeType?e.body:"HTML"===e.nodeName?e.ownerDocument.body:e).firstChild),rw=t,rx=!0,rE=null,rC=!0,n=a2(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling;else{if(rL(),r===l){t=oI(e,t,n);break e}oy(e,t,r,n)}t=t.child}return t;case 26:return ox(e,t),null===e?(n=sL(t.type,null,t.pendingProps,null))?t.memoizedState=n:rx||(n=t.type,e=t.pendingProps,(r=so(B.current).createElement(n))[eL]=t,r[eO]=e,sr(r,n,e),eB(r),t.stateNode=r):t.memoizedState=sL(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return K(t),null===e&&rx&&(r=t.stateNode=sx(t.type,t.pendingProps,B.current),rw=t,rC=!0,l=rS,sg(t.type)?(sw=l,rS=sk(r.firstChild)):rS=l),oy(e,t,t.pendingProps.children,n),ox(e,t),null===e&&(t.flags|=4194304),t.child;case 5:return null===e&&rx&&((l=r=rS)&&(null!==(r=function(e,t,n,r){for(;1===e.nodeType;){if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&("INPUT"!==e.nodeName||"hidden"!==e.type))break}else if(r){if(!e[eI])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if("stylesheet"===(l=e.getAttribute("rel"))&&e.hasAttribute("data-precedence")||l!==n.rel||e.getAttribute("href")!==(null==n.href||""===n.href?null:n.href)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin)||e.getAttribute("title")!==(null==n.title?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(((l=e.getAttribute("src"))!==(null==n.src?null:n.src)||e.getAttribute("type")!==(null==n.type?null:n.type)||e.getAttribute("crossorigin")!==(null==n.crossOrigin?null:n.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else{if("input"!==t||"hidden"!==e.type)return e;var l=null==n.name?null:""+n.name;if("hidden"===n.type&&e.getAttribute("name")===l)return e}if(null===(e=sk(e.nextSibling)))break}return null}(r,t.type,t.pendingProps,rC))?(t.stateNode=r,rw=t,rS=sk(r.firstChild),rC=!1,l=!0):l=!1),l||rP(t)),K(t),l=t.type,a=t.pendingProps,o=null!==e?e.memoizedProps:null,r=a.children,ss(l,a)?r=null:null!==o&&ss(l,o)&&(t.flags|=32),null!==t.memoizedState&&(sX._currentValue=l=lU(e,t,l$,null,null,n)),ox(e,t),oy(e,t,r,n),t.child;case 6:return null===e&&rx&&((e=n=rS)&&(null!==(n=function(e,t,n){if(""===t)return null;for(;3!==e.nodeType;)if((1!==e.nodeType||"INPUT"!==e.nodeName||"hidden"!==e.type)&&!n||null===(e=sk(e.nextSibling)))return null;return e}(n,t.pendingProps,rC))?(t.stateNode=n,rw=t,rS=null,e=!0):e=!1),e||rP(t)),null;case 13:return oL(e,t,n);case 4:return W(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=a1(t,null,r,n):oy(e,t,r,n),t.child;case 11:return ov(e,t,t.type,t.pendingProps,n);case 7:return oy(e,t,t.pendingProps,n),t.child;case 8:case 12:return oy(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,rM(t,t.type,r.value),oy(e,t,r.children,n),t.child;case 9:return l=t.type._context,r=t.pendingProps.children,rV(t),r=r(l=rB(l)),t.flags|=1,oy(e,t,r,n),t.child;case 14:return ob(e,t,t.type,t.pendingProps,n);case 15:return ok(e,t,t.type,t.pendingProps,n);case 19:return oM(e,t,n);case 31:return r=t.pendingProps,n=t.mode,r={mode:r.mode,children:r.children},null===e?(n=oR(r,n)).ref=t.ref:(n=rn(e.child,r)).ref=t.ref,t.child=n,n.return=t,t=n;case 22:return ow(e,t,n);case 24:return rV(t),r=rB(rG),null===e?(null===(l=r6())&&(l=iN,a=rX(),l.pooledCache=a,a.refCount++,null!==a&&(l.pooledCacheLanes|=n),l=a),t.memoizedState={parent:r,cache:l},lc(t),rM(t,rG,l)):(0!=(e.lanes&n)&&(lf(e,t),lv(t,null,null,n),ly()),l=e.memoizedState,a=t.memoizedState,l.parent!==r?(l={parent:r,cache:r},t.memoizedState=l,0===t.lanes&&(t.memoizedState=t.updateQueue.baseState=l),rM(t,rG,r)):(rM(t,rG,r=a.cache),r!==l.cache&&rj(t,[rG],n,!0))),oy(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function oH(e){e.flags|=4}function o$(e,t){if("stylesheet"!==t.type||0!=(4&t.state.loading))e.flags&=-0x1000001;else if(e.flags|=0x1000000,!sB(t)){if(null!==(t=a3.current)&&((4194048&iL)===iL?null!==a4:(0x3c00000&iL)!==iL&&0==(0x20000000&iL)||t!==a4))throw lo=ln,le;e.flags|=8192}}function oV(e,t){null!==t&&(e.flags|=4),16384&e.flags&&(t=22!==e.tag?eS():0x20000000,e.lanes|=t,iV|=t)}function oB(e,t){if(!rx)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function oQ(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=0x3e00000&l.subtreeFlags,r|=0x3e00000&l.flags,l.return=e,l=l.sibling;else for(l=e.child;null!==l;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function oW(e,t){switch(rk(t),t.tag){case 3:rI(rG),q();break;case 26:case 27:case 5:Y(t);break;case 4:q();break;case 13:a9(t);break;case 19:j(a7);break;case 10:rI(t.type);break;case 22:case 23:a9(t),lC(),null!==e&&j(r8);break;case 24:rI(rG)}}function oq(e,t){try{var n=t.updateQueue,r=null!==n?n.lastEffect:null;if(null!==r){var l=r.next;n=l;do{if((n.tag&e)===e){r=void 0;var a=n.create;n.inst.destroy=r=a()}n=n.next}while(n!==l)}}catch(e){ux(t,t.return,e)}}function oK(e,t,n){try{var r=t.updateQueue,l=null!==r?r.lastEffect:null;if(null!==l){var a=l.next;r=a;do{if((r.tag&e)===e){var o=r.inst,i=o.destroy;if(void 0!==i){o.destroy=void 0,l=t;try{i()}catch(e){ux(l,n,e)}}}r=r.next}while(r!==a)}}catch(e){ux(t,t.return,e)}}function oY(e){var t=e.updateQueue;if(null!==t){var n=e.stateNode;try{lk(t,n)}catch(t){ux(e,e.return,t)}}}function oG(e,t,n){n.props=oa(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ux(e,t,n)}}function oX(e,t){try{var n=e.ref;if(null!==n){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;default:r=e.stateNode}"function"==typeof n?e.refCleanup=n(r):n.current=r}}catch(n){ux(e,t,n)}}function oZ(e,t){var n=e.ref,r=e.refCleanup;if(null!==n)if("function"==typeof r)try{r()}catch(n){ux(e,t,n)}finally{e.refCleanup=null,null!=(e=e.alternate)&&(e.refCleanup=null)}else if("function"==typeof n)try{n(null)}catch(n){ux(e,t,n)}else n.current=null}function oJ(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ux(e,e.return,t)}}function o0(e,t,n){try{var r=e.stateNode;(function(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,a=null,o=null,i=null,s=null,c=null,f=null;for(m in n){var d=n[m];if(n.hasOwnProperty(m)&&null!=d)switch(m){case"checked":case"value":break;case"defaultValue":s=d;default:r.hasOwnProperty(m)||st(e,t,m,null,r,d)}}for(var p in r){var m=r[p];if(d=n[p],r.hasOwnProperty(p)&&(null!=m||null!=d))switch(p){case"type":a=m;break;case"name":l=m;break;case"checked":c=m;break;case"defaultChecked":f=m;break;case"value":o=m;break;case"defaultValue":i=m;break;case"children":case"dangerouslySetInnerHTML":if(null!=m)throw Error(u(137,t));break;default:m!==d&&st(e,t,p,m,r,d)}}tn(e,o,i,s,c,f,a,l);return;case"select":for(a in m=o=i=p=null,n)if(s=n[a],n.hasOwnProperty(a)&&null!=s)switch(a){case"value":break;case"multiple":m=s;default:r.hasOwnProperty(a)||st(e,t,a,null,r,s)}for(l in r)if(a=r[l],s=n[l],r.hasOwnProperty(l)&&(null!=a||null!=s))switch(l){case"value":p=a;break;case"defaultValue":i=a;break;case"multiple":o=a;default:a!==s&&st(e,t,l,a,r,s)}t=i,n=o,r=m,null!=p?ta(e,!!n,p,!1):!!r!=!!n&&(null!=t?ta(e,!!n,t,!0):ta(e,!!n,n?[]:"",!1));return;case"textarea":for(i in m=p=null,n)if(l=n[i],n.hasOwnProperty(i)&&null!=l&&!r.hasOwnProperty(i))switch(i){case"value":case"children":break;default:st(e,t,i,null,r,l)}for(o in r)if(l=r[o],a=n[o],r.hasOwnProperty(o)&&(null!=l||null!=a))switch(o){case"value":p=l;break;case"defaultValue":m=l;break;case"children":break;case"dangerouslySetInnerHTML":if(null!=l)throw Error(u(91));break;default:l!==a&&st(e,t,o,l,r,a)}to(e,p,m);return;case"option":for(var h in n)p=n[h],n.hasOwnProperty(h)&&null!=p&&!r.hasOwnProperty(h)&&("selected"===h?e.selected=!1:st(e,t,h,null,r,p));for(s in r)p=r[s],m=n[s],r.hasOwnProperty(s)&&p!==m&&(null!=p||null!=m)&&("selected"===s?e.selected=p&&"function"!=typeof p&&"symbol"!=typeof p:st(e,t,s,p,r,m));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var g in n)p=n[g],n.hasOwnProperty(g)&&null!=p&&!r.hasOwnProperty(g)&&st(e,t,g,null,r,p);for(c in r)if(p=r[c],m=n[c],r.hasOwnProperty(c)&&p!==m&&(null!=p||null!=m))switch(c){case"children":case"dangerouslySetInnerHTML":if(null!=p)throw Error(u(137,t));break;default:st(e,t,c,p,r,m)}return;default:if(td(t)){for(var y in n)p=n[y],n.hasOwnProperty(y)&&void 0!==p&&!r.hasOwnProperty(y)&&sn(e,t,y,void 0,r,p);for(f in r)p=r[f],m=n[f],r.hasOwnProperty(f)&&p!==m&&(void 0!==p||void 0!==m)&&sn(e,t,f,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&null!=p&&!r.hasOwnProperty(v)&&st(e,t,v,null,r,p);for(d in r)p=r[d],m=n[d],r.hasOwnProperty(d)&&p!==m&&(null!=p||null!=m)&&st(e,t,d,p,r,m)})(r,e.type,n,t),r[eO]=t}catch(t){ux(e,e.return,t)}}function o1(e){return 5===e.tag||3===e.tag||26===e.tag||27===e.tag&&sg(e.type)||4===e.tag}function o2(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||o1(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(27===e.tag&&sg(e.type)||2&e.flags||null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function o3(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&(27===r&&sg(e.type)&&(n=e.stateNode),null!==(e=e.child)))for(o3(e,t,n),e=e.sibling;null!==e;)o3(e,t,n),e=e.sibling}function o4(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);sr(t,r,n),t[eL]=e,t[eO]=n}catch(t){ux(e,e.return,t)}}var o8=!1,o6=!1,o5=!1,o9="function"==typeof WeakSet?WeakSet:Set,o7=null;function ie(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:ip(e,n),4&r&&oq(5,n);break;case 1:if(ip(e,n),4&r)if(e=n.stateNode,null===t)try{e.componentDidMount()}catch(e){ux(n,n.return,e)}else{var l=oa(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){ux(n,n.return,e)}}64&r&&oY(n),512&r&&oX(n,n.return);break;case 3:if(ip(e,n),64&r&&null!==(e=n.updateQueue)){if(t=null,null!==n.child)switch(n.child.tag){case 27:case 5:case 1:t=n.child.stateNode}try{lk(e,t)}catch(e){ux(n,n.return,e)}}break;case 27:null===t&&4&r&&o4(n);case 26:case 5:ip(e,n),null===t&&4&r&&oJ(n),512&r&&oX(n,n.return);break;case 12:default:ip(e,n);break;case 13:ip(e,n),4&r&&io(e,n),64&r&&null!==(e=n.memoizedState)&&null!==(e=e.dehydrated)&&function(e,t){var n=e.ownerDocument;if("$?"!==e.data||"complete"===n.readyState)t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}(e,n=uP.bind(null,n));break;case 22:if(!(r=null!==n.memoizedState||o8)){t=null!==t&&null!==t.memoizedState||o6,l=o8;var a=o6;o8=r,(o6=t)&&!a?function e(t,n,r){for(r=r&&0!=(8772&n.subtreeFlags),n=n.child;null!==n;){var l=n.alternate,a=t,o=n,i=o.flags;switch(o.tag){case 0:case 11:case 15:e(a,o,r),oq(4,o);break;case 1:if(e(a,o,r),"function"==typeof(a=(l=o).stateNode).componentDidMount)try{a.componentDidMount()}catch(e){ux(l,l.return,e)}if(null!==(a=(l=o).updateQueue)){var u=l.stateNode;try{var s=a.shared.hiddenCallbacks;if(null!==s)for(a.shared.hiddenCallbacks=null,a=0;a title"))),sr(a,r,n),a[eL]=e,eB(a),r=a;break e;case"link":var o=s$("link","href",l).get(r+(n.href||""));if(o){for(var i=0;i<\/script>",e=e.removeChild(e.firstChild);break;case"select":e="string"==typeof r.is?l.createElement("select",{is:r.is}):l.createElement("select"),r.multiple?e.multiple=!0:r.size&&(e.size=r.size);break;default:e="string"==typeof r.is?l.createElement(n,{is:r.is}):l.createElement(n)}}e[eL]=t,e[eO]=r;e:for(l=t.child;null!==l;){if(5===l.tag||6===l.tag)e.appendChild(l.stateNode);else if(4!==l.tag&&27!==l.tag&&null!==l.child){l.child.return=l,l=l.child;continue}if(l===t)break;for(;null===l.sibling;){if(null===l.return||l.return===t)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}switch(t.stateNode=e,sr(e,n,r),n){case"button":case"input":case"select":case"textarea":e=!!r.autoFocus;break;case"img":e=!0;break;default:e=!1}e&&oH(t)}}return oQ(t),t.flags&=-0x1000001,null;case 6:if(e&&null!=t.stateNode)e.memoizedProps!==r&&oH(t);else{if("string"!=typeof r&&null===t.stateNode)throw Error(u(166));if(e=B.current,rT(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,null!==(l=rw))switch(l.tag){case 27:case 5:r=l.memoizedProps}e[eL]=t,(e=!!(e.nodeValue===n||null!==r&&!0===r.suppressHydrationWarning||u7(e.nodeValue,n)))||rP(t)}else(e=so(e).createTextNode(r))[eL]=t,t.stateNode=e}return oQ(t),null;case 13:if(r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(l=rT(t),null!==r&&null!==r.dehydrated){if(null===e){if(!l)throw Error(u(318));if(!(l=null!==(l=t.memoizedState)?l.dehydrated:null))throw Error(u(317));l[eL]=t}else rL(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;oQ(t),l=!1}else l=rO(),null!==e&&null!==e.memoizedState&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l){if(256&t.flags)return a9(t),t;return a9(t),null}}if(a9(t),0!=(128&t.flags))return t.lanes=n,t;if(n=null!==r,e=null!==e&&null!==e.memoizedState,n){r=t.child,l=null,null!==r.alternate&&null!==r.alternate.memoizedState&&null!==r.alternate.memoizedState.cachePool&&(l=r.alternate.memoizedState.cachePool.pool);var a=null;null!==r.memoizedState&&null!==r.memoizedState.cachePool&&(a=r.memoizedState.cachePool.pool),a!==l&&(r.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),oV(t,t.updateQueue),oQ(t),null;case 4:return q(),null===e&&uJ(t.stateNode.containerInfo),oQ(t),null;case 10:return rI(t.type),oQ(t),null;case 19:if(j(a7),null===(l=t.memoizedState))return oQ(t),null;if(r=0!=(128&t.flags),null===(a=l.rendering))if(r)oB(l,!1);else{if(0!==iI||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=oe(e))){for(t.flags|=128,oB(l,!1),e=a.updateQueue,t.updateQueue=e,oV(t,e),t.subtreeFlags=0,e=n,n=t.child;null!==n;)rr(n,e),n=n.sibling;return H(a7,1&a7.current|2),t.child}e=e.sibling}null!==l.tail&&et()>iK&&(t.flags|=128,r=!0,oB(l,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=oe(a))){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,oV(t,e),oB(l,!0),null===l.tail&&"hidden"===l.tailMode&&!a.alternate&&!rx)return oQ(t),null}else 2*et()-l.renderingStartTime>iK&&0x20000000!==n&&(t.flags|=128,r=!0,oB(l,!1),t.lanes=4194304);l.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=l.last)?e.sibling=a:t.child=a,l.last=a)}if(null!==l.tail)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=et(),t.sibling=null,e=a7.current,H(a7,r?1&e|2:1&e),t;return oQ(t),null;case 22:case 23:return a9(t),lC(),r=null!==t.memoizedState,null!==e?null!==e.memoizedState!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?0!=(0x20000000&n)&&0==(128&t.flags)&&(oQ(t),6&t.subtreeFlags&&(t.flags|=8192)):oQ(t),null!==(n=t.updateQueue)&&oV(t,n.retryQueue),n=null,null!==e&&null!==e.memoizedState&&null!==e.memoizedState.cachePool&&(n=e.memoizedState.cachePool.pool),r=null,null!==t.memoizedState&&null!==t.memoizedState.cachePool&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),null!==e&&j(r8),null;case 24:return n=null,null!==e&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rI(rG),oQ(t),null;case 25:case 30:return null}throw Error(u(156,t.tag))}(t.alternate,t,iM);if(null!==n){iT=n;return}if(null!==(t=t.sibling)){iT=t;return}iT=t=e}while(null!==t);0===iI&&(iI=5)}function um(e,t){do{var n=function(e,t){switch(rk(t),t.tag){case 1:return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return rI(rG),q(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 26:case 27:case 5:return Y(t),null;case 13:if(a9(t),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(u(340));rL()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return j(a7),null;case 4:return q(),null;case 10:return rI(t.type),null;case 22:case 23:return a9(t),lC(),null!==e&&j(r8),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 24:return rI(rG),null;default:return null}}(e.alternate,e);if(null!==n){n.flags&=32767,iT=n;return}if(null!==(n=e.return)&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&null!==(e=e.sibling)){iT=e;return}iT=e=n}while(null!==e);iI=6,iT=null}function uh(e,t,n,r,l,a,o,i,s){e.cancelPendingCommit=null;do uk();while(0!==iX);if(0!=(6&iz))throw Error(u(327));if(null!==t){if(t===e.current)throw Error(u(177));if(!function(e,t,n,r,l,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var i=e.entanglements,u=e.expirationTimes,s=e.hiddenUpdates;for(n=o&~n;0g&&(o=g,g=h,h=o);var y=nP(i,h),v=nP(i,g);if(y&&v&&(1!==p.rangeCount||p.anchorNode!==y.node||p.anchorOffset!==y.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var b=f.createRange();b.setStart(y.node,y.offset),p.removeAllRanges(),h>g?(p.addRange(b),p.extend(v.node,v.offset)):(b.setEnd(v.node,v.offset),p.addRange(b))}}}}for(f=[],p=i;p=p.parentNode;)1===p.nodeType&&f.push({element:p,left:p.scrollLeft,top:p.scrollTop});for("function"==typeof i.focus&&i.focus(),i=0;in?32:n,D.T=null,n=i2,i2=null;var a=iZ,o=i0;if(iX=0,iJ=iZ=null,i0=0,0!=(6&iz))throw Error(u(331));var i=iz;if(iz|=4,iE(a.current),iy(a,a.current,o,n),iz=i,uF(0,!1),ef&&"function"==typeof ef.onPostCommitFiberRoot)try{ef.onPostCommitFiberRoot(ec,a)}catch(e){}return!0}finally{A.p=l,D.T=r,ub(e,t)}}function uS(e,t,n){t=nZ(n,t),t=od(e.stateNode,t,2),null!==(e=lp(e,t,2))&&(eE(e,2),uA(e))}function ux(e,t,n){if(3===e.tag)uS(e,e,n);else for(;null!==t;){if(3===t.tag){uS(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===iG||!iG.has(r))){e=nZ(n,e),null!==(r=lp(t,n=op(2),2))&&(om(n,r,t,e),eE(r,2),uA(r));break}}t=t.return}}function uE(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new iP;var l=new Set;r.set(t,l)}else void 0===(l=r.get(t))&&(l=new Set,r.set(t,l));l.has(n)||(iF=!0,l.add(n),e=uC.bind(null,e,t,n),t.then(e,e))}function uC(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,iN===e&&(iL&n)===n&&(4===iI||3===iI&&(0x3c00000&iL)===iL&&300>et()-iq?0==(2&iz)&&ul(e,0):iH|=n,iV===iL&&(iV=0)),uA(e)}function u_(e,t){0===t&&(t=eS()),null!==(e=n8(e,t))&&(eE(e,t),uA(e))}function uP(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),u_(e,n)}function uz(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;null!==l&&(n=l.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(u(314))}null!==r&&r.delete(t),u_(e,n)}var uN=null,uT=null,uL=!1,uO=!1,uR=!1,uD=0;function uA(e){e!==uT&&null===e.next&&(null===uT?uN=uT=e:uT=uT.next=e),uO=!0,uL||(uL=!0,sm(function(){0!=(6&iz)?X(er,uM):uI()}))}function uF(e,t){if(!uR&&uO){uR=!0;do for(var n=!1,r=uN;null!==r;){if(!t)if(0!==e){var l=r.pendingLanes;if(0===l)var a=0;else{var o=r.suspendedLanes,i=r.pingedLanes;a=0xc000095&(a=(1<<31-ep(42|e)+1)-1&(l&~(o&~i)))?0xc000095&a|1:a?2|a:0}0!==a&&(n=!0,uH(r,a))}else a=iL,0==(3&(a=eb(r,r===iN?a:0,null!==r.cancelPendingCommit||-1!==r.timeoutHandle)))||ek(r,a)||(n=!0,uH(r,a));r=r.next}while(n);uR=!1}}function uM(){uI()}function uI(){uO=uL=!1;var e,t=0;0!==uD&&(((e=window.event)&&"popstate"===e.type?e===sc||(sc=e,0):(sc=null,1))||(t=uD),uD=0);for(var n=et(),r=null,l=uN;null!==l;){var a=l.next,o=uU(l,n);0===o?(l.next=null,null===r?uN=a:r.next=a,null===a&&(uT=r)):(r=l,(0!==t||0!=(3&o))&&(uO=!0)),l=a}uF(t,!1)}function uU(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,l=e.expirationTimes,a=-0x3c00001&e.pendingLanes;0r){n=r;var o=e.ownerDocument;if(1&n&&sE(o.documentElement),2&n&&sE(o.body),4&n)for(sE(n=o.head),o=n.firstChild;o;){var i=o.nextSibling,u=o.nodeName;o[eI]||"SCRIPT"===u||"STYLE"===u||"LINK"===u&&"stylesheet"===o.rel.toLowerCase()||n.removeChild(o),o=i}}if(0===l){e.removeChild(a),ck(t);return}l--}else"$"===n||"$?"===n||"$!"===n?l++:r=n.charCodeAt(0)-48;else r=0;n=a}while(n);ck(t)}function sv(e){var t=e.firstChild;for(t&&10===t.nodeType&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":sv(n),eU(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if("stylesheet"===n.rel.toLowerCase())continue}e.removeChild(n)}}function sb(e){return"$!"===e.data||"$?"===e.data&&"complete"===e.ownerDocument.readyState}function sk(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t||"F!"===t||"F"===t)break;if("/$"===t)return null}}return e}var sw=null;function sS(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}function sx(e,t,n){switch(t=so(n),e){case"html":if(!(e=t.documentElement))throw Error(u(452));return e;case"head":if(!(e=t.head))throw Error(u(453));return e;case"body":if(!(e=t.body))throw Error(u(454));return e;default:throw Error(u(451))}}function sE(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);eU(e)}var sC=new Map,s_=new Set;function sP(e){return"function"==typeof e.getRootNode?e.getRootNode():9===e.nodeType?e:e.ownerDocument}var sz=A.d;A.d={f:function(){var e=sz.f(),t=un();return e||t},r:function(e){var t=eH(e);null!==t&&5===t.tag&&"form"===t.type?aO(t):sz.r(e)},D:function(e){sz.D(e),sT("dns-prefetch",e,null)},C:function(e,t){sz.C(e,t),sT("preconnect",e,t)},L:function(e,t,n){if(sz.L(e,t,n),sN&&e&&t){var r='link[rel="preload"][as="'+tt(t)+'"]';"image"===t&&n&&n.imageSrcSet?(r+='[imagesrcset="'+tt(n.imageSrcSet)+'"]',"string"==typeof n.imageSizes&&(r+='[imagesizes="'+tt(n.imageSizes)+'"]')):r+='[href="'+tt(e)+'"]';var l=r;switch(t){case"style":l=sO(e);break;case"script":l=sA(e)}sC.has(l)||(e=p({rel:"preload",href:"image"===t&&n&&n.imageSrcSet?void 0:e,as:t},n),sC.set(l,e),null!==sN.querySelector(r)||"style"===t&&sN.querySelector(sR(l))||"script"===t&&sN.querySelector(sF(l))||(sr(t=sN.createElement("link"),"link",e),eB(t),sN.head.appendChild(t)))}},m:function(e,t){if(sz.m(e,t),sN&&e){var n=t&&"string"==typeof t.as?t.as:"script",r='link[rel="modulepreload"][as="'+tt(n)+'"][href="'+tt(e)+'"]',l=r;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=sA(e)}if(!sC.has(l)&&(e=p({rel:"modulepreload",href:e},t),sC.set(l,e),null===sN.querySelector(r))){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(sN.querySelector(sF(l)))return}sr(n=sN.createElement("link"),"link",e),eB(n),sN.head.appendChild(n)}}},X:function(e,t){if(sz.X(e,t),sN&&e){var n=eV(sN).hoistableScripts,r=sA(e),l=n.get(r);l||((l=sN.querySelector(sF(r)))||(e=p({src:e,async:!0},t),(t=sC.get(r))&&sj(e,t),eB(l=sN.createElement("script")),sr(l,"link",e),sN.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},n.set(r,l))}},S:function(e,t,n){if(sz.S(e,t,n),sN&&e){var r=eV(sN).hoistableStyles,l=sO(e);t=t||"default";var a=r.get(l);if(!a){var o={loading:0,preload:null};if(a=sN.querySelector(sR(l)))o.loading=5;else{e=p({rel:"stylesheet",href:e,"data-precedence":t},n),(n=sC.get(l))&&sU(e,n);var i=a=sN.createElement("link");eB(i),sr(i,"link",e),i._p=new Promise(function(e,t){i.onload=e,i.onerror=t}),i.addEventListener("load",function(){o.loading|=1}),i.addEventListener("error",function(){o.loading|=2}),o.loading|=4,sI(a,t,sN)}a={type:"stylesheet",instance:a,count:1,state:o},r.set(l,a)}}},M:function(e,t){if(sz.M(e,t),sN&&e){var n=eV(sN).hoistableScripts,r=sA(e),l=n.get(r);l||((l=sN.querySelector(sF(r)))||(e=p({src:e,async:!0,type:"module"},t),(t=sC.get(r))&&sj(e,t),eB(l=sN.createElement("script")),sr(l,"link",e),sN.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},n.set(r,l))}}};var sN="undefined"==typeof document?null:document;function sT(e,t,n){if(sN&&"string"==typeof t&&t){var r=tt(t);r='link[rel="'+e+'"][href="'+r+'"]',"string"==typeof n&&(r+='[crossorigin="'+n+'"]'),s_.has(r)||(s_.add(r),e={rel:e,crossOrigin:n,href:t},null===sN.querySelector(r)&&(sr(t=sN.createElement("link"),"link",e),eB(t),sN.head.appendChild(t)))}}function sL(e,t,n,r){var l=(l=B.current)?sP(l):null;if(!l)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return"string"==typeof n.precedence&&"string"==typeof n.href?(t=sO(n.href),(r=(n=eV(l).hoistableStyles).get(t))||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if("stylesheet"===n.rel&&"string"==typeof n.href&&"string"==typeof n.precedence){e=sO(n.href);var a,o,i,s,c=eV(l).hoistableStyles,f=c.get(e);if(f||(l=l.ownerDocument||l,f={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,f),(c=l.querySelector(sR(e)))&&!c._p&&(f.instance=c,f.state.loading=5),sC.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},sC.set(e,n),c||(a=l,o=e,i=n,s=f.state,a.querySelector('link[rel="preload"][as="style"]['+o+"]")?s.loading=1:(s.preload=o=a.createElement("link"),o.addEventListener("load",function(){return s.loading|=1}),o.addEventListener("error",function(){return s.loading|=2}),sr(o,"link",i),eB(o),a.head.appendChild(o))))),t&&null===r)throw Error(u(528,""));return f}if(t&&null!==r)throw Error(u(529,""));return null;case"script":return t=n.async,"string"==typeof(n=n.src)&&t&&"function"!=typeof t&&"symbol"!=typeof t?(t=sA(n),(r=(n=eV(l).hoistableScripts).get(t))||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function sO(e){return'href="'+tt(e)+'"'}function sR(e){return'link[rel="stylesheet"]['+e+"]"}function sD(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function sA(e){return'[src="'+tt(e)+'"]'}function sF(e){return"script[async]"+e}function sM(e,t,n){if(t.count++,null===t.instance)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+tt(n.href)+'"]');if(r)return t.instance=r,eB(r),r;var l=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return eB(r=(e.ownerDocument||e).createElement("style")),sr(r,"style",l),sI(r,n.precedence,e),t.instance=r;case"stylesheet":l=sO(n.href);var a=e.querySelector(sR(l));if(a)return t.state.loading|=4,t.instance=a,eB(a),a;r=sD(n),(l=sC.get(l))&&sU(r,l),eB(a=(e.ownerDocument||e).createElement("link"));var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),sr(a,"link",r),t.state.loading|=4,sI(a,n.precedence,e),t.instance=a;case"script":if(a=sA(n.src),l=e.querySelector(sF(a)))return t.instance=l,eB(l),l;return r=n,(l=sC.get(a))&&sj(r=p({},n),l),eB(l=(e=e.ownerDocument||e).createElement("script")),sr(l,"link",r),e.head.appendChild(l),t.instance=l;case"void":return null;default:throw Error(u(443,t.type))}return"stylesheet"===t.type&&0==(4&t.state.loading)&&(r=t.instance,t.state.loading|=4,sI(r,n.precedence,e)),t.instance}function sI(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=r.length?r[r.length-1]:null,a=l,o=0;o title"):null)}function sB(e){return"stylesheet"!==e.type||0!=(3&e.state.loading)}var sQ=null;function sW(){}function sq(){if(this.count--,0===this.count){if(this.stylesheets)sY(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sK=null;function sY(e,t){e.stylesheets=null,null!==e.unsuspend&&(e.count++,sK=new Map,t.forEach(sG,e),sK=null,sq.call(e))}function sG(e,t){if(!(4&t.state.loading)){var n=sK.get(e);if(n)var r=n.get(null);else{n=new Map,sK.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),a=0;a{var r=n(4232);function l(e){var t="https://react.dev/errors/"+e;if(1{e.exports=n(8228)},8228:(e,t)=>{var n=Symbol.for("react.transitional.element");function r(e,t,r){var l=null;if(void 0!==r&&(l=""+r),void 0!==t.key&&(l=""+t.key),"key"in t)for(var a in r={},t)"key"!==a&&(r[a]=t[a]);else r=t;return{$$typeof:n,type:e,key:l,ref:void 0!==(t=r.ref)?t:null,props:r}}t.Fragment=Symbol.for("react.fragment"),t.jsx=r,t.jsxs=r},8477:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4655)},8944:(e,t,n)=>{!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4279)},9752:(e,t,n)=>{e.exports=n(2897)}}]); \ No newline at end of file diff --git a/_next/static/chunks/main-aa062daf7f95e72c.js b/_next/static/chunks/main-aa062daf7f95e72c.js new file mode 100644 index 0000000000000000000000000000000000000000..284a66a83d9f722a629e1e96bee426435b3e80ba --- /dev/null +++ b/_next/static/chunks/main-aa062daf7f95e72c.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[792],{303:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});let n=r(4252)._(r(4232)).default.createContext({})},472:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let n=r(4252),o=r(7876),a=n._(r(4232)),i=r(2746);async function l(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,i.loadGetInitialProps)(t,r)}}class u extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}u.origGetInitialProps=l,u.getInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},536:(e,t)=>{"use strict";function r(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"encodeURIPath",{enumerable:!0,get:function(){return r}})},541:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return a}});let n=r(2746),o=r(8040);function a(e,t,r){void 0===r&&(r=!0);let a=new URL((0,n.getLocationOrigin)()),i=t?new URL(t,a):e.startsWith(".")?new URL(window.location.href):a,{pathname:l,searchParams:u,search:s,hash:c,href:f,origin:d}=new URL(e,i);if(d!==a.origin)throw Object.defineProperty(Error("invariant: invalid relative URL, router received "+e),"__NEXT_ERROR_CODE",{value:"E159",enumerable:!1,configurable:!0});return{pathname:l,query:r?(0,o.searchParamsToUrlQuery)(u):void 0,search:s,hash:c,href:f.slice(d.length)}}},938:(e,t)=>{"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},990:(e,t)=>{"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},1017:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}});var r=function(e){return e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect",e}({});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1025:(e,t,r)=>{"use strict";function n(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(6023),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1226:()=>{},1291:()=>{"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1318:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return u},default:function(){return s}});let n=r(4252),o=r(7876),a=n._(r(4232)),i=r(4294),l={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},u=()=>{let{asPath:e}=(0,i.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e)if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1");r((null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent)||e)}},[e]),(0,o.jsx)("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:l,children:t})},s=u;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1533:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(2746),o=r(6023);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},1827:(e,t)=>{"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},1862:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return n}});let r=new WeakMap;function n(e,t){let n;if(!t)return{pathname:e};let o=r.get(t);o||(o=t.map(e=>e.toLowerCase()),r.set(t,o));let a=e.split("/",2);if(!a[1])return{pathname:e};let i=a[1].toLowerCase(),l=o.indexOf(i);return l<0?{pathname:e}:(n=t[l],{pathname:e=e.slice(n.length+1)||"/",detectedLocale:n})}},1921:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(8040),o=r(8480),a=r(990),i=r(2746),l=r(8205),u=r(1533),s=r(3069),c=r(8069);function f(e,t,r){let f,d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,u.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,l.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:l}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(r,l)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1924:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(e){return r.test(e)?e.replace(n,"\\$&"):e}},2092:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});let n=r(2889),o=r(8205);function a(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2326:(e,t)=>{"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},2455:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HTML_LIMITED_BOT_UA_RE",{enumerable:!0,get:function(){return r}});let r=/Mediapartners-Google|Slurp|DuckDuckBot|baiduspider|yandex|sogou|bitlybot|tumblr|vkShare|quora link preview|redditbot|ia_archiver|Bingbot|BingPreview|applebot|facebookexternalhit|facebookcatalog|Twitterbot|LinkedInBot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|Yeti/i},2591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{REDIRECT_ERROR_CODE:function(){return o},RedirectType:function(){return a},isRedirectError:function(){return i}});let n=r(1017),o="NEXT_REDIRECT";var a=function(e){return e.push="push",e.replace="replace",e}({});function i(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let t=e.digest.split(";"),[r,a]=t,i=t.slice(2,-2).join(";"),l=Number(t.at(-2));return r===o&&("replace"===a||"push"===a)&&"string"==typeof i&&!isNaN(l)&&l in n.RedirectStatusCode}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2616:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});let r=function(){for(var e=arguments.length,t=Array(e),r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return g},NormalizeError:function(){return _},PageNotFoundError:function(){return m},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return u},getLocationOrigin:function(){return i},getURL:function(){return l},isAbsoluteUrl:function(){return a},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return E}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function l(){let{href:e}=window.location,t=i();return e.substring(t.length)}function u(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Object.defineProperty(Error('"'+u(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class _ extends Error{}class m extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function E(e){return JSON.stringify({message:e.message,stack:e.stack})}},2792:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(4252),o=r(2092),a=r(8069),i=n._(r(1827)),l=r(4591),u=r(9163),s=r(541),c=r(4902),f=r(7176);r(3802);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(r),{pathname:h}=(0,s.parseRelativeUrl)(t),_=(0,c.removeTrailingSlash)(f);if("/"!==_[0])throw Object.defineProperty(Error('Route name should start with a "/", got "'+_+'"'),"__NEXT_ERROR_CODE",{value:"E303",enumerable:!1,configurable:!0});var m=e.skipInterpolation?h:(0,u.isDynamicRoute)(_)?(0,a.interpolateAs)(f,h,d).result:_;let g=(0,i.default)((0,c.removeTrailingSlash)((0,l.addLocale)(m,n)),".json");return(0,o.addBasePath)("/_next/data/"+this.buildId+g+p,!0)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2850:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return u},TemplateContext:function(){return l}});let n=r(4252)._(r(4232)),o=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(null),l=n.default.createContext(null),u=n.default.createContext(new Set)},2889:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(3670);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+t+r+o+a}},2917:(e,t)=>{"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return o}});let n=()=>r;function o(e){r=e}},2959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return a},normalizeRscURL:function(){return i}});let n=r(938),o=r(8714);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function i(e){return e.replace(/\.rsc($|\?)/,"$1")}},3069:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return n.getSortedRouteObjects},getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(3703),o=r(9163)},3090:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return a}});let n=r(4232),o=r(8477),a=e=>{let{children:t,type:r}=e,[a,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),a?(0,o.createPortal)(t,a):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3123:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},3132:(e,t)=>{"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange)return void e();let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},3407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(1862),o=r(6292),a=r(3716);function i(e,t){var r,i;let{basePath:l,i18n:u,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};l&&(0,a.pathHasPrefix)(c.pathname,l)&&(c.pathname=(0,o.removePathPrefix)(c.pathname,l),c.basePath=l);let f=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/");c.buildId=e[0],f="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=f)}if(u){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,n.normalizeLocalePath)(c.pathname,u.locales);c.locale=e.detectedLocale,c.pathname=null!=(i=e.pathname)?i:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(f):(0,n.normalizeLocalePath)(f,u.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},3575:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getReactStitchedError",{enumerable:!0,get:function(){return s}});let n=r(4252),o=n._(r(4232)),a=n._(r(6240)),i=r(8089),l="react-stack-bottom-frame",u=RegExp("(at "+l+" )|("+l+"\\@)");function s(e){let t=(0,a.default)(e),r=t&&e.stack||"",n=t?e.message:"",l=r.split("\n"),s=l.findIndex(e=>u.test(e)),c=s>=0?l.slice(0,s).join("\n"):r,f=Object.defineProperty(Error(n),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return Object.assign(f,e),(0,i.copyNextErrorCode)(e,f),f.stack=c,function(e){if(!o.default.captureOwnerStack)return;let t=e.stack||"",r=o.default.captureOwnerStack();r&&!1===t.endsWith(r)&&(e.stack=t+=r)}(f),f}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3670:(e,t)=>{"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},3703:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRouteObjects:function(){return o},getSortedRoutes:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").'),"__NEXT_ERROR_CODE",{value:"E458",enumerable:!1,configurable:!0});r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Object.defineProperty(Error("Catch-all must be the last part of the URL."),"__NEXT_ERROR_CODE",{value:"E392",enumerable:!1,configurable:!0});let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("…"))throw Object.defineProperty(Error("Detected a three-dot character ('…') at ('"+r+"'). Did you mean ('...')?"),"__NEXT_ERROR_CODE",{value:"E147",enumerable:!1,configurable:!0});if(r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Object.defineProperty(Error("Segment names may not start or end with extra brackets ('"+r+"')."),"__NEXT_ERROR_CODE",{value:"E421",enumerable:!1,configurable:!0});if(r.startsWith("."))throw Object.defineProperty(Error("Segment names may not start with erroneous periods ('"+r+"')."),"__NEXT_ERROR_CODE",{value:"E288",enumerable:!1,configurable:!0});function a(e,r){if(null!==e&&e!==r)throw Object.defineProperty(Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"')."),"__NEXT_ERROR_CODE",{value:"E337",enumerable:!1,configurable:!0});t.forEach(e=>{if(e===r)throw Object.defineProperty(Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E247",enumerable:!1,configurable:!0});if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Object.defineProperty(Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path'),"__NEXT_ERROR_CODE",{value:"E499",enumerable:!1,configurable:!0})}),t.push(r)}if(n)if(i){if(null!=this.restSlugName)throw Object.defineProperty(Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).'),"__NEXT_ERROR_CODE",{value:"E299",enumerable:!1,configurable:!0});a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Object.defineProperty(Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E300",enumerable:!1,configurable:!0});a(this.restSlugName,r),this.restSlugName=r,o="[...]"}else{if(i)throw Object.defineProperty(Error('Optional route parameters are not yet supported ("'+e[0]+'").'),"__NEXT_ERROR_CODE",{value:"E435",enumerable:!1,configurable:!0});a(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}function o(e,t){let r={},o=[];for(let n=0;ne[r[t]])}},3716:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(3670);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},3718:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(8757),self.__next_set_public_path__=e=>{r.p=e},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3776:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(4232),o=n.useLayoutEffect,a=n.useEffect;function i(e){let{headManager:t,reduceComponentsToState:r}=e;function i(){if(t&&t.mountedInstances){let o=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(o,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},3802:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return E},APP_CLIENT_INTERNALS:function(){return Q},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return g},BARREL_OPTIMIZATION_PREFIX:function(){return X},BLOCKED_PAGES:function(){return U},BUILD_ID_FILE:function(){return D},BUILD_MANIFEST:function(){return b},CLIENT_PUBLIC_FILES_PATH:function(){return k},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return F},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return K},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return $},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return et},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return er},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return J},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ee},COMPILER_INDEXES:function(){return a},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return en},DEFAULT_SANS_SERIF_FONT:function(){return eu},DEFAULT_SERIF_FONT:function(){return el},DEV_CLIENT_MIDDLEWARE_MANIFEST:function(){return N},DEV_CLIENT_PAGES_MANIFEST:function(){return C},DYNAMIC_CSS_MANIFEST:function(){return Y},EDGE_RUNTIME_WEBPACK:function(){return eo},EDGE_UNSUPPORTED_NODE_APIS:function(){return ep},EXPORT_DETAIL:function(){return O},EXPORT_MARKER:function(){return R},FUNCTIONS_CONFIG_MANIFEST:function(){return y},IMAGES_MANIFEST:function(){return T},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return z},MIDDLEWARE_BUILD_MANIFEST:function(){return q},MIDDLEWARE_MANIFEST:function(){return w},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return V},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return H},NEXT_FONT_MANIFEST:function(){return v},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return f},PHASE_EXPORT:function(){return u},PHASE_INFO:function(){return p},PHASE_PRODUCTION_BUILD:function(){return s},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return d},PRERENDER_MANIFEST:function(){return S},REACT_LOADABLE_MANIFEST:function(){return x},ROUTES_MANIFEST:function(){return j},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return M},SERVER_FILES_MANIFEST:function(){return A},SERVER_PROPS_ID:function(){return ei},SERVER_REFERENCE_MANIFEST:function(){return G},STATIC_PROPS_ID:function(){return ea},STATIC_STATUS_PAGES:function(){return es},STRING_LITERAL_DROP_BUNDLE:function(){return B},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return P},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBOPACK_CLIENT_MIDDLEWARE_MANIFEST:function(){return I},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ef},UNDERSCORE_NOT_FOUND_ROUTE:function(){return i},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return l},WEBPACK_STATS:function(){return _}});let n=r(4252)._(r(6582)),o={client:"client",server:"server",edgeServer:"edge-server"},a={[o.client]:0,[o.server]:1,[o.edgeServer]:2},i="/_not-found",l=""+i+"/page",u="phase-export",s="phase-production-build",c="phase-production-server",f="phase-development-server",d="phase-test",p="phase-info",h="pages-manifest.json",_="webpack-stats.json",m="app-paths-manifest.json",g="app-path-routes-manifest.json",b="build-manifest.json",E="app-build-manifest.json",y="functions-config-manifest.json",P="subresource-integrity-manifest",v="next-font-manifest",R="export-marker.json",O="export-detail.json",S="prerender-manifest.json",j="routes-manifest.json",T="images-manifest.json",A="required-server-files.json",C="_devPagesManifest.json",w="middleware-manifest.json",I="_clientMiddlewareManifest.json",N="_devMiddlewareManifest.json",x="react-loadable-manifest.json",M="server",L=["next.config.js","next.config.mjs","next.config.ts"],D="BUILD_ID",U=["/_document","/_app","/_error"],k="public",F="static",B="__NEXT_DROP_CLIENT_FILE__",H="__NEXT_BUILTIN_DOCUMENT__",X="__barrel_optimize__",W="client-reference-manifest",G="server-reference-manifest",q="middleware-build-manifest",V="middleware-react-loadable-manifest",z="interception-route-rewrite-manifest",Y="dynamic-css-manifest",K="main",$=""+K+"-app",Q="app-pages-internals",J="react-refresh",Z="amp",ee="webpack",et="polyfills",er=Symbol(et),en="webpack-runtime",eo="edge-runtime-webpack",ea="__N_SSG",ei="__N_SSP",el={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},eu={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},es=["/500"],ec=1,ef=6e3,ed={client:"client",server:"server"},ep=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([K,J,Z,$]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3836:(e,t,r)=>{"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(3670),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return b},handleClientScriptLoad:function(){return _},initScriptLoader:function(){return m}});let n=r(4252),o=r(8365),a=r(7876),i=n._(r(8477)),l=o._(r(4232)),u=r(8831),s=r(9611),c=r(6959),f=new Map,d=new Set,p=e=>{if(i.default.preinit)return void e.forEach(e=>{i.default.preinit(e,{as:"style"})});{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},h=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:o=null,dangerouslySetInnerHTML:a,children:i="",strategy:l="afterInteractive",onError:u,stylesheets:c}=e,h=r||t;if(h&&d.has(h))return;if(f.has(t)){d.add(h),f.get(t).then(n,u);return}let _=()=>{o&&o(),d.add(h)},m=document.createElement("script"),g=new Promise((e,t)=>{m.addEventListener("load",function(t){e(),n&&n.call(this,t),_()}),m.addEventListener("error",function(e){t(e)})}).catch(function(e){u&&u(e)});a?(m.innerHTML=a.__html||"",_()):i?(m.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",_()):t&&(m.src=t,f.set(t,g)),(0,s.setAttributesFromProps)(m,e),"worker"===l&&m.setAttribute("type","text/partytown"),m.setAttribute("data-nscript",l),c&&p(c),document.body.appendChild(m)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>h(e))}):h(e)}function m(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function g(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:o=null,strategy:s="afterInteractive",onError:f,stylesheets:p,..._}=e,{updateScripts:m,scripts:g,getIsSsr:b,appDir:E,nonce:y}=(0,l.useContext)(u.HeadManagerContext),P=(0,l.useRef)(!1);(0,l.useEffect)(()=>{let e=t||r;P.current||(o&&e&&d.has(e)&&o(),P.current=!0)},[o,t,r]);let v=(0,l.useRef)(!1);if((0,l.useEffect)(()=>{if(!v.current){if("afterInteractive"===s)h(e);else"lazyOnload"===s&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>h(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>h(e))}));v.current=!0}},[e,s]),("beforeInteractive"===s||"worker"===s)&&(m?(g[s]=(g[s]||[]).concat([{id:t,src:r,onLoad:n,onReady:o,onError:f,..._}]),m(g)):b&&b()?d.add(t||r):b&&!b()&&h(e)),E){if(p&&p.forEach(e=>{i.default.preinit(e,{as:"style"})}),"beforeInteractive"===s)if(!r)return _.dangerouslySetInnerHTML&&(_.children=_.dangerouslySetInnerHTML.__html,delete _.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{..._,id:t}])+")"}});else return i.default.preload(r,_.integrity?{as:"script",integrity:_.integrity,nonce:y,crossOrigin:_.crossOrigin}:{as:"script",nonce:y,crossOrigin:_.crossOrigin}),(0,a.jsx)("script",{nonce:y,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{..._,id:t}])+")"}});"afterInteractive"===s&&r&&i.default.preload(r,_.integrity?{as:"script",integrity:_.integrity,nonce:y,crossOrigin:_.crossOrigin}:{as:"script",nonce:y,crossOrigin:_.crossOrigin})}return null}Object.defineProperty(g,"__nextScript",{value:!0});let b=g;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4069:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=1e-4);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){return{numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray}}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r>>13,t=Math.imul(t,0x5bd1e995);return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},4181:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HTTPAccessErrorStatus:function(){return r},HTTP_ERROR_FALLBACK_ERROR_CODE:function(){return o},getAccessFallbackErrorTypeByStatus:function(){return l},getAccessFallbackHTTPStatus:function(){return i},isHTTPAccessFallbackError:function(){return a}});let r={NOT_FOUND:404,FORBIDDEN:403,UNAUTHORIZED:401},n=new Set(Object.values(r)),o="NEXT_HTTP_ERROR_FALLBACK";function a(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r]=e.digest.split(";");return t===o&&n.has(Number(r))}function i(e){return Number(e.digest.split(";")[1])}function l(e){switch(e){case 401:return"unauthorized";case 403:return"forbidden";case 404:return"not-found";default:return}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4252:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:()=>n})},4294:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return a.default},createRouter:function(){return _},default:function(){return p},makePublicRouterInstance:function(){return m},useRouter:function(){return h},withRouter:function(){return u.default}});let n=r(4252),o=n._(r(4232)),a=n._(r(8276)),i=r(9948),l=n._(r(6240)),u=n._(r(8147)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Object.defineProperty(Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n'),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return s.router}Object.defineProperty(s,"events",{get:()=>a.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get:()=>d()[e]})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n{s.ready(()=>{a.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;ne()),s.readyCallbacks=[],s.router}function m(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=a.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),o=0;o{"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let o=r[n];if("query"===o){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let o=r[n];if(!t.query.hasOwnProperty(o)||e.query[o]!==t.query[o])return!1}}else if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},4547:(e,t,r)=>{"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return i},isEqualNode:function(){return a}});let o=r(9611);function a(e,t){if(e instanceof HTMLElement&&t instanceof HTMLElement){let r=t.getAttribute("nonce");if(r&&!e.getAttribute("nonce")){let n=t.cloneNode(!0);return n.setAttribute("nonce",""),n.nonce=r,r===e.nonce&&e.isEqualNode(n)}}return e.isEqualNode(t)}function i(){return{mountedInstances:new Set,updateHead:e=>{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"])if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;else e.props.href=e.props["data-href"],e.props["data-href"]=void 0;let r=t[e.type]||[];r.push(e),t[e.type]=r});let r=t.title?t.title[0]:null,o="";if(r){let{children:e}=r.props;o="string"==typeof e?e:Array.isArray(e)?e.join(""):""}o!==document.title&&(document.title=o),["meta","base","link","style","script"].forEach(e=>{n(e,t[e]||[])})}}}n=(e,t)=>{let r=document.querySelector("head");if(!r)return;let n=new Set(r.querySelectorAll(""+e+"[data-next-head]"));if("meta"===e){let e=r.querySelector("meta[charset]");null!==e&&n.add(e)}let i=[];for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reportGlobalError",{enumerable:!0,get:function(){return r}});let r="function"==typeof reportError?reportError:e=>{globalThis.console.error(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(8205);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(4252)._(r(9871));class o{end(e){if("ended"===this.state.state)throw Object.defineProperty(Error("Span has already ended"),"__NEXT_ERROR_CODE",{value:"E17",enumerable:!1,configurable:!0});this.state={state:"ended",endTime:null!=e?e:Date.now()},this.onSpanEnd(this)}constructor(e,t,r){var n,o;this.name=e,this.attributes=null!=(n=t.attributes)?n:{},this.startTime=null!=(o=t.startTime)?o:Date.now(),this.onSpanEnd=r,this.state={state:"inprogress"}}}class a{startSpan(e,t){return new o(e,t,this.handleSpanEnd)}onSpanEnd(e){return this._emitter.on("spanend",e),()=>{this._emitter.off("spanend",e)}}constructor(){this._emitter=(0,n.default)(),this.handleSpanEnd=e=>{this._emitter.emit("spanend",e)}}}let i=new a;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4902:(e,t)=>{"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},4980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return l}});let n=r(4902),o=r(2889),a=r(7952),i=r(6711);function l(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,a.addPathSuffix)((0,o.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,o.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,a.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},5195:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(3069),o=r(5419);function a(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},5214:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return _},getNamedRouteRegex:function(){return h},getRouteRegex:function(){return f},parseParameter:function(){return u}});let n=r(9308),o=r(7188),a=r(1924),i=r(4902),l=/^([^[]*)\[((?:\[[^\]]*\])|[^\]]+)\](.*)$/;function u(e){let t=e.match(l);return t?s(t[2]):s(e)}function s(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function c(e,t,r){let n={},u=1,c=[];for(let f of(0,i.removeTrailingSlash)(e).slice(1).split("/")){let e=o.INTERCEPTION_ROUTE_MARKERS.find(e=>f.startsWith(e)),i=f.match(l);if(e&&i&&i[2]){let{key:t,optional:r,repeat:o}=s(i[2]);n[t]={pos:u++,repeat:o,optional:r},c.push("/"+(0,a.escapeStringRegexp)(e)+"([^/]+?)")}else if(i&&i[2]){let{key:e,repeat:t,optional:o}=s(i[2]);n[e]={pos:u++,repeat:t,optional:o},r&&i[1]&&c.push("/"+(0,a.escapeStringRegexp)(i[1]));let l=t?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)";r&&i[1]&&(l=l.substring(1)),c.push(l)}else c.push("/"+(0,a.escapeStringRegexp)(f));t&&i&&i[3]&&c.push((0,a.escapeStringRegexp)(i[3]))}return{parameterizedRoute:c.join(""),groups:n}}function f(e,t){let{includeSuffix:r=!1,includePrefix:n=!1,excludeOptionalTrailingSlash:o=!1}=void 0===t?{}:t,{parameterizedRoute:a,groups:i}=c(e,r,n),l=a;return o||(l+="(?:/)?"),{re:RegExp("^"+l+"$"),groups:i}}function d(e){let t,{interceptionMarker:r,getSafeRouteKey:n,segment:o,routeKeys:i,keyPrefix:l,backreferenceDuplicateKeys:u}=e,{key:c,optional:f,repeat:d}=s(o),p=c.replace(/\W/g,"");l&&(p=""+l+p);let h=!1;(0===p.length||p.length>30)&&(h=!0),isNaN(parseInt(p.slice(0,1)))||(h=!0),h&&(p=n());let _=p in i;l?i[p]=""+l+c:i[p]=c;let m=r?(0,a.escapeStringRegexp)(r):"";return t=_&&u?"\\k<"+p+">":d?"(?<"+p+">.+?)":"(?<"+p+">[^/]+?)",f?"(?:/"+m+t+")?":"/"+m+t}function p(e,t,r,u,s){let c,f=(c=0,()=>{let e="",t=++c;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),p={},h=[];for(let c of(0,i.removeTrailingSlash)(e).slice(1).split("/")){let e=o.INTERCEPTION_ROUTE_MARKERS.some(e=>c.startsWith(e)),i=c.match(l);if(e&&i&&i[2])h.push(d({getSafeRouteKey:f,interceptionMarker:i[1],segment:i[2],routeKeys:p,keyPrefix:t?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0,backreferenceDuplicateKeys:s}));else if(i&&i[2]){u&&i[1]&&h.push("/"+(0,a.escapeStringRegexp)(i[1]));let e=d({getSafeRouteKey:f,segment:i[2],routeKeys:p,keyPrefix:t?n.NEXT_QUERY_PARAM_PREFIX:void 0,backreferenceDuplicateKeys:s});u&&i[1]&&(e=e.substring(1)),h.push(e)}else h.push("/"+(0,a.escapeStringRegexp)(c));r&&i&&i[3]&&h.push((0,a.escapeStringRegexp)(i[3]))}return{namedParameterizedRoute:h.join(""),routeKeys:p}}function h(e,t){var r,n,o;let a=p(e,t.prefixRouteKeys,null!=(r=t.includeSuffix)&&r,null!=(n=t.includePrefix)&&n,null!=(o=t.backreferenceDuplicateKeys)&&o),i=a.namedParameterizedRoute;return t.excludeOptionalTrailingSlash||(i+="(?:/)?"),{...f(e,t),namedRegex:"^"+i+"$",routeKeys:a.routeKeys}}function _(e,t){let{parameterizedRoute:r}=c(e,!1,!1),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=p(e,!1,!1,!1,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},5364:(e,t,r)=>{"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(5861)},5419:(e,t)=>{"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},5519:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(2746);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw Object.defineProperty(new n.DecodeError("failed to decode param"),"__NEXT_ERROR_CODE",{value:"E528",enumerable:!1,configurable:!0})}},i={};for(let[e,t]of Object.entries(r)){let r=o[t.pos];void 0!==r&&(t.repeat?i[e]=r.split("/").map(e=>a(e)):i[e]=a(r))}return i}}},5679:(e,t,r)=>{"use strict";var n=r(5364);Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return m},defaultHead:function(){return d}});let o=r(4252),a=r(8365),i=r(7876),l=a._(r(4232)),u=o._(r(3776)),s=r(303),c=r(8831),f=r(6807);function d(e){void 0===e&&(e=!1);let t=[(0,i.jsx)("meta",{charSet:"utf-8"},"charset")];return e||t.push((0,i.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")),t}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(6079);let h=["name","httpEquiv","charSet","itemProp"];function _(e,t){let{inAmpMode:r}=t;return e.reduce(p,[]).reverse().concat(d(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let a=!0,i=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){i=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?a=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(let e=0,t=h.length;e{let o=e.key||t;if(n.env.__NEXT_OPTIMIZE_FONTS&&!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,l.default.cloneElement(e,t)}return l.default.cloneElement(e,{key:o})})}let m=function(e){let{children:t}=e,r=(0,l.useContext)(s.AmpStateContext),n=(0,l.useContext)(c.HeadManagerContext);return(0,i.jsx)(u.default,{reduceComponentsToState:_,headManager:n,inAmpMode:(0,f.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5842:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(3718),r(7647);let n=r(9525);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5861:e=>{!function(){var t={229:function(e){var t,r,n,o=e.exports={};function a(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:i}catch(e){r=i}function l(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var u=[],s=!1,c=-1;function f(){s&&n&&(s=!1,n.length?u=n.concat(u):c=-1,u.length&&d())}function d(){if(!s){var e=l(f);s=!0;for(var t=u.length;t;){for(n=u,u=[];++c1)for(var r=1;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathParamsContext:function(){return i},PathnameContext:function(){return a},SearchParamsContext:function(){return o}});let n=r(4232),o=(0,n.createContext)(null),a=(0,n.createContext)(null),i=(0,n.createContext)(null)},6023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return o}});let n=r(3716);function o(e){return(0,n.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6079:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},6240:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return a}});let n=r(8096);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function a(e){return o(e)?e:Object.defineProperty(Error((0,n.isPlainObject)(e)?function(e){let t=new WeakSet;return JSON.stringify(e,(e,r)=>{if("object"==typeof r&&null!==r){if(t.has(r))return"[Circular]";t.add(r)}return r})}(e):e+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0})}},6292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return o}});let n=r(3716);function o(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},6582:e=>{"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},6711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return a}});let n=r(2889),o=r(3716);function a(e,t,r,a){if(!t||t===r)return e;let i=e.toLowerCase();return!a&&((0,o.pathHasPrefix)(i,"/api")||(0,o.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},6807:(e,t)=>{"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},6818:(e,t)=>{"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6959:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6999:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return a}});let n=r(4181),o=r(2591);function a(e){return(0,o.isRedirectError)(e)||(0,n.isHTTPAccessFallbackError)(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7176:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return h},isAssetError:function(){return c},markAssetError:function(){return s}}),r(4252),r(1827);let n=r(6818),o=r(6959),a=r(8757),i=r(536);function l(e,t,r){let n,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);let a=new Promise(e=>{n=e});return t.set(e,{resolve:n,future:a}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):a}let u=Symbol("ASSET_LOAD_ERROR");function s(e){return Object.defineProperty(e,u,{})}function c(e){return e&&u in e}let f=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),d=()=>(0,a.getDeploymentIdQueryOrEmptyString)();function p(e,t,r){return new Promise((n,a)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(a),(0,o.requestIdleCallback)(()=>setTimeout(()=>{i||a(r)},t))})}function h(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):p(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,s(Object.defineProperty(Error("Failed to load client build manifest"),"__NEXT_ERROR_CODE",{value:"E273",enumerable:!1,configurable:!0})))}function _(e,t){return h().then(r=>{if(!(t in r))throw s(Object.defineProperty(Error("Failed to lookup route: "+t),"__NEXT_ERROR_CODE",{value:"E446",enumerable:!1,configurable:!0}));let o=r[t].map(t=>e+"/_next/"+(0,i.encodeURIPath)(t));return{scripts:o.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+d()),css:o.filter(e=>e.endsWith(".css")).map(e=>e+d())}})}function m(e){let t=new Map,r=new Map,n=new Map,a=new Map;function i(e){{var t;let n=r.get(e.toString());return n?n:document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(s(Object.defineProperty(Error("Failed to load script: "+e),"__NEXT_ERROR_CODE",{value:"E74",enumerable:!1,configurable:!0}))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n)}}function u(e){let t=n.get(e);return t||n.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Object.defineProperty(Error("Failed to load stylesheet: "+e),"__NEXT_ERROR_CODE",{value:"E189",enumerable:!1,configurable:!0});return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw s(e)})),t}return{whenEntrypoint:e=>l(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),a.delete(e))})},loadRoute(r,n){return l(r,a,()=>{let o;return p(_(e,r).then(e=>{let{scripts:n,css:o}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(i)),Promise.all(o.map(u))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,s(Object.defineProperty(Error("Route did not complete loading: "+r),"__NEXT_ERROR_CODE",{value:"E12",enumerable:!1,configurable:!0}))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==o?void 0:o())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():_(e,t).then(e=>Promise.all(f?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,o)=>{let a='\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]';if(document.querySelector(a))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>o(s(Object.defineProperty(Error("Failed to prefetch: "+t),"__NEXT_ERROR_CODE",{value:"E268",enumerable:!1,configurable:!0}))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,o.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7188:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return a}});let n=r(2959),o=["(..)(..)","(.)","(..)","(...)"];function a(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function i(e){let t,r,a;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,a]=e.split(r,2);break}if(!t||!r||!a)throw Object.defineProperty(Error("Invalid interception route: "+e+". Must be in the format //(..|...|..)(..)/"),"__NEXT_ERROR_CODE",{value:"E269",enumerable:!1,configurable:!0});switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":a="/"===t?"/"+a:t+"/"+a;break;case"(..)":if("/"===t)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..) marker at the root level, use (.) instead."),"__NEXT_ERROR_CODE",{value:"E207",enumerable:!1,configurable:!0});a=t.split("/").slice(0,-1).concat(a).join("/");break;case"(...)":a="/"+a;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Object.defineProperty(Error("Invalid interception route: "+e+". Cannot use (..)(..) marker at the root level or one level up."),"__NEXT_ERROR_CODE",{value:"E486",enumerable:!1,configurable:!0});a=i.slice(0,-2).concat(a).join("/");break;default:throw Object.defineProperty(Error("Invariant: unexpected marker"),"__NEXT_ERROR_CODE",{value:"E112",enumerable:!1,configurable:!0})}return{interceptingRoute:t,interceptedRoute:a}}},7207:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"onRecoverableError",{enumerable:!0,get:function(){return u}});let n=r(4252),o=r(3123),a=r(4569),i=r(3575),l=n._(r(6240)),u=(e,t)=>{let r=(0,l.default)(e)&&"cause"in e?e.cause:e,n=(0,i.getReactStitchedError)(r);(0,o.isBailoutToCSRError)(r)||(0,a.reportGlobalError)(n)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7407:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{HTML_LIMITED_BOT_UA_RE:function(){return n.HTML_LIMITED_BOT_UA_RE},HTML_LIMITED_BOT_UA_RE_STRING:function(){return a},getBotType:function(){return u},isBot:function(){return l}});let n=r(2455),o=/Googlebot|Google-PageRenderer|AdsBot-Google|googleweblight|Storebot-Google/i,a=n.HTML_LIMITED_BOT_UA_RE.source;function i(e){return n.HTML_LIMITED_BOT_UA_RE.test(e)}function l(e){return o.test(e)||i(e)}function u(e){return o.test(e)?"dom":i(e)?"html":void 0}},7539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:void 0,unoptimized:!1}},7647:(e,t,r)=>{"use strict";e.exports=r(9393)},7952:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return o}});let n=r(3670);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+r+t+o+a}},8040:(e,t)=>{"use strict";function r(e){let t={};for(let[r,n]of e.entries()){let e=t[r];void 0===e?t[r]=n:Array.isArray(e)?e.push(n):t[r]=[e,n]}return t}function n(e){return"string"==typeof e?e:("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;for(let[r,o]of Object.entries(e))if(Array.isArray(o))for(let e of o)t.append(r,n(e));else t.set(r,n(o));return t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(5519),o=r(5214);function a(e,t,r){let a="",i=(0,o.getRouteRegex)(e),l=i.groups,u=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;a=e;let s=Object.keys(l);return s.every(e=>{let t=u[e]||"",{repeat:r,optional:n}=l[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in u)&&(a=a.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:s,result:a}}},8089:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{copyNextErrorCode:function(){return n},createDigestWithErrorCode:function(){return r},extractNextErrorCode:function(){return o}});let r=(e,t)=>"object"==typeof e&&null!==e&&"__NEXT_ERROR_CODE"in e?`${t}@${e.__NEXT_ERROR_CODE}`:t,n=(e,t)=>{let r=o(e);r&&"object"==typeof t&&null!==t&&Object.defineProperty(t,"__NEXT_ERROR_CODE",{value:r,enumerable:!1,configurable:!0})},o=e=>"object"==typeof e&&null!==e&&"__NEXT_ERROR_CODE"in e&&"string"==typeof e.__NEXT_ERROR_CODE?e.__NEXT_ERROR_CODE:"object"==typeof e&&null!==e&&"digest"in e&&"string"==typeof e.digest?e.digest.split("@").find(e=>e.startsWith("E")):void 0},8096:(e,t)=>{"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},8147:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}}),r(4252);let n=r(7876);r(4232);let o=r(4294);function a(e){function t(t){return(0,n.jsx)(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8205:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});let n=r(4902),o=r(3670),a=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:a}=(0,o.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+a};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8213:(e,t)=>{"use strict";function r(e){return new URL(e,"http://n").searchParams}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"asPathToSearchParams",{enumerable:!0,get:function(){return r}})},8276:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return G},default:function(){return z},matchesMiddleware:function(){return D}});let n=r(4252),o=r(8365),a=r(4902),i=r(7176),l=r(3996),u=o._(r(6240)),s=r(5195),c=r(1862),f=n._(r(9871)),d=r(2746),p=r(9163),h=r(541);r(1226);let _=r(5519),m=r(5214),g=r(8480);r(2616);let b=r(3670),E=r(4591),y=r(3836),P=r(1025),v=r(2092),R=r(6023),O=r(1921),S=r(2326),j=r(3407),T=r(4980),A=r(4359),C=r(1533),w=r(7407),I=r(990),N=r(8069),x=r(3132),M=r(9308);function L(){return Object.assign(Object.defineProperty(Error("Route Cancelled"),"__NEXT_ERROR_CODE",{value:"E315",enumerable:!1,configurable:!0}),{cancelled:!0})}async function D(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,b.parsePath)(e.asPath),n=(0,R.hasBasePath)(r)?(0,P.removeBasePath)(r):r,o=(0,v.addBasePath)((0,E.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(o))}function U(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function k(e,t,r){let[n,o]=(0,O.resolveHref)(e,t,!0),a=(0,d.getLocationOrigin)(),i=n.startsWith(a),l=o&&o.startsWith(a);n=U(n),o=o?U(o):o;let u=i?n:(0,v.addBasePath)(n),s=r?U((0,O.resolveHref)(e,r)):o||n;return{url:u,as:l?s:(0,v.addBasePath)(s)}}function F(e,t){let r=(0,a.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,m.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,a.removeTrailingSlash)(e))}async function B(e){if(!await D(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!1},o=t.headers.get("x-nextjs-rewrite"),l=o||t.headers.get("x-nextjs-matched-path"),u=t.headers.get(M.MATCHED_PATH_HEADER);if(!u||l||u.includes("__next_data_catchall")||u.includes("/_error")||u.includes("/404")||(l=u),l){if(l.startsWith("/")){let t=(0,h.parseRelativeUrl)(l),u=(0,j.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,a.removeTrailingSlash)(u.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(a=>{let[i,{__rewrites:l}]=a,f=(0,E.addLocale)(u.pathname,u.locale);if((0,p.isDynamicRoute)(f)||!o&&i.includes((0,c.normalizeLocalePath)((0,P.removeBasePath)(f),r.router.locales).pathname)){let r=(0,j.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:n,parseData:!0});t.pathname=f=(0,v.addBasePath)(r.pathname)}if(!i.includes(s)){let e=F(s,i);e!==s&&(s=e)}let d=i.includes(s)?s:F((0,c.normalizeLocalePath)((0,P.removeBasePath)(t.pathname),r.router.locales).pathname,i);if((0,p.isDynamicRoute)(d)){let e=(0,_.getRouteMatcher)((0,m.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,b.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,T.formatNextPathnameInfo)({...(0,j.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,b.parsePath)(s),t=(0,T.formatNextPathnameInfo)({...(0,j.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let H=Symbol("SSG_DATA_NOT_FOUND");function X(e){try{return JSON.parse(e)}catch(e){return null}}function W(e){let{dataHref:t,inflightCache:r,isPrefetch:n,hasMiddleware:o,isServerRender:a,parseJSON:l,persistCache:u,isBackground:s,unstable_skipClientCache:c}=e,{href:f}=new URL(t,window.location.href),d=e=>{var s;return(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(o=>!o.ok&&r>1&&o.status>=500?e(t,r-1,n):o)})(t,a?3:1,{headers:Object.assign({},n?{purpose:"prefetch"}:{},n&&o?{"x-middleware-prefetch":"1"}:{},{}),method:null!=(s=null==e?void 0:e.method)?s:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:f}:r.text().then(e=>{if(!r.ok){if(o&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:f};if(404===r.status){var n;if(null==(n=X(e))?void 0:n.notFound)return{dataHref:t,json:{notFound:H},response:r,text:e,cacheKey:f}}let l=Object.defineProperty(Error("Failed to load static props"),"__NEXT_ERROR_CODE",{value:"E124",enumerable:!1,configurable:!0});throw a||(0,i.markAssetError)(l),l}return{dataHref:t,json:l?X(e):null,response:r,text:e,cacheKey:f}})).then(e=>(u&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[f],e)).catch(e=>{throw c||delete r[f],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e})};return c&&u?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[f]=Promise.resolve(e)),e)):void 0!==r[f]?r[f]:r[f]=d(s?{method:"HEAD"}:{})}function G(){return Math.random().toString(36).slice(2,10)}function q(e){let{url:t,router:r}=e;if(t===(0,v.addBasePath)((0,E.addLocale)(r.asPath,r.locale)))throw Object.defineProperty(Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href),"__NEXT_ERROR_CODE",{value:"E282",enumerable:!1,configurable:!0});window.location.href=t}let V=e=>{let{route:t,router:r}=e,n=!1,o=r.clc=()=>{n=!0};return()=>{if(n){let e=Object.defineProperty(Error('Abort fetching component for route: "'+t+'"'),"__NEXT_ERROR_CODE",{value:"E483",enumerable:!1,configurable:!0});throw e.cancelled=!0,e}o===r.clc&&(r.clc=null)}};class z{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,n,o){{if(!this._bfl_s&&!this._bfl_d){let t,a,{BloomFilter:l}=r(4069);try{({__routerFilterStatic:t,__routerFilterDynamic:a}=await (0,i.getClientBuildManifest)())}catch(t){if(console.error(t),o)return!0;return q({url:(0,v.addBasePath)((0,E.addLocale)(e,n||this.locale,this.defaultLocale)),router:this}),new Promise(()=>{})}(null==t?void 0:t.numHashes)&&(this._bfl_s=new l(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==a?void 0:a.numHashes)&&(this._bfl_d=new l(a.numItems,a.errorRate),this._bfl_d.import(a))}let c=!1,f=!1;for(let{as:r,allowMatchCurrent:i}of[{as:e},{as:t}])if(r){let t=(0,a.removeTrailingSlash)(new URL(r,"http://n").pathname),d=(0,v.addBasePath)((0,E.addLocale)(t,n||this.locale));if(i||t!==(0,a.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var l,u,s;for(let e of(c=c||!!(null==(l=this._bfl_s)?void 0:l.contains(t))||!!(null==(u=this._bfl_s)?void 0:u.contains(d)),[t,d])){let t=e.split("/");for(let e=0;!f&&e{})}}}}return!1}async change(e,t,r,n,o){var s,c,f,O,S,j,T,w,x;let M,U;if(!(0,C.isLocalURL)(t))return q({url:t,router:this}),!1;let B=1===n._h;B||n.shallow||await this._bfl(r,void 0,n.locale);let X=B||n._shouldResolveHref||(0,b.parsePath)(t).pathname===(0,b.parsePath)(r).pathname,W={...this.state},G=!0!==this.isReady;this.isReady=!0;let V=this.isSsr;if(B||(this.isSsr=!1),B&&this.clc)return!1;let Y=W.locale;d.ST&&performance.mark("routeChange");let{shallow:K=!1,scroll:$=!0}=n,Q={shallow:K};this._inFlightRoute&&this.clc&&(V||z.events.emit("routeChangeError",L(),this._inFlightRoute,Q),this.clc(),this.clc=null),r=(0,v.addBasePath)((0,E.addLocale)((0,R.hasBasePath)(r)?(0,P.removeBasePath)(r):r,n.locale,this.defaultLocale));let J=(0,y.removeLocale)((0,R.hasBasePath)(r)?(0,P.removeBasePath)(r):r,W.locale);this._inFlightRoute=r;let Z=Y!==W.locale;if(!B&&this.onlyAHashChange(J)&&!Z){W.asPath=J,z.events.emit("hashChangeStart",r,Q),this.changeState(e,t,r,{...n,scroll:!1}),$&&this.scrollToHash(J);try{await this.set(W,this.components[W.route],null)}catch(e){throw(0,u.default)(e)&&e.cancelled&&z.events.emit("routeChangeError",e,J,Q),e}return z.events.emit("hashChangeComplete",r,Q),!0}let ee=(0,h.parseRelativeUrl)(t),{pathname:et,query:er}=ee;try{[M,{__rewrites:U}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return q({url:r,router:this}),!1}this.urlIsNew(J)||Z||(e="replaceState");let en=r;et=et?(0,a.removeTrailingSlash)((0,P.removeBasePath)(et)):et;let eo=(0,a.removeTrailingSlash)(et),ea=r.startsWith("/")&&(0,h.parseRelativeUrl)(r).pathname;if(null==(s=this.components[et])?void 0:s.__appRouter)return q({url:r,router:this}),new Promise(()=>{});let ei=!!(ea&&eo!==ea&&(!(0,p.isDynamicRoute)(eo)||!(0,_.getRouteMatcher)((0,m.getRouteRegex)(eo))(ea))),el=!n.shallow&&await D({asPath:r,locale:W.locale,router:this});if(B&&el&&(X=!1),X&&"/_error"!==et&&(n._shouldResolveHref=!0,ee.pathname=F(et,M),ee.pathname!==et&&(et=ee.pathname,ee.pathname=(0,v.addBasePath)(et),el||(t=(0,g.formatWithValidation)(ee)))),!(0,C.isLocalURL)(r))return q({url:r,router:this}),!1;en=(0,y.removeLocale)((0,P.removeBasePath)(en),W.locale),eo=(0,a.removeTrailingSlash)(et);let eu=!1;if((0,p.isDynamicRoute)(eo)){let e=(0,h.parseRelativeUrl)(en),n=e.pathname,o=(0,m.getRouteRegex)(eo);eu=(0,_.getRouteMatcher)(o)(n);let a=eo===n,i=a?(0,N.interpolateAs)(eo,n,er):{};if(eu&&(!a||i.result))a?r=(0,g.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,I.omit)(er,i.params)})):Object.assign(er,eu);else{let e=Object.keys(o.groups).filter(e=>!er[e]&&!o.groups[e].optional);if(e.length>0&&!el)throw Object.defineProperty(Error((a?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+eo+"). ")+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as")),"__NEXT_ERROR_CODE",{value:"E344",enumerable:!1,configurable:!0})}}B||z.events.emit("routeChangeStart",r,Q);let es="/404"===this.pathname||"/_error"===this.pathname;try{let a=await this.getRouteInfo({route:eo,pathname:et,query:er,as:r,resolvedAs:en,routeProps:Q,locale:W.locale,isPreview:W.isPreview,hasMiddleware:el,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:B&&!this.isFallback,isMiddlewareRewrite:ei});if(B||n.shallow||await this._bfl(r,"resolvedAs"in a?a.resolvedAs:void 0,W.locale),"route"in a&&el){eo=et=a.route||eo,Q.shallow||(er=Object.assign({},a.query||{},er));let e=(0,R.hasBasePath)(ee.pathname)?(0,P.removeBasePath)(ee.pathname):ee.pathname;if(eu&&et!==e&&Object.keys(eu).forEach(e=>{eu&&er[e]===eu[e]&&delete er[e]}),(0,p.isDynamicRoute)(et)){let e=!Q.shallow&&a.resolvedAs?a.resolvedAs:(0,v.addBasePath)((0,E.addLocale)(new URL(r,location.href).pathname,W.locale),!0);(0,R.hasBasePath)(e)&&(e=(0,P.removeBasePath)(e));let t=(0,m.getRouteRegex)(et),n=(0,_.getRouteMatcher)(t)(new URL(e,location.href).pathname);n&&Object.assign(er,n)}}if("type"in a)if("redirect-internal"===a.type)return this.change(e,a.newUrl,a.newAs,n);else return q({url:a.destination,router:this}),new Promise(()=>{});let i=a.Component;if(i&&i.unstable_scriptLoader&&[].concat(i.unstable_scriptLoader()).forEach(e=>{(0,l.handleClientScriptLoad)(e.props)}),(a.__N_SSG||a.__N_SSP)&&a.props){if(a.props.pageProps&&a.props.pageProps.__N_REDIRECT){n.locale=!1;let t=a.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,h.parseRelativeUrl)(t);r.pathname=F(r.pathname,M);let{url:o,as:a}=k(this,t,t);return this.change(e,o,a,n)}return q({url:t,router:this}),new Promise(()=>{})}if(W.isPreview=!!a.props.__N_PREVIEW,a.props.notFound===H){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(a=await this.getRouteInfo({route:e,pathname:e,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isNotFound:!0}),"type"in a)throw Object.defineProperty(Error("Unexpected middleware effect on /404"),"__NEXT_ERROR_CODE",{value:"E158",enumerable:!1,configurable:!0})}}B&&"/_error"===this.pathname&&(null==(f=self.__NEXT_DATA__.props)||null==(c=f.pageProps)?void 0:c.statusCode)===500&&(null==(O=a.props)?void 0:O.pageProps)&&(a.props.pageProps.statusCode=500);let s=n.shallow&&W.route===(null!=(S=a.route)?S:eo),d=null!=(j=n.scroll)?j:!B&&!s,g=null!=o?o:d?{x:0,y:0}:null,b={...W,route:eo,pathname:et,query:er,asPath:J,isFallback:!1};if(B&&es){if(a=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:W.locale,isPreview:W.isPreview,isQueryUpdating:B&&!this.isFallback}),"type"in a)throw Object.defineProperty(Error("Unexpected middleware effect on "+this.pathname),"__NEXT_ERROR_CODE",{value:"E225",enumerable:!1,configurable:!0});"/_error"===this.pathname&&(null==(w=self.__NEXT_DATA__.props)||null==(T=w.pageProps)?void 0:T.statusCode)===500&&(null==(x=a.props)?void 0:x.pageProps)&&(a.props.pageProps.statusCode=500);try{await this.set(b,a,g)}catch(e){throw(0,u.default)(e)&&e.cancelled&&z.events.emit("routeChangeError",e,J,Q),e}return!0}if(z.events.emit("beforeHistoryChange",r,Q),this.changeState(e,t,r,n),!(B&&!g&&!G&&!Z&&(0,A.compareRouterStates)(b,this.state))){try{await this.set(b,a,g)}catch(e){if(e.cancelled)a.error=a.error||e;else throw e}if(a.error)throw B||z.events.emit("routeChangeError",a.error,J,Q),a.error;B||z.events.emit("routeChangeComplete",r,Q),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,u.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:G()},"",r))}async handleRouteInfoError(e,t,r,n,o,a){if(e.cancelled)throw e;if((0,i.isAssetError)(e)||a)throw z.events.emit("routeChangeError",e,n,o),q({url:n,router:this}),L();console.error(e);try{let n,{page:o,styleSheets:a}=await this.fetchComponent("/_error"),i={props:n,Component:o,styleSheets:a,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(o,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,u.default)(e)?e:Object.defineProperty(Error(e+""),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0}),t,r,n,o,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:o,resolvedAs:i,routeProps:l,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:_,isNotFound:m}=e,b=t;try{var E,y,v,R;let e=this.components[b];if(l.shallow&&e&&this.route===b)return e;let t=V({route:b,router:this});f&&(e=void 0);let u=!e||"initial"in e?void 0:e,O={dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:m?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},j=h&&!_?null:await B({fetchData:()=>W(O),asPath:m?"/404":i,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(j&&("/_error"===r||"/404"===r)&&(j.effect=void 0),h&&(j?j.json=self.__NEXT_DATA__.props:j={json:self.__NEXT_DATA__.props}),t(),(null==j||null==(E=j.effect)?void 0:E.type)==="redirect-internal"||(null==j||null==(y=j.effect)?void 0:y.type)==="redirect-external")return j.effect;if((null==j||null==(v=j.effect)?void 0:v.type)==="rewrite"){let t=(0,a.removeTrailingSlash)(j.effect.resolvedHref),o=await this.pageLoader.getPageList();if((!h||o.includes(t))&&(b=t,r=j.effect.resolvedHref,n={...n,...j.effect.parsedAs.query},i=(0,P.removeBasePath)((0,c.normalizeLocalePath)(j.effect.parsedAs.pathname,this.locales).pathname),e=this.components[b],l.shallow&&e&&this.route===b&&!f))return{...e,route:b}}if((0,S.isAPIRoute)(b))return q({url:o,router:this}),new Promise(()=>{});let T=u||await this.fetchComponent(b).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),A=null==j||null==(R=j.response)?void 0:R.headers.get("x-middleware-skip"),C=T.__N_SSG||T.__N_SSP;A&&(null==j?void 0:j.dataHref)&&delete this.sdc[j.dataHref];let{props:w,cacheKey:I}=await this._getData(async()=>{if(C){if((null==j?void 0:j.json)&&!A)return{cacheKey:j.cacheKey,props:j.json};let e=(null==j?void 0:j.dataHref)?j.dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await W({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:A?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(T.Component,{pathname:r,query:n,asPath:o,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return T.__N_SSP&&O.dataHref&&I&&delete this.sdc[I],this.isPreview||!T.__N_SSG||h||W(Object.assign({},O,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),w.pageProps=Object.assign({},w.pageProps),T.props=w,T.route=b,T.query=n,T.resolvedAs=i,this.components[b]=T,T}catch(e){return this.handleRouteInfoError((0,u.getProperError)(e),r,n,o,l)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[n,o]=e.split("#",2);return!!o&&t===n&&r===o||t===n&&r!==o}scrollToHash(e){let[,t=""]=e.split("#",2);(0,x.handleSmoothScroll)(()=>{if(""===t||"top"===t)return void window.scrollTo(0,0);let e=decodeURIComponent(t),r=document.getElementById(e);if(r)return void r.scrollIntoView();let n=document.getElementsByName(e)[0];n&&n.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,w.isBot)(window.navigator.userAgent))return;let n=(0,h.parseRelativeUrl)(e),o=n.pathname,{pathname:i,query:l}=n,u=i,s=await this.pageLoader.getPageList(),c=t,f=void 0!==r.locale?r.locale||void 0:this.locale,d=await D({asPath:t,locale:f,router:this});n.pathname=F(n.pathname,s),(0,p.isDynamicRoute)(n.pathname)&&(i=n.pathname,n.pathname=i,Object.assign(l,(0,_.getRouteMatcher)((0,m.getRouteRegex)(n.pathname))((0,b.parsePath)(t).pathname)||{}),d||(e=(0,g.formatWithValidation)(n)));let E=await B({fetchData:()=>W({dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:u,query:l}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==E?void 0:E.effect.type)==="rewrite"&&(n.pathname=E.effect.resolvedHref,i=E.effect.resolvedHref,l={...l,...E.effect.parsedAs.query},c=E.effect.parsedAs.pathname,e=(0,g.formatWithValidation)(n)),(null==E?void 0:E.effect.type)==="redirect-external")return;let y=(0,a.removeTrailingSlash)(i);await this._bfl(t,c,r.locale,!0)&&(this.components[o]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(y).then(t=>!!t&&W({dataHref:(null==E?void 0:E.json)?null==E?void 0:E.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](y)])}async fetchComponent(e){let t=V({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Object.defineProperty(Error("Loading initial props cancelled"),"__NEXT_ERROR_CODE",{value:"E405",enumerable:!1,configurable:!0});throw e.cancelled=!0,e}return e})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,r,{initialProps:n,pageLoader:o,App:i,wrapApp:l,Component:u,err:s,subscription:c,isFallback:f,locale:_,locales:m,defaultLocale:b,domainLocales:E,isPreview:y}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=G(),this.onPopState=e=>{let t,{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,g.formatWithValidation)({pathname:(0,v.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA)return void window.location.reload();if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:o,as:a,options:i,key:l}=n;this._key=l;let{pathname:u}=(0,h.parseRelativeUrl)(o);(!this.isSsr||a!==(0,v.addBasePath)(this.asPath)||u!==(0,v.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",o,a,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let P=(0,a.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[P]={Component:u,initial:!0,props:n,err:s,__N_SSG:n&&n.__N_SSG,__N_SSP:n&&n.__N_SSP}),this.components["/_app"]={Component:i,styleSheets:[]},this.events=z.events,this.pageLoader=o;let R=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=c,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!R&&!self.location.search),this.state={route:P,pathname:e,query:t,asPath:R?e:r,isPreview:!!y,locale:void 0,isFallback:f},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!r.startsWith("//")){let n={locale:_},o=(0,d.getURL)();this._initialMatchesMiddlewarePromise=D({router:this,locale:_,asPath:o}).then(a=>(n._shouldResolveHref=r!==e,this.changeState("replaceState",a?o:(0,g.formatWithValidation)({pathname:(0,v.addBasePath)(e),query:t}),o,n),a))}window.addEventListener("popstate",this.onPopState)}}z.events=(0,f.default)()},8365:(e,t,r)=>{"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=a?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(o,i,l):o[i]=e[i]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:()=>o})},8480:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return l},urlObjectKeys:function(){return i}});let n=r(8365)._(r(8040)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",i=e.pathname||"",l=e.hash||"",u=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),u&&"object"==typeof u&&(u=String(n.urlQueryToSearchParams(u)));let c=e.search||u&&"?"+u||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),l&&"#"!==l[0]&&(l="#"+l),c&&"?"!==c[0]&&(c="?"+c),""+a+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+l}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function l(e){return a(e)}},8677:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(4252)._(r(4232)),o=r(7539),a=n.default.createContext(o.imageConfigDefault)},8714:(e,t)=>{"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}function n(e){return e.startsWith("@")&&"@children"!==e}function o(e,t){if(e.includes(a)){let e=JSON.stringify(t);return"{}"!==e?a+"?"+e:a}return e}Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return i},PAGE_SEGMENT_KEY:function(){return a},addSearchParamsIfPageSegment:function(){return o},isGroupSegment:function(){return r},isParallelRouteSegment:function(){return n}});let a="__PAGE__",i="__DEFAULT__"},8757:(e,t)=>{"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},8831:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(4252)._(r(4232)).default.createContext({})},9163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(7188),o=/\/[^/]*\[[^/]+\][^/]*(?=\/|$)/,a=/\/\[[^/]+\](?=\/|$)/;function i(e,t){return(void 0===t&&(t=!0),(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),t)?a.test(e):o.test(e)}},9308:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_SUFFIX:function(){return f},APP_DIR_ALIAS:function(){return I},CACHE_ONE_YEAR:function(){return R},DOT_NEXT_ALIAS:function(){return C},ESLINT_DEFAULT_DIRS:function(){return $},GSP_NO_RETURNED_VALUE:function(){return G},GSSP_COMPONENT_MEMBER_ERROR:function(){return z},GSSP_NO_RETURNED_VALUE:function(){return q},INFINITE_CACHE:function(){return O},INSTRUMENTATION_HOOK_FILENAME:function(){return T},MATCHED_PATH_HEADER:function(){return o},MIDDLEWARE_FILENAME:function(){return S},MIDDLEWARE_LOCATION_REGEXP:function(){return j},NEXT_BODY_SUFFIX:function(){return h},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return v},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return m},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return g},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return P},NEXT_CACHE_TAGS_HEADER:function(){return _},NEXT_CACHE_TAG_MAX_ITEMS:function(){return E},NEXT_CACHE_TAG_MAX_LENGTH:function(){return y},NEXT_DATA_SUFFIX:function(){return d},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return p},NEXT_QUERY_PARAM_PREFIX:function(){return r},NEXT_RESUME_HEADER:function(){return b},NON_STANDARD_NODE_ENV:function(){return Y},PAGES_DIR_ALIAS:function(){return A},PRERENDER_REVALIDATE_HEADER:function(){return a},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return i},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return k},ROOT_DIR_ALIAS:function(){return w},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return U},RSC_ACTION_ENCRYPTION_ALIAS:function(){return D},RSC_ACTION_PROXY_ALIAS:function(){return M},RSC_ACTION_VALIDATE_ALIAS:function(){return x},RSC_CACHE_WRAPPER_ALIAS:function(){return L},RSC_MOD_REF_PROXY_ALIAS:function(){return N},RSC_PREFETCH_SUFFIX:function(){return l},RSC_SEGMENTS_DIR_SUFFIX:function(){return u},RSC_SEGMENT_SUFFIX:function(){return s},RSC_SUFFIX:function(){return c},SERVER_PROPS_EXPORT_ERROR:function(){return W},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return B},SERVER_PROPS_SSG_CONFLICT:function(){return H},SERVER_RUNTIME:function(){return Q},SSG_FALLBACK_EXPORT_ERROR:function(){return K},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return F},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return X},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return V},WEBPACK_LAYERS:function(){return Z},WEBPACK_RESOURCE_QUERIES:function(){return ee}});let r="nxtP",n="nxtI",o="x-matched-path",a="x-prerender-revalidate",i="x-prerender-revalidate-if-generated",l=".prefetch.rsc",u=".segments",s=".segment.rsc",c=".rsc",f=".action",d=".json",p=".meta",h=".body",_="x-next-cache-tags",m="x-next-revalidated-tags",g="x-next-revalidate-tag-token",b="next-resume",E=128,y=256,P=1024,v="_N_T_",R=31536e3,O=0xfffffffe,S="middleware",j=`(?:src/)?${S}`,T="instrumentation",A="private-next-pages",C="private-dot-next",w="private-next-root-dir",I="private-next-app-dir",N="private-next-rsc-mod-ref-proxy",x="private-next-rsc-action-validate",M="private-next-rsc-server-reference",L="private-next-rsc-cache-wrapper",D="private-next-rsc-action-encryption",U="private-next-rsc-action-client-wrapper",k="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",F="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",B="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",H="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",X="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",W="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",G="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",q="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",V="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",z="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",Y='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',K="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",$=["app","pages","components","lib","src"],Q={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},J={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",apiNode:"api-node",apiEdge:"api-edge",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",pagesDirBrowser:"pages-dir-browser",pagesDirEdge:"pages-dir-edge",pagesDirNode:"pages-dir-node"},Z={...J,GROUP:{builtinReact:[J.reactServerComponents,J.actionBrowser],serverOnly:[J.reactServerComponents,J.actionBrowser,J.instrument,J.middleware],neutralTarget:[J.apiNode,J.apiEdge],clientOnly:[J.serverSideRendering,J.appPagesBrowser],bundled:[J.reactServerComponents,J.actionBrowser,J.serverSideRendering,J.appPagesBrowser,J.shared,J.instrument,J.middleware],appPages:[J.reactServerComponents,J.serverSideRendering,J.appPagesBrowser,J.actionBrowser]}},ee={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},9341:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let n=r(4252),o=r(7876),a=n._(r(4232)),i=n._(r(5679)),l={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function u(e){let{req:t,res:r,err:n}=e;return{statusCode:r&&r.statusCode?r.statusCode:n?n.statusCode:404,hostname:window.location.hostname}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class c extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||l[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(i.default,{children:(0,o.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?r:(0,o.jsxs)(o.Fragment,{children:["Application error: a client-side exception has occurred"," ",!!this.props.hostname&&(0,o.jsxs)(o.Fragment,{children:["while loading ",this.props.hostname]})," ","(see the browser console for more information)"]}),"."]})})]})]})}}c.displayName="ErrorPage",c.getInitialProps=u,c.origGetInitialProps=u,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9393:()=>{},9525:(e,t,r)=>{"use strict";let n,o,a,i,l,u,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let _=r(8365);Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{emitter:function(){return X},hydrate:function(){return eu},initialize:function(){return V},router:function(){return n},version:function(){return H}});let m=r(4252),g=r(7876);r(1291);let b=m._(r(4232)),E=m._(r(8944)),y=r(8831),P=m._(r(9871)),v=r(9948),R=r(3132),O=r(9163),S=r(8040),j=r(2917),T=r(2746),A=r(3090),C=m._(r(4547)),w=m._(r(2792)),I=r(1318),N=r(4294),x=r(6240),M=r(8677),L=r(1025),D=r(6023),U=r(2850),k=r(9609),F=r(5931),B=r(7207);r(4609),r(6999);let H="15.3.2",X=(0,P.default)(),W=e=>[].slice.call(e),G=!1;class q extends b.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(o.isFallback||o.nextExport&&((0,O.isDynamicRoute)(n.pathname)||location.search||G)||o.props&&o.props.__N_SSG&&(location.search||G))&&n.replace(n.pathname+"?"+String((0,S.assign)((0,S.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),a,{_h:1,shallow:!o.isFallback&&!G}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function V(e){void 0===e&&(e={}),o=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=o,h=o.defaultLocale;let t=o.assetPrefix||"";if(self.__next_set_public_path__(""+t+"/_next/"),(0,j.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:o.runtimeConfig||{}}),a=(0,T.getURL)(),(0,D.hasBasePath)(a)&&(a=(0,L.removeBasePath)(a)),o.scriptLoader){let{initScriptLoader:e}=r(3996);e(o.scriptLoader)}i=new w.default(o.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(u=(0,C.default)()).getIsSsr=()=>n.isSsr,l=document.getElementById("__next"),{assetPrefix:t}}function z(e,t){return(0,g.jsx)(e,{...t})}function Y(e){var t;let{children:r}=e,o=b.default.useMemo(()=>(0,k.adaptForAppRouterInstance)(n),[]);return(0,g.jsx)(q,{fn:e=>$({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e)),children:(0,g.jsx)(U.AppRouterContext.Provider,{value:o,children:(0,g.jsx)(F.SearchParamsContext.Provider,{value:(0,k.adaptForSearchParams)(n),children:(0,g.jsx)(k.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t,children:(0,g.jsx)(F.PathParamsContext.Provider,{value:(0,k.adaptForPathParams)(n),children:(0,g.jsx)(v.RouterContext.Provider,{value:(0,N.makePublicRouterInstance)(n),children:(0,g.jsx)(y.HeadManagerContext.Provider,{value:u,children:(0,g.jsx)(M.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0},children:r})})})})})})})})}let K=e=>t=>{let r={...t,Component:p,err:o.err,router:n};return(0,g.jsx)(Y,{children:z(e,r)})};function $(e){let{App:t,err:l}=e;return console.error(l),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:o,styleSheets:a}=n;return(null==s?void 0:s.Component)===o?Promise.resolve().then(()=>_._(r(9341))).then(n=>Promise.resolve().then(()=>_._(r(472))).then(r=>(e.App=t=r.default,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:o,styleSheets:a}}).then(r=>{var i;let{ErrorComponent:u,styleSheets:s}=r,c=K(t),f={Component:u,AppTree:c,router:n,ctx:{err:l,pathname:o.page,query:o.query,asPath:a,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,T.loadGetInitialProps)(t,f)).then(t=>ei({...e,err:l,Component:u,styleSheets:s,props:t}))})}function Q(e){let{callback:t}=e;return b.default.useLayoutEffect(()=>t(),[t]),null}let J={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},Z={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},ee=null,et=!0;function er(){[J.beforeRender,J.afterHydrate,J.afterRender,J.routeChange].forEach(e=>performance.clearMarks(e))}function en(){T.ST&&(performance.mark(J.afterHydrate),performance.getEntriesByName(J.beforeRender,"mark").length&&(performance.measure(Z.beforeHydration,J.navigationStart,J.beforeRender),performance.measure(Z.hydration,J.beforeRender,J.afterHydrate)),d&&performance.getEntriesByName(Z.hydration).forEach(d),er())}function eo(){if(!T.ST)return;performance.mark(J.afterRender);let e=performance.getEntriesByName(J.routeChange,"mark");e.length&&(performance.getEntriesByName(J.beforeRender,"mark").length&&(performance.measure(Z.routeChangeToRender,e[0].name,J.beforeRender),performance.measure(Z.render,J.beforeRender,J.afterRender),d&&(performance.getEntriesByName(Z.render).forEach(d),performance.getEntriesByName(Z.routeChangeToRender).forEach(d))),er(),[Z.routeChangeToRender,Z.render].forEach(e=>performance.clearMeasures(e)))}function ea(e){let{callbacks:t,children:r}=e;return b.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),r}function ei(e){let t,r,{App:o,Component:a,props:i,err:u}=e,f="initial"in e?void 0:e.styleSheets;a=a||s.Component;let d={...i=i||s.props,Component:a,err:u,router:n};s=d;let p=!1,h=new Promise((e,t)=>{c&&c(),r=()=>{c=null,e()},c=()=>{p=!0,c=null;let e=Object.defineProperty(Error("Cancel rendering route"),"__NEXT_ERROR_CODE",{value:"E503",enumerable:!1,configurable:!0});e.cancelled=!0,t(e)}});function _(){r()}!function(){if(!f)return;let e=new Set(W(document.querySelectorAll("style[data-n-href]")).map(e=>e.getAttribute("data-n-href"))),t=document.querySelector("noscript[data-n-css]"),r=null==t?void 0:t.getAttribute("data-n-css");f.forEach(t=>{let{href:n,text:o}=t;if(!e.has(n)){let e=document.createElement("style");e.setAttribute("data-n-href",n),e.setAttribute("media","x"),r&&e.setAttribute("nonce",r),document.head.appendChild(e),e.appendChild(document.createTextNode(o))}})}();let m=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Q,{callback:function(){if(f&&!p){let e=new Set(f.map(e=>e.href)),t=W(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),W(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,R.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),(0,g.jsxs)(Y,{children:[z(o,d),(0,g.jsx)(A.Portal,{type:"next-route-announcer",children:(0,g.jsx)(I.RouteAnnouncer,{})})]})]});var y=l;T.ST&&performance.mark(J.beforeRender);let P=(t=et?en:eo,(0,g.jsx)(ea,{callbacks:[t,_],children:m}));return ee?(0,b.default.startTransition)(()=>{ee.render(P)}):(ee=E.default.hydrateRoot(y,P,{onRecoverableError:B.onRecoverableError}),et=!1),h}async function el(e){if(e.err&&(void 0===e.Component||!e.isHydratePass))return void await $(e);try{await ei(e)}catch(r){let t=(0,x.getProperError)(r);if(t.cancelled)throw t;await $({...e,err:t})}}async function eu(e){let t=o.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:o,startTime:a,value:i,duration:l,entryType:u,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:o,startTime:a||t,value:null==i?l:i,label:"mark"===u||"measure"===u?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(o.page);if("error"in n)throw n.error;p=n.component}catch(e){t=(0,x.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(o.dynamicIds),n=(0,N.createRouter)(o.page,o.query,a,{initialProps:o.props,pageLoader:i,App:f,Component:p,wrapApp:K,err:t,isFallback:!!o.isFallback,subscription:(e,t,r)=>el(Object.assign({},e,{App:t,scroll:r})),locale:o.locale,locales:o.locales,defaultLocale:h,domainLocales:o.domainLocales,isPreview:o.isPreview}),G=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:p,props:o.props,err:t,isHydratePass:!0};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),el(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9609:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),!function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathnameContextProviderAdapter:function(){return p},adaptForAppRouterInstance:function(){return c},adaptForPathParams:function(){return d},adaptForSearchParams:function(){return f}});let n=r(8365),o=r(7876),a=n._(r(4232)),i=r(5931),l=r(3069),u=r(8213),s=r(5214);function c(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},hmrRefresh(){},push(t,r){let{scroll:n}=void 0===r?{}:r;e.push(t,void 0,{scroll:n})},replace(t,r){let{scroll:n}=void 0===r?{}:r;e.replace(t,void 0,{scroll:n})},prefetch(t){e.prefetch(t)}}}function f(e){return e.isReady&&e.query?(0,u.asPathToSearchParams)(e.asPath):new URLSearchParams}function d(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys((0,s.getRouteRegex)(e.pathname).groups))t[r]=e.query[r];return t}function p(e){let{children:t,router:r,...n}=e,u=(0,a.useRef)(n.isAutoExport),s=(0,a.useMemo)(()=>{let e,t=u.current;if(t&&(u.current=!1),(0,l.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return(0,o.jsx)(i.PathnameContext.Provider,{value:s,children:t})}},9611:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"setAttributesFromProps",{enumerable:!0,get:function(){return a}});let r={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"},n=["onLoad","onReady","dangerouslySetInnerHTML","children","onError","strategy","stylesheets"];function o(e){return["async","defer","noModule"].includes(e)}function a(e,t){for(let[a,i]of Object.entries(t)){if(!t.hasOwnProperty(a)||n.includes(a)||void 0===i)continue;let l=r[a]||a.toLowerCase();"SCRIPT"===e.tagName&&o(l)?e[l]=!!i:e.setAttribute(l,String(i)),(!1===i||"SCRIPT"===e.tagName&&o(l)&&(!i||"false"===i))&&(e.setAttribute(l,""),e.removeAttribute(l))}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9871:(e,t)=>{"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},9948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(4252)._(r(4232)).default.createContext(null)}},e=>{var t=t=>e(e.s=t);e.O(0,[593],()=>t(5842)),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/main-app-f27e1f97d10457bf.js b/_next/static/chunks/main-app-f27e1f97d10457bf.js new file mode 100644 index 0000000000000000000000000000000000000000..4df5760246d2f5073ad62337b54c00dab7b8378d --- /dev/null +++ b/_next/static/chunks/main-app-f27e1f97d10457bf.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[358],{8152:(e,s,n)=>{Promise.resolve().then(n.t.bind(n,894,23)),Promise.resolve().then(n.t.bind(n,4970,23)),Promise.resolve().then(n.t.bind(n,6614,23)),Promise.resolve().then(n.t.bind(n,6975,23)),Promise.resolve().then(n.t.bind(n,7555,23)),Promise.resolve().then(n.t.bind(n,4911,23)),Promise.resolve().then(n.t.bind(n,9665,23)),Promise.resolve().then(n.t.bind(n,1295,23))},9393:()=>{}},e=>{var s=s=>e(e.s=s);e.O(0,[441,684],()=>(s(5415),s(8152))),_N_E=e.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/_app-da15c11dea942c36.js b/_next/static/chunks/pages/_app-da15c11dea942c36.js new file mode 100644 index 0000000000000000000000000000000000000000..5c39d7be1643c6a32cce573b86fab1a6615e7adf --- /dev/null +++ b/_next/static/chunks/pages/_app-da15c11dea942c36.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[636],{326:(_,n,p)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return p(472)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[593,792],()=>(n(326),n(4294))),_N_E=_.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/pages/_error-cc3f077a18ea1793.js b/_next/static/chunks/pages/_error-cc3f077a18ea1793.js new file mode 100644 index 0000000000000000000000000000000000000000..554b197b07b755bf59f4418b05a6b288081d1637 --- /dev/null +++ b/_next/static/chunks/pages/_error-cc3f077a18ea1793.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[731],{2164:(_,n,e)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/_error",function(){return e(9341)}])}},_=>{var n=n=>_(_.s=n);_.O(0,[636,593,792],()=>n(2164)),_N_E=_.O()}]); \ No newline at end of file diff --git a/_next/static/chunks/polyfills-42372ed130431b0a.js b/_next/static/chunks/polyfills-42372ed130431b0a.js new file mode 100644 index 0000000000000000000000000000000000000000..ab422b94a4fbe76275d31c0bf7ef334768b39cae --- /dev/null +++ b/_next/static/chunks/polyfills-42372ed130431b0a.js @@ -0,0 +1 @@ +!function(){var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){var e={exports:{}};return t(e,e.exports),e.exports}var r,n,o=function(t){return t&&t.Math===Math&&t},i=o("object"==typeof globalThis&&globalThis)||o("object"==typeof window&&window)||o("object"==typeof self&&self)||o("object"==typeof t&&t)||o("object"==typeof t&&t)||function(){return this}()||Function("return this")(),a=function(t){try{return!!t()}catch(t){return!0}},u=!a(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}),s=!a(function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}),c=Function.prototype.call,f=s?c.bind(c):function(){return c.apply(c,arguments)},l={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!l.call({1:2},1)?function(t){var e=h(this,t);return!!e&&e.enumerable}:l,v={f:p},d=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},g=Function.prototype,y=g.call,m=s&&g.bind.bind(y,y),b=s?m:function(t){return function(){return y.apply(t,arguments)}},w=b({}.toString),S=b("".slice),E=function(t){return S(w(t),8,-1)},O=Object,x=b("".split),R=a(function(){return!O("z").propertyIsEnumerable(0)})?function(t){return"String"===E(t)?x(t,""):O(t)}:O,P=function(t){return null==t},A=TypeError,j=function(t){if(P(t))throw new A("Can't call method on "+t);return t},k=function(t){return R(j(t))},I="object"==typeof document&&document.all,T=void 0===I&&void 0!==I?function(t){return"function"==typeof t||t===I}:function(t){return"function"==typeof t},M=function(t){return"object"==typeof t?null!==t:T(t)},L=function(t,e){return arguments.length<2?T(r=i[t])?r:void 0:i[t]&&i[t][e];var r},U=b({}.isPrototypeOf),N=i.navigator,C=N&&N.userAgent,_=C?String(C):"",F=i.process,B=i.Deno,D=F&&F.versions||B&&B.version,z=D&&D.v8;z&&(n=(r=z.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!n&&_&&(!(r=_.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=_.match(/Chrome\/(\d+)/))&&(n=+r[1]);var W=n,q=i.String,H=!!Object.getOwnPropertySymbols&&!a(function(){var t=Symbol("symbol detection");return!q(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&W&&W<41}),$=H&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,K=Object,G=$?function(t){return"symbol"==typeof t}:function(t){var e=L("Symbol");return T(e)&&U(e.prototype,K(t))},V=String,Y=function(t){try{return V(t)}catch(t){return"Object"}},X=TypeError,J=function(t){if(T(t))return t;throw new X(Y(t)+" is not a function")},Q=function(t,e){var r=t[e];return P(r)?void 0:J(r)},Z=TypeError,tt=Object.defineProperty,et=function(t,e){try{tt(i,t,{value:e,configurable:!0,writable:!0})}catch(r){i[t]=e}return e},rt=e(function(t){var e="__core-js_shared__",r=t.exports=i[e]||et(e,{});(r.versions||(r.versions=[])).push({version:"3.38.1",mode:"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"})}),nt=function(t,e){return rt[t]||(rt[t]=e||{})},ot=Object,it=function(t){return ot(j(t))},at=b({}.hasOwnProperty),ut=Object.hasOwn||function(t,e){return at(it(t),e)},st=0,ct=Math.random(),ft=b(1..toString),lt=function(t){return"Symbol("+(void 0===t?"":t)+")_"+ft(++st+ct,36)},ht=i.Symbol,pt=nt("wks"),vt=$?ht.for||ht:ht&&ht.withoutSetter||lt,dt=function(t){return ut(pt,t)||(pt[t]=H&&ut(ht,t)?ht[t]:vt("Symbol."+t)),pt[t]},gt=TypeError,yt=dt("toPrimitive"),mt=function(t,e){if(!M(t)||G(t))return t;var r,n=Q(t,yt);if(n){if(void 0===e&&(e="default"),r=f(n,t,e),!M(r)||G(r))return r;throw new gt("Can't convert object to primitive value")}return void 0===e&&(e="number"),function(t,e){var r,n;if("string"===e&&T(r=t.toString)&&!M(n=f(r,t)))return n;if(T(r=t.valueOf)&&!M(n=f(r,t)))return n;if("string"!==e&&T(r=t.toString)&&!M(n=f(r,t)))return n;throw new Z("Can't convert object to primitive value")}(t,e)},bt=function(t){var e=mt(t,"string");return G(e)?e:e+""},wt=i.document,St=M(wt)&&M(wt.createElement),Et=function(t){return St?wt.createElement(t):{}},Ot=!u&&!a(function(){return 7!==Object.defineProperty(Et("div"),"a",{get:function(){return 7}}).a}),xt=Object.getOwnPropertyDescriptor,Rt={f:u?xt:function(t,e){if(t=k(t),e=bt(e),Ot)try{return xt(t,e)}catch(t){}if(ut(t,e))return d(!f(v.f,t,e),t[e])}},Pt=u&&a(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype}),At=String,jt=TypeError,kt=function(t){if(M(t))return t;throw new jt(At(t)+" is not an object")},It=TypeError,Tt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,Lt="enumerable",Ut="configurable",Nt="writable",Ct={f:u?Pt?function(t,e,r){if(kt(t),e=bt(e),kt(r),"function"==typeof t&&"prototype"===e&&"value"in r&&Nt in r&&!r[Nt]){var n=Mt(t,e);n&&n[Nt]&&(t[e]=r.value,r={configurable:Ut in r?r[Ut]:n[Ut],enumerable:Lt in r?r[Lt]:n[Lt],writable:!1})}return Tt(t,e,r)}:Tt:function(t,e,r){if(kt(t),e=bt(e),kt(r),Ot)try{return Tt(t,e,r)}catch(t){}if("get"in r||"set"in r)throw new It("Accessors not supported");return"value"in r&&(t[e]=r.value),t}},_t=u?function(t,e,r){return Ct.f(t,e,d(1,r))}:function(t,e,r){return t[e]=r,t},Ft=Function.prototype,Bt=u&&Object.getOwnPropertyDescriptor,Dt=ut(Ft,"name"),zt={EXISTS:Dt,PROPER:Dt&&"something"===function(){}.name,CONFIGURABLE:Dt&&(!u||u&&Bt(Ft,"name").configurable)},Wt=b(Function.toString);T(rt.inspectSource)||(rt.inspectSource=function(t){return Wt(t)});var qt,Ht,$t,Kt=rt.inspectSource,Gt=i.WeakMap,Vt=T(Gt)&&/native code/.test(String(Gt)),Yt=nt("keys"),Xt=function(t){return Yt[t]||(Yt[t]=lt(t))},Jt={},Qt="Object already initialized",Zt=i.TypeError;if(Vt||rt.state){var te=rt.state||(rt.state=new(0,i.WeakMap));te.get=te.get,te.has=te.has,te.set=te.set,qt=function(t,e){if(te.has(t))throw new Zt(Qt);return e.facade=t,te.set(t,e),e},Ht=function(t){return te.get(t)||{}},$t=function(t){return te.has(t)}}else{var ee=Xt("state");Jt[ee]=!0,qt=function(t,e){if(ut(t,ee))throw new Zt(Qt);return e.facade=t,_t(t,ee,e),e},Ht=function(t){return ut(t,ee)?t[ee]:{}},$t=function(t){return ut(t,ee)}}var re,ne={set:qt,get:Ht,has:$t,enforce:function(t){return $t(t)?Ht(t):qt(t,{})},getterFor:function(t){return function(e){var r;if(!M(e)||(r=Ht(e)).type!==t)throw new Zt("Incompatible receiver, "+t+" required");return r}}},oe=e(function(t){var e=zt.CONFIGURABLE,r=ne.enforce,n=ne.get,o=String,i=Object.defineProperty,s=b("".slice),c=b("".replace),f=b([].join),l=u&&!a(function(){return 8!==i(function(){},"length",{value:8}).length}),h=String(String).split("String"),p=t.exports=function(t,n,a){"Symbol("===s(o(n),0,7)&&(n="["+c(o(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),a&&a.getter&&(n="get "+n),a&&a.setter&&(n="set "+n),(!ut(t,"name")||e&&t.name!==n)&&(u?i(t,"name",{value:n,configurable:!0}):t.name=n),l&&a&&ut(a,"arity")&&t.length!==a.arity&&i(t,"length",{value:a.arity});try{a&&ut(a,"constructor")&&a.constructor?u&&i(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var p=r(t);return ut(p,"source")||(p.source=f(h,"string"==typeof n?n:"")),t};Function.prototype.toString=p(function(){return T(this)&&n(this).source||Kt(this)},"toString")}),ie=function(t,e,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:e;if(T(r)&&oe(r,i,n),n.global)o?t[e]=r:et(e,r);else{try{n.unsafe?t[e]&&(o=!0):delete t[e]}catch(t){}o?t[e]=r:Ct.f(t,e,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return t},ae=Math.ceil,ue=Math.floor,se=Math.trunc||function(t){var e=+t;return(e>0?ue:ae)(e)},ce=function(t){var e=+t;return e!=e||0===e?0:se(e)},fe=Math.max,le=Math.min,he=function(t,e){var r=ce(t);return r<0?fe(r+e,0):le(r,e)},pe=Math.min,ve=function(t){var e=ce(t);return e>0?pe(e,9007199254740991):0},de=function(t){return ve(t.length)},ge=function(t){return function(e,r,n){var o=k(e),i=de(o);if(0===i)return!t&&-1;var a,u=he(n,i);if(t&&r!=r){for(;i>u;)if((a=o[u++])!=a)return!0}else for(;i>u;u++)if((t||u in o)&&o[u]===r)return t||u||0;return!t&&-1}},ye={includes:ge(!0),indexOf:ge(!1)},me=ye.indexOf,be=b([].push),we=function(t,e){var r,n=k(t),o=0,i=[];for(r in n)!ut(Jt,r)&&ut(n,r)&&be(i,r);for(;e.length>o;)ut(n,r=e[o++])&&(~me(i,r)||be(i,r));return i},Se=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ee=Se.concat("length","prototype"),Oe={f:Object.getOwnPropertyNames||function(t){return we(t,Ee)}},xe={f:Object.getOwnPropertySymbols},Re=b([].concat),Pe=L("Reflect","ownKeys")||function(t){var e=Oe.f(kt(t)),r=xe.f;return r?Re(e,r(t)):e},Ae=function(t,e,r){for(var n=Pe(e),o=Ct.f,i=Rt.f,a=0;aa;)Ct.f(t,r=o[a++],n[r]);return t},Be={f:Fe},De=L("document","documentElement"),ze="prototype",We="script",qe=Xt("IE_PROTO"),He=function(){},$e=function(t){return"<"+We+">"+t+""},Ke=function(t){t.write($e("")),t.close();var e=t.parentWindow.Object;return t=null,e},Ge=function(){try{re=new ActiveXObject("htmlfile")}catch(t){}var t,e,r;Ge="undefined"!=typeof document?document.domain&&re?Ke(re):(e=Et("iframe"),r="java"+We+":",e.style.display="none",De.appendChild(e),e.src=String(r),(t=e.contentWindow.document).open(),t.write($e("document.F=Object")),t.close(),t.F):Ke(re);for(var n=Se.length;n--;)delete Ge[ze][Se[n]];return Ge()};Jt[qe]=!0;var Ve=Object.create||function(t,e){var r;return null!==t?(He[ze]=kt(t),r=new He,He[ze]=null,r[qe]=t):r=Ge(),void 0===e?r:Be.f(r,e)},Ye=Ct.f,Xe=dt("unscopables"),Je=Array.prototype;void 0===Je[Xe]&&Ye(Je,Xe,{configurable:!0,value:Ve(null)});var Qe=function(t){Je[Xe][t]=!0};Ce({target:"Array",proto:!0},{at:function(t){var e=it(this),r=de(e),n=ce(t),o=n>=0?n:r+n;return o<0||o>=r?void 0:e[o]}}),Qe("at");var Ze=function(t,e){return b(i[t].prototype[e])},tr=(Ze("Array","at"),TypeError),er=function(t,e){if(!delete t[e])throw new tr("Cannot delete property "+Y(e)+" of "+Y(t))},rr=Math.min,nr=[].copyWithin||function(t,e){var r=it(this),n=de(r),o=he(t,n),i=he(e,n),a=arguments.length>2?arguments[2]:void 0,u=rr((void 0===a?n:he(a,n))-i,n-o),s=1;for(i0;)i in r?r[o]=r[i]:er(r,o),o+=s,i+=s;return r};Ce({target:"Array",proto:!0},{copyWithin:nr}),Qe("copyWithin"),Ze("Array","copyWithin"),Ce({target:"Array",proto:!0},{fill:function(t){for(var e=it(this),r=de(e),n=arguments.length,o=he(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:he(i,r);a>o;)e[o++]=t;return e}}),Qe("fill"),Ze("Array","fill");var or=function(t){if("Function"===E(t))return b(t)},ir=or(or.bind),ar=function(t,e){return J(t),void 0===e?t:s?ir(t,e):function(){return t.apply(e,arguments)}},ur=Array.isArray||function(t){return"Array"===E(t)},sr={};sr[dt("toStringTag")]="z";var cr="[object z]"===String(sr),fr=dt("toStringTag"),lr=Object,hr="Arguments"===E(function(){return arguments}()),pr=cr?E:function(t){var e,r,n;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(e=lr(t),fr))?r:hr?E(e):"Object"===(n=E(e))&&T(e.callee)?"Arguments":n},vr=function(){},dr=L("Reflect","construct"),gr=/^\s*(?:class|function)\b/,yr=b(gr.exec),mr=!gr.test(vr),br=function(t){if(!T(t))return!1;try{return dr(vr,[],t),!0}catch(t){return!1}},wr=function(t){if(!T(t))return!1;switch(pr(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return mr||!!yr(gr,Kt(t))}catch(t){return!0}};wr.sham=!0;var Sr=!dr||a(function(){var t;return br(br.call)||!br(Object)||!br(function(){t=!0})||t})?wr:br,Er=dt("species"),Or=Array,xr=function(t,e){return new(function(t){var e;return ur(t)&&(Sr(e=t.constructor)&&(e===Or||ur(e.prototype))||M(e)&&null===(e=e[Er]))&&(e=void 0),void 0===e?Or:e}(t))(0===e?0:e)},Rr=b([].push),Pr=function(t){var e=1===t,r=2===t,n=3===t,o=4===t,i=6===t,a=7===t,u=5===t||i;return function(s,c,f,l){for(var h,p,v=it(s),d=R(v),g=de(d),y=ar(c,f),m=0,b=l||xr,w=e?b(s,g):r||a?b(s,0):void 0;g>m;m++)if((u||m in d)&&(p=y(h=d[m],m,v),t))if(e)w[m]=p;else if(p)switch(t){case 3:return!0;case 5:return h;case 6:return m;case 2:Rr(w,h)}else switch(t){case 4:return!1;case 7:Rr(w,h)}return i?-1:n||o?o:w}},Ar={forEach:Pr(0),map:Pr(1),filter:Pr(2),some:Pr(3),every:Pr(4),find:Pr(5),findIndex:Pr(6),filterReject:Pr(7)},jr=Ar.find,kr="find",Ir=!0;kr in[]&&Array(1)[kr](function(){Ir=!1}),Ce({target:"Array",proto:!0,forced:Ir},{find:function(t){return jr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(kr),Ze("Array","find");var Tr=Ar.findIndex,Mr="findIndex",Lr=!0;Mr in[]&&Array(1)[Mr](function(){Lr=!1}),Ce({target:"Array",proto:!0,forced:Lr},{findIndex:function(t){return Tr(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe(Mr),Ze("Array","findIndex");var Ur=TypeError,Nr=function(t){if(t>9007199254740991)throw Ur("Maximum allowed index exceeded");return t},Cr=function(t,e,r,n,o,i,a,u){for(var s,c,f=o,l=0,h=!!a&&ar(a,u);l0&&ur(s)?(c=de(s),f=Cr(t,e,s,c,f,i-1)-1):(Nr(f+1),t[f]=s),f++),l++;return f},_r=Cr;Ce({target:"Array",proto:!0},{flatMap:function(t){var e,r=it(this),n=de(r);return J(t),(e=xr(r,0)).length=_r(e,r,r,n,0,1,t,arguments.length>1?arguments[1]:void 0),e}}),Qe("flatMap"),Ze("Array","flatMap"),Ce({target:"Array",proto:!0},{flat:function(){var t=arguments.length?arguments[0]:void 0,e=it(this),r=de(e),n=xr(e,0);return n.length=_r(n,e,e,r,0,void 0===t?1:ce(t)),n}}),Qe("flat"),Ze("Array","flat");var Fr,Br,Dr,zr=String,Wr=function(t){if("Symbol"===pr(t))throw new TypeError("Cannot convert a Symbol value to a string");return zr(t)},qr=b("".charAt),Hr=b("".charCodeAt),$r=b("".slice),Kr=function(t){return function(e,r){var n,o,i=Wr(j(e)),a=ce(r),u=i.length;return a<0||a>=u?t?"":void 0:(n=Hr(i,a))<55296||n>56319||a+1===u||(o=Hr(i,a+1))<56320||o>57343?t?qr(i,a):n:t?$r(i,a,a+2):o-56320+(n-55296<<10)+65536}},Gr={codeAt:Kr(!1),charAt:Kr(!0)},Vr=!a(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Yr=Xt("IE_PROTO"),Xr=Object,Jr=Xr.prototype,Qr=Vr?Xr.getPrototypeOf:function(t){var e=it(t);if(ut(e,Yr))return e[Yr];var r=e.constructor;return T(r)&&e instanceof r?r.prototype:e instanceof Xr?Jr:null},Zr=dt("iterator"),tn=!1;[].keys&&("next"in(Dr=[].keys())?(Br=Qr(Qr(Dr)))!==Object.prototype&&(Fr=Br):tn=!0);var en=!M(Fr)||a(function(){var t={};return Fr[Zr].call(t)!==t});en&&(Fr={}),T(Fr[Zr])||ie(Fr,Zr,function(){return this});var rn={IteratorPrototype:Fr,BUGGY_SAFARI_ITERATORS:tn},nn=Ct.f,on=dt("toStringTag"),an=function(t,e,r){t&&!r&&(t=t.prototype),t&&!ut(t,on)&&nn(t,on,{configurable:!0,value:e})},un={},sn=rn.IteratorPrototype,cn=function(){return this},fn=function(t,e,r,n){var o=e+" Iterator";return t.prototype=Ve(sn,{next:d(+!n,r)}),an(t,o,!1),un[o]=cn,t},ln=function(t,e,r){try{return b(J(Object.getOwnPropertyDescriptor(t,e)[r]))}catch(t){}},hn=String,pn=TypeError,vn=function(t){if(function(t){return M(t)||null===t}(t))return t;throw new pn("Can't set "+hn(t)+" as a prototype")},dn=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,r={};try{(t=ln(Object.prototype,"__proto__","set"))(r,[]),e=r instanceof Array}catch(t){}return function(r,n){return j(r),vn(n),M(r)?(e?t(r,n):r.__proto__=n,r):r}}():void 0),gn=zt.PROPER,yn=zt.CONFIGURABLE,mn=rn.IteratorPrototype,bn=rn.BUGGY_SAFARI_ITERATORS,wn=dt("iterator"),Sn="keys",En="values",On="entries",xn=function(){return this},Rn=function(t,e,r,n,o,i,a){fn(r,e,n);var u,s,c,l=function(t){if(t===o&&g)return g;if(!bn&&t&&t in v)return v[t];switch(t){case Sn:case En:case On:return function(){return new r(this,t)}}return function(){return new r(this)}},h=e+" Iterator",p=!1,v=t.prototype,d=v[wn]||v["@@iterator"]||o&&v[o],g=!bn&&d||l(o),y="Array"===e&&v.entries||d;if(y&&(u=Qr(y.call(new t)))!==Object.prototype&&u.next&&(Qr(u)!==mn&&(dn?dn(u,mn):T(u[wn])||ie(u,wn,xn)),an(u,h,!0)),gn&&o===En&&d&&d.name!==En&&(yn?_t(v,"name",En):(p=!0,g=function(){return f(d,this)})),o)if(s={values:l(En),keys:i?g:l(Sn),entries:l(On)},a)for(c in s)(bn||p||!(c in v))&&ie(v,c,s[c]);else Ce({target:e,proto:!0,forced:bn||p},s);return v[wn]!==g&&ie(v,wn,g,{name:o}),un[e]=g,s},Pn=function(t,e){return{value:t,done:e}},An=Gr.charAt,jn="String Iterator",kn=ne.set,In=ne.getterFor(jn);Rn(String,"String",function(t){kn(this,{type:jn,string:Wr(t),index:0})},function(){var t,e=In(this),r=e.string,n=e.index;return n>=r.length?Pn(void 0,!0):(t=An(r,n),e.index+=t.length,Pn(t,!1))});var Tn=function(t,e,r){var n,o;kt(t);try{if(!(n=Q(t,"return"))){if("throw"===e)throw r;return r}n=f(n,t)}catch(t){o=!0,n=t}if("throw"===e)throw r;if(o)throw n;return kt(n),r},Mn=function(t,e,r,n){try{return n?e(kt(r)[0],r[1]):e(r)}catch(e){Tn(t,"throw",e)}},Ln=dt("iterator"),Un=Array.prototype,Nn=function(t){return void 0!==t&&(un.Array===t||Un[Ln]===t)},Cn=function(t,e,r){u?Ct.f(t,e,d(0,r)):t[e]=r},_n=dt("iterator"),Fn=function(t){if(!P(t))return Q(t,_n)||Q(t,"@@iterator")||un[pr(t)]},Bn=TypeError,Dn=function(t,e){var r=arguments.length<2?Fn(t):e;if(J(r))return kt(f(r,t));throw new Bn(Y(t)+" is not iterable")},zn=Array,Wn=function(t){var e=it(t),r=Sr(this),n=arguments.length,o=n>1?arguments[1]:void 0,i=void 0!==o;i&&(o=ar(o,n>2?arguments[2]:void 0));var a,u,s,c,l,h,p=Fn(e),v=0;if(!p||this===zn&&Nn(p))for(a=de(e),u=r?new this(a):zn(a);a>v;v++)h=i?o(e[v],v):e[v],Cn(u,v,h);else for(u=r?new this:[],l=(c=Dn(e,p)).next;!(s=f(l,c)).done;v++)h=i?Mn(c,o,[s.value,v],!0):s.value,Cn(u,v,h);return u.length=v,u},qn=dt("iterator"),Hn=!1;try{var $n=0,Kn={next:function(){return{done:!!$n++}},return:function(){Hn=!0}};Kn[qn]=function(){return this},Array.from(Kn,function(){throw 2})}catch(t){}var Gn=function(t,e){try{if(!e&&!Hn)return!1}catch(t){return!1}var r=!1;try{var n={};n[qn]=function(){return{next:function(){return{done:r=!0}}}},t(n)}catch(t){}return r},Vn=!Gn(function(t){Array.from(t)});Ce({target:"Array",stat:!0,forced:Vn},{from:Wn});var Yn=i,Xn=ye.includes,Jn=a(function(){return!Array(1).includes()});Ce({target:"Array",proto:!0,forced:Jn},{includes:function(t){return Xn(this,t,arguments.length>1?arguments[1]:void 0)}}),Qe("includes"),Ze("Array","includes");var Qn=Ct.f,Zn="Array Iterator",to=ne.set,eo=ne.getterFor(Zn),ro=Rn(Array,"Array",function(t,e){to(this,{type:Zn,target:k(t),index:0,kind:e})},function(){var t=eo(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);switch(t.kind){case"keys":return Pn(r,!1);case"values":return Pn(e[r],!1)}return Pn([r,e[r]],!1)},"values"),no=un.Arguments=un.Array;if(Qe("keys"),Qe("values"),Qe("entries"),u&&"values"!==no.name)try{Qn(no,"name",{value:"values"})}catch(t){}cr||ie(Object.prototype,"toString",cr?{}.toString:function(){return"[object "+pr(this)+"]"},{unsafe:!0}),Ze("Array","values");var oo=Array,io=a(function(){function t(){}return!(oo.of.call(t)instanceof t)});Ce({target:"Array",stat:!0,forced:io},{of:function(){for(var t=0,e=arguments.length,r=new(Sr(this)?this:oo)(e);e>t;)Cn(r,t,arguments[t++]);return r.length=e,r}});var ao=dt("hasInstance"),uo=Function.prototype;ao in uo||Ct.f(uo,ao,{value:oe(function(t){if(!T(this)||!M(t))return!1;var e=this.prototype;return M(e)?U(e,t):t instanceof this},ao)}),dt("hasInstance");var so=function(t,e,r){return r.get&&oe(r.get,e,{getter:!0}),r.set&&oe(r.set,e,{setter:!0}),Ct.f(t,e,r)},co=zt.EXISTS,fo=Function.prototype,lo=b(fo.toString),ho=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,po=b(ho.exec);u&&!co&&so(fo,"name",{configurable:!0,get:function(){try{return po(ho,lo(this))[1]}catch(t){return""}}});var vo=b([].slice),go=Oe.f,yo="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],mo={f:function(t){return yo&&"Window"===E(t)?function(t){try{return go(t)}catch(t){return vo(yo)}}(t):go(k(t))}},bo=a(function(){if("function"==typeof ArrayBuffer){var t=new ArrayBuffer(8);Object.isExtensible(t)&&Object.defineProperty(t,"a",{value:8})}}),wo=Object.isExtensible,So=a(function(){wo(1)})||bo?function(t){return!!M(t)&&(!bo||"ArrayBuffer"!==E(t))&&(!wo||wo(t))}:wo,Eo=!a(function(){return Object.isExtensible(Object.preventExtensions({}))}),Oo=e(function(t){var e=Ct.f,r=!1,n=lt("meta"),o=0,i=function(t){e(t,n,{value:{objectID:"O"+o++,weakData:{}}})},a=t.exports={enable:function(){a.enable=function(){},r=!0;var t=Oe.f,e=b([].splice),o={};o[n]=1,t(o).length&&(Oe.f=function(r){for(var o=t(r),i=0,a=o.length;ii;i++)if((u=y(t[i]))&&U(Po,u))return u;return new Ro(!1)}n=Dn(t,o)}for(s=h?t.next:n.next;!(c=f(s,n)).done;){try{u=y(c.value)}catch(t){Tn(n,"throw",t)}if("object"==typeof u&&u&&U(Po,u))return u}return new Ro(!1)},jo=TypeError,ko=function(t,e){if(U(e,t))return t;throw new jo("Incorrect invocation")},Io=function(t,e,r){var n,o;return dn&&T(n=e.constructor)&&n!==r&&M(o=n.prototype)&&o!==r.prototype&&dn(t,o),t},To=function(t,e,r){var n=-1!==t.indexOf("Map"),o=-1!==t.indexOf("Weak"),u=n?"set":"add",s=i[t],c=s&&s.prototype,f=s,l={},h=function(t){var e=b(c[t]);ie(c,t,"add"===t?function(t){return e(this,0===t?0:t),this}:"delete"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:"get"===t?function(t){return o&&!M(t)?void 0:e(this,0===t?0:t)}:"has"===t?function(t){return!(o&&!M(t))&&e(this,0===t?0:t)}:function(t,r){return e(this,0===t?0:t,r),this})};if(Ue(t,!T(s)||!(o||c.forEach&&!a(function(){(new s).entries().next()}))))f=r.getConstructor(e,t,n,u),Oo.enable();else if(Ue(t,!0)){var p=new f,v=p[u](o?{}:-0,1)!==p,d=a(function(){p.has(1)}),g=Gn(function(t){new s(t)}),y=!o&&a(function(){for(var t=new s,e=5;e--;)t[u](e,e);return!t.has(-0)});g||((f=e(function(t,e){ko(t,c);var r=Io(new s,t,f);return P(e)||Ao(e,r[u],{that:r,AS_ENTRIES:n}),r})).prototype=c,c.constructor=f),(d||y)&&(h("delete"),h("has"),n&&h("get")),(y||v)&&h(u),o&&c.clear&&delete c.clear}return l[t]=f,Ce({global:!0,constructor:!0,forced:f!==s},l),an(f,t),o||r.setStrong(f,t,n),f},Mo=function(t,e,r){for(var n in e)ie(t,n,e[n],r);return t},Lo=dt("species"),Uo=function(t){var e=L(t);u&&e&&!e[Lo]&&so(e,Lo,{configurable:!0,get:function(){return this}})},No=Oo.fastKey,Co=ne.set,_o=ne.getterFor,Fo={getConstructor:function(t,e,r,n){var o=t(function(t,o){ko(t,i),Co(t,{type:e,index:Ve(null),first:null,last:null,size:0}),u||(t.size=0),P(o)||Ao(o,t[n],{that:t,AS_ENTRIES:r})}),i=o.prototype,a=_o(e),s=function(t,e,r){var n,o,i=a(t),s=c(t,e);return s?s.value=r:(i.last=s={index:o=No(e,!0),key:e,value:r,previous:n=i.last,next:null,removed:!1},i.first||(i.first=s),n&&(n.next=s),u?i.size++:t.size++,"F"!==o&&(i.index[o]=s)),t},c=function(t,e){var r,n=a(t),o=No(e);if("F"!==o)return n.index[o];for(r=n.first;r;r=r.next)if(r.key===e)return r};return Mo(i,{clear:function(){for(var t=a(this),e=t.first;e;)e.removed=!0,e.previous&&(e.previous=e.previous.next=null),e=e.next;t.first=t.last=null,t.index=Ve(null),u?t.size=0:this.size=0},delete:function(t){var e=this,r=a(e),n=c(e,t);if(n){var o=n.next,i=n.previous;delete r.index[n.index],n.removed=!0,i&&(i.next=o),o&&(o.previous=i),r.first===n&&(r.first=o),r.last===n&&(r.last=i),u?r.size--:e.size--}return!!n},forEach:function(t){for(var e,r=a(this),n=ar(t,arguments.length>1?arguments[1]:void 0);e=e?e.next:r.first;)for(n(e.value,e.key,this);e&&e.removed;)e=e.previous},has:function(t){return!!c(this,t)}}),Mo(i,r?{get:function(t){var e=c(this,t);return e&&e.value},set:function(t,e){return s(this,0===t?0:t,e)}}:{add:function(t){return s(this,t=0===t?0:t,t)}}),u&&so(i,"size",{configurable:!0,get:function(){return a(this).size}}),o},setStrong:function(t,e,r){var n=e+" Iterator",o=_o(e),i=_o(n);Rn(t,e,function(t,e){Co(this,{type:n,target:t,state:o(t),kind:e,last:null})},function(){for(var t=i(this),e=t.kind,r=t.last;r&&r.removed;)r=r.previous;return t.target&&(t.last=r=r?r.next:t.state.first)?Pn("keys"===e?r.key:"values"===e?r.value:[r.key,r.value],!1):(t.target=null,Pn(void 0,!0))},r?"entries":"values",!r,!0),Uo(e)}};To("Map",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var Bo=Map.prototype,Do={Map:Map,set:b(Bo.set),get:b(Bo.get),has:b(Bo.has),remove:b(Bo.delete),proto:Bo},zo=Do.Map,Wo=Do.has,qo=Do.get,Ho=Do.set,$o=b([].push),Ko=a(function(){return 1!==zo.groupBy("ab",function(t){return t}).get("a").length});Ce({target:"Map",stat:!0,forced:Ko},{groupBy:function(t,e){j(t),J(e);var r=new zo,n=0;return Ao(t,function(t){var o=e(t,n++);Wo(r,o)?$o(qo(r,o),t):Ho(r,o,[t])}),r}});var Go={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Vo=Et("span").classList,Yo=Vo&&Vo.constructor&&Vo.constructor.prototype,Xo=Yo===Object.prototype?void 0:Yo,Jo=dt("iterator"),Qo=ro.values,Zo=function(t,e){if(t){if(t[Jo]!==Qo)try{_t(t,Jo,Qo)}catch(e){t[Jo]=Qo}if(an(t,e,!0),Go[e])for(var r in ro)if(t[r]!==ro[r])try{_t(t,r,ro[r])}catch(e){t[r]=ro[r]}}};for(var ti in Go)Zo(i[ti]&&i[ti].prototype,ti);Zo(Xo,"DOMTokenList");var ei=function(t,e,r){return function(n){var o=it(n),i=arguments.length,a=i>1?arguments[1]:void 0,u=void 0!==a,s=u?ar(a,i>2?arguments[2]:void 0):void 0,c=new t,f=0;return Ao(o,function(t){var n=u?s(t,f++):t;r?e(c,kt(n)[0],n[1]):e(c,n)}),c}};Ce({target:"Map",stat:!0,forced:!0},{from:ei(Do.Map,Do.set,!0)});var ri=function(t,e,r){return function(){for(var n=new t,o=arguments.length,i=0;i1?arguments[1]:void 0);return!1!==di(e,function(t,n){if(!r(t,n,e))return!1},!0)}});var gi=Do.Map,yi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new gi;return di(e,function(t,o){r(t,o,e)&&yi(n,o,t)}),n}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{find:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=di(e,function(t,n){if(r(t,n,e))return{key:n}},!0);return n&&n.key}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(t){return!0===di(oi(this),function(e){if((r=e)===(n=t)||r!=r&&n!=n)return!0;var r,n},!0)}});var mi=Do.Map;Ce({target:"Map",stat:!0,forced:!0},{keyBy:function(t,e){var r=new(T(this)?this:mi);J(e);var n=J(r.set);return Ao(t,function(t){f(n,r,e(t),t)}),r}}),Ce({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(t){var e=di(oi(this),function(e,r){if(e===t)return{key:r}},!0);return e&&e.key}});var bi=Do.Map,wi=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new bi;return di(e,function(t,o){wi(n,r(t,o,e),t)}),n}});var Si=Do.Map,Ei=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(t){var e=oi(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new Si;return di(e,function(t,o){Ei(n,o,r(t,o,e))}),n}});var Oi=Do.set;Ce({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(t){for(var e=oi(this),r=arguments.length,n=0;n1?arguments[1]:void 0);return!0===di(e,function(t,n){if(r(t,n,e))return!0},!0)}});var Ri=TypeError,Pi=Do.get,Ai=Do.has,ji=Do.set;Ce({target:"Map",proto:!0,real:!0,forced:!0},{update:function(t,e){var r=oi(this),n=arguments.length;J(e);var o=Ai(r,t);if(!o&&n<3)throw new Ri("Updating absent value");var i=o?Pi(r,t):J(n>2?arguments[2]:void 0)(t,r);return ji(r,t,e(i,t,r)),r}});var ki=TypeError,Ii=function(t,e){var r,n=kt(this),o=J(n.get),i=J(n.has),a=J(n.set),u=arguments.length>2?arguments[2]:void 0;if(!T(e)&&!T(u))throw new ki("At least one callback required");return f(i,n,t)?(r=f(o,n,t),T(e)&&(r=e(r),f(a,n,t,r))):T(u)&&(r=u(),f(a,n,t,r)),r};Ce({target:"Map",proto:!0,real:!0,forced:!0},{upsert:Ii}),Ce({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:Ii});var Ti=b(1..valueOf),Mi="\t\n\v\f\r                 \u2028\u2029\ufeff",Li=b("".replace),Ui=RegExp("^["+Mi+"]+"),Ni=RegExp("(^|[^"+Mi+"])["+Mi+"]+$"),Ci=function(t){return function(e){var r=Wr(j(e));return 1&t&&(r=Li(r,Ui,"")),2&t&&(r=Li(r,Ni,"$1")),r}},_i={start:Ci(1),end:Ci(2),trim:Ci(3)},Fi=Oe.f,Bi=Rt.f,Di=Ct.f,zi=_i.trim,Wi="Number",qi=i[Wi],Hi=qi.prototype,$i=i.TypeError,Ki=b("".slice),Gi=b("".charCodeAt),Vi=Ue(Wi,!qi(" 0o1")||!qi("0b1")||qi("+0x1")),Yi=function(t){var e,r=arguments.length<1?0:qi(function(t){var e=mt(t,"number");return"bigint"==typeof e?e:function(t){var e,r,n,o,i,a,u,s,c=mt(t,"number");if(G(c))throw new $i("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=zi(c),43===(e=Gi(c,0))||45===e){if(88===(r=Gi(c,2))||120===r)return NaN}else if(48===e){switch(Gi(c,1)){case 66:case 98:n=2,o=49;break;case 79:case 111:n=8,o=55;break;default:return+c}for(a=(i=Ki(c,2)).length,u=0;uo)return NaN;return parseInt(i,n)}return+c}(e)}(t));return U(Hi,e=this)&&a(function(){Ti(e)})?Io(Object(r),this,Yi):r};Yi.prototype=Hi,Vi&&(Hi.constructor=Yi),Ce({global:!0,constructor:!0,wrap:!0,forced:Vi},{Number:Yi}),Vi&&function(t,e){for(var r,n=u?Fi(e):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),o=0;n.length>o;o++)ut(e,r=n[o])&&!ut(t,r)&&Di(t,r,Bi(e,r))}(Yn[Wi],qi),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var Xi=i.isFinite;Ce({target:"Number",stat:!0},{isFinite:Number.isFinite||function(t){return"number"==typeof t&&Xi(t)}});var Ji=Math.floor,Qi=Number.isInteger||function(t){return!M(t)&&isFinite(t)&&Ji(t)===t};Ce({target:"Number",stat:!0},{isInteger:Qi}),Ce({target:"Number",stat:!0},{isNaN:function(t){return t!=t}});var Zi=Math.abs;Ce({target:"Number",stat:!0},{isSafeInteger:function(t){return Qi(t)&&Zi(t)<=9007199254740991}}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),Ce({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var ta=_i.trim,ea=b("".charAt),ra=i.parseFloat,na=i.Symbol,oa=na&&na.iterator,ia=1/ra(Mi+"-0")!=-Infinity||oa&&!a(function(){ra(Object(oa))})?function(t){var e=ta(Wr(t)),r=ra(e);return 0===r&&"-"===ea(e,0)?-0:r}:ra;Ce({target:"Number",stat:!0,forced:Number.parseFloat!==ia},{parseFloat:ia});var aa=_i.trim,ua=i.parseInt,sa=i.Symbol,ca=sa&&sa.iterator,fa=/^[+-]?0x/i,la=b(fa.exec),ha=8!==ua(Mi+"08")||22!==ua(Mi+"0x16")||ca&&!a(function(){ua(Object(ca))})?function(t,e){var r=aa(Wr(t));return ua(r,e>>>0||(la(fa,r)?16:10))}:ua;Ce({target:"Number",stat:!0,forced:Number.parseInt!==ha},{parseInt:ha});var pa=b(v.f),va=b([].push),da=u&&a(function(){var t=Object.create(null);return t[2]=2,!pa(t,2)}),ga=function(t){return function(e){for(var r,n=k(e),o=_e(n),i=da&&null===Qr(n),a=o.length,s=0,c=[];a>s;)r=o[s++],u&&!(i?r in n:pa(n,r))||va(c,t?[r,n[r]]:n[r]);return c}},ya={entries:ga(!0),values:ga(!1)},ma=ya.entries;Ce({target:"Object",stat:!0},{entries:function(t){return ma(t)}}),Ce({target:"Object",stat:!0,sham:!u},{getOwnPropertyDescriptors:function(t){for(var e,r,n=k(t),o=Rt.f,i=Pe(n),a={},u=0;i.length>u;)void 0!==(r=o(n,e=i[u++]))&&Cn(a,e,r);return a}});var ba=a(function(){_e(1)});Ce({target:"Object",stat:!0,forced:ba},{keys:function(t){return _e(it(t))}});var wa=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e};Ce({target:"Object",stat:!0},{is:wa});var Sa=ya.values;Ce({target:"Object",stat:!0},{values:function(t){return Sa(t)}}),Ce({target:"Object",stat:!0},{hasOwn:ut});var Ea=Function.prototype,Oa=Ea.apply,xa=Ea.call,Ra="object"==typeof Reflect&&Reflect.apply||(s?xa.bind(Oa):function(){return xa.apply(Oa,arguments)}),Pa=!a(function(){Reflect.apply(function(){})});Ce({target:"Reflect",stat:!0,forced:Pa},{apply:function(t,e,r){return Ra(J(t),e,kt(r))}});var Aa=Function,ja=b([].concat),ka=b([].join),Ia={},Ta=s?Aa.bind:function(t){var e=J(this),r=e.prototype,n=vo(arguments,1),o=function(){var r=ja(n,vo(arguments));return this instanceof o?function(t,e,r){if(!ut(Ia,e)){for(var n=[],o=0;ob)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$c")}),gs=Oe.f,ys=ne.enforce,ms=dt("match"),bs=i.RegExp,ws=bs.prototype,Ss=i.SyntaxError,Es=b(ws.exec),Os=b("".charAt),xs=b("".replace),Rs=b("".indexOf),Ps=b("".slice),As=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,js=/a/g,ks=/a/g,Is=new bs(js)!==js,Ts=cs.MISSED_STICKY,Ms=cs.UNSUPPORTED_Y,Ls=u&&(!Is||Ts||ps||ds||a(function(){return ks[ms]=!1,bs(js)!==js||bs(ks)===ks||"/a/i"!==String(bs(js,"i"))}));if(Ue("RegExp",Ls)){for(var Us=function(t,e){var r,n,o,i,a,u,s=U(ws,this),c=es(t),f=void 0===e,l=[],h=t;if(!s&&c&&f&&t.constructor===Us)return t;if((c||U(ws,t))&&(t=t.source,f&&(e=os(h))),t=void 0===t?"":Wr(t),e=void 0===e?"":Wr(e),h=t,ps&&"dotAll"in js&&(n=!!e&&Rs(e,"s")>-1)&&(e=xs(e,/s/g,"")),r=e,Ts&&"sticky"in js&&(o=!!e&&Rs(e,"y")>-1)&&Ms&&(e=xs(e,/y/g,"")),ds&&(i=function(t){for(var e,r=t.length,n=0,o="",i=[],a=Ve(null),u=!1,s=!1,c=0,f="";n<=r;n++){if("\\"===(e=Os(t,n)))e+=Os(t,++n);else if("]"===e)u=!1;else if(!u)switch(!0){case"["===e:u=!0;break;case"("===e:if(o+=e,"?:"===Ps(t,n+1,n+3))continue;Es(As,Ps(t,n+1))&&(n+=2,s=!0),c++;continue;case">"===e&&s:if(""===f||ut(a,f))throw new Ss("Invalid capture group name");a[f]=!0,i[i.length]=[f,c],s=!1,f="";continue}s?f+=e:o+=e}return[o,i]}(t),t=i[0],l=i[1]),a=Io(bs(t,e),s?this:ws,Us),(n||o||l.length)&&(u=ys(a),n&&(u.dotAll=!0,u.raw=Us(function(t){for(var e,r=t.length,n=0,o="",i=!1;n<=r;n++)"\\"!==(e=Os(t,n))?i||"."!==e?("["===e?i=!0:"]"===e&&(i=!1),o+=e):o+="[\\s\\S]":o+=e+Os(t,++n);return o}(t),r)),o&&(u.sticky=!0),l.length&&(u.groups=l)),t!==h)try{_t(a,"source",""===h?"(?:)":h)}catch(t){}return a},Ns=gs(bs),Cs=0;Ns.length>Cs;)ls(Us,bs,Ns[Cs++]);ws.constructor=Us,Us.prototype=ws,ie(i,"RegExp",Us,{constructor:!0})}Uo("RegExp");var _s=zt.PROPER,Fs="toString",Bs=RegExp.prototype,Ds=Bs[Fs];(a(function(){return"/a/b"!==Ds.call({source:"a",flags:"b"})})||_s&&Ds.name!==Fs)&&ie(Bs,Fs,function(){var t=kt(this);return"/"+Wr(t.source)+"/"+Wr(os(t))},{unsafe:!0});var zs=ne.get,Ws=RegExp.prototype,qs=TypeError;u&&ps&&so(Ws,"dotAll",{configurable:!0,get:function(){if(this!==Ws){if("RegExp"===E(this))return!!zs(this).dotAll;throw new qs("Incompatible receiver, RegExp required")}}});var Hs=ne.get,$s=nt("native-string-replace",String.prototype.replace),Ks=RegExp.prototype.exec,Gs=Ks,Vs=b("".charAt),Ys=b("".indexOf),Xs=b("".replace),Js=b("".slice),Qs=function(){var t=/a/,e=/b*/g;return f(Ks,t,"a"),f(Ks,e,"a"),0!==t.lastIndex||0!==e.lastIndex}(),Zs=cs.BROKEN_CARET,tc=void 0!==/()??/.exec("")[1];(Qs||tc||Zs||ps||ds)&&(Gs=function(t){var e,r,n,o,i,a,u,s=this,c=Hs(s),l=Wr(t),h=c.raw;if(h)return h.lastIndex=s.lastIndex,e=f(Gs,h,l),s.lastIndex=h.lastIndex,e;var p=c.groups,v=Zs&&s.sticky,d=f(rs,s),g=s.source,y=0,m=l;if(v&&(d=Xs(d,"y",""),-1===Ys(d,"g")&&(d+="g"),m=Js(l,s.lastIndex),s.lastIndex>0&&(!s.multiline||s.multiline&&"\n"!==Vs(l,s.lastIndex-1))&&(g="(?: "+g+")",m=" "+m,y++),r=new RegExp("^(?:"+g+")",d)),tc&&(r=new RegExp("^"+g+"$(?!\\s)",d)),Qs&&(n=s.lastIndex),o=f(Ks,v?r:s,m),v?o?(o.input=Js(o.input,y),o[0]=Js(o[0],y),o.index=s.lastIndex,s.lastIndex+=o[0].length):s.lastIndex=0:Qs&&o&&(s.lastIndex=s.global?o.index+o[0].length:n),tc&&o&&o.length>1&&f($s,o[0],r,function(){for(i=1;i]*>)/g,Oc=/\$([$&'`]|\d{1,2})/g,xc=function(t,e,r,n,o,i){var a=r+t.length,u=n.length,s=Oc;return void 0!==o&&(o=it(o),s=Ec),wc(i,s,function(i,s){var c;switch(bc(s,0)){case"$":return"$";case"&":return t;case"`":return Sc(e,0,r);case"'":return Sc(e,a);case"<":c=o[Sc(s,1,-1)];break;default:var f=+s;if(0===f)return i;if(f>u){var l=mc(f/10);return 0===l?i:l<=u?void 0===n[l-1]?bc(s,1):n[l-1]+bc(s,1):i}c=n[f-1]}return void 0===c?"":c})},Rc=dt("replace"),Pc=Math.max,Ac=Math.min,jc=b([].concat),kc=b([].push),Ic=b("".indexOf),Tc=b("".slice),Mc="$0"==="a".replace(/./,"$0"),Lc=!!/./[Rc]&&""===/./[Rc]("a","$0"),Uc=!a(function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")});pc("replace",function(t,e,r){var n=Lc?"$":"$0";return[function(t,r){var n=j(this),o=P(t)?void 0:Q(t,Rc);return o?f(o,t,n,r):f(e,Wr(n),t,r)},function(t,o){var i=kt(this),a=Wr(t);if("string"==typeof o&&-1===Ic(o,n)&&-1===Ic(o,"$<")){var u=r(e,i,a,o);if(u.done)return u.value}var s=T(o);s||(o=Wr(o));var c,f=i.global;f&&(c=i.unicode,i.lastIndex=0);for(var l,h=[];null!==(l=yc(i,a))&&(kc(h,l),f);)""===Wr(l[0])&&(i.lastIndex=dc(a,ve(i.lastIndex),c));for(var p,v="",d=0,g=0;g=d&&(v+=Tc(a,d,b)+y,d=b+m.length)}return v+Tc(a,d)}]},!Uc||!Mc||Lc),pc("search",function(t,e,r){return[function(e){var r=j(this),n=P(e)?void 0:Q(e,t);return n?f(n,e,r):new RegExp(e)[t](Wr(r))},function(t){var n=kt(this),o=Wr(t),i=r(e,n,o);if(i.done)return i.value;var a=n.lastIndex;wa(a,0)||(n.lastIndex=0);var u=yc(n,o);return wa(n.lastIndex,a)||(n.lastIndex=a),null===u?-1:u.index}]});var Nc=dt("species"),Cc=function(t,e){var r,n=kt(t).constructor;return void 0===n||P(r=kt(n)[Nc])?e:La(r)},_c=cs.UNSUPPORTED_Y,Fc=Math.min,Bc=b([].push),Dc=b("".slice),zc=!a(function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var r="ab".split(t);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}),Wc="c"==="abbc".split(/(b)*/)[1]||4!=="test".split(/(?:)/,-1).length||2!=="ab".split(/(?:ab)*/).length||4!==".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length;pc("split",function(t,e,r){var n="0".split(void 0,0).length?function(t,r){return void 0===t&&0===r?[]:f(e,this,t,r)}:e;return[function(e,r){var o=j(this),i=P(e)?void 0:Q(e,t);return i?f(i,e,o,r):f(n,Wr(o),e,r)},function(t,o){var i=kt(this),a=Wr(t);if(!Wc){var u=r(n,i,a,o,n!==e);if(u.done)return u.value}var s=Cc(i,RegExp),c=i.unicode,f=new s(_c?"^(?:"+i.source+")":i,(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(_c?"g":"y")),l=void 0===o?4294967295:o>>>0;if(0===l)return[];if(0===a.length)return null===yc(f,a)?[a]:[];for(var h=0,p=0,v=[];p0;(n>>>=1)&&(e+=e))1&n&&(r+=e);return r},Kc=b($c),Gc=b("".slice),Vc=Math.ceil,Yc=function(t){return function(e,r,n){var o,i,a=Wr(j(e)),u=ve(r),s=a.length,c=void 0===n?" ":Wr(n);return u<=s||""===c?a:((i=Kc(c,Vc((o=u-s)/c.length))).length>o&&(i=Gc(i,0,o)),t?a+i:i+a)}},Xc={start:Yc(!1),end:Yc(!0)},Jc=Xc.start,Qc=Array,Zc=RegExp.escape,tf=b("".charAt),ef=b("".charCodeAt),rf=b(1.1.toString),nf=b([].join),of=/^[0-9a-z]/i,af=/^[$()*+./?[\\\]^{|}]/,uf=RegExp("^[!\"#%&',\\-:;<=>@`~"+Mi+"]"),sf=b(of.exec),cf={"\t":"t","\n":"n","\v":"v","\f":"f","\r":"r"},ff=function(t){var e=rf(ef(t,0),16);return e.length<3?"\\x"+Jc(e,2,"0"):"\\u"+Jc(e,4,"0")},lf=!Zc||"\\x61b"!==Zc("ab");Ce({target:"RegExp",stat:!0,forced:lf},{escape:function(t){!function(t){if("string"==typeof t)return t;throw new qc("Argument is not a string")}(t);for(var e=t.length,r=Qc(e),n=0;n=56320||n+1>=e||56320!=(64512&ef(t,n+1))?r[n]=ff(o):(r[n]=o,r[++n]=tf(t,n))}}return nf(r,"")}}),To("Set",function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},Fo);var hf=Set.prototype,pf={Set:Set,add:b(hf.add),has:b(hf.has),remove:b(hf.delete),proto:hf},vf=pf.has,df=function(t){return vf(t),t},gf=pf.Set,yf=pf.proto,mf=b(yf.forEach),bf=b(yf.keys),wf=bf(new gf).next,Sf=function(t,e,r){return r?ci({iterator:bf(t),next:wf},e):mf(t,e)},Ef=pf.Set,Of=pf.add,xf=function(t){var e=new Ef;return Sf(t,function(t){Of(e,t)}),e},Rf=ln(pf.proto,"size","get")||function(t){return t.size},Pf="Invalid size",Af=RangeError,jf=TypeError,kf=Math.max,If=function(t,e){this.set=t,this.size=kf(e,0),this.has=J(t.has),this.keys=J(t.keys)};If.prototype={getIterator:function(){return{iterator:t=kt(f(this.keys,this.set)),next:t.next,done:!1};var t},includes:function(t){return f(this.has,this.set,t)}};var Tf=function(t){kt(t);var e=+t.size;if(e!=e)throw new jf(Pf);var r=ce(e);if(r<0)throw new Af(Pf);return new If(t,r)},Mf=pf.has,Lf=pf.remove,Uf=function(t){var e=df(this),r=Tf(t),n=xf(e);return Rf(e)<=r.size?Sf(e,function(t){r.includes(t)&&Lf(n,t)}):ci(r.getIterator(),function(t){Mf(e,t)&&Lf(n,t)}),n},Nf=function(t){return{size:t,has:function(){return!1},keys:function(){return{next:function(){return{done:!0}}}}}},Cf=function(t){var e=L("Set");try{(new e)[t](Nf(0));try{return(new e)[t](Nf(-1)),!1}catch(t){return!0}}catch(t){return!1}};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("difference")},{difference:Uf});var _f=pf.Set,Ff=pf.add,Bf=pf.has,Df=function(t){var e=df(this),r=Tf(t),n=new _f;return Rf(e)>r.size?ci(r.getIterator(),function(t){Bf(e,t)&&Ff(n,t)}):Sf(e,function(t){r.includes(t)&&Ff(n,t)}),n},zf=!Cf("intersection")||a(function(){return"3,2"!==String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))});Ce({target:"Set",proto:!0,real:!0,forced:zf},{intersection:Df});var Wf=pf.has,qf=function(t){var e=df(this),r=Tf(t);if(Rf(e)<=r.size)return!1!==Sf(e,function(t){if(r.includes(t))return!1},!0);var n=r.getIterator();return!1!==ci(n,function(t){if(Wf(e,t))return Tn(n,"normal",!1)})};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isDisjointFrom")},{isDisjointFrom:qf});var Hf=function(t){var e=df(this),r=Tf(t);return!(Rf(e)>r.size)&&!1!==Sf(e,function(t){if(!r.includes(t))return!1},!0)};Ce({target:"Set",proto:!0,real:!0,forced:!Cf("isSubsetOf")},{isSubsetOf:Hf});var $f=pf.has,Kf=function(t){var e=df(this),r=Tf(t);if(Rf(e)1?arguments[1]:void 0);return!1!==Sf(e,function(t){if(!r(t,t,e))return!1},!0)}});var el=dt("iterator"),rl=Object,nl=L("Set"),ol=function(t){return function(t){return M(t)&&"number"==typeof t.size&&T(t.has)&&T(t.keys)}(t)?t:function(t){if(P(t))return!1;var e=rl(t);return void 0!==e[el]||"@@iterator"in e||ut(un,pr(e))}(t)?new nl(t):t};Ce({target:"Set",proto:!0,real:!0,forced:!0},{difference:function(t){return f(Uf,this,ol(t))}});var il=pf.Set,al=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new il;return Sf(e,function(t){r(t,t,e)&&al(n,t)}),n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{find:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=Sf(e,function(t){if(r(t,t,e))return{value:t}},!0);return n&&n.value}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(t){return f(Df,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(t){return f(qf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(t){return f(Hf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{isSupersetOf:function(t){return f(Kf,this,ol(t))}});var ul=b([].join),sl=b([].push);Ce({target:"Set",proto:!0,real:!0,forced:!0},{join:function(t){var e=df(this),r=void 0===t?",":Wr(t),n=[];return Sf(e,function(t){sl(n,t)}),ul(n,r)}});var cl=pf.Set,fl=pf.add;Ce({target:"Set",proto:!0,real:!0,forced:!0},{map:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0),n=new cl;return Sf(e,function(t){fl(n,r(t,t,e))}),n}});var ll=TypeError;Ce({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(t){var e=df(this),r=arguments.length<2,n=r?void 0:arguments[1];if(J(t),Sf(e,function(o){r?(r=!1,n=o):n=t(n,o,o,e)}),r)throw new ll("Reduce of empty set with no initial value");return n}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{some:function(t){var e=df(this),r=ar(t,arguments.length>1?arguments[1]:void 0);return!0===Sf(e,function(t){if(r(t,t,e))return!0},!0)}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(t){return f(Xf,this,ol(t))}}),Ce({target:"Set",proto:!0,real:!0,forced:!0},{union:function(t){return f(Qf,this,ol(t))}});var hl=dt("species"),pl=dt("isConcatSpreadable"),vl=W>=51||!a(function(){var t=[];return t[pl]=!1,t.concat()[0]!==t}),dl=function(t){if(!M(t))return!1;var e=t[pl];return void 0!==e?!!e:ur(t)},gl=!(vl&&(W>=51||!a(function(){var t=[];return(t.constructor={})[hl]=function(){return{foo:1}},1!==t.concat(Boolean).foo})));Ce({target:"Array",proto:!0,arity:1,forced:gl},{concat:function(t){var e,r,n,o,i,a=it(this),u=xr(a,0),s=0;for(e=-1,n=arguments.length;e1?arguments[1]:void 0,n=e.length,o=void 0===r?n:ip(ve(r),n),i=Wr(t);return op(e,o-i.length,o)===i}}),Ze("String","endsWith");var sp=RangeError,cp=String.fromCharCode,fp=String.fromCodePoint,lp=b([].join);Ce({target:"String",stat:!0,arity:1,forced:!!fp&&1!==fp.length},{fromCodePoint:function(t){for(var e,r=[],n=arguments.length,o=0;n>o;){if(e=+arguments[o++],he(e,1114111)!==e)throw new sp(e+" is not a valid code point");r[o]=e<65536?cp(e):cp(55296+((e-=65536)>>10),e%1024+56320)}return lp(r,"")}});var hp=b("".indexOf);Ce({target:"String",proto:!0,forced:!rp("includes")},{includes:function(t){return!!~hp(Wr(j(this)),Wr(tp(t)),arguments.length>1?arguments[1]:void 0)}}),Ze("String","includes"),b(un.String);var pp=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(_),vp=Xc.start;Ce({target:"String",proto:!0,forced:pp},{padStart:function(t){return vp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padStart");var dp=Xc.end;Ce({target:"String",proto:!0,forced:pp},{padEnd:function(t){return dp(this,t,arguments.length>1?arguments[1]:void 0)}}),Ze("String","padEnd");var gp=b([].push),yp=b([].join);Ce({target:"String",stat:!0},{raw:function(t){var e=k(it(t).raw),r=de(e);if(!r)return"";for(var n=arguments.length,o=[],i=0;;){if(gp(o,Wr(e[i++])),i===r)return yp(o,"");i1?arguments[1]:void 0,e.length)),n=Wr(t);return bp(e,r,r+n.length)===n}}),Ze("String","startsWith");var Op=zt.PROPER,xp=function(t){return a(function(){return!!Mi[t]()||"​…᠎"!=="​…᠎"[t]()||Op&&Mi[t].name!==t})},Rp=_i.start,Pp=xp("trimStart")?function(){return Rp(this)}:"".trimStart;Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==Pp},{trimLeft:Pp}),Ce({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==Pp},{trimStart:Pp}),Ze("String","trimLeft");var Ap=_i.end,jp=xp("trimEnd")?function(){return Ap(this)}:"".trimEnd;Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==jp},{trimRight:jp}),Ce({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==jp},{trimEnd:jp}),Ze("String","trimRight");var kp=Object.getOwnPropertyDescriptor,Ip=function(t){if(!u)return i[t];var e=kp(i,t);return e&&e.value},Tp=dt("iterator"),Mp=!a(function(){var t=new URL("b?a=1&b=2&c=3","https://a"),e=t.searchParams,r=new URLSearchParams("a=1&a=2&b=3"),n="";return t.pathname="c%20d",e.forEach(function(t,r){e.delete("b"),n+=r+t}),r.delete("a",2),r.delete("b",void 0),!e.size&&!u||!e.sort||"https://a/c%20d?a=1&c=3"!==t.href||"3"!==e.get("c")||"a=1"!==String(new URLSearchParams("?a=1"))||!e[Tp]||"a"!==new URL("https://a@b").username||"b"!==new URLSearchParams(new URLSearchParams("a=b")).get("a")||"xn--e1aybc"!==new URL("https://тест").host||"#%D0%B1"!==new URL("https://a#б").hash||"a1c3"!==n||"x"!==new URL("https://x",void 0).host}),Lp=TypeError,Up=function(t,e){if(t0;)t[o]=t[--o];o!==i++&&(t[o]=n)}else for(var a=Np(r/2),u=Cp(vo(t,0,a),e),s=Cp(vo(t,a),e),c=u.length,f=s.length,l=0,h=0;l0&&0!=(t&r);r>>=1)e++;return e},pv=function(t){var e=null;switch(t.length){case 1:e=t[0];break;case 2:e=(31&t[0])<<6|63&t[1];break;case 3:e=(15&t[0])<<12|(63&t[1])<<6|63&t[2];break;case 4:e=(7&t[0])<<18|(63&t[1])<<12|(63&t[2])<<6|63&t[3]}return e>1114111?null:e},vv=function(t){for(var e=(t=nv(t,cv," ")).length,r="",n=0;ne){r+="%",n++;continue}var i=lv(t,n+1);if(i!=i){r+=o,n++;continue}n+=2;var a=hv(i);if(0===a)o=Jp(i);else{if(1===a||a>4){r+="�",n++;continue}for(var u=[i],s=1;se||"%"!==tv(t,n));){var c=lv(t,n+1);if(c!=c){n+=3;break}if(c>191||c<128)break;rv(u,c),n+=2,s++}if(u.length!==a){r+="�";continue}var f=pv(u);null===f?r+="�":o=Qp(f)}}r+=o,n++}return r},dv=/[!'()~]|%20/g,gv={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"},yv=function(t){return gv[t]},mv=function(t){return nv(Xp(t),dv,yv)},bv=fn(function(t,e){zp(this,{type:Dp,target:Wp(t).entries,index:0,kind:e})},Bp,function(){var t=qp(this),e=t.target,r=t.index++;if(!e||r>=e.length)return t.target=null,Pn(void 0,!0);var n=e[r];switch(t.kind){case"keys":return Pn(n.key,!1);case"values":return Pn(n.value,!1)}return Pn([n.key,n.value],!1)},!0),wv=function(t){this.entries=[],this.url=null,void 0!==t&&(M(t)?this.parseObject(t):this.parseQuery("string"==typeof t?"?"===tv(t,0)?uv(t,1):t:Wr(t)))};wv.prototype={type:Bp,bindURL:function(t){this.url=t,this.update()},parseObject:function(t){var e,r,n,o,i,a,u,s=this.entries,c=Fn(t);if(c)for(r=(e=Dn(t,c)).next;!(n=f(r,e)).done;){if(o=Dn(kt(n.value)),(a=f(i=o.next,o)).done||(u=f(i,o)).done||!f(i,o).done)throw new Yp("Expected sequence with length 2");rv(s,{key:Wr(a.value),value:Wr(u.value)})}else for(var l in t)ut(t,l)&&rv(s,{key:l,value:Wr(t[l])})},parseQuery:function(t){if(t)for(var e,r,n=this.entries,o=av(t,"&"),i=0;i0?arguments[0]:void 0));u||(this.size=t.entries.length)},Ev=Sv.prototype;if(Mo(Ev,{append:function(t,e){var r=Wp(this);Up(arguments.length,2),rv(r.entries,{key:Wr(t),value:Wr(e)}),u||this.length++,r.updateURL()},delete:function(t){for(var e=Wp(this),r=Up(arguments.length,1),n=e.entries,o=Wr(t),i=r<2?void 0:arguments[1],a=void 0===i?i:Wr(i),s=0;se.key?1:-1}),t.updateURL()},forEach:function(t){for(var e,r=Wp(this).entries,n=ar(t,arguments.length>1?arguments[1]:void 0),o=0;o1?Rv(arguments[1]):{})}}),T($p)){var Pv=function(t){return ko(this,Gp),new $p(t,arguments.length>1?Rv(arguments[1]):{})};Gp.constructor=Pv,Pv.prototype=Gp,Ce({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:Pv})}}var Av={URLSearchParams:Sv,getState:Wp},jv=URLSearchParams,kv=jv.prototype,Iv=b(kv.append),Tv=b(kv.delete),Mv=b(kv.forEach),Lv=b([].push),Uv=new jv("a=1&a=2&b=3");Uv.delete("a",1),Uv.delete("b",void 0),Uv+""!="a=2"&&ie(kv,"delete",function(t){var e=arguments.length,r=e<2?void 0:arguments[1];if(e&&void 0===r)return Tv(this,t);var n=[];Mv(this,function(t,e){Lv(n,{key:e,value:t})}),Up(e,1);for(var o,i=Wr(t),a=Wr(r),u=0,s=0,c=!1,f=n.length;uo;)for(var s,c=R(arguments[o++]),l=i?$v(_e(c),i(c)):_e(c),h=l.length,p=0;h>p;)s=l[p++],u&&!f(a,c,s)||(r[s]=c[s]);return r}:qv,Gv=2147483647,Vv=/[^\0-\u007E]/,Yv=/[.\u3002\uFF0E\uFF61]/g,Xv="Overflow: input needs wider integers to process",Jv=RangeError,Qv=b(Yv.exec),Zv=Math.floor,td=String.fromCharCode,ed=b("".charCodeAt),rd=b([].join),nd=b([].push),od=b("".replace),id=b("".split),ad=b("".toLowerCase),ud=function(t){return t+22+75*(t<26)},sd=function(t,e,r){var n=0;for(t=r?Zv(t/700):t>>1,t+=Zv(t/e);t>455;)t=Zv(t/35),n+=36;return Zv(n+36*t/(t+38))},cd=function(t){var e=[];t=function(t){for(var e=[],r=0,n=t.length;r=55296&&o<=56319&&r=i&&nZv((Gv-a)/l))throw new Jv(Xv);for(a+=(f-i)*l,i=f,r=0;rGv)throw new Jv(Xv);if(n===i){for(var h=a,p=36;;){var v=p<=u?1:p>=u+26?26:p-u;if(h?@[\\\]^|]/,qd=/[\0\t\n\r #/:<>?@[\\\]^|]/,Hd=/^[\u0000-\u0020]+/,$d=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,Kd=/[\t\n\r]/g,Gd=function(t){var e,r,n,o;if("number"==typeof t){for(e=[],r=0;r<4;r++)Td(e,t%256),t=md(t/256);return Ed(e,".")}if("object"==typeof t){for(e="",n=function(t){for(var e=null,r=1,n=null,o=0,i=0;i<8;i++)0!==t[i]?(o>r&&(e=n,r=o),n=null,o=0):(null===n&&(n=i),++o);return o>r?n:e}(t),r=0;r<8;r++)o&&0===t[r]||(o&&(o=!1),n===r?(e+=r?":":"::",o=!0):(e+=Od(t[r],16),r<7&&(e+=":")));return"["+e+"]"}return t},Vd={},Yd=Kv({},Vd,{" ":1,'"':1,"<":1,">":1,"`":1}),Xd=Kv({},Yd,{"#":1,"?":1,"{":1,"}":1}),Jd=Kv({},Xd,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),Qd=function(t,e){var r=fd(t,0);return r>32&&r<127&&!ut(e,t)?t:encodeURIComponent(t)},Zd={ftp:21,file:null,http:80,https:443,ws:80,wss:443},tg=function(t,e){var r;return 2===t.length&&Sd(Nd,wd(t,0))&&(":"===(r=wd(t,1))||!e&&"|"===r)},eg=function(t){var e;return t.length>1&&tg(kd(t,0,2))&&(2===t.length||"/"===(e=wd(t,2))||"\\"===e||"?"===e||"#"===e)},rg=function(t){return"."===t||"%2e"===Id(t)},ng={},og={},ig={},ag={},ug={},sg={},cg={},fg={},lg={},hg={},pg={},vg={},dg={},gg={},yg={},mg={},bg={},wg={},Sg={},Eg={},Og={},xg=function(t,e,r){var n,o,i,a=Wr(t);if(e){if(o=this.parse(a))throw new gd(o);this.searchParams=null}else{if(void 0!==r&&(n=new xg(r,!0)),o=this.parse(a,null,n))throw new gd(o);(i=vd(new pd)).bindURL(this),this.searchParams=i}};xg.prototype={type:"URL",parse:function(t,e,r){var n,o,i,a,u,s=this,c=e||ng,f=0,l="",h=!1,p=!1,v=!1;for(t=Wr(t),e||(s.scheme="",s.username="",s.password="",s.host=null,s.port=null,s.path=[],s.query=null,s.fragment=null,s.cannotBeABaseURL=!1,t=Pd(t,Hd,""),t=Pd(t,$d,"$1")),t=Pd(t,Kd,""),n=Wn(t);f<=n.length;){switch(o=n[f],c){case ng:if(!o||!Sd(Nd,o)){if(e)return Md;c=ig;continue}l+=Id(o),c=og;break;case og:if(o&&(Sd(Cd,o)||"+"===o||"-"===o||"."===o))l+=Id(o);else{if(":"!==o){if(e)return Md;l="",c=ig,f=0;continue}if(e&&(s.isSpecial()!==ut(Zd,l)||"file"===l&&(s.includesCredentials()||null!==s.port)||"file"===s.scheme&&!s.host))return;if(s.scheme=l,e)return void(s.isSpecial()&&Zd[s.scheme]===s.port&&(s.port=null));l="","file"===s.scheme?c=gg:s.isSpecial()&&r&&r.scheme===s.scheme?c=ag:s.isSpecial()?c=fg:"/"===n[f+1]?(c=ug,f++):(s.cannotBeABaseURL=!0,Rd(s.path,""),c=Sg)}break;case ig:if(!r||r.cannotBeABaseURL&&"#"!==o)return Md;if(r.cannotBeABaseURL&&"#"===o){s.scheme=r.scheme,s.path=vo(r.path),s.query=r.query,s.fragment="",s.cannotBeABaseURL=!0,c=Og;break}c="file"===r.scheme?gg:sg;continue;case ag:if("/"!==o||"/"!==n[f+1]){c=sg;continue}c=lg,f++;break;case ug:if("/"===o){c=hg;break}c=wg;continue;case sg:if(s.scheme=r.scheme,o===Wv)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query;else if("/"===o||"\\"===o&&s.isSpecial())c=cg;else if("?"===o)s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query="",c=Eg;else{if("#"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.path.length--,c=wg;continue}s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og}break;case cg:if(!s.isSpecial()||"/"!==o&&"\\"!==o){if("/"!==o){s.username=r.username,s.password=r.password,s.host=r.host,s.port=r.port,c=wg;continue}c=hg}else c=lg;break;case fg:if(c=lg,"/"!==o||"/"!==wd(l,f+1))continue;f++;break;case lg:if("/"!==o&&"\\"!==o){c=hg;continue}break;case hg:if("@"===o){h&&(l="%40"+l),h=!0,i=Wn(l);for(var d=0;d65535)return Ud;s.port=s.isSpecial()&&m===Zd[s.scheme]?null:m,l=""}if(e)return;c=bg;continue}return Ud}l+=o;break;case gg:if(s.scheme="file","/"===o||"\\"===o)c=yg;else{if(!r||"file"!==r.scheme){c=wg;continue}switch(o){case Wv:s.host=r.host,s.path=vo(r.path),s.query=r.query;break;case"?":s.host=r.host,s.path=vo(r.path),s.query="",c=Eg;break;case"#":s.host=r.host,s.path=vo(r.path),s.query=r.query,s.fragment="",c=Og;break;default:eg(Ed(vo(n,f),""))||(s.host=r.host,s.path=vo(r.path),s.shortenPath()),c=wg;continue}}break;case yg:if("/"===o||"\\"===o){c=mg;break}r&&"file"===r.scheme&&!eg(Ed(vo(n,f),""))&&(tg(r.path[0],!0)?Rd(s.path,r.path[0]):s.host=r.host),c=wg;continue;case mg:if(o===Wv||"/"===o||"\\"===o||"?"===o||"#"===o){if(!e&&tg(l))c=wg;else if(""===l){if(s.host="",e)return;c=bg}else{if(a=s.parseHost(l))return a;if("localhost"===s.host&&(s.host=""),e)return;l="",c=bg}continue}l+=o;break;case bg:if(s.isSpecial()){if(c=wg,"/"!==o&&"\\"!==o)continue}else if(e||"?"!==o)if(e||"#"!==o){if(o!==Wv&&(c=wg,"/"!==o))continue}else s.fragment="",c=Og;else s.query="",c=Eg;break;case wg:if(o===Wv||"/"===o||"\\"===o&&s.isSpecial()||!e&&("?"===o||"#"===o)){if(".."===(u=Id(u=l))||"%2e."===u||".%2e"===u||"%2e%2e"===u?(s.shortenPath(),"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,"")):rg(l)?"/"===o||"\\"===o&&s.isSpecial()||Rd(s.path,""):("file"===s.scheme&&!s.path.length&&tg(l)&&(s.host&&(s.host=""),l=wd(l,0)+":"),Rd(s.path,l)),l="","file"===s.scheme&&(o===Wv||"?"===o||"#"===o))for(;s.path.length>1&&""===s.path[0];)Ad(s.path);"?"===o?(s.query="",c=Eg):"#"===o&&(s.fragment="",c=Og)}else l+=Qd(o,Xd);break;case Sg:"?"===o?(s.query="",c=Eg):"#"===o?(s.fragment="",c=Og):o!==Wv&&(s.path[0]+=Qd(o,Vd));break;case Eg:e||"#"!==o?o!==Wv&&("'"===o&&s.isSpecial()?s.query+="%27":s.query+="#"===o?"%23":Qd(o,Vd)):(s.fragment="",c=Og);break;case Og:o!==Wv&&(s.fragment+=Qd(o,Yd))}f++}},parseHost:function(t){var e,r,n;if("["===wd(t,0)){if("]"!==wd(t,t.length-1))return Ld;if(e=function(t){var e,r,n,o,i,a,u,s=[0,0,0,0,0,0,0,0],c=0,f=null,l=0,h=function(){return wd(t,l)};if(":"===h()){if(":"!==wd(t,1))return;l+=2,f=++c}for(;h();){if(8===c)return;if(":"!==h()){for(e=r=0;r<4&&Sd(zd,h());)e=16*e+yd(h(),16),l++,r++;if("."===h()){if(0===r)return;if(l-=r,c>6)return;for(n=0;h();){if(o=null,n>0){if(!("."===h()&&n<4))return;l++}if(!Sd(_d,h()))return;for(;Sd(_d,h());){if(i=yd(h(),10),null===o)o=i;else{if(0===o)return;o=10*o+i}if(o>255)return;l++}s[c]=256*s[c]+o,2!=++n&&4!==n||c++}if(4!==n)return;break}if(":"===h()){if(l++,!h())return}else if(h())return;s[c++]=e}else{if(null!==f)return;l++,f=++c}}if(null!==f)for(a=c-f,c=7;0!==c&&a>0;)u=s[c],s[c--]=s[f+a-1],s[f+--a]=u;else if(8!==c)return;return s}(kd(t,1,-1)),!e)return Ld;this.host=e}else if(this.isSpecial()){if(t=function(t){var e,r,n=[],o=id(od(ad(t),Yv,"."),".");for(e=0;e4)return t;for(r=[],n=0;n1&&"0"===wd(o,0)&&(i=Sd(Fd,o)?16:8,o=kd(o,8===i?1:2)),""===o)a=0;else{if(!Sd(10===i?Dd:8===i?Bd:zd,o))return t;a=yd(o,i)}Rd(r,a)}for(n=0;n=bd(256,5-e))return null}else if(a>255)return null;for(u=xd(r),n=0;n1?arguments[1]:void 0,n=ld(e,new xg(t,!1,r));u||(e.href=n.serialize(),e.origin=n.getOrigin(),e.protocol=n.getProtocol(),e.username=n.getUsername(),e.password=n.getPassword(),e.host=n.getHost(),e.hostname=n.getHostname(),e.port=n.getPort(),e.pathname=n.getPathname(),e.search=n.getSearch(),e.searchParams=n.getSearchParams(),e.hash=n.getHash())},Pg=Rg.prototype,Ag=function(t,e){return{get:function(){return hd(this)[t]()},set:e&&function(t){return hd(this)[e](t)},configurable:!0,enumerable:!0}};if(u&&(so(Pg,"href",Ag("serialize","setHref")),so(Pg,"origin",Ag("getOrigin")),so(Pg,"protocol",Ag("getProtocol","setProtocol")),so(Pg,"username",Ag("getUsername","setUsername")),so(Pg,"password",Ag("getPassword","setPassword")),so(Pg,"host",Ag("getHost","setHost")),so(Pg,"hostname",Ag("getHostname","setHostname")),so(Pg,"port",Ag("getPort","setPort")),so(Pg,"pathname",Ag("getPathname","setPathname")),so(Pg,"search",Ag("getSearch","setSearch")),so(Pg,"searchParams",Ag("getSearchParams")),so(Pg,"hash",Ag("getHash","setHash"))),ie(Pg,"toJSON",function(){return hd(this).serialize()},{enumerable:!0}),ie(Pg,"toString",function(){return hd(this).serialize()},{enumerable:!0}),dd){var jg=dd.createObjectURL,kg=dd.revokeObjectURL;jg&&ie(Rg,"createObjectURL",ar(jg,dd)),kg&&ie(Rg,"revokeObjectURL",ar(kg,dd))}an(Rg,"URL"),Ce({global:!0,constructor:!0,forced:!Mp,sham:!u},{URL:Rg});var Ig=L("URL"),Tg=Mp&&a(function(){Ig.canParse()}),Mg=a(function(){return 1!==Ig.canParse.length});Ce({target:"URL",stat:!0,forced:!Tg||Mg},{canParse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return!!new Ig(r,n)}catch(t){return!1}}});var Lg=L("URL");Ce({target:"URL",stat:!0,forced:!Mp},{parse:function(t){var e=Up(arguments.length,1),r=Wr(t),n=e<2||void 0===arguments[1]?void 0:Wr(arguments[1]);try{return new Lg(r,n)}catch(t){return null}}}),Ce({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return f(URL.prototype.toString,this)}});var Ug=WeakMap.prototype,Ng={WeakMap:WeakMap,set:b(Ug.set),get:b(Ug.get),has:b(Ug.has),remove:b(Ug.delete)},Cg=Ng.has,_g=function(t){return Cg(t),t},Fg=Ng.get,Bg=Ng.has,Dg=Ng.set;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{emplace:function(t,e){var r,n,o=_g(this);return Bg(o,t)?(r=Fg(o,t),"update"in e&&(r=e.update(r,t,o),Dg(o,t,r)),r):(n=e.insert(t,o),Dg(o,t,n),n)}}),Ce({target:"WeakMap",stat:!0,forced:!0},{from:ei(Ng.WeakMap,Ng.set,!0)}),Ce({target:"WeakMap",stat:!0,forced:!0},{of:ri(Ng.WeakMap,Ng.set,!0)});var zg=Ng.remove;Ce({target:"WeakMap",proto:!0,real:!0,forced:!0},{deleteAll:function(){for(var t,e=_g(this),r=!0,n=0,o=arguments.length;n2&&(n=r,M(o=arguments[2])&&"cause"in o&&_t(n,"cause",o.cause));var s=[];return Ao(t,ny,{that:s}),_t(r,"errors",s),r};dn?dn(oy,ry):Ae(oy,ry,{name:!0});var iy=oy.prototype=Ve(ry.prototype,{constructor:d(1,oy),message:d(1,""),name:d(1,"AggregateError")});Ce({global:!0,constructor:!0,arity:2},{AggregateError:oy});var ay,uy,sy,cy,fy=function(t){return _.slice(0,t.length)===t},ly=fy("Bun/")?"BUN":fy("Cloudflare-Workers")?"CLOUDFLARE":fy("Deno/")?"DENO":fy("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===E(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST",hy="NODE"===ly,py=/(?:ipad|iphone|ipod).*applewebkit/i.test(_),vy=i.setImmediate,dy=i.clearImmediate,gy=i.process,yy=i.Dispatch,my=i.Function,by=i.MessageChannel,wy=i.String,Sy=0,Ey={},Oy="onreadystatechange";a(function(){ay=i.location});var xy=function(t){if(ut(Ey,t)){var e=Ey[t];delete Ey[t],e()}},Ry=function(t){return function(){xy(t)}},Py=function(t){xy(t.data)},Ay=function(t){i.postMessage(wy(t),ay.protocol+"//"+ay.host)};vy&&dy||(vy=function(t){Up(arguments.length,1);var e=T(t)?t:my(t),r=vo(arguments,1);return Ey[++Sy]=function(){Ra(e,void 0,r)},uy(Sy),Sy},dy=function(t){delete Ey[t]},hy?uy=function(t){gy.nextTick(Ry(t))}:yy&&yy.now?uy=function(t){yy.now(Ry(t))}:by&&!py?(cy=(sy=new by).port2,sy.port1.onmessage=Py,uy=ar(cy.postMessage,cy)):i.addEventListener&&T(i.postMessage)&&!i.importScripts&&ay&&"file:"!==ay.protocol&&!a(Ay)?(uy=Ay,i.addEventListener("message",Py,!1)):uy=Oy in Et("script")?function(t){De.appendChild(Et("script"))[Oy]=function(){De.removeChild(this),xy(t)}}:function(t){setTimeout(Ry(t),0)});var jy={set:vy,clear:dy},ky=function(){this.head=null,this.tail=null};ky.prototype={add:function(t){var e={item:t,next:null},r=this.tail;r?r.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}};var Iy,Ty,My,Ly,Uy,Ny=ky,Cy=/ipad|iphone|ipod/i.test(_)&&"undefined"!=typeof Pebble,_y=/web0s(?!.*chrome)/i.test(_),Fy=jy.set,By=i.MutationObserver||i.WebKitMutationObserver,Dy=i.document,zy=i.process,Wy=i.Promise,qy=Ip("queueMicrotask");if(!qy){var Hy=new Ny,$y=function(){var t,e;for(hy&&(t=zy.domain)&&t.exit();e=Hy.get();)try{e()}catch(t){throw Hy.head&&Iy(),t}t&&t.enter()};py||hy||_y||!By||!Dy?!Cy&&Wy&&Wy.resolve?((Ly=Wy.resolve(void 0)).constructor=Wy,Uy=ar(Ly.then,Ly),Iy=function(){Uy($y)}):hy?Iy=function(){zy.nextTick($y)}:(Fy=ar(Fy,i),Iy=function(){Fy($y)}):(Ty=!0,My=Dy.createTextNode(""),new By($y).observe(My,{characterData:!0}),Iy=function(){My.data=Ty=!Ty}),qy=function(t){Hy.head||Iy(),Hy.add(t)}}var Ky,Gy,Vy,Yy=qy,Xy=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}},Jy=i.Promise,Qy=dt("species"),Zy=!1,tm=T(i.PromiseRejectionEvent),em=Ue("Promise",function(){var t=Kt(Jy),e=t!==String(Jy);if(!e&&66===W)return!0;if(!W||W<51||!/native code/.test(t)){var r=new Jy(function(t){t(1)}),n=function(t){t(function(){},function(){})};if((r.constructor={})[Qy]=n,!(Zy=r.then(function(){})instanceof n))return!0}return!(e||"BROWSER"!==ly&&"DENO"!==ly||tm)}),rm={CONSTRUCTOR:em,REJECTION_EVENT:tm,SUBCLASSING:Zy},nm=TypeError,om=function(t){var e,r;this.promise=new t(function(t,n){if(void 0!==e||void 0!==r)throw new nm("Bad Promise constructor");e=t,r=n}),this.resolve=J(e),this.reject=J(r)},im={f:function(t){return new om(t)}},am=jy.set,um="Promise",sm=rm.CONSTRUCTOR,cm=rm.REJECTION_EVENT,fm=rm.SUBCLASSING,lm=ne.getterFor(um),hm=ne.set,pm=Jy&&Jy.prototype,vm=Jy,dm=pm,gm=i.TypeError,ym=i.document,mm=i.process,bm=im.f,wm=bm,Sm=!!(ym&&ym.createEvent&&i.dispatchEvent),Em="unhandledrejection",Om=function(t){var e;return!(!M(t)||!T(e=t.then))&&e},xm=function(t,e){var r,n,o,i=e.value,a=1===e.state,u=a?t.ok:t.fail,s=t.resolve,c=t.reject,l=t.domain;try{u?(a||(2===e.rejection&&km(e),e.rejection=1),!0===u?r=i:(l&&l.enter(),r=u(i),l&&(l.exit(),o=!0)),r===t.promise?c(new gm("Promise-chain cycle")):(n=Om(r))?f(n,r,s,c):s(r)):c(i)}catch(t){l&&!o&&l.exit(),c(t)}},Rm=function(t,e){t.notified||(t.notified=!0,Yy(function(){for(var r,n=t.reactions;r=n.get();)xm(r,t);t.notified=!1,e&&!t.rejection&&Am(t)}))},Pm=function(t,e,r){var n,o;Sm?((n=ym.createEvent("Event")).promise=e,n.reason=r,n.initEvent(t,!1,!0),i.dispatchEvent(n)):n={promise:e,reason:r},!cm&&(o=i["on"+t])?o(n):t===Em&&function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}("Unhandled promise rejection",r)},Am=function(t){f(am,i,function(){var e,r=t.facade,n=t.value;if(jm(t)&&(e=Xy(function(){hy?mm.emit("unhandledRejection",n,r):Pm(Em,r,n)}),t.rejection=hy||jm(t)?2:1,e.error))throw e.value})},jm=function(t){return 1!==t.rejection&&!t.parent},km=function(t){f(am,i,function(){var e=t.facade;hy?mm.emit("rejectionHandled",e):Pm("rejectionhandled",e,t.value)})},Im=function(t,e,r){return function(n){t(e,n,r)}},Tm=function(t,e,r){t.done||(t.done=!0,r&&(t=r),t.value=e,t.state=2,Rm(t,!0))},Mm=function(t,e,r){if(!t.done){t.done=!0,r&&(t=r);try{if(t.facade===e)throw new gm("Promise can't be resolved itself");var n=Om(e);n?Yy(function(){var r={done:!1};try{f(n,e,Im(Mm,r,t),Im(Tm,r,t))}catch(e){Tm(r,e,t)}}):(t.value=e,t.state=1,Rm(t,!1))}catch(e){Tm({done:!1},e,t)}}};if(sm&&(vm=function(t){ko(this,dm),J(t),f(Ky,this);var e=lm(this);try{t(Im(Mm,e),Im(Tm,e))}catch(t){Tm(e,t)}},(Ky=function(t){hm(this,{type:um,done:!1,notified:!1,parent:!1,reactions:new Ny,rejection:!1,state:0,value:null})}).prototype=ie(dm=vm.prototype,"then",function(t,e){var r=lm(this),n=bm(Cc(this,vm));return r.parent=!0,n.ok=!T(t)||t,n.fail=T(e)&&e,n.domain=hy?mm.domain:void 0,0===r.state?r.reactions.add(n):Yy(function(){xm(n,r)}),n.promise}),Gy=function(){var t=new Ky,e=lm(t);this.promise=t,this.resolve=Im(Mm,e),this.reject=Im(Tm,e)},im.f=bm=function(t){return t===vm||void 0===t?new Gy(t):wm(t)},T(Jy)&&pm!==Object.prototype)){Vy=pm.then,fm||ie(pm,"then",function(t,e){var r=this;return new vm(function(t,e){f(Vy,r,t,e)}).then(t,e)},{unsafe:!0});try{delete pm.constructor}catch(t){}dn&&dn(pm,dm)}Ce({global:!0,constructor:!0,wrap:!0,forced:sm},{Promise:vm}),an(vm,um,!1),Uo(um);var Lm=rm.CONSTRUCTOR||!Gn(function(t){Jy.all(t).then(void 0,function(){})});Ce({target:"Promise",stat:!0,forced:Lm},{all:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),i=[],a=0,u=1;Ao(t,function(t){var s=a++,c=!1;u++,f(r,e,t).then(function(t){c||(c=!0,i[s]=t,--u||n(i))},o)}),--u||n(i)});return i.error&&o(i.value),r.promise}});var Um=Jy&&Jy.prototype;if(Ce({target:"Promise",proto:!0,forced:rm.CONSTRUCTOR,real:!0},{catch:function(t){return this.then(void 0,t)}}),T(Jy)){var Nm=L("Promise").prototype.catch;Um.catch!==Nm&&ie(Um,"catch",Nm,{unsafe:!0})}Ce({target:"Promise",stat:!0,forced:Lm},{race:function(t){var e=this,r=im.f(e),n=r.reject,o=Xy(function(){var o=J(e.resolve);Ao(t,function(t){f(o,e,t).then(r.resolve,n)})});return o.error&&n(o.value),r.promise}}),Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{reject:function(t){var e=im.f(this);return(0,e.reject)(t),e.promise}});var Cm=function(t,e){if(kt(t),M(e)&&e.constructor===t)return e;var r=im.f(t);return(0,r.resolve)(e),r.promise};Ce({target:"Promise",stat:!0,forced:rm.CONSTRUCTOR},{resolve:function(t){return Cm(this,t)}}),Ce({target:"Promise",stat:!0,forced:Lm},{allSettled:function(t){var e=this,r=im.f(e),n=r.resolve,o=r.reject,i=Xy(function(){var r=J(e.resolve),o=[],i=0,a=1;Ao(t,function(t){var u=i++,s=!1;a++,f(r,e,t).then(function(t){s||(s=!0,o[u]={status:"fulfilled",value:t},--a||n(o))},function(t){s||(s=!0,o[u]={status:"rejected",reason:t},--a||n(o))})}),--a||n(o)});return i.error&&o(i.value),r.promise}});var _m="No one promise resolved";Ce({target:"Promise",stat:!0,forced:Lm},{any:function(t){var e=this,r=L("AggregateError"),n=im.f(e),o=n.resolve,i=n.reject,a=Xy(function(){var n=J(e.resolve),a=[],u=0,s=1,c=!1;Ao(t,function(t){var l=u++,h=!1;s++,f(n,e,t).then(function(t){h||c||(c=!0,o(t))},function(t){h||c||(h=!0,a[l]=t,--s||i(new r(a,_m)))})}),--s||i(new r(a,_m))});return a.error&&i(a.value),n.promise}}),Ce({target:"Promise",stat:!0},{withResolvers:function(){var t=im.f(this);return{promise:t.promise,resolve:t.resolve,reject:t.reject}}});var Fm=Jy&&Jy.prototype,Bm=!!Jy&&a(function(){Fm.finally.call({then:function(){}},function(){})});if(Ce({target:"Promise",proto:!0,real:!0,forced:Bm},{finally:function(t){var e=Cc(this,L("Promise")),r=T(t);return this.then(r?function(r){return Cm(e,t()).then(function(){return r})}:t,r?function(r){return Cm(e,t()).then(function(){throw r})}:t)}}),T(Jy)){var Dm=L("Promise").prototype.finally;Fm.finally!==Dm&&ie(Fm,"finally",Dm,{unsafe:!0})}var zm=i.Promise,Wm=!1,qm=!zm||!zm.try||Xy(function(){zm.try(function(t){Wm=8===t},8)}).error||!Wm;Ce({target:"Promise",stat:!0,forced:qm},{try:function(t){var e=arguments.length>1?vo(arguments,1):[],r=im.f(this),n=Xy(function(){return Ra(J(t),void 0,e)});return(n.error?r.reject:r.resolve)(n.value),r.promise}}),Ze("Promise","finally");var Hm="URLSearchParams"in self,$m="Symbol"in self&&"iterator"in Symbol,Km="FileReader"in self&&"Blob"in self&&function(){try{return new Blob,!0}catch(t){return!1}}(),Gm="FormData"in self,Vm="ArrayBuffer"in self;if(Vm)var Ym=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],Xm=ArrayBuffer.isView||function(t){return t&&Ym.indexOf(Object.prototype.toString.call(t))>-1};function Jm(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function Qm(t){return"string"!=typeof t&&(t=String(t)),t}function Zm(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return $m&&(e[Symbol.iterator]=function(){return e}),e}function tb(t){this.map={},t instanceof tb?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function eb(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function rb(t){return new Promise(function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}})}function nb(t){var e=new FileReader,r=rb(e);return e.readAsArrayBuffer(t),r}function ob(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function ib(){return this.bodyUsed=!1,this._initBody=function(t){var e;this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:Km&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:Gm&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:Hm&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():Vm&&Km&&(e=t)&&DataView.prototype.isPrototypeOf(e)?(this._bodyArrayBuffer=ob(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):Vm&&(ArrayBuffer.prototype.isPrototypeOf(t)||Xm(t))?this._bodyArrayBuffer=ob(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):Hm&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},Km&&(this.blob=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?eb(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(nb)}),this.text=function(){var t=eb(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,r=rb(e);return e.readAsText(t),r}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),n=0;n-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function sb(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var r=t.split("="),n=r.shift().replace(/\+/g," "),o=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(n),decodeURIComponent(o))}}),e}function cb(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new tb(e.headers),this.url=e.url||"",this._initBody(t)}ub.prototype.clone=function(){return new ub(this,{body:this._bodyInit})},ib.call(ub.prototype),ib.call(cb.prototype),cb.prototype.clone=function(){return new cb(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new tb(this.headers),url:this.url})},cb.error=function(){var t=new cb(null,{status:0,statusText:""});return t.type="error",t};var fb=[301,302,303,307,308];cb.redirect=function(t,e){if(-1===fb.indexOf(e))throw new RangeError("Invalid status code");return new cb(null,{status:e,headers:{location:t}})};var lb=self.DOMException;try{new lb}catch(t){(lb=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),lb.prototype.constructor=lb}function hb(t,e){return new Promise(function(r,n){var o=new ub(t,e);if(o.signal&&o.signal.aborted)return n(new lb("Aborted","AbortError"));var i=new XMLHttpRequest;function a(){i.abort()}i.onload=function(){var t,e,n={status:i.status,statusText:i.statusText,headers:(t=i.getAllResponseHeaders()||"",e=new tb,t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var r=t.split(":"),n=r.shift().trim();if(n){var o=r.join(":").trim();e.append(n,o)}}),e)};n.url="responseURL"in i?i.responseURL:n.headers.get("X-Request-URL"),r(new cb("response"in i?i.response:i.responseText,n))},i.onerror=function(){n(new TypeError("Network request failed"))},i.ontimeout=function(){n(new TypeError("Network request failed"))},i.onabort=function(){n(new lb("Aborted","AbortError"))},i.open(o.method,o.url,!0),"include"===o.credentials?i.withCredentials=!0:"omit"===o.credentials&&(i.withCredentials=!1),"responseType"in i&&Km&&(i.responseType="blob"),o.headers.forEach(function(t,e){i.setRequestHeader(e,t)}),o.signal&&(o.signal.addEventListener("abort",a),i.onreadystatechange=function(){4===i.readyState&&o.signal.removeEventListener("abort",a)}),i.send(void 0===o._bodyInit?null:o._bodyInit)})}hb.polyfill=!0,self.fetch||(self.fetch=hb,self.Headers=tb,self.Request=ub,self.Response=cb);var pb=Object.getOwnPropertySymbols,vb=Object.prototype.hasOwnProperty,db=Object.prototype.propertyIsEnumerable,gb=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,n,o=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),i=1;i{"use strict";var e={},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var a=t[o]={exports:{}},i=!0;try{e[o](a,a.exports,r),i=!1}finally{i&&delete t[o]}return a.exports}r.m=e,(()=>{var e=[];r.O=(t,o,n,a)=>{if(o){a=a||0;for(var i=e.length;i>0&&e[i-1][2]>a;i--)e[i]=e[i-1];e[i]=[o,n,a];return}for(var u=1/0,i=0;i=a)&&Object.keys(r.O).every(e=>r.O[e](o[c]))?o.splice(c--,1):(l=!1,a{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},(()=>{var e,t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;r.t=function(o,n){if(1&n&&(o=this(o)),8&n||"object"==typeof o&&o&&(4&n&&o.__esModule||16&n&&"function"==typeof o.then))return o;var a=Object.create(null);r.r(a);var i={};e=e||[null,t({}),t([]),t(t)];for(var u=2&n&&o;"object"==typeof u&&!~e.indexOf(u);u=t(u))Object.getOwnPropertyNames(u).forEach(e=>i[e]=()=>o[e]);return i.default=()=>o,r.d(a,i),a}})(),r.d=(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce((t,o)=>(r.f[o](e,t),t),[])),r.u=e=>{},r.miniCssF=e=>{},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{var e={},t="_N_E:";r.l=(o,n,a,i)=>{if(e[o])return void e[o].push(n);if(void 0!==a)for(var u,l,c=document.getElementsByTagName("script"),d=0;d{u.onerror=u.onload=null,clearTimeout(p);var n=e[o];if(delete e[o],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach(e=>e(r)),t)return t(r)},p=setTimeout(s.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=s.bind(null,u.onerror),u.onload=s.bind(null,u.onload),l&&document.head.appendChild(u)}})(),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;r.tt=()=>(void 0===e&&(e={createScriptURL:e=>e},"undefined"!=typeof trustedTypes&&trustedTypes.createPolicy&&(e=trustedTypes.createPolicy("nextjs#bundler",e))),e)})(),r.tu=e=>r.tt().createScriptURL(e),r.p="/_next/",(()=>{var e={68:0,618:0};r.f.j=(t,o)=>{var n=r.o(e,t)?e[t]:void 0;if(0!==n)if(n)o.push(n[2]);else if(/^6(|1)8$/.test(t))e[t]=0;else{var a=new Promise((r,o)=>n=e[t]=[r,o]);o.push(n[2]=a);var i=r.p+r.u(t),u=Error();r.l(i,o=>{if(r.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var a=o&&("load"===o.type?"missing":o.type),i=o&&o.target&&o.target.src;u.message="Loading chunk "+t+" failed.\n("+a+": "+i+")",u.name="ChunkLoadError",u.type=a,u.request=i,n[1](u)}},"chunk-"+t,t)}},r.O.j=t=>0===e[t];var t=(t,o)=>{var n,a,[i,u,l]=o,c=0;if(i.some(t=>0!==e[t])){for(n in u)r.o(u,n)&&(r.m[n]=u[n]);if(l)var d=l(r)}for(t&&t(o);c:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.25rem * var(--tw-space-x-reverse));margin-left:calc(.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.whitespace-nowrap{white-space:nowrap}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-\[2px\]{border-radius:2px}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-t-\[10px\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-tl-sm{border-top-left-radius:calc(var(--radius) - 4px)}.border{border-width:1px}.border-2{border-width:2px}.border-\[1\.5px\]{border-width:1.5px}.border-y{border-top-width:1px}.border-b,.border-y{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-\[--color-border\]{border-color:var(--color-border)}.border-border\/50{border-color:hsl(var(--border)/.5)}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive)/.5)}.border-gray-600{--tw-border-opacity:1;border-color:rgb(75 85 99/var(--tw-border-opacity,1))}.border-input{border-color:hsl(var(--input))}.border-primary{border-color:hsl(var(--primary))}.border-transparent{border-color:transparent}.border-zinc-600{--tw-border-opacity:1;border-color:rgb(82 82 91/var(--tw-border-opacity,1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-\[--color-bg\]{background-color:var(--color-bg)}.bg-accent{background-color:hsl(var(--accent))}.bg-background{background-color:hsl(var(--background))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-black\/80{background-color:rgb(0 0 0/.8)}.bg-blue-500{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-destructive{background-color:hsl(var(--destructive))}.bg-foreground{background-color:hsl(var(--foreground))}.bg-gray-700{--tw-bg-opacity:1;background-color:rgb(55 65 81/var(--tw-bg-opacity,1))}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/50{background-color:hsl(var(--muted)/.5)}.bg-orange-600{--tw-bg-opacity:1;background-color:rgb(234 88 12/var(--tw-bg-opacity,1))}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-red-600{--tw-bg-opacity:1;background-color:rgb(220 38 38/var(--tw-bg-opacity,1))}.bg-secondary{background-color:hsl(var(--secondary))}.bg-transparent{background-color:transparent}.bg-zinc-600{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.bg-zinc-700{--tw-bg-opacity:1;background-color:rgb(63 63 70/var(--tw-bg-opacity,1))}.bg-zinc-800{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.bg-zinc-900{--tw-bg-opacity:1;background-color:rgb(24 24 27/var(--tw-bg-opacity,1))}.bg-opacity-40{--tw-bg-opacity:0.4}.bg-opacity-80{--tw-bg-opacity:0.8}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-8{padding-left:2rem;padding-right:2rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-1{padding-bottom:.25rem}.pb-2{padding-bottom:.5rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-1{padding-left:.25rem}.pl-10{padding-left:2.5rem}.pl-2{padding-left:.5rem}.pl-2\.5{padding-left:.625rem}.pl-4{padding-left:1rem}.pl-8{padding-left:2rem}.pr-1{padding-right:.25rem}.pr-2{padding-right:.5rem}.pr-2\.5{padding-right:.625rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-1{padding-top:.25rem}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-\[0\.8rem\]{font-size:.8rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.tracking-tight{letter-spacing:-.025em}.tracking-widest{letter-spacing:.1em}.text-accent-foreground{color:hsl(var(--accent-foreground))}.text-blue-300{--tw-text-opacity:1;color:rgb(147 197 253/var(--tw-text-opacity,1))}.text-blue-400{--tw-text-opacity:1;color:rgb(96 165 250/var(--tw-text-opacity,1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-current{color:currentColor}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground)/.5)}.text-gray-200{--tw-text-opacity:1;color:rgb(229 231 235/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-green-400{--tw-text-opacity:1;color:rgb(74 222 128/var(--tw-text-opacity,1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-zinc-300{--tw-text-opacity:1;color:rgb(212 212 216/var(--tw-text-opacity,1))}.text-zinc-400{--tw-text-opacity:1;color:rgb(161 161 170/var(--tw-text-opacity,1))}.underline{text-decoration-line:underline}.underline-offset-4{text-underline-offset:4px}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-90{opacity:.9}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\]{--tw-shadow:0 0 0 1px hsl(var(--sidebar-border));--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color)}.shadow-\[0_0_0_1px_hsl\(var\(--sidebar-border\)\)\],.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-md{--tw-shadow:0 4px 6px -1px rgb(0 0 0/0.1),0 2px 4px -2px rgb(0 0 0/0.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-md,.shadow-none{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000}.shadow-sm{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.shadow-sm,.shadow-xl{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgb(0 0 0/0.1),0 8px 10px -6px rgb(0 0 0/0.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring,.ring-0{box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-0{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(0px + var(--tw-ring-offset-width)) var(--tw-ring-color)}.ring-2{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.ring-ring{--tw-ring-color:hsl(var(--ring))}.ring-offset-background{--tw-ring-offset-color:hsl(var(--background))}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[left\2c right\2c width\]{transition-property:left,right,width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[margin\2c opa\]{transition-property:margin,opa;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\2c height\2c padding\]{transition-property:width,height,padding;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\[width\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-1000{transition-duration:1s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{transition-timing-function:linear}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}@keyframes enter{0%{opacity:var(--tw-enter-opacity,1);transform:translate3d(var(--tw-enter-translate-x,0),var(--tw-enter-translate-y,0),0) scale3d(var(--tw-enter-scale,1),var(--tw-enter-scale,1),var(--tw-enter-scale,1)) rotate(var(--tw-enter-rotate,0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity,1);transform:translate3d(var(--tw-exit-translate-x,0),var(--tw-exit-translate-y,0),0) scale3d(var(--tw-exit-scale,1),var(--tw-exit-scale,1),var(--tw-exit-scale,1)) rotate(var(--tw-exit-rotate,0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.fade-in-0{--tw-enter-opacity:0}.fade-in-80{--tw-enter-opacity:0.8}.zoom-in-95{--tw-enter-scale:.95}.duration-1000{animation-duration:1s}.duration-200{animation-duration:.2s}.ease-in-out{animation-timing-function:cubic-bezier(.4,0,.2,1)}.ease-linear{animation-timing-function:linear}.ease-out{animation-timing-function:cubic-bezier(0,0,.2,1)}.running{animation-play-state:running}:root{--background:0 0% 100%;--foreground:222.2 84% 4.9%;--card:0 0% 100%;--card-foreground:222.2 84% 4.9%;--popover:0 0% 100%;--popover-foreground:222.2 84% 4.9%;--primary:142.1 76.2% 36.3%;--primary-foreground:355.7 100% 97.3%;--secondary:210 40% 96.1%;--secondary-foreground:222.2 47.4% 11.2%;--muted:210 40% 96.1%;--muted-foreground:215.4 16.3% 46.9%;--accent:210 40% 96.1%;--accent-foreground:222.2 47.4% 11.2%;--destructive:0 84.2% 60.2%;--destructive-foreground:210 40% 98%;--border:214.3 31.8% 91.4%;--input:214.3 31.8% 91.4%;--ring:142.1 76.2% 36.3%;--radius:0.5rem}.dark{--background:222.2 84% 4.9%;--foreground:210 40% 98%;--card:222.2 84% 4.9%;--card-foreground:210 40% 98%;--popover:222.2 84% 4.9%;--popover-foreground:210 40% 98%;--primary:142.1 70.6% 45.3%;--primary-foreground:222.2 47.4% 11.2%;--secondary:217.2 32.6% 17.5%;--secondary-foreground:210 40% 98%;--muted:217.2 32.6% 17.5%;--muted-foreground:215 20.2% 65.1%;--accent:217.2 32.6% 17.5%;--accent-foreground:210 40% 98%;--destructive:0 62.8% 30.6%;--destructive-foreground:210 40% 98%;--border:217.2 32.6% 17.5%;--input:217.2 32.6% 17.5%;--ring:142.1 76.2% 36.3%}*{border-color:hsl(var(--border))}body{background-color:hsl(var(--background));color:hsl(var(--foreground))}.file\:border-0::file-selector-button{border-width:0}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:-inset-2:after{content:var(--tw-content);inset:-.5rem}.after\:inset-y-0:after{content:var(--tw-content);top:0;bottom:0}.after\:left-1\/2:after{content:var(--tw-content);left:50%}.after\:w-1:after{content:var(--tw-content);width:.25rem}.after\:w-\[2px\]:after{content:var(--tw-content);width:2px}.after\:-translate-x-1\/2:after{content:var(--tw-content);--tw-translate-x:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.first\:rounded-l-md:first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.first\:border-l:first-child{border-left-width:1px}.last\:rounded-r-md:last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.focus-within\:relative:focus-within{position:relative}.focus-within\:z-20:focus-within{z-index:20}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-500:hover{--tw-bg-opacity:1;background-color:rgb(59 130 246/var(--tw-bg-opacity,1))}.hover\:bg-destructive\/80:hover{background-color:hsl(var(--destructive)/.8)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive)/.9)}.hover\:bg-gray-500:hover{--tw-bg-opacity:1;background-color:rgb(107 114 128/var(--tw-bg-opacity,1))}.hover\:bg-gray-600:hover{--tw-bg-opacity:1;background-color:rgb(75 85 99/var(--tw-bg-opacity,1))}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted)/.5)}.hover\:bg-orange-500:hover{--tw-bg-opacity:1;background-color:rgb(249 115 22/var(--tw-bg-opacity,1))}.hover\:bg-primary:hover{background-color:hsl(var(--primary))}.hover\:bg-primary\/80:hover{background-color:hsl(var(--primary)/.8)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary)/.9)}.hover\:bg-red-500:hover{--tw-bg-opacity:1;background-color:rgb(239 68 68/var(--tw-bg-opacity,1))}.hover\:bg-red-700:hover{--tw-bg-opacity:1;background-color:rgb(185 28 28/var(--tw-bg-opacity,1))}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary)/.8)}.hover\:bg-zinc-500:hover{--tw-bg-opacity:1;background-color:rgb(113 113 122/var(--tw-bg-opacity,1))}.hover\:bg-zinc-600:hover{--tw-bg-opacity:1;background-color:rgb(82 82 91/var(--tw-bg-opacity,1))}.hover\:bg-zinc-800:hover{--tw-bg-opacity:1;background-color:rgb(39 39 42/var(--tw-bg-opacity,1))}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-muted-foreground:hover{color:hsl(var(--muted-foreground))}.hover\:text-primary-foreground:hover{color:hsl(var(--primary-foreground))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-\[0_0_0_1px_hsl\(var\(--sidebar-accent\)\)\]:hover{--tw-shadow:0 0 0 1px hsl(var(--sidebar-accent));--tw-shadow-colored:0 0 0 1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-ring:focus{--tw-ring-color:hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-1:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-2:focus-visible{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color:hsl(var(--ring))}.focus-visible\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color:hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}.group\/menu-item:focus-within .group-focus-within\/menu-item\:opacity-100{opacity:1}.group:hover .group-hover\:opacity-100,.group\/menu-item:hover .group-hover\/menu-item\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted)/.4)}.group.toaster .group-\[\.toaster\]\:border-border{border-color:hsl(var(--border))}.group.toast .group-\[\.toast\]\:bg-muted{background-color:hsl(var(--muted))}.group.toast .group-\[\.toast\]\:bg-primary{background-color:hsl(var(--primary))}.group.toaster .group-\[\.toaster\]\:bg-background{background-color:hsl(var(--background))}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity:1;color:rgb(252 165 165/var(--tw-text-opacity,1))}.group.toast .group-\[\.toast\]\:text-muted-foreground{color:hsl(var(--muted-foreground))}.group.toast .group-\[\.toast\]\:text-primary-foreground{color:hsl(var(--primary-foreground))}.group.toaster .group-\[\.toaster\]\:text-foreground{color:hsl(var(--foreground))}.group.toaster .group-\[\.toaster\]\:shadow-lg{--tw-shadow:0 10px 15px -3px rgb(0 0 0/0.1),0 4px 6px -4px rgb(0 0 0/0.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive)/.3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity:1;color:rgb(254 242 242/var(--tw-text-opacity,1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(248 113 113/var(--tw-ring-opacity,1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color:#dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.has-\[\:disabled\]\:opacity-50:has(:disabled){opacity:.5}.group\/menu-item:has([data-sidebar=menu-action]) .group-has-\[\[data-sidebar\=menu-action\]\]\/menu-item\:pr-8{padding-right:2rem}.aria-disabled\:pointer-events-none[aria-disabled=true]{pointer-events:none}.aria-disabled\:opacity-50[aria-disabled=true]{opacity:.5}.aria-selected\:bg-accent[aria-selected=true]{background-color:hsl(var(--accent))}.aria-selected\:bg-accent\/50[aria-selected=true]{background-color:hsl(var(--accent)/.5)}.aria-selected\:text-accent-foreground[aria-selected=true]{color:hsl(var(--accent-foreground))}.aria-selected\:text-muted-foreground[aria-selected=true]{color:hsl(var(--muted-foreground))}.aria-selected\:opacity-100[aria-selected=true]{opacity:1}.data-\[disabled\=true\]\:pointer-events-none[data-disabled=true],.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[panel-group-direction\=vertical\]\:h-px[data-panel-group-direction=vertical]{height:1px}.data-\[panel-group-direction\=vertical\]\:w-full[data-panel-group-direction=vertical]{width:100%}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y:0.25rem}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom],.data-\[side\=left\]\:-translate-x-1[data-side=left]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x:-0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x:0.25rem}.data-\[side\=right\]\:translate-x-1[data-side=right],.data-\[side\=top\]\:-translate-y-1[data-side=top]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y:-0.25rem}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x:1.25rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x:var(--radix-toast-swipe-end-x)}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end],.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x:var(--radix-toast-swipe-move-x)}@keyframes accordion-up{0%{height:var(--radix-accordion-content-height)}to{height:0}}.data-\[state\=closed\]\:animate-accordion-up[data-state=closed]{animation:accordion-up .2s ease-out}@keyframes accordion-down{0%{height:0}to{height:var(--radix-accordion-content-height)}}.data-\[state\=open\]\:animate-accordion-down[data-state=open]{animation:accordion-down .2s ease-out}.data-\[panel-group-direction\=vertical\]\:flex-col[data-panel-group-direction=vertical]{flex-direction:column}.data-\[active\]\:bg-accent\/50[data-active]{background-color:hsl(var(--accent)/.5)}.data-\[selected\=\'true\'\]\:bg-accent[data-selected=true]{background-color:hsl(var(--accent))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=on\]\:bg-accent[data-state=on],.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=open\]\:bg-accent\/50[data-state=open]{background-color:hsl(var(--accent)/.5)}.data-\[state\=open\]\:bg-secondary[data-state=open]{background-color:hsl(var(--secondary))}.data-\[state\=selected\]\:bg-muted[data-state=selected]{background-color:hsl(var(--muted))}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[active\=true\]\:font-medium[data-active=true]{font-weight:500}.data-\[selected\=true\]\:text-accent-foreground[data-selected=true]{color:hsl(var(--accent-foreground))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=checked\]\:text-primary-foreground[data-state=checked]{color:hsl(var(--primary-foreground))}.data-\[state\=on\]\:text-accent-foreground[data-state=on],.data-\[state\=open\]\:text-accent-foreground[data-state=open]{color:hsl(var(--accent-foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\=true\]\:opacity-50[data-disabled=true],.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=open\]\:opacity-100[data-state=open]{opacity:1}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow:0 1px 2px 0 rgb(0 0 0/0.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=closed\]\:duration-300[data-state=closed]{transition-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{transition-duration:.5s}.data-\[motion\^\=from-\]\:animate-in[data-motion^=from-],.data-\[state\=open\]\:animate-in[data-state=open],.data-\[state\=visible\]\:animate-in[data-state=visible]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity:initial;--tw-enter-scale:initial;--tw-enter-rotate:initial;--tw-enter-translate-x:initial;--tw-enter-translate-y:initial}.data-\[motion\^\=to-\]\:animate-out[data-motion^=to-],.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[state\=hidden\]\:animate-out[data-state=hidden],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity:initial;--tw-exit-scale:initial;--tw-exit-rotate:initial;--tw-exit-translate-x:initial;--tw-exit-translate-y:initial}.data-\[motion\^\=from-\]\:fade-in[data-motion^=from-]{--tw-enter-opacity:0}.data-\[motion\^\=to-\]\:fade-out[data-motion^=to-],.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity:0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity:0.8}.data-\[state\=hidden\]\:fade-out[data-state=hidden]{--tw-exit-opacity:0}.data-\[state\=open\]\:fade-in-0[data-state=open],.data-\[state\=visible\]\:fade-in[data-state=visible]{--tw-enter-opacity:0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale:.95}.data-\[state\=open\]\:zoom-in-90[data-state=open]{--tw-enter-scale:.9}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale:.95}.data-\[motion\=from-end\]\:slide-in-from-right-52[data-motion=from-end]{--tw-enter-translate-x:13rem}.data-\[motion\=from-start\]\:slide-in-from-left-52[data-motion=from-start]{--tw-enter-translate-x:-13rem}.data-\[motion\=to-end\]\:slide-out-to-right-52[data-motion=to-end]{--tw-exit-translate-x:13rem}.data-\[motion\=to-start\]\:slide-out-to-left-52[data-motion=to-start]{--tw-exit-translate-x:-13rem}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y:-0.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x:0.5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x:-0.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y:0.5rem}.data-\[state\=closed\]\:slide-out-to-bottom[data-state=closed]{--tw-exit-translate-y:100%}.data-\[state\=closed\]\:slide-out-to-left[data-state=closed]{--tw-exit-translate-x:-100%}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x:-50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed],.data-\[state\=closed\]\:slide-out-to-right[data-state=closed]{--tw-exit-translate-x:100%}.data-\[state\=closed\]\:slide-out-to-top[data-state=closed]{--tw-exit-translate-y:-100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-bottom[data-state=open]{--tw-enter-translate-y:100%}.data-\[state\=open\]\:slide-in-from-left[data-state=open]{--tw-enter-translate-x:-100%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x:-50%}.data-\[state\=open\]\:slide-in-from-right[data-state=open]{--tw-enter-translate-x:100%}.data-\[state\=open\]\:slide-in-from-top[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y:-48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y:-100%}.data-\[state\=closed\]\:duration-300[data-state=closed]{animation-duration:.3s}.data-\[state\=open\]\:duration-500[data-state=open]{animation-duration:.5s}.data-\[panel-group-direction\=vertical\]\:after\:left-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);left:0}.data-\[panel-group-direction\=vertical\]\:after\:h-1[data-panel-group-direction=vertical]:after{content:var(--tw-content);height:.25rem}.data-\[panel-group-direction\=vertical\]\:after\:w-full[data-panel-group-direction=vertical]:after{content:var(--tw-content);width:100%}.data-\[panel-group-direction\=vertical\]\:after\:-translate-y-1\/2[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-y:-50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.data-\[panel-group-direction\=vertical\]\:after\:translate-x-0[data-panel-group-direction=vertical]:after{content:var(--tw-content);--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:left-\[calc\(var\(--sidebar-width\)\*-1\)\]{left:calc(var(--sidebar-width) * -1)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:right-\[calc\(var\(--sidebar-width\)\*-1\)\]{right:calc(var(--sidebar-width) * -1)}.group[data-side=left] .group-data-\[side\=left\]\:-right-4{right:-1rem}.group[data-side=right] .group-data-\[side\=right\]\:left-0{left:0}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:-mt-8{margin-top:-2rem}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:hidden{display:none}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!size-8{width:2rem!important;height:2rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[--sidebar-width-icon\]{width:var(--sidebar-width-icon)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)\)\]{width:calc(var(--sidebar-width-icon) + 1rem)}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:w-\[calc\(var\(--sidebar-width-icon\)_\+_theme\(spacing\.4\)_\+2px\)\]{width:calc(var(--sidebar-width-icon) + 1rem + 2px)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:w-0{width:0}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:translate-x-0{--tw-translate-x:0px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-side=right] .group-data-\[side\=right\]\:rotate-180,.group[data-state=open] .group-data-\[state\=open\]\:rotate-180{--tw-rotate:180deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:overflow-hidden{overflow:hidden}.group[data-variant=floating] .group-data-\[variant\=floating\]\:rounded-lg{border-radius:var(--radius)}.group[data-variant=floating] .group-data-\[variant\=floating\]\:border{border-width:1px}.group[data-side=left] .group-data-\[side\=left\]\:border-r{border-right-width:1px}.group[data-side=right] .group-data-\[side\=right\]\:border-l{border-left-width:1px}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-0{padding:0!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:\!p-2{padding:.5rem!important}.group[data-collapsible=icon] .group-data-\[collapsible\=icon\]\:opacity-0{opacity:0}.group[data-variant=floating] .group-data-\[variant\=floating\]\:shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.group[data-collapsible=offcanvas] .group-data-\[collapsible\=offcanvas\]\:after\:left-full:after{content:var(--tw-content);left:100%}.peer\/menu-button[data-size=default]~.peer-data-\[size\=default\]\/menu-button\:top-1\.5{top:.375rem}.peer\/menu-button[data-size=lg]~.peer-data-\[size\=lg\]\/menu-button\:top-2\.5{top:.625rem}.peer\/menu-button[data-size=sm]~.peer-data-\[size\=sm\]\/menu-button\:top-1{top:.25rem}.peer[data-variant=inset]~.peer-data-\[variant\=inset\]\:min-h-\[calc\(100svh-theme\(spacing\.4\)\)\]{min-height:calc(100svh - 1rem)}.dark\:border-destructive:is(.dark *){border-color:hsl(var(--destructive))}@media (min-width:640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:mt-0{margin-top:0}.sm\:flex{display:flex}.sm\:max-w-sm{max-width:24rem}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:justify-end{justify-content:flex-end}.sm\:gap-2\.5{gap:.625rem}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * var(--tw-space-y-reverse))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:px-10{padding-left:2.5rem;padding-right:2.5rem}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y:100%}}@media (min-width:768px){.md\:absolute{position:absolute}.md\:block{display:block}.md\:flex{display:flex}.md\:w-\[var\(--radix-navigation-menu-viewport-width\)\]{width:var(--radix-navigation-menu-viewport-width)}.md\:w-auto{width:auto}.md\:max-w-\[420px\]{max-width:420px}.md\:text-sm{font-size:.875rem;line-height:1.25rem}.md\:opacity-0{opacity:0}.after\:md\:hidden:after{content:var(--tw-content);display:none}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:m-2{margin:.5rem}.peer[data-state=collapsed][data-variant=inset]~.md\:peer-data-\[state\=collapsed\]\:peer-data-\[variant\=inset\]\:ml-2{margin-left:.5rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:ml-0{margin-left:0}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:rounded-xl{border-radius:.75rem}.peer[data-variant=inset]~.md\:peer-data-\[variant\=inset\]\:shadow{--tw-shadow:0 1px 3px 0 rgb(0 0 0/0.1),0 1px 2px -1px rgb(0 0 0/0.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}}@media (min-width:1024px){.lg\:w-\[500px\]{width:500px}}@media (min-width:1280px){.xl\:w-\[600px\]{width:600px}}.\[\&\:has\(\[aria-selected\]\)\]\:bg-accent:has([aria-selected]){background-color:hsl(var(--accent))}.first\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-l-md:has([aria-selected]):first-child{border-top-left-radius:calc(var(--radius) - 2px);border-bottom-left-radius:calc(var(--radius) - 2px)}.last\:\[\&\:has\(\[aria-selected\]\)\]\:rounded-r-md:has([aria-selected]):last-child{border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[aria-selected\]\.day-outside\)\]\:bg-accent\/50:has([aria-selected].day-outside){background-color:hsl(var(--accent)/.5)}.\[\&\:has\(\[aria-selected\]\.day-range-end\)\]\:rounded-r-md:has([aria-selected].day-range-end){border-top-right-radius:calc(var(--radius) - 2px);border-bottom-right-radius:calc(var(--radius) - 2px)}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>button\]\:hidden>button{display:none}.\[\&\>span\:last-child\]\:truncate>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\+div\]\:translate-y-\[-3px\]>svg+div{--tw-translate-y:-3px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\>svg\]\:absolute>svg{position:absolute}.\[\&\>svg\]\:left-4>svg{left:1rem}.\[\&\>svg\]\:top-4>svg{top:1rem}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:h-2\.5>svg{height:.625rem}.\[\&\>svg\]\:h-3>svg{height:.75rem}.\[\&\>svg\]\:h-3\.5>svg{height:.875rem}.\[\&\>svg\]\:w-2\.5>svg{width:.625rem}.\[\&\>svg\]\:w-3>svg{width:.75rem}.\[\&\>svg\]\:w-3\.5>svg{width:.875rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>svg\]\:text-destructive>svg{color:hsl(var(--destructive))}.\[\&\>svg\]\:text-foreground>svg{color:hsl(var(--foreground))}.\[\&\>svg\]\:text-muted-foreground>svg{color:hsl(var(--muted-foreground))}.\[\&\>svg\~\*\]\:pl-7>svg~*{padding-left:1.75rem}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div{--tw-rotate:90deg}.\[\&\[data-panel-group-direction\=vertical\]\>div\]\:rotate-90[data-panel-group-direction=vertical]>div,.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.\[\&\[data-state\=open\]\>svg\]\:rotate-180[data-state=open]>svg{--tw-rotate:180deg}.\[\&_\.recharts-cartesian-axis-tick_text\]\:fill-muted-foreground .recharts-cartesian-axis-tick text{fill:hsl(var(--muted-foreground))}.\[\&_\.recharts-cartesian-grid_line\[stroke\=\'\#ccc\'\]\]\:stroke-border\/50 .recharts-cartesian-grid line[stroke="#ccc"]{stroke:hsl(var(--border)/.5)}.\[\&_\.recharts-curve\.recharts-tooltip-cursor\]\:stroke-border .recharts-curve.recharts-tooltip-cursor{stroke:hsl(var(--border))}.\[\&_\.recharts-dot\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-dot[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-layer\]\:outline-none .recharts-layer{outline:2px solid transparent;outline-offset:2px}.\[\&_\.recharts-polar-grid_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-polar-grid [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-radial-bar-background-sector\]\:fill-muted .recharts-radial-bar-background-sector,.\[\&_\.recharts-rectangle\.recharts-tooltip-cursor\]\:fill-muted .recharts-rectangle.recharts-tooltip-cursor{fill:hsl(var(--muted))}.\[\&_\.recharts-reference-line_\[stroke\=\'\#ccc\'\]\]\:stroke-border .recharts-reference-line [stroke="#ccc"]{stroke:hsl(var(--border))}.\[\&_\.recharts-sector\[stroke\=\'\#fff\'\]\]\:stroke-transparent .recharts-sector[stroke="#fff"]{stroke:transparent}.\[\&_\.recharts-sector\]\:outline-none .recharts-sector,.\[\&_\.recharts-surface\]\:outline-none .recharts-surface{outline:2px solid transparent;outline-offset:2px}.\[\&_\[cmdk-group-heading\]\]\:px-2 [cmdk-group-heading]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-group-heading\]\]\:py-1\.5 [cmdk-group-heading]{padding-top:.375rem;padding-bottom:.375rem}.\[\&_\[cmdk-group-heading\]\]\:text-xs [cmdk-group-heading]{font-size:.75rem;line-height:1rem}.\[\&_\[cmdk-group-heading\]\]\:font-medium [cmdk-group-heading]{font-weight:500}.\[\&_\[cmdk-group-heading\]\]\:text-muted-foreground [cmdk-group-heading]{color:hsl(var(--muted-foreground))}.\[\&_\[cmdk-group\]\:not\(\[hidden\]\)_\~\[cmdk-group\]\]\:pt-0 [cmdk-group]:not([hidden])~[cmdk-group]{padding-top:0}.\[\&_\[cmdk-group\]\]\:px-2 [cmdk-group]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:h-5 [cmdk-input-wrapper] svg{height:1.25rem}.\[\&_\[cmdk-input-wrapper\]_svg\]\:w-5 [cmdk-input-wrapper] svg{width:1.25rem}.\[\&_\[cmdk-input\]\]\:h-12 [cmdk-input]{height:3rem}.\[\&_\[cmdk-item\]\]\:px-2 [cmdk-item]{padding-left:.5rem;padding-right:.5rem}.\[\&_\[cmdk-item\]\]\:py-3 [cmdk-item]{padding-top:.75rem;padding-bottom:.75rem}.\[\&_\[cmdk-item\]_svg\]\:h-5 [cmdk-item] svg{height:1.25rem}.\[\&_\[cmdk-item\]_svg\]\:w-5 [cmdk-item] svg{width:1.25rem}.\[\&_p\]\:leading-relaxed p{line-height:1.625}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}[data-side=left][data-collapsible=offcanvas] .\[\[data-side\=left\]\[data-collapsible\=offcanvas\]_\&\]\:-right-2{right:-.5rem}[data-side=left][data-state=collapsed] .\[\[data-side\=left\]\[data-state\=collapsed\]_\&\]\:cursor-e-resize{cursor:e-resize}[data-side=left] .\[\[data-side\=left\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right][data-collapsible=offcanvas] .\[\[data-side\=right\]\[data-collapsible\=offcanvas\]_\&\]\:-left-2{left:-.5rem}[data-side=right][data-state=collapsed] .\[\[data-side\=right\]\[data-state\=collapsed\]_\&\]\:cursor-w-resize{cursor:w-resize}[data-side=right] .\[\[data-side\=right\]_\&\]\:cursor-e-resize{cursor:e-resize} \ No newline at end of file diff --git a/_next/static/media/26a46d62cd723877-s.woff2 b/_next/static/media/26a46d62cd723877-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..3a27e632eb14fffc6fce03483049986ba13f6802 Binary files /dev/null and b/_next/static/media/26a46d62cd723877-s.woff2 differ diff --git a/_next/static/media/55c55f0601d81cf3-s.woff2 b/_next/static/media/55c55f0601d81cf3-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..bcf38fd18ee05e4de3d4025cf51939418a14aa53 Binary files /dev/null and b/_next/static/media/55c55f0601d81cf3-s.woff2 differ diff --git a/_next/static/media/581909926a08bbc8-s.woff2 b/_next/static/media/581909926a08bbc8-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b419d4302a5ae51800e2d227269e065cd4f8e73f Binary files /dev/null and b/_next/static/media/581909926a08bbc8-s.woff2 differ diff --git a/_next/static/media/8e9860b6e62d6359-s.woff2 b/_next/static/media/8e9860b6e62d6359-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..57da6f8d46e2e42d0fd7d8b1d69d39b3b5fda6d4 Binary files /dev/null and b/_next/static/media/8e9860b6e62d6359-s.woff2 differ diff --git a/_next/static/media/97e0cb1ae144a2a9-s.woff2 b/_next/static/media/97e0cb1ae144a2a9-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..7fdf0b945543e93603888d7d777f684b15dec9d8 Binary files /dev/null and b/_next/static/media/97e0cb1ae144a2a9-s.woff2 differ diff --git a/_next/static/media/df0a9ae256c0569c-s.woff2 b/_next/static/media/df0a9ae256c0569c-s.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..072229b870650dd4ef5370a52c6aa62b3a9752c7 Binary files /dev/null and b/_next/static/media/df0a9ae256c0569c-s.woff2 differ diff --git a/_next/static/media/e4af272ccee01ff0-s.p.woff2 b/_next/static/media/e4af272ccee01ff0-s.p.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..91dc3e8529921cabc74fb1dacf5253260b9c8cca Binary files /dev/null and b/_next/static/media/e4af272ccee01ff0-s.p.woff2 differ diff --git a/bambot_v0.jpg b/bambot_v0.jpg new file mode 100644 index 0000000000000000000000000000000000000000..d96ae15447782e3dd5c2059c061842882c06dc80 --- /dev/null +++ b/bambot_v0.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b72c41077a713a598ccb295bfac0bf968e24e87a5a7b38591cd1d8da74ddee59 +size 645399 diff --git a/bambot_v0_base.png b/bambot_v0_base.png new file mode 100644 index 0000000000000000000000000000000000000000..cc1fd2dc22534f23802db8d72b8cc608cf886e13 --- /dev/null +++ b/bambot_v0_base.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d4e74f809a73f516c884c61bdecc3370dcfdae45b60ce1461ae7aa276a01d0cd +size 694739 diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..d2fdf42f8e33dc4a2bf06eb6bc61f8336dd648cb Binary files /dev/null and b/favicon.ico differ diff --git a/index.html b/index.html index b0c4b3666032a737f3903db53e6a8a9272483e28..d39aa500a8b0bdb0b042f2c1f03bec8cc029bebc 100644 --- a/index.html +++ b/index.html @@ -1,19 +1 @@ - - - - - - My static Space - - - - - - +BamBot
Dora-BamBot
This browser is not supported! Please use Chrome.
Star

Joint Controls


Click me to get the URDF

AI Control Robot

\ No newline at end of file diff --git a/index.txt b/index.txt new file mode 100644 index 0000000000000000000000000000000000000000..4c7f517a698879b9dca62d3a2f9306a83e869987 --- /dev/null +++ b/index.txt @@ -0,0 +1,25 @@ +1:"$Sreact.fragment" +2:I[7514,["874","static/chunks/874-d5b9b203af7637c3.js","177","static/chunks/app/layout-557283093bad1bf7.js"],"default"] +3:I[7555,[],""] +4:I[1295,[],""] +5:I[9742,["874","static/chunks/874-d5b9b203af7637c3.js","177","static/chunks/app/layout-557283093bad1bf7.js"],"Analytics"] +6:I[894,[],"ClientPageRoot"] +7:I[9806,["367","static/chunks/b536a0f1-8e928607e65d05e8.js","831","static/chunks/bd904a5c-a365b175d1933289.js","803","static/chunks/ba12c10f-1bf210e1db10c544.js","413","static/chunks/1329d575-baf00f741997f8c1.js","874","static/chunks/874-d5b9b203af7637c3.js","881","static/chunks/881-47c588f365fe1541.js","974","static/chunks/app/page-d26a24c6810d0a4b.js"],"default"] +a:I[9665,[],"MetadataBoundary"] +c:I[9665,[],"OutletBoundary"] +f:I[4911,[],"AsyncMetadataOutlet"] +11:I[9665,[],"ViewportBoundary"] +13:I[6614,[],""] +:HL["/_next/static/media/e4af272ccee01ff0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +:HL["/_next/static/css/2e82de4fb0b28870.css","style"] +0:{"P":null,"b":"DtkUoStcjKiY0p76MJl9o","p":"","c":["",""],"i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2e82de4fb0b28870.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_e8ce0c bg-black text-white w-screen h-screen","children":[["$","$L2",null,{}],["$","$L3",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L4",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}],["$","$L5",null,{}]]}]}]]}],{"children":["__PAGE__",["$","$1","c",{"children":[["$","$L6",null,{"Component":"$7","searchParams":{},"params":{},"promises":["$@8","$@9"]}],["$","$La",null,{"children":"$Lb"}],null,["$","$Lc",null,{"children":["$Ld","$Le",["$","$Lf",null,{"promise":"$@10"}]]}]]}],{},null,false]},null,false],["$","$1","h",{"children":[null,["$","$1","Es4in2ccigVWNagZBbNv7",{"children":[["$","$L11",null,{"children":"$L12"}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],null]}],false]],"m":"$undefined","G":["$13","$undefined"],"s":false,"S":true} +14:"$Sreact.suspense" +15:I[4911,[],"AsyncMetadata"] +8:{} +9:{} +b:["$","$14",null,{"fallback":null,"children":["$","$L15",null,{"promise":"$@16"}]}] +e:null +12:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] +d:null +16:{"metadata":[["$","title","0",{"children":"BamBot"}],["$","meta","1",{"name":"description","content":"Open source, low-cost AI robots 🤖"}]],"error":null,"digest":"$undefined"} +10:{"metadata":"$16:metadata","error":null,"digest":"$undefined"} diff --git a/logo.jpg b/logo.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4b5ae428145ab8c6103163f63082fa4a892d7693 Binary files /dev/null and b/logo.jpg differ diff --git a/so-arm100.jpg b/so-arm100.jpg new file mode 100644 index 0000000000000000000000000000000000000000..6ebc1af24eca60259de0f603fc5d4b2c0bc4e1d1 --- /dev/null +++ b/so-arm100.jpg @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31dc7a5ebff5e6b5e2b2dad37cd3258b94f238b089c42d97062cb9e2e1f0ec5a +size 474384 diff --git a/sts3215.png b/sts3215.png new file mode 100644 index 0000000000000000000000000000000000000000..a9ddb1a77bf8112e77c56151a5aa46bbeb7e0bae --- /dev/null +++ b/sts3215.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8a01e6ebb75908e55905bec319f5055a27f682558b9fe27b11a71b9563aa234c +size 284469